@akala/pm 14.1.15 → 14.1.18

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
@@ -4,7 +4,7 @@
4
4
  "pm": "dist/esm/cli.js",
5
5
  "pm-fork": "dist/esm/fork.js"
6
6
  },
7
- "version": "14.1.15",
7
+ "version": "14.1.18",
8
8
  "scripts": {
9
9
  "test": "echo 1",
10
10
  "generate": "ac generate dist/esm/commands commands.json --name pm && ac generate dist/esm/cli-commands cli-commands.json --name pm",
@@ -29,11 +29,11 @@
29
29
  "src/fork.ts"
30
30
  ],
31
31
  "dependencies": {
32
- "@akala/cli": "^5.0.12",
33
- "@akala/commands": "^11.5.2",
34
- "@akala/config": "^6.0.6",
35
- "@akala/core": "^24.0.9",
36
- "@akala/json-rpc-ws": "^11.0.35",
32
+ "@akala/cli": "^5.0.15",
33
+ "@akala/commands": "^11.7.0",
34
+ "@akala/config": "^6.0.9",
35
+ "@akala/core": "^24.2.0",
36
+ "@akala/json-rpc-ws": "^11.0.38",
37
37
  "reflect-metadata": "^0.2.2",
38
38
  "source-map-support": "^0.5.21"
39
39
  },
package/src/akala.mts CHANGED
@@ -7,7 +7,7 @@ import { Readable } from 'stream';
7
7
  import { spawnAsync } from '@akala/cli/cli-helper';
8
8
  import State, { StateConfiguration } from './state.js';
9
9
  import { CliContext, ErrorMessage, InteractError, NamespaceMiddleware, unparse } from '@akala/cli';
10
- import { eachAsync, logger, ObservableObject, Parser } from '@akala/core';
10
+ import { eachAsync, logger, LogLevels, ObservableObject, Parser } from '@akala/core';
11
11
  import module from 'module'
12
12
  import commands from './container.js';
13
13
 
@@ -34,8 +34,8 @@ const tableChars = {
34
34
  }
35
35
  const truncate = '…';
36
36
 
37
- type CliOptions = { output: string, verbose: boolean, pmSock: string | number, tls: boolean, help: boolean };
38
- export default async function (_config, program: NamespaceMiddleware<{ configFile: string, verbose: boolean }>)
37
+ type CliOptions = { output: string, verbose: number, pmSock: string | number, tls: boolean, help: boolean };
38
+ export default async function (_config, program: NamespaceMiddleware<{ configFile: string, verbose: number }>)
39
39
  {
40
40
  const cli = program.command('pm').state<{ pm?: StateConfiguration }>().options<CliOptions>({
41
41
  output: { aliases: ['o'], needsValue: true, doc: 'output as `table` if array otherwise falls back to standard node output' },
@@ -173,7 +173,7 @@ export default async function (_config, program: NamespaceMiddleware<{ configFil
173
173
  });
174
174
  program.useError((err: Error, context) =>
175
175
  {
176
- if (context.options.verbose)
176
+ if (context.options.verbose >= LogLevels.debug)
177
177
  console.error(err);
178
178
  else if (err instanceof ErrorMessage)
179
179
  console.log(err.message)
@@ -470,4 +470,4 @@ function readLine()
470
470
  })
471
471
  process.stdin.resume();
472
472
  })
473
- }
473
+ }
@@ -12,7 +12,7 @@ import { fileURLToPath } from 'url'
12
12
  //@ts-ignore
13
13
  const _dirname = typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url))
14
14
 
