@fern-api/fern-api-dev 4.46.1-1-gccc0e5ef7b7 → 4.46.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 +31 -5
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -481423,6 +481423,32 @@ async function getLatestVersionFromRubyGems(packageName, registryInfo = { regist
|
|
|
481423
481423
|
}
|
|
481424
481424
|
}
|
|
481425
481425
|
async function getLatestVersionFromGoProxy(modulePath, _registryInfo = { registryUrl: void 0, token: void 0, username: void 0 }) {
|
|
481426
|
+
try {
|
|
481427
|
+
if (/\/v\d+$/.test(modulePath)) {
|
|
481428
|
+
return await fetchGoProxyVersion(modulePath);
|
|
481429
|
+
}
|
|
481430
|
+
const MAX_MAJOR_VERSION_PROBE = 10;
|
|
481431
|
+
const probes = [];
|
|
481432
|
+
probes.push(fetchGoProxyVersion(modulePath).then((version7) => ({ version: version7, major: 0 })));
|
|
481433
|
+
for (let major2 = 2; major2 <= MAX_MAJOR_VERSION_PROBE; major2++) {
|
|
481434
|
+
probes.push(fetchGoProxyVersion(`${modulePath}/v${major2}`).then((version7) => ({ version: version7, major: major2 })));
|
|
481435
|
+
}
|
|
481436
|
+
const results = await Promise.all(probes);
|
|
481437
|
+
let bestVersion;
|
|
481438
|
+
for (const result of results) {
|
|
481439
|
+
if (result.version == null) {
|
|
481440
|
+
continue;
|
|
481441
|
+
}
|
|
481442
|
+
if (bestVersion == null || import_semver4.default.gt(result.version, bestVersion)) {
|
|
481443
|
+
bestVersion = result.version;
|
|
481444
|
+
}
|
|
481445
|
+
}
|
|
481446
|
+
return bestVersion;
|
|
481447
|
+
} catch (error50) {
|
|
481448
|
+
return void 0;
|
|
481449
|
+
}
|
|
481450
|
+
}
|
|
481451
|
+
async function fetchGoProxyVersion(modulePath) {
|
|
481426
481452
|
try {
|
|
481427
481453
|
const encodedPath = modulePath.replace(/[A-Z]/g, (c16) => "!" + c16.toLowerCase());
|
|
481428
481454
|
const response = await fetch(`${DEFAULT_GO_PROXY_URL}/${encodedPath}/@latest`);
|
|
@@ -601735,7 +601761,7 @@ var AccessTokenPosthogManager = class {
|
|
|
601735
601761
|
properties: {
|
|
601736
601762
|
...event,
|
|
601737
601763
|
...event.properties,
|
|
601738
|
-
version: "4.46.
|
|
601764
|
+
version: "4.46.2",
|
|
601739
601765
|
usingAccessToken: true
|
|
601740
601766
|
}
|
|
601741
601767
|
});
|
|
@@ -601786,7 +601812,7 @@ var UserPosthogManager = class {
|
|
|
601786
601812
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
601787
601813
|
event: "CLI",
|
|
601788
601814
|
properties: {
|
|
601789
|
-
version: "4.46.
|
|
601815
|
+
version: "4.46.2",
|
|
601790
601816
|
...event,
|
|
601791
601817
|
...event.properties,
|
|
601792
601818
|
usingAccessToken: false,
|
|
@@ -825640,7 +825666,7 @@ var import_path54 = __toESM(require("path"), 1);
|
|
|
825640
825666
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
825641
825667
|
var LOGS_FOLDER_NAME = "logs";
|
|
825642
825668
|
function getCliSource() {
|
|
825643
|
-
const version7 = "4.46.
|
|
825669
|
+
const version7 = "4.46.2";
|
|
825644
825670
|
return `cli@${version7}`;
|
|
825645
825671
|
}
|
|
825646
825672
|
var DebugLogger = class {
|
|
@@ -836607,7 +836633,7 @@ var LegacyDocsPublisher = class {
|
|
|
836607
836633
|
previewId: void 0,
|
|
836608
836634
|
disableTemplates: void 0,
|
|
836609
836635
|
skipUpload,
|
|
836610
|
-
cliVersion: "4.46.
|
|
836636
|
+
cliVersion: "4.46.2"
|
|
836611
836637
|
});
|
|
836612
836638
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
836613
836639
|
return { success: false };
|
|
@@ -909457,7 +909483,7 @@ var CliContext = class {
|
|
|
909457
909483
|
if (false) {
|
|
909458
909484
|
this.logger.error("CLI_VERSION is not defined");
|
|
909459
909485
|
}
|
|
909460
|
-
return "4.46.
|
|
909486
|
+
return "4.46.2";
|
|
909461
909487
|
}
|
|
909462
909488
|
getCliName() {
|
|
909463
909489
|
if (false) {
|
package/package.json
CHANGED