@devasign/verify 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +309 -251
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -29,9 +29,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
mod
|
|
30
30
|
));
|
|
31
31
|
|
|
32
|
-
//
|
|
32
|
+
// node_modules/yaml/dist/nodes/identity.js
|
|
33
33
|
var require_identity = __commonJS({
|
|
34
|
-
"
|
|
34
|
+
"node_modules/yaml/dist/nodes/identity.js"(exports) {
|
|
35
35
|
"use strict";
|
|
36
36
|
var ALIAS = Symbol.for("yaml.alias"), DOC = Symbol.for("yaml.document"), MAP = Symbol.for("yaml.map"), PAIR = Symbol.for("yaml.pair"), SCALAR = Symbol.for("yaml.scalar"), SEQ = Symbol.for("yaml.seq"), NODE_TYPE = Symbol.for("yaml.node.type"), isAlias = (node) => !!node && typeof node == "object" && node[NODE_TYPE] === ALIAS, isDocument = (node) => !!node && typeof node == "object" && node[NODE_TYPE] === DOC, isMap = (node) => !!node && typeof node == "object" && node[NODE_TYPE] === MAP, isPair = (node) => !!node && typeof node == "object" && node[NODE_TYPE] === PAIR, isScalar = (node) => !!node && typeof node == "object" && node[NODE_TYPE] === SCALAR, isSeq = (node) => !!node && typeof node == "object" && node[NODE_TYPE] === SEQ;
|
|
37
37
|
function isCollection(node) {
|
|
@@ -74,9 +74,9 @@ var require_identity = __commonJS({
|
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
-
//
|
|
77
|
+
// node_modules/yaml/dist/visit.js
|
|
78
78
|
var require_visit = __commonJS({
|
|
79
|
-
"
|
|
79
|
+
"node_modules/yaml/dist/visit.js"(exports) {
|
|
80
80
|
"use strict";
|
|
81
81
|
var identity = require_identity(), BREAK = Symbol("break visit"), SKIP = Symbol("skip children"), REMOVE = Symbol("remove node");
|
|
82
82
|
function visit(node, visitor) {
|
|
@@ -86,15 +86,15 @@ var require_visit = __commonJS({
|
|
|
86
86
|
visit.BREAK = BREAK;
|
|
87
87
|
visit.SKIP = SKIP;
|
|
88
88
|
visit.REMOVE = REMOVE;
|
|
89
|
-
function visit_(key, node, visitor,
|
|
90
|
-
let ctrl = callVisitor(key, node, visitor,
|
|
89
|
+
function visit_(key, node, visitor, path9) {
|
|
90
|
+
let ctrl = callVisitor(key, node, visitor, path9);
|
|
91
91
|
if (identity.isNode(ctrl) || identity.isPair(ctrl))
|
|
92
|
-
return replaceNode(key,
|
|
92
|
+
return replaceNode(key, path9, ctrl), visit_(key, ctrl, visitor, path9);
|
|
93
93
|
if (typeof ctrl != "symbol") {
|
|
94
94
|
if (identity.isCollection(node)) {
|
|
95
|
-
|
|
95
|
+
path9 = Object.freeze(path9.concat(node));
|
|
96
96
|
for (let i = 0; i < node.items.length; ++i) {
|
|
97
|
-
let ci = visit_(i, node.items[i], visitor,
|
|
97
|
+
let ci = visit_(i, node.items[i], visitor, path9);
|
|
98
98
|
if (typeof ci == "number")
|
|
99
99
|
i = ci - 1;
|
|
100
100
|
else {
|
|
@@ -104,12 +104,12 @@ var require_visit = __commonJS({
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
} else if (identity.isPair(node)) {
|
|
107
|
-
|
|
108
|
-
let ck = visit_("key", node.key, visitor,
|
|
107
|
+
path9 = Object.freeze(path9.concat(node));
|
|
108
|
+
let ck = visit_("key", node.key, visitor, path9);
|
|
109
109
|
if (ck === BREAK)
|
|
110
110
|
return BREAK;
|
|
111
111
|
ck === REMOVE && (node.key = null);
|
|
112
|
-
let cv = visit_("value", node.value, visitor,
|
|
112
|
+
let cv = visit_("value", node.value, visitor, path9);
|
|
113
113
|
if (cv === BREAK)
|
|
114
114
|
return BREAK;
|
|
115
115
|
cv === REMOVE && (node.value = null);
|
|
@@ -124,15 +124,15 @@ var require_visit = __commonJS({
|
|
|
124
124
|
visitAsync.BREAK = BREAK;
|
|
125
125
|
visitAsync.SKIP = SKIP;
|
|
126
126
|
visitAsync.REMOVE = REMOVE;
|
|
127
|
-
async function visitAsync_(key, node, visitor,
|
|
128
|
-
let ctrl = await callVisitor(key, node, visitor,
|
|
127
|
+
async function visitAsync_(key, node, visitor, path9) {
|
|
128
|
+
let ctrl = await callVisitor(key, node, visitor, path9);
|
|
129
129
|
if (identity.isNode(ctrl) || identity.isPair(ctrl))
|
|
130
|
-
return replaceNode(key,
|
|
130
|
+
return replaceNode(key, path9, ctrl), visitAsync_(key, ctrl, visitor, path9);
|
|
131
131
|
if (typeof ctrl != "symbol") {
|
|
132
132
|
if (identity.isCollection(node)) {
|
|
133
|
-
|
|
133
|
+
path9 = Object.freeze(path9.concat(node));
|
|
134
134
|
for (let i = 0; i < node.items.length; ++i) {
|
|
135
|
-
let ci = await visitAsync_(i, node.items[i], visitor,
|
|
135
|
+
let ci = await visitAsync_(i, node.items[i], visitor, path9);
|
|
136
136
|
if (typeof ci == "number")
|
|
137
137
|
i = ci - 1;
|
|
138
138
|
else {
|
|
@@ -142,12 +142,12 @@ var require_visit = __commonJS({
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
} else if (identity.isPair(node)) {
|
|
145
|
-
|
|
146
|
-
let ck = await visitAsync_("key", node.key, visitor,
|
|
145
|
+
path9 = Object.freeze(path9.concat(node));
|
|
146
|
+
let ck = await visitAsync_("key", node.key, visitor, path9);
|
|
147
147
|
if (ck === BREAK)
|
|
148
148
|
return BREAK;
|
|
149
149
|
ck === REMOVE && (node.key = null);
|
|
150
|
-
let cv = await visitAsync_("value", node.value, visitor,
|
|
150
|
+
let cv = await visitAsync_("value", node.value, visitor, path9);
|
|
151
151
|
if (cv === BREAK)
|
|
152
152
|
return BREAK;
|
|
153
153
|
cv === REMOVE && (node.value = null);
|
|
@@ -170,22 +170,22 @@ var require_visit = __commonJS({
|
|
|
170
170
|
Seq: visitor.Collection
|
|
171
171
|
}, visitor) : visitor;
|
|
172
172
|
}
|
|
173
|
-
function callVisitor(key, node, visitor,
|
|
173
|
+
function callVisitor(key, node, visitor, path9) {
|
|
174
174
|
if (typeof visitor == "function")
|
|
175
|
-
return visitor(key, node,
|
|
175
|
+
return visitor(key, node, path9);
|
|
176
176
|
if (identity.isMap(node))
|
|
177
|
-
return visitor.Map?.(key, node,
|
|
177
|
+
return visitor.Map?.(key, node, path9);
|
|
178
178
|
if (identity.isSeq(node))
|
|
179
|
-
return visitor.Seq?.(key, node,
|
|
179
|
+
return visitor.Seq?.(key, node, path9);
|
|
180
180
|
if (identity.isPair(node))
|
|
181
|
-
return visitor.Pair?.(key, node,
|
|
181
|
+
return visitor.Pair?.(key, node, path9);
|
|
182
182
|
if (identity.isScalar(node))
|
|
183
|
-
return visitor.Scalar?.(key, node,
|
|
183
|
+
return visitor.Scalar?.(key, node, path9);
|
|
184
184
|
if (identity.isAlias(node))
|
|
185
|
-
return visitor.Alias?.(key, node,
|
|
185
|
+
return visitor.Alias?.(key, node, path9);
|
|
186
186
|
}
|
|
187
|
-
function replaceNode(key,
|
|
188
|
-
let parent =
|
|
187
|
+
function replaceNode(key, path9, node) {
|
|
188
|
+
let parent = path9[path9.length - 1];
|
|
189
189
|
if (identity.isCollection(parent))
|
|
190
190
|
parent.items[key] = node;
|
|
191
191
|
else if (identity.isPair(parent))
|
|
@@ -202,9 +202,9 @@ var require_visit = __commonJS({
|
|
|
202
202
|
}
|
|
203
203
|
});
|
|
204
204
|
|
|
205
|
-
//
|
|
205
|
+
// node_modules/yaml/dist/doc/directives.js
|
|
206
206
|
var require_directives = __commonJS({
|
|
207
|
-
"
|
|
207
|
+
"node_modules/yaml/dist/doc/directives.js"(exports) {
|
|
208
208
|
"use strict";
|
|
209
209
|
var identity = require_identity(), visit = require_visit(), escapeChars = {
|
|
210
210
|
"!": "%21",
|
|
@@ -326,9 +326,9 @@ var require_directives = __commonJS({
|
|
|
326
326
|
}
|
|
327
327
|
});
|
|
328
328
|
|
|
329
|
-
//
|
|
329
|
+
// node_modules/yaml/dist/doc/anchors.js
|
|
330
330
|
var require_anchors = __commonJS({
|
|
331
|
-
"
|
|
331
|
+
"node_modules/yaml/dist/doc/anchors.js"(exports) {
|
|
332
332
|
"use strict";
|
|
333
333
|
var identity = require_identity(), visit = require_visit();
|
|
334
334
|
function anchorIsValid(anchor) {
|
|
@@ -387,9 +387,9 @@ var require_anchors = __commonJS({
|
|
|
387
387
|
}
|
|
388
388
|
});
|
|
389
389
|
|
|
390
|
-
//
|
|
390
|
+
// node_modules/yaml/dist/doc/applyReviver.js
|
|
391
391
|
var require_applyReviver = __commonJS({
|
|
392
|
-
"
|
|
392
|
+
"node_modules/yaml/dist/doc/applyReviver.js"(exports) {
|
|
393
393
|
"use strict";
|
|
394
394
|
function applyReviver(reviver, obj, key, val) {
|
|
395
395
|
if (val && typeof val == "object")
|
|
@@ -419,9 +419,9 @@ var require_applyReviver = __commonJS({
|
|
|
419
419
|
}
|
|
420
420
|
});
|
|
421
421
|
|
|
422
|
-
//
|
|
422
|
+
// node_modules/yaml/dist/nodes/toJS.js
|
|
423
423
|
var require_toJS = __commonJS({
|
|
424
|
-
"
|
|
424
|
+
"node_modules/yaml/dist/nodes/toJS.js"(exports) {
|
|
425
425
|
"use strict";
|
|
426
426
|
var identity = require_identity();
|
|
427
427
|
function toJS(value, arg, ctx) {
|
|
@@ -443,9 +443,9 @@ var require_toJS = __commonJS({
|
|
|
443
443
|
}
|
|
444
444
|
});
|
|
445
445
|
|
|
446
|
-
//
|
|
446
|
+
// node_modules/yaml/dist/nodes/Node.js
|
|
447
447
|
var require_Node = __commonJS({
|
|
448
|
-
"
|
|
448
|
+
"node_modules/yaml/dist/nodes/Node.js"(exports) {
|
|
449
449
|
"use strict";
|
|
450
450
|
var applyReviver = require_applyReviver(), identity = require_identity(), toJS = require_toJS(), NodeBase = class {
|
|
451
451
|
constructor(type) {
|
|
@@ -478,9 +478,9 @@ var require_Node = __commonJS({
|
|
|
478
478
|
}
|
|
479
479
|
});
|
|
480
480
|
|
|
481
|
-
//
|
|
481
|
+
// node_modules/yaml/dist/nodes/Alias.js
|
|
482
482
|
var require_Alias = __commonJS({
|
|
483
|
-
"
|
|
483
|
+
"node_modules/yaml/dist/nodes/Alias.js"(exports) {
|
|
484
484
|
"use strict";
|
|
485
485
|
var anchors = require_anchors(), visit = require_visit(), identity = require_identity(), Node = require_Node(), toJS = require_toJS(), Alias = class extends Node.NodeBase {
|
|
486
486
|
constructor(source) {
|
|
@@ -564,9 +564,9 @@ var require_Alias = __commonJS({
|
|
|
564
564
|
}
|
|
565
565
|
});
|
|
566
566
|
|
|
567
|
-
//
|
|
567
|
+
// node_modules/yaml/dist/nodes/Scalar.js
|
|
568
568
|
var require_Scalar = __commonJS({
|
|
569
|
-
"
|
|
569
|
+
"node_modules/yaml/dist/nodes/Scalar.js"(exports) {
|
|
570
570
|
"use strict";
|
|
571
571
|
var identity = require_identity(), Node = require_Node(), toJS = require_toJS(), isScalarValue = (value) => !value || typeof value != "function" && typeof value != "object", Scalar = class extends Node.NodeBase {
|
|
572
572
|
constructor(value) {
|
|
@@ -589,9 +589,9 @@ var require_Scalar = __commonJS({
|
|
|
589
589
|
}
|
|
590
590
|
});
|
|
591
591
|
|
|
592
|
-
//
|
|
592
|
+
// node_modules/yaml/dist/doc/createNode.js
|
|
593
593
|
var require_createNode = __commonJS({
|
|
594
|
-
"
|
|
594
|
+
"node_modules/yaml/dist/doc/createNode.js"(exports) {
|
|
595
595
|
"use strict";
|
|
596
596
|
var Alias = require_Alias(), identity = require_identity(), Scalar = require_Scalar(), defaultTagPrefix = "tag:yaml.org,2002:";
|
|
597
597
|
function findTagObject(value, tagName, tags) {
|
|
@@ -634,15 +634,15 @@ var require_createNode = __commonJS({
|
|
|
634
634
|
}
|
|
635
635
|
});
|
|
636
636
|
|
|
637
|
-
//
|
|
637
|
+
// node_modules/yaml/dist/nodes/Collection.js
|
|
638
638
|
var require_Collection = __commonJS({
|
|
639
|
-
"
|
|
639
|
+
"node_modules/yaml/dist/nodes/Collection.js"(exports) {
|
|
640
640
|
"use strict";
|
|
641
641
|
var createNode = require_createNode(), identity = require_identity(), Node = require_Node();
|
|
642
|
-
function collectionFromPath(schema,
|
|
642
|
+
function collectionFromPath(schema, path9, value) {
|
|
643
643
|
let v = value;
|
|
644
|
-
for (let i =
|
|
645
|
-
let k =
|
|
644
|
+
for (let i = path9.length - 1; i >= 0; --i) {
|
|
645
|
+
let k = path9[i];
|
|
646
646
|
if (typeof k == "number" && Number.isInteger(k) && k >= 0) {
|
|
647
647
|
let a = [];
|
|
648
648
|
a[k] = v, v = a;
|
|
@@ -659,7 +659,7 @@ var require_Collection = __commonJS({
|
|
|
659
659
|
sourceObjects: /* @__PURE__ */ new Map()
|
|
660
660
|
});
|
|
661
661
|
}
|
|
662
|
-
var isEmptyPath = (
|
|
662
|
+
var isEmptyPath = (path9) => path9 == null || typeof path9 == "object" && !!path9[Symbol.iterator]().next().done, Collection = class extends Node.NodeBase {
|
|
663
663
|
constructor(type, schema) {
|
|
664
664
|
super(type), Object.defineProperty(this, "schema", {
|
|
665
665
|
value: schema,
|
|
@@ -682,11 +682,11 @@ var require_Collection = __commonJS({
|
|
|
682
682
|
* be a Pair instance or a `{ key, value }` object, which may not have a key
|
|
683
683
|
* that already exists in the map.
|
|
684
684
|
*/
|
|
685
|
-
addIn(
|
|
686
|
-
if (isEmptyPath(
|
|
685
|
+
addIn(path9, value) {
|
|
686
|
+
if (isEmptyPath(path9))
|
|
687
687
|
this.add(value);
|
|
688
688
|
else {
|
|
689
|
-
let [key, ...rest] =
|
|
689
|
+
let [key, ...rest] = path9, node = this.get(key, !0);
|
|
690
690
|
if (identity.isCollection(node))
|
|
691
691
|
node.addIn(rest, value);
|
|
692
692
|
else if (node === void 0 && this.schema)
|
|
@@ -699,8 +699,8 @@ var require_Collection = __commonJS({
|
|
|
699
699
|
* Removes a value from the collection.
|
|
700
700
|
* @returns `true` if the item was found and removed.
|
|
701
701
|
*/
|
|
702
|
-
deleteIn(
|
|
703
|
-
let [key, ...rest] =
|
|
702
|
+
deleteIn(path9) {
|
|
703
|
+
let [key, ...rest] = path9;
|
|
704
704
|
if (rest.length === 0)
|
|
705
705
|
return this.delete(key);
|
|
706
706
|
let node = this.get(key, !0);
|
|
@@ -713,8 +713,8 @@ var require_Collection = __commonJS({
|
|
|
713
713
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
714
714
|
* `true` (collections are always returned intact).
|
|
715
715
|
*/
|
|
716
|
-
getIn(
|
|
717
|
-
let [key, ...rest] =
|
|
716
|
+
getIn(path9, keepScalar) {
|
|
717
|
+
let [key, ...rest] = path9, node = this.get(key, !0);
|
|
718
718
|
return rest.length === 0 ? !keepScalar && identity.isScalar(node) ? node.value : node : identity.isCollection(node) ? node.getIn(rest, keepScalar) : void 0;
|
|
719
719
|
}
|
|
720
720
|
hasAllNullValues(allowScalar) {
|
|
@@ -728,8 +728,8 @@ var require_Collection = __commonJS({
|
|
|
728
728
|
/**
|
|
729
729
|
* Checks if the collection includes a value with the key `key`.
|
|
730
730
|
*/
|
|
731
|
-
hasIn(
|
|
732
|
-
let [key, ...rest] =
|
|
731
|
+
hasIn(path9) {
|
|
732
|
+
let [key, ...rest] = path9;
|
|
733
733
|
if (rest.length === 0)
|
|
734
734
|
return this.has(key);
|
|
735
735
|
let node = this.get(key, !0);
|
|
@@ -739,8 +739,8 @@ var require_Collection = __commonJS({
|
|
|
739
739
|
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
740
740
|
* boolean to add/remove the item from the set.
|
|
741
741
|
*/
|
|
742
|
-
setIn(
|
|
743
|
-
let [key, ...rest] =
|
|
742
|
+
setIn(path9, value) {
|
|
743
|
+
let [key, ...rest] = path9;
|
|
744
744
|
if (rest.length === 0)
|
|
745
745
|
this.set(key, value);
|
|
746
746
|
else {
|
|
@@ -760,9 +760,9 @@ var require_Collection = __commonJS({
|
|
|
760
760
|
}
|
|
761
761
|
});
|
|
762
762
|
|
|
763
|
-
//
|
|
763
|
+
// node_modules/yaml/dist/stringify/stringifyComment.js
|
|
764
764
|
var require_stringifyComment = __commonJS({
|
|
765
|
-
"
|
|
765
|
+
"node_modules/yaml/dist/stringify/stringifyComment.js"(exports) {
|
|
766
766
|
"use strict";
|
|
767
767
|
var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
|
|
768
768
|
function indentComment(comment, indent) {
|
|
@@ -778,9 +778,9 @@ var require_stringifyComment = __commonJS({
|
|
|
778
778
|
}
|
|
779
779
|
});
|
|
780
780
|
|
|
781
|
-
//
|
|
781
|
+
// node_modules/yaml/dist/stringify/foldFlowLines.js
|
|
782
782
|
var require_foldFlowLines = __commonJS({
|
|
783
|
-
"
|
|
783
|
+
"node_modules/yaml/dist/stringify/foldFlowLines.js"(exports) {
|
|
784
784
|
"use strict";
|
|
785
785
|
var FOLD_FLOW = "flow", FOLD_BLOCK = "block", FOLD_QUOTED = "quoted";
|
|
786
786
|
function foldFlowLines(text, indent, mode = "flow", { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {
|
|
@@ -869,9 +869,9 @@ ${indent}${text.slice(fold + 1, end2)}`);
|
|
|
869
869
|
}
|
|
870
870
|
});
|
|
871
871
|
|
|
872
|
-
//
|
|
872
|
+
// node_modules/yaml/dist/stringify/stringifyString.js
|
|
873
873
|
var require_stringifyString = __commonJS({
|
|
874
|
-
"
|
|
874
|
+
"node_modules/yaml/dist/stringify/stringifyString.js"(exports) {
|
|
875
875
|
"use strict";
|
|
876
876
|
var Scalar = require_Scalar(), foldFlowLines = require_foldFlowLines(), getFoldOptions = (ctx, isBlock) => ({
|
|
877
877
|
indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,
|
|
@@ -1084,9 +1084,9 @@ ${indent}`);
|
|
|
1084
1084
|
}
|
|
1085
1085
|
});
|
|
1086
1086
|
|
|
1087
|
-
//
|
|
1087
|
+
// node_modules/yaml/dist/stringify/stringify.js
|
|
1088
1088
|
var require_stringify = __commonJS({
|
|
1089
|
-
"
|
|
1089
|
+
"node_modules/yaml/dist/stringify/stringify.js"(exports) {
|
|
1090
1090
|
"use strict";
|
|
1091
1091
|
var anchors = require_anchors(), identity = require_identity(), stringifyComment = require_stringifyComment(), stringifyString = require_stringifyString();
|
|
1092
1092
|
function createStringifyContext(doc, options) {
|
|
@@ -1184,9 +1184,9 @@ ${ctx.indent}${str}` : str;
|
|
|
1184
1184
|
}
|
|
1185
1185
|
});
|
|
1186
1186
|
|
|
1187
|
-
//
|
|
1187
|
+
// node_modules/yaml/dist/stringify/stringifyPair.js
|
|
1188
1188
|
var require_stringifyPair = __commonJS({
|
|
1189
|
-
"
|
|
1189
|
+
"node_modules/yaml/dist/stringify/stringifyPair.js"(exports) {
|
|
1190
1190
|
"use strict";
|
|
1191
1191
|
var identity = require_identity(), Scalar = require_Scalar(), stringify = require_stringify(), stringifyComment = require_stringifyComment();
|
|
1192
1192
|
function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
|
|
@@ -1253,9 +1253,9 @@ ${ctx.indent}`);
|
|
|
1253
1253
|
}
|
|
1254
1254
|
});
|
|
1255
1255
|
|
|
1256
|
-
//
|
|
1256
|
+
// node_modules/yaml/dist/log.js
|
|
1257
1257
|
var require_log = __commonJS({
|
|
1258
|
-
"
|
|
1258
|
+
"node_modules/yaml/dist/log.js"(exports) {
|
|
1259
1259
|
"use strict";
|
|
1260
1260
|
var node_process = __require("process");
|
|
1261
1261
|
function debug(logLevel, ...messages) {
|
|
@@ -1269,9 +1269,9 @@ var require_log = __commonJS({
|
|
|
1269
1269
|
}
|
|
1270
1270
|
});
|
|
1271
1271
|
|
|
1272
|
-
//
|
|
1272
|
+
// node_modules/yaml/dist/schema/yaml-1.1/merge.js
|
|
1273
1273
|
var require_merge = __commonJS({
|
|
1274
|
-
"
|
|
1274
|
+
"node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports) {
|
|
1275
1275
|
"use strict";
|
|
1276
1276
|
var identity = require_identity(), Scalar = require_Scalar(), MERGE_KEY = "<<", merge = {
|
|
1277
1277
|
identify: (value) => value === MERGE_KEY || typeof value == "symbol" && value.description === MERGE_KEY,
|
|
@@ -1317,9 +1317,9 @@ var require_merge = __commonJS({
|
|
|
1317
1317
|
}
|
|
1318
1318
|
});
|
|
1319
1319
|
|
|
1320
|
-
//
|
|
1320
|
+
// node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
1321
1321
|
var require_addPairToJSMap = __commonJS({
|
|
1322
|
-
"
|
|
1322
|
+
"node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports) {
|
|
1323
1323
|
"use strict";
|
|
1324
1324
|
var log2 = require_log(), merge = require_merge(), stringify = require_stringify(), identity = require_identity(), toJS = require_toJS();
|
|
1325
1325
|
function addPairToJSMap(ctx, map, { key, value }) {
|
|
@@ -1369,9 +1369,9 @@ var require_addPairToJSMap = __commonJS({
|
|
|
1369
1369
|
}
|
|
1370
1370
|
});
|
|
1371
1371
|
|
|
1372
|
-
//
|
|
1372
|
+
// node_modules/yaml/dist/nodes/Pair.js
|
|
1373
1373
|
var require_Pair = __commonJS({
|
|
1374
|
-
"
|
|
1374
|
+
"node_modules/yaml/dist/nodes/Pair.js"(exports) {
|
|
1375
1375
|
"use strict";
|
|
1376
1376
|
var createNode = require_createNode(), stringifyPair = require_stringifyPair(), addPairToJSMap = require_addPairToJSMap(), identity = require_identity();
|
|
1377
1377
|
function createPair(key, value, ctx) {
|
|
@@ -1399,9 +1399,9 @@ var require_Pair = __commonJS({
|
|
|
1399
1399
|
}
|
|
1400
1400
|
});
|
|
1401
1401
|
|
|
1402
|
-
//
|
|
1402
|
+
// node_modules/yaml/dist/stringify/stringifyCollection.js
|
|
1403
1403
|
var require_stringifyCollection = __commonJS({
|
|
1404
|
-
"
|
|
1404
|
+
"node_modules/yaml/dist/stringify/stringifyCollection.js"(exports) {
|
|
1405
1405
|
"use strict";
|
|
1406
1406
|
var identity = require_identity(), stringify = require_stringify(), stringifyComment = require_stringifyComment();
|
|
1407
1407
|
function stringifyCollection(collection, ctx, options) {
|
|
@@ -1487,9 +1487,9 @@ ${indent}${end}`;
|
|
|
1487
1487
|
}
|
|
1488
1488
|
});
|
|
1489
1489
|
|
|
1490
|
-
//
|
|
1490
|
+
// node_modules/yaml/dist/nodes/YAMLMap.js
|
|
1491
1491
|
var require_YAMLMap = __commonJS({
|
|
1492
|
-
"
|
|
1492
|
+
"node_modules/yaml/dist/nodes/YAMLMap.js"(exports) {
|
|
1493
1493
|
"use strict";
|
|
1494
1494
|
var stringifyCollection = require_stringifyCollection(), addPairToJSMap = require_addPairToJSMap(), Collection = require_Collection(), identity = require_identity(), Pair = require_Pair(), Scalar = require_Scalar();
|
|
1495
1495
|
function findPair(items, key) {
|
|
@@ -1591,9 +1591,9 @@ var require_YAMLMap = __commonJS({
|
|
|
1591
1591
|
}
|
|
1592
1592
|
});
|
|
1593
1593
|
|
|
1594
|
-
//
|
|
1594
|
+
// node_modules/yaml/dist/schema/common/map.js
|
|
1595
1595
|
var require_map = __commonJS({
|
|
1596
|
-
"
|
|
1596
|
+
"node_modules/yaml/dist/schema/common/map.js"(exports) {
|
|
1597
1597
|
"use strict";
|
|
1598
1598
|
var identity = require_identity(), YAMLMap = require_YAMLMap(), map = {
|
|
1599
1599
|
collection: "map",
|
|
@@ -1609,9 +1609,9 @@ var require_map = __commonJS({
|
|
|
1609
1609
|
}
|
|
1610
1610
|
});
|
|
1611
1611
|
|
|
1612
|
-
//
|
|
1612
|
+
// node_modules/yaml/dist/nodes/YAMLSeq.js
|
|
1613
1613
|
var require_YAMLSeq = __commonJS({
|
|
1614
|
-
"
|
|
1614
|
+
"node_modules/yaml/dist/nodes/YAMLSeq.js"(exports) {
|
|
1615
1615
|
"use strict";
|
|
1616
1616
|
var createNode = require_createNode(), stringifyCollection = require_stringifyCollection(), Collection = require_Collection(), identity = require_identity(), Scalar = require_Scalar(), toJS = require_toJS(), YAMLSeq = class extends Collection.Collection {
|
|
1617
1617
|
static get tagName() {
|
|
@@ -1706,9 +1706,9 @@ var require_YAMLSeq = __commonJS({
|
|
|
1706
1706
|
}
|
|
1707
1707
|
});
|
|
1708
1708
|
|
|
1709
|
-
//
|
|
1709
|
+
// node_modules/yaml/dist/schema/common/seq.js
|
|
1710
1710
|
var require_seq = __commonJS({
|
|
1711
|
-
"
|
|
1711
|
+
"node_modules/yaml/dist/schema/common/seq.js"(exports) {
|
|
1712
1712
|
"use strict";
|
|
1713
1713
|
var identity = require_identity(), YAMLSeq = require_YAMLSeq(), seq = {
|
|
1714
1714
|
collection: "seq",
|
|
@@ -1724,9 +1724,9 @@ var require_seq = __commonJS({
|
|
|
1724
1724
|
}
|
|
1725
1725
|
});
|
|
1726
1726
|
|
|
1727
|
-
//
|
|
1727
|
+
// node_modules/yaml/dist/schema/common/string.js
|
|
1728
1728
|
var require_string = __commonJS({
|
|
1729
|
-
"
|
|
1729
|
+
"node_modules/yaml/dist/schema/common/string.js"(exports) {
|
|
1730
1730
|
"use strict";
|
|
1731
1731
|
var stringifyString = require_stringifyString(), string = {
|
|
1732
1732
|
identify: (value) => typeof value == "string",
|
|
@@ -1741,9 +1741,9 @@ var require_string = __commonJS({
|
|
|
1741
1741
|
}
|
|
1742
1742
|
});
|
|
1743
1743
|
|
|
1744
|
-
//
|
|
1744
|
+
// node_modules/yaml/dist/schema/common/null.js
|
|
1745
1745
|
var require_null = __commonJS({
|
|
1746
|
-
"
|
|
1746
|
+
"node_modules/yaml/dist/schema/common/null.js"(exports) {
|
|
1747
1747
|
"use strict";
|
|
1748
1748
|
var Scalar = require_Scalar(), nullTag = {
|
|
1749
1749
|
identify: (value) => value == null,
|
|
@@ -1758,9 +1758,9 @@ var require_null = __commonJS({
|
|
|
1758
1758
|
}
|
|
1759
1759
|
});
|
|
1760
1760
|
|
|
1761
|
-
//
|
|
1761
|
+
// node_modules/yaml/dist/schema/core/bool.js
|
|
1762
1762
|
var require_bool = __commonJS({
|
|
1763
|
-
"
|
|
1763
|
+
"node_modules/yaml/dist/schema/core/bool.js"(exports) {
|
|
1764
1764
|
"use strict";
|
|
1765
1765
|
var Scalar = require_Scalar(), boolTag = {
|
|
1766
1766
|
identify: (value) => typeof value == "boolean",
|
|
@@ -1781,9 +1781,9 @@ var require_bool = __commonJS({
|
|
|
1781
1781
|
}
|
|
1782
1782
|
});
|
|
1783
1783
|
|
|
1784
|
-
//
|
|
1784
|
+
// node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
1785
1785
|
var require_stringifyNumber = __commonJS({
|
|
1786
|
-
"
|
|
1786
|
+
"node_modules/yaml/dist/stringify/stringifyNumber.js"(exports) {
|
|
1787
1787
|
"use strict";
|
|
1788
1788
|
function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
1789
1789
|
if (typeof value == "bigint")
|
|
@@ -1805,9 +1805,9 @@ var require_stringifyNumber = __commonJS({
|
|
|
1805
1805
|
}
|
|
1806
1806
|
});
|
|
1807
1807
|
|
|
1808
|
-
//
|
|
1808
|
+
// node_modules/yaml/dist/schema/core/float.js
|
|
1809
1809
|
var require_float = __commonJS({
|
|
1810
|
-
"
|
|
1810
|
+
"node_modules/yaml/dist/schema/core/float.js"(exports) {
|
|
1811
1811
|
"use strict";
|
|
1812
1812
|
var Scalar = require_Scalar(), stringifyNumber = require_stringifyNumber(), floatNaN = {
|
|
1813
1813
|
identify: (value) => typeof value == "number",
|
|
@@ -1844,9 +1844,9 @@ var require_float = __commonJS({
|
|
|
1844
1844
|
}
|
|
1845
1845
|
});
|
|
1846
1846
|
|
|
1847
|
-
//
|
|
1847
|
+
// node_modules/yaml/dist/schema/core/int.js
|
|
1848
1848
|
var require_int = __commonJS({
|
|
1849
|
-
"
|
|
1849
|
+
"node_modules/yaml/dist/schema/core/int.js"(exports) {
|
|
1850
1850
|
"use strict";
|
|
1851
1851
|
var stringifyNumber = require_stringifyNumber(), intIdentify = (value) => typeof value == "bigint" || Number.isInteger(value), intResolve = (str, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix);
|
|
1852
1852
|
function intStringify(node, radix, prefix) {
|
|
@@ -1883,9 +1883,9 @@ var require_int = __commonJS({
|
|
|
1883
1883
|
}
|
|
1884
1884
|
});
|
|
1885
1885
|
|
|
1886
|
-
//
|
|
1886
|
+
// node_modules/yaml/dist/schema/core/schema.js
|
|
1887
1887
|
var require_schema = __commonJS({
|
|
1888
|
-
"
|
|
1888
|
+
"node_modules/yaml/dist/schema/core/schema.js"(exports) {
|
|
1889
1889
|
"use strict";
|
|
1890
1890
|
var map = require_map(), _null = require_null(), seq = require_seq(), string = require_string(), bool = require_bool(), float = require_float(), int = require_int(), schema = [
|
|
1891
1891
|
map.map,
|
|
@@ -1904,9 +1904,9 @@ var require_schema = __commonJS({
|
|
|
1904
1904
|
}
|
|
1905
1905
|
});
|
|
1906
1906
|
|
|
1907
|
-
//
|
|
1907
|
+
// node_modules/yaml/dist/schema/json/schema.js
|
|
1908
1908
|
var require_schema2 = __commonJS({
|
|
1909
|
-
"
|
|
1909
|
+
"node_modules/yaml/dist/schema/json/schema.js"(exports) {
|
|
1910
1910
|
"use strict";
|
|
1911
1911
|
var Scalar = require_Scalar(), map = require_map(), seq = require_seq();
|
|
1912
1912
|
function intIdentify(value) {
|
|
@@ -1965,9 +1965,9 @@ var require_schema2 = __commonJS({
|
|
|
1965
1965
|
}
|
|
1966
1966
|
});
|
|
1967
1967
|
|
|
1968
|
-
//
|
|
1968
|
+
// node_modules/yaml/dist/schema/yaml-1.1/binary.js
|
|
1969
1969
|
var require_binary = __commonJS({
|
|
1970
|
-
"
|
|
1970
|
+
"node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports) {
|
|
1971
1971
|
"use strict";
|
|
1972
1972
|
var node_buffer = __require("buffer"), Scalar = require_Scalar(), stringifyString = require_stringifyString(), binary = {
|
|
1973
1973
|
identify: (value) => value instanceof Uint8Array,
|
|
@@ -2020,9 +2020,9 @@ var require_binary = __commonJS({
|
|
|
2020
2020
|
}
|
|
2021
2021
|
});
|
|
2022
2022
|
|
|
2023
|
-
//
|
|
2023
|
+
// node_modules/yaml/dist/schema/yaml-1.1/pairs.js
|
|
2024
2024
|
var require_pairs = __commonJS({
|
|
2025
|
-
"
|
|
2025
|
+
"node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports) {
|
|
2026
2026
|
"use strict";
|
|
2027
2027
|
var identity = require_identity(), Pair = require_Pair(), Scalar = require_Scalar(), YAMLSeq = require_YAMLSeq();
|
|
2028
2028
|
function resolvePairs(seq, onError) {
|
|
@@ -2086,9 +2086,9 @@ ${cn.comment}` : item.comment;
|
|
|
2086
2086
|
}
|
|
2087
2087
|
});
|
|
2088
2088
|
|
|
2089
|
-
//
|
|
2089
|
+
// node_modules/yaml/dist/schema/yaml-1.1/omap.js
|
|
2090
2090
|
var require_omap = __commonJS({
|
|
2091
|
-
"
|
|
2091
|
+
"node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports) {
|
|
2092
2092
|
"use strict";
|
|
2093
2093
|
var identity = require_identity(), toJS = require_toJS(), YAMLMap = require_YAMLMap(), YAMLSeq = require_YAMLSeq(), pairs = require_pairs(), YAMLOMap = class _YAMLOMap extends YAMLSeq.YAMLSeq {
|
|
2094
2094
|
constructor() {
|
|
@@ -2136,9 +2136,9 @@ var require_omap = __commonJS({
|
|
|
2136
2136
|
}
|
|
2137
2137
|
});
|
|
2138
2138
|
|
|
2139
|
-
//
|
|
2139
|
+
// node_modules/yaml/dist/schema/yaml-1.1/bool.js
|
|
2140
2140
|
var require_bool2 = __commonJS({
|
|
2141
|
-
"
|
|
2141
|
+
"node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports) {
|
|
2142
2142
|
"use strict";
|
|
2143
2143
|
var Scalar = require_Scalar();
|
|
2144
2144
|
function boolStringify({ value, source }, ctx) {
|
|
@@ -2164,9 +2164,9 @@ var require_bool2 = __commonJS({
|
|
|
2164
2164
|
}
|
|
2165
2165
|
});
|
|
2166
2166
|
|
|
2167
|
-
//
|
|
2167
|
+
// node_modules/yaml/dist/schema/yaml-1.1/float.js
|
|
2168
2168
|
var require_float2 = __commonJS({
|
|
2169
|
-
"
|
|
2169
|
+
"node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports) {
|
|
2170
2170
|
"use strict";
|
|
2171
2171
|
var Scalar = require_Scalar(), stringifyNumber = require_stringifyNumber(), floatNaN = {
|
|
2172
2172
|
identify: (value) => typeof value == "number",
|
|
@@ -2207,9 +2207,9 @@ var require_float2 = __commonJS({
|
|
|
2207
2207
|
}
|
|
2208
2208
|
});
|
|
2209
2209
|
|
|
2210
|
-
//
|
|
2210
|
+
// node_modules/yaml/dist/schema/yaml-1.1/int.js
|
|
2211
2211
|
var require_int2 = __commonJS({
|
|
2212
|
-
"
|
|
2212
|
+
"node_modules/yaml/dist/schema/yaml-1.1/int.js"(exports) {
|
|
2213
2213
|
"use strict";
|
|
2214
2214
|
var stringifyNumber = require_stringifyNumber(), intIdentify = (value) => typeof value == "bigint" || Number.isInteger(value);
|
|
2215
2215
|
function intResolve(str, offset, radix, { intAsBigInt }) {
|
|
@@ -2279,9 +2279,9 @@ var require_int2 = __commonJS({
|
|
|
2279
2279
|
}
|
|
2280
2280
|
});
|
|
2281
2281
|
|
|
2282
|
-
//
|
|
2282
|
+
// node_modules/yaml/dist/schema/yaml-1.1/set.js
|
|
2283
2283
|
var require_set = __commonJS({
|
|
2284
|
-
"
|
|
2284
|
+
"node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports) {
|
|
2285
2285
|
"use strict";
|
|
2286
2286
|
var identity = require_identity(), Pair = require_Pair(), YAMLMap = require_YAMLMap(), YAMLSet = class _YAMLSet extends YAMLMap.YAMLMap {
|
|
2287
2287
|
constructor(schema) {
|
|
@@ -2346,9 +2346,9 @@ var require_set = __commonJS({
|
|
|
2346
2346
|
}
|
|
2347
2347
|
});
|
|
2348
2348
|
|
|
2349
|
-
//
|
|
2349
|
+
// node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
|
|
2350
2350
|
var require_timestamp = __commonJS({
|
|
2351
|
-
"
|
|
2351
|
+
"node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports) {
|
|
2352
2352
|
"use strict";
|
|
2353
2353
|
var stringifyNumber = require_stringifyNumber();
|
|
2354
2354
|
function parseSexagesimal(str, asBigInt) {
|
|
@@ -2409,9 +2409,9 @@ var require_timestamp = __commonJS({
|
|
|
2409
2409
|
}
|
|
2410
2410
|
});
|
|
2411
2411
|
|
|
2412
|
-
//
|
|
2412
|
+
// node_modules/yaml/dist/schema/yaml-1.1/schema.js
|
|
2413
2413
|
var require_schema3 = __commonJS({
|
|
2414
|
-
"
|
|
2414
|
+
"node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports) {
|
|
2415
2415
|
"use strict";
|
|
2416
2416
|
var map = require_map(), _null = require_null(), seq = require_seq(), string = require_string(), binary = require_binary(), bool = require_bool2(), float = require_float2(), int = require_int2(), merge = require_merge(), omap = require_omap(), pairs = require_pairs(), set = require_set(), timestamp = require_timestamp(), schema = [
|
|
2417
2417
|
map.map,
|
|
@@ -2440,9 +2440,9 @@ var require_schema3 = __commonJS({
|
|
|
2440
2440
|
}
|
|
2441
2441
|
});
|
|
2442
2442
|
|
|
2443
|
-
//
|
|
2443
|
+
// node_modules/yaml/dist/schema/tags.js
|
|
2444
2444
|
var require_tags = __commonJS({
|
|
2445
|
-
"
|
|
2445
|
+
"node_modules/yaml/dist/schema/tags.js"(exports) {
|
|
2446
2446
|
"use strict";
|
|
2447
2447
|
var map = require_map(), _null = require_null(), seq = require_seq(), string = require_string(), bool = require_bool(), float = require_float(), int = require_int(), schema = require_schema(), schema$1 = require_schema2(), binary = require_binary(), merge = require_merge(), omap = require_omap(), pairs = require_pairs(), schema$2 = require_schema3(), set = require_set(), timestamp = require_timestamp(), schemas = /* @__PURE__ */ new Map([
|
|
2448
2448
|
["core", schema.schema],
|
|
@@ -2507,9 +2507,9 @@ var require_tags = __commonJS({
|
|
|
2507
2507
|
}
|
|
2508
2508
|
});
|
|
2509
2509
|
|
|
2510
|
-
//
|
|
2510
|
+
// node_modules/yaml/dist/schema/Schema.js
|
|
2511
2511
|
var require_Schema = __commonJS({
|
|
2512
|
-
"
|
|
2512
|
+
"node_modules/yaml/dist/schema/Schema.js"(exports) {
|
|
2513
2513
|
"use strict";
|
|
2514
2514
|
var identity = require_identity(), map = require_map(), seq = require_seq(), string = require_string(), tags = require_tags(), sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0, Schema = class _Schema {
|
|
2515
2515
|
constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
@@ -2524,9 +2524,9 @@ var require_Schema = __commonJS({
|
|
|
2524
2524
|
}
|
|
2525
2525
|
});
|
|
2526
2526
|
|
|
2527
|
-
//
|
|
2527
|
+
// node_modules/yaml/dist/stringify/stringifyDocument.js
|
|
2528
2528
|
var require_stringifyDocument = __commonJS({
|
|
2529
|
-
"
|
|
2529
|
+
"node_modules/yaml/dist/stringify/stringifyDocument.js"(exports) {
|
|
2530
2530
|
"use strict";
|
|
2531
2531
|
var identity = require_identity(), stringify = require_stringify(), stringifyComment = require_stringifyComment();
|
|
2532
2532
|
function stringifyDocument(doc, options) {
|
|
@@ -2574,9 +2574,9 @@ var require_stringifyDocument = __commonJS({
|
|
|
2574
2574
|
}
|
|
2575
2575
|
});
|
|
2576
2576
|
|
|
2577
|
-
//
|
|
2577
|
+
// node_modules/yaml/dist/doc/Document.js
|
|
2578
2578
|
var require_Document = __commonJS({
|
|
2579
|
-
"
|
|
2579
|
+
"node_modules/yaml/dist/doc/Document.js"(exports) {
|
|
2580
2580
|
"use strict";
|
|
2581
2581
|
var Alias = require_Alias(), Collection = require_Collection(), identity = require_identity(), Pair = require_Pair(), toJS = require_toJS(), Schema = require_Schema(), stringifyDocument = require_stringifyDocument(), anchors = require_anchors(), applyReviver = require_applyReviver(), createNode = require_createNode(), directives = require_directives(), Document = class _Document {
|
|
2582
2582
|
constructor(value, replacer, options) {
|
|
@@ -2613,8 +2613,8 @@ var require_Document = __commonJS({
|
|
|
2613
2613
|
assertCollection(this.contents) && this.contents.add(value);
|
|
2614
2614
|
}
|
|
2615
2615
|
/** Adds a value to the document. */
|
|
2616
|
-
addIn(
|
|
2617
|
-
assertCollection(this.contents) && this.contents.addIn(
|
|
2616
|
+
addIn(path9, value) {
|
|
2617
|
+
assertCollection(this.contents) && this.contents.addIn(path9, value);
|
|
2618
2618
|
}
|
|
2619
2619
|
/**
|
|
2620
2620
|
* Create a new `Alias` node, ensuring that the target `node` has the required anchor.
|
|
@@ -2675,8 +2675,8 @@ var require_Document = __commonJS({
|
|
|
2675
2675
|
* Removes a value from the document.
|
|
2676
2676
|
* @returns `true` if the item was found and removed.
|
|
2677
2677
|
*/
|
|
2678
|
-
deleteIn(
|
|
2679
|
-
return Collection.isEmptyPath(
|
|
2678
|
+
deleteIn(path9) {
|
|
2679
|
+
return Collection.isEmptyPath(path9) ? this.contents == null ? !1 : (this.contents = null, !0) : assertCollection(this.contents) ? this.contents.deleteIn(path9) : !1;
|
|
2680
2680
|
}
|
|
2681
2681
|
/**
|
|
2682
2682
|
* Returns item at `key`, or `undefined` if not found. By default unwraps
|
|
@@ -2691,8 +2691,8 @@ var require_Document = __commonJS({
|
|
|
2691
2691
|
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
2692
2692
|
* `true` (collections are always returned intact).
|
|
2693
2693
|
*/
|
|
2694
|
-
getIn(
|
|
2695
|
-
return Collection.isEmptyPath(
|
|
2694
|
+
getIn(path9, keepScalar) {
|
|
2695
|
+
return Collection.isEmptyPath(path9) ? !keepScalar && identity.isScalar(this.contents) ? this.contents.value : this.contents : identity.isCollection(this.contents) ? this.contents.getIn(path9, keepScalar) : void 0;
|
|
2696
2696
|
}
|
|
2697
2697
|
/**
|
|
2698
2698
|
* Checks if the document includes a value with the key `key`.
|
|
@@ -2703,8 +2703,8 @@ var require_Document = __commonJS({
|
|
|
2703
2703
|
/**
|
|
2704
2704
|
* Checks if the document includes a value at `path`.
|
|
2705
2705
|
*/
|
|
2706
|
-
hasIn(
|
|
2707
|
-
return Collection.isEmptyPath(
|
|
2706
|
+
hasIn(path9) {
|
|
2707
|
+
return Collection.isEmptyPath(path9) ? this.contents !== void 0 : identity.isCollection(this.contents) ? this.contents.hasIn(path9) : !1;
|
|
2708
2708
|
}
|
|
2709
2709
|
/**
|
|
2710
2710
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
@@ -2717,8 +2717,8 @@ var require_Document = __commonJS({
|
|
|
2717
2717
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
2718
2718
|
* boolean to add/remove the item from the set.
|
|
2719
2719
|
*/
|
|
2720
|
-
setIn(
|
|
2721
|
-
Collection.isEmptyPath(
|
|
2720
|
+
setIn(path9, value) {
|
|
2721
|
+
Collection.isEmptyPath(path9) ? this.contents = value : this.contents == null ? this.contents = Collection.collectionFromPath(this.schema, Array.from(path9), value) : assertCollection(this.contents) && this.contents.setIn(path9, value);
|
|
2722
2722
|
}
|
|
2723
2723
|
/**
|
|
2724
2724
|
* Change the YAML version and schema used by the document.
|
|
@@ -2797,9 +2797,9 @@ var require_Document = __commonJS({
|
|
|
2797
2797
|
}
|
|
2798
2798
|
});
|
|
2799
2799
|
|
|
2800
|
-
//
|
|
2800
|
+
// node_modules/yaml/dist/errors.js
|
|
2801
2801
|
var require_errors = __commonJS({
|
|
2802
|
-
"
|
|
2802
|
+
"node_modules/yaml/dist/errors.js"(exports) {
|
|
2803
2803
|
"use strict";
|
|
2804
2804
|
var YAMLError = class extends Error {
|
|
2805
2805
|
constructor(name, pos, code, message) {
|
|
@@ -2847,9 +2847,9 @@ ${pointer}
|
|
|
2847
2847
|
}
|
|
2848
2848
|
});
|
|
2849
2849
|
|
|
2850
|
-
//
|
|
2850
|
+
// node_modules/yaml/dist/compose/resolve-props.js
|
|
2851
2851
|
var require_resolve_props = __commonJS({
|
|
2852
|
-
"
|
|
2852
|
+
"node_modules/yaml/dist/compose/resolve-props.js"(exports) {
|
|
2853
2853
|
"use strict";
|
|
2854
2854
|
function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
|
|
2855
2855
|
let spaceBefore = !1, atNewline = startOnNewline, hasSpace = startOnNewline, comment = "", commentSep = "", hasNewline = !1, reqSpace = !1, tab = null, anchor = null, tag = null, newlineAfterProp = null, comma = null, found = null, start = null;
|
|
@@ -2904,9 +2904,9 @@ var require_resolve_props = __commonJS({
|
|
|
2904
2904
|
}
|
|
2905
2905
|
});
|
|
2906
2906
|
|
|
2907
|
-
//
|
|
2907
|
+
// node_modules/yaml/dist/compose/util-contains-newline.js
|
|
2908
2908
|
var require_util_contains_newline = __commonJS({
|
|
2909
|
-
"
|
|
2909
|
+
"node_modules/yaml/dist/compose/util-contains-newline.js"(exports) {
|
|
2910
2910
|
"use strict";
|
|
2911
2911
|
function containsNewline(key) {
|
|
2912
2912
|
if (!key)
|
|
@@ -2947,9 +2947,9 @@ var require_util_contains_newline = __commonJS({
|
|
|
2947
2947
|
}
|
|
2948
2948
|
});
|
|
2949
2949
|
|
|
2950
|
-
//
|
|
2950
|
+
// node_modules/yaml/dist/compose/util-flow-indent-check.js
|
|
2951
2951
|
var require_util_flow_indent_check = __commonJS({
|
|
2952
|
-
"
|
|
2952
|
+
"node_modules/yaml/dist/compose/util-flow-indent-check.js"(exports) {
|
|
2953
2953
|
"use strict";
|
|
2954
2954
|
var utilContainsNewline = require_util_contains_newline();
|
|
2955
2955
|
function flowIndentCheck(indent, fc, onError) {
|
|
@@ -2962,9 +2962,9 @@ var require_util_flow_indent_check = __commonJS({
|
|
|
2962
2962
|
}
|
|
2963
2963
|
});
|
|
2964
2964
|
|
|
2965
|
-
//
|
|
2965
|
+
// node_modules/yaml/dist/compose/util-map-includes.js
|
|
2966
2966
|
var require_util_map_includes = __commonJS({
|
|
2967
|
-
"
|
|
2967
|
+
"node_modules/yaml/dist/compose/util-map-includes.js"(exports) {
|
|
2968
2968
|
"use strict";
|
|
2969
2969
|
var identity = require_identity();
|
|
2970
2970
|
function mapIncludes(ctx, items, search) {
|
|
@@ -2978,9 +2978,9 @@ var require_util_map_includes = __commonJS({
|
|
|
2978
2978
|
}
|
|
2979
2979
|
});
|
|
2980
2980
|
|
|
2981
|
-
//
|
|
2981
|
+
// node_modules/yaml/dist/compose/resolve-block-map.js
|
|
2982
2982
|
var require_resolve_block_map = __commonJS({
|
|
2983
|
-
"
|
|
2983
|
+
"node_modules/yaml/dist/compose/resolve-block-map.js"(exports) {
|
|
2984
2984
|
"use strict";
|
|
2985
2985
|
var Pair = require_Pair(), YAMLMap = require_YAMLMap(), resolveProps = require_resolve_props(), utilContainsNewline = require_util_contains_newline(), utilFlowIndentCheck = require_util_flow_indent_check(), utilMapIncludes = require_util_map_includes(), startColMsg = "All mapping items must start at the same column";
|
|
2986
2986
|
function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {
|
|
@@ -3034,9 +3034,9 @@ var require_resolve_block_map = __commonJS({
|
|
|
3034
3034
|
}
|
|
3035
3035
|
});
|
|
3036
3036
|
|
|
3037
|
-
//
|
|
3037
|
+
// node_modules/yaml/dist/compose/resolve-block-seq.js
|
|
3038
3038
|
var require_resolve_block_seq = __commonJS({
|
|
3039
|
-
"
|
|
3039
|
+
"node_modules/yaml/dist/compose/resolve-block-seq.js"(exports) {
|
|
3040
3040
|
"use strict";
|
|
3041
3041
|
var YAMLSeq = require_YAMLSeq(), resolveProps = require_resolve_props(), utilFlowIndentCheck = require_util_flow_indent_check();
|
|
3042
3042
|
function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {
|
|
@@ -3068,9 +3068,9 @@ var require_resolve_block_seq = __commonJS({
|
|
|
3068
3068
|
}
|
|
3069
3069
|
});
|
|
3070
3070
|
|
|
3071
|
-
//
|
|
3071
|
+
// node_modules/yaml/dist/compose/resolve-end.js
|
|
3072
3072
|
var require_resolve_end = __commonJS({
|
|
3073
|
-
"
|
|
3073
|
+
"node_modules/yaml/dist/compose/resolve-end.js"(exports) {
|
|
3074
3074
|
"use strict";
|
|
3075
3075
|
function resolveEnd(end, offset, reqSpace, onError) {
|
|
3076
3076
|
let comment = "";
|
|
@@ -3103,9 +3103,9 @@ var require_resolve_end = __commonJS({
|
|
|
3103
3103
|
}
|
|
3104
3104
|
});
|
|
3105
3105
|
|
|
3106
|
-
//
|
|
3106
|
+
// node_modules/yaml/dist/compose/resolve-flow-collection.js
|
|
3107
3107
|
var require_resolve_flow_collection = __commonJS({
|
|
3108
|
-
"
|
|
3108
|
+
"node_modules/yaml/dist/compose/resolve-flow-collection.js"(exports) {
|
|
3109
3109
|
"use strict";
|
|
3110
3110
|
var identity = require_identity(), Pair = require_Pair(), YAMLMap = require_YAMLMap(), YAMLSeq = require_YAMLSeq(), resolveEnd = require_resolve_end(), resolveProps = require_resolve_props(), utilContainsNewline = require_util_contains_newline(), utilMapIncludes = require_util_map_includes(), blockMsg = "Block collections are not allowed within flow collections", isBlock = (token) => token && (token.type === "block-map" || token.type === "block-seq");
|
|
3111
3111
|
function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) {
|
|
@@ -3223,9 +3223,9 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
3223
3223
|
}
|
|
3224
3224
|
});
|
|
3225
3225
|
|
|
3226
|
-
//
|
|
3226
|
+
// node_modules/yaml/dist/compose/compose-collection.js
|
|
3227
3227
|
var require_compose_collection = __commonJS({
|
|
3228
|
-
"
|
|
3228
|
+
"node_modules/yaml/dist/compose/compose-collection.js"(exports) {
|
|
3229
3229
|
"use strict";
|
|
3230
3230
|
var identity = require_identity(), Scalar = require_Scalar(), YAMLMap = require_YAMLMap(), YAMLSeq = require_YAMLSeq(), resolveBlockMap = require_resolve_block_map(), resolveBlockSeq = require_resolve_block_seq(), resolveFlowCollection = require_resolve_flow_collection();
|
|
3231
3231
|
function resolveCollection(CN, ctx, token, onError, tagName, tag) {
|
|
@@ -3256,9 +3256,9 @@ var require_compose_collection = __commonJS({
|
|
|
3256
3256
|
}
|
|
3257
3257
|
});
|
|
3258
3258
|
|
|
3259
|
-
//
|
|
3259
|
+
// node_modules/yaml/dist/compose/resolve-block-scalar.js
|
|
3260
3260
|
var require_resolve_block_scalar = __commonJS({
|
|
3261
|
-
"
|
|
3261
|
+
"node_modules/yaml/dist/compose/resolve-block-scalar.js"(exports) {
|
|
3262
3262
|
"use strict";
|
|
3263
3263
|
var Scalar = require_Scalar();
|
|
3264
3264
|
function resolveBlockScalar(ctx, scalar, onError) {
|
|
@@ -3383,9 +3383,9 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
3383
3383
|
}
|
|
3384
3384
|
});
|
|
3385
3385
|
|
|
3386
|
-
//
|
|
3386
|
+
// node_modules/yaml/dist/compose/resolve-flow-scalar.js
|
|
3387
3387
|
var require_resolve_flow_scalar = __commonJS({
|
|
3388
|
-
"
|
|
3388
|
+
"node_modules/yaml/dist/compose/resolve-flow-scalar.js"(exports) {
|
|
3389
3389
|
"use strict";
|
|
3390
3390
|
var Scalar = require_Scalar(), resolveEnd = require_resolve_end();
|
|
3391
3391
|
function resolveFlowScalar(scalar, strict, onError) {
|
|
@@ -3564,9 +3564,9 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
3564
3564
|
}
|
|
3565
3565
|
});
|
|
3566
3566
|
|
|
3567
|
-
//
|
|
3567
|
+
// node_modules/yaml/dist/compose/compose-scalar.js
|
|
3568
3568
|
var require_compose_scalar = __commonJS({
|
|
3569
|
-
"
|
|
3569
|
+
"node_modules/yaml/dist/compose/compose-scalar.js"(exports) {
|
|
3570
3570
|
"use strict";
|
|
3571
3571
|
var identity = require_identity(), Scalar = require_Scalar(), resolveBlockScalar = require_resolve_block_scalar(), resolveFlowScalar = require_resolve_flow_scalar();
|
|
3572
3572
|
function composeScalar(ctx, token, tagToken, onError) {
|
|
@@ -3613,9 +3613,9 @@ var require_compose_scalar = __commonJS({
|
|
|
3613
3613
|
}
|
|
3614
3614
|
});
|
|
3615
3615
|
|
|
3616
|
-
//
|
|
3616
|
+
// node_modules/yaml/dist/compose/util-empty-scalar-position.js
|
|
3617
3617
|
var require_util_empty_scalar_position = __commonJS({
|
|
3618
|
-
"
|
|
3618
|
+
"node_modules/yaml/dist/compose/util-empty-scalar-position.js"(exports) {
|
|
3619
3619
|
"use strict";
|
|
3620
3620
|
function emptyScalarPosition(offset, before, pos) {
|
|
3621
3621
|
if (before) {
|
|
@@ -3640,9 +3640,9 @@ var require_util_empty_scalar_position = __commonJS({
|
|
|
3640
3640
|
}
|
|
3641
3641
|
});
|
|
3642
3642
|
|
|
3643
|
-
//
|
|
3643
|
+
// node_modules/yaml/dist/compose/compose-node.js
|
|
3644
3644
|
var require_compose_node = __commonJS({
|
|
3645
|
-
"
|
|
3645
|
+
"node_modules/yaml/dist/compose/compose-node.js"(exports) {
|
|
3646
3646
|
"use strict";
|
|
3647
3647
|
var Alias = require_Alias(), identity = require_identity(), composeCollection = require_compose_collection(), composeScalar = require_compose_scalar(), resolveEnd = require_resolve_end(), utilEmptyScalarPosition = require_util_empty_scalar_position(), CN = { composeNode, composeEmptyNode };
|
|
3648
3648
|
function composeNode(ctx, token, props, onError) {
|
|
@@ -3694,9 +3694,9 @@ var require_compose_node = __commonJS({
|
|
|
3694
3694
|
}
|
|
3695
3695
|
});
|
|
3696
3696
|
|
|
3697
|
-
//
|
|
3697
|
+
// node_modules/yaml/dist/compose/compose-doc.js
|
|
3698
3698
|
var require_compose_doc = __commonJS({
|
|
3699
|
-
"
|
|
3699
|
+
"node_modules/yaml/dist/compose/compose-doc.js"(exports) {
|
|
3700
3700
|
"use strict";
|
|
3701
3701
|
var Document = require_Document(), composeNode = require_compose_node(), resolveEnd = require_resolve_end(), resolveProps = require_resolve_props();
|
|
3702
3702
|
function composeDoc(options, directives, { offset, start, value, end }, onError) {
|
|
@@ -3722,9 +3722,9 @@ var require_compose_doc = __commonJS({
|
|
|
3722
3722
|
}
|
|
3723
3723
|
});
|
|
3724
3724
|
|
|
3725
|
-
//
|
|
3725
|
+
// node_modules/yaml/dist/compose/composer.js
|
|
3726
3726
|
var require_composer = __commonJS({
|
|
3727
|
-
"
|
|
3727
|
+
"node_modules/yaml/dist/compose/composer.js"(exports) {
|
|
3728
3728
|
"use strict";
|
|
3729
3729
|
var node_process = __require("process"), directives = require_directives(), Document = require_Document(), errors = require_errors(), identity = require_identity(), composeDoc = require_compose_doc(), resolveEnd = require_resolve_end();
|
|
3730
3730
|
function getErrorPos(src) {
|
|
@@ -3881,9 +3881,9 @@ ${end.comment}` : end.comment;
|
|
|
3881
3881
|
}
|
|
3882
3882
|
});
|
|
3883
3883
|
|
|
3884
|
-
//
|
|
3884
|
+
// node_modules/yaml/dist/parse/cst-scalar.js
|
|
3885
3885
|
var require_cst_scalar = __commonJS({
|
|
3886
|
-
"
|
|
3886
|
+
"node_modules/yaml/dist/parse/cst-scalar.js"(exports) {
|
|
3887
3887
|
"use strict";
|
|
3888
3888
|
var resolveBlockScalar = require_resolve_block_scalar(), resolveFlowScalar = require_resolve_flow_scalar(), errors = require_errors(), stringifyString = require_stringifyString();
|
|
3889
3889
|
function resolveAsScalar(token, strict = !0, onError) {
|
|
@@ -4045,9 +4045,9 @@ var require_cst_scalar = __commonJS({
|
|
|
4045
4045
|
}
|
|
4046
4046
|
});
|
|
4047
4047
|
|
|
4048
|
-
//
|
|
4048
|
+
// node_modules/yaml/dist/parse/cst-stringify.js
|
|
4049
4049
|
var require_cst_stringify = __commonJS({
|
|
4050
|
-
"
|
|
4050
|
+
"node_modules/yaml/dist/parse/cst-stringify.js"(exports) {
|
|
4051
4051
|
"use strict";
|
|
4052
4052
|
var stringify = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst);
|
|
4053
4053
|
function stringifyToken(token) {
|
|
@@ -4102,9 +4102,9 @@ var require_cst_stringify = __commonJS({
|
|
|
4102
4102
|
}
|
|
4103
4103
|
});
|
|
4104
4104
|
|
|
4105
|
-
//
|
|
4105
|
+
// node_modules/yaml/dist/parse/cst-visit.js
|
|
4106
4106
|
var require_cst_visit = __commonJS({
|
|
4107
|
-
"
|
|
4107
|
+
"node_modules/yaml/dist/parse/cst-visit.js"(exports) {
|
|
4108
4108
|
"use strict";
|
|
4109
4109
|
var BREAK = Symbol("break visit"), SKIP = Symbol("skip children"), REMOVE = Symbol("remove item");
|
|
4110
4110
|
function visit(cst, visitor) {
|
|
@@ -4113,9 +4113,9 @@ var require_cst_visit = __commonJS({
|
|
|
4113
4113
|
visit.BREAK = BREAK;
|
|
4114
4114
|
visit.SKIP = SKIP;
|
|
4115
4115
|
visit.REMOVE = REMOVE;
|
|
4116
|
-
visit.itemAtPath = (cst,
|
|
4116
|
+
visit.itemAtPath = (cst, path9) => {
|
|
4117
4117
|
let item = cst;
|
|
4118
|
-
for (let [field, index] of
|
|
4118
|
+
for (let [field, index] of path9) {
|
|
4119
4119
|
let tok = item?.[field];
|
|
4120
4120
|
if (tok && "items" in tok)
|
|
4121
4121
|
item = tok.items[index];
|
|
@@ -4124,21 +4124,21 @@ var require_cst_visit = __commonJS({
|
|
|
4124
4124
|
}
|
|
4125
4125
|
return item;
|
|
4126
4126
|
};
|
|
4127
|
-
visit.parentCollection = (cst,
|
|
4128
|
-
let parent = visit.itemAtPath(cst,
|
|
4127
|
+
visit.parentCollection = (cst, path9) => {
|
|
4128
|
+
let parent = visit.itemAtPath(cst, path9.slice(0, -1)), field = path9[path9.length - 1][0], coll = parent?.[field];
|
|
4129
4129
|
if (coll && "items" in coll)
|
|
4130
4130
|
return coll;
|
|
4131
4131
|
throw new Error("Parent collection not found");
|
|
4132
4132
|
};
|
|
4133
|
-
function _visit(
|
|
4134
|
-
let ctrl = visitor(item,
|
|
4133
|
+
function _visit(path9, item, visitor) {
|
|
4134
|
+
let ctrl = visitor(item, path9);
|
|
4135
4135
|
if (typeof ctrl == "symbol")
|
|
4136
4136
|
return ctrl;
|
|
4137
4137
|
for (let field of ["key", "value"]) {
|
|
4138
4138
|
let token = item[field];
|
|
4139
4139
|
if (token && "items" in token) {
|
|
4140
4140
|
for (let i = 0; i < token.items.length; ++i) {
|
|
4141
|
-
let ci = _visit(Object.freeze(
|
|
4141
|
+
let ci = _visit(Object.freeze(path9.concat([[field, i]])), token.items[i], visitor);
|
|
4142
4142
|
if (typeof ci == "number")
|
|
4143
4143
|
i = ci - 1;
|
|
4144
4144
|
else {
|
|
@@ -4147,18 +4147,18 @@ var require_cst_visit = __commonJS({
|
|
|
4147
4147
|
ci === REMOVE && (token.items.splice(i, 1), i -= 1);
|
|
4148
4148
|
}
|
|
4149
4149
|
}
|
|
4150
|
-
typeof ctrl == "function" && field === "key" && (ctrl = ctrl(item,
|
|
4150
|
+
typeof ctrl == "function" && field === "key" && (ctrl = ctrl(item, path9));
|
|
4151
4151
|
}
|
|
4152
4152
|
}
|
|
4153
|
-
return typeof ctrl == "function" ? ctrl(item,
|
|
4153
|
+
return typeof ctrl == "function" ? ctrl(item, path9) : ctrl;
|
|
4154
4154
|
}
|
|
4155
4155
|
exports.visit = visit;
|
|
4156
4156
|
}
|
|
4157
4157
|
});
|
|
4158
4158
|
|
|
4159
|
-
//
|
|
4159
|
+
// node_modules/yaml/dist/parse/cst.js
|
|
4160
4160
|
var require_cst = __commonJS({
|
|
4161
|
-
"
|
|
4161
|
+
"node_modules/yaml/dist/parse/cst.js"(exports) {
|
|
4162
4162
|
"use strict";
|
|
4163
4163
|
var cstScalar = require_cst_scalar(), cstStringify = require_cst_stringify(), cstVisit = require_cst_visit(), BOM = "\uFEFF", DOCUMENT = "", FLOW_END = "", SCALAR = "", isCollection = (token) => !!token && "items" in token, isScalar = (token) => !!token && (token.type === "scalar" || token.type === "single-quoted-scalar" || token.type === "double-quoted-scalar" || token.type === "block-scalar");
|
|
4164
4164
|
function prettyToken(token) {
|
|
@@ -4252,9 +4252,9 @@ var require_cst = __commonJS({
|
|
|
4252
4252
|
}
|
|
4253
4253
|
});
|
|
4254
4254
|
|
|
4255
|
-
//
|
|
4255
|
+
// node_modules/yaml/dist/parse/lexer.js
|
|
4256
4256
|
var require_lexer = __commonJS({
|
|
4257
|
-
"
|
|
4257
|
+
"node_modules/yaml/dist/parse/lexer.js"(exports) {
|
|
4258
4258
|
"use strict";
|
|
4259
4259
|
var cst = require_cst();
|
|
4260
4260
|
function isEmpty(ch) {
|
|
@@ -4695,9 +4695,9 @@ var require_lexer = __commonJS({
|
|
|
4695
4695
|
}
|
|
4696
4696
|
});
|
|
4697
4697
|
|
|
4698
|
-
//
|
|
4698
|
+
// node_modules/yaml/dist/parse/line-counter.js
|
|
4699
4699
|
var require_line_counter = __commonJS({
|
|
4700
|
-
"
|
|
4700
|
+
"node_modules/yaml/dist/parse/line-counter.js"(exports) {
|
|
4701
4701
|
"use strict";
|
|
4702
4702
|
var LineCounter = class {
|
|
4703
4703
|
constructor() {
|
|
@@ -4720,9 +4720,9 @@ var require_line_counter = __commonJS({
|
|
|
4720
4720
|
}
|
|
4721
4721
|
});
|
|
4722
4722
|
|
|
4723
|
-
//
|
|
4723
|
+
// node_modules/yaml/dist/parse/parser.js
|
|
4724
4724
|
var require_parser = __commonJS({
|
|
4725
|
-
"
|
|
4725
|
+
"node_modules/yaml/dist/parse/parser.js"(exports) {
|
|
4726
4726
|
"use strict";
|
|
4727
4727
|
var node_process = __require("process"), cst = require_cst(), lexer = require_lexer();
|
|
4728
4728
|
function includesToken(list, type) {
|
|
@@ -5383,9 +5383,9 @@ var require_parser = __commonJS({
|
|
|
5383
5383
|
}
|
|
5384
5384
|
});
|
|
5385
5385
|
|
|
5386
|
-
//
|
|
5386
|
+
// node_modules/yaml/dist/public-api.js
|
|
5387
5387
|
var require_public_api = __commonJS({
|
|
5388
|
-
"
|
|
5388
|
+
"node_modules/yaml/dist/public-api.js"(exports) {
|
|
5389
5389
|
"use strict";
|
|
5390
5390
|
var composer = require_composer(), Document = require_Document(), errors = require_errors(), log2 = require_log(), identity = require_identity(), lineCounter = require_line_counter(), parser = require_parser();
|
|
5391
5391
|
function parseOptions(options) {
|
|
@@ -5443,9 +5443,9 @@ var require_public_api = __commonJS({
|
|
|
5443
5443
|
}
|
|
5444
5444
|
});
|
|
5445
5445
|
|
|
5446
|
-
//
|
|
5446
|
+
// node_modules/yaml/dist/index.js
|
|
5447
5447
|
var require_dist = __commonJS({
|
|
5448
|
-
"
|
|
5448
|
+
"node_modules/yaml/dist/index.js"(exports) {
|
|
5449
5449
|
"use strict";
|
|
5450
5450
|
var composer = require_composer(), Document = require_Document(), Schema = require_Schema(), errors = require_errors(), Alias = require_Alias(), identity = require_identity(), Pair = require_Pair(), Scalar = require_Scalar(), YAMLMap = require_YAMLMap(), YAMLSeq = require_YAMLSeq(), cst = require_cst(), lexer = require_lexer(), lineCounter = require_line_counter(), parser = require_parser(), publicApi = require_public_api(), visit = require_visit();
|
|
5451
5451
|
exports.Composer = composer.Composer;
|
|
@@ -5584,7 +5584,7 @@ async function detectSetup(root, opts = {}) {
|
|
|
5584
5584
|
...new Set(
|
|
5585
5585
|
paths.filter((p) => /^[^/]+\/[^/]+\/package\.json$/.test(p)).reduce((acc, p) => acc.concat(manifestNames(readText(root, p))), Object.keys(deps))
|
|
5586
5586
|
)
|
|
5587
|
-
].sort() : void 0, langCounts = /* @__PURE__ */ new Map();
|
|
5587
|
+
].sort() : pkgText == null ? [] : void 0, langCounts = /* @__PURE__ */ new Map();
|
|
5588
5588
|
for (let p of paths) {
|
|
5589
5589
|
let lang = LANG_BY_EXT[p.split(".").pop()?.toLowerCase() || ""];
|
|
5590
5590
|
lang && langCounts.set(lang, (langCounts.get(lang) || 0) + 1);
|
|
@@ -5713,11 +5713,11 @@ function staticTokenSource(token) {
|
|
|
5713
5713
|
}
|
|
5714
5714
|
|
|
5715
5715
|
// src/run.ts
|
|
5716
|
-
import { appendFileSync as appendFileSync2, existsSync as
|
|
5717
|
-
import
|
|
5716
|
+
import { appendFileSync as appendFileSync2, existsSync as existsSync6, writeFileSync as writeFileSync3 } from "node:fs";
|
|
5717
|
+
import path8 from "node:path";
|
|
5718
5718
|
|
|
5719
5719
|
// src/types.ts
|
|
5720
|
-
var CLI_VERSION = "1.
|
|
5720
|
+
var CLI_VERSION = "1.5.0";
|
|
5721
5721
|
|
|
5722
5722
|
// src/api.ts
|
|
5723
5723
|
var ApiError = class extends Error {
|
|
@@ -5733,11 +5733,11 @@ var ApiError = class extends Error {
|
|
|
5733
5733
|
this.fetchImpl = fetchImpl;
|
|
5734
5734
|
this.baseUrl = baseUrl.replace(/\/+$/, "");
|
|
5735
5735
|
}
|
|
5736
|
-
async request(method,
|
|
5736
|
+
async request(method, path9, body, attempts = 3) {
|
|
5737
5737
|
let lastErr;
|
|
5738
5738
|
for (let i = 0; i < attempts; i++)
|
|
5739
5739
|
try {
|
|
5740
|
-
let res = await this.fetchImpl(`${this.baseUrl}${
|
|
5740
|
+
let res = await this.fetchImpl(`${this.baseUrl}${path9}`, {
|
|
5741
5741
|
method,
|
|
5742
5742
|
headers: {
|
|
5743
5743
|
Authorization: `Bearer ${await this.token()}`,
|
|
@@ -5887,10 +5887,65 @@ function readContext(opts = {}) {
|
|
|
5887
5887
|
};
|
|
5888
5888
|
}
|
|
5889
5889
|
|
|
5890
|
+
// src/module-type.ts
|
|
5891
|
+
import { existsSync as existsSync2, readFileSync as readFileSync4 } from "node:fs";
|
|
5892
|
+
import path3 from "node:path";
|
|
5893
|
+
var SCOPED_EXT = /\.[jt]sx?$/, ESM_SYNTAX = /^[ \t]*(?:import|export)(?:[ \t]+[A-Za-z_$*{"']|[ \t]*[{*"'])/m, CJS_SYNTAX = /(?:^|[^.\w$])require[ \t]*\(|^[ \t]*(?:module\.exports\b|exports\.[A-Za-z_$])/m;
|
|
5894
|
+
function stripNonCode(source) {
|
|
5895
|
+
return source.replace(/\/\*[\s\S]*?\*\//g, " ").replace(/^[ \t]*\/\/.*$/gm, "").replace(/`(?:\\[\s\S]|[^\\`])*`/g, "``");
|
|
5896
|
+
}
|
|
5897
|
+
function detectModuleSyntax(source) {
|
|
5898
|
+
let code = stripNonCode(source);
|
|
5899
|
+
return ESM_SYNTAX.test(code) ? "module" : CJS_SYNTAX.test(code) ? "commonjs" : null;
|
|
5900
|
+
}
|
|
5901
|
+
function inheritedModuleType(root, dirRel) {
|
|
5902
|
+
let stop = path3.resolve(root);
|
|
5903
|
+
for (let dir = path3.resolve(root, dirRel); ; dir = path3.dirname(dir)) {
|
|
5904
|
+
let manifest = path3.join(dir, "package.json");
|
|
5905
|
+
if (existsSync2(manifest))
|
|
5906
|
+
try {
|
|
5907
|
+
return JSON.parse(readFileSync4(manifest, "utf8")).type === "module" ? "module" : "commonjs";
|
|
5908
|
+
} catch {
|
|
5909
|
+
return "commonjs";
|
|
5910
|
+
}
|
|
5911
|
+
if (dir === stop || path3.dirname(dir) === dir) return "commonjs";
|
|
5912
|
+
}
|
|
5913
|
+
}
|
|
5914
|
+
var posixDir = (p) => path3.posix.dirname(p.split(path3.sep).join("/"));
|
|
5915
|
+
function scopeOf(root, dir, decided) {
|
|
5916
|
+
for (let d = dir; d && d !== "." && d !== "/"; d = path3.posix.dirname(d)) {
|
|
5917
|
+
let shim = decided.get(d);
|
|
5918
|
+
if (shim) return shim;
|
|
5919
|
+
}
|
|
5920
|
+
return inheritedModuleType(root, dir);
|
|
5921
|
+
}
|
|
5922
|
+
function planModuleTypeShims(root, tests) {
|
|
5923
|
+
let wanted = /* @__PURE__ */ new Map();
|
|
5924
|
+
for (let t of tests) {
|
|
5925
|
+
if (t.origin !== "generated" || !SCOPED_EXT.test(t.path)) continue;
|
|
5926
|
+
let dir = posixDir(t.path), needs = t.runner === "playwright" ? inheritedModuleType(root, dir) : t.content ? detectModuleSyntax(t.content) : null;
|
|
5927
|
+
if (!needs) continue;
|
|
5928
|
+
let counts = wanted.get(dir) ?? /* @__PURE__ */ new Map();
|
|
5929
|
+
counts.set(needs, (counts.get(needs) ?? 0) + 1), wanted.set(dir, counts);
|
|
5930
|
+
}
|
|
5931
|
+
let decided = /* @__PURE__ */ new Map(), shims = [];
|
|
5932
|
+
for (let dir of [...wanted.keys()].sort((a, b) => a.split("/").length - b.split("/").length || a.localeCompare(b))) {
|
|
5933
|
+
let counts = wanted.get(dir), type = (counts.get("module") ?? 0) >= (counts.get("commonjs") ?? 0) ? "module" : "commonjs";
|
|
5934
|
+
scopeOf(root, dir, decided) !== type && (decided.set(dir, type), shims.push({ dir, type }));
|
|
5935
|
+
}
|
|
5936
|
+
return shims;
|
|
5937
|
+
}
|
|
5938
|
+
function writeModuleTypeShims(ws, tests) {
|
|
5939
|
+
let shims = planModuleTypeShims(ws.root, tests);
|
|
5940
|
+
for (let s of shims) ws.write(path3.posix.join(s.dir, "package.json"), `${JSON.stringify({ type: s.type })}
|
|
5941
|
+
`);
|
|
5942
|
+
return shims;
|
|
5943
|
+
}
|
|
5944
|
+
|
|
5890
5945
|
// src/runners/index.ts
|
|
5891
5946
|
import { createRequire } from "node:module";
|
|
5892
|
-
import { existsSync as
|
|
5893
|
-
import
|
|
5947
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
5948
|
+
import path5 from "node:path";
|
|
5894
5949
|
|
|
5895
5950
|
// src/classify.ts
|
|
5896
5951
|
var ASSERTION = {
|
|
@@ -6009,7 +6064,7 @@ function firstErrorLine(out) {
|
|
|
6009
6064
|
// src/exec.ts
|
|
6010
6065
|
import { spawn } from "node:child_process";
|
|
6011
6066
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
6012
|
-
import
|
|
6067
|
+
import path4 from "node:path";
|
|
6013
6068
|
var MAX_CAPTURE = 5 * 1024 * 1024, DRAIN_MS = 2e3;
|
|
6014
6069
|
async function runCommand(opts) {
|
|
6015
6070
|
let started = Date.now();
|
|
@@ -6039,7 +6094,7 @@ async function runCommand(opts) {
|
|
|
6039
6094
|
let full = { ...result, stdout, stderr, output, durationMs: Date.now() - started };
|
|
6040
6095
|
if (opts.logFile)
|
|
6041
6096
|
try {
|
|
6042
|
-
mkdirSync(
|
|
6097
|
+
mkdirSync(path4.dirname(opts.logFile), { recursive: !0 }), writeFileSync(opts.logFile, `$ ${opts.cmd} ${opts.args.join(" ")}
|
|
6043
6098
|
|
|
6044
6099
|
${output}
|
|
6045
6100
|
|
|
@@ -6061,8 +6116,8 @@ function tsxLoader() {
|
|
|
6061
6116
|
return require2.resolve("tsx/esm");
|
|
6062
6117
|
}
|
|
6063
6118
|
function bin(root, name) {
|
|
6064
|
-
let p =
|
|
6065
|
-
return
|
|
6119
|
+
let p = path5.join(root, "node_modules", ".bin", name);
|
|
6120
|
+
return existsSync3(p) ? p : null;
|
|
6066
6121
|
}
|
|
6067
6122
|
function commandForFile(runner, file, root) {
|
|
6068
6123
|
switch (runner) {
|
|
@@ -6073,7 +6128,7 @@ function commandForFile(runner, file, root) {
|
|
|
6073
6128
|
case "pytest":
|
|
6074
6129
|
return { cmd: "python3", args: ["-m", "pytest", "-q", "-p", "no:cacheprovider", file] };
|
|
6075
6130
|
case "go":
|
|
6076
|
-
return { cmd: "go", args: ["test", "./" +
|
|
6131
|
+
return { cmd: "go", args: ["test", "./" + path5.posix.dirname(file) + "/", "-run", ".", "-count=1"] };
|
|
6077
6132
|
case "node-test":
|
|
6078
6133
|
case "bundled":
|
|
6079
6134
|
default:
|
|
@@ -6086,7 +6141,7 @@ async function runFileTests(args) {
|
|
|
6086
6141
|
let max = Math.max(1, args.maxAttempts(t)), attempts = [], attemptRefs = [];
|
|
6087
6142
|
log.group(`${t.origin} ${t.level} ${t.path} (${t.runner})`);
|
|
6088
6143
|
for (let n = 1; n <= max; n++) {
|
|
6089
|
-
let { cmd, args: argv } = commandForFile(t.runner, t.path, args.ws.root), logFile =
|
|
6144
|
+
let { cmd, args: argv } = commandForFile(t.runner, t.path, args.ws.root), logFile = path5.join(args.ws.artifactsDir, "logs", `${t.id}-${n}.log`), r = await runCommand({ cmd, args: argv, cwd: args.ws.root, timeoutMs: args.timeoutMs, logFile, onLine: (l) => console.log(` ${l}`) }), c = classifyAttempt(t.runner, r), ref = `log:${t.id}:${n}`;
|
|
6090
6145
|
if (args.artifacts.push({ clientRef: ref, kind: "log", path: logFile, displayPath: args.ws.relative(logFile), contentType: "text/plain", testId: t.id, criterionIds: t.criterionIds, attempt: n }), attempts.push({ n, status: c.status, durationMs: r.durationMs, error: c.error, artifactIds: [] }), attemptRefs.push([ref]), log.info(`attempt ${n}/${max}: ${c.status}${c.error ? ` \u2014 ${c.error}` : ""}`), c.status === "pass" && n === 1 || c.status === "pass" && n > 1 || c.status === "error" && max > 1 && n === 1 && /could not start|ENOENT|Cannot find module|Cannot find package|Failed to (?:load url|resolve import)/.test(c.error || "")) break;
|
|
6091
6146
|
}
|
|
6092
6147
|
log.endGroup();
|
|
@@ -6112,23 +6167,23 @@ async function runFileTests(args) {
|
|
|
6112
6167
|
|
|
6113
6168
|
// src/runners/playwright.ts
|
|
6114
6169
|
import { createRequire as createRequire2 } from "node:module";
|
|
6115
|
-
import { existsSync as
|
|
6170
|
+
import { existsSync as existsSync4, readdirSync as readdirSync2, readFileSync as readFileSync5, statSync as statSync3 } from "node:fs";
|
|
6116
6171
|
import { homedir } from "node:os";
|
|
6117
|
-
import
|
|
6172
|
+
import path6 from "node:path";
|
|
6118
6173
|
var require3 = createRequire2(import.meta.url);
|
|
6119
6174
|
function playwrightCli(root) {
|
|
6120
|
-
let local =
|
|
6121
|
-
return
|
|
6175
|
+
let local = path6.join(root, "node_modules", "@playwright", "test", "cli.js");
|
|
6176
|
+
return existsSync4(local) ? { cmd: process.execPath, args: [local], ours: !1 } : { cmd: process.execPath, args: [require3.resolve("@playwright/test/cli")], ours: !0 };
|
|
6122
6177
|
}
|
|
6123
6178
|
function ourPlaywrightDir() {
|
|
6124
|
-
return
|
|
6179
|
+
return path6.dirname(require3.resolve("@playwright/test/package.json"));
|
|
6125
6180
|
}
|
|
6126
6181
|
function generatePlaywrightConfig(a) {
|
|
6127
6182
|
let j = (v) => JSON.stringify(v);
|
|
6128
6183
|
return [
|
|
6129
6184
|
"// Generated by @devasign/verify \u2014 disposable; the repository's own config is untouched.",
|
|
6130
6185
|
'import { defineConfig } from "@playwright/test";',
|
|
6131
|
-
a.baseConfigRel ? `import __base from ${j(
|
|
6186
|
+
a.baseConfigRel ? `import __base from ${j(path6.resolve(a.root, a.baseConfigRel))};` : "const __base: any = {};",
|
|
6132
6187
|
"const b: any = (__base as any)?.default ?? __base ?? {};",
|
|
6133
6188
|
"// One browser project only: recordings once, and no browsers we did not install.",
|
|
6134
6189
|
"// Project fields win over config fields in Playwright, so the customer's own",
|
|
@@ -6170,8 +6225,8 @@ function flattenSpecs(report) {
|
|
|
6170
6225
|
return out;
|
|
6171
6226
|
}
|
|
6172
6227
|
function pathsMatch(reportFile, planned) {
|
|
6173
|
-
let a = reportFile.split(
|
|
6174
|
-
return a === b || a.endsWith("/" + b) || b.endsWith("/" + a) ||
|
|
6228
|
+
let a = reportFile.split(path6.sep).join("/"), b = planned.split(path6.sep).join("/");
|
|
6229
|
+
return a === b || a.endsWith("/" + b) || b.endsWith("/" + a) || path6.posix.basename(a) === path6.posix.basename(b);
|
|
6175
6230
|
}
|
|
6176
6231
|
function stripAnsi(s) {
|
|
6177
6232
|
return s.replace(/\u001b\[[0-9;]*m/g, "");
|
|
@@ -6199,7 +6254,7 @@ function mapReport(report, tests, ws, artifacts, overallOutput) {
|
|
|
6199
6254
|
let refs = [], videoRef = null, screenshotPath = null;
|
|
6200
6255
|
for (let att of r.attachments || []) {
|
|
6201
6256
|
let kind = KIND_BY_ATTACHMENT[att.name || ""];
|
|
6202
|
-
if (!kind || !att.path || !
|
|
6257
|
+
if (!kind || !att.path || !existsSync4(att.path)) continue;
|
|
6203
6258
|
let ref = `${kind}:${t.id}:${n}:${refs.length}`;
|
|
6204
6259
|
artifacts.push({ clientRef: ref, kind, path: att.path, displayPath: ws.relative(att.path), contentType: att.contentType || TYPE_BY_KIND[kind], testId: t.id, criterionIds: t.criterionIds, attempt: n }), refs.push(ref), kind === "video" && (videoRef = ref), kind === "screenshot" && !screenshotPath && (screenshotPath = att.path);
|
|
6205
6260
|
}
|
|
@@ -6228,14 +6283,15 @@ function mapReport(report, tests, ws, artifacts, overallOutput) {
|
|
|
6228
6283
|
status,
|
|
6229
6284
|
attempts,
|
|
6230
6285
|
durationMs: attempts.reduce((s, a) => s + a.durationMs, 0),
|
|
6231
|
-
|
|
6286
|
+
// Not the last attempt: in a multi-test file that can be a sibling that passed.
|
|
6287
|
+
error: attempts.find((a) => a.status === status)?.error,
|
|
6232
6288
|
artifactIds: []
|
|
6233
6289
|
});
|
|
6234
6290
|
}
|
|
6235
6291
|
return results;
|
|
6236
6292
|
}
|
|
6237
6293
|
function playwrightBrowsersRoot(env = process.env, home = homedir()) {
|
|
6238
|
-
return env.PLAYWRIGHT_BROWSERS_PATH ? env.PLAYWRIGHT_BROWSERS_PATH : process.platform === "darwin" ?
|
|
6294
|
+
return env.PLAYWRIGHT_BROWSERS_PATH ? env.PLAYWRIGHT_BROWSERS_PATH : process.platform === "darwin" ? path6.join(home, "Library", "Caches", "ms-playwright") : process.platform === "win32" ? path6.join(env.LOCALAPPDATA || home, "ms-playwright") : path6.join(home, ".cache", "ms-playwright");
|
|
6239
6295
|
}
|
|
6240
6296
|
function hasChromium(root, read = readdirSync2) {
|
|
6241
6297
|
try {
|
|
@@ -6249,37 +6305,37 @@ async function ensureBrowsers(root, ws) {
|
|
|
6249
6305
|
return log.info("Chromium already installed; skipping download"), { ok: !0, log: "cached" };
|
|
6250
6306
|
let cli = playwrightCli(root), args = [...cli.args, "install", ...process.platform === "linux" ? ["--with-deps"] : [], "chromium"];
|
|
6251
6307
|
log.info("installing Chromium for Playwright");
|
|
6252
|
-
let r = await runCommand({ cmd: cli.cmd, args, cwd: root, timeoutMs: 10 * 6e4, logFile:
|
|
6308
|
+
let r = await runCommand({ cmd: cli.cmd, args, cwd: root, timeoutMs: 10 * 6e4, logFile: path6.join(ws.artifactsDir, "logs", "playwright-install.log") });
|
|
6253
6309
|
return { ok: r.code === 0, log: r.output };
|
|
6254
6310
|
}
|
|
6255
6311
|
async function runPlaywright(args) {
|
|
6256
|
-
let { ws } = args, outputDir =
|
|
6312
|
+
let { ws } = args, outputDir = path6.join(ws.artifactsDir, "pw", args.configName.replace(/\.config\.ts$/, "")), reportFile = path6.join(outputDir, "report.json"), cli = playwrightCli(ws.root);
|
|
6257
6313
|
if (cli.ours) {
|
|
6258
6314
|
ws.linkPackage("@playwright/test", ourPlaywrightDir());
|
|
6259
|
-
let pw =
|
|
6260
|
-
|
|
6315
|
+
let pw = path6.join(ourPlaywrightDir(), "..", "..", "playwright");
|
|
6316
|
+
existsSync4(pw) && ws.linkPackage("playwright", path6.resolve(pw));
|
|
6261
6317
|
}
|
|
6262
|
-
let testDir = args.tests.every((t) => t.origin === "generated") ?
|
|
6318
|
+
let testDir = args.tests.every((t) => t.origin === "generated") ? path6.join(ws.testsDir, "e2e") : ws.root, cfgSource = generatePlaywrightConfig({ root: ws.root, baseConfigRel: args.baseConfigRel, testDir, outputDir, reportFile, retries: args.retries, webServer: webServerFromYml(args.yml) }), cfgPath = ws.write(path6.join(".devasign", args.configName), cfgSource), files = args.tests.map((t) => path6.resolve(ws.root, t.path));
|
|
6263
6319
|
log.group(`playwright ${args.configName}: ${files.length} file(s)`);
|
|
6264
|
-
let r = await runCommand({ cmd: cli.cmd, args: [...cli.args, "test", "--config", cfgPath, ...files], cwd: ws.root, timeoutMs: args.timeoutMs, logFile:
|
|
6320
|
+
let r = await runCommand({ cmd: cli.cmd, args: [...cli.args, "test", "--config", cfgPath, ...files], cwd: ws.root, timeoutMs: args.timeoutMs, logFile: path6.join(ws.artifactsDir, "logs", `${args.configName}.log`), onLine: (l) => console.log(` ${l}`) });
|
|
6265
6321
|
log.endGroup();
|
|
6266
6322
|
let report = {};
|
|
6267
|
-
if (
|
|
6323
|
+
if (existsSync4(reportFile) && statSync3(reportFile).size > 0)
|
|
6268
6324
|
try {
|
|
6269
|
-
report = JSON.parse(
|
|
6325
|
+
report = JSON.parse(readFileSync5(reportFile, "utf8"));
|
|
6270
6326
|
} catch (err) {
|
|
6271
6327
|
log.warn(`could not parse the Playwright JSON report: ${err instanceof Error ? err.message : String(err)}`);
|
|
6272
6328
|
}
|
|
6273
6329
|
let logRef = `log:pw:${args.configName}`;
|
|
6274
|
-
args.artifacts.push({ clientRef: logRef, kind: "log", path:
|
|
6330
|
+
args.artifacts.push({ clientRef: logRef, kind: "log", path: path6.join(ws.artifactsDir, "logs", `${args.configName}.log`), displayPath: ws.relative(path6.join(ws.artifactsDir, "logs", `${args.configName}.log`)), contentType: "text/plain", criterionIds: [] });
|
|
6275
6331
|
let results = mapReport(report, args.tests, ws, args.artifacts, r.output);
|
|
6276
6332
|
for (let res of results) res.artifactIds = [logRef];
|
|
6277
6333
|
return { results, output: r.output, code: r.code };
|
|
6278
6334
|
}
|
|
6279
6335
|
|
|
6280
6336
|
// src/workspace.ts
|
|
6281
|
-
import { existsSync as
|
|
6282
|
-
import
|
|
6337
|
+
import { existsSync as existsSync5, mkdirSync as mkdirSync2, rmSync, symlinkSync, writeFileSync as writeFileSync2 } from "node:fs";
|
|
6338
|
+
import path7 from "node:path";
|
|
6283
6339
|
var DEVASIGN_DIR = ".devasign", Workspace = class {
|
|
6284
6340
|
root;
|
|
6285
6341
|
dir;
|
|
@@ -6288,19 +6344,19 @@ var DEVASIGN_DIR = ".devasign", Workspace = class {
|
|
|
6288
6344
|
created = [];
|
|
6289
6345
|
preexistingDir;
|
|
6290
6346
|
constructor(root) {
|
|
6291
|
-
this.root =
|
|
6347
|
+
this.root = path7.resolve(root), this.dir = path7.join(this.root, DEVASIGN_DIR), this.artifactsDir = path7.join(this.dir, "artifacts"), this.testsDir = path7.join(this.dir, "tests"), this.preexistingDir = existsSync5(this.dir);
|
|
6292
6348
|
for (let sub of ["tests", "artifacts", "node_modules", "playwright.config.ts", "playwright.existing.config.ts"])
|
|
6293
|
-
rmSync(
|
|
6349
|
+
rmSync(path7.join(this.dir, sub), { recursive: !0, force: !0 });
|
|
6294
6350
|
}
|
|
6295
6351
|
/** Absolute path for a repo-relative path, refusing anything outside `.devasign/`. */
|
|
6296
6352
|
resolveOwned(rel) {
|
|
6297
|
-
let full =
|
|
6298
|
-
if (!full.startsWith(this.dir +
|
|
6353
|
+
let full = path7.resolve(this.root, rel);
|
|
6354
|
+
if (!full.startsWith(this.dir + path7.sep)) throw new Error(`refusing to write outside ${DEVASIGN_DIR}/: ${rel}`);
|
|
6299
6355
|
return full;
|
|
6300
6356
|
}
|
|
6301
6357
|
write(rel, content) {
|
|
6302
6358
|
let full = this.resolveOwned(rel);
|
|
6303
|
-
return mkdirSync2(
|
|
6359
|
+
return mkdirSync2(path7.dirname(full), { recursive: !0 }), writeFileSync2(full, content), this.created.push(full), full;
|
|
6304
6360
|
}
|
|
6305
6361
|
ensureDir(rel) {
|
|
6306
6362
|
let full = this.resolveOwned(rel);
|
|
@@ -6308,16 +6364,16 @@ var DEVASIGN_DIR = ".devasign", Workspace = class {
|
|
|
6308
6364
|
}
|
|
6309
6365
|
/** Expose a package from our own install to files under `.devasign/` (never into the repo's node_modules). */
|
|
6310
6366
|
linkPackage(name, target) {
|
|
6311
|
-
let link = this.resolveOwned(
|
|
6312
|
-
|
|
6367
|
+
let link = this.resolveOwned(path7.join(DEVASIGN_DIR, "node_modules", name));
|
|
6368
|
+
existsSync5(link) || (mkdirSync2(path7.dirname(link), { recursive: !0 }), symlinkSync(target, link, "junction"), this.created.push(link));
|
|
6313
6369
|
}
|
|
6314
6370
|
relative(full) {
|
|
6315
|
-
return
|
|
6371
|
+
return path7.relative(this.root, full).split(path7.sep).join("/");
|
|
6316
6372
|
}
|
|
6317
6373
|
/** Remove what we created. A pre-existing `.devasign/` (hooks, config) stays. */
|
|
6318
6374
|
cleanup() {
|
|
6319
6375
|
for (let p of [...this.created].reverse()) rmSync(p, { recursive: !0, force: !0 });
|
|
6320
|
-
for (let sub of ["tests", "artifacts", "node_modules"]) rmSync(
|
|
6376
|
+
for (let sub of ["tests", "artifacts", "node_modules"]) rmSync(path7.join(this.dir, sub), { recursive: !0, force: !0 });
|
|
6321
6377
|
this.preexistingDir || rmSync(this.dir, { recursive: !0, force: !0 }), this.created = [];
|
|
6322
6378
|
}
|
|
6323
6379
|
};
|
|
@@ -6355,9 +6411,11 @@ async function executePlan(plan, ws, opts) {
|
|
|
6355
6411
|
let full = ws.write(t.path, t.content);
|
|
6356
6412
|
artifacts.push({ clientRef: `test_file:${t.id}`, kind: "test_file", path: full, displayPath: t.path, contentType: "text/plain", testId: t.id, criterionIds: t.criterionIds });
|
|
6357
6413
|
}
|
|
6414
|
+
for (let s of writeModuleTypeShims(ws, plan.tests))
|
|
6415
|
+
log.info(`${s.dir}: declared "type": "${s.type}" so the tests relocated there load as they were written`);
|
|
6358
6416
|
for (let t of plan.tests)
|
|
6359
|
-
t.origin === "existing" && !
|
|
6360
|
-
let runnable = plan.tests.filter((t) => !(t.origin === "existing" && !
|
|
6417
|
+
t.origin === "existing" && !existsSync6(path8.resolve(ws.root, t.path)) && results.push({ id: `r-${t.id}`, testId: t.id, criterionIds: t.criterionIds, test: t.path, runner: t.runner, level: t.level, origin: t.origin, status: "error", attempts: [], durationMs: 0, error: "existing test not found in the checkout", artifactIds: [] });
|
|
6418
|
+
let runnable = plan.tests.filter((t) => !(t.origin === "existing" && !existsSync6(path8.resolve(ws.root, t.path)))), pw = runnable.filter((t) => t.runner === "playwright"), others = runnable.filter((t) => t.runner !== "playwright");
|
|
6361
6419
|
if (results.push(...await runFileTests({ tests: others, ws, maxAttempts: (t) => t.origin === "generated" ? 1 + plan.retries.generated : 1, timeoutMs: opts.testTimeoutMs, artifacts })), pw.length) {
|
|
6362
6420
|
let repoCfg = opts.setup?.frameworks.find((f) => f.name === "playwright")?.configPath ?? null;
|
|
6363
6421
|
if (doctor = preflight({ tests: pw, setup: opts.setup, yml: opts.yml, repoHasPlaywrightConfig: !!repoCfg, env: process.env, nodeVersion: process.version }), doctor) {
|
|
@@ -6385,7 +6443,7 @@ function summaryTable(plan, results) {
|
|
|
6385
6443
|
return ["| Criterion | Test | Outcome | Notes |", "|---|---|---|---|", ...plan.criteria.map((c) => {
|
|
6386
6444
|
let mine = results.filter((r) => r.criterionIds.includes(c.id)), u = unverifiable.get(c.id);
|
|
6387
6445
|
if (mine.length) {
|
|
6388
|
-
let tests = mine.map((r) => `${r.level} ${r.origin} \`${cell(r.test)}\``).join("<br>"), outcome = mine.map((r) => `${r.status} (${r.attempts.length} attempt${r.attempts.length === 1 ? "" : "s"})`).join("<br>");
|
|
6446
|
+
let tests = mine.map((r) => `${r.level} ${r.origin} \`${cell(r.test)}\``).join("<br>"), outcome = mine.map((r) => `${r.status} (${r.attempts.length} ${r.runner === "playwright" ? "result" : "attempt"}${r.attempts.length === 1 ? "" : "s"})`).join("<br>");
|
|
6389
6447
|
return `| ${c.id}. ${cell(c.text)} | ${tests} | ${outcome} | |`;
|
|
6390
6448
|
}
|
|
6391
6449
|
let note = u ? `${cell(u.reason)}${u.fixUrl ? ` \u2014 [configure app start](${u.fixUrl})` : ""}` : "no test planned";
|