@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.
- package/README.md +18 -6
- package/dist/index.cjs +170 -18
- 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 +170 -18
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +164 -17
- 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 +164 -17
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +164 -17
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +429 -31
- package/dist/sdk-config/v1/index.d.ts +429 -31
- package/dist/sdk-config/v1/index.js +164 -17
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +22 -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 +22 -5
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +22 -5
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +30 -4
- package/dist/sdk-config-ir/v1/index.d.ts +30 -4
- package/dist/sdk-config-ir/v1/index.js +22 -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 +35 -12
- package/src/sdk-config-ir/v1/README.md +36 -29
|
@@ -514,7 +514,10 @@ var cliDistributionConfigSchema = zod.z.strictObject({
|
|
|
514
514
|
"A GitHub App used to mint short-lived tokens for every channel without its own tokenSecretName."
|
|
515
515
|
),
|
|
516
516
|
homebrew: cliDistributionHomebrewSchema.optional().describe("Publishes a Homebrew formula to a tap repository on each tagged release."),
|
|
517
|
-
scoop: cliDistributionScoopSchema.optional().describe("Publishes a Scoop manifest to a bucket repository on each tagged release.")
|
|
517
|
+
scoop: cliDistributionScoopSchema.optional().describe("Publishes a Scoop manifest to a bucket repository on each tagged release."),
|
|
518
|
+
githubAttestations: zod.z.union([zod.z.literal("auto"), zod.z.boolean()], { error: 'must be "auto", true, or false' }).optional().describe(
|
|
519
|
+
'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.'
|
|
520
|
+
)
|
|
518
521
|
}).superRefine((distribution, context) => {
|
|
519
522
|
if (distribution.homebrew !== void 0 || distribution.scoop !== void 0) {
|
|
520
523
|
return;
|
|
@@ -527,6 +530,9 @@ var cliDistributionConfigSchema = zod.z.strictObject({
|
|
|
527
530
|
});
|
|
528
531
|
return;
|
|
529
532
|
}
|
|
533
|
+
if (distribution.githubAttestations !== void 0) {
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
530
536
|
context.addIssue({
|
|
531
537
|
code: "custom",
|
|
532
538
|
message: "distribution must configure at least one channel: homebrew or scoop"
|
|
@@ -538,14 +544,17 @@ var CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE = "CLI_DISTRIBUTION_NON_RELEASE_MODE"
|
|
|
538
544
|
var nonReleaseGithubModes = /* @__PURE__ */ new Set(["pull-request", "push", "commit"]);
|
|
539
545
|
function cliDistributionModeDiagnostic(output, outputPath) {
|
|
540
546
|
const mode = output?.github?.mode;
|
|
541
|
-
|
|
547
|
+
const distribution = output?.distribution;
|
|
548
|
+
if (distribution === void 0 || mode === void 0 || !nonReleaseGithubModes.has(mode)) {
|
|
542
549
|
return void 0;
|
|
543
550
|
}
|
|
551
|
+
const hasChannel = distribution.homebrew !== void 0 || distribution.scoop !== void 0;
|
|
552
|
+
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.";
|
|
544
553
|
return {
|
|
545
554
|
code: CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE,
|
|
546
555
|
severity: "warning",
|
|
547
556
|
path: [...outputPath, "github", "mode"],
|
|
548
|
-
reason: `GitHub mode "${mode}" does not create a release tag, so
|
|
557
|
+
reason: `GitHub mode "${mode}" does not create a release tag, so ${consequence}`,
|
|
549
558
|
suggestedAction: 'Use mode "release" or "commit-and-release", or push a version tag after merging generated changes.'
|
|
550
559
|
};
|
|
551
560
|
}
|
|
@@ -980,6 +989,7 @@ var DISTRIBUTION_KEYS = {
|
|
|
980
989
|
homebrew: { tap: "tap", formula: "formula", tokenEnvironmentVariable: "tokenSecretName" },
|
|
981
990
|
scoop: { bucket: "bucket", tokenEnvironmentVariable: "tokenSecretName" }
|
|
982
991
|
};
|
|
992
|
+
var DISTRIBUTION_SCALAR_KEYS = ["githubAttestations"];
|
|
983
993
|
function mapCliDistribution(config, state, basePath, targetIndex) {
|
|
984
994
|
if (!Object.hasOwn(config, "distribution")) return;
|
|
985
995
|
const raw = config.distribution;
|
|
@@ -1026,6 +1036,11 @@ function translateDistribution(distribution, path) {
|
|
|
1026
1036
|
}
|
|
1027
1037
|
value[block] = translatedBlock;
|
|
1028
1038
|
}
|
|
1039
|
+
for (const key of DISTRIBUTION_SCALAR_KEYS) {
|
|
1040
|
+
if (!Object.hasOwn(distribution, key)) continue;
|
|
1041
|
+
value[key] = distribution[key];
|
|
1042
|
+
consumedPaths.push([...path, key]);
|
|
1043
|
+
}
|
|
1029
1044
|
return { value, consumedPaths, legacyKeys };
|
|
1030
1045
|
}
|
|
1031
1046
|
function invalidDistributionDiagnostic(issue, path, legacyKeys, targetIndex) {
|
|
@@ -1165,6 +1180,7 @@ function mapOutput(generator, language, index) {
|
|
|
1165
1180
|
output.publishV2,
|
|
1166
1181
|
rawOutput,
|
|
1167
1182
|
language,
|
|
1183
|
+
"zip",
|
|
1168
1184
|
[...outputPath, "publishV2"],
|
|
1169
1185
|
state,
|
|
1170
1186
|
index
|
|
@@ -1186,6 +1202,7 @@ function mapOutput(generator, language, index) {
|
|
|
1186
1202
|
output.registryOverrides,
|
|
1187
1203
|
rawOutput,
|
|
1188
1204
|
language,
|
|
1205
|
+
"zip",
|
|
1189
1206
|
[...outputPath, "registryOverrides"],
|
|
1190
1207
|
state,
|
|
1191
1208
|
index
|
|
@@ -1213,7 +1230,14 @@ function mapOutput(generator, language, index) {
|
|
|
1213
1230
|
}
|
|
1214
1231
|
}
|
|
1215
1232
|
function sanitizeNormalizedOutput(output, rawOutput, state, index) {
|
|
1216
|
-
const publish = output.publish ? sanitizePublishConfig(
|
|
1233
|
+
const publish = output.publish ? sanitizePublishConfig(
|
|
1234
|
+
output.publish,
|
|
1235
|
+
output.publish,
|
|
1236
|
+
rawOutput,
|
|
1237
|
+
output.delivery,
|
|
1238
|
+
state,
|
|
1239
|
+
index
|
|
1240
|
+
) : void 0;
|
|
1217
1241
|
const publishShape = publish ? { publish } : {};
|
|
1218
1242
|
if (output.delivery !== "github") return { ...output, ...publishShape };
|
|
1219
1243
|
const { credentials, ...github } = output.github;
|
|
@@ -1240,13 +1264,22 @@ function githubOutput(value, publishInfo, rawOutput, language, sourcePath, state
|
|
|
1240
1264
|
);
|
|
1241
1265
|
consume(state, [...sourcePath, "owner"]);
|
|
1242
1266
|
consume(state, [...sourcePath, "repo"]);
|
|
1243
|
-
const publication = publishInfo ? mapPublication(
|
|
1267
|
+
const publication = publishInfo ? mapPublication(
|
|
1268
|
+
publishInfo,
|
|
1269
|
+
rawOutput,
|
|
1270
|
+
language,
|
|
1271
|
+
"github",
|
|
1272
|
+
[...sourcePath, "publishInfo"],
|
|
1273
|
+
state,
|
|
1274
|
+
index
|
|
1275
|
+
) : void 0;
|
|
1244
1276
|
const type = stringValue(value.type);
|
|
1245
1277
|
const licensePackage = mapGithubLicense(value.license, [...sourcePath, "license"], state);
|
|
1246
1278
|
const reviewers = mapReviewers(value.reviewers, [...sourcePath, "reviewers"], state);
|
|
1247
1279
|
if (type) consume(state, [...sourcePath, "type"]);
|
|
1248
1280
|
if (typeof value.makePr === "boolean") consume(state, [...sourcePath, "makePr"]);
|
|
1249
|
-
|
|
1281
|
+
const workflows = typeof value.workflows === "boolean" ? value.workflows : void 0;
|
|
1282
|
+
if (workflows !== void 0) consume(state, [...sourcePath, "workflows"]);
|
|
1250
1283
|
if (stringValue(value.host)) consume(state, [...sourcePath, "host"]);
|
|
1251
1284
|
if (stringValue(value.branch)) consume(state, [...sourcePath, "branch"]);
|
|
1252
1285
|
consumeCredentialObject(value.credentials, [...sourcePath, "credentials"], state);
|
|
@@ -1266,7 +1299,8 @@ function githubOutput(value, publishInfo, rawOutput, language, sourcePath, state
|
|
|
1266
1299
|
...optional("host", stringValue(value.host)),
|
|
1267
1300
|
...optional("branch", stringValue(value.branch)),
|
|
1268
1301
|
mode: value.makePr === true || type === "pullRequest" ? "pull-request" : type === "push" ? "push" : "release",
|
|
1269
|
-
...optional("reviewers", reviewers)
|
|
1302
|
+
...optional("reviewers", reviewers),
|
|
1303
|
+
...workflows === false ? { workflows } : {}
|
|
1270
1304
|
},
|
|
1271
1305
|
...publication ? { publish: publication.publish } : {}
|
|
1272
1306
|
},
|
|
@@ -1333,7 +1367,7 @@ function reviewerNames(value, expectedType, sourcePath, state) {
|
|
|
1333
1367
|
});
|
|
1334
1368
|
return names.length ? names : void 0;
|
|
1335
1369
|
}
|
|
1336
|
-
function mapPublication(value, rawOutput, language, sourcePath, state, index) {
|
|
1370
|
+
function mapPublication(value, rawOutput, language, delivery, sourcePath, state, index) {
|
|
1337
1371
|
if (!isObject(value))
|
|
1338
1372
|
fail(
|
|
1339
1373
|
"FERN_PUBLICATION_INVALID",
|
|
@@ -1354,6 +1388,7 @@ function mapPublication(value, rawOutput, language, sourcePath, state, index) {
|
|
|
1354
1388
|
compact({ registry, url: registryUrl }),
|
|
1355
1389
|
nested,
|
|
1356
1390
|
rawOutput,
|
|
1391
|
+
delivery,
|
|
1357
1392
|
state,
|
|
1358
1393
|
index
|
|
1359
1394
|
);
|
|
@@ -1374,7 +1409,7 @@ function mapPublication(value, rawOutput, language, sourcePath, state, index) {
|
|
|
1374
1409
|
...packageName || Object.keys(metadata).length ? { package: { ...optional("packageName", packageName), ...metadata } } : {}
|
|
1375
1410
|
};
|
|
1376
1411
|
}
|
|
1377
|
-
function sanitizePublishConfig(publish, resolvedPublication, rawOutput, state, index) {
|
|
1412
|
+
function sanitizePublishConfig(publish, resolvedPublication, rawOutput, delivery, state, index) {
|
|
1378
1413
|
const rawPublication = rawOutput?.location === publish.registry ? rawOutput : void 0;
|
|
1379
1414
|
const rawPath = ["group", "generators", index, "output"];
|
|
1380
1415
|
if (publish.registry === "npm" || publish.registry === "crates") {
|
|
@@ -1470,6 +1505,33 @@ function sanitizePublishConfig(publish, resolvedPublication, rawOutput, state, i
|
|
|
1470
1505
|
signature
|
|
1471
1506
|
});
|
|
1472
1507
|
}
|
|
1508
|
+
if (publish.registry === "nuget" || publish.registry === "rubygems") {
|
|
1509
|
+
const apiKey = mapApiKeyExpression(
|
|
1510
|
+
publish.registry,
|
|
1511
|
+
rawPublication,
|
|
1512
|
+
resolvedPublication,
|
|
1513
|
+
rawPath,
|
|
1514
|
+
state,
|
|
1515
|
+
index,
|
|
1516
|
+
fernDefaultApiKey(publish.registry, rawOutput, delivery)
|
|
1517
|
+
);
|
|
1518
|
+
warnForUnexpectedCredentialFields(
|
|
1519
|
+
rawPublication,
|
|
1520
|
+
resolvedPublication,
|
|
1521
|
+
["apiKey"],
|
|
1522
|
+
rawPath,
|
|
1523
|
+
state,
|
|
1524
|
+
index
|
|
1525
|
+
);
|
|
1526
|
+
return compact({
|
|
1527
|
+
registry: publish.registry,
|
|
1528
|
+
url: publish.url,
|
|
1529
|
+
releaseBranch: publish.releaseBranch,
|
|
1530
|
+
tolerateRepublish: publish.tolerateRepublish,
|
|
1531
|
+
apiKey,
|
|
1532
|
+
trustedPublishing: usesTrustedPublishing(rawPublication) || void 0
|
|
1533
|
+
});
|
|
1534
|
+
}
|
|
1473
1535
|
warnForUnrepresentableCredentials(rawPublication, resolvedPublication, rawPath, state, index);
|
|
1474
1536
|
return compact({
|
|
1475
1537
|
registry: publish.registry,
|
|
@@ -1478,11 +1540,19 @@ function sanitizePublishConfig(publish, resolvedPublication, rawOutput, state, i
|
|
|
1478
1540
|
tolerateRepublish: publish.tolerateRepublish
|
|
1479
1541
|
});
|
|
1480
1542
|
}
|
|
1481
|
-
function mapLegacyPublication(value, rawOutput, language, sourcePath, state, index) {
|
|
1543
|
+
function mapLegacyPublication(value, rawOutput, language, delivery, sourcePath, state, index) {
|
|
1482
1544
|
const registry = defaultRegistry(language, sourcePath, index);
|
|
1483
1545
|
const overrides = isObject(value) ? value : {};
|
|
1484
1546
|
const override = isObject(overrides[registry]) ? overrides[registry] : {};
|
|
1485
|
-
return mapPublication(
|
|
1547
|
+
return mapPublication(
|
|
1548
|
+
override,
|
|
1549
|
+
rawOutput,
|
|
1550
|
+
language,
|
|
1551
|
+
delivery,
|
|
1552
|
+
[...sourcePath, registry],
|
|
1553
|
+
state,
|
|
1554
|
+
index
|
|
1555
|
+
);
|
|
1486
1556
|
}
|
|
1487
1557
|
function mapCredentialExpression(rawPublication, resolvedPublication, field, rawPath, state, index) {
|
|
1488
1558
|
const rawValue = rawPublication?.[field];
|
|
@@ -1497,6 +1567,45 @@ function mapCredentialExpression(rawPublication, resolvedPublication, field, raw
|
|
|
1497
1567
|
}
|
|
1498
1568
|
return void 0;
|
|
1499
1569
|
}
|
|
1570
|
+
var TRUSTED_PUBLISHING_VALUES = /* @__PURE__ */ new Set(["OIDC", "<USE_OIDC>"]);
|
|
1571
|
+
function rawApiKeyValue(raw) {
|
|
1572
|
+
return raw?.apiKey ?? raw?.["api-key"];
|
|
1573
|
+
}
|
|
1574
|
+
function usesTrustedPublishing(rawPublication) {
|
|
1575
|
+
const rawValue = rawApiKeyValue(rawPublication);
|
|
1576
|
+
return typeof rawValue === "string" && TRUSTED_PUBLISHING_VALUES.has(rawValue);
|
|
1577
|
+
}
|
|
1578
|
+
function mapApiKeyExpression(registry, rawPublication, resolvedPublication, rawPath, state, index, defaultSecretName) {
|
|
1579
|
+
const rawValue = rawApiKeyValue(rawPublication);
|
|
1580
|
+
if (isEnvironmentExpression(rawValue)) return rawValue;
|
|
1581
|
+
if (usesTrustedPublishing(rawPublication)) return void 0;
|
|
1582
|
+
if (defaultSecretName !== void 0) return defaultSecretName;
|
|
1583
|
+
if (rawValue === void 0 && !hasResolvedCredential(resolvedPublication, "apiKey")) {
|
|
1584
|
+
return void 0;
|
|
1585
|
+
}
|
|
1586
|
+
addCredentialDiagnostic(
|
|
1587
|
+
state,
|
|
1588
|
+
[...rawPath, "apiKey"],
|
|
1589
|
+
["targets", index, "output", "publish", "apiKey"],
|
|
1590
|
+
apiKeyOmissionReason(registry)
|
|
1591
|
+
);
|
|
1592
|
+
return void 0;
|
|
1593
|
+
}
|
|
1594
|
+
function apiKeyOmissionReason(registry) {
|
|
1595
|
+
const label = registry === "nuget" ? "NuGet" : "RubyGems";
|
|
1596
|
+
return `Fern ${label} apiKey is not an exact environment expression naming a secret`;
|
|
1597
|
+
}
|
|
1598
|
+
var FERN_DEFAULT_NUGET_API_KEY = "${NUGET_API_TOKEN}";
|
|
1599
|
+
function fernDefaultApiKey(registry, rawOutput, delivery) {
|
|
1600
|
+
if (registry !== "nuget" || delivery !== "github" || rawOutput?.location !== "nuget") {
|
|
1601
|
+
return void 0;
|
|
1602
|
+
}
|
|
1603
|
+
const rawApiKey = rawApiKeyValue(rawOutput);
|
|
1604
|
+
if (typeof rawApiKey === "string" && TRUSTED_PUBLISHING_VALUES.has(rawApiKey)) {
|
|
1605
|
+
return void 0;
|
|
1606
|
+
}
|
|
1607
|
+
return FERN_DEFAULT_NUGET_API_KEY;
|
|
1608
|
+
}
|
|
1500
1609
|
function mapPypiCredentialExpressions(rawPublication, resolvedPublication, rawPath, state, index) {
|
|
1501
1610
|
const rawToken = rawPublication?.token;
|
|
1502
1611
|
if (isEnvironmentExpression(rawToken)) {
|
|
@@ -2200,6 +2309,29 @@ var mavenSignatureSchema = zod.z.strictObject({
|
|
|
2200
2309
|
"The armored secret key, or an environment expression that resolves to it."
|
|
2201
2310
|
)
|
|
2202
2311
|
});
|
|
2312
|
+
function apiKeySecretSchema(registry, example) {
|
|
2313
|
+
return nonEmptyStringSchema.regex(
|
|
2314
|
+
/^\$\{[A-Za-z_][A-Za-z0-9_]*\}$/,
|
|
2315
|
+
`${registry} apiKey must be an environment expression naming a secret, such as ${example}`
|
|
2316
|
+
);
|
|
2317
|
+
}
|
|
2318
|
+
function apiKeySecretDescription(registry, example) {
|
|
2319
|
+
return `An environment expression naming the repository secret that the generated release workflow reads the ${registry} API key from, such as ${example}. This is a secret name, never the key itself.`;
|
|
2320
|
+
}
|
|
2321
|
+
function trustedPublishingSchema(registry) {
|
|
2322
|
+
return zod.z.boolean().optional().describe(
|
|
2323
|
+
`Whether ${registry} publication uses trusted publishing (OIDC) instead of an API key secret.`
|
|
2324
|
+
);
|
|
2325
|
+
}
|
|
2326
|
+
function refineApiKeyAgainstTrustedPublishing(publish, context) {
|
|
2327
|
+
if (publish.trustedPublishing === true && publish.apiKey !== void 0) {
|
|
2328
|
+
context.addIssue({
|
|
2329
|
+
code: "custom",
|
|
2330
|
+
message: "apiKey must be omitted when trustedPublishing is true",
|
|
2331
|
+
path: ["apiKey"]
|
|
2332
|
+
});
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2203
2335
|
var commonPublishShape = {
|
|
2204
2336
|
url: nonEmptyStringSchema.optional().describe("A custom package registry URL."),
|
|
2205
2337
|
releaseBranch: nonEmptyStringSchema.optional().describe("The branch used by generated package release workflows."),
|
|
@@ -2235,12 +2367,16 @@ var sdkConfigV1PublishConfigSchema = zod.z.discriminatedUnion("registry", [
|
|
|
2235
2367
|
}),
|
|
2236
2368
|
zod.z.strictObject({
|
|
2237
2369
|
registry: zod.z.literal("nuget").describe("Publishes the package to a NuGet-compatible registry."),
|
|
2370
|
+
apiKey: apiKeySecretSchema("NuGet", "${NUGET_API_KEY}").optional().describe(apiKeySecretDescription("NuGet", "${NUGET_API_KEY}")),
|
|
2371
|
+
trustedPublishing: trustedPublishingSchema("NuGet"),
|
|
2238
2372
|
...commonPublishShape
|
|
2239
|
-
}),
|
|
2373
|
+
}).superRefine(refineApiKeyAgainstTrustedPublishing),
|
|
2240
2374
|
zod.z.strictObject({
|
|
2241
2375
|
registry: zod.z.literal("rubygems").describe("Publishes the package to a RubyGems-compatible registry."),
|
|
2376
|
+
apiKey: apiKeySecretSchema("RubyGems", "${RUBYGEMS_API_KEY}").optional().describe(apiKeySecretDescription("RubyGems", "${RUBYGEMS_API_KEY}")),
|
|
2377
|
+
trustedPublishing: trustedPublishingSchema("RubyGems"),
|
|
2242
2378
|
...commonPublishShape
|
|
2243
|
-
}),
|
|
2379
|
+
}).superRefine(refineApiKeyAgainstTrustedPublishing),
|
|
2244
2380
|
zod.z.strictObject({
|
|
2245
2381
|
registry: zod.z.literal("crates").describe("Publishes the crate to a Cargo-compatible registry."),
|
|
2246
2382
|
token: nonEmptyStringSchema.optional().describe("The Cargo registry token, or an environment expression that resolves to it."),
|
|
@@ -2274,7 +2410,10 @@ var githubOutputSchema = zod.z.strictObject({
|
|
|
2274
2410
|
mode: zod.z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional().describe("How generated changes are delivered to the repository."),
|
|
2275
2411
|
reviewers: reviewersSchema.optional().describe("Reviewers requested for generated pull requests."),
|
|
2276
2412
|
credentials: githubCredentialsSchema.optional().describe("Credentials used to authenticate GitHub delivery."),
|
|
2277
|
-
privateRepository: zod.z.boolean().optional().describe("Whether the destination repository is private.")
|
|
2413
|
+
privateRepository: zod.z.boolean().optional().describe("Whether the destination repository is private."),
|
|
2414
|
+
workflows: zod.z.boolean().optional().describe(
|
|
2415
|
+
"Whether generated .github/workflows files are delivered. Defaults to true. When false, newly generated workflow files are skipped and existing ones in the repository are left untouched."
|
|
2416
|
+
)
|
|
2278
2417
|
});
|
|
2279
2418
|
var filesOutputSchema = zod.z.strictObject({
|
|
2280
2419
|
delivery: zod.z.literal("files").describe("Writes the generated SDK to a directory."),
|
|
@@ -2298,7 +2437,7 @@ var sdkConfigV1OutputConfigSchema = zod.z.discriminatedUnion(
|
|
|
2298
2437
|
);
|
|
2299
2438
|
var cliDistributionShape = {
|
|
2300
2439
|
distribution: cliDistributionConfigSchema.optional().describe(
|
|
2301
|
-
"CLI release channels
|
|
2440
|
+
"CLI release channels and build attestation settings for the generated release workflow; credentials are GitHub Actions secret names."
|
|
2302
2441
|
)
|
|
2303
2442
|
};
|
|
2304
2443
|
function rejectDistributionWithoutGithub(output, context) {
|
|
@@ -2344,6 +2483,9 @@ var apiImportSettingsSchema = zod.z.strictObject({
|
|
|
2344
2483
|
discriminatedUnionV2: zod.z.boolean().optional().describe("Whether oneOf and anyOf schemas use the newer discriminator inference rules."),
|
|
2345
2484
|
undiscriminatedUnionsWithLiterals: zod.z.boolean().optional().describe("Whether literal-bearing unions remain undiscriminated during import."),
|
|
2346
2485
|
inlineAllOfSchemas: zod.z.boolean().optional().describe("Whether schemas composed with allOf are inlined when possible."),
|
|
2486
|
+
inferDiscriminatedUnionBaseProperties: zod.z.boolean().optional().describe(
|
|
2487
|
+
"Whether properties every discriminated-union variant shares are lifted onto the union."
|
|
2488
|
+
),
|
|
2347
2489
|
resolveSchemaCollisions: zod.z.boolean().optional().describe("Whether colliding imported schema names are resolved automatically."),
|
|
2348
2490
|
asyncApiMessageNaming: zod.z.enum(["v1", "v2"]).optional().describe("The naming strategy used for messages imported from AsyncAPI."),
|
|
2349
2491
|
defaultIntegerFormat: zod.z.enum(["int32", "int64", "uint32", "uint64"]).optional().describe("The integer format used when a schema does not declare one.")
|
|
@@ -2562,7 +2704,7 @@ var pythonGenerationConfigSchema = zod.z.strictObject({
|
|
|
2562
2704
|
additionalInitExports: zod.z.array(additionalInitExportSchema).optional().describe("Additional names re-exported from the package initializer.")
|
|
2563
2705
|
});
|
|
2564
2706
|
var rubyGenerationConfigSchema = zod.z.strictObject({
|
|
2565
|
-
requirePaths: zod.z.array(nonEmptyStringSchema).optional().describe("
|
|
2707
|
+
requirePaths: zod.z.array(nonEmptyStringSchema).optional().describe("Files the generated entry file loads with `require`.")
|
|
2566
2708
|
});
|
|
2567
2709
|
var rustGenerationConfigSchema = zod.z.strictObject({
|
|
2568
2710
|
/**
|
|
@@ -3293,7 +3435,12 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
|
|
|
3293
3435
|
}
|
|
3294
3436
|
const pythonClient = language === "python" ? takeObject(config, ["client"], state, basePath) : void 0;
|
|
3295
3437
|
const typescriptNaming = language === "typescript" || language === "mcp" ? takeObject(config, ["naming"], state, basePath) : void 0;
|
|
3296
|
-
const directClientName = takeString(
|
|
3438
|
+
const directClientName = takeString(
|
|
3439
|
+
config,
|
|
3440
|
+
language === "ruby" ? ["clientName"] : ["clientName", "clientClassName"],
|
|
3441
|
+
state,
|
|
3442
|
+
basePath
|
|
3443
|
+
);
|
|
3297
3444
|
const nestedClientName = pythonClient ? takeString(pythonClient.value, ["className"], state, pythonClient.path) : typescriptNaming ? takeString(typescriptNaming.value, ["client"], state, typescriptNaming.path) : language === "ruby" ? (
|
|
3298
3445
|
// Fern's Ruby generator renames the root client class (`Auth0::Management`) with it.
|
|
3299
3446
|
takeString(config, ["clientModuleName"], state, basePath)
|