@ttsc/graph 0.18.3 → 0.19.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/README.md +231 -36
- package/lib/TtscGraphApplication.d.ts +4 -3
- package/lib/TtscGraphApplication.js +54 -19
- package/lib/TtscGraphApplication.js.map +1 -1
- package/lib/index.d.ts +9 -4
- package/lib/index.js +24 -5
- package/lib/index.js.map +1 -1
- package/lib/model/TtscGraphMemory.js +80 -22
- package/lib/model/TtscGraphMemory.js.map +1 -1
- package/lib/model/TtscGraphSession.d.ts +36 -0
- package/lib/model/TtscGraphSession.js +457 -0
- package/lib/model/TtscGraphSession.js.map +1 -0
- package/lib/model/loadGraph.d.ts +3 -3
- package/lib/model/loadGraph.js +94 -141
- package/lib/model/loadGraph.js.map +1 -1
- package/lib/resolveGraphBinary.d.ts +4 -2
- package/lib/resolveGraphBinary.js +7 -3
- package/lib/resolveGraphBinary.js.map +1 -1
- package/lib/server/createServer.d.ts +16 -9
- package/lib/server/createServer.js +286 -190
- package/lib/server/createServer.js.map +1 -1
- package/lib/server/exportSurface.d.ts +26 -0
- package/lib/server/exportSurface.js +44 -0
- package/lib/server/exportSurface.js.map +1 -0
- package/lib/server/resolveHandle.d.ts +26 -1
- package/lib/server/resolveHandle.js +124 -4
- package/lib/server/resolveHandle.js.map +1 -1
- package/lib/server/resultAudit.d.ts +74 -0
- package/lib/server/resultAudit.js +110 -0
- package/lib/server/resultAudit.js.map +1 -0
- package/lib/server/resultNext.d.ts +9 -0
- package/lib/server/resultNext.js +11 -0
- package/lib/server/resultNext.js.map +1 -0
- package/lib/server/runDetails.d.ts +15 -3
- package/lib/server/runDetails.js +105 -23
- package/lib/server/runDetails.js.map +1 -1
- package/lib/server/runEntrypoints.d.ts +2 -1
- package/lib/server/runEntrypoints.js +17 -10
- package/lib/server/runEntrypoints.js.map +1 -1
- package/lib/server/runLookup.d.ts +2 -1
- package/lib/server/runLookup.js +21 -9
- package/lib/server/runLookup.js.map +1 -1
- package/lib/server/runOverview.d.ts +2 -1
- package/lib/server/runOverview.js +5 -4
- package/lib/server/runOverview.js.map +1 -1
- package/lib/server/runTour.d.ts +2 -1
- package/lib/server/runTour.js +707 -331
- package/lib/server/runTour.js.map +1 -1
- package/lib/server/runTrace.d.ts +2 -1
- package/lib/server/runTrace.js +234 -54
- package/lib/server/runTrace.js.map +1 -1
- package/lib/server/startServer.d.ts +3 -2
- package/lib/server/startServer.js +13 -7
- package/lib/server/startServer.js.map +1 -1
- package/lib/structures/ITtscGraphApplication.d.ts +122 -114
- package/lib/structures/ITtscGraphDecorator.d.ts +4 -7
- package/lib/structures/ITtscGraphDetails.d.ts +51 -43
- package/lib/structures/ITtscGraphDump.d.ts +36 -11
- package/lib/structures/ITtscGraphEdge.d.ts +4 -6
- package/lib/structures/ITtscGraphEntrypoints.d.ts +10 -27
- package/lib/structures/ITtscGraphEscape.d.ts +6 -16
- package/lib/structures/ITtscGraphEvidence.d.ts +5 -8
- package/lib/structures/ITtscGraphLookup.d.ts +9 -20
- package/lib/structures/ITtscGraphNext.d.ts +10 -7
- package/lib/structures/ITtscGraphNode.d.ts +17 -8
- package/lib/structures/ITtscGraphOverview.d.ts +10 -14
- package/lib/structures/ITtscGraphSpan.d.ts +29 -0
- package/lib/structures/{ITtscGraphDiagnostic.js → ITtscGraphSpan.js} +1 -1
- package/lib/structures/ITtscGraphSpan.js.map +1 -0
- package/lib/structures/ITtscGraphTour.d.ts +65 -23
- package/lib/structures/ITtscGraphTrace.d.ts +72 -49
- package/lib/structures/TtscGraphEdgeKind.d.ts +7 -1
- package/lib/structures/index.d.ts +1 -1
- package/lib/structures/index.js +1 -1
- package/lib/structures/index.js.map +1 -1
- package/lib/view.js +3 -1
- package/lib/view.js.map +1 -1
- package/package.json +4 -4
- package/src/TtscGraphApplication.ts +66 -31
- package/src/index.ts +23 -5
- package/src/model/TtscGraphMemory.ts +86 -22
- package/src/model/TtscGraphSession.ts +204 -0
- package/src/model/loadGraph.ts +6 -4
- package/src/resolveGraphBinary.ts +7 -3
- package/src/server/createServer.ts +24 -17
- package/src/server/exportSurface.ts +40 -0
- package/src/server/resolveHandle.ts +141 -4
- package/src/server/resultAudit.ts +109 -0
- package/src/server/resultNext.ts +22 -0
- package/src/server/runDetails.ts +112 -28
- package/src/server/runEntrypoints.ts +26 -17
- package/src/server/runLookup.ts +29 -18
- package/src/server/runOverview.ts +9 -10
- package/src/server/runTour.ts +764 -363
- package/src/server/runTrace.ts +265 -71
- package/src/server/startServer.ts +13 -8
- package/src/structures/ITtscGraphApplication.ts +124 -114
- package/src/structures/ITtscGraphDecorator.ts +4 -7
- package/src/structures/ITtscGraphDetails.ts +60 -46
- package/src/structures/ITtscGraphDump.ts +41 -11
- package/src/structures/ITtscGraphEdge.ts +4 -6
- package/src/structures/ITtscGraphEntrypoints.ts +10 -30
- package/src/structures/ITtscGraphEscape.ts +6 -19
- package/src/structures/ITtscGraphEvidence.ts +5 -8
- package/src/structures/ITtscGraphLookup.ts +9 -22
- package/src/structures/ITtscGraphNext.ts +10 -7
- package/src/structures/ITtscGraphNode.ts +18 -8
- package/src/structures/ITtscGraphOverview.ts +10 -17
- package/src/structures/ITtscGraphSpan.ts +33 -0
- package/src/structures/ITtscGraphTour.ts +70 -28
- package/src/structures/ITtscGraphTrace.ts +82 -51
- package/src/structures/TtscGraphEdgeKind.ts +7 -0
- package/src/structures/index.ts +1 -1
- package/src/view.ts +3 -1
- package/lib/server/accessAliases.d.ts +0 -8
- package/lib/server/accessAliases.js +0 -53
- package/lib/server/accessAliases.js.map +0 -1
- package/lib/server/resultGuide.d.ts +0 -3
- package/lib/server/resultGuide.js +0 -16
- package/lib/server/resultGuide.js.map +0 -1
- package/lib/structures/ITtscGraphDiagnostic.d.ts +0 -27
- package/lib/structures/ITtscGraphDiagnostic.js.map +0 -1
- package/src/server/accessAliases.ts +0 -55
- package/src/server/resultGuide.ts +0 -20
- package/src/structures/ITtscGraphDiagnostic.ts +0 -34
package/lib/model/loadGraph.js
CHANGED
|
@@ -37,7 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.loadGraph = loadGraph;
|
|
40
|
-
const
|
|
40
|
+
const _assertGuard_1 = __importStar(require("typia/lib/internal/_assertGuard"));
|
|
41
41
|
const node_child_process_1 = require("node:child_process");
|
|
42
42
|
const typia_1 = __importDefault(require("typia"));
|
|
43
43
|
const nativeExecutable_1 = require("../nativeExecutable");
|
|
@@ -49,9 +49,9 @@ const TtscGraphMemory_1 = require("./TtscGraphMemory");
|
|
|
49
49
|
const MAX_DUMP_BYTES = 1024 * 1024 * 1024;
|
|
50
50
|
/**
|
|
51
51
|
* Build the resident {@link TtscGraphMemory} for a project by running `ttscgraph
|
|
52
|
-
* dump` once and loading its JSON. This is the
|
|
53
|
-
*
|
|
54
|
-
*
|
|
52
|
+
* dump` once and loading its JSON. This is the one-shot path for direct callers
|
|
53
|
+
* and the viewer. The MCP server uses `TtscGraphSession` instead so source
|
|
54
|
+
* edits refresh a resident compiler session.
|
|
55
55
|
*
|
|
56
56
|
* Throws when the binary cannot be resolved, the dump command fails, or its
|
|
57
57
|
* output is not a readable graph — the server surfaces the failure rather than
|
|
@@ -60,7 +60,9 @@ const MAX_DUMP_BYTES = 1024 * 1024 * 1024;
|
|
|
60
60
|
function loadGraph(options = {}) {
|
|
61
61
|
const cwd = options.cwd ?? process.cwd();
|
|
62
62
|
const tsconfig = options.tsconfig ?? "tsconfig.json";
|
|
63
|
-
|
|
63
|
+
// Resolve the platform binary from the selected project cwd, not the caller's
|
|
64
|
+
// process directory, so a one-shot load names its own installation.
|
|
65
|
+
const binary = options.binary ?? (0, resolveGraphBinary_1.resolveGraphBinary)(process.env, cwd);
|
|
64
66
|
if (binary === null) {
|
|
65
67
|
throw new Error("@ttsc/graph: could not resolve the ttscgraph binary. " +
|
|
66
68
|
"Install `ttsc` so its platform package is present, " +
|
|
@@ -93,304 +95,255 @@ function parseDump(json) {
|
|
|
93
95
|
return (() => {
|
|
94
96
|
const _iv0 = new Set(["class", "enum", "external_symbol", "file", "function", "interface", "method", "module", "namespace", "package", "parameter", "property", "type", "variable"]);
|
|
95
97
|
const _ip0 = input => "string" === typeof input["name"];
|
|
96
|
-
const _ip1 = input => "string" === typeof input["file"];
|
|
97
98
|
const _iv1 = new Set(["abstract", "async", "const", "declare", "default", "export", "optional", "private", "protected", "public", "readonly", "static"]);
|
|
98
|
-
const
|
|
99
|
-
const _iv2 = new Set(["accesses", "calls", "contains", "decorates", "exports", "extends", "implements", "imports", "instantiates", "overrides", "renders", "tests", "type_ref"]);
|
|
99
|
+
const _ip1 = input => undefined === input["evidence"] || "object" === typeof input["evidence"] && null !== input["evidence"] && _io4(input["evidence"]);
|
|
100
|
+
const _iv2 = new Set(["accesses", "calls", "contains", "decorates", "dispatches", "exports", "extends", "implements", "imports", "instantiates", "overrides", "renders", "tests", "type_ref"]);
|
|
100
101
|
const _av0 = new Set(["class", "enum", "external_symbol", "file", "function", "interface", "method", "module", "namespace", "package", "parameter", "property", "type", "variable"]);
|
|
101
102
|
const _ae0 = "(\"class\" | \"enum\" | \"external_symbol\" | \"file\" | \"function\" | \"interface\" | \"method\" | \"module\" | \"namespace\" | \"package\" | \"parameter\" | \"property\" | \"type\" | \"variable\")";
|
|
102
|
-
const _ap0 = (input, _path, _exceptionable = true) => "string" === typeof input["name"] ||
|
|
103
|
+
const _ap0 = (input, _path, _exceptionable = true) => "string" === typeof input["name"] || _assertGuard_1._assertGuard(_exceptionable, {
|
|
103
104
|
method: "typia.assert",
|
|
104
105
|
path: _path + ".name",
|
|
105
106
|
expected: "string",
|
|
106
107
|
value: input["name"]
|
|
107
108
|
}, _errorFactory);
|
|
108
|
-
const _ap1 = (input, _path, _exceptionable = true) => "string" === typeof input["file"] || _a._assertGuard(_exceptionable, {
|
|
109
|
-
method: "typia.assert",
|
|
110
|
-
path: _path + ".file",
|
|
111
|
-
expected: "string",
|
|
112
|
-
value: input["file"]
|
|
113
|
-
}, _errorFactory);
|
|
114
109
|
const _av1 = new Set(["abstract", "async", "const", "declare", "default", "export", "optional", "private", "protected", "public", "readonly", "static"]);
|
|
115
110
|
const _ae1 = "(\"abstract\" | \"async\" | \"const\" | \"declare\" | \"default\" | \"export\" | \"optional\" | \"private\" | \"protected\" | \"public\" | \"readonly\" | \"static\")";
|
|
116
|
-
const
|
|
111
|
+
const _ap1 = (input, _path, _exceptionable = true) => undefined === input["evidence"] || ("object" === typeof input["evidence"] && null !== input["evidence"] || _assertGuard_1._assertGuard(_exceptionable, {
|
|
117
112
|
method: "typia.assert",
|
|
118
113
|
path: _path + ".evidence",
|
|
119
|
-
expected: "(
|
|
114
|
+
expected: "(ITtscGraphSpan | undefined)",
|
|
120
115
|
value: input["evidence"]
|
|
121
|
-
}, _errorFactory)) && _ao4(input["evidence"], _path + ".evidence", true && _exceptionable) ||
|
|
116
|
+
}, _errorFactory)) && _ao4(input["evidence"], _path + ".evidence", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
122
117
|
method: "typia.assert",
|
|
123
118
|
path: _path + ".evidence",
|
|
124
|
-
expected: "(
|
|
119
|
+
expected: "(ITtscGraphSpan | undefined)",
|
|
125
120
|
value: input["evidence"]
|
|
126
121
|
}, _errorFactory);
|
|
127
|
-
const _av2 = new Set(["accesses", "calls", "contains", "decorates", "exports", "extends", "implements", "imports", "instantiates", "overrides", "renders", "tests", "type_ref"]);
|
|
128
|
-
const _ae2 = "(\"accesses\" | \"calls\" | \"contains\" | \"decorates\" | \"exports\" | \"extends\" | \"implements\" | \"imports\" | \"instantiates\" | \"overrides\" | \"renders\" | \"tests\" | \"type_ref\")";
|
|
129
|
-
const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.project ||
|
|
122
|
+
const _av2 = new Set(["accesses", "calls", "contains", "decorates", "dispatches", "exports", "extends", "implements", "imports", "instantiates", "overrides", "renders", "tests", "type_ref"]);
|
|
123
|
+
const _ae2 = "(\"accesses\" | \"calls\" | \"contains\" | \"decorates\" | \"dispatches\" | \"exports\" | \"extends\" | \"implements\" | \"imports\" | \"instantiates\" | \"overrides\" | \"renders\" | \"tests\" | \"type_ref\")";
|
|
124
|
+
const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.project || _assertGuard_1._assertGuard(_exceptionable, {
|
|
130
125
|
method: "typia.assert",
|
|
131
126
|
path: _path + ".project",
|
|
132
127
|
expected: "string",
|
|
133
128
|
value: input.project
|
|
134
|
-
}, _errorFactory)) && ("string" === typeof input.tsconfig ||
|
|
129
|
+
}, _errorFactory)) && ("string" === typeof input.tsconfig || _assertGuard_1._assertGuard(_exceptionable, {
|
|
135
130
|
method: "typia.assert",
|
|
136
131
|
path: _path + ".tsconfig",
|
|
137
132
|
expected: "string",
|
|
138
133
|
value: input.tsconfig
|
|
139
|
-
}, _errorFactory)) && ((Array.isArray(input.nodes) ||
|
|
134
|
+
}, _errorFactory)) && ((Array.isArray(input.nodes) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
140
135
|
method: "typia.assert",
|
|
141
136
|
path: _path + ".nodes",
|
|
142
|
-
expected: "Array<
|
|
137
|
+
expected: "Array<ITtscGraphDump.INode>",
|
|
143
138
|
value: input.nodes
|
|
144
|
-
}, _errorFactory)) && input.nodes.every((elem,
|
|
139
|
+
}, _errorFactory)) && input.nodes.every((elem, _index6) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
|
|
145
140
|
method: "typia.assert",
|
|
146
|
-
path: _path + ".nodes[" +
|
|
147
|
-
expected: "
|
|
141
|
+
path: _path + ".nodes[" + _index6 + "]",
|
|
142
|
+
expected: "ITtscGraphDump.INode",
|
|
148
143
|
value: elem
|
|
149
|
-
}, _errorFactory)) && _ao1(elem, _path + ".nodes[" +
|
|
144
|
+
}, _errorFactory)) && _ao1(elem, _path + ".nodes[" + _index6 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
150
145
|
method: "typia.assert",
|
|
151
|
-
path: _path + ".nodes[" +
|
|
152
|
-
expected: "
|
|
146
|
+
path: _path + ".nodes[" + _index6 + "]",
|
|
147
|
+
expected: "ITtscGraphDump.INode",
|
|
153
148
|
value: elem
|
|
154
|
-
}, _errorFactory)) ||
|
|
149
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
155
150
|
method: "typia.assert",
|
|
156
151
|
path: _path + ".nodes",
|
|
157
|
-
expected: "Array<
|
|
152
|
+
expected: "Array<ITtscGraphDump.INode>",
|
|
158
153
|
value: input.nodes
|
|
159
|
-
}, _errorFactory)) && ((Array.isArray(input.edges) ||
|
|
154
|
+
}, _errorFactory)) && ((Array.isArray(input.edges) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
160
155
|
method: "typia.assert",
|
|
161
156
|
path: _path + ".edges",
|
|
162
|
-
expected: "Array<
|
|
157
|
+
expected: "Array<ITtscGraphDump.IEdge>",
|
|
163
158
|
value: input.edges
|
|
164
|
-
}, _errorFactory)) && input.edges.every((elem,
|
|
159
|
+
}, _errorFactory)) && input.edges.every((elem, _index7) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
|
|
165
160
|
method: "typia.assert",
|
|
166
|
-
path: _path + ".edges[" +
|
|
167
|
-
expected: "
|
|
161
|
+
path: _path + ".edges[" + _index7 + "]",
|
|
162
|
+
expected: "ITtscGraphDump.IEdge",
|
|
168
163
|
value: elem
|
|
169
|
-
}, _errorFactory)) && _ao5(elem, _path + ".edges[" +
|
|
164
|
+
}, _errorFactory)) && _ao5(elem, _path + ".edges[" + _index7 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
170
165
|
method: "typia.assert",
|
|
171
|
-
path: _path + ".edges[" +
|
|
172
|
-
expected: "
|
|
166
|
+
path: _path + ".edges[" + _index7 + "]",
|
|
167
|
+
expected: "ITtscGraphDump.IEdge",
|
|
173
168
|
value: elem
|
|
174
|
-
}, _errorFactory)) ||
|
|
169
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
175
170
|
method: "typia.assert",
|
|
176
171
|
path: _path + ".edges",
|
|
177
|
-
expected: "Array<
|
|
172
|
+
expected: "Array<ITtscGraphDump.IEdge>",
|
|
178
173
|
value: input.edges
|
|
179
|
-
}, _errorFactory)) && (undefined === input.diagnostics || (Array.isArray(input.diagnostics) || _a._assertGuard(_exceptionable, {
|
|
180
|
-
method: "typia.assert",
|
|
181
|
-
path: _path + ".diagnostics",
|
|
182
|
-
expected: "(Array<ITtscGraphDiagnostic> | undefined)",
|
|
183
|
-
value: input.diagnostics
|
|
184
|
-
}, _errorFactory)) && input.diagnostics.every((elem, _index9) => ("object" === typeof elem && null !== elem || _a._assertGuard(_exceptionable, {
|
|
185
|
-
method: "typia.assert",
|
|
186
|
-
path: _path + ".diagnostics[" + _index9 + "]",
|
|
187
|
-
expected: "ITtscGraphDiagnostic",
|
|
188
|
-
value: elem
|
|
189
|
-
}, _errorFactory)) && _ao6(elem, _path + ".diagnostics[" + _index9 + "]", true && _exceptionable) || _a._assertGuard(_exceptionable, {
|
|
190
|
-
method: "typia.assert",
|
|
191
|
-
path: _path + ".diagnostics[" + _index9 + "]",
|
|
192
|
-
expected: "ITtscGraphDiagnostic",
|
|
193
|
-
value: elem
|
|
194
|
-
}, _errorFactory)) || _a._assertGuard(_exceptionable, {
|
|
195
|
-
method: "typia.assert",
|
|
196
|
-
path: _path + ".diagnostics",
|
|
197
|
-
expected: "(Array<ITtscGraphDiagnostic> | undefined)",
|
|
198
|
-
value: input.diagnostics
|
|
199
174
|
}, _errorFactory));
|
|
200
|
-
const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.id ||
|
|
175
|
+
const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.id || _assertGuard_1._assertGuard(_exceptionable, {
|
|
201
176
|
method: "typia.assert",
|
|
202
177
|
path: _path + ".id",
|
|
203
178
|
expected: "string",
|
|
204
179
|
value: input.id
|
|
205
|
-
}, _errorFactory)) && (true === _av0.has(input.kind) ||
|
|
180
|
+
}, _errorFactory)) && (true === _av0.has(input.kind) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
206
181
|
method: "typia.assert",
|
|
207
182
|
path: _path + ".kind",
|
|
208
183
|
expected: _ae0,
|
|
209
184
|
value: input.kind
|
|
210
|
-
}, _errorFactory)) && _ap0(input, _path, true && _exceptionable) && (undefined === input.qualifiedName || "string" === typeof input.qualifiedName ||
|
|
185
|
+
}, _errorFactory)) && _ap0(input, _path, true && _exceptionable) && (undefined === input.qualifiedName || "string" === typeof input.qualifiedName || _assertGuard_1._assertGuard(_exceptionable, {
|
|
211
186
|
method: "typia.assert",
|
|
212
187
|
path: _path + ".qualifiedName",
|
|
213
188
|
expected: "(string | undefined)",
|
|
214
189
|
value: input.qualifiedName
|
|
215
|
-
}, _errorFactory)) &&
|
|
190
|
+
}, _errorFactory)) && ("string" === typeof input.file || _assertGuard_1._assertGuard(_exceptionable, {
|
|
191
|
+
method: "typia.assert",
|
|
192
|
+
path: _path + ".file",
|
|
193
|
+
expected: "string",
|
|
194
|
+
value: input.file
|
|
195
|
+
}, _errorFactory)) && ("boolean" === typeof input.external || _assertGuard_1._assertGuard(_exceptionable, {
|
|
216
196
|
method: "typia.assert",
|
|
217
197
|
path: _path + ".external",
|
|
218
198
|
expected: "boolean",
|
|
219
199
|
value: input.external
|
|
220
|
-
}, _errorFactory)) && (undefined === input.ignored || "boolean" === typeof input.ignored ||
|
|
200
|
+
}, _errorFactory)) && (undefined === input.ignored || "boolean" === typeof input.ignored || _assertGuard_1._assertGuard(_exceptionable, {
|
|
221
201
|
method: "typia.assert",
|
|
222
202
|
path: _path + ".ignored",
|
|
223
203
|
expected: "(boolean | undefined)",
|
|
224
204
|
value: input.ignored
|
|
225
|
-
}, _errorFactory)) && (undefined === input.exported || "boolean" === typeof input.exported ||
|
|
205
|
+
}, _errorFactory)) && (undefined === input.exported || "boolean" === typeof input.exported || _assertGuard_1._assertGuard(_exceptionable, {
|
|
226
206
|
method: "typia.assert",
|
|
227
207
|
path: _path + ".exported",
|
|
228
208
|
expected: "(boolean | undefined)",
|
|
229
209
|
value: input.exported
|
|
230
|
-
}, _errorFactory)) && (undefined === input.
|
|
210
|
+
}, _errorFactory)) && (undefined === input.closure || "boolean" === typeof input.closure || _assertGuard_1._assertGuard(_exceptionable, {
|
|
211
|
+
method: "typia.assert",
|
|
212
|
+
path: _path + ".closure",
|
|
213
|
+
expected: "(boolean | undefined)",
|
|
214
|
+
value: input.closure
|
|
215
|
+
}, _errorFactory)) && (undefined === input.modifiers || (Array.isArray(input.modifiers) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
231
216
|
method: "typia.assert",
|
|
232
217
|
path: _path + ".modifiers",
|
|
233
218
|
expected: "(Array<TtscGraphNodeModifier> | undefined)",
|
|
234
219
|
value: input.modifiers
|
|
235
|
-
}, _errorFactory)) && input.modifiers.every((elem,
|
|
220
|
+
}, _errorFactory)) && input.modifiers.every((elem, _index8) => true === _av1.has(elem) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
236
221
|
method: "typia.assert",
|
|
237
|
-
path: _path + ".modifiers[" +
|
|
222
|
+
path: _path + ".modifiers[" + _index8 + "]",
|
|
238
223
|
expected: _ae1,
|
|
239
224
|
value: elem
|
|
240
|
-
}, _errorFactory)) ||
|
|
225
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
241
226
|
method: "typia.assert",
|
|
242
227
|
path: _path + ".modifiers",
|
|
243
228
|
expected: "(Array<TtscGraphNodeModifier> | undefined)",
|
|
244
229
|
value: input.modifiers
|
|
245
|
-
}, _errorFactory)) && (undefined === input.decorators || (Array.isArray(input.decorators) ||
|
|
230
|
+
}, _errorFactory)) && (undefined === input.decorators || (Array.isArray(input.decorators) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
246
231
|
method: "typia.assert",
|
|
247
232
|
path: _path + ".decorators",
|
|
248
233
|
expected: "(Array<ITtscGraphDecorator> | undefined)",
|
|
249
234
|
value: input.decorators
|
|
250
|
-
}, _errorFactory)) && input.decorators.every((elem,
|
|
235
|
+
}, _errorFactory)) && input.decorators.every((elem, _index9) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
|
|
251
236
|
method: "typia.assert",
|
|
252
|
-
path: _path + ".decorators[" +
|
|
237
|
+
path: _path + ".decorators[" + _index9 + "]",
|
|
253
238
|
expected: "ITtscGraphDecorator",
|
|
254
239
|
value: elem
|
|
255
|
-
}, _errorFactory)) && _ao2(elem, _path + ".decorators[" +
|
|
240
|
+
}, _errorFactory)) && _ao2(elem, _path + ".decorators[" + _index9 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
256
241
|
method: "typia.assert",
|
|
257
|
-
path: _path + ".decorators[" +
|
|
242
|
+
path: _path + ".decorators[" + _index9 + "]",
|
|
258
243
|
expected: "ITtscGraphDecorator",
|
|
259
244
|
value: elem
|
|
260
|
-
}, _errorFactory)) ||
|
|
245
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
261
246
|
method: "typia.assert",
|
|
262
247
|
path: _path + ".decorators",
|
|
263
248
|
expected: "(Array<ITtscGraphDecorator> | undefined)",
|
|
264
249
|
value: input.decorators
|
|
265
|
-
}, _errorFactory)) &&
|
|
250
|
+
}, _errorFactory)) && _ap1(input, _path, true && _exceptionable) && (undefined === input.implementation || ("object" === typeof input.implementation && null !== input.implementation || _assertGuard_1._assertGuard(_exceptionable, {
|
|
266
251
|
method: "typia.assert",
|
|
267
252
|
path: _path + ".implementation",
|
|
268
|
-
expected: "(
|
|
253
|
+
expected: "(ITtscGraphSpan | undefined)",
|
|
269
254
|
value: input.implementation
|
|
270
|
-
}, _errorFactory)) && _ao4(input.implementation, _path + ".implementation", true && _exceptionable) ||
|
|
255
|
+
}, _errorFactory)) && _ao4(input.implementation, _path + ".implementation", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
271
256
|
method: "typia.assert",
|
|
272
257
|
path: _path + ".implementation",
|
|
273
|
-
expected: "(
|
|
258
|
+
expected: "(ITtscGraphSpan | undefined)",
|
|
274
259
|
value: input.implementation
|
|
275
260
|
}, _errorFactory));
|
|
276
|
-
const _ao2 = (input, _path, _exceptionable = true) => _ap0(input, _path, true && _exceptionable) && ((Array.isArray(input.arguments) ||
|
|
261
|
+
const _ao2 = (input, _path, _exceptionable = true) => _ap0(input, _path, true && _exceptionable) && ((Array.isArray(input.arguments) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
277
262
|
method: "typia.assert",
|
|
278
263
|
path: _path + ".arguments",
|
|
279
264
|
expected: "Array<ITtscGraphDecorator.IArgument>",
|
|
280
265
|
value: input.arguments
|
|
281
|
-
}, _errorFactory)) && input.arguments.every((elem,
|
|
266
|
+
}, _errorFactory)) && input.arguments.every((elem, _index10) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
282
267
|
method: "typia.assert",
|
|
283
|
-
path: _path + ".arguments[" +
|
|
268
|
+
path: _path + ".arguments[" + _index10 + "]",
|
|
284
269
|
expected: "ITtscGraphDecorator.IArgument",
|
|
285
270
|
value: elem
|
|
286
|
-
}, _errorFactory)) && _ao3(elem, _path + ".arguments[" +
|
|
271
|
+
}, _errorFactory)) && _ao3(elem, _path + ".arguments[" + _index10 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
287
272
|
method: "typia.assert",
|
|
288
|
-
path: _path + ".arguments[" +
|
|
273
|
+
path: _path + ".arguments[" + _index10 + "]",
|
|
289
274
|
expected: "ITtscGraphDecorator.IArgument",
|
|
290
275
|
value: elem
|
|
291
|
-
}, _errorFactory)) ||
|
|
276
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
292
277
|
method: "typia.assert",
|
|
293
278
|
path: _path + ".arguments",
|
|
294
279
|
expected: "Array<ITtscGraphDecorator.IArgument>",
|
|
295
280
|
value: input.arguments
|
|
296
281
|
}, _errorFactory));
|
|
297
|
-
const _ao3 = (input, _path, _exceptionable = true) => undefined === input.literal || "string" === typeof input.literal || "number" === typeof input.literal || "boolean" === typeof input.literal ||
|
|
282
|
+
const _ao3 = (input, _path, _exceptionable = true) => undefined === input.literal || "string" === typeof input.literal || "number" === typeof input.literal || "boolean" === typeof input.literal || _assertGuard_1._assertGuard(_exceptionable, {
|
|
298
283
|
method: "typia.assert",
|
|
299
284
|
path: _path + ".literal",
|
|
300
285
|
expected: "(boolean | number | string | undefined)",
|
|
301
286
|
value: input.literal
|
|
302
287
|
}, _errorFactory);
|
|
303
|
-
const _ao4 = (input, _path, _exceptionable = true) =>
|
|
288
|
+
const _ao4 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || _assertGuard_1._assertGuard(_exceptionable, {
|
|
289
|
+
method: "typia.assert",
|
|
290
|
+
path: _path + ".file",
|
|
291
|
+
expected: "(string | undefined)",
|
|
292
|
+
value: input.file
|
|
293
|
+
}, _errorFactory)) && ("number" === typeof input.startLine || _assertGuard_1._assertGuard(_exceptionable, {
|
|
304
294
|
method: "typia.assert",
|
|
305
295
|
path: _path + ".startLine",
|
|
306
296
|
expected: "number",
|
|
307
297
|
value: input.startLine
|
|
308
|
-
}, _errorFactory)) && (undefined === input.startCol || "number" === typeof input.startCol ||
|
|
298
|
+
}, _errorFactory)) && (undefined === input.startCol || "number" === typeof input.startCol || _assertGuard_1._assertGuard(_exceptionable, {
|
|
309
299
|
method: "typia.assert",
|
|
310
300
|
path: _path + ".startCol",
|
|
311
301
|
expected: "(number | undefined)",
|
|
312
302
|
value: input.startCol
|
|
313
|
-
}, _errorFactory)) && (undefined === input.endLine || "number" === typeof input.endLine ||
|
|
303
|
+
}, _errorFactory)) && (undefined === input.endLine || "number" === typeof input.endLine || _assertGuard_1._assertGuard(_exceptionable, {
|
|
314
304
|
method: "typia.assert",
|
|
315
305
|
path: _path + ".endLine",
|
|
316
306
|
expected: "(number | undefined)",
|
|
317
307
|
value: input.endLine
|
|
318
|
-
}, _errorFactory)) && (undefined === input.endCol || "number" === typeof input.endCol ||
|
|
308
|
+
}, _errorFactory)) && (undefined === input.endCol || "number" === typeof input.endCol || _assertGuard_1._assertGuard(_exceptionable, {
|
|
319
309
|
method: "typia.assert",
|
|
320
310
|
path: _path + ".endCol",
|
|
321
311
|
expected: "(number | undefined)",
|
|
322
312
|
value: input.endCol
|
|
323
313
|
}, _errorFactory));
|
|
324
|
-
const _ao5 = (input, _path, _exceptionable = true) => ("string" === typeof input.from ||
|
|
314
|
+
const _ao5 = (input, _path, _exceptionable = true) => ("string" === typeof input.from || _assertGuard_1._assertGuard(_exceptionable, {
|
|
325
315
|
method: "typia.assert",
|
|
326
316
|
path: _path + ".from",
|
|
327
317
|
expected: "string",
|
|
328
318
|
value: input.from
|
|
329
|
-
}, _errorFactory)) && ("string" === typeof input.to ||
|
|
319
|
+
}, _errorFactory)) && ("string" === typeof input.to || _assertGuard_1._assertGuard(_exceptionable, {
|
|
330
320
|
method: "typia.assert",
|
|
331
321
|
path: _path + ".to",
|
|
332
322
|
expected: "string",
|
|
333
323
|
value: input.to
|
|
334
|
-
}, _errorFactory)) && (true === _av2.has(input.kind) ||
|
|
324
|
+
}, _errorFactory)) && (true === _av2.has(input.kind) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
335
325
|
method: "typia.assert",
|
|
336
326
|
path: _path + ".kind",
|
|
337
327
|
expected: _ae2,
|
|
338
328
|
value: input.kind
|
|
339
|
-
}, _errorFactory)) &&
|
|
340
|
-
const
|
|
341
|
-
|
|
342
|
-
path: _path + ".line",
|
|
343
|
-
expected: "number",
|
|
344
|
-
value: input.line
|
|
345
|
-
}, _errorFactory)) && (undefined === input.column || "number" === typeof input.column || _a._assertGuard(_exceptionable, {
|
|
346
|
-
method: "typia.assert",
|
|
347
|
-
path: _path + ".column",
|
|
348
|
-
expected: "(number | undefined)",
|
|
349
|
-
value: input.column
|
|
350
|
-
}, _errorFactory)) && ("string" === typeof input.code || "number" === typeof input.code || _a._assertGuard(_exceptionable, {
|
|
351
|
-
method: "typia.assert",
|
|
352
|
-
path: _path + ".code",
|
|
353
|
-
expected: "(number | string)",
|
|
354
|
-
value: input.code
|
|
355
|
-
}, _errorFactory)) && ("string" === typeof input.message || _a._assertGuard(_exceptionable, {
|
|
356
|
-
method: "typia.assert",
|
|
357
|
-
path: _path + ".message",
|
|
358
|
-
expected: "string",
|
|
359
|
-
value: input.message
|
|
360
|
-
}, _errorFactory)) && (undefined === input.severity || "error" === input.severity || "hint" === input.severity || "info" === input.severity || "warning" === input.severity || _a._assertGuard(_exceptionable, {
|
|
361
|
-
method: "typia.assert",
|
|
362
|
-
path: _path + ".severity",
|
|
363
|
-
expected: "(\"error\" | \"hint\" | \"info\" | \"warning\" | undefined)",
|
|
364
|
-
value: input.severity
|
|
365
|
-
}, _errorFactory)) && (undefined === input.origin || "lint" === input.origin || "plugin" === input.origin || "tsc" === input.origin || _a._assertGuard(_exceptionable, {
|
|
366
|
-
method: "typia.assert",
|
|
367
|
-
path: _path + ".origin",
|
|
368
|
-
expected: "(\"lint\" | \"plugin\" | \"tsc\" | undefined)",
|
|
369
|
-
value: input.origin
|
|
370
|
-
}, _errorFactory)) && (undefined === input.node || "string" === typeof input.node || _a._assertGuard(_exceptionable, {
|
|
371
|
-
method: "typia.assert",
|
|
372
|
-
path: _path + ".node",
|
|
373
|
-
expected: "(string | undefined)",
|
|
374
|
-
value: input.node
|
|
375
|
-
}, _errorFactory));
|
|
376
|
-
const _io0 = input => "string" === typeof input.project && "string" === typeof input.tsconfig && (Array.isArray(input.nodes) && input.nodes.every(elem => "object" === typeof elem && null !== elem && _io1(elem))) && (Array.isArray(input.edges) && input.edges.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (undefined === input.diagnostics || Array.isArray(input.diagnostics) && input.diagnostics.every(elem => "object" === typeof elem && null !== elem && _io6(elem)));
|
|
377
|
-
const _io1 = input => "string" === typeof input.id && true === _iv0.has(input.kind) && _ip0(input) && (undefined === input.qualifiedName || "string" === typeof input.qualifiedName) && _ip1(input) && "boolean" === typeof input.external && (undefined === input.ignored || "boolean" === typeof input.ignored) && (undefined === input.exported || "boolean" === typeof input.exported) && (undefined === input.modifiers || Array.isArray(input.modifiers) && input.modifiers.every(elem => true === _iv1.has(elem))) && (undefined === input.decorators || Array.isArray(input.decorators) && input.decorators.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && _ip2(input) && (undefined === input.implementation || "object" === typeof input.implementation && null !== input.implementation && _io4(input.implementation));
|
|
329
|
+
}, _errorFactory)) && _ap1(input, _path, true && _exceptionable);
|
|
330
|
+
const _io0 = input => "string" === typeof input.project && "string" === typeof input.tsconfig && (Array.isArray(input.nodes) && input.nodes.every(elem => "object" === typeof elem && null !== elem && _io1(elem))) && (Array.isArray(input.edges) && input.edges.every(elem => "object" === typeof elem && null !== elem && _io5(elem)));
|
|
331
|
+
const _io1 = input => "string" === typeof input.id && true === _iv0.has(input.kind) && _ip0(input) && (undefined === input.qualifiedName || "string" === typeof input.qualifiedName) && "string" === typeof input.file && "boolean" === typeof input.external && (undefined === input.ignored || "boolean" === typeof input.ignored) && (undefined === input.exported || "boolean" === typeof input.exported) && (undefined === input.closure || "boolean" === typeof input.closure) && (undefined === input.modifiers || Array.isArray(input.modifiers) && input.modifiers.every(elem => true === _iv1.has(elem))) && (undefined === input.decorators || Array.isArray(input.decorators) && input.decorators.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && _ip1(input) && (undefined === input.implementation || "object" === typeof input.implementation && null !== input.implementation && _io4(input.implementation));
|
|
378
332
|
const _io2 = input => _ip0(input) && (Array.isArray(input.arguments) && input.arguments.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _io3(elem)));
|
|
379
333
|
const _io3 = input => undefined === input.literal || "string" === typeof input.literal || "number" === typeof input.literal || "boolean" === typeof input.literal;
|
|
380
|
-
const _io4 = input =>
|
|
381
|
-
const _io5 = input => "string" === typeof input.from && "string" === typeof input.to && true === _iv2.has(input.kind) &&
|
|
382
|
-
const _io6 = input => _ip1(input) && "number" === typeof input.line && (undefined === input.column || "number" === typeof input.column) && ("string" === typeof input.code || "number" === typeof input.code) && "string" === typeof input.message && (undefined === input.severity || "error" === input.severity || "hint" === input.severity || "info" === input.severity || "warning" === input.severity) && (undefined === input.origin || "lint" === input.origin || "plugin" === input.origin || "tsc" === input.origin) && (undefined === input.node || "string" === typeof input.node);
|
|
334
|
+
const _io4 = input => (undefined === input.file || "string" === typeof input.file) && "number" === typeof input.startLine && (undefined === input.startCol || "number" === typeof input.startCol) && (undefined === input.endLine || "number" === typeof input.endLine) && (undefined === input.endCol || "number" === typeof input.endCol);
|
|
335
|
+
const _io5 = input => "string" === typeof input.from && "string" === typeof input.to && true === _iv2.has(input.kind) && _ip1(input);
|
|
383
336
|
const __is = input => "object" === typeof input && null !== input && _io0(input);
|
|
384
337
|
let _errorFactory;
|
|
385
338
|
return (input, errorFactory) => {
|
|
386
339
|
if (false === __is(input)) {
|
|
387
340
|
_errorFactory = errorFactory;
|
|
388
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input ||
|
|
341
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _assertGuard_1._assertGuard(true, {
|
|
389
342
|
method: "typia.assert",
|
|
390
343
|
path: _path + "",
|
|
391
344
|
expected: "ITtscGraphDump",
|
|
392
345
|
value: input
|
|
393
|
-
}, _errorFactory)) && _ao0(input, _path + "", true) ||
|
|
346
|
+
}, _errorFactory)) && _ao0(input, _path + "", true) || _assertGuard_1._assertGuard(true, {
|
|
394
347
|
method: "typia.assert",
|
|
395
348
|
path: _path + "",
|
|
396
349
|
expected: "ITtscGraphDump",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadGraph.js","sourceRoot":"","sources":["../../src/model/loadGraph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA+C;AAC/C,kDAA0B;AAE1B,0DAAuD;AACvD,8DAA2D;AAE3D,uDAAoD;AAEpD,4EAA4E;AAC5E,+EAA+E;AAC/E,uDAAuD;AACvD,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE1C;;;;;;;;;GASG;AACH,mBACE,OAAO,GAWH,EAAE;IAEN,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACzC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,eAAe,CAAC;IACrD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,IAAA,uCAAkB,
|
|
1
|
+
{"version":3,"file":"loadGraph.js","sourceRoot":"","sources":["../../src/model/loadGraph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA+C;AAC/C,kDAA0B;AAE1B,0DAAuD;AACvD,8DAA2D;AAE3D,uDAAoD;AAEpD,4EAA4E;AAC5E,+EAA+E;AAC/E,uDAAuD;AACvD,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE1C;;;;;;;;;GASG;AACH,mBACE,OAAO,GAWH,EAAE;IAEN,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACzC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,eAAe,CAAC;IACrD,8EAA8E;IAC9E,oEAAoE;IACpE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,IAAA,uCAAkB,EAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACtE,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,uDAAuD;YACrD,qDAAqD;YACrD,+CAA+C,CAClD,CAAC;IACJ,CAAC;IACD,IAAA,mCAAgB,EAAC,MAAM,CAAC,CAAC;IAEzB,MAAM,MAAM,GAAG,IAAA,8BAAS,EACtB,MAAM,EACN,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,QAAQ,CAAC,EAC9C,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,IAAI,EAAE,CACnE,CAAC;IACF,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CACb,uCAAuC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAC9D,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CACb,2CAA2C,MAAM,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAC5F,CAAC;IACJ,CAAC;IAED,OAAO,iCAAe,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;AACxD,CAAC;AAED;;;;;GAKG;AACH,SAAS,SAAS,CAAC,IAAY;IAC7B,IAAI,KAAc,CAAC;IACnB,IAAI,CAAC;QACH,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,+CACE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE,CACH,CAAC;IACJ,CAAC;IACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAoC,KAAK,EAAE;AAC7C,CAAC"}
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
* 2. The per-platform npm package `@ttsc/<platform>-<arch>/bin/ttscgraph[.exe]`.
|
|
13
13
|
* That package carries `ttsc`, `ttscserver`, and `ttscgraph` together and is
|
|
14
14
|
* an `optionalDependency` of `ttsc`, so it is resolved from `ttsc`'s
|
|
15
|
-
* location — found from `
|
|
16
|
-
*
|
|
15
|
+
* location — found from `cwd`, the project the caller selected (via `--cwd`
|
|
16
|
+
* or an API `cwd` option), defaulting to `process.cwd()` when no project was
|
|
17
|
+
* named. A launcher started from an unrelated directory still resolves the
|
|
18
|
+
* `ttsc` installed under the target project it was asked to graph.
|
|
17
19
|
*/
|
|
18
20
|
export declare function resolveGraphBinary(env?: NodeJS.ProcessEnv, cwd?: string): string | null;
|
|
@@ -20,8 +20,10 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
20
20
|
* 2. The per-platform npm package `@ttsc/<platform>-<arch>/bin/ttscgraph[.exe]`.
|
|
21
21
|
* That package carries `ttsc`, `ttscserver`, and `ttscgraph` together and is
|
|
22
22
|
* an `optionalDependency` of `ttsc`, so it is resolved from `ttsc`'s
|
|
23
|
-
* location — found from `
|
|
24
|
-
*
|
|
23
|
+
* location — found from `cwd`, the project the caller selected (via `--cwd`
|
|
24
|
+
* or an API `cwd` option), defaulting to `process.cwd()` when no project was
|
|
25
|
+
* named. A launcher started from an unrelated directory still resolves the
|
|
26
|
+
* `ttsc` installed under the target project it was asked to graph.
|
|
25
27
|
*/
|
|
26
28
|
function resolveGraphBinary(env = process.env, cwd = process.cwd()) {
|
|
27
29
|
if (env.TTSC_GRAPH_BINARY && node_path_1.default.isAbsolute(env.TTSC_GRAPH_BINARY)) {
|
|
@@ -29,8 +31,10 @@ function resolveGraphBinary(env = process.env, cwd = process.cwd()) {
|
|
|
29
31
|
}
|
|
30
32
|
const exe = process.platform === "win32" ? "ttscgraph.exe" : "ttscgraph";
|
|
31
33
|
try {
|
|
34
|
+
// Anchor package lookup at the absolute project root so a relative `--cwd`
|
|
35
|
+
// resolves the same way the native process interprets it.
|
|
32
36
|
const ttscPackageJson = require.resolve("ttsc/package.json", {
|
|
33
|
-
paths: [cwd],
|
|
37
|
+
paths: [node_path_1.default.resolve(cwd)],
|
|
34
38
|
});
|
|
35
39
|
const fromTtsc = (0, node_module_1.createRequire)(ttscPackageJson);
|
|
36
40
|
return fromTtsc.resolve(`@ttsc/${process.platform}-${process.arch}/bin/${exe}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveGraphBinary.js","sourceRoot":"","sources":["../src/resolveGraphBinary.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA4C;AAC5C,0DAA6B;AAE7B
|
|
1
|
+
{"version":3,"file":"resolveGraphBinary.js","sourceRoot":"","sources":["../src/resolveGraphBinary.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA4C;AAC5C,0DAA6B;AAE7B;;;;;;;;;;;;;;;;;;GAkBG;AACH,4BACE,GAAG,GAAsB,OAAO,CAAC,GAAG,EACpC,GAAG,GAAW,OAAO,CAAC,GAAG,EAAE;IAE3B,IAAI,GAAG,CAAC,iBAAiB,IAAI,mBAAI,CAAC,UAAU,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACpE,OAAO,GAAG,CAAC,iBAAiB,CAAC;IAC/B,CAAC;IACD,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,WAAW,CAAC;IACzE,IAAI,CAAC;QACH,2EAA2E;QAC3E,0DAA0D;QAC1D,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,mBAAmB,EAAE;YAC3D,KAAK,EAAE,CAAC,mBAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;SAC3B,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,IAAA,2BAAa,EAAC,eAAe,CAAC,CAAC;QAChD,OAAO,QAAQ,CAAC,OAAO,CACrB,SAAS,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,QAAQ,GAAG,EAAE,CACvD,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { TtscGraphSource } from "../TtscGraphApplication";
|
|
3
3
|
/**
|
|
4
|
-
* Build the MCP server for a graph.
|
|
5
|
-
* {@link ITtscGraphApplication} into the tool schema and validator (no
|
|
6
|
-
* hand-written schema), and `createMcpServer` from `@typia/mcp` handles the
|
|
7
|
-
* list/call registration, argument validation, and structured output.
|
|
4
|
+
* Build the MCP server for a graph.
|
|
8
5
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
6
|
+
* `typia.llm.controller` reflects {@link ITtscGraphApplication} into the tool's
|
|
7
|
+
* input and output schemas and its argument validator, with no hand-written
|
|
8
|
+
* schema: the interface's JSDoc becomes the handshake instructions, the
|
|
9
|
+
* method's becomes the tool description, and every property's becomes the
|
|
10
|
+
* description of that field — including `audit`, whose JSDoc is how a caller
|
|
11
|
+
* learns what the server checked before it answered.
|
|
12
|
+
*
|
|
13
|
+
* The registration was hand-written here for a while, because a tool that
|
|
14
|
+
* declares an output schema must answer with `structuredContent` and the helper
|
|
15
|
+
* also serialized the same JSON into a text block: the payload crossed the wire
|
|
16
|
+
* twice, a client counted both copies against its tool-result cap, and a 30 KB
|
|
17
|
+
* tour arrived as 60 KB, blew the cap, and was spilled to a file the model then
|
|
18
|
+
* shelled out to read back. `@typia/mcp` 13.1.0 ships the structured result
|
|
19
|
+
* once (samchon/typia#2020), so the hand-written server had nothing left to fix
|
|
20
|
+
* and the library owns the registration again.
|
|
14
21
|
*/
|
|
15
22
|
export declare function createServer(graph: TtscGraphSource, version: string): McpServer;
|