fern-api 0.15.7 → 0.15.9
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 +226 -208
- 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.9",
|
|
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.9",
|
|
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.9" == null) {
|
|
743253
743253
|
this.logger.error("CLI_VERSION is not defined");
|
|
743254
743254
|
}
|
|
743255
|
-
return "0.15.
|
|
743255
|
+
return "0.15.9";
|
|
743256
743256
|
}
|
|
743257
743257
|
getCliName() {
|
|
743258
743258
|
if ("fern" == null) {
|
|
@@ -745436,7 +745436,15 @@ function getOriginalTypeDeclarationForProperty({ typeName, wirePropertyKey, rawO
|
|
|
745436
745436
|
var _a2;
|
|
745437
745437
|
const rawPropertyType = (_a2 = rawObject.properties) == null ? void 0 : _a2[wirePropertyKey];
|
|
745438
745438
|
if (rawPropertyType != null) {
|
|
745439
|
-
|
|
745439
|
+
const resolvedType = typeResolver.resolveTypeOrThrow({
|
|
745440
|
+
type: typeof rawPropertyType === "string" ? rawPropertyType : rawPropertyType.type,
|
|
745441
|
+
file
|
|
745442
|
+
});
|
|
745443
|
+
if (resolvedType._type === "named") {
|
|
745444
|
+
return { typeName, rawPropertyType, file: resolvedType.file };
|
|
745445
|
+
} else {
|
|
745446
|
+
return { typeName, rawPropertyType, file };
|
|
745447
|
+
}
|
|
745440
745448
|
} else {
|
|
745441
745449
|
return getOriginalTypeDeclarationForPropertyFromExtensions({
|
|
745442
745450
|
wirePropertyKey,
|
|
@@ -745752,7 +745760,7 @@ function convertExampleRequestBody({ endpoint, example, typeResolver, exampleRes
|
|
|
745752
745760
|
rawTypeBeingExemplified: typeof originalTypeDeclaration.rawPropertyType === "string" ? originalTypeDeclaration.rawPropertyType : originalTypeDeclaration.rawPropertyType.type,
|
|
745753
745761
|
typeResolver,
|
|
745754
745762
|
exampleResolver,
|
|
745755
|
-
fileContainingRawTypeReference: file,
|
|
745763
|
+
fileContainingRawTypeReference: originalTypeDeclaration.file,
|
|
745756
745764
|
fileContainingExample: file
|
|
745757
745765
|
}),
|
|
745758
745766
|
originalTypeDeclaration: originalTypeDeclaration.typeName
|
|
@@ -756276,7 +756284,7 @@ async function getIntermediateRepresentation({
|
|
|
756276
756284
|
// pnp:/home/circleci/project/packages/cli/generation/local-generation/local-workspace-runner/lib/runLocalGenerationForWorkspace.js
|
|
756277
756285
|
var import_os3 = __toESM(require("os"));
|
|
756278
756286
|
var import_path31 = __toESM(require("path"));
|
|
756279
|
-
var
|
|
756287
|
+
var import_tmp_promise6 = __toESM(require_tmp_promise());
|
|
756280
756288
|
|
|
756281
756289
|
// pnp:/home/circleci/project/packages/commons/logging-execa/lib/loggingExeca.js
|
|
756282
756290
|
var import_execa = __toESM(require_execa());
|
|
@@ -756388,10 +756396,12 @@ async function getFernIgnorePaths({ absolutePathToFernignore }) {
|
|
|
756388
756396
|
|
|
756389
756397
|
// pnp:/home/circleci/project/packages/cli/generation/local-generation/docker-utils/lib/runDocker.js
|
|
756390
756398
|
var import_dockerode = __toESM(require_docker());
|
|
756399
|
+
var import_promises31 = require("fs/promises");
|
|
756391
756400
|
var import_stream3 = require("stream");
|
|
756392
|
-
|
|
756401
|
+
var import_tmp_promise5 = __toESM(require_tmp_promise());
|
|
756402
|
+
async function runDocker({ imageName, args, binds, writeLogsToFile = true, removeAfterCompletion = false }) {
|
|
756393
756403
|
const docker = new import_dockerode.default();
|
|
756394
|
-
const tryRun = () => tryRunDocker({ docker, imageName, args, binds, removeAfterCompletion });
|
|
756404
|
+
const tryRun = () => tryRunDocker({ docker, imageName, args, binds, removeAfterCompletion, writeLogsToFile });
|
|
756395
756405
|
try {
|
|
756396
756406
|
await tryRun();
|
|
756397
756407
|
} catch (e) {
|
|
@@ -756403,9 +756413,11 @@ async function runDocker({ imageName, args, binds, removeAfterCompletion = false
|
|
|
756403
756413
|
}
|
|
756404
756414
|
}
|
|
756405
756415
|
}
|
|
756406
|
-
async function tryRunDocker({ docker, imageName, args, binds, removeAfterCompletion }) {
|
|
756416
|
+
async function tryRunDocker({ docker, imageName, args, binds, removeAfterCompletion, writeLogsToFile }) {
|
|
756417
|
+
let logs = "";
|
|
756407
756418
|
const [status, container] = await docker.run(imageName, args != null ? args : [], new import_stream3.Writable({
|
|
756408
756419
|
write(_chunk, _encding, callback) {
|
|
756420
|
+
logs += _chunk.toString();
|
|
756409
756421
|
setImmediate(callback);
|
|
756410
756422
|
}
|
|
756411
756423
|
}), {
|
|
@@ -756419,7 +756431,13 @@ async function tryRunDocker({ docker, imageName, args, binds, removeAfterComplet
|
|
|
756419
756431
|
throw status.Error;
|
|
756420
756432
|
}
|
|
756421
756433
|
if (status.StatusCode !== 0) {
|
|
756422
|
-
|
|
756434
|
+
if (writeLogsToFile) {
|
|
756435
|
+
const tmpFile = await import_tmp_promise5.default.file();
|
|
756436
|
+
await (0, import_promises31.writeFile)(tmpFile.path, logs);
|
|
756437
|
+
throw new Error(`Docker exited with a non-zero exit code. Logs here: ${tmpFile.path}`);
|
|
756438
|
+
} else {
|
|
756439
|
+
throw new Error("Docker exited with a non-zero exit code.");
|
|
756440
|
+
}
|
|
756423
756441
|
}
|
|
756424
756442
|
}
|
|
756425
756443
|
async function pullImage(docker, imageName) {
|
|
@@ -756437,7 +756455,7 @@ async function pullImage(docker, imageName) {
|
|
|
756437
756455
|
|
|
756438
756456
|
// pnp:/home/circleci/project/packages/cli/generation/local-generation/local-workspace-runner/lib/run-generator/runGenerator.js
|
|
756439
756457
|
var FernGeneratorExecParsing = __toESM(require_serialization12());
|
|
756440
|
-
var
|
|
756458
|
+
var import_promises32 = require("fs/promises");
|
|
756441
756459
|
|
|
756442
756460
|
// pnp:/home/circleci/project/packages/cli/generation/local-generation/local-workspace-runner/lib/run-generator/constants.js
|
|
756443
756461
|
var import_path30 = __toESM(require("path"));
|
|
@@ -756558,7 +756576,7 @@ async function runGenerator({ workspaceName, organization, absolutePathToOutput,
|
|
|
756558
756576
|
if (!parsedConfig.ok) {
|
|
756559
756577
|
throw new Error(`Failed to parse config.json into ${absolutePathToWriteConfigJson}`);
|
|
756560
756578
|
}
|
|
756561
|
-
await (0,
|
|
756579
|
+
await (0, import_promises32.writeFile)(absolutePathToWriteConfigJson, JSON.stringify(parsedConfig.value, void 0, 4));
|
|
756562
756580
|
const doesConfigJsonExist = await waitUntilPathExists(absolutePathToWriteConfigJson, 5e3);
|
|
756563
756581
|
if (!doesConfigJsonExist) {
|
|
756564
756582
|
throw new Error(`Failed to create ${absolutePathToWriteConfigJson}`);
|
|
@@ -756600,7 +756618,7 @@ async function runLocalGenerationForWorkspace({ organization, workspace, generat
|
|
|
756600
756618
|
}
|
|
756601
756619
|
}
|
|
756602
756620
|
async function getWorkspaceTempDir() {
|
|
756603
|
-
return
|
|
756621
|
+
return import_tmp_promise6.default.dir({
|
|
756604
756622
|
tmpdir: import_os3.default.platform() === "darwin" ? import_path31.default.join("/private", import_os3.default.tmpdir()) : void 0,
|
|
756605
756623
|
prefix: "fern"
|
|
756606
756624
|
});
|
|
@@ -756615,19 +756633,19 @@ async function writeFilesToDiskAndRunGenerator({ organization, workspace, genera
|
|
|
756615
756633
|
irVersionOverride
|
|
756616
756634
|
});
|
|
756617
756635
|
context.logger.debug("Wrote IR to: " + absolutePathToIr);
|
|
756618
|
-
const configJsonFile = await
|
|
756636
|
+
const configJsonFile = await import_tmp_promise6.default.file({
|
|
756619
756637
|
tmpdir: workspaceTempDir.path
|
|
756620
756638
|
});
|
|
756621
756639
|
const absolutePathToWriteConfigJson = AbsoluteFilePath.of(configJsonFile.path);
|
|
756622
756640
|
context.logger.debug("Will write config.json to: " + absolutePathToWriteConfigJson);
|
|
756623
|
-
const tmpOutputDirectory = await
|
|
756641
|
+
const tmpOutputDirectory = await import_tmp_promise6.default.dir({
|
|
756624
756642
|
tmpdir: workspaceTempDir.path
|
|
756625
756643
|
});
|
|
756626
756644
|
const absolutePathToTmpOutputDirectory = AbsoluteFilePath.of(tmpOutputDirectory.path);
|
|
756627
756645
|
context.logger.debug("Will write output to: " + absolutePathToTmpOutputDirectory);
|
|
756628
756646
|
let absolutePathToTmpSnippetJSON = void 0;
|
|
756629
756647
|
if (writeSnippets) {
|
|
756630
|
-
const snippetJsonFile = await
|
|
756648
|
+
const snippetJsonFile = await import_tmp_promise6.default.file({
|
|
756631
756649
|
tmpdir: workspaceTempDir.path
|
|
756632
756650
|
});
|
|
756633
756651
|
absolutePathToTmpSnippetJSON = AbsoluteFilePath.of(snippetJsonFile.path);
|
|
@@ -756669,7 +756687,7 @@ async function writeIrToFile({ workspace, audiences, generatorInvocation, worksp
|
|
|
756669
756687
|
version: generatorInvocation.version
|
|
756670
756688
|
}
|
|
756671
756689
|
});
|
|
756672
|
-
const irFile = await
|
|
756690
|
+
const irFile = await import_tmp_promise6.default.file({
|
|
756673
756691
|
tmpdir: workspaceTempDir.path
|
|
756674
756692
|
});
|
|
756675
756693
|
const absolutePathToIr = AbsoluteFilePath.of(irFile.path);
|
|
@@ -756854,9 +756872,9 @@ function pollJobAndReportStatus({ job, taskId, taskHandler, context }) {
|
|
|
756854
756872
|
var import_axios6 = __toESM(require_axios2());
|
|
756855
756873
|
var import_decompress2 = __toESM(require_decompress());
|
|
756856
756874
|
var import_fs7 = require("fs");
|
|
756857
|
-
var
|
|
756875
|
+
var import_promises33 = require("fs/promises");
|
|
756858
756876
|
var import_path32 = __toESM(require("path"));
|
|
756859
|
-
var
|
|
756877
|
+
var import_promises34 = require("stream/promises");
|
|
756860
756878
|
|
|
756861
756879
|
// pnp:/home/circleci/project/.yarn/cache/terminal-link-npm-3.0.0-82cbbd7f4a-85a78ae50a.zip/node_modules/terminal-link/index.js
|
|
756862
756880
|
var import_supports_hyperlinks = __toESM(require_supports_hyperlinks());
|
|
@@ -756874,7 +756892,7 @@ terminalLink.stderr = (text6, url, options = {}) => terminalLink(text6, url, { t
|
|
|
756874
756892
|
terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
|
|
756875
756893
|
|
|
756876
756894
|
// pnp:/home/circleci/project/packages/cli/generation/remote-generation/remote-workspace-runner/lib/RemoteTaskHandler.js
|
|
756877
|
-
var
|
|
756895
|
+
var import_tmp_promise7 = __toESM(require_tmp_promise());
|
|
756878
756896
|
var _isFinished, _createdSnippets;
|
|
756879
756897
|
var RemoteTaskHandler = class {
|
|
756880
756898
|
constructor({ interactiveTaskContext, generatorInvocation }) {
|
|
@@ -756956,13 +756974,13 @@ async function downloadFilesForTask({ s3PreSignedReadUrl, absolutePathToLocalOut
|
|
|
756956
756974
|
const request = await import_axios6.default.get(s3PreSignedReadUrl, {
|
|
756957
756975
|
responseType: "stream"
|
|
756958
756976
|
});
|
|
756959
|
-
const tmpDir = await
|
|
756977
|
+
const tmpDir = await import_tmp_promise7.default.dir({ prefix: "fern", unsafeCleanup: true });
|
|
756960
756978
|
const outputZipPath = import_path32.default.join(tmpDir.path, "output.zip");
|
|
756961
|
-
await (0,
|
|
756979
|
+
await (0, import_promises34.pipeline)(request.data, (0, import_fs7.createWriteStream)(outputZipPath));
|
|
756962
756980
|
if (await doesPathExist(absolutePathToLocalOutput)) {
|
|
756963
|
-
await (0,
|
|
756981
|
+
await (0, import_promises33.rm)(absolutePathToLocalOutput, { recursive: true });
|
|
756964
756982
|
}
|
|
756965
|
-
await (0,
|
|
756983
|
+
await (0, import_promises33.mkdir)(absolutePathToLocalOutput, { recursive: true });
|
|
756966
756984
|
await (0, import_decompress2.default)(outputZipPath, absolutePathToLocalOutput);
|
|
756967
756985
|
context.logger.info(source_default.green(`Downloaded to ${absolutePathToLocalOutput}`));
|
|
756968
756986
|
} catch (e) {
|
|
@@ -757056,10 +757074,10 @@ async function runRemoteGenerationForAPIWorkspace({ organization, workspace, con
|
|
|
757056
757074
|
|
|
757057
757075
|
// pnp:/home/circleci/project/packages/cli/config-management/docs-configuration/lib/parseDocsConfiguration.js
|
|
757058
757076
|
var import_serialization3 = __toESM(require_serialization2());
|
|
757059
|
-
var
|
|
757077
|
+
var import_promises36 = require("fs/promises");
|
|
757060
757078
|
|
|
757061
757079
|
// pnp:/home/circleci/project/packages/cli/config-management/docs-configuration/lib/getAllPages.js
|
|
757062
|
-
var
|
|
757080
|
+
var import_promises35 = require("fs/promises");
|
|
757063
757081
|
async function getAllPages({ navigation, absolutePathToFernFolder }) {
|
|
757064
757082
|
switch (navigation.type) {
|
|
757065
757083
|
case "tabbed":
|
|
@@ -757095,7 +757113,7 @@ async function getAllPagesFromNavigationItem({ item, absolutePathToFernFolder })
|
|
|
757095
757113
|
return {};
|
|
757096
757114
|
case "page":
|
|
757097
757115
|
return {
|
|
757098
|
-
[await relativize(absolutePathToFernFolder, item.absolutePath)]: (await (0,
|
|
757116
|
+
[await relativize(absolutePathToFernFolder, item.absolutePath)]: (await (0, import_promises35.readFile)(item.absolutePath)).toString()
|
|
757099
757117
|
};
|
|
757100
757118
|
case "section":
|
|
757101
757119
|
return combineMaps(await Promise.all(item.contents.map(async (sectionItem) => {
|
|
@@ -757181,7 +757199,7 @@ async function getNavigationConfiguration({ versions, navigation, absolutePathTo
|
|
|
757181
757199
|
const versionedNavbars = [];
|
|
757182
757200
|
for (const version3 of versions) {
|
|
757183
757201
|
const absoluteFilepathToVersionFile = resolve(absolutePathToFernFolder, version3.path);
|
|
757184
|
-
const content3 = js_yaml_default.load((await (0,
|
|
757202
|
+
const content3 = js_yaml_default.load((await (0, import_promises36.readFile)(absoluteFilepathToVersionFile)).toString());
|
|
757185
757203
|
const result2 = await import_serialization3.VersionFileConfig.parseOrThrow(content3);
|
|
757186
757204
|
const navigation2 = await convertNavigationConfiguration({
|
|
757187
757205
|
rawNavigationConfig: result2.navigation,
|
|
@@ -757405,7 +757423,7 @@ function isTabbedNavigationConfig(navigationConfig) {
|
|
|
757405
757423
|
// pnp:/home/circleci/project/packages/cli/generation/remote-generation/remote-workspace-runner/lib/publishDocs.js
|
|
757406
757424
|
var import_fdr_sdk3 = __toESM(require_dist());
|
|
757407
757425
|
var import_axios7 = __toESM(require_axios2());
|
|
757408
|
-
var
|
|
757426
|
+
var import_promises37 = require("fs/promises");
|
|
757409
757427
|
var mime = __toESM(require_mime_types());
|
|
757410
757428
|
async function publishDocs({ token, organization, docsWorkspace, domain: domain2, customDomains, fernWorkspaces, context, version: version3, preview }) {
|
|
757411
757429
|
const fdr = createFdrService({ token: token.value });
|
|
@@ -757455,7 +757473,7 @@ async function publishDocs({ token, organization, docsWorkspace, domain: domain2
|
|
|
757455
757473
|
context.failAndThrow(`Failed to upload ${filepathToUpload}`, "Upload URL is missing");
|
|
757456
757474
|
} else {
|
|
757457
757475
|
const mimeType = mime.lookup(filepathToUpload);
|
|
757458
|
-
await import_axios7.default.put(uploadUrl.uploadUrl, await (0,
|
|
757476
|
+
await import_axios7.default.put(uploadUrl.uploadUrl, await (0, import_promises37.readFile)(filepathToUpload), {
|
|
757459
757477
|
headers: {
|
|
757460
757478
|
"Content-Type": mimeType === false ? "application/octet-stream" : mimeType
|
|
757461
757479
|
}
|
|
@@ -780486,11 +780504,11 @@ function buildStyle(chalk4, styles4) {
|
|
|
780486
780504
|
}
|
|
780487
780505
|
return current2;
|
|
780488
780506
|
}
|
|
780489
|
-
var templates = (chalk4,
|
|
780507
|
+
var templates = (chalk4, tmp9) => {
|
|
780490
780508
|
const styles4 = [];
|
|
780491
780509
|
const chunks = [];
|
|
780492
780510
|
let chunk2 = [];
|
|
780493
|
-
|
|
780511
|
+
tmp9.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
|
|
780494
780512
|
if (escapeChar) {
|
|
780495
780513
|
chunk2.push(unescape3(escapeChar));
|
|
780496
780514
|
} else if (style) {
|
|
@@ -783893,10 +783911,10 @@ async function previewDocsWorkspace({
|
|
|
783893
783911
|
// pnp:/home/circleci/project/packages/cli/cli/src/commands/register/registerWorkspacesV1.ts
|
|
783894
783912
|
var import_fiddle_sdk5 = __toESM(require_node());
|
|
783895
783913
|
var import_axios8 = __toESM(require_axios2());
|
|
783896
|
-
var
|
|
783914
|
+
var import_promises38 = require("fs/promises");
|
|
783897
783915
|
var import_path34 = __toESM(require("path"));
|
|
783898
783916
|
var import_tar2 = __toESM(require_tar());
|
|
783899
|
-
var
|
|
783917
|
+
var import_tmp_promise8 = __toESM(require_tmp_promise());
|
|
783900
783918
|
async function registerWorkspacesV1({
|
|
783901
783919
|
project,
|
|
783902
783920
|
cliContext,
|
|
@@ -783937,12 +783955,12 @@ async function registerWorkspacesV1({
|
|
|
783937
783955
|
});
|
|
783938
783956
|
return;
|
|
783939
783957
|
}
|
|
783940
|
-
const tmpDir = await
|
|
783958
|
+
const tmpDir = await import_tmp_promise8.default.dir();
|
|
783941
783959
|
const tarPath = import_path34.default.join(tmpDir.path, "definition.tgz");
|
|
783942
783960
|
context.logger.debug(`Compressing definition at ${tmpDir.path}`);
|
|
783943
783961
|
await import_tar2.default.create({ file: tarPath, cwd: workspace.absoluteFilepath }, ["."]);
|
|
783944
783962
|
context.logger.info("Uploading definition...");
|
|
783945
|
-
await import_axios8.default.put(registerApiResponse.body.definitionS3UploadUrl, await (0,
|
|
783963
|
+
await import_axios8.default.put(registerApiResponse.body.definitionS3UploadUrl, await (0, import_promises38.readFile)(tarPath));
|
|
783946
783964
|
context.logger.info(
|
|
783947
783965
|
`Registered @${project.config.organization}/${workspace.definition.rootApiFile.contents.name}:${registerApiResponse.body.version}`
|
|
783948
783966
|
);
|
|
@@ -784005,17 +784023,17 @@ async function generateToken({
|
|
|
784005
784023
|
}
|
|
784006
784024
|
|
|
784007
784025
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.188/generators-configuration/migration.js
|
|
784008
|
-
var
|
|
784026
|
+
var import_promises41 = require("fs/promises");
|
|
784009
784027
|
|
|
784010
784028
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.188/generators-configuration/loadWorkspaces.js
|
|
784011
|
-
var
|
|
784029
|
+
var import_promises39 = require("fs/promises");
|
|
784012
784030
|
var FERN_DIRECTORY2 = "fern";
|
|
784013
784031
|
async function loadWorkspaces(context) {
|
|
784014
784032
|
const fernDirectory = await getFernDirectory2();
|
|
784015
784033
|
if (fernDirectory == null) {
|
|
784016
784034
|
context.failAndThrow(`Directory "${FERN_DIRECTORY2}" not found.`);
|
|
784017
784035
|
}
|
|
784018
|
-
const fernDirectoryContents = await (0,
|
|
784036
|
+
const fernDirectoryContents = await (0, import_promises39.readdir)(fernDirectory, { withFileTypes: true });
|
|
784019
784037
|
return fernDirectoryContents.reduce((all4, item) => {
|
|
784020
784038
|
if (item.isDirectory()) {
|
|
784021
784039
|
all4.push(join(fernDirectory, RelativeFilePath.of(item.name)));
|
|
@@ -784050,7 +784068,7 @@ function convertGeneratorsConfiguration2({ absolutePathToGeneratorsConfiguration
|
|
|
784050
784068
|
}
|
|
784051
784069
|
|
|
784052
784070
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.188/generators-configuration/old-configuration/loadRawGeneratorsConfiguration.js
|
|
784053
|
-
var
|
|
784071
|
+
var import_promises40 = require("fs/promises");
|
|
784054
784072
|
|
|
784055
784073
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.188/generators-configuration/old-configuration/schemas/GenerateConfigSchema.js
|
|
784056
784074
|
var GenerateConfigSchema = z.strictObject({
|
|
@@ -784073,7 +784091,7 @@ var GeneratorsConfigurationSchema2 = z.strictObject({
|
|
|
784073
784091
|
|
|
784074
784092
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.188/generators-configuration/old-configuration/loadRawGeneratorsConfiguration.js
|
|
784075
784093
|
async function loadRawGeneratorsConfiguration2({ absolutePathToGeneratorsConfiguration, context }) {
|
|
784076
|
-
const contentsStr = await (0,
|
|
784094
|
+
const contentsStr = await (0, import_promises40.readFile)(absolutePathToGeneratorsConfiguration);
|
|
784077
784095
|
const contentsParsed = js_yaml_default.load(contentsStr.toString());
|
|
784078
784096
|
return await validateSchema({
|
|
784079
784097
|
schema: GeneratorsConfigurationSchema2,
|
|
@@ -784109,7 +784127,7 @@ async function migrateWorkspace(pathToWorkspace, context) {
|
|
|
784109
784127
|
rawGeneratorsConfiguration: oldRawConfiguration
|
|
784110
784128
|
});
|
|
784111
784129
|
const migratedConfiguration = migrateConfiguration(oldConfiguration);
|
|
784112
|
-
await (0,
|
|
784130
|
+
await (0, import_promises41.writeFile)(absolutePathToGeneratorsConfiguration, js_yaml_default.dump(migratedConfiguration));
|
|
784113
784131
|
}
|
|
784114
784132
|
function migrateConfiguration(oldConfiguration) {
|
|
784115
784133
|
return {
|
|
@@ -784135,7 +784153,7 @@ var versionMigrations = {
|
|
|
784135
784153
|
var __default = versionMigrations;
|
|
784136
784154
|
|
|
784137
784155
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.191/discriminant/migration.js
|
|
784138
|
-
var
|
|
784156
|
+
var import_promises42 = require("fs/promises");
|
|
784139
784157
|
|
|
784140
784158
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.191/discriminant/getAllYamlFiles.js
|
|
784141
784159
|
var import_glob_promise2 = __toESM(require_lib6());
|
|
@@ -784169,7 +784187,7 @@ var migration2 = {
|
|
|
784169
784187
|
try {
|
|
784170
784188
|
const fileContents = await getFileContents(yamlFilepath);
|
|
784171
784189
|
const newContents = addDiscriminantToFile(fileContents);
|
|
784172
|
-
await (0,
|
|
784190
|
+
await (0, import_promises42.writeFile)(yamlFilepath, newContents);
|
|
784173
784191
|
} catch (error) {
|
|
784174
784192
|
context.failAndThrow("Failed to migrate " + yamlFilepath, error);
|
|
784175
784193
|
}
|
|
@@ -784177,7 +784195,7 @@ var migration2 = {
|
|
|
784177
784195
|
}
|
|
784178
784196
|
};
|
|
784179
784197
|
async function getFileContents(filepath) {
|
|
784180
|
-
const buffer3 = await (0,
|
|
784198
|
+
const buffer3 = await (0, import_promises42.readFile)(filepath);
|
|
784181
784199
|
return buffer3.toString();
|
|
784182
784200
|
}
|
|
784183
784201
|
var UNION_REGEX = /^(\s{2,})union:\s*$/gm;
|
|
@@ -784206,7 +784224,7 @@ var versionMigrations2 = {
|
|
|
784206
784224
|
var __default2 = versionMigrations2;
|
|
784207
784225
|
|
|
784208
784226
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.203/union-single-property-key/migration.js
|
|
784209
|
-
var
|
|
784227
|
+
var import_promises43 = require("fs/promises");
|
|
784210
784228
|
var import_yaml = __toESM(require_dist4());
|
|
784211
784229
|
|
|
784212
784230
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.203/union-single-property-key/getAllYamlFiles.js
|
|
@@ -784247,7 +784265,7 @@ var migration3 = {
|
|
|
784247
784265
|
}
|
|
784248
784266
|
};
|
|
784249
784267
|
async function migrateFile(filepath, context) {
|
|
784250
|
-
const contents = await (0,
|
|
784268
|
+
const contents = await (0, import_promises43.readFile)(filepath);
|
|
784251
784269
|
const parsedDocument = import_yaml.default.parseDocument(contents.toString());
|
|
784252
784270
|
const types4 = parsedDocument.get("types");
|
|
784253
784271
|
if (types4 == null) {
|
|
@@ -784279,7 +784297,7 @@ async function migrateFile(filepath, context) {
|
|
|
784279
784297
|
}
|
|
784280
784298
|
}
|
|
784281
784299
|
}
|
|
784282
|
-
await (0,
|
|
784300
|
+
await (0, import_promises43.writeFile)(filepath, parsedDocument.toString());
|
|
784283
784301
|
}
|
|
784284
784302
|
|
|
784285
784303
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.203/index.js
|
|
@@ -784290,7 +784308,7 @@ var versionMigrations3 = {
|
|
|
784290
784308
|
var __default3 = versionMigrations3;
|
|
784291
784309
|
|
|
784292
784310
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.207/add-mode-to-draft-generators/migration.js
|
|
784293
|
-
var
|
|
784311
|
+
var import_promises44 = require("fs/promises");
|
|
784294
784312
|
var import_yaml2 = __toESM(require_dist4());
|
|
784295
784313
|
|
|
784296
784314
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.207/add-mode-to-draft-generators/getAllGeneratorYamlFiles.js
|
|
@@ -784331,7 +784349,7 @@ var migration4 = {
|
|
|
784331
784349
|
}
|
|
784332
784350
|
};
|
|
784333
784351
|
async function migrateGeneratorsYml(filepath, context) {
|
|
784334
|
-
const contents = await (0,
|
|
784352
|
+
const contents = await (0, import_promises44.readFile)(filepath);
|
|
784335
784353
|
const parsedDocument = import_yaml2.default.parseDocument(contents.toString());
|
|
784336
784354
|
const draftGenerators = parsedDocument.get("draft");
|
|
784337
784355
|
if (draftGenerators == null) {
|
|
@@ -784358,7 +784376,7 @@ async function migrateGeneratorsYml(filepath, context) {
|
|
|
784358
784376
|
draftGenerator.set("output-path", name2.value.includes("openapi") ? "./generated-openapi" : name2.value.includes("postman") ? "./generated-postman" : localOutput);
|
|
784359
784377
|
}
|
|
784360
784378
|
});
|
|
784361
|
-
await (0,
|
|
784379
|
+
await (0, import_promises44.writeFile)(filepath, parsedDocument.toString());
|
|
784362
784380
|
}
|
|
784363
784381
|
|
|
784364
784382
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.207/index.js
|
|
@@ -784369,7 +784387,7 @@ var versionMigrations4 = {
|
|
|
784369
784387
|
var __default4 = versionMigrations4;
|
|
784370
784388
|
|
|
784371
784389
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.210/remove-inline-error-declarations/migration.js
|
|
784372
|
-
var
|
|
784390
|
+
var import_promises45 = require("fs/promises");
|
|
784373
784391
|
var import_yaml3 = __toESM(require_dist4());
|
|
784374
784392
|
|
|
784375
784393
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.210/remove-inline-error-declarations/getAllYamlFiles.js
|
|
@@ -784410,7 +784428,7 @@ var migration5 = {
|
|
|
784410
784428
|
}
|
|
784411
784429
|
};
|
|
784412
784430
|
async function migrateFile2(filepath, context) {
|
|
784413
|
-
const contents = await (0,
|
|
784431
|
+
const contents = await (0, import_promises45.readFile)(filepath);
|
|
784414
784432
|
const parsedDocument = import_yaml3.default.parseDocument(contents.toString());
|
|
784415
784433
|
const addType = (typeName, typeDeclaration) => {
|
|
784416
784434
|
const types4 = parsedDocument.get("types");
|
|
@@ -784454,7 +784472,7 @@ async function migrateFile2(filepath, context) {
|
|
|
784454
784472
|
}
|
|
784455
784473
|
}
|
|
784456
784474
|
}
|
|
784457
|
-
await (0,
|
|
784475
|
+
await (0, import_promises45.writeFile)(filepath, parsedDocument.toString());
|
|
784458
784476
|
}
|
|
784459
784477
|
|
|
784460
784478
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.210/index.js
|
|
@@ -784465,7 +784483,7 @@ var versionMigrations5 = {
|
|
|
784465
784483
|
var __default5 = versionMigrations5;
|
|
784466
784484
|
|
|
784467
784485
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.212/add-publishing-to-release-generators/migration.js
|
|
784468
|
-
var
|
|
784486
|
+
var import_promises46 = require("fs/promises");
|
|
784469
784487
|
var import_yaml4 = __toESM(require_dist4());
|
|
784470
784488
|
|
|
784471
784489
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.212/add-publishing-to-release-generators/getAllGeneratorYamlFiles.js
|
|
@@ -784506,7 +784524,7 @@ var migration6 = {
|
|
|
784506
784524
|
}
|
|
784507
784525
|
};
|
|
784508
784526
|
async function migrateGeneratorsYml2(filepath, context) {
|
|
784509
|
-
const contents = await (0,
|
|
784527
|
+
const contents = await (0, import_promises46.readFile)(filepath);
|
|
784510
784528
|
const parsedDocument = import_yaml4.default.parseDocument(contents.toString());
|
|
784511
784529
|
const releaseGenerators = parsedDocument.get("release");
|
|
784512
784530
|
if (releaseGenerators == null) {
|
|
@@ -784544,7 +784562,7 @@ async function migrateGeneratorsYml2(filepath, context) {
|
|
|
784544
784562
|
}
|
|
784545
784563
|
releaseGenerator.delete("outputs");
|
|
784546
784564
|
});
|
|
784547
|
-
await (0,
|
|
784565
|
+
await (0, import_promises46.writeFile)(filepath, parsedDocument.toString());
|
|
784548
784566
|
}
|
|
784549
784567
|
|
|
784550
784568
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.212/index.js
|
|
@@ -784555,7 +784573,7 @@ var versionMigrations6 = {
|
|
|
784555
784573
|
var __default6 = versionMigrations6;
|
|
784556
784574
|
|
|
784557
784575
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.220/rename-alias-key-to-type/migration.js
|
|
784558
|
-
var
|
|
784576
|
+
var import_promises47 = require("fs/promises");
|
|
784559
784577
|
|
|
784560
784578
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.220/rename-alias-key-to-type/getAllYamlFiles.js
|
|
784561
784579
|
var import_glob_promise7 = __toESM(require_lib6());
|
|
@@ -784586,9 +784604,9 @@ var migration7 = {
|
|
|
784586
784604
|
run: async ({ context }) => {
|
|
784587
784605
|
const yamlFiles = await getAllYamlFiles4(context);
|
|
784588
784606
|
for (const filepath of yamlFiles) {
|
|
784589
|
-
const contents = await (0,
|
|
784607
|
+
const contents = await (0, import_promises47.readFile)(filepath);
|
|
784590
784608
|
const newContents = contents.toString().replaceAll(" alias:", " type:");
|
|
784591
|
-
await (0,
|
|
784609
|
+
await (0, import_promises47.writeFile)(filepath, newContents);
|
|
784592
784610
|
}
|
|
784593
784611
|
}
|
|
784594
784612
|
};
|
|
@@ -784601,7 +784619,7 @@ var versionMigrations7 = {
|
|
|
784601
784619
|
var __default7 = versionMigrations7;
|
|
784602
784620
|
|
|
784603
784621
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.221/add-error-discriminant/migration.js
|
|
784604
|
-
var
|
|
784622
|
+
var import_promises48 = require("fs/promises");
|
|
784605
784623
|
|
|
784606
784624
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.221/add-error-discriminant/getAllRootApiYamlFiles.js
|
|
784607
784625
|
var import_glob_promise8 = __toESM(require_lib6());
|
|
@@ -784632,9 +784650,9 @@ var migration8 = {
|
|
|
784632
784650
|
run: async ({ context }) => {
|
|
784633
784651
|
const yamlFiles = await getAllRootApiYamlFiles(context);
|
|
784634
784652
|
for (const filepath of yamlFiles) {
|
|
784635
|
-
const contents = await (0,
|
|
784653
|
+
const contents = await (0, import_promises48.readFile)(filepath);
|
|
784636
784654
|
const newContents = contents.toString() + "\nerror-discriminant: error";
|
|
784637
|
-
await (0,
|
|
784655
|
+
await (0, import_promises48.writeFile)(filepath, newContents);
|
|
784638
784656
|
}
|
|
784639
784657
|
}
|
|
784640
784658
|
};
|
|
@@ -784647,7 +784665,7 @@ var versionMigrations8 = {
|
|
|
784647
784665
|
var __default8 = versionMigrations8;
|
|
784648
784666
|
|
|
784649
784667
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.241/add-generator-groups/migration.js
|
|
784650
|
-
var
|
|
784668
|
+
var import_promises49 = require("fs/promises");
|
|
784651
784669
|
|
|
784652
784670
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.241/add-generator-groups/getAllGeneratorYamlFiles.js
|
|
784653
784671
|
var import_glob_promise9 = __toESM(require_lib6());
|
|
@@ -784754,7 +784772,7 @@ var migration9 = {
|
|
|
784754
784772
|
}
|
|
784755
784773
|
};
|
|
784756
784774
|
async function migrateGeneratorsYml3(filepath) {
|
|
784757
|
-
const contentsStr = await (0,
|
|
784775
|
+
const contentsStr = await (0, import_promises49.readFile)(filepath);
|
|
784758
784776
|
const contents = js_yaml_default.load(contentsStr.toString());
|
|
784759
784777
|
const oldGeneratorsConfiguration = GeneratorsConfigurationSchema3.parse(contents);
|
|
784760
784778
|
let newGeneratorsConfiguration = {};
|
|
@@ -784772,7 +784790,7 @@ async function migrateGeneratorsYml3(filepath) {
|
|
|
784772
784790
|
generators: oldGeneratorsConfiguration.release.map((releaseGeneratorInvocation) => convertReleaseGeneratorInvocation(releaseGeneratorInvocation))
|
|
784773
784791
|
};
|
|
784774
784792
|
}
|
|
784775
|
-
await (0,
|
|
784793
|
+
await (0, import_promises49.writeFile)(filepath, js_yaml_default.dump(newGeneratorsConfiguration));
|
|
784776
784794
|
}
|
|
784777
784795
|
function convertDraftGeneratorInvocation(draftGeneratorInvocation) {
|
|
784778
784796
|
const newSchema = {
|
|
@@ -784847,7 +784865,7 @@ var versionMigrations9 = {
|
|
|
784847
784865
|
var __default9 = versionMigrations9;
|
|
784848
784866
|
|
|
784849
784867
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.248/add-error-discrimination-config/migration.js
|
|
784850
|
-
var
|
|
784868
|
+
var import_promises50 = require("fs/promises");
|
|
784851
784869
|
var import_yaml5 = __toESM(require_dist4());
|
|
784852
784870
|
|
|
784853
784871
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.248/add-error-discrimination-config/getAllRootApiYamlFiles.js
|
|
@@ -784888,7 +784906,7 @@ var migration10 = {
|
|
|
784888
784906
|
}
|
|
784889
784907
|
};
|
|
784890
784908
|
async function migrateRootApiFile(filepath) {
|
|
784891
|
-
const contents = await (0,
|
|
784909
|
+
const contents = await (0, import_promises50.readFile)(filepath);
|
|
784892
784910
|
const parsedDocument = import_yaml5.default.parseDocument(contents.toString());
|
|
784893
784911
|
const errorDiscriminant = parsedDocument.get("error-discriminant", true);
|
|
784894
784912
|
if (errorDiscriminant == null || !import_yaml5.default.isScalar(errorDiscriminant) || typeof errorDiscriminant.value !== "string") {
|
|
@@ -784899,7 +784917,7 @@ async function migrateRootApiFile(filepath) {
|
|
|
784899
784917
|
"property-name": errorDiscriminant.value
|
|
784900
784918
|
});
|
|
784901
784919
|
parsedDocument.delete("error-discriminant");
|
|
784902
|
-
await (0,
|
|
784920
|
+
await (0, import_promises50.writeFile)(filepath, parsedDocument.toString());
|
|
784903
784921
|
}
|
|
784904
784922
|
|
|
784905
784923
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.0.248/index.js
|
|
@@ -784910,7 +784928,7 @@ var versionMigrations10 = {
|
|
|
784910
784928
|
var __default10 = versionMigrations10;
|
|
784911
784929
|
|
|
784912
784930
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.1.3-rc3/add-inline-requests/migration.js
|
|
784913
|
-
var
|
|
784931
|
+
var import_promises51 = require("fs/promises");
|
|
784914
784932
|
var import_yaml6 = __toESM(require_dist4());
|
|
784915
784933
|
|
|
784916
784934
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.1.3-rc3/add-inline-requests/getAllYamlFiles.js
|
|
@@ -784951,7 +784969,7 @@ var migration11 = {
|
|
|
784951
784969
|
}
|
|
784952
784970
|
};
|
|
784953
784971
|
async function migrateYamlFile(filepath, context) {
|
|
784954
|
-
const contents = await (0,
|
|
784972
|
+
const contents = await (0, import_promises51.readFile)(filepath);
|
|
784955
784973
|
const parsedDocument = import_yaml6.default.parseDocument(contents.toString());
|
|
784956
784974
|
const services = parsedDocument.get("services");
|
|
784957
784975
|
if (services == null) {
|
|
@@ -784991,7 +785009,7 @@ async function migrateYamlFile(filepath, context) {
|
|
|
784991
785009
|
context.failWithoutThrowing("Failed to convert endpoint", e);
|
|
784992
785010
|
}
|
|
784993
785011
|
}
|
|
784994
|
-
await (0,
|
|
785012
|
+
await (0, import_promises51.writeFile)(filepath, parsedDocument.toString());
|
|
784995
785013
|
}
|
|
784996
785014
|
}
|
|
784997
785015
|
function convertEndpoint13({ document: document4, endpoint }) {
|
|
@@ -785075,10 +785093,10 @@ var import_legacy_docs_config = __toESM(require_legacy_docs_config());
|
|
|
785075
785093
|
var LegacyDocsSerializers = __toESM(require_serialization13());
|
|
785076
785094
|
|
|
785077
785095
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/docs-config/loadRawDocsConfiguration.js
|
|
785078
|
-
var
|
|
785096
|
+
var import_promises52 = require("fs/promises");
|
|
785079
785097
|
async function loadRawDocsConfiguration2({ absolutePathToWorkspace }) {
|
|
785080
785098
|
const filepath = getAbsolutePathToDocsYaml({ absolutePathToWorkspace });
|
|
785081
|
-
const contentsStr = await (0,
|
|
785099
|
+
const contentsStr = await (0, import_promises52.readFile)(filepath);
|
|
785082
785100
|
const contentsParsed = js_yaml_default.load(contentsStr.toString());
|
|
785083
785101
|
const result2 = await LegacyDocsSerializers.DocsConfiguration.parse(contentsParsed);
|
|
785084
785102
|
if (result2.ok) {
|
|
@@ -785096,7 +785114,7 @@ function getAbsolutePathToDocsFolder({ absolutePathToWorkspace }) {
|
|
|
785096
785114
|
}
|
|
785097
785115
|
|
|
785098
785116
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateDocsAndMultipleAPIs.js
|
|
785099
|
-
var
|
|
785117
|
+
var import_promises54 = require("fs/promises");
|
|
785100
785118
|
|
|
785101
785119
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/docs-config/convertLegacyDocsConfig.js
|
|
785102
785120
|
function convertLegacyDocsConfig({ docsConfiguration, docsURLs, apiName }) {
|
|
@@ -785275,10 +785293,10 @@ __export(legacy_exports, {
|
|
|
785275
785293
|
});
|
|
785276
785294
|
|
|
785277
785295
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/generators-configuration/loadRawGeneratorsConfiguration.js
|
|
785278
|
-
var
|
|
785296
|
+
var import_promises53 = require("fs/promises");
|
|
785279
785297
|
async function loadRawGeneratorsConfiguration3({ absolutePathToWorkspace }) {
|
|
785280
785298
|
const filepath = getAbsolutePathToGeneratorsConfiguration({ absolutePathToWorkspace });
|
|
785281
|
-
const contentsStr = await (0,
|
|
785299
|
+
const contentsStr = await (0, import_promises53.readFile)(filepath);
|
|
785282
785300
|
const contentsParsed = js_yaml_default.load(contentsStr.toString());
|
|
785283
785301
|
const result2 = await legacy_exports.GeneratorsConfigurationSchema.safeParseAsync(contentsParsed);
|
|
785284
785302
|
if (result2.success) {
|
|
@@ -785385,7 +785403,7 @@ var GeneratorsConfigurationSchema5 = z.strictObject({
|
|
|
785385
785403
|
var APIS_DIRECTORY2 = "apis";
|
|
785386
785404
|
async function migrateDocsAndMultipleAPIs({ absolutePathToFernDirectory, workspaces, workspaceContainingDocs }) {
|
|
785387
785405
|
const absolutePathToApisDirectory = join(absolutePathToFernDirectory, RelativeFilePath.of(APIS_DIRECTORY2));
|
|
785388
|
-
await (0,
|
|
785406
|
+
await (0, import_promises54.mkdir)(absolutePathToApisDirectory);
|
|
785389
785407
|
for (const workspace of workspaces) {
|
|
785390
785408
|
const absolutePathToWorkspace = join(absolutePathToFernDirectory, RelativeFilePath.of(workspace));
|
|
785391
785409
|
const docsURLs = await migrateAndWriteGeneratorsYml({ absolutePathToWorkspace });
|
|
@@ -785393,11 +785411,11 @@ async function migrateDocsAndMultipleAPIs({ absolutePathToFernDirectory, workspa
|
|
|
785393
785411
|
await migrateAndWriteDocsYml({ absolutePathToWorkspace, docsURLs, apiName: workspaceContainingDocs });
|
|
785394
785412
|
const absolutePathToDocsFolder = getAbsolutePathToDocsFolder({ absolutePathToWorkspace });
|
|
785395
785413
|
await moveFolder({ src: absolutePathToDocsFolder, dest: absolutePathToFernDirectory });
|
|
785396
|
-
await (0,
|
|
785414
|
+
await (0, import_promises54.rm)(absolutePathToDocsFolder, { recursive: true });
|
|
785397
785415
|
}
|
|
785398
785416
|
const absolutePathToNestedWorkspace = join(absolutePathToApisDirectory, RelativeFilePath.of(workspace));
|
|
785399
785417
|
await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToNestedWorkspace });
|
|
785400
|
-
await (0,
|
|
785418
|
+
await (0, import_promises54.rm)(absolutePathToWorkspace, { recursive: true });
|
|
785401
785419
|
}
|
|
785402
785420
|
}
|
|
785403
785421
|
async function migrateAndWriteGeneratorsYml({ absolutePathToWorkspace }) {
|
|
@@ -785410,7 +785428,7 @@ async function migrateAndWriteGeneratorsYml({ absolutePathToWorkspace }) {
|
|
|
785410
785428
|
generatorsConfiguration,
|
|
785411
785429
|
pathModificationStrategy: PathModificationStrategy.Nest
|
|
785412
785430
|
});
|
|
785413
|
-
await (0,
|
|
785431
|
+
await (0, import_promises54.writeFile)(absolutePathToGeneratorsConfiguration, js_yaml_default.dump(convertedResponse.value));
|
|
785414
785432
|
return convertedResponse.docsURLs;
|
|
785415
785433
|
}
|
|
785416
785434
|
async function migrateAndWriteDocsYml({ absolutePathToWorkspace, docsURLs, apiName }) {
|
|
@@ -785424,19 +785442,19 @@ async function migrateAndWriteDocsYml({ absolutePathToWorkspace, docsURLs, apiNa
|
|
|
785424
785442
|
apiName
|
|
785425
785443
|
});
|
|
785426
785444
|
const absolutePathToDocsConfig = getAbsolutePathToDocsYaml({ absolutePathToWorkspace });
|
|
785427
|
-
await (0,
|
|
785445
|
+
await (0, import_promises54.writeFile)(absolutePathToDocsConfig, js_yaml_default.dump(convertedDocsConfig));
|
|
785428
785446
|
}
|
|
785429
785447
|
|
|
785430
785448
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateDocsAndSingleAPI.js
|
|
785431
|
-
var
|
|
785449
|
+
var import_promises55 = require("fs/promises");
|
|
785432
785450
|
async function migrateDocsAndSingleAPI({ absolutePathToFernDirectory, absolutePathToWorkspace }) {
|
|
785433
785451
|
const docsURLs = await migrateAndWriteGeneratorsYml2({ absolutePathToWorkspace });
|
|
785434
785452
|
await migrateAndWriteDocsYml2({ absolutePathToWorkspace, docsURLs });
|
|
785435
785453
|
const absolutePathToDocsFolder = getAbsolutePathToDocsFolder({ absolutePathToWorkspace });
|
|
785436
785454
|
await moveFolder({ src: absolutePathToDocsFolder, dest: absolutePathToFernDirectory });
|
|
785437
785455
|
await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToFernDirectory });
|
|
785438
|
-
await (0,
|
|
785439
|
-
await (0,
|
|
785456
|
+
await (0, import_promises55.rm)(absolutePathToDocsFolder, { recursive: true });
|
|
785457
|
+
await (0, import_promises55.rm)(absolutePathToWorkspace, { recursive: true });
|
|
785440
785458
|
}
|
|
785441
785459
|
async function migrateAndWriteDocsYml2({ absolutePathToWorkspace, docsURLs }) {
|
|
785442
785460
|
const docsConfiguration = await loadRawDocsConfiguration2({ absolutePathToWorkspace });
|
|
@@ -785449,7 +785467,7 @@ async function migrateAndWriteDocsYml2({ absolutePathToWorkspace, docsURLs }) {
|
|
|
785449
785467
|
apiName: void 0
|
|
785450
785468
|
});
|
|
785451
785469
|
const absolutePathToDocsConfig = getAbsolutePathToDocsYaml({ absolutePathToWorkspace });
|
|
785452
|
-
await (0,
|
|
785470
|
+
await (0, import_promises55.writeFile)(absolutePathToDocsConfig, js_yaml_default.dump(convertedDocsConfig));
|
|
785453
785471
|
}
|
|
785454
785472
|
async function migrateAndWriteGeneratorsYml2({ absolutePathToWorkspace }) {
|
|
785455
785473
|
const generatorsConfiguration = await loadRawGeneratorsConfiguration3({ absolutePathToWorkspace });
|
|
@@ -785461,22 +785479,22 @@ async function migrateAndWriteGeneratorsYml2({ absolutePathToWorkspace }) {
|
|
|
785461
785479
|
generatorsConfiguration,
|
|
785462
785480
|
pathModificationStrategy: "MoveUp"
|
|
785463
785481
|
});
|
|
785464
|
-
await (0,
|
|
785482
|
+
await (0, import_promises55.writeFile)(absolutePathToGeneratorsConfiguration, js_yaml_default.dump(convertedResponse.value));
|
|
785465
785483
|
return convertedResponse.docsURLs;
|
|
785466
785484
|
}
|
|
785467
785485
|
|
|
785468
785486
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateOnlyMultipleAPIs.js
|
|
785469
|
-
var
|
|
785487
|
+
var import_promises56 = require("fs/promises");
|
|
785470
785488
|
var APIS_DIRECTORY3 = "apis";
|
|
785471
785489
|
async function migrateOnlyMultipleAPIs({ absolutePathToFernDirectory, workspaces }) {
|
|
785472
785490
|
const absolutePathToApisDirectory = join(absolutePathToFernDirectory, RelativeFilePath.of(APIS_DIRECTORY3));
|
|
785473
|
-
await (0,
|
|
785491
|
+
await (0, import_promises56.mkdir)(absolutePathToApisDirectory);
|
|
785474
785492
|
for (const workspace of workspaces) {
|
|
785475
785493
|
const absolutePathToWorkspace = join(absolutePathToFernDirectory, RelativeFilePath.of(workspace));
|
|
785476
785494
|
await migrateAndWriteGeneratorsYml3({ absolutePathToWorkspace });
|
|
785477
785495
|
const absolutePathToNestedWorkspace = join(absolutePathToApisDirectory, RelativeFilePath.of(workspace));
|
|
785478
785496
|
await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToNestedWorkspace });
|
|
785479
|
-
await (0,
|
|
785497
|
+
await (0, import_promises56.rm)(absolutePathToWorkspace, { recursive: true });
|
|
785480
785498
|
}
|
|
785481
785499
|
}
|
|
785482
785500
|
async function migrateAndWriteGeneratorsYml3({ absolutePathToWorkspace }) {
|
|
@@ -785489,15 +785507,15 @@ async function migrateAndWriteGeneratorsYml3({ absolutePathToWorkspace }) {
|
|
|
785489
785507
|
generatorsConfiguration,
|
|
785490
785508
|
pathModificationStrategy: PathModificationStrategy.Nest
|
|
785491
785509
|
});
|
|
785492
|
-
await (0,
|
|
785510
|
+
await (0, import_promises56.writeFile)(absolutePathToGeneratorsConfiguration, js_yaml_default.dump(convertedResponse.value));
|
|
785493
785511
|
}
|
|
785494
785512
|
|
|
785495
785513
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migrateOnlySingleAPI.js
|
|
785496
|
-
var
|
|
785514
|
+
var import_promises57 = require("fs/promises");
|
|
785497
785515
|
async function migrateOnlySingleAPI({ absolutePathToFernDirectory, absolutePathToWorkspace }) {
|
|
785498
785516
|
await migrateAndWriteGeneratorsYml4({ absolutePathToWorkspace });
|
|
785499
785517
|
await moveFolder({ src: absolutePathToWorkspace, dest: absolutePathToFernDirectory });
|
|
785500
|
-
await (0,
|
|
785518
|
+
await (0, import_promises57.rmdir)(absolutePathToWorkspace, { recursive: true });
|
|
785501
785519
|
}
|
|
785502
785520
|
async function migrateAndWriteGeneratorsYml4({ absolutePathToWorkspace }) {
|
|
785503
785521
|
const generatorsConfiguration = await loadRawGeneratorsConfiguration3({ absolutePathToWorkspace });
|
|
@@ -785509,7 +785527,7 @@ async function migrateAndWriteGeneratorsYml4({ absolutePathToWorkspace }) {
|
|
|
785509
785527
|
generatorsConfiguration,
|
|
785510
785528
|
pathModificationStrategy: "MoveUp"
|
|
785511
785529
|
});
|
|
785512
|
-
await (0,
|
|
785530
|
+
await (0, import_promises57.writeFile)(absolutePathToGeneratorsConfiguration, js_yaml_default.dump(convertedResponse.value));
|
|
785513
785531
|
}
|
|
785514
785532
|
|
|
785515
785533
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.15.0-rc0/update-directory-structure/migration.js
|
|
@@ -785586,7 +785604,7 @@ var versionMigrations12 = {
|
|
|
785586
785604
|
var __default12 = versionMigrations12;
|
|
785587
785605
|
|
|
785588
785606
|
// 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
|
|
785607
|
+
var import_promises58 = require("fs/promises");
|
|
785590
785608
|
var import_yaml7 = __toESM(require_dist4());
|
|
785591
785609
|
|
|
785592
785610
|
// 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 +785645,7 @@ var migration13 = {
|
|
|
785627
785645
|
}
|
|
785628
785646
|
};
|
|
785629
785647
|
async function migrateYamlFile2(filepath, context) {
|
|
785630
|
-
const contents = await (0,
|
|
785648
|
+
const contents = await (0, import_promises58.readFile)(filepath);
|
|
785631
785649
|
const parsedDocument = import_yaml7.default.parseDocument(contents.toString());
|
|
785632
785650
|
const types4 = parsedDocument.get("types");
|
|
785633
785651
|
if (types4 == null) {
|
|
@@ -785653,7 +785671,7 @@ async function migrateYamlFile2(filepath, context) {
|
|
|
785653
785671
|
examples.set(i2, { value });
|
|
785654
785672
|
}
|
|
785655
785673
|
}
|
|
785656
|
-
await (0,
|
|
785674
|
+
await (0, import_promises58.writeFile)(filepath, parsedDocument.toString());
|
|
785657
785675
|
}
|
|
785658
785676
|
|
|
785659
785677
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.3.0-rc12/index.js
|
|
@@ -785664,7 +785682,7 @@ var versionMigrations13 = {
|
|
|
785664
785682
|
var __default13 = versionMigrations13;
|
|
785665
785683
|
|
|
785666
785684
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.3.23/change-services-key-to-service/migration.js
|
|
785667
|
-
var
|
|
785685
|
+
var import_promises59 = require("fs/promises");
|
|
785668
785686
|
var import_yaml8 = __toESM(require_dist4());
|
|
785669
785687
|
|
|
785670
785688
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.3.23/change-services-key-to-service/getAllYamlFiles.js
|
|
@@ -785705,7 +785723,7 @@ var migration14 = {
|
|
|
785705
785723
|
}
|
|
785706
785724
|
};
|
|
785707
785725
|
async function migrateYamlFile3(filepath, context) {
|
|
785708
|
-
const contents = await (0,
|
|
785726
|
+
const contents = await (0, import_promises59.readFile)(filepath);
|
|
785709
785727
|
const parsedDocument = import_yaml8.default.parseDocument(contents.toString());
|
|
785710
785728
|
if (!import_yaml8.default.isMap(parsedDocument.contents)) {
|
|
785711
785729
|
return context.failAndThrow("File is not a map");
|
|
@@ -785735,7 +785753,7 @@ async function migrateYamlFile3(filepath, context) {
|
|
|
785735
785753
|
pair.value = firstService.value;
|
|
785736
785754
|
}
|
|
785737
785755
|
}
|
|
785738
|
-
await (0,
|
|
785756
|
+
await (0, import_promises59.writeFile)(filepath, parsedDocument.toString());
|
|
785739
785757
|
}
|
|
785740
785758
|
|
|
785741
785759
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.3.23/index.js
|
|
@@ -785746,7 +785764,7 @@ var versionMigrations14 = {
|
|
|
785746
785764
|
var __default14 = versionMigrations14;
|
|
785747
785765
|
|
|
785748
785766
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.5.4/move-service-docs-to-top-level/migration.js
|
|
785749
|
-
var
|
|
785767
|
+
var import_promises60 = require("fs/promises");
|
|
785750
785768
|
var import_yaml9 = __toESM(require_dist4());
|
|
785751
785769
|
|
|
785752
785770
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.5.4/move-service-docs-to-top-level/getAllYamlFiles.js
|
|
@@ -785787,7 +785805,7 @@ var migration15 = {
|
|
|
785787
785805
|
}
|
|
785788
785806
|
};
|
|
785789
785807
|
async function migrateYamlFile4(filepath, context) {
|
|
785790
|
-
const contents = await (0,
|
|
785808
|
+
const contents = await (0, import_promises60.readFile)(filepath);
|
|
785791
785809
|
const parsedDocument = import_yaml9.default.parseDocument(contents.toString());
|
|
785792
785810
|
if (!import_yaml9.default.isMap(parsedDocument.contents)) {
|
|
785793
785811
|
return context.failAndThrow("File is not a map");
|
|
@@ -785806,7 +785824,7 @@ async function migrateYamlFile4(filepath, context) {
|
|
|
785806
785824
|
}
|
|
785807
785825
|
service.items.splice(indexOfServiceDocsPair, 1);
|
|
785808
785826
|
parsedDocument.contents.items.unshift(docsPair);
|
|
785809
|
-
await (0,
|
|
785827
|
+
await (0, import_promises60.writeFile)(filepath, parsedDocument.toString());
|
|
785810
785828
|
}
|
|
785811
785829
|
|
|
785812
785830
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.5.4/index.js
|
|
@@ -785817,7 +785835,7 @@ var versionMigrations15 = {
|
|
|
785817
785835
|
var __default15 = versionMigrations15;
|
|
785818
785836
|
|
|
785819
785837
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.9.10/add-suffix-to-docs-domain/migration.js
|
|
785820
|
-
var
|
|
785838
|
+
var import_promises61 = require("fs/promises");
|
|
785821
785839
|
|
|
785822
785840
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.9.10/add-suffix-to-docs-domain/getAllGeneratorYamlFiles.js
|
|
785823
785841
|
var import_glob_promise15 = __toESM(require_lib6());
|
|
@@ -785857,14 +785875,14 @@ var migration16 = {
|
|
|
785857
785875
|
}
|
|
785858
785876
|
};
|
|
785859
785877
|
async function migrateYamlFile5(filepath) {
|
|
785860
|
-
const contents = await (0,
|
|
785878
|
+
const contents = await (0, import_promises61.readFile)(filepath);
|
|
785861
785879
|
const domainSuffix = process.env.DOMAIN_SUFFIX ?? "docs.buildwithfern.com";
|
|
785862
785880
|
const regex3 = /(docs:\s*domain:\s*)"([^"]*)"/g;
|
|
785863
785881
|
const updatedSnapshot = contents.toString().replace(regex3, (_match, _prefix, domain2) => {
|
|
785864
785882
|
return `docs:
|
|
785865
785883
|
domain: "${domain2}.${domainSuffix}"`;
|
|
785866
785884
|
});
|
|
785867
|
-
await (0,
|
|
785885
|
+
await (0, import_promises61.writeFile)(filepath, updatedSnapshot.toString());
|
|
785868
785886
|
}
|
|
785869
785887
|
|
|
785870
785888
|
// pnp:/home/circleci/project/packages/cli/yaml/yaml-migrations/lib/migrations/0.9.10/index.js
|
|
@@ -785966,7 +785984,7 @@ ${source_default.dim(migration17.summary)}`
|
|
|
785966
785984
|
}
|
|
785967
785985
|
|
|
785968
785986
|
// pnp:/home/circleci/project/packages/cli/cli/src/commands/upgrade/upgrade.ts
|
|
785969
|
-
var
|
|
785987
|
+
var import_promises62 = require("fs/promises");
|
|
785970
785988
|
|
|
785971
785989
|
// pnp:/home/circleci/project/packages/cli/cli/src/cli-context/upgrade-utils/doesVersionOfCliExist.ts
|
|
785972
785990
|
async function doesVersionOfCliExist({
|
|
@@ -786073,7 +786091,7 @@ async function upgrade({
|
|
|
786073
786091
|
const newProjectConfig = immer_esm_default(projectConfig.rawConfig, (draft) => {
|
|
786074
786092
|
draft.version = fernCliUpgradeInfo.latestVersion;
|
|
786075
786093
|
});
|
|
786076
|
-
await (0,
|
|
786094
|
+
await (0, import_promises62.writeFile)(projectConfig._absolutePath, JSON.stringify(newProjectConfig, void 0, 2));
|
|
786077
786095
|
cliContext.logger.info(
|
|
786078
786096
|
`Upgrading from ${source_default.dim(cliContext.environment.packageVersion)} \u2192 ${source_default.green(
|
|
786079
786097
|
fernCliUpgradeInfo.latestVersion
|
|
@@ -786120,7 +786138,7 @@ async function validateWorkspaces({
|
|
|
786120
786138
|
}
|
|
786121
786139
|
|
|
786122
786140
|
// pnp:/home/circleci/project/packages/cli/cli/src/commands/write-definition/writeDefinitionForWorkspaces.ts
|
|
786123
|
-
var
|
|
786141
|
+
var import_promises63 = require("fs/promises");
|
|
786124
786142
|
async function writeDefinitionForWorkspaces({
|
|
786125
786143
|
project,
|
|
786126
786144
|
cliContext
|
|
@@ -786140,8 +786158,8 @@ async function writeDefinitionForWorkspaces({
|
|
|
786140
786158
|
}
|
|
786141
786159
|
async function writeDefinitionForWorkspace(workspace) {
|
|
786142
786160
|
const directoryOfDefinition = join(workspace.absoluteFilepath, RelativeFilePath.of(DEFINITION_DIRECTORY));
|
|
786143
|
-
await (0,
|
|
786144
|
-
await (0,
|
|
786161
|
+
await (0, import_promises63.mkdir)(directoryOfDefinition);
|
|
786162
|
+
await (0, import_promises63.writeFile)(
|
|
786145
786163
|
join(directoryOfDefinition, RelativeFilePath.of(ROOT_API_FILENAME)),
|
|
786146
786164
|
js_yaml_default.dump(workspace.definition.rootApiFile.contents)
|
|
786147
786165
|
);
|
|
@@ -786152,8 +786170,8 @@ async function writeDefinitionForWorkspace(workspace) {
|
|
|
786152
786170
|
fileContents: js_yaml_default.dump(definitionFile.contents)
|
|
786153
786171
|
});
|
|
786154
786172
|
const dirname5 = absoluteFilepath.split("/").slice(0, -1).join("/");
|
|
786155
|
-
await (0,
|
|
786156
|
-
await (0,
|
|
786173
|
+
await (0, import_promises63.mkdir)(dirname5, { recursive: true });
|
|
786174
|
+
await (0, import_promises63.writeFile)(absoluteFilepath, fileContents);
|
|
786157
786175
|
}
|
|
786158
786176
|
}
|
|
786159
786177
|
|