@enspirit/emb 0.0.3 → 0.0.4

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.0.3 darwin-x64 node-v22.12.0
17
+ @enspirit/emb/0.0.4 darwin-x64 node-v22.12.0
18
18
  $ emb --help [COMMAND]
19
19
  USAGE
20
20
  $ emb COMMAND
@@ -2,6 +2,7 @@ import { Ajv } from 'ajv';
2
2
  import { readFile, stat } from 'node:fs/promises';
3
3
  import yaml from 'yaml';
4
4
  import { toProjectConfig } from './convert.js';
5
+ import configSchema from './schema.json' with { type: 'json' };
5
6
  export const validateUserConfig = async (pathOrObject) => {
6
7
  const ajv = new Ajv();
7
8
  let userConfig;
@@ -17,11 +18,9 @@ export const validateUserConfig = async (pathOrObject) => {
17
18
  else {
18
19
  userConfig = pathOrObject;
19
20
  }
20
- /*
21
21
  if (!ajv.validate(configSchema, userConfig)) {
22
- ajv.errors!.forEach((err) => console.error(err));
23
- throw new Error(`Your .emb.yml is incorrect`);
22
+ ajv.errors.forEach((err) => console.error(err));
23
+ throw new Error(`Your .emb.yml is incorrect`);
24
24
  }
25
- */
26
25
  return toProjectConfig(userConfig);
27
26
  };
@@ -204,10 +204,12 @@
204
204
  "index.js"
205
205
  ]
206
206
  },
207
- "config:print": {
208
- "aliases": [],
207
+ "containers": {
208
+ "aliases": [
209
+ "ps"
210
+ ],
209
211
  "args": {},
210
- "description": "Print the current config.",
212
+ "description": "List docker containers.",
211
213
  "examples": [
212
214
  "<%= config.bin %> <%= command.id %>"
213
215
  ],
@@ -219,18 +221,18 @@
219
221
  "allowNo": false,
220
222
  "type": "boolean"
221
223
  },
222
- "flavor": {
223
- "description": "Specify the flavor to use.",
224
- "name": "flavor",
224
+ "all": {
225
+ "char": "a",
226
+ "description": "Retun all containers. By default, only running containers are shown",
227
+ "name": "all",
225
228
  "required": false,
226
- "hasDynamicHelp": false,
227
- "multiple": false,
228
- "type": "option"
229
+ "allowNo": false,
230
+ "type": "boolean"
229
231
  }
230
232
  },
231
233
  "hasDynamicHelp": false,
232
234
  "hiddenAliases": [],
233
- "id": "config:print",
235
+ "id": "containers",
234
236
  "pluginAlias": "@enspirit/emb",
235
237
  "pluginName": "@enspirit/emb",
236
238
  "pluginType": "core",
@@ -242,16 +244,14 @@
242
244
  "src",
243
245
  "cli",
244
246
  "commands",
245
- "config",
246
- "print.js"
247
+ "containers",
248
+ "index.js"
247
249
  ]
248
250
  },
249
- "containers": {
250
- "aliases": [
251
- "ps"
252
- ],
251
+ "containers:prune": {
252
+ "aliases": [],
253
253
  "args": {},
254
- "description": "List docker containers.",
254
+ "description": "Prune containers.",
255
255
  "examples": [
256
256
  "<%= config.bin %> <%= command.id %>"
257
257
  ],
@@ -262,19 +262,11 @@
262
262
  "name": "json",
263
263
  "allowNo": false,
264
264
  "type": "boolean"
265
- },
266
- "all": {
267
- "char": "a",
268
- "description": "Retun all containers. By default, only running containers are shown",
269
- "name": "all",
270
- "required": false,
271
- "allowNo": false,
272
- "type": "boolean"
273
265
  }
274
266
  },
275
267
  "hasDynamicHelp": false,
276
268
  "hiddenAliases": [],
277
- "id": "containers",
269
+ "id": "containers:prune",
278
270
  "pluginAlias": "@enspirit/emb",
279
271
  "pluginName": "@enspirit/emb",
280
272
  "pluginType": "core",
@@ -287,13 +279,13 @@
287
279
  "cli",
288
280
  "commands",
289
281
  "containers",
290
- "index.js"
282
+ "prune.js"
291
283
  ]
292
284
  },
