Run daemon on packaged Bare runtime
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
import { access } from 'node:fs/promises';
|
||||
import { constants } from 'node:fs';
|
||||
import { execFile } from 'node:child_process';
|
||||
import { promisify } from 'node:util';
|
||||
import { spawn } from 'node:child_process';
|
||||
|
||||
const run = promisify(execFile);
|
||||
const run = (file, args) => new Promise((resolve, reject) => {
|
||||
const child = spawn(file, args, { stdio: ['ignore', 'pipe', 'pipe'] });
|
||||
let stdout = ''; let stderr = '';
|
||||
child.stdout?.on('data', (chunk) => { stdout += chunk; });
|
||||
child.stderr?.on('data', (chunk) => { stderr += chunk; });
|
||||
child.once('error', reject);
|
||||
child.once('close', (code) => code === 0 ? resolve({ stdout, stderr }) : reject(new Error(stderr || `${file} exited ${code}`)));
|
||||
});
|
||||
const checks = [
|
||||
['session', false, async () => process.env.XDG_SESSION_TYPE || 'unknown'],
|
||||
['portal', false, async () => { await access('/usr/share/dbus-1/services/org.freedesktop.portal.Desktop.service', constants.F_OK); return 'installed'; }],
|
||||
|
||||
+467
-1
@@ -2,5 +2,471 @@
|
||||
"name": "@jarvis-qvac/computer-use",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "session.js"
|
||||
"main": "session.js",
|
||||
"imports": {
|
||||
"assert": {
|
||||
"bare": "bare-assert",
|
||||
"default": "assert"
|
||||
},
|
||||
"node:assert": {
|
||||
"bare": "bare-assert",
|
||||
"default": "assert"
|
||||
},
|
||||
"assert/strict": {
|
||||
"bare": "bare-assert/strict",
|
||||
"default": "assert/strict"
|
||||
},
|
||||
"node:assert/strict": {
|
||||
"bare": "bare-assert/strict",
|
||||
"default": "assert/strict"
|
||||
},
|
||||
"async_hooks": {
|
||||
"bare": "bare-async-hooks",
|
||||
"default": "async_hooks"
|
||||
},
|
||||
"node:async_hooks": {
|
||||
"bare": "bare-async-hooks",
|
||||
"default": "async_hooks"
|
||||
},
|
||||
"buffer": {
|
||||
"bare": "bare-buffer",
|
||||
"default": "buffer"
|
||||
},
|
||||
"node:buffer": {
|
||||
"bare": "bare-buffer",
|
||||
"default": "buffer"
|
||||
},
|
||||
"child_process": {
|
||||
"bare": "bare-subprocess",
|
||||
"default": "child_process"
|
||||
},
|
||||
"node:child_process": {
|
||||
"bare": "bare-subprocess",
|
||||
"default": "child_process"
|
||||
},
|
||||
"cluster": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "cluster"
|
||||
},
|
||||
"node:cluster": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "cluster"
|
||||
},
|
||||
"console": {
|
||||
"bare": "bare-console",
|
||||
"default": "console"
|
||||
},
|
||||
"node:console": {
|
||||
"bare": "bare-console",
|
||||
"default": "console"
|
||||
},
|
||||
"constants": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "constants"
|
||||
},
|
||||
"node:constants": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "constants"
|
||||
},
|
||||
"crypto": {
|
||||
"bare": "bare-crypto",
|
||||
"default": "crypto"
|
||||
},
|
||||
"node:crypto": {
|
||||
"bare": "bare-crypto",
|
||||
"default": "crypto"
|
||||
},
|
||||
"dgram": {
|
||||
"bare": "bare-dgram",
|
||||
"default": "dgram"
|
||||
},
|
||||
"node:dgram": {
|
||||
"bare": "bare-dgram",
|
||||
"default": "dgram"
|
||||
},
|
||||
"diagnostics_channel": {
|
||||
"bare": "bare-diagnostics-channel",
|
||||
"default": "diagnostics_channel"
|
||||
},
|
||||
"node:diagnostics_channel": {
|
||||
"bare": "bare-diagnostics-channel",
|
||||
"default": "diagnostics_channel"
|
||||
},
|
||||
"dns": {
|
||||
"bare": "bare-dns",
|
||||
"default": "dns"
|
||||
},
|
||||
"node:dns": {
|
||||
"bare": "bare-dns",
|
||||
"default": "dns"
|
||||
},
|
||||
"dns/promises": {
|
||||
"bare": "bare-dns/promises",
|
||||
"default": "dns/promises"
|
||||
},
|
||||
"node:dns/promises": {
|
||||
"bare": "bare-dns/promises",
|
||||
"default": "dns/promises"
|
||||
},
|
||||
"domain": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "domain"
|
||||
},
|
||||
"node:domain": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "domain"
|
||||
},
|
||||
"events": {
|
||||
"bare": "bare-events",
|
||||
"default": "events"
|
||||
},
|
||||
"node:events": {
|
||||
"bare": "bare-events",
|
||||
"default": "events"
|
||||
},
|
||||
"fs": {
|
||||
"bare": "bare-fs",
|
||||
"default": "fs"
|
||||
},
|
||||
"node:fs": {
|
||||
"bare": "bare-fs",
|
||||
"default": "fs"
|
||||
},
|
||||
"fs/promises": {
|
||||
"bare": "bare-fs/promises",
|
||||
"default": "fs/promises"
|
||||
},
|
||||
"node:fs/promises": {
|
||||
"bare": "bare-fs/promises",
|
||||
"default": "fs/promises"
|
||||
},
|
||||
"http": {
|
||||
"bare": "bare-http1",
|
||||
"default": "http"
|
||||
},
|
||||
"node:http": {
|
||||
"bare": "bare-http1",
|
||||
"default": "http"
|
||||
},
|
||||
"http2": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "http2"
|
||||
},
|
||||
"node:http2": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "http2"
|
||||
},
|
||||
"https": {
|
||||
"bare": "bare-https",
|
||||
"default": "https"
|
||||
},
|
||||
"node:https": {
|
||||
"bare": "bare-https",
|
||||
"default": "https"
|
||||
},
|
||||
"inspector": {
|
||||
"bare": "bare-inspector",
|
||||
"default": "inspector"
|
||||
},
|
||||
"node:inspector": {
|
||||
"bare": "bare-inspector",
|
||||
"default": "inspector"
|
||||
},
|
||||
"inspector/promises": {
|
||||
"bare": "bare-inspector/promises",
|
||||
"default": "inspector/promises"
|
||||
},
|
||||
"node:inspector/promises": {
|
||||
"bare": "bare-inspector/promises",
|
||||
"default": "inspector/promises"
|
||||
},
|
||||
"module": {
|
||||
"bare": "bare-module",
|
||||
"default": "module"
|
||||
},
|
||||
"node:module": {
|
||||
"bare": "bare-module",
|
||||
"default": "module"
|
||||
},
|
||||
"net": {
|
||||
"bare": "bare-net",
|
||||
"default": "net"
|
||||
},
|
||||
"node:net": {
|
||||
"bare": "bare-net",
|
||||
"default": "net"
|
||||
},
|
||||
"os": {
|
||||
"bare": "bare-os",
|
||||
"default": "os"
|
||||
},
|
||||
"node:os": {
|
||||
"bare": "bare-os",
|
||||
"default": "os"
|
||||
},
|
||||
"path": {
|
||||
"bare": "bare-path",
|
||||
"default": "path"
|
||||
},
|
||||
"node:path": {
|
||||
"bare": "bare-path",
|
||||
"default": "path"
|
||||
},
|
||||
"path/posix": {
|
||||
"bare": "bare-path/posix",
|
||||
"default": "path/posix"
|
||||
},
|
||||
"node:path/posix": {
|
||||
"bare": "bare-path/posix",
|
||||
"default": "path/posix"
|
||||
},
|
||||
"path/win32": {
|
||||
"bare": "bare-path/win32",
|
||||
"default": "path/win32"
|
||||
},
|
||||
"node:path/win32": {
|
||||
"bare": "bare-path/win32",
|
||||
"default": "path/win32"
|
||||
},
|
||||
"perf_hooks": {
|
||||
"bare": "bare-performance",
|
||||
"default": "perf_hooks"
|
||||
},
|
||||
"node:perf_hooks": {
|
||||
"bare": "bare-performance",
|
||||
"default": "perf_hooks"
|
||||
},
|
||||
"process": {
|
||||
"bare": "bare-process",
|
||||
"default": "process"
|
||||
},
|
||||
"node:process": {
|
||||
"bare": "bare-process",
|
||||
"default": "process"
|
||||
},
|
||||
"punycode": {
|
||||
"bare": "bare-punycode",
|
||||
"default": "punycode"
|
||||
},
|
||||
"node:punycode": {
|
||||
"bare": "bare-punycode",
|
||||
"default": "punycode"
|
||||
},
|
||||
"querystring": {
|
||||
"bare": "bare-querystring",
|
||||
"default": "querystring"
|
||||
},
|
||||
"node:querystring": {
|
||||
"bare": "bare-querystring",
|
||||
"default": "querystring"
|
||||
},
|
||||
"readline": {
|
||||
"bare": "bare-readline",
|
||||
"default": "readline"
|
||||
},
|
||||
"node:readline": {
|
||||
"bare": "bare-readline",
|
||||
"default": "readline"
|
||||
},
|
||||
"readline/promises": {
|
||||
"bare": "bare-readline/promises",
|
||||
"default": "readline/promises"
|
||||
},
|
||||
"node:readline/promises": {
|
||||
"bare": "bare-readline/promises",
|
||||
"default": "readline/promises"
|
||||
},
|
||||
"repl": {
|
||||
"bare": "bare-repl",
|
||||
"default": "repl"
|
||||
},
|
||||
"node:repl": {
|
||||
"bare": "bare-repl",
|
||||
"default": "repl"
|
||||
},
|
||||
"sea": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "sea"
|
||||
},
|
||||
"node:sea": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "sea"
|
||||
},
|
||||
"sqlite": {
|
||||
"bare": "bare-sqlite",
|
||||
"default": "sqlite"
|
||||
},
|
||||
"node:sqlite": {
|
||||
"bare": "bare-sqlite",
|
||||
"default": "sqlite"
|
||||
},
|
||||
"stream": {
|
||||
"bare": "bare-stream",
|
||||
"default": "stream"
|
||||
},
|
||||
"node:stream": {
|
||||
"bare": "bare-stream",
|
||||
"default": "stream"
|
||||
},
|
||||
"stream/consumers": {
|
||||
"bare": "bare-stream/consumers",
|
||||
"default": "stream/consumers"
|
||||
},
|
||||
"node:stream/consumers": {
|
||||
"bare": "bare-stream/consumers",
|
||||
"default": "stream/consumers"
|
||||
},
|
||||
"stream/promises": {
|
||||
"bare": "bare-stream/promises",
|
||||
"default": "stream/promises"
|
||||
},
|
||||
"node:stream/promises": {
|
||||
"bare": "bare-stream/promises",
|
||||
"default": "stream/promises"
|
||||
},
|
||||
"stream/web": {
|
||||
"bare": "bare-stream/web",
|
||||
"default": "stream/web"
|
||||
},
|
||||
"node:stream/web": {
|
||||
"bare": "bare-stream/web",
|
||||
"default": "stream/web"
|
||||
},
|
||||
"string_decoder": {
|
||||
"bare": "bare-string-decoder",
|
||||
"default": "string_decoder"
|
||||
},
|
||||
"node:string_decoder": {
|
||||
"bare": "bare-string-decoder",
|
||||
"default": "string_decoder"
|
||||
},
|
||||
"sys": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "sys"
|
||||
},
|
||||
"node:sys": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "sys"
|
||||
},
|
||||
"test": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "test"
|
||||
},
|
||||
"node:test": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "test"
|
||||
},
|
||||
"test/reporters": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "test/reporters"
|
||||
},
|
||||
"node:test/reporters": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "test/reporters"
|
||||
},
|
||||
"timers": {
|
||||
"bare": "bare-timers",
|
||||
"default": "timers"
|
||||
},
|
||||
"node:timers": {
|
||||
"bare": "bare-timers",
|
||||
"default": "timers"
|
||||
},
|
||||
"timers/promises": {
|
||||
"bare": "bare-timers/promises",
|
||||
"default": "timers/promises"
|
||||
},
|
||||
"node:timers/promises": {
|
||||
"bare": "bare-timers/promises",
|
||||
"default": "timers/promises"
|
||||
},
|
||||
"tls": {
|
||||
"bare": "bare-tls",
|
||||
"default": "tls"
|
||||
},
|
||||
"node:tls": {
|
||||
"bare": "bare-tls",
|
||||
"default": "tls"
|
||||
},
|
||||
"trace_events": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "trace_events"
|
||||
},
|
||||
"node:trace_events": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "trace_events"
|
||||
},
|
||||
"tty": {
|
||||
"bare": "bare-tty",
|
||||
"default": "tty"
|
||||
},
|
||||
"node:tty": {
|
||||
"bare": "bare-tty",
|
||||
"default": "tty"
|
||||
},
|
||||
"url": {
|
||||
"bare": "bare-url",
|
||||
"default": "url"
|
||||
},
|
||||
"node:url": {
|
||||
"bare": "bare-url",
|
||||
"default": "url"
|
||||
},
|
||||
"util": {
|
||||
"bare": "bare-utils",
|
||||
"default": "util"
|
||||
},
|
||||
"node:util": {
|
||||
"bare": "bare-utils",
|
||||
"default": "util"
|
||||
},
|
||||
"util/types": {
|
||||
"bare": "bare-utils/types",
|
||||
"default": "util/types"
|
||||
},
|
||||
"node:util/types": {
|
||||
"bare": "bare-utils/types",
|
||||
"default": "util/types"
|
||||
},
|
||||
"v8": {
|
||||
"bare": "bare-v8",
|
||||
"default": "v8"
|
||||
},
|
||||
"node:v8": {
|
||||
"bare": "bare-v8",
|
||||
"default": "v8"
|
||||
},
|
||||
"vm": {
|
||||
"bare": "bare-vm",
|
||||
"default": "vm"
|
||||
},
|
||||
"node:vm": {
|
||||
"bare": "bare-vm",
|
||||
"default": "vm"
|
||||
},
|
||||
"wasi": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "wasi"
|
||||
},
|
||||
"node:wasi": {
|
||||
"bare": "bare-node-runtime/unsupported",
|
||||
"default": "wasi"
|
||||
},
|
||||
"worker_threads": {
|
||||
"bare": "bare-worker",
|
||||
"default": "worker_threads"
|
||||
},
|
||||
"node:worker_threads": {
|
||||
"bare": "bare-worker",
|
||||
"default": "worker_threads"
|
||||
},
|
||||
"zlib": {
|
||||
"bare": "bare-zlib",
|
||||
"default": "zlib"
|
||||
},
|
||||
"node:zlib": {
|
||||
"bare": "bare-zlib",
|
||||
"default": "zlib"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user