gina 0.3.13-alpha.2 → 0.3.13-alpha.3

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 (403) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/ROADMAP.md +10 -0
  3. package/framework/v0.3.13-alpha.3/VERSION +1 -0
  4. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/js/gina.js +21 -6
  5. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/js/gina.min.js +47 -46
  6. package/framework/v0.3.13-alpha.3/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
  7. package/framework/v0.3.13-alpha.3/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
  8. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/config.js +13 -0
  9. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/csrf/src/main.js +32 -9
  10. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/validator/src/form-validator.js +11 -1
  11. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/validator/src/main.js +4 -2
  12. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle/index.js +14 -4
  13. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/conf/settings.json +8 -3
  14. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/json/src/main.js +38 -22
  15. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/mcp-start.js +18 -2
  16. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/index.js +5 -0
  17. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/logger/src/containers/file/index.js +1 -4
  18. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/logger/src/containers/mq/index.js +1 -4
  19. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/logger/src/main.js +1 -4
  20. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/merge/src/main.js +2 -1
  21. package/framework/v0.3.13-alpha.3/lib/secrets/package.json +17 -0
  22. package/framework/v0.3.13-alpha.3/lib/secrets/src/backends/env.js +60 -0
  23. package/framework/v0.3.13-alpha.3/lib/secrets/src/main.js +200 -0
  24. package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/package.json +1 -1
  25. package/gna.js +4 -4
  26. package/llms.txt +6 -0
  27. package/package.json +2 -2
  28. package/framework/v0.3.13-alpha.2/VERSION +0 -1
  29. package/framework/v0.3.13-alpha.2/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
  30. package/framework/v0.3.13-alpha.2/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
  31. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/AUTHORS +0 -0
  32. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/LICENSE +0 -0
  33. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/html/nolayout.html +0 -0
  34. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/html/static.html +0 -0
  35. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/img/android-chrome-192x192.png +0 -0
  36. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/img/android-chrome-512x512.png +0 -0
  37. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/img/apple-touch-icon.png +0 -0
  38. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/img/favicon-16x16.png +0 -0
  39. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/img/favicon-32x32.png +0 -0
  40. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/img/favicon.ico +0 -0
  41. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/README.md +0 -0
  42. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.css +0 -0
  43. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.js +0 -0
  44. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/beemaster/index.html +0 -0
  45. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
  46. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.br +0 -0
  47. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.gz +0 -0
  48. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/html/statusbar.html +0 -0
  49. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.br +0 -0
  50. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.gz +0 -0
  51. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/inspector/have_heart_one-webfont.woff2 +0 -0
  52. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/inspector/index.html +0 -0
  53. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/inspector/inspector.css +0 -0
  54. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/inspector/inspector.js +0 -0
  55. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/inspector/logo.svg +0 -0
  56. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -0
  57. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.br +0 -0
  58. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.gz +0 -0
  59. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/ai/index.js +0 -0
  60. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/ai/lib/connector.js +0 -0
  61. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/couchbase/index.js +0 -0
  62. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/couchbase/lib/connector.js +0 -0
  63. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/couchbase/lib/connector.v2.js +0 -0
  64. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/couchbase/lib/connector.v3.js +0 -0
  65. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/couchbase/lib/connector.v4.js +0 -0
  66. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/couchbase/lib/n1ql.js +0 -0
  67. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/couchbase/lib/session-store.js +0 -0
  68. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
  69. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
  70. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
  71. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/mongodb/index.js +0 -0
  72. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/mongodb/lib/connector.js +0 -0
  73. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/mongodb/lib/pipeline-loader.js +0 -0
  74. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/mongodb/lib/session-store.js +0 -0
  75. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/mysql/index.js +0 -0
  76. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/mysql/lib/connector.js +0 -0
  77. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/postgresql/index.js +0 -0
  78. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/postgresql/lib/connector.js +0 -0
  79. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/redis/index.js +0 -0
  80. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/redis/lib/session-store.js +0 -0
  81. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/scylladb/index.js +0 -0
  82. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/scylladb/lib/connector.js +0 -0
  83. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/scylladb/lib/session-store.js +0 -0
  84. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/sql-parser.js +0 -0
  85. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/sqlite/index.js +0 -0
  86. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/sqlite/lib/connector.js +0 -0
  87. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/connectors/sqlite/lib/session-store.js +0 -0
  88. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/content.encoding +0 -0
  89. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/controller/controller.framework.js +0 -0
  90. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/controller/controller.js +0 -0
  91. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/controller/controller.render-json.js +0 -0
  92. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/controller/controller.render-nunjucks.js +0 -0
  93. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/controller/controller.render-stream.js +0 -0
  94. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/controller/controller.render-swig.js +0 -0
  95. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/controller/controller.render-v1.js +0 -0
  96. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/controller/index.js +0 -0
  97. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/deps/busboy-1.6.0/LICENSE +0 -0
  98. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/deps/busboy-1.6.0/README.md +0 -0
  99. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/deps/busboy-1.6.0/lib/index.js +0 -0
  100. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/deps/busboy-1.6.0/lib/types/multipart.js +0 -0
  101. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/deps/busboy-1.6.0/lib/types/urlencoded.js +0 -0
  102. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/deps/busboy-1.6.0/lib/utils.js +0 -0
  103. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/deps/busboy-1.6.0/package.json +0 -0
  104. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/deps/streamsearch-1.1.0/LICENSE +0 -0
  105. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/deps/streamsearch-1.1.0/lib/sbmh.js +0 -0
  106. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/deps/streamsearch-1.1.0/package.json +0 -0
  107. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/dev/index.js +0 -0
  108. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/dev/lib/class.js +0 -0
  109. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/dev/lib/factory.js +0 -0
  110. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/dev/lib/tools.js +0 -0
  111. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/gna.js +0 -0
  112. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/locales/README.md +0 -0
  113. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/locales/currency.json +0 -0
  114. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/locales/dist/language/en.json +0 -0
  115. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/locales/dist/language/fr.json +0 -0
  116. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/locales/dist/region/en.json +0 -0
  117. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/locales/dist/region/fr.json +0 -0
  118. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/locales/index.js +0 -0
  119. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/mime.types +0 -0
  120. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/model/entity.js +0 -0
  121. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/model/index.js +0 -0
  122. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/model/template/entityFactory.js +0 -0
  123. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/model/template/index.js +0 -0
  124. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/README.md +0 -0
  125. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/index.js +0 -0
  126. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/csrf/README.md +0 -0
  127. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/csrf/package.json +0 -0
  128. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/file/README.md +0 -0
  129. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/file/build.json +0 -0
  130. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/file/package.json +0 -0
  131. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/intl/README.md +0 -0
  132. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/intl/build.json +0 -0
  133. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/intl/package.json +0 -0
  134. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/intl/src/main.js +0 -0
  135. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/session/README.md +0 -0
  136. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/session/package.json +0 -0
  137. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/session/src/main.js +0 -0
  138. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/storage/README.md +0 -0
  139. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/storage/build.json +0 -0
  140. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/storage/package.json +0 -0
  141. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/storage/src/main.js +0 -0
  142. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/validator/README.md +0 -0
  143. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/validator/build.json +0 -0
  144. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/plugins/lib/validator/package.json +0 -0
  145. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/router.js +0 -0
  146. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/server.express.js +0 -0
  147. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/server.isaac.js +0 -0
  148. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/server.js +0 -0
  149. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/status.codes +0 -0
  150. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/_gitignore +0 -0
  151. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle/config/app.json +0 -0
  152. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle/config/connectors.json +0 -0
  153. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle/config/routing.json +0 -0
  154. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle/config/settings.json +0 -0
  155. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
  156. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle/config/templates.json +0 -0
  157. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle/config/watchers.json +0 -0
  158. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
  159. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
  160. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle/controllers/setup.js +0 -0
  161. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle/locales/en.json +0 -0
  162. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
  163. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle_public/css/default.css +0 -0
  164. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle_public/css/home.css +0 -0
  165. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
  166. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
  167. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
  168. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle_public/readme.md +0 -0
  169. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
  170. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
  171. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
  172. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
  173. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
  174. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/command/gina.bat.tpl +0 -0
  175. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/command/gina.tpl +0 -0
  176. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/conf/env.json +0 -0
  177. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/conf/manifest.json +0 -0
  178. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/conf/package.json +0 -0
  179. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/conf/statics.json +0 -0
  180. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/conf/templates.json +0 -0
  181. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/error/client/json/401.json +0 -0
  182. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/error/client/json/403.json +0 -0
  183. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/error/client/json/404.json +0 -0
  184. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/error/server/html/50x.html +0 -0
  185. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/error/server/json/500.json +0 -0
  186. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/error/server/json/503.json +0 -0
  187. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/core/template/extensions/logger/config.json +0 -0
  188. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/console.js +0 -0
  189. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/context.js +0 -0
  190. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/data/LICENSE +0 -0
  191. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/data/README.md +0 -0
  192. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/data/package.json +0 -0
  193. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/data/src/main.js +0 -0
  194. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/dateFormat.js +0 -0
  195. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/index.js +0 -0
  196. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/json/LICENSE +0 -0
  197. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/json/README.md +0 -0
  198. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/json/package.json +0 -0
  199. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/path.js +0 -0
  200. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/plugins/README.md +0 -0
  201. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/plugins/package.json +0 -0
  202. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/plugins/src/api-error.js +0 -0
  203. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/plugins/src/main.js +0 -0
  204. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/prototypes.js +0 -0
  205. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/task.js +0 -0
  206. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/helpers/text.js +0 -0
  207. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/archiver/README.md +0 -0
  208. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/archiver/build.json +0 -0
  209. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/archiver/package.json +0 -0
  210. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/archiver/src/dep/jszip.min.js +0 -0
  211. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/archiver/src/main.js +0 -0
  212. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/async/package.json +0 -0
  213. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/async/src/main.js +0 -0
  214. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cache/README.md +0 -0
  215. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cache/build.json +0 -0
  216. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cache/package.json +0 -0
  217. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cache/src/main.js +0 -0
  218. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/aliases.json +0 -0
  219. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/add.js +0 -0
  220. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/arguments.json +0 -0
  221. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/build.js +0 -0
  222. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/copy.js +0 -0
  223. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/cp.js +0 -0
  224. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/help.js +0 -0
  225. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/help.txt +0 -0
  226. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/list.js +0 -0
  227. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/mcp.js +0 -0
  228. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/oas.js +0 -0
  229. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/openapi.js +0 -0
  230. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/remove.js +0 -0
  231. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/rename.js +0 -0
  232. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/restart.js +0 -0
  233. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/rm.js +0 -0
  234. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/start.js +0 -0
  235. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/status.js +0 -0
  236. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/bundle/stop.js +0 -0
  237. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/cache/stats.js +0 -0
  238. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/connector/add.js +0 -0
  239. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/connector/arguments.json +0 -0
  240. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/connector/help.js +0 -0
  241. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/connector/help.txt +0 -0
  242. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/connector/list.js +0 -0
  243. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/connector/migrate.js +0 -0
  244. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/connector/remove.js +0 -0
  245. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/connector/rm.js +0 -0
  246. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/env/add.js +0 -0
  247. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/env/get.js +0 -0
  248. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/env/help.js +0 -0
  249. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/env/help.txt +0 -0
  250. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/env/link-dev.js +0 -0
  251. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/env/list.js +0 -0
  252. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/env/remove.js +0 -0
  253. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/env/rm.js +0 -0
  254. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/env/set.js +0 -0
  255. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/env/unset.js +0 -0
  256. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/env/use.js +0 -0
  257. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/arguments.json +0 -0
  258. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/build.js +0 -0
  259. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/dot.js +0 -0
  260. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/get.js +0 -0
  261. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/help.js +0 -0
  262. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/help.txt +0 -0
  263. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/init.js +0 -0
  264. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/link-node-modules.js +0 -0
  265. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/link.js +0 -0
  266. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/msg.json +0 -0
  267. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/open.js +0 -0
  268. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/restart.js +0 -0
  269. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/set.js +0 -0
  270. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/start.js +0 -0
  271. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/status.js +0 -0
  272. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/stop.js +0 -0
  273. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/tail.js +0 -0
  274. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/update.js +0 -0
  275. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/framework/version.js +0 -0
  276. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/gina-dev.1.md +0 -0
  277. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/gina-framework.1.md +0 -0
  278. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/gina.1.md +0 -0
  279. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/helper.js +0 -0
  280. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/i18n/add.js +0 -0
  281. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/i18n/arguments.json +0 -0
  282. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/i18n/export.js +0 -0
  283. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/i18n/help.js +0 -0
  284. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/i18n/help.txt +0 -0
  285. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/i18n/import.js +0 -0
  286. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/i18n/scan.js +0 -0
  287. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/index.js +0 -0
  288. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/inspector/help.js +0 -0
  289. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/inspector/help.txt +0 -0
  290. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/inspector/open.js +0 -0
  291. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/minion/help.js +0 -0
  292. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/minion/help.txt +0 -0
  293. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/msg.json +0 -0
  294. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/port/help.js +0 -0
  295. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/port/help.txt +0 -0
  296. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/port/inc/scan.js +0 -0
  297. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/port/list.js +0 -0
  298. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/port/reset.js +0 -0
  299. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/port/set.js +0 -0
  300. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/project/add.js +0 -0
  301. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/project/arguments.json +0 -0
  302. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/project/build.js +0 -0
  303. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/project/help.js +0 -0
  304. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/project/help.txt +0 -0
  305. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/project/import.js +0 -0
  306. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/project/list.js +0 -0
  307. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/project/move.js +0 -0
  308. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/project/remove.js +0 -0
  309. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/project/rename.js +0 -0
  310. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/project/restart.js +0 -0
  311. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/project/rm.js +0 -0
  312. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/project/start.js +0 -0
  313. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/project/status.js +0 -0
  314. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/project/stop.js +0 -0
  315. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/protocol/help.js +0 -0
  316. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/protocol/help.txt +0 -0
  317. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/protocol/list.js +0 -0
  318. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/protocol/set.js +0 -0
  319. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/scope/add.js +0 -0
  320. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/scope/help.js +0 -0
  321. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/scope/help.txt +0 -0
  322. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/scope/link-local.js +0 -0
  323. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/scope/link-production.js +0 -0
  324. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/scope/list.js +0 -0
  325. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/scope/remove.js +0 -0
  326. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/scope/rm.js +0 -0
  327. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/scope/use.js +0 -0
  328. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/service/help.js +0 -0
  329. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/service/help.txt +0 -0
  330. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/service/list.js +0 -0
  331. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cmd/view/add.js +0 -0
  332. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/collection/README.md +0 -0
  333. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/collection/build.json +0 -0
  334. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/collection/package.json +0 -0
  335. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/collection/src/main.js +0 -0
  336. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/config.js +0 -0
  337. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/connector-registry/package.json +0 -0
  338. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/connector-registry/src/main.js +0 -0
  339. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cron/README.md +0 -0
  340. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cron/package.json +0 -0
  341. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/cron/src/main.js +0 -0
  342. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/domain/LICENSE +0 -0
  343. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/domain/README.md +0 -0
  344. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/domain/package.json +0 -0
  345. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/domain/src/main.js +0 -0
  346. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/generator/index.js +0 -0
  347. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/i18n/package.json +0 -0
  348. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/i18n/src/main.js +0 -0
  349. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/inherits/LICENSE +0 -0
  350. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/inherits/README.md +0 -0
  351. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/inherits/package.json +0 -0
  352. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/inherits/src/main.js +0 -0
  353. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/inspector-redact/package.json +0 -0
  354. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/inspector-redact/src/main.js +0 -0
  355. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/logger/README.md +0 -0
  356. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/logger/package.json +0 -0
  357. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/logger/src/containers/default/index.js +0 -0
  358. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
  359. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
  360. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/logger/src/containers/mq/listener.js +0 -0
  361. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/logger/src/containers/mq/speaker.js +0 -0
  362. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/logger/src/helper.js +0 -0
  363. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/math/index.js +0 -0
  364. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/mcp-dispatch/package.json +0 -0
  365. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/mcp-dispatch/src/main.js +0 -0
  366. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/mcp-http/package.json +0 -0
  367. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/mcp-http/src/main.js +0 -0
  368. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/mcp-server/package.json +0 -0
  369. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/mcp-server/src/main.js +0 -0
  370. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/merge/README.md +0 -0
  371. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/merge/package.json +0 -0
  372. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/metrics/package.json +0 -0
  373. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/metrics/src/main.js +0 -0
  374. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/model.js +0 -0
  375. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/nunjucks-filters/README.md +0 -0
  376. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/nunjucks-filters/package.json +0 -0
  377. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/nunjucks-filters/src/main.js +0 -0
  378. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/nunjucks-resolver/package.json +0 -0
  379. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/nunjucks-resolver/src/main.js +0 -0
  380. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/proc.js +0 -0
  381. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/routing/README.md +0 -0
  382. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/routing/build.json +0 -0
  383. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/routing/package.json +0 -0
  384. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/routing/src/main.js +0 -0
  385. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/routing/src/radix.js +0 -0
  386. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/routing-introspect/package.json +0 -0
  387. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/routing-introspect/src/main.js +0 -0
  388. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/session-store.js +0 -0
  389. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/shell.js +0 -0
  390. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/state.js +0 -0
  391. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/swig-filters/README.md +0 -0
  392. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/swig-filters/package.json +0 -0
  393. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/swig-filters/src/main.js +0 -0
  394. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/swig-resolver/package.json +0 -0
  395. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/swig-resolver/src/main.js +0 -0
  396. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/url/README.md +0 -0
  397. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/url/index.js +0 -0
  398. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/url/routing.json +0 -0
  399. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/uuid/package.json +0 -0
  400. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/uuid/src/main.js +0 -0
  401. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/validator.js +0 -0
  402. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/watcher/package.json +0 -0
  403. /package/framework/{v0.3.13-alpha.2 → v0.3.13-alpha.3}/lib/watcher/src/main.js +0 -0