15
- export default async function start(this: State, pm: pmContainer.container & Container<State>, name: string, context?: CliContext<{ new?: boolean, name: string, keepAttached?: boolean, inspect?: boolean, verbose?: boolean, wait?: boolean }>): Promise<void | { execPath: string, args: string[], cwd: string, stdio: StdioOptions, shell: boolean, windowsHide: boolean }>
15
+ export default async function start(this: State, pm: pmContainer.container & Container<State>, name: string, context?: CliContext<{ new?: boolean, name: string, keepAttached?: boolean, inspect?: boolean, verbose?: number, wait?: boolean }>): Promise<void | { execPath: string, args: string[], cwd: string, stdio: StdioOptions, shell: boolean, windowsHide: boolean }>
16
16
  {
17
17
  let args: string[];
18
18
 
@@ -69,4 +69,4 @@ export default async function start(this: State, pm: pmContainer.container & Con
69
69
  })
70
70
  }
71
71
 
72
- start.$inject = ['$container', 'param.0', 'options']
72
+ start.$inject = ['$container', 'param.0', 'options']
package/src/cli.ts CHANGED
@@ -9,6 +9,7 @@ import { Readable } from 'stream';
9
9
  import State, { StateConfiguration } from './state.js';
10
10
  import { program, buildCliContextFromProcess, ErrorMessage, supportInteract } from '@akala/cli';
11
11
  import { open } from 'fs/promises';
12
+ import { LogLevels } from '@akala/core';
12
13
 
