@enspirit/emb 0.0.2 → 0.0.3

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.
Files changed (164) hide show
  1. package/README.md +190 -164
  2. package/bin/run.js +8 -2
  3. package/dist/src/cli/abstract/FlavouredCommand.d.ts +12 -0
  4. package/dist/src/cli/abstract/FlavouredCommand.js +40 -0
  5. package/dist/src/cli/abstract/index.d.ts +1 -0
  6. package/dist/src/cli/abstract/index.js +1 -0
  7. package/dist/src/cli/commands/clean.d.ts +15 -0
  8. package/dist/src/cli/commands/clean.js +29 -0
  9. package/dist/src/cli/commands/components/build.d.ts +11 -0
  10. package/dist/src/cli/commands/components/build.js +24 -0
  11. package/dist/src/cli/commands/components/index.d.ts +14 -0
  12. package/dist/src/cli/commands/components/index.js +44 -0
  13. package/dist/src/cli/commands/config/print.d.ts +13 -0
  14. package/dist/src/cli/commands/config/print.js +16 -0
  15. package/dist/src/cli/commands/containers/index.d.ts +12 -0
  16. package/dist/src/cli/commands/containers/index.js +66 -0
  17. package/dist/src/cli/commands/containers/prune.d.ts +8 -0
  18. package/dist/src/cli/commands/containers/prune.js +23 -0
  19. package/dist/src/cli/commands/down.d.ts +8 -0
  20. package/dist/src/cli/commands/down.js +42 -0
  21. package/dist/src/cli/commands/images/delete.d.ts +10 -0
  22. package/dist/src/cli/commands/images/delete.js +44 -0
  23. package/dist/src/cli/commands/images/index.d.ts +17 -0
  24. package/dist/src/cli/commands/images/index.js +59 -0
  25. package/dist/src/cli/commands/images/prune.d.ts +11 -0
  26. package/dist/src/cli/commands/images/prune.js +35 -0
  27. package/dist/src/cli/commands/run/index.d.ts +10 -0
  28. package/dist/src/cli/commands/run/index.js +49 -0
  29. package/dist/src/cli/commands/tasks/index.d.ts +9 -0
  30. package/dist/src/cli/commands/tasks/index.js +23 -0
  31. package/dist/src/cli/commands/tasks/run.d.ts +16 -0
  32. package/dist/src/cli/commands/tasks/run.js +113 -0
  33. package/dist/src/cli/commands/up.d.ts +10 -0
  34. package/dist/src/cli/commands/up.js +49 -0
  35. package/dist/src/cli/constants.d.ts +2 -0
  36. package/dist/src/cli/constants.js +6 -0
  37. package/dist/src/cli/hooks/init.d.ts +3 -0
  38. package/dist/src/cli/hooks/init.js +27 -0
  39. package/dist/src/cli/index.d.ts +3 -0
  40. package/dist/src/cli/index.js +3 -0
  41. package/dist/src/config/convert.d.ts +5 -0
  42. package/dist/src/config/convert.js +48 -0
  43. package/dist/src/config/index.d.ts +6 -0
  44. package/dist/src/config/index.js +25 -0
  45. package/dist/src/config/schema.d.ts +102 -0
  46. package/dist/src/config/schema.js +7 -0
  47. package/dist/src/config/schema.json +209 -0
  48. package/dist/src/config/types.d.ts +43 -0
  49. package/dist/src/config/types.js +1 -0
  50. package/dist/src/config/validation.d.ts +1 -0
  51. package/dist/src/config/validation.js +27 -0
  52. package/dist/src/context.d.ts +3 -0
  53. package/dist/src/context.js +7 -0
  54. package/dist/src/docker/compose/index.d.ts +7 -0
  55. package/dist/src/docker/compose/index.js +13 -0
  56. package/dist/src/docker/containers/getContainer.d.ts +2 -0
  57. package/dist/src/docker/containers/getContainer.js +5 -0
  58. package/dist/src/docker/containers/index.d.ts +1 -0
  59. package/dist/src/docker/containers/index.js +1 -0
  60. package/dist/src/docker/images/buildImage.d.ts +19 -0
  61. package/dist/src/docker/images/buildImage.js +64 -0
  62. package/dist/src/docker/images/deleteImage.d.ts +5 -0
  63. package/dist/src/docker/images/deleteImage.js +6 -0
  64. package/dist/src/docker/images/index.d.ts +4 -0
  65. package/dist/src/docker/images/index.js +4 -0
  66. package/dist/src/docker/images/listImages.d.ts +2 -0
  67. package/dist/src/docker/images/listImages.js +8 -0
  68. package/dist/src/docker/images/pruneImages.d.ts +6 -0
  69. package/dist/src/docker/images/pruneImages.js +8 -0
  70. package/dist/src/docker/index.d.ts +7 -0
  71. package/dist/src/docker/index.js +7 -0
  72. package/dist/src/docker/operations/containers/ListContainersOperation.d.ts +18 -0
  73. package/dist/src/docker/operations/containers/ListContainersOperation.js +44 -0
  74. package/dist/src/docker/operations/containers/PruneContainersOperation.d.ts +16 -0
  75. package/dist/src/docker/operations/containers/PruneContainersOperation.js +33 -0
  76. package/dist/src/docker/operations/containers/index.d.ts +2 -0
  77. package/dist/src/docker/operations/containers/index.js +2 -0
  78. package/dist/src/docker/operations/images/BuildImageOperation.d.ts +20 -0
  79. package/dist/src/docker/operations/images/BuildImageOperation.js +69 -0
  80. package/dist/src/docker/operations/images/ListImagesOperation.d.ts +17 -0
  81. package/dist/src/docker/operations/images/ListImagesOperation.js +38 -0
  82. package/dist/src/docker/operations/images/PruneImagesOperation.d.ts +16 -0
  83. package/dist/src/docker/operations/images/PruneImagesOperation.js +33 -0
  84. package/dist/src/docker/operations/images/index.d.ts +3 -0
  85. package/dist/src/docker/operations/images/index.js +3 -0
  86. package/dist/src/docker/operations/index.d.ts +2 -0
  87. package/dist/src/docker/operations/index.js +2 -0
  88. package/dist/src/docker/protobuf/control.proto +48 -0
  89. package/dist/src/docker/protobuf/index.d.ts +5 -0
  90. package/dist/src/docker/protobuf/index.js +29 -0
  91. package/dist/src/docker/types.d.ts +14 -0
  92. package/dist/src/docker/types.js +1 -0
  93. package/dist/src/docker/utils.d.ts +7 -0
  94. package/dist/src/docker/utils.js +10 -0
  95. package/dist/src/executors/docker.d.ts +6 -0
  96. package/dist/src/executors/docker.js +14 -0
  97. package/dist/src/executors/index.d.ts +6 -0
  98. package/dist/src/executors/index.js +7 -0
  99. package/dist/src/executors/shell.d.ts +2 -0
  100. package/dist/src/executors/shell.js +14 -0
  101. package/dist/src/executors/types.d.ts +8 -0
  102. package/dist/src/executors/types.js +1 -0
  103. package/dist/src/index.d.ts +3 -0
  104. package/dist/src/index.js +3 -0
  105. package/dist/src/monorepo/component.d.ts +24 -0
  106. package/dist/src/monorepo/component.js +77 -0
  107. package/dist/src/monorepo/config.d.ts +16 -0
  108. package/dist/src/monorepo/config.js +66 -0
  109. package/dist/src/monorepo/index.d.ts +7 -0
  110. package/dist/src/monorepo/index.js +7 -0
  111. package/dist/src/monorepo/monorepo.d.ts +29 -0
  112. package/dist/src/monorepo/monorepo.js +106 -0
  113. package/dist/src/monorepo/operations/components/BuildComponentsOperation.d.ts +11 -0
  114. package/dist/src/monorepo/operations/components/BuildComponentsOperation.js +144 -0
  115. package/dist/src/monorepo/operations/components/index.d.ts +1 -0
  116. package/dist/src/monorepo/operations/components/index.js +1 -0
  117. package/dist/src/monorepo/operations/index.d.ts +1 -0
  118. package/dist/src/monorepo/operations/index.js +1 -0
  119. package/dist/src/monorepo/plugins/ComponentsDiscover.d.ts +6 -0
  120. package/dist/src/monorepo/plugins/ComponentsDiscover.js +30 -0
  121. package/dist/src/monorepo/plugins/DotEnvPlugin.d.ts +5 -0
  122. package/dist/src/monorepo/plugins/DotEnvPlugin.js +11 -0
  123. package/dist/src/monorepo/plugins/index.d.ts +7 -0
  124. package/dist/src/monorepo/plugins/index.js +20 -0
  125. package/dist/src/monorepo/plugins/plugin.d.ts +15 -0
  126. package/dist/src/monorepo/plugins/plugin.js +12 -0
  127. package/dist/src/monorepo/project.d.ts +6 -0
  128. package/dist/src/monorepo/project.js +8 -0
  129. package/dist/src/monorepo/store/index.d.ts +20 -0
  130. package/dist/src/monorepo/store/index.js +65 -0
  131. package/dist/src/monorepo/types.d.ts +7 -0
  132. package/dist/src/monorepo/types.js +1 -0
  133. package/dist/src/monorepo/utils/findBuildOrder.d.ts +2 -0
  134. package/dist/src/monorepo/utils/findBuildOrder.js +41 -0
  135. package/dist/src/monorepo/utils/index.d.ts +1 -0
  136. package/dist/src/monorepo/utils/index.js +1 -0
  137. package/dist/src/operations/abstract/AbstractOperation.d.ts +10 -0
  138. package/dist/src/operations/abstract/AbstractOperation.js +13 -0
  139. package/dist/src/operations/abstract/index.d.ts +1 -0
  140. package/dist/src/operations/abstract/index.js +1 -0
  141. package/dist/src/operations/index.d.ts +2 -0
  142. package/dist/src/operations/index.js +2 -0
  143. package/dist/src/operations/types.d.ts +3 -0
  144. package/dist/src/operations/types.js +1 -0
  145. package/dist/src/prerequisites/FilePrerequisitePlugin.d.ts +7 -0
  146. package/dist/src/prerequisites/FilePrerequisitePlugin.js +41 -0
  147. package/dist/src/prerequisites/GitPrerequisitePlugin.d.ts +5 -0
  148. package/dist/src/prerequisites/GitPrerequisitePlugin.js +17 -0
  149. package/dist/src/prerequisites/index.d.ts +3 -0
  150. package/dist/src/prerequisites/index.js +3 -0
  151. package/dist/src/prerequisites/types.d.ts +46 -0
  152. package/dist/src/prerequisites/types.js +24 -0
  153. package/dist/src/types.d.ts +13 -0
  154. package/dist/src/types.js +1 -0
  155. package/dist/src/utils/TemplateExpander.d.ts +21 -0
  156. package/dist/src/utils/TemplateExpander.js +53 -0
  157. package/dist/src/utils/deepMergeArray.d.ts +1 -0
  158. package/dist/src/utils/deepMergeArray.js +19 -0
  159. package/dist/src/utils/index.d.ts +3 -0
  160. package/dist/src/utils/index.js +3 -0
  161. package/dist/src/utils/time.d.ts +2 -0
  162. package/dist/src/utils/time.js +19 -0
  163. package/oclif.manifest.json +572 -2
  164. package/package.json +8 -9
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.0.2 darwin-x64 node-v22.12.0
17
+ @enspirit/emb/0.0.3 darwin-x64 node-v22.12.0
18
18
  $ emb --help [COMMAND]
