forked from shareAI-lab/Kode-Agent
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcheck-deps.js
More file actions
62 lines (57 loc) · 1.34 KB
/
check-deps.js
File metadata and controls
62 lines (57 loc) · 1.34 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
const pkg = require('./package.json');
const fs = require('fs');
const declared = new Set(Object.keys(pkg.dependencies || {}));
const used = [
'@anthropic-ai/bedrock-sdk',
'@anthropic-ai/sdk',
'@anthropic-ai/vertex-sdk',
'@commander-js/extra-typings',
'@inkjs/ui',
'@modelcontextprotocol/sdk',
'@statsig/js-client',
'@statsig/client-core',
'ansi-escapes',
'chalk',
'cli-highlight',
'cli-table3',
'debug',
'diff',
'env-paths',
'figures',
'glob',
'gray-matter',
'ink',
'ink-link',
'ink-text-input',
'lodash-es',
'lru-cache',
'marked',
'nanoid',
'node-fetch',
'node-html-parser',
'openai',
'react',
'semver',
'shell-quote',
'spawn-rx',
'turndown',
'undici',
'wrap-ansi',
'zod',
'zod-to-json-schema'
];
const builtins = new Set(['child_process','crypto','fs','fs/promises','http','os','path','process','tty','url','util','module','node:fs','node:os','node:path','node:url','node:util']);
const missing = [];
used.forEach(pkg => {
if (\!builtins.has(pkg) && \!declared.has(pkg)) {
missing.push(pkg);
}
});
console.log('=== MISSING DEPENDENCIES ===');
if (missing.length === 0) {
console.log('No missing dependencies found');
} else {
missing.forEach(pkg => console.log(pkg));
}
console.log('=== DECLARED DEPENDENCIES ===');
Array.from(declared).sort().forEach(pkg => console.log(pkg));