ai-hero-cli 0.2.10 → 0.2.12

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 (2) hide show
  1. package/bin.cjs +1077 -573
  2. package/package.json +1 -1
package/bin.cjs CHANGED
@@ -3886,8 +3886,8 @@ var require_compiler = __commonJS({
3886
3886
  valueAssignments.push(fullPath);
3887
3887
  }
3888
3888
  }
3889
- function pathAssigned(path14) {
3890
- return assignedPaths.indexOf(path14) !== -1;
3889
+ function pathAssigned(path15) {
3890
+ return assignedPaths.indexOf(path15) !== -1;
3891
3891
  }
3892
3892
  function reduceValueNode(node) {
3893
3893
  if (node.type === "Array") {
@@ -3911,20 +3911,20 @@ var require_compiler = __commonJS({
3911
3911
  return obj;
3912
3912
  }
3913
3913
  function setPath(node) {
3914
- var path14 = node.value;
3915
- var quotedPath = path14.map(quoteDottedString).join(".");
3914
+ var path15 = node.value;
3915
+ var quotedPath = path15.map(quoteDottedString).join(".");
3916
3916
  var line4 = node.line;
3917
3917
  var column3 = node.column;
3918
3918
  if (pathAssigned(quotedPath)) {
3919
- genError("Cannot redefine existing key '" + path14 + "'.", line4, column3);
3919
+ genError("Cannot redefine existing key '" + path15 + "'.", line4, column3);
3920
3920
  }
3921
3921
  assignedPaths.push(quotedPath);
3922
- context8 = deepRef(data, path14, /* @__PURE__ */ Object.create(null), line4, column3);
3923
- currentPath = path14;
3922
+ context8 = deepRef(data, path15, /* @__PURE__ */ Object.create(null), line4, column3);
3923
+ currentPath = path15;
3924
3924
  }
3925
3925
  function addTableArray(node) {
3926
- var path14 = node.value;
3927
- var quotedPath = path14.map(quoteDottedString).join(".");
3926
+ var path15 = node.value;
3927
+ var quotedPath = path15.map(quoteDottedString).join(".");
3928
3928
  var line4 = node.line;
3929
3929
  var column3 = node.column;
3930
3930
  if (!pathAssigned(quotedPath)) {
@@ -3934,14 +3934,14 @@ var require_compiler = __commonJS({
3934
3934
  return p3.indexOf(quotedPath) !== 0;
3935
3935
  });
3936
3936
  assignedPaths.push(quotedPath);
3937
- context8 = deepRef(data, path14, [], line4, column3);
3937
+ context8 = deepRef(data, path15, [], line4, column3);
3938
3938
  currentPath = quotedPath;
3939
3939
  if (context8 instanceof Array) {
3940
3940
  var newObj = /* @__PURE__ */ Object.create(null);
3941
3941
  context8.push(newObj);
3942
3942
  context8 = newObj;
3943
3943
  } else {
3944
- genError("Cannot redefine existing key '" + path14 + "'.", line4, column3);
3944
+ genError("Cannot redefine existing key '" + path15 + "'.", line4, column3);
3945
3945
  }
3946
3946
  }
3947
3947
  function deepRef(start5, keys6, value5, line4, column3) {
@@ -4086,17 +4086,17 @@ var require_visit = __commonJS({
4086
4086
  visit.BREAK = BREAK;
4087
4087
  visit.SKIP = SKIP;
4088
4088
  visit.REMOVE = REMOVE;
4089
- function visit_(key, node, visitor, path14) {
4090
- const ctrl = callVisitor(key, node, visitor, path14);
4089
+ function visit_(key, node, visitor, path15) {
4090
+ const ctrl = callVisitor(key, node, visitor, path15);
4091
4091
  if (identity3.isNode(ctrl) || identity3.isPair(ctrl)) {
4092
- replaceNode(key, path14, ctrl);
4093
- return visit_(key, ctrl, visitor, path14);
4092
+ replaceNode(key, path15, ctrl);
4093
+ return visit_(key, ctrl, visitor, path15);
4094
4094
  }
4095
4095
  if (typeof ctrl !== "symbol") {
4096
4096
  if (identity3.isCollection(node)) {
4097
- path14 = Object.freeze(path14.concat(node));
4097
+ path15 = Object.freeze(path15.concat(node));
4098
4098
  for (let i = 0; i < node.items.length; ++i) {
4099
- const ci = visit_(i, node.items[i], visitor, path14);
4099
+ const ci = visit_(i, node.items[i], visitor, path15);
4100
4100
  if (typeof ci === "number")
4101
4101
  i = ci - 1;
4102
4102
  else if (ci === BREAK)
@@ -4107,13 +4107,13 @@ var require_visit = __commonJS({
4107
4107
  }
4108
4108
  }
4109
4109
  } else if (identity3.isPair(node)) {
4110
- path14 = Object.freeze(path14.concat(node));
4111
- const ck = visit_("key", node.key, visitor, path14);
4110
+ path15 = Object.freeze(path15.concat(node));
4111
+ const ck = visit_("key", node.key, visitor, path15);
4112
4112
  if (ck === BREAK)
4113
4113
  return BREAK;
4114
4114
  else if (ck === REMOVE)
4115
4115
  node.key = null;
4116
- const cv = visit_("value", node.value, visitor, path14);
4116
+ const cv = visit_("value", node.value, visitor, path15);
4117
4117
  if (cv === BREAK)
4118
4118
  return BREAK;
4119
4119
  else if (cv === REMOVE)
@@ -4134,17 +4134,17 @@ var require_visit = __commonJS({
4134
4134
  visitAsync.BREAK = BREAK;
4135
4135
  visitAsync.SKIP = SKIP;
4136
4136
  visitAsync.REMOVE = REMOVE;
4137
- async function visitAsync_(key, node, visitor, path14) {
4138
- const ctrl = await callVisitor(key, node, visitor, path14);
4137
+ async function visitAsync_(key, node, visitor, path15) {
4138
+ const ctrl = await callVisitor(key, node, visitor, path15);
4139
4139
  if (identity3.isNode(ctrl) || identity3.isPair(ctrl)) {
4140
- replaceNode(key, path14, ctrl);
4141
- return visitAsync_(key, ctrl, visitor, path14);
4140
+ replaceNode(key, path15, ctrl);
4141
+ return visitAsync_(key, ctrl, visitor, path15);
4142
4142
  }
4143
4143
  if (typeof ctrl !== "symbol") {
4144
4144
  if (identity3.isCollection(node)) {
4145
- path14 = Object.freeze(path14.concat(node));
4145
+ path15 = Object.freeze(path15.concat(node));
4146
4146
  for (let i = 0; i < node.items.length; ++i) {
4147
- const ci = await visitAsync_(i, node.items[i], visitor, path14);
4147
+ const ci = await visitAsync_(i, node.items[i], visitor, path15);
4148
4148
  if (typeof ci === "number")
4149
4149
  i = ci - 1;
4150
4150
  else if (ci === BREAK)
@@ -4155,13 +4155,13 @@ var require_visit = __commonJS({
4155
4155
  }
4156
4156
  }
4157
4157
  } else if (identity3.isPair(node)) {
4158
- path14 = Object.freeze(path14.concat(node));
4159
- const ck = await visitAsync_("key", node.key, visitor, path14);
4158
+ path15 = Object.freeze(path15.concat(node));
4159
+ const ck = await visitAsync_("key", node.key, visitor, path15);
4160
4160
  if (ck === BREAK)
4161
4161
  return BREAK;
4162
4162
  else if (ck === REMOVE)
4163
4163
  node.key = null;
4164
- const cv = await visitAsync_("value", node.value, visitor, path14);
4164
+ const cv = await visitAsync_("value", node.value, visitor, path15);
4165
4165
  if (cv === BREAK)
4166
4166
  return BREAK;
4167
4167
  else if (cv === REMOVE)
@@ -4188,23 +4188,23 @@ var require_visit = __commonJS({
4188
4188
  }
4189
4189
  return visitor;
4190
4190
  }
4191
- function callVisitor(key, node, visitor, path14) {
4191
+ function callVisitor(key, node, visitor, path15) {
4192
4192
  if (typeof visitor === "function")
4193
- return visitor(key, node, path14);
4193
+ return visitor(key, node, path15);
4194
4194
  if (identity3.isMap(node))
4195
- return visitor.Map?.(key, node, path14);
4195
+ return visitor.Map?.(key, node, path15);
4196
4196
  if (identity3.isSeq(node))
4197
- return visitor.Seq?.(key, node, path14);
4197
+ return visitor.Seq?.(key, node, path15);
4198
4198
  if (identity3.isPair(node))
4199
- return visitor.Pair?.(key, node, path14);
4199
+ return visitor.Pair?.(key, node, path15);
4200
4200
  if (identity3.isScalar(node))
4201
- return visitor.Scalar?.(key, node, path14);
4201
+ return visitor.Scalar?.(key, node, path15);
4202
4202
  if (identity3.isAlias(node))
4203
- return visitor.Alias?.(key, node, path14);
4203
+ return visitor.Alias?.(key, node, path15);
4204
4204
  return void 0;
4205
4205
  }
4206
- function replaceNode(key, path14, node) {
4207
- const parent = path14[path14.length - 1];
4206
+ function replaceNode(key, path15, node) {
4207
+ const parent = path15[path15.length - 1];
4208
4208
  if (identity3.isCollection(parent)) {
4209
4209
  parent.items[key] = node;
4210
4210
  } else if (identity3.isPair(parent)) {
@@ -4803,10 +4803,10 @@ var require_Collection = __commonJS({
4803
4803
  var createNode = require_createNode();
4804
4804
  var identity3 = require_identity();
4805
4805
  var Node = require_Node();
4806
- function collectionFromPath(schema, path14, value5) {
4806
+ function collectionFromPath(schema, path15, value5) {
4807
4807
  let v = value5;
4808
- for (let i = path14.length - 1; i >= 0; --i) {
4809
- const k = path14[i];
4808
+ for (let i = path15.length - 1; i >= 0; --i) {
4809
+ const k = path15[i];
4810
4810
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
4811
4811
  const a = [];
4812
4812
  a[k] = v;
@@ -4825,7 +4825,7 @@ var require_Collection = __commonJS({
4825
4825
  sourceObjects: /* @__PURE__ */ new Map()
4826
4826
  });
4827
4827
  }
4828
- var isEmptyPath = (path14) => path14 == null || typeof path14 === "object" && !!path14[Symbol.iterator]().next().done;
4828
+ var isEmptyPath = (path15) => path15 == null || typeof path15 === "object" && !!path15[Symbol.iterator]().next().done;
4829
4829
  var Collection = class extends Node.NodeBase {
4830
4830
  constructor(type2, schema) {
4831
4831
  super(type2);
@@ -4855,11 +4855,11 @@ var require_Collection = __commonJS({
4855
4855
  * be a Pair instance or a `{ key, value }` object, which may not have a key
4856
4856
  * that already exists in the map.
4857
4857
  */
4858
- addIn(path14, value5) {
4859
- if (isEmptyPath(path14))
4858
+ addIn(path15, value5) {
4859
+ if (isEmptyPath(path15))
4860
4860
  this.add(value5);
4861
4861
  else {
4862
- const [key, ...rest] = path14;
4862
+ const [key, ...rest] = path15;
4863
4863
  const node = this.get(key, true);
4864
4864
  if (identity3.isCollection(node))
4865
4865
  node.addIn(rest, value5);
@@ -4873,8 +4873,8 @@ var require_Collection = __commonJS({
4873
4873
  * Removes a value from the collection.
4874
4874
  * @returns `true` if the item was found and removed.
4875
4875
  */
4876
- deleteIn(path14) {
4877
- const [key, ...rest] = path14;
4876
+ deleteIn(path15) {
4877
+ const [key, ...rest] = path15;
4878
4878
  if (rest.length === 0)
4879
4879
  return this.delete(key);
4880
4880
  const node = this.get(key, true);
@@ -4888,8 +4888,8 @@ var require_Collection = __commonJS({
4888
4888
  * scalar values from their surrounding node; to disable set `keepScalar` to
4889
4889
  * `true` (collections are always returned intact).
4890
4890
  */
4891
- getIn(path14, keepScalar) {
4892
- const [key, ...rest] = path14;
4891
+ getIn(path15, keepScalar) {
4892
+ const [key, ...rest] = path15;
4893
4893
  const node = this.get(key, true);
4894
4894
  if (rest.length === 0)
4895
4895
  return !keepScalar && identity3.isScalar(node) ? node.value : node;
@@ -4907,8 +4907,8 @@ var require_Collection = __commonJS({
4907
4907
  /**
4908
4908
  * Checks if the collection includes a value with the key `key`.
4909
4909
  */
4910
- hasIn(path14) {
4911
- const [key, ...rest] = path14;
4910
+ hasIn(path15) {
4911
+ const [key, ...rest] = path15;
4912
4912
  if (rest.length === 0)
4913
4913
  return this.has(key);
4914
4914
  const node = this.get(key, true);
@@ -4918,8 +4918,8 @@ var require_Collection = __commonJS({
4918
4918
  * Sets a value in this collection. For `!!set`, `value` needs to be a
4919
4919
  * boolean to add/remove the item from the set.
4920
4920
  */
4921
- setIn(path14, value5) {
4922
- const [key, ...rest] = path14;
4921
+ setIn(path15, value5) {
4922
+ const [key, ...rest] = path15;
4923
4923
  if (rest.length === 0) {
4924
4924
  this.set(key, value5);
4925
4925
  } else {
@@ -7388,9 +7388,9 @@ var require_Document = __commonJS({
7388
7388
  this.contents.add(value5);
7389
7389
  }
7390
7390
  /** Adds a value to the document. */
7391
- addIn(path14, value5) {
7391
+ addIn(path15, value5) {
7392
7392
  if (assertCollection(this.contents))
7393
- this.contents.addIn(path14, value5);
7393
+ this.contents.addIn(path15, value5);
7394
7394
  }
7395
7395
  /**
7396
7396
  * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
@@ -7465,14 +7465,14 @@ var require_Document = __commonJS({
7465
7465
  * Removes a value from the document.
7466
7466
  * @returns `true` if the item was found and removed.
7467
7467
  */
7468
- deleteIn(path14) {
7469
- if (Collection.isEmptyPath(path14)) {
7468
+ deleteIn(path15) {
7469
+ if (Collection.isEmptyPath(path15)) {
7470
7470
  if (this.contents == null)
7471
7471
  return false;
7472
7472
  this.contents = null;
7473
7473
  return true;
7474
7474
  }
7475
- return assertCollection(this.contents) ? this.contents.deleteIn(path14) : false;
7475
+ return assertCollection(this.contents) ? this.contents.deleteIn(path15) : false;
7476
7476
  }
7477
7477
  /**
7478
7478
  * Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -7487,10 +7487,10 @@ var require_Document = __commonJS({
7487
7487
  * scalar values from their surrounding node; to disable set `keepScalar` to
7488
7488
  * `true` (collections are always returned intact).
7489
7489
  */
7490
- getIn(path14, keepScalar) {
7491
- if (Collection.isEmptyPath(path14))
7490
+ getIn(path15, keepScalar) {
7491
+ if (Collection.isEmptyPath(path15))
7492
7492
  return !keepScalar && identity3.isScalar(this.contents) ? this.contents.value : this.contents;
7493
- return identity3.isCollection(this.contents) ? this.contents.getIn(path14, keepScalar) : void 0;
7493
+ return identity3.isCollection(this.contents) ? this.contents.getIn(path15, keepScalar) : void 0;
7494
7494
  }
7495
7495
  /**
7496
7496
  * Checks if the document includes a value with the key `key`.
@@ -7501,10 +7501,10 @@ var require_Document = __commonJS({
7501
7501
  /**
7502
7502
  * Checks if the document includes a value at `path`.
7503
7503
  */
7504
- hasIn(path14) {
7505
- if (Collection.isEmptyPath(path14))
7504
+ hasIn(path15) {
7505
+ if (Collection.isEmptyPath(path15))
7506
7506
  return this.contents !== void 0;
7507
- return identity3.isCollection(this.contents) ? this.contents.hasIn(path14) : false;
7507
+ return identity3.isCollection(this.contents) ? this.contents.hasIn(path15) : false;
7508
7508
  }
7509
7509
  /**
7510
7510
  * Sets a value in this document. For `!!set`, `value` needs to be a
@@ -7521,13 +7521,13 @@ var require_Document = __commonJS({
7521
7521
  * Sets a value in this document. For `!!set`, `value` needs to be a
7522
7522
  * boolean to add/remove the item from the set.
7523
7523
  */
7524
- setIn(path14, value5) {
7525
- if (Collection.isEmptyPath(path14)) {
7524
+ setIn(path15, value5) {
7525
+ if (Collection.isEmptyPath(path15)) {
7526
7526
  this.contents = value5;
7527
7527
  } else if (this.contents == null) {
7528
- this.contents = Collection.collectionFromPath(this.schema, Array.from(path14), value5);
7528
+ this.contents = Collection.collectionFromPath(this.schema, Array.from(path15), value5);
7529
7529
  } else if (assertCollection(this.contents)) {
7530
- this.contents.setIn(path14, value5);
7530
+ this.contents.setIn(path15, value5);
7531
7531
  }
7532
7532
  }
7533
7533
  /**
@@ -9459,9 +9459,9 @@ var require_cst_visit = __commonJS({
9459
9459
  visit.BREAK = BREAK;
9460
9460
  visit.SKIP = SKIP;
9461
9461
  visit.REMOVE = REMOVE;
9462
- visit.itemAtPath = (cst, path14) => {
9462
+ visit.itemAtPath = (cst, path15) => {
9463
9463
  let item = cst;
9464
- for (const [field, index] of path14) {
9464
+ for (const [field, index] of path15) {
9465
9465
  const tok = item?.[field];
9466
9466
  if (tok && "items" in tok) {
9467
9467
  item = tok.items[index];
@@ -9470,23 +9470,23 @@ var require_cst_visit = __commonJS({
9470
9470
  }
9471
9471
  return item;
9472
9472
  };
9473
- visit.parentCollection = (cst, path14) => {
9474
- const parent = visit.itemAtPath(cst, path14.slice(0, -1));
9475
- const field = path14[path14.length - 1][0];
9473
+ visit.parentCollection = (cst, path15) => {
9474
+ const parent = visit.itemAtPath(cst, path15.slice(0, -1));
9475
+ const field = path15[path15.length - 1][0];
9476
9476
  const coll = parent?.[field];
9477
9477
  if (coll && "items" in coll)
9478
9478
  return coll;
9479
9479
  throw new Error("Parent collection not found");
9480
9480
  };
9481
- function _visit(path14, item, visitor) {
9482
- let ctrl = visitor(item, path14);
9481
+ function _visit(path15, item, visitor) {
9482
+ let ctrl = visitor(item, path15);
9483
9483
  if (typeof ctrl === "symbol")
9484
9484
  return ctrl;
9485
9485
  for (const field of ["key", "value"]) {
9486
9486
  const token = item[field];
9487
9487
  if (token && "items" in token) {
9488
9488
  for (let i = 0; i < token.items.length; ++i) {
9489
- const ci = _visit(Object.freeze(path14.concat([[field, i]])), token.items[i], visitor);
9489
+ const ci = _visit(Object.freeze(path15.concat([[field, i]])), token.items[i], visitor);
9490
9490
  if (typeof ci === "number")
9491
9491
  i = ci - 1;
9492
9492
  else if (ci === BREAK)
@@ -9497,10 +9497,10 @@ var require_cst_visit = __commonJS({
9497
9497
  }
9498
9498
  }
9499
9499
  if (typeof ctrl === "function" && field === "key")
9500
- ctrl = ctrl(item, path14);
9500
+ ctrl = ctrl(item, path15);
9501
9501
  }
9502
9502
  }
9503
- return typeof ctrl === "function" ? ctrl(item, path14) : ctrl;
9503
+ return typeof ctrl === "function" ? ctrl(item, path15) : ctrl;
9504
9504
  }
9505
9505
  exports.visit = visit;
9506
9506
  }
@@ -11482,10 +11482,10 @@ var require_clear = __commonJS({
11482
11482
  var erase = _require.erase;
11483
11483
  var cursor = _require.cursor;
11484
11484
  var width3 = (str) => [...strip(str)].length;
11485
- module.exports = function(prompt9, perLine) {
11485
+ module.exports = function(prompt10, perLine) {
11486
11486
  if (!perLine) return erase.line + cursor.to(0);
11487
11487
  let rows = 0;
11488
- const lines4 = prompt9.split(/\r?\n/);
11488
+ const lines4 = prompt10.split(/\r?\n/);
11489
11489
  var _iterator = _createForOfIteratorHelper(lines4), _step;
11490
11490
  try {
11491
11491
  for (_iterator.s(); !(_step = _iterator.n()).done; ) {
@@ -13086,14 +13086,14 @@ Instructions:
13086
13086
  if (this.closed) return;
13087
13087
  if (this.firstRender) this.out.write(cursor.hide);
13088
13088
  super.render();
13089
- let prompt9 = [style.symbol(this.done, this.aborted), color3.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(" ");
13089
+ let prompt10 = [style.symbol(this.done, this.aborted), color3.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(" ");
13090
13090
  if (this.showMinError) {
13091
- prompt9 += color3.red(`You must select a minimum of ${this.minSelected} choices.`);
13091
+ prompt10 += color3.red(`You must select a minimum of ${this.minSelected} choices.`);
13092
13092
  this.showMinError = false;
13093
13093
  }
13094
- prompt9 += this.renderOptions(this.value);
13095
- this.out.write(this.clear + prompt9);
13096
- this.clear = clear3(prompt9, this.out.columns);
13094
+ prompt10 += this.renderOptions(this.value);
13095
+ this.out.write(this.clear + prompt10);
13096
+ this.clear = clear3(prompt10, this.out.columns);
13097
13097
  }
13098
13098
  };
13099
13099
  module.exports = MultiselectPrompt;
@@ -13498,14 +13498,14 @@ Filtered results for: ${this.inputValue ? this.inputValue : color3.gray("Enter s
13498
13498
  if (this.closed) return;
13499
13499
  if (this.firstRender) this.out.write(cursor.hide);
13500
13500
  super.render();
13501
- let prompt9 = [style.symbol(this.done, this.aborted), color3.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(" ");
13501
+ let prompt10 = [style.symbol(this.done, this.aborted), color3.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(" ");
13502
13502
  if (this.showMinError) {
13503
- prompt9 += color3.red(`You must select a minimum of ${this.minSelected} choices.`);
13503
+ prompt10 += color3.red(`You must select a minimum of ${this.minSelected} choices.`);
13504
13504
  this.showMinError = false;
13505
13505
  }
13506
- prompt9 += this.renderOptions(this.filteredOptions);
13507
- this.out.write(this.clear + prompt9);
13508
- this.clear = clear3(prompt9, this.out.columns);
13506
+ prompt10 += this.renderOptions(this.filteredOptions);
13507
+ this.out.write(this.clear + prompt10);
13508
+ this.clear = clear3(prompt10, this.out.columns);
13509
13509
  }
13510
13510
  };
13511
13511
  module.exports = AutocompleteMultiselectPrompt;
@@ -13785,7 +13785,7 @@ var require_dist2 = __commonJS({
13785
13785
  var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
13786
13786
  var noop = () => {
13787
13787
  };
13788
- function prompt9() {
13788
+ function prompt10() {
13789
13789
  return _prompt.apply(this, arguments);
13790
13790
  }
13791
13791
  function _prompt() {
@@ -13794,7 +13794,7 @@ var require_dist2 = __commonJS({
13794
13794
  onCancel = noop
13795
13795
  } = {}) {
13796
13796
  const answers = {};
13797
- const override2 = prompt9._override || {};
13797
+ const override2 = prompt10._override || {};
13798
13798
  questions = [].concat(questions);
13799
13799
  let answer, question, quit, name, type2, lastPrompt;
13800
13800
  const getFormattedAnswer = /* @__PURE__ */ (function() {
@@ -13843,7 +13843,7 @@ var require_dist2 = __commonJS({
13843
13843
  }
13844
13844
  }
13845
13845
  try {
13846
- answer = prompt9._injected ? getInjectedAnswer(prompt9._injected, question.initial) : yield prompts[type2](question);
13846
+ answer = prompt10._injected ? getInjectedAnswer(prompt10._injected, question.initial) : yield prompts[type2](question);
13847
13847
  answers[name] = answer = yield getFormattedAnswer(question, answer, true);
13848
13848
  quit = yield onSubmit(question, answer, answers);
13849
13849
  } catch (err) {
@@ -13868,13 +13868,13 @@ var require_dist2 = __commonJS({
13868
13868
  return answer === void 0 ? deafultValue : answer;
13869
13869
  }
13870
13870
  function inject(answers) {
13871
- prompt9._injected = (prompt9._injected || []).concat(answers);
13871
+ prompt10._injected = (prompt10._injected || []).concat(answers);
13872
13872
  }
13873
13873
  function override(answers) {
13874
- prompt9._override = Object.assign({}, answers);
13874
+ prompt10._override = Object.assign({}, answers);
13875
13875
  }
13876
- module.exports = Object.assign(prompt9, {
13877
- prompt: prompt9,
13876
+ module.exports = Object.assign(prompt10, {
13877
+ prompt: prompt10,
13878
13878
  prompts,
13879
13879
  inject,
13880
13880
  override
@@ -13938,10 +13938,10 @@ var require_clear2 = __commonJS({
13938
13938
  var strip = require_strip2();
13939
13939
  var { erase, cursor } = require_src();
13940
13940
  var width3 = (str) => [...strip(str)].length;
13941
- module.exports = function(prompt9, perLine) {
13941
+ module.exports = function(prompt10, perLine) {
13942
13942
  if (!perLine) return erase.line + cursor.to(0);
13943
13943
  let rows = 0;
13944
- const lines4 = prompt9.split(/\r?\n/);
13944
+ const lines4 = prompt10.split(/\r?\n/);
13945
13945
  for (let line4 of lines4) {
13946
13946
  rows += 1 + Math.floor(Math.max(width3(line4) - 1, 0) / perLine);
13947
13947
  }
@@ -15380,19 +15380,19 @@ Instructions:
15380
15380
  if (this.closed) return;
15381
15381
  if (this.firstRender) this.out.write(cursor.hide);
15382
15382
  super.render();
15383
- let prompt9 = [
15383
+ let prompt10 = [
15384
15384
  style.symbol(this.done, this.aborted),
15385
15385
  color3.bold(this.msg),
15386
15386
  style.delimiter(false),
15387
15387
  this.renderDoneOrInstructions()
15388
15388
  ].join(" ");
15389
15389
  if (this.showMinError) {
15390
- prompt9 += color3.red(`You must select a minimum of ${this.minSelected} choices.`);
15390
+ prompt10 += color3.red(`You must select a minimum of ${this.minSelected} choices.`);
15391
15391
  this.showMinError = false;
15392
15392
  }
15393
- prompt9 += this.renderOptions(this.value);
15394
- this.out.write(this.clear + prompt9);
15395
- this.clear = clear3(prompt9, this.out.columns);
15393
+ prompt10 += this.renderOptions(this.value);
15394
+ this.out.write(this.clear + prompt10);
15395
+ this.clear = clear3(prompt10, this.out.columns);
15396
15396
  }
15397
15397
  };
15398
15398
  module.exports = MultiselectPrompt;
@@ -15754,19 +15754,19 @@ Filtered results for: ${this.inputValue ? this.inputValue : color3.gray("Enter s
15754
15754
  if (this.closed) return;
15755
15755
  if (this.firstRender) this.out.write(cursor.hide);
15756
15756
  super.render();
15757
- let prompt9 = [
15757
+ let prompt10 = [
15758
15758
  style.symbol(this.done, this.aborted),
15759
15759
  color3.bold(this.msg),
15760
15760
  style.delimiter(false),
15761
15761
  this.renderDoneOrInstructions()
15762
15762
  ].join(" ");
15763
15763
  if (this.showMinError) {
15764
- prompt9 += color3.red(`You must select a minimum of ${this.minSelected} choices.`);
15764
+ prompt10 += color3.red(`You must select a minimum of ${this.minSelected} choices.`);
15765
15765
  this.showMinError = false;
15766
15766
  }
15767
- prompt9 += this.renderOptions(this.filteredOptions);
15768
- this.out.write(this.clear + prompt9);
15769
- this.clear = clear3(prompt9, this.out.columns);
15767
+ prompt10 += this.renderOptions(this.filteredOptions);
15768
+ this.out.write(this.clear + prompt10);
15769
+ this.clear = clear3(prompt10, this.out.columns);
15770
15770
  }
15771
15771
  };
15772
15772
  module.exports = AutocompleteMultiselectPrompt;
@@ -15934,9 +15934,9 @@ var require_lib = __commonJS({
15934
15934
  var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
15935
15935
  var noop = () => {
15936
15936
  };
15937
- async function prompt9(questions = [], { onSubmit = noop, onCancel = noop } = {}) {
15937
+ async function prompt10(questions = [], { onSubmit = noop, onCancel = noop } = {}) {
15938
15938
  const answers = {};
15939
- const override2 = prompt9._override || {};
15939
+ const override2 = prompt10._override || {};
15940
15940
  questions = [].concat(questions);
15941
15941
  let answer, question, quit, name, type2, lastPrompt;
15942
15942
  const getFormattedAnswer = async (question2, answer2, skipValidation = false) => {
@@ -15973,7 +15973,7 @@ var require_lib = __commonJS({
15973
15973
  }
15974
15974
  }
15975
15975
  try {
15976
- answer = prompt9._injected ? getInjectedAnswer(prompt9._injected, question.initial) : await prompts[type2](question);
15976
+ answer = prompt10._injected ? getInjectedAnswer(prompt10._injected, question.initial) : await prompts[type2](question);
15977
15977
  answers[name] = answer = await getFormattedAnswer(question, answer, true);
15978
15978
  quit = await onSubmit(question, answer, answers);
15979
15979
  } catch (err) {
@@ -15991,12 +15991,12 @@ var require_lib = __commonJS({
15991
15991
  return answer === void 0 ? deafultValue : answer;
15992
15992
  }
15993
15993
  function inject(answers) {
15994
- prompt9._injected = (prompt9._injected || []).concat(answers);
15994
+ prompt10._injected = (prompt10._injected || []).concat(answers);
15995
15995
  }
15996
15996
  function override(answers) {
15997
- prompt9._override = Object.assign({}, answers);
15997
+ prompt10._override = Object.assign({}, answers);
15998
15998
  }
15999
- module.exports = Object.assign(prompt9, { prompt: prompt9, prompts, inject, override });
15999
+ module.exports = Object.assign(prompt10, { prompt: prompt10, prompts, inject, override });
16000
16000
  }
16001
16001
  });
16002
16002
 
@@ -16923,14 +16923,14 @@ var require_util3 = __commonJS({
16923
16923
  }
16924
16924
  const port3 = url3.port != null ? url3.port : url3.protocol === "https:" ? 443 : 80;
16925
16925
  let origin = url3.origin != null ? url3.origin : `${url3.protocol || ""}//${url3.hostname || ""}:${port3}`;
16926
- let path14 = url3.path != null ? url3.path : `${url3.pathname || ""}${url3.search || ""}`;
16926
+ let path15 = url3.path != null ? url3.path : `${url3.pathname || ""}${url3.search || ""}`;
16927
16927
  if (origin[origin.length - 1] === "/") {
16928
16928
  origin = origin.slice(0, origin.length - 1);
16929
16929
  }
16930
- if (path14 && path14[0] !== "/") {
16931
- path14 = `/${path14}`;
16930
+ if (path15 && path15[0] !== "/") {
16931
+ path15 = `/${path15}`;
16932
16932
  }
16933
- return new URL(`${origin}${path14}`);
16933
+ return new URL(`${origin}${path15}`);
16934
16934
  }
16935
16935
  if (!isHttpOrHttpsPrefixed(url3.origin || url3.protocol)) {
16936
16936
  throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`.");
@@ -17476,9 +17476,9 @@ var require_diagnostics = __commonJS({
17476
17476
  "undici:client:sendHeaders",
17477
17477
  (evt) => {
17478
17478
  const {
17479
- request: { method, path: path14, origin }
17479
+ request: { method, path: path15, origin }
17480
17480
  } = evt;
17481
- debugLog("sending request to %s %s%s", method, origin, path14);
17481
+ debugLog("sending request to %s %s%s", method, origin, path15);
17482
17482
  }
17483
17483
  );
17484
17484
  }
@@ -17492,14 +17492,14 @@ var require_diagnostics = __commonJS({
17492
17492
  "undici:request:headers",
17493
17493
  (evt) => {
17494
17494
  const {
17495
- request: { method, path: path14, origin },
17495
+ request: { method, path: path15, origin },
17496
17496
  response: { statusCode }
17497
17497
  } = evt;
17498
17498
  debugLog(
17499
17499
  "received response to %s %s%s - HTTP %d",
17500
17500
  method,
17501
17501
  origin,
17502
- path14,
17502
+ path15,
17503
17503
  statusCode
17504
17504
  );
17505
17505
  }
@@ -17508,23 +17508,23 @@ var require_diagnostics = __commonJS({
17508
17508
  "undici:request:trailers",
17509
17509
  (evt) => {
17510
17510
  const {
17511
- request: { method, path: path14, origin }
17511
+ request: { method, path: path15, origin }
17512
17512
  } = evt;
17513
- debugLog("trailers received from %s %s%s", method, origin, path14);
17513
+ debugLog("trailers received from %s %s%s", method, origin, path15);
17514
17514
  }
17515
17515
  );
17516
17516
  diagnosticsChannel.subscribe(
17517
17517
  "undici:request:error",
17518
17518
  (evt) => {
17519
17519
  const {
17520
- request: { method, path: path14, origin },
17520
+ request: { method, path: path15, origin },
17521
17521
  error: error4
17522
17522
  } = evt;
17523
17523
  debugLog(
17524
17524
  "request to %s %s%s errored - %s",
17525
17525
  method,
17526
17526
  origin,
17527
- path14,
17527
+ path15,
17528
17528
  error4.message
17529
17529
  );
17530
17530
  }
@@ -17618,7 +17618,7 @@ var require_request = __commonJS({
17618
17618
  var kHandler = Symbol("handler");
17619
17619
  var Request = class {
17620
17620
  constructor(origin, {
17621
- path: path14,
17621
+ path: path15,
17622
17622
  method,
17623
17623
  body,
17624
17624
  headers,
@@ -17634,11 +17634,11 @@ var require_request = __commonJS({
17634
17634
  throwOnError,
17635
17635
  maxRedirections
17636
17636
  }, handler) {
17637
- if (typeof path14 !== "string") {
17637
+ if (typeof path15 !== "string") {
17638
17638
  throw new InvalidArgumentError("path must be a string");
17639
- } else if (path14[0] !== "/" && !(path14.startsWith("http://") || path14.startsWith("https://")) && method !== "CONNECT") {
17639
+ } else if (path15[0] !== "/" && !(path15.startsWith("http://") || path15.startsWith("https://")) && method !== "CONNECT") {
17640
17640
  throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
17641
- } else if (invalidPathRegex.test(path14)) {
17641
+ } else if (invalidPathRegex.test(path15)) {
17642
17642
  throw new InvalidArgumentError("invalid request path");
17643
17643
  }
17644
17644
  if (typeof method !== "string") {
@@ -17706,7 +17706,7 @@ var require_request = __commonJS({
17706
17706
  this.completed = false;
17707
17707
  this.aborted = false;
17708
17708
  this.upgrade = upgrade || null;
17709
- this.path = query ? serializePathWithQuery(path14, query) : path14;
17709
+ this.path = query ? serializePathWithQuery(path15, query) : path15;
17710
17710
  this.origin = origin;
17711
17711
  this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
17712
17712
  this.blocking = blocking ?? this.method !== "HEAD";
@@ -22449,7 +22449,7 @@ var require_client_h1 = __commonJS({
22449
22449
  return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT";
22450
22450
  }
22451
22451
  function writeH1(client, request2) {
22452
- const { method, path: path14, host, upgrade, blocking, reset: reset3 } = request2;
22452
+ const { method, path: path15, host, upgrade, blocking, reset: reset3 } = request2;
22453
22453
  let { body, headers, contentLength } = request2;
22454
22454
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
22455
22455
  if (util.isFormDataLike(body)) {
@@ -22515,7 +22515,7 @@ var require_client_h1 = __commonJS({
22515
22515
  if (blocking) {
22516
22516
  socket[kBlocking] = true;
22517
22517
  }
22518
- let header = `${method} ${path14} HTTP/1.1\r
22518
+ let header = `${method} ${path15} HTTP/1.1\r
22519
22519
  `;
22520
22520
  if (typeof host === "string") {
22521
22521
  header += `host: ${host}\r
@@ -23071,7 +23071,7 @@ var require_client_h2 = __commonJS({
23071
23071
  function writeH2(client, request2) {
23072
23072
  const requestTimeout = request2.bodyTimeout ?? client[kBodyTimeout];
23073
23073
  const session = client[kHTTP2Session];
23074
- const { method, path: path14, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2;
23074
+ const { method, path: path15, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2;
23075
23075
  let { body } = request2;
23076
23076
  if (upgrade) {
23077
23077
  util.errorRequest(client, request2, new Error("Upgrade not supported for H2"));
@@ -23142,7 +23142,7 @@ var require_client_h2 = __commonJS({
23142
23142
  stream4.setTimeout(requestTimeout);
23143
23143
  return true;
23144
23144
  }
23145
- headers[HTTP2_HEADER_PATH] = path14;
23145
+ headers[HTTP2_HEADER_PATH] = path15;
23146
23146
  headers[HTTP2_HEADER_SCHEME] = "https";
23147
23147
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
23148
23148
  if (body && typeof body.read === "function") {
@@ -24581,10 +24581,10 @@ var require_proxy_agent = __commonJS({
24581
24581
  };
24582
24582
  const {
24583
24583
  origin,
24584
- path: path14 = "/",
24584
+ path: path15 = "/",
24585
24585
  headers = {}
24586
24586
  } = opts;
24587
- opts.path = origin + path14;
24587
+ opts.path = origin + path15;
24588
24588
  if (!("host" in headers) && !("Host" in headers)) {
24589
24589
  const { host } = new URL2(origin);
24590
24590
  headers.host = host;
@@ -26638,20 +26638,20 @@ var require_mock_utils = __commonJS({
26638
26638
  }
26639
26639
  return normalizedQp;
26640
26640
  }
26641
- function safeUrl(path14) {
26642
- if (typeof path14 !== "string") {
26643
- return path14;
26641
+ function safeUrl(path15) {
26642
+ if (typeof path15 !== "string") {
26643
+ return path15;
26644
26644
  }
26645
- const pathSegments = path14.split("?", 3);
26645
+ const pathSegments = path15.split("?", 3);
26646
26646
  if (pathSegments.length !== 2) {
26647
- return path14;
26647
+ return path15;
26648
26648
  }
26649
26649
  const qp = new URLSearchParams(pathSegments.pop());
26650
26650
  qp.sort();
26651
26651
  return [...pathSegments, qp.toString()].join("?");
26652
26652
  }
26653
- function matchKey(mockDispatch2, { path: path14, method, body, headers }) {
26654
- const pathMatch = matchValue(mockDispatch2.path, path14);
26653
+ function matchKey(mockDispatch2, { path: path15, method, body, headers }) {
26654
+ const pathMatch = matchValue(mockDispatch2.path, path15);
26655
26655
  const methodMatch = matchValue(mockDispatch2.method, method);
26656
26656
  const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
26657
26657
  const headersMatch = matchHeaders(mockDispatch2, headers);
@@ -26676,8 +26676,8 @@ var require_mock_utils = __commonJS({
26676
26676
  const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path;
26677
26677
  const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
26678
26678
  const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath);
26679
- let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path14, ignoreTrailingSlash }) => {
26680
- return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(path14)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path14), resolvedPath);
26679
+ let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path15, ignoreTrailingSlash }) => {
26680
+ return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(path15)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path15), resolvedPath);
26681
26681
  });
26682
26682
  if (matchedMockDispatches.length === 0) {
26683
26683
  throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
@@ -26715,19 +26715,19 @@ var require_mock_utils = __commonJS({
26715
26715
  mockDispatches.splice(index, 1);
26716
26716
  }
26717
26717
  }
26718
- function removeTrailingSlash(path14) {
26719
- while (path14.endsWith("/")) {
26720
- path14 = path14.slice(0, -1);
26718
+ function removeTrailingSlash(path15) {
26719
+ while (path15.endsWith("/")) {
26720
+ path15 = path15.slice(0, -1);
26721
26721
  }
26722
- if (path14.length === 0) {
26723
- path14 = "/";
26722
+ if (path15.length === 0) {
26723
+ path15 = "/";
26724
26724
  }
26725
- return path14;
26725
+ return path15;
26726
26726
  }
26727
26727
  function buildKey(opts) {
26728
- const { path: path14, method, body, headers, query } = opts;
26728
+ const { path: path15, method, body, headers, query } = opts;
26729
26729
  return {
26730
- path: path14,
26730
+ path: path15,
26731
26731
  method,
26732
26732
  body,
26733
26733
  headers,
@@ -27379,10 +27379,10 @@ var require_pending_interceptors_formatter = __commonJS({
27379
27379
  }
27380
27380
  format(pendingInterceptors) {
27381
27381
  const withPrettyHeaders = pendingInterceptors.map(
27382
- ({ method, path: path14, data: { statusCode }, persist, times: times2, timesInvoked, origin }) => ({
27382
+ ({ method, path: path15, data: { statusCode }, persist, times: times2, timesInvoked, origin }) => ({
27383
27383
  Method: method,
27384
27384
  Origin: origin,
27385
- Path: path14,
27385
+ Path: path15,
27386
27386
  "Status code": statusCode,
27387
27387
  Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
27388
27388
  Invocations: timesInvoked,
@@ -27461,9 +27461,9 @@ var require_mock_agent = __commonJS({
27461
27461
  const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters];
27462
27462
  const dispatchOpts = { ...opts };
27463
27463
  if (acceptNonStandardSearchParameters && dispatchOpts.path) {
27464
- const [path14, searchParams] = dispatchOpts.path.split("?");
27464
+ const [path15, searchParams] = dispatchOpts.path.split("?");
27465
27465
  const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters);
27466
- dispatchOpts.path = `${path14}?${normalizedSearchParams}`;
27466
+ dispatchOpts.path = `${path15}?${normalizedSearchParams}`;
27467
27467
  }
27468
27468
  return this[kAgent].dispatch(dispatchOpts, handler);
27469
27469
  }
@@ -27801,12 +27801,12 @@ var require_snapshot_recorder = __commonJS({
27801
27801
  * Loads snapshots from file
27802
27802
  */
27803
27803
  async loadSnapshots(filePath) {
27804
- const path14 = filePath || this.snapshotPath;
27805
- if (!path14) {
27804
+ const path15 = filePath || this.snapshotPath;
27805
+ if (!path15) {
27806
27806
  throw new InvalidArgumentError("Snapshot path is required");
27807
27807
  }
27808
27808
  try {
27809
- const data = await readFile3(resolve7(path14), "utf8");
27809
+ const data = await readFile3(resolve7(path15), "utf8");
27810
27810
  const parsed = JSON.parse(data);
27811
27811
  if (Array.isArray(parsed)) {
27812
27812
  this.snapshots.clear();
@@ -27822,7 +27822,7 @@ var require_snapshot_recorder = __commonJS({
27822
27822
  this.snapshots.clear();
27823
27823
  this.loaded = true;
27824
27824
  } else {
27825
- throw new UndiciError(`Failed to load snapshots from ${path14}`, { cause: error4 });
27825
+ throw new UndiciError(`Failed to load snapshots from ${path15}`, { cause: error4 });
27826
27826
  }
27827
27827
  }
27828
27828
  }
@@ -27830,11 +27830,11 @@ var require_snapshot_recorder = __commonJS({
27830
27830
  * Saves snapshots to file
27831
27831
  */
27832
27832
  async saveSnapshots(filePath) {
27833
- const path14 = filePath || this.snapshotPath;
27834
- if (!path14) {
27833
+ const path15 = filePath || this.snapshotPath;
27834
+ if (!path15) {
27835
27835
  throw new InvalidArgumentError("Snapshot path is required");
27836
27836
  }
27837
- const resolvedPath = resolve7(path14);
27837
+ const resolvedPath = resolve7(path15);
27838
27838
  await mkdir2(dirname3(resolvedPath), { recursive: true });
27839
27839
  const data = Array.from(this.snapshots.entries()).map(([hash2, snapshot]) => ({
27840
27840
  hash: hash2,
@@ -28411,15 +28411,15 @@ var require_redirect_handler = __commonJS({
28411
28411
  return;
28412
28412
  }
28413
28413
  const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
28414
- const path14 = search ? `${pathname}${search}` : pathname;
28415
- const redirectUrlString = `${origin}${path14}`;
28414
+ const path15 = search ? `${pathname}${search}` : pathname;
28415
+ const redirectUrlString = `${origin}${path15}`;
28416
28416
  for (const historyUrl of this.history) {
28417
28417
  if (historyUrl.toString() === redirectUrlString) {
28418
28418
  throw new InvalidArgumentError(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`);
28419
28419
  }
28420
28420
  }
28421
28421
  this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
28422
- this.opts.path = path14;
28422
+ this.opts.path = path15;
28423
28423
  this.opts.origin = origin;
28424
28424
  this.opts.query = null;
28425
28425
  }
@@ -34043,9 +34043,9 @@ var require_util6 = __commonJS({
34043
34043
  }
34044
34044
  }
34045
34045
  }
34046
- function validateCookiePath(path14) {
34047
- for (let i = 0; i < path14.length; ++i) {
34048
- const code2 = path14.charCodeAt(i);
34046
+ function validateCookiePath(path15) {
34047
+ for (let i = 0; i < path15.length; ++i) {
34048
+ const code2 = path15.charCodeAt(i);
34049
34049
  if (code2 < 32 || // exclude CTLs (0-31)
34050
34050
  code2 === 127 || // DEL
34051
34051
  code2 === 59) {
@@ -37102,11 +37102,11 @@ var require_undici = __commonJS({
37102
37102
  if (typeof opts.path !== "string") {
37103
37103
  throw new InvalidArgumentError("invalid opts.path");
37104
37104
  }
37105
- let path14 = opts.path;
37105
+ let path15 = opts.path;
37106
37106
  if (!opts.path.startsWith("/")) {
37107
- path14 = `/${path14}`;
37107
+ path15 = `/${path15}`;
37108
37108
  }
37109
- url3 = new URL(util.parseOrigin(url3).origin + path14);
37109
+ url3 = new URL(util.parseOrigin(url3).origin + path15);
37110
37110
  } else {
37111
37111
  if (!opts) {
37112
37112
  opts = typeof url3 === "object" ? url3 : {};
@@ -38526,11 +38526,11 @@ var require_lodash = __commonJS({
38526
38526
  return isFunction3(object[key]);
38527
38527
  });
38528
38528
  }
38529
- function baseGet(object, path14) {
38530
- path14 = castPath(path14, object);
38531
- var index = 0, length4 = path14.length;
38529
+ function baseGet(object, path15) {
38530
+ path15 = castPath(path15, object);
38531
+ var index = 0, length4 = path15.length;
38532
38532
  while (object != null && index < length4) {
38533
- object = object[toKey(path14[index++])];
38533
+ object = object[toKey(path15[index++])];
38534
38534
  }
38535
38535
  return index && index == length4 ? object : undefined2;
38536
38536
  }
@@ -38594,10 +38594,10 @@ var require_lodash = __commonJS({
38594
38594
  });
38595
38595
  return accumulator;
38596
38596
  }
38597
- function baseInvoke(object, path14, args2) {
38598
- path14 = castPath(path14, object);
38599
- object = parent(object, path14);
38600
- var func = object == null ? object : object[toKey(last5(path14))];
38597
+ function baseInvoke(object, path15, args2) {
38598
+ path15 = castPath(path15, object);
38599
+ object = parent(object, path15);
38600
+ var func = object == null ? object : object[toKey(last5(path15))];
38601
38601
  return func == null ? undefined2 : apply(func, object, args2);
38602
38602
  }
38603
38603
  function baseIsArguments(value5) {
@@ -38753,13 +38753,13 @@ var require_lodash = __commonJS({
38753
38753
  return object === source || baseIsMatch(object, source, matchData);
38754
38754
  };
38755
38755
  }
38756
- function baseMatchesProperty(path14, srcValue) {
38757
- if (isKey(path14) && isStrictComparable(srcValue)) {
38758
- return matchesStrictComparable(toKey(path14), srcValue);
38756
+ function baseMatchesProperty(path15, srcValue) {
38757
+ if (isKey(path15) && isStrictComparable(srcValue)) {
38758
+ return matchesStrictComparable(toKey(path15), srcValue);
38759
38759
  }
38760
38760
  return function(object) {
38761
- var objValue = get16(object, path14);
38762
- return objValue === undefined2 && objValue === srcValue ? hasIn(object, path14) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
38761
+ var objValue = get16(object, path15);
38762
+ return objValue === undefined2 && objValue === srcValue ? hasIn(object, path15) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
38763
38763
  };
38764
38764
  }
38765
38765
  function baseMerge(object, source, srcIndex, customizer, stack) {
@@ -38856,23 +38856,23 @@ var require_lodash = __commonJS({
38856
38856
  });
38857
38857
  }
38858
38858
  function basePick(object, paths) {
38859
- return basePickBy(object, paths, function(value5, path14) {
38860
- return hasIn(object, path14);
38859
+ return basePickBy(object, paths, function(value5, path15) {
38860
+ return hasIn(object, path15);
38861
38861
  });
38862
38862
  }
38863
38863
  function basePickBy(object, paths, predicate) {
38864
38864
  var index = -1, length4 = paths.length, result2 = {};
38865
38865
  while (++index < length4) {
38866
- var path14 = paths[index], value5 = baseGet(object, path14);
38867
- if (predicate(value5, path14)) {
38868
- baseSet(result2, castPath(path14, object), value5);
38866
+ var path15 = paths[index], value5 = baseGet(object, path15);
38867
+ if (predicate(value5, path15)) {
38868
+ baseSet(result2, castPath(path15, object), value5);
38869
38869
  }
38870
38870
  }
38871
38871
  return result2;
38872
38872
  }
38873
- function basePropertyDeep(path14) {
38873
+ function basePropertyDeep(path15) {
38874
38874
  return function(object) {
38875
- return baseGet(object, path14);
38875
+ return baseGet(object, path15);
38876
38876
  };
38877
38877
  }
38878
38878
  function basePullAll(array9, values4, iteratee2, comparator) {
@@ -38946,14 +38946,14 @@ var require_lodash = __commonJS({
38946
38946
  var array9 = values3(collection);
38947
38947
  return shuffleSelf(array9, baseClamp(n, 0, array9.length));
38948
38948
  }
38949
- function baseSet(object, path14, value5, customizer) {
38949
+ function baseSet(object, path15, value5, customizer) {
38950
38950
  if (!isObject2(object)) {
38951
38951
  return object;
38952
38952
  }
38953
- path14 = castPath(path14, object);
38954
- var index = -1, length4 = path14.length, lastIndex = length4 - 1, nested6 = object;
38953
+ path15 = castPath(path15, object);
38954
+ var index = -1, length4 = path15.length, lastIndex = length4 - 1, nested6 = object;
38955
38955
  while (nested6 != null && ++index < length4) {
38956
- var key = toKey(path14[index]), newValue = value5;
38956
+ var key = toKey(path15[index]), newValue = value5;
38957
38957
  if (key === "__proto__" || key === "constructor" || key === "prototype") {
38958
38958
  return object;
38959
38959
  }
@@ -38961,7 +38961,7 @@ var require_lodash = __commonJS({
38961
38961
  var objValue = nested6[key];
38962
38962
  newValue = customizer ? customizer(objValue, key, nested6) : undefined2;
38963
38963
  if (newValue === undefined2) {
38964
- newValue = isObject2(objValue) ? objValue : isIndex(path14[index + 1]) ? [] : {};
38964
+ newValue = isObject2(objValue) ? objValue : isIndex(path15[index + 1]) ? [] : {};
38965
38965
  }
38966
38966
  }
38967
38967
  assignValue(nested6, key, newValue);
@@ -39127,13 +39127,13 @@ var require_lodash = __commonJS({
39127
39127
  }
39128
39128
  return result2;
39129
39129
  }
39130
- function baseUnset(object, path14) {
39131
- path14 = castPath(path14, object);
39132
- object = parent(object, path14);
39133
- return object == null || delete object[toKey(last5(path14))];
39130
+ function baseUnset(object, path15) {
39131
+ path15 = castPath(path15, object);
39132
+ object = parent(object, path15);
39133
+ return object == null || delete object[toKey(last5(path15))];
39134
39134
  }
39135
- function baseUpdate(object, path14, updater, customizer) {
39136
- return baseSet(object, path14, updater(baseGet(object, path14)), customizer);
39135
+ function baseUpdate(object, path15, updater, customizer) {
39136
+ return baseSet(object, path15, updater(baseGet(object, path15)), customizer);
39137
39137
  }
39138
39138
  function baseWhile(array9, predicate, isDrop, fromRight) {
39139
39139
  var length4 = array9.length, index = fromRight ? length4 : -1;
@@ -40016,11 +40016,11 @@ var require_lodash = __commonJS({
40016
40016
  var match18 = source.match(reWrapDetails);
40017
40017
  return match18 ? match18[1].split(reSplitDetails) : [];
40018
40018
  }
40019
- function hasPath(object, path14, hasFunc) {
40020
- path14 = castPath(path14, object);
40021
- var index = -1, length4 = path14.length, result2 = false;
40019
+ function hasPath(object, path15, hasFunc) {
40020
+ path15 = castPath(path15, object);
40021
+ var index = -1, length4 = path15.length, result2 = false;
40022
40022
  while (++index < length4) {
40023
- var key = toKey(path14[index]);
40023
+ var key = toKey(path15[index]);
40024
40024
  if (!(result2 = object != null && hasFunc(object, key))) {
40025
40025
  break;
40026
40026
  }
@@ -40222,8 +40222,8 @@ var require_lodash = __commonJS({
40222
40222
  return apply(func, this, otherArgs);
40223
40223
  };
40224
40224
  }
40225
- function parent(object, path14) {
40226
- return path14.length < 2 ? object : baseGet(object, baseSlice(path14, 0, -1));
40225
+ function parent(object, path15) {
40226
+ return path15.length < 2 ? object : baseGet(object, baseSlice(path15, 0, -1));
40227
40227
  }
40228
40228
  function reorder(array9, indexes) {
40229
40229
  var arrLength = array9.length, length4 = nativeMin(indexes.length, arrLength), oldArray = copyArray(array9);
@@ -40500,7 +40500,7 @@ var require_lodash = __commonJS({
40500
40500
  }
40501
40501
  return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
40502
40502
  });
40503
- function join15(array9, separator) {
40503
+ function join16(array9, separator) {
40504
40504
  return array9 == null ? "" : nativeJoin.call(array9, separator);
40505
40505
  }
40506
40506
  function last5(array9) {
@@ -40858,10 +40858,10 @@ var require_lodash = __commonJS({
40858
40858
  }
40859
40859
  return isString2(collection) ? fromIndex <= length4 && collection.indexOf(value5, fromIndex) > -1 : !!length4 && baseIndexOf(collection, value5, fromIndex) > -1;
40860
40860
  }
40861
- var invokeMap = baseRest(function(collection, path14, args2) {
40862
- var index = -1, isFunc = typeof path14 == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
40861
+ var invokeMap = baseRest(function(collection, path15, args2) {
40862
+ var index = -1, isFunc = typeof path15 == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
40863
40863
  baseEach(collection, function(value5) {
40864
- result2[++index] = isFunc ? apply(path14, value5, args2) : baseInvoke(value5, path14, args2);
40864
+ result2[++index] = isFunc ? apply(path15, value5, args2) : baseInvoke(value5, path15, args2);
40865
40865
  });
40866
40866
  return result2;
40867
40867
  });
@@ -41513,15 +41513,15 @@ var require_lodash = __commonJS({
41513
41513
  function functionsIn(object) {
41514
41514
  return object == null ? [] : baseFunctions(object, keysIn(object));
41515
41515
  }
41516
- function get16(object, path14, defaultValue) {
41517
- var result2 = object == null ? undefined2 : baseGet(object, path14);
41516
+ function get16(object, path15, defaultValue) {
41517
+ var result2 = object == null ? undefined2 : baseGet(object, path15);
41518
41518
  return result2 === undefined2 ? defaultValue : result2;
41519
41519
  }
41520
- function has8(object, path14) {
41521
- return object != null && hasPath(object, path14, baseHas);
41520
+ function has8(object, path15) {
41521
+ return object != null && hasPath(object, path15, baseHas);
41522
41522
  }
41523
- function hasIn(object, path14) {
41524
- return object != null && hasPath(object, path14, baseHasIn);
41523
+ function hasIn(object, path15) {
41524
+ return object != null && hasPath(object, path15, baseHasIn);
41525
41525
  }
41526
41526
  var invert2 = createInverter(function(result2, value5, key) {
41527
41527
  if (value5 != null && typeof value5.toString != "function") {
@@ -41574,10 +41574,10 @@ var require_lodash = __commonJS({
41574
41574
  return result2;
41575
41575
  }
41576
41576
  var isDeep = false;
41577
- paths = arrayMap(paths, function(path14) {
41578
- path14 = castPath(path14, object);
41579
- isDeep || (isDeep = path14.length > 1);
41580
- return path14;
41577
+ paths = arrayMap(paths, function(path15) {
41578
+ path15 = castPath(path15, object);
41579
+ isDeep || (isDeep = path15.length > 1);
41580
+ return path15;
41581
41581
  });
41582
41582
  copyObject(object, getAllKeysIn(object), result2);
41583
41583
  if (isDeep) {
@@ -41603,19 +41603,19 @@ var require_lodash = __commonJS({
41603
41603
  return [prop];
41604
41604
  });
41605
41605
  predicate = getIteratee(predicate);
41606
- return basePickBy(object, props, function(value5, path14) {
41607
- return predicate(value5, path14[0]);
41606
+ return basePickBy(object, props, function(value5, path15) {
41607
+ return predicate(value5, path15[0]);
41608
41608
  });
41609
41609
  }
41610
- function result(object, path14, defaultValue) {
41611
- path14 = castPath(path14, object);
41612
- var index = -1, length4 = path14.length;
41610
+ function result(object, path15, defaultValue) {
41611
+ path15 = castPath(path15, object);
41612
+ var index = -1, length4 = path15.length;
41613
41613
  if (!length4) {
41614
41614
  length4 = 1;
41615
41615
  object = undefined2;
41616
41616
  }
41617
41617
  while (++index < length4) {
41618
- var value5 = object == null ? undefined2 : object[toKey(path14[index])];
41618
+ var value5 = object == null ? undefined2 : object[toKey(path15[index])];
41619
41619
  if (value5 === undefined2) {
41620
41620
  index = length4;
41621
41621
  value5 = defaultValue;
@@ -41624,12 +41624,12 @@ var require_lodash = __commonJS({
41624
41624
  }
41625
41625
  return object;
41626
41626
  }
41627
- function set7(object, path14, value5) {
41628
- return object == null ? object : baseSet(object, path14, value5);
41627
+ function set7(object, path15, value5) {
41628
+ return object == null ? object : baseSet(object, path15, value5);
41629
41629
  }
41630
- function setWith(object, path14, value5, customizer) {
41630
+ function setWith(object, path15, value5, customizer) {
41631
41631
  customizer = typeof customizer == "function" ? customizer : undefined2;
41632
- return object == null ? object : baseSet(object, path14, value5, customizer);
41632
+ return object == null ? object : baseSet(object, path15, value5, customizer);
41633
41633
  }
41634
41634
  var toPairs = createToPairs(keys6);
41635
41635
  var toPairsIn = createToPairs(keysIn);
@@ -41651,15 +41651,15 @@ var require_lodash = __commonJS({
41651
41651
  });
41652
41652
  return accumulator;
41653
41653
  }
41654
- function unset(object, path14) {
41655
- return object == null ? true : baseUnset(object, path14);
41654
+ function unset(object, path15) {
41655
+ return object == null ? true : baseUnset(object, path15);
41656
41656
  }
41657
- function update5(object, path14, updater) {
41658
- return object == null ? object : baseUpdate(object, path14, castFunction(updater));
41657
+ function update5(object, path15, updater) {
41658
+ return object == null ? object : baseUpdate(object, path15, castFunction(updater));
41659
41659
  }
41660
- function updateWith2(object, path14, updater, customizer) {
41660
+ function updateWith2(object, path15, updater, customizer) {
41661
41661
  customizer = typeof customizer == "function" ? customizer : undefined2;
41662
- return object == null ? object : baseUpdate(object, path14, castFunction(updater), customizer);
41662
+ return object == null ? object : baseUpdate(object, path15, castFunction(updater), customizer);
41663
41663
  }
41664
41664
  function values3(object) {
41665
41665
  return object == null ? [] : baseValues(object, keys6(object));
@@ -42040,17 +42040,17 @@ var require_lodash = __commonJS({
42040
42040
  function matches(source) {
42041
42041
  return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
42042
42042
  }
42043
- function matchesProperty(path14, srcValue) {
42044
- return baseMatchesProperty(path14, baseClone(srcValue, CLONE_DEEP_FLAG));
42043
+ function matchesProperty(path15, srcValue) {
42044
+ return baseMatchesProperty(path15, baseClone(srcValue, CLONE_DEEP_FLAG));
42045
42045
  }
42046
- var method = baseRest(function(path14, args2) {
42046
+ var method = baseRest(function(path15, args2) {
42047
42047
  return function(object) {
42048
- return baseInvoke(object, path14, args2);
42048
+ return baseInvoke(object, path15, args2);
42049
42049
  };
42050
42050
  });
42051
42051
  var methodOf = baseRest(function(object, args2) {
42052
- return function(path14) {
42053
- return baseInvoke(object, path14, args2);
42052
+ return function(path15) {
42053
+ return baseInvoke(object, path15, args2);
42054
42054
  };
42055
42055
  });
42056
42056
  function mixin(object, source, options3) {
@@ -42097,12 +42097,12 @@ var require_lodash = __commonJS({
42097
42097
  var over = createOver(arrayMap);
42098
42098
  var overEvery = createOver(arrayEvery);
42099
42099
  var overSome = createOver(arraySome);
42100
- function property(path14) {
42101
- return isKey(path14) ? baseProperty(toKey(path14)) : basePropertyDeep(path14);
42100
+ function property(path15) {
42101
+ return isKey(path15) ? baseProperty(toKey(path15)) : basePropertyDeep(path15);
42102
42102
  }
42103
42103
  function propertyOf(object) {
42104
- return function(path14) {
42105
- return object == null ? undefined2 : baseGet(object, path14);
42104
+ return function(path15) {
42105
+ return object == null ? undefined2 : baseGet(object, path15);
42106
42106
  };
42107
42107
  }
42108
42108
  var range4 = createRange();
@@ -42419,7 +42419,7 @@ var require_lodash = __commonJS({
42419
42419
  lodash.isUndefined = isUndefined2;
42420
42420
  lodash.isWeakMap = isWeakMap;
42421
42421
  lodash.isWeakSet = isWeakSet;
42422
- lodash.join = join15;
42422
+ lodash.join = join16;
42423
42423
  lodash.kebabCase = kebabCase4;
42424
42424
  lodash.last = last5;
42425
42425
  lodash.lastIndexOf = lastIndexOf;
@@ -42555,12 +42555,12 @@ var require_lodash = __commonJS({
42555
42555
  LazyWrapper.prototype.findLast = function(predicate) {
42556
42556
  return this.reverse().find(predicate);
42557
42557
  };
42558
- LazyWrapper.prototype.invokeMap = baseRest(function(path14, args2) {
42559
- if (typeof path14 == "function") {
42558
+ LazyWrapper.prototype.invokeMap = baseRest(function(path15, args2) {
42559
+ if (typeof path15 == "function") {
42560
42560
  return new LazyWrapper(this);
42561
42561
  }
42562
42562
  return this.map(function(value5) {
42563
- return baseInvoke(value5, path14, args2);
42563
+ return baseInvoke(value5, path15, args2);
42564
42564
  });
42565
42565
  });
42566
42566
  LazyWrapper.prototype.reject = function(predicate) {
@@ -45061,11 +45061,11 @@ var require_baseGet = __commonJS({
45061
45061
  "node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js"(exports, module) {
45062
45062
  var castPath = require_castPath();
45063
45063
  var toKey = require_toKey();
45064
- function baseGet(object, path14) {
45065
- path14 = castPath(path14, object);
45066
- var index = 0, length4 = path14.length;
45064
+ function baseGet(object, path15) {
45065
+ path15 = castPath(path15, object);
45066
+ var index = 0, length4 = path15.length;
45067
45067
  while (object != null && index < length4) {
45068
- object = object[toKey(path14[index++])];
45068
+ object = object[toKey(path15[index++])];
45069
45069
  }
45070
45070
  return index && index == length4 ? object : void 0;
45071
45071
  }
@@ -45077,8 +45077,8 @@ var require_baseGet = __commonJS({
45077
45077
  var require_get = __commonJS({
45078
45078
  "node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/get.js"(exports, module) {
45079
45079
  var baseGet = require_baseGet();
45080
- function get16(object, path14, defaultValue) {
45081
- var result = object == null ? void 0 : baseGet(object, path14);
45080
+ function get16(object, path15, defaultValue) {
45081
+ var result = object == null ? void 0 : baseGet(object, path15);
45082
45082
  return result === void 0 ? defaultValue : result;
45083
45083
  }
45084
45084
  module.exports = get16;
@@ -45104,11 +45104,11 @@ var require_hasPath = __commonJS({
45104
45104
  var isIndex = require_isIndex();
45105
45105
  var isLength = require_isLength();
45106
45106
  var toKey = require_toKey();
45107
- function hasPath(object, path14, hasFunc) {
45108
- path14 = castPath(path14, object);
45109
- var index = -1, length4 = path14.length, result = false;
45107
+ function hasPath(object, path15, hasFunc) {
45108
+ path15 = castPath(path15, object);
45109
+ var index = -1, length4 = path15.length, result = false;
45110
45110
  while (++index < length4) {
45111
- var key = toKey(path14[index]);
45111
+ var key = toKey(path15[index]);
45112
45112
  if (!(result = object != null && hasFunc(object, key))) {
45113
45113
  break;
45114
45114
  }
@@ -45129,8 +45129,8 @@ var require_hasIn = __commonJS({
45129
45129
  "node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/hasIn.js"(exports, module) {
45130
45130
  var baseHasIn = require_baseHasIn();
45131
45131
  var hasPath = require_hasPath();
45132
- function hasIn(object, path14) {
45133
- return object != null && hasPath(object, path14, baseHasIn);
45132
+ function hasIn(object, path15) {
45133
+ return object != null && hasPath(object, path15, baseHasIn);
45134
45134
  }
45135
45135
  module.exports = hasIn;
45136
45136
  }
@@ -45148,13 +45148,13 @@ var require_baseMatchesProperty = __commonJS({
45148
45148
  var toKey = require_toKey();
45149
45149
  var COMPARE_PARTIAL_FLAG = 1;
45150
45150
  var COMPARE_UNORDERED_FLAG = 2;
45151
- function baseMatchesProperty(path14, srcValue) {
45152
- if (isKey(path14) && isStrictComparable(srcValue)) {
45153
- return matchesStrictComparable(toKey(path14), srcValue);
45151
+ function baseMatchesProperty(path15, srcValue) {
45152
+ if (isKey(path15) && isStrictComparable(srcValue)) {
45153
+ return matchesStrictComparable(toKey(path15), srcValue);
45154
45154
  }
45155
45155
  return function(object) {
45156
- var objValue = get16(object, path14);
45157
- return objValue === void 0 && objValue === srcValue ? hasIn(object, path14) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
45156
+ var objValue = get16(object, path15);
45157
+ return objValue === void 0 && objValue === srcValue ? hasIn(object, path15) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
45158
45158
  };
45159
45159
  }
45160
45160
  module.exports = baseMatchesProperty;
@@ -45177,9 +45177,9 @@ var require_baseProperty = __commonJS({
45177
45177
  var require_basePropertyDeep = __commonJS({
45178
45178
  "node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePropertyDeep.js"(exports, module) {
45179
45179
  var baseGet = require_baseGet();
45180
- function basePropertyDeep(path14) {
45180
+ function basePropertyDeep(path15) {
45181
45181
  return function(object) {
45182
- return baseGet(object, path14);
45182
+ return baseGet(object, path15);
45183
45183
  };
45184
45184
  }
45185
45185
  module.exports = basePropertyDeep;
@@ -45193,8 +45193,8 @@ var require_property = __commonJS({
45193
45193
  var basePropertyDeep = require_basePropertyDeep();
45194
45194
  var isKey = require_isKey();
45195
45195
  var toKey = require_toKey();
45196
- function property(path14) {
45197
- return isKey(path14) ? baseProperty(toKey(path14)) : basePropertyDeep(path14);
45196
+ function property(path15) {
45197
+ return isKey(path15) ? baseProperty(toKey(path15)) : basePropertyDeep(path15);
45198
45198
  }
45199
45199
  module.exports = property;
45200
45200
  }
@@ -46467,10 +46467,10 @@ var require_isRemoteUrl = __commonJS({
46467
46467
  var require_getSDKVersions = __commonJS({
46468
46468
  "node_modules/.pnpm/cloudinary@2.7.0/node_modules/cloudinary/lib/utils/analytics/getSDKVersions.js"(exports, module) {
46469
46469
  var fs = __require("fs");
46470
- var path14 = __require("path");
46470
+ var path15 = __require("path");
46471
46471
  var sdkCode = "M";
46472
46472
  function readSdkSemver() {
46473
- const pkgJsonPath = path14.join(__dirname, "../../../package.json");
46473
+ const pkgJsonPath = path15.join(__dirname, "../../../package.json");
46474
46474
  try {
46475
46475
  const pkgJSONFile = fs.readFileSync(pkgJsonPath, "utf-8");
46476
46476
  return JSON.parse(pkgJSONFile).version;
@@ -47688,11 +47688,11 @@ var require_utils2 = __commonJS({
47688
47688
  if (!api_version || api_version.length === 0) {
47689
47689
  throw new Error("api_version needs to be a non-empty string");
47690
47690
  }
47691
- return (path14 = [], options3 = []) => {
47691
+ return (path15 = [], options3 = []) => {
47692
47692
  let cloudinary2 = ensureOption(options3, "upload_prefix", UPLOAD_PREFIX);
47693
47693
  let cloud_name = ensureOption(options3, "cloud_name");
47694
47694
  let encode_path = (unencoded_path) => encodeURIComponent(unencoded_path).replace("'", "%27");
47695
- let encoded_path = Array.isArray(path14) ? path14.map(encode_path) : encode_path(path14);
47695
+ let encoded_path = Array.isArray(path15) ? path15.map(encode_path) : encode_path(path15);
47696
47696
  return [cloudinary2, api_version, cloud_name].concat(encoded_path).join("/");
47697
47697
  };
47698
47698
  }
@@ -49595,19 +49595,19 @@ var require_uploader = __commonJS({
49595
49595
  return isRemoteUrl(file6) ? [params, { file: file6 }] : [params, {}, file6];
49596
49596
  });
49597
49597
  };
49598
- exports.upload_large = function upload_large(path14, callback, options3 = {}) {
49599
- if (path14 != null && isRemoteUrl(path14)) {
49600
- return exports.upload(path14, callback, options3);
49598
+ exports.upload_large = function upload_large(path15, callback, options3 = {}) {
49599
+ if (path15 != null && isRemoteUrl(path15)) {
49600
+ return exports.upload(path15, callback, options3);
49601
49601
  }
49602
- if (path14 != null && !options3.filename) {
49603
- options3.filename = path14.split(/(\\|\/)/g).pop().replace(/\.[^/.]+$/, "");
49602
+ if (path15 != null && !options3.filename) {
49603
+ options3.filename = path15.split(/(\\|\/)/g).pop().replace(/\.[^/.]+$/, "");
49604
49604
  }
49605
- return exports.upload_chunked(path14, callback, extend5({
49605
+ return exports.upload_chunked(path15, callback, extend5({
49606
49606
  resource_type: "raw"
49607
49607
  }, options3));
49608
49608
  };
49609
- exports.upload_chunked = function upload_chunked(path14, callback, options3) {
49610
- let file_reader = fs.createReadStream(path14);
49609
+ exports.upload_chunked = function upload_chunked(path15, callback, options3) {
49610
+ let file_reader = fs.createReadStream(path15);
49611
49611
  let out_stream = exports.upload_chunked_stream(callback, options3);
49612
49612
  return file_reader.pipe(out_stream);
49613
49613
  };
@@ -50586,20 +50586,20 @@ var require_api2 = __commonJS({
50586
50586
  params = pickOnlyExistingValues(options3, "next_cursor", "max_results");
50587
50587
  return call_api("get", uri, params, callback, options3);
50588
50588
  };
50589
- exports.sub_folders = function sub_folders(path14, callback, options3 = {}) {
50589
+ exports.sub_folders = function sub_folders(path15, callback, options3 = {}) {
50590
50590
  let uri, params;
50591
- uri = ["folders", path14];
50591
+ uri = ["folders", path15];
50592
50592
  params = pickOnlyExistingValues(options3, "next_cursor", "max_results");
50593
50593
  return call_api("get", uri, params, callback, options3);
50594
50594
  };
50595
- exports.create_folder = function create_folder(path14, callback, options3 = {}) {
50595
+ exports.create_folder = function create_folder(path15, callback, options3 = {}) {
50596
50596
  let uri;
50597
- uri = ["folders", path14];
50597
+ uri = ["folders", path15];
50598
50598
  return call_api("post", uri, {}, callback, options3);
50599
50599
  };
50600
- exports.delete_folder = function delete_folder(path14, callback, options3 = {}) {
50600
+ exports.delete_folder = function delete_folder(path15, callback, options3 = {}) {
50601
50601
  let uri;
50602
- uri = ["folders", path14];
50602
+ uri = ["folders", path15];
50603
50603
  return call_api("delete", uri, {}, callback, options3);
50604
50604
  };
50605
50605
  exports.rename_folder = function rename_folder(old_path, new_path, callback, options3 = {}) {
@@ -51776,7 +51776,7 @@ var require_package2 = __commonJS({
51776
51776
  var require_main = __commonJS({
51777
51777
  "node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.js"(exports, module) {
51778
51778
  var fs = __require("fs");
51779
- var path14 = __require("path");
51779
+ var path15 = __require("path");
51780
51780
  var os = __require("os");
51781
51781
  var crypto = __require("crypto");
51782
51782
  var packageJson = require_package2();
@@ -51925,7 +51925,7 @@ var require_main = __commonJS({
51925
51925
  possibleVaultPath = options3.path.endsWith(".vault") ? options3.path : `${options3.path}.vault`;
51926
51926
  }
51927
51927
  } else {
51928
- possibleVaultPath = path14.resolve(process.cwd(), ".env.vault");
51928
+ possibleVaultPath = path15.resolve(process.cwd(), ".env.vault");
51929
51929
  }
51930
51930
  if (fs.existsSync(possibleVaultPath)) {
51931
51931
  return possibleVaultPath;
@@ -51933,7 +51933,7 @@ var require_main = __commonJS({
51933
51933
  return null;
51934
51934
  }
51935
51935
  function _resolveHome(envPath) {
51936
- return envPath[0] === "~" ? path14.join(os.homedir(), envPath.slice(1)) : envPath;
51936
+ return envPath[0] === "~" ? path15.join(os.homedir(), envPath.slice(1)) : envPath;
51937
51937
  }
51938
51938
  function _configVault(options3) {
51939
51939
  const debug3 = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options3 && options3.debug);
@@ -51950,7 +51950,7 @@ var require_main = __commonJS({
51950
51950
  return { parsed };
51951
51951
  }
51952
51952
  function configDotenv(options3) {
51953
- const dotenvPath = path14.resolve(process.cwd(), ".env");
51953
+ const dotenvPath = path15.resolve(process.cwd(), ".env");
51954
51954
  let encoding = "utf8";
51955
51955
  let processEnv = process.env;
51956
51956
  if (options3 && options3.processEnv != null) {
@@ -51978,13 +51978,13 @@ var require_main = __commonJS({
51978
51978
  }
51979
51979
  let lastError;
51980
51980
  const parsedAll = {};
51981
- for (const path15 of optionPaths) {
51981
+ for (const path16 of optionPaths) {
51982
51982
  try {
51983
- const parsed = DotenvModule.parse(fs.readFileSync(path15, { encoding }));
51983
+ const parsed = DotenvModule.parse(fs.readFileSync(path16, { encoding }));
51984
51984
  DotenvModule.populate(parsedAll, parsed, options3);
51985
51985
  } catch (e) {
51986
51986
  if (debug3) {
51987
- _debug(`Failed to load ${path15} ${e.message}`);
51987
+ _debug(`Failed to load ${path16} ${e.message}`);
51988
51988
  }
51989
51989
  lastError = e;
51990
51990
  }
@@ -51997,7 +51997,7 @@ var require_main = __commonJS({
51997
51997
  const shortPaths = [];
51998
51998
  for (const filePath of optionPaths) {
51999
51999
  try {
52000
- const relative3 = path14.relative(process.cwd(), filePath);
52000
+ const relative3 = path15.relative(process.cwd(), filePath);
52001
52001
  shortPaths.push(relative3);
52002
52002
  } catch (e) {
52003
52003
  if (debug3) {
@@ -59079,67 +59079,67 @@ var Or = (self2, that) => {
59079
59079
  });
59080
59080
  return error4;
59081
59081
  };
59082
- var InvalidData = (path14, message, options3 = {
59082
+ var InvalidData = (path15, message, options3 = {
59083
59083
  pathDelim: "."
59084
59084
  }) => {
59085
59085
  const error4 = Object.create(proto2);
59086
59086
  error4._op = OP_INVALID_DATA;
59087
- error4.path = path14;
59087
+ error4.path = path15;
59088
59088
  error4.message = message;
59089
59089
  Object.defineProperty(error4, "toString", {
59090
59090
  enumerable: false,
59091
59091
  value() {
59092
- const path15 = pipe(this.path, join(options3.pathDelim));
59093
- return `(Invalid data at ${path15}: "${this.message}")`;
59092
+ const path16 = pipe(this.path, join(options3.pathDelim));
59093
+ return `(Invalid data at ${path16}: "${this.message}")`;
59094
59094
  }
59095
59095
  });
59096
59096
  return error4;
59097
59097
  };
59098
- var MissingData = (path14, message, options3 = {
59098
+ var MissingData = (path15, message, options3 = {
59099
59099
  pathDelim: "."
59100
59100
  }) => {
59101
59101
  const error4 = Object.create(proto2);
59102
59102
  error4._op = OP_MISSING_DATA;
59103
- error4.path = path14;
59103
+ error4.path = path15;
59104
59104
  error4.message = message;
59105
59105
  Object.defineProperty(error4, "toString", {
59106
59106
  enumerable: false,
59107
59107
  value() {
59108
- const path15 = pipe(this.path, join(options3.pathDelim));
59109
- return `(Missing data at ${path15}: "${this.message}")`;
59108
+ const path16 = pipe(this.path, join(options3.pathDelim));
59109
+ return `(Missing data at ${path16}: "${this.message}")`;
59110
59110
  }
59111
59111
  });
59112
59112
  return error4;
59113
59113
  };
59114
- var SourceUnavailable = (path14, message, cause3, options3 = {
59114
+ var SourceUnavailable = (path15, message, cause3, options3 = {
59115
59115
  pathDelim: "."
59116
59116
  }) => {
59117
59117
  const error4 = Object.create(proto2);
59118
59118
  error4._op = OP_SOURCE_UNAVAILABLE;
59119
- error4.path = path14;
59119
+ error4.path = path15;
59120
59120
  error4.message = message;
59121
59121
  error4.cause = cause3;
59122
59122
  Object.defineProperty(error4, "toString", {
59123
59123
  enumerable: false,
59124
59124
  value() {
59125
- const path15 = pipe(this.path, join(options3.pathDelim));
59126
- return `(Source unavailable at ${path15}: "${this.message}")`;
59125
+ const path16 = pipe(this.path, join(options3.pathDelim));
59126
+ return `(Source unavailable at ${path16}: "${this.message}")`;
59127
59127
  }
59128
59128
  });
59129
59129
  return error4;
59130
59130
  };
59131
- var Unsupported = (path14, message, options3 = {
59131
+ var Unsupported = (path15, message, options3 = {
59132
59132
  pathDelim: "."
59133
59133
  }) => {
59134
59134
  const error4 = Object.create(proto2);
59135
59135
  error4._op = OP_UNSUPPORTED;
59136
- error4.path = path14;
59136
+ error4.path = path15;
59137
59137
  error4.message = message;
59138
59138
  Object.defineProperty(error4, "toString", {
59139
59139
  enumerable: false,
59140
59140
  value() {
59141
- const path15 = pipe(this.path, join(options3.pathDelim));
59142
- return `(Unsupported operation at ${path15}: "${this.message}")`;
59141
+ const path16 = pipe(this.path, join(options3.pathDelim));
59142
+ return `(Unsupported operation at ${path16}: "${this.message}")`;
59143
59143
  }
59144
59144
  });
59145
59145
  return error4;
@@ -59272,9 +59272,9 @@ var unnested = /* @__PURE__ */ dual(2, (self2, name) => andThen5(self2, {
59272
59272
  _tag: "Unnested",
59273
59273
  name
59274
59274
  }));
59275
- var patch5 = /* @__PURE__ */ dual(2, (path14, patch9) => {
59275
+ var patch5 = /* @__PURE__ */ dual(2, (path15, patch9) => {
59276
59276
  let input = of3(patch9);
59277
- let output = path14;
59277
+ let output = path15;
59278
59278
  while (isCons(input)) {
59279
59279
  const patch10 = input.head;
59280
59280
  switch (patch10._tag) {
@@ -59379,7 +59379,7 @@ var make21 = (options3) => ({
59379
59379
  var makeFlat = (options3) => ({
59380
59380
  [FlatConfigProviderTypeId]: FlatConfigProviderTypeId,
59381
59381
  patch: options3.patch,
59382
- load: (path14, config3, split3 = true) => options3.load(path14, config3, split3),
59382
+ load: (path15, config3, split3 = true) => options3.load(path15, config3, split3),
59383
59383
  enumerateChildren: options3.enumerateChildren
59384
59384
  });
59385
59385
  var fromFlat = (flat) => make21({
@@ -59397,29 +59397,29 @@ var fromEnv = (options3) => {
59397
59397
  pathDelim: "_",
59398
59398
  seqDelim: ","
59399
59399
  }, options3);
59400
- const makePathString = (path14) => pipe(path14, join(pathDelim));
59400
+ const makePathString = (path15) => pipe(path15, join(pathDelim));
59401
59401
  const unmakePathString = (pathString) => pathString.split(pathDelim);
59402
59402
  const getEnv = () => typeof process !== "undefined" && "env" in process && typeof process.env === "object" ? process.env : {};
59403
- const load = (path14, primitive3, split3 = true) => {
59404
- const pathString = makePathString(path14);
59403
+ const load = (path15, primitive3, split3 = true) => {
59404
+ const pathString = makePathString(path15);
59405
59405
  const current = getEnv();
59406
59406
  const valueOpt = pathString in current ? some2(current[pathString]) : none2();
59407
- return pipe(valueOpt, mapError(() => MissingData(path14, `Expected ${pathString} to exist in the process context`)), flatMap7((value5) => parsePrimitive(value5, path14, primitive3, seqDelim, split3)));
59407
+ return pipe(valueOpt, mapError(() => MissingData(path15, `Expected ${pathString} to exist in the process context`)), flatMap7((value5) => parsePrimitive(value5, path15, primitive3, seqDelim, split3)));
59408
59408
  };
59409
- const enumerateChildren = (path14) => sync(() => {
59409
+ const enumerateChildren = (path15) => sync(() => {
59410
59410
  const current = getEnv();
59411
59411
  const keys6 = Object.keys(current);
59412
59412
  const keyPaths = keys6.map((value5) => unmakePathString(value5.toUpperCase()));
59413
59413
  const filteredKeyPaths = keyPaths.filter((keyPath) => {
59414
- for (let i = 0; i < path14.length; i++) {
59415
- const pathComponent = pipe(path14, unsafeGet(i));
59414
+ for (let i = 0; i < path15.length; i++) {
59415
+ const pathComponent = pipe(path15, unsafeGet(i));
59416
59416
  const currentElement = keyPath[i];
59417
59417
  if (currentElement === void 0 || pathComponent !== currentElement) {
59418
59418
  return false;
59419
59419
  }
59420
59420
  }
59421
59421
  return true;
59422
- }).flatMap((keyPath) => keyPath.slice(path14.length, path14.length + 1));
59422
+ }).flatMap((keyPath) => keyPath.slice(path15.length, path15.length + 1));
59423
59423
  return fromIterable6(filteredKeyPaths);
59424
59424
  });
59425
59425
  return fromFlat(makeFlat({
@@ -59436,26 +59436,26 @@ var fromMap = (map38, config3) => {
59436
59436
  seqDelim: ",",
59437
59437
  pathDelim: "."
59438
59438
  }, config3);
59439
- const makePathString = (path14) => pipe(path14, join(pathDelim));
59439
+ const makePathString = (path15) => pipe(path15, join(pathDelim));
59440
59440
  const unmakePathString = (pathString) => pathString.split(pathDelim);
59441
59441
  const mapWithIndexSplit = splitIndexInKeys(map38, (str) => unmakePathString(str), makePathString);
59442
- const load = (path14, primitive3, split3 = true) => {
59443
- const pathString = makePathString(path14);
59442
+ const load = (path15, primitive3, split3 = true) => {
59443
+ const pathString = makePathString(path15);
59444
59444
  const valueOpt = mapWithIndexSplit.has(pathString) ? some2(mapWithIndexSplit.get(pathString)) : none2();
59445
- return pipe(valueOpt, mapError(() => MissingData(path14, `Expected ${pathString} to exist in the provided map`)), flatMap7((value5) => parsePrimitive(value5, path14, primitive3, seqDelim, split3)));
59445
+ return pipe(valueOpt, mapError(() => MissingData(path15, `Expected ${pathString} to exist in the provided map`)), flatMap7((value5) => parsePrimitive(value5, path15, primitive3, seqDelim, split3)));
59446
59446
  };
59447
- const enumerateChildren = (path14) => sync(() => {
59447
+ const enumerateChildren = (path15) => sync(() => {
59448
59448
  const keyPaths = fromIterable2(mapWithIndexSplit.keys()).map(unmakePathString);
59449
59449
  const filteredKeyPaths = keyPaths.filter((keyPath) => {
59450
- for (let i = 0; i < path14.length; i++) {
59451
- const pathComponent = pipe(path14, unsafeGet(i));
59450
+ for (let i = 0; i < path15.length; i++) {
59451
+ const pathComponent = pipe(path15, unsafeGet(i));
59452
59452
  const currentElement = keyPath[i];
59453
59453
  if (currentElement === void 0 || pathComponent !== currentElement) {
59454
59454
  return false;
59455
59455
  }
59456
59456
  }
59457
59457
  return true;
59458
- }).flatMap((keyPath) => keyPath.slice(path14.length, path14.length + 1));
59458
+ }).flatMap((keyPath) => keyPath.slice(path15.length, path15.length + 1));
59459
59459
  return fromIterable6(filteredKeyPaths);
59460
59460
  });
59461
59461
  return fromFlat(makeFlat({
@@ -59471,17 +59471,17 @@ var extend2 = (leftDef, rightDef, left3, right3) => {
59471
59471
  const rightExtension = concat(right3, rightPad);
59472
59472
  return [leftExtension, rightExtension];
59473
59473
  };
59474
- var appendConfigPath = (path14, config3) => {
59474
+ var appendConfigPath = (path15, config3) => {
59475
59475
  let op = config3;
59476
59476
  if (op._tag === "Nested") {
59477
- const out = path14.slice();
59477
+ const out = path15.slice();
59478
59478
  while (op._tag === "Nested") {
59479
59479
  out.push(op.name);
59480
59480
  op = op.config;
59481
59481
  }
59482
59482
  return out;
59483
59483
  }
59484
- return path14;
59484
+ return path15;
59485
59485
  };
59486
59486
  var fromFlatLoop = (flat, prefix, config3, split3) => {
59487
59487
  const op = config3;
@@ -59557,8 +59557,8 @@ var fromFlatLoop = (flat, prefix, config3, split3) => {
59557
59557
  return fail2(right3.left);
59558
59558
  }
59559
59559
  if (isRight2(left3) && isRight2(right3)) {
59560
- const path14 = pipe(prefix, join("."));
59561
- const fail21 = fromFlatLoopFail(prefix, path14);
59560
+ const path15 = pipe(prefix, join("."));
59561
+ const fail21 = fromFlatLoopFail(prefix, path15);
59562
59562
  const [lefts, rights] = extend2(fail21, fail21, pipe(left3.right, map3(right2)), pipe(right3.right, map3(right2)));
59563
59563
  return pipe(lefts, zip(rights), forEachSequential(([left4, right4]) => pipe(zip2(left4, right4), map10(([left5, right5]) => op.zip(left5, right5)))));
59564
59564
  }
@@ -59567,27 +59567,27 @@ var fromFlatLoop = (flat, prefix, config3, split3) => {
59567
59567
  }
59568
59568
  }
59569
59569
  };
59570
- var fromFlatLoopFail = (prefix, path14) => (index) => left2(MissingData(prefix, `The element at index ${index} in a sequence at path "${path14}" was missing`));
59570
+ var fromFlatLoopFail = (prefix, path15) => (index) => left2(MissingData(prefix, `The element at index ${index} in a sequence at path "${path15}" was missing`));
59571
59571
  var mapInputPath = /* @__PURE__ */ dual(2, (self2, f) => fromFlat(mapInputPathFlat(self2.flattened, f)));
59572
59572
  var mapInputPathFlat = (self2, f) => makeFlat({
59573
- load: (path14, config3, split3 = true) => self2.load(path14, config3, split3),
59574
- enumerateChildren: (path14) => self2.enumerateChildren(path14),
59573
+ load: (path15, config3, split3 = true) => self2.load(path15, config3, split3),
59574
+ enumerateChildren: (path15) => self2.enumerateChildren(path15),
59575
59575
  patch: mapName(self2.patch, f)
59576
59576
  });
59577
59577
  var nested2 = /* @__PURE__ */ dual(2, (self2, name) => fromFlat(makeFlat({
59578
- load: (path14, config3) => self2.flattened.load(path14, config3, true),
59579
- enumerateChildren: (path14) => self2.flattened.enumerateChildren(path14),
59578
+ load: (path15, config3) => self2.flattened.load(path15, config3, true),
59579
+ enumerateChildren: (path15) => self2.flattened.enumerateChildren(path15),
59580
59580
  patch: nested(self2.flattened.patch, name)
59581
59581
  })));
59582
59582
  var unnested2 = /* @__PURE__ */ dual(2, (self2, name) => fromFlat(makeFlat({
59583
- load: (path14, config3) => self2.flattened.load(path14, config3, true),
59584
- enumerateChildren: (path14) => self2.flattened.enumerateChildren(path14),
59583
+ load: (path15, config3) => self2.flattened.load(path15, config3, true),
59584
+ enumerateChildren: (path15) => self2.flattened.enumerateChildren(path15),
59585
59585
  patch: unnested(self2.flattened.patch, name)
59586
59586
  })));
59587
59587
  var orElse3 = /* @__PURE__ */ dual(2, (self2, that) => fromFlat(orElseFlat(self2.flattened, () => that().flattened)));
59588
59588
  var orElseFlat = (self2, that) => makeFlat({
59589
- load: (path14, config3, split3) => pipe(patch5(path14, self2.patch), flatMap7((patch9) => self2.load(patch9, config3, split3)), catchAll((error1) => pipe(sync(that), flatMap7((that2) => pipe(patch5(path14, that2.patch), flatMap7((patch9) => that2.load(patch9, config3, split3)), catchAll((error22) => fail2(Or(error1, error22)))))))),
59590
- enumerateChildren: (path14) => pipe(patch5(path14, self2.patch), flatMap7((patch9) => self2.enumerateChildren(patch9)), either2, flatMap7((left3) => pipe(sync(that), flatMap7((that2) => pipe(patch5(path14, that2.patch), flatMap7((patch9) => that2.enumerateChildren(patch9)), either2, flatMap7((right3) => {
59589
+ load: (path15, config3, split3) => pipe(patch5(path15, self2.patch), flatMap7((patch9) => self2.load(patch9, config3, split3)), catchAll((error1) => pipe(sync(that), flatMap7((that2) => pipe(patch5(path15, that2.patch), flatMap7((patch9) => that2.load(patch9, config3, split3)), catchAll((error22) => fail2(Or(error1, error22)))))))),
59590
+ enumerateChildren: (path15) => pipe(patch5(path15, self2.patch), flatMap7((patch9) => self2.enumerateChildren(patch9)), either2, flatMap7((left3) => pipe(sync(that), flatMap7((that2) => pipe(patch5(path15, that2.patch), flatMap7((patch9) => that2.enumerateChildren(patch9)), either2, flatMap7((right3) => {
59591
59591
  if (isLeft2(left3) && isLeft2(right3)) {
59592
59592
  return fail2(And(left3.left, right3.left));
59593
59593
  }
@@ -59609,23 +59609,23 @@ var kebabCase2 = (self2) => mapInputPath(self2, kebabCase);
59609
59609
  var lowerCase2 = (self2) => mapInputPath(self2, lowerCase);
59610
59610
  var snakeCase2 = (self2) => mapInputPath(self2, snakeCase);
59611
59611
  var upperCase2 = (self2) => mapInputPath(self2, upperCase);
59612
- var within = /* @__PURE__ */ dual(3, (self2, path14, f) => {
59613
- const unnest = reduce(path14, self2, (provider, name) => unnested2(provider, name));
59614
- const nest3 = reduceRight(path14, f(unnest), (provider, name) => nested2(provider, name));
59612
+ var within = /* @__PURE__ */ dual(3, (self2, path15, f) => {
59613
+ const unnest = reduce(path15, self2, (provider, name) => unnested2(provider, name));
59614
+ const nest3 = reduceRight(path15, f(unnest), (provider, name) => nested2(provider, name));
59615
59615
  return orElse3(nest3, () => self2);
59616
59616
  });
59617
59617
  var splitPathString = (text11, delim) => {
59618
59618
  const split3 = text11.split(new RegExp(`\\s*${escape(delim)}\\s*`));
59619
59619
  return split3;
59620
59620
  };
59621
- var parsePrimitive = (text11, path14, primitive3, delimiter, split3) => {
59621
+ var parsePrimitive = (text11, path15, primitive3, delimiter, split3) => {
59622
59622
  if (!split3) {
59623
59623
  return pipe(primitive3.parse(text11), mapBoth2({
59624
- onFailure: prefixed(path14),
59624
+ onFailure: prefixed(path15),
59625
59625
  onSuccess: of
59626
59626
  }));
59627
59627
  }
59628
- return pipe(splitPathString(text11, delimiter), forEachSequential((char4) => primitive3.parse(char4.trim())), mapError(prefixed(path14)));
59628
+ return pipe(splitPathString(text11, delimiter), forEachSequential((char4) => primitive3.parse(char4.trim())), mapError(prefixed(path15)));
59629
59629
  };
59630
59630
  var transpose = (array9) => {
59631
59631
  return Object.keys(array9[0]).map((column3) => array9.map((row) => row[column3]));
@@ -59686,14 +59686,14 @@ var fromJson = (json2) => {
59686
59686
  seqDelim: hiddenDelimiter
59687
59687
  });
59688
59688
  };
59689
- var configPathToString = (path14) => {
59689
+ var configPathToString = (path15) => {
59690
59690
  const output = [];
59691
59691
  let i = 0;
59692
- while (i < path14.length) {
59693
- const component = path14[i];
59692
+ while (i < path15.length) {
59693
+ const component = path15[i];
59694
59694
  if (component._tag === "KeyName") {
59695
- if (i + 1 < path14.length) {
59696
- const nextComponent = path14[i + 1];
59695
+ if (i + 1 < path15.length) {
59696
+ const nextComponent = path15[i + 1];
59697
59697
  if (nextComponent._tag === "KeyIndex") {
59698
59698
  output.push(`${component.name}[${nextComponent.index}]`);
59699
59699
  i += 2;
@@ -59710,27 +59710,27 @@ var configPathToString = (path14) => {
59710
59710
  return output;
59711
59711
  };
59712
59712
  var getIndexedEntries = (config3) => {
59713
- const loopAny = (path14, value5) => {
59713
+ const loopAny = (path15, value5) => {
59714
59714
  if (typeof value5 === "string") {
59715
- return make4([path14, value5]);
59715
+ return make4([path15, value5]);
59716
59716
  }
59717
59717
  if (typeof value5 === "number" || typeof value5 === "boolean") {
59718
- return make4([path14, String(value5)]);
59718
+ return make4([path15, String(value5)]);
59719
59719
  }
59720
59720
  if (isArray(value5)) {
59721
- return loopArray(path14, value5);
59721
+ return loopArray(path15, value5);
59722
59722
  }
59723
59723
  if (typeof value5 === "object" && value5 !== null) {
59724
- return loopObject(path14, value5);
59724
+ return loopObject(path15, value5);
59725
59725
  }
59726
59726
  return empty3();
59727
59727
  };
59728
- const loopArray = (path14, values3) => match3(values3, {
59729
- onEmpty: () => make4([path14, "<nil>"]),
59730
- onNonEmpty: flatMap2((value5, index) => loopAny(append(path14, keyIndex(index)), value5))
59728
+ const loopArray = (path15, values3) => match3(values3, {
59729
+ onEmpty: () => make4([path15, "<nil>"]),
59730
+ onNonEmpty: flatMap2((value5, index) => loopAny(append(path15, keyIndex(index)), value5))
59731
59731
  });
59732
- const loopObject = (path14, value5) => Object.entries(value5).filter(([, value6]) => isNotNullable(value6)).flatMap(([key, value6]) => {
59733
- const newPath = append(path14, keyName(key));
59732
+ const loopObject = (path15, value5) => Object.entries(value5).filter(([, value6]) => isNotNullable(value6)).flatMap(([key, value6]) => {
59733
+ const newPath = append(path15, keyName(key));
59734
59734
  const result = loopAny(newPath, value6);
59735
59735
  if (isEmptyReadonlyArray(result)) {
59736
59736
  return make4([newPath, ""]);
@@ -68434,14 +68434,14 @@ var formatPropertyKey = (name) => typeof name === "string" ? JSON.stringify(name
68434
68434
  var isNonEmpty5 = (x) => Array.isArray(x);
68435
68435
  var isSingle = (x) => !Array.isArray(x);
68436
68436
  var formatPathKey = (key) => `[${formatPropertyKey(key)}]`;
68437
- var formatPath = (path14) => isNonEmpty5(path14) ? path14.map(formatPathKey).join("") : formatPathKey(path14);
68437
+ var formatPath = (path15) => isNonEmpty5(path15) ? path15.map(formatPathKey).join("") : formatPathKey(path15);
68438
68438
 
68439
68439
  // node_modules/.pnpm/effect@3.17.7/node_modules/effect/dist/esm/internal/schema/errors.js
68440
- var getErrorMessage = (reason, details, path14, ast) => {
68440
+ var getErrorMessage = (reason, details, path15, ast) => {
68441
68441
  let out = reason;
68442
- if (path14 && isNonEmptyReadonlyArray(path14)) {
68442
+ if (path15 && isNonEmptyReadonlyArray(path15)) {
68443
68443
  out += `
68444
- at path: ${formatPath(path14)}`;
68444
+ at path: ${formatPath(path15)}`;
68445
68445
  }
68446
68446
  if (details !== void 0) {
68447
68447
  out += `
@@ -68453,7 +68453,7 @@ schema (${ast._tag}): ${ast}`;
68453
68453
  }
68454
68454
  return out;
68455
68455
  };
68456
- var getSchemaExtendErrorMessage = (x, y, path14) => getErrorMessage("Unsupported schema or overlapping types", `cannot extend ${x} with ${y}`, path14);
68456
+ var getSchemaExtendErrorMessage = (x, y, path15) => getErrorMessage("Unsupported schema or overlapping types", `cannot extend ${x} with ${y}`, path15);
68457
68457
  var getASTUnsupportedKeySchemaErrorMessage = (ast) => getErrorMessage("Unsupported key schema", void 0, void 0, ast);
68458
68458
  var getASTUnsupportedLiteralErrorMessage = (literal3) => getErrorMessage("Unsupported literal", `literal value: ${formatUnknown(literal3)}`);
68459
68459
  var getASTDuplicateIndexSignatureErrorMessage = (type2) => getErrorMessage("Duplicate index signature", `${type2} index signature`);
@@ -69638,8 +69638,8 @@ var Pointer = class {
69638
69638
  * @since 3.10.0
69639
69639
  */
69640
69640
  _tag = "Pointer";
69641
- constructor(path14, actual, issue) {
69642
- this.path = path14;
69641
+ constructor(path15, actual, issue) {
69642
+ this.path = path15;
69643
69643
  this.actual = actual;
69644
69644
  this.issue = issue;
69645
69645
  }
@@ -74319,7 +74319,7 @@ function makeTypeLiteralClass(fields, records, ast = getDefaultTypeLiteralAST(fi
74319
74319
  function Struct(fields, ...records) {
74320
74320
  return makeTypeLiteralClass(fields, records);
74321
74321
  }
74322
- var intersectTypeLiterals = (x, y, path14) => {
74322
+ var intersectTypeLiterals = (x, y, path15) => {
74323
74323
  if (isTypeLiteral(x) && isTypeLiteral(y)) {
74324
74324
  const propertySignatures = [...x.propertySignatures];
74325
74325
  for (const ps of y.propertySignatures) {
@@ -74332,18 +74332,18 @@ var intersectTypeLiterals = (x, y, path14) => {
74332
74332
  isOptional,
74333
74333
  type: type2
74334
74334
  } = propertySignatures[i];
74335
- propertySignatures[i] = new PropertySignature(name, extendAST(type2, ps.type, path14.concat(name)), isOptional, true);
74335
+ propertySignatures[i] = new PropertySignature(name, extendAST(type2, ps.type, path15.concat(name)), isOptional, true);
74336
74336
  }
74337
74337
  }
74338
74338
  return new TypeLiteral(propertySignatures, x.indexSignatures.concat(y.indexSignatures));
74339
74339
  }
74340
- throw new Error(getSchemaExtendErrorMessage(x, y, path14));
74340
+ throw new Error(getSchemaExtendErrorMessage(x, y, path15));
74341
74341
  };
74342
74342
  var preserveRefinementAnnotations = /* @__PURE__ */ omitAnnotations([IdentifierAnnotationId]);
74343
74343
  var addRefinementToMembers = (refinement, asts) => asts.map((ast) => new Refinement(ast, refinement.filter, preserveRefinementAnnotations(refinement)));
74344
- var extendAST = (x, y, path14) => Union.make(intersectUnionMembers([x], [y], path14));
74344
+ var extendAST = (x, y, path15) => Union.make(intersectUnionMembers([x], [y], path15));
74345
74345
  var getTypes = (ast) => isUnion(ast) ? ast.types : [ast];
74346
- var intersectUnionMembers = (xs, ys, path14) => flatMap2(xs, (x) => flatMap2(ys, (y) => {
74346
+ var intersectUnionMembers = (xs, ys, path15) => flatMap2(xs, (x) => flatMap2(ys, (y) => {
74347
74347
  switch (y._tag) {
74348
74348
  case "Literal": {
74349
74349
  if (isString(y.literal) && isStringKeyword(x) || isNumber(y.literal) && isNumberKeyword(x) || isBoolean(y.literal) && isBooleanKeyword(x)) {
@@ -74356,7 +74356,7 @@ var intersectUnionMembers = (xs, ys, path14) => flatMap2(xs, (x) => flatMap2(ys,
74356
74356
  if (isStringKeyword(x) || isLiteral(x) && isString(x.literal)) {
74357
74357
  return [x];
74358
74358
  } else if (isRefinement(x)) {
74359
- return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path14));
74359
+ return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path15));
74360
74360
  }
74361
74361
  } else if (x === stringKeyword) {
74362
74362
  return [y];
@@ -74368,7 +74368,7 @@ var intersectUnionMembers = (xs, ys, path14) => flatMap2(xs, (x) => flatMap2(ys,
74368
74368
  if (isNumberKeyword(x) || isLiteral(x) && isNumber(x.literal)) {
74369
74369
  return [x];
74370
74370
  } else if (isRefinement(x)) {
74371
- return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path14));
74371
+ return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path15));
74372
74372
  }
74373
74373
  } else if (x === numberKeyword) {
74374
74374
  return [y];
@@ -74380,7 +74380,7 @@ var intersectUnionMembers = (xs, ys, path14) => flatMap2(xs, (x) => flatMap2(ys,
74380
74380
  if (isBooleanKeyword(x) || isLiteral(x) && isBoolean(x.literal)) {
74381
74381
  return [x];
74382
74382
  } else if (isRefinement(x)) {
74383
- return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path14));
74383
+ return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path15));
74384
74384
  }
74385
74385
  } else if (x === booleanKeyword) {
74386
74386
  return [y];
@@ -74388,25 +74388,25 @@ var intersectUnionMembers = (xs, ys, path14) => flatMap2(xs, (x) => flatMap2(ys,
74388
74388
  break;
74389
74389
  }
74390
74390
  case "Union":
74391
- return intersectUnionMembers(getTypes(x), y.types, path14);
74391
+ return intersectUnionMembers(getTypes(x), y.types, path15);
74392
74392
  case "Suspend":
74393
- return [new Suspend(() => extendAST(x, y.f(), path14))];
74393
+ return [new Suspend(() => extendAST(x, y.f(), path15))];
74394
74394
  case "Refinement":
74395
- return addRefinementToMembers(y, intersectUnionMembers(getTypes(x), getTypes(y.from), path14));
74395
+ return addRefinementToMembers(y, intersectUnionMembers(getTypes(x), getTypes(y.from), path15));
74396
74396
  case "TypeLiteral": {
74397
74397
  switch (x._tag) {
74398
74398
  case "Union":
74399
- return intersectUnionMembers(x.types, [y], path14);
74399
+ return intersectUnionMembers(x.types, [y], path15);
74400
74400
  case "Suspend":
74401
- return [new Suspend(() => extendAST(x.f(), y, path14))];
74401
+ return [new Suspend(() => extendAST(x.f(), y, path15))];
74402
74402
  case "Refinement":
74403
- return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path14));
74403
+ return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path15));
74404
74404
  case "TypeLiteral":
74405
- return [intersectTypeLiterals(x, y, path14)];
74405
+ return [intersectTypeLiterals(x, y, path15)];
74406
74406
  case "Transformation": {
74407
74407
  const transformation = x.transformation;
74408
- const from = intersectTypeLiterals(x.from, y, path14);
74409
- const to = intersectTypeLiterals(x.to, typeAST(y), path14);
74408
+ const from = intersectTypeLiterals(x.from, y, path15);
74409
+ const to = intersectTypeLiterals(x.to, typeAST(y), path15);
74410
74410
  switch (transformation._tag) {
74411
74411
  case "TypeLiteralTransformation":
74412
74412
  return [new Transformation(from, to, new TypeLiteralTransformation(transformation.propertySignatureTransformations))];
@@ -74428,15 +74428,15 @@ var intersectUnionMembers = (xs, ys, path14) => flatMap2(xs, (x) => flatMap2(ys,
74428
74428
  case "Transformation": {
74429
74429
  if (isTransformation(x)) {
74430
74430
  if (isTypeLiteralTransformation(y.transformation) && isTypeLiteralTransformation(x.transformation)) {
74431
- return [new Transformation(intersectTypeLiterals(x.from, y.from, path14), intersectTypeLiterals(x.to, y.to, path14), new TypeLiteralTransformation(y.transformation.propertySignatureTransformations.concat(x.transformation.propertySignatureTransformations)))];
74431
+ return [new Transformation(intersectTypeLiterals(x.from, y.from, path15), intersectTypeLiterals(x.to, y.to, path15), new TypeLiteralTransformation(y.transformation.propertySignatureTransformations.concat(x.transformation.propertySignatureTransformations)))];
74432
74432
  }
74433
74433
  } else {
74434
- return intersectUnionMembers([y], [x], path14);
74434
+ return intersectUnionMembers([y], [x], path15);
74435
74435
  }
74436
74436
  break;
74437
74437
  }
74438
74438
  }
74439
- throw new Error(getSchemaExtendErrorMessage(x, y, path14));
74439
+ throw new Error(getSchemaExtendErrorMessage(x, y, path15));
74440
74440
  }));
74441
74441
  var extend4 = /* @__PURE__ */ dual(2, (self2, that) => make53(extendAST(self2.ast, that.ast, [])));
74442
74442
  var compose3 = /* @__PURE__ */ dual((args2) => isSchema(args2[1]), (from, to) => makeTransformationClass(from, to, compose(from.ast, to.ast)));
@@ -75106,8 +75106,8 @@ var PiB = (n) => Size(BigInt(n) * bigintPiB);
75106
75106
  var make54 = (impl) => {
75107
75107
  return tag.of({
75108
75108
  ...impl,
75109
- exists: (path14) => pipe(impl.access(path14), as5(true), catchTag2("SystemError", (e) => e.reason === "NotFound" ? succeed9(false) : fail9(e))),
75110
- readFileString: (path14, encoding) => tryMap2(impl.readFile(path14), {
75109
+ exists: (path15) => pipe(impl.access(path15), as5(true), catchTag2("SystemError", (e) => e.reason === "NotFound" ? succeed9(false) : fail9(e))),
75110
+ readFileString: (path15, encoding) => tryMap2(impl.readFile(path15), {
75111
75111
  try: (_) => new TextDecoder(encoding).decode(_),
75112
75112
  catch: (cause3) => new BadArgument({
75113
75113
  module: "FileSystem",
@@ -75116,14 +75116,14 @@ var make54 = (impl) => {
75116
75116
  cause: cause3
75117
75117
  })
75118
75118
  }),
75119
- stream: (path14, options3) => pipe(impl.open(path14, {
75119
+ stream: (path15, options3) => pipe(impl.open(path15, {
75120
75120
  flag: "r"
75121
75121
  }), options3?.offset ? tap4((file6) => file6.seek(options3.offset, "start")) : identity, map18((file6) => stream(file6, options3)), unwrapScoped7),
75122
- sink: (path14, options3) => pipe(impl.open(path14, {
75122
+ sink: (path15, options3) => pipe(impl.open(path15, {
75123
75123
  flag: "w",
75124
75124
  ...options3
75125
75125
  }), map18((file6) => forEach11((_) => file6.writeAll(_))), unwrapScoped6),
75126
- writeFileString: (path14, data, options3) => flatMap10(try_3({
75126
+ writeFileString: (path15, data, options3) => flatMap10(try_3({
75127
75127
  try: () => new TextEncoder().encode(data),
75128
75128
  catch: (cause3) => new BadArgument({
75129
75129
  module: "FileSystem",
@@ -75131,38 +75131,38 @@ var make54 = (impl) => {
75131
75131
  description: "could not encode string",
75132
75132
  cause: cause3
75133
75133
  })
75134
- }), (_) => impl.writeFile(path14, _, options3))
75134
+ }), (_) => impl.writeFile(path15, _, options3))
75135
75135
  });
75136
75136
  };
75137
- var notFound = (method, path14) => new SystemError({
75137
+ var notFound = (method, path15) => new SystemError({
75138
75138
  module: "FileSystem",
75139
75139
  method,
75140
75140
  reason: "NotFound",
75141
75141
  description: "No such file or directory",
75142
- pathOrDescriptor: path14
75142
+ pathOrDescriptor: path15
75143
75143
  });
75144
75144
  var makeNoop = (fileSystem) => {
75145
75145
  return {
75146
- access(path14) {
75147
- return fail9(notFound("access", path14));
75146
+ access(path15) {
75147
+ return fail9(notFound("access", path15));
75148
75148
  },
75149
- chmod(path14) {
75150
- return fail9(notFound("chmod", path14));
75149
+ chmod(path15) {
75150
+ return fail9(notFound("chmod", path15));
75151
75151
  },
75152
- chown(path14) {
75153
- return fail9(notFound("chown", path14));
75152
+ chown(path15) {
75153
+ return fail9(notFound("chown", path15));
75154
75154
  },
75155
- copy(path14) {
75156
- return fail9(notFound("copy", path14));
75155
+ copy(path15) {
75156
+ return fail9(notFound("copy", path15));
75157
75157
  },
75158
- copyFile(path14) {
75159
- return fail9(notFound("copyFile", path14));
75158
+ copyFile(path15) {
75159
+ return fail9(notFound("copyFile", path15));
75160
75160
  },
75161
75161
  exists() {
75162
75162
  return succeed9(false);
75163
75163
  },
75164
- link(path14) {
75165
- return fail9(notFound("link", path14));
75164
+ link(path15) {
75165
+ return fail9(notFound("link", path15));
75166
75166
  },
75167
75167
  makeDirectory() {
75168
75168
  return die6("not implemented");
@@ -75179,23 +75179,23 @@ var makeNoop = (fileSystem) => {
75179
75179
  makeTempFileScoped() {
75180
75180
  return die6("not implemented");
75181
75181
  },
75182
- open(path14) {
75183
- return fail9(notFound("open", path14));
75182
+ open(path15) {
75183
+ return fail9(notFound("open", path15));
75184
75184
  },
75185
- readDirectory(path14) {
75186
- return fail9(notFound("readDirectory", path14));
75185
+ readDirectory(path15) {
75186
+ return fail9(notFound("readDirectory", path15));
75187
75187
  },
75188
- readFile(path14) {
75189
- return fail9(notFound("readFile", path14));
75188
+ readFile(path15) {
75189
+ return fail9(notFound("readFile", path15));
75190
75190
  },
75191
- readFileString(path14) {
75192
- return fail9(notFound("readFileString", path14));
75191
+ readFileString(path15) {
75192
+ return fail9(notFound("readFileString", path15));
75193
75193
  },
75194
- readLink(path14) {
75195
- return fail9(notFound("readLink", path14));
75194
+ readLink(path15) {
75195
+ return fail9(notFound("readLink", path15));
75196
75196
  },
75197
- realPath(path14) {
75198
- return fail9(notFound("realPath", path14));
75197
+ realPath(path15) {
75198
+ return fail9(notFound("realPath", path15));
75199
75199
  },
75200
75200
  remove() {
75201
75201
  return _void;
@@ -75203,32 +75203,32 @@ var makeNoop = (fileSystem) => {
75203
75203
  rename(oldPath) {
75204
75204
  return fail9(notFound("rename", oldPath));
75205
75205
  },
75206
- sink(path14) {
75207
- return fail15(notFound("sink", path14));
75206
+ sink(path15) {
75207
+ return fail15(notFound("sink", path15));
75208
75208
  },
75209
- stat(path14) {
75210
- return fail9(notFound("stat", path14));
75209
+ stat(path15) {
75210
+ return fail9(notFound("stat", path15));
75211
75211
  },
75212
- stream(path14) {
75213
- return fail16(notFound("stream", path14));
75212
+ stream(path15) {
75213
+ return fail16(notFound("stream", path15));
75214
75214
  },
75215
75215
  symlink(fromPath) {
75216
75216
  return fail9(notFound("symlink", fromPath));
75217
75217
  },
75218
- truncate(path14) {
75219
- return fail9(notFound("truncate", path14));
75218
+ truncate(path15) {
75219
+ return fail9(notFound("truncate", path15));
75220
75220
  },
75221
- utimes(path14) {
75222
- return fail9(notFound("utimes", path14));
75221
+ utimes(path15) {
75222
+ return fail9(notFound("utimes", path15));
75223
75223
  },
75224
- watch(path14) {
75225
- return fail16(notFound("watch", path14));
75224
+ watch(path15) {
75225
+ return fail16(notFound("watch", path15));
75226
75226
  },
75227
- writeFile(path14) {
75228
- return fail9(notFound("writeFile", path14));
75227
+ writeFile(path15) {
75228
+ return fail9(notFound("writeFile", path15));
75229
75229
  },
75230
- writeFileString(path14) {
75231
- return fail9(notFound("writeFileString", path14));
75230
+ writeFileString(path15) {
75231
+ return fail9(notFound("writeFileString", path15));
75232
75232
  },
75233
75233
  ...fileSystem
75234
75234
  };
@@ -75288,22 +75288,22 @@ var fileParsers = {
75288
75288
  toml: (content) => Toml.parse(content),
75289
75289
  tml: (content) => Toml.parse(content)
75290
75290
  };
75291
- var read2 = (path14) => flatMap10(FileSystem, (fs) => matchEffect2(fs.readFile(path14), {
75292
- onFailure: (error4) => fail9(`Could not read file (${path14}): ${error4}`),
75293
- onSuccess: (content) => succeed9([path14, content])
75291
+ var read2 = (path15) => flatMap10(FileSystem, (fs) => matchEffect2(fs.readFile(path15), {
75292
+ onFailure: (error4) => fail9(`Could not read file (${path15}): ${error4}`),
75293
+ onSuccess: (content) => succeed9([path15, content])
75294
75294
  }));
75295
- var readString = (path14) => flatMap10(FileSystem, (fs) => matchEffect2(fs.readFileString(path14), {
75296
- onFailure: (error4) => fail9(`Could not read file (${path14}): ${error4}`),
75297
- onSuccess: (content) => succeed9([path14, content])
75295
+ var readString = (path15) => flatMap10(FileSystem, (fs) => matchEffect2(fs.readFileString(path15), {
75296
+ onFailure: (error4) => fail9(`Could not read file (${path15}): ${error4}`),
75297
+ onSuccess: (content) => succeed9([path15, content])
75298
75298
  }));
75299
- var parse5 = (path14, content, format6) => {
75300
- const parser = fileParsers[format6 ?? path14.split(".").pop()];
75299
+ var parse5 = (path15, content, format6) => {
75300
+ const parser = fileParsers[format6 ?? path15.split(".").pop()];
75301
75301
  if (parser === void 0) {
75302
75302
  return fail9(`Unsupported file format: ${format6}`);
75303
75303
  }
75304
75304
  return try_3({
75305
75305
  try: () => parser(content),
75306
- catch: (e) => `Could not parse ${format6} file (${path14}): ${e}`
75306
+ catch: (e) => `Could not parse ${format6} file (${path15}): ${e}`
75307
75307
  });
75308
75308
  };
75309
75309
 
@@ -76896,8 +76896,8 @@ var run5 = /* @__PURE__ */ fnUntraced2(function* (self2) {
76896
76896
  const input = yield* terminal.readInput;
76897
76897
  return yield* runWithInput(self2, terminal, input);
76898
76898
  }, /* @__PURE__ */ mapError3(() => new QuitException()), scoped2);
76899
- var runWithInput = (prompt9, terminal, input) => suspend4(() => {
76900
- const op = prompt9;
76899
+ var runWithInput = (prompt10, terminal, input) => suspend4(() => {
76900
+ const op = prompt10;
76901
76901
  switch (op._tag) {
76902
76902
  case "Loop": {
76903
76903
  return runLoop(op, terminal, input);
@@ -77110,8 +77110,8 @@ function eraseText(text11, columns) {
77110
77110
  }
77111
77111
  return eraseLines3(rows);
77112
77112
  }
77113
- function lines(prompt9, columns) {
77114
- const lines4 = prompt9.split(/\r?\n/);
77113
+ function lines(prompt10, columns) {
77114
+ const lines4 = prompt10.split(/\r?\n/);
77115
77115
  return columns === 0 ? lines4.length : pipe(map3(lines4, (line4) => Math.ceil(line4.length / columns)), reduce(0, (left3, right3) => left3 + right3));
77116
77116
  }
77117
77117
 
@@ -77621,22 +77621,22 @@ var showConfirmation = /* @__PURE__ */ Confirm.$is("Show");
77621
77621
  var renderBeep2 = /* @__PURE__ */ render3(beep3, {
77622
77622
  style: "pretty"
77623
77623
  });
77624
- function resolveCurrentPath(path14, options3) {
77625
- return match2(path14, {
77624
+ function resolveCurrentPath(path15, options3) {
77625
+ return match2(path15, {
77626
77626
  onNone: () => match2(options3.startingPath, {
77627
77627
  onNone: () => sync5(() => process.cwd()),
77628
- onSome: (path15) => flatMap10(FileSystem, (fs) => (
77628
+ onSome: (path16) => flatMap10(FileSystem, (fs) => (
77629
77629
  // Ensure the user provided starting path exists
77630
- orDie3(fs.exists(path15)).pipe(filterOrDieMessage2(identity, `The provided starting path '${path15}' does not exist`), as5(path15))
77630
+ orDie3(fs.exists(path16)).pipe(filterOrDieMessage2(identity, `The provided starting path '${path16}' does not exist`), as5(path16))
77631
77631
  ))
77632
77632
  }),
77633
- onSome: (path15) => succeed9(path15)
77633
+ onSome: (path16) => succeed9(path16)
77634
77634
  });
77635
77635
  }
77636
77636
  function getFileList(directory5, options3) {
77637
77637
  return gen3(function* () {
77638
77638
  const fs = yield* FileSystem;
77639
- const path14 = yield* Path2;
77639
+ const path15 = yield* Path2;
77640
77640
  const files = yield* orDie3(fs.readDirectory(directory5)).pipe(
77641
77641
  // Always prepend the `".."` option to the file list but allow it
77642
77642
  // to be filtered out if the user so desires
@@ -77645,7 +77645,7 @@ function getFileList(directory5, options3) {
77645
77645
  return yield* filter8(files, (file6) => {
77646
77646
  const result = options3.filter(file6);
77647
77647
  const userDefinedFilter = isEffect2(result) ? result : succeed9(result);
77648
- const directoryFilter = options3.type === "directory" ? map18(orDie3(fs.stat(path14.join(directory5, file6))), (info3) => info3.type === "Directory") : succeed9(true);
77648
+ const directoryFilter = options3.type === "directory" ? map18(orDie3(fs.stat(path15.join(directory5, file6))), (info3) => info3.type === "Directory") : succeed9(true);
77649
77649
  return zipWith5(userDefinedFilter, directoryFilter, (a, b) => a && b);
77650
77650
  }, {
77651
77651
  concurrency: files.length
@@ -77711,13 +77711,13 @@ function renderFiles(state, files, figures2, options3) {
77711
77711
  }
77712
77712
  function renderNextFrame2(state, options3) {
77713
77713
  return gen3(function* () {
77714
- const path14 = yield* Path2;
77714
+ const path15 = yield* Path2;
77715
77715
  const terminal = yield* Terminal;
77716
77716
  const columns = yield* terminal.columns;
77717
77717
  const figures2 = yield* figures;
77718
77718
  const currentPath = yield* resolveCurrentPath(state.path, options3);
77719
77719
  const selectedPath = state.files[state.cursor];
77720
- const resolvedPath = path14.resolve(currentPath, selectedPath);
77720
+ const resolvedPath = path15.resolve(currentPath, selectedPath);
77721
77721
  const resolvedPathMsg = figures2.pointerSmall.pipe(cat2(space2), cat2(text3(resolvedPath)), annotate2(blackBright2));
77722
77722
  if (showConfirmation(state.confirm)) {
77723
77723
  const leadingSymbol2 = annotate2(text3("?"), cyanBright2);
@@ -77792,10 +77792,10 @@ function processCursorDown(state) {
77792
77792
  function processSelection(state, options3) {
77793
77793
  return gen3(function* () {
77794
77794
  const fs = yield* FileSystem;
77795
- const path14 = yield* Path2;
77795
+ const path15 = yield* Path2;
77796
77796
  const currentPath = yield* resolveCurrentPath(state.path, options3);
77797
77797
  const selectedPath = state.files[state.cursor];
77798
- const resolvedPath = path14.resolve(currentPath, selectedPath);
77798
+ const resolvedPath = path15.resolve(currentPath, selectedPath);
77799
77799
  const info3 = yield* orDie3(fs.stat(resolvedPath));
77800
77800
  if (info3.type === "Directory") {
77801
77801
  const files = yield* getFileList(resolvedPath, options3);
@@ -77843,10 +77843,10 @@ function handleProcess2(options3) {
77843
77843
  case "y":
77844
77844
  case "t": {
77845
77845
  if (showConfirmation(state.confirm)) {
77846
- const path14 = yield* Path2;
77846
+ const path15 = yield* Path2;
77847
77847
  const currentPath = yield* resolveCurrentPath(state.path, options3);
77848
77848
  const selectedPath = state.files[state.cursor];
77849
- const resolvedPath = path14.resolve(currentPath, selectedPath);
77849
+ const resolvedPath = path15.resolve(currentPath, selectedPath);
77850
77850
  const files = yield* getFileList(resolvedPath, options3);
77851
77851
  return Action.NextFrame({
77852
77852
  state: {
@@ -77862,10 +77862,10 @@ function handleProcess2(options3) {
77862
77862
  case "n":
77863
77863
  case "f": {
77864
77864
  if (showConfirmation(state.confirm)) {
77865
- const path14 = yield* Path2;
77865
+ const path15 = yield* Path2;
77866
77866
  const currentPath = yield* resolveCurrentPath(state.path, options3);
77867
77867
  const selectedPath = state.files[state.cursor];
77868
- const resolvedPath = path14.resolve(currentPath, selectedPath);
77868
+ const resolvedPath = path15.resolve(currentPath, selectedPath);
77869
77869
  return Action.Submit({
77870
77870
  value: resolvedPath
77871
77871
  });
@@ -77887,14 +77887,14 @@ var file = (options3 = {}) => {
77887
77887
  filter: options3.filter ?? (() => succeed9(true))
77888
77888
  };
77889
77889
  const initialState3 = gen3(function* () {
77890
- const path14 = none2();
77891
- const currentPath = yield* resolveCurrentPath(path14, opts);
77890
+ const path15 = none2();
77891
+ const currentPath = yield* resolveCurrentPath(path15, opts);
77892
77892
  const files = yield* getFileList(currentPath, opts);
77893
77893
  const confirm = Confirm.Hide();
77894
77894
  return {
77895
77895
  cursor: 0,
77896
77896
  files,
77897
- path: path14,
77897
+ path: path15,
77898
77898
  confirm
77899
77899
  };
77900
77900
  });
@@ -79039,7 +79039,7 @@ var validateInternal = (self2, value5, config3) => {
79039
79039
  case "Path": {
79040
79040
  return flatMap10(FileSystem, (fileSystem) => {
79041
79041
  const errorMsg = "Path options do not have a default value";
79042
- return orElseFail2(value5, () => errorMsg).pipe(tap4((path14) => orDie3(fileSystem.exists(path14)).pipe(tap4((pathExists) => validatePathExistence(path14, self2.pathExists, pathExists).pipe(zipRight5(validatePathType(path14, self2.pathType, fileSystem).pipe(when2(() => self2.pathExists !== "no" && pathExists))))))));
79042
+ return orElseFail2(value5, () => errorMsg).pipe(tap4((path15) => orDie3(fileSystem.exists(path15)).pipe(tap4((pathExists) => validatePathExistence(path15, self2.pathExists, pathExists).pipe(zipRight5(validatePathType(path15, self2.pathType, fileSystem).pipe(when2(() => self2.pathExists !== "no" && pathExists))))))));
79043
79043
  });
79044
79044
  }
79045
79045
  case "Redacted": {
@@ -79054,24 +79054,24 @@ var validateInternal = (self2, value5, config3) => {
79054
79054
  }
79055
79055
  };
79056
79056
  var attempt = (option6, typeName, parse9) => orElseFail2(option6, () => `${typeName} options do not have a default value`).pipe(flatMap10((value5) => orElseFail2(parse9(value5), () => `'${value5}' is not a ${typeName}`)));
79057
- var validatePathExistence = (path14, shouldPathExist, pathExists) => {
79057
+ var validatePathExistence = (path15, shouldPathExist, pathExists) => {
79058
79058
  if (shouldPathExist === "no" && pathExists) {
79059
- return fail9(`Path '${path14}' must not exist`);
79059
+ return fail9(`Path '${path15}' must not exist`);
79060
79060
  }
79061
79061
  if (shouldPathExist === "yes" && !pathExists) {
79062
- return fail9(`Path '${path14}' must exist`);
79062
+ return fail9(`Path '${path15}' must exist`);
79063
79063
  }
79064
79064
  return _void;
79065
79065
  };
79066
- var validatePathType = (path14, pathType, fileSystem) => {
79066
+ var validatePathType = (path15, pathType, fileSystem) => {
79067
79067
  switch (pathType) {
79068
79068
  case "file": {
79069
- const checkIsFile = fileSystem.stat(path14).pipe(map18((info3) => info3.type === "File"), orDie3);
79070
- return fail9(`Expected path '${path14}' to be a regular file`).pipe(unlessEffect2(checkIsFile), asVoid4);
79069
+ const checkIsFile = fileSystem.stat(path15).pipe(map18((info3) => info3.type === "File"), orDie3);
79070
+ return fail9(`Expected path '${path15}' to be a regular file`).pipe(unlessEffect2(checkIsFile), asVoid4);
79071
79071
  }
79072
79072
  case "directory": {
79073
- const checkIsDirectory = fileSystem.stat(path14).pipe(map18((info3) => info3.type === "Directory"), orDie3);
79074
- return fail9(`Expected path '${path14}' to be a directory`).pipe(unlessEffect2(checkIsDirectory), asVoid4);
79073
+ const checkIsDirectory = fileSystem.stat(path15).pipe(map18((info3) => info3.type === "Directory"), orDie3);
79074
+ return fail9(`Expected path '${path15}' to be a directory`).pipe(unlessEffect2(checkIsDirectory), asVoid4);
79075
79075
  }
79076
79076
  case "either": {
79077
79077
  return _void;
@@ -79493,13 +79493,13 @@ var file2 = (config3) => makeSingle(fromNullable(config3?.name), path("file", co
79493
79493
  var fileContent = (config3) => mapEffect5(file2({
79494
79494
  ...config3,
79495
79495
  exists: "yes"
79496
- }), (path14) => mapError3(read2(path14), (e) => p(e)));
79497
- var fileParse = (config3) => mapEffect5(fileText(config3), ([path14, content]) => mapError3(parse5(path14, content, config3?.format), (e) => p(e)));
79496
+ }), (path15) => mapError3(read2(path15), (e) => p(e)));
79497
+ var fileParse = (config3) => mapEffect5(fileText(config3), ([path15, content]) => mapError3(parse5(path15, content, config3?.format), (e) => p(e)));
79498
79498
  var fileSchema = (schema, config3) => withSchema(fileParse(config3), schema);
79499
79499
  var fileText = (config3) => mapEffect5(file2({
79500
79500
  ...config3,
79501
79501
  exists: "yes"
79502
- }), (path14) => mapError3(readString(path14), (e) => p(e)));
79502
+ }), (path15) => mapError3(readString(path15), (e) => p(e)));
79503
79503
  var float3 = (config3) => makeSingle(fromNullable(config3?.name), float2);
79504
79504
  var integer5 = (config3) => makeSingle(fromNullable(config3?.name), integer4);
79505
79505
  var none12 = /* @__PURE__ */ (() => {
@@ -80115,12 +80115,12 @@ var directory3 = (name, config3) => makeSingle2(name, empty3(), path("directory"
80115
80115
  var file4 = (name, config3) => makeSingle2(name, empty3(), path("file", config3?.exists ?? "either"));
80116
80116
  var fileContent3 = (name) => mapEffect7(file4(name, {
80117
80117
  exists: "yes"
80118
- }), (path14) => mapError3(read2(path14), (msg) => invalidValue(p(msg))));
80119
- var fileParse3 = (name, format6) => mapEffect7(fileText3(name), ([path14, content]) => mapError3(parse5(path14, content, format6), (error4) => invalidValue(p(error4))));
80118
+ }), (path15) => mapError3(read2(path15), (msg) => invalidValue(p(msg))));
80119
+ var fileParse3 = (name, format6) => mapEffect7(fileText3(name), ([path15, content]) => mapError3(parse5(path15, content, format6), (error4) => invalidValue(p(error4))));
80120
80120
  var fileSchema3 = (name, schema, format6) => withSchema3(fileParse3(name, format6), schema);
80121
80121
  var fileText3 = (name) => mapEffect7(file4(name, {
80122
80122
  exists: "yes"
80123
- }), (path14) => mapError3(readString(path14), (error4) => invalidValue(p(error4))));
80123
+ }), (path15) => mapError3(readString(path15), (error4) => invalidValue(p(error4))));
80124
80124
  var filterMap8 = /* @__PURE__ */ dual(3, (self2, f, message) => mapEffect7(self2, (a) => match2(f(a), {
80125
80125
  onNone: () => left2(invalidValue(p(message))),
80126
80126
  onSome: right2
@@ -80182,11 +80182,11 @@ var withFallbackConfig3 = /* @__PURE__ */ dual(2, (self2, config3) => {
80182
80182
  }
80183
80183
  return makeWithFallback(self2, config3);
80184
80184
  });
80185
- var withFallbackPrompt = /* @__PURE__ */ dual(2, (self2, prompt9) => {
80185
+ var withFallbackPrompt = /* @__PURE__ */ dual(2, (self2, prompt10) => {
80186
80186
  if (isInstruction2(self2) && isWithDefault2(self2)) {
80187
- return makeWithDefault2(withFallbackPrompt(self2.options, prompt9), self2.fallback);
80187
+ return makeWithDefault2(withFallbackPrompt(self2.options, prompt10), self2.fallback);
80188
80188
  }
80189
- return makeWithFallback(self2, prompt9);
80189
+ return makeWithFallback(self2, prompt10);
80190
80190
  });
80191
80191
  var withDescription5 = /* @__PURE__ */ dual(2, (self2, desc) => modifySingle(self2, (single2) => {
80192
80192
  const description = sequence(single2.description, p(desc));
@@ -81329,12 +81329,12 @@ var make59 = (name, options3 = none14, args2 = none12) => {
81329
81329
  op.args = args2;
81330
81330
  return op;
81331
81331
  };
81332
- var prompt = (name, prompt9) => {
81332
+ var prompt = (name, prompt10) => {
81333
81333
  const op = Object.create(proto23);
81334
81334
  op._tag = "GetUserInput";
81335
81335
  op.name = name;
81336
81336
  op.description = empty39;
81337
- op.prompt = prompt9;
81337
+ op.prompt = prompt10;
81338
81338
  return op;
81339
81339
  };
81340
81340
  var getHelp7 = (self2, config3) => getHelpInternal4(self2, config3);
@@ -82175,7 +82175,7 @@ var getUsage6 = (self2) => getUsage5(self2.descriptor);
82175
82175
  var mapDescriptor = /* @__PURE__ */ dual(2, (self2, f) => makeDerive(self2, {
82176
82176
  descriptor: f(self2.descriptor)
82177
82177
  }));
82178
- var prompt2 = (name, prompt9, handler) => makeProto(map37(prompt(name, prompt9), (_) => _.value), handler, GenericTag(`@effect/cli/Prompt/${name}`));
82178
+ var prompt2 = (name, prompt10, handler) => makeProto(map37(prompt(name, prompt10), (_) => _.value), handler, GenericTag(`@effect/cli/Prompt/${name}`));
82179
82179
  var withHandler = /* @__PURE__ */ dual(2, (self2, handler) => makeDerive(self2, {
82180
82180
  handler,
82181
82181
  transform: identity
@@ -83626,7 +83626,7 @@ __export(NodeContext_exports, {
83626
83626
  });
83627
83627
 
83628
83628
  // node_modules/.pnpm/@effect+platform-node-shared@0.48.0_@effect+cluster@0.47.0_@effect+platform@0.90.2_effe_c51441e982837e38e66e4ef8533c2d61/node_modules/@effect/platform-node-shared/dist/esm/internal/error.js
83629
- var handleErrnoException = (module, method) => (err, [path14]) => {
83629
+ var handleErrnoException = (module, method) => (err, [path15]) => {
83630
83630
  let reason = "Unknown";
83631
83631
  switch (err.code) {
83632
83632
  case "ENOENT":
@@ -83655,7 +83655,7 @@ var handleErrnoException = (module, method) => (err, [path14]) => {
83655
83655
  reason,
83656
83656
  module,
83657
83657
  method,
83658
- pathOrDescriptor: path14,
83658
+ pathOrDescriptor: path15,
83659
83659
  syscall: err.syscall,
83660
83660
  description: err.message,
83661
83661
  cause: err
@@ -83797,7 +83797,7 @@ var handleBadArgument = (method) => (cause3) => new BadArgument({
83797
83797
  });
83798
83798
  var access2 = /* @__PURE__ */ (() => {
83799
83799
  const nodeAccess = /* @__PURE__ */ effectify2(NFS__namespace.access, /* @__PURE__ */ handleErrnoException("FileSystem", "access"), /* @__PURE__ */ handleBadArgument("access"));
83800
- return (path14, options3) => {
83800
+ return (path15, options3) => {
83801
83801
  let mode = NFS__namespace.constants.F_OK;
83802
83802
  if (options3?.readable) {
83803
83803
  mode |= NFS__namespace.constants.R_OK;
@@ -83805,7 +83805,7 @@ var access2 = /* @__PURE__ */ (() => {
83805
83805
  if (options3?.writable) {
83806
83806
  mode |= NFS__namespace.constants.W_OK;
83807
83807
  }
83808
- return nodeAccess(path14, mode);
83808
+ return nodeAccess(path15, mode);
83809
83809
  };
83810
83810
  })();
83811
83811
  var copy3 = /* @__PURE__ */ (() => {
@@ -83822,11 +83822,11 @@ var copyFile2 = /* @__PURE__ */ (() => {
83822
83822
  })();
83823
83823
  var chmod2 = /* @__PURE__ */ (() => {
83824
83824
  const nodeChmod = /* @__PURE__ */ effectify2(NFS__namespace.chmod, /* @__PURE__ */ handleErrnoException("FileSystem", "chmod"), /* @__PURE__ */ handleBadArgument("chmod"));
83825
- return (path14, mode) => nodeChmod(path14, mode);
83825
+ return (path15, mode) => nodeChmod(path15, mode);
83826
83826
  })();
83827
83827
  var chown2 = /* @__PURE__ */ (() => {
83828
83828
  const nodeChown = /* @__PURE__ */ effectify2(NFS__namespace.chown, /* @__PURE__ */ handleErrnoException("FileSystem", "chown"), /* @__PURE__ */ handleBadArgument("chown"));
83829
- return (path14, uid, gid) => nodeChown(path14, uid, gid);
83829
+ return (path15, uid, gid) => nodeChown(path15, uid, gid);
83830
83830
  })();
83831
83831
  var link2 = /* @__PURE__ */ (() => {
83832
83832
  const nodeLink = /* @__PURE__ */ effectify2(NFS__namespace.link, /* @__PURE__ */ handleErrnoException("FileSystem", "link"), /* @__PURE__ */ handleBadArgument("link"));
@@ -83834,7 +83834,7 @@ var link2 = /* @__PURE__ */ (() => {
83834
83834
  })();
83835
83835
  var makeDirectory = /* @__PURE__ */ (() => {
83836
83836
  const nodeMkdir = /* @__PURE__ */ effectify2(NFS__namespace.mkdir, /* @__PURE__ */ handleErrnoException("FileSystem", "makeDirectory"), /* @__PURE__ */ handleBadArgument("makeDirectory"));
83837
- return (path14, options3) => nodeMkdir(path14, {
83837
+ return (path15, options3) => nodeMkdir(path15, {
83838
83838
  recursive: options3?.recursive ?? false,
83839
83839
  mode: options3?.mode
83840
83840
  });
@@ -83850,7 +83850,7 @@ var makeTempDirectoryFactory = (method) => {
83850
83850
  var makeTempDirectory = /* @__PURE__ */ makeTempDirectoryFactory("makeTempDirectory");
83851
83851
  var removeFactory = (method) => {
83852
83852
  const nodeRm = effectify2(NFS__namespace.rm, handleErrnoException("FileSystem", method), handleBadArgument(method));
83853
- return (path14, options3) => nodeRm(path14, {
83853
+ return (path15, options3) => nodeRm(path15, {
83854
83854
  recursive: options3?.recursive ?? false,
83855
83855
  force: options3?.force ?? false
83856
83856
  });
@@ -83866,7 +83866,7 @@ var makeTempDirectoryScoped = /* @__PURE__ */ (() => {
83866
83866
  var openFactory = (method) => {
83867
83867
  const nodeOpen = effectify2(NFS__namespace.open, handleErrnoException("FileSystem", method), handleBadArgument(method));
83868
83868
  const nodeClose = effectify2(NFS__namespace.close, handleErrnoException("FileSystem", method), handleBadArgument(method));
83869
- return (path14, options3) => pipe(acquireRelease2(nodeOpen(path14, options3?.flag ?? "r", options3?.mode), (fd) => orDie3(nodeClose(fd))), map18((fd) => makeFile(FileDescriptor(fd), options3?.flag?.startsWith("a") ?? false)));
83869
+ return (path15, options3) => pipe(acquireRelease2(nodeOpen(path15, options3?.flag ?? "r", options3?.mode), (fd) => orDie3(nodeClose(fd))), map18((fd) => makeFile(FileDescriptor(fd), options3?.flag?.startsWith("a") ?? false)));
83870
83870
  };
83871
83871
  var open2 = /* @__PURE__ */ openFactory("open");
83872
83872
  var makeFile = /* @__PURE__ */ (() => {
@@ -83981,7 +83981,7 @@ var makeTempFileFactory = (method) => {
83981
83981
  const makeDirectory2 = makeTempDirectoryFactory(method);
83982
83982
  const open3 = openFactory(method);
83983
83983
  const randomHexString2 = (bytes) => sync5(() => Crypto__namespace.randomBytes(bytes).toString("hex"));
83984
- return (options3) => pipe(zip6(makeDirectory2(options3), randomHexString2(6)), map18(([directory5, random4]) => path5__namespace.join(directory5, random4)), tap4((path14) => scoped2(open3(path14, {
83984
+ return (options3) => pipe(zip6(makeDirectory2(options3), randomHexString2(6)), map18(([directory5, random4]) => path5__namespace.join(directory5, random4)), tap4((path15) => scoped2(open3(path15, {
83985
83985
  flag: "w+"
83986
83986
  }))));
83987
83987
  };
@@ -83993,17 +83993,17 @@ var makeTempFileScoped = /* @__PURE__ */ (() => {
83993
83993
  recursive: true
83994
83994
  })));
83995
83995
  })();
83996
- var readDirectory = (path14, options3) => tryPromise2({
83997
- try: () => NFS__namespace.promises.readdir(path14, options3),
83998
- catch: (err) => handleErrnoException("FileSystem", "readDirectory")(err, [path14])
83996
+ var readDirectory = (path15, options3) => tryPromise2({
83997
+ try: () => NFS__namespace.promises.readdir(path15, options3),
83998
+ catch: (err) => handleErrnoException("FileSystem", "readDirectory")(err, [path15])
83999
83999
  });
84000
- var readFile2 = (path14) => async2((resume2, signal) => {
84000
+ var readFile2 = (path15) => async2((resume2, signal) => {
84001
84001
  try {
84002
- NFS__namespace.readFile(path14, {
84002
+ NFS__namespace.readFile(path15, {
84003
84003
  signal
84004
84004
  }, (err, data) => {
84005
84005
  if (err) {
84006
- resume2(fail9(handleErrnoException("FileSystem", "readFile")(err, [path14])));
84006
+ resume2(fail9(handleErrnoException("FileSystem", "readFile")(err, [path15])));
84007
84007
  } else {
84008
84008
  resume2(succeed9(data));
84009
84009
  }
@@ -84014,11 +84014,11 @@ var readFile2 = (path14) => async2((resume2, signal) => {
84014
84014
  });
84015
84015
  var readLink = /* @__PURE__ */ (() => {
84016
84016
  const nodeReadLink = /* @__PURE__ */ effectify2(NFS__namespace.readlink, /* @__PURE__ */ handleErrnoException("FileSystem", "readLink"), /* @__PURE__ */ handleBadArgument("readLink"));
84017
- return (path14) => nodeReadLink(path14);
84017
+ return (path15) => nodeReadLink(path15);
84018
84018
  })();
84019
84019
  var realPath = /* @__PURE__ */ (() => {
84020
84020
  const nodeRealPath = /* @__PURE__ */ effectify2(NFS__namespace.realpath, /* @__PURE__ */ handleErrnoException("FileSystem", "realPath"), /* @__PURE__ */ handleBadArgument("realPath"));
84021
- return (path14) => nodeRealPath(path14);
84021
+ return (path15) => nodeRealPath(path15);
84022
84022
  })();
84023
84023
  var rename3 = /* @__PURE__ */ (() => {
84024
84024
  const nodeRename = /* @__PURE__ */ effectify2(NFS__namespace.rename, /* @__PURE__ */ handleErrnoException("FileSystem", "rename"), /* @__PURE__ */ handleBadArgument("rename"));
@@ -84042,40 +84042,40 @@ var makeFileInfo = (stat3) => ({
84042
84042
  });
84043
84043
  var stat2 = /* @__PURE__ */ (() => {
84044
84044
  const nodeStat = /* @__PURE__ */ effectify2(NFS__namespace.stat, /* @__PURE__ */ handleErrnoException("FileSystem", "stat"), /* @__PURE__ */ handleBadArgument("stat"));
84045
- return (path14) => map18(nodeStat(path14), makeFileInfo);
84045
+ return (path15) => map18(nodeStat(path15), makeFileInfo);
84046
84046
  })();
84047
84047
  var symlink2 = /* @__PURE__ */ (() => {
84048
84048
  const nodeSymlink = /* @__PURE__ */ effectify2(NFS__namespace.symlink, /* @__PURE__ */ handleErrnoException("FileSystem", "symlink"), /* @__PURE__ */ handleBadArgument("symlink"));
84049
- return (target, path14) => nodeSymlink(target, path14);
84049
+ return (target, path15) => nodeSymlink(target, path15);
84050
84050
  })();
84051
84051
  var truncate2 = /* @__PURE__ */ (() => {
84052
84052
  const nodeTruncate = /* @__PURE__ */ effectify2(NFS__namespace.truncate, /* @__PURE__ */ handleErrnoException("FileSystem", "truncate"), /* @__PURE__ */ handleBadArgument("truncate"));
84053
- return (path14, length4) => nodeTruncate(path14, length4 !== void 0 ? Number(length4) : void 0);
84053
+ return (path15, length4) => nodeTruncate(path15, length4 !== void 0 ? Number(length4) : void 0);
84054
84054
  })();
84055
84055
  var utimes2 = /* @__PURE__ */ (() => {
84056
84056
  const nodeUtimes = /* @__PURE__ */ effectify2(NFS__namespace.utimes, /* @__PURE__ */ handleErrnoException("FileSystem", "utime"), /* @__PURE__ */ handleBadArgument("utime"));
84057
- return (path14, atime, mtime) => nodeUtimes(path14, atime, mtime);
84057
+ return (path15, atime, mtime) => nodeUtimes(path15, atime, mtime);
84058
84058
  })();
84059
- var watchNode = (path14, options3) => asyncScoped2((emit) => acquireRelease2(sync5(() => {
84060
- const watcher = NFS__namespace.watch(path14, {
84059
+ var watchNode = (path15, options3) => asyncScoped2((emit) => acquireRelease2(sync5(() => {
84060
+ const watcher = NFS__namespace.watch(path15, {
84061
84061
  recursive: options3?.recursive
84062
- }, (event, path15) => {
84063
- if (!path15) return;
84062
+ }, (event, path16) => {
84063
+ if (!path16) return;
84064
84064
  switch (event) {
84065
84065
  case "rename": {
84066
- emit.fromEffect(matchEffect2(stat2(path15), {
84066
+ emit.fromEffect(matchEffect2(stat2(path16), {
84067
84067
  onSuccess: (_) => succeed9(WatchEventCreate({
84068
- path: path15
84068
+ path: path16
84069
84069
  })),
84070
84070
  onFailure: (err) => err._tag === "SystemError" && err.reason === "NotFound" ? succeed9(WatchEventRemove({
84071
- path: path15
84071
+ path: path16
84072
84072
  })) : fail9(err)
84073
84073
  }));
84074
84074
  return;
84075
84075
  }
84076
84076
  case "change": {
84077
84077
  emit.single(WatchEventUpdate({
84078
- path: path15
84078
+ path: path16
84079
84079
  }));
84080
84080
  return;
84081
84081
  }
@@ -84086,7 +84086,7 @@ var watchNode = (path14, options3) => asyncScoped2((emit) => acquireRelease2(syn
84086
84086
  module: "FileSystem",
84087
84087
  reason: "Unknown",
84088
84088
  method: "watch",
84089
- pathOrDescriptor: path14,
84089
+ pathOrDescriptor: path15,
84090
84090
  cause: error4
84091
84091
  }));
84092
84092
  });
@@ -84095,16 +84095,16 @@ var watchNode = (path14, options3) => asyncScoped2((emit) => acquireRelease2(syn
84095
84095
  });
84096
84096
  return watcher;
84097
84097
  }), (watcher) => sync5(() => watcher.close())));
84098
- var watch2 = (backend, path14, options3) => stat2(path14).pipe(map18((stat3) => backend.pipe(flatMap((_) => _.register(path14, stat3, options3)), getOrElse(() => watchNode(path14, options3)))), unwrap4);
84099
- var writeFile2 = (path14, data, options3) => async2((resume2, signal) => {
84098
+ var watch2 = (backend, path15, options3) => stat2(path15).pipe(map18((stat3) => backend.pipe(flatMap((_) => _.register(path15, stat3, options3)), getOrElse(() => watchNode(path15, options3)))), unwrap4);
84099
+ var writeFile2 = (path15, data, options3) => async2((resume2, signal) => {
84100
84100
  try {
84101
- NFS__namespace.writeFile(path14, data, {
84101
+ NFS__namespace.writeFile(path15, data, {
84102
84102
  signal,
84103
84103
  flag: options3?.flag,
84104
84104
  mode: options3?.mode
84105
84105
  }, (err) => {
84106
84106
  if (err) {
84107
- resume2(fail9(handleErrnoException("FileSystem", "writeFile")(err, [path14])));
84107
+ resume2(fail9(handleErrnoException("FileSystem", "writeFile")(err, [path15])));
84108
84108
  } else {
84109
84109
  resume2(_void);
84110
84110
  }
@@ -84136,8 +84136,8 @@ var makeFileSystem = /* @__PURE__ */ map18(/* @__PURE__ */ serviceOption2(WatchB
84136
84136
  symlink: symlink2,
84137
84137
  truncate: truncate2,
84138
84138
  utimes: utimes2,
84139
- watch(path14, options3) {
84140
- return watch2(backend, path14, options3);
84139
+ watch(path15, options3) {
84140
+ return watch2(backend, path15, options3);
84141
84141
  },
84142
84142
  writeFile: writeFile2
84143
84143
  }));
@@ -84154,12 +84154,12 @@ var fromFileUrl2 = (url3) => try_3({
84154
84154
  cause: error4
84155
84155
  })
84156
84156
  });
84157
- var toFileUrl2 = (path14) => try_3({
84158
- try: () => NodeUrl__namespace.pathToFileURL(path14),
84157
+ var toFileUrl2 = (path15) => try_3({
84158
+ try: () => NodeUrl__namespace.pathToFileURL(path15),
84159
84159
  catch: (error4) => new BadArgument({
84160
84160
  module: "Path",
84161
84161
  method: "toFileUrl",
84162
- description: `Invalid path: ${path14}`,
84162
+ description: `Invalid path: ${path15}`,
84163
84163
  cause: error4
84164
84164
  })
84165
84165
  });
@@ -84223,8 +84223,8 @@ var make70 = /* @__PURE__ */ fnUntraced2(function* (shouldQuit = defaultShouldQu
84223
84223
  readlineInterface.once("line", onLine);
84224
84224
  return sync5(() => readlineInterface.off("line", onLine));
84225
84225
  })), scoped2);
84226
- const display = (prompt9) => uninterruptible2(async2((resume2) => {
84227
- stdout3.write(prompt9, (err) => err ? resume2(fail9(new BadArgument({
84226
+ const display = (prompt10) => uninterruptible2(async2((resume2) => {
84227
+ stdout3.write(prompt10, (err) => err ? resume2(fail9(new BadArgument({
84228
84228
  module: "Terminal",
84229
84229
  method: "display",
84230
84230
  description: "Failed to write prompt to stdout",
@@ -84342,6 +84342,15 @@ var GitService = class extends Effect_exports.Service()(
84342
84342
  );
84343
84343
  return (yield* Command_exports2.string(command2)).trim();
84344
84344
  });
84345
+ const runCommandWithExitCode = Effect_exports.fn(
84346
+ "runCommandWithExitCode"
84347
+ )(function* (...commandArgs) {
84348
+ const cwd = yield* Config_exports.string("cwd");
84349
+ const command2 = Command_exports2.make(...commandArgs).pipe(
84350
+ Command_exports2.workingDirectory(cwd)
84351
+ );
84352
+ return yield* Command_exports2.exitCode(command2);
84353
+ });
84345
84354
  return {
84346
84355
  ensureIsGitRepo: Effect_exports.fn("ensureIsGitRepo")(
84347
84356
  function* () {
@@ -84402,6 +84411,19 @@ var GitService = class extends Effect_exports.Service()(
84402
84411
  })
84403
84412
  );
84404
84413
  }
84414
+ yield* runCommandWithExitCode(
84415
+ "git",
84416
+ "branch",
84417
+ "-D",
84418
+ targetBranch
84419
+ );
84420
+ yield* runCommandWithExitCode(
84421
+ "git",
84422
+ "branch",
84423
+ "--track",
84424
+ targetBranch,
84425
+ `upstream/${targetBranch}`
84426
+ );
84405
84427
  }),
84406
84428
  getCurrentBranch: Effect_exports.fn("getCurrentBranch")(
84407
84429
  function* () {
@@ -84416,17 +84438,7 @@ var GitService = class extends Effect_exports.Service()(
84416
84438
  )).trim();
84417
84439
  }
84418
84440
  ),
84419
- runCommandWithExitCode: Effect_exports.fn(
84420
- "runCommandWithExitCode"
84421
- )(function* (...commandArgs) {
84422
- const cwd = yield* Config_exports.string("cwd");
84423
- const command2 = Command_exports2.make(...commandArgs).pipe(
84424
- Command_exports2.workingDirectory(cwd),
84425
- Command_exports2.stdout("inherit"),
84426
- Command_exports2.stderr("inherit")
84427
- );
84428
- return yield* Command_exports2.exitCode(command2);
84429
- }),
84441
+ runCommandWithExitCode,
84430
84442
  runCommandWithString
84431
84443
  };
84432
84444
  }),
@@ -84642,13 +84654,13 @@ var Lesson = class {
84642
84654
  });
84643
84655
  }
84644
84656
  };
84645
- var getNameAndNumberFromPath = (path14) => {
84646
- const numSection = path14.split("-")[0];
84657
+ var getNameAndNumberFromPath = (path15) => {
84658
+ const numSection = path15.split("-")[0];
84647
84659
  if (typeof numSection === "undefined") {
84648
84660
  return Effect_exports.fail(
84649
84661
  new InvalidPathError({
84650
- path: path14,
84651
- message: `Could not retrieve number from path: ${path14}`
84662
+ path: path15,
84663
+ message: `Could not retrieve number from path: ${path15}`
84652
84664
  })
84653
84665
  );
84654
84666
  }
@@ -84656,18 +84668,18 @@ var getNameAndNumberFromPath = (path14) => {
84656
84668
  if (Number.isNaN(num)) {
84657
84669
  return Effect_exports.fail(
84658
84670
  new PathNumberIsNaNError({
84659
- path: path14,
84671
+ path: path15,
84660
84672
  numSection,
84661
- message: `Could not retrieve number from path: ${path14}`
84673
+ message: `Could not retrieve number from path: ${path15}`
84662
84674
  })
84663
84675
  );
84664
84676
  }
84665
- const name = path14.split("-").slice(1).join("-");
84677
+ const name = path15.split("-").slice(1).join("-");
84666
84678
  if (!name) {
84667
84679
  return Effect_exports.fail(
84668
84680
  new InvalidPathError({
84669
- path: path14,
84670
- message: `Could not retrieve name from path: ${path14}`
84681
+ path: path15,
84682
+ message: `Could not retrieve name from path: ${path15}`
84671
84683
  })
84672
84684
  );
84673
84685
  }
@@ -84676,12 +84688,12 @@ var getNameAndNumberFromPath = (path14) => {
84676
84688
  num
84677
84689
  });
84678
84690
  };
84679
- var parseSection = Effect_exports.fn("parseSection")(function* (path14) {
84680
- const { name, num } = yield* getNameAndNumberFromPath(path14);
84691
+ var parseSection = Effect_exports.fn("parseSection")(function* (path15) {
84692
+ const { name, num } = yield* getNameAndNumberFromPath(path15);
84681
84693
  return {
84682
84694
  name,
84683
84695
  num,
84684
- path: path14
84696
+ path: path15
84685
84697
  };
84686
84698
  });
84687
84699
  var filterMeOut = Symbol("filterMeOut");
@@ -85169,8 +85181,8 @@ var RunLessonSimpleError = class extends Data_exports.TaggedError(
85169
85181
  ) {
85170
85182
  };
85171
85183
  var notFound2 = Symbol("notFound");
85172
- var getNumberFromPathSegment = (path14) => {
85173
- const numberSegment = path14.split("-")[0];
85184
+ var getNumberFromPathSegment = (path15) => {
85185
+ const numberSegment = path15.split("-")[0];
85174
85186
  return Number.isNaN(Number(numberSegment)) ? notFound2 : Number(numberSegment);
85175
85187
  };
85176
85188
  var startsWithNumber = (segment) => {
@@ -85310,6 +85322,7 @@ var updateCVM = Command_exports.make(
85310
85322
  yield* Effect_exports.logError(
85311
85323
  "[update-cvm] Failed to update the CVM: " + output
85312
85324
  );
85325
+ process.exitCode = 1;
85313
85326
  return;
85314
85327
  }
85315
85328
  yield* Effect_exports.log(
@@ -85824,6 +85837,8 @@ var getDiffs = Command_exports.make(
85824
85837
  )
85825
85838
  },
85826
85839
  ({ branch, projectRepo, root }) => Effect_exports.gen(function* () {
85840
+ const git = yield* GitService;
85841
+ yield* git.ensureIsGitRepo();
85827
85842
  yield* Console_exports.log("Starting get-diffs command...");
85828
85843
  if (!NFS.existsSync(projectRepo)) {
85829
85844
  return yield* Effect_exports.fail(
@@ -86064,6 +86079,11 @@ var getDiffs = Command_exports.make(
86064
86079
  }
86065
86080
  yield* Console_exports.log("=".repeat(50));
86066
86081
  }).pipe(
86082
+ Effect_exports.withConfigProvider(
86083
+ ConfigProvider_exports.fromJson({
86084
+ cwd: projectRepo
86085
+ })
86086
+ ),
86067
86087
  Effect_exports.catchTags({
86068
86088
  InvalidProjectRepoError: (error4) => {
86069
86089
  return Effect_exports.gen(function* () {
@@ -86092,6 +86112,217 @@ var getDiffs = Command_exports.make(
86092
86112
  "Get commit diffs from a project repo and save to exercise folders"
86093
86113
  )
86094
86114
  );
86115
+ var InvalidProjectRepoError2 = class extends Data_exports.TaggedError(
86116
+ "InvalidProjectRepoError"
86117
+ ) {
86118
+ };
86119
+ (class extends Data_exports.TaggedError(
86120
+ "DiffGenerationError"
86121
+ ) {
86122
+ });
86123
+ (class extends Data_exports.TaggedError(
86124
+ "DirtyWorkingTreeError"
86125
+ ) {
86126
+ });
86127
+ var NoCommitsFoundError = class extends Data_exports.TaggedError(
86128
+ "NoCommitsFoundError"
86129
+ ) {
86130
+ };
86131
+ var diffsToRepo = Command_exports.make(
86132
+ "diffs-to-repo",
86133
+ {
86134
+ projectRepo: Options_exports.text("project-repo").pipe(
86135
+ Options_exports.withDescription(
86136
+ "The path to the project repository"
86137
+ )
86138
+ ),
86139
+ liveBranch: Options_exports.text("live-branch").pipe(
86140
+ Options_exports.withDescription("Branch to get diffs from"),
86141
+ Options_exports.withDefault(DEFAULT_PROJECT_TARGET_BRANCH)
86142
+ ),
86143
+ mainBranch: Options_exports.text("main-branch").pipe(
86144
+ Options_exports.withDescription("The main branch of the project"),
86145
+ Options_exports.withDefault("main")
86146
+ ),
86147
+ targetDir: Options_exports.text("target-dir").pipe(
86148
+ Options_exports.withDescription(
86149
+ "Directory where lesson folders will be created"
86150
+ ),
86151
+ Options_exports.withDefault(path5__namespace.join(process.cwd(), "lessons"))
86152
+ )
86153
+ },
86154
+ ({ liveBranch, mainBranch, projectRepo, targetDir }) => Effect_exports.gen(function* () {
86155
+ const git = yield* GitService;
86156
+ yield* git.ensureIsGitRepo();
86157
+ yield* Console_exports.log("Starting get-diffs command...");
86158
+ if (!NFS.existsSync(projectRepo)) {
86159
+ return yield* Effect_exports.fail(
86160
+ new InvalidProjectRepoError2({
86161
+ path: projectRepo,
86162
+ message: `Project repo does not exist at path: ${projectRepo}`
86163
+ })
86164
+ );
86165
+ }
86166
+ const gitDirPath = path5__namespace.join(projectRepo, ".git");
86167
+ if (!NFS.existsSync(gitDirPath)) {
86168
+ return yield* Effect_exports.fail(
86169
+ new InvalidProjectRepoError2({
86170
+ path: projectRepo,
86171
+ message: `Project repo is not a git repository: ${projectRepo}`
86172
+ })
86173
+ );
86174
+ }
86175
+ yield* Console_exports.log("Fetching latest from origin...");
86176
+ const gitFetchCommand = Command_exports2.make(
86177
+ "git",
86178
+ "fetch",
86179
+ "origin"
86180
+ ).pipe(Command_exports2.workingDirectory(projectRepo));
86181
+ const fetchExitCode = yield* Command_exports2.exitCode(
86182
+ gitFetchCommand
86183
+ ).pipe(Effect_exports.catchAll(() => Effect_exports.succeed(1)));
86184
+ if (fetchExitCode !== 0) {
86185
+ return yield* Effect_exports.fail(
86186
+ new InvalidProjectRepoError2({
86187
+ path: projectRepo,
86188
+ message: `Failed to fetch from origin`
86189
+ })
86190
+ );
86191
+ }
86192
+ yield* Console_exports.log(`\u2713 Fetched latest from origin`);
86193
+ yield* Console_exports.log(
86194
+ `\u2713 Validated project repo: ${projectRepo}`
86195
+ );
86196
+ yield* Console_exports.log(`\u2713 Target directory: ${targetDir}`);
86197
+ yield* Console_exports.log("\nRetrieving commit history...");
86198
+ const gitLogCommand = Command_exports2.make(
86199
+ "git",
86200
+ "log",
86201
+ "--oneline",
86202
+ "--reverse",
86203
+ // Chronological order (oldest first)
86204
+ `${mainBranch}..${liveBranch}`
86205
+ // Only commits on liveBranch not in mainBranch
86206
+ ).pipe(Command_exports2.workingDirectory(projectRepo));
86207
+ const commitHistory = yield* Command_exports2.string(gitLogCommand);
86208
+ const commits = commitHistory.trim().split("\n").filter(Boolean).map((line4, index) => {
86209
+ const [sha, ...messageParts] = line4.split(" ");
86210
+ const message = messageParts.join(" ");
86211
+ return {
86212
+ sha,
86213
+ message,
86214
+ sequence: index + 1
86215
+ // 1-based sequence
86216
+ };
86217
+ });
86218
+ if (commits.length === 0) {
86219
+ return yield* Effect_exports.fail(
86220
+ new NoCommitsFoundError({ mainBranch, liveBranch })
86221
+ );
86222
+ }
86223
+ yield* Console_exports.dir(commits, { depth: Infinity });
86224
+ yield* Console_exports.log(
86225
+ `\u2713 Found ${commits.length} commits to process`
86226
+ );
86227
+ yield* Console_exports.log("\nGenerating and saving diffs...");
86228
+ const fs = yield* FileSystem_exports.FileSystem;
86229
+ let savedCount = 0;
86230
+ let errorCount = 0;
86231
+ const errors = [];
86232
+ const toDashCase = (str) => {
86233
+ return str.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
86234
+ };
86235
+ const sectionDir = path5__namespace.join(targetDir, "01-first-section");
86236
+ yield* fs.makeDirectory(sectionDir, { recursive: true });
86237
+ for (const commit of commits) {
86238
+ const result = yield* Effect_exports.gen(function* () {
86239
+ const gitShowCommand = Command_exports2.make(
86240
+ "git",
86241
+ "show",
86242
+ "-W",
86243
+ commit.sha,
86244
+ "--",
86245
+ ".",
86246
+ ":!pnpm-lock.yaml",
86247
+ ":!package-lock.json",
86248
+ ":!yarn.lock",
86249
+ ":!*.lock"
86250
+ ).pipe(Command_exports2.workingDirectory(projectRepo));
86251
+ const diff8 = yield* Command_exports2.string(gitShowCommand);
86252
+ const lessonNumber = `01.${commit.sequence.toString().padStart(2, "0")}`;
86253
+ const lessonName = toDashCase(commit.message);
86254
+ const lessonFolderName = `${lessonNumber}-${lessonName}`;
86255
+ const lessonPath = path5__namespace.join(sectionDir, lessonFolderName);
86256
+ const explainerPath = path5__namespace.join(lessonPath, "explainer");
86257
+ yield* fs.makeDirectory(explainerPath, { recursive: true });
86258
+ const diffPath = path5__namespace.join(explainerPath, "solution.diff");
86259
+ yield* fs.writeFileString(diffPath, diff8);
86260
+ yield* Console_exports.log(` \u2713 Created: 01-first-section/${lessonFolderName}/explainer/solution.diff`);
86261
+ return { status: "saved" };
86262
+ }).pipe(
86263
+ Effect_exports.catchAll(
86264
+ (error4) => Effect_exports.gen(function* () {
86265
+ yield* Console_exports.log(` \u2717 Error processing commit ${commit.sha}: ${error4}`);
86266
+ errors.push(`${commit.sha}: ${error4}`);
86267
+ return { status: "error" };
86268
+ })
86269
+ )
86270
+ );
86271
+ if (result.status === "saved") {
86272
+ savedCount++;
86273
+ } else if (result.status === "error") {
86274
+ errorCount++;
86275
+ }
86276
+ }
86277
+ yield* Console_exports.log("\n" + "=".repeat(50));
86278
+ yield* Console_exports.log("Summary:");
86279
+ yield* Console_exports.log(
86280
+ ` Total commits processed: ${commits.length}`
86281
+ );
86282
+ yield* Console_exports.log(` Lessons created: ${savedCount}`);
86283
+ yield* Console_exports.log(` Errors: ${errorCount}`);
86284
+ yield* Console_exports.log(` Target directory: ${targetDir}`);
86285
+ if (errors.length > 0) {
86286
+ yield* Console_exports.log("\nErrors encountered:");
86287
+ for (const error4 of errors) {
86288
+ yield* Console_exports.log(` - ${error4}`);
86289
+ }
86290
+ }
86291
+ yield* Console_exports.log("=".repeat(50));
86292
+ }).pipe(
86293
+ Effect_exports.withConfigProvider(
86294
+ ConfigProvider_exports.fromJson({
86295
+ cwd: projectRepo
86296
+ })
86297
+ ),
86298
+ Effect_exports.catchTags({
86299
+ InvalidProjectRepoError: (error4) => {
86300
+ return Effect_exports.gen(function* () {
86301
+ yield* Console_exports.error(`Error: ${error4.message}`);
86302
+ process.exitCode = 1;
86303
+ });
86304
+ },
86305
+ NoCommitsFoundError: (error4) => {
86306
+ return Effect_exports.gen(function* () {
86307
+ yield* Console_exports.error(
86308
+ `Error: No commits found on ${error4.liveBranch} beyond ${error4.mainBranch}`
86309
+ );
86310
+ process.exitCode = 1;
86311
+ });
86312
+ }
86313
+ }),
86314
+ Effect_exports.catchAll((error4) => {
86315
+ return Effect_exports.gen(function* () {
86316
+ yield* Console_exports.error(`Unexpected error: ${error4}`);
86317
+ process.exitCode = 1;
86318
+ });
86319
+ })
86320
+ )
86321
+ ).pipe(
86322
+ Command_exports.withDescription(
86323
+ "Generate sequential lesson folders from commits on live branch"
86324
+ )
86325
+ );
86095
86326
 
86096
86327
  // src/internal/edit-commit.ts
86097
86328
  var import_prompts4 = __toESM(require_prompts3());
@@ -86697,6 +86928,277 @@ var rebaseToMain = Command_exports.make(
86697
86928
  )
86698
86929
  );
86699
86930
 
86931
+ // src/internal/walk-through.ts
86932
+ var import_prompts5 = __toESM(require_prompts3());
86933
+ (class extends Data_exports.TaggedError(
86934
+ "NotAGitRepoError"
86935
+ ) {
86936
+ });
86937
+ var InvalidBranchError = class extends Data_exports.TaggedError(
86938
+ "InvalidBranchError"
86939
+ ) {
86940
+ };
86941
+ var NoCommitsFoundError2 = class extends Data_exports.TaggedError(
86942
+ "NoCommitsFoundError"
86943
+ ) {
86944
+ };
86945
+ var WalkThroughCancelledError = class extends Data_exports.TaggedError(
86946
+ "WalkThroughCancelledError"
86947
+ ) {
86948
+ };
86949
+ var HardResetFailedError = class extends Data_exports.TaggedError(
86950
+ "HardResetFailedError"
86951
+ ) {
86952
+ };
86953
+ var UndoCommitFailedError = class extends Data_exports.TaggedError(
86954
+ "UndoCommitFailedError"
86955
+ ) {
86956
+ };
86957
+ var UnstageFailedError = class extends Data_exports.TaggedError(
86958
+ "UnstageFailedError"
86959
+ ) {
86960
+ };
86961
+ var applyDemoReset = (commitSha) => Effect_exports.gen(function* () {
86962
+ const git = yield* GitService;
86963
+ yield* Console_exports.log(`
86964
+ Resetting to ${commitSha}...`);
86965
+ const hardResetExitCode = yield* git.runCommandWithExitCode(
86966
+ "git",
86967
+ "reset",
86968
+ "--hard",
86969
+ commitSha
86970
+ );
86971
+ if (hardResetExitCode !== 0) {
86972
+ yield* Console_exports.error("Failed to reset to commit");
86973
+ process.exitCode = 1;
86974
+ return yield* Effect_exports.fail(
86975
+ new HardResetFailedError({
86976
+ commitSha,
86977
+ message: "Hard reset failed"
86978
+ })
86979
+ );
86980
+ }
86981
+ yield* Console_exports.log("Undoing commit...");
86982
+ const undoExitCode = yield* git.runCommandWithExitCode(
86983
+ "git",
86984
+ "reset",
86985
+ "HEAD^"
86986
+ );
86987
+ if (undoExitCode !== 0) {
86988
+ yield* Console_exports.error("Failed to undo commit");
86989
+ process.exitCode = 1;
86990
+ return yield* Effect_exports.fail(
86991
+ new UndoCommitFailedError({
86992
+ message: "Undo commit failed"
86993
+ })
86994
+ );
86995
+ }
86996
+ yield* Console_exports.log("Unstaging changes...");
86997
+ const unstageExitCode = yield* git.runCommandWithExitCode(
86998
+ "git",
86999
+ "restore",
87000
+ "--staged",
87001
+ "."
87002
+ );
87003
+ if (unstageExitCode !== 0) {
87004
+ yield* Console_exports.error("Failed to unstage changes");
87005
+ process.exitCode = 1;
87006
+ return yield* Effect_exports.fail(
87007
+ new UnstageFailedError({
87008
+ message: "Unstage failed"
87009
+ })
87010
+ );
87011
+ }
87012
+ yield* Console_exports.log(
87013
+ "\u2713 Commit applied with unstaged changes\n"
87014
+ );
87015
+ });
87016
+ var walkThrough = Command_exports.make(
87017
+ "walk-through",
87018
+ {
87019
+ mainBranch: Options_exports.text("main-branch").pipe(
87020
+ Options_exports.withDescription("Base branch to start from"),
87021
+ Options_exports.withDefault("main")
87022
+ ),
87023
+ liveBranch: Options_exports.text("live-branch").pipe(
87024
+ Options_exports.withDescription(
87025
+ "Target branch with commits to walk through"
87026
+ ),
87027
+ Options_exports.withDefault(DEFAULT_PROJECT_TARGET_BRANCH)
87028
+ )
87029
+ },
87030
+ ({ liveBranch, mainBranch }) => Effect_exports.gen(function* () {
87031
+ const git = yield* GitService;
87032
+ const cwd = yield* Config_exports.string("cwd");
87033
+ yield* git.ensureIsGitRepo();
87034
+ yield* git.ensureBranchConnected(liveBranch);
87035
+ const currentBranch = yield* git.getCurrentBranch();
87036
+ if (currentBranch === mainBranch || currentBranch === liveBranch) {
87037
+ yield* Console_exports.log(
87038
+ `You are on ${currentBranch}. Walk-through requires a working branch.`
87039
+ );
87040
+ const { branchName } = yield* runPrompt(
87041
+ () => (0, import_prompts5.default)([
87042
+ {
87043
+ type: "text",
87044
+ name: "branchName",
87045
+ message: "Enter name for new working branch:"
87046
+ }
87047
+ ])
87048
+ );
87049
+ const createBranchExitCode = yield* git.runCommandWithExitCode(
87050
+ "git",
87051
+ "checkout",
87052
+ "-b",
87053
+ branchName
87054
+ );
87055
+ if (createBranchExitCode !== 0) {
87056
+ yield* Console_exports.error("Failed to create branch");
87057
+ process.exitCode = 1;
87058
+ return yield* Effect_exports.fail(
87059
+ new InvalidBranchError({
87060
+ branch: branchName,
87061
+ message: "Failed to create branch"
87062
+ })
87063
+ );
87064
+ }
87065
+ yield* Console_exports.log(
87066
+ `\u2713 Created and switched to ${branchName}`
87067
+ );
87068
+ } else {
87069
+ const { hasUncommittedChanges, statusOutput } = yield* git.getUncommittedChanges();
87070
+ if (hasUncommittedChanges) {
87071
+ yield* Console_exports.log(
87072
+ "\nWarning: You have uncommitted changes:"
87073
+ );
87074
+ yield* Console_exports.log(statusOutput);
87075
+ const { confirm } = yield* runPrompt(
87076
+ () => (0, import_prompts5.default)([
87077
+ {
87078
+ type: "confirm",
87079
+ name: "confirm",
87080
+ message: "This will lose all uncommitted work. Continue?",
87081
+ initial: false
87082
+ }
87083
+ ])
87084
+ );
87085
+ if (!confirm) {
87086
+ return yield* Effect_exports.fail(
87087
+ new WalkThroughCancelledError()
87088
+ );
87089
+ }
87090
+ }
87091
+ }
87092
+ yield* Console_exports.log(
87093
+ `
87094
+ Retrieving commits between ${mainBranch} and ${liveBranch}...`
87095
+ );
87096
+ const gitLogCommand = Command_exports2.make(
87097
+ "git",
87098
+ "log",
87099
+ "--oneline",
87100
+ "--reverse",
87101
+ `${mainBranch}..${liveBranch}`
87102
+ ).pipe(Command_exports2.workingDirectory(cwd));
87103
+ const commitHistory = yield* Command_exports2.string(gitLogCommand);
87104
+ const commits = commitHistory.trim().split("\n").filter(Boolean).map((line4, index) => {
87105
+ const [sha, ...messageParts] = line4.split(" ");
87106
+ const message = messageParts.join(" ");
87107
+ return {
87108
+ sha,
87109
+ message,
87110
+ index
87111
+ };
87112
+ });
87113
+ if (commits.length === 0) {
87114
+ return yield* Effect_exports.fail(
87115
+ new NoCommitsFoundError2({ mainBranch, liveBranch })
87116
+ );
87117
+ }
87118
+ yield* Console_exports.log(
87119
+ `
87120
+ Found ${commits.length} commits to walk through
87121
+ `
87122
+ );
87123
+ let cancelled = false;
87124
+ for (const commit of commits) {
87125
+ const commitNumber = commit.index + 1;
87126
+ yield* Console_exports.log("=".repeat(60));
87127
+ yield* Console_exports.log(
87128
+ `Commit ${commitNumber}/${commits.length}: ${commit.sha}`
87129
+ );
87130
+ yield* Console_exports.log(`Message: ${commit.message}`);
87131
+ yield* Console_exports.log("=".repeat(60));
87132
+ yield* applyDemoReset(commit.sha);
87133
+ const { action } = yield* runPrompt(
87134
+ () => (0, import_prompts5.default)([
87135
+ {
87136
+ type: "select",
87137
+ name: "action",
87138
+ message: `Commit ${commitNumber}/${commits.length} applied. Next?`,
87139
+ choices: [
87140
+ {
87141
+ title: "Continue to next commit",
87142
+ value: "continue"
87143
+ },
87144
+ {
87145
+ title: "Cancel walk-through",
87146
+ value: "cancel"
87147
+ }
87148
+ ]
87149
+ }
87150
+ ])
87151
+ );
87152
+ if (action === "cancel") {
87153
+ cancelled = true;
87154
+ break;
87155
+ }
87156
+ }
87157
+ yield* Console_exports.log("\n" + "=".repeat(60));
87158
+ yield* Console_exports.log(
87159
+ cancelled ? "Walk-through cancelled" : "Walk-through completed!"
87160
+ );
87161
+ yield* Console_exports.log(`Returning to ${liveBranch}...`);
87162
+ const finalResetExitCode = yield* git.runCommandWithExitCode(
87163
+ "git",
87164
+ "reset",
87165
+ "--hard",
87166
+ liveBranch
87167
+ );
87168
+ if (finalResetExitCode !== 0) {
87169
+ yield* Console_exports.error(
87170
+ `Failed to return to ${liveBranch}`
87171
+ );
87172
+ process.exitCode = 1;
87173
+ return yield* Effect_exports.succeed(void 0);
87174
+ }
87175
+ yield* Console_exports.log(`\u2713 Returned to ${liveBranch}`);
87176
+ yield* Console_exports.log("=".repeat(60));
87177
+ }).pipe(
87178
+ Effect_exports.withConfigProvider(
87179
+ ConfigProvider_exports.fromJson({
87180
+ cwd: process.cwd()
87181
+ })
87182
+ ),
87183
+ Effect_exports.catchTags({
87184
+ PromptCancelledError: () => {
87185
+ process.exitCode = 0;
87186
+ return Effect_exports.succeed(void 0);
87187
+ }
87188
+ }),
87189
+ Effect_exports.catchAll((error4) => {
87190
+ return Effect_exports.gen(function* () {
87191
+ yield* Console_exports.error(`Unexpected error: ${error4}`);
87192
+ process.exitCode = 1;
87193
+ });
87194
+ })
87195
+ )
87196
+ ).pipe(
87197
+ Command_exports.withDescription(
87198
+ "Walk through commits between branches with demo-style resets"
87199
+ )
87200
+ );
87201
+
86700
87202
  // src/internal/internal.ts
86701
87203
  var upgradePackages = Command_exports.make(
86702
87204
  "upgrade",
@@ -86749,14 +87251,16 @@ var internal = Command_exports.make("internal").pipe(
86749
87251
  rename4,
86750
87252
  uploadToCloudinary,
86751
87253
  getDiffs,
87254
+ diffsToRepo,
86752
87255
  editCommit,
86753
- rebaseToMain
87256
+ rebaseToMain,
87257
+ walkThrough
86754
87258
  ]),
86755
87259
  Command_exports.withDescription("Internal commands for AI Hero")
86756
87260
  );
86757
87261
 
86758
87262
  // src/reset.ts
86759
- var import_prompts5 = __toESM(require_prompts3());
87263
+ var import_prompts6 = __toESM(require_prompts3());
86760
87264
  (class extends Data_exports.TaggedError(
86761
87265
  "NotAGitRepoError"
86762
87266
  ) {
@@ -86824,7 +87328,7 @@ var reset2 = Command_exports.make(
86824
87328
  }
86825
87329
  if (!problem && !solution && !demo) {
86826
87330
  const { state } = yield* runPrompt(
86827
- () => (0, import_prompts5.default)([
87331
+ () => (0, import_prompts6.default)([
86828
87332
  {
86829
87333
  type: "select",
86830
87334
  name: "state",
@@ -86869,7 +87373,7 @@ var reset2 = Command_exports.make(
86869
87373
  action = "reset-current";
86870
87374
  } else {
86871
87375
  const result = yield* runPrompt(
86872
- () => (0, import_prompts5.default)([
87376
+ () => (0, import_prompts6.default)([
86873
87377
  {
86874
87378
  type: "select",
86875
87379
  name: "action",
@@ -86898,7 +87402,7 @@ var reset2 = Command_exports.make(
86898
87402
  }
86899
87403
  if (action === "create-branch") {
86900
87404
  const { branchName } = yield* runPrompt(
86901
- () => (0, import_prompts5.default)([
87405
+ () => (0, import_prompts6.default)([
86902
87406
  {
86903
87407
  type: "text",
86904
87408
  name: "branchName",
@@ -86934,7 +87438,7 @@ var reset2 = Command_exports.make(
86934
87438
  );
86935
87439
  yield* Console_exports.log(statusOutput);
86936
87440
  const { confirm } = yield* runPrompt(
86937
- () => (0, import_prompts5.default)([
87441
+ () => (0, import_prompts6.default)([
86938
87442
  {
86939
87443
  type: "confirm",
86940
87444
  name: "confirm",