@swmansion/argent 0.16.2-next.9 → 0.17.0

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.
@@ -6122,10 +6122,10 @@ var require_resolve_block_map = __commonJS({
6122
6122
  let offset = bm.offset;
6123
6123
  let commentEnd = null;
6124
6124
  for (const collItem of bm.items) {
6125
- const { start, key, sep: sep7, value } = collItem;
6125
+ const { start, key, sep: sep8, value } = collItem;
6126
6126
  const keyProps = resolveProps.resolveProps(start, {
6127
6127
  indicator: "explicit-key-ind",
6128
- next: key ?? sep7?.[0],
6128
+ next: key ?? sep8?.[0],
6129
6129
  offset,
6130
6130
  onError,
6131
6131
  parentIndent: bm.indent,
@@ -6139,7 +6139,7 @@ var require_resolve_block_map = __commonJS({
6139
6139
  else if ("indent" in key && key.indent !== bm.indent)
6140
6140
  onError(offset, "BAD_INDENT", startColMsg);
6141
6141
  }
6142
- if (!keyProps.anchor && !keyProps.tag && !sep7) {
6142
+ if (!keyProps.anchor && !keyProps.tag && !sep8) {
6143
6143
  commentEnd = keyProps.end;
6144
6144
  if (keyProps.comment) {
6145
6145
  if (map.comment)
@@ -6163,7 +6163,7 @@ var require_resolve_block_map = __commonJS({
6163
6163
  ctx.atKey = false;
6164
6164
  if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
6165
6165
  onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
6166
- const valueProps = resolveProps.resolveProps(sep7 ?? [], {
6166
+ const valueProps = resolveProps.resolveProps(sep8 ?? [], {
6167
6167
  indicator: "map-value-ind",
6168
6168
  next: value,
6169
6169
  offset: keyNode.range[2],
@@ -6179,7 +6179,7 @@ var require_resolve_block_map = __commonJS({
6179
6179
  if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
6180
6180
  onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
6181
6181
  }
6182
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep7, null, valueProps, onError);
6182
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep8, null, valueProps, onError);
6183
6183
  if (ctx.schema.compat)
6184
6184
  utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
6185
6185
  offset = valueNode.range[2];
@@ -6270,7 +6270,7 @@ var require_resolve_end = __commonJS({
6270
6270
  let comment = "";
6271
6271
  if (end) {
6272
6272
  let hasSpace = false;
6273
- let sep7 = "";
6273
+ let sep8 = "";
6274
6274
  for (const token of end) {
6275
6275
  const { source, type } = token;
6276
6276
  switch (type) {
@@ -6284,13 +6284,13 @@ var require_resolve_end = __commonJS({
6284
6284
  if (!comment)
6285
6285
  comment = cb;
6286
6286
  else
6287
- comment += sep7 + cb;
6288
- sep7 = "";
6287
+ comment += sep8 + cb;
6288
+ sep8 = "";
6289
6289
  break;
6290
6290
  }
6291
6291
  case "newline":
6292
6292
  if (comment)
6293
- sep7 += source;
6293
+ sep8 += source;
6294
6294
  hasSpace = true;
6295
6295
  break;
6296
6296
  default:
@@ -6333,18 +6333,18 @@ var require_resolve_flow_collection = __commonJS({
6333
6333
  let offset = fc.offset + fc.start.source.length;
6334
6334
  for (let i2 = 0; i2 < fc.items.length; ++i2) {
6335
6335
  const collItem = fc.items[i2];
6336
- const { start, key, sep: sep7, value } = collItem;
6336
+ const { start, key, sep: sep8, value } = collItem;
6337
6337
  const props = resolveProps.resolveProps(start, {
6338
6338
  flow: fcName,
6339
6339
  indicator: "explicit-key-ind",
6340
- next: key ?? sep7?.[0],
6340
+ next: key ?? sep8?.[0],
6341
6341
  offset,
6342
6342
  onError,
6343
6343
  parentIndent: fc.indent,
6344
6344
  startOnNewline: false
6345
6345
  });
6346
6346
  if (!props.found) {
6347
- if (!props.anchor && !props.tag && !sep7 && !value) {
6347
+ if (!props.anchor && !props.tag && !sep8 && !value) {
6348
6348
  if (i2 === 0 && props.comma)
6349
6349
  onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
6350
6350
  else if (i2 < fc.items.length - 1)
@@ -6398,8 +6398,8 @@ var require_resolve_flow_collection = __commonJS({
6398
6398
  }
6399
6399
  }
6400
6400
  }
6401
- if (!isMap2 && !sep7 && !props.found) {
6402
- const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep7, null, props, onError);
6401
+ if (!isMap2 && !sep8 && !props.found) {
6402
+ const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep8, null, props, onError);
6403
6403
  coll.items.push(valueNode);
6404
6404
  offset = valueNode.range[2];
6405
6405
  if (isBlock(value))
@@ -6411,7 +6411,7 @@ var require_resolve_flow_collection = __commonJS({
6411
6411
  if (isBlock(key))
6412
6412
  onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
6413
6413
  ctx.atKey = false;
6414
- const valueProps = resolveProps.resolveProps(sep7 ?? [], {
6414
+ const valueProps = resolveProps.resolveProps(sep8 ?? [], {
6415
6415
  flow: fcName,
6416
6416
  indicator: "map-value-ind",
6417
6417
  next: value,
@@ -6422,8 +6422,8 @@ var require_resolve_flow_collection = __commonJS({
6422
6422
  });
6423
6423
  if (valueProps.found) {
6424
6424
  if (!isMap2 && !props.found && ctx.options.strict) {
6425
- if (sep7)
6426
- for (const st of sep7) {
6425
+ if (sep8)
6426
+ for (const st of sep8) {
6427
6427
  if (st === valueProps.found)
6428
6428
  break;
6429
6429
  if (st.type === "newline") {
@@ -6440,7 +6440,7 @@ var require_resolve_flow_collection = __commonJS({
6440
6440
  else
6441
6441
  onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
6442
6442
  }
6443
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep7, null, valueProps, onError) : null;
6443
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep8, null, valueProps, onError) : null;
6444
6444
  if (valueNode) {
6445
6445
  if (isBlock(value))
6446
6446
  onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
@@ -6620,7 +6620,7 @@ var require_resolve_block_scalar = __commonJS({
6620
6620
  chompStart = i2 + 1;
6621
6621
  }
6622
6622
  let value = "";
6623
- let sep7 = "";
6623
+ let sep8 = "";
6624
6624
  let prevMoreIndented = false;
6625
6625
  for (let i2 = 0; i2 < contentStart; ++i2)
6626
6626
  value += lines[i2][0].slice(trimIndent) + "\n";
@@ -6637,24 +6637,24 @@ var require_resolve_block_scalar = __commonJS({
6637
6637
  indent = "";
6638
6638
  }
6639
6639
  if (type === Scalar.Scalar.BLOCK_LITERAL) {
6640
- value += sep7 + indent.slice(trimIndent) + content;
6641
- sep7 = "\n";
6640
+ value += sep8 + indent.slice(trimIndent) + content;
6641
+ sep8 = "\n";
6642
6642
  } else if (indent.length > trimIndent || content[0] === " ") {
6643
- if (sep7 === " ")
6644
- sep7 = "\n";
6645
- else if (!prevMoreIndented && sep7 === "\n")
6646
- sep7 = "\n\n";
6647
- value += sep7 + indent.slice(trimIndent) + content;
6648
- sep7 = "\n";
6643
+ if (sep8 === " ")
6644
+ sep8 = "\n";
6645
+ else if (!prevMoreIndented && sep8 === "\n")
6646
+ sep8 = "\n\n";
6647
+ value += sep8 + indent.slice(trimIndent) + content;
6648
+ sep8 = "\n";
6649
6649
  prevMoreIndented = true;
6650
6650
  } else if (content === "") {
6651
- if (sep7 === "\n")
6651
+ if (sep8 === "\n")
6652
6652
  value += "\n";
6653
6653
  else
6654
- sep7 = "\n";
6654
+ sep8 = "\n";
6655
6655
  } else {
6656
- value += sep7 + content;
6657
- sep7 = " ";
6656
+ value += sep8 + content;
6657
+ sep8 = " ";
6658
6658
  prevMoreIndented = false;
6659
6659
  }
6660
6660
  }
@@ -6836,25 +6836,25 @@ var require_resolve_flow_scalar = __commonJS({
6836
6836
  if (!match)
6837
6837
  return source;
6838
6838
  let res = match[1];
6839
- let sep7 = " ";
6839
+ let sep8 = " ";
6840
6840
  let pos = first.lastIndex;
6841
6841
  line.lastIndex = pos;
6842
6842
  while (match = line.exec(source)) {
6843
6843
  if (match[1] === "") {
6844
- if (sep7 === "\n")
6845
- res += sep7;
6844
+ if (sep8 === "\n")
6845
+ res += sep8;
6846
6846
  else
6847
- sep7 = "\n";
6847
+ sep8 = "\n";
6848
6848
  } else {
6849
- res += sep7 + match[1];
6850
- sep7 = " ";
6849
+ res += sep8 + match[1];
6850
+ sep8 = " ";
6851
6851
  }
6852
6852
  pos = line.lastIndex;
6853
6853
  }
6854
6854
  const last = /[ \t]*(.*)/sy;
6855
6855
  last.lastIndex = pos;
6856
6856
  match = last.exec(source);
6857
- return res + sep7 + (match?.[1] ?? "");
6857
+ return res + sep8 + (match?.[1] ?? "");
6858
6858
  }
6859
6859
  function doubleQuotedValue(source, onError) {
6860
6860
  let res = "";
@@ -7664,14 +7664,14 @@ var require_cst_stringify = __commonJS({
7664
7664
  }
7665
7665
  }
7666
7666
  }
7667
- function stringifyItem({ start, key, sep: sep7, value }) {
7667
+ function stringifyItem({ start, key, sep: sep8, value }) {
7668
7668
  let res = "";
7669
7669
  for (const st of start)
7670
7670
  res += st.source;
7671
7671
  if (key)
7672
7672
  res += stringifyToken(key);
7673
- if (sep7)
7674
- for (const st of sep7)
7673
+ if (sep8)
7674
+ for (const st of sep8)
7675
7675
  res += st.source;
7676
7676
  if (value)
7677
7677
  res += stringifyToken(value);
@@ -8838,18 +8838,18 @@ var require_parser = __commonJS({
8838
8838
  if (this.type === "map-value-ind") {
8839
8839
  const prev = getPrevProps(this.peek(2));
8840
8840
  const start = getFirstKeyStartProps(prev);
8841
- let sep7;
8841
+ let sep8;
8842
8842
  if (scalar.end) {
8843
- sep7 = scalar.end;
8844
- sep7.push(this.sourceToken);
8843
+ sep8 = scalar.end;
8844
+ sep8.push(this.sourceToken);
8845
8845
  delete scalar.end;
8846
8846
  } else
8847
- sep7 = [this.sourceToken];
8847
+ sep8 = [this.sourceToken];
8848
8848
  const map = {
8849
8849
  type: "block-map",
8850
8850
  offset: scalar.offset,
8851
8851
  indent: scalar.indent,
8852
- items: [{ start, key: scalar, sep: sep7 }]
8852
+ items: [{ start, key: scalar, sep: sep8 }]
8853
8853
  };
8854
8854
  this.onKeyLine = true;
8855
8855
  this.stack[this.stack.length - 1] = map;
@@ -9002,15 +9002,15 @@ var require_parser = __commonJS({
9002
9002
  } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
9003
9003
  const start2 = getFirstKeyStartProps(it.start);
9004
9004
  const key = it.key;
9005
- const sep7 = it.sep;
9006
- sep7.push(this.sourceToken);
9005
+ const sep8 = it.sep;
9006
+ sep8.push(this.sourceToken);
9007
9007
  delete it.key;
9008
9008
  delete it.sep;
9009
9009
  this.stack.push({
9010
9010
  type: "block-map",
9011
9011
  offset: this.offset,
9012
9012
  indent: this.indent,
9013
- items: [{ start: start2, key, sep: sep7 }]
9013
+ items: [{ start: start2, key, sep: sep8 }]
9014
9014
  });
9015
9015
  } else if (start.length > 0) {
9016
9016
  it.sep = it.sep.concat(start, this.sourceToken);
@@ -9204,13 +9204,13 @@ var require_parser = __commonJS({
9204
9204
  const prev = getPrevProps(parent);
9205
9205
  const start = getFirstKeyStartProps(prev);
9206
9206
  fixFlowSeqItems(fc);
9207
- const sep7 = fc.end.splice(1, fc.end.length);
9208
- sep7.push(this.sourceToken);
9207
+ const sep8 = fc.end.splice(1, fc.end.length);
9208
+ sep8.push(this.sourceToken);
9209
9209
  const map = {
9210
9210
  type: "block-map",
9211
9211
  offset: fc.offset,
9212
9212
  indent: fc.indent,
9213
- items: [{ start, key: fc, sep: sep7 }]
9213
+ items: [{ start, key: fc, sep: sep8 }]
9214
9214
  };
9215
9215
  this.onKeyLine = true;
9216
9216
  this.stack[this.stack.length - 1] = map;
@@ -16209,6 +16209,7 @@ var FAILURE_CODES = {
16209
16209
  SCREEN_RECORDING_NO_ACTIVE_SESSION: "SCREEN_RECORDING_NO_ACTIVE_SESSION",
16210
16210
  SCREEN_RECORDING_STOP_IN_PROGRESS: "SCREEN_RECORDING_STOP_IN_PROGRESS",
16211
16211
  SCREEN_RECORDING_START_EXITED: "SCREEN_RECORDING_START_EXITED",
16212
+ SCREEN_RECORDING_START_TIMEOUT: "SCREEN_RECORDING_START_TIMEOUT",
16212
16213
  SCREEN_RECORDING_PROCESS_ERROR: "SCREEN_RECORDING_PROCESS_ERROR",
16213
16214
  SCREEN_RECORDING_OUTPUT_MISSING: "SCREEN_RECORDING_OUTPUT_MISSING",
16214
16215
  SCREEN_RECORDING_SERVER_SHUTTING_DOWN: "SCREEN_RECORDING_SERVER_SHUTTING_DOWN",
@@ -17043,7 +17044,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
17043
17044
  var SESSION_ID = randomUUID3();
17044
17045
  function readCliVersion() {
17045
17046
  if (true) {
17046
- return "0.16.1";
17047
+ return "0.17.0";
17047
17048
  }
17048
17049
  return "0.0.0";
17049
17050
  }
@@ -18190,7 +18191,7 @@ function skipVoid(str, ptr, banNewLines, banComments) {
18190
18191
  }
18191
18192
  return ptr;
18192
18193
  }
18193
- function skipUntil(str, ptr, sep7, end, banNewLines = false) {
18194
+ function skipUntil(str, ptr, sep8, end, banNewLines = false) {
18194
18195
  if (!end) {
18195
18196
  ptr = indexOfNewline(str, ptr);
18196
18197
  return ptr < 0 ? str.length : ptr;
@@ -18199,7 +18200,7 @@ function skipUntil(str, ptr, sep7, end, banNewLines = false) {
18199
18200
  let c2 = str[i2];
18200
18201
  if (c2 === "#") {
18201
18202
  i2 = indexOfNewline(str, i2);
18202
- } else if (c2 === sep7) {
18203
+ } else if (c2 === sep8) {
18203
18204
  return i2 + 1;
18204
18205
  } else if (c2 === end || banNewLines && (c2 === "\n" || c2 === "\r" && str[i2 + 1] === "\n")) {
18205
18206
  return i2;
@@ -19465,11 +19466,11 @@ function parseTree(text2, errors = [], options = ParseOptions.DEFAULT) {
19465
19466
  onValue({ type: getNodeType(value), offset, length, parent: currentParent, value });
19466
19467
  ensurePropertyComplete(offset + length);
19467
19468
  },
19468
- onSeparator: (sep7, offset, length) => {
19469
+ onSeparator: (sep8, offset, length) => {
19469
19470
  if (currentParent.type === "property") {
19470
- if (sep7 === ":") {
19471
+ if (sep8 === ":") {
19471
19472
  currentParent.colonOffset = offset;
19472
- } else if (sep7 === ",") {
19473
+ } else if (sep8 === ",") {
19473
19474
  ensurePropertyComplete(offset);
19474
19475
  }
19475
19476
  }
@@ -20064,12 +20065,12 @@ function applyEdits(text2, edits) {
20064
20065
  // ../argent-installer/src/package-root.ts
20065
20066
  import * as fs7 from "node:fs";
20066
20067
  import * as path7 from "node:path";
20067
- function resolvePackageRoot(dirname14) {
20068
- let current = path7.resolve(dirname14);
20068
+ function resolvePackageRoot(dirname15) {
20069
+ let current = path7.resolve(dirname15);
20069
20070
  while (true) {
20070
20071
  if (fs7.existsSync(path7.join(current, "package.json"))) return current;
20071
20072
  const parent = path7.dirname(current);
20072
- if (parent === current) return path7.resolve(dirname14);
20073
+ if (parent === current) return path7.resolve(dirname15);
20073
20074
  current = parent;
20074
20075
  }
20075
20076
  }
@@ -23675,10 +23676,13 @@ var execFileAsync = promisify(execFile);
23675
23676
  var MAX_CONTENT_BYTES = 32 * 1024 * 1024;
23676
23677
 
23677
23678
  // ../argent-tools-client/src/artifacts.ts
23678
- import { mkdir as mkdir4, readFile as readFile4, rm as rm3, stat as stat3, writeFile as writeFile4 } from "node:fs/promises";
23679
+ import { copyFile, mkdir as mkdir4, readFile as readFile4, realpath, rm as rm3, stat as stat3, writeFile as writeFile4 } from "node:fs/promises";
23680
+ import { constants as fsConstants } from "node:fs";
23679
23681
  import { tmpdir as tmpdir2 } from "node:os";
23680
- import { basename as basename4, join as join19 } from "node:path";
23682
+ import { basename as basename4, dirname as dirname13, extname as extname2, isAbsolute as isAbsolute5, join as join19, normalize, sep as sep6 } from "node:path";
23681
23683
  import { createHash as createHash4 } from "node:crypto";
23684
+ var ALLOWED_SAVE_DIRS = /* @__PURE__ */ new Set([normalize(".argent/recordings")]);
23685
+ var MAX_DURABLE_BYTES = 2 * 1024 * 1024 * 1024;
23682
23686
 
23683
23687
  // ../argent-installer/src/update.ts
23684
23688
  function getRequestedVersion(args) {