@fern-api/fern-api-dev 5.23.6 → 5.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.cjs +59 -8
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -370556,7 +370556,7 @@ var require_PostGenerationPipeline = __commonJS({
|
|
|
370556
370556
|
var GithubStep_1 = require_GithubStep();
|
|
370557
370557
|
var ReplayStep_1 = require_ReplayStep();
|
|
370558
370558
|
var VerificationStep_1 = require_VerificationStep();
|
|
370559
|
-
var
|
|
370559
|
+
var PostGenerationPipeline3 = class {
|
|
370560
370560
|
config;
|
|
370561
370561
|
logger;
|
|
370562
370562
|
steps = [];
|
|
@@ -370654,7 +370654,7 @@ var require_PostGenerationPipeline = __commonJS({
|
|
|
370654
370654
|
return result;
|
|
370655
370655
|
}
|
|
370656
370656
|
};
|
|
370657
|
-
exports2.PostGenerationPipeline =
|
|
370657
|
+
exports2.PostGenerationPipeline = PostGenerationPipeline3;
|
|
370658
370658
|
}
|
|
370659
370659
|
});
|
|
370660
370660
|
|
|
@@ -667567,7 +667567,7 @@ var AccessTokenPosthogManager = class {
|
|
|
667567
667567
|
properties: {
|
|
667568
667568
|
...event,
|
|
667569
667569
|
...event.properties,
|
|
667570
|
-
version: "5.
|
|
667570
|
+
version: "5.24.0",
|
|
667571
667571
|
usingAccessToken: true,
|
|
667572
667572
|
...getRunIdProperties()
|
|
667573
667573
|
}
|
|
@@ -667622,7 +667622,7 @@ var UserPosthogManager = class {
|
|
|
667622
667622
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
667623
667623
|
event: "CLI",
|
|
667624
667624
|
properties: {
|
|
667625
|
-
version: "5.
|
|
667625
|
+
version: "5.24.0",
|
|
667626
667626
|
...event,
|
|
667627
667627
|
...event.properties,
|
|
667628
667628
|
usingAccessToken: false,
|
|
@@ -858902,7 +858902,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
858902
858902
|
var LOGS_FOLDER_NAME = "logs";
|
|
858903
858903
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
858904
858904
|
function getCliSource() {
|
|
858905
|
-
const version7 = "5.
|
|
858905
|
+
const version7 = "5.24.0";
|
|
858906
858906
|
return `cli@${version7}`;
|
|
858907
858907
|
}
|
|
858908
858908
|
var DebugLogger = class {
|
|
@@ -871740,7 +871740,7 @@ var LegacyDocsPublisher = class {
|
|
|
871740
871740
|
previewId,
|
|
871741
871741
|
disableTemplates: void 0,
|
|
871742
871742
|
skipUpload,
|
|
871743
|
-
cliVersion: "5.
|
|
871743
|
+
cliVersion: "5.24.0",
|
|
871744
871744
|
loginCommand: "fern auth login"
|
|
871745
871745
|
});
|
|
871746
871746
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -875341,6 +875341,30 @@ var ContainerExecutionEnvironment = class {
|
|
|
875341
875341
|
|
|
875342
875342
|
// ../generation/local-generation/local-workspace-runner/lib/GenerationRunner.js
|
|
875343
875343
|
init_lib7();
|
|
875344
|
+
var import_pipeline3 = __toESM(require_pipeline2(), 1);
|
|
875345
|
+
|
|
875346
|
+
// ../generation/local-generation/local-workspace-runner/lib/assertVerifyPipelineSucceeded.js
|
|
875347
|
+
function assertVerifyPipelineSucceeded(pipelineResult, generatorName) {
|
|
875348
|
+
if (pipelineResult.success) {
|
|
875349
|
+
return;
|
|
875350
|
+
}
|
|
875351
|
+
const verifyResult = pipelineResult.steps.verify;
|
|
875352
|
+
const errors4 = pipelineResult.errors ?? [];
|
|
875353
|
+
let detail;
|
|
875354
|
+
if (verifyResult?.stderr != null && verifyResult.stderr.length > 0) {
|
|
875355
|
+
detail = verifyResult.stderr;
|
|
875356
|
+
} else if (errors4.length > 0) {
|
|
875357
|
+
detail = errors4.join("\n");
|
|
875358
|
+
} else if (verifyResult?.errorMessage != null) {
|
|
875359
|
+
detail = verifyResult.errorMessage;
|
|
875360
|
+
} else {
|
|
875361
|
+
detail = "verification pipeline failed";
|
|
875362
|
+
}
|
|
875363
|
+
throw new CliError({
|
|
875364
|
+
message: `Verification failed for ${generatorName}: ${detail}`,
|
|
875365
|
+
code: CliError.Code.InternalError
|
|
875366
|
+
});
|
|
875367
|
+
}
|
|
875344
875368
|
|
|
875345
875369
|
// ../../../generators/browser-compatible-base/lib/utils/stacktrace.js
|
|
875346
875370
|
var key = process.env["FERN_STACK_TRACK"]?.toLowerCase() ?? "";
|
|
@@ -924785,7 +924809,7 @@ var GenerationRunner = class {
|
|
|
924785
924809
|
constructor(executionEnvironment) {
|
|
924786
924810
|
this.executionEnvironment = executionEnvironment;
|
|
924787
924811
|
}
|
|
924788
|
-
async run({ organization, absolutePathToFernConfig, workspace, generatorGroup, context: context3, irVersionOverride, outputVersionOverride, shouldGenerateDynamicSnippetTests, skipUnstableDynamicSnippetTests, inspect: inspect6, skipFernignore, skipAutogenerationIfManualExamplesExist }) {
|
|
924812
|
+
async run({ organization, absolutePathToFernConfig, workspace, generatorGroup, context: context3, irVersionOverride, outputVersionOverride, shouldGenerateDynamicSnippetTests, skipUnstableDynamicSnippetTests, inspect: inspect6, skipFernignore, skipAutogenerationIfManualExamplesExist, verify: verify2, verifyRunner, verifyValidatorVersion }) {
|
|
924789
924813
|
const results = await Promise.all(generatorGroup.generators.map(async (generatorInvocation) => {
|
|
924790
924814
|
return context3.runInteractiveTask({ name: generatorInvocation.name }, async (interactiveTaskContext) => {
|
|
924791
924815
|
if (generatorInvocation.absolutePathToLocalOutput == null) {
|
|
@@ -924820,6 +924844,16 @@ var GenerationRunner = class {
|
|
|
924820
924844
|
} else {
|
|
924821
924845
|
interactiveTaskContext.logger.info(`Skipping dynamic snippet tests; shouldGenerateDynamicSnippetTests: ${shouldGenerateDynamicSnippetTests}, language: ${generatorInvocation.language}`);
|
|
924822
924846
|
}
|
|
924847
|
+
if (verify2 === true) {
|
|
924848
|
+
await runVerifyPipeline({
|
|
924849
|
+
outputDir: generatorInvocation.absolutePathToLocalOutput,
|
|
924850
|
+
generatorName: generatorInvocation.name,
|
|
924851
|
+
generatorVersion: verifyValidatorVersion ?? generatorInvocation.version,
|
|
924852
|
+
cliVersion: workspace.cliVersion,
|
|
924853
|
+
runner: verifyRunner ?? "docker",
|
|
924854
|
+
context: interactiveTaskContext
|
|
924855
|
+
});
|
|
924856
|
+
}
|
|
924823
924857
|
} catch (error50) {
|
|
924824
924858
|
if (error50 instanceof TaskAbortSignal) {
|
|
924825
924859
|
} else {
|
|
@@ -924892,6 +924926,23 @@ var GenerationRunner = class {
|
|
|
924892
924926
|
});
|
|
924893
924927
|
}
|
|
924894
924928
|
};
|
|
924929
|
+
async function runVerifyPipeline({ outputDir, generatorName, generatorVersion, cliVersion, runner, context: context3 }) {
|
|
924930
|
+
const pipelineLogger = {
|
|
924931
|
+
debug: (msg) => context3.logger.debug(msg),
|
|
924932
|
+
info: (msg) => context3.logger.info(msg),
|
|
924933
|
+
warn: (msg) => context3.logger.warn(msg),
|
|
924934
|
+
error: (msg) => context3.logger.error(msg)
|
|
924935
|
+
};
|
|
924936
|
+
const pipeline6 = new import_pipeline3.PostGenerationPipeline({
|
|
924937
|
+
outputDir,
|
|
924938
|
+
verify: { enabled: true, runner },
|
|
924939
|
+
cliVersion: cliVersion ?? "unknown",
|
|
924940
|
+
generatorVersions: { [generatorName]: generatorVersion },
|
|
924941
|
+
generatorName
|
|
924942
|
+
}, pipelineLogger);
|
|
924943
|
+
const pipelineResult = await pipeline6.run();
|
|
924944
|
+
assertVerifyPipelineSucceeded(pipelineResult, generatorName);
|
|
924945
|
+
}
|
|
924895
924946
|
|
|
924896
924947
|
// ../cli-v2/lib/sdk/generator/LegacyLocalGenerationRunner.js
|
|
924897
924948
|
init_lib5();
|
|
@@ -946485,7 +946536,7 @@ var CliContext = class _CliContext {
|
|
|
946485
946536
|
if (false) {
|
|
946486
946537
|
this.logger.error("CLI_VERSION is not defined");
|
|
946487
946538
|
}
|
|
946488
|
-
return "5.
|
|
946539
|
+
return "5.24.0";
|
|
946489
946540
|
}
|
|
946490
946541
|
getCliName() {
|
|
946491
946542
|
if (false) {
|
package/package.json
CHANGED