@enspirit/emb 0.21.0 → 0.22.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/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.21.0 darwin-arm64 node-v22.21.1
17
+ @enspirit/emb/0.22.1 darwin-arm64 node-v22.21.1
18
18
  $ emb --help [COMMAND]
19
19
  USAGE
20
20
  $ emb COMMAND
@@ -113,7 +113,7 @@ EXAMPLES
113
113
  $ emb clean
114
114
  ```
115
115
 
116
- _See code: [src/commands/clean.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/clean.ts)_
116
+ _See code: [src/commands/clean.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/clean.ts)_
117
117
 
118
118
  ## `emb components`
119
119
 
@@ -138,7 +138,7 @@ EXAMPLES
138
138
  $ emb components
139
139
  ```
140
140
 
141
- _See code: [src/commands/components/index.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/components/index.ts)_
141
+ _See code: [src/commands/components/index.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/components/index.ts)_
142
142
 
143
143
  ## `emb components logs [COMPONENT]`
144
144
 
@@ -169,7 +169,7 @@ EXAMPLES
169
169
  $ emb components logs --no-follow backend
170
170
  ```
171
171
 
172
- _See code: [src/commands/components/logs.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/components/logs.ts)_
172
+ _See code: [src/commands/components/logs.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/components/logs.ts)_
173
173
 
174
174
  ## `emb components shell COMPONENT`
175
175
 
@@ -197,7 +197,7 @@ EXAMPLES
197
197
  $ emb components shell
198
198
  ```
199
199
 
200
- _See code: [src/commands/components/shell.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/components/shell.ts)_
200
+ _See code: [src/commands/components/shell.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/components/shell.ts)_
201
201
 
202
202
  ## `emb config print`
203
203
 
@@ -222,7 +222,7 @@ EXAMPLES
222
222
  $ emb config print
223
223
  ```
224
224
 
225
- _See code: [src/commands/config/print.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/config/print.ts)_
225
+ _See code: [src/commands/config/print.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/config/print.ts)_
226
226
 
227
227
  ## `emb containers`
228
228
 
@@ -247,7 +247,7 @@ EXAMPLES
247
247
  $ emb containers
248
248
  ```
249
249
 
250
- _See code: [src/commands/containers/index.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/containers/index.ts)_
250
+ _See code: [src/commands/containers/index.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/containers/index.ts)_
251
251
 
252
252
  ## `emb containers prune`
253
253
 
@@ -271,7 +271,7 @@ EXAMPLES
271
271
  $ emb containers prune
272
272
  ```
273
273
 
274
- _See code: [src/commands/containers/prune.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/containers/prune.ts)_
274
+ _See code: [src/commands/containers/prune.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/containers/prune.ts)_
275
275
 
276
276
  ## `emb down`
277
277
 
@@ -296,7 +296,7 @@ EXAMPLES
296
296
  $ emb down
297
297
  ```
298
298
 
299
- _See code: [src/commands/down.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/down.ts)_
299
+ _See code: [src/commands/down.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/down.ts)_
300
300
 
301
301
  ## `emb help [COMMAND]`
302
302
 
@@ -342,7 +342,7 @@ EXAMPLES
342
342
  $ emb images
343
343
  ```
344
344
 
345
- _See code: [src/commands/images/index.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/images/index.ts)_
345
+ _See code: [src/commands/images/index.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/images/index.ts)_
346
346
 
347
347
  ## `emb images delete`
348
348
 
@@ -367,7 +367,7 @@ EXAMPLES
367
367
  $ emb images delete
368
368
  ```
369
369
 
370
- _See code: [src/commands/images/delete.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/images/delete.ts)_
370
+ _See code: [src/commands/images/delete.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/images/delete.ts)_
371
371
 
372
372
  ## `emb images prune`
373
373
 
@@ -392,7 +392,7 @@ EXAMPLES
392
392
  $ emb images prune
393
393
  ```
394
394
 
395
- _See code: [src/commands/images/prune.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/images/prune.ts)_
395
+ _See code: [src/commands/images/prune.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/images/prune.ts)_
396
396
 
397
397
  ## `emb images push`
398
398
 
@@ -421,7 +421,7 @@ EXAMPLES
421
421
  $ emb images push --registry my.registry.io --retag newtag
422
422
  ```
423
423
 
424
- _See code: [src/commands/images/push.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/images/push.ts)_
424
+ _See code: [src/commands/images/push.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/images/push.ts)_
425
425
 
426
426
  ## `emb kubernetes logs COMPONENT`
427
427
 
@@ -447,7 +447,7 @@ EXAMPLES
447
447
  $ emb kubernetes logs
448
448
  ```
449
449
 
450
- _See code: [src/commands/kubernetes/logs.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/kubernetes/logs.ts)_
450
+ _See code: [src/commands/kubernetes/logs.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/kubernetes/logs.ts)_
451
451
 
452
452
  ## `emb kubernetes ps`
453
453
 
@@ -470,7 +470,7 @@ EXAMPLES
470
470
  $ emb kubernetes ps
471
471
  ```
472
472
 
473
- _See code: [src/commands/kubernetes/ps.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/kubernetes/ps.ts)_
473
+ _See code: [src/commands/kubernetes/ps.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/kubernetes/ps.ts)_
474
474
 
475
475
  ## `emb kubernetes restart [DEPLOYMENT]`
476
476
 
@@ -495,7 +495,7 @@ EXAMPLES
495
495
  $ emb kubernetes restart
