@postman/sdk-config 0.18.0 → 0.20.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 +1 -1
- package/dist/index.cjs +237 -58
- 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 +237 -59
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +173 -11
- 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 +173 -11
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +173 -11
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +6032 -294
- package/dist/sdk-config/v1/index.d.ts +6032 -294
- package/dist/sdk-config/v1/index.js +173 -11
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +209 -51
- 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 +209 -52
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +209 -51
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +1203 -6
- package/dist/sdk-config-ir/v1/index.d.ts +1203 -6
- package/dist/sdk-config-ir/v1/index.js +209 -52
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/{typescript-D0YeGxxS.d.cts → typescript-VEqEGvnA.d.cts} +60 -1
- package/dist/{typescript-D0YeGxxS.d.ts → typescript-VEqEGvnA.d.ts} +60 -1
- package/package.json +2 -2
- package/src/sdk-config/v1/README.md +59 -4
|
@@ -140,6 +140,39 @@ var publicClientIdSchema = nonEmptyStringSchema.refine((value) => value.trim() =
|
|
|
140
140
|
}).refine((value) => !value.includes("${"), {
|
|
141
141
|
message: "must be a literal public client ID, not an environment expression"
|
|
142
142
|
});
|
|
143
|
+
var oauthExtraParametersSchema = zod.z.record(zod.z.string().min(1), zod.z.string());
|
|
144
|
+
function parseUrl(value) {
|
|
145
|
+
try {
|
|
146
|
+
return new URL(value);
|
|
147
|
+
} catch {
|
|
148
|
+
return void 0;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
var loopbackRedirectUriSchema = nonEmptyStringSchema.refine(
|
|
152
|
+
(value) => {
|
|
153
|
+
const url = parseUrl(value);
|
|
154
|
+
return url !== void 0 && url.protocol === "http:" && (url.hostname === "127.0.0.1" || url.hostname === "localhost") && url.port !== "";
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
message: "must be an http URL on 127.0.0.1 or localhost that pins a port, such as http://127.0.0.1:8484/callback"
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
function containsControlCharacter(value) {
|
|
161
|
+
return [...value].some((character) => {
|
|
162
|
+
const code = character.charCodeAt(0);
|
|
163
|
+
return code <= 31 || code === 127;
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
var hostedPageUrlSchema = nonEmptyStringSchema.refine(
|
|
167
|
+
(value) => {
|
|
168
|
+
const url = parseUrl(value);
|
|
169
|
+
return url !== void 0 && (url.protocol === "http:" || url.protocol === "https:");
|
|
170
|
+
},
|
|
171
|
+
{ message: "must be an absolute http or https URL" }
|
|
172
|
+
).refine((value) => !containsControlCharacter(value), {
|
|
173
|
+
message: "must not contain control characters"
|
|
174
|
+
});
|
|
175
|
+
var redirectPortSchema = zod.z.number().int().min(1).max(65535);
|
|
143
176
|
var oauthFlowSchema = zod.z.discriminatedUnion("type", [
|
|
144
177
|
zod.z.strictObject({
|
|
145
178
|
type: zod.z.literal("authorization-code").describe("Uses the OAuth authorization code flow."),
|
|
@@ -149,7 +182,25 @@ var oauthFlowSchema = zod.z.discriminatedUnion("type", [
|
|
|
149
182
|
scopes: zod.z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow."),
|
|
150
183
|
clientId: publicClientIdSchema.optional().describe(
|
|
151
184
|
"The public, non-secret OAuth client ID that generated interactive login flows, such as CLI browser login with PKCE, send to the authorization and token endpoints. It is embedded verbatim in generated code, so it must never be a client secret."
|
|
152
|
-
)
|
|
185
|
+
),
|
|
186
|
+
redirectUri: loopbackRedirectUriSchema.optional().describe(
|
|
187
|
+
"The loopback callback of the interactive login, such as http://127.0.0.1:8484/callback. The login binds this exact host, port and path and sends it to the authorization server, so it must match the redirect registered there. Without it the login uses a free port chosen by the operating system."
|
|
188
|
+
),
|
|
189
|
+
redirectUriBackupPorts: zod.z.array(redirectPortSchema).min(1).optional().describe(
|
|
190
|
+
"Ports tried in order when the port of redirectUri is busy. Each reuses the host and path of redirectUri, and every resulting URI must be registered with the authorization server. Requires redirectUri."
|
|
191
|
+
),
|
|
192
|
+
successRedirectUrl: hostedPageUrlSchema.optional().describe(
|
|
193
|
+
"A page the browser is sent to once the login captured the authorization code. Without it the login shows its own page."
|
|
194
|
+
),
|
|
195
|
+
errorRedirectUrl: hostedPageUrlSchema.optional().describe(
|
|
196
|
+
"A page the browser is sent to when the login fails; the error and error_description query parameters are added. Without it the login shows its own page."
|
|
197
|
+
),
|
|
198
|
+
authorizationParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the authorization request, such as audience."),
|
|
199
|
+
tokenParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the authorization code exchange request."),
|
|
200
|
+
refreshParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the token refresh request.")
|
|
201
|
+
}).refine((flow) => flow.redirectUriBackupPorts === void 0 || flow.redirectUri !== void 0, {
|
|
202
|
+
message: "redirectUriBackupPorts requires redirectUri",
|
|
203
|
+
path: ["redirectUriBackupPorts"]
|
|
153
204
|
}),
|
|
154
205
|
zod.z.strictObject({
|
|
155
206
|
type: zod.z.literal("client-credentials").describe("Uses the OAuth client credentials flow."),
|
|
@@ -168,21 +219,47 @@ var oauthFlowSchema = zod.z.discriminatedUnion("type", [
|
|
|
168
219
|
tokenUrl: nonEmptyStringSchema.describe("The URL used to obtain access tokens."),
|
|
169
220
|
refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
|
|
170
221
|
scopes: zod.z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
|
|
222
|
+
}),
|
|
223
|
+
zod.z.strictObject({
|
|
224
|
+
type: zod.z.literal("device-code").describe(
|
|
225
|
+
"Uses the OAuth device authorization flow (RFC 8628) for logins without a browser."
|
|
226
|
+
),
|
|
227
|
+
clientId: publicClientIdSchema.describe(
|
|
228
|
+
"The public, non-secret OAuth client ID sent to the device authorization and token endpoints. It is embedded verbatim in generated code, so it must never be a client secret."
|
|
229
|
+
),
|
|
230
|
+
deviceAuthorizationUrl: nonEmptyStringSchema.describe(
|
|
231
|
+
"The URL that issues the device code, the user code and the verification URL."
|
|
232
|
+
),
|
|
233
|
+
tokenUrl: nonEmptyStringSchema.describe(
|
|
234
|
+
"The URL polled to exchange the device code for tokens once the user approved."
|
|
235
|
+
),
|
|
236
|
+
refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
|
|
237
|
+
scopes: zod.z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow."),
|
|
238
|
+
deviceAuthorizationParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the device authorization request, such as audience."),
|
|
239
|
+
tokenParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the token polling request."),
|
|
240
|
+
refreshParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the token refresh request.")
|
|
171
241
|
})
|
|
172
242
|
]);
|
|
173
|
-
var
|
|
243
|
+
var oauth2AuthObjectSchema = zod.z.strictObject({
|
|
174
244
|
id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
|
|
175
245
|
type: zod.z.literal("oauth2").describe("Identifies an OAuth 2.0 authentication scheme."),
|
|
176
246
|
flows: zod.z.array(oauthFlowSchema).min(1).describe("The OAuth flows supported by the API."),
|
|
177
247
|
clientId: authVariableSchema.optional().describe("The OAuth client ID parameter exposed by the SDK."),
|
|
178
248
|
clientSecret: authVariableSchema.optional().describe("The OAuth client secret parameter exposed by the SDK."),
|
|
179
249
|
tokenHeader: nonEmptyStringSchema.optional().describe("The request header that carries the OAuth access token."),
|
|
180
|
-
tokenPrefix: nonEmptyStringSchema.optional().describe(
|
|
250
|
+
tokenPrefix: nonEmptyStringSchema.optional().describe('The prefix added before the OAuth access token. Defaults to "Bearer" when omitted.'),
|
|
251
|
+
omitTokenPrefix: zod.z.boolean().optional().describe(
|
|
252
|
+
'Whether the OAuth access token is sent as-is, with no prefix. Without it, a missing tokenPrefix means "Bearer". Cannot be combined with tokenPrefix.'
|
|
253
|
+
),
|
|
181
254
|
refreshBufferSeconds: zod.z.number().nonnegative().optional().describe("How early, in seconds, the client refreshes a token before it expires."),
|
|
182
255
|
description: zod.z.string().optional().describe(
|
|
183
256
|
"A description of the authentication scheme included in generated SDK documentation."
|
|
184
257
|
)
|
|
185
258
|
});
|
|
259
|
+
var oauth2AuthSchema = oauth2AuthObjectSchema.refine(
|
|
260
|
+
(scheme) => !(scheme.omitTokenPrefix === true && scheme.tokenPrefix !== void 0),
|
|
261
|
+
{ message: "omitTokenPrefix cannot be combined with tokenPrefix", path: ["omitTokenPrefix"] }
|
|
262
|
+
);
|
|
186
263
|
var customAuthParameterSchema = zod.z.strictObject({
|
|
187
264
|
location: zod.z.enum(["header", "query", "cookie"]).describe("Where the custom authentication value is sent."),
|
|
188
265
|
name: nonEmptyStringSchema.describe("The header, query parameter, or cookie name."),
|
|
@@ -838,6 +915,9 @@ var RESERVED_PROFILES_COMMAND_NAMES = /* @__PURE__ */ new Set([
|
|
|
838
915
|
var binaryNameSchema = nonEmptyStringSchema.regex(ALPHANUMERIC_PATTERN, {
|
|
839
916
|
message: "binaryName must contain at least one ASCII letter or digit"
|
|
840
917
|
});
|
|
918
|
+
var crateNameSchema = zod.z.string().regex(/^[A-Za-z][A-Za-z0-9_-]{0,63}$/, {
|
|
919
|
+
message: "crateName must start with a letter, contain only letters, digits, hyphens, and underscores, and be at most 64 characters"
|
|
920
|
+
});
|
|
841
921
|
var rootGroupSchema = zod.z.string().regex(ROOT_GROUP_PATTERN, {
|
|
842
922
|
message: "rootGroup must start with a lowercase letter and contain only lowercase letters, digits, hyphens, and underscores"
|
|
843
923
|
});
|
|
@@ -902,17 +982,78 @@ var profilesConfigSchema = zod.z.strictObject({
|
|
|
902
982
|
revokeOperation: dottedCommandPathSchema("profiles.revokeOperation").optional().describe('The dotted command path called by "profiles remove --revoke".'),
|
|
903
983
|
provisionOperation: profilesProvisionOperationSchema.optional().describe('The operation called by "profiles create --provision" and its response mapping.')
|
|
904
984
|
});
|
|
985
|
+
var oauthPropertyPathSchema = zod.z.string().regex(FIELD_NAME_PATTERN, {
|
|
986
|
+
message: 'must be a property name, or a dotted path to a nested property, such as "data.token"'
|
|
987
|
+
}).regex(/^[^.]+(\.[^.]+)*$/, { message: "must not have an empty path segment" });
|
|
988
|
+
var oauthTokenRequestPropertiesSchema = zod.z.strictObject({
|
|
989
|
+
clientId: oauthPropertyPathSchema.optional().describe('The request property that carries the client ID. Defaults to "client_id".'),
|
|
990
|
+
clientSecret: oauthPropertyPathSchema.optional().describe('The request property that carries the client secret. Defaults to "client_secret".'),
|
|
991
|
+
scopes: oauthPropertyPathSchema.optional().describe('The request property that carries the scopes. Defaults to "scope".')
|
|
992
|
+
});
|
|
993
|
+
var oauthTokenResponsePropertiesSchema = zod.z.strictObject({
|
|
994
|
+
accessToken: oauthPropertyPathSchema.optional().describe('The response property that holds the access token. Defaults to "access_token".'),
|
|
995
|
+
expiresIn: oauthPropertyPathSchema.optional().describe(
|
|
996
|
+
'The response property that holds the lifetime in seconds. Defaults to "expires_in".'
|
|
997
|
+
),
|
|
998
|
+
refreshToken: oauthPropertyPathSchema.optional().describe('The response property that holds the refresh token. Defaults to "refresh_token".')
|
|
999
|
+
});
|
|
1000
|
+
var oauthTokenEndpointsSchema = zod.z.strictObject({
|
|
1001
|
+
token: zod.z.strictObject({
|
|
1002
|
+
requestProperties: oauthTokenRequestPropertiesSchema.optional().describe("The names of the properties of the token request."),
|
|
1003
|
+
responseProperties: oauthTokenResponsePropertiesSchema.optional().describe("The names of the properties of the token response.")
|
|
1004
|
+
}).optional().describe("The token endpoint of the client credentials flow (its tokenUrl)."),
|
|
1005
|
+
refresh: zod.z.strictObject({
|
|
1006
|
+
requestProperties: zod.z.strictObject({
|
|
1007
|
+
refreshToken: oauthPropertyPathSchema.optional().describe(
|
|
1008
|
+
'The request property that carries the refresh token. Defaults to "refresh_token".'
|
|
1009
|
+
)
|
|
1010
|
+
}).optional().describe("The names of the properties of the refresh request."),
|
|
1011
|
+
responseProperties: oauthTokenResponsePropertiesSchema.optional().describe("The names of the properties of the refresh response.")
|
|
1012
|
+
}).optional().describe("The refresh endpoint of the client credentials flow (its refreshUrl).")
|
|
1013
|
+
});
|
|
1014
|
+
function oauthTokenEndpointsIssues(oauthTokenEndpoints, schemes, basePath) {
|
|
1015
|
+
const flowsById = /* @__PURE__ */ new Map();
|
|
1016
|
+
for (const scheme of schemes ?? []) {
|
|
1017
|
+
const flow = scheme.type === "oauth2" ? scheme.flows?.find((f) => f.type === "client-credentials") : void 0;
|
|
1018
|
+
if (flow !== void 0) {
|
|
1019
|
+
flowsById.set(scheme.id, flow);
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
return Object.entries(oauthTokenEndpoints ?? {}).flatMap(([id, endpoints]) => {
|
|
1023
|
+
const flow = flowsById.get(id);
|
|
1024
|
+
if (flow === void 0) {
|
|
1025
|
+
return [
|
|
1026
|
+
{
|
|
1027
|
+
message: `oauthTokenEndpoints "${id}" must name an OAuth scheme with a client-credentials flow`,
|
|
1028
|
+
path: [...basePath, id]
|
|
1029
|
+
}
|
|
1030
|
+
];
|
|
1031
|
+
}
|
|
1032
|
+
return endpoints.refresh !== void 0 && flow.refreshUrl === void 0 ? [
|
|
1033
|
+
{
|
|
1034
|
+
message: `oauthTokenEndpoints "${id}" has refresh settings, but its flow has no refreshUrl`,
|
|
1035
|
+
path: [...basePath, id, "refresh"]
|
|
1036
|
+
}
|
|
1037
|
+
] : [];
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
905
1040
|
var cliGenerationConfigSchema = zod.z.strictObject({
|
|
906
1041
|
paginationParameters: zod.z.array(nonEmptyStringSchema).optional().describe("Request parameter names treated as pagination controls by the CLI."),
|
|
907
1042
|
skills: zod.z.boolean().optional().describe("Whether the generated CLI includes skills that teach AI agents to invoke commands."),
|
|
908
1043
|
binaryName: binaryNameSchema.optional().describe(
|
|
909
1044
|
"The CLI executable name. The generator kebab-cases it and also uses it for the source directory and env-var prefix."
|
|
910
1045
|
),
|
|
1046
|
+
crateName: crateNameSchema.optional().describe(
|
|
1047
|
+
"The name of the generated Cargo package, which release archives and installers are named after. The generator defaults it to the binary name when the output is delivered to GitHub."
|
|
1048
|
+
),
|
|
911
1049
|
customCommands: zod.z.boolean().optional().describe("Whether hand-written command support is generated. The generator defaults to true."),
|
|
912
1050
|
rootGroup: rootGroupSchema.optional().describe("A command group that every spec-derived command is nested under."),
|
|
913
1051
|
profiles: profilesConfigSchema.optional().describe("Named profile command configuration."),
|
|
914
1052
|
splitTypeCrates: zod.z.boolean().optional().describe("Whether generated types are split into one crate per API behind a facade crate."),
|
|
915
|
-
userAgentSuffixFlag: userAgentSuffixFlagSchema.optional().describe('The long flag name, without "--", that appends a product token to the User-Agent.')
|
|
1053
|
+
userAgentSuffixFlag: userAgentSuffixFlagSchema.optional().describe('The long flag name, without "--", that appends a product token to the User-Agent.'),
|
|
1054
|
+
oauthTokenEndpoints: zod.z.record(nonEmptyStringSchema, oauthTokenEndpointsSchema).optional().describe(
|
|
1055
|
+
"Per OAuth scheme id (api.auth.schemes[].id), the names of the properties of the token and refresh requests and responses, for the client credentials flow of an API whose token endpoint does not use the RFC 6749 names."
|
|
1056
|
+
)
|
|
916
1057
|
});
|
|
917
1058
|
|
|
918
1059
|
// src/sdk-config/v1/fern-config-mapper-cli.ts
|
|
@@ -2450,6 +2591,12 @@ var zipOutputSchema = zod.z.strictObject({
|
|
|
2450
2591
|
fileName: nonEmptyStringSchema.optional().describe("The generated ZIP archive file name."),
|
|
2451
2592
|
publish: sdkConfigV1PublishConfigSchema.optional().describe("Optional package registry publication.")
|
|
2452
2593
|
});
|
|
2594
|
+
var localAliasOutputSchema = zipOutputSchema.extend({
|
|
2595
|
+
delivery: zod.z.literal("local").describe('Alias of "zip": the package on the local machine.')
|
|
2596
|
+
}).transform(normalizeLocalDelivery);
|
|
2597
|
+
function normalizeLocalDelivery(output) {
|
|
2598
|
+
return { ...output, delivery: "zip" };
|
|
2599
|
+
}
|
|
2453
2600
|
var githubDeliverySchema = zod.z.strictObject({
|
|
2454
2601
|
delivery: zod.z.literal("github").describe("Delivers the generated SDK to GitHub."),
|
|
2455
2602
|
github: githubOutputSchema.describe("GitHub repository delivery settings."),
|
|
@@ -2457,8 +2604,8 @@ var githubDeliverySchema = zod.z.strictObject({
|
|
|
2457
2604
|
});
|
|
2458
2605
|
var sdkConfigV1OutputConfigSchema = zod.z.discriminatedUnion(
|
|
2459
2606
|
"delivery",
|
|
2460
|
-
[filesOutputSchema, zipOutputSchema, githubDeliverySchema],
|
|
2461
|
-
{ error: 'output.delivery must be one of "files", "zip", or "github"' }
|
|
2607
|
+
[filesOutputSchema, zipOutputSchema, githubDeliverySchema, localAliasOutputSchema],
|
|
2608
|
+
{ error: 'output.delivery must be one of "files", "zip", "local", or "github"' }
|
|
2462
2609
|
);
|
|
2463
2610
|
var hostedOutputSchema = zod.z.strictObject({
|
|
2464
2611
|
delivery: zod.z.literal("hosted").describe("Deploys the generated MCP server to Fern-hosted infrastructure."),
|
|
@@ -2468,8 +2615,14 @@ var hostedOutputSchema = zod.z.strictObject({
|
|
|
2468
2615
|
});
|
|
2469
2616
|
var sdkConfigV1McpOutputConfigSchema = zod.z.discriminatedUnion(
|
|
2470
2617
|
"delivery",
|
|
2471
|
-
[
|
|
2472
|
-
|
|
2618
|
+
[
|
|
2619
|
+
filesOutputSchema,
|
|
2620
|
+
zipOutputSchema,
|
|
2621
|
+
githubDeliverySchema,
|
|
2622
|
+
hostedOutputSchema,
|
|
2623
|
+
localAliasOutputSchema
|
|
2624
|
+
],
|
|
2625
|
+
{ error: 'output.delivery must be one of "files", "zip", "local", "github", or "hosted"' }
|
|
2473
2626
|
);
|
|
2474
2627
|
var cliDistributionShape = {
|
|
2475
2628
|
distribution: cliDistributionConfigSchema.optional().describe(
|
|
@@ -2490,9 +2643,10 @@ var sdkConfigV1CliOutputConfigSchema = zod.z.discriminatedUnion(
|
|
|
2490
2643
|
[
|
|
2491
2644
|
filesOutputSchema.extend(cliDistributionShape).superRefine(rejectDistributionWithoutGithub),
|
|
2492
2645
|
zipOutputSchema.extend(cliDistributionShape).superRefine(rejectDistributionWithoutGithub),
|
|
2493
|
-
githubDeliverySchema.extend(cliDistributionShape)
|
|
2646
|
+
githubDeliverySchema.extend(cliDistributionShape),
|
|
2647
|
+
localAliasOutputSchema.in.extend(cliDistributionShape).superRefine(rejectDistributionWithoutGithub).transform(normalizeLocalDelivery)
|
|
2494
2648
|
],
|
|
2495
|
-
{ error: 'output.delivery must be one of "files", "zip", or "github"' }
|
|
2649
|
+
{ error: 'output.delivery must be one of "files", "zip", "local", or "github"' }
|
|
2496
2650
|
);
|
|
2497
2651
|
var sdkConfigV1ReplayConfigSchema = zod.z.strictObject({
|
|
2498
2652
|
enabled: zod.z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
|
|
@@ -3030,7 +3184,7 @@ var sdkConfigV1Schema = zod.z.strictObject({
|
|
|
3030
3184
|
docs: sdkConfigV1DocsConfigSchema.prefault({}).describe("Documentation settings inherited by every target."),
|
|
3031
3185
|
generation: sdkConfigV1GenerationConfigSchema.prefault({}).describe("Generation settings inherited by every target."),
|
|
3032
3186
|
targets: zod.z.array(sdkConfigV1TargetSchema).min(1).describe("Language targets to generate; each language may appear once.")
|
|
3033
|
-
}).superRefine(({ output, package: globalPackage, targets }, context) => {
|
|
3187
|
+
}).superRefine(({ api, output, package: globalPackage, targets }, context) => {
|
|
3034
3188
|
const configuredLanguages = /* @__PURE__ */ new Set();
|
|
3035
3189
|
targets.forEach((target, targetIndex) => {
|
|
3036
3190
|
if (configuredLanguages.has(target.language)) {
|
|
@@ -3042,6 +3196,14 @@ var sdkConfigV1Schema = zod.z.strictObject({
|
|
|
3042
3196
|
}
|
|
3043
3197
|
configuredLanguages.add(target.language);
|
|
3044
3198
|
validateTargetPublishing(target, targetIndex, globalPackage, output, context);
|
|
3199
|
+
if (target.language === "cli") {
|
|
3200
|
+
oauthTokenEndpointsIssues(target.generation?.oauthTokenEndpoints, api.auth?.schemes, [
|
|
3201
|
+
"targets",
|
|
3202
|
+
targetIndex,
|
|
3203
|
+
"generation",
|
|
3204
|
+
"oauthTokenEndpoints"
|
|
3205
|
+
]).forEach((issue) => context.addIssue({ code: "custom", ...issue }));
|
|
3206
|
+
}
|
|
3045
3207
|
});
|
|
3046
3208
|
});
|
|
3047
3209
|
function validateSdkConfigV1(value) {
|