@fern-api/fern-api-dev 4.80.1 → 4.80.2
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 +7 -111
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -614282,7 +614282,7 @@ var AccessTokenPosthogManager = class {
|
|
|
614282
614282
|
properties: {
|
|
614283
614283
|
...event,
|
|
614284
614284
|
...event.properties,
|
|
614285
|
-
version: "4.80.
|
|
614285
|
+
version: "4.80.2",
|
|
614286
614286
|
usingAccessToken: true
|
|
614287
614287
|
}
|
|
614288
614288
|
});
|
|
@@ -614336,7 +614336,7 @@ var UserPosthogManager = class {
|
|
|
614336
614336
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
614337
614337
|
event: "CLI",
|
|
614338
614338
|
properties: {
|
|
614339
|
-
version: "4.80.
|
|
614339
|
+
version: "4.80.2",
|
|
614340
614340
|
...event,
|
|
614341
614341
|
...event.properties,
|
|
614342
614342
|
usingAccessToken: false,
|
|
@@ -831617,7 +831617,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
831617
831617
|
var LOGS_FOLDER_NAME = "logs";
|
|
831618
831618
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
831619
831619
|
function getCliSource() {
|
|
831620
|
-
const version7 = "4.80.
|
|
831620
|
+
const version7 = "4.80.2";
|
|
831621
831621
|
return `cli@${version7}`;
|
|
831622
831622
|
}
|
|
831623
831623
|
var DebugLogger = class {
|
|
@@ -843131,7 +843131,7 @@ var LegacyDocsPublisher = class {
|
|
|
843131
843131
|
previewId,
|
|
843132
843132
|
disableTemplates: void 0,
|
|
843133
843133
|
skipUpload,
|
|
843134
|
-
cliVersion: "4.80.
|
|
843134
|
+
cliVersion: "4.80.2"
|
|
843135
843135
|
});
|
|
843136
843136
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
843137
843137
|
return { success: false };
|
|
@@ -880541,6 +880541,7 @@ var Module_ = class _Module_ extends AstNode6 {
|
|
|
880541
880541
|
writer2.newLine();
|
|
880542
880542
|
}
|
|
880543
880543
|
});
|
|
880544
|
+
writer2.writeNewLineIfLastLineNot();
|
|
880544
880545
|
writer2.dedent();
|
|
880545
880546
|
writer2.write("end");
|
|
880546
880547
|
} else {
|
|
@@ -880982,11 +880983,7 @@ var TypeLiteral3 = class _TypeLiteral extends AstNode6 {
|
|
|
880982
880983
|
switch (this.internalType.type) {
|
|
880983
880984
|
case "str": {
|
|
880984
880985
|
const value2 = this.internalType.value.replaceAll("\r\n", "\n");
|
|
880985
|
-
|
|
880986
|
-
writer2.write(`'${value2}'`);
|
|
880987
|
-
} else {
|
|
880988
|
-
writer2.write(`"${value2.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`);
|
|
880989
|
-
}
|
|
880986
|
+
writer2.write(`"${value2.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`);
|
|
880990
880987
|
break;
|
|
880991
880988
|
}
|
|
880992
880989
|
case "int": {
|
|
@@ -918212,7 +918209,7 @@ var CliContext = class _CliContext {
|
|
|
918212
918209
|
if (false) {
|
|
918213
918210
|
this.logger.error("CLI_VERSION is not defined");
|
|
918214
918211
|
}
|
|
918215
|
-
return "4.80.
|
|
918212
|
+
return "4.80.2";
|
|
918216
918213
|
}
|
|
918217
918214
|
getCliName() {
|
|
918218
918215
|
if (false) {
|
|
@@ -919798,66 +919795,6 @@ async function addGeneratorToWorkspaces({
|
|
|
919798
919795
|
);
|
|
919799
919796
|
}
|
|
919800
919797
|
|
|
919801
|
-
// src/commands/generate/shouldSkipGenerator.ts
|
|
919802
|
-
function shouldSkipGenerator({
|
|
919803
|
-
generator,
|
|
919804
|
-
rootAutorelease
|
|
919805
|
-
}) {
|
|
919806
|
-
if (!generator.automation.generate) {
|
|
919807
|
-
return true;
|
|
919808
|
-
}
|
|
919809
|
-
if (generator.absolutePathToLocalOutput != null) {
|
|
919810
|
-
return true;
|
|
919811
|
-
}
|
|
919812
|
-
if (generator.raw?.autorelease === false) {
|
|
919813
|
-
return true;
|
|
919814
|
-
}
|
|
919815
|
-
if (generator.raw?.autorelease == null && rootAutorelease === false) {
|
|
919816
|
-
return true;
|
|
919817
|
-
}
|
|
919818
|
-
return false;
|
|
919819
|
-
}
|
|
919820
|
-
|
|
919821
|
-
// src/commands/automations/listGenerateCommands.ts
|
|
919822
|
-
function listGenerateCommands({
|
|
919823
|
-
workspaces,
|
|
919824
|
-
groupFilter,
|
|
919825
|
-
version: version7,
|
|
919826
|
-
autoMerge
|
|
919827
|
-
}) {
|
|
919828
|
-
const commands = [];
|
|
919829
|
-
for (const workspace of workspaces) {
|
|
919830
|
-
const generatorsConfiguration = workspace.generatorsConfiguration;
|
|
919831
|
-
const groups2 = generatorsConfiguration?.groups ?? [];
|
|
919832
|
-
const rootAutorelease = generatorsConfiguration?.rawConfiguration.autorelease;
|
|
919833
|
-
for (const group of groups2) {
|
|
919834
|
-
if (groupFilter != null && group.groupName !== groupFilter) {
|
|
919835
|
-
continue;
|
|
919836
|
-
}
|
|
919837
|
-
for (let i9 = 0; i9 < group.generators.length; i9++) {
|
|
919838
|
-
const generator = group.generators[i9];
|
|
919839
|
-
if (generator == null || shouldSkipGenerator({ generator, rootAutorelease })) {
|
|
919840
|
-
continue;
|
|
919841
|
-
}
|
|
919842
|
-
const parts = ["fern", "automations", "generate"];
|
|
919843
|
-
if (workspace.workspaceName != null) {
|
|
919844
|
-
parts.push("--api", workspace.workspaceName);
|
|
919845
|
-
}
|
|
919846
|
-
parts.push("--group", group.groupName);
|
|
919847
|
-
parts.push("--generator", String(i9));
|
|
919848
|
-
if (version7 != null) {
|
|
919849
|
-
parts.push("--version", version7);
|
|
919850
|
-
}
|
|
919851
|
-
if (autoMerge) {
|
|
919852
|
-
parts.push("--auto-merge");
|
|
919853
|
-
}
|
|
919854
|
-
commands.push(parts.join(" "));
|
|
919855
|
-
}
|
|
919856
|
-
}
|
|
919857
|
-
}
|
|
919858
|
-
return commands;
|
|
919859
|
-
}
|
|
919860
|
-
|
|
919861
919798
|
// src/commands/sdk-preview/overrideOutputForPreview.ts
|
|
919862
919799
|
var PREVIEW_REGISTRY_URL = process.env.FERN_PREVIEW_REGISTRY_URL ?? "https://npm.buildwithfern.com";
|
|
919863
919800
|
var SUPPORTED_TYPESCRIPT_GENERATORS = /* @__PURE__ */ new Set([
|
|
@@ -938733,52 +938670,11 @@ function addSdkCommand2(cli, cliContext) {
|
|
|
938733
938670
|
}
|
|
938734
938671
|
function addAutomationsCommand(cli, cliContext) {
|
|
938735
938672
|
cli.command("automations", false, (yargs) => {
|
|
938736
|
-
addAutomationsListCommand(yargs, cliContext);
|
|
938737
938673
|
addAutomationsGenerateCommand(yargs, cliContext);
|
|
938738
938674
|
addAutomationsPreviewCommand(yargs, cliContext);
|
|
938739
938675
|
return yargs.demandCommand();
|
|
938740
938676
|
});
|
|
938741
938677
|
}
|
|
938742
|
-
function addAutomationsListCommand(cli, cliContext) {
|
|
938743
|
-
cli.command("list", false, (yargs) => {
|
|
938744
|
-
addAutomationsListGenerateCommand(yargs, cliContext);
|
|
938745
|
-
return yargs.demandCommand();
|
|
938746
|
-
});
|
|
938747
|
-
}
|
|
938748
|
-
function addAutomationsListGenerateCommand(cli, cliContext) {
|
|
938749
|
-
cli.command(
|
|
938750
|
-
"generate",
|
|
938751
|
-
false,
|
|
938752
|
-
// hidden
|
|
938753
|
-
(yargs) => yargs.option("group", {
|
|
938754
|
-
type: "string",
|
|
938755
|
-
description: "Filter to a specific generator group (e.g. 'sdk'). Omit to list all groups."
|
|
938756
|
-
}).option("api", {
|
|
938757
|
-
type: "string",
|
|
938758
|
-
description: "Filter to a specific API in a multi-API repo (e.g. 'foo' for fern/apis/foo/). Omit to list all APIs."
|
|
938759
|
-
}).option("version", {
|
|
938760
|
-
type: "string",
|
|
938761
|
-
description: "Version string to include in generated commands (e.g. 'AUTO' for AI-based versioning)"
|
|
938762
|
-
}).option("auto-merge", {
|
|
938763
|
-
boolean: true,
|
|
938764
|
-
default: false,
|
|
938765
|
-
description: "Include --auto-merge flag in generated commands"
|
|
938766
|
-
}),
|
|
938767
|
-
async (argv) => {
|
|
938768
|
-
const project = await loadProjectAndRegisterWorkspacesWithContext(cliContext, {
|
|
938769
|
-
commandLineApiWorkspace: argv.api,
|
|
938770
|
-
defaultToAllApiWorkspaces: true
|
|
938771
|
-
});
|
|
938772
|
-
const commands = listGenerateCommands({
|
|
938773
|
-
workspaces: project.apiWorkspaces,
|
|
938774
|
-
groupFilter: argv.group,
|
|
938775
|
-
version: argv.version,
|
|
938776
|
-
autoMerge: argv["auto-merge"]
|
|
938777
|
-
});
|
|
938778
|
-
process.stdout.write(JSON.stringify(commands));
|
|
938779
|
-
}
|
|
938780
|
-
);
|
|
938781
|
-
}
|
|
938782
938678
|
function addAutomationsPreviewCommand(cli, cliContext) {
|
|
938783
938679
|
cli.command(
|
|
938784
938680
|
"preview",
|
package/package.json
CHANGED