@modernpoacher/deps 2.0.35 → 2.1.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.
@@ -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,50 @@
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 {
23
+ env: {
24
+ DEBUG = '@modernpoacher/deps*'
25
+ }
26
+ } = process
27
+
28
+ debug.enable(DEBUG)
29
+
30
+ const log = debug('@modernpoacher/deps')
31
+ const error = debug('@modernpoacher/deps:error')
32
+
33
+ const command = (
34
+ PLATFORM === 'win32'
35
+ ? 'bash .\\bin\\bash\\deps.sh'
36
+ : 'bash ./bin/bash/deps.sh'
37
+ )
38
+
39
+ const args = getArgs()
40
+
41
+ const {
42
+ stdout,
43
+ stderr
44
+ } = exec(`${command} ${args}`, getOptions(), (e, v) => {
45
+ if (!e) return log('👍')
46
+ error('👎')
47
+ })
48
+
49
+ stdout.on('data', use('deps-deps'))
50
+ stderr.on('data', use('deps-deps:error'))
@@ -0,0 +1,50 @@
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 {
23
+ env: {
24
+ DEBUG = '@modernpoacher/deps*'
25
+ }
26
+ } = process
27
+
28
+ debug.enable(DEBUG)
29
+
30
+ const log = debug('@modernpoacher/deps')
31
+ const error = debug('@modernpoacher/deps:error')
32
+
33
+ const command = (
34
+ PLATFORM === 'win32'
35
+ ? 'bash .\\bin\\bash\\wipe.sh'
36
+ : 'bash ./bin/bash/wipe.sh'
37
+ )
38
+
39
+ const args = getArgs()
40
+
41
+ const {
42
+ stdout,
43
+ stderr
44
+ } = exec(`${command} ${args}`, getOptions(), (e, v) => {
45
+ if (!e) return log('👍')
46
+ error('👎')
47
+ })
48
+
49
+ stdout.on('data', use('deps-deps'))
50
+ stderr.on('data', use('deps-deps:error'))
@@ -0,0 +1,50 @@
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 {
23
+ env: {
24
+ DEBUG = '@modernpoacher/deps*'
25
+ }
26
+ } = process
27
+
28
+ debug.enable(DEBUG)
29
+
30
+ const log = debug('@modernpoacher/deps')
31
+ const error = debug('@modernpoacher/deps:error')
32
+
33
+ const command = (
34
+ PLATFORM === 'win32'
35
+ ? 'bash .\\bin\\bash\\push.sh'
36
+ : 'bash ./bin/bash/push.sh'
37
+ )
38
+
39
+ const args = getArgs()
40
+
41
+ const {
42
+ stdout,
43
+ stderr
44
+ } = exec(`${command} ${args}`, getOptions(), (e, v) => {
45
+ if (!e) return log('👍')
46
+ error('👎')
47
+ })
48
+
49
+ stdout.on('data', use('deps-deps'))
50
+ stderr.on('data', use('deps-deps:error'))
@@ -0,0 +1,50 @@
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 {
23
+ env: {
24
+ DEBUG = '@modernpoacher/deps*'
25
+ }
26
+ } = process
27
+
28
+ debug.enable(DEBUG)
29
+
30
+ const log = debug('@modernpoacher/deps')
31
+ const error = debug('@modernpoacher/deps:error')
32
+
33
+ const command = (
34
+ PLATFORM === 'win32'
35
+ ? 'bash .\\bin\\bash\\wipe.sh'
36
+ : 'bash ./bin/bash/wipe.sh'
37
+ )
38
+
39
+ const args = getArgs()
40
+
41
+ const {
42
+ stdout,
43
+ stderr
44
+ } = exec(`${command} ${args}`, getOptions(), (e, v) => {
45
+ if (!e) return log('👍')
46
+ error('👎')
47
+ })
48
+
49
+ stdout.on('data', use('deps-deps'))
50
+ 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.35",
3
+ "version": "2.1.1",
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
File without changes
File without changes
File without changes
File without changes