happy-coder 0.7.1-beta.2 → 0.7.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/README.md +4 -1
- package/bin/happy.mjs +35 -2
- package/dist/index.cjs +502 -434
- package/dist/index.mjs +511 -443
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.cts +2 -2
- package/dist/lib.d.mts +2 -2
- package/dist/lib.mjs +1 -1
- package/dist/{types-CzvFvJwf.cjs → types-B4GgojGc.cjs} +1 -1
- package/dist/{types-BZC9-exR.mjs → types-CnqIfv9n.mjs} +1 -1
- package/package.json +5 -4
- package/bin/happy.cmd +0 -3
package/README.md
CHANGED
|
@@ -32,7 +32,10 @@ This will:
|
|
|
32
32
|
|
|
33
33
|
## Requirements
|
|
34
34
|
|
|
35
|
-
- Node.js >=
|
|
35
|
+
- Node.js >= 20.0.0
|
|
36
|
+
- Required by `eventsource-parser@3.0.5`, which is required by
|
|
37
|
+
`@modelcontextprotocol/sdk`, which we used to implement permission forwarding
|
|
38
|
+
to mobile app
|
|
36
39
|
- Claude CLI installed & logged in (`claude` command available in PATH)
|
|
37
40
|
|
|
38
41
|
## License
|
package/bin/happy.mjs
CHANGED
|
@@ -1,2 +1,35 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execFileSync } from 'child_process';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { join, dirname } from 'path';
|
|
6
|
+
|
|
7
|
+
// Check if we're already running with the flags
|
|
8
|
+
const hasNoWarnings = process.execArgv.includes('--no-warnings');
|
|
9
|
+
const hasNoDeprecation = process.execArgv.includes('--no-deprecation');
|
|
10
|
+
|
|
11
|
+
if (!hasNoWarnings || !hasNoDeprecation) {
|
|
12
|
+
// Get path to the actual CLI entrypoint
|
|
13
|
+
const projectRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
14
|
+
const entrypoint = join(projectRoot, 'dist', 'index.mjs');
|
|
15
|
+
|
|
16
|
+
// Execute the actual CLI directly with the correct flags
|
|
17
|
+
try {
|
|
18
|
+
execFileSync(process.execPath, [
|
|
19
|
+
'--no-warnings',
|
|
20
|
+
'--no-deprecation',
|
|
21
|
+
entrypoint,
|
|
22
|
+
...process.argv.slice(2)
|
|
23
|
+
], {
|
|
24
|
+
stdio: 'inherit',
|
|
25
|
+
env: process.env
|
|
26
|
+
});
|
|
27
|
+
} catch (error) {
|
|
28
|
+
// execFileSync throws if the process exits with non-zero
|
|
29
|
+
process.exit(error.status || 1);
|
|
30
|
+
}
|
|
31
|
+
} else {
|
|
32
|
+
// We're running Node with the flags we wanted, import the CLI entrypoint
|
|
33
|
+
// module to avoid creating a new process.
|
|
34
|
+
import("../dist/index.mjs");
|
|
35
|
+
}
|