@flaid/devmap 0.6.0 → 0.7.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 +2 -2
- package/dist/analyzers/detectors/astUtils.d.ts +11 -0
- package/dist/analyzers/detectors/astUtils.d.ts.map +1 -0
- package/dist/analyzers/detectors/astUtils.js +47 -0
- package/dist/analyzers/detectors/astUtils.js.map +1 -0
- package/dist/analyzers/detectors/expoRouteDetector.d.ts +4 -0
- package/dist/analyzers/detectors/expoRouteDetector.d.ts.map +1 -0
- package/dist/analyzers/detectors/expoRouteDetector.js +119 -0
- package/dist/analyzers/detectors/expoRouteDetector.js.map +1 -0
- package/dist/analyzers/detectors/frameworkDetector.d.ts +2 -2
- package/dist/analyzers/detectors/frameworkDetector.d.ts.map +1 -1
- package/dist/analyzers/detectors/frameworkDetector.js +58 -3
- package/dist/analyzers/detectors/frameworkDetector.js.map +1 -1
- package/dist/analyzers/detectors/honoRouteDetector.d.ts +4 -0
- package/dist/analyzers/detectors/honoRouteDetector.d.ts.map +1 -0
- package/dist/analyzers/detectors/honoRouteDetector.js +337 -0
- package/dist/analyzers/detectors/honoRouteDetector.js.map +1 -0
- package/dist/analyzers/detectors/reactRouterRouteDetector.d.ts +4 -0
- package/dist/analyzers/detectors/reactRouterRouteDetector.d.ts.map +1 -0
- package/dist/analyzers/detectors/reactRouterRouteDetector.js +142 -0
- package/dist/analyzers/detectors/reactRouterRouteDetector.js.map +1 -0
- package/dist/analyzers/detectors/remixRouteDetector.d.ts +42 -0
- package/dist/analyzers/detectors/remixRouteDetector.d.ts.map +1 -0
- package/dist/analyzers/detectors/remixRouteDetector.js +123 -0
- package/dist/analyzers/detectors/remixRouteDetector.js.map +1 -0
- package/dist/analyzers/detectors/routeDetector.d.ts.map +1 -1
- package/dist/analyzers/detectors/routeDetector.js +15 -61
- package/dist/analyzers/detectors/routeDetector.js.map +1 -1
- package/dist/analyzers/detectors/routeUtils.d.ts +29 -0
- package/dist/analyzers/detectors/routeUtils.d.ts.map +1 -0
- package/dist/analyzers/detectors/routeUtils.js +111 -0
- package/dist/analyzers/detectors/routeUtils.js.map +1 -0
- package/dist/analyzers/detectors/tanstackRouteDetector.d.ts +4 -0
- package/dist/analyzers/detectors/tanstackRouteDetector.d.ts.map +1 -0
- package/dist/analyzers/detectors/tanstackRouteDetector.js +100 -0
- package/dist/analyzers/detectors/tanstackRouteDetector.js.map +1 -0
- package/dist/analyzers/graph/aliasResolver.d.ts.map +1 -1
- package/dist/analyzers/graph/aliasResolver.js +3 -0
- package/dist/analyzers/graph/aliasResolver.js.map +1 -1
- package/dist/analyzers/graph/bundlerAliases.d.ts +12 -0
- package/dist/analyzers/graph/bundlerAliases.d.ts.map +1 -0
- package/dist/analyzers/graph/bundlerAliases.js +328 -0
- package/dist/analyzers/graph/bundlerAliases.js.map +1 -0
- package/dist/analyzers/graph/entryPoints.d.ts.map +1 -1
- package/dist/analyzers/graph/entryPoints.js +21 -2
- package/dist/analyzers/graph/entryPoints.js.map +1 -1
- package/dist/analyzers/pipeline/projectMetadata.js +6 -0
- package/dist/analyzers/pipeline/projectMetadata.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -150,8 +150,8 @@ terminal decoration, or streamed partial output.
|
|
|
150
150
|
|
|
151
151
|
## Supported Stacks
|
|
152
152
|
|
|
153
|
-
- Frontend: Next.js, Astro, SvelteKit, Nuxt, React, Vue, Svelte
|
|
154
|
-
- Backend: Express, NestJS, Fastify, Koa
|
|
153
|
+
- Frontend: Next.js, Astro, SvelteKit, Nuxt, Remix, React Router v7, TanStack Router/Start, Expo Router, React, Vue, Svelte
|
|
154
|
+
- Backend: Express, NestJS, Fastify, Hono, Koa
|
|
155
155
|
|
|
156
156
|
Detection covers the full list above; Next.js and Express receive the deepest
|
|
157
157
|
analysis. Multi-package workspaces are classified per project type, so a
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ts } from "ts-morph";
|
|
2
|
+
/** Parse one source file without building a ts-morph Project. */
|
|
3
|
+
export declare function parseSource(path: string, content: string): ts.SourceFile;
|
|
4
|
+
/** The text of a plain string or an interpolation-free template literal. */
|
|
5
|
+
export declare function stringValue(node: ts.Node | undefined): string | undefined;
|
|
6
|
+
/** Strip `( )`, `as T`, `satisfies T`, `x!` and `await` wrappers. */
|
|
7
|
+
export declare function unwrapExpression(node: ts.Expression): ts.Expression;
|
|
8
|
+
export declare function walk(node: ts.Node, visit: (node: ts.Node) => void): void;
|
|
9
|
+
/** Name of a property key written as an identifier or a string. */
|
|
10
|
+
export declare function propertyKeyName(name: ts.PropertyName): string | undefined;
|
|
11
|
+
//# sourceMappingURL=astUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astUtils.d.ts","sourceRoot":"","sources":["../../../src/analyzers/detectors/astUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,iEAAiE;AACjE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,EAAE,CAAC,UAAU,CASxE;AAED,4EAA4E;AAC5E,wBAAgB,WAAW,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAKzE;AAED,qEAAqE;AACrE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,GAAG,EAAE,CAAC,UAAU,CAgBnE;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,GAAG,IAAI,CAGxE;AAED,mEAAmE;AACnE,wBAAgB,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,GAAG,MAAM,GAAG,SAAS,CAKzE"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ts } from "ts-morph";
|
|
2
|
+
/** Parse one source file without building a ts-morph Project. */
|
|
3
|
+
export function parseSource(path, content) {
|
|
4
|
+
const kind = /\.tsx$/.test(path)
|
|
5
|
+
? ts.ScriptKind.TSX
|
|
6
|
+
: /\.jsx$/.test(path)
|
|
7
|
+
? ts.ScriptKind.JSX
|
|
8
|
+
: /\.[cm]?js$/.test(path)
|
|
9
|
+
? ts.ScriptKind.JS
|
|
10
|
+
: ts.ScriptKind.TS;
|
|
11
|
+
return ts.createSourceFile(path, content, ts.ScriptTarget.Latest, true, kind);
|
|
12
|
+
}
|
|
13
|
+
/** The text of a plain string or an interpolation-free template literal. */
|
|
14
|
+
export function stringValue(node) {
|
|
15
|
+
if (node && (ts.isStringLiteral(node) || ts.isNoSubstitutionTemplateLiteral(node))) {
|
|
16
|
+
return node.text;
|
|
17
|
+
}
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
/** Strip `( )`, `as T`, `satisfies T`, `x!` and `await` wrappers. */
|
|
21
|
+
export function unwrapExpression(node) {
|
|
22
|
+
let current = node;
|
|
23
|
+
for (;;) {
|
|
24
|
+
if (ts.isParenthesizedExpression(current)
|
|
25
|
+
|| ts.isAsExpression(current)
|
|
26
|
+
|| ts.isSatisfiesExpression(current)
|
|
27
|
+
|| ts.isNonNullExpression(current)
|
|
28
|
+
|| ts.isAwaitExpression(current)
|
|
29
|
+
|| ts.isTypeAssertionExpression(current)) {
|
|
30
|
+
current = current.expression;
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
return current;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export function walk(node, visit) {
|
|
37
|
+
visit(node);
|
|
38
|
+
ts.forEachChild(node, (child) => walk(child, visit));
|
|
39
|
+
}
|
|
40
|
+
/** Name of a property key written as an identifier or a string. */
|
|
41
|
+
export function propertyKeyName(name) {
|
|
42
|
+
if (ts.isIdentifier(name) || ts.isStringLiteral(name) || ts.isNoSubstitutionTemplateLiteral(name)) {
|
|
43
|
+
return name.text;
|
|
44
|
+
}
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=astUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astUtils.js","sourceRoot":"","sources":["../../../src/analyzers/detectors/astUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,iEAAiE;AACjE,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,OAAe;IACvD,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QAC9B,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG;QACnB,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YACrB,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG;YACnB,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;gBACzB,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE;gBAClB,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;IACrB,OAAO,EAAE,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAChF,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,WAAW,CAAC,IAAyB;IACnD,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,+BAA+B,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QACnF,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,gBAAgB,CAAC,IAAmB;IAClD,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,SAAS,CAAC;QACR,IACE,EAAE,CAAC,yBAAyB,CAAC,OAAO,CAAC;eAClC,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC;eAC1B,EAAE,CAAC,qBAAqB,CAAC,OAAO,CAAC;eACjC,EAAE,CAAC,mBAAmB,CAAC,OAAO,CAAC;eAC/B,EAAE,CAAC,iBAAiB,CAAC,OAAO,CAAC;eAC7B,EAAE,CAAC,yBAAyB,CAAC,OAAO,CAAC,EACxC,CAAC;YACD,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;YAC7B,SAAS;QACX,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,IAAa,EAAE,KAA8B;IAChE,KAAK,CAAC,IAAI,CAAC,CAAC;IACZ,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AACvD,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,eAAe,CAAC,IAAqB;IACnD,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,+BAA+B,CAAC,IAAI,CAAC,EAAE,CAAC;QAClG,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expoRouteDetector.d.ts","sourceRoot":"","sources":["../../../src/analyzers/detectors/expoRouteDetector.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAmBpD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,SAAS,EAAE,CAqBlE"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { posix } from "node:path";
|
|
2
|
+
import { parseJsonText } from "../analysis/index.js";
|
|
3
|
+
import { isArchitectureSource } from "../graph/index.js";
|
|
4
|
+
import { findHttpMethods, joinRoutePaths, sortRoutes } from "./routeUtils.js";
|
|
5
|
+
/**
|
|
6
|
+
* Expo Router turns the `app/` folder (or `src/app/`) into screens:
|
|
7
|
+
*
|
|
8
|
+
* app/index.tsx → /
|
|
9
|
+
* app/(tabs)/explore.tsx → /explore (`(group)` folders add no URL)
|
|
10
|
+
* app/post/[id].tsx → /post/[id] (dynamic segment)
|
|
11
|
+
* app/[...missing].tsx → /[...missing] (catch-all)
|
|
12
|
+
* app/hello+api.ts → /hello (API route: `export function GET`)
|
|
13
|
+
* app/_layout.tsx, +html.tsx, +not-found.tsx → wrappers, not screens
|
|
14
|
+
*
|
|
15
|
+
* Platform suffixes (`about.web.tsx`, `about.native.tsx`) are the same screen.
|
|
16
|
+
*/
|
|
17
|
+
const SCREEN_EXTENSION = /\.(?:[cm]?[jt]sx?)$/;
|
|
18
|
+
const PLATFORM_SUFFIX = /\.(?:web|native|ios|android)$/;
|
|
19
|
+
export function detectExpoRoutes(files) {
|
|
20
|
+
const routes = new Map();
|
|
21
|
+
for (const root of findExpoAppDirs(files)) {
|
|
22
|
+
for (const file of files) {
|
|
23
|
+
if (!file.path.startsWith(root) || !isArchitectureSource(file.path))
|
|
24
|
+
continue;
|
|
25
|
+
if (!SCREEN_EXTENSION.test(file.path) || file.path.endsWith(".d.ts"))
|
|
26
|
+
continue;
|
|
27
|
+
const route = screenRoute(file.path.slice(root.length));
|
|
28
|
+
if (!route)
|
|
29
|
+
continue;
|
|
30
|
+
if (route.api) {
|
|
31
|
+
const methods = findHttpMethods(file.content);
|
|
32
|
+
add(routes, root, { path: route.path, file: file.path, kind: "api", ...(methods.length > 0 ? { methods } : {}) });
|
|
33
|
+
}
|
|
34
|
+
else if (/\bexport\s+default\b|export\s*\{[^}]*\bas\s+default\b/.test(file.content)) {
|
|
35
|
+
add(routes, root, { path: route.path, file: file.path, kind: "page" });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return sortRoutes([...routes.values()]);
|
|
40
|
+
}
|
|
41
|
+
/** Keep the first file for a URL: `about.tsx` before `about.web.tsx`. */
|
|
42
|
+
function add(routes, root, route) {
|
|
43
|
+
const key = `${root}\0${route.kind}:${route.path}`;
|
|
44
|
+
const existing = routes.get(key);
|
|
45
|
+
if (!existing || route.file.length < existing.file.length)
|
|
46
|
+
routes.set(key, route);
|
|
47
|
+
}
|
|
48
|
+
function screenRoute(relative) {
|
|
49
|
+
let name = relative.replace(SCREEN_EXTENSION, "");
|
|
50
|
+
let api = false;
|
|
51
|
+
if (name.endsWith("+api")) {
|
|
52
|
+
api = true;
|
|
53
|
+
name = name.slice(0, -"+api".length);
|
|
54
|
+
}
|
|
55
|
+
name = name.replace(PLATFORM_SUFFIX, "");
|
|
56
|
+
const segments = name.split("/");
|
|
57
|
+
const last = segments[segments.length - 1];
|
|
58
|
+
// `_layout`, `+html`, `+not-found`, `+native-intent`, `+middleware`.
|
|
59
|
+
if (last.startsWith("_layout") || (last.startsWith("+") && !api))
|
|
60
|
+
return undefined;
|
|
61
|
+
if (last === "index")
|
|
62
|
+
segments.pop();
|
|
63
|
+
const url = segments.filter((segment) => segment !== "" && !/^\(.*\)$/.test(segment));
|
|
64
|
+
return { path: joinRoutePaths(...url), api };
|
|
65
|
+
}
|
|
66
|
+
/** `app/` folders of every project that has Expo Router installed. */
|
|
67
|
+
function findExpoAppDirs(files) {
|
|
68
|
+
// One entry per project folder: package.json and app.json both name
|
|
69
|
+
// expo-router, but only app.json can say where the screens live.
|
|
70
|
+
const projects = new Map();
|
|
71
|
+
for (const file of files) {
|
|
72
|
+
const isManifest = /(^|\/)package\.json$/.test(file.path);
|
|
73
|
+
const isAppConfig = /(^|\/)app(?:\.config\.[cm]?[jt]s|\.json)$/.test(file.path);
|
|
74
|
+
if (!isManifest && !isAppConfig)
|
|
75
|
+
continue;
|
|
76
|
+
if (!file.content.includes("expo-router") || !isArchitectureSource(file.path))
|
|
77
|
+
continue;
|
|
78
|
+
const projectDir = posix.dirname(file.path) === "." ? "" : `${posix.dirname(file.path)}/`;
|
|
79
|
+
const custom = isAppConfig ? readCustomRoot(file) : undefined;
|
|
80
|
+
projects.set(projectDir, custom ?? projects.get(projectDir));
|
|
81
|
+
}
|
|
82
|
+
const dirs = new Set();
|
|
83
|
+
for (const [projectDir, custom] of projects) {
|
|
84
|
+
const candidates = [
|
|
85
|
+
...(custom ? [`${projectDir}${custom}/`] : []),
|
|
86
|
+
`${projectDir}src/app/`,
|
|
87
|
+
`${projectDir}app/`
|
|
88
|
+
];
|
|
89
|
+
const found = candidates.find((candidate) => files.some((item) => item.path.startsWith(candidate)));
|
|
90
|
+
if (found)
|
|
91
|
+
dirs.add(found);
|
|
92
|
+
}
|
|
93
|
+
return [...dirs];
|
|
94
|
+
}
|
|
95
|
+
/** `["expo-router", { "root": "src/app" }]` in app.json. */
|
|
96
|
+
function readCustomRoot(file) {
|
|
97
|
+
if (!file.path.endsWith(".json")) {
|
|
98
|
+
const match = /expo-router["'`]\s*,\s*\{[^}]*\broot\s*:\s*["'`]([^"'`]+)["'`]/s.exec(file.content);
|
|
99
|
+
return match ? cleanRoot(match[1]) : undefined;
|
|
100
|
+
}
|
|
101
|
+
try {
|
|
102
|
+
const parsed = parseJsonText(file.content);
|
|
103
|
+
for (const plugin of parsed.expo?.plugins ?? []) {
|
|
104
|
+
if (Array.isArray(plugin) && plugin[0] === "expo-router") {
|
|
105
|
+
const root = plugin[1]?.root;
|
|
106
|
+
if (typeof root === "string")
|
|
107
|
+
return cleanRoot(root);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
return undefined;
|
|
113
|
+
}
|
|
114
|
+
return undefined;
|
|
115
|
+
}
|
|
116
|
+
function cleanRoot(root) {
|
|
117
|
+
return root.replace(/^\.\//, "").replace(/\/+$/, "");
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=expoRouteDetector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expoRouteDetector.js","sourceRoot":"","sources":["../../../src/analyzers/detectors/expoRouteDetector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE9E;;;;;;;;;;;GAWG;AAEH,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;AAC/C,MAAM,eAAe,GAAG,+BAA+B,CAAC;AAExD,MAAM,UAAU,gBAAgB,CAAC,KAAoB;IACnD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAqB,CAAC;IAE5C,KAAK,MAAM,IAAI,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC;gBAAE,SAAS;YAC9E,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAAE,SAAS;YAE/E,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACxD,IAAI,CAAC,KAAK;gBAAE,SAAS;YAErB,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC;gBACd,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,OAAO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AAED,4DAA4D;AAC5D,SAAS,cAAc,CAAC,IAAiB;IACvC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,iEAAiE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnG,OAAO,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACjD,CAAC;IAED,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,OAAO,CAAuC,CAAC;QACjF,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE,EAAE,CAAC;YAChD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,aAAa,EAAE,CAAC;gBACzD,MAAM,IAAI,GAAI,MAAM,CAAC,CAAC,CAAoC,EAAE,IAAI,CAAC;gBACjE,IAAI,OAAO,IAAI,KAAK,QAAQ;oBAAE,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ScannedFile } from "../analysis/index.js";
|
|
2
|
-
export declare const FRONTEND_FRAMEWORKS: readonly ["nextjs", "nuxt", "sveltekit", "astro", "react", "vue", "svelte"];
|
|
3
|
-
export declare const BACKEND_FRAMEWORKS: readonly ["nestjs", "fastify", "express", "koa"];
|
|
2
|
+
export declare const FRONTEND_FRAMEWORKS: readonly ["nextjs", "nuxt", "sveltekit", "astro", "remix", "react-router", "tanstack-start", "tanstack-router", "expo", "react", "vue", "svelte"];
|
|
3
|
+
export declare const BACKEND_FRAMEWORKS: readonly ["nestjs", "fastify", "express", "hono", "koa"];
|
|
4
4
|
export type FrontendFramework = typeof FRONTEND_FRAMEWORKS[number];
|
|
5
5
|
export type BackendFramework = typeof BACKEND_FRAMEWORKS[number];
|
|
6
6
|
export type Framework = FrontendFramework | BackendFramework | "unknown";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frameworkDetector.d.ts","sourceRoot":"","sources":["../../../src/analyzers/detectors/frameworkDetector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"frameworkDetector.d.ts","sourceRoot":"","sources":["../../../src/analyzers/detectors/frameworkDetector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAKvE,eAAO,MAAM,mBAAmB,mJAItB,CAAC;AACX,eAAO,MAAM,kBAAkB,0DAErB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;AACnE,MAAM,MAAM,gBAAgB,GAAG,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;AACjE,MAAM,MAAM,SAAS,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,SAAS,CAAC;AACzE,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAE9D,eAAO,MAAM,sBAAsB,aAAuC,CAAC;AAC3E,eAAO,MAAM,qBAAqB,aAAsC,CAAC;AAEzE,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,SAAS,CAG/D;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,iBAAiB,EAAE,CAkK1E"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { parseJsonText } from "../analysis/index.js";
|
|
2
2
|
import { isArchitectureSource } from "../graph/index.js";
|
|
3
|
+
// Order is priority: the first detected framework of a category wins. The
|
|
4
|
+
// meta-frameworks come before plain `react` because they all ship React too.
|
|
3
5
|
export const FRONTEND_FRAMEWORKS = [
|
|
4
|
-
"nextjs", "nuxt", "sveltekit", "astro",
|
|
6
|
+
"nextjs", "nuxt", "sveltekit", "astro",
|
|
7
|
+
"remix", "react-router", "tanstack-start", "tanstack-router", "expo",
|
|
8
|
+
"react", "vue", "svelte"
|
|
5
9
|
];
|
|
6
10
|
export const BACKEND_FRAMEWORKS = [
|
|
7
|
-
"nestjs", "fastify", "express", "koa"
|
|
11
|
+
"nestjs", "fastify", "express", "hono", "koa"
|
|
8
12
|
];
|
|
9
13
|
export const FRONTEND_FRAMEWORK_SET = new Set(FRONTEND_FRAMEWORKS);
|
|
10
14
|
export const BACKEND_FRAMEWORK_SET = new Set(BACKEND_FRAMEWORKS);
|
|
@@ -42,6 +46,23 @@ export function detectFrameworks(files) {
|
|
|
42
46
|
}
|
|
43
47
|
if ("@sveltejs/kit" in dependencies)
|
|
44
48
|
detected.add("sveltekit");
|
|
49
|
+
if ("hono" in dependencies)
|
|
50
|
+
detected.add("hono");
|
|
51
|
+
// Remix v2 lives under `@remix-run/*`; `@remix-run/router` is React Router's
|
|
52
|
+
// own internal package and says nothing about Remix.
|
|
53
|
+
if (REMIX_PACKAGES.some((name) => name in dependencies))
|
|
54
|
+
detected.add("remix");
|
|
55
|
+
// React Router v7 "framework mode" (the Remix successor) is the dev tooling;
|
|
56
|
+
// `react-router-dom` alone is just a client-side router inside a React app.
|
|
57
|
+
if ("@react-router/dev" in dependencies)
|
|
58
|
+
detected.add("react-router");
|
|
59
|
+
if (Object.keys(dependencies).some(isTanStackStartPackage))
|
|
60
|
+
detected.add("tanstack-start");
|
|
61
|
+
if (TANSTACK_ROUTER_PACKAGES.some((name) => name in dependencies))
|
|
62
|
+
detected.add("tanstack-router");
|
|
63
|
+
// Expo Router is what makes `app/` a route tree; bare Expo is just React Native.
|
|
64
|
+
if ("expo-router" in dependencies)
|
|
65
|
+
detected.add("expo");
|
|
45
66
|
const hasReactRuntime = "react-dom" in dependencies
|
|
46
67
|
|| "react-scripts" in dependencies
|
|
47
68
|
|| "@vitejs/plugin-react" in dependencies
|
|
@@ -75,7 +96,9 @@ export function detectFrameworks(files) {
|
|
|
75
96
|
// (Astro uses the same folder for endpoints), so it is deliberately excluded
|
|
76
97
|
// from the Pages Router signal here.
|
|
77
98
|
if (files.some((file) => /(^|\/)next\.config\.[cm]?[jt]s$/.test(file.path))
|
|
78
|
-
|| sourceFiles.some((file) =>
|
|
99
|
+
|| sourceFiles.some((file) =>
|
|
100
|
+
// `app/routes/blog/route.tsx` is a Remix route folder, not a Next route handler.
|
|
101
|
+
/(^|\/)(?:src\/)?app\/(?!routes\/)(?:.+\/)?(?:page|layout|route)\.[jt]sx?$/.test(file.path)
|
|
79
102
|
|| /(^|\/)(?:src\/)?pages\/(?:_app|_document)/.test(file.path))) {
|
|
80
103
|
detected.add("nextjs");
|
|
81
104
|
}
|
|
@@ -123,11 +146,43 @@ export function detectFrameworks(files) {
|
|
|
123
146
|
if (files.some((file) => /(^|\/)nest-cli\.json$/.test(file.path))) {
|
|
124
147
|
detected.add("nestjs");
|
|
125
148
|
}
|
|
149
|
+
// Remix / React Router v7: their config files are specific to each tool.
|
|
150
|
+
if (files.some((file) => /(^|\/)remix\.config\.[cm]?js$/.test(file.path))) {
|
|
151
|
+
detected.add("remix");
|
|
152
|
+
}
|
|
153
|
+
if (files.some((file) => /(^|\/)react-router\.config\.[cm]?[jt]s$/.test(file.path))) {
|
|
154
|
+
detected.add("react-router");
|
|
155
|
+
}
|
|
156
|
+
// TanStack Router writes `routeTree.gen.ts` (or the name set in `tsr.config.json`).
|
|
157
|
+
if (files.some((file) => /(^|\/)(?:routeTree\.gen\.[jt]sx?|tsr\.config\.json)$/.test(file.path))) {
|
|
158
|
+
detected.add("tanstack-router");
|
|
159
|
+
}
|
|
160
|
+
// Expo Router: the config plugin is declared in app.json / app.config.*.
|
|
161
|
+
if (files.some((file) => /(^|\/)app(?:\.config\.[cm]?[jt]s|\.json)$/.test(file.path) && file.content.includes("expo-router"))) {
|
|
162
|
+
detected.add("expo");
|
|
163
|
+
}
|
|
164
|
+
// Hono: like Express, the import is only trusted when no manifest can confirm it.
|
|
165
|
+
if (!hasReliableManifest && sourceFiles.some((file) => /from\s+["']hono["']/.test(file.content))) {
|
|
166
|
+
detected.add("hono");
|
|
167
|
+
}
|
|
126
168
|
return [
|
|
127
169
|
FRONTEND_FRAMEWORKS.find((framework) => detected.has(framework)),
|
|
128
170
|
BACKEND_FRAMEWORKS.find((framework) => detected.has(framework)),
|
|
129
171
|
].filter((framework) => Boolean(framework));
|
|
130
172
|
}
|
|
173
|
+
const REMIX_PACKAGES = [
|
|
174
|
+
"@remix-run/dev", "@remix-run/react", "@remix-run/serve",
|
|
175
|
+
"@remix-run/node", "@remix-run/cloudflare", "@remix-run/deno"
|
|
176
|
+
];
|
|
177
|
+
const TANSTACK_ROUTER_PACKAGES = [
|
|
178
|
+
"@tanstack/react-router", "@tanstack/solid-router",
|
|
179
|
+
"@tanstack/router-plugin", "@tanstack/router-vite-plugin", "@tanstack/router-cli"
|
|
180
|
+
];
|
|
181
|
+
// `@tanstack/react-start`, `@tanstack/solid-start`, and the pre-1.0 `@tanstack/start`
|
|
182
|
+
// (plus its `start-*` helper packages).
|
|
183
|
+
function isTanStackStartPackage(name) {
|
|
184
|
+
return /^@tanstack\/(?:react-start|solid-start|start)(?:-|$)/.test(name);
|
|
185
|
+
}
|
|
131
186
|
function isParseableJson(content) {
|
|
132
187
|
try {
|
|
133
188
|
parseJsonText(content);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frameworkDetector.js","sourceRoot":"","sources":["../../../src/analyzers/detectors/frameworkDetector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAoB,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ;
|
|
1
|
+
{"version":3,"file":"frameworkDetector.js","sourceRoot":"","sources":["../../../src/analyzers/detectors/frameworkDetector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAoB,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,0EAA0E;AAC1E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO;IACtC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM;IACpE,OAAO,EAAE,KAAK,EAAE,QAAQ;CAChB,CAAC;AACX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK;CACrC,CAAC;AAOX,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAS,mBAAmB,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAS,kBAAkB,CAAC,CAAC;AAEzE,MAAM,UAAU,eAAe,CAAC,KAAoB;IAClD,MAAM,CAAC,cAAc,EAAE,aAAa,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAChE,OAAO,cAAc,IAAI,aAAa,IAAI,SAAS,CAAC;AACtD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,C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;AAED,SAAS,gBAAgB,CAAC,OAAe;IACvC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAGnC,CAAC;QAEF,OAAO;YACL,GAAG,MAAM,CAAC,YAAY;YACtB,GAAG,MAAM,CAAC,eAAe;SAC1B,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ScannedFile } from "../analysis/index.js";
|
|
2
|
+
import type { RouteInfo } from "./routeDetector.js";
|
|
3
|
+
export declare function detectHonoRoutes(files: ScannedFile[], graph?: Record<string, string[]>): RouteInfo[];
|
|
4
|
+
//# sourceMappingURL=honoRouteDetector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"honoRouteDetector.d.ts","sourceRoot":"","sources":["../../../src/analyzers/detectors/honoRouteDetector.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAgDpD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,WAAW,EAAE,EACpB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAC/B,SAAS,EAAE,CA2Ob"}
|