@c4a/core 0.4.15-beta.5 → 0.5.20
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/index.js +514 -773
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -36,24 +36,24 @@ var require_identity = __commonJS((exports) => {
|
|
|
36
36
|
var SCALAR = Symbol.for("yaml.scalar");
|
|
37
37
|
var SEQ = Symbol.for("yaml.seq");
|
|
38
38
|
var NODE_TYPE = Symbol.for("yaml.node.type");
|
|
39
|
-
var isAlias = (
|
|
40
|
-
var isDocument = (
|
|
41
|
-
var isMap = (
|
|
42
|
-
var isPair = (
|
|
43
|
-
var isScalar = (
|
|
44
|
-
var isSeq = (
|
|
45
|
-
function isCollection(
|
|
46
|
-
if (
|
|
47
|
-
switch (
|
|
39
|
+
var isAlias = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === ALIAS;
|
|
40
|
+
var isDocument = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === DOC;
|
|
41
|
+
var isMap = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === MAP;
|
|
42
|
+
var isPair = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === PAIR;
|
|
43
|
+
var isScalar = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === SCALAR;
|
|
44
|
+
var isSeq = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === SEQ;
|
|
45
|
+
function isCollection(node2) {
|
|
46
|
+
if (node2 && typeof node2 === "object")
|
|
47
|
+
switch (node2[NODE_TYPE]) {
|
|
48
48
|
case MAP:
|
|
49
49
|
case SEQ:
|
|
50
50
|
return true;
|
|
51
51
|
}
|
|
52
52
|
return false;
|
|
53
53
|
}
|
|
54
|
-
function isNode(
|
|
55
|
-
if (
|
|
56
|
-
switch (
|
|
54
|
+
function isNode(node2) {
|
|
55
|
+
if (node2 && typeof node2 === "object")
|
|
56
|
+
switch (node2[NODE_TYPE]) {
|
|
57
57
|
case ALIAS:
|
|
58
58
|
case MAP:
|
|
59
59
|
case SCALAR:
|
|
@@ -62,7 +62,7 @@ var require_identity = __commonJS((exports) => {
|
|
|
62
62
|
}
|
|
63
63
|
return false;
|
|
64
64
|
}
|
|
65
|
-
var hasAnchor = (
|
|
65
|
+
var hasAnchor = (node2) => (isScalar(node2) || isCollection(node2)) && !!node2.anchor;
|
|
66
66
|
exports.ALIAS = ALIAS;
|
|
67
67
|
exports.DOC = DOC;
|
|
68
68
|
exports.MAP = MAP;
|
|
@@ -87,98 +87,98 @@ var require_visit = __commonJS((exports) => {
|
|
|
87
87
|
var BREAK = Symbol("break visit");
|
|
88
88
|
var SKIP = Symbol("skip children");
|
|
89
89
|
var REMOVE = Symbol("remove node");
|
|
90
|
-
function visit(
|
|
90
|
+
function visit(node2, visitor) {
|
|
91
91
|
const visitor_ = initVisitor(visitor);
|
|
92
|
-
if (identity.isDocument(
|
|
93
|
-
const cd = visit_(null,
|
|
92
|
+
if (identity.isDocument(node2)) {
|
|
93
|
+
const cd = visit_(null, node2.contents, visitor_, Object.freeze([node2]));
|
|
94
94
|
if (cd === REMOVE)
|
|
95
|
-
|
|
95
|
+
node2.contents = null;
|
|
96
96
|
} else
|
|
97
|
-
visit_(null,
|
|
97
|
+
visit_(null, node2, visitor_, Object.freeze([]));
|
|
98
98
|
}
|
|
99
99
|
visit.BREAK = BREAK;
|
|
100
100
|
visit.SKIP = SKIP;
|
|
101
101
|
visit.REMOVE = REMOVE;
|
|
102
|
-
function visit_(key,
|
|
103
|
-
const ctrl = callVisitor(key,
|
|
102
|
+
function visit_(key, node2, visitor, path2) {
|
|
103
|
+
const ctrl = callVisitor(key, node2, visitor, path2);
|
|
104
104
|
if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
|
|
105
105
|
replaceNode(key, path2, ctrl);
|
|
106
106
|
return visit_(key, ctrl, visitor, path2);
|
|
107
107
|
}
|
|
108
108
|
if (typeof ctrl !== "symbol") {
|
|
109
|
-
if (identity.isCollection(
|
|
110
|
-
path2 = Object.freeze(path2.concat(
|
|
111
|
-
for (let i = 0;i <
|
|
112
|
-
const ci = visit_(i,
|
|
109
|
+
if (identity.isCollection(node2)) {
|
|
110
|
+
path2 = Object.freeze(path2.concat(node2));
|
|
111
|
+
for (let i = 0;i < node2.items.length; ++i) {
|
|
112
|
+
const ci = visit_(i, node2.items[i], visitor, path2);
|
|
113
113
|
if (typeof ci === "number")
|
|
114
114
|
i = ci - 1;
|
|
115
115
|
else if (ci === BREAK)
|
|
116
116
|
return BREAK;
|
|
117
117
|
else if (ci === REMOVE) {
|
|
118
|
-
|
|
118
|
+
node2.items.splice(i, 1);
|
|
119
119
|
i -= 1;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
} else if (identity.isPair(
|
|
123
|
-
path2 = Object.freeze(path2.concat(
|
|
124
|
-
const ck = visit_("key",
|
|
122
|
+
} else if (identity.isPair(node2)) {
|
|
123
|
+
path2 = Object.freeze(path2.concat(node2));
|
|
124
|
+
const ck = visit_("key", node2.key, visitor, path2);
|
|
125
125
|
if (ck === BREAK)
|
|
126
126
|
return BREAK;
|
|
127
127
|
else if (ck === REMOVE)
|
|
128
|
-
|
|
129
|
-
const cv = visit_("value",
|
|
128
|
+
node2.key = null;
|
|
129
|
+
const cv = visit_("value", node2.value, visitor, path2);
|
|
130
130
|
if (cv === BREAK)
|
|
131
131
|
return BREAK;
|
|
132
132
|
else if (cv === REMOVE)
|
|
133
|
-
|
|
133
|
+
node2.value = null;
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
return ctrl;
|
|
137
137
|
}
|
|
138
|
-
async function visitAsync(
|
|
138
|
+
async function visitAsync(node2, visitor) {
|
|
139
139
|
const visitor_ = initVisitor(visitor);
|
|
140
|
-
if (identity.isDocument(
|
|
141
|
-
const cd = await visitAsync_(null,
|
|
140
|
+
if (identity.isDocument(node2)) {
|
|
141
|
+
const cd = await visitAsync_(null, node2.contents, visitor_, Object.freeze([node2]));
|
|
142
142
|
if (cd === REMOVE)
|
|
143
|
-
|
|
143
|
+
node2.contents = null;
|
|
144
144
|
} else
|
|
145
|
-
await visitAsync_(null,
|
|
145
|
+
await visitAsync_(null, node2, visitor_, Object.freeze([]));
|
|
146
146
|
}
|
|
147
147
|
visitAsync.BREAK = BREAK;
|
|
148
148
|
visitAsync.SKIP = SKIP;
|
|
149
149
|
visitAsync.REMOVE = REMOVE;
|
|
150
|
-
async function visitAsync_(key,
|
|
151
|
-
const ctrl = await callVisitor(key,
|
|
150
|
+
async function visitAsync_(key, node2, visitor, path2) {
|
|
151
|
+
const ctrl = await callVisitor(key, node2, visitor, path2);
|
|
152
152
|
if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
|
|
153
153
|
replaceNode(key, path2, ctrl);
|
|
154
154
|
return visitAsync_(key, ctrl, visitor, path2);
|
|
155
155
|
}
|
|
156
156
|
if (typeof ctrl !== "symbol") {
|
|
157
|
-
if (identity.isCollection(
|
|
158
|
-
path2 = Object.freeze(path2.concat(
|
|
159
|
-
for (let i = 0;i <
|
|
160
|
-
const ci = await visitAsync_(i,
|
|
157
|
+
if (identity.isCollection(node2)) {
|
|
158
|
+
path2 = Object.freeze(path2.concat(node2));
|
|
159
|
+
for (let i = 0;i < node2.items.length; ++i) {
|
|
160
|
+
const ci = await visitAsync_(i, node2.items[i], visitor, path2);
|
|
161
161
|
if (typeof ci === "number")
|
|
162
162
|
i = ci - 1;
|
|
163
163
|
else if (ci === BREAK)
|
|
164
164
|
return BREAK;
|
|
165
165
|
else if (ci === REMOVE) {
|
|
166
|
-
|
|
166
|
+
node2.items.splice(i, 1);
|
|
167
167
|
i -= 1;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
} else if (identity.isPair(
|
|
171
|
-
path2 = Object.freeze(path2.concat(
|
|
172
|
-
const ck = await visitAsync_("key",
|
|
170
|
+
} else if (identity.isPair(node2)) {
|
|
171
|
+
path2 = Object.freeze(path2.concat(node2));
|
|
172
|
+
const ck = await visitAsync_("key", node2.key, visitor, path2);
|
|
173
173
|
if (ck === BREAK)
|
|
174
174
|
return BREAK;
|
|
175
175
|
else if (ck === REMOVE)
|
|
176
|
-
|
|
177
|
-
const cv = await visitAsync_("value",
|
|
176
|
+
node2.key = null;
|
|
177
|
+
const cv = await visitAsync_("value", node2.value, visitor, path2);
|
|
178
178
|
if (cv === BREAK)
|
|
179
179
|
return BREAK;
|
|
180
180
|
else if (cv === REMOVE)
|
|
181
|
-
|
|
181
|
+
node2.value = null;
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
return ctrl;
|
|
@@ -201,32 +201,32 @@ var require_visit = __commonJS((exports) => {
|
|
|
201
201
|
}
|
|
202
202
|
return visitor;
|
|
203
203
|
}
|
|
204
|
-
function callVisitor(key,
|
|
204
|
+
function callVisitor(key, node2, visitor, path2) {
|
|
205
205
|
if (typeof visitor === "function")
|
|
206
|
-
return visitor(key,
|
|
207
|
-
if (identity.isMap(
|
|
208
|
-
return visitor.Map?.(key,
|
|
209
|
-
if (identity.isSeq(
|
|
210
|
-
return visitor.Seq?.(key,
|
|
211
|
-
if (identity.isPair(
|
|
212
|
-
return visitor.Pair?.(key,
|
|
213
|
-
if (identity.isScalar(
|
|
214
|
-
return visitor.Scalar?.(key,
|
|
215
|
-
if (identity.isAlias(
|
|
216
|
-
return visitor.Alias?.(key,
|
|
206
|
+
return visitor(key, node2, path2);
|
|
207
|
+
if (identity.isMap(node2))
|
|
208
|
+
return visitor.Map?.(key, node2, path2);
|
|
209
|
+
if (identity.isSeq(node2))
|
|
210
|
+
return visitor.Seq?.(key, node2, path2);
|
|
211
|
+
if (identity.isPair(node2))
|
|
212
|
+
return visitor.Pair?.(key, node2, path2);
|
|
213
|
+
if (identity.isScalar(node2))
|
|
214
|
+
return visitor.Scalar?.(key, node2, path2);
|
|
215
|
+
if (identity.isAlias(node2))
|
|
216
|
+
return visitor.Alias?.(key, node2, path2);
|
|
217
217
|
return;
|
|
218
218
|
}
|
|
219
|
-
function replaceNode(key, path2,
|
|
219
|
+
function replaceNode(key, path2, node2) {
|
|
220
220
|
const parent = path2[path2.length - 1];
|
|
221
221
|
if (identity.isCollection(parent)) {
|
|
222
|
-
parent.items[key] =
|
|
222
|
+
parent.items[key] = node2;
|
|
223
223
|
} else if (identity.isPair(parent)) {
|
|
224
224
|
if (key === "key")
|
|
225
|
-
parent.key =
|
|
225
|
+
parent.key = node2;
|
|
226
226
|
else
|
|
227
|
-
parent.value =
|
|
227
|
+
parent.value = node2;
|
|
228
228
|
} else if (identity.isDocument(parent)) {
|
|
229
|
-
parent.contents =
|
|
229
|
+
parent.contents = node2;
|
|
230
230
|
} else {
|
|
231
231
|
const pt = identity.isAlias(parent) ? "alias" : "scalar";
|
|
232
232
|
throw new Error(`Cannot replace node with ${pt} parent`);
|
|
@@ -366,9 +366,9 @@ var require_directives = __commonJS((exports) => {
|
|
|
366
366
|
let tagNames;
|
|
367
367
|
if (doc && tagEntries.length > 0 && identity.isNode(doc.contents)) {
|
|
368
368
|
const tags = {};
|
|
369
|
-
visit.visit(doc.contents, (_key,
|
|
370
|
-
if (identity.isNode(
|
|
371
|
-
tags[
|
|
369
|
+
visit.visit(doc.contents, (_key, node2) => {
|
|
370
|
+
if (identity.isNode(node2) && node2.tag)
|
|
371
|
+
tags[node2.tag] = true;
|
|
372
372
|
});
|
|
373
373
|
tagNames = Object.keys(tags);
|
|
374
374
|
} else
|
|
@@ -403,9 +403,9 @@ var require_anchors = __commonJS((exports) => {
|
|
|
403
403
|
function anchorNames(root) {
|
|
404
404
|
const anchors = new Set;
|
|
405
405
|
visit.visit(root, {
|
|
406
|
-
Value(_key,
|
|
407
|
-
if (
|
|
408
|
-
anchors.add(
|
|
406
|
+
Value(_key, node2) {
|
|
407
|
+
if (node2.anchor)
|
|
408
|
+
anchors.add(node2.anchor);
|
|
409
409
|
}
|
|
410
410
|
});
|
|
411
411
|
return anchors;
|
|
@@ -586,20 +586,20 @@ var require_Alias = __commonJS((exports) => {
|
|
|
586
586
|
} else {
|
|
587
587
|
nodes = [];
|
|
588
588
|
visit.visit(doc, {
|
|
589
|
-
Node: (_key,
|
|
590
|
-
if (identity.isAlias(
|
|
591
|
-
nodes.push(
|
|
589
|
+
Node: (_key, node2) => {
|
|
590
|
+
if (identity.isAlias(node2) || identity.hasAnchor(node2))
|
|
591
|
+
nodes.push(node2);
|
|
592
592
|
}
|
|
593
593
|
});
|
|
594
594
|
if (ctx)
|
|
595
595
|
ctx.aliasResolveCache = nodes;
|
|
596
596
|
}
|
|
597
597
|
let found = undefined;
|
|
598
|
-
for (const
|
|
599
|
-
if (
|
|
598
|
+
for (const node2 of nodes) {
|
|
599
|
+
if (node2 === this)
|
|
600
600
|
break;
|
|
601
|
-
if (
|
|
602
|
-
found =
|
|
601
|
+
if (node2.anchor === this.source)
|
|
602
|
+
found = node2;
|
|
603
603
|
}
|
|
604
604
|
return found;
|
|
605
605
|
}
|
|
@@ -646,22 +646,22 @@ var require_Alias = __commonJS((exports) => {
|
|
|
646
646
|
return src;
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
|
-
function getAliasCount(doc,
|
|
650
|
-
if (identity.isAlias(
|
|
651
|
-
const source2 =
|
|
649
|
+
function getAliasCount(doc, node2, anchors2) {
|
|
650
|
+
if (identity.isAlias(node2)) {
|
|
651
|
+
const source2 = node2.resolve(doc);
|
|
652
652
|
const anchor = anchors2 && source2 && anchors2.get(source2);
|
|
653
653
|
return anchor ? anchor.count * anchor.aliasCount : 0;
|
|
654
|
-
} else if (identity.isCollection(
|
|
654
|
+
} else if (identity.isCollection(node2)) {
|
|
655
655
|
let count = 0;
|
|
656
|
-
for (const item of
|
|
656
|
+
for (const item of node2.items) {
|
|
657
657
|
const c = getAliasCount(doc, item, anchors2);
|
|
658
658
|
if (c > count)
|
|
659
659
|
count = c;
|
|
660
660
|
}
|
|
661
661
|
return count;
|
|
662
|
-
} else if (identity.isPair(
|
|
663
|
-
const kc = getAliasCount(doc,
|
|
664
|
-
const vc = getAliasCount(doc,
|
|
662
|
+
} else if (identity.isPair(node2)) {
|
|
663
|
+
const kc = getAliasCount(doc, node2.key, anchors2);
|
|
664
|
+
const vc = getAliasCount(doc, node2.value, anchors2);
|
|
665
665
|
return Math.max(kc, vc);
|
|
666
666
|
}
|
|
667
667
|
return 1;
|
|
@@ -746,10 +746,10 @@ var require_createNode = __commonJS((exports) => {
|
|
|
746
746
|
value = value.toJSON();
|
|
747
747
|
}
|
|
748
748
|
if (!value || typeof value !== "object") {
|
|
749
|
-
const
|
|
749
|
+
const node3 = new Scalar.Scalar(value);
|
|
750
750
|
if (ref)
|
|
751
|
-
ref.node =
|
|
752
|
-
return
|
|
751
|
+
ref.node = node3;
|
|
752
|
+
return node3;
|
|
753
753
|
}
|
|
754
754
|
tagObj = value instanceof Map ? schema[identity.MAP] : (Symbol.iterator in Object(value)) ? schema[identity.SEQ] : schema[identity.MAP];
|
|
755
755
|
}
|
|
@@ -757,14 +757,14 @@ var require_createNode = __commonJS((exports) => {
|
|
|
757
757
|
onTagObj(tagObj);
|
|
758
758
|
delete ctx.onTagObj;
|
|
759
759
|
}
|
|
760
|
-
const
|
|
760
|
+
const node2 = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new Scalar.Scalar(value);
|
|
761
761
|
if (tagName)
|
|
762
|
-
|
|
762
|
+
node2.tag = tagName;
|
|
763
763
|
else if (!tagObj.default)
|
|
764
|
-
|
|
764
|
+
node2.tag = tagObj.tag;
|
|
765
765
|
if (ref)
|
|
766
|
-
ref.node =
|
|
767
|
-
return
|
|
766
|
+
ref.node = node2;
|
|
767
|
+
return node2;
|
|
768
768
|
}
|
|
769
769
|
exports.createNode = createNode;
|
|
770
770
|
});
|
|
@@ -822,10 +822,10 @@ var require_Collection = __commonJS((exports) => {
|
|
|
822
822
|
this.add(value);
|
|
823
823
|
else {
|
|
824
824
|
const [key, ...rest] = path2;
|
|
825
|
-
const
|
|
826
|
-
if (identity.isCollection(
|
|
827
|
-
|
|
828
|
-
else if (
|
|
825
|
+
const node2 = this.get(key, true);
|
|
826
|
+
if (identity.isCollection(node2))
|
|
827
|
+
node2.addIn(rest, value);
|
|
828
|
+
else if (node2 === undefined && this.schema)
|
|
829
829
|
this.set(key, collectionFromPath(this.schema, rest, value));
|
|
830
830
|
else
|
|
831
831
|
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
@@ -835,25 +835,25 @@ var require_Collection = __commonJS((exports) => {
|
|
|
835
835
|
const [key, ...rest] = path2;
|
|
836
836
|
if (rest.length === 0)
|
|
837
837
|
return this.delete(key);
|
|
838
|
-
const
|
|
839
|
-
if (identity.isCollection(
|
|
840
|
-
return
|
|
838
|
+
const node2 = this.get(key, true);
|
|
839
|
+
if (identity.isCollection(node2))
|
|
840
|
+
return node2.deleteIn(rest);
|
|
841
841
|
else
|
|
842
842
|
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
843
843
|
}
|
|
844
844
|
getIn(path2, keepScalar) {
|
|
845
845
|
const [key, ...rest] = path2;
|
|
846
|
-
const
|
|
846
|
+
const node2 = this.get(key, true);
|
|
847
847
|
if (rest.length === 0)
|
|
848
|
-
return !keepScalar && identity.isScalar(
|
|
848
|
+
return !keepScalar && identity.isScalar(node2) ? node2.value : node2;
|
|
849
849
|
else
|
|
850
|
-
return identity.isCollection(
|
|
850
|
+
return identity.isCollection(node2) ? node2.getIn(rest, keepScalar) : undefined;
|
|
851
851
|
}
|
|
852
852
|
hasAllNullValues(allowScalar) {
|
|
853
|
-
return this.items.every((
|
|
854
|
-
if (!identity.isPair(
|
|
853
|
+
return this.items.every((node2) => {
|
|
854
|
+
if (!identity.isPair(node2))
|
|
855
855
|
return false;
|
|
856
|
-
const n =
|
|
856
|
+
const n = node2.value;
|
|
857
857
|
return n == null || allowScalar && identity.isScalar(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
|
|
858
858
|
});
|
|
859
859
|
}
|
|
@@ -861,18 +861,18 @@ var require_Collection = __commonJS((exports) => {
|
|
|
861
861
|
const [key, ...rest] = path2;
|
|
862
862
|
if (rest.length === 0)
|
|
863
863
|
return this.has(key);
|
|
864
|
-
const
|
|
865
|
-
return identity.isCollection(
|
|
864
|
+
const node2 = this.get(key, true);
|
|
865
|
+
return identity.isCollection(node2) ? node2.hasIn(rest) : false;
|
|
866
866
|
}
|
|
867
867
|
setIn(path2, value) {
|
|
868
868
|
const [key, ...rest] = path2;
|
|
869
869
|
if (rest.length === 0) {
|
|
870
870
|
this.set(key, value);
|
|
871
871
|
} else {
|
|
872
|
-
const
|
|
873
|
-
if (identity.isCollection(
|
|
874
|
-
|
|
875
|
-
else if (
|
|
872
|
+
const node2 = this.get(key, true);
|
|
873
|
+
if (identity.isCollection(node2))
|
|
874
|
+
node2.setIn(rest, value);
|
|
875
|
+
else if (node2 === undefined && this.schema)
|
|
876
876
|
this.set(key, collectionFromPath(this.schema, rest, value));
|
|
877
877
|
else
|
|
878
878
|
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
@@ -1410,16 +1410,16 @@ var require_stringify = __commonJS((exports) => {
|
|
|
1410
1410
|
}
|
|
1411
1411
|
return tagObj;
|
|
1412
1412
|
}
|
|
1413
|
-
function stringifyProps(
|
|
1413
|
+
function stringifyProps(node2, tagObj, { anchors: anchors$1, doc }) {
|
|
1414
1414
|
if (!doc.directives)
|
|
1415
1415
|
return "";
|
|
1416
1416
|
const props = [];
|
|
1417
|
-
const anchor = (identity.isScalar(
|
|
1417
|
+
const anchor = (identity.isScalar(node2) || identity.isCollection(node2)) && node2.anchor;
|
|
1418
1418
|
if (anchor && anchors.anchorIsValid(anchor)) {
|
|
1419
1419
|
anchors$1.add(anchor);
|
|
1420
1420
|
props.push(`&${anchor}`);
|
|
1421
1421
|
}
|
|
1422
|
-
const tag =
|
|
1422
|
+
const tag = node2.tag ?? (tagObj.default ? null : tagObj.tag);
|
|
1423
1423
|
if (tag)
|
|
1424
1424
|
props.push(doc.directives.tagString(tag));
|
|
1425
1425
|
return props.join(" ");
|
|
@@ -1441,15 +1441,15 @@ var require_stringify = __commonJS((exports) => {
|
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
1443
1443
|
let tagObj = undefined;
|
|
1444
|
-
const
|
|
1445
|
-
tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags,
|
|
1446
|
-
const props = stringifyProps(
|
|
1444
|
+
const node2 = identity.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
|
|
1445
|
+
tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node2));
|
|
1446
|
+
const props = stringifyProps(node2, tagObj, ctx);
|
|
1447
1447
|
if (props.length > 0)
|
|
1448
1448
|
ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
|
|
1449
|
-
const str = typeof tagObj.stringify === "function" ? tagObj.stringify(
|
|
1449
|
+
const str = typeof tagObj.stringify === "function" ? tagObj.stringify(node2, ctx, onComment, onChompKeep) : identity.isScalar(node2) ? stringifyString.stringifyString(node2, ctx, onComment, onChompKeep) : node2.toString(ctx, onComment, onChompKeep);
|
|
1450
1450
|
if (!props)
|
|
1451
1451
|
return str;
|
|
1452
|
-
return identity.isScalar(
|
|
1452
|
+
return identity.isScalar(node2) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props}
|
|
1453
1453
|
${ctx.indent}${str}`;
|
|
1454
1454
|
}
|
|
1455
1455
|
exports.createStringifyContext = createStringifyContext;
|
|
@@ -1707,8 +1707,8 @@ var require_addPairToJSMap = __commonJS((exports) => {
|
|
|
1707
1707
|
if (identity.isNode(key) && ctx?.doc) {
|
|
1708
1708
|
const strCtx = stringify.createStringifyContext(ctx.doc, {});
|
|
1709
1709
|
strCtx.anchors = new Set;
|
|
1710
|
-
for (const
|
|
1711
|
-
strCtx.anchors.add(
|
|
1710
|
+
for (const node2 of ctx.anchors.keys())
|
|
1711
|
+
strCtx.anchors.add(node2.anchor);
|
|
1712
1712
|
strCtx.inFlow = true;
|
|
1713
1713
|
strCtx.inStringifyKey = true;
|
|
1714
1714
|
const strKey = key.toString(strCtx);
|
|
@@ -1997,8 +1997,8 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
1997
1997
|
}
|
|
1998
1998
|
get(key, keepScalar) {
|
|
1999
1999
|
const it = findPair(this.items, key);
|
|
2000
|
-
const
|
|
2001
|
-
return (!keepScalar && identity.isScalar(
|
|
2000
|
+
const node2 = it?.value;
|
|
2001
|
+
return (!keepScalar && identity.isScalar(node2) ? node2.value : node2) ?? undefined;
|
|
2002
2002
|
}
|
|
2003
2003
|
has(key) {
|
|
2004
2004
|
return !!findPair(this.items, key);
|
|
@@ -2262,9 +2262,9 @@ var require_float = __commonJS((exports) => {
|
|
|
2262
2262
|
format: "EXP",
|
|
2263
2263
|
test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
|
|
2264
2264
|
resolve: (str) => parseFloat(str),
|
|
2265
|
-
stringify(
|
|
2266
|
-
const num = Number(
|
|
2267
|
-
return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(
|
|
2265
|
+
stringify(node2) {
|
|
2266
|
+
const num = Number(node2.value);
|
|
2267
|
+
return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node2);
|
|
2268
2268
|
}
|
|
2269
2269
|
};
|
|
2270
2270
|
var float = {
|
|
@@ -2273,11 +2273,11 @@ var require_float = __commonJS((exports) => {
|
|
|
2273
2273
|
tag: "tag:yaml.org,2002:float",
|
|
2274
2274
|
test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
|
|
2275
2275
|
resolve(str) {
|
|
2276
|
-
const
|
|
2276
|
+
const node2 = new Scalar.Scalar(parseFloat(str));
|
|
2277
2277
|
const dot = str.indexOf(".");
|
|
2278
2278
|
if (dot !== -1 && str[str.length - 1] === "0")
|
|
2279
|
-
|
|
2280
|
-
return
|
|
2279
|
+
node2.minFractionDigits = str.length - dot - 1;
|
|
2280
|
+
return node2;
|
|
2281
2281
|
},
|
|
2282
2282
|
stringify: stringifyNumber.stringifyNumber
|
|
2283
2283
|
};
|
|
@@ -2291,11 +2291,11 @@ var require_int = __commonJS((exports) => {
|
|
|
2291
2291
|
var stringifyNumber = require_stringifyNumber();
|
|
2292
2292
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
2293
2293
|
var intResolve = (str, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix);
|
|
2294
|
-
function intStringify(
|
|
2295
|
-
const { value } =
|
|
2294
|
+
function intStringify(node2, radix, prefix) {
|
|
2295
|
+
const { value } = node2;
|
|
2296
2296
|
if (intIdentify(value) && value >= 0)
|
|
2297
2297
|
return prefix + value.toString(radix);
|
|
2298
|
-
return stringifyNumber.stringifyNumber(
|
|
2298
|
+
return stringifyNumber.stringifyNumber(node2);
|
|
2299
2299
|
}
|
|
2300
2300
|
var intOct = {
|
|
2301
2301
|
identify: (value) => intIdentify(value) && value >= 0,
|
|
@@ -2304,7 +2304,7 @@ var require_int = __commonJS((exports) => {
|
|
|
2304
2304
|
format: "OCT",
|
|
2305
2305
|
test: /^0o[0-7]+$/,
|
|
2306
2306
|
resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt),
|
|
2307
|
-
stringify: (
|
|
2307
|
+
stringify: (node2) => intStringify(node2, 8, "0o")
|
|
2308
2308
|
};
|
|
2309
2309
|
var int = {
|
|
2310
2310
|
identify: intIdentify,
|
|
@@ -2321,7 +2321,7 @@ var require_int = __commonJS((exports) => {
|
|
|
2321
2321
|
format: "HEX",
|
|
2322
2322
|
test: /^0x[0-9a-fA-F]+$/,
|
|
2323
2323
|
resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),
|
|
2324
|
-
stringify: (
|
|
2324
|
+
stringify: (node2) => intStringify(node2, 16, "0x")
|
|
2325
2325
|
};
|
|
2326
2326
|
exports.int = int;
|
|
2327
2327
|
exports.intHex = intHex;
|
|
@@ -2667,9 +2667,9 @@ var require_float2 = __commonJS((exports) => {
|
|
|
2667
2667
|
format: "EXP",
|
|
2668
2668
|
test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,
|
|
2669
2669
|
resolve: (str) => parseFloat(str.replace(/_/g, "")),
|
|
2670
|
-
stringify(
|
|
2671
|
-
const num = Number(
|
|
2672
|
-
return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(
|
|
2670
|
+
stringify(node2) {
|
|
2671
|
+
const num = Number(node2.value);
|
|
2672
|
+
return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node2);
|
|
2673
2673
|
}
|
|
2674
2674
|
};
|
|
2675
2675
|
var float = {
|
|
@@ -2678,14 +2678,14 @@ var require_float2 = __commonJS((exports) => {
|
|
|
2678
2678
|
tag: "tag:yaml.org,2002:float",
|
|
2679
2679
|
test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
|
|
2680
2680
|
resolve(str) {
|
|
2681
|
-
const
|
|
2681
|
+
const node2 = new Scalar.Scalar(parseFloat(str.replace(/_/g, "")));
|
|
2682
2682
|
const dot = str.indexOf(".");
|
|
2683
2683
|
if (dot !== -1) {
|
|
2684
2684
|
const f = str.substring(dot + 1).replace(/_/g, "");
|
|
2685
2685
|
if (f[f.length - 1] === "0")
|
|
2686
|
-
|
|
2686
|
+
node2.minFractionDigits = f.length;
|
|
2687
2687
|
}
|
|
2688
|
-
return
|
|
2688
|
+
return node2;
|
|
2689
2689
|
},
|
|
2690
2690
|
stringify: stringifyNumber.stringifyNumber
|
|
2691
2691
|
};
|
|
@@ -2721,13 +2721,13 @@ var require_int2 = __commonJS((exports) => {
|
|
|
2721
2721
|
const n = parseInt(str, radix);
|
|
2722
2722
|
return sign === "-" ? -1 * n : n;
|
|
2723
2723
|
}
|
|
2724
|
-
function intStringify(
|
|
2725
|
-
const { value } =
|
|
2724
|
+
function intStringify(node2, radix, prefix) {
|
|
2725
|
+
const { value } = node2;
|
|
2726
2726
|
if (intIdentify(value)) {
|
|
2727
2727
|
const str = value.toString(radix);
|
|
2728
2728
|
return value < 0 ? "-" + prefix + str.substr(1) : prefix + str;
|
|
2729
2729
|
}
|
|
2730
|
-
return stringifyNumber.stringifyNumber(
|
|
2730
|
+
return stringifyNumber.stringifyNumber(node2);
|
|
2731
2731
|
}
|
|
2732
2732
|
var intBin = {
|
|
2733
2733
|
identify: intIdentify,
|
|
@@ -2736,7 +2736,7 @@ var require_int2 = __commonJS((exports) => {
|
|
|
2736
2736
|
format: "BIN",
|
|
2737
2737
|
test: /^[-+]?0b[0-1_]+$/,
|
|
2738
2738
|
resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt),
|
|
2739
|
-
stringify: (
|
|
2739
|
+
stringify: (node2) => intStringify(node2, 2, "0b")
|
|
2740
2740
|
};
|
|
2741
2741
|
var intOct = {
|
|
2742
2742
|
identify: intIdentify,
|
|
@@ -2745,7 +2745,7 @@ var require_int2 = __commonJS((exports) => {
|
|
|
2745
2745
|
format: "OCT",
|
|
2746
2746
|
test: /^[-+]?0[0-7_]+$/,
|
|
2747
2747
|
resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt),
|
|
2748
|
-
stringify: (
|
|
2748
|
+
stringify: (node2) => intStringify(node2, 8, "0")
|
|
2749
2749
|
};
|
|
2750
2750
|
var int = {
|
|
2751
2751
|
identify: intIdentify,
|
|
@@ -2762,7 +2762,7 @@ var require_int2 = __commonJS((exports) => {
|
|
|
2762
2762
|
format: "HEX",
|
|
2763
2763
|
test: /^[-+]?0x[0-9a-fA-F_]+$/,
|
|
2764
2764
|
resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),
|
|
2765
|
-
stringify: (
|
|
2765
|
+
stringify: (node2) => intStringify(node2, 16, "0x")
|
|
2766
2766
|
};
|
|
2767
2767
|
exports.int = int;
|
|
2768
2768
|
exports.intBin = intBin;
|
|
@@ -2863,13 +2863,13 @@ var require_timestamp = __commonJS((exports) => {
|
|
|
2863
2863
|
const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
|
|
2864
2864
|
return sign === "-" ? num(-1) * res : res;
|
|
2865
2865
|
}
|
|
2866
|
-
function stringifySexagesimal(
|
|
2867
|
-
let { value } =
|
|
2866
|
+
function stringifySexagesimal(node2) {
|
|
2867
|
+
let { value } = node2;
|
|
2868
2868
|
let num = (n) => n;
|
|
2869
2869
|
if (typeof value === "bigint")
|
|
2870
2870
|
num = (n) => BigInt(n);
|
|
2871
2871
|
else if (isNaN(value) || !isFinite(value))
|
|
2872
|
-
return stringifyNumber.stringifyNumber(
|
|
2872
|
+
return stringifyNumber.stringifyNumber(node2);
|
|
2873
2873
|
let sign = "";
|
|
2874
2874
|
if (value < 0) {
|
|
2875
2875
|
sign = "-";
|
|
@@ -3251,12 +3251,12 @@ var require_Document = __commonJS((exports) => {
|
|
|
3251
3251
|
if (assertCollection(this.contents))
|
|
3252
3252
|
this.contents.addIn(path2, value);
|
|
3253
3253
|
}
|
|
3254
|
-
createAlias(
|
|
3255
|
-
if (!
|
|
3254
|
+
createAlias(node2, name) {
|
|
3255
|
+
if (!node2.anchor) {
|
|
3256
3256
|
const prev = anchors.anchorNames(this);
|
|
3257
|
-
|
|
3257
|
+
node2.anchor = !name || prev.has(name) ? anchors.findNewAnchor(name || "a", prev) : name;
|
|
3258
3258
|
}
|
|
3259
|
-
return new Alias.Alias(
|
|
3259
|
+
return new Alias.Alias(node2.anchor);
|
|
3260
3260
|
}
|
|
3261
3261
|
createNode(value, replacer, options) {
|
|
3262
3262
|
let _replacer = undefined;
|
|
@@ -3284,11 +3284,11 @@ var require_Document = __commonJS((exports) => {
|
|
|
3284
3284
|
schema: this.schema,
|
|
3285
3285
|
sourceObjects
|
|
3286
3286
|
};
|
|
3287
|
-
const
|
|
3288
|
-
if (flow && identity.isCollection(
|
|
3289
|
-
|
|
3287
|
+
const node2 = createNode.createNode(value, tag, ctx);
|
|
3288
|
+
if (flow && identity.isCollection(node2))
|
|
3289
|
+
node2.flow = true;
|
|
3290
3290
|
setAnchors();
|
|
3291
|
-
return
|
|
3291
|
+
return node2;
|
|
3292
3292
|
}
|
|
3293
3293
|
createPair(key, value, options = {}) {
|
|
3294
3294
|
const k = this.createNode(key, null, options);
|
|
@@ -3818,11 +3818,11 @@ var require_resolve_block_seq = __commonJS((exports) => {
|
|
|
3818
3818
|
continue;
|
|
3819
3819
|
}
|
|
3820
3820
|
}
|
|
3821
|
-
const
|
|
3821
|
+
const node2 = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, start, null, props, onError);
|
|
3822
3822
|
if (ctx.schema.compat)
|
|
3823
3823
|
utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError);
|
|
3824
|
-
offset =
|
|
3825
|
-
seq.items.push(
|
|
3824
|
+
offset = node2.range[2];
|
|
3825
|
+
seq.items.push(node2);
|
|
3826
3826
|
}
|
|
3827
3827
|
seq.range = [bs.offset, offset, commentEnd ?? offset];
|
|
3828
3828
|
return seq;
|
|
@@ -4113,12 +4113,12 @@ var require_compose_collection = __commonJS((exports) => {
|
|
|
4113
4113
|
}
|
|
4114
4114
|
const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);
|
|
4115
4115
|
const res = tag.resolve?.(coll, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options) ?? coll;
|
|
4116
|
-
const
|
|
4117
|
-
|
|
4118
|
-
|
|
4116
|
+
const node2 = identity.isNode(res) ? res : new Scalar.Scalar(res);
|
|
4117
|
+
node2.range = coll.range;
|
|
4118
|
+
node2.tag = tagName;
|
|
4119
4119
|
if (tag?.format)
|
|
4120
|
-
|
|
4121
|
-
return
|
|
4120
|
+
node2.format = tag.format;
|
|
4121
|
+
return node2;
|
|
4122
4122
|
}
|
|
4123
4123
|
exports.composeCollection = composeCollection;
|
|
4124
4124
|
});
|
|
@@ -4649,11 +4649,11 @@ var require_compose_node = __commonJS((exports) => {
|
|
|
4649
4649
|
function composeNode(ctx, token, props, onError) {
|
|
4650
4650
|
const atKey = ctx.atKey;
|
|
4651
4651
|
const { spaceBefore, comment, anchor, tag } = props;
|
|
4652
|
-
let
|
|
4652
|
+
let node2;
|
|
4653
4653
|
let isSrcToken = true;
|
|
4654
4654
|
switch (token.type) {
|
|
4655
4655
|
case "alias":
|
|
4656
|
-
|
|
4656
|
+
node2 = composeAlias(ctx, token, onError);
|
|
4657
4657
|
if (anchor || tag)
|
|
4658
4658
|
onError(token, "ALIAS_PROPS", "An alias node must not specify any properties");
|
|
4659
4659
|
break;
|
|
@@ -4661,41 +4661,41 @@ var require_compose_node = __commonJS((exports) => {
|
|
|
4661
4661
|
case "single-quoted-scalar":
|
|
4662
4662
|
case "double-quoted-scalar":
|
|
4663
4663
|
case "block-scalar":
|
|
4664
|
-
|
|
4664
|
+
node2 = composeScalar.composeScalar(ctx, token, tag, onError);
|
|
4665
4665
|
if (anchor)
|
|
4666
|
-
|
|
4666
|
+
node2.anchor = anchor.source.substring(1);
|
|
4667
4667
|
break;
|
|
4668
4668
|
case "block-map":
|
|
4669
4669
|
case "block-seq":
|
|
4670
4670
|
case "flow-collection":
|
|
4671
|
-
|
|
4671
|
+
node2 = composeCollection.composeCollection(CN, ctx, token, props, onError);
|
|
4672
4672
|
if (anchor)
|
|
4673
|
-
|
|
4673
|
+
node2.anchor = anchor.source.substring(1);
|
|
4674
4674
|
break;
|
|
4675
4675
|
default: {
|
|
4676
4676
|
const message = token.type === "error" ? token.message : `Unsupported token (type: ${token.type})`;
|
|
4677
4677
|
onError(token, "UNEXPECTED_TOKEN", message);
|
|
4678
|
-
|
|
4678
|
+
node2 = composeEmptyNode(ctx, token.offset, undefined, null, props, onError);
|
|
4679
4679
|
isSrcToken = false;
|
|
4680
4680
|
}
|
|
4681
4681
|
}
|
|
4682
|
-
if (anchor &&
|
|
4682
|
+
if (anchor && node2.anchor === "")
|
|
4683
4683
|
onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
|
|
4684
|
-
if (atKey && ctx.options.stringKeys && (!identity.isScalar(
|
|
4684
|
+
if (atKey && ctx.options.stringKeys && (!identity.isScalar(node2) || typeof node2.value !== "string" || node2.tag && node2.tag !== "tag:yaml.org,2002:str")) {
|
|
4685
4685
|
const msg = "With stringKeys, all keys must be strings";
|
|
4686
4686
|
onError(tag ?? token, "NON_STRING_KEY", msg);
|
|
4687
4687
|
}
|
|
4688
4688
|
if (spaceBefore)
|
|
4689
|
-
|
|
4689
|
+
node2.spaceBefore = true;
|
|
4690
4690
|
if (comment) {
|
|
4691
4691
|
if (token.type === "scalar" && token.source === "")
|
|
4692
|
-
|
|
4692
|
+
node2.comment = comment;
|
|
4693
4693
|
else
|
|
4694
|
-
|
|
4694
|
+
node2.commentBefore = comment;
|
|
4695
4695
|
}
|
|
4696
4696
|
if (ctx.options.keepSourceTokens && isSrcToken)
|
|
4697
|
-
|
|
4698
|
-
return
|
|
4697
|
+
node2.srcToken = token;
|
|
4698
|
+
return node2;
|
|
4699
4699
|
}
|
|
4700
4700
|
function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {
|
|
4701
4701
|
const token = {
|
|
@@ -4704,19 +4704,19 @@ var require_compose_node = __commonJS((exports) => {
|
|
|
4704
4704
|
indent: -1,
|
|
4705
4705
|
source: ""
|
|
4706
4706
|
};
|
|
4707
|
-
const
|
|
4707
|
+
const node2 = composeScalar.composeScalar(ctx, token, tag, onError);
|
|
4708
4708
|
if (anchor) {
|
|
4709
|
-
|
|
4710
|
-
if (
|
|
4709
|
+
node2.anchor = anchor.source.substring(1);
|
|
4710
|
+
if (node2.anchor === "")
|
|
4711
4711
|
onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
|
|
4712
4712
|
}
|
|
4713
4713
|
if (spaceBefore)
|
|
4714
|
-
|
|
4714
|
+
node2.spaceBefore = true;
|
|
4715
4715
|
if (comment) {
|
|
4716
|
-
|
|
4717
|
-
|
|
4716
|
+
node2.comment = comment;
|
|
4717
|
+
node2.range[2] = end;
|
|
4718
4718
|
}
|
|
4719
|
-
return
|
|
4719
|
+
return node2;
|
|
4720
4720
|
}
|
|
4721
4721
|
function composeAlias({ options }, { offset, source: source2, end }, onError) {
|
|
4722
4722
|
const alias = new Alias.Alias(source2.substring(1));
|
|
@@ -7413,7 +7413,7 @@ var require_scan = __commonJS((exports, module) => {
|
|
|
7413
7413
|
isExtglob = false;
|
|
7414
7414
|
isGlob = false;
|
|
7415
7415
|
}
|
|
7416
|
-
let
|
|
7416
|
+
let base = str;
|
|
7417
7417
|
let prefix = "";
|
|
7418
7418
|
let glob = "";
|
|
7419
7419
|
if (start > 0) {
|
|
@@ -7421,32 +7421,32 @@ var require_scan = __commonJS((exports, module) => {
|
|
|
7421
7421
|
str = str.slice(start);
|
|
7422
7422
|
lastIndex -= start;
|
|
7423
7423
|
}
|
|
7424
|
-
if (
|
|
7425
|
-
|
|
7424
|
+
if (base && isGlob === true && lastIndex > 0) {
|
|
7425
|
+
base = str.slice(0, lastIndex);
|
|
7426
7426
|
glob = str.slice(lastIndex);
|
|
7427
7427
|
} else if (isGlob === true) {
|
|
7428
|
-
|
|
7428
|
+
base = "";
|
|
7429
7429
|
glob = str;
|
|
7430
7430
|
} else {
|
|
7431
|
-
|
|
7431
|
+
base = str;
|
|
7432
7432
|
}
|
|
7433
|
-
if (
|
|
7434
|
-
if (isPathSeparator(
|
|
7435
|
-
|
|
7433
|
+
if (base && base !== "" && base !== "/" && base !== str) {
|
|
7434
|
+
if (isPathSeparator(base.charCodeAt(base.length - 1))) {
|
|
7435
|
+
base = base.slice(0, -1);
|
|
7436
7436
|
}
|
|
7437
7437
|
}
|
|
7438
7438
|
if (opts.unescape === true) {
|
|
7439
7439
|
if (glob)
|
|
7440
7440
|
glob = utils.removeBackslashes(glob);
|
|
7441
|
-
if (
|
|
7442
|
-
|
|
7441
|
+
if (base && backslashes === true) {
|
|
7442
|
+
base = utils.removeBackslashes(base);
|
|
7443
7443
|
}
|
|
7444
7444
|
}
|
|
7445
7445
|
const state = {
|
|
7446
7446
|
prefix,
|
|
7447
7447
|
input,
|
|
7448
7448
|
start,
|
|
7449
|
-
base
|
|
7449
|
+
base,
|
|
7450
7450
|
glob,
|
|
7451
7451
|
isBrace,
|
|
7452
7452
|
isBracket,
|
|
@@ -8657,118 +8657,123 @@ var require_picomatch2 = __commonJS((exports, module) => {
|
|
|
8657
8657
|
module.exports = picomatch;
|
|
8658
8658
|
});
|
|
8659
8659
|
|
|
8660
|
-
// src/types/
|
|
8661
|
-
var
|
|
8662
|
-
((
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
})(
|
|
8673
|
-
var
|
|
8674
|
-
((
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
})(
|
|
8708
|
-
|
|
8709
|
-
|
|
8710
|
-
|
|
8711
|
-
|
|
8712
|
-
|
|
8713
|
-
|
|
8714
|
-
|
|
8715
|
-
|
|
8716
|
-
|
|
8717
|
-
|
|
8718
|
-
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
8733
|
-
|
|
8734
|
-
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
];
|
|
8660
|
+
// src/types/node.ts
|
|
8661
|
+
var NodeType;
|
|
8662
|
+
((NodeType2) => {
|
|
8663
|
+
NodeType2["Product"] = "product";
|
|
8664
|
+
NodeType2["Package"] = "package";
|
|
8665
|
+
NodeType2["Symbol"] = "symbol";
|
|
8666
|
+
})(NodeType ||= {});
|
|
8667
|
+
var ProductKind;
|
|
8668
|
+
((ProductKind2) => {
|
|
8669
|
+
ProductKind2["Domain"] = "domain";
|
|
8670
|
+
ProductKind2["Application"] = "application";
|
|
8671
|
+
ProductKind2["Story"] = "story";
|
|
8672
|
+
})(ProductKind ||= {});
|
|
8673
|
+
var PackageKind;
|
|
8674
|
+
((PackageKind2) => {
|
|
8675
|
+
PackageKind2["App"] = "app";
|
|
8676
|
+
PackageKind2["Service"] = "service";
|
|
8677
|
+
PackageKind2["Lib"] = "lib";
|
|
8678
|
+
PackageKind2["Cli"] = "cli";
|
|
8679
|
+
})(PackageKind ||= {});
|
|
8680
|
+
var SymbolKind;
|
|
8681
|
+
((SymbolKind2) => {
|
|
8682
|
+
SymbolKind2["Function"] = "function";
|
|
8683
|
+
SymbolKind2["Class"] = "class";
|
|
8684
|
+
SymbolKind2["Interface"] = "interface";
|
|
8685
|
+
SymbolKind2["Variable"] = "variable";
|
|
8686
|
+
SymbolKind2["Type"] = "type";
|
|
8687
|
+
SymbolKind2["Enum"] = "enum";
|
|
8688
|
+
SymbolKind2["Component"] = "component";
|
|
8689
|
+
SymbolKind2["Prop"] = "prop";
|
|
8690
|
+
SymbolKind2["Method"] = "method";
|
|
8691
|
+
SymbolKind2["Endpoint"] = "endpoint";
|
|
8692
|
+
SymbolKind2["Config"] = "config";
|
|
8693
|
+
SymbolKind2["Hook"] = "hook";
|
|
8694
|
+
SymbolKind2["Process"] = "process";
|
|
8695
|
+
})(SymbolKind ||= {});
|
|
8696
|
+
var Grounding;
|
|
8697
|
+
((Grounding2) => {
|
|
8698
|
+
Grounding2["Code"] = "code";
|
|
8699
|
+
Grounding2["Concept"] = "concept";
|
|
8700
|
+
})(Grounding ||= {});
|
|
8701
|
+
var Visibility;
|
|
8702
|
+
((Visibility2) => {
|
|
8703
|
+
Visibility2["Exported"] = "exported";
|
|
8704
|
+
Visibility2["Public"] = "public";
|
|
8705
|
+
Visibility2["Protected"] = "protected";
|
|
8706
|
+
Visibility2["Internal"] = "internal";
|
|
8707
|
+
})(Visibility ||= {});
|
|
8708
|
+
// src/types/edge.ts
|
|
8709
|
+
var EdgeType;
|
|
8710
|
+
((EdgeType2) => {
|
|
8711
|
+
EdgeType2["Contains"] = "contains";
|
|
8712
|
+
EdgeType2["Imports"] = "imports";
|
|
8713
|
+
EdgeType2["ImportsType"] = "imports_type";
|
|
8714
|
+
EdgeType2["Calls"] = "calls";
|
|
8715
|
+
EdgeType2["Extends"] = "extends";
|
|
8716
|
+
EdgeType2["Implements"] = "implements";
|
|
8717
|
+
EdgeType2["ParamType"] = "param_type";
|
|
8718
|
+
EdgeType2["ReturnType"] = "return_type";
|
|
8719
|
+
EdgeType2["OfType"] = "of_type";
|
|
8720
|
+
EdgeType2["DependsOn"] = "depends_on";
|
|
8721
|
+
EdgeType2["RelatedTo"] = "related_to";
|
|
8722
|
+
EdgeType2["Corresponds"] = "corresponds";
|
|
8723
|
+
EdgeType2["Refines"] = "refines";
|
|
8724
|
+
EdgeType2["AnchoredTo"] = "anchored_to";
|
|
8725
|
+
EdgeType2["Supersedes"] = "supersedes";
|
|
8726
|
+
EdgeType2["Conflicts"] = "conflicts";
|
|
8727
|
+
EdgeType2["References"] = "references";
|
|
8728
|
+
})(EdgeType ||= {});
|
|
8729
|
+
var EdgeSource;
|
|
8730
|
+
((EdgeSource2) => {
|
|
8731
|
+
EdgeSource2["Ast"] = "ast";
|
|
8732
|
+
EdgeSource2["Doc"] = "doc";
|
|
8733
|
+
EdgeSource2["Manual"] = "manual";
|
|
8734
|
+
})(EdgeSource ||= {});
|
|
8735
|
+
// src/types/fact.ts
|
|
8736
|
+
var FactKind;
|
|
8737
|
+
((FactKind2) => {
|
|
8738
|
+
FactKind2["Description"] = "description";
|
|
8739
|
+
FactKind2["Spec"] = "spec";
|
|
8740
|
+
FactKind2["Warning"] = "warning";
|
|
8741
|
+
FactKind2["Principle"] = "principle";
|
|
8742
|
+
FactKind2["Decision"] = "decision";
|
|
8743
|
+
FactKind2["Incident"] = "incident";
|
|
8744
|
+
FactKind2["Guide"] = "guide";
|
|
8745
|
+
FactKind2["Example"] = "example";
|
|
8746
|
+
FactKind2["Changelog"] = "changelog";
|
|
8747
|
+
})(FactKind ||= {});
|
|
8748
|
+
var FactSourceType;
|
|
8749
|
+
((FactSourceType2) => {
|
|
8750
|
+
FactSourceType2["Code"] = "code";
|
|
8751
|
+
FactSourceType2["Doc"] = "doc";
|
|
8752
|
+
FactSourceType2["Oncall"] = "oncall";
|
|
8753
|
+
FactSourceType2["Meeting"] = "meeting";
|
|
8754
|
+
FactSourceType2["Manual"] = "manual";
|
|
8755
|
+
})(FactSourceType ||= {});
|
|
8756
|
+
var FactStatus;
|
|
8757
|
+
((FactStatus2) => {
|
|
8758
|
+
FactStatus2["Proposed"] = "proposed";
|
|
8759
|
+
FactStatus2["Active"] = "active";
|
|
8760
|
+
FactStatus2["Deprecated"] = "deprecated";
|
|
8761
|
+
})(FactStatus ||= {});
|
|
8762
|
+
var FactConfidence;
|
|
8763
|
+
((FactConfidence2) => {
|
|
8764
|
+
FactConfidence2["Verified"] = "verified";
|
|
8765
|
+
FactConfidence2["Confirmed"] = "confirmed";
|
|
8766
|
+
FactConfidence2["Inferred"] = "inferred";
|
|
8767
|
+
FactConfidence2["Speculative"] = "speculative";
|
|
8768
|
+
})(FactConfidence ||= {});
|
|
8769
|
+
var FactRelation;
|
|
8770
|
+
((FactRelation2) => {
|
|
8771
|
+
FactRelation2["Implements"] = "implements";
|
|
8772
|
+
FactRelation2["Refines"] = "refines";
|
|
8773
|
+
FactRelation2["Conflicts"] = "conflicts";
|
|
8774
|
+
FactRelation2["Supersedes"] = "supersedes";
|
|
8775
|
+
FactRelation2["References"] = "references";
|
|
8776
|
+
})(FactRelation ||= {});
|
|
8772
8777
|
// src/types/refPointer.ts
|
|
8773
8778
|
var REF_POINTER_PATTERN = /^ref:(entity|relation|content):(.+)$/;
|
|
8774
8779
|
function parseRef(pointer) {
|
|
@@ -8961,7 +8966,8 @@ var CODE_PACKAGE_FILES = new Set([
|
|
|
8961
8966
|
"go.mod",
|
|
8962
8967
|
"cargo.toml",
|
|
8963
8968
|
"pom.xml",
|
|
8964
|
-
"build.gradle"
|
|
8969
|
+
"build.gradle",
|
|
8970
|
+
"build.gradle.kts"
|
|
8965
8971
|
]);
|
|
8966
8972
|
var NPM_NAME_RE = /^(@[a-z0-9\-~][a-z0-9\-._~]*\/)?[a-z0-9\-~][a-z0-9\-._~]*$/;
|
|
8967
8973
|
var PYPI_NAME_RE = /^[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?$/;
|
|
@@ -12990,44 +12996,11 @@ var coerce = {
|
|
|
12990
12996
|
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
12991
12997
|
};
|
|
12992
12998
|
var NEVER = INVALID;
|
|
12993
|
-
// src/
|
|
12994
|
-
var entityTypeSchema = exports_external.enum(Object.values(EntityType));
|
|
12995
|
-
var relationTypeSchema = exports_external.enum(Object.values(RelationType));
|
|
12996
|
-
var atomFieldSchema = exports_external.enum(Object.values(AtomField));
|
|
12997
|
-
var kindSchema = exports_external.enum(Object.values(Kind));
|
|
12998
|
-
var scopeSchema = exports_external.literal("project");
|
|
12999
|
-
var perspectiveSchema = exports_external.enum(Object.values(Perspective));
|
|
13000
|
-
var extractionConfidenceSchema = exports_external.object({
|
|
13001
|
-
structural: exports_external.number().min(0).max(1),
|
|
13002
|
-
semantic: exports_external.number().min(0).max(1)
|
|
13003
|
-
});
|
|
13004
|
-
var metadataSchema = exports_external.object({
|
|
13005
|
-
created_at: exports_external.string().datetime(),
|
|
13006
|
-
updated_at: exports_external.string().datetime(),
|
|
13007
|
-
version_tag: exports_external.string().optional(),
|
|
13008
|
-
extraction_confidence: extractionConfidenceSchema.optional(),
|
|
13009
|
-
confidence: exports_external.number().min(0).max(1).optional(),
|
|
13010
|
-
aliases: exports_external.array(exports_external.string()).optional(),
|
|
13011
|
-
rank: exports_external.number().optional(),
|
|
13012
|
-
community_id: exports_external.string().optional(),
|
|
13013
|
-
community_level: exports_external.number().optional()
|
|
13014
|
-
});
|
|
13015
|
-
var entityRefPointerSchema = exports_external.string().regex(/^ref:entity:.+$/, "must be a ref pointer in format ref:entity:<id>");
|
|
13016
|
-
var sourceRefSpanSchema = exports_external.object({
|
|
13017
|
-
start: exports_external.number().int().min(1),
|
|
13018
|
-
end: exports_external.number().int().min(1)
|
|
13019
|
-
});
|
|
13020
|
-
var sourceRefSchema = exports_external.object({
|
|
13021
|
-
ref: exports_external.string(),
|
|
13022
|
-
span: sourceRefSpanSchema.optional()
|
|
13023
|
-
});
|
|
13024
|
-
var sourceRefsSchema = exports_external.array(sourceRefSchema).optional();
|
|
13025
|
-
|
|
13026
|
-
// src/schemas/atomsSchema.ts
|
|
12999
|
+
// src/types/docDigest.ts
|
|
13027
13000
|
var confidenceAtomSchema = exports_external.number().min(0).max(1).optional().catch(undefined);
|
|
13028
13001
|
var entityAtomSchema = exports_external.object({
|
|
13029
13002
|
name: exports_external.string(),
|
|
13030
|
-
kind:
|
|
13003
|
+
kind: exports_external.string().optional().catch(undefined),
|
|
13031
13004
|
ref: exports_external.string().optional(),
|
|
13032
13005
|
confidence: confidenceAtomSchema
|
|
13033
13006
|
});
|
|
@@ -13140,201 +13113,6 @@ var comparisonAtomSchema = exports_external.object({
|
|
|
13140
13113
|
decision_ref: exports_external.string().optional(),
|
|
13141
13114
|
confidence: confidenceAtomSchema
|
|
13142
13115
|
});
|
|
13143
|
-
var claimAtomSchema = exports_external.object({
|
|
13144
|
-
claim_type: exports_external.string(),
|
|
13145
|
-
description: exports_external.string(),
|
|
13146
|
-
status: exports_external.enum(["active", "deprecated", "proposed"]),
|
|
13147
|
-
valid_from: exports_external.string(),
|
|
13148
|
-
valid_until: exports_external.string().optional(),
|
|
13149
|
-
session_ref: exports_external.string().optional(),
|
|
13150
|
-
changed_by: exports_external.string(),
|
|
13151
|
-
confidence: confidenceAtomSchema
|
|
13152
|
-
});
|
|
13153
|
-
var dataAtomsSchema = exports_external.object({
|
|
13154
|
-
entities: exports_external.array(entityAtomSchema).optional(),
|
|
13155
|
-
relations: exports_external.array(relationAtomSchema).optional(),
|
|
13156
|
-
behaviors: exports_external.array(behaviorAtomSchema).optional(),
|
|
13157
|
-
attributes: exports_external.array(attributeAtomSchema).optional(),
|
|
13158
|
-
states: exports_external.array(stateAtomSchema).optional(),
|
|
13159
|
-
rules: exports_external.array(ruleAtomSchema).optional(),
|
|
13160
|
-
transitions: exports_external.array(transitionAtomSchema).optional(),
|
|
13161
|
-
events: exports_external.array(eventAtomSchema).optional(),
|
|
13162
|
-
decisions: exports_external.array(decisionAtomSchema).optional(),
|
|
13163
|
-
metrics: exports_external.array(metricAtomSchema).optional(),
|
|
13164
|
-
roles: exports_external.array(roleAtomSchema).optional(),
|
|
13165
|
-
constraints: exports_external.array(constraintAtomSchema).optional(),
|
|
13166
|
-
comparisons: exports_external.array(comparisonAtomSchema).optional(),
|
|
13167
|
-
boundaries: exports_external.array(boundaryAtomSchema).optional(),
|
|
13168
|
-
claims: exports_external.array(claimAtomSchema).optional()
|
|
13169
|
-
}).superRefine((atoms, ctx) => {
|
|
13170
|
-
const stateValues = new Set;
|
|
13171
|
-
const stateNames = new Set;
|
|
13172
|
-
for (const state of atoms.states ?? []) {
|
|
13173
|
-
stateNames.add(state.name);
|
|
13174
|
-
for (const value of state.values) {
|
|
13175
|
-
stateValues.add(value);
|
|
13176
|
-
}
|
|
13177
|
-
}
|
|
13178
|
-
const behaviorNames = new Set;
|
|
13179
|
-
for (const behavior of atoms.behaviors ?? []) {
|
|
13180
|
-
behaviorNames.add(behavior.name);
|
|
13181
|
-
}
|
|
13182
|
-
const roleNames = new Set;
|
|
13183
|
-
for (const role of atoms.roles ?? []) {
|
|
13184
|
-
roleNames.add(role.name);
|
|
13185
|
-
}
|
|
13186
|
-
const eventNames = new Set;
|
|
13187
|
-
for (const event of atoms.events ?? []) {
|
|
13188
|
-
eventNames.add(event.name);
|
|
13189
|
-
}
|
|
13190
|
-
const metricNames = new Set;
|
|
13191
|
-
for (const metric of atoms.metrics ?? []) {
|
|
13192
|
-
metricNames.add(metric.name);
|
|
13193
|
-
}
|
|
13194
|
-
if (atoms.transitions && atoms.transitions.length > 0) {
|
|
13195
|
-
for (const transition of atoms.transitions) {
|
|
13196
|
-
if (!stateValues.has(transition.from)) {
|
|
13197
|
-
ctx.addIssue({
|
|
13198
|
-
code: exports_external.ZodIssueCode.custom,
|
|
13199
|
-
path: ["transitions"],
|
|
13200
|
-
message: `transition.from references unknown state: ${transition.from}`
|
|
13201
|
-
});
|
|
13202
|
-
}
|
|
13203
|
-
if (!stateValues.has(transition.to)) {
|
|
13204
|
-
ctx.addIssue({
|
|
13205
|
-
code: exports_external.ZodIssueCode.custom,
|
|
13206
|
-
path: ["transitions"],
|
|
13207
|
-
message: `transition.to references unknown state: ${transition.to}`
|
|
13208
|
-
});
|
|
13209
|
-
}
|
|
13210
|
-
const hasEvents = eventNames.size > 0;
|
|
13211
|
-
const hasBehaviors = behaviorNames.size > 0;
|
|
13212
|
-
if (hasEvents || hasBehaviors) {
|
|
13213
|
-
const triggerMatchesEvent = hasEvents && eventNames.has(transition.trigger);
|
|
13214
|
-
const triggerMatchesBehavior = hasBehaviors && behaviorNames.has(transition.trigger);
|
|
13215
|
-
if (!triggerMatchesEvent && !triggerMatchesBehavior) {
|
|
13216
|
-
ctx.addIssue({
|
|
13217
|
-
code: exports_external.ZodIssueCode.custom,
|
|
13218
|
-
path: ["transitions"],
|
|
13219
|
-
message: `transition.trigger references unknown event/behavior: ${transition.trigger}`
|
|
13220
|
-
});
|
|
13221
|
-
}
|
|
13222
|
-
}
|
|
13223
|
-
}
|
|
13224
|
-
}
|
|
13225
|
-
if (atoms.roles && atoms.roles.length > 0) {
|
|
13226
|
-
for (const [index, role] of atoms.roles.entries()) {
|
|
13227
|
-
for (const perform of role.performs ?? []) {
|
|
13228
|
-
if (!behaviorNames.has(perform)) {
|
|
13229
|
-
ctx.addIssue({
|
|
13230
|
-
code: exports_external.ZodIssueCode.custom,
|
|
13231
|
-
path: ["roles", index, "performs"],
|
|
13232
|
-
message: `role.performs references unknown behavior: ${perform}`
|
|
13233
|
-
});
|
|
13234
|
-
}
|
|
13235
|
-
}
|
|
13236
|
-
}
|
|
13237
|
-
}
|
|
13238
|
-
if (atoms.behaviors && atoms.behaviors.length > 0) {
|
|
13239
|
-
for (const [index, behavior] of atoms.behaviors.entries()) {
|
|
13240
|
-
for (const performer of behavior.performed_by ?? []) {
|
|
13241
|
-
if (!roleNames.has(performer)) {
|
|
13242
|
-
ctx.addIssue({
|
|
13243
|
-
code: exports_external.ZodIssueCode.custom,
|
|
13244
|
-
path: ["behaviors", index, "performed_by"],
|
|
13245
|
-
message: `behavior.performed_by references unknown role: ${performer}`
|
|
13246
|
-
});
|
|
13247
|
-
}
|
|
13248
|
-
}
|
|
13249
|
-
}
|
|
13250
|
-
}
|
|
13251
|
-
if (atoms.rules && atoms.rules.length > 0) {
|
|
13252
|
-
const allowedDependsOn = new Set([...stateNames, ...metricNames]);
|
|
13253
|
-
for (const [index, rule] of atoms.rules.entries()) {
|
|
13254
|
-
for (const dependency of rule.depends_on ?? []) {
|
|
13255
|
-
if (!allowedDependsOn.has(dependency)) {
|
|
13256
|
-
ctx.addIssue({
|
|
13257
|
-
code: exports_external.ZodIssueCode.custom,
|
|
13258
|
-
path: ["rules", index, "depends_on"],
|
|
13259
|
-
message: `rule.depends_on references unknown state/metric: ${dependency}`
|
|
13260
|
-
});
|
|
13261
|
-
}
|
|
13262
|
-
}
|
|
13263
|
-
}
|
|
13264
|
-
}
|
|
13265
|
-
if (atoms.events && atoms.events.length > 0) {
|
|
13266
|
-
for (const [index, event] of atoms.events.entries()) {
|
|
13267
|
-
for (const behaviorName of event.trigger_for ?? []) {
|
|
13268
|
-
if (!behaviorNames.has(behaviorName)) {
|
|
13269
|
-
ctx.addIssue({
|
|
13270
|
-
code: exports_external.ZodIssueCode.custom,
|
|
13271
|
-
path: ["events", index, "trigger_for"],
|
|
13272
|
-
message: `event.trigger_for references unknown behavior: ${behaviorName}`
|
|
13273
|
-
});
|
|
13274
|
-
}
|
|
13275
|
-
}
|
|
13276
|
-
}
|
|
13277
|
-
}
|
|
13278
|
-
});
|
|
13279
|
-
var atomsWhitelistByEntityType = {
|
|
13280
|
-
["product" /* Product */]: new Set(["comparisons" /* Comparisons */, "boundaries" /* Boundaries */]),
|
|
13281
|
-
["system" /* System */]: new Set,
|
|
13282
|
-
["container" /* Container */]: new Set,
|
|
13283
|
-
["component" /* Component */]: new Set([
|
|
13284
|
-
"entities" /* Entities */,
|
|
13285
|
-
"relations" /* Relations */,
|
|
13286
|
-
"behaviors" /* Behaviors */,
|
|
13287
|
-
"attributes" /* Attributes */,
|
|
13288
|
-
"states" /* States */,
|
|
13289
|
-
"rules" /* Rules */,
|
|
13290
|
-
"transitions" /* Transitions */,
|
|
13291
|
-
"events" /* Events */,
|
|
13292
|
-
"claims" /* Claims */
|
|
13293
|
-
]),
|
|
13294
|
-
["process" /* Process */]: new Set,
|
|
13295
|
-
["sor" /* SoR */]: new Set([
|
|
13296
|
-
"entities" /* Entities */,
|
|
13297
|
-
"relations" /* Relations */,
|
|
13298
|
-
"behaviors" /* Behaviors */,
|
|
13299
|
-
"attributes" /* Attributes */,
|
|
13300
|
-
"states" /* States */,
|
|
13301
|
-
"rules" /* Rules */,
|
|
13302
|
-
"transitions" /* Transitions */,
|
|
13303
|
-
"events" /* Events */,
|
|
13304
|
-
"decisions" /* Decisions */,
|
|
13305
|
-
"metrics" /* Metrics */,
|
|
13306
|
-
"roles" /* Roles */,
|
|
13307
|
-
"constraints" /* Constraints */,
|
|
13308
|
-
"comparisons" /* Comparisons */,
|
|
13309
|
-
"claims" /* Claims */
|
|
13310
|
-
]),
|
|
13311
|
-
["contract" /* Contract */]: new Set,
|
|
13312
|
-
["epic" /* Epic */]: new Set([
|
|
13313
|
-
"decisions" /* Decisions */,
|
|
13314
|
-
"metrics" /* Metrics */,
|
|
13315
|
-
"roles" /* Roles */,
|
|
13316
|
-
"constraints" /* Constraints */,
|
|
13317
|
-
"comparisons" /* Comparisons */,
|
|
13318
|
-
"claims" /* Claims */
|
|
13319
|
-
]),
|
|
13320
|
-
["document" /* Document */]: new Set
|
|
13321
|
-
};
|
|
13322
|
-
var allowedAtomFieldSchema = atomFieldSchema;
|
|
13323
|
-
var validateAtomsWhitelist = (entityType, atoms) => {
|
|
13324
|
-
const allowed = atomsWhitelistByEntityType[entityType] ?? new Set;
|
|
13325
|
-
const illegalFields = [];
|
|
13326
|
-
for (const [key, value] of Object.entries(atoms)) {
|
|
13327
|
-
if (value === undefined) {
|
|
13328
|
-
continue;
|
|
13329
|
-
}
|
|
13330
|
-
if (!allowed.has(key)) {
|
|
13331
|
-
illegalFields.push(key);
|
|
13332
|
-
}
|
|
13333
|
-
}
|
|
13334
|
-
return illegalFields;
|
|
13335
|
-
};
|
|
13336
|
-
|
|
13337
|
-
// src/types/docDigest.ts
|
|
13338
13116
|
var paragraphAtomSchema = exports_external.object({
|
|
13339
13117
|
entities: exports_external.array(entityAtomSchema).optional(),
|
|
13340
13118
|
relations: exports_external.array(relationAtomSchema).optional(),
|
|
@@ -13426,203 +13204,131 @@ function resolvePathFilter(metadata) {
|
|
|
13426
13204
|
return { config: DEFAULT_PATH_FILTER, isDefault: true };
|
|
13427
13205
|
return { config: parsed.data, isDefault: false };
|
|
13428
13206
|
}
|
|
13429
|
-
// src/schemas/
|
|
13430
|
-
var
|
|
13431
|
-
|
|
13432
|
-
|
|
13433
|
-
name: exports_external.string(),
|
|
13434
|
-
kind: kindSchema,
|
|
13435
|
-
scope: scopeSchema,
|
|
13436
|
-
perspective: perspectiveSchema,
|
|
13437
|
-
metadata: metadataSchema,
|
|
13438
|
-
source_refs: sourceRefsSchema
|
|
13439
|
-
});
|
|
13440
|
-
var productDataSchema = exports_external.object({
|
|
13441
|
-
description: exports_external.string().optional(),
|
|
13442
|
-
sub_products: exports_external.array(exports_external.string()).optional(),
|
|
13443
|
-
category: exports_external.string().optional(),
|
|
13444
|
-
atoms: dataAtomsSchema.optional()
|
|
13445
|
-
});
|
|
13446
|
-
var productEntitySchema = baseEntitySchema.extend({
|
|
13447
|
-
type: exports_external.literal("product" /* Product */),
|
|
13448
|
-
data: productDataSchema
|
|
13449
|
-
});
|
|
13450
|
-
var systemDataSchema = exports_external.object({
|
|
13451
|
-
description: exports_external.string().optional(),
|
|
13452
|
-
corresponds_to: exports_external.string().optional(),
|
|
13453
|
-
atoms: exports_external.undefined().optional()
|
|
13454
|
-
});
|
|
13455
|
-
var systemEntitySchema = baseEntitySchema.extend({
|
|
13456
|
-
type: exports_external.literal("system" /* System */),
|
|
13457
|
-
data: systemDataSchema
|
|
13458
|
-
});
|
|
13459
|
-
var containerDataSchema = exports_external.object({
|
|
13460
|
-
description: exports_external.string().optional(),
|
|
13461
|
-
system_id: exports_external.string().optional(),
|
|
13462
|
-
tech_stack: exports_external.array(exports_external.string()).optional(),
|
|
13463
|
-
deploy: exports_external.string().optional()
|
|
13464
|
-
});
|
|
13465
|
-
var containerEntitySchema = baseEntitySchema.extend({
|
|
13466
|
-
type: exports_external.literal("container" /* Container */),
|
|
13467
|
-
data: containerDataSchema
|
|
13468
|
-
});
|
|
13469
|
-
var componentDataSchema = exports_external.object({
|
|
13470
|
-
description: exports_external.string().optional(),
|
|
13471
|
-
container_id: exports_external.string().optional(),
|
|
13472
|
-
code_path: exports_external.string().optional(),
|
|
13473
|
-
atoms: dataAtomsSchema.optional()
|
|
13474
|
-
});
|
|
13475
|
-
var componentEntitySchema = baseEntitySchema.extend({
|
|
13476
|
-
type: exports_external.literal("component" /* Component */),
|
|
13477
|
-
data: componentDataSchema
|
|
13478
|
-
});
|
|
13479
|
-
var processDataSchema = exports_external.object({
|
|
13480
|
-
description: exports_external.string().optional(),
|
|
13481
|
-
steps: exports_external.array(exports_external.string()).optional(),
|
|
13482
|
-
perspective: exports_external.nativeEnum(Perspective).optional()
|
|
13483
|
-
});
|
|
13484
|
-
var processEntitySchema = baseEntitySchema.extend({
|
|
13485
|
-
type: exports_external.literal("process" /* Process */),
|
|
13486
|
-
data: processDataSchema
|
|
13487
|
-
});
|
|
13488
|
-
var sorDataSchema = exports_external.object({
|
|
13489
|
-
description: exports_external.string().optional(),
|
|
13490
|
-
product_id: exports_external.string().optional(),
|
|
13491
|
-
process_id: exports_external.string().optional(),
|
|
13492
|
-
atoms: dataAtomsSchema.optional()
|
|
13493
|
-
});
|
|
13494
|
-
var sorEntitySchema = baseEntitySchema.extend({
|
|
13495
|
-
type: exports_external.literal("sor" /* SoR */),
|
|
13496
|
-
data: sorDataSchema
|
|
13497
|
-
});
|
|
13498
|
-
var contractDataSchema = exports_external.object({
|
|
13499
|
-
format: exports_external.enum(["openapi", "asyncapi", "proto", "graphql", "custom"]),
|
|
13500
|
-
spec: exports_external.string(),
|
|
13501
|
-
version: exports_external.string().optional(),
|
|
13502
|
-
description: exports_external.string().optional()
|
|
13503
|
-
});
|
|
13504
|
-
var contractEntitySchema = baseEntitySchema.extend({
|
|
13505
|
-
type: exports_external.literal("contract" /* Contract */),
|
|
13506
|
-
data: contractDataSchema
|
|
13507
|
-
});
|
|
13508
|
-
var epicDataSchema = exports_external.object({
|
|
13509
|
-
description: exports_external.string().optional(),
|
|
13510
|
-
product_refs: exports_external.array(entityRefPointerSchema).optional(),
|
|
13511
|
-
atoms: dataAtomsSchema.optional()
|
|
13207
|
+
// src/schemas/baseSchema.ts
|
|
13208
|
+
var sourceRefSpanSchema = exports_external.object({
|
|
13209
|
+
start: exports_external.number().int().min(1),
|
|
13210
|
+
end: exports_external.number().int().min(1)
|
|
13512
13211
|
});
|
|
13513
|
-
var
|
|
13514
|
-
|
|
13515
|
-
|
|
13212
|
+
var sourceRefSchema = exports_external.object({
|
|
13213
|
+
ref: exports_external.string(),
|
|
13214
|
+
span: sourceRefSpanSchema.optional()
|
|
13516
13215
|
});
|
|
13517
|
-
|
|
13216
|
+
// src/schemas/nodeSchema.ts
|
|
13217
|
+
var nodeTypeSchema = exports_external.enum(Object.values(NodeType));
|
|
13218
|
+
var productKindSchema = exports_external.enum(Object.values(ProductKind));
|
|
13219
|
+
var packageKindSchema = exports_external.enum(Object.values(PackageKind));
|
|
13220
|
+
var symbolKindSchema = exports_external.enum(Object.values(SymbolKind));
|
|
13221
|
+
var groundingSchema = exports_external.enum(Object.values(Grounding));
|
|
13222
|
+
var visibilitySchema = exports_external.enum(Object.values(Visibility));
|
|
13223
|
+
var nodeBaseSchema = exports_external.object({
|
|
13224
|
+
id: exports_external.string(),
|
|
13225
|
+
grounding: groundingSchema,
|
|
13518
13226
|
name: exports_external.string(),
|
|
13519
|
-
|
|
13520
|
-
|
|
13521
|
-
|
|
13522
|
-
|
|
13523
|
-
|
|
13524
|
-
|
|
13525
|
-
|
|
13526
|
-
|
|
13527
|
-
|
|
13528
|
-
|
|
13529
|
-
|
|
13530
|
-
var sessionDecisionSchema = exports_external.object({
|
|
13531
|
-
action: exports_external.enum(["confirmed", "modified", "rejected"]),
|
|
13532
|
-
entity_ref: exports_external.string().optional(),
|
|
13533
|
-
original: exports_external.record(exports_external.unknown()).optional(),
|
|
13534
|
-
modified: exports_external.record(exports_external.unknown()).optional()
|
|
13535
|
-
});
|
|
13536
|
-
var modelingSessionDataSchema = exports_external.object({
|
|
13537
|
-
session_id: exports_external.string(),
|
|
13538
|
-
mode: exports_external.enum(["full", "incremental"]),
|
|
13539
|
-
source_hash: exports_external.string(),
|
|
13540
|
-
decisions: exports_external.array(sessionDecisionSchema)
|
|
13227
|
+
language: exports_external.string().nullable(),
|
|
13228
|
+
visibility: visibilitySchema.nullable(),
|
|
13229
|
+
source_id: exports_external.string().nullable(),
|
|
13230
|
+
valid_from: exports_external.number().int().nullable(),
|
|
13231
|
+
valid_until: exports_external.number().int().nullable(),
|
|
13232
|
+
created_at: exports_external.string(),
|
|
13233
|
+
updated_at: exports_external.string()
|
|
13234
|
+
});
|
|
13235
|
+
var productNodeSchema = nodeBaseSchema.extend({
|
|
13236
|
+
type: exports_external.literal("product" /* Product */),
|
|
13237
|
+
kind: productKindSchema
|
|
13541
13238
|
});
|
|
13542
|
-
var
|
|
13543
|
-
type: exports_external.literal("
|
|
13544
|
-
|
|
13545
|
-
data: adrDataSchema
|
|
13239
|
+
var packageNodeSchema = nodeBaseSchema.extend({
|
|
13240
|
+
type: exports_external.literal("package" /* Package */),
|
|
13241
|
+
kind: packageKindSchema
|
|
13546
13242
|
});
|
|
13547
|
-
var
|
|
13548
|
-
type: exports_external.literal("
|
|
13549
|
-
|
|
13550
|
-
data: modelingSessionDataSchema
|
|
13243
|
+
var symbolNodeSchema = nodeBaseSchema.extend({
|
|
13244
|
+
type: exports_external.literal("symbol" /* Symbol */),
|
|
13245
|
+
kind: symbolKindSchema
|
|
13551
13246
|
});
|
|
13552
|
-
var
|
|
13553
|
-
|
|
13554
|
-
|
|
13247
|
+
var nodeSchema = exports_external.discriminatedUnion("type", [
|
|
13248
|
+
productNodeSchema,
|
|
13249
|
+
packageNodeSchema,
|
|
13250
|
+
symbolNodeSchema
|
|
13555
13251
|
]);
|
|
13556
|
-
|
|
13557
|
-
|
|
13558
|
-
|
|
13559
|
-
|
|
13560
|
-
|
|
13561
|
-
var entitySchema = exports_external.discriminatedUnion("type", [
|
|
13562
|
-
productEntitySchema,
|
|
13563
|
-
systemEntitySchema,
|
|
13564
|
-
containerEntitySchema,
|
|
13565
|
-
componentEntitySchema,
|
|
13566
|
-
processEntitySchema,
|
|
13567
|
-
sorEntitySchema,
|
|
13568
|
-
contractEntitySchema,
|
|
13569
|
-
epicEntitySchema,
|
|
13570
|
-
documentEntitySchema
|
|
13571
|
-
]).superRefine((entity2, ctx) => {
|
|
13572
|
-
if (entity2.type === "product" /* Product */ || entity2.type === "component" /* Component */ || entity2.type === "sor" /* SoR */ || entity2.type === "epic" /* Epic */) {
|
|
13573
|
-
const atoms2 = entity2.data.atoms;
|
|
13574
|
-
if (!atoms2) {
|
|
13575
|
-
return;
|
|
13576
|
-
}
|
|
13577
|
-
const illegal = validateAtomsWhitelist(entity2.type, atoms2);
|
|
13578
|
-
for (const field of illegal) {
|
|
13579
|
-
ctx.addIssue({
|
|
13580
|
-
code: exports_external.ZodIssueCode.custom,
|
|
13581
|
-
path: ["data", "atoms", field],
|
|
13582
|
-
message: `atom field not allowed for ${entity2.type}: ${field}`
|
|
13583
|
-
});
|
|
13584
|
-
}
|
|
13585
|
-
}
|
|
13586
|
-
if (entity2.type === "sor" /* SoR */ && entity2.data.atoms) {
|
|
13587
|
-
const { constraints, rules } = entity2.data.atoms;
|
|
13588
|
-
const hasConstraints = Array.isArray(constraints) && constraints.length > 0;
|
|
13589
|
-
const hasRules = Array.isArray(rules) && rules.length > 0;
|
|
13590
|
-
if (!hasConstraints && !hasRules) {
|
|
13591
|
-
ctx.addIssue({
|
|
13592
|
-
code: exports_external.ZodIssueCode.custom,
|
|
13593
|
-
path: ["data", "atoms"],
|
|
13594
|
-
message: "SoR must have at least one constraint or rule"
|
|
13595
|
-
});
|
|
13596
|
-
}
|
|
13597
|
-
}
|
|
13598
|
-
if (entity2.type === "epic" /* Epic */ && entity2.data.atoms) {
|
|
13599
|
-
const { decisions } = entity2.data.atoms;
|
|
13600
|
-
const hasDecisions = Array.isArray(decisions) && decisions.length > 0;
|
|
13601
|
-
if (!hasDecisions) {
|
|
13602
|
-
ctx.addIssue({
|
|
13603
|
-
code: exports_external.ZodIssueCode.custom,
|
|
13604
|
-
path: ["data", "atoms"],
|
|
13605
|
-
message: "Epic must have at least one decision"
|
|
13606
|
-
});
|
|
13607
|
-
}
|
|
13608
|
-
}
|
|
13609
|
-
});
|
|
13610
|
-
// src/schemas/relationSchema.ts
|
|
13611
|
-
var relationDataSchema = exports_external.object({
|
|
13612
|
-
description: exports_external.string().optional(),
|
|
13613
|
-
_source: exports_external.literal("field_sync").optional()
|
|
13614
|
-
});
|
|
13615
|
-
var relationSchema = exports_external.object({
|
|
13252
|
+
// src/schemas/edgeSchema.ts
|
|
13253
|
+
var edgeTypeSchema = exports_external.enum(Object.values(EdgeType));
|
|
13254
|
+
var edgeSourceSchema = exports_external.enum(Object.values(EdgeSource));
|
|
13255
|
+
var groundingSchema2 = exports_external.enum(Object.values(Grounding));
|
|
13256
|
+
var edgeSchema = exports_external.object({
|
|
13616
13257
|
id: exports_external.string(),
|
|
13617
|
-
type:
|
|
13618
|
-
|
|
13619
|
-
|
|
13620
|
-
|
|
13621
|
-
|
|
13622
|
-
|
|
13623
|
-
|
|
13624
|
-
|
|
13625
|
-
|
|
13258
|
+
type: edgeTypeSchema,
|
|
13259
|
+
from_id: exports_external.string(),
|
|
13260
|
+
to_id: exports_external.string(),
|
|
13261
|
+
grounding: groundingSchema2,
|
|
13262
|
+
source: edgeSourceSchema,
|
|
13263
|
+
confidence: exports_external.number().min(0).max(1),
|
|
13264
|
+
valid_from: exports_external.number().int().nullable(),
|
|
13265
|
+
valid_until: exports_external.number().int().nullable(),
|
|
13266
|
+
created_at: exports_external.string(),
|
|
13267
|
+
updated_at: exports_external.string()
|
|
13268
|
+
});
|
|
13269
|
+
// src/schemas/factSchema.ts
|
|
13270
|
+
var factKindSchema = exports_external.enum(Object.values(FactKind));
|
|
13271
|
+
var factSourceTypeSchema = exports_external.enum(Object.values(FactSourceType));
|
|
13272
|
+
var factStatusSchema = exports_external.enum(Object.values(FactStatus));
|
|
13273
|
+
var factConfidenceSchema = exports_external.enum(Object.values(FactConfidence));
|
|
13274
|
+
var factRelationSchema = exports_external.enum(Object.values(FactRelation));
|
|
13275
|
+
var sourceSpanSchema = exports_external.object({
|
|
13276
|
+
start: exports_external.number(),
|
|
13277
|
+
end: exports_external.number()
|
|
13278
|
+
}).nullable();
|
|
13279
|
+
var relatedFactSchema = exports_external.object({
|
|
13280
|
+
fact_id: exports_external.string(),
|
|
13281
|
+
relation: factRelationSchema
|
|
13282
|
+
});
|
|
13283
|
+
var factSchemaBase = exports_external.object({
|
|
13284
|
+
id: exports_external.string(),
|
|
13285
|
+
anchor_id: exports_external.string(),
|
|
13286
|
+
anchor_type: exports_external.enum(["node", "edge"]),
|
|
13287
|
+
kind: factKindSchema,
|
|
13288
|
+
content: exports_external.string().max(256),
|
|
13289
|
+
detail: exports_external.string().nullable(),
|
|
13290
|
+
source_type: factSourceTypeSchema,
|
|
13291
|
+
source_ref: exports_external.string(),
|
|
13292
|
+
source_span: sourceSpanSchema,
|
|
13293
|
+
related_facts: exports_external.array(relatedFactSchema).nullable(),
|
|
13294
|
+
valid_from: exports_external.number().int().nullable(),
|
|
13295
|
+
valid_until: exports_external.number().int().nullable(),
|
|
13296
|
+
status: factStatusSchema,
|
|
13297
|
+
confidence: factConfidenceSchema,
|
|
13298
|
+
workspace_id: exports_external.string().nullable(),
|
|
13299
|
+
source_id: exports_external.string().nullable(),
|
|
13300
|
+
created_at: exports_external.string(),
|
|
13301
|
+
updated_at: exports_external.string()
|
|
13302
|
+
});
|
|
13303
|
+
var proposedFactSchema = factSchemaBase.extend({
|
|
13304
|
+
status: exports_external.literal("proposed" /* Proposed */),
|
|
13305
|
+
confidence: exports_external.enum([
|
|
13306
|
+
"confirmed" /* Confirmed */,
|
|
13307
|
+
"inferred" /* Inferred */,
|
|
13308
|
+
"speculative" /* Speculative */
|
|
13309
|
+
])
|
|
13310
|
+
});
|
|
13311
|
+
var activeFactSchema = factSchemaBase.extend({
|
|
13312
|
+
status: exports_external.literal("active" /* Active */),
|
|
13313
|
+
confidence: exports_external.enum([
|
|
13314
|
+
"verified" /* Verified */,
|
|
13315
|
+
"confirmed" /* Confirmed */,
|
|
13316
|
+
"inferred" /* Inferred */
|
|
13317
|
+
])
|
|
13318
|
+
});
|
|
13319
|
+
var deprecatedFactSchema = factSchemaBase.extend({
|
|
13320
|
+
status: exports_external.literal("deprecated" /* Deprecated */),
|
|
13321
|
+
confidence: exports_external.enum([
|
|
13322
|
+
"verified" /* Verified */,
|
|
13323
|
+
"confirmed" /* Confirmed */,
|
|
13324
|
+
"inferred" /* Inferred */
|
|
13325
|
+
])
|
|
13326
|
+
});
|
|
13327
|
+
var factSchema = exports_external.union([
|
|
13328
|
+
proposedFactSchema,
|
|
13329
|
+
activeFactSchema,
|
|
13330
|
+
deprecatedFactSchema
|
|
13331
|
+
]);
|
|
13626
13332
|
// src/errors/c4aError.ts
|
|
13627
13333
|
class C4AError extends Error {
|
|
13628
13334
|
code;
|
|
@@ -13866,6 +13572,47 @@ function matchesPathFilter(path2, category, config) {
|
|
|
13866
13572
|
return false;
|
|
13867
13573
|
return true;
|
|
13868
13574
|
}
|
|
13575
|
+
// src/utils/version.ts
|
|
13576
|
+
var VERSION_LABEL_REGEX = /^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-(alpha|beta|rc)\.(0|[1-9]\d*))?$/i;
|
|
13577
|
+
function encodePrerelease(channel, sequence) {
|
|
13578
|
+
if (!channel) {
|
|
13579
|
+
return 99;
|
|
13580
|
+
}
|
|
13581
|
+
const index = Number.parseInt(sequence ?? "", 10);
|
|
13582
|
+
if (!Number.isInteger(index) || index <= 0 || index > 29) {
|
|
13583
|
+
return null;
|
|
13584
|
+
}
|
|
13585
|
+
switch (channel.toLowerCase()) {
|
|
13586
|
+
case "alpha":
|
|
13587
|
+
return index;
|
|
13588
|
+
case "beta":
|
|
13589
|
+
return 30 + index;
|
|
13590
|
+
case "rc":
|
|
13591
|
+
return 60 + index;
|
|
13592
|
+
default:
|
|
13593
|
+
return null;
|
|
13594
|
+
}
|
|
13595
|
+
}
|
|
13596
|
+
function encodeVersionLabel(label) {
|
|
13597
|
+
const match = VERSION_LABEL_REGEX.exec(label.trim());
|
|
13598
|
+
if (!match) {
|
|
13599
|
+
return null;
|
|
13600
|
+
}
|
|
13601
|
+
const major = Number.parseInt(match[1] ?? "", 10);
|
|
13602
|
+
const minor = Number.parseInt(match[2] ?? "", 10);
|
|
13603
|
+
const patch = Number.parseInt(match[3] ?? "", 10);
|
|
13604
|
+
const prerelease = encodePrerelease(match[4], match[5]);
|
|
13605
|
+
if (!Number.isInteger(major) || !Number.isInteger(minor) || !Number.isInteger(patch) || prerelease === null) {
|
|
13606
|
+
return null;
|
|
13607
|
+
}
|
|
13608
|
+
return major * 1e6 + minor * 1e4 + patch * 100 + prerelease;
|
|
13609
|
+
}
|
|
13610
|
+
function isVersionVisible(record, versionCode) {
|
|
13611
|
+
if (versionCode == null) {
|
|
13612
|
+
return true;
|
|
13613
|
+
}
|
|
13614
|
+
return (record.valid_from == null || record.valid_from <= versionCode) && (record.valid_until == null || record.valid_until > versionCode);
|
|
13615
|
+
}
|
|
13869
13616
|
// src/constants.ts
|
|
13870
13617
|
var DEFAULT_WORKSPACE_NAME = "My Brain";
|
|
13871
13618
|
var DEFAULT_CLOUD_LIBRARY_NAME = "My Drive";
|
|
@@ -14072,88 +13819,75 @@ var WS_TASK_FAILED = "task/failed";
|
|
|
14072
13819
|
var WS_TASK_CANCELLED = "task/cancelled";
|
|
14073
13820
|
var WS_TASK_QUEUE_UPDATE = "task/queue_update";
|
|
14074
13821
|
export {
|
|
14075
|
-
|
|
13822
|
+
visibilitySchema,
|
|
14076
13823
|
transitionAtomSchema,
|
|
14077
|
-
|
|
13824
|
+
symbolKindSchema,
|
|
14078
13825
|
stateAtomSchema,
|
|
14079
|
-
|
|
13826
|
+
sourceSpanSchema,
|
|
14080
13827
|
sourceRefSpanSchema,
|
|
14081
13828
|
sourceRefSchema,
|
|
14082
|
-
sorEntitySchema,
|
|
14083
|
-
sessionDecisionSchema,
|
|
14084
13829
|
serializeYaml,
|
|
14085
13830
|
sectionSchema,
|
|
14086
|
-
scopeSchema,
|
|
14087
13831
|
ruleAtomSchema,
|
|
14088
13832
|
roleAtomSchema,
|
|
14089
13833
|
resolvePathFilter,
|
|
14090
|
-
relationTypeSchema,
|
|
14091
|
-
relationSchema,
|
|
14092
|
-
relationDataSchema,
|
|
14093
13834
|
relationAtomSchema,
|
|
14094
|
-
|
|
14095
|
-
|
|
14096
|
-
perspectiveSchema,
|
|
13835
|
+
relatedFactSchema,
|
|
13836
|
+
productKindSchema,
|
|
14097
13837
|
parseYaml,
|
|
14098
13838
|
parseRef,
|
|
14099
13839
|
paragraphAtomSchema,
|
|
14100
|
-
|
|
13840
|
+
packageKindSchema,
|
|
13841
|
+
nodeTypeSchema,
|
|
13842
|
+
nodeSchema,
|
|
14101
13843
|
metricMilestoneSchema,
|
|
14102
13844
|
metricAtomSchema,
|
|
14103
|
-
metadataSchema,
|
|
14104
13845
|
mergeDefaults,
|
|
14105
13846
|
matchesPathFilter,
|
|
14106
13847
|
mapErrorCodeToStatus,
|
|
14107
|
-
|
|
13848
|
+
isVersionVisible,
|
|
14108
13849
|
isValidManifest,
|
|
14109
13850
|
isRefPointer,
|
|
14110
13851
|
isPlainObject,
|
|
14111
13852
|
isPathSafe,
|
|
14112
13853
|
isIndexableFile,
|
|
14113
13854
|
hasExcludedSegment,
|
|
13855
|
+
groundingSchema,
|
|
14114
13856
|
globToRegex,
|
|
14115
13857
|
getFileExtension,
|
|
14116
13858
|
generateUUID,
|
|
14117
13859
|
generateId,
|
|
14118
|
-
|
|
13860
|
+
factStatusSchema,
|
|
13861
|
+
factSourceTypeSchema,
|
|
13862
|
+
factSchemaBase,
|
|
13863
|
+
factSchema,
|
|
13864
|
+
factRelationSchema,
|
|
13865
|
+
factKindSchema,
|
|
13866
|
+
factConfidenceSchema,
|
|
14119
13867
|
extractAllRefs,
|
|
14120
13868
|
eventAtomSchema,
|
|
14121
|
-
epicEntitySchema,
|
|
14122
|
-
entityTypeSchema,
|
|
14123
|
-
entitySchema,
|
|
14124
|
-
entityRefPointerSchema,
|
|
14125
13869
|
entityAtomSchema,
|
|
13870
|
+
encodeVersionLabel,
|
|
14126
13871
|
embeddingEntrySchema,
|
|
14127
|
-
|
|
14128
|
-
|
|
14129
|
-
|
|
14130
|
-
documentAdrEntitySchema,
|
|
13872
|
+
edgeTypeSchema,
|
|
13873
|
+
edgeSourceSchema,
|
|
13874
|
+
edgeSchema,
|
|
14131
13875
|
docDigestSchema,
|
|
14132
13876
|
docChunkResultSchema,
|
|
14133
13877
|
docChunkParagraphSchema,
|
|
14134
13878
|
defaultRegistry,
|
|
14135
13879
|
decisionPhaseSchema,
|
|
14136
13880
|
decisionAtomSchema,
|
|
14137
|
-
dataAtomsSchema,
|
|
14138
13881
|
createPathMatcher,
|
|
14139
|
-
contractEntitySchema,
|
|
14140
|
-
contractDataSchema,
|
|
14141
13882
|
contentHash,
|
|
14142
|
-
containerEntitySchema,
|
|
14143
13883
|
constraintAtomSchema,
|
|
14144
|
-
componentEntitySchema,
|
|
14145
13884
|
comparisonDimensionValueSchema,
|
|
14146
13885
|
comparisonDimensionSchema,
|
|
14147
13886
|
comparisonAtomSchema,
|
|
14148
|
-
claimAtomSchema,
|
|
14149
13887
|
buildRef,
|
|
14150
13888
|
boundaryAtomSchema,
|
|
14151
13889
|
behaviorAtomSchema,
|
|
14152
13890
|
attributeAtomSchema,
|
|
14153
|
-
atomFieldSchema,
|
|
14154
|
-
alternativeSchema,
|
|
14155
|
-
allowedAtomFieldSchema,
|
|
14156
|
-
adrDataSchema,
|
|
14157
13891
|
WS_TASK_STARTED,
|
|
14158
13892
|
WS_TASK_QUEUE_UPDATE,
|
|
14159
13893
|
WS_TASK_QUEUED,
|
|
@@ -14173,24 +13907,32 @@ export {
|
|
|
14173
13907
|
WS_DAEMON_HANDSHAKE_ACK,
|
|
14174
13908
|
WS_DAEMON_HANDSHAKE,
|
|
14175
13909
|
WS_DAEMON_CONNECTED,
|
|
13910
|
+
Visibility,
|
|
14176
13911
|
UPLOAD_MAX_FILE_SIZE,
|
|
14177
13912
|
UPLOAD_MAX_FILES,
|
|
14178
13913
|
UPLOAD_ALLOWED_EXTENSIONS,
|
|
14179
13914
|
TEXT_EXTENSIONS,
|
|
13915
|
+
SymbolKind,
|
|
14180
13916
|
SUPERTEST_USER_NAME,
|
|
14181
13917
|
SUPERTEST_EMAIL,
|
|
14182
13918
|
SCAN_EXCLUDED_DIRS,
|
|
14183
|
-
RelationType,
|
|
14184
13919
|
RESERVED_USER_NAMES,
|
|
14185
|
-
|
|
13920
|
+
ProductKind,
|
|
14186
13921
|
PathFilterConfigSchema,
|
|
14187
|
-
|
|
13922
|
+
PackageKind,
|
|
13923
|
+
NodeType,
|
|
14188
13924
|
INDEXABLE_EXTENSIONS,
|
|
14189
13925
|
INDEXABLE_DOC_EXTENSIONS,
|
|
14190
13926
|
INDEXABLE_CODE_EXTENSIONS,
|
|
13927
|
+
Grounding,
|
|
13928
|
+
FactStatus,
|
|
13929
|
+
FactSourceType,
|
|
13930
|
+
FactRelation,
|
|
13931
|
+
FactKind,
|
|
13932
|
+
FactConfidence,
|
|
14191
13933
|
ErrorCode,
|
|
14192
|
-
|
|
14193
|
-
|
|
13934
|
+
EdgeType,
|
|
13935
|
+
EdgeSource,
|
|
14194
13936
|
DEFAULT_WORKSPACE_NAME,
|
|
14195
13937
|
DEFAULT_SERVER_CONFIG,
|
|
14196
13938
|
DEFAULT_PATH_FILTER,
|
|
@@ -14202,6 +13944,5 @@ export {
|
|
|
14202
13944
|
CODE_PACKAGE_FILES,
|
|
14203
13945
|
CODE_DIGEST_TYPE,
|
|
14204
13946
|
CLOUD_DAEMON_IDLE_TIMEOUT,
|
|
14205
|
-
C4AError
|
|
14206
|
-
AtomField
|
|
13947
|
+
C4AError
|
|
14207
13948
|
};
|