gina 0.1.6-alpha.8 → 0.1.6-alpha.80
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/README-4Contributors.md +14 -8
- package/README.md +3 -3
- package/bin/cli +13 -0
- package/bin/gina +29 -1
- package/framework/v0.1.6-alpha.80/VERSION +1 -0
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/asset/plugin/README.md +1 -0
- package/framework/v0.1.6-alpha.80/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +1 -0
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/asset/plugin/dist/vendor/gina/js/gina.js +369 -101
- package/framework/v0.1.6-alpha.80/core/asset/plugin/dist/vendor/gina/js/gina.min.js +776 -0
- package/framework/v0.1.6-alpha.80/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +8 -0
- package/framework/v0.1.6-alpha.80/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +8 -0
- package/framework/v0.1.6-alpha.80/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.map +8 -0
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/config.js +117 -51
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/connectors/couchbase/lib/connector.v4.js +28 -22
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/controller/controller.js +329 -56
- package/framework/v0.1.6-alpha.80/core/deps/busboy-1.6.0/.github/workflows/ci.yml +24 -0
- package/framework/v0.1.6-alpha.80/core/deps/busboy-1.6.0/.github/workflows/lint.yml +23 -0
- package/framework/v0.1.6-alpha.80/core/deps/busboy-1.6.0/LICENSE +19 -0
- package/framework/v0.1.6-alpha.80/core/deps/busboy-1.6.0/README.md +191 -0
- package/framework/v0.1.6-alpha.80/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-big.js +149 -0
- package/framework/v0.1.6-alpha.80/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-small.js +143 -0
- package/framework/v0.1.6-alpha.80/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-big.js +154 -0
- package/framework/v0.1.6-alpha.80/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-small.js +148 -0
- package/framework/v0.1.6-alpha.80/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-100pairs-small.js +101 -0
- package/framework/v0.1.6-alpha.80/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-900pairs-small-alt.js +84 -0
- package/framework/v0.1.6-alpha.80/core/deps/busboy-1.6.0/lib/index.js +57 -0
- package/framework/v0.1.6-alpha.80/core/deps/busboy-1.6.0/lib/types/multipart.js +680 -0
- package/framework/v0.1.6-alpha.80/core/deps/busboy-1.6.0/lib/types/urlencoded.js +350 -0
- package/framework/v0.1.6-alpha.80/core/deps/busboy-1.6.0/lib/utils.js +596 -0
- package/framework/v0.1.6-alpha.80/core/deps/busboy-1.6.0/package.json +22 -0
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/gna.js +97 -18
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/model/index.js +28 -24
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/validator/src/form-validator.js +38 -26
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/validator/src/main.js +254 -56
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/router.js +75 -40
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/server.isaac.js +46 -8
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/server.js +31 -5
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle/controllers/setup.js +2 -2
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/conf/templates.json +4 -2
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/context.js +16 -11
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/path.js +25 -9
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/bundle/add.js +2 -1
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/bundle/start.js +21 -8
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/build.js +1 -1
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/init.js +18 -0
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/link-node-modules.js +2 -3
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/link.js +1 -0
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/tail.js +28 -11
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/version.js +15 -1
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/helper.js +6 -2
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/project/add.js +3 -2
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/project/build.js +4 -4
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/protocol/list.js +71 -50
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/collection/src/main.js +8 -0
- package/framework/v0.1.6-alpha.80/lib/domain/exemples/backend.js +12 -0
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/domain/src/main.js +3 -1
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/merge/package.json +1 -1
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/model.js +1 -1
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/routing/src/main.js +58 -11
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/session-store.js +2 -2
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/swig-filters/src/main.js +64 -9
- package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/validator.js +2 -2
- package/framework/v0.1.6-alpha.80/package.json +12 -0
- package/package.json +2 -2
- package/utils/helper.js +24 -0
- package/framework/v0.1.6-alpha.8/VERSION +0 -1
- package/framework/v0.1.6-alpha.8/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +0 -1
- package/framework/v0.1.6-alpha.8/core/asset/plugin/dist/vendor/gina/js/gina.min.js +0 -766
- package/framework/v0.1.6-alpha.8/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +0 -8
- package/framework/v0.1.6-alpha.8/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -7
- package/framework/v0.1.6-alpha.8/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.map +0 -8
- package/framework/v0.1.6-alpha.8/lib/domain/exemples/backend.js +0 -0
- package/framework/v0.1.6-alpha.8/package.json +0 -14
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/AUTHORS +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/asset/html/nolayout.html +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/asset/html/static.html +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/asset/img/android-chrome-192x192.png +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/asset/img/android-chrome-512x512.png +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/asset/img/apple-touch-icon.png +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/asset/img/favicon-16x16.png +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/asset/img/favicon-32x32.png +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/asset/img/favicon.ico +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/asset/plugin/dist/vendor/gina/html/toolbar.html +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/asset/plugin/uuid.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/connectors/couchbase/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/connectors/couchbase/lib/connector.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/connectors/couchbase/lib/connector.v2.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/connectors/couchbase/lib/connector.v3.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/connectors/couchbase/lib/n1ql.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/connectors/couchbase/lib/session-store.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/controller/controller.framework.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/controller/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8/core/deps/busboy → v0.1.6-alpha.80/core/deps/busboy-0.2.14}/.travis.yml +0 -0
- /package/framework/{v0.1.6-alpha.8/core/deps/busboy → v0.1.6-alpha.80/core/deps/busboy-0.2.14}/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.8/core/deps/busboy → v0.1.6-alpha.80/core/deps/busboy-0.2.14}/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8/core/deps/busboy → v0.1.6-alpha.80/core/deps/busboy-0.2.14}/deps/encoding/encoding-indexes.js +0 -0
- /package/framework/{v0.1.6-alpha.8/core/deps/busboy → v0.1.6-alpha.80/core/deps/busboy-0.2.14}/deps/encoding/encoding.js +0 -0
- /package/framework/{v0.1.6-alpha.8/core/deps/busboy → v0.1.6-alpha.80/core/deps/busboy-0.2.14}/lib/main.js +0 -0
- /package/framework/{v0.1.6-alpha.8/core/deps/busboy → v0.1.6-alpha.80/core/deps/busboy-0.2.14}/lib/types/multipart.js +0 -0
- /package/framework/{v0.1.6-alpha.8/core/deps/busboy → v0.1.6-alpha.80/core/deps/busboy-0.2.14}/lib/types/urlencoded.js +0 -0
- /package/framework/{v0.1.6-alpha.8/core/deps/busboy → v0.1.6-alpha.80/core/deps/busboy-0.2.14}/lib/utils.js +0 -0
- /package/framework/{v0.1.6-alpha.8/core/deps/busboy → v0.1.6-alpha.80/core/deps/busboy-0.2.14}/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/deps/swig-client/swig-2.0.0.min.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/dev/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/dev/lib/class.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/dev/lib/factory.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/dev/lib/tools.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/locales/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/locales/currency.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/locales/dist/language/en.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/locales/dist/language/fr.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/locales/dist/region/en.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/locales/dist/region/fr.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/locales/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/locales/src/make.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/locales/src/resources/currency.csv +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/locales/src/resources/region.csv +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/locales/src/resources/region.mapping.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/mime.types +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/model/entity.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/model/template/entityFactory.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/model/template/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/file/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/file/build.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/file/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/intl/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/intl/build.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/intl/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/intl/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/storage/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/storage/build.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/storage/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/storage/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/validator/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/validator/build.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/plugins/lib/validator/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/server.express.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/status.codes +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/_gitignore +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle/config/app.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle/config/routing.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle/config/settings.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle/config/templates.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle_public/css/default.css +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle_public/readme.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/command/gina.bat.tpl +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/command/gina.tpl +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/conf/env.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/conf/manifest.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/conf/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/conf/settings.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/conf/statics.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/error/client/json/401.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/error/client/json/403.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/error/client/json/404.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/error/server/html/50x.html +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/error/server/json/500.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/error/server/json/503.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/core/template/extensions/logger/config.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/console.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/data/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/data/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/data/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/data/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/dateFormat.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/json/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/json/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/json/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/json/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/plugins/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/plugins/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/plugins/src/api-error.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/plugins/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/prototypes.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/task.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/helpers/text.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/archiver/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/archiver/build.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/archiver/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/archiver/src/dep/jszip.min.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/archiver/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/aliases.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/bundle/arguments.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/bundle/copy.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/bundle/cp.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/bundle/help.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/bundle/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/bundle/list.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/bundle/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/bundle/rename.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/bundle/restart.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/bundle/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/bundle/status.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/bundle/stop.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/env/add.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/env/get.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/env/help.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/env/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/env/link-dev.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/env/list.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/env/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/env/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/env/set.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/env/unset.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/env/use.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/dot.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/get.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/help.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/msg.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/open.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/restart.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/set.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/start.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/status.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/stop.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/framework/update.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/gina-dev.1.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/gina-framework.1.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/gina.1.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/msg.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/port/help.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/port/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/port/inc/scan.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/port/list.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/port/reset.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/port/set.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/project/arguments.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/project/help.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/project/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/project/import.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/project/list.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/project/move.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/project/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/project/rename.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/project/restart.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/project/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/project/start.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/project/status.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/project/stop.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/protocol/help.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/protocol/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/protocol/set.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/scope/add.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/scope/help.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/scope/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/scope/link-local.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/scope/link-production.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/scope/list.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/scope/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/scope/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/scope/use.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cmd/view/add.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/collection/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/collection/build.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/collection/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/config.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cron/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cron/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/cron/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/domain/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/domain/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/domain/dist/public_suffix_list.dat +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/domain/exemples/frontend.html +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/domain/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/generator/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/inherits/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/inherits/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/inherits/example/inheriting_eventemitter.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/inherits/example/protected_inheritance.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/inherits/example/simple_inheritance.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/inherits/example/super_attribute_overridden_by_child_on_init.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/inherits/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/inherits/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/logger/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/logger/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/logger/src/containers/default/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/logger/src/containers/file/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/logger/src/containers/mq/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/logger/src/containers/mq/listener.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/logger/src/containers/mq/speaker.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/logger/src/helper.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/logger/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/math/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/merge/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/merge/example/merge.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/merge/example/merge_2_literal objects.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/merge/example/merge_and_preserve_first.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/merge/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/proc.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/routing/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/routing/build.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/routing/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/shell.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/swig-filters/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/swig-filters/package.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/url/README.md +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/url/index.js +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/url/mocks.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/url/routing.json +0 -0
- /package/framework/{v0.1.6-alpha.8 → v0.1.6-alpha.80}/lib/url/test.js +0 -0
|
@@ -118,6 +118,73 @@ function Router(env, scope) {
|
|
|
118
118
|
// }
|
|
119
119
|
// return ;
|
|
120
120
|
|
|
121
|
+
|
|
122
|
+
var serverInstance = self.getServerInstance();
|
|
123
|
+
var config = null
|
|
124
|
+
, conf = null
|
|
125
|
+
, bundle = null
|
|
126
|
+
, env = null
|
|
127
|
+
, scope = null
|
|
128
|
+
, cacheless = (/^true$/i.test(process.env.NODE_ENV_IS_DEV)) ? true : false
|
|
129
|
+
;
|
|
130
|
+
try {
|
|
131
|
+
config = new Config().getInstance();
|
|
132
|
+
if (!params.bundle) {
|
|
133
|
+
try {
|
|
134
|
+
//params.bundle = config.bundle;
|
|
135
|
+
//params.param = config.routing[config.reverseRouting[params.param.url]];
|
|
136
|
+
var _rule = config.reverseRouting[params.param.url];
|
|
137
|
+
params = merge(params, config.routing[_rule]);
|
|
138
|
+
params.rule = _rule;
|
|
139
|
+
} catch(reverseRoutingError) {
|
|
140
|
+
serverInstance.throwError(response, 500, reverseRoutingError);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
bundle = local.bundle = params.bundle;
|
|
145
|
+
env = config.env;
|
|
146
|
+
scope = config.scope;
|
|
147
|
+
conf = config[bundle][env];
|
|
148
|
+
} catch (configErr) {
|
|
149
|
+
serverInstance.throwError(response, 500, new Error('syntax error(s) found in `'+ controllerFile +'` \nTrace: ') + (configErr.stack || configErr.message) );
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
local.cacheless = cacheless;
|
|
154
|
+
local.request = request;
|
|
155
|
+
local.next = next;
|
|
156
|
+
local.conf = conf;
|
|
157
|
+
local.isStandalone = conf.isStandalone;
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Reverse proxy check
|
|
162
|
+
*/
|
|
163
|
+
var requestPort = request.headers.port || request.headers[':port'];
|
|
164
|
+
var isProxyHost = (
|
|
165
|
+
typeof(request.headers.host) != 'undefined'
|
|
166
|
+
&& typeof(requestPort) != 'undefined'
|
|
167
|
+
&& /^(80|443)$/.test(requestPort)
|
|
168
|
+
&& conf.server.scheme +'://'+ request.headers.host +':'+ requestPort != conf.hostname.replace(/\:\d+$/, '') +':'+ conf.server.port
|
|
169
|
+
||
|
|
170
|
+
typeof(request.headers[':authority']) != 'undefined'
|
|
171
|
+
&& conf.server.scheme +'://'+ request.headers[':authority'] != conf.hostname
|
|
172
|
+
||
|
|
173
|
+
typeof(request.headers.host) != 'undefined'
|
|
174
|
+
&& typeof(requestPort) != 'undefined'
|
|
175
|
+
&& /^(80|443)$/.test(requestPort)
|
|
176
|
+
&& request.headers.host == conf.host
|
|
177
|
+
||
|
|
178
|
+
typeof(request.headers['x-nginx-proxy']) != 'undefined'
|
|
179
|
+
&& /^true$/i.test(request.headers['x-nginx-proxy'])
|
|
180
|
+
||
|
|
181
|
+
typeof(process.gina.PROXY_HOSTNAME) != 'undefined'
|
|
182
|
+
) ? true : false;
|
|
183
|
+
|
|
184
|
+
setContext('isProxyHost', isProxyHost);
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
121
188
|
/**
|
|
122
189
|
* ExpressJS modules + HTTP2 fix
|
|
123
190
|
* Hack required until `express-<plugin>` get support for http2 `express-session`
|
|
@@ -140,6 +207,9 @@ function Router(env, scope) {
|
|
|
140
207
|
||
|
|
141
208
|
typeof(request.session) != 'undefined'
|
|
142
209
|
&& typeof(request.isAuthenticated) == 'undefined'
|
|
210
|
+
||
|
|
211
|
+
typeof(request.session) != 'undefined'
|
|
212
|
+
&& typeof(request.session.passport) != 'undefined'
|
|
143
213
|
) {
|
|
144
214
|
request.isAuthenticated = function() {
|
|
145
215
|
var property = 'user';
|
|
@@ -284,42 +354,6 @@ function Router(env, scope) {
|
|
|
284
354
|
* EO Passport JS HTTP2 fix
|
|
285
355
|
*/
|
|
286
356
|
|
|
287
|
-
var serverInstance = self.getServerInstance();
|
|
288
|
-
var config = null
|
|
289
|
-
, conf = null
|
|
290
|
-
, bundle = null
|
|
291
|
-
, env = null
|
|
292
|
-
, scope = null
|
|
293
|
-
, cacheless = (/^true$/i.test(process.env.NODE_ENV_IS_DEV)) ? true : false
|
|
294
|
-
;
|
|
295
|
-
try {
|
|
296
|
-
config = new Config().getInstance();
|
|
297
|
-
if (!params.bundle) {
|
|
298
|
-
try {
|
|
299
|
-
//params.bundle = config.bundle;
|
|
300
|
-
//params.param = config.routing[config.reverseRouting[params.param.url]];
|
|
301
|
-
var _rule = config.reverseRouting[params.param.url];
|
|
302
|
-
params = merge(params, config.routing[_rule]);
|
|
303
|
-
params.rule = _rule;
|
|
304
|
-
} catch(reverseRoutingError) {
|
|
305
|
-
serverInstance.throwError(response, 500, reverseRoutingError);
|
|
306
|
-
return;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
bundle = local.bundle = params.bundle;
|
|
310
|
-
env = config.env;
|
|
311
|
-
scope = config.scope;
|
|
312
|
-
conf = config[bundle][env];
|
|
313
|
-
} catch (configErr) {
|
|
314
|
-
serverInstance.throwError(response, 500, new Error('syntax error(s) found in `'+ controllerFile +'` \nTrace: ') + (configErr.stack || configErr.message) );
|
|
315
|
-
return;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
local.cacheless = cacheless;
|
|
319
|
-
local.request = request;
|
|
320
|
-
local.next = next;
|
|
321
|
-
local.conf = conf;
|
|
322
|
-
local.isStandalone = conf.isStandalone;
|
|
323
357
|
|
|
324
358
|
if (cacheless) {
|
|
325
359
|
refreshCoreDependencies();
|
|
@@ -416,14 +450,15 @@ function Router(env, scope) {
|
|
|
416
450
|
rootPath : conf.executionPath || null,
|
|
417
451
|
executionPath : conf.executionPath || null,
|
|
418
452
|
//instance: self.serverInstance,
|
|
419
|
-
isUsingTemplate: local.isUsingTemplate,
|
|
420
|
-
cacheless: cacheless,
|
|
421
|
-
path: params.param.path || null, // user custom path : namespace should be ignored or left blank
|
|
422
|
-
assets: {}
|
|
453
|
+
isUsingTemplate : local.isUsingTemplate,
|
|
454
|
+
cacheless : cacheless,
|
|
455
|
+
path : params.param.path || null, // user custom path : namespace should be ignored or left blank
|
|
456
|
+
assets : {}
|
|
423
457
|
};
|
|
424
458
|
|
|
425
459
|
if (routeHasViews) {
|
|
426
460
|
options.template = (routeHasViews) ? conf.content.templates[templateName] || conf.content.templates._common : undefined;
|
|
461
|
+
options.template.externalPlugins = [];
|
|
427
462
|
}
|
|
428
463
|
|
|
429
464
|
// Options need to be protected by a clone to allow overrides
|
|
@@ -150,25 +150,63 @@ function ServerEngineClass(options) {
|
|
|
150
150
|
|
|
151
151
|
const onPath = function(path, cb, allowAll) {
|
|
152
152
|
|
|
153
|
-
var queryParams
|
|
154
|
-
, i
|
|
155
|
-
, len
|
|
156
|
-
, p
|
|
157
|
-
, arr
|
|
158
|
-
, a
|
|
153
|
+
var queryParams = null
|
|
154
|
+
, i = null
|
|
155
|
+
, len = null
|
|
156
|
+
, p = null
|
|
157
|
+
, arr = null
|
|
158
|
+
, a = null
|
|
159
|
+
, isProxyHost = null
|
|
160
|
+
, requestHost = null
|
|
159
161
|
;
|
|
160
162
|
|
|
161
163
|
// http2stream handle by the Router class & the SuperController class
|
|
162
164
|
// See `${core}/router.js` & `${core}/controller/controller.js`
|
|
163
165
|
|
|
164
166
|
server.on('request', (request, response) => {
|
|
167
|
+
// Proxy detection
|
|
168
|
+
isProxyHost = getContext('isProxyHost') || false;
|
|
169
|
+
requestHost = request.headers.host || request.headers[':authority'];
|
|
170
|
+
if (
|
|
171
|
+
!isProxyHost
|
|
172
|
+
&& !/\:[0-9]+$/.test(requestHost)
|
|
173
|
+
||
|
|
174
|
+
!isProxyHost
|
|
175
|
+
&& request.headers['x-forwarded-host']
|
|
176
|
+
) {
|
|
177
|
+
// Enable proxied mode
|
|
178
|
+
process.gina.PROXY_HOSTNAME = process.gina.PROXY_SCHEME +'://'+ requestHost;
|
|
179
|
+
process.gina.PROXY_HOST = requestHost;
|
|
180
|
+
// For intera services communications - Eg.: Controller::query()
|
|
181
|
+
if (request.headers['x-forwarded-host']) {
|
|
182
|
+
process.gina.PROXY_HOSTNAME = request.headers['x-forwarded-proto'] +'://'+ request.headers['x-forwarded-host'];
|
|
183
|
+
process.gina.PROXY_HOST = request.headers['x-forwarded-host'];
|
|
184
|
+
}
|
|
185
|
+
// Forcing context - also available for workers
|
|
186
|
+
setContext('isProxyHost', true);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// TODO - remove this after k8s test
|
|
190
|
+
// if (
|
|
191
|
+
// // skip internal requests like healthcheck
|
|
192
|
+
// !/^localhost:[0-9]+$/.test(requestHost)
|
|
193
|
+
// && /^true$/.test(isProxyHost)
|
|
194
|
+
// && /\:[0-9]+$/.test(requestHost)
|
|
195
|
+
// && !hostnameRE.test(requestHost)
|
|
196
|
+
// ) {
|
|
197
|
+
// // Restoring non-proxied mode
|
|
198
|
+
// console.debug('[ SERVER ] proxy disabled: '+ process.gina.PROXY_SCHEME +'://'+ requestHost);
|
|
199
|
+
// isProxyHost = false;
|
|
200
|
+
// setContext('isProxyHost', isProxyHost);
|
|
201
|
+
// }
|
|
202
|
+
|
|
165
203
|
// healthcheck
|
|
166
204
|
// TODO - add a top level API : server.api.js (check, get ...)
|
|
167
205
|
// TODO - on 90% RAM usage, redirect to `come back later then restart bundle`
|
|
168
206
|
// TODO - check url against wroot : getContext() ?
|
|
169
207
|
if ( /^get$/i.test(request.method) && /\_gina\/health\/check$/i.test(request.url) ) {
|
|
170
208
|
// server.toApi(reques, response)
|
|
171
|
-
// console.debug('[200] '+ request.url);
|
|
209
|
+
// console.debug('[ SERVER ][200] '+ request.url);
|
|
172
210
|
response.setHeader('content-type', 'application/json; charset=utf8' );
|
|
173
211
|
response.setHeader('x-powered-by', 'Gina/'+ GINA_VERSION );
|
|
174
212
|
return response.end('{"status":"ok"}');
|
|
@@ -178,7 +216,7 @@ function ServerEngineClass(options) {
|
|
|
178
216
|
}
|
|
179
217
|
|
|
180
218
|
if ( /engine.io/.test(request.url)) {
|
|
181
|
-
console.debug('io request');
|
|
219
|
+
console.debug('[ SERVER ] engine.io request');
|
|
182
220
|
}
|
|
183
221
|
|
|
184
222
|
if (/^\*$/.test(path) || path == request.url) {
|
|
@@ -4,7 +4,8 @@ const fs = require('fs');
|
|
|
4
4
|
const os = require('os');
|
|
5
5
|
const path = require('path');
|
|
6
6
|
const EventEmitter = require('events').EventEmitter;
|
|
7
|
-
const Busboy = require('./deps/busboy');
|
|
7
|
+
// const Busboy = require('./deps/busboy-0.2.14');
|
|
8
|
+
const Busboy = require('./deps/busboy-1.6.0');
|
|
8
9
|
const Stream = require('stream');
|
|
9
10
|
const zlib = require('zlib'); // gzip / deflate
|
|
10
11
|
const util = require('util');
|
|
@@ -21,6 +22,8 @@ var merge = lib.merge;
|
|
|
21
22
|
var Proc = lib.Proc;
|
|
22
23
|
var console = lib.logger;
|
|
23
24
|
var SwigFilters = lib.SwigFilters;
|
|
25
|
+
var Domain = lib.Domain;
|
|
26
|
+
var domainLib = new Domain();
|
|
24
27
|
|
|
25
28
|
function Server(options) {
|
|
26
29
|
|
|
@@ -293,6 +296,24 @@ function Server(options) {
|
|
|
293
296
|
|
|
294
297
|
if (failed) {
|
|
295
298
|
if (sslDetails.daysRemaining > -1) {
|
|
299
|
+
var isProxyHost = getContext('isProxyHost');
|
|
300
|
+
if ( /^true$/i.test(isProxyHost) ) {
|
|
301
|
+
console.warn("Host is behind a reverse proxy, skipping server.verifyCertificate(...) ");
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
var rootDomain = domainLib.getRootDomain(endpoint).value;
|
|
305
|
+
hasMatchedEntry = false;
|
|
306
|
+
for (let i in sslDetails.validFor) {
|
|
307
|
+
if ( new RegExp(sslDetails.validFor[i].replace(/^\*\./, '') + '$').test(rootDomain) ) {
|
|
308
|
+
hasMatchedEntry = true;
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
if (!hasMatchedEntry) {
|
|
313
|
+
console.warn(`[Certificate] "${endpoint}" : Root domain not matching your certificate. If you plan to run your service behind a revese proxy, please do not forget to add "proxy.json" at the root of your project while going to production.${'\n'} ${humanView}`);
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
// sslDetails.validFor
|
|
296
317
|
console.emerg(`[Certificate] ${endpoint} : It is like there is a problem with your CA certificate${'\n'} ${humanView}`);
|
|
297
318
|
return;
|
|
298
319
|
}
|
|
@@ -1035,8 +1056,8 @@ function Server(options) {
|
|
|
1035
1056
|
return name
|
|
1036
1057
|
}
|
|
1037
1058
|
|
|
1038
|
-
var env = self.conf.env
|
|
1039
|
-
, scope = self.conf.scope
|
|
1059
|
+
var env = self.conf.env || self.env
|
|
1060
|
+
, scope = self.conf.scope || self.scope
|
|
1040
1061
|
;
|
|
1041
1062
|
|
|
1042
1063
|
for (let i=0, len=matched.length; i<len; ++i) {
|
|
@@ -1054,6 +1075,9 @@ function Server(options) {
|
|
|
1054
1075
|
project = arr[0];
|
|
1055
1076
|
env = (arr[1]) ? arr[1] : env;
|
|
1056
1077
|
}
|
|
1078
|
+
if ( typeof(self.conf[bundle]) == 'undefined' ) {
|
|
1079
|
+
continue;
|
|
1080
|
+
}
|
|
1057
1081
|
scheme = self.conf[bundle][env].server.scheme;
|
|
1058
1082
|
hostname = ( !self.conf[bundle][env].hostname ) ? self.conf[bundle][env].server.scheme + '://' + self.conf[bundle][env].host + ':' + self.conf[bundle][env].server.port : self.conf[bundle][env].hostname;
|
|
1059
1083
|
name = name.replace(oldHost, hostname);
|
|
@@ -1417,7 +1441,6 @@ function Server(options) {
|
|
|
1417
1441
|
var key = pathname.replace(pathname.split('/').splice(-1), '');
|
|
1418
1442
|
for ( ; s < sLen; ++s ) {
|
|
1419
1443
|
if ( bundleConf.staticResources[s] == key ) {
|
|
1420
|
-
// if ( eval('/^' + bundleConf.staticResources[s].replace(/\//g,'\\/') +'/').test(pathname) ) {
|
|
1421
1444
|
filename = bundleConf.content.statics[ bundleConf.staticResources[s] ] +'/'+ pathname.replace(bundleConf.staticResources[s], '');
|
|
1422
1445
|
break;
|
|
1423
1446
|
}
|
|
@@ -2067,11 +2090,14 @@ function Server(options) {
|
|
|
2067
2090
|
'method': 'POST',
|
|
2068
2091
|
'bundle' : self.appName
|
|
2069
2092
|
};
|
|
2070
|
-
var busboy =
|
|
2093
|
+
var busboy = Busboy({ headers: request.headers });
|
|
2071
2094
|
|
|
2072
2095
|
// busboy.on('field', function(fieldname, val, fieldnameTruncated, valTruncated) {
|
|
2073
2096
|
// console.log('Field [' + fieldname + ']: value: ' + inspect(val));
|
|
2074
2097
|
// });
|
|
2098
|
+
|
|
2099
|
+
// Attention: on busboy upgrade, we needs to adapt `busboy/lib/types/multipart.js`
|
|
2100
|
+
// For this, check the emit method
|
|
2075
2101
|
busboy.on('file', function(fieldname, file, filename, encoding, mimetype, group) {
|
|
2076
2102
|
|
|
2077
2103
|
file._dataLen = 0;
|
|
@@ -53,7 +53,7 @@ function SetupClass(req, res, next){
|
|
|
53
53
|
/**
|
|
54
54
|
* Sample of a swig filter to render markdown content
|
|
55
55
|
* To activate this code, you will need :
|
|
56
|
-
* 1) to install `marked` dependency : npm install marked --save
|
|
56
|
+
* 1) to install `marked` dependency : npm install marked@4.0.10 --save
|
|
57
57
|
* 2) uncomment imports on the top of this script
|
|
58
58
|
* 3) uncomment the following filter definition
|
|
59
59
|
*/
|
|
@@ -64,7 +64,7 @@ function SetupClass(req, res, next){
|
|
|
64
64
|
// tables : false,
|
|
65
65
|
// breaks : true, // Enable GFM line breaks. This option requires the gfm option to be true.
|
|
66
66
|
// pedantic : false, // Conform to obscure parts of markdown.pl as much as possible. Don't fix any of the original markdown bugs or poor behavior.
|
|
67
|
-
// // deprecated since version 0.7.0
|
|
67
|
+
// // deprecated since version 0.7.0 - "sanitize-html": "^2.7.0" or DOMPurify
|
|
68
68
|
// // sanitize : false, // Sanitize the output. Ignore any HTML that has been input.
|
|
69
69
|
// smartLists : true, // Use smarter list behavior than the original markdown. May eventually be default with the old behavior moved into pedantic.
|
|
70
70
|
// smartypants : false // Use "smart" typograhic punctuation for things like quotes and dashes.
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"rel" : "stylesheet",
|
|
22
22
|
"type" : "text/css",
|
|
23
23
|
"url" : "/css/vendor/gina/gina.min.css",
|
|
24
|
-
"isCommon" : true
|
|
24
|
+
"isCommon" : true,
|
|
25
|
+
"isExternalPlugin" : false
|
|
25
26
|
}
|
|
26
27
|
],
|
|
27
28
|
"javascriptsDeferEnabled": true, // will place scripts in defer mode in the head by default. If false, will place in the footer
|
|
@@ -30,7 +31,8 @@
|
|
|
30
31
|
"name" : "gina",
|
|
31
32
|
"type" : "text/javascript",
|
|
32
33
|
"url" : "/js/vendor/gina/gina.min.js",
|
|
33
|
-
"isCommon" : true
|
|
34
|
+
"isCommon" : true,
|
|
35
|
+
"isExternalPlugin" : false
|
|
34
36
|
}
|
|
35
37
|
]
|
|
36
38
|
}
|
|
@@ -326,17 +326,22 @@ function ContextHelper(contexts) {
|
|
|
326
326
|
, confPath = null
|
|
327
327
|
;
|
|
328
328
|
|
|
329
|
-
if ( typeof(ctxFilename) != 'undefined'
|
|
330
|
-
|
|
331
|
-
if (
|
|
332
|
-
ctx
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
329
|
+
if ( typeof(ctxFilename) != 'undefined' ) {
|
|
330
|
+
var ctxFileObj = new _(ctxFilename, true);
|
|
331
|
+
if ( ctxFileObj.existsSync() ) {
|
|
332
|
+
ctx = JSON.parse(fs.readFileSync(_(ctxFilename, true)));
|
|
333
|
+
if (!ctx.gina) {
|
|
334
|
+
ctx.gina = {
|
|
335
|
+
Config : require('./../core/config')
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
ctx.gina.config = merge(ctx.config, ctx.gina.Config);
|
|
339
|
+
}
|
|
340
|
+
for (let name in ctx) {
|
|
341
|
+
setContext(name, ctx[name], false)
|
|
342
|
+
}
|
|
343
|
+
} else {
|
|
344
|
+
ctx = self.contexts
|
|
340
345
|
}
|
|
341
346
|
|
|
342
347
|
} else {
|
|
@@ -423,7 +423,9 @@ function PathHelper() {
|
|
|
423
423
|
fs.mkdirSync(path, permission);
|
|
424
424
|
mkdirSync(self, permission, pathArr, i, path)
|
|
425
425
|
} catch (err) {
|
|
426
|
-
console.debug
|
|
426
|
+
if ( typeof(console.debug) != 'undefined' ) {
|
|
427
|
+
console.debug(err.stack); // always keep trace of the original stack
|
|
428
|
+
}
|
|
427
429
|
throw new Error(err.message)
|
|
428
430
|
}
|
|
429
431
|
};
|
|
@@ -479,7 +481,7 @@ function PathHelper() {
|
|
|
479
481
|
if (p == path && typeof(callback) != 'undefined' && typeof(self.created) == 'undefined' ) {
|
|
480
482
|
if (typeof(callback) != 'undefined') {
|
|
481
483
|
callback(err, path)
|
|
482
|
-
} else {
|
|
484
|
+
} else if ( typeof(console.debug) != 'undefined' ) {
|
|
483
485
|
console.debug("no callback defined for mkdir ", path)
|
|
484
486
|
}
|
|
485
487
|
}
|
|
@@ -881,7 +883,9 @@ function PathHelper() {
|
|
|
881
883
|
if (err) {
|
|
882
884
|
console.error(err.stack)
|
|
883
885
|
}
|
|
884
|
-
console.debug
|
|
886
|
+
if ( typeof(console.debug) != 'undefined' ) {
|
|
887
|
+
console.debug('cp() completed copy to: ', method);
|
|
888
|
+
}
|
|
885
889
|
callback(err, destination, method)
|
|
886
890
|
})
|
|
887
891
|
}
|
|
@@ -1163,10 +1167,14 @@ function PathHelper() {
|
|
|
1163
1167
|
}
|
|
1164
1168
|
|
|
1165
1169
|
var mv = function(self, target) {
|
|
1166
|
-
console.debug
|
|
1170
|
+
if ( typeof(console.debug) != 'undefined' ) {
|
|
1171
|
+
console.debug("starting mv/copy from ", self.value, " to ", target);
|
|
1172
|
+
}
|
|
1167
1173
|
cp(self.value, target)
|
|
1168
1174
|
.onComplete(function onCpMv(err) {
|
|
1169
|
-
console.debug
|
|
1175
|
+
if ( typeof(console.debug) != 'undefined' ) {
|
|
1176
|
+
console.debug("cp done... now unlinking source ", self.value);
|
|
1177
|
+
}
|
|
1170
1178
|
if (err) {
|
|
1171
1179
|
e.emit('mv#complete', err);
|
|
1172
1180
|
return;
|
|
@@ -1174,7 +1182,9 @@ function PathHelper() {
|
|
|
1174
1182
|
|
|
1175
1183
|
|
|
1176
1184
|
rm(self.value).onComplete( function(err, path){
|
|
1177
|
-
console.debug
|
|
1185
|
+
if ( typeof(console.debug) != 'undefined' ) {
|
|
1186
|
+
console.debug('rm() complete');
|
|
1187
|
+
}
|
|
1178
1188
|
e.emit('mv#complete', err, path)
|
|
1179
1189
|
})
|
|
1180
1190
|
})
|
|
@@ -1237,7 +1247,9 @@ function PathHelper() {
|
|
|
1237
1247
|
++l;
|
|
1238
1248
|
removeFoldersSync(list, l, i)
|
|
1239
1249
|
} catch(err) {
|
|
1240
|
-
console.debug
|
|
1250
|
+
if ( typeof(console.debug) != 'undefined' ) {
|
|
1251
|
+
console.debug(err.stack); // always keep trace of the original stack
|
|
1252
|
+
}
|
|
1241
1253
|
throw new Error(err.message)
|
|
1242
1254
|
}
|
|
1243
1255
|
} else {
|
|
@@ -1246,7 +1258,9 @@ function PathHelper() {
|
|
|
1246
1258
|
fs.rmdirSync(list[l][i]);
|
|
1247
1259
|
removeFoldersSync(list, l, i)
|
|
1248
1260
|
} catch(err) {
|
|
1249
|
-
console.debug
|
|
1261
|
+
if ( typeof(console.debug) != 'undefined' ) {
|
|
1262
|
+
console.debug(err.stack); // always keep trace of the original stack
|
|
1263
|
+
}
|
|
1250
1264
|
throw new Error(err.message)
|
|
1251
1265
|
}
|
|
1252
1266
|
}
|
|
@@ -1257,7 +1271,9 @@ function PathHelper() {
|
|
|
1257
1271
|
try {
|
|
1258
1272
|
fs.unlinkSync(filename)
|
|
1259
1273
|
} catch (err) {
|
|
1260
|
-
console.debug
|
|
1274
|
+
if ( typeof(console.debug) != 'undefined' ) {
|
|
1275
|
+
console.debug(err.stack); // always keep trace of the original stack
|
|
1276
|
+
}
|
|
1261
1277
|
throw new Error(err.message)
|
|
1262
1278
|
}
|
|
1263
1279
|
}
|
|
@@ -368,7 +368,8 @@ function Add(opt, cmd) {
|
|
|
368
368
|
content[local.bundle] = {}
|
|
369
369
|
}
|
|
370
370
|
content[local.bundle][ self.envs[e] ] = {
|
|
371
|
-
"
|
|
371
|
+
"host_if_dns_resolution" : "{rootDomain}",
|
|
372
|
+
"host" : "localhost"
|
|
372
373
|
};
|
|
373
374
|
|
|
374
375
|
}
|
|
@@ -84,7 +84,7 @@ function Start(opt, cmd) {
|
|
|
84
84
|
var projectArchFile = projectArchFileObj.toString();
|
|
85
85
|
var projectPlatformFileObj = new _(gnaPath +'/platform', true);
|
|
86
86
|
var projectPlatformFile = projectPlatformFileObj.toString();
|
|
87
|
-
var nodeModulesContentArr = ( nodeModulesPathObj.existsSync() ) ? fs.readdirSync(nodeModulesPathObj.toString()) : [];
|
|
87
|
+
var nodeModulesContentArr = ( nodeModulesPathObj.existsSync() && !nodeModulesPathObj.isSymlinkSync() ) ? fs.readdirSync(nodeModulesPathObj.toString()) : [];
|
|
88
88
|
var newNodeModulesContentArr = [], n = 0;
|
|
89
89
|
for (let f in nodeModulesContentArr) {
|
|
90
90
|
if (/^\./.test(nodeModulesContentArr[f]) ) {
|
|
@@ -96,19 +96,23 @@ function Start(opt, cmd) {
|
|
|
96
96
|
newNodeModulesContentArr = null;
|
|
97
97
|
|
|
98
98
|
var pack = requireJSON(packagePath);
|
|
99
|
+
var scope = process.env.NODE_SCOPE || self.defaultScope;
|
|
99
100
|
|
|
100
101
|
if (
|
|
101
102
|
!projectArchFileObj.existsSync()
|
|
102
103
|
||
|
|
103
104
|
!projectPlatformFileObj.existsSync()
|
|
104
105
|
||
|
|
105
|
-
projectArchFileObj.existsSync()
|
|
106
|
+
projectArchFileObj.existsSync()
|
|
107
|
+
&& fs.readFileSync(projectArchFile).toString() != currentArch
|
|
106
108
|
||
|
|
107
|
-
projectPlatformFileObj.existsSync()
|
|
109
|
+
projectPlatformFileObj.existsSync()
|
|
110
|
+
&& fs.readFileSync(projectPlatformFile).toString() != currentPlatform
|
|
108
111
|
||
|
|
109
112
|
!nodeModulesPathObj.existsSync()
|
|
110
113
|
||
|
|
111
114
|
nodeModulesPathObj.existsSync()
|
|
115
|
+
&& !nodeModulesPathObj.isSymlinkSync()
|
|
112
116
|
&& !nodeModulesContentArr.length
|
|
113
117
|
||
|
|
114
118
|
nodeModulesPathObj.existsSync()
|
|
@@ -117,9 +121,11 @@ function Start(opt, cmd) {
|
|
|
117
121
|
&& typeof(pack.dependencies) != 'object'
|
|
118
122
|
&& pack.dependencies.count() > 0
|
|
119
123
|
) {
|
|
120
|
-
|
|
124
|
+
if (scope == "local")
|
|
125
|
+
isNodeModulesReinstallNeeded = true;
|
|
121
126
|
}
|
|
122
127
|
|
|
128
|
+
opt.client.write('\nScope: '+ scope);
|
|
123
129
|
opt.client.write('\nArch: '+ currentArch);
|
|
124
130
|
// opt.client.write('\nprojectArchFile: '+ projectArchFile);
|
|
125
131
|
opt.client.write('\nPlatform: '+ currentPlatform);
|
|
@@ -293,9 +299,12 @@ function Start(opt, cmd) {
|
|
|
293
299
|
params = [
|
|
294
300
|
// node arguments will be passed by gina
|
|
295
301
|
appPath,
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
302
|
+
//Passing context to child.
|
|
303
|
+
JSON.stringify(getContext()),
|
|
304
|
+
// project name
|
|
305
|
+
self.projectName,
|
|
306
|
+
// bundle name
|
|
307
|
+
bundle
|
|
299
308
|
];
|
|
300
309
|
|
|
301
310
|
// injecting node arguments
|
|
@@ -314,6 +323,7 @@ function Start(opt, cmd) {
|
|
|
314
323
|
}
|
|
315
324
|
}
|
|
316
325
|
|
|
326
|
+
// terminal.debug('Spawning '+ opt.argv[0] +' [with args] '+ params);
|
|
317
327
|
var child = spawn(opt.argv[0], params,
|
|
318
328
|
{
|
|
319
329
|
// cwd: bundleDir,
|
|
@@ -401,6 +411,7 @@ function Start(opt, cmd) {
|
|
|
401
411
|
|
|
402
412
|
// Expecting 2 flags (checkCaseCount) to free the child stdout !!
|
|
403
413
|
// terminal.debug('BO case count '+ checkCaseCount);
|
|
414
|
+
// terminal.log('[debug] ', data);
|
|
404
415
|
var _matched = data.match(checkCaseRe);
|
|
405
416
|
if ( _matched ) {
|
|
406
417
|
// terminal.warn('case count: '+ checkCaseCount +'\nMatched: '+ _matched.length + '\n'+ checkCaseRe +'\n-> '+ data + '<-\n');
|
|
@@ -605,7 +616,9 @@ function Start(opt, cmd) {
|
|
|
605
616
|
}
|
|
606
617
|
|
|
607
618
|
//Checking root.
|
|
608
|
-
|
|
619
|
+
var dExists = new _(d, true).existsSync();
|
|
620
|
+
terminal.debug('[Checking bundle bootstrap] `'+ d +'`: '+ dExists);
|
|
621
|
+
if ( dExists ) {
|
|
609
622
|
//checking bundle directory.
|
|
610
623
|
fs.stat(p, function(err, stats) {
|
|
611
624
|
if (err) {
|
|
@@ -21,7 +21,7 @@ function Build(opt, cmd){
|
|
|
21
21
|
var self = {};
|
|
22
22
|
|
|
23
23
|
var init = function(opt, cmd) {
|
|
24
|
-
console.
|
|
24
|
+
console.log('Building framework, please wait ...');
|
|
25
25
|
|
|
26
26
|
// import CMD helpers
|
|
27
27
|
new CmdHelper(self, opt.client, { port: opt.debugPort, brkEnabled: opt.debugBrkEnabled });
|
|
@@ -291,6 +291,20 @@ function Initialize(opt) {
|
|
|
291
291
|
self.checkArch = function(done) {
|
|
292
292
|
|
|
293
293
|
var currentArch = process.arch;
|
|
294
|
+
switch (process.arch) {
|
|
295
|
+
case 'x64':
|
|
296
|
+
currentArch = 'amd64'
|
|
297
|
+
break;
|
|
298
|
+
case 'armv7l':
|
|
299
|
+
currentArch = 'armhf'
|
|
300
|
+
break;
|
|
301
|
+
case 'x86':
|
|
302
|
+
currentArch = 'i386'
|
|
303
|
+
break;
|
|
304
|
+
default:
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
|
|
294
308
|
var currentPlatform = process.platform;
|
|
295
309
|
// ignored for framework:set
|
|
296
310
|
var mainConfig = require( self.opt.homedir + '/main.json' );
|
|
@@ -493,6 +507,10 @@ function Initialize(opt) {
|
|
|
493
507
|
* make sure to complete : self.checkIfMain()
|
|
494
508
|
*/
|
|
495
509
|
|
|
510
|
+
// Check GINA_HOST_V4 for changes in case of k8s environement
|
|
511
|
+
// Get current host IP, compare with getEnvVar('GINA_HOST_V4')
|
|
512
|
+
// IF changed: setEnvVar('GINA_HOST_V4', new_host_v4)
|
|
513
|
+
|
|
496
514
|
var dic = {
|
|
497
515
|
'prefix' : prefix,
|
|
498
516
|
'global_mode': globalMode,
|
|
@@ -83,15 +83,14 @@ var console = lib.logger;
|
|
|
83
83
|
sourceObj.mkdirSync()
|
|
84
84
|
}
|
|
85
85
|
// link from homdir to project path
|
|
86
|
-
|
|
87
86
|
var destination = _(self.projectLocation + '/node_modules', true);
|
|
88
|
-
|
|
87
|
+
console.debug('[ FRAMEWORK ][ link-node-modules ] Linking ['+ sourceObj.toString() +'] to [ '+ destination +' ] ');
|
|
89
88
|
err = sourceObj.symlinkSync(destination);
|
|
90
89
|
if (err instanceof Error) {
|
|
91
90
|
return end(err, 'error')
|
|
92
91
|
}
|
|
93
92
|
|
|
94
|
-
return end('Node modules link updated to '+ sourceObj.toString())
|
|
93
|
+
return end('Node modules link updated from ['+ sourceObj.toString() +'] to ['+ sourceObj.toString() +']');
|
|
95
94
|
}
|
|
96
95
|
|
|
97
96
|
// nothing to do
|
|
@@ -103,6 +103,7 @@ var console = lib.logger;
|
|
|
103
103
|
return end(err, 'error');
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
console.debug('[ FRAMEWORK ][ link ] Linking ['+ source.toString() +'] to [ '+ destination.toString() +' ] ');
|
|
106
107
|
err = source.symlinkSync(destination.toString());
|
|
107
108
|
|
|
108
109
|
if (err instanceof Error) {
|