@veloxts/cli 0.6.89 → 0.6.90

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @veloxts/cli
2
2
 
3
+ ## 0.6.90
4
+
5
+ ### Patch Changes
6
+
7
+ - Dependencies updates – fix critical and high severity vulnerabilities
8
+ - Updated dependencies
9
+ - @veloxts/auth@0.6.90
10
+ - @veloxts/core@0.6.90
11
+ - @veloxts/orm@0.6.90
12
+ - @veloxts/router@0.6.90
13
+ - @veloxts/validation@0.6.90
14
+
3
15
  ## 0.6.89
4
16
 
5
17
  ### Patch Changes
@@ -235,7 +247,6 @@
235
247
  - ### feat(auth): Unified Adapter-Only Architecture
236
248
 
237
249
  **New Features:**
238
-
239
250
  - Add `JwtAdapter` implementing the `AuthAdapter` interface for unified JWT authentication
240
251
  - Add `jwtAuth()` convenience function for direct adapter usage with optional built-in routes (`/api/auth/refresh`, `/api/auth/logout`)
241
252
  - Add `AuthContext` discriminated union (`NativeAuthContext | AdapterAuthContext`) for type-safe auth mode handling
@@ -243,24 +254,20 @@
243
254
  - Add shared decoration utilities (`decorateAuth`, `setRequestAuth`, `checkDoubleRegistration`)
244
255
 
245
256
  **Architecture Changes:**
246
-
247
257
  - `authPlugin` now uses `JwtAdapter` internally - all authentication flows through the adapter pattern
248
258
  - Single code path for authentication (no more dual native/adapter modes)
249
259
  - `authContext.authMode` is now always `'adapter'` with `providerId='jwt'` when using `authPlugin`
250
260
 
251
261
  **Breaking Changes:**
252
-
253
262
  - Remove deprecated `LegacySessionConfig` interface (use `sessionMiddleware` instead)
254
263
  - Remove deprecated `session` field from `AuthConfig`
255
264
  - `User` interface no longer has index signature (extend via declaration merging)
256
265
 
257
266
  **Type Safety Improvements:**
258
-
259
267
  - `AuthContext` discriminated union enables exhaustive type narrowing based on `authMode`
260
268
  - Export `NativeAuthContext` and `AdapterAuthContext` types for explicit typing
261
269
 
262
270
  **Migration:**
263
-
264
271
  - Existing `authPlugin` usage remains backward-compatible
265
272
  - If checking `authContext.token`, use `authContext.session` instead (token stored in session for adapter mode)
266
273
 
@@ -282,12 +289,10 @@
282
289
  Addresses 9 user feedback items to improve DX, reduce boilerplate, and eliminate template duplications.
283
290
 
284
291
  ### Phase 1: Validation Helpers (`@veloxts/validation`)
285
-
286
292
  - Add `prismaDecimal()`, `prismaDecimalNullable()`, `prismaDecimalOptional()` for Prisma Decimal → number conversion
287
293
  - Add `dateToIso`, `dateToIsoNullable`, `dateToIsoOptional` aliases for consistency
288
294
 
289
295
  ### Phase 2: Template Deduplication (`@veloxts/auth`)
290
-
291
296
  - Export `createEnhancedTokenStore()` with token revocation and refresh token reuse detection
292
297
  - Export `parseUserRoles()` and `DEFAULT_ALLOWED_ROLES`
293
298
  - Fix memory leak: track pending timeouts for proper cleanup on `destroy()`
@@ -295,20 +300,17 @@
295
300
  - Fix jwtManager singleton pattern in templates
296
301
 
297
302
  ### Phase 3: Router Helpers (`@veloxts/router`)
298
-
299
303
  - Add `createRouter()` returning `{ collections, router }` for DRY setup
300
304
  - Add `toRouter()` for router-only use cases
301
305
  - Update all router templates to use `createRouter()`
302
306
 
303
307
  ### Phase 4: Guard Type Narrowing - Experimental (`@veloxts/auth`, `@veloxts/router`)
304
-
305
308
  - Add `NarrowingGuard` interface with phantom `_narrows` type
306
309
  - Add `authenticatedNarrow` and `hasRoleNarrow()` guards
307
310
  - Add `guardNarrow()` method to `ProcedureBuilder` for context narrowing
308
311
  - Enables `ctx.user` to be non-null after guard passes
309
312
 
310
313
  ### Phase 5: Documentation (`@veloxts/router`)
