@wrongstack/tools 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builtin.js +17 -17
- package/dist/{chunk-6I6RXQFG.js → chunk-2BCRQAIW.js} +9 -9
- package/dist/{chunk-XRNN44QY.js → chunk-2IRHFHZY.js} +235 -71
- package/dist/{chunk-5RBUYFRV.js → chunk-4IMNVQRB.js} +8 -2
- package/dist/{chunk-NEYUPZL6.js → chunk-6D3UIQMF.js} +651 -303
- package/dist/chunk-BJ5LXLKE.js +351 -0
- package/dist/{chunk-C6ZOXNXV.js → chunk-CSS42GRP.js} +2 -2
- package/dist/{chunk-SKRMUHTU.js → chunk-HSLDY55L.js} +41 -8
- package/dist/{chunk-ENE22I5W.js → chunk-K37AKCTN.js} +884 -362
- package/dist/{chunk-V25Q6TQ7.js → chunk-K3VX6V5P.js} +3 -3
- package/dist/chunk-OIFY4XNP.js +855 -0
- package/dist/{chunk-OUERRFEM.js → chunk-OMQDKZOT.js} +17 -8
- package/dist/{chunk-7GOE2ZTZ.js → chunk-OMWC2OGT.js} +2 -2
- package/dist/{chunk-IE4KDAOB.js → chunk-OYQE2UNT.js} +3 -3
- package/dist/chunk-R3HR3QI3.js +97 -0
- package/dist/{chunk-XPVYZ2S6.js → chunk-RYLMSGR5.js} +2 -2
- package/dist/{chunk-HYHE4VNA.js → chunk-UMOP3VGK.js} +79 -45
- package/dist/{chunk-FVSMTEO3.js → chunk-VMNWQI4V.js} +2 -2
- package/dist/{chunk-2UVAIS5O.js → chunk-YPSVPCIE.js} +2 -2
- package/dist/{chunk-PWZUHZP7.js → chunk-Z77XMU3U.js} +2 -2
- package/dist/codebase-index/ast-invariant-engine.d.ts +19 -2
- package/dist/codebase-index/atlas-projection.d.ts +19 -0
- package/dist/codebase-index/background-indexer.d.ts +14 -0
- package/dist/codebase-index/circuit-breaker.d.ts +7 -0
- package/dist/codebase-index/codebase-ast-replace-tool.d.ts +1 -1
- package/dist/codebase-index/codebase-impact-analysis-tool.d.ts +6 -0
- package/dist/codebase-index/codebase-invariant-check-tool.d.ts +2 -0
- package/dist/codebase-index/codebase-targeted-test-tool.d.ts +26 -0
- package/dist/codebase-index/dead-code-scan.d.ts +4 -0
- package/dist/codebase-index/go-parser.d.ts +23 -3
- package/dist/codebase-index/graph-rank-pass.d.ts +10 -0
- package/dist/codebase-index/graph-rank.d.ts +8 -0
- package/dist/codebase-index/index.d.ts +1 -1
- package/dist/codebase-index/index.js +9 -9
- package/dist/codebase-index/lsp-kind.d.ts +3 -1
- package/dist/codebase-index/module-resolver.d.ts +21 -1
- package/dist/codebase-index/parser-batch.d.ts +6 -8
- package/dist/codebase-index/parser-output.d.ts +5 -1
- package/dist/codebase-index/parser-worker-script.js +4 -4
- package/dist/codebase-index/project-server-framing.d.ts +1 -17
- package/dist/codebase-index/project-server-watcher.d.ts +6 -0
- package/dist/codebase-index/project-server.js +72 -26
- package/dist/codebase-index/py-parser.d.ts +4 -4
- package/dist/codebase-index/rs-parser.d.ts +7 -0
- package/dist/codebase-index/toolchain-scripts.d.ts +64 -0
- package/dist/codebase-index/tree-sitter/queries.d.ts +14 -0
- package/dist/codebase-index/tree-sitter/util.d.ts +6 -1
- package/dist/codebase-index/tree-sitter-parser.d.ts +7 -0
- package/dist/codebase-index/worker.js +23 -16
- package/dist/codebase-index/writer-refs.d.ts +17 -2
- package/dist/codebase-index/writer-search-helpers.d.ts +9 -0
- package/dist/codebase-index/writer.d.ts +20 -1
- package/dist/edit.js +8 -8
- package/dist/{generic-parser-N2PLGBC2.js → generic-parser-IVWLFKMR.js} +2 -2
- package/dist/go-parser-LWV3L5V7.js +197 -0
- package/dist/index.js +19 -19
- package/dist/json-parser-PERV2JHX.js +204 -0
- package/dist/pack.js +18 -18
- package/dist/parser-dispatch-ZSWCQB6M.js +14 -0
- package/dist/patch.js +8 -8
- package/dist/{py-parser-4PFZYAJ7.js → py-parser-B6D6RGH7.js} +4 -4
- package/dist/read.js +8 -8
- package/dist/replace.js +8 -8
- package/dist/rs-parser-L7SP4GWJ.js +182 -0
- package/dist/test.d.ts +1 -0
- package/dist/test.js +1 -1
- package/dist/tool-tier.js +19 -19
- package/dist/{tree-sitter-parser-GILYQLS4.js → tree-sitter-parser-KU6JF3ZC.js} +6 -4
- package/dist/{ts-parser-7W26YB26.js → ts-parser-PML6QIH7.js} +55 -23
- package/dist/typecheck.js +1 -1
- package/dist/write.js +8 -8
- package/dist/{yaml-parser-DFBC5FWH.js → yaml-parser-7BJN544B.js} +41 -6
- package/package.json +5 -5
- package/dist/chunk-4CE3RKEP.js +0 -390
- package/dist/chunk-KHUCKLOR.js +0 -899
- package/dist/chunk-ZKC5UNGD.js +0 -167
- package/dist/go-parser-Z4H6SR3R.js +0 -474
- package/dist/json-parser-IJD77VL4.js +0 -256
- package/dist/parser-dispatch-WG4DNBHH.js +0 -14
- package/dist/rs-parser-GIWPUA3T.js +0 -81
package/dist/test.js
CHANGED
package/dist/tool-tier.js
CHANGED
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
BUILTIN_TIER_COUNTS,
|
|
3
3
|
registerBuiltinToolTier,
|
|
4
4
|
selectBuiltinToolsForTier
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-K3VX6V5P.js";
|
|
6
|
+
import "./chunk-VMNWQI4V.js";
|
|
7
|
+
import "./chunk-2BCRQAIW.js";
|
|
8
8
|
import "./chunk-BVHKBBGA.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-K37AKCTN.js";
|
|
10
|
+
import "./chunk-2IRHFHZY.js";
|
|
11
11
|
import "./chunk-MRXWOOOR.js";
|
|
12
12
|
import "./chunk-7V33PHT6.js";
|
|
13
13
|
import "./chunk-OKZJJDOG.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-OMQDKZOT.js";
|
|
15
15
|
import "./chunk-ULI2J6TX.js";
|
|
16
16
|
import "./chunk-YKSOSI2N.js";
|
|
17
17
|
import "./chunk-DOAHONOS.js";
|
|
@@ -19,17 +19,17 @@ import "./chunk-C3WP6ZOT.js";
|
|
|
19
19
|
import "./chunk-JPK2HHBK.js";
|
|
20
20
|
import "./chunk-KS2OEZWV.js";
|
|
21
21
|
import "./chunk-SPNXDTCJ.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-YPSVPCIE.js";
|
|
23
23
|
import "./chunk-D6RQZMZS.js";
|
|
24
24
|
import "./chunk-2OCAAFAT.js";
|
|
25
25
|
import "./chunk-M4ZHHCCW.js";
|
|
26
26
|
import "./chunk-KPDCKSN5.js";
|
|
27
27
|
import "./chunk-4SUGLJLO.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-4IMNVQRB.js";
|
|
29
29
|
import "./chunk-E7A4SLKR.js";
|
|
30
30
|
import "./chunk-G7CYW5EP.js";
|
|
31
31
|
import "./chunk-UVYRQKPZ.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-CSS42GRP.js";
|
|
33
33
|
import "./chunk-ON6ET5ER.js";
|
|
34
34
|
import "./chunk-DLZCOEVG.js";
|
|
35
35
|
import "./chunk-YJTXRH5Y.js";
|
|
@@ -48,17 +48,17 @@ import "./chunk-DBG7UQGK.js";
|
|
|
48
48
|
import "./chunk-VMJY6FYJ.js";
|
|
49
49
|
import "./chunk-YZECCW3F.js";
|
|
50
50
|
import "./chunk-O2MHULBO.js";
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-OYQE2UNT.js";
|
|
52
|
+
import "./chunk-Z77XMU3U.js";
|
|
53
|
+
import "./chunk-OMWC2OGT.js";
|
|
54
54
|
import "./chunk-MSOAX3GC.js";
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-UMOP3VGK.js";
|
|
56
|
+
import "./chunk-RYLMSGR5.js";
|
|
57
|
+
import "./chunk-6D3UIQMF.js";
|
|
58
|
+
import "./chunk-BJ5LXLKE.js";
|
|
59
|
+
import "./chunk-R3HR3QI3.js";
|
|
60
|
+
import "./chunk-HSLDY55L.js";
|
|
61
|
+
import "./chunk-OIFY4XNP.js";
|
|
62
62
|
import "./chunk-YOHO4DVT.js";
|
|
63
63
|
import "./chunk-XHSHNOAF.js";
|
|
64
64
|
import "./chunk-XZLVJD56.js";
|
|
@@ -3,13 +3,15 @@ import {
|
|
|
3
3
|
getGrammarWasmPath,
|
|
4
4
|
loadTreeSitterLanguage,
|
|
5
5
|
parseSymbols,
|
|
6
|
-
parseTreeSitterAst
|
|
7
|
-
|
|
6
|
+
parseTreeSitterAst,
|
|
7
|
+
treeSitterDeclarationName
|
|
8
|
+
} from "./chunk-2IRHFHZY.js";
|
|
8
9
|
export {
|
|
9
10
|
__smokeRootType,
|
|
10
11
|
getGrammarWasmPath,
|
|
11
12
|
loadTreeSitterLanguage,
|
|
12
13
|
parseSymbols,
|
|
13
|
-
parseTreeSitterAst
|
|
14
|
+
parseTreeSitterAst,
|
|
15
|
+
treeSitterDeclarationName
|
|
14
16
|
};
|
|
15
|
-
//# sourceMappingURL=tree-sitter-parser-
|
|
17
|
+
//# sourceMappingURL=tree-sitter-parser-KU6JF3ZC.js.map
|
|
@@ -61,6 +61,32 @@ function getJsDoc(node, sourceFile) {
|
|
|
61
61
|
}
|
|
62
62
|
return "";
|
|
63
63
|
}
|
|
64
|
+
function declarationNameNodes(node) {
|
|
65
|
+
const name = node.name;
|
|
66
|
+
if (!name) return null;
|
|
67
|
+
if (ts.isIdentifier(name) || ts.isPrivateIdentifier(name) || ts.isStringLiteral(name) || ts.isNumericLiteral(name)) {
|
|
68
|
+
return [name];
|
|
69
|
+
}
|
|
70
|
+
if (ts.isObjectBindingPattern(name) || ts.isArrayBindingPattern(name)) {
|
|
71
|
+
return bindingIdentifiers(name);
|
|
72
|
+
}
|
|
73
|
+
return [];
|
|
74
|
+
}
|
|
75
|
+
function bindingIdentifiers(pattern) {
|
|
76
|
+
const out = [];
|
|
77
|
+
for (const element of pattern.elements) {
|
|
78
|
+
if (ts.isOmittedExpression(element)) continue;
|
|
79
|
+
if (ts.isIdentifier(element.name)) out.push(element.name);
|
|
80
|
+
else out.push(...bindingIdentifiers(element.name));
|
|
81
|
+
}
|
|
82
|
+
return out;
|
|
83
|
+
}
|
|
84
|
+
function docHostOf(node) {
|
|
85
|
+
if (ts.isVariableDeclaration(node) && ts.isVariableDeclarationList(node.parent) && node.parent.declarations[0] === node && ts.isVariableStatement(node.parent.parent)) {
|
|
86
|
+
return node.parent.parent;
|
|
87
|
+
}
|
|
88
|
+
return node;
|
|
89
|
+
}
|
|
64
90
|
function pushScopeName(node, parts) {
|
|
65
91
|
if (ts.isClassDeclaration(node) || ts.isInterfaceDeclaration(node) || ts.isEnumDeclaration(node) || ts.isTypeAliasDeclaration(node)) {
|
|
66
92
|
parts.push(node.name?.text ?? "Anon");
|
|
@@ -87,30 +113,32 @@ async function parseSymbols(opts) {
|
|
|
87
113
|
if (kind) {
|
|
88
114
|
if ((kind === "const" || kind === "let" || kind === "var" || kind === "parameter") && funcDepth > 0) {
|
|
89
115
|
} else {
|
|
90
|
-
const
|
|
91
|
-
if (
|
|
116
|
+
const nameNodes = declarationNameNodes(node);
|
|
117
|
+
if (nameNodes === null) {
|
|
92
118
|
return;
|
|
93
119
|
}
|
|
94
|
-
const
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
120
|
+
const signature = nameNodes.length > 0 ? getSignature(printer, node, sourceFile) : "";
|
|
121
|
+
const docComment = nameNodes.length > 0 ? getJsDoc(docHostOf(node), sourceFile) : "";
|
|
122
|
+
for (const nameNode of nameNodes) {
|
|
123
|
+
const name = nameNode.text;
|
|
124
|
+
const pos2 = nameNode.getStart(sourceFile);
|
|
125
|
+
const { line: line2, character } = sourceFile.getLineAndCharacterOfPosition(pos2);
|
|
126
|
+
const scope = scopeParts.join(".");
|
|
127
|
+
const text = [name, signature, docComment].filter(Boolean).join(" | ");
|
|
128
|
+
symbols.push({
|
|
129
|
+
id: 0,
|
|
130
|
+
lang,
|
|
131
|
+
kind,
|
|
132
|
+
name,
|
|
133
|
+
file,
|
|
134
|
+
line: line2 + 1,
|
|
135
|
+
col: character,
|
|
136
|
+
signature,
|
|
137
|
+
docComment,
|
|
138
|
+
scope,
|
|
139
|
+
text
|
|
140
|
+
});
|
|
141
|
+
}
|
|
114
142
|
}
|
|
115
143
|
}
|
|
116
144
|
const pos = node.getStart(sourceFile);
|
|
@@ -121,6 +149,10 @@ async function parseSymbols(opts) {
|
|
|
121
149
|
if (ts.isIdentifier(expr)) {
|
|
122
150
|
refs.push({ fromId: 0, toName: expr.text, callType: "call", line: lineNum });
|
|
123
151
|
}
|
|
152
|
+
} else if (ts.isNewExpression(node)) {
|
|
153
|
+
if (ts.isIdentifier(node.expression)) {
|
|
154
|
+
refs.push({ fromId: 0, toName: node.expression.text, callType: "call", line: lineNum });
|
|
155
|
+
}
|
|
124
156
|
} else if (ts.isPropertyAccessExpression(node)) {
|
|
125
157
|
if (ts.isIdentifier(node.expression)) {
|
|
126
158
|
refs.push({ fromId: 0, toName: node.expression.text, callType: "call", line: lineNum });
|
|
@@ -229,4 +261,4 @@ export {
|
|
|
229
261
|
detectLang,
|
|
230
262
|
parseSymbols
|
|
231
263
|
};
|
|
232
|
-
//# sourceMappingURL=ts-parser-
|
|
264
|
+
//# sourceMappingURL=ts-parser-PML6QIH7.js.map
|
package/dist/typecheck.js
CHANGED
package/dist/write.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writeTool
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Z77XMU3U.js";
|
|
4
4
|
import "./chunk-MSOAX3GC.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-UMOP3VGK.js";
|
|
6
|
+
import "./chunk-RYLMSGR5.js";
|
|
7
|
+
import "./chunk-6D3UIQMF.js";
|
|
8
|
+
import "./chunk-BJ5LXLKE.js";
|
|
9
|
+
import "./chunk-R3HR3QI3.js";
|
|
10
|
+
import "./chunk-HSLDY55L.js";
|
|
11
|
+
import "./chunk-OIFY4XNP.js";
|
|
12
12
|
import "./chunk-YOHO4DVT.js";
|
|
13
13
|
import "./chunk-XHSHNOAF.js";
|
|
14
14
|
import "./chunk-XZLVJD56.js";
|
|
@@ -30,10 +30,13 @@ function regexParse(opts) {
|
|
|
30
30
|
}
|
|
31
31
|
return lo + 1;
|
|
32
32
|
}
|
|
33
|
+
const scalarBody = blockScalarBodyLines(lines);
|
|
34
|
+
const inScalarBody = (offset) => scalarBody.has(lineFromOffset(offset) - 1);
|
|
33
35
|
const anchorRegex = /(?:^|(?<=[\s:\-[{,]))&(\w[\w-]*)/gm;
|
|
34
36
|
for (let match = anchorRegex.exec(content); match !== null; match = anchorRegex.exec(content)) {
|
|
35
37
|
const name = expectDefined(match[1]);
|
|
36
38
|
const offset = match.index ?? 0;
|
|
39
|
+
if (inScalarBody(offset)) continue;
|
|
37
40
|
const line = lineFromOffset(offset);
|
|
38
41
|
const col = offset - (lineOffsets[line - 1] ?? 0);
|
|
39
42
|
symbols.push(
|
|
@@ -52,6 +55,7 @@ function regexParse(opts) {
|
|
|
52
55
|
for (let match = aliasRegex.exec(content); match !== null; match = aliasRegex.exec(content)) {
|
|
53
56
|
const name = expectDefined(match[1]);
|
|
54
57
|
const offset = match.index ?? 0;
|
|
58
|
+
if (inScalarBody(offset)) continue;
|
|
55
59
|
const line = lineFromOffset(offset);
|
|
56
60
|
const col = offset - (lineOffsets[line - 1] ?? 0);
|
|
57
61
|
symbols.push(
|
|
@@ -69,9 +73,10 @@ function regexParse(opts) {
|
|
|
69
73
|
const kvRegex = /^(\s*)([^:#\s][^:#\s]*)\s*:/gm;
|
|
70
74
|
for (let match = kvRegex.exec(content); match !== null; match = kvRegex.exec(content)) {
|
|
71
75
|
const indent = match[1]?.length ?? 0;
|
|
72
|
-
const key = match[2];
|
|
76
|
+
const key = unquoteKey(match[2] ?? "");
|
|
73
77
|
if (!key) continue;
|
|
74
78
|
const offset = match.index ?? 0;
|
|
79
|
+
if (inScalarBody(offset)) continue;
|
|
75
80
|
const line = lineFromOffset(offset);
|
|
76
81
|
const col = offset - (lineOffsets[line - 1] ?? 0);
|
|
77
82
|
const lineContent = lines[line - 1] ?? "";
|
|
@@ -79,15 +84,16 @@ function regexParse(opts) {
|
|
|
79
84
|
if (key === "---" || key === "...") continue;
|
|
80
85
|
if (indent > 12) continue;
|
|
81
86
|
const value = extractValue(content, (match.index ?? 0) + expectDefined(match[0]).length);
|
|
82
|
-
if (
|
|
87
|
+
if (BLOCK_SCALAR_VALUE.test(value)) continue;
|
|
83
88
|
const kind = isScalar(value) ? "literal" : "property";
|
|
84
89
|
const signature = `${key}: ${truncate(value, 60)}`;
|
|
85
90
|
symbols.push(makeSymbol({ name: key, kind, line, col, signature, file, lang }));
|
|
86
91
|
}
|
|
87
92
|
const listItemRegex = /^(\s*)-(\s+)([^:#\s][^:#\s]*)\s*:/gm;
|
|
88
93
|
for (let match = listItemRegex.exec(content); match !== null; match = listItemRegex.exec(content)) {
|
|
89
|
-
const key = expectDefined(match[3]);
|
|
94
|
+
const key = unquoteKey(expectDefined(match[3]));
|
|
90
95
|
const offset = match.index ?? 0;
|
|
96
|
+
if (inScalarBody(offset)) continue;
|
|
91
97
|
const line = lineFromOffset(offset);
|
|
92
98
|
const col = offset - (lineOffsets[line - 1] ?? 0);
|
|
93
99
|
const value = extractValue(content, offset + match[0]?.length);
|
|
@@ -104,10 +110,11 @@ function regexParse(opts) {
|
|
|
104
110
|
})
|
|
105
111
|
);
|
|
106
112
|
}
|
|
107
|
-
const blockScalarRegex = /^(\s*)([^:#\s][^:#\s]*)\s
|
|
113
|
+
const blockScalarRegex = /^(\s*)([^:#\s][^:#\s]*)\s*:[ \t]*[|>][-+0-9]*(?=[ \t]|$)/gm;
|
|
108
114
|
for (let match = blockScalarRegex.exec(content); match !== null; match = blockScalarRegex.exec(content)) {
|
|
109
|
-
const key = expectDefined(match[2]);
|
|
115
|
+
const key = unquoteKey(expectDefined(match[2]));
|
|
110
116
|
const offset = match.index ?? 0;
|
|
117
|
+
if (inScalarBody(offset)) continue;
|
|
111
118
|
const line = lineFromOffset(offset);
|
|
112
119
|
const col = offset - (lineOffsets[line - 1] ?? 0);
|
|
113
120
|
symbols.push(
|
|
@@ -124,6 +131,34 @@ function regexParse(opts) {
|
|
|
124
131
|
}
|
|
125
132
|
return { file, lang, symbols, mtimeMs: Date.now() };
|
|
126
133
|
}
|
|
134
|
+
var BLOCK_SCALAR_VALUE = /^[|>][-+0-9]*(\s|#|$)/;
|
|
135
|
+
function blockScalarBodyLines(lines) {
|
|
136
|
+
const body = /* @__PURE__ */ new Set();
|
|
137
|
+
const header = /^(\s*)(?:(?:-[ \t]+)?[^#\n]*?:|-)[ \t]*[|>][-+0-9]*[ \t]*(?:#.*)?$/;
|
|
138
|
+
for (let i = 0; i < lines.length; i++) {
|
|
139
|
+
const line = (lines[i] ?? "").replace(/\r$/, "");
|
|
140
|
+
const match = header.exec(line);
|
|
141
|
+
if (!match) continue;
|
|
142
|
+
const baseIndent = match[1]?.length ?? 0;
|
|
143
|
+
let j = i + 1;
|
|
144
|
+
for (; j < lines.length; j++) {
|
|
145
|
+
const next = (lines[j] ?? "").replace(/\r$/, "");
|
|
146
|
+
if (next.trim() === "") {
|
|
147
|
+
body.add(j);
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
const indent = next.length - next.trimStart().length;
|
|
151
|
+
if (indent <= baseIndent) break;
|
|
152
|
+
body.add(j);
|
|
153
|
+
}
|
|
154
|
+
i = j - 1;
|
|
155
|
+
}
|
|
156
|
+
return body;
|
|
157
|
+
}
|
|
158
|
+
function unquoteKey(key) {
|
|
159
|
+
const quoted = /^(["'])(.*)\1$/.exec(key);
|
|
160
|
+
return quoted ? quoted[2] ?? "" : key;
|
|
161
|
+
}
|
|
127
162
|
function extractValue(content, afterColonOffset) {
|
|
128
163
|
const lineEnd = content.indexOf("\n", afterColonOffset);
|
|
129
164
|
const rest = content.slice(afterColonOffset, lineEnd < 0 ? void 0 : lineEnd);
|
|
@@ -155,4 +190,4 @@ export {
|
|
|
155
190
|
detectLang,
|
|
156
191
|
parseSymbols
|
|
157
192
|
};
|
|
158
|
-
//# sourceMappingURL=yaml-parser-
|
|
193
|
+
//# sourceMappingURL=yaml-parser-7BJN544B.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "WrongStack built-in tools: read/write/edit, bash/exec, grep/glob, git, fetch, test, lint, and more.",
|
|
6
6
|
"repository": {
|
|
@@ -237,10 +237,10 @@
|
|
|
237
237
|
"@msgpack/msgpack": "^3.1.3",
|
|
238
238
|
"@playwright/test": "^1.63.0",
|
|
239
239
|
"@typescript/typescript6": "^6.0.2",
|
|
240
|
-
"@wrongstack/core": "1.0.
|
|
241
|
-
"@wrongstack/kanban": "1.0.
|
|
242
|
-
"@wrongstack/persistence": "1.0.
|
|
243
|
-
"@wrongstack/primitives": "1.0.
|
|
240
|
+
"@wrongstack/core": "1.0.12",
|
|
241
|
+
"@wrongstack/kanban": "1.0.12",
|
|
242
|
+
"@wrongstack/persistence": "1.0.12",
|
|
243
|
+
"@wrongstack/primitives": "1.0.12",
|
|
244
244
|
"tree-sitter-wasm": "1.1.8",
|
|
245
245
|
"turndown": "^7.2.4",
|
|
246
246
|
"undici": "^8.10.2",
|