@postman-cse/onboarding-repo-sync 2.1.3 → 2.1.4
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/action.cjs +107 -63
- package/dist/cli.cjs +109 -65
- package/dist/index.cjs +107 -63
- package/package.json +5 -3
package/dist/action.cjs
CHANGED
|
@@ -58521,10 +58521,10 @@ var require_internet = __commonJS({
|
|
|
58521
58521
|
}
|
|
58522
58522
|
}
|
|
58523
58523
|
};
|
|
58524
|
-
self2.mac = function(
|
|
58524
|
+
self2.mac = function(sep5) {
|
|
58525
58525
|
var i, mac = "", validSep = ":";
|
|
58526
|
-
if (["-", ""].indexOf(
|
|
58527
|
-
validSep =
|
|
58526
|
+
if (["-", ""].indexOf(sep5) !== -1) {
|
|
58527
|
+
validSep = sep5;
|
|
58528
58528
|
}
|
|
58529
58529
|
for (i = 0; i < 12; i++) {
|
|
58530
58530
|
mac += faker.datatype.number(15).toString(16);
|
|
@@ -104276,10 +104276,10 @@ var require_resolve_block_map = __commonJS({
|
|
|
104276
104276
|
let offset = bm.offset;
|
|
104277
104277
|
let commentEnd = null;
|
|
104278
104278
|
for (const collItem of bm.items) {
|
|
104279
|
-
const { start, key, sep:
|
|
104279
|
+
const { start, key, sep: sep5, value } = collItem;
|
|
104280
104280
|
const keyProps = resolveProps.resolveProps(start, {
|
|
104281
104281
|
indicator: "explicit-key-ind",
|
|
104282
|
-
next: key ??
|
|
104282
|
+
next: key ?? sep5?.[0],
|
|
104283
104283
|
offset,
|
|
104284
104284
|
onError,
|
|
104285
104285
|
parentIndent: bm.indent,
|
|
@@ -104293,7 +104293,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
104293
104293
|
else if ("indent" in key && key.indent !== bm.indent)
|
|
104294
104294
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
104295
104295
|
}
|
|
104296
|
-
if (!keyProps.anchor && !keyProps.tag && !
|
|
104296
|
+
if (!keyProps.anchor && !keyProps.tag && !sep5) {
|
|
104297
104297
|
commentEnd = keyProps.end;
|
|
104298
104298
|
if (keyProps.comment) {
|
|
104299
104299
|
if (map.comment)
|
|
@@ -104317,7 +104317,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
104317
104317
|
ctx.atKey = false;
|
|
104318
104318
|
if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
|
|
104319
104319
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
104320
|
-
const valueProps = resolveProps.resolveProps(
|
|
104320
|
+
const valueProps = resolveProps.resolveProps(sep5 ?? [], {
|
|
104321
104321
|
indicator: "map-value-ind",
|
|
104322
104322
|
next: value,
|
|
104323
104323
|
offset: keyNode.range[2],
|
|
@@ -104333,7 +104333,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
104333
104333
|
if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
|
|
104334
104334
|
onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
|
|
104335
104335
|
}
|
|
104336
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset,
|
|
104336
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep5, null, valueProps, onError);
|
|
104337
104337
|
if (ctx.schema.compat)
|
|
104338
104338
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
|
|
104339
104339
|
offset = valueNode.range[2];
|
|
@@ -104424,7 +104424,7 @@ var require_resolve_end = __commonJS({
|
|
|
104424
104424
|
let comment = "";
|
|
104425
104425
|
if (end) {
|
|
104426
104426
|
let hasSpace = false;
|
|
104427
|
-
let
|
|
104427
|
+
let sep5 = "";
|
|
104428
104428
|
for (const token of end) {
|
|
104429
104429
|
const { source, type } = token;
|
|
104430
104430
|
switch (type) {
|
|
@@ -104438,13 +104438,13 @@ var require_resolve_end = __commonJS({
|
|
|
104438
104438
|
if (!comment)
|
|
104439
104439
|
comment = cb;
|
|
104440
104440
|
else
|
|
104441
|
-
comment +=
|
|
104442
|
-
|
|
104441
|
+
comment += sep5 + cb;
|
|
104442
|
+
sep5 = "";
|
|
104443
104443
|
break;
|
|
104444
104444
|
}
|
|
104445
104445
|
case "newline":
|
|
104446
104446
|
if (comment)
|
|
104447
|
-
|
|
104447
|
+
sep5 += source;
|
|
104448
104448
|
hasSpace = true;
|
|
104449
104449
|
break;
|
|
104450
104450
|
default:
|
|
@@ -104487,18 +104487,18 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
104487
104487
|
let offset = fc.offset + fc.start.source.length;
|
|
104488
104488
|
for (let i = 0; i < fc.items.length; ++i) {
|
|
104489
104489
|
const collItem = fc.items[i];
|
|
104490
|
-
const { start, key, sep:
|
|
104490
|
+
const { start, key, sep: sep5, value } = collItem;
|
|
104491
104491
|
const props = resolveProps.resolveProps(start, {
|
|
104492
104492
|
flow: fcName,
|
|
104493
104493
|
indicator: "explicit-key-ind",
|
|
104494
|
-
next: key ??
|
|
104494
|
+
next: key ?? sep5?.[0],
|
|
104495
104495
|
offset,
|
|
104496
104496
|
onError,
|
|
104497
104497
|
parentIndent: fc.indent,
|
|
104498
104498
|
startOnNewline: false
|
|
104499
104499
|
});
|
|
104500
104500
|
if (!props.found) {
|
|
104501
|
-
if (!props.anchor && !props.tag && !
|
|
104501
|
+
if (!props.anchor && !props.tag && !sep5 && !value) {
|
|
104502
104502
|
if (i === 0 && props.comma)
|
|
104503
104503
|
onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
|
|
104504
104504
|
else if (i < fc.items.length - 1)
|
|
@@ -104552,8 +104552,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
104552
104552
|
}
|
|
104553
104553
|
}
|
|
104554
104554
|
}
|
|
104555
|
-
if (!isMap && !
|
|
104556
|
-
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end,
|
|
104555
|
+
if (!isMap && !sep5 && !props.found) {
|
|
104556
|
+
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep5, null, props, onError);
|
|
104557
104557
|
coll.items.push(valueNode);
|
|
104558
104558
|
offset = valueNode.range[2];
|
|
104559
104559
|
if (isBlock(value))
|
|
@@ -104565,7 +104565,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
104565
104565
|
if (isBlock(key))
|
|
104566
104566
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
104567
104567
|
ctx.atKey = false;
|
|
104568
|
-
const valueProps = resolveProps.resolveProps(
|
|
104568
|
+
const valueProps = resolveProps.resolveProps(sep5 ?? [], {
|
|
104569
104569
|
flow: fcName,
|
|
104570
104570
|
indicator: "map-value-ind",
|
|
104571
104571
|
next: value,
|
|
@@ -104576,8 +104576,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
104576
104576
|
});
|
|
104577
104577
|
if (valueProps.found) {
|
|
104578
104578
|
if (!isMap && !props.found && ctx.options.strict) {
|
|
104579
|
-
if (
|
|
104580
|
-
for (const st of
|
|
104579
|
+
if (sep5)
|
|
104580
|
+
for (const st of sep5) {
|
|
104581
104581
|
if (st === valueProps.found)
|
|
104582
104582
|
break;
|
|
104583
104583
|
if (st.type === "newline") {
|
|
@@ -104594,7 +104594,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
104594
104594
|
else
|
|
104595
104595
|
onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
104596
104596
|
}
|
|
104597
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end,
|
|
104597
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep5, null, valueProps, onError) : null;
|
|
104598
104598
|
if (valueNode) {
|
|
104599
104599
|
if (isBlock(value))
|
|
104600
104600
|
onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
@@ -104774,7 +104774,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
104774
104774
|
chompStart = i + 1;
|
|
104775
104775
|
}
|
|
104776
104776
|
let value = "";
|
|
104777
|
-
let
|
|
104777
|
+
let sep5 = "";
|
|
104778
104778
|
let prevMoreIndented = false;
|
|
104779
104779
|
for (let i = 0; i < contentStart; ++i)
|
|
104780
104780
|
value += lines[i][0].slice(trimIndent) + "\n";
|
|
@@ -104791,24 +104791,24 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
104791
104791
|
indent = "";
|
|
104792
104792
|
}
|
|
104793
104793
|
if (type === Scalar.Scalar.BLOCK_LITERAL) {
|
|
104794
|
-
value +=
|
|
104795
|
-
|
|
104794
|
+
value += sep5 + indent.slice(trimIndent) + content;
|
|
104795
|
+
sep5 = "\n";
|
|
104796
104796
|
} else if (indent.length > trimIndent || content[0] === " ") {
|
|
104797
|
-
if (
|
|
104798
|
-
|
|
104799
|
-
else if (!prevMoreIndented &&
|
|
104800
|
-
|
|
104801
|
-
value +=
|
|
104802
|
-
|
|
104797
|
+
if (sep5 === " ")
|
|
104798
|
+
sep5 = "\n";
|
|
104799
|
+
else if (!prevMoreIndented && sep5 === "\n")
|
|
104800
|
+
sep5 = "\n\n";
|
|
104801
|
+
value += sep5 + indent.slice(trimIndent) + content;
|
|
104802
|
+
sep5 = "\n";
|
|
104803
104803
|
prevMoreIndented = true;
|
|
104804
104804
|
} else if (content === "") {
|
|
104805
|
-
if (
|
|
104805
|
+
if (sep5 === "\n")
|
|
104806
104806
|
value += "\n";
|
|
104807
104807
|
else
|
|
104808
|
-
|
|
104808
|
+
sep5 = "\n";
|
|
104809
104809
|
} else {
|
|
104810
|
-
value +=
|
|
104811
|
-
|
|
104810
|
+
value += sep5 + content;
|
|
104811
|
+
sep5 = " ";
|
|
104812
104812
|
prevMoreIndented = false;
|
|
104813
104813
|
}
|
|
104814
104814
|
}
|
|
@@ -104990,25 +104990,25 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
104990
104990
|
if (!match)
|
|
104991
104991
|
return source;
|
|
104992
104992
|
let res = match[1];
|
|
104993
|
-
let
|
|
104993
|
+
let sep5 = " ";
|
|
104994
104994
|
let pos = first.lastIndex;
|
|
104995
104995
|
line.lastIndex = pos;
|
|
104996
104996
|
while (match = line.exec(source)) {
|
|
104997
104997
|
if (match[1] === "") {
|
|
104998
|
-
if (
|
|
104999
|
-
res +=
|
|
104998
|
+
if (sep5 === "\n")
|
|
104999
|
+
res += sep5;
|
|
105000
105000
|
else
|
|
105001
|
-
|
|
105001
|
+
sep5 = "\n";
|
|
105002
105002
|
} else {
|
|
105003
|
-
res +=
|
|
105004
|
-
|
|
105003
|
+
res += sep5 + match[1];
|
|
105004
|
+
sep5 = " ";
|
|
105005
105005
|
}
|
|
105006
105006
|
pos = line.lastIndex;
|
|
105007
105007
|
}
|
|
105008
105008
|
const last = /[ \t]*(.*)/sy;
|
|
105009
105009
|
last.lastIndex = pos;
|
|
105010
105010
|
match = last.exec(source);
|
|
105011
|
-
return res +
|
|
105011
|
+
return res + sep5 + (match?.[1] ?? "");
|
|
105012
105012
|
}
|
|
105013
105013
|
function doubleQuotedValue(source, onError) {
|
|
105014
105014
|
let res = "";
|
|
@@ -105818,14 +105818,14 @@ var require_cst_stringify = __commonJS({
|
|
|
105818
105818
|
}
|
|
105819
105819
|
}
|
|
105820
105820
|
}
|
|
105821
|
-
function stringifyItem({ start, key, sep:
|
|
105821
|
+
function stringifyItem({ start, key, sep: sep5, value }) {
|
|
105822
105822
|
let res = "";
|
|
105823
105823
|
for (const st of start)
|
|
105824
105824
|
res += st.source;
|
|
105825
105825
|
if (key)
|
|
105826
105826
|
res += stringifyToken(key);
|
|
105827
|
-
if (
|
|
105828
|
-
for (const st of
|
|
105827
|
+
if (sep5)
|
|
105828
|
+
for (const st of sep5)
|
|
105829
105829
|
res += st.source;
|
|
105830
105830
|
if (value)
|
|
105831
105831
|
res += stringifyToken(value);
|
|
@@ -106992,18 +106992,18 @@ var require_parser2 = __commonJS({
|
|
|
106992
106992
|
if (this.type === "map-value-ind") {
|
|
106993
106993
|
const prev = getPrevProps(this.peek(2));
|
|
106994
106994
|
const start = getFirstKeyStartProps(prev);
|
|
106995
|
-
let
|
|
106995
|
+
let sep5;
|
|
106996
106996
|
if (scalar.end) {
|
|
106997
|
-
|
|
106998
|
-
|
|
106997
|
+
sep5 = scalar.end;
|
|
106998
|
+
sep5.push(this.sourceToken);
|
|
106999
106999
|
delete scalar.end;
|
|
107000
107000
|
} else
|
|
107001
|
-
|
|
107001
|
+
sep5 = [this.sourceToken];
|
|
107002
107002
|
const map = {
|
|
107003
107003
|
type: "block-map",
|
|
107004
107004
|
offset: scalar.offset,
|
|
107005
107005
|
indent: scalar.indent,
|
|
107006
|
-
items: [{ start, key: scalar, sep:
|
|
107006
|
+
items: [{ start, key: scalar, sep: sep5 }]
|
|
107007
107007
|
};
|
|
107008
107008
|
this.onKeyLine = true;
|
|
107009
107009
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -107156,15 +107156,15 @@ var require_parser2 = __commonJS({
|
|
|
107156
107156
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
107157
107157
|
const start2 = getFirstKeyStartProps(it.start);
|
|
107158
107158
|
const key = it.key;
|
|
107159
|
-
const
|
|
107160
|
-
|
|
107159
|
+
const sep5 = it.sep;
|
|
107160
|
+
sep5.push(this.sourceToken);
|
|
107161
107161
|
delete it.key;
|
|
107162
107162
|
delete it.sep;
|
|
107163
107163
|
this.stack.push({
|
|
107164
107164
|
type: "block-map",
|
|
107165
107165
|
offset: this.offset,
|
|
107166
107166
|
indent: this.indent,
|
|
107167
|
-
items: [{ start: start2, key, sep:
|
|
107167
|
+
items: [{ start: start2, key, sep: sep5 }]
|
|
107168
107168
|
});
|
|
107169
107169
|
} else if (start.length > 0) {
|
|
107170
107170
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -107358,13 +107358,13 @@ var require_parser2 = __commonJS({
|
|
|
107358
107358
|
const prev = getPrevProps(parent);
|
|
107359
107359
|
const start = getFirstKeyStartProps(prev);
|
|
107360
107360
|
fixFlowSeqItems(fc);
|
|
107361
|
-
const
|
|
107362
|
-
|
|
107361
|
+
const sep5 = fc.end.splice(1, fc.end.length);
|
|
107362
|
+
sep5.push(this.sourceToken);
|
|
107363
107363
|
const map = {
|
|
107364
107364
|
type: "block-map",
|
|
107365
107365
|
offset: fc.offset,
|
|
107366
107366
|
indent: fc.indent,
|
|
107367
|
-
items: [{ start, key: fc, sep:
|
|
107367
|
+
items: [{ start, key: fc, sep: sep5 }]
|
|
107368
107368
|
};
|
|
107369
107369
|
this.onKeyLine = true;
|
|
107370
107370
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -124779,8 +124779,8 @@ function writeFlowMapping(state, level, node) {
|
|
|
124779
124779
|
if (explicitPair) pairBuffer += "? ";
|
|
124780
124780
|
else if (state.quoteFlowKeys) pairBuffer += '"';
|
|
124781
124781
|
const valueText = writeNode(state, level, value, {});
|
|
124782
|
-
const
|
|
124783
|
-
pairBuffer += `${keyText}${state.quoteFlowKeys && !explicitPair ? '"' : ""}:${
|
|
124782
|
+
const sep5 = state.flowSkipColonSpace || valueText === "" ? "" : " ";
|
|
124783
|
+
pairBuffer += `${keyText}${state.quoteFlowKeys && !explicitPair ? '"' : ""}:${sep5}${valueText}`;
|
|
124784
124784
|
result += pairBuffer;
|
|
124785
124785
|
}
|
|
124786
124786
|
const pad = state.flowBracketPadding && result !== "" ? " " : "";
|
|
@@ -124877,8 +124877,8 @@ function writeNode(state, level, node, ctx) {
|
|
|
124877
124877
|
if (anchor !== null) props.push(anchor);
|
|
124878
124878
|
if (tag !== null) props.push(tag);
|
|
124879
124879
|
}
|
|
124880
|
-
const
|
|
124881
|
-
body = `${props.join(" ")}${
|
|
124880
|
+
const sep5 = body === "" || body.charCodeAt(0) === CHAR_LINE_FEED ? "" : " ";
|
|
124881
|
+
body = `${props.join(" ")}${sep5}${body}`;
|
|
124882
124882
|
}
|
|
124883
124883
|
return body;
|
|
124884
124884
|
}
|
|
@@ -124923,8 +124923,8 @@ function present(documents, options) {
|
|
|
124923
124923
|
block: true,
|
|
124924
124924
|
compact: true
|
|
124925
124925
|
});
|
|
124926
|
-
const
|
|
124927
|
-
result += `---${
|
|
124926
|
+
const sep5 = body === "" ? "" : hasDirectives || rootStartsOwnLine(doc.contents) ? "\n" : " ";
|
|
124927
|
+
result += `---${sep5}${body}
|
|
124928
124928
|
`;
|
|
124929
124929
|
} else result += writeNode(state, 0, doc.contents, {
|
|
124930
124930
|
block: true,
|
|
@@ -125049,9 +125049,47 @@ function structuredCloneSafe(value) {
|
|
|
125049
125049
|
if (typeof structuredClone === "function") return structuredClone(value);
|
|
125050
125050
|
return JSON.parse(JSON.stringify(value));
|
|
125051
125051
|
}
|
|
125052
|
+
async function listFilesRelative(dir, base) {
|
|
125053
|
+
let entries;
|
|
125054
|
+
try {
|
|
125055
|
+
entries = await fs3.readdir(dir, { withFileTypes: true });
|
|
125056
|
+
} catch {
|
|
125057
|
+
return [];
|
|
125058
|
+
}
|
|
125059
|
+
const out = [];
|
|
125060
|
+
for (const entry of entries) {
|
|
125061
|
+
const abs = path6.join(dir, entry.name);
|
|
125062
|
+
if (entry.isDirectory()) {
|
|
125063
|
+
out.push(...await listFilesRelative(abs, base));
|
|
125064
|
+
} else if (entry.isFile()) {
|
|
125065
|
+
out.push(path6.relative(base, abs).split(path6.sep).join("/"));
|
|
125066
|
+
}
|
|
125067
|
+
}
|
|
125068
|
+
return out;
|
|
125069
|
+
}
|
|
125070
|
+
async function pruneEmptyDirs(dir) {
|
|
125071
|
+
let entries;
|
|
125072
|
+
try {
|
|
125073
|
+
entries = await fs3.readdir(dir, { withFileTypes: true });
|
|
125074
|
+
} catch {
|
|
125075
|
+
return;
|
|
125076
|
+
}
|
|
125077
|
+
for (const entry of entries) {
|
|
125078
|
+
if (entry.isDirectory()) {
|
|
125079
|
+
const child2 = path6.join(dir, entry.name);
|
|
125080
|
+
await pruneEmptyDirs(child2);
|
|
125081
|
+
try {
|
|
125082
|
+
await fs3.rmdir(child2);
|
|
125083
|
+
} catch {
|
|
125084
|
+
}
|
|
125085
|
+
}
|
|
125086
|
+
}
|
|
125087
|
+
}
|
|
125052
125088
|
async function writeSplitCollection(v32, outputDir) {
|
|
125053
125089
|
const { files, rootPath } = await (0, import_v32.splitCollection)(v32);
|
|
125054
125090
|
await fs3.mkdir(outputDir, { recursive: true });
|
|
125091
|
+
const preexisting = new Set(await listFilesRelative(outputDir, outputDir));
|
|
125092
|
+
const written = /* @__PURE__ */ new Set();
|
|
125055
125093
|
for (const file of files) {
|
|
125056
125094
|
let rel = file.path;
|
|
125057
125095
|
if (rootPath && rel.startsWith(rootPath)) {
|
|
@@ -125062,7 +125100,13 @@ async function writeSplitCollection(v32, outputDir) {
|
|
|
125062
125100
|
const dest = path6.join(outputDir, rel);
|
|
125063
125101
|
await fs3.mkdir(path6.dirname(dest), { recursive: true });
|
|
125064
125102
|
await fs3.writeFile(dest, file.content, "utf8");
|
|
125103
|
+
written.add(rel.split(path6.sep).join("/"));
|
|
125104
|
+
}
|
|
125105
|
+
for (const rel of preexisting) {
|
|
125106
|
+
if (written.has(rel)) continue;
|
|
125107
|
+
await fs3.rm(path6.join(outputDir, rel), { force: true });
|
|
125065
125108
|
}
|
|
125109
|
+
await pruneEmptyDirs(outputDir);
|
|
125066
125110
|
}
|
|
125067
125111
|
|
|
125068
125112
|
// src/lib/postman/base-urls.ts
|
|
@@ -128800,8 +128844,8 @@ function assertPathWithinCwd(targetPath, fieldName) {
|
|
|
128800
128844
|
}
|
|
128801
128845
|
const base = (0, import_node_fs3.realpathSync)(process.cwd());
|
|
128802
128846
|
const resolved = path8.resolve(base, rawPath);
|
|
128803
|
-
const
|
|
128804
|
-
if (
|
|
128847
|
+
const relative4 = path8.relative(base, resolved);
|
|
128848
|
+
if (relative4.startsWith("..") || path8.isAbsolute(relative4)) {
|
|
128805
128849
|
throw new Error(`${fieldName} must stay within the repository root; received ${targetPath}`);
|
|
128806
128850
|
}
|
|
128807
128851
|
let existingPath = resolved;
|
package/dist/cli.cjs
CHANGED
|
@@ -58522,10 +58522,10 @@ var require_internet = __commonJS({
|
|
|
58522
58522
|
}
|
|
58523
58523
|
}
|
|
58524
58524
|
};
|
|
58525
|
-
self2.mac = function(
|
|
58525
|
+
self2.mac = function(sep3) {
|
|
58526
58526
|
var i, mac = "", validSep = ":";
|
|
58527
|
-
if (["-", ""].indexOf(
|
|
58528
|
-
validSep =
|
|
58527
|
+
if (["-", ""].indexOf(sep3) !== -1) {
|
|
58528
|
+
validSep = sep3;
|
|
58529
58529
|
}
|
|
58530
58530
|
for (i = 0; i < 12; i++) {
|
|
58531
58531
|
mac += faker.datatype.number(15).toString(16);
|
|
@@ -104277,10 +104277,10 @@ var require_resolve_block_map = __commonJS({
|
|
|
104277
104277
|
let offset = bm.offset;
|
|
104278
104278
|
let commentEnd = null;
|
|
104279
104279
|
for (const collItem of bm.items) {
|
|
104280
|
-
const { start, key, sep:
|
|
104280
|
+
const { start, key, sep: sep3, value } = collItem;
|
|
104281
104281
|
const keyProps = resolveProps.resolveProps(start, {
|
|
104282
104282
|
indicator: "explicit-key-ind",
|
|
104283
|
-
next: key ??
|
|
104283
|
+
next: key ?? sep3?.[0],
|
|
104284
104284
|
offset,
|
|
104285
104285
|
onError,
|
|
104286
104286
|
parentIndent: bm.indent,
|
|
@@ -104294,7 +104294,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
104294
104294
|
else if ("indent" in key && key.indent !== bm.indent)
|
|
104295
104295
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
104296
104296
|
}
|
|
104297
|
-
if (!keyProps.anchor && !keyProps.tag && !
|
|
104297
|
+
if (!keyProps.anchor && !keyProps.tag && !sep3) {
|
|
104298
104298
|
commentEnd = keyProps.end;
|
|
104299
104299
|
if (keyProps.comment) {
|
|
104300
104300
|
if (map.comment)
|
|
@@ -104318,7 +104318,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
104318
104318
|
ctx.atKey = false;
|
|
104319
104319
|
if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
|
|
104320
104320
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
104321
|
-
const valueProps = resolveProps.resolveProps(
|
|
104321
|
+
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
|
104322
104322
|
indicator: "map-value-ind",
|
|
104323
104323
|
next: value,
|
|
104324
104324
|
offset: keyNode.range[2],
|
|
@@ -104334,7 +104334,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
104334
104334
|
if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
|
|
104335
104335
|
onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
|
|
104336
104336
|
}
|
|
104337
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset,
|
|
104337
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep3, null, valueProps, onError);
|
|
104338
104338
|
if (ctx.schema.compat)
|
|
104339
104339
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
|
|
104340
104340
|
offset = valueNode.range[2];
|
|
@@ -104425,7 +104425,7 @@ var require_resolve_end = __commonJS({
|
|
|
104425
104425
|
let comment = "";
|
|
104426
104426
|
if (end) {
|
|
104427
104427
|
let hasSpace = false;
|
|
104428
|
-
let
|
|
104428
|
+
let sep3 = "";
|
|
104429
104429
|
for (const token of end) {
|
|
104430
104430
|
const { source, type } = token;
|
|
104431
104431
|
switch (type) {
|
|
@@ -104439,13 +104439,13 @@ var require_resolve_end = __commonJS({
|
|
|
104439
104439
|
if (!comment)
|
|
104440
104440
|
comment = cb;
|
|
104441
104441
|
else
|
|
104442
|
-
comment +=
|
|
104443
|
-
|
|
104442
|
+
comment += sep3 + cb;
|
|
104443
|
+
sep3 = "";
|
|
104444
104444
|
break;
|
|
104445
104445
|
}
|
|
104446
104446
|
case "newline":
|
|
104447
104447
|
if (comment)
|
|
104448
|
-
|
|
104448
|
+
sep3 += source;
|
|
104449
104449
|
hasSpace = true;
|
|
104450
104450
|
break;
|
|
104451
104451
|
default:
|
|
@@ -104488,18 +104488,18 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
104488
104488
|
let offset = fc.offset + fc.start.source.length;
|
|
104489
104489
|
for (let i = 0; i < fc.items.length; ++i) {
|
|
104490
104490
|
const collItem = fc.items[i];
|
|
104491
|
-
const { start, key, sep:
|
|
104491
|
+
const { start, key, sep: sep3, value } = collItem;
|
|
104492
104492
|
const props = resolveProps.resolveProps(start, {
|
|
104493
104493
|
flow: fcName,
|
|
104494
104494
|
indicator: "explicit-key-ind",
|
|
104495
|
-
next: key ??
|
|
104495
|
+
next: key ?? sep3?.[0],
|
|
104496
104496
|
offset,
|
|
104497
104497
|
onError,
|
|
104498
104498
|
parentIndent: fc.indent,
|
|
104499
104499
|
startOnNewline: false
|
|
104500
104500
|
});
|
|
104501
104501
|
if (!props.found) {
|
|
104502
|
-
if (!props.anchor && !props.tag && !
|
|
104502
|
+
if (!props.anchor && !props.tag && !sep3 && !value) {
|
|
104503
104503
|
if (i === 0 && props.comma)
|
|
104504
104504
|
onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
|
|
104505
104505
|
else if (i < fc.items.length - 1)
|
|
@@ -104553,8 +104553,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
104553
104553
|
}
|
|
104554
104554
|
}
|
|
104555
104555
|
}
|
|
104556
|
-
if (!isMap && !
|
|
104557
|
-
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end,
|
|
104556
|
+
if (!isMap && !sep3 && !props.found) {
|
|
104557
|
+
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep3, null, props, onError);
|
|
104558
104558
|
coll.items.push(valueNode);
|
|
104559
104559
|
offset = valueNode.range[2];
|
|
104560
104560
|
if (isBlock(value))
|
|
@@ -104566,7 +104566,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
104566
104566
|
if (isBlock(key))
|
|
104567
104567
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
104568
104568
|
ctx.atKey = false;
|
|
104569
|
-
const valueProps = resolveProps.resolveProps(
|
|
104569
|
+
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
|
104570
104570
|
flow: fcName,
|
|
104571
104571
|
indicator: "map-value-ind",
|
|
104572
104572
|
next: value,
|
|
@@ -104577,8 +104577,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
104577
104577
|
});
|
|
104578
104578
|
if (valueProps.found) {
|
|
104579
104579
|
if (!isMap && !props.found && ctx.options.strict) {
|
|
104580
|
-
if (
|
|
104581
|
-
for (const st of
|
|
104580
|
+
if (sep3)
|
|
104581
|
+
for (const st of sep3) {
|
|
104582
104582
|
if (st === valueProps.found)
|
|
104583
104583
|
break;
|
|
104584
104584
|
if (st.type === "newline") {
|
|
@@ -104595,7 +104595,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
104595
104595
|
else
|
|
104596
104596
|
onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
104597
104597
|
}
|
|
104598
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end,
|
|
104598
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep3, null, valueProps, onError) : null;
|
|
104599
104599
|
if (valueNode) {
|
|
104600
104600
|
if (isBlock(value))
|
|
104601
104601
|
onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
@@ -104775,7 +104775,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
104775
104775
|
chompStart = i + 1;
|
|
104776
104776
|
}
|
|
104777
104777
|
let value = "";
|
|
104778
|
-
let
|
|
104778
|
+
let sep3 = "";
|
|
104779
104779
|
let prevMoreIndented = false;
|
|
104780
104780
|
for (let i = 0; i < contentStart; ++i)
|
|
104781
104781
|
value += lines[i][0].slice(trimIndent) + "\n";
|
|
@@ -104792,24 +104792,24 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
104792
104792
|
indent = "";
|
|
104793
104793
|
}
|
|
104794
104794
|
if (type === Scalar.Scalar.BLOCK_LITERAL) {
|
|
104795
|
-
value +=
|
|
104796
|
-
|
|
104795
|
+
value += sep3 + indent.slice(trimIndent) + content;
|
|
104796
|
+
sep3 = "\n";
|
|
104797
104797
|
} else if (indent.length > trimIndent || content[0] === " ") {
|
|
104798
|
-
if (
|
|
104799
|
-
|
|
104800
|
-
else if (!prevMoreIndented &&
|
|
104801
|
-
|
|
104802
|
-
value +=
|
|
104803
|
-
|
|
104798
|
+
if (sep3 === " ")
|
|
104799
|
+
sep3 = "\n";
|
|
104800
|
+
else if (!prevMoreIndented && sep3 === "\n")
|
|
104801
|
+
sep3 = "\n\n";
|
|
104802
|
+
value += sep3 + indent.slice(trimIndent) + content;
|
|
104803
|
+
sep3 = "\n";
|
|
104804
104804
|
prevMoreIndented = true;
|
|
104805
104805
|
} else if (content === "") {
|
|
104806
|
-
if (
|
|
104806
|
+
if (sep3 === "\n")
|
|
104807
104807
|
value += "\n";
|
|
104808
104808
|
else
|
|
104809
|
-
|
|
104809
|
+
sep3 = "\n";
|
|
104810
104810
|
} else {
|
|
104811
|
-
value +=
|
|
104812
|
-
|
|
104811
|
+
value += sep3 + content;
|
|
104812
|
+
sep3 = " ";
|
|
104813
104813
|
prevMoreIndented = false;
|
|
104814
104814
|
}
|
|
104815
104815
|
}
|
|
@@ -104991,25 +104991,25 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
104991
104991
|
if (!match)
|
|
104992
104992
|
return source;
|
|
104993
104993
|
let res = match[1];
|
|
104994
|
-
let
|
|
104994
|
+
let sep3 = " ";
|
|
104995
104995
|
let pos = first.lastIndex;
|
|
104996
104996
|
line.lastIndex = pos;
|
|
104997
104997
|
while (match = line.exec(source)) {
|
|
104998
104998
|
if (match[1] === "") {
|
|
104999
|
-
if (
|
|
105000
|
-
res +=
|
|
104999
|
+
if (sep3 === "\n")
|
|
105000
|
+
res += sep3;
|
|
105001
105001
|
else
|
|
105002
|
-
|
|
105002
|
+
sep3 = "\n";
|
|
105003
105003
|
} else {
|
|
105004
|
-
res +=
|
|
105005
|
-
|
|
105004
|
+
res += sep3 + match[1];
|
|
105005
|
+
sep3 = " ";
|
|
105006
105006
|
}
|
|
105007
105007
|
pos = line.lastIndex;
|
|
105008
105008
|
}
|
|
105009
105009
|
const last = /[ \t]*(.*)/sy;
|
|
105010
105010
|
last.lastIndex = pos;
|
|
105011
105011
|
match = last.exec(source);
|
|
105012
|
-
return res +
|
|
105012
|
+
return res + sep3 + (match?.[1] ?? "");
|
|
105013
105013
|
}
|
|
105014
105014
|
function doubleQuotedValue(source, onError) {
|
|
105015
105015
|
let res = "";
|
|
@@ -105819,14 +105819,14 @@ var require_cst_stringify = __commonJS({
|
|
|
105819
105819
|
}
|
|
105820
105820
|
}
|
|
105821
105821
|
}
|
|
105822
|
-
function stringifyItem({ start, key, sep:
|
|
105822
|
+
function stringifyItem({ start, key, sep: sep3, value }) {
|
|
105823
105823
|
let res = "";
|
|
105824
105824
|
for (const st of start)
|
|
105825
105825
|
res += st.source;
|
|
105826
105826
|
if (key)
|
|
105827
105827
|
res += stringifyToken(key);
|
|
105828
|
-
if (
|
|
105829
|
-
for (const st of
|
|
105828
|
+
if (sep3)
|
|
105829
|
+
for (const st of sep3)
|
|
105830
105830
|
res += st.source;
|
|
105831
105831
|
if (value)
|
|
105832
105832
|
res += stringifyToken(value);
|
|
@@ -106993,18 +106993,18 @@ var require_parser2 = __commonJS({
|
|
|
106993
106993
|
if (this.type === "map-value-ind") {
|
|
106994
106994
|
const prev = getPrevProps(this.peek(2));
|
|
106995
106995
|
const start = getFirstKeyStartProps(prev);
|
|
106996
|
-
let
|
|
106996
|
+
let sep3;
|
|
106997
106997
|
if (scalar.end) {
|
|
106998
|
-
|
|
106999
|
-
|
|
106998
|
+
sep3 = scalar.end;
|
|
106999
|
+
sep3.push(this.sourceToken);
|
|
107000
107000
|
delete scalar.end;
|
|
107001
107001
|
} else
|
|
107002
|
-
|
|
107002
|
+
sep3 = [this.sourceToken];
|
|
107003
107003
|
const map = {
|
|
107004
107004
|
type: "block-map",
|
|
107005
107005
|
offset: scalar.offset,
|
|
107006
107006
|
indent: scalar.indent,
|
|
107007
|
-
items: [{ start, key: scalar, sep:
|
|
107007
|
+
items: [{ start, key: scalar, sep: sep3 }]
|
|
107008
107008
|
};
|
|
107009
107009
|
this.onKeyLine = true;
|
|
107010
107010
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -107157,15 +107157,15 @@ var require_parser2 = __commonJS({
|
|
|
107157
107157
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
107158
107158
|
const start2 = getFirstKeyStartProps(it.start);
|
|
107159
107159
|
const key = it.key;
|
|
107160
|
-
const
|
|
107161
|
-
|
|
107160
|
+
const sep3 = it.sep;
|
|
107161
|
+
sep3.push(this.sourceToken);
|
|
107162
107162
|
delete it.key;
|
|
107163
107163
|
delete it.sep;
|
|
107164
107164
|
this.stack.push({
|
|
107165
107165
|
type: "block-map",
|
|
107166
107166
|
offset: this.offset,
|
|
107167
107167
|
indent: this.indent,
|
|
107168
|
-
items: [{ start: start2, key, sep:
|
|
107168
|
+
items: [{ start: start2, key, sep: sep3 }]
|
|
107169
107169
|
});
|
|
107170
107170
|
} else if (start.length > 0) {
|
|
107171
107171
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -107359,13 +107359,13 @@ var require_parser2 = __commonJS({
|
|
|
107359
107359
|
const prev = getPrevProps(parent);
|
|
107360
107360
|
const start = getFirstKeyStartProps(prev);
|
|
107361
107361
|
fixFlowSeqItems(fc);
|
|
107362
|
-
const
|
|
107363
|
-
|
|
107362
|
+
const sep3 = fc.end.splice(1, fc.end.length);
|
|
107363
|
+
sep3.push(this.sourceToken);
|
|
107364
107364
|
const map = {
|
|
107365
107365
|
type: "block-map",
|
|
107366
107366
|
offset: fc.offset,
|
|
107367
107367
|
indent: fc.indent,
|
|
107368
|
-
items: [{ start, key: fc, sep:
|
|
107368
|
+
items: [{ start, key: fc, sep: sep3 }]
|
|
107369
107369
|
};
|
|
107370
107370
|
this.onKeyLine = true;
|
|
107371
107371
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -122882,8 +122882,8 @@ function writeFlowMapping(state, level, node) {
|
|
|
122882
122882
|
if (explicitPair) pairBuffer += "? ";
|
|
122883
122883
|
else if (state.quoteFlowKeys) pairBuffer += '"';
|
|
122884
122884
|
const valueText = writeNode(state, level, value, {});
|
|
122885
|
-
const
|
|
122886
|
-
pairBuffer += `${keyText}${state.quoteFlowKeys && !explicitPair ? '"' : ""}:${
|
|
122885
|
+
const sep3 = state.flowSkipColonSpace || valueText === "" ? "" : " ";
|
|
122886
|
+
pairBuffer += `${keyText}${state.quoteFlowKeys && !explicitPair ? '"' : ""}:${sep3}${valueText}`;
|
|
122887
122887
|
result += pairBuffer;
|
|
122888
122888
|
}
|
|
122889
122889
|
const pad = state.flowBracketPadding && result !== "" ? " " : "";
|
|
@@ -122980,8 +122980,8 @@ function writeNode(state, level, node, ctx) {
|
|
|
122980
122980
|
if (anchor !== null) props.push(anchor);
|
|
122981
122981
|
if (tag !== null) props.push(tag);
|
|
122982
122982
|
}
|
|
122983
|
-
const
|
|
122984
|
-
body = `${props.join(" ")}${
|
|
122983
|
+
const sep3 = body === "" || body.charCodeAt(0) === CHAR_LINE_FEED ? "" : " ";
|
|
122984
|
+
body = `${props.join(" ")}${sep3}${body}`;
|
|
122985
122985
|
}
|
|
122986
122986
|
return body;
|
|
122987
122987
|
}
|
|
@@ -123026,8 +123026,8 @@ function present(documents, options) {
|
|
|
123026
123026
|
block: true,
|
|
123027
123027
|
compact: true
|
|
123028
123028
|
});
|
|
123029
|
-
const
|
|
123030
|
-
result += `---${
|
|
123029
|
+
const sep3 = body === "" ? "" : hasDirectives || rootStartsOwnLine(doc.contents) ? "\n" : " ";
|
|
123030
|
+
result += `---${sep3}${body}
|
|
123031
123031
|
`;
|
|
123032
123032
|
} else result += writeNode(state, 0, doc.contents, {
|
|
123033
123033
|
block: true,
|
|
@@ -123152,9 +123152,47 @@ function structuredCloneSafe(value) {
|
|
|
123152
123152
|
if (typeof structuredClone === "function") return structuredClone(value);
|
|
123153
123153
|
return JSON.parse(JSON.stringify(value));
|
|
123154
123154
|
}
|
|
123155
|
+
async function listFilesRelative(dir, base) {
|
|
123156
|
+
let entries;
|
|
123157
|
+
try {
|
|
123158
|
+
entries = await fs2.readdir(dir, { withFileTypes: true });
|
|
123159
|
+
} catch {
|
|
123160
|
+
return [];
|
|
123161
|
+
}
|
|
123162
|
+
const out = [];
|
|
123163
|
+
for (const entry of entries) {
|
|
123164
|
+
const abs = path.join(dir, entry.name);
|
|
123165
|
+
if (entry.isDirectory()) {
|
|
123166
|
+
out.push(...await listFilesRelative(abs, base));
|
|
123167
|
+
} else if (entry.isFile()) {
|
|
123168
|
+
out.push(path.relative(base, abs).split(path.sep).join("/"));
|
|
123169
|
+
}
|
|
123170
|
+
}
|
|
123171
|
+
return out;
|
|
123172
|
+
}
|
|
123173
|
+
async function pruneEmptyDirs(dir) {
|
|
123174
|
+
let entries;
|
|
123175
|
+
try {
|
|
123176
|
+
entries = await fs2.readdir(dir, { withFileTypes: true });
|
|
123177
|
+
} catch {
|
|
123178
|
+
return;
|
|
123179
|
+
}
|
|
123180
|
+
for (const entry of entries) {
|
|
123181
|
+
if (entry.isDirectory()) {
|
|
123182
|
+
const child = path.join(dir, entry.name);
|
|
123183
|
+
await pruneEmptyDirs(child);
|
|
123184
|
+
try {
|
|
123185
|
+
await fs2.rmdir(child);
|
|
123186
|
+
} catch {
|
|
123187
|
+
}
|
|
123188
|
+
}
|
|
123189
|
+
}
|
|
123190
|
+
}
|
|
123155
123191
|
async function writeSplitCollection(v32, outputDir) {
|
|
123156
123192
|
const { files, rootPath } = await (0, import_v32.splitCollection)(v32);
|
|
123157
123193
|
await fs2.mkdir(outputDir, { recursive: true });
|
|
123194
|
+
const preexisting = new Set(await listFilesRelative(outputDir, outputDir));
|
|
123195
|
+
const written = /* @__PURE__ */ new Set();
|
|
123158
123196
|
for (const file of files) {
|
|
123159
123197
|
let rel = file.path;
|
|
123160
123198
|
if (rootPath && rel.startsWith(rootPath)) {
|
|
@@ -123165,7 +123203,13 @@ async function writeSplitCollection(v32, outputDir) {
|
|
|
123165
123203
|
const dest = path.join(outputDir, rel);
|
|
123166
123204
|
await fs2.mkdir(path.dirname(dest), { recursive: true });
|
|
123167
123205
|
await fs2.writeFile(dest, file.content, "utf8");
|
|
123206
|
+
written.add(rel.split(path.sep).join("/"));
|
|
123207
|
+
}
|
|
123208
|
+
for (const rel of preexisting) {
|
|
123209
|
+
if (written.has(rel)) continue;
|
|
123210
|
+
await fs2.rm(path.join(outputDir, rel), { force: true });
|
|
123168
123211
|
}
|
|
123212
|
+
await pruneEmptyDirs(outputDir);
|
|
123169
123213
|
}
|
|
123170
123214
|
|
|
123171
123215
|
// src/lib/postman/base-urls.ts
|
|
@@ -126714,8 +126758,8 @@ function assertPathWithinCwd(targetPath, fieldName) {
|
|
|
126714
126758
|
}
|
|
126715
126759
|
const base = (0, import_node_fs3.realpathSync)(process.cwd());
|
|
126716
126760
|
const resolved = path3.resolve(base, rawPath);
|
|
126717
|
-
const
|
|
126718
|
-
if (
|
|
126761
|
+
const relative3 = path3.relative(base, resolved);
|
|
126762
|
+
if (relative3.startsWith("..") || path3.isAbsolute(relative3)) {
|
|
126719
126763
|
throw new Error(`${fieldName} must stay within the repository root; received ${targetPath}`);
|
|
126720
126764
|
}
|
|
126721
126765
|
let existingPath = resolved;
|
|
@@ -127574,8 +127618,8 @@ async function writeOptionalFile(filePath, content) {
|
|
|
127574
127618
|
}
|
|
127575
127619
|
const workspaceRoot = import_node_path3.default.resolve(process.cwd());
|
|
127576
127620
|
const resolved = import_node_path3.default.resolve(workspaceRoot, filePath);
|
|
127577
|
-
const
|
|
127578
|
-
if (
|
|
127621
|
+
const relative3 = import_node_path3.default.relative(workspaceRoot, resolved);
|
|
127622
|
+
if (relative3.startsWith("..") || import_node_path3.default.isAbsolute(relative3)) {
|
|
127579
127623
|
throw new Error(`Output path must stay within workspace: ${filePath}`);
|
|
127580
127624
|
}
|
|
127581
127625
|
await (0, import_promises.mkdir)(import_node_path3.default.dirname(resolved), { recursive: true });
|
package/dist/index.cjs
CHANGED
|
@@ -58521,10 +58521,10 @@ var require_internet = __commonJS({
|
|
|
58521
58521
|
}
|
|
58522
58522
|
}
|
|
58523
58523
|
};
|
|
58524
|
-
self2.mac = function(
|
|
58524
|
+
self2.mac = function(sep5) {
|
|
58525
58525
|
var i, mac = "", validSep = ":";
|
|
58526
|
-
if (["-", ""].indexOf(
|
|
58527
|
-
validSep =
|
|
58526
|
+
if (["-", ""].indexOf(sep5) !== -1) {
|
|
58527
|
+
validSep = sep5;
|
|
58528
58528
|
}
|
|
58529
58529
|
for (i = 0; i < 12; i++) {
|
|
58530
58530
|
mac += faker.datatype.number(15).toString(16);
|
|
@@ -104276,10 +104276,10 @@ var require_resolve_block_map = __commonJS({
|
|
|
104276
104276
|
let offset = bm.offset;
|
|
104277
104277
|
let commentEnd = null;
|
|
104278
104278
|
for (const collItem of bm.items) {
|
|
104279
|
-
const { start, key, sep:
|
|
104279
|
+
const { start, key, sep: sep5, value } = collItem;
|
|
104280
104280
|
const keyProps = resolveProps.resolveProps(start, {
|
|
104281
104281
|
indicator: "explicit-key-ind",
|
|
104282
|
-
next: key ??
|
|
104282
|
+
next: key ?? sep5?.[0],
|
|
104283
104283
|
offset,
|
|
104284
104284
|
onError,
|
|
104285
104285
|
parentIndent: bm.indent,
|
|
@@ -104293,7 +104293,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
104293
104293
|
else if ("indent" in key && key.indent !== bm.indent)
|
|
104294
104294
|
onError(offset, "BAD_INDENT", startColMsg);
|
|
104295
104295
|
}
|
|
104296
|
-
if (!keyProps.anchor && !keyProps.tag && !
|
|
104296
|
+
if (!keyProps.anchor && !keyProps.tag && !sep5) {
|
|
104297
104297
|
commentEnd = keyProps.end;
|
|
104298
104298
|
if (keyProps.comment) {
|
|
104299
104299
|
if (map.comment)
|
|
@@ -104317,7 +104317,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
104317
104317
|
ctx.atKey = false;
|
|
104318
104318
|
if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
|
|
104319
104319
|
onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
104320
|
-
const valueProps = resolveProps.resolveProps(
|
|
104320
|
+
const valueProps = resolveProps.resolveProps(sep5 ?? [], {
|
|
104321
104321
|
indicator: "map-value-ind",
|
|
104322
104322
|
next: value,
|
|
104323
104323
|
offset: keyNode.range[2],
|
|
@@ -104333,7 +104333,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
104333
104333
|
if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
|
|
104334
104334
|
onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
|
|
104335
104335
|
}
|
|
104336
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset,
|
|
104336
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep5, null, valueProps, onError);
|
|
104337
104337
|
if (ctx.schema.compat)
|
|
104338
104338
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
|
|
104339
104339
|
offset = valueNode.range[2];
|
|
@@ -104424,7 +104424,7 @@ var require_resolve_end = __commonJS({
|
|
|
104424
104424
|
let comment = "";
|
|
104425
104425
|
if (end) {
|
|
104426
104426
|
let hasSpace = false;
|
|
104427
|
-
let
|
|
104427
|
+
let sep5 = "";
|
|
104428
104428
|
for (const token of end) {
|
|
104429
104429
|
const { source, type } = token;
|
|
104430
104430
|
switch (type) {
|
|
@@ -104438,13 +104438,13 @@ var require_resolve_end = __commonJS({
|
|
|
104438
104438
|
if (!comment)
|
|
104439
104439
|
comment = cb;
|
|
104440
104440
|
else
|
|
104441
|
-
comment +=
|
|
104442
|
-
|
|
104441
|
+
comment += sep5 + cb;
|
|
104442
|
+
sep5 = "";
|
|
104443
104443
|
break;
|
|
104444
104444
|
}
|
|
104445
104445
|
case "newline":
|
|
104446
104446
|
if (comment)
|
|
104447
|
-
|
|
104447
|
+
sep5 += source;
|
|
104448
104448
|
hasSpace = true;
|
|
104449
104449
|
break;
|
|
104450
104450
|
default:
|
|
@@ -104487,18 +104487,18 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
104487
104487
|
let offset = fc.offset + fc.start.source.length;
|
|
104488
104488
|
for (let i = 0; i < fc.items.length; ++i) {
|
|
104489
104489
|
const collItem = fc.items[i];
|
|
104490
|
-
const { start, key, sep:
|
|
104490
|
+
const { start, key, sep: sep5, value } = collItem;
|
|
104491
104491
|
const props = resolveProps.resolveProps(start, {
|
|
104492
104492
|
flow: fcName,
|
|
104493
104493
|
indicator: "explicit-key-ind",
|
|
104494
|
-
next: key ??
|
|
104494
|
+
next: key ?? sep5?.[0],
|
|
104495
104495
|
offset,
|
|
104496
104496
|
onError,
|
|
104497
104497
|
parentIndent: fc.indent,
|
|
104498
104498
|
startOnNewline: false
|
|
104499
104499
|
});
|
|
104500
104500
|
if (!props.found) {
|
|
104501
|
-
if (!props.anchor && !props.tag && !
|
|
104501
|
+
if (!props.anchor && !props.tag && !sep5 && !value) {
|
|
104502
104502
|
if (i === 0 && props.comma)
|
|
104503
104503
|
onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
|
|
104504
104504
|
else if (i < fc.items.length - 1)
|
|
@@ -104552,8 +104552,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
104552
104552
|
}
|
|
104553
104553
|
}
|
|
104554
104554
|
}
|
|
104555
|
-
if (!isMap && !
|
|
104556
|
-
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end,
|
|
104555
|
+
if (!isMap && !sep5 && !props.found) {
|
|
104556
|
+
const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep5, null, props, onError);
|
|
104557
104557
|
coll.items.push(valueNode);
|
|
104558
104558
|
offset = valueNode.range[2];
|
|
104559
104559
|
if (isBlock(value))
|
|
@@ -104565,7 +104565,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
104565
104565
|
if (isBlock(key))
|
|
104566
104566
|
onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
104567
104567
|
ctx.atKey = false;
|
|
104568
|
-
const valueProps = resolveProps.resolveProps(
|
|
104568
|
+
const valueProps = resolveProps.resolveProps(sep5 ?? [], {
|
|
104569
104569
|
flow: fcName,
|
|
104570
104570
|
indicator: "map-value-ind",
|
|
104571
104571
|
next: value,
|
|
@@ -104576,8 +104576,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
104576
104576
|
});
|
|
104577
104577
|
if (valueProps.found) {
|
|
104578
104578
|
if (!isMap && !props.found && ctx.options.strict) {
|
|
104579
|
-
if (
|
|
104580
|
-
for (const st of
|
|
104579
|
+
if (sep5)
|
|
104580
|
+
for (const st of sep5) {
|
|
104581
104581
|
if (st === valueProps.found)
|
|
104582
104582
|
break;
|
|
104583
104583
|
if (st.type === "newline") {
|
|
@@ -104594,7 +104594,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
104594
104594
|
else
|
|
104595
104595
|
onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
104596
104596
|
}
|
|
104597
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end,
|
|
104597
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep5, null, valueProps, onError) : null;
|
|
104598
104598
|
if (valueNode) {
|
|
104599
104599
|
if (isBlock(value))
|
|
104600
104600
|
onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
@@ -104774,7 +104774,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
104774
104774
|
chompStart = i + 1;
|
|
104775
104775
|
}
|
|
104776
104776
|
let value = "";
|
|
104777
|
-
let
|
|
104777
|
+
let sep5 = "";
|
|
104778
104778
|
let prevMoreIndented = false;
|
|
104779
104779
|
for (let i = 0; i < contentStart; ++i)
|
|
104780
104780
|
value += lines[i][0].slice(trimIndent) + "\n";
|
|
@@ -104791,24 +104791,24 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
104791
104791
|
indent = "";
|
|
104792
104792
|
}
|
|
104793
104793
|
if (type === Scalar.Scalar.BLOCK_LITERAL) {
|
|
104794
|
-
value +=
|
|
104795
|
-
|
|
104794
|
+
value += sep5 + indent.slice(trimIndent) + content;
|
|
104795
|
+
sep5 = "\n";
|
|
104796
104796
|
} else if (indent.length > trimIndent || content[0] === " ") {
|
|
104797
|
-
if (
|
|
104798
|
-
|
|
104799
|
-
else if (!prevMoreIndented &&
|
|
104800
|
-
|
|
104801
|
-
value +=
|
|
104802
|
-
|
|
104797
|
+
if (sep5 === " ")
|
|
104798
|
+
sep5 = "\n";
|
|
104799
|
+
else if (!prevMoreIndented && sep5 === "\n")
|
|
104800
|
+
sep5 = "\n\n";
|
|
104801
|
+
value += sep5 + indent.slice(trimIndent) + content;
|
|
104802
|
+
sep5 = "\n";
|
|
104803
104803
|
prevMoreIndented = true;
|
|
104804
104804
|
} else if (content === "") {
|
|
104805
|
-
if (
|
|
104805
|
+
if (sep5 === "\n")
|
|
104806
104806
|
value += "\n";
|
|
104807
104807
|
else
|
|
104808
|
-
|
|
104808
|
+
sep5 = "\n";
|
|
104809
104809
|
} else {
|
|
104810
|
-
value +=
|
|
104811
|
-
|
|
104810
|
+
value += sep5 + content;
|
|
104811
|
+
sep5 = " ";
|
|
104812
104812
|
prevMoreIndented = false;
|
|
104813
104813
|
}
|
|
104814
104814
|
}
|
|
@@ -104990,25 +104990,25 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
104990
104990
|
if (!match)
|
|
104991
104991
|
return source;
|
|
104992
104992
|
let res = match[1];
|
|
104993
|
-
let
|
|
104993
|
+
let sep5 = " ";
|
|
104994
104994
|
let pos = first.lastIndex;
|
|
104995
104995
|
line.lastIndex = pos;
|
|
104996
104996
|
while (match = line.exec(source)) {
|
|
104997
104997
|
if (match[1] === "") {
|
|
104998
|
-
if (
|
|
104999
|
-
res +=
|
|
104998
|
+
if (sep5 === "\n")
|
|
104999
|
+
res += sep5;
|
|
105000
105000
|
else
|
|
105001
|
-
|
|
105001
|
+
sep5 = "\n";
|
|
105002
105002
|
} else {
|
|
105003
|
-
res +=
|
|
105004
|
-
|
|
105003
|
+
res += sep5 + match[1];
|
|
105004
|
+
sep5 = " ";
|
|
105005
105005
|
}
|
|
105006
105006
|
pos = line.lastIndex;
|
|
105007
105007
|
}
|
|
105008
105008
|
const last = /[ \t]*(.*)/sy;
|
|
105009
105009
|
last.lastIndex = pos;
|
|
105010
105010
|
match = last.exec(source);
|
|
105011
|
-
return res +
|
|
105011
|
+
return res + sep5 + (match?.[1] ?? "");
|
|
105012
105012
|
}
|
|
105013
105013
|
function doubleQuotedValue(source, onError) {
|
|
105014
105014
|
let res = "";
|
|
@@ -105818,14 +105818,14 @@ var require_cst_stringify = __commonJS({
|
|
|
105818
105818
|
}
|
|
105819
105819
|
}
|
|
105820
105820
|
}
|
|
105821
|
-
function stringifyItem({ start, key, sep:
|
|
105821
|
+
function stringifyItem({ start, key, sep: sep5, value }) {
|
|
105822
105822
|
let res = "";
|
|
105823
105823
|
for (const st of start)
|
|
105824
105824
|
res += st.source;
|
|
105825
105825
|
if (key)
|
|
105826
105826
|
res += stringifyToken(key);
|
|
105827
|
-
if (
|
|
105828
|
-
for (const st of
|
|
105827
|
+
if (sep5)
|
|
105828
|
+
for (const st of sep5)
|
|
105829
105829
|
res += st.source;
|
|
105830
105830
|
if (value)
|
|
105831
105831
|
res += stringifyToken(value);
|
|
@@ -106992,18 +106992,18 @@ var require_parser2 = __commonJS({
|
|
|
106992
106992
|
if (this.type === "map-value-ind") {
|
|
106993
106993
|
const prev = getPrevProps(this.peek(2));
|
|
106994
106994
|
const start = getFirstKeyStartProps(prev);
|
|
106995
|
-
let
|
|
106995
|
+
let sep5;
|
|
106996
106996
|
if (scalar.end) {
|
|
106997
|
-
|
|
106998
|
-
|
|
106997
|
+
sep5 = scalar.end;
|
|
106998
|
+
sep5.push(this.sourceToken);
|
|
106999
106999
|
delete scalar.end;
|
|
107000
107000
|
} else
|
|
107001
|
-
|
|
107001
|
+
sep5 = [this.sourceToken];
|
|
107002
107002
|
const map = {
|
|
107003
107003
|
type: "block-map",
|
|
107004
107004
|
offset: scalar.offset,
|
|
107005
107005
|
indent: scalar.indent,
|
|
107006
|
-
items: [{ start, key: scalar, sep:
|
|
107006
|
+
items: [{ start, key: scalar, sep: sep5 }]
|
|
107007
107007
|
};
|
|
107008
107008
|
this.onKeyLine = true;
|
|
107009
107009
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -107156,15 +107156,15 @@ var require_parser2 = __commonJS({
|
|
|
107156
107156
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
107157
107157
|
const start2 = getFirstKeyStartProps(it.start);
|
|
107158
107158
|
const key = it.key;
|
|
107159
|
-
const
|
|
107160
|
-
|
|
107159
|
+
const sep5 = it.sep;
|
|
107160
|
+
sep5.push(this.sourceToken);
|
|
107161
107161
|
delete it.key;
|
|
107162
107162
|
delete it.sep;
|
|
107163
107163
|
this.stack.push({
|
|
107164
107164
|
type: "block-map",
|
|
107165
107165
|
offset: this.offset,
|
|
107166
107166
|
indent: this.indent,
|
|
107167
|
-
items: [{ start: start2, key, sep:
|
|
107167
|
+
items: [{ start: start2, key, sep: sep5 }]
|
|
107168
107168
|
});
|
|
107169
107169
|
} else if (start.length > 0) {
|
|
107170
107170
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -107358,13 +107358,13 @@ var require_parser2 = __commonJS({
|
|
|
107358
107358
|
const prev = getPrevProps(parent);
|
|
107359
107359
|
const start = getFirstKeyStartProps(prev);
|
|
107360
107360
|
fixFlowSeqItems(fc);
|
|
107361
|
-
const
|
|
107362
|
-
|
|
107361
|
+
const sep5 = fc.end.splice(1, fc.end.length);
|
|
107362
|
+
sep5.push(this.sourceToken);
|
|
107363
107363
|
const map = {
|
|
107364
107364
|
type: "block-map",
|
|
107365
107365
|
offset: fc.offset,
|
|
107366
107366
|
indent: fc.indent,
|
|
107367
|
-
items: [{ start, key: fc, sep:
|
|
107367
|
+
items: [{ start, key: fc, sep: sep5 }]
|
|
107368
107368
|
};
|
|
107369
107369
|
this.onKeyLine = true;
|
|
107370
107370
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -124794,8 +124794,8 @@ function writeFlowMapping(state, level, node) {
|
|
|
124794
124794
|
if (explicitPair) pairBuffer += "? ";
|
|
124795
124795
|
else if (state.quoteFlowKeys) pairBuffer += '"';
|
|
124796
124796
|
const valueText = writeNode(state, level, value, {});
|
|
124797
|
-
const
|
|
124798
|
-
pairBuffer += `${keyText}${state.quoteFlowKeys && !explicitPair ? '"' : ""}:${
|
|
124797
|
+
const sep5 = state.flowSkipColonSpace || valueText === "" ? "" : " ";
|
|
124798
|
+
pairBuffer += `${keyText}${state.quoteFlowKeys && !explicitPair ? '"' : ""}:${sep5}${valueText}`;
|
|
124799
124799
|
result += pairBuffer;
|
|
124800
124800
|
}
|
|
124801
124801
|
const pad = state.flowBracketPadding && result !== "" ? " " : "";
|
|
@@ -124892,8 +124892,8 @@ function writeNode(state, level, node, ctx) {
|
|
|
124892
124892
|
if (anchor !== null) props.push(anchor);
|
|
124893
124893
|
if (tag !== null) props.push(tag);
|
|
124894
124894
|
}
|
|
124895
|
-
const
|
|
124896
|
-
body = `${props.join(" ")}${
|
|
124895
|
+
const sep5 = body === "" || body.charCodeAt(0) === CHAR_LINE_FEED ? "" : " ";
|
|
124896
|
+
body = `${props.join(" ")}${sep5}${body}`;
|
|
124897
124897
|
}
|
|
124898
124898
|
return body;
|
|
124899
124899
|
}
|
|
@@ -124938,8 +124938,8 @@ function present(documents, options) {
|
|
|
124938
124938
|
block: true,
|
|
124939
124939
|
compact: true
|
|
124940
124940
|
});
|
|
124941
|
-
const
|
|
124942
|
-
result += `---${
|
|
124941
|
+
const sep5 = body === "" ? "" : hasDirectives || rootStartsOwnLine(doc.contents) ? "\n" : " ";
|
|
124942
|
+
result += `---${sep5}${body}
|
|
124943
124943
|
`;
|
|
124944
124944
|
} else result += writeNode(state, 0, doc.contents, {
|
|
124945
124945
|
block: true,
|
|
@@ -125064,9 +125064,47 @@ function structuredCloneSafe(value) {
|
|
|
125064
125064
|
if (typeof structuredClone === "function") return structuredClone(value);
|
|
125065
125065
|
return JSON.parse(JSON.stringify(value));
|
|
125066
125066
|
}
|
|
125067
|
+
async function listFilesRelative(dir, base) {
|
|
125068
|
+
let entries;
|
|
125069
|
+
try {
|
|
125070
|
+
entries = await fs3.readdir(dir, { withFileTypes: true });
|
|
125071
|
+
} catch {
|
|
125072
|
+
return [];
|
|
125073
|
+
}
|
|
125074
|
+
const out = [];
|
|
125075
|
+
for (const entry of entries) {
|
|
125076
|
+
const abs = path6.join(dir, entry.name);
|
|
125077
|
+
if (entry.isDirectory()) {
|
|
125078
|
+
out.push(...await listFilesRelative(abs, base));
|
|
125079
|
+
} else if (entry.isFile()) {
|
|
125080
|
+
out.push(path6.relative(base, abs).split(path6.sep).join("/"));
|
|
125081
|
+
}
|
|
125082
|
+
}
|
|
125083
|
+
return out;
|
|
125084
|
+
}
|
|
125085
|
+
async function pruneEmptyDirs(dir) {
|
|
125086
|
+
let entries;
|
|
125087
|
+
try {
|
|
125088
|
+
entries = await fs3.readdir(dir, { withFileTypes: true });
|
|
125089
|
+
} catch {
|
|
125090
|
+
return;
|
|
125091
|
+
}
|
|
125092
|
+
for (const entry of entries) {
|
|
125093
|
+
if (entry.isDirectory()) {
|
|
125094
|
+
const child2 = path6.join(dir, entry.name);
|
|
125095
|
+
await pruneEmptyDirs(child2);
|
|
125096
|
+
try {
|
|
125097
|
+
await fs3.rmdir(child2);
|
|
125098
|
+
} catch {
|
|
125099
|
+
}
|
|
125100
|
+
}
|
|
125101
|
+
}
|
|
125102
|
+
}
|
|
125067
125103
|
async function writeSplitCollection(v32, outputDir) {
|
|
125068
125104
|
const { files, rootPath } = await (0, import_v32.splitCollection)(v32);
|
|
125069
125105
|
await fs3.mkdir(outputDir, { recursive: true });
|
|
125106
|
+
const preexisting = new Set(await listFilesRelative(outputDir, outputDir));
|
|
125107
|
+
const written = /* @__PURE__ */ new Set();
|
|
125070
125108
|
for (const file of files) {
|
|
125071
125109
|
let rel = file.path;
|
|
125072
125110
|
if (rootPath && rel.startsWith(rootPath)) {
|
|
@@ -125077,7 +125115,13 @@ async function writeSplitCollection(v32, outputDir) {
|
|
|
125077
125115
|
const dest = path6.join(outputDir, rel);
|
|
125078
125116
|
await fs3.mkdir(path6.dirname(dest), { recursive: true });
|
|
125079
125117
|
await fs3.writeFile(dest, file.content, "utf8");
|
|
125118
|
+
written.add(rel.split(path6.sep).join("/"));
|
|
125119
|
+
}
|
|
125120
|
+
for (const rel of preexisting) {
|
|
125121
|
+
if (written.has(rel)) continue;
|
|
125122
|
+
await fs3.rm(path6.join(outputDir, rel), { force: true });
|
|
125080
125123
|
}
|
|
125124
|
+
await pruneEmptyDirs(outputDir);
|
|
125081
125125
|
}
|
|
125082
125126
|
|
|
125083
125127
|
// src/lib/postman/base-urls.ts
|
|
@@ -128815,8 +128859,8 @@ function assertPathWithinCwd(targetPath, fieldName) {
|
|
|
128815
128859
|
}
|
|
128816
128860
|
const base = (0, import_node_fs3.realpathSync)(process.cwd());
|
|
128817
128861
|
const resolved = path8.resolve(base, rawPath);
|
|
128818
|
-
const
|
|
128819
|
-
if (
|
|
128862
|
+
const relative4 = path8.relative(base, resolved);
|
|
128863
|
+
if (relative4.startsWith("..") || path8.isAbsolute(relative4)) {
|
|
128820
128864
|
throw new Error(`${fieldName} must stay within the repository root; received ${targetPath}`);
|
|
128821
128865
|
}
|
|
128822
128866
|
let existingPath = resolved;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postman-cse/onboarding-repo-sync",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"description": "Postman repo sync GitHub Action.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -16,8 +16,10 @@
|
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
18
|
"prepare": "git config core.hooksPath .githooks",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
19
|
+
"bundle": "rm -rf dist && esbuild src/index.ts --bundle --platform=node --target=node24 --format=cjs --outfile=dist/index.cjs && esbuild src/main.ts --bundle --platform=node --target=node24 --format=cjs --outfile=dist/action.cjs && esbuild src/cli.ts --bundle --platform=node --target=node24 --format=cjs --banner:js='#!/usr/bin/env node' --outfile=dist/cli.cjs && chmod 755 dist/cli.cjs",
|
|
20
|
+
"build": "npm run typecheck && npm run bundle",
|
|
21
|
+
"verify:dist:assert": "git diff --ignore-space-at-eol --text --exit-code -- dist && node scripts/verify-dist-artifact.mjs",
|
|
22
|
+
"verify:dist": "npm run build && npm run verify:dist:assert",
|
|
21
23
|
"docs:tables": "node scripts/render-action-tables.mjs",
|
|
22
24
|
"lint": "eslint .",
|
|
23
25
|
"lint:fix": "eslint . --fix",
|