496
496
  ```
497
497
 
498
- _See code: [src/commands/kubernetes/restart.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/kubernetes/restart.ts)_
498
+ _See code: [src/commands/kubernetes/restart.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/kubernetes/restart.ts)_
499
499
 
500
500
  ## `emb kubernetes shell COMPONENT`
501
501
 
@@ -524,7 +524,7 @@ EXAMPLES
524
524
  $ emb kubernetes shell
525
525
  ```
526
526
 
527
- _See code: [src/commands/kubernetes/shell.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/kubernetes/shell.ts)_
527
+ _See code: [src/commands/kubernetes/shell.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/kubernetes/shell.ts)_
528
528
 
529
529
  ## `emb logs [COMPONENT]`
530
530
 
@@ -555,7 +555,7 @@ EXAMPLES
555
555
  $ emb logs --no-follow backend
556
556
  ```
557
557
 
558
- _See code: [src/commands/logs/index.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/logs/index.ts)_
558
+ _See code: [src/commands/logs/index.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/logs/index.ts)_
559
559
 
560
560
  ## `emb logs archive [COMPONENT]`
561
561
 
@@ -591,7 +591,7 @@ EXAMPLES
591
591
  $ emb logs archive --tail 1000
592
592
  ```
593
593
 
594
- _See code: [src/commands/logs/archive.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/logs/archive.ts)_
594
+ _See code: [src/commands/logs/archive.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/logs/archive.ts)_
595
595
 
596
596
  ## `emb ps`
597
597
 
@@ -614,7 +614,7 @@ EXAMPLES
614
614
  $ emb ps
615
615
  ```
616
616
 
617
- _See code: [src/commands/ps.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/ps.ts)_
617
+ _See code: [src/commands/ps.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/ps.ts)_
618
618
 
619
619
  ## `emb resources`
620
620
 
@@ -639,7 +639,7 @@ EXAMPLES
639
639
  $ emb resources
640
640
  ```
641
641
 
642
- _See code: [src/commands/resources/index.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/resources/index.ts)_
642
+ _See code: [src/commands/resources/index.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/resources/index.ts)_
643
643
 
644
644
  ## `emb resources build [COMPONENT]`
645
645
 
@@ -669,7 +669,7 @@ EXAMPLES
669
669
  $ emb resources build build --flavor development
670
670
  ```
671
671
 
672
- _See code: [src/commands/resources/build.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/resources/build.ts)_
672
+ _See code: [src/commands/resources/build.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/resources/build.ts)_
673
673
 
674
674
  ## `emb restart [COMPONENT]`
675
675
 
@@ -697,7 +697,7 @@ EXAMPLES
697
697
  $ emb restart
698
698
  ```
699
699
 
700
- _See code: [src/commands/restart.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/restart.ts)_
700
+ _See code: [src/commands/restart.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/restart.ts)_
701
701
 
702
702
  ## `emb run TASK`
703
703
 
@@ -755,7 +755,7 @@ EXAMPLES
755
755
  $ emb secrets --json
756
756
  ```
757
757
 
758
- _See code: [src/commands/secrets/index.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/secrets/index.ts)_
758
+ _See code: [src/commands/secrets/index.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/secrets/index.ts)_
759
759
 
760
760
  ## `emb secrets providers`
761
761
 
@@ -780,7 +780,7 @@ EXAMPLES
780
780
  $ emb secrets providers
781
781
  ```
782
782
 
783
- _See code: [src/commands/secrets/providers.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/secrets/providers.ts)_
783
+ _See code: [src/commands/secrets/providers.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/secrets/providers.ts)_
784
784
 
785
785
  ## `emb secrets validate`
786
786
 
@@ -810,7 +810,7 @@ EXAMPLES
810
810
  $ emb secrets validate --json
811
811
  ```
812
812
 
813
- _See code: [src/commands/secrets/validate.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/secrets/validate.ts)_
813
+ _See code: [src/commands/secrets/validate.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/secrets/validate.ts)_
814
814
 
815
815
  ## `emb shell COMPONENT`
816
816
 
@@ -863,7 +863,7 @@ EXAMPLES
863
863
  $ emb start
864
864
  ```
865
865
 
866
- _See code: [src/commands/start.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/start.ts)_
866
+ _See code: [src/commands/start.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/start.ts)_
867
867
 
868
868
  ## `emb stop`
869
869
 
@@ -888,7 +888,7 @@ EXAMPLES
888
888
  $ emb stop
889
889
  ```
890
890
 
891
- _See code: [src/commands/stop.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/stop.ts)_
891
+ _See code: [src/commands/stop.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/stop.ts)_
892
892
 
893
893
  ## `emb tasks`
894
894
 
@@ -912,7 +912,7 @@ EXAMPLES
912
912
  $ emb tasks
913
913
  ```
914
914
 
915
- _See code: [src/commands/tasks/index.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/tasks/index.ts)_
915
+ _See code: [src/commands/tasks/index.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/tasks/index.ts)_
916
916
 
917
917
  ## `emb tasks run TASK`
918
918
 
@@ -945,7 +945,7 @@ EXAMPLES
945
945
  $ emb tasks run
946
946
  ```
947
947
 
948
- _See code: [src/commands/tasks/run.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/tasks/run.ts)_
948
+ _See code: [src/commands/tasks/run.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/tasks/run.ts)_
949
949
 
950
950
  ## `emb up [COMPONENT]`
951
951
 
@@ -974,7 +974,7 @@ EXAMPLES
974
974
  $ emb up
975
975
  ```
976
976
 
