@fern-api/fern-api-dev 4.58.0-6-g45e929c505d → 4.59.0-1-g6c7d34bd76f
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 +135 -28
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -499925,14 +499925,18 @@ __export(serialization_exports4, {
|
|
|
499925
499925
|
AsyncApiSettingsSchema: () => AsyncApiSettingsSchema,
|
|
499926
499926
|
AsyncApiSpecSchema: () => AsyncApiSpecSchema,
|
|
499927
499927
|
BaseApiSettingsSchema: () => BaseApiSettingsSchema,
|
|
499928
|
+
BaseGeneratorInvocationSchema: () => BaseGeneratorInvocationSchema,
|
|
499928
499929
|
CoerceConstsTo: () => CoerceConstsTo2,
|
|
499929
499930
|
ConjureSchema: () => ConjureSchema,
|
|
499930
499931
|
CratesOutputLocationSchema: () => CratesOutputLocationSchema,
|
|
499932
|
+
CustomGeneratorInvocationSchema: () => CustomGeneratorInvocationSchema,
|
|
499933
|
+
DefaultGeneratorInvocationSchema: () => DefaultGeneratorInvocationSchema,
|
|
499931
499934
|
DefaultIntegerFormat: () => DefaultIntegerFormat2,
|
|
499932
499935
|
ExampleStyle: () => ExampleStyle4,
|
|
499933
499936
|
FormParameterEncoding: () => FormParameterEncoding2,
|
|
499934
499937
|
GeneratorApiSettingsSchema: () => GeneratorApiSettingsSchema,
|
|
499935
499938
|
GeneratorGroupSchema: () => GeneratorGroupSchema,
|
|
499939
|
+
GeneratorImageObjectSchema: () => GeneratorImageObjectSchema,
|
|
499936
499940
|
GeneratorInvocationSchema: () => GeneratorInvocationSchema,
|
|
499937
499941
|
GeneratorOutputSchema: () => GeneratorOutputSchema,
|
|
499938
499942
|
GeneratorPublishMetadataSchema: () => GeneratorPublishMetadataSchema,
|
|
@@ -501908,6 +501912,7 @@ __export(generators_exports2, {
|
|
|
501908
501912
|
DefaultIntegerFormat: () => DefaultIntegerFormat2,
|
|
501909
501913
|
ExampleStyle: () => ExampleStyle4,
|
|
501910
501914
|
FormParameterEncoding: () => FormParameterEncoding2,
|
|
501915
|
+
GeneratorImageObjectSchema: () => GeneratorImageObjectSchema,
|
|
501911
501916
|
GeneratorsConfigurationSchema: () => GeneratorsConfigurationSchema,
|
|
501912
501917
|
GeneratorsOpenApiObjectSchema: () => GeneratorsOpenApiObjectSchema,
|
|
501913
501918
|
GeneratorsOpenApiSchema: () => GeneratorsOpenApiSchema,
|
|
@@ -502179,6 +502184,12 @@ var ApiConfigurationSchema = schemas_exports8.undiscriminatedUnion([
|
|
|
502179
502184
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/generators/types/ExampleStyle.js
|
|
502180
502185
|
var ExampleStyle4 = schemas_exports8.enum_(["minimal", "comprehensive"]);
|
|
502181
502186
|
|
|
502187
|
+
// ../configuration/lib/generators-yml/schemas/serialization/resources/generators/types/GeneratorImageObjectSchema.js
|
|
502188
|
+
var GeneratorImageObjectSchema = schemas_exports8.object({
|
|
502189
|
+
name: schemas_exports8.string(),
|
|
502190
|
+
registry: schemas_exports8.string()
|
|
502191
|
+
});
|
|
502192
|
+
|
|
502182
502193
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/generators/types/OutputMetadataAuthor.js
|
|
502183
502194
|
var OutputMetadataAuthor2 = schemas_exports8.object({
|
|
502184
502195
|
name: schemas_exports8.string(),
|
|
@@ -502371,9 +502382,8 @@ var GithubConfigurationSchema = schemas_exports8.undiscriminatedUnion([
|
|
|
502371
502382
|
GithubPushSchema
|
|
502372
502383
|
]);
|
|
502373
502384
|
|
|
502374
|
-
// ../configuration/lib/generators-yml/schemas/serialization/resources/group/types/
|
|
502375
|
-
var
|
|
502376
|
-
name: schemas_exports8.string(),
|
|
502385
|
+
// ../configuration/lib/generators-yml/schemas/serialization/resources/group/types/BaseGeneratorInvocationSchema.js
|
|
502386
|
+
var BaseGeneratorInvocationSchema = schemas_exports8.object({
|
|
502377
502387
|
version: schemas_exports8.string(),
|
|
502378
502388
|
output: GeneratorOutputSchema.optional(),
|
|
502379
502389
|
github: GithubConfigurationSchema.optional(),
|
|
@@ -502389,6 +502399,19 @@ var GeneratorInvocationSchema = schemas_exports8.object({
|
|
|
502389
502399
|
autorelease: schemas_exports8.boolean().optional()
|
|
502390
502400
|
});
|
|
502391
502401
|
|
|
502402
|
+
// ../configuration/lib/generators-yml/schemas/serialization/resources/group/types/CustomGeneratorInvocationSchema.js
|
|
502403
|
+
var CustomGeneratorInvocationSchema = schemas_exports8.object({
|
|
502404
|
+
image: GeneratorImageObjectSchema
|
|
502405
|
+
}).extend(BaseGeneratorInvocationSchema);
|
|
502406
|
+
|
|
502407
|
+
// ../configuration/lib/generators-yml/schemas/serialization/resources/group/types/DefaultGeneratorInvocationSchema.js
|
|
502408
|
+
var DefaultGeneratorInvocationSchema = schemas_exports8.object({
|
|
502409
|
+
name: schemas_exports8.string()
|
|
502410
|
+
}).extend(BaseGeneratorInvocationSchema);
|
|
502411
|
+
|
|
502412
|
+
// ../configuration/lib/generators-yml/schemas/serialization/resources/group/types/GeneratorInvocationSchema.js
|
|
502413
|
+
var GeneratorInvocationSchema = schemas_exports8.undiscriminatedUnion([DefaultGeneratorInvocationSchema, CustomGeneratorInvocationSchema]);
|
|
502414
|
+
|
|
502392
502415
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/group/types/GeneratorGroupSchema.js
|
|
502393
502416
|
var GeneratorGroupSchema = schemas_exports8.object({
|
|
502394
502417
|
audiences: schemas_exports8.list(schemas_exports8.string()).optional(),
|
|
@@ -502483,7 +502506,10 @@ var GeneratorsConfigurationSchema = schemas_exports8.object({
|
|
|
502483
502506
|
// ../configuration/lib/generators-yml/schemas/serialization/resources/group/index.js
|
|
502484
502507
|
var group_exports2 = {};
|
|
502485
502508
|
__export(group_exports2, {
|
|
502509
|
+
BaseGeneratorInvocationSchema: () => BaseGeneratorInvocationSchema,
|
|
502486
502510
|
CratesOutputLocationSchema: () => CratesOutputLocationSchema,
|
|
502511
|
+
CustomGeneratorInvocationSchema: () => CustomGeneratorInvocationSchema,
|
|
502512
|
+
DefaultGeneratorInvocationSchema: () => DefaultGeneratorInvocationSchema,
|
|
502487
502513
|
GeneratorApiSettingsSchema: () => GeneratorApiSettingsSchema,
|
|
502488
502514
|
GeneratorGroupSchema: () => GeneratorGroupSchema,
|
|
502489
502515
|
GeneratorInvocationSchema: () => GeneratorInvocationSchema,
|
|
@@ -535240,7 +535266,7 @@ async function addGenerator({ generatorName, generatorsConfiguration, groupName
|
|
|
535240
535266
|
groupName,
|
|
535241
535267
|
context: context3,
|
|
535242
535268
|
update: async (group) => {
|
|
535243
|
-
if (group.generators.some((generator) => addDefaultDockerOrgIfNotPresent(generator.name) === normalizedGeneratorName)) {
|
|
535269
|
+
if (group.generators.some((generator) => addDefaultDockerOrgIfNotPresent("image" in generator ? generator.image.name : generator.name) === normalizedGeneratorName)) {
|
|
535244
535270
|
context3.failAndThrow(`${generatorName} is already installed in group ${groupName}.`);
|
|
535245
535271
|
}
|
|
535246
535272
|
const latestVersion2 = await getLatestGeneratorVersion({
|
|
@@ -535702,12 +535728,28 @@ async function convertGroup({ absolutePathToGeneratorsConfiguration, groupName,
|
|
|
535702
535728
|
})))
|
|
535703
535729
|
};
|
|
535704
535730
|
}
|
|
535705
|
-
|
|
535731
|
+
function getGeneratorNameAndImage(generator, context3) {
|
|
535732
|
+
if ("image" in generator) {
|
|
535733
|
+
const correctedImageName = correctIncorrectDockerOrgWithWarning(generator.image.name, context3);
|
|
535734
|
+
const normalizedImageName = addDefaultDockerOrgIfNotPresent(correctedImageName);
|
|
535735
|
+
return {
|
|
535736
|
+
normalizedName: normalizedImageName,
|
|
535737
|
+
containerImage: `${generator.image.registry}/${correctedImageName}`
|
|
535738
|
+
};
|
|
535739
|
+
}
|
|
535706
535740
|
const correctedName = correctIncorrectDockerOrgWithWarning(generator.name, context3);
|
|
535707
535741
|
const normalizedName = addDefaultDockerOrgIfNotPresent(correctedName);
|
|
535742
|
+
return {
|
|
535743
|
+
normalizedName,
|
|
535744
|
+
containerImage: void 0
|
|
535745
|
+
};
|
|
535746
|
+
}
|
|
535747
|
+
async function convertGenerator({ absolutePathToGeneratorsConfiguration, generator, maybeGroupLevelMetadata, maybeTopLevelMetadata, maybeGroupLevelReviewers, maybeTopLevelReviewers, readme, context: context3 }) {
|
|
535748
|
+
const { normalizedName, containerImage } = getGeneratorNameAndImage(generator, context3);
|
|
535708
535749
|
return {
|
|
535709
535750
|
raw: generator,
|
|
535710
535751
|
name: normalizedName,
|
|
535752
|
+
containerImage,
|
|
535711
535753
|
version: generator.version,
|
|
535712
535754
|
config: generator.config,
|
|
535713
535755
|
outputMode: await convertOutputMode({
|
|
@@ -595524,6 +595566,8 @@ __export(schemas_exports12, {
|
|
|
595524
595566
|
FolderConfigurationSchema: () => FolderConfigurationSchema,
|
|
595525
595567
|
FooterLinksConfigSchema: () => FooterLinksConfigSchema,
|
|
595526
595568
|
FormParameterEncodingSchema: () => FormParameterEncodingSchema,
|
|
595569
|
+
GeneratorImageObjectSchema: () => GeneratorImageObjectSchema2,
|
|
595570
|
+
GeneratorImageSchema: () => GeneratorImageSchema,
|
|
595527
595571
|
GitHubOutputModeSchema: () => GitHubOutputModeSchema,
|
|
595528
595572
|
GitHubRepositoryOutputModeSchema: () => GitHubRepositoryOutputModeSchema,
|
|
595529
595573
|
GitHubRepositoryOutputSchema: () => GitHubRepositoryOutputSchema,
|
|
@@ -596012,6 +596056,13 @@ var ReadmeSchema2 = external_exports.object({
|
|
|
596012
596056
|
exampleStyle: ExampleStyleSchema.optional()
|
|
596013
596057
|
});
|
|
596014
596058
|
|
|
596059
|
+
// ../config/lib/schemas/GeneratorImageSchema.js
|
|
596060
|
+
var GeneratorImageObjectSchema2 = external_exports.object({
|
|
596061
|
+
name: external_exports.string(),
|
|
596062
|
+
registry: external_exports.string()
|
|
596063
|
+
});
|
|
596064
|
+
var GeneratorImageSchema = external_exports.union([external_exports.string(), GeneratorImageObjectSchema2]);
|
|
596065
|
+
|
|
596015
596066
|
// ../config/lib/schemas/MetadataSchema.js
|
|
596016
596067
|
var AuthorSchema = external_exports.object({
|
|
596017
596068
|
name: external_exports.string(),
|
|
@@ -596141,7 +596192,7 @@ var PublishSchema = external_exports.object({
|
|
|
596141
596192
|
var SdkTargetSchema = external_exports.object({
|
|
596142
596193
|
api: external_exports.string().optional(),
|
|
596143
596194
|
lang: SdkTargetLanguageSchema.optional(),
|
|
596144
|
-
image:
|
|
596195
|
+
image: GeneratorImageSchema.optional(),
|
|
596145
596196
|
version: external_exports.string().optional(),
|
|
596146
596197
|
config: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
596147
596198
|
publish: PublishSchema.optional(),
|
|
@@ -602681,7 +602732,7 @@ var AccessTokenPosthogManager = class {
|
|
|
602681
602732
|
properties: {
|
|
602682
602733
|
...event,
|
|
602683
602734
|
...event.properties,
|
|
602684
|
-
version: "4.
|
|
602735
|
+
version: "4.59.0-1-g6c7d34bd76f",
|
|
602685
602736
|
usingAccessToken: true
|
|
602686
602737
|
}
|
|
602687
602738
|
});
|
|
@@ -602732,7 +602783,7 @@ var UserPosthogManager = class {
|
|
|
602732
602783
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
602733
602784
|
event: "CLI",
|
|
602734
602785
|
properties: {
|
|
602735
|
-
version: "4.
|
|
602786
|
+
version: "4.59.0-1-g6c7d34bd76f",
|
|
602736
602787
|
...event,
|
|
602737
602788
|
...event.properties,
|
|
602738
602789
|
usingAccessToken: false,
|
|
@@ -627403,6 +627454,7 @@ var SdkConfigConverter = class {
|
|
|
627403
627454
|
name: name2,
|
|
627404
627455
|
lang: generatorInfo.lang,
|
|
627405
627456
|
image: generatorInfo.image,
|
|
627457
|
+
registry: generatorInfo.registry,
|
|
627406
627458
|
version: generatorInfo.version,
|
|
627407
627459
|
api: this.resolveApi({ api: target.api }),
|
|
627408
627460
|
sourceLocation: sourced.$loc,
|
|
@@ -627438,11 +627490,28 @@ var SdkConfigConverter = class {
|
|
|
627438
627490
|
if (lang == null) {
|
|
627439
627491
|
return void 0;
|
|
627440
627492
|
}
|
|
627493
|
+
if (target.image != null) {
|
|
627494
|
+
if (typeof target.image === "string") {
|
|
627495
|
+
return {
|
|
627496
|
+
lang,
|
|
627497
|
+
image: addDefaultDockerOrgIfNotPresent(target.image),
|
|
627498
|
+
version: target.version ?? "latest",
|
|
627499
|
+
registry: void 0
|
|
627500
|
+
};
|
|
627501
|
+
}
|
|
627502
|
+
return {
|
|
627503
|
+
lang,
|
|
627504
|
+
image: addDefaultDockerOrgIfNotPresent(target.image.name),
|
|
627505
|
+
version: target.version ?? "latest",
|
|
627506
|
+
registry: target.image.registry
|
|
627507
|
+
};
|
|
627508
|
+
}
|
|
627441
627509
|
const resolvedDockerImage = getImageReferenceFromLanguage({ lang, version: target.version });
|
|
627442
627510
|
return {
|
|
627443
627511
|
lang,
|
|
627444
627512
|
image: resolvedDockerImage.image,
|
|
627445
|
-
version: resolvedDockerImage.tag
|
|
627513
|
+
version: resolvedDockerImage.tag,
|
|
627514
|
+
registry: void 0
|
|
627446
627515
|
};
|
|
627447
627516
|
}
|
|
627448
627517
|
convertConfig(config5) {
|
|
@@ -627453,7 +627522,8 @@ var SdkConfigConverter = class {
|
|
|
627453
627522
|
return target.lang;
|
|
627454
627523
|
}
|
|
627455
627524
|
if (target.image != null) {
|
|
627456
|
-
|
|
627525
|
+
const imageName = typeof target.image === "string" ? target.image : target.image.name;
|
|
627526
|
+
return getLanguageFromImage({ image: addDefaultDockerOrgIfNotPresent(imageName) });
|
|
627457
627527
|
}
|
|
627458
627528
|
const lang = name2;
|
|
627459
627529
|
if (LANGUAGES.includes(lang)) {
|
|
@@ -837241,18 +837311,19 @@ function convertSdkTargetsFromRaw(options2) {
|
|
|
837241
837311
|
}
|
|
837242
837312
|
function convertRawGeneratorToTarget(options2) {
|
|
837243
837313
|
const { generator, groupName, languageCounts, apiName, warnings } = options2;
|
|
837244
|
-
|
|
837314
|
+
const generatorName = generator.name ?? generator.image?.name;
|
|
837315
|
+
if (generatorName == null) {
|
|
837245
837316
|
warnings.push({
|
|
837246
837317
|
type: "conflict",
|
|
837247
|
-
message: "Generator missing 'name' field"
|
|
837318
|
+
message: "Generator missing 'name' or 'image.name' field"
|
|
837248
837319
|
});
|
|
837249
837320
|
return void 0;
|
|
837250
837321
|
}
|
|
837251
|
-
const language = getLanguageFromGeneratorName2(
|
|
837322
|
+
const language = getLanguageFromGeneratorName2(generatorName);
|
|
837252
837323
|
if (language == null) {
|
|
837253
837324
|
warnings.push({
|
|
837254
837325
|
type: "unsupported",
|
|
837255
|
-
message: `Unknown generator: ${
|
|
837326
|
+
message: `Unknown generator: ${generatorName}`,
|
|
837256
837327
|
suggestion: "Manually add this generator to your fern.yml"
|
|
837257
837328
|
});
|
|
837258
837329
|
return void 0;
|
|
@@ -837264,6 +837335,12 @@ function convertRawGeneratorToTarget(options2) {
|
|
|
837264
837335
|
const target = {
|
|
837265
837336
|
output: {}
|
|
837266
837337
|
};
|
|
837338
|
+
if (generator.image != null) {
|
|
837339
|
+
target.image = {
|
|
837340
|
+
name: generator.image.name,
|
|
837341
|
+
registry: generator.image.registry
|
|
837342
|
+
};
|
|
837343
|
+
}
|
|
837267
837344
|
target.lang = language;
|
|
837268
837345
|
if (apiName != null) {
|
|
837269
837346
|
target.api = apiName;
|
|
@@ -839962,7 +840039,7 @@ var import_path54 = __toESM(require("path"), 1);
|
|
|
839962
840039
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
839963
840040
|
var LOGS_FOLDER_NAME = "logs";
|
|
839964
840041
|
function getCliSource() {
|
|
839965
|
-
const version7 = "4.
|
|
840042
|
+
const version7 = "4.59.0-1-g6c7d34bd76f";
|
|
839966
840043
|
return `cli@${version7}`;
|
|
839967
840044
|
}
|
|
839968
840045
|
var DebugLogger = class {
|
|
@@ -842259,7 +842336,7 @@ async function visitGeneratorGroup({ group, visitor, nodePath, cliVersion }) {
|
|
|
842259
842336
|
...nodePath,
|
|
842260
842337
|
"generators",
|
|
842261
842338
|
idx.toString(),
|
|
842262
|
-
generator.name
|
|
842339
|
+
"image" in generator ? generator.image.name : generator.name
|
|
842263
842340
|
])));
|
|
842264
842341
|
}
|
|
842265
842342
|
|
|
@@ -842345,13 +842422,14 @@ var CompatibleIrVersionsRule = {
|
|
|
842345
842422
|
return [];
|
|
842346
842423
|
}
|
|
842347
842424
|
const cliIrVersion = cliRelease.body.irVersion;
|
|
842425
|
+
const invocationName = "image" in invocation ? invocation.image.name : invocation.name;
|
|
842348
842426
|
let invocationIrVersion;
|
|
842349
842427
|
if (invocation["ir-version"] != null) {
|
|
842350
842428
|
invocationIrVersion = getOverriddenIrVersion(invocation["ir-version"]);
|
|
842351
842429
|
} else {
|
|
842352
842430
|
const normalizedInvocation = {
|
|
842353
842431
|
...invocation,
|
|
842354
|
-
name: addDefaultDockerOrgIfNotPresent(
|
|
842432
|
+
name: addDefaultDockerOrgIfNotPresent(invocationName)
|
|
842355
842433
|
};
|
|
842356
842434
|
const maybeIrVersion = await getIrVersionForGenerator(normalizedInvocation);
|
|
842357
842435
|
if (maybeIrVersion == null) {
|
|
@@ -842364,7 +842442,7 @@ var CompatibleIrVersionsRule = {
|
|
|
842364
842442
|
}
|
|
842365
842443
|
const minCliVersion = await fdr.generators.cli.getMinCliForIr(invocationIrVersion);
|
|
842366
842444
|
if (minCliVersion.ok) {
|
|
842367
|
-
return getMaybeBadVersionMessage(
|
|
842445
|
+
return getMaybeBadVersionMessage(invocationName, minCliVersion.body.version, cliVersion) ?? [];
|
|
842368
842446
|
} else {
|
|
842369
842447
|
return [];
|
|
842370
842448
|
}
|
|
@@ -851063,7 +851141,7 @@ var LegacyDocsPublisher = class {
|
|
|
851063
851141
|
previewId: void 0,
|
|
851064
851142
|
disableTemplates: void 0,
|
|
851065
851143
|
skipUpload,
|
|
851066
|
-
cliVersion: "4.
|
|
851144
|
+
cliVersion: "4.59.0-1-g6c7d34bd76f"
|
|
851067
851145
|
});
|
|
851068
851146
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
851069
851147
|
return { success: false };
|
|
@@ -902578,7 +902656,7 @@ async function writeFilesToDiskAndRunGenerator({ organization, absolutePathToFer
|
|
|
902578
902656
|
context3.logger.debug("Will write snippet-templates.json to: " + absolutePathToTmpSnippetTemplatesJSON);
|
|
902579
902657
|
}
|
|
902580
902658
|
const environment2 = executionEnvironment ?? new ContainerExecutionEnvironment({
|
|
902581
|
-
containerImage: `${generatorInvocation.name}:${generatorInvocation.version}`,
|
|
902659
|
+
containerImage: generatorInvocation.containerImage ? `${generatorInvocation.containerImage}:${generatorInvocation.version}` : `${generatorInvocation.name}:${generatorInvocation.version}`,
|
|
902582
902660
|
keepContainer: keepDocker
|
|
902583
902661
|
});
|
|
902584
902662
|
const paths = environment2.usesContainerPaths ? {
|
|
@@ -903234,6 +903312,7 @@ var LegacyGeneratorInvocationAdapter = class {
|
|
|
903234
903312
|
return {
|
|
903235
903313
|
raw: this.buildRaw(target),
|
|
903236
903314
|
name: target.image,
|
|
903315
|
+
containerImage: target.registry ? `${target.registry}/${removeDefaultDockerOrgIfPresent(target.image)}` : void 0,
|
|
903237
903316
|
version: target.version,
|
|
903238
903317
|
config: target.config,
|
|
903239
903318
|
language: this.mapLanguage(target.lang),
|
|
@@ -903656,7 +903735,8 @@ var LegacyLocalGenerationRunner = class {
|
|
|
903656
903735
|
};
|
|
903657
903736
|
}
|
|
903658
903737
|
async runLocalGeneration({ args, taskContext, fernWorkspace, generatorGroup, generatorInvocation }) {
|
|
903659
|
-
const
|
|
903738
|
+
const imageRef = args.target.registry ? `${args.target.registry}/${removeDefaultDockerOrgIfPresent(args.target.image)}` : args.target.image;
|
|
903739
|
+
const containerImage = `${imageRef}:${args.target.version}`;
|
|
903660
903740
|
const executionEnvironment = new ContainerExecutionEnvironment({
|
|
903661
903741
|
containerImage,
|
|
903662
903742
|
keepContainer: args.keepContainer ?? false,
|
|
@@ -903849,6 +903929,11 @@ var GeneratorPipeline = class {
|
|
|
903849
903929
|
if (this.isLocalGeneration(args)) {
|
|
903850
903930
|
return await this.runLocalGeneration(args);
|
|
903851
903931
|
}
|
|
903932
|
+
if (args.target.registry != null) {
|
|
903933
|
+
throw new CliError({
|
|
903934
|
+
message: `Custom image configurations are only supported with local generation (--local). Target "${args.target.name}" uses a custom image registry.`
|
|
903935
|
+
});
|
|
903936
|
+
}
|
|
903852
903937
|
return await this.runRemoteGeneration(args);
|
|
903853
903938
|
} catch (error50) {
|
|
903854
903939
|
const message = extractErrorMessage(error50);
|
|
@@ -904075,6 +904160,7 @@ var WorkspaceBuilder = class {
|
|
|
904075
904160
|
name: lang,
|
|
904076
904161
|
api: DEFAULT_API_NAME,
|
|
904077
904162
|
image: imageRef.image,
|
|
904163
|
+
registry: void 0,
|
|
904078
904164
|
lang,
|
|
904079
904165
|
version: imageRef.tag,
|
|
904080
904166
|
sourceLocation,
|
|
@@ -904686,11 +904772,12 @@ var GeneratorMigrator = class _GeneratorMigrator {
|
|
|
904686
904772
|
* migration system expects.
|
|
904687
904773
|
*/
|
|
904688
904774
|
toGeneratorInvocationSchema(target) {
|
|
904689
|
-
|
|
904775
|
+
const invocation = {
|
|
904690
904776
|
name: target.image,
|
|
904691
904777
|
version: target.version,
|
|
904692
904778
|
config: target.config
|
|
904693
904779
|
};
|
|
904780
|
+
return invocation;
|
|
904694
904781
|
}
|
|
904695
904782
|
/**
|
|
904696
904783
|
* Applies the migrated `config` field back to the YAML document via
|
|
@@ -924220,7 +924307,7 @@ var CliContext = class {
|
|
|
924220
924307
|
if (false) {
|
|
924221
924308
|
this.logger.error("CLI_VERSION is not defined");
|
|
924222
924309
|
}
|
|
924223
|
-
return "4.
|
|
924310
|
+
return "4.59.0-1-g6c7d34bd76f";
|
|
924224
924311
|
}
|
|
924225
924312
|
getCliName() {
|
|
924226
924313
|
if (false) {
|
|
@@ -925029,7 +925116,12 @@ Please report this issue at: https://github.com/fern-api/fern/issues`
|
|
|
925029
925116
|
};
|
|
925030
925117
|
}
|
|
925031
925118
|
function isValidGeneratorConfig(config5) {
|
|
925032
|
-
|
|
925119
|
+
if (typeof config5 !== "object" || config5 == null) {
|
|
925120
|
+
return false;
|
|
925121
|
+
}
|
|
925122
|
+
const hasValidName = "name" in config5 && typeof config5.name === "string";
|
|
925123
|
+
const hasValidImage = "image" in config5 && config5.image != null && typeof config5.image === "object";
|
|
925124
|
+
return hasValidName || hasValidImage;
|
|
925033
925125
|
}
|
|
925034
925126
|
async function loadAndRunMigrations(params2) {
|
|
925035
925127
|
const { generatorName, from: from4, to: to8, config: config5, logger: logger4 } = params2;
|
|
@@ -925037,7 +925129,7 @@ async function loadAndRunMigrations(params2) {
|
|
|
925037
925129
|
throw new Error(
|
|
925038
925130
|
`Invalid generator configuration for ${generatorName}.
|
|
925039
925131
|
|
|
925040
|
-
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.
|
|
925132
|
+
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.
|
|
925041
925133
|
|
|
925042
925134
|
Please check your generators.yml file and ensure the generator is properly configured.`
|
|
925043
925135
|
);
|
|
@@ -925146,6 +925238,14 @@ async function loadAndUpdateGenerators({
|
|
|
925146
925238
|
`Expected generator in group ${groupName} to be a map in ${import_path79.default.relative(process.cwd(), filepath)}`
|
|
925147
925239
|
);
|
|
925148
925240
|
}
|
|
925241
|
+
if (generator.get("image") != null) {
|
|
925242
|
+
const imageNode = generator.get("image");
|
|
925243
|
+
const imageName = import_yaml6.default.isMap(imageNode) ? imageNode.get("name") : "unknown";
|
|
925244
|
+
context3.logger.warn(
|
|
925245
|
+
`Skipping custom image generator "${imageName}" in group ${groupName}: generators using a custom image cannot be auto-upgraded.`
|
|
925246
|
+
);
|
|
925247
|
+
continue;
|
|
925248
|
+
}
|
|
925149
925249
|
const generatorName = generator.get("name");
|
|
925150
925250
|
const normalizedGeneratorName = normalizeGeneratorName(generatorName);
|
|
925151
925251
|
if (normalizedGeneratorName == null) {
|
|
@@ -933518,6 +933618,13 @@ async function generateWorkspace({
|
|
|
933518
933618
|
skipFernignore
|
|
933519
933619
|
});
|
|
933520
933620
|
} else if (token != null) {
|
|
933621
|
+
const customImageGenerators = group.generators.filter((g19) => g19.containerImage != null);
|
|
933622
|
+
if (customImageGenerators.length > 0) {
|
|
933623
|
+
const names2 = customImageGenerators.map((g19) => g19.name).join(", ");
|
|
933624
|
+
return context3.failAndThrow(
|
|
933625
|
+
`Custom image configurations are only supported with local generation (--local). The following generators use custom images: ${names2}`
|
|
933626
|
+
);
|
|
933627
|
+
}
|
|
933521
933628
|
await runRemoteGenerationForAPIWorkspace({
|
|
933522
933629
|
projectConfig,
|
|
933523
933630
|
organization,
|
|
@@ -937302,7 +937409,7 @@ async function getFernDirectory9() {
|
|
|
937302
937409
|
}
|
|
937303
937410
|
|
|
937304
937411
|
// ../cli-migrations/lib/migrations/0.0.241/add-generator-groups/old-generators-configuration/BaseGeneratorInvocationSchema.js
|
|
937305
|
-
var
|
|
937412
|
+
var BaseGeneratorInvocationSchema2 = external_exports2.strictObject({
|
|
937306
937413
|
name: external_exports2.string(),
|
|
937307
937414
|
version: external_exports2.string(),
|
|
937308
937415
|
config: external_exports2.unknown(),
|
|
@@ -937310,7 +937417,7 @@ var BaseGeneratorInvocationSchema = external_exports2.strictObject({
|
|
|
937310
937417
|
});
|
|
937311
937418
|
|
|
937312
937419
|
// ../cli-migrations/lib/migrations/0.0.241/add-generator-groups/old-generators-configuration/DraftGeneratorInvocationSchema.js
|
|
937313
|
-
var DraftGeneratorInvocationSchema =
|
|
937420
|
+
var DraftGeneratorInvocationSchema = BaseGeneratorInvocationSchema2.extend({
|
|
937314
937421
|
mode: external_exports2.union([external_exports2.literal("publish"), external_exports2.literal("download-files")]),
|
|
937315
937422
|
"output-path": external_exports2.optional(external_exports2.string())
|
|
937316
937423
|
});
|
|
@@ -937357,7 +937464,7 @@ var GithubRepositoryOutputSchema = external_exports2.strictObject({
|
|
|
937357
937464
|
});
|
|
937358
937465
|
|
|
937359
937466
|
// ../cli-migrations/lib/migrations/0.0.241/add-generator-groups/old-generators-configuration/ReleaseGeneratorInvocationSchema.js
|
|
937360
|
-
var ReleaseGeneratorInvocationSchema =
|
|
937467
|
+
var ReleaseGeneratorInvocationSchema = BaseGeneratorInvocationSchema2.extend({
|
|
937361
937468
|
publishing: external_exports2.optional(GeneratorPublishingSchema),
|
|
937362
937469
|
github: external_exports2.optional(GithubRepositoryOutputSchema)
|
|
937363
937470
|
});
|
package/package.json
CHANGED