@postman/sdk-config 0.0.4 → 0.1.1
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 +124 -101
- package/dist/index.cjs +2119 -282
- 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 +2080 -283
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +2238 -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 +2196 -0
- package/dist/sdk-config/index.js.map +1 -0
- package/dist/sdk-config/v1/index.cjs +2238 -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 +2196 -0
- package/dist/sdk-config/v1/index.js.map +1 -0
- package/dist/sdk-config-ir/index.cjs +160 -25
- 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 +158 -26
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +160 -25
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +458 -428
- package/dist/sdk-config-ir/v1/index.d.ts +458 -428
- package/dist/sdk-config-ir/v1/index.js +158 -26
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/typescript-DK97815_.d.cts +427 -0
- package/dist/typescript-DK97815_.d.ts +427 -0
- package/package.json +16 -3
- package/src/sdk-config/v1/README.md +135 -0
- package/src/sdk-config-ir/v1/README.md +44 -26
|
@@ -1,8 +1,12 @@
|
|
|
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
|
+
var relativePathSchema = nonEmptyStringSchema.refine(
|
|
7
|
+
(value) => !/^(?:[\\/]|[A-Za-z]:)/.test(value) && !value.split(/[\\/]/).some((segment) => segment === ".."),
|
|
8
|
+
{ message: "must be a relative path without parent directory segments" }
|
|
9
|
+
);
|
|
6
10
|
var exactSemverSchema = z.string().refine(
|
|
7
11
|
(value) => {
|
|
8
12
|
if (value.trim() !== value || !/^\d/.test(value)) {
|
|
@@ -25,7 +29,7 @@ var jsonValueSchema = z.lazy(
|
|
|
25
29
|
);
|
|
26
30
|
var jsonObjectSchema = z.record(z.string(), jsonValueSchema);
|
|
27
31
|
|
|
28
|
-
// src/sdk-config-
|
|
32
|
+
// src/sdk-config-domain/v1/api.ts
|
|
29
33
|
var authVariableSchema = z.strictObject({
|
|
30
34
|
name: nonEmptyStringSchema.optional(),
|
|
31
35
|
environmentVariable: nonEmptyStringSchema.optional(),
|
|
@@ -175,7 +179,14 @@ var apiConfigSchema = z.strictObject({
|
|
|
175
179
|
environmentVariables: z.array(environmentVariableSchema).default([]),
|
|
176
180
|
defaultEnvironment: nonEmptyStringSchema.optional(),
|
|
177
181
|
auth: authConfigSchema.optional(),
|
|
178
|
-
headers: z.array(headerSchema).optional()
|
|
182
|
+
headers: z.array(headerSchema).optional(),
|
|
183
|
+
/**
|
|
184
|
+
* Selects the named `x-fern-audiences`.
|
|
185
|
+
*
|
|
186
|
+
* Absent means all audiences. A present empty array selects no tagged audience: untagged nodes
|
|
187
|
+
* remain included, while every audience-tagged node is excluded.
|
|
188
|
+
*/
|
|
189
|
+
audiences: z.array(nonEmptyStringSchema).optional()
|
|
179
190
|
});
|
|
180
191
|
var retryConfigSchema = z.strictObject({
|
|
181
192
|
enabled: z.boolean().default(true),
|
|
@@ -229,6 +240,7 @@ var clientConfigSchema = z.strictObject({
|
|
|
229
240
|
pathParameterStyle: parameterStyleSchema.optional(),
|
|
230
241
|
filePropertyStyle: parameterStyleSchema.optional(),
|
|
231
242
|
useDefaultRequestParameterValues: z.boolean().optional(),
|
|
243
|
+
respectOptionalRequestBody: z.boolean().optional(),
|
|
232
244
|
tokenRefresh: tokenRefreshConfigSchema.optional()
|
|
233
245
|
});
|
|
234
246
|
var unsupportedFieldSchema = z.strictObject({
|
|
@@ -274,12 +286,17 @@ var readmeEndpointSchema = z.strictObject({
|
|
|
274
286
|
path: nonEmptyStringSchema,
|
|
275
287
|
stream: z.boolean().optional()
|
|
276
288
|
});
|
|
289
|
+
var readmeCustomSectionSchema = z.strictObject({
|
|
290
|
+
title: nonEmptyStringSchema,
|
|
291
|
+
content: z.string()
|
|
292
|
+
});
|
|
277
293
|
var readmeConfigSchema = z.strictObject({
|
|
278
294
|
apiName: nonEmptyStringSchema.optional(),
|
|
279
295
|
introduction: z.string().optional(),
|
|
280
296
|
apiReferenceLink: nonEmptyStringSchema.optional(),
|
|
281
297
|
bannerLink: nonEmptyStringSchema.optional(),
|
|
282
298
|
disabledSections: z.array(nonEmptyStringSchema).optional(),
|
|
299
|
+
customSections: z.array(readmeCustomSectionSchema).optional(),
|
|
283
300
|
defaultEndpoint: readmeEndpointSchema.optional(),
|
|
284
301
|
features: z.record(z.string(), z.array(readmeEndpointSchema)).optional()
|
|
285
302
|
});
|
|
@@ -303,10 +320,15 @@ var csharpGenerationConfigSchema = z.strictObject({
|
|
|
303
320
|
simplifyObjectDictionaries: z.boolean().optional(),
|
|
304
321
|
explicitNamespaces: z.boolean().optional(),
|
|
305
322
|
rootNamespaceForCoreClasses: z.boolean().optional(),
|
|
306
|
-
includeExceptionHandler: z.boolean().optional()
|
|
323
|
+
includeExceptionHandler: z.boolean().optional(),
|
|
324
|
+
experimentalExplicitNullableOptional: z.boolean().optional()
|
|
307
325
|
});
|
|
308
326
|
var goGenerationConfigSchema = z.strictObject({
|
|
309
327
|
legacyComplexModels: z.boolean().optional(),
|
|
328
|
+
/** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
|
|
329
|
+
smartCasing: z.boolean().optional(),
|
|
330
|
+
/** Overrides the fern root-client constructor independently from the client type name. */
|
|
331
|
+
clientConstructorName: nonEmptyStringSchema.optional(),
|
|
310
332
|
unionVersion: z.enum(["v0", "v1"]).optional(),
|
|
311
333
|
includeLegacyClientOptions: z.boolean().optional()
|
|
312
334
|
});
|
|
@@ -316,15 +338,17 @@ var jvmGenerationConfigSchema = z.strictObject({
|
|
|
316
338
|
collapseOptionalNullable: z.boolean().optional(),
|
|
317
339
|
gradleDistributionUrl: z.string().min(1).optional(),
|
|
318
340
|
gradlePluginManagement: z.string().optional(),
|
|
319
|
-
gradleCentralDependencyManagement: z.boolean().optional()
|
|
341
|
+
gradleCentralDependencyManagement: z.boolean().optional(),
|
|
342
|
+
/** Selects co-located async methods or a separate async client surface. */
|
|
343
|
+
asyncStyle: z.enum(["dedicated-client", "twin-methods"]).optional()
|
|
320
344
|
});
|
|
321
345
|
|
|
322
|
-
// src/sdk-config-
|
|
346
|
+
// src/sdk-config-domain/v1/language/java.ts
|
|
323
347
|
var javaGenerationConfigSchema = jvmGenerationConfigSchema.extend({
|
|
324
348
|
includeKotlinSnippets: z.boolean().optional()
|
|
325
349
|
});
|
|
326
350
|
|
|
327
|
-
// src/sdk-config-
|
|
351
|
+
// src/sdk-config-domain/v1/language/kotlin.ts
|
|
328
352
|
var kotlinGenerationConfigSchema = jvmGenerationConfigSchema;
|
|
329
353
|
var compilerOptionsSchema = z.strictObject({
|
|
330
354
|
target: nonEmptyStringSchema.optional(),
|
|
@@ -356,8 +380,32 @@ var typescriptGenerationConfigSchema = z.strictObject({
|
|
|
356
380
|
scripts: z.array(packageScriptSchema).optional()
|
|
357
381
|
});
|
|
358
382
|
|
|
359
|
-
// src/sdk-config-
|
|
360
|
-
var
|
|
383
|
+
// src/sdk-config-domain/v1/language/mcp.ts
|
|
384
|
+
var mcpAvailabilityStatuses = [
|
|
385
|
+
"IN_DEVELOPMENT",
|
|
386
|
+
"PRE_RELEASE",
|
|
387
|
+
"GENERAL_AVAILABILITY",
|
|
388
|
+
"DEPRECATED",
|
|
389
|
+
"ALPHA",
|
|
390
|
+
"BETA",
|
|
391
|
+
"PREVIEW",
|
|
392
|
+
"LEGACY"
|
|
393
|
+
];
|
|
394
|
+
var mcpToolFilterSchema = z.strictObject({
|
|
395
|
+
include: z.array(nonEmptyStringSchema).optional(),
|
|
396
|
+
exclude: z.array(nonEmptyStringSchema).optional()
|
|
397
|
+
});
|
|
398
|
+
var mcpToolsetNameSchema = nonEmptyStringSchema.refine(
|
|
399
|
+
(name) => name !== "default" && /^[a-z0-9-]+$/.test(name),
|
|
400
|
+
'toolset names must match [a-z0-9-]+ and cannot be "default"'
|
|
401
|
+
);
|
|
402
|
+
var mcpGenerationConfigSchema = typescriptGenerationConfigSchema.extend({
|
|
403
|
+
serverName: nonEmptyStringSchema.optional(),
|
|
404
|
+
serverDescription: nonEmptyStringSchema.optional(),
|
|
405
|
+
excludeAvailability: z.array(z.enum(mcpAvailabilityStatuses)).optional(),
|
|
406
|
+
tools: mcpToolFilterSchema.optional(),
|
|
407
|
+
toolsets: z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional()
|
|
408
|
+
});
|
|
361
409
|
var phpGenerationConfigSchema = z.strictObject({
|
|
362
410
|
propertyAccess: z.enum(["public", "private"]).optional(),
|
|
363
411
|
generateClientInterfaces: z.boolean().optional()
|
|
@@ -398,9 +446,10 @@ var rustGenerationConfigSchema = z.strictObject({
|
|
|
398
446
|
defaultFeatures: z.array(nonEmptyStringSchema).optional()
|
|
399
447
|
});
|
|
400
448
|
var swiftGenerationConfigSchema = z.strictObject({
|
|
401
|
-
moduleName: nonEmptyStringSchema.optional()
|
|
449
|
+
moduleName: nonEmptyStringSchema.optional(),
|
|
450
|
+
nullableAsOptional: z.boolean().optional()
|
|
402
451
|
});
|
|
403
|
-
var goModulePathSchema =
|
|
452
|
+
var goModulePathSchema = relativePathSchema.regex(
|
|
404
453
|
/^(?!.*(?:^|\/)\.{1,2}(?:\/|$))[A-Za-z0-9._~-]+(?:\/[A-Za-z0-9._~-]+)+$/,
|
|
405
454
|
"Go module path must be a slash-delimited path using letters, numbers, dots, dashes, underscores, or tildes"
|
|
406
455
|
);
|
|
@@ -479,7 +528,7 @@ var packageConfigSchema = z.strictObject({
|
|
|
479
528
|
extraPeerDependencies: z.array(dependencySchema).optional()
|
|
480
529
|
});
|
|
481
530
|
|
|
482
|
-
// src/sdk-config-
|
|
531
|
+
// src/sdk-config-domain/v1/language/terraform.ts
|
|
483
532
|
var planModifierSourceSchema = z.discriminatedUnion("enabled", [
|
|
484
533
|
z.strictObject({ enabled: z.literal(true), sourceDir: nonEmptyStringSchema }),
|
|
485
534
|
z.strictObject({ enabled: z.literal(false) })
|
|
@@ -503,10 +552,11 @@ var terraformGenerationConfigSchema = z.strictObject({
|
|
|
503
552
|
});
|
|
504
553
|
|
|
505
554
|
// src/sdk-config-ir/v1/generation.ts
|
|
506
|
-
var generationAssetSchema = z.
|
|
507
|
-
type: z.
|
|
508
|
-
location: nonEmptyStringSchema
|
|
509
|
-
})
|
|
555
|
+
var generationAssetSchema = z.discriminatedUnion("type", [
|
|
556
|
+
z.strictObject({ type: z.literal("path"), location: relativePathSchema }),
|
|
557
|
+
z.strictObject({ type: z.literal("url"), location: nonEmptyStringSchema }),
|
|
558
|
+
z.strictObject({ type: z.literal("artifact"), location: nonEmptyStringSchema })
|
|
559
|
+
]);
|
|
510
560
|
var hookDependencySchema = z.strictObject({
|
|
511
561
|
name: nonEmptyStringSchema,
|
|
512
562
|
version: nonEmptyStringSchema,
|
|
@@ -526,7 +576,7 @@ var customCodeConfigSchema = z.strictObject({
|
|
|
526
576
|
protectedFiles: z.array(nonEmptyStringSchema).optional()
|
|
527
577
|
});
|
|
528
578
|
var workflowConfigSchema = z.strictObject({
|
|
529
|
-
path:
|
|
579
|
+
path: relativePathSchema,
|
|
530
580
|
outputName: nonEmptyStringSchema.optional()
|
|
531
581
|
});
|
|
532
582
|
var analyticsHeaderSchema = z.union([
|
|
@@ -561,6 +611,11 @@ var unitTestsSchema = z.strictObject({
|
|
|
561
611
|
mode: z.enum(["core-runtime", "schema-driven", "both"]).optional(),
|
|
562
612
|
exclusions: z.array(nonEmptyStringSchema).optional()
|
|
563
613
|
});
|
|
614
|
+
var fernDefinitionMetadataSchema = z.strictObject({
|
|
615
|
+
definitionS3DownloadUrl: nonEmptyStringSchema,
|
|
616
|
+
outputPath: nonEmptyStringSchema.optional(),
|
|
617
|
+
cliVersion: nonEmptyStringSchema.optional()
|
|
618
|
+
});
|
|
564
619
|
var streamsSchema = z.strictObject({
|
|
565
620
|
enabled: z.boolean(),
|
|
566
621
|
responseType: z.enum(["wrapper", "native", "web"]).optional(),
|
|
@@ -612,11 +667,22 @@ var generationConfigSchema = z.strictObject({
|
|
|
612
667
|
devContainer: z.boolean().default(false),
|
|
613
668
|
allowMockClient: z.boolean().default(false),
|
|
614
669
|
ignoreFiles: z.array(nonEmptyStringSchema).optional(),
|
|
670
|
+
/**
|
|
671
|
+
* Raw .fernignore file contents supplied to external publishers that need Fern ignore semantics.
|
|
672
|
+
* This is separate from generation.ignoreFiles because raw contents preserve comments, ordering,
|
|
673
|
+
* blank lines, and negation rules.
|
|
674
|
+
*/
|
|
675
|
+
fernignoreContents: z.string().optional(),
|
|
676
|
+
/**
|
|
677
|
+
* Optional Fern definition metadata for publisher paths that need to write definition or
|
|
678
|
+
* mock-server support files. This is not required for core GitHub artifact publishing.
|
|
679
|
+
*/
|
|
680
|
+
fernDefinitionMetadata: fernDefinitionMetadataSchema.optional(),
|
|
615
681
|
reservedKeywords: z.array(nonEmptyStringSchema).optional(),
|
|
616
682
|
hooks: hooksConfigSchema.optional(),
|
|
617
683
|
customCode: customCodeConfigSchema.optional(),
|
|
618
684
|
workflows: z.array(workflowConfigSchema).optional(),
|
|
619
|
-
customQueryPaths: z.array(
|
|
685
|
+
customQueryPaths: z.array(relativePathSchema).optional(),
|
|
620
686
|
analytics: analyticsConfigSchema.optional(),
|
|
621
687
|
wireTests: wireTestsSchema.optional(),
|
|
622
688
|
unitTests: unitTestsSchema.optional(),
|
|
@@ -637,8 +703,17 @@ var publishRegistrySchema = z.enum([
|
|
|
637
703
|
"go",
|
|
638
704
|
"composer"
|
|
639
705
|
]);
|
|
706
|
+
var credentialResolutionSchema = z.enum([
|
|
707
|
+
"refs-only",
|
|
708
|
+
"resolved-by-orchestrator",
|
|
709
|
+
"resolved-by-fiddle"
|
|
710
|
+
]);
|
|
640
711
|
var commonPublishShape = {
|
|
641
712
|
url: nonEmptyStringSchema.optional(),
|
|
713
|
+
/**
|
|
714
|
+
* Reference to registry publishing credentials. Raw tokens/passwords are intentionally not part of
|
|
715
|
+
* SDK Config IR; the external publisher or orchestrator resolves this reference before use.
|
|
716
|
+
*/
|
|
642
717
|
credentialsRef: nonEmptyStringSchema.optional(),
|
|
643
718
|
releaseBranch: nonEmptyStringSchema.optional(),
|
|
644
719
|
tolerateRepublish: z.boolean().optional()
|
|
@@ -653,6 +728,10 @@ var publishConfigSchema = z.discriminatedUnion("registry", [
|
|
|
653
728
|
z.strictObject({ registry: z.literal("composer"), ...commonPublishShape }),
|
|
654
729
|
z.strictObject({
|
|
655
730
|
registry: z.literal("maven"),
|
|
731
|
+
/**
|
|
732
|
+
* Reference to Maven signing credentials. Raw signing keys are intentionally not part of SDK
|
|
733
|
+
* Config IR; the external publisher or orchestrator resolves this reference before use.
|
|
734
|
+
*/
|
|
656
735
|
signingCredentialsRef: nonEmptyStringSchema.optional(),
|
|
657
736
|
...commonPublishShape
|
|
658
737
|
})
|
|
@@ -661,29 +740,54 @@ var reviewersSchema = z.strictObject({
|
|
|
661
740
|
teams: z.array(nonEmptyStringSchema).optional(),
|
|
662
741
|
users: z.array(nonEmptyStringSchema).optional()
|
|
663
742
|
});
|
|
743
|
+
var replayControlSchema = z.strictObject({
|
|
744
|
+
enabled: z.boolean()
|
|
745
|
+
});
|
|
664
746
|
var githubOutputSchema = z.strictObject({
|
|
665
747
|
repository: nonEmptyStringSchema,
|
|
666
748
|
host: nonEmptyStringSchema.optional(),
|
|
667
749
|
branch: nonEmptyStringSchema.optional(),
|
|
668
750
|
mode: z.enum(["release", "pull-request", "push"]).optional(),
|
|
669
751
|
reviewers: reviewersSchema.optional(),
|
|
752
|
+
/**
|
|
753
|
+
* Reference to GitHub credentials. Raw tokens are intentionally not part of SDK Config IR; the
|
|
754
|
+
* external publisher or orchestrator resolves this reference before use.
|
|
755
|
+
*/
|
|
670
756
|
credentialsRef: nonEmptyStringSchema.optional(),
|
|
671
|
-
privateRepository: z.boolean().optional()
|
|
672
|
-
|
|
757
|
+
privateRepository: z.boolean().optional(),
|
|
758
|
+
/** GitHub replay control. If omitted, the external publisher applies its default behavior. */
|
|
759
|
+
replay: replayControlSchema.optional(),
|
|
760
|
+
/** Run GitHub publishing verification. Defaults to false to match current Fiddle job behavior. */
|
|
761
|
+
verify: z.boolean().default(false),
|
|
762
|
+
/** Skip creating/updating a GitHub PR when no files changed. Defaults to false. */
|
|
763
|
+
skipIfNoDiff: z.boolean().default(false),
|
|
764
|
+
/** Automatically merge the GitHub publishing PR. Defaults to false. */
|
|
765
|
+
autoMerge: z.boolean().default(false)
|
|
766
|
+
});
|
|
767
|
+
var credentialResolutionShape = {
|
|
768
|
+
/**
|
|
769
|
+
* Where output credential references are resolved. SDK Config IR carries refs only; raw resolved
|
|
770
|
+
* credentials belong at the external publisher/orchestrator boundary, not in this config.
|
|
771
|
+
*/
|
|
772
|
+
credentialResolution: credentialResolutionSchema.default("refs-only")
|
|
773
|
+
};
|
|
673
774
|
var filesOutputSchema = z.strictObject({
|
|
674
775
|
delivery: z.literal("files"),
|
|
675
776
|
path: nonEmptyStringSchema.optional(),
|
|
676
|
-
publish: publishConfigSchema.optional()
|
|
777
|
+
publish: publishConfigSchema.optional(),
|
|
778
|
+
...credentialResolutionShape
|
|
677
779
|
});
|
|
678
780
|
var zipOutputSchema = z.strictObject({
|
|
679
781
|
delivery: z.literal("zip"),
|
|
680
782
|
fileName: nonEmptyStringSchema.optional(),
|
|
681
|
-
publish: publishConfigSchema.optional()
|
|
783
|
+
publish: publishConfigSchema.optional(),
|
|
784
|
+
...credentialResolutionShape
|
|
682
785
|
});
|
|
683
786
|
var githubDeliverySchema = z.strictObject({
|
|
684
787
|
delivery: z.literal("github"),
|
|
685
788
|
github: githubOutputSchema,
|
|
686
|
-
publish: publishConfigSchema.optional()
|
|
789
|
+
publish: publishConfigSchema.optional(),
|
|
790
|
+
...credentialResolutionShape
|
|
687
791
|
});
|
|
688
792
|
var outputConfigSchema = z.discriminatedUnion(
|
|
689
793
|
"delivery",
|
|
@@ -703,7 +807,8 @@ var apiImportSettingsSchema = z.strictObject({
|
|
|
703
807
|
onlyIncludeReferencedSchemas: z.boolean().optional(),
|
|
704
808
|
objectQueryParameters: z.boolean().optional(),
|
|
705
809
|
typeDatesAsStrings: z.boolean().optional(),
|
|
706
|
-
groupMultiApiEnvironments: z.boolean().optional()
|
|
810
|
+
groupMultiApiEnvironments: z.boolean().optional(),
|
|
811
|
+
defaultIntegerFormat: z.enum(["int32", "int64", "uint32", "uint64"]).optional()
|
|
707
812
|
});
|
|
708
813
|
var sourceSpecTypeSchema = z.enum([
|
|
709
814
|
"openapi",
|
|
@@ -760,7 +865,19 @@ var targetConfigSchema = z.strictObject({
|
|
|
760
865
|
generatorVersion: exactSemverSchema.optional(),
|
|
761
866
|
sourceOrigin: z.enum(["postman", "fern"]),
|
|
762
867
|
sdkName: nonEmptyStringSchema,
|
|
868
|
+
/**
|
|
869
|
+
* Stable Fern/Fiddle API identity for external publishing.
|
|
870
|
+
* Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
|
|
871
|
+
* target.sdkName because SDK display names and Fern API names are not equivalent.
|
|
872
|
+
*/
|
|
873
|
+
apiName: nonEmptyStringSchema.optional(),
|
|
763
874
|
organization: nonEmptyStringSchema.optional(),
|
|
875
|
+
/**
|
|
876
|
+
* Stable Fern/Fiddle organization identity for external publishing.
|
|
877
|
+
* Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
|
|
878
|
+
* target.organization because source organization metadata is optional and may not match Fern.
|
|
879
|
+
*/
|
|
880
|
+
organizationName: nonEmptyStringSchema.optional(),
|
|
764
881
|
sdkVersion: nonEmptyStringSchema.default("1.0.0"),
|
|
765
882
|
apiVersion: nonEmptyStringSchema.optional()
|
|
766
883
|
});
|
|
@@ -768,7 +885,7 @@ var targetConfigSchema = z.strictObject({
|
|
|
768
885
|
// src/sdk-config-ir/v1/sdk-config-ir-v1.ts
|
|
769
886
|
var SDK_CONFIG_IR_V1_SCHEMA_VERSION = "sdk-config-ir/v1";
|
|
770
887
|
var publishRegistryLanguages = {
|
|
771
|
-
npm: ["typescript"],
|
|
888
|
+
npm: ["typescript", "mcp"],
|
|
772
889
|
pypi: ["python"],
|
|
773
890
|
maven: ["java", "kotlin"],
|
|
774
891
|
nuget: ["csharp"],
|
|
@@ -836,6 +953,21 @@ var sdkConfigIrV1Schema = z.strictObject({
|
|
|
836
953
|
compatibility: compatibilityConfigSchema.optional()
|
|
837
954
|
}).superRefine(({ compatibility, generation, output, package: packageConfig, target }, context) => {
|
|
838
955
|
const configuredLanguages = Object.keys(generation.language ?? {});
|
|
956
|
+
const requiresExternalPublishIdentity = output.delivery === "github" || output.publish !== void 0;
|
|
957
|
+
if (requiresExternalPublishIdentity) {
|
|
958
|
+
[
|
|
959
|
+
["apiName", "target.apiName is required for external publishing"],
|
|
960
|
+
["organizationName", "target.organizationName is required for external publishing"]
|
|
961
|
+
].forEach(([field, message]) => {
|
|
962
|
+
if (!target[field]) {
|
|
963
|
+
context.addIssue({
|
|
964
|
+
code: "custom",
|
|
965
|
+
message,
|
|
966
|
+
path: ["target", field]
|
|
967
|
+
});
|
|
968
|
+
}
|
|
969
|
+
});
|
|
970
|
+
}
|
|
839
971
|
configuredLanguages.forEach((language) => {
|
|
840
972
|
if (language !== target.language) {
|
|
841
973
|
context.addIssue({
|
|
@@ -872,6 +1004,6 @@ function parseSdkConfigIrV1(value) {
|
|
|
872
1004
|
return sdkConfigIrV1Schema.parse(value);
|
|
873
1005
|
}
|
|
874
1006
|
|
|
875
|
-
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 };
|
|
1007
|
+
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, relativePathSchema, rubyGenerationConfigSchema, rustGenerationConfigSchema, sdkConfigIrV1Schema, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecTypeSchema, swiftGenerationConfigSchema, targetConfigSchema, targetLanguageSchema, terraformGenerationConfigSchema, typescriptGenerationConfigSchema, unsupportedFieldSchema };
|
|
876
1008
|
//# sourceMappingURL=index.js.map
|
|
877
1009
|
//# sourceMappingURL=index.js.map
|