@mr.dj2u/doctor 0.1.7 → 0.1.8

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 (68) hide show
  1. package/dist/checks/api-safety.d.ts +17 -0
  2. package/dist/checks/api-safety.d.ts.map +1 -0
  3. package/dist/checks/api-safety.js +282 -0
  4. package/dist/checks/api-safety.js.map +1 -0
  5. package/dist/checks/app-architecture.d.ts +3 -3
  6. package/dist/checks/app-architecture.d.ts.map +1 -1
  7. package/dist/checks/app-architecture.js +14 -11
  8. package/dist/checks/app-architecture.js.map +1 -1
  9. package/dist/checks/env-hygiene.d.ts +17 -0
  10. package/dist/checks/env-hygiene.d.ts.map +1 -1
  11. package/dist/checks/env-hygiene.js +376 -32
  12. package/dist/checks/env-hygiene.js.map +1 -1
  13. package/dist/checks/expo-config.d.ts.map +1 -1
  14. package/dist/checks/expo-config.js +4 -7
  15. package/dist/checks/expo-config.js.map +1 -1
  16. package/dist/checks/expo-doctor.d.ts.map +1 -1
  17. package/dist/checks/expo-doctor.js +6 -2
  18. package/dist/checks/expo-doctor.js.map +1 -1
  19. package/dist/checks/index.d.ts +4 -0
  20. package/dist/checks/index.d.ts.map +1 -1
  21. package/dist/checks/index.js +4 -0
  22. package/dist/checks/index.js.map +1 -1
  23. package/dist/checks/react-doctor.d.ts +28 -0
  24. package/dist/checks/react-doctor.d.ts.map +1 -0
  25. package/dist/checks/react-doctor.js +360 -0
  26. package/dist/checks/react-doctor.js.map +1 -0
  27. package/dist/checks/router-safety.d.ts +13 -0
  28. package/dist/checks/router-safety.d.ts.map +1 -0
  29. package/dist/checks/router-safety.js +360 -0
  30. package/dist/checks/router-safety.js.map +1 -0
  31. package/dist/checks/runtime-security.d.ts +17 -0
  32. package/dist/checks/runtime-security.d.ts.map +1 -0
  33. package/dist/checks/runtime-security.js +583 -0
  34. package/dist/checks/runtime-security.js.map +1 -0
  35. package/dist/checks/script-checks.d.ts +2 -0
  36. package/dist/checks/script-checks.d.ts.map +1 -1
  37. package/dist/checks/script-checks.js +33 -9
  38. package/dist/checks/script-checks.js.map +1 -1
  39. package/dist/cli-main.d.ts +1 -0
  40. package/dist/cli-main.d.ts.map +1 -1
  41. package/dist/cli-main.js +28 -1
  42. package/dist/cli-main.js.map +1 -1
  43. package/dist/expo-router.d.ts +15 -0
  44. package/dist/expo-router.d.ts.map +1 -0
  45. package/dist/expo-router.js +76 -0
  46. package/dist/expo-router.js.map +1 -0
  47. package/dist/index.d.ts +2 -1
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +22 -15
  50. package/dist/index.js.map +1 -1
  51. package/dist/modes.d.ts +8 -0
  52. package/dist/modes.d.ts.map +1 -0
  53. package/dist/modes.js +71 -0
  54. package/dist/modes.js.map +1 -0
  55. package/dist/reporter.d.ts +1 -1
  56. package/dist/reporter.d.ts.map +1 -1
  57. package/dist/reporter.js +73 -3
  58. package/dist/reporter.js.map +1 -1
  59. package/dist/scan-file.d.ts.map +1 -1
  60. package/dist/scan-file.js +9 -5
  61. package/dist/scan-file.js.map +1 -1
  62. package/dist/types.d.ts +33 -0
  63. package/dist/types.d.ts.map +1 -1
  64. package/dist/utils.d.ts +11 -0
  65. package/dist/utils.d.ts.map +1 -1
  66. package/dist/utils.js +124 -2
  67. package/dist/utils.js.map +1 -1
  68. package/package.json +1 -1
