@platforma-sdk/bootstrap 5.2.51 → 5.2.52
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/dist/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/block.cjs +106 -146
- package/dist/block.cjs.map +1 -1
- package/dist/block.js +100 -125
- package/dist/block.js.map +1 -1
- package/dist/cmd-opts.cjs +87 -177
- package/dist/cmd-opts.cjs.map +1 -1
- package/dist/cmd-opts.js +87 -172
- package/dist/cmd-opts.js.map +1 -1
- package/dist/commands/create-block.cjs +19 -20
- package/dist/commands/create-block.cjs.map +1 -1
- package/dist/commands/create-block.d.ts +12 -7
- package/dist/commands/create-block.js +17 -17
- package/dist/commands/create-block.js.map +1 -1
- package/dist/commands/reset.cjs +18 -21
- package/dist/commands/reset.cjs.map +1 -1
- package/dist/commands/reset.d.ts +12 -7
- package/dist/commands/reset.js +16 -18
- package/dist/commands/reset.js.map +1 -1
- package/dist/commands/start/docker/s3.cjs +64 -67
- package/dist/commands/start/docker/s3.cjs.map +1 -1
- package/dist/commands/start/docker/s3.d.ts +32 -27
- package/dist/commands/start/docker/s3.js +61 -64
- package/dist/commands/start/docker/s3.js.map +1 -1
- package/dist/commands/start/docker.cjs +64 -67
- package/dist/commands/start/docker.cjs.map +1 -1
- package/dist/commands/start/docker.d.ts +32 -27
- package/dist/commands/start/docker.js +61 -64
- package/dist/commands/start/docker.js.map +1 -1
- package/dist/commands/start/local/s3.cjs +101 -135
- package/dist/commands/start/local/s3.cjs.map +1 -1
- package/dist/commands/start/local/s3.d.ts +36 -31
- package/dist/commands/start/local/s3.js +97 -113
- package/dist/commands/start/local/s3.js.map +1 -1
- package/dist/commands/start/local.cjs +95 -122
- package/dist/commands/start/local.cjs.map +1 -1
- package/dist/commands/start/local.d.ts +34 -29
- package/dist/commands/start/local.js +91 -100
- package/dist/commands/start/local.js.map +1 -1
- package/dist/commands/start.cjs +18 -21
- package/dist/commands/start.cjs.map +1 -1
- package/dist/commands/start.d.ts +12 -7
- package/dist/commands/start.js +16 -18
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/stop.cjs +22 -27
- package/dist/commands/stop.cjs.map +1 -1
- package/dist/commands/stop.d.ts +12 -7
- package/dist/commands/stop.js +20 -24
- package/dist/commands/stop.js.map +1 -1
- package/dist/commands/svc/create/arg-parser.cjs +102 -172
- package/dist/commands/svc/create/arg-parser.cjs.map +1 -1
- package/dist/commands/svc/create/arg-parser.js +102 -171
- package/dist/commands/svc/create/arg-parser.js.map +1 -1
- package/dist/commands/svc/create/docker/s3.cjs +78 -96
- package/dist/commands/svc/create/docker/s3.cjs.map +1 -1
- package/dist/commands/svc/create/docker/s3.d.ts +35 -30
- package/dist/commands/svc/create/docker/s3.js +75 -93
- package/dist/commands/svc/create/docker/s3.js.map +1 -1
- package/dist/commands/svc/create/docker.cjs +82 -103
- package/dist/commands/svc/create/docker.cjs.map +1 -1
- package/dist/commands/svc/create/docker.d.ts +35 -30
- package/dist/commands/svc/create/docker.js +79 -100
- package/dist/commands/svc/create/docker.js.map +1 -1
- package/dist/commands/svc/create/local/s3.cjs +107 -139
- package/dist/commands/svc/create/local/s3.cjs.map +1 -1
- package/dist/commands/svc/create/local/s3.d.ts +39 -34
- package/dist/commands/svc/create/local/s3.js +103 -117
- package/dist/commands/svc/create/local/s3.js.map +1 -1
- package/dist/commands/svc/create/local.cjs +101 -138
- package/dist/commands/svc/create/local.cjs.map +1 -1
- package/dist/commands/svc/create/local.d.ts +37 -32
- package/dist/commands/svc/create/local.js +97 -116
- package/dist/commands/svc/create/local.js.map +1 -1
- package/dist/commands/svc/delete.cjs +36 -38
- package/dist/commands/svc/delete.cjs.map +1 -1
- package/dist/commands/svc/delete.d.ts +16 -11
- package/dist/commands/svc/delete.js +34 -35
- package/dist/commands/svc/delete.js.map +1 -1
- package/dist/commands/svc/down.cjs +27 -30
- package/dist/commands/svc/down.cjs.map +1 -1
- package/dist/commands/svc/down.d.ts +15 -10
- package/dist/commands/svc/down.js +25 -27
- package/dist/commands/svc/down.js.map +1 -1
- package/dist/commands/svc/list.cjs +25 -29
- package/dist/commands/svc/list.cjs.map +1 -1
- package/dist/commands/svc/list.d.ts +9 -5
- package/dist/commands/svc/list.js +23 -26
- package/dist/commands/svc/list.js.map +1 -1
- package/dist/commands/svc/up.cjs +33 -49
- package/dist/commands/svc/up.cjs.map +1 -1
- package/dist/commands/svc/up.d.ts +15 -10
- package/dist/commands/svc/up.js +31 -46
- package/dist/commands/svc/up.js.map +1 -1
- package/dist/core.cjs +712 -881
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +709 -877
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +36 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +37 -33
- package/dist/index.js +35 -34
- package/dist/index.js.map +1 -1
- package/dist/package.cjs +15 -36
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +14 -14
- package/dist/package.js.map +1 -1
- package/dist/platforma.cjs +119 -148
- package/dist/platforma.cjs.map +1 -1
- package/dist/platforma.js +114 -122
- package/dist/platforma.js.map +1 -1
- package/dist/run.cjs +55 -58
- package/dist/run.cjs.map +1 -1
- package/dist/run.js +56 -56
- package/dist/run.js.map +1 -1
- package/dist/state.cjs +114 -141
- package/dist/state.cjs.map +1 -1
- package/dist/state.js +110 -139
- package/dist/state.js.map +1 -1
- package/dist/templates/compose.cjs +38 -65
- package/dist/templates/compose.cjs.map +1 -1
- package/dist/templates/compose.js +35 -63
- package/dist/templates/compose.js.map +1 -1
- package/dist/templates/pl-config.cjs +163 -165
- package/dist/templates/pl-config.cjs.map +1 -1
- package/dist/templates/pl-config.js +161 -163
- package/dist/templates/pl-config.js.map +1 -1
- package/dist/templates/types.cjs +24 -23
- package/dist/templates/types.cjs.map +1 -1
- package/dist/templates/types.js +24 -22
- package/dist/templates/types.js.map +1 -1
- package/dist/util.cjs +57 -74
- package/dist/util.cjs.map +1 -1
- package/dist/util.js +51 -72
- package/dist/util.js.map +1 -1
- package/package.json +7 -7
- package/dist/block.d.ts +0 -25
- package/dist/block.d.ts.map +0 -1
- package/dist/cmd-opts.d.ts +0 -89
- package/dist/cmd-opts.d.ts.map +0 -1
- package/dist/commands/create-block.d.ts.map +0 -1
- package/dist/commands/reset.d.ts.map +0 -1
- package/dist/commands/start/docker/s3.d.ts.map +0 -1
- package/dist/commands/start/docker.d.ts.map +0 -1
- package/dist/commands/start/local/s3.d.ts.map +0 -1
- package/dist/commands/start/local.d.ts.map +0 -1
- package/dist/commands/start.d.ts.map +0 -1
- package/dist/commands/stop.d.ts.map +0 -1
- package/dist/commands/svc/create/arg-parser.d.ts +0 -43
- package/dist/commands/svc/create/arg-parser.d.ts.map +0 -1
- package/dist/commands/svc/create/docker/s3.d.ts.map +0 -1
- package/dist/commands/svc/create/docker.d.ts.map +0 -1
- package/dist/commands/svc/create/local/s3.d.ts.map +0 -1
- package/dist/commands/svc/create/local.d.ts.map +0 -1
- package/dist/commands/svc/delete.d.ts.map +0 -1
- package/dist/commands/svc/down.d.ts.map +0 -1
- package/dist/commands/svc/list.d.ts.map +0 -1
- package/dist/commands/svc/up.d.ts.map +0 -1
- package/dist/core.d.ts +0 -105
- package/dist/core.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/package.d.ts +0 -7
- package/dist/package.d.ts.map +0 -1
- package/dist/platforma.d.ts +0 -24
- package/dist/platforma.d.ts.map +0 -1
- package/dist/run.d.ts +0 -13
- package/dist/run.d.ts.map +0 -1
- package/dist/state.d.ts +0 -63
- package/dist/state.d.ts.map +0 -1
- package/dist/templates/compose.d.ts +0 -14
- package/dist/templates/compose.d.ts.map +0 -1
- package/dist/templates/pl-config.d.ts +0 -6
- package/dist/templates/pl-config.d.ts.map +0 -1
- package/dist/templates/types.d.ts +0 -138
- package/dist/templates/types.d.ts.map +0 -1
- package/dist/util.d.ts +0 -18
- package/dist/util.d.ts.map +0 -1
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { GlobalFlags } from "../../cmd-opts.js";
|
|
2
|
+
import { createLogger } from "../../util.js";
|
|
3
|
+
import state_default from "../../state.js";
|
|
4
|
+
import Core from "../../core.js";
|
|
5
|
+
import { Args, Command } from "@oclif/core";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
core.stopInstance(state.getInstanceInfo(name));
|
|
26
|
-
}
|
|
27
|
-
}
|
|
7
|
+
//#region src/commands/svc/down.ts
|
|
8
|
+
var Down = class Down extends Command {
|
|
9
|
+
static description = "List available instances";
|
|
10
|
+
static examples = ["<%= config.bin %> <%= command.id %>"];
|
|
11
|
+
static flags = { ...GlobalFlags };
|
|
12
|
+
static args = { name: Args.string({ required: false }) };
|
|
13
|
+
async run() {
|
|
14
|
+
const { flags, args } = await this.parse(Down);
|
|
15
|
+
const logger = createLogger(flags["log-level"]);
|
|
16
|
+
const core = new Core(logger);
|
|
17
|
+
const name = args.name ?? state_default.currentInstanceName;
|
|
18
|
+
if (!name) {
|
|
19
|
+
logger.info(`no pl service instance selected. No service was stopped`);
|
|
20
|
+
process.exit(0);
|
|
21
|
+
}
|
|
22
|
+
core.stopInstance(state_default.getInstanceInfo(name));
|
|
23
|
+
}
|
|
24
|
+
};
|
|
28
25
|
|
|
26
|
+
//#endregion
|
|
29
27
|
export { Down as default };
|
|
30
|
-
//# sourceMappingURL=down.js.map
|
|
28
|
+
//# sourceMappingURL=down.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"down.js","sources":["../../../src/commands/svc/down.ts"],"sourcesContent":["import { Command, Args } from \"@oclif/core\";\nimport Core from \"../../core\";\nimport * as cmdOpts from \"../../cmd-opts\";\nimport * as util from \"../../util\";\nimport state from \"../../state\";\n\nexport default class Down extends Command {\n static override description = \"List available instances\";\n\n static override examples = [\"<%= config.bin %> <%= command.id %>\"];\n\n static override flags = {\n ...cmdOpts.GlobalFlags,\n };\n\n static args = {\n name: Args.string({ required: false }),\n };\n\n public async run(): Promise<void> {\n const { flags, args } = await this.parse(Down);\n\n const logger = util.createLogger(flags[\"log-level\"]);\n const core = new Core(logger);\n\n const name = args.name ?? state.currentInstanceName;\n\n if (!name) {\n logger.info(`no pl service instance selected. No service was stopped`);\n process.exit(0);\n }\n\n core.stopInstance(state.getInstanceInfo(name));\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"down.js","names":["cmdOpts.GlobalFlags","util.createLogger","state"],"sources":["../../../src/commands/svc/down.ts"],"sourcesContent":["import { Command, Args } from \"@oclif/core\";\nimport Core from \"../../core\";\nimport * as cmdOpts from \"../../cmd-opts\";\nimport * as util from \"../../util\";\nimport state from \"../../state\";\n\nexport default class Down extends Command {\n static override description = \"List available instances\";\n\n static override examples = [\"<%= config.bin %> <%= command.id %>\"];\n\n static override flags = {\n ...cmdOpts.GlobalFlags,\n };\n\n static args = {\n name: Args.string({ required: false }),\n };\n\n public async run(): Promise<void> {\n const { flags, args } = await this.parse(Down);\n\n const logger = util.createLogger(flags[\"log-level\"]);\n const core = new Core(logger);\n\n const name = args.name ?? state.currentInstanceName;\n\n if (!name) {\n logger.info(`no pl service instance selected. No service was stopped`);\n process.exit(0);\n }\n\n core.stopInstance(state.getInstanceInfo(name));\n }\n}\n"],"mappings":";;;;;;;AAMA,IAAqB,OAArB,MAAqB,aAAa,QAAQ;CACxC,OAAgB,cAAc;CAE9B,OAAgB,WAAW,CAAC,sCAAsC;CAElE,OAAgB,QAAQ,EACtB,GAAGA,aACJ;CAED,OAAO,OAAO,EACZ,MAAM,KAAK,OAAO,EAAE,UAAU,OAAO,CAAC,EACvC;CAED,MAAa,MAAqB;EAChC,MAAM,EAAE,OAAO,SAAS,MAAM,KAAK,MAAM,KAAK;EAE9C,MAAM,SAASC,aAAkB,MAAM,aAAa;EACpD,MAAM,OAAO,IAAI,KAAK,OAAO;EAE7B,MAAM,OAAO,KAAK,QAAQC,cAAM;AAEhC,MAAI,CAAC,MAAM;AACT,UAAO,KAAK,0DAA0D;AACtE,WAAQ,KAAK,EAAE;;AAGjB,OAAK,aAAaA,cAAM,gBAAgB,KAAK,CAAC"}
|
|
@@ -1,31 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_state = require('../../state.cjs');
|
|
3
|
+
let _oclif_core = require("@oclif/core");
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
+
//#region src/commands/svc/list.ts
|
|
6
|
+
var List = class List extends _oclif_core.Command {
|
|
7
|
+
static description = "List available instances";
|
|
8
|
+
static examples = ["<%= config.bin %> <%= command.id %>"];
|
|
9
|
+
static flags = {};
|
|
10
|
+
async run() {
|
|
11
|
+
await this.parse(List);
|
|
12
|
+
const instances = require_state.default.instanceList;
|
|
13
|
+
const currentInstance = require_state.default.currentInstanceName;
|
|
14
|
+
for (const iName of instances) {
|
|
15
|
+
const statusReport = [];
|
|
16
|
+
const instance = require_state.default.getInstanceInfo(iName);
|
|
17
|
+
if (require_state.default.isInstanceActive(instance)) statusReport.push("status:up");
|
|
18
|
+
statusReport.push(`type:${instance.type}`);
|
|
19
|
+
if (iName === currentInstance) console.log(` * ${iName} (${statusReport.join(", ")})`);
|
|
20
|
+
else console.log(` ${iName} (${statusReport.join(", ")})`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
5
24
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
static flags = {};
|
|
10
|
-
async run() {
|
|
11
|
-
await this.parse(List);
|
|
12
|
-
const instances = state.instanceList;
|
|
13
|
-
const currentInstance = state.currentInstanceName;
|
|
14
|
-
for (const iName of instances) {
|
|
15
|
-
const statusReport = [];
|
|
16
|
-
const instance = state.getInstanceInfo(iName);
|
|
17
|
-
if (state.isInstanceActive(instance))
|
|
18
|
-
statusReport.push("status:up");
|
|
19
|
-
statusReport.push(`type:${instance.type}`);
|
|
20
|
-
if (iName === currentInstance) {
|
|
21
|
-
console.log(` * ${iName} (${statusReport.join(", ")})`);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
console.log(` ${iName} (${statusReport.join(", ")})`);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
module.exports = List;
|
|
31
|
-
//# sourceMappingURL=list.cjs.map
|
|
25
|
+
//#endregion
|
|
26
|
+
exports.default = List;
|
|
27
|
+
//# sourceMappingURL=list.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.cjs","sources":["../../../src/commands/svc/list.ts"],"sourcesContent":["import { Command } from \"@oclif/core\";\nimport state from \"../../state\";\n\nexport default class List extends Command {\n static override description = \"List available instances\";\n\n static override examples = [\"<%= config.bin %> <%= command.id %>\"];\n\n static override flags = {};\n\n public async run(): Promise<void> {\n await this.parse(List);\n\n const instances = state.instanceList;\n const currentInstance = state.currentInstanceName;\n\n for (const iName of instances) {\n const statusReport = [];\n const instance = state.getInstanceInfo(iName);\n if (state.isInstanceActive(instance)) statusReport.push(\"status:up\");\n statusReport.push(`type:${instance.type}`);\n\n if (iName === currentInstance) {\n console.log(` * ${iName} (${statusReport.join(\", \")})`);\n } else {\n console.log(` ${iName} (${statusReport.join(\", \")})`);\n }\n }\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"list.cjs","names":["Command","state"],"sources":["../../../src/commands/svc/list.ts"],"sourcesContent":["import { Command } from \"@oclif/core\";\nimport state from \"../../state\";\n\nexport default class List extends Command {\n static override description = \"List available instances\";\n\n static override examples = [\"<%= config.bin %> <%= command.id %>\"];\n\n static override flags = {};\n\n public async run(): Promise<void> {\n await this.parse(List);\n\n const instances = state.instanceList;\n const currentInstance = state.currentInstanceName;\n\n for (const iName of instances) {\n const statusReport = [];\n const instance = state.getInstanceInfo(iName);\n if (state.isInstanceActive(instance)) statusReport.push(\"status:up\");\n statusReport.push(`type:${instance.type}`);\n\n if (iName === currentInstance) {\n console.log(` * ${iName} (${statusReport.join(\", \")})`);\n } else {\n console.log(` ${iName} (${statusReport.join(\", \")})`);\n }\n }\n }\n}\n"],"mappings":";;;;;AAGA,IAAqB,OAArB,MAAqB,aAAaA,oBAAQ;CACxC,OAAgB,cAAc;CAE9B,OAAgB,WAAW,CAAC,sCAAsC;CAElE,OAAgB,QAAQ,EAAE;CAE1B,MAAa,MAAqB;AAChC,QAAM,KAAK,MAAM,KAAK;EAEtB,MAAM,YAAYC,sBAAM;EACxB,MAAM,kBAAkBA,sBAAM;AAE9B,OAAK,MAAM,SAAS,WAAW;GAC7B,MAAM,eAAe,EAAE;GACvB,MAAM,WAAWA,sBAAM,gBAAgB,MAAM;AAC7C,OAAIA,sBAAM,iBAAiB,SAAS,CAAE,cAAa,KAAK,YAAY;AACpE,gBAAa,KAAK,QAAQ,SAAS,OAAO;AAE1C,OAAI,UAAU,gBACZ,SAAQ,IAAI,MAAM,MAAM,IAAI,aAAa,KAAK,KAAK,CAAC,GAAG;OAEvD,SAAQ,IAAI,MAAM,MAAM,IAAI,aAAa,KAAK,KAAK,CAAC,GAAG"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { Command } from "@oclif/core";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
|
|
3
|
+
//#region src/commands/svc/list.d.ts
|
|
4
|
+
declare class List extends Command {
|
|
5
|
+
static description: string;
|
|
6
|
+
static examples: string[];
|
|
7
|
+
static flags: {};
|
|
8
|
+
run(): Promise<void>;
|
|
7
9
|
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { List };
|
|
8
12
|
//# sourceMappingURL=list.d.ts.map
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import state_default from "../../state.js";
|
|
2
|
+
import { Command } from "@oclif/core";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
4
|
+
//#region src/commands/svc/list.ts
|
|
5
|
+
var List = class List extends Command {
|
|
6
|
+
static description = "List available instances";
|
|
7
|
+
static examples = ["<%= config.bin %> <%= command.id %>"];
|
|
8
|
+
static flags = {};
|
|
9
|
+
async run() {
|
|
10
|
+
await this.parse(List);
|
|
11
|
+
const instances = state_default.instanceList;
|
|
12
|
+
const currentInstance = state_default.currentInstanceName;
|
|
13
|
+
for (const iName of instances) {
|
|
14
|
+
const statusReport = [];
|
|
15
|
+
const instance = state_default.getInstanceInfo(iName);
|
|
16
|
+
if (state_default.isInstanceActive(instance)) statusReport.push("status:up");
|
|
17
|
+
statusReport.push(`type:${instance.type}`);
|
|
18
|
+
if (iName === currentInstance) console.log(` * ${iName} (${statusReport.join(", ")})`);
|
|
19
|
+
else console.log(` ${iName} (${statusReport.join(", ")})`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
27
23
|
|
|
24
|
+
//#endregion
|
|
28
25
|
export { List as default };
|
|
29
|
-
//# sourceMappingURL=list.js.map
|
|
26
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sources":["../../../src/commands/svc/list.ts"],"sourcesContent":["import { Command } from \"@oclif/core\";\nimport state from \"../../state\";\n\nexport default class List extends Command {\n static override description = \"List available instances\";\n\n static override examples = [\"<%= config.bin %> <%= command.id %>\"];\n\n static override flags = {};\n\n public async run(): Promise<void> {\n await this.parse(List);\n\n const instances = state.instanceList;\n const currentInstance = state.currentInstanceName;\n\n for (const iName of instances) {\n const statusReport = [];\n const instance = state.getInstanceInfo(iName);\n if (state.isInstanceActive(instance)) statusReport.push(\"status:up\");\n statusReport.push(`type:${instance.type}`);\n\n if (iName === currentInstance) {\n console.log(` * ${iName} (${statusReport.join(\", \")})`);\n } else {\n console.log(` ${iName} (${statusReport.join(\", \")})`);\n }\n }\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"list.js","names":["state"],"sources":["../../../src/commands/svc/list.ts"],"sourcesContent":["import { Command } from \"@oclif/core\";\nimport state from \"../../state\";\n\nexport default class List extends Command {\n static override description = \"List available instances\";\n\n static override examples = [\"<%= config.bin %> <%= command.id %>\"];\n\n static override flags = {};\n\n public async run(): Promise<void> {\n await this.parse(List);\n\n const instances = state.instanceList;\n const currentInstance = state.currentInstanceName;\n\n for (const iName of instances) {\n const statusReport = [];\n const instance = state.getInstanceInfo(iName);\n if (state.isInstanceActive(instance)) statusReport.push(\"status:up\");\n statusReport.push(`type:${instance.type}`);\n\n if (iName === currentInstance) {\n console.log(` * ${iName} (${statusReport.join(\", \")})`);\n } else {\n console.log(` ${iName} (${statusReport.join(\", \")})`);\n }\n }\n }\n}\n"],"mappings":";;;;AAGA,IAAqB,OAArB,MAAqB,aAAa,QAAQ;CACxC,OAAgB,cAAc;CAE9B,OAAgB,WAAW,CAAC,sCAAsC;CAElE,OAAgB,QAAQ,EAAE;CAE1B,MAAa,MAAqB;AAChC,QAAM,KAAK,MAAM,KAAK;EAEtB,MAAM,YAAYA,cAAM;EACxB,MAAM,kBAAkBA,cAAM;AAE9B,OAAK,MAAM,SAAS,WAAW;GAC7B,MAAM,eAAe,EAAE;GACvB,MAAM,WAAWA,cAAM,gBAAgB,MAAM;AAC7C,OAAIA,cAAM,iBAAiB,SAAS,CAAE,cAAa,KAAK,YAAY;AACpE,gBAAa,KAAK,QAAQ,SAAS,OAAO;AAE1C,OAAI,UAAU,gBACZ,SAAQ,IAAI,MAAM,MAAM,IAAI,aAAa,KAAK,KAAK,CAAC,GAAG;OAEvD,SAAQ,IAAI,MAAM,MAAM,IAAI,aAAa,KAAK,KAAK,CAAC,GAAG"}
|
package/dist/commands/svc/up.cjs
CHANGED
|
@@ -1,51 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_cmd_opts = require('../../cmd-opts.cjs');
|
|
3
|
+
const require_util = require('../../util.cjs');
|
|
4
|
+
const require_state = require('../../state.cjs');
|
|
5
|
+
const require_core = require('../../core.cjs');
|
|
6
|
+
let _oclif_core = require("@oclif/core");
|
|
2
7
|
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
//#region src/commands/svc/up.ts
|
|
9
|
+
var Up = class Up extends _oclif_core.Command {
|
|
10
|
+
static description = "List available instances";
|
|
11
|
+
static examples = ["<%= config.bin %> <%= command.id %>"];
|
|
12
|
+
static flags = { ...require_cmd_opts.GlobalFlags };
|
|
13
|
+
static args = { name: _oclif_core.Args.string({ required: false }) };
|
|
14
|
+
async run() {
|
|
15
|
+
const { flags, args } = await this.parse(Up);
|
|
16
|
+
const logger = require_util.createLogger(flags["log-level"]);
|
|
17
|
+
const core = new require_core.default(logger);
|
|
18
|
+
const name = args.name ?? require_state.default.currentInstanceName;
|
|
19
|
+
if (!name) {
|
|
20
|
+
logger.error(`no pl service instance is selected. Select instance with 'select' command or provide name to 'up'`);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
const children = core.switchInstance(require_state.default.getInstanceInfo(name));
|
|
24
|
+
const results = [];
|
|
25
|
+
for (const child of children) results.push(new Promise((resolve, reject) => {
|
|
26
|
+
child.on("close", resolve);
|
|
27
|
+
child.on("error", reject);
|
|
28
|
+
}));
|
|
29
|
+
await Promise.all(results);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
8
32
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
static flags = {
|
|
13
|
-
...cmdOpts.GlobalFlags,
|
|
14
|
-
};
|
|
15
|
-
static args = {
|
|
16
|
-
name: core.Args.string({ required: false }),
|
|
17
|
-
};
|
|
18
|
-
async run() {
|
|
19
|
-
const { flags, args } = await this.parse(Up);
|
|
20
|
-
const logger = util.createLogger(flags["log-level"]);
|
|
21
|
-
const core = new core$1.default(logger);
|
|
22
|
-
const name = args.name ?? state.currentInstanceName;
|
|
23
|
-
if (!name) {
|
|
24
|
-
logger.error(`no pl service instance is selected. Select instance with 'select' command or provide name to 'up'`);
|
|
25
|
-
process.exit(1);
|
|
26
|
-
}
|
|
27
|
-
const children = core.switchInstance(state.getInstanceInfo(name));
|
|
28
|
-
// Before we're able to 'free' the terminal from lock of the process we start,
|
|
29
|
-
// we have to provide a control over the instance state.
|
|
30
|
-
// Without the control, there is no difference for the user between 'service successfully started' and 'service failed to start'
|
|
31
|
-
//
|
|
32
|
-
// When running service in docker, we can see the state of the service in Docker Desktop or via CLI utilities.
|
|
33
|
-
// Also we see the feedback on faulty service start immediately.
|
|
34
|
-
// When running service as a regular local process, the state control is comlicated.
|
|
35
|
-
// When we're ready, replace all Promises magic below wit simple
|
|
36
|
-
// for (const child of children) {
|
|
37
|
-
// child.unref();
|
|
38
|
-
// }
|
|
39
|
-
const results = [];
|
|
40
|
-
for (const child of children) {
|
|
41
|
-
results.push(new Promise((resolve, reject) => {
|
|
42
|
-
child.on("close", resolve);
|
|
43
|
-
child.on("error", reject);
|
|
44
|
-
}));
|
|
45
|
-
}
|
|
46
|
-
await Promise.all(results);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
module.exports = Up;
|
|
51
|
-
//# sourceMappingURL=up.cjs.map
|
|
33
|
+
//#endregion
|
|
34
|
+
exports.default = Up;
|
|
35
|
+
//# sourceMappingURL=up.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"up.cjs","sources":["../../../src/commands/svc/up.ts"],"sourcesContent":["import { Command, Args } from \"@oclif/core\";\nimport Core from \"../../core\";\nimport * as cmdOpts from \"../../cmd-opts\";\nimport * as util from \"../../util\";\nimport state from \"../../state\";\n\nexport default class Up extends Command {\n static override description = \"List available instances\";\n\n static override examples = [\"<%= config.bin %> <%= command.id %>\"];\n\n static override flags = {\n ...cmdOpts.GlobalFlags,\n };\n\n static args = {\n name: Args.string({ required: false }),\n };\n\n public async run(): Promise<void> {\n const { flags, args } = await this.parse(Up);\n\n const logger = util.createLogger(flags[\"log-level\"]);\n const core = new Core(logger);\n\n const name = args.name ?? state.currentInstanceName;\n\n if (!name) {\n logger.error(\n `no pl service instance is selected. Select instance with 'select' command or provide name to 'up'`,\n );\n process.exit(1);\n }\n\n const children = core.switchInstance(state.getInstanceInfo(name));\n\n // Before we're able to 'free' the terminal from lock of the process we start,\n // we have to provide a control over the instance state.\n // Without the control, there is no difference for the user between 'service successfully started' and 'service failed to start'\n //\n // When running service in docker, we can see the state of the service in Docker Desktop or via CLI utilities.\n // Also we see the feedback on faulty service start immediately.\n // When running service as a regular local process, the state control is comlicated.\n\n // When we're ready, replace all Promises magic below wit simple\n // for (const child of children) {\n // child.unref();\n // }\n\n const results: Promise<void>[] = [];\n for (const child of children) {\n results.push(\n new Promise((resolve, reject) => {\n child.on(\"close\", resolve);\n child.on(\"error\", reject);\n }),\n );\n }\n\n await Promise.all(results);\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"up.cjs","names":["Command","Args","Core","state"],"sources":["../../../src/commands/svc/up.ts"],"sourcesContent":["import { Command, Args } from \"@oclif/core\";\nimport Core from \"../../core\";\nimport * as cmdOpts from \"../../cmd-opts\";\nimport * as util from \"../../util\";\nimport state from \"../../state\";\n\nexport default class Up extends Command {\n static override description = \"List available instances\";\n\n static override examples = [\"<%= config.bin %> <%= command.id %>\"];\n\n static override flags = {\n ...cmdOpts.GlobalFlags,\n };\n\n static args = {\n name: Args.string({ required: false }),\n };\n\n public async run(): Promise<void> {\n const { flags, args } = await this.parse(Up);\n\n const logger = util.createLogger(flags[\"log-level\"]);\n const core = new Core(logger);\n\n const name = args.name ?? state.currentInstanceName;\n\n if (!name) {\n logger.error(\n `no pl service instance is selected. Select instance with 'select' command or provide name to 'up'`,\n );\n process.exit(1);\n }\n\n const children = core.switchInstance(state.getInstanceInfo(name));\n\n // Before we're able to 'free' the terminal from lock of the process we start,\n // we have to provide a control over the instance state.\n // Without the control, there is no difference for the user between 'service successfully started' and 'service failed to start'\n //\n // When running service in docker, we can see the state of the service in Docker Desktop or via CLI utilities.\n // Also we see the feedback on faulty service start immediately.\n // When running service as a regular local process, the state control is comlicated.\n\n // When we're ready, replace all Promises magic below wit simple\n // for (const child of children) {\n // child.unref();\n // }\n\n const results: Promise<void>[] = [];\n for (const child of children) {\n results.push(\n new Promise((resolve, reject) => {\n child.on(\"close\", resolve);\n child.on(\"error\", reject);\n }),\n );\n }\n\n await Promise.all(results);\n }\n}\n"],"mappings":";;;;;;;;AAMA,IAAqB,KAArB,MAAqB,WAAWA,oBAAQ;CACtC,OAAgB,cAAc;CAE9B,OAAgB,WAAW,CAAC,sCAAsC;CAElE,OAAgB,QAAQ,EACtB,iCACD;CAED,OAAO,OAAO,EACZ,MAAMC,iBAAK,OAAO,EAAE,UAAU,OAAO,CAAC,EACvC;CAED,MAAa,MAAqB;EAChC,MAAM,EAAE,OAAO,SAAS,MAAM,KAAK,MAAM,GAAG;EAE5C,MAAM,mCAA2B,MAAM,aAAa;EACpD,MAAM,OAAO,IAAIC,qBAAK,OAAO;EAE7B,MAAM,OAAO,KAAK,QAAQC,sBAAM;AAEhC,MAAI,CAAC,MAAM;AACT,UAAO,MACL,oGACD;AACD,WAAQ,KAAK,EAAE;;EAGjB,MAAM,WAAW,KAAK,eAAeA,sBAAM,gBAAgB,KAAK,CAAC;EAejE,MAAM,UAA2B,EAAE;AACnC,OAAK,MAAM,SAAS,SAClB,SAAQ,KACN,IAAI,SAAS,SAAS,WAAW;AAC/B,SAAM,GAAG,SAAS,QAAQ;AAC1B,SAAM,GAAG,SAAS,OAAO;IACzB,CACH;AAGH,QAAM,QAAQ,IAAI,QAAQ"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { Command } from "@oclif/core";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import * as _oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
3
|
+
|
|
4
|
+
//#region src/commands/svc/up.d.ts
|
|
5
|
+
declare class Up extends Command {
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
"log-level": _oclif_core_interfaces0.OptionFlag<string, _oclif_core_interfaces0.CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
static args: {
|
|
12
|
+
name: _oclif_core_interfaces0.Arg<string | undefined, Record<string, unknown>>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<void>;
|
|
12
15
|
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Up };
|
|
13
18
|
//# sourceMappingURL=up.d.ts.map
|
package/dist/commands/svc/up.js
CHANGED
|
@@ -1,49 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { GlobalFlags } from "../../cmd-opts.js";
|
|
2
|
+
import { createLogger } from "../../util.js";
|
|
3
|
+
import state_default from "../../state.js";
|
|
4
|
+
import Core from "../../core.js";
|
|
5
|
+
import { Args, Command } from "@oclif/core";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
// Also we see the feedback on faulty service start immediately.
|
|
32
|
-
// When running service as a regular local process, the state control is comlicated.
|
|
33
|
-
// When we're ready, replace all Promises magic below wit simple
|
|
34
|
-
// for (const child of children) {
|
|
35
|
-
// child.unref();
|
|
36
|
-
// }
|
|
37
|
-
const results = [];
|
|
38
|
-
for (const child of children) {
|
|
39
|
-
results.push(new Promise((resolve, reject) => {
|
|
40
|
-
child.on("close", resolve);
|
|
41
|
-
child.on("error", reject);
|
|
42
|
-
}));
|
|
43
|
-
}
|
|
44
|
-
await Promise.all(results);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
7
|
+
//#region src/commands/svc/up.ts
|
|
8
|
+
var Up = class Up extends Command {
|
|
9
|
+
static description = "List available instances";
|
|
10
|
+
static examples = ["<%= config.bin %> <%= command.id %>"];
|
|
11
|
+
static flags = { ...GlobalFlags };
|
|
12
|
+
static args = { name: Args.string({ required: false }) };
|
|
13
|
+
async run() {
|
|
14
|
+
const { flags, args } = await this.parse(Up);
|
|
15
|
+
const logger = createLogger(flags["log-level"]);
|
|
16
|
+
const core = new Core(logger);
|
|
17
|
+
const name = args.name ?? state_default.currentInstanceName;
|
|
18
|
+
if (!name) {
|
|
19
|
+
logger.error(`no pl service instance is selected. Select instance with 'select' command or provide name to 'up'`);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
const children = core.switchInstance(state_default.getInstanceInfo(name));
|
|
23
|
+
const results = [];
|
|
24
|
+
for (const child of children) results.push(new Promise((resolve, reject) => {
|
|
25
|
+
child.on("close", resolve);
|
|
26
|
+
child.on("error", reject);
|
|
27
|
+
}));
|
|
28
|
+
await Promise.all(results);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
47
31
|
|
|
32
|
+
//#endregion
|
|
48
33
|
export { Up as default };
|
|
49
|
-
//# sourceMappingURL=up.js.map
|
|
34
|
+
//# sourceMappingURL=up.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"up.js","sources":["../../../src/commands/svc/up.ts"],"sourcesContent":["import { Command, Args } from \"@oclif/core\";\nimport Core from \"../../core\";\nimport * as cmdOpts from \"../../cmd-opts\";\nimport * as util from \"../../util\";\nimport state from \"../../state\";\n\nexport default class Up extends Command {\n static override description = \"List available instances\";\n\n static override examples = [\"<%= config.bin %> <%= command.id %>\"];\n\n static override flags = {\n ...cmdOpts.GlobalFlags,\n };\n\n static args = {\n name: Args.string({ required: false }),\n };\n\n public async run(): Promise<void> {\n const { flags, args } = await this.parse(Up);\n\n const logger = util.createLogger(flags[\"log-level\"]);\n const core = new Core(logger);\n\n const name = args.name ?? state.currentInstanceName;\n\n if (!name) {\n logger.error(\n `no pl service instance is selected. Select instance with 'select' command or provide name to 'up'`,\n );\n process.exit(1);\n }\n\n const children = core.switchInstance(state.getInstanceInfo(name));\n\n // Before we're able to 'free' the terminal from lock of the process we start,\n // we have to provide a control over the instance state.\n // Without the control, there is no difference for the user between 'service successfully started' and 'service failed to start'\n //\n // When running service in docker, we can see the state of the service in Docker Desktop or via CLI utilities.\n // Also we see the feedback on faulty service start immediately.\n // When running service as a regular local process, the state control is comlicated.\n\n // When we're ready, replace all Promises magic below wit simple\n // for (const child of children) {\n // child.unref();\n // }\n\n const results: Promise<void>[] = [];\n for (const child of children) {\n results.push(\n new Promise((resolve, reject) => {\n child.on(\"close\", resolve);\n child.on(\"error\", reject);\n }),\n );\n }\n\n await Promise.all(results);\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"up.js","names":["cmdOpts.GlobalFlags","util.createLogger","state"],"sources":["../../../src/commands/svc/up.ts"],"sourcesContent":["import { Command, Args } from \"@oclif/core\";\nimport Core from \"../../core\";\nimport * as cmdOpts from \"../../cmd-opts\";\nimport * as util from \"../../util\";\nimport state from \"../../state\";\n\nexport default class Up extends Command {\n static override description = \"List available instances\";\n\n static override examples = [\"<%= config.bin %> <%= command.id %>\"];\n\n static override flags = {\n ...cmdOpts.GlobalFlags,\n };\n\n static args = {\n name: Args.string({ required: false }),\n };\n\n public async run(): Promise<void> {\n const { flags, args } = await this.parse(Up);\n\n const logger = util.createLogger(flags[\"log-level\"]);\n const core = new Core(logger);\n\n const name = args.name ?? state.currentInstanceName;\n\n if (!name) {\n logger.error(\n `no pl service instance is selected. Select instance with 'select' command or provide name to 'up'`,\n );\n process.exit(1);\n }\n\n const children = core.switchInstance(state.getInstanceInfo(name));\n\n // Before we're able to 'free' the terminal from lock of the process we start,\n // we have to provide a control over the instance state.\n // Without the control, there is no difference for the user between 'service successfully started' and 'service failed to start'\n //\n // When running service in docker, we can see the state of the service in Docker Desktop or via CLI utilities.\n // Also we see the feedback on faulty service start immediately.\n // When running service as a regular local process, the state control is comlicated.\n\n // When we're ready, replace all Promises magic below wit simple\n // for (const child of children) {\n // child.unref();\n // }\n\n const results: Promise<void>[] = [];\n for (const child of children) {\n results.push(\n new Promise((resolve, reject) => {\n child.on(\"close\", resolve);\n child.on(\"error\", reject);\n }),\n );\n }\n\n await Promise.all(results);\n }\n}\n"],"mappings":";;;;;;;AAMA,IAAqB,KAArB,MAAqB,WAAW,QAAQ;CACtC,OAAgB,cAAc;CAE9B,OAAgB,WAAW,CAAC,sCAAsC;CAElE,OAAgB,QAAQ,EACtB,GAAGA,aACJ;CAED,OAAO,OAAO,EACZ,MAAM,KAAK,OAAO,EAAE,UAAU,OAAO,CAAC,EACvC;CAED,MAAa,MAAqB;EAChC,MAAM,EAAE,OAAO,SAAS,MAAM,KAAK,MAAM,GAAG;EAE5C,MAAM,SAASC,aAAkB,MAAM,aAAa;EACpD,MAAM,OAAO,IAAI,KAAK,OAAO;EAE7B,MAAM,OAAO,KAAK,QAAQC,cAAM;AAEhC,MAAI,CAAC,MAAM;AACT,UAAO,MACL,oGACD;AACD,WAAQ,KAAK,EAAE;;EAGjB,MAAM,WAAW,KAAK,eAAeA,cAAM,gBAAgB,KAAK,CAAC;EAejE,MAAM,UAA2B,EAAE;AACnC,OAAK,MAAM,SAAS,SAClB,SAAQ,KACN,IAAI,SAAS,SAAS,WAAW;AAC/B,SAAM,GAAG,SAAS,QAAQ;AAC1B,SAAM,GAAG,SAAS,OAAO;IACzB,CACH;AAGH,QAAM,QAAQ,IAAI,QAAQ"}
|