@rsdk/cli.cmd.start 5.7.0-next.6 → 6.0.0-next.1
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/commands/start-dev.variation.d.ts +5 -0
- package/dist/{start-dev.cmd.js → commands/start-dev.variation.js} +22 -14
- package/dist/commands/start-dev.variation.js.map +1 -0
- package/dist/commands/start-dry.variation.d.ts +5 -0
- package/dist/{start-dry.cmd.js → commands/start-dry.variation.js} +17 -16
- package/dist/commands/start-dry.variation.js.map +1 -0
- package/dist/commands/start.command.d.ts +5 -0
- package/dist/{start.cmd.js → commands/start.command.js} +22 -11
- package/dist/commands/start.command.js.map +1 -0
- package/dist/index.d.ts +1 -7
- package/dist/index.js +3 -15
- package/dist/index.js.map +1 -1
- package/package.json +17 -16
- package/src/{start-dev.cmd.ts → commands/start-dev.variation.ts} +14 -10
- package/src/{start-dry.cmd.ts → commands/start-dry.variation.ts} +11 -8
- package/src/{start.cmd.ts → commands/start.command.ts} +17 -7
- package/src/index.ts +1 -19
- package/dist/start-dev.cmd.d.ts +0 -4
- package/dist/start-dev.cmd.js.map +0 -1
- package/dist/start-dry.cmd.d.ts +0 -4
- package/dist/start-dry.cmd.js.map +0 -1
- package/dist/start.cmd.d.ts +0 -4
- package/dist/start.cmd.js.map +0 -1
|
@@ -14,16 +14,18 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
15
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
16
|
};
|
|
17
|
+
var StartDevCommand_1;
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
19
|
+
exports.StartDevCommand = void 0;
|
|
19
20
|
const cli_common_1 = require("@rsdk/cli.common");
|
|
20
21
|
const logging_1 = require("@rsdk/logging");
|
|
21
22
|
const execa_1 = __importDefault(require("execa"));
|
|
22
23
|
const node_path_1 = __importDefault(require("node:path"));
|
|
23
|
-
const opentelemetry_path_1 = require("
|
|
24
|
-
class
|
|
25
|
-
static
|
|
26
|
-
|
|
24
|
+
const opentelemetry_path_1 = require("../opentelemetry/opentelemetry.path");
|
|
25
|
+
let StartDevCommand = class StartDevCommand {
|
|
26
|
+
static { StartDevCommand_1 = this; }
|
|
27
|
+
static logger = logging_1.LoggerFactory.create(StartDevCommand_1);
|
|
28
|
+
async run(otel, pretty) {
|
|
27
29
|
const tracingPart = [`-r`, opentelemetry_path_1.OPENTELEMETRY_INIT_PATH];
|
|
28
30
|
const env = {};
|
|
29
31
|
const command = [`--watch`];
|
|
@@ -34,7 +36,7 @@ class StartDevCmd {
|
|
|
34
36
|
command.push('-r', 'ts-node/register', 'src/main.ts');
|
|
35
37
|
const bin = 'node';
|
|
36
38
|
const cmd = [bin, ...command].join(' ');
|
|
37
|
-
|
|
39
|
+
StartDevCommand_1.logger.trace('run command: ' + cmd);
|
|
38
40
|
const appCwd = node_path_1.default.resolve();
|
|
39
41
|
const spawn = (0, execa_1.default)(bin, command, {
|
|
40
42
|
cwd: appCwd,
|
|
@@ -60,15 +62,21 @@ class StartDevCmd {
|
|
|
60
62
|
spawn.stdout.pipe(process.stdout);
|
|
61
63
|
await spawn;
|
|
62
64
|
}
|
|
63
|
-
}
|
|
64
|
-
exports.
|
|
65
|
+
};
|
|
66
|
+
exports.StartDevCommand = StartDevCommand;
|
|
65
67
|
__decorate([
|
|
66
|
-
(0, cli_common_1.
|
|
67
|
-
__param(
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
__param(0, (0, cli_common_1.Option)('otel', { description: 'Enable opentelemetry tracing' })),
|
|
69
|
+
__param(1, (0, cli_common_1.Option)('pretty', {
|
|
70
|
+
description: 'Enable PinoPretty output',
|
|
71
|
+
defaultValue: true,
|
|
72
|
+
})),
|
|
70
73
|
__metadata("design:type", Function),
|
|
71
74
|
__metadata("design:paramtypes", [Boolean, Boolean]),
|
|
72
75
|
__metadata("design:returntype", Promise)
|
|
73
|
-
],
|
|
74
|
-
|
|
76
|
+
], StartDevCommand.prototype, "run", null);
|
|
77
|
+
exports.StartDevCommand = StartDevCommand = StartDevCommand_1 = __decorate([
|
|
78
|
+
(0, cli_common_1.CommandVariation)('start:dev', {
|
|
79
|
+
description: 'Start app from src/main.ts in watch mode',
|
|
80
|
+
})
|
|
81
|
+
], StartDevCommand);
|
|
82
|
+
//# sourceMappingURL=start-dev.variation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-dev.variation.js","sourceRoot":"","sources":["../../src/commands/start-dev.variation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,iDAAuE;AACvE,2CAA8C;AAC9C,kDAA0B;AAC1B,0DAA6B;AAE7B,4EAA8E;AAKvE,IAAM,eAAe,GAArB,MAAM,eAAe;;IAC1B,MAAM,CAAC,MAAM,GAAG,uBAAa,CAAC,MAAM,CAAC,iBAAe,CAAC,CAAC;IAEhD,AAAN,KAAK,CAAC,GAAG,CAEP,IAAa,EAKb,MAAe;QAEf,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,4CAAuB,CAAC,CAAC;QACpD,MAAM,GAAG,GAAsB,EAAE,CAAC;QAClC,MAAM,OAAO,GAAG,CAAC,SAAS,CAAC,CAAC;QAE5B,IAAI,IAAI,EAAE,CAAC;YACT,OAAO,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC;YAC7B,GAAG,CAAC,kBAAkB,CAAC,GAAG,MAAM,CAAC;QACnC,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,kBAAkB,EAAE,aAAa,CAAC,CAAC;QACtD,MAAM,GAAG,GAAG,MAAM,CAAC;QAEnB,MAAM,GAAG,GAAG,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAExC,iBAAe,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC,CA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DU,eAAe;IAH3B,IAAA,6BAAgB,EAAC,WAAW,EAAE;QAC7B,WAAW,EAAE,0CAA0C;KACxD,CAAC;GACW,eAAe,CAuD3B"}
|
|
@@ -5,20 +5,19 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
8
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
10
|
};
|
|
11
|
+
var StartDrySubCommand_1;
|
|
14
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
13
|
+
exports.StartDrySubCommand = void 0;
|
|
16
14
|
const cli_common_1 = require("@rsdk/cli.common");
|
|
15
|
+
const common_1 = require("@rsdk/common");
|
|
17
16
|
const logging_1 = require("@rsdk/logging");
|
|
18
17
|
const node_path_1 = __importDefault(require("node:path"));
|
|
19
|
-
class
|
|
20
|
-
logger = logging_1.LoggerFactory.create(
|
|
21
|
-
async
|
|
18
|
+
let StartDrySubCommand = StartDrySubCommand_1 = class StartDrySubCommand {
|
|
19
|
+
logger = logging_1.LoggerFactory.create(StartDrySubCommand_1);
|
|
20
|
+
async run() {
|
|
22
21
|
this.logger.trace('execute start:dry command');
|
|
23
22
|
try {
|
|
24
23
|
const appFile = node_path_1.default.resolve(`dist/app.js`);
|
|
@@ -39,12 +38,14 @@ class StartDryCmd {
|
|
|
39
38
|
throw error;
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
|
-
}
|
|
43
|
-
exports.
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, cli_common_1.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
};
|
|
42
|
+
exports.StartDrySubCommand = StartDrySubCommand;
|
|
43
|
+
exports.StartDrySubCommand = StartDrySubCommand = StartDrySubCommand_1 = __decorate([
|
|
44
|
+
(0, cli_common_1.CommandVariation)('start:dry', {
|
|
45
|
+
description: (0, common_1.text) `
|
|
46
|
+
Just checking that the file exists, can be imported without
|
|
47
|
+
errors (all peer dependencies are there)
|
|
48
|
+
and .app from dist/app.js is PlatformApp`,
|
|
49
|
+
})
|
|
50
|
+
], StartDrySubCommand);
|
|
51
|
+
//# sourceMappingURL=start-dry.variation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-dry.variation.js","sourceRoot":"","sources":["../../src/commands/start-dry.variation.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,iDAA+D;AAC/D,yCAAoC;AACpC,2CAA8C;AAC9C,0DAA6B;AAQtB,IAAM,kBAAkB,0BAAxB,MAAM,kBAAkB;IACZ,MAAM,GAAG,uBAAa,CAAC,MAAM,CAAC,oBAAkB,CAAC,CAAC;IAEnE,KAAK,CAAC,GAAG;QACP,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAE/C,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,mBAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;YAE5C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE;gBACnC,OAAO;aACR,CAAC,CAAC;YACH,8DAA8D;YAC9D,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC;YAEjC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAClC,8DAA8D;YAC9D,IAAI,CAAC,CAAC,GAAG,YAAY,OAAO,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;gBACxD,MAAM,IAAI,SAAS,CAAC,iCAAiC,CAAC,CAAC;YACzD,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAC1C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAc,CAAC,CAAC;YAClC,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF,CAAA;AA1BY,gDAAkB;6BAAlB,kBAAkB;IAN9B,IAAA,6BAAgB,EAAC,WAAW,EAAE;QAC7B,WAAW,EAAE,IAAA,aAAI,EAAA;;;6CAG0B;KAC5C,CAAC;GACW,kBAAkB,CA0B9B"}
|
|
@@ -14,15 +14,18 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
15
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
16
|
};
|
|
17
|
+
var StartCommand_1;
|
|
17
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
19
|
+
exports.StartCommand = void 0;
|
|
19
20
|
const cli_common_1 = require("@rsdk/cli.common");
|
|
20
21
|
const logging_1 = require("@rsdk/logging");
|
|
21
22
|
const node_path_1 = __importDefault(require("node:path"));
|
|
22
|
-
const opentelemetry_path_1 = require("
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
const opentelemetry_path_1 = require("../opentelemetry/opentelemetry.path");
|
|
24
|
+
const start_dev_variation_1 = require("./start-dev.variation");
|
|
25
|
+
const start_dry_variation_1 = require("./start-dry.variation");
|
|
26
|
+
let StartCommand = StartCommand_1 = class StartCommand {
|
|
27
|
+
logger = logging_1.LoggerFactory.create(StartCommand_1);
|
|
28
|
+
async run(otel) {
|
|
26
29
|
this.logger.trace('execute start command');
|
|
27
30
|
try {
|
|
28
31
|
if (otel) {
|
|
@@ -44,13 +47,21 @@ class StartCmd {
|
|
|
44
47
|
throw error;
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
|
-
}
|
|
48
|
-
exports.
|
|
50
|
+
};
|
|
51
|
+
exports.StartCommand = StartCommand;
|
|
49
52
|
__decorate([
|
|
50
|
-
(0, cli_common_1.
|
|
51
|
-
|
|
53
|
+
__param(0, (0, cli_common_1.Option)('otel', {
|
|
54
|
+
description: 'Enable opentelemetry tracing',
|
|
55
|
+
defaultValue: false,
|
|
56
|
+
})),
|
|
52
57
|
__metadata("design:type", Function),
|
|
53
58
|
__metadata("design:paramtypes", [Boolean]),
|
|
54
59
|
__metadata("design:returntype", Promise)
|
|
55
|
-
],
|
|
56
|
-
|
|
60
|
+
], StartCommand.prototype, "run", null);
|
|
61
|
+
exports.StartCommand = StartCommand = StartCommand_1 = __decorate([
|
|
62
|
+
(0, cli_common_1.Command)('start', {
|
|
63
|
+
description: 'Start app from dist/app.js',
|
|
64
|
+
variations: [start_dev_variation_1.StartDevCommand, start_dry_variation_1.StartDrySubCommand],
|
|
65
|
+
})
|
|
66
|
+
], StartCommand);
|
|
67
|
+
//# sourceMappingURL=start.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start.command.js","sourceRoot":"","sources":["../../src/commands/start.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,iDAA8D;AAC9D,2CAA8C;AAC9C,0DAA6B;AAE7B,4EAA8E;AAE9E,+DAAwD;AACxD,+DAA2D;AAMpD,IAAM,YAAY,oBAAlB,MAAM,YAAY;IACN,MAAM,GAAG,uBAAa,CAAC,MAAM,CAAC,cAAY,CAAC,CAAC;IAEvD,AAAN,KAAK,CAAC,GAAG,CAKP,IAAa;QAEb,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAE3C,IAAI,CAAC;YACH,IAAI,IAAI,EAAE,CAAC;gBACT,OAAO,CAAC,4CAAuB,CAAC,CAAC;gBACjC,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,MAAM,CAAC;YACxC,CAAC;YAED,MAAM,OAAO,GAAG,mBAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;YAE5C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;YACnD,8DAA8D;YAC9D,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC;YACjC,8DAA8D;YAC9D,IAAI,CAAC,CAAC,GAAG,YAAY,OAAO,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;gBACxD,MAAM,IAAI,SAAS,CAAC,iCAAiC,CAAC,CAAC;YACzD,CAAC;YACD,MAAM,GAAG,CAAC,GAAG,EAAE,CAAC;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAc,CAAC,CAAC;YAClC,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF,CAAA;AAjCY,oCAAY;AAGjB;IACH,WAAA,IAAA,mBAAM,EAAC,MAAM,EAAE;QACd,WAAW,EAAE,8BAA8B;QAC3C,YAAY,EAAE,KAAK;KACpB,CAAC,CAAA;;;;uCAyBH;uBAhCU,YAAY;IAJxB,IAAA,oBAAO,EAAC,OAAO,EAAE;QAChB,WAAW,EAAE,4BAA4B;QACzC,UAAU,EAAE,CAAC,qCAAe,EAAE,wCAAkB,CAAC;KAClD,CAAC;GACW,YAAY,CAiCxB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { Command } from 'commander';
|
|
3
|
-
declare class StartRsdkCmd implements RsdkCliCommand {
|
|
4
|
-
getCommands(): Command[];
|
|
5
|
-
}
|
|
6
|
-
export declare const Cmd: StartRsdkCmd;
|
|
7
|
-
export {};
|
|
1
|
+
export { StartCommand as default } from './commands/start.command';
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const start_dev_cmd_1 = require("./start-dev.cmd");
|
|
7
|
-
const start_dry_cmd_1 = require("./start-dry.cmd");
|
|
8
|
-
class StartRsdkCmd {
|
|
9
|
-
getCommands() {
|
|
10
|
-
return [
|
|
11
|
-
...(0, cli_common_1.getCommanderCommand)(start_cmd_1.StartCmd),
|
|
12
|
-
...(0, cli_common_1.getCommanderCommand)(start_dev_cmd_1.StartDevCmd),
|
|
13
|
-
...(0, cli_common_1.getCommanderCommand)(start_dry_cmd_1.StartDryCmd),
|
|
14
|
-
];
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.Cmd = new StartRsdkCmd();
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
var start_command_1 = require("./commands/start.command");
|
|
5
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return start_command_1.StartCommand; } });
|
|
18
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,0DAAmE;AAA1D,wGAAA,YAAY,OAAW"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/cli.cmd.start",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-next.1",
|
|
4
4
|
"description": "Start command for rsdk cli",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -16,31 +16,32 @@
|
|
|
16
16
|
"license": "Apache License 2.0",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"commander": "^12.1.0",
|
|
19
|
-
"dotenv": "^16.
|
|
19
|
+
"dotenv": "^16.3.1",
|
|
20
20
|
"execa": "^5.1.1",
|
|
21
21
|
"yaml": "^2.6.1"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@nestjs/common": "^10.0.0",
|
|
25
25
|
"@nestjs/core": "^10.0.0",
|
|
26
|
-
"@opentelemetry/api": "
|
|
27
|
-
"@opentelemetry/auto-instrumentations-node": "
|
|
28
|
-
"@opentelemetry/core": "
|
|
29
|
-
"@opentelemetry/exporter-metrics-otlp-http": "
|
|
30
|
-
"@opentelemetry/exporter-trace-otlp-http": "
|
|
31
|
-
"@opentelemetry/propagator-b3": "
|
|
32
|
-
"@opentelemetry/resource-detector-container": "
|
|
33
|
-
"@opentelemetry/resources": "
|
|
34
|
-
"@opentelemetry/sdk-metrics": "
|
|
35
|
-
"@opentelemetry/sdk-node": "
|
|
36
|
-
"@opentelemetry/sdk-trace-node": "
|
|
37
|
-
"@opentelemetry/semantic-conventions": "
|
|
26
|
+
"@opentelemetry/api": "1.9.0",
|
|
27
|
+
"@opentelemetry/auto-instrumentations-node": "0.53.0",
|
|
28
|
+
"@opentelemetry/core": "1.28.0",
|
|
29
|
+
"@opentelemetry/exporter-metrics-otlp-http": "0.55.0",
|
|
30
|
+
"@opentelemetry/exporter-trace-otlp-http": "0.55.0",
|
|
31
|
+
"@opentelemetry/propagator-b3": "1.28.0",
|
|
32
|
+
"@opentelemetry/resource-detector-container": "0.5.1",
|
|
33
|
+
"@opentelemetry/resources": "1.28.0",
|
|
34
|
+
"@opentelemetry/sdk-metrics": "1.28.0",
|
|
35
|
+
"@opentelemetry/sdk-node": "0.55.0",
|
|
36
|
+
"@opentelemetry/sdk-trace-node": "1.28.0",
|
|
37
|
+
"@opentelemetry/semantic-conventions": "1.28.0",
|
|
38
38
|
"@rsdk/actx": "*",
|
|
39
39
|
"@rsdk/cli.common": "*",
|
|
40
|
+
"@rsdk/common": "*",
|
|
40
41
|
"@rsdk/core": "*",
|
|
41
42
|
"@rsdk/logging": "*",
|
|
42
43
|
"reflect-metadata": "^0.1.12 || ^0.2.0",
|
|
43
|
-
"rxjs": "^7.1
|
|
44
|
+
"rxjs": "^7.8.1"
|
|
44
45
|
},
|
|
45
46
|
"peerDependenciesMeta": {
|
|
46
47
|
"@opentelemetry/api": {
|
|
@@ -80,5 +81,5 @@
|
|
|
80
81
|
"optional": true
|
|
81
82
|
}
|
|
82
83
|
},
|
|
83
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "3114a76df17cf98d6f3cbb8a931599a883af6783"
|
|
84
85
|
}
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommandVariation, IRunnable, Option } from '@rsdk/cli.common';
|
|
2
2
|
import { LoggerFactory } from '@rsdk/logging';
|
|
3
3
|
import execa from 'execa';
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
|
|
6
|
-
import { OPENTELEMETRY_INIT_PATH } from '
|
|
6
|
+
import { OPENTELEMETRY_INIT_PATH } from '../opentelemetry/opentelemetry.path';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
@CommandVariation('start:dev', {
|
|
9
|
+
description: 'Start app from src/main.ts in watch mode',
|
|
10
|
+
})
|
|
11
|
+
export class StartDevCommand implements IRunnable {
|
|
12
|
+
static logger = LoggerFactory.create(StartDevCommand);
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@Option('otel', 'Enable opentelemetry tracing', Boolean)
|
|
14
|
+
async run(
|
|
15
|
+
@Option('otel', { description: 'Enable opentelemetry tracing' })
|
|
14
16
|
otel: boolean,
|
|
15
|
-
@Option('pretty',
|
|
16
|
-
|
|
17
|
+
@Option('pretty', {
|
|
18
|
+
description: 'Enable PinoPretty output',
|
|
19
|
+
defaultValue: true,
|
|
20
|
+
})
|
|
17
21
|
pretty: boolean,
|
|
18
22
|
): Promise<void> {
|
|
19
23
|
const tracingPart = [`-r`, OPENTELEMETRY_INIT_PATH];
|
|
@@ -30,7 +34,7 @@ export class StartDevCmd {
|
|
|
30
34
|
|
|
31
35
|
const cmd = [bin, ...command].join(' ');
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
StartDevCommand.logger.trace('run command: ' + cmd);
|
|
34
38
|
const appCwd = path.resolve();
|
|
35
39
|
|
|
36
40
|
const spawn = execa(bin, command, {
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommandVariation, IRunnable } from '@rsdk/cli.common';
|
|
2
|
+
import { text } from '@rsdk/common';
|
|
2
3
|
import { LoggerFactory } from '@rsdk/logging';
|
|
3
4
|
import path from 'node:path';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
@CommandVariation('start:dry', {
|
|
7
|
+
description: text`
|
|
8
|
+
Just checking that the file exists, can be imported without
|
|
9
|
+
errors (all peer dependencies are there)
|
|
10
|
+
and .app from dist/app.js is PlatformApp`,
|
|
11
|
+
})
|
|
12
|
+
export class StartDrySubCommand implements IRunnable {
|
|
13
|
+
private readonly logger = LoggerFactory.create(StartDrySubCommand);
|
|
7
14
|
|
|
8
|
-
|
|
9
|
-
'start:dry',
|
|
10
|
-
'just checking that the file exists, can be imported without errors (all peer dependencies are there) and .app from dist/app.js is PlatformApp',
|
|
11
|
-
)
|
|
12
|
-
async handle(): Promise<void> {
|
|
15
|
+
async run(): Promise<void> {
|
|
13
16
|
this.logger.trace('execute start:dry command');
|
|
14
17
|
|
|
15
18
|
try {
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Command, IRunnable, Option } from '@rsdk/cli.common';
|
|
2
2
|
import { LoggerFactory } from '@rsdk/logging';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
|
|
5
|
-
import { OPENTELEMETRY_INIT_PATH } from '
|
|
5
|
+
import { OPENTELEMETRY_INIT_PATH } from '../opentelemetry/opentelemetry.path';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
import { StartDevCommand } from './start-dev.variation';
|
|
8
|
+
import { StartDrySubCommand } from './start-dry.variation';
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
@Command('start', {
|
|
11
|
+
description: 'Start app from dist/app.js',
|
|
12
|
+
variations: [StartDevCommand, StartDrySubCommand],
|
|
13
|
+
})
|
|
14
|
+
export class StartCommand implements IRunnable {
|
|
15
|
+
private readonly logger = LoggerFactory.create(StartCommand);
|
|
16
|
+
|
|
17
|
+
async run(
|
|
18
|
+
@Option('otel', {
|
|
19
|
+
description: 'Enable opentelemetry tracing',
|
|
20
|
+
defaultValue: false,
|
|
21
|
+
})
|
|
22
|
+
otel: boolean,
|
|
13
23
|
): Promise<void> {
|
|
14
24
|
this.logger.trace('execute start command');
|
|
15
25
|
|
package/src/index.ts
CHANGED
|
@@ -1,19 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { getCommanderCommand } from '@rsdk/cli.common';
|
|
3
|
-
import type { Command } from 'commander';
|
|
4
|
-
|
|
5
|
-
import { StartCmd } from './start.cmd';
|
|
6
|
-
import { StartDevCmd } from './start-dev.cmd';
|
|
7
|
-
import { StartDryCmd } from './start-dry.cmd';
|
|
8
|
-
|
|
9
|
-
class StartRsdkCmd implements RsdkCliCommand {
|
|
10
|
-
getCommands(): Command[] {
|
|
11
|
-
return [
|
|
12
|
-
...getCommanderCommand(StartCmd),
|
|
13
|
-
...getCommanderCommand(StartDevCmd),
|
|
14
|
-
...getCommanderCommand(StartDryCmd),
|
|
15
|
-
];
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const Cmd = new StartRsdkCmd();
|
|
1
|
+
export { StartCommand as default } from './commands/start.command';
|
package/dist/start-dev.cmd.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"start-dev.cmd.js","sourceRoot":"","sources":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CAAC;IAMtD,AAAN,KAAK,CAAC,MAAM;QACV,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAE/C,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,mBAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;YAE5C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE;gBACnC,OAAO;aACR,CAAC,CAAC;YACH,8DAA8D;YAC9D,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC;YAEjC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAClC,8DAA8D;YAC9D,IAAI,CAAC,CAAC,GAAG,YAAY,OAAO,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;gBACxD,MAAM,IAAI,SAAS,CAAC,iCAAiC,CAAC,CAAC;YACzD,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAC1C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAc,CAAC,CAAC;YAClC,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AA9BD,kCA8BC;AAvBO;IAJL,IAAA,mBAAM,EACL,WAAW,EACX,+IAA+I,CAChJ;;;;yCAuBA"}
|
package/dist/start.cmd.d.ts
DELETED
package/dist/start.cmd.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"start.cmd.js","sourceRoot":"","sources":["../src/start.cmd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,iDAAkD;AAClD,2CAA8C;AAC9C,0DAA6B;AAE7B,2EAA6E;AAE7E,MAAa,QAAQ;IACF,MAAM,GAAG,uBAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAGnD,AAAN,KAAK,CAAC,MAAM,C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