@postman/sdk-config 0.11.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 +372 -24
- 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 +372 -24
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +370 -23
- 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 +370 -23
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +370 -23
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +632 -31
- package/dist/sdk-config/v1/index.d.ts +632 -31
- package/dist/sdk-config/v1/index.js +370 -23
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +57 -6
- 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 +57 -6
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +57 -6
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +211 -4
- package/dist/sdk-config-ir/v1/index.d.ts +211 -4
- package/dist/sdk-config-ir/v1/index.js +57 -6
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/{typescript-CsAa1VSy.d.cts → typescript-BFRxjAah.d.cts} +65 -0
- package/dist/{typescript-CsAa1VSy.d.ts → typescript-BFRxjAah.d.ts} +65 -0
- package/package.json +1 -1
- package/src/sdk-config/v1/README.md +32 -11
- package/src/sdk-config-ir/v1/README.md +115 -60
|
@@ -446,7 +446,10 @@ var cliDistributionConfigSchema = zod.z.strictObject({
|
|
|
446
446
|
"A GitHub App used to mint short-lived tokens for every channel without its own tokenSecretName."
|
|
447
447
|
),
|
|
448
448
|
homebrew: cliDistributionHomebrewSchema.optional().describe("Publishes a Homebrew formula to a tap repository on each tagged release."),
|
|
449
|
-
scoop: cliDistributionScoopSchema.optional().describe("Publishes a Scoop manifest to a bucket repository on each tagged release.")
|
|
449
|
+
scoop: cliDistributionScoopSchema.optional().describe("Publishes a Scoop manifest to a bucket repository on each tagged release."),
|
|
450
|
+
githubAttestations: zod.z.union([zod.z.literal("auto"), zod.z.boolean()], { error: 'must be "auto", true, or false' }).optional().describe(
|
|
451
|
+
'Whether the generated release workflow attests build provenance. "auto" (the generator default) attests only on public repositories; true always attests, for private repositories on GitHub Enterprise Cloud; false omits the attestation step and its permissions.'
|
|
452
|
+
)
|
|
450
453
|
}).superRefine((distribution, context) => {
|
|
451
454
|
if (distribution.homebrew !== void 0 || distribution.scoop !== void 0) {
|
|
452
455
|
return;
|
|
@@ -459,6 +462,9 @@ var cliDistributionConfigSchema = zod.z.strictObject({
|
|
|
459
462
|
});
|
|
460
463
|
return;
|
|
461
464
|
}
|
|
465
|
+
if (distribution.githubAttestations !== void 0) {
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
462
468
|
context.addIssue({
|
|
463
469
|
code: "custom",
|
|
464
470
|
message: "distribution must configure at least one channel: homebrew or scoop"
|
|
@@ -470,14 +476,17 @@ var CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE = "CLI_DISTRIBUTION_NON_RELEASE_MODE"
|
|
|
470
476
|
var nonReleaseGithubModes = /* @__PURE__ */ new Set(["pull-request", "push", "commit"]);
|
|
471
477
|
function cliDistributionModeDiagnostic(output, outputPath) {
|
|
472
478
|
const mode = output?.github?.mode;
|
|
473
|
-
|
|
479
|
+
const distribution = output?.distribution;
|
|
480
|
+
if (distribution === void 0 || mode === void 0 || !nonReleaseGithubModes.has(mode)) {
|
|
474
481
|
return void 0;
|
|
475
482
|
}
|
|
483
|
+
const hasChannel = distribution.homebrew !== void 0 || distribution.scoop !== void 0;
|
|
484
|
+
const consequence = hasChannel ? "Homebrew and Scoop publish only after a semantic-version tag is pushed to the repository." : "the release workflow, including its githubAttestations setting, runs only after a semantic-version tag is pushed to the repository.";
|
|
476
485
|
return {
|
|
477
486
|
code: CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE,
|
|
478
487
|
severity: "warning",
|
|
479
488
|
path: [...outputPath, "github", "mode"],
|
|
480
|
-
reason: `GitHub mode "${mode}" does not create a release tag, so
|
|
489
|
+
reason: `GitHub mode "${mode}" does not create a release tag, so ${consequence}`,
|
|
481
490
|
suggestedAction: 'Use mode "release" or "commit-and-release", or push a version tag after merging generated changes.'
|
|
482
491
|
};
|
|
483
492
|
}
|
|
@@ -702,7 +711,7 @@ var packageScriptSchema = zod.z.strictObject({
|
|
|
702
711
|
command: nonEmptyStringSchema.describe("The command executed by the package script.")
|
|
703
712
|
});
|
|
704
713
|
var httpClientSchema = zod.z.strictObject({
|
|
705
|
-
name: zod.z.enum(["axios", "fetch"]).describe("The HTTP client used by generated TypeScript code.")
|
|
714
|
+
name: zod.z.enum(["axios", "fetch", "node-fetch"]).describe("The HTTP client used by generated TypeScript code.")
|
|
706
715
|
});
|
|
707
716
|
var typescriptGenerationConfigSchema = zod.z.strictObject({
|
|
708
717
|
typescriptVersion: nonEmptyStringSchema.optional().describe("The TypeScript version used by the generated project."),
|
|
@@ -718,6 +727,37 @@ var typescriptGenerationConfigSchema = zod.z.strictObject({
|
|
|
718
727
|
/** Name of the top-level namespace export emitted by Fern-compatible TypeScript SDKs. */
|
|
719
728
|
namespaceExportName: nonEmptyStringSchema.optional().describe("The top-level namespace export name."),
|
|
720
729
|
consolidateTypeFiles: zod.z.boolean().optional().describe("Whether generated types are consolidated into fewer source files."),
|
|
730
|
+
formDataSupport: zod.z.enum(["Node16", "Node18"]).optional().describe(
|
|
731
|
+
"The multipart form-data implementation: Node16 uses the form-data packages, Node18 uses the platform FormData."
|
|
732
|
+
),
|
|
733
|
+
allowExtraFields: zod.z.boolean().optional().describe(
|
|
734
|
+
"Whether response parsing keeps unrecognized object keys and accepts unrecognized union members and enum values."
|
|
735
|
+
),
|
|
736
|
+
generateSubpackageExports: zod.z.boolean().optional().describe(
|
|
737
|
+
"Whether the package manifest exports each subpackage client as its own entry point."
|
|
738
|
+
),
|
|
739
|
+
exportAllRequestsAtRoot: zod.z.boolean().optional().describe("Whether every request type is also exported from the package root."),
|
|
740
|
+
generateEndpointMetadata: zod.z.boolean().optional().describe("Whether generated clients expose metadata for each endpoint."),
|
|
741
|
+
outputEsm: zod.z.boolean().optional().describe(
|
|
742
|
+
"Whether the package is marked as an ES module while still shipping its CommonJS build."
|
|
743
|
+
),
|
|
744
|
+
neverThrowErrors: zod.z.boolean().optional().describe(
|
|
745
|
+
"Whether client methods return a wrapped response instead of throwing on a non-2xx status."
|
|
746
|
+
),
|
|
747
|
+
includeOtherInUnionTypes: zod.z.boolean().optional().describe("Whether union types gain a member for variants the SDK does not recognize."),
|
|
748
|
+
includeUtilsOnUnionMembers: zod.z.boolean().optional().describe("Whether helper utilities are generated on each member of a union type."),
|
|
749
|
+
omitFernHeaders: zod.z.boolean().optional().describe("Whether requests omit the SDK identification headers and the User-Agent header."),
|
|
750
|
+
linter: zod.z.enum(["biome", "oxlint", "none"]).optional().describe("The linter configured in the generated project."),
|
|
751
|
+
formatter: zod.z.enum(["prettier", "biome", "oxfmt", "none"]).optional().describe("The formatter configured in the generated project."),
|
|
752
|
+
exports: jsonObjectSchema.optional().describe(
|
|
753
|
+
"package.json exports entries, keyed by subpath, applied over the generated exports. Each subpath replaces the generated one."
|
|
754
|
+
),
|
|
755
|
+
files: zod.z.array(nonEmptyStringSchema).optional().describe("package.json files entries, listed ahead of the generated ones."),
|
|
756
|
+
engines: zod.z.record(nonEmptyStringSchema, nonEmptyStringSchema).optional().describe("package.json engines version ranges, keyed by engine name such as node."),
|
|
757
|
+
lintStaged: zod.z.record(nonEmptyStringSchema, zod.z.array(nonEmptyStringSchema).min(1)).optional().describe("lint-staged commands to run, keyed by file glob."),
|
|
758
|
+
browser: zod.z.record(nonEmptyStringSchema, zod.z.union([zod.z.boolean(), nonEmptyStringSchema])).optional().describe(
|
|
759
|
+
"package.json browser field: a module or file is excluded (false) or replaced by another path."
|
|
760
|
+
),
|
|
721
761
|
allowCustomFetcher: zod.z.boolean().optional().describe("Whether callers can supply a custom fetch implementation."),
|
|
722
762
|
useBrandedStringAliases: zod.z.boolean().optional().describe("Whether string aliases are emitted as distinct branded types."),
|
|
723
763
|
useLegacyExports: zod.z.boolean().optional().describe("Whether the package emits the legacy export layout."),
|
|
@@ -791,7 +831,7 @@ var pythonGenerationConfigSchema = zod.z.strictObject({
|
|
|
791
831
|
additionalInitExports: zod.z.array(additionalInitExportSchema).optional().describe("Additional names re-exported from the package initializer.")
|
|
792
832
|
});
|
|
793
833
|
var rubyGenerationConfigSchema = zod.z.strictObject({
|
|
794
|
-
requirePaths: zod.z.array(nonEmptyStringSchema).optional().describe("
|
|
834
|
+
requirePaths: zod.z.array(nonEmptyStringSchema).optional().describe("Files the generated entry file loads with `require`.")
|
|
795
835
|
});
|
|
796
836
|
var rustGenerationConfigSchema = zod.z.strictObject({
|
|
797
837
|
/**
|
|
@@ -864,6 +904,12 @@ var dependencySchema = zod.z.strictObject({
|
|
|
864
904
|
}).refine(({ source, version }) => source !== void 0 || version !== void 0, {
|
|
865
905
|
message: "dependency must define a version or a source"
|
|
866
906
|
});
|
|
907
|
+
var bugsSchema = zod.z.strictObject({
|
|
908
|
+
url: nonEmptyStringSchema.optional().describe("The issue tracker URL."),
|
|
909
|
+
email: nonEmptyStringSchema.optional().describe("The address for reporting issues.")
|
|
910
|
+
}).refine(({ url, email }) => url !== void 0 || email !== void 0, {
|
|
911
|
+
message: "bugs must define a url or an email"
|
|
912
|
+
});
|
|
867
913
|
var projectUrlSchema = zod.z.strictObject({
|
|
868
914
|
label: nonEmptyStringSchema.describe("The label displayed for the project link."),
|
|
869
915
|
url: nonEmptyStringSchema.describe("The project link URL.")
|
|
@@ -878,6 +924,7 @@ var packageConfigSchema = zod.z.strictObject({
|
|
|
878
924
|
description: zod.z.string().optional().describe("The package description used in generated metadata."),
|
|
879
925
|
repository: nonEmptyStringSchema.optional().describe("The source repository for the generated SDK."),
|
|
880
926
|
homepage: nonEmptyStringSchema.optional().describe("The package homepage URL."),
|
|
927
|
+
bugs: bugsSchema.optional().describe("Where issues with the package are reported."),
|
|
881
928
|
documentationUrl: nonEmptyStringSchema.optional().describe("The package documentation URL."),
|
|
882
929
|
authors: zod.z.array(authorSchema).optional().describe("Authors credited in package metadata."),
|
|
883
930
|
developers: zod.z.array(developerSchema).optional().describe("Developers credited in package metadata."),
|
|
@@ -1163,6 +1210,7 @@ var publishConfigSchema = zod.z.discriminatedUnion("registry", [
|
|
|
1163
1210
|
zod.z.strictObject({
|
|
1164
1211
|
registry: zod.z.literal("rubygems").describe("Publishes the package to a RubyGems-compatible registry."),
|
|
1165
1212
|
apiKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the RubyGems API key."),
|
|
1213
|
+
...trustedPublishingShape,
|
|
1166
1214
|
...commonPublishShape
|
|
1167
1215
|
}),
|
|
1168
1216
|
zod.z.strictObject({
|
|
@@ -1233,7 +1281,7 @@ var githubOutputSchema = zod.z.strictObject({
|
|
|
1233
1281
|
var distributionShape = {
|
|
1234
1282
|
/** Valid only for `cli` targets with GitHub delivery; secret names only, never values. */
|
|
1235
1283
|
distribution: cliDistributionConfigSchema.optional().describe(
|
|
1236
|
-
"CLI release channels
|
|
1284
|
+
"CLI release channels and build attestation settings for the generated release workflow; credentials are GitHub Actions secret names."
|
|
1237
1285
|
)
|
|
1238
1286
|
};
|
|
1239
1287
|
var credentialResolutionShape = {
|
|
@@ -1293,6 +1341,9 @@ var apiImportSettingsSchema = zod.z.strictObject({
|
|
|
1293
1341
|
discriminatedUnionV2: zod.z.boolean().optional().describe("Whether oneOf and anyOf schemas use the newer discriminator inference rules."),
|
|
1294
1342
|
undiscriminatedUnionsWithLiterals: zod.z.boolean().optional().describe("Whether literal-bearing unions remain undiscriminated during import."),
|
|
1295
1343
|
inlineAllOfSchemas: zod.z.boolean().optional().describe("Whether schemas composed with allOf are inlined when possible."),
|
|
1344
|
+
inferDiscriminatedUnionBaseProperties: zod.z.boolean().optional().describe(
|
|
1345
|
+
"Whether properties every discriminated-union variant shares are lifted onto the union."
|
|
1346
|
+
),
|
|
1296
1347
|
resolveSchemaCollisions: zod.z.boolean().optional().describe("Whether colliding imported schema names are resolved automatically."),
|
|
1297
1348
|
asyncApiMessageNaming: zod.z.enum(["v1", "v2"]).optional().describe("The naming strategy used for messages imported from AsyncAPI."),
|
|
1298
1349
|
defaultIntegerFormat: zod.z.enum(["int32", "int64", "uint32", "uint64"]).optional().describe("The integer format used when a schema does not declare one.")
|