@veloxts/mcp 0.6.61 → 0.6.63

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,25 @@
1
1
  # @veloxts/mcp
2
2
 
3
+ ## 0.6.63
4
+
5
+ ### Patch Changes
6
+
7
+ - feat(create): add dynamic database display name to CLAUDE.md templates
8
+ - Updated dependencies
9
+ - @veloxts/cli@0.6.63
10
+ - @veloxts/router@0.6.63
11
+ - @veloxts/validation@0.6.63
12
+
13
+ ## 0.6.62
14
+
15
+ ### Patch Changes
16
+
17
+ - add Common Gotchas section to all template CLAUDE.md files + add dynamic database display name to CLAUDE.md templates
18
+ - Updated dependencies
19
+ - @veloxts/cli@0.6.62
20
+ - @veloxts/router@0.6.62
21
+ - @veloxts/validation@0.6.62
22
+
3
23
  ## 0.6.61
4
24
 
5
25
  ### Patch Changes
@@ -19,8 +19,9 @@ export interface ResolvedCLI {
19
19
  *
20
20
  * Resolution order:
21
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)
22
+ * 2. Workspace locations (apps/api for legacy projects)
23
+ * 3. Windows .cmd wrapper variants
24
+ * 4. Resolve @veloxts/cli package and find bin entry
25
+ * 5. Fallback to npx @veloxts/cli (slowest, downloads if needed)
25
26
  */
26
27
  export declare function resolveVeloxCLI(projectRoot: string, args: string[]): ResolvedCLI;
package/dist/utils/cli.js CHANGED
@@ -5,61 +5,72 @@
5
5
  */
6
6
  import { existsSync, readFileSync } from 'node:fs';
7
7
  import { join } from 'node:path';
8
+ /**
9
+ * Common locations to search for CLI binary in workspace projects
10
+ */
11
+ const WORKSPACE_BIN_LOCATIONS = [
12
+ // Root node_modules (CLI installed at workspace root - recommended)
13
+ ['node_modules', '.bin'],
14
+ // Legacy: apps/api (older templates had CLI in apps/api)
15
+ ['apps', 'api', 'node_modules', '.bin'],
16
+ ];
17
+ /**
18
+ * Common locations to search for @veloxts/cli package
19
+ */
20
+ const WORKSPACE_PKG_LOCATIONS = [
21
+ // Root node_modules
22
+ ['node_modules', '@veloxts', 'cli'],
23
+ // Legacy: apps/api
24
+ ['apps', 'api', 'node_modules', '@veloxts', 'cli'],
25
+ ];
8
26
  /**
9
27
  * Resolve the VeloxTS CLI binary path with smart fallbacks
10
28
  *
11
29
  * Resolution order:
12
30
  * 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)
31
+ * 2. Workspace locations (apps/api for legacy projects)
32
+ * 3. Windows .cmd wrapper variants
33
+ * 4. Resolve @veloxts/cli package and find bin entry
34
+ * 5. Fallback to npx @veloxts/cli (slowest, downloads if needed)
16
35
  */
17
36
  export function resolveVeloxCLI(projectRoot, args) {
18
37
  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)) {
38
+ const binName = isWindows ? 'velox.cmd' : 'velox';
39
+ // 1-3. Try all workspace bin locations
40
+ for (const location of WORKSPACE_BIN_LOCATIONS) {
41
+ const binPath = join(projectRoot, ...location, binName);
42
+ if (existsSync(binPath)) {
34
43
  return {
35
- command: localBinCmd,
44
+ command: binPath,
36
45
  args,
37
46
  isNpx: false,
38
47
  };
39
48
  }
40
49
  }
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
- };
50
+ // 4. Try resolving @veloxts/cli package directly from workspace locations
51
+ for (const location of WORKSPACE_PKG_LOCATIONS) {
52
+ try {
53
+ const cliPackageJson = join(projectRoot, ...location, 'package.json');
54
+ if (existsSync(cliPackageJson)) {
55
+ const pkg = JSON.parse(readFileSync(cliPackageJson, 'utf-8'));
56
+ const binRelative = typeof pkg.bin === 'string' ? pkg.bin : pkg.bin?.velox;
57
+ if (binRelative) {
58
+ const binPath = join(projectRoot, ...location, binRelative);
59
+ if (existsSync(binPath)) {
60
+ return {
61
+ command: 'node',
62
+ args: [binPath, ...args],
63
+ isNpx: false,
64
+ };
65
+ }
55
66
  }
56
67
  }
57
68
  }
69
+ catch {
70
+ // Ignore resolution errors, try next location
71
+ }
58
72
  }
59
- catch {
60
- // Ignore resolution errors, fall through to npx
61
- }
62
- // 4. Fallback to npx (works even if not installed locally)
73
+ // 5. Fallback to npx (works even if not installed locally)
63
74
  return {
64
75
  command: 'npx',
65
76
  args: ['@veloxts/cli', ...args],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/mcp",
3
- "version": "0.6.61",
3
+ "version": "0.6.63",
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",
@@ -24,9 +24,9 @@
24
24
  "dependencies": {
25
25
  "@modelcontextprotocol/sdk": "1.25.1",
26
26
  "typescript": "5.9.3",
27
- "@veloxts/router": "0.6.61",
28
- "@veloxts/validation": "0.6.61",
29
- "@veloxts/cli": "0.6.61"
27
+ "@veloxts/router": "0.6.63",
28
+ "@veloxts/validation": "0.6.63",
29
+ "@veloxts/cli": "0.6.63"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "zod": ">=3.25.0"