@enspirit/emb 0.18.0 → 0.20.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 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.18.0 darwin-arm64 node-v22.21.1
17
+ @enspirit/emb/0.20.0 darwin-x64 node-v22.18.0
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.18.0/src/commands/clean.ts)_
116
+ _See code: [src/commands/clean.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/components/index.ts)_
141
+ _See code: [src/commands/components/index.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/components/logs.ts)_
172
+ _See code: [src/commands/components/logs.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/components/shell.ts)_
200
+ _See code: [src/commands/components/shell.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/config/print.ts)_
225
+ _See code: [src/commands/config/print.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/containers/index.ts)_
250
+ _See code: [src/commands/containers/index.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/containers/prune.ts)_
274
+ _See code: [src/commands/containers/prune.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/down.ts)_
299
+ _See code: [src/commands/down.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/images/index.ts)_
345
+ _See code: [src/commands/images/index.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/images/delete.ts)_
370
+ _See code: [src/commands/images/delete.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/images/prune.ts)_
395
+ _See code: [src/commands/images/prune.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/images/push.ts)_
424
+ _See code: [src/commands/images/push.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/kubernetes/logs.ts)_
450
+ _See code: [src/commands/kubernetes/logs.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/kubernetes/ps.ts)_
473
+ _See code: [src/commands/kubernetes/ps.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/kubernetes/restart.ts)_
498
+ _See code: [src/commands/kubernetes/restart.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/kubernetes/shell.ts)_
527
+ _See code: [src/commands/kubernetes/shell.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/logs/index.ts)_
558
+ _See code: [src/commands/logs/index.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/logs/archive.ts)_
594
+ _See code: [src/commands/logs/archive.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/ps.ts)_
617
+ _See code: [src/commands/ps.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/resources/index.ts)_
642
+ _See code: [src/commands/resources/index.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/resources/build.ts)_
672
+ _See code: [src/commands/resources/build.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/restart.ts)_
700
+ _See code: [src/commands/restart.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/secrets/index.ts)_
758
+ _See code: [src/commands/secrets/index.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/secrets/providers.ts)_
783
+ _See code: [src/commands/secrets/providers.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/secrets/validate.ts)_
813
+ _See code: [src/commands/secrets/validate.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/start.ts)_
866
+ _See code: [src/commands/start.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/stop.ts)_
891
+ _See code: [src/commands/stop.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/tasks/index.ts)_
915
+ _See code: [src/commands/tasks/index.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/tasks/run.ts)_
948
+ _See code: [src/commands/tasks/run.ts](https://github.com/enspirit/emb/blob/v0.20.0/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.18.0/src/commands/up.ts)_
977
+ _See code: [src/commands/up.ts](https://github.com/enspirit/emb/blob/v0.20.0/src/commands/up.ts)_
978
978
 
979
979
  ## `emb update [CHANNEL]`
980
980
 
@@ -95,6 +95,10 @@ export interface DefaultsConfig {
95
95
  docker?: {
96
96
  tag?: string;
97
97
  target?: Identifier;
98
+ /**
99
+ * Target platform for the build (e.g., linux/amd64, linux/arm64)
100
+ */
101
+ platform?: string;
98
102
  buildArgs?: {
99
103
  [k: string]: string;
100
104
  };
@@ -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": {
@@ -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,
@@ -0,0 +1,39 @@
1
+ import { AbstractPlugin } from './plugin.js';
2
+ /**
3
+ * Configuration for the 1Password plugin in .emb.yml
4
+ */
5
+ export interface OnePasswordPluginConfig {
6
+ /** Account shorthand or UUID (optional). Defaults to OP_ACCOUNT env var. */
7
+ account?: string;
8
+ }
9
+ /**
10
+ * Plugin that integrates 1Password CLI with EMB.
11
+ *
12
+ * Usage in .emb.yml:
13
+ * ```yaml
14
+ * plugins:
15
+ * - name: op
16
+ * config:
17
+ * account: my-team # Optional: specific 1Password account
18
+ * ```
19
+ *
20
+ * Then use secrets in templates:
21
+ * ```yaml
22
+ * env:
23
+ * DB_PASSWORD: ${op:Production/database-credentials#password}
24
+ * API_KEY: ${op:Development/api-keys#secret-key}
25
+ * ```
26
+ *
27
+ * Authentication methods:
28
+ * 1. Pre-authenticated session (interactive) - User runs `op signin` before using EMB
29
+ * 2. Service account token (CI/CD) - Via `OP_SERVICE_ACCOUNT_TOKEN` env var
30
+ */
31
+ export declare class OnePasswordPlugin extends AbstractPlugin<OnePasswordPluginConfig> {
32
+ static name: string;
33
+ private provider;
34
+ init(): Promise<void>;
35
+ /**
36
+ * Resolve the plugin configuration, filling in defaults from env vars.
37
+ */
38
+ private resolveConfig;
39
+ }
@@ -0,0 +1,47 @@
1
+ import { getContext } from '../../context.js';
2
+ import { OnePasswordProvider, } from '../../secrets/providers/OnePasswordProvider.js';
3
+ import { AbstractPlugin } from './plugin.js';
4
+ /**
5
+ * Plugin that integrates 1Password CLI with EMB.
6
+ *
7
+ * Usage in .emb.yml:
8
+ * ```yaml
9
+ * plugins:
10
+ * - name: op
11
+ * config:
12
+ * account: my-team # Optional: specific 1Password account
13
+ * ```
14
+ *
15
+ * Then use secrets in templates:
16
+ * ```yaml
17
+ * env:
18
+ * DB_PASSWORD: ${op:Production/database-credentials#password}
19
+ * API_KEY: ${op:Development/api-keys#secret-key}
20
+ * ```
21
+ *
22
+ * Authentication methods:
23
+ * 1. Pre-authenticated session (interactive) - User runs `op signin` before using EMB
24
+ * 2. Service account token (CI/CD) - Via `OP_SERVICE_ACCOUNT_TOKEN` env var
25
+ */
26
+ export class OnePasswordPlugin extends AbstractPlugin {
27
+ static name = 'op';
28
+ provider = null;
29
+ async init() {
30
+ const resolvedConfig = this.resolveConfig();
31
+ this.provider = new OnePasswordProvider(resolvedConfig);
32
+ await this.provider.connect();
33
+ // Register the provider with the global SecretManager
34
+ const context = getContext();
35
+ if (context?.secrets) {
36
+ context.secrets.register('op', this.provider);
37
+ }
38
+ }
39
+ /**
40
+ * Resolve the plugin configuration, filling in defaults from env vars.
41
+ */
42
+ resolveConfig() {
43
+ return {
44
+ account: this.config?.account || process.env.OP_ACCOUNT,
45
+ };
46
+ }
47
+ }
@@ -2,6 +2,7 @@ import { AbstractPlugin } from './plugin.js';
2
2
  export * from './AutoDockerPlugin.js';
3
3
  export * from './DotEnvPlugin.js';
4
4
  export * from './EmbfileLoaderPlugin.js';
5
+ export * from './OnePasswordPlugin.js';
5
6
  export * from './VaultPlugin.js';
6
7
  import { Monorepo } from '../index.js';
7
8
  export type AbstractPluginConstructor = new <C, P extends AbstractPlugin<C>>(config: C, monorepo: Monorepo) => P;
@@ -1,10 +1,12 @@
1
1
  export * from './AutoDockerPlugin.js';
2
2
  export * from './DotEnvPlugin.js';
3
3
  export * from './EmbfileLoaderPlugin.js';
4
+ export * from './OnePasswordPlugin.js';
4
5
  export * from './VaultPlugin.js';
5
6
  import { AutoDockerPlugin } from './AutoDockerPlugin.js';
6
7
  import { DotEnvPlugin } from './DotEnvPlugin.js';
7
8
  import { EmbfileLoaderPlugin } from './EmbfileLoaderPlugin.js';
9
+ import { OnePasswordPlugin } from './OnePasswordPlugin.js';
8
10
  import { VaultPlugin } from './VaultPlugin.js';
9
11
  const PluginRegistry = new Map();
10
12
  export const registerPlugin = (plugin) => {
@@ -23,4 +25,5 @@ export const getPlugin = (name) => {
23
25
  registerPlugin(AutoDockerPlugin);
24
26
  registerPlugin(DotEnvPlugin);
25
27
  registerPlugin(EmbfileLoaderPlugin);
28
+ registerPlugin(OnePasswordPlugin);
26
29
  registerPlugin(VaultPlugin);
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Error class for 1Password-specific errors.
3
+ */
4
+ export declare class OnePasswordError extends Error {
5
+ code: string;
6
+ constructor(message: string, code: string);
7
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Error class for 1Password-specific errors.
3
+ */
4
+ export class OnePasswordError extends Error {
5
+ code;
6
+ constructor(message, code) {
7
+ super(message);
8
+ this.code = code;
9
+ this.name = 'OnePasswordError';
10
+ }
11
+ }
@@ -0,0 +1,29 @@
1
+ import { AbstractSecretProvider, SecretReference } from '../SecretProvider.js';
2
+ /**
3
+ * Configuration for the 1Password provider.
4
+ */
5
+ export interface OnePasswordProviderConfig {
6
+ /** Account shorthand or UUID (optional) */
7
+ account?: string;
8
+ }
9
+ /**
10
+ * 1Password CLI secret provider.
11
+ * Uses the `op` CLI to fetch secrets from 1Password vaults.
12
+ *
13
+ * Supports two authentication methods:
14
+ * 1. Pre-authenticated session (interactive) - User runs `op signin` before using EMB
15
+ * 2. Service account token (CI/CD) - Via `OP_SERVICE_ACCOUNT_TOKEN` env var
16
+ */
17
+ export declare class OnePasswordProvider extends AbstractSecretProvider<OnePasswordProviderConfig> {
18
+ /**
19
+ * Execute the `op` CLI command.
20
+ * Protected to allow mocking in tests.
21
+ */
22
+ protected execOp(args: string[]): Promise<{
23
+ stdout: string;
24
+ stderr: string;
25
+ }>;
26
+ connect(): Promise<void>;
27
+ disconnect(): Promise<void>;
28
+ fetchSecret(ref: SecretReference): Promise<Record<string, unknown>>;
29
+ }
@@ -0,0 +1,101 @@
1
+ import { execFile } from 'node:child_process';
2
+ import { promisify } from 'node:util';
3
+ import { AbstractSecretProvider } from '../SecretProvider.js';
4
+ import { OnePasswordError } from './OnePasswordError.js';
5
+ /**
6
+ * 1Password CLI secret provider.
7
+ * Uses the `op` CLI to fetch secrets from 1Password vaults.
8
+ *
9
+ * Supports two authentication methods:
10
+ * 1. Pre-authenticated session (interactive) - User runs `op signin` before using EMB
11
+ * 2. Service account token (CI/CD) - Via `OP_SERVICE_ACCOUNT_TOKEN` env var
12
+ */
13
+ export class OnePasswordProvider extends AbstractSecretProvider {
14
+ /**
15
+ * Execute the `op` CLI command.
16
+ * Protected to allow mocking in tests.
17
+ */
18
+ async execOp(args) {
19
+ const execFileAsync = promisify(execFile);
20
+ return execFileAsync('op', args);
21
+ }
22
+ async connect() {
23
+ try {
24
+ const args = ['whoami'];
25
+ if (this.config.account) {
26
+ args.push('--account', this.config.account);
27
+ }
28
+ await this.execOp(args);
29
+ }
30
+ catch (error) {
31
+ const err = error;
32
+ if (err.code === 'ENOENT') {
33
+ throw new OnePasswordError('1Password CLI (op) not found. Install from https://1password.com/downloads/command-line/', 'OP_NOT_FOUND');
34
+ }
35
+ // Check for authentication errors
36
+ const stderr = err.stderr || err.message || '';
37
+ if (stderr.includes('not signed in') ||
38
+ stderr.includes('not currently signed in') ||
39
+ stderr.includes('session expired') ||
40
+ stderr.includes('authentication required') ||
41
+ stderr.includes('You are not currently signed in')) {
42
+ throw new OnePasswordError("Not signed in to 1Password. Run 'op signin' or set OP_SERVICE_ACCOUNT_TOKEN", 'OP_NOT_AUTHENTICATED');
43
+ }
44
+ throw new OnePasswordError(`Failed to connect to 1Password: ${stderr || err.message}`, 'OP_CONNECTION_ERROR');
45
+ }
46
+ }
47
+ async disconnect() {
48
+ this.clearCache();
49
+ }
50
+ async fetchSecret(ref) {
51
+ // Parse path as vault/item
52
+ const slashIndex = ref.path.indexOf('/');
53
+ if (slashIndex === -1) {
54
+ throw new OnePasswordError(`Invalid secret path '${ref.path}'. Expected format: vault/item`, 'OP_INVALID_PATH');
55
+ }
56
+ const vault = ref.path.slice(0, slashIndex);
57
+ const item = ref.path.slice(slashIndex + 1);
58
+ if (!vault || !item) {
59
+ throw new OnePasswordError(`Invalid secret path '${ref.path}'. Both vault and item must be specified.`, 'OP_INVALID_PATH');
60
+ }
61
+ try {
62
+ const args = ['item', 'get', item, '--vault', vault, '--format', 'json'];
63
+ if (this.config.account) {
64
+ args.push('--account', this.config.account);
65
+ }
66
+ const { stdout } = await this.execOp(args);
67
+ const response = JSON.parse(stdout);
68
+ // Convert fields to key-value pairs
69
+ const result = {};
70
+ if (response.fields) {
71
+ for (const field of response.fields) {
72
+ // Use label as key, fall back to id if no label
73
+ const key = field.label || field.id;
74
+ result[key] = field.value;
75
+ }
76
+ }
77
+ return result;
78
+ }
79
+ catch (error) {
80
+ // Re-throw OnePasswordError as-is (from path validation or other checks)
81
+ if (error instanceof OnePasswordError) {
82
+ throw error;
83
+ }
84
+ const err = error;
85
+ const stderr = err.stderr || err.message || '';
86
+ // Check for specific error cases
87
+ if (stderr.includes("isn't a vault")) {
88
+ throw new OnePasswordError(`Vault '${vault}' not found in 1Password`, 'OP_VAULT_NOT_FOUND');
89
+ }
90
+ if (stderr.includes("isn't an item")) {
91
+ throw new OnePasswordError(`Item '${item}' not found in vault '${vault}'`, 'OP_ITEM_NOT_FOUND');
92
+ }
93
+ if (stderr.includes('not signed in') ||
94
+ stderr.includes('not currently signed in') ||
95
+ stderr.includes('session expired')) {
96
+ throw new OnePasswordError("Not signed in to 1Password. Run 'op signin' or set OP_SERVICE_ACCOUNT_TOKEN", 'OP_NOT_AUTHENTICATED');
97
+ }
98
+ throw new OnePasswordError(`Failed to fetch secret from 1Password: ${stderr}`, 'OP_FETCH_ERROR');
99
+ }
100
+ }
101
+ }
@@ -1,2 +1,4 @@
1
+ export * from './OnePasswordError.js';
2
+ export * from './OnePasswordProvider.js';
1
3
  export * from './VaultProvider.js';
2
4
  export * from './VaultTokenCache.js';
@@ -1,2 +1,4 @@
1
+ export * from './OnePasswordError.js';
2
+ export * from './OnePasswordProvider.js';
1
3
  export * from './VaultProvider.js';
2
4
  export * from './VaultTokenCache.js';
@@ -1231,21 +1231,18 @@
1231
1231
  "shell.js"
1232
1232
  ]
1233
1233
  },
1234
- "logs:archive": {
1234
+ "resources:build": {
1235
1235
  "aliases": [],
1236
1236
  "args": {
1237
1237
  "component": {
1238
- "description": "The component(s) to archive logs for (all if omitted)",
1238
+ "description": "List of resources to build (defaults to all)",
1239
1239
  "name": "component",
1240
1240
  "required": false
1241
1241
  }
1242
1242
  },
1243
- "description": "Archive docker compose logs to files (one file per component).",
1243
+ "description": "Build the resources of the monorepo",
1244
1244
  "examples": [
1245
- "<%= config.bin %> <%= command.id %>",
1246
- "<%= config.bin %> <%= command.id %> backend frontend",
1247
- "<%= config.bin %> <%= command.id %> --timestamps",
1248
- "<%= config.bin %> <%= command.id %> --tail 1000"
1245
+ "<%= config.bin %> <%= command.id %> build --flavor development"
1249
1246
  ],
1250
1247
  "flags": {
1251
1248
  "json": {
@@ -1269,32 +1266,33 @@
1269
1266
  "multiple": false,
1270
1267
  "type": "option"
1271
1268
  },
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",
1269
+ "flavor": {
1270
+ "description": "Specify the flavor to use.",
1271
+ "name": "flavor",
1272
+ "required": false,
1282
1273
  "hasDynamicHelp": false,
1283
1274
  "multiple": false,
1284
1275
  "type": "option"
1285
1276
  },
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"
1277
+ "dry-run": {
1278
+ "description": "Do not build the resources but only produce build meta information",
1279
+ "name": "dry-run",
1280
+ "required": false,
1281
+ "allowNo": false,
1282
+ "type": "boolean"
1283
+ },
1284
+ "force": {
1285
+ "char": "f",
1286
+ "description": "Bypass the cache and force the build",
1287
+ "name": "force",
1288
+ "required": false,
1289
+ "allowNo": false,
1290
+ "type": "boolean"
1293
1291
  }
1294
1292
  },
1295
1293
  "hasDynamicHelp": false,
1296
1294
  "hiddenAliases": [],
1297
- "id": "logs:archive",
1295
+ "id": "resources:build",
1298
1296
  "pluginAlias": "@enspirit/emb",
1299
1297
  "pluginName": "@enspirit/emb",
1300
1298
  "pluginType": "core",
@@ -1306,27 +1304,25 @@
1306
1304
  "src",
1307
1305
  "cli",
1308
1306
  "commands",
1309
- "logs",
1310
- "archive.js"
1307
+ "resources",
1308
+ "build.js"
1311
1309
  ]
1312
1310
  },
1313
- "logs": {
1311
+ "resources": {
1314
1312
  "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.",
1313
+ "args": {},
1314
+ "description": "List resources.",
1323
1315
  "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"
1316
+ "<%= config.bin %> <%= command.id %>"
1328
1317
  ],
1329
1318
  "flags": {
1319
+ "json": {
1320
+ "description": "Format output as json.",
1321
+ "helpGroup": "GLOBAL",
1322
+ "name": "json",
1323
+ "allowNo": false,
1324
+ "type": "boolean"
1325
+ },
1330
1326
  "verbose": {
1331
1327
  "name": "verbose",
1332
1328
  "allowNo": true,
@@ -1341,44 +1337,48 @@
1341
1337
  "multiple": false,
1342
1338
  "type": "option"
1343
1339
  },
1344
- "follow": {
1345
- "char": "f",
1346
- "description": "Follow log output",
1347
- "name": "follow",
1348
- "allowNo": true,
1349
- "type": "boolean"
1340
+ "flavor": {
1341
+ "description": "Specify the flavor to use.",
1342
+ "name": "flavor",
1343
+ "required": false,
1344
+ "hasDynamicHelp": false,
1345
+ "multiple": false,
1346
+ "type": "option"
1350
1347
  }
1351
1348
  },
1352
1349
  "hasDynamicHelp": false,
1353
1350
  "hiddenAliases": [],
1354
- "id": "logs",
1351
+ "id": "resources",
1355
1352
  "pluginAlias": "@enspirit/emb",
1356
1353
  "pluginName": "@enspirit/emb",
1357
1354
  "pluginType": "core",
1358
- "strict": false,
1359
- "enableJsonFlag": false,
1355
+ "strict": true,
1356
+ "enableJsonFlag": true,
1360
1357
  "isESM": true,
1361
1358
  "relativePath": [
1362
1359
  "dist",
1363
1360
  "src",
1364
1361
  "cli",
1365
1362
  "commands",
1366
- "logs",
1363
+ "resources",
1367
1364
  "index.js"
1368
1365
  ]
1369
1366
  },
1370
- "resources:build": {
1367
+ "logs:archive": {
1371
1368
  "aliases": [],
1372
1369
  "args": {
1373
1370
  "component": {
1374
- "description": "List of resources to build (defaults to all)",
1371
+ "description": "The component(s) to archive logs for (all if omitted)",
1375
1372
  "name": "component",
1376
1373
  "required": false
1377
1374
  }
1378
1375
  },
1379
- "description": "Build the resources of the monorepo",
1376
+ "description": "Archive docker compose logs to files (one file per component).",
1380
1377
  "examples": [
1381
- "<%= config.bin %> <%= command.id %> build --flavor development"
1378
+ "<%= config.bin %> <%= command.id %>",
1379
+ "<%= config.bin %> <%= command.id %> backend frontend",
1380
+ "<%= config.bin %> <%= command.id %> --timestamps",
1381
+ "<%= config.bin %> <%= command.id %> --tail 1000"
1382
1382
  ],
1383
1383
  "flags": {
1384
1384
  "json": {
@@ -1402,33 +1402,32 @@
1402
1402
  "multiple": false,
1403
1403
  "type": "option"
1404
1404
  },
1405
- "flavor": {
1406
- "description": "Specify the flavor to use.",
1407
- "name": "flavor",
1408
- "required": false,
1405
+ "timestamps": {
1406
+ "char": "t",
1407
+ "description": "Include timestamps in logs",
1408
+ "name": "timestamps",
1409
+ "allowNo": false,
1410
+ "type": "boolean"
1411
+ },
1412
+ "tail": {
1413
+ "description": "Number of lines to show from the end of the logs",
1414
+ "name": "tail",
1409
1415
  "hasDynamicHelp": false,
1410
1416
  "multiple": false,
1411
1417
  "type": "option"
1412
1418
  },
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"
1419
+ "output": {
1420
+ "char": "o",
1421
+ "description": "Output directory for log files (defaults to .emb/<flavor>/logs/docker/compose)",
1422
+ "name": "output",
1423
+ "hasDynamicHelp": false,
1424
+ "multiple": false,
1425
+ "type": "option"
1427
1426
  }
1428
1427
  },
1429
1428
  "hasDynamicHelp": false,
1430
1429
  "hiddenAliases": [],
1431
- "id": "resources:build",
1430
+ "id": "logs:archive",
1432
1431
  "pluginAlias": "@enspirit/emb",
1433
1432
  "pluginName": "@enspirit/emb",
1434
1433
  "pluginType": "core",
@@ -1440,25 +1439,27 @@
1440
1439
  "src",
1441
1440
  "cli",
1442
1441
  "commands",
1443
- "resources",
1444
- "build.js"
1442
+ "logs",
1443
+ "archive.js"
1445
1444
  ]
1446
1445
  },
1447
- "resources": {
1446
+ "logs": {
1448
1447
  "aliases": [],
1449
- "args": {},
1450
- "description": "List resources.",
1448
+ "args": {
1449
+ "component": {
1450
+ "description": "The component(s) you want to see the logs of (all if omitted)",
1451
+ "name": "component",
1452
+ "required": false
1453
+ }
1454
+ },
1455
+ "description": "Get components logs.",
1451
1456
  "examples": [
1452
- "<%= config.bin %> <%= command.id %>"
1457
+ "<%= config.bin %> <%= command.id %>",
1458
+ "<%= config.bin %> <%= command.id %> backend",
1459
+ "<%= config.bin %> <%= command.id %> backend frontend",
1460
+ "<%= config.bin %> <%= command.id %> --no-follow backend"
1453
1461
  ],
1454
1462
  "flags": {
1455
- "json": {
1456
- "description": "Format output as json.",
1457
- "helpGroup": "GLOBAL",
1458
- "name": "json",
1459
- "allowNo": false,
1460
- "type": "boolean"
1461
- },
1462
1463
  "verbose": {
1463
1464
  "name": "verbose",
1464
1465
  "allowNo": true,
@@ -1473,39 +1474,39 @@
1473
1474
  "multiple": false,
1474
1475
  "type": "option"
1475
1476
  },
1476
- "flavor": {
1477
- "description": "Specify the flavor to use.",
1478
- "name": "flavor",
1479
- "required": false,
1480
- "hasDynamicHelp": false,
1481
- "multiple": false,
1482
- "type": "option"
1477
+ "follow": {
1478
+ "char": "f",
1479
+ "description": "Follow log output",
1480
+ "name": "follow",
1481
+ "allowNo": true,
1482
+ "type": "boolean"
1483
1483
  }
1484
1484
  },
1485
1485
  "hasDynamicHelp": false,
1486
1486
  "hiddenAliases": [],
1487
- "id": "resources",
1487
+ "id": "logs",
1488
1488
  "pluginAlias": "@enspirit/emb",
1489
1489
  "pluginName": "@enspirit/emb",
1490
1490
  "pluginType": "core",
1491
- "strict": true,
1492
- "enableJsonFlag": true,
1491
+ "strict": false,
1492
+ "enableJsonFlag": false,
1493
1493
  "isESM": true,
1494
1494
  "relativePath": [
1495
1495
  "dist",
1496
1496
  "src",
1497
1497
  "cli",
1498
1498
  "commands",
1499
- "resources",
1499
+ "logs",
1500
1500
  "index.js"
1501
1501
  ]
1502
1502
  },
1503
- "tasks": {
1503
+ "secrets": {
1504
1504
  "aliases": [],
1505
1505
  "args": {},
1506
- "description": "List tasks.",
1506
+ "description": "List all secret references in the configuration.",
1507
1507
  "examples": [
1508
- "<%= config.bin %> <%= command.id %>"
1508
+ "<%= config.bin %> <%= command.id %>",
1509
+ "<%= config.bin %> <%= command.id %> --json"
1509
1510
  ],
1510
1511
  "flags": {
1511
1512
  "json": {
@@ -1528,11 +1529,19 @@
1528
1529
  "hasDynamicHelp": false,
1529
1530
  "multiple": false,
1530
1531
  "type": "option"
1532
+ },
1533
+ "flavor": {
1534
+ "description": "Specify the flavor to use.",
1535
+ "name": "flavor",
1536
+ "required": false,
1537
+ "hasDynamicHelp": false,
1538
+ "multiple": false,
1539
+ "type": "option"
1531
1540
  }
1532
1541
  },
1533
1542
  "hasDynamicHelp": false,
1534
1543
  "hiddenAliases": [],
1535
- "id": "tasks",
1544
+ "id": "secrets",
1536
1545
  "pluginAlias": "@enspirit/emb",
1537
1546
  "pluginName": "@enspirit/emb",
1538
1547
  "pluginType": "core",
@@ -1544,22 +1553,14 @@
1544
1553
  "src",
1545
1554
  "cli",
1546
1555
  "commands",
1547
- "tasks",
1556
+ "secrets",
1548
1557
  "index.js"
1549
1558
  ]
1550
1559
  },
1551
- "tasks:run": {
1552
- "aliases": [
1553
- "run"
1554
- ],
1555
- "args": {
1556
- "task": {
1557
- "description": "List of tasks to run. You can provide either ids or names (eg: component:task or task)",
1558
- "name": "task",
1559
- "required": true
1560
- }
1561
- },
1562
- "description": "Run tasks.",
1560
+ "secrets:providers": {
1561
+ "aliases": [],
1562
+ "args": {},
1563
+ "description": "Show configured secret providers and their status.",
1563
1564
  "examples": [
1564
1565
  "<%= config.bin %> <%= command.id %>"
1565
1566
  ],
@@ -1585,33 +1586,22 @@
1585
1586
  "multiple": false,
1586
1587
  "type": "option"
1587
1588
  },
1588
- "executor": {
1589
- "char": "x",
1590
- "description": "Where to run the task. (experimental!)",
1591
- "name": "executor",
1589
+ "flavor": {
1590
+ "description": "Specify the flavor to use.",
1591
+ "name": "flavor",
1592
+ "required": false,
1592
1593
  "hasDynamicHelp": false,
1593
1594
  "multiple": false,
1594
- "options": [
1595
- "container",
1596
- "local"
1597
- ],
1598
1595
  "type": "option"
1599
- },
1600
- "all-matching": {
1601
- "char": "a",
1602
- "description": "Run all tasks matching (when multiple matches)",
1603
- "name": "all-matching",
1604
- "allowNo": false,
1605
- "type": "boolean"
1606
1596
  }
1607
1597
  },
1608
1598
  "hasDynamicHelp": false,
1609
1599
  "hiddenAliases": [],
1610
- "id": "tasks:run",
1600
+ "id": "secrets:providers",
1611
1601
  "pluginAlias": "@enspirit/emb",
1612
1602
  "pluginName": "@enspirit/emb",
1613
1603
  "pluginType": "core",
1614
- "strict": false,
1604
+ "strict": true,
1615
1605
  "enableJsonFlag": true,
1616
1606
  "isESM": true,
1617
1607
  "relativePath": [
@@ -1619,16 +1609,17 @@
1619
1609
  "src",
1620
1610
  "cli",
1621
1611
  "commands",
1622
- "tasks",
1623
- "run.js"
1612
+ "secrets",
1613
+ "providers.js"
1624
1614
  ]
1625
1615
  },
1626
- "secrets": {
1616
+ "secrets:validate": {
1627
1617
  "aliases": [],
1628
1618
  "args": {},
1629
- "description": "List all secret references in the configuration.",
1619
+ "description": "Validate that all secret references can be resolved (without showing values).",
1630
1620
  "examples": [
1631
1621
  "<%= config.bin %> <%= command.id %>",
1622
+ "<%= config.bin %> <%= command.id %> --fail-fast",
1632
1623
  "<%= config.bin %> <%= command.id %> --json"
1633
1624
  ],
1634
1625
  "flags": {
@@ -1660,11 +1651,17 @@
1660
1651
  "hasDynamicHelp": false,
1661
1652
  "multiple": false,
1662
1653
  "type": "option"
1654
+ },
1655
+ "fail-fast": {
1656
+ "description": "Stop on first validation error",
1657
+ "name": "fail-fast",
1658
+ "allowNo": false,
1659
+ "type": "boolean"
1663
1660
  }
1664
1661
  },
1665
1662
  "hasDynamicHelp": false,
1666
1663
  "hiddenAliases": [],
1667
- "id": "secrets",
1664
+ "id": "secrets:validate",
1668
1665
  "pluginAlias": "@enspirit/emb",
1669
1666
  "pluginName": "@enspirit/emb",
1670
1667
  "pluginType": "core",
@@ -1677,13 +1674,13 @@
1677
1674
  "cli",
1678
1675
  "commands",
1679
1676
  "secrets",
1680
- "index.js"
1677
+ "validate.js"
1681
1678
  ]
1682
1679
  },
1683
- "secrets:providers": {
1680
+ "tasks": {
1684
1681
  "aliases": [],
1685
1682
  "args": {},
1686
- "description": "Show configured secret providers and their status.",
1683
+ "description": "List tasks.",
1687
1684
  "examples": [
1688
1685
  "<%= config.bin %> <%= command.id %>"
1689
1686
  ],
@@ -1708,19 +1705,11 @@
1708
1705
  "hasDynamicHelp": false,
1709
1706
  "multiple": false,
1710
1707
  "type": "option"
1711
- },
1712
- "flavor": {
1713
- "description": "Specify the flavor to use.",
1714
- "name": "flavor",
1715
- "required": false,
1716
- "hasDynamicHelp": false,
1717
- "multiple": false,
1718
- "type": "option"
1719
1708
  }
1720
1709
  },
1721
1710
  "hasDynamicHelp": false,
1722
1711
  "hiddenAliases": [],
1723
- "id": "secrets:providers",
1712
+ "id": "tasks",
1724
1713
  "pluginAlias": "@enspirit/emb",
1725
1714
  "pluginName": "@enspirit/emb",
1726
1715
  "pluginType": "core",
@@ -1732,18 +1721,24 @@
1732
1721
  "src",
1733
1722
  "cli",
1734
1723
  "commands",
1735
- "secrets",
1736
- "providers.js"
1724
+ "tasks",
1725
+ "index.js"
1737
1726
  ]
1738
1727
  },
1739
- "secrets:validate": {
1740
- "aliases": [],
1741
- "args": {},
1742
- "description": "Validate that all secret references can be resolved (without showing values).",
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.",
1743
1740
  "examples": [
1744
- "<%= config.bin %> <%= command.id %>",
1745
- "<%= config.bin %> <%= command.id %> --fail-fast",
1746
- "<%= config.bin %> <%= command.id %> --json"
1741
+ "<%= config.bin %> <%= command.id %>"
1747
1742
  ],
1748
1743
  "flags": {
1749
1744
  "json": {
@@ -1767,28 +1762,33 @@
1767
1762
  "multiple": false,
1768
1763
  "type": "option"
1769
1764
  },
1770
- "flavor": {
1771
- "description": "Specify the flavor to use.",
1772
- "name": "flavor",
1773
- "required": false,
1765
+ "executor": {
1766
+ "char": "x",
1767
+ "description": "Where to run the task. (experimental!)",
1768
+ "name": "executor",
1774
1769
  "hasDynamicHelp": false,
1775
1770
  "multiple": false,
1771
+ "options": [
1772
+ "container",
1773
+ "local"
1774
+ ],
1776
1775
  "type": "option"
1777
1776
  },
1778
- "fail-fast": {
1779
- "description": "Stop on first validation error",
1780
- "name": "fail-fast",
1777
+ "all-matching": {
1778
+ "char": "a",
1779
+ "description": "Run all tasks matching (when multiple matches)",
1780
+ "name": "all-matching",
1781
1781
  "allowNo": false,
1782
1782
  "type": "boolean"
1783
1783
  }
1784
1784
  },
1785
1785
  "hasDynamicHelp": false,
1786
1786
  "hiddenAliases": [],
1787
- "id": "secrets:validate",
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
- "secrets",
1800
- "validate.js"
1799
+ "tasks",
1800
+ "run.js"
1801
1801
  ]
1802
1802
  }
1803
1803
  },
1804
- "version": "0.18.0"
1804
+ "version": "0.20.0"
1805
1805
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enspirit/emb",
3
3
  "type": "module",
4
- "version": "0.18.0",
4
+ "version": "0.20.0",
5
5
  "keywords": [
6
6
  "monorepo",
7
7
  "docker",