@enspirit/emb 0.22.1 → 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.
Files changed (31) hide show
  1. package/README.md +79 -105
  2. package/dist/src/cli/commands/components/shell.d.ts +1 -1
  3. package/dist/src/cli/commands/components/shell.js +8 -6
  4. package/dist/src/cli/commands/down.d.ts +4 -0
  5. package/dist/src/cli/commands/down.js +17 -12
  6. package/dist/src/cli/commands/logs/archive.d.ts +1 -1
  7. package/dist/src/cli/commands/logs/archive.js +12 -11
  8. package/dist/src/cli/commands/logs/index.d.ts +1 -1
  9. package/dist/src/cli/commands/logs/index.js +12 -12
  10. package/dist/src/cli/commands/restart.d.ts +1 -1
  11. package/dist/src/cli/commands/restart.js +10 -9
  12. package/dist/src/cli/commands/start.d.ts +1 -1
  13. package/dist/src/cli/commands/start.js +7 -10
  14. package/dist/src/cli/commands/stop.d.ts +4 -0
  15. package/dist/src/cli/commands/stop.js +17 -12
  16. package/dist/src/cli/commands/up.d.ts +1 -1
  17. package/dist/src/cli/commands/up.js +20 -19
  18. package/dist/src/docker/compose/client.d.ts +15 -1
  19. package/dist/src/docker/compose/client.js +32 -2
  20. package/dist/src/docker/compose/operations/ComposeDownOperation.d.ts +6 -6
  21. package/dist/src/docker/compose/operations/ComposeDownOperation.js +28 -9
  22. package/dist/src/docker/compose/operations/ComposeLogsArchiveOperation.d.ts +3 -3
  23. package/dist/src/docker/compose/operations/ComposeLogsArchiveOperation.js +12 -13
  24. package/dist/src/docker/compose/operations/ComposeStopOperation.d.ts +6 -6
  25. package/dist/src/docker/compose/operations/ComposeStopOperation.js +28 -9
  26. package/dist/src/docker/compose/operations/ComposeUpOperation.d.ts +1 -1
  27. package/dist/src/docker/compose/operations/ComposeUpOperation.js +4 -4
  28. package/oclif.manifest.json +97 -144
  29. package/package.json +1 -1
  30. package/dist/src/cli/commands/components/logs.d.ts +0 -14
  31. package/dist/src/cli/commands/components/logs.js +0 -44
