gina 0.1.1-alpha.18 → 0.1.1-alpha.181

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 (366) hide show
  1. package/AUTHORS +2 -1
  2. package/LICENSE +1 -1
  3. package/README-4Contributors.md +30 -0
  4. package/README.md +208 -32
  5. package/bin/cli +165 -68
  6. package/bin/cli-debug +49 -18
  7. package/bin/cmd +40 -18
  8. package/bin/gina +48 -37
  9. package/framework/{v0.1.1-alpha.18/lib/inherits → v0.1.1-alpha.181}/LICENSE +1 -1
  10. package/framework/v0.1.1-alpha.181/VERSION +1 -0
  11. package/framework/{v0.1.1-alpha.18/core/asset/js/plugin/readme.md → v0.1.1-alpha.181/core/asset/plugin/README.md} +31 -9
  12. package/framework/v0.1.1-alpha.181/core/asset/plugin/dist/vendor/gina/css/gina.min.css +1 -0
  13. package/framework/v0.1.1-alpha.181/core/asset/plugin/dist/vendor/gina/css/gina.min.css.map +1 -0
  14. package/framework/v0.1.1-alpha.181/core/asset/plugin/dist/vendor/gina/html/toolbar.html +251 -0
  15. package/framework/{v0.1.1-alpha.18/core/asset/js/plugin/dist → v0.1.1-alpha.181/core/asset/plugin/dist/vendor/gina/js}/gina.js +3988 -3157
  16. package/framework/v0.1.1-alpha.181/core/asset/plugin/dist/vendor/gina/js/gina.min.js +759 -0
  17. package/framework/v0.1.1-alpha.181/core/asset/plugin/dist/vendor/gina/js/gina.min.js.map +8 -0
  18. package/framework/v0.1.1-alpha.181/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +5 -0
  19. package/framework/v0.1.1-alpha.181/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.map +8 -0
  20. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/config.js +125 -55
  21. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/connectors/couchbase/index.js +373 -259
  22. package/framework/v0.1.1-alpha.181/core/connectors/couchbase/lib/connector.js +22 -0
  23. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/connectors/couchbase/lib/connector.v2.js +51 -51
  24. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/connectors/couchbase/lib/connector.v3.js +51 -51
  25. package/framework/v0.1.1-alpha.181/core/connectors/couchbase/lib/connector.v4.js +384 -0
  26. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/connectors/couchbase/lib/n1ql.js +3 -2
  27. package/framework/v0.1.1-alpha.181/core/connectors/couchbase/lib/session-store.js +22 -0
  28. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/connectors/couchbase/lib/session-store.v3.js +12 -12
  29. package/framework/v0.1.1-alpha.181/core/connectors/couchbase/lib/session-store.v4.js +361 -0
  30. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/controller/controller.js +901 -767
  31. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/dev/index.js +1 -1
  32. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/dev/lib/class.js +1 -1
  33. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/dev/lib/factory.js +2 -2
  34. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/gna.js +13 -9
  35. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/locales/README.md +5 -0
  36. package/framework/v0.1.1-alpha.181/core/locales/dist/region/en.json +5727 -0
  37. package/framework/v0.1.1-alpha.181/core/locales/dist/region/fr.json +11452 -0
  38. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/locales/index.js +2 -2
  39. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/locales/src/make.js +39 -41
  40. package/framework/v0.1.1-alpha.181/core/locales/src/resources/region.mapping.json +43 -0
  41. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/model/entity.js +87 -67
  42. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/model/index.js +16 -16
  43. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/model/template/entityFactory.js +1 -1
  44. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/model/template/index.js +17 -15
  45. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/index.js +1 -1
  46. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/file/package.json +1 -1
  47. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/intl/package.json +1 -1
  48. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/intl/src/main.js +5 -5
  49. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/storage/package.json +1 -1
  50. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/storage/src/main.js +6 -5
  51. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/validator/package.json +1 -1
  52. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/validator/src/form-validator.js +403 -300
  53. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/validator/src/main.js +1296 -1262
  54. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/router.js +98 -90
  55. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/server.isaac.js +184 -179
  56. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/server.js +373 -194
  57. package/framework/v0.1.1-alpha.181/core/template/boilerplate/bundle/config/settings.json +12 -0
  58. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/boilerplate/bundle/config/settings.server.json +4 -4
  59. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/boilerplate/bundle/config/templates.json +4 -4
  60. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/boilerplate/bundle/controllers/controller.content.js +1 -1
  61. package/framework/v0.1.1-alpha.181/core/template/boilerplate/bundle/controllers/setup.js +111 -0
  62. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/boilerplate/bundle/index.js +13 -1
  63. package/framework/v0.1.1-alpha.181/core/template/boilerplate/bundle_templates/html/content/homepage.html +8 -0
  64. package/framework/v0.1.1-alpha.181/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +11 -0
  65. package/framework/v0.1.1-alpha.181/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +8 -0
  66. package/framework/{v0.1.1-alpha.18/core/template/boilerplate/bundle_templates/html/layout → v0.1.1-alpha.181/core/template/boilerplate/bundle_templates/html/layouts}/main.html +10 -3
  67. package/framework/v0.1.1-alpha.181/core/template/command/gina.bat.tpl +8 -0
  68. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/command/gina.tpl +4 -4
  69. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/conf/env.json +11 -0
  70. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/conf/package.json +1 -1
  71. package/framework/v0.1.1-alpha.181/core/template/conf/statics.json +12 -0
  72. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/conf/templates.json +2 -2
  73. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/helpers/console.js +3 -3
  74. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/helpers/context.js +148 -7
  75. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/helpers/dateFormat.js +9 -7
  76. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/helpers/index.js +13 -8
  77. package/framework/v0.1.1-alpha.181/helpers/json/LICENSE +9 -0
  78. package/framework/v0.1.1-alpha.181/helpers/json/README.md +12 -0
  79. package/framework/{v0.1.1-alpha.18/helpers/plugins → v0.1.1-alpha.181/helpers/json}/package.json +2 -2
  80. package/framework/v0.1.1-alpha.181/helpers/json/src/main.js +361 -0
  81. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/helpers/path.js +163 -96
  82. package/framework/{v0.1.1-alpha.18/helpers/json → v0.1.1-alpha.181/helpers/plugins}/package.json +2 -2
  83. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/helpers/plugins/src/api-error.js +23 -23
  84. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/helpers/plugins/src/main.js +3 -3
  85. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/helpers/prototypes.js +46 -38
  86. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/helpers/task.js +21 -14
  87. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/helpers/text.js +2 -2
  88. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/archiver/package.json +1 -1
  89. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/archiver/src/dep/jszip.min.js +3 -3
  90. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/archiver/src/main.js +168 -168
  91. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/aliases.json +4 -1
  92. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/bundle/add.js +79 -22
  93. package/framework/v0.1.1-alpha.181/lib/cmd/bundle/arguments.json +7 -0
  94. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/bundle/help.txt +4 -2
  95. package/framework/v0.1.1-alpha.181/lib/cmd/bundle/list.js +176 -0
  96. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/bundle/remove.js +22 -22
  97. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/bundle/start.js +264 -46
  98. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/bundle/stop.js +93 -74
  99. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/env/list.js +20 -4
  100. package/framework/{v0.1.1-alpha.18/lib/cmd/scope → v0.1.1-alpha.181/lib/cmd/env}/use.js +21 -1
  101. package/framework/v0.1.1-alpha.181/lib/cmd/framework/build.js +85 -0
  102. package/framework/v0.1.1-alpha.181/lib/cmd/framework/init.js +798 -0
  103. package/framework/v0.1.1-alpha.181/lib/cmd/framework/link-node-modules.js +86 -0
  104. package/framework/v0.1.1-alpha.181/lib/cmd/framework/link.js +109 -0
  105. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/framework/open.js +15 -0
  106. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/framework/restart.js +58 -26
  107. package/framework/v0.1.1-alpha.181/lib/cmd/framework/set.js +273 -0
  108. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/framework/start.js +43 -20
  109. package/framework/v0.1.1-alpha.181/lib/cmd/framework/status.js +138 -0
  110. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/framework/stop.js +44 -28
  111. package/framework/v0.1.1-alpha.181/lib/cmd/framework/tail.js +299 -0
  112. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/framework/version.js +12 -3
  113. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/helper.js +82 -6
  114. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/index.js +23 -23
  115. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/port/inc/scan.js +32 -16
  116. package/framework/v0.1.1-alpha.181/lib/cmd/port/list.js +459 -0
  117. package/framework/v0.1.1-alpha.181/lib/cmd/port/reset.js +426 -0
  118. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/project/add.js +146 -122
  119. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/project/arguments.json +2 -1
  120. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/project/list.js +16 -2
  121. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/project/remove.js +17 -17
  122. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/protocol/set.js +239 -201
  123. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/scope/list.js +24 -8
  124. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/view/add.js +34 -9
  125. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/collection/package.json +1 -1
  126. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/collection/src/main.js +243 -242
  127. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/config.js +31 -30
  128. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cron/package.json +1 -1
  129. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cron/src/main.js +10 -9
  130. package/framework/v0.1.1-alpha.181/lib/domain/LICENSE +9 -0
  131. package/framework/v0.1.1-alpha.181/lib/domain/README.md +46 -0
  132. package/framework/v0.1.1-alpha.181/lib/domain/dist/public_suffix_list.dat +14186 -0
  133. package/framework/v0.1.1-alpha.181/lib/domain/package.json +20 -0
  134. package/framework/v0.1.1-alpha.181/lib/domain/src/main.js +442 -0
  135. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/generator/index.js +4 -4
  136. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/index.js +3 -2
  137. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181/lib/inherits}/LICENSE +1 -1
  138. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/inherits/README.md +2 -2
  139. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/inherits/package.json +3 -4
  140. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/inherits/src/main.js +3 -3
  141. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/logger/package.json +2 -2
  142. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/logger/src/containers/default/index.js +13 -2
  143. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/logger/src/containers/file/index.js +109 -14
  144. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/logger/src/containers/mq/index.js +12 -3
  145. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/logger/src/containers/mq/listener.js +16 -14
  146. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/logger/src/containers/mq/speaker.js +32 -3
  147. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/logger/src/helper.js +21 -1
  148. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/logger/src/main.js +36 -9
  149. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/math/index.js +9 -9
  150. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/merge/README.md +2 -2
  151. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/merge/package.json +1 -1
  152. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/merge/src/main.js +118 -91
  153. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/model.js +10 -10
  154. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/proc.js +87 -49
  155. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/routing/package.json +1 -1
  156. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/routing/src/main.js +280 -274
  157. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/session-store.js +6 -6
  158. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/shell.js +3 -3
  159. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/swig-filters/package.json +1 -1
  160. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/swig-filters/src/main.js +140 -119
  161. package/framework/v0.1.1-alpha.181/lib/url/README.md +0 -0
  162. package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/validator.js +2 -2
  163. package/framework/v0.1.1-alpha.181/package.json +14 -0
  164. package/package.json +33 -24
  165. package/resources/home/main.json +53 -4
  166. package/resources/home/settings.json +9 -0
  167. package/resources/home/user/extensions/logger/default/config.json +1 -1
  168. package/resources/package.json.template +29 -18
  169. package/script/post_install.js +411 -126
  170. package/script/post_publish.js +186 -0
  171. package/script/pre_install.js +425 -77
  172. package/script/prepare_version.js +275 -98
  173. package/services/.gna/67fdf1b224a2ed5597e63d4b64283834468e05e3.txt +0 -0
  174. package/services/.gna/arch +1 -0
  175. package/services/.gna/locals.json +14 -0
  176. package/services/.gna/platform +1 -0
  177. package/services/configure +6 -0
  178. package/services/env.json +18 -0
  179. package/services/manifest.json +30 -0
  180. package/services/package.json +11 -0
  181. package/services/src/proxy/config/app.json +6 -0
  182. package/services/src/proxy/config/routing.json +11 -0
  183. package/services/src/proxy/config/settings.json +9 -0
  184. package/services/src/proxy/config/settings.server.json +31 -0
  185. package/services/src/proxy/config/statics.json +3 -0
  186. package/services/src/proxy/controllers/controller.content.js +58 -0
  187. package/services/src/proxy/controllers/controller.js +30 -0
  188. package/{framework/v0.1.1-alpha.18/core/template/boilerplate/bundle → services/src/proxy}/controllers/setup.js +14 -14
  189. package/services/src/proxy/index.js +31 -0
  190. package/services/src/proxy/lib/domain/README.md +48 -0
  191. package/services/src/proxy/lib/domain/src/config/public_suffix_list.dat +14186 -0
  192. package/services/src/toolbar/config/app.json +6 -0
  193. package/services/src/toolbar/config/routing.json +11 -0
  194. package/{framework/v0.1.1-alpha.18/core/template/boilerplate/bundle → services/src/toolbar}/config/settings.json +0 -0
  195. package/services/src/toolbar/config/settings.server.json +30 -0
  196. package/services/src/toolbar/controllers/controller.content.js +39 -0
  197. package/services/src/toolbar/controllers/controller.js +30 -0
  198. package/services/src/toolbar/controllers/setup.js +111 -0
  199. package/services/src/toolbar/index.js +43 -0
  200. package/utils/helper.js +236 -185
  201. package/utils/prototypes.js +9 -9
  202. package/utils/prototypes.json_clone.js +70 -37
  203. package/doc/framework/cli/doc.json +0 -9
  204. package/doc/framework/index.md +0 -60
  205. package/framework/v0.1.1-alpha.18/VERSION +0 -1
  206. package/framework/v0.1.1-alpha.18/core/asset/js/plugin/dist/gina.js.map +0 -56
  207. package/framework/v0.1.1-alpha.18/core/asset/js/plugin/dist/gina.min.css +0 -1
  208. package/framework/v0.1.1-alpha.18/core/asset/js/plugin/dist/gina.min.css.map +0 -1
  209. package/framework/v0.1.1-alpha.18/core/asset/js/plugin/dist/gina.min.js +0 -736
  210. package/framework/v0.1.1-alpha.18/core/asset/js/plugin/dist/gina.min.js.map +0 -56
  211. package/framework/v0.1.1-alpha.18/core/asset/js/plugin/dist/gina.onload.min.js +0 -5
  212. package/framework/v0.1.1-alpha.18/core/asset/js/plugin/dist/gina.onload.min.js.map +0 -8
  213. package/framework/v0.1.1-alpha.18/core/connectors/couchbase/lib/connector.js +0 -20
  214. package/framework/v0.1.1-alpha.18/core/connectors/couchbase/lib/session-store.js +0 -21
  215. package/framework/v0.1.1-alpha.18/core/locales/dist/region/en.json +0 -9492
  216. package/framework/v0.1.1-alpha.18/core/locales/dist/region/fr.json +0 -9492
  217. package/framework/v0.1.1-alpha.18/core/locales/src/resources/region.mapping.json +0 -28
  218. package/framework/v0.1.1-alpha.18/core/template/boilerplate/bundle_templates/html/homepage.html +0 -4
  219. package/framework/v0.1.1-alpha.18/core/template/conf/statics.json +0 -10
  220. package/framework/v0.1.1-alpha.18/helpers/json/src/main.js +0 -97
  221. package/framework/v0.1.1-alpha.18/lib/cmd/bundle/arguments.json +0 -4
  222. package/framework/v0.1.1-alpha.18/lib/cmd/bundle/list.js +0 -129
  223. package/framework/v0.1.1-alpha.18/lib/cmd/framework/init.js +0 -514
  224. package/framework/v0.1.1-alpha.18/lib/cmd/framework/set.js +0 -161
  225. package/framework/v0.1.1-alpha.18/lib/cmd/framework/status.js +0 -72
  226. package/framework/v0.1.1-alpha.18/lib/cmd/framework/tail.js +0 -183
  227. package/framework/v0.1.1-alpha.18/lib/cmd/port/list.js +0 -176
  228. package/framework/v0.1.1-alpha.18/package.json +0 -14
  229. /package/{framework/v0.1.1-alpha.18/core/template/command/gina.bat.tpl → bin/gina.bat} +0 -0
  230. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/AUTHORS +0 -0
  231. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/asset/html/nolayout.html +0 -0
  232. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/asset/html/static.html +0 -0
  233. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/asset/img/android-chrome-192x192.png +0 -0
  234. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/asset/img/android-chrome-512x512.png +0 -0
  235. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/asset/img/apple-touch-icon.png +0 -0
  236. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/asset/img/favicon-16x16.png +0 -0
  237. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/asset/img/favicon-32x32.png +0 -0
  238. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/asset/img/favicon.ico +0 -0
  239. /package/framework/{v0.1.1-alpha.18/core/asset/js → v0.1.1-alpha.181/core/asset}/plugin/uuid.json +0 -0
  240. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
  241. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/controller/controller.framework.js +0 -0
  242. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/controller/index.js +0 -0
  243. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/deps/busboy/.travis.yml +0 -0
  244. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/deps/busboy/LICENSE +0 -0
  245. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/deps/busboy/README.md +0 -0
  246. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/deps/busboy/deps/encoding/encoding-indexes.js +0 -0
  247. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/deps/busboy/deps/encoding/encoding.js +0 -0
  248. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/deps/busboy/lib/main.js +0 -0
  249. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/deps/busboy/lib/types/multipart.js +0 -0
  250. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/deps/busboy/lib/types/urlencoded.js +0 -0
  251. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/deps/busboy/lib/utils.js +0 -0
  252. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/deps/busboy/package.json +0 -0
  253. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/deps/swig-client/swig-2.0.0.min.js +0 -0
  254. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/dev/lib/tools.js +0 -0
  255. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/locales/currency.json +0 -0
  256. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/locales/dist/language/en.json +0 -0
  257. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/locales/dist/language/fr.json +0 -0
  258. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/locales/src/resources/currency.csv +0 -0
  259. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/locales/src/resources/region.csv +0 -0
  260. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/mime.types +0 -0
  261. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/README.md +0 -0
  262. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/file/README.md +0 -0
  263. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/file/build.json +0 -0
  264. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/intl/README.md +0 -0
  265. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/intl/build.json +0 -0
  266. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/storage/README.md +0 -0
  267. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/storage/build.json +0 -0
  268. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/validator/README.md +0 -0
  269. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/plugins/lib/validator/build.json +0 -0
  270. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/server.express.js +0 -0
  271. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/status.codes +0 -0
  272. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/boilerplate/bundle/config/app.json +0 -0
  273. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/boilerplate/bundle/config/routing.json +0 -0
  274. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
  275. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
  276. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/boilerplate/bundle_public/css/default.css +0 -0
  277. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
  278. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
  279. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
  280. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/boilerplate/bundle_public/readme.md +0 -0
  281. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
  282. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/conf/manifest.json +0 -0
  283. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/conf/settings.json +0 -0
  284. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/error/client/json/401.json +0 -0
  285. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/error/client/json/403.json +0 -0
  286. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/error/client/json/404.json +0 -0
  287. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/error/server/html/50x.html +0 -0
  288. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/error/server/json/500.json +0 -0
  289. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/error/server/json/503.json +0 -0
  290. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/core/template/extensions/logger/config.json +0 -0
  291. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/helpers/plugins/README.md +0 -0
  292. /package/framework/{v0.1.1-alpha.18/helpers/json → v0.1.1-alpha.181/lib/archiver}/README.md +0 -0
  293. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/archiver/build.json +0 -0
  294. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/bundle/copy.js +0 -0
  295. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/bundle/cp.js +0 -0
  296. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/bundle/help.js +0 -0
  297. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/bundle/rename.js +0 -0
  298. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/bundle/restart.js +0 -0
  299. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/bundle/rm.js +0 -0
  300. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/bundle/status.js +0 -0
  301. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/env/add.js +0 -0
  302. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/env/get.js +0 -0
  303. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/env/help.js +0 -0
  304. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/env/help.txt +0 -0
  305. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/env/link-dev.js +0 -0
  306. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/env/remove.js +0 -0
  307. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/env/rm.js +0 -0
  308. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/env/set.js +0 -0
  309. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/env/unset.js +0 -0
  310. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/framework/dot.js +0 -0
  311. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/framework/get.js +0 -0
  312. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/framework/help.js +0 -0
  313. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/framework/help.txt +0 -0
  314. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/framework/msg.json +0 -0
  315. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/framework/update.js +0 -0
  316. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/gina-dev.1.md +0 -0
  317. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/gina-framework.1.md +0 -0
  318. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/gina.1.md +0 -0
  319. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/msg.json +0 -0
  320. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/port/help.js +0 -0
  321. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/port/help.txt +0 -0
  322. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/port/set.js +0 -0
  323. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/project/build.js +0 -0
  324. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/project/help.js +0 -0
  325. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/project/help.txt +0 -0
  326. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/project/import.js +0 -0
  327. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/project/move.js +0 -0
  328. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/project/rename.js +0 -0
  329. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/project/restart.js +0 -0
  330. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/project/rm.js +0 -0
  331. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/project/start.js +0 -0
  332. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/project/status.js +0 -0
  333. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/project/stop.js +0 -0
  334. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/protocol/help.js +0 -0
  335. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/protocol/help.txt +0 -0
  336. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/protocol/list.js +0 -0
  337. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/scope/help.js +0 -0
  338. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/scope/help.txt +0 -0
  339. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/scope/link-local.js +0 -0
  340. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/scope/remove.js +0 -0
  341. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/scope/rm.js +0 -0
  342. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/scope/set.js +0 -0
  343. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cmd/scope/unset.js +0 -0
  344. /package/framework/{v0.1.1-alpha.18/lib/cmd/env → v0.1.1-alpha.181/lib/cmd/scope}/use.js +0 -0
  345. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/collection/README.md +0 -0
  346. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/collection/build.json +0 -0
  347. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/cron/README.md +0 -0
  348. /package/framework/{v0.1.1-alpha.18/lib/archiver/README.md → v0.1.1-alpha.181/lib/domain/exemples/backend.js} +0 -0
  349. /package/framework/{v0.1.1-alpha.18/lib/routing/README.md → v0.1.1-alpha.181/lib/domain/exemples/frontend.html} +0 -0
  350. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/inherits/example/inheriting_eventemitter.js +0 -0
  351. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/inherits/example/protected_inheritance.js +0 -0
  352. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/inherits/example/simple_inheritance.js +0 -0
  353. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/inherits/example/super_attribute_overridden_by_child_on_init.js +0 -0
  354. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/logger/README.md +0 -0
  355. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
  356. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
  357. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/merge/example/merge.js +0 -0
  358. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/merge/example/merge_2_literal objects.js +0 -0
  359. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/merge/example/merge_and_preserve_first.js +0 -0
  360. /package/framework/{v0.1.1-alpha.18/lib/swig-filters → v0.1.1-alpha.181/lib/routing}/README.md +0 -0
  361. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/routing/build.json +0 -0
  362. /package/framework/{v0.1.1-alpha.18/lib/url → v0.1.1-alpha.181/lib/swig-filters}/README.md +0 -0
  363. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/url/index.js +0 -0
  364. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/url/mocks.json +0 -0
  365. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/url/routing.json +0 -0
  366. /package/framework/{v0.1.1-alpha.18 → v0.1.1-alpha.181}/lib/url/test.js +0 -0
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * This file is part of the gina package.
3
- * Copyright (c) 2009-2022 Rhinostone <contact@gina.io>
3
+ * Copyright (c) 2009-2023 Rhinostone <contact@gina.io>
4
4
  *
