@fern-api/fern-api-dev 5.53.0 → 5.54.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 +44 -29
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -101543,46 +101543,56 @@ function getRegistryInfoFromPublishOutputMode(publishOutputMode) {
|
|
|
101543
101543
|
}
|
|
101544
101544
|
}
|
|
101545
101545
|
async function getExistingVersion({ packageName, language, githubRepository, registryInfo }) {
|
|
101546
|
-
|
|
101546
|
+
const candidates = [];
|
|
101547
101547
|
switch (language) {
|
|
101548
101548
|
case "typescript":
|
|
101549
|
-
|
|
101549
|
+
candidates.push(await getLatestVersionFromNpm(packageName, registryInfo));
|
|
101550
101550
|
break;
|
|
101551
101551
|
case "python":
|
|
101552
|
-
|
|
101552
|
+
candidates.push(await getLatestVersionFromPypi(packageName, registryInfo));
|
|
101553
101553
|
break;
|
|
101554
101554
|
case "java":
|
|
101555
|
-
|
|
101555
|
+
candidates.push(await getLatestVersionFromMaven(packageName, registryInfo));
|
|
101556
101556
|
break;
|
|
101557
101557
|
case "csharp":
|
|
101558
|
-
|
|
101558
|
+
candidates.push(await getLatestVersionFromNuget(packageName, registryInfo));
|
|
101559
101559
|
break;
|
|
101560
101560
|
case "ruby":
|
|
101561
|
-
|
|
101561
|
+
candidates.push(await getLatestVersionFromRubyGems(packageName, registryInfo));
|
|
101562
101562
|
break;
|
|
101563
101563
|
case "go":
|
|
101564
|
-
|
|
101564
|
+
candidates.push(await getLatestVersionFromGoProxy(packageName, registryInfo));
|
|
101565
101565
|
break;
|
|
101566
101566
|
case "rust":
|
|
101567
|
-
|
|
101567
|
+
candidates.push(await getLatestVersionFromCrates(packageName, registryInfo));
|
|
101568
101568
|
break;
|
|
101569
101569
|
case "php":
|
|
101570
101570
|
case "swift":
|
|
101571
101571
|
break;
|
|
101572
101572
|
}
|
|
101573
|
-
if (version7 != null) {
|
|
101574
|
-
return version7;
|
|
101575
|
-
}
|
|
101576
101573
|
if (githubRepository != null) {
|
|
101577
|
-
|
|
101574
|
+
candidates.push(await getLatestRelease2(githubRepository));
|
|
101575
|
+
candidates.push(await getVersionFromMetadataJson(githubRepository));
|
|
101578
101576
|
}
|
|
101579
|
-
|
|
101580
|
-
|
|
101581
|
-
|
|
101582
|
-
|
|
101583
|
-
|
|
101577
|
+
return selectHighestVersion(candidates);
|
|
101578
|
+
}
|
|
101579
|
+
function selectHighestVersion(candidates) {
|
|
101580
|
+
let highest = void 0;
|
|
101581
|
+
let highestParsed = void 0;
|
|
101582
|
+
for (const candidate of candidates) {
|
|
101583
|
+
if (candidate == null) {
|
|
101584
|
+
continue;
|
|
101585
|
+
}
|
|
101586
|
+
const parsed = import_semver8.default.parse(candidate, { loose: true });
|
|
101587
|
+
if (parsed == null) {
|
|
101588
|
+
continue;
|
|
101589
|
+
}
|
|
101590
|
+
if (highestParsed == null || import_semver8.default.gt(parsed, highestParsed)) {
|
|
101591
|
+
highest = candidate;
|
|
101592
|
+
highestParsed = parsed;
|
|
101593
|
+
}
|
|
101584
101594
|
}
|
|
101585
|
-
return
|
|
101595
|
+
return highest;
|
|
101586
101596
|
}
|
|
101587
101597
|
function resolveNpmRegistryUrl(registryInfo) {
|
|
101588
101598
|
if (registryInfo.registryUrl != null && registryInfo.registryUrl !== "") {
|
|
@@ -686783,7 +686793,7 @@ var AccessTokenPosthogManager = class {
|
|
|
686783
686793
|
properties: {
|
|
686784
686794
|
...event,
|
|
686785
686795
|
...event.properties,
|
|
686786
|
-
version: "5.
|
|
686796
|
+
version: "5.54.0",
|
|
686787
686797
|
usingAccessToken: true,
|
|
686788
686798
|
...getRunIdProperties()
|
|
686789
686799
|
}
|
|
@@ -686849,7 +686859,7 @@ var UserPosthogManager = class {
|
|
|
686849
686859
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
686850
686860
|
event: "CLI",
|
|
686851
686861
|
properties: {
|
|
686852
|
-
version: "5.
|
|
686862
|
+
version: "5.54.0",
|
|
686853
686863
|
...event,
|
|
686854
686864
|
...event.properties,
|
|
686855
686865
|
usingAccessToken: false,
|
|
@@ -867943,7 +867953,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
867943
867953
|
var LOGS_FOLDER_NAME = "logs";
|
|
867944
867954
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
867945
867955
|
function getCliSource() {
|
|
867946
|
-
const version7 = "5.
|
|
867956
|
+
const version7 = "5.54.0";
|
|
867947
867957
|
return `cli@${version7}`;
|
|
867948
867958
|
}
|
|
867949
867959
|
var DebugLogger = class {
|
|
@@ -900262,7 +900272,7 @@ var LegacyDocsPublisher = class {
|
|
|
900262
900272
|
previewId,
|
|
900263
900273
|
disableTemplates: void 0,
|
|
900264
900274
|
skipUpload,
|
|
900265
|
-
cliVersion: "5.
|
|
900275
|
+
cliVersion: "5.54.0",
|
|
900266
900276
|
loginCommand: "fern auth login"
|
|
900267
900277
|
});
|
|
900268
900278
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -952626,11 +952636,16 @@ function getGithubPublishConfig(githubPublishInfo) {
|
|
|
952626
952636
|
apiKeyEnvironmentVariable: (0, import_api50.EnvironmentVariable)(value2.apiKey ?? ""),
|
|
952627
952637
|
workspaceIdEnvironmentVariable: (0, import_api50.EnvironmentVariable)(value2.workspaceId ?? "")
|
|
952628
952638
|
}),
|
|
952629
|
-
nuget: (value2) =>
|
|
952630
|
-
|
|
952631
|
-
|
|
952632
|
-
|
|
952633
|
-
|
|
952639
|
+
nuget: (value2) => {
|
|
952640
|
+
const apiKey = (value2.apiKey ?? "").trim();
|
|
952641
|
+
const useOidc = apiKey === "<USE_OIDC>" || apiKey === "OIDC";
|
|
952642
|
+
return import_generator_exec_sdk.FernGeneratorExec.GithubPublishInfo.nuget({
|
|
952643
|
+
registryUrl: value2.registryUrl,
|
|
952644
|
+
packageName: value2.packageName,
|
|
952645
|
+
apiKeyEnvironmentVariable: (0, import_api50.EnvironmentVariable)(useOidc ? "<USE_OIDC>" : apiKey.startsWith("${") && apiKey.endsWith("}") ? apiKey.slice(2, -1).trim() : ""),
|
|
952646
|
+
shouldGeneratePublishWorkflow: useOidc ? true : void 0
|
|
952647
|
+
});
|
|
952648
|
+
},
|
|
952634
952649
|
crates: (value2) => import_generator_exec_sdk.FernGeneratorExec.GithubPublishInfo.crates({
|
|
952635
952650
|
registryUrl: value2.registryUrl,
|
|
952636
952651
|
packageName: value2.packageName,
|
|
@@ -966453,7 +966468,7 @@ function getAutomationContextFromEnv() {
|
|
|
966453
966468
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
966454
966469
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
966455
966470
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
966456
|
-
cli_version: "5.
|
|
966471
|
+
cli_version: "5.54.0"
|
|
966457
966472
|
};
|
|
966458
966473
|
}
|
|
966459
966474
|
function isAutomationMode() {
|
|
@@ -967285,7 +967300,7 @@ var CliContext = class _CliContext {
|
|
|
967285
967300
|
if (false) {
|
|
967286
967301
|
this.logger.error("CLI_VERSION is not defined");
|
|
967287
967302
|
}
|
|
967288
|
-
return "5.
|
|
967303
|
+
return "5.54.0";
|
|
967289
967304
|
}
|
|
967290
967305
|
getCliName() {
|
|
967291
967306
|
if (false) {
|
package/package.json
CHANGED