@akala/pm 5.2.39 → 6.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 +14 -1
- package/commands.json +3 -2
- package/dist/cjs/commands/discover.js +0 -1
- package/dist/cjs/commands/discover.js.map +1 -1
- package/dist/cjs/commands/map.d.ts +0 -1
- package/dist/cjs/commands/map.js +1 -1
- package/dist/cjs/commands/map.js.map +1 -1
- package/dist/cjs/commands/start.js +6 -3
- package/dist/cjs/commands/start.js.map +1 -1
- package/dist/cjs/container.d.ts +0 -2
- package/dist/esm/akala.mjs +7 -1
- package/dist/esm/akala.mjs.map +1 -1
- package/dist/esm/commands/$init.d.ts +2 -1
- package/dist/esm/commands/$init.js +9 -17
- package/dist/esm/commands/$init.js.map +1 -1
- package/dist/esm/commands/discover.js +0 -1
- package/dist/esm/commands/discover.js.map +1 -1
- package/dist/esm/commands/map.d.ts +0 -1
- package/dist/esm/commands/map.js +1 -1
- package/dist/esm/commands/map.js.map +1 -1
- package/dist/esm/commands/start.js +6 -3
- package/dist/esm/commands/start.js.map +1 -1
- package/dist/esm/container.d.ts +0 -2
- package/dist/esm/fork.js +1 -0
- package/dist/esm/fork.js.map +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/src/akala.mts +8 -3
- package/src/commands/$init.json +5 -2
- package/src/commands/$init.ts +11 -20
- package/src/commands/discover.ts +1 -3
- package/src/commands/map.ts +2 -2
- package/src/commands/start.ts +7 -3
- package/src/container.ts +0 -2
- package/src/fork.ts +1 -0
- 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/src/commands/$init.ts
CHANGED
@@ -3,11 +3,12 @@ import { homedir } from 'os';
|
|
3
3
|
import fs from 'fs/promises';
|
4
4
|
import { join } from 'path';
|
5
5
|
import pmContainer from '../container.js';
|
6
|
-
import { Container, Metadata, ignoredCommands, configure, SelfDefinedCommand } from '@akala/commands';
|
6
|
+
import { Container, Metadata, ignoredCommands, configure, SelfDefinedCommand, serveMetadata, ServeOptions } from '@akala/commands';
|
7
7
|
import { PassThrough } from 'stream';
|
8
8
|
import { EventEmitter } from 'events';
|
9
9
|
import { CliContext } from '@akala/cli';
|
10
10
|
import { Configuration } from '@akala/config';
|
11
|
+
import { fileURLToPath } from 'url';
|
11
12
|
|
12
13
|
export async function metadata(container: Container<unknown>, deep?: boolean): Promise<Metadata.Container>
|
13
14
|
{
|
@@ -48,20 +49,8 @@ export function isRunningContainer(c: Container<unknown>): c is RunningContainer
|
|
48
49
|
{
|
49
50
|
return 'running' in c;
|
50
51
|
}
|
51
|
-
declare var require: NodeRequire | undefined;
|
52
52
|
|
53
|
-
|
54
|
-
function requireOrImportJson<T = any>(path: string): Promise<T>
|
55
|
-
{
|
56
|
-
if (require)
|
57
|
-
return Promise.resolve(require(path));
|
58
|
-
else
|
59
|
-
//eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
60
|
-
//@ts-ignore
|
61
|
-
return import(path, { assert: { type: 'json' } }).then(i => i.default)
|
62
|
-
}
|
63
|
-
|
64
|
-
export default async function (this: State, container: RunningContainer & pmContainer.container, context: CliContext<{ config: string, keepAttached: boolean }>): Promise<void>
|
53
|
+
export default async function (this: State, container: RunningContainer & pmContainer.container, context: CliContext<{ configFile: string, keepAttached: boolean, args: string[] }>): Promise<void>
|
65
54
|
{
|
66
55
|
this.isDaemon = true;
|
67
56
|
this.processes = {};
|
@@ -97,7 +86,7 @@ export default async function (this: State, container: RunningContainer & pmCont
|
|
97
86
|
, killed: false
|
98
87
|
});
|
99
88
|
|
100
|
-
const configPath = context.options.
|
89
|
+
const configPath = context.options.configFile || join(homedir(), './.pm.config.json');
|
101
90
|
this.config = await Configuration.load<StateConfiguration>(configPath, true);
|
102
91
|
|
103
92
|
if (this.config?.mapping?.pm)
|
@@ -106,11 +95,13 @@ export default async function (this: State, container: RunningContainer & pmCont
|
|
106
95
|
process.chdir(this.config.mapping.pm.cwd);
|
107
96
|
}
|
108
97
|
else
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
98
|
+
{
|
99
|
+
this.config.set('containers', { pm: { commandable: true, stateless: false, path: fileURLToPath(new URL('../../../commands.json', import.meta.url)) } });
|
100
|
+
this.config.set('mapping', { pm: { cwd: process.cwd(), container: 'pm' } })
|
101
|
+
this.config.set('plugins', [])
|
102
|
+
}
|
103
|
+
|
104
|
+
this.config.mapping['pm'].set('connect', serveMetadata('pm', { options: context.options, args: context.options.args } as unknown as ServeOptions));
|
114
105
|
|
115
106
|
if (context && context.args.length)
|
116
107
|
await container.dispatch('connect', 'pm', context);
|
package/src/commands/discover.ts
CHANGED
@@ -99,6 +99,4 @@ export default async function discover(this: State, packageName: string, folder:
|
|
99
99
|
return pm.dispatch('map', packageName, commandsJsonFile, path, { commandable: true });
|
100
100
|
|
101
101
|
return pm.dispatch('map', packageName, moduleRequire.resolve('./' + packageConfig.main), path, { commandable: false });
|
102
|
-
}
|
103
|
-
|
104
|
-
exports.default.$inject = ['param.0', 'param.1', '$container']
|
102
|
+
}
|
package/src/commands/map.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import State from '../state.js';
|
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, options?: { commandable?: boolean
|
4
|
+
export default async function map<TName extends string>(this: State, name: TName, targetPath: string, cwd?: string, options?: { commandable?: boolean }): Promise<State['config']['mapping'][TName]>
|
5
5
|
{
|
6
6
|
if (!isAbsolute(targetPath))
|
7
7
|
targetPath = resolve(cwd || process.cwd(), targetPath);
|
8
|
-
this.config.containers.set(name, { path: targetPath, commandable: !!options?.commandable
|
8
|
+
this.config.containers.set(name, { path: targetPath, commandable: !!options?.commandable });
|
9
9
|
await this.config.commit();
|
10
10
|
return this.config.mapping[name]
|
11
11
|
}
|
package/src/commands/start.ts
CHANGED
@@ -4,7 +4,7 @@ import { spawn, ChildProcess, StdioOptions } from "child_process";
|
|
4
4
|
import pmContainer from '../container.js';
|
5
5
|
import { Deferred, eachAsync } from "@akala/core";
|
6
6
|
import { NewLinePrefixer } from "../new-line-prefixer.js";
|
7
|
-
import { CliContext } from "@akala/cli";
|
7
|
+
import { CliContext, unparseOptions } from "@akala/cli";
|
8
8
|
import { ErrorWithStatus } from "@akala/core";
|
9
9
|
import getRandomName from "./name.js";
|
10
10
|
import { ProxyConfiguration } from "@akala/config";
|
@@ -47,7 +47,7 @@ export default async function start(this: State, pm: pmContainer.container & Con
|
|
47
47
|
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} ?`)
|
48
48
|
}
|
49
49
|
|
50
|
-
args.unshift(...context.args, ...
|
50
|
+
args.unshift(...context.args, ...unparseOptions({ ...context.options, program: undefined, new: undefined, inspect: undefined }, { ignoreUndefined: true }));
|
51
51
|
if (def && def.get('path'))
|
52
52
|
args.unshift('--program=' + def.get('path'));
|
53
53
|
else
|
@@ -58,11 +58,14 @@ export default async function start(this: State, pm: pmContainer.container & Con
|
|
58
58
|
if (name != 'pm')
|
59
59
|
throw new ErrorWithStatus(40, 'this command needs to run through daemon process');
|
60
60
|
|
61
|
-
args = [...context.args, ...
|
61
|
+
args = [...context.args, ...unparseOptions({ ...context.options, inspect: undefined })];
|
62
62
|
}
|
63
63
|
|
64
64
|
if (!def?.type || def.type == 'nodejs')
|
65
|
+
{
|
66
|
+
|
65
67
|
args.unshift(path.resolve(_dirname, '../fork'))
|
68
|
+
}
|
66
69
|
|
67
70
|
if (context.options && context.options.inspect)
|
68
71
|
args.unshift('--inspect-brk');
|
@@ -153,6 +156,7 @@ export default async function start(this: State, pm: pmContainer.container & Con
|
|
153
156
|
{
|
154
157
|
// console.log(metaContainer);
|
155
158
|
updateCommands(metaContainer.commands, null, container);
|
159
|
+
container.stateless = metaContainer.stateless;
|
156
160
|
pm.register(name, container, true);
|
157
161
|
});
|
158
162
|
}, () =>
|
package/src/container.ts
CHANGED
@@ -7,7 +7,6 @@ namespace commands
|
|
7
7
|
{
|
8
8
|
export interface container
|
9
9
|
{
|
10
|
-
dispatch (cmd:'$init', ...args: [Argument1<typeof import('./commands/$init.js').default>]): ReturnType<typeof import('./commands/$init.js').default>
|
11
10
|
dispatch (cmd:'add', ...args: [Argument0<typeof import('./commands/plugin/add.js').default>]): ReturnType<typeof import('./commands/plugin/add.js').default>
|
12
11
|
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>
|
13
12
|
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>
|
@@ -32,7 +31,6 @@ namespace commands
|
|
32
31
|
}
|
33
32
|
export interface proxy
|
34
33
|
{
|
35
|
-
'$init'(...args: [Argument1<typeof import('./commands/$init.js').default>]): ReturnType<typeof import('./commands/$init.js').default>
|
36
34
|
'add'(...args: [Argument0<typeof import('./commands/plugin/add.js').default>]): ReturnType<typeof import('./commands/plugin/add.js').default>
|
37
35
|
'bridge'(...args: [Argument0<typeof import('./commands/bridge.js').default>, Argument1<typeof import('./commands/bridge.js').default>]): ReturnType<typeof import('./commands/bridge.js').default>
|
38
36
|
'config'(...args: [Argument0<typeof import('./commands/config.js').default>, Argument1<typeof import('./commands/config.js').default>]): ReturnType<typeof import('./commands/config.js').default>
|
package/src/fork.ts
CHANGED
@@ -36,6 +36,7 @@ const controller = new AbortController();
|
|
36
36
|
program.option<string, 'program'>('program', { needsValue: true, normalize: true, positional: true, position: 0 }).
|
37
37
|
option<string, 'name'>('name', { needsValue: true, positional: true, position: 1, optional: true }).
|
38
38
|
option<boolean, 'tls'>('tls', { needsValue: false }).
|
39
|
+
option<string, 'configFile'>('configFile', { needsValue: false }).
|
39
40
|
options<{
|
40
41
|
port?: number,
|
41
42
|
tcpPort?: string,
|
package/tsconfig.cjs.json
CHANGED
@@ -1,10 +0,0 @@
|
|
1
|
-
import State, { RunningContainer } from '../state.js';
|
2
|
-
import pmContainer from '../container.js';
|
3
|
-
import { Container, Metadata } from '@akala/commands';
|
4
|
-
import { CliContext } from '@akala/cli';
|
5
|
-
export declare function metadata(container: Container<unknown>, deep?: boolean): Promise<Metadata.Container>;
|
6
|
-
export declare function isRunningContainer(c: Container<unknown>): c is RunningContainer;
|
7
|
-
export default function (this: State, container: RunningContainer & pmContainer.container, context: CliContext<{
|
8
|
-
config: string;
|
9
|
-
keepAttached: boolean;
|
10
|
-
}>): Promise<void>;
|
@@ -1,145 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
-
});
|
10
|
-
};
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
-
};
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
exports.isRunningContainer = exports.metadata = void 0;
|
16
|
-
const os_1 = require("os");
|
17
|
-
const promises_1 = __importDefault(require("fs/promises"));
|
18
|
-
const path_1 = require("path");
|
19
|
-
const commands_1 = require("@akala/commands");
|
20
|
-
const stream_1 = require("stream");
|
21
|
-
const events_1 = require("events");
|
22
|
-
const config_1 = require("@akala/config");
|
23
|
-
function metadata(container, deep) {
|
24
|
-
return __awaiter(this, void 0, void 0, function* () {
|
25
|
-
const metacontainer = { name: container.name || 'unnamed', commands: [] };
|
26
|
-
yield Promise.all(container.keys().map((key) => __awaiter(this, void 0, void 0, function* () {
|
27
|
-
if (key === '$injector' || key === '$state' || key === '$container' || commands_1.ignoredCommands.indexOf(key) > -1 || key == '$init' || key == '$stop')
|
28
|
-
return;
|
29
|
-
const cmd = container.resolve(key);
|
30
|
-
if (cmd && cmd.name && commands_1.Metadata.isCommand(cmd) && commands_1.ignoredCommands.indexOf(cmd.name) == -1)
|
31
|
-
metacontainer.commands.push({ name: cmd.name, config: cmd.config });
|
32
|
-
else if (cmd instanceof commands_1.Container && deep) {
|
33
|
-
if (!isRunningContainer(cmd) || !cmd.running && !cmd.stateless)
|
34
|
-
return;
|
35
|
-
try {
|
36
|
-
const subContainer = yield cmd.dispatch('$metadata', deep);
|
37
|
-
console.log(subContainer);
|
38
|
-
if (subContainer && subContainer.commands) {
|
39
|
-
subContainer.commands.forEach(c => c.name = key + '.' + c.name);
|
40
|
-
metacontainer.commands.push(...subContainer.commands.filter(c => c.name !== key + '.$init' && c.name !== key + '.$stop'));
|
41
|
-
}
|
42
|
-
}
|
43
|
-
catch (e) {
|
44
|
-
if (!e || e.statusCode == 404)
|
45
|
-
return;
|
46
|
-
throw e;
|
47
|
-
}
|
48
|
-
}
|
49
|
-
})));
|
50
|
-
return metacontainer;
|
51
|
-
});
|
52
|
-
}
|
53
|
-
exports.metadata = metadata;
|
54
|
-
function isRunningContainer(c) {
|
55
|
-
return 'running' in c;
|
56
|
-
}
|
57
|
-
exports.isRunningContainer = isRunningContainer;
|
58
|
-
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
59
|
-
function requireOrImportJson(path) {
|
60
|
-
if (require)
|
61
|
-
return Promise.resolve(require(path));
|
62
|
-
else
|
63
|
-
//eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
64
|
-
//@ts-ignore
|
65
|
-
return import(path, { assert: { type: 'json' } }).then(i => i.default);
|
66
|
-
}
|
67
|
-
function default_1(container, context) {
|
68
|
-
var _a, _b;
|
69
|
-
return __awaiter(this, void 0, void 0, function* () {
|
70
|
-
this.isDaemon = true;
|
71
|
-
this.processes = {};
|
72
|
-
this.bridges = {};
|
73
|
-
const stderr = process.stderr.write;
|
74
|
-
const stderrPT = new stream_1.PassThrough();
|
75
|
-
process.stderr.write = function (...args) {
|
76
|
-
stderr.call(process.stderr, ...args);
|
77
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
78
|
-
return stderrPT.write(...args);
|
79
|
-
};
|
80
|
-
const stdout = process.stdout.write;
|
81
|
-
const stdoutPT = new stream_1.PassThrough();
|
82
|
-
process.stdout.write = function (...args) {
|
83
|
-
stdout.call(process.stdout, ...args);
|
84
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
85
|
-
return stdoutPT.write(...args);
|
86
|
-
};
|
87
|
-
container.process = Object.assign(new events_1.EventEmitter(), {
|
88
|
-
stdout: stdoutPT, stderr: stderrPT, stdio: null, stdin: process.stdin, pid: process.pid, connected: false,
|
89
|
-
exitCode: undefined,
|
90
|
-
signalCode: undefined,
|
91
|
-
spawnargs: process.argv,
|
92
|
-
spawnfile: null,
|
93
|
-
kill: process.exit.bind(process),
|
94
|
-
send: null,
|
95
|
-
disconnect: null,
|
96
|
-
unref: null,
|
97
|
-
ref: null,
|
98
|
-
killed: false
|
99
|
-
});
|
100
|
-
const configPath = context.options.config || (0, path_1.join)((0, os_1.homedir)(), './.pm.config.json');
|
101
|
-
this.config = yield config_1.Configuration.load(configPath, true);
|
102
|
-
if ((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.mapping) === null || _b === void 0 ? void 0 : _b.pm) {
|
103
|
-
if (this.config.mapping.pm.cwd)
|
104
|
-
process.chdir(this.config.mapping.pm.cwd);
|
105
|
-
}
|
106
|
-
else
|
107
|
-
this.config = config_1.Configuration.new(configPath, {
|
108
|
-
containers: { pm: { commandable: true, stateless: false, path: yield requireOrImportJson('../../../commands.json') } },
|
109
|
-
mapping: { pm: { cwd: process.cwd(), container: 'pm' } },
|
110
|
-
plugins: []
|
111
|
-
});
|
112
|
-
if (context && context.args.length)
|
113
|
-
yield container.dispatch('connect', 'pm', context);
|
114
|
-
else {
|
115
|
-
yield container.dispatch('connect', 'pm').catch((e) => __awaiter(this, void 0, void 0, function* () {
|
116
|
-
if (e && e.statusCode == 404)
|
117
|
-
yield container.dispatch('connect', 'pm', { args: ['local'] });
|
118
|
-
}));
|
119
|
-
}
|
120
|
-
yield this.config.commit();
|
121
|
-
container.name = 'pm';
|
122
|
-
const config = container.resolve('$metadata.config');
|
123
|
-
container.unregister('$metadata');
|
124
|
-
container.register((0, commands_1.configure)(config)(new commands_1.SelfDefinedCommand(metadata, '$metadata', ['$container', 'param.0'])));
|
125
|
-
this.processes[container.name] = container;
|
126
|
-
container.running = true;
|
127
|
-
try {
|
128
|
-
yield promises_1.default.unlink('./pm.sock');
|
129
|
-
}
|
130
|
-
catch (e) {
|
131
|
-
if (e.code !== 'ENOENT')
|
132
|
-
console.warn(e);
|
133
|
-
}
|
134
|
-
// var stop = await serve(container as Container<any>, serveMetadata(container.name, options || { _: ['local'] }));
|
135
|
-
if (process.disconnect) {
|
136
|
-
if (!context.options.keepAttached) {
|
137
|
-
if (process.send)
|
138
|
-
process.send('disconnecting daemon');
|
139
|
-
process.disconnect();
|
140
|
-
}
|
141
|
-
}
|
142
|
-
});
|
143
|
-
}
|
144
|
-
exports.default = default_1;
|
145
|
-
//# sourceMappingURL=$init.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"$init.js","sourceRoot":"","sources":["../../../src/commands/$init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,2BAA6B;AAC7B,2DAA6B;AAC7B,+BAA4B;AAE5B,8CAAsG;AACtG,mCAAqC;AACrC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