gina 0.3.11 → 0.3.12

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 (400) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +8 -1
  3. package/framework/v0.3.12/VERSION +1 -0
  4. package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/js/gina.js +12 -1
  5. package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/js/gina.min.js +187 -186
  6. package/framework/v0.3.12/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
  7. package/framework/v0.3.12/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
  8. package/framework/{v0.3.11 → v0.3.12}/core/controller/controller.render-json.js +12 -3
  9. package/framework/{v0.3.11 → v0.3.12}/core/controller/controller.render-nunjucks.js +68 -54
  10. package/framework/{v0.3.11 → v0.3.12}/core/controller/controller.render-swig.js +173 -132
  11. package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/validator/src/form-validator.js +12 -1
  12. package/framework/{v0.3.11 → v0.3.12}/core/server.isaac.js +10 -2
  13. package/framework/{v0.3.11 → v0.3.12}/core/server.js +3 -3
  14. package/framework/{v0.3.11 → v0.3.12}/package.json +2 -2
  15. package/gna.js +4 -4
  16. package/llms.txt +3 -1
  17. package/package.json +2 -2
  18. package/framework/v0.3.11/VERSION +0 -1
  19. package/framework/v0.3.11/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
  20. package/framework/v0.3.11/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
  21. /package/framework/{v0.3.11 → v0.3.12}/AUTHORS +0 -0
  22. /package/framework/{v0.3.11 → v0.3.12}/LICENSE +0 -0
  23. /package/framework/{v0.3.11 → v0.3.12}/core/asset/html/nolayout.html +0 -0
  24. /package/framework/{v0.3.11 → v0.3.12}/core/asset/html/static.html +0 -0
  25. /package/framework/{v0.3.11 → v0.3.12}/core/asset/img/android-chrome-192x192.png +0 -0
  26. /package/framework/{v0.3.11 → v0.3.12}/core/asset/img/android-chrome-512x512.png +0 -0
  27. /package/framework/{v0.3.11 → v0.3.12}/core/asset/img/apple-touch-icon.png +0 -0
  28. /package/framework/{v0.3.11 → v0.3.12}/core/asset/img/favicon-16x16.png +0 -0
  29. /package/framework/{v0.3.11 → v0.3.12}/core/asset/img/favicon-32x32.png +0 -0
  30. /package/framework/{v0.3.11 → v0.3.12}/core/asset/img/favicon.ico +0 -0
  31. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/README.md +0 -0
  32. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.css +0 -0
  33. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.js +0 -0
  34. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/beemaster/index.html +0 -0
  35. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
  36. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.br +0 -0
  37. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.gz +0 -0
  38. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/html/statusbar.html +0 -0
  39. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.br +0 -0
  40. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.gz +0 -0
  41. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/inspector/have_heart_one-webfont.woff2 +0 -0
  42. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/inspector/index.html +0 -0
  43. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/inspector/inspector.css +0 -0
  44. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/inspector/inspector.js +0 -0
  45. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/inspector/logo.svg +0 -0
  46. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -0
  47. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.br +0 -0
  48. /package/framework/{v0.3.11 → v0.3.12}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.gz +0 -0
  49. /package/framework/{v0.3.11 → v0.3.12}/core/config.js +0 -0
  50. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/ai/index.js +0 -0
  51. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/ai/lib/connector.js +0 -0
  52. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/index.js +0 -0
  53. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/connector.js +0 -0
  54. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/connector.v2.js +0 -0
  55. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/connector.v3.js +0 -0
  56. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/connector.v4.js +0 -0
  57. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/n1ql.js +0 -0
  58. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/session-store.js +0 -0
  59. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/session-store.v2.js +0 -0
  60. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
  61. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
  62. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/mongodb/index.js +0 -0
  63. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/mongodb/lib/connector.js +0 -0
  64. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/mongodb/lib/pipeline-loader.js +0 -0
  65. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/mongodb/lib/session-store.js +0 -0
  66. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/mysql/index.js +0 -0
  67. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/mysql/lib/connector.js +0 -0
  68. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/postgresql/index.js +0 -0
  69. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/postgresql/lib/connector.js +0 -0
  70. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/redis/index.js +0 -0
  71. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/redis/lib/session-store.js +0 -0
  72. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/scylladb/index.js +0 -0
  73. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/scylladb/lib/connector.js +0 -0
  74. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/scylladb/lib/session-store.js +0 -0
  75. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/sql-parser.js +0 -0
  76. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/sqlite/index.js +0 -0
  77. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/sqlite/lib/connector.js +0 -0
  78. /package/framework/{v0.3.11 → v0.3.12}/core/connectors/sqlite/lib/session-store.js +0 -0
  79. /package/framework/{v0.3.11 → v0.3.12}/core/content.encoding +0 -0
  80. /package/framework/{v0.3.11 → v0.3.12}/core/controller/controller.framework.js +0 -0
  81. /package/framework/{v0.3.11 → v0.3.12}/core/controller/controller.js +0 -0
  82. /package/framework/{v0.3.11 → v0.3.12}/core/controller/controller.render-stream.js +0 -0
  83. /package/framework/{v0.3.11 → v0.3.12}/core/controller/controller.render-v1.js +0 -0
  84. /package/framework/{v0.3.11 → v0.3.12}/core/controller/index.js +0 -0
  85. /package/framework/{v0.3.11 → v0.3.12}/core/deps/busboy-1.6.0/LICENSE +0 -0
  86. /package/framework/{v0.3.11 → v0.3.12}/core/deps/busboy-1.6.0/README.md +0 -0
  87. /package/framework/{v0.3.11 → v0.3.12}/core/deps/busboy-1.6.0/lib/index.js +0 -0
  88. /package/framework/{v0.3.11 → v0.3.12}/core/deps/busboy-1.6.0/lib/types/multipart.js +0 -0
  89. /package/framework/{v0.3.11 → v0.3.12}/core/deps/busboy-1.6.0/lib/types/urlencoded.js +0 -0
  90. /package/framework/{v0.3.11 → v0.3.12}/core/deps/busboy-1.6.0/lib/utils.js +0 -0
  91. /package/framework/{v0.3.11 → v0.3.12}/core/deps/busboy-1.6.0/package.json +0 -0
  92. /package/framework/{v0.3.11 → v0.3.12}/core/deps/streamsearch-1.1.0/LICENSE +0 -0
  93. /package/framework/{v0.3.11 → v0.3.12}/core/deps/streamsearch-1.1.0/lib/sbmh.js +0 -0
  94. /package/framework/{v0.3.11 → v0.3.12}/core/deps/streamsearch-1.1.0/package.json +0 -0
  95. /package/framework/{v0.3.11 → v0.3.12}/core/dev/index.js +0 -0
  96. /package/framework/{v0.3.11 → v0.3.12}/core/dev/lib/class.js +0 -0
  97. /package/framework/{v0.3.11 → v0.3.12}/core/dev/lib/factory.js +0 -0
  98. /package/framework/{v0.3.11 → v0.3.12}/core/dev/lib/tools.js +0 -0
  99. /package/framework/{v0.3.11 → v0.3.12}/core/gna.js +0 -0
  100. /package/framework/{v0.3.11 → v0.3.12}/core/locales/README.md +0 -0
  101. /package/framework/{v0.3.11 → v0.3.12}/core/locales/currency.json +0 -0
  102. /package/framework/{v0.3.11 → v0.3.12}/core/locales/dist/language/en.json +0 -0
  103. /package/framework/{v0.3.11 → v0.3.12}/core/locales/dist/language/fr.json +0 -0
  104. /package/framework/{v0.3.11 → v0.3.12}/core/locales/dist/region/en.json +0 -0
  105. /package/framework/{v0.3.11 → v0.3.12}/core/locales/dist/region/fr.json +0 -0
  106. /package/framework/{v0.3.11 → v0.3.12}/core/locales/index.js +0 -0
  107. /package/framework/{v0.3.11 → v0.3.12}/core/mime.types +0 -0
  108. /package/framework/{v0.3.11 → v0.3.12}/core/model/entity.js +0 -0
  109. /package/framework/{v0.3.11 → v0.3.12}/core/model/index.js +0 -0
  110. /package/framework/{v0.3.11 → v0.3.12}/core/model/template/entityFactory.js +0 -0
  111. /package/framework/{v0.3.11 → v0.3.12}/core/model/template/index.js +0 -0
  112. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/README.md +0 -0
  113. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/index.js +0 -0
  114. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/csrf/README.md +0 -0
  115. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/csrf/package.json +0 -0
  116. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/csrf/src/main.js +0 -0
  117. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/file/README.md +0 -0
  118. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/file/build.json +0 -0
  119. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/file/package.json +0 -0
  120. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/intl/README.md +0 -0
  121. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/intl/build.json +0 -0
  122. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/intl/package.json +0 -0
  123. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/intl/src/main.js +0 -0
  124. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/session/README.md +0 -0
  125. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/session/package.json +0 -0
  126. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/session/src/main.js +0 -0
  127. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/storage/README.md +0 -0
  128. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/storage/build.json +0 -0
  129. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/storage/package.json +0 -0
  130. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/storage/src/main.js +0 -0
  131. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/validator/README.md +0 -0
  132. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/validator/build.json +0 -0
  133. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/validator/package.json +0 -0
  134. /package/framework/{v0.3.11 → v0.3.12}/core/plugins/lib/validator/src/main.js +0 -0
  135. /package/framework/{v0.3.11 → v0.3.12}/core/router.js +0 -0
  136. /package/framework/{v0.3.11 → v0.3.12}/core/server.express.js +0 -0
  137. /package/framework/{v0.3.11 → v0.3.12}/core/status.codes +0 -0
  138. /package/framework/{v0.3.11 → v0.3.12}/core/template/_gitignore +0 -0
  139. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/config/app.json +0 -0
  140. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/config/connectors.json +0 -0
  141. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/config/routing.json +0 -0
  142. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/config/settings.json +0 -0
  143. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
  144. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/config/templates.json +0 -0
  145. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/config/watchers.json +0 -0
  146. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
  147. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
  148. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/controllers/setup.js +0 -0
  149. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/index.js +0 -0
  150. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle/locales/en.json +0 -0
  151. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
  152. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_public/css/default.css +0 -0
  153. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_public/css/home.css +0 -0
  154. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
  155. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
  156. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
  157. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_public/readme.md +0 -0
  158. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
  159. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
  160. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
  161. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
  162. /package/framework/{v0.3.11 → v0.3.12}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
  163. /package/framework/{v0.3.11 → v0.3.12}/core/template/command/gina.bat.tpl +0 -0
  164. /package/framework/{v0.3.11 → v0.3.12}/core/template/command/gina.tpl +0 -0
  165. /package/framework/{v0.3.11 → v0.3.12}/core/template/conf/env.json +0 -0
  166. /package/framework/{v0.3.11 → v0.3.12}/core/template/conf/manifest.json +0 -0
  167. /package/framework/{v0.3.11 → v0.3.12}/core/template/conf/package.json +0 -0
  168. /package/framework/{v0.3.11 → v0.3.12}/core/template/conf/settings.json +0 -0
  169. /package/framework/{v0.3.11 → v0.3.12}/core/template/conf/statics.json +0 -0
  170. /package/framework/{v0.3.11 → v0.3.12}/core/template/conf/templates.json +0 -0
  171. /package/framework/{v0.3.11 → v0.3.12}/core/template/error/client/json/401.json +0 -0
  172. /package/framework/{v0.3.11 → v0.3.12}/core/template/error/client/json/403.json +0 -0
  173. /package/framework/{v0.3.11 → v0.3.12}/core/template/error/client/json/404.json +0 -0
  174. /package/framework/{v0.3.11 → v0.3.12}/core/template/error/server/html/50x.html +0 -0
  175. /package/framework/{v0.3.11 → v0.3.12}/core/template/error/server/json/500.json +0 -0
  176. /package/framework/{v0.3.11 → v0.3.12}/core/template/error/server/json/503.json +0 -0
  177. /package/framework/{v0.3.11 → v0.3.12}/core/template/extensions/logger/config.json +0 -0
  178. /package/framework/{v0.3.11 → v0.3.12}/helpers/console.js +0 -0
  179. /package/framework/{v0.3.11 → v0.3.12}/helpers/context.js +0 -0
  180. /package/framework/{v0.3.11 → v0.3.12}/helpers/data/LICENSE +0 -0
  181. /package/framework/{v0.3.11 → v0.3.12}/helpers/data/README.md +0 -0
  182. /package/framework/{v0.3.11 → v0.3.12}/helpers/data/package.json +0 -0
  183. /package/framework/{v0.3.11 → v0.3.12}/helpers/data/src/main.js +0 -0
  184. /package/framework/{v0.3.11 → v0.3.12}/helpers/dateFormat.js +0 -0
  185. /package/framework/{v0.3.11 → v0.3.12}/helpers/index.js +0 -0
  186. /package/framework/{v0.3.11 → v0.3.12}/helpers/json/LICENSE +0 -0
  187. /package/framework/{v0.3.11 → v0.3.12}/helpers/json/README.md +0 -0
  188. /package/framework/{v0.3.11 → v0.3.12}/helpers/json/package.json +0 -0
  189. /package/framework/{v0.3.11 → v0.3.12}/helpers/json/src/main.js +0 -0
  190. /package/framework/{v0.3.11 → v0.3.12}/helpers/path.js +0 -0
  191. /package/framework/{v0.3.11 → v0.3.12}/helpers/plugins/README.md +0 -0
  192. /package/framework/{v0.3.11 → v0.3.12}/helpers/plugins/package.json +0 -0
  193. /package/framework/{v0.3.11 → v0.3.12}/helpers/plugins/src/api-error.js +0 -0
  194. /package/framework/{v0.3.11 → v0.3.12}/helpers/plugins/src/main.js +0 -0
  195. /package/framework/{v0.3.11 → v0.3.12}/helpers/prototypes.js +0 -0
  196. /package/framework/{v0.3.11 → v0.3.12}/helpers/task.js +0 -0
  197. /package/framework/{v0.3.11 → v0.3.12}/helpers/text.js +0 -0
  198. /package/framework/{v0.3.11 → v0.3.12}/lib/archiver/README.md +0 -0
  199. /package/framework/{v0.3.11 → v0.3.12}/lib/archiver/build.json +0 -0
  200. /package/framework/{v0.3.11 → v0.3.12}/lib/archiver/package.json +0 -0
  201. /package/framework/{v0.3.11 → v0.3.12}/lib/archiver/src/dep/jszip.min.js +0 -0
  202. /package/framework/{v0.3.11 → v0.3.12}/lib/archiver/src/main.js +0 -0
  203. /package/framework/{v0.3.11 → v0.3.12}/lib/async/package.json +0 -0
  204. /package/framework/{v0.3.11 → v0.3.12}/lib/async/src/main.js +0 -0
  205. /package/framework/{v0.3.11 → v0.3.12}/lib/cache/README.md +0 -0
  206. /package/framework/{v0.3.11 → v0.3.12}/lib/cache/build.json +0 -0
  207. /package/framework/{v0.3.11 → v0.3.12}/lib/cache/package.json +0 -0
  208. /package/framework/{v0.3.11 → v0.3.12}/lib/cache/src/main.js +0 -0
  209. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/aliases.json +0 -0
  210. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/add.js +0 -0
  211. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/arguments.json +0 -0
  212. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/build.js +0 -0
  213. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/copy.js +0 -0
  214. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/cp.js +0 -0
  215. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/help.js +0 -0
  216. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/help.txt +0 -0
  217. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/list.js +0 -0
  218. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/mcp-start.js +0 -0
  219. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/mcp.js +0 -0
  220. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/oas.js +0 -0
  221. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/openapi.js +0 -0
  222. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/remove.js +0 -0
  223. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/rename.js +0 -0
  224. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/restart.js +0 -0
  225. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/rm.js +0 -0
  226. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/start.js +0 -0
  227. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/status.js +0 -0
  228. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/bundle/stop.js +0 -0
  229. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/cache/stats.js +0 -0
  230. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/add.js +0 -0
  231. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/arguments.json +0 -0
  232. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/help.js +0 -0
  233. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/help.txt +0 -0
  234. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/list.js +0 -0
  235. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/migrate.js +0 -0
  236. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/remove.js +0 -0
  237. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/connector/rm.js +0 -0
  238. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/add.js +0 -0
  239. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/get.js +0 -0
  240. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/help.js +0 -0
  241. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/help.txt +0 -0
  242. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/link-dev.js +0 -0
  243. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/list.js +0 -0
  244. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/remove.js +0 -0
  245. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/rm.js +0 -0
  246. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/set.js +0 -0
  247. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/unset.js +0 -0
  248. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/env/use.js +0 -0
  249. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/arguments.json +0 -0
  250. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/build.js +0 -0
  251. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/dot.js +0 -0
  252. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/get.js +0 -0
  253. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/help.js +0 -0
  254. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/help.txt +0 -0
  255. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/init.js +0 -0
  256. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/link-node-modules.js +0 -0
  257. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/link.js +0 -0
  258. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/msg.json +0 -0
  259. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/open.js +0 -0
  260. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/restart.js +0 -0
  261. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/set.js +0 -0
  262. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/start.js +0 -0
  263. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/status.js +0 -0
  264. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/stop.js +0 -0
  265. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/tail.js +0 -0
  266. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/update.js +0 -0
  267. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/framework/version.js +0 -0
  268. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/gina-dev.1.md +0 -0
  269. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/gina-framework.1.md +0 -0
  270. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/gina.1.md +0 -0
  271. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/helper.js +0 -0
  272. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/i18n/add.js +0 -0
  273. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/i18n/arguments.json +0 -0
  274. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/i18n/export.js +0 -0
  275. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/i18n/help.js +0 -0
  276. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/i18n/help.txt +0 -0
  277. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/i18n/import.js +0 -0
  278. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/i18n/scan.js +0 -0
  279. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/index.js +0 -0
  280. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/inspector/help.js +0 -0
  281. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/inspector/help.txt +0 -0
  282. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/inspector/open.js +0 -0
  283. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/minion/help.js +0 -0
  284. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/minion/help.txt +0 -0
  285. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/msg.json +0 -0
  286. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/port/help.js +0 -0
  287. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/port/help.txt +0 -0
  288. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/port/inc/scan.js +0 -0
  289. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/port/list.js +0 -0
  290. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/port/reset.js +0 -0
  291. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/port/set.js +0 -0
  292. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/add.js +0 -0
  293. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/arguments.json +0 -0
  294. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/build.js +0 -0
  295. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/help.js +0 -0
  296. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/help.txt +0 -0
  297. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/import.js +0 -0
  298. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/list.js +0 -0
  299. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/move.js +0 -0
  300. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/remove.js +0 -0
  301. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/rename.js +0 -0
  302. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/restart.js +0 -0
  303. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/rm.js +0 -0
  304. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/start.js +0 -0
  305. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/status.js +0 -0
  306. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/project/stop.js +0 -0
  307. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/protocol/help.js +0 -0
  308. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/protocol/help.txt +0 -0
  309. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/protocol/list.js +0 -0
  310. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/protocol/set.js +0 -0
  311. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/add.js +0 -0
  312. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/help.js +0 -0
  313. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/help.txt +0 -0
  314. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/link-local.js +0 -0
  315. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/link-production.js +0 -0
  316. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/list.js +0 -0
  317. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/remove.js +0 -0
  318. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/rm.js +0 -0
  319. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/scope/use.js +0 -0
  320. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/service/help.js +0 -0
  321. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/service/help.txt +0 -0
  322. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/service/list.js +0 -0
  323. /package/framework/{v0.3.11 → v0.3.12}/lib/cmd/view/add.js +0 -0
  324. /package/framework/{v0.3.11 → v0.3.12}/lib/collection/README.md +0 -0
  325. /package/framework/{v0.3.11 → v0.3.12}/lib/collection/build.json +0 -0
  326. /package/framework/{v0.3.11 → v0.3.12}/lib/collection/package.json +0 -0
  327. /package/framework/{v0.3.11 → v0.3.12}/lib/collection/src/main.js +0 -0
  328. /package/framework/{v0.3.11 → v0.3.12}/lib/config.js +0 -0
  329. /package/framework/{v0.3.11 → v0.3.12}/lib/connector-registry/package.json +0 -0
  330. /package/framework/{v0.3.11 → v0.3.12}/lib/connector-registry/src/main.js +0 -0
  331. /package/framework/{v0.3.11 → v0.3.12}/lib/cron/README.md +0 -0
  332. /package/framework/{v0.3.11 → v0.3.12}/lib/cron/package.json +0 -0
  333. /package/framework/{v0.3.11 → v0.3.12}/lib/cron/src/main.js +0 -0
  334. /package/framework/{v0.3.11 → v0.3.12}/lib/domain/LICENSE +0 -0
  335. /package/framework/{v0.3.11 → v0.3.12}/lib/domain/README.md +0 -0
  336. /package/framework/{v0.3.11 → v0.3.12}/lib/domain/package.json +0 -0
  337. /package/framework/{v0.3.11 → v0.3.12}/lib/domain/src/main.js +0 -0
  338. /package/framework/{v0.3.11 → v0.3.12}/lib/generator/index.js +0 -0
  339. /package/framework/{v0.3.11 → v0.3.12}/lib/i18n/package.json +0 -0
  340. /package/framework/{v0.3.11 → v0.3.12}/lib/i18n/src/main.js +0 -0
  341. /package/framework/{v0.3.11 → v0.3.12}/lib/index.js +0 -0
  342. /package/framework/{v0.3.11 → v0.3.12}/lib/inherits/LICENSE +0 -0
  343. /package/framework/{v0.3.11 → v0.3.12}/lib/inherits/README.md +0 -0
  344. /package/framework/{v0.3.11 → v0.3.12}/lib/inherits/package.json +0 -0
  345. /package/framework/{v0.3.11 → v0.3.12}/lib/inherits/src/main.js +0 -0
  346. /package/framework/{v0.3.11 → v0.3.12}/lib/inspector-redact/package.json +0 -0
  347. /package/framework/{v0.3.11 → v0.3.12}/lib/inspector-redact/src/main.js +0 -0
  348. /package/framework/{v0.3.11 → v0.3.12}/lib/logger/README.md +0 -0
  349. /package/framework/{v0.3.11 → v0.3.12}/lib/logger/package.json +0 -0
  350. /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/containers/default/index.js +0 -0
  351. /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/containers/file/index.js +0 -0
  352. /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/containers/file/lib/logrotator/README.md +0 -0
  353. /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/containers/file/lib/logrotator/index.js +0 -0
  354. /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/containers/mq/index.js +0 -0
  355. /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/containers/mq/listener.js +0 -0
  356. /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/containers/mq/speaker.js +0 -0
  357. /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/helper.js +0 -0
  358. /package/framework/{v0.3.11 → v0.3.12}/lib/logger/src/main.js +0 -0
  359. /package/framework/{v0.3.11 → v0.3.12}/lib/math/index.js +0 -0
  360. /package/framework/{v0.3.11 → v0.3.12}/lib/mcp-dispatch/package.json +0 -0
  361. /package/framework/{v0.3.11 → v0.3.12}/lib/mcp-dispatch/src/main.js +0 -0
  362. /package/framework/{v0.3.11 → v0.3.12}/lib/mcp-http/package.json +0 -0
  363. /package/framework/{v0.3.11 → v0.3.12}/lib/mcp-http/src/main.js +0 -0
  364. /package/framework/{v0.3.11 → v0.3.12}/lib/mcp-server/package.json +0 -0
  365. /package/framework/{v0.3.11 → v0.3.12}/lib/mcp-server/src/main.js +0 -0
  366. /package/framework/{v0.3.11 → v0.3.12}/lib/merge/README.md +0 -0
  367. /package/framework/{v0.3.11 → v0.3.12}/lib/merge/package.json +0 -0
  368. /package/framework/{v0.3.11 → v0.3.12}/lib/merge/src/main.js +0 -0
  369. /package/framework/{v0.3.11 → v0.3.12}/lib/metrics/package.json +0 -0
  370. /package/framework/{v0.3.11 → v0.3.12}/lib/metrics/src/main.js +0 -0
  371. /package/framework/{v0.3.11 → v0.3.12}/lib/model.js +0 -0
  372. /package/framework/{v0.3.11 → v0.3.12}/lib/nunjucks-filters/README.md +0 -0
  373. /package/framework/{v0.3.11 → v0.3.12}/lib/nunjucks-filters/package.json +0 -0
  374. /package/framework/{v0.3.11 → v0.3.12}/lib/nunjucks-filters/src/main.js +0 -0
  375. /package/framework/{v0.3.11 → v0.3.12}/lib/nunjucks-resolver/package.json +0 -0
  376. /package/framework/{v0.3.11 → v0.3.12}/lib/nunjucks-resolver/src/main.js +0 -0
  377. /package/framework/{v0.3.11 → v0.3.12}/lib/proc.js +0 -0
  378. /package/framework/{v0.3.11 → v0.3.12}/lib/routing/README.md +0 -0
  379. /package/framework/{v0.3.11 → v0.3.12}/lib/routing/build.json +0 -0
  380. /package/framework/{v0.3.11 → v0.3.12}/lib/routing/package.json +0 -0
  381. /package/framework/{v0.3.11 → v0.3.12}/lib/routing/src/main.js +0 -0
  382. /package/framework/{v0.3.11 → v0.3.12}/lib/routing/src/radix.js +0 -0
  383. /package/framework/{v0.3.11 → v0.3.12}/lib/routing-introspect/package.json +0 -0
  384. /package/framework/{v0.3.11 → v0.3.12}/lib/routing-introspect/src/main.js +0 -0
  385. /package/framework/{v0.3.11 → v0.3.12}/lib/session-store.js +0 -0
  386. /package/framework/{v0.3.11 → v0.3.12}/lib/shell.js +0 -0
  387. /package/framework/{v0.3.11 → v0.3.12}/lib/state.js +0 -0
  388. /package/framework/{v0.3.11 → v0.3.12}/lib/swig-filters/README.md +0 -0
  389. /package/framework/{v0.3.11 → v0.3.12}/lib/swig-filters/package.json +0 -0
  390. /package/framework/{v0.3.11 → v0.3.12}/lib/swig-filters/src/main.js +0 -0
  391. /package/framework/{v0.3.11 → v0.3.12}/lib/swig-resolver/package.json +0 -0
  392. /package/framework/{v0.3.11 → v0.3.12}/lib/swig-resolver/src/main.js +0 -0
  393. /package/framework/{v0.3.11 → v0.3.12}/lib/url/README.md +0 -0
  394. /package/framework/{v0.3.11 → v0.3.12}/lib/url/index.js +0 -0
  395. /package/framework/{v0.3.11 → v0.3.12}/lib/url/routing.json +0 -0
  396. /package/framework/{v0.3.11 → v0.3.12}/lib/uuid/package.json +0 -0
  397. /package/framework/{v0.3.11 → v0.3.12}/lib/uuid/src/main.js +0 -0
  398. /package/framework/{v0.3.11 → v0.3.12}/lib/validator.js +0 -0
  399. /package/framework/{v0.3.11 → v0.3.12}/lib/watcher/package.json +0 -0
  400. /package/framework/{v0.3.11 → v0.3.12}/lib/watcher/src/main.js +0 -0
