@enspirit/emb 0.3.1 → 0.4.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 +1 -1
- package/dist/src/cli/abstract/BaseCommand.js +2 -2
- package/dist/src/cli/commands/down.js +2 -2
- package/dist/src/config/index.d.ts +4 -4
- package/dist/src/config/index.js +4 -15
- package/dist/src/config/types.d.ts +1 -4
- package/dist/src/config/validation.d.ts +2 -2
- package/dist/src/config/validation.js +1 -2
- package/dist/src/docker/compose/operations/ComposeDownOperation.d.ts +3 -2
- package/dist/src/docker/compose/operations/ComposeDownOperation.js +4 -2
- package/dist/src/docker/compose/operations/ComposeUpOperation.js +2 -2
- package/dist/src/docker/operations/images/BuildImageOperation.js +12 -7
- package/dist/src/monorepo/component.d.ts +2 -1
- package/dist/src/monorepo/component.js +5 -2
- package/dist/src/monorepo/config.d.ts +5 -5
- package/dist/src/monorepo/monorepo.d.ts +7 -6
- package/dist/src/monorepo/monorepo.js +28 -13
- package/dist/src/monorepo/operations/shell/ExecuteLocalCommandOperation.d.ts +3 -2
- package/dist/src/monorepo/operations/shell/ExecuteLocalCommandOperation.js +4 -1
- package/dist/src/monorepo/operations/tasks/RunTasksOperation.d.ts +1 -1
- package/dist/src/monorepo/operations/tasks/RunTasksOperation.js +9 -4
- package/dist/src/monorepo/plugins/AutoDockerPlugin.js +1 -1
- package/dist/src/monorepo/plugins/EmbfileLoaderPlugin.js +2 -2
- package/dist/src/utils/TemplateExpander.d.ts +9 -6
- package/dist/src/utils/TemplateExpander.js +17 -23
- package/oclif.manifest.json +117 -117
- package/package.json +30 -9
- package/dist/src/config/convert.d.ts +0 -2
- package/dist/src/config/convert.js +0 -18
package/oclif.manifest.json
CHANGED
|
@@ -268,12 +268,10 @@
|
|
|
268
268
|
"shell.js"
|
|
269
269
|
]
|
|
270
270
|
},
|
|
271
|
-
"
|
|
272
|
-
"aliases": [
|
|
273
|
-
"ps"
|
|
274
|
-
],
|
|
271
|
+
"config:print": {
|
|
272
|
+
"aliases": [],
|
|
275
273
|
"args": {},
|
|
276
|
-
"description": "
|
|
274
|
+
"description": "Print the current config.",
|
|
277
275
|
"examples": [
|
|
278
276
|
"<%= config.bin %> <%= command.id %>"
|
|
279
277
|
],
|
|
@@ -285,22 +283,21 @@
|
|
|
285
283
|
"allowNo": false,
|
|
286
284
|
"type": "boolean"
|
|
287
285
|
},
|
|
288
|
-
"
|
|
289
|
-
"
|
|
290
|
-
"
|
|
291
|
-
"name": "all",
|
|
286
|
+
"flavor": {
|
|
287
|
+
"description": "Specify the flavor to use.",
|
|
288
|
+
"name": "flavor",
|
|
292
289
|
"required": false,
|
|
293
|
-
"
|
|
294
|
-
"
|
|
290
|
+
"hasDynamicHelp": false,
|
|
291
|
+
"multiple": false,
|
|
292
|
+
"type": "option"
|
|
295
293
|
}
|
|
296
294
|
},
|
|
297
295
|
"hasDynamicHelp": false,
|
|
298
296
|
"hiddenAliases": [],
|
|
299
|
-
"id": "
|
|
297
|
+
"id": "config:print",
|
|
300
298
|
"pluginAlias": "@enspirit/emb",
|
|
301
299
|
"pluginName": "@enspirit/emb",
|
|
302
300
|
"pluginType": "core",
|
|
303
|
-
"strict": true,
|
|
304
301
|
"enableJsonFlag": true,
|
|
305
302
|
"isESM": true,
|
|
306
303
|
"relativePath": [
|
|
@@ -308,14 +305,16 @@
|
|
|
308
305
|
"src",
|
|
309
306
|
"cli",
|
|
310
307
|
"commands",
|
|
311
|
-
"
|
|
312
|
-
"
|
|
308
|
+
"config",
|
|
309
|
+
"print.js"
|
|
313
310
|
]
|
|
314
311
|
},
|
|
315
|
-
"containers
|
|
316
|
-
"aliases": [
|
|
312
|
+
"containers": {
|
|
313
|
+
"aliases": [
|
|
314
|
+
"ps"
|
|
315
|
+
],
|
|
317
316
|
"args": {},
|
|
318
|
-
"description": "
|
|
317
|
+
"description": "List docker containers.",
|
|
319
318
|
"examples": [
|
|
320
319
|
"<%= config.bin %> <%= command.id %>"
|
|
321
320
|
],
|
|
@@ -326,11 +325,19 @@
|
|
|
326
325
|
"name": "json",
|
|
327
326
|
"allowNo": false,
|
|
328
327
|
"type": "boolean"
|
|
328
|
+
},
|
|
329
|
+
"all": {
|
|
330
|
+
"char": "a",
|
|
331
|
+
"description": "Retun all containers. By default, only running containers are shown",
|
|
332
|
+
"name": "all",
|
|
333
|
+
"required": false,
|
|
334
|
+
"allowNo": false,
|
|
335
|
+
"type": "boolean"
|
|
329
336
|
}
|
|
330
337
|
},
|
|
331
338
|
"hasDynamicHelp": false,
|
|
332
339
|
"hiddenAliases": [],
|
|
333
|
-
"id": "containers
|
|
340
|
+
"id": "containers",
|
|
334
341
|
"pluginAlias": "@enspirit/emb",
|
|
335
342
|
"pluginName": "@enspirit/emb",
|
|
336
343
|
"pluginType": "core",
|
|
@@ -343,13 +350,13 @@
|
|
|
343
350
|
"cli",
|
|
344
351
|
"commands",
|
|
345
352
|
"containers",
|
|
346
|
-
"
|
|
353
|
+
"index.js"
|
|
347
354
|
]
|
|
348
355
|
},
|
|
349
|
-
"
|
|
356
|
+
"containers:prune": {
|
|
350
357
|
"aliases": [],
|
|
351
358
|
"args": {},
|
|
352
|
-
"description": "
|
|
359
|
+
"description": "Prune containers.",
|
|
353
360
|
"examples": [
|
|
354
361
|
"<%= config.bin %> <%= command.id %>"
|
|
355
362
|
],
|
|
@@ -360,22 +367,15 @@
|
|
|
360
367
|
"name": "json",
|
|
361
368
|
"allowNo": false,
|
|
362
369
|
"type": "boolean"
|
|
363
|
-
},
|
|
364
|
-
"flavor": {
|
|
365
|
-
"description": "Specify the flavor to use.",
|
|
366
|
-
"name": "flavor",
|
|
367
|
-
"required": false,
|
|
368
|
-
"hasDynamicHelp": false,
|
|
369
|
-
"multiple": false,
|
|
370
|
-
"type": "option"
|
|
371
370
|
}
|
|
372
371
|
},
|
|
373
372
|
"hasDynamicHelp": false,
|
|
374
373
|
"hiddenAliases": [],
|
|
375
|
-
"id": "
|
|
374
|
+
"id": "containers:prune",
|
|
376
375
|
"pluginAlias": "@enspirit/emb",
|
|
377
376
|
"pluginName": "@enspirit/emb",
|
|
378
377
|
"pluginType": "core",
|
|
378
|
+
"strict": true,
|
|
379
379
|
"enableJsonFlag": true,
|
|
380
380
|
"isESM": true,
|
|
381
381
|
"relativePath": [
|
|
@@ -383,8 +383,8 @@
|
|
|
383
383
|
"src",
|
|
384
384
|
"cli",
|
|
385
385
|
"commands",
|
|
386
|
-
"
|
|
387
|
-
"
|
|
386
|
+
"containers",
|
|
387
|
+
"prune.js"
|
|
388
388
|
]
|
|
389
389
|
},
|
|
390
390
|
"images:delete": {
|
|
@@ -520,18 +520,12 @@
|
|
|
520
520
|
"prune.js"
|
|
521
521
|
]
|
|
522
522
|
},
|
|
523
|
-
"
|
|
523
|
+
"tasks": {
|
|
524
524
|
"aliases": [],
|
|
525
|
-
"args": {
|
|
526
|
-
|
|
527
|
-
"description": "List of resources to build (defaults to all)",
|
|
528
|
-
"name": "component",
|
|
529
|
-
"required": false
|
|
530
|
-
}
|
|
531
|
-
},
|
|
532
|
-
"description": "Build the resources of the monorepo",
|
|
525
|
+
"args": {},
|
|
526
|
+
"description": "List tasks.",
|
|
533
527
|
"examples": [
|
|
534
|
-
"<%= config.bin %> <%= command.id %>
|
|
528
|
+
"<%= config.bin %> <%= command.id %>"
|
|
535
529
|
],
|
|
536
530
|
"flags": {
|
|
537
531
|
"json": {
|
|
@@ -540,38 +534,15 @@
|
|
|
540
534
|
"name": "json",
|
|
541
535
|
"allowNo": false,
|
|
542
536
|
"type": "boolean"
|
|
543
|
-
},
|
|
544
|
-
"flavor": {
|
|
545
|
-
"description": "Specify the flavor to use.",
|
|
546
|
-
"name": "flavor",
|
|
547
|
-
"required": false,
|
|
548
|
-
"hasDynamicHelp": false,
|
|
549
|
-
"multiple": false,
|
|
550
|
-
"type": "option"
|
|
551
|
-
},
|
|
552
|
-
"dry-run": {
|
|
553
|
-
"description": "Do not build the resources but only produce build meta information",
|
|
554
|
-
"name": "dry-run",
|
|
555
|
-
"required": false,
|
|
556
|
-
"allowNo": false,
|
|
557
|
-
"type": "boolean"
|
|
558
|
-
},
|
|
559
|
-
"force": {
|
|
560
|
-
"char": "f",
|
|
561
|
-
"description": "Bypass the cache and force the build",
|
|
562
|
-
"name": "force",
|
|
563
|
-
"required": false,
|
|
564
|
-
"allowNo": false,
|
|
565
|
-
"type": "boolean"
|
|
566
537
|
}
|
|
567
538
|
},
|
|
568
539
|
"hasDynamicHelp": false,
|
|
569
540
|
"hiddenAliases": [],
|
|
570
|
-
"id": "
|
|
541
|
+
"id": "tasks",
|
|
571
542
|
"pluginAlias": "@enspirit/emb",
|
|
572
543
|
"pluginName": "@enspirit/emb",
|
|
573
544
|
"pluginType": "core",
|
|
574
|
-
"strict":
|
|
545
|
+
"strict": true,
|
|
575
546
|
"enableJsonFlag": true,
|
|
576
547
|
"isESM": true,
|
|
577
548
|
"relativePath": [
|
|
@@ -579,14 +550,20 @@
|
|
|
579
550
|
"src",
|
|
580
551
|
"cli",
|
|
581
552
|
"commands",
|
|
582
|
-
"
|
|
583
|
-
"
|
|
553
|
+
"tasks",
|
|
554
|
+
"index.js"
|
|
584
555
|
]
|
|
585
556
|
},
|
|
586
|
-
"
|
|
557
|
+
"tasks:run": {
|
|
587
558
|
"aliases": [],
|
|
588
|
-
"args": {
|
|
589
|
-
|
|
559
|
+
"args": {
|
|
560
|
+
"task": {
|
|
561
|
+
"description": "List of tasks to run. You can provide either ids or names (eg: component:task or task)",
|
|
562
|
+
"name": "task",
|
|
563
|
+
"required": true
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
"description": "Run tasks.",
|
|
590
567
|
"examples": [
|
|
591
568
|
"<%= config.bin %> <%= command.id %>"
|
|
592
569
|
],
|
|
@@ -598,21 +575,33 @@
|
|
|
598
575
|
"allowNo": false,
|
|
599
576
|
"type": "boolean"
|
|
600
577
|
},
|
|
601
|
-
"
|
|
602
|
-
"
|
|
603
|
-
"
|
|
604
|
-
"
|
|
578
|
+
"executor": {
|
|
579
|
+
"char": "x",
|
|
580
|
+
"description": "Where to run the task. (experimental!)",
|
|
581
|
+
"name": "executor",
|
|
605
582
|
"hasDynamicHelp": false,
|
|
606
583
|
"multiple": false,
|
|
584
|
+
"options": [
|
|
585
|
+
"container",
|
|
586
|
+
"local"
|
|
587
|
+
],
|
|
607
588
|
"type": "option"
|
|
589
|
+
},
|
|
590
|
+
"all-matching": {
|
|
591
|
+
"char": "a",
|
|
592
|
+
"description": "Run all tasks matching (when multiple matches)",
|
|
593
|
+
"name": "all-matching",
|
|
594
|
+
"allowNo": false,
|
|
595
|
+
"type": "boolean"
|
|
608
596
|
}
|
|
609
597
|
},
|
|
610
598
|
"hasDynamicHelp": false,
|
|
611
599
|
"hiddenAliases": [],
|
|
612
|
-
"id": "
|
|
600
|
+
"id": "tasks:run",
|
|
613
601
|
"pluginAlias": "@enspirit/emb",
|
|
614
602
|
"pluginName": "@enspirit/emb",
|
|
615
603
|
"pluginType": "core",
|
|
604
|
+
"strict": false,
|
|
616
605
|
"enableJsonFlag": true,
|
|
617
606
|
"isESM": true,
|
|
618
607
|
"relativePath": [
|
|
@@ -620,16 +609,22 @@
|
|
|
620
609
|
"src",
|
|
621
610
|
"cli",
|
|
622
611
|
"commands",
|
|
623
|
-
"
|
|
624
|
-
"
|
|
612
|
+
"tasks",
|
|
613
|
+
"run.js"
|
|
625
614
|
]
|
|
626
615
|
},
|
|
627
|
-
"
|
|
616
|
+
"resources:build": {
|
|
628
617
|
"aliases": [],
|
|
629
|
-
"args": {
|
|
630
|
-
|
|
618
|
+
"args": {
|
|
619
|
+
"component": {
|
|
620
|
+
"description": "List of resources to build (defaults to all)",
|
|
621
|
+
"name": "component",
|
|
622
|
+
"required": false
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
"description": "Build the resources of the monorepo",
|
|
631
626
|
"examples": [
|
|
632
|
-
"<%= config.bin %> <%= command.id %>"
|
|
627
|
+
"<%= config.bin %> <%= command.id %> build --flavor development"
|
|
633
628
|
],
|
|
634
629
|
"flags": {
|
|
635
630
|
"json": {
|
|
@@ -638,15 +633,38 @@
|
|
|
638
633
|
"name": "json",
|
|
639
634
|
"allowNo": false,
|
|
640
635
|
"type": "boolean"
|
|
636
|
+
},
|
|
637
|
+
"flavor": {
|
|
638
|
+
"description": "Specify the flavor to use.",
|
|
639
|
+
"name": "flavor",
|
|
640
|
+
"required": false,
|
|
641
|
+
"hasDynamicHelp": false,
|
|
642
|
+
"multiple": false,
|
|
643
|
+
"type": "option"
|
|
644
|
+
},
|
|
645
|
+
"dry-run": {
|
|
646
|
+
"description": "Do not build the resources but only produce build meta information",
|
|
647
|
+
"name": "dry-run",
|
|
648
|
+
"required": false,
|
|
649
|
+
"allowNo": false,
|
|
650
|
+
"type": "boolean"
|
|
651
|
+
},
|
|
652
|
+
"force": {
|
|
653
|
+
"char": "f",
|
|
654
|
+
"description": "Bypass the cache and force the build",
|
|
655
|
+
"name": "force",
|
|
656
|
+
"required": false,
|
|
657
|
+
"allowNo": false,
|
|
658
|
+
"type": "boolean"
|
|
641
659
|
}
|
|
642
660
|
},
|
|
643
661
|
"hasDynamicHelp": false,
|
|
644
662
|
"hiddenAliases": [],
|
|
645
|
-
"id": "
|
|
663
|
+
"id": "resources:build",
|
|
646
664
|
"pluginAlias": "@enspirit/emb",
|
|
647
665
|
"pluginName": "@enspirit/emb",
|
|
648
666
|
"pluginType": "core",
|
|
649
|
-
"strict":
|
|
667
|
+
"strict": false,
|
|
650
668
|
"enableJsonFlag": true,
|
|
651
669
|
"isESM": true,
|
|
652
670
|
"relativePath": [
|
|
@@ -654,20 +672,14 @@
|
|
|
654
672
|
"src",
|
|
655
673
|
"cli",
|
|
656
674
|
"commands",
|
|
657
|
-
"
|
|
658
|
-
"
|
|
675
|
+
"resources",
|
|
676
|
+
"build.js"
|
|
659
677
|
]
|
|
660
678
|
},
|
|
661
|
-
"
|
|
679
|
+
"resources": {
|
|
662
680
|
"aliases": [],
|
|
663
|
-
"args": {
|
|
664
|
-
|
|
665
|
-
"description": "List of tasks to run. You can provide either ids or names (eg: component:task or task)",
|
|
666
|
-
"name": "task",
|
|
667
|
-
"required": true
|
|
668
|
-
}
|
|
669
|
-
},
|
|
670
|
-
"description": "Run tasks.",
|
|
681
|
+
"args": {},
|
|
682
|
+
"description": "List resources.",
|
|
671
683
|
"examples": [
|
|
672
684
|
"<%= config.bin %> <%= command.id %>"
|
|
673
685
|
],
|
|
@@ -679,33 +691,21 @@
|
|
|
679
691
|
"allowNo": false,
|
|
680
692
|
"type": "boolean"
|
|
681
693
|
},
|
|
682
|
-
"
|
|
683
|
-
"
|
|
684
|
-
"
|
|
685
|
-
"
|
|
694
|
+
"flavor": {
|
|
695
|
+
"description": "Specify the flavor to use.",
|
|
696
|
+
"name": "flavor",
|
|
697
|
+
"required": false,
|
|
686
698
|
"hasDynamicHelp": false,
|
|
687
699
|
"multiple": false,
|
|
688
|
-
"options": [
|
|
689
|
-
"container",
|
|
690
|
-
"local"
|
|
691
|
-
],
|
|
692
700
|
"type": "option"
|
|
693
|
-
},
|
|
694
|
-
"all-matching": {
|
|
695
|
-
"char": "a",
|
|
696
|
-
"description": "Run all tasks matching (when multiple matches)",
|
|
697
|
-
"name": "all-matching",
|
|
698
|
-
"allowNo": false,
|
|
699
|
-
"type": "boolean"
|
|
700
701
|
}
|
|
701
702
|
},
|
|
702
703
|
"hasDynamicHelp": false,
|
|
703
704
|
"hiddenAliases": [],
|
|
704
|
-
"id": "
|
|
705
|
+
"id": "resources",
|
|
705
706
|
"pluginAlias": "@enspirit/emb",
|
|
706
707
|
"pluginName": "@enspirit/emb",
|
|
707
708
|
"pluginType": "core",
|
|
708
|
-
"strict": false,
|
|
709
709
|
"enableJsonFlag": true,
|
|
710
710
|
"isESM": true,
|
|
711
711
|
"relativePath": [
|
|
@@ -713,10 +713,10 @@
|
|
|
713
713
|
"src",
|
|
714
714
|
"cli",
|
|
715
715
|
"commands",
|
|
716
|
-
"
|
|
717
|
-
"
|
|
716
|
+
"resources",
|
|
717
|
+
"index.js"
|
|
718
718
|
]
|
|
719
719
|
}
|
|
720
720
|
},
|
|
721
|
-
"version": "0.
|
|
721
|
+
"version": "0.4.0"
|
|
722
722
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enspirit/emb",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"keywords": [
|
|
4
|
+
"version": "0.4.0",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"monorepo",
|
|
7
|
+
"docker",
|
|
8
|
+
"taskrunner",
|
|
9
|
+
"ci",
|
|
10
|
+
"docker compose",
|
|
11
|
+
"sentinel",
|
|
12
|
+
"makefile"
|
|
13
|
+
],
|
|
6
14
|
"author": "Louis Lambeau <louis.lambeau@enspirit.be>",
|
|
7
15
|
"license": "ISC",
|
|
8
16
|
"description": "A replacement for our Makefile-for-monorepos",
|
|
@@ -114,12 +122,25 @@
|
|
|
114
122
|
],
|
|
115
123
|
"topicSeparator": " ",
|
|
116
124
|
"topics": {
|
|
117
|
-
"images": {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
"
|
|
121
|
-
|
|
122
|
-
|
|
125
|
+
"images": {
|
|
126
|
+
"description": "List, delete, prune docker containers"
|
|
127
|
+
},
|
|
128
|
+
"containers": {
|
|
129
|
+
"description": "List, delete, prune docker images"
|
|
130
|
+
},
|
|
131
|
+
"resources": {
|
|
132
|
+
"description": "List, clean, build resources"
|
|
133
|
+
},
|
|
134
|
+
"components": {
|
|
135
|
+
"description": "List & build components resources"
|
|
136
|
+
},
|
|
137
|
+
"config": {
|
|
138
|
+
"description": "It's all about config"
|
|
139
|
+
},
|
|
140
|
+
"tasks": {
|
|
141
|
+
"description": "List and run tasks"
|
|
142
|
+
}
|
|
123
143
|
}
|
|
124
|
-
}
|
|
144
|
+
},
|
|
145
|
+
"packageManager": "pnpm@9.11.0+sha512.0a203ffaed5a3f63242cd064c8fb5892366c103e328079318f78062f24ea8c9d50bc6a47aa3567cabefd824d170e78fa2745ed1f16b132e16436146b7688f19b"
|
|
125
146
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { resolve } from 'node:path';
|
|
2
|
-
import { cwd } from 'node:process';
|
|
3
|
-
export const toUserConfig = (config, rootDir) => {
|
|
4
|
-
const project = {
|
|
5
|
-
...config.project,
|
|
6
|
-
rootDir: config.project.rootDir
|
|
7
|
-
? rootDir
|
|
8
|
-
? resolve(rootDir, config.project.rootDir)
|
|
9
|
-
: config.project.rootDir
|
|
10
|
-
: rootDir || cwd(),
|
|
11
|
-
};
|
|
12
|
-
return {
|
|
13
|
-
...config,
|
|
14
|
-
components: config.components || {},
|
|
15
|
-
flavors: config.flavors || {},
|
|
16
|
-
project,
|
|
17
|
-
};
|
|
18
|
-
};
|