{"_id":"@bejibun/storage","_rev":"4-48f69236e30b8a98c27b07fb2a3160f6","name":"@bejibun/storage","dist-tags":{"latest":"0.1.12"},"versions":{"0.1.0":{"name":"@bejibun/storage","version":"0.1.0","keywords":["bun","bun framework","storage","bejibun","typescript"],"author":"Havea Crenata <havea.crenata@gmail.com>","license":"MIT","_id":"@bejibun/storage@0.1.0","maintainers":[{"name":"crenata","email":"havea.crenata@gmail.com"}],"homepage":"https://github.com/Bejibun-Framework/bejibun-storage#readme","bugs":{"url":"https://github.com/Bejibun-Framework/bejibun-storage/issues"},"dist":{"shasum":"acca08079afa89c28574c000959f205f7cecfc05","tarball":"https://registry.npmjs.org/@bejibun/storage/-/storage-0.1.0.tgz","fileCount":31,"integrity":"sha512-SrZ8AMp0I52rDwhCOhNB/qhigiW3J2znWysYCCkpZufaVPu0kDtEf0qK5ZYqxC+Iowx2IJvbRNqb4gs/0XGsFQ==","signatures":[{"sig":"MEQCIB/UZ1UtED6NCdKSsQp1N48ffoGbX8SqzcVibg2y2RUkAiAF4Eiim4Nkvj1AWSAJOiJB4oh/ecjj5K8ILdI04d7yRA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34318},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","shasum":"acca08079afa89c28574c000959f205f7cecfc05","scripts":{"alias":"bunx tsc-alias -p tsconfig.json","build":"bunx tsc -p tsconfig.json && bun run types && bun run alias && bun run rsync && bun run clean","clean":"rm -rf dist","rsync":"rsync -a dist/ ./","types":"cp -rf src/types dist","deploy":"bun run build && bun publish --access public"},"_npmUser":{"name":"crenata","email":"havea.crenata@gmail.com"},"_integrity":"sha512-SrZ8AMp0I52rDwhCOhNB/qhigiW3J2znWysYCCkpZufaVPu0kDtEf0qK5ZYqxC+Iowx2IJvbRNqb4gs/0XGsFQ==","repository":{"url":"git+https://github.com/Bejibun-Framework/bejibun-storage.git","type":"git"},"_npmVersion":"10.8.3","description":"Storage for Bejibun Framework","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@bejibun/app":"^0.1.24","@bejibun/utils":"^0.1.28","@bejibun/logger":"^0.1.22"},"_hasShrinkwrap":false,"devDependencies":{"tsc-alias":"^1.9.1","@types/bun":"latest"},"_npmOperationalInternal":{"tmp":"tmp/storage_0.1.0_1785776789004_0.8636232298206705","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bejibun/storage","version":"0.1.1","keywords":["bun","bun framework","storage","bejibun","typescript"],"author":"Havea Crenata <havea.crenata@gmail.com>","license":"MIT","_id":"@bejibun/storage@0.1.1","maintainers":[{"name":"crenata","email":"havea.crenata@gmail.com"}],"homepage":"https://github.com/Bejibun-Framework/bejibun-storage#readme","bugs":{"url":"https://github.com/Bejibun-Framework/bejibun-storage/issues"},"dist":{"shasum":"4a597bb3509216c2f7e1be2cef378a459285889d","tarball":"https://registry.npmjs.org/@bejibun/storage/-/storage-0.1.1.tgz","fileCount":34,"integrity":"sha512-PCtfC7gJ3iqT3nKgrB876rPEld5//scb5dLL+B2DA9Jv8xKEhBrXA5/wlpijmphfZNxSVw3PRXdXzRp3/ZfgXA==","signatures":[{"sig":"MEUCIQCkgg2a4y+7O5kMda2F1ILNmrvkk168hskCzlknR9TI/wIgKJBXG1+lBXwdXrMs7flVjoFoY3GzX2nPgnpkNyRT+Us=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39691},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","shasum":"4a597bb3509216c2f7e1be2cef378a459285889d","scripts":{"lint":"bun run format && bun run eslint","alias":"tsc-alias -p tsconfig.json","build":"bun run lint && tsc -p tsconfig.json && bun run types && bun run alias && bun run rsync && bun run clean","clean":"rm -rf dist","rsync":"rsync -a dist/ ./","types":"cp -rf src/types dist","deploy":"bun run build && bun publish --access public","eslint":"eslint src","format":"prettier --write src --log-level=silent"},"_npmUser":{"name":"crenata","email":"havea.crenata@gmail.com"},"_integrity":"sha512-PCtfC7gJ3iqT3nKgrB876rPEld5//scb5dLL+B2DA9Jv8xKEhBrXA5/wlpijmphfZNxSVw3PRXdXzRp3/ZfgXA==","repository":{"url":"git+https://github.com/Bejibun-Framework/bejibun-storage.git","type":"git"},"_npmVersion":"10.8.3","description":"Storage for Bejibun Framework","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@bejibun/app":"^0.1.25","@bejibun/utils":"^0.1.29","@bejibun/logger":"^0.1.23"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.8.1","globals":"^17.11.0","prettier":"^3.9.6","tsc-alias":"^1.9.2","@eslint/js":"^10.0.1","@types/bun":"^1.3.14","typescript":"^6.0.3","typescript-eslint":"^8.67.0","eslint-config-prettier":"^10.1.8"},"_npmOperationalInternal":{"tmp":"tmp/storage_0.1.1_1787210463121_0.06276061132440902","host":"s3://npm-registry-packages-npm-production"}},"0.1.11":{"name":"@bejibun/storage","version":"0.1.11","keywords":["bun","bun framework","storage","bejibun","typescript"],"author":"Havea Crenata <havea.crenata@gmail.com>","license":"MIT","_id":"@bejibun/storage@0.1.11","maintainers":[{"name":"crenata","email":"havea.crenata@gmail.com"}],"homepage":"https://github.com/Bejibun-Framework/bejibun-storage#readme","bugs":{"url":"https://github.com/Bejibun-Framework/bejibun-storage/issues"},"dist":{"shasum":"07851739146e8062eb5a2f49f12f7a36d3cacb59","tarball":"https://registry.npmjs.org/@bejibun/storage/-/storage-0.1.11.tgz","fileCount":46,"integrity":"sha512-ySEXZQi0iBfNiO8ifQnx/B0lOsg5tIjur54+E3+iMmtZ+pXOZKJgzp69VraDHXle9ZbbqTTAFu298tV53xaL9w==","signatures":[{"sig":"MEUCIQCcz4fq90WRkOSu/ZK5AcoViKgQv4I1vOl2ImAi6Vxx4QIgXFPZPVbX1UEg+s9ZuD1RpdugaCsVvfIcY0lh8xhidg8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":101459},"main":"index.js","type":"module","types":"index.d.ts","module":"index.js","shasum":"07851739146e8062eb5a2f49f12f7a36d3cacb59","scripts":{"lint":"bun run format && bun run eslint","test":"bun test tests/","alias":"tsc-alias -p tsconfig.json","build":"bun run lint && tsc -p tsconfig.json && bun run types && bun run alias && bun run rsync && bun run clean","clean":"rm -rf dist","rsync":"rsync -a dist/ ./","types":"cp -rf src/types dist","deploy":"bun run build && bun publish --access public","eslint":"eslint src","format":"prettier --write src --log-level=silent"},"_npmUser":{"name":"crenata","email":"havea.crenata@gmail.com"},"_integrity":"sha512-ySEXZQi0iBfNiO8ifQnx/B0lOsg5tIjur54+E3+iMmtZ+pXOZKJgzp69VraDHXle9ZbbqTTAFu298tV53xaL9w==","repository":{"url":"git+https://github.com/Bejibun-Framework/bejibun-storage.git","type":"git"},"_npmVersion":"10.8.3","description":"Storage for Bejibun Framework","directories":{},"_nodeVersion":"26.3.0","dependencies":{"@bejibun/app":"^0.1.26","@bejibun/utils":"^0.1.30","@bejibun/logger":"^0.2.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.9.1","globals":"^17.12.0","prettier":"^3.9.6","tsc-alias":"^1.9.4","@eslint/js":"^10.0.1","@types/bun":"^1.4.0","typescript":"^6.0.3","typescript-eslint":"^8.69.0","eslint-config-prettier":"^10.1.8"},"_npmOperationalInternal":{"tmp":"tmp/storage_0.1.11_1788521991905_0.9691979851430228","host":"s3://npm-registry-packages-npm-production"}},"0.1.12":{"name":"@bejibun/storage","version":"0.1.12","author":"Havea Crenata <havea.crenata@gmail.com>","repository":{"type":"git","url":"git+https://github.com/Bejibun-Framework/bejibun-storage.git"},"main":"index.js","module":"index.js","devDependencies":{"@eslint/js":"^10.0.1","@types/bun":"^1.4.2","eslint":"^10.10.0","eslint-config-prettier":"^10.1.8","globals":"^17.12.0","prettier":"^3.9.6","tsc-alias":"^1.9.4","typescript":"^6.0.3","typescript-eslint":"^8.70.0"},"bugs":{"url":"https://github.com/Bejibun-Framework/bejibun-storage/issues"},"description":"Storage for Bejibun Framework","homepage":"https://github.com/Bejibun-Framework/bejibun-storage#readme","keywords":["bun","bun framework","storage","bejibun","typescript"],"license":"MIT","scripts":{"alias":"tsc-alias -p tsconfig.json","types":"cp -rf src/types dist","rsync":"rsync -a dist/ ./","clean":"rm -rf dist","format":"prettier --write src --log-level=silent","eslint":"eslint src","lint":"bun run format && bun run eslint","test":"bun test tests/","build":"bun run lint && tsc -p tsconfig.json && bun run types && bun run alias && bun run rsync && bun run clean","deploy":"bun run build && bun publish --access public"},"type":"module","types":"index.d.ts","dependencies":{"@bejibun/app":"^0.1.27","@bejibun/logger":"^0.2.10","@bejibun/utils":"^0.1.31"},"_id":"@bejibun/storage@0.1.12","_integrity":"sha512-DzGImcdOsMmNPf8IwJnwcQ1qemzLtrtZmk4VbHLKAwQVhEX93j02wh3b/eOcBpX3eS9JDupvIYaC5tOhant0ZQ==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"65e28c4deb3f62ed093e430f0a1dcdd17f9620a4","dist":{"integrity":"sha512-DzGImcdOsMmNPf8IwJnwcQ1qemzLtrtZmk4VbHLKAwQVhEX93j02wh3b/eOcBpX3eS9JDupvIYaC5tOhant0ZQ==","shasum":"65e28c4deb3f62ed093e430f0a1dcdd17f9620a4","tarball":"https://registry.npmjs.org/@bejibun/storage/-/storage-0.1.12.tgz","fileCount":46,"unpackedSize":101461,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAoO163koOnr0TU3j1quKIPAY3AInur7u5yXjJeCLyTgAiBKwGUERHgpmMZxeoCXMLWAUA0Kq8eHKf3CnWPEZ7mj1g=="}]},"_npmUser":{"name":"crenata","email":"havea.crenata@gmail.com"},"directories":{},"maintainers":[{"name":"crenata","email":"havea.crenata@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/storage_0.1.12_1788850959635_0.2193327222534911"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-03T17:06:28.788Z","modified":"2026-09-08T07:02:40.008Z","0.1.0":"2026-08-03T17:06:29.161Z","0.1.1":"2026-08-20T07:21:03.280Z","0.1.11":"2026-09-04T11:39:52.034Z","0.1.12":"2026-09-08T07:02:39.784Z"},"bugs":{"url":"https://github.com/Bejibun-Framework/bejibun-storage/issues"},"author":"Havea Crenata <havea.crenata@gmail.com>","license":"MIT","homepage":"https://github.com/Bejibun-Framework/bejibun-storage#readme","keywords":["bun","bun framework","storage","bejibun","typescript"],"repository":{"type":"git","url":"git+https://github.com/Bejibun-Framework/bejibun-storage.git"},"description":"Storage for Bejibun Framework","maintainers":[{"name":"crenata","email":"havea.crenata@gmail.com"}],"readme":"<div align=\"center\">\n\n<img src=\"https://github.com/Bejibun-Framework/bejibun/blob/master/public/images/bejibun.png?raw=true\" width=\"150\" alt=\"Bejibun\" />\n\n![GitHub top language](https://img.shields.io/github/languages/top/Bejibun-Framework/bejibun-storage)\n![NPM Downloads](https://img.shields.io/npm/d18m/%40bejibun%2Fstorage)\n![GitHub issues](https://img.shields.io/github/issues/Bejibun-Framework/bejibun-storage)\n![GitHub](https://img.shields.io/github/license/Bejibun-Framework/bejibun-storage)\n![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/Bejibun-Framework/bejibun-storage?display_name=tag&include_prereleases)\n\n</div>\n\n# Storage for Bejibun\nStorage for Bejibun Framework.\n\n## Usage\n\n### Installation\nInstall the package.\n\n```bash\n# Using Bun\nbun add @bejibun/storage\n\n# Using Bejibun\nbun ace install @bejibun/storage\n```\n\n### Configuration\nThe configuration file automatically executed if you are using `ace`.\n\nOr\n\nAdd `storage.ts` inside config directory on your project if doesn't exist.\n\n```bash\nconfig/storage.ts\n```\n\n```ts\nimport App from \"@bejibun/app\";\nimport StorageDiskDriverEnum from \"@/enums/StorageDiskDriverEnum\";\n\nconst config: Record<string, any> = {\n    default: \"local\",\n\n    disks: {\n        local: {\n            driver: StorageDiskDriverEnum.Local,\n            root: App.Path.storagePath(\"app\")\n        },\n\n        public: {\n            driver: StorageDiskDriverEnum.Local,\n            root: App.Path.storagePath(\"app/public\"),\n            url: `${Bun.env.APP_URL}/storage/public`\n        },\n\n        s3: {\n            driver: StorageDiskDriverEnum.S3,\n            endpoint: Bun.env.S3_ENDPOINT,\n            region: Bun.env.S3_REGION,\n            bucket: Bun.env.S3_BUCKET,\n            access_key_id: Bun.env.S3_ACCESS_KEY_ID,\n            secret_access_key: Bun.env.S3_SECRET_ACCESS_KEY,\n            url: \"\"\n        }\n    }\n};\n\nexport default config;\n```\n\nYou can pass the value with environment variables.\n\n### How to Use\nHow to use tha package.\n\n#### Standard Use\n```ts\nimport Storage from \"@bejibun/core/facades/Storage\";\n\nawait Storage.exists(\"path/to/your/file.ext\"); // Check if the file exists\nawait Storage.missing(\"path/to/your/file.ext\"); // Check if the file doesn't exists\nawait Storage.get(\"path/to/your/file.ext\"); // Get data content\nawait Storage.put(\"path/to/your/file.ext\", \"content\"); // Store content to file\nawait Storage.copy(\"source/file.ext\", \"destination/file.ext\"); // Copy file\nawait Storage.move(\"source/file.ext\", \"destination/file.ext\"); // Move file\nawait Storage.delete(\"path/to/your/file.ext\"); // Delete file\nawait Storage.metadata(\"path/to/your/file.ext\"); // Retrieve complete file metadata and statistics\nawait Storage.size(\"path/to/your/file.ext\"); // Get the file size in bytes\nawait Storage.mimeType(\"path/to/your/file.ext\"); // Get the file MIME type\nawait Storage.lastModified(\"path/to/your/file.ext\"); // Get the file's last modification date\n```\n\n#### With Specified Disk\n```ts\nimport Storage from \"@bejibun/core/facades/Storage\";\n\nawait Storage.disk(\"public\").exists(\"path/to/your/file.ext\");\nawait Storage.disk(\"public\").missing(\"path/to/your/file.ext\");\nawait Storage.disk(\"public\").get(\"path/to/your/file.ext\");\nawait Storage.disk(\"public\").put(\"path/to/your/file.ext\", \"content\");\nawait Storage.disk(\"public\").copy(\"source/file.ext\", \"destination/file.ext\");\nawait Storage.disk(\"public\").move(\"source/file.ext\", \"destination/file.ext\");\nawait Storage.disk(\"public\").delete(\"path/to/your/file.ext\");\nawait Storage.disk(\"public\").metadata(\"path/to/your/file.ext\");\nawait Storage.disk(\"public\").size(\"path/to/your/file.ext\");\nawait Storage.disk(\"public\").mimeType(\"path/to/your/file.ext\");\nawait Storage.disk(\"public\").lastModified(\"path/to/your/file.ext\");\n```\n\n#### New Disk at Runtime\n```ts\nimport Storage from \"@bejibun/core/facades/Storage\";\n\nawait Storage.build({\n    driver: \"local\", // \"local\" | StorageDiskDriverEnum.Local\n    root: App.Path.storagePath(\"custom\")\n}).exists(\"path/to/your/file.ext\");\nawait Storage.build({\n    driver: \"local\",\n    root: App.Path.storagePath(\"custom\")\n}).missing(\"path/to/your/file.ext\");\nawait Storage.build({\n    driver: \"local\",\n    root: App.Path.storagePath(\"custom\")\n}).get(\"path/to/your/file.ext\");\nawait Storage.build({\n    driver: \"local\",\n    root: App.Path.storagePath(\"custom\")\n}).put(\"path/to/your/file.ext\", \"content\");\nawait Storage.build({\n    driver: \"local\",\n    root: App.Path.storagePath(\"custom\")\n}).copy(\"source/file.ext\", \"destination/file.ext\");\nawait Storage.build({\n    driver: \"local\",\n    root: App.Path.storagePath(\"custom\")\n}).move(\"source/file.ext\", \"destination/file.ext\");\nawait Storage.build({\n    driver: \"local\",\n    root: App.Path.storagePath(\"custom\")\n}).delete(\"path/to/your/file.ext\");\nawait Storage.build({\n    driver: \"local\",\n    root: App.Path.storagePath(\"custom\")\n}).metadata(\"path/to/your/file.ext\");\nawait Storage.build({\n    driver: \"local\",\n    root: App.Path.storagePath(\"custom\")\n}).size(\"path/to/your/file.ext\");\nawait Storage.build({\n    driver: \"local\",\n    root: App.Path.storagePath(\"custom\")\n}).mimeType(\"path/to/your/file.ext\");\nawait Storage.build({\n    driver: \"local\",\n    root: App.Path.storagePath(\"custom\")\n}).lastModified(\"path/to/your/file.ext\");\n```\n\n## ☕ Support / Donate\n\nIf you find this project helpful and want to support it:\n\n[![Donate](https://img.shields.io/badge/Donate-Support%20Me-orange?style=for-the-badge)](https://donate.bejibun.com)\n\nOr you can buy this `$BJBN (Bejibun)` tokens [here](https://pump.fun/coin/CQhbNnCGKfDaKXt8uE61i5DrBYJV7NPsCDD9vQgypump).","readmeFilename":"README.md"}