@enspirit/emb 0.25.5 → 0.25.6

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.25.5 linux-x64 node-v22.22.2
17
+ @enspirit/emb/0.25.6 linux-x64 node-v22.22.2
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.25.5/src/commands/clean.ts)_
116
+ _See code: [src/commands/clean.ts](https://github.com/enspirit/emb/blob/v0.25.6/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.25.5/src/commands/components/index.ts)_
141
+ _See code: [src/commands/components/index.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/components/index.ts)_
142
142
 
143
143
  ## `emb components shell SERVICE`
144
144
 
@@ -166,7 +166,7 @@ EXAMPLES
166
166
  $ emb components shell
167
167
  ```
168
168
 
169
- _See code: [src/commands/components/shell.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/components/shell.ts)_
169
+ _See code: [src/commands/components/shell.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/components/shell.ts)_
170
170
 
171
171
  ## `emb config print`
172
172
 
@@ -191,7 +191,7 @@ EXAMPLES
191
191
  $ emb config print
192
192
  ```
193
193
 
194
- _See code: [src/commands/config/print.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/config/print.ts)_
194
+ _See code: [src/commands/config/print.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/config/print.ts)_
195
195
 
196
196
  ## `emb containers`
197
197
 
@@ -216,7 +216,7 @@ EXAMPLES
216
216
  $ emb containers
217
217
  ```
218
218
 
219
- _See code: [src/commands/containers/index.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/containers/index.ts)_
219
+ _See code: [src/commands/containers/index.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/containers/index.ts)_
220
220
 
221
221
  ## `emb containers prune`
222
222
 
@@ -240,7 +240,7 @@ EXAMPLES
240
240
  $ emb containers prune
241
241
  ```
242
242
 
243
- _See code: [src/commands/containers/prune.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/containers/prune.ts)_
243
+ _See code: [src/commands/containers/prune.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/containers/prune.ts)_
244
244
 
245
245
  ## `emb down [SERVICE]`
246
246
 
@@ -268,7 +268,7 @@ EXAMPLES
268
268
  $ emb down
269
269
  ```
270
270
 
271
- _See code: [src/commands/down.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/down.ts)_
271
+ _See code: [src/commands/down.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/down.ts)_
272
272
 
273
273
  ## `emb help [COMMAND]`
274
274
 
@@ -314,7 +314,7 @@ EXAMPLES
314
314
  $ emb images
315
315
  ```
316
316
 
317
- _See code: [src/commands/images/index.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/images/index.ts)_
317
+ _See code: [src/commands/images/index.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/images/index.ts)_
318
318
 
319
319
  ## `emb images delete`
320
320
 
@@ -339,7 +339,7 @@ EXAMPLES
339
339
  $ emb images delete
340
340
  ```
341
341
 
342
- _See code: [src/commands/images/delete.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/images/delete.ts)_
342
+ _See code: [src/commands/images/delete.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/images/delete.ts)_
343
343
 
344
344
  ## `emb images prune`
345
345
 
@@ -364,7 +364,7 @@ EXAMPLES
364
364
  $ emb images prune
365
365
  ```
366
366
 
367
- _See code: [src/commands/images/prune.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/images/prune.ts)_
367
+ _See code: [src/commands/images/prune.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/images/prune.ts)_
368
368
 
369
369
  ## `emb images push`
370
370
 
@@ -393,7 +393,7 @@ EXAMPLES
393
393
  $ emb images push --registry my.registry.io --retag newtag
394
394
  ```
395
395
 
396
- _See code: [src/commands/images/push.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/images/push.ts)_
396
+ _See code: [src/commands/images/push.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/images/push.ts)_
397
397
 
398
398
  ## `emb kubernetes logs COMPONENT`
399
399
 
@@ -419,7 +419,7 @@ EXAMPLES
419
419
  $ emb kubernetes logs
420
420
  ```
421
421
 
422
- _See code: [src/commands/kubernetes/logs.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/kubernetes/logs.ts)_
422
+ _See code: [src/commands/kubernetes/logs.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/kubernetes/logs.ts)_
423
423
 
424
424
  ## `emb kubernetes ps`
425
425
 
@@ -442,7 +442,7 @@ EXAMPLES
442
442
  $ emb kubernetes ps
443
443
  ```
444
444
 
445
- _See code: [src/commands/kubernetes/ps.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/kubernetes/ps.ts)_
445
+ _See code: [src/commands/kubernetes/ps.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/kubernetes/ps.ts)_
446
446
 
447
447
  ## `emb kubernetes restart [DEPLOYMENT]`
448
448
 
@@ -467,7 +467,7 @@ EXAMPLES
467
467
  $ emb kubernetes restart
468
468
  ```
469
469
 
470
- _See code: [src/commands/kubernetes/restart.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/kubernetes/restart.ts)_
470
+ _See code: [src/commands/kubernetes/restart.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/kubernetes/restart.ts)_
471
471
 
472
472
  ## `emb kubernetes shell COMPONENT`
473
473
 
@@ -496,7 +496,7 @@ EXAMPLES
496
496
  $ emb kubernetes shell
497
497
  ```
498
498
 
499
- _See code: [src/commands/kubernetes/shell.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/kubernetes/shell.ts)_
499
+ _See code: [src/commands/kubernetes/shell.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/kubernetes/shell.ts)_
500
500
 
501
501
  ## `emb logs [SERVICE]`
502
502
 
@@ -527,7 +527,7 @@ EXAMPLES
527
527
  $ emb logs --no-follow backend
528
528
  ```
529
529
 
530
- _See code: [src/commands/logs/index.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/logs/index.ts)_
530
+ _See code: [src/commands/logs/index.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/logs/index.ts)_
531
531
 
532
532
  ## `emb logs archive [SERVICE]`
533
533
 
@@ -563,7 +563,7 @@ EXAMPLES
563
563
  $ emb logs archive --tail 1000
564
564
  ```
565
565
 
566
- _See code: [src/commands/logs/archive.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/logs/archive.ts)_
566
+ _See code: [src/commands/logs/archive.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/logs/archive.ts)_
567
567
 
568
568
  ## `emb ps`
569
569
 
@@ -586,7 +586,7 @@ EXAMPLES
586
586
  $ emb ps
587
587
  ```
588
588
 
589
- _See code: [src/commands/ps.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/ps.ts)_
589
+ _See code: [src/commands/ps.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/ps.ts)_
590
590
 
591
591
  ## `emb resources`
592
592
 
@@ -614,7 +614,7 @@ EXAMPLES
614
614
  $ emb resources --publishable
615
615
  ```
616
616
 
617
- _See code: [src/commands/resources/index.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/resources/index.ts)_
617
+ _See code: [src/commands/resources/index.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/resources/index.ts)_
618
618
 
619
619
  ## `emb resources build [COMPONENT]`
620
620
 
@@ -648,7 +648,7 @@ EXAMPLES
648
648
  $ emb resources build build --publishable --flavor production
649
649
  ```
650
650
 
651
- _See code: [src/commands/resources/build.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/resources/build.ts)_
651
+ _See code: [src/commands/resources/build.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/resources/build.ts)_
652
652
 
653
653
  ## `emb resources publish [RESOURCES]`
654
654
 
@@ -679,7 +679,7 @@ EXAMPLES
679
679
  $ emb resources publish api:image --flavor production
680
680
  ```
681
681
 
682
- _See code: [src/commands/resources/publish.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/resources/publish.ts)_
682
+ _See code: [src/commands/resources/publish.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/resources/publish.ts)_
683
683
 
684
684
  ## `emb restart [SERVICE]`
685
685
 
@@ -707,7 +707,7 @@ EXAMPLES
707
707
  $ emb restart
708
708
  ```
709
709
 
710
- _See code: [src/commands/restart.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/restart.ts)_
710
+ _See code: [src/commands/restart.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/restart.ts)_
711
711
 
712
712
  ## `emb run TASK`
713
713
 
@@ -765,7 +765,7 @@ EXAMPLES
765
765
  $ emb secrets --json
766
766
  ```
767
767
 
768
- _See code: [src/commands/secrets/index.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/secrets/index.ts)_
768
+ _See code: [src/commands/secrets/index.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/secrets/index.ts)_
769
769
 
770
770
  ## `emb secrets providers`
771
771
 
@@ -790,7 +790,7 @@ EXAMPLES
790
790
  $ emb secrets providers
791
791
  ```
792
792
 
793
- _See code: [src/commands/secrets/providers.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/secrets/providers.ts)_
793
+ _See code: [src/commands/secrets/providers.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/secrets/providers.ts)_
794
794
 
795
795
  ## `emb secrets validate`
796
796
 
@@ -820,7 +820,7 @@ EXAMPLES
820
820
  $ emb secrets validate --json
821
821
  ```
822
822
 
823
- _See code: [src/commands/secrets/validate.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/secrets/validate.ts)_
823
+ _See code: [src/commands/secrets/validate.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/secrets/validate.ts)_
824
824
 
825
825
  ## `emb shell SERVICE`
826
826
 
@@ -873,7 +873,7 @@ EXAMPLES
873
873
  $ emb start
874
874
  ```
875
875
 
876
- _See code: [src/commands/start.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/start.ts)_
876
+ _See code: [src/commands/start.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/start.ts)_
877
877
 
878
878
  ## `emb stop [SERVICE]`
879
879
 
@@ -901,7 +901,7 @@ EXAMPLES
901
901
  $ emb stop
902
902
  ```
903
903
 
904
- _See code: [src/commands/stop.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/stop.ts)_
904
+ _See code: [src/commands/stop.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/stop.ts)_
905
905
 
906
906
  ## `emb tasks`
907
907
 
@@ -925,7 +925,7 @@ EXAMPLES
925
925
  $ emb tasks
926
926
  ```
927
927
 
928
- _See code: [src/commands/tasks/index.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/tasks/index.ts)_
928
+ _See code: [src/commands/tasks/index.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/tasks/index.ts)_
929
929
 
930
930
  ## `emb tasks run TASK`
931
931
 
@@ -958,7 +958,7 @@ EXAMPLES
958
958
  $ emb tasks run
959
959
  ```
960
960
 
961
- _See code: [src/commands/tasks/run.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/tasks/run.ts)_
961
+ _See code: [src/commands/tasks/run.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/tasks/run.ts)_
962
962
 
963
963
  ## `emb up [SERVICE]`
964
964
 
@@ -987,7 +987,7 @@ EXAMPLES
987
987
  $ emb up
988
988
  ```
989
989
 
990
- _See code: [src/commands/up.ts](https://github.com/enspirit/emb/blob/v0.25.5/src/commands/up.ts)_
990
+ _See code: [src/commands/up.ts](https://github.com/enspirit/emb/blob/v0.25.6/src/commands/up.ts)_
991
991
 
992
992
  ## `emb update [CHANNEL]`
993
993
 
@@ -1,11 +1,23 @@
1
1
  import { Ajv } from 'ajv';
2
2
  import { readFile, stat } from 'node:fs/promises';
3
3
  import yaml from 'yaml';
4
+ import { ConfigValidationError } from '../errors.js';
4
5
  import configSchema from './schema.json' with { type: 'json' };
5
- const ajv = new Ajv();
6
+ const ajv = new Ajv({ allErrors: true });
6
7
  ajv.addSchema(configSchema);
8
+ function formatAjvErrors(errors) {
9
+ return errors.map((err) => {
10
+ const path = err.instancePath || '/';
11
+ if (err.keyword === 'additionalProperties' &&
12
+ err.params?.additionalProperty) {
13
+ return `${path}: unknown property '${err.params.additionalProperty}'`;
14
+ }
15
+ return `${path}: ${err.message}`;
16
+ });
17
+ }
7
18
  export const validateUserConfig = async (pathOrObject) => {
8
19
  let embConfig;
20
+ const file = typeof pathOrObject === 'string' ? pathOrObject : '.emb.yml';
9
21
  if (typeof pathOrObject === 'string') {
10
22
  if (await stat(pathOrObject)) {
11
23
  const cfgYaml = (await readFile(pathOrObject)).toString();
@@ -19,13 +31,14 @@ export const validateUserConfig = async (pathOrObject) => {
19
31
  embConfig = pathOrObject;
20
32
  }
21
33
  if (!ajv.validate(configSchema, embConfig)) {
22
- ajv.errors?.forEach((err) => console.error(err));
23
- throw new Error(`Your .emb.yml is incorrect`);
34
+ const errors = formatAjvErrors(ajv.errors || []);
35
+ throw new ConfigValidationError([{ file, errors }]);
24
36
  }
25
37
  return embConfig;
26
38
  };
27
39
  export const validateEmbfile = async (pathOrObject) => {
28
40
  let component;
41
+ const file = typeof pathOrObject === 'string' ? pathOrObject : 'Embfile';
29
42
  if (typeof pathOrObject === 'string') {
30
43
  if (await stat(pathOrObject)) {
31
44
  const cfgYaml = (await readFile(pathOrObject)).toString();
@@ -46,8 +59,8 @@ export const validateEmbfile = async (pathOrObject) => {
46
59
  return {};
47
60
  }
48
61
  if (!validate(component)) {
49
- ajv.errors?.forEach((err) => console.error(err));
50
- throw new Error(`Your .emb.yml is incorrect`);
62
+ const errors = formatAjvErrors(validate.errors || []);
63
+ throw new ConfigValidationError([{ file, errors }]);
51
64
  }
52
65
  return component;
53
66
  };
@@ -82,3 +82,12 @@ export declare class ComposeExecError extends EMBError {
82
82
  signal?: (NodeJS.Signals | null) | undefined;
83
83
  constructor(msg: string, exitCode: number, signal?: (NodeJS.Signals | null) | undefined);
84
84
  }
85
+ export interface ConfigFileError {
86
+ errors: string[];
87
+ file: string;
88
+ }
89
+ export declare class ConfigValidationError extends EMBError {
90
+ fileErrors: ConfigFileError[];
91
+ constructor(fileErrors: ConfigFileError[]);
92
+ private static formatMessage;
93
+ }
@@ -113,3 +113,21 @@ export class ComposeExecError extends EMBError {
113
113
  this.signal = signal;
114
114
  }
115
115
  }
116
+ export class ConfigValidationError extends EMBError {
117
+ fileErrors;
118
+ constructor(fileErrors) {
119
+ super('CONFIG_VALIDATION', ConfigValidationError.formatMessage(fileErrors));
120
+ this.fileErrors = fileErrors;
121
+ }
122
+ static formatMessage(fileErrors) {
123
+ if (fileErrors.length === 1) {
124
+ const { file, errors } = fileErrors[0];
125
+ return `${file} is invalid:\n${errors.map((e) => ` - ${e}`).join('\n')}`;
126
+ }
127
+ return `Configuration files have errors:\n\n${fileErrors
128
+ .map(({ file, errors }) => {
129
+ return ` ${file}:\n${errors.map((e) => ` - ${e}`).join('\n')}`;
130
+ })
131
+ .join('\n\n')}`;
132
+ }
133
+ }
@@ -2,6 +2,7 @@ import deepmerge from '@fastify/deepmerge';
2
2
  import { glob } from 'glob';
3
3
  import { basename, dirname, join } from 'node:path';
4
4
  import { validateEmbfile } from '../../config/index.js';
5
+ import { ConfigValidationError } from '../../errors.js';
5
6
  import { AbstractPlugin } from './plugin.js';
6
7
  export const EmbfileLoaderPluginDefaultOptions = {
7
8
  glob: '*/Embfile.{yaml,yml}',
@@ -26,23 +27,37 @@ export class EmbfileLoaderPlugin extends AbstractPlugin {
26
27
  cwd: this.monorepo.rootDir,
27
28
  follow: true,
28
29
  });
29
- const newConfig = await files.reduce(async (pConfig, path) => {
30
- const config = await pConfig;
30
+ const validationErrors = [];
31
+ let newConfig = config;
32
+ for (const path of files) {
31
33
  const rootDir = dirname(path);
32
34
  const name = basename(rootDir);
33
- const embfile = await join(this.monorepo.rootDir, path);
34
- const component = await validateEmbfile(embfile);
35
- const original = config.components[name];
36
- const newComponent = deepmerge()(original || {}, {
37
- ...component,
38
- rootDir,
39
- });
40
- return config.with({
41
- components: {
42
- [name]: newComponent,
43
- },
44
- });
45
- }, Promise.resolve(config));
35
+ const embfile = join(this.monorepo.rootDir, path);
36
+ try {
37
+ const component = await validateEmbfile(embfile);
38
+ const original = newConfig.components[name];
39
+ const newComponent = deepmerge()(original || {}, {
40
+ ...component,
41
+ rootDir,
42
+ });
43
+ newConfig = newConfig.with({
44
+ components: {
45
+ [name]: newComponent,
46
+ },
47
+ });
48
+ }
49
+ catch (error) {
50
+ if (error instanceof ConfigValidationError) {
51
+ validationErrors.push(...error.fileErrors);
52
+ }
53
+ else {
54
+ throw error;
55
+ }
56
+ }
57
+ }
58
+ if (validationErrors.length > 0) {
59
+ throw new ConfigValidationError(validationErrors);
60
+ }
46
61
  return newConfig;
47
62
  }
48
63
  }
@@ -1319,19 +1319,13 @@
1319
1319
  "index.js"
1320
1320
  ]
1321
1321
  },
1322
- "resources:build": {
1322
+ "secrets": {
1323
1323
  "aliases": [],
1324
- "args": {
1325
- "component": {
1326
- "description": "List of resources to build (defaults to all)",
1327
- "name": "component",
1328
- "required": false
1329
- }
1330
- },
1331
- "description": "Build the resources of the monorepo",
1324
+ "args": {},
1325
+ "description": "List all secret references in the configuration.",
1332
1326
  "examples": [
1333
- "<%= config.bin %> <%= command.id %> build --flavor development",
1334
- "<%= config.bin %> <%= command.id %> build --publishable --flavor production"
1327
+ "<%= config.bin %> <%= command.id %>",
1328
+ "<%= config.bin %> <%= command.id %> --json"
1335
1329
  ],
1336
1330
  "flags": {
1337
1331
  "json": {
@@ -1362,37 +1356,15 @@
1362
1356
  "hasDynamicHelp": false,
1363
1357
  "multiple": false,
1364
1358
  "type": "option"
1365
- },
1366
- "dry-run": {
1367
- "description": "Do not build the resources but only produce build meta information",
1368
- "name": "dry-run",
1369
- "required": false,
1370
- "allowNo": false,
1371
- "type": "boolean"
1372
- },
1373
- "force": {
1374
- "char": "f",
1375
- "description": "Bypass the cache and force the build",
1376
- "name": "force",
1377
- "required": false,
1378
- "allowNo": false,
1379
- "type": "boolean"
1380
- },
1381
- "publishable": {
1382
- "description": "Only build resources that are publishable (publish: true) and their dependencies",
1383
- "name": "publishable",
1384
- "required": false,
1385
- "allowNo": false,
1386
- "type": "boolean"
1387
1359
  }
1388
1360
  },
1389
1361
  "hasDynamicHelp": false,
1390
1362
  "hiddenAliases": [],
1391
- "id": "resources:build",
1363
+ "id": "secrets",
1392
1364
  "pluginAlias": "@enspirit/emb",
1393
1365
  "pluginName": "@enspirit/emb",
1394
1366
  "pluginType": "core",
1395
- "strict": false,
1367
+ "strict": true,
1396
1368
  "enableJsonFlag": true,
1397
1369
  "isESM": true,
1398
1370
  "relativePath": [
@@ -1400,17 +1372,16 @@
1400
1372
  "src",
1401
1373
  "cli",
1402
1374
  "commands",
1403
- "resources",
1404
- "build.js"
1375
+ "secrets",
1376
+ "index.js"
1405
1377
  ]
1406
1378
  },
1407
- "resources": {
1379
+ "secrets:providers": {
1408
1380
  "aliases": [],
1409
1381
  "args": {},
1410
- "description": "List resources.",
1382
+ "description": "Show configured secret providers and their status.",
1411
1383
  "examples": [
1412
- "<%= config.bin %> <%= command.id %>",
1413
- "<%= config.bin %> <%= command.id %> --publishable"
1384
+ "<%= config.bin %> <%= command.id %>"
1414
1385
  ],
1415
1386
  "flags": {
1416
1387
  "json": {
@@ -1441,18 +1412,11 @@
1441
1412
  "hasDynamicHelp": false,
1442
1413
  "multiple": false,
1443
1414
  "type": "option"
1444
- },
1445
- "publishable": {
1446
- "description": "Only show resources that are publishable (publish: true)",
1447
- "name": "publishable",
1448
- "required": false,
1449
- "allowNo": false,
1450
- "type": "boolean"
1451
1415
  }
1452
1416
  },
1453
1417
  "hasDynamicHelp": false,
1454
1418
  "hiddenAliases": [],
1455
- "id": "resources",
1419
+ "id": "secrets:providers",
1456
1420
  "pluginAlias": "@enspirit/emb",
1457
1421
  "pluginName": "@enspirit/emb",
1458
1422
  "pluginType": "core",
@@ -1464,23 +1428,18 @@
1464
1428
  "src",
1465
1429
  "cli",
1466
1430
  "commands",
1467
- "resources",
1468
- "index.js"
1431
+ "secrets",
1432
+ "providers.js"
1469
1433
  ]
1470
1434
  },
1471
- "resources:publish": {
1435
+ "secrets:validate": {
1472
1436
  "aliases": [],
1473
- "args": {
1474
- "resources": {
1475
- "description": "List of resources to publish (defaults to all publishable)",
1476
- "name": "resources",
1477
- "required": false
1478
- }
1479
- },
1480
- "description": "Publish resources to their registries",
1437
+ "args": {},
1438
+ "description": "Validate that all secret references can be resolved (without showing values).",
1481
1439
  "examples": [
1482
- "<%= config.bin %> <%= command.id %> --flavor production",
1483
- "<%= config.bin %> <%= command.id %> api:image --flavor production"
1440
+ "<%= config.bin %> <%= command.id %>",
1441
+ "<%= config.bin %> <%= command.id %> --fail-fast",
1442
+ "<%= config.bin %> <%= command.id %> --json"
1484
1443
  ],
1485
1444
  "flags": {
1486
1445
  "json": {
@@ -1512,21 +1471,20 @@
1512
1471
  "multiple": false,
1513
1472
  "type": "option"
1514
1473
  },
1515
- "dry-run": {
1516
- "description": "Do not publish, just show what would be published",
1517
- "name": "dry-run",
1518
- "required": false,
1474
+ "fail-fast": {
1475
+ "description": "Stop on first validation error",
1476
+ "name": "fail-fast",
1519
1477
  "allowNo": false,
1520
1478
  "type": "boolean"
1521
1479
  }
1522
1480
  },
1523
1481
  "hasDynamicHelp": false,
1524
1482
  "hiddenAliases": [],
1525
- "id": "resources:publish",
1483
+ "id": "secrets:validate",
1526
1484
  "pluginAlias": "@enspirit/emb",
1527
1485
  "pluginName": "@enspirit/emb",
1528
1486
  "pluginType": "core",
1529
- "strict": false,
1487
+ "strict": true,
1530
1488
  "enableJsonFlag": true,
1531
1489
  "isESM": true,
1532
1490
  "relativePath": [
@@ -1534,17 +1492,23 @@
1534
1492
  "src",
1535
1493
  "cli",
1536
1494
  "commands",
1537
- "resources",
1538
- "publish.js"
1495
+ "secrets",
1496
+ "validate.js"
1539
1497
  ]
1540
1498
  },
1541
- "secrets": {
1499
+ "resources:build": {
1542
1500
  "aliases": [],
1543
- "args": {},
1544
- "description": "List all secret references in the configuration.",
1501
+ "args": {
1502
+ "component": {
1503
+ "description": "List of resources to build (defaults to all)",
1504
+ "name": "component",
1505
+ "required": false
1506
+ }
1507
+ },
1508
+ "description": "Build the resources of the monorepo",
1545
1509
  "examples": [
1546
- "<%= config.bin %> <%= command.id %>",
1547
- "<%= config.bin %> <%= command.id %> --json"
1510
+ "<%= config.bin %> <%= command.id %> build --flavor development",
1511
+ "<%= config.bin %> <%= command.id %> build --publishable --flavor production"
1548
1512
  ],
1549
1513
  "flags": {
1550
1514
  "json": {
@@ -1575,15 +1539,37 @@
1575
1539
  "hasDynamicHelp": false,
1576
1540
  "multiple": false,
1577
1541
  "type": "option"
1542
+ },
1543
+ "dry-run": {
1544
+ "description": "Do not build the resources but only produce build meta information",
1545
+ "name": "dry-run",
1546
+ "required": false,
1547
+ "allowNo": false,
1548
+ "type": "boolean"
1549
+ },
1550
+ "force": {
1551
+ "char": "f",
1552
+ "description": "Bypass the cache and force the build",
1553
+ "name": "force",
1554
+ "required": false,
1555
+ "allowNo": false,
1556
+ "type": "boolean"
1557
+ },
1558
+ "publishable": {
1559
+ "description": "Only build resources that are publishable (publish: true) and their dependencies",
1560
+ "name": "publishable",
1561
+ "required": false,
1562
+ "allowNo": false,
1563
+ "type": "boolean"
1578
1564
  }
1579
1565
  },
1580
1566
  "hasDynamicHelp": false,
1581
1567
  "hiddenAliases": [],
1582
- "id": "secrets",
1568
+ "id": "resources:build",
1583
1569
  "pluginAlias": "@enspirit/emb",
1584
1570
  "pluginName": "@enspirit/emb",
1585
1571
  "pluginType": "core",
1586
- "strict": true,
1572
+ "strict": false,
1587
1573
  "enableJsonFlag": true,
1588
1574
  "isESM": true,
1589
1575
  "relativePath": [
@@ -1591,16 +1577,17 @@
1591
1577
  "src",
1592
1578
  "cli",
1593
1579
  "commands",
1594
- "secrets",
1595
- "index.js"
1580
+ "resources",
1581
+ "build.js"
1596
1582
  ]
1597
1583
  },
1598
- "secrets:providers": {
1584
+ "resources": {
1599
1585
  "aliases": [],
1600
1586
  "args": {},
1601
- "description": "Show configured secret providers and their status.",
1587
+ "description": "List resources.",
1602
1588
  "examples": [
1603
- "<%= config.bin %> <%= command.id %>"
1589
+ "<%= config.bin %> <%= command.id %>",
1590
+ "<%= config.bin %> <%= command.id %> --publishable"
1604
1591
  ],
1605
1592
  "flags": {
1606
1593
  "json": {
@@ -1631,11 +1618,18 @@
1631
1618
  "hasDynamicHelp": false,
1632
1619
  "multiple": false,
1633
1620
  "type": "option"
1621
+ },
1622
+ "publishable": {
1623
+ "description": "Only show resources that are publishable (publish: true)",
1624
+ "name": "publishable",
1625
+ "required": false,
1626
+ "allowNo": false,
1627
+ "type": "boolean"
1634
1628
  }
1635
1629
  },
1636
1630
  "hasDynamicHelp": false,
1637
1631
  "hiddenAliases": [],
1638
- "id": "secrets:providers",
1632
+ "id": "resources",
1639
1633
  "pluginAlias": "@enspirit/emb",
1640
1634
  "pluginName": "@enspirit/emb",
1641
1635
  "pluginType": "core",
@@ -1647,18 +1641,23 @@
1647
1641
  "src",
1648
1642
  "cli",
1649
1643
  "commands",
1650
- "secrets",
1651
- "providers.js"
1644
+ "resources",
1645
+ "index.js"
1652
1646
  ]
1653
1647
  },
1654
- "secrets:validate": {
1648
+ "resources:publish": {
1655
1649
  "aliases": [],
1656
- "args": {},
1657
- "description": "Validate that all secret references can be resolved (without showing values).",
1650
+ "args": {
1651
+ "resources": {
1652
+ "description": "List of resources to publish (defaults to all publishable)",
1653
+ "name": "resources",
1654
+ "required": false
1655
+ }
1656
+ },
1657
+ "description": "Publish resources to their registries",
1658
1658
  "examples": [
1659
- "<%= config.bin %> <%= command.id %>",
1660
- "<%= config.bin %> <%= command.id %> --fail-fast",
1661
- "<%= config.bin %> <%= command.id %> --json"
1659
+ "<%= config.bin %> <%= command.id %> --flavor production",
1660
+ "<%= config.bin %> <%= command.id %> api:image --flavor production"
1662
1661
  ],
1663
1662
  "flags": {
1664
1663
  "json": {
@@ -1690,20 +1689,21 @@
1690
1689
  "multiple": false,
1691
1690
  "type": "option"
1692
1691
  },
1693
- "fail-fast": {
1694
- "description": "Stop on first validation error",
1695
- "name": "fail-fast",
1692
+ "dry-run": {
1693
+ "description": "Do not publish, just show what would be published",
1694
+ "name": "dry-run",
1695
+ "required": false,
1696
1696
  "allowNo": false,
1697
1697
  "type": "boolean"
1698
1698
  }
1699
1699
  },
1700
1700
  "hasDynamicHelp": false,
1701
1701
  "hiddenAliases": [],
1702
- "id": "secrets:validate",
1702
+ "id": "resources:publish",
1703
1703
  "pluginAlias": "@enspirit/emb",
1704
1704
  "pluginName": "@enspirit/emb",
1705
1705
  "pluginType": "core",
1706
- "strict": true,
1706
+ "strict": false,
1707
1707
  "enableJsonFlag": true,
1708
1708
  "isESM": true,
1709
1709
  "relativePath": [
@@ -1711,8 +1711,8 @@
1711
1711
  "src",
1712
1712
  "cli",
1713
1713
  "commands",
1714
- "secrets",
1715
- "validate.js"
1714
+ "resources",
1715
+ "publish.js"
1716
1716
  ]
1717
1717
  },
1718
1718
  "tasks": {
@@ -1840,5 +1840,5 @@
1840
1840
  ]
1841
1841
  }
1842
1842
  },
1843
- "version": "0.25.5"
1843
+ "version": "0.25.6"
1844
1844
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enspirit/emb",
3
3
  "type": "module",
4
- "version": "0.25.5",
4
+ "version": "0.25.6",
5
5
  "keywords": [
6
6
  "monorepo",
7
7
  "docker",