@blxzer/cursor-trellis 0.2.3 → 0.2.4

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.
Files changed (2) hide show
  1. package/bin/smart-search.js +13 -13
  2. package/package.json +2 -2
@@ -1,21 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { fileURLToPath } from "node:url";
4
- import { dirname, join } from "node:path";
3
+ import { createRequire } from "node:module";
5
4
  import { spawn } from "node:child_process";
6
5
 
7
- const __dirname = dirname(fileURLToPath(import.meta.url));
8
- const packageRoot = join(__dirname, "..");
6
+ const require = createRequire(import.meta.url);
9
7
 
10
- // Forward to @blxzer/smart-search dependency
11
- const smartSearchBin = join(
12
- packageRoot,
13
- "node_modules",
14
- "@blxzer",
15
- "smart-search",
16
- "bin",
17
- "smart-search.js"
18
- );
8
+ // Resolve @blxzer/smart-search package location
9
+ let smartSearchBin;
10
+ try {
11
+ const smartSearchPackage = require.resolve("@blxzer/smart-search/package.json");
12
+ const smartSearchRoot = smartSearchPackage.replace(/[\/\\]package\.json$/, "");
13
+ smartSearchBin = `${smartSearchRoot}/bin/smart-search.js`;
14
+ } catch (err) {
15
+ console.error("Error: @blxzer/smart-search dependency not found.");
16
+ console.error("Please reinstall: npm install -g @blxzer/cursor-trellis");
17
+ process.exit(1);
18
+ }
19
19
 
20
20
  const child = spawn(process.execPath, [smartSearchBin, ...process.argv.slice(2)], {
21
21
  stdio: "inherit",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blxzer/cursor-trellis",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "AI capabilities grow like ivy — Trellis provides the structure to guide them along a disciplined path",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -36,7 +36,7 @@
36
36
  "inquirer": "^9.3.7",
37
37
  "undici": "^6.21.0",
38
38
  "zod": "^4.4.2",
39
- "@blxzer/cursor-trellis-core": "0.2.3"
39
+ "@blxzer/cursor-trellis-core": "0.2.4"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@eslint/js": "^9.18.0",