@nexus_js/cli 0.6.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/LICENSE +21 -0
- package/README.md +52 -0
- package/dist/add.d.ts +36 -0
- package/dist/add.d.ts.map +1 -0
- package/dist/add.js +342 -0
- package/dist/add.js.map +1 -0
- package/dist/analyzer.d.ts +70 -0
- package/dist/analyzer.d.ts.map +1 -0
- package/dist/analyzer.js +247 -0
- package/dist/analyzer.js.map +1 -0
- package/dist/audit.d.ts +35 -0
- package/dist/audit.d.ts.map +1 -0
- package/dist/audit.js +383 -0
- package/dist/audit.js.map +1 -0
- package/dist/bin.d.ts +6 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +367 -0
- package/dist/bin.js.map +1 -0
- package/dist/config.d.ts +41 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +2 -0
- package/dist/config.js.map +1 -0
- package/dist/create.d.ts +7 -0
- package/dist/create.d.ts.map +1 -0
- package/dist/create.js +256 -0
- package/dist/create.js.map +1 -0
- package/dist/fix.d.ts +22 -0
- package/dist/fix.d.ts.map +1 -0
- package/dist/fix.js +199 -0
- package/dist/fix.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/studio.d.ts +136 -0
- package/dist/studio.d.ts.map +1 -0
- package/dist/studio.js +721 -0
- package/dist/studio.js.map +1 -0
- package/package.json +63 -0
package/dist/bin.js
ADDED
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Nexus CLI — nexus dev | nexus build | nexus start | nexus check | nexus studio | nexus audit
|
|
4
|
+
*/
|
|
5
|
+
import { parseArgs } from 'node:util';
|
|
6
|
+
// ── ANSI palette (shared across all CLI commands) ─────────────────────────────
|
|
7
|
+
const c = {
|
|
8
|
+
reset: '\x1b[0m', bold: '\x1b[1m', dim: '\x1b[2m',
|
|
9
|
+
red: '\x1b[31m', green: '\x1b[32m', yellow: '\x1b[33m',
|
|
10
|
+
mag: '\x1b[35m', cyan: '\x1b[36m', gray: '\x1b[90m',
|
|
11
|
+
};
|
|
12
|
+
function getTime() {
|
|
13
|
+
return new Date().toLocaleTimeString('en', { hour12: false });
|
|
14
|
+
}
|
|
15
|
+
const HELP = `
|
|
16
|
+
${c.mag}${c.bold}◆ Nexus${c.reset} — The Definitive Full-Stack Framework
|
|
17
|
+
|
|
18
|
+
${c.bold}Usage:${c.reset}
|
|
19
|
+
nexus <command> [options]
|
|
20
|
+
|
|
21
|
+
${c.bold}Commands:${c.reset}
|
|
22
|
+
dev Start the development server with HMR + Guard + AI Prefetch
|
|
23
|
+
build Build for production (runs Nexus Guard on all files)
|
|
24
|
+
start Start the production server
|
|
25
|
+
add Install a Nexus Block from the marketplace
|
|
26
|
+
studio Open the Nexus Studio dev dashboard
|
|
27
|
+
check Type-check and lint your Nexus app
|
|
28
|
+
audit Security audit (CVEs, supply chain, CSRF, XSS, secrets, headers)
|
|
29
|
+
fix Auto-update vulnerable dependencies to patched versions
|
|
30
|
+
routes Print the route manifest
|
|
31
|
+
|
|
32
|
+
${c.bold}Options:${c.reset}
|
|
33
|
+
--port, -p Port number (default: 3000)
|
|
34
|
+
--host Host to bind (default: localhost)
|
|
35
|
+
--root App root directory (default: .)
|
|
36
|
+
--dry-run Show what fix would do without applying changes
|
|
37
|
+
--force Fix medium/low CVEs in addition to critical/high
|
|
38
|
+
--ci Exit code 1 on critical/high findings (for CI)
|
|
39
|
+
--json Output audit as JSON
|
|
40
|
+
--help, -h Show this help
|
|
41
|
+
--version, -v Show version
|
|
42
|
+
|
|
43
|
+
${c.bold}Examples:${c.reset}
|
|
44
|
+
nexus dev
|
|
45
|
+
nexus dev --port 4000
|
|
46
|
+
nexus add auth
|
|
47
|
+
nexus build
|
|
48
|
+
nexus audit
|
|
49
|
+
nexus audit --ci --json (CI pipeline: JSON output, fails on critical)
|
|
50
|
+
nexus fix (auto-update vulnerable packages)
|
|
51
|
+
nexus fix --dry-run (preview fixes without applying)
|
|
52
|
+
`;
|
|
53
|
+
async function main() {
|
|
54
|
+
const { values, positionals } = parseArgs({
|
|
55
|
+
args: process.argv.slice(2),
|
|
56
|
+
options: {
|
|
57
|
+
port: { type: 'string', short: 'p' },
|
|
58
|
+
host: { type: 'string' },
|
|
59
|
+
root: { type: 'string' },
|
|
60
|
+
help: { type: 'boolean', short: 'h' },
|
|
61
|
+
version: { type: 'boolean', short: 'v' },
|
|
62
|
+
ci: { type: 'boolean' },
|
|
63
|
+
json: { type: 'boolean' },
|
|
64
|
+
fix: { type: 'boolean' },
|
|
65
|
+
'dry-run': { type: 'boolean' },
|
|
66
|
+
force: { type: 'boolean' },
|
|
67
|
+
},
|
|
68
|
+
allowPositionals: true,
|
|
69
|
+
strict: false,
|
|
70
|
+
});
|
|
71
|
+
if (values.help) {
|
|
72
|
+
console.log(HELP);
|
|
73
|
+
process.exit(0);
|
|
74
|
+
}
|
|
75
|
+
if (values.version) {
|
|
76
|
+
const { createRequire } = await import('node:module');
|
|
77
|
+
const req = createRequire(import.meta.url);
|
|
78
|
+
const pkg = req('../package.json');
|
|
79
|
+
console.log(`nexus v${pkg.version}`);
|
|
80
|
+
process.exit(0);
|
|
81
|
+
}
|
|
82
|
+
const command = positionals[0];
|
|
83
|
+
const portVal = values['port'];
|
|
84
|
+
const rootVal = values['root'];
|
|
85
|
+
const port = typeof portVal === 'string' ? parseInt(portVal, 10) : 3000;
|
|
86
|
+
const root = typeof rootVal === 'string' ? rootVal : process.cwd();
|
|
87
|
+
switch (command) {
|
|
88
|
+
case 'dev':
|
|
89
|
+
await runDev({ root, port });
|
|
90
|
+
break;
|
|
91
|
+
case 'build':
|
|
92
|
+
await runBuild({ root });
|
|
93
|
+
break;
|
|
94
|
+
case 'start':
|
|
95
|
+
await runStart({ root, port });
|
|
96
|
+
break;
|
|
97
|
+
case 'add': {
|
|
98
|
+
const { runAdd } = await import('./add.js');
|
|
99
|
+
const bid = positionals[1];
|
|
100
|
+
await runAdd({ ...(bid !== undefined ? { blockId: bid } : {}), root });
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
case 'studio':
|
|
104
|
+
await runStudio({ port });
|
|
105
|
+
break;
|
|
106
|
+
case 'routes':
|
|
107
|
+
await printRoutes({ root });
|
|
108
|
+
break;
|
|
109
|
+
case 'check':
|
|
110
|
+
await runCheck({ root });
|
|
111
|
+
break;
|
|
112
|
+
case 'audit': {
|
|
113
|
+
const { runAudit } = await import('./audit.js');
|
|
114
|
+
await runAudit({
|
|
115
|
+
root,
|
|
116
|
+
ci: values['ci'] === true,
|
|
117
|
+
json: values['json'] === true,
|
|
118
|
+
fix: values['fix'] === true,
|
|
119
|
+
});
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
case 'fix': {
|
|
123
|
+
const { runFix } = await import('./fix.js');
|
|
124
|
+
await runFix({
|
|
125
|
+
root,
|
|
126
|
+
dryRun: values['dry-run'] === true,
|
|
127
|
+
force: values['force'] === true,
|
|
128
|
+
});
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
default:
|
|
132
|
+
if (!command) {
|
|
133
|
+
console.log(HELP);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
console.error(`\x1b[31mUnknown command: ${command}\x1b[0m`);
|
|
137
|
+
console.log(HELP);
|
|
138
|
+
process.exit(1);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
async function runDev(opts) {
|
|
143
|
+
const _start = Date.now();
|
|
144
|
+
const { createRequire } = await import('node:module');
|
|
145
|
+
const req = createRequire(import.meta.url);
|
|
146
|
+
const pkg = req('../package.json');
|
|
147
|
+
const { createNexusServer } = await import('@nexus_js/server');
|
|
148
|
+
const server = await createNexusServer({
|
|
149
|
+
root: opts.root,
|
|
150
|
+
port: opts.port,
|
|
151
|
+
dev: true,
|
|
152
|
+
onRequest(info) {
|
|
153
|
+
const mCol = info.method === 'GET' ? c.cyan : c.mag;
|
|
154
|
+
const sCol = info.status >= 500 ? c.red : info.status >= 400 ? c.yellow : c.green;
|
|
155
|
+
let tag = '';
|
|
156
|
+
if (info.isAction) {
|
|
157
|
+
tag = ` ${c.mag}⚡ action${c.reset}`;
|
|
158
|
+
}
|
|
159
|
+
else if (info.cacheStrategy === 'swr' || info.cacheStrategy === 'static-immutable') {
|
|
160
|
+
tag = ` ${c.green}⚡ cached${c.reset}`;
|
|
161
|
+
}
|
|
162
|
+
else if (info.cacheStrategy === 'dynamic-no-store' || info.cacheStrategy === 'streaming-no-store') {
|
|
163
|
+
tag = ` ${c.yellow}🌐 dynamic${c.reset}`;
|
|
164
|
+
}
|
|
165
|
+
else if (info.cacheStrategy === 'private-no-store') {
|
|
166
|
+
tag = ` ${c.gray}🔒 private${c.reset}`;
|
|
167
|
+
}
|
|
168
|
+
process.stdout.write(` ${c.gray}${getTime()}${c.reset}` +
|
|
169
|
+
` ${mCol}${info.method.padEnd(4)}${c.reset}` +
|
|
170
|
+
` ${info.path.padEnd(36)}` +
|
|
171
|
+
` ${sCol}${info.status}${c.reset}` +
|
|
172
|
+
` ${c.dim}${info.duration}ms${c.reset}` +
|
|
173
|
+
tag + '\n');
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
// Wait for the server to be bound before printing the banner
|
|
177
|
+
await server.listen();
|
|
178
|
+
if (process.stdout.isTTY)
|
|
179
|
+
console.clear();
|
|
180
|
+
const elapsed = Date.now() - _start;
|
|
181
|
+
console.log(`\n ${c.mag}${c.bold}◆ NEXUS${c.reset} ${c.dim}v${pkg.version}${c.reset}` +
|
|
182
|
+
` ${c.green}ready in ${elapsed}ms${c.reset}\n` +
|
|
183
|
+
`\n ${c.green}➜${c.reset} ${c.bold}Local${c.reset} ${c.cyan}http://localhost:${opts.port}/${c.reset}` +
|
|
184
|
+
`\n ${c.green}➜${c.reset} ${c.bold}Studio${c.reset} ${c.cyan}http://localhost:7822/${c.reset}` +
|
|
185
|
+
` ${c.dim}nexus studio${c.reset}` +
|
|
186
|
+
`\n\n ${c.dim}press Ctrl+C to stop${c.reset}\n`);
|
|
187
|
+
// Background dependency audit — runs after dev server is ready, non-blocking
|
|
188
|
+
// Shows warnings for critical/high CVEs but never kills the dev server
|
|
189
|
+
void (async () => {
|
|
190
|
+
try {
|
|
191
|
+
// Dynamic import — @nexus_js/audit is optional (gracefully skipped if not installed)
|
|
192
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
193
|
+
const audit = await import('@nexus_js/audit');
|
|
194
|
+
const { readFile: rf } = await import('node:fs/promises');
|
|
195
|
+
const { join: pj } = await import('node:path');
|
|
196
|
+
const pkgJson = JSON.parse(await rf(pj(opts.root, 'package.json'), 'utf-8'));
|
|
197
|
+
const deps = { ...pkgJson.dependencies };
|
|
198
|
+
// CVE check (silent unless findings)
|
|
199
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
200
|
+
const results = await audit.auditDependencies(deps);
|
|
201
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
202
|
+
const vulnerable = audit.filterVulnerable(results).filter(
|
|
203
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
204
|
+
(r) => r.vulns[0]?.severity === 'critical' || r.vulns[0]?.severity === 'high');
|
|
205
|
+
if (vulnerable.length > 0) {
|
|
206
|
+
console.log(`\n ${c.yellow}⚠${c.reset} ${c.bold}Nexus Security${c.reset} — ` +
|
|
207
|
+
`${c.red}${vulnerable.length} vulnerable dep${vulnerable.length > 1 ? 's' : ''}${c.reset} detected\n` +
|
|
208
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
209
|
+
vulnerable.map((r) => {
|
|
210
|
+
const v = r.vulns[0];
|
|
211
|
+
return ` ${c.red}${r.package}${c.reset} ${v?.id} ${String(v?.severity ?? '').toUpperCase()}` +
|
|
212
|
+
(v?.fixedIn ? ` ${c.green}→ fix: v${v.fixedIn}${c.reset}` : '');
|
|
213
|
+
}).join('\n') +
|
|
214
|
+
`\n\n Run ${c.cyan}nexus fix${c.reset} to auto-update · ${c.cyan}nexus audit${c.reset} for full details\n`);
|
|
215
|
+
}
|
|
216
|
+
// Supply chain check (high/critical risk only)
|
|
217
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
218
|
+
const scResults = await audit.auditSupplyChain(deps);
|
|
219
|
+
for (const [pkg, sc] of scResults) {
|
|
220
|
+
if (sc.riskLevel === 'critical' || sc.riskLevel === 'high') {
|
|
221
|
+
const topFlag = sc.flags[0];
|
|
222
|
+
console.log(` ${c.yellow}⚠${c.reset} ${c.bold}Supply Chain${c.reset} ${c.yellow}${pkg}${c.reset}` +
|
|
223
|
+
(topFlag ? ` — ${topFlag.title}` : '') + ` (risk: ${sc.riskScore}/100)`);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
catch {
|
|
228
|
+
// Audit failure (offline, @nexus_js/audit not installed) is silently ignored in dev mode
|
|
229
|
+
}
|
|
230
|
+
})();
|
|
231
|
+
// File watcher — triggers route reload on .nx / .ts changes
|
|
232
|
+
const { watch } = await import('node:fs');
|
|
233
|
+
const { join } = await import('node:path');
|
|
234
|
+
const srcDir = join(opts.root, 'src');
|
|
235
|
+
let debounce = null;
|
|
236
|
+
watch(srcDir, { recursive: true }, (event, filename) => {
|
|
237
|
+
if (!filename)
|
|
238
|
+
return;
|
|
239
|
+
if (debounce)
|
|
240
|
+
clearTimeout(debounce);
|
|
241
|
+
debounce = setTimeout(async () => {
|
|
242
|
+
console.log(` ${c.gray}${getTime()}${c.reset}` +
|
|
243
|
+
` ${c.mag}[HMR]${c.reset}` +
|
|
244
|
+
` ${c.cyan}${filename}${c.reset}` +
|
|
245
|
+
` ${c.dim}${event} — reloading routes${c.reset}`);
|
|
246
|
+
await server.reload();
|
|
247
|
+
}, 100);
|
|
248
|
+
});
|
|
249
|
+
// Graceful shutdown
|
|
250
|
+
process.on('SIGINT', () => {
|
|
251
|
+
console.log(`\n ${c.dim}◆ Nexus stopped${c.reset}\n`);
|
|
252
|
+
server.close();
|
|
253
|
+
process.exit(0);
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
async function runBuild(opts) {
|
|
257
|
+
const _start = Date.now();
|
|
258
|
+
console.log(`\n ${c.mag}${c.bold}◆ NEXUS${c.reset} ${c.dim}building for production...${c.reset}\n`);
|
|
259
|
+
const { compile } = await import('@nexus_js/compiler');
|
|
260
|
+
const { buildRouteManifest } = await import('@nexus_js/router');
|
|
261
|
+
const { existsSync } = await import('node:fs');
|
|
262
|
+
const { readFile, writeFile, mkdir } = await import('node:fs/promises');
|
|
263
|
+
const { join } = await import('node:path');
|
|
264
|
+
const { pathToFileURL } = await import('node:url');
|
|
265
|
+
const routesDir = join(opts.root, 'src', 'routes');
|
|
266
|
+
const outDir = join(opts.root, '.nexus', 'output');
|
|
267
|
+
await mkdir(outDir, { recursive: true });
|
|
268
|
+
const manifest = await buildRouteManifest(routesDir);
|
|
269
|
+
let compiled = 0;
|
|
270
|
+
for (const route of manifest.routes) {
|
|
271
|
+
const source = await readFile(route.filepath, 'utf-8');
|
|
272
|
+
const result = compile(source, route.filepath, {
|
|
273
|
+
mode: 'server',
|
|
274
|
+
dev: false,
|
|
275
|
+
emitIslandManifest: true,
|
|
276
|
+
appRoot: opts.root,
|
|
277
|
+
});
|
|
278
|
+
const outSeg = route.pattern === '/' ? 'index' : route.pattern.replace(/^\//, '');
|
|
279
|
+
const outPath = join(outDir, outSeg) + '.js';
|
|
280
|
+
await mkdir(join(outPath, '..'), { recursive: true });
|
|
281
|
+
await writeFile(outPath, result.serverCode, 'utf-8');
|
|
282
|
+
if (result.clientCode) {
|
|
283
|
+
await writeFile(outPath.replace('.js', '.client.js'), result.clientCode, 'utf-8');
|
|
284
|
+
}
|
|
285
|
+
if (result.actionsModule) {
|
|
286
|
+
const actionsPath = outPath.replace(/\.js$/u, '.actions.js');
|
|
287
|
+
let code = result.actionsModule;
|
|
288
|
+
const preambleLines = [];
|
|
289
|
+
const store = join(opts.root, 'src/lib/chat-room.js');
|
|
290
|
+
if (code.includes('appendMessage') && existsSync(store)) {
|
|
291
|
+
preambleLines.push(`import { appendMessage } from ${JSON.stringify(pathToFileURL(store).href)};`);
|
|
292
|
+
}
|
|
293
|
+
const flowVal = join(opts.root, 'src/lib/validate-flow.js');
|
|
294
|
+
if (code.includes('validateFlowPayload') && existsSync(flowVal)) {
|
|
295
|
+
preambleLines.push(`import { validateFlowPayload } from ${JSON.stringify(pathToFileURL(flowVal).href)};`);
|
|
296
|
+
}
|
|
297
|
+
if (preambleLines.length > 0) {
|
|
298
|
+
code = `${preambleLines.join('\n')}\n${code}`;
|
|
299
|
+
}
|
|
300
|
+
await writeFile(actionsPath, code, 'utf-8');
|
|
301
|
+
}
|
|
302
|
+
compiled++;
|
|
303
|
+
}
|
|
304
|
+
// Write route manifest
|
|
305
|
+
await writeFile(join(outDir, 'manifest.json'), JSON.stringify(manifest, null, 2), 'utf-8');
|
|
306
|
+
const elapsed = Date.now() - _start;
|
|
307
|
+
console.log(` ${c.green}✔${c.reset} Compiled ${c.bold}${compiled} routes${c.reset} ${c.dim}(${elapsed}ms)${c.reset}`);
|
|
308
|
+
console.log(` ${c.green}✔${c.reset} Output → ${c.cyan}.nexus/output/${c.reset}\n`);
|
|
309
|
+
console.log(` Run ${c.bold}nexus start${c.reset} to serve the production build.\n`);
|
|
310
|
+
}
|
|
311
|
+
async function runStart(opts) {
|
|
312
|
+
const _start = Date.now();
|
|
313
|
+
const { createNexusServer } = await import('@nexus_js/server');
|
|
314
|
+
const server = await createNexusServer({
|
|
315
|
+
root: opts.root,
|
|
316
|
+
port: opts.port,
|
|
317
|
+
dev: false,
|
|
318
|
+
});
|
|
319
|
+
await server.listen();
|
|
320
|
+
const elapsed = Date.now() - _start;
|
|
321
|
+
console.log(`\n ${c.mag}${c.bold}◆ NEXUS${c.reset} ${c.dim}production${c.reset}` +
|
|
322
|
+
` ${c.green}ready in ${elapsed}ms${c.reset}\n` +
|
|
323
|
+
`\n ${c.green}➜${c.reset} ${c.bold}Local${c.reset} ${c.cyan}http://localhost:${opts.port}/${c.reset}\n`);
|
|
324
|
+
process.on('SIGINT', () => {
|
|
325
|
+
console.log(`\n ${c.dim}◆ Nexus stopped${c.reset}\n`);
|
|
326
|
+
server.close();
|
|
327
|
+
process.exit(0);
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
async function printRoutes(opts) {
|
|
331
|
+
const { buildRouteManifest } = await import('@nexus_js/router');
|
|
332
|
+
const { join } = await import('node:path');
|
|
333
|
+
const manifest = await buildRouteManifest(join(opts.root, 'src', 'routes'));
|
|
334
|
+
console.log('\n \x1b[36m◆ Nexus Route Manifest\x1b[0m\n');
|
|
335
|
+
for (const route of manifest.routes) {
|
|
336
|
+
const kind = route.isLayout ? '\x1b[33mlayout\x1b[0m' : '\x1b[32mpage \x1b[0m';
|
|
337
|
+
const dynamic = route.isDynamic ? '\x1b[35m[dynamic]\x1b[0m' : '';
|
|
338
|
+
console.log(` ${kind} ${route.pattern} ${dynamic}`);
|
|
339
|
+
}
|
|
340
|
+
console.log('');
|
|
341
|
+
}
|
|
342
|
+
async function runStudio(opts) {
|
|
343
|
+
const { startStudio } = await import('./studio.js');
|
|
344
|
+
const studio = await startStudio(opts.port);
|
|
345
|
+
const { exec } = await import('node:child_process');
|
|
346
|
+
exec(`open http://localhost:${studio.port}`);
|
|
347
|
+
process.on('SIGINT', () => { studio.close(); process.exit(0); });
|
|
348
|
+
// Keep alive — the Studio WebSocket server drives everything
|
|
349
|
+
await new Promise(() => { });
|
|
350
|
+
}
|
|
351
|
+
async function runCheck(opts) {
|
|
352
|
+
console.log(`\n ${c.mag}${c.bold}◆ NEXUS check${c.reset} ${c.dim}type-checking your app...${c.reset}\n`);
|
|
353
|
+
const { execSync } = await import('node:child_process');
|
|
354
|
+
try {
|
|
355
|
+
execSync('tsc --noEmit', { cwd: opts.root, stdio: 'inherit' });
|
|
356
|
+
console.log(`\n ${c.green}✔${c.reset} No type errors found.\n`);
|
|
357
|
+
}
|
|
358
|
+
catch {
|
|
359
|
+
console.error(`\n ${c.red}✖${c.reset} Type errors found.\n`);
|
|
360
|
+
process.exit(1);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
main().catch((err) => {
|
|
364
|
+
console.error('\x1b[31m[Nexus CLI Error]\x1b[0m', err);
|
|
365
|
+
process.exit(1);
|
|
366
|
+
});
|
|
367
|
+
//# sourceMappingURL=bin.js.map
|
package/dist/bin.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,iFAAiF;AACjF,MAAM,CAAC,GAAG;IACR,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAG,GAAG,EAAG,SAAS;IACnD,GAAG,EAAI,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU;IACxD,GAAG,EAAI,UAAU,EAAE,IAAI,EAAG,UAAU,EAAE,IAAI,EAAI,UAAU;CACzD,CAAC;AAEF,SAAS,OAAO;IACd,OAAO,IAAI,IAAI,EAAE,CAAC,kBAAkB,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AAChE,CAAC;AAEC,MAAM,IAAI,GAAG;IACX,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,KAAK;;IAE/B,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,KAAK;;;IAGtB,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,KAAK;;;;;;;;;;;IAWzB,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,KAAK;;;;;;;;;;;IAWxB,CAAC,CAAC,IAAI,YAAY,CAAC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GAAG,4BAA4B,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;IAC3G,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAC;IACxD,IAAI,CAAC;QACH,QAAQ,CAAC,cAAc,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC/D,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,2BAA2B,CAAC,CAAC;IACpE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,KAAK,wBAAwB,CAAC,CAAC;QAC/D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,kCAAkC,EAAE,GAAG,CAAC,CAAC;IACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface NexusConfig {
|
|
2
|
+
/** Default island hydration strategy */
|
|
3
|
+
defaultHydration?: 'client:load' | 'client:idle' | 'client:visible';
|
|
4
|
+
/** Image optimization settings */
|
|
5
|
+
images?: {
|
|
6
|
+
formats?: ('avif' | 'webp' | 'png' | 'jpg')[];
|
|
7
|
+
sizes?: number[];
|
|
8
|
+
quality?: number;
|
|
9
|
+
};
|
|
10
|
+
/** Server configuration */
|
|
11
|
+
server?: {
|
|
12
|
+
port?: number;
|
|
13
|
+
host?: string;
|
|
14
|
+
/** Run on edge runtime (Cloudflare Workers / Deno Deploy compatible) */
|
|
15
|
+
edge?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/** Build configuration */
|
|
18
|
+
build?: {
|
|
19
|
+
outDir?: string;
|
|
20
|
+
sourcemap?: boolean;
|
|
21
|
+
minify?: boolean;
|
|
22
|
+
/** Target adapters */
|
|
23
|
+
adapter?: 'node' | 'cloudflare' | 'vercel' | 'fly' | 'deno';
|
|
24
|
+
};
|
|
25
|
+
/** Internationalization */
|
|
26
|
+
i18n?: {
|
|
27
|
+
defaultLocale: string;
|
|
28
|
+
locales: string[];
|
|
29
|
+
/** Path to translation files */
|
|
30
|
+
translationsDir?: string;
|
|
31
|
+
};
|
|
32
|
+
/** Plugins */
|
|
33
|
+
plugins?: NexusPlugin[];
|
|
34
|
+
}
|
|
35
|
+
export interface NexusPlugin {
|
|
36
|
+
name: string;
|
|
37
|
+
transform?: (source: string, filepath: string) => string | Promise<string>;
|
|
38
|
+
buildStart?: () => void | Promise<void>;
|
|
39
|
+
buildEnd?: () => void | Promise<void>;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,wCAAwC;IACxC,gBAAgB,CAAC,EAAE,aAAa,GAAG,aAAa,GAAG,gBAAgB,CAAC;IAEpE,kCAAkC;IAClC,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC,EAAE,CAAC;QAC9C,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IAEF,2BAA2B;IAC3B,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,wEAAwE;QACxE,IAAI,CAAC,EAAE,OAAO,CAAC;KAChB,CAAC;IAEF,0BAA0B;IAC1B,KAAK,CAAC,EAAE;QACN,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,sBAAsB;QACtB,OAAO,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;KAC7D,CAAC;IAEF,2BAA2B;IAC3B,IAAI,CAAC,EAAE;QACL,aAAa,EAAE,MAAM,CAAC;QACtB,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,gCAAgC;QAChC,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IAEF,cAAc;IACd,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3E,UAAU,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":""}
|
package/dist/create.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../src/create.ts"],"names":[],"mappings":";AACA;;;GAGG"}
|