dekit-cli 0.2.1 → 0.2.2

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/dekit.js +7 -2
  2. package/package.json +1 -1
package/bin/dekit.js CHANGED
@@ -1,13 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import { execFileSync } from "node:child_process";
3
- import { fileURLToPath } from "node:url";
3
+ import { createRequire } from "node:module";
4
+ import { fileURLToPath, pathToFileURL } from "node:url";
4
5
  import { dirname, join } from "node:path";
5
6
 
6
7
  const __dirname = dirname(fileURLToPath(import.meta.url));
8
+ const require = createRequire(import.meta.url);
9
+
10
+ // Resolve tsx from this package's own node_modules, not from CWD
11
+ const tsxPath = pathToFileURL(require.resolve("tsx")).href;
7
12
 
8
13
  try {
9
14
  execFileSync(process.execPath, [
10
- "--import", "tsx",
15
+ "--import", tsxPath,
11
16
  join(__dirname, "dekit.ts"),
12
17
  ...process.argv.slice(2),
13
18
  ], { stdio: "inherit" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dekit-cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "description": "A code-first design toolkit for agents and humans — create, preview, and screenshot HTML/CSS designs",
6
6
  "keywords": [