@settlemint/sdk-cli 2.3.3-pr94c5517e → 2.3.3-pra0a2ec58
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/dist/cli.js +243 -262
- package/dist/cli.js.map +1 -1
- package/package.json +4 -4
package/dist/cli.js
CHANGED
@@ -311,9 +311,9 @@ var YoctoSpinner = class {
|
|
311
311
|
}
|
312
312
|
#lineCount(text) {
|
313
313
|
const width = this.#stream.columns ?? 80;
|
314
|
-
const lines
|
314
|
+
const lines = stripVTControlCharacters(text).split("\n");
|
315
315
|
let lineCount = 0;
|
316
|
-
for (const line of lines
|
316
|
+
for (const line of lines) {
|
317
317
|
lineCount += Math.max(1, Math.ceil(line.length / width));
|
318
318
|
}
|
319
319
|
return lineCount;
|
@@ -1154,8 +1154,8 @@ var require_string_utils = __commonJS({ "../../node_modules/console-table-printe
|
|
1154
1154
|
const console_utils_1$1 = require_console_utils();
|
1155
1155
|
const splitTextIntoTextsOfMinLen = (inpStr, width, charLength) => {
|
1156
1156
|
const ret = [];
|
1157
|
-
const lines
|
1158
|
-
lines
|
1157
|
+
const lines = inpStr.split(/[\n\r]/);
|
1158
|
+
lines.forEach((line) => {
|
1159
1159
|
const spaceSeparatedStrings = line.split(" ");
|
1160
1160
|
let now = [];
|
1161
1161
|
let cnt = 0;
|
@@ -4568,10 +4568,10 @@ var require_main$1 = __commonJS({ "../../node_modules/dotenv/lib/main.js"(export
|
|
4568
4568
|
const LINE$2 = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
|
4569
4569
|
function parse$22(src$1) {
|
4570
4570
|
const obj = {};
|
4571
|
-
let lines
|
4572
|
-
lines
|
4571
|
+
let lines = src$1.toString();
|
4572
|
+
lines = lines.replace(/\r\n?/gm, "\n");
|
4573
4573
|
let match$4;
|
4574
|
-
while ((match$4 = LINE$2.exec(lines
|
4574
|
+
while ((match$4 = LINE$2.exec(lines)) != null) {
|
4575
4575
|
const key = match$4[1];
|
4576
4576
|
let value = match$4[2] || "";
|
4577
4577
|
value = value.trim();
|
@@ -5906,7 +5906,7 @@ var require__u64 = __commonJS({ "../../node_modules/@noble/hashes/_u64.js"(expor
|
|
5906
5906
|
exports.toBig = exports.shrSL = exports.shrSH = exports.rotrSL = exports.rotrSH = exports.rotrBL = exports.rotrBH = exports.rotr32L = exports.rotr32H = exports.rotlSL = exports.rotlSH = exports.rotlBL = exports.rotlBH = exports.add5L = exports.add5H = exports.add4L = exports.add4H = exports.add3L = exports.add3H = void 0;
|
5907
5907
|
exports.add = add;
|
5908
5908
|
exports.fromBig = fromBig;
|
5909
|
-
exports.split = split
|
5909
|
+
exports.split = split;
|
5910
5910
|
/**
|
5911
5911
|
* Internal helpers for u64. BigUint64Array is too slow as per 2025, so we implement it using Uint32Array.
|
5912
5912
|
* @todo re-check https://issues.chromium.org/issues/42212588
|
@@ -5924,7 +5924,7 @@ var require__u64 = __commonJS({ "../../node_modules/@noble/hashes/_u64.js"(expor
|
|
5924
5924
|
l: Number(n$4 & U32_MASK64) | 0
|
5925
5925
|
};
|
5926
5926
|
}
|
5927
|
-
function split
|
5927
|
+
function split(lst, le$2 = false) {
|
5928
5928
|
const len = lst.length;
|
5929
5929
|
let Ah = new Uint32Array(len);
|
5930
5930
|
let Al = new Uint32Array(len);
|
@@ -5981,7 +5981,7 @@ var require__u64 = __commonJS({ "../../node_modules/@noble/hashes/_u64.js"(expor
|
|
5981
5981
|
exports.add5H = add5H;
|
5982
5982
|
const u64$1 = {
|
5983
5983
|
fromBig,
|
5984
|
-
split
|
5984
|
+
split,
|
5985
5985
|
toBig,
|
5986
5986
|
shrSH,
|
5987
5987
|
shrSL,
|
@@ -11130,9 +11130,9 @@ var require_parse$2 = __commonJS({ "../../node_modules/@dotenvx/dotenvx/src/lib/
|
|
11130
11130
|
this.literals = {};
|
11131
11131
|
}
|
11132
11132
|
run() {
|
11133
|
-
const lines
|
11133
|
+
const lines = this.getLines();
|
11134
11134
|
let match$4;
|
11135
|
-
while ((match$4 = Parse$2.LINE.exec(lines
|
11135
|
+
while ((match$4 = Parse$2.LINE.exec(lines)) !== null) {
|
11136
11136
|
const key = match$4[1];
|
11137
11137
|
const value = match$4[2];
|
11138
11138
|
const quote$1 = this.quote(value);
|
@@ -11277,12 +11277,12 @@ var require_dotenvParse = __commonJS({ "../../node_modules/@dotenvx/dotenvx/src/
|
|
11277
11277
|
const LINE$1 = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
|
11278
11278
|
function dotenvParse$6(src$1, skipExpandForDoubleQuotes = false, skipConvertingWindowsNewlines = false, collectAllValues = false) {
|
11279
11279
|
const obj = {};
|
11280
|
-
let lines
|
11280
|
+
let lines = src$1.toString();
|
11281
11281
|
if (!skipConvertingWindowsNewlines) {
|
11282
|
-
lines
|
11282
|
+
lines = lines.replace(/\r\n?/gm, "\n");
|
11283
11283
|
}
|
11284
11284
|
let match$4;
|
11285
|
-
while ((match$4 = LINE$1.exec(lines
|
11285
|
+
while ((match$4 = LINE$1.exec(lines)) != null) {
|
11286
11286
|
const key = match$4[1];
|
11287
11287
|
let value = match$4[2] || "";
|
11288
11288
|
value = value.trim();
|
@@ -11871,10 +11871,10 @@ var require_quotes = __commonJS({ "../../node_modules/@dotenvx/dotenvx/src/lib/h
|
|
11871
11871
|
const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
|
11872
11872
|
function quotes$1(src$1) {
|
11873
11873
|
const obj = {};
|
11874
|
-
let lines
|
11875
|
-
lines
|
11874
|
+
let lines = src$1.toString();
|
11875
|
+
lines = lines.replace(/\r\n?/gm, "\n");
|
11876
11876
|
let match$4;
|
11877
|
-
while ((match$4 = LINE.exec(lines
|
11877
|
+
while ((match$4 = LINE.exec(lines)) != null) {
|
11878
11878
|
const key = match$4[1];
|
11879
11879
|
let value = match$4[2] || "";
|
11880
11880
|
value = value.trim();
|
@@ -14994,13 +14994,13 @@ function toDotPath$3(path$1$1) {
|
|
14994
14994
|
return segs.join("");
|
14995
14995
|
}
|
14996
14996
|
function prettifyError$4(error$34$1) {
|
14997
|
-
const lines
|
14997
|
+
const lines = [];
|
14998
14998
|
const issues = [...error$34$1.issues].sort((a$11, b$2) => a$11.path.length - b$2.path.length);
|
14999
14999
|
for (const issue$1$1 of issues) {
|
15000
|
-
lines
|
15001
|
-
if (issue$1$1.path?.length) lines
|
15000
|
+
lines.push(`✖ ${issue$1$1.message}`);
|
15001
|
+
if (issue$1$1.path?.length) lines.push(` → at ${toDotPath$3(issue$1$1.path)}`);
|
15002
15002
|
}
|
15003
|
-
return lines
|
15003
|
+
return lines.join("\n");
|
15004
15004
|
}
|
15005
15005
|
const _parse$3 = (_Err) => (schema$6, value, _ctx, _params) => {
|
15006
15006
|
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
@@ -15711,9 +15711,9 @@ var Doc$3 = class {
|
|
15711
15711
|
return;
|
15712
15712
|
}
|
15713
15713
|
const content = arg;
|
15714
|
-
const lines
|
15715
|
-
const minIndent = Math.min(...lines
|
15716
|
-
const dedented = lines
|
15714
|
+
const lines = content.split("\n").filter((x$7) => x$7);
|
15715
|
+
const minIndent = Math.min(...lines.map((x$7) => x$7.length - x$7.trimStart().length));
|
15716
|
+
const dedented = lines.map((x$7) => x$7.slice(minIndent)).map((x$7) => " ".repeat(this.indent * 2) + x$7);
|
15717
15717
|
for (const line of dedented) {
|
15718
15718
|
this.content.push(line);
|
15719
15719
|
}
|
@@ -15722,8 +15722,8 @@ var Doc$3 = class {
|
|
15722
15722
|
const F$5 = Function;
|
15723
15723
|
const args = this?.args;
|
15724
15724
|
const content = this?.content ?? [``];
|
15725
|
-
const lines
|
15726
|
-
return new F$5(...args, lines
|
15725
|
+
const lines = [...content.map((x$7) => ` ${x$7}`)];
|
15726
|
+
return new F$5(...args, lines.join("\n"));
|
15727
15727
|
}
|
15728
15728
|
};
|
15729
15729
|
const version$4 = {
|
@@ -29455,9 +29455,9 @@ var PathScurryBase$3 = class {
|
|
29455
29455
|
this.#resolveCache = new ResolveCache$3();
|
29456
29456
|
this.#resolvePosixCache = new ResolveCache$3();
|
29457
29457
|
this.#children = new ChildrenCache$3(childrenCacheSize);
|
29458
|
-
const split$
|
29459
|
-
if (split$
|
29460
|
-
split$
|
29458
|
+
const split$1 = cwdPath.substring(this.rootPath.length).split(sep$1$1);
|
29459
|
+
if (split$1.length === 1 && !split$1[0]) {
|
29460
|
+
split$1.pop();
|
29461
29461
|
}
|
29462
29462
|
/* c8 ignore start */
|
29463
29463
|
if (nocase === undefined) {
|
@@ -29468,11 +29468,11 @@ var PathScurryBase$3 = class {
|
|
29468
29468
|
this.root = this.newRoot(this.#fs);
|
29469
29469
|
this.roots[this.rootPath] = this.root;
|
29470
29470
|
let prev = this.root;
|
29471
|
-
let len = split$
|
29471
|
+
let len = split$1.length - 1;
|
29472
29472
|
const joinSep = pathImpl.sep;
|
29473
29473
|
let abs = this.rootPath;
|
29474
29474
|
let sawFirst = false;
|
29475
|
-
for (const part of split$
|
29475
|
+
for (const part of split$1) {
|
29476
29476
|
const l$3 = len--;
|
29477
29477
|
prev = prev.child(part, {
|
29478
29478
|
relative: new Array(l$3).fill("..").join(joinSep),
|
@@ -31297,7 +31297,7 @@ function pruneCurrentEnv(currentEnv$1, env$1) {
|
|
31297
31297
|
//#region package.json
|
31298
31298
|
var name = "@settlemint/sdk-cli";
|
31299
31299
|
var description = "Command-line interface for SettleMint SDK, providing development tools and project management capabilities";
|
31300
|
-
var version$3 = "2.3.3-
|
31300
|
+
var version$3 = "2.3.3-pra0a2ec58";
|
31301
31301
|
var type = "module";
|
31302
31302
|
var private$1 = false;
|
31303
31303
|
var license = "FSL-1.1-MIT";
|
@@ -31336,12 +31336,12 @@ var dependencies = { "node-fetch-native": "1.6.6" };
|
|
31336
31336
|
var devDependencies = {
|
31337
31337
|
"@commander-js/extra-typings": "14.0.0",
|
31338
31338
|
"commander": "14.0.0",
|
31339
|
-
"@inquirer/confirm": "5.1.
|
31339
|
+
"@inquirer/confirm": "5.1.12",
|
31340
31340
|
"@inquirer/input": "4.1.11",
|
31341
31341
|
"@inquirer/password": "4.0.14",
|
31342
31342
|
"@inquirer/select": "4.2.3",
|
31343
|
-
"@settlemint/sdk-js": "2.3.3-
|
31344
|
-
"@settlemint/sdk-utils": "2.3.3-
|
31343
|
+
"@settlemint/sdk-js": "2.3.3-pra0a2ec58",
|
31344
|
+
"@settlemint/sdk-utils": "2.3.3-pra0a2ec58",
|
31345
31345
|
"@types/node": "22.15.21",
|
31346
31346
|
"@types/semver": "7.7.0",
|
31347
31347
|
"@types/which": "3.0.4",
|
@@ -32039,13 +32039,13 @@ function usePrefix({ status = "idle", theme }) {
|
|
32039
32039
|
if (status === "loading") {
|
32040
32040
|
let tickInterval;
|
32041
32041
|
let inc$2 = -1;
|
32042
|
-
const delayTimeout = setTimeout(
|
32042
|
+
const delayTimeout = setTimeout(() => {
|
32043
32043
|
setShowLoader(true);
|
32044
|
-
tickInterval = setInterval(
|
32044
|
+
tickInterval = setInterval(() => {
|
32045
32045
|
inc$2 = inc$2 + 1;
|
32046
32046
|
setTick(inc$2 % spinner$3.frames.length);
|
32047
|
-
}
|
32048
|
-
}
|
32047
|
+
}, spinner$3.interval);
|
32048
|
+
}, 300);
|
32049
32049
|
return () => {
|
32050
32050
|
clearTimeout(delayTimeout);
|
32051
32051
|
clearInterval(tickInterval);
|
@@ -34287,111 +34287,92 @@ function readlineWidth() {
|
|
34287
34287
|
}
|
34288
34288
|
|
34289
34289
|
//#endregion
|
34290
|
-
//#region ../../node_modules/@inquirer/core/dist/esm/lib/pagination/
|
34291
|
-
function
|
34292
|
-
|
34293
|
-
|
34294
|
-
|
34295
|
-
|
34296
|
-
|
34297
|
-
* @param {T[]} items The items to rotate
|
34298
|
-
*/
|
34299
|
-
function rotate(count, items) {
|
34300
|
-
const max$1 = items.length;
|
34301
|
-
const offset = (count % max$1 + max$1) % max$1;
|
34302
|
-
return [...items.slice(offset), ...items.slice(0, offset)];
|
34303
|
-
}
|
34304
|
-
/**
|
34305
|
-
* Renders a page of items as lines that fit within the given width ensuring
|
34306
|
-
* that the number of lines is not greater than the page size, and the active
|
34307
|
-
* item renders at the provided position, while prioritizing that as many lines
|
34308
|
-
* of the active item get rendered as possible.
|
34309
|
-
*/
|
34310
|
-
function lines({ items, width, renderItem, active, position: requested, pageSize }) {
|
34311
|
-
const layouts = items.map((item, index$1) => ({
|
34312
|
-
item,
|
34313
|
-
index: index$1,
|
34314
|
-
isActive: index$1 === active
|
34315
|
-
}));
|
34316
|
-
const layoutsInPage = rotate(active - requested, layouts).slice(0, pageSize);
|
34317
|
-
const renderItemAt = (index$1) => layoutsInPage[index$1] == null ? [] : split(renderItem(layoutsInPage[index$1]), width);
|
34318
|
-
const pageBuffer = Array.from({ length: pageSize });
|
34319
|
-
const activeItem = renderItemAt(requested).slice(0, pageSize);
|
34320
|
-
const position = requested + activeItem.length <= pageSize ? requested : pageSize - activeItem.length;
|
34321
|
-
pageBuffer.splice(position, activeItem.length, ...activeItem);
|
34322
|
-
let bufferPointer = position + activeItem.length;
|
34323
|
-
let layoutPointer = requested + 1;
|
34324
|
-
while (bufferPointer < pageSize && layoutPointer < layoutsInPage.length) {
|
34325
|
-
for (const line of renderItemAt(layoutPointer)) {
|
34326
|
-
pageBuffer[bufferPointer++] = line;
|
34327
|
-
if (bufferPointer >= pageSize) break;
|
34328
|
-
}
|
34329
|
-
layoutPointer++;
|
34330
|
-
}
|
34331
|
-
bufferPointer = position - 1;
|
34332
|
-
layoutPointer = requested - 1;
|
34333
|
-
while (bufferPointer >= 0 && layoutPointer >= 0) {
|
34334
|
-
for (const line of renderItemAt(layoutPointer).reverse()) {
|
34335
|
-
pageBuffer[bufferPointer--] = line;
|
34336
|
-
if (bufferPointer < 0) break;
|
34337
|
-
}
|
34338
|
-
layoutPointer--;
|
34339
|
-
}
|
34340
|
-
return pageBuffer.filter((line) => typeof line === "string");
|
34341
|
-
}
|
34342
|
-
|
34343
|
-
//#endregion
|
34344
|
-
//#region ../../node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
34345
|
-
/**
|
34346
|
-
* Creates the next position for the active item considering a finite list of
|
34347
|
-
* items to be rendered on a page.
|
34348
|
-
*/
|
34349
|
-
function finite({ active, pageSize, total }) {
|
34290
|
+
//#region ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
34291
|
+
function usePointerPosition({ active, renderedItems, pageSize, loop: loop$1 }) {
|
34292
|
+
const state = useRef({
|
34293
|
+
lastPointer: active,
|
34294
|
+
lastActive: undefined
|
34295
|
+
});
|
34296
|
+
const { lastPointer, lastActive } = state.current;
|
34350
34297
|
const middle = Math.floor(pageSize / 2);
|
34351
|
-
|
34352
|
-
|
34353
|
-
|
34354
|
-
|
34355
|
-
|
34356
|
-
|
34357
|
-
*
|
34358
|
-
|
34359
|
-
|
34360
|
-
|
34361
|
-
|
34362
|
-
|
34298
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
34299
|
+
const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
|
34300
|
+
let pointer = defaultPointerPosition;
|
34301
|
+
if (renderedLength > pageSize) {
|
34302
|
+
if (loop$1) {
|
34303
|
+
/**
|
34304
|
+
* Creates the next position for the pointer considering an infinitely
|
34305
|
+
* looping list of items to be rendered on the page.
|
34306
|
+
*
|
34307
|
+
* The goal is to progressively move the cursor to the middle position as the user move down, and then keep
|
34308
|
+
* the cursor there. When the user move up, maintain the cursor position.
|
34309
|
+
*/
|
34310
|
+
pointer = lastPointer;
|
34311
|
+
if (lastActive != null && lastActive < active && active - lastActive < pageSize) {
|
34312
|
+
pointer = Math.min(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
|
34313
|
+
}
|
34314
|
+
} else {
|
34315
|
+
/**
|
34316
|
+
* Creates the next position for the pointer considering a finite list of
|
34317
|
+
* items to be rendered on a page.
|
34318
|
+
*
|
34319
|
+
* The goal is to keep the pointer in the middle of the page whenever possible, until
|
34320
|
+
* we reach the bounds of the list (top or bottom). In which case, the cursor moves progressively
|
34321
|
+
* to the bottom or top of the list.
|
34322
|
+
*/
|
34323
|
+
const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
|
34324
|
+
pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : Math.min(defaultPointerPosition, middle);
|
34325
|
+
}
|
34363
34326
|
}
|
34327
|
+
state.current.lastPointer = pointer;
|
34328
|
+
state.current.lastActive = active;
|
34364
34329
|
return pointer;
|
34365
34330
|
}
|
34366
|
-
|
34367
|
-
//#endregion
|
34368
|
-
//#region ../../node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
34369
34331
|
function usePagination({ items, active, renderItem, pageSize, loop: loop$1 = true }) {
|
34370
|
-
const
|
34371
|
-
|
34372
|
-
|
34373
|
-
|
34374
|
-
|
34332
|
+
const width = readlineWidth();
|
34333
|
+
const bound = (num$1) => (num$1 % items.length + items.length) % items.length;
|
34334
|
+
const renderedItems = items.map((item, index$1) => {
|
34335
|
+
if (item == null) return [];
|
34336
|
+
return breakLines(renderItem({
|
34337
|
+
item,
|
34338
|
+
index: index$1,
|
34339
|
+
isActive: index$1 === active
|
34340
|
+
}), width).split("\n");
|
34341
|
+
});
|
34342
|
+
const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
|
34343
|
+
const renderItemAtIndex = (index$1) => renderedItems[index$1] ?? [];
|
34344
|
+
const pointer = usePointerPosition({
|
34375
34345
|
active,
|
34376
|
-
|
34377
|
-
total: items.length,
|
34346
|
+
renderedItems,
|
34378
34347
|
pageSize,
|
34379
|
-
|
34380
|
-
}) : finite({
|
34381
|
-
active,
|
34382
|
-
total: items.length,
|
34383
|
-
pageSize
|
34348
|
+
loop: loop$1
|
34384
34349
|
});
|
34385
|
-
|
34386
|
-
|
34387
|
-
|
34388
|
-
|
34389
|
-
|
34390
|
-
|
34391
|
-
|
34392
|
-
|
34393
|
-
|
34394
|
-
|
34350
|
+
const activeItem = renderItemAtIndex(active).slice(0, pageSize);
|
34351
|
+
const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
|
34352
|
+
const pageBuffer = Array.from({ length: pageSize });
|
34353
|
+
pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
|
34354
|
+
const itemVisited = new Set([active]);
|
34355
|
+
let bufferPointer = activeItemPosition + activeItem.length;
|
34356
|
+
let itemPointer = bound(active + 1);
|
34357
|
+
while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop$1 && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
|
34358
|
+
const lines = renderItemAtIndex(itemPointer);
|
34359
|
+
const linesToAdd = lines.slice(0, pageSize - bufferPointer);
|
34360
|
+
pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
|
34361
|
+
itemVisited.add(itemPointer);
|
34362
|
+
bufferPointer += linesToAdd.length;
|
34363
|
+
itemPointer = bound(itemPointer + 1);
|
34364
|
+
}
|
34365
|
+
bufferPointer = activeItemPosition - 1;
|
34366
|
+
itemPointer = bound(active - 1);
|
34367
|
+
while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop$1 && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
|
34368
|
+
const lines = renderItemAtIndex(itemPointer);
|
34369
|
+
const linesToAdd = lines.slice(Math.max(0, lines.length - bufferPointer - 1));
|
34370
|
+
pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
|
34371
|
+
itemVisited.add(itemPointer);
|
34372
|
+
bufferPointer -= linesToAdd.length;
|
34373
|
+
itemPointer = bound(itemPointer - 1);
|
34374
|
+
}
|
34375
|
+
return pageBuffer.filter((line) => typeof line === "string").join("\n");
|
34395
34376
|
}
|
34396
34377
|
|
34397
34378
|
//#endregion
|
@@ -43886,9 +43867,9 @@ var require_commonjs$2 = __commonJS({ "../../node_modules/path-scurry/dist/commo
|
|
43886
43867
|
this.#resolveCache = new ResolveCache$2();
|
43887
43868
|
this.#resolvePosixCache = new ResolveCache$2();
|
43888
43869
|
this.#children = new ChildrenCache$2(childrenCacheSize);
|
43889
|
-
const split$
|
43890
|
-
if (split$
|
43891
|
-
split$
|
43870
|
+
const split$1 = cwdPath.substring(this.rootPath.length).split(sep$5);
|
43871
|
+
if (split$1.length === 1 && !split$1[0]) {
|
43872
|
+
split$1.pop();
|
43892
43873
|
}
|
43893
43874
|
/* c8 ignore start */
|
43894
43875
|
if (nocase === undefined) {
|
@@ -43899,11 +43880,11 @@ var require_commonjs$2 = __commonJS({ "../../node_modules/path-scurry/dist/commo
|
|
43899
43880
|
this.root = this.newRoot(this.#fs);
|
43900
43881
|
this.roots[this.rootPath] = this.root;
|
43901
43882
|
let prev = this.root;
|
43902
|
-
let len = split$
|
43883
|
+
let len = split$1.length - 1;
|
43903
43884
|
const joinSep = pathImpl.sep;
|
43904
43885
|
let abs = this.rootPath;
|
43905
43886
|
let sawFirst = false;
|
43906
|
-
for (const part of split$
|
43887
|
+
for (const part of split$1) {
|
43907
43888
|
const l$3 = len--;
|
43908
43889
|
prev = prev.child(part, {
|
43909
43890
|
relative: new Array(l$3).fill("..").join(joinSep),
|
@@ -46644,9 +46625,9 @@ var require_ini = __commonJS({ "../../node_modules/ini/lib/ini.js"(exports, modu
|
|
46644
46625
|
let p$3 = out;
|
46645
46626
|
let section = null;
|
46646
46627
|
const re$7 = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i;
|
46647
|
-
const lines
|
46628
|
+
const lines = str.split(/[\r\n]+/g);
|
46648
46629
|
const duplicates = {};
|
46649
|
-
for (const line of lines
|
46630
|
+
for (const line of lines) {
|
46650
46631
|
if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) {
|
46651
46632
|
continue;
|
46652
46633
|
}
|
@@ -49583,7 +49564,7 @@ var require_semver = __commonJS({ "../../node_modules/semver/index.js"(exports,
|
|
49583
49564
|
//#region ../../node_modules/@npmcli/git/lib/lines-to-revs.js
|
49584
49565
|
var require_lines_to_revs = __commonJS({ "../../node_modules/@npmcli/git/lib/lines-to-revs.js"(exports, module) {
|
49585
49566
|
const semver$4 = require_semver();
|
49586
|
-
module.exports = (lines
|
49567
|
+
module.exports = (lines) => finish(lines.reduce(linesToRevsReducer, {
|
49587
49568
|
versions: {},
|
49588
49569
|
"dist-tags": {},
|
49589
49570
|
refs: {},
|
@@ -49645,12 +49626,12 @@ var require_lines_to_revs = __commonJS({ "../../node_modules/@npmcli/git/lib/lin
|
|
49645
49626
|
return "other";
|
49646
49627
|
};
|
49647
49628
|
const lineToRevDoc = (line) => {
|
49648
|
-
const split$
|
49649
|
-
if (split$
|
49629
|
+
const split$1 = line.trim().split(/\s+/, 2);
|
49630
|
+
if (split$1.length < 2) {
|
49650
49631
|
return null;
|
49651
49632
|
}
|
49652
|
-
const sha = split$
|
49653
|
-
const rawRef = split$
|
49633
|
+
const sha = split$1[0].trim();
|
49634
|
+
const rawRef = split$1[1].trim();
|
49654
49635
|
const type$1 = refType(rawRef);
|
49655
49636
|
if (type$1 === "tag") {
|
49656
49637
|
const ref = rawRef.slice("refs/tags/".length);
|
@@ -52312,16 +52293,16 @@ var require_normalize_data = __commonJS({ "../../node_modules/@npmcli/package-js
|
|
52312
52293
|
};
|
52313
52294
|
const isEmail = (str) => str.includes("@") && str.indexOf("@") < str.lastIndexOf(".");
|
52314
52295
|
function extractDescription(description$2) {
|
52315
|
-
const lines
|
52296
|
+
const lines = description$2.trim().split("\n");
|
52316
52297
|
let start = 0;
|
52317
|
-
while (lines
|
52298
|
+
while (lines[start]?.trim().match(/^(#|$)/)) {
|
52318
52299
|
start++;
|
52319
52300
|
}
|
52320
52301
|
let end = start + 1;
|
52321
|
-
while (end < lines
|
52302
|
+
while (end < lines.length && lines[end].trim()) {
|
52322
52303
|
end++;
|
52323
52304
|
}
|
52324
|
-
return lines
|
52305
|
+
return lines.slice(start, end).join(" ").trim();
|
52325
52306
|
}
|
52326
52307
|
function stringifyPerson(person) {
|
52327
52308
|
if (typeof person !== "string") {
|
@@ -58252,9 +58233,9 @@ var PathScurryBase$1 = class {
|
|
58252
58233
|
this.#resolveCache = new ResolveCache$1();
|
58253
58234
|
this.#resolvePosixCache = new ResolveCache$1();
|
58254
58235
|
this.#children = new ChildrenCache$1(childrenCacheSize);
|
58255
|
-
const split$
|
58256
|
-
if (split$
|
58257
|
-
split$
|
58236
|
+
const split$1 = cwdPath.substring(this.rootPath.length).split(sep$1$1);
|
58237
|
+
if (split$1.length === 1 && !split$1[0]) {
|
58238
|
+
split$1.pop();
|
58258
58239
|
}
|
58259
58240
|
/* c8 ignore start */
|
58260
58241
|
if (nocase === undefined) {
|
@@ -58265,11 +58246,11 @@ var PathScurryBase$1 = class {
|
|
58265
58246
|
this.root = this.newRoot(this.#fs);
|
58266
58247
|
this.roots[this.rootPath] = this.root;
|
58267
58248
|
let prev = this.root;
|
58268
|
-
let len = split$
|
58249
|
+
let len = split$1.length - 1;
|
58269
58250
|
const joinSep = pathImpl.sep;
|
58270
58251
|
let abs = this.rootPath;
|
58271
58252
|
let sawFirst = false;
|
58272
|
-
for (const part of split$
|
58253
|
+
for (const part of split$1) {
|
58273
58254
|
const l$3 = len--;
|
58274
58255
|
prev = prev.child(part, {
|
58275
58256
|
relative: new Array(l$3).fill("..").join(joinSep),
|
@@ -61261,13 +61242,13 @@ function toDotPath$2(path$22) {
|
|
61261
61242
|
return segs.join("");
|
61262
61243
|
}
|
61263
61244
|
function prettifyError$3(error$34$1) {
|
61264
|
-
const lines
|
61245
|
+
const lines = [];
|
61265
61246
|
const issues = [...error$34$1.issues].sort((a$11, b$2) => a$11.path.length - b$2.path.length);
|
61266
61247
|
for (const issue$1$1 of issues) {
|
61267
|
-
lines
|
61268
|
-
if (issue$1$1.path?.length) lines
|
61248
|
+
lines.push(`✖ ${issue$1$1.message}`);
|
61249
|
+
if (issue$1$1.path?.length) lines.push(` → at ${toDotPath$2(issue$1$1.path)}`);
|
61269
61250
|
}
|
61270
|
-
return lines
|
61251
|
+
return lines.join("\n");
|
61271
61252
|
}
|
61272
61253
|
const _parse$2 = (_Err) => (schema$6, value, _ctx, _params) => {
|
61273
61254
|
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
@@ -61978,9 +61959,9 @@ var Doc$2 = class {
|
|
61978
61959
|
return;
|
61979
61960
|
}
|
61980
61961
|
const content = arg;
|
61981
|
-
const lines
|
61982
|
-
const minIndent = Math.min(...lines
|
61983
|
-
const dedented = lines
|
61962
|
+
const lines = content.split("\n").filter((x$7) => x$7);
|
61963
|
+
const minIndent = Math.min(...lines.map((x$7) => x$7.length - x$7.trimStart().length));
|
61964
|
+
const dedented = lines.map((x$7) => x$7.slice(minIndent)).map((x$7) => " ".repeat(this.indent * 2) + x$7);
|
61984
61965
|
for (const line of dedented) {
|
61985
61966
|
this.content.push(line);
|
61986
61967
|
}
|
@@ -61989,8 +61970,8 @@ var Doc$2 = class {
|
|
61989
61970
|
const F$5 = Function;
|
61990
61971
|
const args = this?.args;
|
61991
61972
|
const content = this?.content ?? [``];
|
61992
|
-
const lines
|
61993
|
-
return new F$5(...args, lines
|
61973
|
+
const lines = [...content.map((x$7) => ` ${x$7}`)];
|
61974
|
+
return new F$5(...args, lines.join("\n"));
|
61994
61975
|
}
|
61995
61976
|
};
|
61996
61977
|
const version$2 = {
|
@@ -75776,9 +75757,9 @@ var PathScurryBase = class {
|
|
75776
75757
|
this.#resolveCache = new ResolveCache();
|
75777
75758
|
this.#resolvePosixCache = new ResolveCache();
|
75778
75759
|
this.#children = new ChildrenCache(childrenCacheSize);
|
75779
|
-
const split$
|
75780
|
-
if (split$
|
75781
|
-
split$
|
75760
|
+
const split$1 = cwdPath.substring(this.rootPath.length).split(sep$1$1);
|
75761
|
+
if (split$1.length === 1 && !split$1[0]) {
|
75762
|
+
split$1.pop();
|
75782
75763
|
}
|
75783
75764
|
/* c8 ignore start */
|
75784
75765
|
if (nocase === undefined) {
|
@@ -75789,11 +75770,11 @@ var PathScurryBase = class {
|
|
75789
75770
|
this.root = this.newRoot(this.#fs);
|
75790
75771
|
this.roots[this.rootPath] = this.root;
|
75791
75772
|
let prev = this.root;
|
75792
|
-
let len = split$
|
75773
|
+
let len = split$1.length - 1;
|
75793
75774
|
const joinSep = pathImpl.sep;
|
75794
75775
|
let abs = this.rootPath;
|
75795
75776
|
let sawFirst = false;
|
75796
|
-
for (const part of split$
|
75777
|
+
for (const part of split$1) {
|
75797
75778
|
const l$3 = len--;
|
75798
75779
|
prev = prev.child(part, {
|
75799
75780
|
relative: new Array(l$3).fill("..").join(joinSep),
|
@@ -108776,13 +108757,13 @@ function toDotPath$1(path$22) {
|
|
108776
108757
|
return segs.join("");
|
108777
108758
|
}
|
108778
108759
|
function prettifyError$2(error$34$1) {
|
108779
|
-
const lines
|
108760
|
+
const lines = [];
|
108780
108761
|
const issues = [...error$34$1.issues].sort((a$11, b$2) => a$11.path.length - b$2.path.length);
|
108781
108762
|
for (const issue$1$1 of issues) {
|
108782
|
-
lines
|
108783
|
-
if (issue$1$1.path?.length) lines
|
108763
|
+
lines.push(`✖ ${issue$1$1.message}`);
|
108764
|
+
if (issue$1$1.path?.length) lines.push(` → at ${toDotPath$1(issue$1$1.path)}`);
|
108784
108765
|
}
|
108785
|
-
return lines
|
108766
|
+
return lines.join("\n");
|
108786
108767
|
}
|
108787
108768
|
const _parse$1 = (_Err) => (schema$6, value, _ctx, _params) => {
|
108788
108769
|
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
@@ -109493,9 +109474,9 @@ var Doc$1 = class {
|
|
109493
109474
|
return;
|
109494
109475
|
}
|
109495
109476
|
const content = arg;
|
109496
|
-
const lines
|
109497
|
-
const minIndent = Math.min(...lines
|
109498
|
-
const dedented = lines
|
109477
|
+
const lines = content.split("\n").filter((x$7) => x$7);
|
109478
|
+
const minIndent = Math.min(...lines.map((x$7) => x$7.length - x$7.trimStart().length));
|
109479
|
+
const dedented = lines.map((x$7) => x$7.slice(minIndent)).map((x$7) => " ".repeat(this.indent * 2) + x$7);
|
109499
109480
|
for (const line of dedented) {
|
109500
109481
|
this.content.push(line);
|
109501
109482
|
}
|
@@ -109504,8 +109485,8 @@ var Doc$1 = class {
|
|
109504
109485
|
const F$5 = Function;
|
109505
109486
|
const args = this?.args;
|
109506
109487
|
const content = this?.content ?? [``];
|
109507
|
-
const lines
|
109508
|
-
return new F$5(...args, lines
|
109488
|
+
const lines = [...content.map((x$7) => ` ${x$7}`)];
|
109489
|
+
return new F$5(...args, lines.join("\n"));
|
109509
109490
|
}
|
109510
109491
|
};
|
109511
109492
|
const version$1 = {
|
@@ -119221,13 +119202,13 @@ function toDotPath(path$22) {
|
|
119221
119202
|
return segs.join("");
|
119222
119203
|
}
|
119223
119204
|
function prettifyError$1(error$38) {
|
119224
|
-
const lines
|
119205
|
+
const lines = [];
|
119225
119206
|
const issues = [...error$38.issues].sort((a$11, b$2) => a$11.path.length - b$2.path.length);
|
119226
119207
|
for (const issue$4 of issues) {
|
119227
|
-
lines
|
119228
|
-
if (issue$4.path?.length) lines
|
119208
|
+
lines.push(`✖ ${issue$4.message}`);
|
119209
|
+
if (issue$4.path?.length) lines.push(` → at ${toDotPath(issue$4.path)}`);
|
119229
119210
|
}
|
119230
|
-
return lines
|
119211
|
+
return lines.join("\n");
|
119231
119212
|
}
|
119232
119213
|
|
119233
119214
|
//#endregion
|
@@ -119950,9 +119931,9 @@ var Doc = class {
|
|
119950
119931
|
return;
|
119951
119932
|
}
|
119952
119933
|
const content = arg;
|
119953
|
-
const lines
|
119954
|
-
const minIndent = Math.min(...lines
|
119955
|
-
const dedented = lines
|
119934
|
+
const lines = content.split("\n").filter((x$7) => x$7);
|
119935
|
+
const minIndent = Math.min(...lines.map((x$7) => x$7.length - x$7.trimStart().length));
|
119936
|
+
const dedented = lines.map((x$7) => x$7.slice(minIndent)).map((x$7) => " ".repeat(this.indent * 2) + x$7);
|
119956
119937
|
for (const line of dedented) {
|
119957
119938
|
this.content.push(line);
|
119958
119939
|
}
|
@@ -119961,8 +119942,8 @@ var Doc = class {
|
|
119961
119942
|
const F$5 = Function;
|
119962
119943
|
const args = this?.args;
|
119963
119944
|
const content = this?.content ?? [``];
|
119964
|
-
const lines
|
119965
|
-
return new F$5(...args, lines
|
119945
|
+
const lines = [...content.map((x$7) => ` ${x$7}`)];
|
119946
|
+
return new F$5(...args, lines.join("\n"));
|
119966
119947
|
}
|
119967
119948
|
};
|
119968
119949
|
|
@@ -142481,7 +142462,7 @@ var require_directives = __commonJS({ "../../node_modules/yaml/dist/doc/directiv
|
|
142481
142462
|
return tag[0] === "!" ? tag : `!<${tag}>`;
|
142482
142463
|
}
|
142483
142464
|
toString(doc) {
|
142484
|
-
const lines
|
142465
|
+
const lines = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [];
|
142485
142466
|
const tagEntries = Object.entries(this.tags);
|
142486
142467
|
let tagNames;
|
142487
142468
|
if (doc && tagEntries.length > 0 && identity$31.isNode(doc.contents)) {
|
@@ -142493,9 +142474,9 @@ var require_directives = __commonJS({ "../../node_modules/yaml/dist/doc/directiv
|
|
142493
142474
|
} else tagNames = [];
|
142494
142475
|
for (const [handle, prefix] of tagEntries) {
|
142495
142476
|
if (handle === "!!" && prefix === "tag:yaml.org,2002:") continue;
|
142496
|
-
if (!doc || tagNames.some((tn$1) => tn$1.startsWith(prefix))) lines
|
142477
|
+
if (!doc || tagNames.some((tn$1) => tn$1.startsWith(prefix))) lines.push(`%TAG ${handle} ${prefix}`);
|
142497
142478
|
}
|
142498
|
-
return lines
|
142479
|
+
return lines.join("\n");
|
142499
142480
|
}
|
142500
142481
|
};
|
142501
142482
|
Directives.defaultYaml = {
|
@@ -143058,7 +143039,7 @@ var require_foldFlowLines = __commonJS({ "../../node_modules/yaml/dist/stringify
|
|
143058
143039
|
if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) folds.push(0);
|
143059
143040
|
else end = lineWidth - indentAtStart;
|
143060
143041
|
}
|
143061
|
-
let split$
|
143042
|
+
let split$1 = undefined;
|
143062
143043
|
let prev = undefined;
|
143063
143044
|
let overflow = false;
|
143064
143045
|
let i$7 = -1;
|
@@ -143088,17 +143069,17 @@ var require_foldFlowLines = __commonJS({ "../../node_modules/yaml/dist/stringify
|
|
143088
143069
|
if (ch === "\n") {
|
143089
143070
|
if (mode$2 === FOLD_BLOCK) i$7 = consumeMoreIndentedLines(text, i$7, indent.length);
|
143090
143071
|
end = i$7 + indent.length + endStep;
|
143091
|
-
split$
|
143072
|
+
split$1 = undefined;
|
143092
143073
|
} else {
|
143093
143074
|
if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") {
|
143094
143075
|
const next = text[i$7 + 1];
|
143095
|
-
if (next && next !== " " && next !== "\n" && next !== " ") split$
|
143076
|
+
if (next && next !== " " && next !== "\n" && next !== " ") split$1 = i$7;
|
143096
143077
|
}
|
143097
143078
|
if (i$7 >= end) {
|
143098
|
-
if (split$
|
143099
|
-
folds.push(split$
|
143100
|
-
end = split$
|
143101
|
-
split$
|
143079
|
+
if (split$1) {
|
143080
|
+
folds.push(split$1);
|
143081
|
+
end = split$1 + endStep;
|
143082
|
+
split$1 = undefined;
|
143102
143083
|
} else if (mode$2 === FOLD_QUOTED) {
|
143103
143084
|
while (prev === " " || prev === " ") {
|
143104
143085
|
prev = ch;
|
@@ -143110,7 +143091,7 @@ var require_foldFlowLines = __commonJS({ "../../node_modules/yaml/dist/stringify
|
|
143110
143091
|
folds.push(j$5);
|
143111
143092
|
escapedFolds[j$5] = true;
|
143112
143093
|
end = j$5 + endStep;
|
143113
|
-
split$
|
143094
|
+
split$1 = undefined;
|
143114
143095
|
} else {
|
143115
143096
|
overflow = true;
|
143116
143097
|
}
|
@@ -143800,34 +143781,34 @@ var require_stringifyCollection = __commonJS({ "../../node_modules/yaml/dist/str
|
|
143800
143781
|
type: null
|
143801
143782
|
});
|
143802
143783
|
let chompKeep = false;
|
143803
|
-
const lines
|
143784
|
+
const lines = [];
|
143804
143785
|
for (let i$7 = 0; i$7 < items.length; ++i$7) {
|
143805
143786
|
const item = items[i$7];
|
143806
143787
|
let comment$1 = null;
|
143807
143788
|
if (identity$18.isNode(item)) {
|
143808
|
-
if (!chompKeep && item.spaceBefore) lines
|
143809
|
-
addCommentBefore(ctx, lines
|
143789
|
+
if (!chompKeep && item.spaceBefore) lines.push("");
|
143790
|
+
addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
|
143810
143791
|
if (item.comment) comment$1 = item.comment;
|
143811
143792
|
} else if (identity$18.isPair(item)) {
|
143812
143793
|
const ik = identity$18.isNode(item.key) ? item.key : null;
|
143813
143794
|
if (ik) {
|
143814
|
-
if (!chompKeep && ik.spaceBefore) lines
|
143815
|
-
addCommentBefore(ctx, lines
|
143795
|
+
if (!chompKeep && ik.spaceBefore) lines.push("");
|
143796
|
+
addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);
|
143816
143797
|
}
|
143817
143798
|
}
|
143818
143799
|
chompKeep = false;
|
143819
143800
|
let str$1 = stringify$7.stringify(item, itemCtx, () => comment$1 = null, () => chompKeep = true);
|
143820
143801
|
if (comment$1) str$1 += stringifyComment$1.lineComment(str$1, itemIndent, commentString(comment$1));
|
143821
143802
|
if (chompKeep && comment$1) chompKeep = false;
|
143822
|
-
lines
|
143803
|
+
lines.push(blockItemPrefix + str$1);
|
143823
143804
|
}
|
143824
143805
|
let str;
|
143825
|
-
if (lines
|
143806
|
+
if (lines.length === 0) {
|
143826
143807
|
str = flowChars.start + flowChars.end;
|
143827
143808
|
} else {
|
143828
|
-
str = lines
|
143829
|
-
for (let i$7 = 1; i$7 < lines
|
143830
|
-
const line = lines
|
143809
|
+
str = lines[0];
|
143810
|
+
for (let i$7 = 1; i$7 < lines.length; ++i$7) {
|
143811
|
+
const line = lines[i$7];
|
143831
143812
|
str += line ? `\n${indent}${line}` : "\n";
|
143832
143813
|
}
|
143833
143814
|
}
|
@@ -143847,19 +143828,19 @@ var require_stringifyCollection = __commonJS({ "../../node_modules/yaml/dist/str
|
|
143847
143828
|
});
|
143848
143829
|
let reqNewline = false;
|
143849
143830
|
let linesAtValue = 0;
|
143850
|
-
const lines
|
143831
|
+
const lines = [];
|
143851
143832
|
for (let i$7 = 0; i$7 < items.length; ++i$7) {
|
143852
143833
|
const item = items[i$7];
|
143853
143834
|
let comment = null;
|
143854
143835
|
if (identity$18.isNode(item)) {
|
143855
|
-
if (item.spaceBefore) lines
|
143856
|
-
addCommentBefore(ctx, lines
|
143836
|
+
if (item.spaceBefore) lines.push("");
|
143837
|
+
addCommentBefore(ctx, lines, item.commentBefore, false);
|
143857
143838
|
if (item.comment) comment = item.comment;
|
143858
143839
|
} else if (identity$18.isPair(item)) {
|
143859
143840
|
const ik = identity$18.isNode(item.key) ? item.key : null;
|
143860
143841
|
if (ik) {
|
143861
|
-
if (ik.spaceBefore) lines
|
143862
|
-
addCommentBefore(ctx, lines
|
143842
|
+
if (ik.spaceBefore) lines.push("");
|
143843
|
+
addCommentBefore(ctx, lines, ik.commentBefore, false);
|
143863
143844
|
if (ik.comment) reqNewline = true;
|
143864
143845
|
}
|
143865
143846
|
const iv = identity$18.isNode(item.value) ? item.value : null;
|
@@ -143874,32 +143855,32 @@ var require_stringifyCollection = __commonJS({ "../../node_modules/yaml/dist/str
|
|
143874
143855
|
let str = stringify$7.stringify(item, itemCtx, () => comment = null);
|
143875
143856
|
if (i$7 < items.length - 1) str += ",";
|
143876
143857
|
if (comment) str += stringifyComment$1.lineComment(str, itemIndent, commentString(comment));
|
143877
|
-
if (!reqNewline && (lines
|
143878
|
-
lines
|
143879
|
-
linesAtValue = lines
|
143858
|
+
if (!reqNewline && (lines.length > linesAtValue || str.includes("\n"))) reqNewline = true;
|
143859
|
+
lines.push(str);
|
143860
|
+
linesAtValue = lines.length;
|
143880
143861
|
}
|
143881
143862
|
const { start, end } = flowChars;
|
143882
|
-
if (lines
|
143863
|
+
if (lines.length === 0) {
|
143883
143864
|
return start + end;
|
143884
143865
|
} else {
|
143885
143866
|
if (!reqNewline) {
|
143886
|
-
const len = lines
|
143867
|
+
const len = lines.reduce((sum, line) => sum + line.length + 2, 2);
|
143887
143868
|
reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
|
143888
143869
|
}
|
143889
143870
|
if (reqNewline) {
|
143890
143871
|
let str = start;
|
143891
|
-
for (const line of lines
|
143872
|
+
for (const line of lines) str += line ? `\n${indentStep}${indent}${line}` : "\n";
|
143892
143873
|
return `${str}\n${indent}${end}`;
|
143893
143874
|
} else {
|
143894
|
-
return `${start}${fcPadding}${lines
|
143875
|
+
return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`;
|
143895
143876
|
}
|
143896
143877
|
}
|
143897
143878
|
}
|
143898
|
-
function addCommentBefore({ indent, options: { commentString } }, lines
|
143879
|
+
function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {
|
143899
143880
|
if (comment && chompKeep) comment = comment.replace(/^\n+/, "");
|
143900
143881
|
if (comment) {
|
143901
143882
|
const ic = stringifyComment$1.indentComment(commentString(comment), indent);
|
143902
|
-
lines
|
143883
|
+
lines.push(ic.trimStart());
|
143903
143884
|
}
|
143904
143885
|
}
|
143905
143886
|
exports.stringifyCollection = stringifyCollection$2;
|
@@ -144468,11 +144449,11 @@ var require_binary = __commonJS({ "../../node_modules/yaml/dist/schema/yaml-1.1/
|
|
144468
144449
|
if (type$1 !== Scalar$8.Scalar.QUOTE_DOUBLE) {
|
144469
144450
|
const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
|
144470
144451
|
const n$4 = Math.ceil(str.length / lineWidth);
|
144471
|
-
const lines
|
144452
|
+
const lines = new Array(n$4);
|
144472
144453
|
for (let i$7 = 0, o$6 = 0; i$7 < n$4; ++i$7, o$6 += lineWidth) {
|
144473
|
-
lines
|
144454
|
+
lines[i$7] = str.substr(o$6, lineWidth);
|
144474
144455
|
}
|
144475
|
-
str = lines
|
144456
|
+
str = lines.join(type$1 === Scalar$8.Scalar.BLOCK_LITERAL ? "\n" : " ");
|
144476
144457
|
}
|
144477
144458
|
return stringifyString$1.stringifyString({
|
144478
144459
|
comment,
|
@@ -145105,31 +145086,31 @@ var require_stringifyDocument = __commonJS({ "../../node_modules/yaml/dist/strin
|
|
145105
145086
|
var stringify$6 = require_stringify();
|
145106
145087
|
var stringifyComment = require_stringifyComment();
|
145107
145088
|
function stringifyDocument$1(doc, options) {
|
145108
|
-
const lines
|
145089
|
+
const lines = [];
|
145109
145090
|
let hasDirectives = options.directives === true;
|
145110
145091
|
if (options.directives !== false && doc.directives) {
|
145111
145092
|
const dir = doc.directives.toString(doc);
|
145112
145093
|
if (dir) {
|
145113
|
-
lines
|
145094
|
+
lines.push(dir);
|
145114
145095
|
hasDirectives = true;
|
145115
145096
|
} else if (doc.directives.docStart) hasDirectives = true;
|
145116
145097
|
}
|
145117
|
-
if (hasDirectives) lines
|
145098
|
+
if (hasDirectives) lines.push("---");
|
145118
145099
|
const ctx = stringify$6.createStringifyContext(doc, options);
|
145119
145100
|
const { commentString } = ctx.options;
|
145120
145101
|
if (doc.commentBefore) {
|
145121
|
-
if (lines
|
145102
|
+
if (lines.length !== 1) lines.unshift("");
|
145122
145103
|
const cs = commentString(doc.commentBefore);
|
145123
|
-
lines
|
145104
|
+
lines.unshift(stringifyComment.indentComment(cs, ""));
|
145124
145105
|
}
|
145125
145106
|
let chompKeep = false;
|
145126
145107
|
let contentComment = null;
|
145127
145108
|
if (doc.contents) {
|
145128
145109
|
if (identity$9.isNode(doc.contents)) {
|
145129
|
-
if (doc.contents.spaceBefore && hasDirectives) lines
|
145110
|
+
if (doc.contents.spaceBefore && hasDirectives) lines.push("");
|
145130
145111
|
if (doc.contents.commentBefore) {
|
145131
145112
|
const cs = commentString(doc.contents.commentBefore);
|
145132
|
-
lines
|
145113
|
+
lines.push(stringifyComment.indentComment(cs, ""));
|
145133
145114
|
}
|
145134
145115
|
ctx.forceBlockIndent = !!doc.comment;
|
145135
145116
|
contentComment = doc.contents.comment;
|
@@ -145137,33 +145118,33 @@ var require_stringifyDocument = __commonJS({ "../../node_modules/yaml/dist/strin
|
|
145137
145118
|
const onChompKeep = contentComment ? undefined : () => chompKeep = true;
|
145138
145119
|
let body = stringify$6.stringify(doc.contents, ctx, () => contentComment = null, onChompKeep);
|
145139
145120
|
if (contentComment) body += stringifyComment.lineComment(body, "", commentString(contentComment));
|
145140
|
-
if ((body[0] === "|" || body[0] === ">") && lines
|
145141
|
-
lines
|
145142
|
-
} else lines
|
145121
|
+
if ((body[0] === "|" || body[0] === ">") && lines[lines.length - 1] === "---") {
|
145122
|
+
lines[lines.length - 1] = `--- ${body}`;
|
145123
|
+
} else lines.push(body);
|
145143
145124
|
} else {
|
145144
|
-
lines
|
145125
|
+
lines.push(stringify$6.stringify(doc.contents, ctx));
|
145145
145126
|
}
|
145146
145127
|
if (doc.directives?.docEnd) {
|
145147
145128
|
if (doc.comment) {
|
145148
145129
|
const cs = commentString(doc.comment);
|
145149
145130
|
if (cs.includes("\n")) {
|
145150
|
-
lines
|
145151
|
-
lines
|
145131
|
+
lines.push("...");
|
145132
|
+
lines.push(stringifyComment.indentComment(cs, ""));
|
145152
145133
|
} else {
|
145153
|
-
lines
|
145134
|
+
lines.push(`... ${cs}`);
|
145154
145135
|
}
|
145155
145136
|
} else {
|
145156
|
-
lines
|
145137
|
+
lines.push("...");
|
145157
145138
|
}
|
145158
145139
|
} else {
|
145159
145140
|
let dc = doc.comment;
|
145160
145141
|
if (dc && chompKeep) dc = dc.replace(/^\n+/, "");
|
145161
145142
|
if (dc) {
|
145162
|
-
if ((!chompKeep || contentComment) && lines
|
145163
|
-
lines
|
145143
|
+
if ((!chompKeep || contentComment) && lines[lines.length - 1] !== "") lines.push("");
|
145144
|
+
lines.push(stringifyComment.indentComment(commentString(dc), ""));
|
145164
145145
|
}
|
145165
145146
|
}
|
145166
|
-
return lines
|
145147
|
+
return lines.join("\n") + "\n";
|
145167
145148
|
}
|
145168
145149
|
exports.stringifyDocument = stringifyDocument$1;
|
145169
145150
|
} });
|
@@ -146116,15 +146097,15 @@ var require_resolve_block_scalar = __commonJS({ "../../node_modules/yaml/dist/co
|
|
146116
146097
|
]
|
146117
146098
|
};
|
146118
146099
|
const type$1 = header.mode === ">" ? Scalar$3.Scalar.BLOCK_FOLDED : Scalar$3.Scalar.BLOCK_LITERAL;
|
146119
|
-
const lines
|
146120
|
-
let chompStart = lines
|
146121
|
-
for (let i$7 = lines
|
146122
|
-
const content = lines
|
146100
|
+
const lines = scalar.source ? splitLines(scalar.source) : [];
|
146101
|
+
let chompStart = lines.length;
|
146102
|
+
for (let i$7 = lines.length - 1; i$7 >= 0; --i$7) {
|
146103
|
+
const content = lines[i$7][1];
|
146123
146104
|
if (content === "" || content === "\r") chompStart = i$7;
|
146124
146105
|
else break;
|
146125
146106
|
}
|
146126
146107
|
if (chompStart === 0) {
|
146127
|
-
const value$1 = header.chomp === "+" && lines
|
146108
|
+
const value$1 = header.chomp === "+" && lines.length > 0 ? "\n".repeat(Math.max(1, lines.length - 1)) : "";
|
146128
146109
|
let end$1 = start + header.length;
|
146129
146110
|
if (scalar.source) end$1 += scalar.source.length;
|
146130
146111
|
return {
|
@@ -146142,7 +146123,7 @@ var require_resolve_block_scalar = __commonJS({ "../../node_modules/yaml/dist/co
|
|
146142
146123
|
let offset = scalar.offset + header.length;
|
146143
146124
|
let contentStart = 0;
|
146144
146125
|
for (let i$7 = 0; i$7 < chompStart; ++i$7) {
|
146145
|
-
const [indent, content] = lines
|
146126
|
+
const [indent, content] = lines[i$7];
|
146146
146127
|
if (content === "" || content === "\r") {
|
146147
146128
|
if (header.indent === 0 && indent.length > trimIndent) trimIndent = indent.length;
|
146148
146129
|
} else {
|
@@ -146160,15 +146141,15 @@ var require_resolve_block_scalar = __commonJS({ "../../node_modules/yaml/dist/co
|
|
146160
146141
|
}
|
146161
146142
|
offset += indent.length + content.length + 1;
|
146162
146143
|
}
|
146163
|
-
for (let i$7 = lines
|
146164
|
-
if (lines
|
146144
|
+
for (let i$7 = lines.length - 1; i$7 >= chompStart; --i$7) {
|
146145
|
+
if (lines[i$7][0].length > trimIndent) chompStart = i$7 + 1;
|
146165
146146
|
}
|
146166
146147
|
let value = "";
|
146167
146148
|
let sep$5 = "";
|
146168
146149
|
let prevMoreIndented = false;
|
146169
|
-
for (let i$7 = 0; i$7 < contentStart; ++i$7) value += lines
|
146150
|
+
for (let i$7 = 0; i$7 < contentStart; ++i$7) value += lines[i$7][0].slice(trimIndent) + "\n";
|
146170
146151
|
for (let i$7 = contentStart; i$7 < chompStart; ++i$7) {
|
146171
|
-
let [indent, content] = lines
|
146152
|
+
let [indent, content] = lines[i$7];
|
146172
146153
|
offset += indent.length + content.length + 1;
|
146173
146154
|
const crlf = content[content.length - 1] === "\r";
|
146174
146155
|
if (crlf) content = content.slice(0, -1);
|
@@ -146200,7 +146181,7 @@ var require_resolve_block_scalar = __commonJS({ "../../node_modules/yaml/dist/co
|
|
146200
146181
|
switch (header.chomp) {
|
146201
146182
|
case "-": break;
|
146202
146183
|
case "+":
|
146203
|
-
for (let i$7 = chompStart; i$7 < lines
|
146184
|
+
for (let i$7 = chompStart; i$7 < lines.length; ++i$7) value += "\n" + lines[i$7][0].slice(trimIndent);
|
146204
146185
|
if (value[value.length - 1] !== "\n") value += "\n";
|
146205
146186
|
break;
|
146206
146187
|
default: value += "\n";
|
@@ -146278,13 +146259,13 @@ var require_resolve_block_scalar = __commonJS({ "../../node_modules/yaml/dist/co
|
|
146278
146259
|
}
|
146279
146260
|
/** @returns Array of lines split up as `[indent, content]` */
|
146280
146261
|
function splitLines(source) {
|
146281
|
-
const split$
|
146282
|
-
const first = split$
|
146262
|
+
const split$1 = source.split(/\n( *)/);
|
146263
|
+
const first = split$1[0];
|
146283
146264
|
const m$5 = first.match(/^( *)/);
|
146284
146265
|
const line0 = m$5?.[1] ? [m$5[1], first.slice(m$5[1].length)] : ["", first];
|
146285
|
-
const lines
|
146286
|
-
for (let i$7 = 1; i$7 < split$
|
146287
|
-
return lines
|
146266
|
+
const lines = [line0];
|
146267
|
+
for (let i$7 = 1; i$7 < split$1.length; i$7 += 2) lines.push([split$1[i$7], split$1[i$7 + 1]]);
|
146268
|
+
return lines;
|
146288
146269
|
}
|
146289
146270
|
exports.resolveBlockScalar = resolveBlockScalar$2;
|
146290
146271
|
} });
|