gina 0.7.4 → 0.7.5

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 (643) hide show
  1. package/CHANGELOG.md +79 -8
  2. package/CONTRIBUTING.md +1 -1
  3. package/INSTALL.md +3 -42
  4. package/README.md +56 -50
  5. package/ROADMAP.md +18 -4
  6. package/bin/cli +13 -6
  7. package/bin/gina +8 -0
  8. package/bin/gina-container +92 -11
  9. package/bin/gina-init +49 -4
  10. package/framework/v0.7.5/VERSION +1 -0
  11. package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/js/gina.js +1062 -139
  12. package/framework/v0.7.5/core/asset/plugin/dist/vendor/gina/js/gina.min.js +744 -0
  13. package/framework/v0.7.5/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
  14. package/framework/v0.7.5/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
  15. package/framework/{v0.7.4 → v0.7.5}/core/config.js +27 -2
  16. package/framework/{v0.7.4 → v0.7.5}/core/connectors/couchbase/index.js +36 -2
  17. package/framework/{v0.7.4 → v0.7.5}/core/connectors/couchbase/lib/connector.v3.js +63 -13
  18. package/framework/{v0.7.4 → v0.7.5}/core/connectors/couchbase/lib/connector.v4.js +56 -11
  19. package/framework/{v0.7.4 → v0.7.5}/core/connectors/duckdb/index.js +10 -5
  20. package/framework/{v0.7.4 → v0.7.5}/core/connectors/duckdb/lib/connector.js +27 -3
  21. package/framework/{v0.7.4 → v0.7.5}/core/connectors/mongodb/index.js +10 -5
  22. package/framework/{v0.7.4 → v0.7.5}/core/connectors/mysql/index.js +10 -5
  23. package/framework/{v0.7.4 → v0.7.5}/core/connectors/postgresql/index.js +10 -5
  24. package/framework/{v0.7.4 → v0.7.5}/core/connectors/scylladb/index.js +10 -5
  25. package/framework/{v0.7.4 → v0.7.5}/core/connectors/scylladb/lib/connector.js +4 -3
  26. package/framework/{v0.7.4 → v0.7.5}/core/connectors/sqlite/index.js +10 -5
  27. package/framework/{v0.7.4 → v0.7.5}/core/connectors/sqlite/lib/connector.js +10 -5
  28. package/framework/{v0.7.4 → v0.7.5}/core/connectors/sqlite/lib/job-store.js +2 -2
  29. package/framework/{v0.7.4 → v0.7.5}/core/connectors/sqlite/lib/kv-store.js +1 -1
  30. package/framework/{v0.7.4 → v0.7.5}/core/controller/controller.js +79 -8
  31. package/framework/{v0.7.4 → v0.7.5}/core/gna.js +11 -3
  32. package/framework/{v0.7.4 → v0.7.5}/core/model/index.js +19 -12
  33. package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/validator/src/form-validator.js +95 -8
  34. package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/validator/src/main.js +574 -64
  35. package/framework/{v0.7.4 → v0.7.5}/core/server.isaac.js +1 -1
  36. package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle/index.js +3 -1
  37. package/framework/{v0.7.4 → v0.7.5}/helpers/context.js +17 -1
  38. package/framework/{v0.7.4 → v0.7.5}/helpers/data/src/main.js +74 -4
  39. package/framework/{v0.7.4 → v0.7.5}/helpers/index.js +7 -1
  40. package/framework/v0.7.5/helpers/json/src/main.js +340 -0
  41. package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/list.js +4 -2
  42. package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/restart.js +2 -1
  43. package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/start.js +52 -4
  44. package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/status.js +2 -1
  45. package/framework/{v0.7.4 → v0.7.5}/lib/cmd/env/add.js +17 -3
  46. package/framework/v0.7.5/lib/cmd/framework/inc/child-failure.js +77 -0
  47. package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/init.js +31 -4
  48. package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/link.js +6 -1
  49. package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/start.js +6 -6
  50. package/framework/{v0.7.4 → v0.7.5}/lib/cmd/helper.js +165 -16
  51. package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/add.js +79 -27
  52. package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/rename.js +1 -1
  53. package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/restore.js +4 -4
  54. package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/status.js +2 -1
  55. package/framework/{v0.7.4 → v0.7.5}/lib/collection/src/main.js +59 -9
  56. package/framework/{v0.7.4 → v0.7.5}/lib/connector-config/src/main.js +52 -1
  57. package/framework/{v0.7.4 → v0.7.5}/lib/model.js +35 -11
  58. package/framework/{v0.7.4 → v0.7.5}/lib/proc.js +95 -31
  59. package/framework/{v0.7.4 → v0.7.5}/lib/routing/src/main.js +260 -54
  60. package/framework/{v0.7.4 → v0.7.5}/lib/swig-resolver/src/main.js +107 -12
  61. package/framework/{v0.7.4 → v0.7.5}/package.json +2 -2
  62. package/gna.js +4 -4
  63. package/llms.txt +35 -28
  64. package/package.json +6 -6
  65. package/schema/connectors.json +3 -3
  66. package/schema/settings.json +3 -3
  67. package/script/post_install.js +36 -9
  68. package/script/pre_install.js +9 -5
  69. package/script/smoke_in_container.js +4 -4
  70. package/types/globals.d.ts +7 -1
  71. package/types/index.d.ts +3 -3
  72. package/framework/v0.7.4/VERSION +0 -1
  73. package/framework/v0.7.4/core/asset/plugin/dist/vendor/gina/js/gina.min.js +0 -736
  74. package/framework/v0.7.4/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
  75. package/framework/v0.7.4/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
  76. package/framework/v0.7.4/helpers/json/src/main.js +0 -187
  77. /package/framework/{v0.7.4 → v0.7.5}/AUTHORS +0 -0
  78. /package/framework/{v0.7.4 → v0.7.5}/LICENSE +0 -0
  79. /package/framework/{v0.7.4 → v0.7.5}/core/asset/html/nolayout.html +0 -0
  80. /package/framework/{v0.7.4 → v0.7.5}/core/asset/html/static.html +0 -0
  81. /package/framework/{v0.7.4 → v0.7.5}/core/asset/img/android-chrome-192x192.png +0 -0
  82. /package/framework/{v0.7.4 → v0.7.5}/core/asset/img/android-chrome-512x512.png +0 -0
  83. /package/framework/{v0.7.4 → v0.7.5}/core/asset/img/apple-touch-icon.png +0 -0
  84. /package/framework/{v0.7.4 → v0.7.5}/core/asset/img/favicon-16x16.png +0 -0
  85. /package/framework/{v0.7.4 → v0.7.5}/core/asset/img/favicon-32x32.png +0 -0
  86. /package/framework/{v0.7.4 → v0.7.5}/core/asset/img/favicon.ico +0 -0
  87. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/README.md +0 -0
  88. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.css +0 -0
  89. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.js +0 -0
  90. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/beemaster/index.html +0 -0
  91. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
  92. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.br +0 -0
  93. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.gz +0 -0
  94. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/html/statusbar.html +0 -0
  95. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.br +0 -0
  96. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.gz +0 -0
  97. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/inspector/have_heart_one-webfont.woff2 +0 -0
  98. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/inspector/index.html +0 -0
  99. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/inspector/inspector.css +0 -0
  100. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/inspector/inspector.js +0 -0
  101. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/inspector/logo.svg +0 -0
  102. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -0
  103. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.br +0 -0
  104. /package/framework/{v0.7.4 → v0.7.5}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.gz +0 -0
  105. /package/framework/{v0.7.4 → v0.7.5}/core/config.requirements-anchor.js +0 -0
  106. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/ai/index.js +0 -0
  107. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/ai/lib/connector.js +0 -0
  108. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/couchbase/lib/connector.js +0 -0
  109. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/couchbase/lib/n1ql.js +0 -0
  110. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/couchbase/lib/session-store.js +0 -0
  111. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
  112. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
  113. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/couchbase/lib/storage-store.js +0 -0
  114. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/mongodb/lib/connector.js +0 -0
  115. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/mongodb/lib/job-store.js +0 -0
  116. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/mongodb/lib/pipeline-loader.js +0 -0
  117. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/mongodb/lib/session-store.js +0 -0
  118. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/mysql/lib/connector.js +0 -0
  119. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/param-redact.js +0 -0
  120. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/postgresql/lib/connector.js +0 -0
  121. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/redis/index.js +0 -0
  122. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/redis/lib/connector.js +0 -0
  123. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/redis/lib/job-store.js +0 -0
  124. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/redis/lib/kv-store.js +0 -0
  125. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/redis/lib/render-cache-store.js +0 -0
  126. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/redis/lib/session-store.js +0 -0
  127. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/scylladb/lib/session-store.js +0 -0
  128. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/settle-once.js +0 -0
  129. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/sql-parser.js +0 -0
  130. /package/framework/{v0.7.4 → v0.7.5}/core/connectors/sqlite/lib/session-store.js +0 -0
  131. /package/framework/{v0.7.4 → v0.7.5}/core/content.encoding +0 -0
  132. /package/framework/{v0.7.4 → v0.7.5}/core/controller/controller.framework.js +0 -0
  133. /package/framework/{v0.7.4 → v0.7.5}/core/controller/controller.render-json.js +0 -0
  134. /package/framework/{v0.7.4 → v0.7.5}/core/controller/controller.render-nunjucks-async.js +0 -0
  135. /package/framework/{v0.7.4 → v0.7.5}/core/controller/controller.render-nunjucks.js +0 -0
  136. /package/framework/{v0.7.4 → v0.7.5}/core/controller/controller.render-stream.js +0 -0
  137. /package/framework/{v0.7.4 → v0.7.5}/core/controller/controller.render-swig-async.js +0 -0
  138. /package/framework/{v0.7.4 → v0.7.5}/core/controller/controller.render-swig.js +0 -0
  139. /package/framework/{v0.7.4 → v0.7.5}/core/controller/controller.render-v1.js +0 -0
  140. /package/framework/{v0.7.4 → v0.7.5}/core/controller/controller.render-xml.js +0 -0
  141. /package/framework/{v0.7.4 → v0.7.5}/core/controller/index.js +0 -0
  142. /package/framework/{v0.7.4 → v0.7.5}/core/controller/inline-script.js +0 -0
  143. /package/framework/{v0.7.4 → v0.7.5}/core/controller/inspector-window-emit.js +0 -0
  144. /package/framework/{v0.7.4 → v0.7.5}/core/controller/preload-hints.js +0 -0
  145. /package/framework/{v0.7.4 → v0.7.5}/core/controller/release-banner.js +0 -0
  146. /package/framework/{v0.7.4 → v0.7.5}/core/dev/index.js +0 -0
  147. /package/framework/{v0.7.4 → v0.7.5}/core/dev/lib/class.js +0 -0
  148. /package/framework/{v0.7.4 → v0.7.5}/core/dev/lib/factory.js +0 -0
  149. /package/framework/{v0.7.4 → v0.7.5}/core/dev/lib/tools.js +0 -0
  150. /package/framework/{v0.7.4 → v0.7.5}/core/locales/README.md +0 -0
  151. /package/framework/{v0.7.4 → v0.7.5}/core/locales/currency.json +0 -0
  152. /package/framework/{v0.7.4 → v0.7.5}/core/locales/dist/language/en.json +0 -0
  153. /package/framework/{v0.7.4 → v0.7.5}/core/locales/dist/language/fr.json +0 -0
  154. /package/framework/{v0.7.4 → v0.7.5}/core/locales/dist/region/en.json +0 -0
  155. /package/framework/{v0.7.4 → v0.7.5}/core/locales/dist/region/fr.json +0 -0
  156. /package/framework/{v0.7.4 → v0.7.5}/core/locales/index.js +0 -0
  157. /package/framework/{v0.7.4 → v0.7.5}/core/mime.types +0 -0
  158. /package/framework/{v0.7.4 → v0.7.5}/core/model/entity.js +0 -0
  159. /package/framework/{v0.7.4 → v0.7.5}/core/model/template/entityFactory.js +0 -0
  160. /package/framework/{v0.7.4 → v0.7.5}/core/model/template/index.js +0 -0
  161. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/README.md +0 -0
  162. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/index.js +0 -0
  163. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/csrf/README.md +0 -0
  164. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/csrf/package.json +0 -0
  165. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/csrf/src/main.js +0 -0
  166. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/README.md +0 -0
  167. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/coep/README.md +0 -0
  168. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/coep/package.json +0 -0
  169. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/coep/src/main.js +0 -0
  170. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/coop/README.md +0 -0
  171. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/coop/package.json +0 -0
  172. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/coop/src/main.js +0 -0
  173. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/corp/README.md +0 -0
  174. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/corp/package.json +0 -0
  175. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/corp/src/main.js +0 -0
  176. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/csp/README.md +0 -0
  177. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/csp/package.json +0 -0
  178. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/csp/src/main.js +0 -0
  179. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/hide-powered-by/README.md +0 -0
  180. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/hide-powered-by/package.json +0 -0
  181. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/hide-powered-by/src/main.js +0 -0
  182. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/hsts/README.md +0 -0
  183. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/hsts/package.json +0 -0
  184. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/hsts/src/main.js +0 -0
  185. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/origin-agent-cluster/README.md +0 -0
  186. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/origin-agent-cluster/package.json +0 -0
  187. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/origin-agent-cluster/src/main.js +0 -0
  188. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/package.json +0 -0
  189. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/referrer-policy/README.md +0 -0
  190. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/referrer-policy/package.json +0 -0
  191. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/referrer-policy/src/main.js +0 -0
  192. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/src/main.js +0 -0
  193. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-content-type-options/README.md +0 -0
  194. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-content-type-options/package.json +0 -0
  195. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-content-type-options/src/main.js +0 -0
  196. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-dns-prefetch-control/README.md +0 -0
  197. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-dns-prefetch-control/package.json +0 -0
  198. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-dns-prefetch-control/src/main.js +0 -0
  199. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-download-options/README.md +0 -0
  200. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-download-options/package.json +0 -0
  201. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-download-options/src/main.js +0 -0
  202. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-frame-options/README.md +0 -0
  203. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-frame-options/package.json +0 -0
  204. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-frame-options/src/main.js +0 -0
  205. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/README.md +0 -0
  206. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/package.json +0 -0
  207. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/src/main.js +0 -0
  208. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-xss-protection/README.md +0 -0
  209. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-xss-protection/package.json +0 -0
  210. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/security-headers/x-xss-protection/src/main.js +0 -0
  211. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/session/README.md +0 -0
  212. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/session/package.json +0 -0
  213. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/session/src/main.js +0 -0
  214. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/storage/README.md +0 -0
  215. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/storage/build.json +0 -0
  216. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/storage/package.json +0 -0
  217. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/storage/src/main.js +0 -0
  218. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/validator/README.md +0 -0
  219. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/validator/build.json +0 -0
  220. /package/framework/{v0.7.4 → v0.7.5}/core/plugins/lib/validator/package.json +0 -0
  221. /package/framework/{v0.7.4 → v0.7.5}/core/router.js +0 -0
  222. /package/framework/{v0.7.4 → v0.7.5}/core/server.express.js +0 -0
  223. /package/framework/{v0.7.4 → v0.7.5}/core/server.isaac.rapid-reset.js +0 -0
  224. /package/framework/{v0.7.4 → v0.7.5}/core/server.js +0 -0
  225. /package/framework/{v0.7.4 → v0.7.5}/core/server.route-candidates.js +0 -0
  226. /package/framework/{v0.7.4 → v0.7.5}/core/status.codes +0 -0
  227. /package/framework/{v0.7.4 → v0.7.5}/core/template/_gitignore +0 -0
  228. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle/config/app.json +0 -0
  229. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle/config/connectors.json +0 -0
  230. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle/config/routing.json +0 -0
  231. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle/config/settings.json +0 -0
  232. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
  233. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle/config/templates.json +0 -0
  234. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle/config/watchers.json +0 -0
  235. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
  236. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
  237. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle/controllers/setup.js +0 -0
  238. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle/locales/en.json +0 -0
  239. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
  240. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_public/css/default.css +0 -0
  241. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_public/css/home.css +0 -0
  242. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
  243. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
  244. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_public/js/components/x-checklist.js +0 -0
  245. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
  246. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_public/manifest.webmanifest +0 -0
  247. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_public/readme.md +0 -0
  248. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_public/sw.js +0 -0
  249. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
  250. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
  251. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
  252. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
  253. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_templates/html/includes/x-checklist.html +0 -0
  254. /package/framework/{v0.7.4 → v0.7.5}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
  255. /package/framework/{v0.7.4 → v0.7.5}/core/template/command/gina.bat.tpl +0 -0
  256. /package/framework/{v0.7.4 → v0.7.5}/core/template/command/gina.tpl +0 -0
  257. /package/framework/{v0.7.4 → v0.7.5}/core/template/conf/env.json +0 -0
  258. /package/framework/{v0.7.4 → v0.7.5}/core/template/conf/manifest.json +0 -0
  259. /package/framework/{v0.7.4 → v0.7.5}/core/template/conf/package.json +0 -0
  260. /package/framework/{v0.7.4 → v0.7.5}/core/template/conf/settings.json +0 -0
  261. /package/framework/{v0.7.4 → v0.7.5}/core/template/conf/statics.json +0 -0
  262. /package/framework/{v0.7.4 → v0.7.5}/core/template/conf/templates.json +0 -0
  263. /package/framework/{v0.7.4 → v0.7.5}/core/template/error/client/json/401.json +0 -0
  264. /package/framework/{v0.7.4 → v0.7.5}/core/template/error/client/json/403.json +0 -0
  265. /package/framework/{v0.7.4 → v0.7.5}/core/template/error/client/json/404.json +0 -0
  266. /package/framework/{v0.7.4 → v0.7.5}/core/template/error/server/html/50x.html +0 -0
  267. /package/framework/{v0.7.4 → v0.7.5}/core/template/error/server/json/500.json +0 -0
  268. /package/framework/{v0.7.4 → v0.7.5}/core/template/error/server/json/503.json +0 -0
  269. /package/framework/{v0.7.4 → v0.7.5}/core/template/extensions/logger/config.json +0 -0
  270. /package/framework/{v0.7.4 → v0.7.5}/helpers/console.js +0 -0
  271. /package/framework/{v0.7.4 → v0.7.5}/helpers/data/LICENSE +0 -0
  272. /package/framework/{v0.7.4 → v0.7.5}/helpers/data/README.md +0 -0
  273. /package/framework/{v0.7.4 → v0.7.5}/helpers/data/package.json +0 -0
  274. /package/framework/{v0.7.4 → v0.7.5}/helpers/dateFormat.js +0 -0
  275. /package/framework/{v0.7.4 → v0.7.5}/helpers/json/LICENSE +0 -0
  276. /package/framework/{v0.7.4 → v0.7.5}/helpers/json/README.md +0 -0
  277. /package/framework/{v0.7.4 → v0.7.5}/helpers/json/package.json +0 -0
  278. /package/framework/{v0.7.4 → v0.7.5}/helpers/path.js +0 -0
  279. /package/framework/{v0.7.4 → v0.7.5}/helpers/plugins/README.md +0 -0
  280. /package/framework/{v0.7.4 → v0.7.5}/helpers/plugins/package.json +0 -0
  281. /package/framework/{v0.7.4 → v0.7.5}/helpers/plugins/src/api-error.js +0 -0
  282. /package/framework/{v0.7.4 → v0.7.5}/helpers/plugins/src/main.js +0 -0
  283. /package/framework/{v0.7.4 → v0.7.5}/helpers/prototypes.js +0 -0
  284. /package/framework/{v0.7.4 → v0.7.5}/helpers/task.js +0 -0
  285. /package/framework/{v0.7.4 → v0.7.5}/helpers/text.js +0 -0
  286. /package/framework/{v0.7.4 → v0.7.5}/lib/admin/package.json +0 -0
  287. /package/framework/{v0.7.4 → v0.7.5}/lib/admin/src/main.js +0 -0
  288. /package/framework/{v0.7.4 → v0.7.5}/lib/archiver/README.md +0 -0
  289. /package/framework/{v0.7.4 → v0.7.5}/lib/archiver/build.json +0 -0
  290. /package/framework/{v0.7.4 → v0.7.5}/lib/archiver/package.json +0 -0
  291. /package/framework/{v0.7.4 → v0.7.5}/lib/archiver/src/dep/jszip.min.js +0 -0
  292. /package/framework/{v0.7.4 → v0.7.5}/lib/archiver/src/main.js +0 -0
  293. /package/framework/{v0.7.4 → v0.7.5}/lib/async/package.json +0 -0
  294. /package/framework/{v0.7.4 → v0.7.5}/lib/async/src/main.js +0 -0
  295. /package/framework/{v0.7.4 → v0.7.5}/lib/audit/package.json +0 -0
  296. /package/framework/{v0.7.4 → v0.7.5}/lib/audit/src/main.js +0 -0
  297. /package/framework/{v0.7.4 → v0.7.5}/lib/audit-store.js +0 -0
  298. /package/framework/{v0.7.4 → v0.7.5}/lib/authn/package.json +0 -0
  299. /package/framework/{v0.7.4 → v0.7.5}/lib/authn/src/lockout.js +0 -0
  300. /package/framework/{v0.7.4 → v0.7.5}/lib/authn/src/main.js +0 -0
  301. /package/framework/{v0.7.4 → v0.7.5}/lib/authn/src/totp.js +0 -0
  302. /package/framework/{v0.7.4 → v0.7.5}/lib/authz-gate/package.json +0 -0
  303. /package/framework/{v0.7.4 → v0.7.5}/lib/authz-gate/src/main.js +0 -0
  304. /package/framework/{v0.7.4 → v0.7.5}/lib/cache/README.md +0 -0
  305. /package/framework/{v0.7.4 → v0.7.5}/lib/cache/build.json +0 -0
  306. /package/framework/{v0.7.4 → v0.7.5}/lib/cache/package.json +0 -0
  307. /package/framework/{v0.7.4 → v0.7.5}/lib/cache/src/main.js +0 -0
  308. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/aliases.json +0 -0
  309. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/audit/arguments.json +0 -0
  310. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/audit/help.txt +0 -0
  311. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/audit/verify.js +0 -0
  312. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/add.js +0 -0
  313. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/arguments.json +0 -0
  314. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/build.js +0 -0
  315. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/copy.js +0 -0
  316. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/cp.js +0 -0
  317. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/help.js +0 -0
  318. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/help.txt +0 -0
  319. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/inc/boot-lines.js +0 -0
  320. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/inc/name-rewrite.js +0 -0
  321. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/inc/name.js +0 -0
  322. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/inc/start-status.js +0 -0
  323. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/man.js +0 -0
  324. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/mcp-start.js +0 -0
  325. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/mcp.js +0 -0
  326. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/oas.js +0 -0
  327. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/openapi.js +0 -0
  328. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/remove.js +0 -0
  329. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/rename.js +0 -0
  330. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/rm.js +0 -0
  331. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/stop.js +0 -0
  332. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/bundle/types.js +0 -0
  333. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/cache/arguments.json +0 -0
  334. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/cache/clear.js +0 -0
  335. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/cache/help.txt +0 -0
  336. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/cache/stats.js +0 -0
  337. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/connector/add.js +0 -0
  338. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/connector/arguments.json +0 -0
  339. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/connector/help.js +0 -0
  340. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/connector/help.txt +0 -0
  341. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/connector/infer.js +0 -0
  342. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/connector/list.js +0 -0
  343. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/connector/migrate.js +0 -0
  344. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/connector/models.js +0 -0
  345. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/connector/remove.js +0 -0
  346. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/connector/rm.js +0 -0
  347. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/connector/test.js +0 -0
  348. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/container/arguments.json +0 -0
  349. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/container/help.js +0 -0
  350. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/container/help.txt +0 -0
  351. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/container/man.js +0 -0
  352. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/container/ps.js +0 -0
  353. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/container/stop.js +0 -0
  354. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/controller/add.js +0 -0
  355. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/controller/arguments.json +0 -0
  356. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/controller/help.txt +0 -0
  357. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/controller/inc/args.js +0 -0
  358. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/controller/inc/namespace.js +0 -0
  359. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/controller/inc/reference-rewrite.js +0 -0
  360. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/controller/inc/reference-scan.js +0 -0
  361. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/controller/inc/scaffold.js +0 -0
  362. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/controller/remove.js +0 -0
  363. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/controller/rename.js +0 -0
  364. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/controller/rm.js +0 -0
  365. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/env/get.js +0 -0
  366. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/env/help.js +0 -0
  367. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/env/help.txt +0 -0
  368. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/env/inc/name.js +0 -0
  369. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/env/link-dev.js +0 -0
  370. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/env/list.js +0 -0
  371. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/env/remove.js +0 -0
  372. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/env/rm.js +0 -0
  373. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/env/set.js +0 -0
  374. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/env/unset.js +0 -0
  375. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/env/use.js +0 -0
  376. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/add.js +0 -0
  377. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/arguments.json +0 -0
  378. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/build.js +0 -0
  379. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/dot.js +0 -0
  380. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/get.js +0 -0
  381. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/help.js +0 -0
  382. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/help.txt +0 -0
  383. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/inc/listen-error.js +0 -0
  384. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/inc/ps-titles.js +0 -0
  385. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/link-node-modules.js +0 -0
  386. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/list.js +0 -0
  387. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/man.js +0 -0
  388. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/msg.json +0 -0
  389. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/open.js +0 -0
  390. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/remove.js +0 -0
  391. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/reset.js +0 -0
  392. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/restart.js +0 -0
  393. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/set.js +0 -0
  394. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/status.js +0 -0
  395. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/stop.js +0 -0
  396. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/tail.js +0 -0
  397. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/update.js +0 -0
  398. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/framework/version.js +0 -0
  399. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/gina-dev.1.md +0 -0
  400. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/gina-framework.1.md +0 -0
  401. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/gina.1.md +0 -0
  402. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/i18n/add.js +0 -0
  403. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/i18n/arguments.json +0 -0
  404. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/i18n/export.js +0 -0
  405. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/i18n/help.js +0 -0
  406. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/i18n/help.txt +0 -0
  407. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/i18n/import.js +0 -0
  408. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/i18n/scan.js +0 -0
  409. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/image/_host.js +0 -0
  410. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/image/arguments.json +0 -0
  411. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/image/build.js +0 -0
  412. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/image/help.js +0 -0
  413. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/image/help.txt +0 -0
  414. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/image/list.js +0 -0
  415. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/image/man.js +0 -0
  416. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/image/rm.js +0 -0
  417. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/image/run.js +0 -0
  418. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/index.js +0 -0
  419. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/inspector/help.js +0 -0
  420. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/inspector/help.txt +0 -0
  421. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/inspector/open.js +0 -0
  422. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/man-render.js +0 -0
  423. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/minion/arguments.json +0 -0
  424. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/minion/help.js +0 -0
  425. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/minion/help.txt +0 -0
  426. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/minion/kill.js +0 -0
  427. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/minion/list.js +0 -0
  428. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/msg.json +0 -0
  429. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/port/help.js +0 -0
  430. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/port/help.txt +0 -0
  431. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/port/inc/scan.js +0 -0
  432. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/port/list.js +0 -0
  433. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/port/reset.js +0 -0
  434. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/port/set.js +0 -0
  435. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/arguments.json +0 -0
  436. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/backup.js +0 -0
  437. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/build.js +0 -0
  438. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/help.js +0 -0
  439. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/help.txt +0 -0
  440. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/import.js +0 -0
  441. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/inc/name.js +0 -0
  442. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/list.js +0 -0
  443. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/man.js +0 -0
  444. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/move.js +0 -0
  445. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/remove.js +0 -0
  446. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/restart.js +0 -0
  447. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/rm.js +0 -0
  448. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/start.js +0 -0
  449. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/project/stop.js +0 -0
  450. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/protocol/arguments.json +0 -0
  451. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/protocol/help.js +0 -0
  452. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/protocol/help.txt +0 -0
  453. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/protocol/list.js +0 -0
  454. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/protocol/remove.js +0 -0
  455. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/protocol/set.js +0 -0
  456. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/scope/add.js +0 -0
  457. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/scope/help.js +0 -0
  458. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/scope/help.txt +0 -0
  459. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/scope/inc/name.js +0 -0
  460. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/scope/link-local.js +0 -0
  461. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/scope/link-production.js +0 -0
  462. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/scope/list.js +0 -0
  463. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/scope/remove.js +0 -0
  464. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/scope/rm.js +0 -0
  465. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/scope/use.js +0 -0
  466. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/secrets/arguments.json +0 -0
  467. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/secrets/check.js +0 -0
  468. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/secrets/help.js +0 -0
  469. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/secrets/help.txt +0 -0
  470. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/secrets/scan.js +0 -0
  471. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/service/help.js +0 -0
  472. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/service/help.txt +0 -0
  473. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/service/list.js +0 -0
  474. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/service/man.js +0 -0
  475. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/service/start.js +0 -0
  476. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/storage/arguments.json +0 -0
  477. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/storage/gc.js +0 -0
  478. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/storage/help.txt +0 -0
  479. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/storage/stats.js +0 -0
  480. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/storage/verify.js +0 -0
  481. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd/view/add.js +0 -0
  482. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd-status-format/package.json +0 -0
  483. /package/framework/{v0.7.4 → v0.7.5}/lib/cmd-status-format/src/main.js +0 -0
  484. /package/framework/{v0.7.4 → v0.7.5}/lib/collection/README.md +0 -0
  485. /package/framework/{v0.7.4 → v0.7.5}/lib/collection/build.json +0 -0
  486. /package/framework/{v0.7.4 → v0.7.5}/lib/collection/package.json +0 -0
  487. /package/framework/{v0.7.4 → v0.7.5}/lib/conf-view/package.json +0 -0
  488. /package/framework/{v0.7.4 → v0.7.5}/lib/conf-view/src/main.js +0 -0
  489. /package/framework/{v0.7.4 → v0.7.5}/lib/config.js +0 -0
  490. /package/framework/{v0.7.4 → v0.7.5}/lib/connector-config/package.json +0 -0
  491. /package/framework/{v0.7.4 → v0.7.5}/lib/connector-error/package.json +0 -0
  492. /package/framework/{v0.7.4 → v0.7.5}/lib/connector-error/src/main.js +0 -0
  493. /package/framework/{v0.7.4 → v0.7.5}/lib/connector-registry/package.json +0 -0
  494. /package/framework/{v0.7.4 → v0.7.5}/lib/connector-registry/src/main.js +0 -0
  495. /package/framework/{v0.7.4 → v0.7.5}/lib/cron/README.md +0 -0
  496. /package/framework/{v0.7.4 → v0.7.5}/lib/cron/package.json +0 -0
  497. /package/framework/{v0.7.4 → v0.7.5}/lib/cron/src/main.js +0 -0
  498. /package/framework/{v0.7.4 → v0.7.5}/lib/domain/LICENSE +0 -0
  499. /package/framework/{v0.7.4 → v0.7.5}/lib/domain/README.md +0 -0
  500. /package/framework/{v0.7.4 → v0.7.5}/lib/domain/package.json +0 -0
  501. /package/framework/{v0.7.4 → v0.7.5}/lib/domain/src/main.js +0 -0
  502. /package/framework/{v0.7.4 → v0.7.5}/lib/dto/package.json +0 -0
  503. /package/framework/{v0.7.4 → v0.7.5}/lib/dto/src/main.js +0 -0
  504. /package/framework/{v0.7.4 → v0.7.5}/lib/dto-pipe/package.json +0 -0
  505. /package/framework/{v0.7.4 → v0.7.5}/lib/dto-pipe/src/main.js +0 -0
  506. /package/framework/{v0.7.4 → v0.7.5}/lib/dto-types/package.json +0 -0
  507. /package/framework/{v0.7.4 → v0.7.5}/lib/dto-types/src/main.js +0 -0
  508. /package/framework/{v0.7.4 → v0.7.5}/lib/duration/package.json +0 -0
  509. /package/framework/{v0.7.4 → v0.7.5}/lib/duration/src/main.js +0 -0
  510. /package/framework/{v0.7.4 → v0.7.5}/lib/error-ref/package.json +0 -0
  511. /package/framework/{v0.7.4 → v0.7.5}/lib/error-ref/src/main.js +0 -0
  512. /package/framework/{v0.7.4 → v0.7.5}/lib/generator/index.js +0 -0
  513. /package/framework/{v0.7.4 → v0.7.5}/lib/i18n/package.json +0 -0
  514. /package/framework/{v0.7.4 → v0.7.5}/lib/i18n/src/main.js +0 -0
  515. /package/framework/{v0.7.4 → v0.7.5}/lib/idempotency/package.json +0 -0
  516. /package/framework/{v0.7.4 → v0.7.5}/lib/idempotency/src/main.js +0 -0
  517. /package/framework/{v0.7.4 → v0.7.5}/lib/image-build/package.json +0 -0
  518. /package/framework/{v0.7.4 → v0.7.5}/lib/image-build/src/main.js +0 -0
  519. /package/framework/{v0.7.4 → v0.7.5}/lib/index.js +0 -0
  520. /package/framework/{v0.7.4 → v0.7.5}/lib/inherits/LICENSE +0 -0
  521. /package/framework/{v0.7.4 → v0.7.5}/lib/inherits/README.md +0 -0
  522. /package/framework/{v0.7.4 → v0.7.5}/lib/inherits/package.json +0 -0
  523. /package/framework/{v0.7.4 → v0.7.5}/lib/inherits/src/main.js +0 -0
  524. /package/framework/{v0.7.4 → v0.7.5}/lib/inspector-events/package.json +0 -0
  525. /package/framework/{v0.7.4 → v0.7.5}/lib/inspector-events/src/main.js +0 -0
  526. /package/framework/{v0.7.4 → v0.7.5}/lib/inspector-redact/package.json +0 -0
  527. /package/framework/{v0.7.4 → v0.7.5}/lib/inspector-redact/src/main.js +0 -0
  528. /package/framework/{v0.7.4 → v0.7.5}/lib/instrument/package.json +0 -0
  529. /package/framework/{v0.7.4 → v0.7.5}/lib/instrument/src/main.js +0 -0
  530. /package/framework/{v0.7.4 → v0.7.5}/lib/job/package.json +0 -0
  531. /package/framework/{v0.7.4 → v0.7.5}/lib/job/src/main.js +0 -0
  532. /package/framework/{v0.7.4 → v0.7.5}/lib/job-store.js +0 -0
  533. /package/framework/{v0.7.4 → v0.7.5}/lib/json-config-header/package.json +0 -0
  534. /package/framework/{v0.7.4 → v0.7.5}/lib/json-config-header/src/main.js +0 -0
  535. /package/framework/{v0.7.4 → v0.7.5}/lib/kv/package.json +0 -0
  536. /package/framework/{v0.7.4 → v0.7.5}/lib/kv/src/main.js +0 -0
  537. /package/framework/{v0.7.4 → v0.7.5}/lib/kv-store.js +0 -0
  538. /package/framework/{v0.7.4 → v0.7.5}/lib/lane/package.json +0 -0
  539. /package/framework/{v0.7.4 → v0.7.5}/lib/lane/src/main.js +0 -0
  540. /package/framework/{v0.7.4 → v0.7.5}/lib/loading-state/package.json +0 -0
  541. /package/framework/{v0.7.4 → v0.7.5}/lib/loading-state/src/main.js +0 -0
  542. /package/framework/{v0.7.4 → v0.7.5}/lib/logger/README.md +0 -0
  543. /package/framework/{v0.7.4 → v0.7.5}/lib/logger/package.json +0 -0
  544. /package/framework/{v0.7.4 → v0.7.5}/lib/logger/src/containers/default/index.js +0 -0
  545. /package/framework/{v0.7.4 → v0.7.5}/lib/logger/src/containers/file/index.js +0 -0
  546. /package/framework/{v0.7.4 → v0.7.5}/lib/logger/src/containers/mq/index.js +0 -0
  547. /package/framework/{v0.7.4 → v0.7.5}/lib/logger/src/containers/mq/listener.js +0 -0
  548. /package/framework/{v0.7.4 → v0.7.5}/lib/logger/src/containers/mq/speaker.js +0 -0
  549. /package/framework/{v0.7.4 → v0.7.5}/lib/logger/src/helper.js +0 -0
  550. /package/framework/{v0.7.4 → v0.7.5}/lib/logger/src/main.js +0 -0
  551. /package/framework/{v0.7.4 → v0.7.5}/lib/logger/src/redact.js +0 -0
  552. /package/framework/{v0.7.4 → v0.7.5}/lib/maintenance/package.json +0 -0
  553. /package/framework/{v0.7.4 → v0.7.5}/lib/maintenance/src/main.js +0 -0
  554. /package/framework/{v0.7.4 → v0.7.5}/lib/math/index.js +0 -0
  555. /package/framework/{v0.7.4 → v0.7.5}/lib/mcp-dispatch/package.json +0 -0
  556. /package/framework/{v0.7.4 → v0.7.5}/lib/mcp-dispatch/src/main.js +0 -0
  557. /package/framework/{v0.7.4 → v0.7.5}/lib/mcp-http/package.json +0 -0
  558. /package/framework/{v0.7.4 → v0.7.5}/lib/mcp-http/src/main.js +0 -0
  559. /package/framework/{v0.7.4 → v0.7.5}/lib/mcp-server/package.json +0 -0
  560. /package/framework/{v0.7.4 → v0.7.5}/lib/mcp-server/src/main.js +0 -0
  561. /package/framework/{v0.7.4 → v0.7.5}/lib/merge/README.md +0 -0
  562. /package/framework/{v0.7.4 → v0.7.5}/lib/merge/package.json +0 -0
  563. /package/framework/{v0.7.4 → v0.7.5}/lib/merge/src/main.js +0 -0
  564. /package/framework/{v0.7.4 → v0.7.5}/lib/message-validator/package.json +0 -0
  565. /package/framework/{v0.7.4 → v0.7.5}/lib/message-validator/src/main.js +0 -0
  566. /package/framework/{v0.7.4 → v0.7.5}/lib/metrics/package.json +0 -0
  567. /package/framework/{v0.7.4 → v0.7.5}/lib/metrics/src/main.js +0 -0
  568. /package/framework/{v0.7.4 → v0.7.5}/lib/money/package.json +0 -0
  569. /package/framework/{v0.7.4 → v0.7.5}/lib/money/src/main.js +0 -0
  570. /package/framework/{v0.7.4 → v0.7.5}/lib/multipart/package.json +0 -0
  571. /package/framework/{v0.7.4 → v0.7.5}/lib/multipart/src/main.js +0 -0
  572. /package/framework/{v0.7.4 → v0.7.5}/lib/net-locality/package.json +0 -0
  573. /package/framework/{v0.7.4 → v0.7.5}/lib/net-locality/src/main.js +0 -0
  574. /package/framework/{v0.7.4 → v0.7.5}/lib/nunjucks-filters/README.md +0 -0
  575. /package/framework/{v0.7.4 → v0.7.5}/lib/nunjucks-filters/package.json +0 -0
  576. /package/framework/{v0.7.4 → v0.7.5}/lib/nunjucks-filters/src/main.js +0 -0
  577. /package/framework/{v0.7.4 → v0.7.5}/lib/nunjucks-resolver/package.json +0 -0
  578. /package/framework/{v0.7.4 → v0.7.5}/lib/nunjucks-resolver/src/main.js +0 -0
  579. /package/framework/{v0.7.4 → v0.7.5}/lib/priority/package.json +0 -0
  580. /package/framework/{v0.7.4 → v0.7.5}/lib/priority/src/main.js +0 -0
  581. /package/framework/{v0.7.4 → v0.7.5}/lib/push/package.json +0 -0
  582. /package/framework/{v0.7.4 → v0.7.5}/lib/push/src/main.js +0 -0
  583. /package/framework/{v0.7.4 → v0.7.5}/lib/rate-limit/package.json +0 -0
  584. /package/framework/{v0.7.4 → v0.7.5}/lib/rate-limit/src/main.js +0 -0
  585. /package/framework/{v0.7.4 → v0.7.5}/lib/release-watch/package.json +0 -0
  586. /package/framework/{v0.7.4 → v0.7.5}/lib/release-watch/src/main.js +0 -0
  587. /package/framework/{v0.7.4 → v0.7.5}/lib/render-cache/package.json +0 -0
  588. /package/framework/{v0.7.4 → v0.7.5}/lib/render-cache/src/main.js +0 -0
  589. /package/framework/{v0.7.4 → v0.7.5}/lib/render-cache-store.js +0 -0
  590. /package/framework/{v0.7.4 → v0.7.5}/lib/routing/README.md +0 -0
  591. /package/framework/{v0.7.4 → v0.7.5}/lib/routing/build.json +0 -0
  592. /package/framework/{v0.7.4 → v0.7.5}/lib/routing/package.json +0 -0
  593. /package/framework/{v0.7.4 → v0.7.5}/lib/routing-introspect/package.json +0 -0
  594. /package/framework/{v0.7.4 → v0.7.5}/lib/routing-introspect/src/main.js +0 -0
  595. /package/framework/{v0.7.4 → v0.7.5}/lib/secrets/package.json +0 -0
  596. /package/framework/{v0.7.4 → v0.7.5}/lib/secrets/src/backends/env.js +0 -0
  597. /package/framework/{v0.7.4 → v0.7.5}/lib/secrets/src/backends/exec.js +0 -0
  598. /package/framework/{v0.7.4 → v0.7.5}/lib/secrets/src/backends/file.js +0 -0
  599. /package/framework/{v0.7.4 → v0.7.5}/lib/secrets/src/declaration.js +0 -0
  600. /package/framework/{v0.7.4 → v0.7.5}/lib/secrets/src/env-file.js +0 -0
  601. /package/framework/{v0.7.4 → v0.7.5}/lib/secrets/src/main.js +0 -0
  602. /package/framework/{v0.7.4 → v0.7.5}/lib/secrets/src/sources.js +0 -0
  603. /package/framework/{v0.7.4 → v0.7.5}/lib/security-headers-emitter/package.json +0 -0
  604. /package/framework/{v0.7.4 → v0.7.5}/lib/security-headers-emitter/src/main.js +0 -0
  605. /package/framework/{v0.7.4 → v0.7.5}/lib/session-lifetime/package.json +0 -0
  606. /package/framework/{v0.7.4 → v0.7.5}/lib/session-lifetime/src/main.js +0 -0
  607. /package/framework/{v0.7.4 → v0.7.5}/lib/session-store.js +0 -0
  608. /package/framework/{v0.7.4 → v0.7.5}/lib/shell.js +0 -0
  609. /package/framework/{v0.7.4 → v0.7.5}/lib/sqlite-driver.js +0 -0
  610. /package/framework/{v0.7.4 → v0.7.5}/lib/sri/package.json +0 -0
  611. /package/framework/{v0.7.4 → v0.7.5}/lib/sri/src/main.js +0 -0
  612. /package/framework/{v0.7.4 → v0.7.5}/lib/state.js +0 -0
  613. /package/framework/{v0.7.4 → v0.7.5}/lib/storage/package.json +0 -0
  614. /package/framework/{v0.7.4 → v0.7.5}/lib/storage/src/local-cas.js +0 -0
  615. /package/framework/{v0.7.4 → v0.7.5}/lib/storage/src/local-stream.js +0 -0
  616. /package/framework/{v0.7.4 → v0.7.5}/lib/storage/src/local.js +0 -0
  617. /package/framework/{v0.7.4 → v0.7.5}/lib/storage/src/main.js +0 -0
  618. /package/framework/{v0.7.4 → v0.7.5}/lib/storage/src/meta-store.js +0 -0
  619. /package/framework/{v0.7.4 → v0.7.5}/lib/storage/src/s3.js +0 -0
  620. /package/framework/{v0.7.4 → v0.7.5}/lib/storage/src/util.js +0 -0
  621. /package/framework/{v0.7.4 → v0.7.5}/lib/storage-store.js +0 -0
  622. /package/framework/{v0.7.4 → v0.7.5}/lib/swig-filters/README.md +0 -0
  623. /package/framework/{v0.7.4 → v0.7.5}/lib/swig-filters/package.json +0 -0
  624. /package/framework/{v0.7.4 → v0.7.5}/lib/swig-filters/src/main.js +0 -0
  625. /package/framework/{v0.7.4 → v0.7.5}/lib/swig-resolver/package.json +0 -0
  626. /package/framework/{v0.7.4 → v0.7.5}/lib/template-loaders/package.json +0 -0
  627. /package/framework/{v0.7.4 → v0.7.5}/lib/template-loaders/src/loaders/http.js +0 -0
  628. /package/framework/{v0.7.4 → v0.7.5}/lib/template-loaders/src/loaders/memory.js +0 -0
  629. /package/framework/{v0.7.4 → v0.7.5}/lib/template-loaders/src/main.js +0 -0
  630. /package/framework/{v0.7.4 → v0.7.5}/lib/url/README.md +0 -0
  631. /package/framework/{v0.7.4 → v0.7.5}/lib/url/index.js +0 -0
  632. /package/framework/{v0.7.4 → v0.7.5}/lib/url/routing.json +0 -0
  633. /package/framework/{v0.7.4 → v0.7.5}/lib/uuid/package.json +0 -0
  634. /package/framework/{v0.7.4 → v0.7.5}/lib/uuid/src/main.js +0 -0
  635. /package/framework/{v0.7.4 → v0.7.5}/lib/validator.js +0 -0
  636. /package/framework/{v0.7.4 → v0.7.5}/lib/watcher/package.json +0 -0
  637. /package/framework/{v0.7.4 → v0.7.5}/lib/watcher/src/main.js +0 -0
  638. /package/framework/{v0.7.4 → v0.7.5}/lib/ws-framing/package.json +0 -0
  639. /package/framework/{v0.7.4 → v0.7.5}/lib/ws-framing/src/main.js +0 -0
  640. /package/framework/{v0.7.4 → v0.7.5}/lib/ws-query/package.json +0 -0
  641. /package/framework/{v0.7.4 → v0.7.5}/lib/ws-query/src/main.js +0 -0
  642. /package/framework/{v0.7.4 → v0.7.5}/lib/ws-session/package.json +0 -0
  643. /package/framework/{v0.7.4 → v0.7.5}/lib/ws-session/src/main.js +0 -0
