gina 0.1.7 → 0.1.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/.github/dependabot.yml +12 -0
- package/CHANGELOG.md +47 -0
- package/CONTRIBUTING.md +190 -0
- package/GOVERNANCE.md +20 -0
- package/README.md +7 -3
- package/ROADMAP.md +165 -0
- package/bin/cli +15 -0
- package/bin/gina-container +15 -0
- package/bin/gina-init +433 -0
- package/framework/v0.1.8/VERSION +1 -0
- package/framework/{v0.1.7 → v0.1.8}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.gz +0 -0
- package/framework/{v0.1.7 → v0.1.8}/core/asset/plugin/dist/vendor/gina/html/toolbar.html.gz +0 -0
- package/framework/{v0.1.7 → v0.1.8}/core/asset/plugin/dist/vendor/gina/js/gina.js +16 -0
- package/framework/{v0.1.7 → v0.1.8}/core/asset/plugin/dist/vendor/gina/js/gina.min.js +235 -234
- package/framework/v0.1.8/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
- package/framework/v0.1.8/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
- package/framework/{v0.1.7 → v0.1.8}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.gz +0 -0
- package/framework/{v0.1.7 → v0.1.8}/core/config.js +66 -7
- package/framework/{v0.1.7 → v0.1.8}/core/connectors/couchbase/index.js +48 -1
- package/framework/{v0.1.7 → v0.1.8}/core/controller/controller.js +224 -26
- package/framework/{v0.1.7 → v0.1.8}/core/controller/controller.render-json.js +8 -0
- package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/package.json +0 -16
- package/framework/{v0.1.7 → v0.1.8}/core/gna.js +116 -2
- package/framework/{v0.1.7 → v0.1.8}/core/model/entity.js +80 -7
- package/framework/{v0.1.7 → v0.1.8}/core/model/template/entityFactory.js +6 -6
- package/framework/{v0.1.7 → v0.1.8}/core/server.isaac.js +13 -22
- package/framework/{v0.1.7 → v0.1.8}/core/server.js +1 -1
- package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle/config/app.json +1 -1
- package/framework/v0.1.8/core/template/boilerplate/bundle/config/connectors.json +18 -0
- package/framework/v0.1.8/core/template/boilerplate/bundle/config/settings.json +13 -0
- package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle/config/settings.server.json +2 -2
- package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle/config/templates.json +3 -3
- package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle/controllers/controller.content.js +3 -3
- package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle/controllers/controller.js +5 -5
- package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle/controllers/setup.js +15 -18
- package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle/index.js +11 -13
- package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle_namespace/controllers/controller.js +3 -3
- package/framework/v0.1.8/core/template/boilerplate/bundle_public/css/home.css +3 -0
- package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle_templates/handlers/main.js +3 -3
- package/framework/v0.1.8/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +9 -0
- package/framework/v0.1.8/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +8 -0
- package/framework/{v0.1.7 → v0.1.8}/core/template/conf/env.json +29 -29
- package/framework/v0.1.8/core/template/conf/manifest.json +7 -0
- package/framework/v0.1.8/core/template/conf/package.json +11 -0
- package/framework/{v0.1.7 → v0.1.8}/core/template/conf/settings.json +5 -5
- package/framework/v0.1.8/core/template/conf/statics.json +12 -0
- package/framework/{v0.1.7 → v0.1.8}/core/template/conf/templates.json +7 -7
- package/framework/{v0.1.7 → v0.1.8}/helpers/context.js +14 -7
- package/framework/{v0.1.7 → v0.1.8}/lib/cmd/bundle/add.js +32 -4
- package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/init.js +82 -4
- package/framework/{v0.1.7 → v0.1.8}/lib/domain/dist/public_suffix_list.dat.gz +0 -0
- package/framework/{v0.1.7 → v0.1.8}/lib/logger/src/containers/default/index.js +15 -8
- package/framework/{v0.1.7 → v0.1.8}/lib/logger/src/containers/mq/speaker.js +4 -1
- package/framework/{v0.1.7 → v0.1.8}/lib/logger/src/main.js +10 -0
- package/framework/{v0.1.7 → v0.1.8}/lib/model.js +7 -2
- package/migration_note.md +37 -3
- package/package.json +5 -4
- package/resources/home/framework/locals.json +5 -5
- package/resources/home/framework/project.json +2 -2
- package/resources/home/framework/projects.json +3 -3
- package/resources/home/main.json +26 -26
- package/resources/home/settings.json +30 -30
- package/framework/v0.1.7/VERSION +0 -1
- package/framework/v0.1.7/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
- package/framework/v0.1.7/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
- package/framework/v0.1.7/core/template/boilerplate/bundle/config/settings.json +0 -12
- package/framework/v0.1.7/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -11
- package/framework/v0.1.7/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -8
- package/framework/v0.1.7/core/template/conf/manifest.json +0 -7
- package/framework/v0.1.7/core/template/conf/package.json +0 -11
- package/framework/v0.1.7/core/template/conf/statics.json +0 -12
- /package/framework/{v0.1.7 → v0.1.8}/AUTHORS +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/LICENSE +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/html/nolayout.html +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/html/static.html +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/img/android-chrome-192x192.png +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/img/android-chrome-512x512.png +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/img/apple-touch-icon.png +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/img/favicon-16x16.png +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/img/favicon-32x32.png +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/img/favicon.ico +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/plugin/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.br +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/plugin/dist/vendor/gina/html/toolbar.html +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/plugin/dist/vendor/gina/html/toolbar.html.br +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.br +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/asset/plugin/uuid.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/connectors/couchbase/lib/connector.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/connectors/couchbase/lib/connector.v2.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/connectors/couchbase/lib/connector.v3.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/connectors/couchbase/lib/connector.v4.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/connectors/couchbase/lib/n1ql.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/connectors/couchbase/lib/session-store.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/content.encoding +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/controller/controller.framework.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/controller/controller.render-swig.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/controller/controller.render-v1.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/controller/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/busboy-1.6.0/LICENSE +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/busboy-1.6.0/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/busboy-1.6.0/lib/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/busboy-1.6.0/lib/types/multipart.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/busboy-1.6.0/lib/types/urlencoded.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/busboy-1.6.0/lib/utils.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/busboy-1.6.0/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/optimist-0.6.1/LICENSE +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/optimist-0.6.1/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/optimist-0.6.1/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/optimist-0.6.1/readme.markdown +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/HISTORY.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/LICENSE +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/bin/swig.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/dist/swig.min.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/dateformatter.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/filters.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/lexer.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/loaders/filesystem.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/loaders/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/loaders/memory.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/parser.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/swig.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/autoescape.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/block.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/else.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/elseif.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/extends.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/filter.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/for.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/if.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/import.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/include.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/macro.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/parent.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/raw.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/set.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/tags/spaceless.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-1.4.2/lib/utils.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-client/swig-2.0.0.min.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/deps/swig-client/swig.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/dev/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/dev/lib/class.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/dev/lib/factory.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/dev/lib/tools.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/locales/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/locales/currency.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/locales/dist/language/en.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/locales/dist/language/fr.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/locales/dist/region/en.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/locales/dist/region/fr.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/locales/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/mime.types +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/model/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/model/template/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/file/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/file/build.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/file/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/intl/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/intl/build.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/intl/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/intl/src/main.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/storage/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/storage/build.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/storage/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/storage/src/main.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/validator/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/validator/build.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/validator/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/validator/src/form-validator.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/plugins/lib/validator/src/main.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/router.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/server.express.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/status.codes +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/_gitignore +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle/config/routing.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle_public/css/default.css +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle_public/readme.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/command/gina.bat.tpl +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/command/gina.tpl +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/error/client/json/401.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/error/client/json/403.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/error/client/json/404.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/error/server/html/50x.html +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/error/server/json/500.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/error/server/json/503.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/core/template/extensions/logger/config.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/console.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/data/LICENSE +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/data/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/data/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/data/src/main.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/dateFormat.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/json/LICENSE +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/json/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/json/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/json/src/main.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/path.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/plugins/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/plugins/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/plugins/src/api-error.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/plugins/src/main.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/prototypes.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/task.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/helpers/text.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/archiver/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/archiver/build.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/archiver/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/archiver/src/dep/jszip.min.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/archiver/src/main.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cache/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cache/build.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cache/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cache/src/main.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/aliases.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/bundle/arguments.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/bundle/build.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/bundle/copy.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/bundle/cp.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/bundle/help.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/bundle/help.txt +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/bundle/list.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/bundle/remove.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/bundle/rename.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/bundle/restart.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/bundle/rm.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/bundle/start.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/bundle/status.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/bundle/stop.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/cache/stats.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/env/add.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/env/get.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/env/help.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/env/help.txt +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/env/link-dev.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/env/list.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/env/remove.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/env/rm.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/env/set.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/env/unset.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/env/use.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/arguments.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/build.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/dot.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/get.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/help.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/help.txt +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/link-node-modules.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/link.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/msg.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/open.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/restart.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/set.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/start.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/status.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/stop.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/tail.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/update.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/framework/version.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/gina-dev.1.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/gina-framework.1.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/gina.1.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/helper.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/minion/help.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/minion/help.txt +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/msg.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/port/help.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/port/help.txt +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/port/inc/scan.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/port/list.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/port/reset.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/port/set.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/project/add.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/project/arguments.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/project/build.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/project/help.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/project/help.txt +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/project/import.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/project/list.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/project/move.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/project/remove.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/project/rename.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/project/restart.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/project/rm.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/project/start.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/project/status.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/project/stop.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/protocol/help.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/protocol/help.txt +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/protocol/list.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/protocol/set.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/scope/add.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/scope/help.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/scope/help.txt +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/scope/link-local.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/scope/link-production.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/scope/list.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/scope/remove.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/scope/rm.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/scope/use.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cmd/view/add.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/collection/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/collection/build.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/collection/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/collection/src/main.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/config.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cron/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cron/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/cron/src/main.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/domain/LICENSE +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/domain/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/domain/dist/2025-03-14_13-41-20_UTC.dat +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/domain/dist/public_suffix_list.dat +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/domain/dist/public_suffix_list.dat.br +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/domain/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/domain/src/main.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/generator/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/inherits/LICENSE +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/inherits/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/inherits/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/inherits/src/main.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/logger/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/logger/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/logger/src/containers/file/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/logger/src/containers/mq/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/logger/src/containers/mq/listener.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/logger/src/helper.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/math/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/merge/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/merge/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/merge/src/main.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/proc.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/routing/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/routing/build.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/routing/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/routing/src/main.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/session-store.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/shell.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/swig-filters/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/swig-filters/package.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/swig-filters/src/main.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/url/README.md +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/url/index.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/url/routing.json +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/lib/validator.js +0 -0
- /package/framework/{v0.1.7 → v0.1.8}/package.json +0 -0
package/bin/gina-init
ADDED
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* gina-init — stateless ~/.gina/ bootstrap for Docker/K8s containers.
|
|
6
|
+
*
|
|
7
|
+
* Generates the 4 files the framework boot sequence hard-requires, without
|
|
8
|
+
* running the full gina CLI ceremony (no project:add, no port:reset, no
|
|
9
|
+
* framework socket on port 8124).
|
|
10
|
+
*
|
|
11
|
+
* Designed to run as an init container or as the first step of an entrypoint
|
|
12
|
+
* script, immediately before `gina-container <bundle> @<project>`.
|
|
13
|
+
*
|
|
14
|
+
* Output files:
|
|
15
|
+
* $GINA_HOMEDIR/projects.json
|
|
16
|
+
* $GINA_HOMEDIR/ports.json
|
|
17
|
+
* $GINA_HOMEDIR/ports.reverse.json
|
|
18
|
+
* $GINA_HOMEDIR/{shortVersion}/settings.json
|
|
19
|
+
*
|
|
20
|
+
* Parent directories (rundir, logdir, tmpdir, project homedir) are created
|
|
21
|
+
* as needed. All output files are overwritten on each run (idempotent).
|
|
22
|
+
*
|
|
23
|
+
* Input — env vars (individual fields):
|
|
24
|
+
*
|
|
25
|
+
* GINA_PROJECT_NAME project name (required)
|
|
26
|
+
* GINA_BUNDLES comma-separated bundle names (required)
|
|
27
|
+
* GINA_PROJECT_PATH project source root (default: /app)
|
|
28
|
+
* GINA_PROJECT_HOME project homedir (default: HOME/.<project>)
|
|
29
|
+
* GINA_ENVS comma-sep supported envs (default: dev,prod)
|
|
30
|
+
* GINA_DEF_ENV default env (default: dev)
|
|
31
|
+
* GINA_DEV_ENV alias for the dev env (default: same as GINA_DEF_ENV)
|
|
32
|
+
* GINA_SCOPES comma-sep supported scopes (default: local,production)
|
|
33
|
+
* GINA_DEF_SCOPE default scope (default: local)
|
|
34
|
+
* GINA_PROTOCOLS comma-sep supported protocols (default: http/1.1,http/2.0)
|
|
35
|
+
* GINA_DEF_PROTOCOL default protocol (default: http/2.0)
|
|
36
|
+
* GINA_SCHEMES comma-sep supported schemes (default: http,https)
|
|
37
|
+
* GINA_DEF_SCHEME default scheme (default: https)
|
|
38
|
+
* GINA_PORT_START first port to allocate (default: 3100)
|
|
39
|
+
* GINA_RUNDIR run/lock dir (default: GINA_HOMEDIR/run)
|
|
40
|
+
* GINA_LOGDIR log dir (default: GINA_HOMEDIR/log)
|
|
41
|
+
* GINA_TMPDIR tmp dir (default: os.tmpdir())
|
|
42
|
+
* GINA_LOG_LEVEL log level (default: info)
|
|
43
|
+
* GINA_TIMEZONE timezone (default: TZ env or UTC)
|
|
44
|
+
* GINA_CULTURE culture code (default: en_US)
|
|
45
|
+
* GINA_ISO_SHORT ISO 3166-1 alpha-2 country code (default: us)
|
|
46
|
+
*
|
|
47
|
+
* Input — JSON config file (alternative or supplement to env vars):
|
|
48
|
+
*
|
|
49
|
+
* GINA_INIT_CONFIG path to a JSON config file
|
|
50
|
+
* --config=<path> same, as a CLI flag
|
|
51
|
+
*
|
|
52
|
+
* JSON file keys mirror the env var names without the GINA_ prefix and in
|
|
53
|
+
* lower_snake_case: project_name, bundles (array or comma-string), envs, etc.
|
|
54
|
+
* Env vars always take priority over JSON file values.
|
|
55
|
+
*
|
|
56
|
+
* Exits 0 on success, 1 on validation or write error.
|
|
57
|
+
*
|
|
58
|
+
* Usage:
|
|
59
|
+
* gina-init # reads env vars
|
|
60
|
+
* gina-init --config=/etc/gina/init.json # reads JSON config (env vars override)
|
|
61
|
+
* GINA_INIT_CONFIG=/etc/gina/init.json gina-init
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
var fs = require('fs');
|
|
65
|
+
var os = require('os');
|
|
66
|
+
|
|
67
|
+
var binPath = __dirname;
|
|
68
|
+
var ginaPath = binPath.replace(/\/bin$/, '');
|
|
69
|
+
|
|
70
|
+
// Bootstrap utils/helper — injects globals: _, setEnvVar, getEnvVar, getUserHome, etc.
|
|
71
|
+
require(ginaPath + '/utils/helper'); // jshint ignore:line
|
|
72
|
+
|
|
73
|
+
var packObj = require(ginaPath + '/package.json');
|
|
74
|
+
var version = getEnvVar('GINA_VERSION') || packObj.version; // jshint ignore:line
|
|
75
|
+
var shortVersion = version.split('.').slice(0, 2).join('.');
|
|
76
|
+
var frameworkPath = ginaPath + '/framework/v' + version;
|
|
77
|
+
|
|
78
|
+
// ── Arch normalisation (mirrors bin/cli and bin/gina-container) ────────────────
|
|
79
|
+
var arch = process.arch;
|
|
80
|
+
switch (process.arch) {
|
|
81
|
+
case 'x64': arch = 'amd64'; break;
|
|
82
|
+
case 'armv7l': arch = 'armhf'; break;
|
|
83
|
+
case 'x86': arch = 'i386'; break;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// ── ~/.gina home ──────────────────────────────────────────────────────────────
|
|
87
|
+
// Note: getEnvVar/setEnvVar use process.gina, not process.env. GINA_HOMEDIR
|
|
88
|
+
// passed from the OS environment lives in process.env, so we read it directly.
|
|
89
|
+
var userHome = getUserHome(); // jshint ignore:line
|
|
90
|
+
var ginaHome = process.env.GINA_HOMEDIR || (userHome + '/.gina');
|
|
91
|
+
|
|
92
|
+
// ── Parse CLI args ─────────────────────────────────────────────────────────────
|
|
93
|
+
var rawArgs = process.argv.slice(2);
|
|
94
|
+
var configPath = null;
|
|
95
|
+
var showHelp = false;
|
|
96
|
+
|
|
97
|
+
for (var i = 0; i < rawArgs.length; i++) {
|
|
98
|
+
var m = rawArgs[i].match(/^--config=(.+)$/);
|
|
99
|
+
if (m) { configPath = m[1]; continue; }
|
|
100
|
+
if (rawArgs[i] === '--help' || rawArgs[i] === '-h') { showHelp = true; }
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (showHelp) {
|
|
104
|
+
process.stdout.write([
|
|
105
|
+
'Usage: gina-init [--config=<path>]',
|
|
106
|
+
'',
|
|
107
|
+
'Generates the ~/.gina/ state files required by gina-container without',
|
|
108
|
+
'running the full gina CLI ceremony.',
|
|
109
|
+
'',
|
|
110
|
+
'Required (env var or JSON config):',
|
|
111
|
+
' GINA_PROJECT_NAME project name',
|
|
112
|
+
' GINA_BUNDLES comma-separated bundle names',
|
|
113
|
+
'',
|
|
114
|
+
'Optional:',
|
|
115
|
+
' GINA_PROJECT_PATH project source root (default: /app)',
|
|
116
|
+
' GINA_ENVS supported envs (default: dev,prod)',
|
|
117
|
+
' GINA_DEF_ENV default env (default: dev)',
|
|
118
|
+
' GINA_SCOPES supported scopes (default: local,production)',
|
|
119
|
+
' GINA_DEF_SCOPE default scope (default: local)',
|
|
120
|
+
' GINA_PROTOCOLS supported protocols (default: http/1.1,http/2.0)',
|
|
121
|
+
' GINA_DEF_PROTOCOL default protocol (default: http/2.0)',
|
|
122
|
+
' GINA_SCHEMES supported schemes (default: http,https)',
|
|
123
|
+
' GINA_DEF_SCHEME default scheme (default: https)',
|
|
124
|
+
' GINA_PORT_START first port to allocate (default: 3100)',
|
|
125
|
+
' GINA_RUNDIR run dir (default: ~/.gina/run)',
|
|
126
|
+
' GINA_LOGDIR log dir (default: ~/.gina/log)',
|
|
127
|
+
' GINA_TMPDIR tmp dir (default: os.tmpdir())',
|
|
128
|
+
' GINA_LOG_LEVEL log level (default: info)',
|
|
129
|
+
' GINA_TIMEZONE timezone (default: TZ or UTC)',
|
|
130
|
+
' GINA_INIT_CONFIG path to JSON config file',
|
|
131
|
+
' --config=<path> same as GINA_INIT_CONFIG',
|
|
132
|
+
''
|
|
133
|
+
].join('\n'));
|
|
134
|
+
process.exit(0);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// ── Load JSON config file ──────────────────────────────────────────────────────
|
|
138
|
+
var fileCfg = {};
|
|
139
|
+
var envConfigPath = process.env.GINA_INIT_CONFIG || configPath;
|
|
140
|
+
|
|
141
|
+
if (envConfigPath) {
|
|
142
|
+
if (!fs.existsSync(envConfigPath)) {
|
|
143
|
+
process.stdout.write('[gina-init] config file not found: ' + envConfigPath + '\n');
|
|
144
|
+
process.exit(1);
|
|
145
|
+
}
|
|
146
|
+
try {
|
|
147
|
+
fileCfg = JSON.parse(fs.readFileSync(envConfigPath, 'utf8'));
|
|
148
|
+
} catch (parseErr) {
|
|
149
|
+
process.stdout.write('[gina-init] failed to parse config file: ' + parseErr.message + '\n');
|
|
150
|
+
process.exit(1);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// ── Config resolution helpers ──────────────────────────────────────────────────
|
|
155
|
+
// Env vars win over JSON file values. JSON file values win over defaults.
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Resolve a scalar value: env var → JSON file key → default.
|
|
159
|
+
* @param {string} envKey
|
|
160
|
+
* @param {string} fileKey
|
|
161
|
+
* @param {*} def
|
|
162
|
+
* @returns {*}
|
|
163
|
+
*/
|
|
164
|
+
function cfg(envKey, fileKey, def) {
|
|
165
|
+
var e = process.env[envKey];
|
|
166
|
+
if (e !== undefined && e !== '') return e;
|
|
167
|
+
var f = fileCfg[fileKey];
|
|
168
|
+
if (f !== undefined) return f;
|
|
169
|
+
return def;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Resolve a list value: env var (comma-string) → JSON file key (array|comma-string) → default.
|
|
174
|
+
* @param {string} envKey
|
|
175
|
+
* @param {string} fileKey
|
|
176
|
+
* @param {string[]} def
|
|
177
|
+
* @returns {string[]}
|
|
178
|
+
*/
|
|
179
|
+
function cfgList(envKey, fileKey, def) {
|
|
180
|
+
var e = process.env[envKey];
|
|
181
|
+
if (e !== undefined && e !== '') {
|
|
182
|
+
return e.split(',').map(function(s) { return s.trim(); }).filter(Boolean);
|
|
183
|
+
}
|
|
184
|
+
var f = fileCfg[fileKey];
|
|
185
|
+
if (f !== undefined) {
|
|
186
|
+
if (Array.isArray(f)) return f;
|
|
187
|
+
return f.split(',').map(function(s) { return s.trim(); }).filter(Boolean);
|
|
188
|
+
}
|
|
189
|
+
return def;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// ── Resolve all config values ──────────────────────────────────────────────────
|
|
193
|
+
var projectName = cfg('GINA_PROJECT_NAME', 'project_name', null)
|
|
194
|
+
|| cfg('GINA_PROJECT_NAME', 'project', null);
|
|
195
|
+
|
|
196
|
+
var bundles = cfgList('GINA_BUNDLES', 'bundles', null);
|
|
197
|
+
|
|
198
|
+
if (!projectName) {
|
|
199
|
+
process.stdout.write('[gina-init] GINA_PROJECT_NAME is required\n');
|
|
200
|
+
process.exit(1);
|
|
201
|
+
}
|
|
202
|
+
if (!bundles || bundles.length === 0) {
|
|
203
|
+
process.stdout.write('[gina-init] GINA_BUNDLES is required (comma-separated bundle names)\n');
|
|
204
|
+
process.exit(1);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
var projectPath = cfg('GINA_PROJECT_PATH', 'project_path', '/app');
|
|
208
|
+
var projectHome = cfg('GINA_PROJECT_HOME', 'project_home', userHome + '/.' + projectName);
|
|
209
|
+
|
|
210
|
+
var envs = cfgList('GINA_ENVS', 'envs', ['dev', 'prod']);
|
|
211
|
+
var defEnv = cfg('GINA_DEF_ENV', 'def_env', envs[0]);
|
|
212
|
+
var devEnv = cfg('GINA_DEV_ENV', 'dev_env', defEnv);
|
|
213
|
+
|
|
214
|
+
var scopes = cfgList('GINA_SCOPES', 'scopes', ['local', 'production']);
|
|
215
|
+
var defScope = cfg('GINA_DEF_SCOPE', 'def_scope', scopes[0]);
|
|
216
|
+
var localScope = scopes[0];
|
|
217
|
+
var productionScope = scopes.length > 1 ? scopes[scopes.length - 1] : scopes[0];
|
|
218
|
+
|
|
219
|
+
var protocols = cfgList('GINA_PROTOCOLS', 'protocols', ['http/1.1', 'http/2.0']);
|
|
220
|
+
var defProtocol = cfg('GINA_DEF_PROTOCOL', 'def_protocol', 'http/2.0');
|
|
221
|
+
|
|
222
|
+
var schemes = cfgList('GINA_SCHEMES', 'schemes', ['http', 'https']);
|
|
223
|
+
var defScheme = cfg('GINA_DEF_SCHEME', 'def_scheme', 'https');
|
|
224
|
+
|
|
225
|
+
var portStart = parseInt(cfg('GINA_PORT_START', 'port_start', '3100'), 10);
|
|
226
|
+
|
|
227
|
+
var rundir = cfg('GINA_RUNDIR', 'rundir', ginaHome + '/run');
|
|
228
|
+
var logdir = cfg('GINA_LOGDIR', 'logdir', ginaHome + '/log');
|
|
229
|
+
var tmpdir = cfg('GINA_TMPDIR', 'tmpdir', os.tmpdir());
|
|
230
|
+
var logLevel = cfg('GINA_LOG_LEVEL', 'log_level', 'info');
|
|
231
|
+
var timezone = cfg('GINA_TIMEZONE', 'timezone', process.env.TZ || 'UTC');
|
|
232
|
+
var culture = cfg('GINA_CULTURE', 'culture', 'en_US');
|
|
233
|
+
var isoShort = cfg('GINA_ISO_SHORT', 'iso_short', 'us');
|
|
234
|
+
|
|
235
|
+
// ── Validate cross-field constraints ──────────────────────────────────────────
|
|
236
|
+
if (protocols.indexOf(defProtocol) === -1) {
|
|
237
|
+
process.stdout.write('[gina-init] GINA_DEF_PROTOCOL "' + defProtocol + '" is not in GINA_PROTOCOLS: ' + protocols.join(', ') + '\n');
|
|
238
|
+
process.exit(1);
|
|
239
|
+
}
|
|
240
|
+
if (schemes.indexOf(defScheme) === -1) {
|
|
241
|
+
process.stdout.write('[gina-init] GINA_DEF_SCHEME "' + defScheme + '" is not in GINA_SCHEMES: ' + schemes.join(', ') + '\n');
|
|
242
|
+
process.exit(1);
|
|
243
|
+
}
|
|
244
|
+
if (envs.indexOf(defEnv) === -1) {
|
|
245
|
+
process.stdout.write('[gina-init] GINA_DEF_ENV "' + defEnv + '" is not in GINA_ENVS: ' + envs.join(', ') + '\n');
|
|
246
|
+
process.exit(1);
|
|
247
|
+
}
|
|
248
|
+
if (scopes.indexOf(defScope) === -1) {
|
|
249
|
+
process.stdout.write('[gina-init] GINA_DEF_SCOPE "' + defScope + '" is not in GINA_SCOPES: ' + scopes.join(', ') + '\n');
|
|
250
|
+
process.exit(1);
|
|
251
|
+
}
|
|
252
|
+
if (isNaN(portStart) || portStart < 1 || portStart > 65534) {
|
|
253
|
+
process.stdout.write('[gina-init] GINA_PORT_START must be a number between 1 and 65534\n');
|
|
254
|
+
process.exit(1);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// ── Generate ports.json and ports.reverse.json ────────────────────────────────
|
|
258
|
+
//
|
|
259
|
+
// Port groups are allocated in declaration order (protocol × scheme).
|
|
260
|
+
// HTTP/2 cleartext (http/2.0 + http) is skipped — h2c is not used in practice
|
|
261
|
+
// and the real port tables always have an empty object for that combination.
|
|
262
|
+
// Within each group, ports are allocated per bundle then per env.
|
|
263
|
+
//
|
|
264
|
+
// ports.json structure:
|
|
265
|
+
// { "protocol": { "scheme": { "port": "bundle@project/env" } } }
|
|
266
|
+
//
|
|
267
|
+
// ports.reverse.json structure:
|
|
268
|
+
// { "bundle@project": { "env": { "protocol": { "scheme": port } } } }
|
|
269
|
+
//
|
|
270
|
+
var portsOut = {};
|
|
271
|
+
var portsReverseOut = {};
|
|
272
|
+
var nextPort = portStart;
|
|
273
|
+
|
|
274
|
+
// Initialise ports.json skeleton (all protocol/scheme combos, even h2c)
|
|
275
|
+
protocols.forEach(function(protocol) {
|
|
276
|
+
portsOut[protocol] = {};
|
|
277
|
+
schemes.forEach(function(scheme) {
|
|
278
|
+
portsOut[protocol][scheme] = {};
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
protocols.forEach(function(protocol) {
|
|
283
|
+
schemes.forEach(function(scheme) {
|
|
284
|
+
// HTTP/2 cleartext — skip port allocation, leave the empty {} in place
|
|
285
|
+
if (protocol === 'http/2.0' && scheme === 'http') return;
|
|
286
|
+
|
|
287
|
+
bundles.forEach(function(bundle) {
|
|
288
|
+
envs.forEach(function(env) {
|
|
289
|
+
var port = nextPort++;
|
|
290
|
+
var label = bundle + '@' + projectName + '/' + env;
|
|
291
|
+
|
|
292
|
+
// ports.json
|
|
293
|
+
portsOut[protocol][scheme][String(port)] = label;
|
|
294
|
+
|
|
295
|
+
// ports.reverse.json — deep assign without nulling any missing level
|
|
296
|
+
var key = bundle + '@' + projectName;
|
|
297
|
+
if (!portsReverseOut[key]) portsReverseOut[key] = {};
|
|
298
|
+
if (!portsReverseOut[key][env]) portsReverseOut[key][env] = {};
|
|
299
|
+
if (!portsReverseOut[key][env][protocol]) portsReverseOut[key][env][protocol] = {};
|
|
300
|
+
portsReverseOut[key][env][protocol][scheme] = port;
|
|
301
|
+
});
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
// ── Build projects.json entry ──────────────────────────────────────────────────
|
|
307
|
+
var defPrefix = (packObj.config && packObj.config.prefix) ? packObj.config.prefix : '/usr/local';
|
|
308
|
+
var defGlobalMode = (packObj.config && typeof(packObj.config.globalMode) !== 'undefined')
|
|
309
|
+
? packObj.config.globalMode
|
|
310
|
+
: true;
|
|
311
|
+
|
|
312
|
+
var projectEntry = {
|
|
313
|
+
path : projectPath,
|
|
314
|
+
homedir : projectHome,
|
|
315
|
+
bundles_path : projectHome + '/bundles',
|
|
316
|
+
releases_path : projectHome + '/releases',
|
|
317
|
+
logs_path : projectHome + '/var/logs',
|
|
318
|
+
tmp_path : projectHome + '/tmp',
|
|
319
|
+
def_prefix : defPrefix,
|
|
320
|
+
framework : 'v' + version,
|
|
321
|
+
envs : envs,
|
|
322
|
+
def_env : defEnv,
|
|
323
|
+
dev_env : devEnv,
|
|
324
|
+
scopes : scopes,
|
|
325
|
+
def_scope : defScope,
|
|
326
|
+
local_scope : localScope,
|
|
327
|
+
production_scope : productionScope,
|
|
328
|
+
protocols : protocols,
|
|
329
|
+
def_protocol : defProtocol,
|
|
330
|
+
schemes : schemes,
|
|
331
|
+
def_scheme : defScheme,
|
|
332
|
+
frameworks : [version],
|
|
333
|
+
def_framework : version,
|
|
334
|
+
def_global_mode : defGlobalMode,
|
|
335
|
+
archs : ['arm', 'arm64', 'x64', 'amd64'],
|
|
336
|
+
def_arch : arch,
|
|
337
|
+
platforms : ['darwin', 'linux', 'win32', 'freebsd', 'openbsd', 'sunos', 'aix'],
|
|
338
|
+
def_platform : process.platform,
|
|
339
|
+
cultures : [culture],
|
|
340
|
+
def_culture : culture,
|
|
341
|
+
def_iso_short : isoShort,
|
|
342
|
+
def_timezone : timezone,
|
|
343
|
+
def_date : 'yyyy/mm/dd',
|
|
344
|
+
log_levels : ['trace', 'debug', 'info', 'warn', 'error', 'fatal'],
|
|
345
|
+
def_log_level : logLevel,
|
|
346
|
+
exists : true
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
var projectsOut = {};
|
|
350
|
+
projectsOut[projectName] = projectEntry;
|
|
351
|
+
|
|
352
|
+
// ── Build settings.json ────────────────────────────────────────────────────────
|
|
353
|
+
var userInfo = { username: 'node', uid: -1, gid: -1 };
|
|
354
|
+
try { userInfo = os.userInfo(); } catch(e) { /* running as unresolvable uid (e.g. scratch image) */ }
|
|
355
|
+
|
|
356
|
+
var settingsOut = {
|
|
357
|
+
version : version,
|
|
358
|
+
def_framework : version,
|
|
359
|
+
arch : arch,
|
|
360
|
+
platform : process.platform,
|
|
361
|
+
env : defEnv,
|
|
362
|
+
env_is_dev : (defEnv === devEnv),
|
|
363
|
+
scope : defScope,
|
|
364
|
+
scope_is_local : (defScope === localScope),
|
|
365
|
+
scope_is_production : (defScope === productionScope),
|
|
366
|
+
node_version : process.version,
|
|
367
|
+
port : '8124',
|
|
368
|
+
debug_port : '9229',
|
|
369
|
+
mq_port : '8125',
|
|
370
|
+
host_v4 : '127.0.0.1',
|
|
371
|
+
hostname : os.hostname(),
|
|
372
|
+
user : userInfo.username,
|
|
373
|
+
uid : String(userInfo.uid),
|
|
374
|
+
gid : String(userInfo.gid),
|
|
375
|
+
dir : ginaPath,
|
|
376
|
+
homedir : userHome,
|
|
377
|
+
rundir : rundir,
|
|
378
|
+
tmpdir : tmpdir,
|
|
379
|
+
logdir : logdir,
|
|
380
|
+
culture : culture,
|
|
381
|
+
iso_short : isoShort,
|
|
382
|
+
timezone : timezone,
|
|
383
|
+
date : 'yyyy/mm/dd',
|
|
384
|
+
log_level : logLevel
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
// ── Create required directories ────────────────────────────────────────────────
|
|
388
|
+
var dirsToCreate = [
|
|
389
|
+
ginaHome,
|
|
390
|
+
ginaHome + '/' + shortVersion,
|
|
391
|
+
rundir,
|
|
392
|
+
logdir,
|
|
393
|
+
tmpdir,
|
|
394
|
+
projectHome,
|
|
395
|
+
projectHome + '/bundles',
|
|
396
|
+
projectHome + '/releases',
|
|
397
|
+
projectHome + '/var/logs',
|
|
398
|
+
projectHome + '/tmp'
|
|
399
|
+
];
|
|
400
|
+
|
|
401
|
+
dirsToCreate.forEach(function(dir) {
|
|
402
|
+
try {
|
|
403
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
404
|
+
} catch (mkErr) {
|
|
405
|
+
if (mkErr.code !== 'EEXIST') {
|
|
406
|
+
process.stdout.write('[gina-init] failed to create dir ' + dir + ': ' + mkErr.message + '\n');
|
|
407
|
+
process.exit(1);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
|
|
412
|
+
// ── Write output files ─────────────────────────────────────────────────────────
|
|
413
|
+
function writeJSON(filePath, data) {
|
|
414
|
+
try {
|
|
415
|
+
fs.writeFileSync(filePath, JSON.stringify(data, null, 4) + '\n', 'utf8');
|
|
416
|
+
} catch (writeErr) {
|
|
417
|
+
process.stdout.write('[gina-init] failed to write ' + filePath + ': ' + writeErr.message + '\n');
|
|
418
|
+
process.exit(1);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
writeJSON(ginaHome + '/projects.json', projectsOut);
|
|
423
|
+
writeJSON(ginaHome + '/ports.json', portsOut);
|
|
424
|
+
writeJSON(ginaHome + '/ports.reverse.json', portsReverseOut);
|
|
425
|
+
writeJSON(ginaHome + '/' + shortVersion + '/settings.json', settingsOut);
|
|
426
|
+
|
|
427
|
+
// ── Report ─────────────────────────────────────────────────────────────────────
|
|
428
|
+
var totalPorts = nextPort - portStart;
|
|
429
|
+
process.stdout.write('[gina-init] Bootstrap complete for @' + projectName + ' (' + bundles.length + ' bundle(s), ' + totalPorts + ' port(s) allocated from ' + portStart + ')\n');
|
|
430
|
+
process.stdout.write('[gina-init] ' + ginaHome + '/projects.json\n');
|
|
431
|
+
process.stdout.write('[gina-init] ' + ginaHome + '/ports.json\n');
|
|
432
|
+
process.stdout.write('[gina-init] ' + ginaHome + '/ports.reverse.json\n');
|
|
433
|
+
process.stdout.write('[gina-init] ' + ginaHome + '/' + shortVersion + '/settings.json\n');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.1.8
|
|
Binary file
|
|
Binary file
|
|
@@ -21590,6 +21590,16 @@ define('gina/popin', [ 'require', 'vendor/uuid', 'jquery', 'lib/domain', 'lib/me
|
|
|
21590
21590
|
}
|
|
21591
21591
|
}
|
|
21592
21592
|
if (xhr.readyState == 4) {
|
|
21593
|
+
// Fixed: clear loading state on response complete — data-gina-popin-loading
|
|
21594
|
+
// was set on readyState 1|3 but never removed, leaving the overlay blocked.
|
|
21595
|
+
$popin.target.removeAttribute('data-gina-popin-loading');
|
|
21596
|
+
if ($popinTrigger) {
|
|
21597
|
+
if ( /^A$/i.test($popinTrigger.tagName) ) {
|
|
21598
|
+
$popinTrigger.removeAttribute('aria-disabled');
|
|
21599
|
+
} else {
|
|
21600
|
+
$popinTrigger.removeAttribute('disabled');
|
|
21601
|
+
}
|
|
21602
|
+
}
|
|
21593
21603
|
// 200, 201, 201' etc ...
|
|
21594
21604
|
var result = null;
|
|
21595
21605
|
|
|
@@ -22079,6 +22089,9 @@ define('gina/popin', [ 'require', 'vendor/uuid', 'jquery', 'lib/domain', 'lib/me
|
|
|
22079
22089
|
$el.className = $el.className.replace(/\sgina-popin-is-active|gina-popin-is-active|gina-popin-is-active\s/, '');
|
|
22080
22090
|
$el.innerHTML = '';
|
|
22081
22091
|
}
|
|
22092
|
+
// Fixed: clear loading state on reset — defensive cleanup for navigation
|
|
22093
|
+
// within a popin that was in loading state when reset was called.
|
|
22094
|
+
$el.removeAttribute('data-gina-popin-loading');
|
|
22082
22095
|
|
|
22083
22096
|
// removing from FormValidator instance
|
|
22084
22097
|
if ($validatorInstance) {
|
|
@@ -22188,6 +22201,9 @@ define('gina/popin', [ 'require', 'vendor/uuid', 'jquery', 'lib/domain', 'lib/me
|
|
|
22188
22201
|
$popinTrigger.removeAttribute('disabled', true);
|
|
22189
22202
|
}
|
|
22190
22203
|
}
|
|
22204
|
+
// Fixed: clear loading state on explicit close — defensive cleanup in case
|
|
22205
|
+
// the popin is closed before the XHR completes or after a non-XHR flow.
|
|
22206
|
+
$el.removeAttribute('data-gina-popin-loading');
|
|
22191
22207
|
triggerEvent(gina, $popin.target, 'close.'+ $popin.id, $popin);
|
|
22192
22208
|
}
|
|
22193
22209
|
}
|