fern-api 0.15.7 → 0.15.8
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/bundle.cjs +216 -206
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -3056,10 +3056,10 @@ var require_tmp_promise = __commonJS({
|
|
|
3056
3056
|
"pnp:/home/circleci/project/.yarn/cache/tmp-promise-npm-3.0.3-6df4ad8df9-f854f5307d.zip/node_modules/tmp-promise/index.js"(exports2, module2) {
|
|
3057
3057
|
"use strict";
|
|
3058
3058
|
var { promisify: promisify3 } = require("util");
|
|
3059
|
-
var
|
|
3060
|
-
module2.exports.fileSync =
|
|
3059
|
+
var tmp9 = require_tmp();
|
|
3060
|
+
module2.exports.fileSync = tmp9.fileSync;
|
|
3061
3061
|
var fileWithOptions = promisify3(
|
|
3062
|
-
(options, cb) =>
|
|
3062
|
+
(options, cb) => tmp9.file(
|
|
3063
3063
|
options,
|
|
3064
3064
|
(err, path31, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path31, fd, cleanup: promisify3(cleanup) })
|
|
3065
3065
|
)
|
|
@@ -3073,9 +3073,9 @@ var require_tmp_promise = __commonJS({
|
|
|
3073
3073
|
await cleanup();
|
|
3074
3074
|
}
|
|
3075
3075
|
};
|
|
3076
|
-
module2.exports.dirSync =
|
|
3076
|
+
module2.exports.dirSync = tmp9.dirSync;
|
|
3077
3077
|
var dirWithOptions = promisify3(
|
|
3078
|
-
(options, cb) =>
|
|
3078
|
+
(options, cb) => tmp9.dir(
|
|
3079
3079
|
options,
|
|
3080
3080
|
(err, path31, cleanup) => err ? cb(err) : cb(void 0, { path: path31, cleanup: promisify3(cleanup) })
|
|
3081
3081
|
)
|
|
@@ -3089,10 +3089,10 @@ var require_tmp_promise = __commonJS({
|
|
|
3089
3089
|
await cleanup();
|
|
3090
3090
|
}
|
|
3091
3091
|
};
|
|
3092
|
-
module2.exports.tmpNameSync =
|
|
3093
|
-
module2.exports.tmpName = promisify3(
|
|
3094
|
-
module2.exports.tmpdir =
|
|
3095
|
-
module2.exports.setGracefulCleanup =
|
|
3092
|
+
module2.exports.tmpNameSync = tmp9.tmpNameSync;
|
|
3093
|
+
module2.exports.tmpName = promisify3(tmp9.tmpName);
|
|
3094
|
+
module2.exports.tmpdir = tmp9.tmpdir;
|
|
3095
|
+
module2.exports.setGracefulCleanup = tmp9.setGracefulCleanup;
|
|
3096
3096
|
}
|
|
3097
3097
|
});
|
|
3098
3098
|
|
|
@@ -20993,8 +20993,8 @@ var require_graceful_fs = __commonJS({
|
|
|
20993
20993
|
}
|
|
20994
20994
|
}
|
|
20995
20995
|
var fs$writeFile = fs5.writeFile;
|
|
20996
|
-
fs5.writeFile =
|
|
20997
|
-
function
|
|
20996
|
+
fs5.writeFile = writeFile35;
|
|
20997
|
+
function writeFile35(path31, data2, options, cb) {
|
|
20998
20998
|
if (typeof options === "function")
|
|
20999
20999
|
cb = options, options = null;
|
|
21000
21000
|
return go$writeFile(path31, data2, options, cb);
|
|
@@ -22509,7 +22509,7 @@ var require_jsonfile = __commonJS({
|
|
|
22509
22509
|
const str2 = stringify5(obj, options);
|
|
22510
22510
|
await universalify.fromCallback(fs4.writeFile)(file, str2, options);
|
|
22511
22511
|
}
|
|
22512
|
-
var
|
|
22512
|
+
var writeFile35 = universalify.fromPromise(_writeFile);
|
|
22513
22513
|
function writeFileSync(file, obj, options = {}) {
|
|
22514
22514
|
const fs4 = options.fs || _fs;
|
|
22515
22515
|
const str2 = stringify5(obj, options);
|
|
@@ -22518,7 +22518,7 @@ var require_jsonfile = __commonJS({
|
|
|
22518
22518
|
var jsonfile = {
|
|
22519
22519
|
readFile: readFile36,
|
|
22520
22520
|
readFileSync: readFileSync4,
|
|
22521
|
-
writeFile:
|
|
22521
|
+
writeFile: writeFile35,
|
|
22522
22522
|
writeFileSync
|
|
22523
22523
|
};
|
|
22524
22524
|
module2.exports = jsonfile;
|
|
@@ -95829,9 +95829,9 @@ var require_utf16 = __commonJS({
|
|
|
95829
95829
|
Utf16BEEncoder.prototype.write = function(str2) {
|
|
95830
95830
|
var buf = Buffer6.from(str2, "ucs2");
|
|
95831
95831
|
for (var i2 = 0; i2 < buf.length; i2 += 2) {
|
|
95832
|
-
var
|
|
95832
|
+
var tmp9 = buf[i2];
|
|
95833
95833
|
buf[i2] = buf[i2 + 1];
|
|
95834
|
-
buf[i2 + 1] =
|
|
95834
|
+
buf[i2 + 1] = tmp9;
|
|
95835
95835
|
}
|
|
95836
95836
|
return buf;
|
|
95837
95837
|
};
|
|
@@ -109605,11 +109605,11 @@ var require_third_party = __commonJS({
|
|
|
109605
109605
|
}
|
|
109606
109606
|
return current2;
|
|
109607
109607
|
}
|
|
109608
|
-
module22.exports = (chalk4,
|
|
109608
|
+
module22.exports = (chalk4, tmp9) => {
|
|
109609
109609
|
const styles4 = [];
|
|
109610
109610
|
const chunks = [];
|
|
109611
109611
|
let chunk2 = [];
|
|
109612
|
-
|
|
109612
|
+
tmp9.replace(TEMPLATE_REGEX2, (m, escapeChar, inverse, style, close, chr) => {
|
|
109613
109613
|
if (escapeChar) {
|
|
109614
109614
|
chunk2.push(unescape4(escapeChar));
|
|
109615
109615
|
} else if (style) {
|
|
@@ -294210,9 +294210,9 @@ var require_prettier = __commonJS({
|
|
|
294210
294210
|
component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
|
|
294211
294211
|
oldPos += component.count;
|
|
294212
294212
|
if (componentPos && components[componentPos - 1].added) {
|
|
294213
|
-
var
|
|
294213
|
+
var tmp9 = components[componentPos - 1];
|
|
294214
294214
|
components[componentPos - 1] = components[componentPos];
|
|
294215
|
-
components[componentPos] =
|
|
294215
|
+
components[componentPos] = tmp9;
|
|
294216
294216
|
}
|
|
294217
294217
|
}
|
|
294218
294218
|
}
|
|
@@ -297581,11 +297581,11 @@ var require_prettier = __commonJS({
|
|
|
297581
297581
|
}
|
|
297582
297582
|
return current2;
|
|
297583
297583
|
}
|
|
297584
|
-
module22.exports = (chalk4,
|
|
297584
|
+
module22.exports = (chalk4, tmp9) => {
|
|
297585
297585
|
const styles4 = [];
|
|
297586
297586
|
const chunks = [];
|
|
297587
297587
|
let chunk2 = [];
|
|
297588
|
-
|
|
297588
|
+
tmp9.replace(TEMPLATE_REGEX2, (m, escapeChar, inverse, style, close, chr) => {
|
|
297589
297589
|
if (escapeChar) {
|
|
297590
297590
|
chunk2.push(unescape4(escapeChar));
|
|
297591
297591
|
} else if (style) {
|
|
@@ -297869,7 +297869,7 @@ var require_prettier = __commonJS({
|
|
|
297869
297869
|
}
|
|
297870
297870
|
var bCharCode;
|
|
297871
297871
|
var ret;
|
|
297872
|
-
var
|
|
297872
|
+
var tmp9;
|
|
297873
297873
|
var tmp22;
|
|
297874
297874
|
var i2 = 0;
|
|
297875
297875
|
var j2 = 0;
|
|
@@ -297879,12 +297879,12 @@ var require_prettier = __commonJS({
|
|
|
297879
297879
|
}
|
|
297880
297880
|
while (j2 < bLen) {
|
|
297881
297881
|
bCharCode = b2.charCodeAt(start3 + j2);
|
|
297882
|
-
|
|
297882
|
+
tmp9 = j2++;
|
|
297883
297883
|
ret = j2;
|
|
297884
297884
|
for (i2 = 0; i2 < aLen; i2++) {
|
|
297885
|
-
tmp22 = bCharCode === charCodeCache[start3 + i2] ?
|
|
297886
|
-
|
|
297887
|
-
ret = arr[i2] =
|
|
297885
|
+
tmp22 = bCharCode === charCodeCache[start3 + i2] ? tmp9 : tmp9 + 1;
|
|
297886
|
+
tmp9 = arr[i2];
|
|
297887
|
+
ret = arr[i2] = tmp9 > ret ? tmp22 > ret ? ret + 1 : tmp22 : tmp22 > tmp9 ? tmp9 + 1 : tmp22;
|
|
297888
297888
|
}
|
|
297889
297889
|
}
|
|
297890
297890
|
return ret;
|
|
@@ -299274,11 +299274,11 @@ var require_prettier = __commonJS({
|
|
|
299274
299274
|
}
|
|
299275
299275
|
return current2;
|
|
299276
299276
|
}
|
|
299277
|
-
module22.exports = (chalk4,
|
|
299277
|
+
module22.exports = (chalk4, tmp9) => {
|
|
299278
299278
|
const styles4 = [];
|
|
299279
299279
|
const chunks = [];
|
|
299280
299280
|
let chunk2 = [];
|
|
299281
|
-
|
|
299281
|
+
tmp9.replace(TEMPLATE_REGEX2, (m, escapeChar, inverse, style, close, chr) => {
|
|
299282
299282
|
if (escapeChar) {
|
|
299283
299283
|
chunk2.push(unescape4(escapeChar));
|
|
299284
299284
|
} else if (style) {
|
|
@@ -361156,7 +361156,7 @@ var require_loader = __commonJS({
|
|
|
361156
361156
|
throwError2(state, "unexpected end of the stream within a single quoted scalar");
|
|
361157
361157
|
}
|
|
361158
361158
|
function readDoubleQuotedScalar2(state, nodeIndent) {
|
|
361159
|
-
var captureStart, captureEnd, hexLength, hexResult,
|
|
361159
|
+
var captureStart, captureEnd, hexLength, hexResult, tmp9, ch;
|
|
361160
361160
|
ch = state.input.charCodeAt(state.position);
|
|
361161
361161
|
if (ch !== 34) {
|
|
361162
361162
|
return false;
|
|
@@ -361178,13 +361178,13 @@ var require_loader = __commonJS({
|
|
|
361178
361178
|
} else if (ch < 256 && simpleEscapeCheck2[ch]) {
|
|
361179
361179
|
state.result += simpleEscapeMap2[ch];
|
|
361180
361180
|
state.position++;
|
|
361181
|
-
} else if ((
|
|
361182
|
-
hexLength =
|
|
361181
|
+
} else if ((tmp9 = escapedHexLen2(ch)) > 0) {
|
|
361182
|
+
hexLength = tmp9;
|
|
361183
361183
|
hexResult = 0;
|
|
361184
361184
|
for (; hexLength > 0; hexLength--) {
|
|
361185
361185
|
ch = state.input.charCodeAt(++state.position);
|
|
361186
|
-
if ((
|
|
361187
|
-
hexResult = (hexResult << 4) +
|
|
361186
|
+
if ((tmp9 = fromHexCode2(ch)) >= 0) {
|
|
361187
|
+
hexResult = (hexResult << 4) + tmp9;
|
|
361188
361188
|
} else {
|
|
361189
361189
|
throwError2(state, "expected hexadecimal character");
|
|
361190
361190
|
}
|
|
@@ -361281,7 +361281,7 @@ var require_loader = __commonJS({
|
|
|
361281
361281
|
throwError2(state, "unexpected end of the stream within a flow collection");
|
|
361282
361282
|
}
|
|
361283
361283
|
function readBlockScalar2(state, nodeIndent) {
|
|
361284
|
-
var captureStart, folding, chomping = CHOMPING_CLIP2, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false,
|
|
361284
|
+
var captureStart, folding, chomping = CHOMPING_CLIP2, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp9, ch;
|
|
361285
361285
|
ch = state.input.charCodeAt(state.position);
|
|
361286
361286
|
if (ch === 124) {
|
|
361287
361287
|
folding = false;
|
|
@@ -361300,11 +361300,11 @@ var require_loader = __commonJS({
|
|
|
361300
361300
|
} else {
|
|
361301
361301
|
throwError2(state, "repeat of a chomping mode identifier");
|
|
361302
361302
|
}
|
|
361303
|
-
} else if ((
|
|
361304
|
-
if (
|
|
361303
|
+
} else if ((tmp9 = fromDecimalCode2(ch)) >= 0) {
|
|
361304
|
+
if (tmp9 === 0) {
|
|
361305
361305
|
throwError2(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
|
|
361306
361306
|
} else if (!detectedIndent) {
|
|
361307
|
-
textIndent = nodeIndent +
|
|
361307
|
+
textIndent = nodeIndent + tmp9 - 1;
|
|
361308
361308
|
detectedIndent = true;
|
|
361309
361309
|
} else {
|
|
361310
361310
|
throwError2(state, "repeat of an indentation width identifier");
|
|
@@ -369256,7 +369256,7 @@ var require_loader2 = __commonJS({
|
|
|
369256
369256
|
throwError2(state, "unexpected end of the stream within a single quoted scalar");
|
|
369257
369257
|
}
|
|
369258
369258
|
function readDoubleQuotedScalar2(state, nodeIndent) {
|
|
369259
|
-
var captureStart, captureEnd, hexLength, hexResult,
|
|
369259
|
+
var captureStart, captureEnd, hexLength, hexResult, tmp9, ch;
|
|
369260
369260
|
ch = state.input.charCodeAt(state.position);
|
|
369261
369261
|
if (ch !== 34) {
|
|
369262
369262
|
return false;
|
|
@@ -369278,13 +369278,13 @@ var require_loader2 = __commonJS({
|
|
|
369278
369278
|
} else if (ch < 256 && simpleEscapeCheck2[ch]) {
|
|
369279
369279
|
state.result += simpleEscapeMap2[ch];
|
|
369280
369280
|
state.position++;
|
|
369281
|
-
} else if ((
|
|
369282
|
-
hexLength =
|
|
369281
|
+
} else if ((tmp9 = escapedHexLen2(ch)) > 0) {
|
|
369282
|
+
hexLength = tmp9;
|
|
369283
369283
|
hexResult = 0;
|
|
369284
369284
|
for (; hexLength > 0; hexLength--) {
|
|
369285
369285
|
ch = state.input.charCodeAt(++state.position);
|
|
369286
|
-
if ((
|
|
369287
|
-
hexResult = (hexResult << 4) +
|
|
369286
|
+
if ((tmp9 = fromHexCode2(ch)) >= 0) {
|
|
369287
|
+
hexResult = (hexResult << 4) + tmp9;
|
|
369288
369288
|
} else {
|
|
369289
369289
|
throwError2(state, "expected hexadecimal character");
|
|
369290
369290
|
}
|
|
@@ -369385,7 +369385,7 @@ var require_loader2 = __commonJS({
|
|
|
369385
369385
|
throwError2(state, "unexpected end of the stream within a flow collection");
|
|
369386
369386
|
}
|
|
369387
369387
|
function readBlockScalar2(state, nodeIndent) {
|
|
369388
|
-
var captureStart, folding, chomping = CHOMPING_CLIP2, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false,
|
|
369388
|
+
var captureStart, folding, chomping = CHOMPING_CLIP2, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp9, ch;
|
|
369389
369389
|
ch = state.input.charCodeAt(state.position);
|
|
369390
369390
|
if (ch === 124) {
|
|
369391
369391
|
folding = false;
|
|
@@ -369404,11 +369404,11 @@ var require_loader2 = __commonJS({
|
|
|
369404
369404
|
} else {
|
|
369405
369405
|
throwError2(state, "repeat of a chomping mode identifier");
|
|
369406
369406
|
}
|
|
369407
|
-
} else if ((
|
|
369408
|
-
if (
|
|
369407
|
+
} else if ((tmp9 = fromDecimalCode2(ch)) >= 0) {
|
|
369408
|
+
if (tmp9 === 0) {
|
|
369409
369409
|
throwError2(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
|
|
369410
369410
|
} else if (!detectedIndent) {
|
|
369411
|
-
textIndent = nodeIndent +
|
|
369411
|
+
textIndent = nodeIndent + tmp9 - 1;
|
|
369412
369412
|
detectedIndent = true;
|
|
369413
369413
|
} else {
|
|
369414
369414
|
throwError2(state, "repeat of an indentation width identifier");
|
|
@@ -374640,9 +374640,9 @@ var require_js_levenshtein = __commonJS({
|
|
|
374640
374640
|
return 0;
|
|
374641
374641
|
}
|
|
374642
374642
|
if (a2.length > b2.length) {
|
|
374643
|
-
var
|
|
374643
|
+
var tmp9 = a2;
|
|
374644
374644
|
a2 = b2;
|
|
374645
|
-
b2 =
|
|
374645
|
+
b2 = tmp9;
|
|
374646
374646
|
}
|
|
374647
374647
|
var la = a2.length;
|
|
374648
374648
|
var lb = b2.length;
|
|
@@ -389746,7 +389746,7 @@ var require_loader3 = __commonJS({
|
|
|
389746
389746
|
throwError2(state, "unexpected end of the stream within a single quoted scalar");
|
|
389747
389747
|
}
|
|
389748
389748
|
function readDoubleQuotedScalar2(state, nodeIndent) {
|
|
389749
|
-
var captureStart, captureEnd, hexLength, hexResult,
|
|
389749
|
+
var captureStart, captureEnd, hexLength, hexResult, tmp9, tmpEsc, ch;
|
|
389750
389750
|
ch = state.input.charCodeAt(state.position);
|
|
389751
389751
|
if (34 !== ch) {
|
|
389752
389752
|
return false;
|
|
@@ -389773,13 +389773,13 @@ var require_loader3 = __commonJS({
|
|
|
389773
389773
|
} else if (ch < 256 && (state.allowAnyEscape ? customEscapeCheck[ch] : simpleEscapeCheck2[ch])) {
|
|
389774
389774
|
scalar.value += state.allowAnyEscape ? customEscapeMap[ch] : simpleEscapeMap2[ch];
|
|
389775
389775
|
state.position++;
|
|
389776
|
-
} else if ((
|
|
389777
|
-
hexLength =
|
|
389776
|
+
} else if ((tmp9 = escapedHexLen2(ch)) > 0) {
|
|
389777
|
+
hexLength = tmp9;
|
|
389778
389778
|
hexResult = 0;
|
|
389779
389779
|
for (; hexLength > 0; hexLength--) {
|
|
389780
389780
|
ch = state.input.charCodeAt(++state.position);
|
|
389781
|
-
if ((
|
|
389782
|
-
hexResult = (hexResult << 4) +
|
|
389781
|
+
if ((tmp9 = fromHexCode2(ch)) >= 0) {
|
|
389782
|
+
hexResult = (hexResult << 4) + tmp9;
|
|
389783
389783
|
} else {
|
|
389784
389784
|
throwError2(state, "expected hexadecimal character");
|
|
389785
389785
|
}
|
|
@@ -389888,7 +389888,7 @@ var require_loader3 = __commonJS({
|
|
|
389888
389888
|
throwError2(state, "unexpected end of the stream within a flow collection");
|
|
389889
389889
|
}
|
|
389890
389890
|
function readBlockScalar2(state, nodeIndent) {
|
|
389891
|
-
var captureStart, folding, chomping = CHOMPING_CLIP2, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false,
|
|
389891
|
+
var captureStart, folding, chomping = CHOMPING_CLIP2, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp9, ch;
|
|
389892
389892
|
ch = state.input.charCodeAt(state.position);
|
|
389893
389893
|
if (ch === 124) {
|
|
389894
389894
|
folding = false;
|
|
@@ -389909,11 +389909,11 @@ var require_loader3 = __commonJS({
|
|
|
389909
389909
|
} else {
|
|
389910
389910
|
throwError2(state, "repeat of a chomping mode identifier");
|
|
389911
389911
|
}
|
|
389912
|
-
} else if ((
|
|
389913
|
-
if (
|
|
389912
|
+
} else if ((tmp9 = fromDecimalCode2(ch)) >= 0) {
|
|
389913
|
+
if (tmp9 === 0) {
|
|
389914
389914
|
throwError2(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
|
|
389915
389915
|
} else if (!detectedIndent) {
|
|
389916
|
-
textIndent = nodeIndent +
|
|
389916
|
+
textIndent = nodeIndent + tmp9 - 1;
|
|
389917
389917
|
detectedIndent = true;
|
|
389918
389918
|
} else {
|
|
389919
389919
|
throwError2(state, "repeat of an indentation width identifier");
|
|
@@ -402259,13 +402259,13 @@ var require_fast_safe_stringify = __commonJS({
|
|
|
402259
402259
|
if (typeof options === "undefined") {
|
|
402260
402260
|
options = defaultOptions3();
|
|
402261
402261
|
}
|
|
402262
|
-
var
|
|
402262
|
+
var tmp9 = deterministicDecirc(obj, "", 0, [], void 0, 0, options) || obj;
|
|
402263
402263
|
var res;
|
|
402264
402264
|
try {
|
|
402265
402265
|
if (replacerStack.length === 0) {
|
|
402266
|
-
res = JSON.stringify(
|
|
402266
|
+
res = JSON.stringify(tmp9, replacer, spacer);
|
|
402267
402267
|
} else {
|
|
402268
|
-
res = JSON.stringify(
|
|
402268
|
+
res = JSON.stringify(tmp9, replaceGetterValues(replacer), spacer);
|
|
402269
402269
|
}
|
|
402270
402270
|
} catch (_4) {
|
|
402271
402271
|
return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]");
|
|
@@ -402312,18 +402312,18 @@ var require_fast_safe_stringify = __commonJS({
|
|
|
402312
402312
|
deterministicDecirc(val[i2], i2, i2, stack, val, depth, options);
|
|
402313
402313
|
}
|
|
402314
402314
|
} else {
|
|
402315
|
-
var
|
|
402315
|
+
var tmp9 = {};
|
|
402316
402316
|
var keys4 = Object.keys(val).sort(compareFunction);
|
|
402317
402317
|
for (i2 = 0; i2 < keys4.length; i2++) {
|
|
402318
402318
|
var key2 = keys4[i2];
|
|
402319
402319
|
deterministicDecirc(val[key2], key2, i2, stack, val, depth, options);
|
|
402320
|
-
|
|
402320
|
+
tmp9[key2] = val[key2];
|
|
402321
402321
|
}
|
|
402322
402322
|
if (typeof parent2 !== "undefined") {
|
|
402323
402323
|
arr.push([parent2, k2, val]);
|
|
402324
|
-
parent2[k2] =
|
|
402324
|
+
parent2[k2] = tmp9;
|
|
402325
402325
|
} else {
|
|
402326
|
-
return
|
|
402326
|
+
return tmp9;
|
|
402327
402327
|
}
|
|
402328
402328
|
}
|
|
402329
402329
|
stack.pop();
|
|
@@ -406214,16 +406214,16 @@ var require_sync3 = __commonJS({
|
|
|
406214
406214
|
var { readdirSync: readdirSync2, statSync: statSync3 } = require("fs");
|
|
406215
406215
|
module2.exports = function(start3, callback) {
|
|
406216
406216
|
let dir = resolve6(".", start3);
|
|
406217
|
-
let
|
|
406217
|
+
let tmp9, stats = statSync3(dir);
|
|
406218
406218
|
if (!stats.isDirectory()) {
|
|
406219
406219
|
dir = dirname5(dir);
|
|
406220
406220
|
}
|
|
406221
406221
|
while (true) {
|
|
406222
|
-
|
|
406223
|
-
if (
|
|
406224
|
-
return resolve6(dir,
|
|
406225
|
-
dir = dirname5(
|
|
406226
|
-
if (
|
|
406222
|
+
tmp9 = callback(dir, readdirSync2(dir));
|
|
406223
|
+
if (tmp9)
|
|
406224
|
+
return resolve6(dir, tmp9);
|
|
406225
|
+
dir = dirname5(tmp9 = dir);
|
|
406226
|
+
if (tmp9 === dir)
|
|
406227
406227
|
break;
|
|
406228
406228
|
}
|
|
406229
406229
|
};
|
|
@@ -656176,9 +656176,9 @@ var require_buffer_crc32 = __commonJS({
|
|
|
656176
656176
|
}
|
|
656177
656177
|
}
|
|
656178
656178
|
function bufferizeInt(num) {
|
|
656179
|
-
var
|
|
656180
|
-
|
|
656181
|
-
return
|
|
656179
|
+
var tmp9 = ensureBuffer(4);
|
|
656180
|
+
tmp9.writeInt32BE(num, 0);
|
|
656181
|
+
return tmp9;
|
|
656182
656182
|
}
|
|
656183
656183
|
function _crc32(buf, previous3) {
|
|
656184
656184
|
buf = ensureBuffer(buf);
|
|
@@ -657783,10 +657783,10 @@ var require_writer = __commonJS({
|
|
|
657783
657783
|
bytes2.push(octet & 127);
|
|
657784
657784
|
}
|
|
657785
657785
|
}
|
|
657786
|
-
var
|
|
657786
|
+
var tmp9 = s2.split(".");
|
|
657787
657787
|
var bytes = [];
|
|
657788
|
-
bytes.push(parseInt(
|
|
657789
|
-
|
|
657788
|
+
bytes.push(parseInt(tmp9[0], 10) * 40 + parseInt(tmp9[1], 10));
|
|
657789
|
+
tmp9.slice(2).forEach(function(b2) {
|
|
657790
657790
|
encodeOctet(bytes, parseInt(b2, 10));
|
|
657791
657791
|
});
|
|
657792
657792
|
var self2 = this;
|
|
@@ -660100,13 +660100,13 @@ var require_nacl_fast = __commonJS({
|
|
|
660100
660100
|
checkArrayTypes(signedMsg, publicKey);
|
|
660101
660101
|
if (publicKey.length !== crypto_sign_PUBLICKEYBYTES)
|
|
660102
660102
|
throw new Error("bad public key size");
|
|
660103
|
-
var
|
|
660104
|
-
var mlen = crypto_sign_open(
|
|
660103
|
+
var tmp9 = new Uint8Array(signedMsg.length);
|
|
660104
|
+
var mlen = crypto_sign_open(tmp9, signedMsg, signedMsg.length, publicKey);
|
|
660105
660105
|
if (mlen < 0)
|
|
660106
660106
|
return null;
|
|
660107
660107
|
var m = new Uint8Array(mlen);
|
|
660108
660108
|
for (var i2 = 0; i2 < m.length; i2++)
|
|
660109
|
-
m[i2] =
|
|
660109
|
+
m[i2] = tmp9[i2];
|
|
660110
660110
|
return m;
|
|
660111
660111
|
};
|
|
660112
660112
|
nacl.sign.detached = function(msg, secretKey) {
|
|
@@ -713816,7 +713816,7 @@ function readSingleQuotedScalar(state, nodeIndent) {
|
|
|
713816
713816
|
throwError(state, "unexpected end of the stream within a single quoted scalar");
|
|
713817
713817
|
}
|
|
713818
713818
|
function readDoubleQuotedScalar(state, nodeIndent) {
|
|
713819
|
-
var captureStart, captureEnd, hexLength, hexResult,
|
|
713819
|
+
var captureStart, captureEnd, hexLength, hexResult, tmp9, ch;
|
|
713820
713820
|
ch = state.input.charCodeAt(state.position);
|
|
713821
713821
|
if (ch !== 34) {
|
|
713822
713822
|
return false;
|
|
@@ -713838,13 +713838,13 @@ function readDoubleQuotedScalar(state, nodeIndent) {
|
|
|
713838
713838
|
} else if (ch < 256 && simpleEscapeCheck[ch]) {
|
|
713839
713839
|
state.result += simpleEscapeMap[ch];
|
|
713840
713840
|
state.position++;
|
|
713841
|
-
} else if ((
|
|
713842
|
-
hexLength =
|
|
713841
|
+
} else if ((tmp9 = escapedHexLen(ch)) > 0) {
|
|
713842
|
+
hexLength = tmp9;
|
|
713843
713843
|
hexResult = 0;
|
|
713844
713844
|
for (; hexLength > 0; hexLength--) {
|
|
713845
713845
|
ch = state.input.charCodeAt(++state.position);
|
|
713846
|
-
if ((
|
|
713847
|
-
hexResult = (hexResult << 4) +
|
|
713846
|
+
if ((tmp9 = fromHexCode(ch)) >= 0) {
|
|
713847
|
+
hexResult = (hexResult << 4) + tmp9;
|
|
713848
713848
|
} else {
|
|
713849
713849
|
throwError(state, "expected hexadecimal character");
|
|
713850
713850
|
}
|
|
@@ -713945,7 +713945,7 @@ function readFlowCollection(state, nodeIndent) {
|
|
|
713945
713945
|
throwError(state, "unexpected end of the stream within a flow collection");
|
|
713946
713946
|
}
|
|
713947
713947
|
function readBlockScalar(state, nodeIndent) {
|
|
713948
|
-
var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false,
|
|
713948
|
+
var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp9, ch;
|
|
713949
713949
|
ch = state.input.charCodeAt(state.position);
|
|
713950
713950
|
if (ch === 124) {
|
|
713951
713951
|
folding = false;
|
|
@@ -713964,11 +713964,11 @@ function readBlockScalar(state, nodeIndent) {
|
|
|
713964
713964
|
} else {
|
|
713965
713965
|
throwError(state, "repeat of a chomping mode identifier");
|
|
713966
713966
|
}
|
|
713967
|
-
} else if ((
|
|
713968
|
-
if (
|
|
713967
|
+
} else if ((tmp9 = fromDecimalCode(ch)) >= 0) {
|
|
713968
|
+
if (tmp9 === 0) {
|
|
713969
713969
|
throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
|
|
713970
713970
|
} else if (!detectedIndent) {
|
|
713971
|
-
textIndent = nodeIndent +
|
|
713971
|
+
textIndent = nodeIndent + tmp9 - 1;
|
|
713972
713972
|
detectedIndent = true;
|
|
713973
713973
|
} else {
|
|
713974
713974
|
throwError(state, "repeat of an indentation width identifier");
|
|
@@ -718941,7 +718941,7 @@ var AccessTokenPosthogManager = class {
|
|
|
718941
718941
|
properties: {
|
|
718942
718942
|
...event,
|
|
718943
718943
|
...event.properties,
|
|
718944
|
-
version: "0.15.
|
|
718944
|
+
version: "0.15.8",
|
|
718945
718945
|
usingAccessToken: true
|
|
718946
718946
|
}
|
|
718947
718947
|
});
|
|
@@ -719003,7 +719003,7 @@ var UserPosthogManager = class {
|
|
|
719003
719003
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
719004
719004
|
event: "CLI",
|
|
719005
719005
|
properties: {
|
|
719006
|
-
version: "0.15.
|
|
719006
|
+
version: "0.15.8",
|
|
719007
719007
|
...event,
|
|
719008
719008
|
...event.properties
|
|
719009
719009
|
}
|
|
@@ -738071,16 +738071,16 @@ var import_path21 = require("path");
|
|
|
738071
738071
|
var import_fs4 = require("fs");
|
|
738072
738072
|
function sync_default(start3, callback) {
|
|
738073
738073
|
let dir = (0, import_path21.resolve)(".", start3);
|
|
738074
|
-
let
|
|
738074
|
+
let tmp9, stats = (0, import_fs4.statSync)(dir);
|
|
738075
738075
|
if (!stats.isDirectory()) {
|
|
738076
738076
|
dir = (0, import_path21.dirname)(dir);
|
|
738077
738077
|
}
|
|
738078
738078
|
while (true) {
|
|
738079
|
-
|
|
738080
|
-
if (
|
|
738081
|
-
return (0, import_path21.resolve)(dir,
|
|
738082
|
-
dir = (0, import_path21.dirname)(
|
|
738083
|
-
if (
|
|
738079
|
+
tmp9 = callback(dir, (0, import_fs4.readdirSync)(dir));
|
|
738080
|
+
if (tmp9)
|
|
738081
|
+
return (0, import_path21.resolve)(dir, tmp9);
|
|
738082
|
+
dir = (0, import_path21.dirname)(tmp9 = dir);
|
|
738083
|
+
if (tmp9 === dir)
|
|
738084
738084
|
break;
|
|
738085
738085
|
}
|
|
738086
738086
|
}
|
|
@@ -743249,10 +743249,10 @@ var CliContext = class {
|
|
|
743249
743249
|
return "fern-api";
|
|
743250
743250
|
}
|
|
743251
743251
|
getPackageVersion() {
|
|
743252
|
-
if ("0.15.
|
|
743252
|
+
if ("0.15.8" == null) {
|
|
743253
743253
|
this.logger.error("CLI_VERSION is not defined");
|
|
743254
743254
|
}
|
|
743255
|
-
return "0.15.
|
|
743255
|
+
return "0.15.8";
|
|
743256
743256
|
}
|
|
743257
743257
|
getCliName() {
|
|
743258
743258
|
if ("fern" == null) {
|
|
@@ -756276,7 +756276,7 @@ async function getIntermediateRepresentation({
|
|
|
756276
756276
|
// pnp:/home/circleci/project/packages/cli/generation/local-generation/local-workspace-runner/lib/runLocalGenerationForWorkspace.js
|
|
756277
756277
|
var import_os3 = __toESM(require("os"));
|
|
756278
756278
|
var import_path31 = __toESM(require("path"));
|
|
756279
|
-
var
|
|
756279
|
+
var import_tmp_promise6 = __toESM(require_tmp_promise());
|
|
756280
756280
|
|
|
756281
756281
|
// pnp:/home/circleci/project/packages/commons/logging-execa/lib/loggingExeca.js
|
|
756282
756282
|
var import_execa = __toESM(require_execa());
|
|
@@ -756388,10 +756388,12 @@ async function getFernIgnorePaths({ absolutePathToFernignore }) {
|
|
|
756388
756388
|
|
|
756389
756389
|
// pnp:/home/circleci/project/packages/cli/generation/local-generation/docker-utils/lib/runDocker.js
|
|
756390
756390
|
var import_dockerode = __toESM(require_docker());
|
|
756391
|
+
var import_promises31 = require("fs/promises");
|
|
756391
756392
|
var import_stream3 = require("stream");
|
|
756392
|
-
|
|
756393
|
+
var import_tmp_promise5 = __toESM(require_tmp_promise());
|
|
756394
|
+
async function runDocker({ imageName, args, binds, writeLogsToFile = true, removeAfterCompletion = false }) {
|
|
756393
756395
|
const docker = new import_dockerode.default();
|
|
756394
|
-
const tryRun = () => tryRunDocker({ docker, imageName, args, binds, removeAfterCompletion });
|
|
756396
|
+
const tryRun = () => tryRunDocker({ docker, imageName, args, binds, removeAfterCompletion, writeLogsToFile });
|
|
756395
756397
|
try {
|
|
756396
756398
|
await tryRun();
|
|
756397
756399
|
} catch (e) {
|
|
@@ -756403,9 +756405,11 @@ async function runDocker({ imageName, args, binds, removeAfterCompletion = false
|
|
|
756403
756405
|
}
|
|
756404
756406
|
}
|
|
756405
756407
|
}
|
|
756406
|
-
async function tryRunDocker({ docker, imageName, args, binds, removeAfterCompletion }) {
|
|
756408
|
+
async function tryRunDocker({ docker, imageName, args, binds, removeAfterCompletion, writeLogsToFile }) {
|
|
756409
|
+
let logs = "";
|
|
756407
756410
|
const [status, container] = await docker.run(imageName, args != null ? args : [], new import_stream3.Writable({
|
|
756408
756411
|
write(_chunk, _encding, callback) {
|
|
756412
|
+
logs += _chunk.toString();
|
|
756409
756413
|
setImmediate(callback);
|
|
756410
756414
|
}
|
|
756411
756415
|
}), {
|
|
@@ -756419,7 +756423,13 @@ async function tryRunDocker({ docker, imageName, args, binds, removeAfterComplet
|
|
|
756419
756423
|
throw status.Error;
|
|
756420
756424
|
}
|
|
756421
756425
|
if (status.StatusCode !== 0) {
|
|
756422
|
-
|
|
756426
|
+
if (writeLogsToFile) {
|
|
756427
|
+
const tmpFile = await import_tmp_promise5.default.file();
|
|
756428
|
+
await (0, import_promises31.writeFile)(tmpFile.path, logs);
|
|
756429
|
+
throw new Error(`Docker exited with a non-zero exit code. Logs here: ${tmpFile.path}`);
|
|
756430
|
+
} else {
|
|
756431
|
+
throw new Error("Docker exited with a non-zero exit code.");
|
|
756432
|
+
}
|
|
756423
756433
|
}
|
|
756424
756434
|
}
|
|
756425
756435
|
async function pullImage(docker, imageName) {
|
|
@@ -756437,7 +756447,7 @@ async function pullImage(docker, imageName) {
|
|
|
756437
756447
|
|
|
756438
756448
|
// pnp:/home/circleci/project/packages/cli/generation/local-generation/local-workspace-runner/lib/run-generator/runGenerator.js
|
|
756439
756449
|
var FernGeneratorExecParsing = __toESM(require_serialization12());
|
|
756440
|
-
var
|
|
756450
|
+
var import_promises32 = require("fs/promises");
|
|
756441
756451
|
|
|
756442
756452
|
// pnp:/home/circleci/project/packages/cli/generation/local-generation/local-workspace-runner/lib/run-generator/constants.js
|
|
756443
756453
|
var import_path30 = __toESM(require("path"));
|
|
@@ -756558,7 +756568,7 @@ async function runGenerator({ workspaceName, organization, absolutePathToOutput,
|
|
|
756558
756568
|
if (!parsedConfig.ok) {
|
|
756559
756569
|
throw new Error(`Failed to parse config.json into ${absolutePathToWriteConfigJson}`);
|
|
756560
756570
|
}
|
|
756561
|
-
await (0,
|
|
756571
|
+
await (0, import_promises32.writeFile)(absolutePathToWriteConfigJson, JSON.stringify(parsedConfig.value, void 0, 4));
|
|
756562
756572
|
const doesConfigJsonExist = await waitUntilPathExists(absolutePathToWriteConfigJson, 5e3);
|
|
756563
756573
|
if (!doesConfigJsonExist) {
|
|
756564
756574
|
throw new Error(`Failed to create ${absolutePathToWriteConfigJson}`);
|
|
@@ -756600,7 +756610,7 @@ async function runLocalGenerationForWorkspace({ organization, workspace, generat
|
|
|
756600
756610
|
}
|
|
756601
756611
|
}
|
|
756602
756612
|
async function getWorkspaceTempDir() {
|
|
756603
|
-
return
|
|
756613
|
+
return import_tmp_promise6.default.dir({
|
|
756604
756614
|
tmpdir: import_os3.default.platform() === "darwin" ? import_path31.default.join("/private", import_os3.default.tmpdir()) : void 0,
|
|
756605
756615
|
prefix: "fern"
|
|
756606
756616
|
});
|
|
@@ -756615,19 +756625,19 @@ async function writeFilesToDiskAndRunGenerator({ organization, workspace, genera
|
|
|
756615
756625
|
irVersionOverride
|
|
756616
756626
|
});
|
|
756617
756627
|
context.logger.debug("Wrote IR to: " + absolutePathToIr);
|
|
756618
|
-
const configJsonFile = await
|
|
756628
|
+
const configJsonFile = await import_tmp_promise6.default.file({
|
|
756619
756629
|
tmpdir: workspaceTempDir.path
|
|
756620
756630
|
});
|
|
756621
756631
|
const absolutePathToWriteConfigJson = AbsoluteFilePath.of(configJsonFile.path);
|
|
756622
756632
|
context.logger.debug("Will write config.json to: " + absolutePathToWriteConfigJson);
|
|
756623
|
-
const tmpOutputDirectory = await
|
|
756633
|
+
const tmpOutputDirectory = await import_tmp_promise6.default.dir({
|
|
756624
756634
|
tmpdir: workspaceTempDir.path
|
|
756625
756635
|
});
|
|
756626
756636
|
const absolutePathToTmpOutputDirectory = AbsoluteFilePath.of(tmpOutputDirectory.path);
|
|
756627
756637
|
context.logger.debug("Will write output to: " + absolutePathToTmpOutputDirectory);
|
|
756628
756638
|
let absolutePathToTmpSnippetJSON = void 0;
|
|
756629
756639
|
if (writeSnippets) {
|
|
756630
|
-
const snippetJsonFile = await
|
|
756640
|
+
const snippetJsonFile = await import_tmp_promise6.default.file({
|
|
756631
756641
|
tmpdir: workspaceTempDir.path
|
|
756632
756642
|
});
|
|
756633
756643
|
absolutePathToTmpSnippetJSON = AbsoluteFilePath.of(snippetJsonFile.path);
|
|
@@ -756669,7 +756679,7 @@ async function writeIrToFile({ workspace, audiences, generatorInvocation, worksp
|
|
|
756669
756679
|
version: generatorInvocation.version
|
|
756670
756680
|
}
|
|
756671
756681
|
});
|
|
756672
|
-
const irFile = await
|
|
756682
|
+
const irFile = await import_tmp_promise6.default.file({
|
|
756673
756683
|
tmpdir: workspaceTempDir.path
|
|
756674
756684
|
});
|
|
756675
756685
|
const absolutePathToIr = AbsoluteFilePath.of(irFile.path);
|
|
@@ -756854,9 +756864,9 @@ function pollJobAndReportStatus({ job, taskId, taskHandler, context }) {
|
|
|
756854
756864
|
var import_axios6 = __toESM(require_axios2());
|
|
756855
756865
|
var import_decompress2 = __toESM(require_decompress());
|
|
756856
756866
|
var import_fs7 = require("fs");
|
|
756857
|
-
var
|
|
756867
|
+
var import_promises33 = require("fs/promises");
|
|
756858
756868
|
var import_path32 = __toESM(require("path"));
|
|
756859
|
-
var
|
|
756869
|
+
var import_promises34 = require("stream/promises");
|
|
756860
756870
|
|
|
756861
756871
|
// pnp:/home/circleci/project/.yarn/cache/terminal-link-npm-3.0.0-82cbbd7f4a-85a78ae50a.zip/node_modules/terminal-link/index.js
|
|
756862
756872
|
var import_supports_hyperlinks = __toESM(require_supports_hyperlinks());
|
|
@@ -756874,7 +756884,7 @@ terminalLink.stderr = (text6, url, options = {}) => terminalLink(text6, url, { t
|
|
|
756874
756884
|
terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
|
|
756875
756885
|
|
|
756876
756886
|
// pnp:/home/circleci/project/packages/cli/generation/remote-generation/remote-workspace-runner/lib/RemoteTaskHandler.js
|
|
756877
|
-
var
|
|
756887
|
+
var import_tmp_promise7 = __toESM(require_tmp_promise());
|
|
756878
756888
|
var _isFinished, _createdSnippets;
|
|
756879
756889
|
var RemoteTaskHandler = class {
|
|
756880
756890
|
constructor({ interactiveTaskContext, generatorInvocation }) {
|
|
@@ -756956,13 +756966,13 @@ async function downloadFilesForTask({ s3PreSignedReadUrl, absolutePathToLocalOut
|
|
|
756956
756966
|
const request = await import_axios6.default.get(s3PreSignedReadUrl, {
|
|
756957
756967
|
responseType: "stream"
|
|
756958
756968
|
});
|
|
756959
|
-
const tmpDir = await
|
|
756969
|
+
const tmpDir = await import_tmp_promise7.default.dir({ prefix: "fern", unsafeCleanup: true });
|
|
756960
756970
|
const outputZipPath = import_path32.default.join(tmpDir.path, "output.zip");
|
|
756961
|
-
await (0,
|
|
756971
|
+
await (0, import_promises34.pipeline)(request.data, (0, import_fs7.createWriteStream)(outputZipPath));
|
|
756962
756972
|
if (await doesPathExist(absolutePathToLocalOutput)) {
|
|
756963
|
-
await (0,
|
|
756973
|
+
await (0, import_promises33.rm)(absolutePathToLocalOutput, { recursive: true });
|
|
756964
756974
|
}
|
|
756965
|
-
await (0,
|
|
756975
|
+
await (0, import_promises33.mkdir)(absolutePathToLocalOutput, { recursive: true });
|
|
756966
756976
|
await (0, import_decompress2.default)(outputZipPath, absolutePathToLocalOutput);
|
|
756967
756977
|
context.logger.info(source_default.green(`Downloaded to ${absolutePathToLocalOutput}`));
|
|
756968
756978
|
} catch (e) {
|
|
@@ -757056,10 +757066,10 @@ async function runRemoteGenerationForAPIWorkspace({ organization, workspace, con
|
|
|
757056
757066
|
|
|
757057
757067
|
// pnp:/home/circleci/project/packages/cli/config-management/docs-configuration/lib/parseDocsConfiguration.js
|
|
757058
757068
|
var import_serialization3 = __toESM(require_serialization2());
|
|
757059
|
-
var
|
|
757069
|
+
var import_promises36 = require("fs/promises");
|
|
757060
757070
|
|
|
757061
757071
|
// pnp:/home/circleci/project/packages/cli/config-management/docs-configuration/lib/getAllPages.js
|
|
757062
|
-
var
|
|
757072
|
+
var import_promises35 = require("fs/promises");
|
|
757063
757073
|
async function getAllPages({ navigation, absolutePathToFernFolder }) {
|
|
757064
757074
|
switch (navigation.type) {
|
|
757065
757075
|
case "tabbed":
|
|
@@ -757095,7 +757105,7 @@ async function getAllPagesFromNavigationItem({ item, absolutePathToFernFolder })
|
|
|
757095
757105
|
return {};
|
|
757096
757106
|
case "page":
|
|
757097
757107
|
return {
|
|
757098
|
-
[await relativize(absolutePathToFernFolder, item.absolutePath)]: (await (0,
|
|
757108
|
+
[await relativize(absolutePathToFernFolder, item.absolutePath)]: (await (0, import_promises35.readFile)(item.absolutePath)).toString()
|
|
757099
757109
|
};
|
|
757100
757110
|
case "section":
|
|
757101
757111
|
return combineMaps(await Promise.all(item.contents.map(async (sectionItem) => {
|
|
@@ -757181,7 +757191,7 @@ async function getNavigationConfiguration({ versions, navigation, absolutePathTo
|
|
|
757181
757191
|
const versionedNavbars = [];
|
|
757182
757192
|
for (const version3 of versions) {
|
|
757183
757193
|
const absoluteFilepathToVersionFile = resolve(absolutePathToFernFolder, version3.path);
|
|
757184
|
-
const content3 = js_yaml_default.load((await (0,
|
|
757194
|
+
const content3 = js_yaml_default.load((await (0, import_promises36.readFile)(absoluteFilepathToVersionFile)).toString());
|
|
757185
757195
|
const result2 = await import_serialization3.VersionFileConfig.parseOrThrow(content3);
|
|
757186
757196
|
const navigation2 = await convertNavigationConfiguration({
|
|
757187
757197
|
rawNavigationConfig: result2.navigation,
|
|
@@ -757405,7 +757415,7 @@ function isTabbedNavigationConfig(navigationConfig) {
|
|
|
757405
757415
|
// pnp:/home/circleci/project/packages/cli/generation/remote-generation/remote-workspace-runner/lib/publishDocs.js
|
|
757406
757416
|
var import_fdr_sdk3 = __toESM(require_dist());
|
|
757407
757417
|
var import_axios7 = __toESM(require_axios2());
|
|
757408
|
-
var
|
|
757418
|
+
var import_promises37 = require("fs/promises");
|
|
757409
757419
|
var mime = __toESM(require_mime_types());
|
|
757410
757420
|
async function publishDocs({ token, organization, docsWorkspace, domain: domain2, customDomains, fernWorkspaces, context, version: version3, preview }) {
|
|
757411
757421
|
const fdr = createFdrService({ token: token.value });
|
|
@@ -757455,7 +757465,7 @@ async function publishDocs({ token, organization, docsWorkspace, domain: domain2
|
|
|
757455
757465
|
context.failAndThrow(`Failed to upload ${filepathToUpload}`, "Upload URL is missing");
|
|
757456
757466
|
} else {
|
|
757457
757467
|
const mimeType = mime.lookup(filepathToUpload);
|
|
757458
|
-
await import_axios7.default.put(uploadUrl.uploadUrl, await (0,
|
|
757468
|
+
await import_axios7.default.put(uploadUrl.uploadUrl, await (0, import_promises37.readFile)(filepathToUpload), {
|
|
757459
757469
|
headers: {
|
|
757460
757470
|
"Content-Type": mimeType === false ? "application/octet-stream" : mimeType
|
|
757461
757471
|
}
|
|
@@ -780486,11 +780496,11 @@ function buildStyle(chalk4, styles4) {
|
|
|
780486
780496
|
}
|
|
780487
780497
|
return current2;
|
|
780488
780498
|
}
|
|
780489
|
-
var templates = (chalk4,
|
|
780499
|
+
var templates = (chalk4, tmp9) => {
|
|
780490
780500
|
const styles4 = [];
|
|
780491
780501
|
const chunks = [];
|
|
780492
780502
|
let chunk2 = [];
|
|
780493
|
-
|
|
780503
|
+
tmp9.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
|
|
780494
780504
|
if (escapeChar) {
|
|
780495
780505
|
chunk2.push(unescape3(escapeChar));
|
|
780496
780506
|
} else if (style) {
|
|
@@ -783893,10 +783903,10 @@ async function previewDocsWorkspace({
|
|
|
783893
783903
|
// pnp:/home/circleci/project/packages/cli/cli/src/commands/register/registerWorkspacesV1.ts
|
|
783894
783904
|
var import_fiddle_sdk5 = __toESM(require_node());
|
|
783895
783905
|
var import_axios8 = __toESM(require_axios2());
|
|
783896
|
-
var
|
|
783906
|
+
var import_promises38 = require("fs/promises");
|
|
783897
783907
|
var import_path34 = __toESM(require("path"));
|
|
783898
783908
|
var import_tar2 = __toESM(require_tar());
|
|
783899
|
-
var
|
|
783909
|
+
var import_tmp_promise8 = __toESM(require_tmp_promise());
|
|
783900
783910
|
async function registerWorkspacesV1({
|
|
783901
783911
|
project,
|
|
783902
783912
|
cliContext,
|
|
@@ -783937,12 +783947,12 @@ async function registerWorkspacesV1({
|
|
|
783937
783947
|
});
|
|
783938
783948
|
return;
|
|
783939
783949
|
}
|
|
783940
|
-
const tmpDir = await
|
|
783950
|
+
const tmpDir = await import_tmp_promise8.default.dir();
|
|
783941
783951
|
const tarPath = import_path34.default.join(tmpDir.path, "definition.tgz");
|
|
783942
783952
|
context.logger.debug(`Compressing definition at ${tmpDir.path}`);
|
|
783943
783953
|
await import_tar2.default.create({ file: tarPath, cwd: workspace.absoluteFilepath }, ["."]);
|
|
783944
783954
|
context.logger.info("Uploading definition...");
|
|
783945
|
-
await import_axios8.default.put(registerApiResponse.body.definitionS3UploadUrl, await (0,
|
|
783955
|
+
await import_axios8.default.put(registerApiResponse.body.definitionS3UploadUrl, await (0, import_promises38.readFile)(tarPath));
|
|
783946
783956
|
context.logger.info(
|
|
783947
783957
|
`Registered @${project.config.organization}/${workspace.definition.rootApiFile.contents.name}:${registerApiResponse.body.version}`
|
|
783948
783958
|
);
|
|
@@ -784005,17 +784015,17 @@ async function generateToken({
|
|
|
784005
784015
|
}
|
|
784006
784016
|
|
|
784007
784017
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.188/generators-configuration/migration.js
|
|
784008
|
-
var
|
|
784018
|
+
var import_promises41 = require("fs/promises");
|
|
784009
784019
|
|
|
784010
784020
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.188/generators-configuration/loadWorkspaces.js
|
|
784011
|
-
var
|
|
784021
|
+
var import_promises39 = require("fs/promises");
|
|
784012
784022
|
var FERN_DIRECTORY2 = "fern";
|
|
784013
784023
|
async function loadWorkspaces(context) {
|
|
784014
784024
|
const fernDirectory = await getFernDirectory2();
|
|
784015
784025
|
if (fernDirectory == null) {
|
|
784016
784026
|
context.failAndThrow(`Directory "${FERN_DIRECTORY2}" not found.`);
|
|
784017
784027
|
}
|
|
784018
|
-
const fernDirectoryContents = await (0,
|
|
784028
|
+
const fernDirectoryContents = await (0, import_promises39.readdir)(fernDirectory, { withFileTypes: true });
|
|
784019
784029
|
return fernDirectoryContents.reduce((all4, item) => {
|
|
784020
784030
|
if (item.isDirectory()) {
|
|
784021
784031
|
all4.push(join(fernDirectory, RelativeFilePath.of(item.name)));
|
|
@@ -784050,7 +784060,7 @@ function convertGeneratorsConfiguration2({ absolutePathToGeneratorsConfiguration
|
|
|
784050
784060
|
}
|
|
784051
784061
|
|
|
784052
784062
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.188/generators-configuration/old-configuration/loadRawGeneratorsConfiguration.js
|
|
784053
|
-
var
|
|
784063
|
+
var import_promises40 = require("fs/promises");
|
|
784054
784064
|
|
|
784055
784065
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.188/generators-configuration/old-configuration/schemas/GenerateConfigSchema.js
|
|
784056
784066
|
var GenerateConfigSchema = z.strictObject({
|
|
@@ -784073,7 +784083,7 @@ var GeneratorsConfigurationSchema2 = z.strictObject({
|
|
|
784073
784083
|
|
|
784074
784084
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.188/generators-configuration/old-configuration/loadRawGeneratorsConfiguration.js
|
|
784075
784085
|
async function loadRawGeneratorsConfiguration2({ absolutePathToGeneratorsConfiguration, context }) {
|
|
784076
|
-
const contentsStr = await (0,
|
|
784086
|
+
const contentsStr = await (0, import_promises40.readFile)(absolutePathToGeneratorsConfiguration);
|
|
784077
784087
|
const contentsParsed = js_yaml_default.load(contentsStr.toString());
|
|
784078
784088
|
return await validateSchema({
|
|
784079
784089
|
schema: GeneratorsConfigurationSchema2,
|
|
@@ -784109,7 +784119,7 @@ async function migrateWorkspace(pathToWorkspace, context) {
|
|
|
784109
784119
|
rawGeneratorsConfiguration: oldRawConfiguration
|
|
784110
784120
|
});
|
|
784111
784121
|
const migratedConfiguration = migrateConfiguration(oldConfiguration);
|
|
784112
|
-
await (0,
|
|
784122
|
+
await (0, import_promises41.writeFile)(absolutePathToGeneratorsConfiguration, js_yaml_default.dump(migratedConfiguration));
|
|
784113
784123
|
}
|
|
784114
784124
|
function migrateConfiguration(oldConfiguration) {
|
|
784115
784125
|
return {
|
|
@@ -784135,7 +784145,7 @@ var versionMigrations = {
|
|
|
784135
784145
|
var __default = versionMigrations;
|
|
784136
784146
|
|
|
784137
784147
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.191/discriminant/migration.js
|
|
784138
|
-
var
|
|
784148
|
+
var import_promises42 = require("fs/promises");
|
|
784139
784149
|
|
|
784140
784150
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.191/discriminant/getAllYamlFiles.js
|
|
784141
784151
|
var import_glob_promise2 = __toESM(require_lib6());
|
|
@@ -784169,7 +784179,7 @@ var migration2 = {
|
|
|
784169
784179
|
try {
|
|
784170
784180
|
const fileContents = await getFileContents(yamlFilepath);
|
|
784171
784181
|
const newContents = addDiscriminantToFile(fileContents);
|
|
784172
|
-
await (0,
|
|
784182
|
+
await (0, import_promises42.writeFile)(yamlFilepath, newContents);
|
|
784173
784183
|
} catch (error) {
|
|
784174
784184
|
context.failAndThrow("Failed to migrate " + yamlFilepath, error);
|
|
784175
784185
|
}
|
|
@@ -784177,7 +784187,7 @@ var migration2 = {
|
|
|
784177
784187
|
}
|
|
784178
784188
|
};
|
|
784179
784189
|
async function getFileContents(filepath) {
|
|
784180
|
-
const buffer3 = await (0,
|
|
784190
|
+
const buffer3 = await (0, import_promises42.readFile)(filepath);
|
|
784181
784191
|
return buffer3.toString();
|
|
784182
784192
|
}
|
|
784183
784193
|
var UNION_REGEX = /^(\s{2,})union:\s*$/gm;
|
|
@@ -784206,7 +784216,7 @@ var versionMigrations2 = {
|
|
|
784206
784216
|
var __default2 = versionMigrations2;
|
|
784207
784217
|
|
|
784208
784218
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.203/union-single-property-key/migration.js
|
|
784209
|
-
var
|
|
784219
|
+
var import_promises43 = require("fs/promises");
|
|
784210
784220
|
var import_yaml = __toESM(require_dist4());
|
|
784211
784221
|
|
|
784212
784222
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.203/union-single-property-key/getAllYamlFiles.js
|
|
@@ -784247,7 +784257,7 @@ var migration3 = {
|
|
|
784247
784257
|
}
|
|
784248
784258
|
};
|
|
784249
784259
|
async function migrateFile(filepath, context) {
|
|
784250
|
-
const contents = await (0,
|
|
784260
|
+
const contents = await (0, import_promises43.readFile)(filepath);
|
|
784251
784261
|
const parsedDocument = import_yaml.default.parseDocument(contents.toString());
|
|
784252
784262
|
const types4 = parsedDocument.get("types");
|
|
784253
784263
|
if (types4 == null) {
|
|
@@ -784279,7 +784289,7 @@ async function migrateFile(filepath, context) {
|
|
|
784279
784289
|
}
|
|
784280
784290
|
}
|
|
784281
784291
|
}
|
|
784282
|
-
await (0,
|
|
784292
|
+
await (0, import_promises43.writeFile)(filepath, parsedDocument.toString());
|
|
784283
784293
|
}
|
|
784284
784294
|
|
|
784285
784295
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.203/index.js
|
|
@@ -784290,7 +784300,7 @@ var versionMigrations3 = {
|
|
|
784290
784300
|
var __default3 = versionMigrations3;
|
|
784291
784301
|
|
|
784292
784302
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.207/add-mode-to-draft-generators/migration.js
|
|
784293
|
-
var
|
|
784303
|
+
var import_promises44 = require("fs/promises");
|
|
784294
784304
|
var import_yaml2 = __toESM(require_dist4());
|
|
784295
784305
|
|
|
784296
784306
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.207/add-mode-to-draft-generators/getAllGeneratorYamlFiles.js
|
|
@@ -784331,7 +784341,7 @@ var migration4 = {
|
|
|
784331
784341
|
}
|
|
784332
784342
|
};
|
|
784333
784343
|
async function migrateGeneratorsYml(filepath, context) {
|
|
784334
|
-
const contents = await (0,
|
|
784344
|
+
const contents = await (0, import_promises44.readFile)(filepath);
|
|
784335
784345
|
const parsedDocument = import_yaml2.default.parseDocument(contents.toString());
|
|
784336
784346
|
const draftGenerators = parsedDocument.get("draft");
|
|
784337
784347
|
if (draftGenerators == null) {
|
|
@@ -784358,7 +784368,7 @@ async function migrateGeneratorsYml(filepath, context) {
|
|
|
784358
784368
|
draftGenerator.set("output-path", name2.value.includes("openapi") ? "./generated-openapi" : name2.value.includes("postman") ? "./generated-postman" : localOutput);
|
|
784359
784369
|
}
|
|
784360
784370
|
});
|
|
784361
|
-
await (0,
|
|
784371
|
+
await (0, import_promises44.writeFile)(filepath, parsedDocument.toString());
|
|
784362
784372
|
}
|
|
784363
784373
|
|
|
784364
784374
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.207/index.js
|
|
@@ -784369,7 +784379,7 @@ var versionMigrations4 = {
|
|
|
784369
784379
|
var __default4 = versionMigrations4;
|
|
784370
784380
|
|
|
784371
784381
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.210/remove-inline-error-declarations/migration.js
|
|
784372
|
-
var
|
|
784382
|
+
var import_promises45 = require("fs/promises");
|
|
784373
784383
|
var import_yaml3 = __toESM(require_dist4());
|
|
784374
784384
|
|
|
784375
784385
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.210/remove-inline-error-declarations/getAllYamlFiles.js
|
|
@@ -784410,7 +784420,7 @@ var migration5 = {
|
|
|
784410
784420
|
}
|
|
784411
784421
|
};
|
|
784412
784422
|
async function migrateFile2(filepath, context) {
|
|
784413
|
-
const contents = await (0,
|
|
784423
|
+
const contents = await (0, import_promises45.readFile)(filepath);
|
|
784414
784424
|
const parsedDocument = import_yaml3.default.parseDocument(contents.toString());
|
|
784415
784425
|
const addType = (typeName, typeDeclaration) => {
|
|
784416
784426
|
const types4 = parsedDocument.get("types");
|
|
@@ -784454,7 +784464,7 @@ async function migrateFile2(filepath, context) {
|
|
|
784454
784464
|
}
|
|
784455
784465
|
}
|
|
784456
784466
|
}
|
|
784457
|
-
await (0,
|
|
784467
|
+
await (0, import_promises45.writeFile)(filepath, parsedDocument.toString());
|
|
784458
784468
|
}
|
|
784459
784469
|
|
|
784460
784470
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.210/index.js
|
|
@@ -784465,7 +784475,7 @@ var versionMigrations5 = {
|
|
|
784465
784475
|
var __default5 = versionMigrations5;
|
|
784466
784476
|
|
|
784467
784477
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.212/add-publishing-to-release-generators/migration.js
|
|
784468
|
-
var
|
|
784478
|
+
var import_promises46 = require("fs/promises");
|
|
784469
784479
|
var import_yaml4 = __toESM(require_dist4());
|
|
784470
784480
|
|
|
784471
784481
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.212/add-publishing-to-release-generators/getAllGeneratorYamlFiles.js
|
|
@@ -784506,7 +784516,7 @@ var migration6 = {
|
|
|
784506
784516
|
}
|
|
784507
784517
|
};
|
|
784508
784518
|
async function migrateGeneratorsYml2(filepath, context) {
|
|
784509
|
-
const contents = await (0,
|
|
784519
|
+
const contents = await (0, import_promises46.readFile)(filepath);
|
|
784510
784520
|
const parsedDocument = import_yaml4.default.parseDocument(contents.toString());
|
|
784511
784521
|
const releaseGenerators = parsedDocument.get("release");
|
|
784512
784522
|
if (releaseGenerators == null) {
|
|
@@ -784544,7 +784554,7 @@ async function migrateGeneratorsYml2(filepath, context) {
|
|
|
784544
784554
|
}
|
|
784545
784555
|
releaseGenerator.delete("outputs");
|
|
784546
784556
|
});
|
|
784547
|
-
await (0,
|
|
784557
|
+
await (0, import_promises46.writeFile)(filepath, parsedDocument.toString());
|
|
784548
784558
|
}
|
|
784549
784559
|
|
|
784550
784560
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.212/index.js
|
|
@@ -784555,7 +784565,7 @@ var versionMigrations6 = {
|
|
|
784555
784565
|
var __default6 = versionMigrations6;
|
|
784556
784566
|
|
|
784557
784567
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.220/rename-alias-key-to-type/migration.js
|
|
784558
|
-
var
|
|
784568
|
+
var import_promises47 = require("fs/promises");
|
|
784559
784569
|
|
|
784560
784570
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.220/rename-alias-key-to-type/getAllYamlFiles.js
|
|
784561
784571
|
var import_glob_promise7 = __toESM(require_lib6());
|
|
@@ -784586,9 +784596,9 @@ var migration7 = {
|
|
|
784586
784596
|
run: async ({ context }) => {
|
|
784587
784597
|
const yamlFiles = await getAllYamlFiles4(context);
|
|
784588
784598
|
for (const filepath of yamlFiles) {
|
|
784589
|
-
const contents = await (0,
|
|
784599
|
+
const contents = await (0, import_promises47.readFile)(filepath);
|
|
784590
784600
|
const newContents = contents.toString().replaceAll(" alias:", " type:");
|
|
784591
|
-
await (0,
|
|
784601
|
+
await (0, import_promises47.writeFile)(filepath, newContents);
|
|
784592
784602
|
}
|
|
784593
784603
|
}
|
|
784594
784604
|
};
|
|
@@ -784601,7 +784611,7 @@ var versionMigrations7 = {
|
|
|
784601
784611
|
var __default7 = versionMigrations7;
|
|
784602
784612
|
|
|
784603
784613
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.221/add-error-discriminant/migration.js
|
|
784604
|
-
var
|
|
784614
|
+
var import_promises48 = require("fs/promises");
|
|
784605
784615
|
|
|
784606
784616
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.221/add-error-discriminant/getAllRootApiYamlFiles.js
|
|
784607
784617
|
var import_glob_promise8 = __toESM(require_lib6());
|
|
@@ -784632,9 +784642,9 @@ var migration8 = {
|
|
|
784632
784642
|
run: async ({ context }) => {
|
|
784633
784643
|
const yamlFiles = await getAllRootApiYamlFiles(context);
|
|
784634
784644
|
for (const filepath of yamlFiles) {
|
|
784635
|
-
const contents = await (0,
|
|
784645
|
+
const contents = await (0, import_promises48.readFile)(filepath);
|
|
784636
784646
|
const newContents = contents.toString() + "\nerror-discriminant: error";
|
|
784637
|
-
await (0,
|
|
784647
|
+
await (0, import_promises48.writeFile)(filepath, newContents);
|
|
784638
784648
|
}
|
|
784639
784649
|
}
|
|
784640
784650
|
};
|
|
@@ -784647,7 +784657,7 @@ var versionMigrations8 = {
|
|
|
784647
784657
|
var __default8 = versionMigrations8;
|
|
784648
784658
|
|
|
784649
784659
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.241/add-generator-groups/migration.js
|
|
784650
|
-
var
|
|
784660
|
+
var import_promises49 = require("fs/promises");
|
|
784651
784661
|
|
|
784652
784662
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.241/add-generator-groups/getAllGeneratorYamlFiles.js
|
|
784653
784663
|
var import_glob_promise9 = __toESM(require_lib6());
|
|
@@ -784754,7 +784764,7 @@ var migration9 = {
|
|
|
784754
784764
|
}
|
|
784755
784765
|
};
|
|
784756
784766
|
async function migrateGeneratorsYml3(filepath) {
|
|
784757
|
-
const contentsStr = await (0,
|
|
784767
|
+
const contentsStr = await (0, import_promises49.readFile)(filepath);
|
|
784758
784768
|
const contents = js_yaml_default.load(contentsStr.toString());
|
|
784759
784769
|
const oldGeneratorsConfiguration = GeneratorsConfigurationSchema3.parse(contents);
|
|
784760
784770
|
let newGeneratorsConfiguration = {};
|
|
@@ -784772,7 +784782,7 @@ async function migrateGeneratorsYml3(filepath) {
|
|
|
784772
784782
|
generators: oldGeneratorsConfiguration.release.map((releaseGeneratorInvocation) => convertReleaseGeneratorInvocation(releaseGeneratorInvocation))
|
|
784773
784783
|
};
|
|
784774
784784
|
}
|
|
784775
|
-
await (0,
|
|
784785
|
+
await (0, import_promises49.writeFile)(filepath, js_yaml_default.dump(newGeneratorsConfiguration));
|
|
784776
784786
|
}
|
|
784777
784787
|
function convertDraftGeneratorInvocation(draftGeneratorInvocation) {
|
|
784778
784788
|
const newSchema = {
|
|
@@ -784847,7 +784857,7 @@ var versionMigrations9 = {
|
|
|
784847
784857
|
var __default9 = versionMigrations9;
|
|
784848
784858
|
|
|
784849
784859
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.248/add-error-discrimination-config/migration.js
|
|
784850
|
-
var
|
|
784860
|
+
var import_promises50 = require("fs/promises");
|
|
784851
784861
|
var import_yaml5 = __toESM(require_dist4());
|
|
784852
784862
|
|
|
784853
784863
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.248/add-error-discrimination-config/getAllRootApiYamlFiles.js
|
|
@@ -784888,7 +784898,7 @@ var migration10 = {
|
|
|
784888
784898
|
}
|
|
784889
784899
|
};
|
|
784890
784900
|
async function migrateRootApiFile(filepath) {
|
|
784891
|
-
const contents = await (0,
|
|
784901
|
+
const contents = await (0, import_promises50.readFile)(filepath);
|
|
784892
784902
|
const parsedDocument = import_yaml5.default.parseDocument(contents.toString());
|
|
784893
784903
|
const errorDiscriminant = parsedDocument.get("error-discriminant", true);
|
|
784894
784904
|
if (errorDiscriminant == null || !import_yaml5.default.isScalar(errorDiscriminant) || typeof errorDiscriminant.value !== "string") {
|
|
@@ -784899,7 +784909,7 @@ async function migrateRootApiFile(filepath) {
|
|
|
784899
784909
|
"property-name": errorDiscriminant.value
|
|
784900
784910
|
});
|
|
784901
784911
|
parsedDocument.delete("error-discriminant");
|
|
784902
|
-
await (0,
|
|
784912
|
+
await (0, import_promises50.writeFile)(filepath, parsedDocument.toString());
|
|
784903
784913
|
}
|
|
784904
784914
|
|
|
784905
784915
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.248/index.js
|
|
@@ -784910,7 +784920,7 @@ var versionMigrations10 = {
|
|
|
784910
784920
|
var __default10 = versionMigrations10;
|
|
784911
784921
|
|
|
784912
784922
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.1.3-rc3/add-inline-requests/migration.js
|
|
784913
|
-
var
|
|
784923
|
+
var import_promises51 = require("fs/promises");
|
|
784914
784924
|
var import_yaml6 = __toESM(require_dist4());
|
|
784915
784925
|
|
|
784916
784926
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.1.3-rc3/add-inline-requests/getAllYamlFiles.js
|
|
@@ -784951,7 +784961,7 @@ var migration11 = {
|
|
|
784951
784961
|
}
|
|
784952
784962
|
};
|
|
784953
784963
|
async function migrateYamlFile(filepath, context) {
|
|
784954
|
-
const contents = await (0,
|
|
784964
|
+
const contents = await (0, import_promises51.readFile)(filepath);
|
|
784955
784965
|
const parsedDocument = import_yaml6.default.parseDocument(contents.toString());
|
|
784956
784966
|
const services = parsedDocument.get("services");
|
|
784957
784967
|
if (services == null) {
|
|
@@ -784991,7 +785001,7 @@ async function migrateYamlFile(filepath, context) {
|
|
|
784991
785001
|
context.failWithoutThrowing("Failed to convert endpoint", e);
|
|
784992
785002
|
}
|
|
784993
785003
|
}
|
|
784994
|
-
await (0,
|
|
785004
|
+
await (0, import_promises51.writeFile)(filepath, parsedDocument.toString());
|
|
784995
785005
|
}
|
|
784996
785006
|
}
|
|
784997
785007
|
function convertEndpoint13({ document: document4, endpoint }) {
|
|
@@ -785075,10 +785085,10 @@ var import_legacy_docs_config = __toESM(require_legacy_docs_config());
|
|
|
785075
785085
|
var LegacyDocsSerializers = __toESM(require_serialization13());
|
|
785076
785086
|
|
|
785077
785087
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/docs-config/loadRawDocsConfiguration.js
|
|
785078
|
-
var
|
|
785088
|
+
var import_promises52 = require("fs/promises");
|
|
785079
785089
|
async function loadRawDocsConfiguration2({ absolutePathToWorkspace }) {
|
|
785080
785090
|
const filepath = getAbsolutePathToDocsYaml({ absolutePathToWorkspace });
|
|
785081
|
-
const contentsStr = await (0,
|
|
785091
|
+
const contentsStr = await (0, import_promises52.readFile)(filepath);
|
|
785082
785092
|
const contentsParsed = js_yaml_default.load(contentsStr.toString());
|
|
785083
785093
|
const result2 = await LegacyDocsSerializers.DocsConfiguration.parse(contentsParsed);
|
|
785084
785094
|
if (result2.ok) {
|
|
@@ -785096,7 +785106,7 @@ function getAbsolutePathToDocsFolder({ absolutePathToWorkspace }) {
|
|
|
785096
785106
|
}
|
|
785097
785107
|
|
|
785098
785108
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateDocsAndMultipleAPIs.js
|
|
785099
|
-
var
|
|
785109
|
+
var import_promises54 = require("fs/promises");
|
|
785100
785110
|
|
|
785101
785111
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/docs-config/convertLegacyDocsConfig.js
|
|
785102
785112
|
function convertLegacyDocsConfig({ docsConfiguration, docsURLs, apiName }) {
|
|
@@ -785275,10 +785285,10 @@ __export(legacy_exports, {
|
|
|
785275
785285
|
});
|
|
785276
785286
|
|
|
785277
785287
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/generators-configuration/loadRawGeneratorsConfiguration.js
|
|
785278
|
-
var
|
|
785288
|
+
var import_promises53 = require("fs/promises");
|
|
785279
785289
|
async function loadRawGeneratorsConfiguration3({ absolutePathToWorkspace }) {
|
|
785280
785290
|
const filepath = getAbsolutePathToGeneratorsConfiguration({ absolutePathToWorkspace });
|
|
785281
|
-
const contentsStr = await (0,
|
|
785291
|
+
const contentsStr = await (0, import_promises53.readFile)(filepath);
|
|
785282
785292
|
const contentsParsed = js_yaml_default.load(contentsStr.toString());
|
|
785283
785293
|
const result2 = await legacy_exports.GeneratorsConfigurationSchema.safeParseAsync(contentsParsed);
|
|
785284
785294
|
if (result2.success) {
|
|
@@ -785385,7 +785395,7 @@ var GeneratorsConfigurationSchema5 = z.strictObject({
|
|
|
785385
785395
|
var APIS_DIRECTORY2 = "apis";
|
|
785386
785396
|
async function migrateDocsAndMultipleAPIs({ absolutePathToFernDirectory, workspaces, workspaceContainingDocs }) {
|
|
785387
785397
|
const absolutePathToApisDirectory = join(absolutePathToFernDirectory, RelativeFilePath.of(APIS_DIRECTORY2));
|
|
785388
|
-
await (0,
|
|
785398
|
+
await (0, import_promises54.mkdir)(absolutePathToApisDirectory);
|
|
785389
785399
|
for (const workspace of workspaces) {
|
|
785390
785400
|
const absolutePathToWorkspace = join(absolutePathToFernDirectory, RelativeFilePath.of(workspace));
|
|
785391
785401
|
const docsURLs = await migrateAndWriteGeneratorsYml({ absolutePathToWorkspace });
|
|
@@ -785393,11 +785403,11 @@ async function migrateDocsAndMultipleAPIs({ absolutePathToFernDirectory, workspa
|
|
|
785393
785403
|
await migrateAndWriteDocsYml({ absolutePathToWorkspace, docsURLs, apiName: workspaceContainingDocs });
|
|
785394
785404
|
const absolutePathToDocsFolder = getAbsolutePathToDocsFolder({ absolutePathToWorkspace });
|
|
785395
785405
|
await moveFolder({ src: absolutePathToDocsFolder, dest: absolutePathToFernDirectory });
|
|
785396
|
-
await (0,
|
|
785406
|
+
await (0, import_promises54.rm)(absolutePathToDocsFolder, { recursive: true });
|
|
785397
785407
|
}
|
|
785398
785408
|
const absolutePathToNestedWorkspace = join(absolutePathToApisDirectory, RelativeFilePath.of(workspace));
|
|
785399
785409
|
await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToNestedWorkspace });
|
|
785400
|
-
await (0,
|
|
785410
|
+
await (0, import_promises54.rm)(absolutePathToWorkspace, { recursive: true });
|
|
785401
785411
|
}
|
|
785402
785412
|
}
|
|
785403
785413
|
async function migrateAndWriteGeneratorsYml({ absolutePathToWorkspace }) {
|
|
@@ -785410,7 +785420,7 @@ async function migrateAndWriteGeneratorsYml({ absolutePathToWorkspace }) {
|
|
|
785410
785420
|
generatorsConfiguration,
|
|
785411
785421
|
pathModificationStrategy: PathModificationStrategy.Nest
|
|
785412
785422
|
});
|
|
785413
|
-
await (0,
|
|
785423
|
+
await (0, import_promises54.writeFile)(absolutePathToGeneratorsConfiguration, js_yaml_default.dump(convertedResponse.value));
|
|
785414
785424
|
return convertedResponse.docsURLs;
|
|
785415
785425
|
}
|
|
785416
785426
|
async function migrateAndWriteDocsYml({ absolutePathToWorkspace, docsURLs, apiName }) {
|
|
@@ -785424,19 +785434,19 @@ async function migrateAndWriteDocsYml({ absolutePathToWorkspace, docsURLs, apiNa
|
|
|
785424
785434
|
apiName
|
|
785425
785435
|
});
|
|
785426
785436
|
const absolutePathToDocsConfig = getAbsolutePathToDocsYaml({ absolutePathToWorkspace });
|
|
785427
|
-
await (0,
|
|
785437
|
+
await (0, import_promises54.writeFile)(absolutePathToDocsConfig, js_yaml_default.dump(convertedDocsConfig));
|
|
785428
785438
|
}
|
|
785429
785439
|
|
|
785430
785440
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateDocsAndSingleAPI.js
|
|
785431
|
-
var
|
|
785441
|
+
var import_promises55 = require("fs/promises");
|
|
785432
785442
|
async function migrateDocsAndSingleAPI({ absolutePathToFernDirectory, absolutePathToWorkspace }) {
|
|
785433
785443
|
const docsURLs = await migrateAndWriteGeneratorsYml2({ absolutePathToWorkspace });
|
|
785434
785444
|
await migrateAndWriteDocsYml2({ absolutePathToWorkspace, docsURLs });
|
|
785435
785445
|
const absolutePathToDocsFolder = getAbsolutePathToDocsFolder({ absolutePathToWorkspace });
|
|
785436
785446
|
await moveFolder({ src: absolutePathToDocsFolder, dest: absolutePathToFernDirectory });
|
|
785437
785447
|
await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToFernDirectory });
|
|
785438
|
-
await (0,
|
|
785439
|
-
await (0,
|
|
785448
|
+
await (0, import_promises55.rm)(absolutePathToDocsFolder, { recursive: true });
|
|
785449
|
+
await (0, import_promises55.rm)(absolutePathToWorkspace, { recursive: true });
|
|
785440
785450
|
}
|
|
785441
785451
|
async function migrateAndWriteDocsYml2({ absolutePathToWorkspace, docsURLs }) {
|
|
785442
785452
|
const docsConfiguration = await loadRawDocsConfiguration2({ absolutePathToWorkspace });
|
|
@@ -785449,7 +785459,7 @@ async function migrateAndWriteDocsYml2({ absolutePathToWorkspace, docsURLs }) {
|
|
|
785449
785459
|
apiName: void 0
|
|
785450
785460
|
});
|
|
785451
785461
|
const absolutePathToDocsConfig = getAbsolutePathToDocsYaml({ absolutePathToWorkspace });
|
|
785452
|
-
await (0,
|
|
785462
|
+
await (0, import_promises55.writeFile)(absolutePathToDocsConfig, js_yaml_default.dump(convertedDocsConfig));
|
|
785453
785463
|
}
|
|
785454
785464
|
async function migrateAndWriteGeneratorsYml2({ absolutePathToWorkspace }) {
|
|
785455
785465
|
const generatorsConfiguration = await loadRawGeneratorsConfiguration3({ absolutePathToWorkspace });
|
|
@@ -785461,22 +785471,22 @@ async function migrateAndWriteGeneratorsYml2({ absolutePathToWorkspace }) {
|
|
|
785461
785471
|
generatorsConfiguration,
|
|
785462
785472
|
pathModificationStrategy: "MoveUp"
|
|
785463
785473
|
});
|
|
785464
|
-
await (0,
|
|
785474
|
+
await (0, import_promises55.writeFile)(absolutePathToGeneratorsConfiguration, js_yaml_default.dump(convertedResponse.value));
|
|
785465
785475
|
return convertedResponse.docsURLs;
|
|
785466
785476
|
}
|
|
785467
785477
|
|
|
785468
785478
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateOnlyMultipleAPIs.js
|
|
785469
|
-
var
|
|
785479
|
+
var import_promises56 = require("fs/promises");
|
|
785470
785480
|
var APIS_DIRECTORY3 = "apis";
|
|
785471
785481
|
async function migrateOnlyMultipleAPIs({ absolutePathToFernDirectory, workspaces }) {
|
|
785472
785482
|
const absolutePathToApisDirectory = join(absolutePathToFernDirectory, RelativeFilePath.of(APIS_DIRECTORY3));
|
|
785473
|
-
await (0,
|
|
785483
|
+
await (0, import_promises56.mkdir)(absolutePathToApisDirectory);
|
|
785474
785484
|
for (const workspace of workspaces) {
|
|
785475
785485
|
const absolutePathToWorkspace = join(absolutePathToFernDirectory, RelativeFilePath.of(workspace));
|
|
785476
785486
|
await migrateAndWriteGeneratorsYml3({ absolutePathToWorkspace });
|
|
785477
785487
|
const absolutePathToNestedWorkspace = join(absolutePathToApisDirectory, RelativeFilePath.of(workspace));
|
|
785478
785488
|
await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToNestedWorkspace });
|
|
785479
|
-
await (0,
|
|
785489
|
+
await (0, import_promises56.rm)(absolutePathToWorkspace, { recursive: true });
|
|
785480
785490
|
}
|
|
785481
785491
|
}
|
|
785482
785492
|
async function migrateAndWriteGeneratorsYml3({ absolutePathToWorkspace }) {
|
|
@@ -785489,15 +785499,15 @@ async function migrateAndWriteGeneratorsYml3({ absolutePathToWorkspace }) {
|
|
|
785489
785499
|
generatorsConfiguration,
|
|
785490
785500
|
pathModificationStrategy: PathModificationStrategy.Nest
|
|
785491
785501
|
});
|
|
785492
|
-
await (0,
|
|
785502
|
+
await (0, import_promises56.writeFile)(absolutePathToGeneratorsConfiguration, js_yaml_default.dump(convertedResponse.value));
|
|
785493
785503
|
}
|
|
785494
785504
|
|
|
785495
785505
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateOnlySingleAPI.js
|
|
785496
|
-
var
|
|
785506
|
+
var import_promises57 = require("fs/promises");
|
|
785497
785507
|
async function migrateOnlySingleAPI({ absolutePathToFernDirectory, absolutePathToWorkspace }) {
|
|
785498
785508
|
await migrateAndWriteGeneratorsYml4({ absolutePathToWorkspace });
|
|
785499
785509
|
await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToFernDirectory });
|
|
785500
|
-
await (0,
|
|
785510
|
+
await (0, import_promises57.rmdir)(absolutePathToWorkspace, { recursive: true });
|
|
785501
785511
|
}
|
|
785502
785512
|
async function migrateAndWriteGeneratorsYml4({ absolutePathToWorkspace }) {
|
|
785503
785513
|
const generatorsConfiguration = await loadRawGeneratorsConfiguration3({ absolutePathToWorkspace });
|
|
@@ -785509,7 +785519,7 @@ async function migrateAndWriteGeneratorsYml4({ absolutePathToWorkspace }) {
|
|
|
785509
785519
|
generatorsConfiguration,
|
|
785510
785520
|
pathModificationStrategy: "MoveUp"
|
|
785511
785521
|
});
|
|
785512
|
-
await (0,
|
|
785522
|
+
await (0, import_promises57.writeFile)(absolutePathToGeneratorsConfiguration, js_yaml_default.dump(convertedResponse.value));
|
|
785513
785523
|
}
|
|
785514
785524
|
|
|
785515
785525
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migration.js
|
|
@@ -785586,7 +785596,7 @@ var versionMigrations12 = {
|
|
|
785586
785596
|
var __default12 = versionMigrations12;
|
|
785587
785597
|
|
|
785588
785598
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.3.0-rc12/add-value-key-to-type-examples/migration.js
|
|
785589
|
-
var
|
|
785599
|
+
var import_promises58 = require("fs/promises");
|
|
785590
785600
|
var import_yaml7 = __toESM(require_dist4());
|
|
785591
785601
|
|
|
785592
785602
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.3.0-rc12/add-value-key-to-type-examples/getAllYamlFiles.js
|
|
@@ -785627,7 +785637,7 @@ var migration13 = {
|
|
|
785627
785637
|
}
|
|
785628
785638
|
};
|
|
785629
785639
|
async function migrateYamlFile2(filepath, context) {
|
|
785630
|
-
const contents = await (0,
|
|
785640
|
+
const contents = await (0, import_promises58.readFile)(filepath);
|
|
785631
785641
|
const parsedDocument = import_yaml7.default.parseDocument(contents.toString());
|
|
785632
785642
|
const types4 = parsedDocument.get("types");
|
|
785633
785643
|
if (types4 == null) {
|
|
@@ -785653,7 +785663,7 @@ async function migrateYamlFile2(filepath, context) {
|
|
|
785653
785663
|
examples.set(i2, { value });
|
|
785654
785664
|
}
|
|
785655
785665
|
}
|
|
785656
|
-
await (0,
|
|
785666
|
+
await (0, import_promises58.writeFile)(filepath, parsedDocument.toString());
|
|
785657
785667
|
}
|
|
785658
785668
|
|
|
785659
785669
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.3.0-rc12/index.js
|
|
@@ -785664,7 +785674,7 @@ var versionMigrations13 = {
|
|
|
785664
785674
|
var __default13 = versionMigrations13;
|
|
785665
785675
|
|
|
785666
785676
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.3.23/change-services-key-to-service/migration.js
|
|
785667
|
-
var
|
|
785677
|
+
var import_promises59 = require("fs/promises");
|
|
785668
785678
|
var import_yaml8 = __toESM(require_dist4());
|
|
785669
785679
|
|
|
785670
785680
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.3.23/change-services-key-to-service/getAllYamlFiles.js
|
|
@@ -785705,7 +785715,7 @@ var migration14 = {
|
|
|
785705
785715
|
}
|
|
785706
785716
|
};
|
|
785707
785717
|
async function migrateYamlFile3(filepath, context) {
|
|
785708
|
-
const contents = await (0,
|
|
785718
|
+
const contents = await (0, import_promises59.readFile)(filepath);
|
|
785709
785719
|
const parsedDocument = import_yaml8.default.parseDocument(contents.toString());
|
|
785710
785720
|
if (!import_yaml8.default.isMap(parsedDocument.contents)) {
|
|
785711
785721
|
return context.failAndThrow("File is not a map");
|
|
@@ -785735,7 +785745,7 @@ async function migrateYamlFile3(filepath, context) {
|
|
|
785735
785745
|
pair.value = firstService.value;
|
|
785736
785746
|
}
|
|
785737
785747
|
}
|
|
785738
|
-
await (0,
|
|
785748
|
+
await (0, import_promises59.writeFile)(filepath, parsedDocument.toString());
|
|
785739
785749
|
}
|
|
785740
785750
|
|
|
785741
785751
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.3.23/index.js
|
|
@@ -785746,7 +785756,7 @@ var versionMigrations14 = {
|
|
|
785746
785756
|
var __default14 = versionMigrations14;
|
|
785747
785757
|
|
|
785748
785758
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.5.4/move-service-docs-to-top-level/migration.js
|
|
785749
|
-
var
|
|
785759
|
+
var import_promises60 = require("fs/promises");
|
|
785750
785760
|
var import_yaml9 = __toESM(require_dist4());
|
|
785751
785761
|
|
|
785752
785762
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.5.4/move-service-docs-to-top-level/getAllYamlFiles.js
|
|
@@ -785787,7 +785797,7 @@ var migration15 = {
|
|
|
785787
785797
|
}
|
|
785788
785798
|
};
|
|
785789
785799
|
async function migrateYamlFile4(filepath, context) {
|
|
785790
|
-
const contents = await (0,
|
|
785800
|
+
const contents = await (0, import_promises60.readFile)(filepath);
|
|
785791
785801
|
const parsedDocument = import_yaml9.default.parseDocument(contents.toString());
|
|
785792
785802
|
if (!import_yaml9.default.isMap(parsedDocument.contents)) {
|
|
785793
785803
|
return context.failAndThrow("File is not a map");
|
|
@@ -785806,7 +785816,7 @@ async function migrateYamlFile4(filepath, context) {
|
|
|
785806
785816
|
}
|
|
785807
785817
|
service.items.splice(indexOfServiceDocsPair, 1);
|
|
785808
785818
|
parsedDocument.contents.items.unshift(docsPair);
|
|
785809
|
-
await (0,
|
|
785819
|
+
await (0, import_promises60.writeFile)(filepath, parsedDocument.toString());
|
|
785810
785820
|
}
|
|
785811
785821
|
|
|
785812
785822
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.5.4/index.js
|
|
@@ -785817,7 +785827,7 @@ var versionMigrations15 = {
|
|
|
785817
785827
|
var __default15 = versionMigrations15;
|
|
785818
785828
|
|
|
785819
785829
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.9.10/add-suffix-to-docs-domain/migration.js
|
|
785820
|
-
var
|
|
785830
|
+
var import_promises61 = require("fs/promises");
|
|
785821
785831
|
|
|
785822
785832
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.9.10/add-suffix-to-docs-domain/getAllGeneratorYamlFiles.js
|
|
785823
785833
|
var import_glob_promise15 = __toESM(require_lib6());
|
|
@@ -785857,14 +785867,14 @@ var migration16 = {
|
|
|
785857
785867
|
}
|
|
785858
785868
|
};
|
|
785859
785869
|
async function migrateYamlFile5(filepath) {
|
|
785860
|
-
const contents = await (0,
|
|
785870
|
+
const contents = await (0, import_promises61.readFile)(filepath);
|
|
785861
785871
|
const domainSuffix = process.env.DOMAIN_SUFFIX ?? "docs.buildwithfern.com";
|
|
785862
785872
|
const regex3 = /(docs:\s*domain:\s*)"([^"]*)"/g;
|
|
785863
785873
|
const updatedSnapshot = contents.toString().replace(regex3, (_match, _prefix, domain2) => {
|
|
785864
785874
|
return `docs:
|
|
785865
785875
|
domain: "${domain2}.${domainSuffix}"`;
|
|
785866
785876
|
});
|
|
785867
|
-
await (0,
|
|
785877
|
+
await (0, import_promises61.writeFile)(filepath, updatedSnapshot.toString());
|
|
785868
785878
|
}
|
|
785869
785879
|
|
|
785870
785880
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.9.10/index.js
|
|
@@ -785966,7 +785976,7 @@ ${source_default.dim(migration17.summary)}`
|
|
|
785966
785976
|
}
|
|
785967
785977
|
|
|
785968
785978
|
// pnp:/home/circleci/project/packages/cli/cli/src/commands/upgrade/upgrade.ts
|
|
785969
|
-
var
|
|
785979
|
+
var import_promises62 = require("fs/promises");
|
|
785970
785980
|
|
|
785971
785981
|
// pnp:/home/circleci/project/packages/cli/cli/src/cli-context/upgrade-utils/doesVersionOfCliExist.ts
|
|
785972
785982
|
async function doesVersionOfCliExist({
|
|
@@ -786073,7 +786083,7 @@ async function upgrade({
|
|
|
786073
786083
|
const newProjectConfig = immer_esm_default(projectConfig.rawConfig, (draft) => {
|
|
786074
786084
|
draft.version = fernCliUpgradeInfo.latestVersion;
|
|
786075
786085
|
});
|
|
786076
|
-
await (0,
|
|
786086
|
+
await (0, import_promises62.writeFile)(projectConfig._absolutePath, JSON.stringify(newProjectConfig, void 0, 2));
|
|
786077
786087
|
cliContext.logger.info(
|
|
786078
786088
|
`Upgrading from ${source_default.dim(cliContext.environment.packageVersion)} \u2192 ${source_default.green(
|
|
786079
786089
|
fernCliUpgradeInfo.latestVersion
|
|
@@ -786120,7 +786130,7 @@ async function validateWorkspaces({
|
|
|
786120
786130
|
}
|
|
786121
786131
|
|
|
786122
786132
|
// pnp:/home/circleci/project/packages/cli/cli/src/commands/write-definition/writeDefinitionForWorkspaces.ts
|
|
786123
|
-
var
|
|
786133
|
+
var import_promises63 = require("fs/promises");
|
|
786124
786134
|
async function writeDefinitionForWorkspaces({
|
|
786125
786135
|
project,
|
|
786126
786136
|
cliContext
|
|
@@ -786140,8 +786150,8 @@ async function writeDefinitionForWorkspaces({
|
|
|
786140
786150
|
}
|
|
786141
786151
|
async function writeDefinitionForWorkspace(workspace) {
|
|
786142
786152
|
const directoryOfDefinition = join(workspace.absoluteFilepath, RelativeFilePath.of(DEFINITION_DIRECTORY));
|
|
786143
|
-
await (0,
|
|
786144
|
-
await (0,
|
|
786153
|
+
await (0, import_promises63.mkdir)(directoryOfDefinition);
|
|
786154
|
+
await (0, import_promises63.writeFile)(
|
|
786145
786155
|
join(directoryOfDefinition, RelativeFilePath.of(ROOT_API_FILENAME)),
|
|
786146
786156
|
js_yaml_default.dump(workspace.definition.rootApiFile.contents)
|
|
786147
786157
|
);
|
|
@@ -786152,8 +786162,8 @@ async function writeDefinitionForWorkspace(workspace) {
|
|
|
786152
786162
|
fileContents: js_yaml_default.dump(definitionFile.contents)
|
|
786153
786163
|
});
|
|
786154
786164
|
const dirname5 = absoluteFilepath.split("/").slice(0, -1).join("/");
|
|
786155
|
-
await (0,
|
|
786156
|
-
await (0,
|
|
786165
|
+
await (0, import_promises63.mkdir)(dirname5, { recursive: true });
|
|
786166
|
+
await (0, import_promises63.writeFile)(absoluteFilepath, fileContents);
|
|
786157
786167
|
}
|
|
786158
786168
|
}
|
|
786159
786169
|
|