@voidzero-dev/vite-plus-core 0.2.8 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/LICENSE +30 -1
  2. package/dist/rolldown/cli.mjs +14 -10
  3. package/dist/rolldown/config.d.mts +1 -1
  4. package/dist/rolldown/config.mjs +2 -2
  5. package/dist/rolldown/experimental-index.d.mts +2 -2
  6. package/dist/rolldown/experimental-index.mjs +8 -8
  7. package/dist/rolldown/filter-index.d.mts +1 -1
  8. package/dist/rolldown/index.d.mts +1 -1
  9. package/dist/rolldown/index.mjs +4 -4
  10. package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
  11. package/dist/rolldown/parallel-plugin.d.mts +1 -1
  12. package/dist/rolldown/parse-ast-index.mjs +1 -1
  13. package/dist/rolldown/plugins-index.d.mts +2 -2
  14. package/dist/rolldown/plugins-index.mjs +2 -2
  15. package/dist/rolldown/shared/binding-CKyeQZen.mjs +673 -0
  16. package/dist/rolldown/shared/{bindingify-input-options-B03y7DfJ.mjs → bindingify-input-options-44iPAymO.mjs} +6 -10
  17. package/dist/rolldown/shared/{constructors-COwFYQna.mjs → constructors-6Zc-JFd7.mjs} +1 -1
  18. package/dist/rolldown/shared/{constructors-ALilxAii.d.mts → constructors-XaIbWpwJ.d.mts} +1 -1
  19. package/dist/rolldown/shared/{create-bundler-option-B-tSTZRt.mjs → create-bundler-option-e1FU0w0P.mjs} +3 -3
  20. package/dist/rolldown/shared/{define-config-DSMNXceb.d.mts → define-config-DVsXPNaU.d.mts} +0 -4
  21. package/dist/rolldown/shared/{error-nLggAzpQ.mjs → error-BzLGqhSQ.mjs} +1 -1
  22. package/dist/rolldown/shared/{load-config-O4G7NVNA.mjs → load-config-C6QXSnoS.mjs} +1 -1
  23. package/dist/rolldown/shared/{normalize-string-or-regex-Cj-DgIV1.mjs → normalize-string-or-regex-DYjJ67tj.mjs} +1 -1
  24. package/dist/rolldown/shared/{parse-CQfUbVuN.mjs → parse-uDDyc1el.mjs} +2 -2
  25. package/dist/rolldown/shared/{resolve-tsconfig-CE3HNSOK.mjs → resolve-tsconfig-Bcd82vVT.mjs} +2 -2
  26. package/dist/rolldown/shared/{rolldown-qV_fUwyM.mjs → rolldown-CCbQNGZt.mjs} +4 -4
  27. package/dist/rolldown/shared/{watch-BNIsji74.mjs → watch-vuOCmvFs.mjs} +5 -5
  28. package/dist/rolldown/utils-index.d.mts +1 -1
  29. package/dist/rolldown/utils-index.mjs +15 -13
  30. package/dist/tsdown/{build-D_enfyvD-X5SFXZZc.js → build-D_enfyvD-Dg1eKRD4.js} +20 -16
  31. package/dist/tsdown/{debug-CKcBYQLP-avlAPNcV.js → debug-CKcBYQLP-C3NhYhrk.js} +3 -3
  32. package/dist/tsdown/{detect-DGhJGEqb-CGd2brAW.js → detect-DGhJGEqb-6CTf16BW.js} +1 -1
  33. package/dist/tsdown/{dist-BZO8q3c0.js → dist-DyXLnzyh.js} +4 -4
  34. package/dist/tsdown/index-types.d.ts +3 -3
  35. package/dist/tsdown/index.js +4 -4
  36. package/dist/tsdown/internal-DKworeK4.js +3 -0
  37. package/dist/tsdown/{main-Jz_9T-KA.js → main-DiierkER.js} +210 -196
  38. package/dist/tsdown/npm_entry_picomatch.cjs +10 -6
  39. package/dist/tsdown/npm_entry_tree-kill.cjs +4 -2
  40. package/dist/tsdown/{resolver-cwLsPb2o-BqQjnCbF.js → resolver-cwLsPb2o-Dk4xdAGE.js} +2 -2
  41. package/dist/tsdown/run.js +6 -6
  42. package/dist/tsdown/{src-D5keKqGd.js → src-drVPfX63.js} +1 -1
  43. package/dist/tsdown/{target-Bab3CUeB-CERZYTwS.js → target-Bab3CUeB-DQ0pKhCv.js} +5 -5
  44. package/dist/tsdown/{tsc-DmzrnJwy.js → tsc-JnMl2z7d.js} +3 -3
  45. package/dist/tsdown/tsdown-css.js +4 -4
  46. package/dist/tsdown/tsdown-exe.js +4 -4
  47. package/dist/vite/client/bundledDevClient.mjs +330 -14
  48. package/dist/vite/client/client.mjs +20 -14
  49. package/dist/vite/node/chunks/build.js +51 -45
  50. package/dist/vite/node/chunks/dist.js +36 -29
  51. package/dist/vite/node/chunks/dist2.js +193 -149
  52. package/dist/vite/node/chunks/node.js +931 -793
  53. package/dist/vite/node/chunks/postcss-import.js +10 -9
  54. package/dist/vite/node/index.d.ts +7 -5
  55. package/dist/vite/node/module-runner.js +23 -17
  56. package/package.json +26 -20
  57. package/dist/rolldown/shared/binding-DwUQWZOo.mjs +0 -662
  58. package/dist/tsdown/internal-DyaNxVWW.js +0 -3