@@ -3712,6 +3712,19 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet, culture) {
3712
3712
  };
3713
3713
 
3714
3714
  // TODO - One method for the front, and one for the server
3715
+ /**
3716
+ * queryFromFrontend — the browser side of the `query` rule: asks the rule's endpoint for a
3717
+ * verdict over XMLHttpRequest and settles the field through `asyncCompleted.<id>`.
3718
+ * A GET, HEAD or DELETE sends the rule's `data` in the url's query string, with no body
3719
+ * (#B951): each key once, an object value as its JSON text, joined with `&` to a query
3720
+ * string the url already holds, and a key that query string holds is not sent again. A POST,
3721
+ * PUT or PATCH sends `data` as a JSON body.
3722
+ *
3723
+ * @inner
3724
+ * @param {object} options - the rule's options (`url`, `method`, `data`, `validIf`, `headers`, …)
3725
+ * @param {string} [errorMessage] - the rule's error message
3726
+ * @returns {object|undefined} the field (`self[name]`) when a known verdict answers at once; nothing when the request goes out
3727
+ */
3715
3728
  var queryFromFrontend = function(options, errorMessage) {
3716
3729
  var errors = self[this['name']]['errors'] || {};
3717
3730
  var id = this.target.id || this.target.getAttribute('id');
@@ -3926,6 +3939,60 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet, culture) {
3926
3939
  }