293
- "containers:prune": {
285
+ "config:print": {
294
286
  "aliases": [],
295
287
  "args": {},
296
- "description": "Prune containers.",
288
+ "description": "Print the current config.",
297
289
  "examples": [
298
290
  "<%= config.bin %> <%= command.id %>"
299
291
  ],
@@ -304,11 +296,19 @@
304
296
  "name": "json",
305
297
  "allowNo": false,
306
298
  "type": "boolean"
299
+ },
300
+ "flavor": {
301
+ "description": "Specify the flavor to use.",
302
+ "name": "flavor",
303
+ "required": false,
304
+ "hasDynamicHelp": false,
305
+ "multiple": false,
306
+ "type": "option"
307
307
  }
308
308
  },
309
309
  "hasDynamicHelp": false,
310
310
  "hiddenAliases": [],
311
- "id": "containers:prune",
311
+ "id": "config:print",
312
312
  "pluginAlias": "@enspirit/emb",
313
313
  "pluginName": "@enspirit/emb",
314
314
  "pluginType": "core",
@@ -320,8 +320,42 @@
320
320
  "src",
321
321
  "cli",
322
322
  "commands",
323
- "containers",
324
- "prune.js"
323
+ "config",
324
+ "print.js"
325
+ ]
326
+ },
327
+ "run": {
328
+ "aliases": [],
329
+ "args": {
330
+ "component": {
331
+ "description": "Component name",
332
+ "name": "component",
333
+ "required": true
334
+ },
335
+ "script": {
336
+ "description": "NPM script to run",
337
+ "name": "script",
338
+ "required": true
339
+ }
340
+ },
341
+ "description": "Run an npm script from a component's package.json",
342
+ "flags": {},
343
+ "hasDynamicHelp": false,
344
+ "hiddenAliases": [],
345
+ "id": "run",
346
+ "pluginAlias": "@enspirit/emb",
347
+ "pluginName": "@enspirit/emb",
348
+ "pluginType": "core",
349
+ "strict": true,
350
+ "enableJsonFlag": false,
351
+ "isESM": true,
352
+ "relativePath": [
353
+ "dist",
354
+ "src",
355
+ "cli",
356
+ "commands",
357
+ "run",
358
+ "index.js"
325
359
  ]
326
360
  },
327
361
  "images:delete": {
@@ -534,41 +568,7 @@
534
568
  "tasks",
535
569
  "run.js"
536
570
  ]
537
- },
538
- "run": {
539
- "aliases": [],
540
- "args": {
541
- "component": {
542
- "description": "Component name",
543
- "name": "component",
544
- "required": true
545
- },
546
- "script": {
547
- "description": "NPM script to run",
548
- "name": "script",
549
- "required": true
550
- }
551
- },
552
- "description": "Run an npm script from a component's package.json",
553
- "flags": {},
554
- "hasDynamicHelp": false,
555
- "hiddenAliases": [],
556
- "id": "run",
557
- "pluginAlias": "@enspirit/emb",
558
- "pluginName": "@enspirit/emb",
559
- "pluginType": "core",
560
- "strict": true,
561
- "enableJsonFlag": false,
562
- "isESM": true,
563
- "relativePath": [
564
- "dist",
565
- "src",
566
- "cli",
567
- "commands",
568
- "run",
569
- "index.js"
570
- ]
571
571
  }
572
572
  },
573
- "version": "0.0.3"
573
+ "version": "0.0.4"
574
574
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@enspirit/emb",
3
3
  "type": "module",
4
- "version": "0.0.3",
4
+ "version": "0.0.4",
5
5
  "keywords": ["monorepo", "docker", "taskrunner", "ci", "docker compose", "sentinel", "makefile"],
6
6
  "author": "Louis Lambeau <louis.lambeau@enspirit.be>",
7
7
  "license": "ISC",
@@ -20,7 +20,6 @@
20
20
  "pack:macos": "oclif pack macos",
21
21
  "pack:deb": "oclif pack deb",
22
22
  "postpack": "shx rm -f oclif.manifest.json",
23
- "postbuild": "oclif manifest --dir dist",
24
23
  "posttest": "npm run lint",
25
24
  "prepack": "oclif manifest && oclif readme",
26
25
  "test": "npm run build:types && npm run test:unit",