@veloxts/mcp 0.6.31 → 0.6.52

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,215 @@
1
1
  # @veloxts/mcp
2
2
 
3
+ ## 0.6.52
4
+
5
+ ### Patch Changes
6
+
7
+ - feat(mcp): smart CLI resolution with fallbacks
8
+ - Updated dependencies
9
+ - @veloxts/cli@0.6.52
10
+ - @veloxts/router@0.6.52
11
+ - @veloxts/validation@0.6.52
12
+
13
+ ## 0.6.51
14
+
15
+ ### Patch Changes
16
+
17
+ - fix(web): configure @vinxi/server-functions for RSC server actions
18
+ - Updated dependencies
19
+ - @veloxts/cli@0.6.51
20
+ - @veloxts/router@0.6.51
21
+ - @veloxts/validation@0.6.51
22
+
23
+ ## 0.6.50
24
+
25
+ ### Patch Changes
26
+
27
+ - lint fixed
28
+ - Updated dependencies
29
+ - @veloxts/cli@0.6.50
30
+ - @veloxts/router@0.6.50
31
+ - @veloxts/validation@0.6.50
32
+
33
+ ## 0.6.49
34
+
35
+ ### Patch Changes
36
+
37
+ - feat(create): add client import lint script for RSC templates
38
+ - Updated dependencies
39
+ - @veloxts/cli@0.6.49
40
+ - @veloxts/router@0.6.49
41
+ - @veloxts/validation@0.6.49
42
+
43
+ ## 0.6.48
44
+
45
+ ### Patch Changes
46
+
47
+ - fix(web): remove server-only guards incompatible with Vite SS
48
+ - Updated dependencies
49
+ - @veloxts/cli@0.6.48
50
+ - @veloxts/router@0.6.48
51
+ - @veloxts/validation@0.6.48
52
+
53
+ ## 0.6.47
54
+
55
+ ### Patch Changes
56
+
57
+ - fix(web): use /adapters for createH3ApiHandler to avoid server-only
58
+ - Updated dependencies
59
+ - @veloxts/cli@0.6.47
60
+ - @veloxts/router@0.6.47
61
+ - @veloxts/validation@0.6.47
62
+
63
+ ## 0.6.46
64
+
65
+ ### Patch Changes
66
+
67
+ - fix(web): remove transitive server-only import from main entry
68
+ - Updated dependencies
69
+ - @veloxts/cli@0.6.46
70
+ - @veloxts/router@0.6.46
71
+ - @veloxts/validation@0.6.46
72
+
73
+ ## 0.6.45
74
+
75
+ ### Patch Changes
76
+
77
+ - fix(web): remove server-only guard from main entry for Vinxi compat
78
+ - Updated dependencies
79
+ - @veloxts/cli@0.6.45
80
+ - @veloxts/router@0.6.45
81
+ - @veloxts/validation@0.6.45
82
+
83
+ ## 0.6.44
84
+
85
+ ### Patch Changes
86
+
87
+ - refactor(web): implement proper RSC server/client separation
88
+ - Updated dependencies
89
+ - @veloxts/cli@0.6.44
90
+ - @veloxts/router@0.6.44
91
+ - @veloxts/validation@0.6.44
92
+
93
+ ## 0.6.43
94
+
95
+ ### Patch Changes
96
+
97
+ - fix(web): exclude native modules from Vite dependency optimization
98
+ - Updated dependencies
99
+ - @veloxts/cli@0.6.43
100
+ - @veloxts/router@0.6.43
101
+ - @veloxts/validation@0.6.43
102
+
103
+ ## 0.6.42
104
+
105
+ ### Patch Changes
106
+
107
+ - fix(web): enable tsconfig path aliases for Vite/Vinxi + docs(web): add @public/@internal JSDoc annotations to server actions
108
+ - Updated dependencies
109
+ - @veloxts/cli@0.6.42
110
+ - @veloxts/router@0.6.42
111
+ - @veloxts/validation@0.6.42
112
+
113
+ ## 0.6.41
114
+
115
+ ### Patch Changes
116
+
117
+ - feat(web): add authAction helper for procedure bridge authentication
118
+ - Updated dependencies
119
+ - @veloxts/cli@0.6.41
120
+ - @veloxts/router@0.6.41
121
+ - @veloxts/validation@0.6.41
122
+
123
+ ## 0.6.40
124
+
125
+ ### Patch Changes
126
+
127
+ - feat(create): consolidate template styles with unified dark mode design
128
+ - Updated dependencies
129
+ - @veloxts/cli@0.6.40
130
+ - @veloxts/router@0.6.40
131
+ - @veloxts/validation@0.6.40
132
+
133
+ ## 0.6.39
134
+
135
+ ### Patch Changes
136
+
137
+ - fix RSC client hydration with split layout architecture
138
+ - Updated dependencies
139
+ - @veloxts/cli@0.6.39
140
+ - @veloxts/router@0.6.39
141
+ - @veloxts/validation@0.6.39
142
+
143
+ ## 0.6.38
144
+
145
+ ### Patch Changes
146
+
147
+ - fix client hydration for RSC templates
148
+ - Updated dependencies
149
+ - @veloxts/cli@0.6.38
150
+ - @veloxts/router@0.6.38
151
+ - @veloxts/validation@0.6.38
152
+
153
+ ## 0.6.37
154
+
155
+ ### Patch Changes
156
+
157
+ - feat(web): add validated() helper for secure server actions & add rsc-auth template with validated()
158
+ - Updated dependencies
159
+ - @veloxts/cli@0.6.37
160
+ - @veloxts/router@0.6.37
161
+ - @veloxts/validation@0.6.37
162
+
163
+ ## 0.6.36
164
+
165
+ ### Patch Changes
166
+
167
+ - Gap Remediation Plan
168
+ - Updated dependencies
169
+ - @veloxts/cli@0.6.36
170
+ - @veloxts/router@0.6.36
171
+ - @veloxts/validation@0.6.36
172
+
173
+ ## 0.6.35
174
+
175
+ ### Patch Changes
176
+
177
+ - proper auth template testing in verify-publis
178
+ - Updated dependencies
179
+ - @veloxts/cli@0.6.35
180
+ - @veloxts/router@0.6.35
181
+ - @veloxts/validation@0.6.35
182
+
183
+ ## 0.6.34
184
+
185
+ ### Patch Changes
186
+
187
+ - update PostgreSQL adapter for Prisma 7 API
188
+ - Updated dependencies
189
+ - @veloxts/cli@0.6.34
190
+ - @veloxts/router@0.6.34
191
+ - @veloxts/validation@0.6.34
192
+
193
+ ## 0.6.33
194
+
195
+ ### Patch Changes
196
+
197
+ - changed claude.md instruction, added prisma config
198
+ - Updated dependencies
199
+ - @veloxts/cli@0.6.33
200
+ - @veloxts/router@0.6.33
201
+ - @veloxts/validation@0.6.33
202
+
203
+ ## 0.6.32
204
+
205
+ ### Patch Changes
206
+
207
+ - Introducing new Ecosystem Expansion packages: cache, queue, mail, storage, scheduler, events. Do not use yet
208
+ - Updated dependencies
209
+ - @veloxts/cli@0.6.32
210
+ - @veloxts/router@0.6.32
211
+ - @veloxts/validation@0.6.32
212
+
3
213
  ## 0.6.31
