@nifrajs/cli 5.5.1 → 5.6.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.
- package/CHANGELOG.md +155 -0
- package/dist/cdn-check.d.ts +7 -6
- package/dist/cdn-check.d.ts.map +1 -1
- package/dist/cdn-check.js +13 -1
- package/dist/cdn-check.js.map +1 -1
- package/dist/check-diagnostics.d.ts.map +1 -1
- package/dist/check-diagnostics.js +5 -3
- package/dist/check-diagnostics.js.map +1 -1
- package/dist/check-scan.d.ts.map +1 -1
- package/dist/check-scan.js +29 -2
- package/dist/check-scan.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +14 -5
- package/dist/cli.js.map +1 -1
- package/dist/command-catalog.d.ts +14 -1
- package/dist/command-catalog.d.ts.map +1 -1
- package/dist/command-catalog.js +93 -0
- package/dist/command-catalog.js.map +1 -1
- package/dist/doctor.d.ts +9 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +52 -0
- package/dist/doctor.js.map +1 -1
- package/dist/fix-recipes.d.ts.map +1 -1
- package/dist/fix-recipes.js +27 -0
- package/dist/fix-recipes.js.map +1 -1
- package/dist/frontend-guidance.d.ts +1 -1
- package/dist/frontend-guidance.d.ts.map +1 -1
- package/dist/frontend-guidance.js +17 -8
- package/dist/frontend-guidance.js.map +1 -1
- package/dist/introspect.js +1 -1
- package/dist/introspect.js.map +1 -1
- package/dist/load.d.ts +4 -1
- package/dist/load.d.ts.map +1 -1
- package/dist/load.js +8 -0
- package/dist/load.js.map +1 -1
- package/dist/mcp-exec.d.ts.map +1 -1
- package/dist/mcp-exec.js +57 -3
- package/dist/mcp-exec.js.map +1 -1
- package/dist/mcp-http.d.ts +2 -1
- package/dist/mcp-http.d.ts.map +1 -1
- package/dist/mcp-http.js +3 -2
- package/dist/mcp-http.js.map +1 -1
- package/dist/mcp-tool-meta.d.ts +21 -0
- package/dist/mcp-tool-meta.d.ts.map +1 -0
- package/dist/mcp-tool-meta.js +246 -0
- package/dist/mcp-tool-meta.js.map +1 -0
- package/dist/mcp.d.ts +3 -2
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +36 -98
- package/dist/mcp.js.map +1 -1
- package/dist/output-schemas.d.ts +8 -0
- package/dist/output-schemas.d.ts.map +1 -1
- package/dist/output-schemas.js +14 -0
- package/dist/output-schemas.js.map +1 -1
- package/dist/ppr-read-fix.d.ts +8 -0
- package/dist/ppr-read-fix.d.ts.map +1 -0
- package/dist/ppr-read-fix.js +356 -0
- package/dist/ppr-read-fix.js.map +1 -0
- package/dist/recipes/5.6.0.d.ts +10 -0
- package/dist/recipes/5.6.0.d.ts.map +1 -0
- package/dist/recipes/5.6.0.js +68 -0
- package/dist/recipes/5.6.0.js.map +1 -0
- package/dist/recipes/index.d.ts.map +1 -1
- package/dist/recipes/index.js +2 -0
- package/dist/recipes/index.js.map +1 -1
- package/dist/review.d.ts.map +1 -1
- package/dist/review.js +7 -2
- package/dist/review.js.map +1 -1
- package/dist/rules/codes.d.ts +8 -3
- package/dist/rules/codes.d.ts.map +1 -1
- package/dist/rules/codes.js +9 -4
- package/dist/rules/codes.js.map +1 -1
- package/dist/rules/explanations.d.ts.map +1 -1
- package/dist/rules/explanations.js +39 -13
- package/dist/rules/explanations.js.map +1 -1
- package/dist/rules/islands.d.ts +91 -0
- package/dist/rules/islands.d.ts.map +1 -1
- package/dist/rules/islands.js +757 -3
- package/dist/rules/islands.js.map +1 -1
- package/dist/rules/ppr.d.ts +16 -0
- package/dist/rules/ppr.d.ts.map +1 -0
- package/dist/rules/ppr.js +114 -0
- package/dist/rules/ppr.js.map +1 -0
- package/dist/rules/swap.d.ts +7 -0
- package/dist/rules/swap.d.ts.map +1 -0
- package/dist/rules/swap.js +338 -0
- package/dist/rules/swap.js.map +1 -0
- package/dist/scaffold-hole.d.ts +105 -0
- package/dist/scaffold-hole.d.ts.map +1 -0
- package/dist/scaffold-hole.js +688 -0
- package/dist/scaffold-hole.js.map +1 -0
- package/dist/scaffold.d.ts +5 -3
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/scaffold.js +56 -46
- package/dist/scaffold.js.map +1 -1
- package/dist/verification-plan.d.ts.map +1 -1
- package/dist/verification-plan.js +12 -1
- package/dist/verification-plan.js.map +1 -1
- package/dist/web-app-options.d.ts +1 -1
- package/dist/web-app-options.d.ts.map +1 -1
- package/dist/web-app-options.js.map +1 -1
- package/docs/examples.json +63 -9
- package/docs/llms-full.txt +2060 -430
- package/docs/types.json +1300 -270
- package/package.json +11 -11
- package/src/cdn-check.ts +21 -7
- package/src/check-diagnostics.ts +5 -3
- package/src/check-scan.ts +34 -3
- package/src/cli.ts +14 -5
- package/src/command-catalog.ts +126 -0
- package/src/doctor.ts +44 -1
- package/src/fix-recipes.ts +28 -0
- package/src/frontend-guidance.ts +20 -8
- package/src/introspect.ts +1 -1
- package/src/load.ts +13 -0
- package/src/mcp-exec.ts +74 -3
- package/src/mcp-http.ts +3 -2
- package/src/mcp-tool-meta.ts +268 -0
- package/src/mcp.ts +35 -99
- package/src/output-schemas.ts +28 -0
- package/src/ppr-read-fix.ts +426 -0
- package/src/recipes/5.6.0.ts +69 -0
- package/src/recipes/index.ts +2 -0
- package/src/review.ts +7 -2
- package/src/rules/codes.ts +9 -4
- package/src/rules/explanations.ts +39 -13
- package/src/rules/islands.ts +875 -3
- package/src/rules/ppr.ts +143 -0
- package/src/rules/swap.ts +402 -0
- package/src/scaffold-hole.ts +880 -0
- package/src/scaffold.ts +60 -49
- package/src/verification-plan.ts +20 -1
- package/src/web-app-options.ts +1 -0
- package/dist/rules/nano.d.ts +0 -6
- package/dist/rules/nano.d.ts.map +0 -1
- package/dist/rules/nano.js +0 -273
- package/dist/rules/nano.js.map +0 -1
- package/src/rules/nano.ts +0 -307
|
@@ -118,20 +118,10 @@ export const RULE_EXPLANATIONS: Readonly<Record<BuiltInCode, RuleExplanation>> =
|
|
|
118
118
|
fix: "Return a function that removes the listener.",
|
|
119
119
|
docs: "/docs/islands",
|
|
120
120
|
},
|
|
121
|
-
"NF-C021": {
|
|
122
|
-
why: "A nano binding's returned disposer is discarded, so the binding outlives its component and leaks on soft navigation.",
|
|
123
|
-
fix: "Collect the disposer and call it on teardown.",
|
|
124
|
-
docs: "/docs/nano",
|
|
125
|
-
},
|
|
126
121
|
"NF-C022": {
|
|
127
|
-
why: "bindList
|
|
128
|
-
fix: "Key each item by a stable id.",
|
|
129
|
-
docs: "/docs/
|
|
130
|
-
},
|
|
131
|
-
"NF-C023": {
|
|
132
|
-
why: "A computed or effect reads a signal its deps array does not list, so it does not update when that signal changes.",
|
|
133
|
-
fix: "Add the missing signals to the deps array.",
|
|
134
|
-
docs: "/docs/nano",
|
|
122
|
+
why: "A bindList key reads the item's position (a second parameter, which bindList never passes, or an indexOf/findIndex call handed the item), so adding, removing or reordering items hands a node and its state to the wrong item.",
|
|
123
|
+
fix: "Key each item by a stable id on the item.",
|
|
124
|
+
docs: "/docs/islands",
|
|
135
125
|
},
|
|
136
126
|
"NF-C024": {
|
|
137
127
|
why: "Two route patterns match a common path (the finding shows one), so one shadows the other for some requests.",
|
|
@@ -253,6 +243,42 @@ export const RULE_EXPLANATIONS: Readonly<Record<BuiltInCode, RuleExplanation>> =
|
|
|
253
243
|
fix: "Install one version everywhere: align the ranges in every install root that carries a copy, or for nifra packages run `nifra upgrade <version>` in this app and in the linked repository, then install in each.",
|
|
254
244
|
docs: "/docs/troubleshooting",
|
|
255
245
|
},
|
|
246
|
+
"NF-C047": {
|
|
247
|
+
why: 'A data-bind-* attribute inside an island host names a signal its bindIsland setup never declares with state("..."), or a handler the setup does not return. At runtime the binding is skipped with a console warning, so the markup never updates or never reacts.',
|
|
248
|
+
fix: 'Fix the name in the markup, or declare it in the setup: state("name", initial) for a signal, a returned handler for data-bind-on.',
|
|
249
|
+
docs: "/docs/islands",
|
|
250
|
+
},
|
|
251
|
+
"NF-C048": {
|
|
252
|
+
why: "A data-bind-* attribute sits outside every data-island host, or inside a host mounted with defineIsland or a plain enhancer. Only bindIsland walks bindings, so this one never binds.",
|
|
253
|
+
fix: "Move the element inside a host mounted with bindIsland, or mount that host with bindIsland. A binding inside a data-swap-slot belongs to an island inside that slot, which a swap mounts again.",
|
|
254
|
+
docs: "/docs/islands",
|
|
255
|
+
},
|
|
256
|
+
"NF-C049": {
|
|
257
|
+
why: "A data-swap attribute sits on an element other than <a href> or <form>, its value is not replace:<slot> or append:<slot>, or it is in JSX, where no page can answer a slot swap. The link or form behaves as if the attribute were not there.",
|
|
258
|
+
fix: "Put data-swap on a link with an href or on a form, write replace:<slot> or append:<slot>, and render the page with @nifrajs/web-vanilla.",
|
|
259
|
+
docs: "/docs/islands",
|
|
260
|
+
},
|
|
261
|
+
"NF-C050": {
|
|
262
|
+
why: "A data-swap link or form names a slot that no data-swap-slot element in the project declares, so there is nothing to swap and every click loads the page normally.",
|
|
263
|
+
fix: 'Fix the slot name, or mark the region to refresh with data-swap-slot="<name>" and render its content with slot("<name>", ...).',
|
|
264
|
+
docs: "/docs/islands",
|
|
265
|
+
},
|
|
266
|
+
"NF-C051": {
|
|
267
|
+
why: 'A data-swap-slot element must hold slot("<name>", ...) and nothing else: the server answers a swap with what slot() renders and the client replaces the whole element content with it. Content beside it is lost on the first swap; without it, the server has nothing to answer with; a slot() outside its element swaps nothing.',
|
|
268
|
+
fix: 'Make slot("<name>", content) the only content of the element marked data-swap-slot="<name>", and move anything else outside it.',
|
|
269
|
+
docs: "/docs/islands",
|
|
270
|
+
},
|
|
271
|
+
"NF-C052": {
|
|
272
|
+
why: "A data-swap link or form goes to a page whose module and layouts render no slot() of the name it swaps, so the server answers with the whole document and every swap loads the page normally.",
|
|
273
|
+
fix: "Point the link or form at the page that renders the slot, or render the slot in that page.",
|
|
274
|
+
docs: "/docs/islands",
|
|
275
|
+
},
|
|
276
|
+
"NF-C053": {
|
|
277
|
+
why: "A page whose backend half exports shellLoader calls getContext() or tryGetContext(). Its shell is built once and served to every visitor, so the shell check refuses a page that reads the request.",
|
|
278
|
+
fix: "Read the request in a dynamic hole's loader, and render what uses it in that hole. The fix moves a read held in one const, and the one element that uses it, into a new hole.",
|
|
279
|
+
command: "nifra fix --code NF-C053",
|
|
280
|
+
docs: "/docs/partial-prerendering",
|
|
281
|
+
},
|
|
256
282
|
"NF-D001": {
|
|
257
283
|
why: "The doctor gate of `nifra assure` found an undeclared import or a package installed more than once.",
|
|
258
284
|
fix: "Run `nifra doctor` for the details and the fix of each finding.",
|