@enspirit/emb 0.17.5 → 0.19.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 +68 -38
- package/dist/src/cli/commands/components/logs.d.ts +0 -1
- package/dist/src/cli/commands/components/logs.js +0 -1
- package/dist/src/cli/commands/kubernetes/logs.d.ts +0 -1
- package/dist/src/cli/commands/kubernetes/logs.js +0 -1
- package/dist/src/cli/commands/logs/archive.d.ts +16 -0
- package/dist/src/cli/commands/logs/archive.js +59 -0
- package/dist/src/cli/commands/logs/index.d.ts +14 -0
- package/dist/src/cli/commands/logs/index.js +44 -0
- package/dist/src/config/schema.d.ts +4 -0
- package/dist/src/config/schema.json +8 -0
- package/dist/src/docker/compose/operations/ComposeLogsArchiveOperation.d.ts +17 -0
- package/dist/src/docker/compose/operations/ComposeLogsArchiveOperation.js +77 -0
- package/dist/src/docker/compose/operations/index.d.ts +1 -0
- package/dist/src/docker/compose/operations/index.js +1 -0
- package/dist/src/docker/operations/images/BuildImageOperation.d.ts +1 -0
- package/dist/src/docker/operations/images/BuildImageOperation.js +8 -0
- package/dist/src/docker/resources/DockerImageResource.js +1 -0
- package/oclif.manifest.json +254 -122
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ $ npm install -g @enspirit/emb
|
|
|
14
14
|
$ emb COMMAND
|
|
15
15
|
running command...
|
|
16
16
|
$ emb (--version)
|
|
17
|
-
@enspirit/emb/0.
|
|
17
|
+
@enspirit/emb/0.19.0 darwin-arm64 node-v22.21.1
|
|
18
18
|
$ emb --help [COMMAND]
|
|
19
19
|
USAGE
|
|
20
20
|
$ emb COMMAND
|
|
@@ -42,6 +42,7 @@ USAGE
|
|
|
42
42
|
* [`emb kubernetes restart [DEPLOYMENT]`](#emb-kubernetes-restart-deployment)
|
|
43
43
|
* [`emb kubernetes shell COMPONENT`](#emb-kubernetes-shell-component)
|
|
44
44
|
* [`emb logs [COMPONENT]`](#emb-logs-component)
|
|
45
|
+
* [`emb logs archive [COMPONENT]`](#emb-logs-archive-component)
|
|
45
46
|
* [`emb ps`](#emb-ps)
|
|
46
47
|
* [`emb resources`](#emb-resources)
|
|
47
48
|
* [`emb resources build [COMPONENT]`](#emb-resources-build-component)
|
|
@@ -112,7 +113,7 @@ EXAMPLES
|
|
|
112
113
|
$ emb clean
|
|
113
114
|
```
|
|
114
115
|
|
|
115
|
-
_See code: [src/commands/clean.ts](https://github.com/enspirit/emb/blob/v0.
|
|
116
|
+
_See code: [src/commands/clean.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/clean.ts)_
|
|
116
117
|
|
|
117
118
|
## `emb components`
|
|
118
119
|
|
|
@@ -137,7 +138,7 @@ EXAMPLES
|
|
|
137
138
|
$ emb components
|
|
138
139
|
```
|
|
139
140
|
|
|
140
|
-
_See code: [src/commands/components/index.ts](https://github.com/enspirit/emb/blob/v0.
|
|
141
|
+
_See code: [src/commands/components/index.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/components/index.ts)_
|
|
141
142
|
|
|
142
143
|
## `emb components logs [COMPONENT]`
|
|
143
144
|
|
|
@@ -158,9 +159,6 @@ FLAGS
|
|
|
158
159
|
DESCRIPTION
|
|
159
160
|
Get components logs.
|
|
160
161
|
|
|
161
|
-
ALIASES
|
|
162
|
-
$ emb logs
|
|
163
|
-
|
|
164
162
|
EXAMPLES
|
|
165
163
|
$ emb components logs
|
|
166
164
|
|
|
@@ -171,7 +169,7 @@ EXAMPLES
|
|
|
171
169
|
$ emb components logs --no-follow backend
|
|
172
170
|
```
|
|
173
171
|
|
|
174
|
-
_See code: [src/commands/components/logs.ts](https://github.com/enspirit/emb/blob/v0.
|
|
172
|
+
_See code: [src/commands/components/logs.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/components/logs.ts)_
|
|
175
173
|
|
|
176
174
|
## `emb components shell COMPONENT`
|
|
177
175
|
|
|
@@ -199,7 +197,7 @@ EXAMPLES
|
|
|
199
197
|
$ emb components shell
|
|
200
198
|
```
|
|
201
199
|
|
|
202
|
-
_See code: [src/commands/components/shell.ts](https://github.com/enspirit/emb/blob/v0.
|
|
200
|
+
_See code: [src/commands/components/shell.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/components/shell.ts)_
|
|
203
201
|
|
|
204
202
|
## `emb config print`
|
|
205
203
|
|
|
@@ -224,7 +222,7 @@ EXAMPLES
|
|
|
224
222
|
$ emb config print
|
|
225
223
|
```
|
|
226
224
|
|
|
227
|
-
_See code: [src/commands/config/print.ts](https://github.com/enspirit/emb/blob/v0.
|
|
225
|
+
_See code: [src/commands/config/print.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/config/print.ts)_
|
|
228
226
|
|
|
229
227
|
## `emb containers`
|
|
230
228
|
|
|
@@ -249,7 +247,7 @@ EXAMPLES
|
|
|
249
247
|
$ emb containers
|
|
250
248
|
```
|
|
251
249
|
|
|
252
|
-
_See code: [src/commands/containers/index.ts](https://github.com/enspirit/emb/blob/v0.
|
|
250
|
+
_See code: [src/commands/containers/index.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/containers/index.ts)_
|
|
253
251
|
|
|
254
252
|
## `emb containers prune`
|
|
255
253
|
|
|
@@ -273,7 +271,7 @@ EXAMPLES
|
|
|
273
271
|
$ emb containers prune
|
|
274
272
|
```
|
|
275
273
|
|
|
276
|
-
_See code: [src/commands/containers/prune.ts](https://github.com/enspirit/emb/blob/v0.
|
|
274
|
+
_See code: [src/commands/containers/prune.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/containers/prune.ts)_
|
|
277
275
|
|
|
278
276
|
## `emb down`
|
|
279
277
|
|
|
@@ -298,7 +296,7 @@ EXAMPLES
|
|
|
298
296
|
$ emb down
|
|
299
297
|
```
|
|
300
298
|
|
|
301
|
-
_See code: [src/commands/down.ts](https://github.com/enspirit/emb/blob/v0.
|
|
299
|
+
_See code: [src/commands/down.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/down.ts)_
|
|
302
300
|
|
|
303
301
|
## `emb help [COMMAND]`
|
|
304
302
|
|
|
@@ -344,7 +342,7 @@ EXAMPLES
|
|
|
344
342
|
$ emb images
|
|
345
343
|
```
|
|
346
344
|
|
|
347
|
-
_See code: [src/commands/images/index.ts](https://github.com/enspirit/emb/blob/v0.
|
|
345
|
+
_See code: [src/commands/images/index.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/images/index.ts)_
|
|
348
346
|
|
|
349
347
|
## `emb images delete`
|
|
350
348
|
|
|
@@ -369,7 +367,7 @@ EXAMPLES
|
|
|
369
367
|
$ emb images delete
|
|
370
368
|
```
|
|
371
369
|
|
|
372
|
-
_See code: [src/commands/images/delete.ts](https://github.com/enspirit/emb/blob/v0.
|
|
370
|
+
_See code: [src/commands/images/delete.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/images/delete.ts)_
|
|
373
371
|
|
|
374
372
|
## `emb images prune`
|
|
375
373
|
|
|
@@ -394,7 +392,7 @@ EXAMPLES
|
|
|
394
392
|
$ emb images prune
|
|
395
393
|
```
|
|
396
394
|
|
|
397
|
-
_See code: [src/commands/images/prune.ts](https://github.com/enspirit/emb/blob/v0.
|
|
395
|
+
_See code: [src/commands/images/prune.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/images/prune.ts)_
|
|
398
396
|
|
|
399
397
|
## `emb images push`
|
|
400
398
|
|
|
@@ -423,7 +421,7 @@ EXAMPLES
|
|
|
423
421
|
$ emb images push --registry my.registry.io --retag newtag
|
|
424
422
|
```
|
|
425
423
|
|
|
426
|
-
_See code: [src/commands/images/push.ts](https://github.com/enspirit/emb/blob/v0.
|
|
424
|
+
_See code: [src/commands/images/push.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/images/push.ts)_
|
|
427
425
|
|
|
428
426
|
## `emb kubernetes logs COMPONENT`
|
|
429
427
|
|
|
@@ -445,14 +443,11 @@ FLAGS
|
|
|
445
443
|
DESCRIPTION
|
|
446
444
|
Follow kubernetes logs.
|
|
447
445
|
|
|
448
|
-
ALIASES
|
|
449
|
-
$ emb logs
|
|
450
|
-
|
|
451
446
|
EXAMPLES
|
|
452
447
|
$ emb kubernetes logs
|
|
453
448
|
```
|
|
454
449
|
|
|
455
|
-
_See code: [src/commands/kubernetes/logs.ts](https://github.com/enspirit/emb/blob/v0.
|
|
450
|
+
_See code: [src/commands/kubernetes/logs.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/kubernetes/logs.ts)_
|
|
456
451
|
|
|
457
452
|
## `emb kubernetes ps`
|
|
458
453
|
|
|
@@ -475,7 +470,7 @@ EXAMPLES
|
|
|
475
470
|
$ emb kubernetes ps
|
|
476
471
|
```
|
|
477
472
|
|
|
478
|
-
_See code: [src/commands/kubernetes/ps.ts](https://github.com/enspirit/emb/blob/v0.
|
|
473
|
+
_See code: [src/commands/kubernetes/ps.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/kubernetes/ps.ts)_
|
|
479
474
|
|
|
480
475
|
## `emb kubernetes restart [DEPLOYMENT]`
|
|
481
476
|
|
|
@@ -500,7 +495,7 @@ EXAMPLES
|
|
|
500
495
|
$ emb kubernetes restart
|
|
501
496
|
```
|
|
502
497
|
|
|
503
|
-
_See code: [src/commands/kubernetes/restart.ts](https://github.com/enspirit/emb/blob/v0.
|
|
498
|
+
_See code: [src/commands/kubernetes/restart.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/kubernetes/restart.ts)_
|
|
504
499
|
|
|
505
500
|
## `emb kubernetes shell COMPONENT`
|
|
506
501
|
|
|
@@ -529,7 +524,7 @@ EXAMPLES
|
|
|
529
524
|
$ emb kubernetes shell
|
|
530
525
|
```
|
|
531
526
|
|
|
532
|
-
_See code: [src/commands/kubernetes/shell.ts](https://github.com/enspirit/emb/blob/v0.
|
|
527
|
+
_See code: [src/commands/kubernetes/shell.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/kubernetes/shell.ts)_
|
|
533
528
|
|
|
534
529
|
## `emb logs [COMPONENT]`
|
|
535
530
|
|
|
@@ -550,9 +545,6 @@ FLAGS
|
|
|
550
545
|
DESCRIPTION
|
|
551
546
|
Get components logs.
|
|
552
547
|
|
|
553
|
-
ALIASES
|
|
554
|
-
$ emb logs
|
|
555
|
-
|
|
556
548
|
EXAMPLES
|
|
557
549
|
$ emb logs
|
|
558
550
|
|
|
@@ -563,6 +555,44 @@ EXAMPLES
|
|
|
563
555
|
$ emb logs --no-follow backend
|
|
564
556
|
```
|
|
565
557
|
|
|
558
|
+
_See code: [src/commands/logs/index.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/logs/index.ts)_
|
|
559
|
+
|
|
560
|
+
## `emb logs archive [COMPONENT]`
|
|
561
|
+
|
|
562
|
+
Archive docker compose logs to files (one file per component).
|
|
563
|
+
|
|
564
|
+
```
|
|
565
|
+
USAGE
|
|
566
|
+
$ emb logs archive [COMPONENT...] [--json] [--verbose] [-C <value>] [-t] [--tail <value>] [-o <value>]
|
|
567
|
+
|
|
568
|
+
ARGUMENTS
|
|
569
|
+
[COMPONENT...] The component(s) to archive logs for (all if omitted)
|
|
570
|
+
|
|
571
|
+
FLAGS
|
|
572
|
+
-C, --root=<value> Run as if emb was started in <path>. Can also be set via EMB_ROOT env var.
|
|
573
|
+
-o, --output=<value> Output directory for log files (defaults to .emb/<flavor>/logs/docker/compose)
|
|
574
|
+
-t, --timestamps Include timestamps in logs
|
|
575
|
+
--tail=<value> Number of lines to show from the end of the logs
|
|
576
|
+
--[no-]verbose
|
|
577
|
+
|
|
578
|
+
GLOBAL FLAGS
|
|
579
|
+
--json Format output as json.
|
|
580
|
+
|
|
581
|
+
DESCRIPTION
|
|
582
|
+
Archive docker compose logs to files (one file per component).
|
|
583
|
+
|
|
584
|
+
EXAMPLES
|
|
585
|
+
$ emb logs archive
|
|
586
|
+
|
|
587
|
+
$ emb logs archive backend frontend
|
|
588
|
+
|
|
589
|
+
$ emb logs archive --timestamps
|
|
590
|
+
|
|
591
|
+
$ emb logs archive --tail 1000
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
_See code: [src/commands/logs/archive.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/logs/archive.ts)_
|
|
595
|
+
|
|
566
596
|
## `emb ps`
|
|
567
597
|
|
|
568
598
|
Lists the containers running in the project.
|
|
@@ -584,7 +614,7 @@ EXAMPLES
|
|
|
584
614
|
$ emb ps
|
|
585
615
|
```
|
|
586
616
|
|
|
587
|
-
_See code: [src/commands/ps.ts](https://github.com/enspirit/emb/blob/v0.
|
|
617
|
+
_See code: [src/commands/ps.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/ps.ts)_
|
|
588
618
|
|
|
589
619
|
## `emb resources`
|
|
590
620
|
|
|
@@ -609,7 +639,7 @@ EXAMPLES
|
|
|
609
639
|
$ emb resources
|
|
610
640
|
```
|
|
611
641
|
|
|
612
|
-
_See code: [src/commands/resources/index.ts](https://github.com/enspirit/emb/blob/v0.
|
|
642
|
+
_See code: [src/commands/resources/index.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/resources/index.ts)_
|
|
613
643
|
|
|
614
644
|
## `emb resources build [COMPONENT]`
|
|
615
645
|
|
|
@@ -639,7 +669,7 @@ EXAMPLES
|
|
|
639
669
|
$ emb resources build build --flavor development
|
|
640
670
|
```
|
|
641
671
|
|
|
642
|
-
_See code: [src/commands/resources/build.ts](https://github.com/enspirit/emb/blob/v0.
|
|
672
|
+
_See code: [src/commands/resources/build.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/resources/build.ts)_
|
|
643
673
|
|
|
644
674
|
## `emb restart [COMPONENT]`
|
|
645
675
|
|
|
@@ -667,7 +697,7 @@ EXAMPLES
|
|
|
667
697
|
$ emb restart
|
|
668
698
|
```
|
|
669
699
|
|
|
670
|
-
_See code: [src/commands/restart.ts](https://github.com/enspirit/emb/blob/v0.
|
|
700
|
+
_See code: [src/commands/restart.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/restart.ts)_
|
|
671
701
|
|
|
672
702
|
## `emb run TASK`
|
|
673
703
|
|
|
@@ -725,7 +755,7 @@ EXAMPLES
|
|
|
725
755
|
$ emb secrets --json
|
|
726
756
|
```
|
|
727
757
|
|
|
728
|
-
_See code: [src/commands/secrets/index.ts](https://github.com/enspirit/emb/blob/v0.
|
|
758
|
+
_See code: [src/commands/secrets/index.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/secrets/index.ts)_
|
|
729
759
|
|
|
730
760
|
## `emb secrets providers`
|
|
731
761
|
|
|
@@ -750,7 +780,7 @@ EXAMPLES
|
|
|
750
780
|
$ emb secrets providers
|
|
751
781
|
```
|
|
752
782
|
|
|
753
|
-
_See code: [src/commands/secrets/providers.ts](https://github.com/enspirit/emb/blob/v0.
|
|
783
|
+
_See code: [src/commands/secrets/providers.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/secrets/providers.ts)_
|
|
754
784
|
|
|
755
785
|
## `emb secrets validate`
|
|
756
786
|
|
|
@@ -780,7 +810,7 @@ EXAMPLES
|
|
|
780
810
|
$ emb secrets validate --json
|
|
781
811
|
```
|
|
782
812
|
|
|
783
|
-
_See code: [src/commands/secrets/validate.ts](https://github.com/enspirit/emb/blob/v0.
|
|
813
|
+
_See code: [src/commands/secrets/validate.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/secrets/validate.ts)_
|
|
784
814
|
|
|
785
815
|
## `emb shell COMPONENT`
|
|
786
816
|
|
|
@@ -833,7 +863,7 @@ EXAMPLES
|
|
|
833
863
|
$ emb start
|
|
834
864
|
```
|
|
835
865
|
|
|
836
|
-
_See code: [src/commands/start.ts](https://github.com/enspirit/emb/blob/v0.
|
|
866
|
+
_See code: [src/commands/start.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/start.ts)_
|
|
837
867
|
|
|
838
868
|
## `emb stop`
|
|
839
869
|
|
|
@@ -858,7 +888,7 @@ EXAMPLES
|
|
|
858
888
|
$ emb stop
|
|
859
889
|
```
|
|
860
890
|
|
|
861
|
-
_See code: [src/commands/stop.ts](https://github.com/enspirit/emb/blob/v0.
|
|
891
|
+
_See code: [src/commands/stop.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/stop.ts)_
|
|
862
892
|
|
|
863
893
|
## `emb tasks`
|
|
864
894
|
|
|
@@ -882,7 +912,7 @@ EXAMPLES
|
|
|
882
912
|
$ emb tasks
|
|
883
913
|
```
|
|
884
914
|
|
|
885
|
-
_See code: [src/commands/tasks/index.ts](https://github.com/enspirit/emb/blob/v0.
|
|
915
|
+
_See code: [src/commands/tasks/index.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/tasks/index.ts)_
|
|
886
916
|
|
|
887
917
|
## `emb tasks run TASK`
|
|
888
918
|
|
|
@@ -915,7 +945,7 @@ EXAMPLES
|
|
|
915
945
|
$ emb tasks run
|
|
916
946
|
```
|
|
917
947
|
|
|
918
|
-
_See code: [src/commands/tasks/run.ts](https://github.com/enspirit/emb/blob/v0.
|
|
948
|
+
_See code: [src/commands/tasks/run.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/tasks/run.ts)_
|
|
919
949
|
|
|
920
950
|
## `emb up [COMPONENT]`
|
|
921
951
|
|
|
@@ -944,7 +974,7 @@ EXAMPLES
|
|
|
944
974
|
$ emb up
|
|
945
975
|
```
|
|
946
976
|
|
|
947
|
-
_See code: [src/commands/up.ts](https://github.com/enspirit/emb/blob/v0.
|
|
977
|
+
_See code: [src/commands/up.ts](https://github.com/enspirit/emb/blob/v0.19.0/src/commands/up.ts)_
|
|
948
978
|
|
|
949
979
|
## `emb update [CHANNEL]`
|
|
950
980
|
|
|
@@ -2,7 +2,6 @@ import { Args, Flags } from '@oclif/core';
|
|
|
2
2
|
import { BaseCommand, getContext } from '../../index.js';
|
|
3
3
|
import { ComposeLogsOperation } from '../../../docker/index.js';
|
|
4
4
|
export default class ComponentsLogs extends BaseCommand {
|
|
5
|
-
static aliases = ['logs'];
|
|
6
5
|
static description = 'Get components logs.';
|
|
7
6
|
static enableJsonFlag = false;
|
|
8
7
|
static examples = [
|
|
@@ -4,7 +4,6 @@ import { PassThrough } from 'node:stream';
|
|
|
4
4
|
import { KubernetesCommand } from '../../index.js';
|
|
5
5
|
import { GetDeploymentPodsOperation } from '../../../kubernetes/operations/GetDeploymentPodsOperation.js';
|
|
6
6
|
export default class KubernetesLogs extends KubernetesCommand {
|
|
7
|
-
static aliases = ['logs'];
|
|
8
7
|
static description = 'Follow kubernetes logs.';
|
|
9
8
|
static enableJsonFlag = false;
|
|
10
9
|
static examples = ['<%= config.bin %> <%= command.id %>'];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseCommand } from '../../index.js';
|
|
2
|
+
export default class LogsArchive extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static enableJsonFlag: boolean;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static strict: boolean;
|
|
7
|
+
static flags: {
|
|
8
|
+
timestamps: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
tail: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
static args: {
|
|
13
|
+
component: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand, getContext } from '../../index.js';
|
|
3
|
+
import { ComposeLogsArchiveOperation } from '../../../docker/index.js';
|
|
4
|
+
export default class LogsArchive extends BaseCommand {
|
|
5
|
+
static description = 'Archive docker compose logs to files (one file per component).';
|
|
6
|
+
static enableJsonFlag = true;
|
|
7
|
+
static examples = [
|
|
8
|
+
'<%= config.bin %> <%= command.id %>',
|
|
9
|
+
'<%= config.bin %> <%= command.id %> backend frontend',
|
|
10
|
+
'<%= config.bin %> <%= command.id %> --timestamps',
|
|
11
|
+
'<%= config.bin %> <%= command.id %> --tail 1000',
|
|
12
|
+
];
|
|
13
|
+
static strict = false;
|
|
14
|
+
static flags = {
|
|
15
|
+
timestamps: Flags.boolean({
|
|
16
|
+
char: 't',
|
|
17
|
+
description: 'Include timestamps in logs',
|
|
18
|
+
default: false,
|
|
19
|
+
}),
|
|
20
|
+
tail: Flags.integer({
|
|
21
|
+
description: 'Number of lines to show from the end of the logs',
|
|
22
|
+
}),
|
|
23
|
+
output: Flags.string({
|
|
24
|
+
char: 'o',
|
|
25
|
+
description: 'Output directory for log files (defaults to .emb/<flavor>/logs/docker/compose)',
|
|
26
|
+
}),
|
|
27
|
+
};
|
|
28
|
+
static args = {
|
|
29
|
+
component: Args.string({
|
|
30
|
+
name: 'component',
|
|
31
|
+
description: 'The component(s) to archive logs for (all if omitted)',
|
|
32
|
+
required: false,
|
|
33
|
+
}),
|
|
34
|
+
};
|
|
35
|
+
async run() {
|
|
36
|
+
const { flags, argv } = await this.parse(LogsArchive);
|
|
37
|
+
const { monorepo } = await getContext();
|
|
38
|
+
const componentNames = argv;
|
|
39
|
+
// Validate that all specified components exist
|
|
40
|
+
if (componentNames.length > 0) {
|
|
41
|
+
componentNames.forEach((name) => monorepo.component(name));
|
|
42
|
+
}
|
|
43
|
+
const result = await monorepo.run(new ComposeLogsArchiveOperation(), {
|
|
44
|
+
components: componentNames.length > 0 ? componentNames : undefined,
|
|
45
|
+
outputDir: flags.output,
|
|
46
|
+
timestamps: flags.timestamps,
|
|
47
|
+
tail: flags.tail,
|
|
48
|
+
});
|
|
49
|
+
if (this.jsonEnabled()) {
|
|
50
|
+
this.log(JSON.stringify(result, null, 2));
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
this.log('Archived logs:');
|
|
54
|
+
for (const file of result) {
|
|
55
|
+
this.log(` ${file.component}: ${file.path}`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseCommand } from '../../index.js';
|
|
2
|
+
export default class Logs 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
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 Logs 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(Logs);
|
|
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
|
+
}
|
|
@@ -86,6 +86,10 @@
|
|
|
86
86
|
"target": {
|
|
87
87
|
"$ref": "#/definitions/Identifier"
|
|
88
88
|
},
|
|
89
|
+
"platform": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"description": "Target platform for the build (e.g., linux/amd64, linux/arm64)"
|
|
92
|
+
},
|
|
89
93
|
"buildArgs": {
|
|
90
94
|
"type": "object",
|
|
91
95
|
"additionalProperties": {
|
|
@@ -214,6 +218,10 @@
|
|
|
214
218
|
"type": "string",
|
|
215
219
|
"description": "The stage to target for the build"
|
|
216
220
|
},
|
|
221
|
+
"platform": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"description": "Target platform for the build (e.g., linux/amd64, linux/arm64)"
|
|
224
|
+
},
|
|
217
225
|
"labels": {
|
|
218
226
|
"type": "object",
|
|
219
227
|
"additionalProperties": {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import { AbstractOperation } from '../../../operations/index.js';
|
|
3
|
+
export declare const ComposeLogsArchiveOperationInputSchema: z.ZodOptional<z.ZodObject<{
|
|
4
|
+
components: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5
|
+
outputDir: z.ZodOptional<z.ZodString>;
|
|
6
|
+
timestamps: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
tail: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
}, z.core.$strip>>;
|
|
9
|
+
export interface ArchivedLogFile {
|
|
10
|
+
component: string;
|
|
11
|
+
path: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class ComposeLogsArchiveOperation extends AbstractOperation<typeof ComposeLogsArchiveOperationInputSchema, ArchivedLogFile[]> {
|
|
14
|
+
constructor();
|
|
15
|
+
protected _run(input: z.input<typeof ComposeLogsArchiveOperationInputSchema>): Promise<ArchivedLogFile[]>;
|
|
16
|
+
private archiveComponentLogs;
|
|
17
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { createWriteStream } from 'node:fs';
|
|
3
|
+
import { mkdir } from 'node:fs/promises';
|
|
4
|
+
import { dirname, join } from 'node:path';
|
|
5
|
+
import * as z from 'zod';
|
|
6
|
+
import { AbstractOperation } from '../../../operations/index.js';
|
|
7
|
+
export const ComposeLogsArchiveOperationInputSchema = z
|
|
8
|
+
.object({
|
|
9
|
+
components: z
|
|
10
|
+
.array(z.string())
|
|
11
|
+
.optional()
|
|
12
|
+
.describe('The list of components to archive logs for (all if omitted)'),
|
|
13
|
+
outputDir: z
|
|
14
|
+
.string()
|
|
15
|
+
.optional()
|
|
16
|
+
.describe('Output directory for log files (defaults to .emb/<flavor>/logs/docker/compose)'),
|
|
17
|
+
timestamps: z.boolean().optional().describe('Include timestamps in logs'),
|
|
18
|
+
tail: z
|
|
19
|
+
.number()
|
|
20
|
+
.optional()
|
|
21
|
+
.describe('Number of lines to show from the end'),
|
|
22
|
+
})
|
|
23
|
+
.optional();
|
|
24
|
+
export class ComposeLogsArchiveOperation extends AbstractOperation {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(ComposeLogsArchiveOperationInputSchema);
|
|
27
|
+
}
|
|
28
|
+
async _run(input) {
|
|
29
|
+
const { monorepo } = this.context;
|
|
30
|
+
// Determine which components to archive
|
|
31
|
+
const componentNames = input?.components ?? monorepo.components.map((c) => c.name);
|
|
32
|
+
// Validate all component names
|
|
33
|
+
const components = componentNames.map((name) => monorepo.component(name));
|
|
34
|
+
// Determine output directory
|
|
35
|
+
const outputDir = input?.outputDir ?? monorepo.store.join('logs/docker/compose');
|
|
36
|
+
// Ensure output directory exists
|
|
37
|
+
await mkdir(outputDir, { recursive: true });
|
|
38
|
+
// Archive logs for each component
|
|
39
|
+
const archivePromises = components.map(async (component) => {
|
|
40
|
+
const logPath = join(outputDir, `${component.name}.log`);
|
|
41
|
+
await this.archiveComponentLogs(component.name, logPath, input);
|
|
42
|
+
return { component: component.name, path: logPath };
|
|
43
|
+
});
|
|
44
|
+
return Promise.all(archivePromises);
|
|
45
|
+
}
|
|
46
|
+
async archiveComponentLogs(serviceName, outputPath, input) {
|
|
47
|
+
const { monorepo } = this.context;
|
|
48
|
+
// Ensure parent directory exists
|
|
49
|
+
await mkdir(dirname(outputPath), { recursive: true });
|
|
50
|
+
const cmd = 'docker';
|
|
51
|
+
const args = ['compose', 'logs', '--no-color'];
|
|
52
|
+
if (input?.timestamps) {
|
|
53
|
+
args.push('-t');
|
|
54
|
+
}
|
|
55
|
+
if (input?.tail !== undefined) {
|
|
56
|
+
args.push('--tail', String(input.tail));
|
|
57
|
+
}
|
|
58
|
+
args.push(serviceName);
|
|
59
|
+
return new Promise((resolve, reject) => {
|
|
60
|
+
const writeStream = createWriteStream(outputPath);
|
|
61
|
+
const child = spawn(cmd, args, {
|
|
62
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
63
|
+
cwd: monorepo.rootDir,
|
|
64
|
+
});
|
|
65
|
+
child.stdout?.pipe(writeStream, { end: false });
|
|
66
|
+
child.stderr?.pipe(writeStream, { end: false });
|
|
67
|
+
child.on('error', (err) => {
|
|
68
|
+
writeStream.end();
|
|
69
|
+
reject(new Error(`Failed to get logs for ${serviceName}: ${err.message}`));
|
|
70
|
+
});
|
|
71
|
+
child.on('exit', () => {
|
|
72
|
+
writeStream.end();
|
|
73
|
+
resolve();
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './ComposeDownOperation.js';
|
|
2
2
|
export * from './ComposeExecOperation.js';
|
|
3
3
|
export * from './ComposeExecShellOperation.js';
|
|
4
|
+
export * from './ComposeLogsArchiveOperation.js';
|
|
4
5
|
export * from './ComposeLogsOperation.js';
|
|
5
6
|
export * from './ComposePsOperation.js';
|
|
6
7
|
export * from './ComposeRestartOperation.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './ComposeDownOperation.js';
|
|
2
2
|
export * from './ComposeExecOperation.js';
|
|
3
3
|
export * from './ComposeExecShellOperation.js';
|
|
4
|
+
export * from './ComposeLogsArchiveOperation.js';
|
|
4
5
|
export * from './ComposeLogsOperation.js';
|
|
5
6
|
export * from './ComposePsOperation.js';
|
|
6
7
|
export * from './ComposeRestartOperation.js';
|
|
@@ -12,6 +12,7 @@ export declare const BuildImageOperationInputSchema: z.ZodObject<{
|
|
|
12
12
|
buildArgs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
13
13
|
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
14
14
|
target: z.ZodOptional<z.ZodString>;
|
|
15
|
+
platform: z.ZodOptional<z.ZodString>;
|
|
15
16
|
}, z.core.$strip>;
|
|
16
17
|
export declare class BuildImageOperation extends AbstractOperation<typeof BuildImageOperationInputSchema, void> {
|
|
17
18
|
private out?;
|
|
@@ -32,6 +32,10 @@ export const BuildImageOperationInputSchema = z.object({
|
|
|
32
32
|
.optional()
|
|
33
33
|
.describe('Arbitrary key/value labels to set on the image, as a JSON map of string pairs.'),
|
|
34
34
|
target: z.string().optional().describe('Target build stage'),
|
|
35
|
+
platform: z
|
|
36
|
+
.string()
|
|
37
|
+
.optional()
|
|
38
|
+
.describe('Target platform for the build (e.g., linux/amd64, linux/arm64)'),
|
|
35
39
|
});
|
|
36
40
|
export class BuildImageOperation extends AbstractOperation {
|
|
37
41
|
out;
|
|
@@ -55,6 +59,9 @@ export class BuildImageOperation extends AbstractOperation {
|
|
|
55
59
|
if (input.target) {
|
|
56
60
|
args.push('--target', input.target);
|
|
57
61
|
}
|
|
62
|
+
if (input.platform) {
|
|
63
|
+
args.push('--platform', input.platform);
|
|
64
|
+
}
|
|
58
65
|
Object.entries(input.buildArgs || []).forEach(([key, value]) => {
|
|
59
66
|
args.push('--build-arg', `${key.trim()}=${value.trim()}`);
|
|
60
67
|
});
|
|
@@ -99,6 +106,7 @@ export class BuildImageOperation extends AbstractOperation {
|
|
|
99
106
|
labels: input.labels,
|
|
100
107
|
t: input.tag,
|
|
101
108
|
target: input.target,
|
|
109
|
+
platform: input.platform,
|
|
102
110
|
version: '2',
|
|
103
111
|
});
|
|
104
112
|
return new Promise((resolve, reject) => {
|
|
@@ -69,6 +69,7 @@ class DockerImageResourceBuilder extends SentinelFileBasedBuilder {
|
|
|
69
69
|
'emb/flavor': this.monorepo.currentFlavor,
|
|
70
70
|
}),
|
|
71
71
|
target: this.config?.target,
|
|
72
|
+
platform: this.config?.platform || this.monorepo.defaults.docker?.platform,
|
|
72
73
|
};
|
|
73
74
|
return {
|
|
74
75
|
input: buildParams,
|
package/oclif.manifest.json
CHANGED
|
@@ -397,6 +397,62 @@
|
|
|
397
397
|
"up.js"
|
|
398
398
|
]
|
|
399
399
|
},
|
|
400
|
+
"config:print": {
|
|
401
|
+
"aliases": [],
|
|
402
|
+
"args": {},
|
|
403
|
+
"description": "Print the current config.",
|
|
404
|
+
"examples": [
|
|
405
|
+
"<%= config.bin %> <%= command.id %>"
|
|
406
|
+
],
|
|
407
|
+
"flags": {
|
|
408
|
+
"json": {
|
|
409
|
+
"description": "Format output as json.",
|
|
410
|
+
"helpGroup": "GLOBAL",
|
|
411
|
+
"name": "json",
|
|
412
|
+
"allowNo": false,
|
|
413
|
+
"type": "boolean"
|
|
414
|
+
},
|
|
415
|
+
"verbose": {
|
|
416
|
+
"name": "verbose",
|
|
417
|
+
"allowNo": true,
|
|
418
|
+
"type": "boolean"
|
|
419
|
+
},
|
|
420
|
+
"root": {
|
|
421
|
+
"char": "C",
|
|
422
|
+
"description": "Run as if emb was started in <path>. Can also be set via EMB_ROOT env var.",
|
|
423
|
+
"name": "root",
|
|
424
|
+
"required": false,
|
|
425
|
+
"hasDynamicHelp": false,
|
|
426
|
+
"multiple": false,
|
|
427
|
+
"type": "option"
|
|
428
|
+
},
|
|
429
|
+
"flavor": {
|
|
430
|
+
"description": "Specify the flavor to use.",
|
|
431
|
+
"name": "flavor",
|
|
432
|
+
"required": false,
|
|
433
|
+
"hasDynamicHelp": false,
|
|
434
|
+
"multiple": false,
|
|
435
|
+
"type": "option"
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
"hasDynamicHelp": false,
|
|
439
|
+
"hiddenAliases": [],
|
|
440
|
+
"id": "config:print",
|
|
441
|
+
"pluginAlias": "@enspirit/emb",
|
|
442
|
+
"pluginName": "@enspirit/emb",
|
|
443
|
+
"pluginType": "core",
|
|
444
|
+
"strict": true,
|
|
445
|
+
"enableJsonFlag": true,
|
|
446
|
+
"isESM": true,
|
|
447
|
+
"relativePath": [
|
|
448
|
+
"dist",
|
|
449
|
+
"src",
|
|
450
|
+
"cli",
|
|
451
|
+
"commands",
|
|
452
|
+
"config",
|
|
453
|
+
"print.js"
|
|
454
|
+
]
|
|
455
|
+
},
|
|
400
456
|
"components": {
|
|
401
457
|
"aliases": [],
|
|
402
458
|
"args": {},
|
|
@@ -454,9 +510,7 @@
|
|
|
454
510
|
]
|
|
455
511
|
},
|
|
456
512
|
"components:logs": {
|
|
457
|
-
"aliases": [
|
|
458
|
-
"logs"
|
|
459
|
-
],
|
|
513
|
+
"aliases": [],
|
|
460
514
|
"args": {
|
|
461
515
|
"component": {
|
|
462
516
|
"description": "The component(s) you want to see the logs of (all if omitted)",
|
|
@@ -570,62 +624,6 @@
|
|
|
570
624
|
"shell.js"
|
|
571
625
|
]
|
|
572
626
|
},
|
|
573
|
-
"config:print": {
|
|
574
|
-
"aliases": [],
|
|
575
|
-
"args": {},
|
|
576
|
-
"description": "Print the current config.",
|
|
577
|
-
"examples": [
|
|
578
|
-
"<%= config.bin %> <%= command.id %>"
|
|
579
|
-
],
|
|
580
|
-
"flags": {
|
|
581
|
-
"json": {
|
|
582
|
-
"description": "Format output as json.",
|
|
583
|
-
"helpGroup": "GLOBAL",
|
|
584
|
-
"name": "json",
|
|
585
|
-
"allowNo": false,
|
|
586
|
-
"type": "boolean"
|
|
587
|
-
},
|
|
588
|
-
"verbose": {
|
|
589
|
-
"name": "verbose",
|
|
590
|
-
"allowNo": true,
|
|
591
|
-
"type": "boolean"
|
|
592
|
-
},
|
|
593
|
-
"root": {
|
|
594
|
-
"char": "C",
|
|
595
|
-
"description": "Run as if emb was started in <path>. Can also be set via EMB_ROOT env var.",
|
|
596
|
-
"name": "root",
|
|
597
|
-
"required": false,
|
|
598
|
-
"hasDynamicHelp": false,
|
|
599
|
-
"multiple": false,
|
|
600
|
-
"type": "option"
|
|
601
|
-
},
|
|
602
|
-
"flavor": {
|
|
603
|
-
"description": "Specify the flavor to use.",
|
|
604
|
-
"name": "flavor",
|
|
605
|
-
"required": false,
|
|
606
|
-
"hasDynamicHelp": false,
|
|
607
|
-
"multiple": false,
|
|
608
|
-
"type": "option"
|
|
609
|
-
}
|
|
610
|
-
},
|
|
611
|
-
"hasDynamicHelp": false,
|
|
612
|
-
"hiddenAliases": [],
|
|
613
|
-
"id": "config:print",
|
|
614
|
-
"pluginAlias": "@enspirit/emb",
|
|
615
|
-
"pluginName": "@enspirit/emb",
|
|
616
|
-
"pluginType": "core",
|
|
617
|
-
"strict": true,
|
|
618
|
-
"enableJsonFlag": true,
|
|
619
|
-
"isESM": true,
|
|
620
|
-
"relativePath": [
|
|
621
|
-
"dist",
|
|
622
|
-
"src",
|
|
623
|
-
"cli",
|
|
624
|
-
"commands",
|
|
625
|
-
"config",
|
|
626
|
-
"print.js"
|
|
627
|
-
]
|
|
628
|
-
},
|
|
629
627
|
"containers": {
|
|
630
628
|
"aliases": [],
|
|
631
629
|
"args": {},
|
|
@@ -978,9 +976,7 @@
|
|
|
978
976
|
]
|
|
979
977
|
},
|
|
980
978
|
"kubernetes:logs": {
|
|
981
|
-
"aliases": [
|
|
982
|
-
"logs"
|
|
983
|
-
],
|
|
979
|
+
"aliases": [],
|
|
984
980
|
"args": {
|
|
985
981
|
"component": {
|
|
986
982
|
"description": "The component you want to see the logs of",
|
|
@@ -1235,13 +1231,154 @@
|
|
|
1235
1231
|
"shell.js"
|
|
1236
1232
|
]
|
|
1237
1233
|
},
|
|
1238
|
-
"
|
|
1234
|
+
"logs:archive": {
|
|
1239
1235
|
"aliases": [],
|
|
1240
|
-
"args": {
|
|
1241
|
-
|
|
1236
|
+
"args": {
|
|
1237
|
+
"component": {
|
|
1238
|
+
"description": "The component(s) to archive logs for (all if omitted)",
|
|
1239
|
+
"name": "component",
|
|
1240
|
+
"required": false
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
1243
|
+
"description": "Archive docker compose logs to files (one file per component).",
|
|
1242
1244
|
"examples": [
|
|
1243
1245
|
"<%= config.bin %> <%= command.id %>",
|
|
1244
|
-
"<%= config.bin %> <%= command.id %>
|
|
1246
|
+
"<%= config.bin %> <%= command.id %> backend frontend",
|
|
1247
|
+
"<%= config.bin %> <%= command.id %> --timestamps",
|
|
1248
|
+
"<%= config.bin %> <%= command.id %> --tail 1000"
|
|
1249
|
+
],
|
|
1250
|
+
"flags": {
|
|
1251
|
+
"json": {
|
|
1252
|
+
"description": "Format output as json.",
|
|
1253
|
+
"helpGroup": "GLOBAL",
|
|
1254
|
+
"name": "json",
|
|
1255
|
+
"allowNo": false,
|
|
1256
|
+
"type": "boolean"
|
|
1257
|
+
},
|
|
1258
|
+
"verbose": {
|
|
1259
|
+
"name": "verbose",
|
|
1260
|
+
"allowNo": true,
|
|
1261
|
+
"type": "boolean"
|
|
1262
|
+
},
|
|
1263
|
+
"root": {
|
|
1264
|
+
"char": "C",
|
|
1265
|
+
"description": "Run as if emb was started in <path>. Can also be set via EMB_ROOT env var.",
|
|
1266
|
+
"name": "root",
|
|
1267
|
+
"required": false,
|
|
1268
|
+
"hasDynamicHelp": false,
|
|
1269
|
+
"multiple": false,
|
|
1270
|
+
"type": "option"
|
|
1271
|
+
},
|
|
1272
|
+
"timestamps": {
|
|
1273
|
+
"char": "t",
|
|
1274
|
+
"description": "Include timestamps in logs",
|
|
1275
|
+
"name": "timestamps",
|
|
1276
|
+
"allowNo": false,
|
|
1277
|
+
"type": "boolean"
|
|
1278
|
+
},
|
|
1279
|
+
"tail": {
|
|
1280
|
+
"description": "Number of lines to show from the end of the logs",
|
|
1281
|
+
"name": "tail",
|
|
1282
|
+
"hasDynamicHelp": false,
|
|
1283
|
+
"multiple": false,
|
|
1284
|
+
"type": "option"
|
|
1285
|
+
},
|
|
1286
|
+
"output": {
|
|
1287
|
+
"char": "o",
|
|
1288
|
+
"description": "Output directory for log files (defaults to .emb/<flavor>/logs/docker/compose)",
|
|
1289
|
+
"name": "output",
|
|
1290
|
+
"hasDynamicHelp": false,
|
|
1291
|
+
"multiple": false,
|
|
1292
|
+
"type": "option"
|
|
1293
|
+
}
|
|
1294
|
+
},
|
|
1295
|
+
"hasDynamicHelp": false,
|
|
1296
|
+
"hiddenAliases": [],
|
|
1297
|
+
"id": "logs:archive",
|
|
1298
|
+
"pluginAlias": "@enspirit/emb",
|
|
1299
|
+
"pluginName": "@enspirit/emb",
|
|
1300
|
+
"pluginType": "core",
|
|
1301
|
+
"strict": false,
|
|
1302
|
+
"enableJsonFlag": true,
|
|
1303
|
+
"isESM": true,
|
|
1304
|
+
"relativePath": [
|
|
1305
|
+
"dist",
|
|
1306
|
+
"src",
|
|
1307
|
+
"cli",
|
|
1308
|
+
"commands",
|
|
1309
|
+
"logs",
|
|
1310
|
+
"archive.js"
|
|
1311
|
+
]
|
|
1312
|
+
},
|
|
1313
|
+
"logs": {
|
|
1314
|
+
"aliases": [],
|
|
1315
|
+
"args": {
|
|
1316
|
+
"component": {
|
|
1317
|
+
"description": "The component(s) you want to see the logs of (all if omitted)",
|
|
1318
|
+
"name": "component",
|
|
1319
|
+
"required": false
|
|
1320
|
+
}
|
|
1321
|
+
},
|
|
1322
|
+
"description": "Get components logs.",
|
|
1323
|
+
"examples": [
|
|
1324
|
+
"<%= config.bin %> <%= command.id %>",
|
|
1325
|
+
"<%= config.bin %> <%= command.id %> backend",
|
|
1326
|
+
"<%= config.bin %> <%= command.id %> backend frontend",
|
|
1327
|
+
"<%= config.bin %> <%= command.id %> --no-follow backend"
|
|
1328
|
+
],
|
|
1329
|
+
"flags": {
|
|
1330
|
+
"verbose": {
|
|
1331
|
+
"name": "verbose",
|
|
1332
|
+
"allowNo": true,
|
|
1333
|
+
"type": "boolean"
|
|
1334
|
+
},
|
|
1335
|
+
"root": {
|
|
1336
|
+
"char": "C",
|
|
1337
|
+
"description": "Run as if emb was started in <path>. Can also be set via EMB_ROOT env var.",
|
|
1338
|
+
"name": "root",
|
|
1339
|
+
"required": false,
|
|
1340
|
+
"hasDynamicHelp": false,
|
|
1341
|
+
"multiple": false,
|
|
1342
|
+
"type": "option"
|
|
1343
|
+
},
|
|
1344
|
+
"follow": {
|
|
1345
|
+
"char": "f",
|
|
1346
|
+
"description": "Follow log output",
|
|
1347
|
+
"name": "follow",
|
|
1348
|
+
"allowNo": true,
|
|
1349
|
+
"type": "boolean"
|
|
1350
|
+
}
|
|
1351
|
+
},
|
|
1352
|
+
"hasDynamicHelp": false,
|
|
1353
|
+
"hiddenAliases": [],
|
|
1354
|
+
"id": "logs",
|
|
1355
|
+
"pluginAlias": "@enspirit/emb",
|
|
1356
|
+
"pluginName": "@enspirit/emb",
|
|
1357
|
+
"pluginType": "core",
|
|
1358
|
+
"strict": false,
|
|
1359
|
+
"enableJsonFlag": false,
|
|
1360
|
+
"isESM": true,
|
|
1361
|
+
"relativePath": [
|
|
1362
|
+
"dist",
|
|
1363
|
+
"src",
|
|
1364
|
+
"cli",
|
|
1365
|
+
"commands",
|
|
1366
|
+
"logs",
|
|
1367
|
+
"index.js"
|
|
1368
|
+
]
|
|
1369
|
+
},
|
|
1370
|
+
"resources:build": {
|
|
1371
|
+
"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",
|
|
1380
|
+
"examples": [
|
|
1381
|
+
"<%= config.bin %> <%= command.id %> build --flavor development"
|
|
1245
1382
|
],
|
|
1246
1383
|
"flags": {
|
|
1247
1384
|
"json": {
|
|
@@ -1272,15 +1409,30 @@
|
|
|
1272
1409
|
"hasDynamicHelp": false,
|
|
1273
1410
|
"multiple": false,
|
|
1274
1411
|
"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"
|
|
1275
1427
|
}
|
|
1276
1428
|
},
|
|
1277
1429
|
"hasDynamicHelp": false,
|
|
1278
1430
|
"hiddenAliases": [],
|
|
1279
|
-
"id": "
|
|
1431
|
+
"id": "resources:build",
|
|
1280
1432
|
"pluginAlias": "@enspirit/emb",
|
|
1281
1433
|
"pluginName": "@enspirit/emb",
|
|
1282
1434
|
"pluginType": "core",
|
|
1283
|
-
"strict":
|
|
1435
|
+
"strict": false,
|
|
1284
1436
|
"enableJsonFlag": true,
|
|
1285
1437
|
"isESM": true,
|
|
1286
1438
|
"relativePath": [
|
|
@@ -1288,14 +1440,14 @@
|
|
|
1288
1440
|
"src",
|
|
1289
1441
|
"cli",
|
|
1290
1442
|
"commands",
|
|
1291
|
-
"
|
|
1292
|
-
"
|
|
1443
|
+
"resources",
|
|
1444
|
+
"build.js"
|
|
1293
1445
|
]
|
|
1294
1446
|
},
|
|
1295
|
-
"
|
|
1447
|
+
"resources": {
|
|
1296
1448
|
"aliases": [],
|
|
1297
1449
|
"args": {},
|
|
1298
|
-
"description": "
|
|
1450
|
+
"description": "List resources.",
|
|
1299
1451
|
"examples": [
|
|
1300
1452
|
"<%= config.bin %> <%= command.id %>"
|
|
1301
1453
|
],
|
|
@@ -1332,7 +1484,7 @@
|
|
|
1332
1484
|
},
|
|
1333
1485
|
"hasDynamicHelp": false,
|
|
1334
1486
|
"hiddenAliases": [],
|
|
1335
|
-
"id": "
|
|
1487
|
+
"id": "resources",
|
|
1336
1488
|
"pluginAlias": "@enspirit/emb",
|
|
1337
1489
|
"pluginName": "@enspirit/emb",
|
|
1338
1490
|
"pluginType": "core",
|
|
@@ -1344,17 +1496,16 @@
|
|
|
1344
1496
|
"src",
|
|
1345
1497
|
"cli",
|
|
1346
1498
|
"commands",
|
|
1347
|
-
"
|
|
1348
|
-
"
|
|
1499
|
+
"resources",
|
|
1500
|
+
"index.js"
|
|
1349
1501
|
]
|
|
1350
1502
|
},
|
|
1351
|
-
"secrets
|
|
1503
|
+
"secrets": {
|
|
1352
1504
|
"aliases": [],
|
|
1353
1505
|
"args": {},
|
|
1354
|
-
"description": "
|
|
1506
|
+
"description": "List all secret references in the configuration.",
|
|
1355
1507
|
"examples": [
|
|
1356
1508
|
"<%= config.bin %> <%= command.id %>",
|
|
1357
|
-
"<%= config.bin %> <%= command.id %> --fail-fast",
|
|
1358
1509
|
"<%= config.bin %> <%= command.id %> --json"
|
|
1359
1510
|
],
|
|
1360
1511
|
"flags": {
|
|
@@ -1386,17 +1537,11 @@
|
|
|
1386
1537
|
"hasDynamicHelp": false,
|
|
1387
1538
|
"multiple": false,
|
|
1388
1539
|
"type": "option"
|
|
1389
|
-
},
|
|
1390
|
-
"fail-fast": {
|
|
1391
|
-
"description": "Stop on first validation error",
|
|
1392
|
-
"name": "fail-fast",
|
|
1393
|
-
"allowNo": false,
|
|
1394
|
-
"type": "boolean"
|
|
1395
1540
|
}
|
|
1396
1541
|
},
|
|
1397
1542
|
"hasDynamicHelp": false,
|
|
1398
1543
|
"hiddenAliases": [],
|
|
1399
|
-
"id": "secrets
|
|
1544
|
+
"id": "secrets",
|
|
1400
1545
|
"pluginAlias": "@enspirit/emb",
|
|
1401
1546
|
"pluginName": "@enspirit/emb",
|
|
1402
1547
|
"pluginType": "core",
|
|
@@ -1409,21 +1554,15 @@
|
|
|
1409
1554
|
"cli",
|
|
1410
1555
|
"commands",
|
|
1411
1556
|
"secrets",
|
|
1412
|
-
"
|
|
1557
|
+
"index.js"
|
|
1413
1558
|
]
|
|
1414
1559
|
},
|
|
1415
|
-
"
|
|
1560
|
+
"secrets:providers": {
|
|
1416
1561
|
"aliases": [],
|
|
1417
|
-
"args": {
|
|
1418
|
-
|
|
1419
|
-
"description": "List of resources to build (defaults to all)",
|
|
1420
|
-
"name": "component",
|
|
1421
|
-
"required": false
|
|
1422
|
-
}
|
|
1423
|
-
},
|
|
1424
|
-
"description": "Build the resources of the monorepo",
|
|
1562
|
+
"args": {},
|
|
1563
|
+
"description": "Show configured secret providers and their status.",
|
|
1425
1564
|
"examples": [
|
|
1426
|
-
"<%= config.bin %> <%= command.id %>
|
|
1565
|
+
"<%= config.bin %> <%= command.id %>"
|
|
1427
1566
|
],
|
|
1428
1567
|
"flags": {
|
|
1429
1568
|
"json": {
|
|
@@ -1454,30 +1593,15 @@
|
|
|
1454
1593
|
"hasDynamicHelp": false,
|
|
1455
1594
|
"multiple": false,
|
|
1456
1595
|
"type": "option"
|
|
1457
|
-
},
|
|
1458
|
-
"dry-run": {
|
|
1459
|
-
"description": "Do not build the resources but only produce build meta information",
|
|
1460
|
-
"name": "dry-run",
|
|
1461
|
-
"required": false,
|
|
1462
|
-
"allowNo": false,
|
|
1463
|
-
"type": "boolean"
|
|
1464
|
-
},
|
|
1465
|
-
"force": {
|
|
1466
|
-
"char": "f",
|
|
1467
|
-
"description": "Bypass the cache and force the build",
|
|
1468
|
-
"name": "force",
|
|
1469
|
-
"required": false,
|
|
1470
|
-
"allowNo": false,
|
|
1471
|
-
"type": "boolean"
|
|
1472
1596
|
}
|
|
1473
1597
|
},
|
|
1474
1598
|
"hasDynamicHelp": false,
|
|
1475
1599
|
"hiddenAliases": [],
|
|
1476
|
-
"id": "
|
|
1600
|
+
"id": "secrets:providers",
|
|
1477
1601
|
"pluginAlias": "@enspirit/emb",
|
|
1478
1602
|
"pluginName": "@enspirit/emb",
|
|
1479
1603
|
"pluginType": "core",
|
|
1480
|
-
"strict":
|
|
1604
|
+
"strict": true,
|
|
1481
1605
|
"enableJsonFlag": true,
|
|
1482
1606
|
"isESM": true,
|
|
1483
1607
|
"relativePath": [
|
|
@@ -1485,16 +1609,18 @@
|
|
|
1485
1609
|
"src",
|
|
1486
1610
|
"cli",
|
|
1487
1611
|
"commands",
|
|
1488
|
-
"
|
|
1489
|
-
"
|
|
1612
|
+
"secrets",
|
|
1613
|
+
"providers.js"
|
|
1490
1614
|
]
|
|
1491
1615
|
},
|
|
1492
|
-
"
|
|
1616
|
+
"secrets:validate": {
|
|
1493
1617
|
"aliases": [],
|
|
1494
1618
|
"args": {},
|
|
1495
|
-
"description": "
|
|
1619
|
+
"description": "Validate that all secret references can be resolved (without showing values).",
|
|
1496
1620
|
"examples": [
|
|
1497
|
-
"<%= config.bin %> <%= command.id %>"
|
|
1621
|
+
"<%= config.bin %> <%= command.id %>",
|
|
1622
|
+
"<%= config.bin %> <%= command.id %> --fail-fast",
|
|
1623
|
+
"<%= config.bin %> <%= command.id %> --json"
|
|
1498
1624
|
],
|
|
1499
1625
|
"flags": {
|
|
1500
1626
|
"json": {
|
|
@@ -1525,11 +1651,17 @@
|
|
|
1525
1651
|
"hasDynamicHelp": false,
|
|
1526
1652
|
"multiple": false,
|
|
1527
1653
|
"type": "option"
|
|
1654
|
+
},
|
|
1655
|
+
"fail-fast": {
|
|
1656
|
+
"description": "Stop on first validation error",
|
|
1657
|
+
"name": "fail-fast",
|
|
1658
|
+
"allowNo": false,
|
|
1659
|
+
"type": "boolean"
|
|
1528
1660
|
}
|
|
1529
1661
|
},
|
|
1530
1662
|
"hasDynamicHelp": false,
|
|
1531
1663
|
"hiddenAliases": [],
|
|
1532
|
-
"id": "
|
|
1664
|
+
"id": "secrets:validate",
|
|
1533
1665
|
"pluginAlias": "@enspirit/emb",
|
|
1534
1666
|
"pluginName": "@enspirit/emb",
|
|
1535
1667
|
"pluginType": "core",
|
|
@@ -1541,8 +1673,8 @@
|
|
|
1541
1673
|
"src",
|
|
1542
1674
|
"cli",
|
|
1543
1675
|
"commands",
|
|
1544
|
-
"
|
|
1545
|
-
"
|
|
1676
|
+
"secrets",
|
|
1677
|
+
"validate.js"
|
|
1546
1678
|
]
|
|
1547
1679
|
},
|
|
1548
1680
|
"tasks": {
|
|
@@ -1669,5 +1801,5 @@
|
|
|
1669
1801
|
]
|
|
1670
1802
|
}
|
|
1671
1803
|
},
|
|
1672
|
-
"version": "0.
|
|
1804
|
+
"version": "0.19.0"
|
|
1673
1805
|
}
|