@enspirit/emb 0.22.0 → 0.23.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/README.md +79 -105
- package/dist/src/cli/commands/components/shell.d.ts +1 -1
- package/dist/src/cli/commands/components/shell.js +8 -6
- package/dist/src/cli/commands/down.d.ts +4 -0
- package/dist/src/cli/commands/down.js +17 -12
- package/dist/src/cli/commands/logs/archive.d.ts +1 -1
- package/dist/src/cli/commands/logs/archive.js +12 -11
- package/dist/src/cli/commands/logs/index.d.ts +1 -1
- package/dist/src/cli/commands/logs/index.js +12 -12
- package/dist/src/cli/commands/restart.d.ts +1 -1
- package/dist/src/cli/commands/restart.js +10 -9
- package/dist/src/cli/commands/start.d.ts +1 -1
- package/dist/src/cli/commands/start.js +7 -10
- package/dist/src/cli/commands/stop.d.ts +4 -0
- package/dist/src/cli/commands/stop.js +17 -12
- package/dist/src/cli/commands/up.d.ts +1 -1
- package/dist/src/cli/commands/up.js +20 -19
- package/dist/src/config/schema.json +4 -0
- package/dist/src/docker/compose/client.d.ts +15 -1
- package/dist/src/docker/compose/client.js +32 -2
- package/dist/src/docker/compose/operations/ComposeDownOperation.d.ts +6 -6
- package/dist/src/docker/compose/operations/ComposeDownOperation.js +28 -9
- package/dist/src/docker/compose/operations/ComposeLogsArchiveOperation.d.ts +3 -3
- package/dist/src/docker/compose/operations/ComposeLogsArchiveOperation.js +12 -13
- package/dist/src/docker/compose/operations/ComposeStopOperation.d.ts +6 -6
- package/dist/src/docker/compose/operations/ComposeStopOperation.js +28 -9
- package/dist/src/docker/compose/operations/ComposeUpOperation.d.ts +1 -1
- package/dist/src/docker/compose/operations/ComposeUpOperation.js +4 -4
- package/oclif.manifest.json +37 -84
- package/package.json +1 -1
- package/dist/src/cli/commands/components/logs.d.ts +0 -14
- package/dist/src/cli/commands/components/logs.js +0 -44
package/oclif.manifest.json
CHANGED
|
@@ -56,7 +56,12 @@
|
|
|
56
56
|
},
|
|
57
57
|
"down": {
|
|
58
58
|
"aliases": [],
|
|
59
|
-
"args": {
|
|
59
|
+
"args": {
|
|
60
|
+
"service": {
|
|
61
|
+
"description": "The service(s) to stop and remove",
|
|
62
|
+
"name": "service"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
60
65
|
"description": "Stop the whole project.",
|
|
61
66
|
"examples": [
|
|
62
67
|
"<%= config.bin %> <%= command.id %>"
|
|
@@ -98,7 +103,7 @@
|
|
|
98
103
|
"pluginAlias": "@enspirit/emb",
|
|
99
104
|
"pluginName": "@enspirit/emb",
|
|
100
105
|
"pluginType": "core",
|
|
101
|
-
"strict":
|
|
106
|
+
"strict": false,
|
|
102
107
|
"enableJsonFlag": true,
|
|
103
108
|
"isESM": true,
|
|
104
109
|
"relativePath": [
|
|
@@ -167,9 +172,9 @@
|
|
|
167
172
|
"restart": {
|
|
168
173
|
"aliases": [],
|
|
169
174
|
"args": {
|
|
170
|
-
"
|
|
171
|
-
"description": "The
|
|
172
|
-
"name": "
|
|
175
|
+
"service": {
|
|
176
|
+
"description": "The service(s) to restart",
|
|
177
|
+
"name": "service"
|
|
173
178
|
}
|
|
174
179
|
},
|
|
175
180
|
"description": "Restart the whole project.",
|
|
@@ -200,7 +205,7 @@
|
|
|
200
205
|
},
|
|
201
206
|
"no-deps": {
|
|
202
207
|
"char": "f",
|
|
203
|
-
"description": "Don't restart
|
|
208
|
+
"description": "Don't restart dependent services",
|
|
204
209
|
"name": "no-deps",
|
|
205
210
|
"allowNo": false,
|
|
206
211
|
"type": "boolean"
|
|
@@ -226,9 +231,9 @@
|
|
|
226
231
|
"start": {
|
|
227
232
|
"aliases": [],
|
|
228
233
|
"args": {
|
|
229
|
-
"
|
|
230
|
-
"description": "The
|
|
231
|
-
"name": "
|
|
234
|
+
"service": {
|
|
235
|
+
"description": "The service(s) to start",
|
|
236
|
+
"name": "service"
|
|
232
237
|
}
|
|
233
238
|
},
|
|
234
239
|
"description": "Starts the whole project.",
|
|
@@ -277,7 +282,12 @@
|
|
|
277
282
|
},
|
|
278
283
|
"stop": {
|
|
279
284
|
"aliases": [],
|
|
280
|
-
"args": {
|
|
285
|
+
"args": {
|
|
286
|
+
"service": {
|
|
287
|
+
"description": "The service(s) to stop",
|
|
288
|
+
"name": "service"
|
|
289
|
+
}
|
|
290
|
+
},
|
|
281
291
|
"description": "Stop the whole project.",
|
|
282
292
|
"examples": [
|
|
283
293
|
"<%= config.bin %> <%= command.id %>"
|
|
@@ -319,7 +329,7 @@
|
|
|
319
329
|
"pluginAlias": "@enspirit/emb",
|
|
320
330
|
"pluginName": "@enspirit/emb",
|
|
321
331
|
"pluginType": "core",
|
|
322
|
-
"strict":
|
|
332
|
+
"strict": false,
|
|
323
333
|
"enableJsonFlag": true,
|
|
324
334
|
"isESM": true,
|
|
325
335
|
"relativePath": [
|
|
@@ -333,9 +343,9 @@
|
|
|
333
343
|
"up": {
|
|
334
344
|
"aliases": [],
|
|
335
345
|
"args": {
|
|
336
|
-
"
|
|
337
|
-
"description": "The
|
|
338
|
-
"name": "
|
|
346
|
+
"service": {
|
|
347
|
+
"description": "The service(s) to build and start",
|
|
348
|
+
"name": "service"
|
|
339
349
|
}
|
|
340
350
|
},
|
|
341
351
|
"description": "Start the whole project.",
|
|
@@ -453,75 +463,18 @@
|
|
|
453
463
|
"index.js"
|
|
454
464
|
]
|
|
455
465
|
},
|
|
456
|
-
"components:logs": {
|
|
457
|
-
"aliases": [],
|
|
458
|
-
"args": {
|
|
459
|
-
"component": {
|
|
460
|
-
"description": "The component(s) you want to see the logs of (all if omitted)",
|
|
461
|
-
"name": "component",
|
|
462
|
-
"required": false
|
|
463
|
-
}
|
|
464
|
-
},
|
|
465
|
-
"description": "Get components logs.",
|
|
466
|
-
"examples": [
|
|
467
|
-
"<%= config.bin %> <%= command.id %>",
|
|
468
|
-
"<%= config.bin %> <%= command.id %> backend",
|
|
469
|
-
"<%= config.bin %> <%= command.id %> backend frontend",
|
|
470
|
-
"<%= config.bin %> <%= command.id %> --no-follow backend"
|
|
471
|
-
],
|
|
472
|
-
"flags": {
|
|
473
|
-
"verbose": {
|
|
474
|
-
"name": "verbose",
|
|
475
|
-
"allowNo": true,
|
|
476
|
-
"type": "boolean"
|
|
477
|
-
},
|
|
478
|
-
"root": {
|
|
479
|
-
"char": "C",
|
|
480
|
-
"description": "Run as if emb was started in <path>. Can also be set via EMB_ROOT env var.",
|
|
481
|
-
"name": "root",
|
|
482
|
-
"required": false,
|
|
483
|
-
"hasDynamicHelp": false,
|
|
484
|
-
"multiple": false,
|
|
485
|
-
"type": "option"
|
|
486
|
-
},
|
|
487
|
-
"follow": {
|
|
488
|
-
"char": "f",
|
|
489
|
-
"description": "Follow log output",
|
|
490
|
-
"name": "follow",
|
|
491
|
-
"allowNo": true,
|
|
492
|
-
"type": "boolean"
|
|
493
|
-
}
|
|
494
|
-
},
|
|
495
|
-
"hasDynamicHelp": false,
|
|
496
|
-
"hiddenAliases": [],
|
|
497
|
-
"id": "components:logs",
|
|
498
|
-
"pluginAlias": "@enspirit/emb",
|
|
499
|
-
"pluginName": "@enspirit/emb",
|
|
500
|
-
"pluginType": "core",
|
|
501
|
-
"strict": false,
|
|
502
|
-
"enableJsonFlag": false,
|
|
503
|
-
"isESM": true,
|
|
504
|
-
"relativePath": [
|
|
505
|
-
"dist",
|
|
506
|
-
"src",
|
|
507
|
-
"cli",
|
|
508
|
-
"commands",
|
|
509
|
-
"components",
|
|
510
|
-
"logs.js"
|
|
511
|
-
]
|
|
512
|
-
},
|
|
513
466
|
"components:shell": {
|
|
514
467
|
"aliases": [
|
|
515
468
|
"shell"
|
|
516
469
|
],
|
|
517
470
|
"args": {
|
|
518
|
-
"
|
|
519
|
-
"description": "The
|
|
520
|
-
"name": "
|
|
471
|
+
"service": {
|
|
472
|
+
"description": "The service you want to get a shell on",
|
|
473
|
+
"name": "service",
|
|
521
474
|
"required": true
|
|
522
475
|
}
|
|
523
476
|
},
|
|
524
|
-
"description": "Get a shell on a running
|
|
477
|
+
"description": "Get a shell on a running service.",
|
|
525
478
|
"examples": [
|
|
526
479
|
"<%= config.bin %> <%= command.id %>"
|
|
527
480
|
],
|
|
@@ -1234,13 +1187,13 @@
|
|
|
1234
1187
|
"logs:archive": {
|
|
1235
1188
|
"aliases": [],
|
|
1236
1189
|
"args": {
|
|
1237
|
-
"
|
|
1238
|
-
"description": "The
|
|
1239
|
-
"name": "
|
|
1190
|
+
"service": {
|
|
1191
|
+
"description": "The service(s) to archive logs for (all if omitted)",
|
|
1192
|
+
"name": "service",
|
|
1240
1193
|
"required": false
|
|
1241
1194
|
}
|
|
1242
1195
|
},
|
|
1243
|
-
"description": "Archive docker compose logs to files (one file per
|
|
1196
|
+
"description": "Archive docker compose logs to files (one file per service).",
|
|
1244
1197
|
"examples": [
|
|
1245
1198
|
"<%= config.bin %> <%= command.id %>",
|
|
1246
1199
|
"<%= config.bin %> <%= command.id %> backend frontend",
|
|
@@ -1313,13 +1266,13 @@
|
|
|
1313
1266
|
"logs": {
|
|
1314
1267
|
"aliases": [],
|
|
1315
1268
|
"args": {
|
|
1316
|
-
"
|
|
1317
|
-
"description": "The
|
|
1318
|
-
"name": "
|
|
1269
|
+
"service": {
|
|
1270
|
+
"description": "The service(s) you want to see the logs of (all if omitted)",
|
|
1271
|
+
"name": "service",
|
|
1319
1272
|
"required": false
|
|
1320
1273
|
}
|
|
1321
1274
|
},
|
|
1322
|
-
"description": "Get
|
|
1275
|
+
"description": "Get service logs.",
|
|
1323
1276
|
"examples": [
|
|
1324
1277
|
"<%= config.bin %> <%= command.id %>",
|
|
1325
1278
|
"<%= config.bin %> <%= command.id %> backend",
|
|
@@ -1801,5 +1754,5 @@
|
|
|
1801
1754
|
]
|
|
1802
1755
|
}
|
|
1803
1756
|
},
|
|
1804
|
-
"version": "0.
|
|
1757
|
+
"version": "0.23.0"
|
|
1805
1758
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BaseCommand } from '../../index.js';
|
|
2
|
-
export default class ComponentsLogs extends BaseCommand {
|
|
3
|
-
static description: string;
|
|
4
|
-
static enableJsonFlag: boolean;
|
|
5
|
-
static examples: string[];
|
|
6
|
-
static strict: boolean;
|
|
7
|
-
static flags: {
|
|
8
|
-
follow: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
-
};
|
|
10
|
-
static args: {
|
|
11
|
-
component: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
12
|
-
};
|
|
13
|
-
run(): Promise<void>;
|
|
14
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import { BaseCommand, getContext } from '../../index.js';
|
|
3
|
-
import { ComposeLogsOperation } from '../../../docker/index.js';
|
|
4
|
-
export default class ComponentsLogs extends BaseCommand {
|
|
5
|
-
static description = 'Get components logs.';
|
|
6
|
-
static enableJsonFlag = false;
|
|
7
|
-
static examples = [
|
|
8
|
-
'<%= config.bin %> <%= command.id %>',
|
|
9
|
-
'<%= config.bin %> <%= command.id %> backend',
|
|
10
|
-
'<%= config.bin %> <%= command.id %> backend frontend',
|
|
11
|
-
'<%= config.bin %> <%= command.id %> --no-follow backend',
|
|
12
|
-
];
|
|
13
|
-
static strict = false;
|
|
14
|
-
static flags = {
|
|
15
|
-
follow: Flags.boolean({
|
|
16
|
-
name: 'follow',
|
|
17
|
-
char: 'f',
|
|
18
|
-
allowNo: true,
|
|
19
|
-
description: 'Follow log output',
|
|
20
|
-
default: true,
|
|
21
|
-
}),
|
|
22
|
-
};
|
|
23
|
-
static args = {
|
|
24
|
-
component: Args.string({
|
|
25
|
-
name: 'component',
|
|
26
|
-
description: 'The component(s) you want to see the logs of (all if omitted)',
|
|
27
|
-
required: false,
|
|
28
|
-
}),
|
|
29
|
-
};
|
|
30
|
-
async run() {
|
|
31
|
-
const { flags, argv } = await this.parse(ComponentsLogs);
|
|
32
|
-
const { monorepo } = await getContext();
|
|
33
|
-
const componentNames = argv;
|
|
34
|
-
// Validate that all specified components exist
|
|
35
|
-
const services = componentNames.map((name) => {
|
|
36
|
-
const component = monorepo.component(name);
|
|
37
|
-
return component.name;
|
|
38
|
-
});
|
|
39
|
-
await monorepo.run(new ComposeLogsOperation(), {
|
|
40
|
-
services: services.length > 0 ? services : undefined,
|
|
41
|
-
follow: flags.follow,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
}
|