@akala/pm 5.2.38 → 5.2.40
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/changelog.md +7 -1
- package/commands.json +2 -1
- package/dist/cjs/cli-helper.d.ts +1 -1
- package/dist/cjs/cli-helper.js +1 -1
- package/dist/cjs/commands/bridge.d.ts +1 -1
- package/dist/cjs/commands/bridge.js +1 -1
- package/dist/cjs/commands/config.d.ts +1 -1
- package/dist/cjs/commands/config.js +1 -1
- package/dist/cjs/commands/connect.d.ts +1 -1
- package/dist/cjs/commands/connect.js +1 -1
- package/dist/cjs/commands/discover.d.ts +1 -1
- package/dist/cjs/commands/discover.js +1 -1
- package/dist/cjs/commands/install.d.ts +1 -1
- package/dist/cjs/commands/install.js +1 -1
- package/dist/cjs/commands/link.d.ts +1 -1
- package/dist/cjs/commands/link.js +1 -1
- package/dist/cjs/commands/log.d.ts +1 -1
- package/dist/cjs/commands/log.js +1 -1
- package/dist/cjs/commands/ls.d.ts +1 -1
- package/dist/cjs/commands/ls.js +1 -1
- package/dist/cjs/commands/map.d.ts +1 -1
- package/dist/cjs/commands/map.js +1 -1
- package/dist/cjs/commands/name.d.ts +1 -1
- package/dist/cjs/commands/name.js +1 -1
- package/dist/cjs/commands/plugin/add.d.ts +1 -1
- package/dist/cjs/commands/plugin/add.js +1 -1
- package/dist/cjs/commands/plugin/remove.d.ts +1 -1
- package/dist/cjs/commands/plugin/remove.js +1 -1
- package/dist/cjs/commands/proxy.d.ts +1 -1
- package/dist/cjs/commands/proxy.js +1 -1
- package/dist/cjs/commands/ready.d.ts +1 -1
- package/dist/cjs/commands/ready.js +1 -1
- package/dist/cjs/commands/reload-metadata.d.ts +1 -1
- package/dist/cjs/commands/reload-metadata.js +1 -1
- package/dist/cjs/commands/restart.d.ts +1 -1
- package/dist/cjs/commands/restart.js +1 -1
- package/dist/cjs/commands/start.d.ts +1 -1
- package/dist/cjs/commands/start.js +1 -1
- package/dist/cjs/commands/status.d.ts +1 -1
- package/dist/cjs/commands/status.js +1 -1
- package/dist/cjs/commands/stop.d.ts +1 -1
- package/dist/cjs/commands/stop.js +1 -1
- package/dist/cjs/commands/update.d.ts +1 -1
- package/dist/cjs/commands/update.js +1 -1
- package/dist/cjs/commands/version.d.ts +1 -1
- package/dist/cjs/commands/version.js +1 -1
- package/dist/cjs/container.d.ts +1 -3
- package/dist/cjs/container.js +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/ipc-adapter.d.ts +1 -1
- package/dist/cjs/ipc-adapter.js +1 -1
- package/dist/cjs/new-line-prefixer.d.ts +1 -1
- package/dist/cjs/new-line-prefixer.js +1 -1
- package/dist/cjs/npm-helper.d.ts +1 -1
- package/dist/cjs/npm-helper.js +1 -1
- package/dist/cjs/sidecar.d.ts +1 -1
- package/dist/cjs/sidecar.js +1 -1
- package/dist/cjs/standalone.d.ts +1 -1
- package/dist/cjs/standalone.js +1 -1
- package/dist/cjs/state.d.ts +1 -1
- package/dist/cjs/state.js +1 -1
- package/dist/cjs/test/pwet.d.ts +1 -1
- package/dist/cjs/test/pwet.js +1 -1
- package/dist/cjs/yarn-helper.d.ts +1 -1
- package/dist/cjs/yarn-helper.js +1 -1
- package/dist/esm/akala.d.mts +1 -1
- package/dist/esm/akala.mjs +1 -1
- package/dist/esm/cli-helper.d.ts +1 -1
- package/dist/esm/cli-helper.js +1 -1
- package/dist/esm/cli.d.ts +1 -1
- package/dist/esm/cli.js +1 -1
- package/dist/esm/commands/$init.d.ts +2 -1
- package/dist/esm/commands/$init.js +5 -12
- package/dist/esm/commands/$init.js.map +1 -1
- package/dist/esm/commands/bridge.d.ts +1 -1
- package/dist/esm/commands/bridge.js +1 -1
- package/dist/esm/commands/config.d.ts +1 -1
- package/dist/esm/commands/config.js +1 -1
- package/dist/esm/commands/connect.d.ts +1 -1
- package/dist/esm/commands/connect.js +1 -1
- package/dist/esm/commands/discover.d.ts +1 -1
- package/dist/esm/commands/discover.js +1 -1
- package/dist/esm/commands/install.d.ts +1 -1
- package/dist/esm/commands/install.js +1 -1
- package/dist/esm/commands/link.d.ts +1 -1
- package/dist/esm/commands/link.js +1 -1
- package/dist/esm/commands/log.d.ts +1 -1
- package/dist/esm/commands/log.js +1 -1
- package/dist/esm/commands/ls.d.ts +1 -1
- package/dist/esm/commands/ls.js +1 -1
- package/dist/esm/commands/map.d.ts +1 -1
- package/dist/esm/commands/map.js +1 -1
- package/dist/esm/commands/name.d.ts +1 -1
- package/dist/esm/commands/name.js +1 -1
- package/dist/esm/commands/plugin/add.d.ts +1 -1
- package/dist/esm/commands/plugin/add.js +1 -1
- package/dist/esm/commands/plugin/remove.d.ts +1 -1
- package/dist/esm/commands/plugin/remove.js +1 -1
- package/dist/esm/commands/proxy.d.ts +1 -1
- package/dist/esm/commands/proxy.js +1 -1
- package/dist/esm/commands/ready.d.ts +1 -1
- package/dist/esm/commands/ready.js +1 -1
- package/dist/esm/commands/reload-metadata.d.ts +1 -1
- package/dist/esm/commands/reload-metadata.js +1 -1
- package/dist/esm/commands/restart.d.ts +1 -1
- package/dist/esm/commands/restart.js +1 -1
- package/dist/esm/commands/start.d.ts +1 -1
- package/dist/esm/commands/start.js +1 -1
- package/dist/esm/commands/status.d.ts +1 -1
- package/dist/esm/commands/status.js +1 -1
- package/dist/esm/commands/stop.d.ts +1 -1
- package/dist/esm/commands/stop.js +1 -1
- package/dist/esm/commands/update.d.ts +1 -1
- package/dist/esm/commands/update.js +1 -1
- package/dist/esm/commands/version.d.ts +1 -1
- package/dist/esm/commands/version.js +1 -1
- package/dist/esm/container.d.ts +1 -3
- package/dist/esm/container.js +1 -1
- package/dist/esm/fork.d.ts +1 -1
- package/dist/esm/fork.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ipc-adapter.d.ts +1 -1
- package/dist/esm/ipc-adapter.js +1 -1
- package/dist/esm/new-line-prefixer.d.ts +1 -1
- package/dist/esm/new-line-prefixer.js +1 -1
- package/dist/esm/npm-helper.d.ts +1 -1
- package/dist/esm/npm-helper.js +1 -1
- package/dist/esm/sidecar.d.ts +1 -1
- package/dist/esm/sidecar.js +1 -1
- package/dist/esm/standalone.d.ts +1 -1
- package/dist/esm/standalone.js +1 -1
- package/dist/esm/state.d.ts +1 -1
- package/dist/esm/state.js +1 -1
- package/dist/esm/test/pwet.d.ts +1 -1
- package/dist/esm/test/pwet.js +1 -1
- package/dist/esm/yarn-helper.d.ts +1 -1
- package/dist/esm/yarn-helper.js +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/commands/$init.json +4 -1
- package/src/commands/$init.ts +6 -15
- package/src/container.ts +0 -2
- package/tsconfig.cjs.json +2 -1
- package/dist/cjs/commands/$init.d.ts +0 -10
- package/dist/cjs/commands/$init.js +0 -145
- package/dist/cjs/commands/$init.js.map +0 -1
package/changelog.md
CHANGED
package/commands.json
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
"name": "$init",
|
6
6
|
"config": {
|
7
7
|
"fs": {
|
8
|
+
"disabled": true,
|
8
9
|
"path": "dist/esm/commands/$init.js",
|
9
10
|
"source": "src/commands/$init.ts",
|
10
11
|
"inject": [
|
@@ -23,7 +24,7 @@
|
|
23
24
|
"$container",
|
24
25
|
"context"
|
25
26
|
],
|
26
|
-
"usage": "$init [
|
27
|
+
"usage": "$init [...args]",
|
27
28
|
"options": {
|
28
29
|
"config": {
|
29
30
|
"needsValue": true,
|
package/dist/cjs/cli-helper.d.ts
CHANGED
package/dist/cjs/cli-helper.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
1
|
+
import { CliContext } from "@akala/cli";
|
2
2
|
import State from '../state.js';
|
3
3
|
export default function config(this: State, name: string | undefined | void, options: CliContext['options'] | undefined | void): Promise<string[] | State['config'] | State['config']['containers']['']>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import { ServeMetadata, ServeOptions } from "@akala/commands";
|
2
2
|
import State from '../state.js';
|
3
3
|
export default function connect(this: State, name: string): Promise<ServeMetadata>;
|
4
4
|
export default function connect(this: State, name: string, context?: ServeOptions): Promise<void>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import State from '../state.js';
|
2
2
|
import { Container } from "@akala/commands";
|
3
3
|
import discover from './discover.js';
|
4
4
|
export default function install(this: State, packageName: string, pm: Container<State>): ReturnType<typeof discover>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import State from '../state.js';
|
2
2
|
import { Container } from "@akala/commands";
|
3
3
|
import discover from './discover.js';
|
4
4
|
export default function link(this: State, packageName: string, folder: string, pm: Container<State>): ReturnType<typeof discover>;
|
package/dist/cjs/commands/log.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
import State from '../state.js';
|
2
2
|
export default function ls(this: State): State['config']['containers'];
|
package/dist/cjs/commands/ls.js
CHANGED
package/dist/cjs/commands/map.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
export default function getRandomName(retry?: boolean): string;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
import State from "../../state.js";
|
2
2
|
export default function (this: State, plugin: string): Promise<void>;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
import State from "../../state.js";
|
2
2
|
export default function (this: State, plugin: string): Promise<void>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import { Container } from '@akala/commands';
|
2
2
|
import pm from '../container.js';
|
3
3
|
import State, { RunningContainer } from '../state.js';
|
4
4
|
export default function ready(this: State, pm: pm.container & Container<State>, container: RunningContainer, standaloneContainer: Container<void>): Promise<void>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
import { Container } from "@akala/commands";
|
2
2
|
export default function (remoteContainer: Container<void>): Promise<void>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
import State from '../state.js';
|
2
2
|
export default function version(this: State, packageName: string, folder: string): Promise<string>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
package/dist/cjs/container.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
|
1
|
+
import { Argument0, Argument1, Argument2, Argument3 } from '@akala/core';
|
2
2
|
declare namespace commands {
|
3
3
|
interface container {
|
4
|
-
dispatch(cmd: '$init', ...args: [Argument1<typeof import('./commands/$init.js').default>]): ReturnType<typeof import('./commands/$init.js').default>;
|
5
4
|
dispatch(cmd: 'add', ...args: [Argument0<typeof import('./commands/plugin/add.js').default>]): ReturnType<typeof import('./commands/plugin/add.js').default>;
|
6
5
|
dispatch(cmd: 'bridge', ...args: [Argument0<typeof import('./commands/bridge.js').default>, Argument1<typeof import('./commands/bridge.js').default>]): ReturnType<typeof import('./commands/bridge.js').default>;
|
7
6
|
dispatch(cmd: 'config', ...args: [Argument0<typeof import('./commands/config.js').default>, Argument1<typeof import('./commands/config.js').default>]): ReturnType<typeof import('./commands/config.js').default>;
|
@@ -25,7 +24,6 @@ declare namespace commands {
|
|
25
24
|
dispatch(cmd: 'version', ...args: [Argument0<typeof import('./commands/version.js').default>, Argument1<typeof import('./commands/version.js').default>]): ReturnType<typeof import('./commands/version.js').default>;
|
26
25
|
}
|
27
26
|
interface proxy {
|
28
|
-
'$init'(...args: [Argument1<typeof import('./commands/$init.js').default>]): ReturnType<typeof import('./commands/$init.js').default>;
|
29
27
|
'add'(...args: [Argument0<typeof import('./commands/plugin/add.js').default>]): ReturnType<typeof import('./commands/plugin/add.js').default>;
|
30
28
|
'bridge'(...args: [Argument0<typeof import('./commands/bridge.js').default>, Argument1<typeof import('./commands/bridge.js').default>]): ReturnType<typeof import('./commands/bridge.js').default>;
|
31
29
|
'config'(...args: [Argument0<typeof import('./commands/config.js').default>, Argument1<typeof import('./commands/config.js').default>]): ReturnType<typeof import('./commands/config.js').default>;
|
package/dist/cjs/container.js
CHANGED
package/dist/cjs/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import { Container, Metadata, ServeMetadata, ConnectionPreference } from "@akala/commands";
|
2
2
|
import definition from './container.js';
|
3
3
|
type pmContainer = definition.container;
|
4
4
|
export { pmContainer as Container };
|
package/dist/cjs/index.js
CHANGED
package/dist/cjs/ipc-adapter.js
CHANGED
package/dist/cjs/npm-helper.d.ts
CHANGED
package/dist/cjs/npm-helper.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
package/dist/cjs/sidecar.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import { ConnectionPreference, Container } from "@akala/commands";
|
2
2
|
import { SideCarConnectionPreference, Sidecar } from "./index.js";
|
3
3
|
import pm from './container.js';
|
4
4
|
export default function (options?: {
|
package/dist/cjs/sidecar.js
CHANGED
package/dist/cjs/standalone.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
#!/usr/bin/env node
|
2
2
|
export {};
|
package/dist/cjs/standalone.js
CHANGED
package/dist/cjs/state.d.ts
CHANGED
package/dist/cjs/state.js
CHANGED
package/dist/cjs/test/pwet.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
export default function pwet(a: string): Promise<void>;
|
package/dist/cjs/test/pwet.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
export declare function hasYarn(path?: string): Promise<boolean>;
|
2
2
|
declare const _default: {
|
3
3
|
install(packageName: string, path?: string): Promise<void>;
|
4
4
|
update(packageName: string, path?: string): Promise<void>;
|
package/dist/cjs/yarn-helper.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
package/dist/esm/akala.d.mts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
import { NamespaceMiddleware } from '@akala/cli';
|
2
2
|
export default function (_config: any, program: NamespaceMiddleware): void;
|
package/dist/esm/akala.mjs
CHANGED
package/dist/esm/cli-helper.d.ts
CHANGED
package/dist/esm/cli-helper.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import * as cp from 'child_process';
|
2
2
|
export function spawnAsync(program, options, ...args) {
|
3
3
|
options = Object.assign({ stdio: ['ignore', 'ignore', 'pipe'], shell: false, windowsHide: true }, options);
|
4
4
|
return new Promise((resolve, reject) => {
|
package/dist/esm/cli.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
#!/usr/bin/env node
|
2
2
|
export {};
|
package/dist/esm/cli.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import State, { RunningContainer } from '../state.js';
|
2
2
|
import pmContainer from '../container.js';
|
3
3
|
import { Container, Metadata } from '@akala/commands';
|
4
4
|
import { CliContext } from '@akala/cli';
|
@@ -7,4 +7,5 @@ export declare function isRunningContainer(c: Container<unknown>): c is RunningC
|
|
7
7
|
export default function (this: State, container: RunningContainer & pmContainer.container, context: CliContext<{
|
8
8
|
config: string;
|
9
9
|
keepAttached: boolean;
|
10
|
+
args: string[];
|
10
11
|
}>): Promise<void>;
|
@@ -1,10 +1,11 @@
|
|
1
|
-
|
1
|
+
import { homedir } from 'os';
|
2
2
|
import fs from 'fs/promises';
|
3
3
|
import { join } from 'path';
|
4
|
-
import { Container, Metadata, ignoredCommands, configure, SelfDefinedCommand } from '@akala/commands';
|
4
|
+
import { Container, Metadata, ignoredCommands, configure, SelfDefinedCommand, serveMetadata } from '@akala/commands';
|
5
5
|
import { PassThrough } from 'stream';
|
6
6
|
import { EventEmitter } from 'events';
|
7
7
|
import { Configuration } from '@akala/config';
|
8
|
+
import { fileURLToPath } from 'url';
|
8
9
|
export async function metadata(container, deep) {
|
9
10
|
const metacontainer = { name: container.name || 'unnamed', commands: [] };
|
10
11
|
await Promise.all(container.keys().map(async (key) => {
|
@@ -36,15 +37,6 @@ export async function metadata(container, deep) {
|
|
36
37
|
export function isRunningContainer(c) {
|
37
38
|
return 'running' in c;
|
38
39
|
}
|
39
|
-
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
40
|
-
function requireOrImportJson(path) {
|
41
|
-
if (require)
|
42
|
-
return Promise.resolve(require(path));
|
43
|
-
else
|
44
|
-
//eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
45
|
-
//@ts-ignore
|
46
|
-
return import(path, { assert: { type: 'json' } }).then(i => i.default);
|
47
|
-
}
|
48
40
|
export default async function (container, context) {
|
49
41
|
this.isDaemon = true;
|
50
42
|
this.processes = {};
|
@@ -84,10 +76,11 @@ export default async function (container, context) {
|
|
84
76
|
}
|
85
77
|
else
|
86
78
|
this.config = Configuration.new(configPath, {
|
87
|
-
containers: { pm: { commandable: true, stateless: false, path:
|
79
|
+
containers: { pm: { commandable: true, stateless: false, path: fileURLToPath(new URL('../../../commands.json', import.meta.url)) } },
|
88
80
|
mapping: { pm: { cwd: process.cwd(), container: 'pm' } },
|
89
81
|
plugins: []
|
90
82
|
});
|
83
|
+
this.config.mapping['pm'].set('connect', serveMetadata('pm', { options: context.options, args: context.options.args }));
|
91
84
|
if (context && context.args.length)
|
92
85
|
await container.dispatch('connect', 'pm', context);
|
93
86
|
else {
|