happy-coder 0.1.10 → 0.1.12

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 (50) hide show
  1. package/README.md +2 -0
  2. package/bin/happy +1 -0
  3. package/bin/happy.cmd +1 -0
  4. package/dist/index-B2GqfEZV.cjs +1564 -0
  5. package/dist/index-QItBXhux.mjs +1540 -0
  6. package/dist/index.cjs +585 -279
  7. package/dist/index.mjs +575 -269
  8. package/dist/install-B0DnBGS_.mjs +29 -0
  9. package/dist/install-B2r_gX72.cjs +109 -0
  10. package/dist/install-C809w0Cj.cjs +31 -0
  11. package/dist/install-DEPy62QN.mjs +97 -0
  12. package/dist/install-GZIzyuIE.cjs +99 -0
  13. package/dist/install-HKe7dyS4.mjs +107 -0
  14. package/dist/lib.cjs +1 -1
  15. package/dist/lib.d.cts +22 -3
  16. package/dist/lib.d.mts +22 -3
  17. package/dist/lib.mjs +1 -1
  18. package/dist/run-BmEaINbl.cjs +250 -0
  19. package/dist/run-DMbKhYfb.mjs +247 -0
  20. package/dist/run-FBXkmmN7.mjs +32 -0
  21. package/dist/run-q2To6b-c.cjs +34 -0
  22. package/dist/types-BRICSarm.mjs +870 -0
  23. package/dist/types-BTQRfIr3.cjs +892 -0
  24. package/dist/types-CEvzGLMI.cjs +882 -0
  25. package/dist/{types-DnQGY77F.mjs → types-D39L8JSd.mjs} +55 -23
  26. package/dist/types-DYBiuNUQ.cjs +883 -0
  27. package/dist/types-Df5dlWLV.mjs +871 -0
  28. package/dist/types-fXgEaaqP.mjs +861 -0
  29. package/dist/{types-B2JzqUiU.cjs → types-hotUTaWz.cjs} +53 -21
  30. package/dist/types-mykDX2xe.cjs +872 -0
  31. package/dist/types-tLWMaptR.mjs +879 -0
  32. package/dist/uninstall-BGgl5V8F.mjs +29 -0
  33. package/dist/uninstall-BWHglipH.mjs +40 -0
  34. package/dist/uninstall-C42CoSCI.cjs +53 -0
  35. package/dist/uninstall-CLkTtlMv.mjs +51 -0
  36. package/dist/uninstall-CdHMb6wi.cjs +31 -0
  37. package/dist/uninstall-FXyyAuGU.cjs +42 -0
  38. package/package.json +9 -3
  39. package/ripgrep/COPYING +3 -0
  40. package/ripgrep/arm64-darwin/rg +0 -0
  41. package/ripgrep/arm64-darwin/ripgrep.node +0 -0
  42. package/ripgrep/arm64-linux/rg +0 -0
  43. package/ripgrep/arm64-linux/ripgrep.node +0 -0
  44. package/ripgrep/x64-darwin/rg +0 -0
  45. package/ripgrep/x64-darwin/ripgrep.node +0 -0
  46. package/ripgrep/x64-linux/rg +0 -0
  47. package/ripgrep/x64-linux/ripgrep.node +0 -0
  48. package/ripgrep/x64-win32/rg.exe +0 -0
  49. package/ripgrep/x64-win32/ripgrep.node +0 -0
  50. package/scripts/ripgrep_launcher.cjs +57 -0