13
14
  const tableChars = {
14
15
  'top': '─'
@@ -29,7 +30,7 @@ const tableChars = {
29
30
  }
30
31
  const truncate = '…';
31
32
 
32
- type CliOptions = { output: string, verbose: boolean, pmSock: string | number, tls: boolean, help: boolean };
33
+ type CliOptions = { output: string, verbose: number, pmSock: string | number, tls: boolean, help: boolean };
33
34
 
34
35
  const cli = program.options<CliOptions>({ output: { aliases: ['o'], needsValue: true, doc: 'output as `table` if array otherwise falls back to standard node output' }, verbose: { aliases: ['v'] }, tls: { doc: "enables tls connection to the `pmSock`" }, pmSock: { aliases: ['pm-sock'], needsValue: true, doc: "path to the unix socket or destination in the form host:port" }, help: { doc: "displays this help message" } });
35
36
  cli.command('start pm')
@@ -194,7 +195,7 @@ cli.preAction(async c =>
194
195
  cli.format(async (result, context) => formatResult(result, context.options.output));
195
196
  cli.useError((err: Error, context) =>
196
197
  {
197
- if (context.options.verbose)
198
+ if (context.options.verbose >= LogLevels.debug)
198
199
  console.error(err);
199
200
  else if (err instanceof ErrorMessage)
200
201
  console.log(err.message)
@@ -2,8 +2,8 @@ import { StdioOptions } from "child_process";
2
2
  import pmContainer from '../container.js';
3
3
  import { CliContext } from "@akala/cli";
4
4
 
5
- export default async function restart(pm: pmContainer.container, name: string, context?: CliContext<{ new?: boolean, name: string, inspect?: boolean, verbose?: boolean, wait?: boolean }>): Promise<void | { execPath: string, args: string[], cwd: string, stdio: StdioOptions, shell: boolean, windowsHide: boolean }>
5
+ export default async function restart(pm: pmContainer.container, name: string, context?: CliContext<{ new?: boolean, name: string, inspect?: boolean, verbose?: number, wait?: boolean }>): Promise<void | { execPath: string, args: string[], cwd: string, stdio: StdioOptions, shell: boolean, windowsHide: boolean }>
6
6
  {
7
7
  await pm.dispatch('stop', name);
8
8
  await pm.dispatch('start', name, context.options, context);
9
- }
9
+ }
@@ -15,7 +15,7 @@ import Worker from "../runtimes/worker.js";
15
15
  //@ts-ignore
16
16
  const _dirname = typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url))
17
17
 
18
- export default async function start(this: State, pm: pmContainer.container & Container<State>, name: string, options?: CliContext<{ configFile?: string, new?: boolean, name: string, keepAttached?: boolean, inspect?: boolean, verbose?: boolean, wait?: boolean, autostart?: boolean }>['options'], context?: Pick<CliContext<{}>, 'args'>): Promise<void | { execPath: string, args: string[], cwd: string, shell: boolean, windowsHide: boolean }>
18
+ export default async function start(this: State, pm: pmContainer.container & Container<State>, name: string, options?: CliContext<{ configFile?: string, new?: boolean, name: string, keepAttached?: boolean, inspect?: boolean, verbose?: number, wait?: boolean, autostart?: boolean }>['options'], context?: Pick<CliContext<{}>, 'args'>): Promise<void | { execPath: string, args: string[], cwd: string, shell: boolean, windowsHide: boolean }>
19
19
  {
20
20
  let args: string[];
21
21
  if (options)
package/src/container.ts CHANGED
@@ -52,7 +52,7 @@ namespace commands
52
52
  'update'(...args: [Argument0<typeof import('./cli-commands/update.js').default>, Argument1<typeof import('./cli-commands/update.js').default>, Argument2<typeof import('./cli-commands/update.js').default>]): ReturnType<typeof import('./cli-commands/update.js').default>
53
53
  'version'(...args: [Argument0<typeof import('./cli-commands/version.js').default>, Argument1<typeof import('./cli-commands/version.js').default>]): ReturnType<typeof import('./cli-commands/version.js').default>
54
54
  }
55
- export const meta={"name":"pm","commands":[{"name":"$init","config":{"fs":{"disabled":true,"path":"dist/esm/commands/$init.js","source":"src/commands/$init.ts","inject":["$container","param.0"]},"":{"inject":["$container","param.0"]},"cli":{"inject":["$container","context"],"usage":"$init [...args]","options":{"configFile":{"needsValue":true,"aliases":["c"]},"keepAttached":{"needsValue":true}}}}},{"name":"bridge","config":{"fs":{"path":"dist/esm/commands/bridge.js","source":"src/commands/bridge.ts","inject":["param.0","param.1"]},"jsonrpc":{"inject":["param.0","socket"]},"":{"inject":["param.0","param.1"]}}},{"name":"name","config":{"fs":{"path":"dist/esm/commands/name.js","source":"src/commands/name.ts","inject":["param.0"]},"":{"inject":["param.0"]}}},{"name":"proxy","config":{"fs":{"path":"dist/esm/commands/proxy.js","source":"src/commands/proxy.ts","inject":["param.0","param.1"]},"jsonrpc":{"inject":["param.0","socket"]},"":{"inject":["param.0","param.1"]}}},{"name":"ready","config":{"fs":{"path":"dist/esm/commands/ready.js","source":"src/commands/ready.ts","inject":["$container","ignore"]},"jsonrpc":{"inject":["$container","dummy","connectionAsContainer"]},"":{"inject":["$container","connectionAsContainer"]}}},{"name":"reload-metadata","config":{"fs":{"inject":["param.0"],"path":"dist/esm/commands/reload-metadata.js","source":"src/commands/reload-metadata.ts"},"jsonrpc":{"inject":["connectionAsContainer"]},"":{"inject":["param.0"]}}},{"name":"restart","config":{"fs":{"path":"dist/esm/commands/restart.js","source":"src/commands/restart.ts","inject":["$container","param.0","param.1"]},"":{"inject":["$container","param.0","param.1"]},"cli":{"options":{"wait":{"aliases":["w"],"needsValue":false,"doc":"waits for the program to be started before returning, otherwise, returns after the start command is sent to the pm daemon"},"inspect":{"needsValue":false,"doc":"starts the process with --inspect-brk parameter to help debugging"},"new":{"needsValue":false},"name":{"doc":"name to assign to the process","needsValue":true},"program":{"doc":"program to start"}},"inject":["$container","param.0","context"],"usage":"restart <program>"},"schema":{"inject":["$container","param.0","param.1"],"$defs":{"param.0":{"type":"string"},"param.1":{"type":"object","properties":{"wait":{"type":"boolean"}}}}},"html-form":{"inject":["$container","param.0","param.1"]}}},{"name":"start","config":{"fs":{"path":"dist/esm/commands/start.js","source":"src/commands/start.ts","inject":["$container","param.0","param.1","param.2"]},"":{"inject":["$container","param.0","param.1","param.2"]},"cli":{"options":{"wait":{"aliases":["w"],"needsValue":false,"doc":"waits for the program to be started before returning, otherwise, returns after the start command is sent to the pm daemon"},"inspect":{"needsValue":false,"doc":"starts the process with --inspect-brk parameter to help debugging"},"new":{"needsValue":false},"name":{"doc":"name to assign to the process","needsValue":true},"program":{"doc":"program to start"},"autostart":{"doc":"start automatically when pm starts"}},"inject":["$container","options.program","options","context"],"usage":"start <program>"},"html-form":{"inject":["$container","param.0","param.1","param.2"]},"schema":{"inject":["$container","param.0","param.1","param.2"],"$defs":{"param.0":{"type":"string"},"param.1":{"type":"object","properties":{"wait":{"type":"boolean"},"inspect":{"type":"boolean"},"new":{"type":"boolean"},"name":{"type":"string"},"program":{"type":"string"}}},"param.2":{"type":"object","properties":{"args":{"type":"array","items":{"type":"string"}}}}}}}},{"name":"status","config":{"fs":{"path":"dist/esm/commands/status.js","source":"src/commands/status.ts","inject":["param.0"]},"":{"inject":["param.0"]},"cli":{"inject":["param.0"]},"html-form":{"inject":["param.0"]},"schema":{"inject":["param.0"],"$defs":{"param.0":{"type":"string","description":"The name of the container to get the status of"}}}}},{"name":"stop","config":{"fs":{"path":"dist/esm/commands/stop.js","source":"src/commands/stop.ts","inject":["param.0","$container"]},"":{"inject":["param.0","$container"]},"cli":{"inject":["options.process","$container"],"options":{"process":{"doc":"process to stop. Stops all the processes otherwise (including pm)."}},"usage":"stop [process]"},"html-form":{"inject":["param.0","$container"]},"schema":{"inject":["param.0","$container"],"$defs":{"param.0":{"type":"string"}}}}},{"name":"$init-akala","config":{"fs":{"path":"/home/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/$init-akala.js","source":"/home/nicolas/dev/akala/packages/pm/src/cli-commands/$init-akala.ts","inject":["param.0"]},"cli":{"inject":["options.pmSock"],"options":{"pmSock":{"aliases":["pm-sock"],"needsValue":true}}},"":{"inject":["param.0"]}}},{"name":"connect","config":{"fs":{"path":"/home/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/connect.js","source":"/home/nicolas/dev/akala/packages/pm/src/cli-commands/connect.ts","inject":["param.0","param.1"]},"":{"inject":["param.0","param.1"]},"cli":{"usage":"connect <name>","inject":["options.name","context"],"options":{"tcpPort":{"needsValue":true,"aliases":["tcp-port"]},"port":{"needsValue":true},"key":{"needsValue":true},"cert":{"needsValue":true}}}}},{"name":"discover","config":{"fs":{"path":"/home/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/discover.js","source":"/home/nicolas/dev/akala/packages/pm/src/cli-commands/discover.ts","inject":["param.0","param.1","$container"]},"":{"inject":["param.0","param.1","$container"]},"cli":{"usage":"discover <name> <folder>","options":{"folder":{"normalize":true}},"inject":["options.name","options.folder","$container"]}}},{"name":"install","config":{"fs":{"path":"/home/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/install.js","source":"/home/nicolas/dev/akala/packages/pm/src/cli-commands/install.ts","inject":["param.0","$container"]},"":{"inject":["param.0","$container"]},"cli":{"inject":["param.0","$container"]}}},{"name":"link","config":{"fs":{"path":"/home/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/link.js","source":"/home/nicolas/dev/akala/packages/pm/src/cli-commands/link.ts","inject":["param.0","param.1","$container"]},"":{"inject":["param.0","param.1","$container"]},"cli":{"inject":["param.0","param.1","$container"]}}},{"name":"log","config":{"fs":{"path":"/home/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/log.js","source":"/home/nicolas/dev/akala/packages/pm/src/cli-commands/log.ts","inject":["param.0"]},"":{"inject":["param.0"]},"cli":{"inject":["param.0"]}}},{"name":"ls","config":{"fs":{"path":"/home/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/ls.js","source":"/home/nicolas/dev/akala/packages/pm/src/cli-commands/ls.ts","inject":[]},"":{"inject":[]},"cli":{"inject":[]},"html-form":{"inject":[]}}},{"name":"map","config":{"fs":{"path":"/home/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/map.js","source":"/home/nicolas/dev/akala/packages/pm/src/cli-commands/map.ts","inject":["param.0","param.1","param.2","param.3"]},"":{"inject":["param.0","param.1","param.2","param.3"]},"cli":{"inject":["options.name","options.path","cwd","options"],"options":{"commandable":{"aliases":["c"],"needsValue":false},"stateless":{"aliases":["s"],"needsValue":false}},"usage":"map <name> <path>"}}},{"name":"uninstall","config":{"fs":{"path":"/home/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/uninstall.js","source":"/home/nicolas/dev/akala/packages/pm/src/cli-commands/uninstall.ts","inject":["param.0","$container"]},"":{"inject":["param.0","$container"]},"cli":{"inject":["param.0","$container"]}}},{"name":"update","config":{"fs":{"path":"/home/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/update.js","source":"/home/nicolas/dev/akala/packages/pm/src/cli-commands/update.ts","inject":["param.0","param.1","param.2"]},"cli":{"inject":["param.0","param.1","$container"]},"":{"inject":["param.0","param.1","param.2"]}}},{"name":"version","config":{"fs":{"path":"/home/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/version.js","source":"/home/nicolas/dev/akala/packages/pm/src/cli-commands/version.ts","inject":["param.0","param.1"]},"":{"inject":["param.0","param.1"]},"cli":{"inject":["options.packageName","options.folder"],"usage":"version <packageName> [folder]"},"schema":{"inject":["param.0","param.1"],"$defs":{"param.0":{"type":"string"},"param.1":{"type":"string"}}}}}],"extends":["./cli-commands.json"],"$schema":"https://raw.githubusercontent.com/npenin/akala/main/packages/commands/container-schema.json"} as Metadata.Container;
55
+ export const meta={"name":"pm","commands":[{"name":"$init","config":{"fs":{"disabled":true,"path":"dist/esm/commands/$init.js","source":"src/commands/$init.ts","inject":["$container","param.0"]},"":{"inject":["$container","param.0"]},"cli":{"inject":["$container","context"],"usage":"$init [...args]","options":{"configFile":{"needsValue":true,"aliases":["c"]},"keepAttached":{"needsValue":true}}}}},{"name":"bridge","config":{"fs":{"path":"dist/esm/commands/bridge.js","source":"src/commands/bridge.ts","inject":["param.0","param.1"]},"jsonrpc":{"inject":["param.0","socket"]},"":{"inject":["param.0","param.1"]}}},{"name":"name","config":{"fs":{"path":"dist/esm/commands/name.js","source":"src/commands/name.ts","inject":["param.0"]},"":{"inject":["param.0"]}}},{"name":"proxy","config":{"fs":{"path":"dist/esm/commands/proxy.js","source":"src/commands/proxy.ts","inject":["param.0","param.1"]},"jsonrpc":{"inject":["param.0","socket"]},"":{"inject":["param.0","param.1"]}}},{"name":"ready","config":{"fs":{"path":"dist/esm/commands/ready.js","source":"src/commands/ready.ts","inject":["$container","ignore"]},"jsonrpc":{"inject":["$container","dummy","connectionAsContainer"]},"":{"inject":["$container","connectionAsContainer"]}}},{"name":"reload-metadata","config":{"fs":{"inject":["param.0"],"path":"dist/esm/commands/reload-metadata.js","source":"src/commands/reload-metadata.ts"},"jsonrpc":{"inject":["connectionAsContainer"]},"":{"inject":["param.0"]}}},{"name":"restart","config":{"fs":{"path":"dist/esm/commands/restart.js","source":"src/commands/restart.ts","inject":["$container","param.0","param.1"]},"":{"inject":["$container","param.0","param.1"]},"cli":{"options":{"wait":{"aliases":["w"],"needsValue":false,"doc":"waits for the program to be started before returning, otherwise, returns after the start command is sent to the pm daemon"},"inspect":{"needsValue":false,"doc":"starts the process with --inspect-brk parameter to help debugging"},"new":{"needsValue":false},"name":{"doc":"name to assign to the process","needsValue":true},"program":{"doc":"program to start"}},"inject":["$container","param.0","context"],"usage":"restart <program>"},"schema":{"inject":["$container","param.0","param.1"],"$defs":{"param.0":{"type":"string"},"param.1":{"type":"object","properties":{"wait":{"type":"boolean"}}}}},"html-form":{"inject":["$container","param.0","param.1"]}}},{"name":"start","config":{"fs":{"path":"dist/esm/commands/start.js","source":"src/commands/start.ts","inject":["$container","param.0","param.1","param.2"]},"":{"inject":["$container","param.0","param.1","param.2"]},"cli":{"options":{"wait":{"aliases":["w"],"needsValue":false,"doc":"waits for the program to be started before returning, otherwise, returns after the start command is sent to the pm daemon"},"inspect":{"needsValue":false,"doc":"starts the process with --inspect-brk parameter to help debugging"},"new":{"needsValue":false},"name":{"doc":"name to assign to the process","needsValue":true},"program":{"doc":"program to start"},"autostart":{"doc":"start automatically when pm starts"}},"inject":["$container","options.program","options","context"],"usage":"start <program>"},"html-form":{"inject":["$container","param.0","param.1","param.2"]},"schema":{"inject":["$container","param.0","param.1","param.2"],"$defs":{"param.0":{"type":"string"},"param.1":{"type":"object","properties":{"wait":{"type":"boolean"},"inspect":{"type":"boolean"},"new":{"type":"boolean"},"name":{"type":"string"},"program":{"type":"string"}}},"param.2":{"type":"object","properties":{"args":{"type":"array","items":{"type":"string"}}}}}}}},{"name":"status","config":{"fs":{"path":"dist/esm/commands/status.js","source":"src/commands/status.ts","inject":["param.0"]},"":{"inject":["param.0"]},"cli":{"inject":["param.0"]},"html-form":{"inject":["param.0"]},"schema":{"inject":["param.0"],"$defs":{"param.0":{"type":"string","description":"The name of the container to get the status of"}}}}},{"name":"stop","config":{"fs":{"path":"dist/esm/commands/stop.js","source":"src/commands/stop.ts","inject":["param.0","$container"]},"":{"inject":["param.0","$container"]},"cli":{"inject":["options.process","$container"],"options":{"process":{"doc":"process to stop. Stops all the processes otherwise (including pm)."}},"usage":"stop [process]"},"html-form":{"inject":["param.0","$container"]},"schema":{"inject":["param.0","$container"],"$defs":{"param.0":{"type":"string"}}}}},{"name":"$init-akala","config":{"fs":{"path":"/Users/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/$init-akala.js","source":"/Users/nicolas/dev/akala/packages/pm/src/cli-commands/$init-akala.ts","inject":["param.0"]},"cli":{"inject":["options.pmSock"],"options":{"pmSock":{"aliases":["pm-sock"],"needsValue":true}}},"":{"inject":["param.0"]}}},{"name":"connect","config":{"fs":{"path":"/Users/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/connect.js","source":"/Users/nicolas/dev/akala/packages/pm/src/cli-commands/connect.ts","inject":["param.0","param.1"]},"":{"inject":["param.0","param.1"]},"cli":{"usage":"connect <name>","inject":["options.name","context"],"options":{"tcpPort":{"needsValue":true,"aliases":["tcp-port"]},"port":{"needsValue":true},"key":{"needsValue":true},"cert":{"needsValue":true}}}}},{"name":"discover","config":{"fs":{"path":"/Users/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/discover.js","source":"/Users/nicolas/dev/akala/packages/pm/src/cli-commands/discover.ts","inject":["param.0","param.1","$container"]},"":{"inject":["param.0","param.1","$container"]},"cli":{"usage":"discover <name> <folder>","options":{"folder":{"normalize":true}},"inject":["options.name","options.folder","$container"]}}},{"name":"install","config":{"fs":{"path":"/Users/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/install.js","source":"/Users/nicolas/dev/akala/packages/pm/src/cli-commands/install.ts","inject":["param.0","$container"]},"":{"inject":["param.0","$container"]},"cli":{"inject":["param.0","$container"]}}},{"name":"link","config":{"fs":{"path":"/Users/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/link.js","source":"/Users/nicolas/dev/akala/packages/pm/src/cli-commands/link.ts","inject":["param.0","param.1","$container"]},"":{"inject":["param.0","param.1","$container"]},"cli":{"inject":["param.0","param.1","$container"]}}},{"name":"log","config":{"fs":{"path":"/Users/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/log.js","source":"/Users/nicolas/dev/akala/packages/pm/src/cli-commands/log.ts","inject":["param.0"]},"":{"inject":["param.0"]},"cli":{"inject":["param.0"]}}},{"name":"ls","config":{"fs":{"path":"/Users/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/ls.js","source":"/Users/nicolas/dev/akala/packages/pm/src/cli-commands/ls.ts","inject":[]},"":{"inject":[]},"cli":{"inject":[]},"html-form":{"inject":[]}}},{"name":"map","config":{"fs":{"path":"/Users/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/map.js","source":"/Users/nicolas/dev/akala/packages/pm/src/cli-commands/map.ts","inject":["param.0","param.1","param.2","param.3"]},"":{"inject":["param.0","param.1","param.2","param.3"]},"cli":{"inject":["options.name","options.path","cwd","options"],"options":{"commandable":{"aliases":["c"],"needsValue":false},"stateless":{"aliases":["s"],"needsValue":false}},"usage":"map <name> <path>"}}},{"name":"uninstall","config":{"fs":{"path":"/Users/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/uninstall.js","source":"/Users/nicolas/dev/akala/packages/pm/src/cli-commands/uninstall.ts","inject":["param.0","$container"]},"":{"inject":["param.0","$container"]},"cli":{"inject":["param.0","$container"]}}},{"name":"update","config":{"fs":{"path":"/Users/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/update.js","source":"/Users/nicolas/dev/akala/packages/pm/src/cli-commands/update.ts","inject":["param.0","param.1","param.2"]},"cli":{"inject":["param.0","param.1","$container"]},"":{"inject":["param.0","param.1","param.2"]}}},{"name":"version","config":{"fs":{"path":"/Users/nicolas/dev/akala/packages/pm/dist/esm/cli-commands/version.js","source":"/Users/nicolas/dev/akala/packages/pm/src/cli-commands/version.ts","inject":["param.0","param.1"]},"":{"inject":["param.0","param.1"]},"cli":{"inject":["options.packageName","options.folder"],"usage":"version <packageName> [folder]"},"schema":{"inject":["param.0","param.1"],"$defs":{"param.0":{"type":"string"},"param.1":{"type":"string"}}}}}],"extends":["./cli-commands.json"],"$schema":"https://raw.githubusercontent.com/npenin/akala/main/packages/commands/container-schema.json"} as Metadata.Container;
56
56
 
57
57
  export function connect(processor?:ICommandProcessor) {
58
58
  const container = new Container<void>("commands", void 0);
@@ -16,7 +16,7 @@ export type ChildProcessRuntimeEventMap = {
16
16
 
17
17
  } & RuntimeEventMap;
18
18
 
19
- export type ChildProcessRuntimeOptions = { new?: boolean, name: string, keepAttached?: boolean, inspect?: boolean, verbose?: boolean, wait?: boolean, inheritStdio?: boolean }
19
+ export type ChildProcessRuntimeOptions = { new?: boolean, name: string, keepAttached?: boolean, inspect?: boolean, verbose?: number, wait?: boolean, inheritStdio?: boolean }
20
20
 
21
21
  export default class Runtime extends EventEmitter<ChildProcessRuntimeEventMap> implements RuntimeInstance<ChildProcessRuntimeEventMap>
22
22
  {
@@ -28,7 +28,7 @@ export default class Runtime extends EventEmitter<ChildProcessRuntimeEventMap> i
28
28
  args.unshift(fileURLToPath(new URL('../fork', import.meta.url)));
29
29
  if (options.inspect)
30
30
  args.unshift("--inspect-brk");
31
- this.cp = spawn(process.execPath, [require.resolve('../fork')].concat(args), { cwd: process.cwd(), detached: !options.keepAttached, env: Object.assign({ DEBUG_COLORS: process.stdout.isTTY }, process.env), stdio: ['ignore', options.inheritStdio ? 'inherit' : 'pipe', options.inheritStdio ? 'inherit' : 'pipe', 'ipc'], shell: false, windowsHide: true });
31
+ this.cp = spawn(process.execPath, args, { cwd: process.cwd(), detached: !options.keepAttached, env: Object.assign({ DEBUG_COLORS: process.stdout.isTTY }, process.env), stdio: ['ignore', options.inheritStdio ? 'inherit' : 'pipe', options.inheritStdio ? 'inherit' : 'pipe', 'ipc'], shell: false, windowsHide: true });
32
32
  if (!options.inheritStdio)
33
33
  {
34
34
  this.cp.stderr?.pipe(new NewLinePrefixer(options.name + ' ', { useColors: true })).pipe(process.stderr);
@@ -12,7 +12,7 @@ export default class Runtime extends EventEmitter<RuntimeEventMap> implements Ru
12
12
  private readonly cp: Worker;
13
13
  public readonly adapter: MessagePortAdapter;
14
14
  private _running: boolean;
15
- constructor(args: string[], options: { new?: boolean, name: string, keepAttached?: boolean, inspect?: boolean, verbose?: boolean, wait?: boolean })
15
+ constructor(args: string[], options: { new?: boolean, name: string, keepAttached?: boolean, inspect?: boolean, verbose?: number, wait?: boolean })
16
16
  {
17
17
  super();
18
18
  this.cp = new Worker(require.resolve('../fork'), { argv: args, stderr: true, stdout: true })
@@ -26,7 +26,7 @@ export default class Runtime extends EventEmitter<RuntimeEventMap> implements Ru
26
26
  return this.cp.terminate();
27
27
  }
28
28
 
29
- public static build(args: string[], options: { new?: boolean, name: string, keepAttached?: boolean, inspect?: boolean, verbose?: boolean, wait?: boolean })
29
+ public static build(args: string[], options: { new?: boolean, name: string, keepAttached?: boolean, inspect?: boolean, verbose?: number, wait?: boolean })
30
30
  {
31
31
  return new Runtime(args, options);
32
32
  }