@mearl/daemon-core 2.22.4 → 2.23.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/dist/command.d.ts CHANGED
@@ -28,6 +28,8 @@ export declare function versionManagerExecutableCandidates(home: string, names:
28
28
  export declare function resolveSpawnCommand(executable: string, args: string[], platform?: NodeJS.Platform, commandInterpreter?: string | undefined): SpawnCommand;
29
29
  export declare function prependCommandPath(command: string, env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
30
30
  export declare function prependNodePath(env?: NodeJS.ProcessEnv, nodeExecutable?: string): NodeJS.ProcessEnv;
31
+ /** npm exec's package selector belongs to its invocation, not nested package runners. */
32
+ export declare function npmExecEnvironment(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
31
33
  export declare function prependPathDirectory(directory: string, env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
32
34
  export declare function findExecutable(name: string, options?: {
33
35
  env?: NodeJS.ProcessEnv;
package/dist/command.js CHANGED
@@ -62,6 +62,10 @@ export function prependCommandPath(command, env = process.env) {
62
62
  export function prependNodePath(env = process.env, nodeExecutable = process.execPath) {
63
63
  return prependPathDirectory(path.dirname(nodeExecutable), env);
64
64
  }
65
+ /** npm exec's package selector belongs to its invocation, not nested package runners. */
66
+ export function npmExecEnvironment(env = process.env) {
67
+ return Object.fromEntries(Object.entries(env).filter(([key]) => key.toLowerCase() !== 'npm_config_package'));
68
+ }
65
69
  export function prependPathDirectory(directory, env = process.env) {
66
70
  const pathKey = Object.keys(env).find(key => key.toLowerCase() === 'path') || 'PATH';
67
71
  const inherited = env[pathKey] || '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mearl/daemon-core",
3
- "version": "2.22.4",
3
+ "version": "2.23.0",
4
4
  "description": "Shared Node daemon lifecycle primitives for Mearl — process liveness, JSON record registry, log rotation, and a detached daemon manager",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "license": "ISC",
23
23
  "engines": {
24
- "node": ">=22.12.0"
24
+ "node": ">=20.18.0"
25
25
  },
26
26
  "publishConfig": {
27
27
  "registry": "https://registry.npmjs.org"