5
5
  * For the full copyright and license information, please view the LICENSE
6
6
  * file that was distributed with this source code.
@@ -30,7 +30,7 @@
30
30
  function DateFormatHelper() {
31
31
 
32
32
  var isGFFCtx = ( ( typeof(module) !== 'undefined' ) && module.exports ) ? false : true;
33
- var merge = (isGFFCtx) ? require('utils/merge') : require('./../lib/merge');
33
+ var merge = (isGFFCtx) ? require('lib/merge') : require('./../lib/merge');
34
34
 
35
35
 
36
36
  // if ( typeof(define) === 'function' && define.amd ) {
@@ -65,6 +65,7 @@ function DateFormatHelper() {
65
65
  shortIsoTime: "HH:MM",
66
66
  longIsoTime: "HH:MM:ss TT",
67
67
  isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
68
+ longIsoDateTime: "yyyy-mm-dd'T'HH:MM:ss.L",
68
69
  isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
69
70
  };
70
71
 
@@ -125,7 +126,7 @@ function DateFormatHelper() {
125
126
  var format = function(date, mask, utc) {
126
127
 
127
128
  // if ( typeof(merge) == 'undefined' || !merge ) {
128
- // merge = (isGFFCtx) ? require('utils/merge') : require('./../lib/merge');
129
+ // merge = (isGFFCtx) ? require('lib/merge') : require('./../lib/merge');
129
130
 
130
131
  // }
131
132
 
@@ -140,7 +141,7 @@ function DateFormatHelper() {
140
141
  } catch( mergeErr) {
141
142
  // called from logger - redefinition needed for none-dev env: cache issue
142
143
  isGFFCtx = ( ( typeof(module) !== 'undefined' ) && module.exports ) ? false : true;
143
- merge = (isGFFCtx) ? require('utils/merge') : require('./../lib/merge');
144
+ merge = (isGFFCtx) ? require('lib/merge') : require('./../lib/merge');
144
145
  masksList = merge(i18n.masks, dF.masks);
145
146
  }
146
147
 
@@ -209,7 +210,8 @@ function DateFormatHelper() {
209
210
  s: s,
210
211
  ss: pad(s),
211
212
  l: pad(L, 3),
212
- L: pad(L > 99 ? Math.round(L / 10) : L),
213
+ // L: pad(L > 99 ? Math.round(L / 10) : L),
214
+ L: pad(L),
213
215
  t: H < 12 ? "a" : "p",
214
216
  tt: H < 12 ? "am" : "pm",
215
217
  T: H < 12 ? "A" : "P",
@@ -278,8 +280,8 @@ function DateFormatHelper() {
278
280
  /**
279
281
  * Will give an array of dates between the current date to a targeted date
280
282
  *
281
- * TODO - add a closure to `ignoreWeekend()` based on Utils::Validator
282
- * TODO - add a closure to `ignoreFromList(array)` based on Utils::Validator
283
+ * TODO - add a closure to `ignoreWeekend()` based on Lib::Validator
284
+ * TODO - add a closure to `ignoreFromList(array)` based on Lib::Validator
283
285
  *
284
286
  * @param {object} dateTo
285
287
  * @param {string} [ mask ]
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * This file is part of the gina package.
3
- * Copyright (c) 2009-2022 Rhinostone <contact@gina.io>
3
+ * Copyright (c) 2009-2023 Rhinostone <contact@gina.io>
4
4
  *
5
5
  * For the full copyright and license information, please view the LICENSE
6
6
  * file that was distributed with this source code.
@@ -10,10 +10,10 @@ var fs = require('fs');
10
10
  /**
11
11
  * @module Helpers
12
12
  *
13
- * Gina Utils Helpers
13
+ * Gina Lib Helpers
14
14
  *
15
- * @package Gina.Utils
16
- * @namespace Gina.Utils.Helpers
15
+ * @package Gina.Lib
16
+ * @namespace Gina.Lib.Helpers
17
17
  * @author Rhinostone <contact@gina.io>
18
18
  */
19
19
  var _require = function(path) {
@@ -43,7 +43,7 @@ var helpers = {}
43
43
 
44
44
  var PrototypesHelper = null, PluginsHelper = null;
45
45
  // loading main helpers
46
- for (; f < len; ++f) {
46
+ for (; f < len; ++f) {
47
47
  if ( ! /^\./.test(files[f]) && files[f] != 'index.js') {
48
48
  helper = files[f].replace(/.js/, '');
49
49
  if (/prototypes/i.test(helper)) {
@@ -63,11 +63,11 @@ new PrototypesHelper({
63
63
  });
64
64
 
65
65
  // loading plugins helpers
66
- if (
66
+ if (
67
67
  typeof(getContext) != 'undefined'
68
- && typeof(getContext().gina) != 'undefined'
68
+ && typeof(getContext().gina) != 'undefined'
69
69
  ) {
70
- new PluginsHelper(getContext('gina').plugins);
70
+ new PluginsHelper(getContext('gina').plugins);
71
71
  }
72
72
  // adding ApiError to helper in case Validator plugin is not loaded
73
73
  if ( typeof(getContext) != 'undefined' && typeof(ApiError) == 'undefined' /*&& typeof(helpers.ApiError) == 'undefined'*/ ) {
@@ -75,5 +75,10 @@ if ( typeof(getContext) != 'undefined' && typeof(ApiError) == 'undefined' /*&& t
75
75
  ApiError = require('./plugins/src/api-error');
76
76
  }
77
77
 
78
+ // loading `gina/utils/helper` if not yet loaded
79
+ if ( typeof(getTmpDir) == 'undefined' ) {
80
+ _require(__dirname + '/../../../utils/helper')
81
+ }
82
+
78
83
  // Publish as node.js module
79
84
  module.exports = helpers;
@@ -0,0 +1,9 @@
1
+ License (MIT)
2
+
3
+ Copyright © 2023 Martin-Luther ETOUMAN <martin-luther.etouman@gina.io>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,12 @@
1
+ # json()
2
+
3
+ **Package:** gina.helpers
4
+ **Name:** json
5
+
6
+
7
+
8
+ ## Debuging your test with nodeunit
9
+
10
+ ```tty
11
+ node --inspect-brk=6959 `which nodeunit` ./test/01-require_json.js
12
+ ```
@@ -5,9 +5,9 @@
5
5
 
6
6
  "author": {
7
7
  "name": "Maritn-Luther ETOUMAN",
8
- "email": "martinluther@gina.io"
8
+ "email": "martin-luther@gina.io"
9
9
  },
10
- "copyright": "Copyright (c) 2009-2022 Rhinostone <contact@gina.io>",
10
+ "copyright": "Copyright (c) 2009-2023 Rhinostone <contact@gina.io>",
11
11
  "engines": {
12
12
  "node": ">=0.10.22"
13
13
  },
@@ -0,0 +1,361 @@
1
+ /*
2
+ * This file is part of the gina package.
3
+ * Copyright (c) 2009-2023 Rhinostone <contact@gina.io>
4
+ *
5
+ * For the full copyright and license information, please view the LICENSE
6
+ * file that was distributed with this source code.
7
+ */
8
+
9
+ var fs = require('fs');
10
+ var console = require('./../../../lib/logger');
11
+ /**
12
+ * JSONHelper
13
+ *
14
+ * @package Gina.Lib.Helpers
15
+ * @author Rhinostone <contact@gina.io>
16
+ * @api public
17
+ * */
18
+
19
+ module.exports = function(){
20
+
21
+ // `JSON.clone()` is a prototype defined in `GINA_DIR//lib/prototypes.json_clone`
22
+
23
+ encodeRFC5987ValueChars = function(str) {
24
+ // return encodeURIComponent(str).
25
+ // // Bien que la RFC 3986 réserve "!", RFC 5987 ne réserve pas ce caractère,
26
+ // // il n'est donc pas nécessaire l'échapper
27
+ // replace(/['()*]/g, c => '%' + c.charCodeAt(0).toString(16)). // i.e., %27 %28 %29 %2a
28
+ // // on notera que l'encodage valide pour "*" est %2A et qui faut donc appeler toUpperCase()
29
+ // // pour encoder exactement.
30
+
31
+ // // Selon la RFC 5987 ce qui suit n'est pas nécessairement requis
32
+ // // on peut donc bénéficier d'un peu plus de lisibilité : |`^
33
+ // replace(/%(7C|60|5E)/g, (str, hex) => String.fromCharCode(parseInt(hex, 16)));
34
+
35
+ // return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
36
+ // return '%' + c.charCodeAt(0).toString(16);
37
+ // });
38
+
39
+ return encodeURIComponent(str).
40
+ // Bien que la RFC 3986 réserve "!", RFC 5987 ne réserve pas ce caractère,
41
+ // il n'est donc pas nécessaire l'échapper
42
+ replace(/['()]/g, escape). // c'est-à-dire %27 %28 %29
43
+ replace(/\*/g, '%2A').
44
+ // Selon la RFC 5987 ce qui suit n'est pas nécessairement requis
45
+ // on peut donc bénéficier d'un peu plus de lisibilité : |`^
46
+ replace(/%(?:7C|60|5E)/g, unescape);
47
+ };
48
+
49
+ /**
50
+ * Load a json file and removing comments if found
51
+ *
52
+ * @param {string} filename - path to json content
53
+ *
54
+ * @return {object} jsonObject
55
+ * */
56
+ requireJSON = function(filename){
57
+
58
+ //console.debug('[ Helpers ][ requireJSON ] ', filename);
59
+
60
+ var i = null
61
+ , len = null
62
+ , commentsWithSlashes = null
63
+ , jsonStr = null
64
+ ;
65
+
66
+ try {
67
+ if ( typeof(process.env.NODE_ENV_IS_DEV) != 'undefined' && /true/i.test(process.env.NODE_ENV_IS_DEV) ) {
68
+ delete require.cache[filename];
69
+ }
70
+ jsonStr = fs.readFileSync(filename).toString();
71
+ } catch (err) {
72
+ if ( typeof(console.emerg) != 'undefined' ) {
73
+ console.emerg(err.stack);
74
+ process.exit(1);
75
+ }
76
+ throw err
77
+ }
78
+
79
+
80
+ /** block style comments */
81
+ if ( /\/\*\*/.test(jsonStr) ) {
82
+ jsonStr = jsonStr.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)/g, '');
83
+ }
84
+
85
+ // line style comments
86
+ commentsWithSlashes = jsonStr.match(/\/\/(.*)?/g);
87
+
88
+ len = ( commentsWithSlashes) ? commentsWithSlashes.length : 0;
89
+ if (commentsWithSlashes && len > 0) {
90
+ i = 0;
91
+ for(; i< len; ++i) {
92
+ // ignore urls
93
+ if ( /(\:|\")/.test( jsonStr.substr(jsonStr.indexOf(commentsWithSlashes[i])-1,1) ) )
94
+ continue;
95
+
96
+ jsonStr = jsonStr.replace(commentsWithSlashes[i], '');
97
+ }
98
+ }
99
+
100
+ try {
101
+ return JSON.parse(jsonStr)
102
+ } catch (err) {
103
+ var pos = null
104
+ , msg = null
105
+ , error = null
106
+ ;
107
+ var stack = err.stack.match(/position(\s|\s+)\d+/);
108
+ if ( Array.isArray(stack) && stack.length > 0) {
109
+ pos = stack[0].replace(/[^\d+]/g, '');
110
+ jsonStr = jsonStr.substr(0, pos) + '--(ERROR !)--\n' + jsonStr.substr(pos);
111
+ msg = (jsonStr.length > 400) ? '...'+ jsonStr.substr(pos-200, 300) +'...' : jsonStr;
112
+ error = new Error('[ requireJSON ] could not parse `'+ filename +'`:' +'\n\rSomething is wrong around this portion:\n\r'+msg+'<strong style="color:red">"</strong>\n\rPlease check your file: `'+ filename +'`'+ '\n\r<strong style="color:red">'+err.stack+'</strong>\n');
113
+ } else {
114
+ error = new Error('[ requireJSON ] could not parse `'+ filename +'`:' +'\n\rSomething is wrong with the content of your file.\n\rPlease check the syntax of your file : `'+ filename +'`'+ '\n\r<strong style="color:red">'+err.stack+'</strong>\n');
115
+ }
116
+
117
+ if ( !/\/controllers/i.test(err.stack) && typeof(console.emerg) != 'undefined' ) {
118
+ console.emerg(error.message);
119
+ process.exit(1);
120
+ }
121
+ throw error;
122
+ }
123
+ };
124
+
125
+ // var isEncoded = function(uri) {
126
+ // uri = uri || '';
127
+ // return uri !== decodeURIComponent(uri);
128
+ // }
129
+
130
+ /**
131
+ * Convert JSON string with structured keys to object
132
+ *
133
+ * @param {string} JSON string with structured keys
134
+ * */
135
+ parseBodyString = function(bodyStr){
136
+ try {
137
+ bodyStr = decodeURIComponent(bodyStr);
138
+ } catch (err) {
139
+ // Already decoded - ignoring
140
+ }
141
+
142
+ // false & true case
143
+ if ( /(\"false\"|\"true\"|\"on\")/.test(bodyStr) ) {
144
+ bodyStr = bodyStr.replace(/\"false\"/g, false).replace(/\"true\"/g, true).replace(/\"on\"/g, true);
145
+ }
146
+ if ( /(\"null\")/i.test(bodyStr) ) {
147
+ bodyStr = bodyStr.replace(/\"null\"/ig, null);
148
+ }
149
+
150
+ return parseBody(bodyStr);
151
+ }
152
+
153
+ var parseCollection = function (collection, obj) {
154
+
155
+ for(var i = 0, len = collection.length; i<len; ++i) {
156
+ obj[i] = parseObject(collection[i], obj);
157
+ }
158
+
159
+ return obj
160
+ }
161
+
162
+ var parseObject = function (tmp, obj) {
163
+ var el = []
164
+ , key = null
165
+ ;
166
+
167
+ if (!obj) {
168
+ obj = {}
169
+ }
170
+
171
+ for (let o in tmp) {
172
+
173
+ el[0] = o;
174
+ el[1] = tmp[o];
175
+
176
+ if ( /^(.*)\[(.*)\]/.test(el[0]) ) { // some[field] ?
177
+ key = el[0].replace(/\]/g, '').split(/\[/g);
178
+ obj = parseLocalObj(obj, key, 0, el[1])
179
+ } else {
180
+ obj[ el[0] ] = el[1]
181
+ }
182
+ }
183
+
184
+ return obj
185
+ }
186
+
187
+ var parseBody = function(body) {
188
+ var obj = null
189
+ , tmp = null
190
+ , arr = null
191
+ , isArrayType = null
192
+ ;
193
+ if ( /^(\{|\[|\%7B|\%5B)/.test(body) ) {
194
+ try {
195
+ isArrayType = ( /^(\{|\%7B)/.test(body) ) ? false : true;
196
+ obj = ( isArrayType ) ? [] : {};
197
+
198
+ if ( /^(\%7B|\%5B)/.test(body) ) {
199
+ tmp = JSON.parse(decodeURIComponent(body))
200
+ } else {
201
+ tmp = JSON.parse(body)
202
+ }
203
+
204
+ if ( Array.isArray(tmp) ) {
205
+ obj = parseCollection(tmp, obj)
206
+ } else {
207
+ obj = parseObject(tmp, obj)
208
+ }
209
+
210
+ return obj
211
+ } catch (err) {
212
+ console.error('[365] could not parse body:\n' + body)
213
+ }
214
+
215
+ } else {
216
+ obj = {};
217
+ arr = body.split(/&/g);
218
+ if ( /(\"false\"|\"true\"|\"on\")/.test(body) )
219
+ body = body.replace(/\"false\"/g, false).replace(/\"true\"/g, true).replace(/\"on\"/g, true);
220
+
221
+
222
+ var el = {}
223
+ , value = null
224
+ , key = null;
225
+
226
+ for (var i = 0, len = arr.length; i < len; ++i) {
227
+ if (!arr[i]) continue;
228
+
229
+ arr[i] = decodeURIComponent(arr[i]);
230
+
231
+ if ( /^\{/.test(arr[i]) || /\=\{/.test(arr[i]) || /\=\[/.test(arr[i]) ) {
232
+ try {
233
+ if (/^\{/.test(arr[i])) {
234
+ obj = JSON.parse(arr[i]);
235
+ break;
236
+ } else {
237
+ el = arr[i].match(/\=(.*)/);
238
+ el[0] = arr[i].split(/\=/)[0];
239
+ obj[ el[0] ] = JSON.parse( el[1] );
240
+ }
241
+
242
+
243
+ } catch (err) {
244
+ console.error('[parseBody#1] could not parse body:\n' + arr[i])
245
+ }
246
+ } else {
247
+ el = arr[i].split(/=/);
248
+ if ( /\{\}\"\:/.test(el[1]) ) { //might be a json
249
+ try {
250
+ el[1] = JSON.parse(el[1])
251
+ } catch (err) {
252
+ console.error('[parseBody#2] could not parse body:\n' + el[1])
253
+ }
254
+ }
255
+
256
+ if ( typeof(el[1]) == 'string' && !/\[object /.test(el[1])) {
257
+ key = null;
258
+ el[0] = decodeURIComponent(el[0]);
259
+ el[1] = decodeURIComponent(el[1]);
260
+
261
+ if ( /^(.*)\[(.*)\]/.test(el[0]) ) { // some[field] ?
262
+ key = el[0].replace(/\]/g, '').split(/\[/g);
263
+ obj = parseLocalObj(obj, key, 0, el[1])
264
+ } else {
265
+ obj[ el[0] ] = el[1]
266
+ }
267
+ }
268
+ }
269
+ }
270
+
271
+ return obj
272
+ }
273
+ }
274
+
275
+ // var parseLocalObj = function(obj, key, k, value) {
276
+
277
+ // if ( typeof(obj[ key[k] ]) == 'undefined' ) {
278
+ // obj[ key[k] ] = {};
279
+ // }
280
+
281
+ // for (var prop in obj) {
282
+
283
+ // if (k == key.length-1) {
284
+
285
+ // if (prop == key[k]) {
286
+ // obj[prop] = ( typeof(value) != 'undefined' ) ? value : '';
287
+ // }
288
+
289
+ // } else if ( key.indexOf(prop) > -1 ) {
290
+ // ++k;
291
+ // if ( !obj[prop][ key[k] ] )
292
+ // obj[prop][ key[k] ] = {};
293
+
294
+
295
+ // parseLocalObj(obj[prop], key, k, value)
296
+
297
+ // }
298
+ // }
299
+
300
+ // return obj;
301
+ // }
302
+
303
+ var parseLocalObj = function(obj, key, k, value) {
304
+
305
+ for (let i=0,len=key.length; i<len; i++) {
306
+ // by default
307
+ let _key = key[k];
308
+ if (i == k) {
309
+ // Array or Object ?
310
+ if ( typeof(obj[ key[k] ]) == 'undefined' || typeof(obj[ key[k] ]) == 'string' ) {
311
+ if ( Array.isArray(obj) ) {
312
+ // index
313
+ // _key = obj.length;
314
+ _key = ~~key[k];
315
+ obj[ _key ] = ( /^\d+$/.test(key[k+1]) ) ? [] : {};
316
+ } else {
317
+ obj[ key[k] ] = ( /^\d+$/.test(key[k+1]) ) ? [] : {};
318
+ }
319
+ }
320
+
321
+ // Assinging value
322
+ if (k == key.length-1) {
323
+ let _value = ( typeof(value) != 'undefined' ) ? value : '';
324
+ if ( Array.isArray( obj[key[k]] ) ) {
325
+ obj[key[k]].push(_value);
326
+ // _key = (obj.length > 0) ? obj.length-1 : 0;
327
+ // obj[ _key ] = _value;
328
+ }
329
+ else {
330
+ obj[ key[k] ] = _value;
331
+ }
332
+ break;
333
+ }
334
+ // Assinging index or key
335
+ else {
336
+ if ( /^\d+$/.test(key[k]) && !Array.isArray(obj) ) {
337
+ obj = [];
338
+ // _key = (obj.length > 0) ? obj.length-1 : 0;
339
+ }
340
+ // Handle unstructured array from object
341
+ // E.G.: design[1][id] where design is starting with `1` index instead of `0`
342
+ // if ( Array.isArray(obj) ) {
343
+ // // current Index
344
+ // _key = ~~key[k];
345
+ // // _key = (obj.length > 0) ? obj.length-1 : 0;
346
+ // }
347
+ // Init array or object
348
+ if ( typeof(obj[ _key ]) == 'undefined' ) {
349
+ // obj[ _key ] = ( /^\d+$/.test(key[k+1]) ) ? [] : {};
350
+ obj[ _key ] = null;
351
+ }
352
+
353
+ parseLocalObj(obj[ _key ], key, k+1, value);
354
+ }
355
+ }
356
+ }
357
+
358
+ return obj;
359
+ }
360
+
361
+ };//EO JSONHelper.