hyperclaw 5.0.3 → 5.0.4

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.
@@ -1,53 +1,50 @@
1
- #!/usr/bin/env node
2
- // scripts/postinstall.js
3
- // Shown after `npm install -g hyperclaw` — guides user to onboard.
4
- // Kept dependency-free (plain Node.js) so it works before npm install completes.
5
- // Wrapped in try-catch so a failure here never breaks the install.
6
-
7
- 'use strict';
8
-
9
- try {
10
- // Skip in CI or when installed as a dependency (not globally)
11
- if (process.env.CI || process.env.npm_config_global !== 'true') {
12
- process.exit(0);
13
- }
14
-
15
- const cyan = (s) => `\x1b[36m${s}\x1b[0m`;
16
- const bold = (s) => `\x1b[1m${s}\x1b[0m`;
17
- const gray = (s) => `\x1b[90m${s}\x1b[0m`;
18
- const green = (s) => `\x1b[32m${s}\x1b[0m`;
19
-
20
- let version = '5.0.3';
21
- try {
22
- const path = require('path');
23
- const fs = require('fs');
24
- const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8'));
25
- version = pkg.version || version;
26
- } catch (_) {}
27
-
28
- const line = gray(''.repeat(56));
29
-
30
- console.log('');
31
- console.log(line);
32
- console.log('');
33
- console.log(` ${bold('\u26a1 HyperClaw')} ${cyan('v' + version)} ${gray('installed successfully')}`);
34
- console.log('');
35
- console.log(` Run the setup wizard to get started:`);
36
- console.log('');
37
- console.log(` ${cyan('hyperclaw onboard')}`);
38
- console.log('');
39
- console.log(` Or start with daemon auto-install:`);
40
- console.log('');
41
- console.log(` ${cyan('hyperclaw onboard --install-daemon')}`);
42
- console.log('');
43
- console.log(line);
44
- console.log('');
45
- console.log(` ${gray('Docs:')} https://github.com/mylo-2001/hyperclaw#readme`);
46
- console.log(` ${gray('GitHub:')} https://github.com/mylo-2001/hyperclaw`);
47
- console.log('');
48
- console.log(line);
49
- console.log('');
50
- } catch (_) {
51
- // Never fail the install due to postinstall script errors
52
- process.exit(0);
53
- }
1
+ 'use strict';
2
+
3
+ // scripts/postinstall.js
4
+ // Shown after `npm install -g hyperclaw` guides user to run onboard.
5
+ // No shebang needed called explicitly with: node scripts/postinstall.js
6
+ // Wrapped in try-catch so a failure here never breaks the install.
7
+
8
+ try {
9
+ // Skip in CI or when installed as a dependency (not globally)
10
+ if (process.env.CI || process.env.npm_config_global !== 'true') {
11
+ process.exit(0);
12
+ }
13
+
14
+ var cyan = function(s) { return '\x1b[36m' + s + '\x1b[0m'; };
15
+ var bold = function(s) { return '\x1b[1m' + s + '\x1b[0m'; };
16
+ var gray = function(s) { return '\x1b[90m' + s + '\x1b[0m'; };
17
+
18
+ var version = '5.0.4';
19
+ try {
20
+ var path = require('path');
21
+ var fs = require('fs');
22
+ var pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8'));
23
+ version = pkg.version || version;
24
+ } catch (_) {}
25
+
26
+ var line = gray('─'.repeat(56));
27
+
28
+ console.log('');
29
+ console.log(line);
30
+ console.log('');
31
+ console.log(' ' + bold('\u26a1 HyperClaw') + ' ' + cyan('v' + version) + ' ' + gray('installed successfully'));
32
+ console.log('');
33
+ console.log(' Run the setup wizard to get started:');
34
+ console.log('');
35
+ console.log(' ' + cyan('hyperclaw onboard'));
36
+ console.log('');
37
+ console.log(' Or start with daemon auto-install:');
38
+ console.log('');
39
+ console.log(' ' + cyan('hyperclaw onboard --install-daemon'));
40
+ console.log('');
41
+ console.log(line);
42
+ console.log('');
43
+ console.log(' ' + gray('Docs:') + ' https://github.com/mylo-2001/hyperclaw#readme');
44
+ console.log(' ' + gray('GitHub:') + ' https://github.com/mylo-2001/hyperclaw');
45
+ console.log('');
46
+ console.log(line);
47
+ console.log('');
48
+ } catch (_) {
49
+ process.exit(0);
50
+ }