311
-
312
314
  - Document `.rest()` override patterns
313
315
  - Document `createRouter()` helper usage
314
316
  - Document `guardNarrow()` experimental API
@@ -1533,7 +1535,6 @@
1533
1535
  ### Patch Changes
1534
1536
 
1535
1537
  - Fix Prisma client generation in scaffolder
1536
-
1537
1538
  - Added automatic Prisma client generation after dependency installation in create-velox-app
1538
1539
  - Fixed database template to validate DATABASE_URL environment variable
1539
1540
  - Added alpha release warning to all package READMEs
@@ -125,6 +125,8 @@ async function collectSingleField(existingNames, fieldNumber, prefill) {
125
125
  placeholder: 'e.g., title, authorId, isPublished',
126
126
  initialValue: prefill?.name ?? '',
127
127
  validate: (value) => {
128
+ if (!value)
129
+ return 'Field name is required';
128
130
  const trimmed = value.trim();
129
131
  const error = validateFieldName(trimmed);
130
132
  if (error)
@@ -262,7 +264,7 @@ async function collectDefaultValue(fieldType, prefill) {
262
264
  placeholder,
263
265
  initialValue: prefill ?? '',
264
266
  validate: (value) => {
265
- if (!value.trim())
267
+ if (!value || !value.trim())
266
268
  return 'Default value is required';
267
269
  return validateDefaultValue(fieldType, value.trim());
268
270
  },
@@ -316,7 +318,7 @@ async function collectEnumDefinition(fieldName, prefill) {
316
318
  message: 'Enum type name (PascalCase)',
317
319
  placeholder: suggestedName,
318
320
  initialValue: prefill?.name ?? suggestedName,
319
- validate: validateEnumName,
321
+ validate: (value) => (value ? validateEnumName(value) : 'Enum name is required'),
320
322
  });
321
323
  if (p.isCancel(nameResult)) {
322
324
  return { enumDef: undefined, cancelled: true };
@@ -327,6 +329,8 @@ async function collectEnumDefinition(fieldName, prefill) {
327
329
  placeholder: 'e.g., draft, published, archived',
328
330
  initialValue: prefill?.values?.join(', ') ?? '',
329
331
  validate: (value) => {
332
+ if (!value)
333
+ return 'At least one enum value is required';
330
334
  const parsed = parseEnumValues(value);
331
335
  return validateEnumValues(parsed);
332
336
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/cli",
3
- "version": "0.6.89",
3
+ "version": "0.6.90",
4
4
  "description": "Developer tooling and CLI commands for VeloxTS framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -32,33 +32,33 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "@clack/prompts": "0.11.0",
36
- "commander": "14.0.2",
35
+ "@clack/prompts": "1.0.0",
36
+ "commander": "14.0.3",
37
37
  "dotenv": "17.2.3",
38
38
  "hot-hook": "0.4.0",
39
- "pg": "8.16.0",
39
+ "pg": "8.18.0",
40
40
  "picocolors": "1.1.1",
41
41
  "pluralize": "8.0.0",
42
42
  "tsx": "4.21.0",
43
- "yaml": "2.8.0",
44
- "@veloxts/core": "0.6.89",
45
- "@veloxts/orm": "0.6.89",
46
- "@veloxts/auth": "0.6.89",
47
- "@veloxts/router": "0.6.89",
48
- "@veloxts/validation": "0.6.89"
43
+ "yaml": "2.8.2",
44
+ "@veloxts/auth": "0.6.90",
45
+ "@veloxts/orm": "0.6.90",
46
+ "@veloxts/router": "0.6.90",
47
+ "@veloxts/core": "0.6.90",
48
+ "@veloxts/validation": "0.6.90"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@prisma/client": ">=7.0.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@prisma/client": "7.2.0",
55
- "@types/node": "25.0.3",
56
- "@types/pg": "8.15.4",
54
+ "@prisma/client": "7.3.0",
55
+ "@types/node": "25.1.0",
56
+ "@types/pg": "8.16.0",
57
57
  "@types/pluralize": "0.0.33",
58
- "@vitest/coverage-v8": "4.0.16",
58
+ "@vitest/coverage-v8": "4.0.18",
59
59
  "tsd": "0.33.0",
60
60
  "typescript": "5.9.3",
61
- "vitest": "4.0.16"
61
+ "vitest": "4.0.18"
62
62
  },
63
63
  "keywords": [
64
64
  "velox",