@modernpoacher/deps 2.0.34 → 2.1.0

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.
@@ -94,7 +94,7 @@ function execute {
94
94
  HOME=$PWD
95
95
 
96
96
  echo
97
- echo -e "\033[0;32mStarting `deps` ...\033[0m" # "Starting ..."
97
+ echo -e "\033[0;32mStarting \`deps\` ...\033[0m" # "Starting ..."
98
98
 
99
99
  for flag in "$@";
100
100
  do
@@ -150,7 +150,7 @@ function execute {
150
150
  HOME=$PWD
151
151
 
152
152
  echo
153
- echo -e "\033[0;32mStarting `deps-head` ...\033[0m" # "Starting ..."
153
+ echo -e "\033[0;32mStarting \`deps-head\` ...\033[0m" # "Starting ..."
154
154
 
155
155
  for flag in "$@";
156
156
  do
@@ -77,7 +77,7 @@ function execute {
77
77
  HOME=$PWD
78
78
 
79
79
  echo
80
- echo -e "\033[0;32mStarting `deps-push` ...\033[0m" # "Starting ..."
80
+ echo -e "\033[0;32mStarting \`deps-push\` ...\033[0m" # "Starting ..."
81
81
 
82
82
  for flag in "$@";
83
83
  do
@@ -78,7 +78,7 @@ function execute {
78
78
  HOME=$PWD
79
79
 
80
80
  echo
81
- echo -e "\033[0;32mStarting `deps-wipe` ...\033[0m" # "Starting ..."
81
+ echo -e "\033[0;32mStarting \`deps-wipe\` ...\033[0m" # "Starting ..."
82
82
 
83
83
  for flag in "$@";
84
84
  do
@@ -2,6 +2,10 @@
2
2
 
3
3
  import debug from 'debug'
4
4
 
5
+ import {
6
+ argv
7
+ } from 'node:process'
8
+
5
9
  import {
6
10
  exec
7
11
  } from 'node:child_process'
@@ -42,6 +46,8 @@ const log = debug('@modernpoacher/deps')
42
46
 
43
47
  log(`\`common\` (${VERSION} - ${PLATFORM}) is awake`)
44
48
 
49
+ const ARGV = argv.slice(2)
50
+
45
51
  const CODE = 0
46
52
 
47
53
  const MESSAGE = 'Either no error message has been defined or no error has been supplied'
@@ -74,7 +80,16 @@ const getDepsCommands = PLATFORM === 'win32'
74
80
  ${getExportPath(getNvm(getRegistryParameter(registry, getForceParameter(force, 'deps'))))}
75
81
  `)
76
82
 
77
- function use (key) {
83
+ export function getArgs () {
84
+ return (
85
+ ARGV
86
+ .join(
87
+ String.fromCodePoint(32)
88
+ )
89
+ )
90
+ }
91
+
92
+ export function use (key) {
78
93
  const log = debug(`@modernpoacher/deps:${key}`)
79
94
 
80
95
  return function use (v) {
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env node
2
+
3
+ import debug from 'debug'
4
+
5
+ import {
6
+ exec
7
+ } from 'node:child_process'
8
+
9
+ import {
10
+ getArgs,
11
+ use
12
+ } from '#deps/bin/common'
13
+
14
+ import {
15
+ getOptions
16
+ } from '#deps/src/common'
17
+
18
+ import {
19
+ PLATFORM
20
+ } from '#deps/src/common/env'
21
+
22
+ const log = debug('@modernpoacher/deps')
23
+ const error = debug('@modernpoacher/deps:error')
24
+
25
+ const command = (
26
+ PLATFORM === 'win32'
27
+ ? 'bash .\\bin\\bash\\deps.sh'
28
+ : 'bash ./bin/bash/deps.sh'
29
+ )
30
+
31
+ const args = getArgs()
32
+
33
+ const {
34
+ stdout,
35
+ stderr
36
+ } = exec(`${command} ${args}`, getOptions(), (e, v) => {
37
+ if (!e) return log('👍')
38
+ error('👎')
39
+ })
40
+
41
+ stdout.on('data', use('deps-deps'))
42
+ stderr.on('data', use('deps-deps:error'))
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env node
2
+
3
+ import debug from 'debug'
4
+
5
+ import {
6
+ exec
7
+ } from 'node:child_process'
8
+
9
+ import {
10
+ getArgs,
11
+ use
12
+ } from '#deps/bin/common'
13
+
14
+ import {
15
+ getOptions
16
+ } from '#deps/src/common'
17
+
18
+ import {
19
+ PLATFORM
20
+ } from '#deps/src/common/env'
21
+
22
+ const log = debug('@modernpoacher/deps')
23
+ const error = debug('@modernpoacher/deps:error')
24
+
25
+ const command = (
26
+ PLATFORM === 'win32'
27
+ ? 'bash .\\bin\\bash\\wipe.sh'
28
+ : 'bash ./bin/bash/wipe.sh'
29
+ )
30
+
31
+ const args = getArgs()
32
+
33
+ const {
34
+ stdout,
35
+ stderr
36
+ } = exec(`${command} ${args}`, getOptions(), (e, v) => {
37
+ if (!e) return log('👍')
38
+ error('👎')
39
+ })
40
+
41
+ stdout.on('data', use('deps-deps'))
42
+ stderr.on('data', use('deps-deps:error'))
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env node
2
+
3
+ import debug from 'debug'
4
+
5
+ import {
6
+ exec
7
+ } from 'node:child_process'
8
+
9
+ import {
10
+ getArgs,
11
+ use
12
+ } from '#deps/bin/common'
13
+
14
+ import {
15
+ getOptions
16
+ } from '#deps/src/common'
17
+
18
+ import {
19
+ PLATFORM
20
+ } from '#deps/src/common/env'
21
+
22
+ const log = debug('@modernpoacher/deps')
23
+ const error = debug('@modernpoacher/deps:error')
24
+
25
+ const command = (
26
+ PLATFORM === 'win32'
27
+ ? 'bash .\\bin\\bash\\push.sh'
28
+ : 'bash ./bin/bash/push.sh'
29
+ )
30
+
31
+ const args = getArgs()
32
+
33
+ const {
34
+ stdout,
35
+ stderr
36
+ } = exec(`${command} ${args}`, getOptions(), (e, v) => {
37
+ if (!e) return log('👍')
38
+ error('👎')
39
+ })
40
+
41
+ stdout.on('data', use('deps-deps'))
42
+ stderr.on('data', use('deps-deps:error'))
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env node
2
+
3
+ import debug from 'debug'
4
+
5
+ import {
6
+ exec
7
+ } from 'node:child_process'
8
+
9
+ import {
10
+ getArgs,
11
+ use
12
+ } from '#deps/bin/common'
13
+
14
+ import {
15
+ getOptions
16
+ } from '#deps/src/common'
17
+
18
+ import {
19
+ PLATFORM
20
+ } from '#deps/src/common/env'
21
+
22
+ const log = debug('@modernpoacher/deps')
23
+ const error = debug('@modernpoacher/deps:error')
24
+
25
+ const command = (
26
+ PLATFORM === 'win32'
27
+ ? 'bash .\\bin\\bash\\wipe.sh'
28
+ : 'bash ./bin/bash/wipe.sh'
29
+ )
30
+
31
+ const args = getArgs()
32
+
33
+ const {
34
+ stdout,
35
+ stderr
36
+ } = exec(`${command} ${args}`, getOptions(), (e, v) => {
37
+ if (!e) return log('👍')
38
+ error('👎')
39
+ })
40
+
41
+ stdout.on('data', use('deps-deps'))
42
+ stderr.on('data', use('deps-deps:error'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/deps",
3
- "version": "2.0.34",
3
+ "version": "2.1.0",
4
4
  "description": "Update NPM package dependencies from the command line",
5
5
  "keywords": [
6
6
  "deps",
@@ -30,28 +30,26 @@
30
30
  "url": "https://github.com/modernpoacher/deps/issues"
31
31
  },
32
32
  "scripts": {
33
- "deps": "cross-env DEBUG_COLORS=yes NODE_ENV=production node bin/app.mjs",
34
- "deps-deps": "cross-env DEBUG_COLORS=yes NODE_ENV=production bash bin/deps.sh",
35
- "deps-execute": "cross-env DEBUG_COLORS=yes NODE_ENV=production node bin/execute/app.mjs",
36
- "deps-head": "cross-env DEBUG_COLORS=yes NODE_ENV=production bash bin/head.sh",
37
- "deps-install": "cross-env DEBUG_COLORS=yes NODE_ENV=production node bin/install/app.mjs",
38
- "deps-push": "cross-env DEBUG_COLORS=yes NODE_ENV=production bash bin/push.sh",
39
- "deps-wipe": "cross-env DEBUG_COLORS=yes NODE_ENV=production bash bin/wipe.sh",
40
- "dev": "cross-env DEBUG_COLORS=yes NODE_ENV=development node bin/app.mjs",
41
- "dev-install": "cross-env DEBUG_COLORS=yes NODE_ENV=development node bin/install/app.mjs",
33
+ "deps": "cross-env DEBUG_COLORS=yes NODE_ENV=production node bin/deps.mjs",
34
+ "deps-deps": "cross-env DEBUG_COLORS=yes NODE_ENV=production node bin/deps/deps.mjs",
35
+ "deps-execute": "cross-env DEBUG_COLORS=yes NODE_ENV=production node bin/deps/execute.mjs",
36
+ "deps-head": "cross-env DEBUG_COLORS=yes NODE_ENV=production node bin/deps/head.mjs",
37
+ "deps-install": "cross-env DEBUG_COLORS=yes NODE_ENV=production node bin/deps/install.mjs",
38
+ "deps-push": "cross-env DEBUG_COLORS=yes NODE_ENV=production node bin/deps/push.mjs",
39
+ "deps-wipe": "cross-env DEBUG_COLORS=yes NODE_ENV=production node bin/deps/wipe.mjs",
42
40
  "lint": "eslint . --ext .mjs,.cjs",
43
41
  "lint:fix": "npm run lint -- --fix",
44
- "start": "cross-env DEBUG_COLORS=yes NODE_ENV=production node bin/app.mjs",
42
+ "start": "npm run deps",
45
43
  "test": "cross-env DEBUG_COLORS=yes NODE_ENV=test mocha test --recursive --verbose --color"
46
44
  },
47
45
  "bin": {
48
- "deps": "bin/app.mjs",
49
- "deps-deps": "bin/deps.sh",
50
- "deps-execute": "bin/execute/app.mjs",
51
- "deps-head": "bin/head.sh",
52
- "deps-install": "bin/install/app.mjs",
53
- "deps-push": "bin/push.sh",
54
- "deps-wipe": "bin/wipe.sh"
46
+ "deps": "bin/deps.mjs",
47
+ "deps-deps": "bin/deps/deps.mjs",
48
+ "deps-execute": "bin/deps/execute.mjs",
49
+ "deps-head": "bin/deps/head.mjs",
50
+ "deps-install": "bin/deps/install.mjs",
51
+ "deps-push": "bin/deps/push.mjs",
52
+ "deps-wipe": "bin/deps/wipe.mjs"
55
53
  },
56
54
  "dependencies": {
57
55
  "commander": "^12.1.0",
File without changes
File without changes
File without changes