@enspirit/emb 0.5.2 → 0.6.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 (56) hide show
  1. package/README.md +87 -3
  2. package/dist/src/cli/abstract/BaseCommand.js +3 -1
  3. package/dist/src/cli/commands/components/logs.js +7 -19
  4. package/dist/src/cli/commands/images/push.d.ts +11 -0
  5. package/dist/src/cli/commands/images/push.js +29 -0
  6. package/dist/src/cli/commands/resources/index.js +9 -1
  7. package/dist/src/cli/commands/restart.d.ts +14 -0
  8. package/dist/src/cli/commands/restart.js +38 -0
  9. package/dist/src/cli/commands/stop.js +2 -2
  10. package/dist/src/cli/commands/tasks/index.js +1 -1
  11. package/dist/src/cli/commands/tasks/run.d.ts +1 -0
  12. package/dist/src/cli/commands/tasks/run.js +1 -0
  13. package/dist/src/config/schema.d.ts +6 -0
  14. package/dist/src/config/schema.json +7 -0
  15. package/dist/src/docker/compose/client.d.ts +24 -0
  16. package/dist/src/docker/compose/client.js +55 -0
  17. package/dist/src/docker/compose/index.d.ts +1 -0
  18. package/dist/src/docker/compose/index.js +1 -0
  19. package/dist/src/docker/compose/operations/ComposeExecOperation.d.ts +1 -0
  20. package/dist/src/docker/compose/operations/ComposeExecOperation.js +12 -1
  21. package/dist/src/docker/compose/operations/ComposeRestartOperation.d.ts +14 -0
  22. package/dist/src/docker/compose/operations/ComposeRestartOperation.js +46 -0
  23. package/dist/src/docker/compose/operations/index.d.ts +1 -0
  24. package/dist/src/docker/compose/operations/index.js +1 -0
  25. package/dist/src/docker/index.d.ts +0 -1
  26. package/dist/src/docker/index.js +0 -1
  27. package/dist/src/docker/operations/containers/ContainerExecOperation.d.ts +0 -3
  28. package/dist/src/docker/operations/containers/ContainerExecOperation.js +3 -19
  29. package/dist/src/docker/operations/images/PushImagesOperation.d.ts +9 -3
  30. package/dist/src/docker/operations/images/PushImagesOperation.js +104 -6
  31. package/dist/src/docker/resources/DockerImageResource.js +9 -6
  32. package/dist/src/monorepo/component.d.ts +1 -0
  33. package/dist/src/monorepo/component.js +3 -0
  34. package/dist/src/monorepo/config.js +1 -1
  35. package/dist/src/monorepo/monorepo.js +1 -8
  36. package/dist/src/monorepo/operations/resources/BuildResourcesOperation.js +0 -1
  37. package/dist/src/monorepo/operations/shell/ExecuteLocalCommandOperation.js +1 -0
  38. package/dist/src/monorepo/operations/tasks/RunTasksOperation.d.ts +5 -1
  39. package/dist/src/monorepo/operations/tasks/RunTasksOperation.js +8 -5
  40. package/dist/src/monorepo/resources/FileResourceBuilder.d.ts +1 -0
  41. package/dist/src/monorepo/resources/FileResourceBuilder.js +4 -1
  42. package/dist/src/monorepo/resources/ResourceFactory.js +1 -1
  43. package/dist/src/monorepo/resources/abstract/AbstractResourceBuilder.d.ts +1 -0
  44. package/dist/src/monorepo/resources/types.d.ts +6 -0
  45. package/dist/src/monorepo/types.d.ts +6 -1
  46. package/dist/src/monorepo/utils/EMBCollection.d.ts +0 -3
  47. package/dist/src/monorepo/utils/EMBCollection.js +0 -14
  48. package/dist/src/monorepo/utils/index.d.ts +7 -4
  49. package/dist/src/monorepo/utils/index.js +14 -8
  50. package/dist/src/types.d.ts +2 -0
  51. package/oclif.manifest.json +139 -36
  52. package/package.json +1 -1
  53. package/dist/src/docker/containers/getContainer.d.ts +0 -2
  54. package/dist/src/docker/containers/getContainer.js +0 -5
  55. package/dist/src/docker/containers/index.d.ts +0 -1
  56. package/dist/src/docker/containers/index.js +0 -1
@@ -80,6 +80,51 @@
80
80
  "down.js"
81
81
  ]
82
82
  },