@@ -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": true,
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
- "component": {
171
- "description": "The component(s) to restart",
172
- "name": "component"
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 depdendent components",
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
- "component": {
230
- "description": "The component(s) to start",
231
- "name": "component"
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": true,
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
- "component": {
337
- "description": "The component(s) to build and start",
338
- "name": "component"
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
- "component": {
519
- "description": "The component you want to get a shell on",
520
- "name": "component",
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 component.",
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
- "component": {
1238
- "description": "The component(s) to archive logs for (all if omitted)",
1239
- "name": "component",
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 component).",
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
- "component": {
1317
- "description": "The component(s) you want to see the logs of (all if omitted)",
1318
- "name": "component",
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 components logs.",
1275
+ "description": "Get service logs.",
1323
1276
  "examples": [
1324
1277
  "<%= config.bin %> <%= command.id %>",
1325
1278
  "<%= config.bin %> <%= command.id %> backend",
@@ -1367,18 +1320,13 @@
1367
1320
  "index.js"
1368
1321
  ]
1369
1322
  },
1370
- "resources:build": {
1323
+ "secrets": {
1371
1324
  "aliases": [],
1372
- "args": {
1373
- "component": {
1374
- "description": "List of resources to build (defaults to all)",
1375
- "name": "component",
1376
- "required": false
1377
- }
1378
- },
1379
- "description": "Build the resources of the monorepo",
1325
+ "args": {},
1326
+ "description": "List all secret references in the configuration.",
1380
1327
  "examples": [
1381
- "<%= config.bin %> <%= command.id %> build --flavor development"
1328
+ "<%= config.bin %> <%= command.id %>",
1329
+ "<%= config.bin %> <%= command.id %> --json"
1382
1330
  ],
1383
1331
  "flags": {
1384
1332
  "json": {
@@ -1409,30 +1357,15 @@
1409
1357
  "hasDynamicHelp": false,
1410
1358
  "multiple": false,
1411
1359
  "type": "option"
1412
- },
1413
- "dry-run": {
1414
- "description": "Do not build the resources but only produce build meta information",
1415
- "name": "dry-run",
1416
- "required": false,
1417
- "allowNo": false,
1418
- "type": "boolean"
1419
- },
1420
- "force": {
1421
- "char": "f",
1422
- "description": "Bypass the cache and force the build",
1423
- "name": "force",
1424
- "required": false,
1425
- "allowNo": false,
1426
- "type": "boolean"
1427
1360
  }
1428
1361
  },
1429
1362
  "hasDynamicHelp": false,
1430
1363
  "hiddenAliases": [],
1431
- "id": "resources:build",
1364
+ "id": "secrets",
1432
1365
  "pluginAlias": "@enspirit/emb",
1433
1366
  "pluginName": "@enspirit/emb",
1434
1367
  "pluginType": "core",
1435
- "strict": false,
1368
+ "strict": true,
1436
1369
  "enableJsonFlag": true,
1437
1370
  "isESM": true,
1438
1371
  "relativePath": [
@@ -1440,14 +1373,14 @@
1440
1373
  "src",
1441
1374
  "cli",
1442
1375
  "commands",
1443
- "resources",
1444
- "build.js"
1376
+ "secrets",
1377
+ "index.js"
1445
1378
  ]
1446
1379
  },
1447
- "resources": {
1380
+ "secrets:providers": {
1448
1381
  "aliases": [],
1449
1382
  "args": {},
1450
- "description": "List resources.",
1383
+ "description": "Show configured secret providers and their status.",
1451
1384
  "examples": [
1452
1385
  "<%= config.bin %> <%= command.id %>"
1453
1386
  ],
@@ -1484,7 +1417,7 @@
1484
1417
  },
1485
1418
  "hasDynamicHelp": false,
1486
1419
  "hiddenAliases": [],
1487
- "id": "resources",
1420
+ "id": "secrets:providers",
1488
1421
  "pluginAlias": "@enspirit/emb",
1489
1422
  "pluginName": "@enspirit/emb",
1490
1423
  "pluginType": "core",
@@ -1496,16 +1429,17 @@
1496
1429
  "src",
1497
1430
  "cli",
1498
1431
  "commands",
1499
- "resources",
1500
- "index.js"
1432
+ "secrets",
1433
+ "providers.js"
1501
1434
  ]
1502
1435
  },
1503
- "secrets": {
1436
+ "secrets:validate": {
1504
1437
  "aliases": [],
1505
1438
  "args": {},
1506
- "description": "List all secret references in the configuration.",
1439
+ "description": "Validate that all secret references can be resolved (without showing values).",
1507
1440
  "examples": [
1508
1441
  "<%= config.bin %> <%= command.id %>",
1442
+ "<%= config.bin %> <%= command.id %> --fail-fast",
1509
1443
  "<%= config.bin %> <%= command.id %> --json"
1510
1444
  ],
1511
1445
  "flags": {
@@ -1537,11 +1471,17 @@
1537
1471
  "hasDynamicHelp": false,
1538
1472
  "multiple": false,
1539
1473
  "type": "option"
1474
+ },
1475
+ "fail-fast": {
1476
+ "description": "Stop on first validation error",
1477
+ "name": "fail-fast",
1478
+ "allowNo": false,
1479
+ "type": "boolean"
1540
1480
  }
1541
1481
  },
1542
1482
  "hasDynamicHelp": false,
1543
1483
  "hiddenAliases": [],
1544
- "id": "secrets",
1484
+ "id": "secrets:validate",
1545
1485
  "pluginAlias": "@enspirit/emb",
1546
1486
  "pluginName": "@enspirit/emb",
1547
1487
  "pluginType": "core",
@@ -1554,15 +1494,21 @@
1554
1494
  "cli",
1555
1495
  "commands",
1556
1496
  "secrets",
1557
- "index.js"
1497
+ "validate.js"
1558
1498
  ]
1559
1499
  },
1560
- "secrets:providers": {
1500
+ "resources:build": {
1561
1501
  "aliases": [],
1562
- "args": {},
1563
- "description": "Show configured secret providers and their status.",
1502
+ "args": {
1503
+ "component": {
1504
+ "description": "List of resources to build (defaults to all)",
1505
+ "name": "component",
1506
+ "required": false
1507
+ }
1508
+ },
1509
+ "description": "Build the resources of the monorepo",
1564
1510
  "examples": [
1565
- "<%= config.bin %> <%= command.id %>"
1511
+ "<%= config.bin %> <%= command.id %> build --flavor development"
1566
1512
  ],
1567
1513
  "flags": {
1568
1514
  "json": {
@@ -1593,15 +1539,30 @@
1593
1539
  "hasDynamicHelp": false,
1594
1540
  "multiple": false,
1595
1541
  "type": "option"
1542
+ },
1543
+ "dry-run": {
1544
+ "description": "Do not build the resources but only produce build meta information",
1545
+ "name": "dry-run",
1546
+ "required": false,
1547
+ "allowNo": false,
1548
+ "type": "boolean"
1549
+ },
1550
+ "force": {
1551
+ "char": "f",
1552
+ "description": "Bypass the cache and force the build",
1553
+ "name": "force",
1554
+ "required": false,
1555
+ "allowNo": false,
1556
+ "type": "boolean"
1596
1557
  }
1597
1558
  },
1598
1559
  "hasDynamicHelp": false,
1599
1560
  "hiddenAliases": [],
1600
- "id": "secrets:providers",
1561
+ "id": "resources:build",
1601
1562
  "pluginAlias": "@enspirit/emb",
1602
1563
  "pluginName": "@enspirit/emb",
1603
1564
  "pluginType": "core",
1604
- "strict": true,
1565
+ "strict": false,
1605
1566
  "enableJsonFlag": true,
1606
1567
  "isESM": true,
1607
1568
  "relativePath": [
@@ -1609,18 +1570,16 @@
1609
1570
  "src",
1610
1571
  "cli",
1611
1572
  "commands",
1612
- "secrets",
1613
- "providers.js"
1573
+ "resources",
1574
+ "build.js"
1614
1575
  ]
1615
1576
  },
1616
- "secrets:validate": {
1577
+ "resources": {
1617
1578
  "aliases": [],
1618
1579
  "args": {},
1619
- "description": "Validate that all secret references can be resolved (without showing values).",
1580
+ "description": "List resources.",
1620
1581
  "examples": [
1621
- "<%= config.bin %> <%= command.id %>",
1622
- "<%= config.bin %> <%= command.id %> --fail-fast",
1623
- "<%= config.bin %> <%= command.id %> --json"
1582
+ "<%= config.bin %> <%= command.id %>"
1624
1583
  ],
1625
1584
  "flags": {
1626
1585
  "json": {
@@ -1651,17 +1610,11 @@
1651
1610
  "hasDynamicHelp": false,
1652
1611
  "multiple": false,
1653
1612
  "type": "option"
1654
- },
1655
- "fail-fast": {
1656
- "description": "Stop on first validation error",
1657
- "name": "fail-fast",
1658
- "allowNo": false,
1659
- "type": "boolean"
1660
1613
  }
1661
1614
  },
1662
1615
  "hasDynamicHelp": false,
1663
1616
  "hiddenAliases": [],
1664
- "id": "secrets:validate",
1617
+ "id": "resources",
1665
1618
  "pluginAlias": "@enspirit/emb",
1666
1619
  "pluginName": "@enspirit/emb",
1667
1620
  "pluginType": "core",
@@ -1673,8 +1626,8 @@
1673
1626
  "src",
1674
1627
  "cli",
1675
1628
  "commands",
1676
- "secrets",
1677
- "validate.js"
1629
+ "resources",
1630
+ "index.js"
1678
1631
  ]
1679
1632
  },
1680
1633
  "tasks": {
@@ -1801,5 +1754,5 @@
1801
1754
  ]
1802
1755
  }
1803
1756
  },
1804
- "version": "0.22.1"
1757
+ "version": "0.23.0"
1805
1758
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enspirit/emb",
3
3
  "type": "module",
4
- "version": "0.22.1",
4
+ "version": "0.23.0",
5
5
  "keywords": [
6
6
  "monorepo",
7
7
  "docker",
@@ -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
- }