@akala/pm 9.3.17 → 10.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 +199 -1
- package/commands.json +151 -7
- package/dist/esm/commands/version.js +0 -1
- package/dist/esm/commands/version.js.map +1 -1
- package/dist/esm/container.js +1 -1
- package/dist/esm/container.js.map +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/cli-commands/start-self.json +1 -1
- package/src/commands/$init.json +1 -1
- package/src/commands/bridge.json +1 -1
- package/src/commands/discover.json +1 -1
- package/src/commands/install.json +1 -1
- package/src/commands/link.json +1 -1
- package/src/commands/log.json +1 -1
- package/src/commands/ls.json +4 -1
- package/src/commands/map.json +1 -1
- package/src/commands/plugin/add.json +1 -1
- package/src/commands/plugin/remove.json +1 -1
- package/src/commands/proxy.json +1 -1
- package/src/commands/ready.json +1 -1
- package/src/commands/reload-metadata.json +1 -1
- package/src/commands/restart.json +46 -5
- package/src/commands/start.json +53 -1
- package/src/commands/status.json +17 -1
- package/src/commands/stop.json +18 -1
- package/src/commands/update.json +1 -1
- package/src/commands/version.json +17 -2
- package/src/commands/version.ts +1 -3
- package/src/container.ts +5 -5
- package/test.json +1 -1
package/package.json
CHANGED
@@ -4,10 +4,10 @@
|
|
4
4
|
"pm": "dist/esm/cli.js",
|
5
5
|
"pm-fork": "dist/esm/fork.js"
|
6
6
|
},
|
7
|
-
"version": "
|
7
|
+
"version": "10.0.0",
|
8
8
|
"scripts": {
|
9
9
|
"test": "echo 1",
|
10
|
-
"generate": "ac generate dist/esm/commands commands.json",
|
10
|
+
"generate": "ac generate dist/esm/commands commands.json --name pm",
|
11
11
|
"generate-metadata": "ac generate-metadata commands.json src/container.ts",
|
12
12
|
"prepack": "../../makeCjs.sh",
|
13
13
|
"akala-install": "akala plugins add dist/esm/akala.mjs"
|
@@ -29,11 +29,11 @@
|
|
29
29
|
"src/fork.ts"
|
30
30
|
],
|
31
31
|
"dependencies": {
|
32
|
-
"@akala/cli": "^
|
33
|
-
"@akala/commands": "^
|
34
|
-
"@akala/config": "^
|
35
|
-
"@akala/core": "^
|
36
|
-
"@akala/json-rpc-ws": "^
|
32
|
+
"@akala/cli": "^3.0.0",
|
33
|
+
"@akala/commands": "^9.0.0",
|
34
|
+
"@akala/config": "^5.0.0",
|
35
|
+
"@akala/core": "^19.0.0",
|
36
|
+
"@akala/json-rpc-ws": "^11.0.0",
|
37
37
|
"reflect-metadata": "^0.2.2",
|
38
38
|
"source-map-support": "^0.5.21"
|
39
39
|
},
|
package/src/commands/$init.json
CHANGED
package/src/commands/bridge.json
CHANGED
package/src/commands/link.json
CHANGED
package/src/commands/log.json
CHANGED
package/src/commands/ls.json
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
{
|
2
|
-
"$schema": "https://raw.githubusercontent.com/npenin/akala/
|
2
|
+
"$schema": "https://raw.githubusercontent.com/npenin/akala/main/packages/commands/command-schema.json",
|
3
3
|
"": {
|
4
4
|
"inject": []
|
5
5
|
},
|
6
6
|
"cli": {
|
7
7
|
"inject": []
|
8
|
+
},
|
9
|
+
"html-form": {
|
10
|
+
"inject": []
|
8
11
|
}
|
9
12
|
}
|
package/src/commands/map.json
CHANGED
package/src/commands/proxy.json
CHANGED
package/src/commands/ready.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"$schema": "https://raw.githubusercontent.com/npenin/akala/
|
2
|
+
"$schema": "https://raw.githubusercontent.com/npenin/akala/main/packages/commands/command-schema.json",
|
3
3
|
"": {
|
4
4
|
"inject": [
|
5
5
|
"$container",
|
@@ -12,16 +12,57 @@
|
|
12
12
|
"wait": {
|
13
13
|
"aliases": [
|
14
14
|
"w"
|
15
|
-
]
|
15
|
+
],
|
16
|
+
"needsValue": false,
|
17
|
+
"doc": "waits for the program to be started before returning, otherwise, returns after the start command is sent to the pm daemon"
|
16
18
|
},
|
17
|
-
"inspect": {
|
18
|
-
|
19
|
-
|
19
|
+
"inspect": {
|
20
|
+
"needsValue": false,
|
21
|
+
"doc": "starts the process with --inspect-brk parameter to help debugging"
|
22
|
+
},
|
23
|
+
"new": {
|
24
|
+
"needsValue": false
|
25
|
+
},
|
26
|
+
"name": {
|
27
|
+
"doc": "name to assign to the process",
|
28
|
+
"needsValue": true
|
29
|
+
},
|
30
|
+
"program": {
|
31
|
+
"doc": "program to start"
|
32
|
+
}
|
20
33
|
},
|
21
34
|
"inject": [
|
22
35
|
"$container",
|
23
36
|
"param.0",
|
24
37
|
"context"
|
38
|
+
],
|
39
|
+
"usage": "restart <program>"
|
40
|
+
},
|
41
|
+
"schema": {
|
42
|
+
"inject": [
|
43
|
+
"$container",
|
44
|
+
"param.0",
|
45
|
+
"param.1"
|
46
|
+
],
|
47
|
+
"$defs": {
|
48
|
+
"param.0": {
|
49
|
+
"type": "string"
|
50
|
+
},
|
51
|
+
"param.1": {
|
52
|
+
"type": "object",
|
53
|
+
"properties": {
|
54
|
+
"wait": {
|
55
|
+
"type": "boolean"
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
},
|
61
|
+
"html-form": {
|
62
|
+
"inject": [
|
63
|
+
"$container",
|
64
|
+
"param.0",
|
65
|
+
"param.1"
|
25
66
|
]
|
26
67
|
}
|
27
68
|
}
|
package/src/commands/start.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"$schema": "https://raw.githubusercontent.com/npenin/akala/
|
2
|
+
"$schema": "https://raw.githubusercontent.com/npenin/akala/main/packages/commands/command-schema.json",
|
3
3
|
"": {
|
4
4
|
"inject": [
|
5
5
|
"$container",
|
@@ -39,5 +39,57 @@
|
|
39
39
|
"context"
|
40
40
|
],
|
41
41
|
"usage": "start <program>"
|
42
|
+
},
|
43
|
+
"html-form": {
|
44
|
+
"inject": [
|
45
|
+
"$container",
|
46
|
+
"param.0",
|
47
|
+
"param.1",
|
48
|
+
"param.2"
|
49
|
+
]
|
50
|
+
},
|
51
|
+
"schema": {
|
52
|
+
"inject": [
|
53
|
+
"$container",
|
54
|
+
"param.0",
|
55
|
+
"param.1",
|
56
|
+
"param.2"
|
57
|
+
],
|
58
|
+
"$defs": {
|
59
|
+
"param.0": {
|
60
|
+
"type": "string"
|
61
|
+
},
|
62
|
+
"param.1": {
|
63
|
+
"type": "object",
|
64
|
+
"properties": {
|
65
|
+
"wait": {
|
66
|
+
"type": "boolean"
|
67
|
+
},
|
68
|
+
"inspect": {
|
69
|
+
"type": "boolean"
|
70
|
+
},
|
71
|
+
"new": {
|
72
|
+
"type": "boolean"
|
73
|
+
},
|
74
|
+
"name": {
|
75
|
+
"type": "string"
|
76
|
+
},
|
77
|
+
"program": {
|
78
|
+
"type": "string"
|
79
|
+
}
|
80
|
+
}
|
81
|
+
},
|
82
|
+
"param.2": {
|
83
|
+
"type": "object",
|
84
|
+
"properties": {
|
85
|
+
"args": {
|
86
|
+
"type": "array",
|
87
|
+
"items": {
|
88
|
+
"type": "string"
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
42
94
|
}
|
43
95
|
}
|
package/src/commands/status.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"$schema": "https://raw.githubusercontent.com/npenin/akala/
|
2
|
+
"$schema": "https://raw.githubusercontent.com/npenin/akala/main/packages/commands/command-schema.json",
|
3
3
|
"": {
|
4
4
|
"inject": [
|
5
5
|
"param.0"
|
@@ -9,5 +9,21 @@
|
|
9
9
|
"inject": [
|
10
10
|
"param.0"
|
11
11
|
]
|
12
|
+
},
|
13
|
+
"html-form": {
|
14
|
+
"inject": [
|
15
|
+
"param.0"
|
16
|
+
]
|
17
|
+
},
|
18
|
+
"schema": {
|
19
|
+
"inject": [
|
20
|
+
"param.0"
|
21
|
+
],
|
22
|
+
"$defs": {
|
23
|
+
"param.0": {
|
24
|
+
"type": "string",
|
25
|
+
"description": "The name of the container to get the status of"
|
26
|
+
}
|
27
|
+
}
|
12
28
|
}
|
13
29
|
}
|
package/src/commands/stop.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"$schema": "https://raw.githubusercontent.com/npenin/akala/
|
2
|
+
"$schema": "https://raw.githubusercontent.com/npenin/akala/main/packages/commands/command-schema.json",
|
3
3
|
"": {
|
4
4
|
"inject": [
|
5
5
|
"param.0",
|
@@ -17,5 +17,22 @@
|
|
17
17
|
}
|
18
18
|
},
|
19
19
|
"usage": "stop [process]"
|
20
|
+
},
|
21
|
+
"html-form": {
|
22
|
+
"inject": [
|
23
|
+
"param.0",
|
24
|
+
"$container"
|
25
|
+
]
|
26
|
+
},
|
27
|
+
"schema": {
|
28
|
+
"inject": [
|
29
|
+
"param.0",
|
30
|
+
"$container"
|
31
|
+
],
|
32
|
+
"$defs": {
|
33
|
+
"param.0": {
|
34
|
+
"type": "string"
|
35
|
+
}
|
36
|
+
}
|
20
37
|
}
|
21
38
|
}
|
package/src/commands/update.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"$schema": "https://raw.githubusercontent.com/npenin/akala/
|
2
|
+
"$schema": "https://raw.githubusercontent.com/npenin/akala/main/packages/commands/command-schema.json",
|
3
3
|
"": {
|
4
4
|
"inject": [
|
5
5
|
"param.0",
|
@@ -7,9 +7,24 @@
|
|
7
7
|
]
|
8
8
|
},
|
9
9
|
"cli": {
|
10
|
+
"inject": [
|
11
|
+
"options.packageName",
|
12
|
+
"options.folder"
|
13
|
+
],
|
14
|
+
"usage": "version <packageName> [folder]"
|
15
|
+
},
|
16
|
+
"schema": {
|
10
17
|
"inject": [
|
11
18
|
"param.0",
|
12
19
|
"param.1"
|
13
|
-
]
|
20
|
+
],
|
21
|
+
"$defs": {
|
22
|
+
"param.0": {
|
23
|
+
"type": "string"
|
24
|
+
},
|
25
|
+
"param.1": {
|
26
|
+
"type": "string"
|
27
|
+
}
|
28
|
+
}
|
14
29
|
}
|
15
30
|
}
|
package/src/commands/version.ts
CHANGED
@@ -14,6 +14,4 @@ export default async function version(this: State, packageName: string, folder:
|
|
14
14
|
delete require.cache[join(path, 'node_modules', packageName, './package.json')];
|
15
15
|
}
|
16
16
|
return packageConfig.version;
|
17
|
-
}
|
18
|
-
|
19
|
-
exports.default.$inject = ['param.0', 'param.1']
|
17
|
+
}
|
package/src/container.ts
CHANGED
@@ -54,13 +54,13 @@ namespace commands
|
|
54
54
|
'update'(...args: [Argument0<typeof import('./commands/update.js').default>, Argument1<typeof import('./commands/update.js').default>, Argument2<typeof import('./commands/update.js').default>]): ReturnType<typeof import('./commands/update.js').default>
|
55
55
|
'version'(...args: [Argument0<typeof import('./commands/version.js').default>, Argument1<typeof import('./commands/version.js').default>]): ReturnType<typeof import('./commands/version.js').default>
|
56
56
|
}
|
57
|
-
export const meta={"name":"
|
57
|
+
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":"config","config":{"fs":{"path":"dist/esm/commands/config.js","source":"src/commands/config.ts","inject":["param.0","param.1"]},"":{"inject":["param.0","param.1"]},"cli":{"inject":["param.0","options"]}}},{"name":"connect","config":{"fs":{"path":"dist/esm/commands/connect.js","source":"src/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":"dist/esm/commands/discover.js","source":"src/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":"dist/esm/commands/install.js","source":"src/commands/install.ts","inject":["param.0","$container"]},"":{"inject":["param.0","$container"]},"cli":{"inject":["param.0","$container"]}}},{"name":"link","config":{"fs":{"path":"dist/esm/commands/link.js","source":"src/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":"dist/esm/commands/log.js","source":"src/commands/log.ts","inject":["param.0"]},"":{"inject":["param.0"]},"cli":{"inject":["param.0"]}}},{"name":"ls","config":{"fs":{"path":"dist/esm/commands/ls.js","source":"src/commands/ls.ts","inject":[]},"":{"inject":[]},"cli":{"inject":[]},"html-form":{"inject":[]}}},{"name":"map","config":{"fs":{"path":"dist/esm/commands/map.js","source":"src/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":"name","config":{"fs":{"path":"dist/esm/commands/name.js","source":"src/commands/name.ts","inject":["param.0"]},"":{"inject":["param.0"]}}},{"name":"plugin.add","config":{"fs":{"inject":["param.0"],"path":"dist/esm/commands/plugin/add.js","source":"src/commands/plugin/add.ts"},"":{"inject":["param.0"]},"cli":{"usage":"add <plugin>","inject":["options.plugin"],"options":{"plugin":{"normalize":true}}}}},{"name":"plugin.remove","config":{"fs":{"inject":["param.0"],"path":"dist/esm/commands/plugin/remove.js","source":"src/commands/plugin/remove.ts"},"":{"inject":["param.0"]},"cli":{"usage":"remove <plugin>","inject":["options.plugin"],"options":{"plugin":{"normalize":true}}}}},{"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"}},"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":"update","config":{"fs":{"path":"dist/esm/commands/update.js","source":"src/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":"dist/esm/commands/version.js","source":"src/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"}}}}}]} as Metadata.Container;
|
58
58
|
|
59
59
|
export function connect(processor?:ICommandProcessor) {
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
60
|
+
const container = new Container<void>("commands", void 0);
|
61
|
+
registerCommands(meta.commands, processor, container);
|
62
|
+
return container as container & Container<void>;
|
63
|
+
}
|
64
64
|
}
|
65
65
|
|
66
66
|
export { commands as default };
|
package/test.json
CHANGED