gildforge 0.5.3 → 0.6.0
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/bin/gild-server.js +1 -1
- package/bin/gild.js +6 -3
- package/package.json +5 -4
package/bin/gild-server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// Picks the platform binary installed via optionalDependencies and execs it.
|
|
3
|
-
import { spawnSync } from 'node:child_process'
|
|
3
|
+
import { spawn, spawnSync } from 'node:child_process'
|
|
4
4
|
import { existsSync } from 'node:fs'
|
|
5
5
|
import { createRequire } from 'node:module'
|
|
6
6
|
import { dirname, join } from 'node:path'
|
package/bin/gild.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// Picks the platform binary installed via optionalDependencies and execs it.
|
|
3
|
-
import { spawnSync } from 'node:child_process'
|
|
3
|
+
import { spawn, spawnSync } from 'node:child_process'
|
|
4
4
|
import { existsSync } from 'node:fs'
|
|
5
5
|
import { createRequire } from 'node:module'
|
|
6
6
|
import { dirname, join } from 'node:path'
|
|
@@ -10,5 +10,8 @@ let binPath
|
|
|
10
10
|
try { binPath = join(dirname(require.resolve(pkg + '/package.json')), 'bin', 'gild') }
|
|
11
11
|
catch { console.error(`gild: no build for ${process.platform}-${process.arch} (tried ${pkg})`); process.exit(1) }
|
|
12
12
|
if (!existsSync(binPath)) { console.error(`gild: ${pkg} is installed but has no binary yet — it ships with the next server release.`); process.exit(1) }
|
|
13
|
-
const
|
|
14
|
-
process.
|
|
13
|
+
const child = spawn(binPath, process.argv.slice(2), { stdio: ['inherit', 'inherit', 'inherit', 'ipc'] })
|
|
14
|
+
for (const signal of ['SIGTERM', 'SIGHUP', 'SIGWINCH']) process.on(signal, () => child.kill(signal))
|
|
15
|
+
process.on('SIGINT', () => {})
|
|
16
|
+
child.on('error', (error) => { console.error(error.message); process.exit(1) })
|
|
17
|
+
child.on('exit', (code, signal) => process.exit(code ?? ({ SIGINT: 130, SIGTERM: 143, SIGHUP: 129 }[signal] ?? 1)))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gildforge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "gildforge — key-first identity for the gild forge (installs gild and gild-server)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -19,9 +19,10 @@
|
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
21
|
"optionalDependencies": {
|
|
22
|
-
"
|
|
23
|
-
"@gildforge/cli-darwin-
|
|
24
|
-
"@gildforge/cli-
|
|
22
|
+
"node-pty": "^1.1.0",
|
|
23
|
+
"@gildforge/cli-darwin-arm64": "0.6.0",
|
|
24
|
+
"@gildforge/cli-darwin-x64": "0.6.0",
|
|
25
|
+
"@gildforge/cli-linux-x64": "0.6.0",
|
|
25
26
|
"@gildforge/server-darwin-arm64": "*",
|
|
26
27
|
"@gildforge/server-darwin-x64": "*",
|
|
27
28
|
"@gildforge/server-linux-x64": "*"
|