gina 0.1.6-alpha.15 → 0.1.6-alpha.150
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/LICENSE +1 -1
- package/README-4Contributors.md +14 -8
- package/README.md +13 -4
- package/bin/cli +16 -2
- package/bin/gina +29 -1
- package/framework/{v0.1.6-alpha.15/lib/inherits → v0.1.6-alpha.150}/LICENSE +1 -1
- package/framework/v0.1.6-alpha.150/VERSION +1 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/asset/plugin/README.md +1 -0
- package/framework/v0.1.6-alpha.150/core/asset/plugin/dist/vendor/gina/css/gina.min.css.br +0 -0
- package/framework/v0.1.6-alpha.150/core/asset/plugin/dist/vendor/gina/css/gina.min.css.gz +0 -0
- package/framework/v0.1.6-alpha.150/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +1 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/asset/plugin/dist/vendor/gina/html/toolbar.html +1 -1
- package/framework/v0.1.6-alpha.150/core/asset/plugin/dist/vendor/gina/html/toolbar.html.br +0 -0
- package/framework/v0.1.6-alpha.150/core/asset/plugin/dist/vendor/gina/html/toolbar.html.gz +0 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/asset/plugin/dist/vendor/gina/js/gina.js +6403 -5609
- package/framework/v0.1.6-alpha.150/core/asset/plugin/dist/vendor/gina/js/gina.min.js +789 -0
- package/framework/v0.1.6-alpha.150/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
- package/framework/v0.1.6-alpha.150/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
- package/framework/v0.1.6-alpha.150/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +8 -0
- package/framework/v0.1.6-alpha.150/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +9 -0
- package/framework/v0.1.6-alpha.150/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.br +0 -0
- package/framework/v0.1.6-alpha.150/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.gz +0 -0
- package/framework/v0.1.6-alpha.150/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.map +8 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/config.js +167 -76
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/connectors/couchbase/index.js +108 -26
- package/framework/{v0.1.6-alpha.15/core/connectors/couchbase/lib/connector.v4.js → v0.1.6-alpha.150/core/connectors/couchbase/lib/connector.v3.js} +170 -69
- package/framework/v0.1.6-alpha.150/core/connectors/couchbase/lib/connector.v4.js +470 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/connectors/couchbase/lib/session-store.v4.js +5 -2
- package/framework/v0.1.6-alpha.150/core/content.encoding +9 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/controller/controller.js +861 -1185
- package/framework/v0.1.6-alpha.150/core/controller/controller.renderSwig.js +1022 -0
- package/framework/v0.1.6-alpha.150/core/controller/controller.renderv1.js +911 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/controller/index.js +2 -2
- package/framework/v0.1.6-alpha.150/core/deps/busboy-1.6.0/.github/workflows/ci.yml +24 -0
- package/framework/v0.1.6-alpha.150/core/deps/busboy-1.6.0/.github/workflows/lint.yml +23 -0
- package/framework/v0.1.6-alpha.150/core/deps/busboy-1.6.0/README.md +191 -0
- package/framework/v0.1.6-alpha.150/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-big.js +149 -0
- package/framework/v0.1.6-alpha.150/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-small.js +143 -0
- package/framework/v0.1.6-alpha.150/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-big.js +154 -0
- package/framework/v0.1.6-alpha.150/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-small.js +148 -0
- package/framework/v0.1.6-alpha.150/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-100pairs-small.js +101 -0
- package/framework/v0.1.6-alpha.150/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-900pairs-small-alt.js +84 -0
- package/framework/v0.1.6-alpha.150/core/deps/busboy-1.6.0/lib/index.js +57 -0
- package/framework/v0.1.6-alpha.150/core/deps/busboy-1.6.0/lib/types/multipart.js +680 -0
- package/framework/v0.1.6-alpha.150/core/deps/busboy-1.6.0/lib/types/urlencoded.js +350 -0
- package/framework/v0.1.6-alpha.150/core/deps/busboy-1.6.0/lib/utils.js +596 -0
- package/framework/v0.1.6-alpha.150/core/deps/busboy-1.6.0/package.json +22 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/.travis.yml +4 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/LICENSE +21 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/example/bool.js +10 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/example/boolean_double.js +7 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/example/boolean_single.js +7 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/example/default_hash.js +8 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/example/default_singles.js +7 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/example/divide.js +8 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/example/line_count.js +20 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/example/line_count_options.js +29 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/example/line_count_wrap.js +29 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/example/nonopt.js +4 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/example/reflect.js +2 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/example/short.js +3 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/example/string.js +11 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/example/usage-options.js +19 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/example/xup.js +10 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/index.js +343 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/package.json +31 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/package.json.dist +39 -0
- package/framework/v0.1.6-alpha.150/core/deps/optimist-0.6.1/readme.markdown +513 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/HISTORY.md +498 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/LICENSE +7 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/README.md +88 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/bin/swig.js +161 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/bin/swig.js.dist +161 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/dist/swig.min.js +7 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/dist/swig.min.js.map +8 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/index.js +1 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/dateformatter.js +198 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/filters.js +630 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/lexer.js +306 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/loaders/filesystem.js +59 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/loaders/index.js +53 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/loaders/memory.js +63 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/parser.js +744 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/swig.js +740 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/autoescape.js +37 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/block.js +25 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/else.js +25 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/elseif.js +28 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/extends.js +19 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/filter.js +68 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/for.js +130 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/if.js +86 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/import.js +91 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/include.js +100 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/index.js +16 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/macro.js +79 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/parent.js +51 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/raw.js +23 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/set.js +109 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/tags/spaceless.js +42 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/lib/utils.js +184 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/package.json +57 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-1.4.2/package.json.dist +61 -0
- package/framework/v0.1.6-alpha.150/core/deps/swig-client/swig.js +5031 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/dev/index.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/dev/lib/factory.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/gna.js +123 -23
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/locales/index.js +3 -3
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/locales/src/make.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/mime.types +1 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/model/entity.js +5 -5
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/model/index.js +30 -26
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/model/template/entityFactory.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/model/template/index.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/index.js +3 -3
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/file/package.json +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/intl/package.json +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/storage/package.json +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/validator/package.json +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/validator/src/form-validator.js +39 -27
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/validator/src/main.js +496 -119
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/router.js +92 -47
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/server.isaac.js +329 -43
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/server.js +433 -159
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/status.codes +1 -11
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle/controllers/setup.js +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/command/gina.tpl +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/conf/env.json +20 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/conf/settings.json +4 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/conf/templates.json +4 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/console.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/context.js +30 -13
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/data/package.json +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/data/src/main.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/dateFormat.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/index.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/json/package.json +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/json/src/main.js +7 -4
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/path.js +32 -16
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/plugins/package.json +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/plugins/src/api-error.js +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/plugins/src/main.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/prototypes.js +8 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/task.js +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/text.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/archiver/package.json +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/archiver/src/main.js +11 -11
- package/framework/v0.1.6-alpha.150/lib/cache/package.json +20 -0
- package/framework/v0.1.6-alpha.150/lib/cache/src/main.js +160 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/bundle/add.js +2 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/bundle/restart.js +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/bundle/start.js +26 -11
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/env/get.js +1 -1
- package/framework/v0.1.6-alpha.150/lib/cmd/env/help.js +30 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/env/set.js +21 -0
- package/framework/v0.1.6-alpha.150/lib/cmd/framework/arguments.json +7 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/build.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/dot.js +21 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/init.js +19 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/link-node-modules.js +2 -3
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/link.js +3 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/restart.js +3 -3
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/start.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/tail.js +29 -12
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/version.js +15 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/helper.js +44 -15
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/index.js +1 -1
- package/framework/v0.1.6-alpha.150/lib/cmd/minion/help.txt +18 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/port/reset.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/project/add.js +7 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/project/arguments.json +1 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/project/build.js +32 -7
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/project/help.txt +4 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/project/list.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/protocol/list.js +71 -50
- package/framework/v0.1.6-alpha.150/lib/collection/README.md +5 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/collection/package.json +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/collection/src/main.js +21 -14
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/config.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cron/package.json +2 -2
- package/framework/v0.1.6-alpha.150/lib/domain/dist/2025-03-14_13-41-20_UTC.dat +15754 -0
- package/framework/v0.1.6-alpha.150/lib/domain/dist/public_suffix_list.dat +15754 -0
- package/framework/v0.1.6-alpha.150/lib/domain/dist/public_suffix_list.dat.br +0 -0
- package/framework/v0.1.6-alpha.150/lib/domain/dist/public_suffix_list.dat.gz +0 -0
- package/framework/v0.1.6-alpha.150/lib/domain/exemples/backend.js +12 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/domain/package.json +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/domain/src/main.js +75 -13
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/generator/index.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/index.js +3 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150/lib/inherits}/LICENSE +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/inherits/package.json +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/inherits/src/main.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/logger/package.json +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/logger/src/containers/file/index.js +2 -0
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/logger/src/containers/mq/listener.js +10 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/logger/src/helper.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/logger/src/main.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/math/index.js +1 -1
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/merge/package.json +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/model.js +3 -3
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/proc.js +10 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/routing/package.json +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/routing/src/main.js +201 -35
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/session-store.js +3 -3
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/shell.js +7 -6
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/swig-filters/package.json +2 -2
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/swig-filters/src/main.js +100 -17
- package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/validator.js +2 -2
- package/framework/v0.1.6-alpha.150/package.json +11 -0
- package/package.json +3 -3
- package/resources/package.json.template +1 -1
- package/script/post_install.js +4 -4
- package/script/pre_install.js +3 -3
- package/utils/helper.js +38 -14
- package/framework/v0.1.6-alpha.15/VERSION +0 -1
- package/framework/v0.1.6-alpha.15/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +0 -1
- package/framework/v0.1.6-alpha.15/core/asset/plugin/dist/vendor/gina/js/gina.min.js +0 -766
- package/framework/v0.1.6-alpha.15/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +0 -8
- package/framework/v0.1.6-alpha.15/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -7
- package/framework/v0.1.6-alpha.15/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.map +0 -8
- package/framework/v0.1.6-alpha.15/core/connectors/couchbase/lib/connector.v3.js +0 -432
- package/framework/v0.1.6-alpha.15/core/deps/busboy/.travis.yml +0 -17
- package/framework/v0.1.6-alpha.15/core/deps/busboy/README.md +0 -225
- package/framework/v0.1.6-alpha.15/core/deps/busboy/deps/encoding/encoding-indexes.js +0 -73
- package/framework/v0.1.6-alpha.15/core/deps/busboy/deps/encoding/encoding.js +0 -2391
- package/framework/v0.1.6-alpha.15/core/deps/busboy/lib/main.js +0 -89
- package/framework/v0.1.6-alpha.15/core/deps/busboy/lib/types/multipart.js +0 -328
- package/framework/v0.1.6-alpha.15/core/deps/busboy/lib/types/urlencoded.js +0 -214
- package/framework/v0.1.6-alpha.15/core/deps/busboy/lib/utils.js +0 -191
- package/framework/v0.1.6-alpha.15/core/deps/busboy/package.json +0 -69
- package/framework/v0.1.6-alpha.15/lib/domain/dist/public_suffix_list.dat +0 -14186
- package/framework/v0.1.6-alpha.15/package.json +0 -14
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/AUTHORS +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/asset/html/nolayout.html +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/asset/html/static.html +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/asset/img/android-chrome-192x192.png +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/asset/img/android-chrome-512x512.png +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/asset/img/apple-touch-icon.png +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/asset/img/favicon-16x16.png +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/asset/img/favicon-32x32.png +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/asset/img/favicon.ico +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/asset/plugin/uuid.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/connectors/couchbase/lib/connector.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/connectors/couchbase/lib/connector.v2.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/connectors/couchbase/lib/n1ql.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/connectors/couchbase/lib/session-store.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/controller/controller.framework.js +0 -0
- /package/framework/{v0.1.6-alpha.15/core/deps/busboy → v0.1.6-alpha.150/core/deps/busboy-1.6.0}/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/deps/swig-client/swig-2.0.0.min.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/dev/lib/class.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/dev/lib/tools.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/locales/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/locales/currency.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/locales/dist/language/en.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/locales/dist/language/fr.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/locales/dist/region/en.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/locales/dist/region/fr.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/locales/src/resources/currency.csv +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/locales/src/resources/region.csv +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/locales/src/resources/region.mapping.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/file/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/file/build.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/intl/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/intl/build.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/intl/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/storage/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/storage/build.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/storage/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/validator/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/plugins/lib/validator/build.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/server.express.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/_gitignore +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle/config/app.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle/config/routing.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle/config/settings.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle/config/templates.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle/index.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle_public/css/default.css +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle_public/readme.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/command/gina.bat.tpl +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/conf/manifest.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/conf/package.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/conf/statics.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/error/client/json/401.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/error/client/json/403.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/error/client/json/404.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/error/server/html/50x.html +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/error/server/json/500.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/error/server/json/503.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/core/template/extensions/logger/config.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/data/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/data/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/json/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/json/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/helpers/plugins/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/archiver/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/archiver/build.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/archiver/src/dep/jszip.min.js +0 -0
- /package/framework/{v0.1.6-alpha.15/lib/collection → v0.1.6-alpha.150/lib/cache}/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15/lib/collection → v0.1.6-alpha.150/lib/cache}/build.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/aliases.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/bundle/arguments.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/bundle/copy.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/bundle/cp.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/bundle/help.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/bundle/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/bundle/list.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/bundle/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/bundle/rename.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/bundle/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/bundle/status.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/bundle/stop.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/env/add.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/env/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/env/link-dev.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/env/list.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/env/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/env/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/env/unset.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/env/use.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/get.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/help.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/msg.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/open.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/set.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/status.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/stop.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/framework/update.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/gina-dev.1.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/gina-framework.1.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/gina.1.md +0 -0
- /package/framework/{v0.1.6-alpha.15/lib/cmd/env → v0.1.6-alpha.150/lib/cmd/minion}/help.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/msg.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/port/help.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/port/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/port/inc/scan.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/port/list.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/port/set.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/project/help.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/project/import.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/project/move.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/project/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/project/rename.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/project/restart.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/project/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/project/start.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/project/status.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/project/stop.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/protocol/help.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/protocol/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/protocol/set.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/scope/add.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/scope/help.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/scope/help.txt +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/scope/link-local.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/scope/link-production.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/scope/list.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/scope/remove.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/scope/rm.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/scope/use.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cmd/view/add.js +0 -0
- /package/framework/{v0.1.6-alpha.15/lib/routing → v0.1.6-alpha.150/lib/collection}/build.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cron/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/cron/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/domain/LICENSE +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/domain/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/domain/exemples/frontend.html +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/inherits/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/inherits/example/inheriting_eventemitter.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/inherits/example/protected_inheritance.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/inherits/example/simple_inheritance.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/inherits/example/super_attribute_overridden_by_child_on_init.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/logger/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/logger/src/containers/default/index.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/logger/src/containers/mq/index.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/logger/src/containers/mq/speaker.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/merge/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/merge/example/merge.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/merge/example/merge_2_literal objects.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/merge/example/merge_and_preserve_first.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/merge/src/main.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/routing/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15/lib/domain/exemples/backend.js → v0.1.6-alpha.150/lib/routing/build.json} +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/swig-filters/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/url/README.md +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/url/index.js +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/url/mocks.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/url/routing.json +0 -0
- /package/framework/{v0.1.6-alpha.15 → v0.1.6-alpha.150}/lib/url/test.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//"use strict";
|
|
2
2
|
/*
|
|
3
3
|
* This file is part of the gina package.
|
|
4
|
-
* Copyright (c) 2009-
|
|
4
|
+
* Copyright (c) 2009-2025 Rhinostone <contact@gina.io>
|
|
5
5
|
*
|
|
6
6
|
* For the full copyright and license information, please view the LICENSE
|
|
7
7
|
* file that was distributed with this source code.
|
|
@@ -94,6 +94,13 @@ function Router(env, scope) {
|
|
|
94
94
|
return self.serverInstance;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Check if env is running cacheless
|
|
99
|
+
* */
|
|
100
|
+
this.isCacheless = function() {
|
|
101
|
+
return (/^true$/i.test(process.env.NODE_ENV_IS_DEV)) ? true : false
|
|
102
|
+
}
|
|
103
|
+
|
|
97
104
|
|
|
98
105
|
/**
|
|
99
106
|
* Route on the fly
|
|
@@ -118,6 +125,73 @@ function Router(env, scope) {
|
|
|
118
125
|
// }
|
|
119
126
|
// return ;
|
|
120
127
|
|
|
128
|
+
|
|
129
|
+
var serverInstance = self.getServerInstance();
|
|
130
|
+
var config = null
|
|
131
|
+
, conf = null
|
|
132
|
+
, bundle = null
|
|
133
|
+
, env = null
|
|
134
|
+
, scope = null
|
|
135
|
+
, isCacheless = self.isCacheless()
|
|
136
|
+
;
|
|
137
|
+
try {
|
|
138
|
+
config = new Config().getInstance();
|
|
139
|
+
if (!params.bundle) {
|
|
140
|
+
try {
|
|
141
|
+
//params.bundle = config.bundle;
|
|
142
|
+
//params.param = config.routing[config.reverseRouting[params.param.url]];
|
|
143
|
+
var _rule = config.reverseRouting[params.param.url];
|
|
144
|
+
params = merge(params, config.routing[_rule]);
|
|
145
|
+
params.rule = _rule;
|
|
146
|
+
} catch(reverseRoutingError) {
|
|
147
|
+
serverInstance.throwError(response, 500, reverseRoutingError);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
bundle = local.bundle = params.bundle;
|
|
152
|
+
env = config.env;
|
|
153
|
+
scope = config.scope;
|
|
154
|
+
conf = config[bundle][env];
|
|
155
|
+
} catch (configErr) {
|
|
156
|
+
serverInstance.throwError(response, 500, new Error('syntax error(s) found in `'+ controllerFile +'` \nTrace: ') + (configErr.stack || configErr.message) );
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
local.isCacheless = isCacheless;
|
|
161
|
+
local.request = request;
|
|
162
|
+
local.next = next;
|
|
163
|
+
local.conf = conf;
|
|
164
|
+
local.isStandalone = conf.isStandalone;
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Reverse proxy check
|
|
169
|
+
*/
|
|
170
|
+
var requestPort = request.headers.port || request.headers[':port'];
|
|
171
|
+
var isProxyHost = (
|
|
172
|
+
typeof(request.headers.host) != 'undefined'
|
|
173
|
+
&& typeof(requestPort) != 'undefined'
|
|
174
|
+
&& /^(80|443)$/.test(requestPort)
|
|
175
|
+
&& conf.server.scheme +'://'+ request.headers.host +':'+ requestPort != conf.hostname.replace(/\:\d+$/, '') +':'+ conf.server.port
|
|
176
|
+
||
|
|
177
|
+
typeof(request.headers[':authority']) != 'undefined'
|
|
178
|
+
&& conf.server.scheme +'://'+ request.headers[':authority'] != conf.hostname
|
|
179
|
+
||
|
|
180
|
+
typeof(request.headers.host) != 'undefined'
|
|
181
|
+
&& typeof(requestPort) != 'undefined'
|
|
182
|
+
&& /^(80|443)$/.test(requestPort)
|
|
183
|
+
&& request.headers.host == conf.host
|
|
184
|
+
||
|
|
185
|
+
typeof(request.headers['x-nginx-proxy']) != 'undefined'
|
|
186
|
+
&& /^true$/i.test(request.headers['x-nginx-proxy'])
|
|
187
|
+
||
|
|
188
|
+
typeof(process.gina.PROXY_HOSTNAME) != 'undefined'
|
|
189
|
+
) ? true : false;
|
|
190
|
+
|
|
191
|
+
setContext('isProxyHost', isProxyHost);
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
121
195
|
/**
|
|
122
196
|
* ExpressJS modules + HTTP2 fix
|
|
123
197
|
* Hack required until `express-<plugin>` get support for http2 `express-session`
|
|
@@ -140,6 +214,9 @@ function Router(env, scope) {
|
|
|
140
214
|
||
|
|
141
215
|
typeof(request.session) != 'undefined'
|
|
142
216
|
&& typeof(request.isAuthenticated) == 'undefined'
|
|
217
|
+
||
|
|
218
|
+
typeof(request.session) != 'undefined'
|
|
219
|
+
&& typeof(request.session.passport) != 'undefined'
|
|
143
220
|
) {
|
|
144
221
|
request.isAuthenticated = function() {
|
|
145
222
|
var property = 'user';
|
|
@@ -284,44 +361,8 @@ function Router(env, scope) {
|
|
|
284
361
|
* EO Passport JS HTTP2 fix
|
|
285
362
|
*/
|
|
286
363
|
|
|
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
364
|
|
|
324
|
-
if (
|
|
365
|
+
if (isCacheless) {
|
|
325
366
|
refreshCoreDependencies();
|
|
326
367
|
}
|
|
327
368
|
|
|
@@ -416,14 +457,18 @@ function Router(env, scope) {
|
|
|
416
457
|
rootPath : conf.executionPath || null,
|
|
417
458
|
executionPath : conf.executionPath || null,
|
|
418
459
|
//instance: self.serverInstance,
|
|
419
|
-
isUsingTemplate: local.isUsingTemplate,
|
|
420
|
-
|
|
421
|
-
path: params.param.path || null, // user custom path : namespace should be ignored or left blank
|
|
422
|
-
assets: {}
|
|
460
|
+
isUsingTemplate : local.isUsingTemplate,
|
|
461
|
+
isCacheless : isCacheless,
|
|
462
|
+
path : params.param.path || null, // user custom path : namespace should be ignored or left blank
|
|
463
|
+
assets : {}
|
|
423
464
|
};
|
|
424
465
|
|
|
425
466
|
if (routeHasViews) {
|
|
426
467
|
options.template = (routeHasViews) ? conf.content.templates[templateName] || conf.content.templates._common : undefined;
|
|
468
|
+
options.template.externalPlugins = [];
|
|
469
|
+
if ( /http\/2/.test(conf.server.protocol) ) {
|
|
470
|
+
options.template.h2Links = '';
|
|
471
|
+
}
|
|
427
472
|
}
|
|
428
473
|
|
|
429
474
|
// Options need to be protected by a clone to allow overrides
|
|
@@ -456,7 +501,7 @@ function Router(env, scope) {
|
|
|
456
501
|
}
|
|
457
502
|
setupFileObj = null;
|
|
458
503
|
|
|
459
|
-
if (
|
|
504
|
+
if (isCacheless) {
|
|
460
505
|
if (hasControllerNamespace) {
|
|
461
506
|
delete require.cache[require.resolve(_(mainControllerFile, true))];
|
|
462
507
|
}
|
|
@@ -504,7 +549,7 @@ function Router(env, scope) {
|
|
|
504
549
|
* */
|
|
505
550
|
var requireController = function (namespace, options) {
|
|
506
551
|
|
|
507
|
-
var
|
|
552
|
+
var isCacheless = (process.env.NODE_ENV_IS_DEV == 'false') ? false : true;
|
|
508
553
|
var corePath = getPath('gina').core;
|
|
509
554
|
var config = getContext('gina').Config.instance;
|
|
510
555
|
var bundle = config.bundle;
|
|
@@ -524,7 +569,7 @@ function Router(env, scope) {
|
|
|
524
569
|
|
|
525
570
|
try {
|
|
526
571
|
|
|
527
|
-
//if (
|
|
572
|
+
//if (isCacheless) {
|
|
528
573
|
// Super controller
|
|
529
574
|
delete require.cache[require.resolve(_(corePath +'/controller/index.js', true))];
|
|
530
575
|
require.cache[_(corePath +'/controller/index.js', true)] = require( _(corePath +'/controller/index.js', true) );
|
|
@@ -713,7 +758,7 @@ function Router(env, scope) {
|
|
|
713
758
|
filename = sharedFilename;
|
|
714
759
|
}
|
|
715
760
|
|
|
716
|
-
if (local.
|
|
761
|
+
if (local.isCacheless) delete require.cache[require.resolve(_(filename, true))];
|
|
717
762
|
|
|
718
763
|
var MiddlewareClass = function(req, res, next) {
|
|
719
764
|
// getting rid of the middleware context
|
|
@@ -725,7 +770,7 @@ function Router(env, scope) {
|
|
|
725
770
|
sharedFilenameObj.existsSync()
|
|
726
771
|
&& filename != sharedFilename
|
|
727
772
|
) {
|
|
728
|
-
if (local.
|
|
773
|
+
if (local.isCacheless) delete require.cache[require.resolve(_(sharedFilename, true))];
|
|
729
774
|
// sharedFilename as SuperClass
|
|
730
775
|
Middleware = inherits(require(_(filename, true)), require(_(sharedFilename, true)));
|
|
731
776
|
}
|
|
@@ -4,13 +4,17 @@
|
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
6
|
const fs = require('fs');
|
|
7
|
+
const { execSync } = require('child_process');
|
|
7
8
|
const {EventEmitter} = require('events');
|
|
8
9
|
const Eio = require('engine.io');
|
|
10
|
+
// const zlib = require('zlib'); // gzip / deflate
|
|
9
11
|
|
|
10
12
|
const lib = require('./../lib');
|
|
11
13
|
const inherits = lib.inherits;
|
|
12
14
|
const merge = lib.merge;
|
|
13
15
|
const console = lib.logger;
|
|
16
|
+
const Collection = lib.Collection;
|
|
17
|
+
const cache = new lib.Cache();
|
|
14
18
|
|
|
15
19
|
|
|
16
20
|
const env = process.env.NODE_ENV
|
|
@@ -65,6 +69,150 @@ function ServerEngineClass(options) {
|
|
|
65
69
|
return fs.readFileSync(filename).toString()
|
|
66
70
|
}
|
|
67
71
|
|
|
72
|
+
var preferedEncoding = options.preferedCompressionEncodingOrder
|
|
73
|
+
, acceptEncodingArr = null
|
|
74
|
+
, acceptEncoding = null
|
|
75
|
+
;
|
|
76
|
+
|
|
77
|
+
var localAssets = null
|
|
78
|
+
, cachedAssets = null
|
|
79
|
+
, cachePathObj = null
|
|
80
|
+
, localCachePathObj = null
|
|
81
|
+
;
|
|
82
|
+
try {
|
|
83
|
+
|
|
84
|
+
// Adding cache directory if not found
|
|
85
|
+
cachePathObj = new _(options.cachePath, true);
|
|
86
|
+
localCachePathObj = new _(options.cachePath +'/'+ options.bundle, true);
|
|
87
|
+
if ( !cachePathObj.existsSync() ) {
|
|
88
|
+
cachePathObj.mkdirSync();
|
|
89
|
+
}
|
|
90
|
+
// Empty cache for cahceless envs
|
|
91
|
+
if ( options.isCacheless && localCachePathObj.existsSync() ) {
|
|
92
|
+
localCachePathObj.rmSync();
|
|
93
|
+
}
|
|
94
|
+
// For frontend template routing if needed
|
|
95
|
+
// TODO - Used `options.routing` instead after having filtered `options.allRoutes` vs `options.formsRules` to use only external routes exposed by `"query"` validation
|
|
96
|
+
var _routing = JSON.clone(options.allRoutes);
|
|
97
|
+
// var _routing = JSON.clone(options.routing);
|
|
98
|
+
for (let rule in _routing) {
|
|
99
|
+
if ( typeof(_routing[rule]._comment) != 'undefined' ) {
|
|
100
|
+
delete _routing[rule]._comment;
|
|
101
|
+
}
|
|
102
|
+
if ( typeof(_routing[rule].middleware) != 'undefined' ) {
|
|
103
|
+
delete _routing[rule].middleware;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// reverseRouting in done on te frontend side
|
|
107
|
+
|
|
108
|
+
}// EO for (let rule in _routing)
|
|
109
|
+
|
|
110
|
+
// Checking if brotli is installed
|
|
111
|
+
var brotliBin = null;
|
|
112
|
+
try {
|
|
113
|
+
brotliBin = execSync( 'which brotli' ).toString().trim();
|
|
114
|
+
} catch (binErr) {
|
|
115
|
+
// Means that it is not installed.
|
|
116
|
+
}
|
|
117
|
+
// Checking if gzip is installed
|
|
118
|
+
var gZipBin = null;
|
|
119
|
+
try {
|
|
120
|
+
gZipBin = execSync( 'which gzip' ).toString().trim();
|
|
121
|
+
} catch (binErr) {
|
|
122
|
+
// Means that it is not installed.
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Caching routing
|
|
126
|
+
let targetDir = _(options.cachePath +'/'+ options.bundle +'/config', true);
|
|
127
|
+
let targetDirObj = new _(targetDir, true);
|
|
128
|
+
if ( ! targetDirObj.existsSync() ) {
|
|
129
|
+
targetDirObj.mkdirSync();
|
|
130
|
+
}
|
|
131
|
+
let targetFile = null
|
|
132
|
+
, fd = null
|
|
133
|
+
, buffer = null
|
|
134
|
+
, cmd = null
|
|
135
|
+
, brFileObj = null
|
|
136
|
+
, gzFileObj = null
|
|
137
|
+
;
|
|
138
|
+
if (_routing) {
|
|
139
|
+
targetFile = 'routing.json';
|
|
140
|
+
// Storing to disk
|
|
141
|
+
console.debug(`Writing ${targetFile} to: ${targetDir}/${targetFile}`);
|
|
142
|
+
fd = fs.openSync(targetDir +'/'+ targetFile, 'w'); // Open file for writing
|
|
143
|
+
buffer = Buffer.from( JSON.stringify(_routing) );
|
|
144
|
+
fs.writeSync(fd, buffer, 0, buffer.length, 0); // Write the buffer
|
|
145
|
+
fs.closeSync(fd); // Close the file descriptor
|
|
146
|
+
|
|
147
|
+
// Adding brotli version
|
|
148
|
+
// To enblable this feature, you need to install brotli on the host
|
|
149
|
+
// [ Mac Os X ] brew install brotli
|
|
150
|
+
// [ Debian/Ubuntu ] sudo apt install brotli
|
|
151
|
+
try {
|
|
152
|
+
if (brotliBin) {
|
|
153
|
+
brFileObj = new _(targetDir +'/'+ targetFile +'.br');
|
|
154
|
+
// Removing existing
|
|
155
|
+
if ( brFileObj.existsSync() ) {
|
|
156
|
+
brFileObj.rmSync();
|
|
157
|
+
}
|
|
158
|
+
// Creating a new br version
|
|
159
|
+
cmd = brotliBin +' --best '+ _(targetDir +'/'+ targetFile, true);
|
|
160
|
+
console.debug( execSync( cmd ).toString() );
|
|
161
|
+
}
|
|
162
|
+
} catch (brError) {
|
|
163
|
+
console.error('[ SERVER ] '+ brError.stack);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Adding GZip version
|
|
167
|
+
// To enblable this feature, you need to install gzip on the host
|
|
168
|
+
// [ Mac Os X ] brew install gzip
|
|
169
|
+
// [ Debian/Ubuntu ] sudo apt install gzip
|
|
170
|
+
try {
|
|
171
|
+
if (gZipBin) {
|
|
172
|
+
gzFileObj = new _(targetDir +'/'+ targetFile +'.gz');
|
|
173
|
+
// Removing existing
|
|
174
|
+
if ( gzFileObj.existsSync() ) {
|
|
175
|
+
gzFileObj.rmSync();
|
|
176
|
+
}
|
|
177
|
+
// Creating a new br version
|
|
178
|
+
cmd = gZipBin +' -9 -k '+ _(targetDir +'/'+ targetFile, true);
|
|
179
|
+
console.debug( execSync( cmd ).toString() );
|
|
180
|
+
}
|
|
181
|
+
} catch (gzError) {
|
|
182
|
+
console.error('[ SERVER ] '+ gzError.stack);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
buffer = null;
|
|
188
|
+
fd = null;
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
// TODO - Make a br or a gz file asside here
|
|
192
|
+
localAssets = [
|
|
193
|
+
{
|
|
194
|
+
file : 'public_suffix_list.dat',
|
|
195
|
+
path : getPath('gina').lib +'/domain/dist',
|
|
196
|
+
mime : 'text/plain; charset=utf8'
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
file : 'routing.json',
|
|
200
|
+
path : targetDir,
|
|
201
|
+
mime : 'application/json; charset=utf8'
|
|
202
|
+
}
|
|
203
|
+
];
|
|
204
|
+
for (let i=0, len=localAssets.length; i<len; i++) {
|
|
205
|
+
let fileName = _(localAssets[i].path +'/'+ localAssets[i].file, true);
|
|
206
|
+
localAssets[i].content = readSync(fileName, 'utf8');
|
|
207
|
+
}// EO for localAssets
|
|
208
|
+
|
|
209
|
+
} catch (assetsError) {
|
|
210
|
+
// TODO - Reuse the default or the project 404 page
|
|
211
|
+
// fileContent = 'Not found';
|
|
212
|
+
console.error('[ SERVER ] '+ assetsError.stack);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
|
|
68
216
|
// openssl req -x509 -newkey rsa:2048 -nodes -sha256 -subj "/CN=localhost" -keyout localhost-privkey.pem -out localhost-cert.pem
|
|
69
217
|
var credentials = {};
|
|
70
218
|
if ( /https/.test(options.scheme) ) {
|
|
@@ -98,6 +246,7 @@ function ServerEngineClass(options) {
|
|
|
98
246
|
|
|
99
247
|
var server = null, http = null, ioServer = null;
|
|
100
248
|
|
|
249
|
+
|
|
101
250
|
if ( /^http\/2/.test(options.protocol) ) {
|
|
102
251
|
var http2 = require('http2');
|
|
103
252
|
switch (options.scheme) {
|
|
@@ -134,6 +283,7 @@ function ServerEngineClass(options) {
|
|
|
134
283
|
}
|
|
135
284
|
|
|
136
285
|
|
|
286
|
+
|
|
137
287
|
const middleware = function(path, cb) {
|
|
138
288
|
|
|
139
289
|
// if (request.path === path) {
|
|
@@ -150,35 +300,203 @@ function ServerEngineClass(options) {
|
|
|
150
300
|
|
|
151
301
|
const onPath = function(path, cb, allowAll) {
|
|
152
302
|
|
|
153
|
-
var queryParams
|
|
154
|
-
, i
|
|
155
|
-
, len
|
|
156
|
-
, p
|
|
157
|
-
, arr
|
|
158
|
-
, a
|
|
303
|
+
var queryParams = null
|
|
304
|
+
, i = null
|
|
305
|
+
, len = null
|
|
306
|
+
, p = null
|
|
307
|
+
, arr = null
|
|
308
|
+
, a = null
|
|
309
|
+
, isProxyHost = null
|
|
310
|
+
, requestHost = null
|
|
311
|
+
, isBinary = null
|
|
312
|
+
, isCacheless = options.isCacheless
|
|
313
|
+
, assetsCollection = new Collection(localAssets)
|
|
314
|
+
, localAsset = null
|
|
315
|
+
, cachedContents = null
|
|
316
|
+
, cachedContentObj = null
|
|
317
|
+
, cachedIndexes = []
|
|
318
|
+
, cachedIndexe = null
|
|
159
319
|
;
|
|
160
320
|
|
|
321
|
+
|
|
161
322
|
// http2stream handle by the Router class & the SuperController class
|
|
162
323
|
// See `${core}/router.js` & `${core}/controller/controller.js`
|
|
163
324
|
|
|
164
325
|
server.on('request', (request, response) => {
|
|
326
|
+
|
|
327
|
+
acceptEncodingArr = null;
|
|
328
|
+
if ( typeof(request.headers['accept-encoding']) != 'undefined' ) {
|
|
329
|
+
acceptEncodingArr = request.headers['accept-encoding'].replace(/\s+/g, '').split(/\,/);
|
|
330
|
+
}
|
|
331
|
+
acceptEncoding = null;
|
|
332
|
+
isBinary = false;
|
|
333
|
+
|
|
334
|
+
// Proxy detection
|
|
335
|
+
isProxyHost = getContext('isProxyHost') || false;
|
|
336
|
+
requestHost = request.headers.host || request.headers[':authority'];
|
|
337
|
+
// console.debug('[PROXY_HOST][isProxyHost='+ isProxyHost +'] request.headers.host -> ' + request.headers.host + ' VS request.headers[":authority"] '+ request.headers[':authority'] +' | '+ request.url);
|
|
338
|
+
if (
|
|
339
|
+
!isProxyHost
|
|
340
|
+
&& !/\:[0-9]+$/.test(requestHost)
|
|
341
|
+
||
|
|
342
|
+
!isProxyHost
|
|
343
|
+
&& request.headers['x-forwarded-host']
|
|
344
|
+
) {
|
|
345
|
+
// Enable proxied mode
|
|
346
|
+
process.gina.PROXY_HOSTNAME = process.gina.PROXY_SCHEME +'://'+ requestHost;
|
|
347
|
+
process.gina.PROXY_HOST = requestHost;
|
|
348
|
+
// For internal services communications - Eg.: Controller::query()
|
|
349
|
+
if (request.headers['x-forwarded-host']) {
|
|
350
|
+
process.gina.PROXY_HOSTNAME = request.headers['x-forwarded-proto'] +'://'+ request.headers['x-forwarded-host'];
|
|
351
|
+
process.gina.PROXY_HOST = request.headers['x-forwarded-host'];
|
|
352
|
+
// console.debug('[PROXY_HOST][X-FORWARDED-PROTO] override request.headers["x-forwarded-host"] -> ' + request.headers['x-forwarded-host']);
|
|
353
|
+
}
|
|
354
|
+
// Forcing context - also available for workers
|
|
355
|
+
setContext('isProxyHost', true);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// TODO - remove this after k8s test
|
|
359
|
+
// if (
|
|
360
|
+
// // skip internal requests like healthcheck
|
|
361
|
+
// !/^localhost:[0-9]+$/.test(requestHost)
|
|
362
|
+
// && /^true$/.test(isProxyHost)
|
|
363
|
+
// && /\:[0-9]+$/.test(requestHost)
|
|
364
|
+
// && !hostnameRE.test(requestHost)
|
|
365
|
+
// ) {
|
|
366
|
+
// // Restoring non-proxied mode
|
|
367
|
+
// console.debug('[ SERVER ] proxy disabled: '+ process.gina.PROXY_SCHEME +'://'+ requestHost);
|
|
368
|
+
// isProxyHost = false;
|
|
369
|
+
// setContext('isProxyHost', isProxyHost);
|
|
370
|
+
// }
|
|
371
|
+
|
|
165
372
|
// healthcheck
|
|
166
373
|
// TODO - add a top level API : server.api.js (check, get ...)
|
|
167
374
|
// TODO - on 90% RAM usage, redirect to `come back later then restart bundle`
|
|
168
375
|
// TODO - check url against wroot : getContext() ?
|
|
169
376
|
if ( /^get$/i.test(request.method) && /\_gina\/health\/check$/i.test(request.url) ) {
|
|
170
377
|
// server.toApi(reques, response)
|
|
171
|
-
// console.debug('[200] '+ request.url);
|
|
172
|
-
response.setHeader('
|
|
173
|
-
response.setHeader('
|
|
378
|
+
// console.debug('[ SERVER ][200] '+ request.url);
|
|
379
|
+
response.setHeader('cache-control', 'no-cache, no-store, must-revalidate');
|
|
380
|
+
response.setHeader('pragma', 'no-cache');
|
|
381
|
+
response.setHeader('expires', '0');
|
|
382
|
+
response.setHeader('content-type', 'application/json; charset=utf8');
|
|
383
|
+
response.setHeader('x-powered-by', 'Gina/'+ GINA_VERSION);
|
|
384
|
+
|
|
174
385
|
return response.end('{"status":"ok"}');
|
|
175
386
|
}
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
if (
|
|
390
|
+
/^get$/i.test(request.method) && /\_gina\/assets\/public_suffix_list.dat$/i.test(request.url)
|
|
391
|
+
||
|
|
392
|
+
/^get$/i.test(request.method) && /\_gina\/assets\/routing\.json$/i.test(request.url)
|
|
393
|
+
) {
|
|
394
|
+
// server.toApi(reques, response)
|
|
395
|
+
// console.debug('[ SERVER ][200] '+ request.url);
|
|
396
|
+
localAsset = assetsCollection.findOne({ file: request.url.split(/\//g).slice(-1).toString() });
|
|
397
|
+
response.setHeader('content-type', localAsset.mime);
|
|
398
|
+
response.setHeader('vary', 'Origin');
|
|
399
|
+
response.setHeader('cache-control', 'public, max-age=86400');
|
|
400
|
+
response.setHeader('x-content-type-options', 'nosniff');
|
|
401
|
+
response.setHeader('x-frame-options', 'DENY');
|
|
402
|
+
response.setHeader('x-xss-protection', '1; mode=block');
|
|
403
|
+
response.setHeader('x-powered-by', 'Gina/'+ GINA_VERSION);
|
|
404
|
+
|
|
405
|
+
var filename = _(localAsset.path +'/'+ localAsset.file, true);
|
|
406
|
+
if (acceptEncodingArr) {
|
|
407
|
+
for (let e=0, eLen=preferedEncoding.length; e<eLen; e++) {
|
|
408
|
+
if ( acceptEncodingArr && acceptEncodingArr.indexOf(preferedEncoding[e]) > -1 ) {
|
|
409
|
+
acceptEncoding = options.coreConfiguration.encoding[ preferedEncoding[e] ] ;
|
|
410
|
+
break;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
// Compressed content
|
|
415
|
+
if (
|
|
416
|
+
!isCacheless
|
|
417
|
+
&& acceptEncoding
|
|
418
|
+
&& fs.existsSync(filename + acceptEncoding)
|
|
419
|
+
) {
|
|
420
|
+
isBinary = true;
|
|
421
|
+
filename += acceptEncoding;
|
|
422
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Encoding
|
|
423
|
+
response.setHeader('content-encoding', acceptEncoding.replace(/^\./, ''));
|
|
424
|
+
// override content length
|
|
425
|
+
response.setHeader('content-length', fs.statSync(filename).size);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
if (!isBinary) {
|
|
429
|
+
console.info(request.method +' [200] '+ request.url);
|
|
430
|
+
return response.end(localAsset.content);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
return fs.createReadStream(filename)
|
|
434
|
+
.on('end', function onResponse(){
|
|
435
|
+
console.info(request.method +' [200] '+ request.url);
|
|
436
|
+
})
|
|
437
|
+
.pipe(response);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
|
|
176
441
|
if (isDev) {
|
|
177
442
|
refreshCore()
|
|
178
443
|
}
|
|
179
444
|
|
|
445
|
+
if (!isCacheless) {
|
|
446
|
+
var cacheStatus = 'gina;';
|
|
447
|
+
// Importing cache handler
|
|
448
|
+
cache.from(server._cached);
|
|
449
|
+
var cacheKey = 'html:' + request.url;
|
|
450
|
+
if ( cache.has(cacheKey) ) {
|
|
451
|
+
if ( /^GET$/i.test(request.method) ) {
|
|
452
|
+
// Getting cache from key
|
|
453
|
+
cachedContentObj = cache.get(cacheKey);
|
|
454
|
+
|
|
455
|
+
// Getting the headers
|
|
456
|
+
cacheStatus += ' hit;';
|
|
457
|
+
if ( typeof(cachedContentObj.ttl) != 'undefined' && cachedContentObj.ttl > 0) {
|
|
458
|
+
var createdAt = cachedContentObj.createdAt.getTime()+ (~~(cachedContentObj.ttl)*1000);
|
|
459
|
+
var remainingSeconds = Math.floor( (createdAt - new Date().getTime()) /1000);
|
|
460
|
+
|
|
461
|
+
cacheStatus += ' ttl='+remainingSeconds;
|
|
462
|
+
createdAt = null;
|
|
463
|
+
remainingSeconds = null;
|
|
464
|
+
}
|
|
465
|
+
response.setHeader('cache-status', cacheStatus);
|
|
466
|
+
|
|
467
|
+
if ( typeof(cachedContentObj.responseHeaders) != 'undefined' ) {
|
|
468
|
+
for (let h in cachedContentObj.responseHeaders ) {
|
|
469
|
+
response.setHeader(h, cachedContentObj.responseHeaders[h]);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
if (
|
|
473
|
+
typeof(cachedContentObj.fromMemory) != 'undefined'
|
|
474
|
+
) {
|
|
475
|
+
console.info(request.method +' [200]['+ cacheStatus +'] '+ request.url);
|
|
476
|
+
return response.end(cachedContentObj.content);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
filename = _(cachedContentObj.filename, true);
|
|
480
|
+
|
|
481
|
+
return fs.createReadStream(filename)
|
|
482
|
+
.on('error', function onError(err) {
|
|
483
|
+
console.error("[SERVER][CACHE][FILE ERROR] ", err.stack|err.message|err);
|
|
484
|
+
return response.end(''+ err.stack|err.message|err);
|
|
485
|
+
})
|
|
486
|
+
.on('end', function onResponse(){
|
|
487
|
+
console.info(request.method +' [200] '+ request.url);
|
|
488
|
+
})
|
|
489
|
+
.pipe(response);
|
|
490
|
+
}
|
|
491
|
+
console.warn("[SERVER][CACHE] ignoring key `"+ cacheKey+ "` because method != GET");
|
|
492
|
+
|
|
493
|
+
} // EO if ( cache.has(cacheKey) )
|
|
494
|
+
} // EO if (!isCacheless)
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
|
|
180
498
|
if ( /engine.io/.test(request.url)) {
|
|
181
|
-
console.debug('io request');
|
|
499
|
+
console.debug('[ SERVER ] engine.io request');
|
|
182
500
|
}
|
|
183
501
|
|
|
184
502
|
if (/^\*$/.test(path) || path == request.url) {
|
|
@@ -382,6 +700,7 @@ function ServerEngineClass(options) {
|
|
|
382
700
|
|
|
383
701
|
//------------------------------------
|
|
384
702
|
// Engine IO server
|
|
703
|
+
// https://socket.io/docs/v4/server-api/#socketsendargs
|
|
385
704
|
//------------------------------------
|
|
386
705
|
if (
|
|
387
706
|
typeof(options.ioServer) != 'undefined'
|
|
@@ -393,39 +712,6 @@ function ServerEngineClass(options) {
|
|
|
393
712
|
// test done in case we would like to switch to socket.io-server
|
|
394
713
|
ioServer = ( typeof(Eio.attach) != 'undefined' ) ? new Eio.attach(server, options.ioServer) : new Eio(server, options.ioServer);
|
|
395
714
|
|
|
396
|
-
ioServer.getClientsBySessionId = function(sessionId) {
|
|
397
|
-
|
|
398
|
-
if (this.clients.count() == 0)
|
|
399
|
-
return null;
|
|
400
|
-
|
|
401
|
-
var clients = null;
|
|
402
|
-
|
|
403
|
-
for (let id in this.clients) {
|
|
404
|
-
|
|
405
|
-
if ( typeof(this.clients[id].sessionId) == 'undefined' )
|
|
406
|
-
continue;
|
|
407
|
-
|
|
408
|
-
if (!clients) clients = {};
|
|
409
|
-
|
|
410
|
-
clients[id] = this.clients[id];
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
if (clients) {
|
|
414
|
-
// allowing to send for each client found sharing the same request session
|
|
415
|
-
clients.send = function(payload, option, callback) {
|
|
416
|
-
for ( var id in this) {
|
|
417
|
-
if ( typeof(this[id].sessionId) == 'undefined')
|
|
418
|
-
continue;
|
|
419
|
-
|
|
420
|
-
this[id].send(payload, option, callback)
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
return clients;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
715
|
server.eio = ioServer;
|
|
430
716
|
|
|
431
717
|
ioServer.on('connection', function (socket) {
|