gina 0.7.10 → 0.7.11

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 (641) hide show
  1. package/CHANGELOG.md +37 -1
  2. package/README.md +59 -27
  3. package/ROADMAP.md +2 -0
  4. package/framework/v0.7.11/VERSION +1 -0
  5. package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/js/gina.js +533 -34
  6. package/framework/v0.7.11/core/asset/plugin/dist/vendor/gina/js/gina.min.js +768 -0
  7. package/framework/v0.7.11/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
  8. package/framework/v0.7.11/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
  9. package/framework/{v0.7.10 → v0.7.11}/core/config.js +51 -11
  10. package/framework/v0.7.11/core/config.param-bindings.js +159 -0
  11. package/framework/{v0.7.10 → v0.7.11}/core/controller/controller.js +341 -31
  12. package/framework/{v0.7.10 → v0.7.11}/core/controller/controller.render-swig.js +187 -46
  13. package/framework/v0.7.11/core/controller/layout-source.js +158 -0
  14. package/framework/{v0.7.10 → v0.7.11}/core/gna.js +18 -0
  15. package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/validator/src/main.js +319 -4
  16. package/framework/{v0.7.10 → v0.7.11}/core/router.js +50 -3
  17. package/framework/{v0.7.10 → v0.7.11}/core/server.isaac.js +9 -0
  18. package/framework/{v0.7.10 → v0.7.11}/core/server.js +23 -0
  19. package/framework/{v0.7.10 → v0.7.11}/lib/i18n/src/main.js +22 -4
  20. package/framework/{v0.7.10 → v0.7.11}/lib/index.js +6 -0
  21. package/framework/{v0.7.10 → v0.7.11}/lib/logger/src/main.js +25 -1
  22. package/framework/{v0.7.10 → v0.7.11}/lib/metrics/src/main.js +81 -2
  23. package/framework/{v0.7.10 → v0.7.11}/lib/routing/src/main.js +14 -4
  24. package/framework/v0.7.11/lib/stall-watchdog/package.json +20 -0
  25. package/framework/v0.7.11/lib/stall-watchdog/src/detector.js +76 -0
  26. package/framework/v0.7.11/lib/stall-watchdog/src/frames.js +197 -0
  27. package/framework/v0.7.11/lib/stall-watchdog/src/main.js +743 -0
  28. package/framework/v0.7.11/lib/stall-watchdog/src/worker.js +788 -0
  29. package/framework/{v0.7.10 → v0.7.11}/lib/storage/src/s3.js +65 -10
  30. package/framework/{v0.7.10 → v0.7.11}/package.json +1 -1
  31. package/gna.js +4 -4
  32. package/llms.txt +20 -18
  33. package/package.json +6 -6
  34. package/schema/settings.json +36 -0
  35. package/types/index.d.ts +31 -0
  36. package/framework/v0.7.10/VERSION +0 -1
  37. package/framework/v0.7.10/core/asset/plugin/dist/vendor/gina/js/gina.min.js +0 -758
  38. package/framework/v0.7.10/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
  39. package/framework/v0.7.10/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
  40. /package/framework/{v0.7.10 → v0.7.11}/AUTHORS +0 -0
  41. /package/framework/{v0.7.10 → v0.7.11}/LICENSE +0 -0
  42. /package/framework/{v0.7.10 → v0.7.11}/core/asset/html/nolayout.html +0 -0
  43. /package/framework/{v0.7.10 → v0.7.11}/core/asset/html/static.html +0 -0
  44. /package/framework/{v0.7.10 → v0.7.11}/core/asset/img/android-chrome-192x192.png +0 -0
  45. /package/framework/{v0.7.10 → v0.7.11}/core/asset/img/android-chrome-512x512.png +0 -0
  46. /package/framework/{v0.7.10 → v0.7.11}/core/asset/img/apple-touch-icon.png +0 -0
  47. /package/framework/{v0.7.10 → v0.7.11}/core/asset/img/favicon-16x16.png +0 -0
  48. /package/framework/{v0.7.10 → v0.7.11}/core/asset/img/favicon-32x32.png +0 -0
  49. /package/framework/{v0.7.10 → v0.7.11}/core/asset/img/favicon.ico +0 -0
  50. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/README.md +0 -0
  51. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.css +0 -0
  52. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.js +0 -0
  53. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/beemaster/index.html +0 -0
  54. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
  55. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.br +0 -0
  56. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.gz +0 -0
  57. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/html/statusbar.html +0 -0
  58. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.br +0 -0
  59. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.gz +0 -0
  60. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/inspector/have_heart_one-webfont.woff2 +0 -0
  61. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/inspector/index.html +0 -0
  62. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/inspector/inspector.css +0 -0
  63. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/inspector/inspector.js +0 -0
  64. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/inspector/logo.svg +0 -0
  65. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -0
  66. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.br +0 -0
  67. /package/framework/{v0.7.10 → v0.7.11}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.gz +0 -0
  68. /package/framework/{v0.7.10 → v0.7.11}/core/config.requirements-anchor.js +0 -0
  69. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/ai/index.js +0 -0
  70. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/ai/lib/connector.js +0 -0
  71. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/couchbase/index.js +0 -0
  72. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/couchbase/lib/connector.js +0 -0
  73. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/couchbase/lib/connector.v3.js +0 -0
  74. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/couchbase/lib/connector.v4.js +0 -0
  75. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/couchbase/lib/n1ql.js +0 -0
  76. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/couchbase/lib/session-store.js +0 -0
  77. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
  78. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
  79. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/couchbase/lib/storage-store.js +0 -0
  80. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/duckdb/index.js +0 -0
  81. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/duckdb/lib/connector.js +0 -0
  82. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/mongodb/index.js +0 -0
  83. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/mongodb/lib/connector.js +0 -0
  84. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/mongodb/lib/job-store.js +0 -0
  85. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/mongodb/lib/pipeline-loader.js +0 -0
  86. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/mongodb/lib/session-store.js +0 -0
  87. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/mysql/index.js +0 -0
  88. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/mysql/lib/connector.js +0 -0
  89. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/param-redact.js +0 -0
  90. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/postgresql/index.js +0 -0
  91. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/postgresql/lib/connector.js +0 -0
  92. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/redis/index.js +0 -0
  93. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/redis/lib/connector.js +0 -0
  94. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/redis/lib/job-store.js +0 -0
  95. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/redis/lib/kv-store.js +0 -0
  96. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/redis/lib/render-cache-store.js +0 -0
  97. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/redis/lib/session-store.js +0 -0
  98. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/scylladb/index.js +0 -0
  99. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/scylladb/lib/connector.js +0 -0
  100. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/scylladb/lib/session-store.js +0 -0
  101. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/settle-once.js +0 -0
  102. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/sql-parser.js +0 -0
  103. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/sqlite/index.js +0 -0
  104. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/sqlite/lib/connector.js +0 -0
  105. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/sqlite/lib/job-store.js +0 -0
  106. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/sqlite/lib/kv-store.js +0 -0
  107. /package/framework/{v0.7.10 → v0.7.11}/core/connectors/sqlite/lib/session-store.js +0 -0
  108. /package/framework/{v0.7.10 → v0.7.11}/core/content.encoding +0 -0
  109. /package/framework/{v0.7.10 → v0.7.11}/core/controller/controller.framework.js +0 -0
  110. /package/framework/{v0.7.10 → v0.7.11}/core/controller/controller.render-json.js +0 -0
  111. /package/framework/{v0.7.10 → v0.7.11}/core/controller/controller.render-nunjucks-async.js +0 -0
  112. /package/framework/{v0.7.10 → v0.7.11}/core/controller/controller.render-nunjucks.js +0 -0
  113. /package/framework/{v0.7.10 → v0.7.11}/core/controller/controller.render-stream.js +0 -0
  114. /package/framework/{v0.7.10 → v0.7.11}/core/controller/controller.render-swig-async.js +0 -0
  115. /package/framework/{v0.7.10 → v0.7.11}/core/controller/controller.render-v1.js +0 -0
  116. /package/framework/{v0.7.10 → v0.7.11}/core/controller/controller.render-xml.js +0 -0
  117. /package/framework/{v0.7.10 → v0.7.11}/core/controller/index.js +0 -0
  118. /package/framework/{v0.7.10 → v0.7.11}/core/controller/inline-script.js +0 -0
  119. /package/framework/{v0.7.10 → v0.7.11}/core/controller/inspector-window-emit.js +0 -0
  120. /package/framework/{v0.7.10 → v0.7.11}/core/controller/preload-hints.js +0 -0
  121. /package/framework/{v0.7.10 → v0.7.11}/core/controller/release-banner.js +0 -0
  122. /package/framework/{v0.7.10 → v0.7.11}/core/controller/render-data.js +0 -0
  123. /package/framework/{v0.7.10 → v0.7.11}/core/controller/render-session.js +0 -0
  124. /package/framework/{v0.7.10 → v0.7.11}/core/dev/index.js +0 -0
  125. /package/framework/{v0.7.10 → v0.7.11}/core/dev/lib/class.js +0 -0
  126. /package/framework/{v0.7.10 → v0.7.11}/core/dev/lib/factory.js +0 -0
  127. /package/framework/{v0.7.10 → v0.7.11}/core/dev/lib/tools.js +0 -0
  128. /package/framework/{v0.7.10 → v0.7.11}/core/locales/README.md +0 -0
  129. /package/framework/{v0.7.10 → v0.7.11}/core/locales/currency.json +0 -0
  130. /package/framework/{v0.7.10 → v0.7.11}/core/locales/dist/language/en.json +0 -0
  131. /package/framework/{v0.7.10 → v0.7.11}/core/locales/dist/language/fr.json +0 -0
  132. /package/framework/{v0.7.10 → v0.7.11}/core/locales/dist/region/en.json +0 -0
  133. /package/framework/{v0.7.10 → v0.7.11}/core/locales/dist/region/fr.json +0 -0
  134. /package/framework/{v0.7.10 → v0.7.11}/core/locales/index.js +0 -0
  135. /package/framework/{v0.7.10 → v0.7.11}/core/mime.types +0 -0
  136. /package/framework/{v0.7.10 → v0.7.11}/core/model/entity.js +0 -0
  137. /package/framework/{v0.7.10 → v0.7.11}/core/model/index.js +0 -0
  138. /package/framework/{v0.7.10 → v0.7.11}/core/model/template/entityFactory.js +0 -0
  139. /package/framework/{v0.7.10 → v0.7.11}/core/model/template/index.js +0 -0
  140. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/README.md +0 -0
  141. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/index.js +0 -0
  142. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/csrf/README.md +0 -0
  143. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/csrf/package.json +0 -0
  144. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/csrf/src/main.js +0 -0
  145. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/README.md +0 -0
  146. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/coep/README.md +0 -0
  147. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/coep/package.json +0 -0
  148. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/coep/src/main.js +0 -0
  149. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/coop/README.md +0 -0
  150. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/coop/package.json +0 -0
  151. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/coop/src/main.js +0 -0
  152. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/corp/README.md +0 -0
  153. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/corp/package.json +0 -0
  154. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/corp/src/main.js +0 -0
  155. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/csp/README.md +0 -0
  156. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/csp/package.json +0 -0
  157. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/csp/src/main.js +0 -0
  158. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/hide-powered-by/README.md +0 -0
  159. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/hide-powered-by/package.json +0 -0
  160. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/hide-powered-by/src/main.js +0 -0
  161. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/hsts/README.md +0 -0
  162. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/hsts/package.json +0 -0
  163. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/hsts/src/main.js +0 -0
  164. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/origin-agent-cluster/README.md +0 -0
  165. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/origin-agent-cluster/package.json +0 -0
  166. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/origin-agent-cluster/src/main.js +0 -0
  167. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/package.json +0 -0
  168. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/referrer-policy/README.md +0 -0
  169. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/referrer-policy/package.json +0 -0
  170. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/referrer-policy/src/main.js +0 -0
  171. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/src/main.js +0 -0
  172. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-content-type-options/README.md +0 -0
  173. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-content-type-options/package.json +0 -0
  174. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-content-type-options/src/main.js +0 -0
  175. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-dns-prefetch-control/README.md +0 -0
  176. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-dns-prefetch-control/package.json +0 -0
  177. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-dns-prefetch-control/src/main.js +0 -0
  178. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-download-options/README.md +0 -0
  179. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-download-options/package.json +0 -0
  180. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-download-options/src/main.js +0 -0
  181. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-frame-options/README.md +0 -0
  182. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-frame-options/package.json +0 -0
  183. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-frame-options/src/main.js +0 -0
  184. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/README.md +0 -0
  185. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/package.json +0 -0
  186. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/src/main.js +0 -0
  187. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-xss-protection/README.md +0 -0
  188. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-xss-protection/package.json +0 -0
  189. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/security-headers/x-xss-protection/src/main.js +0 -0
  190. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/session/README.md +0 -0
  191. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/session/package.json +0 -0
  192. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/session/src/main.js +0 -0
  193. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/storage/README.md +0 -0
  194. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/storage/build.json +0 -0
  195. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/storage/package.json +0 -0
  196. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/storage/src/main.js +0 -0
  197. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/validator/README.md +0 -0
  198. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/validator/build.json +0 -0
  199. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/validator/package.json +0 -0
  200. /package/framework/{v0.7.10 → v0.7.11}/core/plugins/lib/validator/src/form-validator.js +0 -0
  201. /package/framework/{v0.7.10 → v0.7.11}/core/server.express.js +0 -0
  202. /package/framework/{v0.7.10 → v0.7.11}/core/server.isaac.early-answer.js +0 -0
  203. /package/framework/{v0.7.10 → v0.7.11}/core/server.isaac.rapid-reset.js +0 -0
  204. /package/framework/{v0.7.10 → v0.7.11}/core/server.route-candidates.js +0 -0
  205. /package/framework/{v0.7.10 → v0.7.11}/core/status.codes +0 -0
  206. /package/framework/{v0.7.10 → v0.7.11}/core/template/_gitignore +0 -0
  207. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle/config/app.json +0 -0
  208. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle/config/connectors.json +0 -0
  209. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle/config/routing.json +0 -0
  210. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle/config/settings.json +0 -0
  211. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
  212. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle/config/templates.json +0 -0
  213. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle/config/watchers.json +0 -0
  214. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
  215. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
  216. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle/controllers/setup.js +0 -0
  217. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle/index.js +0 -0
  218. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle/locales/en.json +0 -0
  219. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
  220. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_public/css/default.css +0 -0
  221. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_public/css/home.css +0 -0
  222. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
  223. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
  224. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_public/js/components/x-checklist.js +0 -0
  225. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
  226. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_public/manifest.webmanifest +0 -0
  227. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_public/readme.md +0 -0
  228. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_public/sw.js +0 -0
  229. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
  230. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
  231. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
  232. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
  233. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_templates/html/includes/x-checklist.html +0 -0
  234. /package/framework/{v0.7.10 → v0.7.11}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
  235. /package/framework/{v0.7.10 → v0.7.11}/core/template/command/gina.bat.tpl +0 -0
  236. /package/framework/{v0.7.10 → v0.7.11}/core/template/command/gina.tpl +0 -0
  237. /package/framework/{v0.7.10 → v0.7.11}/core/template/conf/env.json +0 -0
  238. /package/framework/{v0.7.10 → v0.7.11}/core/template/conf/manifest.json +0 -0
  239. /package/framework/{v0.7.10 → v0.7.11}/core/template/conf/package.json +0 -0
  240. /package/framework/{v0.7.10 → v0.7.11}/core/template/conf/settings.json +0 -0
  241. /package/framework/{v0.7.10 → v0.7.11}/core/template/conf/statics.json +0 -0
  242. /package/framework/{v0.7.10 → v0.7.11}/core/template/conf/templates.json +0 -0
  243. /package/framework/{v0.7.10 → v0.7.11}/core/template/error/client/json/401.json +0 -0
  244. /package/framework/{v0.7.10 → v0.7.11}/core/template/error/client/json/403.json +0 -0
  245. /package/framework/{v0.7.10 → v0.7.11}/core/template/error/client/json/404.json +0 -0
  246. /package/framework/{v0.7.10 → v0.7.11}/core/template/error/server/html/50x.html +0 -0
  247. /package/framework/{v0.7.10 → v0.7.11}/core/template/error/server/json/500.json +0 -0
  248. /package/framework/{v0.7.10 → v0.7.11}/core/template/error/server/json/503.json +0 -0
  249. /package/framework/{v0.7.10 → v0.7.11}/core/template/extensions/logger/config.json +0 -0
  250. /package/framework/{v0.7.10 → v0.7.11}/helpers/console.js +0 -0
  251. /package/framework/{v0.7.10 → v0.7.11}/helpers/context.js +0 -0
  252. /package/framework/{v0.7.10 → v0.7.11}/helpers/data/LICENSE +0 -0
  253. /package/framework/{v0.7.10 → v0.7.11}/helpers/data/README.md +0 -0
  254. /package/framework/{v0.7.10 → v0.7.11}/helpers/data/package.json +0 -0
  255. /package/framework/{v0.7.10 → v0.7.11}/helpers/data/src/main.js +0 -0
  256. /package/framework/{v0.7.10 → v0.7.11}/helpers/dateFormat.js +0 -0
  257. /package/framework/{v0.7.10 → v0.7.11}/helpers/index.js +0 -0
  258. /package/framework/{v0.7.10 → v0.7.11}/helpers/json/LICENSE +0 -0
  259. /package/framework/{v0.7.10 → v0.7.11}/helpers/json/README.md +0 -0
  260. /package/framework/{v0.7.10 → v0.7.11}/helpers/json/package.json +0 -0
  261. /package/framework/{v0.7.10 → v0.7.11}/helpers/json/src/main.js +0 -0
  262. /package/framework/{v0.7.10 → v0.7.11}/helpers/path.js +0 -0
  263. /package/framework/{v0.7.10 → v0.7.11}/helpers/plugins/README.md +0 -0
  264. /package/framework/{v0.7.10 → v0.7.11}/helpers/plugins/package.json +0 -0
  265. /package/framework/{v0.7.10 → v0.7.11}/helpers/plugins/src/api-error.js +0 -0
  266. /package/framework/{v0.7.10 → v0.7.11}/helpers/plugins/src/main.js +0 -0
  267. /package/framework/{v0.7.10 → v0.7.11}/helpers/prototypes.js +0 -0
  268. /package/framework/{v0.7.10 → v0.7.11}/helpers/task.js +0 -0
  269. /package/framework/{v0.7.10 → v0.7.11}/helpers/text.js +0 -0
  270. /package/framework/{v0.7.10 → v0.7.11}/lib/admin/package.json +0 -0
  271. /package/framework/{v0.7.10 → v0.7.11}/lib/admin/src/main.js +0 -0
  272. /package/framework/{v0.7.10 → v0.7.11}/lib/archiver/README.md +0 -0
  273. /package/framework/{v0.7.10 → v0.7.11}/lib/archiver/build.json +0 -0
  274. /package/framework/{v0.7.10 → v0.7.11}/lib/archiver/package.json +0 -0
  275. /package/framework/{v0.7.10 → v0.7.11}/lib/archiver/src/dep/jszip.min.js +0 -0
  276. /package/framework/{v0.7.10 → v0.7.11}/lib/archiver/src/main.js +0 -0
  277. /package/framework/{v0.7.10 → v0.7.11}/lib/async/package.json +0 -0
  278. /package/framework/{v0.7.10 → v0.7.11}/lib/async/src/main.js +0 -0
  279. /package/framework/{v0.7.10 → v0.7.11}/lib/audit/package.json +0 -0
  280. /package/framework/{v0.7.10 → v0.7.11}/lib/audit/src/main.js +0 -0
  281. /package/framework/{v0.7.10 → v0.7.11}/lib/audit-store.js +0 -0
  282. /package/framework/{v0.7.10 → v0.7.11}/lib/authn/package.json +0 -0
  283. /package/framework/{v0.7.10 → v0.7.11}/lib/authn/src/lockout.js +0 -0
  284. /package/framework/{v0.7.10 → v0.7.11}/lib/authn/src/main.js +0 -0
  285. /package/framework/{v0.7.10 → v0.7.11}/lib/authn/src/totp.js +0 -0
  286. /package/framework/{v0.7.10 → v0.7.11}/lib/authz-gate/package.json +0 -0
  287. /package/framework/{v0.7.10 → v0.7.11}/lib/authz-gate/src/main.js +0 -0
  288. /package/framework/{v0.7.10 → v0.7.11}/lib/cache/README.md +0 -0
  289. /package/framework/{v0.7.10 → v0.7.11}/lib/cache/build.json +0 -0
  290. /package/framework/{v0.7.10 → v0.7.11}/lib/cache/package.json +0 -0
  291. /package/framework/{v0.7.10 → v0.7.11}/lib/cache/src/main.js +0 -0
  292. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/aliases.json +0 -0
  293. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/audit/arguments.json +0 -0
  294. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/audit/help.txt +0 -0
  295. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/audit/verify.js +0 -0
  296. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/add.js +0 -0
  297. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/arguments.json +0 -0
  298. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/build.js +0 -0
  299. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/copy.js +0 -0
  300. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/cp.js +0 -0
  301. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/help.js +0 -0
  302. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/help.txt +0 -0
  303. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/inc/boot-lines.js +0 -0
  304. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/inc/name-rewrite.js +0 -0
  305. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/inc/name.js +0 -0
  306. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/inc/start-status.js +0 -0
  307. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/list.js +0 -0
  308. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/man.js +0 -0
  309. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/mcp-start.js +0 -0
  310. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/mcp.js +0 -0
  311. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/oas.js +0 -0
  312. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/openapi.js +0 -0
  313. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/remove.js +0 -0
  314. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/rename.js +0 -0
  315. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/restart.js +0 -0
  316. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/rm.js +0 -0
  317. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/start.js +0 -0
  318. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/status.js +0 -0
  319. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/stop.js +0 -0
  320. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/bundle/types.js +0 -0
  321. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/cache/arguments.json +0 -0
  322. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/cache/clear.js +0 -0
  323. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/cache/help.txt +0 -0
  324. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/cache/stats.js +0 -0
  325. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/connector/add.js +0 -0
  326. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/connector/arguments.json +0 -0
  327. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/connector/help.js +0 -0
  328. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/connector/help.txt +0 -0
  329. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/connector/infer.js +0 -0
  330. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/connector/list.js +0 -0
  331. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/connector/migrate.js +0 -0
  332. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/connector/models.js +0 -0
  333. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/connector/remove.js +0 -0
  334. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/connector/rm.js +0 -0
  335. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/connector/test.js +0 -0
  336. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/container/arguments.json +0 -0
  337. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/container/help.js +0 -0
  338. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/container/help.txt +0 -0
  339. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/container/man.js +0 -0
  340. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/container/ps.js +0 -0
  341. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/container/stop.js +0 -0
  342. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/controller/add.js +0 -0
  343. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/controller/arguments.json +0 -0
  344. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/controller/help.txt +0 -0
  345. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/controller/inc/args.js +0 -0
  346. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/controller/inc/namespace.js +0 -0
  347. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/controller/inc/reference-rewrite.js +0 -0
  348. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/controller/inc/reference-scan.js +0 -0
  349. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/controller/inc/scaffold.js +0 -0
  350. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/controller/remove.js +0 -0
  351. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/controller/rename.js +0 -0
  352. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/controller/rm.js +0 -0
  353. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/env/add.js +0 -0
  354. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/env/get.js +0 -0
  355. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/env/help.js +0 -0
  356. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/env/help.txt +0 -0
  357. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/env/inc/name.js +0 -0
  358. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/env/link-dev.js +0 -0
  359. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/env/list.js +0 -0
  360. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/env/remove.js +0 -0
  361. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/env/rm.js +0 -0
  362. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/env/set.js +0 -0
  363. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/env/unset.js +0 -0
  364. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/env/use.js +0 -0
  365. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/add.js +0 -0
  366. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/arguments.json +0 -0
  367. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/build.js +0 -0
  368. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/dot.js +0 -0
  369. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/get.js +0 -0
  370. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/help.js +0 -0
  371. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/help.txt +0 -0
  372. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/inc/child-failure.js +0 -0
  373. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/inc/listen-error.js +0 -0
  374. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/inc/ps-titles.js +0 -0
  375. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/init.js +0 -0
  376. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/link-node-modules.js +0 -0
  377. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/link.js +0 -0
  378. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/list.js +0 -0
  379. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/man.js +0 -0
  380. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/msg.json +0 -0
  381. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/open.js +0 -0
  382. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/remove.js +0 -0
  383. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/reset.js +0 -0
  384. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/restart.js +0 -0
  385. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/set.js +0 -0
  386. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/start.js +0 -0
  387. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/status.js +0 -0
  388. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/stop.js +0 -0
  389. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/tail.js +0 -0
  390. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/update.js +0 -0
  391. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/framework/version.js +0 -0
  392. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/gina-dev.1.md +0 -0
  393. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/gina-framework.1.md +0 -0
  394. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/gina.1.md +0 -0
  395. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/helper.js +0 -0
  396. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/i18n/add.js +0 -0
  397. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/i18n/arguments.json +0 -0
  398. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/i18n/export.js +0 -0
  399. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/i18n/help.js +0 -0
  400. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/i18n/help.txt +0 -0
  401. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/i18n/import.js +0 -0
  402. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/i18n/scan.js +0 -0
  403. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/image/_host.js +0 -0
  404. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/image/arguments.json +0 -0
  405. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/image/build.js +0 -0
  406. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/image/help.js +0 -0
  407. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/image/help.txt +0 -0
  408. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/image/list.js +0 -0
  409. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/image/man.js +0 -0
  410. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/image/rm.js +0 -0
  411. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/image/run.js +0 -0
  412. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/index.js +0 -0
  413. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/inspector/help.js +0 -0
  414. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/inspector/help.txt +0 -0
  415. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/inspector/open.js +0 -0
  416. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/man-render.js +0 -0
  417. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/minion/arguments.json +0 -0
  418. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/minion/help.js +0 -0
  419. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/minion/help.txt +0 -0
  420. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/minion/kill.js +0 -0
  421. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/minion/list.js +0 -0
  422. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/msg.json +0 -0
  423. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/port/help.js +0 -0
  424. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/port/help.txt +0 -0
  425. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/port/inc/scan.js +0 -0
  426. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/port/list.js +0 -0
  427. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/port/reset.js +0 -0
  428. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/port/set.js +0 -0
  429. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/add.js +0 -0
  430. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/arguments.json +0 -0
  431. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/backup.js +0 -0
  432. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/build.js +0 -0
  433. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/help.js +0 -0
  434. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/help.txt +0 -0
  435. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/import.js +0 -0
  436. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/inc/name.js +0 -0
  437. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/list.js +0 -0
  438. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/man.js +0 -0
  439. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/move.js +0 -0
  440. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/remove.js +0 -0
  441. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/rename.js +0 -0
  442. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/restart.js +0 -0
  443. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/restore.js +0 -0
  444. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/rm.js +0 -0
  445. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/start.js +0 -0
  446. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/status.js +0 -0
  447. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/project/stop.js +0 -0
  448. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/protocol/arguments.json +0 -0
  449. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/protocol/help.js +0 -0
  450. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/protocol/help.txt +0 -0
  451. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/protocol/list.js +0 -0
  452. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/protocol/remove.js +0 -0
  453. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/protocol/set.js +0 -0
  454. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/scope/add.js +0 -0
  455. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/scope/help.js +0 -0
  456. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/scope/help.txt +0 -0
  457. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/scope/inc/name.js +0 -0
  458. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/scope/link-local.js +0 -0
  459. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/scope/link-production.js +0 -0
  460. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/scope/list.js +0 -0
  461. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/scope/remove.js +0 -0
  462. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/scope/rm.js +0 -0
  463. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/scope/use.js +0 -0
  464. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/secrets/arguments.json +0 -0
  465. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/secrets/check.js +0 -0
  466. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/secrets/help.js +0 -0
  467. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/secrets/help.txt +0 -0
  468. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/secrets/scan.js +0 -0
  469. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/service/help.js +0 -0
  470. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/service/help.txt +0 -0
  471. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/service/list.js +0 -0
  472. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/service/man.js +0 -0
  473. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/service/start.js +0 -0
  474. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/storage/arguments.json +0 -0
  475. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/storage/gc.js +0 -0
  476. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/storage/help.txt +0 -0
  477. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/storage/stats.js +0 -0
  478. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/storage/verify.js +0 -0
  479. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd/view/add.js +0 -0
  480. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd-status-format/package.json +0 -0
  481. /package/framework/{v0.7.10 → v0.7.11}/lib/cmd-status-format/src/main.js +0 -0
  482. /package/framework/{v0.7.10 → v0.7.11}/lib/collection/README.md +0 -0
  483. /package/framework/{v0.7.10 → v0.7.11}/lib/collection/build.json +0 -0
  484. /package/framework/{v0.7.10 → v0.7.11}/lib/collection/package.json +0 -0
  485. /package/framework/{v0.7.10 → v0.7.11}/lib/collection/src/main.js +0 -0
  486. /package/framework/{v0.7.10 → v0.7.11}/lib/conf-view/package.json +0 -0
  487. /package/framework/{v0.7.10 → v0.7.11}/lib/conf-view/src/main.js +0 -0
  488. /package/framework/{v0.7.10 → v0.7.11}/lib/config.js +0 -0
  489. /package/framework/{v0.7.10 → v0.7.11}/lib/connector-config/package.json +0 -0
  490. /package/framework/{v0.7.10 → v0.7.11}/lib/connector-config/src/main.js +0 -0
  491. /package/framework/{v0.7.10 → v0.7.11}/lib/connector-error/package.json +0 -0
  492. /package/framework/{v0.7.10 → v0.7.11}/lib/connector-error/src/main.js +0 -0
  493. /package/framework/{v0.7.10 → v0.7.11}/lib/connector-registry/package.json +0 -0
  494. /package/framework/{v0.7.10 → v0.7.11}/lib/connector-registry/src/main.js +0 -0
  495. /package/framework/{v0.7.10 → v0.7.11}/lib/cron/README.md +0 -0
  496. /package/framework/{v0.7.10 → v0.7.11}/lib/cron/package.json +0 -0
  497. /package/framework/{v0.7.10 → v0.7.11}/lib/cron/src/main.js +0 -0
  498. /package/framework/{v0.7.10 → v0.7.11}/lib/domain/LICENSE +0 -0
  499. /package/framework/{v0.7.10 → v0.7.11}/lib/domain/README.md +0 -0
  500. /package/framework/{v0.7.10 → v0.7.11}/lib/domain/package.json +0 -0
  501. /package/framework/{v0.7.10 → v0.7.11}/lib/domain/src/main.js +0 -0
  502. /package/framework/{v0.7.10 → v0.7.11}/lib/dto/package.json +0 -0
  503. /package/framework/{v0.7.10 → v0.7.11}/lib/dto/src/main.js +0 -0
  504. /package/framework/{v0.7.10 → v0.7.11}/lib/dto-pipe/package.json +0 -0
  505. /package/framework/{v0.7.10 → v0.7.11}/lib/dto-pipe/src/main.js +0 -0
  506. /package/framework/{v0.7.10 → v0.7.11}/lib/dto-types/package.json +0 -0
  507. /package/framework/{v0.7.10 → v0.7.11}/lib/dto-types/src/main.js +0 -0
  508. /package/framework/{v0.7.10 → v0.7.11}/lib/duration/package.json +0 -0
  509. /package/framework/{v0.7.10 → v0.7.11}/lib/duration/src/main.js +0 -0
  510. /package/framework/{v0.7.10 → v0.7.11}/lib/error-ref/package.json +0 -0
  511. /package/framework/{v0.7.10 → v0.7.11}/lib/error-ref/src/main.js +0 -0
  512. /package/framework/{v0.7.10 → v0.7.11}/lib/generator/index.js +0 -0
  513. /package/framework/{v0.7.10 → v0.7.11}/lib/i18n/package.json +0 -0
  514. /package/framework/{v0.7.10 → v0.7.11}/lib/idempotency/package.json +0 -0
  515. /package/framework/{v0.7.10 → v0.7.11}/lib/idempotency/src/main.js +0 -0
  516. /package/framework/{v0.7.10 → v0.7.11}/lib/image-build/package.json +0 -0
  517. /package/framework/{v0.7.10 → v0.7.11}/lib/image-build/src/main.js +0 -0
  518. /package/framework/{v0.7.10 → v0.7.11}/lib/inherits/LICENSE +0 -0
  519. /package/framework/{v0.7.10 → v0.7.11}/lib/inherits/README.md +0 -0
  520. /package/framework/{v0.7.10 → v0.7.11}/lib/inherits/package.json +0 -0
  521. /package/framework/{v0.7.10 → v0.7.11}/lib/inherits/src/main.js +0 -0
  522. /package/framework/{v0.7.10 → v0.7.11}/lib/inspector-events/package.json +0 -0
  523. /package/framework/{v0.7.10 → v0.7.11}/lib/inspector-events/src/main.js +0 -0
  524. /package/framework/{v0.7.10 → v0.7.11}/lib/inspector-redact/package.json +0 -0
  525. /package/framework/{v0.7.10 → v0.7.11}/lib/inspector-redact/src/main.js +0 -0
  526. /package/framework/{v0.7.10 → v0.7.11}/lib/instrument/package.json +0 -0
  527. /package/framework/{v0.7.10 → v0.7.11}/lib/instrument/src/main.js +0 -0
  528. /package/framework/{v0.7.10 → v0.7.11}/lib/job/package.json +0 -0
  529. /package/framework/{v0.7.10 → v0.7.11}/lib/job/src/main.js +0 -0
  530. /package/framework/{v0.7.10 → v0.7.11}/lib/job-store.js +0 -0
  531. /package/framework/{v0.7.10 → v0.7.11}/lib/json-config-header/package.json +0 -0
  532. /package/framework/{v0.7.10 → v0.7.11}/lib/json-config-header/src/main.js +0 -0
  533. /package/framework/{v0.7.10 → v0.7.11}/lib/kv/package.json +0 -0
  534. /package/framework/{v0.7.10 → v0.7.11}/lib/kv/src/main.js +0 -0
  535. /package/framework/{v0.7.10 → v0.7.11}/lib/kv-store.js +0 -0
  536. /package/framework/{v0.7.10 → v0.7.11}/lib/lane/package.json +0 -0
  537. /package/framework/{v0.7.10 → v0.7.11}/lib/lane/src/main.js +0 -0
  538. /package/framework/{v0.7.10 → v0.7.11}/lib/loading-state/package.json +0 -0
  539. /package/framework/{v0.7.10 → v0.7.11}/lib/loading-state/src/main.js +0 -0
  540. /package/framework/{v0.7.10 → v0.7.11}/lib/logger/README.md +0 -0
  541. /package/framework/{v0.7.10 → v0.7.11}/lib/logger/package.json +0 -0
  542. /package/framework/{v0.7.10 → v0.7.11}/lib/logger/src/containers/default/index.js +0 -0
  543. /package/framework/{v0.7.10 → v0.7.11}/lib/logger/src/containers/file/index.js +0 -0
  544. /package/framework/{v0.7.10 → v0.7.11}/lib/logger/src/containers/mq/index.js +0 -0
  545. /package/framework/{v0.7.10 → v0.7.11}/lib/logger/src/containers/mq/listener.js +0 -0
  546. /package/framework/{v0.7.10 → v0.7.11}/lib/logger/src/containers/mq/speaker.js +0 -0
  547. /package/framework/{v0.7.10 → v0.7.11}/lib/logger/src/helper.js +0 -0
  548. /package/framework/{v0.7.10 → v0.7.11}/lib/logger/src/redact.js +0 -0
  549. /package/framework/{v0.7.10 → v0.7.11}/lib/maintenance/package.json +0 -0
  550. /package/framework/{v0.7.10 → v0.7.11}/lib/maintenance/src/main.js +0 -0
  551. /package/framework/{v0.7.10 → v0.7.11}/lib/math/index.js +0 -0
  552. /package/framework/{v0.7.10 → v0.7.11}/lib/mcp-dispatch/package.json +0 -0
  553. /package/framework/{v0.7.10 → v0.7.11}/lib/mcp-dispatch/src/main.js +0 -0
  554. /package/framework/{v0.7.10 → v0.7.11}/lib/mcp-http/package.json +0 -0
  555. /package/framework/{v0.7.10 → v0.7.11}/lib/mcp-http/src/main.js +0 -0
  556. /package/framework/{v0.7.10 → v0.7.11}/lib/mcp-server/package.json +0 -0
  557. /package/framework/{v0.7.10 → v0.7.11}/lib/mcp-server/src/main.js +0 -0
  558. /package/framework/{v0.7.10 → v0.7.11}/lib/merge/README.md +0 -0
  559. /package/framework/{v0.7.10 → v0.7.11}/lib/merge/package.json +0 -0
  560. /package/framework/{v0.7.10 → v0.7.11}/lib/merge/src/main.js +0 -0
  561. /package/framework/{v0.7.10 → v0.7.11}/lib/message-validator/package.json +0 -0
  562. /package/framework/{v0.7.10 → v0.7.11}/lib/message-validator/src/main.js +0 -0
  563. /package/framework/{v0.7.10 → v0.7.11}/lib/metrics/package.json +0 -0
  564. /package/framework/{v0.7.10 → v0.7.11}/lib/model.js +0 -0
  565. /package/framework/{v0.7.10 → v0.7.11}/lib/money/package.json +0 -0
  566. /package/framework/{v0.7.10 → v0.7.11}/lib/money/src/main.js +0 -0
  567. /package/framework/{v0.7.10 → v0.7.11}/lib/multipart/package.json +0 -0
  568. /package/framework/{v0.7.10 → v0.7.11}/lib/multipart/src/main.js +0 -0
  569. /package/framework/{v0.7.10 → v0.7.11}/lib/net-locality/package.json +0 -0
  570. /package/framework/{v0.7.10 → v0.7.11}/lib/net-locality/src/main.js +0 -0
  571. /package/framework/{v0.7.10 → v0.7.11}/lib/nunjucks-filters/README.md +0 -0
  572. /package/framework/{v0.7.10 → v0.7.11}/lib/nunjucks-filters/package.json +0 -0
  573. /package/framework/{v0.7.10 → v0.7.11}/lib/nunjucks-filters/src/main.js +0 -0
  574. /package/framework/{v0.7.10 → v0.7.11}/lib/nunjucks-resolver/package.json +0 -0
  575. /package/framework/{v0.7.10 → v0.7.11}/lib/nunjucks-resolver/src/main.js +0 -0
  576. /package/framework/{v0.7.10 → v0.7.11}/lib/priority/package.json +0 -0
  577. /package/framework/{v0.7.10 → v0.7.11}/lib/priority/src/main.js +0 -0
  578. /package/framework/{v0.7.10 → v0.7.11}/lib/proc.js +0 -0
  579. /package/framework/{v0.7.10 → v0.7.11}/lib/push/package.json +0 -0
  580. /package/framework/{v0.7.10 → v0.7.11}/lib/push/src/main.js +0 -0
  581. /package/framework/{v0.7.10 → v0.7.11}/lib/rate-limit/package.json +0 -0
  582. /package/framework/{v0.7.10 → v0.7.11}/lib/rate-limit/src/main.js +0 -0
  583. /package/framework/{v0.7.10 → v0.7.11}/lib/release-watch/package.json +0 -0
  584. /package/framework/{v0.7.10 → v0.7.11}/lib/release-watch/src/main.js +0 -0
  585. /package/framework/{v0.7.10 → v0.7.11}/lib/render-cache/package.json +0 -0
  586. /package/framework/{v0.7.10 → v0.7.11}/lib/render-cache/src/main.js +0 -0
  587. /package/framework/{v0.7.10 → v0.7.11}/lib/render-cache-store.js +0 -0
  588. /package/framework/{v0.7.10 → v0.7.11}/lib/routing/README.md +0 -0
  589. /package/framework/{v0.7.10 → v0.7.11}/lib/routing/build.json +0 -0
  590. /package/framework/{v0.7.10 → v0.7.11}/lib/routing/package.json +0 -0
  591. /package/framework/{v0.7.10 → v0.7.11}/lib/routing-introspect/package.json +0 -0
  592. /package/framework/{v0.7.10 → v0.7.11}/lib/routing-introspect/src/main.js +0 -0
  593. /package/framework/{v0.7.10 → v0.7.11}/lib/secrets/package.json +0 -0
  594. /package/framework/{v0.7.10 → v0.7.11}/lib/secrets/src/backends/env.js +0 -0
  595. /package/framework/{v0.7.10 → v0.7.11}/lib/secrets/src/backends/exec.js +0 -0
  596. /package/framework/{v0.7.10 → v0.7.11}/lib/secrets/src/backends/file.js +0 -0
  597. /package/framework/{v0.7.10 → v0.7.11}/lib/secrets/src/declaration.js +0 -0
  598. /package/framework/{v0.7.10 → v0.7.11}/lib/secrets/src/env-file.js +0 -0
  599. /package/framework/{v0.7.10 → v0.7.11}/lib/secrets/src/main.js +0 -0
  600. /package/framework/{v0.7.10 → v0.7.11}/lib/secrets/src/sources.js +0 -0
  601. /package/framework/{v0.7.10 → v0.7.11}/lib/security-headers-emitter/package.json +0 -0
  602. /package/framework/{v0.7.10 → v0.7.11}/lib/security-headers-emitter/src/main.js +0 -0
  603. /package/framework/{v0.7.10 → v0.7.11}/lib/session-lifetime/package.json +0 -0
  604. /package/framework/{v0.7.10 → v0.7.11}/lib/session-lifetime/src/main.js +0 -0
  605. /package/framework/{v0.7.10 → v0.7.11}/lib/session-store.js +0 -0
  606. /package/framework/{v0.7.10 → v0.7.11}/lib/shell.js +0 -0
  607. /package/framework/{v0.7.10 → v0.7.11}/lib/sqlite-driver.js +0 -0
  608. /package/framework/{v0.7.10 → v0.7.11}/lib/sri/package.json +0 -0
  609. /package/framework/{v0.7.10 → v0.7.11}/lib/sri/src/main.js +0 -0
  610. /package/framework/{v0.7.10 → v0.7.11}/lib/state.js +0 -0
  611. /package/framework/{v0.7.10 → v0.7.11}/lib/storage/package.json +0 -0
  612. /package/framework/{v0.7.10 → v0.7.11}/lib/storage/src/local-cas.js +0 -0
  613. /package/framework/{v0.7.10 → v0.7.11}/lib/storage/src/local-stream.js +0 -0
  614. /package/framework/{v0.7.10 → v0.7.11}/lib/storage/src/local.js +0 -0
  615. /package/framework/{v0.7.10 → v0.7.11}/lib/storage/src/main.js +0 -0
  616. /package/framework/{v0.7.10 → v0.7.11}/lib/storage/src/meta-store.js +0 -0
  617. /package/framework/{v0.7.10 → v0.7.11}/lib/storage/src/util.js +0 -0
  618. /package/framework/{v0.7.10 → v0.7.11}/lib/storage-store.js +0 -0
  619. /package/framework/{v0.7.10 → v0.7.11}/lib/swig-filters/README.md +0 -0
  620. /package/framework/{v0.7.10 → v0.7.11}/lib/swig-filters/package.json +0 -0
  621. /package/framework/{v0.7.10 → v0.7.11}/lib/swig-filters/src/main.js +0 -0
  622. /package/framework/{v0.7.10 → v0.7.11}/lib/swig-resolver/package.json +0 -0
  623. /package/framework/{v0.7.10 → v0.7.11}/lib/swig-resolver/src/main.js +0 -0
  624. /package/framework/{v0.7.10 → v0.7.11}/lib/template-loaders/package.json +0 -0
  625. /package/framework/{v0.7.10 → v0.7.11}/lib/template-loaders/src/loaders/http.js +0 -0
  626. /package/framework/{v0.7.10 → v0.7.11}/lib/template-loaders/src/loaders/memory.js +0 -0
  627. /package/framework/{v0.7.10 → v0.7.11}/lib/template-loaders/src/main.js +0 -0
  628. /package/framework/{v0.7.10 → v0.7.11}/lib/url/README.md +0 -0
  629. /package/framework/{v0.7.10 → v0.7.11}/lib/url/index.js +0 -0
  630. /package/framework/{v0.7.10 → v0.7.11}/lib/url/routing.json +0 -0
  631. /package/framework/{v0.7.10 → v0.7.11}/lib/uuid/package.json +0 -0
  632. /package/framework/{v0.7.10 → v0.7.11}/lib/uuid/src/main.js +0 -0
  633. /package/framework/{v0.7.10 → v0.7.11}/lib/validator.js +0 -0
  634. /package/framework/{v0.7.10 → v0.7.11}/lib/watcher/package.json +0 -0
  635. /package/framework/{v0.7.10 → v0.7.11}/lib/watcher/src/main.js +0 -0
  636. /package/framework/{v0.7.10 → v0.7.11}/lib/ws-framing/package.json +0 -0
  637. /package/framework/{v0.7.10 → v0.7.11}/lib/ws-framing/src/main.js +0 -0
  638. /package/framework/{v0.7.10 → v0.7.11}/lib/ws-query/package.json +0 -0
  639. /package/framework/{v0.7.10 → v0.7.11}/lib/ws-query/src/main.js +0 -0
  640. /package/framework/{v0.7.10 → v0.7.11}/lib/ws-session/package.json +0 -0
  641. /package/framework/{v0.7.10 → v0.7.11}/lib/ws-session/src/main.js +0 -0