3927
3940
  }
3928
3941
 
3942
+ // #B951 — a GET, HEAD or DELETE rule carries its data in the query string. The data went
3943
+ // to xhr.send() only, which a browser drops for a GET or HEAD (the XHR standard), and a
3944
+ // gina receiver reads a DELETE's data from the query string only: such a rule sent none
3945
+ // of its data, GET being the default method. The query string is built the way the server
3946
+ // side's self.query() builds it: each key once, an object value as its JSON text, joined
3947
+ // with `&` to a query string the url already holds, and a key that query string already
3948
+ // holds is not sent again. A POST, PUT or PATCH keeps sending its JSON body.
3949
+ var isBodyLessQuery = !/^(post|put|patch)$/i.test(queryOptions.method || 'GET');
3950
+ if ( isBodyLessQuery && typeof(queryData) == 'string' && queryData != '' ) {
3951
+ var _queryValues = null;
3952
+ try {
3953
+ _queryValues = JSON.parse(queryData);
3954
+ } catch (_queryParseErr) {
3955
+ _queryValues = null;
3956
+ }
3957
+ if ( _queryValues && typeof(_queryValues) == 'object' && !Array.isArray(_queryValues) ) {
3958
+ var _queryUrl = String(queryOptions.url || '');
3959
+ var _queryAt = _queryUrl.indexOf('?');
3960
+ var _queryHeld = Object.create(null);
3961
+ if ( _queryAt > -1 ) {
3962
+ var _heldPairs = _queryUrl.substring(_queryAt + 1).split('&');
3963
+ for (var _hp = 0; _hp < _heldPairs.length; ++_hp) {
3964
+ var _heldKey = _heldPairs[_hp].split('=')[0];
3965
+ if ( !_heldKey ) {
3966
+ continue;
3967
+ }
3968
+ try {
3969
+ _heldKey = decodeURIComponent(_heldKey);
3970
+ } catch (_heldDecodeErr) {
3971
+ // a malformed escape: the key is compared as written
3972
+ }
3973
+ _queryHeld[_heldKey] = true;
3974
+ }
3975
+ }
3976
+ var _encodeValue = ( typeof(encodeRFC5987ValueChars) == 'function' ) ? encodeRFC5987ValueChars : encodeURIComponent;
3977
+ var _queryPairs = [];
3978
+ for (var _qk in _queryValues) {
3979
+ if ( !Object.prototype.hasOwnProperty.call(_queryValues, _qk) || _queryHeld[_qk] === true ) {
3980
+ continue;
3981
+ }
3982
+ var _qv = _queryValues[_qk];
3983
+ if ( _qv !== null && typeof(_qv) == 'object' ) {
3984
+ _qv = JSON.stringify(_qv);
3985
+ }
3986
+ _queryPairs.push(_qk + '=' + _encodeValue(_qv));
3987
+ }
3988
+ if ( _queryPairs.length > 0 ) {
3989
+ queryOptions.url = _queryUrl
3990
+ + ( ( _queryAt > -1 ) ? ( /[?&]$/.test(_queryUrl) ? '' : '&' ) : '?' )
3991
+ + _queryPairs.join('&').replace(/\s/g, '%20');
3992
+ }
3993
+ }
3994
+ }
3995
+
3929
3996
  if ( queryOptions.withCredentials ) {
3930
3997
  if ('withCredentials' in xhr) {
3931
3998
  // XHR for Chrome/Firefox/Opera/Safari.
@@ -4289,7 +4356,9 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet, culture) {
4289
4356
  if ( _this.target && _this.target.dataset ) {
4290
4357
  _this.target.dataset.ginaFormValidatorQueryPending = _this.value;
4291
4358
  }
4292
- if (data) {
4359
+ // #B951 — a GET, HEAD or DELETE carries its data in the url built above, and no body.
4360
+ // was: if (data) {
4361
+ if (data && !isBodyLessQuery) {
4293
4362
  xhr.send( queryData ); // stringyfied
4294
4363
  } else {
4295
4364
  xhr.send();
@@ -4298,15 +4367,18 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet, culture) {
4298
4367
  }
4299
4368
 
4300
4369
  /**
4301
- * queryFromBackend
4302
- *
4370
+ * queryFromBackend — the server side of the `query` rule: calls the rule's route through
4371
+ * `self.query()` from a controller built for the request, and resolves with the endpoint's
4372
+ * answer. A rule aimed at the bundle it runs in — its `name@bundle` names the bundle in
4373
+ * context or the Config instance's — is called on that bundle's own host and port; any other
4374
+ * bundle is reached through app.json's `proxy` entry for it (#B950).
4303
4375
  *
4304
- * @param {object} options
4376
+ * @inner
4377
+ * @param {object} options - the rule's options (`url` as `name@bundle`, `method`, `data`, …)
4305
4378
  * @param {object} request
4306
4379
  * @param {object} response
4307
4380
  * @param {callback} next
4308
- *
4309
- *
4381
+ * @returns {Promise<object>} the endpoint's answer (`{ isValid, … }`), carrying `error` when the call failed
4310
4382
  */
4311
4383
  var queryFromBackend = async function(options, request, response, next) {
4312
4384
  var Config = require(_(GINA_FRAMEWORK_DIR +'/core/config.js', true));
@@ -4317,14 +4389,22 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet, culture) {
4317
4389
  , rule = null
4318
4390
  , bundle = null
4319
4391
  , currentBundle = getContext('bundle')
4392
+ , isSameBundle = false
4320
4393
  ;
4321
4394
  // trying to retrieve proxy conf
4322
4395
  if ( /\@/.test(options.url) ) {
4323
4396
  var attr = options.url.split(/@/);
4324
4397
  rule = attr[0];
4325
4398
  bundle = attr[1];
4399
+ // #B950 — the rule's bundle is this bundle when it names the bundle in context or the
4400
+ // Config instance's own. Under bin/gina-container the Config instance's `bundle` is
4401
+ // undefined while getContext('bundle') names the bundle, so a rule aimed at its own
4402
+ // bundle went to the `proxy` lookup below and answered 500 (« Could not retrieve
4403
+ // `proxy` configuration ») unless app.json gave the bundle a proxy entry for itself.
4404
+ isSameBundle = ( bundle === currentBundle || bundle === config.bundle );
4326
4405
  try {
4327
- if (config.bundle !== bundle) { // ignore if same bundle
4406
+ // was: if (config.bundle !== bundle) { // ignore if same bundle
4407
+ if ( !isSameBundle ) { // ignore if same bundle
4328
4408
  // getting proxy conf when available
4329
4409
  // #B522 — clone. The GLOBAL two-argument getConfig() hands back the
4330
4410
  // bundle's `app` conf BY REFERENCE, so the `opt.method` / `opt.path`
@@ -4364,16 +4444,23 @@ function FormValidatorUtil(data, $fields, xhrOptions, fieldsSet, culture) {
4364
4444
  }
4365
4445
 
4366
4446
  if (!opt) { // setup opt by default if no proxy conf found
4367
- if (config.bundle == bundle) {
4447
+ // #B950 — see isSameBundle above
4448
+ // was: if (config.bundle == bundle) {
4449
+ if ( isSameBundle ) {
4368
4450
  var credentials = getConfig( currentBundle, 'settings' ).server.credentials;
4369
4451
  options.ca = credentials.ca || null;
4370
4452
  options.hostname = conf.server.scheme +'://'+ conf.host;
4453
+ // #B950 — the bare host too: an HTTP/1.1 call connects to `host` (the agent
4454
+ // carries it), so with `hostname` alone, which holds `scheme://host`, the call
4455
+ // looked `http://localhost` up as a host name (ENOTFOUND).
4456
+ options.host = conf.host;
4371
4457
  options.port = conf.port[conf.server.protocol][conf.server.scheme];
4372
4458
  options.protocol = conf.server.protocol;
4373
4459
  options.rejectUnauthorized = false;
4374
4460
  }
4375
4461
  opt = {
4376
4462
  "ca" : options.ca,
4463
+ "host" : options.host,
4377
4464
  "hostname" : options.hostname,
4378
4465
  "port" : options.port,
4379
4466
  "path" : options.path
@@ -7092,7 +7179,13 @@ function Routing() {
7092
7179
  // attaching routing description for this request
7093
7180
  //request.routing = params; // can be retried in controller with: req.routing
7094
7181
  // && replacing placeholders
7095
- request.routing = checkRouteParams(params, request[method]);
7182
+ // #B877 — the route's placeholders take the values the route MATCHED: each URL segment,
7183
+ // and each query key a requirement of the rule validated (`request.params`), over the
7184
+ // request data. Fed the request data alone, a query or body key named like a URL-segment
7185
+ // placeholder replaced that segment in `param.file` after it had passed its requirement.
7186
+ // The #B833 guard in checkRouteParams still checks every value it fills.
7187
+ // was: request.routing = checkRouteParams(params, request[method]);
7188
+ request.routing = checkRouteParams(params, fillValuesOf(request[method], request.params));
7096
7189
  foundRoute.request = request;
7097
7190
  }
7098
7191
 
@@ -7107,7 +7200,9 @@ function Routing() {
7107
7200
  *
7108
7201
  * Before the requirement test, writes `urlVal` in place of the `urlVar` placeholder in
7109
7202
  * `params.param.path`, `.namespace` and `.title`, verbatim: through a function replacer,
7110
- * so `$`-patterns in the value are not expanded (#B688).
7203
+ * so `$`-patterns in the value are not expanded (#B688). A `urlVal` that would escape as a
7204
+ * path component (`_isUnsafePathValue`) is not written into `.path` or `.namespace`: their
7205
+ * placeholder is left for checkRouteParams, whose #B833 guard rejects the value (#B883).
7111
7206
  *
7112
7207
  * @param {string} urlVar - the rule's URL segment, e.g. `:id`
7113
7208
  * @param {string} urlVal - the request's URL segment at the same position
@@ -7155,14 +7250,23 @@ function Routing() {
7155
7250
  // text before the placeholder, `$&` the placeholder, `$'` the text after it, `$$` a `$`):
7156
7251
  // a request to `/user/$%60` turned `"title": "User :id"` into `User User `. The value is
7157
7252
  // now written verbatim, as the URL and `param.file` already were.
7253
+ // #B883 — a value that would escape as a path component (a `..` segment or a leading
7254
+ // separator, `_isUnsafePathValue`) is not written into `param.path` or `param.namespace`
7255
+ // here: the placeholder is left for checkRouteParams, whose #B833 guard rejects the value.
7256
+ // Written here, it reached both fields unchecked, from a URL segment or from a query key
7257
+ // that its requirement folds in as a segment. The value is tested before `regex.test()`:
7258
+ // a passing test moves this `g` regex's `lastIndex` past the match, and a skipped rewrite
7259
+ // would leave it there for the next field's test (only a replace() resets it).
7158
7260
  // if custom path, path rewrite
7159
- if (params.param.path && regex.test(params.param.path)) {
7261
+ // was: if (params.param.path && regex.test(params.param.path)) {
7262
+ if (params.param.path && !_isUnsafePathValue(urlVal) && regex.test(params.param.path)) {
7160
7263
  // was: params.param.path = params.param.path.replace(regex, urlVal);
7161
7264
  params.param.path = params.param.path.replace(regex, function () { return urlVal; });
7162
7265
  }
7163
7266
 
7164
7267
  // if custom namespace, namespace rewrite
7165
- if (params.param.namespace && regex.test(params.param.namespace)) {
7268
+ // was: if (params.param.namespace && regex.test(params.param.namespace)) {
7269
+ if (params.param.namespace && !_isUnsafePathValue(urlVal) && regex.test(params.param.namespace)) {
7166
7270
  // was: params.param.namespace = params.param.namespace.replace(regex, urlVal);
7167
7271
  params.param.namespace = params.param.namespace.replace(regex, function () { return urlVal; });
7168
7272
  }
@@ -7171,13 +7275,17 @@ function Routing() {
7171
7275
  // if (params.param.file && regex.test(params.param.file)) {
7172
7276
  // params.param.file = params.param.file.replace(regex, urlVal);
7173
7277
  // }
7174
- // file is handle like url replacement (path is like pathname)
7175
- if ( typeof(params.param.file) != 'undefined' && /\:/.test(params.param.file)) {
7176
- var _regex = new RegExp('(:'+urlVar+'/|:'+urlVar+'$)', 'g');
7177
- replacement.variable = urlVal;
7178
- params.param.file = params.param.file.replace( _regex, replacement );
7179
- _regex = null;
7180
- }
7278
+ // #B877 — `param.file` is not rewritten here: checkRouteParams fills it once the route has
7279
+ // matched, from the values the route matched (see parseRouting), behind the #B833 guard.
7280
+ // The block below never matched, because `urlVar` already starts with `:` and its pattern
7281
+ // read `::name`; fixing that pattern instead would fill `param.file` before the guard sees
7282
+ // the value.
7283
+ // was: if ( typeof(params.param.file) != 'undefined' && /\:/.test(params.param.file)) {
7284
+ // was: var _regex = new RegExp('(:'+urlVar+'/|:'+urlVar+'$)', 'g');
7285
+ // was: replacement.variable = urlVal;
7286
+ // was: params.param.file = params.param.file.replace( _regex, replacement );
7287
+ // was: _regex = null;
7288
+ // was: }
7181
7289
 
7182
7290
  // if custom title, title rewrite (#B688: a function replacer, as for the path above)
7183
7291
  if (params.param.title && regex.test(params.param.title)) {
@@ -7483,6 +7591,8 @@ function Routing() {
7483
7591
  * separator (an absolute path, which `path.resolve` honours over the root). Developer-authored
7484
7592
  * static prefixes in `param.file` (e.g. `../shared/:template`, reaching a sibling namespace
7485
7593
  * directory) are NOT request values and are never tested here — only the substituted value is.
7594
+ * fitsWithRequirements consults it too, and leaves a flagged URL value out of its early
7595
+ * `param.path` / `param.namespace` rewrite, so the value reaches the guard (#B883).
7486
7596
  *
7487
7597
  * @inner
7488
7598
  * @param {*} value - the request-supplied placeholder value
@@ -7499,6 +7609,40 @@ function Routing() {
7499
7609
  return /(^|[\/\\])\.\.([\/\\]|$)/.test(v) || /^[\/\\]/.test(v);
7500
7610
  };
7501
7611
 
7612
+ /**
7613
+ * #B877 — the values checkRouteParams fills a MATCHED route's placeholders with, on the request
7614
+ * path: the request data (`request[method]`, query and body), overlaid by the values the route
7615
+ * matched (`request.params`: each URL segment, and each query key a requirement of the rule
7616
+ * validated). A query or body key named like a URL-segment placeholder therefore no longer
7617
+ * replaces that segment, and a placeholder the URL does not carry is still filled from the
7618
+ * request data.
7619
+ *
7620
+ * Own keys only, copied as data properties (the rule of the Express adapter's query copy,
7621
+ * #B666), so a key named `__proto__` stays an ordinary property of the copy and never reaches the
7622
+ * prototype setter. An `undefined` value is skipped, so it never hides a defined one. Neither
7623
+ * argument is modified.
7624
+ *
7625
+ * @inner
7626
+ * @param {object} [data] - the request data, `request[method]`
7627
+ * @param {object} [matched] - the values the route matched, `request.params`
7628
+ * @returns {object} a new plain object
7629
+ *
7630
+ * @example
7631
+ * fillValuesOf({ name: 'other', foo: '1' }, { name: 'page' }); // { name: 'page', foo: '1' }
7632
+ * fillValuesOf({ tpl: 'home' }, { 0: '/t' }); // { tpl: 'home', 0: '/t' }
7633
+ */
7634
+ var fillValuesOf = function(data, matched) {
7635
+ var out = {}, sources = [data, matched], s = 0, k = null;
7636
+ for (; s < sources.length; ++s) {
7637
+ if ( !sources[s] || typeof(sources[s]) != 'object' ) continue;
7638
+ for (k in sources[s]) {
7639
+ if ( !hasOwn(sources[s], k) || typeof(sources[s][k]) == 'undefined' ) continue;
7640
+ Object.defineProperty(out, k, { value: sources[s][k], writable: true, enumerable: true, configurable: true });
7641
+ }
7642
+ }
7643
+ return out;
7644
+ };
7645
+
7502
7646
  /**
7503
7647
  * checkRouteParams
7504
7648
  *
@@ -7511,7 +7655,8 @@ function Routing() {
7511
7655
  * @inner
7512
7656
  * @param {object} route - the route to fill: a copy (getRoute clones the rule, the
7513
7657
  * request path clones `param` per request)
7514
- * @param {object} params - placeholder values, keyed by variable name
7658
+ * @param {object} params - placeholder values, keyed by variable name (on the request path:
7659
+ * the request data overlaid by the matched values, see fillValuesOf, #B877)
7515
7660
  * @return {object} route - updated route object
7516
7661
  *
7517
7662
  * @example
@@ -7524,9 +7669,7 @@ function Routing() {
7524
7669
  , urls = null
7525
7670
  , i = null
7526
7671
  , len = null
7527
- , rawRouteUrl = route.url
7528
7672
  , p = null
7529
- , pLen = null
7530
7673
  ;
7531
7674
 
7532
7675
  for (p in route.param) {
@@ -7594,39 +7737,97 @@ function Routing() {
7594
7737
  }
7595
7738
  }
7596
7739
 
7597
- // Selecting url in case of multiple urls & optional requirmements
7598
- if ( urls ) {
7599
- i = 0; len = urls.length;
7600
- var rawUrlVars = null
7601
- , rawUrlScore = null
7602
- , rawUrls = rawRouteUrl.split(/\,/g)
7603
- , pKey = null
7604
- , lastScore = 0
7605
- ;
7606
- route.urlIndex = 0; // by default
7607
- for (; i < len; ++i) {
7608
- rawUrlScore = 0;
7609
- rawUrlVars = rawUrls[0].match(/\:[-_a-z0-9]+/ig);
7610
- if ( !rawUrlVars ) continue;
7611
- p = 0;
7612
- pLen = rawUrlVars.length;
7613
- for (; p < pLen; p++) {
7614
- pKey = rawUrlVars[p].substring(1);
7615
- if ( typeof(params[ pKey ]) != 'undefined' && params[ pKey ] ) {
7616
- rawUrlScore++;
7617
- }
7618
- }
7619
- // We just rely in params count for now
7620
- if (rawUrlScore > lastScore) {
7621
- lastScore = rawUrlScore;
7622
- route.urlIndex = i;
7623
- }
7624
- }
7625
- }
7740
+ // #B374 — which url of a multi-url rule getRoute() composes is chosen there, on the rule's
7741
+ // own url (selectUrlIndex). The loop that chose it here read the FIRST url on every pass
7742
+ // (`rawUrls[0]`), so it always chose 0, and getRoute() let that 0 override the caller's
7743
+ // own urlIndex whenever a placeholder had been filled.
7744
+ // was: // Selecting url in case of multiple urls & optional requirmements
7745
+ // was: if ( urls ) {
7746
+ // was: i = 0; len = urls.length;
7747
+ // was: var rawUrlVars = null
7748
+ // was: , rawUrlScore = null
7749
+ // was: , rawUrls = rawRouteUrl.split(/\,/g)
7750
+ // was: , pKey = null
7751
+ // was: , lastScore = 0
7752
+ // was: ;
7753
+ // was: route.urlIndex = 0; // by default
7754
+ // was: for (; i < len; ++i) {
7755
+ // was: rawUrlScore = 0;
7756
+ // was: rawUrlVars = rawUrls[0].match(/\:[-_a-z0-9]+/ig);
7757
+ // was: if ( !rawUrlVars ) continue;
7758
+ // was: p = 0;
7759
+ // was: pLen = rawUrlVars.length;
7760
+ // was: for (; p < pLen; p++) {
7761
+ // was: pKey = rawUrlVars[p].substring(1);
7762
+ // was: if ( typeof(params[ pKey ]) != 'undefined' && params[ pKey ] ) {
7763
+ // was: rawUrlScore++;
7764
+ // was: }
7765
+ // was: }
7766
+ // was: // We just rely in params count for now
7767
+ // was: if (rawUrlScore > lastScore) {
7768
+ // was: lastScore = rawUrlScore;
7769
+ // was: route.urlIndex = i;
7770
+ // was: }
7771
+ // was: }
7772
+ // was: }
7626
7773
 
7627
7774
  return route;
7628
7775
  }
7629
7776
 
7777
+ /**
7778
+ * selectUrlIndex
7779
+ *
7780
+ * #B374 — the url of a multi-url rule that getRoute() composes when the caller names none:
7781
+ * the first url whose placeholders all receive a value, preferring among those the url that
7782
+ * uses the most values; when no url is complete, the url that receives the most values. Ties
7783
+ * go to the first url, so a rule whose urls carry the same placeholders (one url per
7784
+ * language, for instance) keeps composing its first url. A placeholder receives a value
7785
+ * when its value is not `undefined`, the test the fill itself applies (checkRouteParams
7786
+ * writes `''` and `null` too).
7787
+ *
7788
+ * @inner
7789
+ * @param {string} rawUrl - the rule's own url, its urls separated by commas, before any value
7790
+ * is filled in
7791
+ * @param {object} [params] - the values getRoute() fills in, keyed by placeholder name
7792
+ * @returns {number} index of the url to compose; `0` for a rule with a single url
7793
+ *
7794
+ * @example
7795
+ * selectUrlIndex('/logout/:timestamp,/logout', {}); // 1
7796
+ * selectUrlIndex('/logout/:timestamp,/logout', { timestamp: 9 }); // 0
7797
+ * selectUrlIndex('/s,/s/:ts', { ts: '12' }); // 1
7798
+ * selectUrlIndex('/help,/aide', {}); // 0
7799
+ */
7800
+ var selectUrlIndex = function(rawUrl, params) {
7801
+ var urls = rawUrl.split(/\,/g)
7802
+ , best = 0
7803
+ , bestDone = -1
7804
+ , bestFill = -1
7805
+ , names = null
7806
+ , fill = 0
7807
+ , done = 0
7808
+ , value = null
7809
+ , u = 0
7810
+ , n = 0
7811
+ ;
7812
+ for (; u < urls.length; ++u) {
7813
+ names = urls[u].match(/\:[-_a-z0-9]+/ig) || [];
7814
+ fill = 0;
7815
+ for (n = 0; n < names.length; ++n) {
7816
+ value = ( params ) ? params[ names[n].substring(1) ] : undefined;
7817
+ if ( typeof(value) != 'undefined' ) {
7818
+ ++fill;
7819
+ }
7820
+ }
7821
+ done = ( fill === names.length ) ? 1 : 0;
7822
+ if ( done > bestDone || ( done === bestDone && fill > bestFill ) ) {
7823
+ best = u;
7824
+ bestDone = done;
7825
+ bestFill = fill;
7826
+ }
7827
+ }
7828
+ return best;
7829
+ };
7830
+
7630
7831
  /**
7631
7832
  * #B168 — once-per-process latch for the proxied-context degrade warning in
7632
7833
  * getRoute(): the resolver sits on the per-request hot path, so the abnormal
@@ -7637,7 +7838,21 @@ function Routing() {
7637
7838
  var _proxyHostDegradeWarned = false;
7638
7839
 
7639
7840
  /**
7640
- * @function getRoute
7841
+ * Composes the url of a routing rule and returns the route object (`url`, `toUrl()`,
7842
+ * `request()`). The values in `params` fill the rule's `:placeholders`; on a GET rule, the
7843
+ * other values become query parameters.
7844
+ *
7845
+ * A rule with several urls (`"url": "/a/:id, /b/:id"`) composes one of them (#B374): the
7846
+ * one `urlIndex` names or, without `urlIndex`, the first url whose placeholders all receive
7847
+ * a value, preferring among those the url that uses the most values; when no url is
7848
+ * complete, the url that receives the most values. Ties go to the first url. A placeholder
7849
+ * receives a value when its value is not `undefined`.
7850
+ *
7851
+ * Query parameters, on a GET rule: a value whose key `param` declares, when the url composed
7852
+ * does not carry it (#B220): its placeholder, or a fixed value as written, is not in that url;
7853
+ * `requirements` does not keep such a value out. Then every other value that is neither
7854
+ * reserved, nor declared in the rule's `requirements`, nor already written into the path
7855
+ * (#B943). No value is appended twice (#B944).
7641
7856
  *
7642
7857
  * On the server, the proxied classification and proxy hostname come from the
7643
7858
  * REQUEST first (#B502): core/router.js fills `proxy` on the process.gina._reqALS
@@ -7651,11 +7866,25 @@ function Routing() {
7651
7866
  * hostname (route.isProxyHost is flipped false) instead of failing, and a
7652
7867
  * once-per-process warning is emitted.
7653
7868
  *
7869
+ * @function getRoute
7870
+ *
7654
7871
  * @param {string} rule e.g.: [ <scheme>:// ]<name>[ @<bundle> ][ /<environment> ]
7655
- * @param {object} params - substituted into the route's `:placeholders`; on a GET route, leftover keys that are neither reserved nor declared in the rule's `requirements` are appended to `route.url` as query parameters (a rule with no `requirements` block is safe — the block is optional)
7656
- * @param {number} [urlIndex] in case you have more than one url registered for the current route, you can select the one you want to use. Default is 0.
7872
+ * @param {object} [params] - values for the rule's `:placeholders`; on a GET rule, the values left over are appended to `route.url` as query parameters, as described above (a rule with no `requirements` block is safe — the block is optional)
7873
+ * @param {number|string} [urlIndex] - for a rule with several urls, the 0-based index of the url to compose; a numeric string such as `"1"` is accepted. Ignored for a rule with a single url.
7657
7874
  *
7658
7875
  * @returns {object} route
7876
+ *
7877
+ * @throws {Error} when the rule is not found, or when `urlIndex` names no url of a rule with several urls
7878
+ *
7879
+ * @example
7880
+ * // "logout": { "url": "/logout/:timestamp, /logout", "param": { "control": "logout", "timestamp": ":timestamp" } }
7881
+ * routing.getRoute('logout@auth').url; // '/logout'
7882
+ * routing.getRoute('logout@auth', { timestamp: '9' }).url; // '/logout/9'
7883
+ * routing.getRoute('logout@auth', { timestamp: '9' }, 1).url; // '/logout?timestamp=9'
7884
+ *
7885
+ * @example
7886
+ * // "invoice": { "url": "/invoice/:id", "param": { "control": "get", "id": ":id" } }
7887
+ * routing.getRoute('invoice@frontend', { id: 'abc-123', tab: '2' }).url; // '/invoice/abc-123?tab=2'
7659
7888
  * */
7660
7889
  self.getRoute = function(rule, params, urlIndex) {
7661
7890
 
@@ -7798,12 +8027,50 @@ function Routing() {
7798
8027
  }
7799
8028
 
7800
8029
  if ( /\,/.test(route.url) ) {
7801
- if ( typeof(route.urlIndex) != 'undefined' ) {
7802
- urlIndex = route.urlIndex; // set by checkRouteParams(route, params)
7803
- delete route.urlIndex;
8030
+ // #B374, #B946 — the url to compose is chosen on the rule's own url, before any value
8031
+ // is filled in: a filled url can carry a comma inside a value, which the split used to
8032
+ // read as a url boundary (`{ x: 'a,b' }` on `/o/:x` composed `/o/a`). The caller's
8033
+ // urlIndex wins; it used to be overridden by the 0 the fill always chose. An index that
8034
+ // names no url throws instead of composing `undefined`. Without one, selectUrlIndex()
8035
+ // chooses. Only the url chosen is filled, by the same checkRouteParams().
8036
+ // was: if ( typeof(route.urlIndex) != 'undefined' ) {
8037
+ // was: urlIndex = route.urlIndex; // set by checkRouteParams(route, params)
8038
+ // was: delete route.urlIndex;
8039
+ // was: }
8040
+ // was: urlIndex = ( typeof(urlIndex) != 'undefined' ) ? urlIndex : 0;
8041
+ // was: route.url = route.url.split(/,/g)[urlIndex];
8042
+ var _ruleUrls = routing[rule].url.split(/\,/g);
8043
+ if ( _ruleUrls.length > 1 ) {
8044
+ if ( typeof(urlIndex) != 'undefined' && urlIndex !== null ) {
8045
+ var _index = ( typeof(urlIndex) == 'string' && /^\d+$/.test(urlIndex) ) ? parseInt(urlIndex, 10) : urlIndex;
8046
+ if ( typeof(_index) != 'number' || _index % 1 !== 0 || _index < 0 || _index >= _ruleUrls.length ) {
8047
+ throw new Error('[ RoutingHelper::getRoute(rule, params, urlIndex) ] : urlIndex `'+ urlIndex +'` names no url of rule `'+ rule +'`, which has '+ _ruleUrls.length +' urls');
8048
+ }
8049
+ urlIndex = _index;
8050
+ } else {
8051
+ urlIndex = selectUrlIndex(routing[rule].url, params);
8052
+ }
8053
+ // #B947 — the placeholder bindings only (`"id": ":id"`), read on the rule's own param:
8054
+ // the first checkRouteParams() call above wrote the values into `path`, `title`,
8055
+ // `namespace` and `file`, so a placeholder bound under one of those keys
8056
+ // (`"file": ":file"`) no longer read as a binding on the route and stayed in the url.
8057
+ // Only `.url` is kept from this second fill.
8058
+ // was: var _bindings = {};
8059
+ // was: for (var _key in route.param) {
8060
+ // was: if ( typeof(route.param[_key]) == 'string' && /^:/.test(route.param[_key]) ) {
8061
+ // was: _bindings[_key] = route.param[_key];
8062
+ // was: }
8063
+ // was: }
8064
+ var _bindings = {}, _ruleParam = routing[rule].param || {};
8065
+ for (var _key in _ruleParam) {
8066
+ if ( typeof(_ruleParam[_key]) == 'string' && /^:/.test(_ruleParam[_key]) ) {
8067
+ _bindings[_key] = _ruleParam[_key];
8068
+ }
8069
+ }
8070
+ route.url = checkRouteParams({ url: _ruleUrls[urlIndex], param: _bindings }, params).url;
8071
+ // read by the query append below, which needs the url actually composed; removed there
8072
+ route.urlIndex = urlIndex;
7804
8073
  }
7805
- urlIndex = ( typeof(urlIndex) != 'undefined' ) ? urlIndex : 0;
7806
- route.url = route.url.split(/,/g)[urlIndex];
7807
8074
  }
7808
8075
  // fix url in case of empty param value allowed by the routing rule
7809
8076
  // to prevent having a folder.
@@ -7814,17 +8081,33 @@ function Routing() {
7814
8081
  // Completeting url with extra params e.g.: ?param1=val1&param2=val2
7815
8082
  if ( /GET/i.test(route.method) && typeof(params) != 'undefined' ) {
7816
8083
  var queryParams = '?'
7817
- , maskedUrl = routing[rule].url
8084
+ // #B220 — the url actually composed (the one chosen above), not every url of the
8085
+ // rule joined: a value whose placeholder sits only in another url of the rule was
8086
+ // skipped here and, when declared in `requirements`, dropped by the loop below.
8087
+ // was: , maskedUrl = routing[rule].url
8088
+ , maskedUrl = routing[rule].url.split(/\,/g)[ route.urlIndex || 0 ] || routing[rule].url
7818
8089
  ;
7819
8090
 
7820
8091
  // in route.rule params
7821
8092
  var extracted = [], i = 0;
7822
8093
  for (let r in route.param) {
7823
- if ( self.reservedParams.indexOf(r) > -1 || new RegExp(route.param[r]).test(maskedUrl) )
8094
+ // #B220 — a placeholder is in the url only where the fill writes it: `:name` followed
8095
+ // by `/` or the end (checkRouteParams), so `:key` no longer matches inside `:keyXyz`.
8096
+ // was: if ( self.reservedParams.indexOf(r) > -1 || new RegExp(route.param[r]).test(maskedUrl) )
8097
+ if (
8098
+ self.reservedParams.indexOf(r) > -1
8099
+ || (
8100
+ ( /^:/.test(route.param[r]) )
8101
+ ? new RegExp('('+ route.param[r] +'/|'+ route.param[r] +'$)').test(maskedUrl)
8102
+ : new RegExp(route.param[r]).test(maskedUrl)
8103
+ )
8104
+ )
7824
8105
  continue;
7825
8106
  if (typeof(params[r]) != 'undefined' ) {
7826
8107
  queryParams += r +'='+ encodeRFC5987ValueChars(params[r])+ '&';
7827
- extracted[i] = params[r];
8108
+ // #B944 — the loop below tests KEYS: record the key, not its value
8109
+ // was: extracted[i] = params[r];
8110
+ extracted[i] = r;
7828
8111
  ++i;
7829
8112
  }
7830
8113
  }
@@ -7838,6 +8121,14 @@ function Routing() {
7838
8121
  // on such a GET route appends the query params instead of throwing
7839
8122
  || ( route.requirements && typeof(route.requirements[p]) != 'undefined' )
7840
8123
  || extracted.indexOf(p) > -1
8124
+ // #B943 — a key bound to a placeholder of the url composed (`"id": ":id"`) is in
8125
+ // the path already; an unbound one keeps travelling as a query parameter
8126
+ || (
8127
+ route.param
8128
+ && typeof(route.param[p]) == 'string'
8129
+ && /^:/.test(route.param[p])
8130
+ && new RegExp('('+ route.param[p] +'/|'+ route.param[p] +'$)').test(maskedUrl)
8131
+ )
7841
8132
  ) {
7842
8133
  continue;
7843
8134
  }
@@ -7858,6 +8149,8 @@ function Routing() {
7858
8149
  }
7859
8150
  queryParams = null;
7860
8151
  }
8152
+ // #B374 — the index handed over by the url choice above is not part of the route returned
8153
+ delete route.urlIndex;
7861
8154
 
7862
8155
  // recommanded for x-bundle coms
7863
8156
  // leave `ignoreWebRoot` empty or set it to false for x-bundle coms
@@ -12802,7 +13095,8 @@ function DataHelper(){
12802
13095
  };
12803
13096
 
12804
13097
  /**
12805
- * Parses a request payload into a plain object. Three input shapes:
13098
+ * Parses a request payload into a plain object (an array for a `[`-leading
13099
+ * document). Three input shapes:
12806
13100
  *
12807
13101
  * - a urlencoded string (`key=value&…`): split on `&`, then at the FIRST `=`,
12808
13102
  * each key and value percent-decoded exactly ONCE after the split, bracket
@@ -12813,7 +13107,11 @@ function DataHelper(){
12813
13107
  * a repeated key keeps the last value;
12814
13108
  * - a `{`/`[`-leading JSON document: parsed VERBATIM — never percent-decoded
12815
13109
  * (#B589) — after the quoted-token casting on the document text
12816
- * (`"true"`/`"false"`/`"on"` → boolean, `"null"` in any case → null);
13110
+ * (`"true"`/`"false"`/`"on"` → boolean, `"null"` in any case → null); a
13111
+ * `[`-leading one gives an array whose object elements are parsed like a
13112
+ * document of their own (bracket keys nested, the three prototype names
13113
+ * dropped), each into its own object, and whose other elements are kept as
13114
+ * they are (#B936, #B594);
12817
13115
  * - an object: stringified first, so it takes the document contract (the
12818
13116
  * browser validator and DTO routes hand their fields over this way).
12819
13117
  *
@@ -12823,11 +13121,13 @@ function DataHelper(){
12823
13121
  *
12824
13122
  * @global
12825
13123
  * @param {string|object} bodyStr - urlencoded string, JSON document, or object
12826
- * @returns {object|undefined} the parsed object, or `undefined` for an invalid document
13124
+ * @returns {object|Array|undefined} the parsed object (an array for a `[`-leading
13125
+ * document), or `undefined` for an invalid document
12827
13126
  * @example
12828
13127
  * formatDataFromString('user[name]=Ada&tag=a%26b'); // { user: { name: 'Ada' }, tag: 'a&b' }
12829
13128
  * formatDataFromString('{"active":"true","n":"2"}'); // { active: true, n: '2' }
12830
13129
  * formatDataFromString({ q: 'a%20b' }); // { q: 'a%20b' } (never decoded)
13130
+ * formatDataFromString('[{"a[b]":"1"},2,null]'); // [ { a: { b: '1' } }, 2, null ]
12831
13131
  */
12832
13132
  formatDataFromString = function(bodyStr){
12833
13133
 
@@ -12861,10 +13161,34 @@ function DataHelper(){
12861
13161
  return parseBody(bodyStr);
12862
13162
  }
12863
13163
 
13164
+ /**
13165
+ * Writes the elements of a parsed `[`-leading document into `obj` (#B936,
13166
+ * #B594). An element that is an object (not `null`, not an array) is parsed
13167
+ * like a document of its own, into its OWN object: bracket keys nest, and a
13168
+ * top-level `__proto__`, `constructor` or `prototype` key is dropped. Any
13169
+ * other element (a number, a string, a boolean, `null`, a nested array) is
13170
+ * kept as it is, as a value inside an object document is.
13171
+ *
13172
+ * @inner
13173
+ * @private
13174
+ * @param {Array} collection - the array `JSON.parse` returned
13175
+ * @param {Array} obj - the array the elements are written into
13176
+ * @returns {Array} `obj`
13177
+ * @example
13178
+ * parseCollection([{ 'a[b]': '1' }, 2, null], []); // [ { a: { b: '1' } }, 2, null ]
13179
+ */
12864
13180
  var parseCollection = function (collection, obj) {
12865
13181
 
12866
13182
  for(var i = 0, len = collection.length; i<len; ++i) {
12867
- obj[i] = parseObject(collection[i], obj);
13183
+ // #B936 / #B594 — was:
13184
+ // obj[i] = parseObject(collection[i], obj);
13185
+ // parseObject wrote each element's pairs onto the root array and returned
13186
+ // it, so every slot held the array itself: a circular value that
13187
+ // JSON.stringify cannot serialize (a 500 on any route that renders it), and
13188
+ // an element that was not an object lost its value.
13189
+ obj[i] = ( collection[i] !== null && typeof(collection[i]) == 'object' && !Array.isArray(collection[i]) )
13190
+ ? parseObject(collection[i], {})
13191
+ : collection[i];
12868
13192
  }
12869
13193
 
12870
13194
  return obj
@@ -13050,6 +13374,33 @@ function DataHelper(){
13050
13374
  // return obj;
13051
13375
  // }
13052
13376
 
13377
+ /**
13378
+ * Nests ONE bracket-notation key path into an accumulator, in place:
13379
+ * `item[0][id]` is split into `['item','0','id']` and lands as
13380
+ * `{ item: [ { id: … } ] }`. A level is created as an array when the segment
13381
+ * below it is an index (`/^\d+$/`) and as an object otherwise. A level that
13382
+ * mixes indexes and names is an object keyed by both, whatever came first
13383
+ * (#B596): a name reaching a level that already holds an array copies the
13384
+ * array into an object before the walk goes on. A path carrying a
13385
+ * `__proto__`, `constructor` or `prototype` segment is dropped (#B446).
13386
+ * Callers start from an object accumulator; the leaf value is assigned as given.
13387
+ *
13388
+ * @inner
13389
+ * @private
13390
+ * @param {(object|Array)} obj - accumulator, mutated in place and returned
13391
+ * @param {Array<string>} key - the split key path, e.g. `['item','0','id']`
13392
+ * @param {number} k - current depth into `key` (callers pass 0)
13393
+ * @param {*} value - the leaf value
13394
+ * @returns {(object|Array)} the accumulator
13395
+ *
13396
+ * @example
13397
+ * parseLocalObj({}, ['item','0','id'], 0, 'x'); // { item: [ { id: 'x' } ] }
13398
+ *
13399
+ * @example
13400
+ * // indexes first, then a name: one object, nothing lost
13401
+ * var o = parseLocalObj({}, ['a','0'], 0, 'x');
13402
+ * parseLocalObj(o, ['a','b'], 0, 'y'); // { a: { 0: 'x', b: 'y' } }
13403
+ */
13053
13404
  var parseLocalObj = function(obj, key, k, value) {
13054
13405
 
13055
13406
  // #B446 — a bracket-notation field name is client-supplied and every segment is
@@ -13139,6 +13490,18 @@ function DataHelper(){
13139
13490
  obj[ _key ] = null;
13140
13491
  }
13141
13492
 
13493
+ // #B596 — a segment that is not an index (`list[name]`) reaching an
13494
+ // existing array: that level mixes indexes and names, so it becomes an
13495
+ // OBJECT keyed by both (`"0"`, `"1"`, `"name"`), whatever came first.
13496
+ // Before, the name was read as index 0 (`~~'name'`): a fresh `{}`
13497
+ // replaced the first element, and the name became an array property
13498
+ // that JSON drops. A level whose segments are all indexes stays an
13499
+ // array. Identical in helpers/data `parseLocalObj` and the validator
13500
+ // twin `nestBracketNotationKey` (pinned byte for byte).
13501
+ if ( Array.isArray(obj[ _key ]) && !/^\d+$/.test(key[k+1]) ) {
13502
+ obj[ _key ] = Object.assign({}, obj[ _key ]);
13503
+ }
13504
+
13142
13505
  parseLocalObj(obj[ _key ], key, k+1, value);
13143
13506
  }
13144
13507
  }
@@ -15479,9 +15842,18 @@ function ValidatorPlugin(rules, data, formId, culture) {
15479
15842
  * @param {object} errors
15480
15843
  * @param {object|null} data
15481
15844
  * @param {string|null} [fieldName] - restricts the pass to one field (the per-field / live-check path)
15845
+ * @param {boolean} [isSubmitTriggerLeftToFormPass=false] - #B922: the caller's whole-form pass writes the
15846
+ * submit trigger, so a field without errors does not mark the form ready here
15847
+ * @returns {void}
15848
+ *
15849
+ * @example
15850
+ * // a live-check field pass that found no error; the whole-form pass that follows writes the trigger
15851
+ * handleErrorsDisplay($formNode, {}, result.data, 'email', true);
15852
+ *
15853
+ * @inner
15482
15854
  */
15483
15855
  var liveCheckErrors = {}; // Per Form & Per Element
15484
- var handleErrorsDisplay = function($form, errors, data, fieldName) {
15856
+ var handleErrorsDisplay = function($form, errors, data, fieldName, isSubmitTriggerLeftToFormPass) {
15485
15857
 
15486
15858
  // Toolbar errors display
15487
15859
  if ( envIsDev )
@@ -15564,7 +15936,13 @@ function ValidatorPlugin(rules, data, formId, culture) {
15564
15936
  && !instance.$forms[formId].errors
15565
15937
  ) {
15566
15938
  // update submit trigger state
15567
- updateSubmitTriggerState( $form, true );
15939
+ // #B922 — unless the caller's whole-form pass writes it: there, the `true` of a
15940
+ // field without errors reached the show branch, which clears native `disabled`,
15941
+ // before that pass gated the form.
15942
+ // was: updateSubmitTriggerState( $form, true );
15943
+ if ( !isSubmitTriggerLeftToFormPass ) {
15944
+ updateSubmitTriggerState( $form, true );
15945
+ }
15568
15946
  }
15569
15947
 
15570
15948
  if ( typeof(liveCheckErrors[formId]) != 'undefined' && liveCheckErrors[formId].count() == 0 ) {
@@ -16055,7 +16433,9 @@ function ValidatorPlugin(rules, data, formId, culture) {
16055
16433
  * Values are placed VERBATIM — no url-decode, no `"true"`/`"false"`/`"null"`
16056
16434
  * coercion — because the non-binary body is posted as `application/json` and the
16057
16435
  * server keeps JSON keys/values as sent (#B28). A numeric next segment makes the
16058
- * current level an array.
16436
+ * current level an array. A level that mixes indexes and names is an object keyed
16437
+ * by both, whatever came first (#B596): a name reaching a level that already holds
16438
+ * an array copies the array into an object before the walk goes on.
16059
16439
  *
16060
16440
  * @inner
16061
16441
  * @param {(object|Array)} obj - accumulator, mutated in place and returned
@@ -16067,6 +16447,11 @@ function ValidatorPlugin(rules, data, formId, culture) {
16067
16447
  * @example
16068
16448
  * // 'item[0][id]' -> ['item','0','id']
16069
16449
  * nestBracketNotationKey({}, ['item','0','id'], 0, 'x'); // { item: [ { id: 'x' } ] }
16450
+ *
16451
+ * @example
16452
+ * // 'list[0][id]' then 'list[name]': one object, nothing lost
16453
+ * var o = nestBracketNotationKey({}, ['list','0','id'], 0, 'x');
16454
+ * nestBracketNotationKey(o, ['list','name'], 0, 'y'); // { list: { 0: { id: 'x' }, name: 'y' } }
16070
16455
  */
16071
16456
  var nestBracketNotationKey = function(obj, key, k, value) {
16072
16457
 
@@ -16128,6 +16513,18 @@ function ValidatorPlugin(rules, data, formId, culture) {
16128
16513
  obj[ _key ] = null;
16129
16514
  }
16130
16515
 
16516
+ // #B596 — a segment that is not an index (`list[name]`) reaching an
16517
+ // existing array: that level mixes indexes and names, so it becomes an
16518
+ // OBJECT keyed by both (`"0"`, `"1"`, `"name"`), whatever came first.
16519
+ // Before, the name was read as index 0 (`~~'name'`): a fresh `{}`
16520
+ // replaced the first element, and the name became an array property
16521
+ // that JSON drops. A level whose segments are all indexes stays an
16522
+ // array. Identical in helpers/data `parseLocalObj` and the validator
16523
+ // twin `nestBracketNotationKey` (pinned byte for byte).
16524
+ if ( Array.isArray(obj[ _key ]) && !/^\d+$/.test(key[k+1]) ) {
16525
+ obj[ _key ] = Object.assign({}, obj[ _key ]);
16526
+ }
16527
+
16131
16528
  nestBracketNotationKey(obj[ _key ], key, k+1, value);
16132
16529
  }
16133
16530
  }
@@ -20586,6 +20983,58 @@ function ValidatorPlugin(rules, data, formId, culture) {
20586
20983
  Object.defineProperty($el, 'value', descriptor);
20587
20984
  }
20588
20985
 
20986
+ /**
20987
+ * isCaseConditionTarget
20988
+ * #B884 — tells whether a `_case_<driver>` block of a rule set names `field` in the `rules` of
20989
+ * one of its conditions, i.e. whether a case can make that field required (or give it any rule)
20990
+ * while it has no rule of its own. An exact field-name key counts, and since #B921 a RegExp key
20991
+ * (`"/^item[/"`) that matches `field` counts too, read as `forEachField`'s expandCaseRegExpKeys reads
20992
+ * it (`[` and `]` literal, the flags kept, the block's driver left out, an invalid pattern skipped).
20993
+ * Before #B921 only exact keys counted: the live case merge skipped a RegExp key, so it never
20994
+ * applied there.
20995
+ *
20996
+ * @inner
20997
+ * @param {object} rules - the form's bound rule set (`$form.rules`)
20998
+ * @param {string} field - a control's name
20999
+ *
21000
+ * @returns {boolean} true when at least one condition's `rules` names `field`
21001
+ *
21002
+ * @example
21003
+ * isCaseConditionTarget({ _case_kind: { conditions: [{ case: 'b', rules: { extra: { isRequired: true } } }] } }, 'extra'); // true
21004
+ * isCaseConditionTarget({ ref: { isRequired: true } }, 'ref'); // false: a rule of its own, no case names it
21005
+ * isCaseConditionTarget({ _case_kind: { conditions: [{ case: 'b', rules: { '/^item[/': { isRequired: true } } }] } }, 'item[0][id]'); // true
21006
+ */
21007
+ var isCaseConditionTarget = function(rules, field) {
21008
+ if ( !rules || typeof(rules) != 'object' || typeof(field) != 'string' || field == '' ) {
21009
+ return false;
21010
+ }
21011
+ for (var c in rules) {
21012
+ if ( !/^\_case\_/.test(c) || !rules[c] || !Array.isArray(rules[c].conditions) ) continue;
21013
+ for (var i = 0, len = rules[c].conditions.length; i < len; ++i) {
21014
+ var condition = rules[c].conditions[i];
21015
+ if ( !condition || !condition.rules || typeof(condition.rules) != 'object' ) continue;
21016
+ if ( Object.prototype.hasOwnProperty.call(condition.rules, field) ) {
21017
+ return true;
21018
+ }
21019
+ // #B921 — a RegExp key that matches the field, as forEachField expands it
21020
+ if ( c.replace(/^\_case\_/, '') == field ) continue;
21021
+ for (var key in condition.rules) {
21022
+ if ( !/^\//.test(key) ) continue;
21023
+ try {
21024
+ var keyPattern = key.match(/\/(.*)\//).pop();
21025
+ var keyRe = new RegExp(keyPattern.replace(/\[/g, '\\[').replace(/\]/g, '\\]'), key.replace('/'+ keyPattern +'/', ''));
21026
+ if ( keyRe.test(field) ) {
21027
+ return true;
21028
+ }
21029
+ } catch (err) {
21030
+ // a pattern the engine rejects is skipped (forEachField warns about it)
21031
+ }
21032
+ }
21033
+ }
21034
+ }
21035
+ return false;
21036
+ }
21037
+
20589
21038
  /**
20590
21039
  * addLiveForInput
20591
21040
  * Wires one form control for live checking: registers the gina event
@@ -20597,6 +21046,12 @@ function ValidatorPlugin(rules, data, formId, culture) {
20597
21046
  * form-level change proxy is the only dispatcher that fires on a user
20598
21047
  * pick and it only dispatches names that are registered.
20599
21048
  *
21049
+ * A control is wired when it has a rule, or — since #B884 — when a `_case_` condition names it
21050
+ * (`isCaseConditionTarget`): its field pass finds no rule, and only the whole-form pass writes the
21051
+ * submit trigger for it (#B922). Admitted input types (#B886): radio,
21052
+ * checkbox, text, hidden, password, number, email, tel, url, search, and the date/time family
21053
+ * (date, time, datetime-local, month, week).
21054
+ *
20600
21055
  * @inner
20601
21056
  * @param {object} $form - form instance record (`instance.$forms[id]` shape: `.rules`, `.target`)
20602
21057
  * @param {object} $el - control to wire (DOMObject)
@@ -20626,18 +21081,28 @@ function ValidatorPlugin(rules, data, formId, culture) {
20626
21081
  isDisabled = false;
20627
21082
  }
20628
21083
  // allowedLiveInputTypes
20629
- if ( /^(radio|checkbox|text|hidden|password|number|date|email)$/i.test($el.type) && !isDisabled || isOtherTagAllowed && !isDisabled ) {
21084
+ // #B886 — tel, url, search and the date/time family were left out, so a field of such a
21085
+ // type got no live listener even with a rule: typing never re-evaluated the submit trigger.
21086
+ // range and color stay out (not measured).
21087
+ // was: /^(radio|checkbox|text|hidden|password|number|date|email)$/i
21088
+ if ( /^(radio|checkbox|text|hidden|password|number|date|email|tel|url|search|time|datetime-local|month|week)$/i.test($el.type) && !isDisabled || isOtherTagAllowed && !isDisabled ) {
20630
21089
  var field = $el.name;
20631
21090
  var localRule = rules[field] || null;
21091
+ // #B884 — a field with no rule of its own that a `_case_` condition names is wired too:
21092
+ // the case writes its rule into the store later (forEachField), and without a listener
21093
+ // typing into it never re-evaluated the submit trigger.
21094
+ var isCaseTarget = ( !localRule ) ? isCaseConditionTarget(rules, field) : false;
20632
21095
  if ( !localRule ) {
20633
21096
  checkForRuleAlias(rules, $el);
20634
21097
 
20635
- if ( typeof(rules[field]) == 'undefined' )
21098
+ // was: if ( typeof(rules[field]) == 'undefined' )
21099
+ if ( typeof(rules[field]) == 'undefined' && !isCaseTarget )
20636
21100
  return;
20637
21101
  }
20638
21102
  // data-gina-form-live-check-enabled
20639
- // with local rule
20640
- if ( $form.target.dataset.ginaFormLiveCheckEnabled && localRule) {
21103
+ // with local rule (or, #B884, named by a `_case_` condition)
21104
+ // was: if ( $form.target.dataset.ginaFormLiveCheckEnabled && localRule)
21105
+ if ( $form.target.dataset.ginaFormLiveCheckEnabled && (localRule || isCaseTarget) ) {
20641
21106
 
20642
21107
  var eventsList = [], _evt = null, _e = 0;
20643
21108
  if ( !/^(radio|checkbox)$/i.test($el.type) ) {
@@ -20761,7 +21226,13 @@ function ValidatorPlugin(rules, data, formId, culture) {
20761
21226
  //console.debug('onSilentPreGlobalLiveValidation: '+ isFormValid, result);
20762
21227
  if (isFormValid) {
20763
21228
  //resetting error display
20764
- handleErrorsDisplay(event.target.form, {}, result.data, event.target.name);
21229
+ // #B922 — a field wired only because a `_case_` condition names it (#B884)
21230
+ // has no rule in this pass, which therefore reads valid: its `true` cleared
21231
+ // the native `disabled` a page script had set, before the whole-form pass
21232
+ // below gated the form. For such a field the whole-form pass alone writes
21233
+ // the submit trigger.
21234
+ // was: handleErrorsDisplay(event.target.form, {}, result.data, event.target.name);
21235
+ handleErrorsDisplay(event.target.form, {}, result.data, event.target.name, isCaseTarget);
20765
21236
  } else {
20766
21237
  handleErrorsDisplay(event.target.form, result.error, result.data, event.target.name);
20767
21238
  }
@@ -21577,8 +22048,11 @@ function ValidatorPlugin(rules, data, formId, culture) {
21577
22048
  * .getFormById('my-form-id')
21578
22049
  * .reBind();
21579
22050
  *
21580
- * @param {string} [formId]
21581
- * @param {string} [rules]
22051
+ * @param {string} [formId] - ignored when called as a handle method (`$forms[id].reBind()`)
22052
+ * @param {string|object} [rules] - a rule-set name (dot or slash path) or a rule object, applied
22053
+ * whenever it is given (#B802: it used to apply only once some validation on the page had found
22054
+ * an error). Without it, the form is re-bound with the rule set a no-rule bind resolves:
22055
+ * `data-gina-form-rule`, then the form's id (#B879).
21582
22056
  * @param {callback} [cb]
21583
22057
  */
21584
22058
  var reBindForm = function(formId, rules, cb) {
@@ -21605,7 +22079,11 @@ function ValidatorPlugin(rules, data, formId, culture) {
21605
22079
  // Unbind form
21606
22080
  unbindForm($form.target);
21607
22081
  // Bind
21608
- if ( typeof(rule) != 'undefined' ) {
22082
+ // #B802 — test the `rules` argument. `rule` named no variable in scope: it read a GLOBAL that
22083
+ // the validator leaked on its first validation error (#B880), so the rules handed in applied
22084
+ // only after such an error.
22085
+ // was: if ( typeof(rule) != 'undefined' )
22086
+ if ( typeof(rules) != 'undefined' ) {
21609
22087
  bindForm($form.target, rules);
21610
22088
  } else {
21611
22089
  bindForm($form.target);
@@ -21713,7 +22191,9 @@ function ValidatorPlugin(rules, data, formId, culture) {
21713
22191
  * Handlers registered through `.on()` (the declarative `data-gina-form-event-on-*` hooks
21714
22192
  * included) are left in place — they belong to the form, and `destroy()` removes them.
21715
22193
  *
21716
- * @param {object} $target - the `<form>` element, or the form record (`$forms[id]`)
22194
+ * @param {object} [$target] - the `<form>` element, or the form record (`$forms[id]`). Omitted
22195
+ * when called as a handle method (`$forms[id].unbind()`): the handle's own form is unbound
22196
+ * (#B881: that call threw before 0.7.5).
21717
22197
  *
21718
22198
  * @returns {object} $form - the record, `binded` false
21719
22199
  *
@@ -21726,6 +22206,19 @@ function ValidatorPlugin(rules, data, formId, culture) {
21726
22206
  , _id = null
21727
22207
  ;
21728
22208
 
22209
+ // #B881 — called as a handle method with no argument (`$forms[id].unbind()`), unbind the
22210
+ // handle's own form, as bindForm and reBindForm do. It read `$target.getAttribute` on
22211
+ // undefined and threw « could not unbind form `undefined` ».
22212
+ if (
22213
+ typeof($target) == 'undefined'
22214
+ && this
22215
+ && typeof(this.target) != 'undefined'
22216
+ && this.target
22217
+ && /FORM/i.test(this.target.tagName)
22218
+ ) {
22219
+ $target = this.target;
22220
+ }
22221
+
21729
22222
  try {
21730
22223
  if ( $target.getAttribute && $target.getAttribute('id') ) {
21731
22224
  _id = $target.getAttribute('id');
@@ -21738,7 +22231,10 @@ function ValidatorPlugin(rules, data, formId, culture) {
21738
22231
  $form = $target;
21739
22232
  _id = ( $target.getAttribute && $target.getAttribute('id') ) ? $form.getAttribute('id') : $form.id;
21740
22233
  } else {
21741
- throw new Error('Validator::unbindForm($target): `$target` must be a DOM element\n'+err.stack )
22234
+ // #B881 — no `err` exists in this branch: the old message raised a ReferenceError
22235
+ // that the catch below rewrapped.
22236
+ // was: throw new Error('Validator::unbindForm($target): `$target` must be a DOM element\n'+err.stack )
22237
+ throw new Error('Validator::unbindForm($target): `$target` must be a DOM element')
21742
22238
  }
21743
22239
  } catch(err) {
21744
22240
  throw new Error('Validator::unbindForm($target) could not unbind form `'+ $target +'`\n'+err.stack )
@@ -21864,8 +22360,21 @@ function ValidatorPlugin(rules, data, formId, culture) {
21864
22360
  /**
21865
22361
  * bindForm
21866
22362
  *
22363
+ * Binds a form record: resolves its rule set, wires the live check, the submit trigger and
22364
+ * the form-level listeners, then runs the bind-time silent validation.
22365
+ *
22366
+ * The rule set comes from, in order: the `customRule` the caller passes (a rule object, or the
22367
+ * name of a known rule set); else the form's `data-gina-form-rule`, when it names a known rule
22368
+ * set (#B879 — how `reBind()`, `.bind()` and `getFormById()` re-bind a form whose id names no
22369
+ * rule set); else the form's id, `-` and `/` read as `.`. A form matching none of them is
22370
+ * bound with an empty rule set.
22371
+ *
22372
+ * The record's rules are its own copy of the resolved set (#B931): what this binding and the
22373
+ * form's checks write into them — `exclude` on its grouped fields, `isBoolean` on a boolean
22374
+ * checkbox, a RegExp key's alias — never reaches another form bound to the same rule set.
22375
+ *
21867
22376
  * @param {object} [$target] - DOM element
21868
- * @param {object|string} [customRule]
22377
+ * @param {object|string} [customRule] - a rule object, or the name of a known rule set
21869
22378
  *
21870
22379
  * @return {object} bindedForm
21871
22380
  * */
@@ -21976,6 +22485,18 @@ function ValidatorPlugin(rules, data, formId, culture) {
21976
22485
  // console.debug('binding for: '+ _id);
21977
22486
  var withRules = false, rule = null, evt = '', proceed = null;
21978
22487
 
22488
+ // #B879 — a bind given no rule resolves it as the first bind does: the form's
22489
+ // `data-gina-form-rule` first, when it names a known rule set, then the form's id (the
22490
+ // branch below). By the id alone, a re-bind — `reBind()`, `.bind()`, or `getFormById()` on
22491
+ // an unbound form — gave a form whose id names no rule set an empty rule set: no field was
22492
+ // live-checked and the submit trigger kept the gated mark of the previous bind.
22493
+ if ( typeof(customRule) == 'undefined' && $target.getAttribute('data-gina-form-rule') ) {
22494
+ var attrRule = $target.getAttribute('data-gina-form-rule').replace(/\-|\//g, '.');
22495
+ if ( typeof(rules[attrRule]) != 'undefined' ) {
22496
+ customRule = attrRule;
22497
+ }
22498
+ }
22499
+
21979
22500
  if (
21980
22501
  typeof(customRule) != 'undefined'
21981
22502
  ||
@@ -21996,7 +22517,24 @@ function ValidatorPlugin(rules, data, formId, culture) {
21996
22517
  rule = getRuleObjByName(_id.replace(/\-|\//g, '.'))
21997
22518
  }
21998
22519
 
21999
- $form.rules = rule;
22520
+ // #B931 — the record holds its OWN copy of the rule set. `rule` is a shared object
22521
+ // whichever way it came: `getRuleObjByName` caches the object it builds and returns
22522
+ // it to every caller, and the boot scan passes `instance.rules[name]`, which `init`
22523
+ // chains from one form to the next through `merge`. What this binding and the form's
22524
+ // own checks write into the rules — `exclude` on its grouped fields (below and in
22525
+ // the group handlers), the collector's `isBoolean` on a boolean checkbox, a RegExp
22526
+ // key's alias — is this form's state, derived from its own markup; shared, it
22527
+ // reached every form bound to the same rule set: a form posted without a ticked
22528
+ // value-carrying checkbox because another form's hidden field of that name had been
22529
+ // excluded first, or posted a boolean in place of a value. The submit and click
22530
+ // passes read the record's copy too.
22531
+ // was: $form.rules = rule;
22532
+ $form.rules = JSON.clone(rule);
22533
+ // where validateFormById set the singular `rule`, it keeps naming the form's own
22534
+ // rules object, as it did
22535
+ if ( typeof($form.rule) != 'undefined' ) {
22536
+ $form.rule = $form.rules;
22537
+ }
22000
22538
  if ( envIsDev && isGFFCtx && typeof(window.ginaToolbar) != 'undefined' && window.ginaToolbar ) {
22001
22539
  // update toolbar
22002
22540
  if (!gina.forms.rules)
@@ -22796,7 +23334,8 @@ function ValidatorPlugin(rules, data, formId, culture) {
22796
23334
  /**
22797
23335
  * Live-checks a <select> after its `change`: validates the select alone, then, in that
22798
23336
  * pass's callback, the whole form, and displays each pass's error for this select only.
22799
- * The element is always `$el`, never the global `event` (#B781).
23337
+ * The element is always `$el`, never the global `event` (#B781). The whole-form pass
23338
+ * collects and validates with the form's own rules (#B915).
22800
23339
  *
22801
23340
  * @inner
22802
23341
  * @private
@@ -22851,10 +23390,17 @@ function ValidatorPlugin(rules, data, formId, culture) {
22851
23390
 
22852
23391
  // Global check required: on all fields
22853
23392
  var $gForm = $localForm, gFields = null, $gFields = null, gRules = null;
22854
- var gValidatorInfos = excludeWithheldAutofill(getFormValidationInfos($gForm, rules)); // #B478
23393
+ var formId = $gForm.getAttribute('id');
23394
+ // #B915 — collect with the form's own rules, the rule set the pass below validates
23395
+ // with. `rules` here is bindForm's: the rule REGISTRY, keyed by rule-set name, so
23396
+ // `rules[<field>]` was undefined for every field and #B221's arm never collected an
23397
+ // unchecked required radio group: the pass read valid and the submit trigger opened
23398
+ // after a select change. addLiveForInput's pass collects with the form's rules (its
23399
+ // own `var rules = $form.rules`).
23400
+ // was: var gValidatorInfos = excludeWithheldAutofill(getFormValidationInfos($gForm, rules)); // #B478
23401
+ var gValidatorInfos = excludeWithheldAutofill(getFormValidationInfos($gForm, instance.$forms[formId].rules)); // #B478
22855
23402
  gFields = gValidatorInfos.fields;
22856
23403
  $gFields = gValidatorInfos.$fields;
22857
- var formId = $gForm.getAttribute('id');
22858
23404
  gRules = instance.$forms[formId].rules;
22859
23405
  // Don't be tempted to revome fields that has already been validated
22860
23406
  instance.$forms[formId].isValidating = true;
@@ -22972,6 +23518,22 @@ function ValidatorPlugin(rules, data, formId, culture) {
22972
23518
  }// EO binding select
22973
23519
 
22974
23520
  // group dependencies handling
23521
+ /**
23522
+ * Sets the fields whose `data-gina-form-element-group` holds the checkbox `elId` (as one of its
23523
+ * space-separated ids, #B923; radios and checkboxes among them are skipped) to the checkbox's state:
23524
+ * enabled and included while it is ticked, disabled and excluded otherwise. Called when a
23525
+ * grouped checkbox is clicked (`excluded` decides) and, through updateGroupChildrenState, for
23526
+ * each checkbox grouped under a master (`isCalledHasDependency`: the checkbox's own state
23527
+ * decides, and a disabled checkbox counts as unticked, #B919).
23528
+ *
23529
+ * @inner
23530
+ * @param {string} elId - the checkbox's id; it must be a grouped element of the form
23531
+ * @param {string} group - the checkbox's own group
23532
+ * @param {boolean} excluded - the state applied when `isCalledHasDependency` is false
23533
+ * @param {boolean} [isCalledHasDependency=false] - true when the checkbox's own state decides
23534
+ * @returns {undefined}
23535
+ * @throws {Error} when `elId` is not a grouped element of the form
23536
+ */
22975
23537
  var updateReletadItems = function(elId, group, excluded, isCalledHasDependency) {
22976
23538
 
22977
23539
  if ( typeof(isCalledHasDependency) == 'undefined' ) {
@@ -22984,11 +23546,16 @@ function ValidatorPlugin(rules, data, formId, culture) {
22984
23546
 
22985
23547
  var elIdIsChecked = null
22986
23548
  , re = null
22987
- , re2 = null
22988
- , namedId = elId.replace(/\-|\_|\@|\#|\.|\[|\]/g, '\\$&')
23549
+ // #B929 — every regexp character of the id is escaped (`- _ @ # . [ ]` were): `a+b` matched `ab`, `a(b` threw.
23550
+ // was: , namedId = elId.replace(/\-|\_|\@|\#|\.|\[|\]/g, '\\$&')
23551
+ , namedId = elId.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
22989
23552
  //, name = $el.getAttribute('name').replace(/\-|\_|\@|\#|\.|\[|\]/g, '\\$&')
22990
23553
  ;
22991
- elIdIsChecked = allFormGroupedElements[elId].target.checked;
23554
+ // #B919 — a checkbox that is disabled counts as unticked: when its own master is switched
23555
+ // off (handleGroupDependencies disables it), the fields that name it follow it off, though
23556
+ // it may still be ticked. The branch #B919 removed from handleGroupDependencies hid this.
23557
+ // was: elIdIsChecked = allFormGroupedElements[elId].target.checked;
23558
+ elIdIsChecked = allFormGroupedElements[elId].target.checked && !allFormGroupedElements[elId].target.disabled;
22992
23559
  //console.debug('current id ', elId, excluded);
22993
23560
  for (let id in allFormGroupedElements) {
22994
23561
  // ignore triggers
@@ -22996,14 +23563,15 @@ function ValidatorPlugin(rules, data, formId, culture) {
22996
23563
  continue;
22997
23564
 
22998
23565
  let hasBeenUpdated = false;
22999
- re = new RegExp(namedId);
23000
- re2 = new RegExp(group);
23001
-
23002
- if (
23003
- re.test(allFormGroupedElements[id].group) && re2.test(allFormGroupedElements[id].group)
23004
- ||
23005
- re.test(allFormGroupedElements[id].group)
23006
- ) {
23566
+ // #B923 — a group lists whole ids separated by spaces, so `elId` is matched as one of
23567
+ // them, never inside a longer id: the checkbox `doc` drove the fields of `doc-2`.
23568
+ // was: re = new RegExp(namedId);
23569
+ re = new RegExp('(^|\\s)' + namedId + '(\\s|$)');
23570
+ // #B929 — the second test is gone: its result never mattered (`re && re2 || re` is `re`), and
23571
+ // building it from the raw group threw for a master id holding `(`.
23572
+ // was: re2 = new RegExp(group);
23573
+ // was: if ( re.test(allFormGroupedElements[id].group) && re2.test(allFormGroupedElements[id].group) || re.test(allFormGroupedElements[id].group) )
23574
+ if ( re.test(allFormGroupedElements[id].group) ) {
23007
23575
  // init default state: disable all;
23008
23576
  allFormGroupedElements[id].target.disabled = true;
23009
23577
  // adding custom rule for this case
@@ -23112,7 +23680,11 @@ function ValidatorPlugin(rules, data, formId, culture) {
23112
23680
  var checked = $el.checked;
23113
23681
 
23114
23682
  var checkBoxGroup = $el.getAttribute('data-gina-form-element-group') || null;
23115
- var re = new RegExp($el.id.replace(/\-|\_|\@|\#|\.|\[|\]/g, '\\$&'));
23683
+ // #B923 — matched as one whole id of a group, never inside a longer one (`cb-1` drove `cb-10`'s fields).
23684
+ // was: var re = new RegExp($el.id.replace(/\-|\_|\@|\#|\.|\[|\]/g, '\\$&'));
23685
+ // #B929 — every regexp character of the id is escaped.
23686
+ // was: var re = new RegExp('(^|\\s)' + $el.id.replace(/\-|\_|\@|\#|\.|\[|\]/g, '\\$&') + '(\\s|$)');
23687
+ var re = new RegExp('(^|\\s)' + $el.id.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + '(\\s|$)');
23116
23688
  // set to checked if not checked: false -> true
23117
23689
  if ( !checked || checked == 'null' || checked == 'false' || checked == '' ) {
23118
23690
 
@@ -23164,7 +23736,11 @@ function ValidatorPlugin(rules, data, formId, culture) {
23164
23736
  };
23165
23737
 
23166
23738
  var updateGroupChildrenState = function($groupMaster) {
23167
- var re = new RegExp($groupMaster.id.replace(/\-|\_|\@|\#|\.|\[|\]/g, '\\$&'));
23739
+ // #B923 — matched as one whole id of a group, never inside a longer one.
23740
+ // was: var re = new RegExp($groupMaster.id.replace(/\-|\_|\@|\#|\.|\[|\]/g, '\\$&'));
23741
+ // #B929 — every regexp character of the id is escaped.
23742
+ // was: var re = new RegExp('(^|\\s)' + $groupMaster.id.replace(/\-|\_|\@|\#|\.|\[|\]/g, '\\$&') + '(\\s|$)');
23743
+ var re = new RegExp('(^|\\s)' + $groupMaster.id.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + '(\\s|$)');
23168
23744
  // Handle extended groups
23169
23745
  for (let id in allFormGroupedElements) {
23170
23746
  if (
@@ -23177,29 +23753,54 @@ function ValidatorPlugin(rules, data, formId, culture) {
23177
23753
  }
23178
23754
  }
23179
23755
 
23180
- // When binding children element to the radio, you must used the radio.id as the element group
23181
- // Because the name attribute of the radio can also be used to group multiple radio field
23182
- // On master: <input type="radio" id="invoice-type-balance" name="action[addFromExisting]" value="balanceFlow">
23183
- // On children: <input type="checkbox" data-gina-form-element-group="invoice-type-balance" value="someValue">
23756
+ /**
23757
+ * Applies the radio `$el`'s state to the fields that depend on it: every grouped element
23758
+ * whose `data-gina-form-element-group` holds `$el`'s id (as one of its space-separated ids, #B923) is
23759
+ * enabled and included while `$el` is checked, disabled and excluded otherwise; then each
23760
+ * checkbox among them passes its own state on to the fields that name it
23761
+ * (updateGroupChildrenState). updateRadio runs it for every radio at bind, for the clicked
23762
+ * radio, and for each peer a checked radio unchecks. The fields of other masters, and a
23763
+ * field whose group names no element, are left as they are (#B919).
23764
+ *
23765
+ * A dependent field names the master's id, not its name: the name groups the radios.
23766
+ *
23767
+ * @example
23768
+ * <input type="radio" id="plan-annual" name="plan" value="annual">
23769
+ * <input type="hidden" name="discountCode" value="A10" data-gina-form-element-group="plan-annual">
23770
+ *
23771
+ * @inner
23772
+ * @param {HTMLInputElement} $el - the radio
23773
+ * @param {boolean} [isOnResetMode] - passed for a peer the click unchecked; not otherwise used
23774
+ * @returns {undefined}
23775
+ */
23184
23776
  var handleGroupDependencies = function($el, isOnResetMode) {
23185
23777
  isOnResetMode = ( typeof(isOnResetMode) != 'undefined' && isOnResetMode) ? true: false;
23186
23778
 
23187
23779
  //console.debug('reset: '+isOnResetMode, $el.id, $el.checked);
23188
- var extendedGroupName = $el.id.replace(/\-|\_|\@|\#|\.|\[|\]/g, '\\$&')
23780
+ // #B929 — every regexp character of the id is escaped.
23781
+ // was: var extendedGroupName = $el.id.replace(/\-|\_|\@|\#|\.|\[|\]/g, '\\$&')
23782
+ var extendedGroupName = $el.id.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
23189
23783
  , re = null
23190
23784
  ;
23191
23785
  // parse grouped elements: allFormGroupedElements
23192
23786
  // init
23193
- re = new RegExp(extendedGroupName);
23787
+ // #B923 — matched as one whole id of a group, never inside a longer one (`opt` drove `opt-2`'s fields).
23788
+ // was: re = new RegExp(extendedGroupName);
23789
+ re = new RegExp('(^|\\s)' + extendedGroupName + '(\\s|$)');
23194
23790
  for (let id in allFormGroupedElements) {
23195
- if (!/checkbox|radio/i.test(allFormGroupedElements[id].target.type)) {
23196
- allFormGroupedElements[id].target.disabled = true;
23197
- // adding custom rule for this case
23198
- if ( typeof($form.rules[ allFormGroupedElements[id].name ]) == 'undefined' ) {
23199
- $form.rules[ allFormGroupedElements[id].name ] = {}
23200
- }
23201
- $form.rules[ allFormGroupedElements[id].name ].exclude = true;
23202
- }
23791
+ // #B919 — was: the branch below disabled, and excluded, EVERY grouped field that is
23792
+ // not a radio or a checkbox, whichever radio this runs for; only the next branch
23793
+ // re-enabled the fields of $el's own group. So a radio click, or the bind of a later
23794
+ // radio, turned off the fields of every other checked master (a checkbox master's too)
23795
+ // and of a group naming no element. A field now changes only with a master it names.
23796
+ // if (!/checkbox|radio/i.test(allFormGroupedElements[id].target.type)) {
23797
+ // allFormGroupedElements[id].target.disabled = true;
23798
+ // // adding custom rule for this case
23799
+ // if ( typeof($form.rules[ allFormGroupedElements[id].name ]) == 'undefined' ) {
23800
+ // $form.rules[ allFormGroupedElements[id].name ] = {}
23801
+ // }
23802
+ // $form.rules[ allFormGroupedElements[id].name ].exclude = true;
23803
+ // }
23203
23804
 
23204
23805
  if (
23205
23806
  re.test(allFormGroupedElements[id].group)
@@ -23330,7 +23931,11 @@ function ValidatorPlugin(rules, data, formId, culture) {
23330
23931
  && allFormGroupNames.indexOf($inputs[i].id) > -1
23331
23932
  ) {
23332
23933
  // updateGroupChildrenState($inputs[i]);
23333
- let re = new RegExp( $inputs[i].id.replace(/\-|\_|\@|\#|\.|\[|\]/g, '\\$&') );
23934
+ // #B923 — matched as one whole id of a group, never inside a longer one.
23935
+ // was: let re = new RegExp( $inputs[i].id.replace(/\-|\_|\@|\#|\.|\[|\]/g, '\\$&') );
23936
+ // #B929 — every regexp character of the id is escaped.
23937
+ // was: let re = new RegExp( '(^|\\s)' + $inputs[i].id.replace(/\-|\_|\@|\#|\.|\[|\]/g, '\\$&') + '(\\s|$)' );
23938
+ let re = new RegExp( '(^|\\s)' + $inputs[i].id.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + '(\\s|$)' );
23334
23939
  for (let childElement in allFormGroupedElements ) {
23335
23940
  if ( re.test(allFormGroupedElements[childElement].group) ) {
23336
23941
  allFormGroupedElements[childElement].target.disabled = true;
@@ -24062,10 +24667,19 @@ function ValidatorPlugin(rules, data, formId, culture) {
24062
24667
  } else {
24063
24668
  // update rule in case the current event is triggered outside the main sequence
24064
24669
  // e.g.: form `id` attribute rewritten on the fly
24670
+ // #B931 — the record's own copy first: that is where this form's checks and
24671
+ // its binding wrote the state they derived from its markup (`exclude` on
24672
+ // grouped fields, `isBoolean` on a boolean checkbox). Resolving by name read
24673
+ // the registry object instead, which every form bound to the rule set used
24674
+ // to share and which the copy no longer feeds. By name only when no record
24675
+ // answers to the current id.
24065
24676
  _id = $target.getAttribute('id');
24066
24677
  var customRule = $target.getAttribute('data-gina-form-rule');
24067
24678
 
24068
- if ( customRule ) { // 'data-gina-form-rule'
24679
+ // was: if ( customRule ) { rule = getRuleObjByName(<the attribute, dotted>) } else { rule = getRuleObjByName(<_id, dotted>) }
24680
+ if ( typeof(instance.$forms[_id]) != 'undefined' && typeof(instance.$forms[_id].rules) != 'undefined' ) {
24681
+ rule = instance.$forms[_id].rules;
24682
+ } else if ( customRule ) { // 'data-gina-form-rule'
24069
24683
  rule = getRuleObjByName(customRule.replace(/\-|\//g, '.'))
24070
24684
  } else {
24071
24685
  rule = getRuleObjByName(_id.replace(/\-/g, '.'))
@@ -24360,7 +24974,10 @@ function ValidatorPlugin(rules, data, formId, culture) {
24360
24974
  // an unchecked non-boolean radio group with a truthy isRequired
24361
24975
  // is collected as an empty value so the submit-path validation
24362
24976
  // can adjudicate it (see the twin arm there for the rationale).
24363
- $target[i].type == 'radio'
24977
+ // #B926 — and an unticked value-carrying checkbox whose own rule says
24978
+ // isRequired, as there (« must be ticked »).
24979
+ // was: $target[i].type == 'radio'
24980
+ /^(radio|checkbox)$/i.test($target[i].type)
24364
24981
  && rules
24365
24982
  && typeof(rules[name]) != 'undefined'
24366
24983
  && /^true$/i.test(rules[name].isRequired)
@@ -24407,9 +25024,14 @@ function ValidatorPlugin(rules, data, formId, culture) {
24407
25024
  } else {
24408
25025
  // update rule in case the current event is triggered outside the main sequence
24409
25026
  // e.g.: form `id` attribute rewritten on the fly
25027
+ // #B931 — the record's own copy first, by name only when no record answers to
25028
+ // the current id: see the click proxy above for the reason.
24410
25029
  var customRule = $target.getAttribute('data-gina-form-rule');
24411
25030
 
24412
- if ( customRule ) { // 'data-gina-form-rule'
25031
+ // was: if ( customRule ) { rule = getRuleObjByName(<the attribute, dotted>) } else { rule = getRuleObjByName(<id, dotted>) }
25032
+ if ( $formInstance && typeof($formInstance.rules) != 'undefined' ) {
25033
+ rule = $formInstance.rules;
25034
+ } else if ( customRule ) { // 'data-gina-form-rule'
24413
25035
  rule = getRuleObjByName(customRule.replace(/\-|\//g, '.'))
24414
25036
  } else {
24415
25037
  rule = getRuleObjByName(id.replace(/\-/g, '.'))
@@ -25051,7 +25673,10 @@ function ValidatorPlugin(rules, data, formId, culture) {
25051
25673
  * unchecked non-boolean group whose rule declares a truthy `isRequired`
25052
25674
  * is collected as an empty string (#B221) so the rule engine can
25053
25675
  * adjudicate it; any other unchecked group stays absent (native parity;
25054
- * boolean-declared groups are owned by the force-false arm).
25676
+ * boolean-declared groups are owned by the force-false arm). An unticked
25677
+ * value-carrying checkbox whose own rule declares a truthy `isRequired` is
25678
+ * collected as an empty string the same way (#B926): `isRequired` on it
25679
+ * means « must be ticked ». A boolean checkbox posts its live state instead.
25055
25680
  *
25056
25681
  * @param {object} $form - form target (DOMObject), not the instance
25057
25682
  * @param {object} [rules]
@@ -25225,7 +25850,16 @@ function ValidatorPlugin(rules, data, formId, culture) {
25225
25850
  // absent-when-unchecked shape (boolean groups are owned by
25226
25851
  // the force-false arm above; optional groups bypass on
25227
25852
  // empty anyway, so their wire shape stays byte-identical).
25228
- $form[i].type == 'radio'
25853
+ // #B926 — an unticked value-carrying CHECKBOX whose own rule says
25854
+ // isRequired is collected the same way: `isRequired` on it means
25855
+ // « must be ticked » (several boxes under one name: at least one;
25856
+ // distinct names: each), as it does for a radio group. A boolean box
25857
+ // never reaches this arm (the isBooleanCheckbox arm above owns it), and
25858
+ // an unticked box with no rule, `isRequired: false` or an `isBoolean`
25859
+ // rule stays absent, as before. Until now no arm admitted the shape, so
25860
+ // the form posted without the box and no rule judged it, on either side.
25861
+ // was: $form[i].type == 'radio'
25862
+ /^(radio|checkbox)$/i.test($form[i].type)
25229
25863
  && rules
25230
25864
  && typeof(rules[name]) != 'undefined'
25231
25865
  && /^true$/i.test(rules[name].isRequired)
@@ -25509,7 +26143,9 @@ function ValidatorPlugin(rules, data, formId, culture) {
25509
26143
  * @param {object} $formOrElement - ${form|element}.target (DOMObject)
25510
26144
  * @param {object} fields
25511
26145
  * @param {object} $fields
25512
- * @param {object} rules
26146
+ * @param {object} rules - the rule set to apply. The pass works on a copy of it (#B885): a
26147
+ * `_case_` application, an exclusion or a RegExp alias found during the pass never reaches
26148
+ * the object the caller holds
25513
26149
  * @param {callback} cb
25514
26150
  * @param {string} [culture] // #i18n — server form-body path only; forwarded to FormValidator
25515
26151
  */
@@ -25532,6 +26168,20 @@ function ValidatorPlugin(rules, data, formId, culture) {
25532
26168
  && /true/i.test($formOrElement.form.dataset.ginaFormLiveCheckEnabled)
25533
26169
  ) ? true : false;
25534
26170
  rules = getDynamisedRules(stringifiedRules, fields, $fields, isLiveCheckingOnASingleElement)
26171
+ } else {
26172
+ // #B885 — a pass works on its own copy of the rules, as the `$` branch above already
26173
+ // does (getDynamisedRules parses one from the string). forEachField writes into the
26174
+ // rule set it is handed: a matching `_case_` condition's rules over the field's own
26175
+ // (`rules[_r] = …`, three sites), `{ exclude: true }` over an unchecked optional
26176
+ // checkbox, a RegExp alias under the field's name — and merge() mutates its first
26177
+ // argument, the condition's own rule object. Written into the caller's object, those
26178
+ // outlived the pass: a case rule stayed applied after its driver changed back and the
26179
+ // form refused a valid submit; a checkbox ticked after a pass stayed excluded from the
26180
+ // data (#B913); and through the registry object the click and submit passes read,
26181
+ // one form's state reached another form bound to the same rule set. JSON.clone
26182
+ // copies plain objects and arrays and keeps anything else (a RegExp condition) by
26183
+ // reference.
26184
+ rules = JSON.clone(rules);
25535
26185
  }
25536
26186
  var id = null
25537
26187
  , evt = null
@@ -26036,6 +26686,30 @@ function ValidatorPlugin(rules, data, formId, culture) {
26036
26686
  }
26037
26687
 
26038
26688
  var allRules = ( typeof(rules) != 'undefined' ) ? JSON.clone(rules) : {};
26689
+ /**
26690
+ * Adjudicate the collected fields of one pass against `rules`, applying the `_case_`
26691
+ * conditions on the way; a driver's matching condition recurses with that condition's
26692
+ * own rules. It writes into `rules` (a matching condition's rules over a field's own,
26693
+ * `{ exclude: true }` over a disabled checkbox or an unticked value-carrying one whose
26694
+ * rule says isRequired: false), which is why validate() hands it a copy (#B885). An
26695
+ * unticked boolean checkbox keeps its own rule and posts `false` (#B916). A radio or
26696
+ * checkbox group that a matching condition requires and the pass never collected is
26697
+ * entered as '' and adjudicated once (#B914). Every condition of a block is matched
26698
+ * against its driver's value (#B920); a `case` written `/pattern/flags` is a regular
26699
+ * expression tested against that value (#B918).
26700
+ *
26701
+ * @inner
26702
+ * @param {object} $formOrElement - the form, or the element of a single-element pass
26703
+ * @param {object} allFields - every collected value of the form; the drivers' values are read here
26704
+ * @param {object} allRules - the pass-entry copy of the rules, unchanged by a recursion
26705
+ * @param {object} fields - the collected values this level walks
26706
+ * @param {object} $fields - the controls by name (a group's first member); null on the server path
26707
+ * @param {object} rules - the rules this level applies (a condition's own rules inside a recursion)
26708
+ * @param {function} [cb] - the pass callback, dispatched with `validated.<id>`
26709
+ * @param {number} i - recursion depth, 0 at the top level
26710
+ * @returns {{isValid: function, error: object, data: object}|undefined} the result, when the
26711
+ * last level runs with no callback
26712
+ */
26039
26713
  var forEachField = function($formOrElement, allFields, allRules, fields, $fields, rules, cb, i) {
26040
26714
 
26041
26715
 
@@ -26046,10 +26720,137 @@ function ValidatorPlugin(rules, data, formId, culture) {
26046
26720
  var localFieldType = null;
26047
26721
  var caseValueBackup = null; // #B229 — see the `caseName == field` arm below
26048
26722
  var baseValueBackup = null; // #B230 — see the base-rule restore below
26723
+ var caseRegExp = null; // #B918 — see getCaseRegExp and the condition filter below
26724
+ var caseRegExpKeyNames = null; // #B921 — see expandCaseRegExpKeys and the direct-case loop below
26725
+
26726
+ /**
26727
+ * expandCaseRegExpKeys
26728
+ * #B921 — gives each control a RegExp KEY of a `_case_` condition's `rules` matches
26729
+ * (`"/^item[/": { isRequired: true }`) a literal key of its own in that condition, holding a
26730
+ * copy of the key's rules, so the condition applies to it as it does to a field it names, in
26731
+ * every block position and for every case shape. The condition scan below skips a key that
26732
+ * names no control (`!$fields[_r]`), so a RegExp key was skipped there, and only the
26733
+ * direct-case recursion of a driver that is not the last `_case_` key expanded it: a RegExp
26734
+ * key applied only when its block was not the last. The key is read as a top-level RegExp
26735
+ * key is (`checkForRuleAlias`): `[` and `]` literal, the flags kept. A literal key of the
26736
+ * condition wins, then the first RegExp key that matches; the block's driver is left out;
26737
+ * a pattern the engine rejects warns and is skipped. It writes into `levelRules`, which is
26738
+ * the pass's own copy (#B885), once per level, and returns the names it added, which the
26739
+ * direct-case loop below skips because its own RegExp branch covers them, as before.
26740
+ * Without controls (the server path) nothing is added. Declared here, inside forEachField,
26741
+ * so the function stays self-contained.
26742
+ *
26743
+ * @inner
26744
+ * @param {object} levelRules - the rules this level applies (written in place)
26745
+ * @param {object} $levelFields - the controls by name; null on the server path
26746
+ * @returns {object} the names added, keyed `<_case_ key>|<condition index>`, then by name
26747
+ *
26748
+ * @example
26749
+ * // levelRules: { _case_kind: { conditions: [{ case: 'pro', rules: { '/^item[/': { isRequired: true } } }] } }
26750
+ * // controls: item[0][amount], item[1][amount], kind
26751
+ * expandCaseRegExpKeys(levelRules, $fields);
26752
+ * // -> { '_case_kind|0': { 'item[0][amount]': true, 'item[1][amount]': true } }, and the condition's
26753
+ * // rules now also hold 'item[0][amount]' and 'item[1][amount]', each { isRequired: true }
26754
+ */
26755
+ var expandCaseRegExpKeys = function(levelRules, $levelFields) {
26756
+ var added = {};
26757
+ // a copy of plain rule data (objects and arrays); anything else is kept as it is
26758
+ var copyRuleValue = function(value) {
26759
+ var copy = null, k = null;
26760
+ if ( Array.isArray(value) ) {
26761
+ copy = [];
26762
+ for (k = 0; k < value.length; ++k) {
26763
+ copy[k] = copyRuleValue(value[k]);
26764
+ }
26765
+ return copy;
26766
+ }
26767
+ if ( value && typeof(value) == 'object' && Object.prototype.toString.call(value) == '[object Object]' ) {
26768
+ copy = {};
26769
+ for (k in value) {
26770
+ if ( Object.prototype.hasOwnProperty.call(value, k) ) {
26771
+ copy[k] = copyRuleValue(value[k]);
26772
+ }
26773
+ }
26774
+ return copy;
26775
+ }
26776
+ return value;
26777
+ };
26778
+ if ( !levelRules || typeof(levelRules) != 'object' || !$levelFields ) {
26779
+ return added;
26780
+ }
26781
+ for (var ck in levelRules) {
26782
+ if ( !/^\_case\_/.test(ck) || !levelRules[ck] || !Array.isArray(levelRules[ck].conditions) ) continue;
26783
+ var driver = ck.replace(/^\_case\_/, '');
26784
+ for (var ci = 0, ciLen = levelRules[ck].conditions.length; ci < ciLen; ++ci) {
26785
+ var condRules = ( levelRules[ck].conditions[ci] ) ? levelRules[ck].conditions[ci].rules : null;
26786
+ if ( !condRules || typeof(condRules) != 'object' ) continue;
26787
+ var keys = Object.keys(condRules);
26788
+ for (var ki = 0, kiLen = keys.length; ki < kiLen; ++ki) {
26789
+ if ( !/^\//.test(keys[ki]) ) continue;
26790
+ var keyRe = null;
26791
+ try {
26792
+ var keyPattern = keys[ki].match(/\/(.*)\//).pop();
26793
+ keyRe = new RegExp(keyPattern.replace(/\[/g, '\\[').replace(/\]/g, '\\]'), keys[ki].replace('/'+ keyPattern +'/', ''));
26794
+ } catch (err) {
26795
+ console.warn('[ ginaFormValidator ] the rule key `'+ keys[ki] +'` of `'+ ck +'` cannot be read as a regular expression ('+ err.message +'): it is skipped');
26796
+ continue;
26797
+ }
26798
+ for (var name in $levelFields) {
26799
+ keyRe.lastIndex = 0;
26800
+ if ( name == driver || typeof(condRules[name]) != 'undefined' || !keyRe.test(name) ) continue;
26801
+ condRules[name] = copyRuleValue(condRules[keys[ki]]);
26802
+ if ( !added[ck +'|'+ ci] ) {
26803
+ added[ck +'|'+ ci] = {};
26804
+ }
26805
+ added[ck +'|'+ ci][name] = true;
26806
+ }
26807
+ }
26808
+ }
26809
+ }
26810
+ return added;
26811
+ };
26812
+
26813
+ /**
26814
+ * getCaseRegExp
26815
+ * #B918 — reads a condition's `case` written `/pattern/flags` (e.g. `"/^individual$/"`)
26816
+ * and returns the regular expression it describes; any other `case` (a value, an Array of
26817
+ * values, a string without a closing slash) returns null and is compared as a value. The
26818
+ * pattern is taken as written: unlike a RegExp rule KEY, whose square brackets are escaped
26819
+ * because it matches field names such as `items[0]`, a case pattern matches the driver's
26820
+ * value, so `[ab]` stays a character class. A pattern the browser rejects warns and
26821
+ * returns null, so it is compared as a value, as every slash-delimited case was before.
26822
+ * Declared here, inside forEachField, so the function stays self-contained.
26823
+ *
26824
+ * @inner
26825
+ * @param {*} caseDef - a condition's `case`
26826
+ * @returns {RegExp|null} the regular expression, or null when `caseDef` is not one
26827
+ *
26828
+ * @example
26829
+ * getCaseRegExp('/^(a|b)$/i').test('A'); // true
26830
+ * getCaseRegExp('a'); // null: compared as a value
26831
+ */
26832
+ var getCaseRegExp = function(caseDef) {
26833
+ if ( typeof(caseDef) != 'string' ) {
26834
+ return null;
26835
+ }
26836
+ var m = caseDef.match(/^\/(.*)\/([a-z]*)$/);
26837
+ if ( !m ) {
26838
+ return null;
26839
+ }
26840
+ try {
26841
+ return new RegExp(m[1], m[2]);
26842
+ } catch (err) {
26843
+ console.warn('[ ginaFormValidator ] the `_case_` condition `'+ caseDef +'` is not a valid regular expression ('+ err.message +'): it is compared as a value');
26844
+ return null;
26845
+ }
26846
+ };
26049
26847
 
26050
26848
  //console.debug('parsing ', fields, $fields, rules);
26051
26849
  if ( typeof(rules) != 'undefined' ) {
26052
26850
 
26851
+ // #B921 — see expandCaseRegExpKeys
26852
+ caseRegExpKeyNames = expandCaseRegExpKeys(rules, $fields);
26853
+
26053
26854
  for (var field in fields) {
26054
26855
 
26055
26856
  // `$fields` is null on the server auto path (backendInit), and a rule
@@ -26084,11 +26885,15 @@ function ValidatorPlugin(rules, data, formId, culture) {
26084
26885
  && $fields[field].tagName.toLowerCase() == 'input'
26085
26886
  && /^(checkbox)$/i.test(localFieldType)
26086
26887
  ) {
26888
+ // #B916: an unticked boolean checkbox keeps its own rule, so it posts its
26889
+ // live state, `false` (#49). Only a disabled box, or an unticked value-carrying
26890
+ // one whose rule says isRequired: false, is left out of the data.
26087
26891
  if (
26088
26892
  !$fields[field].checked
26089
26893
  && typeof(rules[field]) != 'undefined'
26090
26894
  && typeof(rules[field].isRequired) != 'undefined'
26091
26895
  && /^(false)$/i.test(rules[field].isRequired)
26896
+ && !isBooleanCheckbox($fields[field], rules[field])
26092
26897
  ||
26093
26898
  $fields[field].disabled
26094
26899
  ) {
@@ -26311,13 +27116,29 @@ function ValidatorPlugin(rules, data, formId, culture) {
26311
27116
  // filtering conditions
26312
27117
  for (var _c = 0, _cLen = rules[c].conditions.length; _c < _cLen; ++_c) {
26313
27118
 
27119
+ // #B918 — a `case` written `/pattern/flags` is tested against the
27120
+ // driver's value. It was compared as a string, so it never matched
27121
+ // and neither its requirements nor its excludes applied. A value or
27122
+ // an Array of values is compared as before.
27123
+ // was:
27124
+ // if (
27125
+ // Array.isArray(rules[c].conditions[_c].case)
27126
+ // && rules[c].conditions[_c].case.indexOf(caseValue) == -1
27127
+ // ||
27128
+ // !Array.isArray(rules[c].conditions[_c].case)
27129
+ // && rules[c].conditions[_c].case != caseValue
27130
+ // ) {
27131
+ caseRegExp = getCaseRegExp(rules[c].conditions[_c].case);
26314
27132
  if (
26315
27133
  Array.isArray(rules[c].conditions[_c].case)
26316
27134
  && rules[c].conditions[_c].case.indexOf(caseValue) == -1
26317
27135
  ||
27136
+ caseRegExp
27137
+ && !caseRegExp.test(caseValue)
27138
+ ||
26318
27139
  !Array.isArray(rules[c].conditions[_c].case)
27140
+ && !caseRegExp
26319
27141
  && rules[c].conditions[_c].case != caseValue
26320
-
26321
27142
  ) {
26322
27143
  continue;
26323
27144
  }
@@ -26326,6 +27147,9 @@ function ValidatorPlugin(rules, data, formId, culture) {
26326
27147
  for (var _r in rules[c].conditions[_c].rules) {
26327
27148
  if (/^_comment$/i.test(_r)) continue;
26328
27149
  // ignore if we are testing on caseField or if $field does not exist
27150
+ // (#B921: a RegExp key never passes this guard, no control bears its name; each
27151
+ // control it matches has its own literal key since expandCaseRegExpKeys, so the
27152
+ // RegExp branch below is not reached)
26329
27153
  if (_r == caseName || !$fields[_r]) continue;
26330
27154
  //if (_r == caseName || !$fields[caseName]) continue;
26331
27155
  // ok, not the current case but still,
@@ -26383,7 +27207,16 @@ function ValidatorPlugin(rules, data, formId, culture) {
26383
27207
  // depending on the case value, replace/merge original rule with condition rule
26384
27208
  //caseField = c.replace(/^\_case\_/, '');
26385
27209
  caseField = _r;
26386
- caseValue = fields[caseField];
27210
+ // #B920 — this branch no longer writes `caseValue`. It stored
27211
+ // the named field's value there (a boolean when that field's
27212
+ // rule says isBoolean) and nothing here read it: the next reader
27213
+ // was the filter of the block's NEXT condition, which then
27214
+ // compared its `case` with this field's value instead of the
27215
+ // driver's, so a later condition whose case equalled it
27216
+ // applied. `caseValue` keeps the driver's value for every
27217
+ // condition of the block.
27218
+ // was:
27219
+ // caseValue = fields[caseField];
26387
27220
 
26388
27221
  if ( typeof($fields[caseField]) == 'undefined' ) {
26389
27222
  console.warn('ignoring case `'+ caseField +'`: field `'+ +'` not found in your DOM');
@@ -26395,15 +27228,16 @@ function ValidatorPlugin(rules, data, formId, culture) {
26395
27228
  // }
26396
27229
  // caseValue = allFields[caseField];
26397
27230
  // boolean caseValue
26398
- if (
26399
- isGFFCtx
26400
- && /^(true|false)$/i.test(caseValue)
26401
- && typeof(rules[caseField]) != 'undefined'
26402
- && typeof(rules[caseField].isBoolean) != 'undefined'
26403
- && /^(true)$/i.test(rules[caseField].isBoolean)
26404
- ) {
26405
- caseValue = ( /^(true)$/i.test(caseValue) ) ? true : false;
26406
- }
27231
+ // #B920 — was (the coercion of the value written above):
27232
+ // if (
27233
+ // isGFFCtx
27234
+ // && /^(true|false)$/i.test(caseValue)
27235
+ // && typeof(rules[caseField]) != 'undefined'
27236
+ // && typeof(rules[caseField].isBoolean) != 'undefined'
27237
+ // && /^(true)$/i.test(rules[caseField].isBoolean)
27238
+ // ) {
27239
+ // caseValue = ( /^(true)$/i.test(caseValue) ) ? true : false;
27240
+ // }
26407
27241
 
26408
27242
  if (
26409
27243
  //rules[c].conditions[_c].case == caseValue
@@ -26418,6 +27252,34 @@ function ValidatorPlugin(rules, data, formId, culture) {
26418
27252
  rules[_r] = localRuleObj;
26419
27253
  }
26420
27254
 
27255
+ // #B914 — a radio or checkbox group this matching condition
27256
+ // requires, which the pass never collected: the collector leaves
27257
+ // an unchecked group out unless the field's OWN rule says
27258
+ // isRequired (#B221), so a group required only through the case
27259
+ // reached the check below with no value and was never refused on
27260
+ // the pass. It was refused from the second pass on, once the case
27261
+ // rule had been written into the stored rules (the #B885
27262
+ // persistence) and the collector read it there; a `$`-bearing
27263
+ // rule set, which always worked on a copy, never refused it. Enter
27264
+ // it as '', the value #B221 collects, so isRequired adjudicates it
27265
+ // here, once per pass: a group the engine already holds (`d[_r]`:
27266
+ // collected, or entered by an earlier field's scan) is left alone.
27267
+ // A staged file input is also uncollected and is left out: its
27268
+ // data travels in its hidden fields. A condition that does not
27269
+ // match, or does not require the group, enters nothing, so the
27270
+ // posted data is unchanged. The guard above already skips the
27271
+ // driver and a name with no control in `$fields`.
27272
+ if (
27273
+ typeof(fields[_r]) == 'undefined'
27274
+ && typeof(d[_r]) == 'undefined'
27275
+ && /^(radio|checkbox)$/i.test($fields[_r].type)
27276
+ && localRuleObj
27277
+ && /^true$/i.test(localRuleObj.isRequired)
27278
+ ) {
27279
+ fields[_r] = '';
27280
+ d.addField(_r, fields[_r]);
27281
+ }
27282
+
26421
27283
  // check each field against rule only if rule exists 2/3
26422
27284
  //if ( caseName != _r && typeof(rules[_r]) != 'undefined' ) {
26423
27285
  if ( caseName != _r && typeof(rules[_r]) != 'undefined' && typeof(fields[_r]) != 'undefined' ) {
@@ -26549,6 +27411,13 @@ function ValidatorPlugin(rules, data, formId, culture) {
26549
27411
  }
26550
27412
  for (var f in conditions[c]['rules']) {
26551
27413
  if (/^_comment$/i.test(f)) continue;
27414
+ // #B921 — a name expandCaseRegExpKeys added for a RegExp key of this
27415
+ // condition: the RegExp branch below covers it, as it did before
27416
+ if (
27417
+ caseRegExpKeyNames
27418
+ && caseRegExpKeyNames['_case_' + field + '|' + c]
27419
+ && caseRegExpKeyNames['_case_' + field + '|' + c][f]
27420
+ ) continue;
26552
27421
  //console.debug('F: ', f, '\nrule: '+ JSON.stringify(conditions[c]['rules'][f], null, 2));
26553
27422
  if ( /^\//.test(f) ) { // RegExp found
26554
27423
 
@@ -26658,7 +27527,11 @@ function ValidatorPlugin(rules, data, formId, culture) {
26658
27527
  var errors = d['getErrors']();
26659
27528
  // adding data attribute to handle display refresh
26660
27529
  for (var field in errors) {
26661
- for (rule in errors[field]) {
27530
+ // #B880 — declared: the undeclared loop variable wrote a GLOBAL `rule` (sloppy
27531
+ // mode) on the first validation that found an error, which reBindForm then read
27532
+ // (#B802). Block-scoped, it shadows nothing else in forEachField.
27533
+ // was: for (rule in errors[field])
27534
+ for (let rule in errors[field]) {
26662
27535
  if (!fieldErrorsAttributes[field]) {
26663
27536
  fieldErrorsAttributes[field] = ''
26664
27537
  }
@@ -31823,7 +32696,10 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
31823
32696
  *
31824
32697
  * A key holding a dot is a property path (`'address.city'`), also inside an
31825
32698
  * array of objects (`'reviews[*].ratings.score'`). A dotted key that is not a
31826
- * property path matches nothing.
32699
+ * property path matches nothing. A single field after `[*]` (`'tags[*].label'`)
32700
+ * is read from each element of the array and compared like a plain key: a row
32701
+ * matches when one element matches, and an element that is not an object (a
32702
+ * string, a number, `null`) is compared as itself.
31827
32703
  *
31828
32704
  * Query results (`find`, `orderBy`, `limit`, `notIn`, …) are Arrays carrying
31829
32705
  * these methods, so calls chain. Their `filter` takes either a function, which
@@ -31842,7 +32718,8 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
31842
32718
  * and the value `not null`, in any case, matches every defined, non-null
31843
32719
  * value. `{ searchOptionRules: { skipEval: true } }`, passed to the
31844
32720
  * constructor, turns the comparison off for the plain (non-dotted) keys of
31845
- * that Collection; it changes neither `not null` nor a dotted key.
32721
+ * that Collection and for a single field after `[*]`; it changes neither
32722
+ * `not null` nor a property path.
31846
32723
  *
31847
32724
  * @class Collection
31848
32725
  * @constructor
@@ -31866,7 +32743,7 @@ if ( ( typeof(module) !== 'undefined' ) && module.exports ) {
31866
32743
  * // find — nested
31867
32744
  * col.find({ 'address.city': 'Paris' });
31868
32745
  * // find — within array
31869
- * col.find({ 'tags[*].label': 'news' });
32746
+ * col.find({ 'tags[*].label': 'news' }); // the rows holding an element { label: 'news' }
31870
32747
  * // OR clause (pass two filter objects)
31871
32748
  * col.or().find({ name: 'Alice' }, { name: 'Bob' });
31872
32749
  *
@@ -32070,7 +32947,8 @@ function Collection(content, options) {
32070
32947
  * `isCaseSensitive` (`true` or `false`; the texts `'true'` / `'false'` are
32071
32948
  * read as booleans). `skipEval` is a constructor option
32072
32949
  * (`options.searchOptionRules`): as a top-level key of the object it is
32073
- * accepted and has no effect.
32950
+ * accepted and has no effect, and as the rule of a field, in either form,
32951
+ * it is refused (#B824).
32074
32952
  *
32075
32953
  * @param {object|string} searchOptionObject or searchOptionTargetedProperty - the options keyed by field, or the field name
32076
32954
  * @param {string} [searchRule] - the rule name (three-argument form)
@@ -32080,6 +32958,7 @@ function Collection(content, options) {
32080
32958
  * @throws {Error} on zero, two or more than three arguments
32081
32959
  * @throws {Error} when a single argument is not an object
32082
32960
  * @throws {Error} `<rule> is not an allowed searchOption !` on an unknown rule name
32961
+ * @throws {Error} when a field is given `skipEval`, in either form: the message names the constructor option
32083
32962
  * @throws {Error} when a field's entry in the object form is not an object of rules
32084
32963
  *
32085
32964
  * @example
@@ -32136,6 +33015,12 @@ function Collection(content, options) {
32136
33015
  if ( typeof(searchOptionRules[ruleName]) == 'undefined' )
32137
33016
  throw new Error(ruleName + ' is not an allowed searchOption !');
32138
33017
 
33018
+ // #B824 — as in the three-argument form below: a rule that is not a
33019
+ // table of entries is a constructor option, and set on a field it made
33020
+ // that field match no row.
33021
+ if ( !searchOptionRules[ruleName] || typeof(searchOptionRules[ruleName]) != 'object' )
33022
+ throw new Error('searchOption `' + ruleName + '` cannot be set on a field: it is a constructor option, e.g. new Collection(rows, { searchOptionRules: { ' + ruleName + ': true } })');
33023
+
32139
33024
  if ( /true|false/i.test(given[prop][ruleName]) ) {
32140
33025
  normalized[prop][ruleName] = /true/i.test(given[prop][ruleName]) ? true : false
32141
33026
  } else {
@@ -32154,6 +33039,12 @@ function Collection(content, options) {
32154
33039
  if ( typeof(searchOptionRules[arguments[1]]) == 'undefined' )
32155
33040
  throw new Error(arguments[1] + ' is not an allowed searchOption !');
32156
33041
 
33042
+ // #B824 — a rule that is not a table of entries (`skipEval`, a boolean) is a
33043
+ // constructor option. Set on a field, the search looked the value up in the
33044
+ // rule's table, found nothing, and the field matched no row, with no error.
33045
+ if ( !searchOptionRules[arguments[1]] || typeof(searchOptionRules[arguments[1]]) != 'object' )
33046
+ throw new Error('searchOption `' + arguments[1] + '` cannot be set on a field: it is a constructor option, e.g. new Collection(rows, { searchOptionRules: { ' + arguments[1] + ': true } })');
33047
+
32157
33048
  if (typeof(localSearchOptions[arguments[0]]) == 'undefined')
32158
33049
  localSearchOptions[arguments[0]] = {};
32159
33050
 
@@ -32506,13 +33397,36 @@ function Collection(content, options) {
32506
33397
  }
32507
33398
  }
32508
33399
 
32509
- // if one of the entry matches the given filter, tag the whole entry as matched
33400
+ /**
33401
+ * Search on a `[*]` key: compare the elements of the row's array with
33402
+ * `filter`, and count the condition once when one element matches.
33403
+ *
33404
+ * A single field after `[*]` (`'tags[*].label'`) is read from each
33405
+ * element that is an object, like a plain key is read from a row, and
33406
+ * compared like that plain key (#B823). An element that is not an
33407
+ * object (a string, a number, `null`) is compared as itself. A dotted
33408
+ * rest (`'reviews[*].ratings.score'`) is a property path of each element.
33409
+ *
33410
+ * @inner
33411
+ * @private
33412
+ * @param {*} filter - The filter value, or a comparison (`'>= 4'`)
33413
+ * @param {string} f - The key, e.g. `'tags[*].label'`
33414
+ * @param {object} _content - The row
33415
+ * @param {number} matched - The conditions matched so far
33416
+ * @param {number} i - Not read
33417
+ * @returns {{matched: number}} `matched`, plus one when an element matches
33418
+ *
33419
+ * @example
33420
+ * // row { tags: [{ label: 'News' }, { label: 'Sport' }] }
33421
+ * searchWithin('Sport', 'tags[*].label', row, 0, 0); // { matched: 1 }
33422
+ */
32510
33423
  var searchWithin = function(filter, f, _content, matched, i) {
32511
33424
 
32512
33425
  var collectionName = null
32513
33426
  , collection = null
32514
33427
  , arr = null
32515
- , field = null;
33428
+ , field = null
33429
+ , elementValue = null;
32516
33430
 
32517
33431
 
32518
33432
  arr = f.split(/\[\*\]/g);
@@ -32536,7 +33450,14 @@ function Collection(content, options) {
32536
33450
 
32537
33451
  } else { // normal case
32538
33452
 
32539
- searchResult = search(filter, field, collection[c], subMatched, searchOptionRules);
33453
+ // #B823 — the whole element was handed to search(), whose every
33454
+ // branch refuses an object, so a plain sub-field of an array of
33455
+ // objects (`'tags[*].label'`) matched nothing. An object element
33456
+ // now gives its field, like a plain key gives its value (below);
33457
+ // an element that is not an object is compared as itself, as before.
33458
+ // searchResult = search(filter, field, collection[c], subMatched, searchOptionRules);
33459
+ elementValue = ( collection[c] !== null && typeof(collection[c]) == 'object' ) ? collection[c][field] : collection[c];
33460
+ searchResult = search(filter, field, elementValue, subMatched, searchOptionRules);
32540
33461
  subMatched = searchResult.matched;
32541
33462
  }
32542
33463
 
@@ -32660,9 +33581,11 @@ function Collection(content, options) {
32660
33581
  * .findOne({name: 'my project'})
32661
33582
  *
32662
33583
  *
32663
- * Available options :
33584
+ * Search option, set with `setSearchOption()` before the call:
32664
33585
  * isCaseSensitive: [true|false] - set to true by default
32665
- * skipEval: [true|false] - set to false by default
33586
+ *
33587
+ * `skipEval` is not a search option: it is a constructor option,
33588
+ * `new Collection(rows, { searchOptionRules: { skipEval: true } })` (#B824).
32666
33589
  *
32667
33590
  * @param {object} filter
32668
33591
  *