@dimassetoid/septum-mcp 0.0.0-stage → 0.2.1

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.
Files changed (108) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +124 -2
  3. package/bin/septum.ts +4 -0
  4. package/package.json +70 -4
  5. package/scripts/postinstall.ts +25 -0
  6. package/src/cli/commands/check.ts +122 -0
  7. package/src/cli/commands/hook.ts +268 -0
  8. package/src/cli/commands/init.ts +553 -0
  9. package/src/cli/commands/serve.ts +5 -0
  10. package/src/cli/commands/sync.ts +41 -0
  11. package/src/cli/commands/topology.ts +161 -0
  12. package/src/cli/index.ts +167 -0
  13. package/src/cli/scaffold/harness-config.ts +621 -0
  14. package/src/cli/templates/hooks.ts +75 -0
  15. package/src/cli/templates/rules.ts +50 -0
  16. package/src/cli/templates/skill.ts +51 -0
  17. package/src/cli/ui/prompts.ts +122 -0
  18. package/src/core/boundary/evaluator.ts +442 -0
  19. package/src/core/boundary/staged-auditor.ts +58 -0
  20. package/src/core/config/loader.ts +122 -0
  21. package/src/core/config/schema.ts +69 -0
  22. package/src/core/database/client.ts +60 -0
  23. package/src/core/database/repositories/dependency.repository.ts +712 -0
  24. package/src/core/database/repositories/domain.repository.ts +330 -0
  25. package/src/core/database/repositories/environment.repository.ts +207 -0
  26. package/src/core/database/repositories/file.repository.ts +117 -0
  27. package/src/core/database/repositories/meta.repository.ts +33 -0
  28. package/src/core/database/repositories/symbol.repository.ts +508 -0
  29. package/src/core/database/repository.ts +303 -0
  30. package/src/core/database/schema.ts +154 -0
  31. package/src/core/discovery/topology-detector.ts +805 -0
  32. package/src/core/ingestion/hasher.ts +5 -0
  33. package/src/core/ingestion/pipeline.ts +623 -0
  34. package/src/core/parser/behavioral-analyzer.ts +119 -0
  35. package/src/core/parser/boundary-tracker.ts +443 -0
  36. package/src/core/parser/extractors/base.ts +67 -0
  37. package/src/core/parser/extractors/blade.ts +159 -0
  38. package/src/core/parser/extractors/csharp.ts +244 -0
  39. package/src/core/parser/extractors/django-semantic.ts +687 -0
  40. package/src/core/parser/extractors/elysia-semantic.ts +538 -0
  41. package/src/core/parser/extractors/express-semantic.ts +444 -0
  42. package/src/core/parser/extractors/fastapi-semantic.ts +736 -0
  43. package/src/core/parser/extractors/fastify-semantic.ts +774 -0
  44. package/src/core/parser/extractors/flask-semantic.ts +515 -0
  45. package/src/core/parser/extractors/frontend.ts +149 -0
  46. package/src/core/parser/extractors/go-semantic.ts +611 -0
  47. package/src/core/parser/extractors/go.ts +491 -0
  48. package/src/core/parser/extractors/hono-semantic.ts +567 -0
  49. package/src/core/parser/extractors/java.ts +225 -0
  50. package/src/core/parser/extractors/laravel-semantic.ts +1122 -0
  51. package/src/core/parser/extractors/mcp-cli-semantic.ts +368 -0
  52. package/src/core/parser/extractors/nestjs-semantic.ts +543 -0
  53. package/src/core/parser/extractors/php.ts +569 -0
  54. package/src/core/parser/extractors/python.ts +498 -0
  55. package/src/core/parser/extractors/registry.ts +78 -0
  56. package/src/core/parser/extractors/ruby.ts +234 -0
  57. package/src/core/parser/extractors/rust.ts +286 -0
  58. package/src/core/parser/extractors/semantic-extractor.interface.ts +22 -0
  59. package/src/core/parser/extractors/symfony-semantic.ts +354 -0
  60. package/src/core/parser/extractors/typescript.ts +826 -0
  61. package/src/core/parser/language-capabilities.ts +71 -0
  62. package/src/core/parser/schema/providers/laravel-migration-provider.ts +216 -0
  63. package/src/core/parser/schema/providers/prisma-schema-provider.ts +90 -0
  64. package/src/core/parser/schema/schema-provider-registry.ts +43 -0
  65. package/src/core/parser/schema/schema-provider.interface.ts +33 -0
  66. package/src/core/parser/tree-sitter.ts +63 -0
  67. package/src/core/parser/wasm-assets.ts +25 -0
  68. package/src/core/parser/wasm-loader.ts +274 -0
  69. package/src/core/resolver/call-graph-tracer.ts +724 -0
  70. package/src/core/resolver/import-resolver.ts +437 -0
  71. package/src/core/resolver/module-resolver.ts +482 -0
  72. package/src/core/resolver/path-resolver.ts +200 -0
  73. package/src/core/resolver/symbol-locator.ts +276 -0
  74. package/src/core/resolver/symbol-reference.ts +53 -0
  75. package/src/core/resolver/vertical-slice-tracer.ts +366 -0
  76. package/src/core/resources/ignore.ts +123 -0
  77. package/src/core/resources/limits.ts +14 -0
  78. package/src/core/resources/source-files.ts +62 -0
  79. package/src/core/resources/work-queue.ts +74 -0
  80. package/src/core/session/session-manager.ts +107 -0
  81. package/src/core/telemetry/telemetry.ts +97 -0
  82. package/src/core/topology/environment-detector.ts +973 -0
  83. package/src/core/topology/types.ts +83 -0
  84. package/src/index.ts +21 -0
  85. package/src/mcp/schemas.ts +1105 -0
  86. package/src/mcp/server.ts +774 -0
  87. package/src/mcp/tools/boundary.ts +17 -0
  88. package/src/mcp/tools/check-boundary.ts +387 -0
  89. package/src/mcp/tools/domain.ts +40 -0
  90. package/src/mcp/tools/feature.ts +67 -0
  91. package/src/mcp/tools/get-domain-catalog.ts +226 -0
  92. package/src/mcp/tools/get-environment-topology.ts +138 -0
  93. package/src/mcp/tools/get-feature-context.ts +224 -0
  94. package/src/mcp/tools/get-symbol-hotspots.ts +54 -0
  95. package/src/mcp/tools/get-symbol-impact.ts +64 -0
  96. package/src/mcp/tools/get-symbol.ts +175 -0
  97. package/src/mcp/tools/locate-symbol.ts +196 -0
  98. package/src/mcp/tools/register-domain.ts +75 -0
  99. package/src/mcp/tools/register-feature.ts +110 -0
  100. package/src/mcp/tools/slice.ts +16 -0
  101. package/src/mcp/tools/symbol.ts +93 -0
  102. package/src/mcp/tools/trace-vertical-slice.ts +80 -0
  103. package/src/mcp/workspace-manager.ts +159 -0
  104. package/src/mcp/workspace-watcher.ts +202 -0
  105. package/src/types/index.ts +456 -0
  106. package/src/types/wasm.d.ts +4 -0
  107. package/src/utils/version-check.ts +209 -0
  108. package/src/version.ts +1 -0