@@ -0,0 +1,29 @@
1
+ import { l as logger } from './types-BRICSarm.mjs';
2
+ import { uninstall as uninstall$1 } from './uninstall-BWHglipH.mjs';
3
+ import 'axios';
4
+ import 'chalk';
5
+ import 'fs';
6
+ import 'node:os';
7
+ import 'node:path';
8
+ import 'node:fs/promises';
9
+ import 'node:fs';
10
+ import 'node:events';
11
+ import 'socket.io-client';
12
+ import 'zod';
13
+ import 'node:crypto';
14
+ import 'tweetnacl';
15
+ import 'expo-server-sdk';
16
+ import 'child_process';
17
+
18
+ async function uninstall() {
19
+ if (process.platform !== "darwin") {
20
+ throw new Error("Daemon uninstallation is currently only supported on macOS");
21
+ }
22
+ if (process.getuid && process.getuid() !== 0) {
23
+ throw new Error("Daemon uninstallation requires sudo privileges. Please run with sudo.");
24
+ }
25
+ logger.info("Uninstalling Happy CLI daemon for macOS...");
26
+ await uninstall$1();
27
+ }
28
+
29
+ export { uninstall };
@@ -0,0 +1,40 @@
1
+ import { existsSync, unlinkSync } from 'fs';
2
+ import { execSync } from 'child_process';
3
+ import { l as logger } from './types-BRICSarm.mjs';
4
+ import 'axios';
5
+ import 'chalk';
6
+ import 'node:os';
7
+ import 'node:path';
8
+ import 'node:fs/promises';
9
+ import 'node:fs';
10
+ import 'node:events';
11
+ import 'socket.io-client';
12
+ import 'zod';
13
+ import 'node:crypto';
14
+ import 'tweetnacl';
15
+ import 'expo-server-sdk';
16
+
17
+ const PLIST_LABEL = "com.happy-cli.daemon";
18
+ const PLIST_FILE = `/Library/LaunchDaemons/${PLIST_LABEL}.plist`;
19
+ async function uninstall() {
20
+ try {
21
+ if (!existsSync(PLIST_FILE)) {
22
+ logger.info("Daemon plist not found. Nothing to uninstall.");
23
+ return;
24
+ }
25
+ try {
26
+ execSync(`launchctl unload ${PLIST_FILE}`, { stdio: "inherit" });
27
+ logger.info("Daemon stopped successfully");
28
+ } catch (error) {
29
+ logger.info("Failed to unload daemon (it might not be running)");
30
+ }
31
+ unlinkSync(PLIST_FILE);
32
+ logger.info(`Removed daemon plist from ${PLIST_FILE}`);
33
+ logger.info("Daemon uninstalled successfully");
34
+ } catch (error) {
35
+ logger.debug("Failed to uninstall daemon:", error);
36
+ throw error;
37
+ }
38
+ }
39
+
40
+ export { uninstall };
@@ -0,0 +1,53 @@
1
+ 'use strict';
2
+
3
+ var types = require('./types-mykDX2xe.cjs');
4
+ var fs = require('fs');
5
+ var child_process = require('child_process');
6
+ require('axios');
7
+ require('chalk');
8
+ require('node:os');
9
+ require('node:path');
10
+ require('node:fs/promises');
11
+ require('node:fs');
12
+ require('node:events');
13
+ require('socket.io-client');
14
+ require('zod');
15
+ require('node:crypto');
16
+ require('tweetnacl');
17
+ require('expo-server-sdk');
18
+
19
+ const PLIST_LABEL = "com.happy-cli.daemon";
20
+ const PLIST_FILE = `/Library/LaunchDaemons/${PLIST_LABEL}.plist`;
21
+ async function uninstall$1() {
22
+ try {
23
+ if (!fs.existsSync(PLIST_FILE)) {
24
+ types.logger.info("Daemon plist not found. Nothing to uninstall.");
25
+ return;
26
+ }
27
+ try {
28
+ child_process.execSync(`launchctl unload ${PLIST_FILE}`, { stdio: "inherit" });
29
+ types.logger.info("Daemon stopped successfully");
30
+ } catch (error) {
31
+ types.logger.info("Failed to unload daemon (it might not be running)");
32
+ }
33
+ fs.unlinkSync(PLIST_FILE);
34
+ types.logger.info(`Removed daemon plist from ${PLIST_FILE}`);
35
+ types.logger.info("Daemon uninstalled successfully");
36
+ } catch (error) {
37
+ types.logger.debug("Failed to uninstall daemon:", error);
38
+ throw error;
39
+ }
40
+ }
41
+
42
+ async function uninstall() {
43
+ if (process.platform !== "darwin") {
44
+ throw new Error("Daemon uninstallation is currently only supported on macOS");
45
+ }
46
+ if (process.getuid && process.getuid() !== 0) {
47
+ throw new Error("Daemon uninstallation requires sudo privileges. Please run with sudo.");
48
+ }
49
+ types.logger.info("Uninstalling Happy CLI daemon for macOS...");
50
+ await uninstall$1();
51
+ }
52
+
53
+ exports.uninstall = uninstall;
@@ -0,0 +1,51 @@
1
+ import { l as logger } from './types-fXgEaaqP.mjs';
2
+ import { existsSync, unlinkSync } from 'fs';
3
+ import { execSync } from 'child_process';
4
+ import 'axios';
5
+ import 'chalk';
6
+ import 'node:os';
7
+ import 'node:path';
8
+ import 'node:fs/promises';
9
+ import 'node:fs';
10
+ import 'node:events';
11
+ import 'socket.io-client';
12
+ import 'zod';
13
+ import 'node:crypto';
14
+ import 'tweetnacl';
15
+ import 'expo-server-sdk';
16
+
17
+ const PLIST_LABEL = "com.happy-cli.daemon";
18
+ const PLIST_FILE = `/Library/LaunchDaemons/${PLIST_LABEL}.plist`;
19
+ async function uninstall$1() {
20
+ try {
21
+ if (!existsSync(PLIST_FILE)) {
22
+ logger.info("Daemon plist not found. Nothing to uninstall.");
23
+ return;
24
+ }
25
+ try {
26
+ execSync(`launchctl unload ${PLIST_FILE}`, { stdio: "inherit" });
27
+ logger.info("Daemon stopped successfully");
28
+ } catch (error) {
29
+ logger.info("Failed to unload daemon (it might not be running)");
30
+ }
31
+ unlinkSync(PLIST_FILE);
32
+ logger.info(`Removed daemon plist from ${PLIST_FILE}`);
33
+ logger.info("Daemon uninstalled successfully");
34
+ } catch (error) {
35
+ logger.debug("Failed to uninstall daemon:", error);
36
+ throw error;
37
+ }
38
+ }
39
+
40
+ async function uninstall() {
41
+ if (process.platform !== "darwin") {
42
+ throw new Error("Daemon uninstallation is currently only supported on macOS");
43
+ }
44
+ if (process.getuid && process.getuid() !== 0) {
45
+ throw new Error("Daemon uninstallation requires sudo privileges. Please run with sudo.");
46
+ }
47
+ logger.info("Uninstalling Happy CLI daemon for macOS...");
48
+ await uninstall$1();
49
+ }
50
+
51
+ export { uninstall };
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ var types = require('./types-DYBiuNUQ.cjs');
4
+ var uninstall$1 = require('./uninstall-FXyyAuGU.cjs');
5
+ require('axios');
6
+ require('chalk');
7
+ require('fs');
8
+ require('node:os');
9
+ require('node:path');
10
+ require('node:fs/promises');
11
+ require('node:fs');
12
+ require('node:events');
13
+ require('socket.io-client');
14
+ require('zod');
15
+ require('node:crypto');
16
+ require('tweetnacl');
17
+ require('expo-server-sdk');
18
+ require('child_process');
19
+
20
+ async function uninstall() {
21
+ if (process.platform !== "darwin") {
22
+ throw new Error("Daemon uninstallation is currently only supported on macOS");
23
+ }
24
+ if (process.getuid && process.getuid() !== 0) {
25
+ throw new Error("Daemon uninstallation requires sudo privileges. Please run with sudo.");
26
+ }
27
+ types.logger.info("Uninstalling Happy CLI daemon for macOS...");
28
+ await uninstall$1.uninstall();
29
+ }
30
+
31
+ exports.uninstall = uninstall;
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ var fs = require('fs');
4
+ var child_process = require('child_process');
5
+ var types = require('./types-DYBiuNUQ.cjs');
6
+ require('axios');
7
+ require('chalk');
8
+ require('node:os');
9
+ require('node:path');
10
+ require('node:fs/promises');
11
+ require('node:fs');
12
+ require('node:events');
13
+ require('socket.io-client');
14
+ require('zod');
15
+ require('node:crypto');
16
+ require('tweetnacl');
17
+ require('expo-server-sdk');
18
+
19
+ const PLIST_LABEL = "com.happy-cli.daemon";
20
+ const PLIST_FILE = `/Library/LaunchDaemons/${PLIST_LABEL}.plist`;
21
+ async function uninstall() {
22
+ try {
23
+ if (!fs.existsSync(PLIST_FILE)) {
24
+ types.logger.info("Daemon plist not found. Nothing to uninstall.");
25
+ return;
26
+ }
27
+ try {
28
+ child_process.execSync(`launchctl unload ${PLIST_FILE}`, { stdio: "inherit" });
29
+ types.logger.info("Daemon stopped successfully");
30
+ } catch (error) {
31
+ types.logger.info("Failed to unload daemon (it might not be running)");
32
+ }
33
+ fs.unlinkSync(PLIST_FILE);
34
+ types.logger.info(`Removed daemon plist from ${PLIST_FILE}`);
35
+ types.logger.info("Daemon uninstalled successfully");
36
+ } catch (error) {
37
+ types.logger.debug("Failed to uninstall daemon:", error);
38
+ throw error;
39
+ }
40
+ }
41
+
42
+ exports.uninstall = uninstall;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "happy-coder",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "Claude Code session sharing CLI",
5
5
  "author": "Kirill Dubovitskiy",
