@postman/sdk-config 0.0.0 → 0.0.2

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
@@ -1,9 +1,139 @@
1
1
  # @postman/sdk-config
2
2
 
3
- Namespace placeholder for `@postman/sdk-config`.
3
+ Shared, runtime-validated configuration contracts for Postman's SDK generation pipeline.
4
4
 
5
- Real releases ship from CI via OIDC Trusted Publishing see the linked
6
- repository for the release workflow. This `0.0.0` stub exists only to claim
7
- the name under the `@postman` scope and apply least-privilege team
8
- permissions. It is private (`--access restricted`); the first real release
9
- makes the package public if/when the team decides.
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.
8
+
9
+ ## Install
10
+
11
+ The package is configured as a restricted package in the `@postman` npm scope.
12
+
13
+ ```sh
14
+ npm install @postman/sdk-config
15
+ ```
16
+
17
+ ## Use
18
+
19
+ Prefer the versioned entry point at transport and persistence boundaries:
20
+
21
+ ```ts
22
+ import { parseSdkConfigIrV1, type SdkConfigIrV1 } from '@postman/sdk-config/sdk-config-ir/v1';
23
+
24
+ const sdkConfigIr: SdkConfigIrV1 = parseSdkConfigIrV1(untrustedInput);
25
+ ```
26
+
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`.
29
+
30
+ Both ESM `import` and CommonJS `require` consumers are supported.
31
+
32
+ ## Project layout
33
+
34
+ ```text
35
+ src/
36
+ sdk-config-ir/
37
+ v1/ # Versioned schema, inferred types, and contract reference
38
+ tests/
39
+ fixtures/
40
+ sdk-config-ir/v1/ # Canonical portable payloads
41
+ sdk-config-ir/v1/ # Contract behavior tests
42
+ docs/
43
+ migration.md # sdk-gen-core adoption sequence
44
+ ```
45
+
46
+ ## Develop
47
+
48
+ Requires Node.js 24 or newer. If you use nvm, run `nvm use` from the repository root.
49
+
50
+ ```sh
51
+ npm install
52
+ npm run check
53
+ npm pack --dry-run
54
+ ```
55
+
56
+ `npm run check` verifies formatting, linting, TypeScript, tests, and the dual-format package build.
57
+
58
+ ## Versioning and publishing
59
+
60
+ - npm access is `restricted`; do not set package.json `private: true`, because npm would refuse to
61
+ publish it.
62
+ - Additive v1 fields require a package minor version and a consumer-first rollout because v1 uses
63
+ 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`.
65
+ - Keep the previous version exported while consumers migrate.
66
+
67
+ ### Manual release process
68
+
69
+ Release automation is intentionally deferred while the tagging and publishing process is reviewed
70
+ with Postman's security team. Until that process is established, use the following manual release
71
+ procedure. The commands use `1.1.0` as an example; replace it consistently with the version being
72
+ released.
73
+
74
+ #### 1. Prepare a release branch from develop
75
+
76
+ Normal feature pull requests target `develop`. Start the release from an up-to-date `develop`
77
+ branch, update the version without creating a tag, and run the complete check suite:
78
+
79
+ ```sh
80
+ git switch develop
81
+ git pull --ff-only origin develop
82
+ git switch -c release/v1.1.0
83
+ npm version 1.1.0 --no-git-tag-version
84
+ npm run check
85
+ git add package.json package-lock.json
86
+ git commit -m "release: v1.1.0"
87
+ git push -u origin release/v1.1.0
88
+ ```
89
+
90
+ Open a pull request from `release/v1.1.0` into `main`. Review the version change, wait for required
91
+ checks and approvals, and merge it. The release branch isolates the version bump and preserves the
92
+ exact `develop` snapshot being reviewed, while work can continue independently on `develop`.
93
+
94
+ #### 2. Merge main back into develop
95
+
96
+ The publishing workflow requires the tagged commit to be in the history of the repository's default
97
+ branch, `develop`. After the release pull request is merged, create a synchronization branch from
98
+ the latest `develop` and merge the released `main` into it:
99
+
100
+ ```sh
101
+ git fetch origin
102
+ git switch -c chore/merge-main-after-v1.1.0 origin/develop
103
+ git merge --no-ff origin/main -m "Merge main back to develop after v1.1.0"
104
+ git push -u origin chore/merge-main-after-v1.1.0
105
+ ```
106
+
107
+ Open a pull request from `chore/merge-main-after-v1.1.0` into `develop`, wait for its checks, and use
108
+ **Create a merge commit** to merge it. Do not squash or rebase this pull request: the original
109
+ `main` commit must remain in `develop`'s ancestry for the publishing workflow's validation. The
110
+ temporary branch can then be deleted safely.
111
+
112
+ #### 3. Create the release tag from main
113
+
114
+ After the synchronization pull request is merged, update your local `main` and verify that
115
+ `package.json` contains the version you are about to tag:
116
+
117
+ ```sh
118
+ git switch main
119
+ git pull --ff-only origin main
120
+ node -p "require('./package.json').version"
121
+ ```
122
+
123
+ Create a signed, annotated tag on the checked-out `main` commit, verify it locally, and push it:
124
+
125
+ ```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
129
+ ```
130
+
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.
134
+
135
+ 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.
138
+
139
+ See the [SDK Config IR v1 reference](src/sdk-config-ir/v1/README.md) for the complete contract.