@atom-js-org/runtime 0.3.0-alpha.0 → 0.4.0-alpha.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atom-js-org/runtime",
3
- "version": "0.3.0-alpha.0",
3
+ "version": "0.4.0-alpha.0",
4
4
  "description": "Electron-like desktop runtime powered by the operating system WebView.",
5
5
  "main": "src/index.cjs",
6
6
  "types": "index.d.ts",
@@ -116,9 +116,12 @@ class BrowserWindow extends EventEmitter {
116
116
  const configPath = path.join(os.tmpdir(), `atomjs-window-${process.pid}-${this.id}-${Date.now()}.json`);
117
117
  await fs.promises.writeFile(configPath, JSON.stringify(config), { mode: 0o600 });
118
118
 
119
- const hostPath = path.join(__dirname, 'runtime', 'window-host.mjs');
119
+ const hostPath = process.env.ATOM_WINDOW_HOST_ENTRY || path.join(__dirname, 'runtime', 'window-host.mjs');
120
120
  const nodeExecutable = process.env.ATOM_NODE_EXECUTABLE || process.execPath;
121
- this._child = spawn(nodeExecutable, [hostPath, configPath], {
121
+ const hostArgs = process.env.ATOM_EMBEDDED_RUNTIME === '1'
122
+ ? ['--atomjs-window-host', configPath]
123
+ : [hostPath, configPath];
124
+ this._child = spawn(nodeExecutable, hostArgs, {
122
125
  cwd: state.projectRoot,
123
126
  env: process.env,
124
127
  stdio: ['ignore', 'pipe', 'inherit']