6
6
  "license": "MIT",
@@ -40,6 +40,7 @@
40
40
  "dist",
41
41
  "bin",
42
42
  "scripts",
43
+ "ripgrep",
43
44
  "package.json"
44
45
  ],
45
46
  "scripts": {
@@ -51,14 +52,16 @@
51
52
  "dev:local-server": "HANDY_SERVER_URL=http://localhost:3005 npx tsx --env-file .env.sample src/index.ts"
52
53
  },
53
54
  "dependencies": {
54
- "@anthropic-ai/claude-code": "^1.0.51",
55
+ "@anthropic-ai/claude-code": "^1.0.68",
55
56
  "@anthropic-ai/sdk": "^0.56.0",
56
57
  "@modelcontextprotocol/sdk": "^1.15.1",
57
58
  "@stablelib/base64": "^2.0.1",
59
+ "@types/http-proxy": "^1.17.16",
58
60
  "@types/qrcode-terminal": "^0.12.2",
59
61
  "axios": "^1.10.0",
60
62
  "chalk": "^5.4.1",
61
63
  "expo-server-sdk": "^3.15.0",
64
+ "http-proxy": "^1.18.1",
62
65
  "http-proxy-middleware": "^3.0.5",
63
66
  "qrcode-terminal": "^0.12.0",
64
67
  "socket.io-client": "^4.8.1",
@@ -67,7 +70,7 @@
67
70
  },
