@fern-api/fern-api-dev 4.58.0 → 4.60.0-2-g325260da1cd
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/cli.cjs +193 -40
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -495612,6 +495612,7 @@ __export(DocsYmlSchemas_exports, {
|
|
|
495612
495612
|
PageActionsConfig: () => PageActionsConfig,
|
|
495613
495613
|
PageActionsThemeConfig: () => PageActionsThemeConfig,
|
|
495614
495614
|
PageConfiguration: () => PageConfiguration,
|
|
495615
|
+
PageDescriptionSource: () => PageDescriptionSource,
|
|
495615
495616
|
PathLibraryInputSchema: () => PathLibraryInputSchema,
|
|
495616
495617
|
PlaygroundButtonSettings: () => PlaygroundButtonSettings,
|
|
495617
495618
|
PlaygroundSettings: () => PlaygroundSettings,
|
|
@@ -495819,8 +495820,10 @@ var AIChatWebsiteDatasource = external_exports.object({
|
|
|
495819
495820
|
title: external_exports.string().optional()
|
|
495820
495821
|
});
|
|
495821
495822
|
var AIChatDatasource = AIChatWebsiteDatasource;
|
|
495823
|
+
var PageDescriptionSource = external_exports.enum(["description", "subtitle"]);
|
|
495822
495824
|
var AgentsConfig = external_exports.object({
|
|
495823
|
-
"page-directive": external_exports.string().optional()
|
|
495825
|
+
"page-directive": external_exports.string().optional(),
|
|
495826
|
+
"page-description-source": PageDescriptionSource.optional()
|
|
495824
495827
|
});
|
|
495825
495828
|
var AIChatConfig = external_exports.object({
|
|
495826
495829
|
model: AIChatModel.optional(),
|
|
@@ -496383,6 +496386,7 @@ __export(schemas_exports7, {
|
|
|
496383
496386
|
LibraryLanguage: () => LibraryLanguage2,
|
|
496384
496387
|
PageActionOption: () => PageActionOption2,
|
|
496385
496388
|
PageActionsThemeConfig: () => PageActionsThemeConfig2,
|
|
496389
|
+
PageDescriptionSource: () => PageDescriptionSource2,
|
|
496386
496390
|
ProductSwitcherThemeConfig: () => ProductSwitcherThemeConfig2,
|
|
496387
496391
|
ProgrammingLanguage: () => ProgrammingLanguage2,
|
|
496388
496392
|
SearchbarPlacement: () => SearchbarPlacement2,
|
|
@@ -496423,6 +496427,7 @@ __export(api_exports2, {
|
|
|
496423
496427
|
LibraryLanguage: () => LibraryLanguage2,
|
|
496424
496428
|
PageActionOption: () => PageActionOption2,
|
|
496425
496429
|
PageActionsThemeConfig: () => PageActionsThemeConfig2,
|
|
496430
|
+
PageDescriptionSource: () => PageDescriptionSource2,
|
|
496426
496431
|
ProductSwitcherThemeConfig: () => ProductSwitcherThemeConfig2,
|
|
496427
496432
|
ProgrammingLanguage: () => ProgrammingLanguage2,
|
|
496428
496433
|
SearchbarPlacement: () => SearchbarPlacement2,
|
|
@@ -496460,6 +496465,7 @@ __export(docs_exports, {
|
|
|
496460
496465
|
LibraryLanguage: () => LibraryLanguage2,
|
|
496461
496466
|
PageActionOption: () => PageActionOption2,
|
|
496462
496467
|
PageActionsThemeConfig: () => PageActionsThemeConfig2,
|
|
496468
|
+
PageDescriptionSource: () => PageDescriptionSource2,
|
|
496463
496469
|
ProductSwitcherThemeConfig: () => ProductSwitcherThemeConfig2,
|
|
496464
496470
|
ProgrammingLanguage: () => ProgrammingLanguage2,
|
|
496465
496471
|
SearchbarPlacement: () => SearchbarPlacement2,
|
|
@@ -496623,6 +496629,12 @@ var PageActionsThemeConfig2 = {
|
|
|
496623
496629
|
Toolbar: "toolbar"
|
|
496624
496630
|
};
|
|
496625
496631
|
|
|
496632
|
+
// ../configuration/lib/docs-yml/schemas/sdk/api/resources/docs/types/PageDescriptionSource.js
|
|
496633
|
+
var PageDescriptionSource2 = {
|
|
496634
|
+
Description: "description",
|
|
496635
|
+
Subtitle: "subtitle"
|
|
496636
|
+
};
|
|
496637
|
+
|
|
496626
496638
|
// ../configuration/lib/docs-yml/schemas/sdk/api/resources/docs/types/ProductSwitcherThemeConfig.js
|
|
496627
496639
|
var ProductSwitcherThemeConfig2 = {
|
|
496628
496640
|
Default: "default",
|
|
@@ -496999,6 +497011,7 @@ __export(serialization_exports3, {
|
|
|
496999
497011
|
PageActionsConfig: () => PageActionsConfig2,
|
|
497000
497012
|
PageActionsThemeConfig: () => PageActionsThemeConfig3,
|
|
497001
497013
|
PageConfiguration: () => PageConfiguration2,
|
|
497014
|
+
PageDescriptionSource: () => PageDescriptionSource3,
|
|
497002
497015
|
PathLibraryInputSchema: () => PathLibraryInputSchema2,
|
|
497003
497016
|
PlaygroundButtonSettings: () => PlaygroundButtonSettings2,
|
|
497004
497017
|
PlaygroundSettings: () => PlaygroundSettings2,
|
|
@@ -497146,6 +497159,7 @@ __export(docs_exports2, {
|
|
|
497146
497159
|
PageActionsConfig: () => PageActionsConfig2,
|
|
497147
497160
|
PageActionsThemeConfig: () => PageActionsThemeConfig3,
|
|
497148
497161
|
PageConfiguration: () => PageConfiguration2,
|
|
497162
|
+
PageDescriptionSource: () => PageDescriptionSource3,
|
|
497149
497163
|
PathLibraryInputSchema: () => PathLibraryInputSchema2,
|
|
497150
497164
|
PlaygroundButtonSettings: () => PlaygroundButtonSettings2,
|
|
497151
497165
|
PlaygroundSettings: () => PlaygroundSettings2,
|
|
@@ -498607,9 +498621,13 @@ var AbsoluteProductPath2 = schemas_exports6.object({
|
|
|
498607
498621
|
href: schemas_exports6.string()
|
|
498608
498622
|
});
|
|
498609
498623
|
|
|
498624
|
+
// ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/PageDescriptionSource.js
|
|
498625
|
+
var PageDescriptionSource3 = schemas_exports6.enum_(["description", "subtitle"]);
|
|
498626
|
+
|
|
498610
498627
|
// ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/AgentsConfig.js
|
|
498611
498628
|
var AgentsConfig2 = schemas_exports6.object({
|
|
498612
|
-
pageDirective: schemas_exports6.property("page-directive", schemas_exports6.string().optional())
|
|
498629
|
+
pageDirective: schemas_exports6.property("page-directive", schemas_exports6.string().optional()),
|
|
498630
|
+
pageDescriptionSource: schemas_exports6.property("page-description-source", PageDescriptionSource3.optional())
|
|
498613
498631
|
});
|
|
498614
498632
|
|
|
498615
498633
|
// ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/AiChatWebsiteDatasource.js
|
|
@@ -499925,14 +499943,18 @@ __export(serialization_exports4, {
|
|
|
499925
499943
|
AsyncApiSettingsSchema: () => AsyncApiSettingsSchema,
|
|
499926
499944
|
AsyncApiSpecSchema: () => AsyncApiSpecSchema,
|
|
499927
499945
|
BaseApiSettingsSchema: () => BaseApiSettingsSchema,
|
|
499946
|
+
BaseGeneratorInvocationSchema: () => BaseGeneratorInvocationSchema,
|
|
499928
499947
|
CoerceConstsTo: () => CoerceConstsTo2,
|
|
499929
499948
|
ConjureSchema: () => ConjureSchema,
|
|
499930
499949
|
CratesOutputLocationSchema: () => CratesOutputLocationSchema,
|
|
499950
|
+
CustomGeneratorInvocationSchema: () => CustomGeneratorInvocationSchema,
|
|
499951
|
+
DefaultGeneratorInvocationSchema: () => DefaultGeneratorInvocationSchema,
|
|
499931
499952
|
DefaultIntegerFormat: () => DefaultIntegerFormat2,
|
|
499932
499953
|
ExampleStyle: () => ExampleStyle4,
|
|
499933
499954
|
FormParameterEncoding: () => FormParameterEncoding2,
|
|
499934
499955
|
GeneratorApiSettingsSchema: () => GeneratorApiSettingsSchema,
|
|
499935
499956
|
GeneratorGroupSchema: () => GeneratorGroupSchema,
|
|
499957
|
+
GeneratorImageObjectSchema: () => GeneratorImageObjectSchema,
|
|
499936
499958
|
GeneratorInvocationSchema: () => GeneratorInvocationSchema,
|
|
499937
499959
|
GeneratorOutputSchema: () => GeneratorOutputSchema,
|
|
499938
499960
|
GeneratorPublishMetadataSchema: () => GeneratorPublishMetadataSchema,
|
|
@@ -501908,6 +501930,7 @@ __export(generators_exports2, {
|
|
|
501908
501930
|
DefaultIntegerFormat: () => DefaultIntegerFormat2,
|
|
501909
501931
|
ExampleStyle: () => ExampleStyle4,
|
|
501910
501932
|
FormParameterEncoding: () => FormParameterEncoding2,
|
|
501933
|
+
GeneratorImageObjectSchema: () => GeneratorImageObjectSchema,
|
|
501911
501934
|
GeneratorsConfigurationSchema: () => GeneratorsConfigurationSchema,
|
|
501912
501935
|
GeneratorsOpenApiObjectSchema: () => GeneratorsOpenApiObjectSchema,
|
|
501913
501936
|
GeneratorsOpenApiSchema: () => GeneratorsOpenApiSchema,
|
|
@@ -502179,6 +502202,12 @@ var ApiConfigurationSchema = schemas_exports8.undiscriminatedUnion([
|
|
|
502179
502202
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/generators/types/ExampleStyle.js
|
|
502180
502203
|
var ExampleStyle4 = schemas_exports8.enum_(["minimal", "comprehensive"]);
|
|
502181
502204
|
|
|
502205
|
+
// ../configuration/lib/generators-yml/schemas/serialization/resources/generators/types/GeneratorImageObjectSchema.js
|
|
502206
|
+
var GeneratorImageObjectSchema = schemas_exports8.object({
|
|
502207
|
+
name: schemas_exports8.string(),
|
|
502208
|
+
registry: schemas_exports8.string()
|
|
502209
|
+
});
|
|
502210
|
+
|
|
502182
502211
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/generators/types/OutputMetadataAuthor.js
|
|
502183
502212
|
var OutputMetadataAuthor2 = schemas_exports8.object({
|
|
502184
502213
|
name: schemas_exports8.string(),
|
|
@@ -502371,9 +502400,8 @@ var GithubConfigurationSchema = schemas_exports8.undiscriminatedUnion([
|
|
|
502371
502400
|
GithubPushSchema
|
|
502372
502401
|
]);
|
|
502373
502402
|
|
|
502374
|
-
// ../configuration/lib/generators-yml/schemas/serialization/resources/group/types/
|
|
502375
|
-
var
|
|
502376
|
-
name: schemas_exports8.string(),
|
|
502403
|
+
// ../configuration/lib/generators-yml/schemas/serialization/resources/group/types/BaseGeneratorInvocationSchema.js
|
|
502404
|
+
var BaseGeneratorInvocationSchema = schemas_exports8.object({
|
|
502377
502405
|
version: schemas_exports8.string(),
|
|
502378
502406
|
output: GeneratorOutputSchema.optional(),
|
|
502379
502407
|
github: GithubConfigurationSchema.optional(),
|
|
@@ -502389,6 +502417,19 @@ var GeneratorInvocationSchema = schemas_exports8.object({
|
|
|
502389
502417
|
autorelease: schemas_exports8.boolean().optional()
|
|
502390
502418
|
});
|
|
502391
502419
|
|
|
502420
|
+
// ../configuration/lib/generators-yml/schemas/serialization/resources/group/types/CustomGeneratorInvocationSchema.js
|
|
502421
|
+
var CustomGeneratorInvocationSchema = schemas_exports8.object({
|
|
502422
|
+
image: GeneratorImageObjectSchema
|
|
502423
|
+
}).extend(BaseGeneratorInvocationSchema);
|
|
502424
|
+
|
|
502425
|
+
// ../configuration/lib/generators-yml/schemas/serialization/resources/group/types/DefaultGeneratorInvocationSchema.js
|
|
502426
|
+
var DefaultGeneratorInvocationSchema = schemas_exports8.object({
|
|
502427
|
+
name: schemas_exports8.string()
|
|
502428
|
+
}).extend(BaseGeneratorInvocationSchema);
|
|
502429
|
+
|
|
502430
|
+
// ../configuration/lib/generators-yml/schemas/serialization/resources/group/types/GeneratorInvocationSchema.js
|
|
502431
|
+
var GeneratorInvocationSchema = schemas_exports8.undiscriminatedUnion([DefaultGeneratorInvocationSchema, CustomGeneratorInvocationSchema]);
|
|
502432
|
+
|
|
502392
502433
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/group/types/GeneratorGroupSchema.js
|
|
502393
502434
|
var GeneratorGroupSchema = schemas_exports8.object({
|
|
502394
502435
|
audiences: schemas_exports8.list(schemas_exports8.string()).optional(),
|
|
@@ -502483,7 +502524,10 @@ var GeneratorsConfigurationSchema = schemas_exports8.object({
|
|
|
502483
502524
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/group/index.js
|
|
502484
502525
|
var group_exports2 = {};
|
|
502485
502526
|
__export(group_exports2, {
|
|
502527
|
+
BaseGeneratorInvocationSchema: () => BaseGeneratorInvocationSchema,
|
|
502486
502528
|
CratesOutputLocationSchema: () => CratesOutputLocationSchema,
|
|
502529
|
+
CustomGeneratorInvocationSchema: () => CustomGeneratorInvocationSchema,
|
|
502530
|
+
DefaultGeneratorInvocationSchema: () => DefaultGeneratorInvocationSchema,
|
|
502487
502531
|
GeneratorApiSettingsSchema: () => GeneratorApiSettingsSchema,
|
|
502488
502532
|
GeneratorGroupSchema: () => GeneratorGroupSchema,
|
|
502489
502533
|
GeneratorInvocationSchema: () => GeneratorInvocationSchema,
|
|
@@ -535240,7 +535284,7 @@ async function addGenerator({ generatorName, generatorsConfiguration, groupName
|
|
|
535240
535284
|
groupName,
|
|
535241
535285
|
context: context3,
|
|
535242
535286
|
update: async (group) => {
|
|
535243
|
-
if (group.generators.some((generator) => addDefaultDockerOrgIfNotPresent(generator.name) === normalizedGeneratorName)) {
|
|
535287
|
+
if (group.generators.some((generator) => addDefaultDockerOrgIfNotPresent("image" in generator ? generator.image.name : generator.name) === normalizedGeneratorName)) {
|
|
535244
535288
|
context3.failAndThrow(`${generatorName} is already installed in group ${groupName}.`);
|
|
535245
535289
|
}
|
|
535246
535290
|
const latestVersion2 = await getLatestGeneratorVersion({
|
|
@@ -535702,12 +535746,28 @@ async function convertGroup({ absolutePathToGeneratorsConfiguration, groupName,
|
|
|
535702
535746
|
})))
|
|
535703
535747
|
};
|
|
535704
535748
|
}
|
|
535705
|
-
|
|
535749
|
+
function getGeneratorNameAndImage(generator, context3) {
|
|
535750
|
+
if ("image" in generator) {
|
|
535751
|
+
const correctedImageName = correctIncorrectDockerOrgWithWarning(generator.image.name, context3);
|
|
535752
|
+
const normalizedImageName = addDefaultDockerOrgIfNotPresent(correctedImageName);
|
|
535753
|
+
return {
|
|
535754
|
+
normalizedName: normalizedImageName,
|
|
535755
|
+
containerImage: `${generator.image.registry}/${correctedImageName}`
|
|
535756
|
+
};
|
|
535757
|
+
}
|
|
535706
535758
|
const correctedName = correctIncorrectDockerOrgWithWarning(generator.name, context3);
|
|
535707
535759
|
const normalizedName = addDefaultDockerOrgIfNotPresent(correctedName);
|
|
535760
|
+
return {
|
|
535761
|
+
normalizedName,
|
|
535762
|
+
containerImage: void 0
|
|
535763
|
+
};
|
|
535764
|
+
}
|
|
535765
|
+
async function convertGenerator({ absolutePathToGeneratorsConfiguration, generator, maybeGroupLevelMetadata, maybeTopLevelMetadata, maybeGroupLevelReviewers, maybeTopLevelReviewers, readme, context: context3 }) {
|
|
535766
|
+
const { normalizedName, containerImage } = getGeneratorNameAndImage(generator, context3);
|
|
535708
535767
|
return {
|
|
535709
535768
|
raw: generator,
|
|
535710
535769
|
name: normalizedName,
|
|
535770
|
+
containerImage,
|
|
535711
535771
|
version: generator.version,
|
|
535712
535772
|
config: generator.config,
|
|
535713
535773
|
outputMode: await convertOutputMode({
|
|
@@ -595524,6 +595584,8 @@ __export(schemas_exports12, {
|
|
|
595524
595584
|
FolderConfigurationSchema: () => FolderConfigurationSchema,
|
|
595525
595585
|
FooterLinksConfigSchema: () => FooterLinksConfigSchema,
|
|
595526
595586
|
FormParameterEncodingSchema: () => FormParameterEncodingSchema,
|
|
595587
|
+
GeneratorImageObjectSchema: () => GeneratorImageObjectSchema2,
|
|
595588
|
+
GeneratorImageSchema: () => GeneratorImageSchema,
|
|
595527
595589
|
GitHubOutputModeSchema: () => GitHubOutputModeSchema,
|
|
595528
595590
|
GitHubRepositoryOutputModeSchema: () => GitHubRepositoryOutputModeSchema,
|
|
595529
595591
|
GitHubRepositoryOutputSchema: () => GitHubRepositoryOutputSchema,
|
|
@@ -596012,6 +596074,13 @@ var ReadmeSchema2 = external_exports.object({
|
|
|
596012
596074
|
exampleStyle: ExampleStyleSchema.optional()
|
|
596013
596075
|
});
|
|
596014
596076
|
|
|
596077
|
+
// ../config/lib/schemas/GeneratorImageSchema.js
|
|
596078
|
+
var GeneratorImageObjectSchema2 = external_exports.object({
|
|
596079
|
+
name: external_exports.string(),
|
|
596080
|
+
registry: external_exports.string()
|
|
596081
|
+
});
|
|
596082
|
+
var GeneratorImageSchema = external_exports.union([external_exports.string(), GeneratorImageObjectSchema2]);
|
|
596083
|
+
|
|
596015
596084
|
// ../config/lib/schemas/MetadataSchema.js
|
|
596016
596085
|
var AuthorSchema = external_exports.object({
|
|
596017
596086
|
name: external_exports.string(),
|
|
@@ -596141,7 +596210,7 @@ var PublishSchema = external_exports.object({
|
|
|
596141
596210
|
var SdkTargetSchema = external_exports.object({
|
|
596142
596211
|
api: external_exports.string().optional(),
|
|
596143
596212
|
lang: SdkTargetLanguageSchema.optional(),
|
|
596144
|
-
image:
|
|
596213
|
+
image: GeneratorImageSchema.optional(),
|
|
596145
596214
|
version: external_exports.string().optional(),
|
|
596146
596215
|
config: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
596147
596216
|
publish: PublishSchema.optional(),
|
|
@@ -602681,7 +602750,7 @@ var AccessTokenPosthogManager = class {
|
|
|
602681
602750
|
properties: {
|
|
602682
602751
|
...event,
|
|
602683
602752
|
...event.properties,
|
|
602684
|
-
version: "4.
|
|
602753
|
+
version: "4.60.0-2-g325260da1cd",
|
|
602685
602754
|
usingAccessToken: true
|
|
602686
602755
|
}
|
|
602687
602756
|
});
|
|
@@ -602732,7 +602801,7 @@ var UserPosthogManager = class {
|
|
|
602732
602801
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
602733
602802
|
event: "CLI",
|
|
602734
602803
|
properties: {
|
|
602735
|
-
version: "4.
|
|
602804
|
+
version: "4.60.0-2-g325260da1cd",
|
|
602736
602805
|
...event,
|
|
602737
602806
|
...event.properties,
|
|
602738
602807
|
usingAccessToken: false,
|
|
@@ -627403,6 +627472,7 @@ var SdkConfigConverter = class {
|
|
|
627403
627472
|
name: name2,
|
|
627404
627473
|
lang: generatorInfo.lang,
|
|
627405
627474
|
image: generatorInfo.image,
|
|
627475
|
+
registry: generatorInfo.registry,
|
|
627406
627476
|
version: generatorInfo.version,
|
|
627407
627477
|
api: this.resolveApi({ api: target.api }),
|
|
627408
627478
|
sourceLocation: sourced.$loc,
|
|
@@ -627438,11 +627508,28 @@ var SdkConfigConverter = class {
|
|
|
627438
627508
|
if (lang == null) {
|
|
627439
627509
|
return void 0;
|
|
627440
627510
|
}
|
|
627511
|
+
if (target.image != null) {
|
|
627512
|
+
if (typeof target.image === "string") {
|
|
627513
|
+
return {
|
|
627514
|
+
lang,
|
|
627515
|
+
image: addDefaultDockerOrgIfNotPresent(target.image),
|
|
627516
|
+
version: target.version ?? "latest",
|
|
627517
|
+
registry: void 0
|
|
627518
|
+
};
|
|
627519
|
+
}
|
|
627520
|
+
return {
|
|
627521
|
+
lang,
|
|
627522
|
+
image: addDefaultDockerOrgIfNotPresent(target.image.name),
|
|
627523
|
+
version: target.version ?? "latest",
|
|
627524
|
+
registry: target.image.registry
|
|
627525
|
+
};
|
|
627526
|
+
}
|
|
627441
627527
|
const resolvedDockerImage = getImageReferenceFromLanguage({ lang, version: target.version });
|
|
627442
627528
|
return {
|
|
627443
627529
|
lang,
|
|
627444
627530
|
image: resolvedDockerImage.image,
|
|
627445
|
-
version: resolvedDockerImage.tag
|
|
627531
|
+
version: resolvedDockerImage.tag,
|
|
627532
|
+
registry: void 0
|
|
627446
627533
|
};
|
|
627447
627534
|
}
|
|
627448
627535
|
convertConfig(config5) {
|
|
@@ -627453,7 +627540,8 @@ var SdkConfigConverter = class {
|
|
|
627453
627540
|
return target.lang;
|
|
627454
627541
|
}
|
|
627455
627542
|
if (target.image != null) {
|
|
627456
|
-
|
|
627543
|
+
const imageName = typeof target.image === "string" ? target.image : target.image.name;
|
|
627544
|
+
return getLanguageFromImage({ image: addDefaultDockerOrgIfNotPresent(imageName) });
|
|
627457
627545
|
}
|
|
627458
627546
|
const lang = name2;
|
|
627459
627547
|
if (LANGUAGES.includes(lang)) {
|
|
@@ -837241,18 +837329,19 @@ function convertSdkTargetsFromRaw(options2) {
|
|
|
837241
837329
|
}
|
|
837242
837330
|
function convertRawGeneratorToTarget(options2) {
|
|
837243
837331
|
const { generator, groupName, languageCounts, apiName, warnings } = options2;
|
|
837244
|
-
|
|
837332
|
+
const generatorName = generator.name ?? generator.image?.name;
|
|
837333
|
+
if (generatorName == null) {
|
|
837245
837334
|
warnings.push({
|
|
837246
837335
|
type: "conflict",
|
|
837247
|
-
message: "Generator missing 'name' field"
|
|
837336
|
+
message: "Generator missing 'name' or 'image.name' field"
|
|
837248
837337
|
});
|
|
837249
837338
|
return void 0;
|
|
837250
837339
|
}
|
|
837251
|
-
const language = getLanguageFromGeneratorName2(
|
|
837340
|
+
const language = getLanguageFromGeneratorName2(generatorName);
|
|
837252
837341
|
if (language == null) {
|
|
837253
837342
|
warnings.push({
|
|
837254
837343
|
type: "unsupported",
|
|
837255
|
-
message: `Unknown generator: ${
|
|
837344
|
+
message: `Unknown generator: ${generatorName}`,
|
|
837256
837345
|
suggestion: "Manually add this generator to your fern.yml"
|
|
837257
837346
|
});
|
|
837258
837347
|
return void 0;
|
|
@@ -837264,6 +837353,12 @@ function convertRawGeneratorToTarget(options2) {
|
|
|
837264
837353
|
const target = {
|
|
837265
837354
|
output: {}
|
|
837266
837355
|
};
|
|
837356
|
+
if (generator.image != null) {
|
|
837357
|
+
target.image = {
|
|
837358
|
+
name: generator.image.name,
|
|
837359
|
+
registry: generator.image.registry
|
|
837360
|
+
};
|
|
837361
|
+
}
|
|
837267
837362
|
target.lang = language;
|
|
837268
837363
|
if (apiName != null) {
|
|
837269
837364
|
target.api = apiName;
|
|
@@ -839962,7 +840057,7 @@ var import_path54 = __toESM(require("path"), 1);
|
|
|
839962
840057
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
839963
840058
|
var LOGS_FOLDER_NAME = "logs";
|
|
839964
840059
|
function getCliSource() {
|
|
839965
|
-
const version7 = "4.
|
|
840060
|
+
const version7 = "4.60.0-2-g325260da1cd";
|
|
839966
840061
|
return `cli@${version7}`;
|
|
839967
840062
|
}
|
|
839968
840063
|
var DebugLogger = class {
|
|
@@ -842259,7 +842354,7 @@ async function visitGeneratorGroup({ group, visitor, nodePath, cliVersion }) {
|
|
|
842259
842354
|
...nodePath,
|
|
842260
842355
|
"generators",
|
|
842261
842356
|
idx.toString(),
|
|
842262
|
-
generator.name
|
|
842357
|
+
"image" in generator ? generator.image.name : generator.name
|
|
842263
842358
|
])));
|
|
842264
842359
|
}
|
|
842265
842360
|
|
|
@@ -842345,13 +842440,14 @@ var CompatibleIrVersionsRule = {
|
|
|
842345
842440
|
return [];
|
|
842346
842441
|
}
|
|
842347
842442
|
const cliIrVersion = cliRelease.body.irVersion;
|
|
842443
|
+
const invocationName = "image" in invocation ? invocation.image.name : invocation.name;
|
|
842348
842444
|
let invocationIrVersion;
|
|
842349
842445
|
if (invocation["ir-version"] != null) {
|
|
842350
842446
|
invocationIrVersion = getOverriddenIrVersion(invocation["ir-version"]);
|
|
842351
842447
|
} else {
|
|
842352
842448
|
const normalizedInvocation = {
|
|
842353
842449
|
...invocation,
|
|
842354
|
-
name: addDefaultDockerOrgIfNotPresent(
|
|
842450
|
+
name: addDefaultDockerOrgIfNotPresent(invocationName)
|
|
842355
842451
|
};
|
|
842356
842452
|
const maybeIrVersion = await getIrVersionForGenerator(normalizedInvocation);
|
|
842357
842453
|
if (maybeIrVersion == null) {
|
|
@@ -842364,7 +842460,7 @@ var CompatibleIrVersionsRule = {
|
|
|
842364
842460
|
}
|
|
842365
842461
|
const minCliVersion = await fdr.generators.cli.getMinCliForIr(invocationIrVersion);
|
|
842366
842462
|
if (minCliVersion.ok) {
|
|
842367
|
-
return getMaybeBadVersionMessage(
|
|
842463
|
+
return getMaybeBadVersionMessage(invocationName, minCliVersion.body.version, cliVersion) ?? [];
|
|
842368
842464
|
} else {
|
|
842369
842465
|
return [];
|
|
842370
842466
|
}
|
|
@@ -847330,6 +847426,13 @@ var definitions6 = {
|
|
|
847330
847426
|
},
|
|
847331
847427
|
additionalProperties: false
|
|
847332
847428
|
},
|
|
847429
|
+
"docs.PageDescriptionSource": {
|
|
847430
|
+
type: "string",
|
|
847431
|
+
enum: [
|
|
847432
|
+
"description",
|
|
847433
|
+
"subtitle"
|
|
847434
|
+
]
|
|
847435
|
+
},
|
|
847333
847436
|
"docs.AgentsConfig": {
|
|
847334
847437
|
type: "object",
|
|
847335
847438
|
properties: {
|
|
@@ -847342,6 +847445,16 @@ var definitions6 = {
|
|
|
847342
847445
|
type: "null"
|
|
847343
847446
|
}
|
|
847344
847447
|
]
|
|
847448
|
+
},
|
|
847449
|
+
"page-description-source": {
|
|
847450
|
+
oneOf: [
|
|
847451
|
+
{
|
|
847452
|
+
$ref: "#/definitions/docs.PageDescriptionSource"
|
|
847453
|
+
},
|
|
847454
|
+
{
|
|
847455
|
+
type: "null"
|
|
847456
|
+
}
|
|
847457
|
+
]
|
|
847345
847458
|
}
|
|
847346
847459
|
},
|
|
847347
847460
|
additionalProperties: false
|
|
@@ -851063,7 +851176,7 @@ var LegacyDocsPublisher = class {
|
|
|
851063
851176
|
previewId: void 0,
|
|
851064
851177
|
disableTemplates: void 0,
|
|
851065
851178
|
skipUpload,
|
|
851066
|
-
cliVersion: "4.
|
|
851179
|
+
cliVersion: "4.60.0-2-g325260da1cd"
|
|
851067
851180
|
});
|
|
851068
851181
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
851069
851182
|
return { success: false };
|
|
@@ -876262,7 +876375,8 @@ var BaseJavaCustomConfigSchema = external_exports2.object({
|
|
|
876262
876375
|
// Hidden options (for debugging).
|
|
876263
876376
|
"enable-gradle-profiling": external_exports2.boolean().optional(),
|
|
876264
876377
|
// Deprecated.
|
|
876265
|
-
"wrapped-aliases": external_exports2.boolean().optional()
|
|
876378
|
+
"wrapped-aliases": external_exports2.boolean().optional(),
|
|
876379
|
+
maxRetries: external_exports2.number().int().min(0).optional()
|
|
876266
876380
|
});
|
|
876267
876381
|
|
|
876268
876382
|
// ../../../generators/java-v2/ast/lib/java.js
|
|
@@ -894511,6 +894625,11 @@ var NameRegistry2 = class _NameRegistry {
|
|
|
894511
894625
|
const symbolId = this.symbolRegistry.inferSymbolIdForSourceModuleType(templateId);
|
|
894512
894626
|
return swift_exports.Symbol.create(symbolId, templateId, { type: "class" });
|
|
894513
894627
|
}
|
|
894628
|
+
case "ClientConfig": {
|
|
894629
|
+
const symbol3 = this.sourceStaticSymbolsByName.get(templateId);
|
|
894630
|
+
assertDefined(symbol3, `Source template symbol not found for name "${templateId}"`);
|
|
894631
|
+
return symbol3;
|
|
894632
|
+
}
|
|
894514
894633
|
default:
|
|
894515
894634
|
assertNever(templateId);
|
|
894516
894635
|
}
|
|
@@ -896690,11 +896809,6 @@ var SourceAsIsFileSpecs = {
|
|
|
896690
896809
|
filenameWithoutExtension: "CalendarDate",
|
|
896691
896810
|
symbols: [{ name: "CalendarDate", shape: { type: "struct" } }]
|
|
896692
896811
|
},
|
|
896693
|
-
ClientConfig: {
|
|
896694
|
-
relativePathToDir: "Public",
|
|
896695
|
-
filenameWithoutExtension: "ClientConfig",
|
|
896696
|
-
symbols: [{ name: "ClientConfig", shape: { type: "class" } }]
|
|
896697
|
-
},
|
|
896698
896812
|
FormFile: {
|
|
896699
896813
|
relativePathToDir: "Public",
|
|
896700
896814
|
filenameWithoutExtension: "FormFile",
|
|
@@ -897164,6 +897278,11 @@ var SourceTemplateFileSpecs = {
|
|
|
897164
897278
|
HTTPClient: {
|
|
897165
897279
|
relativePath: "Core/Networking",
|
|
897166
897280
|
filenameWithoutExtension: () => "HTTPClient"
|
|
897281
|
+
},
|
|
897282
|
+
// Public
|
|
897283
|
+
ClientConfig: {
|
|
897284
|
+
relativePath: "Public",
|
|
897285
|
+
filenameWithoutExtension: () => "ClientConfig"
|
|
897167
897286
|
}
|
|
897168
897287
|
};
|
|
897169
897288
|
|
|
@@ -897937,6 +898056,9 @@ var DynamicSnippetsGeneratorContext8 = class _DynamicSnippetsGeneratorContext ex
|
|
|
897937
898056
|
case "HTTPClient":
|
|
897938
898057
|
nameRegistry.registerSourceStaticSymbol(templateId, { type: "class" });
|
|
897939
898058
|
break;
|
|
898059
|
+
case "ClientConfig":
|
|
898060
|
+
nameRegistry.registerSourceStaticSymbol(templateId, { type: "class" });
|
|
898061
|
+
break;
|
|
897940
898062
|
default:
|
|
897941
898063
|
assertNever(templateId);
|
|
897942
898064
|
}
|
|
@@ -902577,7 +902699,7 @@ async function writeFilesToDiskAndRunGenerator({ organization, absolutePathToFer
|
|
|
902577
902699
|
context3.logger.debug("Will write snippet-templates.json to: " + absolutePathToTmpSnippetTemplatesJSON);
|
|
902578
902700
|
}
|
|
902579
902701
|
const environment2 = executionEnvironment ?? new ContainerExecutionEnvironment({
|
|
902580
|
-
containerImage: `${generatorInvocation.name}:${generatorInvocation.version}`,
|
|
902702
|
+
containerImage: generatorInvocation.containerImage ? `${generatorInvocation.containerImage}:${generatorInvocation.version}` : `${generatorInvocation.name}:${generatorInvocation.version}`,
|
|
902581
902703
|
keepContainer: keepDocker
|
|
902582
902704
|
});
|
|
902583
902705
|
const paths = environment2.usesContainerPaths ? {
|
|
@@ -903109,7 +903231,7 @@ var GenerationRunner = class {
|
|
|
903109
903231
|
constructor(executionEnvironment) {
|
|
903110
903232
|
this.executionEnvironment = executionEnvironment;
|
|
903111
903233
|
}
|
|
903112
|
-
async run({ organization, absolutePathToFernConfig, workspace, generatorGroup, context: context3, irVersionOverride, outputVersionOverride, shouldGenerateDynamicSnippetTests, skipUnstableDynamicSnippetTests, inspect: inspect6, skipFernignore }) {
|
|
903234
|
+
async run({ organization, absolutePathToFernConfig, workspace, generatorGroup, context: context3, irVersionOverride, outputVersionOverride, shouldGenerateDynamicSnippetTests, skipUnstableDynamicSnippetTests, inspect: inspect6, skipFernignore, skipAutogenerationIfManualExamplesExist }) {
|
|
903113
903235
|
const results = await Promise.all(generatorGroup.generators.map(async (generatorInvocation) => {
|
|
903114
903236
|
return context3.runInteractiveTask({ name: generatorInvocation.name }, async (interactiveTaskContext) => {
|
|
903115
903237
|
if (generatorInvocation.absolutePathToLocalOutput == null) {
|
|
@@ -903127,7 +903249,8 @@ var GenerationRunner = class {
|
|
|
903127
903249
|
outputVersionOverride,
|
|
903128
903250
|
absolutePathToFernConfig,
|
|
903129
903251
|
inspect: inspect6,
|
|
903130
|
-
skipFernignore
|
|
903252
|
+
skipFernignore,
|
|
903253
|
+
skipAutogenerationIfManualExamplesExist
|
|
903131
903254
|
});
|
|
903132
903255
|
interactiveTaskContext.logger.info(source_default.green("Wrote files to " + generatorInvocation.absolutePathToLocalOutput));
|
|
903133
903256
|
if (shouldGenerateDynamicSnippetTests && generatorInvocation.language != null) {
|
|
@@ -903154,7 +903277,7 @@ var GenerationRunner = class {
|
|
|
903154
903277
|
});
|
|
903155
903278
|
}));
|
|
903156
903279
|
}
|
|
903157
|
-
async executeGenerator({ generatorGroup, generatorInvocation, context: context3, workspace, organization, irVersionOverride, outputVersionOverride, absolutePathToFernConfig, inspect: inspect6, skipFernignore }) {
|
|
903280
|
+
async executeGenerator({ generatorGroup, generatorInvocation, context: context3, workspace, organization, irVersionOverride, outputVersionOverride, absolutePathToFernConfig, inspect: inspect6, skipFernignore, skipAutogenerationIfManualExamplesExist }) {
|
|
903158
903281
|
context3.logger.info(`Starting generation for ${generatorInvocation.name}`);
|
|
903159
903282
|
if (generatorInvocation.absolutePathToLocalOutput == null) {
|
|
903160
903283
|
throw new Error("Output path is required for generation");
|
|
@@ -903167,7 +903290,8 @@ var GenerationRunner = class {
|
|
|
903167
903290
|
smartCasing: generatorInvocation.smartCasing,
|
|
903168
903291
|
exampleGeneration: {
|
|
903169
903292
|
includeOptionalRequestPropertyExamples: true,
|
|
903170
|
-
disabled: generatorInvocation.disableExamples
|
|
903293
|
+
disabled: generatorInvocation.disableExamples,
|
|
903294
|
+
skipAutogenerationIfManualExamplesExist: skipAutogenerationIfManualExamplesExist ?? false
|
|
903171
903295
|
},
|
|
903172
903296
|
readme: generatorInvocation.readme,
|
|
903173
903297
|
version: outputVersionOverride,
|
|
@@ -903231,6 +903355,7 @@ var LegacyGeneratorInvocationAdapter = class {
|
|
|
903231
903355
|
return {
|
|
903232
903356
|
raw: this.buildRaw(target),
|
|
903233
903357
|
name: target.image,
|
|
903358
|
+
containerImage: target.registry ? `${target.registry}/${removeDefaultDockerOrgIfPresent(target.image)}` : void 0,
|
|
903234
903359
|
version: target.version,
|
|
903235
903360
|
config: target.config,
|
|
903236
903361
|
language: this.mapLanguage(target.lang),
|
|
@@ -903653,7 +903778,8 @@ var LegacyLocalGenerationRunner = class {
|
|
|
903653
903778
|
};
|
|
903654
903779
|
}
|
|
903655
903780
|
async runLocalGeneration({ args, taskContext, fernWorkspace, generatorGroup, generatorInvocation }) {
|
|
903656
|
-
const
|
|
903781
|
+
const imageRef = args.target.registry ? `${args.target.registry}/${removeDefaultDockerOrgIfPresent(args.target.image)}` : args.target.image;
|
|
903782
|
+
const containerImage = `${imageRef}:${args.target.version}`;
|
|
903657
903783
|
const executionEnvironment = new ContainerExecutionEnvironment({
|
|
903658
903784
|
containerImage,
|
|
903659
903785
|
keepContainer: args.keepContainer ?? false,
|
|
@@ -903846,6 +903972,11 @@ var GeneratorPipeline = class {
|
|
|
903846
903972
|
if (this.isLocalGeneration(args)) {
|
|
903847
903973
|
return await this.runLocalGeneration(args);
|
|
903848
903974
|
}
|
|
903975
|
+
if (args.target.registry != null) {
|
|
903976
|
+
throw new CliError({
|
|
903977
|
+
message: `Custom image configurations are only supported with local generation (--local). Target "${args.target.name}" uses a custom image registry.`
|
|
903978
|
+
});
|
|
903979
|
+
}
|
|
903849
903980
|
return await this.runRemoteGeneration(args);
|
|
903850
903981
|
} catch (error50) {
|
|
903851
903982
|
const message = extractErrorMessage(error50);
|
|
@@ -904072,6 +904203,7 @@ var WorkspaceBuilder = class {
|
|
|
904072
904203
|
name: lang,
|
|
904073
904204
|
api: DEFAULT_API_NAME,
|
|
904074
904205
|
image: imageRef.image,
|
|
904206
|
+
registry: void 0,
|
|
904075
904207
|
lang,
|
|
904076
904208
|
version: imageRef.tag,
|
|
904077
904209
|
sourceLocation,
|
|
@@ -904683,11 +904815,12 @@ var GeneratorMigrator = class _GeneratorMigrator {
|
|
|
904683
904815
|
* migration system expects.
|
|
904684
904816
|
*/
|
|
904685
904817
|
toGeneratorInvocationSchema(target) {
|
|
904686
|
-
|
|
904818
|
+
const invocation = {
|
|
904687
904819
|
name: target.image,
|
|
904688
904820
|
version: target.version,
|
|
904689
904821
|
config: target.config
|
|
904690
904822
|
};
|
|
904823
|
+
return invocation;
|
|
904691
904824
|
}
|
|
904692
904825
|
/**
|
|
904693
904826
|
* Applies the migrated `config` field back to the YAML document via
|
|
@@ -924217,7 +924350,7 @@ var CliContext = class {
|
|
|
924217
924350
|
if (false) {
|
|
924218
924351
|
this.logger.error("CLI_VERSION is not defined");
|
|
924219
924352
|
}
|
|
924220
|
-
return "4.
|
|
924353
|
+
return "4.60.0-2-g325260da1cd";
|
|
924221
924354
|
}
|
|
924222
924355
|
getCliName() {
|
|
924223
924356
|
if (false) {
|
|
@@ -925026,7 +925159,12 @@ Please report this issue at: https://github.com/fern-api/fern/issues`
|
|
|
925026
925159
|
};
|
|
925027
925160
|
}
|
|
925028
925161
|
function isValidGeneratorConfig(config5) {
|
|
925029
|
-
|
|
925162
|
+
if (typeof config5 !== "object" || config5 == null) {
|
|
925163
|
+
return false;
|
|
925164
|
+
}
|
|
925165
|
+
const hasValidName = "name" in config5 && typeof config5.name === "string";
|
|
925166
|
+
const hasValidImage = "image" in config5 && config5.image != null && typeof config5.image === "object";
|
|
925167
|
+
return hasValidName || hasValidImage;
|
|
925030
925168
|
}
|
|
925031
925169
|
async function loadAndRunMigrations(params2) {
|
|
925032
925170
|
const { generatorName, from: from4, to: to8, config: config5, logger: logger4 } = params2;
|
|
@@ -925034,7 +925172,7 @@ async function loadAndRunMigrations(params2) {
|
|
|
925034
925172
|
throw new Error(
|
|
925035
925173
|
`Invalid generator configuration for ${generatorName}.
|
|
925036
925174
|
|
|
925037
|
-
The generator configuration must be an object with a 'name' property, but the current configuration does not match this structure. This may indicate a malformed generators.yml file.
|
|
925175
|
+
The generator configuration must be an object with either a 'name' property or an 'image' property, but the current configuration does not match this structure. This may indicate a malformed generators.yml file.
|
|
925038
925176
|
|
|
925039
925177
|
Please check your generators.yml file and ensure the generator is properly configured.`
|
|
925040
925178
|
);
|
|
@@ -925143,6 +925281,14 @@ async function loadAndUpdateGenerators({
|
|
|
925143
925281
|
`Expected generator in group ${groupName} to be a map in ${import_path79.default.relative(process.cwd(), filepath)}`
|
|
925144
925282
|
);
|
|
925145
925283
|
}
|
|
925284
|
+
if (generator.get("image") != null) {
|
|
925285
|
+
const imageNode = generator.get("image");
|
|
925286
|
+
const imageName = import_yaml6.default.isMap(imageNode) ? imageNode.get("name") : "unknown";
|
|
925287
|
+
context3.logger.warn(
|
|
925288
|
+
`Skipping custom image generator "${imageName}" in group ${groupName}: generators using a custom image cannot be auto-upgraded.`
|
|
925289
|
+
);
|
|
925290
|
+
continue;
|
|
925291
|
+
}
|
|
925146
925292
|
const generatorName = generator.get("name");
|
|
925147
925293
|
const normalizedGeneratorName = normalizeGeneratorName(generatorName);
|
|
925148
925294
|
if (normalizedGeneratorName == null) {
|
|
@@ -933515,6 +933661,13 @@ async function generateWorkspace({
|
|
|
933515
933661
|
skipFernignore
|
|
933516
933662
|
});
|
|
933517
933663
|
} else if (token != null) {
|
|
933664
|
+
const customImageGenerators = group.generators.filter((g19) => g19.containerImage != null);
|
|
933665
|
+
if (customImageGenerators.length > 0) {
|
|
933666
|
+
const names2 = customImageGenerators.map((g19) => g19.name).join(", ");
|
|
933667
|
+
return context3.failAndThrow(
|
|
933668
|
+
`Custom image configurations are only supported with local generation (--local). The following generators use custom images: ${names2}`
|
|
933669
|
+
);
|
|
933670
|
+
}
|
|
933518
933671
|
await runRemoteGenerationForAPIWorkspace({
|
|
933519
933672
|
projectConfig,
|
|
933520
933673
|
organization,
|
|
@@ -937299,7 +937452,7 @@ async function getFernDirectory9() {
|
|
|
937299
937452
|
}
|
|
937300
937453
|
|
|
937301
937454
|
// ../cli-migrations/lib/migrations/0.0.241/add-generator-groups/old-generators-configuration/BaseGeneratorInvocationSchema.js
|
|
937302
|
-
var
|
|
937455
|
+
var BaseGeneratorInvocationSchema2 = external_exports2.strictObject({
|
|
937303
937456
|
name: external_exports2.string(),
|
|
937304
937457
|
version: external_exports2.string(),
|
|
937305
937458
|
config: external_exports2.unknown(),
|
|
@@ -937307,7 +937460,7 @@ var BaseGeneratorInvocationSchema = external_exports2.strictObject({
|
|
|
937307
937460
|
});
|
|
937308
937461
|
|
|
937309
937462
|
// ../cli-migrations/lib/migrations/0.0.241/add-generator-groups/old-generators-configuration/DraftGeneratorInvocationSchema.js
|
|
937310
|
-
var DraftGeneratorInvocationSchema =
|
|
937463
|
+
var DraftGeneratorInvocationSchema = BaseGeneratorInvocationSchema2.extend({
|
|
937311
937464
|
mode: external_exports2.union([external_exports2.literal("publish"), external_exports2.literal("download-files")]),
|
|
937312
937465
|
"output-path": external_exports2.optional(external_exports2.string())
|
|
937313
937466
|
});
|
|
@@ -937354,7 +937507,7 @@ var GithubRepositoryOutputSchema = external_exports2.strictObject({
|
|
|
937354
937507
|
});
|
|
937355
937508
|
|
|
937356
937509
|
// ../cli-migrations/lib/migrations/0.0.241/add-generator-groups/old-generators-configuration/ReleaseGeneratorInvocationSchema.js
|
|
937357
|
-
var ReleaseGeneratorInvocationSchema =
|
|
937510
|
+
var ReleaseGeneratorInvocationSchema = BaseGeneratorInvocationSchema2.extend({
|
|
937358
937511
|
publishing: external_exports2.optional(GeneratorPublishingSchema),
|
|
937359
937512
|
github: external_exports2.optional(GithubRepositoryOutputSchema)
|
|
937360
937513
|
});
|
package/package.json
CHANGED