@nifrajs/cli 5.8.0 → 5.10.0

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 (308) hide show
  1. package/CHANGELOG.md +191 -0
  2. package/dist/agent-files.d.ts +0 -22
  3. package/dist/agent-files.d.ts.map +1 -1
  4. package/dist/agent-files.js +3 -1
  5. package/dist/agent-files.js.map +1 -1
  6. package/dist/assure-hydration.d.ts.map +1 -1
  7. package/dist/assure-hydration.js +2 -10
  8. package/dist/assure-hydration.js.map +1 -1
  9. package/dist/assure.d.ts.map +1 -1
  10. package/dist/assure.js +3 -3
  11. package/dist/assure.js.map +1 -1
  12. package/dist/check-diagnostics.d.ts +1 -0
  13. package/dist/check-diagnostics.d.ts.map +1 -1
  14. package/dist/check-diagnostics.js +4 -0
  15. package/dist/check-diagnostics.js.map +1 -1
  16. package/dist/check-scan.d.ts +3 -0
  17. package/dist/check-scan.d.ts.map +1 -1
  18. package/dist/check-scan.js +62 -87
  19. package/dist/check-scan.js.map +1 -1
  20. package/dist/check.d.ts +3 -0
  21. package/dist/check.d.ts.map +1 -1
  22. package/dist/check.js +27 -25
  23. package/dist/check.js.map +1 -1
  24. package/dist/cli.d.ts +8 -0
  25. package/dist/cli.d.ts.map +1 -1
  26. package/dist/cli.js +53 -20
  27. package/dist/cli.js.map +1 -1
  28. package/dist/command-catalog.d.ts +1 -5
  29. package/dist/command-catalog.d.ts.map +1 -1
  30. package/dist/command-catalog.js +20 -49
  31. package/dist/command-catalog.js.map +1 -1
  32. package/dist/config-target.js +1 -1
  33. package/dist/config-target.js.map +1 -1
  34. package/dist/db-child.js +3 -10
  35. package/dist/db-child.js.map +1 -1
  36. package/dist/db-config.d.ts +2 -0
  37. package/dist/db-config.d.ts.map +1 -1
  38. package/dist/db-config.js +2 -0
  39. package/dist/db-config.js.map +1 -1
  40. package/dist/doctor.d.ts +14 -3
  41. package/dist/doctor.d.ts.map +1 -1
  42. package/dist/doctor.js +91 -6
  43. package/dist/doctor.js.map +1 -1
  44. package/dist/frontend-guidance.d.ts +19 -0
  45. package/dist/frontend-guidance.d.ts.map +1 -1
  46. package/dist/frontend-guidance.js +267 -23
  47. package/dist/frontend-guidance.js.map +1 -1
  48. package/dist/hand-built-manifest.d.ts.map +1 -1
  49. package/dist/hand-built-manifest.js +1 -1
  50. package/dist/hand-built-manifest.js.map +1 -1
  51. package/dist/internal/control-character.d.ts +3 -0
  52. package/dist/internal/control-character.d.ts.map +1 -0
  53. package/dist/internal/control-character.js +10 -0
  54. package/dist/internal/control-character.js.map +1 -0
  55. package/dist/internal/escape-regexp.d.ts +3 -0
  56. package/dist/internal/escape-regexp.d.ts.map +1 -0
  57. package/dist/internal/escape-regexp.js +5 -0
  58. package/dist/internal/escape-regexp.js.map +1 -0
  59. package/dist/internal/line-at.d.ts +3 -0
  60. package/dist/internal/line-at.d.ts.map +1 -0
  61. package/dist/internal/line-at.js +5 -0
  62. package/dist/internal/line-at.js.map +1 -0
  63. package/dist/internal/nifra-project.d.ts.map +1 -1
  64. package/dist/internal/nifra-project.js +35 -41
  65. package/dist/internal/nifra-project.js.map +1 -1
  66. package/dist/internal/posix-path.d.ts +3 -0
  67. package/dist/internal/posix-path.d.ts.map +1 -0
  68. package/dist/internal/posix-path.js +5 -0
  69. package/dist/internal/posix-path.js.map +1 -0
  70. package/dist/internal/project-specifiers.d.ts.map +1 -1
  71. package/dist/internal/project-specifiers.js +3 -10
  72. package/dist/internal/project-specifiers.js.map +1 -1
  73. package/dist/internal/realpath-or-self.d.ts +3 -0
  74. package/dist/internal/realpath-or-self.d.ts.map +1 -0
  75. package/dist/internal/realpath-or-self.js +11 -0
  76. package/dist/internal/realpath-or-self.js.map +1 -0
  77. package/dist/internal/record.d.ts +3 -0
  78. package/dist/internal/record.d.ts.map +1 -0
  79. package/dist/internal/record.js +5 -0
  80. package/dist/internal/record.js.map +1 -0
  81. package/dist/internal/source-facts.d.ts +30 -0
  82. package/dist/internal/source-facts.d.ts.map +1 -1
  83. package/dist/internal/source-facts.js +155 -25
  84. package/dist/internal/source-facts.js.map +1 -1
  85. package/dist/introspect.d.ts +0 -22
  86. package/dist/introspect.d.ts.map +1 -1
  87. package/dist/introspect.js +11 -151
  88. package/dist/introspect.js.map +1 -1
  89. package/dist/levels-tool.d.ts +2 -0
  90. package/dist/levels-tool.d.ts.map +1 -1
  91. package/dist/levels-tool.js +54 -64
  92. package/dist/levels-tool.js.map +1 -1
  93. package/dist/load.d.ts +8 -1
  94. package/dist/load.d.ts.map +1 -1
  95. package/dist/load.js +5 -0
  96. package/dist/load.js.map +1 -1
  97. package/dist/local-cli.d.ts +7 -0
  98. package/dist/local-cli.d.ts.map +1 -1
  99. package/dist/local-cli.js +13 -0
  100. package/dist/local-cli.js.map +1 -1
  101. package/dist/mcp-docs-tools.d.ts +1 -1
  102. package/dist/mcp-docs-tools.d.ts.map +1 -1
  103. package/dist/mcp-docs-tools.js +46 -3
  104. package/dist/mcp-docs-tools.js.map +1 -1
  105. package/dist/mcp-http.d.ts +1 -1
  106. package/dist/mcp-http.js +2 -2
  107. package/dist/mcp-http.js.map +1 -1
  108. package/dist/mcp-io.d.ts +16 -0
  109. package/dist/mcp-io.d.ts.map +1 -1
  110. package/dist/mcp-io.js +63 -0
  111. package/dist/mcp-io.js.map +1 -1
  112. package/dist/mcp-isolate.d.ts.map +1 -1
  113. package/dist/mcp-isolate.js +2 -1
  114. package/dist/mcp-isolate.js.map +1 -1
  115. package/dist/mcp-project-child.d.ts.map +1 -1
  116. package/dist/mcp-project-child.js +5 -12
  117. package/dist/mcp-project-child.js.map +1 -1
  118. package/dist/mcp-render.d.ts.map +1 -1
  119. package/dist/mcp-render.js +9 -51
  120. package/dist/mcp-render.js.map +1 -1
  121. package/dist/mcp-root.js +1 -1
  122. package/dist/mcp-root.js.map +1 -1
  123. package/dist/mcp-run.d.ts.map +1 -1
  124. package/dist/mcp-run.js +3 -46
  125. package/dist/mcp-run.js.map +1 -1
  126. package/dist/mcp-tool-meta.d.ts.map +1 -1
  127. package/dist/mcp-tool-meta.js +0 -1
  128. package/dist/mcp-tool-meta.js.map +1 -1
  129. package/dist/mcp-ws.d.ts.map +1 -1
  130. package/dist/mcp-ws.js +2 -18
  131. package/dist/mcp-ws.js.map +1 -1
  132. package/dist/migrate-layout.d.ts.map +1 -1
  133. package/dist/migrate-layout.js +36 -57
  134. package/dist/migrate-layout.js.map +1 -1
  135. package/dist/output-schemas.d.ts.map +1 -1
  136. package/dist/output-schemas.js +7 -7
  137. package/dist/output-schemas.js.map +1 -1
  138. package/dist/port.d.ts.map +1 -1
  139. package/dist/port.js +1 -2
  140. package/dist/port.js.map +1 -1
  141. package/dist/ppr-read-fix.js +2 -2
  142. package/dist/ppr-read-fix.js.map +1 -1
  143. package/dist/recipes/5.10.0.d.ts +12 -0
  144. package/dist/recipes/5.10.0.d.ts.map +1 -0
  145. package/dist/recipes/5.10.0.js +44 -0
  146. package/dist/recipes/5.10.0.js.map +1 -0
  147. package/dist/recipes/5.9.0.d.ts +10 -0
  148. package/dist/recipes/5.9.0.d.ts.map +1 -0
  149. package/dist/recipes/5.9.0.js +41 -0
  150. package/dist/recipes/5.9.0.js.map +1 -0
  151. package/dist/recipes/index.d.ts +5 -0
  152. package/dist/recipes/index.d.ts.map +1 -1
  153. package/dist/recipes/index.js +4 -0
  154. package/dist/recipes/index.js.map +1 -1
  155. package/dist/review.d.ts.map +1 -1
  156. package/dist/review.js +12 -13
  157. package/dist/review.js.map +1 -1
  158. package/dist/rules/codes.d.ts +3 -0
  159. package/dist/rules/codes.d.ts.map +1 -1
  160. package/dist/rules/codes.js +3 -0
  161. package/dist/rules/codes.js.map +1 -1
  162. package/dist/rules/contract-visibility.d.ts.map +1 -1
  163. package/dist/rules/contract-visibility.js +3 -9
  164. package/dist/rules/contract-visibility.js.map +1 -1
  165. package/dist/rules/data-guard.d.ts.map +1 -1
  166. package/dist/rules/data-guard.js +3 -10
  167. package/dist/rules/data-guard.js.map +1 -1
  168. package/dist/rules/explanations.d.ts.map +1 -1
  169. package/dist/rules/explanations.js +15 -0
  170. package/dist/rules/explanations.js.map +1 -1
  171. package/dist/rules/internal-links.d.ts +5 -0
  172. package/dist/rules/internal-links.d.ts.map +1 -0
  173. package/dist/rules/internal-links.js +418 -0
  174. package/dist/rules/internal-links.js.map +1 -0
  175. package/dist/rules/legacy.d.ts.map +1 -1
  176. package/dist/rules/legacy.js +20 -0
  177. package/dist/rules/legacy.js.map +1 -1
  178. package/dist/rules/pages.d.ts.map +1 -1
  179. package/dist/rules/pages.js +41 -58
  180. package/dist/rules/pages.js.map +1 -1
  181. package/dist/rules/routes.d.ts.map +1 -1
  182. package/dist/rules/routes.js +20 -27
  183. package/dist/rules/routes.js.map +1 -1
  184. package/dist/rules/security.d.ts.map +1 -1
  185. package/dist/rules/security.js +206 -313
  186. package/dist/rules/security.js.map +1 -1
  187. package/dist/rules/server-fn-namespace.d.ts +8 -0
  188. package/dist/rules/server-fn-namespace.d.ts.map +1 -0
  189. package/dist/rules/server-fn-namespace.js +43 -0
  190. package/dist/rules/server-fn-namespace.js.map +1 -0
  191. package/dist/rules/source-scan.d.ts +29 -0
  192. package/dist/rules/source-scan.d.ts.map +1 -0
  193. package/dist/rules/source-scan.js +38 -0
  194. package/dist/rules/source-scan.js.map +1 -0
  195. package/dist/rules/text-slot-boolean.d.ts.map +1 -1
  196. package/dist/rules/text-slot-boolean.js +21 -43
  197. package/dist/rules/text-slot-boolean.js.map +1 -1
  198. package/dist/rules/zones.d.ts.map +1 -1
  199. package/dist/rules/zones.js +3 -10
  200. package/dist/rules/zones.js.map +1 -1
  201. package/dist/runtime-differences.d.ts +62 -0
  202. package/dist/runtime-differences.d.ts.map +1 -0
  203. package/dist/runtime-differences.js +222 -0
  204. package/dist/runtime-differences.js.map +1 -0
  205. package/dist/sdk.d.ts.map +1 -1
  206. package/dist/sdk.js +43 -43
  207. package/dist/sdk.js.map +1 -1
  208. package/dist/smoke.d.ts.map +1 -1
  209. package/dist/smoke.js +4 -12
  210. package/dist/smoke.js.map +1 -1
  211. package/dist/source-rewrites.d.ts +27 -0
  212. package/dist/source-rewrites.d.ts.map +1 -0
  213. package/dist/source-rewrites.js +517 -0
  214. package/dist/source-rewrites.js.map +1 -0
  215. package/dist/stylex-migrate.d.ts.map +1 -1
  216. package/dist/stylex-migrate.js +1 -1
  217. package/dist/stylex-migrate.js.map +1 -1
  218. package/dist/symptom-search.d.ts +5 -0
  219. package/dist/symptom-search.d.ts.map +1 -0
  220. package/dist/symptom-search.js +21 -0
  221. package/dist/symptom-search.js.map +1 -0
  222. package/dist/typecheck-coverage.d.ts +9 -0
  223. package/dist/typecheck-coverage.d.ts.map +1 -1
  224. package/dist/typecheck-coverage.js +16 -0
  225. package/dist/typecheck-coverage.js.map +1 -1
  226. package/dist/upgrade.d.ts +28 -3
  227. package/dist/upgrade.d.ts.map +1 -1
  228. package/dist/upgrade.js +153 -64
  229. package/dist/upgrade.js.map +1 -1
  230. package/dist/verification-plan.d.ts.map +1 -1
  231. package/dist/verification-plan.js +5 -3
  232. package/dist/verification-plan.js.map +1 -1
  233. package/docs/examples.json +51 -9
  234. package/docs/llms-full.txt +1296 -287
  235. package/docs/types.json +854 -170
  236. package/package.json +11 -11
  237. package/src/agent-files.ts +4 -1
  238. package/src/assure-hydration.ts +2 -9
  239. package/src/assure.ts +3 -4
  240. package/src/check-diagnostics.ts +5 -0
  241. package/src/check-scan.ts +74 -83
  242. package/src/check.ts +40 -26
  243. package/src/cli.ts +76 -20
  244. package/src/command-catalog.ts +22 -56
  245. package/src/config-target.ts +1 -1
  246. package/src/db-child.ts +3 -10
  247. package/src/db-config.ts +4 -0
  248. package/src/doctor.ts +128 -12
  249. package/src/frontend-guidance.ts +344 -25
  250. package/src/hand-built-manifest.ts +1 -2
  251. package/src/internal/control-character.ts +8 -0
  252. package/src/internal/escape-regexp.ts +4 -0
  253. package/src/internal/line-at.ts +4 -0
  254. package/src/internal/nifra-project.ts +39 -35
  255. package/src/internal/posix-path.ts +4 -0
  256. package/src/internal/project-specifiers.ts +3 -10
  257. package/src/internal/realpath-or-self.ts +10 -0
  258. package/src/internal/record.ts +4 -0
  259. package/src/internal/source-facts.ts +194 -29
  260. package/src/introspect.ts +16 -156
  261. package/src/levels-tool.ts +71 -78
  262. package/src/load.ts +15 -1
  263. package/src/local-cli.ts +12 -0
  264. package/src/mcp-docs-tools.ts +51 -3
  265. package/src/mcp-http.ts +2 -2
  266. package/src/mcp-io.ts +77 -0
  267. package/src/mcp-isolate.ts +2 -3
  268. package/src/mcp-project-child.ts +5 -14
  269. package/src/mcp-render.ts +11 -59
  270. package/src/mcp-root.ts +1 -1
  271. package/src/mcp-run.ts +5 -54
  272. package/src/mcp-tool-meta.ts +0 -1
  273. package/src/mcp-ws.ts +2 -19
  274. package/src/migrate-layout.ts +52 -72
  275. package/src/output-schemas.ts +7 -8
  276. package/src/port.ts +1 -4
  277. package/src/ppr-read-fix.ts +2 -2
  278. package/src/recipes/5.10.0.ts +45 -0
  279. package/src/recipes/5.9.0.ts +42 -0
  280. package/src/recipes/index.ts +9 -0
  281. package/src/review.ts +15 -15
  282. package/src/rules/codes.ts +3 -0
  283. package/src/rules/contract-visibility.ts +3 -8
  284. package/src/rules/data-guard.ts +3 -10
  285. package/src/rules/explanations.ts +15 -0
  286. package/src/rules/internal-links.ts +490 -0
  287. package/src/rules/legacy.ts +21 -0
  288. package/src/rules/pages.ts +47 -58
  289. package/src/rules/routes.ts +21 -27
  290. package/src/rules/security.ts +224 -255
  291. package/src/rules/server-fn-namespace.ts +47 -0
  292. package/src/rules/source-scan.ts +66 -0
  293. package/src/rules/text-slot-boolean.ts +26 -42
  294. package/src/rules/zones.ts +3 -10
  295. package/src/runtime-differences.ts +302 -0
  296. package/src/sdk.ts +55 -58
  297. package/src/smoke.ts +4 -13
  298. package/src/source-rewrites.ts +592 -0
  299. package/src/stylex-migrate.ts +1 -3
  300. package/src/symptom-search.ts +27 -0
  301. package/src/typecheck-coverage.ts +23 -0
  302. package/src/upgrade.ts +194 -74
  303. package/src/verification-plan.ts +10 -4
  304. package/dist/sync-routes.d.ts +0 -29
  305. package/dist/sync-routes.d.ts.map +0 -1
  306. package/dist/sync-routes.js +0 -56
  307. package/dist/sync-routes.js.map +0 -1
  308. package/src/sync-routes.ts +0 -70