@@ -0,0 +1,360 @@
1
+ import { mkdir, readFile, writeFile } from 'node:fs/promises';
2
+ import os from 'node:os';
3
+ import path from 'node:path';
4
+ import { createSkippedCheck } from '../modes.js';
5
+ import { isRecord, pathExists, readOptionalText, runShellCommand } from '../utils.js';
6
+ const TODO_START = '<!-- mds-doctor:react-doctor:start -->';
7
+ const TODO_END = '<!-- mds-doctor:react-doctor:end -->';
8
+ export async function runReactDoctorCheck(args) {
9
+ if (!isReactProject(args.packageJson) && !(await isMonorepoWorkspaceRoot(args.projectPath, args.packageJson))) {
10
+ return createSkippedCheck('react doctor', 'Skipped because no React, React Native, Expo, or workspace signal was detected.', { reason: 'non-react project' });
11
+ }
12
+ const disabled = resolveReactDoctorDisabled(args.packageJson);
13
+ if (disabled) {
14
+ return createSkippedCheck('react doctor', `Skipped because ${disabled}.`, { reason: disabled });
15
+ }
16
+ if (args.mode === 'fast') {
17
+ return createSkippedCheck('react doctor', 'Skipped in fast mode; run --ci or --full to include React Doctor.', { reason: 'fast mode' });
18
+ }
19
+ const monorepo = await isMonorepoWorkspaceRoot(args.projectPath, args.packageJson);
20
+ const reportPath = path.join(os.tmpdir(), `mds-react-doctor-${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}.json`);
21
+ const runner = args.runner ?? defaultReactDoctorRunner;
22
+ const command = buildReactDoctorCommandDisplay(reportPath);
23
+ const result = await runner({
24
+ projectPath: args.projectPath,
25
+ reportPath,
26
+ monorepo,
27
+ timeoutMs: args.timeoutMs,
28
+ });
29
+ const parsed = await readReactDoctorReport(reportPath);
30
+ if (!parsed) {
31
+ return {
32
+ name: 'react doctor',
33
+ status: 'error',
34
+ message: result.timedOut
35
+ ? 'React Doctor timed out before it wrote a JSON report.'
36
+ : `React Doctor failed before it wrote a JSON report (exit ${result.code ?? 'unknown'}).`,
37
+ details: {
38
+ command,
39
+ code: result.code,
40
+ timedOut: result.timedOut,
41
+ stdout: tailLines(result.stdout),
42
+ stderr: tailLines(result.stderr),
43
+ },
44
+ };
45
+ }
46
+ const summary = summarizeReactDoctorReport(parsed);
47
+ const diagnostics = readArray(parsed.diagnostics);
48
+ const projects = readArray(parsed.projects);
49
+ const todoRecommendation = createTodoRecommendation(summary, parsed);
50
+ const todoUpdate = args.fix && todoRecommendation ? await writeTodoRecommendation(args.projectPath, todoRecommendation) : null;
51
+ const details = {
52
+ command,
53
+ version: readString(parsed.version),
54
+ reactDetected: parsed.reactDetected === true,
55
+ monorepo,
56
+ score: summary.score,
57
+ scoreSource: summary.scoreSource,
58
+ diagnostics: {
59
+ errors: summary.errorCount,
60
+ warnings: summary.warningCount,
61
+ total: summary.totalDiagnosticCount,
62
+ affectedFiles: summary.affectedFileCount,
63
+ sourceFiles: summary.sourceFileCount,
64
+ categories: topCounts(diagnostics, diagnosticCategory, 8),
65
+ topRules: topCounts(diagnostics, diagnosticRule, 10),
66
+ samples: diagnosticSamples(diagnostics, 8),
67
+ },
68
+ projects: projectSummaries(projects),
69
+ todoRecommendation,
70
+ todoUpdate,
71
+ stdout: tailLines(result.stdout),
72
+ stderr: tailLines(result.stderr),
73
+ };
74
+ if (result.code !== 0 && summary.totalDiagnosticCount === 0) {
75
+ return {
76
+ name: 'react doctor',
77
+ status: 'error',
78
+ message: `React Doctor failed with exit code ${result.code ?? 'unknown'}.`,
79
+ details,
80
+ };
81
+ }
82
+ if (summary.totalDiagnosticCount === 0) {
83
+ return {
84
+ name: 'react doctor',
85
+ status: 'pass',
86
+ message: 'React Doctor found no diagnostics.',
87
+ details,
88
+ };
89
+ }
90
+ return {
91
+ name: 'react doctor',
92
+ status: 'warn',
93
+ message: `React Doctor found ${summary.errorCount} errors and ${summary.warningCount} warnings.`,
94
+ details,
95
+ };
96
+ }
97
+ export function isReactProject(packageJson) {
98
+ return [
99
+ packageJson.dependencies,
100
+ packageJson.devDependencies,
101
+ ].some((dependencies) => {
102
+ return Boolean(dependencies?.react ??
103
+ dependencies?.['react-native'] ??
104
+ dependencies?.expo ??
105
+ dependencies?.['expo-router'] ??
106
+ dependencies?.['react-doctor']);
107
+ });
108
+ }
109
+ export function summarizeReactDoctorReport(report) {
110
+ const diagnostics = readArray(report.diagnostics);
111
+ const summary = isRecord(report.summary) ? report.summary : null;
112
+ const projects = readArray(report.projects);
113
+ const sourceFileCount = readNumberFromRecord(summary, 'sourceFileCount') ??
114
+ projects.reduce((sum, project) => sum + readProjectSourceFileCount(project), 0);
115
+ const errorCount = readNumberFromRecord(summary, 'errorCount') ??
116
+ diagnostics.filter((diagnostic) => diagnosticSeverity(diagnostic) === 'error').length;
117
+ const warningCount = readNumberFromRecord(summary, 'warningCount') ??
118
+ diagnostics.filter((diagnostic) => diagnosticSeverity(diagnostic) === 'warning').length;
119
+ const totalDiagnosticCount = readNumberFromRecord(summary, 'totalDiagnosticCount') ?? diagnostics.length;
120
+ const affectedFileCount = readNumberFromRecord(summary, 'affectedFileCount') ??
121
+ new Set(diagnostics.map((diagnostic) => readStringFromRecord(diagnostic, 'filePath')).filter(Boolean)).size;
122
+ const reactDoctorScore = readNumberFromRecord(summary, 'score');
123
+ return {
124
+ errorCount,
125
+ warningCount,
126
+ totalDiagnosticCount,
127
+ affectedFileCount,
128
+ sourceFileCount,
129
+ score: reactDoctorScore ?? computeLocalReactDoctorScore({
130
+ errorCount,
131
+ warningCount,
132
+ affectedFileCount,
133
+ sourceFileCount,
134
+ }),
135
+ scoreSource: reactDoctorScore === undefined ? 'mds-local' : 'react-doctor',
136
+ };
137
+ }
138
+ export function computeLocalReactDoctorScore(args) {
139
+ const sourceFileCount = Math.max(1, args.sourceFileCount);
140
+ const affectedFilePenalty = Math.min(10, (args.affectedFileCount / sourceFileCount) * 10);
141
+ const errorPenalty = Math.min(60, args.errorCount * 3);
142
+ const warningPenalty = Math.min(30, args.warningCount * 0.1);
143
+ return Math.max(0, Math.round(100 - errorPenalty - warningPenalty - affectedFilePenalty));
144
+ }
145
+ async function defaultReactDoctorRunner(args) {
146
+ return runShellCommand(buildReactDoctorCommand(args.reportPath), args.projectPath, args.timeoutMs);
147
+ }
148
+ function buildReactDoctorCommand(reportPath) {
149
+ return [
150
+ 'npx',
151
+ '-y',
152
+ 'react-doctor@latest',
153
+ '-y',
154
+ '--no-telemetry',
155
+ '--json',
156
+ '--json-out',
157
+ quoteCommandArg(reportPath),
158
+ '--blocking',
159
+ 'none',
160
+ ].join(' ');
161
+ }
162
+ function buildReactDoctorCommandDisplay(reportPath) {
163
+ return buildReactDoctorCommand(reportPath);
164
+ }
165
+ function quoteCommandArg(value) {
166
+ if (/^[\w@./:\\-]+$/u.test(value)) {
167
+ return value;
168
+ }
169
+ return `"${value.replace(/"/g, '\\"')}"`;
170
+ }
171
+ async function isMonorepoWorkspaceRoot(projectPath, packageJson) {
172
+ if (await pathExists(path.join(projectPath, 'pnpm-workspace.yaml'))) {
173
+ return true;
174
+ }
175
+ const workspaces = packageJson.workspaces;
176
+ return ((Array.isArray(workspaces) && workspaces.length > 0) ||
177
+ (isRecord(workspaces) && Array.isArray(workspaces.packages) && workspaces.packages.length > 0));
178
+ }
179
+ function resolveReactDoctorDisabled(packageJson) {
180
+ if (isFalsyEnvFlag(process.env.MDS_REACT_DOCTOR)) {
181
+ return 'MDS_REACT_DOCTOR is set to a falsy value';
182
+ }
183
+ if (isTruthyEnvFlag(process.env.MDS_DISABLE_REACT_DOCTOR)) {
184
+ return 'MDS_DISABLE_REACT_DOCTOR is enabled';
185
+ }
186
+ if (isTruthyEnvFlag(process.env.REACT_DOCTOR_DISABLED)) {
187
+ return 'REACT_DOCTOR_DISABLED is enabled';
188
+ }
189
+ const mdsReactDoctor = packageJson.mds?.reactDoctor;
190
+ if (mdsReactDoctor === false) {
191
+ return 'package.json mds.reactDoctor is false';
192
+ }
193
+ if (isRecord(mdsReactDoctor) && mdsReactDoctor.enabled === false) {
194
+ return 'package.json mds.reactDoctor.enabled is false';
195
+ }
196
+ if (packageJson.reactDoctor === false) {
197
+ return 'package.json reactDoctor is false';
198
+ }
199
+ if (isRecord(packageJson.reactDoctor) && packageJson.reactDoctor.enabled === false) {
200
+ return 'package.json reactDoctor.enabled is false';
201
+ }
202
+ return null;
203
+ }
204
+ function isFalsyEnvFlag(value) {
205
+ return ['0', 'false', 'off', 'no', 'disabled', 'disable'].includes(value?.trim().toLowerCase() ?? '');
206
+ }
207
+ function isTruthyEnvFlag(value) {
208
+ return ['1', 'true', 'on', 'yes', 'enabled', 'enable'].includes(value?.trim().toLowerCase() ?? '');
209
+ }
210
+ async function readReactDoctorReport(reportPath) {
211
+ try {
212
+ const raw = await readFile(reportPath, 'utf8');
213
+ const parsed = JSON.parse(raw);
214
+ return isRecord(parsed) ? parsed : null;
215
+ }
216
+ catch {
217
+ return null;
218
+ }
219
+ }
220
+ function createTodoRecommendation(summary, report) {
221
+ if (summary.errorCount <= 3 && summary.totalDiagnosticCount <= 25) {
222
+ return null;
223
+ }
224
+ const topRules = topCounts(readArray(report.diagnostics), diagnosticRule, 8)
225
+ .map((entry) => `- [ ] ${entry.name}: ${entry.count}`)
226
+ .join('\n');
227
+ return [
228
+ TODO_START,
229
+ '## High Priority: React Doctor Findings',
230
+ '',
231
+ `React Doctor found ${summary.errorCount} errors and ${summary.warningCount} warnings across ${summary.affectedFileCount} files.`,
232
+ '',
233
+ 'Top rules to triage:',
234
+ topRules || '- [ ] Review React Doctor diagnostics.',
235
+ '',
236
+ 'Suggested follow-up:',
237
+ '- [ ] Fix React Doctor errors first, then reduce the highest-count warning rules.',
238
+ '- [ ] Re-run `mds doctor --ci` and confirm the React Doctor score improves.',
239
+ TODO_END,
240
+ ].join('\n');
241
+ }
242
+ async function writeTodoRecommendation(projectPath, recommendation) {
243
+ const todoPath = path.join(projectPath, 'project', 'todo.md');
244
+ await mkdir(path.dirname(todoPath), { recursive: true });
245
+ const existing = (await readOptionalText(todoPath)) ?? '# Todo\n';
246
+ const next = upsertManagedBlock(existing, recommendation);
247
+ await writeFile(todoPath, next, 'utf8');
248
+ return { path: todoPath, wrote: next !== existing };
249
+ }
250
+ function upsertManagedBlock(existing, block) {
251
+ const start = existing.indexOf(TODO_START);
252
+ const end = existing.indexOf(TODO_END);
253
+ if (start !== -1 && end !== -1 && end > start) {
254
+ return `${existing.slice(0, start).replace(/\s*$/u, '\n\n')}${block}\n${existing
255
+ .slice(end + TODO_END.length)
256
+ .replace(/^\s*/u, '\n')}`;
257
+ }
258
+ return `${existing.replace(/\s*$/u, '')}\n\n${block}\n`;
259
+ }
260
+ function topCounts(diagnostics, select, limit) {
261
+ const counts = new Map();
262
+ for (const diagnostic of diagnostics) {
263
+ const name = select(diagnostic);
264
+ if (name) {
265
+ counts.set(name, (counts.get(name) ?? 0) + 1);
266
+ }
267
+ }
268
+ return Array.from(counts.entries())
269
+ .sort((left, right) => right[1] - left[1] || left[0].localeCompare(right[0]))
270
+ .slice(0, limit)
271
+ .map(([name, count]) => ({ name, count }));
272
+ }
273
+ function diagnosticSamples(diagnostics, limit) {
274
+ return diagnostics.slice(0, limit).map((diagnostic) => {
275
+ const rule = diagnosticRule(diagnostic) ?? 'unknown';
276
+ const message = readStringFromRecord(diagnostic, 'message') ?? '';
277
+ const sample = {
278
+ file: readStringFromRecord(diagnostic, 'normalizedFilePath') ?? readStringFromRecord(diagnostic, 'filePath') ?? '',
279
+ severity: diagnosticSeverity(diagnostic),
280
+ rule,
281
+ message,
282
+ };
283
+ const line = readNumberFromRecord(diagnostic, 'line');
284
+ const category = diagnosticCategory(diagnostic);
285
+ if (line !== undefined) {
286
+ sample.line = line;
287
+ }
288
+ if (category) {
289
+ sample.category = category;
290
+ }
291
+ return sample;
292
+ });
293
+ }
294
+ function projectSummaries(projects) {
295
+ return projects.map((project) => {
296
+ const diagnostics = readArrayFromRecord(project, 'diagnostics');
297
+ const summary = {
298
+ diagnostics: diagnostics.length,
299
+ sourceFiles: readProjectSourceFileCount(project),
300
+ };
301
+ const directory = readStringFromRecord(project, 'directory');
302
+ const framework = readStringFromRecord(project, 'framework');
303
+ return {
304
+ ...(directory ? { directory } : {}),
305
+ ...(framework ? { framework } : {}),
306
+ ...summary,
307
+ };
308
+ });
309
+ }
310
+ function diagnosticRule(diagnostic) {
311
+ const plugin = readStringFromRecord(diagnostic, 'plugin');
312
+ const rule = readStringFromRecord(diagnostic, 'rule');
313
+ if (plugin && rule) {
314
+ return `${plugin}/${rule}`;
315
+ }
316
+ return rule;
317
+ }
318
+ function diagnosticCategory(diagnostic) {
319
+ return readStringFromRecord(diagnostic, 'category');
320
+ }
321
+ function diagnosticSeverity(diagnostic) {
322
+ return readStringFromRecord(diagnostic, 'severity') ?? 'warning';
323
+ }
324
+ function readProjectSourceFileCount(project) {
325
+ return (readNumberFromRecord(project, 'analyzedFileCount') ??
326
+ readNumberFromRecord(project, 'scannedFileCount') ??
327
+ 0);
328
+ }
329
+ function readArray(value) {
330
+ return Array.isArray(value) ? value : [];
331
+ }
332
+ function readArrayFromRecord(value, key) {
333
+ if (!isRecord(value)) {
334
+ return [];
335
+ }
336
+ return readArray(value[key]);
337
+ }
338
+ function readString(value) {
339
+ return typeof value === 'string' ? value : undefined;
340
+ }
341
+ function readStringFromRecord(value, key) {
342
+ if (!isRecord(value)) {
343
+ return undefined;
344
+ }
345
+ return readString(value[key]);
346
+ }
347
+ function readNumber(value) {
348
+ return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
349
+ }
350
+ function readNumberFromRecord(value, key) {
351
+ if (!isRecord(value)) {
352
+ return undefined;
353
+ }
354
+ return readNumber(value[key]);
355
+ }
356
+ function tailLines(output, maxLines = 30) {
357
+ const lines = output.trim().split(/\r?\n/u).filter(Boolean);
358
+ return lines.slice(-maxLines).join('\n');
359
+ }
360
+ //# sourceMappingURL=react-doctor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-doctor.js","sourceRoot":"","sources":["../../src/checks/react-doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAQjD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEtF,MAAM,UAAU,GAAG,wCAAwC,CAAC;AAC5D,MAAM,QAAQ,GAAG,sCAAsC,CAAC;AAqBxD,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,IAOzC;IACC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,MAAM,uBAAuB,CAAC,IAAI,CA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AED,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACjF,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAc,EAAE,GAAW;IACvD,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,SAAS,CAAC,MAAc,EAAE,QAAQ,GAAG,EAAE;IAC9C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC5D,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3C,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { DoctorCheckResult } from '../types.js';
2
+ export interface RouterSafetyFinding {
3
+ file: string;
4
+ kind: string;
5
+ message: string;
6
+ }
7
+ export declare function checkRouterSafety(projectPath: string): Promise<DoctorCheckResult>;
8
+ export declare function scanFileRouterSafety(projectPath: string, filePath: string): Promise<DoctorCheckResult>;
9
+ export declare function checkRouteGroups(projectPath: string): Promise<RouterSafetyFinding[]>;
10
+ export declare function checkLayouts(projectPath: string): Promise<RouterSafetyFinding[]>;
11
+ export declare function checkNavigationPatterns(projectPath: string, filePath: string, contents: string): RouterSafetyFinding[];
12
+ export declare function checkMixedConcerns(projectPath: string, filePath: string, contents: string): RouterSafetyFinding[];
13
+ //# sourceMappingURL=router-safety.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router-safety.d.ts","sourceRoot":"","sources":["../../src/checks/router-safety.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AA2CrD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAuBvF;AAED,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,iBAAiB,CAAC,CA8C5B;AAED,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAuC1F;AAED,wBAAsB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAyCtF;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,mBAAmB,EAAE,CAwBvB;AAED,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,mBAAmB,EAAE,CA2CvB"}