@postman/sdk-config 0.19.1 → 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/dist/index.cjs +208 -50
- 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 +208 -51
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +154 -5
- 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 +154 -5
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +154 -5
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +164 -30
- package/dist/sdk-config/v1/index.d.ts +164 -30
- package/dist/sdk-config/v1/index.js +154 -5
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +199 -49
- 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 +199 -50
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +199 -49
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +163 -4
- package/dist/sdk-config-ir/v1/index.d.ts +163 -4
- package/dist/sdk-config-ir/v1/index.js +199 -50
- 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
package/dist/index.cjs
CHANGED
|
@@ -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
|
|
@@ -3055,7 +3196,7 @@ var sdkConfigV1Schema = zod.z.strictObject({
|
|
|
3055
3196
|
docs: sdkConfigV1DocsConfigSchema.prefault({}).describe("Documentation settings inherited by every target."),
|
|
3056
3197
|
generation: sdkConfigV1GenerationConfigSchema.prefault({}).describe("Generation settings inherited by every target."),
|
|
3057
3198
|
targets: zod.z.array(sdkConfigV1TargetSchema).min(1).describe("Language targets to generate; each language may appear once.")
|
|
3058
|
-
}).superRefine(({ output, package: globalPackage, targets }, context) => {
|
|
3199
|
+
}).superRefine(({ api, output, package: globalPackage, targets }, context) => {
|
|
3059
3200
|
const configuredLanguages = /* @__PURE__ */ new Set();
|
|
3060
3201
|
targets.forEach((target, targetIndex) => {
|
|
3061
3202
|
if (configuredLanguages.has(target.language)) {
|
|
@@ -3067,6 +3208,14 @@ var sdkConfigV1Schema = zod.z.strictObject({
|
|
|
3067
3208
|
}
|
|
3068
3209
|
configuredLanguages.add(target.language);
|
|
3069
3210
|
validateTargetPublishing(target, targetIndex, globalPackage, output, context);
|
|
3211
|
+
if (target.language === "cli") {
|
|
3212
|
+
oauthTokenEndpointsIssues(target.generation?.oauthTokenEndpoints, api.auth?.schemes, [
|
|
3213
|
+
"targets",
|
|
3214
|
+
targetIndex,
|
|
3215
|
+
"generation",
|
|
3216
|
+
"oauthTokenEndpoints"
|
|
3217
|
+
]).forEach((issue) => context.addIssue({ code: "custom", ...issue }));
|
|
3218
|
+
}
|
|
3070
3219
|
});
|
|
3071
3220
|
});
|
|
3072
3221
|
function validateSdkConfigV1(value) {
|
|
@@ -4919,63 +5068,71 @@ var sdkConfigIrV1Schema = zod.z.strictObject({
|
|
|
4919
5068
|
"Shared and language-specific generation behavior."
|
|
4920
5069
|
),
|
|
4921
5070
|
compatibility: compatibilityConfigSchema.optional().describe("Temporary provenance and diagnostics retained during legacy migration.")
|
|
4922
|
-
}).superRefine(
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
[
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
5071
|
+
}).superRefine(
|
|
5072
|
+
({ api, compatibility, generation, output, package: packageConfig, target }, context) => {
|
|
5073
|
+
const configuredLanguages = Object.keys(generation.language ?? {});
|
|
5074
|
+
const requiresExternalPublishIdentity = output.delivery === "github" || output.publish !== void 0;
|
|
5075
|
+
if (requiresExternalPublishIdentity) {
|
|
5076
|
+
[
|
|
5077
|
+
["apiName", "target.apiName is required for external publishing"],
|
|
5078
|
+
["organizationName", "target.organizationName is required for external publishing"]
|
|
5079
|
+
].forEach(([field, message]) => {
|
|
5080
|
+
if (!target[field]) {
|
|
5081
|
+
context.addIssue({
|
|
5082
|
+
code: "custom",
|
|
5083
|
+
message,
|
|
5084
|
+
path: ["target", field]
|
|
5085
|
+
});
|
|
5086
|
+
}
|
|
5087
|
+
});
|
|
5088
|
+
}
|
|
5089
|
+
oauthTokenEndpointsIssues(generation.language?.cli?.oauthTokenEndpoints, api.auth?.schemes, [
|
|
5090
|
+
"generation",
|
|
5091
|
+
"language",
|
|
5092
|
+
"cli",
|
|
5093
|
+
"oauthTokenEndpoints"
|
|
5094
|
+
]).forEach((issue) => context.addIssue({ code: "custom", ...issue }));
|
|
5095
|
+
configuredLanguages.forEach((language) => {
|
|
5096
|
+
if (language !== target.language) {
|
|
4931
5097
|
context.addIssue({
|
|
4932
5098
|
code: "custom",
|
|
4933
|
-
message
|
|
4934
|
-
path: ["
|
|
5099
|
+
message: `generation.language.${language} does not match target language "${target.language}"`,
|
|
5100
|
+
path: ["generation", "language", language]
|
|
4935
5101
|
});
|
|
4936
5102
|
}
|
|
4937
5103
|
});
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
5104
|
+
if (output.publish && !publishRegistryLanguages2[output.publish.registry].some(
|
|
5105
|
+
(language) => language === target.language
|
|
5106
|
+
)) {
|
|
4941
5107
|
context.addIssue({
|
|
4942
5108
|
code: "custom",
|
|
4943
|
-
message: `
|
|
4944
|
-
path: ["
|
|
5109
|
+
message: `registry "${output.publish.registry}" is not supported for target language "${target.language}"`,
|
|
5110
|
+
path: ["output", "publish", "registry"]
|
|
4945
5111
|
});
|
|
4946
5112
|
}
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
}
|
|
4957
|
-
if (output.publish) {
|
|
4958
|
-
validatePublishingIdentity2(packageConfig, output.publish.registry, context);
|
|
4959
|
-
if (output.delivery !== "github" && output.publish.shouldGeneratePublishWorkflow === true) {
|
|
4960
|
-
context.addIssue({
|
|
4961
|
-
code: "custom",
|
|
4962
|
-
message: "output.publish.shouldGeneratePublishWorkflow requires GitHub delivery",
|
|
4963
|
-
path: ["output", "publish", "shouldGeneratePublishWorkflow"]
|
|
4964
|
-
});
|
|
5113
|
+
if (output.publish) {
|
|
5114
|
+
validatePublishingIdentity2(packageConfig, output.publish.registry, context);
|
|
5115
|
+
if (output.delivery !== "github" && output.publish.shouldGeneratePublishWorkflow === true) {
|
|
5116
|
+
context.addIssue({
|
|
5117
|
+
code: "custom",
|
|
5118
|
+
message: "output.publish.shouldGeneratePublishWorkflow requires GitHub delivery",
|
|
5119
|
+
path: ["output", "publish", "shouldGeneratePublishWorkflow"]
|
|
5120
|
+
});
|
|
5121
|
+
}
|
|
4965
5122
|
}
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
}
|
|
5123
|
+
validateCliOutput(output, target.language, context);
|
|
5124
|
+
if (compatibility?.legacyInput) {
|
|
5125
|
+
const expectedKind = target.sourceOrigin === "postman" ? "postman-build-parameters" : "fern-generator-invocation";
|
|
5126
|
+
if (compatibility.legacyInput.kind !== expectedKind) {
|
|
5127
|
+
context.addIssue({
|
|
5128
|
+
code: "custom",
|
|
5129
|
+
message: `compatibility.legacyInput kind "${compatibility.legacyInput.kind}" does not match target.sourceOrigin "${target.sourceOrigin}"`,
|
|
5130
|
+
path: ["compatibility", "legacyInput", "kind"]
|
|
5131
|
+
});
|
|
5132
|
+
}
|
|
4976
5133
|
}
|
|
4977
5134
|
}
|
|
4978
|
-
|
|
5135
|
+
);
|
|
4979
5136
|
function parseSdkConfigIrV1(value) {
|
|
4980
5137
|
return sdkConfigIrV1Schema.parse(value);
|
|
4981
5138
|
}
|
|
@@ -5043,6 +5200,7 @@ exports.mapFernConfigToSdkConfigV1 = mapFernConfigToSdkConfigV1;
|
|
|
5043
5200
|
exports.mcpAvailabilityStatuses = mcpAvailabilityStatuses;
|
|
5044
5201
|
exports.mcpGenerationConfigSchema = mcpGenerationConfigSchema;
|
|
5045
5202
|
exports.nonEmptyStringSchema = nonEmptyStringSchema;
|
|
5203
|
+
exports.oauthTokenEndpointsIssues = oauthTokenEndpointsIssues;
|
|
5046
5204
|
exports.outputConfigSchema = outputConfigSchema;
|
|
5047
5205
|
exports.packageConfigSchema = packageConfigSchema;
|
|
5048
5206
|
exports.parentRelativePathSchema = parentRelativePathSchema;
|