@swmansion/argent 0.35.1-next.44 → 0.35.1-next.46

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.
@@ -3644,21 +3644,21 @@ var require_fast_uri = __commonJS({
3644
3644
  normalizeString(uri, options);
3645
3645
  } else if (typeof uri === "object") {
3646
3646
  uri = /** @type {T} */
3647
- parse4(serialize(uri, options), options);
3647
+ parse5(serialize(uri, options), options);
3648
3648
  }
3649
3649
  return uri;
3650
3650
  }
3651
3651
  function resolve13(baseURI, relativeURI, options) {
3652
3652
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
3653
- const resolved = resolveComponent(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true);
3653
+ const resolved = resolveComponent(parse5(baseURI, schemelessOptions), parse5(relativeURI, schemelessOptions), schemelessOptions, true);
3654
3654
  schemelessOptions.skipEscape = true;
3655
3655
  return serialize(resolved, schemelessOptions);
3656
3656
  }
3657
3657
  function resolveComponent(base, relative2, options, skipNormalization) {
3658
3658
  const target = {};
3659
3659
  if (!skipNormalization) {
3660
- base = parse4(serialize(base, options), options);
3661
- relative2 = parse4(serialize(relative2, options), options);
3660
+ base = parse5(serialize(base, options), options);
3661
+ relative2 = parse5(serialize(relative2, options), options);
3662
3662
  }
3663
3663
  options = options || {};
3664
3664
  if (!options.tolerant && relative2.scheme) {
@@ -3881,7 +3881,7 @@ var require_fast_uri = __commonJS({
3881
3881
  }
3882
3882
  return { parsed, malformedAuthorityOrPort };
3883
3883
  }
3884
- function parse4(uri, opts) {
3884
+ function parse5(uri, opts) {
3885
3885
  return parseWithStatus(uri, opts).parsed;
3886
3886
  }
3887
3887
  function normalizeString(uri, opts) {
@@ -3910,7 +3910,7 @@ var require_fast_uri = __commonJS({
3910
3910
  resolveComponent,
3911
3911
  equal,
3912
3912
  serialize,
3913
- parse: parse4
3913
+ parse: parse5
3914
3914
  };
3915
3915
  module.exports = fastUri;
3916
3916
  module.exports.default = fastUri;
@@ -16945,10 +16945,10 @@ var require_resolve_block_map = __commonJS({
16945
16945
  let offset = bm.offset;
16946
16946
  let commentEnd = null;
16947
16947
  for (const collItem of bm.items) {
16948
- const { start, key, sep: sep6, value } = collItem;
16948
+ const { start, key, sep: sep7, value } = collItem;
16949
16949
  const keyProps = resolveProps.resolveProps(start, {
16950
16950
  indicator: "explicit-key-ind",
16951
- next: key ?? sep6?.[0],
16951
+ next: key ?? sep7?.[0],
16952
16952
  offset,
16953
16953
  onError,
16954
16954
  parentIndent: bm.indent,
@@ -16962,7 +16962,7 @@ var require_resolve_block_map = __commonJS({
16962
16962
  else if ("indent" in key && key.indent !== bm.indent)
16963
16963
  onError(offset, "BAD_INDENT", startColMsg);
16964
16964
  }
16965
- if (!keyProps.anchor && !keyProps.tag && !sep6) {
16965
+ if (!keyProps.anchor && !keyProps.tag && !sep7) {
16966
16966
  commentEnd = keyProps.end;
16967
16967
  if (keyProps.comment) {
16968
16968
  if (map.comment)
@@ -16986,7 +16986,7 @@ var require_resolve_block_map = __commonJS({
16986
16986
  ctx.atKey = false;
16987
16987
  if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
16988
16988
  onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
16989
- const valueProps = resolveProps.resolveProps(sep6 ?? [], {
16989
+ const valueProps = resolveProps.resolveProps(sep7 ?? [], {
16990
16990
  indicator: "map-value-ind",
16991
16991
  next: value,
16992
16992
  offset: keyNode.range[2],
@@ -17002,7 +17002,7 @@ var require_resolve_block_map = __commonJS({
17002
17002
  if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
17003
17003
  onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
17004
17004
  }
17005
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep6, null, valueProps, onError);
17005
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep7, null, valueProps, onError);
17006
17006
  if (ctx.schema.compat)
17007
17007
  utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
17008
17008
  offset = valueNode.range[2];
@@ -17093,7 +17093,7 @@ var require_resolve_end = __commonJS({
17093
17093
  let comment = "";
17094
17094
  if (end) {
17095
17095
  let hasSpace = false;
17096
- let sep6 = "";
17096
+ let sep7 = "";
17097
17097
  for (const token of end) {
17098
17098
  const { source, type } = token;
17099
17099
  switch (type) {
@@ -17107,13 +17107,13 @@ var require_resolve_end = __commonJS({
17107
17107
  if (!comment)
17108
17108
  comment = cb;
17109
17109
  else
17110
- comment += sep6 + cb;
17111
- sep6 = "";
17110
+ comment += sep7 + cb;
17111
+ sep7 = "";
17112
17112
  break;
17113
17113
  }
17114
17114
  case "newline":
17115
17115
  if (comment)
17116
- sep6 += source;
17116
+ sep7 += source;
17117
17117
  hasSpace = true;
17118
17118
  break;
17119
17119
  default:
@@ -17156,18 +17156,18 @@ var require_resolve_flow_collection = __commonJS({
17156
17156
  let offset = fc.offset + fc.start.source.length;
17157
17157
  for (let i = 0; i < fc.items.length; ++i) {
17158
17158
  const collItem = fc.items[i];
17159
- const { start, key, sep: sep6, value } = collItem;
17159
+ const { start, key, sep: sep7, value } = collItem;
17160
17160
  const props = resolveProps.resolveProps(start, {
17161
17161
  flow: fcName,
17162
17162
  indicator: "explicit-key-ind",
17163
- next: key ?? sep6?.[0],
17163
+ next: key ?? sep7?.[0],
17164
17164
  offset,
17165
17165
  onError,
17166
17166
  parentIndent: fc.indent,
17167
17167
  startOnNewline: false
17168
17168
  });
17169
17169
  if (!props.found) {
17170
- if (!props.anchor && !props.tag && !sep6 && !value) {
17170
+ if (!props.anchor && !props.tag && !sep7 && !value) {
17171
17171
  if (i === 0 && props.comma)
17172
17172
  onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
17173
17173
  else if (i < fc.items.length - 1)
@@ -17221,8 +17221,8 @@ var require_resolve_flow_collection = __commonJS({
17221
17221
  }
17222
17222
  }
17223
17223
  }
17224
- if (!isMap && !sep6 && !props.found) {
17225
- const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep6, null, props, onError);
17224
+ if (!isMap && !sep7 && !props.found) {
17225
+ const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep7, null, props, onError);
17226
17226
  coll.items.push(valueNode);
17227
17227
  offset = valueNode.range[2];
17228
17228
  if (isBlock(value))
@@ -17234,7 +17234,7 @@ var require_resolve_flow_collection = __commonJS({
17234
17234
  if (isBlock(key))
17235
17235
  onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
17236
17236
  ctx.atKey = false;
17237
- const valueProps = resolveProps.resolveProps(sep6 ?? [], {
17237
+ const valueProps = resolveProps.resolveProps(sep7 ?? [], {
17238
17238
  flow: fcName,
17239
17239
  indicator: "map-value-ind",
17240
17240
  next: value,
@@ -17245,8 +17245,8 @@ var require_resolve_flow_collection = __commonJS({
17245
17245
  });
17246
17246
  if (valueProps.found) {
17247
17247
  if (!isMap && !props.found && ctx.options.strict) {
17248
- if (sep6)
17249
- for (const st of sep6) {
17248
+ if (sep7)
17249
+ for (const st of sep7) {
17250
17250
  if (st === valueProps.found)
17251
17251
  break;
17252
17252
  if (st.type === "newline") {
@@ -17263,7 +17263,7 @@ var require_resolve_flow_collection = __commonJS({
17263
17263
  else
17264
17264
  onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
17265
17265
  }
17266
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep6, null, valueProps, onError) : null;
17266
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep7, null, valueProps, onError) : null;
17267
17267
  if (valueNode) {
17268
17268
  if (isBlock(value))
17269
17269
  onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
@@ -17443,7 +17443,7 @@ var require_resolve_block_scalar = __commonJS({
17443
17443
  chompStart = i + 1;
17444
17444
  }
17445
17445
  let value = "";
17446
- let sep6 = "";
17446
+ let sep7 = "";
17447
17447
  let prevMoreIndented = false;
17448
17448
  for (let i = 0; i < contentStart; ++i)
17449
17449
  value += lines[i][0].slice(trimIndent) + "\n";
@@ -17460,24 +17460,24 @@ var require_resolve_block_scalar = __commonJS({
17460
17460
  indent = "";
17461
17461
  }
17462
17462
  if (type === Scalar.Scalar.BLOCK_LITERAL) {
17463
- value += sep6 + indent.slice(trimIndent) + content;
17464
- sep6 = "\n";
17463
+ value += sep7 + indent.slice(trimIndent) + content;
17464
+ sep7 = "\n";
17465
17465
  } else if (indent.length > trimIndent || content[0] === " ") {
17466
- if (sep6 === " ")
17467
- sep6 = "\n";
17468
- else if (!prevMoreIndented && sep6 === "\n")
17469
- sep6 = "\n\n";
17470
- value += sep6 + indent.slice(trimIndent) + content;
17471
- sep6 = "\n";
17466
+ if (sep7 === " ")
17467
+ sep7 = "\n";
17468
+ else if (!prevMoreIndented && sep7 === "\n")
17469
+ sep7 = "\n\n";
17470
+ value += sep7 + indent.slice(trimIndent) + content;
17471
+ sep7 = "\n";
17472
17472
  prevMoreIndented = true;
17473
17473
  } else if (content === "") {
17474
- if (sep6 === "\n")
17474
+ if (sep7 === "\n")
17475
17475
  value += "\n";
17476
17476
  else
17477
- sep6 = "\n";
17477
+ sep7 = "\n";
17478
17478
  } else {
17479
- value += sep6 + content;
17480
- sep6 = " ";
17479
+ value += sep7 + content;
17480
+ sep7 = " ";
17481
17481
  prevMoreIndented = false;
17482
17482
  }
17483
17483
  }
@@ -17660,25 +17660,25 @@ var require_resolve_flow_scalar = __commonJS({
17660
17660
  trimBoth = /^[ \t]+|[ \t]+$/g;
17661
17661
  }
17662
17662
  let res = match[1].replace(trimEnd, "");
17663
- let sep6 = " ";
17663
+ let sep7 = " ";
17664
17664
  let pos = line.lastIndex;
17665
17665
  while (match = line.exec(source)) {
17666
17666
  const lm = match[1].replace(trimBoth, "");
17667
17667
  if (lm === "") {
17668
- if (sep6 === "\n")
17669
- res += sep6;
17668
+ if (sep7 === "\n")
17669
+ res += sep7;
17670
17670
  else
17671
- sep6 = "\n";
17671
+ sep7 = "\n";
17672
17672
  } else {
17673
- res += sep6 + lm;
17674
- sep6 = " ";
17673
+ res += sep7 + lm;
17674
+ sep7 = " ";
17675
17675
  }
17676
17676
  pos = line.lastIndex;
17677
17677
  }
17678
17678
  const last = /[ \t]*(.*)/sy;
17679
17679
  last.lastIndex = pos;
17680
17680
  match = last.exec(source);
17681
- return res + sep6 + (match?.[1] ?? "");
17681
+ return res + sep7 + (match?.[1] ?? "");
17682
17682
  }
17683
17683
  function doubleQuotedValue(source, onError) {
17684
17684
  let res = "";
@@ -18488,14 +18488,14 @@ var require_cst_stringify = __commonJS({
18488
18488
  }
18489
18489
  }
18490
18490
  }
18491
- function stringifyItem({ start, key, sep: sep6, value }) {
18491
+ function stringifyItem({ start, key, sep: sep7, value }) {
18492
18492
  let res = "";
18493
18493
  for (const st of start)
18494
18494
  res += st.source;
18495
18495
  if (key)
18496
18496
  res += stringifyToken(key);
18497
- if (sep6)
18498
- for (const st of sep6)
18497
+ if (sep7)
18498
+ for (const st of sep7)
18499
18499
  res += st.source;
18500
18500
  if (value)
18501
18501
  res += stringifyToken(value);
@@ -19662,18 +19662,18 @@ var require_parser = __commonJS({
19662
19662
  if (this.type === "map-value-ind") {
19663
19663
  const prev = getPrevProps(this.peek(2));
19664
19664
  const start = getFirstKeyStartProps(prev);
19665
- let sep6;
19665
+ let sep7;
19666
19666
  if (scalar.end) {
19667
- sep6 = scalar.end;
19668
- sep6.push(this.sourceToken);
19667
+ sep7 = scalar.end;
19668
+ sep7.push(this.sourceToken);
19669
19669
  delete scalar.end;
19670
19670
  } else
19671
- sep6 = [this.sourceToken];
19671
+ sep7 = [this.sourceToken];
19672
19672
  const map = {
19673
19673
  type: "block-map",
19674
19674
  offset: scalar.offset,
19675
19675
  indent: scalar.indent,
19676
- items: [{ start, key: scalar, sep: sep6 }]
19676
+ items: [{ start, key: scalar, sep: sep7 }]
19677
19677
  };
19678
19678
  this.onKeyLine = true;
19679
19679
  this.stack[this.stack.length - 1] = map;
@@ -19826,15 +19826,15 @@ var require_parser = __commonJS({
19826
19826
  } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
19827
19827
  const start2 = getFirstKeyStartProps(it.start);
19828
19828
  const key = it.key;
19829
- const sep6 = it.sep;
19830
- sep6.push(this.sourceToken);
19829
+ const sep7 = it.sep;
19830
+ sep7.push(this.sourceToken);
19831
19831
  delete it.key;
19832
19832
  delete it.sep;
19833
19833
  this.stack.push({
19834
19834
  type: "block-map",
19835
19835
  offset: this.offset,
19836
19836
  indent: this.indent,
19837
- items: [{ start: start2, key, sep: sep6 }]
19837
+ items: [{ start: start2, key, sep: sep7 }]
19838
19838
  });
19839
19839
  } else if (start.length > 0) {
19840
19840
  it.sep = it.sep.concat(start, this.sourceToken);
@@ -20028,13 +20028,13 @@ var require_parser = __commonJS({
20028
20028
  const prev = getPrevProps(parent);
20029
20029
  const start = getFirstKeyStartProps(prev);
20030
20030
  fixFlowSeqItems(fc);
20031
- const sep6 = fc.end.splice(1, fc.end.length);
20032
- sep6.push(this.sourceToken);
20031
+ const sep7 = fc.end.splice(1, fc.end.length);
20032
+ sep7.push(this.sourceToken);
20033
20033
  const map = {
20034
20034
  type: "block-map",
20035
20035
  offset: fc.offset,
20036
20036
  indent: fc.indent,
20037
- items: [{ start, key: fc, sep: sep6 }]
20037
+ items: [{ start, key: fc, sep: sep7 }]
20038
20038
  };
20039
20039
  this.onKeyLine = true;
20040
20040
  this.stack[this.stack.length - 1] = map;
@@ -20212,7 +20212,7 @@ var require_public_api = __commonJS({
20212
20212
  }
20213
20213
  return doc;
20214
20214
  }
20215
- function parse4(src, reviver, options) {
20215
+ function parse5(src, reviver, options) {
20216
20216
  let _reviver = void 0;
20217
20217
  if (typeof reviver === "function") {
20218
20218
  _reviver = reviver;
@@ -20253,7 +20253,7 @@ var require_public_api = __commonJS({
20253
20253
  return value.toString(options);
20254
20254
  return new Document.Document(value, _replacer, options).toString(options);
20255
20255
  }
20256
- exports.parse = parse4;
20256
+ exports.parse = parse5;
20257
20257
  exports.parseAllDocuments = parseAllDocuments;
20258
20258
  exports.parseDocument = parseDocument;
20259
20259
  exports.stringify = stringify;
@@ -20783,7 +20783,7 @@ var require_parse = __commonJS({
20783
20783
  "../../node_modules/semver/functions/parse.js"(exports, module) {
20784
20784
  "use strict";
20785
20785
  var SemVer = require_semver();
20786
- var parse4 = (version2, options, throwErrors = false) => {
20786
+ var parse5 = (version2, options, throwErrors = false) => {
20787
20787
  if (version2 instanceof SemVer) {
20788
20788
  return version2;
20789
20789
  }
@@ -20796,7 +20796,7 @@ var require_parse = __commonJS({
20796
20796
  throw er;
20797
20797
  }
20798
20798
  };
20799
- module.exports = parse4;
20799
+ module.exports = parse5;
20800
20800
  }
20801
20801
  });
20802
20802
 
@@ -20804,9 +20804,9 @@ var require_parse = __commonJS({
20804
20804
  var require_valid = __commonJS({
20805
20805
  "../../node_modules/semver/functions/valid.js"(exports, module) {
20806
20806
  "use strict";
20807
- var parse4 = require_parse();
20807
+ var parse5 = require_parse();
20808
20808
  var valid = (version2, options) => {
20809
- const v = parse4(version2, options);
20809
+ const v = parse5(version2, options);
20810
20810
  return v ? v.version : null;
20811
20811
  };
20812
20812
  module.exports = valid;
@@ -20817,9 +20817,9 @@ var require_valid = __commonJS({
20817
20817
  var require_clean = __commonJS({
20818
20818
  "../../node_modules/semver/functions/clean.js"(exports, module) {
20819
20819
  "use strict";
20820
- var parse4 = require_parse();
20820
+ var parse5 = require_parse();
20821
20821
  var clean = (version2, options) => {
20822
- const s = parse4(version2.trim().replace(/^[=v]+/, ""), options);
20822
+ const s = parse5(version2.trim().replace(/^[=v]+/, ""), options);
20823
20823
  return s ? s.version : null;
20824
20824
  };
20825
20825
  module.exports = clean;
@@ -20854,10 +20854,10 @@ var require_inc = __commonJS({
20854
20854
  var require_diff = __commonJS({
20855
20855
  "../../node_modules/semver/functions/diff.js"(exports, module) {
20856
20856
  "use strict";
20857
- var parse4 = require_parse();
20857
+ var parse5 = require_parse();
20858
20858
  var diff = (version1, version2) => {
20859
- const v1 = parse4(version1, null, true);
20860
- const v2 = parse4(version2, null, true);
20859
+ const v1 = parse5(version1, null, true);
20860
+ const v2 = parse5(version2, null, true);
20861
20861
  const comparison = v1.compare(v2);
20862
20862
  if (comparison === 0) {
20863
20863
  return null;
@@ -20928,9 +20928,9 @@ var require_patch = __commonJS({
20928
20928
  var require_prerelease = __commonJS({
20929
20929
  "../../node_modules/semver/functions/prerelease.js"(exports, module) {
20930
20930
  "use strict";
20931
- var parse4 = require_parse();
20931
+ var parse5 = require_parse();
20932
20932
  var prerelease = (version2, options) => {
20933
- const parsed = parse4(version2, options);
20933
+ const parsed = parse5(version2, options);
20934
20934
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
20935
20935
  };
20936
20936
  module.exports = prerelease;
@@ -21116,7 +21116,7 @@ var require_coerce = __commonJS({
21116
21116
  "../../node_modules/semver/functions/coerce.js"(exports, module) {
21117
21117
  "use strict";
21118
21118
  var SemVer = require_semver();
21119
- var parse4 = require_parse();
21119
+ var parse5 = require_parse();
21120
21120
  var { safeRe: re, t } = require_re();
21121
21121
  var coerce = (version2, options) => {
21122
21122
  if (version2 instanceof SemVer) {
@@ -21151,7 +21151,7 @@ var require_coerce = __commonJS({
21151
21151
  const patch = match[4] || "0";
21152
21152
  const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
21153
21153
  const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
21154
- return parse4(`${major}.${minor}.${patch}${prerelease}${build}`, options);
21154
+ return parse5(`${major}.${minor}.${patch}${prerelease}${build}`, options);
21155
21155
  };
21156
21156
  module.exports = coerce;
21157
21157
  }
@@ -21161,7 +21161,7 @@ var require_coerce = __commonJS({
21161
21161
  var require_truncate = __commonJS({
21162
21162
  "../../node_modules/semver/functions/truncate.js"(exports, module) {
21163
21163
  "use strict";
21164
- var parse4 = require_parse();
21164
+ var parse5 = require_parse();
21165
21165
  var constants2 = require_constants();
21166
21166
  var SemVer = require_semver();
21167
21167
  var truncate = (version2, truncation, options) => {
@@ -21173,7 +21173,7 @@ var require_truncate = __commonJS({
21173
21173
  };
21174
21174
  var cloneInputVersion = (version2, options) => {
21175
21175
  const versionStringToParse = version2 instanceof SemVer ? version2.version : version2;
21176
- return parse4(versionStringToParse, options);
21176
+ return parse5(versionStringToParse, options);
21177
21177
  };
21178
21178
  var doTruncation = (version2, truncation) => {
21179
21179
  if (isPrerelease(truncation)) {
@@ -22217,7 +22217,7 @@ var require_semver2 = __commonJS({
22217
22217
  var constants2 = require_constants();
22218
22218
  var SemVer = require_semver();
22219
22219
  var identifiers = require_identifiers();
22220
- var parse4 = require_parse();
22220
+ var parse5 = require_parse();
22221
22221
  var valid = require_valid();
22222
22222
  var clean = require_clean();
22223
22223
  var inc = require_inc();
@@ -22256,7 +22256,7 @@ var require_semver2 = __commonJS({
22256
22256
  var simplifyRange = require_simplify();
22257
22257
  var subset = require_subset();
22258
22258
  module.exports = {
22259
- parse: parse4,
22259
+ parse: parse5,
22260
22260
  valid,
22261
22261
  clean,
22262
22262
  inc,
@@ -23507,17 +23507,17 @@ var validateAsync = async (schema, value, _ctx) => {
23507
23507
  return result.issues.length === 0;
23508
23508
  };
23509
23509
  var _encode = (_Err) => {
23510
- const parse4 = _parse(_Err);
23510
+ const parse5 = _parse(_Err);
23511
23511
  const fn = (schema, value, _ctx, _params) => {
23512
23512
  const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
23513
- return parse4(schema, value, ctx, finalizeParams(fn, _params));
23513
+ return parse5(schema, value, ctx, finalizeParams(fn, _params));
23514
23514
  };
23515
23515
  return fn;
23516
23516
  };
23517
23517
  var _decode = (_Err) => {
23518
- const parse4 = _parse(_Err);
23518
+ const parse5 = _parse(_Err);
23519
23519
  const fn = (schema, value, _ctx, _params) => {
23520
- return parse4(schema, value, _ctx, finalizeParams(fn, _params));
23520
+ return parse5(schema, value, _ctx, finalizeParams(fn, _params));
23521
23521
  };
23522
23522
  return fn;
23523
23523
  };
@@ -24554,7 +24554,7 @@ function capSize(inst, size) {
24554
24554
  if (!caps.length)
24555
24555
  return;
24556
24556
  const cap = Math.min(...caps.map((c) => c[0]));
24557
- const parse4 = inst._zod.parse;
24557
+ const parse5 = inst._zod.parse;
24558
24558
  inst._zod.parse = (payload, ctx) => {
24559
24559
  const n = size(payload.value);
24560
24560
  if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
@@ -24568,7 +24568,7 @@ function capSize(inst, size) {
24568
24568
  }
24569
24569
  }
24570
24570
  }
24571
- return parse4(payload, ctx);
24571
+ return parse5(payload, ctx);
24572
24572
  };
24573
24573
  }
24574
24574
  var arraySize = (input) => Array.isArray(input) ? input.length : -1;
@@ -32507,6 +32507,15 @@ function secretSources(options = {}) {
32507
32507
  function encodeClientSecrets(values) {
32508
32508
  return Buffer.from(JSON.stringify(Object.fromEntries(values)), "utf8").toString("base64");
32509
32509
  }
32510
+ function summarizeSecretSources(sources) {
32511
+ return sources.map(({ values: _values, ...summary }) => ({
32512
+ ...summary,
32513
+ names: [...summary.names]
32514
+ }));
32515
+ }
32516
+ function encodeSecretSourceSummaries(sources) {
32517
+ return Buffer.from(JSON.stringify(sources), "utf8").toString("base64");
32518
+ }
32510
32519
  function lookupSecret(name, sources) {
32511
32520
  for (const source of sources) {
32512
32521
  const value = source.values.get(name);
@@ -32792,14 +32801,14 @@ function findFreePort() {
32792
32801
  });
32793
32802
  }
32794
32803
  function isVersionNewer(a, b) {
32795
- const parse4 = (v) => {
32804
+ const parse5 = (v) => {
32796
32805
  const [core = "", ...preParts] = v.split("+")[0].split("-");
32797
32806
  const nums = core.split(".").map((n) => Number.parseInt(n, 10));
32798
32807
  if (nums.length === 0 || nums.some((n) => Number.isNaN(n))) return null;
32799
32808
  return { nums, pre: preParts.length > 0 ? preParts.join("-").split(".") : [] };
32800
32809
  };
32801
- const pa = parse4(a);
32802
- const pb = parse4(b);
32810
+ const pa = parse5(a);
32811
+ const pb = parse5(b);
32803
32812
  if (!pa || !pb) return false;
32804
32813
  for (let i = 0; i < 3; i++) {
32805
32814
  const x = pa.nums[i] ?? 0;
@@ -33241,6 +33250,7 @@ import * as path13 from "node:path";
33241
33250
  var LINKED_CALL_HEADER = "x-argent-linked";
33242
33251
  var E2E_DIR_CLIENT_HEADER = "x-argent-e2e-dir";
33243
33252
  var CLIENT_SECRETS_HEADER = "x-argent-client-secrets";
33253
+ var CLIENT_SECRET_SOURCES_HEADER = "x-argent-client-secret-sources";
33244
33254
 
33245
33255
  // ../registry/src/artifacts.ts
33246
33256
  import { stat } from "node:fs/promises";
@@ -34971,7 +34981,7 @@ function memberCollector(roots, opts) {
34971
34981
  const runs = /* @__PURE__ */ new Set();
34972
34982
  const baselineDirs = /* @__PURE__ */ new Map();
34973
34983
  const budget = { inline: 0 };
34974
- const logging = filesLogEnabled();
34984
+ const logging = filesLogEnabled() && opts.scanOnly !== true;
34975
34985
  const log = opts.log ?? ((line) => void process.stderr.write(`${line}
34976
34986
  `));
34977
34987
  const emit = (member, sent) => {
@@ -34991,6 +35001,7 @@ function memberCollector(roots, opts) {
34991
35001
  return entry;
34992
35002
  }
34993
35003
  async function toolFiles(step) {
35004
+ if (opts.scanOnly) return;
34994
35005
  if (canonicalToolId(step.tool) === "e2e-execute") return;
34995
35006
  for (const file of toolStepFiles(opts.toolFileInputs?.(step.tool), step.args)) {
34996
35007
  const { unwrapWhenSet } = file.spec;
@@ -35017,6 +35028,12 @@ function memberCollector(roots, opts) {
35017
35028
  if (text === void 0 || hop >= MAX_RUN_DEPTH) return void 0;
35018
35029
  return { canonical: member.canonical, text, flowName: target.name, hop, updates, platform };
35019
35030
  }
35031
+ async function pathRun(target, hop, updates, platform) {
35032
+ const { member, text } = await flow(path12.dirname(target.path), path12.basename(target.path));
35033
+ if (text === void 0 || hop >= MAX_RUN_DEPTH) return void 0;
35034
+ const flowName = path12.basename(target.path, ".yaml");
35035
+ return { canonical: member.canonical, text, flowName, hop, updates, platform };
35036
+ }
35020
35037
  async function runTarget(anchorDir, target) {
35021
35038
  const found = await flow(anchorDir, target);
35022
35039
  if (found.member.spelling?.state !== "absent") return found;
@@ -35056,13 +35073,8 @@ function memberCollector(roots, opts) {
35056
35073
  }
35057
35074
  }
35058
35075
  for (const { target, args } of requests.nested) {
35059
- if (target.kind !== "name") continue;
35060
- const next = await nestedRun(
35061
- target,
35062
- file.hop + 1,
35063
- nestedRunUpdates(run.updates, args),
35064
- run.platform
35065
- );
35076
+ const updates = nestedRunUpdates(run.updates, args);
35077
+ const next = target.kind === "name" ? await nestedRun(target, file.hop + 1, updates, run.platform) : opts.scanOnly ? await pathRun(target, file.hop + 1, updates, run.platform) : void 0;
35066
35078
  if (next !== void 0) queue.push(next);
35067
35079
  }
35068
35080
  }
@@ -35083,6 +35095,7 @@ function memberCollector(roots, opts) {
35083
35095
  }
35084
35096
  }
35085
35097
  async function sendBaselines() {
35098
+ if (opts.scanOnly) return;
35086
35099
  for (const [dir, { prefixes, updates }] of baselineDirs) {
35087
35100
  const real = (await landing(dir)).canonical;
35088
35101
  if (!roots.some((root) => isWithin(real, root))) continue;
@@ -35120,7 +35133,7 @@ async function collectFlowMembers(rootPath, rootBytes, args, opts) {
35120
35133
  FLOW_FILE_NAME_PATTERN
35121
35134
  );
35122
35135
  const collector = memberCollector(
35123
- await closureRoots(rootPath, canonical, args.project_root),
35136
+ opts.scanOnly ? [path12.parse(path12.resolve(rootPath)).root] : await closureRoots(rootPath, canonical, args.project_root),
35124
35137
  opts
35125
35138
  );
35126
35139
  await collector.walk([
@@ -35158,7 +35171,7 @@ async function collectStepMembers(args, opts, recordingDirFor = e2eDirFor) {
35158
35171
  }
35159
35172
  const recording = path12.join(recordingDirFor(projectRoot), `${name}.yaml`);
35160
35173
  const collector = memberCollector(
35161
- await closureRoots(recording, (await landing(recording)).canonical, projectRoot),
35174
+ opts.scanOnly ? [path12.parse(recording).root] : await closureRoots(recording, (await landing(recording)).canonical, projectRoot),
35162
35175
  opts
35163
35176
  );
35164
35177
  await collector.toolFiles(step);
@@ -35404,8 +35417,25 @@ function carriesMembers(args) {
35404
35417
  function carriesUpload(args) {
35405
35418
  return carriesMembers(args) || wiresOf(args).some((wire) => typeof wire.uploadId === "string");
35406
35419
  }
35407
- async function forwardedSecrets(args) {
35408
- if (!isFeatureEnabled("forward-secrets")) return void 0;
35420
+ function secretValues(names, sources) {
35421
+ const values = /* @__PURE__ */ new Map();
35422
+ for (const rawName of names) {
35423
+ const { name, value } = lookupPlaceholderSecret(rawName, sources);
35424
+ if (value !== void 0) values.set(name, value);
35425
+ }
35426
+ return values;
35427
+ }
35428
+ async function callerSecrets(scanned, remote) {
35429
+ if (remote && !isFeatureEnabled("forward-secrets")) return void 0;
35430
+ const names = await placeholderNamesIn(scanned);
35431
+ if (remote) {
35432
+ return names.size === 0 ? void 0 : { values: secretValues(names, secretSources()) };
35433
+ }
35434
+ if (names.size === 0) return { values: /* @__PURE__ */ new Map() };
35435
+ const sources = secretSources();
35436
+ return { values: secretValues(names, sources), sources: summarizeSecretSources(sources) };
35437
+ }
35438
+ async function placeholderNamesIn(args) {
35409
35439
  const names = /* @__PURE__ */ new Set();
35410
35440
  const scan = (text) => {
35411
35441
  for (const name of placeholderNames(text)) names.add(name);
@@ -35442,15 +35472,33 @@ async function forwardedSecrets(args) {
35442
35472
  }
35443
35473
  };
35444
35474
  await visit(args);
35445
- if (names.size === 0) return void 0;
35446
- const sources = secretSources();
35447
- const values = /* @__PURE__ */ new Map();
35448
- for (const rawName of names) {
35449
- const { name, value } = lookupPlaceholderSecret(rawName, sources);
35450
- if (value !== void 0) values.set(name, value);
35475
+ return names;
35476
+ }
35477
+ async function localScanArgs(meta2, args, prepare) {
35478
+ const scanned = [args];
35479
+ const collecting = meta2?.fileInputs?.filter((spec) => spec.collect !== void 0) ?? [];
35480
+ if (meta2 && RECORDING_TOOLS.has(canonicalToolId(meta2.name))) {
35481
+ collecting.push(RECORDING_FILE_INPUT);
35451
35482
  }
35452
- return values;
35483
+ if (collecting.length > 0) {
35484
+ scanned.push(await prepare(collecting).catch(() => void 0));
35485
+ }
35486
+ return scanned;
35453
35487
  }
35488
+ var RECORDING_TOOLS = /* @__PURE__ */ new Set([
35489
+ "e2e-start-recording",
35490
+ "e2e-add-script",
35491
+ "e2e-add-step",
35492
+ "e2e-finish-recording"
35493
+ ]);
35494
+ var RECORDING_FILE_INPUT = {
35495
+ target: "__recording",
35496
+ path: `\${project_root}/${E2E_DIRS[0].split(path13.sep).join("/")}/\${name}.yaml`,
35497
+ paths: E2E_DIRS.map((dir) => `\${project_root}/${dir.split(path13.sep).join("/")}/\${name}.yaml`),
35498
+ kind: "file",
35499
+ optional: true,
35500
+ collect: "flow"
35501
+ };
35454
35502
  function secretsTransportRefusal(url) {
35455
35503
  if (!URL.canParse(url)) return `${url} is not a URL`;
35456
35504
  const { protocol, hostname } = new URL(url);
@@ -35554,6 +35602,23 @@ function createToolsClient(options = {}) {
35554
35602
  const shadowWarning = await e2eShadowWarningFor(name, args);
35555
35603
  const baselineDirs = [];
35556
35604
  let unwrittenBaselines = [];
35605
+ const memberOptions = {
35606
+ collectMembers: collectFlowMembers,
35607
+ collectStepMembers: olderServer ? (record2, o) => collectStepMembers(record2, o, (root) => path13.join(root, LEGACY_E2E_DIRS[0])) : collectStepMembers,
35608
+ toolFileInputs: (tool) => findTool(tools, tool)?.fileInputs,
35609
+ signal: opts?.signal
35610
+ };
35611
+ const scanned = remote ? void 0 : await localScanArgs(
35612
+ meta2,
35613
+ finalArgs,
35614
+ (specs) => prepareFileInputs(specs, finalArgs ?? {}, {
35615
+ includeContent: true,
35616
+ scanOnly: true,
35617
+ log: () => {
35618
+ },
35619
+ ...memberOptions
35620
+ })
35621
+ );
35557
35622
  if (meta2?.fileInputs?.length) {
35558
35623
  if (remote) assertRequiredPresent(meta2, finalArgs);
35559
35624
  finalArgs = await prepareFileInputs(meta2.fileInputs, finalArgs ?? {}, {
@@ -35561,10 +35626,7 @@ function createToolsClient(options = {}) {
35561
35626
  uploadEndpoint: remote ? { url, token, formats: uploadFormats } : void 0,
35562
35627
  log: diagnose,
35563
35628
  baselineDirs,
35564
- collectMembers: collectFlowMembers,
35565
- collectStepMembers: olderServer ? (record2, o) => collectStepMembers(record2, o, (root) => path13.join(root, LEGACY_E2E_DIRS[0])) : collectStepMembers,
35566
- toolFileInputs: (tool) => findTool(tools, tool)?.fileInputs,
35567
- signal: opts?.signal
35629
+ ...memberOptions
35568
35630
  });
35569
35631
  }
35570
35632
  const settle2 = async (data2) => {
@@ -35589,9 +35651,9 @@ function createToolsClient(options = {}) {
35589
35651
  const unwrittenFailure = () => unwrittenBaselines.length > 0 ? `Baselines not written on this client: ${unwrittenBaselines.join(", ")}` : void 0;
35590
35652
  const stream = opts?.onProgress !== void 0 || carriesMembers(finalArgs);
35591
35653
  const sentOnce = carriesUpload(finalArgs);
35592
- const forwarded = remote ? await forwardedSecrets(finalArgs) : void 0;
35593
- const encodedSecrets = forwarded ? encodeClientSecrets(forwarded) : void 0;
35594
- const clientSecrets = forwarded?.size ? forwarded : void 0;
35654
+ const sent = await callerSecrets(remote ? finalArgs : scanned, remote);
35655
+ const encodedSecrets = sent ? encodeClientSecrets(sent.values) : void 0;
35656
+ const clientSecrets = sent?.values.size ? sent.values : void 0;
35595
35657
  const refusal = clientSecrets ? secretsTransportRefusal(url) : void 0;
35596
35658
  if (refusal !== void 0) {
35597
35659
  throw new Error(
@@ -35614,16 +35676,21 @@ function createToolsClient(options = {}) {
35614
35676
  ...stream ? { "Accept": "application/x-ndjson", "Accept-Encoding": "identity" } : {},
35615
35677
  ...authHeaders2(token)
35616
35678
  };
35617
- if (clientSecrets !== void 0 && encodedSecrets !== void 0) {
35618
- const headBytes = toolUrl.length + FETCH_HEAD_BYTES + Object.entries(headers).reduce(
35619
- (sum, [key, value]) => sum + key.length + value.length + 4,
35620
- 0
35621
- );
35622
- if (headBytes > maxHeaderSize) {
35623
- throw new Error(
35624
- `forward-secrets would send ${[...clientSecrets.keys()].join(", ")} in an ${CLIENT_SECRETS_HEADER} header of ${encodedSecrets.length} bytes, which takes the request headers past the ${maxHeaderSize} bytes a tool-server accepts, so the call was not sent. Define a secret this large on the machine running the tool-server instead.`
35679
+ const headBytes = () => toolUrl.length + FETCH_HEAD_BYTES + Object.entries(headers).reduce((sum, [key, value]) => sum + key.length + value.length + 4, 0);
35680
+ if (sent?.sources) {
35681
+ headers[CLIENT_SECRET_SOURCES_HEADER] = encodeSecretSourceSummaries(sent.sources);
35682
+ if (headBytes() > maxHeaderSize) {
35683
+ headers[CLIENT_SECRET_SOURCES_HEADER] = encodeSecretSourceSummaries(
35684
+ sent.sources.map((source) => ({ ...source, names: [] }))
35625
35685
  );
35626
35686
  }
35687
+ if (headBytes() > maxHeaderSize) delete headers[CLIENT_SECRET_SOURCES_HEADER];
35688
+ }
35689
+ if (clientSecrets !== void 0 && encodedSecrets !== void 0 && headBytes() > maxHeaderSize) {
35690
+ const names = [...clientSecrets.keys()].join(", ");
35691
+ throw new Error(
35692
+ remote ? `forward-secrets would send ${names} in an ${CLIENT_SECRETS_HEADER} header of ${encodedSecrets.length} bytes, which takes the request headers past the ${maxHeaderSize} bytes a tool-server accepts, so the call was not sent. Define a secret this large on the machine running the tool-server instead.` : `The values of ${names} take the ${CLIENT_SECRETS_HEADER} header to ${encodedSecrets.length} bytes, past the ${maxHeaderSize} bytes of request headers the tool-server accepts, so the call was not sent. One call can send about 11 KiB of secret values: split the text across several calls.`
35693
+ );
35627
35694
  }
35628
35695
  const res = await doFetch(
35629
35696
  toolUrl,
@@ -35682,7 +35749,7 @@ function createToolsClient(options = {}) {
35682
35749
  const headersRefused = res.status === 431 || res.status === 400 && errorBodyMessage(json) === void 0;
35683
35750
  if (clientSecrets && headersRefused) {
35684
35751
  throw new ToolInvocationError(
35685
- `The tool-server, or a proxy in front of it, refused the request headers (${res.status}), as it does when they are too large. The ${CLIENT_SECRETS_HEADER} header carried ${[...clientSecrets.keys()].join(", ")}; define a secret this large on the machine running the tool-server instead.`
35752
+ `The tool-server, or a proxy in front of it, refused the request headers (${res.status}), as it does when they are too large. The ${CLIENT_SECRETS_HEADER} header carried ${[...clientSecrets.keys()].join(", ")}; ` + (remote ? `define a secret this large on the machine running the tool-server instead.` : `split the text across several calls.`)
35686
35753
  );
35687
35754
  }
35688
35755
  if (!res.ok) {
@@ -35719,7 +35786,7 @@ import {
35719
35786
  } from "node:fs/promises";
35720
35787
  import { constants as fsConstants } from "node:fs";
35721
35788
  import { tmpdir as tmpdir2 } from "node:os";
35722
- import { basename as basename7, extname as extname2, isAbsolute as isAbsolute6, join as join14, normalize as normalize2, resolve as resolve11, sep as sep5 } from "node:path";
35789
+ import { basename as basename7, extname as extname2, isAbsolute as isAbsolute6, join as join14, normalize as normalize2, resolve as resolve11, sep as sep6 } from "node:path";
35723
35790
  import { createHash as createHash3 } from "node:crypto";
35724
35791
  var ARTIFACT_MARKER2 = "__argentArtifact";
35725
35792
  function isArtifactHandle(value) {
@@ -35767,7 +35834,7 @@ function configuredRecordingsDir() {
35767
35834
  const trimmed = value.trim();
35768
35835
  if (trimmed === "") return null;
35769
35836
  const home = resolveHomeDir();
35770
- const expanded = trimmed === "~" ? home : trimmed.startsWith("~/") || trimmed.startsWith(`~${sep5}`) ? join14(home, trimmed.slice(2)) : trimmed;
35837
+ const expanded = trimmed === "~" ? home : trimmed.startsWith("~/") || trimmed.startsWith(`~${sep6}`) ? join14(home, trimmed.slice(2)) : trimmed;
35771
35838
  return resolve11(durableBaseDir(), expanded);
35772
35839
  }
35773
35840
  var MAX_ARTIFACT_BYTES = 2 * 1024 * 1024 * 1024;
@@ -35815,7 +35882,7 @@ async function writeDurableUnique(dir, filename, write) {
35815
35882
  function durableSaveTarget(handle) {
35816
35883
  if (typeof handle.saveDir !== "string" || !handle.saveDir || handle.archive) return null;
35817
35884
  const rel = normalize2(handle.saveDir);
35818
- if (isAbsolute6(rel) || rel === ".." || rel.startsWith(`..${sep5}`) || rel.split(sep5).includes("..")) {
35885
+ if (isAbsolute6(rel) || rel === ".." || rel.startsWith(`..${sep6}`) || rel.split(sep6).includes("..")) {
35819
35886
  return null;
35820
35887
  }
35821
35888
  if (!ALLOWED_SAVE_DIRS.has(rel)) return null;
@@ -38155,7 +38222,7 @@ async function startMcpServer(options) {
38155
38222
  const autoDescribeOn = autoDescribeEnabled();
38156
38223
  const whatsNewOn = whatsNewEnabled();
38157
38224
  const installedVersion = getInstalledVersion();
38158
- const highlightsVersion = true ? "0.35.1-next.44" : installedVersion;
38225
+ const highlightsVersion = true ? "0.35.1-next.46" : installedVersion;
38159
38226
  const captureTimeoutMs = options.captureTimeoutMs ?? CAPTURE_TIMEOUT_MS;
38160
38227
  const trees = createTreeMemory();
38161
38228
  const screenshots = createScreenshotMemory();