@postman/sdk-config 0.11.0 → 0.12.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 +214 -9
- 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 +214 -9
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +214 -9
- 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 +214 -9
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +214 -9
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +234 -2
- package/dist/sdk-config/v1/index.d.ts +234 -2
- package/dist/sdk-config/v1/index.js +214 -9
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +39 -1
- 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 +39 -1
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +39 -1
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +186 -2
- package/dist/sdk-config-ir/v1/index.d.ts +186 -2
- package/dist/sdk-config-ir/v1/index.js +39 -1
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/{typescript-CsAa1VSy.d.cts → typescript-Byhn4MqL.d.cts} +64 -0
- package/dist/{typescript-CsAa1VSy.d.ts → typescript-Byhn4MqL.d.ts} +64 -0
- package/package.json +1 -1
- package/src/sdk-config-ir/v1/README.md +79 -31
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, SdkConfigV1Input, SdkConfigV1OutputConfig, SdkConfigV1PackageConfig, SdkConfigV1PublishConfig, SdkConfigV1PublishRegistry, SdkConfigV1ReplayConfig, SdkConfigV1SourceConfig, SdkConfigV1SourceSpec, SdkConfigV1Target, SdkConfigV1WebhookSignature, SdkConfigV1WebhookSignatureInput, getSdkConfigV1Diagnostics, mapFernConfigToSdkConfigV1, parseSdkConfigV1, parseSdkConfigV1ForConsumption, sdkConfigV1ApiConfigSchema, sdkConfigV1AuthConfigSchema, sdkConfigV1AuthSchemeSchema, sdkConfigV1CliOutputConfigSchema, sdkConfigV1ClientConfigOverrideSchema, sdkConfigV1ClientConfigSchema, sdkConfigV1DependencySchema, sdkConfigV1DocsConfigSchema, sdkConfigV1GenerationConfigOverrideSchema, sdkConfigV1GenerationConfigSchema, sdkConfigV1OutputConfigSchema, sdkConfigV1PackageConfigSchema, 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 CliProfilesConfig, g as CliProfilesProvisionOperation, h as CsharpGenerationConfig, D as Dependency, G as GoGenerationConfig, J as JavaGenerationConfig, i as JsonObject, j as JsonValue, K as KotlinGenerationConfig, M as McpAvailabilityStatus, k as McpGenerationConfig, l as McpToolFilter, P as PackageConfig, m as PhpGenerationConfig, n as PlanModifiers, o as PythonGenerationConfig, R as RubyGenerationConfig, p 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, q as SwiftGenerationConfig, T as TerraformGenerationConfig, r as TypescriptGenerationConfig, s as cliDistributionConfigSchema, t as cliDistributionGithubAppSchema, u as cliDistributionHomebrewSchema, v as cliDistributionScoopSchema, w as cliGenerationConfigSchema, x as composerPackageNameSchema, y as csharpGenerationConfigSchema, z as dependencySchema, A as exactSemverSchema, B as githubActionsSecretNameSchema, E as goGenerationConfigSchema, F as goModulePathSchema, H as javaGenerationConfigSchema, I as jsonObjectSchema, L as jsonValueSchema, N as kotlinGenerationConfigSchema, O as mcpAvailabilityStatuses, Q as mcpGenerationConfigSchema, U as nonEmptyStringSchema, V as packageConfigSchema, W as phpGenerationConfigSchema, X as pythonGenerationConfigSchema, Y as relativePathSchema, Z as rubyGenerationConfigSchema, _ as rustGenerationConfigSchema, s as sdkConfigV1CliDistributionConfigSchema, t as sdkConfigV1CliDistributionGithubAppSchema, u as sdkConfigV1CliDistributionHomebrewSchema, v as sdkConfigV1CliDistributionScoopSchema, w as sdkConfigV1CliGenerationConfigSchema, x as sdkConfigV1ComposerPackageNameSchema, y as sdkConfigV1CsharpGenerationConfigSchema, A as sdkConfigV1ExactSemverSchema, B as sdkConfigV1GithubActionsSecretNameSchema, E as sdkConfigV1GoGenerationConfigSchema, F as sdkConfigV1GoModulePathSchema, H as sdkConfigV1JavaGenerationConfigSchema, N as sdkConfigV1KotlinGenerationConfigSchema, Q as sdkConfigV1McpGenerationConfigSchema, U as sdkConfigV1NonEmptyStringSchema, W as sdkConfigV1PhpGenerationConfigSchema, X as sdkConfigV1PythonGenerationConfigSchema, Y as sdkConfigV1RelativePathSchema, Z as sdkConfigV1RubyGenerationConfigSchema, _ as sdkConfigV1RustGenerationConfigSchema, $ as sdkConfigV1SwiftGenerationConfigSchema, a0 as sdkConfigV1TerraformGenerationConfigSchema, a1 as sdkConfigV1TypescriptGenerationConfigSchema, $ as swiftGenerationConfigSchema, a0 as terraformGenerationConfigSchema, a1 as typescriptGenerationConfigSchema } from './typescript-
|
|
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 CliProfilesConfig, g as CliProfilesProvisionOperation, h as CsharpGenerationConfig, D as Dependency, G as GoGenerationConfig, J as JavaGenerationConfig, i as JsonObject, j as JsonValue, K as KotlinGenerationConfig, M as McpAvailabilityStatus, k as McpGenerationConfig, l as McpToolFilter, P as PackageConfig, m as PhpGenerationConfig, n as PlanModifiers, o as PythonGenerationConfig, R as RubyGenerationConfig, p 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, q as SwiftGenerationConfig, T as TerraformGenerationConfig, r as TypescriptGenerationConfig, s as cliDistributionConfigSchema, t as cliDistributionGithubAppSchema, u as cliDistributionHomebrewSchema, v as cliDistributionScoopSchema, w as cliGenerationConfigSchema, x as composerPackageNameSchema, y as csharpGenerationConfigSchema, z as dependencySchema, A as exactSemverSchema, B as githubActionsSecretNameSchema, E as goGenerationConfigSchema, F as goModulePathSchema, H as javaGenerationConfigSchema, I as jsonObjectSchema, L as jsonValueSchema, N as kotlinGenerationConfigSchema, O as mcpAvailabilityStatuses, Q as mcpGenerationConfigSchema, U as nonEmptyStringSchema, V as packageConfigSchema, W as phpGenerationConfigSchema, X as pythonGenerationConfigSchema, Y as relativePathSchema, Z as rubyGenerationConfigSchema, _ as rustGenerationConfigSchema, s as sdkConfigV1CliDistributionConfigSchema, t as sdkConfigV1CliDistributionGithubAppSchema, u as sdkConfigV1CliDistributionHomebrewSchema, v as sdkConfigV1CliDistributionScoopSchema, w as sdkConfigV1CliGenerationConfigSchema, x as sdkConfigV1ComposerPackageNameSchema, y as sdkConfigV1CsharpGenerationConfigSchema, A as sdkConfigV1ExactSemverSchema, B as sdkConfigV1GithubActionsSecretNameSchema, E as sdkConfigV1GoGenerationConfigSchema, F as sdkConfigV1GoModulePathSchema, H as sdkConfigV1JavaGenerationConfigSchema, N as sdkConfigV1KotlinGenerationConfigSchema, Q as sdkConfigV1McpGenerationConfigSchema, U as sdkConfigV1NonEmptyStringSchema, W as sdkConfigV1PhpGenerationConfigSchema, X as sdkConfigV1PythonGenerationConfigSchema, Y as sdkConfigV1RelativePathSchema, Z as sdkConfigV1RubyGenerationConfigSchema, _ as sdkConfigV1RustGenerationConfigSchema, $ as sdkConfigV1SwiftGenerationConfigSchema, a0 as sdkConfigV1TerraformGenerationConfigSchema, a1 as sdkConfigV1TypescriptGenerationConfigSchema, $ as swiftGenerationConfigSchema, a0 as terraformGenerationConfigSchema, a1 as typescriptGenerationConfigSchema } from './typescript-Byhn4MqL.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, 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, 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, SdkConfigV1Input, SdkConfigV1OutputConfig, SdkConfigV1PackageConfig, SdkConfigV1PublishConfig, SdkConfigV1PublishRegistry, SdkConfigV1ReplayConfig, SdkConfigV1SourceConfig, SdkConfigV1SourceSpec, SdkConfigV1Target, SdkConfigV1WebhookSignature, SdkConfigV1WebhookSignatureInput, getSdkConfigV1Diagnostics, mapFernConfigToSdkConfigV1, parseSdkConfigV1, parseSdkConfigV1ForConsumption, sdkConfigV1ApiConfigSchema, sdkConfigV1AuthConfigSchema, sdkConfigV1AuthSchemeSchema, sdkConfigV1CliOutputConfigSchema, sdkConfigV1ClientConfigOverrideSchema, sdkConfigV1ClientConfigSchema, sdkConfigV1DependencySchema, sdkConfigV1DocsConfigSchema, sdkConfigV1GenerationConfigOverrideSchema, sdkConfigV1GenerationConfigSchema, sdkConfigV1OutputConfigSchema, sdkConfigV1PackageConfigSchema, 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 CliProfilesConfig, g as CliProfilesProvisionOperation, h as CsharpGenerationConfig, D as Dependency, G as GoGenerationConfig, J as JavaGenerationConfig, i as JsonObject, j as JsonValue, K as KotlinGenerationConfig, M as McpAvailabilityStatus, k as McpGenerationConfig, l as McpToolFilter, P as PackageConfig, m as PhpGenerationConfig, n as PlanModifiers, o as PythonGenerationConfig, R as RubyGenerationConfig, p 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, q as SwiftGenerationConfig, T as TerraformGenerationConfig, r as TypescriptGenerationConfig, s as cliDistributionConfigSchema, t as cliDistributionGithubAppSchema, u as cliDistributionHomebrewSchema, v as cliDistributionScoopSchema, w as cliGenerationConfigSchema, x as composerPackageNameSchema, y as csharpGenerationConfigSchema, z as dependencySchema, A as exactSemverSchema, B as githubActionsSecretNameSchema, E as goGenerationConfigSchema, F as goModulePathSchema, H as javaGenerationConfigSchema, I as jsonObjectSchema, L as jsonValueSchema, N as kotlinGenerationConfigSchema, O as mcpAvailabilityStatuses, Q as mcpGenerationConfigSchema, U as nonEmptyStringSchema, V as packageConfigSchema, W as phpGenerationConfigSchema, X as pythonGenerationConfigSchema, Y as relativePathSchema, Z as rubyGenerationConfigSchema, _ as rustGenerationConfigSchema, s as sdkConfigV1CliDistributionConfigSchema, t as sdkConfigV1CliDistributionGithubAppSchema, u as sdkConfigV1CliDistributionHomebrewSchema, v as sdkConfigV1CliDistributionScoopSchema, w as sdkConfigV1CliGenerationConfigSchema, x as sdkConfigV1ComposerPackageNameSchema, y as sdkConfigV1CsharpGenerationConfigSchema, A as sdkConfigV1ExactSemverSchema, B as sdkConfigV1GithubActionsSecretNameSchema, E as sdkConfigV1GoGenerationConfigSchema, F as sdkConfigV1GoModulePathSchema, H as sdkConfigV1JavaGenerationConfigSchema, N as sdkConfigV1KotlinGenerationConfigSchema, Q as sdkConfigV1McpGenerationConfigSchema, U as sdkConfigV1NonEmptyStringSchema, W as sdkConfigV1PhpGenerationConfigSchema, X as sdkConfigV1PythonGenerationConfigSchema, Y as sdkConfigV1RelativePathSchema, Z as sdkConfigV1RubyGenerationConfigSchema, _ as sdkConfigV1RustGenerationConfigSchema, $ as sdkConfigV1SwiftGenerationConfigSchema, a0 as sdkConfigV1TerraformGenerationConfigSchema, a1 as sdkConfigV1TypescriptGenerationConfigSchema, $ as swiftGenerationConfigSchema, a0 as terraformGenerationConfigSchema, a1 as typescriptGenerationConfigSchema } from './typescript-
|
|
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 CliProfilesConfig, g as CliProfilesProvisionOperation, h as CsharpGenerationConfig, D as Dependency, G as GoGenerationConfig, J as JavaGenerationConfig, i as JsonObject, j as JsonValue, K as KotlinGenerationConfig, M as McpAvailabilityStatus, k as McpGenerationConfig, l as McpToolFilter, P as PackageConfig, m as PhpGenerationConfig, n as PlanModifiers, o as PythonGenerationConfig, R as RubyGenerationConfig, p 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, q as SwiftGenerationConfig, T as TerraformGenerationConfig, r as TypescriptGenerationConfig, s as cliDistributionConfigSchema, t as cliDistributionGithubAppSchema, u as cliDistributionHomebrewSchema, v as cliDistributionScoopSchema, w as cliGenerationConfigSchema, x as composerPackageNameSchema, y as csharpGenerationConfigSchema, z as dependencySchema, A as exactSemverSchema, B as githubActionsSecretNameSchema, E as goGenerationConfigSchema, F as goModulePathSchema, H as javaGenerationConfigSchema, I as jsonObjectSchema, L as jsonValueSchema, N as kotlinGenerationConfigSchema, O as mcpAvailabilityStatuses, Q as mcpGenerationConfigSchema, U as nonEmptyStringSchema, V as packageConfigSchema, W as phpGenerationConfigSchema, X as pythonGenerationConfigSchema, Y as relativePathSchema, Z as rubyGenerationConfigSchema, _ as rustGenerationConfigSchema, s as sdkConfigV1CliDistributionConfigSchema, t as sdkConfigV1CliDistributionGithubAppSchema, u as sdkConfigV1CliDistributionHomebrewSchema, v as sdkConfigV1CliDistributionScoopSchema, w as sdkConfigV1CliGenerationConfigSchema, x as sdkConfigV1ComposerPackageNameSchema, y as sdkConfigV1CsharpGenerationConfigSchema, A as sdkConfigV1ExactSemverSchema, B as sdkConfigV1GithubActionsSecretNameSchema, E as sdkConfigV1GoGenerationConfigSchema, F as sdkConfigV1GoModulePathSchema, H as sdkConfigV1JavaGenerationConfigSchema, N as sdkConfigV1KotlinGenerationConfigSchema, Q as sdkConfigV1McpGenerationConfigSchema, U as sdkConfigV1NonEmptyStringSchema, W as sdkConfigV1PhpGenerationConfigSchema, X as sdkConfigV1PythonGenerationConfigSchema, Y as sdkConfigV1RelativePathSchema, Z as sdkConfigV1RubyGenerationConfigSchema, _ as sdkConfigV1RustGenerationConfigSchema, $ as sdkConfigV1SwiftGenerationConfigSchema, a0 as sdkConfigV1TerraformGenerationConfigSchema, a1 as sdkConfigV1TypescriptGenerationConfigSchema, $ as swiftGenerationConfigSchema, a0 as terraformGenerationConfigSchema, a1 as typescriptGenerationConfigSchema } from './typescript-Byhn4MqL.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, 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, sourceSpecTypeSchema, targetConfigSchema, targetLanguageSchema, unsupportedFieldSchema, webhookSignatureSchema } from './sdk-config-ir/v1/index.js';
|
|
4
4
|
import 'zod';
|
package/dist/index.js
CHANGED
|
@@ -432,6 +432,12 @@ var dependencySchema = z.strictObject({
|
|
|
432
432
|
}).refine(({ source, version }) => source !== void 0 || version !== void 0, {
|
|
433
433
|
message: "dependency must define a version or a source"
|
|
434
434
|
});
|
|
435
|
+
var bugsSchema = z.strictObject({
|
|
436
|
+
url: nonEmptyStringSchema.optional().describe("The issue tracker URL."),
|
|
437
|
+
email: nonEmptyStringSchema.optional().describe("The address for reporting issues.")
|
|
438
|
+
}).refine(({ url, email }) => url !== void 0 || email !== void 0, {
|
|
439
|
+
message: "bugs must define a url or an email"
|
|
440
|
+
});
|
|
435
441
|
var projectUrlSchema = z.strictObject({
|
|
436
442
|
label: nonEmptyStringSchema.describe("The label displayed for the project link."),
|
|
437
443
|
url: nonEmptyStringSchema.describe("The project link URL.")
|
|
@@ -446,6 +452,7 @@ var packageConfigSchema = z.strictObject({
|
|
|
446
452
|
description: z.string().optional().describe("The package description used in generated metadata."),
|
|
447
453
|
repository: nonEmptyStringSchema.optional().describe("The source repository for the generated SDK."),
|
|
448
454
|
homepage: nonEmptyStringSchema.optional().describe("The package homepage URL."),
|
|
455
|
+
bugs: bugsSchema.optional().describe("Where issues with the package are reported."),
|
|
449
456
|
documentationUrl: nonEmptyStringSchema.optional().describe("The package documentation URL."),
|
|
450
457
|
authors: z.array(authorSchema).optional().describe("Authors credited in package metadata."),
|
|
451
458
|
developers: z.array(developerSchema).optional().describe("Developers credited in package metadata."),
|
|
@@ -1233,6 +1240,7 @@ function githubOutput(value, publishInfo, rawOutput, language, sourcePath, state
|
|
|
1233
1240
|
const reviewers = mapReviewers(value.reviewers, [...sourcePath, "reviewers"], state);
|
|
1234
1241
|
if (type) consume(state, [...sourcePath, "type"]);
|
|
1235
1242
|
if (typeof value.makePr === "boolean") consume(state, [...sourcePath, "makePr"]);
|
|
1243
|
+
if (value.workflows === true) consume(state, [...sourcePath, "workflows"]);
|
|
1236
1244
|
if (stringValue(value.host)) consume(state, [...sourcePath, "host"]);
|
|
1237
1245
|
if (stringValue(value.branch)) consume(state, [...sourcePath, "branch"]);
|
|
1238
1246
|
consumeCredentialObject(value.credentials, [...sourcePath, "credentials"], state);
|
|
@@ -2440,7 +2448,7 @@ var packageScriptSchema = z.strictObject({
|
|
|
2440
2448
|
command: nonEmptyStringSchema.describe("The command executed by the package script.")
|
|
2441
2449
|
});
|
|
2442
2450
|
var httpClientSchema = z.strictObject({
|
|
2443
|
-
name: z.enum(["axios", "fetch"]).describe("The HTTP client used by generated TypeScript code.")
|
|
2451
|
+
name: z.enum(["axios", "fetch", "node-fetch"]).describe("The HTTP client used by generated TypeScript code.")
|
|
2444
2452
|
});
|
|
2445
2453
|
var typescriptGenerationConfigSchema = z.strictObject({
|
|
2446
2454
|
typescriptVersion: nonEmptyStringSchema.optional().describe("The TypeScript version used by the generated project."),
|
|
@@ -2456,6 +2464,37 @@ var typescriptGenerationConfigSchema = z.strictObject({
|
|
|
2456
2464
|
/** Name of the top-level namespace export emitted by Fern-compatible TypeScript SDKs. */
|
|
2457
2465
|
namespaceExportName: nonEmptyStringSchema.optional().describe("The top-level namespace export name."),
|
|
2458
2466
|
consolidateTypeFiles: z.boolean().optional().describe("Whether generated types are consolidated into fewer source files."),
|
|
2467
|
+
formDataSupport: z.enum(["Node16", "Node18"]).optional().describe(
|
|
2468
|
+
"The multipart form-data implementation: Node16 uses the form-data packages, Node18 uses the platform FormData."
|
|
2469
|
+
),
|
|
2470
|
+
allowExtraFields: z.boolean().optional().describe(
|
|
2471
|
+
"Whether response parsing keeps unrecognized object keys and accepts unrecognized union members and enum values."
|
|
2472
|
+
),
|
|
2473
|
+
generateSubpackageExports: z.boolean().optional().describe(
|
|
2474
|
+
"Whether the package manifest exports each subpackage client as its own entry point."
|
|
2475
|
+
),
|
|
2476
|
+
exportAllRequestsAtRoot: z.boolean().optional().describe("Whether every request type is also exported from the package root."),
|
|
2477
|
+
generateEndpointMetadata: z.boolean().optional().describe("Whether generated clients expose metadata for each endpoint."),
|
|
2478
|
+
outputEsm: z.boolean().optional().describe(
|
|
2479
|
+
"Whether the package is marked as an ES module while still shipping its CommonJS build."
|
|
2480
|
+
),
|
|
2481
|
+
neverThrowErrors: z.boolean().optional().describe(
|
|
2482
|
+
"Whether client methods return a wrapped response instead of throwing on a non-2xx status."
|
|
2483
|
+
),
|
|
2484
|
+
includeOtherInUnionTypes: z.boolean().optional().describe("Whether union types gain a member for variants the SDK does not recognize."),
|
|
2485
|
+
includeUtilsOnUnionMembers: z.boolean().optional().describe("Whether helper utilities are generated on each member of a union type."),
|
|
2486
|
+
omitFernHeaders: z.boolean().optional().describe("Whether requests omit the SDK identification headers and the User-Agent header."),
|
|
2487
|
+
linter: z.enum(["biome", "oxlint", "none"]).optional().describe("The linter configured in the generated project."),
|
|
2488
|
+
formatter: z.enum(["prettier", "biome", "oxfmt", "none"]).optional().describe("The formatter configured in the generated project."),
|
|
2489
|
+
exports: jsonObjectSchema.optional().describe(
|
|
2490
|
+
"package.json exports entries, keyed by subpath, applied over the generated exports. Each subpath replaces the generated one."
|
|
2491
|
+
),
|
|
2492
|
+
files: z.array(nonEmptyStringSchema).optional().describe("package.json files entries, listed ahead of the generated ones."),
|
|
2493
|
+
engines: z.record(nonEmptyStringSchema, nonEmptyStringSchema).optional().describe("package.json engines version ranges, keyed by engine name such as node."),
|
|
2494
|
+
lintStaged: z.record(nonEmptyStringSchema, z.array(nonEmptyStringSchema).min(1)).optional().describe("lint-staged commands to run, keyed by file glob."),
|
|
2495
|
+
browser: z.record(nonEmptyStringSchema, z.union([z.boolean(), nonEmptyStringSchema])).optional().describe(
|
|
2496
|
+
"package.json browser field: a module or file is excluded (false) or replaced by another path."
|
|
2497
|
+
),
|
|
2459
2498
|
allowCustomFetcher: z.boolean().optional().describe("Whether callers can supply a custom fetch implementation."),
|
|
2460
2499
|
useBrandedStringAliases: z.boolean().optional().describe("Whether string aliases are emitted as distinct branded types."),
|
|
2461
2500
|
useLegacyExports: z.boolean().optional().describe("Whether the package emits the legacy export layout."),
|
|
@@ -2871,16 +2910,21 @@ function mapFernConfigToSdkConfigV1(input) {
|
|
|
2871
2910
|
...optional("client", clients.targetOverrides[index]),
|
|
2872
2911
|
...optional("docs", docs.targetOverrides[index])
|
|
2873
2912
|
};
|
|
2874
|
-
const
|
|
2913
|
+
const mappedPackage = { ...invocation.package, ...outputPackage, ...generator.package };
|
|
2875
2914
|
invocation.unsupportedFields.push(
|
|
2876
2915
|
...resolveTargetPackage(
|
|
2877
|
-
|
|
2916
|
+
mappedPackage,
|
|
2878
2917
|
invocation.packageFallbacks,
|
|
2879
2918
|
generator,
|
|
2880
2919
|
output.delivery,
|
|
2881
2920
|
index
|
|
2882
2921
|
)
|
|
2883
2922
|
);
|
|
2923
|
+
const targetPackage = withRustCratesPublishDefaults(mappedPackage, {
|
|
2924
|
+
language,
|
|
2925
|
+
output,
|
|
2926
|
+
generator
|
|
2927
|
+
});
|
|
2884
2928
|
if (Object.keys(targetPackage).length > 0 || outputPackage || generator.package) {
|
|
2885
2929
|
target.package = targetPackage;
|
|
2886
2930
|
}
|
|
@@ -2949,6 +2993,21 @@ function mapFernConfigToSdkConfigV1(input) {
|
|
|
2949
2993
|
])
|
|
2950
2994
|
};
|
|
2951
2995
|
}
|
|
2996
|
+
function withRustCratesPublishDefaults(packageConfig, { language, output, generator }) {
|
|
2997
|
+
if (language !== "rust" || !("publish" in output) || output.publish?.registry !== "crates") {
|
|
2998
|
+
return packageConfig;
|
|
2999
|
+
}
|
|
3000
|
+
const { packageName } = packageConfig;
|
|
3001
|
+
return {
|
|
3002
|
+
...packageName ? { description: `Rust SDK for ${packageName} generated by Fern` } : {},
|
|
3003
|
+
...usesCustomLicenseFile(generator) ? {} : { license: { type: "MIT" } },
|
|
3004
|
+
...packageConfig
|
|
3005
|
+
};
|
|
3006
|
+
}
|
|
3007
|
+
function usesCustomLicenseFile({ config, raw }) {
|
|
3008
|
+
const metadata = isObject(raw) && isObject(raw.metadata) ? raw.metadata : void 0;
|
|
3009
|
+
return isObject(config) && typeof config.packageLicenseFile === "string" || isObject(metadata?.license);
|
|
3010
|
+
}
|
|
2952
3011
|
function resolveLanguage(generator, index) {
|
|
2953
3012
|
const language = generator.sdkLanguage ?? generatorLanguages[generator.name];
|
|
2954
3013
|
if (!language || !isFernLanguage(language)) {
|
|
@@ -3087,6 +3146,13 @@ function mapInvocation(generator, language, activeLanguages, index) {
|
|
|
3087
3146
|
}
|
|
3088
3147
|
}
|
|
3089
3148
|
const docs = mapReadme(generator.readme, language, activeLanguages, state, [...prefix, "readme"]);
|
|
3149
|
+
if (language === "typescript") {
|
|
3150
|
+
const includeApiReference = takeBoolean(config, ["includeApiReference"], state, [
|
|
3151
|
+
...prefix,
|
|
3152
|
+
"config"
|
|
3153
|
+
]);
|
|
3154
|
+
if (includeApiReference !== void 0) docs.includeApiReference = includeApiReference;
|
|
3155
|
+
}
|
|
3090
3156
|
const unsupportedFields = [
|
|
3091
3157
|
...state.valueDiagnostics ?? [],
|
|
3092
3158
|
...collectUnsupported(config, [...prefix, "config"], state),
|
|
@@ -3267,7 +3333,13 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
|
|
|
3267
3333
|
});
|
|
3268
3334
|
if (Object.keys(naming).length) generation.naming = naming;
|
|
3269
3335
|
const wireTests = takeBoolean(config, ["enableWireTests", "generateWireTests"], state, basePath);
|
|
3270
|
-
|
|
3336
|
+
const wireTestsFallback = language === "typescript" ? takeBoolean(config, ["wireTestsFallbackToAutoGeneratedErrorExamples"], state, basePath) : void 0;
|
|
3337
|
+
if (wireTests !== void 0 || wireTestsFallback !== void 0) {
|
|
3338
|
+
generation.wireTests = { enabled: wireTests ?? true };
|
|
3339
|
+
if (wireTestsFallback !== void 0) {
|
|
3340
|
+
generation.wireTests.fallbackToGeneratedErrorExamples = wireTestsFallback;
|
|
3341
|
+
}
|
|
3342
|
+
}
|
|
3271
3343
|
const webSockets = takeBoolean(
|
|
3272
3344
|
config,
|
|
3273
3345
|
["generateWebSocketClients", "shouldGenerateWebsocketClients", "enableWebsockets"],
|
|
@@ -3310,10 +3382,10 @@ function mapTypescriptStreams(config, state, basePath) {
|
|
|
3310
3382
|
function mapLanguageConfig(language, config, state, packageConfig, basePath, targetIndex) {
|
|
3311
3383
|
switch (language) {
|
|
3312
3384
|
case "typescript":
|
|
3313
|
-
return mapTypescript(config, state, packageConfig, basePath);
|
|
3385
|
+
return mapTypescript(config, state, packageConfig, basePath, true);
|
|
3314
3386
|
case "mcp":
|
|
3315
3387
|
return {
|
|
3316
|
-
...mapTypescript(config, state, packageConfig, basePath),
|
|
3388
|
+
...mapTypescript(config, state, packageConfig, basePath, false),
|
|
3317
3389
|
...mapMcp(config, state, basePath)
|
|
3318
3390
|
};
|
|
3319
3391
|
case "python":
|
|
@@ -3339,7 +3411,7 @@ function mapLanguageConfig(language, config, state, packageConfig, basePath, tar
|
|
|
3339
3411
|
return mapTerraform(config, state, packageConfig, basePath);
|
|
3340
3412
|
}
|
|
3341
3413
|
}
|
|
3342
|
-
function mapTypescript(config, state, packageConfig, basePath) {
|
|
3414
|
+
function mapTypescript(config, state, packageConfig, basePath, sdkTarget) {
|
|
3343
3415
|
const packageJsonManifest = mapPackageManifest(
|
|
3344
3416
|
config,
|
|
3345
3417
|
["packageJson"],
|
|
@@ -3352,18 +3424,74 @@ function mapTypescript(config, state, packageConfig, basePath) {
|
|
|
3352
3424
|
const packageManagerVersionPart = packageManagerAtIndex >= 0 ? packageJsonPackageManager?.slice(packageManagerAtIndex + 1).split("+")[0] : void 0;
|
|
3353
3425
|
const packageManagerVersion = packageManagerVersionPart || void 0;
|
|
3354
3426
|
if (packageJsonManifest) liftPackageJsonDependencies(packageJsonManifest, state, packageConfig);
|
|
3427
|
+
const manifestOptions = sdkTarget && packageJsonManifest ? mapPackageManifestOptions(packageJsonManifest, state, packageConfig) : {};
|
|
3355
3428
|
const serdeLayer = takeBoolean(config, ["serdeLayer"], state, basePath);
|
|
3356
3429
|
const noSerdeLayer = takeBoolean(config, ["noSerdeLayer"], state, basePath);
|
|
3357
|
-
const fetchSupport = takeEnum(
|
|
3430
|
+
const fetchSupport = takeEnum(
|
|
3431
|
+
config,
|
|
3432
|
+
["fetchSupport"],
|
|
3433
|
+
sdkTarget ? ["native", "node-fetch"] : ["native"],
|
|
3434
|
+
state,
|
|
3435
|
+
basePath
|
|
3436
|
+
);
|
|
3358
3437
|
const namingObject = takeObject(config, ["naming"], state, basePath);
|
|
3359
3438
|
const nestedNamespace = namingObject ? takeString(namingObject.value, ["namespace"], state, namingObject.path) : void 0;
|
|
3439
|
+
const sdkOnlyOptions = sdkTarget ? {
|
|
3440
|
+
formDataSupport: takeEnum(
|
|
3441
|
+
config,
|
|
3442
|
+
["formDataSupport"],
|
|
3443
|
+
["Node16", "Node18"],
|
|
3444
|
+
state,
|
|
3445
|
+
basePath
|
|
3446
|
+
),
|
|
3447
|
+
allowExtraFields: takeBoolean(config, ["allowExtraFields"], state, basePath),
|
|
3448
|
+
generateSubpackageExports: takeBoolean(
|
|
3449
|
+
config,
|
|
3450
|
+
["generateSubpackageExports"],
|
|
3451
|
+
state,
|
|
3452
|
+
basePath
|
|
3453
|
+
),
|
|
3454
|
+
exportAllRequestsAtRoot: takeBoolean(config, ["exportAllRequestsAtRoot"], state, basePath),
|
|
3455
|
+
generateEndpointMetadata: takeBoolean(
|
|
3456
|
+
config,
|
|
3457
|
+
["generateEndpointMetadata"],
|
|
3458
|
+
state,
|
|
3459
|
+
basePath
|
|
3460
|
+
),
|
|
3461
|
+
outputEsm: takeBoolean(config, ["outputEsm"], state, basePath),
|
|
3462
|
+
neverThrowErrors: takeBoolean(config, ["neverThrowErrors"], state, basePath),
|
|
3463
|
+
includeOtherInUnionTypes: takeBoolean(
|
|
3464
|
+
config,
|
|
3465
|
+
["includeOtherInUnionTypes"],
|
|
3466
|
+
state,
|
|
3467
|
+
basePath
|
|
3468
|
+
),
|
|
3469
|
+
includeUtilsOnUnionMembers: takeBoolean(
|
|
3470
|
+
config,
|
|
3471
|
+
["includeUtilsOnUnionMembers"],
|
|
3472
|
+
state,
|
|
3473
|
+
basePath
|
|
3474
|
+
),
|
|
3475
|
+
omitFernHeaders: takeBoolean(config, ["omitFernHeaders"], state, basePath),
|
|
3476
|
+
linter: takeEnum(config, ["linter"], ["biome", "oxlint", "none"], state, basePath),
|
|
3477
|
+
formatter: takeEnum(
|
|
3478
|
+
config,
|
|
3479
|
+
["formatter"],
|
|
3480
|
+
["prettier", "biome", "oxfmt", "none"],
|
|
3481
|
+
state,
|
|
3482
|
+
basePath
|
|
3483
|
+
)
|
|
3484
|
+
} : {};
|
|
3360
3485
|
return compact({
|
|
3486
|
+
...sdkOnlyOptions,
|
|
3487
|
+
// Only the manifest writes these keys; nothing in sdkOnlyOptions or below shares a name.
|
|
3488
|
+
...manifestOptions,
|
|
3361
3489
|
typescriptVersion: takeString(config, ["typescriptVersion"], state, basePath),
|
|
3362
3490
|
zodVersion: takeString(config, ["zodVersion"], state, basePath),
|
|
3363
3491
|
packageManager: takeEnum(config, ["packageManager"], ["pnpm", "yarn"], state, basePath),
|
|
3364
3492
|
packageManagerVersion,
|
|
3365
3493
|
testFramework: takeEnum(config, ["testFramework"], ["jest", "vitest"], state, basePath),
|
|
3366
|
-
httpClient: fetchSupport ===
|
|
3494
|
+
httpClient: fetchSupport === void 0 ? void 0 : { name: fetchSupport === "native" ? "fetch" : "node-fetch" },
|
|
3367
3495
|
bundle: takeBoolean(config, ["bundle"], state, basePath),
|
|
3368
3496
|
exportClassDefault: takeBoolean(config, ["exportClassDefault"], state, basePath),
|
|
3369
3497
|
namespaceExportName: takeString(config, ["namespaceExportName", "namespaceExport"], state, basePath) ?? nestedNamespace,
|
|
@@ -3760,6 +3888,83 @@ function mapPackageManifest(config, aliases, state, packageConfig, basePath) {
|
|
|
3760
3888
|
);
|
|
3761
3889
|
return manifest;
|
|
3762
3890
|
}
|
|
3891
|
+
function mapPackageManifestOptions(manifest, state, packageConfig) {
|
|
3892
|
+
const bugs = takeManifestBugs(manifest, state);
|
|
3893
|
+
if (bugs) packageConfig.bugs = bugs;
|
|
3894
|
+
const repository = takeManifestRepository(manifest, state);
|
|
3895
|
+
if (repository !== void 0 && packageConfig.repository === void 0) {
|
|
3896
|
+
packageConfig.repository = repository;
|
|
3897
|
+
}
|
|
3898
|
+
const exports = takeObject(manifest.value, ["exports"], state, manifest.path);
|
|
3899
|
+
if (exports) consume(state, exports.path);
|
|
3900
|
+
return compact({
|
|
3901
|
+
exports: exports?.value,
|
|
3902
|
+
scripts: takeManifestScripts(manifest, state),
|
|
3903
|
+
files: takeStringArray(manifest.value, ["files"], state, manifest.path),
|
|
3904
|
+
engines: takeManifestStringRecord(manifest, "engines", state),
|
|
3905
|
+
lintStaged: takeManifestLintStaged(manifest, state),
|
|
3906
|
+
browser: takeManifestBrowser(manifest, state)
|
|
3907
|
+
});
|
|
3908
|
+
}
|
|
3909
|
+
function takeManifestBugs(manifest, state) {
|
|
3910
|
+
const text = takeString(manifest.value, ["bugs"], state, manifest.path);
|
|
3911
|
+
if (text !== void 0) return { url: text };
|
|
3912
|
+
const located = takeObject(manifest.value, ["bugs"], state, manifest.path);
|
|
3913
|
+
if (!located) return void 0;
|
|
3914
|
+
const url = takeString(located.value, ["url"], state, located.path);
|
|
3915
|
+
const email = takeString(located.value, ["email"], state, located.path);
|
|
3916
|
+
return url === void 0 && email === void 0 ? void 0 : compact({ url, email });
|
|
3917
|
+
}
|
|
3918
|
+
function takeManifestRepository(manifest, state) {
|
|
3919
|
+
const text = takeString(manifest.value, ["repository"], state, manifest.path);
|
|
3920
|
+
if (text !== void 0) return text;
|
|
3921
|
+
const located = takeObject(manifest.value, ["repository"], state, manifest.path);
|
|
3922
|
+
if (!located) return void 0;
|
|
3923
|
+
const url = takeString(located.value, ["url"], state, located.path);
|
|
3924
|
+
if (url !== void 0) void takeEnum(located.value, ["type"], ["git"], state, located.path);
|
|
3925
|
+
return url;
|
|
3926
|
+
}
|
|
3927
|
+
function takeManifestScripts(manifest, state) {
|
|
3928
|
+
const located = takeObject(manifest.value, ["scripts"], state, manifest.path);
|
|
3929
|
+
if (!located) return void 0;
|
|
3930
|
+
const scripts = Object.entries(located.value).flatMap(([name, command]) => {
|
|
3931
|
+
if (typeof command !== "string" || !command) return [];
|
|
3932
|
+
consume(state, [...located.path, name]);
|
|
3933
|
+
return [{ name, command }];
|
|
3934
|
+
});
|
|
3935
|
+
return scripts.length ? scripts : void 0;
|
|
3936
|
+
}
|
|
3937
|
+
function takeManifestStringRecord(manifest, key, state) {
|
|
3938
|
+
const located = takeObject(manifest.value, [key], state, manifest.path);
|
|
3939
|
+
if (!located) return void 0;
|
|
3940
|
+
const entries = Object.entries(located.value).flatMap(([name, value]) => {
|
|
3941
|
+
if (typeof value !== "string" || !value) return [];
|
|
3942
|
+
consume(state, [...located.path, name]);
|
|
3943
|
+
return [[name, value]];
|
|
3944
|
+
});
|
|
3945
|
+
return entries.length ? Object.fromEntries(entries) : void 0;
|
|
3946
|
+
}
|
|
3947
|
+
function takeManifestLintStaged(manifest, state) {
|
|
3948
|
+
const located = takeObject(manifest.value, ["lint-staged"], state, manifest.path);
|
|
3949
|
+
if (!located) return void 0;
|
|
3950
|
+
const entries = Object.entries(located.value).flatMap(([glob, commands]) => {
|
|
3951
|
+
const list = typeof commands === "string" ? [commands] : stringArrayValue(commands);
|
|
3952
|
+
if (!list?.length || list.some((command) => !command)) return [];
|
|
3953
|
+
consume(state, [...located.path, glob]);
|
|
3954
|
+
return [[glob, list]];
|
|
3955
|
+
});
|
|
3956
|
+
return entries.length ? Object.fromEntries(entries) : void 0;
|
|
3957
|
+
}
|
|
3958
|
+
function takeManifestBrowser(manifest, state) {
|
|
3959
|
+
const located = takeObject(manifest.value, ["browser"], state, manifest.path);
|
|
3960
|
+
if (!located) return void 0;
|
|
3961
|
+
const entries = Object.entries(located.value).flatMap(([name, value]) => {
|
|
3962
|
+
if (typeof value !== "boolean" && (typeof value !== "string" || !value)) return [];
|
|
3963
|
+
consume(state, [...located.path, name]);
|
|
3964
|
+
return [[name, value]];
|
|
3965
|
+
});
|
|
3966
|
+
return entries.length ? Object.fromEntries(entries) : void 0;
|
|
3967
|
+
}
|
|
3763
3968
|
function takeManifestAuthors(manifest, state) {
|
|
3764
3969
|
const located = locate(manifest.value, ["authors"], manifest.path);
|
|
3765
3970
|
if (!located || !Array.isArray(located.value)) return [];
|