@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.
- package/README.md +190 -164
- package/bin/run.js +8 -2
- package/dist/src/cli/abstract/FlavouredCommand.d.ts +12 -0
- package/dist/src/cli/abstract/FlavouredCommand.js +40 -0
- package/dist/src/cli/abstract/index.d.ts +1 -0
- package/dist/src/cli/abstract/index.js +1 -0
- package/dist/src/cli/commands/clean.d.ts +15 -0
- package/dist/src/cli/commands/clean.js +29 -0
- package/dist/src/cli/commands/components/build.d.ts +11 -0
- package/dist/src/cli/commands/components/build.js +24 -0
- package/dist/src/cli/commands/components/index.d.ts +14 -0
- package/dist/src/cli/commands/components/index.js +44 -0
- package/dist/src/cli/commands/config/print.d.ts +13 -0
- package/dist/src/cli/commands/config/print.js +16 -0
- package/dist/src/cli/commands/containers/index.d.ts +12 -0
- package/dist/src/cli/commands/containers/index.js +66 -0
- package/dist/src/cli/commands/containers/prune.d.ts +8 -0
- package/dist/src/cli/commands/containers/prune.js +23 -0
- package/dist/src/cli/commands/down.d.ts +8 -0
- package/dist/src/cli/commands/down.js +42 -0
- package/dist/src/cli/commands/images/delete.d.ts +10 -0
- package/dist/src/cli/commands/images/delete.js +44 -0
- package/dist/src/cli/commands/images/index.d.ts +17 -0
- package/dist/src/cli/commands/images/index.js +59 -0
- package/dist/src/cli/commands/images/prune.d.ts +11 -0
- package/dist/src/cli/commands/images/prune.js +35 -0
- package/dist/src/cli/commands/run/index.d.ts +10 -0
- package/dist/src/cli/commands/run/index.js +49 -0
- package/dist/src/cli/commands/tasks/index.d.ts +9 -0
- package/dist/src/cli/commands/tasks/index.js +23 -0
- package/dist/src/cli/commands/tasks/run.d.ts +16 -0
- package/dist/src/cli/commands/tasks/run.js +113 -0
- package/dist/src/cli/commands/up.d.ts +10 -0
- package/dist/src/cli/commands/up.js +49 -0
- package/dist/src/cli/constants.d.ts +2 -0
- package/dist/src/cli/constants.js +6 -0
- package/dist/src/cli/hooks/init.d.ts +3 -0
- package/dist/src/cli/hooks/init.js +27 -0
- package/dist/src/cli/index.d.ts +3 -0
- package/dist/src/cli/index.js +3 -0
- package/dist/src/config/convert.d.ts +5 -0
- package/dist/src/config/convert.js +48 -0
- package/dist/src/config/index.d.ts +6 -0
- package/dist/src/config/index.js +25 -0
- package/dist/src/config/schema.d.ts +102 -0
- package/dist/src/config/schema.js +7 -0
- package/dist/src/config/schema.json +209 -0
- package/dist/src/config/types.d.ts +43 -0
- package/dist/src/config/types.js +1 -0
- package/dist/src/config/validation.d.ts +1 -0
- package/dist/src/config/validation.js +27 -0
- package/dist/src/context.d.ts +3 -0
- package/dist/src/context.js +7 -0
- package/dist/src/docker/compose/index.d.ts +7 -0
- package/dist/src/docker/compose/index.js +13 -0
- package/dist/src/docker/containers/getContainer.d.ts +2 -0
- package/dist/src/docker/containers/getContainer.js +5 -0
- package/dist/src/docker/containers/index.d.ts +1 -0
- package/dist/src/docker/containers/index.js +1 -0
- package/dist/src/docker/images/buildImage.d.ts +19 -0
- package/dist/src/docker/images/buildImage.js +64 -0
- package/dist/src/docker/images/deleteImage.d.ts +5 -0
- package/dist/src/docker/images/deleteImage.js +6 -0
- package/dist/src/docker/images/index.d.ts +4 -0
- package/dist/src/docker/images/index.js +4 -0
- package/dist/src/docker/images/listImages.d.ts +2 -0
- package/dist/src/docker/images/listImages.js +8 -0
- package/dist/src/docker/images/pruneImages.d.ts +6 -0
- package/dist/src/docker/images/pruneImages.js +8 -0
- package/dist/src/docker/index.d.ts +7 -0
- package/dist/src/docker/index.js +7 -0
- package/dist/src/docker/operations/containers/ListContainersOperation.d.ts +18 -0
- package/dist/src/docker/operations/containers/ListContainersOperation.js +44 -0
- package/dist/src/docker/operations/containers/PruneContainersOperation.d.ts +16 -0
- package/dist/src/docker/operations/containers/PruneContainersOperation.js +33 -0
- package/dist/src/docker/operations/containers/index.d.ts +2 -0
- package/dist/src/docker/operations/containers/index.js +2 -0
- package/dist/src/docker/operations/images/BuildImageOperation.d.ts +20 -0
- package/dist/src/docker/operations/images/BuildImageOperation.js +69 -0
- package/dist/src/docker/operations/images/ListImagesOperation.d.ts +17 -0
- package/dist/src/docker/operations/images/ListImagesOperation.js +38 -0
- package/dist/src/docker/operations/images/PruneImagesOperation.d.ts +16 -0
- package/dist/src/docker/operations/images/PruneImagesOperation.js +33 -0
- package/dist/src/docker/operations/images/index.d.ts +3 -0
- package/dist/src/docker/operations/images/index.js +3 -0
- package/dist/src/docker/operations/index.d.ts +2 -0
- package/dist/src/docker/operations/index.js +2 -0
- package/dist/src/docker/protobuf/control.proto +48 -0
- package/dist/src/docker/protobuf/index.d.ts +5 -0
- package/dist/src/docker/protobuf/index.js +29 -0
- package/dist/src/docker/types.d.ts +14 -0
- package/dist/src/docker/types.js +1 -0
- package/dist/src/docker/utils.d.ts +7 -0
- package/dist/src/docker/utils.js +10 -0
- package/dist/src/executors/docker.d.ts +6 -0
- package/dist/src/executors/docker.js +14 -0
- package/dist/src/executors/index.d.ts +6 -0
- package/dist/src/executors/index.js +7 -0
- package/dist/src/executors/shell.d.ts +2 -0
- package/dist/src/executors/shell.js +14 -0
- package/dist/src/executors/types.d.ts +8 -0
- package/dist/src/executors/types.js +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +3 -0
- package/dist/src/monorepo/component.d.ts +24 -0
- package/dist/src/monorepo/component.js +77 -0
- package/dist/src/monorepo/config.d.ts +16 -0
- package/dist/src/monorepo/config.js +66 -0
- package/dist/src/monorepo/index.d.ts +7 -0
- package/dist/src/monorepo/index.js +7 -0
- package/dist/src/monorepo/monorepo.d.ts +29 -0
- package/dist/src/monorepo/monorepo.js +106 -0
- package/dist/src/monorepo/operations/components/BuildComponentsOperation.d.ts +11 -0
- package/dist/src/monorepo/operations/components/BuildComponentsOperation.js +144 -0
- package/dist/src/monorepo/operations/components/index.d.ts +1 -0
- package/dist/src/monorepo/operations/components/index.js +1 -0
- package/dist/src/monorepo/operations/index.d.ts +1 -0
- package/dist/src/monorepo/operations/index.js +1 -0
- package/dist/src/monorepo/plugins/ComponentsDiscover.d.ts +6 -0
- package/dist/src/monorepo/plugins/ComponentsDiscover.js +30 -0
- package/dist/src/monorepo/plugins/DotEnvPlugin.d.ts +5 -0
- package/dist/src/monorepo/plugins/DotEnvPlugin.js +11 -0
- package/dist/src/monorepo/plugins/index.d.ts +7 -0
- package/dist/src/monorepo/plugins/index.js +20 -0
- package/dist/src/monorepo/plugins/plugin.d.ts +15 -0
- package/dist/src/monorepo/plugins/plugin.js +12 -0
- package/dist/src/monorepo/project.d.ts +6 -0
- package/dist/src/monorepo/project.js +8 -0
- package/dist/src/monorepo/store/index.d.ts +20 -0
- package/dist/src/monorepo/store/index.js +65 -0
- package/dist/src/monorepo/types.d.ts +7 -0
- package/dist/src/monorepo/types.js +1 -0
- package/dist/src/monorepo/utils/findBuildOrder.d.ts +2 -0
- package/dist/src/monorepo/utils/findBuildOrder.js +41 -0
- package/dist/src/monorepo/utils/index.d.ts +1 -0
- package/dist/src/monorepo/utils/index.js +1 -0
- package/dist/src/operations/abstract/AbstractOperation.d.ts +10 -0
- package/dist/src/operations/abstract/AbstractOperation.js +13 -0
- package/dist/src/operations/abstract/index.d.ts +1 -0
- package/dist/src/operations/abstract/index.js +1 -0
- package/dist/src/operations/index.d.ts +2 -0
- package/dist/src/operations/index.js +2 -0
- package/dist/src/operations/types.d.ts +3 -0
- package/dist/src/operations/types.js +1 -0
- package/dist/src/prerequisites/FilePrerequisitePlugin.d.ts +7 -0
- package/dist/src/prerequisites/FilePrerequisitePlugin.js +41 -0
- package/dist/src/prerequisites/GitPrerequisitePlugin.d.ts +5 -0
- package/dist/src/prerequisites/GitPrerequisitePlugin.js +17 -0
- package/dist/src/prerequisites/index.d.ts +3 -0
- package/dist/src/prerequisites/index.js +3 -0
- package/dist/src/prerequisites/types.d.ts +46 -0
- package/dist/src/prerequisites/types.js +24 -0
- package/dist/src/types.d.ts +13 -0
- package/dist/src/types.js +1 -0
- package/dist/src/utils/TemplateExpander.d.ts +21 -0
- package/dist/src/utils/TemplateExpander.js +53 -0
- package/dist/src/utils/deepMergeArray.d.ts +1 -0
- package/dist/src/utils/deepMergeArray.js +19 -0
- package/dist/src/utils/index.d.ts +3 -0
- package/dist/src/utils/index.js +3 -0
- package/dist/src/utils/time.d.ts +2 -0
- package/dist/src/utils/time.js +19 -0
- package/oclif.manifest.json +572 -2
- 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.
|
|
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
|
|
29
|
-
* [`emb
|
|
30
|
-
* [`emb
|
|
31
|
-
* [`emb
|
|
32
|
-
* [`emb
|
|
33
|
-
* [`emb
|
|
34
|
-
* [`emb
|
|
35
|
-
* [`emb
|
|
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
|
|
75
|
+
## `emb clean`
|
|
71
76
|
|
|
72
|
-
|
|
77
|
+
Clean the project.
|
|
73
78
|
|
|
74
79
|
```
|
|
75
80
|
USAGE
|
|
76
|
-
$ emb
|
|
77
|
-
|
|
78
|
-
ARGUMENTS
|
|
79
|
-
COMMAND... Command to show help for.
|
|
81
|
+
$ emb clean [--json]
|
|
80
82
|
|
|
81
|
-
FLAGS
|
|
82
|
-
|
|
83
|
+
GLOBAL FLAGS
|
|
84
|
+
--json Format output as json.
|
|
83
85
|
|
|
84
86
|
DESCRIPTION
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
+
Clean the project.
|
|
87
88
|
|
|
88
|
-
|
|
89
|
+
EXAMPLES
|
|
90
|
+
$ emb clean
|
|
91
|
+
```
|
|
89
92
|
|
|
90
|
-
## `emb
|
|
93
|
+
## `emb components`
|
|
91
94
|
|
|
92
|
-
List
|
|
95
|
+
List components.
|
|
93
96
|
|
|
94
97
|
```
|
|
95
98
|
USAGE
|
|
96
|
-
$ emb
|
|
99
|
+
$ emb components [--json] [--flavor <value>]
|
|
97
100
|
|
|
98
101
|
FLAGS
|
|
99
|
-
--
|
|
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
|
|
108
|
+
List components.
|
|
106
109
|
|
|
107
110
|
EXAMPLES
|
|
108
|
-
$ emb
|
|
111
|
+
$ emb components
|
|
109
112
|
```
|
|
110
113
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
## `emb plugins add PLUGIN`
|
|
114
|
+
## `emb components build [COMPONENT]`
|
|
114
115
|
|
|
115
|
-
|
|
116
|
+
Build the components of the monorepo
|
|
116
117
|
|
|
117
118
|
```
|
|
118
119
|
USAGE
|
|
119
|
-
$ emb
|
|
120
|
+
$ emb components build [COMPONENT...] [--json] [--flavor <value>]
|
|
120
121
|
|
|
121
122
|
ARGUMENTS
|
|
122
|
-
|
|
123
|
+
COMPONENT... List of components to build
|
|
123
124
|
|
|
124
125
|
FLAGS
|
|
125
|
-
|
|
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
|
-
|
|
132
|
+
Build the components of the monorepo
|
|
135
133
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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
|
-
|
|
144
|
-
$ emb plugins add
|
|
138
|
+
## `emb config print`
|
|
145
139
|
|
|
146
|
-
|
|
147
|
-
Install a plugin from npm registry.
|
|
140
|
+
Print the current config.
|
|
148
141
|
|
|
149
|
-
|
|
142
|
+
```
|
|
143
|
+
USAGE
|
|
144
|
+
$ emb config print [--json] [--flavor <value>]
|
|
150
145
|
|
|
151
|
-
|
|
146
|
+
FLAGS
|
|
147
|
+
--flavor=<value> Specify the flavor to use.
|
|
152
148
|
|
|
153
|
-
|
|
149
|
+
GLOBAL FLAGS
|
|
150
|
+
--json Format output as json.
|
|
154
151
|
|
|
155
|
-
|
|
152
|
+
DESCRIPTION
|
|
153
|
+
Print the current config.
|
|
156
154
|
|
|
157
|
-
|
|
155
|
+
EXAMPLES
|
|
156
|
+
$ emb config print
|
|
158
157
|
```
|
|
159
158
|
|
|
160
|
-
## `emb
|
|
159
|
+
## `emb containers`
|
|
161
160
|
|
|
162
|
-
|
|
161
|
+
List docker containers.
|
|
163
162
|
|
|
164
163
|
```
|
|
165
164
|
USAGE
|
|
166
|
-
$ emb
|
|
167
|
-
|
|
168
|
-
ARGUMENTS
|
|
169
|
-
PLUGIN... [default: .] Plugin to inspect.
|
|
165
|
+
$ emb containers [--json] [-a]
|
|
170
166
|
|
|
171
167
|
FLAGS
|
|
172
|
-
-
|
|
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
|
-
|
|
174
|
+
List docker containers.
|
|
175
|
+
|
|
176
|
+
ALIASES
|
|
177
|
+
$ emb ps
|
|
180
178
|
|
|
181
179
|
EXAMPLES
|
|
182
|
-
$ emb
|
|
180
|
+
$ emb containers
|
|
183
181
|
```
|
|
184
182
|
|
|
185
|
-
|
|
183
|
+
## `emb containers prune`
|
|
186
184
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
Installs a plugin into emb.
|
|
185
|
+
Prune containers.
|
|
190
186
|
|
|
191
187
|
```
|
|
192
188
|
USAGE
|
|
193
|
-
$ emb
|
|
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
|
-
|
|
195
|
+
Prune containers.
|
|
209
196
|
|
|
210
|
-
|
|
197
|
+
EXAMPLES
|
|
198
|
+
$ emb containers prune
|
|
199
|
+
```
|
|
211
200
|
|
|
212
|
-
|
|
201
|
+
## `emb down`
|
|
213
202
|
|
|
214
|
-
|
|
215
|
-
Use the EMB_NPM_REGISTRY environment variable to set the npm registry.
|
|
203
|
+
Stop the whole project.
|
|
216
204
|
|
|
217
|
-
|
|
218
|
-
|
|
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
|
-
|
|
216
|
+
$ emb down
|
|
217
|
+
```
|
|
222
218
|
|
|
223
|
-
|
|
219
|
+
## `emb help [COMMAND]`
|
|
224
220
|
|
|
225
|
-
|
|
221
|
+
Display help for emb.
|
|
226
222
|
|
|
227
|
-
|
|
223
|
+
```
|
|
224
|
+
USAGE
|
|
225
|
+
$ emb help [COMMAND...] [-n]
|
|
228
226
|
|
|
229
|
-
|
|
227
|
+
ARGUMENTS
|
|
228
|
+
COMMAND... Command to show help for.
|
|
230
229
|
|
|
231
|
-
|
|
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-
|
|
237
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.32/src/commands/help.ts)_
|
|
235
238
|
|
|
236
|
-
## `emb
|
|
239
|
+
## `emb images`
|
|
237
240
|
|
|
238
|
-
|
|
241
|
+
List docker images.
|
|
239
242
|
|
|
240
243
|
```
|
|
241
244
|
USAGE
|
|
242
|
-
$ emb
|
|
243
|
-
|
|
244
|
-
ARGUMENTS
|
|
245
|
-
PATH [default: .] path to plugin
|
|
245
|
+
$ emb images [--json] [-a]
|
|
246
246
|
|
|
247
247
|
FLAGS
|
|
248
|
-
-
|
|
249
|
-
|
|
250
|
-
|
|
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
|
-
|
|
254
|
+
List docker images.
|
|
254
255
|
|
|
255
|
-
|
|
256
|
+
EXAMPLES
|
|
257
|
+
$ emb images
|
|
258
|
+
```
|
|
256
259
|
|
|
257
|
-
|
|
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
|
-
|
|
268
|
+
FLAGS
|
|
269
|
+
-f, --force Remove the image even if it is being used by stopped containers or has other tags
|
|
266
270
|
|
|
267
|
-
|
|
271
|
+
GLOBAL FLAGS
|
|
272
|
+
--json Format output as json.
|
|
268
273
|
|
|
269
|
-
|
|
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
|
-
|
|
276
|
-
|
|
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
|
-
-
|
|
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
|
-
|
|
283
|
-
|
|
292
|
+
GLOBAL FLAGS
|
|
293
|
+
--json Format output as json.
|
|
284
294
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
$ emb plugins remove
|
|
295
|
+
DESCRIPTION
|
|
296
|
+
Prune project images.
|
|
288
297
|
|
|
289
298
|
EXAMPLES
|
|
290
|
-
$ emb
|
|
299
|
+
$ emb images prune
|
|
291
300
|
```
|
|
292
301
|
|
|
293
|
-
## `emb
|
|
302
|
+
## `emb ps`
|
|
294
303
|
|
|
295
|
-
|
|
304
|
+
List docker containers.
|
|
296
305
|
|
|
297
306
|
```
|
|
298
307
|
USAGE
|
|
299
|
-
$ emb
|
|
308
|
+
$ emb ps [--json] [-a]
|
|
300
309
|
|
|
301
310
|
FLAGS
|
|
302
|
-
--
|
|
303
|
-
--reinstall Reinstall all plugins after uninstalling.
|
|
304
|
-
```
|
|
311
|
+
-a, --all Retun all containers. By default, only running containers are shown
|
|
305
312
|
|
|
306
|
-
|
|
313
|
+
GLOBAL FLAGS
|
|
314
|
+
--json Format output as json.
|
|
307
315
|
|
|
308
|
-
|
|
316
|
+
DESCRIPTION
|
|
317
|
+
List docker containers.
|
|
309
318
|
|
|
310
|
-
|
|
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
|
|
332
|
+
$ emb run COMPONENT SCRIPT
|
|
315
333
|
|
|
316
334
|
ARGUMENTS
|
|
317
|
-
|
|
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
|
-
|
|
339
|
+
Run an npm script from a component's package.json
|
|
340
|
+
```
|
|
325
341
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
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
|
-
|
|
353
|
+
DESCRIPTION
|
|
354
|
+
List tasks.
|
|
355
|
+
|
|
356
|
+
EXAMPLES
|
|
357
|
+
$ emb tasks
|
|
358
|
+
```
|
|
335
359
|
|
|
336
|
-
## `emb
|
|
360
|
+
## `emb tasks run [TASK]`
|
|
337
361
|
|
|
338
|
-
|
|
362
|
+
Run a task.
|
|
339
363
|
|
|
340
364
|
```
|
|
341
365
|
USAGE
|
|
342
|
-
$ emb
|
|
366
|
+
$ emb tasks run [TASK...] [--json] [-x container|local]
|
|
343
367
|
|
|
344
368
|
ARGUMENTS
|
|
345
|
-
|
|
369
|
+
TASK... List of tasks ids to run (eg: component:task)
|
|
346
370
|
|
|
347
371
|
FLAGS
|
|
348
|
-
-
|
|
349
|
-
-v, --verbose
|
|
372
|
+
-x, --executor=<option> <options: container|local>
|
|
350
373
|
|
|
351
|
-
|
|
352
|
-
|
|
374
|
+
GLOBAL FLAGS
|
|
375
|
+
--json Format output as json.
|
|
353
376
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
$ emb plugins remove
|
|
377
|
+
DESCRIPTION
|
|
378
|
+
Run a task.
|
|
357
379
|
|
|
358
380
|
EXAMPLES
|
|
359
|
-
$ emb
|
|
381
|
+
$ emb tasks run
|
|
360
382
|
```
|
|
361
383
|
|
|
362
|
-
## `emb
|
|
384
|
+
## `emb up`
|
|
363
385
|
|
|
364
|
-
|
|
386
|
+
Start the whole project.
|
|
365
387
|
|
|
366
388
|
```
|
|
367
389
|
USAGE
|
|
368
|
-
$ emb
|
|
390
|
+
$ emb up [--json] [--flavor <value>] [-f]
|
|
369
391
|
|
|
370
392
|
FLAGS
|
|
371
|
-
-
|
|
372
|
-
|
|
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
|
-
|
|
376
|
-
```
|
|
400
|
+
Start the whole project.
|
|
377
401
|
|
|
378
|
-
|
|
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
|
-
|
|
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
|
+
}
|