{"_id":"@dyanet/ghost-storage-gcs","_rev":"3-9228f524555b75921d227cb232d2f361","name":"@dyanet/ghost-storage-gcs","dist-tags":{"latest":"3.0.0"},"versions":{"2.0.0":{"name":"@dyanet/ghost-storage-gcs","version":"2.0.0","keywords":["ghost","google cloud","storage","gcs","plugin","adapter"],"author":{"url":"Dyanet Inc","name":"Akber Ahmed Choudhry","email":"akber@dyanet.com"},"license":"MIT","_id":"@dyanet/ghost-storage-gcs@2.0.0","maintainers":[{"name":"akber","email":"akber@dyanet.com"}],"homepage":"https://github.com/dyanet/ghost-storage-gcs","bugs":{"url":"https://github.com/dyanet/ghost-storage-gcs/issues"},"dist":{"shasum":"aa546c2f893e080b13fa5160ecf0528b26a91fab","tarball":"https://registry.npmjs.org/@dyanet/ghost-storage-gcs/-/ghost-storage-gcs-2.0.0.tgz","fileCount":24,"integrity":"sha512-JsC+C5jdo5pwcFi/WE0hu0AJHOkHMfHvHMh1j16AzCgwO10jXSWSOvj8ZLsLaQFzBmUkhlfbVYvS+SWVUIsEEg==","signatures":[{"sig":"MEUCIQCXpzlci5GDo/z5AvJBnABc4qwsgTKVMD9g3V/7l3fdwgIgWJl7rGpj8FNoohFSj/kbwl6hKPGBqfOFsNANbrHiFuU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48542},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"c6166a6c37dfced8b3d7e2ff812238e73a4665d1","scripts":{"test":"vitest run","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"akber","email":"akber@dyanet.com"},"repository":{"url":"git+https://github.com/dyanet/ghost-storage-gcs.git","type":"git"},"_npmVersion":"11.6.3","description":"Google Cloud Storage adapter for Ghost","directories":{},"_nodeVersion":"22.17.0","dependencies":{"ghost-storage-base":"^1.1.1","@google-cloud/storage":"^7.18.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.2.0","fast-check":"^3.15.0","typescript":"^5.3.0","@types/node":"^20.0.0","@types/express":"^5.0.6"},"_npmOperationalInternal":{"tmp":"tmp/ghost-storage-gcs_2.0.0_1764869668315_0.26675421168201296","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@dyanet/ghost-storage-gcs","version":"2.0.2","keywords":["ghost","google cloud","storage","gcs","plugin","adapter"],"author":{"url":"Dyanet Inc","name":"Akber Ahmed Choudhry","email":"akber@dyanet.com"},"license":"MIT","_id":"@dyanet/ghost-storage-gcs@2.0.2","maintainers":[{"name":"akber","email":"akber@dyanet.com"}],"homepage":"https://github.com/dyanet/ghost-storage-gcs","bugs":{"url":"https://github.com/dyanet/ghost-storage-gcs/issues"},"dist":{"shasum":"85a8e41bbec7e910089058b0eb91de66c7f1c50f","tarball":"https://registry.npmjs.org/@dyanet/ghost-storage-gcs/-/ghost-storage-gcs-2.0.2.tgz","fileCount":11,"integrity":"sha512-T55MAoVTYCOTs0C+6EDtlkgH69x1+amsvZ2isKXPBpZX1e5D7jKxSj81Bt+2yGG4BOtQS2UEkyzhplr1TKi6TA==","signatures":[{"sig":"MEQCIG/o6qpaktMsiZLu1mybfmZESOMWLIV+FC8v7wf/nL6DAiAcp5nWGTP4oB37gBjEmDTVgrfwflYLrD2iHaxqOADbhA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dyanet%2fghost-storage-gcs@2.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17318},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"5916e5540f156bf92e37355c30b51dc065f549fe","scripts":{"test":"vitest run","build":"tsc","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"akber","email":"akber@dyanet.com"},"trustedPublisher":{"id":"github","oidcConfigId":"oidc:93262377-4f79-4c0f-b711-39d83a8b1df1"}},"repository":{"url":"git+https://github.com/dyanet/ghost-storage-gcs.git","type":"git"},"_npmVersion":"12.1.0","description":"Google Cloud Storage adapter for Ghost","directories":{},"_nodeVersion":"24.21.0","dependencies":{"ghost-storage-base":"^1.1.2","@google-cloud/storage":"^7.22.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.4.3","vitest":"^3.2.7","fast-check":"^3.23.2","typescript":"^5.3.0","@types/node":"^20.0.0","@types/express":"^5.0.6","@vitest/coverage-v8":"^3.2.7"},"_npmOperationalInternal":{"tmp":"tmp/ghost-storage-gcs_2.0.2_1790518400687_0.7115178013044614","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"_id":"@dyanet/ghost-storage-gcs@3.0.0","bugs":{"url":"https://github.com/dyanet/ghost-storage-gcs/issues"},"dist":{"shasum":"6966442f9ba151ae33a64533c1925dda3bab3dd7","tarball":"https://registry.npmjs.org/@dyanet/ghost-storage-gcs/-/ghost-storage-gcs-3.0.0.tgz","integrity":"sha512-1O+qU3mWa0KHwnh6hD2DeXVyHSKEDvKjGOnCQo/AB6soPyvRyDTGxawgnt6P3agGx0WYwLi1I4OOU5kw6kCmNQ==","fileCount":11,"unpackedSize":21811,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dyanet%2fghost-storage-gcs@3.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC4zZ2sMcWqrE/gXWf3Eo2YKe1Ppyon5mLtX1458n0rhAIhAJlF7OTAFKBouzCZTX7dkWP/sG8wemBKm5fvDCFpBJfc"}]},"main":"dist/index.js","name":"@dyanet/ghost-storage-gcs","types":"dist/index.d.ts","author":{"url":"Dyanet Inc","name":"Akber Ahmed Choudhry","email":"akber@dyanet.com"},"engines":{"node":">=22.12.0"},"gitHead":"5a8fb275f353f1a5f2f38c89dcdd5e6f75a50479","license":"MIT","scripts":{"test":"vitest run","build":"tsc","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"version":"3.0.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:93262377-4f79-4c0f-b711-39d83a8b1df1"},"approver":{"name":"akber","email":"akber@dyanet.com"}},"homepage":"https://github.com/dyanet/ghost-storage-gcs","keywords":["ghost","google cloud","storage","gcs","plugin","adapter"],"repository":{"url":"git+https://github.com/dyanet/ghost-storage-gcs.git","type":"git"},"_npmVersion":"12.1.0","description":"Google Cloud Storage adapter for Ghost","directories":{},"maintainers":[{"name":"akber","email":"akber@dyanet.com"}],"_nodeVersion":"24.21.0","dependencies":{"ghost-storage-base":"^3.0.0","@google-cloud/storage":"^8.2.0"},"devDependencies":{"vitest":"^5.0.2","fast-check":"^3.23.2","typescript":"^5.3.0","@types/node":"^22.20.4","@types/express":"^5.0.6","@vitest/coverage-v8":"^5.0.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ghost-storage-gcs_3.0.0_1790519757969_0.822519044486711"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-04T17:34:28.238Z","modified":"2026-09-27T14:35:58.339Z","2.0.0":"2025-12-04T17:34:28.466Z","2.0.2":"2026-09-27T14:13:20.758Z","3.0.0":"2026-09-27T14:35:58.044Z"},"bugs":{"url":"https://github.com/dyanet/ghost-storage-gcs/issues"},"author":{"url":"Dyanet Inc","name":"Akber Ahmed Choudhry","email":"akber@dyanet.com"},"license":"MIT","homepage":"https://github.com/dyanet/ghost-storage-gcs","keywords":["ghost","google cloud","storage","gcs","plugin","adapter"],"repository":{"url":"git+https://github.com/dyanet/ghost-storage-gcs.git","type":"git"},"description":"Google Cloud Storage adapter for Ghost","maintainers":[{"name":"akber","email":"akber@dyanet.com"}],"readme":"# @dyanet/ghost-storage-gcs\n\nGoogle Cloud Storage adapter for Ghost CMS.\n\n## Versions\n\n| Adapter | Ghost | Node.js | Notes |\n|---------|-------|---------|-------|\n| **3.x** | 6.x (ghost-storage-base 3) | 22.12+ | Implements `saveRaw` / `urlToPath`; honours Ghost's `targetDir` |\n| 2.x | 5.x (ghost-storage-base 1) | 18+ | Maintenance only |\n\nInstall `@dyanet/ghost-storage-gcs@2` for Ghost 5 / older Node.js.\n\n## Installation\n\n```bash\ncd /var/www/ghost\nnpm install @dyanet/ghost-storage-gcs\nmkdir -p content/adapters/storage/gcs\necho \"module.exports = require('@dyanet/ghost-storage-gcs');\" > content/adapters/storage/gcs/index.js\n```\n\n## Configuration\n\nAdd a `storage` block to your `config.production.json`:\n\n```json\n{\n  \"storage\": {\n    \"active\": \"gcs\",\n    \"gcs\": {\n      \"bucket\": \"your-bucket-name\",\n      \"key\": \"path/to/service-account.json\"\n    }\n  }\n}\n```\n\n## Configuration Options\n\n| Option | Required | Description |\n|--------|----------|-------------|\n| `bucket` | Yes | Google Cloud Storage bucket name |\n| `key` | No | Path to service account JSON key file |\n| `projectId` | No | Google Cloud project ID |\n| `assetDomain` | No | Custom domain for serving files |\n| `insecure` | No | Use HTTP instead of HTTPS (default: false) |\n| `maxAge` | No | Cache-Control max-age in seconds (default: 2678400) |\n| `uniformBucketLevelAccess` | No | Set to `true` if bucket has uniform bucket-level access enabled (default: false) |\n\n## Upgrading from 2.x\n\n- Requires Node.js 22.12 or later (as does current Ghost).\n- Built on `ghost-storage-base` 3 and `@google-cloud/storage` 8. No configuration changes.\n- New: `saveRaw()` writes Ghost-generated files (such as resized images) straight to the bucket, and `urlToPath()` maps an asset URL back to its object path, so Ghost features that depend on them work.\n- `delete()` now resolves to `undefined` (it resolved to `true` in 2.x), per the Ghost 6 storage contract.\n\n## Troubleshooting\n\n### \"Cannot insert legacy ACL for an object when uniform bucket-level access is enabled\"\n\nThis error occurs when your GCS bucket has uniform bucket-level access enabled (the default for new buckets). The plugin tries to set per-object ACLs which is not allowed with uniform access.\n\n**Solution:** Add `\"uniformBucketLevelAccess\": true` to your configuration:\n\n```json\n{\n  \"storage\": {\n    \"active\": \"gcs\",\n    \"gcs\": {\n      \"bucket\": \"your-bucket-name\",\n      \"key\": \"path/to/service-account.json\",\n      \"uniformBucketLevelAccess\": true\n    }\n  }\n}\n```\n\nNote: With uniform bucket-level access, file visibility is controlled by bucket-level IAM policies rather than per-object ACLs.\n\n### Files uploaded with backslashes in the name (Windows)\n\nOn Windows, file paths use backslashes (`\\`) which can cause issues with GCS object names. Version 2.0.0+ automatically normalizes all paths to use forward slashes (`/`) for GCS compatibility.\n\nIf you're using an older version, upgrade to 2.0.0 or later.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}