gina 0.1.1-alpha.166 → 0.1.1-alpha.167

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 (300) hide show
  1. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/AUTHORS +0 -0
  2. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/LICENSE +0 -0
  3. package/framework/v0.1.1-alpha.167/VERSION +1 -0
  4. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/html/nolayout.html +0 -0
  5. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/html/static.html +0 -0
  6. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/img/android-chrome-192x192.png +0 -0
  7. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/img/android-chrome-512x512.png +0 -0
  8. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/img/apple-touch-icon.png +0 -0
  9. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/img/favicon-16x16.png +0 -0
  10. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/img/favicon-32x32.png +0 -0
  11. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/img/favicon.ico +0 -0
  12. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/plugin/dist/gina.js +367 -321
  13. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/plugin/dist/gina.min.css +0 -0
  14. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/plugin/dist/gina.min.css.map +0 -0
  15. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/plugin/dist/gina.min.js +23 -23
  16. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/plugin/dist/gina.min.js.map +3 -3
  17. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/plugin/dist/gina.onload.min.js +0 -0
  18. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/plugin/dist/gina.onload.min.js.map +2 -2
  19. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/plugin/dist/toolbar/css/toolbar-min.css +0 -0
  20. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/plugin/dist/toolbar/css/toolbar.css +0 -0
  21. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/plugin/dist/toolbar/css/toolbar.css.map +0 -0
  22. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/plugin/dist/toolbar/js/jquery-3.1.0.min.js +0 -0
  23. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/plugin/dist/toolbar/main.js +0 -0
  24. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/plugin/dist/toolbar/toolbar.html +0 -0
  25. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/plugin/readme.md +0 -0
  26. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/asset/plugin/uuid.json +0 -0
  27. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/config.js +7 -7
  28. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/connectors/couchbase/index.js +0 -0
  29. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/connectors/couchbase/lib/connector.js +2 -2
  30. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/connectors/couchbase/lib/connector.v2.js +4 -4
  31. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/connectors/couchbase/lib/connector.v3.js +51 -51
  32. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/connectors/couchbase/lib/connector.v4.js +4 -4
  33. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/connectors/couchbase/lib/n1ql.js +0 -0
  34. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/connectors/couchbase/lib/session-store.js +2 -2
  35. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
  36. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/connectors/couchbase/lib/session-store.v3.js +12 -12
  37. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/connectors/couchbase/lib/session-store.v4.js +3 -4
  38. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/controller/controller.framework.js +0 -0
  39. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/controller/controller.js +2 -2
  40. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/controller/index.js +0 -0
  41. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/deps/busboy/.travis.yml +0 -0
  42. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/deps/busboy/LICENSE +0 -0
  43. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/deps/busboy/README.md +0 -0
  44. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/deps/busboy/deps/encoding/encoding-indexes.js +0 -0
  45. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/deps/busboy/deps/encoding/encoding.js +0 -0
  46. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/deps/busboy/lib/main.js +0 -0
  47. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/deps/busboy/lib/types/multipart.js +0 -0
  48. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/deps/busboy/lib/types/urlencoded.js +0 -0
  49. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/deps/busboy/lib/utils.js +0 -0
  50. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/deps/busboy/package.json +0 -0
  51. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/deps/swig-client/swig-2.0.0.min.js +0 -0
  52. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/dev/index.js +0 -0
  53. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/dev/lib/class.js +1 -1
  54. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/dev/lib/factory.js +1 -1
  55. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/dev/lib/tools.js +0 -0
  56. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/gna.js +4 -4
  57. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/locales/README.md +0 -0
  58. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/locales/currency.json +0 -0
  59. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/locales/dist/language/en.json +0 -0
  60. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/locales/dist/language/fr.json +0 -0
  61. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/locales/dist/region/en.json +0 -0
  62. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/locales/dist/region/fr.json +0 -0
  63. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/locales/index.js +0 -0
  64. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/locales/src/make.js +0 -0
  65. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/locales/src/resources/currency.csv +0 -0
  66. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/locales/src/resources/region.csv +0 -0
  67. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/locales/src/resources/region.mapping.json +0 -0
  68. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/mime.types +0 -0
  69. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/model/entity.js +6 -6
  70. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/model/index.js +8 -9
  71. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/model/template/entityFactory.js +0 -0
  72. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/model/template/index.js +14 -13
  73. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/README.md +0 -0
  74. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/index.js +0 -0
  75. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/file/README.md +0 -0
  76. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/file/build.json +0 -0
  77. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/file/package.json +0 -0
  78. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/intl/README.md +0 -0
  79. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/intl/build.json +0 -0
  80. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/intl/package.json +0 -0
  81. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/intl/src/main.js +5 -5
  82. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/storage/README.md +0 -0
  83. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/storage/build.json +0 -0
  84. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/storage/package.json +0 -0
  85. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/storage/src/main.js +4 -4
  86. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/validator/README.md +0 -0
  87. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/validator/build.json +0 -0
  88. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/validator/package.json +0 -0
  89. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/validator/src/form-validator.js +8 -8
  90. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/plugins/lib/validator/src/main.js +8 -8
  91. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/router.js +0 -0
  92. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/server.express.js +0 -0
  93. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/server.isaac.js +1 -1
  94. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/server.js +85 -19
  95. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/status.codes +0 -0
  96. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle/config/app.json +0 -0
  97. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle/config/routing.json +0 -0
  98. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle/config/settings.json +0 -0
  99. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
  100. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle/config/templates.json +0 -0
  101. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle/controllers/controller.content.js +1 -1
  102. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
  103. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle/controllers/setup.js +15 -15
  104. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle/index.js +13 -1
  105. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
  106. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle_public/css/default.css +0 -0
  107. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
  108. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
  109. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
  110. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle_public/readme.md +0 -0
  111. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
  112. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
  113. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
  114. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
  115. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
  116. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/command/gina.bat.tpl +0 -0
  117. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/command/gina.tpl +3 -3
  118. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/conf/env.json +0 -0
  119. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/conf/manifest.json +0 -0
  120. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/conf/package.json +0 -0
  121. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/conf/settings.json +0 -0
  122. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/conf/statics.json +0 -0
  123. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/conf/templates.json +0 -0
  124. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/error/client/json/401.json +0 -0
  125. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/error/client/json/403.json +0 -0
  126. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/error/client/json/404.json +0 -0
  127. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/error/server/html/50x.html +0 -0
  128. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/error/server/json/500.json +0 -0
  129. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/error/server/json/503.json +0 -0
  130. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/core/template/extensions/logger/config.json +0 -0
  131. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/console.js +2 -2
  132. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/context.js +2 -2
  133. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/dateFormat.js +5 -5
  134. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/index.js +3 -3
  135. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/json/LICENSE +0 -0
  136. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/json/README.md +0 -0
  137. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/json/package.json +0 -0
  138. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/json/src/main.js +2 -2
  139. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/path.js +2 -2
  140. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/plugins/README.md +0 -0
  141. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/plugins/package.json +0 -0
  142. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/plugins/src/api-error.js +0 -0
  143. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/plugins/src/main.js +1 -1
  144. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/prototypes.js +0 -0
  145. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/task.js +0 -0
  146. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/helpers/text.js +1 -1
  147. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/archiver/README.md +0 -0
  148. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/archiver/build.json +0 -0
  149. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/archiver/package.json +0 -0
  150. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/archiver/src/dep/jszip.min.js +3 -3
  151. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/archiver/src/main.js +1 -1
  152. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/aliases.json +0 -0
  153. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/bundle/add.js +0 -0
  154. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/bundle/arguments.json +0 -0
  155. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/bundle/copy.js +0 -0
  156. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/bundle/cp.js +0 -0
  157. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/bundle/help.js +0 -0
  158. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/bundle/help.txt +0 -0
  159. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/bundle/list.js +0 -0
  160. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/bundle/remove.js +0 -0
  161. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/bundle/rename.js +0 -0
  162. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/bundle/restart.js +0 -0
  163. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/bundle/rm.js +0 -0
  164. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/bundle/start.js +0 -0
  165. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/bundle/status.js +0 -0
  166. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/bundle/stop.js +0 -0
  167. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/env/add.js +0 -0
  168. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/env/get.js +0 -0
  169. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/env/help.js +0 -0
  170. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/env/help.txt +0 -0
  171. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/env/link-dev.js +0 -0
  172. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/env/list.js +0 -0
  173. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/env/remove.js +0 -0
  174. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/env/rm.js +0 -0
  175. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/env/set.js +0 -0
  176. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/env/unset.js +0 -0
  177. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/env/use.js +0 -0
  178. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/build.js +0 -0
  179. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/dot.js +0 -0
  180. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/get.js +0 -0
  181. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/help.js +0 -0
  182. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/help.txt +0 -0
  183. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/init.js +8 -8
  184. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/link-node-modules.js +0 -0
  185. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/link.js +0 -0
  186. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/msg.json +0 -0
  187. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/open.js +0 -0
  188. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/restart.js +0 -0
  189. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/set.js +0 -0
  190. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/start.js +9 -9
  191. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/status.js +0 -0
  192. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/stop.js +0 -0
  193. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/tail.js +0 -0
  194. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/update.js +0 -0
  195. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/framework/version.js +0 -0
  196. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/gina-dev.1.md +0 -0
  197. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/gina-framework.1.md +0 -0
  198. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/gina.1.md +0 -0
  199. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/helper.js +0 -0
  200. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/index.js +1 -1
  201. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/msg.json +0 -0
  202. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/port/help.js +0 -0
  203. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/port/help.txt +0 -0
  204. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/port/inc/scan.js +0 -0
  205. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/port/list.js +0 -0
  206. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/port/reset.js +0 -0
  207. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/port/set.js +0 -0
  208. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/project/add.js +0 -0
  209. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/project/arguments.json +0 -0
  210. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/project/build.js +0 -0
  211. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/project/help.js +0 -0
  212. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/project/help.txt +0 -0
  213. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/project/import.js +0 -0
  214. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/project/list.js +0 -0
  215. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/project/move.js +0 -0
  216. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/project/remove.js +0 -0
  217. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/project/rename.js +0 -0
  218. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/project/restart.js +0 -0
  219. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/project/rm.js +0 -0
  220. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/project/start.js +0 -0
  221. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/project/status.js +0 -0
  222. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/project/stop.js +0 -0
  223. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/protocol/help.js +0 -0
  224. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/protocol/help.txt +0 -0
  225. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/protocol/list.js +0 -0
  226. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/protocol/set.js +0 -0
  227. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/scope/help.js +0 -0
  228. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/scope/help.txt +0 -0
  229. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/scope/link-local.js +0 -0
  230. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/scope/list.js +0 -0
  231. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/scope/remove.js +0 -0
  232. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/scope/rm.js +0 -0
  233. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/scope/set.js +0 -0
  234. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/scope/unset.js +0 -0
  235. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/scope/use.js +0 -0
  236. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cmd/view/add.js +0 -0
  237. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/collection/README.md +0 -0
  238. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/collection/build.json +0 -0
  239. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/collection/package.json +0 -0
  240. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/collection/src/main.js +241 -241
  241. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/config.js +29 -29
  242. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cron/README.md +0 -0
  243. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cron/package.json +0 -0
  244. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/cron/src/main.js +3 -2
  245. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/domain/LICENSE +0 -0
  246. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/domain/README.md +0 -0
  247. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/domain/dist/public_suffix_list.dat +0 -0
  248. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/domain/exemples/backend.js +0 -0
  249. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/domain/exemples/frontend.html +0 -0
  250. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/domain/package.json +0 -0
  251. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/domain/src/main.js +5 -1
  252. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/generator/index.js +3 -3
  253. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/index.js +1 -1
  254. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/inherits/LICENSE +0 -0
  255. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/inherits/README.md +2 -2
  256. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/inherits/example/inheriting_eventemitter.js +0 -0
  257. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/inherits/example/protected_inheritance.js +0 -0
  258. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/inherits/example/simple_inheritance.js +0 -0
  259. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/inherits/example/super_attribute_overridden_by_child_on_init.js +0 -0
  260. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/inherits/package.json +2 -3
  261. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/inherits/src/main.js +2 -2
  262. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/logger/README.md +0 -0
  263. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/logger/package.json +0 -0
  264. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/logger/src/containers/default/index.js +0 -0
  265. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/logger/src/containers/file/index.js +0 -0
  266. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
  267. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
  268. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/logger/src/containers/mq/index.js +0 -0
  269. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/logger/src/containers/mq/listener.js +0 -0
  270. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/logger/src/containers/mq/speaker.js +0 -0
  271. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/logger/src/helper.js +0 -0
  272. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/logger/src/main.js +2 -2
  273. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/math/index.js +2 -2
  274. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/merge/README.md +2 -2
  275. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/merge/example/merge.js +0 -0
  276. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/merge/example/merge_2_literal objects.js +0 -0
  277. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/merge/example/merge_and_preserve_first.js +0 -0
  278. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/merge/package.json +0 -0
  279. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/merge/src/main.js +0 -0
  280. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/model.js +1 -1
  281. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/proc.js +2 -2
  282. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/routing/README.md +0 -0
  283. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/routing/build.json +0 -0
  284. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/routing/package.json +0 -0
  285. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/routing/src/main.js +12 -6
  286. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/session-store.js +0 -0
  287. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/shell.js +0 -0
  288. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/swig-filters/README.md +0 -0
  289. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/swig-filters/package.json +0 -0
  290. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/swig-filters/src/main.js +0 -0
  291. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/url/README.md +0 -0
  292. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/url/index.js +0 -0
  293. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/url/mocks.json +0 -0
  294. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/url/routing.json +0 -0
  295. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/url/test.js +0 -0
  296. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/lib/validator.js +2 -2
  297. package/framework/{v0.1.1-alpha.166 → v0.1.1-alpha.167}/package.json +1 -1
  298. package/package.json +2 -2
  299. package/services/src/proxy/controllers/setup.js +14 -14
  300. package/framework/v0.1.1-alpha.166/VERSION +0 -1