4
214
 
5
215
  ### Patch Changes
package/dist/server.js CHANGED
@@ -262,7 +262,7 @@ export function createVeloxMCPServer(options = {}) {
262
262
  // Validate arguments with Zod
263
263
  const parsed = GenerateArgsSchema.safeParse(args);
264
264
  if (!parsed.success) {
265
- const errors = parsed.error.errors.map((e) => `${e.path.join('.')}: ${e.message}`);
265
+ const errors = parsed.error.issues.map((e) => `${e.path.join('.')}: ${e.message}`);
266
266
  return {
267
267
  content: [
268
268
  {
@@ -294,7 +294,7 @@ export function createVeloxMCPServer(options = {}) {
294
294
  // Validate arguments with Zod
295
295
  const parsed = MigrateArgsSchema.safeParse(args);
296
296
  if (!parsed.success) {
297
- const errors = parsed.error.errors.map((e) => `${e.path.join('.')}: ${e.message}`);
297
+ const errors = parsed.error.issues.map((e) => `${e.path.join('.')}: ${e.message}`);
298
298
  return {
299
299
  content: [
300
300
  {
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import { spawn } from 'node:child_process';
7
7
  import { z } from 'zod';
8
+ import { resolveVeloxCLI } from '../utils/cli.js';
8
9
  import { findProjectRoot } from '../utils/project.js';
9
10
  // ============================================================================
10
11
  // Output Validation Schemas
@@ -55,10 +56,11 @@ export async function generate(options) {
55
56
  };
56
57
  }
57
58
  const args = buildArgs(options);
59
+ const resolved = resolveVeloxCLI(projectRoot, args);
58
60
  return new Promise((resolve) => {
59
- const child = spawn('npx', ['velox', ...args], {
61
+ const child = spawn(resolved.command, resolved.args, {
60
62
  cwd: projectRoot,
61
- shell: true,
63
+ shell: resolved.isNpx, // Only use shell for npx fallback
62
64
  stdio: ['pipe', 'pipe', 'pipe'],
63
65
  });
64
66
  let stdout = '';
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import { spawn } from 'node:child_process';
7
7
  import { z } from 'zod';
8
+ import { resolveVeloxCLI } from '../utils/cli.js';
8
9
  import { findProjectRoot } from '../utils/project.js';
9
10
  // ============================================================================
10
11
  // Output Validation Schemas
@@ -54,10 +55,11 @@ export async function migrate(options) {
54
55
  };
55
56
  }
56
57
  const args = buildArgs(options);
58
+ const resolved = resolveVeloxCLI(projectRoot, args);
57
59
  return new Promise((resolve) => {
58
- const child = spawn('npx', ['velox', ...args], {
60
+ const child = spawn(resolved.command, resolved.args, {
59
61
  cwd: projectRoot,
60
- shell: true,
62
+ shell: resolved.isNpx, // Only use shell for npx fallback
61
63
  stdio: ['pipe', 'pipe', 'pipe'],
62
64
  });
63
65
  let stdout = '';
@@ -0,0 +1,26 @@
1
+ /**
2
+ * CLI Resolution Utilities
3
+ *
4
+ * Utilities for finding and executing the VeloxTS CLI binary.
5
+ */
6
+ /**
7
+ * Resolved CLI command information
8
+ */
9
+ export interface ResolvedCLI {
10
+ /** Command to execute (binary path, 'node', or 'npx') */
11
+ command: string;
12
+ /** Arguments to pass (includes binary path if using node, or '@veloxts/cli' if using npx) */
13
+ args: string[];
14
+ /** Whether we're using npx fallback */
15
+ isNpx: boolean;
16
+ }
17
+ /**
18
+ * Resolve the VeloxTS CLI binary path with smart fallbacks
19
+ *
20
+ * Resolution order:
21
+ * 1. Local node_modules/.bin/velox (fastest, respects local version)
22
+ * 2. Windows .cmd wrapper (node_modules/.bin/velox.cmd)
23
+ * 3. Resolve @veloxts/cli package and find bin entry
24
+ * 4. Fallback to npx @veloxts/cli (slowest, downloads if needed)
25
+ */
26
+ export declare function resolveVeloxCLI(projectRoot: string, args: string[]): ResolvedCLI;
@@ -0,0 +1,68 @@
1
+ /**
2
+ * CLI Resolution Utilities
3
+ *
4
+ * Utilities for finding and executing the VeloxTS CLI binary.
5
+ */
6
+ import { existsSync, readFileSync } from 'node:fs';
7
+ import { join } from 'node:path';
8
+ /**
9
+ * Resolve the VeloxTS CLI binary path with smart fallbacks
10
+ *
11
+ * Resolution order:
12
+ * 1. Local node_modules/.bin/velox (fastest, respects local version)
13
+ * 2. Windows .cmd wrapper (node_modules/.bin/velox.cmd)
14
+ * 3. Resolve @veloxts/cli package and find bin entry
15
+ * 4. Fallback to npx @veloxts/cli (slowest, downloads if needed)
16
+ */
17
+ export function resolveVeloxCLI(projectRoot, args) {
18
+ const isWindows = process.platform === 'win32';
19
+ // 1. Try local .bin/velox (Unix)
20
+ if (!isWindows) {
21
+ const localBin = join(projectRoot, 'node_modules', '.bin', 'velox');
22
+ if (existsSync(localBin)) {
23
+ return {
24
+ command: localBin,
25
+ args,
26
+ isNpx: false,
27
+ };
28
+ }
29
+ }
30
+ // 2. Try Windows .cmd wrapper
31
+ if (isWindows) {
32
+ const localBinCmd = join(projectRoot, 'node_modules', '.bin', 'velox.cmd');
33
+ if (existsSync(localBinCmd)) {
34
+ return {
35
+ command: localBinCmd,
36
+ args,
37
+ isNpx: false,
38
+ };
39
+ }
40
+ }
41
+ // 3. Try resolving @veloxts/cli package directly
42
+ try {
43
+ const cliPackageJson = join(projectRoot, 'node_modules', '@veloxts', 'cli', 'package.json');
44
+ if (existsSync(cliPackageJson)) {
45
+ const pkg = JSON.parse(readFileSync(cliPackageJson, 'utf-8'));
46
+ const binRelative = typeof pkg.bin === 'string' ? pkg.bin : pkg.bin?.velox;
47
+ if (binRelative) {
48
+ const binPath = join(projectRoot, 'node_modules', '@veloxts', 'cli', binRelative);
49
+ if (existsSync(binPath)) {
50
+ return {
51
+ command: 'node',
52
+ args: [binPath, ...args],
53
+ isNpx: false,
54
+ };
55
+ }
56
+ }
57
+ }
58
+ }
59
+ catch {
60
+ // Ignore resolution errors, fall through to npx
61
+ }
62
+ // 4. Fallback to npx (works even if not installed locally)
63
+ return {
64
+ command: 'npx',
65
+ args: ['@veloxts/cli', ...args],
66
+ isNpx: true,
67
+ };
68
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/mcp",
3
- "version": "0.6.31",
3
+ "version": "0.6.52",
4
4
  "description": "Model Context Protocol server for VeloxTS - expose project context to AI tools",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,15 +23,16 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "@modelcontextprotocol/sdk": "1.25.1",
26
- "@veloxts/cli": "0.6.31",
27
- "@veloxts/router": "0.6.31",
28
- "@veloxts/validation": "0.6.31"
26
+ "@veloxts/cli": "0.6.52",
27
+ "@veloxts/validation": "0.6.52",
28
+ "@veloxts/router": "0.6.52"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "zod": ">=3.25.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "25.0.3",
35
+ "@vitest/coverage-v8": "4.0.16",
35
36
  "typescript": "5.9.3",
36
37
  "vitest": "4.0.16"
37
38
  },
@@ -61,6 +62,7 @@
61
62
  "type-check": "tsc --noEmit",
62
63
  "test": "vitest run",
63
64
  "test:watch": "vitest",
65
+ "test:coverage": "vitest run --coverage",
64
66
  "clean": "rm -rf dist tsconfig.tsbuildinfo"
65
67
  }
66
68
  }