vibe-guard 1.2.0 → 2.1.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 +38 -74
- package/dist/bin/vibe-guard.js +93 -264
- package/dist/bin/vibe-guard.js.map +1 -1
- package/dist/index.d.ts +4 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -69
- package/dist/index.js.map +1 -1
- package/dist/reporter.d.ts +4 -11
- package/dist/reporter.d.ts.map +1 -1
- package/dist/reporter.js +125 -461
- package/dist/reporter.js.map +1 -1
- package/dist/rules/exposed-secrets.d.ts.map +1 -1
- package/dist/rules/exposed-secrets.js +27 -8
- package/dist/rules/exposed-secrets.js.map +1 -1
- package/dist/rules/hardcoded-sensitive-data.js +1 -1
- package/dist/rules/hardcoded-sensitive-data.js.map +1 -1
- package/dist/rules/index.d.ts +3 -1
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/index.js +7 -1
- package/dist/rules/index.js.map +1 -1
- package/dist/rules/insecure-deserialization.js +1 -1
- package/dist/rules/insecure-deserialization.js.map +1 -1
- package/dist/rules/insecure-error-handling.js +1 -1
- package/dist/rules/insecure-error-handling.js.map +1 -1
- package/dist/rules/insecure-file-upload.js +1 -1
- package/dist/rules/insecure-file-upload.js.map +1 -1
- package/dist/rules/insecure-http.js +1 -1
- package/dist/rules/insecure-http.js.map +1 -1
- package/dist/rules/insecure-logging.js +1 -1
- package/dist/rules/insecure-logging.js.map +1 -1
- package/dist/rules/kubernetes-security.js +3 -3
- package/dist/rules/kubernetes-security.js.map +1 -1
- package/dist/rules/unpinned-supply-chain-dependencies.d.ts +12 -0
- package/dist/rules/unpinned-supply-chain-dependencies.d.ts.map +1 -0
- package/dist/rules/unpinned-supply-chain-dependencies.js +56 -0
- package/dist/rules/unpinned-supply-chain-dependencies.js.map +1 -0
- package/dist/rules/unsafe-llm-prompt-construction.d.ts +9 -0
- package/dist/rules/unsafe-llm-prompt-construction.d.ts.map +1 -0
- package/dist/rules/unsafe-llm-prompt-construction.js +31 -0
- package/dist/rules/unsafe-llm-prompt-construction.js.map +1 -0
- package/dist/rules/xss-detection.js +1 -1
- package/dist/rules/xss-detection.js.map +1 -1
- package/dist/scanner.d.ts +1 -2
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +43 -116
- package/dist/scanner.js.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.js +1 -1
- package/package.json +20 -18
package/dist/scanner.d.ts
CHANGED
|
@@ -4,8 +4,7 @@ export declare class FileScanner {
|
|
|
4
4
|
private readonly excludePatterns;
|
|
5
5
|
private readonly maxFileSize;
|
|
6
6
|
private readonly binaryExtensions;
|
|
7
|
-
|
|
8
|
-
scanFile(filePath: string, rules: BaseRule[]): Promise<ScanResult>;
|
|
7
|
+
scan(targetPath: string, rules: BaseRule[]): Promise<ScanResult>;
|
|
9
8
|
private findFiles;
|
|
10
9
|
private isSupportedFile;
|
|
11
10
|
private readFile;
|
package/dist/scanner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../src/scanner.ts"],"names":[],"mappings":"AAGA,OAAO,EAA8B,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../src/scanner.ts"],"names":[],"mappings":"AAGA,OAAO,EAA8B,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE3E,qBAAa,WAAW;IAEtB,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAOlC;IAGF,OAAO,CAAC,QAAQ,CAAC,eAAe,CAK9B;IAGF,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmB;IAG/C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAI/B;IAGI,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YA6BxD,SAAS;IAcvB,OAAO,CAAC,eAAe;YAMT,QAAQ;YAmBT,YAAY;IA0BzB,OAAO,CAAC,gBAAgB;CAWzB"}
|
package/dist/scanner.js
CHANGED
|
@@ -37,9 +37,9 @@ exports.FileScanner = void 0;
|
|
|
37
37
|
const fs = __importStar(require("fs"));
|
|
38
38
|
const path = __importStar(require("path"));
|
|
39
39
|
const glob_1 = require("glob");
|
|
40
|
-
// Class for scanning the files for security issues
|
|
41
40
|
class FileScanner {
|
|
42
41
|
constructor() {
|
|
42
|
+
// Supported langs/configs, ADD MORE IF NEEDED
|
|
43
43
|
this.supportedExtensions = [
|
|
44
44
|
'.js', '.jsx', '.ts', '.tsx', '.vue', '.svelte',
|
|
45
45
|
'.py', '.php', '.rb', '.go', '.java', '.cs',
|
|
@@ -48,185 +48,112 @@ class FileScanner {
|
|
|
48
48
|
'.json', '.yaml', '.yml', '.xml', '.env',
|
|
49
49
|
'.config', '.conf', '.ini', '.toml'
|
|
50
50
|
];
|
|
51
|
-
//
|
|
51
|
+
// Common build/dependency exclusions
|
|
52
52
|
this.excludePatterns = [
|
|
53
|
-
'**/node_modules/**',
|
|
54
|
-
'**/
|
|
55
|
-
'**/
|
|
56
|
-
'
|
|
57
|
-
'**/coverage/**',
|
|
58
|
-
'**/*.min.js',
|
|
59
|
-
'**/*.bundle.js',
|
|
60
|
-
'**/vendor/**',
|
|
61
|
-
'**/__pycache__/**',
|
|
62
|
-
'**/*.pyc',
|
|
63
|
-
'**/target/**',
|
|
64
|
-
'**/bin/**',
|
|
65
|
-
'**/obj/**'
|
|
53
|
+
'**/node_modules/**', '**/dist/**', '**/build/**',
|
|
54
|
+
'**/.git/**', '**/coverage/**', '**/*.min.js',
|
|
55
|
+
'**/*.bundle.js', '**/vendor/**', '**/__pycache__/**',
|
|
56
|
+
'**/*.pyc', '**/target/**', '**/bin/**', '**/obj/**'
|
|
66
57
|
];
|
|
67
|
-
//
|
|
58
|
+
// 5MB limit, can be adjusted. example: 10mb dockerfile = 10 * 1024 * 1024
|
|
68
59
|
this.maxFileSize = 5 * 1024 * 1024;
|
|
69
|
-
//
|
|
60
|
+
// Heuristics exclude binaries
|
|
70
61
|
this.binaryExtensions = [
|
|
71
|
-
'.exe', '.dll', '.so', '.dylib', '.bin',
|
|
72
|
-
'.
|
|
73
|
-
'.
|
|
74
|
-
'.jpg', '.jpeg', '.png', '.gif', '.bmp', '.ico',
|
|
75
|
-
'.mp3', '.mp4', '.avi', '.mov', '.wmv', '.flv',
|
|
76
|
-
'.pdf', '.doc', '.docx', '.xls', '.xlsx', '.ppt',
|
|
77
|
-
'.sqlite', '.db', '.mdb', '.accdb',
|
|
78
|
-
'.ttf', '.otf', '.woff', '.woff2', '.eot',
|
|
79
|
-
'.class', '.jar', '.war', '.ear',
|
|
80
|
-
'.o', '.obj', '.lib', '.a'
|
|
62
|
+
'.exe', '.dll', '.so', '.dylib', '.bin',
|
|
63
|
+
'.jpg', '.png', '.gif', '.pdf', '.zip',
|
|
64
|
+
'.mp3', '.mp4', '.sqlite', '.db', '.ttf'
|
|
81
65
|
];
|
|
82
66
|
}
|
|
83
|
-
//
|
|
84
|
-
async
|
|
67
|
+
// Unified scan file or directory
|
|
68
|
+
async scan(targetPath, rules) {
|
|
85
69
|
const files = await this.findFiles(targetPath);
|
|
86
70
|
const issues = [];
|
|
87
71
|
let filesScanned = 0;
|
|
88
|
-
let
|
|
72
|
+
let _filesSkipped = 0;
|
|
89
73
|
for (const filePath of files) {
|
|
90
74
|
try {
|
|
91
75
|
const fileContent = await this.readFile(filePath);
|
|
92
76
|
if (fileContent) {
|
|
93
77
|
filesScanned++;
|
|
94
78
|
for (const rule of rules) {
|
|
95
|
-
|
|
96
|
-
issues.push(...ruleIssues);
|
|
79
|
+
issues.push(...rule.check(fileContent));
|
|
97
80
|
}
|
|
98
81
|
}
|
|
99
82
|
else {
|
|
100
|
-
|
|
83
|
+
_filesSkipped++;
|
|
101
84
|
}
|
|
102
85
|
}
|
|
103
|
-
catch (
|
|
104
|
-
|
|
105
|
-
filesSkipped++;
|
|
86
|
+
catch (_error) {
|
|
87
|
+
_filesSkipped++;
|
|
106
88
|
}
|
|
107
89
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
90
|
+
// intentionally reference _filesSkipped to avoid unused variable lint warnings
|
|
91
|
+
void _filesSkipped;
|
|
111
92
|
return this.createScanResult(issues, filesScanned);
|
|
112
93
|
}
|
|
113
|
-
// Scans a file for security issues
|
|
114
|
-
async scanFile(filePath, rules) {
|
|
115
|
-
const issues = [];
|
|
116
|
-
let filesScanned = 0;
|
|
117
|
-
try {
|
|
118
|
-
const fileContent = await this.readFile(filePath);
|
|
119
|
-
if (fileContent) {
|
|
120
|
-
filesScanned = 1;
|
|
121
|
-
for (const rule of rules) {
|
|
122
|
-
const ruleIssues = rule.check(fileContent);
|
|
123
|
-
issues.push(...ruleIssues);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
console.log(`📋 Skipped file: ${filePath} (binary, too large, or unreadable)`);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
catch (error) {
|
|
131
|
-
throw new Error(`Could not scan file ${filePath}: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
132
|
-
}
|
|
133
|
-
return this.createScanResult(issues, filesScanned);
|
|
134
|
-
}
|
|
135
|
-
// Finds the files to scan
|
|
136
94
|
async findFiles(targetPath) {
|
|
137
95
|
const stats = await fs.promises.stat(targetPath);
|
|
138
|
-
if (stats.isFile())
|
|
96
|
+
if (stats.isFile())
|
|
139
97
|
return [targetPath];
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
throw new Error(`Target path is neither a file nor a directory: ${targetPath}`);
|
|
143
|
-
}
|
|
98
|
+
if (!stats.isDirectory())
|
|
99
|
+
throw new Error(`Not file/dir: ${targetPath}`);
|
|
144
100
|
const pattern = path.join(targetPath, '**/*');
|
|
145
|
-
|
|
101
|
+
return glob_1.glob.sync(pattern, {
|
|
146
102
|
ignore: this.excludePatterns,
|
|
147
103
|
nodir: true,
|
|
148
104
|
absolute: true
|
|
149
|
-
});
|
|
150
|
-
return allFiles.filter((file) => this.isSupportedFile(file));
|
|
105
|
+
}).filter(file => this.isSupportedFile(file));
|
|
151
106
|
}
|
|
152
|
-
// Checks if the file is supported
|
|
153
107
|
isSupportedFile(filePath) {
|
|
154
108
|
const ext = path.extname(filePath).toLowerCase();
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
158
|
-
return this.supportedExtensions.includes(ext);
|
|
109
|
+
return this.supportedExtensions.includes(ext) &&
|
|
110
|
+
!this.binaryExtensions.includes(ext);
|
|
159
111
|
}
|
|
160
|
-
// Reads the file content
|
|
161
112
|
async readFile(filePath) {
|
|
162
113
|
try {
|
|
163
114
|
const stats = await fs.promises.stat(filePath);
|
|
164
|
-
if (stats.size > this.maxFileSize) {
|
|
165
|
-
console.warn(`Skipping large file: ${filePath} (${Math.round(stats.size / 1024 / 1024)}MB > 5MB limit)`);
|
|
166
|
-
return null;
|
|
167
|
-
}
|
|
168
|
-
if (await this.isBinaryFile(filePath)) {
|
|
115
|
+
if (stats.size > this.maxFileSize || await this.isBinaryFile(filePath)) {
|
|
169
116
|
return null;
|
|
170
117
|
}
|
|
171
118
|
const content = await fs.promises.readFile(filePath, 'utf-8');
|
|
172
|
-
const lines = content.split('\n');
|
|
173
119
|
return {
|
|
174
120
|
path: filePath,
|
|
175
121
|
content,
|
|
176
|
-
lines
|
|
122
|
+
lines: content.split('\n')
|
|
177
123
|
};
|
|
178
124
|
}
|
|
179
|
-
catch
|
|
180
|
-
|
|
181
|
-
return null;
|
|
182
|
-
}
|
|
183
|
-
if (error instanceof Error && error.message.includes('invalid')) {
|
|
184
|
-
return null;
|
|
185
|
-
}
|
|
186
|
-
throw error;
|
|
125
|
+
catch {
|
|
126
|
+
return null;
|
|
187
127
|
}
|
|
188
128
|
}
|
|
189
|
-
//
|
|
129
|
+
// Null bytes or non-printable = binary exact threshhold >30%
|
|
190
130
|
async isBinaryFile(filePath) {
|
|
191
131
|
try {
|
|
192
132
|
const fd = await fs.promises.open(filePath, 'r');
|
|
193
133
|
const buffer = Buffer.alloc(512);
|
|
194
134
|
const { bytesRead } = await fd.read(buffer, 0, 512, 0);
|
|
195
135
|
await fd.close();
|
|
196
|
-
if (bytesRead === 0)
|
|
136
|
+
if (bytesRead === 0)
|
|
197
137
|
return false;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
if (buffer[i] === 0) {
|
|
201
|
-
return true;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
138
|
+
// Typed array to guarantee numbers
|
|
139
|
+
const data = new Uint8Array(buffer.buffer, buffer.byteOffset, bytesRead);
|
|
204
140
|
let nonPrintable = 0;
|
|
205
|
-
for (
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
141
|
+
for (const byte of data) {
|
|
142
|
+
if (byte === 0)
|
|
143
|
+
return true;
|
|
144
|
+
if (byte < 32 && byte !== 9 && byte !== 10 && byte !== 13) {
|
|
145
|
+
nonPrintable++;
|
|
211
146
|
}
|
|
212
147
|
}
|
|
213
|
-
return
|
|
148
|
+
return nonPrintable / data.length > 0.3;
|
|
214
149
|
}
|
|
215
150
|
catch {
|
|
216
151
|
return false;
|
|
217
152
|
}
|
|
218
153
|
}
|
|
219
|
-
// Creates the scan result
|
|
220
154
|
createScanResult(issues, filesScanned) {
|
|
221
|
-
const summary = {
|
|
222
|
-
|
|
223
|
-
high: 0,
|
|
224
|
-
medium: 0,
|
|
225
|
-
low: 0
|
|
226
|
-
};
|
|
227
|
-
issues.forEach(issue => {
|
|
228
|
-
summary[issue.severity]++;
|
|
229
|
-
});
|
|
155
|
+
const summary = { critical: 0, high: 0, medium: 0, low: 0 };
|
|
156
|
+
issues.forEach(issue => summary[issue.severity]++);
|
|
230
157
|
return {
|
|
231
158
|
issues,
|
|
232
159
|
filesScanned,
|
package/dist/scanner.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanner.js","sourceRoot":"","sources":["../src/scanner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,+BAA4B;AAG5B,
|
|
1
|
+
{"version":3,"file":"scanner.js","sourceRoot":"","sources":["../src/scanner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,+BAA4B;AAG5B,MAAa,WAAW;IAAxB;QACE,8CAA8C;QAC7B,wBAAmB,GAAG;YACrC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS;YAC/C,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK;YAC3C,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK;YACxC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK;YAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;YACxC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO;SACpC,CAAC;QAEF,qCAAqC;QACpB,oBAAe,GAAG;YACjC,oBAAoB,EAAE,YAAY,EAAE,aAAa;YACjD,YAAY,EAAE,gBAAgB,EAAE,aAAa;YAC7C,gBAAgB,EAAE,cAAc,EAAE,mBAAmB;YACrD,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW;SACrD,CAAC;QAEF,0EAA0E;QACzD,gBAAW,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;QAE/C,8BAA8B;QACb,qBAAgB,GAAG;YAClC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM;YACvC,MAAM,EAAE,MAAM,EA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,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAEnD,OAAO;YACL,MAAM;YACN,YAAY;YACZ,WAAW,EAAE,MAAM,CAAC,MAAM;YAC1B,OAAO;SACR,CAAC;IACJ,CAAC;CACF;AAvID,kCAuIC"}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "2.1.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/types/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibe-guard",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "Vibe-Guard Security Scanner - 30 security rules for code, AI integrations, dependencies, and containers.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"bin": {
|
|
@@ -19,20 +19,17 @@
|
|
|
19
19
|
"prepublishOnly": "npm run clean && npm run build",
|
|
20
20
|
"package": "npm run clean && npm run build && npm run package:all",
|
|
21
21
|
"package:all": "npm run package:macos && npm run package:linux && npm run package:windows",
|
|
22
|
-
"package:macos": "npm run build && pkg dist/bin/vibe-guard.js --target
|
|
23
|
-
"package:linux": "npm run build && pkg dist/bin/vibe-guard.js --target
|
|
24
|
-
"package:windows": "npm run build && pkg dist/bin/vibe-guard.js --target
|
|
22
|
+
"package:macos": "npm run build && pkg dist/bin/vibe-guard.js --target node22-macos-x64 --output binaries/vibe-guard-macos-x64 && pkg dist/bin/vibe-guard.js --target node22-macos-arm64 --output binaries/vibe-guard-macos-arm64",
|
|
23
|
+
"package:linux": "npm run build && pkg dist/bin/vibe-guard.js --target node22-linux-x64 --output binaries/vibe-guard-linux-x64 && pkg dist/bin/vibe-guard.js --target node22-linux-arm64 --output binaries/vibe-guard-linux-arm64",
|
|
24
|
+
"package:windows": "npm run build && pkg dist/bin/vibe-guard.js --target node22-win-x64 --output binaries/vibe-guard-windows-x64.exe",
|
|
25
25
|
"dist": "npm run clean && npm run build && npm run package:all",
|
|
26
|
-
"maintenance:check": "node scripts/maintenance.js check",
|
|
27
|
-
"maintenance:update": "node scripts/maintenance.js update",
|
|
28
|
-
"maintenance:full": "node scripts/maintenance.js full",
|
|
29
26
|
"preversion": "npm test",
|
|
30
27
|
"version": "git add -A src",
|
|
31
28
|
"postversion": "git push && git push --tags",
|
|
32
|
-
"docs:dev": "vite
|
|
29
|
+
"docs:dev": "vite --port 3000",
|
|
33
30
|
"docs:build": "vite build",
|
|
34
31
|
"docs:preview": "vite preview --port 3000",
|
|
35
|
-
"
|
|
32
|
+
"lint": "eslint 'src/**/*.{ts,js}' --ext .ts,.js"
|
|
36
33
|
},
|
|
37
34
|
"keywords": [
|
|
38
35
|
"security",
|
|
@@ -87,28 +84,33 @@
|
|
|
87
84
|
"files": [
|
|
88
85
|
"dist/**/*",
|
|
89
86
|
"README.md",
|
|
90
|
-
"LICENSE"
|
|
91
|
-
"CHANGELOG.md"
|
|
87
|
+
"LICENSE"
|
|
92
88
|
],
|
|
93
89
|
"dependencies": {
|
|
94
90
|
"chalk": "^4.1.2",
|
|
95
91
|
"cli-table3": "^0.6.3",
|
|
96
92
|
"commander": "^14.0.0",
|
|
97
|
-
"glob": "^
|
|
93
|
+
"glob": "^13.0.0",
|
|
94
|
+
"memfs": "^4.51.1"
|
|
98
95
|
},
|
|
99
96
|
"devDependencies": {
|
|
100
|
-
"@types/glob": "^8.1.0",
|
|
101
97
|
"@types/jest": "^29.5.0",
|
|
102
98
|
"@types/node": "^20.0.0",
|
|
99
|
+
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
100
|
+
"@typescript-eslint/parser": "^8.56.1",
|
|
101
|
+
"@typescript-eslint/typescript-estree": "^8.56.1",
|
|
102
|
+
"@yao-pkg/pkg": "^6.25.0",
|
|
103
|
+
"eslint": "^8.45.0",
|
|
104
|
+
"eslint-config-prettier": "^9.1.0",
|
|
103
105
|
"jest": "^29.5.0",
|
|
104
|
-
"
|
|
106
|
+
"minimatch": "^10.1.1",
|
|
105
107
|
"ts-jest": "^29.1.0",
|
|
106
108
|
"ts-node": "^10.9.0",
|
|
107
|
-
"typescript": "^5.
|
|
108
|
-
"vite": "^
|
|
109
|
+
"typescript": "^5.3.3",
|
|
110
|
+
"vite": "^7.1.11"
|
|
109
111
|
},
|
|
110
112
|
"engines": {
|
|
111
|
-
"node": ">=
|
|
113
|
+
"node": ">=20.0.0"
|
|
112
114
|
},
|
|
113
115
|
"os": [
|
|
114
116
|
"darwin",
|