Commit dd3fcb0
committed
v1.2.0: invert source of truth — TypeScript field files, JSON is generated
The hand-edited data/supplier-questionnaire.json was awkward to author and
forfeited type safety on enums and Baustein IDs. Inverted: the TypeScript
field files in src/fields/ are now the source of truth, and the JSON is a
generated artefact for non-TS consumers.
Source layout:
src/fields/profile.ts 17 fields
src/fields/security-practices.ts 24 fields
src/fields/saas-technical.ts 5 fields
src/fields/on-prem-technical.ts 4 fields
src/fields/pro-services.ts 3 fields
src/fields/managed-services.ts 3 fields
src/fields/index.ts combines into allFields
Authoring workflow:
1. Edit src/fields/<section>.ts (TypeScript with full autocomplete)
2. Run `bun run build:json` to regenerate the JSON artefact
3. Run `bun run check:json-in-sync` (CI does this too)
Backwards compatible. The published JSON still validates against the same
Zod schema, the npm-package exports are unchanged, and consumers that
import the JSON directly continue to work.1 parent 1183192 commit dd3fcb0
13 files changed
Lines changed: 1367 additions & 140 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
34 | 64 | | |
35 | 65 | | |
36 | 66 | | |
| |||
45 | 75 | | |
46 | 76 | | |
47 | 77 | | |
48 | | - | |
| 78 | + | |
49 | 79 | | |
50 | 80 | | |
51 | 81 | | |
| |||
0 commit comments