ai-hero-cli 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin.cjs +559 -410
- package/package.json +1 -1
package/bin.cjs
CHANGED
|
@@ -3888,8 +3888,8 @@ var require_compiler = __commonJS({
|
|
|
3888
3888
|
valueAssignments.push(fullPath);
|
|
3889
3889
|
}
|
|
3890
3890
|
}
|
|
3891
|
-
function pathAssigned(
|
|
3892
|
-
return assignedPaths.indexOf(
|
|
3891
|
+
function pathAssigned(path7) {
|
|
3892
|
+
return assignedPaths.indexOf(path7) !== -1;
|
|
3893
3893
|
}
|
|
3894
3894
|
function reduceValueNode(node) {
|
|
3895
3895
|
if (node.type === "Array") {
|
|
@@ -3913,20 +3913,20 @@ var require_compiler = __commonJS({
|
|
|
3913
3913
|
return obj;
|
|
3914
3914
|
}
|
|
3915
3915
|
function setPath(node) {
|
|
3916
|
-
var
|
|
3917
|
-
var quotedPath =
|
|
3916
|
+
var path7 = node.value;
|
|
3917
|
+
var quotedPath = path7.map(quoteDottedString).join(".");
|
|
3918
3918
|
var line4 = node.line;
|
|
3919
3919
|
var column3 = node.column;
|
|
3920
3920
|
if (pathAssigned(quotedPath)) {
|
|
3921
|
-
genError("Cannot redefine existing key '" +
|
|
3921
|
+
genError("Cannot redefine existing key '" + path7 + "'.", line4, column3);
|
|
3922
3922
|
}
|
|
3923
3923
|
assignedPaths.push(quotedPath);
|
|
3924
|
-
context7 = deepRef(data,
|
|
3925
|
-
currentPath =
|
|
3924
|
+
context7 = deepRef(data, path7, /* @__PURE__ */ Object.create(null), line4, column3);
|
|
3925
|
+
currentPath = path7;
|
|
3926
3926
|
}
|
|
3927
3927
|
function addTableArray(node) {
|
|
3928
|
-
var
|
|
3929
|
-
var quotedPath =
|
|
3928
|
+
var path7 = node.value;
|
|
3929
|
+
var quotedPath = path7.map(quoteDottedString).join(".");
|
|
3930
3930
|
var line4 = node.line;
|
|
3931
3931
|
var column3 = node.column;
|
|
3932
3932
|
if (!pathAssigned(quotedPath)) {
|
|
@@ -3936,14 +3936,14 @@ var require_compiler = __commonJS({
|
|
|
3936
3936
|
return p3.indexOf(quotedPath) !== 0;
|
|
3937
3937
|
});
|
|
3938
3938
|
assignedPaths.push(quotedPath);
|
|
3939
|
-
context7 = deepRef(data,
|
|
3939
|
+
context7 = deepRef(data, path7, [], line4, column3);
|
|
3940
3940
|
currentPath = quotedPath;
|
|
3941
3941
|
if (context7 instanceof Array) {
|
|
3942
3942
|
var newObj = /* @__PURE__ */ Object.create(null);
|
|
3943
3943
|
context7.push(newObj);
|
|
3944
3944
|
context7 = newObj;
|
|
3945
3945
|
} else {
|
|
3946
|
-
genError("Cannot redefine existing key '" +
|
|
3946
|
+
genError("Cannot redefine existing key '" + path7 + "'.", line4, column3);
|
|
3947
3947
|
}
|
|
3948
3948
|
}
|
|
3949
3949
|
function deepRef(start5, keys5, value5, line4, column3) {
|
|
@@ -4088,17 +4088,17 @@ var require_visit = __commonJS({
|
|
|
4088
4088
|
visit.BREAK = BREAK;
|
|
4089
4089
|
visit.SKIP = SKIP;
|
|
4090
4090
|
visit.REMOVE = REMOVE;
|
|
4091
|
-
function visit_(key, node, visitor,
|
|
4092
|
-
const ctrl = callVisitor(key, node, visitor,
|
|
4091
|
+
function visit_(key, node, visitor, path7) {
|
|
4092
|
+
const ctrl = callVisitor(key, node, visitor, path7);
|
|
4093
4093
|
if (identity3.isNode(ctrl) || identity3.isPair(ctrl)) {
|
|
4094
|
-
replaceNode(key,
|
|
4095
|
-
return visit_(key, ctrl, visitor,
|
|
4094
|
+
replaceNode(key, path7, ctrl);
|
|
4095
|
+
return visit_(key, ctrl, visitor, path7);
|
|
4096
4096
|
}
|
|
4097
4097
|
if (typeof ctrl !== "symbol") {
|
|
4098
4098
|
if (identity3.isCollection(node)) {
|
|
4099
|
-
|
|
4099
|
+
path7 = Object.freeze(path7.concat(node));
|
|
4100
4100
|
for (let i = 0; i < node.items.length; ++i) {
|
|
4101
|
-
const ci = visit_(i, node.items[i], visitor,
|
|
4101
|
+
const ci = visit_(i, node.items[i], visitor, path7);
|
|
4102
4102
|
if (typeof ci === "number")
|
|
4103
4103
|
i = ci - 1;
|
|
4104
4104
|
else if (ci === BREAK)
|
|
@@ -4109,13 +4109,13 @@ var require_visit = __commonJS({
|
|
|
4109
4109
|
}
|
|
4110
4110
|
}
|
|
4111
4111
|
} else if (identity3.isPair(node)) {
|
|
4112
|
-
|
|
4113
|
-
const ck = visit_("key", node.key, visitor,
|
|
4112
|
+
path7 = Object.freeze(path7.concat(node));
|
|
4113
|
+
const ck = visit_("key", node.key, visitor, path7);
|
|
4114
4114
|
if (ck === BREAK)
|
|
4115
4115
|
return BREAK;
|
|
4116
4116
|
else if (ck === REMOVE)
|
|
4117
4117
|
node.key = null;
|
|
4118
|
-
const cv = visit_("value", node.value, visitor,
|
|
4118
|
+
const cv = visit_("value", node.value, visitor, path7);
|
|
4119
4119
|
if (cv === BREAK)
|
|
4120
4120
|
return BREAK;
|
|
4121
4121
|
else if (cv === REMOVE)
|
|
@@ -4136,17 +4136,17 @@ var require_visit = __commonJS({
|
|
|
4136
4136
|
visitAsync.BREAK = BREAK;
|
|
4137
4137
|
visitAsync.SKIP = SKIP;
|
|
4138
4138
|
visitAsync.REMOVE = REMOVE;
|
|
4139
|
-
async function visitAsync_(key, node, visitor,
|
|
4140
|
-
const ctrl = await callVisitor(key, node, visitor,
|
|
4139
|
+
async function visitAsync_(key, node, visitor, path7) {
|
|
4140
|
+
const ctrl = await callVisitor(key, node, visitor, path7);
|
|
4141
4141
|
if (identity3.isNode(ctrl) || identity3.isPair(ctrl)) {
|
|
4142
|
-
replaceNode(key,
|
|
4143
|
-
return visitAsync_(key, ctrl, visitor,
|
|
4142
|
+
replaceNode(key, path7, ctrl);
|
|
4143
|
+
return visitAsync_(key, ctrl, visitor, path7);
|
|
4144
4144
|
}
|
|
4145
4145
|
if (typeof ctrl !== "symbol") {
|
|
4146
4146
|
if (identity3.isCollection(node)) {
|
|
4147
|
-
|
|
4147
|
+
path7 = Object.freeze(path7.concat(node));
|
|
4148
4148
|
for (let i = 0; i < node.items.length; ++i) {
|
|
4149
|
-
const ci = await visitAsync_(i, node.items[i], visitor,
|
|
4149
|
+
const ci = await visitAsync_(i, node.items[i], visitor, path7);
|
|
4150
4150
|
if (typeof ci === "number")
|
|
4151
4151
|
i = ci - 1;
|
|
4152
4152
|
else if (ci === BREAK)
|
|
@@ -4157,13 +4157,13 @@ var require_visit = __commonJS({
|
|
|
4157
4157
|
}
|
|
4158
4158
|
}
|
|
4159
4159
|
} else if (identity3.isPair(node)) {
|
|
4160
|
-
|
|
4161
|
-
const ck = await visitAsync_("key", node.key, visitor,
|
|
4160
|
+
path7 = Object.freeze(path7.concat(node));
|
|
4161
|
+
const ck = await visitAsync_("key", node.key, visitor, path7);
|
|
4162
4162
|
if (ck === BREAK)
|
|
4163
4163
|
return BREAK;
|
|
4164
4164
|
else if (ck === REMOVE)
|
|
4165
4165
|
node.key = null;
|
|
4166
|
-
const cv = await visitAsync_("value", node.value, visitor,
|
|
4166
|
+
const cv = await visitAsync_("value", node.value, visitor, path7);
|
|
4167
4167
|
if (cv === BREAK)
|
|
4168
4168
|
return BREAK;
|
|
4169
4169
|
else if (cv === REMOVE)
|
|
@@ -4190,23 +4190,23 @@ var require_visit = __commonJS({
|
|
|
4190
4190
|
}
|
|
4191
4191
|
return visitor;
|
|
4192
4192
|
}
|
|
4193
|
-
function callVisitor(key, node, visitor,
|
|
4193
|
+
function callVisitor(key, node, visitor, path7) {
|
|
4194
4194
|
if (typeof visitor === "function")
|
|
4195
|
-
return visitor(key, node,
|
|
4195
|
+
return visitor(key, node, path7);
|
|
4196
4196
|
if (identity3.isMap(node))
|
|
4197
|
-
return visitor.Map?.(key, node,
|
|
4197
|
+
return visitor.Map?.(key, node, path7);
|
|
4198
4198
|
if (identity3.isSeq(node))
|
|
4199
|
-
return visitor.Seq?.(key, node,
|
|
4199
|
+
return visitor.Seq?.(key, node, path7);
|
|
4200
4200
|
if (identity3.isPair(node))
|
|
4201
|
-
return visitor.Pair?.(key, node,
|
|
4201
|
+
return visitor.Pair?.(key, node, path7);
|
|
4202
4202
|
if (identity3.isScalar(node))
|
|
4203
|
-
return visitor.Scalar?.(key, node,
|
|
4203
|
+
return visitor.Scalar?.(key, node, path7);
|
|
4204
4204
|
if (identity3.isAlias(node))
|
|
4205
|
-
return visitor.Alias?.(key, node,
|
|
4205
|
+
return visitor.Alias?.(key, node, path7);
|
|
4206
4206
|
return void 0;
|
|
4207
4207
|
}
|
|
4208
|
-
function replaceNode(key,
|
|
4209
|
-
const parent =
|
|
4208
|
+
function replaceNode(key, path7, node) {
|
|
4209
|
+
const parent = path7[path7.length - 1];
|
|
4210
4210
|
if (identity3.isCollection(parent)) {
|
|
4211
4211
|
parent.items[key] = node;
|
|
4212
4212
|
} else if (identity3.isPair(parent)) {
|
|
@@ -4805,10 +4805,10 @@ var require_Collection = __commonJS({
|
|
|
4805
4805
|
var createNode = require_createNode();
|
|
4806
4806
|
var identity3 = require_identity();
|
|
4807
4807
|
var Node = require_Node();
|
|
4808
|
-
function collectionFromPath(schema,
|
|
4808
|
+
function collectionFromPath(schema, path7, value5) {
|
|
4809
4809
|
let v = value5;
|
|
4810
|
-
for (let i =
|
|
4811
|
-
const k =
|
|
4810
|
+
for (let i = path7.length - 1; i >= 0; --i) {
|
|
4811
|
+
const k = path7[i];
|
|
4812
4812
|
if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
|
|
4813
4813
|
const a = [];
|
|
4814
4814
|
a[k] = v;
|
|
@@ -4827,7 +4827,7 @@ var require_Collection = __commonJS({
|
|
|
4827
4827
|
sourceObjects: /* @__PURE__ */ new Map()
|
|
4828
4828
|
});
|
|
4829
4829
|
}
|
|
4830
|
-
var isEmptyPath = (
|
|
4830
|
+
var isEmptyPath = (path7) => path7 == null || typeof path7 === "object" && !!path7[Symbol.iterator]().next().done;
|
|
4831
4831
|
var Collection = class extends Node.NodeBase {
|
|
4832
4832
|
constructor(type2, schema) {
|
|
4833
4833
|
super(type2);
|
|
@@ -4857,11 +4857,11 @@ var require_Collection = __commonJS({
|
|
|
4857
4857
|
* be a Pair instance or a `{ key, value }` object, which may not have a key
|
|
4858
4858
|
* that already exists in the map.
|
|
4859
4859
|
*/
|
|
4860
|
-
addIn(
|
|
4861
|
-
if (isEmptyPath(
|
|
4860
|
+
addIn(path7, value5) {
|
|
4861
|
+
if (isEmptyPath(path7))
|
|
4862
4862
|
this.add(value5);
|
|
4863
4863
|
else {
|
|
4864
|
-
const [key, ...rest] =
|
|
4864
|
+
const [key, ...rest] = path7;
|
|
4865
4865
|
const node = this.get(key, true);
|
|
4866
4866
|
if (identity3.isCollection(node))
|
|
4867
4867
|
node.addIn(rest, value5);
|
|
@@ -4875,8 +4875,8 @@ var require_Collection = __commonJS({
|
|
|
4875
4875
|
* Removes a value from the collection.
|
|
4876
4876
|
* @returns `true` if the item was found and removed.
|
|
4877
4877
|
*/
|
|
4878
|
-
deleteIn(
|
|
4879
|
-
const [key, ...rest] =
|
|
4878
|
+
deleteIn(path7) {
|
|
4879
|
+
const [key, ...rest] = path7;
|
|
4880
4880
|
if (rest.length === 0)
|
|
4881
4881
|
return this.delete(key);
|
|
4882
4882
|
const node = this.get(key, true);
|
|
@@ -4890,8 +4890,8 @@ var require_Collection = __commonJS({
|
|
|
4890
4890
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
4891
4891
|
* `true` (collections are always returned intact).
|
|
4892
4892
|
*/
|
|
4893
|
-
getIn(
|
|
4894
|
-
const [key, ...rest] =
|
|
4893
|
+
getIn(path7, keepScalar) {
|
|
4894
|
+
const [key, ...rest] = path7;
|
|
4895
4895
|
const node = this.get(key, true);
|
|
4896
4896
|
if (rest.length === 0)
|
|
4897
4897
|
return !keepScalar && identity3.isScalar(node) ? node.value : node;
|
|
@@ -4909,8 +4909,8 @@ var require_Collection = __commonJS({
|
|
|
4909
4909
|
/**
|
|
4910
4910
|
* Checks if the collection includes a value with the key `key`.
|
|
4911
4911
|
*/
|
|
4912
|
-
hasIn(
|
|
4913
|
-
const [key, ...rest] =
|
|
4912
|
+
hasIn(path7) {
|
|
4913
|
+
const [key, ...rest] = path7;
|
|
4914
4914
|
if (rest.length === 0)
|
|
4915
4915
|
return this.has(key);
|
|
4916
4916
|
const node = this.get(key, true);
|
|
@@ -4920,8 +4920,8 @@ var require_Collection = __commonJS({
|
|
|
4920
4920
|
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
4921
4921
|
* boolean to add/remove the item from the set.
|
|
4922
4922
|
*/
|
|
4923
|
-
setIn(
|
|
4924
|
-
const [key, ...rest] =
|
|
4923
|
+
setIn(path7, value5) {
|
|
4924
|
+
const [key, ...rest] = path7;
|
|
4925
4925
|
if (rest.length === 0) {
|
|
4926
4926
|
this.set(key, value5);
|
|
4927
4927
|
} else {
|
|
@@ -7390,9 +7390,9 @@ var require_Document = __commonJS({
|
|
|
7390
7390
|
this.contents.add(value5);
|
|
7391
7391
|
}
|
|
7392
7392
|
/** Adds a value to the document. */
|
|
7393
|
-
addIn(
|
|
7393
|
+
addIn(path7, value5) {
|
|
7394
7394
|
if (assertCollection(this.contents))
|
|
7395
|
-
this.contents.addIn(
|
|
7395
|
+
this.contents.addIn(path7, value5);
|
|
7396
7396
|
}
|
|
7397
7397
|
/**
|
|
7398
7398
|
* Create a new `Alias` node, ensuring that the target `node` has the required anchor.
|
|
@@ -7467,14 +7467,14 @@ var require_Document = __commonJS({
|
|
|
7467
7467
|
* Removes a value from the document.
|
|
7468
7468
|
* @returns `true` if the item was found and removed.
|
|
7469
7469
|
*/
|
|
7470
|
-
deleteIn(
|
|
7471
|
-
if (Collection.isEmptyPath(
|
|
7470
|
+
deleteIn(path7) {
|
|
7471
|
+
if (Collection.isEmptyPath(path7)) {
|
|
7472
7472
|
if (this.contents == null)
|
|
7473
7473
|
return false;
|
|
7474
7474
|
this.contents = null;
|
|
7475
7475
|
return true;
|
|
7476
7476
|
}
|
|
7477
|
-
return assertCollection(this.contents) ? this.contents.deleteIn(
|
|
7477
|
+
return assertCollection(this.contents) ? this.contents.deleteIn(path7) : false;
|
|
7478
7478
|
}
|
|
7479
7479
|
/**
|
|
7480
7480
|
* Returns item at `key`, or `undefined` if not found. By default unwraps
|
|
@@ -7489,10 +7489,10 @@ var require_Document = __commonJS({
|
|
|
7489
7489
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
7490
7490
|
* `true` (collections are always returned intact).
|
|
7491
7491
|
*/
|
|
7492
|
-
getIn(
|
|
7493
|
-
if (Collection.isEmptyPath(
|
|
7492
|
+
getIn(path7, keepScalar) {
|
|
7493
|
+
if (Collection.isEmptyPath(path7))
|
|
7494
7494
|
return !keepScalar && identity3.isScalar(this.contents) ? this.contents.value : this.contents;
|
|
7495
|
-
return identity3.isCollection(this.contents) ? this.contents.getIn(
|
|
7495
|
+
return identity3.isCollection(this.contents) ? this.contents.getIn(path7, keepScalar) : void 0;
|
|
7496
7496
|
}
|
|
7497
7497
|
/**
|
|
7498
7498
|
* Checks if the document includes a value with the key `key`.
|
|
@@ -7503,10 +7503,10 @@ var require_Document = __commonJS({
|
|
|
7503
7503
|
/**
|
|
7504
7504
|
* Checks if the document includes a value at `path`.
|
|
7505
7505
|
*/
|
|
7506
|
-
hasIn(
|
|
7507
|
-
if (Collection.isEmptyPath(
|
|
7506
|
+
hasIn(path7) {
|
|
7507
|
+
if (Collection.isEmptyPath(path7))
|
|
7508
7508
|
return this.contents !== void 0;
|
|
7509
|
-
return identity3.isCollection(this.contents) ? this.contents.hasIn(
|
|
7509
|
+
return identity3.isCollection(this.contents) ? this.contents.hasIn(path7) : false;
|
|
7510
7510
|
}
|
|
7511
7511
|
/**
|
|
7512
7512
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
@@ -7523,13 +7523,13 @@ var require_Document = __commonJS({
|
|
|
7523
7523
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
7524
7524
|
* boolean to add/remove the item from the set.
|
|
7525
7525
|
*/
|
|
7526
|
-
setIn(
|
|
7527
|
-
if (Collection.isEmptyPath(
|
|
7526
|
+
setIn(path7, value5) {
|
|
7527
|
+
if (Collection.isEmptyPath(path7)) {
|
|
7528
7528
|
this.contents = value5;
|
|
7529
7529
|
} else if (this.contents == null) {
|
|
7530
|
-
this.contents = Collection.collectionFromPath(this.schema, Array.from(
|
|
7530
|
+
this.contents = Collection.collectionFromPath(this.schema, Array.from(path7), value5);
|
|
7531
7531
|
} else if (assertCollection(this.contents)) {
|
|
7532
|
-
this.contents.setIn(
|
|
7532
|
+
this.contents.setIn(path7, value5);
|
|
7533
7533
|
}
|
|
7534
7534
|
}
|
|
7535
7535
|
/**
|
|
@@ -7909,10 +7909,10 @@ var require_resolve_block_map = __commonJS({
|
|
|
7909
7909
|
let offset = bm.offset;
|
|
7910
7910
|
let commentEnd = null;
|
|
7911
7911
|
for (const collItem of bm.items) {
|
|
7912
|
-
const { start: start5, key, sep:
|
|
7912
|
+
const { start: start5, key, sep: sep3, value: value5 } = collItem;
|
|
7913
7913
|
const keyProps = resolveProps.resolveProps(start5, {
|
|
7914
7914
|
indicator: "explicit-key-ind",
|
|
7915
|
-
next: key ??
|
|
7915
|
+
next: key ?? sep3?.[0],
|
|
7916
7916
|
offset,
|
|
7917
7917
|
onError: onError4,
|
|
7918
7918
|
parentIndent: bm.indent,
|
|
@@ -7926,7 +7926,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
7926
7926
|
else if ("indent" in key && key.indent !== bm.indent)
|
|
7927
7927
|
onError4(offset, "BAD_INDENT", startColMsg);
|
|
7928
7928
|
}
|
|
7929
|
-
if (!keyProps.anchor && !keyProps.tag && !
|
|
7929
|
+
if (!keyProps.anchor && !keyProps.tag && !sep3) {
|
|
7930
7930
|
commentEnd = keyProps.end;
|
|
7931
7931
|
if (keyProps.comment) {
|
|
7932
7932
|
if (map35.comment)
|
|
@@ -7950,7 +7950,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
7950
7950
|
ctx.atKey = false;
|
|
7951
7951
|
if (utilMapIncludes.mapIncludes(ctx, map35.items, keyNode))
|
|
7952
7952
|
onError4(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
7953
|
-
const valueProps = resolveProps.resolveProps(
|
|
7953
|
+
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
|
7954
7954
|
indicator: "map-value-ind",
|
|
7955
7955
|
next: value5,
|
|
7956
7956
|
offset: keyNode.range[2],
|
|
@@ -7966,7 +7966,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
7966
7966
|
if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
|
|
7967
7967
|
onError4(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
|
|
7968
7968
|
}
|
|
7969
|
-
const valueNode = value5 ? composeNode(ctx, value5, valueProps, onError4) : composeEmptyNode(ctx, offset,
|
|
7969
|
+
const valueNode = value5 ? composeNode(ctx, value5, valueProps, onError4) : composeEmptyNode(ctx, offset, sep3, null, valueProps, onError4);
|
|
7970
7970
|
if (ctx.schema.compat)
|
|
7971
7971
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, value5, onError4);
|
|
7972
7972
|
offset = valueNode.range[2];
|
|
@@ -8055,7 +8055,7 @@ var require_resolve_end = __commonJS({
|
|
|
8055
8055
|
let comment = "";
|
|
8056
8056
|
if (end5) {
|
|
8057
8057
|
let hasSpace = false;
|
|
8058
|
-
let
|
|
8058
|
+
let sep3 = "";
|
|
8059
8059
|
for (const token of end5) {
|
|
8060
8060
|
const { source, type: type2 } = token;
|
|
8061
8061
|
switch (type2) {
|
|
@@ -8069,13 +8069,13 @@ var require_resolve_end = __commonJS({
|
|
|
8069
8069
|
if (!comment)
|
|
8070
8070
|
comment = cb;
|
|
8071
8071
|
else
|
|
8072
|
-
comment +=
|
|
8073
|
-
|
|
8072
|
+
comment += sep3 + cb;
|
|
8073
|
+
sep3 = "";
|
|
8074
8074
|
break;
|
|
8075
8075
|
}
|
|
8076
8076
|
case "newline":
|
|
8077
8077
|
if (comment)
|
|
8078
|
-
|
|
8078
|
+
sep3 += source;
|
|
8079
8079
|
hasSpace = true;
|
|
8080
8080
|
break;
|
|
8081
8081
|
default:
|
|
@@ -8117,18 +8117,18 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
8117
8117
|
let offset = fc.offset + fc.start.source.length;
|
|
8118
8118
|
for (let i = 0; i < fc.items.length; ++i) {
|
|
8119
8119
|
const collItem = fc.items[i];
|
|
8120
|
-
const { start: start5, key, sep:
|
|
8120
|
+
const { start: start5, key, sep: sep3, value: value5 } = collItem;
|
|
8121
8121
|
const props = resolveProps.resolveProps(start5, {
|
|
8122
8122
|
flow: fcName,
|
|
8123
8123
|
indicator: "explicit-key-ind",
|
|
8124
|
-
next: key ??
|
|
8124
|
+
next: key ?? sep3?.[0],
|
|
8125
8125
|
offset,
|
|
8126
8126
|
onError: onError4,
|
|
8127
8127
|
parentIndent: fc.indent,
|
|
8128
8128
|
startOnNewline: false
|
|
8129
8129
|
});
|
|
8130
8130
|
if (!props.found) {
|
|
8131
|
-
if (!props.anchor && !props.tag && !
|
|
8131
|
+
if (!props.anchor && !props.tag && !sep3 && !value5) {
|
|
8132
8132
|
if (i === 0 && props.comma)
|
|
8133
8133
|
onError4(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
|
|
8134
8134
|
else if (i < fc.items.length - 1)
|
|
@@ -8182,8 +8182,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
8182
8182
|
}
|
|
8183
8183
|
}
|
|
8184
8184
|
}
|
|
8185
|
-
if (!isMap2 && !
|
|
8186
|
-
const valueNode = value5 ? composeNode(ctx, value5, props, onError4) : composeEmptyNode(ctx, props.end,
|
|
8185
|
+
if (!isMap2 && !sep3 && !props.found) {
|
|
8186
|
+
const valueNode = value5 ? composeNode(ctx, value5, props, onError4) : composeEmptyNode(ctx, props.end, sep3, null, props, onError4);
|
|
8187
8187
|
coll.items.push(valueNode);
|
|
8188
8188
|
offset = valueNode.range[2];
|
|
8189
8189
|
if (isBlock(value5))
|
|
@@ -8195,7 +8195,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
8195
8195
|
if (isBlock(key))
|
|
8196
8196
|
onError4(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
8197
8197
|
ctx.atKey = false;
|
|
8198
|
-
const valueProps = resolveProps.resolveProps(
|
|
8198
|
+
const valueProps = resolveProps.resolveProps(sep3 ?? [], {
|
|
8199
8199
|
flow: fcName,
|
|
8200
8200
|
indicator: "map-value-ind",
|
|
8201
8201
|
next: value5,
|
|
@@ -8206,8 +8206,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
8206
8206
|
});
|
|
8207
8207
|
if (valueProps.found) {
|
|
8208
8208
|
if (!isMap2 && !props.found && ctx.options.strict) {
|
|
8209
|
-
if (
|
|
8210
|
-
for (const st of
|
|
8209
|
+
if (sep3)
|
|
8210
|
+
for (const st of sep3) {
|
|
8211
8211
|
if (st === valueProps.found)
|
|
8212
8212
|
break;
|
|
8213
8213
|
if (st.type === "newline") {
|
|
@@ -8224,7 +8224,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
8224
8224
|
else
|
|
8225
8225
|
onError4(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
8226
8226
|
}
|
|
8227
|
-
const valueNode = value5 ? composeNode(ctx, value5, valueProps, onError4) : valueProps.found ? composeEmptyNode(ctx, valueProps.end,
|
|
8227
|
+
const valueNode = value5 ? composeNode(ctx, value5, valueProps, onError4) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep3, null, valueProps, onError4) : null;
|
|
8228
8228
|
if (valueNode) {
|
|
8229
8229
|
if (isBlock(value5))
|
|
8230
8230
|
onError4(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
@@ -8402,7 +8402,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
8402
8402
|
chompStart = i + 1;
|
|
8403
8403
|
}
|
|
8404
8404
|
let value5 = "";
|
|
8405
|
-
let
|
|
8405
|
+
let sep3 = "";
|
|
8406
8406
|
let prevMoreIndented = false;
|
|
8407
8407
|
for (let i = 0; i < contentStart; ++i)
|
|
8408
8408
|
value5 += lines4[i][0].slice(trimIndent) + "\n";
|
|
@@ -8419,24 +8419,24 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
8419
8419
|
indent3 = "";
|
|
8420
8420
|
}
|
|
8421
8421
|
if (type2 === Scalar.Scalar.BLOCK_LITERAL) {
|
|
8422
|
-
value5 +=
|
|
8423
|
-
|
|
8422
|
+
value5 += sep3 + indent3.slice(trimIndent) + content;
|
|
8423
|
+
sep3 = "\n";
|
|
8424
8424
|
} else if (indent3.length > trimIndent || content[0] === " ") {
|
|
8425
|
-
if (
|
|
8426
|
-
|
|
8427
|
-
else if (!prevMoreIndented &&
|
|
8428
|
-
|
|
8429
|
-
value5 +=
|
|
8430
|
-
|
|
8425
|
+
if (sep3 === " ")
|
|
8426
|
+
sep3 = "\n";
|
|
8427
|
+
else if (!prevMoreIndented && sep3 === "\n")
|
|
8428
|
+
sep3 = "\n\n";
|
|
8429
|
+
value5 += sep3 + indent3.slice(trimIndent) + content;
|
|
8430
|
+
sep3 = "\n";
|
|
8431
8431
|
prevMoreIndented = true;
|
|
8432
8432
|
} else if (content === "") {
|
|
8433
|
-
if (
|
|
8433
|
+
if (sep3 === "\n")
|
|
8434
8434
|
value5 += "\n";
|
|
8435
8435
|
else
|
|
8436
|
-
|
|
8436
|
+
sep3 = "\n";
|
|
8437
8437
|
} else {
|
|
8438
|
-
value5 +=
|
|
8439
|
-
|
|
8438
|
+
value5 += sep3 + content;
|
|
8439
|
+
sep3 = " ";
|
|
8440
8440
|
prevMoreIndented = false;
|
|
8441
8441
|
}
|
|
8442
8442
|
}
|
|
@@ -8617,25 +8617,25 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
8617
8617
|
if (!match17)
|
|
8618
8618
|
return source;
|
|
8619
8619
|
let res = match17[1];
|
|
8620
|
-
let
|
|
8620
|
+
let sep3 = " ";
|
|
8621
8621
|
let pos = first3.lastIndex;
|
|
8622
8622
|
line4.lastIndex = pos;
|
|
8623
8623
|
while (match17 = line4.exec(source)) {
|
|
8624
8624
|
if (match17[1] === "") {
|
|
8625
|
-
if (
|
|
8626
|
-
res +=
|
|
8625
|
+
if (sep3 === "\n")
|
|
8626
|
+
res += sep3;
|
|
8627
8627
|
else
|
|
8628
|
-
|
|
8628
|
+
sep3 = "\n";
|
|
8629
8629
|
} else {
|
|
8630
|
-
res +=
|
|
8631
|
-
|
|
8630
|
+
res += sep3 + match17[1];
|
|
8631
|
+
sep3 = " ";
|
|
8632
8632
|
}
|
|
8633
8633
|
pos = line4.lastIndex;
|
|
8634
8634
|
}
|
|
8635
8635
|
const last5 = /[ \t]*(.*)/sy;
|
|
8636
8636
|
last5.lastIndex = pos;
|
|
8637
8637
|
match17 = last5.exec(source);
|
|
8638
|
-
return res +
|
|
8638
|
+
return res + sep3 + (match17?.[1] ?? "");
|
|
8639
8639
|
}
|
|
8640
8640
|
function doubleQuotedValue(source, onError4) {
|
|
8641
8641
|
let res = "";
|
|
@@ -9430,14 +9430,14 @@ var require_cst_stringify = __commonJS({
|
|
|
9430
9430
|
}
|
|
9431
9431
|
}
|
|
9432
9432
|
}
|
|
9433
|
-
function stringifyItem({ start: start5, key, sep:
|
|
9433
|
+
function stringifyItem({ start: start5, key, sep: sep3, value: value5 }) {
|
|
9434
9434
|
let res = "";
|
|
9435
9435
|
for (const st of start5)
|
|
9436
9436
|
res += st.source;
|
|
9437
9437
|
if (key)
|
|
9438
9438
|
res += stringifyToken(key);
|
|
9439
|
-
if (
|
|
9440
|
-
for (const st of
|
|
9439
|
+
if (sep3)
|
|
9440
|
+
for (const st of sep3)
|
|
9441
9441
|
res += st.source;
|
|
9442
9442
|
if (value5)
|
|
9443
9443
|
res += stringifyToken(value5);
|
|
@@ -9461,9 +9461,9 @@ var require_cst_visit = __commonJS({
|
|
|
9461
9461
|
visit.BREAK = BREAK;
|
|
9462
9462
|
visit.SKIP = SKIP;
|
|
9463
9463
|
visit.REMOVE = REMOVE;
|
|
9464
|
-
visit.itemAtPath = (cst,
|
|
9464
|
+
visit.itemAtPath = (cst, path7) => {
|
|
9465
9465
|
let item = cst;
|
|
9466
|
-
for (const [field, index] of
|
|
9466
|
+
for (const [field, index] of path7) {
|
|
9467
9467
|
const tok = item?.[field];
|
|
9468
9468
|
if (tok && "items" in tok) {
|
|
9469
9469
|
item = tok.items[index];
|
|
@@ -9472,23 +9472,23 @@ var require_cst_visit = __commonJS({
|
|
|
9472
9472
|
}
|
|
9473
9473
|
return item;
|
|
9474
9474
|
};
|
|
9475
|
-
visit.parentCollection = (cst,
|
|
9476
|
-
const parent = visit.itemAtPath(cst,
|
|
9477
|
-
const field =
|
|
9475
|
+
visit.parentCollection = (cst, path7) => {
|
|
9476
|
+
const parent = visit.itemAtPath(cst, path7.slice(0, -1));
|
|
9477
|
+
const field = path7[path7.length - 1][0];
|
|
9478
9478
|
const coll = parent?.[field];
|
|
9479
9479
|
if (coll && "items" in coll)
|
|
9480
9480
|
return coll;
|
|
9481
9481
|
throw new Error("Parent collection not found");
|
|
9482
9482
|
};
|
|
9483
|
-
function _visit(
|
|
9484
|
-
let ctrl = visitor(item,
|
|
9483
|
+
function _visit(path7, item, visitor) {
|
|
9484
|
+
let ctrl = visitor(item, path7);
|
|
9485
9485
|
if (typeof ctrl === "symbol")
|
|
9486
9486
|
return ctrl;
|
|
9487
9487
|
for (const field of ["key", "value"]) {
|
|
9488
9488
|
const token = item[field];
|
|
9489
9489
|
if (token && "items" in token) {
|
|
9490
9490
|
for (let i = 0; i < token.items.length; ++i) {
|
|
9491
|
-
const ci = _visit(Object.freeze(
|
|
9491
|
+
const ci = _visit(Object.freeze(path7.concat([[field, i]])), token.items[i], visitor);
|
|
9492
9492
|
if (typeof ci === "number")
|
|
9493
9493
|
i = ci - 1;
|
|
9494
9494
|
else if (ci === BREAK)
|
|
@@ -9499,10 +9499,10 @@ var require_cst_visit = __commonJS({
|
|
|
9499
9499
|
}
|
|
9500
9500
|
}
|
|
9501
9501
|
if (typeof ctrl === "function" && field === "key")
|
|
9502
|
-
ctrl = ctrl(item,
|
|
9502
|
+
ctrl = ctrl(item, path7);
|
|
9503
9503
|
}
|
|
9504
9504
|
}
|
|
9505
|
-
return typeof ctrl === "function" ? ctrl(item,
|
|
9505
|
+
return typeof ctrl === "function" ? ctrl(item, path7) : ctrl;
|
|
9506
9506
|
}
|
|
9507
9507
|
exports.visit = visit;
|
|
9508
9508
|
}
|
|
@@ -10582,18 +10582,18 @@ var require_parser2 = __commonJS({
|
|
|
10582
10582
|
if (this.type === "map-value-ind") {
|
|
10583
10583
|
const prev = getPrevProps(this.peek(2));
|
|
10584
10584
|
const start5 = getFirstKeyStartProps(prev);
|
|
10585
|
-
let
|
|
10585
|
+
let sep3;
|
|
10586
10586
|
if (scalar.end) {
|
|
10587
|
-
|
|
10588
|
-
|
|
10587
|
+
sep3 = scalar.end;
|
|
10588
|
+
sep3.push(this.sourceToken);
|
|
10589
10589
|
delete scalar.end;
|
|
10590
10590
|
} else
|
|
10591
|
-
|
|
10591
|
+
sep3 = [this.sourceToken];
|
|
10592
10592
|
const map35 = {
|
|
10593
10593
|
type: "block-map",
|
|
10594
10594
|
offset: scalar.offset,
|
|
10595
10595
|
indent: scalar.indent,
|
|
10596
|
-
items: [{ start: start5, key: scalar, sep:
|
|
10596
|
+
items: [{ start: start5, key: scalar, sep: sep3 }]
|
|
10597
10597
|
};
|
|
10598
10598
|
this.onKeyLine = true;
|
|
10599
10599
|
this.stack[this.stack.length - 1] = map35;
|
|
@@ -10746,15 +10746,15 @@ var require_parser2 = __commonJS({
|
|
|
10746
10746
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
10747
10747
|
const start6 = getFirstKeyStartProps(it.start);
|
|
10748
10748
|
const key = it.key;
|
|
10749
|
-
const
|
|
10750
|
-
|
|
10749
|
+
const sep3 = it.sep;
|
|
10750
|
+
sep3.push(this.sourceToken);
|
|
10751
10751
|
delete it.key;
|
|
10752
10752
|
delete it.sep;
|
|
10753
10753
|
this.stack.push({
|
|
10754
10754
|
type: "block-map",
|
|
10755
10755
|
offset: this.offset,
|
|
10756
10756
|
indent: this.indent,
|
|
10757
|
-
items: [{ start: start6, key, sep:
|
|
10757
|
+
items: [{ start: start6, key, sep: sep3 }]
|
|
10758
10758
|
});
|
|
10759
10759
|
} else if (start5.length > 0) {
|
|
10760
10760
|
it.sep = it.sep.concat(start5, this.sourceToken);
|
|
@@ -10948,13 +10948,13 @@ var require_parser2 = __commonJS({
|
|
|
10948
10948
|
const prev = getPrevProps(parent);
|
|
10949
10949
|
const start5 = getFirstKeyStartProps(prev);
|
|
10950
10950
|
fixFlowSeqItems(fc);
|
|
10951
|
-
const
|
|
10952
|
-
|
|
10951
|
+
const sep3 = fc.end.splice(1, fc.end.length);
|
|
10952
|
+
sep3.push(this.sourceToken);
|
|
10953
10953
|
const map35 = {
|
|
10954
10954
|
type: "block-map",
|
|
10955
10955
|
offset: fc.offset,
|
|
10956
10956
|
indent: fc.indent,
|
|
10957
|
-
items: [{ start: start5, key: fc, sep:
|
|
10957
|
+
items: [{ start: start5, key: fc, sep: sep3 }]
|
|
10958
10958
|
};
|
|
10959
10959
|
this.onKeyLine = true;
|
|
10960
10960
|
this.stack[this.stack.length - 1] = map35;
|
|
@@ -13633,9 +13633,9 @@ var require_prompts = __commonJS({
|
|
|
13633
13633
|
$.date = (args2) => toPrompt("DatePrompt", args2);
|
|
13634
13634
|
$.confirm = (args2) => toPrompt("ConfirmPrompt", args2);
|
|
13635
13635
|
$.list = (args2) => {
|
|
13636
|
-
const
|
|
13636
|
+
const sep3 = args2.separator || ",";
|
|
13637
13637
|
return toPrompt("TextPrompt", args2, {
|
|
13638
|
-
onSubmit: (str) => str.split(
|
|
13638
|
+
onSubmit: (str) => str.split(sep3).map((s) => s.trim())
|
|
13639
13639
|
});
|
|
13640
13640
|
};
|
|
13641
13641
|
$.toggle = (args2) => toPrompt("TogglePrompt", args2);
|
|
@@ -15895,9 +15895,9 @@ var require_prompts2 = __commonJS({
|
|
|
15895
15895
|
$.date = (args2) => toPrompt("DatePrompt", args2);
|
|
15896
15896
|
$.confirm = (args2) => toPrompt("ConfirmPrompt", args2);
|
|
15897
15897
|
$.list = (args2) => {
|
|
15898
|
-
const
|
|
15898
|
+
const sep3 = args2.separator || ",";
|
|
15899
15899
|
return toPrompt("TextPrompt", args2, {
|
|
15900
|
-
onSubmit: (str) => str.split(
|
|
15900
|
+
onSubmit: (str) => str.split(sep3).map((s) => s.trim())
|
|
15901
15901
|
});
|
|
15902
15902
|
};
|
|
15903
15903
|
$.toggle = (args2) => toPrompt("TogglePrompt", args2);
|
|
@@ -16925,14 +16925,14 @@ var require_util3 = __commonJS({
|
|
|
16925
16925
|
}
|
|
16926
16926
|
const port2 = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80;
|
|
16927
16927
|
let origin = url2.origin != null ? url2.origin : `${url2.protocol || ""}//${url2.hostname || ""}:${port2}`;
|
|
16928
|
-
let
|
|
16928
|
+
let path7 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`;
|
|
16929
16929
|
if (origin[origin.length - 1] === "/") {
|
|
16930
16930
|
origin = origin.slice(0, origin.length - 1);
|
|
16931
16931
|
}
|
|
16932
|
-
if (
|
|
16933
|
-
|
|
16932
|
+
if (path7 && path7[0] !== "/") {
|
|
16933
|
+
path7 = `/${path7}`;
|
|
16934
16934
|
}
|
|
16935
|
-
return new URL(`${origin}${
|
|
16935
|
+
return new URL(`${origin}${path7}`);
|
|
16936
16936
|
}
|
|
16937
16937
|
if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) {
|
|
16938
16938
|
throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`.");
|
|
@@ -17478,9 +17478,9 @@ var require_diagnostics = __commonJS({
|
|
|
17478
17478
|
"undici:client:sendHeaders",
|
|
17479
17479
|
(evt) => {
|
|
17480
17480
|
const {
|
|
17481
|
-
request: { method, path:
|
|
17481
|
+
request: { method, path: path7, origin }
|
|
17482
17482
|
} = evt;
|
|
17483
|
-
debugLog("sending request to %s %s%s", method, origin,
|
|
17483
|
+
debugLog("sending request to %s %s%s", method, origin, path7);
|
|
17484
17484
|
}
|
|
17485
17485
|
);
|
|
17486
17486
|
}
|
|
@@ -17494,14 +17494,14 @@ var require_diagnostics = __commonJS({
|
|
|
17494
17494
|
"undici:request:headers",
|
|
17495
17495
|
(evt) => {
|
|
17496
17496
|
const {
|
|
17497
|
-
request: { method, path:
|
|
17497
|
+
request: { method, path: path7, origin },
|
|
17498
17498
|
response: { statusCode }
|
|
17499
17499
|
} = evt;
|
|
17500
17500
|
debugLog(
|
|
17501
17501
|
"received response to %s %s%s - HTTP %d",
|
|
17502
17502
|
method,
|
|
17503
17503
|
origin,
|
|
17504
|
-
|
|
17504
|
+
path7,
|
|
17505
17505
|
statusCode
|
|
17506
17506
|
);
|
|
17507
17507
|
}
|
|
@@ -17510,23 +17510,23 @@ var require_diagnostics = __commonJS({
|
|
|
17510
17510
|
"undici:request:trailers",
|
|
17511
17511
|
(evt) => {
|
|
17512
17512
|
const {
|
|
17513
|
-
request: { method, path:
|
|
17513
|
+
request: { method, path: path7, origin }
|
|
17514
17514
|
} = evt;
|
|
17515
|
-
debugLog("trailers received from %s %s%s", method, origin,
|
|
17515
|
+
debugLog("trailers received from %s %s%s", method, origin, path7);
|
|
17516
17516
|
}
|
|
17517
17517
|
);
|
|
17518
17518
|
diagnosticsChannel.subscribe(
|
|
17519
17519
|
"undici:request:error",
|
|
17520
17520
|
(evt) => {
|
|
17521
17521
|
const {
|
|
17522
|
-
request: { method, path:
|
|
17522
|
+
request: { method, path: path7, origin },
|
|
17523
17523
|
error: error4
|
|
17524
17524
|
} = evt;
|
|
17525
17525
|
debugLog(
|
|
17526
17526
|
"request to %s %s%s errored - %s",
|
|
17527
17527
|
method,
|
|
17528
17528
|
origin,
|
|
17529
|
-
|
|
17529
|
+
path7,
|
|
17530
17530
|
error4.message
|
|
17531
17531
|
);
|
|
17532
17532
|
}
|
|
@@ -17620,7 +17620,7 @@ var require_request = __commonJS({
|
|
|
17620
17620
|
var kHandler = Symbol("handler");
|
|
17621
17621
|
var Request = class {
|
|
17622
17622
|
constructor(origin, {
|
|
17623
|
-
path:
|
|
17623
|
+
path: path7,
|
|
17624
17624
|
method,
|
|
17625
17625
|
body,
|
|
17626
17626
|
headers,
|
|
@@ -17636,11 +17636,11 @@ var require_request = __commonJS({
|
|
|
17636
17636
|
throwOnError,
|
|
17637
17637
|
maxRedirections
|
|
17638
17638
|
}, handler) {
|
|
17639
|
-
if (typeof
|
|
17639
|
+
if (typeof path7 !== "string") {
|
|
17640
17640
|
throw new InvalidArgumentError("path must be a string");
|
|
17641
|
-
} else if (
|
|
17641
|
+
} else if (path7[0] !== "/" && !(path7.startsWith("http://") || path7.startsWith("https://")) && method !== "CONNECT") {
|
|
17642
17642
|
throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
|
|
17643
|
-
} else if (invalidPathRegex.test(
|
|
17643
|
+
} else if (invalidPathRegex.test(path7)) {
|
|
17644
17644
|
throw new InvalidArgumentError("invalid request path");
|
|
17645
17645
|
}
|
|
17646
17646
|
if (typeof method !== "string") {
|
|
@@ -17708,7 +17708,7 @@ var require_request = __commonJS({
|
|
|
17708
17708
|
this.completed = false;
|
|
17709
17709
|
this.aborted = false;
|
|
17710
17710
|
this.upgrade = upgrade || null;
|
|
17711
|
-
this.path = query ? serializePathWithQuery(
|
|
17711
|
+
this.path = query ? serializePathWithQuery(path7, query) : path7;
|
|
17712
17712
|
this.origin = origin;
|
|
17713
17713
|
this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
|
|
17714
17714
|
this.blocking = blocking ?? this.method !== "HEAD";
|
|
@@ -22451,7 +22451,7 @@ var require_client_h1 = __commonJS({
|
|
|
22451
22451
|
return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT";
|
|
22452
22452
|
}
|
|
22453
22453
|
function writeH1(client, request2) {
|
|
22454
|
-
const { method, path:
|
|
22454
|
+
const { method, path: path7, host, upgrade, blocking, reset: reset2 } = request2;
|
|
22455
22455
|
let { body, headers, contentLength } = request2;
|
|
22456
22456
|
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
|
|
22457
22457
|
if (util.isFormDataLike(body)) {
|
|
@@ -22517,7 +22517,7 @@ var require_client_h1 = __commonJS({
|
|
|
22517
22517
|
if (blocking) {
|
|
22518
22518
|
socket[kBlocking] = true;
|
|
22519
22519
|
}
|
|
22520
|
-
let header = `${method} ${
|
|
22520
|
+
let header = `${method} ${path7} HTTP/1.1\r
|
|
22521
22521
|
`;
|
|
22522
22522
|
if (typeof host === "string") {
|
|
22523
22523
|
header += `host: ${host}\r
|
|
@@ -23073,7 +23073,7 @@ var require_client_h2 = __commonJS({
|
|
|
23073
23073
|
function writeH2(client, request2) {
|
|
23074
23074
|
const requestTimeout = request2.bodyTimeout ?? client[kBodyTimeout];
|
|
23075
23075
|
const session = client[kHTTP2Session];
|
|
23076
|
-
const { method, path:
|
|
23076
|
+
const { method, path: path7, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2;
|
|
23077
23077
|
let { body } = request2;
|
|
23078
23078
|
if (upgrade) {
|
|
23079
23079
|
util.errorRequest(client, request2, new Error("Upgrade not supported for H2"));
|
|
@@ -23144,7 +23144,7 @@ var require_client_h2 = __commonJS({
|
|
|
23144
23144
|
stream4.setTimeout(requestTimeout);
|
|
23145
23145
|
return true;
|
|
23146
23146
|
}
|
|
23147
|
-
headers[HTTP2_HEADER_PATH] =
|
|
23147
|
+
headers[HTTP2_HEADER_PATH] = path7;
|
|
23148
23148
|
headers[HTTP2_HEADER_SCHEME] = "https";
|
|
23149
23149
|
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
|
|
23150
23150
|
if (body && typeof body.read === "function") {
|
|
@@ -24583,10 +24583,10 @@ var require_proxy_agent = __commonJS({
|
|
|
24583
24583
|
};
|
|
24584
24584
|
const {
|
|
24585
24585
|
origin,
|
|
24586
|
-
path:
|
|
24586
|
+
path: path7 = "/",
|
|
24587
24587
|
headers = {}
|
|
24588
24588
|
} = opts;
|
|
24589
|
-
opts.path = origin +
|
|
24589
|
+
opts.path = origin + path7;
|
|
24590
24590
|
if (!("host" in headers) && !("Host" in headers)) {
|
|
24591
24591
|
const { host } = new URL2(origin);
|
|
24592
24592
|
headers.host = host;
|
|
@@ -26640,20 +26640,20 @@ var require_mock_utils = __commonJS({
|
|
|
26640
26640
|
}
|
|
26641
26641
|
return normalizedQp;
|
|
26642
26642
|
}
|
|
26643
|
-
function safeUrl(
|
|
26644
|
-
if (typeof
|
|
26645
|
-
return
|
|
26643
|
+
function safeUrl(path7) {
|
|
26644
|
+
if (typeof path7 !== "string") {
|
|
26645
|
+
return path7;
|
|
26646
26646
|
}
|
|
26647
|
-
const pathSegments =
|
|
26647
|
+
const pathSegments = path7.split("?", 3);
|
|
26648
26648
|
if (pathSegments.length !== 2) {
|
|
26649
|
-
return
|
|
26649
|
+
return path7;
|
|
26650
26650
|
}
|
|
26651
26651
|
const qp = new URLSearchParams(pathSegments.pop());
|
|
26652
26652
|
qp.sort();
|
|
26653
26653
|
return [...pathSegments, qp.toString()].join("?");
|
|
26654
26654
|
}
|
|
26655
|
-
function matchKey(mockDispatch2, { path:
|
|
26656
|
-
const pathMatch = matchValue(mockDispatch2.path,
|
|
26655
|
+
function matchKey(mockDispatch2, { path: path7, method, body, headers }) {
|
|
26656
|
+
const pathMatch = matchValue(mockDispatch2.path, path7);
|
|
26657
26657
|
const methodMatch = matchValue(mockDispatch2.method, method);
|
|
26658
26658
|
const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
|
|
26659
26659
|
const headersMatch = matchHeaders(mockDispatch2, headers);
|
|
@@ -26678,8 +26678,8 @@ var require_mock_utils = __commonJS({
|
|
|
26678
26678
|
const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path;
|
|
26679
26679
|
const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
|
|
26680
26680
|
const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath);
|
|
26681
|
-
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path:
|
|
26682
|
-
return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(
|
|
26681
|
+
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path7, ignoreTrailingSlash }) => {
|
|
26682
|
+
return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(path7)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path7), resolvedPath);
|
|
26683
26683
|
});
|
|
26684
26684
|
if (matchedMockDispatches.length === 0) {
|
|
26685
26685
|
throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
|
|
@@ -26717,19 +26717,19 @@ var require_mock_utils = __commonJS({
|
|
|
26717
26717
|
mockDispatches.splice(index, 1);
|
|
26718
26718
|
}
|
|
26719
26719
|
}
|
|
26720
|
-
function removeTrailingSlash(
|
|
26721
|
-
while (
|
|
26722
|
-
|
|
26720
|
+
function removeTrailingSlash(path7) {
|
|
26721
|
+
while (path7.endsWith("/")) {
|
|
26722
|
+
path7 = path7.slice(0, -1);
|
|
26723
26723
|
}
|
|
26724
|
-
if (
|
|
26725
|
-
|
|
26724
|
+
if (path7.length === 0) {
|
|
26725
|
+
path7 = "/";
|
|
26726
26726
|
}
|
|
26727
|
-
return
|
|
26727
|
+
return path7;
|
|
26728
26728
|
}
|
|
26729
26729
|
function buildKey(opts) {
|
|
26730
|
-
const { path:
|
|
26730
|
+
const { path: path7, method, body, headers, query } = opts;
|
|
26731
26731
|
return {
|
|
26732
|
-
path:
|
|
26732
|
+
path: path7,
|
|
26733
26733
|
method,
|
|
26734
26734
|
body,
|
|
26735
26735
|
headers,
|
|
@@ -27362,7 +27362,7 @@ var require_mock_pool = __commonJS({
|
|
|
27362
27362
|
var require_pending_interceptors_formatter = __commonJS({
|
|
27363
27363
|
"node_modules/.pnpm/undici@7.13.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports, module) {
|
|
27364
27364
|
var { Transform } = __require("stream");
|
|
27365
|
-
var { Console:
|
|
27365
|
+
var { Console: Console3 } = __require("console");
|
|
27366
27366
|
var PERSISTENT = process.versions.icu ? "\u2705" : "Y ";
|
|
27367
27367
|
var NOT_PERSISTENT = process.versions.icu ? "\u274C" : "N ";
|
|
27368
27368
|
module.exports = class PendingInterceptorsFormatter {
|
|
@@ -27372,7 +27372,7 @@ var require_pending_interceptors_formatter = __commonJS({
|
|
|
27372
27372
|
cb(null, chunk4);
|
|
27373
27373
|
}
|
|
27374
27374
|
});
|
|
27375
|
-
this.logger = new
|
|
27375
|
+
this.logger = new Console3({
|
|
27376
27376
|
stdout: this.transform,
|
|
27377
27377
|
inspectOptions: {
|
|
27378
27378
|
colors: !disableColors && !process.env.CI
|
|
@@ -27381,10 +27381,10 @@ var require_pending_interceptors_formatter = __commonJS({
|
|
|
27381
27381
|
}
|
|
27382
27382
|
format(pendingInterceptors) {
|
|
27383
27383
|
const withPrettyHeaders = pendingInterceptors.map(
|
|
27384
|
-
({ method, path:
|
|
27384
|
+
({ method, path: path7, data: { statusCode }, persist, times: times2, timesInvoked, origin }) => ({
|
|
27385
27385
|
Method: method,
|
|
27386
27386
|
Origin: origin,
|
|
27387
|
-
Path:
|
|
27387
|
+
Path: path7,
|
|
27388
27388
|
"Status code": statusCode,
|
|
27389
27389
|
Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
|
|
27390
27390
|
Invocations: timesInvoked,
|
|
@@ -27463,9 +27463,9 @@ var require_mock_agent = __commonJS({
|
|
|
27463
27463
|
const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters];
|
|
27464
27464
|
const dispatchOpts = { ...opts };
|
|
27465
27465
|
if (acceptNonStandardSearchParameters && dispatchOpts.path) {
|
|
27466
|
-
const [
|
|
27466
|
+
const [path7, searchParams] = dispatchOpts.path.split("?");
|
|
27467
27467
|
const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters);
|
|
27468
|
-
dispatchOpts.path = `${
|
|
27468
|
+
dispatchOpts.path = `${path7}?${normalizedSearchParams}`;
|
|
27469
27469
|
}
|
|
27470
27470
|
return this[kAgent].dispatch(dispatchOpts, handler);
|
|
27471
27471
|
}
|
|
@@ -27803,12 +27803,12 @@ var require_snapshot_recorder = __commonJS({
|
|
|
27803
27803
|
* Loads snapshots from file
|
|
27804
27804
|
*/
|
|
27805
27805
|
async loadSnapshots(filePath) {
|
|
27806
|
-
const
|
|
27807
|
-
if (!
|
|
27806
|
+
const path7 = filePath || this.snapshotPath;
|
|
27807
|
+
if (!path7) {
|
|
27808
27808
|
throw new InvalidArgumentError("Snapshot path is required");
|
|
27809
27809
|
}
|
|
27810
27810
|
try {
|
|
27811
|
-
const data = await readFile3(resolve4(
|
|
27811
|
+
const data = await readFile3(resolve4(path7), "utf8");
|
|
27812
27812
|
const parsed = JSON.parse(data);
|
|
27813
27813
|
if (Array.isArray(parsed)) {
|
|
27814
27814
|
this.snapshots.clear();
|
|
@@ -27824,7 +27824,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
27824
27824
|
this.snapshots.clear();
|
|
27825
27825
|
this.loaded = true;
|
|
27826
27826
|
} else {
|
|
27827
|
-
throw new UndiciError(`Failed to load snapshots from ${
|
|
27827
|
+
throw new UndiciError(`Failed to load snapshots from ${path7}`, { cause: error4 });
|
|
27828
27828
|
}
|
|
27829
27829
|
}
|
|
27830
27830
|
}
|
|
@@ -27832,11 +27832,11 @@ var require_snapshot_recorder = __commonJS({
|
|
|
27832
27832
|
* Saves snapshots to file
|
|
27833
27833
|
*/
|
|
27834
27834
|
async saveSnapshots(filePath) {
|
|
27835
|
-
const
|
|
27836
|
-
if (!
|
|
27835
|
+
const path7 = filePath || this.snapshotPath;
|
|
27836
|
+
if (!path7) {
|
|
27837
27837
|
throw new InvalidArgumentError("Snapshot path is required");
|
|
27838
27838
|
}
|
|
27839
|
-
const resolvedPath = resolve4(
|
|
27839
|
+
const resolvedPath = resolve4(path7);
|
|
27840
27840
|
await mkdir2(dirname2(resolvedPath), { recursive: true });
|
|
27841
27841
|
const data = Array.from(this.snapshots.entries()).map(([hash2, snapshot]) => ({
|
|
27842
27842
|
hash: hash2,
|
|
@@ -28413,15 +28413,15 @@ var require_redirect_handler = __commonJS({
|
|
|
28413
28413
|
return;
|
|
28414
28414
|
}
|
|
28415
28415
|
const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
|
|
28416
|
-
const
|
|
28417
|
-
const redirectUrlString = `${origin}${
|
|
28416
|
+
const path7 = search ? `${pathname}${search}` : pathname;
|
|
28417
|
+
const redirectUrlString = `${origin}${path7}`;
|
|
28418
28418
|
for (const historyUrl of this.history) {
|
|
28419
28419
|
if (historyUrl.toString() === redirectUrlString) {
|
|
28420
28420
|
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.`);
|
|
28421
28421
|
}
|
|
28422
28422
|
}
|
|
28423
28423
|
this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
|
|
28424
|
-
this.opts.path =
|
|
28424
|
+
this.opts.path = path7;
|
|
28425
28425
|
this.opts.origin = origin;
|
|
28426
28426
|
this.opts.query = null;
|
|
28427
28427
|
}
|
|
@@ -32349,7 +32349,7 @@ var require_fetch = __commonJS({
|
|
|
32349
32349
|
function handleFetchDone(response) {
|
|
32350
32350
|
finalizeAndReportTiming(response, "fetch");
|
|
32351
32351
|
}
|
|
32352
|
-
function
|
|
32352
|
+
function fetch2(input, init = void 0) {
|
|
32353
32353
|
webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch");
|
|
32354
32354
|
let p3 = createDeferredPromise();
|
|
32355
32355
|
let requestObject;
|
|
@@ -33279,7 +33279,7 @@ var require_fetch = __commonJS({
|
|
|
33279
33279
|
}
|
|
33280
33280
|
}
|
|
33281
33281
|
module.exports = {
|
|
33282
|
-
fetch,
|
|
33282
|
+
fetch: fetch2,
|
|
33283
33283
|
Fetch,
|
|
33284
33284
|
fetching,
|
|
33285
33285
|
finalizeAndReportTiming
|
|
@@ -34045,9 +34045,9 @@ var require_util6 = __commonJS({
|
|
|
34045
34045
|
}
|
|
34046
34046
|
}
|
|
34047
34047
|
}
|
|
34048
|
-
function validateCookiePath(
|
|
34049
|
-
for (let i = 0; i <
|
|
34050
|
-
const code2 =
|
|
34048
|
+
function validateCookiePath(path7) {
|
|
34049
|
+
for (let i = 0; i < path7.length; ++i) {
|
|
34050
|
+
const code2 = path7.charCodeAt(i);
|
|
34051
34051
|
if (code2 < 32 || // exclude CTLs (0-31)
|
|
34052
34052
|
code2 === 127 || // DEL
|
|
34053
34053
|
code2 === 59) {
|
|
@@ -37104,11 +37104,11 @@ var require_undici = __commonJS({
|
|
|
37104
37104
|
if (typeof opts.path !== "string") {
|
|
37105
37105
|
throw new InvalidArgumentError("invalid opts.path");
|
|
37106
37106
|
}
|
|
37107
|
-
let
|
|
37107
|
+
let path7 = opts.path;
|
|
37108
37108
|
if (!opts.path.startsWith("/")) {
|
|
37109
|
-
|
|
37109
|
+
path7 = `/${path7}`;
|
|
37110
37110
|
}
|
|
37111
|
-
url2 = new URL(util.parseOrigin(url2).origin +
|
|
37111
|
+
url2 = new URL(util.parseOrigin(url2).origin + path7);
|
|
37112
37112
|
} else {
|
|
37113
37113
|
if (!opts) {
|
|
37114
37114
|
opts = typeof url2 === "object" ? url2 : {};
|
|
@@ -37130,7 +37130,7 @@ var require_undici = __commonJS({
|
|
|
37130
37130
|
module.exports.setGlobalDispatcher = setGlobalDispatcher;
|
|
37131
37131
|
module.exports.getGlobalDispatcher = getGlobalDispatcher;
|
|
37132
37132
|
var fetchImpl = require_fetch().fetch;
|
|
37133
|
-
module.exports.fetch = async function
|
|
37133
|
+
module.exports.fetch = async function fetch2(init, options3 = void 0) {
|
|
37134
37134
|
try {
|
|
37135
37135
|
return await fetchImpl(init, options3);
|
|
37136
37136
|
} catch (err) {
|
|
@@ -38676,7 +38676,7 @@ var dedupeWith = /* @__PURE__ */ dual(2, (self, isEquivalent) => {
|
|
|
38676
38676
|
return [];
|
|
38677
38677
|
});
|
|
38678
38678
|
var dedupe = (self) => dedupeWith(self, equivalence());
|
|
38679
|
-
var join = /* @__PURE__ */ dual(2, (self,
|
|
38679
|
+
var join = /* @__PURE__ */ dual(2, (self, sep3) => fromIterable2(self).join(sep3));
|
|
38680
38680
|
|
|
38681
38681
|
// node_modules/.pnpm/effect@3.17.7/node_modules/effect/dist/esm/Chunk.js
|
|
38682
38682
|
var TypeId4 = /* @__PURE__ */ Symbol.for("effect/Chunk");
|
|
@@ -43365,67 +43365,67 @@ var Or = (self, that) => {
|
|
|
43365
43365
|
});
|
|
43366
43366
|
return error4;
|
|
43367
43367
|
};
|
|
43368
|
-
var InvalidData = (
|
|
43368
|
+
var InvalidData = (path7, message, options3 = {
|
|
43369
43369
|
pathDelim: "."
|
|
43370
43370
|
}) => {
|
|
43371
43371
|
const error4 = Object.create(proto2);
|
|
43372
43372
|
error4._op = OP_INVALID_DATA;
|
|
43373
|
-
error4.path =
|
|
43373
|
+
error4.path = path7;
|
|
43374
43374
|
error4.message = message;
|
|
43375
43375
|
Object.defineProperty(error4, "toString", {
|
|
43376
43376
|
enumerable: false,
|
|
43377
43377
|
value() {
|
|
43378
|
-
const
|
|
43379
|
-
return `(Invalid data at ${
|
|
43378
|
+
const path8 = pipe(this.path, join(options3.pathDelim));
|
|
43379
|
+
return `(Invalid data at ${path8}: "${this.message}")`;
|
|
43380
43380
|
}
|
|
43381
43381
|
});
|
|
43382
43382
|
return error4;
|
|
43383
43383
|
};
|
|
43384
|
-
var MissingData = (
|
|
43384
|
+
var MissingData = (path7, message, options3 = {
|
|
43385
43385
|
pathDelim: "."
|
|
43386
43386
|
}) => {
|
|
43387
43387
|
const error4 = Object.create(proto2);
|
|
43388
43388
|
error4._op = OP_MISSING_DATA;
|
|
43389
|
-
error4.path =
|
|
43389
|
+
error4.path = path7;
|
|
43390
43390
|
error4.message = message;
|
|
43391
43391
|
Object.defineProperty(error4, "toString", {
|
|
43392
43392
|
enumerable: false,
|
|
43393
43393
|
value() {
|
|
43394
|
-
const
|
|
43395
|
-
return `(Missing data at ${
|
|
43394
|
+
const path8 = pipe(this.path, join(options3.pathDelim));
|
|
43395
|
+
return `(Missing data at ${path8}: "${this.message}")`;
|
|
43396
43396
|
}
|
|
43397
43397
|
});
|
|
43398
43398
|
return error4;
|
|
43399
43399
|
};
|
|
43400
|
-
var SourceUnavailable = (
|
|
43400
|
+
var SourceUnavailable = (path7, message, cause3, options3 = {
|
|
43401
43401
|
pathDelim: "."
|
|
43402
43402
|
}) => {
|
|
43403
43403
|
const error4 = Object.create(proto2);
|
|
43404
43404
|
error4._op = OP_SOURCE_UNAVAILABLE;
|
|
43405
|
-
error4.path =
|
|
43405
|
+
error4.path = path7;
|
|
43406
43406
|
error4.message = message;
|
|
43407
43407
|
error4.cause = cause3;
|
|
43408
43408
|
Object.defineProperty(error4, "toString", {
|
|
43409
43409
|
enumerable: false,
|
|
43410
43410
|
value() {
|
|
43411
|
-
const
|
|
43412
|
-
return `(Source unavailable at ${
|
|
43411
|
+
const path8 = pipe(this.path, join(options3.pathDelim));
|
|
43412
|
+
return `(Source unavailable at ${path8}: "${this.message}")`;
|
|
43413
43413
|
}
|
|
43414
43414
|
});
|
|
43415
43415
|
return error4;
|
|
43416
43416
|
};
|
|
43417
|
-
var Unsupported = (
|
|
43417
|
+
var Unsupported = (path7, message, options3 = {
|
|
43418
43418
|
pathDelim: "."
|
|
43419
43419
|
}) => {
|
|
43420
43420
|
const error4 = Object.create(proto2);
|
|
43421
43421
|
error4._op = OP_UNSUPPORTED;
|
|
43422
|
-
error4.path =
|
|
43422
|
+
error4.path = path7;
|
|
43423
43423
|
error4.message = message;
|
|
43424
43424
|
Object.defineProperty(error4, "toString", {
|
|
43425
43425
|
enumerable: false,
|
|
43426
43426
|
value() {
|
|
43427
|
-
const
|
|
43428
|
-
return `(Unsupported operation at ${
|
|
43427
|
+
const path8 = pipe(this.path, join(options3.pathDelim));
|
|
43428
|
+
return `(Unsupported operation at ${path8}: "${this.message}")`;
|
|
43429
43429
|
}
|
|
43430
43430
|
});
|
|
43431
43431
|
return error4;
|
|
@@ -43541,9 +43541,9 @@ var isMissingDataOnly = (self) => reduceWithContext2(self, void 0, IsMissingData
|
|
|
43541
43541
|
var empty18 = {
|
|
43542
43542
|
_tag: "Empty"
|
|
43543
43543
|
};
|
|
43544
|
-
var patch5 = /* @__PURE__ */ dual(2, (
|
|
43544
|
+
var patch5 = /* @__PURE__ */ dual(2, (path7, patch9) => {
|
|
43545
43545
|
let input = of3(patch9);
|
|
43546
|
-
let output =
|
|
43546
|
+
let output = path7;
|
|
43547
43547
|
while (isCons(input)) {
|
|
43548
43548
|
const patch10 = input.head;
|
|
43549
43549
|
switch (patch10._tag) {
|
|
@@ -43610,7 +43610,7 @@ var make21 = (options3) => ({
|
|
|
43610
43610
|
var makeFlat = (options3) => ({
|
|
43611
43611
|
[FlatConfigProviderTypeId]: FlatConfigProviderTypeId,
|
|
43612
43612
|
patch: options3.patch,
|
|
43613
|
-
load: (
|
|
43613
|
+
load: (path7, config2, split2 = true) => options3.load(path7, config2, split2),
|
|
43614
43614
|
enumerateChildren: options3.enumerateChildren
|
|
43615
43615
|
});
|
|
43616
43616
|
var fromFlat = (flat) => make21({
|
|
@@ -43628,29 +43628,29 @@ var fromEnv = (options3) => {
|
|
|
43628
43628
|
pathDelim: "_",
|
|
43629
43629
|
seqDelim: ","
|
|
43630
43630
|
}, options3);
|
|
43631
|
-
const makePathString = (
|
|
43631
|
+
const makePathString = (path7) => pipe(path7, join(pathDelim));
|
|
43632
43632
|
const unmakePathString = (pathString) => pathString.split(pathDelim);
|
|
43633
43633
|
const getEnv = () => typeof process !== "undefined" && "env" in process && typeof process.env === "object" ? process.env : {};
|
|
43634
|
-
const load = (
|
|
43635
|
-
const pathString = makePathString(
|
|
43634
|
+
const load = (path7, primitive2, split2 = true) => {
|
|
43635
|
+
const pathString = makePathString(path7);
|
|
43636
43636
|
const current = getEnv();
|
|
43637
43637
|
const valueOpt = pathString in current ? some2(current[pathString]) : none2();
|
|
43638
|
-
return pipe(valueOpt, mapError(() => MissingData(
|
|
43638
|
+
return pipe(valueOpt, mapError(() => MissingData(path7, `Expected ${pathString} to exist in the process context`)), flatMap7((value5) => parsePrimitive(value5, path7, primitive2, seqDelim, split2)));
|
|
43639
43639
|
};
|
|
43640
|
-
const enumerateChildren = (
|
|
43640
|
+
const enumerateChildren = (path7) => sync(() => {
|
|
43641
43641
|
const current = getEnv();
|
|
43642
43642
|
const keys5 = Object.keys(current);
|
|
43643
43643
|
const keyPaths = keys5.map((value5) => unmakePathString(value5.toUpperCase()));
|
|
43644
43644
|
const filteredKeyPaths = keyPaths.filter((keyPath) => {
|
|
43645
|
-
for (let i = 0; i <
|
|
43646
|
-
const pathComponent = pipe(
|
|
43645
|
+
for (let i = 0; i < path7.length; i++) {
|
|
43646
|
+
const pathComponent = pipe(path7, unsafeGet(i));
|
|
43647
43647
|
const currentElement = keyPath[i];
|
|
43648
43648
|
if (currentElement === void 0 || pathComponent !== currentElement) {
|
|
43649
43649
|
return false;
|
|
43650
43650
|
}
|
|
43651
43651
|
}
|
|
43652
43652
|
return true;
|
|
43653
|
-
}).flatMap((keyPath) => keyPath.slice(
|
|
43653
|
+
}).flatMap((keyPath) => keyPath.slice(path7.length, path7.length + 1));
|
|
43654
43654
|
return fromIterable6(filteredKeyPaths);
|
|
43655
43655
|
});
|
|
43656
43656
|
return fromFlat(makeFlat({
|
|
@@ -43666,17 +43666,17 @@ var extend = (leftDef, rightDef, left3, right3) => {
|
|
|
43666
43666
|
const rightExtension = concat(right3, rightPad);
|
|
43667
43667
|
return [leftExtension, rightExtension];
|
|
43668
43668
|
};
|
|
43669
|
-
var appendConfigPath = (
|
|
43669
|
+
var appendConfigPath = (path7, config2) => {
|
|
43670
43670
|
let op = config2;
|
|
43671
43671
|
if (op._tag === "Nested") {
|
|
43672
|
-
const out =
|
|
43672
|
+
const out = path7.slice();
|
|
43673
43673
|
while (op._tag === "Nested") {
|
|
43674
43674
|
out.push(op.name);
|
|
43675
43675
|
op = op.config;
|
|
43676
43676
|
}
|
|
43677
43677
|
return out;
|
|
43678
43678
|
}
|
|
43679
|
-
return
|
|
43679
|
+
return path7;
|
|
43680
43680
|
};
|
|
43681
43681
|
var fromFlatLoop = (flat, prefix, config2, split2) => {
|
|
43682
43682
|
const op = config2;
|
|
@@ -43752,8 +43752,8 @@ var fromFlatLoop = (flat, prefix, config2, split2) => {
|
|
|
43752
43752
|
return fail2(right3.left);
|
|
43753
43753
|
}
|
|
43754
43754
|
if (isRight2(left3) && isRight2(right3)) {
|
|
43755
|
-
const
|
|
43756
|
-
const fail19 = fromFlatLoopFail(prefix,
|
|
43755
|
+
const path7 = pipe(prefix, join("."));
|
|
43756
|
+
const fail19 = fromFlatLoopFail(prefix, path7);
|
|
43757
43757
|
const [lefts, rights] = extend(fail19, fail19, pipe(left3.right, map3(right2)), pipe(right3.right, map3(right2)));
|
|
43758
43758
|
return pipe(lefts, zip(rights), forEachSequential(([left4, right4]) => pipe(zip2(left4, right4), map10(([left5, right5]) => op.zip(left5, right5)))));
|
|
43759
43759
|
}
|
|
@@ -43762,19 +43762,19 @@ var fromFlatLoop = (flat, prefix, config2, split2) => {
|
|
|
43762
43762
|
}
|
|
43763
43763
|
}
|
|
43764
43764
|
};
|
|
43765
|
-
var fromFlatLoopFail = (prefix,
|
|
43765
|
+
var fromFlatLoopFail = (prefix, path7) => (index) => left2(MissingData(prefix, `The element at index ${index} in a sequence at path "${path7}" was missing`));
|
|
43766
43766
|
var splitPathString = (text11, delim) => {
|
|
43767
43767
|
const split2 = text11.split(new RegExp(`\\s*${escape(delim)}\\s*`));
|
|
43768
43768
|
return split2;
|
|
43769
43769
|
};
|
|
43770
|
-
var parsePrimitive = (text11,
|
|
43770
|
+
var parsePrimitive = (text11, path7, primitive2, delimiter, split2) => {
|
|
43771
43771
|
if (!split2) {
|
|
43772
43772
|
return pipe(primitive2.parse(text11), mapBoth2({
|
|
43773
|
-
onFailure: prefixed(
|
|
43773
|
+
onFailure: prefixed(path7),
|
|
43774
43774
|
onSuccess: of
|
|
43775
43775
|
}));
|
|
43776
43776
|
}
|
|
43777
|
-
return pipe(splitPathString(text11, delimiter), forEachSequential((char4) => primitive2.parse(char4.trim())), mapError(prefixed(
|
|
43777
|
+
return pipe(splitPathString(text11, delimiter), forEachSequential((char4) => primitive2.parse(char4.trim())), mapError(prefixed(path7)));
|
|
43778
43778
|
};
|
|
43779
43779
|
var transpose = (array7) => {
|
|
43780
43780
|
return Object.keys(array7[0]).map((column3) => array7.map((row) => row[column3]));
|
|
@@ -54773,14 +54773,14 @@ var formatPropertyKey = (name) => typeof name === "string" ? JSON.stringify(name
|
|
|
54773
54773
|
var isNonEmpty5 = (x) => Array.isArray(x);
|
|
54774
54774
|
var isSingle = (x) => !Array.isArray(x);
|
|
54775
54775
|
var formatPathKey = (key) => `[${formatPropertyKey(key)}]`;
|
|
54776
|
-
var formatPath = (
|
|
54776
|
+
var formatPath = (path7) => isNonEmpty5(path7) ? path7.map(formatPathKey).join("") : formatPathKey(path7);
|
|
54777
54777
|
|
|
54778
54778
|
// node_modules/.pnpm/effect@3.17.7/node_modules/effect/dist/esm/internal/schema/errors.js
|
|
54779
|
-
var getErrorMessage = (reason, details,
|
|
54779
|
+
var getErrorMessage = (reason, details, path7, ast) => {
|
|
54780
54780
|
let out = reason;
|
|
54781
|
-
if (
|
|
54781
|
+
if (path7 && isNonEmptyReadonlyArray(path7)) {
|
|
54782
54782
|
out += `
|
|
54783
|
-
at path: ${formatPath(
|
|
54783
|
+
at path: ${formatPath(path7)}`;
|
|
54784
54784
|
}
|
|
54785
54785
|
if (details !== void 0) {
|
|
54786
54786
|
out += `
|
|
@@ -54792,7 +54792,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
54792
54792
|
}
|
|
54793
54793
|
return out;
|
|
54794
54794
|
};
|
|
54795
|
-
var getSchemaExtendErrorMessage = (x, y,
|
|
54795
|
+
var getSchemaExtendErrorMessage = (x, y, path7) => getErrorMessage("Unsupported schema or overlapping types", `cannot extend ${x} with ${y}`, path7);
|
|
54796
54796
|
var getASTUnsupportedKeySchemaErrorMessage = (ast) => getErrorMessage("Unsupported key schema", void 0, void 0, ast);
|
|
54797
54797
|
var getASTUnsupportedLiteralErrorMessage = (literal2) => getErrorMessage("Unsupported literal", `literal value: ${formatUnknown(literal2)}`);
|
|
54798
54798
|
var getASTDuplicateIndexSignatureErrorMessage = (type2) => getErrorMessage("Duplicate index signature", `${type2} index signature`);
|
|
@@ -55981,8 +55981,8 @@ var Pointer = class {
|
|
|
55981
55981
|
* @since 3.10.0
|
|
55982
55982
|
*/
|
|
55983
55983
|
_tag = "Pointer";
|
|
55984
|
-
constructor(
|
|
55985
|
-
this.path =
|
|
55984
|
+
constructor(path7, actual, issue) {
|
|
55985
|
+
this.path = path7;
|
|
55986
55986
|
this.actual = actual;
|
|
55987
55987
|
this.issue = issue;
|
|
55988
55988
|
}
|
|
@@ -57472,7 +57472,7 @@ function makeTypeLiteralClass(fields, records, ast = getDefaultTypeLiteralAST(fi
|
|
|
57472
57472
|
function Struct(fields, ...records) {
|
|
57473
57473
|
return makeTypeLiteralClass(fields, records);
|
|
57474
57474
|
}
|
|
57475
|
-
var intersectTypeLiterals = (x, y,
|
|
57475
|
+
var intersectTypeLiterals = (x, y, path7) => {
|
|
57476
57476
|
if (isTypeLiteral(x) && isTypeLiteral(y)) {
|
|
57477
57477
|
const propertySignatures = [...x.propertySignatures];
|
|
57478
57478
|
for (const ps of y.propertySignatures) {
|
|
@@ -57485,18 +57485,18 @@ var intersectTypeLiterals = (x, y, path6) => {
|
|
|
57485
57485
|
isOptional,
|
|
57486
57486
|
type: type2
|
|
57487
57487
|
} = propertySignatures[i];
|
|
57488
|
-
propertySignatures[i] = new PropertySignature(name, extendAST(type2, ps.type,
|
|
57488
|
+
propertySignatures[i] = new PropertySignature(name, extendAST(type2, ps.type, path7.concat(name)), isOptional, true);
|
|
57489
57489
|
}
|
|
57490
57490
|
}
|
|
57491
57491
|
return new TypeLiteral(propertySignatures, x.indexSignatures.concat(y.indexSignatures));
|
|
57492
57492
|
}
|
|
57493
|
-
throw new Error(getSchemaExtendErrorMessage(x, y,
|
|
57493
|
+
throw new Error(getSchemaExtendErrorMessage(x, y, path7));
|
|
57494
57494
|
};
|
|
57495
57495
|
var preserveRefinementAnnotations = /* @__PURE__ */ omitAnnotations([IdentifierAnnotationId]);
|
|
57496
57496
|
var addRefinementToMembers = (refinement, asts) => asts.map((ast) => new Refinement(ast, refinement.filter, preserveRefinementAnnotations(refinement)));
|
|
57497
|
-
var extendAST = (x, y,
|
|
57497
|
+
var extendAST = (x, y, path7) => Union.make(intersectUnionMembers([x], [y], path7));
|
|
57498
57498
|
var getTypes = (ast) => isUnion(ast) ? ast.types : [ast];
|
|
57499
|
-
var intersectUnionMembers = (xs, ys,
|
|
57499
|
+
var intersectUnionMembers = (xs, ys, path7) => flatMap2(xs, (x) => flatMap2(ys, (y) => {
|
|
57500
57500
|
switch (y._tag) {
|
|
57501
57501
|
case "Literal": {
|
|
57502
57502
|
if (isString(y.literal) && isStringKeyword(x) || isNumber(y.literal) && isNumberKeyword(x) || isBoolean(y.literal) && isBooleanKeyword(x)) {
|
|
@@ -57509,7 +57509,7 @@ var intersectUnionMembers = (xs, ys, path6) => flatMap2(xs, (x) => flatMap2(ys,
|
|
|
57509
57509
|
if (isStringKeyword(x) || isLiteral(x) && isString(x.literal)) {
|
|
57510
57510
|
return [x];
|
|
57511
57511
|
} else if (isRefinement(x)) {
|
|
57512
|
-
return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y],
|
|
57512
|
+
return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path7));
|
|
57513
57513
|
}
|
|
57514
57514
|
} else if (x === stringKeyword) {
|
|
57515
57515
|
return [y];
|
|
@@ -57521,7 +57521,7 @@ var intersectUnionMembers = (xs, ys, path6) => flatMap2(xs, (x) => flatMap2(ys,
|
|
|
57521
57521
|
if (isNumberKeyword(x) || isLiteral(x) && isNumber(x.literal)) {
|
|
57522
57522
|
return [x];
|
|
57523
57523
|
} else if (isRefinement(x)) {
|
|
57524
|
-
return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y],
|
|
57524
|
+
return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path7));
|
|
57525
57525
|
}
|
|
57526
57526
|
} else if (x === numberKeyword) {
|
|
57527
57527
|
return [y];
|
|
@@ -57533,7 +57533,7 @@ var intersectUnionMembers = (xs, ys, path6) => flatMap2(xs, (x) => flatMap2(ys,
|
|
|
57533
57533
|
if (isBooleanKeyword(x) || isLiteral(x) && isBoolean(x.literal)) {
|
|
57534
57534
|
return [x];
|
|
57535
57535
|
} else if (isRefinement(x)) {
|
|
57536
|
-
return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y],
|
|
57536
|
+
return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path7));
|
|
57537
57537
|
}
|
|
57538
57538
|
} else if (x === booleanKeyword) {
|
|
57539
57539
|
return [y];
|
|
@@ -57541,25 +57541,25 @@ var intersectUnionMembers = (xs, ys, path6) => flatMap2(xs, (x) => flatMap2(ys,
|
|
|
57541
57541
|
break;
|
|
57542
57542
|
}
|
|
57543
57543
|
case "Union":
|
|
57544
|
-
return intersectUnionMembers(getTypes(x), y.types,
|
|
57544
|
+
return intersectUnionMembers(getTypes(x), y.types, path7);
|
|
57545
57545
|
case "Suspend":
|
|
57546
|
-
return [new Suspend(() => extendAST(x, y.f(),
|
|
57546
|
+
return [new Suspend(() => extendAST(x, y.f(), path7))];
|
|
57547
57547
|
case "Refinement":
|
|
57548
|
-
return addRefinementToMembers(y, intersectUnionMembers(getTypes(x), getTypes(y.from),
|
|
57548
|
+
return addRefinementToMembers(y, intersectUnionMembers(getTypes(x), getTypes(y.from), path7));
|
|
57549
57549
|
case "TypeLiteral": {
|
|
57550
57550
|
switch (x._tag) {
|
|
57551
57551
|
case "Union":
|
|
57552
|
-
return intersectUnionMembers(x.types, [y],
|
|
57552
|
+
return intersectUnionMembers(x.types, [y], path7);
|
|
57553
57553
|
case "Suspend":
|
|
57554
|
-
return [new Suspend(() => extendAST(x.f(), y,
|
|
57554
|
+
return [new Suspend(() => extendAST(x.f(), y, path7))];
|
|
57555
57555
|
case "Refinement":
|
|
57556
|
-
return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y],
|
|
57556
|
+
return addRefinementToMembers(x, intersectUnionMembers(getTypes(x.from), [y], path7));
|
|
57557
57557
|
case "TypeLiteral":
|
|
57558
|
-
return [intersectTypeLiterals(x, y,
|
|
57558
|
+
return [intersectTypeLiterals(x, y, path7)];
|
|
57559
57559
|
case "Transformation": {
|
|
57560
57560
|
const transformation = x.transformation;
|
|
57561
|
-
const from = intersectTypeLiterals(x.from, y,
|
|
57562
|
-
const to = intersectTypeLiterals(x.to, typeAST(y),
|
|
57561
|
+
const from = intersectTypeLiterals(x.from, y, path7);
|
|
57562
|
+
const to = intersectTypeLiterals(x.to, typeAST(y), path7);
|
|
57563
57563
|
switch (transformation._tag) {
|
|
57564
57564
|
case "TypeLiteralTransformation":
|
|
57565
57565
|
return [new Transformation(from, to, new TypeLiteralTransformation(transformation.propertySignatureTransformations))];
|
|
@@ -57581,15 +57581,15 @@ var intersectUnionMembers = (xs, ys, path6) => flatMap2(xs, (x) => flatMap2(ys,
|
|
|
57581
57581
|
case "Transformation": {
|
|
57582
57582
|
if (isTransformation(x)) {
|
|
57583
57583
|
if (isTypeLiteralTransformation(y.transformation) && isTypeLiteralTransformation(x.transformation)) {
|
|
57584
|
-
return [new Transformation(intersectTypeLiterals(x.from, y.from,
|
|
57584
|
+
return [new Transformation(intersectTypeLiterals(x.from, y.from, path7), intersectTypeLiterals(x.to, y.to, path7), new TypeLiteralTransformation(y.transformation.propertySignatureTransformations.concat(x.transformation.propertySignatureTransformations)))];
|
|
57585
57585
|
}
|
|
57586
57586
|
} else {
|
|
57587
|
-
return intersectUnionMembers([y], [x],
|
|
57587
|
+
return intersectUnionMembers([y], [x], path7);
|
|
57588
57588
|
}
|
|
57589
57589
|
break;
|
|
57590
57590
|
}
|
|
57591
57591
|
}
|
|
57592
|
-
throw new Error(getSchemaExtendErrorMessage(x, y,
|
|
57592
|
+
throw new Error(getSchemaExtendErrorMessage(x, y, path7));
|
|
57593
57593
|
}));
|
|
57594
57594
|
var extend3 = /* @__PURE__ */ dual(2, (self, that) => make53(extendAST(self.ast, that.ast, [])));
|
|
57595
57595
|
var compose3 = /* @__PURE__ */ dual((args2) => isSchema(args2[1]), (from, to) => makeTransformationClass(from, to, compose2(from.ast, to.ast)));
|
|
@@ -58259,8 +58259,8 @@ var PiB = (n) => Size(BigInt(n) * bigintPiB);
|
|
|
58259
58259
|
var make54 = (impl) => {
|
|
58260
58260
|
return tag.of({
|
|
58261
58261
|
...impl,
|
|
58262
|
-
exists: (
|
|
58263
|
-
readFileString: (
|
|
58262
|
+
exists: (path7) => pipe(impl.access(path7), as5(true), catchTag2("SystemError", (e) => e.reason === "NotFound" ? succeed8(false) : fail8(e))),
|
|
58263
|
+
readFileString: (path7, encoding) => tryMap2(impl.readFile(path7), {
|
|
58264
58264
|
try: (_) => new TextDecoder(encoding).decode(_),
|
|
58265
58265
|
catch: (cause3) => new BadArgument({
|
|
58266
58266
|
module: "FileSystem",
|
|
@@ -58269,14 +58269,14 @@ var make54 = (impl) => {
|
|
|
58269
58269
|
cause: cause3
|
|
58270
58270
|
})
|
|
58271
58271
|
}),
|
|
58272
|
-
stream: (
|
|
58272
|
+
stream: (path7, options3) => pipe(impl.open(path7, {
|
|
58273
58273
|
flag: "r"
|
|
58274
58274
|
}), options3?.offset ? tap3((file6) => file6.seek(options3.offset, "start")) : identity, map16((file6) => stream3(file6, options3)), unwrapScoped5),
|
|
58275
|
-
sink: (
|
|
58275
|
+
sink: (path7, options3) => pipe(impl.open(path7, {
|
|
58276
58276
|
flag: "w",
|
|
58277
58277
|
...options3
|
|
58278
58278
|
}), map16((file6) => forEach10((_) => file6.writeAll(_))), unwrapScoped6),
|
|
58279
|
-
writeFileString: (
|
|
58279
|
+
writeFileString: (path7, data, options3) => flatMap9(try_2({
|
|
58280
58280
|
try: () => new TextEncoder().encode(data),
|
|
58281
58281
|
catch: (cause3) => new BadArgument({
|
|
58282
58282
|
module: "FileSystem",
|
|
@@ -58284,38 +58284,38 @@ var make54 = (impl) => {
|
|
|
58284
58284
|
description: "could not encode string",
|
|
58285
58285
|
cause: cause3
|
|
58286
58286
|
})
|
|
58287
|
-
}), (_) => impl.writeFile(
|
|
58287
|
+
}), (_) => impl.writeFile(path7, _, options3))
|
|
58288
58288
|
});
|
|
58289
58289
|
};
|
|
58290
|
-
var notFound = (method,
|
|
58290
|
+
var notFound = (method, path7) => new SystemError({
|
|
58291
58291
|
module: "FileSystem",
|
|
58292
58292
|
method,
|
|
58293
58293
|
reason: "NotFound",
|
|
58294
58294
|
description: "No such file or directory",
|
|
58295
|
-
pathOrDescriptor:
|
|
58295
|
+
pathOrDescriptor: path7
|
|
58296
58296
|
});
|
|
58297
58297
|
var makeNoop = (fileSystem) => {
|
|
58298
58298
|
return {
|
|
58299
|
-
access(
|
|
58300
|
-
return fail8(notFound("access",
|
|
58299
|
+
access(path7) {
|
|
58300
|
+
return fail8(notFound("access", path7));
|
|
58301
58301
|
},
|
|
58302
|
-
chmod(
|
|
58303
|
-
return fail8(notFound("chmod",
|
|
58302
|
+
chmod(path7) {
|
|
58303
|
+
return fail8(notFound("chmod", path7));
|
|
58304
58304
|
},
|
|
58305
|
-
chown(
|
|
58306
|
-
return fail8(notFound("chown",
|
|
58305
|
+
chown(path7) {
|
|
58306
|
+
return fail8(notFound("chown", path7));
|
|
58307
58307
|
},
|
|
58308
|
-
copy(
|
|
58309
|
-
return fail8(notFound("copy",
|
|
58308
|
+
copy(path7) {
|
|
58309
|
+
return fail8(notFound("copy", path7));
|
|
58310
58310
|
},
|
|
58311
|
-
copyFile(
|
|
58312
|
-
return fail8(notFound("copyFile",
|
|
58311
|
+
copyFile(path7) {
|
|
58312
|
+
return fail8(notFound("copyFile", path7));
|
|
58313
58313
|
},
|
|
58314
58314
|
exists() {
|
|
58315
58315
|
return succeed8(false);
|
|
58316
58316
|
},
|
|
58317
|
-
link(
|
|
58318
|
-
return fail8(notFound("link",
|
|
58317
|
+
link(path7) {
|
|
58318
|
+
return fail8(notFound("link", path7));
|
|
58319
58319
|
},
|
|
58320
58320
|
makeDirectory() {
|
|
58321
58321
|
return die5("not implemented");
|
|
@@ -58332,23 +58332,23 @@ var makeNoop = (fileSystem) => {
|
|
|
58332
58332
|
makeTempFileScoped() {
|
|
58333
58333
|
return die5("not implemented");
|
|
58334
58334
|
},
|
|
58335
|
-
open(
|
|
58336
|
-
return fail8(notFound("open",
|
|
58335
|
+
open(path7) {
|
|
58336
|
+
return fail8(notFound("open", path7));
|
|
58337
58337
|
},
|
|
58338
|
-
readDirectory(
|
|
58339
|
-
return fail8(notFound("readDirectory",
|
|
58338
|
+
readDirectory(path7) {
|
|
58339
|
+
return fail8(notFound("readDirectory", path7));
|
|
58340
58340
|
},
|
|
58341
|
-
readFile(
|
|
58342
|
-
return fail8(notFound("readFile",
|
|
58341
|
+
readFile(path7) {
|
|
58342
|
+
return fail8(notFound("readFile", path7));
|
|
58343
58343
|
},
|
|
58344
|
-
readFileString(
|
|
58345
|
-
return fail8(notFound("readFileString",
|
|
58344
|
+
readFileString(path7) {
|
|
58345
|
+
return fail8(notFound("readFileString", path7));
|
|
58346
58346
|
},
|
|
58347
|
-
readLink(
|
|
58348
|
-
return fail8(notFound("readLink",
|
|
58347
|
+
readLink(path7) {
|
|
58348
|
+
return fail8(notFound("readLink", path7));
|
|
58349
58349
|
},
|
|
58350
|
-
realPath(
|
|
58351
|
-
return fail8(notFound("realPath",
|
|
58350
|
+
realPath(path7) {
|
|
58351
|
+
return fail8(notFound("realPath", path7));
|
|
58352
58352
|
},
|
|
58353
58353
|
remove() {
|
|
58354
58354
|
return _void;
|
|
@@ -58356,32 +58356,32 @@ var makeNoop = (fileSystem) => {
|
|
|
58356
58356
|
rename(oldPath) {
|
|
58357
58357
|
return fail8(notFound("rename", oldPath));
|
|
58358
58358
|
},
|
|
58359
|
-
sink(
|
|
58360
|
-
return fail14(notFound("sink",
|
|
58359
|
+
sink(path7) {
|
|
58360
|
+
return fail14(notFound("sink", path7));
|
|
58361
58361
|
},
|
|
58362
|
-
stat(
|
|
58363
|
-
return fail8(notFound("stat",
|
|
58362
|
+
stat(path7) {
|
|
58363
|
+
return fail8(notFound("stat", path7));
|
|
58364
58364
|
},
|
|
58365
|
-
stream(
|
|
58366
|
-
return fail13(notFound("stream",
|
|
58365
|
+
stream(path7) {
|
|
58366
|
+
return fail13(notFound("stream", path7));
|
|
58367
58367
|
},
|
|
58368
58368
|
symlink(fromPath) {
|
|
58369
58369
|
return fail8(notFound("symlink", fromPath));
|
|
58370
58370
|
},
|
|
58371
|
-
truncate(
|
|
58372
|
-
return fail8(notFound("truncate",
|
|
58371
|
+
truncate(path7) {
|
|
58372
|
+
return fail8(notFound("truncate", path7));
|
|
58373
58373
|
},
|
|
58374
|
-
utimes(
|
|
58375
|
-
return fail8(notFound("utimes",
|
|
58374
|
+
utimes(path7) {
|
|
58375
|
+
return fail8(notFound("utimes", path7));
|
|
58376
58376
|
},
|
|
58377
|
-
watch(
|
|
58378
|
-
return fail13(notFound("watch",
|
|
58377
|
+
watch(path7) {
|
|
58378
|
+
return fail13(notFound("watch", path7));
|
|
58379
58379
|
},
|
|
58380
|
-
writeFile(
|
|
58381
|
-
return fail8(notFound("writeFile",
|
|
58380
|
+
writeFile(path7) {
|
|
58381
|
+
return fail8(notFound("writeFile", path7));
|
|
58382
58382
|
},
|
|
58383
|
-
writeFileString(
|
|
58384
|
-
return fail8(notFound("writeFileString",
|
|
58383
|
+
writeFileString(path7) {
|
|
58384
|
+
return fail8(notFound("writeFileString", path7));
|
|
58385
58385
|
},
|
|
58386
58386
|
...fileSystem
|
|
58387
58387
|
};
|
|
@@ -58430,7 +58430,7 @@ var WatchBackend = class extends (/* @__PURE__ */ Tag2("@effect/platform/FileSys
|
|
|
58430
58430
|
};
|
|
58431
58431
|
|
|
58432
58432
|
// 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
|
|
58433
|
-
var handleErrnoException = (module, method) => (err, [
|
|
58433
|
+
var handleErrnoException = (module, method) => (err, [path7]) => {
|
|
58434
58434
|
let reason = "Unknown";
|
|
58435
58435
|
switch (err.code) {
|
|
58436
58436
|
case "ENOENT":
|
|
@@ -58459,7 +58459,7 @@ var handleErrnoException = (module, method) => (err, [path6]) => {
|
|
|
58459
58459
|
reason,
|
|
58460
58460
|
module,
|
|
58461
58461
|
method,
|
|
58462
|
-
pathOrDescriptor:
|
|
58462
|
+
pathOrDescriptor: path7,
|
|
58463
58463
|
syscall: err.syscall,
|
|
58464
58464
|
description: err.message,
|
|
58465
58465
|
cause: err
|
|
@@ -58718,7 +58718,7 @@ var handleBadArgument = (method) => (cause3) => new BadArgument({
|
|
|
58718
58718
|
});
|
|
58719
58719
|
var access2 = /* @__PURE__ */ (() => {
|
|
58720
58720
|
const nodeAccess = /* @__PURE__ */ effectify2(NFS__namespace.access, /* @__PURE__ */ handleErrnoException("FileSystem", "access"), /* @__PURE__ */ handleBadArgument("access"));
|
|
58721
|
-
return (
|
|
58721
|
+
return (path7, options3) => {
|
|
58722
58722
|
let mode = NFS__namespace.constants.F_OK;
|
|
58723
58723
|
if (options3?.readable) {
|
|
58724
58724
|
mode |= NFS__namespace.constants.R_OK;
|
|
@@ -58726,7 +58726,7 @@ var access2 = /* @__PURE__ */ (() => {
|
|
|
58726
58726
|
if (options3?.writable) {
|
|
58727
58727
|
mode |= NFS__namespace.constants.W_OK;
|
|
58728
58728
|
}
|
|
58729
|
-
return nodeAccess(
|
|
58729
|
+
return nodeAccess(path7, mode);
|
|
58730
58730
|
};
|
|
58731
58731
|
})();
|
|
58732
58732
|
var copy3 = /* @__PURE__ */ (() => {
|
|
@@ -58743,11 +58743,11 @@ var copyFile2 = /* @__PURE__ */ (() => {
|
|
|
58743
58743
|
})();
|
|
58744
58744
|
var chmod2 = /* @__PURE__ */ (() => {
|
|
58745
58745
|
const nodeChmod = /* @__PURE__ */ effectify2(NFS__namespace.chmod, /* @__PURE__ */ handleErrnoException("FileSystem", "chmod"), /* @__PURE__ */ handleBadArgument("chmod"));
|
|
58746
|
-
return (
|
|
58746
|
+
return (path7, mode) => nodeChmod(path7, mode);
|
|
58747
58747
|
})();
|
|
58748
58748
|
var chown2 = /* @__PURE__ */ (() => {
|
|
58749
58749
|
const nodeChown = /* @__PURE__ */ effectify2(NFS__namespace.chown, /* @__PURE__ */ handleErrnoException("FileSystem", "chown"), /* @__PURE__ */ handleBadArgument("chown"));
|
|
58750
|
-
return (
|
|
58750
|
+
return (path7, uid, gid) => nodeChown(path7, uid, gid);
|
|
58751
58751
|
})();
|
|
58752
58752
|
var link2 = /* @__PURE__ */ (() => {
|
|
58753
58753
|
const nodeLink = /* @__PURE__ */ effectify2(NFS__namespace.link, /* @__PURE__ */ handleErrnoException("FileSystem", "link"), /* @__PURE__ */ handleBadArgument("link"));
|
|
@@ -58755,7 +58755,7 @@ var link2 = /* @__PURE__ */ (() => {
|
|
|
58755
58755
|
})();
|
|
58756
58756
|
var makeDirectory = /* @__PURE__ */ (() => {
|
|
58757
58757
|
const nodeMkdir = /* @__PURE__ */ effectify2(NFS__namespace.mkdir, /* @__PURE__ */ handleErrnoException("FileSystem", "makeDirectory"), /* @__PURE__ */ handleBadArgument("makeDirectory"));
|
|
58758
|
-
return (
|
|
58758
|
+
return (path7, options3) => nodeMkdir(path7, {
|
|
58759
58759
|
recursive: options3?.recursive ?? false,
|
|
58760
58760
|
mode: options3?.mode
|
|
58761
58761
|
});
|
|
@@ -58771,7 +58771,7 @@ var makeTempDirectoryFactory = (method) => {
|
|
|
58771
58771
|
var makeTempDirectory = /* @__PURE__ */ makeTempDirectoryFactory("makeTempDirectory");
|
|
58772
58772
|
var removeFactory = (method) => {
|
|
58773
58773
|
const nodeRm = effectify2(NFS__namespace.rm, handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
58774
|
-
return (
|
|
58774
|
+
return (path7, options3) => nodeRm(path7, {
|
|
58775
58775
|
recursive: options3?.recursive ?? false,
|
|
58776
58776
|
force: options3?.force ?? false
|
|
58777
58777
|
});
|
|
@@ -58787,7 +58787,7 @@ var makeTempDirectoryScoped = /* @__PURE__ */ (() => {
|
|
|
58787
58787
|
var openFactory = (method) => {
|
|
58788
58788
|
const nodeOpen = effectify2(NFS__namespace.open, handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
58789
58789
|
const nodeClose = effectify2(NFS__namespace.close, handleErrnoException("FileSystem", method), handleBadArgument(method));
|
|
58790
|
-
return (
|
|
58790
|
+
return (path7, options3) => pipe(acquireRelease2(nodeOpen(path7, options3?.flag ?? "r", options3?.mode), (fd) => orDie2(nodeClose(fd))), map16((fd) => makeFile(FileDescriptor(fd), options3?.flag?.startsWith("a") ?? false)));
|
|
58791
58791
|
};
|
|
58792
58792
|
var open2 = /* @__PURE__ */ openFactory("open");
|
|
58793
58793
|
var makeFile = /* @__PURE__ */ (() => {
|
|
@@ -58902,7 +58902,7 @@ var makeTempFileFactory = (method) => {
|
|
|
58902
58902
|
const makeDirectory2 = makeTempDirectoryFactory(method);
|
|
58903
58903
|
const open3 = openFactory(method);
|
|
58904
58904
|
const randomHexString2 = (bytes) => sync4(() => Crypto__namespace.randomBytes(bytes).toString("hex"));
|
|
58905
|
-
return (options3) => pipe(zip5(makeDirectory2(options3), randomHexString2(6)), map16(([directory5, random4]) => path4__namespace.join(directory5, random4)), tap3((
|
|
58905
|
+
return (options3) => pipe(zip5(makeDirectory2(options3), randomHexString2(6)), map16(([directory5, random4]) => path4__namespace.join(directory5, random4)), tap3((path7) => scoped2(open3(path7, {
|
|
58906
58906
|
flag: "w+"
|
|
58907
58907
|
}))));
|
|
58908
58908
|
};
|
|
@@ -58914,17 +58914,17 @@ var makeTempFileScoped = /* @__PURE__ */ (() => {
|
|
|
58914
58914
|
recursive: true
|
|
58915
58915
|
})));
|
|
58916
58916
|
})();
|
|
58917
|
-
var readDirectory = (
|
|
58918
|
-
try: () => NFS__namespace.promises.readdir(
|
|
58919
|
-
catch: (err) => handleErrnoException("FileSystem", "readDirectory")(err, [
|
|
58917
|
+
var readDirectory = (path7, options3) => tryPromise2({
|
|
58918
|
+
try: () => NFS__namespace.promises.readdir(path7, options3),
|
|
58919
|
+
catch: (err) => handleErrnoException("FileSystem", "readDirectory")(err, [path7])
|
|
58920
58920
|
});
|
|
58921
|
-
var readFile2 = (
|
|
58921
|
+
var readFile2 = (path7) => async2((resume2, signal) => {
|
|
58922
58922
|
try {
|
|
58923
|
-
NFS__namespace.readFile(
|
|
58923
|
+
NFS__namespace.readFile(path7, {
|
|
58924
58924
|
signal
|
|
58925
58925
|
}, (err, data) => {
|
|
58926
58926
|
if (err) {
|
|
58927
|
-
resume2(fail8(handleErrnoException("FileSystem", "readFile")(err, [
|
|
58927
|
+
resume2(fail8(handleErrnoException("FileSystem", "readFile")(err, [path7])));
|
|
58928
58928
|
} else {
|
|
58929
58929
|
resume2(succeed8(data));
|
|
58930
58930
|
}
|
|
@@ -58935,11 +58935,11 @@ var readFile2 = (path6) => async2((resume2, signal) => {
|
|
|
58935
58935
|
});
|
|
58936
58936
|
var readLink = /* @__PURE__ */ (() => {
|
|
58937
58937
|
const nodeReadLink = /* @__PURE__ */ effectify2(NFS__namespace.readlink, /* @__PURE__ */ handleErrnoException("FileSystem", "readLink"), /* @__PURE__ */ handleBadArgument("readLink"));
|
|
58938
|
-
return (
|
|
58938
|
+
return (path7) => nodeReadLink(path7);
|
|
58939
58939
|
})();
|
|
58940
58940
|
var realPath = /* @__PURE__ */ (() => {
|
|
58941
58941
|
const nodeRealPath = /* @__PURE__ */ effectify2(NFS__namespace.realpath, /* @__PURE__ */ handleErrnoException("FileSystem", "realPath"), /* @__PURE__ */ handleBadArgument("realPath"));
|
|
58942
|
-
return (
|
|
58942
|
+
return (path7) => nodeRealPath(path7);
|
|
58943
58943
|
})();
|
|
58944
58944
|
var rename3 = /* @__PURE__ */ (() => {
|
|
58945
58945
|
const nodeRename = /* @__PURE__ */ effectify2(NFS__namespace.rename, /* @__PURE__ */ handleErrnoException("FileSystem", "rename"), /* @__PURE__ */ handleBadArgument("rename"));
|
|
@@ -58963,40 +58963,40 @@ var makeFileInfo = (stat3) => ({
|
|
|
58963
58963
|
});
|
|
58964
58964
|
var stat2 = /* @__PURE__ */ (() => {
|
|
58965
58965
|
const nodeStat = /* @__PURE__ */ effectify2(NFS__namespace.stat, /* @__PURE__ */ handleErrnoException("FileSystem", "stat"), /* @__PURE__ */ handleBadArgument("stat"));
|
|
58966
|
-
return (
|
|
58966
|
+
return (path7) => map16(nodeStat(path7), makeFileInfo);
|
|
58967
58967
|
})();
|
|
58968
58968
|
var symlink2 = /* @__PURE__ */ (() => {
|
|
58969
58969
|
const nodeSymlink = /* @__PURE__ */ effectify2(NFS__namespace.symlink, /* @__PURE__ */ handleErrnoException("FileSystem", "symlink"), /* @__PURE__ */ handleBadArgument("symlink"));
|
|
58970
|
-
return (target,
|
|
58970
|
+
return (target, path7) => nodeSymlink(target, path7);
|
|
58971
58971
|
})();
|
|
58972
58972
|
var truncate2 = /* @__PURE__ */ (() => {
|
|
58973
58973
|
const nodeTruncate = /* @__PURE__ */ effectify2(NFS__namespace.truncate, /* @__PURE__ */ handleErrnoException("FileSystem", "truncate"), /* @__PURE__ */ handleBadArgument("truncate"));
|
|
58974
|
-
return (
|
|
58974
|
+
return (path7, length3) => nodeTruncate(path7, length3 !== void 0 ? Number(length3) : void 0);
|
|
58975
58975
|
})();
|
|
58976
58976
|
var utimes2 = /* @__PURE__ */ (() => {
|
|
58977
58977
|
const nodeUtimes = /* @__PURE__ */ effectify2(NFS__namespace.utimes, /* @__PURE__ */ handleErrnoException("FileSystem", "utime"), /* @__PURE__ */ handleBadArgument("utime"));
|
|
58978
|
-
return (
|
|
58978
|
+
return (path7, atime, mtime) => nodeUtimes(path7, atime, mtime);
|
|
58979
58979
|
})();
|
|
58980
|
-
var watchNode = (
|
|
58981
|
-
const watcher = NFS__namespace.watch(
|
|
58980
|
+
var watchNode = (path7, options3) => asyncScoped2((emit) => acquireRelease2(sync4(() => {
|
|
58981
|
+
const watcher = NFS__namespace.watch(path7, {
|
|
58982
58982
|
recursive: options3?.recursive
|
|
58983
|
-
}, (event,
|
|
58984
|
-
if (!
|
|
58983
|
+
}, (event, path8) => {
|
|
58984
|
+
if (!path8) return;
|
|
58985
58985
|
switch (event) {
|
|
58986
58986
|
case "rename": {
|
|
58987
|
-
emit.fromEffect(matchEffect2(stat2(
|
|
58987
|
+
emit.fromEffect(matchEffect2(stat2(path8), {
|
|
58988
58988
|
onSuccess: (_) => succeed8(WatchEventCreate({
|
|
58989
|
-
path:
|
|
58989
|
+
path: path8
|
|
58990
58990
|
})),
|
|
58991
58991
|
onFailure: (err) => err._tag === "SystemError" && err.reason === "NotFound" ? succeed8(WatchEventRemove({
|
|
58992
|
-
path:
|
|
58992
|
+
path: path8
|
|
58993
58993
|
})) : fail8(err)
|
|
58994
58994
|
}));
|
|
58995
58995
|
return;
|
|
58996
58996
|
}
|
|
58997
58997
|
case "change": {
|
|
58998
58998
|
emit.single(WatchEventUpdate({
|
|
58999
|
-
path:
|
|
58999
|
+
path: path8
|
|
59000
59000
|
}));
|
|
59001
59001
|
return;
|
|
59002
59002
|
}
|
|
@@ -59007,7 +59007,7 @@ var watchNode = (path6, options3) => asyncScoped2((emit) => acquireRelease2(sync
|
|
|
59007
59007
|
module: "FileSystem",
|
|
59008
59008
|
reason: "Unknown",
|
|
59009
59009
|
method: "watch",
|
|
59010
|
-
pathOrDescriptor:
|
|
59010
|
+
pathOrDescriptor: path7,
|
|
59011
59011
|
cause: error4
|
|
59012
59012
|
}));
|
|
59013
59013
|
});
|
|
@@ -59016,16 +59016,16 @@ var watchNode = (path6, options3) => asyncScoped2((emit) => acquireRelease2(sync
|
|
|
59016
59016
|
});
|
|
59017
59017
|
return watcher;
|
|
59018
59018
|
}), (watcher) => sync4(() => watcher.close())));
|
|
59019
|
-
var watch2 = (backend,
|
|
59020
|
-
var writeFile2 = (
|
|
59019
|
+
var watch2 = (backend, path7, options3) => stat2(path7).pipe(map16((stat3) => backend.pipe(flatMap((_) => _.register(path7, stat3, options3)), getOrElse(() => watchNode(path7, options3)))), unwrap3);
|
|
59020
|
+
var writeFile2 = (path7, data, options3) => async2((resume2, signal) => {
|
|
59021
59021
|
try {
|
|
59022
|
-
NFS__namespace.writeFile(
|
|
59022
|
+
NFS__namespace.writeFile(path7, data, {
|
|
59023
59023
|
signal,
|
|
59024
59024
|
flag: options3?.flag,
|
|
59025
59025
|
mode: options3?.mode
|
|
59026
59026
|
}, (err) => {
|
|
59027
59027
|
if (err) {
|
|
59028
|
-
resume2(fail8(handleErrnoException("FileSystem", "writeFile")(err, [
|
|
59028
|
+
resume2(fail8(handleErrnoException("FileSystem", "writeFile")(err, [path7])));
|
|
59029
59029
|
} else {
|
|
59030
59030
|
resume2(_void);
|
|
59031
59031
|
}
|
|
@@ -59057,8 +59057,8 @@ var makeFileSystem = /* @__PURE__ */ map16(/* @__PURE__ */ serviceOption2(WatchB
|
|
|
59057
59057
|
symlink: symlink2,
|
|
59058
59058
|
truncate: truncate2,
|
|
59059
59059
|
utimes: utimes2,
|
|
59060
|
-
watch(
|
|
59061
|
-
return watch2(backend,
|
|
59060
|
+
watch(path7, options3) {
|
|
59061
|
+
return watch2(backend, path7, options3);
|
|
59062
59062
|
},
|
|
59063
59063
|
writeFile: writeFile2
|
|
59064
59064
|
}));
|
|
@@ -59083,12 +59083,12 @@ var fromFileUrl2 = (url2) => try_2({
|
|
|
59083
59083
|
cause: error4
|
|
59084
59084
|
})
|
|
59085
59085
|
});
|
|
59086
|
-
var toFileUrl2 = (
|
|
59087
|
-
try: () => NodeUrl__namespace.pathToFileURL(
|
|
59086
|
+
var toFileUrl2 = (path7) => try_2({
|
|
59087
|
+
try: () => NodeUrl__namespace.pathToFileURL(path7),
|
|
59088
59088
|
catch: (error4) => new BadArgument({
|
|
59089
59089
|
module: "Path",
|
|
59090
59090
|
method: "toFileUrl",
|
|
59091
|
-
description: `Invalid path: ${
|
|
59091
|
+
description: `Invalid path: ${path7}`,
|
|
59092
59092
|
cause: error4
|
|
59093
59093
|
})
|
|
59094
59094
|
});
|
|
@@ -60150,22 +60150,22 @@ var fileParsers = {
|
|
|
60150
60150
|
toml: (content) => Toml.parse(content),
|
|
60151
60151
|
tml: (content) => Toml.parse(content)
|
|
60152
60152
|
};
|
|
60153
|
-
var read3 = (
|
|
60154
|
-
onFailure: (error4) => fail8(`Could not read file (${
|
|
60155
|
-
onSuccess: (content) => succeed8([
|
|
60153
|
+
var read3 = (path7) => flatMap9(FileSystem, (fs) => matchEffect2(fs.readFile(path7), {
|
|
60154
|
+
onFailure: (error4) => fail8(`Could not read file (${path7}): ${error4}`),
|
|
60155
|
+
onSuccess: (content) => succeed8([path7, content])
|
|
60156
60156
|
}));
|
|
60157
|
-
var readString = (
|
|
60158
|
-
onFailure: (error4) => fail8(`Could not read file (${
|
|
60159
|
-
onSuccess: (content) => succeed8([
|
|
60157
|
+
var readString = (path7) => flatMap9(FileSystem, (fs) => matchEffect2(fs.readFileString(path7), {
|
|
60158
|
+
onFailure: (error4) => fail8(`Could not read file (${path7}): ${error4}`),
|
|
60159
|
+
onSuccess: (content) => succeed8([path7, content])
|
|
60160
60160
|
}));
|
|
60161
|
-
var parse5 = (
|
|
60162
|
-
const parser = fileParsers[format6 ??
|
|
60161
|
+
var parse5 = (path7, content, format6) => {
|
|
60162
|
+
const parser = fileParsers[format6 ?? path7.split(".").pop()];
|
|
60163
60163
|
if (parser === void 0) {
|
|
60164
60164
|
return fail8(`Unsupported file format: ${format6}`);
|
|
60165
60165
|
}
|
|
60166
60166
|
return try_2({
|
|
60167
60167
|
try: () => parser(content),
|
|
60168
|
-
catch: (e) => `Could not parse ${format6} file (${
|
|
60168
|
+
catch: (e) => `Could not parse ${format6} file (${path7}): ${e}`
|
|
60169
60169
|
});
|
|
60170
60170
|
};
|
|
60171
60171
|
|
|
@@ -62467,22 +62467,22 @@ var showConfirmation = /* @__PURE__ */ Confirm.$is("Show");
|
|
|
62467
62467
|
var renderBeep2 = /* @__PURE__ */ render3(beep3, {
|
|
62468
62468
|
style: "pretty"
|
|
62469
62469
|
});
|
|
62470
|
-
function resolveCurrentPath(
|
|
62471
|
-
return match2(
|
|
62470
|
+
function resolveCurrentPath(path7, options3) {
|
|
62471
|
+
return match2(path7, {
|
|
62472
62472
|
onNone: () => match2(options3.startingPath, {
|
|
62473
62473
|
onNone: () => sync4(() => process.cwd()),
|
|
62474
|
-
onSome: (
|
|
62474
|
+
onSome: (path8) => flatMap9(FileSystem, (fs) => (
|
|
62475
62475
|
// Ensure the user provided starting path exists
|
|
62476
|
-
orDie2(fs.exists(
|
|
62476
|
+
orDie2(fs.exists(path8)).pipe(filterOrDieMessage2(identity, `The provided starting path '${path8}' does not exist`), as5(path8))
|
|
62477
62477
|
))
|
|
62478
62478
|
}),
|
|
62479
|
-
onSome: (
|
|
62479
|
+
onSome: (path8) => succeed8(path8)
|
|
62480
62480
|
});
|
|
62481
62481
|
}
|
|
62482
62482
|
function getFileList(directory5, options3) {
|
|
62483
62483
|
return gen3(function* () {
|
|
62484
62484
|
const fs = yield* FileSystem;
|
|
62485
|
-
const
|
|
62485
|
+
const path7 = yield* Path3;
|
|
62486
62486
|
const files = yield* orDie2(fs.readDirectory(directory5)).pipe(
|
|
62487
62487
|
// Always prepend the `".."` option to the file list but allow it
|
|
62488
62488
|
// to be filtered out if the user so desires
|
|
@@ -62491,7 +62491,7 @@ function getFileList(directory5, options3) {
|
|
|
62491
62491
|
return yield* filter8(files, (file6) => {
|
|
62492
62492
|
const result = options3.filter(file6);
|
|
62493
62493
|
const userDefinedFilter = isEffect2(result) ? result : succeed8(result);
|
|
62494
|
-
const directoryFilter = options3.type === "directory" ? map16(orDie2(fs.stat(
|
|
62494
|
+
const directoryFilter = options3.type === "directory" ? map16(orDie2(fs.stat(path7.join(directory5, file6))), (info3) => info3.type === "Directory") : succeed8(true);
|
|
62495
62495
|
return zipWith5(userDefinedFilter, directoryFilter, (a, b) => a && b);
|
|
62496
62496
|
}, {
|
|
62497
62497
|
concurrency: files.length
|
|
@@ -62557,13 +62557,13 @@ function renderFiles(state, files, figures2, options3) {
|
|
|
62557
62557
|
}
|
|
62558
62558
|
function renderNextFrame2(state, options3) {
|
|
62559
62559
|
return gen3(function* () {
|
|
62560
|
-
const
|
|
62560
|
+
const path7 = yield* Path3;
|
|
62561
62561
|
const terminal = yield* Terminal;
|
|
62562
62562
|
const columns = yield* terminal.columns;
|
|
62563
62563
|
const figures2 = yield* figures;
|
|
62564
62564
|
const currentPath = yield* resolveCurrentPath(state.path, options3);
|
|
62565
62565
|
const selectedPath = state.files[state.cursor];
|
|
62566
|
-
const resolvedPath =
|
|
62566
|
+
const resolvedPath = path7.resolve(currentPath, selectedPath);
|
|
62567
62567
|
const resolvedPathMsg = figures2.pointerSmall.pipe(cat2(space2), cat2(text3(resolvedPath)), annotate2(blackBright2));
|
|
62568
62568
|
if (showConfirmation(state.confirm)) {
|
|
62569
62569
|
const leadingSymbol2 = annotate2(text3("?"), cyanBright2);
|
|
@@ -62638,10 +62638,10 @@ function processCursorDown(state) {
|
|
|
62638
62638
|
function processSelection(state, options3) {
|
|
62639
62639
|
return gen3(function* () {
|
|
62640
62640
|
const fs = yield* FileSystem;
|
|
62641
|
-
const
|
|
62641
|
+
const path7 = yield* Path3;
|
|
62642
62642
|
const currentPath = yield* resolveCurrentPath(state.path, options3);
|
|
62643
62643
|
const selectedPath = state.files[state.cursor];
|
|
62644
|
-
const resolvedPath =
|
|
62644
|
+
const resolvedPath = path7.resolve(currentPath, selectedPath);
|
|
62645
62645
|
const info3 = yield* orDie2(fs.stat(resolvedPath));
|
|
62646
62646
|
if (info3.type === "Directory") {
|
|
62647
62647
|
const files = yield* getFileList(resolvedPath, options3);
|
|
@@ -62689,10 +62689,10 @@ function handleProcess2(options3) {
|
|
|
62689
62689
|
case "y":
|
|
62690
62690
|
case "t": {
|
|
62691
62691
|
if (showConfirmation(state.confirm)) {
|
|
62692
|
-
const
|
|
62692
|
+
const path7 = yield* Path3;
|
|
62693
62693
|
const currentPath = yield* resolveCurrentPath(state.path, options3);
|
|
62694
62694
|
const selectedPath = state.files[state.cursor];
|
|
62695
|
-
const resolvedPath =
|
|
62695
|
+
const resolvedPath = path7.resolve(currentPath, selectedPath);
|
|
62696
62696
|
const files = yield* getFileList(resolvedPath, options3);
|
|
62697
62697
|
return Action.NextFrame({
|
|
62698
62698
|
state: {
|
|
@@ -62708,10 +62708,10 @@ function handleProcess2(options3) {
|
|
|
62708
62708
|
case "n":
|
|
62709
62709
|
case "f": {
|
|
62710
62710
|
if (showConfirmation(state.confirm)) {
|
|
62711
|
-
const
|
|
62711
|
+
const path7 = yield* Path3;
|
|
62712
62712
|
const currentPath = yield* resolveCurrentPath(state.path, options3);
|
|
62713
62713
|
const selectedPath = state.files[state.cursor];
|
|
62714
|
-
const resolvedPath =
|
|
62714
|
+
const resolvedPath = path7.resolve(currentPath, selectedPath);
|
|
62715
62715
|
return Action.Submit({
|
|
62716
62716
|
value: resolvedPath
|
|
62717
62717
|
});
|
|
@@ -62733,14 +62733,14 @@ var file = (options3 = {}) => {
|
|
|
62733
62733
|
filter: options3.filter ?? (() => succeed8(true))
|
|
62734
62734
|
};
|
|
62735
62735
|
const initialState3 = gen3(function* () {
|
|
62736
|
-
const
|
|
62737
|
-
const currentPath = yield* resolveCurrentPath(
|
|
62736
|
+
const path7 = none2();
|
|
62737
|
+
const currentPath = yield* resolveCurrentPath(path7, opts);
|
|
62738
62738
|
const files = yield* getFileList(currentPath, opts);
|
|
62739
62739
|
const confirm = Confirm.Hide();
|
|
62740
62740
|
return {
|
|
62741
62741
|
cursor: 0,
|
|
62742
62742
|
files,
|
|
62743
|
-
path:
|
|
62743
|
+
path: path7,
|
|
62744
62744
|
confirm
|
|
62745
62745
|
};
|
|
62746
62746
|
});
|
|
@@ -63885,7 +63885,7 @@ var validateInternal = (self, value5, config2) => {
|
|
|
63885
63885
|
case "Path": {
|
|
63886
63886
|
return flatMap9(FileSystem, (fileSystem) => {
|
|
63887
63887
|
const errorMsg = "Path options do not have a default value";
|
|
63888
|
-
return orElseFail2(value5, () => errorMsg).pipe(tap3((
|
|
63888
|
+
return orElseFail2(value5, () => errorMsg).pipe(tap3((path7) => orDie2(fileSystem.exists(path7)).pipe(tap3((pathExists) => validatePathExistence(path7, self.pathExists, pathExists).pipe(zipRight4(validatePathType(path7, self.pathType, fileSystem).pipe(when2(() => self.pathExists !== "no" && pathExists))))))));
|
|
63889
63889
|
});
|
|
63890
63890
|
}
|
|
63891
63891
|
case "Redacted": {
|
|
@@ -63900,24 +63900,24 @@ var validateInternal = (self, value5, config2) => {
|
|
|
63900
63900
|
}
|
|
63901
63901
|
};
|
|
63902
63902
|
var attempt = (option5, typeName, parse9) => orElseFail2(option5, () => `${typeName} options do not have a default value`).pipe(flatMap9((value5) => orElseFail2(parse9(value5), () => `'${value5}' is not a ${typeName}`)));
|
|
63903
|
-
var validatePathExistence = (
|
|
63903
|
+
var validatePathExistence = (path7, shouldPathExist, pathExists) => {
|
|
63904
63904
|
if (shouldPathExist === "no" && pathExists) {
|
|
63905
|
-
return fail8(`Path '${
|
|
63905
|
+
return fail8(`Path '${path7}' must not exist`);
|
|
63906
63906
|
}
|
|
63907
63907
|
if (shouldPathExist === "yes" && !pathExists) {
|
|
63908
|
-
return fail8(`Path '${
|
|
63908
|
+
return fail8(`Path '${path7}' must exist`);
|
|
63909
63909
|
}
|
|
63910
63910
|
return _void;
|
|
63911
63911
|
};
|
|
63912
|
-
var validatePathType = (
|
|
63912
|
+
var validatePathType = (path7, pathType, fileSystem) => {
|
|
63913
63913
|
switch (pathType) {
|
|
63914
63914
|
case "file": {
|
|
63915
|
-
const checkIsFile = fileSystem.stat(
|
|
63916
|
-
return fail8(`Expected path '${
|
|
63915
|
+
const checkIsFile = fileSystem.stat(path7).pipe(map16((info3) => info3.type === "File"), orDie2);
|
|
63916
|
+
return fail8(`Expected path '${path7}' to be a regular file`).pipe(unlessEffect2(checkIsFile), asVoid4);
|
|
63917
63917
|
}
|
|
63918
63918
|
case "directory": {
|
|
63919
|
-
const checkIsDirectory = fileSystem.stat(
|
|
63920
|
-
return fail8(`Expected path '${
|
|
63919
|
+
const checkIsDirectory = fileSystem.stat(path7).pipe(map16((info3) => info3.type === "Directory"), orDie2);
|
|
63920
|
+
return fail8(`Expected path '${path7}' to be a directory`).pipe(unlessEffect2(checkIsDirectory), asVoid4);
|
|
63921
63921
|
}
|
|
63922
63922
|
case "either": {
|
|
63923
63923
|
return _void;
|
|
@@ -64339,13 +64339,13 @@ var file2 = (config2) => makeSingle(fromNullable(config2?.name), path("file", co
|
|
|
64339
64339
|
var fileContent = (config2) => mapEffect6(file2({
|
|
64340
64340
|
...config2,
|
|
64341
64341
|
exists: "yes"
|
|
64342
|
-
}), (
|
|
64343
|
-
var fileParse = (config2) => mapEffect6(fileText(config2), ([
|
|
64342
|
+
}), (path7) => mapError2(read3(path7), (e) => p(e)));
|
|
64343
|
+
var fileParse = (config2) => mapEffect6(fileText(config2), ([path7, content]) => mapError2(parse5(path7, content, config2?.format), (e) => p(e)));
|
|
64344
64344
|
var fileSchema = (schema, config2) => withSchema(fileParse(config2), schema);
|
|
64345
64345
|
var fileText = (config2) => mapEffect6(file2({
|
|
64346
64346
|
...config2,
|
|
64347
64347
|
exists: "yes"
|
|
64348
|
-
}), (
|
|
64348
|
+
}), (path7) => mapError2(readString(path7), (e) => p(e)));
|
|
64349
64349
|
var float3 = (config2) => makeSingle(fromNullable(config2?.name), float2);
|
|
64350
64350
|
var integer4 = (config2) => makeSingle(fromNullable(config2?.name), integer3);
|
|
64351
64351
|
var none11 = /* @__PURE__ */ (() => {
|
|
@@ -64961,12 +64961,12 @@ var directory3 = (name, config2) => makeSingle2(name, empty2(), path("directory"
|
|
|
64961
64961
|
var file4 = (name, config2) => makeSingle2(name, empty2(), path("file", config2?.exists ?? "either"));
|
|
64962
64962
|
var fileContent3 = (name) => mapEffect8(file4(name, {
|
|
64963
64963
|
exists: "yes"
|
|
64964
|
-
}), (
|
|
64965
|
-
var fileParse3 = (name, format6) => mapEffect8(fileText3(name), ([
|
|
64964
|
+
}), (path7) => mapError2(read3(path7), (msg) => invalidValue(p(msg))));
|
|
64965
|
+
var fileParse3 = (name, format6) => mapEffect8(fileText3(name), ([path7, content]) => mapError2(parse5(path7, content, format6), (error4) => invalidValue(p(error4))));
|
|
64966
64966
|
var fileSchema3 = (name, schema, format6) => withSchema3(fileParse3(name, format6), schema);
|
|
64967
64967
|
var fileText3 = (name) => mapEffect8(file4(name, {
|
|
64968
64968
|
exists: "yes"
|
|
64969
|
-
}), (
|
|
64969
|
+
}), (path7) => mapError2(readString(path7), (error4) => invalidValue(p(error4))));
|
|
64970
64970
|
var filterMap8 = /* @__PURE__ */ dual(3, (self, f, message) => mapEffect8(self, (a) => match2(f(a), {
|
|
64971
64971
|
onNone: () => left2(invalidValue(p(message))),
|
|
64972
64972
|
onSome: right2
|
|
@@ -67168,13 +67168,13 @@ var Lesson = class {
|
|
|
67168
67168
|
);
|
|
67169
67169
|
}
|
|
67170
67170
|
};
|
|
67171
|
-
var getNameAndNumberFromPath = (
|
|
67172
|
-
const numSection =
|
|
67171
|
+
var getNameAndNumberFromPath = (path7) => {
|
|
67172
|
+
const numSection = path7.split("-")[0];
|
|
67173
67173
|
if (typeof numSection === "undefined") {
|
|
67174
67174
|
return Effect_exports.fail(
|
|
67175
67175
|
new InvalidPathError({
|
|
67176
|
-
path:
|
|
67177
|
-
message: `Could not retrieve number from path: ${
|
|
67176
|
+
path: path7,
|
|
67177
|
+
message: `Could not retrieve number from path: ${path7}`
|
|
67178
67178
|
})
|
|
67179
67179
|
);
|
|
67180
67180
|
}
|
|
@@ -67182,18 +67182,18 @@ var getNameAndNumberFromPath = (path6) => {
|
|
|
67182
67182
|
if (Number.isNaN(num)) {
|
|
67183
67183
|
return Effect_exports.fail(
|
|
67184
67184
|
new PathNumberIsNaNError({
|
|
67185
|
-
path:
|
|
67185
|
+
path: path7,
|
|
67186
67186
|
numSection,
|
|
67187
|
-
message: `Could not retrieve number from path: ${
|
|
67187
|
+
message: `Could not retrieve number from path: ${path7}`
|
|
67188
67188
|
})
|
|
67189
67189
|
);
|
|
67190
67190
|
}
|
|
67191
|
-
const name =
|
|
67191
|
+
const name = path7.split("-").slice(1).join("-");
|
|
67192
67192
|
if (!name) {
|
|
67193
67193
|
return Effect_exports.fail(
|
|
67194
67194
|
new InvalidPathError({
|
|
67195
|
-
path:
|
|
67196
|
-
message: `Could not retrieve name from path: ${
|
|
67195
|
+
path: path7,
|
|
67196
|
+
message: `Could not retrieve name from path: ${path7}`
|
|
67197
67197
|
})
|
|
67198
67198
|
);
|
|
67199
67199
|
}
|
|
@@ -67202,12 +67202,12 @@ var getNameAndNumberFromPath = (path6) => {
|
|
|
67202
67202
|
num
|
|
67203
67203
|
});
|
|
67204
67204
|
};
|
|
67205
|
-
var parseSection = Effect_exports.fn("parseSection")(function* (
|
|
67206
|
-
const { name, num } = yield* getNameAndNumberFromPath(
|
|
67205
|
+
var parseSection = Effect_exports.fn("parseSection")(function* (path7) {
|
|
67206
|
+
const { name, num } = yield* getNameAndNumberFromPath(path7);
|
|
67207
67207
|
return {
|
|
67208
67208
|
name,
|
|
67209
67209
|
num,
|
|
67210
|
-
path:
|
|
67210
|
+
path: path7
|
|
67211
67211
|
};
|
|
67212
67212
|
});
|
|
67213
67213
|
var filterMeOut = Symbol("filterMeOut");
|
|
@@ -67659,6 +67659,155 @@ var exercise = Command_exports2.make(
|
|
|
67659
67659
|
});
|
|
67660
67660
|
}
|
|
67661
67661
|
);
|
|
67662
|
+
var notFound2 = Symbol("notFound");
|
|
67663
|
+
var getNumberFromPathSegment = (path7) => {
|
|
67664
|
+
const numberSegment = path7.split("-")[0];
|
|
67665
|
+
return Number.isNaN(Number(numberSegment)) ? notFound2 : Number(numberSegment);
|
|
67666
|
+
};
|
|
67667
|
+
var startsWithNumber = (segment) => {
|
|
67668
|
+
const numberSegment = segment.split("-")[0];
|
|
67669
|
+
if (numberSegment === void 0) {
|
|
67670
|
+
return false;
|
|
67671
|
+
}
|
|
67672
|
+
return !Number.isNaN(Number(numberSegment));
|
|
67673
|
+
};
|
|
67674
|
+
var splitFilePath = (filePath) => filePath.split(path4__namespace.sep);
|
|
67675
|
+
var getSectionAndLessonNumberFromPath = (filePath) => {
|
|
67676
|
+
const segments = splitFilePath(filePath);
|
|
67677
|
+
const lastSegmentWithNumber = segments.findLastIndex(startsWithNumber);
|
|
67678
|
+
if (lastSegmentWithNumber === -1) {
|
|
67679
|
+
return notFound2;
|
|
67680
|
+
}
|
|
67681
|
+
const exerciseSegment = segments[lastSegmentWithNumber];
|
|
67682
|
+
const sectionSegment = segments[lastSegmentWithNumber - 1];
|
|
67683
|
+
if (sectionSegment === void 0) {
|
|
67684
|
+
return notFound2;
|
|
67685
|
+
}
|
|
67686
|
+
const sectionNumber = getNumberFromPathSegment(sectionSegment);
|
|
67687
|
+
if (sectionNumber === notFound2) {
|
|
67688
|
+
return notFound2;
|
|
67689
|
+
}
|
|
67690
|
+
const lessonNumber = getNumberFromPathSegment(exerciseSegment);
|
|
67691
|
+
if (lessonNumber === notFound2) {
|
|
67692
|
+
return notFound2;
|
|
67693
|
+
}
|
|
67694
|
+
return {
|
|
67695
|
+
sectionNumber,
|
|
67696
|
+
lessonNumber,
|
|
67697
|
+
lessonPathWithNumber: exerciseSegment,
|
|
67698
|
+
sectionPathWithNumber: sectionSegment
|
|
67699
|
+
};
|
|
67700
|
+
};
|
|
67701
|
+
var unique = (arr) => [...new Set(arr)];
|
|
67702
|
+
var mapToLessonPath = (filePath) => {
|
|
67703
|
+
const sectionAndLessonNumber = getSectionAndLessonNumberFromPath(filePath);
|
|
67704
|
+
if (sectionAndLessonNumber === notFound2) {
|
|
67705
|
+
return notFound2;
|
|
67706
|
+
}
|
|
67707
|
+
return `${sectionAndLessonNumber.sectionPathWithNumber}${path4__namespace.sep}${sectionAndLessonNumber.lessonPathWithNumber}`;
|
|
67708
|
+
};
|
|
67709
|
+
var getChangedFiles = (rawDiffOutput) => {
|
|
67710
|
+
const splitDiffOutput = rawDiffOutput.trim().split("\n").filter(Boolean);
|
|
67711
|
+
const renamedFiles = splitDiffOutput.filter((line4) => line4.includes("rename")).map((line4) => {
|
|
67712
|
+
line4 = line4.replace(/\s*\(\d+%\)$/, "");
|
|
67713
|
+
const match17 = line4.match(
|
|
67714
|
+
/rename (.*?){(.+?) => (.+?)}(.*)/
|
|
67715
|
+
);
|
|
67716
|
+
if (!match17) return null;
|
|
67717
|
+
const [, prefix, oldSegment, newSegment, suffix] = match17;
|
|
67718
|
+
const oldPath = prefix + oldSegment + suffix;
|
|
67719
|
+
const newPath = prefix + newSegment + suffix;
|
|
67720
|
+
return { oldPath, newPath };
|
|
67721
|
+
}).filter((m) => m !== null);
|
|
67722
|
+
const createdFiles = splitDiffOutput.filter((line4) => line4.includes("create")).map((line4) => line4.replace(/^create mode \d+/, "").trim());
|
|
67723
|
+
const deletedFiles = splitDiffOutput.filter((line4) => line4.includes("delete")).map((line4) => line4.replace(/^delete mode \d+/, "").trim());
|
|
67724
|
+
return {
|
|
67725
|
+
created: unique(
|
|
67726
|
+
createdFiles.map(mapToLessonPath).filter((m) => m !== notFound2)
|
|
67727
|
+
),
|
|
67728
|
+
deleted: unique(
|
|
67729
|
+
deletedFiles.map(mapToLessonPath).filter((m) => m !== notFound2)
|
|
67730
|
+
),
|
|
67731
|
+
renamed: renamedFiles.reduce((acc, m) => {
|
|
67732
|
+
const oldPath = mapToLessonPath(m.oldPath);
|
|
67733
|
+
const newPath = mapToLessonPath(m.newPath);
|
|
67734
|
+
if (oldPath === notFound2 || newPath === notFound2) {
|
|
67735
|
+
return acc;
|
|
67736
|
+
}
|
|
67737
|
+
acc[oldPath] = newPath;
|
|
67738
|
+
return acc;
|
|
67739
|
+
}, {})
|
|
67740
|
+
};
|
|
67741
|
+
};
|
|
67742
|
+
var updateCVM = Command_exports2.make(
|
|
67743
|
+
"update-cvm",
|
|
67744
|
+
{
|
|
67745
|
+
root: Options_exports.text("root").pipe(
|
|
67746
|
+
Options_exports.withDescription(
|
|
67747
|
+
"The root directory of the exercises"
|
|
67748
|
+
),
|
|
67749
|
+
Options_exports.withDefault(path4__namespace.join(process.cwd(), "exercises"))
|
|
67750
|
+
)
|
|
67751
|
+
},
|
|
67752
|
+
({ root }) => Effect_exports.gen(function* () {
|
|
67753
|
+
if (!process.env.ALWAYS_UPDATE_CVM) {
|
|
67754
|
+
yield* Effect_exports.log(
|
|
67755
|
+
"[update-cvm] Skipping CVM update because ALWAYS_UPDATE_CVM is not set in the environment"
|
|
67756
|
+
);
|
|
67757
|
+
return;
|
|
67758
|
+
}
|
|
67759
|
+
const diffCommand = Command_exports.make(
|
|
67760
|
+
"git",
|
|
67761
|
+
"diff",
|
|
67762
|
+
"--summary",
|
|
67763
|
+
"--cached"
|
|
67764
|
+
);
|
|
67765
|
+
const diff8 = yield* Command_exports.string(diffCommand);
|
|
67766
|
+
const changedFiles = getChangedFiles(diff8);
|
|
67767
|
+
if (changedFiles.created.length === 0 && changedFiles.deleted.length === 0 && Object.keys(changedFiles.renamed).length === 0) {
|
|
67768
|
+
yield* Effect_exports.log("[update-cvm] No changes to the CVM");
|
|
67769
|
+
return;
|
|
67770
|
+
}
|
|
67771
|
+
const filteredDeletedLessons = changedFiles.deleted.filter(
|
|
67772
|
+
(lesson) => {
|
|
67773
|
+
const lessonPath = path4__namespace.join(root, lesson);
|
|
67774
|
+
return !NFS.existsSync(lessonPath);
|
|
67775
|
+
}
|
|
67776
|
+
);
|
|
67777
|
+
const wasPingSuccessful = yield* Effect_exports.promise(
|
|
67778
|
+
() => fetch("http://localhost:5173/api/ping")
|
|
67779
|
+
).pipe(Effect_exports.map((res) => res.ok));
|
|
67780
|
+
if (!wasPingSuccessful) {
|
|
67781
|
+
yield* Effect_exports.logError(
|
|
67782
|
+
"[update-cvm] Failed to ping the CVM - is the CVM running?"
|
|
67783
|
+
);
|
|
67784
|
+
return;
|
|
67785
|
+
}
|
|
67786
|
+
const updateResponse = yield* Effect_exports.promise(
|
|
67787
|
+
() => fetch("http://localhost:5173/api/repos/update", {
|
|
67788
|
+
method: "POST",
|
|
67789
|
+
body: JSON.stringify({
|
|
67790
|
+
filePath: root,
|
|
67791
|
+
modifiedLessons: changedFiles.renamed,
|
|
67792
|
+
addedLessons: changedFiles.created,
|
|
67793
|
+
deletedLessons: filteredDeletedLessons
|
|
67794
|
+
})
|
|
67795
|
+
})
|
|
67796
|
+
);
|
|
67797
|
+
if (!updateResponse.ok) {
|
|
67798
|
+
const output = yield* Effect_exports.promise(
|
|
67799
|
+
() => updateResponse.text()
|
|
67800
|
+
);
|
|
67801
|
+
yield* Effect_exports.logError(
|
|
67802
|
+
"[update-cvm] Failed to update the CVM: " + output
|
|
67803
|
+
);
|
|
67804
|
+
return;
|
|
67805
|
+
}
|
|
67806
|
+
yield* Effect_exports.log(
|
|
67807
|
+
"[update-cvm] Successfully updated the CVM"
|
|
67808
|
+
);
|
|
67809
|
+
})
|
|
67810
|
+
);
|
|
67662
67811
|
|
|
67663
67812
|
// src/internal/internal.ts
|
|
67664
67813
|
var upgradePackages = Command_exports2.make(
|
|
@@ -67682,9 +67831,9 @@ var upgradePackages = Command_exports2.make(
|
|
|
67682
67831
|
const updateCommand = Command_exports.make(
|
|
67683
67832
|
"pnpm",
|
|
67684
67833
|
"upgrade",
|
|
67685
|
-
"ai",
|
|
67686
|
-
"@ai-sdk
|
|
67687
|
-
"ai-hero-cli"
|
|
67834
|
+
"ai@latest",
|
|
67835
|
+
"@ai-sdk/*@latest",
|
|
67836
|
+
"ai-hero-cli@latest"
|
|
67688
67837
|
).pipe(
|
|
67689
67838
|
verbose ? Command_exports.stdout("inherit") : Command_exports.stdout("pipe"),
|
|
67690
67839
|
verbose ? Command_exports.stderr("inherit") : Command_exports.stderr("pipe"),
|
|
@@ -67694,7 +67843,7 @@ var upgradePackages = Command_exports2.make(
|
|
|
67694
67843
|
if (exitCode3 === 0) {
|
|
67695
67844
|
yield* Console_exports.log("Successfully upgraded");
|
|
67696
67845
|
} else {
|
|
67697
|
-
yield* Console_exports.
|
|
67846
|
+
yield* Console_exports.error(
|
|
67698
67847
|
"Failed to upgrade. Please try again."
|
|
67699
67848
|
);
|
|
67700
67849
|
}
|
|
@@ -67703,7 +67852,7 @@ var upgradePackages = Command_exports2.make(
|
|
|
67703
67852
|
Command_exports2.withDescription("Upgrade the AI SDK packages")
|
|
67704
67853
|
);
|
|
67705
67854
|
var internal = Command_exports2.make("internal").pipe(
|
|
67706
|
-
Command_exports2.withSubcommands([upgradePackages]),
|
|
67855
|
+
Command_exports2.withSubcommands([upgradePackages, updateCVM]),
|
|
67707
67856
|
Command_exports2.withDescription("Internal commands for AI Hero")
|
|
67708
67857
|
);
|
|
67709
67858
|
|