@postman/sdk-config 0.12.0 → 0.14.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 +170 -18
  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 +170 -18
  7. package/dist/index.js.map +1 -1
  8. package/dist/sdk-config/index.cjs +164 -17
  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 +164 -17
  13. package/dist/sdk-config/index.js.map +1 -1
  14. package/dist/sdk-config/v1/index.cjs +164 -17
  15. package/dist/sdk-config/v1/index.cjs.map +1 -1
  16. package/dist/sdk-config/v1/index.d.cts +429 -31
  17. package/dist/sdk-config/v1/index.d.ts +429 -31
  18. package/dist/sdk-config/v1/index.js +164 -17
  19. package/dist/sdk-config/v1/index.js.map +1 -1
  20. package/dist/sdk-config-ir/index.cjs +22 -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 +22 -5
  25. package/dist/sdk-config-ir/index.js.map +1 -1
  26. package/dist/sdk-config-ir/v1/index.cjs +22 -5
  27. package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
  28. package/dist/sdk-config-ir/v1/index.d.cts +30 -4
  29. package/dist/sdk-config-ir/v1/index.d.ts +30 -4
  30. package/dist/sdk-config-ir/v1/index.js +22 -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 +35 -12
  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.14.0",
4
4
  "description": "Shared SDK configuration contracts and transformations for Postman SDK generation",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,
@@ -65,7 +65,9 @@ target-specific values are retained as sparse target overrides when the public s
65
65
  them. Optional `api` enrichment may be supplied after Fern's definition or IR has already been
66
66
  lowered into the public API shape. Supported registry credentials, signing material, and GitHub
67
67
  credentials are preserved in SDK Config when present; callers must treat these fields as sensitive
68
- secrets.
68
+ secrets. A GitHub output's `workflows: false` becomes `output.github.workflows: false`, which tells
69
+ GitHub delivery to skip generated `.github/workflows` files and leave existing ones untouched; the
70
+ default `true` is omitted.
69
71
 
70
72
  Legacy package metadata fills `target.package` only where the mapped package has no value yet:
71
73
  the CLI generator's `packageIdentity.homepage`, `keywords`, `authors`, and `license`, the Rust
@@ -211,9 +213,10 @@ properties of the generated language artifact.
211
213
  ## CLI distribution and npm publication
212
214
 
213
215
  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.
216
+ CLI to Homebrew and Scoop from the generated `release.yml` on each tagged release and controls
217
+ whether that workflow attests build provenance. It exists only on the `cli` target; root `output`
218
+ and other languages reject it as an unknown key. A CLI target may also publish to npm, which the CLI
219
+ generator uses for its npm launcher packages.
217
220
 
218
221
  ```yaml
219
222
  targets:
@@ -238,8 +241,22 @@ targets:
238
241
  scoop:
239
242
  bucket: acme/scoop-bucket
240
243
  tokenSecretName: SCOOP_BUCKET_PAT # optional; overrides githubApp for Scoop
244
+ githubAttestations: auto # optional; auto (generator default), true, or false
241
245
  ```
242
246
 
247
+ ### Build attestations
248
+
249
+ `githubAttestations` controls the generated `actions/attest-build-provenance` step:
250
+
251
+ | Value | Release workflow |
252
+ | ------------------ | ---------------------------------------------------------------- |
253
+ | `auto` (or absent) | Attests only on public repositories |
254
+ | `true` | Always attests (private repositories on GitHub Enterprise Cloud) |
255
+ | `false` | No step or permissions; writes `github-attestations = false` |
256
+
257
+ `githubAttestations` may be the only `distribution` key, for example `{ githubAttestations: false }`
258
+ on a private repository that publishes only to npm. It is a plain value, not a secret name.
259
+
243
260
  ### Secret names, not secret values
244
261
 
245
262
  Every `*SecretName` field (`tokenSecretName`, `appIdSecretName`, `privateKeySecretName`) is the
@@ -265,28 +282,34 @@ The field names differ from the Fern generator's `tokenEnvironmentVariable`, `ap
265
282
  | `distribution` with `files` or `zip` delivery | Error with a fix instruction |
266
283
  | `distribution` on root `output` or a non-`cli` target | Unknown-key error |
267
284
  | `distribution: {}` or `githubApp` without `homebrew`/`scoop` | Error |
285
+ | `githubAttestations` other than `"auto"`, `true`, or `false` | Error |
268
286
  | `githubApp` missing either secret name | Error |
269
287
  | `tap`/`bucket` not `<owner>/<repo>`; `formula` not `^[a-z][a-z0-9-]*$` | Error |
270
288
  | npm publication on a `cli` target without `github` delivery | Error |
271
289
  | `trustedPublishing: true` with `token` | Error |
290
+ | `trustedPublishing: true` with `apiKey` | Error |
272
291
  | `distribution` with GitHub mode `pull-request`, `push`, or `commit` | Warning from `getSdkConfigV1Diagnostics` |
273
292
 
274
293
  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.
294
+ published until they do. The warning also applies when `githubAttestations` is the only key, because
295
+ the release workflow it configures runs only on a version tag. Zod has no non-fatal issue channel, so
296
+ warnings come from `getSdkConfigV1Diagnostics(document)` (and `getSdkConfigIrV1Diagnostics` for IR),
297
+ which returns the same `code`/`severity`/`path`/`reason`/`suggestedAction` shape as Fern migration
298
+ diagnostics.
278
299
 
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`.
300
+ `trustedPublishing` replaces Fern's `token: OIDC` marker (`<USE_OIDC>` in the generator) with a
301
+ typed flag. npm reads it instead of `token`; NuGet and RubyGems read it instead of `apiKey`, which is
302
+ why setting both is an error. For CLI npm, omitting `publish` is equivalent to the generator's
303
+ `shouldGeneratePublishWorkflow: false`.
282
304
 
283
305
  ### Fern migration
284
306
 
285
307
  `mapFernConfigToSdkConfigV1` maps the CLI generator's `config.distribution` onto the target's
286
308
  `output.distribution` when the Fern output is a GitHub repository. Keys are matched by exact name:
287
309
  `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`.
310
+ channel's `tokenEnvironmentVariable` becomes `tokenSecretName`. `githubAttestations` is copied as a
311
+ plain value. Secret names are copied verbatim and generator defaults are not written. Other keys are
312
+ reported as `FERN_CONFIG_FIELD_UNSUPPORTED`.
290
313
 
291
314
  - A distribution this schema rejects, including the legacy no-ops above, is left out and reported
292
315
  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.