gina 0.1.6-alpha.9 → 0.1.6-alpha.91

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.
Files changed (390) hide show
  1. package/LICENSE +1 -1
  2. package/README-4Contributors.md +14 -8
  3. package/README.md +4 -4
  4. package/bin/cli +14 -0
  5. package/bin/gina +29 -1
  6. package/framework/{v0.1.6-alpha.9/lib/inherits → v0.1.6-alpha.91}/LICENSE +1 -1
  7. package/framework/v0.1.6-alpha.91/VERSION +1 -0
  8. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/asset/plugin/README.md +1 -0
  9. package/framework/v0.1.6-alpha.91/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +1 -0
  10. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/asset/plugin/dist/vendor/gina/html/toolbar.html +1 -1
  11. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/asset/plugin/dist/vendor/gina/js/gina.js +582 -217
  12. package/framework/v0.1.6-alpha.91/core/asset/plugin/dist/vendor/gina/js/gina.min.js +777 -0
  13. package/framework/v0.1.6-alpha.91/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +8 -0
  14. package/framework/v0.1.6-alpha.91/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +8 -0
  15. package/framework/v0.1.6-alpha.91/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.map +8 -0
  16. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/config.js +157 -76
  17. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/connectors/couchbase/index.js +92 -22
  18. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/connectors/couchbase/lib/connector.v4.js +28 -22
  19. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/controller/controller.js +431 -111
  20. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/controller/index.js +2 -2
  21. package/framework/v0.1.6-alpha.91/core/deps/busboy-1.6.0/.github/workflows/ci.yml +24 -0
  22. package/framework/v0.1.6-alpha.91/core/deps/busboy-1.6.0/.github/workflows/lint.yml +23 -0
  23. package/framework/v0.1.6-alpha.91/core/deps/busboy-1.6.0/README.md +191 -0
  24. package/framework/v0.1.6-alpha.91/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-big.js +149 -0
  25. package/framework/v0.1.6-alpha.91/core/deps/busboy-1.6.0/bench/bench-multipart-fields-100mb-small.js +143 -0
  26. package/framework/v0.1.6-alpha.91/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-big.js +154 -0
  27. package/framework/v0.1.6-alpha.91/core/deps/busboy-1.6.0/bench/bench-multipart-files-100mb-small.js +148 -0
  28. package/framework/v0.1.6-alpha.91/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-100pairs-small.js +101 -0
  29. package/framework/v0.1.6-alpha.91/core/deps/busboy-1.6.0/bench/bench-urlencoded-fields-900pairs-small-alt.js +84 -0
  30. package/framework/v0.1.6-alpha.91/core/deps/busboy-1.6.0/lib/index.js +57 -0
  31. package/framework/v0.1.6-alpha.91/core/deps/busboy-1.6.0/lib/types/multipart.js +680 -0
  32. package/framework/v0.1.6-alpha.91/core/deps/busboy-1.6.0/lib/types/urlencoded.js +350 -0
  33. package/framework/v0.1.6-alpha.91/core/deps/busboy-1.6.0/lib/utils.js +596 -0
  34. package/framework/v0.1.6-alpha.91/core/deps/busboy-1.6.0/package.json +22 -0
  35. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/.travis.yml +4 -0
  36. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/LICENSE +21 -0
  37. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/example/bool.js +10 -0
  38. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/example/boolean_double.js +7 -0
  39. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/example/boolean_single.js +7 -0
  40. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/example/default_hash.js +8 -0
  41. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/example/default_singles.js +7 -0
  42. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/example/divide.js +8 -0
  43. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/example/line_count.js +20 -0
  44. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/example/line_count_options.js +29 -0
  45. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/example/line_count_wrap.js +29 -0
  46. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/example/nonopt.js +4 -0
  47. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/example/reflect.js +2 -0
  48. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/example/short.js +3 -0
  49. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/example/string.js +11 -0
  50. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/example/usage-options.js +19 -0
  51. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/example/xup.js +10 -0
  52. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/index.js +343 -0
  53. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/package.json +31 -0
  54. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/package.json.dist +39 -0
  55. package/framework/v0.1.6-alpha.91/core/deps/optimist-0.6.1/readme.markdown +513 -0
  56. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/HISTORY.md +498 -0
  57. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/LICENSE +7 -0
  58. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/README.md +88 -0
  59. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/bin/swig.js +161 -0
  60. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/bin/swig.js.dist +161 -0
  61. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/dist/swig.min.js +7 -0
  62. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/dist/swig.min.js.map +8 -0
  63. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/index.js +1 -0
  64. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/dateformatter.js +198 -0
  65. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/filters.js +630 -0
  66. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/lexer.js +306 -0
  67. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/loaders/filesystem.js +59 -0
  68. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/loaders/index.js +53 -0
  69. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/loaders/memory.js +63 -0
  70. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/parser.js +744 -0
  71. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/swig.js +740 -0
  72. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/autoescape.js +37 -0
  73. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/block.js +25 -0
  74. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/else.js +25 -0
  75. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/elseif.js +28 -0
  76. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/extends.js +19 -0
  77. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/filter.js +68 -0
  78. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/for.js +130 -0
  79. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/if.js +86 -0
  80. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/import.js +91 -0
  81. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/include.js +100 -0
  82. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/index.js +16 -0
  83. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/macro.js +79 -0
  84. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/parent.js +51 -0
  85. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/raw.js +23 -0
  86. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/set.js +109 -0
  87. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/tags/spaceless.js +42 -0
  88. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/lib/utils.js +184 -0
  89. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/package.json +57 -0
  90. package/framework/v0.1.6-alpha.91/core/deps/swig-1.4.2/package.json.dist +61 -0
  91. package/framework/v0.1.6-alpha.91/core/deps/swig-client/swig.js +5031 -0
  92. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/dev/index.js +1 -1
  93. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/dev/lib/factory.js +1 -1
  94. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/gna.js +101 -22
  95. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/locales/index.js +3 -3
  96. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/locales/src/make.js +1 -1
  97. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/mime.types +1 -0
  98. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/model/entity.js +5 -5
  99. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/model/index.js +30 -26
  100. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/model/template/entityFactory.js +1 -1
  101. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/model/template/index.js +1 -1
  102. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/index.js +3 -3
  103. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/file/package.json +2 -2
  104. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/intl/package.json +2 -2
  105. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/storage/package.json +2 -2
  106. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/validator/package.json +2 -2
  107. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/validator/src/form-validator.js +39 -27
  108. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/validator/src/main.js +360 -85
  109. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/router.js +92 -47
  110. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/server.isaac.js +96 -10
  111. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/server.js +283 -129
  112. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/status.codes +1 -11
  113. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle/controllers/setup.js +2 -2
  114. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/command/gina.tpl +1 -1
  115. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/conf/env.json +2 -0
  116. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/conf/templates.json +4 -2
  117. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/console.js +1 -1
  118. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/context.js +29 -12
  119. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/data/package.json +2 -2
  120. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/data/src/main.js +1 -1
  121. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/dateFormat.js +1 -1
  122. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/index.js +1 -1
  123. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/json/package.json +2 -2
  124. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/json/src/main.js +6 -4
  125. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/path.js +31 -15
  126. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/plugins/package.json +2 -2
  127. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/plugins/src/api-error.js +2 -2
  128. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/plugins/src/main.js +1 -1
  129. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/text.js +1 -1
  130. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/archiver/package.json +2 -2
  131. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/archiver/src/main.js +11 -11
  132. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/bundle/add.js +2 -1
  133. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/bundle/start.js +21 -8
  134. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/env/get.js +1 -1
  135. package/framework/v0.1.6-alpha.91/lib/cmd/env/help.js +30 -0
  136. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/build.js +1 -1
  137. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/init.js +18 -0
  138. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/link-node-modules.js +2 -3
  139. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/link.js +1 -0
  140. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/tail.js +28 -11
  141. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/version.js +15 -1
  142. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/helper.js +6 -2
  143. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/index.js +1 -1
  144. package/framework/v0.1.6-alpha.91/lib/cmd/minion/help.txt +18 -0
  145. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/project/add.js +3 -2
  146. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/project/build.js +4 -4
  147. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/project/list.js +1 -1
  148. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/protocol/list.js +71 -50
  149. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/collection/package.json +2 -2
  150. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/collection/src/main.js +20 -14
  151. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/config.js +1 -1
  152. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cron/package.json +2 -2
  153. package/framework/v0.1.6-alpha.91/lib/domain/dist/2025-03-14_13-41-20_UTC.dat +15754 -0
  154. package/framework/v0.1.6-alpha.91/lib/domain/dist/public_suffix_list.dat +15754 -0
  155. package/framework/v0.1.6-alpha.91/lib/domain/exemples/backend.js +12 -0
  156. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/domain/package.json +2 -2
  157. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/domain/src/main.js +20 -6
  158. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/generator/index.js +1 -1
  159. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/index.js +1 -1
  160. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91/lib/inherits}/LICENSE +1 -1
  161. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/inherits/package.json +2 -2
  162. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/inherits/src/main.js +1 -1
  163. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/logger/package.json +2 -2
  164. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/logger/src/containers/mq/listener.js +10 -2
  165. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/logger/src/helper.js +1 -1
  166. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/logger/src/main.js +1 -1
  167. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/math/index.js +1 -1
  168. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/merge/package.json +2 -2
  169. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/model.js +3 -3
  170. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/proc.js +9 -1
  171. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/routing/package.json +2 -2
  172. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/routing/src/main.js +72 -25
  173. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/session-store.js +3 -3
  174. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/swig-filters/package.json +2 -2
  175. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/swig-filters/src/main.js +70 -15
  176. package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/validator.js +2 -2
  177. package/framework/v0.1.6-alpha.91/package.json +11 -0
  178. package/package.json +3 -3
  179. package/resources/package.json.template +1 -1
  180. package/script/post_install.js +1 -1
  181. package/script/pre_install.js +1 -1
  182. package/utils/helper.js +24 -0
  183. package/framework/v0.1.6-alpha.9/VERSION +0 -1
  184. package/framework/v0.1.6-alpha.9/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +0 -1
  185. package/framework/v0.1.6-alpha.9/core/asset/plugin/dist/vendor/gina/js/gina.min.js +0 -766
  186. package/framework/v0.1.6-alpha.9/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +0 -8
  187. package/framework/v0.1.6-alpha.9/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -7
  188. package/framework/v0.1.6-alpha.9/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.map +0 -8
  189. package/framework/v0.1.6-alpha.9/core/deps/busboy/.travis.yml +0 -17
  190. package/framework/v0.1.6-alpha.9/core/deps/busboy/README.md +0 -225
  191. package/framework/v0.1.6-alpha.9/core/deps/busboy/deps/encoding/encoding-indexes.js +0 -73
  192. package/framework/v0.1.6-alpha.9/core/deps/busboy/deps/encoding/encoding.js +0 -2391
  193. package/framework/v0.1.6-alpha.9/core/deps/busboy/lib/main.js +0 -89
  194. package/framework/v0.1.6-alpha.9/core/deps/busboy/lib/types/multipart.js +0 -328
  195. package/framework/v0.1.6-alpha.9/core/deps/busboy/lib/types/urlencoded.js +0 -214
  196. package/framework/v0.1.6-alpha.9/core/deps/busboy/lib/utils.js +0 -191
  197. package/framework/v0.1.6-alpha.9/core/deps/busboy/package.json +0 -69
  198. package/framework/v0.1.6-alpha.9/lib/domain/dist/public_suffix_list.dat +0 -14186
  199. package/framework/v0.1.6-alpha.9/lib/domain/exemples/backend.js +0 -0
  200. package/framework/v0.1.6-alpha.9/package.json +0 -14
  201. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/AUTHORS +0 -0
  202. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/asset/html/nolayout.html +0 -0
  203. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/asset/html/static.html +0 -0
  204. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/asset/img/android-chrome-192x192.png +0 -0
  205. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/asset/img/android-chrome-512x512.png +0 -0
  206. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/asset/img/apple-touch-icon.png +0 -0
  207. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/asset/img/favicon-16x16.png +0 -0
  208. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/asset/img/favicon-32x32.png +0 -0
  209. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/asset/img/favicon.ico +0 -0
  210. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
  211. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/asset/plugin/uuid.json +0 -0
  212. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/connectors/couchbase/lib/connector.js +0 -0
  213. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/connectors/couchbase/lib/connector.v2.js +0 -0
  214. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/connectors/couchbase/lib/connector.v3.js +0 -0
  215. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/connectors/couchbase/lib/n1ql.js +0 -0
  216. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/connectors/couchbase/lib/session-store.js +0 -0
  217. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
  218. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
  219. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
  220. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/controller/controller.framework.js +0 -0
  221. /package/framework/{v0.1.6-alpha.9/core/deps/busboy → v0.1.6-alpha.91/core/deps/busboy-1.6.0}/LICENSE +0 -0
  222. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/deps/swig-client/swig-2.0.0.min.js +0 -0
  223. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/dev/lib/class.js +0 -0
  224. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/dev/lib/tools.js +0 -0
  225. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/locales/README.md +0 -0
  226. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/locales/currency.json +0 -0
  227. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/locales/dist/language/en.json +0 -0
  228. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/locales/dist/language/fr.json +0 -0
  229. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/locales/dist/region/en.json +0 -0
  230. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/locales/dist/region/fr.json +0 -0
  231. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/locales/src/resources/currency.csv +0 -0
  232. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/locales/src/resources/region.csv +0 -0
  233. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/locales/src/resources/region.mapping.json +0 -0
  234. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/README.md +0 -0
  235. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/file/README.md +0 -0
  236. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/file/build.json +0 -0
  237. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/intl/README.md +0 -0
  238. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/intl/build.json +0 -0
  239. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/intl/src/main.js +0 -0
  240. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/storage/README.md +0 -0
  241. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/storage/build.json +0 -0
  242. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/storage/src/main.js +0 -0
  243. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/validator/README.md +0 -0
  244. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/plugins/lib/validator/build.json +0 -0
  245. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/server.express.js +0 -0
  246. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/_gitignore +0 -0
  247. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle/config/app.json +0 -0
  248. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle/config/routing.json +0 -0
  249. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle/config/settings.json +0 -0
  250. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
  251. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle/config/templates.json +0 -0
  252. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
  253. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
  254. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle/index.js +0 -0
  255. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
  256. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle_public/css/default.css +0 -0
  257. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
  258. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
  259. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
  260. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle_public/readme.md +0 -0
  261. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
  262. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
  263. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
  264. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
  265. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
  266. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/command/gina.bat.tpl +0 -0
  267. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/conf/manifest.json +0 -0
  268. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/conf/package.json +0 -0
  269. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/conf/settings.json +0 -0
  270. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/conf/statics.json +0 -0
  271. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/error/client/json/401.json +0 -0
  272. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/error/client/json/403.json +0 -0
  273. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/error/client/json/404.json +0 -0
  274. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/error/server/html/50x.html +0 -0
  275. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/error/server/json/500.json +0 -0
  276. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/error/server/json/503.json +0 -0
  277. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/core/template/extensions/logger/config.json +0 -0
  278. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/data/LICENSE +0 -0
  279. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/data/README.md +0 -0
  280. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/json/LICENSE +0 -0
  281. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/json/README.md +0 -0
  282. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/plugins/README.md +0 -0
  283. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/prototypes.js +0 -0
  284. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/helpers/task.js +0 -0
  285. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/archiver/README.md +0 -0
  286. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/archiver/build.json +0 -0
  287. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/archiver/src/dep/jszip.min.js +0 -0
  288. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/aliases.json +0 -0
  289. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/bundle/arguments.json +0 -0
  290. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/bundle/copy.js +0 -0
  291. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/bundle/cp.js +0 -0
  292. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/bundle/help.js +0 -0
  293. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/bundle/help.txt +0 -0
  294. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/bundle/list.js +0 -0
  295. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/bundle/remove.js +0 -0
  296. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/bundle/rename.js +0 -0
  297. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/bundle/restart.js +0 -0
  298. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/bundle/rm.js +0 -0
  299. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/bundle/status.js +0 -0
  300. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/bundle/stop.js +0 -0
  301. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/env/add.js +0 -0
  302. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/env/help.txt +0 -0
  303. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/env/link-dev.js +0 -0
  304. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/env/list.js +0 -0
  305. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/env/remove.js +0 -0
  306. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/env/rm.js +0 -0
  307. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/env/set.js +0 -0
  308. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/env/unset.js +0 -0
  309. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/env/use.js +0 -0
  310. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/dot.js +0 -0
  311. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/get.js +0 -0
  312. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/help.js +0 -0
  313. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/help.txt +0 -0
  314. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/msg.json +0 -0
  315. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/open.js +0 -0
  316. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/restart.js +0 -0
  317. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/set.js +0 -0
  318. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/start.js +0 -0
  319. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/status.js +0 -0
  320. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/stop.js +0 -0
  321. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/framework/update.js +0 -0
  322. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/gina-dev.1.md +0 -0
  323. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/gina-framework.1.md +0 -0
  324. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/gina.1.md +0 -0
  325. /package/framework/{v0.1.6-alpha.9/lib/cmd/env → v0.1.6-alpha.91/lib/cmd/minion}/help.js +0 -0
  326. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/msg.json +0 -0
  327. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/port/help.js +0 -0
  328. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/port/help.txt +0 -0
  329. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/port/inc/scan.js +0 -0
  330. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/port/list.js +0 -0
  331. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/port/reset.js +0 -0
  332. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/port/set.js +0 -0
  333. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/project/arguments.json +0 -0
  334. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/project/help.js +0 -0
  335. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/project/help.txt +0 -0
  336. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/project/import.js +0 -0
  337. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/project/move.js +0 -0
  338. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/project/remove.js +0 -0
  339. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/project/rename.js +0 -0
  340. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/project/restart.js +0 -0
  341. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/project/rm.js +0 -0
  342. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/project/start.js +0 -0
  343. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/project/status.js +0 -0
  344. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/project/stop.js +0 -0
  345. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/protocol/help.js +0 -0
  346. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/protocol/help.txt +0 -0
  347. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/protocol/set.js +0 -0
  348. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/scope/add.js +0 -0
  349. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/scope/help.js +0 -0
  350. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/scope/help.txt +0 -0
  351. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/scope/link-local.js +0 -0
  352. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/scope/link-production.js +0 -0
  353. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/scope/list.js +0 -0
  354. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/scope/remove.js +0 -0
  355. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/scope/rm.js +0 -0
  356. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/scope/use.js +0 -0
  357. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cmd/view/add.js +0 -0
  358. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/collection/README.md +0 -0
  359. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/collection/build.json +0 -0
  360. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cron/README.md +0 -0
  361. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/cron/src/main.js +0 -0
  362. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/domain/LICENSE +0 -0
  363. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/domain/README.md +0 -0
  364. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/domain/exemples/frontend.html +0 -0
  365. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/inherits/README.md +0 -0
  366. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/inherits/example/inheriting_eventemitter.js +0 -0
  367. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/inherits/example/protected_inheritance.js +0 -0
  368. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/inherits/example/simple_inheritance.js +0 -0
  369. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/inherits/example/super_attribute_overridden_by_child_on_init.js +0 -0
  370. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/logger/README.md +0 -0
  371. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/logger/src/containers/default/index.js +0 -0
  372. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/logger/src/containers/file/index.js +0 -0
  373. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
  374. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
  375. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/logger/src/containers/mq/index.js +0 -0
  376. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/logger/src/containers/mq/speaker.js +0 -0
  377. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/merge/README.md +0 -0
  378. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/merge/example/merge.js +0 -0
  379. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/merge/example/merge_2_literal objects.js +0 -0
  380. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/merge/example/merge_and_preserve_first.js +0 -0
  381. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/merge/src/main.js +0 -0
  382. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/routing/README.md +0 -0
  383. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/routing/build.json +0 -0
  384. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/shell.js +0 -0
  385. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/swig-filters/README.md +0 -0
  386. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/url/README.md +0 -0
  387. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/url/index.js +0 -0
  388. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/url/mocks.json +0 -0
  389. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/lib/url/routing.json +0 -0
  390. /package/framework/{v0.1.6-alpha.9 → v0.1.6-alpha.91}/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-2023 Rhinostone <contact@gina.io>
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.
@@ -13,7 +13,7 @@ const {promises: {readFile}} = require("fs");
13
13
  var util = require('util');
