blun-king-cli 9.1.625 → 9.1.626
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/core-bootstrap.js +15 -0
- package/bin/launcher-runtime.js +3 -1
- package/blun.mjs +2 -2
- package/package.json +1 -1
- package/worker-host.mjs +2 -2
package/bin/core-bootstrap.js
CHANGED
|
@@ -11,7 +11,18 @@ const { isStandaloneHelpRequest } = require('./launcher-mode');
|
|
|
11
11
|
|
|
12
12
|
const CORE_LOADED_MESSAGE = 'blun-core-bootstrap-loaded';
|
|
13
13
|
|
|
14
|
+
function bindInteractiveTerminalOwner() {
|
|
15
|
+
if (process.platform !== 'win32' || process.env.BLUN_TERMINAL_OWNER !== '1' || !process.channel) return;
|
|
16
|
+
const stop = () => {
|
|
17
|
+
setTimeout(() => process.exit(143), 5000).unref();
|
|
18
|
+
if (!process.emit('SIGTERM')) process.exit(143);
|
|
19
|
+
};
|
|
20
|
+
process.once('disconnect', stop);
|
|
21
|
+
if (!process.connected) stop();
|
|
22
|
+
}
|
|
23
|
+
|
|
14
24
|
async function runCoreBootstrap() {
|
|
25
|
+
bindInteractiveTerminalOwner();
|
|
15
26
|
const informational = isStandaloneHelpRequest(process.argv.slice(2));
|
|
16
27
|
let diagnostics;
|
|
17
28
|
if (!informational) {
|
|
@@ -57,6 +68,10 @@ async function runCoreBootstrap() {
|
|
|
57
68
|
if (process.connected) {
|
|
58
69
|
try {
|
|
59
70
|
process.send({ type: CORE_LOADED_MESSAGE }, () => {
|
|
71
|
+
if (process.env.BLUN_TERMINAL_OWNER === '1') {
|
|
72
|
+
process.channel?.unref();
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
60
75
|
try {
|
|
61
76
|
process.disconnect();
|
|
62
77
|
} catch {}
|
package/bin/launcher-runtime.js
CHANGED
|
@@ -102,13 +102,14 @@ function shouldDetachProtectedCore(options = {}) {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
function spawnProtectedCore(args, env, cwd) {
|
|
105
|
+
const terminalOwner = process.platform === 'win32' && process.stdin.isTTY === true;
|
|
105
106
|
const child = spawn(
|
|
106
107
|
process.execPath,
|
|
107
108
|
[path.join(PKG, 'bin', 'core-bootstrap.js'), ...args],
|
|
108
109
|
{
|
|
109
110
|
cwd,
|
|
110
111
|
detached: shouldDetachProtectedCore(),
|
|
111
|
-
env,
|
|
112
|
+
env: { ...env, BLUN_TERMINAL_OWNER: terminalOwner ? '1' : '0' },
|
|
112
113
|
stdio: ['inherit', 'inherit', 'inherit', 'ipc'],
|
|
113
114
|
windowsHide: true,
|
|
114
115
|
},
|
|
@@ -146,6 +147,7 @@ function spawnProtectedCore(args, env, cwd) {
|
|
|
146
147
|
child.on('message', (message) => {
|
|
147
148
|
if (message?.type !== CORE_LOADED_MESSAGE) return;
|
|
148
149
|
settleLoaded(true);
|
|
150
|
+
if (terminalOwner) return;
|
|
149
151
|
try {
|
|
150
152
|
child.disconnect();
|
|
151
153
|
} catch {}
|
package/blun.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// BLUN_BUILD_INPUT_SHA256:
|
|
2
|
+
// BLUN_BUILD_INPUT_SHA256:ba03d6f3f94b25bf0e055d42c7eccdf13844254f2853b94b73d07b1d599c5c98
|
|
3
3
|
/*! wasm-webp 0.1.0
|
|
4
4
|
MIT License
|
|
5
5
|
|
|
@@ -368248,7 +368248,7 @@ function optionalBuildString(value) {
|
|
|
368248
368248
|
var BLUN_BUILD_INFO;
|
|
368249
368249
|
var init_build_info = __esmMin((() => {
|
|
368250
368250
|
BLUN_BUILD_INFO = {
|
|
368251
|
-
version: optionalBuildString("9.1.
|
|
368251
|
+
version: optionalBuildString("9.1.626"),
|
|
368252
368252
|
channel: typeof __BLUN_CHANNEL__ === "string" ? optionalBuildString(__BLUN_CHANNEL__) : void 0,
|
|
368253
368253
|
commit: typeof __BLUN_COMMIT__ === "string" ? optionalBuildString(__BLUN_COMMIT__) : void 0,
|
|
368254
368254
|
buildTarget: typeof __BLUN_BUILD_TARGET__ === "string" ? optionalBuildString(__BLUN_BUILD_TARGET__) : void 0
|
package/package.json
CHANGED
package/worker-host.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// BLUN_BUILD_INPUT_SHA256:
|
|
2
|
+
// BLUN_BUILD_INPUT_SHA256:ba03d6f3f94b25bf0e055d42c7eccdf13844254f2853b94b73d07b1d599c5c98
|
|
3
3
|
/*! wasm-webp 0.1.0
|
|
4
4
|
MIT License
|
|
5
5
|
|
|
@@ -350041,7 +350041,7 @@ function optionalBuildString(value) {
|
|
|
350041
350041
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
350042
350042
|
}
|
|
350043
350043
|
const BLUN_BUILD_INFO = {
|
|
350044
|
-
version: optionalBuildString("9.1.
|
|
350044
|
+
version: optionalBuildString("9.1.626"),
|
|
350045
350045
|
channel: typeof __BLUN_CHANNEL__ === "string" ? optionalBuildString(__BLUN_CHANNEL__) : void 0,
|
|
350046
350046
|
commit: typeof __BLUN_COMMIT__ === "string" ? optionalBuildString(__BLUN_COMMIT__) : void 0,
|
|
350047
350047
|
buildTarget: typeof __BLUN_BUILD_TARGET__ === "string" ? optionalBuildString(__BLUN_BUILD_TARGET__) : void 0
|