{"id":18551807,"url":"https://github.com/ducktors/storagebus","last_synced_at":"2025-07-04T00:34:24.488Z","repository":{"id":65327409,"uuid":"551349715","full_name":"ducktors/storagebus","owner":"ducktors","description":"A storage abstraction layer for Node.js that removes any difference among multiple public cloud storage services and local filesystems","archived":false,"fork":false,"pushed_at":"2025-06-30T08:04:22.000Z","size":1213,"stargazers_count":12,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-30T09:22:49.150Z","etag":null,"topics":["gcs","gcs-bucket","s3","s3-bucket","storage"],"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/ducktors.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-10-14T08:33:13.000Z","updated_at":"2025-06-30T08:04:27.000Z","dependencies_parsed_at":"2023-12-15T11:28:51.973Z","dependency_job_id":"3037719b-f467-45ce-8a15-d398d4907880","html_url":"https://github.com/ducktors/storagebus","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ducktors/storagebus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ducktors%2Fstoragebus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ducktors%2Fstoragebus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ducktors%2Fstoragebus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ducktors%2Fstoragebus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ducktors","download_url":"https://codeload.github.com/ducktors/storagebus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ducktors%2Fstoragebus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263426393,"owners_count":23464795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["gcs","gcs-bucket","s3","s3-bucket","storage"],"created_at":"2024-11-06T21:10:24.695Z","updated_at":"2025-07-04T00:34:24.465Z","avatar_url":"https://github.com/ducktors.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"---\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/1620916/216589345-fb63dc6a-a052-440b-a26f-cc291a976b77.png\"\u003e\n\u003c/p\u003e\n\n---\n\n![fox1t_disco_elysium_styled_storagebus_with_boxes_covered_by_clo_8b9e8a49-f59c-44a6-9c6e-58bdedc9ee3f](https://user-images.githubusercontent.com/1620916/216316357-92a5fe47-2adf-4e61-8a60-aaddf1ba8ad0.jpg)\n\n\n[![CI](https://github.com/ducktors/storagebus/actions/workflows/ci.yml/badge.svg)](https://github.com/ducktors/storagebus/actions/workflows/ci.yml) [![Test](https://github.com/ducktors/storagebus/actions/workflows/test.yml/badge.svg)](https://github.com/ducktors/storagebus/actions/workflows/test.yml) [![Coverage Status](https://coveralls.io/repos/github/ducktors/storagebus/badge.svg?branch=main)](https://coveralls.io/github/ducktors/storagebus?branch=main) [![Maintainability](https://api.codeclimate.com/v1/badges/40e86c80718286fa76b1/maintainability)](https://codeclimate.com/github/ducktors/storagebus/maintainability) [![storagebus](https://img.shields.io/npm/v/@ducktors/storagebus?label=storagebus)](https://www.npmjs.com/package/@ducktors/storagebus) [![storagebus-abstract](https://img.shields.io/npm/v/@ducktors/storagebus-abstract?label=storagebus-abstract)](https://www.npmjs.com/package/@ducktors/storagebus-abstract) [![storagebus-local](https://img.shields.io/npm/v/@ducktors/storagebus-local?label=storagebus-local)](https://www.npmjs.com/package/@ducktors/storagebus-local)\n[![storagebus-gcs](https://img.shields.io/npm/v/@ducktors/storagebus-gcs?label=storagebus-gcs)](https://www.npmjs.com/package/@ducktors/storagebus-gcs)\n[![storagebus-s3](https://img.shields.io/npm/v/@ducktors/storagebus-s3?label=storagebus-s3)](https://www.npmjs.com/package/@ducktors/storagebus-s3)\n[![storagebus-memory](https://img.shields.io/npm/v/@ducktors/storagebus-memory?label=storagebus-memory)](https://www.npmjs.com/package/@ducktors/storagebus-memory) \u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\nStoragebus is a storage abstraction layer for Node.js that removes any difference among multiple public cloud storage services and local filesystems.\n\n## Usage\n\nYou can use Storagebus with your filesystem, AWS and GCP:\n\n```javascript\nconst { Storage } = require(\"storage/local\");\n// const { Storage } = require('storage/aws')\n// const { Storage } = require('storage/gcp')\nconst { Readable } = require(\"node:stream\");\n\nconst storage = new Storage({\n  rootFolder: \"path/to/folder\",\n});\n// const storage = new Storage({\n//  bucket: 'your-aws-bucket';\n//  region: 'your-aws-region';\n//  accessKeyId: 'your-aws-access-key';\n//  secretAccessKey: 'your-aws-secret-access-key';\n// })\n// const storage = new Storage({\n//  bucket: 'your-gcp-bucket';\n//  projectId: 'your-gcp-project-id';\n//  clientEmail: 'your-gcp-client-email';\n//  privateKey: 'your-gcp-private-key';\n// })\n\nasync function main() {\n  // Your readable stream\n  const readable = Readable.from(\"Hello, world!\");\n\n  // write a file\n  const writtenFileString = await storage.write(\"your-file.txt\", readable);\n\n  // read a file from your storage\n  const fileReadable = await storage.read(\"your-file.txt\");\n\n  // check for file existance in your storage\n  const exist = await storage.exists(\"your-file.txt\");\n\n  // copy file\n  const copiedFileString = await storage.copy(\n    \"your-file.txt\",\n    \"your-file-copy.txt\"\n  );\n\n  // move a file\n  const movedFileString = await storage.move(\n    \"your-file-copy.txt\",\n    \"moved/your-file-copy.txt\"\n  );\n\n  // delete a file\n  await storage.remove(\"your-file.txt\");\n}\n```\n\n## Contribute to this project\n\n1. Clone this repository\n\n   `git clone git@github.com:github.com/ducktors/storagebus.git`\n\n2. Move inside repository folder\n\n   `cd storagebus`\n\n3. Install dependencies\n\n   `pnpm install`\n\n4. Run the project in development mode\n\n   `pnpm dev`\n\n## How to release\n\nThe release is performed by the maintainers of the repository. New versions are managed via [changesets](https://github.com/changesets/changesets).\n\nTo release a new version, simply choose which package to bump with `pnpm release` command:\n\n```\n$ pnpm release\n\n\u003e @ducktors/storagebus@0.9.0 release /ducktors-workstation/storagebus\n\u003e changeset\n\n🦋  Which packages would you like to include? …\n◯ unchanged packages\n  ◯ @ducktors/storagebus-abstract\n  ◯ @ducktors/storagebus-gcs\n  ◯ @ducktors/storagebus-local\n  ◯ @ducktors/storagebus-s3\n```\n\n## Contributors\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://maksim.dev\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1620916?v=4?s=100\" width=\"100px;\" alt=\"Maksim Sinik\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMaksim Sinik\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/ducktors/storagebus/commits?author=fox1t\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/ducktors/storagebus/commits?author=fox1t\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"#ideas-fox1t\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#maintenance-fox1t\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#mentoring-fox1t\" title=\"Mentoring\"\u003e🧑‍🏫\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"http://matteovivona.it\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/6388707?v=4?s=100\" width=\"100px;\" alt=\"Matteo Vivona\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMatteo Vivona\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#infra-tehKapa\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e \u003ca href=\"#security-tehKapa\" title=\"Security\"\u003e🛡️\u003c/a\u003e \u003ca href=\"https://github.com/ducktors/storagebus/commits?author=tehKapa\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/andrew-hu368\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/45509582?v=4?s=100\" width=\"100px;\" alt=\"Andrew Hu\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAndrew Hu\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/ducktors/storagebus/commits?author=andrew-hu368\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fducktors%2Fstoragebus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fducktors%2Fstoragebus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fducktors%2Fstoragebus/lists"}