micro-contracts 0.17.16 → 0.17.18
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 +18 -4
- package/cli-contract.yaml +18 -11
- package/dist/micro-contracts.bundle.mjs +344 -329
- package/dist/micro-contracts.bundle.mjs.map +4 -4
- package/docs/cli-reference.md +6 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -306,6 +306,10 @@ Create `micro-contracts.config.yaml`. All paths support `{module}` placeholder.
|
|
|
306
306
|
existing configs. They generate only when declared, and only when no `outputs` entry
|
|
307
307
|
is configured — `outputs` supersedes them for a module. Prefer `outputs`.
|
|
308
308
|
|
|
309
|
+
An `outputs` entry is a template rendered to a path — nothing about it is
|
|
310
|
+
server-specific or frontend-specific — so `--server-only` / `--frontend-only`
|
|
311
|
+
apply to the built-in sections only. Select outputs with `--output`.
|
|
312
|
+
|
|
309
313
|
### modules.\<name\>
|
|
310
314
|
|
|
311
315
|
| Key | Type | Required | Description |
|
|
@@ -374,8 +378,9 @@ Generate code from OpenAPI specifications.
|
|
|
374
378
|
| `-c, --config <path>` | Path to config file |
|
|
375
379
|
| `-m, --module <names>` | Module names, comma-separated (default: all) |
|
|
376
380
|
| `--contracts-only` | Generate contract packages only |
|
|
377
|
-
| `--
|
|
378
|
-
| `--
|
|
381
|
+
| `--output <ids>` | Output ids to generate, comma-separated; glob patterns allowed (e.g. `'*routes*'`). Fails when a pattern matches no output |
|
|
382
|
+
| `--server-only` | Generate the built-in `server` section only (not valid with an `outputs` configuration) |
|
|
383
|
+
| `--frontend-only` | Generate the built-in `frontend` section only (not valid with an `outputs` configuration) |
|
|
379
384
|
| `--docs-only` | Generate documentation only |
|
|
380
385
|
| `--skip-lint` | Skip linting before generation |
|
|
381
386
|
| `--no-manifest` | Skip manifest generation |
|
|
@@ -383,6 +388,10 @@ Generate code from OpenAPI specifications.
|
|
|
383
388
|
| `--force` | Bypass input hash cache and always regenerate |
|
|
384
389
|
| `--no-cache` | Run without reading or writing input hash cache |
|
|
385
390
|
|
|
391
|
+
A run that generates a subset (`--output`, `--module`, or any `--*-only`) does not
|
|
392
|
+
record the input hash, so the next full run regenerates rather than reporting no
|
|
393
|
+
changes.
|
|
394
|
+
|
|
386
395
|
### init \<module\>
|
|
387
396
|
|
|
388
397
|
Initialize a new module structure with starter templates.
|
|
@@ -443,12 +452,17 @@ Run full guardrails pipeline: **Gate 1,2 → Generate → Gate 3,4,5**.
|
|
|
443
452
|
| `--no-manifest` | Skip manifest generation |
|
|
444
453
|
| `--skip-lint` | Skip linting before generation |
|
|
445
454
|
| `--contracts-only` | Generate contract packages only |
|
|
446
|
-
| `--
|
|
447
|
-
| `--
|
|
455
|
+
| `--output <ids>` | Output ids to generate, comma-separated; glob patterns allowed (e.g. `'*routes*'`). Fails when a pattern matches no output |
|
|
456
|
+
| `--server-only` | Generate the built-in `server` section only (not valid with an `outputs` configuration) |
|
|
457
|
+
| `--frontend-only` | Generate the built-in `frontend` section only (not valid with an `outputs` configuration) |
|
|
448
458
|
| `--docs-only` | Generate documentation only |
|
|
449
459
|
| `--force` | Bypass input hash cache and always regenerate |
|
|
450
460
|
| `--no-cache` | Run without reading or writing input hash cache |
|
|
451
461
|
|
|
462
|
+
A run that generates a subset (`--output`, `--module`, or any `--*-only`) does not
|
|
463
|
+
record the input hash, so the next full run regenerates rather than reporting no
|
|
464
|
+
changes.
|
|
465
|
+
|
|
452
466
|
> See **[Enforceable Guardrails](docs/development-guardrails.md)** for gate details and CI configuration.
|
|
453
467
|
|
|
454
468
|
### deps
|
package/cli-contract.yaml
CHANGED
|
@@ -3,7 +3,7 @@ cli_contracts: 0.1.0
|
|
|
3
3
|
|
|
4
4
|
info:
|
|
5
5
|
title: micro-contracts CLI
|
|
6
|
-
version: 0.17.
|
|
6
|
+
version: 0.17.18
|
|
7
7
|
description: >-
|
|
8
8
|
Contract-first OpenAPI toolchain for TypeScript Web/API systems.
|
|
9
9
|
Generates contract packages, server routes, and frontend clients
|
|
@@ -85,6 +85,15 @@ command_sets:
|
|
|
85
85
|
schema:
|
|
86
86
|
type: string
|
|
87
87
|
|
|
88
|
+
- name: output
|
|
89
|
+
description: >-
|
|
90
|
+
Output ids to generate, comma-separated. Supports glob patterns
|
|
91
|
+
(e.g. '*routes*'). Generates all configured outputs if omitted.
|
|
92
|
+
Fails when a pattern matches no output.
|
|
93
|
+
value_name: ids
|
|
94
|
+
schema:
|
|
95
|
+
type: string
|
|
96
|
+
|
|
88
97
|
- name: contracts-only
|
|
89
98
|
description: Generate contract packages only.
|
|
90
99
|
schema:
|
|
@@ -93,17 +102,16 @@ command_sets:
|
|
|
93
102
|
|
|
94
103
|
- name: server-only
|
|
95
104
|
description: >-
|
|
96
|
-
Generate server
|
|
97
|
-
|
|
105
|
+
Generate the built-in server section only. Not valid with an
|
|
106
|
+
outputs configuration — select outputs with --output instead.
|
|
98
107
|
schema:
|
|
99
108
|
type: boolean
|
|
100
109
|
default: false
|
|
101
110
|
|
|
102
111
|
- name: frontend-only
|
|
103
112
|
description: >-
|
|
104
|
-
Generate frontend
|
|
105
|
-
|
|
106
|
-
Fails when no output matches.
|
|
113
|
+
Generate the built-in frontend section only. Not valid with an
|
|
114
|
+
outputs configuration — select outputs with --output instead.
|
|
107
115
|
schema:
|
|
108
116
|
type: boolean
|
|
109
117
|
default: false
|
|
@@ -525,17 +533,16 @@ command_sets:
|
|
|
525
533
|
|
|
526
534
|
- name: server-only
|
|
527
535
|
description: >-
|
|
528
|
-
Generate server
|
|
529
|
-
|
|
536
|
+
Generate the built-in server section only. Not valid with an
|
|
537
|
+
outputs configuration — select outputs with --output instead.
|
|
530
538
|
schema:
|
|
531
539
|
type: boolean
|
|
532
540
|
default: false
|
|
533
541
|
|
|
534
542
|
- name: frontend-only
|
|
535
543
|
description: >-
|
|
536
|
-
Generate frontend
|
|
537
|
-
|
|
538
|
-
Fails when no output matches.
|
|
544
|
+
Generate the built-in frontend section only. Not valid with an
|
|
545
|
+
outputs configuration — select outputs with --output instead.
|
|
539
546
|
schema:
|
|
540
547
|
type: boolean
|
|
541
548
|
default: false
|