@driftless-sh/cli 0.1.2 → 0.1.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAKA,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAKA,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CA4FjD"}
|
package/dist/commands/init.js
CHANGED
|
@@ -8,66 +8,74 @@ const node_path_1 = require("node:path");
|
|
|
8
8
|
async function initCommand() {
|
|
9
9
|
console.log('Driftless — context integrity for engineering teams\n');
|
|
10
10
|
if (!(0, git_1.isGitRepo)()) {
|
|
11
|
-
console.error('Error: not a git repository.
|
|
11
|
+
console.error('Error: not a git repository.');
|
|
12
12
|
process.exit(1);
|
|
13
13
|
}
|
|
14
14
|
const remote = (0, git_1.getGitRemote)();
|
|
15
15
|
if (!remote) {
|
|
16
|
-
console.error('Error: no git remote found.
|
|
16
|
+
console.error('Error: no git remote found.');
|
|
17
17
|
process.exit(1);
|
|
18
18
|
}
|
|
19
19
|
console.log(`Repository: ${remote.org}/${remote.repo}`);
|
|
20
|
-
// 1.
|
|
20
|
+
// 1. Get workspace from API key (not from git remote!)
|
|
21
|
+
console.log('\nConnecting to Driftless Cloud...');
|
|
21
22
|
let workspace;
|
|
22
23
|
try {
|
|
23
|
-
workspace = await api_client_1.api.get(
|
|
24
|
-
|
|
24
|
+
workspace = await api_client_1.api.get('/me');
|
|
25
|
+
if (!workspace?.workspace_id) {
|
|
26
|
+
console.error('Could not resolve workspace. Check your API key.');
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
console.log(` Workspace: ${workspace.slug} ✓`);
|
|
25
30
|
}
|
|
26
|
-
catch {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
slug: remote.org,
|
|
30
|
-
});
|
|
31
|
-
console.log(`Workspace: ${remote.org} (created)`);
|
|
31
|
+
catch (err) {
|
|
32
|
+
console.error(` Failed: ${err?.message || 'unreachable'}`);
|
|
33
|
+
process.exit(1);
|
|
32
34
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
try {
|
|
36
|
-
const repos = (await api_client_1.api.get(`/workspaces/${remote.org}/repos`));
|
|
37
|
-
repo = repos.find((r) => r.github_org === remote.org && r.github_repo === remote.repo);
|
|
38
|
-
if (repo)
|
|
39
|
-
console.log(`Repo: ${remote.repo} (existing)`);
|
|
40
|
-
}
|
|
41
|
-
catch { /* ignore */ }
|
|
42
|
-
if (!repo) {
|
|
43
|
-
repo = await api_client_1.api.post(`/workspaces/${remote.org}/repos`, {
|
|
44
|
-
github_org: remote.org,
|
|
45
|
-
github_repo: remote.repo,
|
|
46
|
-
});
|
|
47
|
-
console.log(`Repo: ${remote.repo} (connected)`);
|
|
48
|
-
}
|
|
49
|
-
// 3. Local scan — no cloning, no server-side access
|
|
35
|
+
const workspaceSlug = workspace.slug;
|
|
36
|
+
// 2. Local scan
|
|
50
37
|
console.log('\nScanning codebase locally...');
|
|
51
38
|
const cwd = process.cwd();
|
|
52
39
|
const summary = scanLocal(cwd);
|
|
53
|
-
console.log(
|
|
54
|
-
console.log(`
|
|
55
|
-
console.log(` Type: ${summary.system_type}`);
|
|
56
|
-
console.log(` Endpoints: ${summary.endpoints}`);
|
|
57
|
-
console.log(` Services: ${summary.services}`);
|
|
58
|
-
console.log(` Modules: ${summary.modules}`);
|
|
59
|
-
console.log(` Guards: ${summary.guards}`);
|
|
40
|
+
console.log(` Framework: ${summary.framework} | Endpoints: ${summary.endpoints} | Services: ${summary.services}`);
|
|
41
|
+
console.log(` Modules: ${summary.modules} | Guards: ${summary.guards}`);
|
|
60
42
|
if (summary.auth_patterns.length > 0) {
|
|
61
|
-
console.log(` Auth:
|
|
43
|
+
console.log(` Auth: ${summary.auth_patterns.join(', ')}`);
|
|
62
44
|
}
|
|
63
|
-
//
|
|
45
|
+
// 3. Connect repo
|
|
46
|
+
let repo;
|
|
64
47
|
try {
|
|
65
|
-
await api_client_1.api.
|
|
48
|
+
const repos = (await api_client_1.api.get(`/workspaces/${workspaceSlug}/repos`));
|
|
49
|
+
repo = Array.isArray(repos)
|
|
50
|
+
? repos.find((r) => r.github_org === remote.org && r.github_repo === remote.repo)
|
|
51
|
+
: null;
|
|
66
52
|
}
|
|
67
|
-
catch {
|
|
68
|
-
|
|
53
|
+
catch { /* will create */ }
|
|
54
|
+
if (repo) {
|
|
55
|
+
console.log(`\n Repo: ${remote.repo} ✓`);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
try {
|
|
59
|
+
repo = await api_client_1.api.post(`/workspaces/${workspaceSlug}/repos`, {
|
|
60
|
+
github_org: remote.org,
|
|
61
|
+
github_repo: remote.repo,
|
|
62
|
+
});
|
|
63
|
+
console.log(` Repo: ${remote.repo} (connected)`);
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
console.error(` Failed to connect repo: ${err?.message || 'unknown'}`);
|
|
67
|
+
process.exit(1);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// 4. Upload baseline
|
|
71
|
+
try {
|
|
72
|
+
await api_client_1.api.post(`/workspaces/${workspaceSlug}/repos/${repo.id}/baseline`, summary);
|
|
73
|
+
console.log(' Baseline uploaded ✓');
|
|
69
74
|
}
|
|
70
|
-
|
|
75
|
+
catch (err) {
|
|
76
|
+
console.error(` Upload failed: ${err?.message || 'unknown'}`);
|
|
77
|
+
}
|
|
78
|
+
// 5. Rules
|
|
71
79
|
console.log('\nSuggested rules:');
|
|
72
80
|
const suggestions = [];
|
|
73
81
|
if (summary.auth_patterns.includes('apikey') || summary.guards > 0) {
|
|
@@ -77,23 +85,17 @@ async function initCommand() {
|
|
|
77
85
|
suggestions.push('Services must not import controllers directly');
|
|
78
86
|
}
|
|
79
87
|
if (summary.endpoints > 50) {
|
|
80
|
-
suggestions.push('
|
|
81
|
-
}
|
|
82
|
-
if (suggestions.length === 0) {
|
|
83
|
-
console.log(' No automatic suggestions for this repo.');
|
|
88
|
+
suggestions.push('Split large controllers — over 50 endpoints detected');
|
|
84
89
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
console.log(`\nDone! Run 'driftless scan --diff' before pushing to check for violations.`);
|
|
91
|
-
console.log(`View your ecosystem: https://driftless.icu/ecosystem`);
|
|
90
|
+
if (suggestions.length === 0)
|
|
91
|
+
console.log(' No suggestions.');
|
|
92
|
+
else
|
|
93
|
+
suggestions.forEach((s) => console.log(` • ${s}`));
|
|
94
|
+
console.log(`\nView: https://driftless.icu/ecosystem`);
|
|
92
95
|
}
|
|
93
96
|
function scanLocal(rootPath) {
|
|
94
97
|
const pkg = readJson((0, node_path_1.join)(rootPath, 'package.json'));
|
|
95
98
|
const deps = { ...pkg?.dependencies, ...pkg?.devDependencies };
|
|
96
|
-
// Framework detection
|
|
97
99
|
let framework = 'other';
|
|
98
100
|
if (deps?.['@nestjs/core'] || deps?.['@nestjs/common'])
|
|
99
101
|
framework = 'nestjs';
|
|
@@ -101,27 +103,15 @@ function scanLocal(rootPath) {
|
|
|
101
103
|
framework = 'nextjs';
|
|
102
104
|
else if (deps?.['express'])
|
|
103
105
|
framework = 'express';
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (framework === 'nestjs')
|
|
107
|
-
systemType = 'api';
|
|
108
|
-
else if (framework === 'nextjs')
|
|
109
|
-
systemType = 'app';
|
|
110
|
-
else if ((0, node_fs_1.existsSync)((0, node_path_1.join)(rootPath, 'pages')) || (0, node_fs_1.existsSync)((0, node_path_1.join)(rootPath, 'app')))
|
|
106
|
+
let systemType = framework === 'nestjs' ? 'api' : 'unknown';
|
|
107
|
+
if (framework === 'nextjs' && (0, node_fs_1.existsSync)((0, node_path_1.join)(rootPath, 'pages')))
|
|
111
108
|
systemType = 'app';
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const allFiles = listFiles(srcDir);
|
|
115
|
-
// Basic counts from source analysis
|
|
116
|
-
let endpoints = 0;
|
|
117
|
-
let services = 0;
|
|
118
|
-
let modules = 0;
|
|
119
|
-
let guards = 0;
|
|
109
|
+
const allFiles = listFiles((0, node_path_1.join)(rootPath, 'src'));
|
|
110
|
+
let endpoints = 0, services = 0, modules = 0, guards = 0;
|
|
120
111
|
for (const file of allFiles) {
|
|
121
112
|
try {
|
|
122
113
|
const content = (0, node_fs_1.readFileSync)(file, 'utf8');
|
|
123
114
|
if (content.includes('@Controller')) {
|
|
124
|
-
// Count HTTP decorators
|
|
125
115
|
const matches = content.match(/@(Get|Post|Put|Patch|Delete|All)\s*\(/g);
|
|
126
116
|
if (matches)
|
|
127
117
|
endpoints += matches.length;
|
|
@@ -133,41 +123,31 @@ function scanLocal(rootPath) {
|
|
|
133
123
|
if (content.match(/class\s+\w*Guard/) && content.includes('CanActivate'))
|
|
134
124
|
guards++;
|
|
135
125
|
}
|
|
136
|
-
catch { /* skip
|
|
126
|
+
catch { /* skip */ }
|
|
137
127
|
}
|
|
138
|
-
|
|
139
|
-
const authPatterns = [];
|
|
128
|
+
const authSet = new Set();
|
|
140
129
|
for (const file of allFiles.slice(0, 200)) {
|
|
141
130
|
try {
|
|
142
|
-
const
|
|
143
|
-
if (
|
|
144
|
-
|
|
145
|
-
if (
|
|
146
|
-
|
|
147
|
-
if (
|
|
148
|
-
|
|
149
|
-
if (
|
|
150
|
-
|
|
131
|
+
const c = (0, node_fs_1.readFileSync)(file, 'utf8');
|
|
132
|
+
if (c.includes('@clerk/') || c.includes('Clerk'))
|
|
133
|
+
authSet.add('clerk');
|
|
134
|
+
if (c.includes('Cognito') || c.includes('cognito'))
|
|
135
|
+
authSet.add('cognito');
|
|
136
|
+
if (c.includes('@UseGuards') || c.includes('AuthGuard'))
|
|
137
|
+
authSet.add('jwt');
|
|
138
|
+
if (c.includes('x-api-key') || c.includes('ApiKeyGuard') || c.includes('BusinessAccessGuard'))
|
|
139
|
+
authSet.add('apikey');
|
|
151
140
|
}
|
|
152
141
|
catch { /* skip */ }
|
|
153
142
|
}
|
|
154
|
-
return {
|
|
155
|
-
framework,
|
|
156
|
-
system_type: systemType,
|
|
157
|
-
endpoints,
|
|
158
|
-
services,
|
|
159
|
-
modules,
|
|
160
|
-
guards,
|
|
161
|
-
auth_patterns: [...new Set(authPatterns)],
|
|
162
|
-
};
|
|
143
|
+
return { framework, system_type: systemType, endpoints, services, modules, guards, auth_patterns: [...authSet] };
|
|
163
144
|
}
|
|
164
145
|
function listFiles(dir) {
|
|
165
146
|
const result = [];
|
|
166
147
|
if (!(0, node_fs_1.existsSync)(dir))
|
|
167
148
|
return result;
|
|
168
149
|
try {
|
|
169
|
-
const
|
|
170
|
-
for (const entry of entries) {
|
|
150
|
+
for (const entry of (0, node_fs_1.readdirSync)(dir, { withFileTypes: true })) {
|
|
171
151
|
if (entry.name.startsWith('.') || entry.name === 'node_modules' || entry.name === 'dist')
|
|
172
152
|
continue;
|
|
173
153
|
const full = (0, node_path_1.join)(dir, entry.name);
|
|
@@ -177,7 +157,7 @@ function listFiles(dir) {
|
|
|
177
157
|
result.push(full);
|
|
178
158
|
}
|
|
179
159
|
}
|
|
180
|
-
catch { /*
|
|
160
|
+
catch { /* skip */ }
|
|
181
161
|
return result;
|
|
182
162
|
}
|
|
183
163
|
function readJson(path) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;AAKA,
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;AAKA,kCA4FC;AAjGD,8CAAmC;AACnC,gCAAgD;AAChD,qCAA+D;AAC/D,yCAAgC;AAEzB,KAAK,UAAU,WAAW;IAC/B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