clawborrator-cli 0.0.1
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/bin/claw +25 -0
- package/dist-bundled/claw.cjs +7567 -0
- package/package.json +55 -0
package/bin/claw
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// claw — clawborrator command-line interface. Forwards to the
|
|
3
|
+
// esbuild-bundled single-file entry that ships in npm tarballs.
|
|
4
|
+
// In dev (with workspace symlinks), tsc's dist/ output is also valid;
|
|
5
|
+
// we prefer the bundled file when present so published installs and
|
|
6
|
+
// `npm link` checkouts resolve identically.
|
|
7
|
+
import { existsSync } from 'node:fs';
|
|
8
|
+
import { dirname, resolve } from 'node:path';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
10
|
+
|
|
11
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
const candidates = [
|
|
13
|
+
resolve(here, '..', 'dist-bundled', 'claw.cjs'), // published tarball (esbuild CJS)
|
|
14
|
+
resolve(here, '..', 'dist', 'index.js'), // tsc-only dev build (ESM)
|
|
15
|
+
];
|
|
16
|
+
const target = candidates.find((p) => existsSync(p));
|
|
17
|
+
if (!target) {
|
|
18
|
+
console.error('claw: build output missing — run `npm run build` in the CLI workspace');
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
import(target).catch((err) => {
|
|
23
|
+
console.error(err);
|
|
24
|
+
process.exit(1);
|
|
25
|
+
});
|