@@ -2676,7 +2676,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
2676
2676
  module.exports = Merge()
2677
2677
  } else if ( typeof(define) === 'function' && define.amd) {
2678
2678
  // Publish as AMD module
2679
- define( 'utils/merge',[],function() { return Merge() })
2679
+ define( 'lib/merge',[],function() { return Merge() })
2680
2680
  };
2681
2681
  function registerEvents(plugin, events) {
2682
2682
  if ( typeof(gina) == 'undefined' && typeof(window.gina) != 'undefined' ) {
@@ -2755,7 +2755,7 @@ function triggerEvent (target, element, name, args, proxiedEvent) {
2755
2755
  if (typeof(element) != 'undefined' && element != null) {
2756
2756
  var evt = null, isDefaultPrevented = false, isAttachedToDOM = false, merge = null;
2757
2757
  // if (proxiedEvent) {
2758
- // merge = require('utils/merge');
2758
+ // merge = require('lib/merge');
2759
2759
  // }
2760
2760
  // done separately because it can be listen at the same time by the user & by gina
2761
2761
  if ( jQuery ) { //thru jQuery if detected
@@ -2946,7 +2946,7 @@ function handleXhr(xhr, $el, options, require) {
2946
2946
  if (!xhr)
2947
2947
  throw new Error('No `xhr` object initiated');
2948
2948
 
2949
- //var merge = require('utils/merge');
2949
+ //var merge = require('lib/merge');
2950
2950
 
2951
2951
  var blob = null
2952
2952
  , isAttachment = null // handle download
@@ -3846,7 +3846,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
3846
3846
  function DateFormatHelper() {
3847
3847
 
3848
3848
  var isGFFCtx = ( ( typeof(module) !== 'undefined' ) && module.exports ) ? false : true;
3849
- var merge = (isGFFCtx) ? require('utils/merge') : require('./../lib/merge');
3849
+ var merge = (isGFFCtx) ? require('lib/merge') : require('./../lib/merge');
3850
3850
 
3851
3851
 
3852
3852
  // if ( typeof(define) === 'function' && define.amd ) {
@@ -3942,7 +3942,7 @@ function DateFormatHelper() {
3942
3942
  var format = function(date, mask, utc) {
3943
3943
 
3944
3944
  // if ( typeof(merge) == 'undefined' || !merge ) {
3945
- // merge = (isGFFCtx) ? require('utils/merge') : require('./../lib/merge');
3945
+ // merge = (isGFFCtx) ? require('lib/merge') : require('./../lib/merge');
3946
3946
 
3947
3947
  // }
3948
3948
 
@@ -3957,7 +3957,7 @@ function DateFormatHelper() {
3957
3957
  } catch( mergeErr) {
3958
3958
  // called from logger - redefinition needed for none-dev env: cache issue
3959
3959
  isGFFCtx = ( ( typeof(module) !== 'undefined' ) && module.exports ) ? false : true;
3960
- merge = (isGFFCtx) ? require('utils/merge') : require('./../lib/merge');
3960
+ merge = (isGFFCtx) ? require('lib/merge') : require('./../lib/merge');
3961
3961
  masksList = merge(i18n.masks, dF.masks);
3962
3962
  }
3963
3963
 
@@ -4096,8 +4096,8 @@ function DateFormatHelper() {
4096
4096
  /**
4097
4097
  * Will give an array of dates between the current date to a targeted date
4098
4098
  *
4099
- * TODO - add a closure to `ignoreWeekend()` based on Utils::Validator
4100
- * TODO - add a closure to `ignoreFromList(array)` based on Utils::Validator
4099
+ * TODO - add a closure to `ignoreWeekend()` based on Lib::Validator
4100
+ * TODO - add a closure to `ignoreFromList(array)` based on Lib::Validator
4101
4101
  *
4102
4102
  * @param {object} dateTo
4103
4103
  * @param {string} [ mask ]
@@ -4366,7 +4366,7 @@ if ( typeof(module) !== 'undefined' && module.exports ) {
4366
4366
  * @param {object} [options]
4367
4367
  *
4368
4368
  * @returns {object} instance
4369
- *
4369
+ *
4370
4370
  * Collection.length will return result length : dont't use .count() which is going to include functions to the count
4371
4371
  *
4372
4372
  * Collection::find
@@ -4374,7 +4374,7 @@ if ( typeof(module) !== 'undefined' && module.exports ) {
4374
4374
  * eg.: { uid: 'someUID' }
4375
4375
  * eg.: { type: 'not null', country: 'France' } // `AND` clause
4376
4376
  * NB.: To filter `not empty`, use { type: '!=""' }
4377
- * eg.: { country: 'The Hashemite Kingdom of Jordan' }, { country: 'Libanon'} // `OR` clause
4377
+ * eg.: { country: 'The Hashemite Kingdom of Jordan' }, { country: 'Libanon'} // `OR` clause
4378
4378
  * eg.: { 'obj.prop': true }
4379
4379
  * eg.: { 'contacts[*].name': 'Doe' } // `WITHIN` (array|collection) clause
4380
4380
  * eg.: { lastUpdate: '>= 2016-12-01T00:00:00' } // also available for date comparison `=`, `<`, `>`
@@ -4399,7 +4399,7 @@ function Collection(content, options) {
4399
4399
 
4400
4400
  var isGFFCtx = ( ( typeof(module) !== 'undefined' ) && module.exports ) ? false : true;
4401
4401
  var uuid = (isGFFCtx) ? require('vendor/uuid') : require('uuid');
4402
- var merge = (isGFFCtx) ? require('utils/merge') : require('../../../lib/merge');
4402
+ var merge = (isGFFCtx) ? require('lib/merge') : require('../../../lib/merge');
4403
4403
 
4404
4404
  // defined search option rules
4405
4405
  var searchOptionRules = {
@@ -4415,17 +4415,17 @@ function Collection(content, options) {
4415
4415
  };
4416
4416
  var withOrClause = false;
4417
4417
  var notInSearchModeEnabled = false;
4418
-
4418
+
4419
4419
  var localSearchOptions = null;
4420
-
4420
+
4421
4421
  var defaultOptions = {
4422
4422
  useLocalStorage: false,
4423
4423
  locale: 'en', // TODO - get settigs.region, or user.region
4424
4424
  searchOptionRules: searchOptionRules
4425
4425
  };
4426
-
4427
-
4428
-
4426
+
4427
+
4428
+
4429
4429
  options = (typeof(options) == 'object') ? merge(options, defaultOptions) : defaultOptions;
4430
4430
 
4431
4431
  var keywords = ['not null']; // TODO - null, exists (`true` if property is defined)
@@ -4444,7 +4444,7 @@ function Collection(content, options) {
4444
4444
  throw new Error('`new Collection([content] [, options] )`: `content` argument must be an Array !');
4445
4445
 
4446
4446
  content = (content) ? JSON.clone(content) : []; // original content -> not to be touched
4447
-
4447
+
4448
4448
  // Indexing : uuids are generated for each entry
4449
4449
  var searchIndex = [], idx = 0;
4450
4450
  for (var entry = 0, entryLen = content.length; entry < entryLen; ++entry) {
@@ -4457,16 +4457,16 @@ function Collection(content, options) {
4457
4457
  ++idx;
4458
4458
  }
4459
4459
 
4460
- var instance = content;
4460
+ var instance = content;
4461
4461
  /**
4462
4462
  * Set local search option for the current collection method call
4463
- *
4464
- * eg.:
4463
+ *
4464
+ * eg.:
4465
4465
  * var recCollection = new Collection(arrayCollection);
4466
4466
  * var rec = recCollection
4467
4467
  * .setSearchOption('name', 'isCaseSensitive', false)
4468
4468
  * .find({ city: 'cap Town' });
4469
- *
4469
+ *
4470
4470
  * eg.:
4471
4471
  * var recCollection = new Collection(arrayCollection);
4472
4472
  * var searchOptions = {
@@ -4476,64 +4476,64 @@ function Collection(content, options) {
4476
4476
  * };
4477
4477
  * var rec = recCollection
4478
4478
  * .setSearchOption(searchOptions)
4479
- * .find({ city: 'cap Town' }); *
4480
- *
4479
+ * .find({ city: 'cap Town' }); *
4480
+ *
4481
4481
  * @param {object|string} searchOptionObject or searchOptionTargetedProperty
4482
4482
  * @param {string} [searchRule]
4483
4483
  * @param {boolean} [searchRuleValue] - true to enable, false to disabled
4484
- *
4484
+ *
4485
4485
  * @returns {object} instance with local search options
4486
4486
  */
4487
4487
  instance['setSearchOption'] = function() {
4488
-
4488
+
4489
4489
  if (!arguments.length)
4490
4490
  throw new Error('searchOption cannot be left blank');
4491
-
4491
+
4492
4492
  if (arguments.length > 3 || arguments.length < 3 && arguments.length > 1)
4493
4493
  throw new Error('argument length mismatch');
4494
-
4494
+
4495
4495
  var i = 0
4496
4496
  , len = arguments.length
4497
4497
  ;
4498
-
4498
+
4499
4499
  if (arguments.length == 1) {
4500
4500
  if ( typeof(arguments[0]) != 'object' )
4501
4501
  throw new Error('searchOption must be an object');
4502
-
4502
+
4503
4503
  for (var prop in arguments[0]) {
4504
4504
  if ( typeof(searchOptionRules[prop]) == 'undefined' )
4505
4505
  throw new Error(arguments[1] + ' is not an allowed searchOption !');
4506
4506
  }
4507
-
4507
+
4508
4508
  localSearchOptions = arguments[0];
4509
4509
  } else {
4510
-
4510
+
4511
4511
  if ( !localSearchOptions )
4512
4512
  localSearchOptions = {};
4513
-
4514
- for (; i < len; ++i) {
4513
+
4514
+ for (; i < len; ++i) {
4515
4515
  if ( typeof(searchOptionRules[arguments[1]]) == 'undefined' )
4516
4516
  throw new Error(arguments[1] + ' is not an allowed searchOption !');
4517
-
4517
+
4518
4518
  if (typeof(localSearchOptions[arguments[0]]) == 'undefined')
4519
4519
  localSearchOptions[arguments[0]] = {};
4520
-
4520
+
4521
4521
  if ( /true|false/i.test(arguments[2]) ) {
4522
4522
  localSearchOptions[arguments[0]][arguments[1]] = /true/i.test(arguments[2]) ? true : false
4523
4523
  } else {
4524
4524
  localSearchOptions[arguments[0]][arguments[1]] = arguments[2]
4525
- }
4525
+ }
4526
4526
  }
4527
- }
4528
-
4527
+ }
4528
+
4529
4529
  return instance
4530
4530
  }
4531
4531
 
4532
-
4532
+
4533
4533
  instance['find'] = function() {
4534
- // reset
4534
+ // reset
4535
4535
  withOrClause = false;
4536
-
4536
+
4537
4537
  if ( typeof(arguments[arguments.length-1]) == 'boolean' ) {
4538
4538
  withOrClause = arguments[arguments.length-1];
4539
4539
  delete arguments[arguments.length-1];
@@ -4548,13 +4548,13 @@ function Collection(content, options) {
4548
4548
  filters = JSON.parse(filtersStr);
4549
4549
  filtersCount = filters.count();
4550
4550
  } catch( filtersError) {
4551
- throw new Error('filter must be an object\n'+ filtersError.stack);
4552
- }
4553
-
4551
+ throw new Error('filter must be an object\n'+ filtersError.stack);
4552
+ }
4553
+
4554
4554
  if ( typeof(filters) != 'undefined' && filtersCount > 0 ) {
4555
-
4555
+
4556
4556
  if (filtersCount > 1) {
4557
- withOrClause = true;
4557
+ withOrClause = true;
4558
4558
  }
4559
4559
  // checking filter : this should be forbidden -> { type: 'red', type: 'orange'}
4560
4560
  // var filtersFields = null;
@@ -4567,7 +4567,7 @@ function Collection(content, options) {
4567
4567
  // filtersFields[ fField ] = true;
4568
4568
  // }
4569
4569
  // }
4570
-
4570
+
4571
4571
  var filter = null
4572
4572
  , condition = null
4573
4573
  , i = 0
@@ -4587,13 +4587,13 @@ function Collection(content, options) {
4587
4587
  var matched = null
4588
4588
  , filterIsArray = null
4589
4589
  , searchResult = [];
4590
-
4590
+
4591
4591
  /**
4592
4592
  * Regular Search
4593
- * @param {object} filter
4594
- * @param {string} field
4595
- * @param {strine|number|date} _content
4596
- * @param {number} matched
4593
+ * @param {object} filter
4594
+ * @param {string} field
4595
+ * @param {strine|number|date} _content
4596
+ * @param {number} matched
4597
4597
  */
4598
4598
  var search = function(filter, field, _content, matched, searchOptionRules) {
4599
4599
  var reValidCount = null, searchOptCount = null;
@@ -4602,23 +4602,23 @@ function Collection(content, options) {
4602
4602
  ++matched;
4603
4603
 
4604
4604
  } else if (
4605
- filter
4606
- && keywords.indexOf(localeLowerCase) > -1
4607
- && localeLowerCase == 'not null'
4608
- && typeof(_content) != 'undefined'
4609
- && typeof(_content) !== 'object'
4610
- && _content != 'null'
4605
+ filter
4606
+ && keywords.indexOf(localeLowerCase) > -1
4607
+ && localeLowerCase == 'not null'
4608
+ && typeof(_content) != 'undefined'
4609
+ && typeof(_content) !== 'object'
4610
+ && _content != 'null'
4611
4611
  && _content != 'undefined'
4612
4612
  ) {
4613
-
4613
+
4614
4614
  if (result.indexOf(_content) < 0) {
4615
4615
  ++matched;
4616
4616
  }
4617
4617
 
4618
- } else if (
4619
- typeof(_content) != 'undefined'
4620
- && typeof(_content) !== 'object'
4621
- && /(<|>|=)/.test(filter)
4618
+ } else if (
4619
+ typeof(_content) != 'undefined'
4620
+ && typeof(_content) !== 'object'
4621
+ && /(<|>|=)/.test(filter)
4622
4622
  && !/undefined|function/.test(typeof(_content))
4623
4623
  ) { // with operations
4624
4624
  let originalFilter = filter;
@@ -4632,7 +4632,7 @@ function Collection(content, options) {
4632
4632
  // restoring in case of datetime eval
4633
4633
  filter = originalFilter;
4634
4634
  }
4635
-
4635
+
4636
4636
  // looking for a datetime ?
4637
4637
  if (
4638
4638
  /(\d{4})\-(\d{2})\-(\d{2})(\s+|T)(\d{2}):(\d{2}):(\d{2})/.test(_content)
@@ -4647,44 +4647,44 @@ function Collection(content, options) {
4647
4647
  ++matched;
4648
4648
  }
4649
4649
 
4650
- } else if (
4651
- typeof(_content) != 'undefined'
4652
- && typeof(_content) !== 'object'
4650
+ } else if (
4651
+ typeof(_content) != 'undefined'
4652
+ && typeof(_content) !== 'object'
4653
4653
  && _content === filter
4654
4654
  && !searchOptions
4655
4655
  ||
4656
- typeof(_content) != 'undefined'
4657
- && typeof(_content) !== 'object'
4656
+ typeof(_content) != 'undefined'
4657
+ && typeof(_content) !== 'object'
4658
4658
  && _content === filter
4659
4659
  && typeof(searchOptions[field]) == 'undefined'
4660
4660
  ) {
4661
4661
 
4662
4662
  ++matched;
4663
- } else if (
4664
- typeof(_content) != 'undefined'
4665
- && typeof(_content) !== 'object'
4663
+ } else if (
4664
+ typeof(_content) != 'undefined'
4665
+ && typeof(_content) !== 'object'
4666
4666
  && searchOptions
4667
4667
  && typeof(searchOptions[field]) != 'undefined'
4668
4668
  ) {
4669
-
4669
+
4670
4670
  reValidCount = 0;
4671
4671
  searchOptCount = searchOptions[field].count();
4672
4672
  for ( var rule in searchOptions[field]) {
4673
4673
  searchOptionRules[rule][searchOptions[field][rule]].re = searchOptionRules[rule][searchOptions[field][rule]].re.replace(/\%s/, filter);
4674
-
4674
+
4675
4675
  if (searchOptionRules[rule][searchOptions[field][rule]].modifiers) {
4676
- re = new RegExp(searchOptionRules[rule][searchOptions[field][rule]].re, searchOptionRules[rule][searchOptions[field][rule]].modifiers);
4676
+ re = new RegExp(searchOptionRules[rule][searchOptions[field][rule]].re, searchOptionRules[rule][searchOptions[field][rule]].modifiers);
4677
4677
  } else {
4678
4678
  re = new RegExp(searchOptionRules[rule][searchOptions[field][rule]].re);
4679
4679
  }
4680
-
4680
+
4681
4681
  if ( re.test(_content) ) {
4682
4682
  ++reValidCount
4683
4683
  }
4684
4684
  }
4685
-
4685
+
4686
4686
  if (reValidCount == searchOptCount) {
4687
- ++matched;
4687
+ ++matched;
4688
4688
  }
4689
4689
  }
4690
4690
 
@@ -4698,26 +4698,26 @@ function Collection(content, options) {
4698
4698
  var field = f.split(/\./g);
4699
4699
  field = field[field.length - 1];
4700
4700
  re = new RegExp('("' + field + '":\\w+)');
4701
-
4701
+
4702
4702
  var value = null;
4703
-
4703
+
4704
4704
  try {
4705
4705
  if ( _content )
4706
4706
  value = eval('_content.'+f);
4707
4707
  } catch (err) {
4708
4708
  // Nothing to do
4709
4709
  // means that the field is not available in the collection
4710
- }
4711
-
4712
-
4710
+ }
4711
+
4712
+
4713
4713
 
4714
4714
  if (value /** && value.length > 0*/) {
4715
4715
  if ( Array.isArray(value) )
4716
4716
  value = value[1].split(/:/)[1];
4717
4717
  else if ( typeof(value) == 'string' && /\:/.test(value) )
4718
4718
  value = value.split(/:/)[1];
4719
-
4720
-
4719
+
4720
+
4721
4721
  if (/(<|>|=)/.test(filter)) {
4722
4722
 
4723
4723
  // looking for a datetime ?
@@ -4742,7 +4742,7 @@ function Collection(content, options) {
4742
4742
  }
4743
4743
  }
4744
4744
 
4745
- }
4745
+ }
4746
4746
 
4747
4747
  return {
4748
4748
  matched: matched
@@ -4751,25 +4751,25 @@ function Collection(content, options) {
4751
4751
 
4752
4752
  // if one of the entry matches the given filter, tag the whole entry as matched
4753
4753
  var searchWithin = function(filter, f, _content, matched, i) {
4754
-
4754
+
4755
4755
  var collectionName = null
4756
4756
  , collection = null
4757
4757
  , arr = null
4758
4758
  , field = null;
4759
4759
 
4760
-
4760
+
4761
4761
  arr = f.split(/\[\*\]/g);
4762
4762
  collectionName = arr[0].replace(/\[\*\]/, '');// only take the first collection
4763
4763
  collection = _content[ collectionName ];
4764
-
4765
-
4764
+
4765
+
4766
4766
  field = arr[1];
4767
4767
  if (/^\./.test(field) )
4768
4768
  field = field.substr(1);
4769
4769
 
4770
4770
  var subMatched = 0;
4771
4771
  if (collection) {
4772
-
4772
+
4773
4773
  for (var c = 0, cLen = collection.length; c < cLen; ++c) {
4774
4774
  // cases with _filter.prop
4775
4775
  if (/\./.test(field)) {
@@ -4786,32 +4786,32 @@ function Collection(content, options) {
4786
4786
  if (subMatched > 0) break;
4787
4787
  }
4788
4788
  }
4789
-
4789
+
4790
4790
  return {
4791
4791
  matched: (matched + subMatched)
4792
4792
  }
4793
4793
  }
4794
4794
 
4795
-
4795
+
4796
4796
  for (var o in tmpContent) {
4797
4797
 
4798
4798
  if (!tmpContent[o]) {
4799
4799
  tmpContent[o] = {}
4800
4800
  }
4801
-
4801
+
4802
4802
  if (!/undefined|function/.test( typeof(tmpContent[o]))) {
4803
-
4803
+
4804
4804
  for (let l = 0, lLen = filters.count(); l<lLen; ++l) {
4805
4805
  filter = filters[l];
4806
4806
  condition = filter.count();
4807
- // for each condition
4807
+ // for each condition
4808
4808
  matched = 0;
4809
-
4809
+
4810
4810
  for (var f in filter) {
4811
4811
  if ( typeof(filter[f]) == 'undefined' ) throw new Error('filter `'+f+'` cannot be left undefined');
4812
4812
 
4813
4813
  localeLowerCase = ( filter[f] !== null && !/(boolean|number)/.test(typeof(filter[f])) ) ? filter[f].toLocaleLowerCase() : filter[f];
4814
-
4814
+
4815
4815
  // cases with tmpContent.prop
4816
4816
  if (/\./.test(f)) {
4817
4817
  //JSON.stringify(tmpContent[o]).match(/("gross":\w+)/)[1].split(/:/)[1]
@@ -4829,19 +4829,19 @@ function Collection(content, options) {
4829
4829
  }
4830
4830
 
4831
4831
  } else { // normal case
4832
-
4833
- searchResult = search(filter[f], f, tmpContent[o][f], matched, searchOptionRules);
4832
+
4833
+ searchResult = search(filter[f], f, tmpContent[o][f], matched, searchOptionRules);
4834
4834
  matched = searchResult.matched;
4835
- }
4835
+ }
4836
4836
  }
4837
4837
 
4838
4838
  if (matched == condition ) { // all conditions must be fulfilled to match
4839
4839
  // `this` {Array} is the result of the previous search or the current content
4840
- // TODO - Add a switch
4840
+ // TODO - Add a switch
4841
4841
  if (
4842
- withOrClause
4842
+ withOrClause
4843
4843
  && notInSearchModeEnabled
4844
- && searchIndex.indexOf(tmpContent[o]._uuid) < 0
4844
+ && searchIndex.indexOf(tmpContent[o]._uuid) < 0
4845
4845
  || notInSearchModeEnabled
4846
4846
  || !withOrClause
4847
4847
  ) {
@@ -4857,12 +4857,12 @@ function Collection(content, options) {
4857
4857
  if (result.indexOf(tmpContent[o]._uuid) < 0) {
4858
4858
  result[i] = tmpContent[o];
4859
4859
  ++i;
4860
- }
4860
+ }
4861
4861
  }
4862
4862
  }
4863
4863
 
4864
4864
  }
4865
-
4865
+
4866
4866
  }
4867
4867
  }
4868
4868
  } else {
@@ -4871,7 +4871,7 @@ function Collection(content, options) {
4871
4871
 
4872
4872
  // reset localSearchOptions for nest calls
4873
4873
  localSearchOptions = null;
4874
-
4874
+
4875
4875
  // TODO - remove this
4876
4876
  //if (withOrClause) {
4877
4877
  // merging with previous result
@@ -4881,13 +4881,13 @@ function Collection(content, options) {
4881
4881
  // }
4882
4882
  // TODO - remove this part
4883
4883
  // Removed this on 2021-01-21 because it was causing duplicate content
4884
- //result = merge(this, result, true)
4884
+ //result = merge(this, result, true)
4885
4885
  //}
4886
4886
 
4887
4887
  // chaining
4888
4888
  //result._options = instance._options;
4889
4889
  //result.setSearchOption = instance.setSearchOption;
4890
-
4890
+
4891
4891
  result.insert = instance.insert;
4892
4892
  result.notIn = instance.notIn;
4893
4893
  result.find = this.find;
@@ -4903,24 +4903,24 @@ function Collection(content, options) {
4903
4903
 
4904
4904
  return result
4905
4905
  }
4906
-
4907
- /**
4906
+
4907
+ /**
4908
4908
  * findOne
4909
- *
4910
- * E.g.:
4909
+ *
4910
+ * E.g.:
4911
4911
  * - new Collection(projects).findOne({name: 'My Project'})
4912
4912
  * - new Collection(projects)
4913
4913
  * .setSearchOption({name: { isCaseSensitive: false }})
4914
4914
  * .findOne({name: 'my project'})
4915
- *
4916
- *
4915
+ *
4916
+ *
4917
4917
  * Available options :
4918
4918
  * isCaseSensitive: [true|false] - set to true by default
4919
- *
4919
+ *
4920
4920
  * @param {object} filter
4921
- *
4921
+ *
4922
4922
  * @returns {object} result
4923
- *
4923
+ *
4924
4924
  */
4925
4925
  instance['findOne'] = function() {
4926
4926
  var key = null // comparison key
@@ -4934,17 +4934,17 @@ function Collection(content, options) {
4934
4934
  delete arguments[arguments.length - 1];
4935
4935
  --arguments.length;
4936
4936
  }
4937
-
4937
+
4938
4938
  // if ( typeof(arguments[arguments.length-1]) == 'boolean' ) {
4939
4939
  // uuidSearchModeEnabled = arguments[arguments.length - 1]
4940
4940
  // delete arguments[arguments.length - 1];
4941
4941
  // --arguments.length;
4942
4942
  // }
4943
-
4943
+
4944
4944
  if (arguments.length > 0) {
4945
4945
  filters = arguments;
4946
4946
  }
4947
-
4947
+
4948
4948
 
4949
4949
  if ( typeof(filters) == 'undefined' || !filters || typeof(filters) != 'object' ) {
4950
4950
  throw new Error('[ Collection ][ findOne ] `filters` argument must be defined: Array or Filter Object(s) expected');
@@ -4959,9 +4959,9 @@ function Collection(content, options) {
4959
4959
  } else {
4960
4960
  foundResults = instance.find.apply(this, arguments) || [];
4961
4961
  }
4962
-
4962
+
4963
4963
  if (foundResults.length > 0) {
4964
- currentResult = foundResults.limit(1).toRaw()[0];
4964
+ currentResult = foundResults.limit(1).toRaw()[0];
4965
4965
  }
4966
4966
 
4967
4967
  result = currentResult;
@@ -5000,31 +5000,31 @@ function Collection(content, options) {
5000
5000
 
5001
5001
  return result
5002
5002
  }
5003
-
5004
- /**
5003
+
5004
+ /**
5005
5005
  * notIn
5006
5006
  * Works like a filter to match results by `excluding` through given `filters` !!
5007
- *
5008
- * filter can be like
5007
+ *
5008
+ * filter can be like
5009
5009
  * { car: 'toyota' }
5010
5010
  * { car: 'toyota', color: 'red' }
5011
- *
5011
+ *
5012
5012
  * You can pass more than one filter
5013
5013
  * { car: 'toyota', color: 'red' }, { car: 'porche' }
5014
- *
5014
+ *
5015
5015
  * .notIn(filter) // AND syntax
5016
5016
  * .notIn(filter1, filter2, filter3) // OR syntax
5017
5017
  * .notIn(filter, 'id') where `id` is the uuid used for the DIFF - `_uuid
5018
5018
  * .noIn(collectionObj, 'id')
5019
- *
5019
+ *
5020
5020
  * By default, Collection use its own internal `_uuid` to search and compare.
5021
5021
  * This mode is called `uuidSearchModeEnabled`, and it is by default set to `true`.
5022
5022
  * If you want to disable this mode in order to MATCH/DIFF by forcing check on every single filter
5023
5023
  * of the resultset :
5024
5024
  * .notIn(filter, false) where false must be a real boolean
5025
- *
5026
- *
5027
- *
5025
+ *
5026
+ *
5027
+ *
5028
5028
  * @param {object|array} filters|arrayToFilter - works like find filterss
5029
5029
  * @param {string} [key] - unique id for comparison; faster when provided
5030
5030
  */
@@ -5042,17 +5042,17 @@ function Collection(content, options) {
5042
5042
  delete arguments[arguments.length - 1];
5043
5043
  --arguments.length;
5044
5044
  }
5045
-
5045
+
5046
5046
  if ( typeof(arguments[arguments.length-1]) == 'boolean' ) {
5047
5047
  uuidSearchModeEnabled = arguments[arguments.length - 1]
5048
5048
  delete arguments[arguments.length - 1];
5049
5049
  --arguments.length;
5050
5050
  }
5051
-
5051
+
5052
5052
  if (arguments.length > 0) {
5053
5053
  filters = arguments;
5054
5054
  }
5055
-
5055
+
5056
5056
 
5057
5057
  if ( typeof(filters) == 'undefined' || !filters || typeof(filters) != 'object' ) {
5058
5058
  throw new Error('[ Collection ][ notIn ] `filters` argument must be defined: Array or Filter Object(s) expected');
@@ -5060,7 +5060,7 @@ function Collection(content, options) {
5060
5060
 
5061
5061
  // If an operation (find, insert ...) has been executed, get the previous result; if not, get the whole collection
5062
5062
  var currentResult = JSON.clone( (Array.isArray(this)) ? this : content );
5063
-
5063
+
5064
5064
  var foundResults = null;
5065
5065
  if ( Array.isArray(arguments[0]) ) {
5066
5066
  foundResults = arguments[0];
@@ -5069,16 +5069,16 @@ function Collection(content, options) {
5069
5069
  foundResults = instance.find.apply(this, arguments) || [];
5070
5070
  notInSearchModeEnabled = false;
5071
5071
  }
5072
-
5073
-
5072
+
5073
+
5074
5074
  if (foundResults.length > 0) {
5075
-
5075
+
5076
5076
  // check key
5077
- if (
5077
+ if (
5078
5078
  uuidSearchModeEnabled
5079
- && key
5080
- && typeof(foundResults[0]) == 'undefined'
5081
- && typeof(foundResults[0][key]) == 'undefined'
5079
+ && key
5080
+ && typeof(foundResults[0]) == 'undefined'
5081
+ && typeof(foundResults[0][key]) == 'undefined'
5082
5082
  ) {
5083
5083
  throw new Error('[ Collection ][ notIn ] `key` not valid');
5084
5084
  } else if ( uuidSearchModeEnabled && !key && typeof(foundResults[0]['_uuid']) != 'undefined' ) {
@@ -5086,10 +5086,10 @@ function Collection(content, options) {
5086
5086
  } else if ( typeof(foundResults[0]['id']) != 'undefined' ) {
5087
5087
  key = 'id';
5088
5088
  }
5089
-
5089
+
5090
5090
  if ( !key || typeof(foundResults[0][key]) == 'undefined' ) {
5091
5091
  throw new Error('No comparison key defined !')
5092
- }
5092
+ }
5093
5093
 
5094
5094
  // fast search with key
5095
5095
  var r = 0
@@ -5103,17 +5103,17 @@ function Collection(content, options) {
5103
5103
  , fullFiltersMatched = 0
5104
5104
  ;
5105
5105
  if ( uuidSearchModeEnabled && typeof(currentResult[c]) != 'undefined' && currentResult[c].hasOwnProperty(key) ) {
5106
- // for every single result found
5106
+ // for every single result found
5107
5107
  for (; r < rLen; ++r) {
5108
-
5108
+
5109
5109
  if (!currentResult.length) break;
5110
-
5110
+
5111
5111
  c = 0; cLen = currentResult.length;
5112
5112
  for (; c < cLen; ++c) {
5113
5113
  if ( typeof(currentResult[c]) == 'undefined' || typeof(foundResults[r]) == 'undefined' ) {
5114
5114
  continue
5115
5115
  }
5116
- // when matched, we want to remove those not in current result
5116
+ // when matched, we want to remove those not in current result
5117
5117
  if (currentResult[c][key] === foundResults[r][key]) {
5118
5118
  currentResult.splice(c,1);
5119
5119
  break;
@@ -5123,48 +5123,48 @@ function Collection(content, options) {
5123
5123
  } else if ( typeof(currentResult[c]) == 'undefined' ) { //empty source case
5124
5124
  // means that since we don't have a source to compare, current === found
5125
5125
  currentResult = JSON.clone(foundResults);
5126
-
5126
+
5127
5127
  } else { // search based on provided filters
5128
- // for every single result found
5128
+ // for every single result found
5129
5129
  for (; r < rLen; ++r) {
5130
- if (!currentResult.length) break;
5131
-
5130
+ if (!currentResult.length) break;
5131
+
5132
5132
  //onRemoved:
5133
5133
  c = 0; cLen = currentResult.length;
5134
- for (; c < cLen; ++c) { // current results
5135
-
5134
+ for (; c < cLen; ++c) { // current results
5135
+
5136
5136
  if ( typeof (currentResult[c]) != 'undefined' ) {
5137
-
5137
+
5138
5138
  // for each filter
5139
- fullFiltersMatched = 0;
5140
- f = 0;
5139
+ fullFiltersMatched = 0;
5140
+ f = 0;
5141
5141
  for (; f < fLen; ++f ) {
5142
5142
  if ( typeof(filters[f]) == 'undefined' ) throw new Error('filter `'+f+'` cannot be left undefined');
5143
-
5143
+
5144
5144
  keyLen = filters[f].count();
5145
5145
  matched = 0;
5146
5146
  for (key in filters[f]) {
5147
5147
  if ( currentResult[c].hasOwnProperty(key) && currentResult[c][key] === foundResults[r][key] ) {
5148
5148
  ++matched;
5149
- }
5150
- }
5149
+ }
5150
+ }
5151
5151
  if (matched == keyLen) {
5152
5152
  ++fullFiltersMatched
5153
- }
5153
+ }
5154
5154
  }
5155
-
5155
+
5156
5156
  if (fullFiltersMatched) {
5157
5157
  currentResult.splice(c,1);
5158
5158
  //break onRemoved;
5159
5159
  break;
5160
5160
  }
5161
-
5161
+
5162
5162
  }
5163
5163
  }
5164
5164
  }
5165
- }
5166
-
5167
- }
5165
+ }
5166
+
5167
+ }
5168
5168
 
5169
5169
  result = currentResult;
5170
5170
  result.notIn = instance.notIn;
@@ -5217,12 +5217,12 @@ function Collection(content, options) {
5217
5217
 
5218
5218
  /**
5219
5219
  * update
5220
- *
5220
+ *
5221
5221
  * @param {object} filter
5222
5222
  * @param {object} set
5223
- *
5223
+ *
5224
5224
  * @returns {objet} instance
5225
- */
5225
+ */
5226
5226
  instance['update'] = function() {
5227
5227
  var key = '_uuid' // comparison key is _uuid by default
5228
5228
  , result = null
@@ -5231,34 +5231,34 @@ function Collection(content, options) {
5231
5231
  //, uuidSearchModeEnabled = true
5232
5232
  ;
5233
5233
 
5234
- // comparison key : _uuid by default, but can be set to id
5234
+ // comparison key : _uuid by default, but can be set to id
5235
5235
  if ( typeof(arguments[arguments.length-1]) == 'string' ) {
5236
5236
  key = arguments[arguments.length - 1];
5237
5237
  delete arguments[arguments.length - 1];
5238
5238
  --arguments.length;
5239
- }
5240
-
5239
+ }
5240
+
5241
5241
  if ( typeof(arguments[arguments.length-1]) == 'object' ) {
5242
5242
  set = arguments[arguments.length - 1];
5243
5243
  delete arguments[arguments.length - 1];
5244
5244
  --arguments.length
5245
5245
  }
5246
-
5246
+
5247
5247
  // if ( typeof(arguments[arguments.length-1]) == 'boolean' ) {
5248
5248
  // uuidSearchModeEnabled = arguments[arguments.length - 1]
5249
5249
  // delete arguments[arguments.length - 1];
5250
5250
  // --arguments.length;
5251
5251
  // }
5252
-
5252
+
5253
5253
  if (arguments.length > 0) {
5254
5254
  filters = arguments;
5255
5255
  }
5256
-
5256
+
5257
5257
 
5258
5258
  if ( typeof(filters) == 'undefined' || !filters || typeof(filters) != 'object' ) {
5259
5259
  throw new Error('[ Collection ][ update ] `filters` argument must be defined: Array or Filter Object(s) expected');
5260
5260
  }
5261
-
5261
+
5262
5262
  if ( typeof(set) == 'undefined' || !set || typeof(set) != 'object' ) {
5263
5263
  throw new Error('[ Collection ][ update ] `set` argument must be defined: Object expected');
5264
5264
  }
@@ -5270,23 +5270,23 @@ function Collection(content, options) {
5270
5270
  } else {
5271
5271
  foundResults = instance.find.apply(this, arguments) || [];
5272
5272
  }
5273
-
5273
+
5274
5274
  result = Array.isArray(this) ? this : JSON.clone(content);
5275
- if (foundResults.length > 0 ) {
5275
+ if (foundResults.length > 0 ) {
5276
5276
  var arr = foundResults.toRaw();
5277
- for (var a = 0, aLen = arr.length; a < aLen; ++a) {
5277
+ for (var a = 0, aLen = arr.length; a < aLen; ++a) {
5278
5278
  arr[a] = merge( JSON.clone(set), arr[a]);
5279
5279
  for (var r = 0, rLen = result.length; r < rLen; ++r) {
5280
5280
  if ( typeof(result[r][key]) == 'undefined' && key == '_uuid' && typeof(result[r]['id']) != 'undefined' ) {
5281
5281
  key = 'id';
5282
5282
  }
5283
-
5283
+
5284
5284
  if ( result[r][key] == arr[a][key] ) {
5285
5285
  result[r] = arr[a];
5286
5286
  break;
5287
5287
  }
5288
5288
  }
5289
- }
5289
+ }
5290
5290
  }
5291
5291
 
5292
5292
  // chaining
@@ -5305,8 +5305,8 @@ function Collection(content, options) {
5305
5305
 
5306
5306
  return result
5307
5307
  }
5308
-
5309
-
5308
+
5309
+
5310
5310
  instance['replace'] = function() {
5311
5311
  var key = '_uuid' // comparison key
5312
5312
  , result = null
@@ -5315,34 +5315,34 @@ function Collection(content, options) {
5315
5315
  //, uuidSearchModeEnabled = true
5316
5316
  ;
5317
5317
 
5318
-
5318
+
5319
5319
  if ( typeof(arguments[arguments.length-1]) == 'string' ) {
5320
5320
  key = arguments[arguments.length - 1];
5321
5321
  delete arguments[arguments.length - 1];
5322
5322
  --arguments.length;
5323
- }
5324
-
5323
+ }
5324
+
5325
5325
  if ( typeof(arguments[arguments.length-1]) == 'object' ) {
5326
5326
  set = arguments[arguments.length - 1];
5327
5327
  delete arguments[arguments.length - 1];
5328
5328
  --arguments.length;
5329
5329
  }
5330
-
5330
+
5331
5331
  // if ( typeof(arguments[arguments.length-1]) == 'boolean' ) {
5332
5332
  // uuidSearchModeEnabled = arguments[arguments.length - 1]
5333
5333
  // delete arguments[arguments.length - 1];
5334
5334
  // --arguments.length;
5335
5335
  // }
5336
-
5336
+
5337
5337
  if (arguments.length > 0) {
5338
5338
  filters = arguments;
5339
5339
  }
5340
-
5340
+
5341
5341
 
5342
5342
  if ( typeof(filters) == 'undefined' || !filters || typeof(filters) != 'object' ) {
5343
5343
  throw new Error('[ Collection ][ update ] `filters` argument must be defined: Array or Filter Object(s) expected');
5344
5344
  }
5345
-
5345
+
5346
5346
  if ( typeof(set) == 'undefined' || !set || typeof(set) != 'object' ) {
5347
5347
  throw new Error('[ Collection ][ update ] `set` argument must be defined: Object expected');
5348
5348
  }
@@ -5356,25 +5356,25 @@ function Collection(content, options) {
5356
5356
  } else {
5357
5357
  foundResults = instance.find.apply(this, arguments) || [];
5358
5358
  }
5359
-
5359
+
5360
5360
  result = Array.isArray(this) ? this : JSON.clone(content);
5361
- if (foundResults.length > 0 ) {
5361
+ if (foundResults.length > 0 ) {
5362
5362
  var arr = foundResults.toRaw();
5363
- for (var a = 0, aLen = arr.length; a < aLen; ++a) {
5363
+ for (var a = 0, aLen = arr.length; a < aLen; ++a) {
5364
5364
  arr[a] = JSON.clone(set);
5365
5365
  for (var r = 0, rLen = result.length; r < rLen; ++r) {
5366
5366
  if ( typeof(result[r][key]) == 'undefined' && key == '_uuid' && typeof(result[r]['id']) != 'undefined' ) {
5367
5367
  key = 'id';
5368
5368
  } else if (typeof(result[r][key]) == 'undefined' && key == '_uuid') {
5369
5369
  throw new Error('No comparison key defined !')
5370
- }
5371
-
5370
+ }
5371
+
5372
5372
  if ( result[r][key] == arr[a][key] ) {
5373
5373
  result[r] = arr[a];
5374
5374
  break;
5375
5375
  }
5376
5376
  }
5377
- }
5377
+ }
5378
5378
  }
5379
5379
 
5380
5380
  // chaining
@@ -5393,24 +5393,24 @@ function Collection(content, options) {
5393
5393
 
5394
5394
  return result
5395
5395
  }
5396
-
5396
+
5397
5397
  /**
5398
5398
  * .delete({ key: 2 })
5399
5399
  * .delete({ name: 'Jordan' }, ''id) where id will be use as the `uuid` to compare records
5400
- *
5400
+ *
5401
5401
  * AND syntax
5402
5402
  * .delete({ car: 'toyota', color: 'red' })
5403
- *
5403
+ *
5404
5404
  * OR syntax
5405
5405
  * .delete({ car: 'toyota', color: red }, { car: 'ford' } ) // will delete all `toyota red cars` & all `ford cars`
5406
- *
5406
+ *
5407
5407
  * N.B.: will not affect current result - just returning the DIFF
5408
5408
  * If you
5409
5409
  * @param {object} filter - samme as `.find(filter)`
5410
5410
  * @param {string|boolean} [ uuid | disabled ] - by default, Collection is using its internal _uuid
5411
5411
  * If you want to delete without key comparison, disable `uuid` search mode
5412
5412
  * .delete({ name: 'Jordan' }, false)
5413
- *
5413
+ *
5414
5414
  * @returns {array} result
5415
5415
  */
5416
5416
  instance['delete'] = function() {
@@ -5441,10 +5441,10 @@ function Collection(content, options) {
5441
5441
  * @param {object|array} filter
5442
5442
  * */
5443
5443
  instance['orderBy'] = function () {
5444
-
5444
+
5445
5445
  if ( typeof(arguments) == 'undefined' || arguments.length < 1)
5446
5446
  throw new Error('[ Collection->orderBy(filter) ] where `filter` must not be empty or null' );
5447
-
5447
+
5448
5448
  var filter = null;
5449
5449
  if ( arguments.length == 1 ) {
5450
5450
  filter = arguments[0];
@@ -5459,27 +5459,27 @@ function Collection(content, options) {
5459
5459
  var variableContent = (Array.isArray(this)) ? this : JSON.clone(content);
5460
5460
  return sortResult(filter, variableContent.toRaw())
5461
5461
  }
5462
-
5462
+
5463
5463
  /**
5464
5464
  * max
5465
- * E.g:
5465
+ * E.g:
5466
5466
  * myCollection.max({ order: 'not null'})
5467
5467
  * => 5
5468
5468
  * myCollection.max({ createAt: 'not null'})
5469
5469
  * => '2021-12-31T23:59:59'
5470
5470
  * myCollection.max({ firstName: 'not null'})
5471
5471
  * => 'Zora'
5472
- *
5472
+ *
5473
5473
  * @param {object|array} filter
5474
- *
5474
+ *
5475
5475
  * @returns {number|date|string}
5476
5476
  * */
5477
5477
  instance['max'] = function () {
5478
5478
  if ( typeof(arguments) == 'undefined' || arguments.length < 1)
5479
5479
  throw new Error('[ Collection->max(filter) ] where `filter` must not be empty or null' );
5480
-
5480
+
5481
5481
  var filter = null;
5482
- if (
5482
+ if (
5483
5483
  arguments.length > 1
5484
5484
  || Array.isArray(arguments[0])
5485
5485
  || typeof(arguments[0]) == 'object' && arguments[0].count() > 1
@@ -5508,11 +5508,11 @@ function Collection(content, options) {
5508
5508
  *
5509
5509
  * // overriding filters -> last filter is always right
5510
5510
  * .orderBy([ { updatedAt : 'desc'}, { name: 'asc' } ])
5511
- *
5512
- * // sorting boolean
5511
+ *
5512
+ * // sorting boolean
5513
5513
  * .orderBy({ isActive: 'desc'}) => will display all active(TRUE) first
5514
5514
  * NB.: Boolean are 0 (FALSE) or 1 (TRUE)
5515
- *
5515
+ *
5516
5516
  * // combining filters -> the first one is always right
5517
5517
  * .orderBy({ updatedAt : 'desc'}, { name: 'asc' })
5518
5518
  *
@@ -5544,33 +5544,33 @@ function Collection(content, options) {
5544
5544
  _m[prop] = obj[prop];
5545
5545
  return _m;
5546
5546
  });
5547
-
5548
- mapped.sort(function onAscSort(a, b) {
5549
-
5550
-
5547
+
5548
+ mapped.sort(function onAscSort(a, b) {
5549
+
5550
+
5551
5551
  var _compare = function(a, b) {
5552
5552
  // handle booleans
5553
5553
  if ( /^(true|false)$/i.test(a) ) {
5554
5554
  a = ( /true/i.test(a) ) ? 1 : 0;
5555
5555
  }
5556
-
5556
+
5557
5557
  if ( /^(true|false)$/i.test(b) ) {
5558
5558
  b = ( /true/i.test(b) ) ? 1 : 0;
5559
5559
  }
5560
-
5561
-
5560
+
5561
+
5562
5562
  if ( typeof(a) == 'string' && a != '' || typeof(b) == 'string' ) {
5563
-
5563
+
5564
5564
  if ( typeof(a) == 'number' ) {
5565
5565
  a = ''+a; // cast to string
5566
- }
5566
+ }
5567
5567
  if ( typeof(b) == 'number' ) {
5568
5568
  b = ''+b; // cast to string
5569
- }
5570
-
5569
+ }
5570
+
5571
5571
  return a.localeCompare(b, undefined, {sensitivity: 'case', caseFirst: 'upper'})
5572
5572
  }
5573
-
5573
+
5574
5574
  if (a > b) {
5575
5575
  return 1;
5576
5576
  }
@@ -5578,18 +5578,18 @@ function Collection(content, options) {
5578
5578
  return -1;
5579
5579
  }
5580
5580
  // a must be equal to b
5581
- return 0;
5581
+ return 0;
5582
5582
  }
5583
-
5584
-
5583
+
5584
+
5585
5585
  if ( typeof(a) == 'object' ) {
5586
5586
  return _compare(a[prop], b[prop])
5587
5587
  }
5588
-
5588
+
5589
5589
  return _compare(a, b)
5590
-
5590
+
5591
5591
  });
5592
-
5592
+
5593
5593
  return mapped.map(function(m, index, result){
5594
5594
  return content[m.index];
5595
5595
  });
@@ -5601,24 +5601,24 @@ function Collection(content, options) {
5601
5601
  }
5602
5602
 
5603
5603
  multiSortOp = function(content, filter) {
5604
-
5604
+
5605
5605
  var props = [], keys = [];
5606
-
5606
+
5607
5607
  if ( Array.isArray(filter) ) {
5608
5608
  for (var f = 0, fLen = filter.length; f < fLen; ++f) {
5609
5609
  props[f] = Object.keys(filter[f])[0];
5610
- keys[f] = filter[f][ props[f]] ;
5610
+ keys[f] = filter[f][ props[f]] ;
5611
5611
  }
5612
5612
  } else {
5613
5613
  var f = 0;
5614
5614
  for (var flt in filter) {
5615
5615
  props[f] = flt;
5616
- keys[f] = filter[flt] ;
5616
+ keys[f] = filter[flt] ;
5617
5617
  ++f;
5618
5618
  }
5619
5619
  }
5620
-
5621
-
5620
+
5621
+
5622
5622
 
5623
5623
  sortRecursive = function(a, b, columns, order_by, index) {
5624
5624
 
@@ -5635,7 +5635,7 @@ function Collection(content, options) {
5635
5635
  } else if (res != 0) {
5636
5636
  return res < 0 ? 1 : -1
5637
5637
  }
5638
-
5638
+
5639
5639
  // a must be equal to b
5640
5640
  return columns.length - 1 > index ? sortRecursive(a, b, columns, order_by, index + 1) : 0;
5641
5641
 
@@ -5696,11 +5696,11 @@ function Collection(content, options) {
5696
5696
  }
5697
5697
 
5698
5698
  if ( Array.isArray(filter) || filter.count() > 1 ) {
5699
-
5699
+
5700
5700
  result = multiSortOp(content, filter);
5701
-
5701
+
5702
5702
  } else {
5703
-
5703
+
5704
5704
  prop = Object.keys(filter)[0];
5705
5705
  key = filter[prop];
5706
5706
 
@@ -5722,7 +5722,7 @@ function Collection(content, options) {
5722
5722
  result.max = instance.max;
5723
5723
  result.toRaw = instance.toRaw;
5724
5724
  result.filter = instance.filter;
5725
-
5725
+
5726
5726
  return result
5727
5727
  };
5728
5728
 
@@ -5743,7 +5743,7 @@ function Collection(content, options) {
5743
5743
 
5744
5744
  return JSON.clone(result);
5745
5745
  }
5746
-
5746
+
5747
5747
  /**
5748
5748
  * filter
5749
5749
  * Reduce record propName
@@ -5754,7 +5754,7 @@ function Collection(content, options) {
5754
5754
  * @returns {array} rawFilteredResult
5755
5755
  * */
5756
5756
  instance['filter'] = function(filter) {
5757
-
5757
+
5758
5758
  if ( typeof(filter) == 'undefined' ) {
5759
5759
  throw new Error('`filter` parametter must be a string or an array.');
5760
5760
  }
@@ -5764,7 +5764,7 @@ function Collection(content, options) {
5764
5764
  }
5765
5765
  var i = 0, len = result.length;
5766
5766
  var rawFilteredResult = [], fCount = 0;
5767
-
5767
+
5768
5768
  if ( Array.isArray(filter) ) {
5769
5769
  var f = null, fLen = filter.length, wrote = null;
5770
5770
  for (; i < len; ++i) {
@@ -5792,12 +5792,12 @@ function Collection(content, options) {
5792
5792
  ++fCount;
5793
5793
  }
5794
5794
  }
5795
- }
5795
+ }
5796
5796
 
5797
5797
  return JSON.clone(rawFilteredResult);
5798
5798
  }
5799
-
5800
-
5799
+
5800
+
5801
5801
  return instance;
5802
5802
  };
5803
5803
 
@@ -5806,16 +5806,16 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
5806
5806
  module.exports = Collection
5807
5807
  } else if ( typeof(define) === 'function' && define.amd) {
5808
5808
  // Publish as AMD module
5809
- define('utils/collection',[],function() { return Collection })
5809
+ define('lib/collection',[],function() { return Collection })
5810
5810
  };
5811
5811
  /**
5812
5812
  * FormValidatorUtil
5813
5813
  *
5814
5814
  * Dependencies:
5815
- * - utils/helpers
5816
- * - utils/helpers/dateFormat
5817
- * - utils/merge
5818
- * - utils/routing (for API calls)
5815
+ * - lib/helpers
5816
+ * - lib/helpers/dateFormat
5817
+ * - lib/merge
5818
+ * - lib/routing (for API calls)
5819
5819
  *
5820
5820
  * @param {object} data
5821
5821
  * @param {object} [ $fields ] - isGFFCtx only
@@ -5829,10 +5829,10 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
5829
5829
  // if (isGFFCtx && !$fields )
5830
5830
  // throw new Error('No `Validator` instance found.\nTry:\nvar FormValidator = require("gina/validator"):\nvar formValidator = new FormValidator(...);')
5831
5831
 
5832
- var merge = (isGFFCtx) ? require('utils/merge') : require('../../../../../lib/merge');
5832
+ var merge = (isGFFCtx) ? require('lib/merge') : require('../../../../../lib/merge');
5833
5833
  var helpers = (isGFFCtx) ? {} : require('../../../../../helpers');
5834
5834
  var dateFormat = (isGFFCtx) ? require('helpers/dateFormat') : helpers.dateFormat;
5835
- var routing = (isGFFCtx) ? require('utils/routing') : require('../../../../../lib/routing');
5835
+ var routing = (isGFFCtx) ? require('lib/routing') : require('../../../../../lib/routing');
5836
5836
 
5837
5837
  var hasUserValidators = function() {
5838
5838
 
@@ -7302,7 +7302,7 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
7302
7302
  *
7303
7303
  * @param {string|boolean} [mask] - by default "yyyy-mm-dd"
7304
7304
  *
7305
- * @returns {date} date - extended by gina::utils::dateFormat; an adaptation of Steven Levithan's code
7305
+ * @returns {date} date - extended by gina::lib::helpers::dateFormat; an adaptation of Steven Levithan's code
7306
7306
  * */
7307
7307
  self[el]['isDate'] = function(mask) {
7308
7308
  var val = this.value
@@ -7383,7 +7383,7 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
7383
7383
 
7384
7384
  /**
7385
7385
  * Formating date using DateFormatHelper
7386
- * Check out documentation in the helper source: `utils/helpers/dateFormat.js`
7386
+ * Check out documentation in the helper source: `lib/helpers/dateFormat.js`
7387
7387
  * e.g.:
7388
7388
  * d.start
7389
7389
  * .isDate('dd/mm/yyyy')
@@ -7667,7 +7667,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
7667
7667
  module.exports = FormValidatorUtil
7668
7668
  } else if ( typeof(define) === 'function' && define.amd) {
7669
7669
  // Publish as AMD module
7670
- define('utils/form-validator',[],function() { return FormValidatorUtil })
7670
+ define('lib/form-validator',[],function() { return FormValidatorUtil })
7671
7671
  };
7672
7672
  /*
7673
7673
  * This file is part of the gina package.
@@ -7696,8 +7696,14 @@ function Routing() {
7696
7696
 
7697
7697
  self.allowedMethodsString = self.allowedMethods.join(',');
7698
7698
 
7699
- // loading utils & plugins
7700
- var plugins = null, inherits = null, merge = null, Validator = null, fs = null, promisify = null;
7699
+ // loading lib & plugins
7700
+ var plugins = null
7701
+ , inherits = null
7702
+ , merge = null
7703
+ , Validator = null
7704
+ , fs = null
7705
+ , promisify = null
7706
+ ;
7701
7707
  if (!isGFFCtx) {
7702
7708
  fs = require('fs');
7703
7709
  promisify = require('util').promisify;
@@ -7710,10 +7716,10 @@ function Routing() {
7710
7716
  // BO - In case of partial rendering whithout handler defined for the partial
7711
7717
  else {
7712
7718
  if ( !merge || typeof(merge) != 'function' ) {
7713
- var merge = require('utils/merge');
7719
+ merge = require('lib/merge');
7714
7720
  }
7715
- if ( !Validator || typeof(Validator) != 'function' ) {
7716
- var Validator = require('utils/form-validator');
7721
+ if ( !Validator || typeof(Validator) != 'function' ) {
7722
+ Validator = require('lib/form-validator');
7717
7723
  }
7718
7724
  }
7719
7725
  // EO - In case of partial rendering whithout handler defined for the partial
@@ -9159,7 +9165,7 @@ if ((typeof (module) !== 'undefined') && module.exports) {
9159
9165
  module.exports = Routing()
9160
9166
  } else if (typeof (define) === 'function' && define.amd) {
9161
9167
  // Publish as AMD module
9162
- define('utils/routing', ['require', 'utils/form-validator', 'utils/merge'], function() { return Routing() })
9168
+ define('lib/routing', ['require', 'lib/form-validator', 'lib/merge'], function() { return Routing() })
9163
9169
  };
9164
9170
  /**
9165
9171
  * Gina Local Storage
@@ -9170,8 +9176,8 @@ if ((typeof (module) !== 'undefined') && module.exports) {
9170
9176
  * */
9171
9177
  function StoragePlugin(options) {
9172
9178
 
9173
- var merge = merge || require('utils/merge');;
9174
- var Collection = Collection || require('utils/collection');
9179
+ var merge = merge || require('lib/merge');;
9180
+ var Collection = Collection || require('lib/collection');
9175
9181
  var uuid = uuid || require('vendor/uuid');
9176
9182
  var dateFormat = dateFormat || require('helpers/dateFormat');
9177
9183
 
@@ -9578,8 +9584,8 @@ function StoragePlugin(options) {
9578
9584
 
9579
9585
  if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
9580
9586
  // Publish as node.js module
9581
- var merge = require('utils/merge'); //require('../../../../../lib/merge');
9582
- var Collection = require('utils/collection'); //require('../../../../../lib/collection');
9587
+ var merge = require('lib/merge'); //require('../../../../../lib/merge');
9588
+ var Collection = require('lib/collection'); //require('../../../../../lib/collection');
9583
9589
  var uuid = require('uuid');
9584
9590
 
9585
9591
  module.exports = StoragePlugin
@@ -9661,8 +9667,8 @@ define("utils/dom", function(){});
9661
9667
  * ValidatorPlugin
9662
9668
  *
9663
9669
  * Dependencies:
9664
- * - utils/form-validator
9665
- * - utils/merge
9670
+ * - lib/form-validator
9671
+ * - lib/merge
9666
9672
  * - utils/events
9667
9673
  * - vendor/uuid
9668
9674
  *
@@ -9747,11 +9753,11 @@ define("utils/dom", function(){});
9747
9753
  }
9748
9754
 
9749
9755
  var uuid = (isGFFCtx) ? require('vendor/uuid') : require('uuid');
9750
- var merge = (isGFFCtx) ? require('utils/merge') : require('../../../../../lib/merge');
9751
- var inherits = (isGFFCtx) ? require('utils/inherits') : require('../../../../../lib/inherits');
9752
- var FormValidator = (isGFFCtx) ? require('utils/form-validator') : require('./form-validator');
9753
- //var Collection = (isGFFCtx) ? require('utils/collection') : require('../../../../../lib/collection');
9754
- var routing = (isGFFCtx) ? require('utils/routing') : require('../../../../../lib/routing');
9756
+ var merge = (isGFFCtx) ? require('lib/merge') : require('../../../../../lib/merge');
9757
+ var inherits = (isGFFCtx) ? require('lib/inherits') : require('../../../../../lib/inherits');
9758
+ var FormValidator = (isGFFCtx) ? require('lib/form-validator') : require('./form-validator');
9759
+ //var Collection = (isGFFCtx) ? require('lib/collection') : require('../../../../../lib/collection');
9760
+ var routing = (isGFFCtx) ? require('lib/routing') : require('../../../../../lib/routing');
9755
9761
 
9756
9762
  /** definitions */
9757
9763
  var instance = {
@@ -16593,15 +16599,16 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
16593
16599
  module.exports = ValidatorPlugin
16594
16600
  } else if ( typeof(define) === 'function' && define.amd) {
16595
16601
  // Publish as AMD module
16596
- define('gina/validator', ['utils/events', 'utils/dom', 'utils/form-validator'], function(){ return ValidatorPlugin })
16602
+ define('gina/validator', ['utils/events', 'utils/dom', 'lib/form-validator'], function(){ return ValidatorPlugin })
16597
16603
  };
16598
- define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'utils/merge'*/, 'utils/collection', 'utils/routing', 'gina/storage', 'gina/validator' ], function (require) {
16604
+ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'lib/merge'*/, 'lib/collection', 'lib/routing', 'gina/storage', 'gina/validator' ], function (require) {
16599
16605
 
16600
16606
  var $ = require('jquery');
16607
+
16601
16608
  $.noConflict();
16602
- //var merge = require('utils/merge');
16603
- var routing = require('utils/routing');
16604
- var Collection = require('utils/collection');
16609
+ //var merge = require('lib/merge');
16610
+ var routing = require('lib/routing');
16611
+ var Collection = require('lib/collection');
16605
16612
  var Storage = require('gina/storage');
16606
16613
  //var Validator = require('gina/validator');
16607
16614
 
@@ -18139,11 +18146,11 @@ define('gina/toolbar', ['require', 'jquery', 'vendor/uuid'/**, 'utils/merge'*/,
18139
18146
 
18140
18147
  return Toolbar
18141
18148
  });
18142
- define('gina', [ 'require', 'vendor/uuid', 'utils/merge', 'utils/events', 'helpers/prototypes', 'helpers/dateFormat', 'gina/toolbar' ], function (require) {
18149
+ define('gina', [ 'require', 'vendor/uuid', 'lib/merge', 'utils/events', 'helpers/prototypes', 'helpers/dateFormat', 'gina/toolbar' ], function (require) {
18143
18150
 
18144
18151
 
18145
18152
  var eventsHandler = require('utils/events'); // events handler
18146
- var merge = require('utils/merge');
18153
+ var merge = require('lib/merge');
18147
18154
  var dateFormat = require('helpers/dateFormat')();
18148
18155
  var prototypes = require('helpers/prototypes')({ dateFormat: dateFormat });
18149
18156
  var uuid = require('vendor/uuid');
@@ -18728,7 +18735,11 @@ function Domain(options, cb) {
18728
18735
  isRegisteredTldOrSld: isRegisteredTldOrSld
18729
18736
  }
18730
18737
  }
18731
- return rootDomain
18738
+ return {
18739
+ value : rootDomain,
18740
+ isSLD : isSLD,
18741
+ isRegisteredTldOrSld: isRegisteredTldOrSld
18742
+ }
18732
18743
  }
18733
18744
 
18734
18745
  // Both backend & frontend
@@ -18780,17 +18791,28 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
18780
18791
  module.exports = Domain
18781
18792
  } else if ( typeof(define) === 'function' && define.amd) {
18782
18793
  // Publish as AMD module
18783
- define( 'utils/domain',[],function() { return Domain })
18794
+ define( 'lib/domain',[],function() { return Domain })
18784
18795
  }
18785
18796
  ;
18786
- define('gina/link', [ 'require', 'jquery', 'vendor/uuid', 'utils/domain', 'utils/merge', 'utils/events' ], function (require) {
18797
+ define('gina/link', [ 'require', 'jquery', 'vendor/uuid', 'lib/domain', 'lib/merge', 'utils/events' ], function (require) {
18787
18798
 
18788
18799
  var $ = require('jquery');
18800
+ // $.noConflict = function( deep ) {
18801
+ // if ( window.$ === jQuery ) {
18802
+ // window.$ = _$;
18803
+ // }
18804
+
18805
+ // if ( deep && window.jQuery === jQuery ) {
18806
+ // window.jQuery = _jQuery;
18807
+ // }
18808
+
18809
+ // return jQuery;
18810
+ // }
18789
18811
  $.noConflict();
18790
18812
  var uuid = require('vendor/uuid');
18791
- var Domain = require('utils/domain');
18813
+ var Domain = require('lib/domain');
18792
18814
  var domainInstance = null;
18793
- var merge = require('utils/merge');
18815
+ var merge = require('lib/merge');
18794
18816
 
18795
18817
  require('utils/events'); // events
18796
18818
 
@@ -19284,15 +19306,15 @@ define('gina/link', [ 'require', 'jquery', 'vendor/uuid', 'utils/domain', 'utils
19284
19306
 
19285
19307
  return Link
19286
19308
  });
19287
- define('gina/popin', [ 'require', 'jquery', 'vendor/uuid', 'utils/domain', 'utils/merge', 'utils/routing', 'utils/events' ], function (require) {
19309
+ define('gina/popin', [ 'require', 'jquery', 'vendor/uuid', 'lib/domain', 'lib/merge', 'lib/routing', 'utils/events' ], function (require) {
19288
19310
 
19289
19311
  var $ = require('jquery');
19290
19312
  $.noConflict();
19291
19313
  var uuid = require('vendor/uuid');
19292
- var Domain = require('utils/domain');
19314
+ var Domain = require('lib/domain');
19293
19315
  var domainInstance = null;
19294
- var merge = require('utils/merge');
19295
- var routing = require('utils/routing');
19316
+ var merge = require('lib/merge');
19317
+ var routing = require('lib/routing');
19296
19318
 
19297
19319
  require('utils/events'); // events
19298
19320
 
@@ -21042,7 +21064,7 @@ if ( typeof(JSON.clone) == 'undefined' ) {
21042
21064
  * Clone JSON object
21043
21065
  *
21044
21066
  * Changes made here must be reflected in:
21045
- * - gina/utils/prototypes.js
21067
+ * - gina/lib/prototypes.js
21046
21068
  * - gina/framework/version/helpers/prototypes.js
21047
21069
  * - gina/framework/version/core/asset/plugin/src/gina/utils/polyfill.js
21048
21070
  *
@@ -21088,7 +21110,7 @@ if ( typeof(JSON.escape) == 'undefined' ) {
21088
21110
  * Escape special characters
21089
21111
  *
21090
21112
  * Changes made here must be reflected in:
21091
- * - gina/utils/prototypes.js
21113
+ * - gina/lib/prototypes.js
21092
21114
  * - gina/framework/version/helpers/prototypes.js
21093
21115
  * - gina/framework/version/core/asset/plugin/src/gina/utils/polyfill.js
21094
21116
  *
@@ -21124,8 +21146,8 @@ define("utils/polyfill", function(){});
21124
21146
  /**
21125
21147
  * @class Inherits
21126
21148
  *
21127
- * @package gina.utils
21128
- * @namesame gina.utils.inherits
21149
+ * @package gina.lib
21150
+ * @namesame gina.lib.inherits
21129
21151
  * @author Rhinostone <contact@gina.io>
21130
21152
  *
21131
21153
  * @api Public
@@ -21205,7 +21227,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
21205
21227
  module.exports = Inherits();
21206
21228
  } else if ( typeof(define) === 'function' && define.amd) {
21207
21229
  // Publish as AMD module
21208
- define( 'utils/inherits',[],function() { return Inherits(); });
21230
+ define( 'lib/inherits',[],function() { return Inherits(); });
21209
21231
  };
21210
21232
  /**
21211
21233
  * Gina Frontend Framework
@@ -21226,16 +21248,22 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
21226
21248
  *
21227
21249
  * window['originalContext']
21228
21250
  * You have to passe your `jQuery` or your `DollarDom` context to Gina
21229
- * e.g.:
21251
+ * e.g.:
21230
21252
  * window['originalContext'] = window['jQuery']
21231
- *
21253
+ *
21232
21254
  * This can be achieved by overriding `window['originalContext']` before defining your handler
21233
21255
  * Default value will be jQuery
21234
21256
  *
21235
21257
  * */
21236
21258
 
21237
21259
  //var wContext = ( typeof(window.onGinaLoaded) == 'undefined') ? window : parent.window; // iframe case
21238
- var readyList = [ { name: 'gina', ctx: window['gina'], fn: window.onGinaLoaded } ];
21260
+ var readyList = [
21261
+ {
21262
+ name: 'gina',
21263
+ ctx: window['gina'],
21264
+ fn: window.onGinaLoaded
21265
+ }
21266
+ ];
21239
21267
  var readyFired = false;
21240
21268
  var readyEventHandlersInstalled = false;
21241
21269
 
@@ -21260,7 +21288,7 @@ function ready() {
21260
21288
  if ( typeof(readyList) == 'undefined' ) {
21261
21289
  // Fixing init bug in chrome
21262
21290
  readyList = window.readyList;
21263
- }
21291
+ }
21264
21292
  readyList[i].ctx = window.gina;
21265
21293
  result = readyList[i].fn.call(window, readyList[i].ctx, window.require);
21266
21294
 
@@ -21287,7 +21315,8 @@ function ready() {
21287
21315
  if ( typeof(window.originalContext) == 'undefined' && typeof(window.$) != 'undefined' ) {
21288
21316
  window.originalContext = window.$
21289
21317
  }
21290
- readyList[i].ctx = window.originalContext || $;// passes the user's orignalContext by default; if no orignalContext is set will try users'jQuery
21318
+ // passes the user's orignalContext by default; if no orignalContext is set will try users'jQuery
21319
+ readyList[i].ctx = window.originalContext || $;
21291
21320
  readyList[i].fn.call(window, readyList[i].ctx, window.require);
21292
21321
  ++i;
21293
21322
  handleEvent(i, readyList);
@@ -21301,10 +21330,10 @@ function ready() {
21301
21330
 
21302
21331
  handleEvent(i, readyList);
21303
21332
  }
21304
- }
21333
+ } // EO function ready()
21305
21334
 
21306
21335
  function readyStateChange() {
21307
- if ( document.readyState === 'complete' ) {
21336
+ if ( document.readyState === 'complete' ) {
21308
21337
  gina.ready();
21309
21338
  }
21310
21339
  }
@@ -21317,30 +21346,30 @@ if ( typeof(window['gina']) == 'undefined' ) {// could have be defined by loader
21317
21346
  * `_global` is used mainly for google closure compilation in some cases
21318
21347
  * where eval() is called
21319
21348
  * It will store extenal variable definitions
21320
- * e.g.:
21349
+ * e.g.:
21321
21350
  * root -> window.root
21322
21351
  * then you need to call :
21323
21352
  * gina._global.register({'root': yourValue });
21324
21353
  * => `window.root`now accessible
21325
21354
  * before using:
21326
21355
  * eval(root +'=value');
21327
- *
21356
+ *
21328
21357
  * when not required anymore
21329
21358
  * gina._global.unregister(['root])
21330
21359
  */
21331
21360
  /**@js_externs _global*/
21332
21361
  _global: {
21333
-
21362
+
21334
21363
  /**@js_externs register*/
21335
21364
  register: function(variables) {
21336
21365
  if ( typeof(variables) != 'undefined') {
21337
- for (let k in variables) {
21366
+ for (let k in variables) {
21338
21367
  // if ( typeof(window[k]) != 'undefined' ) {
21339
21368
  // // already register
21340
21369
  // continue;
21341
21370
  // //throw new Error('Gina cannot register _global.'+k+': variable name need to be changed, or you need to called `_global.unregister(['+k+'])` in order to use it');
21342
21371
  // }
21343
- //window.gina['_global'][k] = variables[k];
21372
+ //window.gina['_global'][k] = variables[k];
21344
21373
  window[k] = variables[k];
21345
21374
  }
21346
21375
  }
@@ -21350,7 +21379,7 @@ if ( typeof(window['gina']) == 'undefined' ) {// could have be defined by loader
21350
21379
  if ( typeof(variables) == 'undefined' || !Array.isArray(variables)) {
21351
21380
  throw new Error('`variables` needs to ba an array')
21352
21381
  }
21353
-
21382
+
21354
21383
  for (let i = 0, len = variables.length; i < len; i++) {
21355
21384
  //delete window.gina['_global'][ variables[i] ];
21356
21385
  //if ( typeof(window[ variables[i] ]) != 'undefined' ) {
@@ -21374,7 +21403,7 @@ if ( typeof(window['gina']) == 'undefined' ) {// could have be defined by loader
21374
21403
  ready: function(callback, context) {
21375
21404
 
21376
21405
 
21377
- // if ready has already fired, then just schedule the callback
21406
+ // if ready has already beenfired, then just schedule the callback
21378
21407
  // to fire asynchronously, but right away
21379
21408
  if (readyFired) {
21380
21409
  setTimeout(function() {callback(context);}, 1);
@@ -21411,15 +21440,32 @@ if ( typeof(window['gina']) == 'undefined' ) {// could have be defined by loader
21411
21440
 
21412
21441
 
21413
21442
  define('core', ['require', 'gina'], function (require) {
21443
+ // require(['jquery'], function onjQueryLoaded(_jQuery) {
21444
+ // console.debug('_jQuery loaded ', _jQuery.fn.jquery);
21445
+ // jquery = _jQuery
21446
+ // });
21447
+
21414
21448
  require('gina')(window['gina']); // passing core required lib through parameters
21449
+
21415
21450
  });
21416
21451
 
21452
+ /**
21453
+ * It will not work, since jQuery registers itself with the name of 'jquery' and not 'lib/jquery'.
21454
+ * In general, explicitly naming modules in the define() call are discouraged, but jQuery has some special constraints.
21455
+ */
21456
+ // if ( typeof define === "function" && define.amd ) {
21457
+ // define(['require'], function(require) {
21458
+ // jQuery = require('jquery');
21459
+ // });
21460
+ // // }
21461
+
21417
21462
 
21418
21463
  require.config({
21419
21464
  "packages": ["gina"]
21420
21465
  });
21421
21466
 
21422
21467
  // exporting
21468
+ // require(["jquery"]);
21423
21469
  require([
21424
21470
  //vendors
21425
21471
  "vendor/uuid",
@@ -21437,20 +21483,20 @@ require([
21437
21483
  "gina/popin",
21438
21484
  "gina/storage",
21439
21485
 
21440
- // utils
21486
+ // lib
21441
21487
  "utils/dom",
21442
21488
  "utils/events",
21443
21489
  "utils/effects",
21444
21490
  "utils/polyfill",
21445
- "utils/inherits",
21446
- //"utils/merge",
21447
- "utils/form-validator",
21448
- "utils/collection",
21449
- "utils/routing"
21491
+ "lib/inherits",
21492
+ //"lib/merge",
21493
+ "lib/form-validator",
21494
+ "lib/collection",
21495
+ "lib/domain",
21496
+ "lib/routing"
21450
21497
  ]);
21451
21498
 
21452
-
21453
- // catching freelancer script load event
21499
+ // catching gina script load event
21454
21500
  var tags = document.getElementsByTagName('script');
21455
21501
 
21456
21502
  for (var t = 0, len = tags.length; t < len; ++t) {
@@ -21486,12 +21532,12 @@ for (var t = 0, len = tags.length; t < len; ++t) {
21486
21532
  'webroot' : '{{ page.environment.webroot }}',
21487
21533
  };
21488
21534
 
21489
-
21535
+
21490
21536
  // globals
21491
21537
  window['GINA_ENV'] = '{{ GINA_ENV }}';
21492
21538
  window['GINA_ENV_IS_DEV'] = /^true$/i.test('{{ GINA_ENV_IS_DEV }}') ? true : false;
21493
21539
  if ( typeof(location.search) != 'undefined' && /debug\=/i.test(window.location.search) ) {
21494
- window['GINA_ENV_IS_DEV'] = gina['config']['envIsDev'] = options['envIsDev'] = /^true$/i.test(window.location.search.match(/debug=(true|false)/)[0].split(/\=/)[1]) ? true: false;
21540
+ window['GINA_ENV_IS_DEV'] = gina['config']['envIsDev'] = options['envIsDev'] = /^true$/i.test(window.location.search.match(/debug=(true|false)/)[0].split(/\=/)[1]) ? true: false;
21495
21541
  }
21496
21542
 
21497
21543
  gina["setOptions"](options);