konstantin-paulus 46cef22b26 Enhance Windows support and update dependencies
- Added support for Squirrel.Windows in the desktop app, including configuration for the installer and metadata.
- Updated package-lock.json to include the latest version of @electron-forge/maker-squirrel and other dependencies.
- Modified build scripts to improve compatibility and streamline installation processes.
- Documented the current status of Windows implementation in WINDOWS.md, outlining next steps for CI integration.
2026-09-16 10:53:54 +02:00

24 lines
826 B
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Runs npm from a script, on every platform. On Windows `npm` is a `.cmd`
// shim, which `execFileSync` cannot start without a shell; on POSIX it is a
// plain executable and a shell would only get in the way of the arguments.
import { execFileSync } from "node:child_process";
const WINDOWS = process.platform === "win32";
/**
* `npm <args>`, blocking, with output inherited. `options` are passed to
* `execFileSync` (`cwd`, `env`, `stdio`).
*/
export function npm(args, options = {}) {
return execFileSync(WINDOWS ? "npm.cmd" : "npm", args, {
stdio: "inherit",
...options,
shell: WINDOWS,
});
}