@@ -26,7 +26,12 @@ var self = null
26
26
  * @param {string} jsonContent - Serialised JSON string to cache
27
27
  * @returns {Promise<void>}
28
28
  */
29
- async function writeCache(bundle, opt, jsonContent) {
29
+ // `res` (the captured response from renderJSON) is passed in so the post-
30
+ // await throwError below does not dereference a nulled `local.res`. Pre-
31
+ // await reads of `local.req`/`local.res` (lines 31-86) are part of
32
+ // renderJSON's synchronous call (it is not async), so they are safe — the
33
+ // race window opens only after `await fs.promises.writeFile` at line 100.
34
+ async function writeCache(bundle, opt, jsonContent, res) {
30
35
  if (
31
36
  typeof(local.req.routing.cache) == 'undefined'
32
37
  ||
@@ -111,7 +116,11 @@ async function writeCache(bundle, opt, jsonContent) {
111
116
  // Invalidation
112
117
  if ( typeof(cachingOption.invalidateOnEvents) != 'undefined' ) {
113
118
  if ( !Array.isArray(cachingOption.invalidateOnEvents) ) {
114
- return self.throwError(local.res, 500, new Error('cache.invalidateOn must be an array'));
119
+ // #M1 post-await read goes through the captured `res` (passed
120
+ // from renderJSON) rather than `local.res`, which renderJSON may
121
+ // have nulled at its terminal exit between the writeFile await
122
+ // and this resume point.
123
+ return self.throwError(res, 500, new Error('cache.invalidateOn must be an array'));
115
124
  }
116
125
  // Placing event listeners
117
126
  cache.setEvents(cacheKey, cachingOption.invalidateOnEvents);
@@ -406,7 +415,7 @@ module.exports = function renderJSON(jsonObj, deps) {
406
415
  && typeof(request.routing.cache) != 'undefined'
407
416
  && /^GET$/i.test(request.method)
408
417
  ) {
409
- writeCache(self._options.bundle, local.options.conf.server.cache, data).catch(function(err) {
418
+ writeCache(self._options.bundle, local.options.conf.server.cache, data, response).catch(function(err) {
410
419
  console.error('[render-json] writeCache failed:', err);
411
420
  });
412
421
  }
@@ -38,7 +38,7 @@
38
38
  * (commit TBD). `sendHtmlResponse` now implements the four-way branch
39
39
  * from `class.controller.md §7b` (HEAD×stream, HEAD×HTTP1.1, body×stream,
40
40
  * body×HTTP1.1). HTTP/2 streams bypass the compat layer, merge pipeline-set
41
- * headers (CORS, cache-control) via `local.res.getHeaders()`, and guard
41
+ * headers (CORS, cache-control) via `res.getHeaders()`, and guard
42
42
  * against `stream.destroyed || stream.closed` client disconnects that
43
43
  * would otherwise throw `ERR_HTTP2_INVALID_STREAM`. Early Hints 103
44
44
  * auto-send for CSS/JS preloads is still deferred — that path in swig
@@ -373,14 +373,14 @@ function injectInspectorScripts(html, data, self, local, displayInspector) {
373
373
  * 4. body + HTTP/1.1 → `res.end(html)` (content-type set earlier)
374
374
  *
375
375
  * The HTTP/2 branches merge headers set earlier in the pipeline (CORS,
376
- * cache-control, cookies) via `local.res.getHeaders()` because
376
+ * cache-control, cookies) via `res.getHeaders()` because
377
377
  * `stream.respond()` on the raw HTTP/2 stream does NOT include headers
378
378
  * set via `response.setHeader()`. The `stream.destroyed || stream.closed`
379
379
  * guard is required — the client may have disconnected before the async
380
380
  * render callback completed, in which case `stream.respond()` throws
381
381
  * `ERR_HTTP2_INVALID_STREAM`.
382
382
  *
383
- * `local.res.headersSent = true` is set after a successful `stream.respond()`
383
+ * `res.headersSent = true` is set after a successful `stream.respond()`
384
384
  * to signal to the HTTP/1.1 compat layer that the response was sent
385
385
  * directly, matching render-swig's §7b pattern.
386
386
  *
@@ -388,45 +388,45 @@ function injectInspectorScripts(html, data, self, local, displayInspector) {
388
388
  * @param {object} local - Per-request closure
389
389
  * @param {string} html - Rendered HTML content
390
390
  */
391
- function sendHtmlResponse(local, html) {
392
- if (local.res.headersSent) { return; }
391
+ function sendHtmlResponse(local, html, req, res) {
392
+ if (res.headersSent) { return; }
393
393
 
394
- var statusCode = local.res.statusCode || 200;
395
- var stream = (local.res && typeof local.res.stream !== 'undefined') ? local.res.stream : null;
396
- var isHead = /^HEAD$/i.test(local.req.method);
394
+ var statusCode = res.statusCode || 200;
395
+ var stream = (res && typeof res.stream !== 'undefined') ? res.stream : null;
396
+ var isHead = /^HEAD$/i.test(req.method);
397
397
  var byteLength = Buffer.byteLength(html, 'utf8');
398
398
  // Ensure content-type is set on the HTTP/1.1 response so header merge
399
399
  // picks it up for the stream paths and setHeader()-only paths alike.
400
- if (!local.res.getHeader('content-type')) {
401
- local.res.setHeader('content-type', 'text/html; charset=utf-8');
400
+ if (!res.getHeader('content-type')) {
401
+ res.setHeader('content-type', 'text/html; charset=utf-8');
402
402
  }
403
403
 
404
404
  if (isHead) {
405
405
  if (stream) {
406
406
  // Case 1: HEAD + HTTP/2
407
407
  if (stream.destroyed || stream.closed) {
408
- try { console.warn('[render-nunjucks] stream already destroyed on HEAD — client disconnected ('+ local.req.url +')'); } catch (e) {}
408
+ try { console.warn('[render-nunjucks] stream already destroyed on HEAD — client disconnected ('+ req.url +')'); } catch (e) {}
409
409
  return;
410
410
  }
411
411
  if (!stream.headersSent) {
412
412
  var _headH2 = {
413
- 'content-type': local.res.getHeader('content-type'),
413
+ 'content-type': res.getHeader('content-type'),
414
414
  'content-length': byteLength,
415
415
  ':status': statusCode
416
416
  };
417
- var _pendingHeadH2 = local.res.getHeaders ? local.res.getHeaders() : {};
417
+ var _pendingHeadH2 = res.getHeaders ? res.getHeaders() : {};
418
418
  for (var _hh2k in _pendingHeadH2) {
419
419
  if (!(_hh2k in _headH2)) { _headH2[_hh2k] = _pendingHeadH2[_hh2k]; }
420
420
  }
421
421
  stream.respond(_headH2);
422
422
  }
423
423
  stream.end();
424
- local.res.headersSent = true;
424
+ res.headersSent = true;
425
425
  } else {
426
426
  // Case 2: HEAD + HTTP/1.1
427
- local.res.setHeader('content-length', byteLength);
428
- local.res.writeHead(statusCode);
429
- local.res.end();
427
+ res.setHeader('content-length', byteLength);
428
+ res.writeHead(statusCode);
429
+ res.end();
430
430
  }
431
431
  return;
432
432
  }
@@ -434,30 +434,30 @@ function sendHtmlResponse(local, html) {
434
434
  if (stream) {
435
435
  // Case 3: body + HTTP/2
436
436
  if (stream.destroyed || stream.closed) {
437
- try { console.warn('[render-nunjucks] stream already destroyed — client disconnected before response ('+ local.req.url +')'); } catch (e) {}
437
+ try { console.warn('[render-nunjucks] stream already destroyed — client disconnected before response ('+ req.url +')'); } catch (e) {}
438
438
  return;
439
439
  }
440
440
  if (!stream.headersSent) {
441
441
  var _streamHeaders = {
442
- 'content-type': local.res.getHeader('content-type'),
442
+ 'content-type': res.getHeader('content-type'),
443
443
  ':status': statusCode
444
444
  };
445
445
  // Merge pipeline-set headers (CORS, cache-control, etc.) —
446
446
  // `stream.respond()` does not include them automatically.
447
- var _pendingHeaders = local.res.getHeaders ? local.res.getHeaders() : {};
447
+ var _pendingHeaders = res.getHeaders ? res.getHeaders() : {};
448
448
  for (var _shk in _pendingHeaders) {
449
449
  if (!(_shk in _streamHeaders)) { _streamHeaders[_shk] = _pendingHeaders[_shk]; }
450
450
  }
451
451
  stream.respond(_streamHeaders);
452
452
  }
453
453
  stream.end(html);
454
- local.res.headersSent = true;
454
+ res.headersSent = true;
455
455
  return;
456
456
  }
457
457
 
458
458
  // Case 4: body + HTTP/1.1
459
- local.res.writeHead(statusCode);
460
- local.res.end(html);
459
+ res.writeHead(statusCode);
460
+ res.end(html);
461
461
  }
462
462
 
463
463
  /**
@@ -480,7 +480,7 @@ function sendHtmlResponse(local, html) {
480
480
  * @param {object} localOptions - The controller's localOptions (already has `conf`)
481
481
  * @returns {void}
482
482
  */
483
- function registerGinaFilters(env, self, local, localOptions) {
483
+ function registerGinaFilters(env, self, local, localOptions, req, res) {
484
484
  // FRAMEWORK PATCH: use module-scope libRef fallback so
485
485
  // refreshCore's malformed cache entry doesn't return undefined here.
486
486
  var nunjucksFilters = (libRef && libRef.nunjucksFilters)
@@ -491,23 +491,23 @@ function registerGinaFilters(env, self, local, localOptions) {
491
491
  // request headers and engine-specific localOptions, (b) extracting to a
492
492
  // shared helper would widen the scope of this filter-port change beyond
493
493
  // what's necessary. Future refactor candidate.
494
- var localRequestPort = local.req.headers.port || local.req.headers[':port'];
494
+ var localRequestPort = req.headers.port || req.headers[':port'];
495
495
  var isProxyHost = (
496
- typeof(local.req.headers.host) != 'undefined'
496
+ typeof(req.headers.host) != 'undefined'
497
497
  && typeof(localRequestPort) != 'undefined'
498
498
  && (localRequestPort === '80' || localRequestPort === '443' || localRequestPort === 80 || localRequestPort === 443)
499
- && localOptions.conf.server.scheme +'://'+ local.req.headers.host+':'+ localRequestPort != localOptions.conf.hostname.replace(/\:\d+$/, '') +':'+ localOptions.conf.server.port
499
+ && localOptions.conf.server.scheme +'://'+ req.headers.host+':'+ localRequestPort != localOptions.conf.hostname.replace(/\:\d+$/, '') +':'+ localOptions.conf.server.port
500
500
  ||
501
- typeof(local.req.headers[':authority']) != 'undefined'
502
- && localOptions.conf.server.scheme +'://'+ local.req.headers[':authority'] != localOptions.conf.hostname
501
+ typeof(req.headers[':authority']) != 'undefined'
502
+ && localOptions.conf.server.scheme +'://'+ req.headers[':authority'] != localOptions.conf.hostname
503
503
  ||
504
- typeof(local.req.headers.host) != 'undefined'
504
+ typeof(req.headers.host) != 'undefined'
505
505
  && typeof(localRequestPort) != 'undefined'
506
506
  && (localRequestPort === '80' || localRequestPort === '443' || localRequestPort === 80 || localRequestPort === 443)
507
- && local.req.headers.host == localOptions.conf.host
507
+ && req.headers.host == localOptions.conf.host
508
508
  ||
509
- typeof(local.req.headers['x-nginx-proxy']) != 'undefined'
510
- && String(local.req.headers['x-nginx-proxy']).toLowerCase() === 'true'
509
+ typeof(req.headers['x-nginx-proxy']) != 'undefined'
510
+ && String(req.headers['x-nginx-proxy']).toLowerCase() === 'true'
511
511
  ||
512
512
  typeof(process.gina) != 'undefined' && typeof(process.gina.PROXY_HOSTNAME) != 'undefined'
513
513
  ) ? true : false;
@@ -516,8 +516,8 @@ function registerGinaFilters(env, self, local, localOptions) {
516
516
  options: JSON.clone(localOptions),
517
517
  isProxyHost: isProxyHost,
518
518
  throwError: self.throwError,
519
- req: local.req,
520
- res: local.res
519
+ req: req,
520
+ res: res
521
521
  });
522
522
 
523
523
  // FRAMEWORK PATCH: apply bundle-level filter wraps registered
@@ -651,11 +651,11 @@ function injectAssets(html, data, localOptions) {
651
651
  * @param {string} htmlContent - Final HTML string to cache (post injectAssets + injectInspectorScripts)
652
652
  * @returns {Promise<void>}
653
653
  */
654
- async function writeCache(local, self, bundle, opt, htmlContent) {
654
+ async function writeCache(local, self, bundle, opt, htmlContent, req, res) {
655
655
  if (
656
- typeof(local.req.routing.cache) == 'undefined'
656
+ typeof(req.routing.cache) == 'undefined'
657
657
  ||
658
- ! local.req.routing.cache
658
+ ! req.routing.cache
659
659
  ||
660
660
  String(self.serverInstance._cacheIsEnabled).toLowerCase() !== 'true'
661
661
  ) {
@@ -663,11 +663,11 @@ async function writeCache(local, self, bundle, opt, htmlContent) {
663
663
  }
664
664
  // Bundle namespace prevents silent collisions when two bundles serve the
665
665
  // same URL path — matches render-swig.js:47 and render-json.js:40 (#C3).
666
- var cacheKey = "static:" + bundle + ":" + local.req.originalUrl;
667
- var responseHeaders = local.res.getHeaders() || {};
666
+ var cacheKey = "static:" + bundle + ":" + req.originalUrl;
667
+ var responseHeaders = res.getHeaders() || {};
668
668
  if ( !cache.has(cacheKey) ) {
669
669
  // Caching kinds are: `memory` & `fs`
670
- var cachingOption = ( typeof(local.req.routing.cache) == 'string' ) ? { type: local.req.routing.cache } : JSON.clone(local.req.routing.cache);
670
+ var cachingOption = ( typeof(req.routing.cache) == 'string' ) ? { type: req.routing.cache } : JSON.clone(req.routing.cache);
671
671
  if ( typeof(cachingOption.ttl) == 'undefined' ) {
672
672
  cachingOption.ttl = opt.ttl
673
673
  }
@@ -701,7 +701,7 @@ async function writeCache(local, self, bundle, opt, htmlContent) {
701
701
 
702
702
  // Caching to `fs` (file system)
703
703
  if ( /^fs$/i.test(cachingOption.type) ) {
704
- var url = local.req.originalUrl;
704
+ var url = req.originalUrl;
705
705
  if ( url.endsWith('/') ) {
706
706
  url += 'index'
707
707
  }
@@ -726,7 +726,7 @@ async function writeCache(local, self, bundle, opt, htmlContent) {
726
726
  // Invalidation
727
727
  if ( typeof(cachingOption.invalidateOnEvents) != 'undefined' ) {
728
728
  if ( !Array.isArray(cachingOption.invalidateOnEvents) ) {
729
- return self.throwError(local.res, 500, new Error('cache.invalidateOn must be an array'));
729
+ return self.throwError(res, 500, new Error('cache.invalidateOn must be an array'));
730
730
  }
731
731
  // Placing event listeners
732
732
  cache.setEvents(cacheKey, cachingOption.invalidateOnEvents);
@@ -746,6 +746,20 @@ module.exports = async function renderNunjucks(userData, displayInspector, errOp
746
746
  // `localOptions.template.{stylesheets,javascripts}` arrays.
747
747
  var setResources = deps.setResources;
748
748
 
749
+ // Function-scoped captures of per-request refs (#M1 race fix — mirror of
750
+ // controller.render-swig.js). renderNunjucks() is async with awaits at
751
+ // writeCache (the layout-cache write). Between yields, an external code
752
+ // path (most commonly throwError's generic-HTML fallthrough at
753
+ // controller.js:5342-5344) can null `local.req`/`local.res`/`local.next`
754
+ // on the controller closure. Capturing into function-scoped locals at the
755
+ // top of the function isolates this render from that null-out so post-
756
+ // await reads do not dereference null. Helpers that read the per-request
757
+ // refs (sendHtmlResponse / writeCache / registerGinaFilters) take the
758
+ // captures as parameters.
759
+ var req = local.req;
760
+ var res = local.res;
761
+ var _next = local.next;
762
+
749
763
  // #NJ3 — point the module-level `cache` at the server's shared in-memory
750
764
  // store for this request. Same pattern as render-swig.js:171 and
751
765
  // render-json.js:149. A guard is unnecessary: `self.serverInstance._cached`
@@ -770,7 +784,7 @@ module.exports = async function renderNunjucks(userData, displayInspector, errOp
770
784
  // level (the full render-swig file has much more nuanced handling;
771
785
  // MVP keeps it simple).
772
786
  if (!hasViews || !hasViews()) {
773
- return sendHtmlResponse(local, '');
787
+ return sendHtmlResponse(local, '', req, res);
774
788
  }
775
789
 
776
790
  // headersSent guard — if the pipeline already sent headers (e.g. an
@@ -858,7 +872,7 @@ module.exports = async function renderNunjucks(userData, displayInspector, errOp
858
872
  // env.render() / env.renderString() calls below are synchronous and
859
873
  // cannot interleave with another request's addFilter pass.
860
874
  try {
861
- registerGinaFilters(env, self, local, localOptions);
875
+ registerGinaFilters(env, self, local, localOptions, req, res);
862
876
  } catch (filterErr) {
863
877
  return self.throwError(filterErr);
864
878
  }
@@ -1028,16 +1042,16 @@ module.exports = async function renderNunjucks(userData, displayInspector, errOp
1028
1042
  // testing), GETs only, route must declare a `cache` block.
1029
1043
  if (
1030
1044
  !self.isCacheless()
1031
- && typeof(local.req.routing.cache) != 'undefined'
1032
- && local.req.method.toUpperCase() === 'GET'
1045
+ && typeof(req.routing.cache) != 'undefined'
1046
+ && req.method.toUpperCase() === 'GET'
1033
1047
  ||
1034
1048
  // allowing caching even for dev env
1035
1049
  String(self.serverInstance._cacheIsEnabled).toLowerCase() === 'true'
1036
- && typeof(local.req.routing.cache) != 'undefined'
1037
- && local.req.method.toUpperCase() === 'GET'
1050
+ && typeof(req.routing.cache) != 'undefined'
1051
+ && req.method.toUpperCase() === 'GET'
1038
1052
  ) {
1039
1053
  try {
1040
- await writeCache(local, self, localOptions.bundle, localOptions.conf.server.cache, html);
1054
+ await writeCache(local, self, localOptions.bundle, localOptions.conf.server.cache, html, req, res);
1041
1055
  } catch (cacheErr) {
1042
1056
  // Cache-write failures must never break the render. The response
1043
1057
  // still goes out; subsequent requests will retry the write on the
@@ -1051,13 +1065,13 @@ module.exports = async function renderNunjucks(userData, displayInspector, errOp
1051
1065
  // re-computes its own Cache-Control header from `cachedContentObj.ttl`
1052
1066
  // so this header is only meaningful when a client receives the
1053
1067
  // freshly-rendered bytes.
1054
- if ( typeof(local.req.routing.cache) != 'undefined' && local.req.routing.cache ) {
1055
- var _ccCfg = ( typeof(local.req.routing.cache) == 'string' ) ? { type: local.req.routing.cache } : local.req.routing.cache;
1068
+ if ( typeof(req.routing.cache) != 'undefined' && req.routing.cache ) {
1069
+ var _ccCfg = ( typeof(req.routing.cache) == 'string' ) ? { type: req.routing.cache } : req.routing.cache;
1056
1070
  var _ccTtl = ( typeof(_ccCfg.ttl) != 'undefined' && _ccCfg.ttl > 0 ) ? _ccCfg.ttl : localOptions.conf.server.cache.ttl;
1057
1071
  if ( _ccTtl > 0 ) {
1058
- local.res.setHeader('Cache-Control', ( _ccCfg.visibility === 'public' ? 'public' : 'private' ) + ', max-age=' + ~~(_ccTtl));
1072
+ res.setHeader('Cache-Control', ( _ccCfg.visibility === 'public' ? 'public' : 'private' ) + ', max-age=' + ~~(_ccTtl));
1059
1073
  }
1060
1074
  }
1061
1075
 
1062
- sendHtmlResponse(local, html);
1076
+ sendHtmlResponse(local, html, req, res);
1063
1077
  };