@akala/pm 5.2.20 → 5.2.21
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 +3 -2
- package/dist/cjs/cli-helper.js +1 -1
- package/dist/cjs/cli-helper.js.map +1 -1
- package/dist/cjs/cli.js +4 -5
- package/dist/cjs/cli.js.map +1 -1
- package/dist/esm/cli-helper.js +1 -1
- package/dist/esm/cli-helper.js.map +1 -1
- package/dist/esm/cli.js +4 -5
- package/dist/esm/cli.js.map +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/cli-helper.ts +1 -1
- package/src/cli.ts +6 -6
package/src/cli.ts
CHANGED
@@ -40,7 +40,7 @@ cli.command('start pm')
|
|
40
40
|
.action(c =>
|
41
41
|
{
|
42
42
|
c.options['name'] = 'pm'
|
43
|
-
c.options['program'] =
|
43
|
+
c.options['program'] = new URL('../../commands.json', import.meta.url).toString();
|
44
44
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
45
45
|
return start.call({} as unknown as State, null, 'pm', c as any);
|
46
46
|
});
|
@@ -59,7 +59,7 @@ cli.preAction(async c =>
|
|
59
59
|
const netsocket = socket = new Socket();
|
60
60
|
if (c.options.tls)
|
61
61
|
{
|
62
|
-
socket = new TLSSocket(
|
62
|
+
socket = new TLSSocket(netsocket, {});
|
63
63
|
}
|
64
64
|
|
65
65
|
await new Promise<void>((resolve, reject) =>
|
@@ -84,9 +84,9 @@ cli.preAction(async c =>
|
|
84
84
|
try
|
85
85
|
{
|
86
86
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
87
|
-
|
88
|
-
|
89
|
-
|
87
|
+
import(path.join(homedir(), './.pm.config.json'), { assert: { type: 'json' } }).then(config =>
|
88
|
+
netsocket.connect(config.default.mapping.pm.connect.socket[0])
|
89
|
+
);
|
90
90
|
}
|
91
91
|
catch (e)
|
92
92
|
{
|
@@ -144,7 +144,7 @@ cli.preAction(async c =>
|
|
144
144
|
if (!processor)
|
145
145
|
processor = new Processors.JsonRpc(Processors.JsonRpc.getConnection(new NetSocketAdapter(socket)));
|
146
146
|
if (!metaContainer)
|
147
|
-
metaContainer =
|
147
|
+
metaContainer = (await import(new URL('../../commands.json', import.meta.url).toString(), { assert: { type: 'json' } })).default;
|
148
148
|
if (!container)
|
149
149
|
{
|
150
150
|
container = proxy(metaContainer, processor);
|