@@ -0,0 +1,444 @@
1
+ import { readOptionalSourceFile } from "../../resources/source-files.ts";
2
+ import { parseWithTreeSitter } from "../wasm-loader.ts";
3
+ import { ImportResolver } from "../../resolver/import-resolver.ts";
4
+ import type Parser from "web-tree-sitter";
5
+ import * as fs from "node:fs";
6
+ import * as path from "node:path";
7
+ import type { SemanticSliceExtractor, VerticalSliceCandidate } from "./semantic-extractor.interface.ts";
8
+
9
+ const EXPRESS_VERBS = new Set([
10
+ "get",
11
+ "post",
12
+ "put",
13
+ "patch",
14
+ "delete",
15
+ "all",
16
+ "head",
17
+ "options",
18
+ ]);
19
+
20
+ interface RawRoute {
21
+ file: string;
22
+ relPath: string;
23
+ routerVar: string;
24
+ httpMethod: string;
25
+ rawPath: string;
26
+ middlewares: Array<{ symbol: string; line: number }>;
27
+ handler: { symbol: string; line: number };
28
+ routeLine: number;
29
+ }
30
+
31
+ interface RawMount {
32
+ file: string;
33
+ relPath: string;
34
+ callerVar: string;
35
+ prefix: string;
36
+ targetVar: string;
37
+ line: number;
38
+ }
39
+
40
+ interface ImportBinding {
41
+ importedName: string;
42
+ sourceSpecifier: string;
43
+ }
44
+
45
+ function cleanLiteral(node: Parser.SyntaxNode | null | undefined): string | undefined {
46
+ if (!node) return undefined;
47
+ if (node.type === "string" || node.type === "template_string") {
48
+ const raw = node.text.trim();
49
+ if (raw.includes("${")) return undefined;
50
+ return raw.replace(/^['"`]|['"`]$/g, "");
51
+ }
52
+ return undefined;
53
+ }
54
+
55
+ function normalizeRouteUri(prefix: string, rawPath: string): string {
56
+ const p = (prefix ?? "").trim().replace(/\/+$/, "");
57
+ let r = (rawPath ?? "").trim();
58
+ if (!r.startsWith("/")) r = "/" + r;
59
+ if (r === "/" && p.length > 0) return p;
60
+ if (r === "/" && p.length === 0) return "/";
61
+ const joined = `${p}${r}`;
62
+ return joined.startsWith("/") ? joined : `/${joined}`;
63
+ }
64
+
65
+ export class ExpressSemanticExtractor implements SemanticSliceExtractor {
66
+ public readonly id = "express";
67
+ public readonly name = "Express Router Composition Extractor";
68
+
69
+ public canHandle(projectRoot: string, framework?: string): boolean {
70
+ if (framework === "express") return true;
71
+
72
+ const pkgPath = path.join(projectRoot, "package.json");
73
+ if (fs.existsSync(pkgPath)) {
74
+ try {
75
+ const pkg = JSON.parse(readOptionalSourceFile(pkgPath, "utf-8"));
76
+ const deps = { ...pkg.dependencies, ...pkg.devDependencies };
77
+ if (deps["express"]) return true;
78
+ } catch {}
79
+ }
80
+
81
+ return false;
82
+ }
83
+
84
+ public async extractSlices(
85
+ projectRoot: string,
86
+ domainId?: number,
87
+ signal?: AbortSignal
88
+ ): Promise<VerticalSliceCandidate[]> {
89
+ const slices: VerticalSliceCandidate[] = [];
90
+ const sourceFiles = this.findSourceFiles(projectRoot);
91
+ const resolver = new ImportResolver(projectRoot);
92
+
93
+ const allRoutes: RawRoute[] = [];
94
+ const allMounts: RawMount[] = [];
95
+ const fileImports = new Map<string, Map<string, string>>(); // relPath -> (importedIdent -> targetRelPath)
96
+
97
+ for (const file of sourceFiles) {
98
+ if (signal?.aborted) throw new Error("semantic_extraction_cancelled");
99
+ const relPath = path.relative(projectRoot, file).replace(/\\/g, "/");
100
+ const content = readOptionalSourceFile(file, "utf-8");
101
+ if (!content || (!content.includes(".get") && !content.includes(".post") && !content.includes(".use") && !content.includes(".route") && !content.includes("Router") && !content.includes("express"))) {
102
+ continue;
103
+ }
104
+
105
+ const fileData = await parseWithTreeSitter(
106
+ "typescript",
107
+ content,
108
+ (rootNode) => this.extractFileAst(file, relPath, rootNode, resolver)
109
+ );
110
+
111
+ if (fileData) {
112
+ allRoutes.push(...fileData.routes);
113
+ allMounts.push(...fileData.mounts);
114
+ if (fileData.resolvedImports.size > 0) {
115
+ fileImports.set(relPath, fileData.resolvedImports);
116
+ }
117
+ }
118
+ }
119
+
120
+ // Resolve Router Prefix Hierarchy
121
+ const routerPrefixes = this.resolvePrefixHierarchy(allMounts, fileImports);
122
+
123
+ // Build Vertical Slices
124
+ for (const route of allRoutes) {
125
+ const prefixes = routerPrefixes.get(`${route.relPath}#${route.routerVar}`) || [""];
126
+
127
+ for (const prefix of prefixes) {
128
+ const fullUri = normalizeRouteUri(prefix, route.rawPath);
129
+ const actionSymbol = route.handler.symbol;
130
+ const rootIdent = actionSymbol.includes(".") ? actionSymbol.split(".")[0] : actionSymbol;
131
+ const imports = fileImports.get(route.relPath);
132
+ const resolvedControllerFile = imports?.get(rootIdent) || route.relPath;
133
+ const fileBase = path.basename(route.relPath).replace(/\.[^.]+$/, "");
134
+ const controllerClass = actionSymbol.includes(".")
135
+ ? actionSymbol.split(".")[0]
136
+ : fileBase.charAt(0).toUpperCase() + fileBase.slice(1);
137
+ const actionName = actionSymbol.includes(".") ? actionSymbol.split(".").pop()! : actionSymbol;
138
+
139
+ const chain: Array<{ stage: string; symbol: string; file?: string; line?: number; description?: string }> = [
140
+ {
141
+ stage: "ingress",
142
+ symbol: `${route.httpMethod} ${fullUri}`,
143
+ file: route.relPath,
144
+ line: route.routeLine,
145
+ description: `Express Route: ${route.httpMethod} ${fullUri}`,
146
+ },
147
+ ];
148
+
149
+ for (const mw of route.middlewares) {
150
+ chain.push({
151
+ stage: "middleware",
152
+ symbol: mw.symbol,
153
+ file: route.relPath,
154
+ line: mw.line,
155
+ description: `Express Middleware: ${mw.symbol}`,
156
+ });
157
+ }
158
+
159
+ chain.push({
160
+ stage: "controller",
161
+ symbol: actionSymbol,
162
+ file: resolvedControllerFile,
163
+ line: route.handler.line,
164
+ description: `Express Action Handler`,
165
+ });
166
+
167
+ slices.push({
168
+ domain_id: domainId ?? null,
169
+ feature_key: `express.${controllerClass.toLowerCase()}.${actionName}`,
170
+ http_method: route.httpMethod,
171
+ route_uri: fullUri,
172
+ route_name: `${controllerClass}.${actionName}`,
173
+ controller_class: controllerClass,
174
+ action_name: actionName,
175
+ controller_file: resolvedControllerFile,
176
+ controller_line: route.handler.line,
177
+ architecture_style: "mvc",
178
+ entry_kind: "http_route",
179
+ execution_chain_json: JSON.stringify(chain),
180
+ });
181
+ }
182
+ }
183
+
184
+ return slices;
185
+ }
186
+
187
+ private extractFileAst(
188
+ _filePath: string,
189
+ relPath: string,
190
+ rootNode: Parser.SyntaxNode,
191
+ resolver: ImportResolver
192
+ ): { routes: RawRoute[]; mounts: RawMount[]; resolvedImports: Map<string, string> } {
193
+ const routes: RawRoute[] = [];
194
+ const mounts: RawMount[] = [];
195
+ const resolvedImports = new Map<string, string>();
196
+
197
+ // 1. Collect static imports
198
+ for (const child of rootNode.namedChildren) {
199
+ if (child.type === "import_statement") {
200
+ const sourceNode =
201
+ child.childForFieldName("source") ??
202
+ child.namedChildren.find((c) => c.type === "string");
203
+ const specifier = cleanLiteral(sourceNode);
204
+ if (!specifier) continue;
205
+
206
+ const res = resolver.resolve(specifier, relPath);
207
+ const targetFile = res.status === "resolved" && res.targets[0]?.files[0] ? res.targets[0].files[0] : undefined;
208
+ if (!targetFile) continue;
209
+
210
+ // Default import
211
+ const importClause = child.namedChildren.find((c) => c.type === "import_clause");
212
+ if (importClause) {
213
+ for (const ic of importClause.namedChildren) {
214
+ if (ic.type === "identifier") {
215
+ resolvedImports.set(ic.text.trim(), targetFile);
216
+ } else if (ic.type === "namespace_import") {
217
+ const identNode = ic.namedChildren.find((n) => n.type === "identifier");
218
+ if (identNode) resolvedImports.set(identNode.text.trim(), targetFile);
219
+ } else if (ic.type === "named_imports") {
220
+ for (const spec of ic.namedChildren) {
221
+ if (spec.type === "import_specifier") {
222
+ const alias = spec.childForFieldName("alias");
223
+ const name = spec.childForFieldName("name") ?? spec.namedChildren[0];
224
+ const ident = alias ? alias.text.trim() : name ? name.text.trim() : "";
225
+ if (ident) resolvedImports.set(ident, targetFile);
226
+ }
227
+ }
228
+ }
229
+ }
230
+ }
231
+ }
232
+ }
233
+
234
+ // 2. Walk call expressions for routes and mounts
235
+ const walkCalls = (node: Parser.SyntaxNode): void => {
236
+ if (node.type === "call_expression") {
237
+ const fnNode = node.childForFieldName("function");
238
+ if (fnNode && fnNode.type === "member_expression") {
239
+ const objNode = fnNode.childForFieldName("object");
240
+ const propNode = fnNode.childForFieldName("property");
241
+ const argsNode = node.childForFieldName("arguments");
242
+
243
+ if (objNode && propNode && argsNode) {
244
+ const callerVar = objNode.text.trim();
245
+ const methodName = propNode.text.trim().toLowerCase();
246
+ const args = argsNode.namedChildren;
247
+
248
+ // Route Mount: app.use('/api', apiRouter) or router.use('/sub', subRouter)
249
+ if (methodName === "use") {
250
+ if (args.length >= 1) {
251
+ const firstLit = cleanLiteral(args[0]);
252
+ const hasPath = firstLit !== undefined;
253
+ const prefix = hasPath ? firstLit : "";
254
+ const targetArg = hasPath ? args[1] : args[0];
255
+
256
+ if (targetArg && targetArg.type === "identifier") {
257
+ mounts.push({
258
+ file: relPath,
259
+ relPath,
260
+ callerVar,
261
+ prefix,
262
+ targetVar: targetArg.text.trim(),
263
+ line: node.startPosition.row + 1,
264
+ });
265
+ }
266
+ }
267
+ } else if (EXPRESS_VERBS.has(methodName)) {
268
+ // Direct HTTP Route: app.get('/path', ...middlewares, handler)
269
+ if (args.length >= 2) {
270
+ const rawPath = cleanLiteral(args[0]);
271
+ if (rawPath !== undefined) {
272
+ const middlewareNodes = args.slice(1, args.length - 1);
273
+ const handlerNode = args[args.length - 1];
274
+
275
+ const middlewares = this.extractHandlers(middlewareNodes);
276
+ const handler = this.extractSingleHandler(handlerNode);
277
+
278
+ routes.push({
279
+ file: relPath,
280
+ relPath,
281
+ routerVar: callerVar,
282
+ httpMethod: methodName.toUpperCase(),
283
+ rawPath,
284
+ middlewares,
285
+ handler,
286
+ routeLine: node.startPosition.row + 1,
287
+ });
288
+ }
289
+ }
290
+ }
291
+ }
292
+ }
293
+ }
294
+
295
+ for (const child of node.namedChildren) {
296
+ walkCalls(child);
297
+ }
298
+ };
299
+
300
+ walkCalls(rootNode);
301
+ return { routes, mounts, resolvedImports };
302
+ }
303
+
304
+ private extractSingleHandler(node: Parser.SyntaxNode): { symbol: string; line: number } {
305
+ const line = node.startPosition.row + 1;
306
+ if (node.type === "identifier" || node.type === "member_expression") {
307
+ return { symbol: node.text.trim(), line };
308
+ }
309
+ if (node.type === "arrow_function" || node.type === "function_expression" || node.type === "function") {
310
+ const nameNode = node.childForFieldName("name");
311
+ const name = nameNode ? nameNode.text.trim() : "closure";
312
+ return { symbol: name, line };
313
+ }
314
+ return { symbol: "closure", line };
315
+ }
316
+
317
+ private extractHandlers(nodes: Parser.SyntaxNode[]): Array<{ symbol: string; line: number }> {
318
+ const list: Array<{ symbol: string; line: number }> = [];
319
+ for (const node of nodes) {
320
+ if (node.type === "array") {
321
+ for (const el of node.namedChildren) {
322
+ list.push(this.extractSingleHandler(el));
323
+ }
324
+ } else {
325
+ list.push(this.extractSingleHandler(node));
326
+ }
327
+ }
328
+ return list;
329
+ }
330
+
331
+ private resolvePrefixHierarchy(
332
+ mounts: RawMount[],
333
+ fileImports: Map<string, Map<string, string>>
334
+ ): Map<string, string[]> {
335
+ // Map: (relPath#varName) -> array of prefixes
336
+ const prefixes = new Map<string, Set<string>>();
337
+
338
+ const getPrefixes = (key: string): Set<string> => {
339
+ let set = prefixes.get(key);
340
+ if (!set) {
341
+ set = new Set<string>();
342
+ prefixes.set(key, set);
343
+ }
344
+ return set;
345
+ };
346
+
347
+ // 1. Identify root app variables (e.g. app in app.ts) which start with root prefix ""
348
+ // Also identify top-level callers that are not targets of any mount
349
+ const targetedCallers = new Set<string>();
350
+ for (const mount of mounts) {
351
+ const fileMap = fileImports.get(mount.relPath);
352
+ const importedFile = fileMap?.get(mount.targetVar);
353
+ if (importedFile) {
354
+ targetedCallers.add(`${importedFile}#router`);
355
+ targetedCallers.add(`${importedFile}#default`);
356
+ targetedCallers.add(`${importedFile}#${mount.targetVar}`);
357
+ for (const m of mounts) {
358
+ if (m.relPath === importedFile) {
359
+ targetedCallers.add(`${importedFile}#${m.callerVar}`);
360
+ }
361
+ }
362
+ } else {
363
+ targetedCallers.add(`${mount.relPath}#${mount.targetVar}`);
364
+ }
365
+ }
366
+
367
+ for (const mount of mounts) {
368
+ const callerKey = `${mount.relPath}#${mount.callerVar}`;
369
+ if (mount.callerVar === "app" || mount.callerVar === "server" || !targetedCallers.has(callerKey)) {
370
+ getPrefixes(callerKey).add("");
371
+ }
372
+ }
373
+
374
+ // 2. Propagate mounts
375
+ let changed = true;
376
+ let iterations = 0;
377
+
378
+ while (changed && iterations < 10) {
379
+ changed = false;
380
+ iterations++;
381
+
382
+ for (const mount of mounts) {
383
+ const callerKey = `${mount.relPath}#${mount.callerVar}`;
384
+ const callerPrefixes = getPrefixes(callerKey);
385
+ if (callerPrefixes.size === 0) continue;
386
+ const basePrefixes = Array.from(callerPrefixes);
387
+
388
+ // Check if targetVar is imported from another file
389
+ const fileMap = fileImports.get(mount.relPath);
390
+ const importedFile = fileMap?.get(mount.targetVar);
391
+
392
+ const targetKeys: string[] = [];
393
+ if (importedFile) {
394
+ // Cross-file mount: target router in importedFile
395
+ targetKeys.push(`${importedFile}#router`, `${importedFile}#default`, `${importedFile}#${mount.targetVar}`);
396
+ // Also any router variable in importedFile
397
+ for (const m of mounts) {
398
+ if (m.relPath === importedFile) {
399
+ targetKeys.push(`${importedFile}#${m.callerVar}`);
400
+ }
401
+ }
402
+ } else {
403
+ // Local mount in same file
404
+ targetKeys.push(`${mount.relPath}#${mount.targetVar}`);
405
+ }
406
+
407
+ for (const targetKey of targetKeys) {
408
+ const targetSet = getPrefixes(targetKey);
409
+ for (const baseP of basePrefixes) {
410
+ const combined = normalizeRouteUri(baseP, mount.prefix);
411
+ if (!targetSet.has(combined)) {
412
+ targetSet.add(combined);
413
+ changed = true;
414
+ }
415
+ }
416
+ }
417
+ }
418
+ }
419
+
420
+ // Convert Set to Array
421
+ const result = new Map<string, string[]>();
422
+ for (const [k, set] of prefixes.entries()) {
423
+ result.set(k, Array.from(set));
424
+ }
425
+ return result;
426
+ }
427
+
428
+ private findSourceFiles(dir: string): string[] {
429
+ const results: string[] = [];
430
+ try {
431
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
432
+ for (const entry of entries) {
433
+ const full = path.join(dir, entry.name);
434
+ if (entry.isDirectory() && !entry.name.startsWith(".") && entry.name !== "node_modules" && entry.name !== "dist") {
435
+ results.push(...this.findSourceFiles(full));
436
+ } else if (entry.isFile() && /\.(?:[cm]?[jt]sx?)$/.test(entry.name) && !entry.name.endsWith(".d.ts")) {
437
+ results.push(full);
438
+ }
439
+ }
440
+ } catch {}
441
+ return results;
442
+ }
443
+ }
444
+