@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
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { FernConfigMappingDiagnostic, FernConfigMappingError, FernConfigMappingResult, FernResolvedGeneratorGroupInput, FernResolvedGeneratorInput, FernSdkConfigLanguage, SDK_CONFIG_V1_SCHEMA_VERSION, SdkConfigV1, SdkConfigV1ApiConfig, SdkConfigV1ApiConfigInput, SdkConfigV1CliOutputConfig, SdkConfigV1ClientConfig, SdkConfigV1ClientConfigInput, SdkConfigV1ClientConfigOverride, SdkConfigV1Dependency, SdkConfigV1DocsConfig, SdkConfigV1Document, SdkConfigV1GenerationConfig, SdkConfigV1GenerationConfigInput, SdkConfigV1GenerationConfigOverride, SdkConfigV1GitRemote, SdkConfigV1Input, SdkConfigV1McpOutputConfig, SdkConfigV1OutputConfig, SdkConfigV1PackageConfig, SdkConfigV1ProtobufRoot, SdkConfigV1ProtobufSource, SdkConfigV1PublishConfig, SdkConfigV1PublishRegistry, SdkConfigV1ReplayConfig, SdkConfigV1SourceConfig, SdkConfigV1SourceSpec, SdkConfigV1Target, SdkConfigV1WebhookSignature, SdkConfigV1WebhookSignatureInput, getSdkConfigV1Diagnostics, mapFernConfigToSdkConfigV1, parseSdkConfigV1, parseSdkConfigV1ForConsumption, sdkConfigV1ApiConfigSchema, sdkConfigV1AuthConfigSchema, sdkConfigV1AuthSchemeSchema, sdkConfigV1CliOutputConfigSchema, sdkConfigV1ClientConfigOverrideSchema, sdkConfigV1ClientConfigSchema, sdkConfigV1DependencySchema, sdkConfigV1DocsConfigSchema, sdkConfigV1GenerationConfigOverrideSchema, sdkConfigV1GenerationConfigSchema, sdkConfigV1GitRemoteSchema, sdkConfigV1McpOutputConfigSchema, sdkConfigV1OutputConfigSchema, sdkConfigV1PackageConfigSchema, sdkConfigV1ProtobufRootSchema, sdkConfigV1ProtobufSourceSchema, sdkConfigV1PublishConfigSchema, sdkConfigV1PublishRegistrySchema, sdkConfigV1ReadmeCustomSectionSchema, sdkConfigV1ReadmeEndpointSchema, sdkConfigV1ReplayConfigSchema, sdkConfigV1Schema, sdkConfigV1SourceConfigSchema, sdkConfigV1SourceSpecSchema, sdkConfigV1TargetSchema, sdkConfigV1WebhookSignatureSchema, splitSdkConfigV1TargetGeneration, validateSdkConfigV1 } from './sdk-config/v1/index.cjs';
|
|
2
|
-
export { C as CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as CliDistributionConfig, b as CliDistributionGithubAppConfig, c as CliDistributionHomebrewConfig, d as CliDistributionScoopConfig, e as CliGenerationConfig, f as
|
|
2
|
+
export { C as CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as CliDistributionConfig, b as CliDistributionGithubAppConfig, c as CliDistributionHomebrewConfig, d as CliDistributionScoopConfig, e as CliGenerationConfig, f as CliOAuthTokenEndpoints, g as CliProfilesConfig, h as CliProfilesProvisionOperation, i as CsharpGenerationConfig, D as Dependency, G as GoGenerationConfig, J as JavaGenerationConfig, j as JsonObject, k as JsonValue, K as KotlinGenerationConfig, M as McpAvailabilityStatus, l as McpGenerationConfig, m as McpToolFilter, P as PackageConfig, n as PhpGenerationConfig, o as PlanModifiers, p as PythonGenerationConfig, R as RubyGenerationConfig, q as RustGenerationConfig, C as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, S as SdkConfigIrV1Diagnostic, a as SdkConfigV1CliDistributionConfig, b as SdkConfigV1CliDistributionGithubAppConfig, c as SdkConfigV1CliDistributionHomebrewConfig, d as SdkConfigV1CliDistributionScoopConfig, S as SdkConfigV1Diagnostic, r as SwiftGenerationConfig, T as TerraformGenerationConfig, s as TypescriptGenerationConfig, t as cliDistributionConfigSchema, u as cliDistributionGithubAppSchema, v as cliDistributionHomebrewSchema, w as cliDistributionScoopSchema, x as cliGenerationConfigSchema, y as composerPackageNameSchema, z as csharpGenerationConfigSchema, A as dependencySchema, B as exactSemverSchema, E as githubActionsSecretNameSchema, F as goGenerationConfigSchema, H as goModulePathSchema, I as javaGenerationConfigSchema, L as jsonObjectSchema, N as jsonValueSchema, O as kotlinGenerationConfigSchema, Q as mcpAvailabilityStatuses, U as mcpGenerationConfigSchema, V as nonEmptyStringSchema, W as oauthTokenEndpointsIssues, X as packageConfigSchema, Y as parentRelativePathSchema, Z as phpGenerationConfigSchema, _ as pythonGenerationConfigSchema, $ as relativePathSchema, a0 as rubyGenerationConfigSchema, a1 as rustGenerationConfigSchema, t as sdkConfigV1CliDistributionConfigSchema, u as sdkConfigV1CliDistributionGithubAppSchema, v as sdkConfigV1CliDistributionHomebrewSchema, w as sdkConfigV1CliDistributionScoopSchema, x as sdkConfigV1CliGenerationConfigSchema, y as sdkConfigV1ComposerPackageNameSchema, z as sdkConfigV1CsharpGenerationConfigSchema, B as sdkConfigV1ExactSemverSchema, E as sdkConfigV1GithubActionsSecretNameSchema, F as sdkConfigV1GoGenerationConfigSchema, H as sdkConfigV1GoModulePathSchema, I as sdkConfigV1JavaGenerationConfigSchema, O as sdkConfigV1KotlinGenerationConfigSchema, U as sdkConfigV1McpGenerationConfigSchema, V as sdkConfigV1NonEmptyStringSchema, Y as sdkConfigV1ParentRelativePathSchema, Z as sdkConfigV1PhpGenerationConfigSchema, _ as sdkConfigV1PythonGenerationConfigSchema, $ as sdkConfigV1RelativePathSchema, a0 as sdkConfigV1RubyGenerationConfigSchema, a1 as sdkConfigV1RustGenerationConfigSchema, a2 as sdkConfigV1SwiftGenerationConfigSchema, a3 as sdkConfigV1TerraformGenerationConfigSchema, a4 as sdkConfigV1TypescriptGenerationConfigSchema, a2 as swiftGenerationConfigSchema, a3 as terraformGenerationConfigSchema, a4 as typescriptGenerationConfigSchema } from './typescript-VEqEGvnA.cjs';
|
|
3
3
|
export { ApiConfig, ApiConfigInput, ApiImportSettings, AuthConfig, AuthScheme, ClientConfig, ClientConfigInput, ClientConfigOverride, CompatibilityConfig, CredentialResolution, DocsConfig, GenerationConfig, LanguageGenerationConfig, LegacyInput, OutputConfig, PublishConfig, PublishRegistry, ReadmeCustomSection, ReadmeEndpoint, ReplayConfig, SDK_CONFIG_IR_V1_SCHEMA_VERSION, SdkConfigIrCapability, SdkConfigIrV1, SdkConfigIrV1Input, SerializedSdkConfigIrV1, SourceConfig, SourceSpecConfig, SourceSpecOrigin, SourceSpecType, TargetConfig, TargetLanguage, UnsupportedField, WebhookSignature, WebhookSignatureInput, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, docsConfigSchema, generationConfigSchema, getSdkConfigIrV1Diagnostics, languageGenerationConfigSchema, legacyInputSchema, outputConfigSchema, parseSdkConfigIrV1, parseSdkConfigIrV1ForConsumption, publishConfigSchema, publishRegistrySchema, readmeCustomSectionSchema, readmeEndpointSchema, replayConfigSchema, sdkConfigIrCapabilitySchema, sdkConfigIrV1Schema, serializeSdkConfigIrV1, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecOriginSchema, sourceSpecTypeSchema, targetConfigSchema, targetLanguageSchema, unsupportedFieldSchema, webhookSignatureSchema } from './sdk-config-ir/v1/index.cjs';
|
|
4
4
|
import 'zod';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { FernConfigMappingDiagnostic, FernConfigMappingError, FernConfigMappingResult, FernResolvedGeneratorGroupInput, FernResolvedGeneratorInput, FernSdkConfigLanguage, SDK_CONFIG_V1_SCHEMA_VERSION, SdkConfigV1, SdkConfigV1ApiConfig, SdkConfigV1ApiConfigInput, SdkConfigV1CliOutputConfig, SdkConfigV1ClientConfig, SdkConfigV1ClientConfigInput, SdkConfigV1ClientConfigOverride, SdkConfigV1Dependency, SdkConfigV1DocsConfig, SdkConfigV1Document, SdkConfigV1GenerationConfig, SdkConfigV1GenerationConfigInput, SdkConfigV1GenerationConfigOverride, SdkConfigV1GitRemote, SdkConfigV1Input, SdkConfigV1McpOutputConfig, SdkConfigV1OutputConfig, SdkConfigV1PackageConfig, SdkConfigV1ProtobufRoot, SdkConfigV1ProtobufSource, SdkConfigV1PublishConfig, SdkConfigV1PublishRegistry, SdkConfigV1ReplayConfig, SdkConfigV1SourceConfig, SdkConfigV1SourceSpec, SdkConfigV1Target, SdkConfigV1WebhookSignature, SdkConfigV1WebhookSignatureInput, getSdkConfigV1Diagnostics, mapFernConfigToSdkConfigV1, parseSdkConfigV1, parseSdkConfigV1ForConsumption, sdkConfigV1ApiConfigSchema, sdkConfigV1AuthConfigSchema, sdkConfigV1AuthSchemeSchema, sdkConfigV1CliOutputConfigSchema, sdkConfigV1ClientConfigOverrideSchema, sdkConfigV1ClientConfigSchema, sdkConfigV1DependencySchema, sdkConfigV1DocsConfigSchema, sdkConfigV1GenerationConfigOverrideSchema, sdkConfigV1GenerationConfigSchema, sdkConfigV1GitRemoteSchema, sdkConfigV1McpOutputConfigSchema, sdkConfigV1OutputConfigSchema, sdkConfigV1PackageConfigSchema, sdkConfigV1ProtobufRootSchema, sdkConfigV1ProtobufSourceSchema, sdkConfigV1PublishConfigSchema, sdkConfigV1PublishRegistrySchema, sdkConfigV1ReadmeCustomSectionSchema, sdkConfigV1ReadmeEndpointSchema, sdkConfigV1ReplayConfigSchema, sdkConfigV1Schema, sdkConfigV1SourceConfigSchema, sdkConfigV1SourceSpecSchema, sdkConfigV1TargetSchema, sdkConfigV1WebhookSignatureSchema, splitSdkConfigV1TargetGeneration, validateSdkConfigV1 } from './sdk-config/v1/index.js';
|
|
2
|
-
export { C as CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as CliDistributionConfig, b as CliDistributionGithubAppConfig, c as CliDistributionHomebrewConfig, d as CliDistributionScoopConfig, e as CliGenerationConfig, f as
|
|
2
|
+
export { C as CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as CliDistributionConfig, b as CliDistributionGithubAppConfig, c as CliDistributionHomebrewConfig, d as CliDistributionScoopConfig, e as CliGenerationConfig, f as CliOAuthTokenEndpoints, g as CliProfilesConfig, h as CliProfilesProvisionOperation, i as CsharpGenerationConfig, D as Dependency, G as GoGenerationConfig, J as JavaGenerationConfig, j as JsonObject, k as JsonValue, K as KotlinGenerationConfig, M as McpAvailabilityStatus, l as McpGenerationConfig, m as McpToolFilter, P as PackageConfig, n as PhpGenerationConfig, o as PlanModifiers, p as PythonGenerationConfig, R as RubyGenerationConfig, q as RustGenerationConfig, C as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, S as SdkConfigIrV1Diagnostic, a as SdkConfigV1CliDistributionConfig, b as SdkConfigV1CliDistributionGithubAppConfig, c as SdkConfigV1CliDistributionHomebrewConfig, d as SdkConfigV1CliDistributionScoopConfig, S as SdkConfigV1Diagnostic, r as SwiftGenerationConfig, T as TerraformGenerationConfig, s as TypescriptGenerationConfig, t as cliDistributionConfigSchema, u as cliDistributionGithubAppSchema, v as cliDistributionHomebrewSchema, w as cliDistributionScoopSchema, x as cliGenerationConfigSchema, y as composerPackageNameSchema, z as csharpGenerationConfigSchema, A as dependencySchema, B as exactSemverSchema, E as githubActionsSecretNameSchema, F as goGenerationConfigSchema, H as goModulePathSchema, I as javaGenerationConfigSchema, L as jsonObjectSchema, N as jsonValueSchema, O as kotlinGenerationConfigSchema, Q as mcpAvailabilityStatuses, U as mcpGenerationConfigSchema, V as nonEmptyStringSchema, W as oauthTokenEndpointsIssues, X as packageConfigSchema, Y as parentRelativePathSchema, Z as phpGenerationConfigSchema, _ as pythonGenerationConfigSchema, $ as relativePathSchema, a0 as rubyGenerationConfigSchema, a1 as rustGenerationConfigSchema, t as sdkConfigV1CliDistributionConfigSchema, u as sdkConfigV1CliDistributionGithubAppSchema, v as sdkConfigV1CliDistributionHomebrewSchema, w as sdkConfigV1CliDistributionScoopSchema, x as sdkConfigV1CliGenerationConfigSchema, y as sdkConfigV1ComposerPackageNameSchema, z as sdkConfigV1CsharpGenerationConfigSchema, B as sdkConfigV1ExactSemverSchema, E as sdkConfigV1GithubActionsSecretNameSchema, F as sdkConfigV1GoGenerationConfigSchema, H as sdkConfigV1GoModulePathSchema, I as sdkConfigV1JavaGenerationConfigSchema, O as sdkConfigV1KotlinGenerationConfigSchema, U as sdkConfigV1McpGenerationConfigSchema, V as sdkConfigV1NonEmptyStringSchema, Y as sdkConfigV1ParentRelativePathSchema, Z as sdkConfigV1PhpGenerationConfigSchema, _ as sdkConfigV1PythonGenerationConfigSchema, $ as sdkConfigV1RelativePathSchema, a0 as sdkConfigV1RubyGenerationConfigSchema, a1 as sdkConfigV1RustGenerationConfigSchema, a2 as sdkConfigV1SwiftGenerationConfigSchema, a3 as sdkConfigV1TerraformGenerationConfigSchema, a4 as sdkConfigV1TypescriptGenerationConfigSchema, a2 as swiftGenerationConfigSchema, a3 as terraformGenerationConfigSchema, a4 as typescriptGenerationConfigSchema } from './typescript-VEqEGvnA.js';
|
|
3
3
|
export { ApiConfig, ApiConfigInput, ApiImportSettings, AuthConfig, AuthScheme, ClientConfig, ClientConfigInput, ClientConfigOverride, CompatibilityConfig, CredentialResolution, DocsConfig, GenerationConfig, LanguageGenerationConfig, LegacyInput, OutputConfig, PublishConfig, PublishRegistry, ReadmeCustomSection, ReadmeEndpoint, ReplayConfig, SDK_CONFIG_IR_V1_SCHEMA_VERSION, SdkConfigIrCapability, SdkConfigIrV1, SdkConfigIrV1Input, SerializedSdkConfigIrV1, SourceConfig, SourceSpecConfig, SourceSpecOrigin, SourceSpecType, TargetConfig, TargetLanguage, UnsupportedField, WebhookSignature, WebhookSignatureInput, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, docsConfigSchema, generationConfigSchema, getSdkConfigIrV1Diagnostics, languageGenerationConfigSchema, legacyInputSchema, outputConfigSchema, parseSdkConfigIrV1, parseSdkConfigIrV1ForConsumption, publishConfigSchema, publishRegistrySchema, readmeCustomSectionSchema, readmeEndpointSchema, replayConfigSchema, sdkConfigIrCapabilitySchema, sdkConfigIrV1Schema, serializeSdkConfigIrV1, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecOriginSchema, sourceSpecTypeSchema, targetConfigSchema, targetLanguageSchema, unsupportedFieldSchema, webhookSignatureSchema } from './sdk-config-ir/v1/index.js';
|
|
4
4
|
import 'zod';
|
package/dist/index.js
CHANGED
|
@@ -134,6 +134,39 @@ var publicClientIdSchema = nonEmptyStringSchema.refine((value) => value.trim() =
|
|
|
134
134
|
}).refine((value) => !value.includes("${"), {
|
|
135
135
|
message: "must be a literal public client ID, not an environment expression"
|
|
136
136
|
});
|
|
137
|
+
var oauthExtraParametersSchema = z.record(z.string().min(1), z.string());
|
|
138
|
+
function parseUrl(value) {
|
|
139
|
+
try {
|
|
140
|
+
return new URL(value);
|
|
141
|
+
} catch {
|
|
142
|
+
return void 0;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
var loopbackRedirectUriSchema = nonEmptyStringSchema.refine(
|
|
146
|
+
(value) => {
|
|
147
|
+
const url = parseUrl(value);
|
|
148
|
+
return url !== void 0 && url.protocol === "http:" && (url.hostname === "127.0.0.1" || url.hostname === "localhost") && url.port !== "";
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
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"
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
function containsControlCharacter(value) {
|
|
155
|
+
return [...value].some((character) => {
|
|
156
|
+
const code = character.charCodeAt(0);
|
|
157
|
+
return code <= 31 || code === 127;
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
var hostedPageUrlSchema = nonEmptyStringSchema.refine(
|
|
161
|
+
(value) => {
|
|
162
|
+
const url = parseUrl(value);
|
|
163
|
+
return url !== void 0 && (url.protocol === "http:" || url.protocol === "https:");
|
|
164
|
+
},
|
|
165
|
+
{ message: "must be an absolute http or https URL" }
|
|
166
|
+
).refine((value) => !containsControlCharacter(value), {
|
|
167
|
+
message: "must not contain control characters"
|
|
168
|
+
});
|
|
169
|
+
var redirectPortSchema = z.number().int().min(1).max(65535);
|
|
137
170
|
var oauthFlowSchema = z.discriminatedUnion("type", [
|
|
138
171
|
z.strictObject({
|
|
139
172
|
type: z.literal("authorization-code").describe("Uses the OAuth authorization code flow."),
|
|
@@ -143,7 +176,25 @@ var oauthFlowSchema = z.discriminatedUnion("type", [
|
|
|
143
176
|
scopes: z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow."),
|
|
144
177
|
clientId: publicClientIdSchema.optional().describe(
|
|
145
178
|
"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."
|
|
146
|
-
)
|
|
179
|
+
),
|
|
180
|
+
redirectUri: loopbackRedirectUriSchema.optional().describe(
|
|
181
|
+
"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."
|
|
182
|
+
),
|
|
183
|
+
redirectUriBackupPorts: z.array(redirectPortSchema).min(1).optional().describe(
|
|
184
|
+
"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."
|
|
185
|
+
),
|
|
186
|
+
successRedirectUrl: hostedPageUrlSchema.optional().describe(
|
|
187
|
+
"A page the browser is sent to once the login captured the authorization code. Without it the login shows its own page."
|
|
188
|
+
),
|
|
189
|
+
errorRedirectUrl: hostedPageUrlSchema.optional().describe(
|
|
190
|
+
"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."
|
|
191
|
+
),
|
|
192
|
+
authorizationParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the authorization request, such as audience."),
|
|
193
|
+
tokenParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the authorization code exchange request."),
|
|
194
|
+
refreshParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the token refresh request.")
|
|
195
|
+
}).refine((flow) => flow.redirectUriBackupPorts === void 0 || flow.redirectUri !== void 0, {
|
|
196
|
+
message: "redirectUriBackupPorts requires redirectUri",
|
|
197
|
+
path: ["redirectUriBackupPorts"]
|
|
147
198
|
}),
|
|
148
199
|
z.strictObject({
|
|
149
200
|
type: z.literal("client-credentials").describe("Uses the OAuth client credentials flow."),
|
|
@@ -162,21 +213,47 @@ var oauthFlowSchema = z.discriminatedUnion("type", [
|
|
|
162
213
|
tokenUrl: nonEmptyStringSchema.describe("The URL used to obtain access tokens."),
|
|
163
214
|
refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
|
|
164
215
|
scopes: z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
|
|
216
|
+
}),
|
|
217
|
+
z.strictObject({
|
|
218
|
+
type: z.literal("device-code").describe(
|
|
219
|
+
"Uses the OAuth device authorization flow (RFC 8628) for logins without a browser."
|
|
220
|
+
),
|
|
221
|
+
clientId: publicClientIdSchema.describe(
|
|
222
|
+
"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."
|
|
223
|
+
),
|
|
224
|
+
deviceAuthorizationUrl: nonEmptyStringSchema.describe(
|
|
225
|
+
"The URL that issues the device code, the user code and the verification URL."
|
|
226
|
+
),
|
|
227
|
+
tokenUrl: nonEmptyStringSchema.describe(
|
|
228
|
+
"The URL polled to exchange the device code for tokens once the user approved."
|
|
229
|
+
),
|
|
230
|
+
refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
|
|
231
|
+
scopes: z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow."),
|
|
232
|
+
deviceAuthorizationParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the device authorization request, such as audience."),
|
|
233
|
+
tokenParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the token polling request."),
|
|
234
|
+
refreshParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the token refresh request.")
|
|
165
235
|
})
|
|
166
236
|
]);
|
|
167
|
-
var
|
|
237
|
+
var oauth2AuthObjectSchema = z.strictObject({
|
|
168
238
|
id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
|
|
169
239
|
type: z.literal("oauth2").describe("Identifies an OAuth 2.0 authentication scheme."),
|
|
170
240
|
flows: z.array(oauthFlowSchema).min(1).describe("The OAuth flows supported by the API."),
|
|
171
241
|
clientId: authVariableSchema.optional().describe("The OAuth client ID parameter exposed by the SDK."),
|
|
172
242
|
clientSecret: authVariableSchema.optional().describe("The OAuth client secret parameter exposed by the SDK."),
|
|
173
243
|
tokenHeader: nonEmptyStringSchema.optional().describe("The request header that carries the OAuth access token."),
|
|
174
|
-
tokenPrefix: nonEmptyStringSchema.optional().describe(
|
|
244
|
+
tokenPrefix: nonEmptyStringSchema.optional().describe('The prefix added before the OAuth access token. Defaults to "Bearer" when omitted.'),
|
|
245
|
+
omitTokenPrefix: z.boolean().optional().describe(
|
|
246
|
+
'Whether the OAuth access token is sent as-is, with no prefix. Without it, a missing tokenPrefix means "Bearer". Cannot be combined with tokenPrefix.'
|
|
247
|
+
),
|
|
175
248
|
refreshBufferSeconds: z.number().nonnegative().optional().describe("How early, in seconds, the client refreshes a token before it expires."),
|
|
176
249
|
description: z.string().optional().describe(
|
|
177
250
|
"A description of the authentication scheme included in generated SDK documentation."
|
|
178
251
|
)
|
|
179
252
|
});
|
|
253
|
+
var oauth2AuthSchema = oauth2AuthObjectSchema.refine(
|
|
254
|
+
(scheme) => !(scheme.omitTokenPrefix === true && scheme.tokenPrefix !== void 0),
|
|
255
|
+
{ message: "omitTokenPrefix cannot be combined with tokenPrefix", path: ["omitTokenPrefix"] }
|
|
256
|
+
);
|
|
180
257
|
var customAuthParameterSchema = z.strictObject({
|
|
181
258
|
location: z.enum(["header", "query", "cookie"]).describe("Where the custom authentication value is sent."),
|
|
182
259
|
name: nonEmptyStringSchema.describe("The header, query parameter, or cookie name."),
|
|
@@ -832,6 +909,9 @@ var RESERVED_PROFILES_COMMAND_NAMES = /* @__PURE__ */ new Set([
|
|
|
832
909
|
var binaryNameSchema = nonEmptyStringSchema.regex(ALPHANUMERIC_PATTERN, {
|
|
833
910
|
message: "binaryName must contain at least one ASCII letter or digit"
|
|
834
911
|
});
|
|
912
|
+
var crateNameSchema = z.string().regex(/^[A-Za-z][A-Za-z0-9_-]{0,63}$/, {
|
|
913
|
+
message: "crateName must start with a letter, contain only letters, digits, hyphens, and underscores, and be at most 64 characters"
|
|
914
|
+
});
|
|
835
915
|
var rootGroupSchema = z.string().regex(ROOT_GROUP_PATTERN, {
|
|
836
916
|
message: "rootGroup must start with a lowercase letter and contain only lowercase letters, digits, hyphens, and underscores"
|
|
837
917
|
});
|
|
@@ -896,17 +976,78 @@ var profilesConfigSchema = z.strictObject({
|
|
|
896
976
|
revokeOperation: dottedCommandPathSchema("profiles.revokeOperation").optional().describe('The dotted command path called by "profiles remove --revoke".'),
|
|
897
977
|
provisionOperation: profilesProvisionOperationSchema.optional().describe('The operation called by "profiles create --provision" and its response mapping.')
|
|
898
978
|
});
|
|
979
|
+
var oauthPropertyPathSchema = z.string().regex(FIELD_NAME_PATTERN, {
|
|
980
|
+
message: 'must be a property name, or a dotted path to a nested property, such as "data.token"'
|
|
981
|
+
}).regex(/^[^.]+(\.[^.]+)*$/, { message: "must not have an empty path segment" });
|
|
982
|
+
var oauthTokenRequestPropertiesSchema = z.strictObject({
|
|
983
|
+
clientId: oauthPropertyPathSchema.optional().describe('The request property that carries the client ID. Defaults to "client_id".'),
|
|
984
|
+
clientSecret: oauthPropertyPathSchema.optional().describe('The request property that carries the client secret. Defaults to "client_secret".'),
|
|
985
|
+
scopes: oauthPropertyPathSchema.optional().describe('The request property that carries the scopes. Defaults to "scope".')
|
|
986
|
+
});
|
|
987
|
+
var oauthTokenResponsePropertiesSchema = z.strictObject({
|
|
988
|
+
accessToken: oauthPropertyPathSchema.optional().describe('The response property that holds the access token. Defaults to "access_token".'),
|
|
989
|
+
expiresIn: oauthPropertyPathSchema.optional().describe(
|
|
990
|
+
'The response property that holds the lifetime in seconds. Defaults to "expires_in".'
|
|
991
|
+
),
|
|
992
|
+
refreshToken: oauthPropertyPathSchema.optional().describe('The response property that holds the refresh token. Defaults to "refresh_token".')
|
|
993
|
+
});
|
|
994
|
+
var oauthTokenEndpointsSchema = z.strictObject({
|
|
995
|
+
token: z.strictObject({
|
|
996
|
+
requestProperties: oauthTokenRequestPropertiesSchema.optional().describe("The names of the properties of the token request."),
|
|
997
|
+
responseProperties: oauthTokenResponsePropertiesSchema.optional().describe("The names of the properties of the token response.")
|
|
998
|
+
}).optional().describe("The token endpoint of the client credentials flow (its tokenUrl)."),
|
|
999
|
+
refresh: z.strictObject({
|
|
1000
|
+
requestProperties: z.strictObject({
|
|
1001
|
+
refreshToken: oauthPropertyPathSchema.optional().describe(
|
|
1002
|
+
'The request property that carries the refresh token. Defaults to "refresh_token".'
|
|
1003
|
+
)
|
|
1004
|
+
}).optional().describe("The names of the properties of the refresh request."),
|
|
1005
|
+
responseProperties: oauthTokenResponsePropertiesSchema.optional().describe("The names of the properties of the refresh response.")
|
|
1006
|
+
}).optional().describe("The refresh endpoint of the client credentials flow (its refreshUrl).")
|
|
1007
|
+
});
|
|
1008
|
+
function oauthTokenEndpointsIssues(oauthTokenEndpoints, schemes, basePath) {
|
|
1009
|
+
const flowsById = /* @__PURE__ */ new Map();
|
|
1010
|
+
for (const scheme of schemes ?? []) {
|
|
1011
|
+
const flow = scheme.type === "oauth2" ? scheme.flows?.find((f) => f.type === "client-credentials") : void 0;
|
|
1012
|
+
if (flow !== void 0) {
|
|
1013
|
+
flowsById.set(scheme.id, flow);
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
return Object.entries(oauthTokenEndpoints ?? {}).flatMap(([id, endpoints]) => {
|
|
1017
|
+
const flow = flowsById.get(id);
|
|
1018
|
+
if (flow === void 0) {
|
|
1019
|
+
return [
|
|
1020
|
+
{
|
|
1021
|
+
message: `oauthTokenEndpoints "${id}" must name an OAuth scheme with a client-credentials flow`,
|
|
1022
|
+
path: [...basePath, id]
|
|
1023
|
+
}
|
|
1024
|
+
];
|
|
1025
|
+
}
|
|
1026
|
+
return endpoints.refresh !== void 0 && flow.refreshUrl === void 0 ? [
|
|
1027
|
+
{
|
|
1028
|
+
message: `oauthTokenEndpoints "${id}" has refresh settings, but its flow has no refreshUrl`,
|
|
1029
|
+
path: [...basePath, id, "refresh"]
|
|
1030
|
+
}
|
|
1031
|
+
] : [];
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
899
1034
|
var cliGenerationConfigSchema = z.strictObject({
|
|
900
1035
|
paginationParameters: z.array(nonEmptyStringSchema).optional().describe("Request parameter names treated as pagination controls by the CLI."),
|
|
901
1036
|
skills: z.boolean().optional().describe("Whether the generated CLI includes skills that teach AI agents to invoke commands."),
|
|
902
1037
|
binaryName: binaryNameSchema.optional().describe(
|
|
903
1038
|
"The CLI executable name. The generator kebab-cases it and also uses it for the source directory and env-var prefix."
|
|
904
1039
|
),
|
|
1040
|
+
crateName: crateNameSchema.optional().describe(
|
|
1041
|
+
"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."
|
|
1042
|
+
),
|
|
905
1043
|
customCommands: z.boolean().optional().describe("Whether hand-written command support is generated. The generator defaults to true."),
|
|
906
1044
|
rootGroup: rootGroupSchema.optional().describe("A command group that every spec-derived command is nested under."),
|
|
907
1045
|
profiles: profilesConfigSchema.optional().describe("Named profile command configuration."),
|
|
908
1046
|
splitTypeCrates: z.boolean().optional().describe("Whether generated types are split into one crate per API behind a facade crate."),
|
|
909
|
-
userAgentSuffixFlag: userAgentSuffixFlagSchema.optional().describe('The long flag name, without "--", that appends a product token to the User-Agent.')
|
|
1047
|
+
userAgentSuffixFlag: userAgentSuffixFlagSchema.optional().describe('The long flag name, without "--", that appends a product token to the User-Agent.'),
|
|
1048
|
+
oauthTokenEndpoints: z.record(nonEmptyStringSchema, oauthTokenEndpointsSchema).optional().describe(
|
|
1049
|
+
"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."
|
|
1050
|
+
)
|
|
910
1051
|
});
|
|
911
1052
|
|
|
912
1053
|
// src/sdk-config/v1/fern-config-mapper-cli.ts
|
|
@@ -2456,6 +2597,12 @@ var zipOutputSchema = z.strictObject({
|
|
|
2456
2597
|
fileName: nonEmptyStringSchema.optional().describe("The generated ZIP archive file name."),
|
|
2457
2598
|
publish: sdkConfigV1PublishConfigSchema.optional().describe("Optional package registry publication.")
|
|
2458
2599
|
});
|
|
2600
|
+
var localAliasOutputSchema = zipOutputSchema.extend({
|
|
2601
|
+
delivery: z.literal("local").describe('Alias of "zip": the package on the local machine.')
|
|
2602
|
+
}).transform(normalizeLocalDelivery);
|
|
2603
|
+
function normalizeLocalDelivery(output) {
|
|
2604
|
+
return { ...output, delivery: "zip" };
|
|
2605
|
+
}
|
|
2459
2606
|
var githubDeliverySchema = z.strictObject({
|
|
2460
2607
|
delivery: z.literal("github").describe("Delivers the generated SDK to GitHub."),
|
|
2461
2608
|
github: githubOutputSchema.describe("GitHub repository delivery settings."),
|
|
@@ -2463,8 +2610,8 @@ var githubDeliverySchema = z.strictObject({
|
|
|
2463
2610
|
});
|
|
2464
2611
|
var sdkConfigV1OutputConfigSchema = z.discriminatedUnion(
|
|
2465
2612
|
"delivery",
|
|
2466
|
-
[filesOutputSchema, zipOutputSchema, githubDeliverySchema],
|
|
2467
|
-
{ error: 'output.delivery must be one of "files", "zip", or "github"' }
|
|
2613
|
+
[filesOutputSchema, zipOutputSchema, githubDeliverySchema, localAliasOutputSchema],
|
|
2614
|
+
{ error: 'output.delivery must be one of "files", "zip", "local", or "github"' }
|
|
2468
2615
|
);
|
|
2469
2616
|
var hostedOutputSchema = z.strictObject({
|
|
2470
2617
|
delivery: z.literal("hosted").describe("Deploys the generated MCP server to Fern-hosted infrastructure."),
|
|
@@ -2474,8 +2621,14 @@ var hostedOutputSchema = z.strictObject({
|
|
|
2474
2621
|
});
|
|
2475
2622
|
var sdkConfigV1McpOutputConfigSchema = z.discriminatedUnion(
|
|
2476
2623
|
"delivery",
|
|
2477
|
-
[
|
|
2478
|
-
|
|
2624
|
+
[
|
|
2625
|
+
filesOutputSchema,
|
|
2626
|
+
zipOutputSchema,
|
|
2627
|
+
githubDeliverySchema,
|
|
2628
|
+
hostedOutputSchema,
|
|
2629
|
+
localAliasOutputSchema
|
|
2630
|
+
],
|
|
2631
|
+
{ error: 'output.delivery must be one of "files", "zip", "local", "github", or "hosted"' }
|
|
2479
2632
|
);
|
|
2480
2633
|
var cliDistributionShape = {
|
|
2481
2634
|
distribution: cliDistributionConfigSchema.optional().describe(
|
|
@@ -2496,9 +2649,10 @@ var sdkConfigV1CliOutputConfigSchema = z.discriminatedUnion(
|
|
|
2496
2649
|
[
|
|
2497
2650
|
filesOutputSchema.extend(cliDistributionShape).superRefine(rejectDistributionWithoutGithub),
|
|
2498
2651
|
zipOutputSchema.extend(cliDistributionShape).superRefine(rejectDistributionWithoutGithub),
|
|
2499
|
-
githubDeliverySchema.extend(cliDistributionShape)
|
|
2652
|
+
githubDeliverySchema.extend(cliDistributionShape),
|
|
2653
|
+
localAliasOutputSchema.in.extend(cliDistributionShape).superRefine(rejectDistributionWithoutGithub).transform(normalizeLocalDelivery)
|
|
2500
2654
|
],
|
|
2501
|
-
{ error: 'output.delivery must be one of "files", "zip", or "github"' }
|
|
2655
|
+
{ error: 'output.delivery must be one of "files", "zip", "local", or "github"' }
|
|
2502
2656
|
);
|
|
2503
2657
|
var sdkConfigV1ReplayConfigSchema = z.strictObject({
|
|
2504
2658
|
enabled: z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
|
|
@@ -3036,7 +3190,7 @@ var sdkConfigV1Schema = z.strictObject({
|
|
|
3036
3190
|
docs: sdkConfigV1DocsConfigSchema.prefault({}).describe("Documentation settings inherited by every target."),
|
|
3037
3191
|
generation: sdkConfigV1GenerationConfigSchema.prefault({}).describe("Generation settings inherited by every target."),
|
|
3038
3192
|
targets: z.array(sdkConfigV1TargetSchema).min(1).describe("Language targets to generate; each language may appear once.")
|
|
3039
|
-
}).superRefine(({ output, package: globalPackage, targets }, context) => {
|
|
3193
|
+
}).superRefine(({ api, output, package: globalPackage, targets }, context) => {
|
|
3040
3194
|
const configuredLanguages = /* @__PURE__ */ new Set();
|
|
3041
3195
|
targets.forEach((target, targetIndex) => {
|
|
3042
3196
|
if (configuredLanguages.has(target.language)) {
|
|
@@ -3048,6 +3202,14 @@ var sdkConfigV1Schema = z.strictObject({
|
|
|
3048
3202
|
}
|
|
3049
3203
|
configuredLanguages.add(target.language);
|
|
3050
3204
|
validateTargetPublishing(target, targetIndex, globalPackage, output, context);
|
|
3205
|
+
if (target.language === "cli") {
|
|
3206
|
+
oauthTokenEndpointsIssues(target.generation?.oauthTokenEndpoints, api.auth?.schemes, [
|
|
3207
|
+
"targets",
|
|
3208
|
+
targetIndex,
|
|
3209
|
+
"generation",
|
|
3210
|
+
"oauthTokenEndpoints"
|
|
3211
|
+
]).forEach((issue) => context.addIssue({ code: "custom", ...issue }));
|
|
3212
|
+
}
|
|
3051
3213
|
});
|
|
3052
3214
|
});
|
|
3053
3215
|
function validateSdkConfigV1(value) {
|
|
@@ -4700,6 +4862,14 @@ var zipOutputSchema2 = z.strictObject({
|
|
|
4700
4862
|
...distributionShape,
|
|
4701
4863
|
...credentialResolutionShape
|
|
4702
4864
|
});
|
|
4865
|
+
var localAliasOutputSchema2 = zipOutputSchema2.extend({
|
|
4866
|
+
delivery: z.literal("local").describe('Alias of "zip": the package on the local machine.')
|
|
4867
|
+
}).transform(
|
|
4868
|
+
(output) => ({
|
|
4869
|
+
...output,
|
|
4870
|
+
delivery: "zip"
|
|
4871
|
+
})
|
|
4872
|
+
);
|
|
4703
4873
|
var githubDeliverySchema2 = z.strictObject({
|
|
4704
4874
|
delivery: z.literal("github").describe("Delivers the generated SDK to GitHub."),
|
|
4705
4875
|
github: githubOutputSchema2.describe("GitHub repository delivery settings."),
|
|
@@ -4709,9 +4879,9 @@ var githubDeliverySchema2 = z.strictObject({
|
|
|
4709
4879
|
});
|
|
4710
4880
|
var outputConfigSchema = z.discriminatedUnion(
|
|
4711
4881
|
"delivery",
|
|
4712
|
-
[filesOutputSchema2, zipOutputSchema2, githubDeliverySchema2],
|
|
4882
|
+
[filesOutputSchema2, zipOutputSchema2, githubDeliverySchema2, localAliasOutputSchema2],
|
|
4713
4883
|
{
|
|
4714
|
-
error: 'output.delivery must be one of "files", "zip", or "github"'
|
|
4884
|
+
error: 'output.delivery must be one of "files", "zip", "local", or "github"'
|
|
4715
4885
|
}
|
|
4716
4886
|
);
|
|
4717
4887
|
var replayConfigSchema = z.strictObject({
|
|
@@ -4892,63 +5062,71 @@ var sdkConfigIrV1Schema = z.strictObject({
|
|
|
4892
5062
|
"Shared and language-specific generation behavior."
|
|
4893
5063
|
),
|
|
4894
5064
|
compatibility: compatibilityConfigSchema.optional().describe("Temporary provenance and diagnostics retained during legacy migration.")
|
|
4895
|
-
}).superRefine(
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
[
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
5065
|
+
}).superRefine(
|
|
5066
|
+
({ api, compatibility, generation, output, package: packageConfig, target }, context) => {
|
|
5067
|
+
const configuredLanguages = Object.keys(generation.language ?? {});
|
|
5068
|
+
const requiresExternalPublishIdentity = output.delivery === "github" || output.publish !== void 0;
|
|
5069
|
+
if (requiresExternalPublishIdentity) {
|
|
5070
|
+
[
|
|
5071
|
+
["apiName", "target.apiName is required for external publishing"],
|
|
5072
|
+
["organizationName", "target.organizationName is required for external publishing"]
|
|
5073
|
+
].forEach(([field, message]) => {
|
|
5074
|
+
if (!target[field]) {
|
|
5075
|
+
context.addIssue({
|
|
5076
|
+
code: "custom",
|
|
5077
|
+
message,
|
|
5078
|
+
path: ["target", field]
|
|
5079
|
+
});
|
|
5080
|
+
}
|
|
5081
|
+
});
|
|
5082
|
+
}
|
|
5083
|
+
oauthTokenEndpointsIssues(generation.language?.cli?.oauthTokenEndpoints, api.auth?.schemes, [
|
|
5084
|
+
"generation",
|
|
5085
|
+
"language",
|
|
5086
|
+
"cli",
|
|
5087
|
+
"oauthTokenEndpoints"
|
|
5088
|
+
]).forEach((issue) => context.addIssue({ code: "custom", ...issue }));
|
|
5089
|
+
configuredLanguages.forEach((language) => {
|
|
5090
|
+
if (language !== target.language) {
|
|
4904
5091
|
context.addIssue({
|
|
4905
5092
|
code: "custom",
|
|
4906
|
-
message
|
|
4907
|
-
path: ["
|
|
5093
|
+
message: `generation.language.${language} does not match target language "${target.language}"`,
|
|
5094
|
+
path: ["generation", "language", language]
|
|
4908
5095
|
});
|
|
4909
5096
|
}
|
|
4910
5097
|
});
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
5098
|
+
if (output.publish && !publishRegistryLanguages2[output.publish.registry].some(
|
|
5099
|
+
(language) => language === target.language
|
|
5100
|
+
)) {
|
|
4914
5101
|
context.addIssue({
|
|
4915
5102
|
code: "custom",
|
|
4916
|
-
message: `
|
|
4917
|
-
path: ["
|
|
5103
|
+
message: `registry "${output.publish.registry}" is not supported for target language "${target.language}"`,
|
|
5104
|
+
path: ["output", "publish", "registry"]
|
|
4918
5105
|
});
|
|
4919
5106
|
}
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
}
|
|
4930
|
-
if (output.publish) {
|
|
4931
|
-
validatePublishingIdentity2(packageConfig, output.publish.registry, context);
|
|
4932
|
-
if (output.delivery !== "github" && output.publish.shouldGeneratePublishWorkflow === true) {
|
|
4933
|
-
context.addIssue({
|
|
4934
|
-
code: "custom",
|
|
4935
|
-
message: "output.publish.shouldGeneratePublishWorkflow requires GitHub delivery",
|
|
4936
|
-
path: ["output", "publish", "shouldGeneratePublishWorkflow"]
|
|
4937
|
-
});
|
|
5107
|
+
if (output.publish) {
|
|
5108
|
+
validatePublishingIdentity2(packageConfig, output.publish.registry, context);
|
|
5109
|
+
if (output.delivery !== "github" && output.publish.shouldGeneratePublishWorkflow === true) {
|
|
5110
|
+
context.addIssue({
|
|
5111
|
+
code: "custom",
|
|
5112
|
+
message: "output.publish.shouldGeneratePublishWorkflow requires GitHub delivery",
|
|
5113
|
+
path: ["output", "publish", "shouldGeneratePublishWorkflow"]
|
|
5114
|
+
});
|
|
5115
|
+
}
|
|
4938
5116
|
}
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
}
|
|
5117
|
+
validateCliOutput(output, target.language, context);
|
|
5118
|
+
if (compatibility?.legacyInput) {
|
|
5119
|
+
const expectedKind = target.sourceOrigin === "postman" ? "postman-build-parameters" : "fern-generator-invocation";
|
|
5120
|
+
if (compatibility.legacyInput.kind !== expectedKind) {
|
|
5121
|
+
context.addIssue({
|
|
5122
|
+
code: "custom",
|
|
5123
|
+
message: `compatibility.legacyInput kind "${compatibility.legacyInput.kind}" does not match target.sourceOrigin "${target.sourceOrigin}"`,
|
|
5124
|
+
path: ["compatibility", "legacyInput", "kind"]
|
|
5125
|
+
});
|
|
5126
|
+
}
|
|
4949
5127
|
}
|
|
4950
5128
|
}
|
|
4951
|
-
|
|
5129
|
+
);
|
|
4952
5130
|
function parseSdkConfigIrV1(value) {
|
|
4953
5131
|
return sdkConfigIrV1Schema.parse(value);
|
|
4954
5132
|
}
|
|
@@ -4977,6 +5155,6 @@ function parseSdkConfigIrV1ForConsumption(value) {
|
|
|
4977
5155
|
return parseSdkConfigIrV1(stripUnknownProperties(value, sdkConfigIrV1InputJsonSchema));
|
|
4978
5156
|
}
|
|
4979
5157
|
|
|
4980
|
-
export { CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, FernConfigMappingError, SDK_CONFIG_IR_V1_SCHEMA_VERSION, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, SDK_CONFIG_V1_SCHEMA_VERSION, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, cliDistributionConfigSchema, cliDistributionGithubAppSchema, cliDistributionHomebrewSchema, cliDistributionScoopSchema, cliGenerationConfigSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, composerPackageNameSchema, csharpGenerationConfigSchema, dependencySchema, docsConfigSchema, exactSemverSchema, generationConfigSchema, getSdkConfigIrV1Diagnostics, getSdkConfigV1Diagnostics, githubActionsSecretNameSchema, goGenerationConfigSchema, goModulePathSchema, javaGenerationConfigSchema, jsonObjectSchema, jsonValueSchema, kotlinGenerationConfigSchema, languageGenerationConfigSchema, legacyInputSchema, mapFernConfigToSdkConfigV1, mcpAvailabilityStatuses, mcpGenerationConfigSchema, nonEmptyStringSchema, outputConfigSchema, packageConfigSchema, parentRelativePathSchema, parseSdkConfigIrV1, parseSdkConfigIrV1ForConsumption, parseSdkConfigV1, parseSdkConfigV1ForConsumption, phpGenerationConfigSchema, publishConfigSchema, publishRegistrySchema, pythonGenerationConfigSchema, readmeCustomSectionSchema, readmeEndpointSchema, relativePathSchema, replayConfigSchema, rubyGenerationConfigSchema, rustGenerationConfigSchema, sdkConfigIrCapabilitySchema, sdkConfigIrV1Schema, sdkConfigV1ApiConfigSchema, sdkConfigV1AuthConfigSchema, sdkConfigV1AuthSchemeSchema, cliDistributionConfigSchema as sdkConfigV1CliDistributionConfigSchema, cliDistributionGithubAppSchema as sdkConfigV1CliDistributionGithubAppSchema, cliDistributionHomebrewSchema as sdkConfigV1CliDistributionHomebrewSchema, cliDistributionScoopSchema as sdkConfigV1CliDistributionScoopSchema, cliGenerationConfigSchema as sdkConfigV1CliGenerationConfigSchema, sdkConfigV1CliOutputConfigSchema, sdkConfigV1ClientConfigOverrideSchema, sdkConfigV1ClientConfigSchema, composerPackageNameSchema as sdkConfigV1ComposerPackageNameSchema, csharpGenerationConfigSchema as sdkConfigV1CsharpGenerationConfigSchema, sdkConfigV1DependencySchema, sdkConfigV1DocsConfigSchema, exactSemverSchema as sdkConfigV1ExactSemverSchema, sdkConfigV1GenerationConfigOverrideSchema, sdkConfigV1GenerationConfigSchema, sdkConfigV1GitRemoteSchema, githubActionsSecretNameSchema as sdkConfigV1GithubActionsSecretNameSchema, goGenerationConfigSchema as sdkConfigV1GoGenerationConfigSchema, goModulePathSchema as sdkConfigV1GoModulePathSchema, javaGenerationConfigSchema as sdkConfigV1JavaGenerationConfigSchema, kotlinGenerationConfigSchema as sdkConfigV1KotlinGenerationConfigSchema, mcpGenerationConfigSchema as sdkConfigV1McpGenerationConfigSchema, sdkConfigV1McpOutputConfigSchema, nonEmptyStringSchema as sdkConfigV1NonEmptyStringSchema, sdkConfigV1OutputConfigSchema, sdkConfigV1PackageConfigSchema, parentRelativePathSchema as sdkConfigV1ParentRelativePathSchema, phpGenerationConfigSchema as sdkConfigV1PhpGenerationConfigSchema, sdkConfigV1ProtobufRootSchema, sdkConfigV1ProtobufSourceSchema, sdkConfigV1PublishConfigSchema, sdkConfigV1PublishRegistrySchema, pythonGenerationConfigSchema as sdkConfigV1PythonGenerationConfigSchema, sdkConfigV1ReadmeCustomSectionSchema, sdkConfigV1ReadmeEndpointSchema, relativePathSchema as sdkConfigV1RelativePathSchema, sdkConfigV1ReplayConfigSchema, rubyGenerationConfigSchema as sdkConfigV1RubyGenerationConfigSchema, rustGenerationConfigSchema as sdkConfigV1RustGenerationConfigSchema, sdkConfigV1Schema, sdkConfigV1SourceConfigSchema, sdkConfigV1SourceSpecSchema, swiftGenerationConfigSchema as sdkConfigV1SwiftGenerationConfigSchema, sdkConfigV1TargetSchema, terraformGenerationConfigSchema as sdkConfigV1TerraformGenerationConfigSchema, typescriptGenerationConfigSchema as sdkConfigV1TypescriptGenerationConfigSchema, sdkConfigV1WebhookSignatureSchema, serializeSdkConfigIrV1, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecOriginSchema, sourceSpecTypeSchema, splitSdkConfigV1TargetGeneration, swiftGenerationConfigSchema, targetConfigSchema, targetLanguageSchema, terraformGenerationConfigSchema, typescriptGenerationConfigSchema, unsupportedFieldSchema, validateSdkConfigV1, webhookSignatureSchema };
|
|
5158
|
+
export { CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, FernConfigMappingError, SDK_CONFIG_IR_V1_SCHEMA_VERSION, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, SDK_CONFIG_V1_SCHEMA_VERSION, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, cliDistributionConfigSchema, cliDistributionGithubAppSchema, cliDistributionHomebrewSchema, cliDistributionScoopSchema, cliGenerationConfigSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, composerPackageNameSchema, csharpGenerationConfigSchema, dependencySchema, docsConfigSchema, exactSemverSchema, generationConfigSchema, getSdkConfigIrV1Diagnostics, getSdkConfigV1Diagnostics, githubActionsSecretNameSchema, goGenerationConfigSchema, goModulePathSchema, javaGenerationConfigSchema, jsonObjectSchema, jsonValueSchema, kotlinGenerationConfigSchema, languageGenerationConfigSchema, legacyInputSchema, mapFernConfigToSdkConfigV1, mcpAvailabilityStatuses, mcpGenerationConfigSchema, nonEmptyStringSchema, oauthTokenEndpointsIssues, outputConfigSchema, packageConfigSchema, parentRelativePathSchema, parseSdkConfigIrV1, parseSdkConfigIrV1ForConsumption, parseSdkConfigV1, parseSdkConfigV1ForConsumption, phpGenerationConfigSchema, publishConfigSchema, publishRegistrySchema, pythonGenerationConfigSchema, readmeCustomSectionSchema, readmeEndpointSchema, relativePathSchema, replayConfigSchema, rubyGenerationConfigSchema, rustGenerationConfigSchema, sdkConfigIrCapabilitySchema, sdkConfigIrV1Schema, sdkConfigV1ApiConfigSchema, sdkConfigV1AuthConfigSchema, sdkConfigV1AuthSchemeSchema, cliDistributionConfigSchema as sdkConfigV1CliDistributionConfigSchema, cliDistributionGithubAppSchema as sdkConfigV1CliDistributionGithubAppSchema, cliDistributionHomebrewSchema as sdkConfigV1CliDistributionHomebrewSchema, cliDistributionScoopSchema as sdkConfigV1CliDistributionScoopSchema, cliGenerationConfigSchema as sdkConfigV1CliGenerationConfigSchema, sdkConfigV1CliOutputConfigSchema, sdkConfigV1ClientConfigOverrideSchema, sdkConfigV1ClientConfigSchema, composerPackageNameSchema as sdkConfigV1ComposerPackageNameSchema, csharpGenerationConfigSchema as sdkConfigV1CsharpGenerationConfigSchema, sdkConfigV1DependencySchema, sdkConfigV1DocsConfigSchema, exactSemverSchema as sdkConfigV1ExactSemverSchema, sdkConfigV1GenerationConfigOverrideSchema, sdkConfigV1GenerationConfigSchema, sdkConfigV1GitRemoteSchema, githubActionsSecretNameSchema as sdkConfigV1GithubActionsSecretNameSchema, goGenerationConfigSchema as sdkConfigV1GoGenerationConfigSchema, goModulePathSchema as sdkConfigV1GoModulePathSchema, javaGenerationConfigSchema as sdkConfigV1JavaGenerationConfigSchema, kotlinGenerationConfigSchema as sdkConfigV1KotlinGenerationConfigSchema, mcpGenerationConfigSchema as sdkConfigV1McpGenerationConfigSchema, sdkConfigV1McpOutputConfigSchema, nonEmptyStringSchema as sdkConfigV1NonEmptyStringSchema, sdkConfigV1OutputConfigSchema, sdkConfigV1PackageConfigSchema, parentRelativePathSchema as sdkConfigV1ParentRelativePathSchema, phpGenerationConfigSchema as sdkConfigV1PhpGenerationConfigSchema, sdkConfigV1ProtobufRootSchema, sdkConfigV1ProtobufSourceSchema, sdkConfigV1PublishConfigSchema, sdkConfigV1PublishRegistrySchema, pythonGenerationConfigSchema as sdkConfigV1PythonGenerationConfigSchema, sdkConfigV1ReadmeCustomSectionSchema, sdkConfigV1ReadmeEndpointSchema, relativePathSchema as sdkConfigV1RelativePathSchema, sdkConfigV1ReplayConfigSchema, rubyGenerationConfigSchema as sdkConfigV1RubyGenerationConfigSchema, rustGenerationConfigSchema as sdkConfigV1RustGenerationConfigSchema, sdkConfigV1Schema, sdkConfigV1SourceConfigSchema, sdkConfigV1SourceSpecSchema, swiftGenerationConfigSchema as sdkConfigV1SwiftGenerationConfigSchema, sdkConfigV1TargetSchema, terraformGenerationConfigSchema as sdkConfigV1TerraformGenerationConfigSchema, typescriptGenerationConfigSchema as sdkConfigV1TypescriptGenerationConfigSchema, sdkConfigV1WebhookSignatureSchema, serializeSdkConfigIrV1, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecOriginSchema, sourceSpecTypeSchema, splitSdkConfigV1TargetGeneration, swiftGenerationConfigSchema, targetConfigSchema, targetLanguageSchema, terraformGenerationConfigSchema, typescriptGenerationConfigSchema, unsupportedFieldSchema, validateSdkConfigV1, webhookSignatureSchema };
|
|
4981
5159
|
//# sourceMappingURL=index.js.map
|
|
4982
5160
|
//# sourceMappingURL=index.js.map
|