@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.
- package/README.md +18 -6
- package/dist/index.cjs +158 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +158 -15
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +156 -14
- package/dist/sdk-config/index.cjs.map +1 -1
- package/dist/sdk-config/index.d.cts +1 -1
- package/dist/sdk-config/index.d.ts +1 -1
- package/dist/sdk-config/index.js +156 -14
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +156 -14
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +400 -31
- package/dist/sdk-config/v1/index.d.ts +400 -31
- package/dist/sdk-config/v1/index.js +156 -14
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +18 -5
- package/dist/sdk-config-ir/index.cjs.map +1 -1
- package/dist/sdk-config-ir/index.d.cts +1 -1
- package/dist/sdk-config-ir/index.d.ts +1 -1
- package/dist/sdk-config-ir/index.js +18 -5
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +18 -5
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +27 -4
- package/dist/sdk-config-ir/v1/index.d.ts +27 -4
- package/dist/sdk-config-ir/v1/index.js +18 -5
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/{typescript-Byhn4MqL.d.cts → typescript-BFRxjAah.d.cts} +1 -0
- package/dist/{typescript-Byhn4MqL.d.ts → typescript-BFRxjAah.d.ts} +1 -0
- package/package.json +1 -1
- package/src/sdk-config/v1/README.md +32 -11
- 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
|
@@ -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
|
|
215
|
-
the `cli` target; root `output`
|
|
216
|
-
|
|
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.
|
|
276
|
-
|
|
277
|
-
|
|
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`
|
|
280
|
-
|
|
281
|
-
the generator's
|
|
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`.
|
|
289
|
-
generator defaults are not written. Other keys are
|
|
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
|
|
51
|
-
and `output.delivery` is `github`. It is accepted on every delivery
|
|
52
|
-
actionable error. Its `*SecretName` fields hold GitHub Actions
|
|
53
|
-
release workflow resolves; they are never credentials,
|
|
54
|
-
`credentialResolution` does not apply to them.
|
|
55
|
-
distribution is combined with a non-release GitHub mode.
|
|
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` |
|
|
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
|
|
352
|
-
| ----------------------------------------------------------- |
|
|
353
|
-
| `respect-nullable-schemas` | `respectNullableSchemas`
|
|
354
|
-
| `title-as-schema-name` | `titleAsSchemaName`
|
|
355
|
-
| `ignore-tags` | `ignoreTags`
|
|
356
|
-
| `disambiguate-request-names` | `disambiguateRequestNames`
|
|
357
|
-
| `respect-readonly-schemas` | `respectReadonlySchemas`
|
|
358
|
-
| `unions: v1`, `prefer-undiscriminated-unions-with-literals` | `discriminatedUnionV2`
|
|
359
|
-
| `prefer-undiscriminated-unions-with-literals` | `undiscriminatedUnionsWithLiterals`
|
|
360
|
-
| `inline-all-of-schemas` | `inlineAllOfSchemas`
|
|
361
|
-
| `
|
|
362
|
-
| `
|
|
363
|
-
| `
|
|
364
|
-
| `
|
|
365
|
-
| `
|
|
366
|
-
| `
|
|
367
|
-
| `
|
|
368
|
-
| `
|
|
369
|
-
| `
|
|
370
|
-
| `
|
|
371
|
-
| `
|
|
372
|
-
| `
|
|
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.
|