83
+ "restart": {
84
+ "aliases": [],
85
+ "args": {
86
+ "component": {
87
+ "description": "The component(s) to restart",
88
+ "name": "component"
89
+ }
90
+ },
91
+ "description": "Restart the whole project.",
92
+ "examples": [
93
+ "<%= config.bin %> <%= command.id %>"
94
+ ],
95
+ "flags": {
96
+ "json": {
97
+ "description": "Format output as json.",
98
+ "helpGroup": "GLOBAL",
99
+ "name": "json",
100
+ "allowNo": false,
101
+ "type": "boolean"
102
+ },
103
+ "no-deps": {
104
+ "char": "f",
105
+ "description": "Don't restart depdendent components",
106
+ "name": "no-deps",
107
+ "allowNo": false,
108
+ "type": "boolean"
109
+ }
110
+ },
111
+ "hasDynamicHelp": false,
112
+ "hiddenAliases": [],
113
+ "id": "restart",
114
+ "pluginAlias": "@enspirit/emb",
115
+ "pluginName": "@enspirit/emb",
116
+ "pluginType": "core",
117
+ "strict": false,
118
+ "enableJsonFlag": true,
119
+ "isESM": true,
120
+ "relativePath": [
121
+ "dist",
122
+ "src",
123
+ "cli",
124
+ "commands",
125
+ "restart.js"
126
+ ]
127
+ },
83
128
  "stop": {
84
129
  "aliases": [],
85
130
  "args": {},
@@ -234,7 +279,7 @@
234
279
  "char": "f",
235
280
  "description": "Follow log output",
236
281
  "name": "follow",
237
- "allowNo": false,
282
+ "allowNo": true,
238
283
  "type": "boolean"
239
284
  }
240
285
  },
@@ -300,12 +345,10 @@
300
345
  "shell.js"
301
346
  ]
302
347
  },
303
- "containers": {
304
- "aliases": [
305
- "ps"
306
- ],
348
+ "config:print": {
349
+ "aliases": [],
307
350
  "args": {},
308
- "description": "List docker containers.",
351
+ "description": "Print the current config.",
309
352
  "examples": [
310
353
  "<%= config.bin %> <%= command.id %>"
311
354
  ],
@@ -317,22 +360,21 @@
317
360
  "allowNo": false,
318
361
  "type": "boolean"
319
362
  },
320
- "all": {
321
- "char": "a",
322
- "description": "Retun all containers. By default, only running containers are shown",
323
- "name": "all",
363
+ "flavor": {
364
+ "description": "Specify the flavor to use.",
365
+ "name": "flavor",
324
366
  "required": false,
325
- "allowNo": false,
326
- "type": "boolean"
367
+ "hasDynamicHelp": false,
368
+ "multiple": false,
369
+ "type": "option"
327
370
  }
328
371
  },
329
372
  "hasDynamicHelp": false,
330
373
  "hiddenAliases": [],
331
- "id": "containers",
374
+ "id": "config:print",
332
375
  "pluginAlias": "@enspirit/emb",
333
376
  "pluginName": "@enspirit/emb",
334
377
  "pluginType": "core",
335
- "strict": true,
336
378
  "enableJsonFlag": true,
337
379
  "isESM": true,
338
380
  "relativePath": [
@@ -340,14 +382,16 @@
340
382
  "src",
341
383
  "cli",
342
384
  "commands",
343
- "containers",
344
- "index.js"
385
+ "config",
386
+ "print.js"
345
387
  ]
346
388
  },
347
- "containers:prune": {
348
- "aliases": [],
389
+ "containers": {
390
+ "aliases": [
391
+ "ps"
392
+ ],
349
393
  "args": {},
350
- "description": "Prune containers.",
394
+ "description": "List docker containers.",
351
395
  "examples": [
352
396
  "<%= config.bin %> <%= command.id %>"
353
397
  ],
@@ -358,11 +402,19 @@
358
402
  "name": "json",
359
403
  "allowNo": false,
360
404
  "type": "boolean"
405
+ },
406
+ "all": {
407
+ "char": "a",
408
+ "description": "Retun all containers. By default, only running containers are shown",
409
+ "name": "all",
410
+ "required": false,
411
+ "allowNo": false,
412
+ "type": "boolean"
361
413
  }
362
414
  },
363
415
  "hasDynamicHelp": false,
364
416
  "hiddenAliases": [],
365
- "id": "containers:prune",
417
+ "id": "containers",
366
418
  "pluginAlias": "@enspirit/emb",
367
419
  "pluginName": "@enspirit/emb",
368
420
  "pluginType": "core",
@@ -375,13 +427,13 @@
375
427
  "cli",
376
428
  "commands",
377
429
  "containers",
378
- "prune.js"
430
+ "index.js"
379
431
  ]
380
432
  },
