Repository navigation
Expand file tree
/
Copy pathverify.ps1
More file actions
144 lines (127 loc) Β· 4.04 KB
/
Copy pathverify.ps1
File metadata and controls
144 lines (127 loc) Β· 4.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# ClarityLens Build Verification
Write-Host "π ClarityLens Build Verification" -ForegroundColor Cyan
Write-Host "=================================" -ForegroundColor Cyan
Write-Host ""
$errors = 0
$warnings = 0
# Check Node.js
Write-Host "Checking Node.js..." -NoNewline
try {
$nodeVersion = node --version
if ($nodeVersion) {
Write-Host " β Found $nodeVersion" -ForegroundColor Green
}
} catch {
Write-Host " β Node.js not found" -ForegroundColor Red
$errors++
}
# Check npm
Write-Host "Checking npm..." -NoNewline
try {
$npmVersion = npm --version
if ($npmVersion) {
Write-Host " β Found v$npmVersion" -ForegroundColor Green
}
} catch {
Write-Host " β npm not found" -ForegroundColor Red
$errors++
}
# Check required files
Write-Host ""
Write-Host "Checking project files..." -ForegroundColor Yellow
$requiredFiles = @(
"package.json",
"tsconfig.json",
"vite.config.ts",
"manifest.json",
"README.md",
"src\background\service-worker.ts",
"src\content\content.ts",
"src\ui\popup.html",
"src\ui\popup.ts",
"src\ui\popup.css"
)
foreach ($file in $requiredFiles) {
Write-Host " Checking $file..." -NoNewline
if (Test-Path $file) {
Write-Host " β" -ForegroundColor Green
} else {
Write-Host " β Missing" -ForegroundColor Red
$errors++
}
}
# Check AI modules
Write-Host ""
Write-Host "Checking AI API modules..." -ForegroundColor Yellow
$aiModules = @(
"src\lib\ai\summarizer.ts",
"src\lib\ai\rewriter.ts",
"src\lib\ai\prompt.ts",
"src\lib\ai\proofreader.ts",
"src\lib\ai\translator.ts"
)
foreach ($module in $aiModules) {
Write-Host " Checking $module..." -NoNewline
if (Test-Path $module) {
Write-Host " β" -ForegroundColor Green
} else {
Write-Host " β Missing" -ForegroundColor Red
$errors++
}
}
# Check content modules
Write-Host ""
Write-Host "Checking content script modules..." -ForegroundColor Yellow
$contentModules = @(
"src\content\capabilities.ts",
"src\content\simplify.ts",
"src\content\images.ts",
"src\content\forms.ts",
"src\content\translate.ts",
"src\content\wcag.ts"
)
foreach ($module in $contentModules) {
Write-Host " Checking $module..." -NoNewline
if (Test-Path $module) {
Write-Host " β" -ForegroundColor Green
} else {
Write-Host " β Missing" -ForegroundColor Red
$errors++
}
}
# Check if node_modules exists
Write-Host ""
Write-Host "Checking dependencies..." -NoNewline
if (Test-Path "node_modules") {
Write-Host " β Installed" -ForegroundColor Green
} else {
Write-Host " ! Run 'npm install'" -ForegroundColor Yellow
$warnings++
}
# Check if dist exists
Write-Host "Checking build output..." -NoNewline
if (Test-Path "dist") {
Write-Host " β Built" -ForegroundColor Green
} else {
Write-Host " ! Run 'npm run build'" -ForegroundColor Yellow
$warnings++
}
# Summary
Write-Host ""
Write-Host "=================================" -ForegroundColor Cyan
if ($errors -eq 0 -and $warnings -eq 0) {
Write-Host "β
All checks passed!" -ForegroundColor Green
Write-Host ""
Write-Host "Next steps:" -ForegroundColor Cyan
Write-Host " 1. npm install (if not done)" -ForegroundColor White
Write-Host " 2. npm run build (to create dist/)" -ForegroundColor White
Write-Host " 3. Load extension from dist/ folder" -ForegroundColor White
Write-Host " 4. Enable Chrome flags (see QUICKSTART.md)" -ForegroundColor White
} elseif ($errors -eq 0) {
Write-Host "β οΈ $warnings warning(s)" -ForegroundColor Yellow
Write-Host "Project structure is correct. Complete the warnings above." -ForegroundColor Yellow
} else {
Write-Host "β $errors error(s), $warnings warning(s)" -ForegroundColor Red
Write-Host "Some files are missing. Please check the errors above." -ForegroundColor Red
}
Write-Host ""