14
14
  var promisify = util.promisify;
15
15
  var EventEmitter = require('events').EventEmitter;
16
- var zlib = require('zlib');
16
+ var zlib = require('zlib'); // Included with NodeJS
17
17
 
18
18
  //var dns = require('dns');
19
19
  // var tls = require('tls');
@@ -25,9 +25,9 @@ var inherits = lib.inherits;
25
25
  var console = lib.logger;
26
26
  var Collection = lib.Collection;
27
27
  var routingLib = lib.routing;
28
- var swig = require('swig');
29
- // Swig 2
30
- // var swig = require('./../deps/swig-client/swig-2.0.0.min.js');
28
+ var Domain = lib.Domain;
29
+ var domainLib = new Domain();
30
+ var swig = require('./../deps/swig-1.4.2');
31
31
  var SwigFilters = lib.SwigFilters;
32
32
  var statusCodes = requireJSON( _( getPath('gina').core + '/status.codes') );
33
33
 
@@ -68,24 +68,19 @@ function SuperController(options) {
68
68
  var init = function() {
69
69
 
70
70
  if ( typeof(SuperController.initialized) != 'undefined' ) {
71
- return getInstance()
72
- } else {
73
-
74
- SuperController.instance = self;
75
-
76
-
77
- if (local.options) {
78
- SuperController.instance._options = local.options;
79
- }
80
-
81
- SuperController.initialized = true;
71
+ return getInstance();
72
+ }
82
73
 
74
+ SuperController.instance = self;
75
+ if (local.options) {
76
+ SuperController.instance._options = local.options;
83
77
  }
78
+ SuperController.initialized = true;
84
79
  }
85
80
 
86
81
  var getInstance = function() {
87
82
  local.options = SuperController.instance._options = options;
88
- // 2022-03-07 Fix for none-developpement environnements (without cache)
83
+ // Fixed on 2022-03-07 for none-developpement environnements (without cache)
89
84
  self._options = local.options;
90
85
 
91
86
  return SuperController.instance;
@@ -240,12 +235,12 @@ function SuperController(options) {
240
235
 
241
236
  if ( /^:/.test(value) ) {
242
237
  str = 'page.view.params.'+ key + '.';
243
- set(str.substr(0, str.length-1), req.params[value.substr(1)]);
238
+ set(str.substring(0, str.length-1), req.params[value.substring(1)]);
244
239
  } else if (/^(file|title)$/.test(key)) {
245
240
  str = 'page.view.'+ key + '.';
246
- set(str.substr(0, str.length-1), value);
241
+ set(str.substring(0, str.length-1), value);
247
242
  } else {
248
- set(str.substr(0, str.length-1), value)
243
+ set(str.substring(0, str.length-1), value)
249
244
  }
250
245
 
251
246
  str = 'page.'
@@ -322,10 +317,24 @@ function SuperController(options) {
322
317
 
323
318
  var ctx = getContext('gina');
324
319
  // new declaration && overrides
320
+ var arch = process.arch;
321
+ switch (process.arch) {
322
+ case 'x64':
323
+ arch = 'amd64'
324
+ break;
325
+ case 'armv7l':
326
+ arch = 'armhf'
327
+ break;
328
+ case 'x86':
329
+ arch = 'i386'
330
+ break;
331
+ default:
332
+ break;
333
+ }
325
334
  var version = {
326
335
  "number" : ctx.version,
327
336
  "platform" : process.platform,
328
- "arch" : process.arch,
337
+ "arch" : arch,
329
338
  "nodejs" : process.versions.node,
330
339
  "middleware" : ctx.middleware
331
340
  };
@@ -337,14 +346,122 @@ function SuperController(options) {
337
346
  set('page.environment.nodejs', version.nodejs +' '+ version.platform +' '+ version.arch);
338
347
  set('page.environment.engine', options.conf.server.engine);//version.middleware
339
348
  set('page.environment.env', process.env.NODE_ENV);
340
- set('page.environment.envIsDev', self.isCacheless());
349
+ set('page.environment.envIsDev', /^true$/i.test(process.env.NODE_ENV_IS_DEV) );
341
350
  set('page.environment.scope', process.env.NODE_SCOPE);
342
351
  set('page.environment.scopeIsLocal', /^true$/i.test(process.env.NODE_SCOPE_IS_LOCAL) );
343
352
  set('page.environment.scopeIsProduction', /^true$/i.test(process.env.NODE_SCOPE_IS_PRODUCTION) );
344
353
  set('page.environment.date.now', new Date().format("isoDateTime"));
354
+ set('page.environment.isCacheless', self.isCacheless());
355
+
356
+ // var requestPort = req.headers.port || req.headers[':port'];
357
+ // var isProxyHost = (
358
+ // typeof(req.headers.host) != 'undefined'
359
+ // && typeof(requestPort) != 'undefined'
360
+ // && /^(80|443)$/.test(requestPort)
361
+ // && local.options.conf.server.scheme +'://'+ req.headers.host +':'+ requestPort != local.options.conf.hostname.replace(/\:\d+$/, '') +':'+ local.options.conf.server.port
362
+ // ||
363
+ // typeof(req.headers[':authority']) != 'undefined'
364
+ // && local.options.conf.server.scheme +'://'+ req.headers[':authority'] != local.options.conf.hostname
365
+ // ||
366
+ // typeof(req.headers.host) != 'undefined'
367
+ // && typeof(requestPort) != 'undefined'
368
+ // && /^(80|443)$/.test(requestPort)
369
+ // && req.headers.host == local.options.conf.host
370
+ // ||
371
+ // typeof(req.headers['x-nginx-proxy']) != 'undefined'
372
+ // && /^true$/i.test(req.headers['x-nginx-proxy'])
373
+ // ) ? true : false;
374
+ // setContext('isProxyHost', isProxyHost);
375
+ var isProxyHost = getContext('isProxyHost') || false;
376
+ set('page.environment.isProxyHost', isProxyHost);
377
+ if ( /^true$/.test(isProxyHost) ) {
378
+ set('page.environment.proxyHost', process.gina.PROXY_HOST);
379
+ set('page.environment.proxyHostname', process.gina.PROXY_HOSTNAME);
380
+ }
345
381
 
382
+ var _config = ctx.config.envConf[options.conf.bundle][process.env.NODE_ENV];
383
+ // by default
384
+ var hostname = _config.hostname + _config.server.webroot;
385
+ var scheme = hostname.match(/^(https|http)/)[0];
386
+ var requestPort = (local.req.headers.port||local.req.headers[':port']);
387
+
388
+ var hostPort = hostname.match(/(\:d+\/|\:\d+)$/);
389
+ hostPort = (hostPort) ? ~~(hostPort[0].replace(/\:/g, '')) : _config.port[_config.server.protocol][_config.server.scheme];
390
+ // Linking bundle B from bundle A wihtout proxy
391
+ var isSpecialCase = (
392
+ getContext('bundle') != _config.bundle
393
+ && requestPort != hostPort
394
+ && local.req.headers[':host'] != process.gina.PROXY_HOST
395
+ ) ? true : false;
396
+
397
+ if (isSpecialCase) {
398
+ hostname = _config.hostname;
399
+ }
400
+
401
+ // if (
402
+ // isProxyHost
403
+ // && !isSpecialCase
404
+ // ) {
405
+ // // Rewrite hostname vs req.headers.host
406
+ // hostname = scheme + '://'+ (local.req.headers.host||local.req.headers[':host']);
407
+
408
+ // if (
409
+ // !/^(80|443)$/.test(requestPort)
410
+ // && !new RegExp(requestPort+'$').test(hostname)
411
+ // ) {
412
+ // hostname += ':'+ requestPort;
413
+ // }
414
+ // }
415
+
416
+ set('page.environment.hostname', hostname);
417
+ // Updating _config.rootDomain - 2024/04/15
418
+ // _config.rootDomain = domainLib.getRootDomain(hostname).value;
419
+
420
+
421
+ set('page.environment.rootDomain', _config.rootDomain);
422
+ set('page.environment.webroot', options.conf.server.webroot);
423
+
424
+ if ( typeof(ctx.config.envConf._isRoutingUpdateNeeded) == 'undefined') {
425
+ ctx.config.envConf._isRoutingUpdateNeeded = false;
426
+ }
427
+
428
+ if (
429
+ typeof(ctx.config.envConf._proxyHostname) == 'undefined'
430
+ ||
431
+ hostname != ctx.config.envConf._proxyHostname
432
+ ) {
433
+ ctx.config.envConf._proxyHostname = (isProxyHost) ? hostname : null;
434
+ ctx.config.envConf._isRoutingUpdateNeeded = true;
435
+ }
436
+
437
+ if ( typeof(ctx.config.envConf._routingCloned) == 'undefined' ) {
438
+ ctx.config.envConf._routingCloned = JSON.clone(ctx.config.envConf.routing);
439
+ }
440
+
441
+ var routing = local.options.conf.routing = ctx.config.envConf._routingCloned; // all routes
442
+ if ( /^true$/i.test(ctx.config.envConf._isRoutingUpdateNeeded) ) {
443
+
444
+ for (let r in ctx.config.envConf.routing) {
445
+ if ( isProxyHost ) {
446
+ local.options.conf.routing[r].host = hostname.replace(/^(https|http)\:\/\//, '');
447
+ local.options.conf.routing[r].hostname = hostname;
448
+ let scheme = hostname.match(/^(https|http)/)[0];
449
+ local.options.conf.routing[r].hostname = scheme + '://'+ (local.req.headers.host||local.req.headers[':host']);
450
+ let requestPort = (local.req.headers.port||local.req.headers[':port']);
451
+ if (
452
+ !/^(80|443)$/.test(requestPort)
453
+ && !new RegExp(requestPort+'$').test(local.options.conf.routing[r].hostname)
454
+ ) {
455
+ local.options.conf.routing[r].hostname += ':'+ requestPort
456
+ }
457
+ continue;
458
+ }
459
+ local.options.conf.routing[r].host = ctx.config.envConf.routing[r].host;
460
+ local.options.conf.routing[r].hostname = ctx.config.envConf.routing[r].hostname;
461
+ }
462
+ ctx.config.envConf._isRoutingUpdateNeeded = false;
346
463
 
347
- var routing = local.options.conf.routing = ctx.config.envConf.routing; // all routes
464
+ }
348
465
  set('page.environment.routing', encodeRFC5987ValueChars(JSON.stringify(routing))); // export for GFF
349
466
  //reverseRouting
350
467
  var reverseRouting = local.options.conf.reverseRouting = ctx.config.envConf.reverseRouting; // all routes
@@ -354,9 +471,8 @@ function SuperController(options) {
354
471
  set('page.environment.forms', encodeRFC5987ValueChars(JSON.stringify(forms))); // export for GFF
355
472
  set('page.forms', options.conf.content.forms);
356
473
 
357
- set('page.environment.hostname', ctx.config.envConf[options.conf.bundle][process.env.NODE_ENV].hostname);
358
- set('page.environment.rootDomain', ctx.config.envConf[options.conf.bundle][process.env.NODE_ENV].rootDomain);
359
- set('page.environment.webroot', options.conf.server.webroot);
474
+
475
+
360
476
  set('page.environment.bundle', options.conf.bundle);
361
477
  set('page.environment.project', options.conf.projectName);
362
478
  set('page.environment.protocol', options.conf.server.protocol);
@@ -426,7 +542,7 @@ function SuperController(options) {
426
542
  // user locale
427
543
  options.conf.locale = new Collection(userLocales).findOne({ short: userCountryCode }) || {};
428
544
 
429
- //set('page.date.now', new Date().format("isoDateTime"));
545
+ // current date
430
546
  if ( typeof(options.conf.locale) == 'undefined' || !options.conf.locale ) {
431
547
  options.conf.locale = {}
432
548
  }
@@ -437,11 +553,6 @@ function SuperController(options) {
437
553
  set('page.view.lang', userCulture);
438
554
  }
439
555
 
440
- if ( !getContext('isProxyHost') ) {
441
- var isProxyHost = ( typeof(req.headers.host) != 'undefined' && local.options.conf.server.scheme +'://'+ req.headers.host != local.options.conf.hostname || typeof(req.headers[':authority']) != 'undefined' && local.options.conf.server.scheme +'://'+ req.headers[':authority'] != local.options.conf.hostname ) ? true : false;
442
- setContext('isProxyHost', isProxyHost);
443
- isProxyHost = null;
444
- }
445
556
 
446
557
  //TODO - detect when to use swig
447
558
  var dir = null;
@@ -451,7 +562,7 @@ function SuperController(options) {
451
562
  var swigOptions = {
452
563
  autoescape : ( typeof(local.options.autoescape) != 'undefined') ? local.options.autoescape : false,
453
564
  // `memory` is no working yet ... advanced rendering setup required
454
- // cache : (local.options.cacheless) ? false : 'memory'
565
+ // cache : (local.options.isCacheless) ? false : 'memory'
455
566
  cache : false
456
567
  };
457
568
  if (dir) {
@@ -839,12 +950,28 @@ function SuperController(options) {
839
950
  return;
840
951
  }
841
952
 
953
+ var localRequestPort = local.req.headers.port || local.req.headers[':port'];
842
954
  var isProxyHost = (
843
955
  typeof(local.req.headers.host) != 'undefined'
844
- && localOptions.conf.server.scheme +'://'+ local.req.headers.host != localOptions.conf.hostname
845
- || typeof(local.req.headers[':authority']) != 'undefined'
846
- && localOptions.conf.server.scheme +'://'+ local.req.headers[':authority'] != localOptions.conf.hostname
956
+ && typeof(localRequestPort) != 'undefined'
957
+ && /^(80|443)$/.test(localRequestPort)
958
+ && localOptions.conf.server.scheme +'://'+ local.req.headers.host+':'+ localRequestPort != localOptions.conf.hostname.replace(/\:\d+$/, '') +':'+ localOptions.conf.server.port
959
+ ||
960
+ typeof(local.req.headers[':authority']) != 'undefined'
961
+ && localOptions.conf.server.scheme +'://'+ local.req.headers[':authority'] != localOptions.conf.hostname
962
+ ||
963
+ typeof(local.req.headers.host) != 'undefined'
964
+ && typeof(localRequestPort) != 'undefined'
965
+ && /^(80|443)$/.test(localRequestPort)
966
+ && local.req.headers.host == localOptions.conf.host
967
+ ||
968
+ typeof(local.req.headers['x-nginx-proxy']) != 'undefined'
969
+ && /^true$/i.test(local.req.headers['x-nginx-proxy'])
970
+ ||
971
+ typeof(process.gina.PROXY_HOSTNAME) != 'undefined'
847
972
  ) ? true : false;
973
+
974
+
848
975
  // setup swig default filters
849
976
  var filters = SwigFilters({
850
977
  options : JSON.clone(localOptions),
@@ -883,6 +1010,7 @@ function SuperController(options) {
883
1010
  , XHRData = null
884
1011
  , XHRView = null
885
1012
  , isDeferModeEnabled = null
1013
+ , hasExternalsPlugins = null
886
1014
  , viewInfos = null
887
1015
  , filename = null
888
1016
  , isWithSwigLayout = null
@@ -898,7 +1026,9 @@ function SuperController(options) {
898
1026
  if (isWithoutLayout) {
899
1027
  data.page.view.layout = layoutPath;
900
1028
  }
901
- } else { // without layout case
1029
+ }
1030
+ // without layout case
1031
+ else {
902
1032
 
903
1033
  // by default
904
1034
  layoutPath = localOptions.template.layout;
@@ -926,10 +1056,8 @@ function SuperController(options) {
926
1056
  self.throwError(err);
927
1057
  return;
928
1058
  }
929
-
930
1059
  }
931
1060
 
932
-
933
1061
  var isLoadingPartial = false;
934
1062
  try {
935
1063
  assets = {assets:"${assets}"};
@@ -1023,6 +1151,7 @@ function SuperController(options) {
1023
1151
  // }
1024
1152
 
1025
1153
  isDeferModeEnabled = localOptions.template.javascriptsDeferEnabled || localOptions.conf.content.templates._common.javascriptsDeferEnabled || false;
1154
+ hasExternalsPlugins = (localOptions.template.externalPlugins.length > 0) ? true : false;
1026
1155
 
1027
1156
  // iframe case - without HTML TAG
1028
1157
  if (!self.isXMLRequest() && !/\<html/.test(layout) ) {
@@ -1092,8 +1221,8 @@ function SuperController(options) {
1092
1221
  + '{%- set userDataInspector.view.scripts = "ignored-by-toolbar" -%}'
1093
1222
  + '{%- set userDataInspector.view.stylesheets = "ignored-by-toolbar" -%}'
1094
1223
  + '{%- set userDataInspector.view.assets = '+ JSON.stringify(assets) +' -%}'
1095
- + '{%- include "'+ getPath('gina').core +'/asset/plugin/dist/vendor/gina/html/toolbar.html" with { gina: ginaDataInspector, user: userDataInspector } -%}'// jshint ignore:line
1096
1224
  + '{# END Gina Toolbar #}'
1225
+ + '{%- include "'+ getPath('gina').core +'/asset/plugin/dist/vendor/gina/html/toolbar.html" with { gina: ginaDataInspector, user: userDataInspector } -%}'// jshint ignore:line
1097
1226
  ;
1098
1227
 
1099
1228
 
@@ -1124,10 +1253,18 @@ function SuperController(options) {
1124
1253
  if (isLoadingPartial) {
1125
1254
  layout += '\t{{ page.view.scripts }}';
1126
1255
  } else {
1256
+ // placed in the HEAD
1127
1257
  if ( isDeferModeEnabled ) {
1128
1258
  layout = layout.replace(/\<\/head\>/i, '\t{{ page.view.scripts }}\n\t</head>');
1129
- } else { // placed in the BODY
1259
+ }
1260
+ // placed in the BODY
1261
+ else {
1130
1262
  layout = layout.replace(/\<\/body\>/i, '\t{{ page.view.scripts }}\n</body>');
1263
+ if (hasExternalsPlugins) {
1264
+ for (let i =0, len = localOptions.template.externalPlugins.length; i<len; i++) {
1265
+ layout = layout.replace(/\<\/head\>/i, '\t'+ localOptions.template.externalPlugins +'\n</head>');
1266
+ }
1267
+ }
1131
1268
  }
1132
1269
  }
1133
1270
 
@@ -1173,6 +1310,11 @@ function SuperController(options) {
1173
1310
  // layout = layout.replace(/\<\/head\>/i, '\t{{ page.view.scripts }}\n\t</head>');
1174
1311
  // } else { // placed in the BODY
1175
1312
  // layout = layout.replace(/\<\/body\>/i, '\t{{ page.view.scripts }}\n</body>');
1313
+ // if (hasExternalsPlugins) {
1314
+ // for (let i =0, len = localOptions.template.externalPlugins.length; i<len; i++) {
1315
+ // layout = layout.replace(/\<\/head\>/i, '\t'+ localOptions.template.externalPlugins +'\n</head>');
1316
+ // }
1317
+ // }
1176
1318
  // }
1177
1319
  // }
1178
1320
 
@@ -1189,11 +1331,18 @@ function SuperController(options) {
1189
1331
  layout += '\t'+ localOptions.template.ginaLoader +'\n';
1190
1332
  }
1191
1333
  } else {
1334
+ // placed in the HEAD
1192
1335
  if ( isDeferModeEnabled && /\<\/head\>/i.test(layout) ) { // placed in the HEAD
1193
1336
  layout = layout.replace(/\<\/head\>/i, '\t{{ page.view.scripts }}\n\t</head>');
1194
-
1195
- } else { // placed in the BODY
1337
+ }
1338
+ // placed in the BODY
1339
+ else {
1196
1340
  layout = layout.replace(/\<\/body\>/i, '\t{{ page.view.scripts }}\n</body>');
1341
+ if (hasExternalsPlugins) {
1342
+ for (let i =0, len = localOptions.template.externalPlugins.length; i<len; i++) {
1343
+ layout = layout.replace(/\<\/head\>/i, '\t'+ localOptions.template.externalPlugins +'\n</head>');
1344
+ }
1345
+ }
1197
1346
  }
1198
1347
  // ginaLoader cannot be deferred
1199
1348
  if ( !localOptions.template.javascriptsExcluded || localOptions.template.javascriptsExcluded != '**' ) {
@@ -1295,6 +1444,40 @@ function SuperController(options) {
1295
1444
  ) {
1296
1445
  layout = layout.replace('{"assets":"${assets}"}', assets );
1297
1446
  }
1447
+
1448
+ if ( !self.isCacheless() ) {
1449
+ var links = local.options.template.h2Links;
1450
+ for (let l in localOptions.template.assets) {
1451
+ let link = localOptions.template.assets[l]
1452
+ if (
1453
+ /^_/.test(l)
1454
+ || typeof(link.as) == 'undefined'
1455
+ || typeof(link.as) != 'undefined'
1456
+ && link.as != 'null'
1457
+ && !link.isAvailable
1458
+ || !link.as
1459
+ ) {
1460
+ // ignoring
1461
+ continue;
1462
+ }
1463
+
1464
+ links += '<'+ l +'>; as='+ link.as +'; '
1465
+ if ( link.imagesrcset) {
1466
+ links += 'imagesrcset='+ link.imagesrcset +'; ';
1467
+ }
1468
+ if ( link.imagesizes) {
1469
+ links += 'imagesizes='+ link.imagesizes +'; ';
1470
+ }
1471
+ links += 'rel=preload,'
1472
+
1473
+ }
1474
+ if ( /\,$/.test(links) ) {
1475
+ links = links.substring(0, links.length-1);
1476
+ }
1477
+ local.res.setHeader('link', links);
1478
+ links = null;
1479
+ }
1480
+
1298
1481
  assets = null;
1299
1482
 
1300
1483
  } catch (err) {
@@ -1577,7 +1760,7 @@ function SuperController(options) {
1577
1760
 
1578
1761
  ++_count;
1579
1762
  if (k == len-1) {
1580
- str = str.substr(0, str.length-1);
1763
+ str = str.substring(0, str.length-1);
1581
1764
  str += "\"_content_\"";
1582
1765
  for (let c = 0; c<_count; ++c) {
1583
1766
  str += "}"
@@ -1619,22 +1802,35 @@ function SuperController(options) {
1619
1802
  var authority = ( typeof(local.req.headers['x-forwarded-proto']) != 'undefined' ) ? local.req.headers['x-forwarded-proto'] : local.options.conf.server.scheme;
1620
1803
  authority += '://'+ local.req.headers.host;
1621
1804
  var useWebroot = false;
1622
- if ( !/^\/$/.test(local.options.conf.server.webroot) && local.options.conf.server.webroot.length > 0 && local.options.conf.hostname.replace(/\:\d+$/, '') == authority ) {
1805
+ if (
1806
+ !/^\/$/.test(local.options.conf.server.webroot)
1807
+ && local.options.conf.server.webroot.length > 0
1808
+ // && local.options.conf.hostname.replace(/\:\d+$/, '') == authority
1809
+ ) {
1623
1810
  useWebroot = true
1624
1811
  }
1625
1812
  authority = null;
1626
1813
 
1627
1814
  var reURL = new RegExp('^'+ local.options.conf.server.webroot);
1628
1815
 
1629
- var cssStr = '', jsStr = '';
1630
-
1816
+ var cssStr = ''
1817
+ , jsStr = ''
1818
+ ;
1631
1819
  //Get css
1632
1820
  if( viewConf.stylesheets ) {
1633
- cssStr = getNodeRes('css', viewConf.stylesheets, useWebroot, reURL)
1821
+ // cssStr = getNodeRes('css', viewConf.stylesheets, useWebroot, reURL);
1822
+ // Fixed on 2025-03-08: ordered by route, making sure that _common could all be loaded first
1823
+ var cssColl = new Collection(viewConf.stylesheets).orderBy({route: 'asc'})
1824
+ cssStr = getNodeRes('css', cssColl, useWebroot, reURL);
1825
+ cssColl = null;
1634
1826
  }
1635
1827
  //Get js
1636
1828
  if( viewConf.javascripts ) {
1637
- jsStr = getNodeRes('js', viewConf.javascripts, useWebroot, reURL)
1829
+ // jsStr = getNodeRes('js', viewConf.javascripts, useWebroot, reURL);
1830
+ // Fixed on 2025-03-08: ordered by route, making sure that _common could all be loaded first
1831
+ var jsColl = new Collection(viewConf.javascripts).orderBy({route: 'asc'})
1832
+ jsStr = getNodeRes('js', jsColl, useWebroot, reURL);
1833
+ jsColl = null;
1638
1834
  }
1639
1835
 
1640
1836
  set('page.view.stylesheets', cssStr);
@@ -1651,7 +1847,8 @@ function SuperController(options) {
1651
1847
  * @param {string} type
1652
1848
  * @param {string} resStr
1653
1849
  * @param {array} resArr
1654
- * @param {object} resObj
1850
+ * @param {boolean} useWebroot
1851
+ * @param {object} reURL - RegExp for webroot
1655
1852
  *
1656
1853
  * @returns {object} content
1657
1854
  *
@@ -1663,29 +1860,69 @@ function SuperController(options) {
1663
1860
  , rLen = resArr.length
1664
1861
  , obj = null
1665
1862
  , str = ''
1863
+ , isProxyHost = getContext('isProxyHost')
1666
1864
  , requestHost = ( /http\/2/.test(local.options.conf.server.protocol) )
1667
1865
  ? local.req.headers[':host']
1668
1866
  : local.req.headers.host
1669
1867
  , hostname = ( typeof(requestHost) != 'undefined' && local.options.conf.host != requestHost)
1670
- ? local.options.conf.server.scheme +'://'+ requestHost + ':'+ local.options.conf.server.port
1868
+ ? local.options.conf.server.scheme +'://'+ requestHost
1671
1869
  : local.options.conf.hostname
1870
+ , scheme = hostname.match(/^(https|http)/)[0]
1672
1871
  ;
1872
+ var requestPort = (local.req.headers.port||local.req.headers[':port']);
1873
+ var hostPort = local.options.conf.hostname.match(/(\:d+\/|\:\d+)$/);
1874
+ hostPort = (hostPort) ? ~~(hostPort[0].replace(/\:/g, '')) : local.options.conf.port[local.options.conf.server.protocol][local.options.conf.server.scheme];
1875
+ // Linking bundle B from bundle A wihtout proxy
1876
+ var isSpecialCase = (
1877
+ getContext('bundle') != local.options.conf.bundle
1878
+ && requestPort != hostPort
1879
+ && local.req.headers[':host'] != process.gina.PROXY_HOST
1880
+ ) ? true : false;
1881
+
1882
+ if (isSpecialCase) {
1883
+ hostname = local.options.conf.hostname
1884
+ }
1885
+
1886
+
1887
+ if (
1888
+ isProxyHost
1889
+ && !isSpecialCase
1890
+ ) {
1891
+
1892
+ hostname = scheme + '://'+ (local.req.headers.host||local.req.headers[':host']||process.gina.PROXY_HOST);
1893
+
1894
+ if (
1895
+ !/^(80|443)$/.test(requestPort)
1896
+ && !new RegExp(requestPort+'$').test(hostname)
1897
+ ) {
1898
+ hostname += ':'+ requestPort;
1899
+ }
1900
+ }
1901
+
1673
1902
  switch(type){
1674
1903
  case 'css':
1675
1904
  for (; r < rLen; ++r) {
1676
1905
  obj = resArr[r];
1677
1906
  if (useWebroot && !reURL.test(obj.url) ) {
1678
- obj.url = local.options.conf.server.webroot + obj.url.substr(1);
1907
+ obj.url = local.options.conf.server.webroot + obj.url.substring(1);
1908
+ }
1909
+ // HTTP2 Push via Link
1910
+ if (
1911
+ /http\/2/.test(local.options.conf.server.protocol)
1912
+ && !self.isCacheless()
1913
+ ) {
1914
+ local.options.template.h2Links += '<'+ obj.url +'>; as=style; rel=preload,'
1679
1915
  }
1680
1916
  // TODO - add support for cdn
1681
1917
  if (!/\:\/\//.test(obj.url) ) {
1682
1918
  obj.url = hostname + obj.url;
1683
1919
  }
1684
1920
 
1685
- if (obj.media)
1921
+ if (obj.media) {
1686
1922
  str += '\n\t\t<link href="'+ obj.url +'" media="'+ obj.media +'" rel="'+ obj.rel +'" type="'+ obj.type +'">';
1687
- else
1923
+ } else {
1688
1924
  str += '\n\t\t<link href="'+ obj.url +'" rel="'+ obj.rel +'" type="'+ obj.type +'">';
1925
+ }
1689
1926
  }
1690
1927
  break;
1691
1928
 
@@ -1695,13 +1932,34 @@ function SuperController(options) {
1695
1932
  for (; r < rLen; ++r) {
1696
1933
  obj = resArr[r];
1697
1934
  if (useWebroot && !reURL.test(obj.url) ) {
1698
- obj.url = local.options.conf.server.webroot + obj.url.substr(1);
1935
+ obj.url = local.options.conf.server.webroot + obj.url.substring(1);
1936
+ }
1937
+ // HTTP2 Push via Link
1938
+ if (
1939
+ /http\/2/.test(local.options.conf.server.protocol)
1940
+ && !self.isCacheless()
1941
+ ) {
1942
+ local.options.template.h2Links += '<'+ obj.url +'>; as=script; rel=preload,'
1699
1943
  }
1700
1944
  // TODO - add support for cdn
1701
1945
  if (!/\:\/\//.test(obj.url) ) {
1702
1946
  obj.url = hostname + obj.url;
1703
1947
  }
1704
- str += '\n\t\t<script'+ deferMode +' type="'+ obj.type +'" src="'+ obj.url +'"></script>'
1948
+
1949
+
1950
+ if ( /\/jquery\.(.*)\.(min\.js|js)$/i.test(obj.url) ) {
1951
+ console.warn('jQuery Plugin found in templates.json !\nIf you want to load it before [gina.min.js], you should declare it at the top of your handler using requireJS or add property "isExternalPlugin: true" in your templates.json, under: '+ (obj.route || local.req.routing.rule) +' .');
1952
+ }
1953
+ // Allow jQuery & other external plugins to be loaded in the HEAD section before gina
1954
+ if (
1955
+ obj.isExternalPlugin
1956
+ ) {
1957
+ local.options.template.externalPlugins.splice(1, 0, '\n\t\t<script'+ deferMode +' type="'+ obj.type +'" src="'+ obj.url +'"></script>');
1958
+ }
1959
+ else {
1960
+ // normal case
1961
+ str += '\n\t\t<script'+ deferMode +' type="'+ obj.type +'" src="'+ obj.url +'"></script>';
1962
+ }
1705
1963
  }
1706
1964
  break;
1707
1965
  }
@@ -1797,7 +2055,7 @@ function SuperController(options) {
1797
2055
 
1798
2056
  if (
1799
2057
  staticProps.isStaticFilename && staticsArr.indexOf(url) > -1
1800
- || staticProps.isStaticFilename && staticsArr.indexOf( url.replace(url.substr(url.lastIndexOf('/')+1), '') ) > -1
2058
+ || staticProps.isStaticFilename && staticsArr.indexOf( url.replace(url.substring(url.lastIndexOf('/')+1), '') ) > -1
1801
2059
  || staticProps.isStaticFilename && staticsArr.indexOf(staticProps.firstLevel) > -1
1802
2060
  ) {
1803
2061
  staticProps = null;
@@ -1895,9 +2153,9 @@ function SuperController(options) {
1895
2153
  // ignoreWebRoot = false
1896
2154
  // } else
1897
2155
  if (typeof(res) === 'string' || typeof(res) === 'number' || typeof(res) === 'boolean') {
1898
- if ( /true|1/.test(res) ) {
2156
+ if ( /^(true|1)$/i.test(res) ) {
1899
2157
  ignoreWebRoot = true
1900
- } else if ( /false|0/.test(res) ) {
2158
+ } else if ( /^(false|0)$/i.test(res) ) {
1901
2159
  ignoreWebRoot = false
1902
2160
  } else {
1903
2161
  res = local.res;
@@ -1918,13 +2176,13 @@ function SuperController(options) {
1918
2176
 
1919
2177
  }
1920
2178
 
1921
- if ( req.substr(0,1) === '/') { // is relative (not checking if the URI is defined in the routing.json)
1922
- // if (wroot.substr(wroot.length-1,1) == '/') {
1923
- // wroot = wroot.substr(wroot.length-1,1).replace('/', '')
2179
+ if ( req.substring(0,1) === '/') { // is relative (not checking if the URI is defined in the routing.json)
2180
+ // if (wroot.substring(wroot.length-1,1) == '/') {
2181
+ // wroot = wroot.substring(wroot.length-1,1).replace('/', '')
1924
2182
  // }
1925
2183
 
1926
2184
  if ( /^\//.test(req) && !ignoreWebRoot )
1927
- req = req.substr(1);
2185
+ req = req.substring(1);
1928
2186
 
1929
2187
  rte = ( ignoreWebRoot != null && ignoreWebRoot ) ? req : wroot + req;
1930
2188
  // cleaning url in case of ?param=value
@@ -2015,11 +2273,32 @@ function SuperController(options) {
2015
2273
 
2016
2274
  if ( !self.forward404Unless(condition, req, res) ) { // forward to 404 if bad route
2017
2275
 
2018
- var isProxyHost = ( typeof(local.req.headers.host) != 'undefined' && local.options.conf.server.scheme +'://'+ local.req.headers.host != local.options.conf.hostname || typeof(local.req.headers[':authority']) != 'undefined' && local.options.conf.server.scheme +'://'+ local.req.headers[':authority'] != local.options.conf.hostname ) ? true : false;
2019
- var hostname = (isProxyHost) ? ctx.config.envConf[bundle][env].hostname.replace(/\:\d+$/, '') : ctx.config.envConf[bundle][env].hostname;
2276
+ var localRequestPort = local.req.headers.port || local.req.headers[':port'];
2277
+ var isProxyHost = (
2278
+ typeof(local.req.headers.host) != 'undefined'
2279
+ && typeof(localRequestPort) != 'undefined'
2280
+ && /^(80|443)$/.test(localRequestPort)
2281
+ && local.options.conf.server.scheme +'://'+ local.req.headers.host +':'+ localRequestPort != local.options.conf.hostname.replace(/\:\d+$/, '') +':'+ local.options.conf.server.port
2282
+ ||
2283
+ typeof(local.req.headers[':authority']) != 'undefined'
2284
+ && local.options.conf.server.scheme +'://'+ local.req.headers[':authority'] != local.options.conf.hostname
2285
+ ||
2286
+ typeof(local.req.headers.host) != 'undefined'
2287
+ && typeof(localRequestPort) != 'undefined'
2288
+ && /^(80|443)$/.test(localRequestPort)
2289
+ && req.headers.host == local.options.conf.host
2290
+ ||
2291
+ typeof(local.req.headers['x-nginx-proxy']) != 'undefined'
2292
+ && /^true$/i.test(local.req.headers['x-nginx-proxy'])
2293
+ ||
2294
+ typeof(process.gina.PROXY_HOSTNAME) != 'undefined'
2295
+ ) ? true : false;
2296
+
2297
+ // var isProxyHost = getContext('isProxyHost');
2298
+ var hostname = (isProxyHost)
2299
+ ? process.gina.PROXY_HOSTNAME
2300
+ : ctx.config.envConf[bundle][env].hostname;
2020
2301
 
2021
- // if ( !/\:\d+$/.test(req.headers.host) )
2022
- // hostname = hostname.replace(/\:\d+$/, '');
2023
2302
 
2024
2303
  if (route) { // will go with route first
2025
2304
 
@@ -2078,7 +2357,7 @@ function SuperController(options) {
2078
2357
  originalMethod && !/GET/i.test(originalMethod)
2079
2358
  ) { // trying to redirect using the wrong method ?
2080
2359
 
2081
- console.warn(new Error('Your are trying to redirect using the wrong method: `'+ req.method+'`.\nThis can often occur while redirecting from a controller to another controller or from a bundle to another.\nA redirection is not permitted in this scenario.\nD\'ont panic :)\nSwitching request method to `GET` method instead.\n').message);
2360
+ console.warn(new Error('Your are trying to redirect using the wrong method: `'+ req.method+'`.\nThis can often occur while redirecting from a controller to another controller or from a bundle to another.\nA redirection is not permitted in this scenario.\nDon\'t panic :)\nSwitching request method to `GET` method instead.\n').message);
2082
2361
  method = local.req.method = self.setRequestMethod('GET', conf);
2083
2362
  code = 303;
2084
2363
  }
@@ -2326,7 +2605,7 @@ function SuperController(options) {
2326
2605
 
2327
2606
  if ( /\:\/\//.test(url) ) {
2328
2607
  scheme = url.match(/^\w+\:/)[0];
2329
- scheme = scheme.substr(0, scheme.length-1);
2608
+ scheme = scheme.substring(0, scheme.length-1);
2330
2609
 
2331
2610
  if ( !/^http/.test(scheme) ) {
2332
2611
  self.throwError(local.res, 500, new Error('[ '+ scheme +' ] Scheme not supported. Ref.: `http` or `https` only'));
@@ -2344,7 +2623,7 @@ function SuperController(options) {
2344
2623
  //defining port
2345
2624
  var port = url.match(/\:\d+\//) || null;
2346
2625
  if ( port != null ) {
2347
- port = port[0].substr(1, port[0].length-2);
2626
+ port = port[0].substring(1, port[0].length-2);
2348
2627
  requestOptions.port = ~~port;
2349
2628
  }
2350
2629
 
@@ -2376,7 +2655,7 @@ function SuperController(options) {
2376
2655
  opt.contentDisposition += '; filename=' + filename;
2377
2656
  }
2378
2657
 
2379
- var ext = filename.match(/\.\w+$/)[0].substr(1)
2658
+ var ext = filename.match(/\.\w+$/)[0].substring(1)
2380
2659
  , contentType = null
2381
2660
  , tmp = _(GINA_TMPDIR +'/'+ filename, true)
2382
2661
  ;
@@ -2659,7 +2938,8 @@ function SuperController(options) {
2659
2938
  ) {
2660
2939
  return false
2661
2940
  }
2662
- self.isProcessingError = false; // by default
2941
+ // by default
2942
+ self.isProcessingError = false;
2663
2943
 
2664
2944
  var queryData = {}
2665
2945
  , defaultOptions = local.query.options
@@ -2669,9 +2949,8 @@ function SuperController(options) {
2669
2949
 
2670
2950
  // options must be used as a copy in case of multiple calls of self.query(options, ...)
2671
2951
  options = merge(JSON.clone(options), defaultOptions);
2672
- // options = merge(options, defaultOptions);
2673
2952
 
2674
- for (var o in options) {//cleaning
2953
+ for (let o in options) {//cleaning
2675
2954
  if ( typeof(options[o]) == 'undefined' || options[o] == undefined) {
2676
2955
  delete options[o]
2677
2956
  }
@@ -2745,14 +3024,17 @@ function SuperController(options) {
2745
3024
  if ( local.req != null && typeof(local.req.ginaHeaders) != 'undefined' ) {
2746
3025
  // gina form headers
2747
3026
  for (let h in local.req.ginaHeaders.form) {
2748
- let k = h.substr(0,1).toUpperCase() + h.substr(1);
3027
+ let k = h.substring(0,1).toUpperCase() + h.substring(1);
2749
3028
  options.headers['X-Gina-Form-' + k ] = local.req.ginaHeaders.form[h];
2750
3029
  }
2751
3030
  }
2752
3031
 
2753
- var ctx = getContext()
2754
- , protocol = null
2755
- , scheme = null
3032
+ var ctx = getContext()
3033
+ , protocol = null
3034
+ , scheme = null
3035
+ , isProxyHost = getContext('isProxyHost')
3036
+ , bundle = null
3037
+ , webroot = options.webroot || ctx.gina.config.envConf[ctx.bundle][ctx.env].server.webroot;// bundle servers's webroot by default
2756
3038
  ;
2757
3039
  // cleanup options.path
2758
3040
  if (/\:\/\//.test(options.path)) {
@@ -2774,6 +3056,7 @@ function SuperController(options) {
2774
3056
  protocol = protocol.match(/[.a-z 0-9]+/ig)[0];
2775
3057
  scheme = options.scheme || ctx.gina.config.envConf[ctx.bundle][ctx.env].server.scheme;// bundle servers's scheme by default
2776
3058
  scheme = scheme.match(/[a-z 0-9]+/ig)[0];
3059
+
2777
3060
  // retrieve credentials
2778
3061
  if ( typeof(options.ca) == 'undefined' || ! options.ca ) {
2779
3062
  options.ca = ctx.gina.config.envConf[ctx.bundle][ctx.env].server.credentials.ca;
@@ -2782,24 +3065,18 @@ function SuperController(options) {
2782
3065
  //retrieving dynamic host, hostname & port
2783
3066
  if ( /\@/.test(options.hostname) ) {
2784
3067
 
2785
- var bundle = ( options.hostname.replace(/(.*)\:\/\//, '') ).split(/\@/)[0];
2786
-
3068
+ bundle = ( options.hostname.replace(/(.*)\:\/\//, '') ).split(/\@/)[0];
2787
3069
  // No shorcut possible because conf.hostname might differ from user inputs
2788
3070
  options.host = ctx.gina.config.envConf[bundle][ctx.env].host.replace(/(.*)\:\/\//, '').replace(/\:\d+/, '');
2789
3071
  options.hostname = ctx.gina.config.envConf[bundle][ctx.env].hostname;
2790
3072
  options.port = ctx.gina.config.envConf[bundle][ctx.env].server.port;
2791
-
2792
- options.protocol = ctx.gina.config.envConf[bundle][ctx.env].server.protocol;
3073
+ options.protocol = options.protocol || ctx.gina.config.envConf[bundle][ctx.env].server.protocol;
2793
3074
  options.scheme = ctx.gina.config.envConf[bundle][ctx.env].server.scheme;
2794
3075
 
2795
3076
  // retrieve credentials
2796
3077
  if ( typeof(options.ca) == 'undefined' || ! options.ca ) {
2797
3078
  options.ca = ctx.gina.config.envConf[bundle][ctx.env].server.credentials.ca;
2798
3079
  }
2799
-
2800
- // might be != from the bundle requesting
2801
- //options.protocol = ctx.gina.config.envConf[bundle][ctx.env].content.settings.server.protocol || ctx.gina.config.envConf[bundle][ctx.env].server.protocol;
2802
- //options.scheme = ctx.gina.config.envConf[bundle][ctx.env].content.settings.server.scheme || ctx.gina.config.envConf[bundle][ctx.env].server.scheme;
2803
3080
  }
2804
3081
 
2805
3082
  if ( typeof(options.protocol) == 'undefined' ) {
@@ -2813,8 +3090,16 @@ function SuperController(options) {
2813
3090
 
2814
3091
 
2815
3092
  // reformating scheme
2816
- if( !/\:$/.test(options.scheme) )
3093
+ if( !/\:$/.test(options.scheme) ) {
2817
3094
  options.scheme += ':';
3095
+ }
3096
+
3097
+ if (isProxyHost) {
3098
+ // X-Forwarded-Host
3099
+ options.headers['x-forwarded-host'] = process.gina.PROXY_HOST;
3100
+ // X-Forwarded-Proto
3101
+ options.headers['x-forwarded-proto'] = process.gina.PROXY_SCHEME;
3102
+ }
2818
3103
 
2819
3104
  try {
2820
3105
  options.queryData = queryData;
@@ -2826,6 +3111,8 @@ function SuperController(options) {
2826
3111
 
2827
3112
  browser = require(''+ httpLib);
2828
3113
 
3114
+ bundle = null;
3115
+
2829
3116
  if ( /http2/.test(httpLib) ) {
2830
3117
  return handleHTTP2ClientRequest(browser, options, callback);
2831
3118
  } else {
@@ -2839,9 +3126,36 @@ function SuperController(options) {
2839
3126
  }
2840
3127
  self.emit('query#complete', err)
2841
3128
  }
2842
-
2843
3129
  }
2844
3130
 
3131
+ var handleHTTP1ClientRequestv2 = function (browser, options, callback) {
3132
+ var agent = new browser.Agent({ keepAlive: true });
3133
+ var options = {
3134
+ host: options.host,
3135
+ port: options.port,
3136
+ path: options.path,
3137
+ method: 'GET',
3138
+ agent: agent
3139
+ };
3140
+
3141
+ var req = browser.request(options, function(res) {
3142
+ var str = "";
3143
+ var err = false;
3144
+ res.on('data', function (chunk) {
3145
+ str += chunk;
3146
+ });
3147
+ res.on('end', function () {
3148
+ // done
3149
+ return callback( err, data );
3150
+ });
3151
+ });
3152
+ req.write('');
3153
+ req.end();
3154
+ req.on('error', function(error) {
3155
+ err = error
3156
+ });
3157
+ };
3158
+
2845
3159
  var handleHTTP1ClientRequest = function(browser, options, callback) {
2846
3160
 
2847
3161
  var altOpt = JSON.clone(options);
@@ -2849,6 +3163,7 @@ function SuperController(options) {
2849
3163
  altOpt.protocol = options.scheme;
2850
3164
  altOpt.hostname = options.host;
2851
3165
  altOpt.port = options.port;
3166
+ altOpt.maxSockets = options.maxSockets || 1;
2852
3167
  if ( typeof(altOpt.encKey) != 'undefined' ) {
2853
3168
  try {
2854
3169
  altOpt.encKey = fs.readFileSync(options.encKey);
@@ -2930,7 +3245,7 @@ function SuperController(options) {
2930
3245
  return;
2931
3246
  }
2932
3247
  } catch (e) {
2933
- var infos = local.options, controllerName = infos.controller.substr(infos.controller.lastIndexOf('/'));
3248
+ var infos = local.options, controllerName = infos.controller.substring(infos.controller.lastIndexOf('/'));
2934
3249
  var msg = 'Controller Query Exception while catching back.\nBundle: '+ infos.bundle +'\nController File: /controllers'+ controllerName +'\nControl: this.'+ infos.control +'(...)\n\r' + e.stack;
2935
3250
  var exception = new Error(msg);
2936
3251
  exception.status = 500;
@@ -3024,7 +3339,7 @@ function SuperController(options) {
3024
3339
  cb(err, data)
3025
3340
  }
3026
3341
  } catch (e) {
3027
- var infos = local.options, controllerName = infos.controller.substr(infos.controller.lastIndexOf('/'));
3342
+ var infos = local.options, controllerName = infos.controller.substring(infos.controller.lastIndexOf('/'));
3028
3343
  var msg = 'Controller Query Exception while catching back.\nBundle: '+ infos.bundle +'\nController File: /controllers'+ controllerName +'\nControl: this.'+ infos.control +'(...)\n\r' + e.stack;
3029
3344
  var exception = new Error(msg);
3030
3345
  exception.status = 500;
@@ -3098,10 +3413,11 @@ function SuperController(options) {
3098
3413
 
3099
3414
  var body = Buffer.from(options.queryData);
3100
3415
  options.headers['content-length'] = body.length;
3416
+ // options.headers['proxy-connection'] = 'Keep-Alive';
3417
+ options.headers['connection'] = 'keep-alive';
3101
3418
  delete options.queryData;
3102
3419
 
3103
3420
 
3104
-
3105
3421
  const client = browser.connect(options.hostname, options);
3106
3422
 
3107
3423
 
@@ -3289,7 +3605,7 @@ function SuperController(options) {
3289
3605
  }
3290
3606
 
3291
3607
  } catch (e) {
3292
- var infos = local.options, controllerName = infos.controller.substr(infos.controller.lastIndexOf('/'));
3608
+ var infos = local.options, controllerName = infos.controller.substring(infos.controller.lastIndexOf('/'));
3293
3609
  var msg = 'Controller Query Exception while catching back.\nBundle: '+ infos.bundle +'\nController File: /controllers'+ controllerName +'\nControl: this.'+ infos.control +'(...)\n\r' + e.stack;
3294
3610
  var exception = new Error(msg);
3295
3611
  exception.status = 500;
@@ -3367,7 +3683,7 @@ function SuperController(options) {
3367
3683
  cb(err, data)
3368
3684
  }
3369
3685
  } catch (e) {
3370
- var infos = local.options, controllerName = infos.controller.substr(infos.controller.lastIndexOf('/'));
3686
+ var infos = local.options, controllerName = infos.controller.substring(infos.controller.lastIndexOf('/'));
3371
3687
  var msg = 'Controller Query Exception while catching back.\nBundle: '+ infos.bundle +'\nController File: /controllers'+ controllerName +'\nControl: this.'+ infos.control +'(...)\n\r' + e.stack;
3372
3688
  var exception = new Error(msg);
3373
3689
  exception.status = 500;
@@ -3502,11 +3818,11 @@ function SuperController(options) {
3502
3818
  project = route.param.project;
3503
3819
  } // TODO - add support for project pointer : getContext('gina').projects[project]
3504
3820
  if (/\@(.*)$/.test(route.param.url)) {
3505
- var targetedBundle = route.param.url.substr(route.param.url.lastIndexOf('@')+1);
3821
+ var targetedBundle = route.param.url.substring(route.param.url.lastIndexOf('@')+1);
3506
3822
  hostname = targetedBundle +'@'+ project;
3507
3823
  port = hostname;
3508
3824
  var webroot = getContext('gina').config.envConf[targetedBundle][local.options.conf.env].server.webroot;
3509
- path = (/\/$/.test(webroot)) ? webroot.substr(0, webroot.length-1) : webroot;
3825
+ path = (/\/$/.test(webroot)) ? webroot.substring(0, webroot.length-1) : webroot;
3510
3826
  } else {
3511
3827
  hostname = route.param.hostname;
3512
3828
  port = route.param.port;
@@ -3560,24 +3876,28 @@ function SuperController(options) {
3560
3876
  *
3561
3877
  * */
3562
3878
  this.getConfig = function(name) {
3879
+ var tmp = null;
3563
3880
  if ( typeof(name) != 'undefined' ) {
3564
3881
  try {
3565
- // needs to be read only
3566
- //config = JSON.clone(local.options.conf.content[name]);
3567
- //config = Object.freeze(local.options.conf.content[name]);
3568
- //Object.seal(local.options.conf.content[name]);
3569
- //Object.freeze(local.options.conf.content[name]);
3570
- // if ( self.isCacheless() ) {
3571
- // }
3572
- return JSON.clone(local.options.conf.content[name]);
3882
+ // Needs to be read only
3883
+ tmp = JSON.clone(local.options.conf.content[name]);
3573
3884
  } catch (err) {
3574
3885
  return undefined;
3575
3886
  }
3576
3887
  } else {
3577
- // config = JSON.stringify(local.options.conf);
3578
- // return JSON.parse(config)
3579
- return JSON.clone(local.options.conf);
3888
+ tmp = JSON.clone(local.options.conf);
3889
+ }
3890
+
3891
+ if (
3892
+ getContext('isProxyHost')
3893
+ && typeof(tmp.hostname) != 'undefined'
3894
+ ) {
3895
+ tmp.hostname = process.gina.PROXY_HOSTNAME;
3896
+ tmp.host = process.gina.PROXY_HOST;
3897
+ // tmp.hostname = getContext('gina').config.envConf._proxyHostname
3898
+ // tmp.host = tmp.hostname.replace(/^(https|http)\:\/\//, '');
3580
3899
  }
3900
+ return tmp;
3581
3901
  }
3582
3902
 
3583
3903
  /**
@@ -4002,7 +4322,7 @@ function SuperController(options) {
4002
4322
  //instance: self.serverInstance,
4003
4323
  //template: (routeHasViews) ? bundleConf.content.templates[templateName] : undefined,
4004
4324
  //isUsingTemplate: local.isUsingTemplate,
4005
- //cacheless: cacheless,
4325
+ //isCacheless: isCacheless,
4006
4326
  path: null //, // user custom path : namespace should be ignored | left blank
4007
4327
  //assets: {}
4008
4328
  };
@@ -4228,11 +4548,11 @@ function SuperController(options) {
4228
4548
  , ext = null
4229
4549
  , isHtmlContent = false
4230
4550
  , hasCustomErrorFile = false
4231
- , eCode = code.toString().substr(0,1) + 'xx'
4551
+ , eCode = code.toString().substring(0,1) + 'xx'
4232
4552
  ;
4233
- var extArr = url.substr(url.lastIndexOf('.')).match(/(\.[A-Za-z0-9]+)/);
4553
+ var extArr = url.substring(url.lastIndexOf('.')).match(/(\.[A-Za-z0-9]+)/);
4234
4554
  if (extArr) {
4235
- ext = extArr[0].substr(1);
4555
+ ext = extArr[0].substring(1);
4236
4556
  }
4237
4557
  if ( !ext || /^(html|htm)$/i.test(ext) ) {
4238
4558
  isHtmlContent = true;
@@ -4390,7 +4710,7 @@ function SuperController(options) {
4390
4710
  return next();
4391
4711
  }
4392
4712
 
4393
- if ( /http\/2/.test(protocol) ) {
4713
+ if ( stream && /http\/2/.test(protocol) ) {
4394
4714
  return stream.end();
4395
4715
  }
4396
4716