vector-framework 0.9.8 → 1.0.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 +33 -2
- package/dist/cli/index.js +86 -88
- package/dist/cli/index.js.map +1 -1
- package/dist/cli.js +192 -161
- package/dist/core/config-loader.d.ts.map +1 -1
- package/dist/core/config-loader.js +3 -6
- package/dist/core/config-loader.js.map +1 -1
- package/dist/core/server.d.ts.map +1 -1
- package/dist/core/server.js +1 -2
- package/dist/core/server.js.map +1 -1
- package/dist/core/vector.d.ts.map +1 -1
- package/dist/core/vector.js +8 -4
- package/dist/core/vector.js.map +1 -1
- package/dist/dev/route-scanner.d.ts +5 -2
- package/dist/dev/route-scanner.d.ts.map +1 -1
- package/dist/dev/route-scanner.js +63 -16
- package/dist/dev/route-scanner.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/middleware/manager.d.ts.map +1 -1
- package/dist/middleware/manager.js +8 -1
- package/dist/middleware/manager.js.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/cli/index.ts +98 -109
- package/src/core/config-loader.ts +4 -10
- package/src/core/server.ts +1 -2
- package/src/core/vector.ts +9 -4
- package/src/dev/route-scanner.ts +76 -18
- package/src/middleware/manager.ts +7 -1
- package/src/types/index.ts +2 -0
package/README.md
CHANGED
|
@@ -67,7 +67,8 @@ const config: VectorConfigSchema = {
|
|
|
67
67
|
],
|
|
68
68
|
after: [
|
|
69
69
|
async (response, request) => {
|
|
70
|
-
|
|
70
|
+
const duration = Date.now() - (request.startTime || Date.now());
|
|
71
|
+
response.headers.set("X-Response-Time", `${duration}ms`);
|
|
71
72
|
return response;
|
|
72
73
|
}
|
|
73
74
|
],
|
|
@@ -302,6 +303,7 @@ interface VectorConfigSchema {
|
|
|
302
303
|
reusePort?: boolean; // Reuse port (default: true)
|
|
303
304
|
development?: boolean; // Development mode
|
|
304
305
|
routesDir?: string; // Routes directory (default: ./routes)
|
|
306
|
+
routeExcludePatterns?: string[]; // Patterns to exclude from route scanning
|
|
305
307
|
idleTimeout?: number; // Idle timeout in seconds
|
|
306
308
|
|
|
307
309
|
// CORS
|
|
@@ -330,6 +332,7 @@ const config: VectorConfigSchema = {
|
|
|
330
332
|
hostname: "0.0.0.0",
|
|
331
333
|
development: process.env.NODE_ENV !== "production",
|
|
332
334
|
routesDir: "./api/routes",
|
|
335
|
+
routeExcludePatterns: ["*.test.ts", "*.spec.ts"], // Optional: custom exclusions
|
|
333
336
|
idleTimeout: 60,
|
|
334
337
|
|
|
335
338
|
cors: {
|
|
@@ -377,7 +380,7 @@ const config: VectorConfigSchema = {
|
|
|
377
380
|
after: [
|
|
378
381
|
// Response time header
|
|
379
382
|
async (response, request) => {
|
|
380
|
-
const duration = Date.now() - request.startTime;
|
|
383
|
+
const duration = Date.now() - (request.startTime || Date.now());
|
|
381
384
|
response.headers.set("X-Response-Time", `${duration}ms`);
|
|
382
385
|
return response;
|
|
383
386
|
},
|
|
@@ -421,6 +424,7 @@ my-app/
|
|
|
421
424
|
├── routes/ # Auto-discovered routes
|
|
422
425
|
│ ├── users.ts # /users endpoints
|
|
423
426
|
│ ├── posts.ts # /posts endpoints
|
|
427
|
+
│ ├── users.test.ts # Test file (automatically excluded)
|
|
424
428
|
│ └── admin/ # Nested routes
|
|
425
429
|
│ └── stats.ts # /admin/stats endpoints
|
|
426
430
|
├── lib/ # Your libraries
|
|
@@ -430,6 +434,33 @@ my-app/
|
|
|
430
434
|
└── package.json
|
|
431
435
|
```
|
|
432
436
|
|
|
437
|
+
## Route Discovery
|
|
438
|
+
|
|
439
|
+
Vector automatically discovers and loads route files from your `routesDir` (default: `./routes`). By default, the following file patterns are excluded from route scanning:
|
|
440
|
+
|
|
441
|
+
- `*.test.ts`, `*.test.js`, `*.test.tsx`, `*.test.jsx` - Test files
|
|
442
|
+
- `*.spec.ts`, `*.spec.js`, `*.spec.tsx`, `*.spec.jsx` - Spec files
|
|
443
|
+
- `*.tests.ts`, `*.tests.js` - Test suite files
|
|
444
|
+
- `**/__tests__/**` - Test directories
|
|
445
|
+
- `*.interface.ts`, `*.type.ts` - Type definition files
|
|
446
|
+
- `*.d.ts` - TypeScript declaration files
|
|
447
|
+
|
|
448
|
+
You can customize the exclusion patterns using the `routeExcludePatterns` configuration option:
|
|
449
|
+
|
|
450
|
+
```typescript
|
|
451
|
+
// vector.config.ts
|
|
452
|
+
const config: VectorConfigSchema = {
|
|
453
|
+
routesDir: "./routes",
|
|
454
|
+
// Custom exclusion patterns (overrides defaults)
|
|
455
|
+
routeExcludePatterns: [
|
|
456
|
+
"*.test.ts",
|
|
457
|
+
"*.spec.ts",
|
|
458
|
+
"*.mock.ts",
|
|
459
|
+
"_*.ts", // Exclude files starting with underscore
|
|
460
|
+
],
|
|
461
|
+
};
|
|
462
|
+
```
|
|
463
|
+
|
|
433
464
|
## Performance
|
|
434
465
|
|
|
435
466
|
Vector achieves exceptional performance through:
|
package/dist/cli/index.js
CHANGED
|
@@ -43,7 +43,6 @@ const { values, positionals } = parseArgs({
|
|
|
43
43
|
const command = positionals[0] || "dev";
|
|
44
44
|
async function runDev() {
|
|
45
45
|
const isDev = command === "dev";
|
|
46
|
-
console.log(`\n→ Starting Vector ${isDev ? "development" : "production"} server\n`);
|
|
47
46
|
let server = null;
|
|
48
47
|
let vector = null;
|
|
49
48
|
async function startServer() {
|
|
@@ -55,64 +54,50 @@ async function runDev() {
|
|
|
55
54
|
});
|
|
56
55
|
// Create the actual server start promise
|
|
57
56
|
const serverStartPromise = (async () => {
|
|
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
|
-
vector.setCacheHandler(cacheHandler);
|
|
92
|
-
}
|
|
93
|
-
// Start the server
|
|
94
|
-
server = await vector.startServer(config);
|
|
95
|
-
// Verify the server is actually running
|
|
96
|
-
if (!server || !server.port) {
|
|
97
|
-
throw new Error("Server started but is not responding correctly");
|
|
98
|
-
}
|
|
99
|
-
const gray = "\x1b[90m";
|
|
100
|
-
const reset = "\x1b[0m";
|
|
101
|
-
const cyan = "\x1b[36m";
|
|
102
|
-
const green = "\x1b[32m";
|
|
103
|
-
console.log(` ${gray}Config${reset} ${configSource === "user" ? "User config loaded" : "Using defaults"}`);
|
|
104
|
-
console.log(` ${gray}Routes${reset} ${config.routesDir}`);
|
|
105
|
-
if (isDev && values.watch) {
|
|
106
|
-
console.log(` ${gray}Watching${reset} All project files`);
|
|
107
|
-
}
|
|
108
|
-
console.log(` ${gray}CORS${reset} ${config.cors ? "Enabled" : "Disabled"}`);
|
|
109
|
-
console.log(` ${gray}Mode${reset} ${config.development ? "Development" : "Production"}\n`);
|
|
110
|
-
console.log(` ${green}Ready${reset} → ${cyan}http://${config.hostname}:${config.port}${reset}\n`);
|
|
111
|
-
return { server, vector, config };
|
|
57
|
+
// Load configuration using ConfigLoader
|
|
58
|
+
const configLoader = new ConfigLoader(values.config);
|
|
59
|
+
const config = await configLoader.load();
|
|
60
|
+
// Merge CLI options with loaded config
|
|
61
|
+
// Only use CLI values if config doesn't have them
|
|
62
|
+
config.port = config.port ?? Number.parseInt(values.port);
|
|
63
|
+
config.hostname = config.hostname ?? values.host;
|
|
64
|
+
config.routesDir = config.routesDir ?? values.routes;
|
|
65
|
+
config.development = config.development ?? isDev;
|
|
66
|
+
config.autoDiscover = true; // Always auto-discover routes
|
|
67
|
+
// Apply CLI CORS option if not explicitly set in config
|
|
68
|
+
// Only apply default CORS if config.cors is undefined (not set)
|
|
69
|
+
if (config.cors === undefined && values.cors) {
|
|
70
|
+
config.cors = {
|
|
71
|
+
origin: "*",
|
|
72
|
+
credentials: true,
|
|
73
|
+
allowHeaders: "Content-Type, Authorization",
|
|
74
|
+
allowMethods: "GET, POST, PUT, PATCH, DELETE, OPTIONS",
|
|
75
|
+
exposeHeaders: "Authorization",
|
|
76
|
+
maxAge: 86400,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
// Get Vector instance and configure handlers
|
|
80
|
+
vector = getVectorInstance();
|
|
81
|
+
// Load and set auth handler if configured
|
|
82
|
+
const authHandler = await configLoader.loadAuthHandler();
|
|
83
|
+
if (authHandler) {
|
|
84
|
+
vector.setProtectedHandler(authHandler);
|
|
85
|
+
}
|
|
86
|
+
// Load and set cache handler if configured
|
|
87
|
+
const cacheHandler = await configLoader.loadCacheHandler();
|
|
88
|
+
if (cacheHandler) {
|
|
89
|
+
vector.setCacheHandler(cacheHandler);
|
|
112
90
|
}
|
|
113
|
-
|
|
114
|
-
|
|
91
|
+
// Start the server
|
|
92
|
+
server = await vector.startServer(config);
|
|
93
|
+
// Verify the server is actually running
|
|
94
|
+
if (!server || !server.port) {
|
|
95
|
+
throw new Error("Server started but is not responding correctly");
|
|
115
96
|
}
|
|
97
|
+
const cyan = "\x1b[36m";
|
|
98
|
+
const reset = "\x1b[0m";
|
|
99
|
+
console.log(`\nListening on ${cyan}http://${config.hostname}:${config.port}${reset}\n`);
|
|
100
|
+
return { server, vector, config };
|
|
116
101
|
})();
|
|
117
102
|
// Race between server startup and timeout
|
|
118
103
|
return await Promise.race([serverStartPromise, timeoutPromise]);
|
|
@@ -165,9 +150,13 @@ async function runDev() {
|
|
|
165
150
|
// Small delay to ensure file system operations complete
|
|
166
151
|
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
167
152
|
// Clear module cache to ensure fresh imports
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
153
|
+
// Note: Bun uses ESM and doesn't have require.cache
|
|
154
|
+
// The Loader API will handle module reloading automatically
|
|
155
|
+
if (typeof require !== 'undefined' && require.cache) {
|
|
156
|
+
for (const key in require.cache) {
|
|
157
|
+
if (!key.includes("node_modules")) {
|
|
158
|
+
delete require.cache[key];
|
|
159
|
+
}
|
|
171
160
|
}
|
|
172
161
|
}
|
|
173
162
|
// Restart the server
|
|
@@ -181,74 +170,83 @@ async function runDev() {
|
|
|
181
170
|
// Don't exit the process on reload failures, just continue watching
|
|
182
171
|
}
|
|
183
172
|
finally {
|
|
184
|
-
// Reset flag after
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}, 2000); // 2 second cooldown
|
|
173
|
+
// Reset flag immediately after reload completes
|
|
174
|
+
// The lastReloadTime check provides additional protection
|
|
175
|
+
isReloading = false;
|
|
188
176
|
}
|
|
189
177
|
}, 500); // Increased debounce to 500ms
|
|
190
178
|
}
|
|
191
179
|
});
|
|
192
180
|
}
|
|
193
|
-
catch
|
|
194
|
-
|
|
181
|
+
catch {
|
|
182
|
+
const yellow = "\x1b[33m";
|
|
183
|
+
const reset = "\x1b[0m";
|
|
184
|
+
console.warn(`${yellow}Warning: File watching not available${reset}`);
|
|
195
185
|
}
|
|
196
186
|
}
|
|
197
187
|
}
|
|
198
188
|
catch (error) {
|
|
199
189
|
const red = "\x1b[31m";
|
|
200
190
|
const reset = "\x1b[0m";
|
|
201
|
-
console.error(`\n${red}
|
|
202
|
-
|
|
203
|
-
if (error.message) {
|
|
204
|
-
console.error(`Message: ${error.message}`);
|
|
205
|
-
}
|
|
206
|
-
if (error.stack) {
|
|
207
|
-
console.error(`\nStack trace:`);
|
|
191
|
+
console.error(`\n${red}Error: ${error.message || error}${reset}\n`);
|
|
192
|
+
if (error.stack && process.env.NODE_ENV === "development") {
|
|
208
193
|
console.error(error.stack);
|
|
209
194
|
}
|
|
210
|
-
else if (!error.message) {
|
|
211
|
-
// If no message or stack, show the raw error
|
|
212
|
-
console.error(`Raw error:`, error);
|
|
213
|
-
}
|
|
214
|
-
// Ensure we exit with error code
|
|
215
195
|
process.exit(1);
|
|
216
196
|
}
|
|
217
197
|
}
|
|
218
198
|
async function runBuild() {
|
|
219
|
-
console.log("\n→ Building Vector application\n");
|
|
220
199
|
try {
|
|
221
200
|
const { RouteScanner } = await import("../dev/route-scanner");
|
|
222
201
|
const { RouteGenerator } = await import("../dev/route-generator");
|
|
202
|
+
// Step 1: Scan and generate routes
|
|
223
203
|
const scanner = new RouteScanner(values.routes);
|
|
224
204
|
const generator = new RouteGenerator();
|
|
225
205
|
const routes = await scanner.scan();
|
|
226
206
|
await generator.generate(routes);
|
|
227
|
-
|
|
228
|
-
// Use spawn based on runtime
|
|
207
|
+
// Step 2: Build the application with Bun
|
|
229
208
|
if (typeof Bun !== "undefined") {
|
|
209
|
+
// Build the CLI as an executable
|
|
230
210
|
const buildProcess = Bun.spawn([
|
|
231
211
|
"bun",
|
|
232
212
|
"build",
|
|
233
|
-
"src/index.ts",
|
|
234
|
-
"--
|
|
235
|
-
"
|
|
213
|
+
"src/cli/index.ts",
|
|
214
|
+
"--target",
|
|
215
|
+
"bun",
|
|
216
|
+
"--outfile",
|
|
217
|
+
"dist/server.js",
|
|
236
218
|
"--minify",
|
|
237
219
|
]);
|
|
238
|
-
await buildProcess.exited;
|
|
220
|
+
const exitCode = await buildProcess.exited;
|
|
221
|
+
if (exitCode !== 0) {
|
|
222
|
+
throw new Error(`Build failed with exit code ${exitCode}`);
|
|
223
|
+
}
|
|
239
224
|
}
|
|
240
225
|
else {
|
|
241
226
|
// For Node.js, use child_process
|
|
242
227
|
const { spawnSync } = await import("child_process");
|
|
243
|
-
spawnSync("bun", [
|
|
228
|
+
const result = spawnSync("bun", [
|
|
229
|
+
"build",
|
|
230
|
+
"src/cli/index.ts",
|
|
231
|
+
"--target",
|
|
232
|
+
"bun",
|
|
233
|
+
"--outfile",
|
|
234
|
+
"dist/server.js",
|
|
235
|
+
"--minify",
|
|
236
|
+
], {
|
|
244
237
|
stdio: "inherit",
|
|
245
238
|
shell: true,
|
|
246
239
|
});
|
|
240
|
+
if (result.status !== 0) {
|
|
241
|
+
throw new Error(`Build failed with exit code ${result.status}`);
|
|
242
|
+
}
|
|
247
243
|
}
|
|
248
|
-
console.log("\
|
|
244
|
+
console.log("\nBuild complete: dist/server.js\n");
|
|
249
245
|
}
|
|
250
246
|
catch (error) {
|
|
251
|
-
|
|
247
|
+
const red = "\x1b[31m";
|
|
248
|
+
const reset = "\x1b[0m";
|
|
249
|
+
console.error(`\n${red}Error: ${error.message || error}${reset}\n`);
|
|
252
250
|
process.exit(1);
|
|
253
251
|
}
|
|
254
252
|
}
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,4CAA4C;AAC5C,MAAM,IAAI,GACR,OAAO,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEzE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC;IACxC,IAAI;IACJ,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,MAAM;SAChB;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,WAA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