@@ -227,9 +227,10 @@ var require_visit = /* @__PURE__ */ __commonJSMin(((exports) => {
227
227
  function replaceNode(key, path, node) {
228
228
  const parent = path[path.length - 1];
229
229
  if (identity.isCollection(parent)) parent.items[key] = node;
230
- else if (identity.isPair(parent)) if (key === "key") parent.key = node;
231
- else parent.value = node;
232
- else if (identity.isDocument(parent)) parent.contents = node;
230
+ else if (identity.isPair(parent)) {
231
+ if (key === "key") parent.key = node;
232
+ else parent.value = node;
233
+ } else if (identity.isDocument(parent)) parent.contents = node;
233
234
  else {
234
235
  const pt = identity.isAlias(parent) ? "alias" : "scalar";
235
236
  throw new Error(`Cannot replace node with ${pt} parent`);
@@ -480,30 +481,32 @@ var require_applyReviver = /* @__PURE__ */ __commonJSMin(((exports) => {
480
481
  * Includes extensions for handling Map and Set objects.
481
482
  */
482
483
  function applyReviver(reviver, obj, key, val) {
483
- if (val && typeof val === "object") if (Array.isArray(val)) for (let i = 0, len = val.length; i < len; ++i) {
484
- const v0 = val[i];
485
- const v1 = applyReviver(reviver, val, String(i), v0);
486
- if (v1 === void 0) delete val[i];
487
- else if (v1 !== v0) val[i] = v1;
488
- }
489
- else if (val instanceof Map) for (const k of Array.from(val.keys())) {
490
- const v0 = val.get(k);
491
- const v1 = applyReviver(reviver, val, k, v0);
492
- if (v1 === void 0) val.delete(k);
493
- else if (v1 !== v0) val.set(k, v1);
494
- }
495
- else if (val instanceof Set) for (const v0 of Array.from(val)) {
496
- const v1 = applyReviver(reviver, val, v0, v0);
497
- if (v1 === void 0) val.delete(v0);
498
- else if (v1 !== v0) {
499
- val.delete(v0);
500
- val.add(v1);
501
- }
502
- }
503
- else for (const [k, v0] of Object.entries(val)) {
504
- const v1 = applyReviver(reviver, val, k, v0);
505
- if (v1 === void 0) delete val[k];
506
- else if (v1 !== v0) val[k] = v1;
484
+ if (val && typeof val === "object") {
485
+ if (Array.isArray(val)) for (let i = 0, len = val.length; i < len; ++i) {
486
+ const v0 = val[i];
487
+ const v1 = applyReviver(reviver, val, String(i), v0);
488
+ if (v1 === void 0) delete val[i];
489
+ else if (v1 !== v0) val[i] = v1;
490
+ }
491
+ else if (val instanceof Map) for (const k of Array.from(val.keys())) {
492
+ const v0 = val.get(k);
493
+ const v1 = applyReviver(reviver, val, k, v0);
494
+ if (v1 === void 0) val.delete(k);
495
+ else if (v1 !== v0) val.set(k, v1);
496
+ }
497
+ else if (val instanceof Set) for (const v0 of Array.from(val)) {
498
+ const v1 = applyReviver(reviver, val, v0, v0);
499
+ if (v1 === void 0) val.delete(v0);
500
+ else if (v1 !== v0) {
501
+ val.delete(v0);
502
+ val.add(v1);
503
+ }
504
+ }
505
+ else for (const [k, v0] of Object.entries(val)) {
506
+ const v1 = applyReviver(reviver, val, k, v0);
507
+ if (v1 === void 0) delete val[k];
508
+ else if (v1 !== v0) val[k] = v1;
509
+ }
507
510
  }
508
511
  return reviver.call(obj, key, val);
509
512
  }
@@ -924,8 +927,10 @@ var require_foldFlowLines = /* @__PURE__ */ __commonJSMin(((exports) => {
924
927
  const folds = [];
925
928
  const escapedFolds = {};
926
929
  let end = lineWidth - indent.length;
927
- if (typeof indentAtStart === "number") if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) folds.push(0);
928
- else end = lineWidth - indentAtStart;
930
+ if (typeof indentAtStart === "number") {
931
+ if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) folds.push(0);
932
+ else end = lineWidth - indentAtStart;
933
+ }
929
934
  let split = void 0;
930
935
  let prev = void 0;
931
936
  let overflow = false;
@@ -962,23 +967,25 @@ var require_foldFlowLines = /* @__PURE__ */ __commonJSMin(((exports) => {
962
967
  const next = text[i + 1];
963
968
  if (next && next !== " " && next !== "\n" && next !== " ") split = i;
964
969
  }
965
- if (i >= end) if (split) {
966
- folds.push(split);
967
- end = split + endStep;
968
- split = void 0;
969
- } else if (mode === FOLD_QUOTED) {
970
- while (prev === " " || prev === " ") {
971
- prev = ch;
972
- ch = text[i += 1];
973
- overflow = true;
974
- }
975
- const j = i > escEnd + 1 ? i - 2 : escStart - 1;
976
- if (escapedFolds[j]) return text;
977
- folds.push(j);
978
- escapedFolds[j] = true;
979
- end = j + endStep;
980
- split = void 0;
981
- } else overflow = true;
970
+ if (i >= end) {
971
+ if (split) {
972
+ folds.push(split);
973
+ end = split + endStep;
974
+ split = void 0;
975
+ } else if (mode === FOLD_QUOTED) {
976
+ while (prev === " " || prev === " ") {
977
+ prev = ch;
978
+ ch = text[i += 1];
979
+ overflow = true;
980
+ }
981
+ const j = i > escEnd + 1 ? i - 2 : escStart - 1;
982
+ if (escapedFolds[j]) return text;
983
+ folds.push(j);
984
+ escapedFolds[j] = true;
985
+ end = j + endStep;
986
+ split = void 0;
987
+ } else overflow = true;
988
+ }
982
989
  }
983
990
  prev = ch;
984
991
  }
@@ -1454,8 +1461,10 @@ var require_log = /* @__PURE__ */ __commonJSMin(((exports) => {
1454
1461
  if (logLevel === "debug") console.log(...messages);
1455
1462
  }
1456
1463
  function warn(logLevel, warning) {
1457
- if (logLevel === "debug" || logLevel === "warn") if (typeof node_process$2.emitWarning === "function") node_process$2.emitWarning(warning);
1458
- else console.warn(warning);
1464
+ if (logLevel === "debug" || logLevel === "warn") {
1465
+ if (typeof node_process$2.emitWarning === "function") node_process$2.emitWarning(warning);
1466
+ else console.warn(warning);
1467
+ }
1459
1468
  }
1460
1469
  exports.debug = debug;
1461
1470
  exports.warn = warn;
@@ -2280,11 +2289,12 @@ var require_pairs = /* @__PURE__ */ __commonJSMin(((exports) => {
2280
2289
  if (iterable && Symbol.iterator in Object(iterable)) for (let it of iterable) {
2281
2290
  if (typeof replacer === "function") it = replacer.call(iterable, String(i++), it);
2282
2291
  let key, value;
2283
- if (Array.isArray(it)) if (it.length === 2) {
2284
- key = it[0];
2285
- value = it[1];
2286
- } else throw new TypeError(`Expected [key, value] tuple: ${it}`);
2287
- else if (it && it instanceof Object) {
2292
+ if (Array.isArray(it)) {
2293
+ if (it.length === 2) {
2294
+ key = it[0];
2295
+ value = it[1];
2296
+ } else throw new TypeError(`Expected [key, value] tuple: ${it}`);
2297
+ } else if (it && it instanceof Object) {
2288
2298
  const keys = Object.keys(it);
2289
2299
  if (keys.length === 1) {
2290
2300
  key = keys[0];
@@ -2360,8 +2370,10 @@ var require_omap = /* @__PURE__ */ __commonJSMin(((exports) => {
2360
2370
  resolve(seq, onError) {
2361
2371
  const pairs$1 = pairs.resolvePairs(seq, onError);
2362
2372
  const seenKeys = [];
2363
- for (const { key } of pairs$1.items) if (identity.isScalar(key)) if (seenKeys.includes(key.value)) onError(`Ordered maps must not include duplicate keys: ${key.value}`);
2364
- else seenKeys.push(key.value);
2373
+ for (const { key } of pairs$1.items) if (identity.isScalar(key)) {
2374
+ if (seenKeys.includes(key.value)) onError(`Ordered maps must not include duplicate keys: ${key.value}`);
2375
+ else seenKeys.push(key.value);
2376
+ }
2365
2377
  return Object.assign(new YAMLOMap(), pairs$1);
2366
2378
  },
2367
2379
  createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)
@@ -2572,9 +2584,10 @@ var require_set = /* @__PURE__ */ __commonJSMin(((exports) => {
2572
2584
  tag: "tag:yaml.org,2002:set",
2573
2585
  createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),
2574
2586
  resolve(map, onError) {
2575
- if (identity.isMap(map)) if (map.hasAllNullValues(true)) return Object.assign(new YAMLSet(), map);
2576
- else onError("Set items must all have null values");
2577
- else onError("Expected a mapping for this tag");
2587
+ if (identity.isMap(map)) {
2588
+ if (map.hasAllNullValues(true)) return Object.assign(new YAMLSet(), map);
2589
+ else onError("Set items must all have null values");
2590
+ } else onError("Expected a mapping for this tag");
2578
2591
  return map;
2579
2592
  }
2580
2593
  };
@@ -2766,10 +2779,12 @@ var require_tags = /* @__PURE__ */ __commonJSMin(((exports) => {
2766
2779
  const schemaTags = schemas.get(schemaName);
2767
2780
  if (schemaTags && !customTags) return addMergeTag && !schemaTags.includes(merge.merge) ? schemaTags.concat(merge.merge) : schemaTags.slice();
2768
2781
  let tags = schemaTags;
2769
- if (!tags) if (Array.isArray(customTags)) tags = [];
2770
- else {
2771
- const keys = Array.from(schemas.keys()).filter((key) => key !== "yaml11").map((key) => JSON.stringify(key)).join(", ");
2772
- throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
2782
+ if (!tags) {
2783
+ if (Array.isArray(customTags)) tags = [];
2784
+ else {
2785
+ const keys = Array.from(schemas.keys()).filter((key) => key !== "yaml11").map((key) => JSON.stringify(key)).join(", ");
2786
+ throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`);
2787
+ }
2773
2788
  }
2774
2789
  if (Array.isArray(customTags)) for (const tag of customTags) tags = tags.concat(tag);
2775
2790
  else if (typeof customTags === "function") tags = customTags(tags.slice());
@@ -2857,14 +2872,15 @@ var require_stringifyDocument = /* @__PURE__ */ __commonJSMin(((exports) => {
2857
2872
  if ((body[0] === "|" || body[0] === ">") && lines[lines.length - 1] === "---") lines[lines.length - 1] = `--- ${body}`;
2858
2873
  else lines.push(body);
2859
2874
  } else lines.push(stringify.stringify(doc.contents, ctx));
2860
- if (doc.directives?.docEnd) if (doc.comment) {
2861
- const cs = commentString(doc.comment);
2862
- if (cs.includes("\n")) {
2863
- lines.push("...");
2864
- lines.push(stringifyComment.indentComment(cs, ""));
2865
- } else lines.push(`... ${cs}`);
2866
- } else lines.push("...");
2867
- else {
2875
+ if (doc.directives?.docEnd) {
2876
+ if (doc.comment) {
2877
+ const cs = commentString(doc.comment);
2878
+ if (cs.includes("\n")) {
2879
+ lines.push("...");
2880
+ lines.push(stringifyComment.indentComment(cs, ""));
2881
+ } else lines.push(`... ${cs}`);
2882
+ } else lines.push("...");
2883
+ } else {
2868
2884
  let dc = doc.comment;
2869
2885
  if (dc && chompKeep) dc = dc.replace(/^\n+/, "");
2870
2886
  if (dc) {
@@ -3403,8 +3419,10 @@ var require_resolve_block_map = /* @__PURE__ */ __commonJSMin(((exports) => {
3403
3419
  }
3404
3420
  if (!keyProps.anchor && !keyProps.tag && !sep) {
3405
3421
  commentEnd = keyProps.end;
3406
- if (keyProps.comment) if (map.comment) map.comment += "\n" + keyProps.comment;
3407
- else map.comment = keyProps.comment;
3422
+ if (keyProps.comment) {
3423
+ if (map.comment) map.comment += "\n" + keyProps.comment;
3424
+ else map.comment = keyProps.comment;
3425
+ }
3408
3426
  continue;
3409
3427
  }
3410
3428
  if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) onError(key ?? start[start.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
@@ -3437,8 +3455,10 @@ var require_resolve_block_map = /* @__PURE__ */ __commonJSMin(((exports) => {
3437
3455
  map.items.push(pair);
3438
3456
  } else {
3439
3457
  if (implicitKey) onError(keyNode.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values");
3440
- if (valueProps.comment) if (keyNode.comment) keyNode.comment += "\n" + valueProps.comment;
3441
- else keyNode.comment = valueProps.comment;
3458
+ if (valueProps.comment) {
3459
+ if (keyNode.comment) keyNode.comment += "\n" + valueProps.comment;
3460
+ else keyNode.comment = valueProps.comment;
3461
+ }
3442
3462
  const pair = new Pair.Pair(keyNode);
3443
3463
  if (ctx.options.keepSourceTokens) pair.srcToken = collItem;
3444
3464
  map.items.push(pair);
@@ -3475,12 +3495,15 @@ var require_resolve_block_seq = /* @__PURE__ */ __commonJSMin(((exports) => {
3475
3495
  parentIndent: bs.indent,
3476
3496
  startOnNewline: true
3477
3497
  });
3478
- if (!props.found) if (props.anchor || props.tag || value) if (value?.type === "block-seq") onError(props.end, "BAD_INDENT", "All sequence items must start at the same column");
3479
- else onError(offset, "MISSING_CHAR", "Sequence item without - indicator");
3480
- else {
3481
- commentEnd = props.end;
3482
- if (props.comment) seq.comment = props.comment;
3483
- continue;
3498
+ if (!props.found) {
3499
+ if (props.anchor || props.tag || value) {
3500
+ if (value?.type === "block-seq") onError(props.end, "BAD_INDENT", "All sequence items must start at the same column");
3501
+ else onError(offset, "MISSING_CHAR", "Sequence item without - indicator");
3502
+ } else {
3503
+ commentEnd = props.end;
3504
+ if (props.comment) seq.comment = props.comment;
3505
+ continue;
3506
+ }
3484
3507
  }
3485
3508
  const node = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, start, null, props, onError);
3486
3509
  if (ctx.schema.compat) utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError);
@@ -3572,8 +3595,10 @@ var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin(((exports) =
3572
3595
  if (!props.anchor && !props.tag && !sep && !value) {
3573
3596
  if (i === 0 && props.comma) onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
3574
3597
  else if (i < fc.items.length - 1) onError(props.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${fcName}`);
3575
- if (props.comment) if (coll.comment) coll.comment += "\n" + props.comment;
3576
- else coll.comment = props.comment;
3598
+ if (props.comment) {
3599
+ if (coll.comment) coll.comment += "\n" + props.comment;
3600
+ else coll.comment = props.comment;
3601
+ }
3577
3602
  offset = props.end;
3578
3603
  continue;
3579
3604
  }
@@ -3633,13 +3658,17 @@ var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin(((exports) =
3633
3658
  }
3634
3659
  if (props.start < valueProps.found.offset - 1024) onError(valueProps.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
3635
3660
  }
3636
- } else if (value) if ("source" in value && value.source?.[0] === ":") onError(value, "MISSING_CHAR", `Missing space after : in ${fcName}`);
3637
- else onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
3661
+ } else if (value) {
3662
+ if ("source" in value && value.source?.[0] === ":") onError(value, "MISSING_CHAR", `Missing space after : in ${fcName}`);
3663
+ else onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
3664
+ }
3638
3665
  const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError) : null;
3639
3666
  if (valueNode) {
3640
3667
  if (isBlock(value)) onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
3641
- } else if (valueProps.comment) if (keyNode.comment) keyNode.comment += "\n" + valueProps.comment;
3642
- else keyNode.comment = valueProps.comment;
3668
+ } else if (valueProps.comment) {
3669
+ if (keyNode.comment) keyNode.comment += "\n" + valueProps.comment;
3670
+ else keyNode.comment = valueProps.comment;
3671
+ }
3643
3672
  const pair = new Pair.Pair(keyNode, valueNode);
3644
3673
  if (ctx.options.keepSourceTokens) pair.srcToken = collItem;
3645
3674
  if (isMap) {
@@ -3673,8 +3702,10 @@ var require_resolve_flow_collection = /* @__PURE__ */ __commonJSMin(((exports) =
3673
3702
  }
3674
3703
  if (ee.length > 0) {
3675
3704
  const end = resolveEnd.resolveEnd(ee, cePos, ctx.options.strict, onError);
3676
- if (end.comment) if (coll.comment) coll.comment += "\n" + end.comment;
3677
- else coll.comment = end.comment;
3705
+ if (end.comment) {
3706
+ if (coll.comment) coll.comment += "\n" + end.comment;
3707
+ else coll.comment = end.comment;
3708
+ }
3678
3709
  coll.range = [
3679
3710
  fc.offset,
3680
3711
  cePos,
@@ -3822,9 +3853,10 @@ var require_resolve_block_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
3822
3853
  value += sep + indent.slice(trimIndent) + content;
3823
3854
  sep = "\n";
3824
3855
  prevMoreIndented = true;
3825
- } else if (content === "") if (sep === "\n") value += "\n";
3826
- else sep = "\n";
3827
- else {
3856
+ } else if (content === "") {
3857
+ if (sep === "\n") value += "\n";
3858
+ else sep = "\n";
3859
+ } else {
3828
3860
  value += sep + content;
3829
3861
  sep = " ";
3830
3862
  prevMoreIndented = false;
@@ -4017,9 +4049,10 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
4017
4049
  let pos = first.lastIndex;
4018
4050
  line.lastIndex = pos;
4019
4051
  while (match = line.exec(source)) {
4020
- if (match[1] === "") if (sep === "\n") res += sep;
4021
- else sep = "\n";
4022
- else {
4052
+ if (match[1] === "") {
4053
+ if (sep === "\n") res += sep;
4054
+ else sep = "\n";
4055
+ } else {
4023
4056
  res += sep + match[1];
4024
4057
  sep = " ";
4025
4058
  }
@@ -4155,8 +4188,10 @@ var require_compose_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
4155
4188
  function findScalarTagByName(schema, value, tagName, tagToken, onError) {
4156
4189
  if (tagName === "!") return schema[identity.SCALAR];
4157
4190
  const matchWithTest = [];
4158
- for (const tag of schema.tags) if (!tag.collection && tag.tag === tagName) if (tag.default && tag.test) matchWithTest.push(tag);
4159
- else return tag;
4191
+ for (const tag of schema.tags) if (!tag.collection && tag.tag === tagName) {
4192
+ if (tag.default && tag.test) matchWithTest.push(tag);
4193
+ else return tag;
4194
+ }
4160
4195
  for (const tag of matchWithTest) if (tag.test?.test(value)) return tag;
4161
4196
  const kt = schema.knownTags[tagName];
4162
4197
  if (kt && !kt.collection) {
@@ -4254,8 +4289,10 @@ var require_compose_node = /* @__PURE__ */ __commonJSMin(((exports) => {
4254
4289
  if (anchor && node.anchor === "") onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
4255
4290
  if (atKey && ctx.options.stringKeys && (!identity.isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) onError(tag ?? token, "NON_STRING_KEY", "With stringKeys, all keys must be strings");
4256
4291
  if (spaceBefore) node.spaceBefore = true;
4257
- if (comment) if (token.type === "scalar" && token.source === "") node.comment = comment;
4258
- else node.commentBefore = comment;
4292
+ if (comment) {
4293
+ if (token.type === "scalar" && token.source === "") node.comment = comment;
4294
+ else node.commentBefore = comment;
4295
+ }
4259
4296
  if (ctx.options.keepSourceTokens && isSrcToken) node.srcToken = token;
4260
4297
  return node;
4261
4298
  }
@@ -5444,11 +5481,13 @@ var require_lexer = /* @__PURE__ */ __commonJSMin(((exports) => {
5444
5481
  end = i;
5445
5482
  } else if (isEmpty(ch)) {
5446
5483
  let next = this.buffer[i + 1];
5447
- if (ch === "\r") if (next === "\n") {
5448
- i += 1;
5449
- ch = "\n";
5450
- next = this.buffer[i + 1];
5451
- } else end = i;
5484
+ if (ch === "\r") {
5485
+ if (next === "\n") {
5486
+ i += 1;
5487
+ ch = "\n";
5488
+ next = this.buffer[i + 1];
5489
+ } else end = i;
5490
+ }
5452
5491
  if (next === "#" || inFlow && flowIndicatorChars.has(next)) break;
5453
5492
  if (ch === "\n") {
5454
5493
  const cs = this.continueScalar(i + 1);
@@ -5665,9 +5704,10 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
5665
5704
  for (const it of fc.items) if (it.sep && !it.value && !includesToken(it.start, "explicit-key-ind") && !includesToken(it.sep, "map-value-ind")) {
5666
5705
  if (it.key) it.value = it.key;
5667
5706
  delete it.key;
5668
- if (isFlowToken(it.value)) if (it.value.end) arrayPushArray(it.value.end, it.sep);
5669
- else it.value.end = it.sep;
5670
- else arrayPushArray(it.start, it.sep);
5707
+ if (isFlowToken(it.value)) {
5708
+ if (it.value.end) arrayPushArray(it.value.end, it.sep);
5709
+ else it.value.end = it.sep;
5710
+ } else arrayPushArray(it.start, it.sep);
5671
5711
  delete it.sep;
5672
5712
  }
5673
5713
  }
@@ -6102,58 +6142,60 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
6102
6142
  this.onKeyLine = true;
6103
6143
  return;
6104
6144
  case "map-value-ind":
6105
- if (it.explicitKey) if (!it.sep) if (includesToken(it.start, "newline")) Object.assign(it, {
6106
- key: null,
6107
- sep: [this.sourceToken]
6108
- });
6109
- else {
6110
- const start = getFirstKeyStartProps(it.start);
6111
- this.stack.push({
6112
- type: "block-map",
6113
- offset: this.offset,
6114
- indent: this.indent,
6115
- items: [{
6116
- start,
6145
+ if (it.explicitKey) {
6146
+ if (!it.sep) {
6147
+ if (includesToken(it.start, "newline")) Object.assign(it, {
6117
6148
  key: null,
6118
6149
  sep: [this.sourceToken]
6119
- }]
6120
- });
6121
- }
6122
- else if (it.value) map.items.push({
6123
- start: [],
6124
- key: null,
6125
- sep: [this.sourceToken]
6126
- });
6127
- else if (includesToken(it.sep, "map-value-ind")) this.stack.push({
6128
- type: "block-map",
6129
- offset: this.offset,
6130
- indent: this.indent,
6131
- items: [{
6132
- start,
6150
+ });
6151
+ else {
6152
+ const start = getFirstKeyStartProps(it.start);
6153
+ this.stack.push({
6154
+ type: "block-map",
6155
+ offset: this.offset,
6156
+ indent: this.indent,
6157
+ items: [{
6158
+ start,
6159
+ key: null,
6160
+ sep: [this.sourceToken]
6161
+ }]
6162
+ });
6163
+ }
6164
+ } else if (it.value) map.items.push({
6165
+ start: [],
6133
6166
  key: null,
6134
6167
  sep: [this.sourceToken]
6135
- }]
6136
- });
6137
- else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
6138
- const start = getFirstKeyStartProps(it.start);
6139
- const key = it.key;
6140
- const sep = it.sep;
6141
- sep.push(this.sourceToken);
6142
- delete it.key;
6143
- delete it.sep;
6144
- this.stack.push({
6168
+ });
6169
+ else if (includesToken(it.sep, "map-value-ind")) this.stack.push({
6145
6170
  type: "block-map",
6146
6171
  offset: this.offset,
6147
6172
  indent: this.indent,
6148
6173
  items: [{
6149
6174
  start,
6150
- key,
6151
- sep
6175
+ key: null,
6176
+ sep: [this.sourceToken]
6152
6177
  }]
6153
6178
  });
6154
- } else if (start.length > 0) it.sep = it.sep.concat(start, this.sourceToken);
6155
- else it.sep.push(this.sourceToken);
6156
- else if (!it.sep) Object.assign(it, {
6179
+ else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
6180
+ const start = getFirstKeyStartProps(it.start);
6181
+ const key = it.key;
6182
+ const sep = it.sep;
6183
+ sep.push(this.sourceToken);
6184
+ delete it.key;
6185
+ delete it.sep;
6186
+ this.stack.push({
6187
+ type: "block-map",
6188
+ offset: this.offset,
6189
+ indent: this.indent,
6190
+ items: [{
6191
+ start,
6192
+ key,
6193
+ sep
6194
+ }]
6195
+ });
6196
+ } else if (start.length > 0) it.sep = it.sep.concat(start, this.sourceToken);
6197
+ else it.sep.push(this.sourceToken);
6198
+ } else if (!it.sep) Object.assign(it, {
6157
6199
  key: null,
6158
6200
  sep: [this.sourceToken]
6159
6201
  });
@@ -6526,8 +6568,10 @@ var require_public_api = /* @__PURE__ */ __commonJSMin(((exports) => {
6526
6568
  const doc = parseDocument(src, options);
6527
6569
  if (!doc) return null;
6528
6570
  doc.warnings.forEach((warning) => log.warn(doc.options.logLevel, warning));
6529
- if (doc.errors.length > 0) if (doc.options.logLevel !== "silent") throw doc.errors[0];
6530
- else doc.errors = [];
6571
+ if (doc.errors.length > 0) {
6572
+ if (doc.options.logLevel !== "silent") throw doc.errors[0];
6573
+ else doc.errors = [];
6574
+ }
6531
6575
  return doc.toJS(Object.assign({ reviver: _reviver }, options));
6532
6576
  }
6533
6577
  function stringify(value, replacer, options) {