@postman/sdk-config 0.12.0 → 0.13.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 +18 -6
  2. package/dist/index.cjs +158 -15
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +1 -1
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.js +158 -15
  7. package/dist/index.js.map +1 -1
  8. package/dist/sdk-config/index.cjs +156 -14
  9. package/dist/sdk-config/index.cjs.map +1 -1
  10. package/dist/sdk-config/index.d.cts +1 -1
  11. package/dist/sdk-config/index.d.ts +1 -1
  12. package/dist/sdk-config/index.js +156 -14
  13. package/dist/sdk-config/index.js.map +1 -1
  14. package/dist/sdk-config/v1/index.cjs +156 -14
  15. package/dist/sdk-config/v1/index.cjs.map +1 -1
  16. package/dist/sdk-config/v1/index.d.cts +400 -31
  17. package/dist/sdk-config/v1/index.d.ts +400 -31
  18. package/dist/sdk-config/v1/index.js +156 -14
  19. package/dist/sdk-config/v1/index.js.map +1 -1
  20. package/dist/sdk-config-ir/index.cjs +18 -5
  21. package/dist/sdk-config-ir/index.cjs.map +1 -1
  22. package/dist/sdk-config-ir/index.d.cts +1 -1
  23. package/dist/sdk-config-ir/index.d.ts +1 -1
  24. package/dist/sdk-config-ir/index.js +18 -5
  25. package/dist/sdk-config-ir/index.js.map +1 -1
  26. package/dist/sdk-config-ir/v1/index.cjs +18 -5
  27. package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
  28. package/dist/sdk-config-ir/v1/index.d.cts +27 -4
  29. package/dist/sdk-config-ir/v1/index.d.ts +27 -4
  30. package/dist/sdk-config-ir/v1/index.js +18 -5
  31. package/dist/sdk-config-ir/v1/index.js.map +1 -1
  32. package/dist/{typescript-Byhn4MqL.d.cts → typescript-BFRxjAah.d.cts} +1 -0
  33. package/dist/{typescript-Byhn4MqL.d.ts → typescript-BFRxjAah.d.ts} +1 -0
  34. package/package.json +1 -1
  35. package/src/sdk-config/v1/README.md +32 -11
  36. package/src/sdk-config-ir/v1/README.md +36 -29
@@ -171,6 +171,7 @@ declare const cliDistributionConfigSchema: z.ZodObject<{
171
171
  bucket: z.ZodString;
172
172
  tokenSecretName: z.ZodOptional<z.ZodString>;
173
173
  }, z.core.$strict>>;
174
+ githubAttestations: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodBoolean]>>;
174
175
  }, z.core.$strict>;
175
176
  declare const CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE = "CLI_DISTRIBUTION_NON_RELEASE_MODE";
176
177
  interface SdkConfigDiagnostic {
@@ -171,6 +171,7 @@ declare const cliDistributionConfigSchema: z.ZodObject<{
171
171
  bucket: z.ZodString;
172
172
  tokenSecretName: z.ZodOptional<z.ZodString>;
173
173
  }, z.core.$strict>>;
174
+ githubAttestations: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodBoolean]>>;
174
175
  }, z.core.$strict>;
175
176
  declare const CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE = "CLI_DISTRIBUTION_NON_RELEASE_MODE";
