@postman/sdk-config 0.0.3 → 0.1.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 +42 -17
- package/dist/index.cjs +2017 -180
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1980 -181
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +2233 -0
- package/dist/sdk-config/index.cjs.map +1 -0
- package/dist/sdk-config/index.d.cts +3 -0
- package/dist/sdk-config/index.d.ts +3 -0
- package/dist/sdk-config/index.js +2192 -0
- package/dist/sdk-config/index.js.map +1 -0
- package/dist/sdk-config/v1/index.cjs +2233 -0
- package/dist/sdk-config/v1/index.cjs.map +1 -0
- package/dist/sdk-config/v1/index.d.cts +8644 -0
- package/dist/sdk-config/v1/index.d.ts +8644 -0
- package/dist/sdk-config/v1/index.js +2192 -0
- package/dist/sdk-config/v1/index.js.map +1 -0
- package/dist/sdk-config-ir/index.cjs +155 -19
- package/dist/sdk-config-ir/index.cjs.map +1 -1
- package/dist/sdk-config-ir/index.d.cts +2 -1
- package/dist/sdk-config-ir/index.d.ts +2 -1
- package/dist/sdk-config-ir/index.js +154 -20
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +155 -19
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +448 -398
- package/dist/sdk-config-ir/v1/index.d.ts +448 -398
- package/dist/sdk-config-ir/v1/index.js +154 -20
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/typescript-ByDbin_v.d.cts +426 -0
- package/dist/typescript-ByDbin_v.d.ts +426 -0
- package/package.json +15 -2
- package/src/sdk-config/v1/README.md +135 -0
- package/src/sdk-config-ir/v1/README.md +46 -27
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import semver from 'semver';
|
|
3
3
|
|
|
4
|
-
// src/sdk-config-
|
|
4
|
+
// src/sdk-config-domain/v1/api.ts
|
|
5
5
|
var nonEmptyStringSchema = z.string().min(1);
|
|
6
6
|
var exactSemverSchema = z.string().refine(
|
|
7
7
|
(value) => {
|
|
@@ -25,7 +25,7 @@ var jsonValueSchema = z.lazy(
|
|
|
25
25
|
);
|
|
26
26
|
var jsonObjectSchema = z.record(z.string(), jsonValueSchema);
|
|
27
27
|
|
|
28
|
-
// src/sdk-config-
|
|
28
|
+
// src/sdk-config-domain/v1/api.ts
|
|
29
29
|
var authVariableSchema = z.strictObject({
|
|
30
30
|
name: nonEmptyStringSchema.optional(),
|
|
31
31
|
environmentVariable: nonEmptyStringSchema.optional(),
|
|
@@ -175,7 +175,14 @@ var apiConfigSchema = z.strictObject({
|
|
|
175
175
|
environmentVariables: z.array(environmentVariableSchema).default([]),
|
|
176
176
|
defaultEnvironment: nonEmptyStringSchema.optional(),
|
|
177
177
|
auth: authConfigSchema.optional(),
|
|
178
|
-
headers: z.array(headerSchema).optional()
|
|
178
|
+
headers: z.array(headerSchema).optional(),
|
|
179
|
+
/**
|
|
180
|
+
* Selects the named `x-fern-audiences`.
|
|
181
|
+
*
|
|
182
|
+
* Absent means all audiences. A present empty array selects no tagged audience: untagged nodes
|
|
183
|
+
* remain included, while every audience-tagged node is excluded.
|
|
184
|
+
*/
|
|
185
|
+
audiences: z.array(nonEmptyStringSchema).optional()
|
|
179
186
|
});
|
|
180
187
|
var retryConfigSchema = z.strictObject({
|
|
181
188
|
enabled: z.boolean().default(true),
|
|
@@ -229,6 +236,7 @@ var clientConfigSchema = z.strictObject({
|
|
|
229
236
|
pathParameterStyle: parameterStyleSchema.optional(),
|
|
230
237
|
filePropertyStyle: parameterStyleSchema.optional(),
|
|
231
238
|
useDefaultRequestParameterValues: z.boolean().optional(),
|
|
239
|
+
respectOptionalRequestBody: z.boolean().optional(),
|
|
232
240
|
tokenRefresh: tokenRefreshConfigSchema.optional()
|
|
233
241
|
});
|
|
234
242
|
var unsupportedFieldSchema = z.strictObject({
|
|
@@ -274,12 +282,17 @@ var readmeEndpointSchema = z.strictObject({
|
|
|
274
282
|
path: nonEmptyStringSchema,
|
|
275
283
|
stream: z.boolean().optional()
|
|
276
284
|
});
|
|
285
|
+
var readmeCustomSectionSchema = z.strictObject({
|
|
286
|
+
title: nonEmptyStringSchema,
|
|
287
|
+
content: z.string()
|
|
288
|
+
});
|
|
277
289
|
var readmeConfigSchema = z.strictObject({
|
|
278
290
|
apiName: nonEmptyStringSchema.optional(),
|
|
279
291
|
introduction: z.string().optional(),
|
|
280
292
|
apiReferenceLink: nonEmptyStringSchema.optional(),
|
|
281
293
|
bannerLink: nonEmptyStringSchema.optional(),
|
|
282
294
|
disabledSections: z.array(nonEmptyStringSchema).optional(),
|
|
295
|
+
customSections: z.array(readmeCustomSectionSchema).optional(),
|
|
283
296
|
defaultEndpoint: readmeEndpointSchema.optional(),
|
|
284
297
|
features: z.record(z.string(), z.array(readmeEndpointSchema)).optional()
|
|
285
298
|
});
|
|
@@ -303,10 +316,15 @@ var csharpGenerationConfigSchema = z.strictObject({
|
|
|
303
316
|
simplifyObjectDictionaries: z.boolean().optional(),
|
|
304
317
|
explicitNamespaces: z.boolean().optional(),
|
|
305
318
|
rootNamespaceForCoreClasses: z.boolean().optional(),
|
|
306
|
-
includeExceptionHandler: z.boolean().optional()
|
|
319
|
+
includeExceptionHandler: z.boolean().optional(),
|
|
320
|
+
experimentalExplicitNullableOptional: z.boolean().optional()
|
|
307
321
|
});
|
|
308
322
|
var goGenerationConfigSchema = z.strictObject({
|
|
309
323
|
legacyComplexModels: z.boolean().optional(),
|
|
324
|
+
/** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
|
|
325
|
+
smartCasing: z.boolean().optional(),
|
|
326
|
+
/** Overrides the fern root-client constructor independently from the client type name. */
|
|
327
|
+
clientConstructorName: nonEmptyStringSchema.optional(),
|
|
310
328
|
unionVersion: z.enum(["v0", "v1"]).optional(),
|
|
311
329
|
includeLegacyClientOptions: z.boolean().optional()
|
|
312
330
|
});
|
|
@@ -316,15 +334,17 @@ var jvmGenerationConfigSchema = z.strictObject({
|
|
|
316
334
|
collapseOptionalNullable: z.boolean().optional(),
|
|
317
335
|
gradleDistributionUrl: z.string().min(1).optional(),
|
|
318
336
|
gradlePluginManagement: z.string().optional(),
|
|
319
|
-
gradleCentralDependencyManagement: z.boolean().optional()
|
|
337
|
+
gradleCentralDependencyManagement: z.boolean().optional(),
|
|
338
|
+
/** Selects co-located async methods or a separate async client surface. */
|
|
339
|
+
asyncStyle: z.enum(["dedicated-client", "twin-methods"]).optional()
|
|
320
340
|
});
|
|
321
341
|
|
|
322
|
-
// src/sdk-config-
|
|
342
|
+
// src/sdk-config-domain/v1/language/java.ts
|
|
323
343
|
var javaGenerationConfigSchema = jvmGenerationConfigSchema.extend({
|
|
324
344
|
includeKotlinSnippets: z.boolean().optional()
|
|
325
345
|
});
|
|
326
346
|
|
|
327
|
-
// src/sdk-config-
|
|
347
|
+
// src/sdk-config-domain/v1/language/kotlin.ts
|
|
328
348
|
var kotlinGenerationConfigSchema = jvmGenerationConfigSchema;
|
|
329
349
|
var compilerOptionsSchema = z.strictObject({
|
|
330
350
|
target: nonEmptyStringSchema.optional(),
|
|
@@ -356,8 +376,32 @@ var typescriptGenerationConfigSchema = z.strictObject({
|
|
|
356
376
|
scripts: z.array(packageScriptSchema).optional()
|
|
357
377
|
});
|
|
358
378
|
|
|
359
|
-
// src/sdk-config-
|
|
360
|
-
var
|
|
379
|
+
// src/sdk-config-domain/v1/language/mcp.ts
|
|
380
|
+
var mcpAvailabilityStatuses = [
|
|
381
|
+
"IN_DEVELOPMENT",
|
|
382
|
+
"PRE_RELEASE",
|
|
383
|
+
"GENERAL_AVAILABILITY",
|
|
384
|
+
"DEPRECATED",
|
|
385
|
+
"ALPHA",
|
|
386
|
+
"BETA",
|
|
387
|
+
"PREVIEW",
|
|
388
|
+
"LEGACY"
|
|
389
|
+
];
|
|
390
|
+
var mcpToolFilterSchema = z.strictObject({
|
|
391
|
+
include: z.array(nonEmptyStringSchema).optional(),
|
|
392
|
+
exclude: z.array(nonEmptyStringSchema).optional()
|
|
393
|
+
});
|
|
394
|
+
var mcpToolsetNameSchema = nonEmptyStringSchema.refine(
|
|
395
|
+
(name) => name !== "default" && /^[a-z0-9-]+$/.test(name),
|
|
396
|
+
'toolset names must match [a-z0-9-]+ and cannot be "default"'
|
|
397
|
+
);
|
|
398
|
+
var mcpGenerationConfigSchema = typescriptGenerationConfigSchema.extend({
|
|
399
|
+
serverName: nonEmptyStringSchema.optional(),
|
|
400
|
+
serverDescription: nonEmptyStringSchema.optional(),
|
|
401
|
+
excludeAvailability: z.array(z.enum(mcpAvailabilityStatuses)).optional(),
|
|
402
|
+
tools: mcpToolFilterSchema.optional(),
|
|
403
|
+
toolsets: z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional()
|
|
404
|
+
});
|
|
361
405
|
var phpGenerationConfigSchema = z.strictObject({
|
|
362
406
|
propertyAccess: z.enum(["public", "private"]).optional(),
|
|
363
407
|
generateClientInterfaces: z.boolean().optional()
|
|
@@ -398,7 +442,8 @@ var rustGenerationConfigSchema = z.strictObject({
|
|
|
398
442
|
defaultFeatures: z.array(nonEmptyStringSchema).optional()
|
|
399
443
|
});
|
|
400
444
|
var swiftGenerationConfigSchema = z.strictObject({
|
|
401
|
-
moduleName: nonEmptyStringSchema.optional()
|
|
445
|
+
moduleName: nonEmptyStringSchema.optional(),
|
|
446
|
+
nullableAsOptional: z.boolean().optional()
|
|
402
447
|
});
|
|
403
448
|
var goModulePathSchema = nonEmptyStringSchema.regex(
|
|
404
449
|
/^(?!.*(?:^|\/)\.{1,2}(?:\/|$))[A-Za-z0-9._~-]+(?:\/[A-Za-z0-9._~-]+)+$/,
|
|
@@ -479,7 +524,7 @@ var packageConfigSchema = z.strictObject({
|
|
|
479
524
|
extraPeerDependencies: z.array(dependencySchema).optional()
|
|
480
525
|
});
|
|
481
526
|
|
|
482
|
-
// src/sdk-config-
|
|
527
|
+
// src/sdk-config-domain/v1/language/terraform.ts
|
|
483
528
|
var planModifierSourceSchema = z.discriminatedUnion("enabled", [
|
|
484
529
|
z.strictObject({ enabled: z.literal(true), sourceDir: nonEmptyStringSchema }),
|
|
485
530
|
z.strictObject({ enabled: z.literal(false) })
|
|
@@ -553,7 +598,18 @@ var analyticsConfigSchema = z.strictObject({
|
|
|
553
598
|
var wireTestsSchema = z.strictObject({
|
|
554
599
|
enabled: z.boolean(),
|
|
555
600
|
exclusions: z.array(nonEmptyStringSchema).optional(),
|
|
556
|
-
fallbackToGeneratedErrorExamples: z.boolean().optional()
|
|
601
|
+
fallbackToGeneratedErrorExamples: z.boolean().optional(),
|
|
602
|
+
fixtureSource: z.enum(["synthetic", "recorded", "auto"]).optional()
|
|
603
|
+
});
|
|
604
|
+
var unitTestsSchema = z.strictObject({
|
|
605
|
+
enabled: z.boolean(),
|
|
606
|
+
mode: z.enum(["core-runtime", "schema-driven", "both"]).optional(),
|
|
607
|
+
exclusions: z.array(nonEmptyStringSchema).optional()
|
|
608
|
+
});
|
|
609
|
+
var fernDefinitionMetadataSchema = z.strictObject({
|
|
610
|
+
definitionS3DownloadUrl: nonEmptyStringSchema,
|
|
611
|
+
outputPath: nonEmptyStringSchema.optional(),
|
|
612
|
+
cliVersion: nonEmptyStringSchema.optional()
|
|
557
613
|
});
|
|
558
614
|
var streamsSchema = z.strictObject({
|
|
559
615
|
enabled: z.boolean(),
|
|
@@ -606,6 +662,17 @@ var generationConfigSchema = z.strictObject({
|
|
|
606
662
|
devContainer: z.boolean().default(false),
|
|
607
663
|
allowMockClient: z.boolean().default(false),
|
|
608
664
|
ignoreFiles: z.array(nonEmptyStringSchema).optional(),
|
|
665
|
+
/**
|
|
666
|
+
* Raw .fernignore file contents supplied to external publishers that need Fern ignore semantics.
|
|
667
|
+
* This is separate from generation.ignoreFiles because raw contents preserve comments, ordering,
|
|
668
|
+
* blank lines, and negation rules.
|
|
669
|
+
*/
|
|
670
|
+
fernignoreContents: z.string().optional(),
|
|
671
|
+
/**
|
|
672
|
+
* Optional Fern definition metadata for publisher paths that need to write definition or
|
|
673
|
+
* mock-server support files. This is not required for core GitHub artifact publishing.
|
|
674
|
+
*/
|
|
675
|
+
fernDefinitionMetadata: fernDefinitionMetadataSchema.optional(),
|
|
609
676
|
reservedKeywords: z.array(nonEmptyStringSchema).optional(),
|
|
610
677
|
hooks: hooksConfigSchema.optional(),
|
|
611
678
|
customCode: customCodeConfigSchema.optional(),
|
|
@@ -613,6 +680,7 @@ var generationConfigSchema = z.strictObject({
|
|
|
613
680
|
customQueryPaths: z.array(nonEmptyStringSchema).optional(),
|
|
614
681
|
analytics: analyticsConfigSchema.optional(),
|
|
615
682
|
wireTests: wireTestsSchema.optional(),
|
|
683
|
+
unitTests: unitTestsSchema.optional(),
|
|
616
684
|
webSockets: z.boolean().optional(),
|
|
617
685
|
streams: streamsSchema.optional(),
|
|
618
686
|
naming: namingConfigSchema.optional(),
|
|
@@ -630,8 +698,17 @@ var publishRegistrySchema = z.enum([
|
|
|
630
698
|
"go",
|
|
631
699
|
"composer"
|
|
632
700
|
]);
|
|
701
|
+
var credentialResolutionSchema = z.enum([
|
|
702
|
+
"refs-only",
|
|
703
|
+
"resolved-by-orchestrator",
|
|
704
|
+
"resolved-by-fiddle"
|
|
705
|
+
]);
|
|
633
706
|
var commonPublishShape = {
|
|
634
707
|
url: nonEmptyStringSchema.optional(),
|
|
708
|
+
/**
|
|
709
|
+
* Reference to registry publishing credentials. Raw tokens/passwords are intentionally not part of
|
|
710
|
+
* SDK Config IR; the external publisher or orchestrator resolves this reference before use.
|
|
711
|
+
*/
|
|
635
712
|
credentialsRef: nonEmptyStringSchema.optional(),
|
|
636
713
|
releaseBranch: nonEmptyStringSchema.optional(),
|
|
637
714
|
tolerateRepublish: z.boolean().optional()
|
|
@@ -646,6 +723,10 @@ var publishConfigSchema = z.discriminatedUnion("registry", [
|
|
|
646
723
|
z.strictObject({ registry: z.literal("composer"), ...commonPublishShape }),
|
|
647
724
|
z.strictObject({
|
|
648
725
|
registry: z.literal("maven"),
|
|
726
|
+
/**
|
|
727
|
+
* Reference to Maven signing credentials. Raw signing keys are intentionally not part of SDK
|
|
728
|
+
* Config IR; the external publisher or orchestrator resolves this reference before use.
|
|
729
|
+
*/
|
|
649
730
|
signingCredentialsRef: nonEmptyStringSchema.optional(),
|
|
650
731
|
...commonPublishShape
|
|
651
732
|
})
|
|
@@ -654,29 +735,54 @@ var reviewersSchema = z.strictObject({
|
|
|
654
735
|
teams: z.array(nonEmptyStringSchema).optional(),
|
|
655
736
|
users: z.array(nonEmptyStringSchema).optional()
|
|
656
737
|
});
|
|
738
|
+
var replayControlSchema = z.strictObject({
|
|
739
|
+
enabled: z.boolean()
|
|
740
|
+
});
|
|
657
741
|
var githubOutputSchema = z.strictObject({
|
|
658
742
|
repository: nonEmptyStringSchema,
|
|
659
743
|
host: nonEmptyStringSchema.optional(),
|
|
660
744
|
branch: nonEmptyStringSchema.optional(),
|
|
661
745
|
mode: z.enum(["release", "pull-request", "push"]).optional(),
|
|
662
746
|
reviewers: reviewersSchema.optional(),
|
|
747
|
+
/**
|
|
748
|
+
* Reference to GitHub credentials. Raw tokens are intentionally not part of SDK Config IR; the
|
|
749
|
+
* external publisher or orchestrator resolves this reference before use.
|
|
750
|
+
*/
|
|
663
751
|
credentialsRef: nonEmptyStringSchema.optional(),
|
|
664
|
-
privateRepository: z.boolean().optional()
|
|
665
|
-
|
|
752
|
+
privateRepository: z.boolean().optional(),
|
|
753
|
+
/** GitHub replay control. If omitted, the external publisher applies its default behavior. */
|
|
754
|
+
replay: replayControlSchema.optional(),
|
|
755
|
+
/** Run GitHub publishing verification. Defaults to false to match current Fiddle job behavior. */
|
|
756
|
+
verify: z.boolean().default(false),
|
|
757
|
+
/** Skip creating/updating a GitHub PR when no files changed. Defaults to false. */
|
|
758
|
+
skipIfNoDiff: z.boolean().default(false),
|
|
759
|
+
/** Automatically merge the GitHub publishing PR. Defaults to false. */
|
|
760
|
+
autoMerge: z.boolean().default(false)
|
|
761
|
+
});
|
|
762
|
+
var credentialResolutionShape = {
|
|
763
|
+
/**
|
|
764
|
+
* Where output credential references are resolved. SDK Config IR carries refs only; raw resolved
|
|
765
|
+
* credentials belong at the external publisher/orchestrator boundary, not in this config.
|
|
766
|
+
*/
|
|
767
|
+
credentialResolution: credentialResolutionSchema.default("refs-only")
|
|
768
|
+
};
|
|
666
769
|
var filesOutputSchema = z.strictObject({
|
|
667
770
|
delivery: z.literal("files"),
|
|
668
771
|
path: nonEmptyStringSchema.optional(),
|
|
669
|
-
publish: publishConfigSchema.optional()
|
|
772
|
+
publish: publishConfigSchema.optional(),
|
|
773
|
+
...credentialResolutionShape
|
|
670
774
|
});
|
|
671
775
|
var zipOutputSchema = z.strictObject({
|
|
672
776
|
delivery: z.literal("zip"),
|
|
673
777
|
fileName: nonEmptyStringSchema.optional(),
|
|
674
|
-
publish: publishConfigSchema.optional()
|
|
778
|
+
publish: publishConfigSchema.optional(),
|
|
779
|
+
...credentialResolutionShape
|
|
675
780
|
});
|
|
676
781
|
var githubDeliverySchema = z.strictObject({
|
|
677
782
|
delivery: z.literal("github"),
|
|
678
783
|
github: githubOutputSchema,
|
|
679
|
-
publish: publishConfigSchema.optional()
|
|
784
|
+
publish: publishConfigSchema.optional(),
|
|
785
|
+
...credentialResolutionShape
|
|
680
786
|
});
|
|
681
787
|
var outputConfigSchema = z.discriminatedUnion(
|
|
682
788
|
"delivery",
|
|
@@ -696,7 +802,8 @@ var apiImportSettingsSchema = z.strictObject({
|
|
|
696
802
|
onlyIncludeReferencedSchemas: z.boolean().optional(),
|
|
697
803
|
objectQueryParameters: z.boolean().optional(),
|
|
698
804
|
typeDatesAsStrings: z.boolean().optional(),
|
|
699
|
-
groupMultiApiEnvironments: z.boolean().optional()
|
|
805
|
+
groupMultiApiEnvironments: z.boolean().optional(),
|
|
806
|
+
defaultIntegerFormat: z.enum(["int32", "int64", "uint32", "uint64"]).optional()
|
|
700
807
|
});
|
|
701
808
|
var sourceSpecTypeSchema = z.enum([
|
|
702
809
|
"openapi",
|
|
@@ -753,7 +860,19 @@ var targetConfigSchema = z.strictObject({
|
|
|
753
860
|
generatorVersion: exactSemverSchema.optional(),
|
|
754
861
|
sourceOrigin: z.enum(["postman", "fern"]),
|
|
755
862
|
sdkName: nonEmptyStringSchema,
|
|
863
|
+
/**
|
|
864
|
+
* Stable Fern/Fiddle API identity for external publishing.
|
|
865
|
+
* Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
|
|
866
|
+
* target.sdkName because SDK display names and Fern API names are not equivalent.
|
|
867
|
+
*/
|
|
868
|
+
apiName: nonEmptyStringSchema.optional(),
|
|
756
869
|
organization: nonEmptyStringSchema.optional(),
|
|
870
|
+
/**
|
|
871
|
+
* Stable Fern/Fiddle organization identity for external publishing.
|
|
872
|
+
* Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
|
|
873
|
+
* target.organization because source organization metadata is optional and may not match Fern.
|
|
874
|
+
*/
|
|
875
|
+
organizationName: nonEmptyStringSchema.optional(),
|
|
757
876
|
sdkVersion: nonEmptyStringSchema.default("1.0.0"),
|
|
758
877
|
apiVersion: nonEmptyStringSchema.optional()
|
|
759
878
|
});
|
|
@@ -761,7 +880,7 @@ var targetConfigSchema = z.strictObject({
|
|
|
761
880
|
// src/sdk-config-ir/v1/sdk-config-ir-v1.ts
|
|
762
881
|
var SDK_CONFIG_IR_V1_SCHEMA_VERSION = "sdk-config-ir/v1";
|
|
763
882
|
var publishRegistryLanguages = {
|
|
764
|
-
npm: ["typescript"],
|
|
883
|
+
npm: ["typescript", "mcp"],
|
|
765
884
|
pypi: ["python"],
|
|
766
885
|
maven: ["java", "kotlin"],
|
|
767
886
|
nuget: ["csharp"],
|
|
@@ -829,6 +948,21 @@ var sdkConfigIrV1Schema = z.strictObject({
|
|
|
829
948
|
compatibility: compatibilityConfigSchema.optional()
|
|
830
949
|
}).superRefine(({ compatibility, generation, output, package: packageConfig, target }, context) => {
|
|
831
950
|
const configuredLanguages = Object.keys(generation.language ?? {});
|
|
951
|
+
const requiresExternalPublishIdentity = output.delivery === "github" || output.publish !== void 0;
|
|
952
|
+
if (requiresExternalPublishIdentity) {
|
|
953
|
+
[
|
|
954
|
+
["apiName", "target.apiName is required for external publishing"],
|
|
955
|
+
["organizationName", "target.organizationName is required for external publishing"]
|
|
956
|
+
].forEach(([field, message]) => {
|
|
957
|
+
if (!target[field]) {
|
|
958
|
+
context.addIssue({
|
|
959
|
+
code: "custom",
|
|
960
|
+
message,
|
|
961
|
+
path: ["target", field]
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
});
|
|
965
|
+
}
|
|
832
966
|
configuredLanguages.forEach((language) => {
|
|
833
967
|
if (language !== target.language) {
|
|
834
968
|
context.addIssue({
|
|
@@ -865,6 +999,6 @@ function parseSdkConfigIrV1(value) {
|
|
|
865
999
|
return sdkConfigIrV1Schema.parse(value);
|
|
866
1000
|
}
|
|
867
1001
|
|
|
868
|
-
export { SDK_CONFIG_IR_V1_SCHEMA_VERSION, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, cliGenerationConfigSchema, clientConfigSchema, compatibilityConfigSchema, composerPackageNameSchema, csharpGenerationConfigSchema, dependencySchema, docsConfigSchema, exactSemverSchema, generationConfigSchema, goGenerationConfigSchema, goModulePathSchema, javaGenerationConfigSchema, jsonObjectSchema, jsonValueSchema, kotlinGenerationConfigSchema, languageGenerationConfigSchema, legacyInputSchema, mcpGenerationConfigSchema, nonEmptyStringSchema, outputConfigSchema, packageConfigSchema, parseSdkConfigIrV1, phpGenerationConfigSchema, publishConfigSchema, publishRegistrySchema, pythonGenerationConfigSchema, readmeEndpointSchema, rubyGenerationConfigSchema, rustGenerationConfigSchema, sdkConfigIrV1Schema, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecTypeSchema, swiftGenerationConfigSchema, targetConfigSchema, targetLanguageSchema, terraformGenerationConfigSchema, typescriptGenerationConfigSchema, unsupportedFieldSchema };
|
|
1002
|
+
export { SDK_CONFIG_IR_V1_SCHEMA_VERSION, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, cliGenerationConfigSchema, clientConfigSchema, compatibilityConfigSchema, composerPackageNameSchema, csharpGenerationConfigSchema, dependencySchema, docsConfigSchema, exactSemverSchema, generationConfigSchema, goGenerationConfigSchema, goModulePathSchema, javaGenerationConfigSchema, jsonObjectSchema, jsonValueSchema, kotlinGenerationConfigSchema, languageGenerationConfigSchema, legacyInputSchema, mcpAvailabilityStatuses, mcpGenerationConfigSchema, nonEmptyStringSchema, outputConfigSchema, packageConfigSchema, parseSdkConfigIrV1, phpGenerationConfigSchema, publishConfigSchema, publishRegistrySchema, pythonGenerationConfigSchema, readmeCustomSectionSchema, readmeEndpointSchema, rubyGenerationConfigSchema, rustGenerationConfigSchema, sdkConfigIrV1Schema, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecTypeSchema, swiftGenerationConfigSchema, targetConfigSchema, targetLanguageSchema, terraformGenerationConfigSchema, typescriptGenerationConfigSchema, unsupportedFieldSchema };
|
|
869
1003
|
//# sourceMappingURL=index.js.map
|
|
870
1004
|
//# sourceMappingURL=index.js.map
|