gina 0.3.11 → 0.3.12
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 +12 -0
- package/README.md +8 -1
- package/framework/v0.3.12/VERSION +1 -0
- package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/js/gina.js +12 -1
- package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/js/gina.min.js +187 -186
- package/framework/v0.3.12/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
- package/framework/v0.3.12/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
- package/framework/{v0.3.11 → v0.3.12}/core/controller/controller.render-json.js +12 -3
- package/framework/{v0.3.11 → v0.3.12}/core/controller/controller.render-nunjucks.js +68 -54
- package/framework/{v0.3.11 → v0.3.12}/core/controller/controller.render-swig.js +173 -132
- package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/validator/src/form-validator.js +12 -1
- package/framework/{v0.3.11 → v0.3.12}/core/server.isaac.js +10 -2
- package/framework/{v0.3.11 → v0.3.12}/core/server.js +3 -3
- package/framework/{v0.3.11 → v0.3.12}/package.json +2 -2
- package/gna.js +4 -4
- package/llms.txt +3 -1
- package/package.json +2 -2
- package/framework/v0.3.11/VERSION +0 -1
- package/framework/v0.3.11/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
- package/framework/v0.3.11/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/AUTHORS +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/LICENSE +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/html/nolayout.html +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/html/static.html +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/img/android-chrome-192x192.png +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/img/android-chrome-512x512.png +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/img/apple-touch-icon.png +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/img/favicon-16x16.png +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/img/favicon-32x32.png +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/img/favicon.ico +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.css +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/beemaster/index.html +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.br +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.gz +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/html/statusbar.html +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.br +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.gz +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/inspector/have_heart_one-webfont.woff2 +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/inspector/index.html +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/inspector/inspector.css +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/inspector/inspector.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/inspector/logo.svg +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.br +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.gz +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/config.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/ai/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/ai/lib/connector.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/connector.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/connector.v2.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/connector.v3.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/connector.v4.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/n1ql.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/session-store.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/mongodb/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/mongodb/lib/connector.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/mongodb/lib/pipeline-loader.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/mongodb/lib/session-store.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/mysql/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/mysql/lib/connector.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/postgresql/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/postgresql/lib/connector.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/redis/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/redis/lib/session-store.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/scylladb/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/scylladb/lib/connector.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/scylladb/lib/session-store.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/sql-parser.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/sqlite/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/sqlite/lib/connector.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/connectors/sqlite/lib/session-store.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/content.encoding +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/controller/controller.framework.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/controller/controller.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/controller/controller.render-stream.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/controller/controller.render-v1.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/controller/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/deps/busboy-1.6.0/LICENSE +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/deps/busboy-1.6.0/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/deps/busboy-1.6.0/lib/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/deps/busboy-1.6.0/lib/types/multipart.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/deps/busboy-1.6.0/lib/types/urlencoded.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/deps/busboy-1.6.0/lib/utils.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/deps/busboy-1.6.0/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/deps/streamsearch-1.1.0/LICENSE +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/deps/streamsearch-1.1.0/lib/sbmh.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/deps/streamsearch-1.1.0/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/dev/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/dev/lib/class.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/dev/lib/factory.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/dev/lib/tools.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/gna.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/locales/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/locales/currency.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/locales/dist/language/en.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/locales/dist/language/fr.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/locales/dist/region/en.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/locales/dist/region/fr.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/locales/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/mime.types +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/model/entity.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/model/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/model/template/entityFactory.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/model/template/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/csrf/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/csrf/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/csrf/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/file/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/file/build.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/file/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/intl/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/intl/build.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/intl/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/intl/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/session/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/session/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/session/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/storage/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/storage/build.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/storage/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/storage/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/validator/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/validator/build.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/validator/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/validator/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/router.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/server.express.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/status.codes +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/_gitignore +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/config/app.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/config/connectors.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/config/routing.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/config/settings.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/config/templates.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/config/watchers.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/controllers/setup.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/locales/en.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_public/css/default.css +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_public/css/home.css +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_public/readme.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/command/gina.bat.tpl +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/command/gina.tpl +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/conf/env.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/conf/manifest.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/conf/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/conf/settings.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/conf/statics.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/conf/templates.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/error/client/json/401.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/error/client/json/403.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/error/client/json/404.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/error/server/html/50x.html +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/error/server/json/500.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/error/server/json/503.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/core/template/extensions/logger/config.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/console.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/context.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/data/LICENSE +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/data/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/data/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/data/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/dateFormat.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/json/LICENSE +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/json/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/json/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/json/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/path.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/plugins/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/plugins/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/plugins/src/api-error.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/plugins/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/prototypes.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/task.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/helpers/text.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/archiver/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/archiver/build.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/archiver/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/archiver/src/dep/jszip.min.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/archiver/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/async/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/async/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cache/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cache/build.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cache/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cache/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/aliases.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/add.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/arguments.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/build.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/copy.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/cp.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/help.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/help.txt +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/list.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/mcp-start.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/mcp.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/oas.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/openapi.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/remove.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/rename.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/restart.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/rm.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/start.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/status.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/stop.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/cache/stats.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/add.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/arguments.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/help.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/help.txt +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/list.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/migrate.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/remove.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/rm.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/add.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/get.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/help.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/help.txt +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/link-dev.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/list.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/remove.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/rm.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/set.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/unset.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/use.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/arguments.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/build.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/dot.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/get.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/help.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/help.txt +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/init.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/link-node-modules.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/link.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/msg.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/open.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/restart.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/set.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/start.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/status.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/stop.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/tail.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/update.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/version.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/gina-dev.1.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/gina-framework.1.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/gina.1.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/helper.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/i18n/add.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/i18n/arguments.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/i18n/export.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/i18n/help.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/i18n/help.txt +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/i18n/import.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/i18n/scan.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/inspector/help.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/inspector/help.txt +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/inspector/open.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/minion/help.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/minion/help.txt +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/msg.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/port/help.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/port/help.txt +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/port/inc/scan.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/port/list.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/port/reset.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/port/set.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/add.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/arguments.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/build.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/help.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/help.txt +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/import.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/list.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/move.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/remove.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/rename.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/restart.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/rm.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/start.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/status.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/stop.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/protocol/help.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/protocol/help.txt +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/protocol/list.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/protocol/set.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/add.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/help.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/help.txt +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/link-local.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/link-production.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/list.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/remove.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/rm.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/use.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/service/help.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/service/help.txt +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/service/list.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/view/add.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/collection/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/collection/build.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/collection/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/collection/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/config.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/connector-registry/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/connector-registry/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cron/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cron/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/cron/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/domain/LICENSE +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/domain/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/domain/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/domain/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/generator/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/i18n/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/i18n/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/inherits/LICENSE +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/inherits/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/inherits/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/inherits/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/inspector-redact/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/inspector-redact/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/logger/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/logger/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/containers/default/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/containers/file/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/containers/mq/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/containers/mq/listener.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/containers/mq/speaker.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/helper.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/math/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/mcp-dispatch/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/mcp-dispatch/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/mcp-http/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/mcp-http/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/mcp-server/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/mcp-server/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/merge/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/merge/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/merge/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/metrics/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/metrics/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/model.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/nunjucks-filters/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/nunjucks-filters/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/nunjucks-filters/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/nunjucks-resolver/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/nunjucks-resolver/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/proc.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/routing/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/routing/build.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/routing/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/routing/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/routing/src/radix.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/routing-introspect/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/routing-introspect/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/session-store.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/shell.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/state.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/swig-filters/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/swig-filters/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/swig-filters/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/swig-resolver/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/swig-resolver/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/url/README.md +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/url/index.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/url/routing.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/uuid/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/uuid/src/main.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/validator.js +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/watcher/package.json +0 -0
- /package/framework/{v0.3.11 → v0.3.12}/lib/watcher/src/main.js +0 -0
|
@@ -26,7 +26,12 @@ var self = null
|
|
|
26
26
|
* @param {string} jsonContent - Serialised JSON string to cache
|
|
27
27
|
* @returns {Promise<void>}
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
// `res` (the captured response from renderJSON) is passed in so the post-
|
|
30
|
+
// await throwError below does not dereference a nulled `local.res`. Pre-
|
|
31
|
+
// await reads of `local.req`/`local.res` (lines 31-86) are part of
|
|
32
|
+
// renderJSON's synchronous call (it is not async), so they are safe — the
|
|
33
|
+
// race window opens only after `await fs.promises.writeFile` at line 100.
|
|
34
|
+
async function writeCache(bundle, opt, jsonContent, res) {
|
|
30
35
|
if (
|
|
31
36
|
typeof(local.req.routing.cache) == 'undefined'
|
|
32
37
|
||
|
|
@@ -111,7 +116,11 @@ async function writeCache(bundle, opt, jsonContent) {
|
|
|
111
116
|
// Invalidation
|
|
112
117
|
if ( typeof(cachingOption.invalidateOnEvents) != 'undefined' ) {
|
|
113
118
|
if ( !Array.isArray(cachingOption.invalidateOnEvents) ) {
|
|
114
|
-
|
|
119
|
+
// #M1 — post-await read goes through the captured `res` (passed
|
|
120
|
+
// from renderJSON) rather than `local.res`, which renderJSON may
|
|
121
|
+
// have nulled at its terminal exit between the writeFile await
|
|
122
|
+
// and this resume point.
|
|
123
|
+
return self.throwError(res, 500, new Error('cache.invalidateOn must be an array'));
|
|
115
124
|
}
|
|
116
125
|
// Placing event listeners
|
|
117
126
|
cache.setEvents(cacheKey, cachingOption.invalidateOnEvents);
|
|
@@ -406,7 +415,7 @@ module.exports = function renderJSON(jsonObj, deps) {
|
|
|
406
415
|
&& typeof(request.routing.cache) != 'undefined'
|
|
407
416
|
&& /^GET$/i.test(request.method)
|
|
408
417
|
) {
|
|
409
|
-
writeCache(self._options.bundle, local.options.conf.server.cache, data).catch(function(err) {
|
|
418
|
+
writeCache(self._options.bundle, local.options.conf.server.cache, data, response).catch(function(err) {
|
|
410
419
|
console.error('[render-json] writeCache failed:', err);
|
|
411
420
|
});
|
|
412
421
|
}
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
* (commit TBD). `sendHtmlResponse` now implements the four-way branch
|
|
39
39
|
* from `class.controller.md §7b` (HEAD×stream, HEAD×HTTP1.1, body×stream,
|
|
40
40
|
* body×HTTP1.1). HTTP/2 streams bypass the compat layer, merge pipeline-set
|
|
41
|
-
* headers (CORS, cache-control) via `
|
|
41
|
+
* headers (CORS, cache-control) via `res.getHeaders()`, and guard
|
|
42
42
|
* against `stream.destroyed || stream.closed` client disconnects that
|
|
43
43
|
* would otherwise throw `ERR_HTTP2_INVALID_STREAM`. Early Hints 103
|
|
44
44
|
* auto-send for CSS/JS preloads is still deferred — that path in swig
|
|
@@ -373,14 +373,14 @@ function injectInspectorScripts(html, data, self, local, displayInspector) {
|
|
|
373
373
|
* 4. body + HTTP/1.1 → `res.end(html)` (content-type set earlier)
|
|
374
374
|
*
|
|
375
375
|
* The HTTP/2 branches merge headers set earlier in the pipeline (CORS,
|
|
376
|
-
* cache-control, cookies) via `
|
|
376
|
+
* cache-control, cookies) via `res.getHeaders()` because
|
|
377
377
|
* `stream.respond()` on the raw HTTP/2 stream does NOT include headers
|
|
378
378
|
* set via `response.setHeader()`. The `stream.destroyed || stream.closed`
|
|
379
379
|
* guard is required — the client may have disconnected before the async
|
|
380
380
|
* render callback completed, in which case `stream.respond()` throws
|
|
381
381
|
* `ERR_HTTP2_INVALID_STREAM`.
|
|
382
382
|
*
|
|
383
|
-
* `
|
|
383
|
+
* `res.headersSent = true` is set after a successful `stream.respond()`
|
|
384
384
|
* to signal to the HTTP/1.1 compat layer that the response was sent
|
|
385
385
|
* directly, matching render-swig's §7b pattern.
|
|
386
386
|
*
|
|
@@ -388,45 +388,45 @@ function injectInspectorScripts(html, data, self, local, displayInspector) {
|
|
|
388
388
|
* @param {object} local - Per-request closure
|
|
389
389
|
* @param {string} html - Rendered HTML content
|
|
390
390
|
*/
|
|
391
|
-
function sendHtmlResponse(local, html) {
|
|
392
|
-
if (
|
|
391
|
+
function sendHtmlResponse(local, html, req, res) {
|
|
392
|
+
if (res.headersSent) { return; }
|
|
393
393
|
|
|
394
|
-
var statusCode =
|
|
395
|
-
var stream = (
|
|
396
|
-
var isHead = /^HEAD$/i.test(
|
|
394
|
+
var statusCode = res.statusCode || 200;
|
|
395
|
+
var stream = (res && typeof res.stream !== 'undefined') ? res.stream : null;
|
|
396
|
+
var isHead = /^HEAD$/i.test(req.method);
|
|
397
397
|
var byteLength = Buffer.byteLength(html, 'utf8');
|
|
398
398
|
// Ensure content-type is set on the HTTP/1.1 response so header merge
|
|
399
399
|
// picks it up for the stream paths and setHeader()-only paths alike.
|
|
400
|
-
if (!
|
|
401
|
-
|
|
400
|
+
if (!res.getHeader('content-type')) {
|
|
401
|
+
res.setHeader('content-type', 'text/html; charset=utf-8');
|
|
402
402
|
}
|
|
403
403
|
|
|
404
404
|
if (isHead) {
|
|
405
405
|
if (stream) {
|
|
406
406
|
// Case 1: HEAD + HTTP/2
|
|
407
407
|
if (stream.destroyed || stream.closed) {
|
|
408
|
-
try { console.warn('[render-nunjucks] stream already destroyed on HEAD — client disconnected ('+
|
|
408
|
+
try { console.warn('[render-nunjucks] stream already destroyed on HEAD — client disconnected ('+ req.url +')'); } catch (e) {}
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
411
411
|
if (!stream.headersSent) {
|
|
412
412
|
var _headH2 = {
|
|
413
|
-
'content-type':
|
|
413
|
+
'content-type': res.getHeader('content-type'),
|
|
414
414
|
'content-length': byteLength,
|
|
415
415
|
':status': statusCode
|
|
416
416
|
};
|
|
417
|
-
var _pendingHeadH2 =
|
|
417
|
+
var _pendingHeadH2 = res.getHeaders ? res.getHeaders() : {};
|
|
418
418
|
for (var _hh2k in _pendingHeadH2) {
|
|
419
419
|
if (!(_hh2k in _headH2)) { _headH2[_hh2k] = _pendingHeadH2[_hh2k]; }
|
|
420
420
|
}
|
|
421
421
|
stream.respond(_headH2);
|
|
422
422
|
}
|
|
423
423
|
stream.end();
|
|
424
|
-
|
|
424
|
+
res.headersSent = true;
|
|
425
425
|
} else {
|
|
426
426
|
// Case 2: HEAD + HTTP/1.1
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
427
|
+
res.setHeader('content-length', byteLength);
|
|
428
|
+
res.writeHead(statusCode);
|
|
429
|
+
res.end();
|
|
430
430
|
}
|
|
431
431
|
return;
|
|
432
432
|
}
|
|
@@ -434,30 +434,30 @@ function sendHtmlResponse(local, html) {
|
|
|
434
434
|
if (stream) {
|
|
435
435
|
// Case 3: body + HTTP/2
|
|
436
436
|
if (stream.destroyed || stream.closed) {
|
|
437
|
-
try { console.warn('[render-nunjucks] stream already destroyed — client disconnected before response ('+
|
|
437
|
+
try { console.warn('[render-nunjucks] stream already destroyed — client disconnected before response ('+ req.url +')'); } catch (e) {}
|
|
438
438
|
return;
|
|
439
439
|
}
|
|
440
440
|
if (!stream.headersSent) {
|
|
441
441
|
var _streamHeaders = {
|
|
442
|
-
'content-type':
|
|
442
|
+
'content-type': res.getHeader('content-type'),
|
|
443
443
|
':status': statusCode
|
|
444
444
|
};
|
|
445
445
|
// Merge pipeline-set headers (CORS, cache-control, etc.) —
|
|
446
446
|
// `stream.respond()` does not include them automatically.
|
|
447
|
-
var _pendingHeaders =
|
|
447
|
+
var _pendingHeaders = res.getHeaders ? res.getHeaders() : {};
|
|
448
448
|
for (var _shk in _pendingHeaders) {
|
|
449
449
|
if (!(_shk in _streamHeaders)) { _streamHeaders[_shk] = _pendingHeaders[_shk]; }
|
|
450
450
|
}
|
|
451
451
|
stream.respond(_streamHeaders);
|
|
452
452
|
}
|
|
453
453
|
stream.end(html);
|
|
454
|
-
|
|
454
|
+
res.headersSent = true;
|
|
455
455
|
return;
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
// Case 4: body + HTTP/1.1
|
|
459
|
-
|
|
460
|
-
|
|
459
|
+
res.writeHead(statusCode);
|
|
460
|
+
res.end(html);
|
|
461
461
|
}
|
|
462
462
|
|
|
463
463
|
/**
|
|
@@ -480,7 +480,7 @@ function sendHtmlResponse(local, html) {
|
|
|
480
480
|
* @param {object} localOptions - The controller's localOptions (already has `conf`)
|
|
481
481
|
* @returns {void}
|
|
482
482
|
*/
|
|
483
|
-
function registerGinaFilters(env, self, local, localOptions) {
|
|
483
|
+
function registerGinaFilters(env, self, local, localOptions, req, res) {
|
|
484
484
|
// FRAMEWORK PATCH: use module-scope libRef fallback so
|
|
485
485
|
// refreshCore's malformed cache entry doesn't return undefined here.
|
|
486
486
|
var nunjucksFilters = (libRef && libRef.nunjucksFilters)
|
|
@@ -491,23 +491,23 @@ function registerGinaFilters(env, self, local, localOptions) {
|
|
|
491
491
|
// request headers and engine-specific localOptions, (b) extracting to a
|
|
492
492
|
// shared helper would widen the scope of this filter-port change beyond
|
|
493
493
|
// what's necessary. Future refactor candidate.
|
|
494
|
-
var localRequestPort =
|
|
494
|
+
var localRequestPort = req.headers.port || req.headers[':port'];
|
|
495
495
|
var isProxyHost = (
|
|
496
|
-
typeof(
|
|
496
|
+
typeof(req.headers.host) != 'undefined'
|
|
497
497
|
&& typeof(localRequestPort) != 'undefined'
|
|
498
498
|
&& (localRequestPort === '80' || localRequestPort === '443' || localRequestPort === 80 || localRequestPort === 443)
|
|
499
|
-
&& localOptions.conf.server.scheme +'://'+
|
|
499
|
+
&& localOptions.conf.server.scheme +'://'+ req.headers.host+':'+ localRequestPort != localOptions.conf.hostname.replace(/\:\d+$/, '') +':'+ localOptions.conf.server.port
|
|
500
500
|
||
|
|
501
|
-
typeof(
|
|
502
|
-
&& localOptions.conf.server.scheme +'://'+
|
|
501
|
+
typeof(req.headers[':authority']) != 'undefined'
|
|
502
|
+
&& localOptions.conf.server.scheme +'://'+ req.headers[':authority'] != localOptions.conf.hostname
|
|
503
503
|
||
|
|
504
|
-
typeof(
|
|
504
|
+
typeof(req.headers.host) != 'undefined'
|
|
505
505
|
&& typeof(localRequestPort) != 'undefined'
|
|
506
506
|
&& (localRequestPort === '80' || localRequestPort === '443' || localRequestPort === 80 || localRequestPort === 443)
|
|
507
|
-
&&
|
|
507
|
+
&& req.headers.host == localOptions.conf.host
|
|
508
508
|
||
|
|
509
|
-
typeof(
|
|
510
|
-
&& String(
|
|
509
|
+
typeof(req.headers['x-nginx-proxy']) != 'undefined'
|
|
510
|
+
&& String(req.headers['x-nginx-proxy']).toLowerCase() === 'true'
|
|
511
511
|
||
|
|
512
512
|
typeof(process.gina) != 'undefined' && typeof(process.gina.PROXY_HOSTNAME) != 'undefined'
|
|
513
513
|
) ? true : false;
|
|
@@ -516,8 +516,8 @@ function registerGinaFilters(env, self, local, localOptions) {
|
|
|
516
516
|
options: JSON.clone(localOptions),
|
|
517
517
|
isProxyHost: isProxyHost,
|
|
518
518
|
throwError: self.throwError,
|
|
519
|
-
req:
|
|
520
|
-
res:
|
|
519
|
+
req: req,
|
|
520
|
+
res: res
|
|
521
521
|
});
|
|
522
522
|
|
|
523
523
|
// FRAMEWORK PATCH: apply bundle-level filter wraps registered
|
|
@@ -651,11 +651,11 @@ function injectAssets(html, data, localOptions) {
|
|
|
651
651
|
* @param {string} htmlContent - Final HTML string to cache (post injectAssets + injectInspectorScripts)
|
|
652
652
|
* @returns {Promise<void>}
|
|
653
653
|
*/
|
|
654
|
-
async function writeCache(local, self, bundle, opt, htmlContent) {
|
|
654
|
+
async function writeCache(local, self, bundle, opt, htmlContent, req, res) {
|
|
655
655
|
if (
|
|
656
|
-
typeof(
|
|
656
|
+
typeof(req.routing.cache) == 'undefined'
|
|
657
657
|
||
|
|
658
|
-
!
|
|
658
|
+
! req.routing.cache
|
|
659
659
|
||
|
|
660
660
|
String(self.serverInstance._cacheIsEnabled).toLowerCase() !== 'true'
|
|
661
661
|
) {
|
|
@@ -663,11 +663,11 @@ async function writeCache(local, self, bundle, opt, htmlContent) {
|
|
|
663
663
|
}
|
|
664
664
|
// Bundle namespace prevents silent collisions when two bundles serve the
|
|
665
665
|
// same URL path — matches render-swig.js:47 and render-json.js:40 (#C3).
|
|
666
|
-
var cacheKey = "static:" + bundle + ":" +
|
|
667
|
-
var responseHeaders =
|
|
666
|
+
var cacheKey = "static:" + bundle + ":" + req.originalUrl;
|
|
667
|
+
var responseHeaders = res.getHeaders() || {};
|
|
668
668
|
if ( !cache.has(cacheKey) ) {
|
|
669
669
|
// Caching kinds are: `memory` & `fs`
|
|
670
|
-
var cachingOption = ( typeof(
|
|
670
|
+
var cachingOption = ( typeof(req.routing.cache) == 'string' ) ? { type: req.routing.cache } : JSON.clone(req.routing.cache);
|
|
671
671
|
if ( typeof(cachingOption.ttl) == 'undefined' ) {
|
|
672
672
|
cachingOption.ttl = opt.ttl
|
|
673
673
|
}
|
|
@@ -701,7 +701,7 @@ async function writeCache(local, self, bundle, opt, htmlContent) {
|
|
|
701
701
|
|
|
702
702
|
// Caching to `fs` (file system)
|
|
703
703
|
if ( /^fs$/i.test(cachingOption.type) ) {
|
|
704
|
-
var url =
|
|
704
|
+
var url = req.originalUrl;
|
|
705
705
|
if ( url.endsWith('/') ) {
|
|
706
706
|
url += 'index'
|
|
707
707
|
}
|
|
@@ -726,7 +726,7 @@ async function writeCache(local, self, bundle, opt, htmlContent) {
|
|
|
726
726
|
// Invalidation
|
|
727
727
|
if ( typeof(cachingOption.invalidateOnEvents) != 'undefined' ) {
|
|
728
728
|
if ( !Array.isArray(cachingOption.invalidateOnEvents) ) {
|
|
729
|
-
return self.throwError(
|
|
729
|
+
return self.throwError(res, 500, new Error('cache.invalidateOn must be an array'));
|
|
730
730
|
}
|
|
731
731
|
// Placing event listeners
|
|
732
732
|
cache.setEvents(cacheKey, cachingOption.invalidateOnEvents);
|
|
@@ -746,6 +746,20 @@ module.exports = async function renderNunjucks(userData, displayInspector, errOp
|
|
|
746
746
|
// `localOptions.template.{stylesheets,javascripts}` arrays.
|
|
747
747
|
var setResources = deps.setResources;
|
|
748
748
|
|
|
749
|
+
// Function-scoped captures of per-request refs (#M1 race fix — mirror of
|
|
750
|
+
// controller.render-swig.js). renderNunjucks() is async with awaits at
|
|
751
|
+
// writeCache (the layout-cache write). Between yields, an external code
|
|
752
|
+
// path (most commonly throwError's generic-HTML fallthrough at
|
|
753
|
+
// controller.js:5342-5344) can null `local.req`/`local.res`/`local.next`
|
|
754
|
+
// on the controller closure. Capturing into function-scoped locals at the
|
|
755
|
+
// top of the function isolates this render from that null-out so post-
|
|
756
|
+
// await reads do not dereference null. Helpers that read the per-request
|
|
757
|
+
// refs (sendHtmlResponse / writeCache / registerGinaFilters) take the
|
|
758
|
+
// captures as parameters.
|
|
759
|
+
var req = local.req;
|
|
760
|
+
var res = local.res;
|
|
761
|
+
var _next = local.next;
|
|
762
|
+
|
|
749
763
|
// #NJ3 — point the module-level `cache` at the server's shared in-memory
|
|
750
764
|
// store for this request. Same pattern as render-swig.js:171 and
|
|
751
765
|
// render-json.js:149. A guard is unnecessary: `self.serverInstance._cached`
|
|
@@ -770,7 +784,7 @@ module.exports = async function renderNunjucks(userData, displayInspector, errOp
|
|
|
770
784
|
// level (the full render-swig file has much more nuanced handling;
|
|
771
785
|
// MVP keeps it simple).
|
|
772
786
|
if (!hasViews || !hasViews()) {
|
|
773
|
-
return sendHtmlResponse(local, '');
|
|
787
|
+
return sendHtmlResponse(local, '', req, res);
|
|
774
788
|
}
|
|
775
789
|
|
|
776
790
|
// headersSent guard — if the pipeline already sent headers (e.g. an
|
|
@@ -858,7 +872,7 @@ module.exports = async function renderNunjucks(userData, displayInspector, errOp
|
|
|
858
872
|
// env.render() / env.renderString() calls below are synchronous and
|
|
859
873
|
// cannot interleave with another request's addFilter pass.
|
|
860
874
|
try {
|
|
861
|
-
registerGinaFilters(env, self, local, localOptions);
|
|
875
|
+
registerGinaFilters(env, self, local, localOptions, req, res);
|
|
862
876
|
} catch (filterErr) {
|
|
863
877
|
return self.throwError(filterErr);
|
|
864
878
|
}
|
|
@@ -1028,16 +1042,16 @@ module.exports = async function renderNunjucks(userData, displayInspector, errOp
|
|
|
1028
1042
|
// testing), GETs only, route must declare a `cache` block.
|
|
1029
1043
|
if (
|
|
1030
1044
|
!self.isCacheless()
|
|
1031
|
-
&& typeof(
|
|
1032
|
-
&&
|
|
1045
|
+
&& typeof(req.routing.cache) != 'undefined'
|
|
1046
|
+
&& req.method.toUpperCase() === 'GET'
|
|
1033
1047
|
||
|
|
1034
1048
|
// allowing caching even for dev env
|
|
1035
1049
|
String(self.serverInstance._cacheIsEnabled).toLowerCase() === 'true'
|
|
1036
|
-
&& typeof(
|
|
1037
|
-
&&
|
|
1050
|
+
&& typeof(req.routing.cache) != 'undefined'
|
|
1051
|
+
&& req.method.toUpperCase() === 'GET'
|
|
1038
1052
|
) {
|
|
1039
1053
|
try {
|
|
1040
|
-
await writeCache(local, self, localOptions.bundle, localOptions.conf.server.cache, html);
|
|
1054
|
+
await writeCache(local, self, localOptions.bundle, localOptions.conf.server.cache, html, req, res);
|
|
1041
1055
|
} catch (cacheErr) {
|
|
1042
1056
|
// Cache-write failures must never break the render. The response
|
|
1043
1057
|
// still goes out; subsequent requests will retry the write on the
|
|
@@ -1051,13 +1065,13 @@ module.exports = async function renderNunjucks(userData, displayInspector, errOp
|
|
|
1051
1065
|
// re-computes its own Cache-Control header from `cachedContentObj.ttl`
|
|
1052
1066
|
// so this header is only meaningful when a client receives the
|
|
1053
1067
|
// freshly-rendered bytes.
|
|
1054
|
-
if ( typeof(
|
|
1055
|
-
var _ccCfg = ( typeof(
|
|
1068
|
+
if ( typeof(req.routing.cache) != 'undefined' && req.routing.cache ) {
|
|
1069
|
+
var _ccCfg = ( typeof(req.routing.cache) == 'string' ) ? { type: req.routing.cache } : req.routing.cache;
|
|
1056
1070
|
var _ccTtl = ( typeof(_ccCfg.ttl) != 'undefined' && _ccCfg.ttl > 0 ) ? _ccCfg.ttl : localOptions.conf.server.cache.ttl;
|
|
1057
1071
|
if ( _ccTtl > 0 ) {
|
|
1058
|
-
|
|
1072
|
+
res.setHeader('Cache-Control', ( _ccCfg.visibility === 'public' ? 'public' : 'private' ) + ', max-age=' + ~~(_ccTtl));
|
|
1059
1073
|
}
|
|
1060
1074
|
}
|
|
1061
1075
|
|
|
1062
|
-
sendHtmlResponse(local, html);
|
|
1076
|
+
sendHtmlResponse(local, html, req, res);
|
|
1063
1077
|
};
|