19
19
  USAGE
20
20
  $ emb COMMAND
@@ -24,17 +24,22 @@ USAGE
24
24
  # Commands
25
25
  <!-- commands -->
26
26
  * [`emb autocomplete [SHELL]`](#emb-autocomplete-shell)
27
+ * [`emb clean`](#emb-clean)
28
+ * [`emb components`](#emb-components)
29
+ * [`emb components build [COMPONENT]`](#emb-components-build-component)
30
+ * [`emb config print`](#emb-config-print)
31
+ * [`emb containers`](#emb-containers)
32
+ * [`emb containers prune`](#emb-containers-prune)
33
+ * [`emb down`](#emb-down)
27
34
  * [`emb help [COMMAND]`](#emb-help-command)
28
- * [`emb plugins`](#emb-plugins)
29
- * [`emb plugins add PLUGIN`](#emb-plugins-add-plugin)
30
- * [`emb plugins:inspect PLUGIN...`](#emb-pluginsinspect-plugin)
31
- * [`emb plugins install PLUGIN`](#emb-plugins-install-plugin)
32
- * [`emb plugins link PATH`](#emb-plugins-link-path)
33
- * [`emb plugins remove [PLUGIN]`](#emb-plugins-remove-plugin)
34
- * [`emb plugins reset`](#emb-plugins-reset)
35
- * [`emb plugins uninstall [PLUGIN]`](#emb-plugins-uninstall-plugin)
36
- * [`emb plugins unlink [PLUGIN]`](#emb-plugins-unlink-plugin)
37
- * [`emb plugins update`](#emb-plugins-update)
35
+ * [`emb images`](#emb-images)
36
+ * [`emb images delete`](#emb-images-delete)
37
+ * [`emb images prune`](#emb-images-prune)
38
+ * [`emb ps`](#emb-ps)
39
+ * [`emb run COMPONENT SCRIPT`](#emb-run-component-script)
40
+ * [`emb tasks`](#emb-tasks)
41
+ * [`emb tasks run [TASK]`](#emb-tasks-run-task)
42
+ * [`emb up`](#emb-up)
38
43
 
39
44
  ## `emb autocomplete [SHELL]`
40
45
 
@@ -67,313 +72,334 @@ EXAMPLES
67
72
 
68
73
  _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.34/src/commands/autocomplete/index.ts)_
69
74
 
70
- ## `emb help [COMMAND]`
75
+ ## `emb clean`
71
76
 
72
- Display help for emb.
77
+ Clean the project.
73
78
 
74
79
  ```
75
80
  USAGE
76
- $ emb help [COMMAND...] [-n]
77
-
78
- ARGUMENTS
79
- COMMAND... Command to show help for.
81
+ $ emb clean [--json]
80
82
 
81
- FLAGS
82
- -n, --nested-commands Include all nested commands in the output.
83
+ GLOBAL FLAGS
84
+ --json Format output as json.
83
85
 
84
86
  DESCRIPTION
85
- Display help for emb.
86
- ```
87
+ Clean the project.
87
88
 
88
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.32/src/commands/help.ts)_
89
+ EXAMPLES
90
+ $ emb clean
91
+ ```
89
92
 
90
- ## `emb plugins`
93
+ ## `emb components`
91
94
 
92
- List installed plugins.
95
+ List components.
93
96
 
94
97
  ```
95
98
  USAGE
96
- $ emb plugins [--json] [--core]
99
+ $ emb components [--json] [--flavor <value>]
97
100
 
98
101
  FLAGS
99
- --core Show core plugins.
102
+ --flavor=<value> Specify the flavor to use.
100
103
 
101
104
  GLOBAL FLAGS
102
105
  --json Format output as json.
103
106
 
104
107
  DESCRIPTION
105
- List installed plugins.
108
+ List components.
106
109
 
107
110
  EXAMPLES
108
- $ emb plugins
111
+ $ emb components
109
112
  ```
110
113
 
111
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/index.ts)_
112
-
113
- ## `emb plugins add PLUGIN`
114
+ ## `emb components build [COMPONENT]`
114
115
 
115
- Installs a plugin into emb.
116
+ Build the components of the monorepo
116
117
 
117
118
  ```
118
119
  USAGE
119
- $ emb plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]
120
+ $ emb components build [COMPONENT...] [--json] [--flavor <value>]
120
121
 
121
122
  ARGUMENTS
122
- PLUGIN... Plugin to install.
123
+ COMPONENT... List of components to build
123
124
 
124
125
  FLAGS
125
- -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
126
- -h, --help Show CLI help.
127
- -s, --silent Silences npm output.
128
- -v, --verbose Show verbose npm output.
126
+ --flavor=<value> Specify the flavor to use.
129
127
 
130
128
  GLOBAL FLAGS
131
129
  --json Format output as json.
132
130
 
133
131
  DESCRIPTION
134
- Installs a plugin into emb.
132
+ Build the components of the monorepo
135
133
 
136
- Uses npm to install plugins.
137
-
138
- Installation of a user-installed plugin will override a core plugin.
139
-
140
- Use the EMB_NPM_LOG_LEVEL environment variable to set the npm loglevel.
141
- Use the EMB_NPM_REGISTRY environment variable to set the npm registry.
134
+ EXAMPLES
135
+ $ emb components build build --flavor development
136
+ ```
142
137
 
143
- ALIASES
144
- $ emb plugins add
138
+ ## `emb config print`
145
139
 
146
- EXAMPLES
147
- Install a plugin from npm registry.
140
+ Print the current config.
148
141
 
149
- $ emb plugins add myplugin
142
+ ```
143
+ USAGE
144
+ $ emb config print [--json] [--flavor <value>]
150
145
 
151
- Install a plugin from a github url.
146
+ FLAGS
147
+ --flavor=<value> Specify the flavor to use.
152
148
 
153
- $ emb plugins add https://github.com/someuser/someplugin
149
+ GLOBAL FLAGS
150
+ --json Format output as json.
154
151
 
155
- Install a plugin from a github slug.
152
+ DESCRIPTION
153
+ Print the current config.
156
154
 
157
- $ emb plugins add someuser/someplugin
155
+ EXAMPLES
156
+ $ emb config print
158
157
  ```
159
158
 
160
- ## `emb plugins:inspect PLUGIN...`
159
+ ## `emb containers`
161
160
 
162
- Displays installation properties of a plugin.
161
+ List docker containers.
163
162
 
164
163
  ```
165
164
  USAGE
166
- $ emb plugins inspect PLUGIN...
167
-
168
- ARGUMENTS
169
- PLUGIN... [default: .] Plugin to inspect.
165
+ $ emb containers [--json] [-a]
170
166
 
171
167
  FLAGS
172
- -h, --help Show CLI help.
173
- -v, --verbose
168
+ -a, --all Retun all containers. By default, only running containers are shown
174
169
 
175
170
  GLOBAL FLAGS
176
171
  --json Format output as json.
177
172
 
178
173
  DESCRIPTION
179
- Displays installation properties of a plugin.
174
+ List docker containers.
175
+
176
+ ALIASES
177
+ $ emb ps
180
178
 
181
179
  EXAMPLES
182
- $ emb plugins inspect myplugin
180
+ $ emb containers
183
181
  ```
184
182
 
185
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/inspect.ts)_
183
+ ## `emb containers prune`
186
184
 
187
- ## `emb plugins install PLUGIN`
188
-
189
- Installs a plugin into emb.
185
+ Prune containers.
190
186
 
191
187
  ```
192
188
  USAGE
193
- $ emb plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]
194
-
195
- ARGUMENTS
196
- PLUGIN... Plugin to install.
197
-
198
- FLAGS
199
- -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
200
- -h, --help Show CLI help.
201
- -s, --silent Silences npm output.
202
- -v, --verbose Show verbose npm output.
189
+ $ emb containers prune [--json]
203
190
 
204
191
  GLOBAL FLAGS
205
192
  --json Format output as json.
206
193
 
207
194
  DESCRIPTION
208
- Installs a plugin into emb.
195
+ Prune containers.
209
196
 
210
- Uses npm to install plugins.
197
+ EXAMPLES
198
+ $ emb containers prune
199
+ ```
211
200
 
212
- Installation of a user-installed plugin will override a core plugin.
201
+ ## `emb down`
213
202
 
214
- Use the EMB_NPM_LOG_LEVEL environment variable to set the npm loglevel.
215
- Use the EMB_NPM_REGISTRY environment variable to set the npm registry.
203
+ Stop the whole project.
216
204
 
217
- ALIASES
218
- $ emb plugins add
205
+ ```
206
+ USAGE
207
+ $ emb down [--json]
208
+
209
+ GLOBAL FLAGS
210
+ --json Format output as json.
211
+
212
+ DESCRIPTION
213
+ Stop the whole project.
219
214
 
220
215
  EXAMPLES
221
- Install a plugin from npm registry.
216
+ $ emb down
217
+ ```
222
218
 
223
- $ emb plugins install myplugin
219
+ ## `emb help [COMMAND]`
224
220
 
225
- Install a plugin from a github url.
221
+ Display help for emb.
226
222
 
227
- $ emb plugins install https://github.com/someuser/someplugin
223
+ ```
224
+ USAGE
225
+ $ emb help [COMMAND...] [-n]
228
226
 
229
- Install a plugin from a github slug.
227
+ ARGUMENTS
228
+ COMMAND... Command to show help for.
230
229
 
231
- $ emb plugins install someuser/someplugin
230
+ FLAGS
231
+ -n, --nested-commands Include all nested commands in the output.
232
+
233
+ DESCRIPTION
234
+ Display help for emb.
232
235
  ```
233
236
 
234
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/install.ts)_
237
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.32/src/commands/help.ts)_
235
238
 
236
- ## `emb plugins link PATH`
239
+ ## `emb images`
237
240
 
238
- Links a plugin into the CLI for development.
241
+ List docker images.
239
242
 
240
243
  ```
241
244
  USAGE
242
- $ emb plugins link PATH [-h] [--install] [-v]
243
-
244
- ARGUMENTS
245
- PATH [default: .] path to plugin
245
+ $ emb images [--json] [-a]
246
246
 
247
247
  FLAGS
248
- -h, --help Show CLI help.
249
- -v, --verbose
250
- --[no-]install Install dependencies after linking the plugin.
248
+ -a, --all Show all images. Only images from a final layer (no children) are shown by default.
249
+
250
+ GLOBAL FLAGS
251
+ --json Format output as json.
251
252
 
252
253
  DESCRIPTION
253
- Links a plugin into the CLI for development.
254
+ List docker images.
254
255
 
255
- Installation of a linked plugin will override a user-installed or core plugin.
256
+ EXAMPLES
257
+ $ emb images
258
+ ```
256
259
 
257
- e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
258
- command will override the user-installed or core plugin implementation. This is useful for development work.
260
+ ## `emb images delete`
259
261
 
262
+ Delete project images.
260
263
 
261
- EXAMPLES
262
- $ emb plugins link myplugin
263
264
  ```
265
+ USAGE
266
+ $ emb images delete [--json] [-f]
264
267
 
265
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/link.ts)_
268
+ FLAGS
269
+ -f, --force Remove the image even if it is being used by stopped containers or has other tags
266
270
 
267
- ## `emb plugins remove [PLUGIN]`
271
+ GLOBAL FLAGS
272
+ --json Format output as json.
268
273
 
269
- Removes a plugin from the CLI.
274
+ DESCRIPTION
275
+ Delete project images.
270
276
 
277
+ EXAMPLES
278
+ $ emb images delete
271
279
  ```
272
- USAGE
273
- $ emb plugins remove [PLUGIN...] [-h] [-v]
274
280
 
275
- ARGUMENTS
276
- PLUGIN... plugin to uninstall
281
+ ## `emb images prune`
282
+
283
+ Prune project images.
284
+
285
+ ```
286
+ USAGE
287
+ $ emb images prune [--json] [-a]
277
288
 
278
289
  FLAGS
279
- -h, --help Show CLI help.
280
- -v, --verbose
290
+ -a, --all Prune all images. When set to true all images will be pruned, not only dangling ones
281
291
 
282
- DESCRIPTION
283
- Removes a plugin from the CLI.
292
+ GLOBAL FLAGS
293
+ --json Format output as json.
284
294
 
285
- ALIASES
286
- $ emb plugins unlink
287
- $ emb plugins remove
295
+ DESCRIPTION
296
+ Prune project images.
288
297
 
289
298
  EXAMPLES
290
- $ emb plugins remove myplugin
299
+ $ emb images prune
291
300
  ```
292
301
 
293
- ## `emb plugins reset`
302
+ ## `emb ps`
294
303
 
295
- Remove all user-installed and linked plugins.
304
+ List docker containers.
296
305
 
297
306
  ```
298
307
  USAGE
299
- $ emb plugins reset [--hard] [--reinstall]
308
+ $ emb ps [--json] [-a]
300
309
 
301
310
  FLAGS
302
- --hard Delete node_modules and package manager related files in addition to uninstalling plugins.
303
- --reinstall Reinstall all plugins after uninstalling.
304
- ```
311
+ -a, --all Retun all containers. By default, only running containers are shown
305
312
 
306
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/reset.ts)_
313
+ GLOBAL FLAGS
314
+ --json Format output as json.
307
315
 
308
- ## `emb plugins uninstall [PLUGIN]`
316
+ DESCRIPTION
317
+ List docker containers.
309
318
 
310
- Removes a plugin from the CLI.
319
+ ALIASES
320
+ $ emb ps
321
+
322
+ EXAMPLES
323
+ $ emb ps
324
+ ```
325
+
326
+ ## `emb run COMPONENT SCRIPT`
327
+
328
+ Run an npm script from a component's package.json
311
329
 
312
330
  ```
313
331
  USAGE
314
- $ emb plugins uninstall [PLUGIN...] [-h] [-v]
332
+ $ emb run COMPONENT SCRIPT
315
333
 
316
334
  ARGUMENTS
317
- PLUGIN... plugin to uninstall
318
-
319
- FLAGS
320
- -h, --help Show CLI help.
321
- -v, --verbose
335
+ COMPONENT Component name
336
+ SCRIPT NPM script to run
322
337
 
323
338
  DESCRIPTION
324
- Removes a plugin from the CLI.
339
+ Run an npm script from a component's package.json
340
+ ```
325
341
 
326
- ALIASES
327
- $ emb plugins unlink
328
- $ emb plugins remove
342
+ ## `emb tasks`
343
+
344
+ List tasks.
329
345
 
330
- EXAMPLES
331
- $ emb plugins uninstall myplugin
332
346
  ```
347
+ USAGE
348
+ $ emb tasks [--json]
349
+
350
+ GLOBAL FLAGS
351
+ --json Format output as json.
333
352
 
334
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/uninstall.ts)_
353
+ DESCRIPTION
354
+ List tasks.
355
+
356
+ EXAMPLES
357
+ $ emb tasks
358
+ ```
335
359
 
336
- ## `emb plugins unlink [PLUGIN]`
360
+ ## `emb tasks run [TASK]`
337
361
 
338
- Removes a plugin from the CLI.
362
+ Run a task.
339
363
 
340
364
  ```
341
365
  USAGE
342
- $ emb plugins unlink [PLUGIN...] [-h] [-v]
366
+ $ emb tasks run [TASK...] [--json] [-x container|local]
343
367
 
344
368
  ARGUMENTS
345
- PLUGIN... plugin to uninstall
369
+ TASK... List of tasks ids to run (eg: component:task)
346
370
 
347
371
  FLAGS
348
- -h, --help Show CLI help.
349
- -v, --verbose
372
+ -x, --executor=<option> <options: container|local>
350
373
 
351
- DESCRIPTION
352
- Removes a plugin from the CLI.
374
+ GLOBAL FLAGS
375
+ --json Format output as json.
353
376
 
354
- ALIASES
355
- $ emb plugins unlink
356
- $ emb plugins remove
377
+ DESCRIPTION
378
+ Run a task.
357
379
 
358
380
  EXAMPLES
359
- $ emb plugins unlink myplugin
381
+ $ emb tasks run
360
382
  ```
361
383
 
362
- ## `emb plugins update`
384
+ ## `emb up`
363
385
 
364
- Update installed plugins.
386
+ Start the whole project.
365
387
 
366
388
  ```
367
389
  USAGE
368
- $ emb plugins update [-h] [-v]
390
+ $ emb up [--json] [--flavor <value>] [-f]
369
391
 
370
392
  FLAGS
371
- -h, --help Show CLI help.
372
- -v, --verbose
393
+ -f, --force-recreate Recreate containers even if their configuration and image haven't changed
394
+ --flavor=<value> Specify the flavor to use.
395
+
396
+ GLOBAL FLAGS
397
+ --json Format output as json.
373
398
 
374
399
  DESCRIPTION
375
- Update installed plugins.
376
- ```
400
+ Start the whole project.
377
401
 
378
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/update.ts)_
402
+ EXAMPLES
403
+ $ emb up
404
+ ```
379
405
  <!-- commandsstop -->
package/bin/run.js CHANGED
@@ -1,5 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { execute } from '@oclif/core';
3
+ import { execute, Performance, settings } from '@oclif/core';
4
4
 
5
- await execute({ dir: import.meta.url });
5
+ settings.performanceEnabled = Boolean(process.env.EMB_DEBUG_PERFS);
6
+
7
+ await execute({ dir: import.meta.url }).finally(() => {
8
+ if (settings.performanceEnabled) {
9
+ console.log(Performance.results);
10
+ }
11
+ });
@@ -0,0 +1,12 @@
1
+ import { Command, Interfaces } from '@oclif/core';
2
+ export type Flags<T extends typeof Command> = Interfaces.InferredFlags<(typeof FlavoredCommand)['baseFlags'] & T['flags']>;
3
+ export type Args<T extends typeof Command> = Interfaces.InferredArgs<T['args']>;
4
+ export declare abstract class FlavoredCommand<T extends typeof Command> extends Command {
5
+ static baseFlags: {
6
+ flavor: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
7
+ };
8
+ static enableJsonFlag: boolean;
9
+ protected args: Args<T>;
10
+ protected flags: Flags<T>;
11
+ init(): Promise<void>;
12
+ }
@@ -0,0 +1,40 @@
1
+ import { getContext, setContext } from '../../index.js';
2
+ import { Command, Flags } from '@oclif/core';
3
+ export class FlavoredCommand extends Command {
4
+ // define flags that can be inherited by any command that extends FlavoredCommand
5
+ static baseFlags = {
6
+ flavor: Flags.string({
7
+ description: 'Specify the flavor to use.',
8
+ name: 'flavor',
9
+ required: false,
10
+ }),
11
+ };
12
+ // add the --json flag
13
+ static enableJsonFlag = true;
14
+ args;
15
+ flags;
16
+ async init() {
17
+ await super.init();
18
+ const { args, flags } = await this.parse({
19
+ args: this.ctor.args,
20
+ baseFlags: super.ctor.baseFlags,
21
+ enableJsonFlag: this.ctor.enableJsonFlag,
22
+ flags: this.ctor.flags,
23
+ strict: this.ctor.strict,
24
+ });
25
+ this.flags = flags;
26
+ this.args = args;
27
+ // Get monorepo config
28
+ const context = getContext();
29
+ // Installing flavor if relevant
30
+ // no validation as the monorepo will
31
+ // complain properly if incorrect
32
+ const { flavor } = this.flags;
33
+ if (flavor) {
34
+ setContext({
35
+ ...context,
36
+ monorepo: await context.monorepo.withFlavor(flavor),
37
+ });
38
+ }
39
+ }
40
+ }
@@ -0,0 +1 @@
1
+ export * from './FlavouredCommand.js';
@@ -0,0 +1 @@
1
+ export * from './FlavouredCommand.js';
@@ -0,0 +1,15 @@
1
+ import { Command } from '@oclif/core';
2
+ /**
3
+ * For now, only cleans the stores (logs/sentinels)
4
+ * But this should permit to clean everytning (via flags)
5
+ *
6
+ * Eg: --containers --volumes --images --networks
7
+ * Or: --all
8
+ */
9
+ export default class CleanCommand extends Command {
10
+ static description: string;
11
+ static enableJsonFlag: boolean;
12
+ static examples: string[];
13
+ static flags: {};
14
+ run(): Promise<void>;
15
+ }
@@ -0,0 +1,29 @@
1
+ import { getContext } from '../../index.js';
2
+ import { Command } from '@oclif/core';
3
+ import { Listr } from 'listr2';
4
+ /**
5
+ * For now, only cleans the stores (logs/sentinels)
6
+ * But this should permit to clean everytning (via flags)
7
+ *
8
+ * Eg: --containers --volumes --images --networks
9
+ * Or: --all
10
+ */
11
+ export default class CleanCommand extends Command {
12
+ static description = 'Clean the project.';
13
+ static enableJsonFlag = true;
14
+ static examples = ['<%= config.bin %> <%= command.id %>'];
15
+ static flags = {};
16
+ async run() {
17
+ const { monorepo } = getContext();
18
+ const runner = new Listr([
19
+ {
20
+ rendererOptions: { persistentOutput: true },
21
+ async task() {
22
+ await monorepo.store.trash();
23
+ },
24
+ title: 'Cleaning project',
25
+ },
26
+ ]);
27
+ await runner.run();
28
+ }
29
+ }
@@ -0,0 +1,11 @@
1
+ import { FlavoredCommand } from '../../index.js';
2
+ export default class BuildCommand extends FlavoredCommand<typeof BuildCommand> {
3
+ static args: {
4
+ component: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
5
+ };
6
+ static description: string;
7
+ static examples: string[];
8
+ static flags: {};
9
+ static strict: boolean;
10
+ run(): Promise<void>;
11
+ }