@enspirit/emb 0.19.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 +31 -31
- package/dist/src/monorepo/plugins/OnePasswordPlugin.d.ts +39 -0
- package/dist/src/monorepo/plugins/OnePasswordPlugin.js +47 -0
- package/dist/src/monorepo/plugins/index.d.ts +1 -0
- package/dist/src/monorepo/plugins/index.js +3 -0
- package/dist/src/secrets/providers/OnePasswordError.d.ts +7 -0
- package/dist/src/secrets/providers/OnePasswordError.js +11 -0
- package/dist/src/secrets/providers/OnePasswordProvider.d.ts +29 -0
- package/dist/src/secrets/providers/OnePasswordProvider.js +101 -0
- package/dist/src/secrets/providers/index.d.ts +2 -0
- package/dist/src/secrets/providers/index.js +2 -0
- package/oclif.manifest.json +154 -154
- 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.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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
|
@@ -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,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
|
+
}
|
package/oclif.manifest.json
CHANGED
|
@@ -397,62 +397,6 @@
|
|
|
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
|
-
},
|
|
456
400
|
"components": {
|
|
457
401
|
"aliases": [],
|
|
458
402
|
"args": {},
|
|
@@ -624,6 +568,62 @@
|
|
|
624
568
|
"shell.js"
|
|
625
569
|
]
|
|
626
570
|
},
|
|
571
|
+
"config:print": {
|
|
572
|
+
"aliases": [],
|
|
573
|
+
"args": {},
|
|
574
|
+
"description": "Print the current config.",
|
|
575
|
+
"examples": [
|
|
576
|
+
"<%= config.bin %> <%= command.id %>"
|
|
577
|
+
],
|
|
578
|
+
"flags": {
|
|
579
|
+
"json": {
|
|
580
|
+
"description": "Format output as json.",
|
|
581
|
+
"helpGroup": "GLOBAL",
|
|
582
|
+
"name": "json",
|
|
583
|
+
"allowNo": false,
|
|
584
|
+
"type": "boolean"
|
|
585
|
+
},
|
|
586
|
+
"verbose": {
|
|
587
|
+
"name": "verbose",
|
|
588
|
+
"allowNo": true,
|
|
589
|
+
"type": "boolean"
|
|
590
|
+
},
|
|
591
|
+
"root": {
|
|
592
|
+
"char": "C",
|
|
593
|
+
"description": "Run as if emb was started in <path>. Can also be set via EMB_ROOT env var.",
|
|
594
|
+
"name": "root",
|
|
595
|
+
"required": false,
|
|
596
|
+
"hasDynamicHelp": false,
|
|
597
|
+
"multiple": false,
|
|
598
|
+
"type": "option"
|
|
599
|
+
},
|
|
600
|
+
"flavor": {
|
|
601
|
+
"description": "Specify the flavor to use.",
|
|
602
|
+
"name": "flavor",
|
|
603
|
+
"required": false,
|
|
604
|
+
"hasDynamicHelp": false,
|
|
605
|
+
"multiple": false,
|
|
606
|
+
"type": "option"
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
"hasDynamicHelp": false,
|
|
610
|
+
"hiddenAliases": [],
|
|
611
|
+
"id": "config:print",
|
|
612
|
+
"pluginAlias": "@enspirit/emb",
|
|
613
|
+
"pluginName": "@enspirit/emb",
|
|
614
|
+
"pluginType": "core",
|
|
615
|
+
"strict": true,
|
|
616
|
+
"enableJsonFlag": true,
|
|
617
|
+
"isESM": true,
|
|
618
|
+
"relativePath": [
|
|
619
|
+
"dist",
|
|
620
|
+
"src",
|
|
621
|
+
"cli",
|
|
622
|
+
"commands",
|
|
623
|
+
"config",
|
|
624
|
+
"print.js"
|
|
625
|
+
]
|
|
626
|
+
},
|
|
627
627
|
"containers": {
|
|
628
628
|
"aliases": [],
|
|
629
629
|
"args": {},
|
|
@@ -1231,21 +1231,18 @@
|
|
|
1231
1231
|
"shell.js"
|
|
1232
1232
|
]
|
|
1233
1233
|
},
|
|
1234
|
-
"
|
|
1234
|
+
"resources:build": {
|
|
1235
1235
|
"aliases": [],
|
|
1236
1236
|
"args": {
|
|
1237
1237
|
"component": {
|
|
1238
|
-
"description": "
|
|
1238
|
+
"description": "List of resources to build (defaults to all)",
|
|
1239
1239
|
"name": "component",
|
|
1240
1240
|
"required": false
|
|
1241
1241
|
}
|
|
1242
1242
|
},
|
|
1243
|
-
"description": "
|
|
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
|
-
"
|
|
1273
|
-
"
|
|
1274
|
-
"
|
|
1275
|
-
"
|
|
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
|
-
"
|
|
1287
|
-
"
|
|
1288
|
-
"
|
|
1289
|
-
"
|
|
1290
|
-
"
|
|
1291
|
-
"
|
|
1292
|
-
|
|
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": "
|
|
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
|
-
"
|
|
1310
|
-
"
|
|
1307
|
+
"resources",
|
|
1308
|
+
"build.js"
|
|
1311
1309
|
]
|
|
1312
1310
|
},
|
|
1313
|
-
"
|
|
1311
|
+
"resources": {
|
|
1314
1312
|
"aliases": [],
|
|
1315
|
-
"args": {
|
|
1316
|
-
|
|
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
|
-
"
|
|
1345
|
-
"
|
|
1346
|
-
"
|
|
1347
|
-
"
|
|
1348
|
-
"
|
|
1349
|
-
"
|
|
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": "
|
|
1351
|
+
"id": "resources",
|
|
1355
1352
|
"pluginAlias": "@enspirit/emb",
|
|
1356
1353
|
"pluginName": "@enspirit/emb",
|
|
1357
1354
|
"pluginType": "core",
|
|
1358
|
-
"strict":
|
|
1359
|
-
"enableJsonFlag":
|
|
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
|
-
"
|
|
1363
|
+
"resources",
|
|
1367
1364
|
"index.js"
|
|
1368
1365
|
]
|
|
1369
1366
|
},
|
|
1370
|
-
"
|
|
1367
|
+
"logs:archive": {
|
|
1371
1368
|
"aliases": [],
|
|
1372
1369
|
"args": {
|
|
1373
1370
|
"component": {
|
|
1374
|
-
"description": "
|
|
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": "
|
|
1376
|
+
"description": "Archive docker compose logs to files (one file per component).",
|
|
1380
1377
|
"examples": [
|
|
1381
|
-
"<%= config.bin %> <%= command.id %>
|
|
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
|
-
"
|
|
1406
|
-
"
|
|
1407
|
-
"
|
|
1408
|
-
"
|
|
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
|
-
"
|
|
1414
|
-
"
|
|
1415
|
-
"
|
|
1416
|
-
"
|
|
1417
|
-
"
|
|
1418
|
-
"
|
|
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": "
|
|
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
|
-
"
|
|
1444
|
-
"
|
|
1442
|
+
"logs",
|
|
1443
|
+
"archive.js"
|
|
1445
1444
|
]
|
|
1446
1445
|
},
|
|
1447
|
-
"
|
|
1446
|
+
"logs": {
|
|
1448
1447
|
"aliases": [],
|
|
1449
|
-
"args": {
|
|
1450
|
-
|
|
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,30 +1474,29 @@
|
|
|
1473
1474
|
"multiple": false,
|
|
1474
1475
|
"type": "option"
|
|
1475
1476
|
},
|
|
1476
|
-
"
|
|
1477
|
-
"
|
|
1478
|
-
"
|
|
1479
|
-
"
|
|
1480
|
-
"
|
|
1481
|
-
"
|
|
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": "
|
|
1487
|
+
"id": "logs",
|
|
1488
1488
|
"pluginAlias": "@enspirit/emb",
|
|
1489
1489
|
"pluginName": "@enspirit/emb",
|
|
1490
1490
|
"pluginType": "core",
|
|
1491
|
-
"strict":
|
|
1492
|
-
"enableJsonFlag":
|
|
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
|
-
"
|
|
1499
|
+
"logs",
|
|
1500
1500
|
"index.js"
|
|
1501
1501
|
]
|
|
1502
1502
|
},
|
|
@@ -1801,5 +1801,5 @@
|
|
|
1801
1801
|
]
|
|
1802
1802
|
}
|
|
1803
1803
|
},
|
|
1804
|
-
"version": "0.
|
|
1804
|
+
"version": "0.20.0"
|
|
1805
1805
|
}
|