@fern-api/fern-api-dev 5.101.0 → 5.101.1
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 +262 -230
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -4221,8 +4221,8 @@ function hrTimeDuration(startTime, endTime) {
|
|
|
4221
4221
|
}
|
|
4222
4222
|
function hrTimeToTimeStamp(time3) {
|
|
4223
4223
|
const precision = NANOSECOND_DIGITS;
|
|
4224
|
-
const
|
|
4225
|
-
const nanoString =
|
|
4224
|
+
const tmp22 = `${"0".repeat(precision)}${time3[1]}Z`;
|
|
4225
|
+
const nanoString = tmp22.substring(tmp22.length - precision - 1);
|
|
4226
4226
|
const date26 = new Date(time3[0] * 1e3).toISOString();
|
|
4227
4227
|
return date26.replace("000Z", nanoString);
|
|
4228
4228
|
}
|
|
@@ -20655,15 +20655,15 @@ var init_cliui = __esm({
|
|
|
20655
20655
|
// ../../../node_modules/.pnpm/escalade@3.2.0/node_modules/escalade/sync/index.mjs
|
|
20656
20656
|
function sync_default(start2, callback) {
|
|
20657
20657
|
let dir = (0, import_path5.resolve)(".", start2);
|
|
20658
|
-
let
|
|
20658
|
+
let tmp22, stats = (0, import_fs4.statSync)(dir);
|
|
20659
20659
|
if (!stats.isDirectory()) {
|
|
20660
20660
|
dir = (0, import_path5.dirname)(dir);
|
|
20661
20661
|
}
|
|
20662
20662
|
while (true) {
|
|
20663
|
-
|
|
20664
|
-
if (
|
|
20665
|
-
dir = (0, import_path5.dirname)(
|
|
20666
|
-
if (
|
|
20663
|
+
tmp22 = callback(dir, (0, import_fs4.readdirSync)(dir));
|
|
20664
|
+
if (tmp22) return (0, import_path5.resolve)(dir, tmp22);
|
|
20665
|
+
dir = (0, import_path5.dirname)(tmp22 = dir);
|
|
20666
|
+
if (tmp22 === dir) break;
|
|
20667
20667
|
}
|
|
20668
20668
|
}
|
|
20669
20669
|
var import_path5, import_fs4;
|
|
@@ -27273,16 +27273,16 @@ var init_index_node_esm = __esm({
|
|
|
27273
27273
|
for (let t3 = 0; t3 < ret.length; t3++) {
|
|
27274
27274
|
const rett = ret[t3];
|
|
27275
27275
|
if (rett && rett.isParentSelector) {
|
|
27276
|
-
const
|
|
27277
|
-
if (Array.isArray(
|
|
27278
|
-
ret[t3] =
|
|
27279
|
-
const tl =
|
|
27276
|
+
const tmp22 = this._trace(rett.expr, val, rett.path, parent, parentPropName, callback, hasArrExpr);
|
|
27277
|
+
if (Array.isArray(tmp22)) {
|
|
27278
|
+
ret[t3] = tmp22[0];
|
|
27279
|
+
const tl = tmp22.length;
|
|
27280
27280
|
for (let tt3 = 1; tt3 < tl; tt3++) {
|
|
27281
27281
|
t3++;
|
|
27282
|
-
ret.splice(t3, 0,
|
|
27282
|
+
ret.splice(t3, 0, tmp22[tt3]);
|
|
27283
27283
|
}
|
|
27284
27284
|
} else {
|
|
27285
|
-
ret[t3] =
|
|
27285
|
+
ret[t3] = tmp22;
|
|
27286
27286
|
}
|
|
27287
27287
|
}
|
|
27288
27288
|
}
|
|
@@ -27311,8 +27311,8 @@ var init_index_node_esm = __esm({
|
|
|
27311
27311
|
end = end < 0 ? Math.max(0, end + len) : Math.min(len, end);
|
|
27312
27312
|
const ret = [];
|
|
27313
27313
|
for (let i5 = start2; i5 < end; i5 += step) {
|
|
27314
|
-
const
|
|
27315
|
-
|
|
27314
|
+
const tmp22 = this._trace(unshift(i5, expr), val, path122, parent, parentPropName, callback, true);
|
|
27315
|
+
tmp22.forEach((t3) => {
|
|
27316
27316
|
ret.push(t3);
|
|
27317
27317
|
});
|
|
27318
27318
|
}
|
|
@@ -53807,10 +53807,10 @@ var require_tmp_promise = __commonJS({
|
|
|
53807
53807
|
"../../../node_modules/.pnpm/tmp-promise@3.0.3/node_modules/tmp-promise/index.js"(exports2, module4) {
|
|
53808
53808
|
"use strict";
|
|
53809
53809
|
var { promisify: promisify14 } = require("util");
|
|
53810
|
-
var
|
|
53811
|
-
module4.exports.fileSync =
|
|
53810
|
+
var tmp22 = require_tmp();
|
|
53811
|
+
module4.exports.fileSync = tmp22.fileSync;
|
|
53812
53812
|
var fileWithOptions = promisify14(
|
|
53813
|
-
(options2, cb) =>
|
|
53813
|
+
(options2, cb) => tmp22.file(
|
|
53814
53814
|
options2,
|
|
53815
53815
|
(err, path122, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path122, fd, cleanup: promisify14(cleanup) })
|
|
53816
53816
|
)
|
|
@@ -53824,9 +53824,9 @@ var require_tmp_promise = __commonJS({
|
|
|
53824
53824
|
await cleanup();
|
|
53825
53825
|
}
|
|
53826
53826
|
};
|
|
53827
|
-
module4.exports.dirSync =
|
|
53827
|
+
module4.exports.dirSync = tmp22.dirSync;
|
|
53828
53828
|
var dirWithOptions = promisify14(
|
|
53829
|
-
(options2, cb) =>
|
|
53829
|
+
(options2, cb) => tmp22.dir(
|
|
53830
53830
|
options2,
|
|
53831
53831
|
(err, path122, cleanup) => err ? cb(err) : cb(void 0, { path: path122, cleanup: promisify14(cleanup) })
|
|
53832
53832
|
)
|
|
@@ -53840,10 +53840,10 @@ var require_tmp_promise = __commonJS({
|
|
|
53840
53840
|
await cleanup();
|
|
53841
53841
|
}
|
|
53842
53842
|
};
|
|
53843
|
-
module4.exports.tmpNameSync =
|
|
53844
|
-
module4.exports.tmpName = promisify14(
|
|
53845
|
-
module4.exports.tmpdir =
|
|
53846
|
-
module4.exports.setGracefulCleanup =
|
|
53843
|
+
module4.exports.tmpNameSync = tmp22.tmpNameSync;
|
|
53844
|
+
module4.exports.tmpName = promisify14(tmp22.tmpName);
|
|
53845
|
+
module4.exports.tmpdir = tmp22.tmpdir;
|
|
53846
|
+
module4.exports.setGracefulCleanup = tmp22.setGracefulCleanup;
|
|
53847
53847
|
}
|
|
53848
53848
|
});
|
|
53849
53849
|
|
|
@@ -90966,23 +90966,23 @@ function getValues(context3, operator2, key2, modifier) {
|
|
|
90966
90966
|
});
|
|
90967
90967
|
}
|
|
90968
90968
|
} else {
|
|
90969
|
-
const
|
|
90969
|
+
const tmp22 = [];
|
|
90970
90970
|
if (Array.isArray(value2)) {
|
|
90971
90971
|
value2.filter(isDefined).forEach(function(value22) {
|
|
90972
|
-
|
|
90972
|
+
tmp22.push(encodeValue(operator2, value22));
|
|
90973
90973
|
});
|
|
90974
90974
|
} else {
|
|
90975
90975
|
Object.keys(value2).forEach(function(k4) {
|
|
90976
90976
|
if (isDefined(value2[k4])) {
|
|
90977
|
-
|
|
90978
|
-
|
|
90977
|
+
tmp22.push(encodeUnreserved(k4));
|
|
90978
|
+
tmp22.push(encodeValue(operator2, value2[k4].toString()));
|
|
90979
90979
|
}
|
|
90980
90980
|
});
|
|
90981
90981
|
}
|
|
90982
90982
|
if (isKeyOperator(operator2)) {
|
|
90983
|
-
result.push(encodeUnreserved(key2) + "=" +
|
|
90984
|
-
} else if (
|
|
90985
|
-
result.push(
|
|
90983
|
+
result.push(encodeUnreserved(key2) + "=" + tmp22.join(","));
|
|
90984
|
+
} else if (tmp22.length !== 0) {
|
|
90985
|
+
result.push(tmp22.join(","));
|
|
90986
90986
|
}
|
|
90987
90987
|
}
|
|
90988
90988
|
}
|
|
@@ -91017,8 +91017,8 @@ function expand2(template, context3) {
|
|
|
91017
91017
|
expression = expression.substr(1);
|
|
91018
91018
|
}
|
|
91019
91019
|
expression.split(/,/g).forEach(function(variable3) {
|
|
91020
|
-
var
|
|
91021
|
-
values2.push(getValues(context3, operator2,
|
|
91020
|
+
var tmp22 = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable3);
|
|
91021
|
+
values2.push(getValues(context3, operator2, tmp22[1], tmp22[2] || tmp22[3]));
|
|
91022
91022
|
});
|
|
91023
91023
|
if (operator2 && operator2 !== "+") {
|
|
91024
91024
|
var separator = ",";
|
|
@@ -100657,7 +100657,7 @@ var require_polyfills = __commonJS({
|
|
|
100657
100657
|
}
|
|
100658
100658
|
if (platform4 === "win32") {
|
|
100659
100659
|
fs34.rename = typeof fs34.rename !== "function" ? fs34.rename : (function(fs$rename) {
|
|
100660
|
-
function
|
|
100660
|
+
function rename9(from4, to2, cb) {
|
|
100661
100661
|
var start2 = Date.now();
|
|
100662
100662
|
var backoff = 0;
|
|
100663
100663
|
fs$rename(from4, to2, function CB(er3) {
|
|
@@ -100677,8 +100677,8 @@ var require_polyfills = __commonJS({
|
|
|
100677
100677
|
if (cb) cb(er3);
|
|
100678
100678
|
});
|
|
100679
100679
|
}
|
|
100680
|
-
if (Object.setPrototypeOf) Object.setPrototypeOf(
|
|
100681
|
-
return
|
|
100680
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(rename9, fs$rename);
|
|
100681
|
+
return rename9;
|
|
100682
100682
|
})(fs34.rename);
|
|
100683
100683
|
}
|
|
100684
100684
|
fs34.read = typeof fs34.read !== "function" ? fs34.read : (function(fs$read) {
|
|
@@ -150585,7 +150585,7 @@ var init_js_yaml = __esm({
|
|
|
150585
150585
|
function readDoubleQuotedScalar(state, nodeIndent) {
|
|
150586
150586
|
let captureStart;
|
|
150587
150587
|
let captureEnd;
|
|
150588
|
-
let
|
|
150588
|
+
let tmp22;
|
|
150589
150589
|
let ch2 = state.input.charCodeAt(state.position);
|
|
150590
150590
|
if (ch2 !== 34) return false;
|
|
150591
150591
|
state.kind = "scalar";
|
|
@@ -150603,12 +150603,12 @@ var init_js_yaml = __esm({
|
|
|
150603
150603
|
else if (ch2 < 256 && simpleEscapeCheck[ch2]) {
|
|
150604
150604
|
state.result += simpleEscapeMap[ch2];
|
|
150605
150605
|
state.position++;
|
|
150606
|
-
} else if ((
|
|
150607
|
-
let hexLength =
|
|
150606
|
+
} else if ((tmp22 = escapedHexLen(ch2)) > 0) {
|
|
150607
|
+
let hexLength = tmp22;
|
|
150608
150608
|
let hexResult = 0;
|
|
150609
150609
|
for (; hexLength > 0; hexLength--) {
|
|
150610
150610
|
ch2 = state.input.charCodeAt(++state.position);
|
|
150611
|
-
if ((
|
|
150611
|
+
if ((tmp22 = fromHexCode(ch2)) >= 0) hexResult = (hexResult << 4) + tmp22;
|
|
150612
150612
|
else throwError(state, "expected hexadecimal character");
|
|
150613
150613
|
}
|
|
150614
150614
|
state.result += charFromCodepoint(hexResult);
|
|
@@ -150710,7 +150710,7 @@ var init_js_yaml = __esm({
|
|
|
150710
150710
|
let textIndent = nodeIndent;
|
|
150711
150711
|
let emptyLines = 0;
|
|
150712
150712
|
let atMoreIndented = false;
|
|
150713
|
-
let
|
|
150713
|
+
let tmp22;
|
|
150714
150714
|
let ch2 = state.input.charCodeAt(state.position);
|
|
150715
150715
|
if (ch2 === 124) folding = false;
|
|
150716
150716
|
else if (ch2 === 62) folding = true;
|
|
@@ -150721,9 +150721,9 @@ var init_js_yaml = __esm({
|
|
|
150721
150721
|
ch2 = state.input.charCodeAt(++state.position);
|
|
150722
150722
|
if (ch2 === 43 || ch2 === 45) if (CHOMPING_CLIP === chomping) chomping = ch2 === 43 ? CHOMPING_KEEP : CHOMPING_STRIP;
|
|
150723
150723
|
else throwError(state, "repeat of a chomping mode identifier");
|
|
150724
|
-
else if ((
|
|
150724
|
+
else if ((tmp22 = fromDecimalCode(ch2)) >= 0) if (tmp22 === 0) throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
|
|
150725
150725
|
else if (!detectedIndent) {
|
|
150726
|
-
textIndent = nodeIndent +
|
|
150726
|
+
textIndent = nodeIndent + tmp22 - 1;
|
|
150727
150727
|
detectedIndent = true;
|
|
150728
150728
|
} else throwError(state, "repeat of an indentation width identifier");
|
|
150729
150729
|
else break;
|
|
@@ -171141,7 +171141,7 @@ var require_loader2 = __commonJS({
|
|
|
171141
171141
|
function readDoubleQuotedScalar(state, nodeIndent) {
|
|
171142
171142
|
let captureStart;
|
|
171143
171143
|
let captureEnd;
|
|
171144
|
-
let
|
|
171144
|
+
let tmp22;
|
|
171145
171145
|
let ch2 = state.input.charCodeAt(state.position);
|
|
171146
171146
|
if (ch2 !== 34) {
|
|
171147
171147
|
return false;
|
|
@@ -171163,13 +171163,13 @@ var require_loader2 = __commonJS({
|
|
|
171163
171163
|
} else if (ch2 < 256 && simpleEscapeCheck[ch2]) {
|
|
171164
171164
|
state.result += simpleEscapeMap[ch2];
|
|
171165
171165
|
state.position++;
|
|
171166
|
-
} else if ((
|
|
171167
|
-
let hexLength =
|
|
171166
|
+
} else if ((tmp22 = escapedHexLen(ch2)) > 0) {
|
|
171167
|
+
let hexLength = tmp22;
|
|
171168
171168
|
let hexResult = 0;
|
|
171169
171169
|
for (; hexLength > 0; hexLength--) {
|
|
171170
171170
|
ch2 = state.input.charCodeAt(++state.position);
|
|
171171
|
-
if ((
|
|
171172
|
-
hexResult = (hexResult << 4) +
|
|
171171
|
+
if ((tmp22 = fromHexCode(ch2)) >= 0) {
|
|
171172
|
+
hexResult = (hexResult << 4) + tmp22;
|
|
171173
171173
|
} else {
|
|
171174
171174
|
throwError(state, "expected hexadecimal character");
|
|
171175
171175
|
}
|
|
@@ -171293,7 +171293,7 @@ var require_loader2 = __commonJS({
|
|
|
171293
171293
|
let textIndent = nodeIndent;
|
|
171294
171294
|
let emptyLines = 0;
|
|
171295
171295
|
let atMoreIndented = false;
|
|
171296
|
-
let
|
|
171296
|
+
let tmp22;
|
|
171297
171297
|
let ch2 = state.input.charCodeAt(state.position);
|
|
171298
171298
|
if (ch2 === 124) {
|
|
171299
171299
|
folding = false;
|
|
@@ -171312,11 +171312,11 @@ var require_loader2 = __commonJS({
|
|
|
171312
171312
|
} else {
|
|
171313
171313
|
throwError(state, "repeat of a chomping mode identifier");
|
|
171314
171314
|
}
|
|
171315
|
-
} else if ((
|
|
171316
|
-
if (
|
|
171315
|
+
} else if ((tmp22 = fromDecimalCode(ch2)) >= 0) {
|
|
171316
|
+
if (tmp22 === 0) {
|
|
171317
171317
|
throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
|
|
171318
171318
|
} else if (!detectedIndent) {
|
|
171319
|
-
textIndent = nodeIndent +
|
|
171319
|
+
textIndent = nodeIndent + tmp22 - 1;
|
|
171320
171320
|
detectedIndent = true;
|
|
171321
171321
|
} else {
|
|
171322
171322
|
throwError(state, "repeat of an indentation width identifier");
|
|
@@ -188869,9 +188869,9 @@ var require_js_levenshtein = __commonJS({
|
|
|
188869
188869
|
return 0;
|
|
188870
188870
|
}
|
|
188871
188871
|
if (a3.length > b5.length) {
|
|
188872
|
-
var
|
|
188872
|
+
var tmp22 = a3;
|
|
188873
188873
|
a3 = b5;
|
|
188874
|
-
b5 =
|
|
188874
|
+
b5 = tmp22;
|
|
188875
188875
|
}
|
|
188876
188876
|
var la = a3.length;
|
|
188877
188877
|
var lb = b5.length;
|
|
@@ -197488,7 +197488,7 @@ var require_loader3 = __commonJS({
|
|
|
197488
197488
|
throwError(state, "unexpected end of the stream within a single quoted scalar");
|
|
197489
197489
|
}
|
|
197490
197490
|
function readDoubleQuotedScalar(state, nodeIndent) {
|
|
197491
|
-
var captureStart, captureEnd, hexLength, hexResult,
|
|
197491
|
+
var captureStart, captureEnd, hexLength, hexResult, tmp22, tmpEsc, ch2;
|
|
197492
197492
|
ch2 = state.input.charCodeAt(state.position);
|
|
197493
197493
|
if (34 !== ch2) {
|
|
197494
197494
|
return false;
|
|
@@ -197515,13 +197515,13 @@ var require_loader3 = __commonJS({
|
|
|
197515
197515
|
} else if (ch2 < 256 && (state.allowAnyEscape ? customEscapeCheck[ch2] : simpleEscapeCheck[ch2])) {
|
|
197516
197516
|
scalar.value += state.allowAnyEscape ? customEscapeMap[ch2] : simpleEscapeMap[ch2];
|
|
197517
197517
|
state.position++;
|
|
197518
|
-
} else if ((
|
|
197519
|
-
hexLength =
|
|
197518
|
+
} else if ((tmp22 = escapedHexLen(ch2)) > 0) {
|
|
197519
|
+
hexLength = tmp22;
|
|
197520
197520
|
hexResult = 0;
|
|
197521
197521
|
for (; hexLength > 0; hexLength--) {
|
|
197522
197522
|
ch2 = state.input.charCodeAt(++state.position);
|
|
197523
|
-
if ((
|
|
197524
|
-
hexResult = (hexResult << 4) +
|
|
197523
|
+
if ((tmp22 = fromHexCode(ch2)) >= 0) {
|
|
197524
|
+
hexResult = (hexResult << 4) + tmp22;
|
|
197525
197525
|
} else {
|
|
197526
197526
|
throwError(state, "expected hexadecimal character");
|
|
197527
197527
|
}
|
|
@@ -197630,7 +197630,7 @@ var require_loader3 = __commonJS({
|
|
|
197630
197630
|
throwError(state, "unexpected end of the stream within a flow collection");
|
|
197631
197631
|
}
|
|
197632
197632
|
function readBlockScalar(state, nodeIndent) {
|
|
197633
|
-
var captureStart, folding, chomping = CHOMPING_CLIP, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false,
|
|
197633
|
+
var captureStart, folding, chomping = CHOMPING_CLIP, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp22, ch2;
|
|
197634
197634
|
ch2 = state.input.charCodeAt(state.position);
|
|
197635
197635
|
if (ch2 === 124) {
|
|
197636
197636
|
folding = false;
|
|
@@ -197651,11 +197651,11 @@ var require_loader3 = __commonJS({
|
|
|
197651
197651
|
} else {
|
|
197652
197652
|
throwError(state, "repeat of a chomping mode identifier");
|
|
197653
197653
|
}
|
|
197654
|
-
} else if ((
|
|
197655
|
-
if (
|
|
197654
|
+
} else if ((tmp22 = fromDecimalCode(ch2)) >= 0) {
|
|
197655
|
+
if (tmp22 === 0) {
|
|
197656
197656
|
throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
|
|
197657
197657
|
} else if (!detectedIndent) {
|
|
197658
|
-
textIndent = nodeIndent +
|
|
197658
|
+
textIndent = nodeIndent + tmp22 - 1;
|
|
197659
197659
|
detectedIndent = true;
|
|
197660
197660
|
} else {
|
|
197661
197661
|
throwError(state, "repeat of an indentation width identifier");
|
|
@@ -244221,16 +244221,16 @@ var require_URLSearchParams = __commonJS({
|
|
|
244221
244221
|
);
|
|
244222
244222
|
} else {
|
|
244223
244223
|
const V4 = [];
|
|
244224
|
-
const
|
|
244225
|
-
for (let nextItem of
|
|
244224
|
+
const tmp22 = curArg;
|
|
244225
|
+
for (let nextItem of tmp22) {
|
|
244226
244226
|
if (!utils2.isObject(nextItem)) {
|
|
244227
244227
|
throw new globalObject.TypeError(
|
|
244228
244228
|
"Failed to construct 'URLSearchParams': parameter 1 sequence's element is not an iterable object."
|
|
244229
244229
|
);
|
|
244230
244230
|
} else {
|
|
244231
244231
|
const V5 = [];
|
|
244232
|
-
const
|
|
244233
|
-
for (let nextItem2 of
|
|
244232
|
+
const tmp23 = nextItem;
|
|
244233
|
+
for (let nextItem2 of tmp23) {
|
|
244234
244234
|
nextItem2 = conversions["USVString"](nextItem2, {
|
|
244235
244235
|
context: "Failed to construct 'URLSearchParams': parameter 1 sequence's element's element",
|
|
244236
244236
|
globals: globalObject
|
|
@@ -343105,13 +343105,13 @@ var require_fast_safe_stringify = __commonJS({
|
|
|
343105
343105
|
if (typeof options2 === "undefined") {
|
|
343106
343106
|
options2 = defaultOptions3();
|
|
343107
343107
|
}
|
|
343108
|
-
var
|
|
343108
|
+
var tmp22 = deterministicDecirc(obj, "", 0, [], void 0, 0, options2) || obj;
|
|
343109
343109
|
var res;
|
|
343110
343110
|
try {
|
|
343111
343111
|
if (replacerStack.length === 0) {
|
|
343112
|
-
res = JSON.stringify(
|
|
343112
|
+
res = JSON.stringify(tmp22, replacer, spacer);
|
|
343113
343113
|
} else {
|
|
343114
|
-
res = JSON.stringify(
|
|
343114
|
+
res = JSON.stringify(tmp22, replaceGetterValues(replacer), spacer);
|
|
343115
343115
|
}
|
|
343116
343116
|
} catch (_5) {
|
|
343117
343117
|
return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]");
|
|
@@ -343158,18 +343158,18 @@ var require_fast_safe_stringify = __commonJS({
|
|
|
343158
343158
|
deterministicDecirc(val[i5], i5, i5, stack, val, depth, options2);
|
|
343159
343159
|
}
|
|
343160
343160
|
} else {
|
|
343161
|
-
var
|
|
343161
|
+
var tmp22 = {};
|
|
343162
343162
|
var keys25 = Object.keys(val).sort(compareFunction);
|
|
343163
343163
|
for (i5 = 0; i5 < keys25.length; i5++) {
|
|
343164
343164
|
var key2 = keys25[i5];
|
|
343165
343165
|
deterministicDecirc(val[key2], key2, i5, stack, val, depth, options2);
|
|
343166
|
-
|
|
343166
|
+
tmp22[key2] = val[key2];
|
|
343167
343167
|
}
|
|
343168
343168
|
if (typeof parent !== "undefined") {
|
|
343169
343169
|
arr.push([parent, k4, val]);
|
|
343170
|
-
parent[k4] =
|
|
343170
|
+
parent[k4] = tmp22;
|
|
343171
343171
|
} else {
|
|
343172
|
-
return
|
|
343172
|
+
return tmp22;
|
|
343173
343173
|
}
|
|
343174
343174
|
}
|
|
343175
343175
|
stack.pop();
|
|
@@ -364675,9 +364675,9 @@ var init_suggestionList = __esm({
|
|
|
364675
364675
|
let a3 = stringToArray2(optionLowerCase);
|
|
364676
364676
|
let b5 = this._inputArray;
|
|
364677
364677
|
if (a3.length < b5.length) {
|
|
364678
|
-
const
|
|
364678
|
+
const tmp22 = a3;
|
|
364679
364679
|
a3 = b5;
|
|
364680
|
-
b5 =
|
|
364680
|
+
b5 = tmp22;
|
|
364681
364681
|
}
|
|
364682
364682
|
const aLength = a3.length;
|
|
364683
364683
|
const bLength = b5.length;
|
|
@@ -400797,9 +400797,9 @@ var require_utf16 = __commonJS({
|
|
|
400797
400797
|
Utf16BEEncoder.prototype.write = function(str2) {
|
|
400798
400798
|
var buf = Buffer6.from(str2, "ucs2");
|
|
400799
400799
|
for (var i5 = 0; i5 < buf.length; i5 += 2) {
|
|
400800
|
-
var
|
|
400800
|
+
var tmp22 = buf[i5];
|
|
400801
400801
|
buf[i5] = buf[i5 + 1];
|
|
400802
|
-
buf[i5 + 1] =
|
|
400802
|
+
buf[i5 + 1] = tmp22;
|
|
400803
400803
|
}
|
|
400804
400804
|
return buf;
|
|
400805
400805
|
};
|
|
@@ -464648,9 +464648,9 @@ var init_mod = __esm({
|
|
|
464648
464648
|
};
|
|
464649
464649
|
distance = (a3, b5) => {
|
|
464650
464650
|
if (a3.length < b5.length) {
|
|
464651
|
-
const
|
|
464651
|
+
const tmp22 = b5;
|
|
464652
464652
|
b5 = a3;
|
|
464653
|
-
a3 =
|
|
464653
|
+
a3 = tmp22;
|
|
464654
464654
|
}
|
|
464655
464655
|
if (b5.length === 0) {
|
|
464656
464656
|
return a3.length;
|
|
@@ -464705,7 +464705,7 @@ var require_levenshtein = __commonJS({
|
|
|
464705
464705
|
var str1Len = str1.length, str2Len = str2.length;
|
|
464706
464706
|
if (str1Len === 0) return str2Len;
|
|
464707
464707
|
if (str2Len === 0) return str1Len;
|
|
464708
|
-
var curCol, nextCol, i5, j5,
|
|
464708
|
+
var curCol, nextCol, i5, j5, tmp22;
|
|
464709
464709
|
for (i5 = 0; i5 < str2Len; ++i5) {
|
|
464710
464710
|
prevRow[i5] = i5;
|
|
464711
464711
|
str2Char[i5] = str2.charCodeAt(i5);
|
|
@@ -464718,13 +464718,13 @@ var require_levenshtein = __commonJS({
|
|
|
464718
464718
|
curCol = nextCol;
|
|
464719
464719
|
strCmp = 0 === collator.compare(str1.charAt(i5), String.fromCharCode(str2Char[j5]));
|
|
464720
464720
|
nextCol = prevRow[j5] + (strCmp ? 0 : 1);
|
|
464721
|
-
|
|
464722
|
-
if (nextCol >
|
|
464723
|
-
nextCol =
|
|
464721
|
+
tmp22 = curCol + 1;
|
|
464722
|
+
if (nextCol > tmp22) {
|
|
464723
|
+
nextCol = tmp22;
|
|
464724
464724
|
}
|
|
464725
|
-
|
|
464726
|
-
if (nextCol >
|
|
464727
|
-
nextCol =
|
|
464725
|
+
tmp22 = prevRow[j5 + 1] + 1;
|
|
464726
|
+
if (nextCol > tmp22) {
|
|
464727
|
+
nextCol = tmp22;
|
|
464728
464728
|
}
|
|
464729
464729
|
prevRow[j5] = curCol;
|
|
464730
464730
|
}
|
|
@@ -474729,6 +474729,31 @@ function filenameFromUrl(url3) {
|
|
|
474729
474729
|
return void 0;
|
|
474730
474730
|
}
|
|
474731
474731
|
}
|
|
474732
|
+
function getGlobalThemeAssetDirectoryPath(organization, themeName) {
|
|
474733
|
+
const themeKey = `${organization}\0${themeName}`;
|
|
474734
|
+
const themeHash = (0, import_crypto8.createHash)("sha256").update(themeKey).digest("hex").slice(0, 16);
|
|
474735
|
+
return import_path60.default.join((0, import_os9.tmpdir)(), `fern-theme-${themeHash}`);
|
|
474736
|
+
}
|
|
474737
|
+
async function ensureGlobalThemeAssetDirectory(directoryPath) {
|
|
474738
|
+
await (0, import_promises81.mkdir)(directoryPath, { mode: 448, recursive: true });
|
|
474739
|
+
const stats = await (0, import_promises81.lstat)(directoryPath);
|
|
474740
|
+
const processUid = typeof process.getuid === "function" ? process.getuid() : void 0;
|
|
474741
|
+
if (!stats.isDirectory() || processUid !== void 0 && stats.uid !== processUid) {
|
|
474742
|
+
throw new Error(`Global theme asset directory "${directoryPath}" is not a secure directory. Remove it and retry.`);
|
|
474743
|
+
}
|
|
474744
|
+
if ((stats.mode & 511) !== 448) {
|
|
474745
|
+
await (0, import_promises81.chmod)(directoryPath, 448);
|
|
474746
|
+
}
|
|
474747
|
+
}
|
|
474748
|
+
async function writeFileAtomically(filePath, data2) {
|
|
474749
|
+
const tempPath = import_path60.default.join(import_path60.default.dirname(filePath), `.${import_path60.default.basename(filePath)}.${(0, import_crypto8.randomUUID)()}.tmp`);
|
|
474750
|
+
try {
|
|
474751
|
+
await (0, import_promises81.writeFile)(tempPath, data2);
|
|
474752
|
+
await (0, import_promises81.rename)(tempPath, filePath);
|
|
474753
|
+
} finally {
|
|
474754
|
+
await (0, import_promises81.unlink)(tempPath).catch(() => void 0);
|
|
474755
|
+
}
|
|
474756
|
+
}
|
|
474732
474757
|
async function downloadToTemp(url3, tmpDir, index3) {
|
|
474733
474758
|
const urlFilename = filenameFromUrl(url3);
|
|
474734
474759
|
const res = await fetch(url3);
|
|
@@ -474759,7 +474784,7 @@ async function downloadToTemp(url3, tmpDir, index3) {
|
|
|
474759
474784
|
})();
|
|
474760
474785
|
const dest = import_path60.default.join(tmpDir, filename);
|
|
474761
474786
|
const buf = Buffer.from(await res.arrayBuffer());
|
|
474762
|
-
await (
|
|
474787
|
+
await writeFileAtomically(dest, buf);
|
|
474763
474788
|
return dest;
|
|
474764
474789
|
}
|
|
474765
474790
|
async function resolveThemeFileUrls(themeConfig, tmpDir) {
|
|
@@ -474946,7 +474971,13 @@ async function stitchGlobalTheme({ docsWorkspace, organization, fdrOrigin, token
|
|
|
474946
474971
|
}
|
|
474947
474972
|
throw err;
|
|
474948
474973
|
}
|
|
474949
|
-
const
|
|
474974
|
+
const tmpDirPath = getGlobalThemeAssetDirectoryPath(organization, themeName);
|
|
474975
|
+
try {
|
|
474976
|
+
await ensureGlobalThemeAssetDirectory(tmpDirPath);
|
|
474977
|
+
} catch (err) {
|
|
474978
|
+
taskContext.failAndThrow(`Could not prepare global theme asset directory "${tmpDirPath}". Remove it and retry.`, err, { code: CliError.Code.ConfigError });
|
|
474979
|
+
return docsWorkspace;
|
|
474980
|
+
}
|
|
474950
474981
|
taskContext.logger.debug(`Downloading theme assets to ${tmpDirPath}`);
|
|
474951
474982
|
let resolvedConfig;
|
|
474952
474983
|
try {
|
|
@@ -474959,13 +474990,13 @@ async function stitchGlobalTheme({ docsWorkspace, organization, fdrOrigin, token
|
|
|
474959
474990
|
return docsWorkspace;
|
|
474960
474991
|
}
|
|
474961
474992
|
const mergedRawConfig = mergeThemeOverride(docsWorkspace.config, resolvedConfig);
|
|
474962
|
-
taskContext.logger.info(`Applied global theme "${themeName}" \u2014 ${AbsoluteFilePath2.of(tmpDirPath)}
|
|
474993
|
+
taskContext.logger.info(`Applied global theme "${themeName}" \u2014 ${AbsoluteFilePath2.of(tmpDirPath)}`);
|
|
474963
474994
|
const stitchedPath = import_path60.default.join(tmpDirPath, "stitched-docs.yml.json");
|
|
474964
|
-
await (
|
|
474995
|
+
await writeFileAtomically(stitchedPath, JSON.stringify(mergedRawConfig, null, 2));
|
|
474965
474996
|
taskContext.logger.debug(`Stitched docs.yml after importing theme written to: ${stitchedPath}`);
|
|
474966
474997
|
return { ...docsWorkspace, config: mergedRawConfig };
|
|
474967
474998
|
}
|
|
474968
|
-
var import_promises81, import_mime_types,
|
|
474999
|
+
var import_crypto8, import_promises81, import_mime_types, import_os9, import_path60, THEME_ELIGIBLE_FIELDS2, THEME_FIELD_POLICIES2;
|
|
474969
475000
|
var init_stitchGlobalTheme = __esm({
|
|
474970
475001
|
"../docs-resolver/lib/stitchGlobalTheme.js"() {
|
|
474971
475002
|
"use strict";
|
|
@@ -474973,10 +475004,11 @@ var init_stitchGlobalTheme = __esm({
|
|
|
474973
475004
|
init_lib4();
|
|
474974
475005
|
init_lib8();
|
|
474975
475006
|
init_lib6();
|
|
475007
|
+
import_crypto8 = require("crypto");
|
|
474976
475008
|
import_promises81 = require("fs/promises");
|
|
474977
475009
|
import_mime_types = __toESM(require_mime_types(), 1);
|
|
475010
|
+
import_os9 = require("os");
|
|
474978
475011
|
import_path60 = __toESM(require("path"), 1);
|
|
474979
|
-
import_tmp_promise11 = __toESM(require_tmp_promise(), 1);
|
|
474980
475012
|
({ THEME_ELIGIBLE_FIELDS: THEME_ELIGIBLE_FIELDS2, THEME_FIELD_POLICIES: THEME_FIELD_POLICIES2 } = docs_yml_exports);
|
|
474981
475013
|
}
|
|
474982
475014
|
});
|
|
@@ -477866,9 +477898,9 @@ var require_utf162 = __commonJS({
|
|
|
477866
477898
|
Utf16BEEncoder.prototype.write = function(str2) {
|
|
477867
477899
|
var buf = Buffer6.from(str2, "ucs2");
|
|
477868
477900
|
for (var i5 = 0; i5 < buf.length; i5 += 2) {
|
|
477869
|
-
var
|
|
477901
|
+
var tmp22 = buf[i5];
|
|
477870
477902
|
buf[i5] = buf[i5 + 1];
|
|
477871
|
-
buf[i5 + 1] =
|
|
477903
|
+
buf[i5 + 1] = tmp22;
|
|
477872
477904
|
}
|
|
477873
477905
|
return buf;
|
|
477874
477906
|
};
|
|
@@ -489628,7 +489660,7 @@ var require_websocket = __commonJS({
|
|
|
489628
489660
|
var http13 = require("http");
|
|
489629
489661
|
var net4 = require("net");
|
|
489630
489662
|
var tls2 = require("tls");
|
|
489631
|
-
var { randomBytes: randomBytes2, createHash:
|
|
489663
|
+
var { randomBytes: randomBytes2, createHash: createHash8 } = require("crypto");
|
|
489632
489664
|
var { Duplex, Readable: Readable9 } = require("stream");
|
|
489633
489665
|
var { URL: URL4 } = require("url");
|
|
489634
489666
|
var PerMessageDeflate2 = require_permessage_deflate();
|
|
@@ -490296,7 +490328,7 @@ var require_websocket = __commonJS({
|
|
|
490296
490328
|
abortHandshake(websocket, socket, "Invalid Upgrade header");
|
|
490297
490329
|
return;
|
|
490298
490330
|
}
|
|
490299
|
-
const digest =
|
|
490331
|
+
const digest = createHash8("sha1").update(key2 + GUID).digest("base64");
|
|
490300
490332
|
if (res.headers["sec-websocket-accept"] !== digest) {
|
|
490301
490333
|
abortHandshake(websocket, socket, "Invalid Sec-WebSocket-Accept header");
|
|
490302
490334
|
return;
|
|
@@ -490665,7 +490697,7 @@ var require_websocket_server = __commonJS({
|
|
|
490665
490697
|
var EventEmitter9 = require("events");
|
|
490666
490698
|
var http13 = require("http");
|
|
490667
490699
|
var { Duplex } = require("stream");
|
|
490668
|
-
var { createHash:
|
|
490700
|
+
var { createHash: createHash8 } = require("crypto");
|
|
490669
490701
|
var extension4 = require_extension();
|
|
490670
490702
|
var PerMessageDeflate2 = require_permessage_deflate();
|
|
490671
490703
|
var subprotocol2 = require_subprotocol();
|
|
@@ -490972,7 +491004,7 @@ var require_websocket_server = __commonJS({
|
|
|
490972
491004
|
);
|
|
490973
491005
|
}
|
|
490974
491006
|
if (this._state > RUNNING) return abortHandshake(socket, 503);
|
|
490975
|
-
const digest =
|
|
491007
|
+
const digest = createHash8("sha1").update(key2 + GUID).digest("base64");
|
|
490976
491008
|
const headers2 = [
|
|
490977
491009
|
"HTTP/1.1 101 Switching Protocols",
|
|
490978
491010
|
"Upgrade: websocket",
|
|
@@ -491928,7 +491960,7 @@ var require_polyfills2 = __commonJS({
|
|
|
491928
491960
|
}
|
|
491929
491961
|
if (platform4 === "win32") {
|
|
491930
491962
|
fs34.rename = typeof fs34.rename !== "function" ? fs34.rename : (function(fs$rename) {
|
|
491931
|
-
function
|
|
491963
|
+
function rename9(from4, to2, cb) {
|
|
491932
491964
|
var start2 = Date.now();
|
|
491933
491965
|
var backoff = 0;
|
|
491934
491966
|
fs$rename(from4, to2, function CB(er3) {
|
|
@@ -491948,8 +491980,8 @@ var require_polyfills2 = __commonJS({
|
|
|
491948
491980
|
if (cb) cb(er3);
|
|
491949
491981
|
});
|
|
491950
491982
|
}
|
|
491951
|
-
if (Object.setPrototypeOf) Object.setPrototypeOf(
|
|
491952
|
-
return
|
|
491983
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(rename9, fs$rename);
|
|
491984
|
+
return rename9;
|
|
491953
491985
|
})(fs34.rename);
|
|
491954
491986
|
}
|
|
491955
491987
|
fs34.read = typeof fs34.read !== "function" ? fs34.read : (function(fs$read) {
|
|
@@ -500340,9 +500372,9 @@ var require_buffer_crc32 = __commonJS({
|
|
|
500340
500372
|
}
|
|
500341
500373
|
}
|
|
500342
500374
|
function bufferizeInt(num) {
|
|
500343
|
-
var
|
|
500344
|
-
|
|
500345
|
-
return
|
|
500375
|
+
var tmp22 = ensureBuffer(4);
|
|
500376
|
+
tmp22.writeInt32BE(num, 0);
|
|
500377
|
+
return tmp22;
|
|
500346
500378
|
}
|
|
500347
500379
|
function _crc32(buf, previous4) {
|
|
500348
500380
|
buf = ensureBuffer(buf);
|
|
@@ -501282,10 +501314,10 @@ var require_make_dir = __commonJS({
|
|
|
501282
501314
|
module4.exports = (input3, opts) => Promise.resolve().then(() => {
|
|
501283
501315
|
checkPath(input3);
|
|
501284
501316
|
opts = Object.assign({}, defaults3, opts);
|
|
501285
|
-
const
|
|
501317
|
+
const mkdir49 = pify(opts.fs.mkdir);
|
|
501286
501318
|
const stat7 = pify(opts.fs.stat);
|
|
501287
501319
|
const make = (pth) => {
|
|
501288
|
-
return
|
|
501320
|
+
return mkdir49(pth, opts.mode).then(() => pth).catch((err) => {
|
|
501289
501321
|
if (err.code === "ENOENT") {
|
|
501290
501322
|
if (err.message.includes("null bytes") || path122.dirname(pth) === pth) {
|
|
501291
501323
|
throw err;
|
|
@@ -545852,9 +545884,9 @@ var require_receivebuffer = __commonJS({
|
|
|
545852
545884
|
throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");
|
|
545853
545885
|
}
|
|
545854
545886
|
if (this.offset + data2.length >= this.buffer.length) {
|
|
545855
|
-
const
|
|
545887
|
+
const tmp22 = this.buffer;
|
|
545856
545888
|
this.buffer = Buffer.allocUnsafe(Math.max(this.buffer.length + this.originalSize, this.buffer.length + data2.length));
|
|
545857
|
-
|
|
545889
|
+
tmp22.copy(this.buffer);
|
|
545858
545890
|
}
|
|
545859
545891
|
data2.copy(this.buffer, this.offset);
|
|
545860
545892
|
return this.offset += data2.length;
|
|
@@ -559753,10 +559785,10 @@ var require_esprima = __commonJS({
|
|
|
559753
559785
|
};
|
|
559754
559786
|
Scanner2.prototype.testRegExp = function(pattern, flags2) {
|
|
559755
559787
|
var astralSubstitute = "\uFFFF";
|
|
559756
|
-
var
|
|
559788
|
+
var tmp22 = pattern;
|
|
559757
559789
|
var self2 = this;
|
|
559758
559790
|
if (flags2.indexOf("u") >= 0) {
|
|
559759
|
-
|
|
559791
|
+
tmp22 = tmp22.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function($0, $1, $22) {
|
|
559760
559792
|
var codePoint = parseInt($1 || $22, 16);
|
|
559761
559793
|
if (codePoint > 1114111) {
|
|
559762
559794
|
self2.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);
|
|
@@ -559768,7 +559800,7 @@ var require_esprima = __commonJS({
|
|
|
559768
559800
|
}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, astralSubstitute);
|
|
559769
559801
|
}
|
|
559770
559802
|
try {
|
|
559771
|
-
RegExp(
|
|
559803
|
+
RegExp(tmp22);
|
|
559772
559804
|
} catch (e2) {
|
|
559773
559805
|
this.throwUnexpectedToken(messages_1.Messages.InvalidRegExp);
|
|
559774
559806
|
}
|
|
@@ -573103,16 +573135,16 @@ var require_tar_fs = __commonJS({
|
|
|
573103
573135
|
}
|
|
573104
573136
|
function chperm(name2, header, cb) {
|
|
573105
573137
|
const link3 = header.type === "symlink";
|
|
573106
|
-
const
|
|
573138
|
+
const chmod6 = link3 ? xfs.lchmod : xfs.chmod;
|
|
573107
573139
|
const chown = link3 ? xfs.lchown : xfs.chown;
|
|
573108
|
-
if (!
|
|
573140
|
+
if (!chmod6) return cb();
|
|
573109
573141
|
const mode = (header.mode | (header.type === "directory" ? dmode : fmode)) & umask;
|
|
573110
573142
|
if (chown && own15) chown.call(xfs, name2, header.uid, header.gid, onchown);
|
|
573111
573143
|
else onchown(null);
|
|
573112
573144
|
function onchown(err) {
|
|
573113
573145
|
if (err) return cb(err);
|
|
573114
|
-
if (!
|
|
573115
|
-
|
|
573146
|
+
if (!chmod6) return cb();
|
|
573147
|
+
chmod6.call(xfs, name2, mode, cb);
|
|
573116
573148
|
}
|
|
573117
573149
|
}
|
|
573118
573150
|
function mkdirfix(name2, opts2, cb) {
|
|
@@ -574673,7 +574705,7 @@ var require_env_paths = __commonJS({
|
|
|
574673
574705
|
var path122 = require("path");
|
|
574674
574706
|
var os23 = require("os");
|
|
574675
574707
|
var homedir12 = os23.homedir();
|
|
574676
|
-
var
|
|
574708
|
+
var tmpdir6 = os23.tmpdir();
|
|
574677
574709
|
var { env: env5 } = process;
|
|
574678
574710
|
var macos = (name2) => {
|
|
574679
574711
|
const library = path122.join(homedir12, "Library");
|
|
@@ -574682,7 +574714,7 @@ var require_env_paths = __commonJS({
|
|
|
574682
574714
|
config: path122.join(library, "Preferences", name2),
|
|
574683
574715
|
cache: path122.join(library, "Caches", name2),
|
|
574684
574716
|
log: path122.join(library, "Logs", name2),
|
|
574685
|
-
temp: path122.join(
|
|
574717
|
+
temp: path122.join(tmpdir6, name2)
|
|
574686
574718
|
};
|
|
574687
574719
|
};
|
|
574688
574720
|
var windows = (name2) => {
|
|
@@ -574694,7 +574726,7 @@ var require_env_paths = __commonJS({
|
|
|
574694
574726
|
config: path122.join(appData, name2, "Config"),
|
|
574695
574727
|
cache: path122.join(localAppData, name2, "Cache"),
|
|
574696
574728
|
log: path122.join(localAppData, name2, "Log"),
|
|
574697
|
-
temp: path122.join(
|
|
574729
|
+
temp: path122.join(tmpdir6, name2)
|
|
574698
574730
|
};
|
|
574699
574731
|
};
|
|
574700
574732
|
var linux = (name2) => {
|
|
@@ -574705,7 +574737,7 @@ var require_env_paths = __commonJS({
|
|
|
574705
574737
|
cache: path122.join(env5.XDG_CACHE_HOME || path122.join(homedir12, ".cache"), name2),
|
|
574706
574738
|
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
574707
574739
|
log: path122.join(env5.XDG_STATE_HOME || path122.join(homedir12, ".local", "state"), name2),
|
|
574708
|
-
temp: path122.join(
|
|
574740
|
+
temp: path122.join(tmpdir6, username, name2)
|
|
574709
574741
|
};
|
|
574710
574742
|
};
|
|
574711
574743
|
var envPaths = (name2, options2) => {
|
|
@@ -575536,7 +575568,7 @@ async function tryRunContainer({ logger: logger4, imageName, args, binds, envVar
|
|
|
575536
575568
|
});
|
|
575537
575569
|
const logs4 = stdout + stderr;
|
|
575538
575570
|
if (writeLogsToFile) {
|
|
575539
|
-
const tmpFile = await
|
|
575571
|
+
const tmpFile = await import_tmp_promise12.default.file();
|
|
575540
575572
|
await (0, import_promises114.writeFile)(tmpFile.path, logs4);
|
|
575541
575573
|
logger4.info(`Generator logs here: ${tmpFile.path}`);
|
|
575542
575574
|
}
|
|
@@ -575611,7 +575643,7 @@ async function execInContainer({ logger: logger4, containerId, command: command3
|
|
|
575611
575643
|
});
|
|
575612
575644
|
const logs4 = stdout + stderr;
|
|
575613
575645
|
if (writeLogsToFile) {
|
|
575614
|
-
const tmpFile = await
|
|
575646
|
+
const tmpFile = await import_tmp_promise12.default.file();
|
|
575615
575647
|
await (0, import_promises114.writeFile)(tmpFile.path, logs4);
|
|
575616
575648
|
logger4.info(`Generator logs here: ${tmpFile.path}`);
|
|
575617
575649
|
}
|
|
@@ -575654,13 +575686,13 @@ async function stopContainer({ logger: logger4, containerId, runner }) {
|
|
|
575654
575686
|
doNotPipeOutput: true
|
|
575655
575687
|
});
|
|
575656
575688
|
}
|
|
575657
|
-
var import_promises114,
|
|
575689
|
+
var import_promises114, import_tmp_promise12, runDocker;
|
|
575658
575690
|
var init_runDocker = __esm({
|
|
575659
575691
|
"../generation/local-generation/docker-utils/lib/runDocker.js"() {
|
|
575660
575692
|
"use strict";
|
|
575661
575693
|
init_lib18();
|
|
575662
575694
|
import_promises114 = require("fs/promises");
|
|
575663
|
-
|
|
575695
|
+
import_tmp_promise12 = __toESM(require_tmp_promise(), 1);
|
|
575664
575696
|
init_buildContainerEnvVars();
|
|
575665
575697
|
runDocker = runContainer;
|
|
575666
575698
|
}
|
|
@@ -587081,17 +587113,17 @@ Patches absorbed by generator (${buckets.absorbed.length}):`;
|
|
|
587081
587113
|
}
|
|
587082
587114
|
async function unifiedDiff(beforeContent, afterContent, filePath) {
|
|
587083
587115
|
if (beforeContent === afterContent) return "";
|
|
587084
|
-
const
|
|
587116
|
+
const tmp22 = await (0, import_promises410.mkdtemp)((0, import_node_path72.join)((0, import_node_os22.tmpdir)(), "fern-replay-pp-"));
|
|
587085
587117
|
try {
|
|
587086
|
-
const beforePath = (0, import_node_path72.join)(
|
|
587087
|
-
const afterPath = (0, import_node_path72.join)(
|
|
587118
|
+
const beforePath = (0, import_node_path72.join)(tmp22, "before");
|
|
587119
|
+
const afterPath = (0, import_node_path72.join)(tmp22, "after");
|
|
587088
587120
|
await (0, import_promises410.writeFile)(beforePath, beforeContent, "utf-8");
|
|
587089
587121
|
await (0, import_promises410.writeFile)(afterPath, afterContent, "utf-8");
|
|
587090
587122
|
const raw = await runGitDiffNoIndex(beforePath, afterPath);
|
|
587091
587123
|
if (!raw.trim()) return "";
|
|
587092
587124
|
return rewriteDiffHeaders(raw, filePath);
|
|
587093
587125
|
} finally {
|
|
587094
|
-
await (0, import_promises410.rm)(
|
|
587126
|
+
await (0, import_promises410.rm)(tmp22, { recursive: true, force: true });
|
|
587095
587127
|
}
|
|
587096
587128
|
}
|
|
587097
587129
|
function runGitDiffNoIndex(beforePath, afterPath) {
|
|
@@ -590384,23 +590416,23 @@ function getValues2(context3, operator2, key2, modifier) {
|
|
|
590384
590416
|
});
|
|
590385
590417
|
}
|
|
590386
590418
|
} else {
|
|
590387
|
-
const
|
|
590419
|
+
const tmp22 = [];
|
|
590388
590420
|
if (Array.isArray(value2)) {
|
|
590389
590421
|
value2.filter(isDefined2).forEach(function(value22) {
|
|
590390
|
-
|
|
590422
|
+
tmp22.push(encodeValue4(operator2, value22));
|
|
590391
590423
|
});
|
|
590392
590424
|
} else {
|
|
590393
590425
|
Object.keys(value2).forEach(function(k4) {
|
|
590394
590426
|
if (isDefined2(value2[k4])) {
|
|
590395
|
-
|
|
590396
|
-
|
|
590427
|
+
tmp22.push(encodeUnreserved2(k4));
|
|
590428
|
+
tmp22.push(encodeValue4(operator2, value2[k4].toString()));
|
|
590397
590429
|
}
|
|
590398
590430
|
});
|
|
590399
590431
|
}
|
|
590400
590432
|
if (isKeyOperator2(operator2)) {
|
|
590401
|
-
result.push(encodeUnreserved2(key2) + "=" +
|
|
590402
|
-
} else if (
|
|
590403
|
-
result.push(
|
|
590433
|
+
result.push(encodeUnreserved2(key2) + "=" + tmp22.join(","));
|
|
590434
|
+
} else if (tmp22.length !== 0) {
|
|
590435
|
+
result.push(tmp22.join(","));
|
|
590404
590436
|
}
|
|
590405
590437
|
}
|
|
590406
590438
|
}
|
|
@@ -590435,8 +590467,8 @@ function expand3(template, context3) {
|
|
|
590435
590467
|
expression = expression.substr(1);
|
|
590436
590468
|
}
|
|
590437
590469
|
expression.split(/,/g).forEach(function(variable3) {
|
|
590438
|
-
var
|
|
590439
|
-
values2.push(getValues2(context3, operator2,
|
|
590470
|
+
var tmp22 = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable3);
|
|
590471
|
+
values2.push(getValues2(context3, operator2, tmp22[1], tmp22[2] || tmp22[3]));
|
|
590440
590472
|
});
|
|
590441
590473
|
if (operator2 && operator2 !== "+") {
|
|
590442
590474
|
var separator = ",";
|
|
@@ -635278,14 +635310,14 @@ var require_empty2 = __commonJS({
|
|
|
635278
635310
|
var u5 = require_universalify().fromPromise;
|
|
635279
635311
|
var fs34 = require_fs();
|
|
635280
635312
|
var path122 = require("path");
|
|
635281
|
-
var
|
|
635313
|
+
var mkdir49 = require_mkdirs();
|
|
635282
635314
|
var remove3 = require_remove3();
|
|
635283
635315
|
var emptyDir = u5(async function emptyDir2(dir) {
|
|
635284
635316
|
let items;
|
|
635285
635317
|
try {
|
|
635286
635318
|
items = await fs34.readdir(dir);
|
|
635287
635319
|
} catch {
|
|
635288
|
-
return
|
|
635320
|
+
return mkdir49.mkdirs(dir);
|
|
635289
635321
|
}
|
|
635290
635322
|
return Promise.all(items.map((item) => remove3.remove(path122.join(dir, item))));
|
|
635291
635323
|
});
|
|
@@ -635294,7 +635326,7 @@ var require_empty2 = __commonJS({
|
|
|
635294
635326
|
try {
|
|
635295
635327
|
items = fs34.readdirSync(dir);
|
|
635296
635328
|
} catch {
|
|
635297
|
-
return
|
|
635329
|
+
return mkdir49.mkdirsSync(dir);
|
|
635298
635330
|
}
|
|
635299
635331
|
items.forEach((item) => {
|
|
635300
635332
|
item = path122.join(dir, item);
|
|
@@ -635317,7 +635349,7 @@ var require_file2 = __commonJS({
|
|
|
635317
635349
|
var u5 = require_universalify().fromPromise;
|
|
635318
635350
|
var path122 = require("path");
|
|
635319
635351
|
var fs34 = require_fs();
|
|
635320
|
-
var
|
|
635352
|
+
var mkdir49 = require_mkdirs();
|
|
635321
635353
|
async function createFile(file4) {
|
|
635322
635354
|
let stats;
|
|
635323
635355
|
try {
|
|
@@ -635331,7 +635363,7 @@ var require_file2 = __commonJS({
|
|
|
635331
635363
|
dirStats = await fs34.stat(dir);
|
|
635332
635364
|
} catch (err) {
|
|
635333
635365
|
if (err.code === "ENOENT") {
|
|
635334
|
-
await
|
|
635366
|
+
await mkdir49.mkdirs(dir);
|
|
635335
635367
|
await fs34.writeFile(file4, "");
|
|
635336
635368
|
return;
|
|
635337
635369
|
} else {
|
|
@@ -635357,7 +635389,7 @@ var require_file2 = __commonJS({
|
|
|
635357
635389
|
fs34.readdirSync(dir);
|
|
635358
635390
|
}
|
|
635359
635391
|
} catch (err) {
|
|
635360
|
-
if (err && err.code === "ENOENT")
|
|
635392
|
+
if (err && err.code === "ENOENT") mkdir49.mkdirsSync(dir);
|
|
635361
635393
|
else throw err;
|
|
635362
635394
|
}
|
|
635363
635395
|
fs34.writeFileSync(file4, "");
|
|
@@ -635376,7 +635408,7 @@ var require_link = __commonJS({
|
|
|
635376
635408
|
var u5 = require_universalify().fromPromise;
|
|
635377
635409
|
var path122 = require("path");
|
|
635378
635410
|
var fs34 = require_fs();
|
|
635379
|
-
var
|
|
635411
|
+
var mkdir49 = require_mkdirs();
|
|
635380
635412
|
var { pathExists: pathExists2 } = require_path_exists();
|
|
635381
635413
|
var { areIdentical } = require_stat();
|
|
635382
635414
|
async function createLink(srcpath, dstpath) {
|
|
@@ -635396,7 +635428,7 @@ var require_link = __commonJS({
|
|
|
635396
635428
|
const dir = path122.dirname(dstpath);
|
|
635397
635429
|
const dirExists = await pathExists2(dir);
|
|
635398
635430
|
if (!dirExists) {
|
|
635399
|
-
await
|
|
635431
|
+
await mkdir49.mkdirs(dir);
|
|
635400
635432
|
}
|
|
635401
635433
|
await fs34.link(srcpath, dstpath);
|
|
635402
635434
|
}
|
|
@@ -635416,7 +635448,7 @@ var require_link = __commonJS({
|
|
|
635416
635448
|
const dir = path122.dirname(dstpath);
|
|
635417
635449
|
const dirExists = fs34.existsSync(dir);
|
|
635418
635450
|
if (dirExists) return fs34.linkSync(srcpath, dstpath);
|
|
635419
|
-
|
|
635451
|
+
mkdir49.mkdirsSync(dir);
|
|
635420
635452
|
return fs34.linkSync(srcpath, dstpath);
|
|
635421
635453
|
}
|
|
635422
635454
|
module4.exports = {
|
|
@@ -635752,19 +635784,19 @@ var require_output_file = __commonJS({
|
|
|
635752
635784
|
var u5 = require_universalify().fromPromise;
|
|
635753
635785
|
var fs34 = require_fs();
|
|
635754
635786
|
var path122 = require("path");
|
|
635755
|
-
var
|
|
635787
|
+
var mkdir49 = require_mkdirs();
|
|
635756
635788
|
var pathExists2 = require_path_exists().pathExists;
|
|
635757
635789
|
async function outputFile(file4, data2, encoding = "utf-8") {
|
|
635758
635790
|
const dir = path122.dirname(file4);
|
|
635759
635791
|
if (!await pathExists2(dir)) {
|
|
635760
|
-
await
|
|
635792
|
+
await mkdir49.mkdirs(dir);
|
|
635761
635793
|
}
|
|
635762
635794
|
return fs34.writeFile(file4, data2, encoding);
|
|
635763
635795
|
}
|
|
635764
635796
|
function outputFileSync(file4, ...args) {
|
|
635765
635797
|
const dir = path122.dirname(file4);
|
|
635766
635798
|
if (!fs34.existsSync(dir)) {
|
|
635767
|
-
|
|
635799
|
+
mkdir49.mkdirsSync(dir);
|
|
635768
635800
|
}
|
|
635769
635801
|
fs34.writeFileSync(file4, ...args);
|
|
635770
635802
|
}
|
|
@@ -635897,15 +635929,15 @@ var require_move_sync = __commonJS({
|
|
|
635897
635929
|
return parsedPath.root === parent;
|
|
635898
635930
|
}
|
|
635899
635931
|
function doRename(src, dest, overwrite, isChangingCase) {
|
|
635900
|
-
if (isChangingCase) return
|
|
635932
|
+
if (isChangingCase) return rename9(src, dest, overwrite);
|
|
635901
635933
|
if (overwrite) {
|
|
635902
635934
|
removeSync(dest);
|
|
635903
|
-
return
|
|
635935
|
+
return rename9(src, dest, overwrite);
|
|
635904
635936
|
}
|
|
635905
635937
|
if (fs34.existsSync(dest)) throw new Error("dest already exists.");
|
|
635906
|
-
return
|
|
635938
|
+
return rename9(src, dest, overwrite);
|
|
635907
635939
|
}
|
|
635908
|
-
function
|
|
635940
|
+
function rename9(src, dest, overwrite) {
|
|
635909
635941
|
try {
|
|
635910
635942
|
fs34.renameSync(src, dest);
|
|
635911
635943
|
} catch (err) {
|
|
@@ -637561,15 +637593,15 @@ var require_sync2 = __commonJS({
|
|
|
637561
637593
|
var { readdirSync: readdirSync4, statSync: statSync4 } = require("fs");
|
|
637562
637594
|
module4.exports = function(start2, callback) {
|
|
637563
637595
|
let dir = resolve15(".", start2);
|
|
637564
|
-
let
|
|
637596
|
+
let tmp22, stats = statSync4(dir);
|
|
637565
637597
|
if (!stats.isDirectory()) {
|
|
637566
637598
|
dir = dirname22(dir);
|
|
637567
637599
|
}
|
|
637568
637600
|
while (true) {
|
|
637569
|
-
|
|
637570
|
-
if (
|
|
637571
|
-
dir = dirname22(
|
|
637572
|
-
if (
|
|
637601
|
+
tmp22 = callback(dir, readdirSync4(dir));
|
|
637602
|
+
if (tmp22) return resolve15(dir, tmp22);
|
|
637603
|
+
dir = dirname22(tmp22 = dir);
|
|
637604
|
+
if (tmp22 === dir) break;
|
|
637573
637605
|
}
|
|
637574
637606
|
};
|
|
637575
637607
|
}
|
|
@@ -639681,9 +639713,9 @@ var require_dist26 = __commonJS({
|
|
|
639681
639713
|
}
|
|
639682
639714
|
}
|
|
639683
639715
|
function bufferizeInt(num) {
|
|
639684
|
-
const
|
|
639685
|
-
|
|
639686
|
-
return
|
|
639716
|
+
const tmp22 = ensureBuffer(4);
|
|
639717
|
+
tmp22.writeInt32BE(num, 0);
|
|
639718
|
+
return tmp22;
|
|
639687
639719
|
}
|
|
639688
639720
|
function _crc32(buf, previous4) {
|
|
639689
639721
|
buf = ensureBuffer(buf);
|
|
@@ -703314,7 +703346,7 @@ var AccessTokenPosthogManager = class {
|
|
|
703314
703346
|
properties: {
|
|
703315
703347
|
...event,
|
|
703316
703348
|
...event.properties,
|
|
703317
|
-
version: "5.101.
|
|
703349
|
+
version: "5.101.1",
|
|
703318
703350
|
usingAccessToken: true,
|
|
703319
703351
|
...getRunIdProperties()
|
|
703320
703352
|
}
|
|
@@ -703380,7 +703412,7 @@ var UserPosthogManager = class {
|
|
|
703380
703412
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
703381
703413
|
event: "CLI",
|
|
703382
703414
|
properties: {
|
|
703383
|
-
version: "5.101.
|
|
703415
|
+
version: "5.101.1",
|
|
703384
703416
|
...event,
|
|
703385
703417
|
...event.properties,
|
|
703386
703418
|
usingAccessToken: false,
|
|
@@ -879058,7 +879090,7 @@ init_lib23();
|
|
|
879058
879090
|
init_lib5();
|
|
879059
879091
|
init_lib6();
|
|
879060
879092
|
init_source();
|
|
879061
|
-
var
|
|
879093
|
+
var import_crypto9 = require("crypto");
|
|
879062
879094
|
var import_path63 = __toESM(require("path"), 1);
|
|
879063
879095
|
|
|
879064
879096
|
// ../yaml/docs-validator/lib/rules/valid-markdown-link/check-if-pathname-exists.js
|
|
@@ -879650,7 +879682,7 @@ var ValidMarkdownLinks = {
|
|
|
879650
879682
|
context: NOOP_CONTEXT,
|
|
879651
879683
|
sourceResolver: new SourceResolverImpl(NOOP_CONTEXT, fernWorkspace)
|
|
879652
879684
|
});
|
|
879653
|
-
const api2 = toLatest(convertIrToApiDefinition({ ir: ir3, apiDefinitionId: (0,
|
|
879685
|
+
const api2 = toLatest(convertIrToApiDefinition({ ir: ir3, apiDefinitionId: (0, import_crypto9.randomUUID)(), context: NOOP_CONTEXT }));
|
|
879654
879686
|
const uniqueDescriptions = collectUniqueDescriptions(api2);
|
|
879655
879687
|
const violations = [];
|
|
879656
879688
|
const uniquePathnames = /* @__PURE__ */ new Map();
|
|
@@ -884749,20 +884781,20 @@ var import_express3 = __toESM(require_express3(), 1);
|
|
|
884749
884781
|
var import_fs30 = __toESM(require("fs"), 1);
|
|
884750
884782
|
var import_promises107 = require("fs/promises");
|
|
884751
884783
|
var import_http9 = __toESM(require("http"), 1);
|
|
884752
|
-
var
|
|
884784
|
+
var import_os12 = __toESM(require("os"), 1);
|
|
884753
884785
|
var import_path74 = __toESM(require("path"), 1);
|
|
884754
884786
|
init_wrapper();
|
|
884755
884787
|
|
|
884756
884788
|
// ../docs-preview/lib/DebugLogger.js
|
|
884757
884789
|
init_lib8();
|
|
884758
884790
|
var import_promises103 = require("fs/promises");
|
|
884759
|
-
var
|
|
884791
|
+
var import_os10 = require("os");
|
|
884760
884792
|
var import_path71 = __toESM(require("path"), 1);
|
|
884761
884793
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
884762
884794
|
var LOGS_FOLDER_NAME = "logs";
|
|
884763
884795
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
884764
884796
|
function getCliSource() {
|
|
884765
|
-
const version7 = "5.101.
|
|
884797
|
+
const version7 = "5.101.1";
|
|
884766
884798
|
return `cli@${version7}`;
|
|
884767
884799
|
}
|
|
884768
884800
|
var DebugLogger = class {
|
|
@@ -884781,7 +884813,7 @@ var DebugLogger = class {
|
|
|
884781
884813
|
return;
|
|
884782
884814
|
}
|
|
884783
884815
|
this.consoleLogger = consoleLogger;
|
|
884784
|
-
const resolvedLogsDir = logsDir ?? join8(join8(AbsoluteFilePath2.of((0,
|
|
884816
|
+
const resolvedLogsDir = logsDir ?? join8(join8(AbsoluteFilePath2.of((0, import_os10.homedir)()), RelativeFilePath2.of(LOCAL_STORAGE_FOLDER4)), RelativeFilePath2.of(LOGS_FOLDER_NAME));
|
|
884785
884817
|
if (!await doesPathExist(resolvedLogsDir)) {
|
|
884786
884818
|
await (0, import_promises103.mkdir)(resolvedLogsDir, { recursive: true });
|
|
884787
884819
|
}
|
|
@@ -886090,11 +886122,11 @@ var WatcherLocker = class _WatcherLocker {
|
|
|
886090
886122
|
};
|
|
886091
886123
|
watcher_locks_resolver_default.add(free, timeout4);
|
|
886092
886124
|
const resolve15 = () => {
|
|
886093
|
-
const
|
|
886094
|
-
if (!
|
|
886125
|
+
const unlink12 = locks.unlink.get(ino);
|
|
886126
|
+
if (!unlink12)
|
|
886095
886127
|
return;
|
|
886096
886128
|
cleanup();
|
|
886097
|
-
const targetPathPrev =
|
|
886129
|
+
const targetPathPrev = unlink12();
|
|
886098
886130
|
if (targetPath === targetPathPrev) {
|
|
886099
886131
|
if (events.change) {
|
|
886100
886132
|
if (this._watcher._poller.stats.has(targetPath)) {
|
|
@@ -886820,9 +886852,9 @@ var import_cli_progress = __toESM(require_cli_progress(), 1);
|
|
|
886820
886852
|
var import_decompress = __toESM(require_decompress(), 1);
|
|
886821
886853
|
var import_fs28 = require("fs");
|
|
886822
886854
|
var import_promises104 = require("fs/promises");
|
|
886823
|
-
var
|
|
886855
|
+
var import_os11 = require("os");
|
|
886824
886856
|
var import_path72 = __toESM(require("path"), 1);
|
|
886825
|
-
var
|
|
886857
|
+
var import_tmp_promise11 = __toESM(require_tmp_promise(), 1);
|
|
886826
886858
|
var import_xml2js = __toESM(require_xml2js(), 1);
|
|
886827
886859
|
var PLATFORM_IS_WINDOWS = process.platform === "win32";
|
|
886828
886860
|
var DOCS_PREFIX = source_default.cyan("[docs]:");
|
|
@@ -886971,7 +887003,7 @@ function getLocalStorageFolder(cacheDir) {
|
|
|
886971
887003
|
if (cacheDir != null) {
|
|
886972
887004
|
return cacheDir;
|
|
886973
887005
|
}
|
|
886974
|
-
return join8(AbsoluteFilePath2.of((0,
|
|
887006
|
+
return join8(AbsoluteFilePath2.of((0, import_os11.homedir)()), RelativeFilePath2.of(LOCAL_STORAGE_FOLDER5));
|
|
886975
887007
|
}
|
|
886976
887008
|
function getPathToPreviewFolder({ app = false, cacheDir }) {
|
|
886977
887009
|
return join8(getLocalStorageFolder(cacheDir), RelativeFilePath2.of(app ? APP_PREVIEW_FOLDER_NAME : PREVIEW_FOLDER_NAME));
|
|
@@ -887025,7 +887057,7 @@ async function downloadBundle({ bucketUrl, logger: logger4, preferCached, app =
|
|
|
887025
887057
|
}
|
|
887026
887058
|
}
|
|
887027
887059
|
logger4.debug("Creating tmp directory to download docs preview bundle");
|
|
887028
|
-
const dir = await
|
|
887060
|
+
const dir = await import_tmp_promise11.default.dir({ prefix: "fern" });
|
|
887029
887061
|
const absoluteDirectoryToTmpDir = AbsoluteFilePath2.of(dir.path);
|
|
887030
887062
|
const docsBundleUrl = new URL(key2, bucketUrl).href;
|
|
887031
887063
|
logger4.debug(`Downloading docs preview bundle from ${docsBundleUrl}`);
|
|
@@ -888577,7 +888609,7 @@ async function runAppPreviewServer({ initialProject, reloadProject, validateProj
|
|
|
888577
888609
|
}
|
|
888578
888610
|
return translations;
|
|
888579
888611
|
}
|
|
888580
|
-
const genFilePath = import_path74.default.join(
|
|
888612
|
+
const genFilePath = import_path74.default.join(import_os12.default.tmpdir(), `fern-docs-dev-gen-${backendPort}`);
|
|
888581
888613
|
const generationManager = new GenerationFileManager(genFilePath);
|
|
888582
888614
|
const reloadDocsDefinition = async (editedAbsoluteFilepaths2) => {
|
|
888583
888615
|
context3.logger.info("Reloading docs...");
|
|
@@ -904299,7 +904331,7 @@ var import_promises115 = require("fs/promises");
|
|
|
904299
904331
|
var import_node_path39 = require("path");
|
|
904300
904332
|
init_lib70();
|
|
904301
904333
|
init_lib6();
|
|
904302
|
-
var
|
|
904334
|
+
var import_tmp_promise13 = __toESM(require_tmp_promise(), 1);
|
|
904303
904335
|
var PARSER_IMAGES = {
|
|
904304
904336
|
PYTHON: "fernenterprise/fern-python-library-docs-parser",
|
|
904305
904337
|
CPP: "fernenterprise/fern-cpp-library-docs-parser"
|
|
@@ -904320,8 +904352,8 @@ var PARSER_CLI_COMMAND = ["python", "-m", "src.cli_entrypoint"];
|
|
|
904320
904352
|
async function runLocalParser({ context: context3, sourcePath, language, config: config5 }) {
|
|
904321
904353
|
const imageName = getParserImage(language);
|
|
904322
904354
|
const isDefaultImage = imageName.endsWith(`:${PARSER_IMAGE_TAG}`);
|
|
904323
|
-
const outputDir = await
|
|
904324
|
-
const configFile = await
|
|
904355
|
+
const outputDir = await import_tmp_promise13.default.dir({ unsafeCleanup: true });
|
|
904356
|
+
const configFile = await import_tmp_promise13.default.file({ postfix: ".json" });
|
|
904325
904357
|
try {
|
|
904326
904358
|
await (0, import_promises115.writeFile)(configFile.path, JSON.stringify({
|
|
904327
904359
|
packagePath: config5.packagePath,
|
|
@@ -905589,7 +905621,7 @@ init_lib8();
|
|
|
905589
905621
|
var import_autoversion = __toESM(require_autoversion(), 1);
|
|
905590
905622
|
init_lib6();
|
|
905591
905623
|
init_axios2();
|
|
905592
|
-
var
|
|
905624
|
+
var import_crypto10 = require("crypto");
|
|
905593
905625
|
var import_form_data4 = __toESM(require_form_data(), 1);
|
|
905594
905626
|
var import_path81 = __toESM(require("path"), 1);
|
|
905595
905627
|
|
|
@@ -905625,7 +905657,7 @@ terminalLink.stderr = (text9, url3, options2 = {}) => terminalLink(text9, url3,
|
|
|
905625
905657
|
terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
|
|
905626
905658
|
|
|
905627
905659
|
// ../generation/remote-generation/remote-workspace-runner/lib/RemoteTaskHandler.js
|
|
905628
|
-
var
|
|
905660
|
+
var import_tmp_promise14 = __toESM(require_tmp_promise(), 1);
|
|
905629
905661
|
var import_yauzl = __toESM(require_yauzl(), 1);
|
|
905630
905662
|
|
|
905631
905663
|
// ../generation/remote-generation/remote-workspace-runner/lib/publishTarget.js
|
|
@@ -905975,7 +906007,7 @@ async function downloadZipForTask({ s3PreSignedReadUrl, absolutePathToLocalOutpu
|
|
|
905975
906007
|
timeout: 6e4,
|
|
905976
906008
|
signal: AbortSignal.timeout(S3_DOWNLOAD_TIMEOUT_MS)
|
|
905977
906009
|
});
|
|
905978
|
-
const tmpDir = await
|
|
906010
|
+
const tmpDir = await import_tmp_promise14.default.dir({ prefix: "fern", unsafeCleanup: true });
|
|
905979
906011
|
const outputZipPath = import_path80.default.join(tmpDir.path, "output.zip");
|
|
905980
906012
|
await (0, import_promises119.pipeline)(request7.data, (0, import_fs36.createWriteStream)(outputZipPath));
|
|
905981
906013
|
await forceRemoveDirectory(absolutePathToLocalOutput);
|
|
@@ -906045,7 +906077,7 @@ async function downloadFilesWithFernIgnoreInExistingRepo({ s3PreSignedReadUrl, a
|
|
|
906045
906077
|
await runGitCommand(["restore", "."], absolutePathToLocalOutput, context3);
|
|
906046
906078
|
}
|
|
906047
906079
|
async function downloadFilesWithFernIgnoreInTempRepo({ s3PreSignedReadUrl, absolutePathToLocalOutput, context: context3 }) {
|
|
906048
|
-
const tmpOutputResolutionDir = AbsoluteFilePath2.of((await
|
|
906080
|
+
const tmpOutputResolutionDir = AbsoluteFilePath2.of((await import_tmp_promise14.default.dir({})).path);
|
|
906049
906081
|
const absolutePathToFernignore = join8(absolutePathToLocalOutput, RelativeFilePath2.of(FERNIGNORE_FILENAME));
|
|
906050
906082
|
const fernIgnorePaths = await getFernIgnorePaths({ absolutePathToFernignore });
|
|
906051
906083
|
await (0, import_promises118.cp)(absolutePathToLocalOutput, tmpOutputResolutionDir, { recursive: true });
|
|
@@ -906079,7 +906111,7 @@ async function downloadAndExtractZipToDirectory({ s3PreSignedReadUrl, outputPath
|
|
|
906079
906111
|
timeout: 6e4,
|
|
906080
906112
|
signal: AbortSignal.timeout(S3_DOWNLOAD_TIMEOUT_MS)
|
|
906081
906113
|
});
|
|
906082
|
-
const tmpDir = await
|
|
906114
|
+
const tmpDir = await import_tmp_promise14.default.dir({ prefix: "fern", unsafeCleanup: true });
|
|
906083
906115
|
const outputZipPath = import_path80.default.join(tmpDir.path, "output.zip");
|
|
906084
906116
|
await (0, import_promises119.pipeline)(request7.data, (0, import_fs36.createWriteStream)(outputZipPath));
|
|
906085
906117
|
await extractZipToDirectory(outputZipPath, outputPath);
|
|
@@ -906581,9 +906613,9 @@ function assertSameBatchInput(participants) {
|
|
|
906581
906613
|
if (first3 == null) {
|
|
906582
906614
|
return;
|
|
906583
906615
|
}
|
|
906584
|
-
const sourceHash = (0,
|
|
906616
|
+
const sourceHash = (0, import_crypto10.createHash)("sha256").update(first3.specsTarGzBuffer).digest("hex");
|
|
906585
906617
|
for (const participant of participants.slice(1)) {
|
|
906586
|
-
const participantSourceHash = (0,
|
|
906618
|
+
const participantSourceHash = (0, import_crypto10.createHash)("sha256").update(participant.specsTarGzBuffer).digest("hex");
|
|
906587
906619
|
if (participant.apiName !== first3.apiName || participant.organization !== first3.organization || participant.token.value !== first3.token.value || participantSourceHash !== sourceHash) {
|
|
906588
906620
|
throw new Error("Fern sdk-gen-api batch targets must share API, organization, token, and sources");
|
|
906589
906621
|
}
|
|
@@ -906599,7 +906631,7 @@ function createFernSdkGenApiBatchRequest({ apiName, organization, cliVersion, sp
|
|
|
906599
906631
|
throw new Error(`Unsupported Fern SDK generator: ${generatorInvocation.name}`);
|
|
906600
906632
|
}
|
|
906601
906633
|
const output2 = mapFernSdkGenApiOutput(generatorInvocation);
|
|
906602
|
-
const targetId = (0,
|
|
906634
|
+
const targetId = (0, import_crypto10.createHash)("sha256").update(`${apiName}:${generatorInvocation.name}:${generatorInvocation.version}:${targetIdSeed ?? index3.toString()}`).digest("hex").slice(0, 20);
|
|
906603
906635
|
return {
|
|
906604
906636
|
targetId,
|
|
906605
906637
|
apiInputId: "default",
|
|
@@ -906629,7 +906661,7 @@ function createFernSdkGenApiBatchRequest({ apiName, organization, cliVersion, sp
|
|
|
906629
906661
|
};
|
|
906630
906662
|
});
|
|
906631
906663
|
const apiInputs = [{ id: "default", specIndexes: "all" }];
|
|
906632
|
-
const idempotencyKey = (0,
|
|
906664
|
+
const idempotencyKey = (0, import_crypto10.createHash)("sha256").update(specsTarGzBuffer).update(JSON.stringify({
|
|
906633
906665
|
protocolVersion: 1,
|
|
906634
906666
|
organization,
|
|
906635
906667
|
apiName,
|
|
@@ -907705,7 +907737,7 @@ init_lib9();
|
|
|
907705
907737
|
init_lib18();
|
|
907706
907738
|
init_lib6();
|
|
907707
907739
|
var import_promises123 = require("fs/promises");
|
|
907708
|
-
var
|
|
907740
|
+
var import_tmp_promise15 = __toESM(require_tmp_promise(), 1);
|
|
907709
907741
|
var PROTOBUF_ZIP_FILENAME = "proto.zip";
|
|
907710
907742
|
var SourceUploader = class {
|
|
907711
907743
|
sourceTypes;
|
|
@@ -907765,7 +907797,7 @@ var SourceUploader = class {
|
|
|
907765
907797
|
};
|
|
907766
907798
|
}
|
|
907767
907799
|
async zipSource(absolutePathToSource) {
|
|
907768
|
-
const tmpDir = await
|
|
907800
|
+
const tmpDir = await import_tmp_promise15.default.dir();
|
|
907769
907801
|
const destination = join8(AbsoluteFilePath2.of(tmpDir.path), RelativeFilePath2.of(PROTOBUF_ZIP_FILENAME));
|
|
907770
907802
|
this.context.logger.debug(`Zipping source ${absolutePathToSource} into ${destination}`);
|
|
907771
907803
|
await loggingExeca(this.context.logger, "zip", ["-r", destination, "."], {
|
|
@@ -908570,7 +908602,7 @@ init_lib68();
|
|
|
908570
908602
|
init_lib6();
|
|
908571
908603
|
init_axios2();
|
|
908572
908604
|
init_source();
|
|
908573
|
-
var
|
|
908605
|
+
var import_crypto12 = require("crypto");
|
|
908574
908606
|
var import_promises127 = require("fs/promises");
|
|
908575
908607
|
init_lodash();
|
|
908576
908608
|
var mime3 = __toESM(require_mime_types(), 1);
|
|
@@ -908645,7 +908677,7 @@ function normalizeRepoUrlToHttps(repo, provider) {
|
|
|
908645
908677
|
init_lib69();
|
|
908646
908678
|
init_js();
|
|
908647
908679
|
init_lib68();
|
|
908648
|
-
var
|
|
908680
|
+
var import_crypto11 = require("crypto");
|
|
908649
908681
|
var import_promises126 = require("fs/promises");
|
|
908650
908682
|
var mime2 = __toESM(require_mime_types(), 1);
|
|
908651
908683
|
|
|
@@ -908866,7 +908898,7 @@ var TRANSLATION_BUILD_CONCURRENCY = 4;
|
|
|
908866
908898
|
var UPLOAD_MAX_RETRIES = 3;
|
|
908867
908899
|
var UPLOAD_INITIAL_DELAY_MS = 1e3;
|
|
908868
908900
|
function sha256(data2) {
|
|
908869
|
-
return (0,
|
|
908901
|
+
return (0, import_crypto11.createHash)("sha256").update(data2).digest("hex");
|
|
908870
908902
|
}
|
|
908871
908903
|
var FILE_REF_PATTERN = /file:([^\s"'<>)}\]]+)/g;
|
|
908872
908904
|
function extractReferencedFiles(markdown) {
|
|
@@ -909335,7 +909367,7 @@ function sanitizeRelativePathForS3(relativeFilePath) {
|
|
|
909335
909367
|
}
|
|
909336
909368
|
async function readAndHashFile(absoluteFilePath) {
|
|
909337
909369
|
const buffer = await (0, import_promises127.readFile)(absoluteFilePath);
|
|
909338
|
-
const hash5 = (0,
|
|
909370
|
+
const hash5 = (0, import_crypto12.createHash)("sha256").update(new Uint8Array(buffer)).digest("hex");
|
|
909339
909371
|
return { buffer, hash: hash5 };
|
|
909340
909372
|
}
|
|
909341
909373
|
async function publishDocs({ token, organization, docsWorkspace, domain: domain3, customDomains, apiWorkspaces, ossWorkspaces, context: context3, preview, previewId, editThisPage, disableTemplates = false, skipUpload = false, withAiExamples = true, excludeApis = false, targetAudiences, docsUrl, cliVersion, ciSource, deployerAuthor, loginCommand = "fern login", multiSource = false }) {
|
|
@@ -910682,7 +910714,7 @@ var LegacyDocsPublisher = class {
|
|
|
910682
910714
|
previewId,
|
|
910683
910715
|
disableTemplates: void 0,
|
|
910684
910716
|
skipUpload,
|
|
910685
|
-
cliVersion: "5.101.
|
|
910717
|
+
cliVersion: "5.101.1",
|
|
910686
910718
|
loginCommand: "fern auth login"
|
|
910687
910719
|
});
|
|
910688
910720
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -914058,7 +914090,7 @@ init_js_yaml();
|
|
|
914058
914090
|
init_lib8();
|
|
914059
914091
|
init_lib6();
|
|
914060
914092
|
var import_promises130 = require("fs/promises");
|
|
914061
|
-
var
|
|
914093
|
+
var import_os13 = require("os");
|
|
914062
914094
|
var import_path88 = __toESM(require("path"), 1);
|
|
914063
914095
|
|
|
914064
914096
|
// ../cli-v2/lib/api/resolver/ApiSpecDetector.js
|
|
@@ -914134,7 +914166,7 @@ var ApiSpecResolver = class {
|
|
|
914134
914166
|
});
|
|
914135
914167
|
}
|
|
914136
914168
|
const extension4 = this.inferExtensionFromContent(content5);
|
|
914137
|
-
const tempDir2 = await (0, import_promises130.mkdtemp)(import_path88.default.join((0,
|
|
914169
|
+
const tempDir2 = await (0, import_promises130.mkdtemp)(import_path88.default.join((0, import_os13.tmpdir)(), "fern-"));
|
|
914138
914170
|
const absoluteFilePath = AbsoluteFilePath2.of(import_path88.default.join(tempDir2, `spec${extension4}`));
|
|
914139
914171
|
await (0, import_promises130.writeFile)(absoluteFilePath, content5, "utf-8");
|
|
914140
914172
|
const specType = await this.detector.detect({ absoluteFilePath, content: content5, reference: "stdin" });
|
|
@@ -914152,7 +914184,7 @@ var ApiSpecResolver = class {
|
|
|
914152
914184
|
async resolveUrl({ reference: reference4 }) {
|
|
914153
914185
|
const { content: content5, contentType } = await this.fetchContent({ url: reference4 });
|
|
914154
914186
|
const extension4 = this.inferExtension({ url: reference4, contentType });
|
|
914155
|
-
const tempDir2 = await (0, import_promises130.mkdtemp)(import_path88.default.join((0,
|
|
914187
|
+
const tempDir2 = await (0, import_promises130.mkdtemp)(import_path88.default.join((0, import_os13.tmpdir)(), "fern-"));
|
|
914156
914188
|
const absoluteFilePath = AbsoluteFilePath2.of(import_path88.default.join(tempDir2, `spec${extension4}`));
|
|
914157
914189
|
await (0, import_promises130.writeFile)(absoluteFilePath, content5, "utf-8");
|
|
914158
914190
|
const specType = await this.detector.detect({ absoluteFilePath, content: content5, reference: reference4 });
|
|
@@ -964042,7 +964074,7 @@ var import_serialization = __toESM(require_serialization3(), 1);
|
|
|
964042
964074
|
var import_promises143 = require("fs/promises");
|
|
964043
964075
|
var path104 = __toESM(require("path"), 1);
|
|
964044
964076
|
var import_path100 = require("path");
|
|
964045
|
-
var
|
|
964077
|
+
var import_tmp_promise18 = __toESM(require_tmp_promise(), 1);
|
|
964046
964078
|
|
|
964047
964079
|
// ../generation/local-generation/local-workspace-runner/lib/applyTypeRelocations.js
|
|
964048
964080
|
init_lib8();
|
|
@@ -964635,10 +964667,10 @@ init_lib18();
|
|
|
964635
964667
|
init_lib6();
|
|
964636
964668
|
var import_decompress2 = __toESM(require_decompress(), 1);
|
|
964637
964669
|
var import_promises141 = require("fs/promises");
|
|
964638
|
-
var
|
|
964670
|
+
var import_os14 = require("os");
|
|
964639
964671
|
var import_path98 = require("path");
|
|
964640
964672
|
var import_semver13 = __toESM(require_semver2(), 1);
|
|
964641
|
-
var
|
|
964673
|
+
var import_tmp_promise16 = __toESM(require_tmp_promise(), 1);
|
|
964642
964674
|
|
|
964643
964675
|
// ../generation/local-generation/local-workspace-runner/lib/sanitizeChangelogEntry.js
|
|
964644
964676
|
init_lib4();
|
|
@@ -965151,7 +965183,7 @@ var LocalTaskHandler = class {
|
|
|
965151
965183
|
await this.runGitCommand(["restore", "."], this.absolutePathToLocalOutput);
|
|
965152
965184
|
}
|
|
965153
965185
|
async copyGeneratedFilesWithFernIgnoreInTempRepo() {
|
|
965154
|
-
const tmpOutputResolutionDir = AbsoluteFilePath2.of((await
|
|
965186
|
+
const tmpOutputResolutionDir = AbsoluteFilePath2.of((await import_tmp_promise16.default.dir({})).path);
|
|
965155
965187
|
const absolutePathToFernignore = AbsoluteFilePath2.of(join8(this.absolutePathToLocalOutput, RelativeFilePath2.of(FERNIGNORE_FILENAME)));
|
|
965156
965188
|
const fernIgnorePaths = await getFernIgnorePaths({ absolutePathToFernignore });
|
|
965157
965189
|
const pathsToPreserve = await this.getPathsToPreserve(fernIgnorePaths);
|
|
@@ -965411,7 +965443,7 @@ var LocalTaskHandler = class {
|
|
|
965411
965443
|
* when the copy path does not stage files (copyGeneratedFilesNoFernIgnorePreservingGit).
|
|
965412
965444
|
*/
|
|
965413
965445
|
async generateDiffFile() {
|
|
965414
|
-
const diffFile = (0, import_path98.join)((0,
|
|
965446
|
+
const diffFile = (0, import_path98.join)((0, import_os14.tmpdir)(), `git-diff-${Date.now()}.patch`);
|
|
965415
965447
|
await this.runGitCommand(["add", "-N", "."], this.absolutePathToLocalOutput);
|
|
965416
965448
|
await this.runGitCommand(["diff", "HEAD", "--output", diffFile, "--", ".", ":(exclude).fern/metadata.json"], this.absolutePathToLocalOutput);
|
|
965417
965449
|
this.context.logger.info(`Generated git diff to file: ${diffFile}`);
|
|
@@ -965435,7 +965467,7 @@ var import_promises142 = require("fs/promises");
|
|
|
965435
965467
|
init_js_yaml();
|
|
965436
965468
|
var import_path99 = __toESM(require("path"), 1);
|
|
965437
965469
|
init_index_min2();
|
|
965438
|
-
var
|
|
965470
|
+
var import_tmp_promise17 = __toESM(require_tmp_promise(), 1);
|
|
965439
965471
|
async function collectRawSpecs({ specs, hostOutputDir, containerBaseDir, context: context3, audiences }) {
|
|
965440
965472
|
const manifest = { specs: [] };
|
|
965441
965473
|
if (specs.length === 0) {
|
|
@@ -965682,7 +965714,7 @@ function hasOperations(pathItem) {
|
|
|
965682
965714
|
return Object.keys(pathItem).some((key2) => HTTP_METHODS3.has(key2.toLowerCase()));
|
|
965683
965715
|
}
|
|
965684
965716
|
async function createSpecsTarGzBuffer({ specs, context: context3, audiences }) {
|
|
965685
|
-
const tmpDir = await
|
|
965717
|
+
const tmpDir = await import_tmp_promise17.default.dir({ unsafeCleanup: true });
|
|
965686
965718
|
try {
|
|
965687
965719
|
const manifest = await collectRawSpecs({
|
|
965688
965720
|
specs,
|
|
@@ -965871,7 +965903,7 @@ async function writeIrToFile({ ir: ir3, workspaceTempDir, filename, context: con
|
|
|
965871
965903
|
if (filename) {
|
|
965872
965904
|
absolutePathToIr = AbsoluteFilePath2.of((0, import_path100.join)(workspaceTempDir.path, filename));
|
|
965873
965905
|
} else {
|
|
965874
|
-
const irFile = await
|
|
965906
|
+
const irFile = await import_tmp_promise18.default.file({
|
|
965875
965907
|
tmpdir: workspaceTempDir.path
|
|
965876
965908
|
});
|
|
965877
965909
|
absolutePathToIr = AbsoluteFilePath2.of(irFile.path);
|
|
@@ -965914,9 +965946,9 @@ init_lib6();
|
|
|
965914
965946
|
init_lib65();
|
|
965915
965947
|
init_source();
|
|
965916
965948
|
var fs30 = __toESM(require("fs/promises"), 1);
|
|
965917
|
-
var
|
|
965949
|
+
var import_os15 = __toESM(require("os"), 1);
|
|
965918
965950
|
var import_path101 = __toESM(require("path"), 1);
|
|
965919
|
-
var
|
|
965951
|
+
var import_tmp_promise19 = __toESM(require_tmp_promise(), 1);
|
|
965920
965952
|
|
|
965921
965953
|
// ../generation/local-generation/local-workspace-runner/lib/getGeneratorOutputSubfolder.js
|
|
965922
965954
|
function getGeneratorOutputSubfolder(generatorName) {
|
|
@@ -966052,7 +966084,7 @@ async function runLocalGenerationForWorkspace({ token, projectConfig, workspace,
|
|
|
966052
966084
|
intermediateRepresentation.publishConfig = publishConfig;
|
|
966053
966085
|
}
|
|
966054
966086
|
const absolutePathToPreviewForGenerator = resolveAbsolutePathToLocalPreview(absolutePathToPreview, generatorInvocation);
|
|
966055
|
-
const absolutePathToLocalOutput = absolutePathToPreviewForGenerator ?? generatorInvocation.absolutePathToLocalOutput ?? AbsoluteFilePath2.of(await
|
|
966087
|
+
const absolutePathToLocalOutput = absolutePathToPreviewForGenerator ?? generatorInvocation.absolutePathToLocalOutput ?? AbsoluteFilePath2.of(await import_tmp_promise19.default.dir().then((dir) => dir.path));
|
|
966056
966088
|
const selfhostedGithubConfig = getSelfhostedGithubConfig(generatorInvocation, absolutePathToPreviewForGenerator != null);
|
|
966057
966089
|
if (version7 != null && (0, import_autoversion5.isAutoVersion)(version7)) {
|
|
966058
966090
|
if (selfhostedGithubConfig == null) {
|
|
@@ -966264,10 +966296,10 @@ function resolveAbsolutePathToLocalPreview(absolutePathToPreview, generatorInvoc
|
|
|
966264
966296
|
return join8(absolutePathToPreview, RelativeFilePath2.of(subfolderName));
|
|
966265
966297
|
}
|
|
966266
966298
|
async function getWorkspaceTempDir() {
|
|
966267
|
-
return
|
|
966299
|
+
return import_tmp_promise19.default.dir({
|
|
966268
966300
|
// use the /private prefix on osx so that docker can access the tmpdir
|
|
966269
966301
|
// see https://stackoverflow.com/a/45123074
|
|
966270
|
-
tmpdir:
|
|
966302
|
+
tmpdir: import_os15.default.platform() === "darwin" ? import_path101.default.join("/private", import_os15.default.tmpdir()) : void 0,
|
|
966271
966303
|
prefix: "fern"
|
|
966272
966304
|
});
|
|
966273
966305
|
}
|
|
@@ -967043,7 +967075,7 @@ init_lib8();
|
|
|
967043
967075
|
init_lib5();
|
|
967044
967076
|
init_lib6();
|
|
967045
967077
|
var import_promises146 = require("fs/promises");
|
|
967046
|
-
var
|
|
967078
|
+
var import_os16 = require("os");
|
|
967047
967079
|
var LegacyRemoteGenerationRunner = class {
|
|
967048
967080
|
context;
|
|
967049
967081
|
cliVersion;
|
|
@@ -967136,7 +967168,7 @@ var LegacyRemoteGenerationRunner = class {
|
|
|
967136
967168
|
}
|
|
967137
967169
|
async getAbsolutePathToPreview(args) {
|
|
967138
967170
|
if (this.isLocalGitCombo(args)) {
|
|
967139
|
-
const tmpPreviewDirectory = await (0, import_promises146.mkdtemp)(join8(AbsoluteFilePath2.of((0,
|
|
967171
|
+
const tmpPreviewDirectory = await (0, import_promises146.mkdtemp)(join8(AbsoluteFilePath2.of((0, import_os16.tmpdir)()), RelativeFilePath2.of("fern-preview-")));
|
|
967140
967172
|
return AbsoluteFilePath2.of(tmpPreviewDirectory);
|
|
967141
967173
|
}
|
|
967142
967174
|
if (!args.preview) {
|
|
@@ -974111,7 +974143,7 @@ init_axios2();
|
|
|
974111
974143
|
var import_promises161 = require("fs/promises");
|
|
974112
974144
|
init_js_yaml();
|
|
974113
974145
|
var import_path107 = require("path");
|
|
974114
|
-
var
|
|
974146
|
+
var import_tmp_promise20 = __toESM(require_tmp_promise(), 1);
|
|
974115
974147
|
var LoadOpenAPIStatus;
|
|
974116
974148
|
(function(LoadOpenAPIStatus2) {
|
|
974117
974149
|
LoadOpenAPIStatus2["Success"] = "success";
|
|
@@ -974120,7 +974152,7 @@ var LoadOpenAPIStatus;
|
|
|
974120
974152
|
async function loadOpenAPIFromUrl({ url: url3, logger: logger4 }) {
|
|
974121
974153
|
try {
|
|
974122
974154
|
const data2 = await fetchOpenAPIFromUrl({ url: url3, logger: logger4 });
|
|
974123
|
-
const tmpDir = await
|
|
974155
|
+
const tmpDir = await import_tmp_promise20.default.dir();
|
|
974124
974156
|
const filePath = (0, import_path107.join)(tmpDir.path, url3.endsWith(".json") ? "openapi.json" : "openapi.yaml");
|
|
974125
974157
|
logger4.debug("tmpDir", tmpDir.path);
|
|
974126
974158
|
logger4.debug("filePath", filePath);
|
|
@@ -978053,7 +978085,7 @@ function getAutomationContextFromEnv() {
|
|
|
978053
978085
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
978054
978086
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
978055
978087
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
978056
|
-
cli_version: "5.101.
|
|
978088
|
+
cli_version: "5.101.1"
|
|
978057
978089
|
};
|
|
978058
978090
|
}
|
|
978059
978091
|
function isAutomationMode() {
|
|
@@ -978885,7 +978917,7 @@ var CliContext = class _CliContext {
|
|
|
978885
978917
|
if (false) {
|
|
978886
978918
|
this.logger.error("CLI_VERSION is not defined");
|
|
978887
978919
|
}
|
|
978888
|
-
return "5.101.
|
|
978920
|
+
return "5.101.1";
|
|
978889
978921
|
}
|
|
978890
978922
|
getCliName() {
|
|
978891
978923
|
if (false) {
|
|
@@ -979387,13 +979419,13 @@ init_lib18();
|
|
|
979387
979419
|
init_lib6();
|
|
979388
979420
|
var import_fs40 = require("fs");
|
|
979389
979421
|
var import_promises164 = require("fs/promises");
|
|
979390
|
-
var
|
|
979422
|
+
var import_os17 = require("os");
|
|
979391
979423
|
var import_path108 = require("path");
|
|
979392
979424
|
var import_semver15 = __toESM(require_semver2(), 1);
|
|
979393
979425
|
var import_url10 = require("url");
|
|
979394
979426
|
var MIGRATION_PACKAGE_NAME2 = "@fern-api/generator-migrations";
|
|
979395
979427
|
function getMigrationCacheDir() {
|
|
979396
|
-
return (0, import_path108.join)((0,
|
|
979428
|
+
return (0, import_path108.join)((0, import_os17.homedir)(), ".fern", "migration-cache");
|
|
979397
979429
|
}
|
|
979398
979430
|
var LOCK_FILENAME = ".install.lock";
|
|
979399
979431
|
var LOCK_POLL_MS = 200;
|
|
@@ -980439,10 +980471,10 @@ var import_promises168 = require("fs/promises");
|
|
|
980439
980471
|
|
|
980440
980472
|
// src/persistence/output-directories/getPathToOutputDirectoriesFile.ts
|
|
980441
980473
|
init_lib8();
|
|
980442
|
-
var
|
|
980474
|
+
var import_os18 = require("os");
|
|
980443
980475
|
function getPathToOutputDirectoriesFile() {
|
|
980444
980476
|
return join8(
|
|
980445
|
-
AbsoluteFilePath2.of((0,
|
|
980477
|
+
AbsoluteFilePath2.of((0, import_os18.homedir)()),
|
|
980446
980478
|
RelativeFilePath2.of(LOCAL_STORAGE_FOLDER6),
|
|
980447
980479
|
RelativeFilePath2.of(APPROVED_DIRECTORIES_FILENAME)
|
|
980448
980480
|
);
|
|
@@ -988812,7 +988844,7 @@ var import_path114 = __toESM(require("path"), 1);
|
|
|
988812
988844
|
init_lib8();
|
|
988813
988845
|
init_lib6();
|
|
988814
988846
|
var import_child_process13 = require("child_process");
|
|
988815
|
-
var
|
|
988847
|
+
var import_crypto13 = require("crypto");
|
|
988816
988848
|
var import_promises205 = require("fs/promises");
|
|
988817
988849
|
var import_mime_types2 = __toESM(require_mime_types(), 1);
|
|
988818
988850
|
var import_path113 = __toESM(require("path"), 1);
|
|
@@ -989028,7 +989060,7 @@ ${errors4.map((e2) => ` - ${e2}`).join("\n")}`,
|
|
|
989028
989060
|
return this.uploadToCas(content5, contentType, bindPath, import_path113.default.basename(absolutePath));
|
|
989029
989061
|
}
|
|
989030
989062
|
async uploadToCas(content5, contentType, bindPath, label) {
|
|
989031
|
-
const hash5 = (0,
|
|
989063
|
+
const hash5 = (0, import_crypto13.createHash)("sha256").update(content5).digest("hex");
|
|
989032
989064
|
const casUrl = `${FDR_ORIGIN}/v2/registry/content/${encodeURIComponent(this.orgId)}/${hash5}`;
|
|
989033
989065
|
this.context.logger.debug(` CAS check: PUT ${casUrl} (${contentType}, ${content5.byteLength} bytes)`);
|
|
989034
989066
|
let checkRes;
|
|
@@ -992073,7 +992105,7 @@ init_lib6();
|
|
|
992073
992105
|
init_source();
|
|
992074
992106
|
var import_fs43 = require("fs");
|
|
992075
992107
|
var import_promises212 = require("fs/promises");
|
|
992076
|
-
var
|
|
992108
|
+
var import_os19 = require("os");
|
|
992077
992109
|
var import_path120 = __toESM(require("path"), 1);
|
|
992078
992110
|
|
|
992079
992111
|
// src/commands/mcp/mcpConfig.ts
|
|
@@ -992176,7 +992208,7 @@ function toTomlString(value2) {
|
|
|
992176
992208
|
|
|
992177
992209
|
// src/commands/mcp/installMcpServer.ts
|
|
992178
992210
|
function getClientTarget(client3) {
|
|
992179
|
-
const home = (0,
|
|
992211
|
+
const home = (0, import_os19.homedir)();
|
|
992180
992212
|
switch (client3) {
|
|
992181
992213
|
case "claude":
|
|
992182
992214
|
return {
|
|
@@ -993106,7 +993138,7 @@ init_axios2();
|
|
|
993106
993138
|
var import_promises214 = require("fs/promises");
|
|
993107
993139
|
var import_path121 = __toESM(require("path"), 1);
|
|
993108
993140
|
init_index_min2();
|
|
993109
|
-
var
|
|
993141
|
+
var import_tmp_promise21 = __toESM(require_tmp_promise(), 1);
|
|
993110
993142
|
async function registerWorkspacesV1({
|
|
993111
993143
|
project,
|
|
993112
993144
|
cliContext,
|
|
@@ -993152,7 +993184,7 @@ async function registerWorkspacesV1({
|
|
|
993152
993184
|
});
|
|
993153
993185
|
return;
|
|
993154
993186
|
}
|
|
993155
|
-
const tmpDir = await
|
|
993187
|
+
const tmpDir = await import_tmp_promise21.default.dir();
|
|
993156
993188
|
const tarPath = import_path121.default.join(tmpDir.path, "definition.tgz");
|
|
993157
993189
|
context3.logger.debug(`Compressing definition at ${tmpDir.path}`);
|
|
993158
993190
|
await Kn({ file: tarPath, cwd: resolvedWorkspace.absoluteFilePath }, ["."]);
|
|
@@ -993462,7 +993494,7 @@ function computePreviewVersion({ previewId }) {
|
|
|
993462
993494
|
|
|
993463
993495
|
// src/commands/sdk-preview/getPreviewId.ts
|
|
993464
993496
|
var import_child_process15 = require("child_process");
|
|
993465
|
-
var
|
|
993497
|
+
var import_crypto14 = require("crypto");
|
|
993466
993498
|
var import_util71 = require("util");
|
|
993467
993499
|
var execAsync2 = (0, import_util71.promisify)(import_child_process15.exec);
|
|
993468
993500
|
var MAX_PREVIEW_ID_LENGTH = 40;
|
|
@@ -993486,7 +993518,7 @@ function sanitizeBranchName(branch) {
|
|
|
993486
993518
|
return branch.toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "").slice(0, MAX_PREVIEW_ID_LENGTH).replace(/-$/, "");
|
|
993487
993519
|
}
|
|
993488
993520
|
function generateRandomId() {
|
|
993489
|
-
return (0,
|
|
993521
|
+
return (0, import_crypto14.randomBytes)(4).toString("hex");
|
|
993490
993522
|
}
|
|
993491
993523
|
|
|
993492
993524
|
// src/commands/sdk-preview/toPreviewPackageName.ts
|