gina 0.7.3 → 0.7.4

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 (636) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/README.md +48 -40
  3. package/ROADMAP.md +1 -0
  4. package/bin/cli +33 -4
  5. package/bin/cli-debug +37 -1
  6. package/bin/cmd +18 -0
  7. package/framework/v0.7.4/VERSION +1 -0
  8. package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/js/gina.js +1504 -621
  9. package/framework/v0.7.4/core/asset/plugin/dist/vendor/gina/js/gina.min.js +736 -0
  10. package/framework/v0.7.4/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
  11. package/framework/v0.7.4/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
  12. package/framework/{v0.7.3 → v0.7.4}/core/config.js +13 -3
  13. package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.js +268 -14
  14. package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-json.js +9 -2
  15. package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-nunjucks.js +88 -9
  16. package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-swig-async.js +87 -7
  17. package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-swig.js +115 -9
  18. package/framework/{v0.7.3 → v0.7.4}/core/gna.js +44 -2
  19. package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/validator/src/form-validator.js +43 -4
  20. package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/validator/src/main.js +847 -515
  21. package/framework/{v0.7.3 → v0.7.4}/core/router.js +139 -40
  22. package/framework/{v0.7.3 → v0.7.4}/core/server.express.js +5 -4
  23. package/framework/{v0.7.3 → v0.7.4}/core/server.isaac.js +93 -10
  24. package/framework/{v0.7.3 → v0.7.4}/core/server.js +348 -46
  25. package/framework/{v0.7.3 → v0.7.4}/helpers/context.js +47 -2
  26. package/framework/{v0.7.3 → v0.7.4}/helpers/data/src/main.js +10 -1
  27. package/framework/{v0.7.3 → v0.7.4}/helpers/prototypes.js +23 -1
  28. package/framework/v0.7.4/lib/cmd/bundle/inc/start-status.js +420 -0
  29. package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/restart.js +71 -1
  30. package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/start.js +207 -41
  31. package/framework/{v0.7.3 → v0.7.4}/lib/cmd/cache/clear.js +39 -8
  32. package/framework/{v0.7.3 → v0.7.4}/lib/cmd/cache/help.txt +3 -4
  33. package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/inc/ps-titles.js +62 -6
  34. package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/init.js +12 -1
  35. package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/restart.js +49 -11
  36. package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/status.js +23 -1
  37. package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/stop.js +150 -48
  38. package/framework/{v0.7.3 → v0.7.4}/lib/cmd/helper.js +24 -0
  39. package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/run.js +6 -0
  40. package/framework/{v0.7.3 → v0.7.4}/lib/cmd/index.js +8 -1
  41. package/framework/{v0.7.3 → v0.7.4}/lib/collection/src/main.js +373 -74
  42. package/framework/{v0.7.3 → v0.7.4}/lib/job/src/main.js +49 -5
  43. package/framework/{v0.7.3 → v0.7.4}/lib/lane/src/main.js +81 -5
  44. package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/main.js +184 -15
  45. package/framework/v0.7.4/lib/logger/src/redact.js +1003 -0
  46. package/framework/{v0.7.3 → v0.7.4}/lib/nunjucks-filters/src/main.js +118 -11
  47. package/framework/{v0.7.3 → v0.7.4}/lib/proc.js +27 -8
  48. package/framework/{v0.7.3 → v0.7.4}/lib/render-cache/src/main.js +97 -0
  49. package/framework/{v0.7.3 → v0.7.4}/lib/routing/src/main.js +140 -14
  50. package/framework/{v0.7.3 → v0.7.4}/lib/sqlite-driver.js +15 -5
  51. package/framework/{v0.7.3 → v0.7.4}/lib/swig-filters/src/main.js +123 -16
  52. package/framework/{v0.7.3 → v0.7.4}/package.json +1 -1
  53. package/gna.js +4 -4
  54. package/llms.txt +24 -22
  55. package/package.json +5 -4
  56. package/schema/settings.json +25 -1
  57. package/script/smoke_in_container.js +69 -12
  58. package/types/index.d.ts +3 -2
  59. package/utils/prototypes.js +37 -2
  60. package/framework/v0.7.3/VERSION +0 -1
  61. package/framework/v0.7.3/core/asset/plugin/dist/vendor/gina/js/gina.min.js +0 -726
  62. package/framework/v0.7.3/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
  63. package/framework/v0.7.3/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
  64. package/framework/v0.7.3/lib/logger/src/redact.js +0 -391
  65. /package/framework/{v0.7.3 → v0.7.4}/AUTHORS +0 -0
  66. /package/framework/{v0.7.3 → v0.7.4}/LICENSE +0 -0
  67. /package/framework/{v0.7.3 → v0.7.4}/core/asset/html/nolayout.html +0 -0
  68. /package/framework/{v0.7.3 → v0.7.4}/core/asset/html/static.html +0 -0
  69. /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/android-chrome-192x192.png +0 -0
  70. /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/android-chrome-512x512.png +0 -0
  71. /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/apple-touch-icon.png +0 -0
  72. /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/favicon-16x16.png +0 -0
  73. /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/favicon-32x32.png +0 -0
  74. /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/favicon.ico +0 -0
  75. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/README.md +0 -0
  76. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.css +0 -0
  77. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.js +0 -0
  78. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/beemaster/index.html +0 -0
  79. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
  80. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.br +0 -0
  81. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.gz +0 -0
  82. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/html/statusbar.html +0 -0
  83. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.br +0 -0
  84. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.gz +0 -0
  85. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/inspector/have_heart_one-webfont.woff2 +0 -0
  86. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/inspector/index.html +0 -0
  87. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/inspector/inspector.css +0 -0
  88. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/inspector/inspector.js +0 -0
  89. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/inspector/logo.svg +0 -0
  90. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -0
  91. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.br +0 -0
  92. /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.gz +0 -0
  93. /package/framework/{v0.7.3 → v0.7.4}/core/config.requirements-anchor.js +0 -0
  94. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/ai/index.js +0 -0
  95. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/ai/lib/connector.js +0 -0
  96. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/index.js +0 -0
  97. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/connector.js +0 -0
  98. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/connector.v3.js +0 -0
  99. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/connector.v4.js +0 -0
  100. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/n1ql.js +0 -0
  101. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/session-store.js +0 -0
  102. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
  103. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
  104. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/storage-store.js +0 -0
  105. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/duckdb/index.js +0 -0
  106. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/duckdb/lib/connector.js +0 -0
  107. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mongodb/index.js +0 -0
  108. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mongodb/lib/connector.js +0 -0
  109. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mongodb/lib/job-store.js +0 -0
  110. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mongodb/lib/pipeline-loader.js +0 -0
  111. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mongodb/lib/session-store.js +0 -0
  112. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mysql/index.js +0 -0
  113. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mysql/lib/connector.js +0 -0
  114. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/param-redact.js +0 -0
  115. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/postgresql/index.js +0 -0
  116. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/postgresql/lib/connector.js +0 -0
  117. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/index.js +0 -0
  118. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/lib/connector.js +0 -0
  119. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/lib/job-store.js +0 -0
  120. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/lib/kv-store.js +0 -0
  121. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/lib/render-cache-store.js +0 -0
  122. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/lib/session-store.js +0 -0
  123. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/scylladb/index.js +0 -0
  124. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/scylladb/lib/connector.js +0 -0
  125. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/scylladb/lib/session-store.js +0 -0
  126. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/settle-once.js +0 -0
  127. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sql-parser.js +0 -0
  128. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sqlite/index.js +0 -0
  129. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sqlite/lib/connector.js +0 -0
  130. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sqlite/lib/job-store.js +0 -0
  131. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sqlite/lib/kv-store.js +0 -0
  132. /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sqlite/lib/session-store.js +0 -0
  133. /package/framework/{v0.7.3 → v0.7.4}/core/content.encoding +0 -0
  134. /package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.framework.js +0 -0
  135. /package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-nunjucks-async.js +0 -0
  136. /package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-stream.js +0 -0
  137. /package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-v1.js +0 -0
  138. /package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-xml.js +0 -0
  139. /package/framework/{v0.7.3 → v0.7.4}/core/controller/index.js +0 -0
  140. /package/framework/{v0.7.3 → v0.7.4}/core/controller/inline-script.js +0 -0
  141. /package/framework/{v0.7.3 → v0.7.4}/core/controller/inspector-window-emit.js +0 -0
  142. /package/framework/{v0.7.3 → v0.7.4}/core/controller/preload-hints.js +0 -0
  143. /package/framework/{v0.7.3 → v0.7.4}/core/controller/release-banner.js +0 -0
  144. /package/framework/{v0.7.3 → v0.7.4}/core/dev/index.js +0 -0
  145. /package/framework/{v0.7.3 → v0.7.4}/core/dev/lib/class.js +0 -0
  146. /package/framework/{v0.7.3 → v0.7.4}/core/dev/lib/factory.js +0 -0
  147. /package/framework/{v0.7.3 → v0.7.4}/core/dev/lib/tools.js +0 -0
  148. /package/framework/{v0.7.3 → v0.7.4}/core/locales/README.md +0 -0
  149. /package/framework/{v0.7.3 → v0.7.4}/core/locales/currency.json +0 -0
  150. /package/framework/{v0.7.3 → v0.7.4}/core/locales/dist/language/en.json +0 -0
  151. /package/framework/{v0.7.3 → v0.7.4}/core/locales/dist/language/fr.json +0 -0
  152. /package/framework/{v0.7.3 → v0.7.4}/core/locales/dist/region/en.json +0 -0
  153. /package/framework/{v0.7.3 → v0.7.4}/core/locales/dist/region/fr.json +0 -0
  154. /package/framework/{v0.7.3 → v0.7.4}/core/locales/index.js +0 -0
  155. /package/framework/{v0.7.3 → v0.7.4}/core/mime.types +0 -0
  156. /package/framework/{v0.7.3 → v0.7.4}/core/model/entity.js +0 -0
  157. /package/framework/{v0.7.3 → v0.7.4}/core/model/index.js +0 -0
  158. /package/framework/{v0.7.3 → v0.7.4}/core/model/template/entityFactory.js +0 -0
  159. /package/framework/{v0.7.3 → v0.7.4}/core/model/template/index.js +0 -0
  160. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/README.md +0 -0
  161. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/index.js +0 -0
  162. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/csrf/README.md +0 -0
  163. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/csrf/package.json +0 -0
  164. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/csrf/src/main.js +0 -0
  165. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/README.md +0 -0
  166. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coep/README.md +0 -0
  167. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coep/package.json +0 -0
  168. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coep/src/main.js +0 -0
  169. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coop/README.md +0 -0
  170. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coop/package.json +0 -0
  171. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coop/src/main.js +0 -0
  172. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/corp/README.md +0 -0
  173. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/corp/package.json +0 -0
  174. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/corp/src/main.js +0 -0
  175. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/csp/README.md +0 -0
  176. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/csp/package.json +0 -0
  177. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/csp/src/main.js +0 -0
  178. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hide-powered-by/README.md +0 -0
  179. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hide-powered-by/package.json +0 -0
  180. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hide-powered-by/src/main.js +0 -0
  181. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hsts/README.md +0 -0
  182. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hsts/package.json +0 -0
  183. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hsts/src/main.js +0 -0
  184. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/origin-agent-cluster/README.md +0 -0
  185. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/origin-agent-cluster/package.json +0 -0
  186. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/origin-agent-cluster/src/main.js +0 -0
  187. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/package.json +0 -0
  188. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/referrer-policy/README.md +0 -0
  189. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/referrer-policy/package.json +0 -0
  190. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/referrer-policy/src/main.js +0 -0
  191. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/src/main.js +0 -0
  192. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-content-type-options/README.md +0 -0
  193. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-content-type-options/package.json +0 -0
  194. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-content-type-options/src/main.js +0 -0
  195. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-dns-prefetch-control/README.md +0 -0
  196. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-dns-prefetch-control/package.json +0 -0
  197. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-dns-prefetch-control/src/main.js +0 -0
  198. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-download-options/README.md +0 -0
  199. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-download-options/package.json +0 -0
  200. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-download-options/src/main.js +0 -0
  201. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-frame-options/README.md +0 -0
  202. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-frame-options/package.json +0 -0
  203. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-frame-options/src/main.js +0 -0
  204. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/README.md +0 -0
  205. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/package.json +0 -0
  206. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/src/main.js +0 -0
  207. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-xss-protection/README.md +0 -0
  208. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-xss-protection/package.json +0 -0
  209. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-xss-protection/src/main.js +0 -0
  210. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/session/README.md +0 -0
  211. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/session/package.json +0 -0
  212. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/session/src/main.js +0 -0
  213. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/storage/README.md +0 -0
  214. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/storage/build.json +0 -0
  215. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/storage/package.json +0 -0
  216. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/storage/src/main.js +0 -0
  217. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/validator/README.md +0 -0
  218. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/validator/build.json +0 -0
  219. /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/validator/package.json +0 -0
  220. /package/framework/{v0.7.3 → v0.7.4}/core/server.isaac.rapid-reset.js +0 -0
  221. /package/framework/{v0.7.3 → v0.7.4}/core/server.route-candidates.js +0 -0
  222. /package/framework/{v0.7.3 → v0.7.4}/core/status.codes +0 -0
  223. /package/framework/{v0.7.3 → v0.7.4}/core/template/_gitignore +0 -0
  224. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/app.json +0 -0
  225. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/connectors.json +0 -0
  226. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/routing.json +0 -0
  227. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/settings.json +0 -0
  228. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
  229. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/templates.json +0 -0
  230. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/watchers.json +0 -0
  231. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
  232. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
  233. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/controllers/setup.js +0 -0
  234. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/index.js +0 -0
  235. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/locales/en.json +0 -0
  236. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
  237. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/css/default.css +0 -0
  238. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/css/home.css +0 -0
  239. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
  240. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
  241. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/js/components/x-checklist.js +0 -0
  242. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
  243. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/manifest.webmanifest +0 -0
  244. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/readme.md +0 -0
  245. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/sw.js +0 -0
  246. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
  247. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
  248. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
  249. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
  250. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/html/includes/x-checklist.html +0 -0
  251. /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
  252. /package/framework/{v0.7.3 → v0.7.4}/core/template/command/gina.bat.tpl +0 -0
  253. /package/framework/{v0.7.3 → v0.7.4}/core/template/command/gina.tpl +0 -0
  254. /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/env.json +0 -0
  255. /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/manifest.json +0 -0
  256. /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/package.json +0 -0
  257. /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/settings.json +0 -0
  258. /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/statics.json +0 -0
  259. /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/templates.json +0 -0
  260. /package/framework/{v0.7.3 → v0.7.4}/core/template/error/client/json/401.json +0 -0
  261. /package/framework/{v0.7.3 → v0.7.4}/core/template/error/client/json/403.json +0 -0
  262. /package/framework/{v0.7.3 → v0.7.4}/core/template/error/client/json/404.json +0 -0
  263. /package/framework/{v0.7.3 → v0.7.4}/core/template/error/server/html/50x.html +0 -0
  264. /package/framework/{v0.7.3 → v0.7.4}/core/template/error/server/json/500.json +0 -0
  265. /package/framework/{v0.7.3 → v0.7.4}/core/template/error/server/json/503.json +0 -0
  266. /package/framework/{v0.7.3 → v0.7.4}/core/template/extensions/logger/config.json +0 -0
  267. /package/framework/{v0.7.3 → v0.7.4}/helpers/console.js +0 -0
  268. /package/framework/{v0.7.3 → v0.7.4}/helpers/data/LICENSE +0 -0
  269. /package/framework/{v0.7.3 → v0.7.4}/helpers/data/README.md +0 -0
  270. /package/framework/{v0.7.3 → v0.7.4}/helpers/data/package.json +0 -0
  271. /package/framework/{v0.7.3 → v0.7.4}/helpers/dateFormat.js +0 -0
  272. /package/framework/{v0.7.3 → v0.7.4}/helpers/index.js +0 -0
  273. /package/framework/{v0.7.3 → v0.7.4}/helpers/json/LICENSE +0 -0
  274. /package/framework/{v0.7.3 → v0.7.4}/helpers/json/README.md +0 -0
  275. /package/framework/{v0.7.3 → v0.7.4}/helpers/json/package.json +0 -0
  276. /package/framework/{v0.7.3 → v0.7.4}/helpers/json/src/main.js +0 -0
  277. /package/framework/{v0.7.3 → v0.7.4}/helpers/path.js +0 -0
  278. /package/framework/{v0.7.3 → v0.7.4}/helpers/plugins/README.md +0 -0
  279. /package/framework/{v0.7.3 → v0.7.4}/helpers/plugins/package.json +0 -0
  280. /package/framework/{v0.7.3 → v0.7.4}/helpers/plugins/src/api-error.js +0 -0
  281. /package/framework/{v0.7.3 → v0.7.4}/helpers/plugins/src/main.js +0 -0
  282. /package/framework/{v0.7.3 → v0.7.4}/helpers/task.js +0 -0
  283. /package/framework/{v0.7.3 → v0.7.4}/helpers/text.js +0 -0
  284. /package/framework/{v0.7.3 → v0.7.4}/lib/admin/package.json +0 -0
  285. /package/framework/{v0.7.3 → v0.7.4}/lib/admin/src/main.js +0 -0
  286. /package/framework/{v0.7.3 → v0.7.4}/lib/archiver/README.md +0 -0
  287. /package/framework/{v0.7.3 → v0.7.4}/lib/archiver/build.json +0 -0
  288. /package/framework/{v0.7.3 → v0.7.4}/lib/archiver/package.json +0 -0
  289. /package/framework/{v0.7.3 → v0.7.4}/lib/archiver/src/dep/jszip.min.js +0 -0
  290. /package/framework/{v0.7.3 → v0.7.4}/lib/archiver/src/main.js +0 -0
  291. /package/framework/{v0.7.3 → v0.7.4}/lib/async/package.json +0 -0
  292. /package/framework/{v0.7.3 → v0.7.4}/lib/async/src/main.js +0 -0
  293. /package/framework/{v0.7.3 → v0.7.4}/lib/audit/package.json +0 -0
  294. /package/framework/{v0.7.3 → v0.7.4}/lib/audit/src/main.js +0 -0
  295. /package/framework/{v0.7.3 → v0.7.4}/lib/audit-store.js +0 -0
  296. /package/framework/{v0.7.3 → v0.7.4}/lib/authn/package.json +0 -0
  297. /package/framework/{v0.7.3 → v0.7.4}/lib/authn/src/lockout.js +0 -0
  298. /package/framework/{v0.7.3 → v0.7.4}/lib/authn/src/main.js +0 -0
  299. /package/framework/{v0.7.3 → v0.7.4}/lib/authn/src/totp.js +0 -0
  300. /package/framework/{v0.7.3 → v0.7.4}/lib/authz-gate/package.json +0 -0
  301. /package/framework/{v0.7.3 → v0.7.4}/lib/authz-gate/src/main.js +0 -0
  302. /package/framework/{v0.7.3 → v0.7.4}/lib/cache/README.md +0 -0
  303. /package/framework/{v0.7.3 → v0.7.4}/lib/cache/build.json +0 -0
  304. /package/framework/{v0.7.3 → v0.7.4}/lib/cache/package.json +0 -0
  305. /package/framework/{v0.7.3 → v0.7.4}/lib/cache/src/main.js +0 -0
  306. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/aliases.json +0 -0
  307. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/audit/arguments.json +0 -0
  308. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/audit/help.txt +0 -0
  309. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/audit/verify.js +0 -0
  310. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/add.js +0 -0
  311. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/arguments.json +0 -0
  312. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/build.js +0 -0
  313. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/copy.js +0 -0
  314. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/cp.js +0 -0
  315. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/help.js +0 -0
  316. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/help.txt +0 -0
  317. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/inc/boot-lines.js +0 -0
  318. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/inc/name-rewrite.js +0 -0
  319. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/inc/name.js +0 -0
  320. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/list.js +0 -0
  321. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/man.js +0 -0
  322. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/mcp-start.js +0 -0
  323. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/mcp.js +0 -0
  324. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/oas.js +0 -0
  325. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/openapi.js +0 -0
  326. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/remove.js +0 -0
  327. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/rename.js +0 -0
  328. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/rm.js +0 -0
  329. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/status.js +0 -0
  330. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/stop.js +0 -0
  331. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/types.js +0 -0
  332. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/cache/arguments.json +0 -0
  333. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/cache/stats.js +0 -0
  334. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/add.js +0 -0
  335. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/arguments.json +0 -0
  336. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/help.js +0 -0
  337. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/help.txt +0 -0
  338. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/infer.js +0 -0
  339. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/list.js +0 -0
  340. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/migrate.js +0 -0
  341. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/models.js +0 -0
  342. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/remove.js +0 -0
  343. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/rm.js +0 -0
  344. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/test.js +0 -0
  345. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/arguments.json +0 -0
  346. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/help.js +0 -0
  347. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/help.txt +0 -0
  348. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/man.js +0 -0
  349. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/ps.js +0 -0
  350. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/stop.js +0 -0
  351. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/add.js +0 -0
  352. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/arguments.json +0 -0
  353. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/help.txt +0 -0
  354. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/inc/args.js +0 -0
  355. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/inc/namespace.js +0 -0
  356. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/inc/reference-rewrite.js +0 -0
  357. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/inc/reference-scan.js +0 -0
  358. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/inc/scaffold.js +0 -0
  359. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/remove.js +0 -0
  360. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/rename.js +0 -0
  361. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/rm.js +0 -0
  362. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/add.js +0 -0
  363. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/get.js +0 -0
  364. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/help.js +0 -0
  365. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/help.txt +0 -0
  366. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/inc/name.js +0 -0
  367. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/link-dev.js +0 -0
  368. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/list.js +0 -0
  369. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/remove.js +0 -0
  370. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/rm.js +0 -0
  371. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/set.js +0 -0
  372. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/unset.js +0 -0
  373. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/use.js +0 -0
  374. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/add.js +0 -0
  375. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/arguments.json +0 -0
  376. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/build.js +0 -0
  377. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/dot.js +0 -0
  378. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/get.js +0 -0
  379. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/help.js +0 -0
  380. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/help.txt +0 -0
  381. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/inc/listen-error.js +0 -0
  382. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/link-node-modules.js +0 -0
  383. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/link.js +0 -0
  384. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/list.js +0 -0
  385. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/man.js +0 -0
  386. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/msg.json +0 -0
  387. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/open.js +0 -0
  388. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/remove.js +0 -0
  389. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/reset.js +0 -0
  390. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/set.js +0 -0
  391. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/start.js +0 -0
  392. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/tail.js +0 -0
  393. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/update.js +0 -0
  394. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/version.js +0 -0
  395. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/gina-dev.1.md +0 -0
  396. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/gina-framework.1.md +0 -0
  397. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/gina.1.md +0 -0
  398. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/add.js +0 -0
  399. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/arguments.json +0 -0
  400. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/export.js +0 -0
  401. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/help.js +0 -0
  402. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/help.txt +0 -0
  403. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/import.js +0 -0
  404. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/scan.js +0 -0
  405. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/_host.js +0 -0
  406. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/arguments.json +0 -0
  407. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/build.js +0 -0
  408. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/help.js +0 -0
  409. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/help.txt +0 -0
  410. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/list.js +0 -0
  411. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/man.js +0 -0
  412. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/rm.js +0 -0
  413. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/inspector/help.js +0 -0
  414. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/inspector/help.txt +0 -0
  415. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/inspector/open.js +0 -0
  416. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/man-render.js +0 -0
  417. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/minion/arguments.json +0 -0
  418. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/minion/help.js +0 -0
  419. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/minion/help.txt +0 -0
  420. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/minion/kill.js +0 -0
  421. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/minion/list.js +0 -0
  422. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/msg.json +0 -0
  423. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/help.js +0 -0
  424. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/help.txt +0 -0
  425. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/inc/scan.js +0 -0
  426. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/list.js +0 -0
  427. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/reset.js +0 -0
  428. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/set.js +0 -0
  429. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/add.js +0 -0
  430. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/arguments.json +0 -0
  431. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/backup.js +0 -0
  432. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/build.js +0 -0
  433. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/help.js +0 -0
  434. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/help.txt +0 -0
  435. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/import.js +0 -0
  436. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/inc/name.js +0 -0
  437. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/list.js +0 -0
  438. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/man.js +0 -0
  439. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/move.js +0 -0
  440. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/remove.js +0 -0
  441. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/rename.js +0 -0
  442. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/restart.js +0 -0
  443. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/restore.js +0 -0
  444. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/rm.js +0 -0
  445. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/start.js +0 -0
  446. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/status.js +0 -0
  447. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/stop.js +0 -0
  448. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/arguments.json +0 -0
  449. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/help.js +0 -0
  450. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/help.txt +0 -0
  451. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/list.js +0 -0
  452. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/remove.js +0 -0
  453. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/set.js +0 -0
  454. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/add.js +0 -0
  455. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/help.js +0 -0
  456. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/help.txt +0 -0
  457. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/inc/name.js +0 -0
  458. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/link-local.js +0 -0
  459. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/link-production.js +0 -0
  460. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/list.js +0 -0
  461. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/remove.js +0 -0
  462. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/rm.js +0 -0
  463. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/use.js +0 -0
  464. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/secrets/arguments.json +0 -0
  465. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/secrets/check.js +0 -0
  466. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/secrets/help.js +0 -0
  467. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/secrets/help.txt +0 -0
  468. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/secrets/scan.js +0 -0
  469. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/service/help.js +0 -0
  470. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/service/help.txt +0 -0
  471. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/service/list.js +0 -0
  472. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/service/man.js +0 -0
  473. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/service/start.js +0 -0
  474. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/storage/arguments.json +0 -0
  475. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/storage/gc.js +0 -0
  476. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/storage/help.txt +0 -0
  477. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/storage/stats.js +0 -0
  478. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/storage/verify.js +0 -0
  479. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/view/add.js +0 -0
  480. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd-status-format/package.json +0 -0
  481. /package/framework/{v0.7.3 → v0.7.4}/lib/cmd-status-format/src/main.js +0 -0
  482. /package/framework/{v0.7.3 → v0.7.4}/lib/collection/README.md +0 -0
  483. /package/framework/{v0.7.3 → v0.7.4}/lib/collection/build.json +0 -0
  484. /package/framework/{v0.7.3 → v0.7.4}/lib/collection/package.json +0 -0
  485. /package/framework/{v0.7.3 → v0.7.4}/lib/conf-view/package.json +0 -0
  486. /package/framework/{v0.7.3 → v0.7.4}/lib/conf-view/src/main.js +0 -0
  487. /package/framework/{v0.7.3 → v0.7.4}/lib/config.js +0 -0
  488. /package/framework/{v0.7.3 → v0.7.4}/lib/connector-config/package.json +0 -0
  489. /package/framework/{v0.7.3 → v0.7.4}/lib/connector-config/src/main.js +0 -0
  490. /package/framework/{v0.7.3 → v0.7.4}/lib/connector-error/package.json +0 -0
  491. /package/framework/{v0.7.3 → v0.7.4}/lib/connector-error/src/main.js +0 -0
  492. /package/framework/{v0.7.3 → v0.7.4}/lib/connector-registry/package.json +0 -0
  493. /package/framework/{v0.7.3 → v0.7.4}/lib/connector-registry/src/main.js +0 -0
  494. /package/framework/{v0.7.3 → v0.7.4}/lib/cron/README.md +0 -0
  495. /package/framework/{v0.7.3 → v0.7.4}/lib/cron/package.json +0 -0
  496. /package/framework/{v0.7.3 → v0.7.4}/lib/cron/src/main.js +0 -0
  497. /package/framework/{v0.7.3 → v0.7.4}/lib/domain/LICENSE +0 -0
  498. /package/framework/{v0.7.3 → v0.7.4}/lib/domain/README.md +0 -0
  499. /package/framework/{v0.7.3 → v0.7.4}/lib/domain/package.json +0 -0
  500. /package/framework/{v0.7.3 → v0.7.4}/lib/domain/src/main.js +0 -0
  501. /package/framework/{v0.7.3 → v0.7.4}/lib/dto/package.json +0 -0
  502. /package/framework/{v0.7.3 → v0.7.4}/lib/dto/src/main.js +0 -0
  503. /package/framework/{v0.7.3 → v0.7.4}/lib/dto-pipe/package.json +0 -0
  504. /package/framework/{v0.7.3 → v0.7.4}/lib/dto-pipe/src/main.js +0 -0
  505. /package/framework/{v0.7.3 → v0.7.4}/lib/dto-types/package.json +0 -0
  506. /package/framework/{v0.7.3 → v0.7.4}/lib/dto-types/src/main.js +0 -0
  507. /package/framework/{v0.7.3 → v0.7.4}/lib/duration/package.json +0 -0
  508. /package/framework/{v0.7.3 → v0.7.4}/lib/duration/src/main.js +0 -0
  509. /package/framework/{v0.7.3 → v0.7.4}/lib/error-ref/package.json +0 -0
  510. /package/framework/{v0.7.3 → v0.7.4}/lib/error-ref/src/main.js +0 -0
  511. /package/framework/{v0.7.3 → v0.7.4}/lib/generator/index.js +0 -0
  512. /package/framework/{v0.7.3 → v0.7.4}/lib/i18n/package.json +0 -0
  513. /package/framework/{v0.7.3 → v0.7.4}/lib/i18n/src/main.js +0 -0
  514. /package/framework/{v0.7.3 → v0.7.4}/lib/idempotency/package.json +0 -0
  515. /package/framework/{v0.7.3 → v0.7.4}/lib/idempotency/src/main.js +0 -0
  516. /package/framework/{v0.7.3 → v0.7.4}/lib/image-build/package.json +0 -0
  517. /package/framework/{v0.7.3 → v0.7.4}/lib/image-build/src/main.js +0 -0
  518. /package/framework/{v0.7.3 → v0.7.4}/lib/index.js +0 -0
  519. /package/framework/{v0.7.3 → v0.7.4}/lib/inherits/LICENSE +0 -0
  520. /package/framework/{v0.7.3 → v0.7.4}/lib/inherits/README.md +0 -0
  521. /package/framework/{v0.7.3 → v0.7.4}/lib/inherits/package.json +0 -0
  522. /package/framework/{v0.7.3 → v0.7.4}/lib/inherits/src/main.js +0 -0
  523. /package/framework/{v0.7.3 → v0.7.4}/lib/inspector-events/package.json +0 -0
  524. /package/framework/{v0.7.3 → v0.7.4}/lib/inspector-events/src/main.js +0 -0
  525. /package/framework/{v0.7.3 → v0.7.4}/lib/inspector-redact/package.json +0 -0
  526. /package/framework/{v0.7.3 → v0.7.4}/lib/inspector-redact/src/main.js +0 -0
  527. /package/framework/{v0.7.3 → v0.7.4}/lib/instrument/package.json +0 -0
  528. /package/framework/{v0.7.3 → v0.7.4}/lib/instrument/src/main.js +0 -0
  529. /package/framework/{v0.7.3 → v0.7.4}/lib/job/package.json +0 -0
  530. /package/framework/{v0.7.3 → v0.7.4}/lib/job-store.js +0 -0
  531. /package/framework/{v0.7.3 → v0.7.4}/lib/json-config-header/package.json +0 -0
  532. /package/framework/{v0.7.3 → v0.7.4}/lib/json-config-header/src/main.js +0 -0
  533. /package/framework/{v0.7.3 → v0.7.4}/lib/kv/package.json +0 -0
  534. /package/framework/{v0.7.3 → v0.7.4}/lib/kv/src/main.js +0 -0
  535. /package/framework/{v0.7.3 → v0.7.4}/lib/kv-store.js +0 -0
  536. /package/framework/{v0.7.3 → v0.7.4}/lib/lane/package.json +0 -0
  537. /package/framework/{v0.7.3 → v0.7.4}/lib/loading-state/package.json +0 -0
  538. /package/framework/{v0.7.3 → v0.7.4}/lib/loading-state/src/main.js +0 -0
  539. /package/framework/{v0.7.3 → v0.7.4}/lib/logger/README.md +0 -0
  540. /package/framework/{v0.7.3 → v0.7.4}/lib/logger/package.json +0 -0
  541. /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/containers/default/index.js +0 -0
  542. /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/containers/file/index.js +0 -0
  543. /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/containers/mq/index.js +0 -0
  544. /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/containers/mq/listener.js +0 -0
  545. /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/containers/mq/speaker.js +0 -0
  546. /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/helper.js +0 -0
  547. /package/framework/{v0.7.3 → v0.7.4}/lib/maintenance/package.json +0 -0
  548. /package/framework/{v0.7.3 → v0.7.4}/lib/maintenance/src/main.js +0 -0
  549. /package/framework/{v0.7.3 → v0.7.4}/lib/math/index.js +0 -0
  550. /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-dispatch/package.json +0 -0
  551. /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-dispatch/src/main.js +0 -0
  552. /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-http/package.json +0 -0
  553. /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-http/src/main.js +0 -0
  554. /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-server/package.json +0 -0
  555. /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-server/src/main.js +0 -0
  556. /package/framework/{v0.7.3 → v0.7.4}/lib/merge/README.md +0 -0
  557. /package/framework/{v0.7.3 → v0.7.4}/lib/merge/package.json +0 -0
  558. /package/framework/{v0.7.3 → v0.7.4}/lib/merge/src/main.js +0 -0
  559. /package/framework/{v0.7.3 → v0.7.4}/lib/message-validator/package.json +0 -0
  560. /package/framework/{v0.7.3 → v0.7.4}/lib/message-validator/src/main.js +0 -0
  561. /package/framework/{v0.7.3 → v0.7.4}/lib/metrics/package.json +0 -0
  562. /package/framework/{v0.7.3 → v0.7.4}/lib/metrics/src/main.js +0 -0
  563. /package/framework/{v0.7.3 → v0.7.4}/lib/model.js +0 -0
  564. /package/framework/{v0.7.3 → v0.7.4}/lib/money/package.json +0 -0
  565. /package/framework/{v0.7.3 → v0.7.4}/lib/money/src/main.js +0 -0
  566. /package/framework/{v0.7.3 → v0.7.4}/lib/multipart/package.json +0 -0
  567. /package/framework/{v0.7.3 → v0.7.4}/lib/multipart/src/main.js +0 -0
  568. /package/framework/{v0.7.3 → v0.7.4}/lib/net-locality/package.json +0 -0
  569. /package/framework/{v0.7.3 → v0.7.4}/lib/net-locality/src/main.js +0 -0
  570. /package/framework/{v0.7.3 → v0.7.4}/lib/nunjucks-filters/README.md +0 -0
  571. /package/framework/{v0.7.3 → v0.7.4}/lib/nunjucks-filters/package.json +0 -0
  572. /package/framework/{v0.7.3 → v0.7.4}/lib/nunjucks-resolver/package.json +0 -0
  573. /package/framework/{v0.7.3 → v0.7.4}/lib/nunjucks-resolver/src/main.js +0 -0
  574. /package/framework/{v0.7.3 → v0.7.4}/lib/priority/package.json +0 -0
  575. /package/framework/{v0.7.3 → v0.7.4}/lib/priority/src/main.js +0 -0
  576. /package/framework/{v0.7.3 → v0.7.4}/lib/push/package.json +0 -0
  577. /package/framework/{v0.7.3 → v0.7.4}/lib/push/src/main.js +0 -0
  578. /package/framework/{v0.7.3 → v0.7.4}/lib/rate-limit/package.json +0 -0
  579. /package/framework/{v0.7.3 → v0.7.4}/lib/rate-limit/src/main.js +0 -0
  580. /package/framework/{v0.7.3 → v0.7.4}/lib/release-watch/package.json +0 -0
  581. /package/framework/{v0.7.3 → v0.7.4}/lib/release-watch/src/main.js +0 -0
  582. /package/framework/{v0.7.3 → v0.7.4}/lib/render-cache/package.json +0 -0
  583. /package/framework/{v0.7.3 → v0.7.4}/lib/render-cache-store.js +0 -0
  584. /package/framework/{v0.7.3 → v0.7.4}/lib/routing/README.md +0 -0
  585. /package/framework/{v0.7.3 → v0.7.4}/lib/routing/build.json +0 -0
  586. /package/framework/{v0.7.3 → v0.7.4}/lib/routing/package.json +0 -0
  587. /package/framework/{v0.7.3 → v0.7.4}/lib/routing-introspect/package.json +0 -0
  588. /package/framework/{v0.7.3 → v0.7.4}/lib/routing-introspect/src/main.js +0 -0
  589. /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/package.json +0 -0
  590. /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/backends/env.js +0 -0
  591. /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/backends/exec.js +0 -0
  592. /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/backends/file.js +0 -0
  593. /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/declaration.js +0 -0
  594. /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/env-file.js +0 -0
  595. /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/main.js +0 -0
  596. /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/sources.js +0 -0
  597. /package/framework/{v0.7.3 → v0.7.4}/lib/security-headers-emitter/package.json +0 -0
  598. /package/framework/{v0.7.3 → v0.7.4}/lib/security-headers-emitter/src/main.js +0 -0
  599. /package/framework/{v0.7.3 → v0.7.4}/lib/session-lifetime/package.json +0 -0
  600. /package/framework/{v0.7.3 → v0.7.4}/lib/session-lifetime/src/main.js +0 -0
  601. /package/framework/{v0.7.3 → v0.7.4}/lib/session-store.js +0 -0
  602. /package/framework/{v0.7.3 → v0.7.4}/lib/shell.js +0 -0
  603. /package/framework/{v0.7.3 → v0.7.4}/lib/sri/package.json +0 -0
  604. /package/framework/{v0.7.3 → v0.7.4}/lib/sri/src/main.js +0 -0
  605. /package/framework/{v0.7.3 → v0.7.4}/lib/state.js +0 -0
  606. /package/framework/{v0.7.3 → v0.7.4}/lib/storage/package.json +0 -0
  607. /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/local-cas.js +0 -0
  608. /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/local-stream.js +0 -0
  609. /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/local.js +0 -0
  610. /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/main.js +0 -0
  611. /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/meta-store.js +0 -0
  612. /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/s3.js +0 -0
  613. /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/util.js +0 -0
  614. /package/framework/{v0.7.3 → v0.7.4}/lib/storage-store.js +0 -0
  615. /package/framework/{v0.7.3 → v0.7.4}/lib/swig-filters/README.md +0 -0
  616. /package/framework/{v0.7.3 → v0.7.4}/lib/swig-filters/package.json +0 -0
  617. /package/framework/{v0.7.3 → v0.7.4}/lib/swig-resolver/package.json +0 -0
  618. /package/framework/{v0.7.3 → v0.7.4}/lib/swig-resolver/src/main.js +0 -0
  619. /package/framework/{v0.7.3 → v0.7.4}/lib/template-loaders/package.json +0 -0
  620. /package/framework/{v0.7.3 → v0.7.4}/lib/template-loaders/src/loaders/http.js +0 -0
  621. /package/framework/{v0.7.3 → v0.7.4}/lib/template-loaders/src/loaders/memory.js +0 -0
  622. /package/framework/{v0.7.3 → v0.7.4}/lib/template-loaders/src/main.js +0 -0
  623. /package/framework/{v0.7.3 → v0.7.4}/lib/url/README.md +0 -0
  624. /package/framework/{v0.7.3 → v0.7.4}/lib/url/index.js +0 -0
  625. /package/framework/{v0.7.3 → v0.7.4}/lib/url/routing.json +0 -0
  626. /package/framework/{v0.7.3 → v0.7.4}/lib/uuid/package.json +0 -0
  627. /package/framework/{v0.7.3 → v0.7.4}/lib/uuid/src/main.js +0 -0
  628. /package/framework/{v0.7.3 → v0.7.4}/lib/validator.js +0 -0
  629. /package/framework/{v0.7.3 → v0.7.4}/lib/watcher/package.json +0 -0
  630. /package/framework/{v0.7.3 → v0.7.4}/lib/watcher/src/main.js +0 -0
  631. /package/framework/{v0.7.3 → v0.7.4}/lib/ws-framing/package.json +0 -0
  632. /package/framework/{v0.7.3 → v0.7.4}/lib/ws-framing/src/main.js +0 -0
  633. /package/framework/{v0.7.3 → v0.7.4}/lib/ws-query/package.json +0 -0
  634. /package/framework/{v0.7.3 → v0.7.4}/lib/ws-query/src/main.js +0 -0
  635. /package/framework/{v0.7.3 → v0.7.4}/lib/ws-session/package.json +0 -0
  636. /package/framework/{v0.7.3 → v0.7.4}/lib/ws-session/src/main.js +0 -0
