@ttsc/graph 0.19.2 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/TtscGraphApplication.js +5 -1
- package/lib/TtscGraphApplication.js.map +1 -1
- package/lib/bin.js +15 -3
- package/lib/bin.js.map +1 -1
- package/lib/index.d.ts +13 -2
- package/lib/index.js +25 -30
- package/lib/index.js.map +1 -1
- package/lib/launcherArgs.d.ts +24 -0
- package/lib/launcherArgs.js +136 -0
- package/lib/launcherArgs.js.map +1 -0
- package/lib/model/TtscGraphMemory.d.ts +9 -5
- package/lib/model/TtscGraphMemory.js +35 -58
- package/lib/model/TtscGraphMemory.js.map +1 -1
- package/lib/model/TtscGraphNodeId.d.ts +17 -0
- package/lib/model/TtscGraphNodeId.js +69 -0
- package/lib/model/TtscGraphNodeId.js.map +1 -0
- package/lib/model/TtscGraphSession.d.ts +23 -7
- package/lib/model/TtscGraphSession.js +423 -171
- package/lib/model/TtscGraphSession.js.map +1 -1
- package/lib/model/TtscGraphSourceReader.d.ts +27 -0
- package/lib/model/TtscGraphSourceReader.js +97 -0
- package/lib/model/TtscGraphSourceReader.js.map +1 -0
- package/lib/model/loadGraph.d.ts +14 -0
- package/lib/model/loadGraph.js +256 -143
- package/lib/model/loadGraph.js.map +1 -1
- package/lib/reduce.d.ts +4 -1
- package/lib/reduce.js +112 -29
- package/lib/reduce.js.map +1 -1
- package/lib/resolveGraphBinary.d.ts +9 -3
- package/lib/resolveGraphBinary.js +9 -3
- package/lib/resolveGraphBinary.js.map +1 -1
- package/lib/server/createServer.js +22 -11
- package/lib/server/createServer.js.map +1 -1
- package/lib/server/pathPolicy.d.ts +6 -0
- package/lib/server/pathPolicy.js +10 -1
- package/lib/server/pathPolicy.js.map +1 -1
- package/lib/server/resolveHandle.js +22 -18
- package/lib/server/resolveHandle.js.map +1 -1
- package/lib/server/resultAudit.d.ts +56 -14
- package/lib/server/resultAudit.js +90 -24
- package/lib/server/resultAudit.js.map +1 -1
- package/lib/server/resultNext.d.ts +5 -0
- package/lib/server/resultNext.js.map +1 -1
- package/lib/server/runDetails.d.ts +9 -2
- package/lib/server/runDetails.js +132 -157
- package/lib/server/runDetails.js.map +1 -1
- package/lib/server/runEntrypoints.js +1 -1
- package/lib/server/runEntrypoints.js.map +1 -1
- package/lib/server/runLookup.js +1 -1
- package/lib/server/runLookup.js.map +1 -1
- package/lib/server/runTour.js +113 -30
- package/lib/server/runTour.js.map +1 -1
- package/lib/server/runTrace.d.ts +22 -0
- package/lib/server/runTrace.js +293 -63
- package/lib/server/runTrace.js.map +1 -1
- package/lib/structures/ITtscGraphApplication.d.ts +8 -7
- package/lib/structures/ITtscGraphDetails.d.ts +18 -8
- package/lib/structures/ITtscGraphDump.d.ts +13 -13
- package/lib/structures/ITtscGraphNode.d.ts +71 -0
- package/lib/structures/ITtscGraphTour.d.ts +1 -1
- package/lib/structures/ITtscGraphTrace.d.ts +1 -1
- package/lib/view.js +18 -28
- package/lib/view.js.map +1 -1
- package/package.json +7 -4
- package/src/TtscGraphApplication.ts +8 -1
- package/src/bin.ts +13 -3
- package/src/index.ts +35 -27
- package/src/launcherArgs.ts +168 -0
- package/src/model/TtscGraphMemory.ts +34 -60
- package/src/model/TtscGraphNodeId.ts +77 -0
- package/src/model/TtscGraphSession.ts +253 -53
- package/src/model/TtscGraphSourceReader.ts +117 -0
- package/src/model/loadGraph.ts +6 -1
- package/src/reduce.ts +136 -31
- package/src/resolveGraphBinary.ts +9 -3
- package/src/server/createServer.ts +12 -2
- package/src/server/pathPolicy.ts +10 -1
- package/src/server/resolveHandle.ts +21 -22
- package/src/server/resultAudit.ts +93 -23
- package/src/server/resultNext.ts +6 -0
- package/src/server/runDetails.ts +134 -165
- package/src/server/runEntrypoints.ts +1 -1
- package/src/server/runLookup.ts +1 -1
- package/src/server/runTour.ts +133 -39
- package/src/server/runTrace.ts +401 -65
- package/src/structures/ITtscGraphApplication.ts +8 -7
- package/src/structures/ITtscGraphDetails.ts +18 -8
- package/src/structures/ITtscGraphDump.ts +13 -13
- package/src/structures/ITtscGraphNode.ts +80 -0
- package/src/structures/ITtscGraphTour.ts +1 -1
- package/src/structures/ITtscGraphTrace.ts +1 -1
- package/src/view.ts +25 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveHandle.js","sourceRoot":"","sources":["../../src/server/resolveHandle.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"resolveHandle.js","sourceRoot":"","sources":["../../src/server/resolveHandle.ts"],"names":[],"mappings":";;;AACA,8DAAgE;AAEhE,mDAA8C;AAC9C,6CAA6C;AAO7C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,4BACE,KAAsB,EACtB,MAAc,EACd,cAAc,GAAG,EAAE;IAEnB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAE9C,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC/C,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,UAAU,KAAK,SAAS;QAC9D,OAAO,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IAE7C,MAAM,MAAM,GAAG,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACnD,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,UAAU,KAAK,SAAS;QAC9D,OAAO,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IAE7C,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;IAC5D,IAAI,MAAM,KAAK,SAAS;QACtB,OAAO,IAAI,CAAC,KAAK,EAAE,gBAAgB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AAC,CAAC,GAAG,IAAA,2BAAW,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC1E,IAAI,IAAI,CAAC,QAAQ;QAAE,KAAK,IAAI,EAAE,CAAC;IAC/B,IAAI,IAAI,CAAC,QAAQ;QAAE,KAAK,IAAI,EAAE,CAAC;IAC/B,IAAI,IAAA,0BAAa,EAAC,IAAI,CAAC,IAAI,CAAC;QAAE,KAAK,IAAI,EAAE,CAAC;IAC1C,MAAM,MAAM,GACV,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC;IAClE,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACjD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -26,12 +26,22 @@
|
|
|
26
26
|
* anything was checked afterwards — lost two points and put the file reads
|
|
27
27
|
* back.
|
|
28
28
|
*
|
|
29
|
-
* So the weight is carried by
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
29
|
+
* So the weight is carried by named provenance, not by a loud voice. State who
|
|
30
|
+
* resolved the fact and what this payload did with it, and the instruction that
|
|
31
|
+
* follows reads as a conclusion rather than a demand. Never mystify the result,
|
|
32
|
+
* and never insult the reader for checking it.
|
|
33
|
+
*
|
|
34
|
+
* The claim has to be one this code can keep. An earlier wording said the
|
|
35
|
+
* server assembled the result and "verified them again on the way out" — a
|
|
36
|
+
* second pass, by a second party, after assembly. No such pass exists: this
|
|
37
|
+
* layer holds no `Program` and no checker, it runs one pure projection over an
|
|
38
|
+
* in-memory `TtscGraphMemory`, and it selects a constant by request type
|
|
39
|
+
* (#818). What is true is stronger than it sounds and is what the text now
|
|
40
|
+
* says: the compiler resolved these facts when the snapshot was built, the
|
|
41
|
+
* graph holds what it resolved, and this result is a projection of exactly
|
|
42
|
+
* those facts that adds none of its own. A reader who checks that claim finds
|
|
43
|
+
* it holds; a reader who checked the old one found a promise the code could not
|
|
44
|
+
* have kept.
|
|
35
45
|
*
|
|
36
46
|
* ## Two guarantees, not one
|
|
37
47
|
*
|
|
@@ -47,14 +57,18 @@
|
|
|
47
57
|
* payload, and told it to stop where the shortlist's coverage was exactly what
|
|
48
58
|
* needed judging.
|
|
49
59
|
*
|
|
50
|
-
* So
|
|
51
|
-
* from an explicit handle or structure (`trace`, `
|
|
52
|
-
* result is what the graph holds for what you named, bounded
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
60
|
+
* So the audits split by what the reader must judge. {@link RESULT_AUDIT} covers
|
|
61
|
+
* the walks from an explicit handle or structure (`trace`, `overview`): the
|
|
62
|
+
* result is what the graph holds for what you named, bounded where `truncated`
|
|
63
|
+
* says. {@link RESULT_AUDIT_DETAILS} covers `details`, whose result is not one
|
|
64
|
+
* bounded whole but two halves — a symbol's own shape, returned complete, and
|
|
65
|
+
* its fan-out, returned as a slice with `trace` for the rest — so it names
|
|
66
|
+
* which half to trust outright and which to follow.
|
|
67
|
+
* {@link RESULT_AUDIT_SELECTION} covers the ranked shortlists (`lookup`,
|
|
68
|
+
* `entrypoints`, `tour`): it keeps the same fact-verification and adds that the
|
|
69
|
+
* _selection_ is heuristic, so whether the shortlist covers the question is the
|
|
70
|
+
* caller's to judge — and a follow-up request or a read of a cited span is a
|
|
71
|
+
* sound next step, not a failure to trust the result.
|
|
58
72
|
*
|
|
59
73
|
* Keep both narrow, and keep the stop-or-continue decision with the result's
|
|
60
74
|
* `next`, so neither contradicts a partial result that legitimately asks for
|
|
@@ -70,5 +84,33 @@ export declare const RESULT_AUDIT: string;
|
|
|
70
84
|
* many — is heuristic, so coverage is the caller's to judge.
|
|
71
85
|
*/
|
|
72
86
|
export declare const RESULT_AUDIT_SELECTION: string;
|
|
87
|
+
/**
|
|
88
|
+
* The audit for `details`, whose contract is not the other exact operations'.
|
|
89
|
+
*
|
|
90
|
+
* `trace` walks and marks where the walk was cut with `truncated`; `details`
|
|
91
|
+
* does not walk. It resolves a named handle, and its result splits in two. What
|
|
92
|
+
* a symbol _is_ — its members, its values, its signature — is bounded by the
|
|
93
|
+
* declaration and returned whole, so the old "trust it, do not open the file"
|
|
94
|
+
* is finally true of it rather than contradicted by a capped member list. What
|
|
95
|
+
* a symbol _reaches or is reached by_ — its calls, its type references, its
|
|
96
|
+
* implementers, its dependents — is bounded by how widely it is used, not by
|
|
97
|
+
* the symbol, so returning it whole is a `trace`/impact answer of a thousand
|
|
98
|
+
* refs in a "what is this" call. That half is a short orientation slice, and
|
|
99
|
+
* the audit has to say which half is which so the reader trusts the complete
|
|
100
|
+
* one and reaches for `trace` on the other, instead of reading the file for a
|
|
101
|
+
* member list that is already here.
|
|
102
|
+
*/
|
|
103
|
+
export declare const RESULT_AUDIT_DETAILS: string;
|
|
104
|
+
/**
|
|
105
|
+
* The details audit for a result whose member list a caller cap truncated.
|
|
106
|
+
*
|
|
107
|
+
* The unconditional text tells the reader a symbol's members are complete and
|
|
108
|
+
* not to open the file for them. After `memberLimit` cuts the list that is
|
|
109
|
+
* false, and it is the one claim a caller cannot check from the result: the
|
|
110
|
+
* members that were removed left nothing behind to notice. So the claim is
|
|
111
|
+
* withdrawn for exactly that half and everything else the audit verifies is
|
|
112
|
+
* kept.
|
|
113
|
+
*/
|
|
114
|
+
export declare const RESULT_AUDIT_DETAILS_CAPPED: string;
|
|
73
115
|
/** The escape branch carries no graph facts, so it claims none. */
|
|
74
116
|
export declare const RESULT_AUDIT_ESCAPE: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RESULT_AUDIT_ESCAPE = exports.RESULT_AUDIT_SELECTION = exports.RESULT_AUDIT = void 0;
|
|
3
|
+
exports.RESULT_AUDIT_ESCAPE = exports.RESULT_AUDIT_DETAILS_CAPPED = exports.RESULT_AUDIT_DETAILS = exports.RESULT_AUDIT_SELECTION = exports.RESULT_AUDIT = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* The audit stamped as the first property of every
|
|
6
6
|
* {@link ITtscGraphApplication.IOutput}. Because it serializes before `result`,
|
|
@@ -29,12 +29,22 @@ exports.RESULT_AUDIT_ESCAPE = exports.RESULT_AUDIT_SELECTION = exports.RESULT_AU
|
|
|
29
29
|
* anything was checked afterwards — lost two points and put the file reads
|
|
30
30
|
* back.
|
|
31
31
|
*
|
|
32
|
-
* So the weight is carried by
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
32
|
+
* So the weight is carried by named provenance, not by a loud voice. State who
|
|
33
|
+
* resolved the fact and what this payload did with it, and the instruction that
|
|
34
|
+
* follows reads as a conclusion rather than a demand. Never mystify the result,
|
|
35
|
+
* and never insult the reader for checking it.
|
|
36
|
+
*
|
|
37
|
+
* The claim has to be one this code can keep. An earlier wording said the
|
|
38
|
+
* server assembled the result and "verified them again on the way out" — a
|
|
39
|
+
* second pass, by a second party, after assembly. No such pass exists: this
|
|
40
|
+
* layer holds no `Program` and no checker, it runs one pure projection over an
|
|
41
|
+
* in-memory `TtscGraphMemory`, and it selects a constant by request type
|
|
42
|
+
* (#818). What is true is stronger than it sounds and is what the text now
|
|
43
|
+
* says: the compiler resolved these facts when the snapshot was built, the
|
|
44
|
+
* graph holds what it resolved, and this result is a projection of exactly
|
|
45
|
+
* those facts that adds none of its own. A reader who checks that claim finds
|
|
46
|
+
* it holds; a reader who checked the old one found a promise the code could not
|
|
47
|
+
* have kept.
|
|
38
48
|
*
|
|
39
49
|
* ## Two guarantees, not one
|
|
40
50
|
*
|
|
@@ -50,14 +60,18 @@ exports.RESULT_AUDIT_ESCAPE = exports.RESULT_AUDIT_SELECTION = exports.RESULT_AU
|
|
|
50
60
|
* payload, and told it to stop where the shortlist's coverage was exactly what
|
|
51
61
|
* needed judging.
|
|
52
62
|
*
|
|
53
|
-
* So
|
|
54
|
-
* from an explicit handle or structure (`trace`, `
|
|
55
|
-
* result is what the graph holds for what you named, bounded
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
63
|
+
* So the audits split by what the reader must judge. {@link RESULT_AUDIT} covers
|
|
64
|
+
* the walks from an explicit handle or structure (`trace`, `overview`): the
|
|
65
|
+
* result is what the graph holds for what you named, bounded where `truncated`
|
|
66
|
+
* says. {@link RESULT_AUDIT_DETAILS} covers `details`, whose result is not one
|
|
67
|
+
* bounded whole but two halves — a symbol's own shape, returned complete, and
|
|
68
|
+
* its fan-out, returned as a slice with `trace` for the rest — so it names
|
|
69
|
+
* which half to trust outright and which to follow.
|
|
70
|
+
* {@link RESULT_AUDIT_SELECTION} covers the ranked shortlists (`lookup`,
|
|
71
|
+
* `entrypoints`, `tour`): it keeps the same fact-verification and adds that the
|
|
72
|
+
* _selection_ is heuristic, so whether the shortlist covers the question is the
|
|
73
|
+
* caller's to judge — and a follow-up request or a read of a cited span is a
|
|
74
|
+
* sound next step, not a failure to trust the result.
|
|
61
75
|
*
|
|
62
76
|
* Keep both narrow, and keep the stop-or-continue decision with the result's
|
|
63
77
|
* `next`, so neither contradicts a partial result that legitimately asks for
|
|
@@ -68,10 +82,10 @@ exports.RESULT_AUDIT_ESCAPE = exports.RESULT_AUDIT_SELECTION = exports.RESULT_AU
|
|
|
68
82
|
exports.RESULT_AUDIT = `
|
|
69
83
|
AUDITED BEFORE RETURNING. READ FIRST.
|
|
70
84
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
85
|
+
Every fact in this \`result\` — each name, span, edge, signature, and step — was resolved by
|
|
86
|
+
the TypeScript compiler against the program for the snapshot this call synced to, and the
|
|
87
|
+
graph holds what it resolved. This \`result\` is a projection of exactly those facts and adds
|
|
88
|
+
none of its own, so for this snapshot a fact here cannot disagree with the program.
|
|
75
89
|
|
|
76
90
|
This is the structure the graph holds for the handles you named, not a shortlist matched
|
|
77
91
|
against a natural-language question. Trust every fact it gives and re-verify none: a returned
|
|
@@ -90,11 +104,11 @@ after you edit the source.
|
|
|
90
104
|
exports.RESULT_AUDIT_SELECTION = `
|
|
91
105
|
AUDITED BEFORE RETURNING. READ FIRST.
|
|
92
106
|
|
|
93
|
-
Each fact in this \`result\` — every name, span, edge, and signature — was
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
confirm it.
|
|
107
|
+
Each fact in this \`result\` — every name, span, edge, and signature — was resolved by the
|
|
108
|
+
TypeScript compiler against the program for the snapshot this call synced to, and the graph
|
|
109
|
+
holds what it resolved. This \`result\` is a projection of exactly those facts and adds none of
|
|
110
|
+
its own, so for this snapshot a fact here cannot disagree with the program: a returned span
|
|
111
|
+
is the citation, not a cue to open the file to confirm it.
|
|
98
112
|
|
|
99
113
|
What was selected is heuristic, not exhaustive. This result was matched against your
|
|
100
114
|
natural-language question, scored and ranked, held to a few hits per file, and cut to a
|
|
@@ -105,6 +119,58 @@ span is a sound next step, not a failure to trust the result.
|
|
|
105
119
|
|
|
106
120
|
Follow \`next\` for where that leaves the question.
|
|
107
121
|
`.trim();
|
|
122
|
+
/**
|
|
123
|
+
* The audit for `details`, whose contract is not the other exact operations'.
|
|
124
|
+
*
|
|
125
|
+
* `trace` walks and marks where the walk was cut with `truncated`; `details`
|
|
126
|
+
* does not walk. It resolves a named handle, and its result splits in two. What
|
|
127
|
+
* a symbol _is_ — its members, its values, its signature — is bounded by the
|
|
128
|
+
* declaration and returned whole, so the old "trust it, do not open the file"
|
|
129
|
+
* is finally true of it rather than contradicted by a capped member list. What
|
|
130
|
+
* a symbol _reaches or is reached by_ — its calls, its type references, its
|
|
131
|
+
* implementers, its dependents — is bounded by how widely it is used, not by
|
|
132
|
+
* the symbol, so returning it whole is a `trace`/impact answer of a thousand
|
|
133
|
+
* refs in a "what is this" call. That half is a short orientation slice, and
|
|
134
|
+
* the audit has to say which half is which so the reader trusts the complete
|
|
135
|
+
* one and reaches for `trace` on the other, instead of reading the file for a
|
|
136
|
+
* member list that is already here.
|
|
137
|
+
*/
|
|
138
|
+
exports.RESULT_AUDIT_DETAILS = `
|
|
139
|
+
AUDITED BEFORE RETURNING. READ FIRST.
|
|
140
|
+
|
|
141
|
+
Every fact in this \`result\` — each name, span, edge, signature, member, and value — was
|
|
142
|
+
resolved by the TypeScript compiler against the program for the snapshot this call synced to,
|
|
143
|
+
and the graph holds what it resolved. This \`result\` is a projection of exactly those facts
|
|
144
|
+
and adds none of its own, so for this snapshot a fact here cannot disagree with the program.
|
|
145
|
+
|
|
146
|
+
This is the structure the graph holds for the handles you named. What a symbol is — its
|
|
147
|
+
members, its values, its signature — is complete: trust it and do not open the file to read
|
|
148
|
+
what is already here. What a symbol reaches or is reached by — its calls, its type
|
|
149
|
+
references, its implementers, and under \`neighbors\` its dependents — is a short orientation
|
|
150
|
+
slice, not the whole set, because that grows with how widely a symbol is used; \`trace\`
|
|
151
|
+
follows it in full.
|
|
152
|
+
|
|
153
|
+
Follow \`next\`: answer from this result, and re-call the graph only when it says inspect, or
|
|
154
|
+
after you edit the source.
|
|
155
|
+
`.trim();
|
|
156
|
+
/**
|
|
157
|
+
* The details audit for a result whose member list a caller cap truncated.
|
|
158
|
+
*
|
|
159
|
+
* The unconditional text tells the reader a symbol's members are complete and
|
|
160
|
+
* not to open the file for them. After `memberLimit` cuts the list that is
|
|
161
|
+
* false, and it is the one claim a caller cannot check from the result: the
|
|
162
|
+
* members that were removed left nothing behind to notice. So the claim is
|
|
163
|
+
* withdrawn for exactly that half and everything else the audit verifies is
|
|
164
|
+
* kept.
|
|
165
|
+
*/
|
|
166
|
+
exports.RESULT_AUDIT_DETAILS_CAPPED = exports.RESULT_AUDIT_DETAILS.replace(
|
|
167
|
+
// Matched by shape rather than by exact spelling. This file is stored with
|
|
168
|
+
// CRLF, so a needle carrying a plain newline never matches the template
|
|
169
|
+
// literal's real line breaks and the replacement would silently do nothing —
|
|
170
|
+
// the capped audit would come out identical to the uncapped one.
|
|
171
|
+
/What a symbol is[\s\S]*?what is already here\./, "What a symbol is — its values and its signature — is complete. Its member list was cut to " +
|
|
172
|
+
"the `memberLimit` you asked for, so it is a slice, not the whole set: re-request with a " +
|
|
173
|
+
"larger cap for the rest.");
|
|
108
174
|
/** The escape branch carries no graph facts, so it claims none. */
|
|
109
175
|
exports.RESULT_AUDIT_ESCAPE = "This escape carries no graph facts to audit.";
|
|
110
176
|
//# sourceMappingURL=resultAudit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resultAudit.js","sourceRoot":"","sources":["../../src/server/resultAudit.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"resultAudit.js","sourceRoot":"","sources":["../../src/server/resultAudit.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACU,QAAA,YAAY,GAAW;;;;;;;;;;;;;;;CAenC,CAAC,IAAI,EAAE,CAAC;AAET;;;;;GAKG;AACU,QAAA,sBAAsB,GAAW;;;;;;;;;;;;;;;;;CAiB7C,CAAC,IAAI,EAAE,CAAC;AAET;;;;;;;;;;;;;;;GAeG;AACU,QAAA,oBAAoB,GAAW;;;;;;;;;;;;;;;;;CAiB3C,CAAC,IAAI,EAAE,CAAC;AAET;;;;;;;;;GASG;AACU,QAAA,2BAA2B,GAAW,QAAA,oBAAoB,CAAC,OAAO;AAC7E,2EAA2E;AAC3E,wEAAwE;AACxE,6EAA6E;AAC7E,iEAAiE;AACjE,gDAAgD,EAChD,4FAA4F;IAC1F,0FAA0F;IAC1F,0BAA0B,CAC7B,CAAC;AAEF,mEAAmE;AACtD,QAAA,mBAAmB,GAC9B,8CAA8C,CAAC"}
|
|
@@ -5,5 +5,10 @@ export interface IRunnerOutput<T> {
|
|
|
5
5
|
result: T;
|
|
6
6
|
/** How to use the result next. */
|
|
7
7
|
next: ITtscGraphNext;
|
|
8
|
+
/**
|
|
9
|
+
* Set when a caller cap removed members from the result, so the audit can
|
|
10
|
+
* stop claiming the symbol's members are complete.
|
|
11
|
+
*/
|
|
12
|
+
membersCapped?: boolean;
|
|
8
13
|
}
|
|
9
14
|
export declare function resultNext(action: ITtscGraphNext["action"], reason: string, request?: ITtscGraphNext["request"]): ITtscGraphNext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resultNext.js","sourceRoot":"","sources":["../../src/server/resultNext.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"resultNext.js","sourceRoot":"","sources":["../../src/server/resultNext.ts"],"names":[],"mappings":";;;AAiBA,oBACE,MAAgC,EAChC,MAAc,EACd,OAAmC;IAEnC,OAAO;QACL,MAAM;QACN,MAAM;QACN,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9C,CAAC;AACJ,CAAC"}
|
|
@@ -27,10 +27,17 @@ export declare function edgeEvidenceOf(edge: ITtscGraphEdge): ITtscGraphEvidence
|
|
|
27
27
|
* declaration's documentation, not the body of the work: an index that lists a
|
|
28
28
|
* symbol with what it is for is doing an index's job.
|
|
29
29
|
*/
|
|
30
|
-
export declare function docOf(
|
|
30
|
+
export declare function docOf(graph: TtscGraphMemory, node: ITtscGraphNode): string | undefined;
|
|
31
31
|
/**
|
|
32
32
|
* The declaration signature: the head of the declaration up to and including
|
|
33
33
|
* the line that opens its body (`{`), or the single declaration line when there
|
|
34
34
|
* is no brace, capped so a wrapped signature cannot run away.
|
|
35
|
+
*
|
|
36
|
+
* It never runs past the declaration's own span. The stop used to be the brace,
|
|
37
|
+
* the trailing semicolon, or the line cap, and a declaration ending in none of
|
|
38
|
+
* them read its neighbors instead: an enum member ends in a comma, so `VIEW`
|
|
39
|
+
* came back as itself plus the two members after it and the closing brace. The
|
|
40
|
+
* span is the fact that says where the declaration ends, and it was already on
|
|
41
|
+
* the node.
|
|
35
42
|
*/
|
|
36
|
-
export declare function signatureOf(
|
|
43
|
+
export declare function signatureOf(graph: TtscGraphMemory, node: ITtscGraphNode): string | undefined;
|