Dependency acquisition during packaging left native wheels and packager inputs outside the pre-build cache save. Compose PM and existing providers into a preparation phase, then require builds to consume admitted inputs. Share native preparation with PM Bundle. Keep path-bound environments and signing outputs separate from reusable caches. Use read-only cache tokens for commit builds and preserve the one-command local build path. Verify pinned tools through PM, probe PTYs under the prepared Electron, and supply dmgbuild through a build-only PM package. Resolve bundled tool stores from their payload manifest so relocation preserves discovery. Validation: focused Python and JS tests, checkJs, Ruff, Windows checks, anti-slop, cache relocation, and network-denied Linux AppImage builds. Relocated runtime smoke passed with NixOS host libraries supplied. Native Windows/macOS signing and live GitHub cache behavior remain untested.
9 lines
290 B
JavaScript
9 lines
290 B
JavaScript
|
|
import { pathToFileURL } from 'node:url';
|
|
|
|
// returns true if the passsed file is being invoked from node,
|
|
// not imported.
|
|
/** @param {string} importMetaUrl @returns {boolean} */
|
|
export function isMain(importMetaUrl) {
|
|
return importMetaUrl === pathToFileURL(process.argv[1]).href;
|
|
} |