nstantpage-agent 0.5.22 → 0.5.23

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.
@@ -20,8 +20,11 @@ import fs from 'fs';
20
20
  import path from 'path';
21
21
  import os from 'os';
22
22
  import { execSync } from 'child_process';
23
+ import { fileURLToPath } from 'url';
23
24
  import { getConfig } from '../config.js';
24
25
  import { startCommand } from './start.js';
26
+ const __filename_esm = fileURLToPath(import.meta.url);
27
+ const __dirname_esm = path.dirname(__filename_esm);
25
28
  const PLIST_LABEL = 'com.nstantpage.agent';
26
29
  const SYSTEMD_SERVICE = 'nstantpage-agent';
27
30
  const WIN_TASK_NAME = 'NstantpageAgent';
@@ -234,8 +237,8 @@ function findElectronApp() {
234
237
  '/Applications/nstantpage.app',
235
238
  path.join(os.homedir(), 'Applications', 'nstantpage.app'),
236
239
  // Dev build location (from electron-builder --dir)
237
- path.join(__dirname, '..', '..', 'tray', 'dist', 'mac-arm64', 'nstantpage.app'),
238
- path.join(__dirname, '..', '..', 'tray', 'dist', 'mac', 'nstantpage.app'),
240
+ path.join(__dirname_esm, '..', '..', 'tray', 'dist', 'mac-arm64', 'nstantpage.app'),
241
+ path.join(__dirname_esm, '..', '..', 'tray', 'dist', 'mac', 'nstantpage.app'),
239
242
  ];
240
243
  for (const p of candidates) {
241
244
  if (fs.existsSync(p))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nstantpage-agent",
3
- "version": "0.5.22",
3
+ "version": "0.5.23",
4
4
  "description": "Local development agent for nstantpage.com — run your projects locally, preview in the cloud. Replaces cloud containers for faster builds.",
5
5
  "type": "module",
6
6
  "bin": {