{"id":21586076,"url":"https://github.com/magiclen/node-datalith","last_synced_at":"2026-02-18T05:01:18.244Z","repository":{"id":255924592,"uuid":"852711161","full_name":"magiclen/node-datalith","owner":"magiclen","description":"Datalith is a file management system powered by SQLite for metadata storage and the file system for file storage. This library can help you conmunicate with Datalith in Node.js.","archived":false,"fork":false,"pushed_at":"2025-03-23T10:41:38.000Z","size":375,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T12:09:06.829Z","etag":null,"topics":["datalith","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magiclen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-05T09:34:27.000Z","updated_at":"2025-03-23T10:41:26.000Z","dependencies_parsed_at":"2024-09-07T22:24:03.588Z","dependency_job_id":"48206d22-af2a-4870-b662-b49f3e88b9ff","html_url":"https://github.com/magiclen/node-datalith","commit_stats":null,"previous_names":["magiclen/node-datalith"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/magiclen/node-datalith","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fnode-datalith","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fnode-datalith/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fnode-datalith/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fnode-datalith/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magiclen","download_url":"https://codeload.github.com/magiclen/node-datalith/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fnode-datalith/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29569853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T04:18:28.490Z","status":"ssl_error","status_checked_at":"2026-02-18T04:13:49.018Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datalith","nodejs","typescript"],"created_at":"2024-11-24T15:12:36.115Z","updated_at":"2026-02-18T05:01:18.224Z","avatar_url":"https://github.com/magiclen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Datalith for Node.js\n==========\n\n[![CI](https://github.com/magiclen/node-datalith/actions/workflows/ci.yml/badge.svg)](https://github.com/magiclen/node-datalith/actions/workflows/ci.yml)\n\n[Datalith](https://github.com/magiclen/datalith) is a file management system powered by SQLite for metadata storage and the file system for file storage. This library can help you conmunicate with Datalith in Node.js.\n\n## Usage\n\n```typescript\nimport { createReadStream } from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport { buffer } from \"node:stream/consumers\";\n\nimport { Datalith } from \"node-datalith\";\n\nconst API_PREFIX = \"http://127.0.0.1:1111\";\nconst FILE_PATH = \"tests/data/image.png\";\n\nconst datalith = new Datalith(API_PREFIX);\n\nconst resource = await datalith.putResource({ fileStream: createReadStream(FILE_PATH) });\n\nconst file = await datalith.getResource(resource.id));\n\nconst data = await buffer(file.data);\n\nconst image = await datalith.putImage({ fileStream: createReadStream(FILE_PATH), maxWidth: 128 });\n\nconst originalImageFile = await datalith.getImage(image.id, { resolution: \"original\" });\n\nconst thumbnailImageFile = await datalith.getImage(image.id, { resolution: \"1x\" });\n```\n\n## License\n\n[MIT](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Fnode-datalith","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagiclen%2Fnode-datalith","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Fnode-datalith/lists"}