micro-contracts 0.17.15 → 0.17.16

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 CHANGED
@@ -207,6 +207,11 @@ project/
207
207
  | `x-micro-contracts-published` | boolean | Include in `contract-published` (compatibility SLA) |
208
208
  | `x-micro-contracts-non-exportable` | boolean | Mark as non-exportable (fails if used in published endpoints) |
209
209
  | `x-micro-contracts-depend-on` | string[] | Explicit dependencies on other modules' published APIs |
210
+ | `x-private` | boolean | Schema-level. A published endpoint that can reach it fails linting (`PUBLIC_ENDPOINT_PRIVATE_RESPONSE`) |
211
+
212
+ "Can reach it" covers every way one schema refers to another: properties, array
213
+ items, `additionalProperties`, `allOf`/`oneOf`/`anyOf`, and `$ref` targets — the
214
+ same traversal that decides what `contract-published` contains.
210
215
 
211
216
  ### Screen Spec Extensions
212
217
 
@@ -278,11 +283,12 @@ Create `micro-contracts.config.yaml`. All paths support `{module}` placeholder.
278
283
  | `contract.serviceTemplate` | string | no | Custom Handlebars template for service interface generation |
279
284
  | `contractPublic.output` | string | yes | Output directory for public contract packages |
280
285
  | `outputs.<id>.output` | string | yes | Output file path |
281
- | `outputs.<id>.template` | string | yes | Handlebars template file path |
286
+ | `outputs.<id>.template` | string | yes | Handlebars template file path, used as written (resolved from the working directory) |
282
287
  | `outputs.<id>.overwrite` | boolean | no | Overwrite existing files (default: `true`) |
283
288
  | `outputs.<id>.condition` | string | no | `hasPublicEndpoints` \| `hasOverlays` \| `always` (default: `always`) |
284
289
  | `outputs.<id>.enabled` | boolean | no | Enable/disable this output (default: `true`) |
285
290
  | `outputs.<id>.config` | object | no | Template-specific configuration passed to context |
291
+
286
292
  | `overlays.shared` | string[] | no | Overlay files applied to all modules |
287
293
  | `overlays.collision` | string | no | `error` \| `warn` \| `last-wins` (default: `error`) |
288
294
  | `docs.enabled` | boolean | no | Enable documentation generation (default: `true`) |
@@ -368,8 +374,8 @@ Generate code from OpenAPI specifications.
368
374
  | `-c, --config <path>` | Path to config file |
369
375
  | `-m, --module <names>` | Module names, comma-separated (default: all) |
370
376
  | `--contracts-only` | Generate contract packages only |
371
- | `--server-only` | Generate server routes only |
372
- | `--frontend-only` | Generate frontend clients only |
377
+ | `--server-only` | Generate server outputs only (outputs whose id contains `server`) |
378
+ | `--frontend-only` | Generate frontend outputs only (outputs whose id contains `frontend` or `client`) |
373
379
  | `--docs-only` | Generate documentation only |
374
380
  | `--skip-lint` | Skip linting before generation |
375
381
  | `--no-manifest` | Skip manifest generation |
@@ -437,8 +443,8 @@ Run full guardrails pipeline: **Gate 1,2 → Generate → Gate 3,4,5**.
437
443
  | `--no-manifest` | Skip manifest generation |
438
444
  | `--skip-lint` | Skip linting before generation |
439
445
  | `--contracts-only` | Generate contract packages only |
440
- | `--server-only` | Generate server routes only |
441
- | `--frontend-only` | Generate frontend clients only |
446
+ | `--server-only` | Generate server outputs only (outputs whose id contains `server`) |
447
+ | `--frontend-only` | Generate frontend outputs only (outputs whose id contains `frontend` or `client`) |
442
448
  | `--docs-only` | Generate documentation only |
443
449
  | `--force` | Bypass input hash cache and always regenerate |
444
450
  | `--no-cache` | Run without reading or writing input hash cache |
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.15
6
+ version: 0.17.16
7
7
  description: >-
8
8
  Contract-first OpenAPI toolchain for TypeScript Web/API systems.
9
9
  Generates contract packages, server routes, and frontend clients
@@ -92,13 +92,18 @@ command_sets:
92
92
  default: false
93
93
 
94
94
  - name: server-only
95
- description: Generate server routes only.
95
+ description: >-
96
+ Generate server outputs only: outputs whose id contains 'server',
97
+ plus the built-in server section. Fails when no output matches.
96
98
  schema:
97
99
  type: boolean
98
100
  default: false
99
101
 
100
102
  - name: frontend-only
101
- description: Generate frontend clients only.
103
+ description: >-
104
+ Generate frontend outputs only: outputs whose id contains
105
+ 'frontend' or 'client', plus the built-in frontend section.
106
+ Fails when no output matches.
102
107
  schema:
103
108
  type: boolean
104
109
  default: false
@@ -519,13 +524,18 @@ command_sets:
519
524
  default: false
520
525
 
521
526
  - name: server-only
522
- description: Generate server routes only.
527
+ description: >-
528
+ Generate server outputs only: outputs whose id contains 'server',
529
+ plus the built-in server section. Fails when no output matches.
523
530
  schema:
524
531
  type: boolean
525
532
  default: false
526
533
 
527
534
  - name: frontend-only
528
- description: Generate frontend clients only.
535
+ description: >-
536
+ Generate frontend outputs only: outputs whose id contains
537
+ 'frontend' or 'client', plus the built-in frontend section.
538
+ Fails when no output matches.
529
539
  schema:
530
540
  type: boolean
531
541
  default: false