fern-api 0.19.14-rc0 → 0.19.14-rc1
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/bundle.cjs +34 -13
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -828595,6 +828595,7 @@ var GeneratorInvocationSchema = z.strictObject({
|
|
|
828595
828595
|
output: z.optional(GeneratorOutputSchema),
|
|
828596
828596
|
github: z.optional(GithubConfigurationSchema),
|
|
828597
828597
|
config: z.unknown(),
|
|
828598
|
+
"ir-version": z.optional(z.string()),
|
|
828598
828599
|
"smart-casing": z.optional(z.boolean()),
|
|
828599
828600
|
"disable-examples": z.optional(z.boolean())
|
|
828600
828601
|
});
|
|
@@ -828744,7 +828745,8 @@ async function convertGenerator({ absolutePathToGeneratorsConfiguration, generat
|
|
|
828744
828745
|
smartCasing: generator["smart-casing"] ?? false,
|
|
828745
828746
|
disableExamples: generator["disable-examples"] ?? false,
|
|
828746
828747
|
absolutePathToLocalOutput: ((_a2 = generator.output) == null ? void 0 : _a2.location) === "local-file-system" ? resolve(dirname(absolutePathToGeneratorsConfiguration), generator.output.path) : void 0,
|
|
828747
|
-
language: getLanguageFromGeneratorName(generator.name)
|
|
828748
|
+
language: getLanguageFromGeneratorName(generator.name),
|
|
828749
|
+
irVersionOverride: generator["ir-version"] ?? void 0
|
|
828748
828750
|
};
|
|
828749
828751
|
}
|
|
828750
828752
|
async function convertOutputMode({ absolutePathToGeneratorsConfiguration, generator }) {
|
|
@@ -832139,7 +832141,7 @@ var AccessTokenPosthogManager = class {
|
|
|
832139
832141
|
properties: {
|
|
832140
832142
|
...event,
|
|
832141
832143
|
...event.properties,
|
|
832142
|
-
version: "0.19.14-
|
|
832144
|
+
version: "0.19.14-rc1",
|
|
832143
832145
|
usingAccessToken: true
|
|
832144
832146
|
}
|
|
832145
832147
|
});
|
|
@@ -832201,7 +832203,7 @@ var UserPosthogManager = class {
|
|
|
832201
832203
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
832202
832204
|
event: "CLI",
|
|
832203
832205
|
properties: {
|
|
832204
|
-
version: "0.19.14-
|
|
832206
|
+
version: "0.19.14-rc1",
|
|
832205
832207
|
...event,
|
|
832206
832208
|
...event.properties
|
|
832207
832209
|
}
|
|
@@ -855717,10 +855719,10 @@ var CliContext = class {
|
|
|
855717
855719
|
return "fern-api";
|
|
855718
855720
|
}
|
|
855719
855721
|
getPackageVersion() {
|
|
855720
|
-
if ("0.19.14-
|
|
855722
|
+
if ("0.19.14-rc1" == null) {
|
|
855721
855723
|
this.logger.error("CLI_VERSION is not defined");
|
|
855722
855724
|
}
|
|
855723
|
-
return "0.19.14-
|
|
855725
|
+
return "0.19.14-rc1";
|
|
855724
855726
|
}
|
|
855725
855727
|
getCliName() {
|
|
855726
855728
|
if ("fern" == null) {
|
|
@@ -871384,6 +871386,15 @@ function migrateIntermediateRepresentationForGenerator({ intermediateRepresentat
|
|
|
871384
871386
|
});
|
|
871385
871387
|
return migrated.jsonify();
|
|
871386
871388
|
}
|
|
871389
|
+
function migrateIntermediateRepresentationToVersionForGenerator({ intermediateRepresentation, context, targetGenerator, irVersion }) {
|
|
871390
|
+
const migrated = getIntermediateRepresentationMigrator().migrateThroughVersion({
|
|
871391
|
+
version: irVersion,
|
|
871392
|
+
intermediateRepresentation,
|
|
871393
|
+
context,
|
|
871394
|
+
targetGenerator
|
|
871395
|
+
});
|
|
871396
|
+
return migrated.jsonify();
|
|
871397
|
+
}
|
|
871387
871398
|
|
|
871388
871399
|
// pnp:/home/circleci/project/packages/cli/generation/ir-migrations/lib/migrateIntermediateRepresentationThroughVersion.js
|
|
871389
871400
|
function migrateIntermediateRepresentationThroughVersion({ intermediateRepresentation, context, version: version3 }) {
|
|
@@ -872020,7 +872031,7 @@ async function runLocalGenerationForWorkspace({ projectConfig, workspace, genera
|
|
|
872020
872031
|
workspaceTempDir,
|
|
872021
872032
|
keepDocker,
|
|
872022
872033
|
context: interactiveTaskContext,
|
|
872023
|
-
irVersionOverride:
|
|
872034
|
+
irVersionOverride: generatorInvocation.irVersionOverride,
|
|
872024
872035
|
outputVersionOverride: void 0,
|
|
872025
872036
|
writeSnippets: false,
|
|
872026
872037
|
writeUnitTests: false
|
|
@@ -872152,7 +872163,7 @@ function substituteEnvVariables(content3, context) {
|
|
|
872152
872163
|
}
|
|
872153
872164
|
|
|
872154
872165
|
// pnp:/home/circleci/project/packages/cli/generation/remote-generation/remote-workspace-runner/lib/createAndStartJob.js
|
|
872155
|
-
async function createAndStartJob({ workspace, organization, intermediateRepresentation, generatorInvocation, version: version3, context, shouldLogS3Url, token, whitelabel }) {
|
|
872166
|
+
async function createAndStartJob({ workspace, organization, intermediateRepresentation, generatorInvocation, version: version3, context, shouldLogS3Url, token, whitelabel, irVersionOverride }) {
|
|
872156
872167
|
const job = await createJob({
|
|
872157
872168
|
workspace,
|
|
872158
872169
|
organization,
|
|
@@ -872163,7 +872174,7 @@ async function createAndStartJob({ workspace, organization, intermediateRepresen
|
|
|
872163
872174
|
token,
|
|
872164
872175
|
whitelabel
|
|
872165
872176
|
});
|
|
872166
|
-
await startJob({ intermediateRepresentation, job, context, generatorInvocation });
|
|
872177
|
+
await startJob({ intermediateRepresentation, job, context, generatorInvocation, irVersionOverride });
|
|
872167
872178
|
return job;
|
|
872168
872179
|
}
|
|
872169
872180
|
async function createJob({ workspace, organization, generatorInvocation, version: version3, context, shouldLogS3Url, token, whitelabel }) {
|
|
@@ -872248,15 +872259,23 @@ async function createJob({ workspace, organization, generatorInvocation, version
|
|
|
872248
872259
|
}
|
|
872249
872260
|
return createResponse.body;
|
|
872250
872261
|
}
|
|
872251
|
-
async function startJob({ intermediateRepresentation, generatorInvocation, job, context }) {
|
|
872262
|
+
async function startJob({ intermediateRepresentation, generatorInvocation, job, context, irVersionOverride }) {
|
|
872252
872263
|
var _a2;
|
|
872253
|
-
const migratedIntermediateRepresentation = await migrateIntermediateRepresentationForGenerator({
|
|
872264
|
+
const migratedIntermediateRepresentation = irVersionOverride == null ? await migrateIntermediateRepresentationForGenerator({
|
|
872254
872265
|
intermediateRepresentation,
|
|
872255
872266
|
context,
|
|
872256
872267
|
targetGenerator: {
|
|
872257
872268
|
name: generatorInvocation.name,
|
|
872258
872269
|
version: generatorInvocation.version
|
|
872259
872270
|
}
|
|
872271
|
+
}) : await migrateIntermediateRepresentationToVersionForGenerator({
|
|
872272
|
+
intermediateRepresentation,
|
|
872273
|
+
context,
|
|
872274
|
+
irVersion: irVersionOverride,
|
|
872275
|
+
targetGenerator: {
|
|
872276
|
+
name: generatorInvocation.name,
|
|
872277
|
+
version: generatorInvocation.version
|
|
872278
|
+
}
|
|
872260
872279
|
});
|
|
872261
872280
|
const formData = new import_form_data.default();
|
|
872262
872281
|
const irAsString = await stringifyLargeObject(migratedIntermediateRepresentation, {
|
|
@@ -872475,7 +872494,7 @@ function convertLogLevel(logLevel) {
|
|
|
872475
872494
|
}
|
|
872476
872495
|
|
|
872477
872496
|
// pnp:/home/circleci/project/packages/cli/generation/remote-generation/remote-workspace-runner/lib/runRemoteGenerationForGenerator.js
|
|
872478
|
-
async function runRemoteGenerationForGenerator({ organization, workspace, interactiveTaskContext, generatorInvocation, version: version3, audiences, shouldLogS3Url, token, whitelabel }) {
|
|
872497
|
+
async function runRemoteGenerationForGenerator({ organization, workspace, interactiveTaskContext, generatorInvocation, version: version3, audiences, shouldLogS3Url, token, whitelabel, irVersionOverride }) {
|
|
872479
872498
|
const intermediateRepresentation = await generateIntermediateRepresentation({
|
|
872480
872499
|
workspace,
|
|
872481
872500
|
generationLanguage: generatorInvocation.language,
|
|
@@ -872492,7 +872511,8 @@ async function runRemoteGenerationForGenerator({ organization, workspace, intera
|
|
|
872492
872511
|
intermediateRepresentation,
|
|
872493
872512
|
shouldLogS3Url,
|
|
872494
872513
|
token,
|
|
872495
|
-
whitelabel
|
|
872514
|
+
whitelabel,
|
|
872515
|
+
irVersionOverride
|
|
872496
872516
|
});
|
|
872497
872517
|
interactiveTaskContext.logger.debug(`Job ID: ${job.jobId}`);
|
|
872498
872518
|
const taskId = job.taskIds[0];
|
|
@@ -872533,7 +872553,8 @@ async function runRemoteGenerationForAPIWorkspace({ organization, workspace, con
|
|
|
872533
872553
|
audiences: generatorGroup.audiences,
|
|
872534
872554
|
shouldLogS3Url,
|
|
872535
872555
|
token,
|
|
872536
|
-
whitelabel
|
|
872556
|
+
whitelabel,
|
|
872557
|
+
irVersionOverride: generatorInvocation.irVersionOverride
|
|
872537
872558
|
});
|
|
872538
872559
|
if (remoteTaskHandlerResponse != null && remoteTaskHandlerResponse.createdSnippets) {
|
|
872539
872560
|
snippetsProducedBy.push(generatorInvocation);
|