@@ -0,0 +1,1003 @@
1
+ /*
2
+ * This file is part of the gina package.
3
+ * Copyright (c) 2009-2026 Rhinostone <contact@gina.io>
4
+ *
5
+ * For the full copyright and license information, please view the LICENSE
6
+ * file that was distributed with this source code.
7
+ */
8
+
9
+ 'use strict';
10
+
11
+ /**
12
+ * @module lib/logger/redact
13
+ *
14
+ * Pre-render log redaction (#B433). Pure, dependency-free: compiles a
15
+ * bundle's `settings.json > log.redact` block into a rule set and applies it
16
+ * to a log MESSAGE before the message is rendered into a line. The logger
17
+ * applies it at its single pre-render choke point (`emit()`), so every sink —
18
+ * stdout, the MQ speaker / `gina tail`, the file transport, the Inspector
19
+ * taps — receives the redacted payload, and JSON mode can never be corrupted
20
+ * (the marker lands inside the message string, never across the rendered
21
+ * line's structure).
22
+ *
23
+ * Two rule sources compose:
24
+ *
25
+ * - PATTERNS — regexes over the message text. A built-in set masks the
26
+ * credential shapes that reach an access line through a URL (JWT, URL
27
+ * userinfo, `Bearer`/`Basic` credentials, named credential query keys,
28
+ * api-key style headers); a bundle extends it with `patterns`.
29
+ * - SECRET VALUES — every value the secrets resolver substituted from a
30
+ * `${secret:KEY}` placeholder is masked verbatim wherever it appears.
31
+ * Zero false positives by construction: the values are the bundle's own.
32
+ *
33
+ * Deliberately NOT a default: a bare long-hex path segment. A sha256
34
+ * content-address key served from storage and an opaque 64-hex bearer
35
+ * credential are the same regex class, so no default can tell them apart —
36
+ * a bundle whose credentials are opaque path segments adds one pattern.
37
+ *
38
+ * Every default is linear (no nested quantifiers): measured 0.9 µs per access
39
+ * line and 11 ms across five 200 KB adversarial inputs. Consumer-supplied
40
+ * patterns are compiled at config load and refused when invalid or when they
41
+ * match the empty string; their backtracking behaviour is the consumer's.
42
+ *
43
+ * Anchor a hex-credential pattern on the character class (lookarounds), not
44
+ * `\b`: a leading `\b` never fires against a prefixed segment (`key_<hex>` —
45
+ * `_` is a word character), and the miss is silent.
46
+ *
47
+ * TWO READINGS (#B830). The log writers render a control character held by a
48
+ * logged value as a visible escape (`\n`, `\r`, `\t`, `\uXXXX`), and they do
49
+ * it before the message reaches this module. `apply()` therefore reads a
50
+ * message that holds such an escape twice — as written, then with each escape
51
+ * read as the character it stands for — and masks, in the message as written,
52
+ * whatever either reading finds. See `apply()` and `decodeView()`.
53
+ *
54
+ * QUOTE ESCAPES (#B834). The object writers also escape a string value's
55
+ * quotes before the message reaches this module: the levelled writer writes
56
+ * `\"` and `\'`, and the raw `console.log` path renders an object with
57
+ * `JSON.stringify` (`\"`). A secret value holding a quote then no longer
58
+ * matches as written; the decoded reading reads the two quote escapes too, so
59
+ * it is found and masked like a secret holding a line break.
60
+ *
61
+ * ESCAPE LAYERS (#B838). Two more renderers write a value before the message
62
+ * reaches this module, and both escape the backslash itself: `JSON.stringify`
63
+ * (the raw `console.log` path, and any JSON string a caller builds) and
64
+ * `util.inspect` (an `Error`, on both paths). The secret values are therefore
65
+ * searched on more readings: each layer of that escaping is read back, up to
66
+ * `MAX_ESCAPE_DEPTH` layers, from the message as written and from its decoded
67
+ * reading. `util.inspect` also lays a value's line breaks out (a long string
68
+ * is split after each line feed, a nested Error's message is indented), and
69
+ * the levelled string path writes a carriage return as a line feed: a secret's
70
+ * line breaks match those layouts. See `decodeEscapes()`, `secretSource()`
71
+ * and `apply()`.
72
+ *
73
+ * @example
74
+ * var redact = require('./redact');
75
+ * var state = redact.compileState([redact.compileBlock({ patterns: ['(?<![0-9a-f])[0-9a-f]{64}(?![0-9a-f])'] }, 'demo')]);
76
+ * redact.apply(state, 'GET [200] /reset?token=abc123def456'); // → 'GET [200] /reset?token=[REDACTED]'
77
+ * redact.apply(null, 'GET [200] /reset?token=abc123def456'); // → unchanged (no state)
78
+ */
79
+
80
+ // #B838 — read for one default only: util.inspect's `maxStringLength` (see compileState)
81
+ var util = require('util');
82
+
83
+ /**
84
+ * The replacement text. Contains no `$`, so it is inert under
85
+ * `String.prototype.replace`'s dollar-pattern expansion.
86
+ *
87
+ * @constant
88
+ * @type {string}
89
+ */
90
+ var MARKER = '[REDACTED]';
91
+
92
+ /**
93
+ * Resolved secret values shorter than this are NOT added to the redaction set
94
+ * (a 3-character value would mask ordinary text everywhere); the caller is
95
+ * told which paths were skipped so it can warn.
96
+ *
97
+ * @constant
98
+ * @type {number}
99
+ */
100
+ var MIN_SECRET_LENGTH = 8;
101
+
102
+ /**
103
+ * The built-in pattern set. Stored as sources (not RegExp objects) so every
104
+ * compiled state owns fresh instances. Order matters only for readability —
105
+ * each rule is applied with the `g` flag over the whole message.
106
+ *
107
+ * @constant
108
+ * @type {Array<{name: string, pattern: string, flags: string, replacement: string}>}
109
+ */
110
+ var DEFAULT_RULES = Object.freeze([
111
+ // JSON Web Tokens: header.payload.signature, both leading segments are base64url of `{"`.
112
+ { name: 'jwt', pattern: '(?<![\\w-])eyJ[\\w-]{10,}\\.eyJ[\\w-]{10,}\\.[\\w-]{10,}(?![\\w-])', flags: 'g', replacement: MARKER },
113
+ // RFC 3986 userinfo: scheme://user:PASSWORD@host — keeps the user, masks the password.
114
+ { name: 'userinfo', pattern: '(\\b[a-z][a-z0-9+.-]*:\\/\\/[^\\/\\s:@]+:)[^\\/\\s@]+@', flags: 'gi', replacement: '$1' + MARKER + '@' },
115
+ // `Bearer <token>` — 20+ token chars so prose ("Bearer authentication") stays untouched.
116
+ { name: 'bearer', pattern: '(\\bBearer\\s+)[A-Za-z0-9._~+\\/=-]{20,}', flags: 'g', replacement: '$1' + MARKER },
117
+ // `Basic <base64>` — 16+ chars, same reason.
118
+ { name: 'basic', pattern: '(\\bBasic\\s+)[A-Za-z0-9+\\/=]{16,}', flags: 'g', replacement: '$1' + MARKER },
119
+ // Named credential keys in a query string / form body: keeps the key, masks the value.
120
+ { name: 'querykey', pattern: '((?<![\\w.-])(?:access_token|refresh_token|id_token|token|api[_-]?key|apikey|client_secret|secret|password|passwd|pwd|passcode|authorization|auth|signature|sig|otp|session_?token)=)[^&\\s#\'"]+', flags: 'gi', replacement: '$1' + MARKER },
121
+ // api-key style headers when a header line is logged.
122
+ { name: 'headerkey', pattern: '(\\b(?:x-api-key|api-key|x-auth-token|x-access-token|x-amz-security-token)\\s*[:=]\\s*)[^\\s,;\'"]+', flags: 'gi', replacement: '$1' + MARKER }
123
+ ]);
124
+
125
+ /**
126
+ * The keys a `log.redact` block may carry. Anything else is refused — a
127
+ * misspelt `pattern` would otherwise be ignored silently, which is a leak.
128
+ *
129
+ * @constant
130
+ * @type {string[]}
131
+ */
132
+ var BLOCK_KEYS = ['enabled', 'defaults', 'secrets', 'patterns'];
133
+
134
+ /**
135
+ * Escape a literal for use inside a RegExp source.
136
+ *
137
+ * @inner
138
+ * @private
139
+ * @param {string} s - Literal text
140
+ * @returns {string} The escaped source
141
+ */
142
+ function escapeRegExp(s) {
143
+ return s.replace(/[.*+?^${}()|[\]\\\/]/g, '\\$&');
144
+ }
145
+
146
+ /**
147
+ * The characters a renderer lays around a line break of a value (#B838):
148
+ * whitespace — the indentation `util.inspect` adds after each line feed of a
149
+ * nested Error's message or stack, and of a string a custom inspector
150
+ * returns — and the quotes and the plus sign of the joint it writes when it
151
+ * splits a long string after each line feed (`'line 1\n' +\n 'line 2'`).
152
+ *
153
+ * @constant
154
+ * @type {string}
155
+ */
156
+ var LAYOUT_CLASS = '[\\s\'"`+]';
157
+
158
+ /**
159
+ * One character of {@link LAYOUT_CLASS}, to test a character of a value.
160
+ *
161
+ * @constant
162
+ * @type {RegExp}
163
+ */
164
+ var LAYOUT_CHAR_RE = /[\s'"`+]/;
165
+
166
+ /**
167
+ * The regex source that finds one secret value (#B838). A value that holds no
168
+ * line break is matched literally, exactly as before. A line break is matched
169
+ * with the layout a renderer can give it:
170
+ *
171
+ * - a carriage return matches a carriage return or a line feed — the
172
+ * levelled string path writes the first as the second before the
173
+ * redaction runs;
174
+ * - a line feed followed by more of the value matches the line feed, then
175
+ * any run of {@link LAYOUT_CLASS} characters. The layout characters the
176
+ * value itself holds right after that line feed are part of the run, so
177
+ * the run is always followed by a character outside the class: no two
178
+ * variable-length parts are adjacent, and the match stays linear;
179
+ * - at the very end of a value nothing is tolerated: the trailing characters
180
+ * are matched as they are, so the mask stops where the value stops.
181
+ *
182
+ * The tolerance only ever widens what is masked.
183
+ *
184
+ * @inner
185
+ * @private
186
+ * @param {string} v - A secret value
187
+ * @returns {string} The regex source matching it
188
+ *
189
+ * @example
190
+ * secretSource('p@ss.w0rd'); // → 'p@ss\\.w0rd' (escapeRegExp, unchanged)
191
+ * secretSource('ab\r\ncd'); // → 'ab[\\r\\n]\\n[\\s\'"`+]*cd'
192
+ * secretSource('ab\n'); // → 'ab\\n' (nothing tolerated at the end)
193
+ */
194
+ function secretSource(v) {
195
+ if (v.indexOf('\n') < 0 && v.indexOf('\r') < 0) {
196
+ return escapeRegExp(v);
197
+ }
198
+ var out = '', last = 0, i = 0, len = v.length, c, j;
199
+ while (i < len) {
200
+ c = v.charCodeAt(i);
201
+ if (c !== 13 && c !== 10) { i++; continue; }
202
+ out += escapeRegExp(v.slice(last, i));
203
+ if (c === 13) {
204
+ out += '[\\r\\n]';
205
+ i++;
206
+ } else {
207
+ j = i + 1;
208
+ while (j < len && LAYOUT_CHAR_RE.test(v.charAt(j))) { j++; }
209
+ if (j < len) {
210
+ out += '\\n' + LAYOUT_CLASS + '*';
211
+ i = j;
212
+ } else {
213
+ out += '\\n';
214
+ i++;
215
+ }
216
+ }
217
+ last = i;
218
+ }
219
+ return out + escapeRegExp(v.slice(last));
220
+ }
221
+
222
+ /**
223
+ * Compile one pattern rule. Accepts the string form (whole match → marker)
224
+ * or the object form `{ pattern, flags, replacement, name }`. The `g` flag
225
+ * is always enforced — without it only the FIRST credential on a line would
226
+ * be masked.
227
+ *
228
+ * @inner
229
+ * @private
230
+ * @param {string|object} rule - A `patterns[]` entry
231
+ * @param {string} origin - Where the rule comes from, for the error message
232
+ * @param {number} index - Its position in `patterns`, for the error message
233
+ * @returns {{name: string, re: RegExp, replacement: string}} The compiled rule
234
+ * @throws {Error} When the entry is not a string / object, `pattern` is not a
235
+ * non-empty string, `flags` / `replacement` are not strings, the regex does
236
+ * not compile, or it matches the empty string
237
+ */
238
+ function compileRule(rule, origin, index) {
239
+ var where = '`settings.log.redact.patterns[' + index + ']` (' + origin + ')';
240
+ var source, flags = 'g', replacement = MARKER, name = null;
241
+
242
+ if (typeof rule === 'string') {
243
+ source = rule;
244
+ } else if (rule !== null && typeof rule === 'object' && !Array.isArray(rule)) {
245
+ source = rule.pattern;
246
+ if (typeof rule.flags !== 'undefined') {
247
+ if (typeof rule.flags !== 'string') {
248
+ throw new Error(where + ': `flags` must be a string');
249
+ }
250
+ flags = rule.flags.indexOf('g') > -1 ? rule.flags : rule.flags + 'g';
251
+ }
252
+ if (typeof rule.replacement !== 'undefined') {
253
+ if (typeof rule.replacement !== 'string') {
254
+ throw new Error(where + ': `replacement` must be a string');
255
+ }
256
+ replacement = rule.replacement;
257
+ }
258
+ if (typeof rule.name !== 'undefined') {
259
+ if (typeof rule.name !== 'string') {
260
+ throw new Error(where + ': `name` must be a string');
261
+ }
262
+ name = rule.name;
263
+ }
264
+ } else {
265
+ throw new Error(where + ': must be a regex source string or an object { pattern, flags, replacement }');
266
+ }
267
+
268
+ if (typeof source !== 'string' || source.length === 0) {
269
+ throw new Error(where + ': `pattern` must be a non-empty regex source string');
270
+ }
271
+
272
+ var re;
273
+ try {
274
+ re = new RegExp(source, flags);
275
+ } catch (reErr) {
276
+ throw new Error(where + ': invalid regular expression — ' + reErr.message);
277
+ }
278
+ // A pattern matching the empty string would splice the marker between every
279
+ // character of every line.
280
+ re.lastIndex = 0;
281
+ if (re.test('')) {
282
+ throw new Error(where + ': the pattern matches the empty string and would redact every position of every line');
283
+ }
284
+ re.lastIndex = 0;
285
+
286
+ return { name: name || ('patterns[' + index + ']'), re: re, replacement: replacement };
287
+ }
288
+
289
+ /**
290
+ * Compile a compiled-rule descriptor from one of `DEFAULT_RULES`.
291
+ *
292
+ * @inner
293
+ * @private
294
+ * @param {{name: string, pattern: string, flags: string, replacement: string}} d
295
+ * @returns {{name: string, re: RegExp, replacement: string}}
296
+ */
297
+ function compileDefault(d) {
298
+ return { name: d.name, re: new RegExp(d.pattern, d.flags), replacement: d.replacement };
299
+ }
300
+
301
+ /**
302
+ * Validate and compile one bundle's `settings.log.redact` block.
303
+ *
304
+ * Booleans are STRICT: `"false"` (a string) is refused rather than read as
305
+ * truthy — the same lint posture as `settings.audit.enabled`. An absent block
306
+ * compiles to the defaults (everything on, no extra patterns).
307
+ *
308
+ * @memberof module:lib/logger/redact
309
+ * @function compileBlock
310
+ * @param {object} [block] - The `log.redact` object from settings.json
311
+ * @param {string} [origin='settings.json'] - Where it comes from (bundle name), for error messages
312
+ * @returns {{enabled: boolean, defaults: boolean, secrets: boolean, patterns: Array<{name: string, re: RegExp, replacement: string}>}}
313
+ * The compiled block
314
+ * @throws {Error} On any shape violation (see `compileRule`) or an unknown key
315
+ *
316
+ * @example
317
+ * redact.compileBlock(undefined); // → { enabled: true, defaults: true, secrets: true, patterns: [] }
318
+ * redact.compileBlock({ enabled: false }, 'api'); // → everything off for that bundle
319
+ * redact.compileBlock({ patterns: ['('] }, 'api'); // throws: invalid regular expression
320
+ * redact.compileBlock({ pattern: ['x'] }, 'api'); // throws: unknown key `pattern` (a typo that would otherwise leak)
321
+ */
322
+ function compileBlock(block, origin) {
323
+ origin = origin || 'settings.json';
324
+ var out = { enabled: true, defaults: true, secrets: true, patterns: [] };
325
+ if (typeof block === 'undefined' || block === null) {
326
+ return out;
327
+ }
328
+ if (typeof block !== 'object' || Array.isArray(block)) {
329
+ throw new Error('`settings.log.redact` (' + origin + ') must be an object');
330
+ }
331
+ var keys = Object.keys(block);
332
+ for (var k = 0; k < keys.length; k++) {
333
+ if (BLOCK_KEYS.indexOf(keys[k]) < 0) {
334
+ throw new Error('`settings.log.redact` (' + origin + '): unknown key `' + keys[k] + '` — allowed keys are ' + BLOCK_KEYS.join(', '));
335
+ }
336
+ }
337
+ var bools = ['enabled', 'defaults', 'secrets'];
338
+ for (var b = 0; b < bools.length; b++) {
339
+ if (typeof block[bools[b]] !== 'undefined') {
340
+ if (block[bools[b]] !== true && block[bools[b]] !== false) {
341
+ throw new Error('`settings.log.redact.' + bools[b] + '` (' + origin + ') must be a strict boolean — got ' + JSON.stringify(block[bools[b]]));
342
+ }
343
+ out[bools[b]] = block[bools[b]];
344
+ }
345
+ }
346
+ if (typeof block.patterns !== 'undefined') {
347
+ if (!Array.isArray(block.patterns)) {
348
+ throw new Error('`settings.log.redact.patterns` (' + origin + ') must be an array');
349
+ }
350
+ for (var i = 0; i < block.patterns.length; i++) {
351
+ out.patterns.push(compileRule(block.patterns[i], origin, i));
352
+ }
353
+ }
354
+ return out;
355
+ }
356
+
357
+ /**
358
+ * Build the effective, process-wide state from every compiled block and every
359
+ * resolved secret value. The union is the safe direction: one bundle asking
360
+ * for redaction is enough for the whole process to redact (a merged process
361
+ * has one logger for every bundle), and a pattern declared anywhere applies
362
+ * everywhere. Duplicate patterns collapse to one.
363
+ *
364
+ * #B838 — each secret value is compiled with {@link secretSource}, so its line
365
+ * breaks match the layout a renderer gives them, and a value longer than
366
+ * `util.inspect`'s `maxStringLength` (read when this runs; 10,000 by default)
367
+ * also masks the head `util.inspect` keeps of it. `secretCount` counts the
368
+ * values, not the heads.
369
+ *
370
+ * @memberof module:lib/logger/redact
371
+ * @function compileState
372
+ * @param {Array<object>} blocks - Compiled blocks (from `compileBlock`)
373
+ * @param {string[]} [secretValues] - Resolved secret values to mask verbatim
374
+ * @returns {{enabled: boolean, rules: Array<{name: string, re: RegExp, replacement: string}>, secretRe: (RegExp|null), secretCount: number}|null}
375
+ * The state to hand to `apply()`, or `null` when redaction is off (no block
376
+ * enabled) or there is nothing to apply
377
+ *
378
+ * @example
379
+ * redact.compileState([]); // → null (nothing to do)
380
+ * redact.compileState([redact.compileBlock()]).rules.length; // → the built-in set
381
+ * redact.compileState([redact.compileBlock({ enabled: false })]); // → null
382
+ */
383
+ function compileState(blocks, secretValues) {
384
+ blocks = blocks || [];
385
+ if (blocks.length === 0) {
386
+ return null;
387
+ }
388
+ var enabled = false, defaults = false, i;
389
+ for (i = 0; i < blocks.length; i++) {
390
+ if (blocks[i].enabled) { enabled = true; }
391
+ if (blocks[i].enabled && blocks[i].defaults) { defaults = true; }
392
+ }
393
+ if (!enabled) {
394
+ return null;
395
+ }
396
+ var rules = [], seen = {};
397
+ var push = function (r) {
398
+ var key = r.re.source + '/' + r.re.flags + '/' + r.replacement;
399
+ if (seen[key]) { return; }
400
+ seen[key] = true;
401
+ rules.push(r);
402
+ };
403
+ if (defaults) {
404
+ for (i = 0; i < DEFAULT_RULES.length; i++) { push(compileDefault(DEFAULT_RULES[i])); }
405
+ }
406
+ for (i = 0; i < blocks.length; i++) {
407
+ if (!blocks[i].enabled) { continue; }
408
+ for (var p = 0; p < blocks[i].patterns.length; p++) { push(blocks[i].patterns[p]); }
409
+ }
410
+
411
+ var secretRe = null, secretCount = 0;
412
+ if (Array.isArray(secretValues) && secretValues.length > 0) {
413
+ var uniq = {}, list = [];
414
+ for (i = 0; i < secretValues.length; i++) {
415
+ var v = secretValues[i];
416
+ if (typeof v !== 'string' || v.length < MIN_SECRET_LENGTH || uniq[v]) { continue; }
417
+ uniq[v] = true;
418
+ list.push(v);
419
+ }
420
+ if (list.length > 0) {
421
+ // Longest first: a value that is a prefix of another must not win the
422
+ // alternation and leave the longer value's tail in the clear.
423
+ secretCount = list.length;
424
+ // #B838 — `util.inspect` cuts a string longer than its `maxStringLength`
425
+ // (10,000 by default): what it keeps of such a value is its head, which
426
+ // matches no reading of the whole value. The head is masked as a value of
427
+ // its own; a secret that sits further inside a longer cut string is not
428
+ // covered (the cut then falls elsewhere).
429
+ var inspectMax = (util.inspect && util.inspect.defaultOptions) ? util.inspect.defaultOptions.maxStringLength : 10000;
430
+ if (typeof inspectMax === 'number' && isFinite(inspectMax) && inspectMax >= MIN_SECRET_LENGTH) {
431
+ for (i = 0; i < secretCount; i++) {
432
+ if (list[i].length > inspectMax && !uniq[list[i].slice(0, inspectMax)]) {
433
+ uniq[list[i].slice(0, inspectMax)] = true;
434
+ list.push(list[i].slice(0, inspectMax));
435
+ }
436
+ }
437
+ }
438
+ list.sort(function (a, b) { return b.length - a.length; });
439
+ // #B838 — a secret's line breaks match the layout a renderer gives them
440
+ // was: secretRe = new RegExp(list.map(escapeRegExp).join('|'), 'g');
441
+ secretRe = new RegExp(list.map(secretSource).join('|'), 'g');
442
+ }
443
+ }
444
+
445
+ if (rules.length === 0 && secretRe === null) {
446
+ return null;
447
+ }
448
+ return { enabled: true, rules: rules, secretRe: secretRe, secretCount: secretCount };
449
+ }
450
+
451
+ /**
452
+ * The visible escapes a log writer produces for a control character (#B830):
453
+ * `\n`, `\r`, `\t`, and `\uXXXX`. Which `\uXXXX` forms count is decided by
454
+ * {@link isEscapedCodePoint} — the same set the escapers write, so the two
455
+ * stay in step. Either hex case is read.
456
+ *
457
+ * #B834 — plus the two quote escapes the object writers add to a string
458
+ * value: `\"` (the levelled writer, and `JSON.stringify` on the raw path) and
459
+ * `\'` (the levelled writer). Group 1 holds `n`, `r` or `t`, group 2 the four
460
+ * hex digits, group 3 the quote.
461
+ *
462
+ * @constant
463
+ * @type {RegExp}
464
+ */
465
+ var VISIBLE_ESCAPE_RE = /\\(?:([nrt])|u([0-9a-fA-F]{4})|(["']))/g;
466
+
467
+ /**
468
+ * Is this code point one the log escapers write as `\uXXXX` (or as `\n`,
469
+ * `\r`, `\t`)? C0 controls, DEL, C1 controls, and the two Unicode line
470
+ * separators — every character a terminal or a line-based reader can take
471
+ * for a line break or a control sequence.
472
+ *
473
+ * @inner
474
+ * @private
475
+ * @param {number} cp - A UTF-16 code unit
476
+ * @returns {boolean}
477
+ */
478
+ function isEscapedCodePoint(cp) {
479
+ return cp <= 0x1f || (cp >= 0x7f && cp <= 0x9f) || cp === 0x2028 || cp === 0x2029;
480
+ }
481
+
482
+ /**
483
+ * Build the DECODED reading of a message: the same text with every visible
484
+ * escape replaced by the character it stands for, plus the offset of each
485
+ * decoded character in the message as written.
486
+ *
487
+ * The escapers do not escape the backslash itself, so the reading is not an
488
+ * inverse: a `\n` (or, since #B834, a `\"`) the caller wrote on purpose reads
489
+ * as a line feed (or a quote) too. That is why {@link apply} never matches on
490
+ * this reading ALONE. The renderers that DO escape the backslash —
491
+ * `JSON.stringify` and `util.inspect` — are read by {@link decodeEscapes}
492
+ * (#B838), one layer at a time; this reading is kept as it is for the
493
+ * logger's own object writer, whose output it inverts.
494
+ *
495
+ * @memberof module:lib/logger/redact
496
+ * @function decodeView
497
+ * @param {string} text - The message as written
498
+ * @returns {{text: string, map: number[]}|null} The decoded text and, for
499
+ * each of its characters, the offset where that character starts in `text`
500
+ * (one extra trailing entry holds `text.length`); `null` when `text` holds
501
+ * no visible escape
502
+ *
503
+ * @example
504
+ * redact.decodeView('a\\nb'); // → { text: 'a\nb', map: [0, 1, 3, 4] }
505
+ * redact.decodeView('a\\"b'); // → { text: 'a"b', map: [0, 1, 3, 4] } (#B834)
506
+ * redact.decodeView('C:\\Users\\me'); // → null (no visible escape)
507
+ */
508
+ function decodeView(text) {
509
+ if (text.indexOf('\\') < 0) {
510
+ return null;
511
+ }
512
+ var out = '', map = [], last = 0, count = 0, m, ch, cp, i;
513
+ VISIBLE_ESCAPE_RE.lastIndex = 0;
514
+ while ((m = VISIBLE_ESCAPE_RE.exec(text)) !== null) {
515
+ if (m[1]) {
516
+ ch = m[1] === 'n' ? '\n' : (m[1] === 'r' ? '\r' : '\t');
517
+ } else if (m[2] != null) {
518
+ cp = parseInt(m[2], 16);
519
+ if (!isEscapedCodePoint(cp)) { continue; }
520
+ ch = String.fromCharCode(cp);
521
+ } else {
522
+ ch = m[3];
523
+ }
524
+ for (i = last; i < m.index; i++) { map.push(i); }
525
+ out += text.slice(last, m.index) + ch;
526
+ map.push(m.index);
527
+ last = m.index + m[0].length;
528
+ count++;
529
+ }
530
+ if (count === 0) {
531
+ return null;
532
+ }
533
+ for (i = last; i <= text.length; i++) { map.push(i); }
534
+ return { text: out + text.slice(last), map: map };
535
+ }
536
+
537
+ /**
538
+ * How many layers of backslash escaping are read back (#B838). The logger
539
+ * itself stacks two — an `Error` held by an object logged through
540
+ * `console.log` is rendered by `util.inspect`, then by `JSON.stringify` — and
541
+ * a string the caller serialised before logging it adds a third.
542
+ *
543
+ * @constant
544
+ * @type {number}
545
+ */
546
+ var MAX_ESCAPE_DEPTH = 3;
547
+
548
+ /**
549
+ * A backslash that does NOT start one of the object writer's simple escapes
550
+ * (`\n`, `\r`, `\t`, `\"`, `\'`). A message that holds none of these and
551
+ * has a decoded reading needs no further reading (#B838): every backslash in
552
+ * it starts one of those five escapes, both grammars read each of them as the
553
+ * same character, so reading a layer back would give the decoded reading
554
+ * again. The common line — a logged object whose values hold quotes or line
555
+ * breaks — is therefore searched exactly as before.
556
+ *
557
+ * @constant
558
+ * @type {RegExp}
559
+ */
560
+ var BEYOND_VIEW_RE = /\\(?![nrt"'])/;
561
+
562
+ /**
563
+ * Read `n` hexadecimal digits of `text` starting at `at`.
564
+ *
565
+ * @inner
566
+ * @private
567
+ * @param {string} text
568
+ * @param {number} at - Offset of the first digit
569
+ * @param {number} n - How many digits
570
+ * @returns {number} Their value, or -1 when one of them is not a hex digit
571
+ */
572
+ function hexValue(text, at, n) {
573
+ var v = 0, c, k;
574
+ for (k = 0; k < n; k++) {
575
+ c = text.charCodeAt(at + k);
576
+ if (c >= 48 && c <= 57) { c -= 48; }
577
+ else if (c >= 97 && c <= 102) { c -= 87; }
578
+ else if (c >= 65 && c <= 70) { c -= 55; }
579
+ else { return -1; }
580
+ v = v * 16 + c;
581
+ }
582
+ return v;
583
+ }
584
+
585
+ /**
586
+ * Read ONE layer of backslash escaping back, as `JSON.stringify` and
587
+ * `util.inspect` write it (#B838): `\\`, `\"`, `\'`, `\/`, `\b`, `\f`, `\n`,
588
+ * `\r`, `\t`, `\xHH` (`util.inspect`: C0, U+007F to U+009F) and `\uHHHH`
589
+ * (`JSON.stringify`: C0; both: a lone surrogate). Any `\xHH` or `\uHHHH` is
590
+ * read, whatever the code unit, so a serialiser that escapes more characters
591
+ * than those two is read as well; an escape outside the grammar stays as
592
+ * written. One scan, with no regex: it runs on every logged line that holds a
593
+ * backslash. The single implementation of the grammar — {@link unescapeLayer}
594
+ * and {@link decodeEscapes} are its two forms.
595
+ *
596
+ * @inner
597
+ * @private
598
+ * @param {string} text - A message, or a reading of it
599
+ * @param {number[]|null} map - Receives, for each character of the result, its
600
+ * offset in `text` (plus one trailing entry, `text.length`); `null` to skip
601
+ * @returns {string|null} The text with one layer read back; `null` when it holds no escape
602
+ */
603
+ function readLayer(text, map) {
604
+ var i = text.indexOf('\\');
605
+ if (i < 0) {
606
+ return null;
607
+ }
608
+ var out = '', last = 0, len = text.length, ch, n, v, k;
609
+ while (i > -1 && i + 1 < len) {
610
+ n = 2; ch = null;
611
+ switch (text.charCodeAt(i + 1)) {
612
+ case 92: ch = '\\'; break;
613
+ case 34: ch = '"'; break;
614
+ case 39: ch = '\''; break;
615
+ case 47: ch = '/'; break;
616
+ case 98: ch = '\b'; break;
617
+ case 102: ch = '\f'; break;
618
+ case 110: ch = '\n'; break;
619
+ case 114: ch = '\r'; break;
620
+ case 116: ch = '\t'; break;
621
+ case 120: v = hexValue(text, i + 2, 2); if (v > -1) { ch = String.fromCharCode(v); n = 4; } break;
622
+ case 117: v = hexValue(text, i + 2, 4); if (v > -1) { ch = String.fromCharCode(v); n = 6; } break;
623
+ }
624
+ if (ch === null) {
625
+ // not an escape of the grammar: it stays as written
626
+ i = text.indexOf('\\', i + 1);
627
+ continue;
628
+ }
629
+ if (map !== null) {
630
+ for (k = last; k < i; k++) { map.push(k); }
631
+ map.push(i);
632
+ }
633
+ out += text.slice(last, i) + ch;
634
+ last = i + n;
635
+ i = text.indexOf('\\', last);
636
+ }
637
+ if (last === 0) {
638
+ return null;
639
+ }
640
+ if (map !== null) {
641
+ for (k = last; k <= len; k++) { map.push(k); }
642
+ }
643
+ return out + text.slice(last);
644
+ }
645
+
646
+ /**
647
+ * Read one layer of backslash escaping back, text only: the fast form of
648
+ * {@link decodeEscapes}, used to search a reading before any offset is built.
649
+ *
650
+ * @inner
651
+ * @private
652
+ * @param {string} text - A message, or a reading of it
653
+ * @returns {string|null} The text with one layer removed; `null` when it holds no escape
654
+ */
655
+ function unescapeLayer(text) {
656
+ return readLayer(text, null);
657
+ }
658
+
659
+ /**
660
+ * Build the UNESCAPED reading of a text (#B838): the same text with one layer
661
+ * of backslash escaping read back, plus the offset of each of its characters
662
+ * in the text it was read from — the shape {@link decodeView} returns.
663
+ *
664
+ * `JSON.stringify` and `util.inspect` both escape the backslash itself, so in
665
+ * their output every backslash starts an escape and this reading is an exact
666
+ * inverse of one layer. It is not one for the logger's own object writer,
667
+ * which leaves the backslash alone: a backslash followed by an escaped line
668
+ * feed is written `\\n` there, and reads here as a written `\n`. That writer
669
+ * keeps its own reading ({@link decodeView}), and {@link apply} searches both.
670
+ *
671
+ * @memberof module:lib/logger/redact
672
+ * @function decodeEscapes
673
+ * @param {string} text - A message, or a reading of it
674
+ * @returns {{text: string, map: number[]}|null} The unescaped text and, for
675
+ * each of its characters, the offset where that character starts in `text`
676
+ * (one extra trailing entry holds `text.length`); `null` when `text` holds
677
+ * no escape of the grammar
678
+ *
679
+ * @example
680
+ * redact.decodeEscapes('a\\\\b'); // → { text: 'a\\b', map: [0, 1, 3, 4] } (an escaped backslash)
681
+ * redact.decodeEscapes('a\\x01b'); // → { text: 'a\u0001b', map: [0, 1, 5, 6] } (util.inspect)
682
+ * redact.decodeEscapes('a\\ud800b'); // → { text: 'a\ud800b', map: [0, 1, 7, 8] } (a lone surrogate)
683
+ * redact.decodeEscapes('C:\\Users\\me'); // → null (`\U` and `\m` are not escapes)
684
+ */
685
+ function decodeEscapes(text) {
686
+ var map = [], out = readLayer(text, map);
687
+ return out === null ? null : { text: out, map: map };
688
+ }
689
+
690
+ /**
691
+ * Expand a replacement template the way `String.prototype.replace` does
692
+ * (`$$`, `$&`, `` $` ``, `$'`, `$n`, `$nn`, `$<name>`), taking every piece
693
+ * from the message AS WRITTEN: a kept group is copied with its escapes still
694
+ * visible, so no control character is written back into the log.
695
+ *
696
+ * @inner
697
+ * @private
698
+ * @param {string} tpl - The rule's replacement
699
+ * @param {string} raw - The message as written
700
+ * @param {number} start - Start of the match in `raw`
701
+ * @param {number} end - End of the match in `raw`
702
+ * @param {object} match - The match on the decoded reading (compiled with the `d` flag)
703
+ * @param {number[]} map - Decoded offset → offset in `raw`
704
+ * @returns {string} The text to write in place of `raw.slice(start, end)`
705
+ */
706
+ function expandReplacement(tpl, raw, start, end, match, map) {
707
+ if (tpl.indexOf('$') < 0) {
708
+ return tpl;
709
+ }
710
+ var groupCount = match.length - 1;
711
+ var named = match.indices.groups;
712
+ var group = function (span) {
713
+ return span ? raw.slice(map[span[0]], map[span[1]]) : '';
714
+ };
715
+ var out = '', i = 0, len = tpl.length, c, d1, d2, n, gt;
716
+ while (i < len) {
717
+ c = tpl.charAt(i);
718
+ if (c !== '$' || i + 1 >= len) { out += c; i++; continue; }
719
+ c = tpl.charAt(i + 1);
720
+ if (c === '$') { out += '$'; i += 2; continue; }
721
+ if (c === '&') { out += raw.slice(start, end); i += 2; continue; }
722
+ if (c === '`') { out += raw.slice(0, start); i += 2; continue; }
723
+ if (c === '\'') { out += raw.slice(end); i += 2; continue; }
724
+ if (c >= '0' && c <= '9') {
725
+ d1 = c.charCodeAt(0) - 48;
726
+ d2 = (i + 2 < len) ? tpl.charCodeAt(i + 2) - 48 : -1;
727
+ if (d2 >= 0 && d2 <= 9) {
728
+ n = d1 * 10 + d2;
729
+ if (n >= 1 && n <= groupCount) { out += group(match.indices[n]); i += 3; continue; }
730
+ }
731
+ if (d1 >= 1 && d1 <= groupCount) { out += group(match.indices[d1]); i += 2; continue; }
732
+ out += '$'; i++; continue;
733
+ }
734
+ if (c === '<' && typeof named !== 'undefined') {
735
+ gt = tpl.indexOf('>', i + 2);
736
+ if (gt > -1) { out += group(named[tpl.slice(i + 2, gt)]); i = gt + 1; continue; }
737
+ }
738
+ out += '$'; i++;
739
+ }
740
+ return out;
741
+ }
742
+
743
+ /**
744
+ * Apply one pattern rule on the decoded reading and write the result into
745
+ * the message as written: each match is mapped back to the span it covers
746
+ * there, and that span is replaced.
747
+ *
748
+ * @memberof module:lib/logger/redact
749
+ * @function replaceThroughView
750
+ * @param {{re: RegExp, replacement: string}} rule - A compiled rule
751
+ * @param {string} raw - The message as written
752
+ * @param {{text: string, map: number[]}} view - Its decoded reading (from `decodeView`)
753
+ * @returns {string} The message with every match on the decoded reading replaced
754
+ *
755
+ * @example
756
+ * // `password=` sits right after an escaped line feed: the rule cannot see
757
+ * // the boundary in the text as written, it can on the decoded reading
758
+ * var rule = redact.compileState([redact.compileBlock()]).rules[4];
759
+ * var raw = 'A=1\\npassword=hunter2';
760
+ * redact.replaceThroughView(rule, raw, redact.decodeView(raw)); // → 'A=1\\npassword=[REDACTED]'
761
+ */
762
+ function replaceThroughView(rule, raw, view) {
763
+ if (!rule.reD) {
764
+ // the `d` flag gives each group's offsets, which the mapping needs
765
+ rule.reD = new RegExp(rule.re.source, rule.re.flags.indexOf('d') > -1 ? rule.re.flags : rule.re.flags + 'd');
766
+ }
767
+ rule.reD.lastIndex = 0;
768
+ var it = view.text.matchAll(rule.reD), step, m, start, end;
769
+ var out = '', pos = 0, changed = false;
770
+ while (!(step = it.next()).done) {
771
+ m = step.value;
772
+ start = view.map[m.index];
773
+ end = view.map[m.index + m[0].length];
774
+ out += raw.slice(pos, start) + expandReplacement(rule.replacement, raw, start, end, m, view.map);
775
+ pos = end;
776
+ changed = true;
777
+ }
778
+ return changed ? out + raw.slice(pos) : raw;
779
+ }
780
+
781
+ /**
782
+ * Push every span of one reading that the secret alternation matches, as
783
+ * offsets in the message as written.
784
+ *
785
+ * @inner
786
+ * @private
787
+ * @param {RegExp} secretRe - The compiled alternation (never matches the empty string)
788
+ * @param {string} text - The reading to search
789
+ * @param {number[]|null} map - Offset in `text` → offset in the message as written; `null` when `text` is that message
790
+ * @param {Array<number[]>} spans - Receives `[start, end]` pairs
791
+ * @returns {void}
792
+ */
793
+ function collectSpans(secretRe, text, map, spans) {
794
+ var m;
795
+ secretRe.lastIndex = 0;
796
+ while ((m = secretRe.exec(text)) !== null) {
797
+ spans.push(map === null ? [m.index, m.index + m[0].length] : [map[m.index], map[m.index + m[0].length]]);
798
+ }
799
+ secretRe.lastIndex = 0;
800
+ }
801
+
802
+ /**
803
+ * Mask the secret values on EVERY reading at once: the spans found in the
804
+ * message as written, on its decoded reading, and on each layer of backslash
805
+ * escaping read back from either (#B838) are merged, and every merged span
806
+ * becomes one marker. Merging keeps the longest-first guarantee across the
807
+ * readings — a short value found as written inside a longer one found on
808
+ * another reading cannot leave the longer one's head in the clear.
809
+ *
810
+ * A layer is first read as text only ({@link unescapeLayer}); its offsets are
811
+ * built ({@link decodeEscapes}) only when a secret is found on it, so a line
812
+ * that holds escapes and no secret pays for the search alone. A reading equal
813
+ * to one already searched is not searched again.
814
+ *
815
+ * (Before #B838: `maskSecretsOnBothReadings`, the first two readings only.)
816
+ *
817
+ * @inner
818
+ * @private
819
+ * @param {RegExp} secretRe - The compiled alternation (never matches the empty string)
820
+ * @param {string} raw - The message as written
821
+ * @param {{text: string, map: number[]}|null} view - Its decoded reading, or `null` when it has none
822
+ * @returns {string} The message with every span masked
823
+ */
824
+ function maskSecretsOnReadings(secretRe, raw, view) {
825
+ var spans = [], seen = [raw], bases = [[raw, null]];
826
+ var b, d, k, i, text, next, map, froms;
827
+ collectSpans(secretRe, raw, null, spans);
828
+ if (view !== null) {
829
+ collectSpans(secretRe, view.text, view.map, spans);
830
+ seen.push(view.text);
831
+ bases.push([view.text, view.map]);
832
+ // nothing but the object writer's simple escapes: the two readings above are all there is
833
+ if (!BEYOND_VIEW_RE.test(raw)) { bases = []; }
834
+ }
835
+ for (b = 0; b < bases.length; b++) {
836
+ text = bases[b][0];
837
+ froms = [];
838
+ for (d = 0; d < MAX_ESCAPE_DEPTH; d++) {
839
+ next = unescapeLayer(text);
840
+ if (next === null) { break; }
841
+ froms.push(text);
842
+ text = next;
843
+ if (seen.indexOf(text) > -1) { continue; }
844
+ seen.push(text);
845
+ secretRe.lastIndex = 0;
846
+ if (!secretRe.test(text)) { continue; }
847
+ // a secret is on this reading: build its offsets, layer by layer,
848
+ // down to the message as written
849
+ map = bases[b][1];
850
+ for (k = 0; k < froms.length; k++) {
851
+ next = decodeEscapes(froms[k]).map;
852
+ if (map !== null) {
853
+ for (i = 0; i < next.length; i++) { next[i] = map[next[i]]; }
854
+ }
855
+ map = next;
856
+ }
857
+ collectSpans(secretRe, text, map, spans);
858
+ }
859
+ }
860
+ secretRe.lastIndex = 0;
861
+ if (spans.length === 0) {
862
+ return raw;
863
+ }
864
+ spans.sort(function (a, b) { return (a[0] - b[0]) || (a[1] - b[1]); });
865
+ var out = '', pos = 0, cur = spans[0];
866
+ for (i = 1; i < spans.length; i++) {
867
+ if (spans[i][0] < cur[1]) {
868
+ if (spans[i][1] > cur[1]) { cur[1] = spans[i][1]; }
869
+ } else {
870
+ out += raw.slice(pos, cur[0]) + MARKER;
871
+ pos = cur[1];
872
+ cur = spans[i];
873
+ }
874
+ }
875
+ return out + raw.slice(pos, cur[0]) + MARKER + raw.slice(cur[1]);
876
+ }
877
+
878
+ /**
879
+ * Redact one message. Secret values are applied FIRST (an exact literal beats
880
+ * a pattern), then every pattern rule. Idempotent: a redacted message
881
+ * re-redacts to itself. Anything that is not a string is returned untouched.
882
+ *
883
+ * #B830 — a message can reach this point with control characters already
884
+ * written as visible escapes (`\n`, `\r`, `\t`, `\uXXXX`): a logged object's
885
+ * values, an error detail, a client value a framework site escaped. A visible
886
+ * escape ends in a word character and stands where whitespace stood, so a
887
+ * rule anchored on `\b`, a lookbehind or `\s`, and a secret value holding a
888
+ * line break, would stop matching. Such a message is therefore read TWICE:
889
+ * as written, then decoded (each visible escape read as the character it
890
+ * stands for), and a span found on the decoded reading is masked in the
891
+ * message as written. The decoded reading only ever ADDS masks — the escapers
892
+ * leave the backslash alone, so a `\n` the caller wrote on purpose is not
893
+ * told from an escaped line feed, and a credential holding one must still be
894
+ * found as written. A message with no visible escape takes the first reading
895
+ * only: one `replace` per rule, as before.
896
+ *
897
+ * #B834 — the decoded reading also reads the quote escapes an object's string
898
+ * values receive (`\"`, `\'`), so a secret holding a quote, logged inside an
899
+ * object or through `console.log`, is masked as well.
900
+ *
901
+ * #B838 — the secret values are searched on more readings than the pattern
902
+ * rules: `JSON.stringify` (the raw path, a JSON string a caller builds) and
903
+ * `util.inspect` (an `Error`) escape the backslash itself, so a message that
904
+ * holds a backslash is also read with each layer of that escaping read back
905
+ * ({@link decodeEscapes}), up to `MAX_ESCAPE_DEPTH` layers, from the message
906
+ * as written and from its decoded reading. A secret holding a backslash, a
907
+ * control character or a lone surrogate is then found whichever renderer
908
+ * wrote it, and so is one rendered more than once. The pattern rules keep
909
+ * their two readings. Not found: a value that is not written as its own
910
+ * characters (a Buffer's bytes, base64, URL-encoding), and a secret that sits
911
+ * inside a longer string `util.inspect` cut at its `maxStringLength`.
912
+ *
913
+ * @memberof module:lib/logger/redact
914
+ * @function apply
915
+ * @param {object|null} state - From `compileState()`; `null` = pass-through
916
+ * @param {string} content - The assembled log message, before rendering
917
+ * @returns {string} The redacted message (or the input when there is nothing to do)
918
+ *
919
+ * @example
920
+ * var st = redact.compileState([redact.compileBlock()]);
921
+ * redact.apply(st, 'POST [200] /login Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIn0.abcdefghijklmnop');
922
+ * // → 'POST [200] /login Authorization: Bearer [REDACTED]'
923
+ * redact.apply(st, 'GET [200] /files/42'); // → unchanged
924
+ * redact.apply(null, 'anything'); // → 'anything'
925
+ * redact.apply(st, '"env": "A=1\\npassword=hunter2"');
926
+ * // → '"env": "A=1\\npassword=[REDACTED]"' (found on the decoded reading)
927
+ */
928
+ function apply(state, content) {
929
+ if (!state || !state.enabled || typeof content !== 'string' || content.length === 0) {
930
+ return content;
931
+ }
932
+ var view = decodeView(content), i, next;
933
+ // #B838 — the secret values are read on every escape layer of a message that
934
+ // holds a backslash, whether or not it holds a visible escape of the object writer.
935
+ // was: (inside `if (view === null)`) content = content.replace(state.secretRe, MARKER);
936
+ // (otherwise) next = maskSecretsOnBothReadings(state.secretRe, content, view);
937
+ if (state.secretRe !== null) {
938
+ if (content.indexOf('\\') < 0) {
939
+ // no backslash: the message as written is the only reading
940
+ content = content.replace(state.secretRe, MARKER);
941
+ } else {
942
+ next = maskSecretsOnReadings(state.secretRe, content, view);
943
+ if (next !== content) { content = next; view = decodeView(content); }
944
+ }
945
+ }
946
+ if (view === null) {
947
+ // no visible escape: the pattern rules read the message as written only
948
+ for (i = 0; i < state.rules.length; i++) {
949
+ content = content.replace(state.rules[i].re, state.rules[i].replacement);
950
+ }
951
+ return content;
952
+ }
953
+ for (i = 0; i < state.rules.length; i++) {
954
+ next = content.replace(state.rules[i].re, state.rules[i].replacement);
955
+ if (next !== content) { content = next; view = decodeView(content); }
956
+ if (view !== null) {
957
+ next = replaceThroughView(state.rules[i], content, view);
958
+ if (next !== content) { content = next; view = decodeView(content); }
959
+ }
960
+ }
961
+ return content;
962
+ }
963
+
964
+ /**
965
+ * Filter the secret values that `compileState` would accept, returning the
966
+ * ones it would SKIP (too short) so a caller can warn with their paths.
967
+ *
968
+ * @memberof module:lib/logger/redact
969
+ * @function partitionSecrets
970
+ * @param {Array<{path: string, value: *}>} entries - Resolved secrets with their config paths
971
+ * @returns {{values: string[], skipped: string[]}} Accepted values + the skipped paths
972
+ *
973
+ * @example
974
+ * redact.partitionSecrets([{ path: 'db.password', value: 'correct-horse-battery' }, { path: 'pin', value: '1234' }]);
975
+ * // → { values: ['correct-horse-battery'], skipped: ['pin'] }
976
+ */
977
+ function partitionSecrets(entries) {
978
+ var out = { values: [], skipped: [] };
979
+ if (!Array.isArray(entries)) { return out; }
980
+ for (var i = 0; i < entries.length; i++) {
981
+ var e = entries[i];
982
+ if (!e || typeof e.value !== 'string') { continue; }
983
+ if (e.value.length < MIN_SECRET_LENGTH) {
984
+ out.skipped.push(e.path);
985
+ } else {
986
+ out.values.push(e.value);
987
+ }
988
+ }
989
+ return out;
990
+ }
991
+
992
+ module.exports = {
993
+ MARKER : MARKER,
994
+ MIN_SECRET_LENGTH : MIN_SECRET_LENGTH,
995
+ DEFAULT_RULES : DEFAULT_RULES,
996
+ compileBlock : compileBlock,
997
+ compileState : compileState,
998
+ apply : apply,
999
+ decodeView : decodeView,
1000
+ decodeEscapes : decodeEscapes,
1001
+ replaceThroughView: replaceThroughView,
1002
+ partitionSecrets : partitionSecrets
1003
+ };