@postman/sdk-config 0.0.3 → 0.1.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.
Files changed (36) hide show
  1. package/README.md +42 -17
  2. package/dist/index.cjs +2017 -180
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +3 -1
  5. package/dist/index.d.ts +3 -1
  6. package/dist/index.js +1980 -181
  7. package/dist/index.js.map +1 -1
  8. package/dist/sdk-config/index.cjs +2233 -0
  9. package/dist/sdk-config/index.cjs.map +1 -0
  10. package/dist/sdk-config/index.d.cts +3 -0
  11. package/dist/sdk-config/index.d.ts +3 -0
  12. package/dist/sdk-config/index.js +2192 -0
  13. package/dist/sdk-config/index.js.map +1 -0
  14. package/dist/sdk-config/v1/index.cjs +2233 -0
  15. package/dist/sdk-config/v1/index.cjs.map +1 -0
  16. package/dist/sdk-config/v1/index.d.cts +8644 -0
  17. package/dist/sdk-config/v1/index.d.ts +8644 -0
  18. package/dist/sdk-config/v1/index.js +2192 -0
  19. package/dist/sdk-config/v1/index.js.map +1 -0
  20. package/dist/sdk-config-ir/index.cjs +155 -19
  21. package/dist/sdk-config-ir/index.cjs.map +1 -1
  22. package/dist/sdk-config-ir/index.d.cts +2 -1
  23. package/dist/sdk-config-ir/index.d.ts +2 -1
  24. package/dist/sdk-config-ir/index.js +154 -20
  25. package/dist/sdk-config-ir/index.js.map +1 -1
  26. package/dist/sdk-config-ir/v1/index.cjs +155 -19
  27. package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
  28. package/dist/sdk-config-ir/v1/index.d.cts +448 -398
  29. package/dist/sdk-config-ir/v1/index.d.ts +448 -398
  30. package/dist/sdk-config-ir/v1/index.js +154 -20
  31. package/dist/sdk-config-ir/v1/index.js.map +1 -1
  32. package/dist/typescript-ByDbin_v.d.cts +426 -0
  33. package/dist/typescript-ByDbin_v.d.ts +426 -0
  34. package/package.json +15 -2
  35. package/src/sdk-config/v1/README.md +135 -0
  36. package/src/sdk-config-ir/v1/README.md +46 -27
package/README.md CHANGED
@@ -1,10 +1,11 @@
1
1
  # @postman/sdk-config
2
2
 
3
- Shared, runtime-validated configuration contracts for Postman's SDK generation pipeline.
3
+ Shared, runtime-validated public and internal configuration contracts for Postman's SDK generation
4
+ pipeline.
4
5
 
5
- This package is the source of truth for `SdkConfigIr`. It is intended for sdk-gen-core,
6
- sdk-gen-api, Postman and Fern CLIs, and translators that normalize producer-specific configuration
7
- before generation.
6
+ This package is the source of truth for the customer-facing `SdkConfig` and internal `SdkConfigIr`.
7
+ It is intended for sdk-gen-core, sdk-gen-api, Postman and Fern CLIs, and translators that normalize
8
+ producer-specific configuration before generation.
8
9
 
9
10
  ## Install
10
11
 
@@ -16,7 +17,15 @@ npm install @postman/sdk-config
16
17
 
17
18
  ## Use
18
19
 
19
- Prefer the versioned entry point at transport and persistence boundaries:
20
+ Use `SdkConfigV1` for customer-authored, potentially multi-target generation configuration:
21
+
22
+ ```ts
23
+ import { parseSdkConfigV1, type SdkConfigV1 } from '@postman/sdk-config/sdk-config/v1';
24
+
25
+ const sdkConfig: SdkConfigV1 = parseSdkConfigV1(untrustedInput);
26
+ ```
27
+
28
+ Use `SdkConfigIrV1` only for the normalized, single-target internal generator contract:
20
29
 
21
30
  ```ts
22
31
  import { parseSdkConfigIrV1, type SdkConfigIrV1 } from '@postman/sdk-config/sdk-config-ir/v1';
@@ -24,8 +33,13 @@ import { parseSdkConfigIrV1, type SdkConfigIrV1 } from '@postman/sdk-config/sdk-
24
33
  const sdkConfigIr: SdkConfigIrV1 = parseSdkConfigIrV1(untrustedInput);
25
34
  ```
26
35
 
