@ancha-labs/cli 0.4.33 → 0.4.35
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/lib/ancha.mjs +8363 -5249
- package/lib/assets/docs/apps.md +37 -2
- package/lib/assets/docs/cloud.md +1 -0
- package/lib/assets/docs/scenes.md +61 -0
- package/lib/assets/harbor/companion.mjs +6050 -3303
- package/lib/assets/ui/app.js +2 -2
- package/lib/mcp-entry.mjs +399 -250
- package/lib/worker.mjs +6643 -3731
- package/lib/world-server.mjs +5999 -3252
- package/package.json +1 -1
package/lib/mcp-entry.mjs
CHANGED
|
@@ -100,13 +100,13 @@ var require_identity = __commonJS({
|
|
|
100
100
|
var require_visit = __commonJS({
|
|
101
101
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/visit.js"(exports) {
|
|
102
102
|
"use strict";
|
|
103
|
-
var
|
|
103
|
+
var identity2 = require_identity();
|
|
104
104
|
var BREAK = /* @__PURE__ */ Symbol("break visit");
|
|
105
105
|
var SKIP = /* @__PURE__ */ Symbol("skip children");
|
|
106
106
|
var REMOVE = /* @__PURE__ */ Symbol("remove node");
|
|
107
107
|
function visit3(node3, visitor) {
|
|
108
108
|
const visitor_ = initVisitor(visitor);
|
|
109
|
-
if (
|
|
109
|
+
if (identity2.isDocument(node3)) {
|
|
110
110
|
const cd = visit_(null, node3.contents, visitor_, Object.freeze([node3]));
|
|
111
111
|
if (cd === REMOVE)
|
|
112
112
|
node3.contents = null;
|
|
@@ -118,12 +118,12 @@ var require_visit = __commonJS({
|
|
|
118
118
|
visit3.REMOVE = REMOVE;
|
|
119
119
|
function visit_(key2, node3, visitor, path2) {
|
|
120
120
|
const ctrl = callVisitor(key2, node3, visitor, path2);
|
|
121
|
-
if (
|
|
121
|
+
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
|
122
122
|
replaceNode(key2, path2, ctrl);
|
|
123
123
|
return visit_(key2, ctrl, visitor, path2);
|
|
124
124
|
}
|
|
125
125
|
if (typeof ctrl !== "symbol") {
|
|
126
|
-
if (
|
|
126
|
+
if (identity2.isCollection(node3)) {
|
|
127
127
|
path2 = Object.freeze(path2.concat(node3));
|
|
128
128
|
for (let i = 0; i < node3.items.length; ++i) {
|
|
129
129
|
const ci = visit_(i, node3.items[i], visitor, path2);
|
|
@@ -136,7 +136,7 @@ var require_visit = __commonJS({
|
|
|
136
136
|
i -= 1;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
} else if (
|
|
139
|
+
} else if (identity2.isPair(node3)) {
|
|
140
140
|
path2 = Object.freeze(path2.concat(node3));
|
|
141
141
|
const ck = visit_("key", node3.key, visitor, path2);
|
|
142
142
|
if (ck === BREAK)
|
|
@@ -154,7 +154,7 @@ var require_visit = __commonJS({
|
|
|
154
154
|
}
|
|
155
155
|
async function visitAsync(node3, visitor) {
|
|
156
156
|
const visitor_ = initVisitor(visitor);
|
|
157
|
-
if (
|
|
157
|
+
if (identity2.isDocument(node3)) {
|
|
158
158
|
const cd = await visitAsync_(null, node3.contents, visitor_, Object.freeze([node3]));
|
|
159
159
|
if (cd === REMOVE)
|
|
160
160
|
node3.contents = null;
|
|
@@ -166,12 +166,12 @@ var require_visit = __commonJS({
|
|
|
166
166
|
visitAsync.REMOVE = REMOVE;
|
|
167
167
|
async function visitAsync_(key2, node3, visitor, path2) {
|
|
168
168
|
const ctrl = await callVisitor(key2, node3, visitor, path2);
|
|
169
|
-
if (
|
|
169
|
+
if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
|
|
170
170
|
replaceNode(key2, path2, ctrl);
|
|
171
171
|
return visitAsync_(key2, ctrl, visitor, path2);
|
|
172
172
|
}
|
|
173
173
|
if (typeof ctrl !== "symbol") {
|
|
174
|
-
if (
|
|
174
|
+
if (identity2.isCollection(node3)) {
|
|
175
175
|
path2 = Object.freeze(path2.concat(node3));
|
|
176
176
|
for (let i = 0; i < node3.items.length; ++i) {
|
|
177
177
|
const ci = await visitAsync_(i, node3.items[i], visitor, path2);
|
|
@@ -184,7 +184,7 @@ var require_visit = __commonJS({
|
|
|
184
184
|
i -= 1;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
} else if (
|
|
187
|
+
} else if (identity2.isPair(node3)) {
|
|
188
188
|
path2 = Object.freeze(path2.concat(node3));
|
|
189
189
|
const ck = await visitAsync_("key", node3.key, visitor, path2);
|
|
190
190
|
if (ck === BREAK)
|
|
@@ -221,31 +221,31 @@ var require_visit = __commonJS({
|
|
|
221
221
|
function callVisitor(key2, node3, visitor, path2) {
|
|
222
222
|
if (typeof visitor === "function")
|
|
223
223
|
return visitor(key2, node3, path2);
|
|
224
|
-
if (
|
|
224
|
+
if (identity2.isMap(node3))
|
|
225
225
|
return visitor.Map?.(key2, node3, path2);
|
|
226
|
-
if (
|
|
226
|
+
if (identity2.isSeq(node3))
|
|
227
227
|
return visitor.Seq?.(key2, node3, path2);
|
|
228
|
-
if (
|
|
228
|
+
if (identity2.isPair(node3))
|
|
229
229
|
return visitor.Pair?.(key2, node3, path2);
|
|
230
|
-
if (
|
|
230
|
+
if (identity2.isScalar(node3))
|
|
231
231
|
return visitor.Scalar?.(key2, node3, path2);
|
|
232
|
-
if (
|
|
232
|
+
if (identity2.isAlias(node3))
|
|
233
233
|
return visitor.Alias?.(key2, node3, path2);
|
|
234
234
|
return void 0;
|
|
235
235
|
}
|
|
236
236
|
function replaceNode(key2, path2, node3) {
|
|
237
237
|
const parent = path2[path2.length - 1];
|
|
238
|
-
if (
|
|
238
|
+
if (identity2.isCollection(parent)) {
|
|
239
239
|
parent.items[key2] = node3;
|
|
240
|
-
} else if (
|
|
240
|
+
} else if (identity2.isPair(parent)) {
|
|
241
241
|
if (key2 === "key")
|
|
242
242
|
parent.key = node3;
|
|
243
243
|
else
|
|
244
244
|
parent.value = node3;
|
|
245
|
-
} else if (
|
|
245
|
+
} else if (identity2.isDocument(parent)) {
|
|
246
246
|
parent.contents = node3;
|
|
247
247
|
} else {
|
|
248
|
-
const pt =
|
|
248
|
+
const pt = identity2.isAlias(parent) ? "alias" : "scalar";
|
|
249
249
|
throw new Error(`Cannot replace node with ${pt} parent`);
|
|
250
250
|
}
|
|
251
251
|
}
|
|
@@ -258,7 +258,7 @@ var require_visit = __commonJS({
|
|
|
258
258
|
var require_directives = __commonJS({
|
|
259
259
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/directives.js"(exports) {
|
|
260
260
|
"use strict";
|
|
261
|
-
var
|
|
261
|
+
var identity2 = require_identity();
|
|
262
262
|
var visit3 = require_visit();
|
|
263
263
|
var escapeChars = {
|
|
264
264
|
"!": "%21",
|
|
@@ -401,10 +401,10 @@ var require_directives = __commonJS({
|
|
|
401
401
|
const lines = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [];
|
|
402
402
|
const tagEntries = Object.entries(this.tags);
|
|
403
403
|
let tagNames;
|
|
404
|
-
if (doc && tagEntries.length > 0 &&
|
|
404
|
+
if (doc && tagEntries.length > 0 && identity2.isNode(doc.contents)) {
|
|
405
405
|
const tags4 = {};
|
|
406
406
|
visit3.visit(doc.contents, (_key, node3) => {
|
|
407
|
-
if (
|
|
407
|
+
if (identity2.isNode(node3) && node3.tag)
|
|
408
408
|
tags4[node3.tag] = true;
|
|
409
409
|
});
|
|
410
410
|
tagNames = Object.keys(tags4);
|
|
@@ -429,7 +429,7 @@ var require_directives = __commonJS({
|
|
|
429
429
|
var require_anchors = __commonJS({
|
|
430
430
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/anchors.js"(exports) {
|
|
431
431
|
"use strict";
|
|
432
|
-
var
|
|
432
|
+
var identity2 = require_identity();
|
|
433
433
|
var visit3 = require_visit();
|
|
434
434
|
function anchorIsValid(anchor2) {
|
|
435
435
|
if (/[\x00-\x19\s,[\]{}]/.test(anchor2)) {
|
|
@@ -476,7 +476,7 @@ var require_anchors = __commonJS({
|
|
|
476
476
|
setAnchors: () => {
|
|
477
477
|
for (const source of aliasObjects) {
|
|
478
478
|
const ref21 = sourceObjects.get(source);
|
|
479
|
-
if (typeof ref21 === "object" && ref21.anchor && (
|
|
479
|
+
if (typeof ref21 === "object" && ref21.anchor && (identity2.isScalar(ref21.node) || identity2.isCollection(ref21.node))) {
|
|
480
480
|
ref21.node.anchor = ref21.anchor;
|
|
481
481
|
} else {
|
|
482
482
|
const error62 = new Error("Failed to resolve repeated object (this should not happen)");
|
|
@@ -549,12 +549,12 @@ var require_applyReviver = __commonJS({
|
|
|
549
549
|
var require_toJS = __commonJS({
|
|
550
550
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/toJS.js"(exports) {
|
|
551
551
|
"use strict";
|
|
552
|
-
var
|
|
552
|
+
var identity2 = require_identity();
|
|
553
553
|
function toJS(value2, arg, ctx) {
|
|
554
554
|
if (Array.isArray(value2))
|
|
555
555
|
return value2.map((v, i) => toJS(v, String(i), ctx));
|
|
556
556
|
if (value2 && typeof value2.toJSON === "function") {
|
|
557
|
-
if (!ctx || !
|
|
557
|
+
if (!ctx || !identity2.hasAnchor(value2))
|
|
558
558
|
return value2.toJSON(arg, ctx);
|
|
559
559
|
const data = { aliasCount: 0, count: 1, res: void 0 };
|
|
560
560
|
ctx.anchors.set(value2, data);
|
|
@@ -580,11 +580,11 @@ var require_Node = __commonJS({
|
|
|
580
580
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Node.js"(exports) {
|
|
581
581
|
"use strict";
|
|
582
582
|
var applyReviver = require_applyReviver();
|
|
583
|
-
var
|
|
583
|
+
var identity2 = require_identity();
|
|
584
584
|
var toJS = require_toJS();
|
|
585
585
|
var NodeBase = class {
|
|
586
586
|
constructor(type) {
|
|
587
|
-
Object.defineProperty(this,
|
|
587
|
+
Object.defineProperty(this, identity2.NODE_TYPE, { value: type });
|
|
588
588
|
}
|
|
589
589
|
/** Create a copy of this node. */
|
|
590
590
|
clone() {
|
|
@@ -595,7 +595,7 @@ var require_Node = __commonJS({
|
|
|
595
595
|
}
|
|
596
596
|
/** A plain JavaScript representation of this node. */
|
|
597
597
|
toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
|
|
598
|
-
if (!
|
|
598
|
+
if (!identity2.isDocument(doc))
|
|
599
599
|
throw new TypeError("A document argument is required");
|
|
600
600
|
const ctx = {
|
|
601
601
|
anchors: /* @__PURE__ */ new Map(),
|
|
@@ -607,8 +607,8 @@ var require_Node = __commonJS({
|
|
|
607
607
|
};
|
|
608
608
|
const res = toJS.toJS(this, "", ctx);
|
|
609
609
|
if (typeof onAnchor === "function")
|
|
610
|
-
for (const { count:
|
|
611
|
-
onAnchor(res2,
|
|
610
|
+
for (const { count: count5, res: res2 } of ctx.anchors.values())
|
|
611
|
+
onAnchor(res2, count5);
|
|
612
612
|
return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res;
|
|
613
613
|
}
|
|
614
614
|
};
|
|
@@ -622,12 +622,12 @@ var require_Alias = __commonJS({
|
|
|
622
622
|
"use strict";
|
|
623
623
|
var anchors = require_anchors();
|
|
624
624
|
var visit3 = require_visit();
|
|
625
|
-
var
|
|
625
|
+
var identity2 = require_identity();
|
|
626
626
|
var Node = require_Node();
|
|
627
627
|
var toJS = require_toJS();
|
|
628
628
|
var Alias = class extends Node.NodeBase {
|
|
629
629
|
constructor(source) {
|
|
630
|
-
super(
|
|
630
|
+
super(identity2.ALIAS);
|
|
631
631
|
this.source = source;
|
|
632
632
|
Object.defineProperty(this, "tag", {
|
|
633
633
|
set() {
|
|
@@ -649,7 +649,7 @@ var require_Alias = __commonJS({
|
|
|
649
649
|
nodes = [];
|
|
650
650
|
visit3.visit(doc, {
|
|
651
651
|
Node: (_key, node3) => {
|
|
652
|
-
if (
|
|
652
|
+
if (identity2.isAlias(node3) || identity2.hasAnchor(node3))
|
|
653
653
|
nodes.push(node3);
|
|
654
654
|
}
|
|
655
655
|
});
|
|
@@ -711,19 +711,19 @@ var require_Alias = __commonJS({
|
|
|
711
711
|
}
|
|
712
712
|
};
|
|
713
713
|
function getAliasCount(doc, node3, anchors2) {
|
|
714
|
-
if (
|
|
714
|
+
if (identity2.isAlias(node3)) {
|
|
715
715
|
const source = node3.resolve(doc);
|
|
716
716
|
const anchor2 = anchors2 && source && anchors2.get(source);
|
|
717
717
|
return anchor2 ? anchor2.count * anchor2.aliasCount : 0;
|
|
718
|
-
} else if (
|
|
719
|
-
let
|
|
718
|
+
} else if (identity2.isCollection(node3)) {
|
|
719
|
+
let count5 = 0;
|
|
720
720
|
for (const item2 of node3.items) {
|
|
721
721
|
const c = getAliasCount(doc, item2, anchors2);
|
|
722
|
-
if (c >
|
|
723
|
-
|
|
722
|
+
if (c > count5)
|
|
723
|
+
count5 = c;
|
|
724
724
|
}
|
|
725
|
-
return
|
|
726
|
-
} else if (
|
|
725
|
+
return count5;
|
|
726
|
+
} else if (identity2.isPair(node3)) {
|
|
727
727
|
const kc = getAliasCount(doc, node3.key, anchors2);
|
|
728
728
|
const vc = getAliasCount(doc, node3.value, anchors2);
|
|
729
729
|
return Math.max(kc, vc);
|
|
@@ -738,13 +738,13 @@ var require_Alias = __commonJS({
|
|
|
738
738
|
var require_Scalar = __commonJS({
|
|
739
739
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Scalar.js"(exports) {
|
|
740
740
|
"use strict";
|
|
741
|
-
var
|
|
741
|
+
var identity2 = require_identity();
|
|
742
742
|
var Node = require_Node();
|
|
743
743
|
var toJS = require_toJS();
|
|
744
744
|
var isScalarValue = (value2) => !value2 || typeof value2 !== "function" && typeof value2 !== "object";
|
|
745
745
|
var Scalar = class extends Node.NodeBase {
|
|
746
746
|
constructor(value2) {
|
|
747
|
-
super(
|
|
747
|
+
super(identity2.SCALAR);
|
|
748
748
|
this.value = value2;
|
|
749
749
|
}
|
|
750
750
|
toJSON(arg, ctx) {
|
|
@@ -769,7 +769,7 @@ var require_createNode = __commonJS({
|
|
|
769
769
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/createNode.js"(exports) {
|
|
770
770
|
"use strict";
|
|
771
771
|
var Alias = require_Alias();
|
|
772
|
-
var
|
|
772
|
+
var identity2 = require_identity();
|
|
773
773
|
var Scalar = require_Scalar();
|
|
774
774
|
var defaultTagPrefix = "tag:yaml.org,2002:";
|
|
775
775
|
function findTagObject(value2, tagName, tags4) {
|
|
@@ -783,12 +783,12 @@ var require_createNode = __commonJS({
|
|
|
783
783
|
return tags4.find((t) => t.identify?.(value2) && !t.format);
|
|
784
784
|
}
|
|
785
785
|
function createNode(value2, tagName, ctx) {
|
|
786
|
-
if (
|
|
786
|
+
if (identity2.isDocument(value2))
|
|
787
787
|
value2 = value2.contents;
|
|
788
|
-
if (
|
|
788
|
+
if (identity2.isNode(value2))
|
|
789
789
|
return value2;
|
|
790
|
-
if (
|
|
791
|
-
const map2 = ctx.schema[
|
|
790
|
+
if (identity2.isPair(value2)) {
|
|
791
|
+
const map2 = ctx.schema[identity2.MAP].createNode?.(ctx.schema, null, ctx);
|
|
792
792
|
map2.items.push(value2);
|
|
793
793
|
return map2;
|
|
794
794
|
}
|
|
@@ -820,7 +820,7 @@ var require_createNode = __commonJS({
|
|
|
820
820
|
ref21.node = node4;
|
|
821
821
|
return node4;
|
|
822
822
|
}
|
|
823
|
-
tagObj = value2 instanceof Map ? schema[
|
|
823
|
+
tagObj = value2 instanceof Map ? schema[identity2.MAP] : Symbol.iterator in Object(value2) ? schema[identity2.SEQ] : schema[identity2.MAP];
|
|
824
824
|
}
|
|
825
825
|
if (onTagObj) {
|
|
826
826
|
onTagObj(tagObj);
|
|
@@ -844,7 +844,7 @@ var require_Collection = __commonJS({
|
|
|
844
844
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Collection.js"(exports) {
|
|
845
845
|
"use strict";
|
|
846
846
|
var createNode = require_createNode();
|
|
847
|
-
var
|
|
847
|
+
var identity2 = require_identity();
|
|
848
848
|
var Node = require_Node();
|
|
849
849
|
function collectionFromPath(schema, path2, value2) {
|
|
850
850
|
let v = value2;
|
|
@@ -888,7 +888,7 @@ var require_Collection = __commonJS({
|
|
|
888
888
|
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
889
889
|
if (schema)
|
|
890
890
|
copy.schema = schema;
|
|
891
|
-
copy.items = copy.items.map((it) =>
|
|
891
|
+
copy.items = copy.items.map((it) => identity2.isNode(it) || identity2.isPair(it) ? it.clone(schema) : it);
|
|
892
892
|
if (this.range)
|
|
893
893
|
copy.range = this.range.slice();
|
|
894
894
|
return copy;
|
|
@@ -904,7 +904,7 @@ var require_Collection = __commonJS({
|
|
|
904
904
|
else {
|
|
905
905
|
const [key2, ...rest] = path2;
|
|
906
906
|
const node3 = this.get(key2, true);
|
|
907
|
-
if (
|
|
907
|
+
if (identity2.isCollection(node3))
|
|
908
908
|
node3.addIn(rest, value2);
|
|
909
909
|
else if (node3 === void 0 && this.schema)
|
|
910
910
|
this.set(key2, collectionFromPath(this.schema, rest, value2));
|
|
@@ -921,7 +921,7 @@ var require_Collection = __commonJS({
|
|
|
921
921
|
if (rest.length === 0)
|
|
922
922
|
return this.delete(key2);
|
|
923
923
|
const node3 = this.get(key2, true);
|
|
924
|
-
if (
|
|
924
|
+
if (identity2.isCollection(node3))
|
|
925
925
|
return node3.deleteIn(rest);
|
|
926
926
|
else
|
|
927
927
|
throw new Error(`Expected YAML collection at ${key2}. Remaining path: ${rest}`);
|
|
@@ -935,16 +935,16 @@ var require_Collection = __commonJS({
|
|
|
935
935
|
const [key2, ...rest] = path2;
|
|
936
936
|
const node3 = this.get(key2, true);
|
|
937
937
|
if (rest.length === 0)
|
|
938
|
-
return !keepScalar &&
|
|
938
|
+
return !keepScalar && identity2.isScalar(node3) ? node3.value : node3;
|
|
939
939
|
else
|
|
940
|
-
return
|
|
940
|
+
return identity2.isCollection(node3) ? node3.getIn(rest, keepScalar) : void 0;
|
|
941
941
|
}
|
|
942
942
|
hasAllNullValues(allowScalar) {
|
|
943
943
|
return this.items.every((node3) => {
|
|
944
|
-
if (!
|
|
944
|
+
if (!identity2.isPair(node3))
|
|
945
945
|
return false;
|
|
946
946
|
const n = node3.value;
|
|
947
|
-
return n == null || allowScalar &&
|
|
947
|
+
return n == null || allowScalar && identity2.isScalar(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
|
|
948
948
|
});
|
|
949
949
|
}
|
|
950
950
|
/**
|
|
@@ -955,7 +955,7 @@ var require_Collection = __commonJS({
|
|
|
955
955
|
if (rest.length === 0)
|
|
956
956
|
return this.has(key2);
|
|
957
957
|
const node3 = this.get(key2, true);
|
|
958
|
-
return
|
|
958
|
+
return identity2.isCollection(node3) ? node3.hasIn(rest) : false;
|
|
959
959
|
}
|
|
960
960
|
/**
|
|
961
961
|
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
@@ -967,7 +967,7 @@ var require_Collection = __commonJS({
|
|
|
967
967
|
this.set(key2, value2);
|
|
968
968
|
} else {
|
|
969
969
|
const node3 = this.get(key2, true);
|
|
970
|
-
if (
|
|
970
|
+
if (identity2.isCollection(node3))
|
|
971
971
|
node3.setIn(rest, value2);
|
|
972
972
|
else if (node3 === void 0 && this.schema)
|
|
973
973
|
this.set(key2, collectionFromPath(this.schema, rest, value2));
|
|
@@ -1423,7 +1423,7 @@ var require_stringify = __commonJS({
|
|
|
1423
1423
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringify.js"(exports) {
|
|
1424
1424
|
"use strict";
|
|
1425
1425
|
var anchors = require_anchors();
|
|
1426
|
-
var
|
|
1426
|
+
var identity2 = require_identity();
|
|
1427
1427
|
var stringifyComment = require_stringifyComment();
|
|
1428
1428
|
var stringifyString = require_stringifyString();
|
|
1429
1429
|
function createStringifyContext(doc, options) {
|
|
@@ -1476,7 +1476,7 @@ var require_stringify = __commonJS({
|
|
|
1476
1476
|
}
|
|
1477
1477
|
let tagObj = void 0;
|
|
1478
1478
|
let obj;
|
|
1479
|
-
if (
|
|
1479
|
+
if (identity2.isScalar(item2)) {
|
|
1480
1480
|
obj = item2.value;
|
|
1481
1481
|
let match = tags4.filter((t) => t.identify?.(obj));
|
|
1482
1482
|
if (match.length > 1) {
|
|
@@ -1499,7 +1499,7 @@ var require_stringify = __commonJS({
|
|
|
1499
1499
|
if (!doc.directives)
|
|
1500
1500
|
return "";
|
|
1501
1501
|
const props = [];
|
|
1502
|
-
const anchor2 = (
|
|
1502
|
+
const anchor2 = (identity2.isScalar(node3) || identity2.isCollection(node3)) && node3.anchor;
|
|
1503
1503
|
if (anchor2 && anchors.anchorIsValid(anchor2)) {
|
|
1504
1504
|
anchors$1.add(anchor2);
|
|
1505
1505
|
props.push(`&${anchor2}`);
|
|
@@ -1510,9 +1510,9 @@ var require_stringify = __commonJS({
|
|
|
1510
1510
|
return props.join(" ");
|
|
1511
1511
|
}
|
|
1512
1512
|
function stringify2(item2, ctx, onComment, onChompKeep) {
|
|
1513
|
-
if (
|
|
1513
|
+
if (identity2.isPair(item2))
|
|
1514
1514
|
return item2.toString(ctx, onComment, onChompKeep);
|
|
1515
|
-
if (
|
|
1515
|
+
if (identity2.isAlias(item2)) {
|
|
1516
1516
|
if (ctx.doc.directives)
|
|
1517
1517
|
return item2.toString(ctx);
|
|
1518
1518
|
if (ctx.resolvedAliases?.has(item2)) {
|
|
@@ -1526,15 +1526,15 @@ var require_stringify = __commonJS({
|
|
|
1526
1526
|
}
|
|
1527
1527
|
}
|
|
1528
1528
|
let tagObj = void 0;
|
|
1529
|
-
const node3 =
|
|
1529
|
+
const node3 = identity2.isNode(item2) ? item2 : ctx.doc.createNode(item2, { onTagObj: (o) => tagObj = o });
|
|
1530
1530
|
tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node3));
|
|
1531
1531
|
const props = stringifyProps(node3, tagObj, ctx);
|
|
1532
1532
|
if (props.length > 0)
|
|
1533
1533
|
ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
|
|
1534
|
-
const str = typeof tagObj.stringify === "function" ? tagObj.stringify(node3, ctx, onComment, onChompKeep) :
|
|
1534
|
+
const str = typeof tagObj.stringify === "function" ? tagObj.stringify(node3, ctx, onComment, onChompKeep) : identity2.isScalar(node3) ? stringifyString.stringifyString(node3, ctx, onComment, onChompKeep) : node3.toString(ctx, onComment, onChompKeep);
|
|
1535
1535
|
if (!props)
|
|
1536
1536
|
return str;
|
|
1537
|
-
return
|
|
1537
|
+
return identity2.isScalar(node3) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props}
|
|
1538
1538
|
${ctx.indent}${str}`;
|
|
1539
1539
|
}
|
|
1540
1540
|
exports.createStringifyContext = createStringifyContext;
|
|
@@ -1546,23 +1546,23 @@ ${ctx.indent}${str}`;
|
|
|
1546
1546
|
var require_stringifyPair = __commonJS({
|
|
1547
1547
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyPair.js"(exports) {
|
|
1548
1548
|
"use strict";
|
|
1549
|
-
var
|
|
1549
|
+
var identity2 = require_identity();
|
|
1550
1550
|
var Scalar = require_Scalar();
|
|
1551
1551
|
var stringify2 = require_stringify();
|
|
1552
1552
|
var stringifyComment = require_stringifyComment();
|
|
1553
1553
|
function stringifyPair({ key: key2, value: value2 }, ctx, onComment, onChompKeep) {
|
|
1554
1554
|
const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
|
1555
|
-
let keyComment =
|
|
1555
|
+
let keyComment = identity2.isNode(key2) && key2.comment || null;
|
|
1556
1556
|
if (simpleKeys) {
|
|
1557
1557
|
if (keyComment) {
|
|
1558
1558
|
throw new Error("With simple keys, key nodes cannot have comments");
|
|
1559
1559
|
}
|
|
1560
|
-
if (
|
|
1560
|
+
if (identity2.isCollection(key2) || !identity2.isNode(key2) && typeof key2 === "object") {
|
|
1561
1561
|
const msg = "With simple keys, collection cannot be used as a key value";
|
|
1562
1562
|
throw new Error(msg);
|
|
1563
1563
|
}
|
|
1564
1564
|
}
|
|
1565
|
-
let explicitKey = !simpleKeys && (!key2 || keyComment && value2 == null && !ctx.inFlow ||
|
|
1565
|
+
let explicitKey = !simpleKeys && (!key2 || keyComment && value2 == null && !ctx.inFlow || identity2.isCollection(key2) || (identity2.isScalar(key2) ? key2.type === Scalar.Scalar.BLOCK_FOLDED || key2.type === Scalar.Scalar.BLOCK_LITERAL : typeof key2 === "object"));
|
|
1566
1566
|
ctx = Object.assign({}, ctx, {
|
|
1567
1567
|
allNullValues: false,
|
|
1568
1568
|
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
|
@@ -1603,7 +1603,7 @@ ${indent}:`;
|
|
|
1603
1603
|
str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));
|
|
1604
1604
|
}
|
|
1605
1605
|
let vsb, vcb, valueComment;
|
|
1606
|
-
if (
|
|
1606
|
+
if (identity2.isNode(value2)) {
|
|
1607
1607
|
vsb = !!value2.spaceBefore;
|
|
1608
1608
|
vcb = value2.commentBefore;
|
|
1609
1609
|
valueComment = value2.comment;
|
|
@@ -1615,10 +1615,10 @@ ${indent}:`;
|
|
|
1615
1615
|
value2 = doc.createNode(value2);
|
|
1616
1616
|
}
|
|
1617
1617
|
ctx.implicitKey = false;
|
|
1618
|
-
if (!explicitKey && !keyComment &&
|
|
1618
|
+
if (!explicitKey && !keyComment && identity2.isScalar(value2))
|
|
1619
1619
|
ctx.indentAtStart = str.length + 1;
|
|
1620
1620
|
chompKeep = false;
|
|
1621
|
-
if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey &&
|
|
1621
|
+
if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity2.isSeq(value2) && !value2.flow && !value2.tag && !value2.anchor) {
|
|
1622
1622
|
ctx.indent = ctx.indent.substring(2);
|
|
1623
1623
|
}
|
|
1624
1624
|
let valueCommentDone = false;
|
|
@@ -1638,7 +1638,7 @@ ${stringifyComment.indentComment(cs, ctx.indent)}`;
|
|
|
1638
1638
|
ws += `
|
|
1639
1639
|
${ctx.indent}`;
|
|
1640
1640
|
}
|
|
1641
|
-
} else if (!explicitKey &&
|
|
1641
|
+
} else if (!explicitKey && identity2.isCollection(value2)) {
|
|
1642
1642
|
const vs0 = valueStr[0];
|
|
1643
1643
|
const nl0 = valueStr.indexOf("\n");
|
|
1644
1644
|
const hasNewline = nl0 !== -1;
|
|
@@ -1701,7 +1701,7 @@ var require_log = __commonJS({
|
|
|
1701
1701
|
var require_merge = __commonJS({
|
|
1702
1702
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports) {
|
|
1703
1703
|
"use strict";
|
|
1704
|
-
var
|
|
1704
|
+
var identity2 = require_identity();
|
|
1705
1705
|
var Scalar = require_Scalar();
|
|
1706
1706
|
var MERGE_KEY = "<<";
|
|
1707
1707
|
var merge2 = {
|
|
@@ -1714,10 +1714,10 @@ var require_merge = __commonJS({
|
|
|
1714
1714
|
}),
|
|
1715
1715
|
stringify: () => MERGE_KEY
|
|
1716
1716
|
};
|
|
1717
|
-
var isMergeKey = (ctx, key2) => (merge2.identify(key2) ||
|
|
1717
|
+
var isMergeKey = (ctx, key2) => (merge2.identify(key2) || identity2.isScalar(key2) && (!key2.type || key2.type === Scalar.Scalar.PLAIN) && merge2.identify(key2.value)) && ctx?.doc.schema.tags.some((tag3) => tag3.tag === merge2.tag && tag3.default);
|
|
1718
1718
|
function addMergeToJSMap(ctx, map2, value2) {
|
|
1719
1719
|
const source = resolveAliasValue(ctx, value2);
|
|
1720
|
-
if (
|
|
1720
|
+
if (identity2.isSeq(source))
|
|
1721
1721
|
for (const it of source.items)
|
|
1722
1722
|
mergeValue(ctx, map2, it);
|
|
1723
1723
|
else if (Array.isArray(source))
|
|
@@ -1728,7 +1728,7 @@ var require_merge = __commonJS({
|
|
|
1728
1728
|
}
|
|
1729
1729
|
function mergeValue(ctx, map2, value2) {
|
|
1730
1730
|
const source = resolveAliasValue(ctx, value2);
|
|
1731
|
-
if (!
|
|
1731
|
+
if (!identity2.isMap(source))
|
|
1732
1732
|
throw new Error("Merge sources must be maps or map aliases");
|
|
1733
1733
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
1734
1734
|
for (const [key2, value3] of srcMap) {
|
|
@@ -1749,7 +1749,7 @@ var require_merge = __commonJS({
|
|
|
1749
1749
|
return map2;
|
|
1750
1750
|
}
|
|
1751
1751
|
function resolveAliasValue(ctx, value2) {
|
|
1752
|
-
return ctx &&
|
|
1752
|
+
return ctx && identity2.isAlias(value2) ? value2.resolve(ctx.doc, ctx) : value2;
|
|
1753
1753
|
}
|
|
1754
1754
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
1755
1755
|
exports.isMergeKey = isMergeKey;
|
|
@@ -1764,10 +1764,10 @@ var require_addPairToJSMap = __commonJS({
|
|
|
1764
1764
|
var log = require_log();
|
|
1765
1765
|
var merge2 = require_merge();
|
|
1766
1766
|
var stringify2 = require_stringify();
|
|
1767
|
-
var
|
|
1767
|
+
var identity2 = require_identity();
|
|
1768
1768
|
var toJS = require_toJS();
|
|
1769
1769
|
function addPairToJSMap(ctx, map2, { key: key2, value: value2 }) {
|
|
1770
|
-
if (
|
|
1770
|
+
if (identity2.isNode(key2) && key2.addToJSMap)
|
|
1771
1771
|
key2.addToJSMap(ctx, map2, value2);
|
|
1772
1772
|
else if (merge2.isMergeKey(ctx, key2))
|
|
1773
1773
|
merge2.addMergeToJSMap(ctx, map2, value2);
|
|
@@ -1798,7 +1798,7 @@ var require_addPairToJSMap = __commonJS({
|
|
|
1798
1798
|
return "";
|
|
1799
1799
|
if (typeof jsKey !== "object")
|
|
1800
1800
|
return String(jsKey);
|
|
1801
|
-
if (
|
|
1801
|
+
if (identity2.isNode(key2) && ctx?.doc) {
|
|
1802
1802
|
const strCtx = stringify2.createStringifyContext(ctx.doc, {});
|
|
1803
1803
|
strCtx.anchors = /* @__PURE__ */ new Set();
|
|
1804
1804
|
for (const node3 of ctx.anchors.keys())
|
|
@@ -1828,7 +1828,7 @@ var require_Pair = __commonJS({
|
|
|
1828
1828
|
var createNode = require_createNode();
|
|
1829
1829
|
var stringifyPair = require_stringifyPair();
|
|
1830
1830
|
var addPairToJSMap = require_addPairToJSMap();
|
|
1831
|
-
var
|
|
1831
|
+
var identity2 = require_identity();
|
|
1832
1832
|
function createPair(key2, value2, ctx) {
|
|
1833
1833
|
const k = createNode.createNode(key2, void 0, ctx);
|
|
1834
1834
|
const v = createNode.createNode(value2, void 0, ctx);
|
|
@@ -1836,15 +1836,15 @@ var require_Pair = __commonJS({
|
|
|
1836
1836
|
}
|
|
1837
1837
|
var Pair = class _Pair {
|
|
1838
1838
|
constructor(key2, value2 = null) {
|
|
1839
|
-
Object.defineProperty(this,
|
|
1839
|
+
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
|
|
1840
1840
|
this.key = key2;
|
|
1841
1841
|
this.value = value2;
|
|
1842
1842
|
}
|
|
1843
1843
|
clone(schema) {
|
|
1844
1844
|
let { key: key2, value: value2 } = this;
|
|
1845
|
-
if (
|
|
1845
|
+
if (identity2.isNode(key2))
|
|
1846
1846
|
key2 = key2.clone(schema);
|
|
1847
|
-
if (
|
|
1847
|
+
if (identity2.isNode(value2))
|
|
1848
1848
|
value2 = value2.clone(schema);
|
|
1849
1849
|
return new _Pair(key2, value2);
|
|
1850
1850
|
}
|
|
@@ -1865,7 +1865,7 @@ var require_Pair = __commonJS({
|
|
|
1865
1865
|
var require_stringifyCollection = __commonJS({
|
|
1866
1866
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyCollection.js"(exports) {
|
|
1867
1867
|
"use strict";
|
|
1868
|
-
var
|
|
1868
|
+
var identity2 = require_identity();
|
|
1869
1869
|
var stringify2 = require_stringify();
|
|
1870
1870
|
var stringifyComment = require_stringifyComment();
|
|
1871
1871
|
function stringifyCollection(collection, ctx, options) {
|
|
@@ -1881,14 +1881,14 @@ var require_stringifyCollection = __commonJS({
|
|
|
1881
1881
|
for (let i = 0; i < items.length; ++i) {
|
|
1882
1882
|
const item2 = items[i];
|
|
1883
1883
|
let comment7 = null;
|
|
1884
|
-
if (
|
|
1884
|
+
if (identity2.isNode(item2)) {
|
|
1885
1885
|
if (!chompKeep && item2.spaceBefore)
|
|
1886
1886
|
lines.push("");
|
|
1887
1887
|
addCommentBefore(ctx, lines, item2.commentBefore, chompKeep);
|
|
1888
1888
|
if (item2.comment)
|
|
1889
1889
|
comment7 = item2.comment;
|
|
1890
|
-
} else if (
|
|
1891
|
-
const ik =
|
|
1890
|
+
} else if (identity2.isPair(item2)) {
|
|
1891
|
+
const ik = identity2.isNode(item2.key) ? item2.key : null;
|
|
1892
1892
|
if (ik) {
|
|
1893
1893
|
if (!chompKeep && ik.spaceBefore)
|
|
1894
1894
|
lines.push("");
|
|
@@ -1936,14 +1936,14 @@ ${indent}${line2}` : "\n";
|
|
|
1936
1936
|
for (let i = 0; i < items.length; ++i) {
|
|
1937
1937
|
const item2 = items[i];
|
|
1938
1938
|
let comment6 = null;
|
|
1939
|
-
if (
|
|
1939
|
+
if (identity2.isNode(item2)) {
|
|
1940
1940
|
if (item2.spaceBefore)
|
|
1941
1941
|
lines.push("");
|
|
1942
1942
|
addCommentBefore(ctx, lines, item2.commentBefore, false);
|
|
1943
1943
|
if (item2.comment)
|
|
1944
1944
|
comment6 = item2.comment;
|
|
1945
|
-
} else if (
|
|
1946
|
-
const ik =
|
|
1945
|
+
} else if (identity2.isPair(item2)) {
|
|
1946
|
+
const ik = identity2.isNode(item2.key) ? item2.key : null;
|
|
1947
1947
|
if (ik) {
|
|
1948
1948
|
if (ik.spaceBefore)
|
|
1949
1949
|
lines.push("");
|
|
@@ -1951,7 +1951,7 @@ ${indent}${line2}` : "\n";
|
|
|
1951
1951
|
if (ik.comment)
|
|
1952
1952
|
reqNewline = true;
|
|
1953
1953
|
}
|
|
1954
|
-
const iv =
|
|
1954
|
+
const iv = identity2.isNode(item2.value) ? item2.value : null;
|
|
1955
1955
|
if (iv) {
|
|
1956
1956
|
if (iv.comment)
|
|
1957
1957
|
comment6 = iv.comment;
|
|
@@ -2019,16 +2019,16 @@ var require_YAMLMap = __commonJS({
|
|
|
2019
2019
|
var stringifyCollection = require_stringifyCollection();
|
|
2020
2020
|
var addPairToJSMap = require_addPairToJSMap();
|
|
2021
2021
|
var Collection = require_Collection();
|
|
2022
|
-
var
|
|
2022
|
+
var identity2 = require_identity();
|
|
2023
2023
|
var Pair = require_Pair();
|
|
2024
2024
|
var Scalar = require_Scalar();
|
|
2025
2025
|
function findPair(items, key2) {
|
|
2026
|
-
const k =
|
|
2026
|
+
const k = identity2.isScalar(key2) ? key2.value : key2;
|
|
2027
2027
|
for (const it of items) {
|
|
2028
|
-
if (
|
|
2028
|
+
if (identity2.isPair(it)) {
|
|
2029
2029
|
if (it.key === key2 || it.key === k)
|
|
2030
2030
|
return it;
|
|
2031
|
-
if (
|
|
2031
|
+
if (identity2.isScalar(it.key) && it.key.value === k)
|
|
2032
2032
|
return it;
|
|
2033
2033
|
}
|
|
2034
2034
|
}
|
|
@@ -2039,7 +2039,7 @@ var require_YAMLMap = __commonJS({
|
|
|
2039
2039
|
return "tag:yaml.org,2002:map";
|
|
2040
2040
|
}
|
|
2041
2041
|
constructor(schema) {
|
|
2042
|
-
super(
|
|
2042
|
+
super(identity2.MAP, schema);
|
|
2043
2043
|
this.items = [];
|
|
2044
2044
|
}
|
|
2045
2045
|
/**
|
|
@@ -2077,7 +2077,7 @@ var require_YAMLMap = __commonJS({
|
|
|
2077
2077
|
*/
|
|
2078
2078
|
add(pair, overwrite) {
|
|
2079
2079
|
let _pair;
|
|
2080
|
-
if (
|
|
2080
|
+
if (identity2.isPair(pair))
|
|
2081
2081
|
_pair = pair;
|
|
2082
2082
|
else if (!pair || typeof pair !== "object" || !("key" in pair)) {
|
|
2083
2083
|
_pair = new Pair.Pair(pair, pair?.value);
|
|
@@ -2088,7 +2088,7 @@ var require_YAMLMap = __commonJS({
|
|
|
2088
2088
|
if (prev) {
|
|
2089
2089
|
if (!overwrite)
|
|
2090
2090
|
throw new Error(`Key ${_pair.key} already set`);
|
|
2091
|
-
if (
|
|
2091
|
+
if (identity2.isScalar(prev.value) && Scalar.isScalarValue(_pair.value))
|
|
2092
2092
|
prev.value.value = _pair.value;
|
|
2093
2093
|
else
|
|
2094
2094
|
prev.value = _pair.value;
|
|
@@ -2112,7 +2112,7 @@ var require_YAMLMap = __commonJS({
|
|
|
2112
2112
|
get(key2, keepScalar) {
|
|
2113
2113
|
const it = findPair(this.items, key2);
|
|
2114
2114
|
const node3 = it?.value;
|
|
2115
|
-
return (!keepScalar &&
|
|
2115
|
+
return (!keepScalar && identity2.isScalar(node3) ? node3.value : node3) ?? void 0;
|
|
2116
2116
|
}
|
|
2117
2117
|
has(key2) {
|
|
2118
2118
|
return !!findPair(this.items, key2);
|
|
@@ -2137,7 +2137,7 @@ var require_YAMLMap = __commonJS({
|
|
|
2137
2137
|
if (!ctx)
|
|
2138
2138
|
return JSON.stringify(this);
|
|
2139
2139
|
for (const item2 of this.items) {
|
|
2140
|
-
if (!
|
|
2140
|
+
if (!identity2.isPair(item2))
|
|
2141
2141
|
throw new Error(`Map items must all be pairs; found ${JSON.stringify(item2)} instead`);
|
|
2142
2142
|
}
|
|
2143
2143
|
if (!ctx.allNullValues && this.hasAllNullValues(false))
|
|
@@ -2160,7 +2160,7 @@ var require_YAMLMap = __commonJS({
|
|
|
2160
2160
|
var require_map = __commonJS({
|
|
2161
2161
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/map.js"(exports) {
|
|
2162
2162
|
"use strict";
|
|
2163
|
-
var
|
|
2163
|
+
var identity2 = require_identity();
|
|
2164
2164
|
var YAMLMap = require_YAMLMap();
|
|
2165
2165
|
var map2 = {
|
|
2166
2166
|
collection: "map",
|
|
@@ -2168,7 +2168,7 @@ var require_map = __commonJS({
|
|
|
2168
2168
|
nodeClass: YAMLMap.YAMLMap,
|
|
2169
2169
|
tag: "tag:yaml.org,2002:map",
|
|
2170
2170
|
resolve(map3, onError) {
|
|
2171
|
-
if (!
|
|
2171
|
+
if (!identity2.isMap(map3))
|
|
2172
2172
|
onError("Expected a mapping for this tag");
|
|
2173
2173
|
return map3;
|
|
2174
2174
|
},
|
|
@@ -2185,7 +2185,7 @@ var require_YAMLSeq = __commonJS({
|
|
|
2185
2185
|
var createNode = require_createNode();
|
|
2186
2186
|
var stringifyCollection = require_stringifyCollection();
|
|
2187
2187
|
var Collection = require_Collection();
|
|
2188
|
-
var
|
|
2188
|
+
var identity2 = require_identity();
|
|
2189
2189
|
var Scalar = require_Scalar();
|
|
2190
2190
|
var toJS = require_toJS();
|
|
2191
2191
|
var YAMLSeq = class extends Collection.Collection {
|
|
@@ -2193,7 +2193,7 @@ var require_YAMLSeq = __commonJS({
|
|
|
2193
2193
|
return "tag:yaml.org,2002:seq";
|
|
2194
2194
|
}
|
|
2195
2195
|
constructor(schema) {
|
|
2196
|
-
super(
|
|
2196
|
+
super(identity2.SEQ, schema);
|
|
2197
2197
|
this.items = [];
|
|
2198
2198
|
}
|
|
2199
2199
|
add(value2) {
|
|
@@ -2219,7 +2219,7 @@ var require_YAMLSeq = __commonJS({
|
|
|
2219
2219
|
if (typeof idx !== "number")
|
|
2220
2220
|
return void 0;
|
|
2221
2221
|
const it = this.items[idx];
|
|
2222
|
-
return !keepScalar &&
|
|
2222
|
+
return !keepScalar && identity2.isScalar(it) ? it.value : it;
|
|
2223
2223
|
}
|
|
2224
2224
|
/**
|
|
2225
2225
|
* Checks if the collection includes a value with the key `key`.
|
|
@@ -2243,7 +2243,7 @@ var require_YAMLSeq = __commonJS({
|
|
|
2243
2243
|
if (typeof idx !== "number")
|
|
2244
2244
|
throw new Error(`Expected a valid index, not ${key2}.`);
|
|
2245
2245
|
const prev = this.items[idx];
|
|
2246
|
-
if (
|
|
2246
|
+
if (identity2.isScalar(prev) && Scalar.isScalarValue(value2))
|
|
2247
2247
|
prev.value = value2;
|
|
2248
2248
|
else
|
|
2249
2249
|
this.items[idx] = value2;
|
|
@@ -2285,7 +2285,7 @@ var require_YAMLSeq = __commonJS({
|
|
|
2285
2285
|
}
|
|
2286
2286
|
};
|
|
2287
2287
|
function asItemIndex(key2) {
|
|
2288
|
-
let idx =
|
|
2288
|
+
let idx = identity2.isScalar(key2) ? key2.value : key2;
|
|
2289
2289
|
if (idx && typeof idx === "string")
|
|
2290
2290
|
idx = Number(idx);
|
|
2291
2291
|
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
|
@@ -2298,7 +2298,7 @@ var require_YAMLSeq = __commonJS({
|
|
|
2298
2298
|
var require_seq = __commonJS({
|
|
2299
2299
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/seq.js"(exports) {
|
|
2300
2300
|
"use strict";
|
|
2301
|
-
var
|
|
2301
|
+
var identity2 = require_identity();
|
|
2302
2302
|
var YAMLSeq = require_YAMLSeq();
|
|
2303
2303
|
var seq = {
|
|
2304
2304
|
collection: "seq",
|
|
@@ -2306,7 +2306,7 @@ var require_seq = __commonJS({
|
|
|
2306
2306
|
nodeClass: YAMLSeq.YAMLSeq,
|
|
2307
2307
|
tag: "tag:yaml.org,2002:seq",
|
|
2308
2308
|
resolve(seq2, onError) {
|
|
2309
|
-
if (!
|
|
2309
|
+
if (!identity2.isSeq(seq2))
|
|
2310
2310
|
onError("Expected a sequence for this tag");
|
|
2311
2311
|
return seq2;
|
|
2312
2312
|
},
|
|
@@ -2660,17 +2660,17 @@ var require_binary = __commonJS({
|
|
|
2660
2660
|
var require_pairs = __commonJS({
|
|
2661
2661
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports) {
|
|
2662
2662
|
"use strict";
|
|
2663
|
-
var
|
|
2663
|
+
var identity2 = require_identity();
|
|
2664
2664
|
var Pair = require_Pair();
|
|
2665
2665
|
var Scalar = require_Scalar();
|
|
2666
2666
|
var YAMLSeq = require_YAMLSeq();
|
|
2667
2667
|
function resolvePairs(seq, onError) {
|
|
2668
|
-
if (
|
|
2668
|
+
if (identity2.isSeq(seq)) {
|
|
2669
2669
|
for (let i = 0; i < seq.items.length; ++i) {
|
|
2670
2670
|
let item2 = seq.items[i];
|
|
2671
|
-
if (
|
|
2671
|
+
if (identity2.isPair(item2))
|
|
2672
2672
|
continue;
|
|
2673
|
-
else if (
|
|
2673
|
+
else if (identity2.isMap(item2)) {
|
|
2674
2674
|
if (item2.items.length > 1)
|
|
2675
2675
|
onError("Each pair must have its own sequence indicator");
|
|
2676
2676
|
const pair = item2.items[0] || new Pair.Pair(new Scalar.Scalar(null));
|
|
@@ -2684,7 +2684,7 @@ ${cn.comment}` : item2.comment;
|
|
|
2684
2684
|
}
|
|
2685
2685
|
item2 = pair;
|
|
2686
2686
|
}
|
|
2687
|
-
seq.items[i] =
|
|
2687
|
+
seq.items[i] = identity2.isPair(item2) ? item2 : new Pair.Pair(item2);
|
|
2688
2688
|
}
|
|
2689
2689
|
} else
|
|
2690
2690
|
onError("Expected a sequence for this tag");
|
|
@@ -2738,7 +2738,7 @@ ${cn.comment}` : item2.comment;
|
|
|
2738
2738
|
var require_omap = __commonJS({
|
|
2739
2739
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports) {
|
|
2740
2740
|
"use strict";
|
|
2741
|
-
var
|
|
2741
|
+
var identity2 = require_identity();
|
|
2742
2742
|
var toJS = require_toJS();
|
|
2743
2743
|
var YAMLMap = require_YAMLMap();
|
|
2744
2744
|
var YAMLSeq = require_YAMLSeq();
|
|
@@ -2765,7 +2765,7 @@ var require_omap = __commonJS({
|
|
|
2765
2765
|
ctx.onCreate(map2);
|
|
2766
2766
|
for (const pair of this.items) {
|
|
2767
2767
|
let key2, value2;
|
|
2768
|
-
if (
|
|
2768
|
+
if (identity2.isPair(pair)) {
|
|
2769
2769
|
key2 = toJS.toJS(pair.key, "", ctx);
|
|
2770
2770
|
value2 = toJS.toJS(pair.value, key2, ctx);
|
|
2771
2771
|
} else {
|
|
@@ -2795,7 +2795,7 @@ var require_omap = __commonJS({
|
|
|
2795
2795
|
const pairs$1 = pairs.resolvePairs(seq, onError);
|
|
2796
2796
|
const seenKeys = [];
|
|
2797
2797
|
for (const { key: key2 } of pairs$1.items) {
|
|
2798
|
-
if (
|
|
2798
|
+
if (identity2.isScalar(key2)) {
|
|
2799
2799
|
if (seenKeys.includes(key2.value)) {
|
|
2800
2800
|
onError(`Ordered maps must not include duplicate keys: ${key2.value}`);
|
|
2801
2801
|
} else {
|
|
@@ -2976,7 +2976,7 @@ var require_int2 = __commonJS({
|
|
|
2976
2976
|
var require_set = __commonJS({
|
|
2977
2977
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports) {
|
|
2978
2978
|
"use strict";
|
|
2979
|
-
var
|
|
2979
|
+
var identity2 = require_identity();
|
|
2980
2980
|
var Pair = require_Pair();
|
|
2981
2981
|
var YAMLMap = require_YAMLMap();
|
|
2982
2982
|
var YAMLSet = class _YAMLSet extends YAMLMap.YAMLMap {
|
|
@@ -2986,7 +2986,7 @@ var require_set = __commonJS({
|
|
|
2986
2986
|
}
|
|
2987
2987
|
add(key2) {
|
|
2988
2988
|
let pair;
|
|
2989
|
-
if (
|
|
2989
|
+
if (identity2.isPair(key2))
|
|
2990
2990
|
pair = key2;
|
|
2991
2991
|
else if (key2 && typeof key2 === "object" && "key" in key2 && "value" in key2 && key2.value === null)
|
|
2992
2992
|
pair = new Pair.Pair(key2.key, null);
|
|
@@ -3002,7 +3002,7 @@ var require_set = __commonJS({
|
|
|
3002
3002
|
*/
|
|
3003
3003
|
get(key2, keepPair) {
|
|
3004
3004
|
const pair = YAMLMap.findPair(this.items, key2);
|
|
3005
|
-
return !keepPair &&
|
|
3005
|
+
return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
|
3006
3006
|
}
|
|
3007
3007
|
set(key2, value2) {
|
|
3008
3008
|
if (typeof value2 !== "boolean")
|
|
@@ -3046,7 +3046,7 @@ var require_set = __commonJS({
|
|
|
3046
3046
|
tag: "tag:yaml.org,2002:set",
|
|
3047
3047
|
createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),
|
|
3048
3048
|
resolve(map2, onError) {
|
|
3049
|
-
if (
|
|
3049
|
+
if (identity2.isMap(map2)) {
|
|
3050
3050
|
if (map2.hasAllNullValues(true))
|
|
3051
3051
|
return Object.assign(new YAMLSet(), map2);
|
|
3052
3052
|
else
|
|
@@ -3291,7 +3291,7 @@ var require_tags = __commonJS({
|
|
|
3291
3291
|
var require_Schema = __commonJS({
|
|
3292
3292
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/Schema.js"(exports) {
|
|
3293
3293
|
"use strict";
|
|
3294
|
-
var
|
|
3294
|
+
var identity2 = require_identity();
|
|
3295
3295
|
var map2 = require_map();
|
|
3296
3296
|
var seq = require_seq();
|
|
3297
3297
|
var string4 = require_string();
|
|
@@ -3304,9 +3304,9 @@ var require_Schema = __commonJS({
|
|
|
3304
3304
|
this.knownTags = resolveKnownTags ? tags4.coreKnownTags : {};
|
|
3305
3305
|
this.tags = tags4.getTags(customTags, this.name, merge2);
|
|
3306
3306
|
this.toStringOptions = toStringDefaults ?? null;
|
|
3307
|
-
Object.defineProperty(this,
|
|
3308
|
-
Object.defineProperty(this,
|
|
3309
|
-
Object.defineProperty(this,
|
|
3307
|
+
Object.defineProperty(this, identity2.MAP, { value: map2.map });
|
|
3308
|
+
Object.defineProperty(this, identity2.SCALAR, { value: string4.string });
|
|
3309
|
+
Object.defineProperty(this, identity2.SEQ, { value: seq.seq });
|
|
3310
3310
|
this.sortMapEntries = typeof sortMapEntries === "function" ? sortMapEntries : sortMapEntries === true ? sortMapEntriesByKey : null;
|
|
3311
3311
|
}
|
|
3312
3312
|
clone() {
|
|
@@ -3323,7 +3323,7 @@ var require_Schema = __commonJS({
|
|
|
3323
3323
|
var require_stringifyDocument = __commonJS({
|
|
3324
3324
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyDocument.js"(exports) {
|
|
3325
3325
|
"use strict";
|
|
3326
|
-
var
|
|
3326
|
+
var identity2 = require_identity();
|
|
3327
3327
|
var stringify2 = require_stringify();
|
|
3328
3328
|
var stringifyComment = require_stringifyComment();
|
|
3329
3329
|
function stringifyDocument(doc, options) {
|
|
@@ -3350,7 +3350,7 @@ var require_stringifyDocument = __commonJS({
|
|
|
3350
3350
|
let chompKeep = false;
|
|
3351
3351
|
let contentComment = null;
|
|
3352
3352
|
if (doc.contents) {
|
|
3353
|
-
if (
|
|
3353
|
+
if (identity2.isNode(doc.contents)) {
|
|
3354
3354
|
if (doc.contents.spaceBefore && hasDirectives)
|
|
3355
3355
|
lines.push("");
|
|
3356
3356
|
if (doc.contents.commentBefore) {
|
|
@@ -3405,7 +3405,7 @@ var require_Document = __commonJS({
|
|
|
3405
3405
|
"use strict";
|
|
3406
3406
|
var Alias = require_Alias();
|
|
3407
3407
|
var Collection = require_Collection();
|
|
3408
|
-
var
|
|
3408
|
+
var identity2 = require_identity();
|
|
3409
3409
|
var Pair = require_Pair();
|
|
3410
3410
|
var toJS = require_toJS();
|
|
3411
3411
|
var Schema = require_Schema();
|
|
@@ -3420,7 +3420,7 @@ var require_Document = __commonJS({
|
|
|
3420
3420
|
this.comment = null;
|
|
3421
3421
|
this.errors = [];
|
|
3422
3422
|
this.warnings = [];
|
|
3423
|
-
Object.defineProperty(this,
|
|
3423
|
+
Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.DOC });
|
|
3424
3424
|
let _replacer = null;
|
|
3425
3425
|
if (typeof replacer === "function" || Array.isArray(replacer)) {
|
|
3426
3426
|
_replacer = replacer;
|
|
@@ -3456,7 +3456,7 @@ var require_Document = __commonJS({
|
|
|
3456
3456
|
*/
|
|
3457
3457
|
clone() {
|
|
3458
3458
|
const copy = Object.create(_Document.prototype, {
|
|
3459
|
-
[
|
|
3459
|
+
[identity2.NODE_TYPE]: { value: identity2.DOC }
|
|
3460
3460
|
});
|
|
3461
3461
|
copy.commentBefore = this.commentBefore;
|
|
3462
3462
|
copy.comment = this.comment;
|
|
@@ -3466,7 +3466,7 @@ var require_Document = __commonJS({
|
|
|
3466
3466
|
if (this.directives)
|
|
3467
3467
|
copy.directives = this.directives.clone();
|
|
3468
3468
|
copy.schema = this.schema.clone();
|
|
3469
|
-
copy.contents =
|
|
3469
|
+
copy.contents = identity2.isNode(this.contents) ? this.contents.clone(copy.schema) : this.contents;
|
|
3470
3470
|
if (this.range)
|
|
3471
3471
|
copy.range = this.range.slice();
|
|
3472
3472
|
return copy;
|
|
@@ -3529,7 +3529,7 @@ var require_Document = __commonJS({
|
|
|
3529
3529
|
sourceObjects
|
|
3530
3530
|
};
|
|
3531
3531
|
const node3 = createNode.createNode(value2, tag3, ctx);
|
|
3532
|
-
if (flow &&
|
|
3532
|
+
if (flow && identity2.isCollection(node3))
|
|
3533
3533
|
node3.flow = true;
|
|
3534
3534
|
setAnchors();
|
|
3535
3535
|
return node3;
|
|
@@ -3569,7 +3569,7 @@ var require_Document = __commonJS({
|
|
|
3569
3569
|
* `true` (collections are always returned intact).
|
|
3570
3570
|
*/
|
|
3571
3571
|
get(key2, keepScalar) {
|
|
3572
|
-
return
|
|
3572
|
+
return identity2.isCollection(this.contents) ? this.contents.get(key2, keepScalar) : void 0;
|
|
3573
3573
|
}
|
|
3574
3574
|
/**
|
|
3575
3575
|
* Returns item at `path`, or `undefined` if not found. By default unwraps
|
|
@@ -3578,14 +3578,14 @@ var require_Document = __commonJS({
|
|
|
3578
3578
|
*/
|
|
3579
3579
|
getIn(path2, keepScalar) {
|
|
3580
3580
|
if (Collection.isEmptyPath(path2))
|
|
3581
|
-
return !keepScalar &&
|
|
3582
|
-
return
|
|
3581
|
+
return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
|
|
3582
|
+
return identity2.isCollection(this.contents) ? this.contents.getIn(path2, keepScalar) : void 0;
|
|
3583
3583
|
}
|
|
3584
3584
|
/**
|
|
3585
3585
|
* Checks if the document includes a value with the key `key`.
|
|
3586
3586
|
*/
|
|
3587
3587
|
has(key2) {
|
|
3588
|
-
return
|
|
3588
|
+
return identity2.isCollection(this.contents) ? this.contents.has(key2) : false;
|
|
3589
3589
|
}
|
|
3590
3590
|
/**
|
|
3591
3591
|
* Checks if the document includes a value at `path`.
|
|
@@ -3593,7 +3593,7 @@ var require_Document = __commonJS({
|
|
|
3593
3593
|
hasIn(path2) {
|
|
3594
3594
|
if (Collection.isEmptyPath(path2))
|
|
3595
3595
|
return this.contents !== void 0;
|
|
3596
|
-
return
|
|
3596
|
+
return identity2.isCollection(this.contents) ? this.contents.hasIn(path2) : false;
|
|
3597
3597
|
}
|
|
3598
3598
|
/**
|
|
3599
3599
|
* Sets a value in this document. For `!!set`, `value` needs to be a
|
|
@@ -3675,8 +3675,8 @@ var require_Document = __commonJS({
|
|
|
3675
3675
|
};
|
|
3676
3676
|
const res = toJS.toJS(this.contents, jsonArg ?? "", ctx);
|
|
3677
3677
|
if (typeof onAnchor === "function")
|
|
3678
|
-
for (const { count:
|
|
3679
|
-
onAnchor(res2,
|
|
3678
|
+
for (const { count: count5, res: res2 } of ctx.anchors.values())
|
|
3679
|
+
onAnchor(res2, count5);
|
|
3680
3680
|
return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res;
|
|
3681
3681
|
}
|
|
3682
3682
|
/**
|
|
@@ -3700,7 +3700,7 @@ var require_Document = __commonJS({
|
|
|
3700
3700
|
}
|
|
3701
3701
|
};
|
|
3702
3702
|
function assertCollection(contents) {
|
|
3703
|
-
if (
|
|
3703
|
+
if (identity2.isCollection(contents))
|
|
3704
3704
|
return true;
|
|
3705
3705
|
throw new Error("Expected a YAML collection as document contents");
|
|
3706
3706
|
}
|
|
@@ -3753,12 +3753,12 @@ var require_errors3 = __commonJS({
|
|
|
3753
3753
|
lineStr = prev + lineStr;
|
|
3754
3754
|
}
|
|
3755
3755
|
if (/[^ ]/.test(lineStr)) {
|
|
3756
|
-
let
|
|
3756
|
+
let count5 = 1;
|
|
3757
3757
|
const end = error62.linePos[1];
|
|
3758
3758
|
if (end?.line === line2 && end.col > col) {
|
|
3759
|
-
|
|
3759
|
+
count5 = Math.max(1, Math.min(end.col - col, 80 - ci));
|
|
3760
3760
|
}
|
|
3761
|
-
const pointer = " ".repeat(ci) + "^".repeat(
|
|
3761
|
+
const pointer = " ".repeat(ci) + "^".repeat(count5);
|
|
3762
3762
|
error62.message += `:
|
|
3763
3763
|
|
|
3764
3764
|
${lineStr}
|
|
@@ -3971,12 +3971,12 @@ var require_util_flow_indent_check = __commonJS({
|
|
|
3971
3971
|
var require_util_map_includes = __commonJS({
|
|
3972
3972
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-map-includes.js"(exports) {
|
|
3973
3973
|
"use strict";
|
|
3974
|
-
var
|
|
3974
|
+
var identity2 = require_identity();
|
|
3975
3975
|
function mapIncludes(ctx, items, search) {
|
|
3976
3976
|
const { uniqueKeys } = ctx.options;
|
|
3977
3977
|
if (uniqueKeys === false)
|
|
3978
3978
|
return false;
|
|
3979
|
-
const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a, b) => a === b ||
|
|
3979
|
+
const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a, b) => a === b || identity2.isScalar(a) && identity2.isScalar(b) && a.value === b.value;
|
|
3980
3980
|
return items.some((pair) => isEqual(pair.key, search));
|
|
3981
3981
|
}
|
|
3982
3982
|
exports.mapIncludes = mapIncludes;
|
|
@@ -4189,7 +4189,7 @@ var require_resolve_end = __commonJS({
|
|
|
4189
4189
|
var require_resolve_flow_collection = __commonJS({
|
|
4190
4190
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-collection.js"(exports) {
|
|
4191
4191
|
"use strict";
|
|
4192
|
-
var
|
|
4192
|
+
var identity2 = require_identity();
|
|
4193
4193
|
var Pair = require_Pair();
|
|
4194
4194
|
var YAMLMap = require_YAMLMap();
|
|
4195
4195
|
var YAMLSeq = require_YAMLSeq();
|
|
@@ -4268,7 +4268,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
4268
4268
|
}
|
|
4269
4269
|
if (prevItemComment) {
|
|
4270
4270
|
let prev = coll.items[coll.items.length - 1];
|
|
4271
|
-
if (
|
|
4271
|
+
if (identity2.isPair(prev))
|
|
4272
4272
|
prev = prev.value ?? prev.key;
|
|
4273
4273
|
if (prev.comment)
|
|
4274
4274
|
prev.comment += "\n" + prevItemComment;
|
|
@@ -4383,7 +4383,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
4383
4383
|
var require_compose_collection = __commonJS({
|
|
4384
4384
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-collection.js"(exports) {
|
|
4385
4385
|
"use strict";
|
|
4386
|
-
var
|
|
4386
|
+
var identity2 = require_identity();
|
|
4387
4387
|
var Scalar = require_Scalar();
|
|
4388
4388
|
var YAMLMap = require_YAMLMap();
|
|
4389
4389
|
var YAMLSeq = require_YAMLSeq();
|
|
@@ -4433,7 +4433,7 @@ var require_compose_collection = __commonJS({
|
|
|
4433
4433
|
}
|
|
4434
4434
|
const coll = resolveCollection(CN, ctx, token, onError, tagName, tag3);
|
|
4435
4435
|
const res = tag3.resolve?.(coll, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options) ?? coll;
|
|
4436
|
-
const node3 =
|
|
4436
|
+
const node3 = identity2.isNode(res) ? res : new Scalar.Scalar(res);
|
|
4437
4437
|
node3.range = coll.range;
|
|
4438
4438
|
node3.tag = tagName;
|
|
4439
4439
|
if (tag3?.format)
|
|
@@ -4852,7 +4852,7 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
4852
4852
|
var require_compose_scalar = __commonJS({
|
|
4853
4853
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-scalar.js"(exports) {
|
|
4854
4854
|
"use strict";
|
|
4855
|
-
var
|
|
4855
|
+
var identity2 = require_identity();
|
|
4856
4856
|
var Scalar = require_Scalar();
|
|
4857
4857
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
4858
4858
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
@@ -4861,17 +4861,17 @@ var require_compose_scalar = __commonJS({
|
|
|
4861
4861
|
const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)) : null;
|
|
4862
4862
|
let tag3;
|
|
4863
4863
|
if (ctx.options.stringKeys && ctx.atKey) {
|
|
4864
|
-
tag3 = ctx.schema[
|
|
4864
|
+
tag3 = ctx.schema[identity2.SCALAR];
|
|
4865
4865
|
} else if (tagName)
|
|
4866
4866
|
tag3 = findScalarTagByName(ctx.schema, value2, tagName, tagToken, onError);
|
|
4867
4867
|
else if (token.type === "scalar")
|
|
4868
4868
|
tag3 = findScalarTagByTest(ctx, value2, token, onError);
|
|
4869
4869
|
else
|
|
4870
|
-
tag3 = ctx.schema[
|
|
4870
|
+
tag3 = ctx.schema[identity2.SCALAR];
|
|
4871
4871
|
let scalar;
|
|
4872
4872
|
try {
|
|
4873
4873
|
const res = tag3.resolve(value2, (msg) => onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg), ctx.options);
|
|
4874
|
-
scalar =
|
|
4874
|
+
scalar = identity2.isScalar(res) ? res : new Scalar.Scalar(res);
|
|
4875
4875
|
} catch (error62) {
|
|
4876
4876
|
const msg = error62 instanceof Error ? error62.message : String(error62);
|
|
4877
4877
|
onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg);
|
|
@@ -4891,7 +4891,7 @@ var require_compose_scalar = __commonJS({
|
|
|
4891
4891
|
}
|
|
4892
4892
|
function findScalarTagByName(schema, value2, tagName, tagToken, onError) {
|
|
4893
4893
|
if (tagName === "!")
|
|
4894
|
-
return schema[
|
|
4894
|
+
return schema[identity2.SCALAR];
|
|
4895
4895
|
const matchWithTest = [];
|
|
4896
4896
|
for (const tag3 of schema.tags) {
|
|
4897
4897
|
if (!tag3.collection && tag3.tag === tagName) {
|
|
@@ -4910,12 +4910,12 @@ var require_compose_scalar = __commonJS({
|
|
|
4910
4910
|
return kt;
|
|
4911
4911
|
}
|
|
4912
4912
|
onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str");
|
|
4913
|
-
return schema[
|
|
4913
|
+
return schema[identity2.SCALAR];
|
|
4914
4914
|
}
|
|
4915
4915
|
function findScalarTagByTest({ atKey, directives, schema }, value2, token, onError) {
|
|
4916
|
-
const tag3 = schema.tags.find((tag4) => (tag4.default === true || atKey && tag4.default === "key") && tag4.test?.test(value2)) || schema[
|
|
4916
|
+
const tag3 = schema.tags.find((tag4) => (tag4.default === true || atKey && tag4.default === "key") && tag4.test?.test(value2)) || schema[identity2.SCALAR];
|
|
4917
4917
|
if (schema.compat) {
|
|
4918
|
-
const compat = schema.compat.find((tag4) => tag4.default && tag4.test?.test(value2)) ?? schema[
|
|
4918
|
+
const compat = schema.compat.find((tag4) => tag4.default && tag4.test?.test(value2)) ?? schema[identity2.SCALAR];
|
|
4919
4919
|
if (tag3.tag !== compat.tag) {
|
|
4920
4920
|
const ts = directives.tagString(tag3.tag);
|
|
4921
4921
|
const cs = directives.tagString(compat.tag);
|
|
@@ -4964,7 +4964,7 @@ var require_compose_node = __commonJS({
|
|
|
4964
4964
|
"node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-node.js"(exports) {
|
|
4965
4965
|
"use strict";
|
|
4966
4966
|
var Alias = require_Alias();
|
|
4967
|
-
var
|
|
4967
|
+
var identity2 = require_identity();
|
|
4968
4968
|
var composeCollection = require_compose_collection();
|
|
4969
4969
|
var composeScalar = require_compose_scalar();
|
|
4970
4970
|
var resolveEnd = require_resolve_end();
|
|
@@ -5010,7 +5010,7 @@ var require_compose_node = __commonJS({
|
|
|
5010
5010
|
node3 ?? (node3 = composeEmptyNode(ctx, token.offset, void 0, null, props, onError));
|
|
5011
5011
|
if (anchor2 && node3.anchor === "")
|
|
5012
5012
|
onError(anchor2, "BAD_ALIAS", "Anchor cannot be an empty string");
|
|
5013
|
-
if (atKey && ctx.options.stringKeys && (!
|
|
5013
|
+
if (atKey && ctx.options.stringKeys && (!identity2.isScalar(node3) || typeof node3.value !== "string" || node3.tag && node3.tag !== "tag:yaml.org,2002:str")) {
|
|
5014
5014
|
const msg = "With stringKeys, all keys must be strings";
|
|
5015
5015
|
onError(tag3 ?? token, "NON_STRING_KEY", msg);
|
|
5016
5016
|
}
|
|
@@ -5116,7 +5116,7 @@ var require_composer = __commonJS({
|
|
|
5116
5116
|
var directives = require_directives();
|
|
5117
5117
|
var Document = require_Document();
|
|
5118
5118
|
var errors = require_errors3();
|
|
5119
|
-
var
|
|
5119
|
+
var identity2 = require_identity();
|
|
5120
5120
|
var composeDoc = require_compose_doc();
|
|
5121
5121
|
var resolveEnd = require_resolve_end();
|
|
5122
5122
|
function getErrorPos(src) {
|
|
@@ -5178,9 +5178,9 @@ var require_composer = __commonJS({
|
|
|
5178
5178
|
${comment6}` : comment6;
|
|
5179
5179
|
} else if (afterEmptyLine || doc.directives.docStart || !dc) {
|
|
5180
5180
|
doc.commentBefore = comment6;
|
|
5181
|
-
} else if (
|
|
5181
|
+
} else if (identity2.isCollection(dc) && !dc.flow && dc.items.length > 0) {
|
|
5182
5182
|
let it = dc.items[0];
|
|
5183
|
-
if (
|
|
5183
|
+
if (identity2.isPair(it))
|
|
5184
5184
|
it = it.key;
|
|
5185
5185
|
const cb = it.commentBefore;
|
|
5186
5186
|
it.commentBefore = cb ? `${comment6}
|
|
@@ -7228,7 +7228,7 @@ var require_public_api = __commonJS({
|
|
|
7228
7228
|
var Document = require_Document();
|
|
7229
7229
|
var errors = require_errors3();
|
|
7230
7230
|
var log = require_log();
|
|
7231
|
-
var
|
|
7231
|
+
var identity2 = require_identity();
|
|
7232
7232
|
var lineCounter = require_line_counter();
|
|
7233
7233
|
var parser = require_parser();
|
|
7234
7234
|
function parseOptions(options) {
|
|
@@ -7306,7 +7306,7 @@ var require_public_api = __commonJS({
|
|
|
7306
7306
|
if (!keepUndefined)
|
|
7307
7307
|
return void 0;
|
|
7308
7308
|
}
|
|
7309
|
-
if (
|
|
7309
|
+
if (identity2.isDocument(value2) && !_replacer)
|
|
7310
7310
|
return value2.toString(options);
|
|
7311
7311
|
return new Document.Document(value2, _replacer, options).toString(options);
|
|
7312
7312
|
}
|
|
@@ -7326,7 +7326,7 @@ var require_dist3 = __commonJS({
|
|
|
7326
7326
|
var Schema = require_Schema();
|
|
7327
7327
|
var errors = require_errors3();
|
|
7328
7328
|
var Alias = require_Alias();
|
|
7329
|
-
var
|
|
7329
|
+
var identity2 = require_identity();
|
|
7330
7330
|
var Pair = require_Pair();
|
|
7331
7331
|
var Scalar = require_Scalar();
|
|
7332
7332
|
var YAMLMap = require_YAMLMap();
|
|
@@ -7344,14 +7344,14 @@ var require_dist3 = __commonJS({
|
|
|
7344
7344
|
exports.YAMLParseError = errors.YAMLParseError;
|
|
7345
7345
|
exports.YAMLWarning = errors.YAMLWarning;
|
|
7346
7346
|
exports.Alias = Alias.Alias;
|
|
7347
|
-
exports.isAlias =
|
|
7348
|
-
exports.isCollection =
|
|
7349
|
-
exports.isDocument =
|
|
7350
|
-
exports.isMap =
|
|
7351
|
-
exports.isNode =
|
|
7352
|
-
exports.isPair =
|
|
7353
|
-
exports.isScalar =
|
|
7354
|
-
exports.isSeq =
|
|
7347
|
+
exports.isAlias = identity2.isAlias;
|
|
7348
|
+
exports.isCollection = identity2.isCollection;
|
|
7349
|
+
exports.isDocument = identity2.isDocument;
|
|
7350
|
+
exports.isMap = identity2.isMap;
|
|
7351
|
+
exports.isNode = identity2.isNode;
|
|
7352
|
+
exports.isPair = identity2.isPair;
|
|
7353
|
+
exports.isScalar = identity2.isScalar;
|
|
7354
|
+
exports.isSeq = identity2.isSeq;
|
|
7355
7355
|
exports.Pair = Pair.Pair;
|
|
7356
7356
|
exports.Scalar = Scalar.Scalar;
|
|
7357
7357
|
exports.YAMLMap = YAMLMap.YAMLMap;
|
|
@@ -8653,14 +8653,14 @@ function codePointLength(str) {
|
|
|
8653
8653
|
const units = str.length;
|
|
8654
8654
|
if (!highSurrogate.test(str))
|
|
8655
8655
|
return units;
|
|
8656
|
-
let
|
|
8656
|
+
let count5 = units;
|
|
8657
8657
|
for (let i = 0; i < units - 1; i++) {
|
|
8658
8658
|
if ((str.charCodeAt(i) & 64512) === 55296 && (str.charCodeAt(i + 1) & 64512) === 56320) {
|
|
8659
|
-
|
|
8659
|
+
count5--;
|
|
8660
8660
|
i++;
|
|
8661
8661
|
}
|
|
8662
8662
|
}
|
|
8663
|
-
return
|
|
8663
|
+
return count5;
|
|
8664
8664
|
}
|
|
8665
8665
|
function getLengthableOrigin(input2) {
|
|
8666
8666
|
if (Array.isArray(input2))
|
|
@@ -13043,8 +13043,8 @@ function az_default() {
|
|
|
13043
13043
|
}
|
|
13044
13044
|
|
|
13045
13045
|
// node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/locales/be.js
|
|
13046
|
-
function getBelarusianPlural(
|
|
13047
|
-
const absCount = Math.abs(
|
|
13046
|
+
function getBelarusianPlural(count5, one, few, many) {
|
|
13047
|
+
const absCount = Math.abs(count5);
|
|
13048
13048
|
const lastDigit = absCount % 10;
|
|
13049
13049
|
const lastTwoDigits = absCount % 100;
|
|
13050
13050
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -15691,8 +15691,8 @@ function hu_default() {
|
|
|
15691
15691
|
}
|
|
15692
15692
|
|
|
15693
15693
|
// node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/locales/hy.js
|
|
15694
|
-
function getArmenianPlural(
|
|
15695
|
-
return Math.abs(
|
|
15694
|
+
function getArmenianPlural(count5, one, many) {
|
|
15695
|
+
return Math.abs(count5) === 1 ? one : many;
|
|
15696
15696
|
}
|
|
15697
15697
|
function withDefiniteArticle(word) {
|
|
15698
15698
|
if (!word)
|
|
@@ -18430,8 +18430,8 @@ function ro_default() {
|
|
|
18430
18430
|
}
|
|
18431
18431
|
|
|
18432
18432
|
// node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/locales/ru.js
|
|
18433
|
-
function getRussianPlural(
|
|
18434
|
-
const absCount = Math.abs(
|
|
18433
|
+
function getRussianPlural(count5, one, few, many) {
|
|
18434
|
+
const absCount = Math.abs(count5);
|
|
18435
18435
|
const lastDigit = absCount % 10;
|
|
18436
18436
|
const lastTwoDigits = absCount % 100;
|
|
18437
18437
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -34802,15 +34802,15 @@ var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
34802
34802
|
return false;
|
|
34803
34803
|
}
|
|
34804
34804
|
function countKeys(schema) {
|
|
34805
|
-
let
|
|
34805
|
+
let count5 = 0;
|
|
34806
34806
|
for (const key2 in schema) {
|
|
34807
34807
|
if (key2 === "$ref") return Infinity;
|
|
34808
|
-
|
|
34808
|
+
count5++;
|
|
34809
34809
|
if (SIMPLE_INLINED.has(key2)) continue;
|
|
34810
|
-
if (typeof schema[key2] == "object") (0, util_1.eachItem)(schema[key2], (sch) =>
|
|
34811
|
-
if (
|
|
34810
|
+
if (typeof schema[key2] == "object") (0, util_1.eachItem)(schema[key2], (sch) => count5 += countKeys(sch));
|
|
34811
|
+
if (count5 === Infinity) return Infinity;
|
|
34812
34812
|
}
|
|
34813
|
-
return
|
|
34813
|
+
return count5;
|
|
34814
34814
|
}
|
|
34815
34815
|
function getFullPath(resolver, id10 = "", normalize) {
|
|
34816
34816
|
if (normalize !== false) id10 = normalizeId(id10);
|
|
@@ -37763,8 +37763,8 @@ var require_contains = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37763
37763
|
cxt.result(valid, () => cxt.reset());
|
|
37764
37764
|
function validateItemsWithCount() {
|
|
37765
37765
|
const schValid = gen.name("_valid");
|
|
37766
|
-
const
|
|
37767
|
-
validateItems(schValid, () => gen.if(schValid, () => checkLimits(
|
|
37766
|
+
const count5 = gen.let("count", 0);
|
|
37767
|
+
validateItems(schValid, () => gen.if(schValid, () => checkLimits(count5)));
|
|
37768
37768
|
}
|
|
37769
37769
|
function validateItems(_valid, block2) {
|
|
37770
37770
|
gen.forRange("i", 0, len, (i) => {
|
|
@@ -37777,13 +37777,13 @@ var require_contains = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37777
37777
|
block2();
|
|
37778
37778
|
});
|
|
37779
37779
|
}
|
|
37780
|
-
function checkLimits(
|
|
37781
|
-
gen.code((0, codegen_1._)`${
|
|
37782
|
-
if (max === void 0) gen.if((0, codegen_1._)`${
|
|
37780
|
+
function checkLimits(count5) {
|
|
37781
|
+
gen.code((0, codegen_1._)`${count5}++`);
|
|
37782
|
+
if (max === void 0) gen.if((0, codegen_1._)`${count5} >= ${min}`, () => gen.assign(valid, true).break());
|
|
37783
37783
|
else {
|
|
37784
|
-
gen.if((0, codegen_1._)`${
|
|
37784
|
+
gen.if((0, codegen_1._)`${count5} > ${max}`, () => gen.assign(valid, false).break());
|
|
37785
37785
|
if (min === 1) gen.assign(valid, true);
|
|
37786
|
-
else gen.if((0, codegen_1._)`${
|
|
37786
|
+
else gen.if((0, codegen_1._)`${count5} >= ${min}`, () => gen.assign(valid, true));
|
|
37787
37787
|
}
|
|
37788
37788
|
}
|
|
37789
37789
|
}
|
|
@@ -41233,8 +41233,8 @@ var ClientResponseCache = class {
|
|
|
41233
41233
|
* call is scoped to this identity; entries written under the pre-connect
|
|
41234
41234
|
* `''` sentinel are no longer reachable.
|
|
41235
41235
|
*/
|
|
41236
|
-
setServerIdentity(
|
|
41237
|
-
this._serverIdentity =
|
|
41236
|
+
setServerIdentity(identity2) {
|
|
41237
|
+
this._serverIdentity = identity2;
|
|
41238
41238
|
}
|
|
41239
41239
|
/**
|
|
41240
41240
|
* Derive the storage partition for `scope`. The encoding is
|
|
@@ -44571,16 +44571,16 @@ function requiredClientCapabilitiesForInputRequest(entry2) {
|
|
|
44571
44571
|
}
|
|
44572
44572
|
function missingClientCapabilities(required2, declared) {
|
|
44573
44573
|
const missing = {};
|
|
44574
|
-
for (const [capability,
|
|
44575
|
-
if (
|
|
44574
|
+
for (const [capability, requirement2] of Object.entries(required2)) {
|
|
44575
|
+
if (requirement2 === void 0) continue;
|
|
44576
44576
|
const declaredValue = declared === void 0 ? void 0 : declared[capability];
|
|
44577
44577
|
if (declaredValue === void 0) {
|
|
44578
|
-
missing[capability] =
|
|
44578
|
+
missing[capability] = requirement2;
|
|
44579
44579
|
continue;
|
|
44580
44580
|
}
|
|
44581
|
-
if (isPlainObject$7(
|
|
44581
|
+
if (isPlainObject$7(requirement2) && isPlainObject$7(declaredValue)) {
|
|
44582
44582
|
const missingMembers = {};
|
|
44583
|
-
for (const [member, memberRequirement] of Object.entries(
|
|
44583
|
+
for (const [member, memberRequirement] of Object.entries(requirement2)) if (memberRequirement !== void 0 && declaredValue[member] === void 0 && !isImpliedCapabilityMember(capability, member, declaredValue)) missingMembers[member] = memberRequirement;
|
|
44584
44584
|
if (Object.keys(missingMembers).length > 0) missing[capability] = missingMembers;
|
|
44585
44585
|
}
|
|
44586
44586
|
}
|
|
@@ -50774,15 +50774,15 @@ var require_resolve2 = /* @__PURE__ */ __commonJSMin2(((exports) => {
|
|
|
50774
50774
|
return false;
|
|
50775
50775
|
}
|
|
50776
50776
|
function countKeys(schema) {
|
|
50777
|
-
let
|
|
50777
|
+
let count5 = 0;
|
|
50778
50778
|
for (const key2 in schema) {
|
|
50779
50779
|
if (key2 === "$ref") return Infinity;
|
|
50780
|
-
|
|
50780
|
+
count5++;
|
|
50781
50781
|
if (SIMPLE_INLINED.has(key2)) continue;
|
|
50782
|
-
if (typeof schema[key2] == "object") (0, util_1.eachItem)(schema[key2], (sch) =>
|
|
50783
|
-
if (
|
|
50782
|
+
if (typeof schema[key2] == "object") (0, util_1.eachItem)(schema[key2], (sch) => count5 += countKeys(sch));
|
|
50783
|
+
if (count5 === Infinity) return Infinity;
|
|
50784
50784
|
}
|
|
50785
|
-
return
|
|
50785
|
+
return count5;
|
|
50786
50786
|
}
|
|
50787
50787
|
function getFullPath(resolver, id10 = "", normalize) {
|
|
50788
50788
|
if (normalize !== false) id10 = normalizeId(id10);
|
|
@@ -53735,8 +53735,8 @@ var require_contains2 = /* @__PURE__ */ __commonJSMin2(((exports) => {
|
|
|
53735
53735
|
cxt.result(valid, () => cxt.reset());
|
|
53736
53736
|
function validateItemsWithCount() {
|
|
53737
53737
|
const schValid = gen.name("_valid");
|
|
53738
|
-
const
|
|
53739
|
-
validateItems(schValid, () => gen.if(schValid, () => checkLimits(
|
|
53738
|
+
const count5 = gen.let("count", 0);
|
|
53739
|
+
validateItems(schValid, () => gen.if(schValid, () => checkLimits(count5)));
|
|
53740
53740
|
}
|
|
53741
53741
|
function validateItems(_valid, block2) {
|
|
53742
53742
|
gen.forRange("i", 0, len, (i) => {
|
|
@@ -53749,13 +53749,13 @@ var require_contains2 = /* @__PURE__ */ __commonJSMin2(((exports) => {
|
|
|
53749
53749
|
block2();
|
|
53750
53750
|
});
|
|
53751
53751
|
}
|
|
53752
|
-
function checkLimits(
|
|
53753
|
-
gen.code((0, codegen_1._)`${
|
|
53754
|
-
if (max === void 0) gen.if((0, codegen_1._)`${
|
|
53752
|
+
function checkLimits(count5) {
|
|
53753
|
+
gen.code((0, codegen_1._)`${count5}++`);
|
|
53754
|
+
if (max === void 0) gen.if((0, codegen_1._)`${count5} >= ${min}`, () => gen.assign(valid, true).break());
|
|
53755
53755
|
else {
|
|
53756
|
-
gen.if((0, codegen_1._)`${
|
|
53756
|
+
gen.if((0, codegen_1._)`${count5} > ${max}`, () => gen.assign(valid, false).break());
|
|
53757
53757
|
if (min === 1) gen.assign(valid, true);
|
|
53758
|
-
else gen.if((0, codegen_1._)`${
|
|
53758
|
+
else gen.if((0, codegen_1._)`${count5} >= ${min}`, () => gen.assign(valid, true));
|
|
53759
53759
|
}
|
|
53760
53760
|
}
|
|
53761
53761
|
}
|
|
@@ -56574,9 +56574,9 @@ var Server = class extends Protocol2 {
|
|
|
56574
56574
|
_clientCapabilities;
|
|
56575
56575
|
_clientVersion;
|
|
56576
56576
|
static {
|
|
56577
|
-
writeClientIdentity = (server,
|
|
56578
|
-
if (
|
|
56579
|
-
if (
|
|
56577
|
+
writeClientIdentity = (server, identity2) => {
|
|
56578
|
+
if (identity2.clientCapabilities !== void 0) server._clientCapabilities = identity2.clientCapabilities;
|
|
56579
|
+
if (identity2.clientInfo !== void 0) server._clientVersion = identity2.clientInfo;
|
|
56580
56580
|
};
|
|
56581
56581
|
installDiscoverHandler = (server, servedModernVersions) => {
|
|
56582
56582
|
const missing = servedModernVersions.filter((version4) => !server._supportedProtocolVersions.includes(version4));
|
|
@@ -57517,8 +57517,8 @@ function parseDuration(s) {
|
|
|
57517
57517
|
});
|
|
57518
57518
|
}
|
|
57519
57519
|
const [, sign, d, h, m, sec, ms] = match;
|
|
57520
|
-
const
|
|
57521
|
-
return sign === "-" &&
|
|
57520
|
+
const total2 = Number(d ?? 0) * MS_PER.d + Number(h ?? 0) * MS_PER.h + Number(m ?? 0) * MS_PER.m + Number(sec ?? 0) * MS_PER.s + Number(ms ?? 0) * MS_PER.ms;
|
|
57521
|
+
return sign === "-" && total2 !== 0 ? -total2 : total2;
|
|
57522
57522
|
}
|
|
57523
57523
|
|
|
57524
57524
|
// packages/core/src/agent-tools-protocol.ts
|
|
@@ -58432,7 +58432,7 @@ var GA4SeedSchema = external_exports.strictObject({
|
|
|
58432
58432
|
if (new Set(session.events.map((e) => e.name)).size !== session.events.length) issue2(["sessions", i, "events"], "event names must be unique within one session");
|
|
58433
58433
|
});
|
|
58434
58434
|
if (seed2.sessions.reduce((n, s) => n + s.events.length, 0) > 1e5) issue2(["sessions"], "seed exceeds 100000 event buckets");
|
|
58435
|
-
for (const property2 of seed2.properties) if (seed2.sessions.filter((s) => s.propertyId === property2.id).reduce((n, s) => n + s.events.reduce((
|
|
58435
|
+
for (const property2 of seed2.properties) if (seed2.sessions.filter((s) => s.propertyId === property2.id).reduce((n, s) => n + s.events.reduce((total2, e) => total2 + BigInt(e.revenueMicros), 0n), 0n) > BigInt(Number.MAX_SAFE_INTEGER)) issue2(["sessions"], "property revenue exceeds supported exact micro-unit range");
|
|
58436
58436
|
});
|
|
58437
58437
|
function ga4StarterSeed() {
|
|
58438
58438
|
const session = (n, date9, userId, source, medium, campaign2, qualified = false) => ({
|
|
@@ -59988,6 +59988,8 @@ var past = external_exports.string().refine(
|
|
|
59988
59988
|
(value2) => external_exports.iso.datetime({ offset: true }).safeParse(value2).success ? Number.isFinite(Date.parse(value2)) : isDuration(value2) && parseDuration(value2) <= 0,
|
|
59989
59989
|
"expected an ISO 8601 time with a timezone, or a nonpositive offset from the start of the test such as -720h"
|
|
59990
59990
|
);
|
|
59991
|
+
var STRIPE_TEST_BANKS = ["success", "no_account", "account_closed", "insufficient_funds", "debit_not_authorized", "invalid_currency"];
|
|
59992
|
+
var span = external_exports.string().refine((value2) => isDuration(value2) && parseDuration(value2) >= 0, "expected a nonnegative duration such as 2d or 30m");
|
|
59991
59993
|
var moment = external_exports.string().refine(
|
|
59992
59994
|
(value2) => external_exports.iso.datetime({ offset: true }).safeParse(value2).success ? Number.isFinite(Date.parse(value2)) : isDuration(value2),
|
|
59993
59995
|
"expected an ISO 8601 time with a timezone, or an offset from the start of the test such as 72h or -24h"
|
|
@@ -59997,6 +59999,29 @@ var StripeSeedSchema = external_exports.strictObject({
|
|
|
59997
59999
|
account: external_exports.strictObject({ name: text8, currency: external_exports.enum(["usd", "eur", "gbp", "cad", "aud"]).default("usd"), statement_descriptor: external_exports.string().regex(/^[A-Za-z0-9 .-]{5,22}$/).optional() }),
|
|
59998
60000
|
/** Funds on the account, in the account currency. */
|
|
59999
60001
|
balance: external_exports.strictObject({ available: amount.default(0), pending: amount.default(0) }).default({ available: 0, pending: 0 }),
|
|
60002
|
+
/** Connect timings, with Stripe's US defaults: funds settle, payouts arrive, verification reviews and disputes cost.
|
|
60003
|
+
* Optional without a default, like connected_accounts: a seed that omits both parses and fingerprints as before. */
|
|
60004
|
+
connect: external_exports.strictObject({
|
|
60005
|
+
settlement: external_exports.strictObject({ available_after: span.default("2d"), payout_arrival: span.default("1d") }).default({ available_after: "2d", payout_arrival: "1d" }),
|
|
60006
|
+
verification: external_exports.strictObject({ review: span.default("0s") }).default({ review: "0s" }),
|
|
60007
|
+
disputes: external_exports.strictObject({ fee: amount.default(1500) }).default({ fee: 1500 })
|
|
60008
|
+
}).optional(),
|
|
60009
|
+
/** Connect: the platform's connected accounts (sellers), referenced as $ref in scenes and checks. */
|
|
60010
|
+
connected_accounts: external_exports.array(external_exports.strictObject({
|
|
60011
|
+
ref: ref9,
|
|
60012
|
+
type: external_exports.enum(["express", "custom"]).default("express"),
|
|
60013
|
+
email: external_exports.string().regex(EMAIL3),
|
|
60014
|
+
name: text8,
|
|
60015
|
+
business_type: external_exports.enum(["individual", "company"]).default("individual"),
|
|
60016
|
+
/** complete: card_payments and transfers active; incomplete: onboarding requirements due; restricted: past due, capabilities inactive. */
|
|
60017
|
+
onboarding: external_exports.enum(["complete", "incomplete", "restricted"]).default("complete"),
|
|
60018
|
+
/** The payout bank account: success, or one of Stripe's failing test accounts. */
|
|
60019
|
+
bank: external_exports.enum(STRIPE_TEST_BANKS).default("success"),
|
|
60020
|
+
payouts: external_exports.enum(["daily", "weekly", "monthly", "manual"]).default("daily"),
|
|
60021
|
+
balance: external_exports.strictObject({ available: amount.default(0), pending: amount.default(0) }).default({ available: 0, pending: 0 }),
|
|
60022
|
+
created: past.default("-720h"),
|
|
60023
|
+
metadata
|
|
60024
|
+
})).max(200).optional(),
|
|
60000
60025
|
products: external_exports.array(external_exports.strictObject({
|
|
60001
60026
|
ref: ref9,
|
|
60002
60027
|
name: text8,
|
|
@@ -60142,6 +60167,7 @@ var StripeSeedSchema = external_exports.strictObject({
|
|
|
60142
60167
|
});
|
|
60143
60168
|
});
|
|
60144
60169
|
seed2.customers.forEach((c, i) => declare("customer", c.ref, ["customers", i, "ref"]));
|
|
60170
|
+
(seed2.connected_accounts ?? []).forEach((a, i) => declare("account", a.ref, ["connected_accounts", i, "ref"]));
|
|
60145
60171
|
const customerOf = /* @__PURE__ */ new Map();
|
|
60146
60172
|
seed2.subscriptions.forEach((s, i) => {
|
|
60147
60173
|
declare("subscription", s.ref, ["subscriptions", i, "ref"]);
|
|
@@ -60178,10 +60204,10 @@ var StripeSeedSchema = external_exports.strictObject({
|
|
|
60178
60204
|
declare("credit_note", n.ref, ["credit_notes", i, "ref"]);
|
|
60179
60205
|
const inv = seed2.invoices.find((v) => v.ref === n.invoice);
|
|
60180
60206
|
if (!inv || inv.status !== "paid") issue2(["credit_notes", i, "invoice"], "credit notes need a paid invoice");
|
|
60181
|
-
const
|
|
60207
|
+
const total2 = inv?.lines.reduce((sum, l) => sum + (l.unit_amount ?? prices.get(l.price)?.unit_amount ?? 0) * l.quantity, 0) ?? 0;
|
|
60182
60208
|
const cumulative = (credited.get(n.invoice) ?? 0) + n.amount;
|
|
60183
60209
|
credited.set(n.invoice, cumulative);
|
|
60184
|
-
if (cumulative >
|
|
60210
|
+
if (cumulative > total2) issue2(["credit_notes", i, "amount"], "credit notes exceed the invoice total");
|
|
60185
60211
|
});
|
|
60186
60212
|
const disputed = /* @__PURE__ */ new Set();
|
|
60187
60213
|
seed2.disputes?.forEach((d, i) => {
|
|
@@ -60192,8 +60218,8 @@ var StripeSeedSchema = external_exports.strictObject({
|
|
|
60192
60218
|
const payment = seed2.payments.find((p2) => p2.ref === d.payment), inv = seed2.invoices.find((v) => v.ref === d.payment);
|
|
60193
60219
|
const card = inv ? seed2.customers.find((c) => c.ref === inv.customer)?.card : void 0;
|
|
60194
60220
|
if (inv && (card?.decline || seed2.livemode === false && !card)) issue2(["disputes", i, "payment"], "an invoice dispute needs a successful card charge");
|
|
60195
|
-
const
|
|
60196
|
-
if (d.amount !== void 0 && d.amount >
|
|
60221
|
+
const total2 = payment?.amount ?? inv?.lines.reduce((sum, l) => sum + (l.unit_amount ?? prices.get(l.price)?.unit_amount ?? 0) * l.quantity, 0) ?? 0;
|
|
60222
|
+
if (d.amount !== void 0 && d.amount > total2) issue2(["disputes", i, "amount"], "dispute amount exceeds the payment");
|
|
60197
60223
|
});
|
|
60198
60224
|
seed2.refunds.forEach((r, i) => {
|
|
60199
60225
|
declare("refund", r.ref, ["refunds", i, "ref"]);
|
|
@@ -60219,9 +60245,80 @@ var StripeSubscriptionsCheckSchema = external_exports.strictObject({
|
|
|
60219
60245
|
var StripeUnchangedCheckSchema = external_exports.strictObject({
|
|
60220
60246
|
objects: external_exports.array(external_exports.strictObject({ type: StripeObjectTypeSchema, id: objectId })).min(1).max(1e3)
|
|
60221
60247
|
});
|
|
60248
|
+
var capabilityState = external_exports.enum(["active", "inactive", "pending", "unrequested"]);
|
|
60249
|
+
var signedAmount = external_exports.number().int().min(-99999999).max(99999999);
|
|
60250
|
+
var count2 = external_exports.number().int().nonnegative();
|
|
60251
|
+
var total = external_exports.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
|
|
60252
|
+
var requirement = external_exports.string().regex(/^[a-z_]+(?:\.[a-z0-9_]+)*$/, "expected a requirement such as individual.verification.document");
|
|
60253
|
+
var StripeAccountsCheckSchema = external_exports.strictObject({
|
|
60254
|
+
account: objectId.optional(),
|
|
60255
|
+
email: external_exports.email().optional(),
|
|
60256
|
+
charges_enabled: external_exports.boolean().optional(),
|
|
60257
|
+
payouts_enabled: external_exports.boolean().optional(),
|
|
60258
|
+
details_submitted: external_exports.boolean().optional(),
|
|
60259
|
+
capabilities: external_exports.strictObject({ card_payments: capabilityState.optional(), transfers: capabilityState.optional() }).optional(),
|
|
60260
|
+
disabled_reason: external_exports.string().min(1).nullable().optional(),
|
|
60261
|
+
/** true: something is currently due or past due. */
|
|
60262
|
+
requirements_due: external_exports.boolean().optional(),
|
|
60263
|
+
count: count2.optional()
|
|
60264
|
+
}).refine((c) => c.account === void 0 || c.email === void 0, "give account or email, not both");
|
|
60265
|
+
var StripeTransfersCheckSchema = external_exports.strictObject({
|
|
60266
|
+
destination: objectId.optional(),
|
|
60267
|
+
charge: objectId.optional(),
|
|
60268
|
+
transfer_group: external_exports.string().min(1).optional(),
|
|
60269
|
+
count: count2.optional(),
|
|
60270
|
+
amount: total.optional(),
|
|
60271
|
+
amount_reversed: total.optional(),
|
|
60272
|
+
after_start: external_exports.boolean().optional()
|
|
60273
|
+
}).refine((c) => c.count !== void 0 || c.amount !== void 0 || c.amount_reversed !== void 0, "give count, amount or amount_reversed");
|
|
60274
|
+
var StripeApplicationFeesCheckSchema = external_exports.strictObject({
|
|
60275
|
+
account: objectId.optional(),
|
|
60276
|
+
charge: objectId.optional(),
|
|
60277
|
+
count: count2.optional(),
|
|
60278
|
+
amount: total.optional(),
|
|
60279
|
+
amount_refunded: total.optional(),
|
|
60280
|
+
after_start: external_exports.boolean().optional()
|
|
60281
|
+
}).refine((c) => c.count !== void 0 || c.amount !== void 0 || c.amount_refunded !== void 0, "give count, amount or amount_refunded");
|
|
60282
|
+
var StripePayoutsCheckSchema = external_exports.strictObject({
|
|
60283
|
+
account: objectId.optional(),
|
|
60284
|
+
status: external_exports.enum(["pending", "in_transit", "paid", "failed", "canceled"]).optional(),
|
|
60285
|
+
failure_code: external_exports.string().min(1).optional(),
|
|
60286
|
+
count: count2.optional(),
|
|
60287
|
+
amount: total.optional(),
|
|
60288
|
+
after_start: external_exports.boolean().optional()
|
|
60289
|
+
}).refine((c) => c.count !== void 0 || c.amount !== void 0, "give count, amount, or both");
|
|
60290
|
+
var StripeAccountBalanceCheckSchema = external_exports.strictObject({ account: objectId.optional(), available: signedAmount.optional(), pending: signedAmount.optional() }).refine((c) => c.available !== void 0 || c.pending !== void 0, "give available, pending, or both");
|
|
60291
|
+
var accountTarget = { account: objectId.optional(), email: external_exports.email().optional() };
|
|
60292
|
+
var oneAccount = (a) => a.account === void 0 !== (a.email === void 0);
|
|
60293
|
+
var StripeCompleteOnboardingSchema = external_exports.strictObject({ ...accountTarget, bank: external_exports.enum(STRIPE_TEST_BANKS).optional() }).refine(oneAccount, "give exactly one of account or email");
|
|
60294
|
+
var StripeRequireSchema = external_exports.strictObject({
|
|
60295
|
+
...accountTarget,
|
|
60296
|
+
requirements: external_exports.array(requirement).min(1).max(30),
|
|
60297
|
+
capabilities: external_exports.array(external_exports.enum(["card_payments", "transfers"])).min(1).optional(),
|
|
60298
|
+
deadline: span.optional()
|
|
60299
|
+
}).refine(oneAccount, "give exactly one of account or email");
|
|
60300
|
+
var StripeUpdateBankSchema = external_exports.strictObject({ ...accountTarget, bank: external_exports.enum(STRIPE_TEST_BANKS) }).refine(oneAccount, "give exactly one of account or email");
|
|
60301
|
+
var StripeDisputeSchema = external_exports.strictObject({
|
|
60302
|
+
charge: objectId.optional(),
|
|
60303
|
+
payment_intent: objectId.optional(),
|
|
60304
|
+
customer_email: external_exports.email().optional(),
|
|
60305
|
+
reason: external_exports.enum(["fraudulent", "product_not_received", "product_unacceptable", "duplicate", "subscription_canceled", "credit_not_processed", "unrecognized", "general"]).default("fraudulent"),
|
|
60306
|
+
amount: amount.optional()
|
|
60307
|
+
}).refine((a) => [a.charge, a.payment_intent, a.customer_email].filter((v) => v !== void 0).length === 1, "give exactly one of charge, payment_intent or customer_email");
|
|
60308
|
+
var StripeCloseDisputeSchema = external_exports.strictObject({
|
|
60309
|
+
dispute: objectId.optional(),
|
|
60310
|
+
charge: objectId.optional(),
|
|
60311
|
+
payment_intent: objectId.optional(),
|
|
60312
|
+
customer_email: external_exports.email().optional(),
|
|
60313
|
+
outcome: external_exports.enum(["won", "lost"])
|
|
60314
|
+
}).refine((a) => [a.dispute, a.charge, a.payment_intent, a.customer_email].filter((v) => v !== void 0).length === 1, "give exactly one of dispute, charge, payment_intent or customer_email");
|
|
60222
60315
|
var stripeStarterSeed = {
|
|
60223
60316
|
account: { name: "Acme", currency: "usd", statement_descriptor: "ACME ANALYTICS" },
|
|
60224
60317
|
balance: { available: 1284550, pending: 12e4 },
|
|
60318
|
+
connected_accounts: [
|
|
60319
|
+
{ ref: "seller_ready", type: "express", name: "Alex Reed", email: "alex@market.example", onboarding: "complete", payouts: "manual" },
|
|
60320
|
+
{ ref: "seller_new", type: "express", name: "Sam Park", email: "sam@market.example", onboarding: "incomplete", payouts: "manual" }
|
|
60321
|
+
],
|
|
60225
60322
|
products: [
|
|
60226
60323
|
{ ref: "team", name: "Acme Team", description: "Dashboards and exports for up to ten analysts", prices: [{ ref: "team_monthly", unit_amount: 12e4, nickname: "Team monthly", lookup_key: "team_monthly", recurring: { interval: "month" } }] },
|
|
60227
60324
|
{ ref: "enterprise", name: "Acme Enterprise", description: "Per-seat plan with SSO and audit logs", unit_label: "seat", prices: [
|
|
@@ -60279,6 +60376,7 @@ var user3 = external_exports.strictObject({
|
|
|
60279
60376
|
lastSignIn: offset6.optional(),
|
|
60280
60377
|
/** Their session is active when this is within the last week, ended otherwise. */
|
|
60281
60378
|
lastActive: offset6.optional(),
|
|
60379
|
+
password: external_exports.string().min(8).max(72).optional(),
|
|
60282
60380
|
hasPassword: external_exports.boolean().default(true),
|
|
60283
60381
|
banned: external_exports.boolean().default(false),
|
|
60284
60382
|
/** Locked after too many failed sign-in attempts. */
|
|
@@ -60411,6 +60509,21 @@ function clerkStarterSeed() {
|
|
|
60411
60509
|
invitations: [{ email: "security@bluefield-logistics.example", created: "-8h", status: "pending" }]
|
|
60412
60510
|
});
|
|
60413
60511
|
}
|
|
60512
|
+
var identity = { user: external_exports.string().min(1).optional(), email: external_exports.email().optional() };
|
|
60513
|
+
var oneIdentity = (value2) => value2.user === void 0 !== (value2.email === void 0);
|
|
60514
|
+
var ClerkSignInSchema = external_exports.strictObject({ ...identity, organization: external_exports.string().min(1).optional() }).refine(oneIdentity, "give exactly one of user or email");
|
|
60515
|
+
var ClerkWebhookSchema = external_exports.strictObject({
|
|
60516
|
+
url: external_exports.string().url().refine((value2) => ["http:", "https:"].includes(new URL(value2).protocol), "expected an HTTP or HTTPS URL"),
|
|
60517
|
+
events: external_exports.array(external_exports.string().regex(/^[a-zA-Z]+\.[a-z_]+$/, "a Clerk event type such as user.created")).min(1).optional()
|
|
60518
|
+
});
|
|
60519
|
+
var sessionFilter = { ...identity, status: external_exports.enum(["abandoned", "active", "ended", "expired", "removed", "replaced", "revoked"]).optional() };
|
|
60520
|
+
var count3 = external_exports.number().int().nonnegative();
|
|
60521
|
+
var ClerkSessionsCheckSchema = external_exports.union([
|
|
60522
|
+
external_exports.strictObject({ ...sessionFilter, count: count3 }),
|
|
60523
|
+
external_exports.strictObject({ ...sessionFilter, count_gte: count3.default(1) }),
|
|
60524
|
+
external_exports.strictObject({ ...sessionFilter, count_lte: count3 })
|
|
60525
|
+
]).refine(oneIdentity, "give exactly one of user or email");
|
|
60526
|
+
var ClerkMembershipsCheckSchema = external_exports.strictObject({ ...identity, organization: external_exports.string().min(1), role: external_exports.enum(CLERK_ROLES).optional(), count: count3.optional() }).refine(oneIdentity, "give exactly one of user or email");
|
|
60414
60527
|
|
|
60415
60528
|
// packages/core/src/tools/better-stack.ts
|
|
60416
60529
|
var BETTER_STACK_MONITOR_TYPES = ["status", "expected_status_code", "keyword", "keyword_absence", "ping", "tcp", "udp", "smtp", "pop", "imap", "dns"];
|
|
@@ -62805,8 +62918,8 @@ var offset12 = duration5((ms) => ms <= 0, "expected a duration at or before star
|
|
|
62805
62918
|
var when5 = duration5(() => true, "expected a duration such as -2h or 30d");
|
|
62806
62919
|
var cents2 = (value2) => Math.abs(value2 * 100 - Math.round(value2 * 100)) < 1e-9;
|
|
62807
62920
|
var price = external_exports.number().min(0.01).max(0.99).refine(cents2, "a whole number of cents, e.g. 0.56");
|
|
62808
|
-
var
|
|
62809
|
-
var level = external_exports.tuple([price,
|
|
62921
|
+
var count4 = external_exports.number().positive().max(1e7).refine(cents2, "at most two decimal places");
|
|
62922
|
+
var level = external_exports.tuple([price, count4]);
|
|
62810
62923
|
var ticker = external_exports.string().regex(/^[A-Z0-9][A-Z0-9.-]*$/, "an upper-case ticker such as KXFED-26DEC").max(100);
|
|
62811
62924
|
var market = external_exports.strictObject({
|
|
62812
62925
|
/** Appended to the event ticker: KXFEDDECISION-26DEC + C25 → KXFEDDECISION-26DEC-C25. */
|
|
@@ -62832,7 +62945,7 @@ var market = external_exports.strictObject({
|
|
|
62832
62945
|
/** Other traders' resting bids: `yes` buys Yes, `no` buys No, as [price, contracts]. */
|
|
62833
62946
|
book: external_exports.strictObject({ yes: external_exports.array(level).max(100).default([]), no: external_exports.array(level).max(100).default([]) }).default({ yes: [], no: [] }),
|
|
62834
62947
|
/** Recent public trades between other traders. */
|
|
62835
|
-
trades: external_exports.array(external_exports.strictObject({ at: offset12, count:
|
|
62948
|
+
trades: external_exports.array(external_exports.strictObject({ at: offset12, count: count4, yesPrice: price, takerSide: external_exports.enum(["yes", "no"]) })).max(1e3).default([])
|
|
62836
62949
|
});
|
|
62837
62950
|
var event2 = external_exports.strictObject({
|
|
62838
62951
|
ticker,
|
|
@@ -62858,12 +62971,12 @@ var order = external_exports.strictObject({
|
|
|
62858
62971
|
market: ticker,
|
|
62859
62972
|
side: external_exports.enum(["bid", "ask"]),
|
|
62860
62973
|
price,
|
|
62861
|
-
count:
|
|
62974
|
+
count: count4,
|
|
62862
62975
|
created: offset12,
|
|
62863
62976
|
clientOrderId: external_exports.string().min(1).max(100).optional(),
|
|
62864
62977
|
timeInForce: external_exports.enum(KALSHI_TIME_IN_FORCE).default("good_till_canceled"),
|
|
62865
62978
|
/** Executions, oldest first; a bid fills at or below its price, an ask at or above. Whatever is left rests unless canceled. */
|
|
62866
|
-
fills: external_exports.array(external_exports.strictObject({ at: offset12, count:
|
|
62979
|
+
fills: external_exports.array(external_exports.strictObject({ at: offset12, count: count4, price: price.optional(), taker: external_exports.boolean().default(true) })).max(1e3).default([]),
|
|
62867
62980
|
canceled: offset12.optional()
|
|
62868
62981
|
});
|
|
62869
62982
|
var KalshiSeedSchema = external_exports.strictObject({
|
|
@@ -65247,7 +65360,7 @@ var FUNCTIONS = {
|
|
|
65247
65360
|
const cleaned = formulaText(value2).replace(/[^0-9.eE+-]/g, "");
|
|
65248
65361
|
return cleaned ? Number.isNaN(Number(cleaned)) ? err() : Number(cleaned) : null;
|
|
65249
65362
|
} },
|
|
65250
|
-
SUM: { min: 1, max: Infinity, run: (args) => numbers(args).reduce((
|
|
65363
|
+
SUM: { min: 1, max: Infinity, run: (args) => numbers(args).reduce((total2, n) => total2 + n, 0) },
|
|
65251
65364
|
MAX: { min: 1, max: Infinity, run: (args) => {
|
|
65252
65365
|
const list = numbers(args);
|
|
65253
65366
|
return list.length ? Math.max(...list) : 0;
|
|
@@ -65258,7 +65371,7 @@ var FUNCTIONS = {
|
|
|
65258
65371
|
} },
|
|
65259
65372
|
AVERAGE: { min: 1, max: Infinity, run: (args) => {
|
|
65260
65373
|
const list = numbers(args);
|
|
65261
|
-
return list.length ? list.reduce((
|
|
65374
|
+
return list.length ? list.reduce((total2, n) => total2 + n, 0) / list.length : err();
|
|
65262
65375
|
} },
|
|
65263
65376
|
COUNT: { min: 1, max: Infinity, run: (args) => numbers(args).length },
|
|
65264
65377
|
COUNTA: { min: 1, max: Infinity, run: (args) => args.flatMap(flat).filter((item2) => item2 !== null && item2 !== "").length },
|
|
@@ -65273,11 +65386,11 @@ var FUNCTIONS = {
|
|
|
65273
65386
|
} },
|
|
65274
65387
|
RECORD_ID: { min: 0, max: 0, run: (_args, scope2) => scope2.recordId },
|
|
65275
65388
|
DATEADD: { min: 3, max: 3, run: (args) => {
|
|
65276
|
-
const date9 = dateArg(args[0]),
|
|
65389
|
+
const date9 = dateArg(args[0]), count5 = num(args[1]), unit = unitOf(args[2]);
|
|
65277
65390
|
if (date9 === null) return null;
|
|
65278
|
-
if (isFormulaError(date9) || !unit || Number.isNaN(
|
|
65279
|
-
if (FIXED[unit]) return formulaDate(date9.ms +
|
|
65280
|
-
return formulaDate(addMonths(date9.ms, Math.trunc(
|
|
65391
|
+
if (isFormulaError(date9) || !unit || Number.isNaN(count5)) return err();
|
|
65392
|
+
if (FIXED[unit]) return formulaDate(date9.ms + count5 * FIXED[unit], date9.dateOnly && unit !== "milliseconds" && unit !== "seconds" && unit !== "minutes" && unit !== "hours");
|
|
65393
|
+
return formulaDate(addMonths(date9.ms, Math.trunc(count5) * (unit === "years" ? 12 : unit === "quarters" ? 3 : 1)), date9.dateOnly);
|
|
65281
65394
|
} },
|
|
65282
65395
|
DATETIME_DIFF: { min: 2, max: 3, run: (args) => {
|
|
65283
65396
|
const a = dateArg(args[0]), b = dateArg(args[1]), unit = args[2] === void 0 ? "seconds" : unitOf(args[2]);
|
|
@@ -65355,11 +65468,11 @@ var FUNCTIONS = {
|
|
|
65355
65468
|
} },
|
|
65356
65469
|
WORKDAY: { min: 2, max: 3, run: (args) => {
|
|
65357
65470
|
if (args[2] !== void 0) throw new FormulaGap("WORKDAY() with holidays");
|
|
65358
|
-
const date9 = dateArg(args[0]),
|
|
65471
|
+
const date9 = dateArg(args[0]), count5 = Math.trunc(num(args[1]));
|
|
65359
65472
|
if (date9 === null || isFormulaError(date9)) return date9;
|
|
65360
65473
|
let ms = startOfDay(date9.ms);
|
|
65361
|
-
for (let left = Math.abs(
|
|
65362
|
-
ms += Math.sign(
|
|
65474
|
+
for (let left = Math.abs(count5); left > 0; ) {
|
|
65475
|
+
ms += Math.sign(count5) * 864e5;
|
|
65363
65476
|
if (isWorkday(ms)) left--;
|
|
65364
65477
|
}
|
|
65365
65478
|
return formulaDate(ms, true);
|
|
@@ -66724,13 +66837,13 @@ function books(seed2, issue2, money8) {
|
|
|
66724
66837
|
account3(t.account, ["customerRefunds", index, "account"], ["Bank"], "refund account");
|
|
66725
66838
|
}
|
|
66726
66839
|
for (const [id10, amount2] of applied) if (round2(amount2) > (totals.get(id10) ?? 0) + 1e-9) {
|
|
66727
|
-
const name3 = seed2.invoices.some((t) => t.id === id10) ? "invoices" : "vendorBills", path2 = [name3, seed2[name3].findIndex((t) => t.id === id10)],
|
|
66728
|
-
issue2(path2, `${name3 === "invoices" ? "invoice" : "vendor bill"} is over-applied: applications total ${money8(path2, round2(amount2))} against a total of ${money8(path2,
|
|
66840
|
+
const name3 = seed2.invoices.some((t) => t.id === id10) ? "invoices" : "vendorBills", path2 = [name3, seed2[name3].findIndex((t) => t.id === id10)], total2 = totals.get(id10) ?? 0;
|
|
66841
|
+
issue2(path2, `${name3 === "invoices" ? "invoice" : "vendor bill"} is over-applied: applications total ${money8(path2, round2(amount2))} against a total of ${money8(path2, total2)} (over by ${money8(path2, round2(amount2 - total2))})`);
|
|
66729
66842
|
}
|
|
66730
66843
|
for (const name3 of ["creditMemos", "customerPayments", "vendorCredits", "vendorPayments"]) for (const [index, t] of seed2[name3].entries()) {
|
|
66731
|
-
const
|
|
66844
|
+
const total2 = ("amount" in t ? t.amount : totals.get(t.id) ?? 0) + ("credit" in t ? t.credit.reduce((sum, a) => sum + a.amount, 0) : 0);
|
|
66732
66845
|
const used2 = round2(spent.get(t.id) ?? 0), path2 = [name3, index, "apply"];
|
|
66733
|
-
if (used2 >
|
|
66846
|
+
if (used2 > total2 + 1e-9) issue2(path2, `applies more than the ${name3 === "creditMemos" ? "credit memo" : name3 === "vendorCredits" ? "bill credit" : "payment"}: ${money8(path2, used2)} against ${money8(path2, round2(total2))} (over by ${money8(path2, round2(used2 - total2))})`);
|
|
66734
66847
|
}
|
|
66735
66848
|
const open2 = [];
|
|
66736
66849
|
const ar = seed2.accounts.find((a) => a.type === "AcctRec" && !a.inactive)?.id, ap = seed2.accounts.find((a) => a.type === "AcctPay" && !a.inactive)?.id;
|
|
@@ -67667,7 +67780,14 @@ var StateCheckSchema = external_exports.union([
|
|
|
67667
67780
|
external_exports.strictObject({ "stripe.refunds": StripeRefundsCheckSchema }),
|
|
67668
67781
|
external_exports.strictObject({ "stripe.balance": StripeBalanceCheckSchema }),
|
|
67669
67782
|
external_exports.strictObject({ "stripe.unchanged": StripeUnchangedCheckSchema }),
|
|
67783
|
+
external_exports.strictObject({ "clerk.sessions": ClerkSessionsCheckSchema }),
|
|
67784
|
+
external_exports.strictObject({ "clerk.memberships": ClerkMembershipsCheckSchema }),
|
|
67670
67785
|
external_exports.strictObject({ "stripe.subscriptions": StripeSubscriptionsCheckSchema }),
|
|
67786
|
+
external_exports.strictObject({ "stripe.accounts": StripeAccountsCheckSchema }),
|
|
67787
|
+
external_exports.strictObject({ "stripe.transfers": StripeTransfersCheckSchema }),
|
|
67788
|
+
external_exports.strictObject({ "stripe.application_fees": StripeApplicationFeesCheckSchema }),
|
|
67789
|
+
external_exports.strictObject({ "stripe.payouts": StripePayoutsCheckSchema }),
|
|
67790
|
+
external_exports.strictObject({ "stripe.account_balance": StripeAccountBalanceCheckSchema }),
|
|
67671
67791
|
external_exports.strictObject({ "zendesk.ticket": ZendeskTicketCheckSchema }),
|
|
67672
67792
|
external_exports.strictObject({ "zendesk.unchanged": ZendeskUnchangedCheckSchema }),
|
|
67673
67793
|
external_exports.strictObject({ "netsuite.record": NetsuiteRecordCheckSchema }),
|
|
@@ -67697,7 +67817,14 @@ var actorActions = [
|
|
|
67697
67817
|
{ "stripe.complete_checkout": external_exports.strictObject({ session: external_exports.string().min(1).optional(), customer_email: external_exports.email().optional(), card: external_exports.string().min(1).optional() }) },
|
|
67698
67818
|
{ "stripe.set_default_card": external_exports.strictObject({ customer: external_exports.string().min(1).optional(), customer_email: external_exports.email().optional(), card: external_exports.string().min(1) }).refine((a) => a.customer === void 0 !== (a.customer_email === void 0), "give exactly one of customer or customer_email") },
|
|
67699
67819
|
{ "shopify.complete_checkout": ShopifyCompleteCheckoutSchema },
|
|
67700
|
-
{ "shopify.subscribe_webhook": ShopifyWebhookSchema }
|
|
67820
|
+
{ "shopify.subscribe_webhook": ShopifyWebhookSchema },
|
|
67821
|
+
{ "clerk.sign_in": ClerkSignInSchema },
|
|
67822
|
+
{ "clerk.subscribe_webhook": ClerkWebhookSchema },
|
|
67823
|
+
{ "stripe.complete_onboarding": StripeCompleteOnboardingSchema },
|
|
67824
|
+
{ "stripe.require": StripeRequireSchema },
|
|
67825
|
+
{ "stripe.update_bank": StripeUpdateBankSchema },
|
|
67826
|
+
{ "stripe.dispute": StripeDisputeSchema },
|
|
67827
|
+
{ "stripe.close_dispute": StripeCloseDisputeSchema }
|
|
67701
67828
|
];
|
|
67702
67829
|
var timed = (action) => external_exports.strictObject({ at: actorAt, ...action });
|
|
67703
67830
|
var conditional = (action) => external_exports.strictObject({ when: WorldPredicateSchema, after: duration6("Nonnegative delay after predicate first qualifies").optional(), once: external_exports.literal(true).optional(), ...action });
|
|
@@ -67715,6 +67842,13 @@ var ActorSchema = external_exports.union([
|
|
|
67715
67842
|
timed(actorActions[10]),
|
|
67716
67843
|
timed(actorActions[11]),
|
|
67717
67844
|
timed(actorActions[12]),
|
|
67845
|
+
timed(actorActions[13]),
|
|
67846
|
+
timed(actorActions[14]),
|
|
67847
|
+
timed(actorActions[15]),
|
|
67848
|
+
timed(actorActions[16]),
|
|
67849
|
+
timed(actorActions[17]),
|
|
67850
|
+
timed(actorActions[18]),
|
|
67851
|
+
timed(actorActions[19]),
|
|
67718
67852
|
conditional(actorActions[0]),
|
|
67719
67853
|
conditional(actorActions[1]),
|
|
67720
67854
|
conditional(actorActions[2]),
|
|
@@ -67727,15 +67861,30 @@ var ActorSchema = external_exports.union([
|
|
|
67727
67861
|
conditional(actorActions[9]),
|
|
67728
67862
|
conditional(actorActions[10]),
|
|
67729
67863
|
conditional(actorActions[11]),
|
|
67730
|
-
conditional(actorActions[12])
|
|
67864
|
+
conditional(actorActions[12]),
|
|
67865
|
+
conditional(actorActions[13]),
|
|
67866
|
+
conditional(actorActions[14]),
|
|
67867
|
+
conditional(actorActions[15]),
|
|
67868
|
+
conditional(actorActions[16]),
|
|
67869
|
+
conditional(actorActions[17]),
|
|
67870
|
+
conditional(actorActions[18]),
|
|
67871
|
+
conditional(actorActions[19])
|
|
67731
67872
|
]);
|
|
67732
67873
|
var AppCallSchema = external_exports.strictObject({
|
|
67733
67874
|
at: actorAt,
|
|
67734
67875
|
method: external_exports.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]).default("GET"),
|
|
67735
67876
|
path: external_exports.string().regex(/^\/(?!\/)/, "a path on the app, starting with a single /"),
|
|
67736
67877
|
headers: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
67737
|
-
body: external_exports.union([external_exports.string(), external_exports.record(external_exports.string(), external_exports.unknown()), external_exports.array(external_exports.unknown())]).optional()
|
|
67738
|
-
|
|
67878
|
+
body: external_exports.union([external_exports.string(), external_exports.record(external_exports.string(), external_exports.unknown()), external_exports.array(external_exports.unknown())]).optional(),
|
|
67879
|
+
/**
|
|
67880
|
+
* Made as a signed-in person: Clerk signs them in (their latest active session, else a new one) and the call carries a
|
|
67881
|
+
* fresh session token in Authorization; `organization` (id or slug) is the session's active organization.
|
|
67882
|
+
*/
|
|
67883
|
+
as: external_exports.strictObject({ clerk: external_exports.string().min(1), organization: external_exports.string().min(1).optional() }).optional()
|
|
67884
|
+
}).refine(
|
|
67885
|
+
(call2) => call2.as === void 0 || !Object.keys(call2.headers ?? {}).some((name3) => name3.toLowerCase() === "authorization"),
|
|
67886
|
+
{ message: "as signs the call in: leave authorization out of headers", path: ["headers"] }
|
|
67887
|
+
);
|
|
67739
67888
|
var TraceCheckSchema = external_exports.strictObject({
|
|
67740
67889
|
called: external_exports.union([external_exports.string(), external_exports.array(external_exports.string())]).optional(),
|
|
67741
67890
|
not_called: external_exports.union([external_exports.string(), external_exports.array(external_exports.string())]).optional(),
|
|
@@ -68457,8 +68606,8 @@ var TOOL_DESCRIPTORS = [
|
|
|
68457
68606
|
descriptor("amazon-s3", "Amazon S3", "Buckets, objects and multipart uploads", ["Buckets", "Objects", "Tags", "Multipart uploads"], "REST (SigV4)", ["Path-style addressing: the SDK chooses it for an IP endpoint; set forcePathStyle for a host name.", "One account and access key; per-bucket read-write, read-only or no access stands in for IAM policies.", "Presigned URLs are verified."]),
|
|
68458
68607
|
descriptor("linear", "Linear", "Issues, projects and team workflows", ["Issues", "Comments", "Teams", "Workflow states", "Labels", "Projects", "Users"], "GraphQL", ["Linear's published schema.", "Filters cover the common comparators.", "@linear/sdk accepts a plain-http apiUrl only on localhost, 127.0.0.1 or [::1]; elsewhere the endpoint needs TLS."]),
|
|
68459
68608
|
descriptor("okta", "Okta", "People, groups, app assignments and the System Log", ["Users", "Groups", "Applications", "App assignments", "System Log"], "Management API v1", ["One org and one SSWS API token owned by a super administrator.", "Lifecycle changes are immediate; activation and reset links are returned.", "The System Log records every change made through the API."]),
|
|
68460
|
-
descriptor("stripe", "Stripe", "Customers, subscriptions, invoices and
|
|
68461
|
-
descriptor("clerk", "Clerk", "Users, organizations,
|
|
68609
|
+
descriptor("stripe", "Stripe", "Customers, subscriptions, invoices, payments and Connect accounts, onboarding, transfers, application fees and payouts", ["Customers", "Products", "Prices", "Subscriptions", "Invoices", "Invoice items", "Payment intents", "Charges", "Refunds", "Balance", "Connected accounts", "Onboarding", "Transfers", "Application fees", "Payouts"], "API 2026-10-28.endive", ["Live-account objects and a stored card per seeded customer by default. Set seed.stripe.livemode: false for test tokens (pm_card_visa, pm_card_chargeDeclined\u2026).", "The SDK takes no base path: point host/port/protocol at the env-scoped host ({env}-stripe.localhost) or prefix STRIPE_API_URL in a custom fetch client."]),
|
|
68610
|
+
descriptor("clerk", "Clerk", "Users, organizations, sign-in and sessions", ["Users", "Organizations", "Memberships", "Invitations", "Sessions"], "Backend and Frontend APIs v1", ["Email-code, password and invitation-ticket sign-in with RS256 session tokens.", "Verification and invitation emails appear in the world inbox.", "Organization claims and Svix-signed webhooks follow the world state."]),
|
|
68462
68611
|
descriptor("better-stack", "Better Stack", "Uptime monitors, heartbeats, incidents and status pages", ["Monitors", "Heartbeats", "Incidents", "On-call", "Status pages"], "Uptime API v2 / v3", ["A monitor is down while it has an open incident, and heartbeats recover when pinged.", "No official SDK exists; tested against the documented REST shapes."]),
|
|
68463
68612
|
descriptor("notion", "Notion", "Pages, databases, blocks and comments", ["Pages", "Blocks", "Databases", "Data sources", "Comments", "Users", "Search"], "Notion-Version 2025-09-03", ["An internal integration: it sees only pages shared with it, as Notion does.", "Text, heading, list, to-do, toggle, quote, callout, code, divider and bookmark blocks.", "Databases are served as data sources."]),
|
|
68464
68613
|
descriptor("attio", "Attio", "People, companies, deals, lists, notes and tasks", ["Objects", "Attributes", "Records", "Lists", "Entries", "Notes", "Tasks", "Workspace members"], "REST v2", ["Standard people, companies and deals objects with typed values and value history.", "Attio publishes no official API client: tested over HTTP against the shapes in its OpenAPI document."]),
|