@blxzer/cursor-trellis 0.2.4 → 0.2.6

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 +16 -13
  2. package/package.json +1 -1
@@ -1,21 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { createRequire } from "node:module";
4
3
  import { spawn } from "node:child_process";
4
+ import { dirname, join } from "node:path";
5
+ import { fileURLToPath } from "node:url";
5
6
 
6
- const require = createRequire(import.meta.url);
7
+ // Get the directory of this wrapper script
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = dirname(__filename);
7
10
 
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
- }
11
+ // smart-search npm wrapper is at: node_modules/@blxzer/smart-search/npm/bin/smart-search.js
12
+ const smartSearchBin = join(
13
+ __dirname,
14
+ "..",
15
+ "node_modules",
16
+ "@blxzer",
17
+ "smart-search",
18
+ "npm",
19
+ "bin",
20
+ "smart-search.js"
21
+ );
19
22
 
20
23
  const child = spawn(process.execPath, [smartSearchBin, ...process.argv.slice(2)], {
21
24
  stdio: "inherit",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blxzer/cursor-trellis",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
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",