68
71
  "devDependencies": {
69
72
  "@eslint/compat": "^1",
70
- "@types/node": "^18",
73
+ "@types/node": ">=18",
71
74
  "eslint": "^9",
72
75
  "eslint-config-prettier": "^10",
73
76
  "pkgroll": "^2.14.2",
@@ -76,5 +79,8 @@
76
79
  "tsx": "^4.20.3",
77
80
  "typescript": "^5",
78
81
  "vitest": "^3.2.4"
82
+ },
83
+ "overrides": {
84
+ "whatwg-url": "14.2.0"
79
85
  }
80
86
  }
@@ -0,0 +1,3 @@
1
+ This project is dual-licensed under the Unlicense and MIT licenses.
2
+
3
+ You may use this code under the terms of either license.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Ripgrep runner - executed as a subprocess to run the native module
5
+ * This file is intentionally written in CommonJS to avoid ESM complexities
6
+ */
7
+
8
+ const path = require('path');
9
+ const os = require('os');
10
+
11
+ // Determine platform-specific path
12
+ function getPlatformDir() {
13
+ const platform = os.platform();
14
+ const arch = os.arch();
15
+ const platformKey = `${arch}-${platform}`;
16
+
17
+ const platformMap = {
18
+ 'arm64-darwin': 'arm64-darwin',
19
+ 'x64-darwin': 'x64-darwin',
20
+ 'arm64-linux': 'arm64-linux',
21
+ 'x64-linux': 'x64-linux',
22
+ 'x64-win32': 'x64-win32'
23
+ };
24
+
25
+ return platformMap[platformKey];
26
+ }
27
+
28
+ // Load the native module
29
+ const platformDir = getPlatformDir();
30
+ if (!platformDir) {
31
+ console.error(`Unsupported platform: ${os.arch()}-${os.platform()}`);
32
+ process.exit(1);
33
+ }
34
+
35
+ const modulePath = path.join(__dirname, '..', 'ripgrep', platformDir, 'ripgrep.node');
36
+ const ripgrepNative = require(modulePath);
37
+
38
+ // Get arguments from command line (skip node and script name)
39
+ const args = process.argv.slice(2);
40
+
41
+ // Parse the JSON-encoded arguments
42
+ let parsedArgs;
43
+ try {
44
+ parsedArgs = JSON.parse(args[0]);
45
+ } catch (error) {
46
+ console.error('Failed to parse arguments:', error.message);
47
+ process.exit(1);
48
+ }
49
+
50
+ // Run ripgrep
51
+ try {
52
+ const exitCode = ripgrepNative.ripgrepMain(parsedArgs);
53
+ process.exit(exitCode);
54
+ } catch (error) {
55
+ console.error('Ripgrep error:', error.message);
56
+ process.exit(1);
57
+ }