@@ -0,0 +1,788 @@
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
+ 'use strict';
9
+
10
+ /**
11
+ * Stall watchdog — the watching thread (started by `main.js`'s `init()`).
12
+ *
13
+ * Reads the heartbeat the main thread bumps every 250 ms; when it has not moved for
14
+ * `threshold`, writes ONE `crit` line itself, while the main thread is still
15
+ * blocked: to fd 1 with `fs.writeSync` (a write this thread makes on its own — a
16
+ * `process.stdout` write would wait for the main thread's loop) and, when `mq` is a
17
+ * log flow, through its own connection to the MQ listener (the frame `gina tail`
18
+ * renders). When the heartbeat moves again it posts `{ t: 'resumed', ms }` to the
19
+ * main thread, which writes the warn line through the logger and counts the stall.
20
+ *
21
+ * With `captureFrames` (Node only), the line first names the blocked thread's call
22
+ * frames: this thread connects to the main thread's inspector
23
+ * (`connectToMainThread()`, no `--inspect` flag), pauses it for about a millisecond,
24
+ * reads its frames, resumes it and disconnects — every step against a deadline,
25
+ * since a main thread inside a native call answers nothing until the call returns.
26
+ * A session that goes away resumes a pause it made, so a failed step disconnects.
27
+ * When another session already holds the main thread paused (a debugger), the
28
+ * watchdog neither pauses nor resumes it. Frames read when the main thread had
29
+ * started running again are withheld: they would be the idle loop's.
30
+ *
31
+ * Plain Node modules only, plus its own `detector.js` (the reading rules) and
32
+ * `frames.js` (the frames' wording), both pure, and two modules of the logger that
33
+ * need no framework globals: `redact.js` (the line is masked with a copy of the
34
+ * logger's rules) and `helper.js` (the text line is rendered by the logger's own
35
+ * `format()`). fd 2 is never written: the framework daemon re-logs a bundle's
36
+ * stderr under its own name. Every path is caught; a fault would reach the main
37
+ * thread as an `'error'` event, which turns the watchdog off.
38
+ *
39
+ * @module gina/lib/stall-watchdog/worker
40
+ */
41
+
42
+ var wt = require('worker_threads');
43
+ var fs = require('fs');
44
+ var net = require('net');
45
+
46
+ /**
47
+ * The most in-flight requests the ring holds; a newer entry drops the oldest.
48
+ * @inner
49
+ * @constant
50
+ * @type {number}
51
+ */
52
+ var RING_MAX = 256;
53
+
54
+ /**
55
+ * The longest path written, in characters; a longer one is cut and ends with `…`.
56
+ * Keeps the line short enough to reach a pipe in one write.
57
+ * @inner
58
+ * @constant
59
+ * @type {number}
60
+ */
61
+ var PATH_MAX = 256;
62
+
63
+ /**
64
+ * The longest method written, in characters.
65
+ * @inner
66
+ * @constant
67
+ * @type {number}
68
+ */
69
+ var METHOD_MAX = 32;
70
+
71
+ /**
72
+ * How long a full stdout pipe is waited for, in ms, before the line is given up on
73
+ * that sink (a non-blocking pipe throws `EAGAIN` while it is full).
74
+ * @inner
75
+ * @constant
76
+ * @type {number}
77
+ */
78
+ var FD1_WAIT_MS = 50;
79
+
80
+ /**
81
+ * The MQ connect deadline, in ms (the speaker's).
82
+ * @inner
83
+ * @constant
84
+ * @type {number}
85
+ */
86
+ var MQ_CONNECT_MS = 2000;
87
+
88
+ /**
89
+ * The longest function name written, in characters.
90
+ * @inner
91
+ * @constant
92
+ * @type {number}
93
+ */
94
+ var FN_MAX = 128;
95
+
96
+ /**
97
+ * The deadline of each inspector step of a capture, in ms (enable, the pause's
98
+ * arrival, resume, disable). Measured: an enable over 1,101 loaded scripts took
99
+ * 20–39 ms, a pause about 1 ms; a main thread inside a native call answers none.
100
+ * @inner
101
+ * @constant
102
+ * @type {number}
103
+ */
104
+ var STEP_MS = 1000;
105
+
106
+ /**
107
+ * The deadline of a whole capture, in ms.
108
+ * @inner
109
+ * @constant
110
+ * @type {number}
111
+ */
112
+ var CAPTURE_MS = 3000;
113
+
114
+ /**
115
+ * How long a capture waits, once over, for a main thread that ran again to bump
116
+ * the heartbeat, in ms; a heartbeat still silent after it means the frames are the
117
+ * stall's.
118
+ * @inner
119
+ * @constant
120
+ * @type {number}
121
+ */
122
+ var SETTLE_MS = 20;
123
+
124
+ var data = wt.workerData || {};
125
+ var parent = wt.parentPort;
126
+ var log = data.log || {};
127
+ var mq = data.mq || null;
128
+
129
+ var hb = new Int32Array(data.hb);
130
+ var intervalMs = data.intervalMs || 250;
131
+ var thresholdMs = data.thresholdMs || 5000;
132
+ var inFlightMax = data.inFlight || 8;
133
+ var framesMax = data.frames || 8;
134
+ var roots = Array.isArray(data.roots) ? data.roots : [];
135
+
136
+ /**
137
+ * How a stall's frames are read: `node` (through the inspector), `bun` (not read:
138
+ * Bun's inspector needs `inspector.open()`, a debugging port), or `null` when
139
+ * `captureFrames` is off (the line names no frames at all).
140
+ * @inner
141
+ * @type {?string}
142
+ */
143
+ var frameMode = ( data.captureFrames === true ) ? ( ( data.runtime === 'bun' ) ? 'bun' : 'node' ) : null;
144
+
145
+ var framesLib = require('./frames.js');
146
+
147
+ /** @inner @type {Int32Array} A cell nobody signals: `Atomics.wait` on it is a sleep. */
148
+ var sleeper = new Int32Array(new SharedArrayBuffer(4));
149
+
150
+ /** @inner @type {Map<number, Object>} The in-flight ring: key → `{k, id, m, p, at}`, oldest first. */
151
+ var ring = new Map();
152
+
153
+ /** @inner @type {?Object} The compiled redaction state (`null`: nothing to mask). */
154
+ var redactState = data.redaction || null;
155
+
156
+ var redact = null;
157
+ try {
158
+ redact = require('../../logger/src/redact.js');
159
+ } catch (err) {
160
+ redact = null;
161
+ }
162
+
163
+ var format = null;
164
+ try {
165
+ var colors = {};
166
+ if ( log.colorCode && log.color ) {
167
+ colors[log.colorCode] = log.color;
168
+ }
169
+ var registry = {};
170
+ registry[log.group] = { colors: colors };
171
+ format = require('../../logger/src/helper.js')({
172
+ _maxLevelLen : log.maxLevelLen,
173
+ template : log.template,
174
+ levels : { crit: { color: log.colorCode } }
175
+ }, registry).format;
176
+ } catch (err) {
177
+ format = null;
178
+ }
179
+
180
+ /** @inner @type {Object<string, boolean>} The trouble already reported, once each. */
181
+ var complained = {};
182
+
183
+ /**
184
+ * Tell the main thread about this thread's own trouble, once per kind; it is logged
185
+ * when the main thread runs again.
186
+ *
187
+ * @inner
188
+ * @param {string} kind
189
+ * @param {string} text
190
+ * @returns {void}
191
+ */
192
+ function complain(kind, text) {
193
+ if ( complained[kind] ) {
194
+ return;
195
+ }
196
+ complained[kind] = true;
197
+ try {
198
+ parent.postMessage({ t: 'warn', text: text });
199
+ } catch (err) {
200
+ // the main thread is gone
201
+ }
202
+ }
203
+
204
+ /**
205
+ * Mask a string with the logger's redaction rules. Rules that cannot be applied
206
+ * withhold the string: an unmasked value could be a secret.
207
+ *
208
+ * @inner
209
+ * @param {string} s
210
+ * @returns {string}
211
+ */
212
+ function mask(s) {
213
+ if ( !redactState ) {
214
+ return s;
215
+ }
216
+ if ( !redact ) {
217
+ complain('redact', 'the log redaction module could not be loaded: the stall line\'s content is withheld');
218
+ return '[withheld]';
219
+ }
220
+ try {
221
+ return redact.apply(redactState, s);
222
+ } catch (err) {
223
+ complain('redact', 'the log redaction rules could not be applied to the stall line (' + ( err.message || err ) + '): its content is withheld');
224
+ return '[withheld]';
225
+ }
226
+ }
227
+
228
+ /**
229
+ * A client-sent value as the line writes it: the backtick becomes `%60` (the
230
+ * framework's `gina tail` reads a backtick-quoted `bundle@project` in a line as the
231
+ * bundle to act on), and a long value is cut.
232
+ *
233
+ * @inner
234
+ * @param {*} value
235
+ * @param {number} max
236
+ * @returns {string}
237
+ */
238
+ function neutral(value, max) {
239
+ var s = String(( value === null || typeof(value) == 'undefined' ) ? '-' : value).replace(/`/g, '%60');
240
+ return ( s.length > max ) ? s.slice(0, max) + '…' : s;
241
+ }
242
+
243
+ /**
244
+ * A duration in seconds with one decimal (`5.3s`).
245
+ *
246
+ * @inner
247
+ * @param {number} ms
248
+ * @returns {string}
249
+ */
250
+ function seconds(ms) {
251
+ return (ms / 1000).toFixed(1) + 's';
252
+ }
253
+
254
+ /**
255
+ * Write a whole line to fd 1, waiting up to {@link FD1_WAIT_MS} for a full pipe.
256
+ *
257
+ * @inner
258
+ * @param {string} str
259
+ * @returns {boolean} `false` when the line could not be written whole
260
+ */
261
+ function writeFd1(str) {
262
+ var buf = Buffer.from(str, 'utf8');
263
+ var off = 0;
264
+ var waited = 0;
265
+ while ( off < buf.length ) {
266
+ try {
267
+ off += fs.writeSync(1, buf, off, buf.length - off);
268
+ } catch (err) {
269
+ if ( err && err.code === 'EAGAIN' && waited < FD1_WAIT_MS ) {
270
+ Atomics.wait(sleeper, 0, 0, 5);
271
+ waited += 5;
272
+ continue;
273
+ }
274
+ return false;
275
+ }
276
+ }
277
+ return true;
278
+ }
279
+
280
+ /** @inner @type {?Object} The MQ socket (connecting or connected). */
281
+ var mqSock = null;
282
+ /** @inner @type {number} Consecutive failed dials, for the backoff. */
283
+ var mqAttempts = 0;
284
+ /** @inner @type {?Object} The redial timer. */
285
+ var mqTimer = null;
286
+
287
+ /**
288
+ * Arm the next MQ dial: 500 ms, then doubling, capped at 30 s (the speaker's).
289
+ *
290
+ * @inner
291
+ * @returns {void}
292
+ */
293
+ function scheduleMq() {
294
+ if ( mqTimer || !mq ) {
295
+ return;
296
+ }
297
+ var delay = Math.min(500 * Math.pow(2, mqAttempts), 30000);
298
+ mqAttempts++;
299
+ mqTimer = setTimeout(function() {
300
+ mqTimer = null;
301
+ dialMq();
302
+ }, delay);
303
+ if ( typeof(mqTimer.unref) == 'function' ) {
304
+ mqTimer.unref();
305
+ }
306
+ }
307
+
308
+ /**
309
+ * Open this thread's own connection to the MQ listener, and keep it: a closed one
310
+ * is dialled again. The first frame names the connection a report (the speaker's
311
+ * handshake); what the listener writes back is read and dropped.
312
+ *
313
+ * @inner
314
+ * @returns {void}
315
+ */
316
+ function dialMq() {
317
+ if ( !mq ) {
318
+ return;
319
+ }
320
+ var sock;
321
+ try {
322
+ sock = net.createConnection({ host: mq.host, port: mq.port });
323
+ } catch (err) {
324
+ scheduleMq();
325
+ return;
326
+ }
327
+ mqSock = sock;
328
+ var deadline = setTimeout(function() {
329
+ setImmediate(function() {
330
+ if ( sock.connecting ) {
331
+ sock.destroy();
332
+ }
333
+ });
334
+ }, MQ_CONNECT_MS);
335
+ if ( typeof(deadline.unref) == 'function' ) {
336
+ deadline.unref();
337
+ }
338
+ sock.once('connect', function() {
339
+ clearTimeout(deadline);
340
+ mqAttempts = 0;
341
+ try {
342
+ sock.write(JSON.stringify({ host: mq.host, port: mq.port, request: 'report' }) + '\r\n');
343
+ } catch (err) {
344
+ // the close below redials
345
+ }
346
+ });
347
+ sock.on('data', function() { /* the session id and the echoes: dropped */ });
348
+ sock.on('error', function() { clearTimeout(deadline); });
349
+ sock.on('close', function() {
350
+ clearTimeout(deadline);
351
+ if ( mqSock === sock ) {
352
+ mqSock = null;
353
+ }
354
+ scheduleMq();
355
+ });
356
+ sock.unref();
357
+ }
358
+
359
+ /**
360
+ * Send one frame to the MQ listener; a socket still connecting queues it.
361
+ *
362
+ * @inner
363
+ * @param {string} frame
364
+ * @returns {boolean}
365
+ */
366
+ function sendMq(frame) {
367
+ if ( !mqSock || mqSock.destroyed ) {
368
+ return false;
369
+ }
370
+ try {
371
+ mqSock.write(frame);
372
+ return true;
373
+ } catch (err) {
374
+ return false;
375
+ }
376
+ }
377
+
378
+ /**
379
+ * Write the stall line: the silence, the blocked thread's call frames (with
380
+ * `captureFrames`), then the requests in flight, oldest first.
381
+ *
382
+ * Text: `[ STALL ] main thread blocked: no heartbeat for 5.3s — frames: mergeBody (lib/merge/src/main.js:412:9) <- … — in flight 2: PUT /orders/42 [ req <id> ] 5.4s, …`,
383
+ * rendered with the logger's `format()` at `crit`; a capture that read no frames
384
+ * writes `— frames: none (<reason>)` ({@link module:gina/lib/stall-watchdog/frames.REASONS}),
385
+ * and with `captureFrames` off the line names no frames. JSON: the default
386
+ * container's shape `{ts, level, bundle, message, group, msg}` plus `stall` —
387
+ * `{ms, runtime, captured, frames: [{fn, file, line, col}], inFlight: [{id, method, path, ms}]}`
388
+ * (`captured` is `false` and `frames` empty when no frames were read). The MQ frame
389
+ * carries the text in the logger's envelope.
390
+ *
391
+ * The silence and the requests' ages are read now, when the line is written: a
392
+ * capture takes some milliseconds (up to its deadline when the main thread is in a
393
+ * native call). Should the main thread have run again meanwhile, the silence stays
394
+ * the one measured when the stall was found.
395
+ *
396
+ * @inner
397
+ * @param {{ms: number, at: number, hb: number}} item - The stall as found: its silence, when, and the heartbeat's value then
398
+ * @param {?{captured: boolean, frames?: Array<Object>, more?: boolean, reason?: string}} cap - What the capture read; `null` with `captureFrames` off
399
+ * @returns {void}
400
+ */
401
+ function report(item, cap) {
402
+ var now = Date.now();
403
+ var silenceMs = ( Atomics.load(hb, 0) === item.hb ) ? Math.max(item.ms, now - ( item.at - item.ms )) : item.ms;
404
+
405
+ var entries = Array.from(ring.values());
406
+ entries.sort(function(a, b) { return a.at - b.at; });
407
+ var total = entries.length;
408
+ var shown = entries.slice(0, inFlightMax).map(function(e) {
409
+ return {
410
+ id : ( typeof(e.id) == 'string' ) ? e.id : null,
411
+ method : neutral(e.m, METHOD_MAX),
412
+ path : neutral(e.p, PATH_MAX),
413
+ ms : Math.max(0, now - e.at)
414
+ };
415
+ });
416
+
417
+ var captured = false;
418
+ var stallFrames = [];
419
+ var framesText = '';
420
+ if ( cap ) {
421
+ if ( cap.captured ) {
422
+ captured = true;
423
+ stallFrames = ( cap.frames || [] ).map(function(f) {
424
+ return { fn: neutral(f.fn, FN_MAX), file: neutral(f.file, PATH_MAX), line: f.line, col: f.col };
425
+ });
426
+ framesText = ' — frames: ' + framesLib.describeFrames(stallFrames, cap.more);
427
+ } else {
428
+ framesText = ' — frames: none (' + cap.reason + ')';
429
+ }
430
+ }
431
+
432
+ var text = '[ STALL ] main thread blocked: no heartbeat for ' + seconds(silenceMs)
433
+ + framesText
434
+ + ' — in flight ' + total
435
+ + ( ( total > shown.length ) ? ' (oldest ' + shown.length + ')' : '' )
436
+ + ( ( shown.length > 0 ) ? ': ' + shown.map(function(e) {
437
+ return e.method + ' ' + e.path + ' [ req ' + ( e.id || '-' ) + ' ] ' + seconds(e.ms);
438
+ }).join(', ') : '' );
439
+ var content = mask(text);
440
+
441
+ var line;
442
+ if ( log.format === 'json' ) {
443
+ line = JSON.stringify({
444
+ ts : new Date(now).toISOString(),
445
+ level : 'crit',
446
+ bundle : log.group,
447
+ message : content,
448
+ group : log.group,
449
+ msg : content,
450
+ stall : {
451
+ ms : silenceMs,
452
+ runtime : data.runtime,
453
+ captured : captured,
454
+ frames : stallFrames.map(function(f) {
455
+ return { fn: mask(f.fn), file: mask(f.file), line: f.line, col: f.col };
456
+ }),
457
+ inFlight : shown.map(function(e) {
458
+ return { id: e.id, method: e.method, path: mask(e.path), ms: e.ms };
459
+ })
460
+ }
461
+ }) + '\n';
462
+ } else {
463
+ try {
464
+ line = format(log.group, 'crit', content);
465
+ } catch (err) {
466
+ line = '[' + new Date(now).toISOString() + '] [crit][' + log.group + '] ' + content + '\n';
467
+ }
468
+ }
469
+
470
+ if ( !writeFd1(line) ) {
471
+ complain('fd1', 'the stall line could not be written to stdout (the pipe stayed full for ' + FD1_WAIT_MS + ' ms)');
472
+ }
473
+ if ( mq ) {
474
+ sendMq(JSON.stringify({ group: log.group, level: 'crit', content: content, skipFormating: false }) + '\r\n');
475
+ }
476
+ }
477
+
478
+ /** @inner @type {?(Object|boolean)} The `inspector` module, loaded at the first capture; `false` when it could not be. */
479
+ var inspectorLib = null;
480
+
481
+ /**
482
+ * Read the main thread's call frames through its inspector: connect, enable the
483
+ * debugger (its `scriptParsed` replay names each script's url), pause, read the
484
+ * frames, resume, disable, disconnect. Each step has {@link STEP_MS}, the whole
485
+ * capture {@link CAPTURE_MS}. A step that fails or runs out of time ends the
486
+ * capture with a disconnect, which resumes a pause this session made (measured);
487
+ * a late answer to a step already given up on is ignored, since a `post()` after
488
+ * the disconnect throws. Frames read before a later step failed are kept: they
489
+ * were read while the thread was paused. `done` is called once.
490
+ *
491
+ * When another session already holds the main thread paused (a debugger at a
492
+ * breakpoint: `Debugger.paused` arrives before `Debugger.enable` answers), the
493
+ * capture neither pauses nor resumes it, and disconnects, which leaves that pause
494
+ * in place (measured).
495
+ *
496
+ * ⚠️ Nothing may throw out of an inspector callback: measured on Node 25.3.0, an
497
+ * error thrown inside the `Debugger.paused` handler, while the pause is held, kills
498
+ * this thread and leaves the main thread paused for good (the same error thrown from
499
+ * a timer resumes it). So every callback body runs under {@link guard}, and `done`
500
+ * is called on a clean stack (`setImmediate`), outside any inspector callback.
501
+ *
502
+ * @inner
503
+ * @param {function({captured: boolean, frames?: Array<Object>, more?: boolean, reason?: string}): void} done
504
+ * @returns {void}
505
+ */
506
+ function capture(done) {
507
+ var finished = false;
508
+ var session = null;
509
+ var urls = new Map();
510
+ var asked = false;
511
+ var held = false;
512
+ var got = null;
513
+ var stepTimer = null;
514
+ var wholeTimer = null;
515
+
516
+ // Ends the capture, once: disconnects (which resumes a pause this session holds),
517
+ // then hands over the frames read so far, or `reason`, on a clean stack.
518
+ var finish = function(reason) {
519
+ if ( finished ) {
520
+ return;
521
+ }
522
+ finished = true;
523
+ clearTimeout(stepTimer);
524
+ clearTimeout(wholeTimer);
525
+ if ( session ) {
526
+ try {
527
+ session.disconnect();
528
+ } catch (err) {
529
+ // already gone
530
+ }
531
+ }
532
+ session = null;
533
+ urls = null;
534
+ var result = ( got ) ? { captured: true, frames: got.frames, more: got.more } : { captured: false, reason: reason };
535
+ setImmediate(function() { done(result); });
536
+ };
537
+
538
+ // A callback body that can never throw out: an error ends the capture.
539
+ var guard = function(fn) {
540
+ return function() {
541
+ try {
542
+ fn.apply(null, arguments);
543
+ } catch (err) {
544
+ try {
545
+ finish(framesLib.errorReason(err));
546
+ } catch (e) {
547
+ // finish() catches its own steps: nothing left to do
548
+ }
549
+ }
550
+ };
551
+ };
552
+
553
+ // The deadline of the step about to start.
554
+ var arm = function() {
555
+ clearTimeout(stepTimer);
556
+ stepTimer = setTimeout(function() { finish(framesLib.REASONS.outsideJs); }, STEP_MS);
557
+ };
558
+
559
+ // One inspector command; its answer, unless the capture is over, goes to `onReply`.
560
+ var send = function(method, onReply) {
561
+ if ( finished ) {
562
+ return;
563
+ }
564
+ try {
565
+ session.post(method, {}, guard(function(err) {
566
+ if ( finished ) {
567
+ return;
568
+ }
569
+ if ( err ) {
570
+ finish(framesLib.errorReason(err));
571
+ return;
572
+ }
573
+ if ( onReply ) {
574
+ onReply();
575
+ }
576
+ }));
577
+ } catch (err) {
578
+ finish(framesLib.errorReason(err));
579
+ }
580
+ };
581
+
582
+ wholeTimer = setTimeout(function() { finish(framesLib.REASONS.outsideJs); }, CAPTURE_MS);
583
+
584
+ if ( inspectorLib === null ) {
585
+ try {
586
+ inspectorLib = require('inspector');
587
+ } catch (err) {
588
+ inspectorLib = false;
589
+ }
590
+ }
591
+ if (
592
+ !inspectorLib || typeof(inspectorLib.Session) != 'function'
593
+ || typeof(inspectorLib.Session.prototype.connectToMainThread) != 'function'
594
+ ) {
595
+ finish(framesLib.REASONS.unavailable);
596
+ return;
597
+ }
598
+
599
+ try {
600
+ session = new inspectorLib.Session();
601
+ session.on('Debugger.scriptParsed', guard(function(m) {
602
+ if ( !finished && m && m.params ) {
603
+ urls.set(m.params.scriptId, m.params.url);
604
+ }
605
+ }));
606
+ session.on('Debugger.paused', guard(function(m) {
607
+ if ( finished || got ) {
608
+ return;
609
+ }
610
+ if ( !asked ) {
611
+ // paused before this session asked: another session holds the thread
612
+ held = true;
613
+ return;
614
+ }
615
+ clearTimeout(stepTimer);
616
+ got = framesLib.toFrames(m && m.params && m.params.callFrames, urls, roots, framesMax);
617
+ arm();
618
+ send('Debugger.resume', function() {
619
+ arm();
620
+ send('Debugger.disable', function() {
621
+ finish(null);
622
+ });
623
+ });
624
+ }));
625
+ session.connectToMainThread();
626
+ } catch (err) {
627
+ finish(framesLib.errorReason(err));
628
+ return;
629
+ }
630
+
631
+ arm();
632
+ send('Debugger.enable', function() {
633
+ if ( held ) {
634
+ finish(framesLib.REASONS.debugger);
635
+ return;
636
+ }
637
+ asked = true;
638
+ // the deadline for the pause to land: it comes as the `Debugger.paused` event
639
+ arm();
640
+ send('Debugger.pause', null);
641
+ });
642
+ }
643
+
644
+ /**
645
+ * Whether the heartbeat is still at `value` after {@link SETTLE_MS}: a capture's
646
+ * frames are the stall's only then. Measured: when the block ends as a capture
647
+ * starts, the pause lands on the next JavaScript to run, the heartbeat's own timer,
648
+ * sometimes before the counter moves.
649
+ *
650
+ * @inner
651
+ * @param {number} value - The heartbeat's value when the stall was found
652
+ * @returns {boolean}
653
+ */
654
+ function stillSilent(value) {
655
+ if ( Atomics.load(hb, 0) !== value ) {
656
+ return false;
657
+ }
658
+ Atomics.wait(sleeper, 0, 0, SETTLE_MS);
659
+ return Atomics.load(hb, 0) === value;
660
+ }
661
+
662
+ /** @inner @type {boolean} `true` while a capture runs; what the readings find meanwhile waits in {@link pending}. */
663
+ var capturing = false;
664
+
665
+ /**
666
+ * The readings' results found during a capture, in order. A `resumed` posted at
667
+ * once would put the warn line before the crit line it ends (measured: 14 ms early).
668
+ * @inner
669
+ * @type {Array<{t: string, ms: number, at: number, hb: number}>}
670
+ */
671
+ var pending = [];
672
+
673
+ /**
674
+ * Report a stall: at once when `captureFrames` is off (no frames) or on Bun
675
+ * (`frames: none (bun)`), otherwise after a capture of the frames.
676
+ *
677
+ * @inner
678
+ * @param {{t: string, ms: number, at: number, hb: number}} item - The stall as found
679
+ * @returns {void}
680
+ */
681
+ function startReport(item) {
682
+ if ( frameMode !== 'node' ) {
683
+ report(item, ( frameMode === 'bun' ) ? { captured: false, reason: framesLib.REASONS.bun } : null);
684
+ return;
685
+ }
686
+ capturing = true;
687
+ capture(function(cap) {
688
+ try {
689
+ if ( cap.captured && !stillSilent(item.hb) ) {
690
+ cap = { captured: false, reason: framesLib.REASONS.ended };
691
+ }
692
+ report(item, cap);
693
+ } catch (err) {
694
+ complain('report', 'the stall line could not be written (' + ( err.message || err ) + ')');
695
+ }
696
+ capturing = false;
697
+ drain();
698
+ });
699
+ }
700
+
701
+ /**
702
+ * Act on one result of the readings: report a stall, or post its end to the main
703
+ * thread (which writes the warn line and counts it).
704
+ *
705
+ * @inner
706
+ * @param {{t: string, ms: number, at: number, hb: number}} item
707
+ * @returns {void}
708
+ */
709
+ function handle(item) {
710
+ try {
711
+ if ( item.t === 'stall' ) {
712
+ startReport(item);
713
+ } else if ( item.t === 'resumed' ) {
714
+ parent.postMessage({ t: 'resumed', ms: item.ms });
715
+ }
716
+ } catch (err) {
717
+ complain('report', 'a stall could not be reported (' + ( err.message || err ) + ')');
718
+ }
719
+ }
720
+
721
+ /**
722
+ * Act on the results that waited for a capture, in order, until one starts another.
723
+ *
724
+ * @inner
725
+ * @returns {void}
726
+ */
727
+ function drain() {
728
+ while ( !capturing && pending.length > 0 ) {
729
+ handle(pending.shift());
730
+ }
731
+ }
732
+
733
+ /** @inner @type {Object} The reading rules (detector.js): the start, a stall, its end, a suspension. */
734
+ var detector = require('./detector.js').createDetector(thresholdMs);
735
+ detector.step(Date.now(), Atomics.load(hb, 0));
736
+
737
+ /**
738
+ * One reading of the heartbeat: a stall is reported, its end posted to the main
739
+ * thread; while a capture runs, either waits for it.
740
+ *
741
+ * @inner
742
+ * @param {number} now
743
+ * @returns {void}
744
+ */
745
+ function tick(now) {
746
+ var value = Atomics.load(hb, 0);
747
+ var result = detector.step(now, value);
748
+ if ( !result ) {
749
+ return;
750
+ }
751
+ var item = { t: result.t, ms: result.ms, at: now, hb: value };
752
+ if ( capturing || pending.length > 0 ) {
753
+ pending.push(item);
754
+ return;
755
+ }
756
+ handle(item);
757
+ }
758
+
759
+ parent.on('message', function(msg) {
760
+ try {
761
+ if ( !msg || typeof(msg) != 'object' ) {
762
+ return;
763
+ }
764
+ if ( msg.t === 'in' ) {
765
+ if ( ring.size >= RING_MAX ) {
766
+ ring.delete(ring.keys().next().value);
767
+ }
768
+ ring.set(msg.k, msg);
769
+ } else if ( msg.t === 'out' ) {
770
+ ring.delete(msg.k);
771
+ } else if ( msg.t === 'redact' ) {
772
+ redactState = msg.state || null;
773
+ }
774
+ } catch (err) {
775
+ complain('message', 'a message from the main thread could not be read (' + ( err.message || err ) + ')');
776
+ }
777
+ });
778
+
779
+ // Ref'd on purpose: this interval is what keeps the thread alive between readings.
780
+ setInterval(function() {
781
+ try {
782
+ tick(Date.now());
783
+ } catch (err) {
784
+ complain('tick', 'a heartbeat reading failed (' + ( err.message || err ) + ')');
785
+ }
786
+ }, intervalMs);
787
+
788
+ dialMq();