@@ -1 +1 @@
1
- {"version":3,"file":"verification-plan.d.ts","sourceRoot":"","sources":["../src/verification-plan.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,SAAS,CAAA;AAExD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAA;IACjD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,uFAAuF;IACvF,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAA;CACnC;AAoTD,iDAAiD;AACjD,wBAAgB,iBAAiB,IAAI,SAAS,MAAM,EAAE,CAErD;AAED,wFAAwF;AACxF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAE/E;AAOD,uEAAuE;AACvE,wBAAgB,gBAAgB,CAC9B,IAAI,GAAE,oBAAgC,GACrC,SAAS,oBAAoB,EAAE,CAQjC;AAED,8FAA8F;AAC9F,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,oBAAgC,GAAG,SAAS,MAAM,EAAE,CAE7F;AAED,uEAAuE;AACvE,wBAAgB,0BAA0B,CACxC,IAAI,GAAE,oBAAgC,EACtC,QAAQ,GAAE,oBAAgC,GACzC,SAAS,MAAM,EAAE,CAGnB;AAID,4DAA4D;AAC5D,wBAAgB,sBAAsB,CAAC,IAAI,GAAE,oBAAgC,GAAG,MAAM,CAMrF"}
1
+ {"version":3,"file":"verification-plan.d.ts","sourceRoot":"","sources":["../src/verification-plan.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,SAAS,CAAA;AAExD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAA;IACjD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,uFAAuF;IACvF,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAA;CACnC;AA0TD,iDAAiD;AACjD,wBAAgB,iBAAiB,IAAI,SAAS,MAAM,EAAE,CAErD;AAED,wFAAwF;AACxF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAE/E;AAOD,uEAAuE;AACvE,wBAAgB,gBAAgB,CAC9B,IAAI,GAAE,oBAAgC,GACrC,SAAS,oBAAoB,EAAE,CAQjC;AAED,8FAA8F;AAC9F,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,oBAAgC,GAAG,SAAS,MAAM,EAAE,CAE7F;AAED,uEAAuE;AACvE,wBAAgB,0BAA0B,CACxC,IAAI,GAAE,oBAAgC,EACtC,QAAQ,GAAE,oBAAgC,GACzC,SAAS,MAAM,EAAE,CAGnB;AAID,4DAA4D;AAC5D,wBAAgB,sBAAsB,CAAC,IAAI,GAAE,oBAAgC,GAAG,MAAM,CAMrF"}
@@ -19,7 +19,8 @@ const GATES = Object.freeze([
19
19
  gate("docs", [["run", "check:docs"]], "Run `bun run check:docs` and update the failing documentation example."),
20
20
  gate("api-corpus", [["run", "check:api"]], "Run `bun run gen:api` and review the generated API reference."),
21
21
  gate("cards-corpus", [["run", "check:cards"]], "Run `bun run gen:cards` and review the generated package cards."),
22
- gate("node-outcome-corpus", [["run", "check:node-outcome"]], "Run `bun run gen:node-outcome` and review the generated Node outcome contract."),
22
+ gate("node-outcome-laws", [["run", "check:node-outcome"]], "Run `bun run check:node-outcome` and fix the Node adapter answer that breaks the printed outcome law."),
23
+ gate("vendored-copies", [["run", "check:vendored"]], "Edit the source each refused copy names, never the copy, then run `bun run gen:vendored`."),
23
24
  gate("sitemap", [["run", "check:sitemap"]], "Run `bun run gen:sitemap` and review the generated sitemap."),
24
25
  gate("site", [["run", "check:site"]], "Run `bun run check:site` and fix what the site's production build refuses; the release deploys that build after npm has the packages."),
25
26
  gate("public-manifest", [["run", "check:public-manifest"]], "Run `bun run gen:public` and review the generated public product manifest."),
@@ -31,7 +32,7 @@ const GATES = Object.freeze([
31
32
  ["run", "test:coverage"],
32
33
  ["run", "check:coverage"],
33
34
  ], "Run `bun run test:coverage` first, then `bun run check:coverage`, and fix the reported coverage regression."),
34
- gate("corpus", [["run", "check:corpus"]], "Run `bun run gen:llms`, `bun run gen:api`, and `bun run gen:cards`, then rerun the corpus gate."),
35
+ gate("corpus", [["run", "check:corpus"]], "Run `bun run gen:llms`, `bun run gen:api`, `bun run gen:cards`, and `bun run gen:vendored`, then rerun the corpus gate."),
35
36
  gate("core-performance", [["run", "check:core-performance"]], "Run `bun run check:core-performance` and investigate the measured performance regression.", { workflowRequired: false }),
36
37
  gate("middleware-performance", [["run", "check:middleware-overhead"]], "Run `bun run check:middleware-overhead` and investigate the middleware-chain regression.", { workflowRequired: false }),
37
38
  gate("output-guard-performance", [["run", "check:output-guard"]], "Run `bun run check:output-guard` and investigate the data guard's projection cost.", { workflowRequired: false }),
@@ -67,7 +68,8 @@ const DEFAULT_PLAN = Object.freeze([
67
68
  "docs",
68
69
  "api-corpus",
69
70
  "cards-corpus",
70
- "node-outcome-corpus",
71
+ "node-outcome-laws",
72
+ "vendored-copies",
71
73
  "sitemap",
72
74
  "public-boundary",
73
75
  "public-manifest",
@@ -1 +1 @@
1
- {"version":3,"file":"verification-plan.js","sourceRoot":"","sources":["../src/verification-plan.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAYH,MAAM,IAAI,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AI,CAAC,CAAC,CAAA;IACvC,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAC3E,CAAC;AAED,MAAM,YAAY,GAAG,CAAC,IAAuB,EAAU,EAAE,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAA;AAEjF,4DAA4D;AAC5D,MAAM,UAAU,sBAAsB,CAAC,OAA6B,SAAS;IAC3E,MAAM,KAAK,GAAG,CAAC,6BAA6B,IAAI,EAAE,EAAE,EAAE,CAAC,CAAA;IACvD,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;QAC9D,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,KAAK,CAAC,EAAE,KAAK,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IAC1F,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC"}
@@ -75,7 +75,7 @@
75
75
  "name": "SETUP",
76
76
  "topic": "Nifra - Auth & sessions",
77
77
  "slug": "auth",
78
- "code": "// backend/auth.ts - one session manager, created on first use so the secret is read at request time.\n// Store mode keeps data server-side; cookie mode (no store) is stateless.\nimport { createSessions, MemorySessionStore } from \"@nifrajs/auth\"\n\nlet manager: ReturnType<typeof createSessions> | undefined\nexport const getSessions = () => (manager ??= createSessions({\n secret: process.env.SESSION_SECRET!, // at least 32 bytes; never reuse another signing secret\n store: new MemorySessionStore(), // production: a strongly consistent shared SessionStore\n // cookie: { secure: false }, // local http dev only\n}))"
78
+ "code": "// backend/auth.ts - one session manager, created on first use so the secret is read at request time.\n// Store mode keeps data server-side; cookie mode (no store) is stateless.\nimport { createSessions, MemorySessionStore } from \"@nifrajs/auth\"\n\nlet manager: ReturnType<typeof createSessions> | undefined\nexport const getSessions = () => (manager ??= createSessions({\n secret: process.env.SESSION_SECRET!, // at least 32 bytes; never reuse another signing secret\n store: new MemorySessionStore(), // production: a strongly consistent shared SessionStore\n // identity: [\"userId\", \"orgId\", \"role\"], // the keys that say who the visitor is; unset, all of them\n // cookie: { secure: false }, // local http dev only\n}))"
79
79
  },
80
80
  {
81
81
  "name": "BACKEND",
@@ -185,6 +185,12 @@
185
185
  "slug": "contract",
186
186
  "code": "import { renderPage, unsafeInlineScript } from \"@nifrajs/web\"\n\ndeclare const adapter: import(\"@nifrajs/web\").RenderAdapter\ndeclare const nonce: string // one per response, from your CSP middleware\n\nconst page = renderPage({\n adapter,\n chain: [null],\n data: null,\n clientEntry: \"/assets/client.js\",\n nonce, // reaches the hydration bootstrap, streamed scripts and every island tag\n head: {\n script: [{ content: JSON.stringify({ \"@type\": \"Article\" }) }], // inert: JSON only\n unsafeScript: [unsafeInlineScript(\"window.dataLayer = []\", { nonce })],\n },\n})"
187
187
  },
188
+ {
189
+ "name": "NONCE_CSP_HEADER",
190
+ "topic": "Nifra - Framework contract",
191
+ "slug": "contract",
192
+ "code": "import { createNonceResolver, createWebApp } from \"@nifrajs/web\"\n\ndeclare const adapter: import(\"@nifrajs/web\").RenderAdapter\ndeclare const manifest: import(\"@nifrajs/web\").Manifest\n\n// A fresh nonce on every document, and nifra writes the header from that same value - on pages,\n// status pages, _error, and streamed or deferred documents - whatever rebuilds the Request in front.\nexport const app = createWebApp({\n adapter,\n manifest,\n clientEntry: \"/assets/client.js\",\n nonce: createNonceResolver(),\n // `sources`: 'nonce-…' plus a sha256 hash per constant inline script nifra writes.\n cspHeader: ({ sources }) => `default-src 'self'; script-src 'self' ${sources}; object-src 'none'`,\n})"
193
+ },
188
194
  {
189
195
  "name": "PARAM_404",
190
196
  "topic": "Nifra - Framework contract",
@@ -201,7 +207,7 @@
201
207
  "name": "RESPONSE_CONTROLS",
202
208
  "topic": "Nifra - Framework contract",
203
209
  "slug": "contract",
204
- "code": "// routes/account.backend.ts - response headers and cookies, from a loader or an action.\nimport { t } from \"@nifrajs/schema\"\nimport { type LoaderContext, redirect } from \"@nifrajs/web\"\n\ndeclare function signIn(email: string, password: string): Promise<{ token: string } | null>\n\nexport const loaderOutput = t.object({ plan: t.string() })\nexport const actionOutput = t.object({ error: t.string() })\n\nexport async function loader(ctx: LoaderContext) {\n // Headers land on the rendered document.\n ctx.set.headers[\"cache-control\"] = \"public, max-age=60\"\n ctx.set.headers[\"x-robots-tag\"] = \"noindex\"\n return { plan: \"pro\" }\n}\n\nexport async function action(ctx: LoaderContext) {\n const form = await ctx.request.formData()\n const session = await signIn(String(form.get(\"email\")), String(form.get(\"password\")))\n if (session === null) return { error: \"Wrong email or password\" }\n // HttpOnly; Secure; SameSite=Lax; Path=/ unless the options say otherwise.\n ctx.set.cookie(\"session\", session.token, { maxAge: 60 * 60 * 24 * 7 })\n throw redirect(\"/dashboard\") // the cookie rides the redirect\n}"
210
+ "code": "// routes/account.backend.ts - response headers and cookies, from a loader or an action.\nimport { t } from \"@nifrajs/schema\"\nimport { type LoaderContext, rawHref, redirect } from \"@nifrajs/web\"\n\ndeclare function signIn(email: string, password: string): Promise<{ token: string } | null>\n\nexport const loaderOutput = t.object({ plan: t.string() })\nexport const actionOutput = t.object({ error: t.string() })\n\nexport async function loader(ctx: LoaderContext) {\n // Headers land on the rendered document.\n ctx.set.headers[\"cache-control\"] = \"public, max-age=60\"\n ctx.set.headers[\"x-robots-tag\"] = \"noindex\"\n return { plan: \"pro\" }\n}\n\nexport async function action(ctx: LoaderContext) {\n const form = await ctx.request.formData()\n const session = await signIn(String(form.get(\"email\")), String(form.get(\"password\")))\n if (session === null) return { error: \"Wrong email or password\" }\n // HttpOnly; Secure; SameSite=Lax; Path=/ unless the options say otherwise.\n ctx.set.cookie(\"session\", session.token, { maxAge: 60 * 60 * 24 * 7 })\n throw redirect(rawHref(\"/dashboard\")) // the cookie rides the redirect\n}"
205
211
  },
206
212
  {
207
213
  "name": "REUSABLE_ROUTER",
@@ -231,7 +237,13 @@
231
237
  "name": "FULL_APP",
232
238
  "topic": "Nifra - Custom server (createWebApp)",
233
239
  "slug": "custom-server",
234
- "code": "import { fileURLToPath } from \"node:url\"\nimport { createCspPolicy, createWebApp, servePublicDir } from \"@nifrajs/web\"\nimport type { Manifest, RenderAdapter } from \"@nifrajs/web\"\n\n// From your build: the framework adapter, the route manifest, and what buildClient() returned.\ndeclare const adapter: RenderAdapter\ndeclare const manifest: Manifest\ndeclare const build: {\n readonly entry: string\n readonly assets: readonly string[]\n readonly routes: Readonly<Record<string, readonly string[]>>\n readonly css?: readonly string[]\n}\ndeclare const errors: { capture(error: unknown, tags: Record<string, string>): void }\n\n// buildClient({ outDir: \"dist/assets\" }) writes the chunks where their /assets/ URLs point.\nconst bundle = servePublicDir({\n dir: fileURLToPath(new URL(\"./dist/\", import.meta.url)),\n hashedFiles: new Set(build.assets),\n})\nconst publicFiles = servePublicDir({ dir: fileURLToPath(new URL(\"./public/\", import.meta.url)) })\n\nconst csp = createCspPolicy({\n header: ({ sources }) => `default-src 'self'; script-src 'self' ${sources}; object-src 'none'`,\n})\n\nexport const app = createWebApp({\n adapter,\n manifest,\n clientEntry: build.entry,\n routePreload: build.routes,\n styles: build.css ?? [],\n csp,\n server: { requestTimeoutMs: 15_000, gracefulSignals: { drainMs: 8_000 } },\n use: (app) => {\n app.onRequest(async (request) => (await bundle(request)) ?? (await publicFiles(request)))\n },\n onLoaderError: (error, { route }) => errors.capture(error, { route }),\n})\n\napp.listen(3000)"
240
+ "code": "import { ONE_DAY, serveStatic } from \"@nifrajs/core/serve-static\"\nimport { createCspPolicy, createWebApp } from \"@nifrajs/web\"\nimport type { Manifest, RenderAdapter } from \"@nifrajs/web\"\n\n// From your build: the framework adapter, the route manifest, and what buildClient() returned.\ndeclare const adapter: RenderAdapter\ndeclare const manifest: Manifest\ndeclare const build: {\n readonly entry: string\n readonly assets: readonly string[]\n readonly routes: Readonly<Record<string, readonly string[]>>\n readonly css?: readonly string[]\n}\ndeclare const errors: { capture(error: unknown, tags: Record<string, string>): void }\n\n// buildClient({ outDir: \"dist/assets\" }) writes the chunks where their /assets/ URLs point.\nconst files = serveStatic([\n { dir: new URL(\"./dist/assets/\", import.meta.url), hashedFiles: build.assets, cacheControl: ONE_DAY },\n {\n dir: new URL(\"./public/\", import.meta.url),\n prefix: \"/\",\n immutable: false,\n cacheControl: ONE_DAY,\n fallthrough: true,\n },\n])\n\nconst csp = createCspPolicy({\n header: ({ sources }) => `default-src 'self'; script-src 'self' ${sources}; object-src 'none'`,\n})\n\nexport const app = createWebApp({\n adapter,\n manifest,\n clientEntry: build.entry,\n routePreload: build.routes,\n styles: build.css ?? [],\n csp,\n server: { requestTimeoutMs: 15_000, gracefulSignals: { drainMs: 8_000 } },\n onLoaderError: (error, { route }) => errors.capture(error, { route }),\n})\n\napp.listen(3000, { static: files })"
241
+ },
242
+ {
243
+ "name": "HASHED_FONTS",
244
+ "topic": "Nifra - Custom server (createWebApp)",
245
+ "slug": "custom-server",
246
+ "code": "import { ONE_DAY, serveStatic } from \"@nifrajs/core/serve-static\"\n\n// The fonts loadGoogleFont wrote into public/fonts/ are content-hashed; the rest of public/ is not.\nconst HASHED_FONT = /^\\/fonts\\/[\\w-]+-[0-9a-f]{16}\\.woff2$/\n\nexport const publicFiles = serveStatic({\n dir: new URL(\"./public/\", import.meta.url),\n prefix: \"/\",\n hashedFiles: [HASHED_FONT],\n cacheControl: ONE_DAY,\n fallthrough: true,\n})"
235
247
  },
236
248
  {
237
249
  "name": "ACTION",
@@ -369,7 +381,7 @@
369
381
  "name": "GUARD",
370
382
  "topic": "Nifra - i18n",
371
383
  "slug": "i18n",
372
- "code": "// routes/[lang]/_layout.backend.ts - 404 unknown and draft locales, redirect /en/... to /...\nimport { defineLocales } from \"@nifrajs/i18n\"\nimport { defineI18nRouting } from \"@nifrajs/i18n/routing\"\nimport { notFound, type RouteMiddleware, redirect } from \"@nifrajs/web\"\n\nconst urls = defineI18nRouting(\n defineLocales({ default: \"en\", locales: { en: {}, hi: {}, gu: { draft: true } } }),\n)\n\nexport const middleware: RouteMiddleware = (ctx) => {\n const { pathname, search } = new URL(ctx.request.url)\n const match = urls.matchSegment(ctx.params.lang, pathname + search)\n if (match.kind === \"not-found\") notFound()\n if (match.kind === \"redirect\") return redirect(match.location, { status: 308 })\n return undefined\n}"
384
+ "code": "// routes/[lang]/_layout.backend.ts - 404 unknown and draft locales, redirect /en/... to /...\nimport { defineLocales } from \"@nifrajs/i18n\"\nimport { defineI18nRouting } from \"@nifrajs/i18n/routing\"\nimport { notFound, type RouteMiddleware, rawHref, redirect } from \"@nifrajs/web\"\n\nconst urls = defineI18nRouting(\n defineLocales({ default: \"en\", locales: { en: {}, hi: {}, gu: { draft: true } } }),\n)\n\nexport const middleware: RouteMiddleware = (ctx) => {\n const { pathname, search } = new URL(ctx.request.url)\n const match = urls.matchSegment(ctx.params.lang, pathname + search)\n if (match.kind === \"not-found\") notFound()\n if (match.kind === \"redirect\") return redirect(rawHref(match.location), { status: 308 })\n return undefined\n}"
373
385
  },
374
386
  {
375
387
  "name": "LOCALES",
@@ -383,12 +395,24 @@
383
395
  "slug": "i18n",
384
396
  "code": "// routes/index.backend.ts - resolve the locale + return only that catalog's messages.\nimport { negotiateLocale } from \"@nifrajs/i18n\"\nimport { t } from \"@nifrajs/schema\"\nimport { catalogs, locales } from \"../shared/catalogs\"\nimport type { Route } from \"./+types/index\"\n\n// A catalog is open-ended, so its schema is the explicit opt-out of the strict default.\nexport const loaderOutput = t.object({ locale: t.string(), messages: t.looseObject({}) })\nexport async function loader({ request }: Route.LoaderArgs) {\n const locale = negotiateLocale(request, { locales, defaultLocale: \"en\", queryParam: \"lang\", cookie: \"lang\" })\n return { locale, messages: catalogs[locale] } // ?lang= → cookie → Accept-Language → default\n}"
385
397
  },
398
+ {
399
+ "name": "TRANSLATED_PATHNAMES",
400
+ "topic": "Nifra - i18n",
401
+ "slug": "i18n",
402
+ "code": "// shared/i18n.ts - explicit STATIC pathname translations, not content or dynamic slug translation.\nimport { defineLocales } from \"@nifrajs/i18n\"\nimport { defineI18nRouting } from \"@nifrajs/i18n/routing\"\n\nconst locales = defineLocales({ default: \"en\", locales: { en: {}, fr: {}, de: {} } })\nexport const urls = defineI18nRouting(locales, {\n pathnames: {\n \"/about\": { fr: \"/a-propos\", de: \"/ueber-uns\" },\n \"/contact\": { fr: \"/contactez-nous\" }, // Missing German name; availability is separate below.\n },\n // Always the canonical key, even when the incoming URL is /fr/contactez-nous.\n pageLocales: (path) => path === \"/contact\" ? [\"en\", \"fr\"] : undefined,\n})\n\nurls.localizePathname(\"/about\", \"fr\") // \"/fr/a-propos\"\nurls.localizePathname(\"/fr/a-propos\", \"de\") // \"/de/ueber-uns\"\nurls.unlocalizePathname(\"/de/ueber-uns\") // { locale: \"de\", pathname: \"/about\" }\nurls.alternates(\"/fr/a-propos\").canonical // \"/fr/a-propos\"\nurls.staticPathnames() // [\"/about\", \"/fr/a-propos\", \"/de/ueber-uns\", \"/contact\", \"/fr/contactez-nous\"]"
403
+ },
386
404
  {
387
405
  "name": "DIMENSIONS",
388
406
  "topic": "Nifra - images",
389
407
  "slug": "images",
390
408
  "code": "import { imageDimensions, readImageDimensions } from \"@nifrajs/image\"\n\n// Pure-JS header read - PNG / JPEG / GIF / WebP. No decode, no codec, no deps.\nconst info = await readImageDimensions(Bun.file(\"public/hero.jpg\"))\n// → { width: 1200, height: 630, format: \"jpeg\" } (null if unrecognized)\n\n// Build-time tooling: pre-read sizes into a manifest so <Image> is CLS-safe\n// without hardcoding width/height at every call site. The sync variant takes the\n// raw header bytes you already have in memory (no file read):\nconst headerBytes = await Bun.file(\"public/hero.jpg\").bytes()\nimageDimensions(headerBytes)"
391
409
  },
410
+ {
411
+ "name": "IMPORT_PLUGINS",
412
+ "topic": "Nifra - images",
413
+ "slug": "images",
414
+ "code": "// backend/framework.ts — add these beside your existing framework plugins:\nimport { imageBunPlugin } from \"@nifrajs/image/plugins\"\n\nconst images = { root: process.cwd() }\nexport const clientPlugins = [imageBunPlugin(images)]\nexport const serverPlugins = [imageBunPlugin(images)]\n\n// For the Vite pipeline instead (including component mode):\n// import { imageVitePlugin } from \"@nifrajs/image/plugins\"\n// export const vitePlugins = [imageVitePlugin(images)]"
415
+ },
392
416
  {
393
417
  "name": "LOADERS",
394
418
  "topic": "Nifra - images",
@@ -475,19 +499,19 @@
475
499
  },
476
500
  {
477
501
  "name": "BACKEND",
478
- "topic": "Nifra - Partial prerendering (experimental)",
502
+ "topic": "Nifra - Partial prerendering",
479
503
  "slug": "partial-prerendering",
480
504
  "code": "import { t } from \"@nifrajs/schema\"\nimport type { BoundaryRequestCtx } from \"@nifrajs/web\"\nimport { defineShellLoader } from \"@nifrajs/web/ppr\"\nimport type { Route } from \"./+types/[id]\"\n\nconst titles: Readonly<Record<string, string>> = { \"1\": \"Sencha\", \"2\": \"Hojicha\" }\nconst cartCount = (request: Request): number => (request.headers.has(\"cookie\") ? 2 : 0)\n\n// The shell: no request, no cookies. It is built once and shared by every visitor.\nexport const shellLoader = defineShellLoader(async ({ params }) => ({\n title: titles[params.id ?? \"\"] ?? \"Tea\",\n}))\nexport const shellOutput = t.object({ title: t.string() })\nexport const revalidate = 60\nexport const revalidateTags = [\"catalog\"]\nexport const shellVariations = { search: { size: [\"50g\", \"100g\"] } }\n\n// The holes: each runs per request, under its own deadline.\nexport const boundaryLoaders = {\n cart: {\n load: (ctx: BoundaryRequestCtx) => ({ count: cartCount(ctx.request) }),\n output: t.object({ count: t.number() }),\n },\n} satisfies Route.BoundaryLoaders"
481
505
  },
482
506
  {
483
507
  "name": "SERVER",
484
- "topic": "Nifra - Partial prerendering (experimental)",
508
+ "topic": "Nifra - Partial prerendering",
485
509
  "slug": "partial-prerendering",
486
- "code": "import { createCspPolicy, createWebApp } from \"@nifrajs/web\"\nimport { discoverRoutes } from \"@nifrajs/web/fs\"\nimport { compileShells, partialPrerendering } from \"@nifrajs/web/ppr\"\nimport { reactAdapter } from \"@nifrajs/web-react\"\n\nconst routesDir = \"./routes\"\nconst manifest = discoverRoutes(routesDir)\n// The content-hashed client entry from your build; a shell check record is valid for it only.\nconst clientEntry = \"/assets/entry-4c5ndncr.js\"\n\n// Fails a route whose shell reaches a module that reads the visitor. That route renders whole.\nconst shellChecks = await compileShells({\n routesDir,\n manifest,\n deployment: clientEntry,\n requestScoped: (file) => file.endsWith(\"/lib/session.ts\"),\n onFailure: (routeId, error) => console.warn(routeId, error),\n})\n\nexport const app = createWebApp({\n adapter: reactAdapter,\n manifest,\n clientEntry,\n // Hashes, not a nonce: a shell is one document for every visitor.\n csp: createCspPolicy({\n header: ({ sources }) => `script-src 'self' ${sources}; object-src 'none'; base-uri 'none'`,\n }),\n experimental: {\n ppr: partialPrerendering({ shellChecks, origin: \"https://shop.example\" }),\n },\n})"
510
+ "code": "import { createCspPolicy, createWebApp } from \"@nifrajs/web\"\nimport { discoverRoutes } from \"@nifrajs/web/fs\"\nimport { compileShells, partialPrerendering } from \"@nifrajs/web/ppr\"\nimport { reactAdapter } from \"@nifrajs/web-react\"\n\nconst routesDir = \"./routes\"\nconst manifest = discoverRoutes(routesDir)\n// The content-hashed client entry from your build; a shell check record is valid for it only.\nconst clientEntry = \"/assets/entry-4c5ndncr.js\"\n\n// Fails a route whose shell reaches a module that reads the visitor. That route renders whole.\nconst shellChecks = await compileShells({\n routesDir,\n manifest,\n deployment: clientEntry,\n requestScoped: (file) => file.endsWith(\"/lib/session.ts\"),\n onFailure: (routeId, error) => console.warn(routeId, error),\n})\n\nexport const app = createWebApp({\n adapter: reactAdapter,\n manifest,\n clientEntry,\n // Hashes, not a nonce: a shell is one document for every visitor.\n csp: createCspPolicy({\n header: ({ sources }) => `script-src 'self' ${sources}; object-src 'none'; base-uri 'none'`,\n }),\n ppr: partialPrerendering({ shellChecks, origin: \"https://shop.example\" }),\n})"
487
511
  },
488
512
  {
489
513
  "name": "SHARED_BACKEND",
490
- "topic": "Nifra - Partial prerendering (experimental)",
514
+ "topic": "Nifra - Partial prerendering",
491
515
  "slug": "partial-prerendering",
492
516
  "code": "import { t } from \"@nifrajs/schema\"\nimport type { ShellCtx } from \"@nifrajs/web\"\nimport type { Route } from \"./+types/[id]\"\n\nconst prices: Readonly<Record<string, string>> = { \"1\": \"$12.00\", \"2\": \"$9.50\" }\n\nexport const boundaryLoaders = {\n // Inline, with revalidate: the build checks this loader with the shell, so its frame is stored.\n price: {\n load: async ({ params }: ShellCtx) => ({ amount: prices[params.id ?? \"\"] ?? \"-\" }),\n output: t.object({ amount: t.string() }),\n revalidate: 10,\n revalidateTags: ({ params }) => [`price:${params.id}`],\n },\n} satisfies Route.BoundaryLoaders"
493
517
  },
@@ -497,6 +521,12 @@
497
521
  "slug": "plugins",
498
522
  "code": "import { server } from \"@nifrajs/core/server\"\nimport { cache, MemoryResponseCache, prettyJson } from \"@nifrajs/middleware\"\n\n// Full response cache: pluggable store, Vary-aware keys, byte cap. Bypasses Set-Cookie and respects\n// Cache-Control (no-store/private). MemoryResponseCache is per-instance - refuses prod unless opted in.\nconst app = server()\napp.use(cache({ store: new MemoryResponseCache(), ttlMs: 30_000, vary: [\"accept-language\"] }))\napp.use(prettyJson()) // pretty-print JSON responses (size-capped; optional ?pretty query toggle)"
499
523
  },
524
+ {
525
+ "name": "GROUPED_TIERS",
526
+ "topic": "Nifra - Plugins & middleware",
527
+ "slug": "plugins",
528
+ "code": "import { server } from \"@nifrajs/core/server\"\nimport { MemoryStore, rateLimitTiers } from \"@nifrajs/middleware\"\n\nconst store = new MemoryStore()\nconst limiter = rateLimitTiers({\n store,\n floor: { max: 120, windowMs: 60_000 },\n tiers: [\n // One 30/min allowance across all three, not 30 each. The name is the bucket's\n // store scope, so adding or removing a prefix later keeps the live counters.\n {\n name: \"exports\",\n prefix: [\"/api/exports\", \"/api/reports/download\", \"/api/invoices/pdf\"],\n max: 30,\n windowMs: 60_000,\n },\n ],\n})\nconst app = server().use(limiter)\n\n// The store key a request is charged to, for a test or an ops tool: \"tier:exports:<ip>\".\nconst key = await limiter.keyOf(new Request(\"http://x/api/exports/csv\"), { clientIp: \"203.0.113.9\" })\nif (key !== undefined) await store.hit(key, 60_000) // pre-spend one hit"
529
+ },
500
530
  {
501
531
  "name": "IDENTITY",
502
532
  "topic": "Nifra - Plugins & middleware",
@@ -545,6 +575,12 @@
545
575
  "slug": "plugins",
546
576
  "code": "import { server } from \"@nifrajs/core/server\"\nimport { idempotency, MemoryIdempotencyStore } from \"@nifrajs/middleware\"\n\n// A retried POST with the same Idempotency-Key replays the first response instead of\n// re-running the side effect. Shared store in production (atomic claim); dev-only memory store.\nconst app = server()\napp.use(idempotency({ store: new MemoryIdempotencyStore() }))"
547
577
  },
578
+ {
579
+ "name": "REQUEST_LOCALS",
580
+ "topic": "Nifra - Plugins & middleware",
581
+ "slug": "plugins",
582
+ "code": "import { carryRequestLocals, requestLocal, server } from \"@nifrajs/core/server\"\n\n// One slot per value. A WeakMap<Request, T> would lose it at the first copy of the request.\nconst requestId = requestLocal<string>()\n\nconst billing = server().get(\"/invoices\", (c) => ({ requestId: requestId.get(c.req) }))\n\nexport const app = server()\n .onRequest((req) => {\n requestId.set(req, req.headers.get(\"x-request-id\") ?? crypto.randomUUID())\n })\n // The child sees a copy of the request with /billing stripped, and reads the same value.\n .mount({ path: \"/billing\", app: billing, stripPrefix: true })\n\n// A wrapper that rebuilds the request carries the values itself. It keeps the host, which the\n// same-origin check on a form POST compares with the browser's Origin.\nexport const fetch = (req: Request): Response | Promise<Response> => {\n const url = new URL(req.url)\n if (!url.pathname.startsWith(\"/v1/\")) return app.fetch(req)\n url.pathname = url.pathname.slice(\"/v1\".length)\n const rebuilt = new Request(url.href, req)\n carryRequestLocals(req, rebuilt)\n return app.fetch(rebuilt)\n}"
583
+ },
548
584
  {
549
585
  "name": "SESSION_TIERS",
550
586
  "topic": "Nifra - Plugins & middleware",
@@ -609,7 +645,7 @@
609
645
  "name": "MIDDLEWARE",
610
646
  "topic": "Nifra - Routing",
611
647
  "slug": "routing",
612
- "code": "// routes/account/_layout.backend.ts - runs before every page under /account\nimport { type RouteMiddleware, redirect } from \"@nifrajs/web\"\n\nexport const middleware: RouteMiddleware = ({ request, set }) => {\n set.headers[\"cache-control\"] = \"private, no-store\"\n const signedIn = request.headers.get(\"cookie\")?.includes(\"session=\") ?? false\n return signedIn ? undefined : redirect(\"/login\")\n}"
648
+ "code": "// routes/account/_layout.backend.ts - runs before every page under /account\nimport { type RouteMiddleware, rawHref, redirect } from \"@nifrajs/web\"\n\nexport const middleware: RouteMiddleware = ({ request, set }) => {\n set.headers[\"cache-control\"] = \"private, no-store\"\n const signedIn = request.headers.get(\"cookie\")?.includes(\"session=\") ?? false\n return signedIn ? undefined : redirect(rawHref(\"/login\"))\n}"
613
649
  },
614
650
  {
615
651
  "name": "ROUTE_BACKEND",
@@ -617,6 +653,12 @@
617
653
  "slug": "routing",
618
654
  "code": "// routes/users/[id].backend.ts - its server half\nimport { t } from \"@nifrajs/schema\"\nimport type { Route } from \"./+types/[id]\"\n\nexport const loaderOutput = t.object({ name: t.string() })\n\nexport async function loader({ params }: Route.LoaderArgs) {\n return { name: `User ${params.id}` }\n}"
619
655
  },
656
+ {
657
+ "name": "OPTIONS",
658
+ "topic": "Nifra - Runtime differences",
659
+ "slug": "runtime-differences",
660
+ "code": "import { server } from \"@nifrajs/core\"\nimport { serve } from \"@nifrajs/node\"\n\n// Deno (and Bun's Host handling): the Host header and the request target are checked and resolved.\nconst app = server({ validateHost: true, normalizeTarget: true })\n\n// Node: the adapter has the same normalizeTarget switch.\nawait serve(app, { port: 3000, normalizeTarget: true })"
661
+ },
620
662
  {
621
663
  "name": "BOUNDED",
622
664
  "topic": "Nifra - security & hardening",