devintelligence 1.0.0 → 1.0.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.
- package/.env.example +14 -14
- package/LICENSE +22 -22
- package/README.md +146 -146
- package/bin/devintelligence.js +2481 -12
- package/bin/devintelligence.ts +244 -103
- package/dist/App.d.ts +3 -0
- package/dist/ai.js +366 -0
- package/dist/ai.js.map +7 -0
- package/dist/components/DeepAnalysisViews.d.ts +13 -0
- package/dist/components/MobileAndPlatformViews.d.ts +22 -0
- package/dist/components/OverviewAndExplorerViews.d.ts +20 -0
- package/dist/components/RepairAndGateViews.d.ts +25 -0
- package/dist/engine/aiEngine.d.ts +62 -0
- package/dist/engine/analyzerEngine.d.ts +19 -0
- package/dist/engine/repairEngine.d.ts +42 -0
- package/dist/engine.js +1541 -0
- package/dist/engine.js.map +7 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +2344 -0
- package/dist/index.js.map +7 -0
- package/dist/main.d.ts +1 -0
- package/dist/repair.js +2052 -0
- package/dist/repair.js.map +7 -0
- package/dist/src/App.d.ts +3 -0
- package/dist/src/components/DeepAnalysisViews.d.ts +13 -0
- package/dist/src/components/MobileAndPlatformViews.d.ts +22 -0
- package/dist/src/components/OverviewAndExplorerViews.d.ts +20 -0
- package/dist/src/components/RepairAndGateViews.d.ts +25 -0
- package/dist/src/engine/aiEngine.d.ts +62 -0
- package/dist/src/engine/analyzerEngine.d.ts +19 -0
- package/dist/src/engine/repairEngine.d.ts +42 -0
- package/dist/src/index.d.ts +10 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/types/devintelligence.d.ts +250 -0
- package/dist/types/devintelligence.d.ts +250 -0
- package/fixtures/django-analytics-service/requirements.txt +4 -4
- package/fixtures/django-analytics-service/settings.py +16 -16
- package/fixtures/express-api-gateway/package.json +14 -14
- package/fixtures/express-api-gateway/src/server.ts +16 -16
- package/fixtures/nextjs-saas-portal/package.json +21 -21
- package/fixtures/nextjs-saas-portal/src/app/dashboard/page.tsx +26 -26
- package/fixtures/rn-bare-fitness/android/build.gradle +19 -19
- package/fixtures/rn-bare-fitness/ios/Info.plist +14 -14
- package/fixtures/rn-bare-fitness/package.json +23 -23
- package/fixtures/rn-bare-fitness/src/WorkoutTracker.tsx +31 -31
- package/fixtures/rn-expo-commerce/android/app/build.gradle +20 -20
- package/fixtures/rn-expo-commerce/android/app/src/main/AndroidManifest.xml +21 -21
- package/fixtures/rn-expo-commerce/android/gradle.properties +6 -6
- package/fixtures/rn-expo-commerce/app.json +17 -17
- package/fixtures/rn-expo-commerce/babel.config.js +10 -10
- package/fixtures/rn-expo-commerce/ios/Podfile +13 -13
- package/fixtures/rn-expo-commerce/metro.config.js +7 -7
- package/fixtures/rn-expo-commerce/package.json +31 -31
- package/fixtures/rn-expo-commerce/src/components/LegacyPromoBanner.tsx +11 -11
- package/fixtures/rn-expo-commerce/src/screens/ProductFeedScreen.tsx +48 -48
- package/fixtures/rn-expo-commerce/src/services/api.ts +15 -15
- package/package.json +89 -77
- package/index.html +0 -21
- package/server.ts +0 -275
- package/src/App.tsx +0 -783
- package/src/components/DeepAnalysisViews.tsx +0 -526
- package/src/components/MobileAndPlatformViews.tsx +0 -625
- package/src/components/OverviewAndExplorerViews.tsx +0 -753
- package/src/components/RepairAndGateViews.tsx +0 -814
- package/src/engine/aiEngine.test.ts +0 -86
- package/src/engine/aiEngine.ts +0 -346
- package/src/engine/analyzerEngine.test.ts +0 -110
- package/src/engine/analyzerEngine.ts +0 -1579
- package/src/engine/repairEngine.ts +0 -545
- package/src/index.css +0 -44
- package/src/index.ts +0 -59
- package/src/main.tsx +0 -5
- package/src/types/devintelligence.ts +0 -310
- package/tsconfig.json +0 -28
- package/vite.config.ts +0 -22
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
export type ProjectEcosystem =
|
|
2
|
-
| 'react-native-expo'
|
|
3
|
-
| 'react-native-bare'
|
|
4
|
-
| 'nextjs'
|
|
5
|
-
| 'react-vite'
|
|
6
|
-
| 'node-express'
|
|
7
|
-
| 'python-django'
|
|
8
|
-
| 'typescript-universal';
|
|
9
|
-
|
|
10
|
-
export type CheckStatus =
|
|
11
|
-
| 'working'
|
|
12
|
-
| 'incompatible'
|
|
13
|
-
| 'misconfigured'
|
|
14
|
-
| 'not_installed'
|
|
15
|
-
| 'os_unsupported';
|
|
16
|
-
|
|
17
|
-
export type IssueSeverity = 'critical' | 'high' | 'medium' | 'low';
|
|
18
|
-
|
|
19
|
-
export type RepairTier = 'SAFE' | 'REVIEW_REQUIRED' | 'RISKY';
|
|
20
|
-
|
|
21
|
-
export type IssueDomain =
|
|
22
|
-
| 'react-native'
|
|
23
|
-
| 'android'
|
|
24
|
-
| 'ios'
|
|
25
|
-
| 'code'
|
|
26
|
-
| 'design'
|
|
27
|
-
| 'performance'
|
|
28
|
-
| 'security'
|
|
29
|
-
| 'dependencies';
|
|
30
|
-
|
|
31
|
-
export interface EnvironmentCheckItem {
|
|
32
|
-
id: string;
|
|
33
|
-
name: string;
|
|
34
|
-
category: 'runtime' | 'package-manager' | 'react-native' | 'android' | 'ios' | 'build-tools';
|
|
35
|
-
status: CheckStatus;
|
|
36
|
-
detectedVersion: string;
|
|
37
|
-
requiredVersion: string;
|
|
38
|
-
osPlatform: string;
|
|
39
|
-
explanation: string;
|
|
40
|
-
remediationCommand?: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface DiagnosticIssue {
|
|
44
|
-
id: string;
|
|
45
|
-
projectId: string;
|
|
46
|
-
domain: IssueDomain;
|
|
47
|
-
ruleId: string;
|
|
48
|
-
title: string;
|
|
49
|
-
severity: IssueSeverity;
|
|
50
|
-
repairTier: RepairTier;
|
|
51
|
-
confidence: number; // 0-100
|
|
52
|
-
filePath: string;
|
|
53
|
-
line: number;
|
|
54
|
-
rootCause: string;
|
|
55
|
-
explanation: string;
|
|
56
|
-
recommendedRepair: string;
|
|
57
|
-
terminalCommand?: string;
|
|
58
|
-
fixAvailable: boolean;
|
|
59
|
-
beforeSnippet: string;
|
|
60
|
-
afterSnippet: string;
|
|
61
|
-
unifiedDiff: string;
|
|
62
|
-
fixed?: boolean;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface AndroidDiagnosticSummary {
|
|
66
|
-
present: boolean;
|
|
67
|
-
manifestPath: string | null;
|
|
68
|
-
packageName: string | null;
|
|
69
|
-
minSdkVersion: number | null;
|
|
70
|
-
compileSdkVersion: number | null;
|
|
71
|
-
targetSdkVersion: number | null;
|
|
72
|
-
agpVersion: string | null;
|
|
73
|
-
kotlinVersion: string | null;
|
|
74
|
-
ndkVersion: string | null;
|
|
75
|
-
hermesEnabled: boolean;
|
|
76
|
-
newArchEnabled: boolean;
|
|
77
|
-
jetifierEnabled: boolean;
|
|
78
|
-
gradleJvmArgs: string | null;
|
|
79
|
-
permissions: string[];
|
|
80
|
-
cleartextTrafficAllowed: boolean;
|
|
81
|
-
releaseMinifyEnabled: boolean;
|
|
82
|
-
releaseUsesDebugSigning: boolean;
|
|
83
|
-
abis: string[];
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export interface IosDiagnosticSummary {
|
|
87
|
-
present: boolean;
|
|
88
|
-
hostCanVerifyNativeBuild: boolean;
|
|
89
|
-
hostOsNote: string;
|
|
90
|
-
podfilePath: string | null;
|
|
91
|
-
infoPlistPath: string | null;
|
|
92
|
-
deploymentTarget: string | null;
|
|
93
|
-
bundleIdentifier: string | null;
|
|
94
|
-
hermesEnabled: boolean | null;
|
|
95
|
-
flipperEnabled: boolean;
|
|
96
|
-
useFrameworks: string | null;
|
|
97
|
-
declaredPermissions: string[];
|
|
98
|
-
missingRequiredPermissions: string[];
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export interface DependencyRecord {
|
|
102
|
-
name: string;
|
|
103
|
-
currentVersion: string;
|
|
104
|
-
recommendedVersion: string;
|
|
105
|
-
section: 'dependencies' | 'devDependencies' | 'python';
|
|
106
|
-
estimatedSizeKb: number;
|
|
107
|
-
status: 'compatible' | 'conflict' | 'heavy' | 'deprecated';
|
|
108
|
-
note: string;
|
|
109
|
-
replacementSuggestion?: string;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export interface DesignSystemReport {
|
|
113
|
-
discoveredTokens: {
|
|
114
|
-
colors: string[];
|
|
115
|
-
radii: string[];
|
|
116
|
-
spacingScale: string[];
|
|
117
|
-
fontFamilies: string[];
|
|
118
|
-
};
|
|
119
|
-
hardcodedColorsCount: number;
|
|
120
|
-
inconsistentSpacingCount: number;
|
|
121
|
-
randomRadiiCount: number;
|
|
122
|
-
emojiIconsCount: number;
|
|
123
|
-
accessibilityGapsCount: number;
|
|
124
|
-
tokenComplianceScore: number;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export interface PerformanceReport {
|
|
128
|
-
totalSourceFiles: number;
|
|
129
|
-
totalSourceSizeKb: number;
|
|
130
|
-
estimatedBundleWeightKb: number;
|
|
131
|
-
heavyDependencies: { name: string; sizeKb: number; reason: string }[];
|
|
132
|
-
renderBottlenecksCount: number;
|
|
133
|
-
memoryLeakRisksCount: number;
|
|
134
|
-
blockingIoCount: number;
|
|
135
|
-
unoptimizedAssets: string[];
|
|
136
|
-
performanceScore: number;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export interface LaunchDoctorReport {
|
|
140
|
-
frameworkName: string;
|
|
141
|
-
ecosystem: ProjectEcosystem;
|
|
142
|
-
packageManager: 'npm' | 'yarn' | 'pnpm' | 'bun' | 'pip';
|
|
143
|
-
workflowType: 'Expo Managed' | 'Expo Prebuild (CNG)' | 'Bare React Native' | 'Web / Backend Standard';
|
|
144
|
-
detectedScripts: Record<string, string>;
|
|
145
|
-
recommendedStartCommand: string;
|
|
146
|
-
secondaryCommands: { label: string; command: string }[];
|
|
147
|
-
metroConfigured: boolean;
|
|
148
|
-
babelConfigured: boolean;
|
|
149
|
-
typescriptConfigured: boolean;
|
|
150
|
-
androidLaunchReady: boolean;
|
|
151
|
-
iosLaunchReady: boolean;
|
|
152
|
-
readinessNotes: string[];
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export interface QualityGateConfig {
|
|
156
|
-
minCodeQuality: number;
|
|
157
|
-
minDesignQuality: number;
|
|
158
|
-
minPerformanceScore: number;
|
|
159
|
-
maxCriticalIssues: number;
|
|
160
|
-
maxSecurityIssues: number;
|
|
161
|
-
requireBuildVerification: boolean;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export interface QualityGateEvaluation {
|
|
165
|
-
passed: boolean;
|
|
166
|
-
exitCode: 0 | 1;
|
|
167
|
-
evaluatedAt: string;
|
|
168
|
-
checks: {
|
|
169
|
-
name: string;
|
|
170
|
-
actual: number | string;
|
|
171
|
-
threshold: number | string;
|
|
172
|
-
passed: boolean;
|
|
173
|
-
}[];
|
|
174
|
-
githubActionsYaml: string;
|
|
175
|
-
preCommitHookScript: string;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
export interface RepairRecord {
|
|
179
|
-
id: string;
|
|
180
|
-
projectId: string;
|
|
181
|
-
issueId: string;
|
|
182
|
-
issueTitle: string;
|
|
183
|
-
filePath: string;
|
|
184
|
-
repairTier: RepairTier;
|
|
185
|
-
appliedAt: string;
|
|
186
|
-
backupPath: string;
|
|
187
|
-
rolledBack: boolean;
|
|
188
|
-
verifiedAfterFix: boolean;
|
|
189
|
-
unifiedDiff: string;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export interface ScanSnapshot {
|
|
193
|
-
id: string;
|
|
194
|
-
projectId: string;
|
|
195
|
-
scannedAt: string;
|
|
196
|
-
durationMs: number;
|
|
197
|
-
totalIssues: number;
|
|
198
|
-
criticalCount: number;
|
|
199
|
-
safeFixableCount: number;
|
|
200
|
-
scores: {
|
|
201
|
-
overall: number;
|
|
202
|
-
reactNative: number;
|
|
203
|
-
codeQuality: number;
|
|
204
|
-
designQuality: number;
|
|
205
|
-
performance: number;
|
|
206
|
-
security: number;
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
export interface VisualTestingReport {
|
|
211
|
-
projectId: string;
|
|
212
|
-
lastCapturedAt: string;
|
|
213
|
-
engine: string;
|
|
214
|
-
viewportsTested: {
|
|
215
|
-
label: string;
|
|
216
|
-
width: number;
|
|
217
|
-
height: number;
|
|
218
|
-
overflowDetected: boolean;
|
|
219
|
-
brokenImagesCount: number;
|
|
220
|
-
consoleErrorsCount: number;
|
|
221
|
-
networkFailuresCount: number;
|
|
222
|
-
diffPercentage: number;
|
|
223
|
-
status: 'pass' | 'warning' | 'fail';
|
|
224
|
-
}[];
|
|
225
|
-
findings: {
|
|
226
|
-
viewport: string;
|
|
227
|
-
selector: string;
|
|
228
|
-
description: string;
|
|
229
|
-
recommendation: string;
|
|
230
|
-
}[];
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
export interface ErrorDiagnosisResult {
|
|
234
|
-
id: string;
|
|
235
|
-
category:
|
|
236
|
-
| 'Metro Bundler'
|
|
237
|
-
| 'Babel / Reanimated'
|
|
238
|
-
| 'Android Gradle / Kotlin'
|
|
239
|
-
| 'Android Manifest'
|
|
240
|
-
| 'CocoaPods / iOS'
|
|
241
|
-
| 'Native Module Linking'
|
|
242
|
-
| 'Hermes Runtime'
|
|
243
|
-
| 'React Render / Hook Crash'
|
|
244
|
-
| 'Dependency Conflict';
|
|
245
|
-
severity: IssueSeverity;
|
|
246
|
-
confidence: number;
|
|
247
|
-
summary: string;
|
|
248
|
-
rootCause: string;
|
|
249
|
-
responsibleFile: string;
|
|
250
|
-
line: number | null;
|
|
251
|
-
safeRepairSteps: string[];
|
|
252
|
-
terminalCommands: string[];
|
|
253
|
-
codePatchSuggestion?: string;
|
|
254
|
-
aiPowered?: boolean;
|
|
255
|
-
aiModel?: string;
|
|
256
|
-
fallbackUsed?: boolean;
|
|
257
|
-
fallbackReason?: string;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
export interface ProjectIntelligenceReport {
|
|
261
|
-
id: string;
|
|
262
|
-
name: string;
|
|
263
|
-
rootPath: string;
|
|
264
|
-
ecosystem: ProjectEcosystem;
|
|
265
|
-
description: string;
|
|
266
|
-
lastScannedAt: string;
|
|
267
|
-
scanDurationMs: number;
|
|
268
|
-
filesAnalyzed: string[];
|
|
269
|
-
scores: {
|
|
270
|
-
overall: number;
|
|
271
|
-
reactNative: number;
|
|
272
|
-
codeQuality: number;
|
|
273
|
-
designQuality: number;
|
|
274
|
-
performance: number;
|
|
275
|
-
security: number;
|
|
276
|
-
};
|
|
277
|
-
environmentChecks: EnvironmentCheckItem[];
|
|
278
|
-
issues: DiagnosticIssue[];
|
|
279
|
-
android: AndroidDiagnosticSummary;
|
|
280
|
-
ios: IosDiagnosticSummary;
|
|
281
|
-
dependencies: DependencyRecord[];
|
|
282
|
-
designSystem: DesignSystemReport;
|
|
283
|
-
performance: PerformanceReport;
|
|
284
|
-
launchDoctor: LaunchDoctorReport;
|
|
285
|
-
qualityGateConfig: QualityGateConfig;
|
|
286
|
-
qualityGateEvaluation: QualityGateEvaluation;
|
|
287
|
-
visualTesting: VisualTestingReport;
|
|
288
|
-
repairHistory: RepairRecord[];
|
|
289
|
-
scanHistory: ScanSnapshot[];
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
export type DashboardModuleId =
|
|
293
|
-
| 'command-center'
|
|
294
|
-
| 'project-explorer'
|
|
295
|
-
| 'project-health'
|
|
296
|
-
| 'rn-doctor'
|
|
297
|
-
| 'android-diagnostics'
|
|
298
|
-
| 'ios-diagnostics'
|
|
299
|
-
| 'code-intelligence'
|
|
300
|
-
| 'design-intelligence'
|
|
301
|
-
| 'performance-lab'
|
|
302
|
-
| 'security-audit'
|
|
303
|
-
| 'dependency-intelligence'
|
|
304
|
-
| 'error-diagnostics'
|
|
305
|
-
| 'auto-repair'
|
|
306
|
-
| 'visual-testing'
|
|
307
|
-
| 'quality-gate'
|
|
308
|
-
| 'project-history'
|
|
309
|
-
| 'environment-manager'
|
|
310
|
-
| 'settings';
|
package/tsconfig.json
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"experimentalDecorators": true,
|
|
5
|
-
"useDefineForClassFields": false,
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
"types": ["vite/client", "node"],
|
|
8
|
-
"lib": [
|
|
9
|
-
"ES2022",
|
|
10
|
-
"DOM",
|
|
11
|
-
"DOM.Iterable"
|
|
12
|
-
],
|
|
13
|
-
"skipLibCheck": true,
|
|
14
|
-
"moduleResolution": "bundler",
|
|
15
|
-
"isolatedModules": true,
|
|
16
|
-
"moduleDetection": "force",
|
|
17
|
-
"allowJs": true,
|
|
18
|
-
"jsx": "react-jsx",
|
|
19
|
-
"paths": {
|
|
20
|
-
"@/*": [
|
|
21
|
-
"./*"
|
|
22
|
-
]
|
|
23
|
-
},
|
|
24
|
-
"allowImportingTsExtensions": true,
|
|
25
|
-
"noEmit": true
|
|
26
|
-
},
|
|
27
|
-
"exclude": ["dist", "fixtures", "node_modules"]
|
|
28
|
-
}
|
package/vite.config.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import tailwindcss from '@tailwindcss/vite';
|
|
2
|
-
import react from '@vitejs/plugin-react';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import {defineConfig} from 'vite';
|
|
5
|
-
|
|
6
|
-
export default defineConfig(() => {
|
|
7
|
-
return {
|
|
8
|
-
plugins: [react(), tailwindcss()],
|
|
9
|
-
resolve: {
|
|
10
|
-
alias: {
|
|
11
|
-
'@': path.resolve(__dirname, '.'),
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
server: {
|
|
15
|
-
// HMR is disabled in AI Studio via DISABLE_HMR env var.
|
|
16
|
-
// Do not modify—file watching is disabled to prevent flickering during agent edits.
|
|
17
|
-
hmr: process.env.DISABLE_HMR !== 'true',
|
|
18
|
-
// Disable file watching when DISABLE_HMR is true to save CPU during agent edits.
|
|
19
|
-
watch: process.env.DISABLE_HMR === 'true' ? null : {},
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
});
|