@uscreen.de/dev-service 0.10.2 → 0.11.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 CHANGED
@@ -176,6 +176,12 @@ List running services.
176
176
 
177
177
  Show logs of all or given running services (abort with Ctrl-C).
178
178
 
179
+ ### $ service pull [service]
180
+
181
+ Pulls current images for all or given installed service(s).
182
+
183
+ This action updates already existing images - within the boundaries of the respective service's tag. For updating an image beyond these boundaries, adjust the respective service's tag in your service definition and rerun `service install`.
184
+
179
185
  ## Provided services
180
186
 
181
187
  All provided services use their respective default ports:
@@ -314,9 +320,6 @@ And the folder structure would look like this:
314
320
 
315
321
  ## Roadmap
316
322
 
317
- - make `service check [servicename]` recognize and ignore own services
318
- - add tests for `service check [servicename]`
319
- - add tests for service customization
320
323
  - fix tests to work in gitlab-ci
321
324
  - fix tests to work in parallel
322
325
  - add some examples
@@ -325,6 +328,10 @@ And the folder structure would look like this:
325
328
 
326
329
  > Format according to https://keepachangelog.com
327
330
 
331
+ ### v0.11.0
332
+ #### Added
333
+ - new `service pull` command
334
+
328
335
  ### v0.10.0
329
336
  ##### Added
330
337
  - `service install` options to customize volume naming/creation
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+
3
+ import cli from 'commander'
4
+
5
+ import { version } from '../src/constants.js'
6
+ import { compose, error } from '../src/utils.js'
7
+
8
+ cli
9
+ .version(version)
10
+ .arguments('[service]')
11
+ .action(async (service) => {
12
+ try {
13
+ if (service) {
14
+ await compose('pull', service)
15
+ } else {
16
+ await compose('pull')
17
+ }
18
+ } catch (e) {
19
+ error(e)
20
+ }
21
+ })
22
+
23
+ cli.parse(process.argv)
package/bin/cli.js CHANGED
@@ -23,6 +23,10 @@ cli
23
23
  .command('restart [service]', 'restart all or given installed services')
24
24
  .command('list', 'lists all running services')
25
25
  .command('logs [service]', 'prints logs of all or given running services')
26
+ .command(
27
+ 'pull [service]',
28
+ 'pulls current images for all or given installed services'
29
+ )
26
30
 
27
31
  /**
28
32
  * read args
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uscreen.de/dev-service",
3
- "version": "0.10.2",
3
+ "version": "0.11.3",
4
4
  "description": "cli to manage services in dev repos",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -12,7 +12,8 @@
12
12
  "service-start": "./bin/cli-start.js",
13
13
  "service-stop": "./bin/cli-stop.js",
14
14
  "service-restart": "./bin/cli-restart.js",
15
- "service-check": "./bin/cli-check.js"
15
+ "service-check": "./bin/cli-check.js",
16
+ "service-pull": "./bin/cli-pull.js"
16
17
  },
17
18
  "homepage": "https://github.com/uscreen/dev-service",
18
19
  "repository": {
@@ -25,10 +26,10 @@
25
26
  "node": "^12.20 || ^14.13 || >=15"
26
27
  },
27
28
  "scripts": {
28
- "lint": "eslint '**/*.js' --fix",
29
29
  "test": "c8 --all tap --no-coverage test/**/*.test.js",
30
30
  "test:cov": "c8 --all --reporter html tap --no-coverage test/**/*.test.js && open coverage/index.html",
31
- "test:ci": "c8 --all --reporter text-summary tap --no-coverage test/**/*.test.js"
31
+ "test:ci": "c8 --all --reporter text-summary tap --no-coverage test/**/*.test.js",
32
+ "prepare": "husky install"
32
33
  },
33
34
  "gitHooks": {
34
35
  "pre-commit": "lint-staged"
@@ -38,26 +39,22 @@
38
39
  "src/",
39
40
  "templates"
40
41
  ],
41
- "lint-staged": {
42
- "*.{js}": [
43
- "eslint --fix",
44
- "git add"
45
- ]
46
- },
47
42
  "devDependencies": {
48
- "@uscreen.de/eslint-config-prettystandard-node": "^0.1.4",
49
- "lint-staged": "^11.1.1",
50
- "prettier": "^2.3.2",
51
- "tap": "^15.0.2",
52
- "yorkie": "^2.0.0"
43
+ "@uscreen.de/eslint-config-prettystandard-node": "^0.2.1",
44
+ "husky": ">=6",
45
+ "lint-staged": ">=12.1.7",
46
+ "tap": "^15.1.6"
53
47
  },
54
48
  "dependencies": {
55
- "c8": "^7.8.0",
49
+ "c8": "^7.11.0",
56
50
  "commander": "^8.1.0",
57
51
  "fs-extra": "^10.0.0",
58
52
  "nanoid": "^3.1.23",
59
- "parse-json": "^5.2.0",
60
- "read-pkg": "^6.0.0",
53
+ "parse-json": "^6.0.2",
54
+ "read-pkg": "^7.0.0",
61
55
  "yaml": "^1.10.2"
56
+ },
57
+ "lint-staged": {
58
+ "*.js": "eslint --cache --fix"
62
59
  }
63
60
  }