gina 0.6.7 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +27 -26
- package/ROADMAP.md +3 -2
- package/framework/v0.6.8/VERSION +1 -0
- package/framework/{v0.6.7 → v0.6.8}/core/config.js +10 -0
- package/framework/v0.6.8/core/connectors/couchbase/lib/storage-store.js +1074 -0
- package/framework/{v0.6.7 → v0.6.8}/core/controller/controller.js +532 -22
- package/framework/v0.6.8/core/controller/controller.render-stream.js +270 -0
- package/framework/{v0.6.7 → v0.6.8}/core/gna.js +10 -2
- package/framework/{v0.6.7 → v0.6.8}/core/router.js +30 -10
- package/framework/{v0.6.7 → v0.6.8}/core/server.isaac.js +42 -7
- package/framework/{v0.6.7 → v0.6.8}/lib/cmd/storage/gc.js +6 -0
- package/framework/{v0.6.7 → v0.6.8}/lib/cmd/storage/stats.js +7 -0
- package/framework/{v0.6.7 → v0.6.8}/lib/cmd/storage/verify.js +6 -0
- package/framework/{v0.6.7 → v0.6.8}/lib/storage/src/local-cas.js +107 -9
- package/framework/v0.6.8/lib/storage/src/local-stream.js +1418 -0
- package/framework/{v0.6.7 → v0.6.8}/lib/storage/src/local.js +177 -16
- package/framework/{v0.6.7 → v0.6.8}/lib/storage/src/main.js +406 -25
- package/framework/{v0.6.7 → v0.6.8}/lib/storage/src/meta-store.js +13 -2
- package/framework/v0.6.8/lib/storage/src/s3.js +759 -0
- package/framework/{v0.6.7 → v0.6.8}/lib/storage/src/util.js +26 -1
- package/framework/{v0.6.7 → v0.6.8}/lib/storage-store.js +33 -23
- package/framework/{v0.6.7 → v0.6.8}/package.json +1 -1
- package/gna.js +4 -4
- package/llms.txt +22 -47
- package/package.json +3 -3
- package/schema/routing.json +4 -0
- package/schema/settings.json +84 -10
- package/script/check_no_local_leak.js +2 -1
- package/script/retry_lockfile_sync.js +2 -1
- package/script/soak/storage-couchbase/README.md +61 -0
- package/script/soak/storage-couchbase/probe-cas.js +77 -0
- package/script/soak/storage-couchbase/probe-store.js +101 -0
- package/types/index.d.ts +18 -0
- package/framework/v0.6.7/VERSION +0 -1
- package/framework/v0.6.7/core/controller/controller.render-stream.js +0 -169
- /package/framework/{v0.6.7 → v0.6.8}/AUTHORS +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/LICENSE +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/html/nolayout.html +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/html/static.html +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/img/android-chrome-192x192.png +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/img/android-chrome-512x512.png +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/img/apple-touch-icon.png +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/img/favicon-16x16.png +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/img/favicon-32x32.png +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/img/favicon.ico +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.css +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/beemaster/index.html +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.br +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.gz +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/html/statusbar.html +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.br +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.gz +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/inspector/have_heart_one-webfont.woff2 +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/inspector/index.html +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/inspector/inspector.css +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/inspector/inspector.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/inspector/logo.svg +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/js/gina.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/js/gina.min.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.br +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.gz +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/ai/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/ai/lib/connector.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/couchbase/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/couchbase/lib/connector.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/couchbase/lib/connector.v3.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/couchbase/lib/connector.v4.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/couchbase/lib/n1ql.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/couchbase/lib/session-store.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/duckdb/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/duckdb/lib/connector.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/mongodb/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/mongodb/lib/connector.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/mongodb/lib/job-store.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/mongodb/lib/pipeline-loader.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/mongodb/lib/session-store.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/mysql/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/mysql/lib/connector.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/param-redact.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/postgresql/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/postgresql/lib/connector.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/redis/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/redis/lib/connector.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/redis/lib/job-store.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/redis/lib/render-cache-store.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/redis/lib/session-store.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/scylladb/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/scylladb/lib/connector.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/scylladb/lib/session-store.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/sql-parser.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/sqlite/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/sqlite/lib/connector.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/sqlite/lib/job-store.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/connectors/sqlite/lib/session-store.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/content.encoding +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/controller/controller.framework.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/controller/controller.render-json.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/controller/controller.render-nunjucks-async.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/controller/controller.render-nunjucks.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/controller/controller.render-swig-async.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/controller/controller.render-swig.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/controller/controller.render-v1.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/controller/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/controller/inspector-window-emit.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/controller/release-banner.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/dev/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/dev/lib/class.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/dev/lib/factory.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/dev/lib/tools.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/locales/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/locales/currency.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/locales/dist/language/en.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/locales/dist/language/fr.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/locales/dist/region/en.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/locales/dist/region/fr.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/locales/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/mime.types +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/model/entity.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/model/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/model/template/entityFactory.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/model/template/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/csrf/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/csrf/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/csrf/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/coep/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/coep/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/coep/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/coop/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/coop/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/coop/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/corp/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/corp/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/corp/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/csp/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/csp/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/csp/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/hide-powered-by/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/hide-powered-by/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/hide-powered-by/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/hsts/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/hsts/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/hsts/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/origin-agent-cluster/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/origin-agent-cluster/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/origin-agent-cluster/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/referrer-policy/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/referrer-policy/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/referrer-policy/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-content-type-options/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-content-type-options/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-content-type-options/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-dns-prefetch-control/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-dns-prefetch-control/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-dns-prefetch-control/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-download-options/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-download-options/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-download-options/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-frame-options/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-frame-options/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-frame-options/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-xss-protection/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-xss-protection/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/security-headers/x-xss-protection/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/session/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/session/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/session/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/storage/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/storage/build.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/storage/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/storage/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/validator/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/validator/build.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/validator/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/validator/src/form-validator.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/plugins/lib/validator/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/server.express.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/server.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/status.codes +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/_gitignore +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle/config/app.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle/config/connectors.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle/config/routing.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle/config/settings.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle/config/templates.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle/config/watchers.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle/controllers/setup.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle/locales/en.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_public/css/default.css +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_public/css/home.css +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_public/js/components/x-checklist.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_public/manifest.webmanifest +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_public/readme.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_public/sw.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_templates/html/includes/x-checklist.html +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/command/gina.bat.tpl +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/command/gina.tpl +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/conf/env.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/conf/manifest.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/conf/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/conf/settings.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/conf/statics.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/conf/templates.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/error/client/json/401.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/error/client/json/403.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/error/client/json/404.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/error/server/html/50x.html +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/error/server/json/500.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/error/server/json/503.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/core/template/extensions/logger/config.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/console.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/context.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/data/LICENSE +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/data/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/data/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/data/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/dateFormat.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/json/LICENSE +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/json/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/json/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/json/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/path.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/plugins/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/plugins/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/plugins/src/api-error.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/plugins/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/prototypes.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/task.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/helpers/text.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/admin/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/admin/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/archiver/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/archiver/build.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/archiver/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/archiver/src/dep/jszip.min.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/archiver/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/async/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/async/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/audit/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/audit/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/audit-store.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/authn/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/authn/src/lockout.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/authn/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/authn/src/totp.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/authz-gate/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/authz-gate/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cache/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cache/build.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cache/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cache/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/aliases.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/audit/arguments.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/audit/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/audit/verify.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/add.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/arguments.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/build.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/copy.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/cp.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/help.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/inc/name-rewrite.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/list.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/man.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/mcp-start.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/mcp.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/oas.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/openapi.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/remove.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/rename.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/restart.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/rm.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/start.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/status.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/stop.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/bundle/types.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/cache/arguments.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/cache/clear.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/cache/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/cache/stats.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/connector/add.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/connector/arguments.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/connector/help.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/connector/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/connector/infer.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/connector/list.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/connector/migrate.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/connector/models.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/connector/remove.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/connector/rm.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/connector/test.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/container/arguments.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/container/help.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/container/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/container/man.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/container/ps.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/container/stop.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/controller/add.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/controller/arguments.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/controller/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/controller/inc/args.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/controller/inc/namespace.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/controller/inc/reference-rewrite.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/controller/inc/reference-scan.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/controller/inc/scaffold.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/controller/remove.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/controller/rename.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/controller/rm.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/env/add.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/env/get.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/env/help.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/env/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/env/link-dev.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/env/list.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/env/remove.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/env/rm.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/env/set.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/env/unset.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/env/use.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/add.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/arguments.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/build.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/dot.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/get.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/help.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/init.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/link-node-modules.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/link.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/list.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/man.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/msg.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/open.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/remove.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/reset.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/restart.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/set.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/start.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/status.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/stop.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/tail.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/update.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/framework/version.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/gina-dev.1.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/gina-framework.1.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/gina.1.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/helper.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/i18n/add.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/i18n/arguments.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/i18n/export.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/i18n/help.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/i18n/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/i18n/import.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/i18n/scan.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/image/_host.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/image/arguments.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/image/build.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/image/help.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/image/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/image/list.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/image/man.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/image/rm.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/image/run.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/inspector/help.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/inspector/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/inspector/open.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/man-render.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/minion/arguments.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/minion/help.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/minion/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/minion/kill.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/minion/list.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/msg.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/port/help.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/port/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/port/inc/scan.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/port/list.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/port/reset.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/port/set.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/add.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/arguments.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/backup.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/build.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/help.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/import.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/list.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/man.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/move.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/remove.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/rename.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/restart.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/restore.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/rm.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/start.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/status.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/project/stop.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/protocol/arguments.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/protocol/help.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/protocol/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/protocol/list.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/protocol/remove.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/protocol/set.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/scope/add.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/scope/help.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/scope/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/scope/link-local.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/scope/link-production.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/scope/list.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/scope/remove.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/scope/rm.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/scope/use.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/secrets/arguments.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/secrets/check.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/secrets/help.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/secrets/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/secrets/scan.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/service/help.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/service/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/service/list.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/service/man.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/service/start.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/storage/arguments.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/storage/help.txt +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd/view/add.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd-status-format/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cmd-status-format/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/collection/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/collection/build.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/collection/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/collection/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/config.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/connector-config/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/connector-config/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/connector-error/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/connector-error/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/connector-registry/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/connector-registry/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cron/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cron/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/cron/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/domain/LICENSE +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/domain/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/domain/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/domain/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/dto/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/dto/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/dto-pipe/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/dto-pipe/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/dto-types/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/dto-types/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/generator/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/i18n/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/i18n/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/image-build/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/image-build/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/inherits/LICENSE +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/inherits/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/inherits/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/inherits/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/inspector-events/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/inspector-events/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/inspector-redact/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/inspector-redact/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/instrument/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/instrument/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/job/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/job/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/job-store.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/json-config-header/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/json-config-header/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/loading-state/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/loading-state/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/logger/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/logger/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/logger/src/containers/default/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/logger/src/containers/file/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/logger/src/containers/mq/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/logger/src/containers/mq/listener.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/logger/src/containers/mq/speaker.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/logger/src/helper.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/logger/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/math/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/mcp-dispatch/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/mcp-dispatch/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/mcp-http/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/mcp-http/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/mcp-server/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/mcp-server/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/merge/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/merge/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/merge/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/metrics/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/metrics/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/model.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/net-locality/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/net-locality/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/nunjucks-filters/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/nunjucks-filters/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/nunjucks-filters/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/nunjucks-resolver/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/nunjucks-resolver/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/proc.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/release-watch/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/release-watch/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/render-cache/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/render-cache/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/render-cache-store.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/routing/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/routing/build.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/routing/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/routing/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/routing/src/radix.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/routing-introspect/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/routing-introspect/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/secrets/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/secrets/src/backends/env.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/secrets/src/backends/file.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/secrets/src/env-file.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/secrets/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/session-store.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/shell.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/sqlite-driver.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/state.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/storage/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/swig-filters/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/swig-filters/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/swig-filters/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/swig-resolver/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/swig-resolver/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/template-loaders/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/template-loaders/src/loaders/http.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/template-loaders/src/loaders/memory.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/template-loaders/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/url/README.md +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/url/index.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/url/routing.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/uuid/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/uuid/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/validator.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/watcher/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/watcher/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/ws-framing/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/ws-framing/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/ws-query/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/ws-query/src/main.js +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/ws-session/package.json +0 -0
- /package/framework/{v0.6.7 → v0.6.8}/lib/ws-session/src/main.js +0 -0
|
@@ -0,0 +1,759 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #STO1 — `s3` adapter: object storage on any S3-compatible provider
|
|
3
|
+
* (AWS S3, Scaleway, MinIO, R2, Garage, Ceph RGW…), STORELESS.
|
|
4
|
+
*
|
|
5
|
+
* The provider owns placement AND metadata. There is no metadata store here —
|
|
6
|
+
* no embedded SQLite, no connector rows, no `.driver` stamp: one `PutObject`
|
|
7
|
+
* (or completed multipart) atomically carries the bytes, the Content-Type and
|
|
8
|
+
* the original name (as user-defined object metadata, which S3 documents as
|
|
9
|
+
* IMMUTABLE after upload — exactly this layer's immutable-key contract), and
|
|
10
|
+
* every process that can reach the bucket reads the same truth. That is why
|
|
11
|
+
* this adapter cannot have the drift class `storage:verify` exists to catch,
|
|
12
|
+
* and why the shared-root topology that forces a connector store on the local
|
|
13
|
+
* adapter simply does not arise.
|
|
14
|
+
*
|
|
15
|
+
* The SDK is the CONSUMING PROJECT's dependency, never the framework's — the
|
|
16
|
+
* policy every database connector follows, and the one `schema/settings.json`
|
|
17
|
+
* documents for this adapter. Because lib/storage is framework-independent
|
|
18
|
+
* (no `_()`/`getPath()` globals — test-enforced), the project-module resolver
|
|
19
|
+
* is INJECTED by the caller (`start()`'s `requireProjectModule`, built in
|
|
20
|
+
* gna.js where the globals are legal), and this factory resolves lazily:
|
|
21
|
+
*
|
|
22
|
+
* - `@aws-sdk/client-s3` — the client and commands
|
|
23
|
+
* - `@aws-sdk/lib-storage` — streaming put of unknown length
|
|
24
|
+
* (single-part vs multipart "under the
|
|
25
|
+
* hood", per its own README)
|
|
26
|
+
* - `@aws-sdk/s3-request-presigner` — `resolve()`'s presigned URLs
|
|
27
|
+
*
|
|
28
|
+
* A missing package throws AT CONSTRUCTION with an `npm install` hint, which
|
|
29
|
+
* the boot path treats as fatal (main.js's "no safe degraded mode" rationale —
|
|
30
|
+
* silently dropping a configured driver would leave `put()` writing nowhere).
|
|
31
|
+
*
|
|
32
|
+
* Strategy: `sharded` only (defaulted when absent) — on external object
|
|
33
|
+
* storage the layout algorithm collapses to key naming, so this adapter mints
|
|
34
|
+
* the sharded grammar (`YYYY/MM/DD/<ulid><ext>` under the configured
|
|
35
|
+
* `prefix`) and `cas`/`stream` are refused at validation with a message
|
|
36
|
+
* saying why (S3 ETags are not content digests; multipart is the provider's
|
|
37
|
+
* own resumable).
|
|
38
|
+
*
|
|
39
|
+
* Crash residue: the s3 analog of a crashed-put temp file is an INCOMPLETE
|
|
40
|
+
* MULTIPART UPLOAD, and AWS documents that its parts bill storage until the
|
|
41
|
+
* upload is completed or aborted, with no expiry. The build-time sweep below
|
|
42
|
+
* (age-gated past `sweepGrace`, best-effort, never throws — the sharded
|
|
43
|
+
* temp-orphan shape) aborts them; a bucket lifecycle rule
|
|
44
|
+
* (`AbortIncompleteMultipartUpload`) remains worthwhile defense-in-depth for
|
|
45
|
+
* processes that never reboot, and the guide says so.
|
|
46
|
+
*
|
|
47
|
+
* IAM note (measured against the AWS docs): `HeadObject` on a missing key
|
|
48
|
+
* answers **404 only when the credentials hold `s3:ListBucket`; otherwise
|
|
49
|
+
* 403** — under least-privilege credentials without it, `stat()` surfaces a
|
|
50
|
+
* provider AccessDenied instead of the contract's `null`. The minimal policy
|
|
51
|
+
* (documented in the guide): GetObject, PutObject, DeleteObject, ListBucket,
|
|
52
|
+
* ListBucketMultipartUploads, AbortMultipartUpload — bucket/prefix-scoped.
|
|
53
|
+
*
|
|
54
|
+
* S3-COMPATIBLE HONESTY: strong read-after-write consistency (HEAD and LIST
|
|
55
|
+
* included) and the user-metadata semantics above are AWS-DOCUMENTED
|
|
56
|
+
* behaviour; a compatible provider claiming API parity owns its own
|
|
57
|
+
* consistency model. This adapter only uses the core compat surface
|
|
58
|
+
* (Put/Get/Head/Delete/ListObjectsV2/ListMultipartUploads/Abort + SigV4
|
|
59
|
+
* presigning), and the guide states the assumption rather than hiding it.
|
|
60
|
+
*
|
|
61
|
+
* @module lib/storage/s3
|
|
62
|
+
*/
|
|
63
|
+
var stream = require('stream');
|
|
64
|
+
var Transform = stream.Transform;
|
|
65
|
+
|
|
66
|
+
var util = require('./util');
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* User-metadata key carrying the URI-encoded original name. The SDK's
|
|
70
|
+
* `Metadata` map serialises each entry as an `x-amz-meta-<key>` header, and
|
|
71
|
+
* S3 stores metadata keys lowercased.
|
|
72
|
+
*
|
|
73
|
+
* The value is URI-ENCODED BY THIS ADAPTER rather than left to the provider:
|
|
74
|
+
* AWS handles non-US-ASCII metadata by RFC 2047-encoding it on the wire —
|
|
75
|
+
* documented AWS behaviour that an S3-compatible provider may not implement —
|
|
76
|
+
* so encoding to plain ASCII ourselves is what keeps the round-trip portable.
|
|
77
|
+
*
|
|
78
|
+
* @inner
|
|
79
|
+
* @constant
|
|
80
|
+
* @type {string}
|
|
81
|
+
*/
|
|
82
|
+
var META_NAME_KEY = 'gina-name';
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Byte ceiling for the encoded original-name metadata value. AWS caps ALL
|
|
86
|
+
* user-defined metadata at 2KB total (UTF-8 bytes of every key + value), so
|
|
87
|
+
* one display-only name is kept safely under half of it and TRUNCATED beyond —
|
|
88
|
+
* `originalName` is display metadata, never a path, and losing its tail beats
|
|
89
|
+
* failing the whole put.
|
|
90
|
+
*
|
|
91
|
+
* @inner
|
|
92
|
+
* @constant
|
|
93
|
+
* @type {number}
|
|
94
|
+
*/
|
|
95
|
+
var META_NAME_MAX = 1024;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Page bound for `stats()`'s ListObjectsV2 aggregation — 10 pages of up to
|
|
99
|
+
* 1,000 keys. Beyond it the counts are reported with `truncated: true` rather
|
|
100
|
+
* than walking a multi-million-object bucket on an operator ping (the
|
|
101
|
+
* maintenance surface's bounded-pass precedent).
|
|
102
|
+
*
|
|
103
|
+
* @inner
|
|
104
|
+
* @constant
|
|
105
|
+
* @type {number}
|
|
106
|
+
*/
|
|
107
|
+
var LIST_PAGE_LIMIT = 10;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Validate a caller-supplied key for provider addressing. The same order as
|
|
111
|
+
* `util.makeResolvePath` (reject-hostile-first, then canonical form) minus the
|
|
112
|
+
* filesystem resolution this adapter does not have: no traversal segments, no
|
|
113
|
+
* absolute/backslashed/NUL forms — a hostile key must fail BEFORE it is
|
|
114
|
+
* embedded in a signed URL or a provider request. Messages deliberately do
|
|
115
|
+
* not echo any resolved form.
|
|
116
|
+
*
|
|
117
|
+
* @inner
|
|
118
|
+
* @param {string} name - Driver name, for messages.
|
|
119
|
+
* @param {string} key - The caller's opaque key.
|
|
120
|
+
* @returns {?Error} `null` when the key is usable.
|
|
121
|
+
*/
|
|
122
|
+
function guardKey(name, key) {
|
|
123
|
+
if ( typeof(key) != 'string' || key.length === 0 ) {
|
|
124
|
+
return new Error('[storage:' + name + '] a non-empty string key is required (got: ' + JSON.stringify(key) + ')');
|
|
125
|
+
}
|
|
126
|
+
if ( key.indexOf('\0') > -1 || key.indexOf('\\') > -1 || key.charAt(0) === '/' ) {
|
|
127
|
+
return new Error('[storage:' + name + '] key `' + key + '` is not in canonical form');
|
|
128
|
+
}
|
|
129
|
+
var segments = key.split('/');
|
|
130
|
+
for (var i = 0; i < segments.length; i++) {
|
|
131
|
+
if ( segments[i] === '' || segments[i] === '.' || segments[i] === '..' ) {
|
|
132
|
+
return new Error('[storage:' + name + '] key `' + key + '` is not in canonical form');
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Map a provider read error onto the layer's coded contract. `NoSuchKey`
|
|
140
|
+
* (GetObject) and `NotFound` (HeadObject's body-less 404) both mean the
|
|
141
|
+
* object is gone → `STORAGE_NO_OBJECT`; the provider's 416/`InvalidRange` →
|
|
142
|
+
* `STORAGE_RANGE_UNSATISFIABLE`. Anything else is RAW-FORWARDED — the typed
|
|
143
|
+
* SDK class is the caller's signal (#B153 lesson: wrapping loses it).
|
|
144
|
+
*
|
|
145
|
+
* @inner
|
|
146
|
+
* @param {string} name - Driver name, for messages.
|
|
147
|
+
* @param {string} key - The key being read.
|
|
148
|
+
* @param {object} err - The SDK error.
|
|
149
|
+
* @returns {Error} A coded error, or `err` untouched.
|
|
150
|
+
*/
|
|
151
|
+
function mapReadError(name, key, err) {
|
|
152
|
+
var status = ( err && err.$metadata && err.$metadata.httpStatusCode ) || 0;
|
|
153
|
+
if ( err && ( err.name === 'NoSuchKey' || err.name === 'NotFound' || status === 404 ) ) {
|
|
154
|
+
return util.codedError('STORAGE_NO_OBJECT', '[storage:' + name + '] no object for key `' + key + '`');
|
|
155
|
+
}
|
|
156
|
+
if ( err && ( err.name === 'InvalidRange' || status === 416 ) ) {
|
|
157
|
+
return util.codedError('STORAGE_RANGE_UNSATISFIABLE', '[storage:' + name + '] getRange(): the requested range is beyond the object size for key `' + key + '`');
|
|
158
|
+
}
|
|
159
|
+
return err;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Minimal RFC 6266 attachment value for the presigned
|
|
164
|
+
* `response-content-disposition` override. Control characters are stripped
|
|
165
|
+
* (setHeader-injection class — the serving facade strips too; this is the
|
|
166
|
+
* direct-caller defense) and quote/backslash escaped.
|
|
167
|
+
*
|
|
168
|
+
* @inner
|
|
169
|
+
* @param {string} filename - Display filename.
|
|
170
|
+
* @returns {string} The `Content-Disposition` header value.
|
|
171
|
+
*/
|
|
172
|
+
function formatDisposition(filename) {
|
|
173
|
+
var safe = String(filename)
|
|
174
|
+
.replace(/[\x00-\x1f\x7f]/g, '')
|
|
175
|
+
.replace(/\\/g, '\\\\')
|
|
176
|
+
.replace(/"/g, '\\"');
|
|
177
|
+
return 'attachment; filename="' + safe + '"';
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Build an `s3` driver.
|
|
182
|
+
*
|
|
183
|
+
* @param {string} name - Driver name (messages, config identity).
|
|
184
|
+
* @param {object} conf - Resolved config (see `resolveDriverConf`).
|
|
185
|
+
* @param {string} conf.bucket - Bucket name (validated non-empty).
|
|
186
|
+
* @param {string} conf.prefix - Key prefix, `''` or `…/`-terminated (normalised upstream).
|
|
187
|
+
* @param {string} [conf.region] - Signing region; upstream defaults `us-east-1` when a
|
|
188
|
+
* custom `endpoint` is set and none was configured.
|
|
189
|
+
* @param {string} [conf.endpoint] - S3-compatible endpoint URL (scheme added upstream when missing).
|
|
190
|
+
* @param {boolean} [conf.forcePathStyle] - Path-style addressing (MinIO et al.).
|
|
191
|
+
* @param {string} [conf.accessKeyId] - Static credentials; ABSENT means the SDK default
|
|
192
|
+
* @param {string} [conf.secretAccessKey] provider chain (env / shared config / IMDS / IRSA) —
|
|
193
|
+
* @param {string} [conf.sessionToken] the container-native path, deliberately first-class.
|
|
194
|
+
* @param {number} conf.presignExpiry - Presigned-URL lifetime, ms.
|
|
195
|
+
* @param {number} conf.sweepGrace - Age gate for the multipart-orphan sweep, ms.
|
|
196
|
+
* @param {number} conf.maxObjectSize - Per-object byte ceiling.
|
|
197
|
+
* @param {?object} store - Always `null` — this adapter is storeless; the
|
|
198
|
+
* dispatcher passes it for signature uniformity.
|
|
199
|
+
* @param {object} deps - Injected dependencies.
|
|
200
|
+
* @param {function} deps.requireModule - Project-module resolver (`gna.js` builds it from
|
|
201
|
+
* `getPath('project')`; tests inject a fake SDK).
|
|
202
|
+
* @returns {StorageDriver} A ready driver (`resolve()` answers `{kind:'url'}`).
|
|
203
|
+
* @throws {Error} When `deps.requireModule` is absent, an SDK package is not installed in the
|
|
204
|
+
* project, or the loaded client is not SDK v3 — the boot path treats each as fatal.
|
|
205
|
+
*/
|
|
206
|
+
module.exports = function createS3Driver(name, conf, store, deps) {
|
|
207
|
+
deps = deps || {};
|
|
208
|
+
if ( typeof deps.requireModule !== 'function' ) {
|
|
209
|
+
throw new Error('[storage:' + name + '] the s3 adapter requires `deps.requireModule` — the project-module resolver injected at boot (see gna.js), or a test-injected fake SDK loader');
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Load one project-side package with an actionable message — the connector
|
|
214
|
+
* idiom (lazy, contextual `npm install` hint, real error appended).
|
|
215
|
+
*
|
|
216
|
+
* @inner
|
|
217
|
+
* @param {string} pkg - Package name.
|
|
218
|
+
* @returns {object} The package's exports.
|
|
219
|
+
*/
|
|
220
|
+
var loadPkg = function(pkg) {
|
|
221
|
+
try {
|
|
222
|
+
return deps.requireModule(pkg);
|
|
223
|
+
} catch (e) {
|
|
224
|
+
throw new Error(
|
|
225
|
+
'[storage:' + name + '] ' + pkg + ' is not installed in your project.\n'
|
|
226
|
+
+ 'The s3 adapter needs: npm install @aws-sdk/client-s3 @aws-sdk/lib-storage @aws-sdk/s3-request-presigner\n'
|
|
227
|
+
+ (e && e.message || e)
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
var clientMod = loadPkg('@aws-sdk/client-s3');
|
|
233
|
+
var libStorage = loadPkg('@aws-sdk/lib-storage');
|
|
234
|
+
var presignerMod = loadPkg('@aws-sdk/s3-request-presigner');
|
|
235
|
+
|
|
236
|
+
// Interop shim for dual-published packages (the AI-connector shape).
|
|
237
|
+
var sdk = clientMod && clientMod.S3Client ? clientMod : ( clientMod && clientMod.default ) || clientMod;
|
|
238
|
+
var S3Client = sdk && sdk.S3Client;
|
|
239
|
+
if ( typeof S3Client !== 'function' ) {
|
|
240
|
+
// v2 `aws-sdk` has no S3Client — name the actual requirement rather
|
|
241
|
+
// than failing later with an unrelated TypeError.
|
|
242
|
+
throw new Error('[storage:' + name + '] @aws-sdk/client-s3 v3 is required (the loaded module exposes no S3Client — the v2 `aws-sdk` package is not supported)');
|
|
243
|
+
}
|
|
244
|
+
var Upload = ( libStorage && libStorage.Upload ) || ( libStorage && libStorage.default && libStorage.default.Upload );
|
|
245
|
+
if ( typeof Upload !== 'function' ) {
|
|
246
|
+
throw new Error('[storage:' + name + '] @aws-sdk/lib-storage exposes no Upload class — v3 is required');
|
|
247
|
+
}
|
|
248
|
+
var getSignedUrl = ( presignerMod && presignerMod.getSignedUrl ) || ( presignerMod && presignerMod.default && presignerMod.default.getSignedUrl );
|
|
249
|
+
if ( typeof getSignedUrl !== 'function' ) {
|
|
250
|
+
throw new Error('[storage:' + name + '] @aws-sdk/s3-request-presigner exposes no getSignedUrl — v3 is required');
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
var bucket = conf.bucket;
|
|
254
|
+
var prefix = conf.prefix || '';
|
|
255
|
+
var maxObjectSize = conf.maxObjectSize;
|
|
256
|
+
var presignMs = conf.presignExpiry;
|
|
257
|
+
var sweepGrace = conf.sweepGrace;
|
|
258
|
+
|
|
259
|
+
var clientConf = {};
|
|
260
|
+
if ( conf.region ) { clientConf.region = conf.region; }
|
|
261
|
+
if ( conf.endpoint ) { clientConf.endpoint = conf.endpoint; }
|
|
262
|
+
if ( conf.forcePathStyle === true ) { clientConf.forcePathStyle = true; }
|
|
263
|
+
if ( typeof(conf.accessKeyId) == 'string' && conf.accessKeyId.length
|
|
264
|
+
&& typeof(conf.secretAccessKey) == 'string' && conf.secretAccessKey.length ) {
|
|
265
|
+
clientConf.credentials = {
|
|
266
|
+
accessKeyId : conf.accessKeyId,
|
|
267
|
+
secretAccessKey : conf.secretAccessKey
|
|
268
|
+
};
|
|
269
|
+
if ( typeof(conf.sessionToken) == 'string' && conf.sessionToken.length ) {
|
|
270
|
+
clientConf.credentials.sessionToken = conf.sessionToken;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
// No credentials configured → the SDK default provider chain runs
|
|
274
|
+
// (env vars / shared config / IMDS / IRSA) — misconfiguration surfaces at
|
|
275
|
+
// the first operation with the SDK's own message, like every DB connector;
|
|
276
|
+
// a boot-time reachability probe would couple boot to provider liveness.
|
|
277
|
+
var client = new S3Client(clientConf);
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* The provider-side key: the configured prefix + the opaque key. The
|
|
281
|
+
* OPAQUE key excludes the prefix (config-relative addressing, exactly as
|
|
282
|
+
* local keys are root-relative), so re-pointing `prefix` orphans old
|
|
283
|
+
* objects the same way re-pointing a local `root` does — a config move,
|
|
284
|
+
* never a key rewrite.
|
|
285
|
+
*
|
|
286
|
+
* @inner
|
|
287
|
+
* @param {string} key - The opaque storage key.
|
|
288
|
+
* @returns {string} The bucket object key.
|
|
289
|
+
*/
|
|
290
|
+
var providerKey = function(key) {
|
|
291
|
+
return prefix + key;
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Age-gated multipart-orphan sweep — the s3 analog of the local
|
|
296
|
+
* strategies' crashed-put temp reclamation (#B349 class): a process that
|
|
297
|
+
* died mid-`put()` may have left an in-progress multipart upload, whose
|
|
298
|
+
* parts BILL until aborted and which no verb ever looks at again. One
|
|
299
|
+
* bounded page per build (successive boots drain more), each upload older
|
|
300
|
+
* than `sweepGrace` aborted; best-effort and silent like the sharded
|
|
301
|
+
* sweep — it must never delay or fail a boot, and a provider that does
|
|
302
|
+
* not implement the listing simply no-ops it.
|
|
303
|
+
*
|
|
304
|
+
* @inner
|
|
305
|
+
* @returns {void}
|
|
306
|
+
*/
|
|
307
|
+
var sweepMultipartOrphans = function() {
|
|
308
|
+
var listCmd = new sdk.ListMultipartUploadsCommand({
|
|
309
|
+
Bucket : bucket,
|
|
310
|
+
Prefix : prefix.length ? prefix : undefined
|
|
311
|
+
});
|
|
312
|
+
client.send(listCmd).then(function(res) {
|
|
313
|
+
var uploads = ( res && Array.isArray(res.Uploads) ) ? res.Uploads : [];
|
|
314
|
+
var cutoff = Date.now() - sweepGrace;
|
|
315
|
+
var stale = uploads.filter(function(u) {
|
|
316
|
+
var initiated = ( u && u.Initiated ) ? new Date(u.Initiated).getTime() : NaN;
|
|
317
|
+
// an upload with no readable initiation date is left alone —
|
|
318
|
+
// the sweep only ever claims provably old work
|
|
319
|
+
return !isNaN(initiated) && initiated < cutoff && u.Key && u.UploadId;
|
|
320
|
+
});
|
|
321
|
+
var next = function(i) {
|
|
322
|
+
if ( i >= stale.length ) { return; }
|
|
323
|
+
client.send(new sdk.AbortMultipartUploadCommand({
|
|
324
|
+
Bucket : bucket,
|
|
325
|
+
Key : stale[i].Key,
|
|
326
|
+
UploadId : stale[i].UploadId
|
|
327
|
+
})).catch(function() {}).then(function() { next(i + 1); });
|
|
328
|
+
};
|
|
329
|
+
next(0);
|
|
330
|
+
}).catch(function() {});
|
|
331
|
+
};
|
|
332
|
+
setImmediate(sweepMultipartOrphans);
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* What this driver can do. `offload: true` is the layer's FIRST — the
|
|
336
|
+
* serving facade redirects to a presigned URL instead of streaming the
|
|
337
|
+
* bytes itself. `ranges` stays true because the adapter can ALSO proxy
|
|
338
|
+
* (`get`/`getRange` are real), which is what `opts.offload: false` on the
|
|
339
|
+
* facade uses. No dedup (S3 ETags are not content digests), no resumable
|
|
340
|
+
* verbs (multipart is the provider's own resumable), no inline tier (there
|
|
341
|
+
* is no metadata store to inline into).
|
|
342
|
+
*
|
|
343
|
+
* @type {{offload: boolean, ranges: boolean, dedup: boolean, resumable: boolean, inline: boolean}}
|
|
344
|
+
*/
|
|
345
|
+
var capabilities = {
|
|
346
|
+
offload : true,
|
|
347
|
+
ranges : true,
|
|
348
|
+
dedup : false,
|
|
349
|
+
resumable : false,
|
|
350
|
+
inline : false
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
return {
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Store a readable stream and return its opaque key.
|
|
357
|
+
*
|
|
358
|
+
* The key is minted with the sharded grammar (`YYYY/MM/DD/<ulid><ext>`)
|
|
359
|
+
* under the configured prefix; ContentType rides the object verbatim
|
|
360
|
+
* and the original name rides as URI-encoded user metadata (immutable
|
|
361
|
+
* after upload, like the object). The byte transfer goes through
|
|
362
|
+
* lib-storage's `Upload` — single-part or multipart "under the hood",
|
|
363
|
+
* which is what accepts a stream of unknown length without local
|
|
364
|
+
* staging.
|
|
365
|
+
*
|
|
366
|
+
* `maxObjectSize` is enforced MID-STREAM by a counting transform: on
|
|
367
|
+
* breach the upload is aborted (best-effort — the build-time sweep is
|
|
368
|
+
* the backstop for a lost abort) and the REAL cap error is reported.
|
|
369
|
+
* The reported `size` is the meter's count — the bytes the provider
|
|
370
|
+
* acknowledged storing; transport checksums guard the transfer, so a
|
|
371
|
+
* confirm-HEAD would buy nothing.
|
|
372
|
+
*
|
|
373
|
+
* @param {object} stream - Any readable stream.
|
|
374
|
+
* @param {object} [meta] - Client-supplied, untrusted.
|
|
375
|
+
* @param {string} [meta.originalName] - Filename; URI-encoded into user metadata
|
|
376
|
+
* (truncated past ~1KB), and the only source
|
|
377
|
+
* of the key extension.
|
|
378
|
+
* @param {string} [meta.contentType] - MIME type; stored verbatim on the object.
|
|
379
|
+
* @param {function} fn - `fn(err, {key, size, contentType})`.
|
|
380
|
+
* @returns {void}
|
|
381
|
+
*
|
|
382
|
+
* @example
|
|
383
|
+
* driver.put(req, { originalName: 'report.pdf', contentType: 'application/pdf' }, function (err, res) {
|
|
384
|
+
* if (err) { return next(err); }
|
|
385
|
+
* record.storageKey = res.key; // opaque — store it, never parse it
|
|
386
|
+
* });
|
|
387
|
+
*/
|
|
388
|
+
put: function(source, meta, fn) {
|
|
389
|
+
if ( typeof meta === 'function' ) { fn = meta; meta = {}; }
|
|
390
|
+
meta = meta || {};
|
|
391
|
+
if ( typeof fn !== 'function' ) {
|
|
392
|
+
throw new Error('[storage:' + name + '] put() requires a callback');
|
|
393
|
+
}
|
|
394
|
+
if ( !source || typeof source.pipe !== 'function' ) {
|
|
395
|
+
return fn(new Error('[storage:' + name + '] put() requires a readable stream'));
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
var now = new Date();
|
|
399
|
+
var id = util.ulid(now.getTime());
|
|
400
|
+
var ext = util.sanitiseExtension(meta.originalName);
|
|
401
|
+
var day = now.getUTCFullYear()
|
|
402
|
+
+ '/' + ('0' + (now.getUTCMonth() + 1)).slice(-2)
|
|
403
|
+
+ '/' + ('0' + now.getUTCDate()).slice(-2);
|
|
404
|
+
var key = day + '/' + id + ext;
|
|
405
|
+
|
|
406
|
+
var settled = false;
|
|
407
|
+
var settle = function(err, res) {
|
|
408
|
+
if (settled) { return; }
|
|
409
|
+
settled = true;
|
|
410
|
+
fn(err || null, res);
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
var counted = 0;
|
|
414
|
+
var meter = new Transform({
|
|
415
|
+
transform: function(chunk, enc, cb) {
|
|
416
|
+
counted += chunk.length;
|
|
417
|
+
if ( counted > maxObjectSize ) {
|
|
418
|
+
return cb(new Error('[storage:' + name + '] put() aborted: the object exceeds maxObjectSize (' + maxObjectSize + ' bytes)'));
|
|
419
|
+
}
|
|
420
|
+
cb(null, chunk);
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
var params = {
|
|
425
|
+
Bucket : bucket,
|
|
426
|
+
Key : providerKey(key),
|
|
427
|
+
Body : meter
|
|
428
|
+
};
|
|
429
|
+
if ( typeof(meta.contentType) == 'string' && meta.contentType.length ) {
|
|
430
|
+
params.ContentType = meta.contentType;
|
|
431
|
+
}
|
|
432
|
+
if ( typeof(meta.originalName) == 'string' && meta.originalName.length ) {
|
|
433
|
+
var encodedName = encodeURIComponent(meta.originalName);
|
|
434
|
+
if ( encodedName.length > META_NAME_MAX ) {
|
|
435
|
+
encodedName = encodedName.slice(0, META_NAME_MAX);
|
|
436
|
+
}
|
|
437
|
+
params.Metadata = {};
|
|
438
|
+
params.Metadata[META_NAME_KEY] = encodedName;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
var upload = new Upload({ client: client, params: params });
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Best-effort cancel — a rejected/aborted multipart may leave
|
|
445
|
+
* parts; the sweep reclaims whatever the abort misses.
|
|
446
|
+
*
|
|
447
|
+
* @inner
|
|
448
|
+
* @returns {void}
|
|
449
|
+
*/
|
|
450
|
+
var cancel = function() {
|
|
451
|
+
try {
|
|
452
|
+
var p = upload.abort();
|
|
453
|
+
if ( p && typeof p.catch === 'function' ) { p.catch(function() {}); }
|
|
454
|
+
} catch (ignore) {}
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
// Armed before any data can flow (#B143): a source error is OUR
|
|
458
|
+
// report — the REAL error, never a fabricated one (#B223).
|
|
459
|
+
source.on('error', function(err) {
|
|
460
|
+
cancel();
|
|
461
|
+
meter.destroy();
|
|
462
|
+
settle(err);
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
source.pipe(meter);
|
|
466
|
+
|
|
467
|
+
upload.done().then(function() {
|
|
468
|
+
settle(null, {
|
|
469
|
+
key : key,
|
|
470
|
+
size : counted,
|
|
471
|
+
contentType : ( typeof(meta.contentType) == 'string' && meta.contentType.length ) ? meta.contentType : null
|
|
472
|
+
});
|
|
473
|
+
}, function(err) {
|
|
474
|
+
cancel();
|
|
475
|
+
settle(err);
|
|
476
|
+
});
|
|
477
|
+
},
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Read the whole object as a stream (the proxy path — used by the
|
|
481
|
+
* serving facade when `opts.offload: false`, and by any caller that
|
|
482
|
+
* wants the bytes in-process).
|
|
483
|
+
*
|
|
484
|
+
* @param {string} key - The opaque storage key.
|
|
485
|
+
* @param {function} fn - `fn(err, stream)`.
|
|
486
|
+
* @returns {void}
|
|
487
|
+
*/
|
|
488
|
+
get: function(key, fn) {
|
|
489
|
+
if ( typeof fn !== 'function' ) {
|
|
490
|
+
throw new Error('[storage:' + name + '] get() requires a callback');
|
|
491
|
+
}
|
|
492
|
+
var bad = guardKey(name, key);
|
|
493
|
+
if ( bad ) { return fn(bad); }
|
|
494
|
+
client.send(new sdk.GetObjectCommand({
|
|
495
|
+
Bucket : bucket,
|
|
496
|
+
Key : providerKey(key)
|
|
497
|
+
})).then(function(res) {
|
|
498
|
+
fn(null, res.Body);
|
|
499
|
+
}, function(err) {
|
|
500
|
+
fn(mapReadError(name, key, err));
|
|
501
|
+
});
|
|
502
|
+
},
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Byte-range read — `end` INCLUSIVE, matching the HTTP `Range` header
|
|
506
|
+
* exactly as the local strategies do; the range rides the provider's
|
|
507
|
+
* own `Range: bytes=a-b`, so an over-long `end` is clamped by the
|
|
508
|
+
* provider and only a `start` at or beyond the object's size is
|
|
509
|
+
* unsatisfiable (surfaced as the provider's 416, mapped to the
|
|
510
|
+
* layer's code).
|
|
511
|
+
*
|
|
512
|
+
* @param {string} key - The opaque storage key.
|
|
513
|
+
* @param {number} start - First byte offset, inclusive; integer >= 0.
|
|
514
|
+
* @param {number} end - Last byte offset, INCLUSIVE; integer >= start.
|
|
515
|
+
* @param {function} fn - `fn(err, stream)`.
|
|
516
|
+
* @returns {void}
|
|
517
|
+
*/
|
|
518
|
+
getRange: function(key, start, end, fn) {
|
|
519
|
+
if ( typeof fn !== 'function' ) {
|
|
520
|
+
throw new Error('[storage:' + name + '] getRange() requires a callback');
|
|
521
|
+
}
|
|
522
|
+
if ( !Number.isInteger(start) || !Number.isInteger(end) || start < 0 || end < start ) {
|
|
523
|
+
return fn(util.codedError('STORAGE_INVALID_RANGE', '[storage:' + name + '] getRange(): invalid range [' + start + ', ' + end + '] — both bounds must be integers with 0 <= start <= end'));
|
|
524
|
+
}
|
|
525
|
+
var bad = guardKey(name, key);
|
|
526
|
+
if ( bad ) { return fn(bad); }
|
|
527
|
+
client.send(new sdk.GetObjectCommand({
|
|
528
|
+
Bucket : bucket,
|
|
529
|
+
Key : providerKey(key),
|
|
530
|
+
Range : 'bytes=' + start + '-' + end
|
|
531
|
+
})).then(function(res) {
|
|
532
|
+
fn(null, res.Body);
|
|
533
|
+
}, function(err) {
|
|
534
|
+
fn(mapReadError(name, key, err));
|
|
535
|
+
});
|
|
536
|
+
},
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Metadata for `key` — a `HeadObject`, which S3 documents as strongly
|
|
540
|
+
* consistent after the put.
|
|
541
|
+
*
|
|
542
|
+
* ⚠️ IAM: a missing key answers 404 (→ the contract's `null`) only
|
|
543
|
+
* when the credentials hold `s3:ListBucket`; without it the provider
|
|
544
|
+
* answers 403, which surfaces here as a raw error, not `null`. The
|
|
545
|
+
* guide ships the minimal policy.
|
|
546
|
+
*
|
|
547
|
+
* @param {string} key - The opaque storage key.
|
|
548
|
+
* @param {function} fn - `fn(err, meta|null)`; `null` when the key is unknown.
|
|
549
|
+
* @returns {void}
|
|
550
|
+
*/
|
|
551
|
+
stat: function(key, fn) {
|
|
552
|
+
if ( typeof fn !== 'function' ) {
|
|
553
|
+
throw new Error('[storage:' + name + '] stat() requires a callback');
|
|
554
|
+
}
|
|
555
|
+
var bad = guardKey(name, key);
|
|
556
|
+
if ( bad ) { return fn(bad); }
|
|
557
|
+
client.send(new sdk.HeadObjectCommand({
|
|
558
|
+
Bucket : bucket,
|
|
559
|
+
Key : providerKey(key)
|
|
560
|
+
})).then(function(res) {
|
|
561
|
+
var rawName = ( res.Metadata && res.Metadata[META_NAME_KEY] ) || null;
|
|
562
|
+
var originalName = null;
|
|
563
|
+
if ( rawName != null ) {
|
|
564
|
+
// decode failure ⇒ the raw value — a name written by
|
|
565
|
+
// another tool is still better surfaced than dropped
|
|
566
|
+
try { originalName = decodeURIComponent(rawName); }
|
|
567
|
+
catch (e) { originalName = rawName; }
|
|
568
|
+
}
|
|
569
|
+
fn(null, {
|
|
570
|
+
originalName : originalName,
|
|
571
|
+
contentType : ( typeof(res.ContentType) == 'string' && res.ContentType.length ) ? res.ContentType : null,
|
|
572
|
+
size : ( typeof(res.ContentLength) == 'number' ) ? res.ContentLength : null,
|
|
573
|
+
createdAt : res.LastModified ? new Date(res.LastModified).getTime() : null
|
|
574
|
+
});
|
|
575
|
+
}, function(err) {
|
|
576
|
+
var mapped = mapReadError(name, key, err);
|
|
577
|
+
if ( mapped && mapped.code === 'STORAGE_NO_OBJECT' ) {
|
|
578
|
+
return fn(null, null);
|
|
579
|
+
}
|
|
580
|
+
fn(mapped);
|
|
581
|
+
});
|
|
582
|
+
},
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Delete the object.
|
|
586
|
+
*
|
|
587
|
+
* DOCUMENTED DEVIATION: S3's delete is idempotent and does not report
|
|
588
|
+
* prior existence, so `existed` is `true` whenever the provider
|
|
589
|
+
* acknowledged the delete — it is an acknowledgement, not an
|
|
590
|
+
* existence signal. A caller needing the distinction should `stat()`
|
|
591
|
+
* first (no framework code reads the flag today — measured).
|
|
592
|
+
*
|
|
593
|
+
* @param {string} key - The opaque storage key.
|
|
594
|
+
* @param {function} [fn] - `fn(err, existed)`.
|
|
595
|
+
* @returns {void}
|
|
596
|
+
*/
|
|
597
|
+
release: function(key, fn) {
|
|
598
|
+
if ( typeof fn !== 'function' ) { fn = function() {}; }
|
|
599
|
+
var bad = guardKey(name, key);
|
|
600
|
+
if ( bad ) { return fn(bad); }
|
|
601
|
+
client.send(new sdk.DeleteObjectCommand({
|
|
602
|
+
Bucket : bucket,
|
|
603
|
+
Key : providerKey(key)
|
|
604
|
+
})).then(function() {
|
|
605
|
+
fn(null, true);
|
|
606
|
+
}, function(err) {
|
|
607
|
+
fn(err);
|
|
608
|
+
});
|
|
609
|
+
},
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* How to serve `key`: a presigned GET URL — `{kind: 'url'}`, the kind
|
|
613
|
+
* the contract reserved for this adapter. Presigning is LOCAL
|
|
614
|
+
* computation (SigV4 over the configured credentials — no provider
|
|
615
|
+
* round-trip), so existence is deliberately NOT verified here: the
|
|
616
|
+
* serving facade is `stat()`-gated already, and a direct caller's URL
|
|
617
|
+
* to a vanished object answers the provider's own 404. Documented
|
|
618
|
+
* rather than hidden.
|
|
619
|
+
*
|
|
620
|
+
* `opts` is how the serving facade's decisions reach the PROVIDER's
|
|
621
|
+
* response — the override params are part of the signature, and S3
|
|
622
|
+
* only honours them on signed requests:
|
|
623
|
+
* - `opts.contentType` → `response-content-type` (the facade passes
|
|
624
|
+
* its fail-closed DOWNGRADED type here, which is what keeps the
|
|
625
|
+
* stored-XSS guard intact on the offload path)
|
|
626
|
+
* - `opts.download`/`opts.filename` → `response-content-disposition`
|
|
627
|
+
* - `opts.cacheControl` → `response-cache-control` (the facade's
|
|
628
|
+
* immutable-per-key default — the redirect itself stays no-store,
|
|
629
|
+
* the PAYLOAD response carries the caching policy)
|
|
630
|
+
*
|
|
631
|
+
* @param {string} key - The opaque storage key.
|
|
632
|
+
* @param {object} [opts] - Response-override options (see above).
|
|
633
|
+
* @param {string} [opts.contentType]
|
|
634
|
+
* @param {boolean} [opts.download]
|
|
635
|
+
* @param {string} [opts.filename]
|
|
636
|
+
* @param {string} [opts.cacheControl]
|
|
637
|
+
* @param {function} fn - `fn(err, {kind:'url', url, expiresAt})` —
|
|
638
|
+
* `expiresAt` epoch ms.
|
|
639
|
+
* @returns {void}
|
|
640
|
+
*
|
|
641
|
+
* @example
|
|
642
|
+
* driver.resolve(key, function (err, r) {
|
|
643
|
+
* if (err) { return next(err); }
|
|
644
|
+
* // r.kind === 'url' — hand it to the client, mind r.expiresAt
|
|
645
|
+
* self.redirect(r.url);
|
|
646
|
+
* });
|
|
647
|
+
*/
|
|
648
|
+
resolve: function(key, opts, fn) {
|
|
649
|
+
if ( typeof opts === 'function' ) { fn = opts; opts = null; }
|
|
650
|
+
opts = opts || {};
|
|
651
|
+
if ( typeof fn !== 'function' ) {
|
|
652
|
+
throw new Error('[storage:' + name + '] resolve() requires a callback');
|
|
653
|
+
}
|
|
654
|
+
var bad = guardKey(name, key);
|
|
655
|
+
if ( bad ) { return fn(bad); }
|
|
656
|
+
|
|
657
|
+
var params = {
|
|
658
|
+
Bucket : bucket,
|
|
659
|
+
Key : providerKey(key)
|
|
660
|
+
};
|
|
661
|
+
if ( typeof(opts.contentType) == 'string' && opts.contentType.length ) {
|
|
662
|
+
params.ResponseContentType = opts.contentType;
|
|
663
|
+
}
|
|
664
|
+
if ( opts.download === true || ( typeof(opts.filename) == 'string' && opts.filename.length ) ) {
|
|
665
|
+
params.ResponseContentDisposition = formatDisposition(opts.filename || 'download');
|
|
666
|
+
}
|
|
667
|
+
if ( typeof(opts.cacheControl) == 'string' && opts.cacheControl.length ) {
|
|
668
|
+
params.ResponseCacheControl = opts.cacheControl;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
var expiresInS = Math.max(1, Math.floor(presignMs / 1000));
|
|
672
|
+
getSignedUrl(client, new sdk.GetObjectCommand(params), { expiresIn: expiresInS })
|
|
673
|
+
.then(function(url) {
|
|
674
|
+
fn(null, { kind: 'url', url: url, expiresAt: Date.now() + expiresInS * 1000 });
|
|
675
|
+
}, function(err) {
|
|
676
|
+
fn(err);
|
|
677
|
+
});
|
|
678
|
+
},
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Driver statistics for the operator surface. `root` is meaningless
|
|
682
|
+
* here, so the identity fields are the provider coordinates instead
|
|
683
|
+
* (`adapter`/`bucket`/`prefix`/`endpoint`); `store` is `null` by
|
|
684
|
+
* construction (storeless). Object counts aggregate ListObjectsV2 in
|
|
685
|
+
* bounded pages — a bucket larger than the bound reports
|
|
686
|
+
* `truncated: true` with the partial counts rather than walking
|
|
687
|
+
* millions of keys on an operator ping. In-progress multipart uploads
|
|
688
|
+
* are invisible to the listing (provider semantics) and therefore not
|
|
689
|
+
* counted.
|
|
690
|
+
*
|
|
691
|
+
* @param {function} fn - `fn(err, {name, adapter, strategy, bucket, prefix, endpoint,
|
|
692
|
+
* capabilities, store, objects})` — `objects` is
|
|
693
|
+
* `{count, bytes, truncated}`.
|
|
694
|
+
* @returns {void}
|
|
695
|
+
*/
|
|
696
|
+
stats: function(fn) {
|
|
697
|
+
if ( typeof fn !== 'function' ) {
|
|
698
|
+
throw new Error('[storage:' + name + '] stats() requires a callback');
|
|
699
|
+
}
|
|
700
|
+
var count = 0, bytes = 0, pages = 0;
|
|
701
|
+
var page = function(token) {
|
|
702
|
+
if ( pages >= LIST_PAGE_LIMIT ) {
|
|
703
|
+
return done(true);
|
|
704
|
+
}
|
|
705
|
+
pages++;
|
|
706
|
+
var params = { Bucket: bucket };
|
|
707
|
+
if ( prefix.length ) { params.Prefix = prefix; }
|
|
708
|
+
if ( token ) { params.ContinuationToken = token; }
|
|
709
|
+
client.send(new sdk.ListObjectsV2Command(params)).then(function(res) {
|
|
710
|
+
var contents = Array.isArray(res.Contents) ? res.Contents : [];
|
|
711
|
+
for (var i = 0; i < contents.length; i++) {
|
|
712
|
+
count++;
|
|
713
|
+
if ( typeof(contents[i].Size) == 'number' ) { bytes += contents[i].Size; }
|
|
714
|
+
}
|
|
715
|
+
if ( res.IsTruncated && res.NextContinuationToken ) {
|
|
716
|
+
return page(res.NextContinuationToken);
|
|
717
|
+
}
|
|
718
|
+
done(false);
|
|
719
|
+
}, function(err) {
|
|
720
|
+
fn(err);
|
|
721
|
+
});
|
|
722
|
+
};
|
|
723
|
+
var done = function(truncated) {
|
|
724
|
+
fn(null, {
|
|
725
|
+
name : name,
|
|
726
|
+
adapter : 's3',
|
|
727
|
+
strategy : 'sharded',
|
|
728
|
+
bucket : bucket,
|
|
729
|
+
prefix : prefix,
|
|
730
|
+
endpoint : conf.endpoint || null,
|
|
731
|
+
capabilities : capabilities,
|
|
732
|
+
store : null,
|
|
733
|
+
objects : { count: count, bytes: bytes, truncated: truncated }
|
|
734
|
+
});
|
|
735
|
+
};
|
|
736
|
+
page(null);
|
|
737
|
+
},
|
|
738
|
+
|
|
739
|
+
capabilities: capabilities,
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Destroy the client's connection pool. Nothing else to close — no
|
|
743
|
+
* store handle, no timers (the sweep is a one-shot).
|
|
744
|
+
*
|
|
745
|
+
* @returns {void}
|
|
746
|
+
*/
|
|
747
|
+
close: function() {
|
|
748
|
+
try { client.destroy(); } catch (ignore) {}
|
|
749
|
+
},
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* Test seam — the one-shot multipart-orphan sweep, exposed so the
|
|
753
|
+
* suite can drive it deterministically (the `_sweepOnce` convention).
|
|
754
|
+
*
|
|
755
|
+
* @private
|
|
756
|
+
*/
|
|
757
|
+
_sweepMultipartOrphans: sweepMultipartOrphans
|
|
758
|
+
};
|
|
759
|
+
};
|