176
177
  interface SdkConfigDiagnostic {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postman/sdk-config",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Shared SDK configuration contracts and transformations for Postman SDK generation",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,
@@ -211,9 +211,10 @@ properties of the generated language artifact.
211
211
  ## CLI distribution and npm publication
212
212
 
213
213
  A `language: cli` target's own `output` block accepts `distribution`, which publishes the generated
214
- CLI to Homebrew and Scoop from the generated `release.yml` on each tagged release. It exists only on
215
- the `cli` target; root `output` and other languages reject it as an unknown key. A CLI target may
216
- also publish to npm, which the CLI generator uses for its npm launcher packages.
214
+ CLI to Homebrew and Scoop from the generated `release.yml` on each tagged release and controls
215
+ whether that workflow attests build provenance. It exists only on the `cli` target; root `output`
216
+ and other languages reject it as an unknown key. A CLI target may also publish to npm, which the CLI
217
+ generator uses for its npm launcher packages.
217
218
 
218
219
  ```yaml
219
220
  targets:
@@ -238,8 +239,22 @@ targets:
238
239
  scoop:
239
240
  bucket: acme/scoop-bucket
240
241
  tokenSecretName: SCOOP_BUCKET_PAT # optional; overrides githubApp for Scoop
242
+ githubAttestations: auto # optional; auto (generator default), true, or false
241
243
  ```
242
244
 
245
+ ### Build attestations
246
+
247
+ `githubAttestations` controls the generated `actions/attest-build-provenance` step:
248
+
249
+ | Value | Release workflow |
250
+ | ------------------ | ---------------------------------------------------------------- |
251
+ | `auto` (or absent) | Attests only on public repositories |
252
+ | `true` | Always attests (private repositories on GitHub Enterprise Cloud) |
253
+ | `false` | No step or permissions; writes `github-attestations = false` |
254
+
255
+ `githubAttestations` may be the only `distribution` key, for example `{ githubAttestations: false }`
256
+ on a private repository that publishes only to npm. It is a plain value, not a secret name.
257
+
243
258
  ### Secret names, not secret values
244
259
 
245
260
  Every `*SecretName` field (`tokenSecretName`, `appIdSecretName`, `privateKeySecretName`) is the
@@ -265,28 +280,34 @@ The field names differ from the Fern generator's `tokenEnvironmentVariable`, `ap
265
280
  | `distribution` with `files` or `zip` delivery | Error with a fix instruction |
266
281
  | `distribution` on root `output` or a non-`cli` target | Unknown-key error |
267
282
  | `distribution: {}` or `githubApp` without `homebrew`/`scoop` | Error |
283
+ | `githubAttestations` other than `"auto"`, `true`, or `false` | Error |
268
284
  | `githubApp` missing either secret name | Error |
269
285
  | `tap`/`bucket` not `<owner>/<repo>`; `formula` not `^[a-z][a-z0-9-]*$` | Error |
270
286
  | npm publication on a `cli` target without `github` delivery | Error |
271
287
  | `trustedPublishing: true` with `token` | Error |
288
+ | `trustedPublishing: true` with `apiKey` | Error |
272
289
  | `distribution` with GitHub mode `pull-request`, `push`, or `commit` | Warning from `getSdkConfigV1Diagnostics` |
273
290
 
274
291
  Non-release modes are allowed because a customer may push a version tag themselves, but nothing is
275
- published until they do. Zod has no non-fatal issue channel, so warnings come from
276
- `getSdkConfigV1Diagnostics(document)` (and `getSdkConfigIrV1Diagnostics` for IR), which returns the
277
- same `code`/`severity`/`path`/`reason`/`suggestedAction` shape as Fern migration diagnostics.
292
+ published until they do. The warning also applies when `githubAttestations` is the only key, because
293
+ the release workflow it configures runs only on a version tag. Zod has no non-fatal issue channel, so
294
+ warnings come from `getSdkConfigV1Diagnostics(document)` (and `getSdkConfigIrV1Diagnostics` for IR),
295
+ which returns the same `code`/`severity`/`path`/`reason`/`suggestedAction` shape as Fern migration
296
+ diagnostics.
278
297
 
279
- `trustedPublishing` is shared by every npm target. It replaces Fern's `token: OIDC` marker
280
- (`<USE_OIDC>` in the generator) with a typed flag. For CLI npm, omitting `publish` is equivalent to
281
- the generator's `shouldGeneratePublishWorkflow: false`.
298
+ `trustedPublishing` replaces Fern's `token: OIDC` marker (`<USE_OIDC>` in the generator) with a
299
+ typed flag. npm reads it instead of `token`; NuGet and RubyGems read it instead of `apiKey`, which is
300
+ why setting both is an error. For CLI npm, omitting `publish` is equivalent to the generator's
301
+ `shouldGeneratePublishWorkflow: false`.
282
302
 
283
303
  ### Fern migration
284
304
 
285
305
  `mapFernConfigToSdkConfigV1` maps the CLI generator's `config.distribution` onto the target's
286
306
  `output.distribution` when the Fern output is a GitHub repository. Keys are matched by exact name:
287
307
  `appIdSecret` and `privateKeySecret` become `appIdSecretName` and `privateKeySecretName`, and each
288
- channel's `tokenEnvironmentVariable` becomes `tokenSecretName`. Secret names are copied verbatim and
289
- generator defaults are not written. Other keys are reported as `FERN_CONFIG_FIELD_UNSUPPORTED`.
308
+ channel's `tokenEnvironmentVariable` becomes `tokenSecretName`. `githubAttestations` is copied as a
309
+ plain value. Secret names are copied verbatim and generator defaults are not written. Other keys are
310
+ reported as `FERN_CONFIG_FIELD_UNSUPPORTED`.
290
311
 
291
312
  - A distribution this schema rejects, including the legacy no-ops above, is left out and reported
292
313
  as `FERN_CONFIG_VALUE_INVALID` at the legacy path, without the rejected value.
@@ -47,12 +47,13 @@ messages. Valid IR requests route only to the IR bridge and never fall through t
47
47
  - Credentials may be references to externally managed secrets or raw credential/signing values when
48
48
  an integration must carry the material through the normalized config. Raw values are sensitive and
49
49
  must be handled as secrets.
50
- - `output.distribution` (CLI Homebrew/Scoop channels) is valid only when `target.language` is `cli`
51
- and `output.delivery` is `github`. It is accepted on every delivery variant so files/zip produce an
52
- actionable error. Its `*SecretName` fields hold GitHub Actions secret names that the generated
53
- release workflow resolves; they are never credentials, references, or values to resolve, and
54
- `credentialResolution` does not apply to them. `getSdkConfigIrV1Diagnostics` warns when
55
- distribution is combined with a non-release GitHub mode. See the
50
+ - `output.distribution` (CLI Homebrew/Scoop channels and `githubAttestations`) is valid only when
51
+ `target.language` is `cli` and `output.delivery` is `github`. It is accepted on every delivery
52
+ variant so files/zip produce an actionable error. Its `*SecretName` fields hold GitHub Actions
53
+ secret names that the generated release workflow resolves; they are never credentials,
54
+ references, or values to resolve, and `credentialResolution` does not apply to them.
55
+ `getSdkConfigIrV1Diagnostics` warns when distribution is combined with a non-release GitHub mode.
56
+ See the
56
57
  [SDK Config v1 reference](../../sdk-config/v1/README.md#cli-distribution-and-npm-publication).
57
58
  - npm publication is valid for `cli` targets with GitHub delivery only.
58
59
 
@@ -259,7 +260,7 @@ audited on 2026-07-17. Counts guide the initial contract; they are not a permane
259
260
  | npm package privacy and JSR publication | `output.publish.isPackagePrivate` / `output.publish.publishToJsr` | NPM-only booleans |
260
261
  | registry version and workflow gate | `output.publish.version` / `output.publish.shouldGeneratePublishWorkflow` | Per-registry controls |
261
262
  | registry credentials and environment variables | `output.publish.credentials` / `output.publish.*EnvironmentVariable` | Registry-specific secret values/names |
262
- | trusted publishing / OIDC markers | `output.publish.trustedPublishing` | npm, PyPI, and NuGet |
263
+ | trusted publishing / OIDC markers | `output.publish.trustedPublishing` | npm, PyPI, NuGet, and RubyGems |
263
264
  | Maven coordinate and signing material/env vars | `output.publish.coordinate` / `output.publish.signature` / `output.publish.signatureEnvironmentVariables` | Maven-specific |
264
265
  | Fern README config | `docs.readme` | 12 API names; 11 disabled-section configs |
265
266
  | `customReadmeSections` | `docs.readme.customSections` | Not in the project snapshot; see below |
@@ -348,28 +349,29 @@ normalized contract.
348
349
  These settings remain under `source.apiImportSettings` because they affect spec conversion rather
349
350
  than generated-language presentation.
350
351
 
351
- | Fern setting | Normalized field | Observed projects |
352
- | ----------------------------------------------------------- | ------------------------------------ | --------------------------------------: |
353
- | `respect-nullable-schemas` | `respectNullableSchemas` | 10 |
354
- | `title-as-schema-name` | `titleAsSchemaName` | 16 |
355
- | `ignore-tags` | `ignoreTags` | Not in the project snapshot; see below. |
356
- | `disambiguate-request-names` | `disambiguateRequestNames` | Not in the project snapshot; see below. |
357
- | `respect-readonly-schemas` | `respectReadonlySchemas` | Not in the project snapshot; see below. |
358
- | `unions: v1`, `prefer-undiscriminated-unions-with-literals` | `discriminatedUnionV2` | Not in the project snapshot; see below. |
359
- | `prefer-undiscriminated-unions-with-literals` | `undiscriminatedUnionsWithLiterals` | Not in the project snapshot; see below. |
360
- | `inline-all-of-schemas` | `inlineAllOfSchemas` | Not in the project snapshot; see below. |
361
- | `resolve-schema-collisions` | `resolveSchemaCollisions` | Not in the project snapshot; see below. |
362
- | `message-naming` | `asyncApiMessageNaming` | Not in the project snapshot; see below. |
363
- | `coerce-enums-to-literals` | `coerceEnumsToLiterals` | 14 |
364
- | `idiomatic-request-names` | `idiomaticRequestNames` | 12 |
365
- | `wrap-references-to-nullable-in-optional` | `wrapReferencesToNullableInOptional` | 9 |
366
- | `coerce-optional-schemas-to-nullable` | `coerceOptionalSchemasToNullable` | 9 |
367
- | `object-query-parameters` | `objectQueryParameters` | 9 |
368
- | `only-include-referenced-schemas` | `onlyIncludeReferencedSchemas` | 4 |
369
- | `group-multi-api-environments` | `groupMultiApiEnvironments` | 2 |
370
- | `path-parameter-order` | `pathParameterOrder` | 2 |
371
- | `type-dates-as-strings` | `typeDatesAsStrings` | 12 |
372
- | `default-integer-format` | `defaultIntegerFormat` | Importer defaults to `int32`. |
352
+ | Fern setting | Normalized field | Observed projects |
353
+ | ----------------------------------------------------------- | --------------------------------------- | --------------------------------------: |
354
+ | `respect-nullable-schemas` | `respectNullableSchemas` | 10 |
355
+ | `title-as-schema-name` | `titleAsSchemaName` | 16 |
356
+ | `ignore-tags` | `ignoreTags` | Not in the project snapshot; see below. |
357
+ | `disambiguate-request-names` | `disambiguateRequestNames` | Not in the project snapshot; see below. |
358
+ | `respect-readonly-schemas` | `respectReadonlySchemas` | Not in the project snapshot; see below. |
359
+ | `unions: v1`, `prefer-undiscriminated-unions-with-literals` | `discriminatedUnionV2` | Not in the project snapshot; see below. |
360
+ | `prefer-undiscriminated-unions-with-literals` | `undiscriminatedUnionsWithLiterals` | Not in the project snapshot; see below. |
361
+ | `inline-all-of-schemas` | `inlineAllOfSchemas` | Not in the project snapshot; see below. |
362
+ | `infer-discriminated-union-base-properties` | `inferDiscriminatedUnionBaseProperties` | Not in the project snapshot; see below. |
363
+ | `resolve-schema-collisions` | `resolveSchemaCollisions` | Not in the project snapshot; see below. |
364
+ | `message-naming` | `asyncApiMessageNaming` | Not in the project snapshot; see below. |
365
+ | `coerce-enums-to-literals` | `coerceEnumsToLiterals` | 14 |
366
+ | `idiomatic-request-names` | `idiomaticRequestNames` | 12 |
367
+ | `wrap-references-to-nullable-in-optional` | `wrapReferencesToNullableInOptional` | 9 |
368
+ | `coerce-optional-schemas-to-nullable` | `coerceOptionalSchemasToNullable` | 9 |
369
+ | `object-query-parameters` | `objectQueryParameters` | 9 |
370
+ | `only-include-referenced-schemas` | `onlyIncludeReferencedSchemas` | 4 |
371
+ | `group-multi-api-environments` | `groupMultiApiEnvironments` | 2 |
372
+ | `path-parameter-order` | `pathParameterOrder` | 2 |
373
+ | `type-dates-as-strings` | `typeDatesAsStrings` | 12 |
374
+ | `default-integer-format` | `defaultIntegerFormat` | Importer defaults to `int32`. |
373
375
 
374
376
  `ignoreTags` and `disambiguateRequestNames` postdate the project snapshot. Twilio declares both
375
377
  across its namespaced API specs. They stay undefaulted so omission remains distinguishable from an
@@ -392,6 +394,11 @@ fields above: `respectReadonlySchemas` changes which properties an imported sche
392
394
  `discriminatedUnionV2` changes how union variants are converted, so an absent value must leave an
393
395
  existing SDK's shapes alone rather than assert one.
394
396
 
397
+ `inferDiscriminatedUnionBaseProperties` postdates the snapshot too. Auth0's Management API sets it,
398
+ and Fern then lifts every property all of a discriminated `oneOf`'s mapped variants declare with an
399
+ equal schema onto the union itself — `ConnectionResponseContent::ad(string $id, string $displayName,
400
+ ...)` in its PHP SDK. It stays undefaulted: absent must leave a union's shape alone.
401
+
395
402
  `inlineAllOfSchemas`, `resolveSchemaCollisions`, and `asyncApiMessageNaming` complete the retained
396
403
  import settings with observed customer use. Each is refused today whenever it differs from the
397
404
  importer default, which blocks the declaring customer from a post-cutover generator version.