@zzp123/hapi 0.15.12 → 0.15.13

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 (3) hide show
  1. package/bin/hapi.cjs +42 -48
  2. package/package.json +15 -27
  3. package/NOTICE +0 -52
package/bin/hapi.cjs CHANGED
@@ -1,48 +1,42 @@
1
- #!/usr/bin/env node
2
-
3
- const { execFileSync } = require('child_process');
4
- const path = require('path');
5
-
6
- const platform = process.platform;
7
- const arch = process.arch;
8
- const pkgName = `@zzp123/hapi-${platform}-${arch}`;
9
-
10
- function getBinaryPath() {
11
- try {
12
- // Try to find the platform-specific package
13
- const pkgPath = require.resolve(`${pkgName}/package.json`);
14
- const binName = platform === 'win32' ? 'hapi.exe' : 'hapi';
15
- return path.join(path.dirname(pkgPath), 'bin', binName);
16
- } catch (e) {
17
- return null;
18
- }
19
- }
20
-
21
- const binPath = getBinaryPath();
22
-
23
- if (!binPath) {
24
- console.error(`Unsupported platform: ${platform}-${arch}`);
25
- console.error('');
26
- console.error('Supported platforms:');
27
- console.error(' - darwin-arm64 (macOS Apple Silicon)');
28
- console.error(' - darwin-x64 (macOS Intel)');
29
- console.error(' - linux-arm64');
30
- console.error(' - linux-x64');
31
- console.error(' - win32-x64');
32
- console.error('');
33
- console.error('You can download the binary manually from:');
34
- console.error(' https://github.com/tiann/hapi/releases');
35
- process.exit(1);
36
- }
37
-
38
- try {
39
- execFileSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
40
- } catch (e) {
41
- // If the binary execution fails, exit with the same code
42
- if (e.status !== undefined) {
43
- process.exit(e.status);
44
- }
45
- // For other errors (e.g., binary not found), print and exit
46
- console.error(`Failed to execute ${binPath}:`, e.message);
47
- process.exit(1);
48
- }
1
+ #!/usr/bin/env node
2
+
3
+ const { execFileSync } = require('child_process');
4
+ const path = require('path');
5
+
6
+ const platform = process.platform;
7
+ const arch = process.arch;
8
+ const pkgName = `@zzp123/hapi-${platform}-${arch}`;
9
+
10
+ function getBinaryPath() {
11
+ try {
12
+ const pkgPath = require.resolve(`${pkgName}/package.json`);
13
+ const binName = platform === 'win32' ? 'hapi.exe' : 'hapi';
14
+ return path.join(path.dirname(pkgPath), 'bin', binName);
15
+ } catch (e) {
16
+ return null;
17
+ }
18
+ }
19
+
20
+ const binPath = getBinaryPath();
21
+
22
+ if (!binPath) {
23
+ console.error(`Unsupported platform: ${platform}-${arch}`);
24
+ console.error('');
25
+ console.error('Supported platforms:');
26
+ console.error(' - win32-x64 (Windows)');
27
+ console.error(' - linux-x64 (Linux)');
28
+ console.error('');
29
+ console.error('Install the platform-specific package manually:');
30
+ console.error(` npm install @zzp123/hapi-${platform}-${arch}`);
31
+ process.exit(1);
32
+ }
33
+
34
+ try {
35
+ execFileSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
36
+ } catch (e) {
37
+ if (e.status !== undefined) {
38
+ process.exit(e.status);
39
+ }
40
+ console.error(`Failed to execute ${binPath}:`, e.message);
41
+ process.exit(1);
42
+ }
package/package.json CHANGED
@@ -1,29 +1,17 @@
1
1
  {
2
- "name": "@zzp123/hapi",
3
- "version": "0.15.12",
4
- "description": "App for agentic coding - access coding agent anywhere",
5
- "author": "Kirill Dubovitskiy & weishu",
6
- "license": "AGPL-3.0-only",
7
- "type": "module",
8
- "homepage": "https://github.com/tiann/hapi",
9
- "bugs": "https://github.com/tiann/hapi/issues",
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/tiann/hapi.git",
13
- "directory": "cli"
14
- },
15
- "bin": {
16
- "hapi": "bin/hapi.cjs"
17
- },
18
- "files": [
19
- "bin/hapi.cjs",
20
- "NOTICE"
21
- ],
22
- "optionalDependencies": {
23
- "@zzp123/hapi-darwin-arm64": "0.15.12",
24
- "@zzp123/hapi-darwin-x64": "0.15.12",
25
- "@zzp123/hapi-linux-arm64": "0.15.12",
26
- "@zzp123/hapi-linux-x64": "0.15.12",
27
- "@zzp123/hapi-win32-x64": "0.15.12"
28
- }
2
+ "name": "@zzp123/hapi",
3
+ "version": "0.15.13",
4
+ "description": "HAPI - App for agentic coding with Claude Code CLI support",
5
+ "author": "zzp123",
6
+ "license": "AGPL-3.0-only",
7
+ "bin": {
8
+ "hapi": "bin/hapi.cjs"
9
+ },
10
+ "files": [
11
+ "bin/hapi.cjs"
12
+ ],
13
+ "optionalDependencies": {
14
+ "@zzp123/hapi-linux-x64": "0.15.13",
15
+ "@zzp123/hapi-win32-x64": "0.15.13"
16
+ }
29
17
  }
package/NOTICE DELETED
@@ -1,52 +0,0 @@
1
- hapi CLI
2
- Copyright (c) 2024-2025 weishu
3
-
4
- This software contains code derived from happy-cli
5
- (https://github.com/slopus/happy-cli), which is licensed
6
- under the MIT License:
7
-
8
- ---
9
-
10
- MIT License
11
-
12
- Copyright (c) 2024 Kirill Dubovitskiy
13
-
14
- Permission is hereby granted, free of charge, to any person obtaining a copy
15
- of this software and associated documentation files (the "Software"), to deal
16
- in the Software without restriction, including without limitation the rights
17
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
- copies of the Software, and to permit persons to whom the Software is
19
- furnished to do so, subject to the following conditions:
20
-
21
- The above copyright notice and this permission notice shall be included in all
22
- copies or substantial portions of the Software.
23
-
24
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
- SOFTWARE.
31
-
32
- ---
33
-
34
- The following files/directories are derived from happy-cli:
35
- - src/api/
36
- - src/claude/
37
- - src/codex/
38
- - src/runner/
39
- - src/commands/
40
- - src/ui/
41
- - src/utils/
42
- - src/modules/ripgrep/
43
- - src/modules/difftastic/
44
- - src/modules/watcher/
45
- - src/modules/common/registerCommonHandlers.ts
46
- - src/modules/common/pathSecurity.ts
47
- - src/parsers/
48
- - src/configuration.ts
49
- - src/persistence.ts
50
- - src/projectPath.ts
51
- - src/lib.ts
52
- - src/index.ts