package/CHANGELOG.md CHANGED
@@ -6,6 +6,23 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
6
6
  and is generated by [Changie](https://github.com/miniscruff/changie).
7
7
 
8
8
 
9
+ ## 0.3.13-alpha.3 - 2026-05-14 (npm only — no git tag)
10
+ ### Added
11
+ * `${secret:KEY}` placeholder syntax in bundle JSON configs. Substituted at getConfig() time from process.env[KEY]. Fails closed if the env var is unset or empty. Resolution happens once per config-load cycle (cached). Pluggable-backend support is reserved for a future iteration; only the env-var backend ships in this alpha.
12
+ * `settings.json > csrf.secret` config slot in `gina.plugins.Csrf()` — flows through the `lib/secrets` resolver, so `${secret:KEY}` placeholders work for the Csrf HMAC secret. Precedence is `opts.secret` (test override) > `settings.csrf.secret` > `process.env.GINA_CSRF_SECRET` (back-compat); existing bundles that set `GINA_CSRF_SECRET` keep working unchanged.
13
+ * `${secret:KEY}` placeholder support in `mcp.json` for `gina bundle:mcp-start`. The cmd handler now calls `lib/secrets` on the parsed manifest immediately after `requireJSON()`, so `server.authToken` (and any other future placeholder field in mcp.json) gets filled from `process.env[KEY]` before downstream readers pick it up. Existing bundles that set `process.env.GINA_MCP_AUTH_TOKEN` directly keep working unchanged — that fallback is the last step of the precedence chain.
14
+ ### Changed
15
+ * Added terminal-exit closure nulling to render-nunjucks for early per-request memory release, matching render-swig pattern (#M1 retrofit follow-up).
16
+ * Bundle scaffolding (project add / bundle add) now shows the `${secret:KEY}` placeholder pattern as the recommended shape for session and CSRF secrets. `core/template/conf/settings.json` documents the new `settings.csrf.secret` slot (placeholder-compatible) alongside the existing GINA_CSRF_SECRET env-var fallback; `core/template/boilerplate/bundle/index.js` shows `self.getConfig('session').secret` (with bundle/config/session.json holding a `${secret:SESSION_SECRET}` placeholder) as the recommended session-secret wiring, keeping the direct `process.env.SESSION_SECRET` shape as a back-compat note.
17
+ ### Fixed
18
+ * `requireJSON` line-comment stripping no longer fails when a bundle config combines a URL string with a bare `//` line-comment separator. The previous `indexOf`-into-greedy-match pass collided on the URL `://` and silently skipped the real separator, leaving `JSON.parse` to throw `Expected double-quoted property name`. The pass is now per-line on the leftmost `//`, matching the prior heuristic without the substring collision.
19
+ ### Security
20
+ * Replaced eval() in validator nested-key rule construction (Socket #SCS campaign cluster M20).
21
+ * Removing eval() from 4 HTML event-callback sites in the browser bundle (events.js + validator/main.js). The function-call shape `data-gina-...-event-on-*="fn(args)"` is no longer supported — register the handler on window and use the bare-identifier shape `="fn"`; a deprecation warning is logged at runtime if a function-call shape is encountered. Clears 4 of the 9 remaining Socket `Uses eval` flag sites (#M21a).
22
+ * Removing eval() from the conditional binding evaluator fallback in form-validator.js. Form `condition` strings that previously hit the eval escape-hatch now throw with an explicit message listing the four supported shapes (binary comparison `a OP b`, RegExp instance, boolean, /regex/flags literal). Regex-literal strings still pass through. Clears 1 of the 5 remaining Socket `Uses eval` flag sites (#M21b).
23
+ * Documenting the Pattern B eval surface at form-validator.js (user-defined validator function bodies registered on `gina.forms.validators` from disk-loaded `bundle/validators/<name>/main.js` files at framework boot). The eval is load-bearing public API and stays — no behavior change. Adds an in-source trust-model comment block and pins the invariant with `test/lib/validator-scs1i.test.js` (zero writes to `gina.forms.validators` in framework source; zero request-time identifiers around the userValidator source chain). Closes the M21 cluster (#M21c).
24
+ * Restructuring the logger ↔ merge circular-require so the eval fallbacks at lib/logger/src/main.js + the two logger containers are no longer needed and have been removed. Root cause was merge.js requiring `helpers/index.js` (the for-loop helper loader) at module-load to populate `JSON.clone`, which transitively required `lib/logger` via several helpers and produced a partial-module return under circular load. Fix swaps that for a direct require of `utils/prototypes.json_clone` (a 100-line standalone primitive with zero top-level requires) — same JSON.clone population, no circular trigger. Clears the final 3 server-side Socket `Uses eval` sites (#M22). Phase 3c complete: 1 live framework eval site remains (the load-bearing Pattern B at form-validator.js:1886 / #M21c trust model).
25
+
9
26
  ## 0.3.12 - 2026-05-12
10
27
  ### Changed
11
28
  * Bumped @rhinostone/swig dependency floor from ^2.0.1 to ^2.1.0 in framework/v*/package.json. Version 2.1.0 introduces a multi-flavor architecture splitting the runtime into a shared @rhinostone/swig-core package plus per-flavor frontends (@rhinostone/swig native syntax, @rhinostone/swig-twig Twig-syntax frontend); the native @rhinostone/swig package remains drop-in compatible with the @rhinostone/swig@1.x and 2.0.x API surface gina depends on (swig.compile, swig.setFilter, swig.setTag, swig.renderFile). swigResolver DEFAULT_MIN stays at 2.0.0 since the framework does not depend on any new 2.1.0-only API. Resolves the version-currency drift surfaced by 'npm view @rhinostone/swig version' returning 2.1.0 against the current ^2.0.1 floor.
package/ROADMAP.md CHANGED
@@ -156,6 +156,16 @@ Cross-site request forgery protection. Three-phase defense-in-depth plan aligned
156
156
 
157
157
  ---
158
158
 
159
+ ## Secrets & Configuration
160
+
161
+ Secrets handling for bundle JSON configs without baking plaintext values into source. Pluggable-backend design with `process.env` as the default; the reserved API surface allows future Vault / SOPS / K8s Secrets backends to slot in without changing call sites or the placeholder syntax.
162
+
163
+ | Status | Feature | Version | Target |
164
+ | --- | --- | --- | --- |
165
+ | ✅ | **`${secret:KEY}` placeholder substitution** — `lib/secrets` resolves `${secret:KEY}` placeholders embedded in bundle JSON configs (`settings.json`, `app.json`, `connectors.json`, `mcp.json`, etc.) at config-load time. Anchored regex matches the entire string value only — mixed strings (`"prefix-${secret:K}-suffix"`) pass through unchanged. Default backend reads `process.env[KEY]`; pluggable-backend interface reserved for a future iteration. Fails closed (throws `Error('Secret resolution failed')`) when an env var is unset or empty; the error message intentionally omits the key name. Resolution is once per config-load cycle (in-place mutation). `WeakMap`-backed path tracking enables a future log-redaction wrapper at merged-conf print sites. Hooked inside `core/config.js::loadBundleConfig`, so downstream readers (`getConfig()`, plugin factories) see resolved values transparently. **Consumers shipped**: `gina.plugins.Csrf()` reads `settings.csrf.secret` (precedence `opts.secret` > `settings.csrf.secret` > `process.env.GINA_CSRF_SECRET` for back-compat); `gina bundle:mcp-start` re-runs the resolver on the parsed `mcp.json` immediately after `requireJSON()` so `server.authToken` and any future placeholder field gets filled before downstream readers; bundle scaffolding (`project:add` / `bundle:add`) recommends the placeholder shape in `core/template/conf/settings.json` and `core/template/boilerplate/bundle/index.js`. 33 tests in `test/core/config-secrets-resolver.test.js`. | `0.3.13-alpha` | 2026-05-13 |
166
+
167
+ ---
168
+
159
169
  ## Connectors
160
170
 
161
171
  New database connectors follow the same interface as the existing Couchbase connector: declared in `connectors.json`, acquired via `getConnection()`.
@@ -0,0 +1 @@
1
+ 0.3.13-alpha.3
@@ -2732,7 +2732,8 @@ function Merge() {
2732
2732
  if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
2733
2733
  // for unit tests
2734
2734
  if ( typeof(JSON.clone) == 'undefined' ) {
2735
- require('../../../helpers');
2735
+ // #M22 — direct require of the clone primitive instead of helpers/index.js's for-loop loader (which transitively requires lib/logger and returns a partial merge under circular load)
2736
+ JSON.clone = require(__dirname + '/../../../../../utils/prototypes.json_clone');
2736
2737
  }
2737
2738
  // Publish as node.js module
2738
2739
  module.exports = Merge()
@@ -3911,7 +3912,8 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
3911
3912
 
3912
3913
  isValid = new RegExp(re, flags).test(this.value)
3913
3914
  } else {
3914
- isValid = eval(condition);
3915
+ // #M21b — free-form JS condition shape unsupported; declare a documented shape instead
3916
+ throw new Error('[FormValidator] Unsupported condition shape — supported: binary comparison (a OP b), RegExp, boolean, /regex/flags literal. Got: `' + condition + '`');
3915
3917
  }
3916
3918
 
3917
3919
  //valid = new RegExp(condition.replace(/\//g, '')).test(this.value)
@@ -4725,6 +4727,15 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
4725
4727
  userValidator = gina.forms.validators[v].toString();
4726
4728
  }
4727
4729
 
4730
+ // #M21c — Pattern B eval surface (trust-model invariant)
4731
+ // Load-bearing: user-defined validator function bodies are registered on
4732
+ // `gina.forms.validators` from disk-loaded `bundle/validators/<name>/main.js`
4733
+ // files at framework boot. Trust assumption: the source of `userValidator`
4734
+ // is always disk-sourced at boot — never request-time input (req.*, request.*,
4735
+ // form values, URL params). End-user data MUST NOT reach this eval.
4736
+ // Invariant pinned by test/lib/validator-scs1i.test.js (zero write sites for
4737
+ // `gina.forms.validators` in framework source; zero request-time identifiers
4738
+ // around the userValidator source chain).
4728
4739
  self[el][v] = eval('(' + userValidator + ')\n//# sourceURL='+ v +'.js');
4729
4740
  //self[el][v] = Function('errorMessage', 'errorStack', userValidator);
4730
4741
  }
@@ -7493,7 +7504,8 @@ function on(event, cb) {
7493
7504
  if (htmlSuccesEventCallback != null) {
7494
7505
 
7495
7506
  if ( /\((.*)\)/.test(htmlSuccesEventCallback) ) {
7496
- eval(htmlSuccesEventCallback)
7507
+ // #M21a — function-call shape unsupported; register a bare handler on window instead
7508
+ try { console.warn('[gina-event] function-call shape no longer supported on data-gina-'+ type +'-event-on-success — use a bare identifier and register the handler on window: '+ htmlSuccesEventCallback); } catch (e) {}
7497
7509
  } else {
7498
7510
  $el.on('success.h'+ type, window[htmlSuccesEventCallback])
7499
7511
  }
@@ -7503,7 +7515,8 @@ function on(event, cb) {
7503
7515
  var htmlErrorEventCallback = $el.target.getAttribute('data-gina-'+ type +'-event-on-error') || null;
7504
7516
  if (htmlErrorEventCallback != null) {
7505
7517
  if ( /\((.*)\)/.test(htmlErrorEventCallback) ) {
7506
- eval(htmlErrorEventCallback)
7518
+ // #M21a — function-call shape unsupported; register a bare handler on window instead
7519
+ try { console.warn('[gina-event] function-call shape no longer supported on data-gina-'+ type +'-event-on-error — use a bare identifier and register the handler on window: '+ htmlErrorEventCallback); } catch (e) {}
7507
7520
  } else {
7508
7521
  $el.on('error.h'+ type, window[htmlErrorEventCallback])
7509
7522
  }
@@ -11906,7 +11919,8 @@ function ValidatorPlugin(rules, data, formId) {
11906
11919
  if (htmlSuccesEventCallback != null) {
11907
11920
 
11908
11921
  if ( /\((.*)\)/.test(htmlSuccesEventCallback) ) {
11909
- eval(htmlSuccesEventCallback)
11922
+ // #M21a — function-call shape unsupported; register a bare handler on window instead
11923
+ try { console.warn('[gina-form-event] function-call shape no longer supported on data-gina-form-event-on-submit-success — use a bare identifier and register the handler on window: '+ htmlSuccesEventCallback); } catch (e) {}
11910
11924
  } else {
11911
11925
  $form.on('success.hform', window[htmlSuccesEventCallback])
11912
11926
  }
@@ -11915,7 +11929,8 @@ function ValidatorPlugin(rules, data, formId) {
11915
11929
  var htmlErrorEventCallback = $form.target.getAttribute('data-gina-form-event-on-submit-error') || null;
11916
11930
  if (htmlErrorEventCallback != null) {
11917
11931
  if ( /\((.*)\)/.test(htmlErrorEventCallback) ) {
11918
- eval(htmlErrorEventCallback)
11932
+ // #M21a — function-call shape unsupported; register a bare handler on window instead
11933
+ try { console.warn('[gina-form-event] function-call shape no longer supported on data-gina-form-event-on-submit-error — use a bare identifier and register the handler on window: '+ htmlErrorEventCallback); } catch (e) {}
11919
11934
  } else {
11920
11935
  $form.on('error.hform', window[htmlErrorEventCallback])
11921
11936
  }
@@ -47,7 +47,7 @@ A.length==0||typeof A=='undefined'?/^true$/i.test(D)?A:U:A}if(A.length==0&&U.len
47
47
  l=0;for(A=m.length;l<A;++l)Y.push(m[l][n]);for(l=0;l<A;++l)a:for(S=aa||0,ka=D.length;S<ka;++S)if(D[S]!=null&&typeof D[S][n]!='undefined'&&D[S][n]!==m[l][n]){if(Y.indexOf(D[S][n])==-1){m.push(D[S]);Y.push(D[S][n]);aa=S+1;A<ka&&++A;break a}}else if(D[S]!=null&&typeof D[S][n]!='undefined'&&D[S][n]===m[l][n])aa=S+1;else break a;return m}for(l=0;l<A.length;++l)if(Y=null,typeof A=='undefined'||typeof A[l]!='object'||Array.isArray(A[l])||A[l]==null||(Y=Object.getOwnPropertyNames(A[l])),typeof Y!='undefined'&&
48
48
  Y!=null&&(Y=Y[0]||null),U.indexOf(A[l])>-1&&D)U.splice(U.indexOf(A[l]),1,A[l]);else if(typeof m[l]=='undefined'&&typeof A[l]=='object')for(c in m=U,typeof m[l]=='undefined'&&(m[l]={}),A[l])m[l].hasOwnProperty(c)||(m[l][c]=A[l][c]);else!D&&m.indexOf(A[l])>-1&&/number/i.test(typeof A[l])&&A[l]!==m[l]?m.push(A[l]):typeof U[l]=='undefined'||/null/i.test(U[l])||typeof U[l][n]=='undefined'||typeof A[l]=='undefined'||typeof A[l][n]=='undefined'||U[l][n]!=A[l][n]?m.indexOf(A[l])==-1&&typeof A[l]!='object'?
49
49
  m.push(A[l]):typeof U[l]=='undefined'||/null/i.test(U[l])||typeof U[l][Y]=='undefined'||typeof A[l]=='undefined'||typeof A[l][Y]=='undefined'||U[l][Y]!=A[l][Y]||(m[l]=D?A[l]:U[l]):m[l]=D?A[l]:U[l]}if(m.length>0&&U.length>0||m.length==0&&U.length==0)return m};M.prototype.setKeyComparison=function(A){this.keyComparison=A};var C=function(A){if(!A||{}.toString.call(A)!=='[object Object]'||A.nodeType||A.setInterval)return!1;var U={}.hasOwnProperty,D=U.call(A,'constructor');U=typeof A.constructor!='undefined'?
50
- U.call(A.constructor.prototype,'isPrototypeOf'):!1;return!A.constructor||D||U?!0:!1};I.setKeyComparison=function(A){M.keyComparison=A;return I};I.getKeyComparison=function(){var A=M.keyComparison||'id';M.keyComparison='id';return A};return I}typeof module!=='undefined'&&module.exports?(typeof JSON.clone=='undefined'&&require('../../../helpers'),module.exports=Merge()):typeof define==='function'&&define.amd&&define('lib/merge',[],function(){return Merge()});
50
+ U.call(A.constructor.prototype,'isPrototypeOf'):!1;return!A.constructor||D||U?!0:!1};I.setKeyComparison=function(A){M.keyComparison=A;return I};I.getKeyComparison=function(){var A=M.keyComparison||'id';M.keyComparison='id';return A};return I}typeof module!=='undefined'&&module.exports?(typeof JSON.clone=='undefined'&&(JSON.clone=require(__dirname+'/../../../../../utils/prototypes.json_clone')),module.exports=Merge()):typeof define==='function'&&define.amd&&define('lib/merge',[],function(){return Merge()});
51
51
  var _alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',_mask=63,_step=7;function uuid(m){m=m||4;for(var E='';;)for(var I=crypto.getRandomValues(new Uint8Array(_step)),M=0;M<_step;M++){var C=I[M]&_mask;if(C<62&&(E+=_alphabet[C],E.length===m))return E}}
52
52
  uuid.customAlphabet=function(m,E){E=E||4;for(var I=1;I<m.length-1;)I=I<<1|1;var M=Math.ceil(1.6*(I+1)*E/m.length);M<5&&(M=5);return function(C){C=C||E;for(var A='';;)for(var U=crypto.getRandomValues(new Uint8Array(M)),D=0;D<M;D++){var Y=U[D]&I;if(Y<m.length&&(A+=m[Y],A.length===C))return A}}};
53
53
  if(typeof module!=='undefined'&&module.exports){if(typeof crypto==='undefined'||typeof crypto.getRandomValues!=='function'){var _webcrypto=require('crypto').webcrypto||require('crypto');typeof globalThis!=='undefined'?globalThis.crypto=_webcrypto:crypto=_webcrypto}module.exports=uuid}else typeof define==='function'&&define.amd&&define('lib/uuid',[],function(){return uuid});
@@ -78,29 +78,29 @@ J.param;L.template&&typeof L.template.ginaLoader=='undefined'&&(L.template.ginaL
78
78
  0||!ma.isRequired&&this.value==''&&!/^false$/i.test(this.value)&&this.value!=0?L=!0:ma.isRequired||typeof this.value!='string'||this.value!=''||(L=!0);if(!L&&/^(true|false)$/i.test(r))L=r;else if(!L){var G=null,K=null;if(/[!=>><a-z 0-9]+/i.test(r)){if((K=r.match(/\${0}[-_,.\[\]a-z0-9]+/ig))&&K.length>0){for(var B=0,oa=K.length;B<oa;++B)typeof c[K[B]]!='undefined'&&K[B]&&(G=new RegExp('\\$'+K[B]+'(?!\\S+)','g'),r=c[K[B]].value==''?r.replace(G,'""'):typeof c[K[B]].value=='string'?r.replace(G,'"'+c[K[B]].value+
79
79
  '"'):r.replace(G,c[K[B]].value));try{if(r=r.replace(/(\(|\)|return)/g,''),/^\//.test(r)){var X=r.match(/^\/(.+)\/([a-z]*)$/);if(!X)throw Error('Invalid regex literal: `'+r+'`');L=(new RegExp(X[1],X[2])).test(this.value)}else{G=/^\s*(null|undefined|true|false|"[^"]*"|-?\d+(?:\.\d+)?)\s*(===|!==|<=|>=|==|!=|<|>)\s*(null|undefined|true|false|"[^"]*"|-?\d+(?:\.\d+)?)\s*$/;var la=typeof r=='string'?r.match(G):null;if(!la)throw Error('Could not evaluate condition `'+r+'`.\n(grammar: <operand><op><operand>; operand \u2208 number | "string" | true | false | null | undefined; op \u2208 === !== == != < > <= >=)');
80
80
  G=function(ra){var wa=ra.replace(/^\s+|\s+$/g,'');if(wa==='null')return null;if(wa!=='undefined'){if(wa==='true')return!0;if(wa==='false')return!1;if(/^"[^"]*"$/.test(wa))return wa.slice(1,-1);var Ja=Number(wa);if(!isNaN(Ja)&&wa!=='')return Ja;throw Error('Invalid operand: `'+ra+'`');}};var ea=G(la[1]),qa=la[2],va=G(la[3]);switch(qa){case '===':L=ea===va;break;case '!==':L=ea!==va;break;case '==':L=ea==va;break;case '!=':L=ea!=va;break;case '<':L=ea<va;break;case '>':L=ea>va;break;case '<=':L=ea<=
81
- va;break;case '>=':L=ea>=va}}}catch(ra){throw Error(ra.stack||ra.message);}}}else if(r instanceof RegExp)L=r.test(this.value)?!0:!1;else if(typeof r=='boolean')L=r?!0:!1;else try{/\/(.*)\//.test(r)?(G=r.match(/\/(.*)\//).pop(),K=r.replace('/'+G+'/',''),L=(new RegExp(G,K)).test(this.value)):L=eval(r)}catch(ra){throw Error(ra.stack||ra.message);}}L?L&&typeof ma[fa]!='undefined'&&delete ma[fa]:(ma[fa]=h(this.error||x||l.errorLabels[fa],this),typeof J!='undefined'&&(ma.stack=J));this.valid=L;ma.count()>
82
- 0&&(this.errors=ma);return c[this.name]};c[g].set=function(r){this.value=l.data[this.name]=r;this.target.setAttribute('value',r);return c[this.name]};c[g].isEmail=function(){this.value=l.data[this.name]=this.value?this.value.toLowerCase():this.value;C&&this.target&&this.target.value!=''&&/[A-Z]+/.test(this.target.value)&&(this.target.value=this.value);var r=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(this.value)?
83
- !0:!1,x=c[this.name].errors||{};x.isRequired||this.value!=''||(r=!0);r?r&&typeof x.isEmail!='undefined'&&delete x.isEmail:x.isEmail=h(this.error||l.errorLabels.isEmail,this);this.valid=r;x.count()>0&&(this.errors=x);return c[this.name]};c[g].isJsonWebToken=function(){this.value=l.data[this.name]=this.value?this.value.toLowerCase():this.value;C&&this.target&&this.target.value!=''&&/[A-Z]+/.test(this.target.value)&&(this.target.value=this.value);var r=/^[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$/.test(this.value)?
84
- !0:!1,x=c[this.name].errors||{};x.isRequired||this.value!=''||(r=!0);r?r&&typeof x.isJsonWebToken!='undefined'&&delete x.isJsonWebToken:x.isJsonWebToken=h(this.error||l.errorLabels.isJsonWebToken,this);this.valid=r;x.count()>0&&(this.errors=x);return c[this.name]};c[g].isBoolean=function(){var r=null,x=c[this.name].errors||{};x.isRequired&&this.value==0&&(delete x.isRequired,this.errors=x);switch(this.value){case 'true':case !0:case 1:r=this.value=l.data[this.name]=!0;break;case 'false':case !1:case 0:r=
85
- this.value=l.data[this.name]=!1}(r=r!==null?!0:!1)?r&&typeof x.isBoolean!='undefined'&&delete x.isBoolean:x.isBoolean=h(this.error||l.errorLabels.isBoolean,this);this.valid=r;x.count()>0&&(this.errors=x);return c[this.name]};c[g].isNumber=function(r,x){var J=this.value,L=!1,fa=!0,ma=!0,G=c[this.name].errors||{};try{typeof J=='string'&&/,|\./g.test(J)?J=l.data[this.name]=this.value=parseFloat(J.replace(/,/g,'.').replace(/\s+/g,'')):typeof J=='string'&&J!=''&&(J=l.data[this.name]=this.value=parseInt(J.replace(/\s+/g,
86
- '')))}catch(B){G.isNumber=h(this.error||l.errorLabels.isNumber,this),this.valid=!1,G.count()>0&&(this.errors=G)}if(+J===+J&&(L=!0,!G.isRequired&&J!='')){var K=J.toString().length;r&&typeof r=='number'&&K<r&&(fa=!1,this.size=r);x&&typeof x=='number'&&K>x&&(ma=!1,this.size=x)}L&&fa&&ma||(L||(G.isNumber=h(this.error||l.errorLabels.isNumber,this)),fa&&ma||(fa||(G.isNumberLength=h(this.error||l.errorLabels.isNumberMinLength,this)),ma||(G.isNumberLength=h(this.error||l.errorLabels.isNumberMaxLength,this)),
87
- r===x&&(G.isNumberLength=h(this.error||l.errorLabels.isNumberLength,this))),L=!1);L&&typeof G.isNumberLength!='undefined'&&delete G.isNumberLength;this.valid=L;this.value=l.data[this.name]=J!=''?Number(J):J;G.count()>0&&(this.errors=G);return c[this.name]};c[g].toInteger=function(){var r=this.value,x=c[this.name].errors||{};if(r)try{this.value=l.data[this.name]=Math.round(r)}catch(J){x.toInteger=h(this.error||l.errorLabels.toInteger,this),this.valid=!1,x.count()>0&&(this.errors=x)}return c[this.name]};
88
- c[g].isInteger=function(r,x){var J=this.value,L=!1,fa=!0,ma=!0,G=c[this.name].errors||{};+J===+J&&J%1===0&&(L=!0,G.isRequired||J==''||(r&&typeof r=='number'&&J.length<r&&(fa=!1,this.size=r),x&&typeof x=='number'&&J.length>x&&(ma=!1,this.size=x)));L&&fa&&ma||(L||(G.isInteger=h(this.error||l.errorLabels.isInteger,this)),fa&&ma||(fa||(G.isIntegerLength=h(this.error||l.errorLabels.isIntegerMinLength,this),L=!1),ma||(G.isIntegerLength=h(this.error||l.errorLabels.isIntegerMaxLength,this),L=!1),r===x&&(G.isIntegerLength=
89
- h(this.error||l.errorLabels.isIntegerLength,this),L=!1)));this.valid=L;this.value=l.data[this.name]=Number(J);G.count()>0&&(this.errors=G);return c[this.name]};c[g].toFloat=function(r){var x=document.getElementById(this.target.getAttribute('id')).value||this.value;isFloatingWithCommas=!1;typeof x=='string'&&(x=x.replace(/\s+/g,''),/,/.test(x)&&/\./.test(x)?x=x.replace(/,/g,''):/,/.test(x)&&(x=x.replace(/,/g,'.'),isFloatingWithCommas=!0));l.data[this.name]=x;var J=c[this.name].errors||{},L=!0;r?this.decimals=
90
- parseInt(r):typeof this.decimals=='undefined'&&(this.decimals=2);if(x)if(this.isNumber().valid)try{Number.isFinite(x)||(x=new Number(parseFloat(x.match(/[0-9.,]+/g).join('').replace(/,/,'.'))))}catch(fa){L=!1,J.toFloat=h(this.error||l.errorLabels.toFloat,this),this.valid=!1,J.count()>0&&(this.errors=J)}else L=!1,J.toFloat=h(this.error||l.errorLabels.toFloatNAN,this);else return c[this.name];this.decimals&&x&&!J.toFloat&&(x=parseFloat(x.toFixed(this.decimals)));this.value=l.data[this.name]=x;C&&(isFloatingWithCommas&&
91
- (x=(''+x).replace(/\./g,',')),this.target.setAttribute('value',x));this.valid=L;J.count()>0&&(this.errors=J);return c[this.name]};c[g].isFloat=function(r){typeof this.value=='string'&&(this.value=this.value.replace(/\s+/g,''));var x=l.data[this.name]=this.value;r=c[this.name].errors||{};typeof x=='string'&&/\./.test(x)&&Number.isFinite(Number(x));typeof x=='string'&&/,/g.test(x)&&(x=this.value=l.data[this.name]=Number(x.replace(/,/g,'.')));Number(x)===x&&x%1!==0?(this.value=l.data[this.name]=Number(x),
92
- x=!0):x=!1;r.isRequired||this.value!=''||(x=!0);x||(r.isFloat=h(this.error||l.errorLabels.isFloat,this));this.valid=x;r.count()>0&&(this.errors=r);return c[this.name]};c[g].isRequired=function(r){if(typeof r=='boolean'&&!r)return this.valid=!0,r=l.excluded.indexOf(this.name),r>-1&&l.excluded.splice(r,1),c[this.name];if(C&&this.target&&this.target.tagName=='INPUT'&&typeof this.target.type!='undefined'&&this.target.type=='radio'){var x=this.target;r=document.getElementsByName(this.name);r=Array.prototype.filter.call(r,
93
- function(fa){return fa.form===x.form});for(var J=0,L=r.length;J<L;++J)if(r[J].checked){/true|false/.test(r[J].value)?this.value=l.data[this.name]=/true/.test(r[J].value)?!0:!1:this.value=l.data[this.name]=r[J].value;this.valid=!0;break}}r=typeof this.value=='undefined'||this.value==null||this.value==''||/^\s+/.test(this.value)?!1:!0;J=c[this.name].errors||{};r?r&&typeof J.isRequired!='undefined'&&delete J.isRequired:J.isRequired=h(this.error||l.errorLabels.isRequired,this);this.valid=r;J.count()>
94
- 0&&(this.errors=J);return c[this.name]};c[g].isString=function(r,x){var J=l.data[this.name]=this.value,L=!1,fa=!0,ma=!0,G=c[this.name].errors||{};typeof J!='string'||G.isRequired||J==''||(L=!0,r&&typeof r=='number'&&J.length<r&&(fa=!1,this.size=r),x&&typeof x=='number'&&J.length>x&&(ma=!1,this.size=x));L&&fa&&ma||(!L&&G.isRequired&&J==''?(L=!1,G.isString=h(this.error||l.errorLabels.isString,this)):L||G.isRequired||(L=!0),fa&&ma||(L=!1,fa||(G.isStringLength=h(this.error||l.errorLabels.isStringMinLength,
95
- this)),ma||(G.isStringLength=h(this.error||l.errorLabels.isStringMaxLength,this)),r===x&&(G.isStringLength=h(this.error||l.errorLabels.isStringLength,this))));this.valid=L;G.count()>0&&(this.errors=G);return c[this.name]};c[g].isDate=function(r){var x=this.value,J=!1,L=c[this.name].errors||{},fa=null;if(!x||x==''||/NaN|Invalid Date/i.test(x))return/NaN|Invalid Date/i.test(x)&&(console.warn('[FormValidator::isDate] Provided value for field `'+this.name+'` is not allowed: `'+x+'`'),L.isDate=h(this.error||
96
- l.errorLabels.isDate,this)),this.valid=J,L.count()>0&&(this.errors=L),c[this.name];if(typeof r=='undefined'||typeof r!='undefined'&&/true/i.test(r))r='yyyy-mm-dd';if(x instanceof Date)x=x.format(r);else{try{fa=r.match(/[^\/\- ]+/g)}catch(oa){throw Error('[FormValidator::isDate] Provided mask not allowed: `'+r+'`');}try{x=x.match(/[^\/\- ]+/g);var ma={},G;var K=0;for(G=fa.length;K<G;++K)ma[fa[K]]=x[K];for(var B in ma)r=r.replace(new RegExp(B,'g'),ma[B])}catch(oa){throw Error('[FormValidator::isDate] Provided value not allowed: `'+
97
- x+'`'+oa);}x=this.value=l.data[this.name]=new Date(r);if(/Invalid Date/i.test(x)||x instanceof Date===!1)return L.isRequired||this.value!=''?L.isDate=h(this.error||l.errorLabels.isDate,this):J=!0,this.valid=J,L.count()>0&&(this.errors=L),c[this.name];J=!0}this.valid=J;return x};c[g].format=function(r,x){var J=this.value;return J?J.format(r,x):c[this.name]};c[g].setFlash=function(r,x){typeof x!='undefined'&&x!=''&&(this.error=x);return c[this.name]};c[g].setLabel=function(r){typeof r!='undefined'&&
98
- r!=''&&(this.label=r);return c[this.name]};c[g].trim=function(r){if(typeof r=='boolean'&&r)return this.value=this.value.replace(/^\s+|\s+$/,''),l.data[this.name]=l.data[this.name]=this.value,c[this.name]};c[g].exclude=function(r){if(typeof r=='boolean'&&!r)return/^true|false$/i.test(this.value)&&(this.value=/^true$/i.test(this.value)?!0:!1,l.data[this.name]=this.value),c[this.name];this.isExcluded=!1;l.excluded.indexOf(this.name)<0&&(l.excluded.push(this.name),this.isExcluded=!0);return c[this.name]};
99
- c[g].query=u;c[g].getValidationContext=function(){return{isGFFCtx:C,self:c,local:l,replace:h}};if(n()){F=q=null;try{for(let r in gina.forms.validators)F='/validators/'+r+'/main.js',l.errorLabels[r]='Condition not satisfied',C?(q=ka(gina.forms.validators[r].data),q=q.replace(/(\)\s+\{|\)\{){1}/,'$&\n\tvar validationContext = this.getValidationContext(),isGFFCtx = validationContext.isGFFCtx,self = validationContext.self,local = validationContext.local,replace = validationContext.replace;')):q=gina.forms.validators[r].toString(),
100
- c[g][r]=eval('('+q+')\n//# sourceURL='+r+'.js')}catch(r){throw Error('[UserFormValidator] Could not evaluate: `'+F+'`\n'+r.stack);}}};for(let g in c)V(g,c[g]);c.addField=function(g,q){typeof c[g]=='undefined'&&V(g,q)};c.isValid=function(){return c.getErrors().count()>0?!1:!0};c.setErrors=function(g){if(!g)return{};for(var q in c)if(typeof c[q]=='object'){for(var F in c[q])typeof g[q]=='object'&&typeof g[q][F]!='undefined'&&(typeof c[q].valid!='undefined'&&/^true$/i.test(c[q].valid)?delete g[q][F]:
101
- (typeof c[q].errors=='undefined'&&(c[q].errors={}),c[q].errors[F]=g[q][F]));(typeof c[q].errors=='undefined'&&typeof g[q]!='undefined'||typeof c[q].errors!='undefined'&&c[q].errors.count()==0&&typeof g[q]!='undefined')&&delete g[q]}return g};c.getErrors=function(g){var q={};if(typeof g!='undefined')return typeof c[g]!='undefined'&&c[g]&&typeof c[g].errors!='undefined'&&c[g].errors.count()>0&&(q[g]=c[g].errors),q;for(var F in c)typeof c[F]=='object'&&typeof c[F].errors!='undefined'&&c[F].errors.count()>
102
- 0&&(q[F]=c[F].errors);return q};c.toData=function(){if(l.excluded.length>0)for(var g=0,q=l.excluded.length;g<q;++g)typeof l.data[l.excluded[g]]!='undefined'&&delete l.data[l.excluded[g]];return l.data};var h=function(g,q){var F=g.match(/%[a-z]+/gi);if(F)for(var N=0,r=F.length;N<r;++N)g=g.replace(new RegExp(F[N],'g'),q[l.keys[F[N]]]);return g};c.setErrorLabels=function(g){typeof g!='undefined'&&(l.errorLabels=A(g,l.errorLabels))};return c}
103
- typeof module!=='undefined'&&module.exports?module.exports=FormValidatorUtil:typeof define==='function'&&define.amd&&define('lib/form-validator',[],function(){return FormValidatorUtil});
81
+ va;break;case '>=':L=ea>=va}}}catch(ra){throw Error(ra.stack||ra.message);}}}else if(r instanceof RegExp)L=r.test(this.value)?!0:!1;else if(typeof r=='boolean')L=r?!0:!1;else try{if(/\/(.*)\//.test(r))G=r.match(/\/(.*)\//).pop(),K=r.replace('/'+G+'/',''),L=(new RegExp(G,K)).test(this.value);else throw Error('[FormValidator] Unsupported condition shape \u2014 supported: binary comparison (a OP b), RegExp, boolean, /regex/flags literal. Got: `'+r+'`');}catch(ra){throw Error(ra.stack||ra.message);}}L?
82
+ L&&typeof ma[fa]!='undefined'&&delete ma[fa]:(ma[fa]=h(this.error||x||l.errorLabels[fa],this),typeof J!='undefined'&&(ma.stack=J));this.valid=L;ma.count()>0&&(this.errors=ma);return c[this.name]};c[g].set=function(r){this.value=l.data[this.name]=r;this.target.setAttribute('value',r);return c[this.name]};c[g].isEmail=function(){this.value=l.data[this.name]=this.value?this.value.toLowerCase():this.value;C&&this.target&&this.target.value!=''&&/[A-Z]+/.test(this.target.value)&&(this.target.value=this.value);
83
+ var r=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(this.value)?!0:!1,x=c[this.name].errors||{};x.isRequired||this.value!=''||(r=!0);r?r&&typeof x.isEmail!='undefined'&&delete x.isEmail:x.isEmail=h(this.error||l.errorLabels.isEmail,this);this.valid=r;x.count()>0&&(this.errors=x);return c[this.name]};c[g].isJsonWebToken=function(){this.value=l.data[this.name]=this.value?this.value.toLowerCase():
84
+ this.value;C&&this.target&&this.target.value!=''&&/[A-Z]+/.test(this.target.value)&&(this.target.value=this.value);var r=/^[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$/.test(this.value)?!0:!1,x=c[this.name].errors||{};x.isRequired||this.value!=''||(r=!0);r?r&&typeof x.isJsonWebToken!='undefined'&&delete x.isJsonWebToken:x.isJsonWebToken=h(this.error||l.errorLabels.isJsonWebToken,this);this.valid=r;x.count()>0&&(this.errors=x);return c[this.name]};c[g].isBoolean=function(){var r=null,x=c[this.name].errors||
85
+ {};x.isRequired&&this.value==0&&(delete x.isRequired,this.errors=x);switch(this.value){case 'true':case !0:case 1:r=this.value=l.data[this.name]=!0;break;case 'false':case !1:case 0:r=this.value=l.data[this.name]=!1}(r=r!==null?!0:!1)?r&&typeof x.isBoolean!='undefined'&&delete x.isBoolean:x.isBoolean=h(this.error||l.errorLabels.isBoolean,this);this.valid=r;x.count()>0&&(this.errors=x);return c[this.name]};c[g].isNumber=function(r,x){var J=this.value,L=!1,fa=!0,ma=!0,G=c[this.name].errors||{};try{typeof J==
86
+ 'string'&&/,|\./g.test(J)?J=l.data[this.name]=this.value=parseFloat(J.replace(/,/g,'.').replace(/\s+/g,'')):typeof J=='string'&&J!=''&&(J=l.data[this.name]=this.value=parseInt(J.replace(/\s+/g,'')))}catch(B){G.isNumber=h(this.error||l.errorLabels.isNumber,this),this.valid=!1,G.count()>0&&(this.errors=G)}if(+J===+J&&(L=!0,!G.isRequired&&J!='')){var K=J.toString().length;r&&typeof r=='number'&&K<r&&(fa=!1,this.size=r);x&&typeof x=='number'&&K>x&&(ma=!1,this.size=x)}L&&fa&&ma||(L||(G.isNumber=h(this.error||
87
+ l.errorLabels.isNumber,this)),fa&&ma||(fa||(G.isNumberLength=h(this.error||l.errorLabels.isNumberMinLength,this)),ma||(G.isNumberLength=h(this.error||l.errorLabels.isNumberMaxLength,this)),r===x&&(G.isNumberLength=h(this.error||l.errorLabels.isNumberLength,this))),L=!1);L&&typeof G.isNumberLength!='undefined'&&delete G.isNumberLength;this.valid=L;this.value=l.data[this.name]=J!=''?Number(J):J;G.count()>0&&(this.errors=G);return c[this.name]};c[g].toInteger=function(){var r=this.value,x=c[this.name].errors||
88
+ {};if(r)try{this.value=l.data[this.name]=Math.round(r)}catch(J){x.toInteger=h(this.error||l.errorLabels.toInteger,this),this.valid=!1,x.count()>0&&(this.errors=x)}return c[this.name]};c[g].isInteger=function(r,x){var J=this.value,L=!1,fa=!0,ma=!0,G=c[this.name].errors||{};+J===+J&&J%1===0&&(L=!0,G.isRequired||J==''||(r&&typeof r=='number'&&J.length<r&&(fa=!1,this.size=r),x&&typeof x=='number'&&J.length>x&&(ma=!1,this.size=x)));L&&fa&&ma||(L||(G.isInteger=h(this.error||l.errorLabels.isInteger,this)),
89
+ fa&&ma||(fa||(G.isIntegerLength=h(this.error||l.errorLabels.isIntegerMinLength,this),L=!1),ma||(G.isIntegerLength=h(this.error||l.errorLabels.isIntegerMaxLength,this),L=!1),r===x&&(G.isIntegerLength=h(this.error||l.errorLabels.isIntegerLength,this),L=!1)));this.valid=L;this.value=l.data[this.name]=Number(J);G.count()>0&&(this.errors=G);return c[this.name]};c[g].toFloat=function(r){var x=document.getElementById(this.target.getAttribute('id')).value||this.value;isFloatingWithCommas=!1;typeof x=='string'&&
90
+ (x=x.replace(/\s+/g,''),/,/.test(x)&&/\./.test(x)?x=x.replace(/,/g,''):/,/.test(x)&&(x=x.replace(/,/g,'.'),isFloatingWithCommas=!0));l.data[this.name]=x;var J=c[this.name].errors||{},L=!0;r?this.decimals=parseInt(r):typeof this.decimals=='undefined'&&(this.decimals=2);if(x)if(this.isNumber().valid)try{Number.isFinite(x)||(x=new Number(parseFloat(x.match(/[0-9.,]+/g).join('').replace(/,/,'.'))))}catch(fa){L=!1,J.toFloat=h(this.error||l.errorLabels.toFloat,this),this.valid=!1,J.count()>0&&(this.errors=
91
+ J)}else L=!1,J.toFloat=h(this.error||l.errorLabels.toFloatNAN,this);else return c[this.name];this.decimals&&x&&!J.toFloat&&(x=parseFloat(x.toFixed(this.decimals)));this.value=l.data[this.name]=x;C&&(isFloatingWithCommas&&(x=(''+x).replace(/\./g,',')),this.target.setAttribute('value',x));this.valid=L;J.count()>0&&(this.errors=J);return c[this.name]};c[g].isFloat=function(r){typeof this.value=='string'&&(this.value=this.value.replace(/\s+/g,''));var x=l.data[this.name]=this.value;r=c[this.name].errors||
92
+ {};typeof x=='string'&&/\./.test(x)&&Number.isFinite(Number(x));typeof x=='string'&&/,/g.test(x)&&(x=this.value=l.data[this.name]=Number(x.replace(/,/g,'.')));Number(x)===x&&x%1!==0?(this.value=l.data[this.name]=Number(x),x=!0):x=!1;r.isRequired||this.value!=''||(x=!0);x||(r.isFloat=h(this.error||l.errorLabels.isFloat,this));this.valid=x;r.count()>0&&(this.errors=r);return c[this.name]};c[g].isRequired=function(r){if(typeof r=='boolean'&&!r)return this.valid=!0,r=l.excluded.indexOf(this.name),r>-1&&
93
+ l.excluded.splice(r,1),c[this.name];if(C&&this.target&&this.target.tagName=='INPUT'&&typeof this.target.type!='undefined'&&this.target.type=='radio'){var x=this.target;r=document.getElementsByName(this.name);r=Array.prototype.filter.call(r,function(fa){return fa.form===x.form});for(var J=0,L=r.length;J<L;++J)if(r[J].checked){/true|false/.test(r[J].value)?this.value=l.data[this.name]=/true/.test(r[J].value)?!0:!1:this.value=l.data[this.name]=r[J].value;this.valid=!0;break}}r=typeof this.value=='undefined'||
94
+ this.value==null||this.value==''||/^\s+/.test(this.value)?!1:!0;J=c[this.name].errors||{};r?r&&typeof J.isRequired!='undefined'&&delete J.isRequired:J.isRequired=h(this.error||l.errorLabels.isRequired,this);this.valid=r;J.count()>0&&(this.errors=J);return c[this.name]};c[g].isString=function(r,x){var J=l.data[this.name]=this.value,L=!1,fa=!0,ma=!0,G=c[this.name].errors||{};typeof J!='string'||G.isRequired||J==''||(L=!0,r&&typeof r=='number'&&J.length<r&&(fa=!1,this.size=r),x&&typeof x=='number'&&
95
+ J.length>x&&(ma=!1,this.size=x));L&&fa&&ma||(!L&&G.isRequired&&J==''?(L=!1,G.isString=h(this.error||l.errorLabels.isString,this)):L||G.isRequired||(L=!0),fa&&ma||(L=!1,fa||(G.isStringLength=h(this.error||l.errorLabels.isStringMinLength,this)),ma||(G.isStringLength=h(this.error||l.errorLabels.isStringMaxLength,this)),r===x&&(G.isStringLength=h(this.error||l.errorLabels.isStringLength,this))));this.valid=L;G.count()>0&&(this.errors=G);return c[this.name]};c[g].isDate=function(r){var x=this.value,J=
96
+ !1,L=c[this.name].errors||{},fa=null;if(!x||x==''||/NaN|Invalid Date/i.test(x))return/NaN|Invalid Date/i.test(x)&&(console.warn('[FormValidator::isDate] Provided value for field `'+this.name+'` is not allowed: `'+x+'`'),L.isDate=h(this.error||l.errorLabels.isDate,this)),this.valid=J,L.count()>0&&(this.errors=L),c[this.name];if(typeof r=='undefined'||typeof r!='undefined'&&/true/i.test(r))r='yyyy-mm-dd';if(x instanceof Date)x=x.format(r);else{try{fa=r.match(/[^\/\- ]+/g)}catch(oa){throw Error('[FormValidator::isDate] Provided mask not allowed: `'+
97
+ r+'`');}try{x=x.match(/[^\/\- ]+/g);var ma={},G;var K=0;for(G=fa.length;K<G;++K)ma[fa[K]]=x[K];for(var B in ma)r=r.replace(new RegExp(B,'g'),ma[B])}catch(oa){throw Error('[FormValidator::isDate] Provided value not allowed: `'+x+'`'+oa);}x=this.value=l.data[this.name]=new Date(r);if(/Invalid Date/i.test(x)||x instanceof Date===!1)return L.isRequired||this.value!=''?L.isDate=h(this.error||l.errorLabels.isDate,this):J=!0,this.valid=J,L.count()>0&&(this.errors=L),c[this.name];J=!0}this.valid=J;return x};
98
+ c[g].format=function(r,x){var J=this.value;return J?J.format(r,x):c[this.name]};c[g].setFlash=function(r,x){typeof x!='undefined'&&x!=''&&(this.error=x);return c[this.name]};c[g].setLabel=function(r){typeof r!='undefined'&&r!=''&&(this.label=r);return c[this.name]};c[g].trim=function(r){if(typeof r=='boolean'&&r)return this.value=this.value.replace(/^\s+|\s+$/,''),l.data[this.name]=l.data[this.name]=this.value,c[this.name]};c[g].exclude=function(r){if(typeof r=='boolean'&&!r)return/^true|false$/i.test(this.value)&&
99
+ (this.value=/^true$/i.test(this.value)?!0:!1,l.data[this.name]=this.value),c[this.name];this.isExcluded=!1;l.excluded.indexOf(this.name)<0&&(l.excluded.push(this.name),this.isExcluded=!0);return c[this.name]};c[g].query=u;c[g].getValidationContext=function(){return{isGFFCtx:C,self:c,local:l,replace:h}};if(n()){F=q=null;try{for(let r in gina.forms.validators)F='/validators/'+r+'/main.js',l.errorLabels[r]='Condition not satisfied',C?(q=ka(gina.forms.validators[r].data),q=q.replace(/(\)\s+\{|\)\{){1}/,
100
+ '$&\n\tvar validationContext = this.getValidationContext(),isGFFCtx = validationContext.isGFFCtx,self = validationContext.self,local = validationContext.local,replace = validationContext.replace;')):q=gina.forms.validators[r].toString(),c[g][r]=eval('('+q+')\n//# sourceURL='+r+'.js')}catch(r){throw Error('[UserFormValidator] Could not evaluate: `'+F+'`\n'+r.stack);}}};for(let g in c)V(g,c[g]);c.addField=function(g,q){typeof c[g]=='undefined'&&V(g,q)};c.isValid=function(){return c.getErrors().count()>
101
+ 0?!1:!0};c.setErrors=function(g){if(!g)return{};for(var q in c)if(typeof c[q]=='object'){for(var F in c[q])typeof g[q]=='object'&&typeof g[q][F]!='undefined'&&(typeof c[q].valid!='undefined'&&/^true$/i.test(c[q].valid)?delete g[q][F]:(typeof c[q].errors=='undefined'&&(c[q].errors={}),c[q].errors[F]=g[q][F]));(typeof c[q].errors=='undefined'&&typeof g[q]!='undefined'||typeof c[q].errors!='undefined'&&c[q].errors.count()==0&&typeof g[q]!='undefined')&&delete g[q]}return g};c.getErrors=function(g){var q=
102
+ {};if(typeof g!='undefined')return typeof c[g]!='undefined'&&c[g]&&typeof c[g].errors!='undefined'&&c[g].errors.count()>0&&(q[g]=c[g].errors),q;for(var F in c)typeof c[F]=='object'&&typeof c[F].errors!='undefined'&&c[F].errors.count()>0&&(q[F]=c[F].errors);return q};c.toData=function(){if(l.excluded.length>0)for(var g=0,q=l.excluded.length;g<q;++g)typeof l.data[l.excluded[g]]!='undefined'&&delete l.data[l.excluded[g]];return l.data};var h=function(g,q){var F=g.match(/%[a-z]+/gi);if(F)for(var N=0,
103
+ r=F.length;N<r;++N)g=g.replace(new RegExp(F[N],'g'),q[l.keys[F[N]]]);return g};c.setErrorLabels=function(g){typeof g!='undefined'&&(l.errorLabels=A(g,l.errorLabels))};return c}typeof module!=='undefined'&&module.exports?module.exports=FormValidatorUtil:typeof define==='function'&&define.amd&&define('lib/form-validator',[],function(){return FormValidatorUtil});
104
104
  function Routing(){var m=typeof module!=='undefined'&&module.exports?!1:!0,E={allowedMethods:['get','post','put','delete'],reservedParams:['controle','file','title','namespace','path'],notFound:{},getInstance:function(n){return Routing.instance}};if(typeof Routing.initialized=='undefined')Routing.initialized=!0,Routing.instance=E,Routing._cached=[],Routing._cachedRoutes={},Routing._tries={};else return E=E.getInstance();E.allowedMethodsString=E.allowedMethods.join(',');var I=null,M=null,C=null;m?
105
105
  (M&&typeof M=='function'||(M=require('lib/merge')),C&&typeof C=='function'||(C=require('lib/form-validator'))):(require('fs'),require('util'),require('../../inherits'),M=require('../../merge'),I=require(__dirname+'/../../../core/plugins')||getContext('gina').plugins,C=I.Validator);E.getUrlProps=function(n,l){var c={};if(m){var S=window.gina.config;c.hostname=S.hostname;typeof n!='undefined'&&(n=this.getRoute('webroot@'+n),c.hostname=n.hostname,c.host=n.host,c.webroot=n.webroot)}else S=getContext('gina').config,
106
106
  typeof getContext('argvFilename')!='undefined'&&(S.getRouting=getContext('gina').Config.instance.getRouting),typeof n=='undefined'&&(n=S.bundle),typeof l=='undefined'&&(l=S.env),c.hostname=S.envConf[n][l].hostname,c.host=S.envConf[n][l].host,c.webroot=S.envConf[n][l].server.webroot,console.debug('[self.getUrlProps][isProxyHost = '+getContext('isProxyHost')+'] hostname ',S.envConf[n][l].hostname,vs,process.gina.PROXY_HOSTNAME);return c};E.cache=function(n,l,c,S,ka){Routing._cached.indexOf(n)==-1&&
@@ -330,28 +330,29 @@ document.getElementById(y[ta].getAttribute('data-upload-'+b+'-link-id')):documen
330
330
  b+'-method` was not defined. Switching to `'+k+'` by default.'));var W=a.getAttribute('data-gina-form-upload-'+b+'-is-synchrone');if(/null/i.test(W)||typeof k=='undefined'||k=='')W=!0;z={url:z,method:k,isSynchrone:W,headers:{'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8','X-Requested-With':'XMLHttpRequest'}};h(k)&&(W=V())&&(z.headers['X-Gina-CSRF-Token']=W);z=setupXhr(z);/GET|DELETE/i.test(k)?z.send():z.send(JSON.stringify({files:H}));if(/none/i.test(window.getComputedStyle(a).display)){if(/none/i.test(a.parentElement.style.display)){a.parentElement.style.display=
331
331
  'block';return}a.style.display='block'}removeListener(gina,$uploadResetTrigger,'click',function(){f.remove();y[ta].remove()});Z--;ta--;break}}},X=function(a,b,e,k,z){var y=new FileReader;y.addEventListener('load',function(f){f.preventDefault();try{var O=this.result,H=void 0;f='';var W=null;typeof H=='undefined'&&(H=8);var ta=H/8;switch(H){case 8:W=new Uint8Array(O);break;case 16:W=new Uint16Array(O);break;case 32:W=new Uint32Array(O);break;default:W=new Uint8Array(O)}var Z=W.length;O=256+ta;H=0;for(var p=
332
332
  ta=null;H<Z;H+=O)ta=Math.min(O,Z-H),p=W.subarray(H,H+ta),f+=String.fromCharCode.apply(null,p);a[this.index].bin+=f;a[this.index].file.type||(a[this.index].file.type='application/octet-stream')}catch(da){return z(da,null,!0)}e+='--'+b+'\r\n';e+='Content-Disposition: form-data; name="'+a[this.index].key+'"; group="'+a[this.index].group+'"; filename="'+a[this.index].file.name+'"\r\nContent-Type: '+a[this.index].file.type+'\r\nContent-Length: '+a[this.index].bin.length+'\r\n\r\n';e+=a[this.index].bin+
333
- '\r\n';++this.index;this.index==a.length?(e+='--'+b+'--',z(!1,e,!0)):X(a,b,e,this.index,z)},!1);y.index=k;a[k].bin='';y.readAsArrayBuffer(a[k].file)},la=function(a){var b=a.target.getAttribute('data-gina-form-event-on-submit-success')||null;if(b!=null)if(/\((.*)\)/.test(b))eval(b);else a.on('success.hform',window[b]);b=a.target.getAttribute('data-gina-form-event-on-submit-error')||null;if(b!=null)if(/\((.*)\)/.test(b))eval(b);else a.on('error.hform',window[b])},ea=function(a){var b=null,e=a;if(!c.$forms)throw Error('`$forms` collection not found');
334
- if(typeof e=='undefined')if(typeof this.id!='undefined'&&this.id!=''&&this.id!=null)e=this.id;else throw Error('[ FormValidator::destroy(formId) ] `formId` is missing');if(typeof e=='string')e=e.replace(/#/,'');else{if(typeof e!='object'||Array.isArray(e))throw Error('[ FormValidator::destroy(formId) ] `formId` should be a `string`');a=e.form;e=a.getAttribute('id')||'form.'+U();a.setAttribute('id',e)}typeof c.$forms[e]!='undefined'?b=c.$forms[e]:typeof this.binded!='undefined'&&(b=this);if(b)addListener(gina,
335
- b.target,'destroy.'+e,function(k){cancelEvent(k);delete c.$forms[e];removeListener(gina,k.currentTarget,k.type);removeListener(gina,k.currentTarget,'destroy')}),b=Sa(b),triggerEvent(gina,b.target,'destroy.'+e);else throw Error('[ FormValidator::destroy(formId) ] `'+e+'` not found');},qa=function(){var a=typeof arguments[0]!='undefined'?arguments[0]:c.rules;for(let k in a){var b=Object.getOwnPropertyNames(a[k]),e=0;let z=b.length,y=!1,f=null;for(;e<z;){if(/^_case_/.test(b[e])){y=!0;f=b[e];break}e++}y||
336
- typeof a[k]!='object'||qa(a[k]);if(f&&Array.isArray(a[k][f].conditions)&&a[k][f].conditions.length>0)for(b=0,e=a[k][f].conditions.length;b<e;)typeof a[k][f].conditions[b].rules!='undefined'&&a[k][f].conditions[b].rules.count()==0&&(a[k][f].conditions.splice(b,1),e--,b--),b++}},va=function(a){var b=JSON.stringify(a),e=b.match(/("@import\s+[-_a-z A-Z 0-9/.]+")/g)||[],k=[];for(let O=0,H=e.length;O<H;O++)k.indexOf(e[O])<0&&k.push(e[O]);e=k;k=b.match(/("_merging(.*))(\s+:|:)(.*)(",|")/g);c.rules||(c.rules=
337
- {});if(e&&e.length>0){a={};for(let O=0,H=e.length;O<H;++O){var z=e[O].replace(/(@import\s+|"|')/g,'');var y=z.replace(/(@import\s+|"|')/g,'').split(/\s/g);for(let W=0,ta=y.length;W<ta;++W){var f=y[W].replace(/\//g,'.').replace(/\-/g,'.');typeof c.rules[f]!='undefined'?(f=JSON.stringify(c.rules[f]),f=JSON.parse(f),f._comment=typeof f._comment!='undefined'?f._comment+'\n':'',f._comment+='Imported from `'+z+'`',f=JSON.stringify(f),b=b.replace(new RegExp(e[O],'g'),f),c.rules=JSON.parse(JSON.stringify(c.rules).replace(new RegExp(e[O],
338
- 'g'),'{}'))):console.warn('[formValidator:rules] <@import error> on `'+e[O]+'`: rule `'+y[W]+'` not found. Ignoring.')}y=new RegExp(e[O]);if(z=k&&y.test(k.join())?!0:!1)for(let W=0,ta=k.length;W<ta;W++)if(y.test(k[W])){z=JSON.stringify(a);z=z.substring(1,z.length-1);W<ta-1&&(z+=',');try{b=b.replace(new RegExp(k[W],'g'),z),c.rules=JSON.parse(JSON.stringify(c.rules).replace(new RegExp(k[W],'g'),'{}'))}catch(Z){throw Z;}}a={}}a=JSON.parse(b);wa(a,'');try{qa()}catch(O){console.error(O.stack)}}return a},
339
- ra=function(a){gina.hasValidator?(c=D(c,gina.validator),c.on('init',function(b){c.isReady=!0;triggerEvent(gina,c.target,'ready.'+c.id,c)})):(c.target=document,c.setOptions=q,c.getFormById=F,c.validateFormById=r,c.resetErrorsDisplay=fa,c.resetFields=ma,c.handleErrorsDisplay=L,c.send=K,c.on('init',function(b){if(typeof a!='undefined'&&a.count())try{wa(a,''),a=va(a),gina.forms.rules=typeof gina.forms.rules!='undefined'&&gina.forms.rules?D(gina.forms.rules,a,!0):a,c.rules=D(c.rules,JSON.clone(gina.forms.rules),
340
- !0)}catch(ta){throw ta;}ka.count()||(ka=JSON.clone(c.rules));S.setOptions=q;S.getFormById=F;S.validateFormById=r;S.resetErrorsDisplay=fa;S.resetFields=ma;S.handleErrorsDisplay=L;S.submit=G;S.send=K;S.unbind=Sa;S.bind=Ya;S.reBind=jb;S.destroy=ea;b=0;for(var e=document.getElementsByTagName('form'),k=0,z=e.length;k<z;++k){if(e[k].getAttribute){var y=e[k].getAttribute('id')||'form.'+U();y!==e[k].getAttribute('id')&&e[k].setAttribute('id',y)}else y='form.'+U(),e[k].setAttribute('id',y);S.id=y;S.target=
341
- e[k];c.$forms[y]=D({},S);var f=e[k].getAttribute('data-gina-form-rule');if(f){f=f.replace(/\-|\//g,'.');if(typeof a!='undefined'){if(!/^[A-Za-z_$][\w$]*(\.[A-Za-z_$][\w$]*)*$/.test(f))throw Error('Invalid form rule path: `'+f+'`');for(var O=f.split('.'),H=gina.forms.rules,W=0;H!=null&&W<O.length;W++)H=H[O[W]];c.$forms[y].rules[f]=c.rules[f]=ka[f]=D(JSON.clone(H),c.rules[f])}if(typeof ka[f]=='undefined')throw Error('['+y+'] no rule found with key: `'+f+'`. Please check if json is not malformed @ /forms/rules/'+
342
- f.replace(/\./g,'/')+'.json');f=c.rules[f]}typeof y=='string'&&typeof ka[y.replace(/\-/g,'.')]!='undefined'||typeof f=='object'?(y=c.$forms[y].target,f?Ya(y,f):Ya(y),++b):(typeof e[k].id=='object'?(delete c.$forms[e[k].id],y=e[k].attributes.getNamedItem('id').nodeValue||'form.'+U(),e[k].setAttribute('id',y),e[k].id=y,S.target=e[k],c.$forms[y]=D({},S),y=c.$forms[y].target):y=c.$forms[e[k].id].target,f?Ya(y,f):Ya(y))}if(window.XMLHttpRequest)v=new XMLHttpRequest;else if(window.ActiveXObject)try{v=new ActiveXObject('Msxml2.XMLHTTP')}catch(ta){try{v=
343
- new ActiveXObject('Microsoft.XMLHTTP')}catch(Z){}}c.isReady=!0;gina.hasValidator=!0;gina.validator=c;triggerEvent(gina,c.target,'ready.'+c.id,c)}));c.initialized=!0;return c},wa=function(a,b){var e;for(e in a)if(typeof a[e]=='object'&&typeof c.rules[b+e]=='undefined'){var k=e;/\[|\]/.test(e)&&(k=e.replace(/\[/g,'.').replace(/\]/g,''));c.rules[b+k]=a[e];wa(a[e],b+k+'.')}},Ja=function(a){if(typeof ka[a]!='undefined')return ka[a];var b=null;if(typeof c.rules[a]=='undefined'){if(wa(ka,''),ka=va(ka),b=
344
- ka[a],!b)return{}}else b=c.rules[a];b=JSON.clone(b);var e=new RegExp('^'+a),k=new RegExp('^'+a+'.'),z=null,y=function(O,H,W,ta,Z,p,da){if(H.length){var ja=Object.getOwnPropertyNames(O)[0],Q=H[0];Q=Z==''?Z+=Q:Z+'['+Q+']';H.length==1&&(O[ja]=D(O[ja],W,!0));H.splice(0,1);Q==ja?y(O[ja],H,W,ta,Q,p,da):typeof O[ja]!='undefined'?y(O[ja],H,W,ta,Q,p,da):y(O,H,W,ta,Z,p,da)}},f;for(f in c.rules)f!=a&&e.test(f)&&(z=f.replace(k,''),/\./.test(z)&&(z=z.split(/\./g),y(b,z,c.rules[f],b,'',0,b.count()-1)));return ka[a]=
345
- b},ca=formatDataFromString,ua=function(a){var b=c.$forms[a.form.getAttribute('id')],e=/^true$/i.test(a.disabled)?!0:!1;e&&typeof b.rule!='undefined'&&typeof b.rule[a.name]!='undefined'&&typeof b.rule[a.name].exclude!='undefined'&&/^false$/i.test(b.rule[a.name].exclude)&&(e=!1);if(/^(radio|text|hidden|password|number|date|email)$/i.test(a.type)&&!e){var k=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,'value'),z=k.set;k.set=function(y){Object.defineProperty(this,'value',{set:z});var f=
346
- 'change.'+this.id;y===this.value&&y===this.defaultValue||y===this.value||(this.value=y,console.debug('Value set: '+y),typeof gina.events[f]!='undefined'&&(console.debug('trigger event on: ',this.name,f),triggerEvent(gina,this,f,y)));Object.defineProperty(this,'value',k)};Object.defineProperty(a,'value',k)}},Ba=function(a,b,e,k){typeof k=='undefined'&&(k=!1);var z=a.rules,y=c.$forms[b.form.getAttribute('id')],f=/^true$/i.test(b.disabled)?!0:!1;f&&typeof y.rule!='undefined'&&typeof y.rule[b.name]!=
347
- 'undefined'&&typeof y.rule[b.name].exclude!='undefined'&&/^false$/i.test(y.rule[b.name].exclude)&&(f=!1);if(/^(radio|checkbox|text|hidden|password|number|date|email)$/i.test(b.type)&&!f||k&&!f){k=b.name;y=z[k]||null;if(!y&&(Za(z,b),typeof z[k]=='undefined'))return;if(a.target.dataset.ginaFormLiveCheckEnabled&&y&&(k=[],y=null,f=0,/^(radio|checkbox)$/i.test(b.type)?y=/^(radio|checkbox)$/i.test(b.type)?'changed.'+b.id:'change.'+b.id:(addEventListener(gina,b,'focusout.'+b.id,function(H){H.preventDefault();
348
- clearTimeout(e)}),y='change.'+b.id,typeof gina.events[y]=='undefined'&&(k[f]=y,++f),y='keyup.'+b.id,typeof gina.events[y]=='undefined'&&(k[f]=y,++f),y='focusin.'+b.id,typeof gina.events[y]=='undefined'&&(k[f]=y,++f),y='focusout.'+b.id),typeof gina.events[y]=='undefined'&&(k[f]=y,++f),k.length>0)){var O=!1;addListener(gina,b,k,function(H){H.preventDefault();clearTimeout(e);if(!O&&/^changed\./i.test(H.type)||!O&&/^(radio|checkbox)$/i.test(H.target.type))O=!0;else if(O&&/^changed\./i.test(H.type)||O&&
349
- /^(radio|checkbox)$/i.test(H.target.type))return!1;if(typeof c.$forms[H.target.form.getAttribute('id')].isSubmitting!='undefined'&&/true/i.test(c.$forms[H.target.form.getAttribute('id')].isSubmitting))return!1;var W=function(){/^(password)$/i.test(H.target.type)||console.debug('processing: '+H.target.name+'/'+H.target.id);if(!/^(radio|checkbox)$/i.test(H.target.type)&&H.target.value===H.target.defaultValue&&H.target.value!=''){var ta=c.$forms[H.target.form.getAttribute('id')].errors;if(ta&&ta.count()!=
350
- 0)L(H.target.form,ta,null,H.target.name);else return L(H.target.form,{},null,H.target.name),cancelEvent(H)}ta={};var Z={};ta[H.target.name]=H.target.value;Z[H.target.name]=H.target;c.$forms[H.target.form.getAttribute('id')].isValidating=!0;T(H.target,ta,Z,a.rules,function(p){p.isValid()?L(H.target.form,{},p.data,H.target.name):L(H.target.form,p.error,p.data,H.target.name);var da=H.target.form,ja=null,Q=null,ha=null;ha=kb(da,z);ja=ha.fields;Q=ha.$fields;var sa=da.getAttribute('id');ha=c.$forms[sa].rules;
351
- c.$forms[sa].isValidating=!0;T(da,ja,Q,ha,function(ia){c.$forms[sa].isValidating=!1;console.debug('['+sa+'] onSilentGlobalLiveValidation: '+ia.isValid(),ia,ja);var xa=ia.isValid();A&&C&&typeof window.ginaToolbar!='undefined'&&window.ginaToolbar&&(gina.forms.errors||(gina.forms.errors={}),window.ginaToolbar.update('forms',{id:sa,errors:ia.error||{}}));if(!xa&&ia.error){c.$forms[b.form.getAttribute('id')].errors=D(p.error,ia.error);var Ma=H.target.name;typeof ia.error[Ma]!='undefined'&&(x(Q[Ma]),L(da,
352
- ia.error,ia.data,Ma))}else c.$forms[sa].errors&&!c.$forms[sa].errors.count()&&(c.$forms[sa].errors={},console.debug('resetting field: '+b.name),J[sa]={},L(da,{},null,b.name));eb(da,xa);O=!1})})};if(/^changed\./i.test(H.type)||/^change\./i.test(H.type)&&H.target.type=='radio')return function(ta,Z){if(!(Z>0))return++Z,setTimeout(()=>{console.debug(' changed .... '+b.id);W()},0)}(O,0);/^focusin\./i.test(H.type)?/\-error/.test(b.parentNode.className)&&(console.debug('#1 you just focusin ....'+b.id,b.value,
353
- c.$forms[b.form.getAttribute('id')].isValidating),x(b)):/^focusout\./i.test(H.type)?/\-warning/.test(b.parentNode.className)&&(console.debug('#1 you just focusout ....'+b.id,b.value),c.$forms[b.form.getAttribute('id')].isValidating=!1,x(b),L(b.form,c.$forms[b.form.getAttribute('id')].errors,null,b.name)):/^keyup\./i.test(H.type)?(b.ginaFormValidatorTestedValue=b.value,e=setTimeout(function(){['91','17','16'].indexOf(''+H.keyCode)>-1&&aa.count()==0||(console.debug('[A]['+aa.count()+'] keyup ('+H.keyCode+
354
- ') .... '+b.id,b.value,' VS ',b.ginaFormValidatorTestedValue+'(old)'),W())},1E3)):/^change\./i.test(H.type)&&!/^(checkbox)$/i.test(H.target.type)&&(console.debug(' change .... '+b.id),W())})}}},Oa=function(a,b){a.setSelectionRange?(a.focus(),a.setSelectionRange(b,b)):a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),a.moveEnd('character',b),a.moveStart('character',b),a.select())},Ia=function(a,b){if(document.activeElement&&document.activeElement.form){a=Array.prototype.filter.call(document.activeElement.form.querySelectorAll('a:not([disabled]), button:not([disabled]), input[type=text]:not([disabled]), select:not([disabled]), [tabindex]:not([disabled]):not([tabindex="-1"])'),
333
+ '\r\n';++this.index;this.index==a.length?(e+='--'+b+'--',z(!1,e,!0)):X(a,b,e,this.index,z)},!1);y.index=k;a[k].bin='';y.readAsArrayBuffer(a[k].file)},la=function(a){var b=a.target.getAttribute('data-gina-form-event-on-submit-success')||null;if(b!=null)if(/\((.*)\)/.test(b))try{console.warn('[gina-form-event] function-call shape no longer supported on data-gina-form-event-on-submit-success \u2014 use a bare identifier and register the handler on window: '+b)}catch(e){}else a.on('success.hform',window[b]);
334
+ b=a.target.getAttribute('data-gina-form-event-on-submit-error')||null;if(b!=null)if(/\((.*)\)/.test(b))try{console.warn('[gina-form-event] function-call shape no longer supported on data-gina-form-event-on-submit-error \u2014 use a bare identifier and register the handler on window: '+b)}catch(e){}else a.on('error.hform',window[b])},ea=function(a){var b=null,e=a;if(!c.$forms)throw Error('`$forms` collection not found');if(typeof e=='undefined')if(typeof this.id!='undefined'&&this.id!=''&&this.id!=
335
+ null)e=this.id;else throw Error('[ FormValidator::destroy(formId) ] `formId` is missing');if(typeof e=='string')e=e.replace(/#/,'');else{if(typeof e!='object'||Array.isArray(e))throw Error('[ FormValidator::destroy(formId) ] `formId` should be a `string`');a=e.form;e=a.getAttribute('id')||'form.'+U();a.setAttribute('id',e)}typeof c.$forms[e]!='undefined'?b=c.$forms[e]:typeof this.binded!='undefined'&&(b=this);if(b)addListener(gina,b.target,'destroy.'+e,function(k){cancelEvent(k);delete c.$forms[e];
336
+ removeListener(gina,k.currentTarget,k.type);removeListener(gina,k.currentTarget,'destroy')}),b=Sa(b),triggerEvent(gina,b.target,'destroy.'+e);else throw Error('[ FormValidator::destroy(formId) ] `'+e+'` not found');},qa=function(){var a=typeof arguments[0]!='undefined'?arguments[0]:c.rules;for(let k in a){var b=Object.getOwnPropertyNames(a[k]),e=0;let z=b.length,y=!1,f=null;for(;e<z;){if(/^_case_/.test(b[e])){y=!0;f=b[e];break}e++}y||typeof a[k]!='object'||qa(a[k]);if(f&&Array.isArray(a[k][f].conditions)&&
337
+ a[k][f].conditions.length>0)for(b=0,e=a[k][f].conditions.length;b<e;)typeof a[k][f].conditions[b].rules!='undefined'&&a[k][f].conditions[b].rules.count()==0&&(a[k][f].conditions.splice(b,1),e--,b--),b++}},va=function(a){var b=JSON.stringify(a),e=b.match(/("@import\s+[-_a-z A-Z 0-9/.]+")/g)||[],k=[];for(let O=0,H=e.length;O<H;O++)k.indexOf(e[O])<0&&k.push(e[O]);e=k;k=b.match(/("_merging(.*))(\s+:|:)(.*)(",|")/g);c.rules||(c.rules={});if(e&&e.length>0){a={};for(let O=0,H=e.length;O<H;++O){var z=e[O].replace(/(@import\s+|"|')/g,
338
+ '');var y=z.replace(/(@import\s+|"|')/g,'').split(/\s/g);for(let W=0,ta=y.length;W<ta;++W){var f=y[W].replace(/\//g,'.').replace(/\-/g,'.');typeof c.rules[f]!='undefined'?(f=JSON.stringify(c.rules[f]),f=JSON.parse(f),f._comment=typeof f._comment!='undefined'?f._comment+'\n':'',f._comment+='Imported from `'+z+'`',f=JSON.stringify(f),b=b.replace(new RegExp(e[O],'g'),f),c.rules=JSON.parse(JSON.stringify(c.rules).replace(new RegExp(e[O],'g'),'{}'))):console.warn('[formValidator:rules] <@import error> on `'+
339
+ e[O]+'`: rule `'+y[W]+'` not found. Ignoring.')}y=new RegExp(e[O]);if(z=k&&y.test(k.join())?!0:!1)for(let W=0,ta=k.length;W<ta;W++)if(y.test(k[W])){z=JSON.stringify(a);z=z.substring(1,z.length-1);W<ta-1&&(z+=',');try{b=b.replace(new RegExp(k[W],'g'),z),c.rules=JSON.parse(JSON.stringify(c.rules).replace(new RegExp(k[W],'g'),'{}'))}catch(Z){throw Z;}}a={}}a=JSON.parse(b);wa(a,'');try{qa()}catch(O){console.error(O.stack)}}return a},ra=function(a){gina.hasValidator?(c=D(c,gina.validator),c.on('init',
340
+ function(b){c.isReady=!0;triggerEvent(gina,c.target,'ready.'+c.id,c)})):(c.target=document,c.setOptions=q,c.getFormById=F,c.validateFormById=r,c.resetErrorsDisplay=fa,c.resetFields=ma,c.handleErrorsDisplay=L,c.send=K,c.on('init',function(b){if(typeof a!='undefined'&&a.count())try{wa(a,''),a=va(a),gina.forms.rules=typeof gina.forms.rules!='undefined'&&gina.forms.rules?D(gina.forms.rules,a,!0):a,c.rules=D(c.rules,JSON.clone(gina.forms.rules),!0)}catch(ta){throw ta;}ka.count()||(ka=JSON.clone(c.rules));
341
+ S.setOptions=q;S.getFormById=F;S.validateFormById=r;S.resetErrorsDisplay=fa;S.resetFields=ma;S.handleErrorsDisplay=L;S.submit=G;S.send=K;S.unbind=Sa;S.bind=Ya;S.reBind=jb;S.destroy=ea;b=0;for(var e=document.getElementsByTagName('form'),k=0,z=e.length;k<z;++k){if(e[k].getAttribute){var y=e[k].getAttribute('id')||'form.'+U();y!==e[k].getAttribute('id')&&e[k].setAttribute('id',y)}else y='form.'+U(),e[k].setAttribute('id',y);S.id=y;S.target=e[k];c.$forms[y]=D({},S);var f=e[k].getAttribute('data-gina-form-rule');
342
+ if(f){f=f.replace(/\-|\//g,'.');if(typeof a!='undefined'){if(!/^[A-Za-z_$][\w$]*(\.[A-Za-z_$][\w$]*)*$/.test(f))throw Error('Invalid form rule path: `'+f+'`');for(var O=f.split('.'),H=gina.forms.rules,W=0;H!=null&&W<O.length;W++)H=H[O[W]];c.$forms[y].rules[f]=c.rules[f]=ka[f]=D(JSON.clone(H),c.rules[f])}if(typeof ka[f]=='undefined')throw Error('['+y+'] no rule found with key: `'+f+'`. Please check if json is not malformed @ /forms/rules/'+f.replace(/\./g,'/')+'.json');f=c.rules[f]}typeof y=='string'&&
343
+ typeof ka[y.replace(/\-/g,'.')]!='undefined'||typeof f=='object'?(y=c.$forms[y].target,f?Ya(y,f):Ya(y),++b):(typeof e[k].id=='object'?(delete c.$forms[e[k].id],y=e[k].attributes.getNamedItem('id').nodeValue||'form.'+U(),e[k].setAttribute('id',y),e[k].id=y,S.target=e[k],c.$forms[y]=D({},S),y=c.$forms[y].target):y=c.$forms[e[k].id].target,f?Ya(y,f):Ya(y))}if(window.XMLHttpRequest)v=new XMLHttpRequest;else if(window.ActiveXObject)try{v=new ActiveXObject('Msxml2.XMLHTTP')}catch(ta){try{v=new ActiveXObject('Microsoft.XMLHTTP')}catch(Z){}}c.isReady=
344
+ !0;gina.hasValidator=!0;gina.validator=c;triggerEvent(gina,c.target,'ready.'+c.id,c)}));c.initialized=!0;return c},wa=function(a,b){var e;for(e in a)if(typeof a[e]=='object'&&typeof c.rules[b+e]=='undefined'){var k=e;/\[|\]/.test(e)&&(k=e.replace(/\[/g,'.').replace(/\]/g,''));c.rules[b+k]=a[e];wa(a[e],b+k+'.')}},Ja=function(a){if(typeof ka[a]!='undefined')return ka[a];var b=null;if(typeof c.rules[a]=='undefined'){if(wa(ka,''),ka=va(ka),b=ka[a],!b)return{}}else b=c.rules[a];b=JSON.clone(b);var e=new RegExp('^'+
345
+ a),k=new RegExp('^'+a+'.'),z=null,y=function(O,H,W,ta,Z,p,da){if(H.length){var ja=Object.getOwnPropertyNames(O)[0],Q=H[0];Q=Z==''?Z+=Q:Z+'['+Q+']';H.length==1&&(O[ja]=D(O[ja],W,!0));H.splice(0,1);Q==ja?y(O[ja],H,W,ta,Q,p,da):typeof O[ja]!='undefined'?y(O[ja],H,W,ta,Q,p,da):y(O,H,W,ta,Z,p,da)}},f;for(f in c.rules)f!=a&&e.test(f)&&(z=f.replace(k,''),/\./.test(z)&&(z=z.split(/\./g),y(b,z,c.rules[f],b,'',0,b.count()-1)));return ka[a]=b},ca=formatDataFromString,ua=function(a){var b=c.$forms[a.form.getAttribute('id')],
346
+ e=/^true$/i.test(a.disabled)?!0:!1;e&&typeof b.rule!='undefined'&&typeof b.rule[a.name]!='undefined'&&typeof b.rule[a.name].exclude!='undefined'&&/^false$/i.test(b.rule[a.name].exclude)&&(e=!1);if(/^(radio|text|hidden|password|number|date|email)$/i.test(a.type)&&!e){var k=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,'value'),z=k.set;k.set=function(y){Object.defineProperty(this,'value',{set:z});var f='change.'+this.id;y===this.value&&y===this.defaultValue||y===this.value||(this.value=
347
+ y,console.debug('Value set: '+y),typeof gina.events[f]!='undefined'&&(console.debug('trigger event on: ',this.name,f),triggerEvent(gina,this,f,y)));Object.defineProperty(this,'value',k)};Object.defineProperty(a,'value',k)}},Ba=function(a,b,e,k){typeof k=='undefined'&&(k=!1);var z=a.rules,y=c.$forms[b.form.getAttribute('id')],f=/^true$/i.test(b.disabled)?!0:!1;f&&typeof y.rule!='undefined'&&typeof y.rule[b.name]!='undefined'&&typeof y.rule[b.name].exclude!='undefined'&&/^false$/i.test(y.rule[b.name].exclude)&&
348
+ (f=!1);if(/^(radio|checkbox|text|hidden|password|number|date|email)$/i.test(b.type)&&!f||k&&!f){k=b.name;y=z[k]||null;if(!y&&(Za(z,b),typeof z[k]=='undefined'))return;if(a.target.dataset.ginaFormLiveCheckEnabled&&y&&(k=[],y=null,f=0,/^(radio|checkbox)$/i.test(b.type)?y=/^(radio|checkbox)$/i.test(b.type)?'changed.'+b.id:'change.'+b.id:(addEventListener(gina,b,'focusout.'+b.id,function(H){H.preventDefault();clearTimeout(e)}),y='change.'+b.id,typeof gina.events[y]=='undefined'&&(k[f]=y,++f),y='keyup.'+
349
+ b.id,typeof gina.events[y]=='undefined'&&(k[f]=y,++f),y='focusin.'+b.id,typeof gina.events[y]=='undefined'&&(k[f]=y,++f),y='focusout.'+b.id),typeof gina.events[y]=='undefined'&&(k[f]=y,++f),k.length>0)){var O=!1;addListener(gina,b,k,function(H){H.preventDefault();clearTimeout(e);if(!O&&/^changed\./i.test(H.type)||!O&&/^(radio|checkbox)$/i.test(H.target.type))O=!0;else if(O&&/^changed\./i.test(H.type)||O&&/^(radio|checkbox)$/i.test(H.target.type))return!1;if(typeof c.$forms[H.target.form.getAttribute('id')].isSubmitting!=
350
+ 'undefined'&&/true/i.test(c.$forms[H.target.form.getAttribute('id')].isSubmitting))return!1;var W=function(){/^(password)$/i.test(H.target.type)||console.debug('processing: '+H.target.name+'/'+H.target.id);if(!/^(radio|checkbox)$/i.test(H.target.type)&&H.target.value===H.target.defaultValue&&H.target.value!=''){var ta=c.$forms[H.target.form.getAttribute('id')].errors;if(ta&&ta.count()!=0)L(H.target.form,ta,null,H.target.name);else return L(H.target.form,{},null,H.target.name),cancelEvent(H)}ta={};
351
+ var Z={};ta[H.target.name]=H.target.value;Z[H.target.name]=H.target;c.$forms[H.target.form.getAttribute('id')].isValidating=!0;T(H.target,ta,Z,a.rules,function(p){p.isValid()?L(H.target.form,{},p.data,H.target.name):L(H.target.form,p.error,p.data,H.target.name);var da=H.target.form,ja=null,Q=null,ha=null;ha=kb(da,z);ja=ha.fields;Q=ha.$fields;var sa=da.getAttribute('id');ha=c.$forms[sa].rules;c.$forms[sa].isValidating=!0;T(da,ja,Q,ha,function(ia){c.$forms[sa].isValidating=!1;console.debug('['+sa+'] onSilentGlobalLiveValidation: '+
352
+ ia.isValid(),ia,ja);var xa=ia.isValid();A&&C&&typeof window.ginaToolbar!='undefined'&&window.ginaToolbar&&(gina.forms.errors||(gina.forms.errors={}),window.ginaToolbar.update('forms',{id:sa,errors:ia.error||{}}));if(!xa&&ia.error){c.$forms[b.form.getAttribute('id')].errors=D(p.error,ia.error);var Ma=H.target.name;typeof ia.error[Ma]!='undefined'&&(x(Q[Ma]),L(da,ia.error,ia.data,Ma))}else c.$forms[sa].errors&&!c.$forms[sa].errors.count()&&(c.$forms[sa].errors={},console.debug('resetting field: '+b.name),
353
+ J[sa]={},L(da,{},null,b.name));eb(da,xa);O=!1})})};if(/^changed\./i.test(H.type)||/^change\./i.test(H.type)&&H.target.type=='radio')return function(ta,Z){if(!(Z>0))return++Z,setTimeout(()=>{console.debug(' changed .... '+b.id);W()},0)}(O,0);/^focusin\./i.test(H.type)?/\-error/.test(b.parentNode.className)&&(console.debug('#1 you just focusin ....'+b.id,b.value,c.$forms[b.form.getAttribute('id')].isValidating),x(b)):/^focusout\./i.test(H.type)?/\-warning/.test(b.parentNode.className)&&(console.debug('#1 you just focusout ....'+
354
+ b.id,b.value),c.$forms[b.form.getAttribute('id')].isValidating=!1,x(b),L(b.form,c.$forms[b.form.getAttribute('id')].errors,null,b.name)):/^keyup\./i.test(H.type)?(b.ginaFormValidatorTestedValue=b.value,e=setTimeout(function(){['91','17','16'].indexOf(''+H.keyCode)>-1&&aa.count()==0||(console.debug('[A]['+aa.count()+'] keyup ('+H.keyCode+') .... '+b.id,b.value,' VS ',b.ginaFormValidatorTestedValue+'(old)'),W())},1E3)):/^change\./i.test(H.type)&&!/^(checkbox)$/i.test(H.target.type)&&(console.debug(' change .... '+
355
+ b.id),W())})}}},Oa=function(a,b){a.setSelectionRange?(a.focus(),a.setSelectionRange(b,b)):a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),a.moveEnd('character',b),a.moveStart('character',b),a.select())},Ia=function(a,b){if(document.activeElement&&document.activeElement.form){a=Array.prototype.filter.call(document.activeElement.form.querySelectorAll('a:not([disabled]), button:not([disabled]), input[type=text]:not([disabled]), select:not([disabled]), [tabindex]:not([disabled]):not([tabindex="-1"])'),
355
356
  function(z){return z.offsetWidth>0||z.offsetHeight>0||z===document.activeElement});var e=a.indexOf(document.activeElement);if(e>-1){var k=a[e+1];b&&(k=a[e-1]);(k||a[0]).focus()}}},Ka=function(a,b){a.setAttribute('readonly','readonly');addListener(gina,a,'focusout.'+a.id,function(e){e.preventDefault();clearTimeout(b);e=e.currentTarget;triggerEvent(gina,e,'change.'+e.id);e.setAttribute('readonly','readonly')});addListener(gina,a,'focusin.'+a.id,function(e){e.preventDefault();e.currentTarget.removeAttribute('readonly');
356
357
  var k='keydown.'+e.currentTarget.id;typeof gina.events[k]=='undefined'&&addListener(gina,e.currentTarget,k,function(z){z.preventDefault();clearTimeout(b);var y=z.currentTarget,f=z.currentTarget.value,O=y.selectionStart,H=y.selectionEnd;y.removeAttribute('readonly');switch(z.keyCode){case 46:O!=H?(y.value=f.substring(0,O)+f.substring(H),O==0&&(y.value=f.substring(H+1))):y.value=O==0?f.substring(O+1):f.substring(0,O)+f.substring(H+1);z.currentTarget.setAttribute('readonly','readonly');setTimeout(()=>
357
358
  {y.removeAttribute('readonly');setTimeout(()=>{Oa(y,O)},0)},0);break;case 8:O!=H?(y.value=f.substring(0,O)+f.substring(H),O==0&&(y.value=f.substring(H))):y.value=O==0?f.substring(O+1):f.substring(0,O-1)+f.substring(H);z.currentTarget.setAttribute('readonly','readonly');setTimeout(()=>{y.removeAttribute('readonly');setTimeout(()=>{O!=H?Oa(y,O):O==0?Oa(y,O):Oa(y,O-1)},0)},0);break;case 9:aa[16]&&aa[9]?Ia(y,!0):Ia(y);break;case 13:case 16:break;case 37:console.debug('moving left ',O-1);Oa(y,O-1);break;
@@ -22,6 +22,7 @@ var inherits = lib.inherits;
22
22
  var console = lib.logger;
23
23
  var Collection = lib.Collection;
24
24
  var modelUtil = new lib.Model();
25
+ var secrets = lib.secrets;
25
26
 
26
27
 
27
28
  /**
@@ -2747,6 +2748,18 @@ function Config(opt, contextResetNeeded) {
2747
2748
  // }
2748
2749
  self.envConf[bundle][env] = conf[bundle][env];
2749
2750
 
2751
+ // ${secret:KEY} placeholder substitution. Walks the merged config
2752
+ // for this bundle in place, replacing every string value that
2753
+ // matches `^\${secret:KEY\}$` with the value resolved by the env
2754
+ // backend. Runs once per bundle inside the config-load cycle;
2755
+ // downstream reads (getConfig, getInstance) see the resolved
2756
+ // values. Fail-closed: backend throws on unset/empty values.
2757
+ try {
2758
+ secrets.resolve(self.envConf[bundle][env]);
2759
+ } catch (secretErr) {
2760
+ return callback(secretErr);
2761
+ }
2762
+
2750
2763
  ++b;
2751
2764
  if (b < bundles.length) {
2752
2765
  loadBundleConfig(bundles, b, callback, reload, collectedRules)
@@ -64,6 +64,7 @@ var MAC_BYTES = 32;
64
64
  */
65
65
  function resolveSettingsDefaults() {
66
66
  var defaults = {
67
+ secret: null,
67
68
  cookieName: DEFAULT_COOKIE_NAME,
68
69
  headerName: DEFAULT_HEADER_NAME,
69
70
  fieldName: DEFAULT_FIELD_NAME,
@@ -87,6 +88,12 @@ function resolveSettingsDefaults() {
87
88
  csrfConf = {};
88
89
  }
89
90
 
91
+ // `settings.csrf.secret` flows through `lib/secrets` at config-load
92
+ // time — a `${secret:KEY}` placeholder is already resolved by the
93
+ // time we read it here.
94
+ if (typeof csrfConf.secret === 'string' && csrfConf.secret) {
95
+ defaults.secret = csrfConf.secret;
96
+ }
90
97
  if (typeof csrfConf.cookieName === 'string' && csrfConf.cookieName) {
91
98
  defaults.cookieName = csrfConf.cookieName;
92
99
  }
@@ -422,13 +429,24 @@ var SESSIONLESS_MESSAGE =
422
429
  + ' - CSRF doesn\'t apply to non-cookie authentication.';
423
430
 
424
431
  /**
425
- * Build the CSRF middleware. The factory reads
426
- * `process.env.GINA_CSRF_SECRET` once, at call time, and refuses to
427
- * proceed if it is missing — no dev fallback.
432
+ * Build the CSRF middleware. The factory reads the HMAC secret at call
433
+ * time from a three-step chain and refuses to proceed if all three are
434
+ * missing — no dev fallback. Precedence:
435
+ *
436
+ * 1. `opts.secret` — factory override (test harness only).
437
+ * 2. `settings.json > csrf.secret` — resolver-compatible config slot.
438
+ * `${secret:KEY}` placeholders are filled by `lib/secrets` at
439
+ * config-load time from `process.env[KEY]`, so this slot lets
440
+ * consumers name the env var anything they like.
441
+ * 3. `process.env.GINA_CSRF_SECRET` — back-compat direct env read.
442
+ * Always honoured when set, regardless of (2).
428
443
  *
429
444
  * @example
445
+ * // settings.json — recommended shape:
446
+ * // { "csrf": { "secret": "${secret:MY_CSRF_KEY}" } }
447
+ * // then set process.env.MY_CSRF_KEY at deploy time.
430
448
  * var csrf = require('gina').plugins.Csrf();
431
- * app.use(session({ secret: process.env.SESSION_SECRET }));
449
+ * app.use(session({ secret: self.getConfig('session').secret }));
432
450
  * app.use(csrf);
433
451
  *
434
452
  * @example
@@ -441,7 +459,7 @@ var SESSIONLESS_MESSAGE =
441
459
  * }
442
460
  *
443
461
  * @param {object} [opts]
444
- * @param {string} [opts.secret] — overrides `GINA_CSRF_SECRET` (test harness)
462
+ * @param {string} [opts.secret] — overrides settings.csrf.secret and GINA_CSRF_SECRET (test harness)
445
463
  * @param {string} [opts.cookieName]
446
464
  * @param {string} [opts.headerName]
447
465
  * @param {string} [opts.fieldName]
@@ -453,23 +471,28 @@ var SESSIONLESS_MESSAGE =
453
471
  * which itself defaults to the bundle's
454
472
  * configured hostname.
455
473
  * @returns {function} — Express-compatible middleware `(req, res, next)`
456
- * @throws {Error} when `GINA_CSRF_SECRET` is missing or no origin can be resolved.
474
+ * @throws {Error} when no secret is resolvable from any of the three sources,
475
+ * or no origin can be resolved.
457
476
  */
458
477
  function Csrf(opts) {
459
478
  opts = opts || {};
460
479
 
480
+ var defaults = resolveSettingsDefaults();
481
+
461
482
  var secret = (typeof opts.secret === 'string' && opts.secret)
462
483
  ? opts.secret
463
- : process.env.GINA_CSRF_SECRET;
484
+ : (typeof defaults.secret === 'string' && defaults.secret)
485
+ ? defaults.secret
486
+ : process.env.GINA_CSRF_SECRET;
464
487
  if (typeof secret !== 'string' || !secret) {
465
488
  throw new Error(
466
- '[gina csrf] GINA_CSRF_SECRET env var is required.'
489
+ '[gina csrf] GINA_CSRF_SECRET env var is required'
490
+ + ' (or set settings.json > csrf.secret — supports ${secret:KEY} placeholders).'
467
491
  + ' Generate once: openssl rand -base64 64.'
468
492
  + ' Place in your bundle\'s env.json or your shell profile.'
469
493
  );
470
494
  }
471
495
 
472
- var defaults = resolveSettingsDefaults();
473
496
  var cookieName = (typeof opts.cookieName === 'string' && opts.cookieName) ? opts.cookieName : defaults.cookieName;
474
497
  var headerName = (typeof opts.headerName === 'string' && opts.headerName) ? opts.headerName : defaults.headerName;
475
498
  var fieldName = (typeof opts.fieldName === 'string' && opts.fieldName) ? opts.fieldName : defaults.fieldName;
@@ -1069,7 +1069,8 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
1069
1069
 
1070
1070
  isValid = new RegExp(re, flags).test(this.value)
1071
1071
  } else {
1072
- isValid = eval(condition);
1072
+ // #M21b — free-form JS condition shape unsupported; declare a documented shape instead
1073
+ throw new Error('[FormValidator] Unsupported condition shape — supported: binary comparison (a OP b), RegExp, boolean, /regex/flags literal. Got: `' + condition + '`');
1073
1074
  }
1074
1075
 
1075
1076
  //valid = new RegExp(condition.replace(/\//g, '')).test(this.value)
@@ -1883,6 +1884,15 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet) {
1883
1884
  userValidator = gina.forms.validators[v].toString();
1884
1885
  }
1885
1886
 
1887
+ // #M21c — Pattern B eval surface (trust-model invariant)
1888
+ // Load-bearing: user-defined validator function bodies are registered on
1889
+ // `gina.forms.validators` from disk-loaded `bundle/validators/<name>/main.js`
1890
+ // files at framework boot. Trust assumption: the source of `userValidator`
1891
+ // is always disk-sourced at boot — never request-time input (req.*, request.*,
1892
+ // form values, URL params). End-user data MUST NOT reach this eval.
1893
+ // Invariant pinned by test/lib/validator-scs1i.test.js (zero write sites for
1894
+ // `gina.forms.validators` in framework source; zero request-time identifiers
1895
+ // around the userValidator source chain).
1886
1896
  self[el][v] = eval('(' + userValidator + ')\n//# sourceURL='+ v +'.js');
1887
1897
  //self[el][v] = Function('errorMessage', 'errorStack', userValidator);
1888
1898
  }
@@ -2400,7 +2400,8 @@ function ValidatorPlugin(rules, data, formId) {
2400
2400
  if (htmlSuccesEventCallback != null) {
2401
2401
 
2402
2402
  if ( /\((.*)\)/.test(htmlSuccesEventCallback) ) {
2403
- eval(htmlSuccesEventCallback)
2403
+ // #M21a — function-call shape unsupported; register a bare handler on window instead
2404
+ try { console.warn('[gina-form-event] function-call shape no longer supported on data-gina-form-event-on-submit-success — use a bare identifier and register the handler on window: '+ htmlSuccesEventCallback); } catch (e) {}
2404
2405
  } else {
2405
2406
  $form.on('success.hform', window[htmlSuccesEventCallback])
2406
2407
  }
@@ -2409,7 +2410,8 @@ function ValidatorPlugin(rules, data, formId) {
2409
2410
  var htmlErrorEventCallback = $form.target.getAttribute('data-gina-form-event-on-submit-error') || null;
2410
2411
  if (htmlErrorEventCallback != null) {
2411
2412
  if ( /\((.*)\)/.test(htmlErrorEventCallback) ) {
2412
- eval(htmlErrorEventCallback)
2413
+ // #M21a — function-call shape unsupported; register a bare handler on window instead
2414
+ try { console.warn('[gina-form-event] function-call shape no longer supported on data-gina-form-event-on-submit-error — use a bare identifier and register the handler on window: '+ htmlErrorEventCallback); } catch (e) {}
2413
2415
  } else {
2414
2416
  $form.on('error.hform', window[htmlErrorEventCallback])
2415
2417
  }