@akala/pm 2.7.0 → 3.0.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/changelog.md +13 -2
- package/commands.json +28 -41
- package/dist/commands/$init.d.ts +5 -2
- package/dist/commands/$init.js +15 -24
- package/dist/commands/$init.js.map +1 -1
- package/dist/commands/config.d.ts +1 -1
- package/dist/commands/config.js +7 -5
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/connect.d.ts +1 -1
- package/dist/commands/connect.js +5 -5
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/discover.js +2 -2
- package/dist/commands/discover.js.map +1 -1
- package/dist/commands/log.js +2 -3
- package/dist/commands/log.js.map +1 -1
- package/dist/commands/map.d.ts +1 -1
- package/dist/commands/map.js +3 -3
- package/dist/commands/map.js.map +1 -1
- package/dist/commands/ready.js +1 -2
- package/dist/commands/ready.js.map +1 -1
- package/dist/commands/start.d.ts +1 -1
- package/dist/commands/start.js +42 -32
- package/dist/commands/start.js.map +1 -1
- package/dist/container.d.ts +0 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/new-line-prefixer.js +3 -2
- package/dist/new-line-prefixer.js.map +1 -1
- package/dist/state.d.ts +23 -13
- package/package.json +12 -12
- package/src/commands/$init.json +6 -11
- package/src/commands/$init.ts +17 -29
- package/src/commands/config.ts +11 -7
- package/src/commands/connect.ts +6 -6
- package/src/commands/map.json +20 -3
- package/src/commands/map.ts +3 -3
- package/src/commands/start.ts +42 -29
- package/src/container.ts +16 -18
- package/src/index.ts +3 -0
- package/src/state.ts +26 -10
- package/tsconfig.json +3 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/commands/alias.d.ts +0 -4
- package/dist/commands/alias.js +0 -10
- package/dist/commands/alias.js.map +0 -1
- package/src/commands/alias.json +0 -14
- package/src/commands/alias.ts +0 -9
package/dist/container.d.ts
CHANGED
@@ -2,7 +2,6 @@ import { Argument0, Argument1, Argument2, Argument3 } from '@akala/core';
|
|
2
2
|
declare namespace commands {
|
3
3
|
interface container {
|
4
4
|
dispatch(cmd: '$init', ...args: [Argument1<typeof import('./commands/$init').default>]): ReturnType<typeof import('./commands/$init').default>;
|
5
|
-
dispatch(cmd: 'alias', ...args: [Argument0<typeof import('./commands/alias').default>, Argument1<typeof import('./commands/alias').default>]): ReturnType<typeof import('./commands/alias').default>;
|
6
5
|
dispatch(cmd: 'config', ...args: [Argument0<typeof import('./commands/config').default>, Argument1<typeof import('./commands/config').default>]): ReturnType<typeof import('./commands/config').default>;
|
7
6
|
dispatch(cmd: 'connect', ...args: [Argument0<typeof import('./commands/connect').default>, Argument1<typeof import('./commands/connect').default>]): ReturnType<typeof import('./commands/connect').default>;
|
8
7
|
dispatch(cmd: 'discover', ...args: [Argument0<typeof import('./commands/discover').default>, Argument1<typeof import('./commands/discover').default>]): ReturnType<typeof import('./commands/discover').default>;
|
@@ -20,7 +19,6 @@ declare namespace commands {
|
|
20
19
|
}
|
21
20
|
interface proxy {
|
22
21
|
'$init'(...args: [Argument1<typeof import('./commands/$init').default>]): ReturnType<typeof import('./commands/$init').default>;
|
23
|
-
'alias'(...args: [Argument0<typeof import('./commands/alias').default>, Argument1<typeof import('./commands/alias').default>]): ReturnType<typeof import('./commands/alias').default>;
|
24
22
|
'config'(...args: [Argument0<typeof import('./commands/config').default>, Argument1<typeof import('./commands/config').default>]): ReturnType<typeof import('./commands/config').default>;
|
25
23
|
'connect'(...args: [Argument0<typeof import('./commands/connect').default>, Argument1<typeof import('./commands/connect').default>]): ReturnType<typeof import('./commands/connect').default>;
|
26
24
|
'discover'(...args: [Argument0<typeof import('./commands/discover').default>, Argument1<typeof import('./commands/discover').default>]): ReturnType<typeof import('./commands/discover').default>;
|
package/dist/index.d.ts
CHANGED
@@ -2,6 +2,8 @@ import { Container, Metadata, ServeMetadata, ConnectionPreference } from "@akala
|
|
2
2
|
import definition from './container';
|
3
3
|
declare type pmContainer = definition.container;
|
4
4
|
export { pmContainer as Container };
|
5
|
+
import State from './state';
|
6
|
+
export { State };
|
5
7
|
export declare class InteractError extends Error {
|
6
8
|
as?: string;
|
7
9
|
readonly code = "INTERACT";
|
package/dist/index.js
CHANGED
@@ -8,10 +8,11 @@ const commands_1 = require("@akala/commands");
|
|
8
8
|
const net_1 = require("net");
|
9
9
|
const core_1 = require("@akala/core");
|
10
10
|
class InteractError extends Error {
|
11
|
+
as;
|
12
|
+
code = 'INTERACT';
|
11
13
|
constructor(message, as) {
|
12
14
|
super(message);
|
13
15
|
this.as = as;
|
14
|
-
this.code = 'INTERACT';
|
15
16
|
}
|
16
17
|
toJSON() {
|
17
18
|
return { code: this.code, message: this.message, as: this.as };
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAqK;AACrK,6BAA6B;AAC7B,sCAAqC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAqK;AACrK,6BAA6B;AAC7B,sCAAqC;AAUrC,MAAa,aAAc,SAAQ,KAAK;IAIA;IAFpB,IAAI,GAAG,UAAU,CAAC;IAElC,YAAY,OAAe,EAAS,EAAW;QAE3C,KAAK,CAAC,OAAO,CAAC,CAAC;QAFiB,OAAE,GAAF,EAAE,CAAS;IAG/C,CAAC;IAEM,MAAM;QAET,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;IACnE,CAAC;CACJ;AAbD,sCAaC;AAED,SAAwB,QAAQ,CAAC,OAAe,EAAE,EAAW;IAEzD,MAAM,IAAI,aAAa,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AACzC,CAAC;AAHD,2BAGC;AAEM,KAAK,UAAU,EAA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J,CAAC,CAAC;AACP,CAAC;AA9CD,0BA8CC;AAeD,2DAA4C;AACnC,wBADF,cAAa,CACE"}
|
@@ -12,18 +12,19 @@ function selectColor(namespace) {
|
|
12
12
|
return colors[Math.abs(hash) % colors.length];
|
13
13
|
}
|
14
14
|
class NewLinePrefixer extends stream_1.Transform {
|
15
|
+
prefix;
|
15
16
|
constructor(prefix, options) {
|
16
17
|
super();
|
17
18
|
this.prefix = prefix;
|
18
|
-
this.blankNewLine = true;
|
19
19
|
this.setDefaultEncoding('utf8');
|
20
20
|
this.setEncoding('utf8');
|
21
|
-
if (options
|
21
|
+
if (options?.useColors) {
|
22
22
|
const c = selectColor(prefix);
|
23
23
|
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
|
24
24
|
this.prefix = ` ${colorCode};1m${prefix} \u001B[0m`;
|
25
25
|
}
|
26
26
|
}
|
27
|
+
blankNewLine = true;
|
27
28
|
_transform(chunk, encoding, callback) {
|
28
29
|
if (Buffer.isBuffer(chunk)) {
|
29
30
|
if (encoding == 'buffer')
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"new-line-prefixer.js","sourceRoot":"","sources":["../src/new-line-prefixer.ts"],"names":[],"mappings":";;;AAAA,mCAAsD;AAOtD,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAElC,SAAS,WAAW,CAAC,SAAS;IAE1B,IAAI,IAAI,GAAG,CAAC,CAAC;IAEb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EACzC;QACI,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACtD,IAAI,IAAI,CAAC,CAAC,CAAC,2BAA2B;KACzC;IAED,OAAO,MAAM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,IAAI,CAAC,MAAM,GAAG,KAAK,SAAS,MAAM,MAAM,YAAY,CAAC;SACxD;IACL,CAAC;IAEO,YAAY,GAAG,IAAI,CAAC;IAE5B,UAAU,CAAC,KAAsB,EAAE,QAAmC,EAAE,QAA2B;QAE/F,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC1B;YACI,IAAI,QAAQ,IAAI,QAAQ;gBACpB,QAAQ,GAAG,MAAM,CAAC;YACtB,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,QAAQ,IAAI,MAAM,CAAC,CAAC;SAC9C;QAED,IAAI,OAAO,KAAK,IAAI,QAAQ;YACxB,MAAM,IAAI,KAAK,CAAC,0BAA0B,OAAO,KAAK,EAAE,CAAC,CAAA;QAE7D,IAAI,IAAI,CAAC,YAAY;YACjB,KAAK,GAAG,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QAEhC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEtC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAA;IAEpE,CAAC;CACJ;AArCD,0CAqCC"}
|
package/dist/state.d.ts
CHANGED
@@ -1,30 +1,40 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { Container } from "@akala/commands";
|
3
3
|
import { ChildProcess } from "child_process";
|
4
|
-
import { Deferred } from "@akala/json-rpc-ws";
|
4
|
+
import { Deferred, SerializableObject } from "@akala/json-rpc-ws";
|
5
5
|
import { ServeMetadata } from "@akala/commands";
|
6
|
+
import { ProxyConfiguration } from "@akala/config";
|
6
7
|
export default interface State {
|
7
8
|
processes: {
|
8
9
|
[key: string]: RunningContainer;
|
9
10
|
};
|
10
11
|
isDaemon: boolean;
|
11
|
-
config:
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
externals?: string[];
|
12
|
+
config: ProxyConfiguration<StateConfiguration>;
|
13
|
+
}
|
14
|
+
export interface StateConfiguration {
|
15
|
+
containers: {
|
16
|
+
[key: string]: SidecarMetadata;
|
17
|
+
};
|
18
|
+
mapping: {
|
19
|
+
[key: string]: SidecarConfiguration;
|
20
20
|
};
|
21
21
|
}
|
22
|
-
export interface
|
22
|
+
export interface SidecarMetadata {
|
23
23
|
path: string;
|
24
|
-
process: ChildProcess;
|
25
24
|
dependencies?: string[];
|
25
|
+
commandable: boolean;
|
26
|
+
stateless: boolean;
|
27
|
+
type?: 'nodejs';
|
28
|
+
}
|
29
|
+
export interface SidecarConfiguration<T extends string | SerializableObject = ProxyConfiguration<SerializableObject>> {
|
30
|
+
cli?: string[];
|
31
|
+
container: string;
|
26
32
|
connect?: ServeMetadata;
|
33
|
+
cwd?: string;
|
34
|
+
config?: T;
|
35
|
+
}
|
36
|
+
export interface RunningContainer<T extends string | SerializableObject = any> extends Container<unknown>, SidecarConfiguration<T>, SidecarMetadata {
|
37
|
+
process: ChildProcess;
|
27
38
|
running?: boolean;
|
28
|
-
commandable?: boolean;
|
29
39
|
ready?: Deferred<void>;
|
30
40
|
}
|
package/package.json
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
"pm": "dist/cli.js",
|
5
5
|
"pm-fork": "dist/fork.js"
|
6
6
|
},
|
7
|
-
"version": "
|
7
|
+
"version": "3.0.0",
|
8
8
|
"scripts": {
|
9
9
|
"test": "echo 1",
|
10
10
|
"generate": "ac generate dist/commands commands.json",
|
@@ -18,21 +18,21 @@
|
|
18
18
|
},
|
19
19
|
"homepage": "https://akala.js.org/pm",
|
20
20
|
"dependencies": {
|
21
|
-
"@akala/cli": "
|
22
|
-
"@akala/commands": "2.
|
23
|
-
"@akala/core": "
|
24
|
-
"@akala/json-rpc-ws": "9.
|
25
|
-
"debug": "^4.
|
21
|
+
"@akala/cli": "2.0.0",
|
22
|
+
"@akala/commands": "2.10.0",
|
23
|
+
"@akala/core": "8.0.0",
|
24
|
+
"@akala/json-rpc-ws": "9.4.0",
|
25
|
+
"debug": "^4.3.3",
|
26
26
|
"reflect-metadata": "^0.1.13",
|
27
|
-
"source-map-support": "^0.5.
|
27
|
+
"source-map-support": "^0.5.21"
|
28
28
|
},
|
29
29
|
"devDependencies": {
|
30
|
-
"@types/debug": "^4.1.
|
31
|
-
"@types/mock-require": "^2.0.
|
32
|
-
"@types/node": "^14.
|
30
|
+
"@types/debug": "^4.1.7",
|
31
|
+
"@types/mock-require": "^2.0.1",
|
32
|
+
"@types/node": "^14.18.12",
|
33
33
|
"@types/source-map-support": "^0.5.4",
|
34
|
-
"@types/ws": "^
|
35
|
-
"typescript": "^4.
|
34
|
+
"@types/ws": "^8.5.1",
|
35
|
+
"typescript": "^4.5.5"
|
36
36
|
},
|
37
37
|
"gitHead": "d92f6693ed8cca439c8e92d2045bb15c0a7dae43"
|
38
38
|
}
|
package/src/commands/$init.json
CHANGED
@@ -11,18 +11,13 @@
|
|
11
11
|
"$container",
|
12
12
|
"context"
|
13
13
|
],
|
14
|
+
"usage": "cmd [config]",
|
14
15
|
"options": {
|
15
|
-
"
|
16
|
-
"needsValue": true
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
},
|
21
|
-
"key": {
|
22
|
-
"needsValue": true
|
23
|
-
},
|
24
|
-
"cert": {
|
25
|
-
"needsValue": true
|
16
|
+
"config": {
|
17
|
+
"needsValue": true,
|
18
|
+
"aliases": [
|
19
|
+
"c"
|
20
|
+
]
|
26
21
|
}
|
27
22
|
}
|
28
23
|
}
|
package/src/commands/$init.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import State, { RunningContainer } from '../state'
|
1
|
+
import State, { RunningContainer, StateConfiguration } from '../state'
|
2
2
|
import { homedir } from 'os';
|
3
3
|
import fs from 'fs/promises';
|
4
4
|
import { join } from 'path';
|
@@ -7,6 +7,8 @@ import { Container, Metadata, ignoredCommands, configure, ServeOptions, SelfDefi
|
|
7
7
|
import { eachAsync } from '@akala/core';
|
8
8
|
import { PassThrough, Readable } from 'stream';
|
9
9
|
import { EventEmitter } from 'events';
|
10
|
+
import { CliContext } from '@akala/cli';
|
11
|
+
import Configuration, { ProxyConfiguration } from '@akala/config';
|
10
12
|
|
11
13
|
export async function metadata(container: Container<unknown>, deep?: boolean): Promise<Metadata.Container>
|
12
14
|
{
|
@@ -40,7 +42,7 @@ export function isRunningContainer(c: Container<any>): c is RunningContainer
|
|
40
42
|
return 'running' in c;
|
41
43
|
}
|
42
44
|
|
43
|
-
export default async function (this: State, container: RunningContainer & pmContainer.container,
|
45
|
+
export default async function (this: State, container: RunningContainer & pmContainer.container, context: CliContext<{ config: string }>): Promise<void>
|
44
46
|
{
|
45
47
|
this.isDaemon = true;
|
46
48
|
this.processes = {};
|
@@ -73,36 +75,22 @@ export default async function (this: State, container: RunningContainer & pmCont
|
|
73
75
|
, killed: false
|
74
76
|
});
|
75
77
|
|
76
|
-
const configPath = join(homedir(), './.pm.config.json');
|
77
|
-
|
78
|
-
{
|
79
|
-
this.config = JSON.parse(await fs.readFile(configPath, 'utf-8'));
|
80
|
-
process.chdir(this.config.containers.pm[0]);
|
81
|
-
}
|
82
|
-
catch (e)
|
83
|
-
{
|
84
|
-
if (e.code === 'ENOENT')
|
85
|
-
this.config = {
|
86
|
-
containers: { pm: [process.cwd()] },
|
87
|
-
mapping: {}
|
88
|
-
} as unknown as State['config'];
|
89
|
-
else
|
90
|
-
throw e;
|
91
|
-
}
|
78
|
+
const configPath = context.options.config || join(homedir(), './.pm.config.json');
|
79
|
+
this.config = await Configuration.load<StateConfiguration>(configPath);
|
92
80
|
|
93
|
-
this.config
|
81
|
+
if (this.config)
|
94
82
|
{
|
95
|
-
|
83
|
+
if (this.config.mapping.pm.cwd)
|
84
|
+
process.chdir(this.config.mapping.pm.cwd);
|
96
85
|
}
|
86
|
+
else
|
87
|
+
this.config = Configuration.new<StateConfiguration>(configPath, {
|
88
|
+
containers: { pm: { commandable: true, path: require.resolve('../../commands.json'), stateless: false } },
|
89
|
+
mapping: { pm: { cwd: process.cwd(), container: 'pm' } }
|
90
|
+
}) as State['config'];
|
97
91
|
|
98
|
-
if (
|
99
|
-
|
100
|
-
|
101
|
-
if (!this.config.mapping['pm'])
|
102
|
-
await container.dispatch('map', 'pm', join(__dirname, '../../commands.json'), true);
|
103
|
-
|
104
|
-
if (options && options.args.length)
|
105
|
-
await container.dispatch('connect', 'pm', options);
|
92
|
+
if (context && context.args.length)
|
93
|
+
await container.dispatch('connect', 'pm', context);
|
106
94
|
else
|
107
95
|
{
|
108
96
|
const connectOptions = await container.dispatch('connect', 'pm');
|
@@ -110,7 +98,7 @@ export default async function (this: State, container: RunningContainer & pmCont
|
|
110
98
|
await container.dispatch('connect', 'pm', { args: ['local'] });
|
111
99
|
}
|
112
100
|
|
113
|
-
await this.config.
|
101
|
+
await this.config.commit();
|
114
102
|
container.name = 'pm';
|
115
103
|
const config = container.resolve<Metadata.Configurations>('$metadata.config');
|
116
104
|
container.unregister('$metadata');
|
package/src/commands/config.ts
CHANGED
@@ -1,26 +1,30 @@
|
|
1
1
|
import * as cli from "@akala/cli";
|
2
2
|
import { CliContext } from "@akala/cli";
|
3
3
|
import State from '../state';
|
4
|
+
import Configuration from "@akala/config";
|
4
5
|
|
5
|
-
export default async function config(this: State, name: string, options: CliContext['options']): Promise<string[] | State['config']>
|
6
|
+
export default async function config(this: State, name: string | undefined | void, options: CliContext['options'] | undefined | void): Promise<string[] | State['config'] | State['config']['containers']['']>
|
6
7
|
{
|
7
8
|
// debugger;
|
8
9
|
if (options)
|
9
10
|
{
|
10
11
|
const args = cli.unparseOptions(options);
|
11
|
-
if (args[1] && args[1] == 'set')
|
12
|
-
{
|
13
|
-
this.config.containers[name] = args.slice(2);
|
14
|
-
await this.config.save();
|
15
|
-
}
|
16
12
|
|
17
13
|
if (typeof name == 'undefined')
|
18
14
|
return this.config;
|
19
15
|
|
16
|
+
if (args[1] && args[1] == 'set')
|
17
|
+
{
|
18
|
+
this.config.mapping[name].cli = args.slice(2);
|
19
|
+
await this.config.commit();
|
20
|
+
}
|
21
|
+
|
20
22
|
return this.config.containers[name];
|
21
23
|
}
|
22
|
-
else
|
24
|
+
else if (typeof name !== 'undefined')
|
23
25
|
return this.config.containers[name];
|
26
|
+
else
|
27
|
+
return this.config;
|
24
28
|
}
|
25
29
|
|
26
30
|
exports.default.$inject = ['param.0', 'options']
|
package/src/commands/connect.ts
CHANGED
@@ -4,24 +4,24 @@ import { serveMetadata } from "@akala/commands";
|
|
4
4
|
import State from '../state';
|
5
5
|
|
6
6
|
export default async function connect(this: State, name: string): Promise<ServeMetadata>
|
7
|
-
export default async function connect(this: State, name: string,
|
8
|
-
export default async function connect(this: State, name: string,
|
7
|
+
export default async function connect(this: State, name: string, context?: ServeOptions): Promise<void>
|
8
|
+
export default async function connect(this: State, name: string, context?: ServeOptions): Promise<ServeMetadata | void>
|
9
9
|
{
|
10
10
|
let mapping = this.config.mapping[name];
|
11
11
|
if (!mapping)
|
12
|
-
mapping = Object.values(this.config.mapping).find(m => m.
|
12
|
+
mapping = Object.values(this.config.mapping).find(m => m.container === name);
|
13
13
|
if (!mapping)
|
14
14
|
mapping = this.processes[name];
|
15
15
|
// console.log(name);
|
16
16
|
// console.log(mapping);
|
17
17
|
// console.log(options);
|
18
|
-
if (
|
19
|
-
mapping.connect = serveMetadata(name,
|
18
|
+
if (context && context.args.length > 0)
|
19
|
+
mapping.connect = serveMetadata(name, context);
|
20
20
|
else
|
21
21
|
{
|
22
22
|
if (!mapping)
|
23
23
|
throw new ErrorWithStatus(404, `Mapping ${name} could not be found`);
|
24
24
|
return mapping.connect;
|
25
25
|
}
|
26
|
-
await this.config.
|
26
|
+
await this.config.commit()
|
27
27
|
}
|
package/src/commands/map.json
CHANGED
@@ -5,7 +5,8 @@
|
|
5
5
|
"param.0",
|
6
6
|
"param.1",
|
7
7
|
"param.2",
|
8
|
-
"param.3"
|
8
|
+
"param.3",
|
9
|
+
"param.4"
|
9
10
|
]
|
10
11
|
},
|
11
12
|
"cli": {
|
@@ -13,7 +14,23 @@
|
|
13
14
|
"param.0",
|
14
15
|
"param.1",
|
15
16
|
"cwd",
|
16
|
-
"options.c"
|
17
|
-
|
17
|
+
"options.c",
|
18
|
+
"options.s"
|
19
|
+
],
|
20
|
+
"options": {
|
21
|
+
"commandable": {
|
22
|
+
"aliases": [
|
23
|
+
"c"
|
24
|
+
],
|
25
|
+
"needsValue": false
|
26
|
+
},
|
27
|
+
"stateless": {
|
28
|
+
"aliases": [
|
29
|
+
"s",
|
30
|
+
"state-less"
|
31
|
+
],
|
32
|
+
"needsValue": false
|
33
|
+
}
|
34
|
+
}
|
18
35
|
}
|
19
36
|
}
|
package/src/commands/map.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import State from '../state';
|
2
2
|
import { isAbsolute, resolve } from "path";
|
3
3
|
|
4
|
-
export default async function map<TName extends string>(this: State, name: TName, targetPath: string, cwd?: string, commandable?: boolean): Promise<State['config']['mapping'][TName]>
|
4
|
+
export default async function map<TName extends string>(this: State, name: TName, targetPath: string, cwd?: string, commandable?: boolean, stateless?: boolean): Promise<State['config']['mapping'][TName]>
|
5
5
|
{
|
6
6
|
if (!isAbsolute(targetPath))
|
7
7
|
targetPath = resolve(cwd || process.cwd(), targetPath);
|
8
|
-
this.config.
|
9
|
-
await this.config.
|
8
|
+
this.config.containers[name] = { path: targetPath, commandable: !!commandable, stateless: !!commandable && !!stateless };
|
9
|
+
await this.config.commit();
|
10
10
|
return this.config.mapping[name]
|
11
11
|
}
|
package/src/commands/start.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Container, Processors, Metadata, registerCommands, Cli } from "@akala/commands";
|
2
|
-
import State, { RunningContainer } from '../state';
|
2
|
+
import State, { RunningContainer, SidecarMetadata } from '../state';
|
3
3
|
import { spawn, ChildProcess, StdioOptions } from "child_process";
|
4
4
|
import pmContainer from '../container';
|
5
5
|
import * as jsonrpc from '@akala/json-rpc-ws'
|
@@ -10,19 +10,26 @@ import { SocketAdapterEventMap } from "@akala/json-rpc-ws";
|
|
10
10
|
import { CliContext, ErrorWithStatus } from "@akala/cli";
|
11
11
|
import getRandomName from "./name";
|
12
12
|
|
13
|
-
export default async function start(this: State, pm: pmContainer.container & Container<State>, name: string,
|
13
|
+
export default async function start(this: State, pm: pmContainer.container & Container<State>, 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 }>
|
14
14
|
{
|
15
15
|
let args: string[];
|
16
16
|
|
17
|
-
if (!
|
18
|
-
|
19
|
-
else if (!
|
20
|
-
|
17
|
+
if (!context.options.name && context.options.new)
|
18
|
+
context.options.name = getRandomName();
|
19
|
+
else if (!context.options.name)
|
20
|
+
context.options.name = name;
|
21
|
+
|
22
|
+
var instanceConfig = this.config.mapping[context.options.name];
|
23
|
+
var def: SidecarMetadata;
|
24
|
+
if (typeof instanceConfig == 'undefined')
|
25
|
+
def = this.config.containers[name];
|
26
|
+
else
|
27
|
+
def = this.config.containers[instanceConfig.container];
|
21
28
|
|
22
29
|
if (this.isDaemon)
|
23
30
|
{
|
24
31
|
// eslint-disable-next-line no-var
|
25
|
-
var container = this.processes[
|
32
|
+
var container = this.processes[context.options.name];
|
26
33
|
if (container && container.running)
|
27
34
|
throw new Error(container.name + ' is already started');
|
28
35
|
args = await pm.dispatch('config', name) as string[];
|
@@ -31,15 +38,15 @@ export default async function start(this: State, pm: pmContainer.container & Con
|
|
31
38
|
else
|
32
39
|
args = [];
|
33
40
|
|
34
|
-
if (!
|
41
|
+
if (!def && name != 'pm')
|
35
42
|
{
|
36
|
-
require.resolve(name);
|
37
|
-
|
43
|
+
// require.resolve(name);
|
44
|
+
throw new ErrorWithStatus(404, `No mapping was found for ${name}. Did you want to run \`pm install ${name}\` or maybe are you missing the folder to ${name} ?`)
|
38
45
|
}
|
39
46
|
|
40
|
-
args.unshift(...
|
41
|
-
if (
|
42
|
-
args.unshift('--program=' +
|
47
|
+
args.unshift(...context.args, ...Object.entries(context.options).filter(e => e[0] != 'program' && e[0] != 'new' && e[0] != 'inspect').map(entries => ['--' + entries[0] + '=' + entries[1]]).flat());
|
48
|
+
if (def && def.path)
|
49
|
+
args.unshift('--program=' + def.path);
|
43
50
|
else
|
44
51
|
args.unshift('--program=' + name);
|
45
52
|
}
|
@@ -48,20 +55,20 @@ export default async function start(this: State, pm: pmContainer.container & Con
|
|
48
55
|
if (name != 'pm')
|
49
56
|
throw new ErrorWithStatus(40, 'this command needs to run through daemon process');
|
50
57
|
|
51
|
-
args = [...
|
58
|
+
args = [...context.args, ...Object.entries(context.options).map(entries => ['--' + entries[0] + '=' + entries[1]]).flat()];
|
52
59
|
}
|
53
60
|
|
54
61
|
args.unshift(require.resolve('../fork'))
|
55
62
|
|
56
|
-
if (
|
63
|
+
if (context.options && context.options.inspect)
|
57
64
|
args.unshift('--inspect-brk');
|
58
65
|
|
59
66
|
args.unshift(...process.execArgv);
|
60
67
|
|
61
|
-
if (
|
68
|
+
if (context.options && context.options.verbose)
|
62
69
|
args.push('-v')
|
63
70
|
|
64
|
-
const log = debug('akala:pm:' +
|
71
|
+
const log = debug('akala:pm:' + context.options.name);
|
65
72
|
let cp: ChildProcess;
|
66
73
|
if (!this.isDaemon)
|
67
74
|
{
|
@@ -87,12 +94,18 @@ export default async function start(this: State, pm: pmContainer.container & Con
|
|
87
94
|
}
|
88
95
|
else
|
89
96
|
{
|
90
|
-
if (!container && this.config.
|
91
|
-
|
97
|
+
if (!container && this.config.containers[name]?.dependencies?.length)
|
98
|
+
{
|
99
|
+
var missingDeps = def.dependencies.filter(d => !this.config.mapping[d]);
|
100
|
+
if (missingDeps.length > 0)
|
101
|
+
throw new ErrorWithStatus(404, `Some dependencies are missing to start ${context.options.name}:\n\t-${missingDeps.join('\n\t-')}`);
|
102
|
+
|
103
|
+
await eachAsync(def.dependencies, (dep) => pm.dispatch('start', dep, { name: context.options.name + '-' + dep, wait: true }));
|
104
|
+
}
|
92
105
|
|
93
106
|
cp = spawn(process.execPath, args, { cwd: process.cwd(), env: Object.assign({ DEBUG_COLORS: true }, process.env), stdio: ['ignore', 'pipe', 'pipe', 'ipc'], shell: false, windowsHide: true });
|
94
|
-
cp.stderr?.pipe(new NewLinePrefixer(
|
95
|
-
cp.stdout?.pipe(new NewLinePrefixer(
|
107
|
+
cp.stderr?.pipe(new NewLinePrefixer(context.options.name + ' ', { useColors: true })).pipe(process.stderr);
|
108
|
+
cp.stdout?.pipe(new NewLinePrefixer(context.options.name + ' ', { useColors: true })).pipe(process.stdout);
|
96
109
|
|
97
110
|
if (!container || !container.running)
|
98
111
|
{
|
@@ -124,24 +137,23 @@ export default async function start(this: State, pm: pmContainer.container & Con
|
|
124
137
|
}
|
125
138
|
, disconnected()
|
126
139
|
{
|
127
|
-
console.warn(`${
|
140
|
+
console.warn(`${context.options.name} has disconnected`);
|
128
141
|
container.running = null;
|
129
142
|
}
|
130
143
|
}), true);
|
131
144
|
|
132
145
|
if (container)
|
133
|
-
container = new Container(
|
146
|
+
container = new Container(context.options.name, null, processor) as RunningContainer;
|
134
147
|
else
|
135
|
-
container = new Container(
|
148
|
+
container = new Container(context.options.name, null, processor) as RunningContainer;
|
136
149
|
|
137
|
-
if (
|
150
|
+
if (def?.commandable)
|
138
151
|
pm.register(container);
|
139
152
|
|
140
|
-
this.processes[
|
153
|
+
this.processes[context.options.name] = container;
|
141
154
|
}
|
142
155
|
container.process = cp;
|
143
|
-
container
|
144
|
-
container.commandable = this.config.mapping[name].commandable;
|
156
|
+
Object.assign(container, def, instanceConfig);
|
145
157
|
container.ready = new jsonrpc.Deferred();
|
146
158
|
if (container.commandable)
|
147
159
|
{
|
@@ -164,8 +176,9 @@ export default async function start(this: State, pm: pmContainer.container & Con
|
|
164
176
|
{
|
165
177
|
(container as RunningContainer).running = false;
|
166
178
|
pm.unregister(container.name);
|
179
|
+
container.ready.reject(new Error('program stopped'));
|
167
180
|
});
|
168
|
-
if (
|
181
|
+
if (context.options.wait && container.commandable)
|
169
182
|
await container.ready;
|
170
183
|
return { execPath: process.execPath, args: args, cwd: process.cwd(), stdio: ['inherit', 'inherit', 'inherit', 'ipc'], shell: false, windowsHide: true };
|
171
184
|
}
|
package/src/container.ts
CHANGED
@@ -1,31 +1,29 @@
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
2
|
-
import {Arguments, Argument0, Argument1, Argument2, Argument3, Argument4, Argument5, Argument6, Argument7, Argument8, Argument9, Argument10, Argument11, Argument12, Argument13, Argument14, Argument15, Argument16, Argument17 } from '@akala/core';
|
2
|
+
import { Arguments, Argument0, Argument1, Argument2, Argument3, Argument4, Argument5, Argument6, Argument7, Argument8, Argument9, Argument10, Argument11, Argument12, Argument13, Argument14, Argument15, Argument16, Argument17 } from '@akala/core';
|
3
3
|
// eslint-disable-next-line @typescript-eslint/no-namespace
|
4
4
|
namespace commands
|
5
5
|
{
|
6
6
|
export interface container
|
7
7
|
{
|
8
|
-
dispatch
|
9
|
-
dispatch
|
10
|
-
dispatch
|
11
|
-
dispatch
|
12
|
-
dispatch
|
13
|
-
dispatch
|
14
|
-
dispatch
|
15
|
-
dispatch
|
16
|
-
dispatch
|
17
|
-
dispatch
|
18
|
-
dispatch
|
19
|
-
dispatch
|
20
|
-
dispatch
|
21
|
-
dispatch
|
22
|
-
dispatch
|
23
|
-
dispatch (cmd:'version', ...args: [Argument0<typeof import('./commands/version').default>, Argument1<typeof import('./commands/version').default>]): ReturnType<typeof import('./commands/version').default>
|
8
|
+
dispatch(cmd: '$init', ...args: [Argument1<typeof import('./commands/$init').default>]): ReturnType<typeof import('./commands/$init').default>
|
9
|
+
dispatch(cmd: 'config', ...args: [Argument0<typeof import('./commands/config').default>, Argument1<typeof import('./commands/config').default>]): ReturnType<typeof import('./commands/config').default>
|
10
|
+
dispatch(cmd: 'connect', ...args: [Argument0<typeof import('./commands/connect').default>, Argument1<typeof import('./commands/connect').default>]): ReturnType<typeof import('./commands/connect').default>
|
11
|
+
dispatch(cmd: 'discover', ...args: [Argument0<typeof import('./commands/discover').default>, Argument1<typeof import('./commands/discover').default>]): ReturnType<typeof import('./commands/discover').default>
|
12
|
+
dispatch(cmd: 'install', ...args: [Argument0<typeof import('./commands/install').default>]): ReturnType<typeof import('./commands/install').default>
|
13
|
+
dispatch(cmd: 'link', ...args: [Argument0<typeof import('./commands/link').default>, Argument1<typeof import('./commands/link').default>]): ReturnType<typeof import('./commands/link').default>
|
14
|
+
dispatch(cmd: 'log', ...args: [Argument0<typeof import('./commands/log').default>]): ReturnType<typeof import('./commands/log').default>
|
15
|
+
dispatch(cmd: 'ls', ...args: []): ReturnType<typeof import('./commands/ls').default>
|
16
|
+
dispatch(cmd: 'map', ...args: [Argument0<typeof import('./commands/map').default>, Argument1<typeof import('./commands/map').default>, Argument2<typeof import('./commands/map').default>, Argument3<typeof import('./commands/map').default>]): ReturnType<typeof import('./commands/map').default>
|
17
|
+
dispatch(cmd: 'ready', ...args: []): ReturnType<typeof import('./commands/ready').default>
|
18
|
+
dispatch(cmd: 'start', ...args: [Argument1<typeof import('./commands/start').default>, Argument2<typeof import('./commands/start').default>]): ReturnType<typeof import('./commands/start').default>
|
19
|
+
dispatch(cmd: 'status', ...args: [Argument0<typeof import('./commands/status').default>]): ReturnType<typeof import('./commands/status').default>
|
20
|
+
dispatch(cmd: 'stop', ...args: [Argument0<typeof import('./commands/stop').default>]): ReturnType<typeof import('./commands/stop').default>
|
21
|
+
dispatch(cmd: 'update', ...args: [Argument0<typeof import('./commands/update').default>, Argument1<typeof import('./commands/update').default>]): ReturnType<typeof import('./commands/update').default>
|
22
|
+
dispatch(cmd: 'version', ...args: [Argument0<typeof import('./commands/version').default>, Argument1<typeof import('./commands/version').default>]): ReturnType<typeof import('./commands/version').default>
|
24
23
|
}
|
25
24
|
export interface proxy
|
26
25
|
{
|
27
26
|
'$init'(...args: [Argument1<typeof import('./commands/$init').default>]): ReturnType<typeof import('./commands/$init').default>
|
28
|
-
'alias'(...args: [Argument0<typeof import('./commands/alias').default>, Argument1<typeof import('./commands/alias').default>]): ReturnType<typeof import('./commands/alias').default>
|
29
27
|
'config'(...args: [Argument0<typeof import('./commands/config').default>, Argument1<typeof import('./commands/config').default>]): ReturnType<typeof import('./commands/config').default>
|
30
28
|
'connect'(...args: [Argument0<typeof import('./commands/connect').default>, Argument1<typeof import('./commands/connect').default>]): ReturnType<typeof import('./commands/connect').default>
|
31
29
|
'discover'(...args: [Argument0<typeof import('./commands/discover').default>, Argument1<typeof import('./commands/discover').default>]): ReturnType<typeof import('./commands/discover').default>
|