@emeryld/rrroutes-contract 2.7.13 → 2.8.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/README.md +5 -5
- package/dist/index.cjs +9 -1364
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +8 -1337
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -10
- package/bin/rrroutes-export-finalized-leaves.mjs +0 -14
- package/dist/export/defaultViewerTemplate.d.ts +0 -1
- package/dist/export/exportFinalizedLeaves.cli.d.ts +0 -14
- package/dist/export/exportFinalizedLeaves.d.ts +0 -62
- package/dist/export/extractLeafSourceByAst.d.ts +0 -38
- package/dist/export/flattenSchema.d.ts +0 -12
- package/dist/export/index.d.ts +0 -7
- package/dist/export/schemaIntrospection.d.ts +0 -47
- package/dist/export/serializeLeafContract.d.ts +0 -31
- package/tools/finalized-leaves-viewer.html +0 -1546
package/README.md
CHANGED
|
@@ -318,7 +318,7 @@ You can export finalized leaves (plus flattened schema paths) to strict JSON.
|
|
|
318
318
|
From the repo root:
|
|
319
319
|
|
|
320
320
|
```sh
|
|
321
|
-
pnpm --filter @emeryld/rrroutes-
|
|
321
|
+
pnpm --filter @emeryld/rrroutes-export export:finalized-leaves -- \
|
|
322
322
|
--module ./path/to/contract-module.ts \
|
|
323
323
|
--export registry \
|
|
324
324
|
--out ./finalized-leaves.export.json \
|
|
@@ -374,7 +374,7 @@ export const leaves = resource('/v1')
|
|
|
374
374
|
If you want to run this in code instead of CLI:
|
|
375
375
|
|
|
376
376
|
```ts
|
|
377
|
-
import { exportFinalizedLeaves } from '@emeryld/rrroutes-
|
|
377
|
+
import { exportFinalizedLeaves } from '@emeryld/rrroutes-export'
|
|
378
378
|
|
|
379
379
|
const payload = await exportFinalizedLeaves(registry, {
|
|
380
380
|
outFile: './finalized-leaves.export.json',
|
|
@@ -406,7 +406,7 @@ Use `viewerTemplateFile` when you want your own branded/layout HTML while still
|
|
|
406
406
|
Behavior:
|
|
407
407
|
|
|
408
408
|
- If omitted, RRRoutes uses the bundled `finalized-leaves-viewer.html` template.
|
|
409
|
-
- Resolution order: package-bundled viewer, then local repo paths (`tools/...`, `packages/
|
|
409
|
+
- Resolution order: package-bundled viewer, then local repo paths (`tools/...`, `packages/export/tools/...`), then built-in string fallback.
|
|
410
410
|
- If provided, RRRoutes reads your template and injects a script like:
|
|
411
411
|
- `window.__FINALIZED_LEAVES_PAYLOAD = {...}`
|
|
412
412
|
- If your template contains this marker comment, payload is injected exactly there:
|
|
@@ -452,7 +452,7 @@ await exportFinalizedLeaves(registry, {
|
|
|
452
452
|
|
|
453
453
|
A simple local viewer is included at:
|
|
454
454
|
|
|
455
|
-
- `packages/
|
|
455
|
+
- `packages/export/tools/finalized-leaves-viewer.html`
|
|
456
456
|
|
|
457
457
|
How to use:
|
|
458
458
|
|
|
@@ -477,7 +477,7 @@ const app = express()
|
|
|
477
477
|
app.use(
|
|
478
478
|
'/tools/finalized-leaves-viewer',
|
|
479
479
|
express.static(
|
|
480
|
-
path.resolve(process.cwd(), 'packages/
|
|
480
|
+
path.resolve(process.cwd(), 'packages/export/tools'),
|
|
481
481
|
),
|
|
482
482
|
)
|
|
483
483
|
|