gsd-pi 0.1.6 → 0.1.7
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/package.json +1 -1
- package/scripts/postinstall.js +36 -1
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -1,10 +1,45 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { execSync } from 'child_process'
|
|
3
|
+
import { createRequire } from 'module'
|
|
3
4
|
import os from 'os'
|
|
5
|
+
import { fileURLToPath } from 'url'
|
|
6
|
+
import { dirname, resolve } from 'path'
|
|
4
7
|
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
9
|
+
const require = createRequire(import.meta.url)
|
|
10
|
+
const pkg = require(resolve(__dirname, '..', 'package.json'))
|
|
11
|
+
|
|
12
|
+
// Colors
|
|
13
|
+
const cyan = '\x1b[36m'
|
|
14
|
+
const green = '\x1b[32m'
|
|
15
|
+
const yellow = '\x1b[33m'
|
|
16
|
+
const dim = '\x1b[2m'
|
|
17
|
+
const reset = '\x1b[0m'
|
|
18
|
+
|
|
19
|
+
const banner =
|
|
20
|
+
'\n' +
|
|
21
|
+
cyan +
|
|
22
|
+
' ██████╗ ███████╗██████╗ \n' +
|
|
23
|
+
' ██╔════╝ ██╔════╝██╔══██╗\n' +
|
|
24
|
+
' ██║ ███╗███████╗██║ ██║\n' +
|
|
25
|
+
' ██║ ██║╚════██║██║ ██║\n' +
|
|
26
|
+
' ╚██████╔╝███████║██████╔╝\n' +
|
|
27
|
+
' ╚═════╝ ╚══════╝╚═════╝ ' +
|
|
28
|
+
reset + '\n' +
|
|
29
|
+
'\n' +
|
|
30
|
+
` Get Shit Done ${dim}v${pkg.version}${reset}\n` +
|
|
31
|
+
` A standalone coding agent that plans, executes, and ships.\n` +
|
|
32
|
+
'\n' +
|
|
33
|
+
` ${green}✓${reset} Installed successfully\n` +
|
|
34
|
+
` ${dim}Run ${reset}${cyan}gsd${reset}${dim} to get started.${reset}\n`
|
|
35
|
+
|
|
36
|
+
console.log(banner)
|
|
37
|
+
|
|
38
|
+
// Install Playwright chromium for browser tools (non-fatal)
|
|
5
39
|
const args = os.platform() === 'linux' ? '--with-deps' : ''
|
|
6
40
|
try {
|
|
7
41
|
execSync(`npx playwright install chromium ${args}`, { stdio: 'inherit' })
|
|
42
|
+
console.log(`\n ${green}✓${reset} Browser tools ready\n`)
|
|
8
43
|
} catch {
|
|
9
|
-
|
|
44
|
+
console.log(`\n ${yellow}⚠${reset} Browser tools unavailable — run ${cyan}npx playwright install chromium${reset} to enable\n`)
|
|
10
45
|
}
|