@modernpoacher/deps 2.1.3 → 2.1.5
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/bin/common/index.mjs +9 -5
- package/bin/deps/deps.mjs +11 -10
- package/bin/deps/head.mjs +13 -12
- package/bin/deps/push.mjs +13 -12
- package/bin/deps/wipe.mjs +13 -12
- package/package.json +1 -1
package/bin/common/index.mjs
CHANGED
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
} from '#deps/src/common'
|
|
44
44
|
|
|
45
45
|
const log = debug('@modernpoacher/deps')
|
|
46
|
+
const error = debug('@modernpoacher/deps:error')
|
|
46
47
|
|
|
47
48
|
log(`\`common\` (${VERSION} - ${PLATFORM}) is awake`)
|
|
48
49
|
|
|
@@ -100,15 +101,19 @@ export function use (key) {
|
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
function handleError (e = {}) {
|
|
104
|
+
export function handleError (e = {}) {
|
|
104
105
|
const {
|
|
105
106
|
code = CODE,
|
|
106
107
|
message = MESSAGE
|
|
107
108
|
} = e
|
|
108
109
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
if (code > 1) error(code)
|
|
111
|
+
error(message)
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function handleComplete (e) {
|
|
115
|
+
if (!e) return log('👍')
|
|
116
|
+
error('👎')
|
|
112
117
|
}
|
|
113
118
|
|
|
114
119
|
const handlePackageError = ({ message = MESSAGE } = {}) => { log(`Package error: "${message}"`) }
|
|
@@ -320,7 +325,6 @@ export {
|
|
|
320
325
|
REGISTRY,
|
|
321
326
|
AUTHOR,
|
|
322
327
|
NVM,
|
|
323
|
-
handleError,
|
|
324
328
|
handlePackageError,
|
|
325
329
|
handleConfigurationError,
|
|
326
330
|
getPackageJsonPath,
|
package/bin/deps/deps.mjs
CHANGED
|
@@ -6,9 +6,14 @@ import {
|
|
|
6
6
|
exec
|
|
7
7
|
} from 'node:child_process'
|
|
8
8
|
|
|
9
|
+
import {
|
|
10
|
+
resolve
|
|
11
|
+
} from 'node:path'
|
|
12
|
+
|
|
9
13
|
import {
|
|
10
14
|
getArgs,
|
|
11
|
-
use
|
|
15
|
+
use,
|
|
16
|
+
handleComplete
|
|
12
17
|
} from '#deps/bin/common'
|
|
13
18
|
|
|
14
19
|
import {
|
|
@@ -19,6 +24,8 @@ import {
|
|
|
19
24
|
PLATFORM
|
|
20
25
|
} from '#deps/src/common/env'
|
|
21
26
|
|
|
27
|
+
import PATH from '#where-am-i'
|
|
28
|
+
|
|
22
29
|
const {
|
|
23
30
|
env: {
|
|
24
31
|
DEBUG = '@modernpoacher/deps*'
|
|
@@ -27,13 +34,10 @@ const {
|
|
|
27
34
|
|
|
28
35
|
debug.enable(DEBUG)
|
|
29
36
|
|
|
30
|
-
const log = debug('@modernpoacher/deps')
|
|
31
|
-
const error = debug('@modernpoacher/deps:error')
|
|
32
|
-
|
|
33
37
|
const command = (
|
|
34
38
|
PLATFORM === 'win32'
|
|
35
|
-
?
|
|
36
|
-
:
|
|
39
|
+
? `bash "${resolve(PATH, '.\\bin\\bash\\deps.sh')}"`
|
|
40
|
+
: `bash '${resolve(PATH, './bin/bash/deps.sh')}'`
|
|
37
41
|
)
|
|
38
42
|
|
|
39
43
|
const args = getArgs()
|
|
@@ -41,10 +45,7 @@ const args = getArgs()
|
|
|
41
45
|
const {
|
|
42
46
|
stdout,
|
|
43
47
|
stderr
|
|
44
|
-
} = exec(`${command} ${args}`, getOptions(),
|
|
45
|
-
if (!e) return log('👍')
|
|
46
|
-
error('👎')
|
|
47
|
-
})
|
|
48
|
+
} = exec(`${command} ${args}`, getOptions(), handleComplete)
|
|
48
49
|
|
|
49
50
|
stdout.on('data', use('deps-deps'))
|
|
50
51
|
stderr.on('data', use('deps-deps:error'))
|
package/bin/deps/head.mjs
CHANGED
|
@@ -6,9 +6,14 @@ import {
|
|
|
6
6
|
exec
|
|
7
7
|
} from 'node:child_process'
|
|
8
8
|
|
|
9
|
+
import {
|
|
10
|
+
resolve
|
|
11
|
+
} from 'node:path'
|
|
12
|
+
|
|
9
13
|
import {
|
|
10
14
|
getArgs,
|
|
11
|
-
use
|
|
15
|
+
use,
|
|
16
|
+
handleComplete
|
|
12
17
|
} from '#deps/bin/common'
|
|
13
18
|
|
|
14
19
|
import {
|
|
@@ -19,6 +24,8 @@ import {
|
|
|
19
24
|
PLATFORM
|
|
20
25
|
} from '#deps/src/common/env'
|
|
21
26
|
|
|
27
|
+
import PATH from '#where-am-i'
|
|
28
|
+
|
|
22
29
|
const {
|
|
23
30
|
env: {
|
|
24
31
|
DEBUG = '@modernpoacher/deps*'
|
|
@@ -27,13 +34,10 @@ const {
|
|
|
27
34
|
|
|
28
35
|
debug.enable(DEBUG)
|
|
29
36
|
|
|
30
|
-
const log = debug('@modernpoacher/deps')
|
|
31
|
-
const error = debug('@modernpoacher/deps:error')
|
|
32
|
-
|
|
33
37
|
const command = (
|
|
34
38
|
PLATFORM === 'win32'
|
|
35
|
-
?
|
|
36
|
-
:
|
|
39
|
+
? `bash "${resolve(PATH, '.\\bin\\bash\\head.sh')}"`
|
|
40
|
+
: `bash '${resolve(PATH, './bin/bash/head.sh')}'`
|
|
37
41
|
)
|
|
38
42
|
|
|
39
43
|
const args = getArgs()
|
|
@@ -41,10 +45,7 @@ const args = getArgs()
|
|
|
41
45
|
const {
|
|
42
46
|
stdout,
|
|
43
47
|
stderr
|
|
44
|
-
} = exec(`${command} ${args}`, getOptions(),
|
|
45
|
-
if (!e) return log('👍')
|
|
46
|
-
error('👎')
|
|
47
|
-
})
|
|
48
|
+
} = exec(`${command} ${args}`, getOptions(), handleComplete)
|
|
48
49
|
|
|
49
|
-
stdout.on('data', use('deps-
|
|
50
|
-
stderr.on('data', use('deps-
|
|
50
|
+
stdout.on('data', use('deps-head'))
|
|
51
|
+
stderr.on('data', use('deps-head:error'))
|
package/bin/deps/push.mjs
CHANGED
|
@@ -6,9 +6,14 @@ import {
|
|
|
6
6
|
exec
|
|
7
7
|
} from 'node:child_process'
|
|
8
8
|
|
|
9
|
+
import {
|
|
10
|
+
resolve
|
|
11
|
+
} from 'node:path'
|
|
12
|
+
|
|
9
13
|
import {
|
|
10
14
|
getArgs,
|
|
11
|
-
use
|
|
15
|
+
use,
|
|
16
|
+
handleComplete
|
|
12
17
|
} from '#deps/bin/common'
|
|
13
18
|
|
|
14
19
|
import {
|
|
@@ -19,6 +24,8 @@ import {
|
|
|
19
24
|
PLATFORM
|
|
20
25
|
} from '#deps/src/common/env'
|
|
21
26
|
|
|
27
|
+
import PATH from '#where-am-i'
|
|
28
|
+
|
|
22
29
|
const {
|
|
23
30
|
env: {
|
|
24
31
|
DEBUG = '@modernpoacher/deps*'
|
|
@@ -27,13 +34,10 @@ const {
|
|
|
27
34
|
|
|
28
35
|
debug.enable(DEBUG)
|
|
29
36
|
|
|
30
|
-
const log = debug('@modernpoacher/deps')
|
|
31
|
-
const error = debug('@modernpoacher/deps:error')
|
|
32
|
-
|
|
33
37
|
const command = (
|
|
34
38
|
PLATFORM === 'win32'
|
|
35
|
-
?
|
|
36
|
-
:
|
|
39
|
+
? `bash "${resolve(PATH, '.\\bin\\bash\\push.sh')}"`
|
|
40
|
+
: `bash '${resolve(PATH, './bin/bash/push.sh')}'`
|
|
37
41
|
)
|
|
38
42
|
|
|
39
43
|
const args = getArgs()
|
|
@@ -41,10 +45,7 @@ const args = getArgs()
|
|
|
41
45
|
const {
|
|
42
46
|
stdout,
|
|
43
47
|
stderr
|
|
44
|
-
} = exec(`${command} ${args}`, getOptions(),
|
|
45
|
-
if (!e) return log('👍')
|
|
46
|
-
error('👎')
|
|
47
|
-
})
|
|
48
|
+
} = exec(`${command} ${args}`, getOptions(), handleComplete)
|
|
48
49
|
|
|
49
|
-
stdout.on('data', use('deps-
|
|
50
|
-
stderr.on('data', use('deps-
|
|
50
|
+
stdout.on('data', use('deps-push'))
|
|
51
|
+
stderr.on('data', use('deps-push:error'))
|
package/bin/deps/wipe.mjs
CHANGED
|
@@ -6,9 +6,14 @@ import {
|
|
|
6
6
|
exec
|
|
7
7
|
} from 'node:child_process'
|
|
8
8
|
|
|
9
|
+
import {
|
|
10
|
+
resolve
|
|
11
|
+
} from 'node:path'
|
|
12
|
+
|
|
9
13
|
import {
|
|
10
14
|
getArgs,
|
|
11
|
-
use
|
|
15
|
+
use,
|
|
16
|
+
handleComplete
|
|
12
17
|
} from '#deps/bin/common'
|
|
13
18
|
|
|
14
19
|
import {
|
|
@@ -19,6 +24,8 @@ import {
|
|
|
19
24
|
PLATFORM
|
|
20
25
|
} from '#deps/src/common/env'
|
|
21
26
|
|
|
27
|
+
import PATH from '#where-am-i'
|
|
28
|
+
|
|
22
29
|
const {
|
|
23
30
|
env: {
|
|
24
31
|
DEBUG = '@modernpoacher/deps*'
|
|
@@ -27,13 +34,10 @@ const {
|
|
|
27
34
|
|
|
28
35
|
debug.enable(DEBUG)
|
|
29
36
|
|
|
30
|
-
const log = debug('@modernpoacher/deps')
|
|
31
|
-
const error = debug('@modernpoacher/deps:error')
|
|
32
|
-
|
|
33
37
|
const command = (
|
|
34
38
|
PLATFORM === 'win32'
|
|
35
|
-
?
|
|
36
|
-
:
|
|
39
|
+
? `bash "${resolve(PATH, '.\\bin\\bash\\wipe.sh')}"`
|
|
40
|
+
: `bash '${resolve(PATH, './bin/bash/wipe.sh')}'`
|
|
37
41
|
)
|
|
38
42
|
|
|
39
43
|
const args = getArgs()
|
|
@@ -41,10 +45,7 @@ const args = getArgs()
|
|
|
41
45
|
const {
|
|
42
46
|
stdout,
|
|
43
47
|
stderr
|
|
44
|
-
} = exec(`${command} ${args}`, getOptions(),
|
|
45
|
-
if (!e) return log('👍')
|
|
46
|
-
error('👎')
|
|
47
|
-
})
|
|
48
|
+
} = exec(`${command} ${args}`, getOptions(), handleComplete)
|
|
48
49
|
|
|
49
|
-
stdout.on('data', use('deps-
|
|
50
|
-
stderr.on('data', use('deps-
|
|
50
|
+
stdout.on('data', use('deps-wipe'))
|
|
51
|
+
stderr.on('data', use('deps-wipe:error'))
|