381
- "config:print": {
433
+ "containers:prune": {
382
434
  "aliases": [],
383
435
  "args": {},
384
- "description": "Print the current config.",
436
+ "description": "Prune containers.",
385
437
  "examples": [
386
438
  "<%= config.bin %> <%= command.id %>"
387
439
  ],
@@ -392,22 +444,15 @@
392
444
  "name": "json",
393
445
  "allowNo": false,
394
446
  "type": "boolean"
395
- },
396
- "flavor": {
397
- "description": "Specify the flavor to use.",
398
- "name": "flavor",
399
- "required": false,
400
- "hasDynamicHelp": false,
401
- "multiple": false,
402
- "type": "option"
403
447
  }
404
448
  },
405
449
  "hasDynamicHelp": false,
406
450
  "hiddenAliases": [],
407
- "id": "config:print",
451
+ "id": "containers:prune",
408
452
  "pluginAlias": "@enspirit/emb",
409
453
  "pluginName": "@enspirit/emb",
410
454
  "pluginType": "core",
455
+ "strict": true,
411
456
  "enableJsonFlag": true,
412
457
  "isESM": true,
413
458
  "relativePath": [
@@ -415,8 +460,8 @@
415
460
  "src",
416
461
  "cli",
417
462
  "commands",
418
- "config",
419
- "print.js"
463
+ "containers",
464
+ "prune.js"
420
465
  ]
421
466
  },
422
467
  "images:delete": {
@@ -552,6 +597,62 @@
552
597
  "prune.js"
553
598
  ]
554
599
  },
600
+ "images:push": {
601
+ "aliases": [],
602
+ "args": {},
603
+ "description": "Push docker images.",
604
+ "examples": [
605
+ "<%= config.bin %> <%= command.id %>",
606
+ "<%= config.bin %> <%= command.id %> --registry my.registry.io --retag newtag"
607
+ ],
608
+ "flags": {
609
+ "json": {
610
+ "description": "Format output as json.",
611
+ "helpGroup": "GLOBAL",
612
+ "name": "json",
613
+ "allowNo": false,
614
+ "type": "boolean"
615
+ },
616
+ "flavor": {
617
+ "description": "Specify the flavor to use.",
618
+ "name": "flavor",
619
+ "required": false,
620
+ "hasDynamicHelp": false,
621
+ "multiple": false,
622
+ "type": "option"
623
+ },
624
+ "registry": {
625
+ "description": "Override the registry to push to",
626
+ "name": "registry",
627
+ "hasDynamicHelp": false,
628
+ "multiple": false,
629
+ "type": "option"
630
+ },
631
+ "retag": {
632
+ "description": "Override the original tag to push to a new tag",
633
+ "name": "retag",
634
+ "hasDynamicHelp": false,
635
+ "multiple": false,
636
+ "type": "option"
637
+ }
638
+ },
639
+ "hasDynamicHelp": false,
640
+ "hiddenAliases": [],
641
+ "id": "images:push",
642
+ "pluginAlias": "@enspirit/emb",
643
+ "pluginName": "@enspirit/emb",
644
+ "pluginType": "core",
645
+ "enableJsonFlag": true,
646
+ "isESM": true,
647
+ "relativePath": [
648
+ "dist",
649
+ "src",
650
+ "cli",
651
+ "commands",
652
+ "images",
653
+ "push.js"
654
+ ]
655
+ },
555
656
  "resources:build": {
556
657
  "aliases": [],
557
658
  "args": {
@@ -691,7 +792,9 @@
691
792
  ]
692
793
  },
693
794
  "tasks:run": {
694
- "aliases": [],
795
+ "aliases": [
796
+ "run"
797
+ ],
695
798
  "args": {
696
799
  "task": {
697
800
  "description": "List of tasks to run. You can provide either ids or names (eg: component:task or task)",
@@ -750,5 +853,5 @@
750
853
  ]
751
854
  }
752
855
  },
753
- "version": "0.5.2"
856
+ "version": "0.6.0"
754
857
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enspirit/emb",
3
3
  "type": "module",
4
- "version": "0.5.2",
4
+ "version": "0.6.0",
5
5
  "keywords": [
6
6
  "monorepo",
7
7
  "docker",
@@ -1,2 +0,0 @@
1
- import { Container } from 'dockerode';
2
- export declare const getContainer: (id: string) => Promise<Container>;
@@ -1,5 +0,0 @@
1
- import { getContext } from '../../index.js';
2
- export const getContainer = async (id) => {
3
- const { docker } = getContext();
4
- return docker.getContainer(id);
5
- };
@@ -1 +0,0 @@
1
- export * from './getContainer.js';
@@ -1 +0,0 @@
1
- export * from './getContainer.js';