27
- The package also exposes `@postman/sdk-config` and `@postman/sdk-config/sdk-config-ir` as convenient
28
- current-version entry points. Persisted payloads must still include `schemaVersion`.
36
+ The package also exposes `@postman/sdk-config`, `@postman/sdk-config/sdk-config`, and
37
+ `@postman/sdk-config/sdk-config-ir` as convenient current-version entry points. Persisted payloads
38
+ must still include the appropriate `schemaVersion`.
39
+
40
+ `SdkConfigV1` does not accept source selection, server-owned fields, `SdkConfigIrV1`, or legacy
41
+ Postman `BuildParameters`. See the [SDK Config v1 reference](src/sdk-config/v1/README.md) for the
42
+ boundaries and target precedence rules.
29
43
 
30
44
  Both ESM `import` and CommonJS `require` consumers are supported.
31
45
 
@@ -33,11 +47,17 @@ Both ESM `import` and CommonJS `require` consumers are supported.
33
47
 
34
48
  ```text
35
49
  src/
50
+ sdk-config-domain/
51
+ v1/ # Portable field schemas shared by public config and internal IR
52
+ sdk-config/
53
+ v1/ # Customer-facing multi-target schema and contract reference
36
54
  sdk-config-ir/
37
55
  v1/ # Versioned schema, inferred types, and contract reference
38
56
  tests/
39
57
  fixtures/
58
+ sdk-config/v1/ # Canonical public configuration payloads
40
59
  sdk-config-ir/v1/ # Canonical portable payloads
60
+ sdk-config/v1/ # Public contract and export tests
41
61
  sdk-config-ir/v1/ # Contract behavior tests
42
62
  docs/
43
63
  migration.md # sdk-gen-core adoption sequence
@@ -61,7 +81,8 @@ npm pack --dry-run
61
81
  publish it.
62
82
  - Additive v1 fields require a package minor version and a consumer-first rollout because v1 uses
63
83
  strict runtime objects: an older consumer rejects fields it does not know.
64
- - Breaking wire changes get a new schema directory and discriminator such as `sdk-config-ir/v2`.
84
+ - Breaking wire changes get a new schema directory and discriminator such as `sdk-config/v2` or
85
+ `sdk-config-ir/v2`.
65
86
  - Keep the previous version exported while consumers migrate.
66
87
 
67
88
  ### Manual release process
@@ -120,20 +141,24 @@ git pull --ff-only origin main
120
141
  node -p "require('./package.json').version"
121
142
  ```
122
143
 
123
- Create a signed, annotated tag on the checked-out `main` commit, verify it locally, and push it:
144
+ Create the signed tag and dispatch the **Package Release** workflow with the tag as its explicit
145
+ input:
124
146
 
125
147
  ```sh
126
- git tag -s v1.1.0 -m "Release v1.1.0"
127
- git tag -v v1.1.0
128
- git push origin v1.1.0
148
+ npm run release -- v1.1.0
129
149
  ```
130
150
 
131
- Pushing a tag matching `v*.*.*` automatically triggers the **Package Release** workflow defined in
132
- `.github/workflows/npm-publish.yml`. In GitHub, open **Actions** **Package Release** and confirm
133
- the tag-triggered run succeeds.
151
+ The release script requires a clean, up-to-date `main`, verifies that the package version matches
152
+ the tag and that the commit is already contained in `main` and `develop`, creates and verifies a
153
+ signed, annotated tag, pushes it, and dispatches `.github/workflows/npm-publish.yml` with
154
+ `tag=v1.1.0`. The workflow independently rechecks `main` ancestry before calling the shared
155
+ publisher, which verifies `develop` ancestry and the tag signature. Explicit dispatch avoids
156
+ duplicate publish runs and keeps retries tied to the immutable tag. In GitHub, open **Actions** →
157
+ **Package Release** and confirm the dispatched run succeeds.
134
158
 
135
159
  If publishing fails after the tag has been created, do not delete, move, or recreate the tag. After
136
- the underlying problem is fixed, open **Actions** **Package Release** **Run workflow** and enter
137
- the existing tag, such as `v1.1.0`, to retry it.
160
+ the underlying problem is fixed, run the same command again. The script verifies and reuses the
161
+ existing tag before dispatching another run. You can also use **Actions** → **Package Release** →
162
+ **Run workflow** and enter the existing tag, such as `v1.1.0`.
138
163
 
139
164
  See the [SDK Config IR v1 reference](src/sdk-config-ir/v1/README.md) for the complete contract.