@enspirit/emb 0.0.1

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 ADDED
@@ -0,0 +1,379 @@
1
+ emb (Enspirit's Monorepo Builder)
2
+ =================
3
+
4
+ A CLI to help on Enspirit monorepos. This aims at replacing our aging [Makefile for monorepos](https://github.com/enspirit/makefile-for-monorepos/pulls)
5
+
6
+ <!-- toc -->
7
+ * [Usage](#usage)
8
+ * [Commands](#commands)
9
+ <!-- tocstop -->
10
+ # Usage
11
+ <!-- usage -->
12
+ ```sh-session
13
+ $ npm install -g @enspirit/emb
14
+ $ emb COMMAND
15
+ running command...
16
+ $ emb (--version)
17
+ @enspirit/emb/0.0.1 darwin-x64 node-v22.12.0
18
+ $ emb --help [COMMAND]
19
+ USAGE
20
+ $ emb COMMAND
21
+ ...
22
+ ```
23
+ <!-- usagestop -->
24
+ # Commands
25
+ <!-- commands -->
26
+ * [`emb autocomplete [SHELL]`](#emb-autocomplete-shell)
27
+ * [`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)
38
+
39
+ ## `emb autocomplete [SHELL]`
40
+
41
+ Display autocomplete installation instructions.
42
+
43
+ ```
44
+ USAGE
45
+ $ emb autocomplete [SHELL] [-r]
46
+
47
+ ARGUMENTS
48
+ SHELL (zsh|bash|powershell) Shell type
49
+
50
+ FLAGS
51
+ -r, --refresh-cache Refresh cache (ignores displaying instructions)
52
+
53
+ DESCRIPTION
54
+ Display autocomplete installation instructions.
55
+
56
+ EXAMPLES
57
+ $ emb autocomplete
58
+
59
+ $ emb autocomplete bash
60
+
61
+ $ emb autocomplete zsh
62
+
63
+ $ emb autocomplete powershell
64
+
65
+ $ emb autocomplete --refresh-cache
66
+ ```
67
+
68
+ _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.34/src/commands/autocomplete/index.ts)_
69
+
70
+ ## `emb help [COMMAND]`
71
+
72
+ Display help for emb.
73
+
74
+ ```
75
+ USAGE
76
+ $ emb help [COMMAND...] [-n]
77
+
78
+ ARGUMENTS
79
+ COMMAND... Command to show help for.
80
+
81
+ FLAGS
82
+ -n, --nested-commands Include all nested commands in the output.
83
+
84
+ DESCRIPTION
85
+ Display help for emb.
86
+ ```
87
+
88
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.32/src/commands/help.ts)_
89
+
90
+ ## `emb plugins`
91
+
92
+ List installed plugins.
93
+
94
+ ```
95
+ USAGE
96
+ $ emb plugins [--json] [--core]
97
+
98
+ FLAGS
99
+ --core Show core plugins.
100
+
101
+ GLOBAL FLAGS
102
+ --json Format output as json.
103
+
104
+ DESCRIPTION
105
+ List installed plugins.
106
+
107
+ EXAMPLES
108
+ $ emb plugins
109
+ ```
110
+
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
+
115
+ Installs a plugin into emb.
116
+
117
+ ```
118
+ USAGE
119
+ $ emb plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]
120
+
121
+ ARGUMENTS
122
+ PLUGIN... Plugin to install.
123
+
124
+ 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.
129
+
130
+ GLOBAL FLAGS
131
+ --json Format output as json.
132
+
133
+ DESCRIPTION
134
+ Installs a plugin into emb.
135
+
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.
142
+
143
+ ALIASES
144
+ $ emb plugins add
145
+
146
+ EXAMPLES
147
+ Install a plugin from npm registry.
148
+
149
+ $ emb plugins add myplugin
150
+
151
+ Install a plugin from a github url.
152
+
153
+ $ emb plugins add https://github.com/someuser/someplugin
154
+
155
+ Install a plugin from a github slug.
156
+
157
+ $ emb plugins add someuser/someplugin
158
+ ```
159
+
160
+ ## `emb plugins:inspect PLUGIN...`
161
+
162
+ Displays installation properties of a plugin.
163
+
164
+ ```
165
+ USAGE
166
+ $ emb plugins inspect PLUGIN...
167
+
168
+ ARGUMENTS
169
+ PLUGIN... [default: .] Plugin to inspect.
170
+
171
+ FLAGS
172
+ -h, --help Show CLI help.
173
+ -v, --verbose
174
+
175
+ GLOBAL FLAGS
176
+ --json Format output as json.
177
+
178
+ DESCRIPTION
179
+ Displays installation properties of a plugin.
180
+
181
+ EXAMPLES
182
+ $ emb plugins inspect myplugin
183
+ ```
184
+
185
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/inspect.ts)_
186
+
187
+ ## `emb plugins install PLUGIN`
188
+
189
+ Installs a plugin into emb.
190
+
191
+ ```
192
+ 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.
203
+
204
+ GLOBAL FLAGS
205
+ --json Format output as json.
206
+
207
+ DESCRIPTION
208
+ Installs a plugin into emb.
209
+
210
+ Uses npm to install plugins.
211
+
212
+ Installation of a user-installed plugin will override a core plugin.
213
+
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.
216
+
217
+ ALIASES
218
+ $ emb plugins add
219
+
220
+ EXAMPLES
221
+ Install a plugin from npm registry.
222
+
223
+ $ emb plugins install myplugin
224
+
225
+ Install a plugin from a github url.
226
+
227
+ $ emb plugins install https://github.com/someuser/someplugin
228
+
229
+ Install a plugin from a github slug.
230
+
231
+ $ emb plugins install someuser/someplugin
232
+ ```
233
+
234
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/install.ts)_
235
+
236
+ ## `emb plugins link PATH`
237
+
238
+ Links a plugin into the CLI for development.
239
+
240
+ ```
241
+ USAGE
242
+ $ emb plugins link PATH [-h] [--install] [-v]
243
+
244
+ ARGUMENTS
245
+ PATH [default: .] path to plugin
246
+
247
+ FLAGS
248
+ -h, --help Show CLI help.
249
+ -v, --verbose
250
+ --[no-]install Install dependencies after linking the plugin.
251
+
252
+ DESCRIPTION
253
+ Links a plugin into the CLI for development.
254
+
255
+ Installation of a linked plugin will override a user-installed or core plugin.
256
+
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.
259
+
260
+
261
+ EXAMPLES
262
+ $ emb plugins link myplugin
263
+ ```
264
+
265
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/link.ts)_
266
+
267
+ ## `emb plugins remove [PLUGIN]`
268
+
269
+ Removes a plugin from the CLI.
270
+
271
+ ```
272
+ USAGE
273
+ $ emb plugins remove [PLUGIN...] [-h] [-v]
274
+
275
+ ARGUMENTS
276
+ PLUGIN... plugin to uninstall
277
+
278
+ FLAGS
279
+ -h, --help Show CLI help.
280
+ -v, --verbose
281
+
282
+ DESCRIPTION
283
+ Removes a plugin from the CLI.
284
+
285
+ ALIASES
286
+ $ emb plugins unlink
287
+ $ emb plugins remove
288
+
289
+ EXAMPLES
290
+ $ emb plugins remove myplugin
291
+ ```
292
+
293
+ ## `emb plugins reset`
294
+
295
+ Remove all user-installed and linked plugins.
296
+
297
+ ```
298
+ USAGE
299
+ $ emb plugins reset [--hard] [--reinstall]
300
+
301
+ FLAGS
302
+ --hard Delete node_modules and package manager related files in addition to uninstalling plugins.
303
+ --reinstall Reinstall all plugins after uninstalling.
304
+ ```
305
+
306
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/reset.ts)_
307
+
308
+ ## `emb plugins uninstall [PLUGIN]`
309
+
310
+ Removes a plugin from the CLI.
311
+
312
+ ```
313
+ USAGE
314
+ $ emb plugins uninstall [PLUGIN...] [-h] [-v]
315
+
316
+ ARGUMENTS
317
+ PLUGIN... plugin to uninstall
318
+
319
+ FLAGS
320
+ -h, --help Show CLI help.
321
+ -v, --verbose
322
+
323
+ DESCRIPTION
324
+ Removes a plugin from the CLI.
325
+
326
+ ALIASES
327
+ $ emb plugins unlink
328
+ $ emb plugins remove
329
+
330
+ EXAMPLES
331
+ $ emb plugins uninstall myplugin
332
+ ```
333
+
334
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/uninstall.ts)_
335
+
336
+ ## `emb plugins unlink [PLUGIN]`
337
+
338
+ Removes a plugin from the CLI.
339
+
340
+ ```
341
+ USAGE
342
+ $ emb plugins unlink [PLUGIN...] [-h] [-v]
343
+
344
+ ARGUMENTS
345
+ PLUGIN... plugin to uninstall
346
+
347
+ FLAGS
348
+ -h, --help Show CLI help.
349
+ -v, --verbose
350
+
351
+ DESCRIPTION
352
+ Removes a plugin from the CLI.
353
+
354
+ ALIASES
355
+ $ emb plugins unlink
356
+ $ emb plugins remove
357
+
358
+ EXAMPLES
359
+ $ emb plugins unlink myplugin
360
+ ```
361
+
362
+ ## `emb plugins update`
363
+
364
+ Update installed plugins.
365
+
366
+ ```
367
+ USAGE
368
+ $ emb plugins update [-h] [-v]
369
+
370
+ FLAGS
371
+ -h, --help Show CLI help.
372
+ -v, --verbose
373
+
374
+ DESCRIPTION
375
+ Update installed plugins.
376
+ ```
377
+
378
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/update.ts)_
379
+ <!-- commandsstop -->
package/bin/dev.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\dev" %*
package/bin/dev.js ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env -S node --loader ts-node/esm --disable-warning=ExperimentalWarning
2
+
3
+ import { execute } from '@oclif/core';
4
+
5
+ await execute({ development: true, dir: import.meta.url });
package/bin/run.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\run" %*
package/bin/run.js ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execute } from '@oclif/core';
4
+
5
+ await execute({ dir: import.meta.url });
@@ -0,0 +1,4 @@
1
+ {
2
+ "commands": {},
3
+ "version": "0.0.1"
4
+ }
package/package.json ADDED
@@ -0,0 +1,112 @@
1
+ {
2
+ "name": "@enspirit/emb",
3
+ "type": "module",
4
+ "version": "0.0.1",
5
+ "keywords": ["monorepo", "docker", "taskrunner", "ci", "docker compose", "sentinel", "makefile"],
6
+ "author": "Louis Lambeau <louis.lambeau@enspirit.be>",
7
+ "license": "ISC",
8
+ "description": "A replacement for our Makefile-for-monorepos",
9
+ "bin": {
10
+ "emb": "./bin/run.js"
11
+ },
12
+ "scripts": {
13
+ "build": "rimraf dist && npm run build:types && npm run build:ts && npm run copy:proto",
14
+ "copy:proto": "cp -r src/docker/protobuf/*.proto dist/src/docker/protobuf/",
15
+ "build:ts": "tsc -b && tsc-alias",
16
+ "build:types": "json2ts src/config/schema.json > src/config/schema.ts",
17
+ "lint": "eslint",
18
+ "pack": "npm run pack:macos && npm run pack:deb",
19
+ "pack:macos": "oclif pack macos",
20
+ "pack:deb": "oclif pack deb",
21
+ "postpack": "shx rm -f oclif.manifest.json",
22
+ "posttest": "npm run lint",
23
+ "prepack": "oclif manifest && oclif readme",
24
+ "test": "npm run build:types && npm run test:unit",
25
+ "test:unit": "vitest run tests/unit",
26
+ "test:integration": "vitest run tests/integration",
27
+ "test:watch": "vitest",
28
+ "version": "oclif readme && git add README.md"
29
+ },
30
+ "dependencies": {
31
+ "@listr2/manager": "^3.0.1",
32
+ "@oclif/core": "^4.5.2",
33
+ "@oclif/plugin-autocomplete": "^3.2.34",
34
+ "@oclif/plugin-help": "^6.2.32",
35
+ "@oclif/plugin-not-found": "^3.2.63",
36
+ "@oclif/plugin-plugins": "^5.4.46",
37
+ "@oclif/table": "^0.4.12",
38
+ "ajv": "^8.17.1",
39
+ "docker-compose": "^1.2.0",
40
+ "dockerode": "^4.0.7",
41
+ "dotenv": "^17.2.1",
42
+ "execa": "^9.6.0",
43
+ "find-up": "^7.0.0",
44
+ "glob": "^11.0.3",
45
+ "graphlib": "^2.1.8",
46
+ "listr2": "^9.0.1",
47
+ "luxon": "^3.7.1",
48
+ "protobufjs": "^7.5.3",
49
+ "simple-git": "^3.28.0",
50
+ "yaml": "^2.8.1"
51
+ },
52
+ "devDependencies": {
53
+ "@eslint/eslintrc": "^3.3.1",
54
+ "@eslint/js": "^9.32.0",
55
+ "@fastify/deepmerge": "^3.1.0",
56
+ "@oclif/prettier-config": "^0.2.1",
57
+ "@oclif/test": "^4",
58
+ "@tsconfig/node20": "^20.1.6",
59
+ "@types/dockerode": "^3.3.42",
60
+ "@types/graphlib": "^2.1.12",
61
+ "@types/luxon": "^3.7.1",
62
+ "@types/node": "^24.2.0",
63
+ "@typescript-eslint/eslint-plugin": "^8.39.0",
64
+ "@typescript-eslint/parser": "^8.39.0",
65
+ "eslint": "^9.32.0",
66
+ "eslint-config-oclif": "^6",
67
+ "eslint-config-prettier": "^10.1.8",
68
+ "eslint-plugin-prettier": "^5.5.3",
69
+ "json-schema-to-typescript": "^15.0.4",
70
+ "oclif": "^4",
71
+ "prettier": "^3.6.2",
72
+ "rimraf": "^6.0.1",
73
+ "shx": "^0.4.0",
74
+ "ts-node": "^10.9.2",
75
+ "tsc-alias": "^1.8.16",
76
+ "tsx": "^4.20.3",
77
+ "typescript": "^5.9.2",
78
+ "vitest": "^3.2.4"
79
+ },
80
+ "engines": {
81
+ "node": ">=20.0.0"
82
+ },
83
+ "files": [
84
+ "./bin",
85
+ "./dist/src",
86
+ "./oclif.manifest.json"
87
+ ],
88
+ "main": "dist/src/index.js",
89
+ "oclif": {
90
+ "bin": "emb",
91
+ "dirname": "emb",
92
+ "commands": "./dist/src/cli/commands",
93
+ "hooks": {
94
+ "init": "./dist/src/cli/hooks/init"
95
+ },
96
+ "macos": {
97
+ "identifier": "dev.enspirit.emb"
98
+ },
99
+ "plugins": [
100
+ "@oclif/plugin-help",
101
+ "@oclif/plugin-autocomplete",
102
+ "@oclif/plugin-not-found",
103
+ "@oclif/plugin-plugins"
104
+ ],
105
+ "topicSeparator": " ",
106
+ "topics": {
107
+ "hello": {
108
+ "description": "Say hello to the world and others"
109
+ }
110
+ }
111
+ }
112
+ }