Run daemon on packaged Bare runtime
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import os from 'node:os';
|
||||
import { EventEmitter } from 'node:events';
|
||||
|
||||
if (!globalThis.Bare) throw new Error('Bare runtime was not detected');
|
||||
if (typeof fs.readFileSync !== 'function') throw new Error('bare-fs mapping is missing');
|
||||
if (path.join('jarvis', 'qvac') !== 'jarvis/qvac') throw new Error('bare-path mapping is missing');
|
||||
if (typeof os.tmpdir !== 'function') throw new Error('bare-os mapping is missing');
|
||||
if (typeof EventEmitter !== 'function') throw new Error('bare-events mapping is missing');
|
||||
console.log(JSON.stringify({ runtime: 'bare', version: Bare.version, tmpdir: os.tmpdir() }));
|
||||
Reference in New Issue
Block a user