977
- _See code: [src/commands/up.ts](https://github.com/enspirit/emb/blob/v0.21.0/src/commands/up.ts)_
977
+ _See code: [src/commands/up.ts](https://github.com/enspirit/emb/blob/v0.22.1/src/commands/up.ts)_
978
978
 
979
979
  ## `emb update [CHANNEL]`
980
980
 
@@ -306,6 +306,10 @@
306
306
  },
307
307
  "script": {
308
308
  "type": "string"
309
+ },
310
+ "content": {
311
+ "type": "string",
312
+ "description": "Content to write to the file, supports template expansion for secrets"
309
313
  }
310
314
  }
311
315
  }
@@ -3,6 +3,7 @@ import * as z from 'zod';
3
3
  import { AbstractOperation } from '../../../operations/index.js';
4
4
  declare const schema: z.ZodObject<{
5
5
  path: z.ZodString;
6
+ content: z.ZodOptional<z.ZodString>;
6
7
  script: z.ZodOptional<z.ZodString>;
7
8
  cwd: z.ZodOptional<z.ZodString>;
8
9
  force: z.ZodOptional<z.ZodBoolean>;
@@ -1,10 +1,11 @@
1
1
  import { execa } from 'execa';
2
- import { open, statfs, utimes } from 'node:fs/promises';
2
+ import { open, statfs, utimes, writeFile } from 'node:fs/promises';
3
3
  import * as z from 'zod';
4
4
  import { AbstractOperation } from '../../../operations/index.js';
5
5
  const schema = z.object({
6
6
  //
7
7
  path: z.string().describe('Path to the file to create'),
8
+ content: z.string().optional().describe('Content to write to the file'),
8
9
  script: z.string().optional().describe('The script to generate the file'),
9
10
  cwd: z.string().optional().describe('Working directory to execute scripts'),
10
11
  force: z
@@ -25,6 +26,7 @@ export class CreateFileOperation extends AbstractOperation {
25
26
  if (input.force) {
26
27
  await utimes(input.path, Date.now(), Date.now());
27
28
  }
29
+ return;
28
30
  }
29
31
  catch (error) {
30
32
  // Ignore ENOENT error (file does not exist)
@@ -32,7 +34,10 @@ export class CreateFileOperation extends AbstractOperation {
32
34
  throw error;
33
35
  }
34
36
  }
35
- if (input.script) {
37
+ if (input.content !== undefined) {
38
+ await writeFile(input.path, input.content);
39
+ }
40
+ else if (input.script) {
36
41
  await execa(input.script, {
37
42
  all: true,
38
43
  cwd: input.cwd,
@@ -11,6 +11,7 @@ export declare class FileResourceBuilder implements IResourceBuilder<OpInput<Cre
11
11
  build(resource: ResourceInfo<OpInput<CreateFileOperation>>, out?: Writable): Promise<{
12
12
  input: {
13
13
  path: string;
14
+ content?: string | undefined;
14
15
  script?: string | undefined;
15
16
  cwd?: string | undefined;
16
17
  force?: boolean | undefined;
@@ -21,8 +21,14 @@ export class FileResourceBuilder {
21
21
  }
22
22
  }
23
23
  async build(resource, out) {
24
+ let content = resource.params?.content;
25
+ // Expand content with secrets if provided
26
+ if (content !== undefined) {
27
+ content = await this.context.monorepo.expand(content);
28
+ }
24
29
  const input = {
25
30
  path: await this.getPath(),
31
+ content,
26
32
  script: resource.params?.script,
27
33
  cwd: this.context.component.join('./'),
28
34
  };
@@ -975,22 +975,20 @@
975
975
  "push.js"
976
976
  ]
977
977
  },
978
- "secrets": {
978
+ "kubernetes:logs": {
979
979
  "aliases": [],
980
- "args": {},
981
- "description": "List all secret references in the configuration.",
980
+ "args": {
981
+ "component": {
982
+ "description": "The component you want to see the logs of",
983
+ "name": "component",
984
+ "required": true
985
+ }
986
+ },
987
+ "description": "Follow kubernetes logs.",
982
988
  "examples": [
983
- "<%= config.bin %> <%= command.id %>",
984
- "<%= config.bin %> <%= command.id %> --json"
989
+ "<%= config.bin %> <%= command.id %>"
985
990
  ],
986
991
  "flags": {
987
- "json": {
988
- "description": "Format output as json.",
989
- "helpGroup": "GLOBAL",
990
- "name": "json",
991
- "allowNo": false,
992
- "type": "boolean"
993
- },
994
992
  "verbose": {
995
993
  "name": "verbose",
996
994
  "allowNo": true,
@@ -1005,48 +1003,53 @@
1005
1003
  "multiple": false,
1006
1004
  "type": "option"
1007
1005
  },
1008
- "flavor": {
1009
- "description": "Specify the flavor to use.",
1010
- "name": "flavor",
1011
- "required": false,
1006
+ "namespace": {
1007
+ "aliases": [
1008
+ "ns"
1009
+ ],
1010
+ "char": "n",
1011
+ "description": "The Kubernetes namespace to target",
1012
+ "env": "K8S_NAMESPACE",
1013
+ "name": "namespace",
1014
+ "required": true,
1012
1015
  "hasDynamicHelp": false,
1013
1016
  "multiple": false,
1014
1017
  "type": "option"
1018
+ },
1019
+ "follow": {
1020
+ "char": "f",
1021
+ "description": "Follow log output",
1022
+ "name": "follow",
1023
+ "allowNo": true,
1024
+ "type": "boolean"
1015
1025
  }
1016
1026
  },
1017
1027
  "hasDynamicHelp": false,
1018
1028
  "hiddenAliases": [],
1019
- "id": "secrets",
1029
+ "id": "kubernetes:logs",
1020
1030
  "pluginAlias": "@enspirit/emb",
1021
1031
  "pluginName": "@enspirit/emb",
1022
1032
  "pluginType": "core",
1023
1033
  "strict": true,
1024
- "enableJsonFlag": true,
1034
+ "enableJsonFlag": false,
1025
1035
  "isESM": true,
1026
1036
  "relativePath": [
1027
1037
  "dist",
1028
1038
  "src",
1029
1039
  "cli",
1030
1040
  "commands",
1031
- "secrets",
1032
- "index.js"
1041
+ "kubernetes",
1042
+ "logs.js"
1033
1043
  ]
1034
1044
  },
1035
- "secrets:providers": {
1045
+ "kubernetes:ps": {
1036
1046
  "aliases": [],
1037
1047
  "args": {},
1038
- "description": "Show configured secret providers and their status.",
1048
+ "description": "Show running pods.",
1039
1049
  "examples": [
1040
1050
  "<%= config.bin %> <%= command.id %>"
1041
1051
  ],
1042
1052
  "flags": {
1043
- "json": {
1044
- "description": "Format output as json.",
1045
- "helpGroup": "GLOBAL",
1046
- "name": "json",
1047
- "allowNo": false,
1048
- "type": "boolean"
1049
- },
1050
1053
  "verbose": {
1051
1054
  "name": "verbose",
1052
1055
  "allowNo": true,
@@ -1061,50 +1064,118 @@
1061
1064
  "multiple": false,
1062
1065
  "type": "option"
1063
1066
  },
1064
- "flavor": {
1065
- "description": "Specify the flavor to use.",
1066
- "name": "flavor",
1067
- "required": false,
1067
+ "namespace": {
1068
+ "aliases": [
1069
+ "ns"
1070
+ ],
1071
+ "char": "n",
1072
+ "description": "The Kubernetes namespace to target",
1073
+ "env": "K8S_NAMESPACE",
1074
+ "name": "namespace",
1075
+ "required": true,
1068
1076
  "hasDynamicHelp": false,
1069
1077
  "multiple": false,
1070
1078
  "type": "option"
1079
+ },
1080
+ "watch": {
1081
+ "name": "watch",
1082
+ "allowNo": true,
1083
+ "type": "boolean"
1071
1084
  }
1072
1085
  },
1073
1086
  "hasDynamicHelp": false,
1074
1087
  "hiddenAliases": [],
1075
- "id": "secrets:providers",
1088
+ "id": "kubernetes:ps",
1076
1089
  "pluginAlias": "@enspirit/emb",
1077
1090
  "pluginName": "@enspirit/emb",
1078
1091
  "pluginType": "core",
1079
- "strict": true,
1080
- "enableJsonFlag": true,
1092
+ "strict": false,
1093
+ "enableJsonFlag": false,
1081
1094
  "isESM": true,
1082
1095
  "relativePath": [
1083
1096
  "dist",
1084
1097
  "src",
1085
1098
  "cli",
1086
1099
  "commands",
1087
- "secrets",
1088
- "providers.js"
1100
+ "kubernetes",
1101
+ "ps.js"
1089
1102
  ]
1090
1103
  },
1091
- "secrets:validate": {
1104
+ "kubernetes:restart": {
1092
1105
  "aliases": [],
1093
- "args": {},
1094
- "description": "Validate that all secret references can be resolved (without showing values).",
1106
+ "args": {
1107
+ "deployment": {
1108
+ "description": "The deployment(s) to restart",
1109
+ "name": "deployment"
1110
+ }
1111
+ },
1112
+ "description": "Restart pods of an instance.",
1095
1113
  "examples": [
1096
- "<%= config.bin %> <%= command.id %>",
1097
- "<%= config.bin %> <%= command.id %> --fail-fast",
1098
- "<%= config.bin %> <%= command.id %> --json"
1114
+ "<%= config.bin %> <%= command.id %>"
1099
1115
  ],
1100
1116
  "flags": {
1101
- "json": {
1102
- "description": "Format output as json.",
1103
- "helpGroup": "GLOBAL",
1104
- "name": "json",
1105
- "allowNo": false,
1117
+ "verbose": {
1118
+ "name": "verbose",
1119
+ "allowNo": true,
1106
1120
  "type": "boolean"
1107
1121
  },
1122
+ "root": {
1123
+ "char": "C",
1124
+ "description": "Run as if emb was started in <path>. Can also be set via EMB_ROOT env var.",
1125
+ "name": "root",
1126
+ "required": false,
1127
+ "hasDynamicHelp": false,
1128
+ "multiple": false,
1129
+ "type": "option"
1130
+ },
1131
+ "namespace": {
1132
+ "aliases": [
1133
+ "ns"
1134
+ ],
1135
+ "char": "n",
1136
+ "description": "The Kubernetes namespace to target",
1137
+ "env": "K8S_NAMESPACE",
1138
+ "name": "namespace",
1139
+ "required": true,
1140
+ "hasDynamicHelp": false,
1141
+ "multiple": false,
1142
+ "type": "option"
1143
+ }
1144
+ },
1145
+ "hasDynamicHelp": false,
1146
+ "hiddenAliases": [],
1147
+ "id": "kubernetes:restart",
1148
+ "pluginAlias": "@enspirit/emb",
1149
+ "pluginName": "@enspirit/emb",
1150
+ "pluginType": "core",
1151
+ "strict": false,
1152
+ "enableJsonFlag": false,
1153
+ "isESM": true,
1154
+ "relativePath": [
1155
+ "dist",
1156
+ "src",
1157
+ "cli",
1158
+ "commands",
1159
+ "kubernetes",
1160
+ "restart.js"
1161
+ ]
1162
+ },
1163
+ "kubernetes:shell": {
1164
+ "aliases": [
1165
+ "shell"
1166
+ ],
1167
+ "args": {
1168
+ "component": {
1169
+ "description": "The component you want to get a shell on",
1170
+ "name": "component",
1171
+ "required": true
1172
+ }
1173
+ },
1174
+ "description": "Get a shell on a deployed component.",
1175
+ "examples": [
1176
+ "<%= config.bin %> <%= command.id %>"
1177
+ ],
1178
+ "flags": {
1108
1179
  "verbose": {
1109
1180
  "name": "verbose",
1110
1181
  "allowNo": true,
@@ -1119,37 +1190,45 @@
1119
1190
  "multiple": false,
1120
1191
  "type": "option"
1121
1192
  },
1122
- "flavor": {
1123
- "description": "Specify the flavor to use.",
1124
- "name": "flavor",
1125
- "required": false,
1193
+ "namespace": {
1194
+ "aliases": [
1195
+ "ns"
1196
+ ],
1197
+ "char": "n",
1198
+ "description": "The Kubernetes namespace to target",
1199
+ "env": "K8S_NAMESPACE",
1200
+ "name": "namespace",
1201
+ "required": true,
1126
1202
  "hasDynamicHelp": false,
1127
1203
  "multiple": false,
1128
1204
  "type": "option"
1129
1205
  },
1130
- "fail-fast": {
1131
- "description": "Stop on first validation error",
1132
- "name": "fail-fast",
1133
- "allowNo": false,
1134
- "type": "boolean"
1206
+ "shell": {
1207
+ "char": "s",
1208
+ "description": "The shell to run",
1209
+ "name": "shell",
1210
+ "default": "bash",
1211
+ "hasDynamicHelp": false,
1212
+ "multiple": false,
1213
+ "type": "option"
1135
1214
  }
1136
1215
  },
1137
1216
  "hasDynamicHelp": false,
1138
1217
  "hiddenAliases": [],
1139
- "id": "secrets:validate",
1218
+ "id": "kubernetes:shell",
1140
1219
  "pluginAlias": "@enspirit/emb",
1141
1220
  "pluginName": "@enspirit/emb",
1142
1221
  "pluginType": "core",
1143
1222
  "strict": true,
1144
- "enableJsonFlag": true,
1223
+ "enableJsonFlag": false,
1145
1224
  "isESM": true,
1146
1225
  "relativePath": [
1147
1226
  "dist",
1148
1227
  "src",
1149
1228
  "cli",
1150
1229
  "commands",
1151
- "secrets",
1152
- "validate.js"
1230
+ "kubernetes",
1231
+ "shell.js"
1153
1232
  ]
1154
1233
  },
1155
1234
  "logs:archive": {
@@ -1288,12 +1367,18 @@
1288
1367
  "index.js"
1289
1368
  ]
1290
1369
  },
1291
- "tasks": {
1370
+ "resources:build": {
1292
1371
  "aliases": [],
1293
- "args": {},
1294
- "description": "List tasks.",
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",
1295
1380
  "examples": [
1296
- "<%= config.bin %> <%= command.id %>"
1381
+ "<%= config.bin %> <%= command.id %> build --flavor development"
1297
1382
  ],
1298
1383
  "flags": {
1299
1384
  "json": {
@@ -1316,15 +1401,38 @@
1316
1401
  "hasDynamicHelp": false,
1317
1402
  "multiple": false,
1318
1403
  "type": "option"
1404
+ },
1405
+ "flavor": {
1406
+ "description": "Specify the flavor to use.",
1407
+ "name": "flavor",
1408
+ "required": false,
1409
+ "hasDynamicHelp": false,
1410
+ "multiple": false,
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"
1319
1427
  }
1320
1428
  },
1321
1429
  "hasDynamicHelp": false,
1322
1430
  "hiddenAliases": [],
1323
- "id": "tasks",
1431
+ "id": "resources:build",
1324
1432
  "pluginAlias": "@enspirit/emb",
1325
1433
  "pluginName": "@enspirit/emb",
1326
1434
  "pluginType": "core",
1327
- "strict": true,
1435
+ "strict": false,
1328
1436
  "enableJsonFlag": true,
1329
1437
  "isESM": true,
1330
1438
  "relativePath": [
@@ -1332,22 +1440,14 @@
1332
1440
  "src",
1333
1441
  "cli",
1334
1442
  "commands",
1335
- "tasks",
1336
- "index.js"
1443
+ "resources",
1444
+ "build.js"
1337
1445
  ]
1338
1446
  },
1339
- "tasks:run": {
1340
- "aliases": [
1341
- "run"
1342
- ],
1343
- "args": {
1344
- "task": {
1345
- "description": "List of tasks to run. You can provide either ids or names (eg: component:task or task)",
1346
- "name": "task",
1347
- "required": true
1348
- }
1349
- },
1350
- "description": "Run tasks.",
1447
+ "resources": {
1448
+ "aliases": [],
1449
+ "args": {},
1450
+ "description": "List resources.",
1351
1451
  "examples": [
1352
1452
  "<%= config.bin %> <%= command.id %>"
1353
1453
  ],
@@ -1373,33 +1473,22 @@
1373
1473
  "multiple": false,
1374
1474
  "type": "option"
1375
1475
  },
1376
- "executor": {
1377
- "char": "x",
1378
- "description": "Where to run the task. (experimental!)",
1379
- "name": "executor",
1476
+ "flavor": {
1477
+ "description": "Specify the flavor to use.",
1478
+ "name": "flavor",
1479
+ "required": false,
1380
1480
  "hasDynamicHelp": false,
1381
1481
  "multiple": false,
1382
- "options": [
1383
- "container",
1384
- "local"
1385
- ],
1386
1482
  "type": "option"
1387
- },
1388
- "all-matching": {
1389
- "char": "a",
1390
- "description": "Run all tasks matching (when multiple matches)",
1391
- "name": "all-matching",
1392
- "allowNo": false,
1393
- "type": "boolean"
1394
1483
  }
1395
1484
  },
1396
1485
  "hasDynamicHelp": false,
1397
1486
  "hiddenAliases": [],
1398
- "id": "tasks:run",
1487
+ "id": "resources",
1399
1488
  "pluginAlias": "@enspirit/emb",
1400
1489
  "pluginName": "@enspirit/emb",
1401
1490
  "pluginType": "core",
1402
- "strict": false,
1491
+ "strict": true,
1403
1492
  "enableJsonFlag": true,
1404
1493
  "isESM": true,
1405
1494
  "relativePath": [
@@ -1407,24 +1496,26 @@
1407
1496
  "src",
1408
1497
  "cli",
1409
1498
  "commands",
1410
- "tasks",
1411
- "run.js"
1499
+ "resources",
1500
+ "index.js"
1412
1501
  ]
1413
1502
  },
1414
- "kubernetes:logs": {
1503
+ "secrets": {
1415
1504
  "aliases": [],
1416
- "args": {
1417
- "component": {
1418
- "description": "The component you want to see the logs of",
1419
- "name": "component",
1420
- "required": true
1421
- }
1422
- },
1423
- "description": "Follow kubernetes logs.",
1505
+ "args": {},
1506
+ "description": "List all secret references in the configuration.",
1424
1507
  "examples": [
1425
- "<%= config.bin %> <%= command.id %>"
1508
+ "<%= config.bin %> <%= command.id %>",
1509
+ "<%= config.bin %> <%= command.id %> --json"
1426
1510
  ],
1427
1511
  "flags": {
1512
+ "json": {
1513
+ "description": "Format output as json.",
1514
+ "helpGroup": "GLOBAL",
1515
+ "name": "json",
1516
+ "allowNo": false,
1517
+ "type": "boolean"
1518
+ },
1428
1519
  "verbose": {
1429
1520
  "name": "verbose",
1430
1521
  "allowNo": true,
@@ -1439,53 +1530,48 @@
1439
1530
  "multiple": false,
1440
1531
  "type": "option"
1441
1532
  },
1442
- "namespace": {
1443
- "aliases": [
1444
- "ns"
1445
- ],
1446
- "char": "n",
1447
- "description": "The Kubernetes namespace to target",
1448
- "env": "K8S_NAMESPACE",
1449
- "name": "namespace",
1450
- "required": true,
1533
+ "flavor": {
1534
+ "description": "Specify the flavor to use.",
1535
+ "name": "flavor",
1536
+ "required": false,
1451
1537
  "hasDynamicHelp": false,
1452
1538
  "multiple": false,
1453
1539
  "type": "option"
1454
- },
1455
- "follow": {
1456
- "char": "f",
1457
- "description": "Follow log output",
1458
- "name": "follow",
1459
- "allowNo": true,
1460
- "type": "boolean"
1461
1540
  }
1462
1541
  },
1463
1542
  "hasDynamicHelp": false,
1464
1543
  "hiddenAliases": [],
1465
- "id": "kubernetes:logs",
1544
+ "id": "secrets",
1466
1545
  "pluginAlias": "@enspirit/emb",
1467
1546
  "pluginName": "@enspirit/emb",
1468
1547
  "pluginType": "core",
1469
1548
  "strict": true,
1470
- "enableJsonFlag": false,
1549
+ "enableJsonFlag": true,
1471
1550
  "isESM": true,
1472
1551
  "relativePath": [
1473
1552
  "dist",
1474
1553
  "src",
1475
1554
  "cli",
1476
1555
  "commands",
1477
- "kubernetes",
1478
- "logs.js"
1556
+ "secrets",
1557
+ "index.js"
1479
1558
  ]
1480
1559
  },
1481
- "kubernetes:ps": {
1560
+ "secrets:providers": {
1482
1561
  "aliases": [],
1483
1562
  "args": {},
1484
- "description": "Show running pods.",
1563
+ "description": "Show configured secret providers and their status.",
1485
1564
  "examples": [
1486
1565
  "<%= config.bin %> <%= command.id %>"
1487
1566
  ],
1488
1567
  "flags": {
1568
+ "json": {
1569
+ "description": "Format output as json.",
1570
+ "helpGroup": "GLOBAL",
1571
+ "name": "json",
1572
+ "allowNo": false,
1573
+ "type": "boolean"
1574
+ },
1489
1575
  "verbose": {
1490
1576
  "name": "verbose",
1491
1577
  "allowNo": true,
@@ -1500,118 +1586,50 @@
1500
1586
  "multiple": false,
1501
1587
  "type": "option"
1502
1588
  },
1503
- "namespace": {
1504
- "aliases": [
1505
- "ns"
1506
- ],
1507
- "char": "n",
1508
- "description": "The Kubernetes namespace to target",
1509
- "env": "K8S_NAMESPACE",
1510
- "name": "namespace",
1511
- "required": true,
1589
+ "flavor": {
1590
+ "description": "Specify the flavor to use.",
1591
+ "name": "flavor",
1592
+ "required": false,
1512
1593
  "hasDynamicHelp": false,
1513
1594
  "multiple": false,
1514
1595
  "type": "option"
1515
- },
1516
- "watch": {
1517
- "name": "watch",
1518
- "allowNo": true,
1519
- "type": "boolean"
1520
1596
  }
1521
1597
  },
1522
1598
  "hasDynamicHelp": false,
1523
1599
  "hiddenAliases": [],
1524
- "id": "kubernetes:ps",
1600
+ "id": "secrets:providers",
1525
1601
  "pluginAlias": "@enspirit/emb",
1526
1602
  "pluginName": "@enspirit/emb",
1527
1603
  "pluginType": "core",
1528
- "strict": false,
1529
- "enableJsonFlag": false,
1604
+ "strict": true,
1605
+ "enableJsonFlag": true,
1530
1606
  "isESM": true,
1531
1607
  "relativePath": [
1532
1608
  "dist",
1533
1609
  "src",
1534
1610
  "cli",
1535
1611
  "commands",
1536
- "kubernetes",
1537
- "ps.js"
1612
+ "secrets",
1613
+ "providers.js"
1538
1614
  ]
1539
1615
  },
1540
- "kubernetes:restart": {
1616
+ "secrets:validate": {
1541
1617
  "aliases": [],
1542
- "args": {
1543
- "deployment": {
1544
- "description": "The deployment(s) to restart",
1545
- "name": "deployment"
1546
- }
1547
- },
1548
- "description": "Restart pods of an instance.",
1618
+ "args": {},
1619
+ "description": "Validate that all secret references can be resolved (without showing values).",
1549
1620
  "examples": [
1550
- "<%= config.bin %> <%= command.id %>"
1621
+ "<%= config.bin %> <%= command.id %>",
1622
+ "<%= config.bin %> <%= command.id %> --fail-fast",
1623
+ "<%= config.bin %> <%= command.id %> --json"
1551
1624
  ],
1552
1625
  "flags": {
1553
- "verbose": {
1554
- "name": "verbose",
1555
- "allowNo": true,
1626
+ "json": {
1627
+ "description": "Format output as json.",
1628
+ "helpGroup": "GLOBAL",
1629
+ "name": "json",
1630
+ "allowNo": false,
1556
1631
  "type": "boolean"
1557
1632
  },
1558
- "root": {
1559
- "char": "C",
1560
- "description": "Run as if emb was started in <path>. Can also be set via EMB_ROOT env var.",
1561
- "name": "root",
1562
- "required": false,
1563
- "hasDynamicHelp": false,
1564
- "multiple": false,
1565
- "type": "option"
1566
- },
1567
- "namespace": {
1568
- "aliases": [
1569
- "ns"
1570
- ],
1571
- "char": "n",
1572
- "description": "The Kubernetes namespace to target",
1573
- "env": "K8S_NAMESPACE",
1574
- "name": "namespace",
1575
- "required": true,
1576
- "hasDynamicHelp": false,
1577
- "multiple": false,
1578
- "type": "option"
1579
- }
1580
- },
1581
- "hasDynamicHelp": false,
1582
- "hiddenAliases": [],
1583
- "id": "kubernetes:restart",
1584
- "pluginAlias": "@enspirit/emb",
1585
- "pluginName": "@enspirit/emb",
1586
- "pluginType": "core",
1587
- "strict": false,
1588
- "enableJsonFlag": false,
1589
- "isESM": true,
1590
- "relativePath": [
1591
- "dist",
1592
- "src",
1593
- "cli",
1594
- "commands",
1595
- "kubernetes",
1596
- "restart.js"
1597
- ]
1598
- },
1599
- "kubernetes:shell": {
1600
- "aliases": [
1601
- "shell"
1602
- ],
1603
- "args": {
1604
- "component": {
1605
- "description": "The component you want to get a shell on",
1606
- "name": "component",
1607
- "required": true
1608
- }
1609
- },
1610
- "description": "Get a shell on a deployed component.",
1611
- "examples": [
1612
- "<%= config.bin %> <%= command.id %>"
1613
- ],
1614
- "flags": {
1615
1633
  "verbose": {
1616
1634
  "name": "verbose",
1617
1635
  "allowNo": true,
@@ -1626,59 +1644,45 @@
1626
1644
  "multiple": false,
1627
1645
  "type": "option"
1628
1646
  },
1629
- "namespace": {
1630
- "aliases": [
1631
- "ns"
1632
- ],
1633
- "char": "n",
1634
- "description": "The Kubernetes namespace to target",
1635
- "env": "K8S_NAMESPACE",
1636
- "name": "namespace",
1637
- "required": true,
1647
+ "flavor": {
1648
+ "description": "Specify the flavor to use.",
1649
+ "name": "flavor",
1650
+ "required": false,
1638
1651
  "hasDynamicHelp": false,
1639
1652
  "multiple": false,
1640
1653
  "type": "option"
1641
1654
  },
1642
- "shell": {
1643
- "char": "s",
1644
- "description": "The shell to run",
1645
- "name": "shell",
1646
- "default": "bash",
1647
- "hasDynamicHelp": false,
1648
- "multiple": false,
1649
- "type": "option"
1655
+ "fail-fast": {
1656
+ "description": "Stop on first validation error",
1657
+ "name": "fail-fast",
1658
+ "allowNo": false,
1659
+ "type": "boolean"
1650
1660
  }
1651
1661
  },
1652
1662
  "hasDynamicHelp": false,
1653
1663
  "hiddenAliases": [],
1654
- "id": "kubernetes:shell",
1664
+ "id": "secrets:validate",
1655
1665
  "pluginAlias": "@enspirit/emb",
1656
1666
  "pluginName": "@enspirit/emb",
1657
1667
  "pluginType": "core",
1658
1668
  "strict": true,
1659
- "enableJsonFlag": false,
1669
+ "enableJsonFlag": true,
1660
1670
  "isESM": true,
1661
1671
  "relativePath": [
1662
1672
  "dist",
1663
1673
  "src",
1664
1674
  "cli",
1665
1675
  "commands",
1666
- "kubernetes",
1667
- "shell.js"
1676
+ "secrets",
1677
+ "validate.js"
1668
1678
  ]
1669
1679
  },
1670
- "resources:build": {
1680
+ "tasks": {
1671
1681
  "aliases": [],
1672
- "args": {
1673
- "component": {
1674
- "description": "List of resources to build (defaults to all)",
1675
- "name": "component",
1676
- "required": false
1677
- }
1678
- },
1679
- "description": "Build the resources of the monorepo",
1682
+ "args": {},
1683
+ "description": "List tasks.",
1680
1684
  "examples": [
1681
- "<%= config.bin %> <%= command.id %> build --flavor development"
1685
+ "<%= config.bin %> <%= command.id %>"
1682
1686
  ],
1683
1687
  "flags": {
1684
1688
  "json": {
@@ -1701,38 +1705,15 @@
1701
1705
  "hasDynamicHelp": false,
1702
1706
  "multiple": false,
1703
1707
  "type": "option"
1704
- },
1705
- "flavor": {
1706
- "description": "Specify the flavor to use.",
1707
- "name": "flavor",
1708
- "required": false,
1709
- "hasDynamicHelp": false,
1710
- "multiple": false,
1711
- "type": "option"
1712
- },
1713
- "dry-run": {
1714
- "description": "Do not build the resources but only produce build meta information",
1715
- "name": "dry-run",
1716
- "required": false,
1717
- "allowNo": false,
1718
- "type": "boolean"
1719
- },
1720
- "force": {
1721
- "char": "f",
1722
- "description": "Bypass the cache and force the build",
1723
- "name": "force",
1724
- "required": false,
1725
- "allowNo": false,
1726
- "type": "boolean"
1727
1708
  }
1728
1709
  },
1729
1710
  "hasDynamicHelp": false,
1730
1711
  "hiddenAliases": [],
1731
- "id": "resources:build",
1712
+ "id": "tasks",
1732
1713
  "pluginAlias": "@enspirit/emb",
1733
1714
  "pluginName": "@enspirit/emb",
1734
1715
  "pluginType": "core",
1735
- "strict": false,
1716
+ "strict": true,
1736
1717
  "enableJsonFlag": true,
1737
1718
  "isESM": true,
1738
1719
  "relativePath": [
@@ -1740,14 +1721,22 @@
1740
1721
  "src",
1741
1722
  "cli",
1742
1723
  "commands",
1743
- "resources",
1744
- "build.js"
1724
+ "tasks",
1725
+ "index.js"
1745
1726
  ]
1746
1727
  },
1747
- "resources": {
1748
- "aliases": [],
1749
- "args": {},
1750
- "description": "List resources.",
1728
+ "tasks:run": {
1729
+ "aliases": [
1730
+ "run"
1731
+ ],
1732
+ "args": {
1733
+ "task": {
1734
+ "description": "List of tasks to run. You can provide either ids or names (eg: component:task or task)",
1735
+ "name": "task",
1736
+ "required": true
1737
+ }
1738
+ },
1739
+ "description": "Run tasks.",
1751
1740
  "examples": [
1752
1741
  "<%= config.bin %> <%= command.id %>"
1753
1742
  ],
@@ -1773,22 +1762,33 @@
1773
1762
  "multiple": false,
1774
1763
  "type": "option"
1775
1764
  },
1776
- "flavor": {
1777
- "description": "Specify the flavor to use.",
1778
- "name": "flavor",
1779
- "required": false,
1765
+ "executor": {
1766
+ "char": "x",
1767
+ "description": "Where to run the task. (experimental!)",
1768
+ "name": "executor",
1780
1769
  "hasDynamicHelp": false,
1781
1770
  "multiple": false,
1771
+ "options": [
1772
+ "container",
1773
+ "local"
1774
+ ],
1782
1775
  "type": "option"
1776
+ },
1777
+ "all-matching": {
1778
+ "char": "a",
1779
+ "description": "Run all tasks matching (when multiple matches)",
1780
+ "name": "all-matching",
1781
+ "allowNo": false,
1782
+ "type": "boolean"
1783
1783
  }
1784
1784
  },
1785
1785
  "hasDynamicHelp": false,
1786
1786
  "hiddenAliases": [],
1787
- "id": "resources",
1787
+ "id": "tasks:run",
1788
1788
  "pluginAlias": "@enspirit/emb",
1789
1789
  "pluginName": "@enspirit/emb",
1790
1790
  "pluginType": "core",
1791
- "strict": true,
1791
+ "strict": false,
1792
1792
  "enableJsonFlag": true,
1793
1793
  "isESM": true,
1794
1794
  "relativePath": [
@@ -1796,10 +1796,10 @@
1796
1796
  "src",
1797
1797
  "cli",
1798
1798
  "commands",
1799
- "resources",
1800
- "index.js"
1799
+ "tasks",
1800
+ "run.js"
1801
1801
  ]
1802
1802
  }
1803
1803
  },
1804
- "version": "0.21.0"
1804
+ "version": "0.22.1"
1805
1805
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enspirit/emb",
3
3
  "type": "module",
4
- "version": "0.21.0",
4
+ "version": "0.22.1",
5
5
  "keywords": [
6
6
  "monorepo",
7
7
  "docker",