@fern-api/fern-api-dev 5.27.1 → 5.27.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 +66 -37
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -25319,7 +25319,17 @@ function errnoCode(error50) {
|
|
|
25319
25319
|
return void 0;
|
|
25320
25320
|
}
|
|
25321
25321
|
const code5 = error50.code;
|
|
25322
|
-
|
|
25322
|
+
if (typeof code5 === "string") {
|
|
25323
|
+
return code5;
|
|
25324
|
+
}
|
|
25325
|
+
const cause = error50.cause;
|
|
25326
|
+
if (cause instanceof Error) {
|
|
25327
|
+
const causeCode = cause.code;
|
|
25328
|
+
if (typeof causeCode === "string") {
|
|
25329
|
+
return causeCode;
|
|
25330
|
+
}
|
|
25331
|
+
}
|
|
25332
|
+
return void 0;
|
|
25323
25333
|
}
|
|
25324
25334
|
function resolveErrorCode(error50, explicitCode) {
|
|
25325
25335
|
if (explicitCode != null) {
|
|
@@ -25433,7 +25443,9 @@ var init_CliError = __esm({
|
|
|
25433
25443
|
"EMFILE",
|
|
25434
25444
|
"ENFILE",
|
|
25435
25445
|
"EBUSY",
|
|
25436
|
-
"EADDRINUSE"
|
|
25446
|
+
"EADDRINUSE",
|
|
25447
|
+
"ENOTEMPTY",
|
|
25448
|
+
"ENOMEM"
|
|
25437
25449
|
]);
|
|
25438
25450
|
NETWORK_ERRNOS = /* @__PURE__ */ new Set([
|
|
25439
25451
|
"ENOTFOUND",
|
|
@@ -667931,7 +667943,7 @@ var AccessTokenPosthogManager = class {
|
|
|
667931
667943
|
properties: {
|
|
667932
667944
|
...event,
|
|
667933
667945
|
...event.properties,
|
|
667934
|
-
version: "5.27.
|
|
667946
|
+
version: "5.27.2",
|
|
667935
667947
|
usingAccessToken: true,
|
|
667936
667948
|
...getRunIdProperties()
|
|
667937
667949
|
}
|
|
@@ -667995,7 +668007,7 @@ var UserPosthogManager = class {
|
|
|
667995
668007
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
667996
668008
|
event: "CLI",
|
|
667997
668009
|
properties: {
|
|
667998
|
-
version: "5.27.
|
|
668010
|
+
version: "5.27.2",
|
|
667999
668011
|
...event,
|
|
668000
668012
|
...event.properties,
|
|
668001
668013
|
usingAccessToken: false,
|
|
@@ -859567,7 +859579,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
859567
859579
|
var LOGS_FOLDER_NAME = "logs";
|
|
859568
859580
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
859569
859581
|
function getCliSource() {
|
|
859570
|
-
const version7 = "5.27.
|
|
859582
|
+
const version7 = "5.27.2";
|
|
859571
859583
|
return `cli@${version7}`;
|
|
859572
859584
|
}
|
|
859573
859585
|
var DebugLogger = class {
|
|
@@ -871673,13 +871685,22 @@ var SourceUploader = class {
|
|
|
871673
871685
|
async uploadSource(source2, uploadURL) {
|
|
871674
871686
|
const uploadCommand = await this.getUploadCommand(source2);
|
|
871675
871687
|
const fileData = await (0, import_promises100.readFile)(uploadCommand.absoluteFilePath);
|
|
871676
|
-
|
|
871677
|
-
|
|
871678
|
-
|
|
871679
|
-
|
|
871680
|
-
|
|
871681
|
-
|
|
871682
|
-
|
|
871688
|
+
let response;
|
|
871689
|
+
try {
|
|
871690
|
+
response = await fetch(uploadURL, {
|
|
871691
|
+
method: "PUT",
|
|
871692
|
+
body: fileData,
|
|
871693
|
+
headers: {
|
|
871694
|
+
"Content-Type": "application/octet-stream"
|
|
871695
|
+
}
|
|
871696
|
+
});
|
|
871697
|
+
} catch (error50) {
|
|
871698
|
+
await uploadCommand.cleanup();
|
|
871699
|
+
this.context.failAndThrow(`Network error uploading source file: ${source2.absoluteFilePath}`, error50, {
|
|
871700
|
+
code: CliError.Code.NetworkError
|
|
871701
|
+
});
|
|
871702
|
+
return;
|
|
871703
|
+
}
|
|
871683
871704
|
await uploadCommand.cleanup();
|
|
871684
871705
|
if (!response.ok) {
|
|
871685
871706
|
this.context.failAndThrow(`Failed to upload source file: ${source2.absoluteFilePath}. Status: ${response.status}, ${response.statusText}`, void 0, { code: CliError.Code.NetworkError });
|
|
@@ -872075,18 +872096,22 @@ async function uploadDynamicIRForSdkGeneration({ fdr, organization, version: ver
|
|
|
872075
872096
|
generatorConfig: dynamicGeneratorConfig
|
|
872076
872097
|
});
|
|
872077
872098
|
const dynamicIRJson = JSON.stringify(dynamicIR);
|
|
872078
|
-
|
|
872079
|
-
|
|
872080
|
-
|
|
872081
|
-
|
|
872082
|
-
|
|
872083
|
-
|
|
872099
|
+
try {
|
|
872100
|
+
const uploadResponse = await fetch(uploadUrl, {
|
|
872101
|
+
method: "PUT",
|
|
872102
|
+
body: dynamicIRJson,
|
|
872103
|
+
headers: {
|
|
872104
|
+
"Content-Type": "application/octet-stream",
|
|
872105
|
+
"Content-Length": dynamicIRJson.length.toString()
|
|
872106
|
+
}
|
|
872107
|
+
});
|
|
872108
|
+
if (uploadResponse.ok) {
|
|
872109
|
+
context3.logger.debug(`Uploaded dynamic IR for ${language}:${packageName} (${version7})`);
|
|
872110
|
+
} else {
|
|
872111
|
+
context3.logger.warn(`Failed to upload dynamic IR for ${language}: ${uploadResponse.status}`);
|
|
872084
872112
|
}
|
|
872085
|
-
})
|
|
872086
|
-
|
|
872087
|
-
context3.logger.debug(`Uploaded dynamic IR for ${language}:${packageName} (${version7})`);
|
|
872088
|
-
} else {
|
|
872089
|
-
context3.logger.warn(`Failed to upload dynamic IR for ${language}: ${uploadResponse.status}`);
|
|
872113
|
+
} catch (error50) {
|
|
872114
|
+
context3.logger.warn(`Network error uploading dynamic IR for ${language}: ${error50}`);
|
|
872090
872115
|
}
|
|
872091
872116
|
}
|
|
872092
872117
|
function resolveVersionFallback(resolvedVersion) {
|
|
@@ -873337,18 +873362,22 @@ async function uploadDynamicIRs({ dynamicIRs, dynamicIRUploadUrls, context: cont
|
|
|
873337
873362
|
const dynamicIR = dynamicIRs[language]?.dynamicIR;
|
|
873338
873363
|
if (dynamicIR) {
|
|
873339
873364
|
const jsonBody = JSON.stringify(dynamicIR);
|
|
873340
|
-
|
|
873341
|
-
|
|
873342
|
-
|
|
873343
|
-
|
|
873344
|
-
|
|
873345
|
-
|
|
873365
|
+
try {
|
|
873366
|
+
const response = await fetch(source2.uploadUrl, {
|
|
873367
|
+
method: "PUT",
|
|
873368
|
+
body: jsonBody,
|
|
873369
|
+
headers: {
|
|
873370
|
+
"Content-Type": "application/octet-stream",
|
|
873371
|
+
"Content-Length": Buffer.byteLength(jsonBody, "utf8").toString()
|
|
873372
|
+
}
|
|
873373
|
+
});
|
|
873374
|
+
if (response.ok) {
|
|
873375
|
+
context3.logger.debug(`Uploaded dynamic IR for ${apiId}:${language}`);
|
|
873376
|
+
} else {
|
|
873377
|
+
context3.logger.warn(`Failed to upload dynamic IR for ${apiId}:${language}`);
|
|
873346
873378
|
}
|
|
873347
|
-
})
|
|
873348
|
-
|
|
873349
|
-
context3.logger.debug(`Uploaded dynamic IR for ${apiId}:${language}`);
|
|
873350
|
-
} else {
|
|
873351
|
-
context3.logger.warn(`Failed to upload dynamic IR for ${apiId}:${language}`);
|
|
873379
|
+
} catch (error50) {
|
|
873380
|
+
context3.logger.warn(`Network error uploading dynamic IR for ${apiId}:${language}: ${error50}`);
|
|
873352
873381
|
}
|
|
873353
873382
|
} else {
|
|
873354
873383
|
context3.logger.warn(`Could not find matching dynamic IR to upload for ${apiId}:${language}`);
|
|
@@ -873540,7 +873569,7 @@ var LegacyDocsPublisher = class {
|
|
|
873540
873569
|
previewId,
|
|
873541
873570
|
disableTemplates: void 0,
|
|
873542
873571
|
skipUpload,
|
|
873543
|
-
cliVersion: "5.27.
|
|
873572
|
+
cliVersion: "5.27.2",
|
|
873544
873573
|
loginCommand: "fern auth login"
|
|
873545
873574
|
});
|
|
873546
873575
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -947945,7 +947974,7 @@ function getAutomationContextFromEnv() {
|
|
|
947945
947974
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
947946
947975
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
947947
947976
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
947948
|
-
cli_version: "5.27.
|
|
947977
|
+
cli_version: "5.27.2"
|
|
947949
947978
|
};
|
|
947950
947979
|
}
|
|
947951
947980
|
function isAutomationMode() {
|
|
@@ -948771,7 +948800,7 @@ var CliContext = class _CliContext {
|
|
|
948771
948800
|
if (false) {
|
|
948772
948801
|
this.logger.error("CLI_VERSION is not defined");
|
|
948773
948802
|
}
|
|
948774
|
-
return "5.27.
|
|
948803
|
+
return "5.27.2";
|
|
948775
948804
|
}
|
|
948776
948805
|
getCliName() {
|
|
948777
948806
|
if (false) {
|
package/package.json
CHANGED