@modernpoacher/deps 2.2.22 → 2.2.25
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 +12 -8
- package/bin/node/deps.mjs +27 -6
- package/bin/node/execute.mjs +17 -1
- package/bin/node/head.mjs +27 -6
- package/bin/node/install.mjs +17 -1
- package/bin/node/push.mjs +27 -6
- package/bin/node/wipe.mjs +27 -6
- package/package.json +2 -1
- package/src/common/env/index.mjs +6 -2
- package/src/index.mjs +8 -8
- package/src/install/index.mjs +2 -2
package/bin/common/index.mjs
CHANGED
|
@@ -46,7 +46,9 @@ import debug from '#deps/src/common/debug'
|
|
|
46
46
|
import {
|
|
47
47
|
VERSION,
|
|
48
48
|
PLATFORM,
|
|
49
|
-
BIN
|
|
49
|
+
BIN,
|
|
50
|
+
OUT,
|
|
51
|
+
ERR
|
|
50
52
|
} from '#deps/src/common/env'
|
|
51
53
|
|
|
52
54
|
import {
|
|
@@ -211,14 +213,14 @@ export function handleComplete (e) {
|
|
|
211
213
|
}
|
|
212
214
|
|
|
213
215
|
/**
|
|
214
|
-
* @param {{ code?: number, message?: string }}
|
|
216
|
+
* @param {{ code?: number, message?: string }} e
|
|
215
217
|
*/
|
|
216
|
-
const handlePackageError = ({ message = MESSAGE }
|
|
218
|
+
const handlePackageError = ({ message = MESSAGE }) => { info(`Package error: "${message}"`) }
|
|
217
219
|
|
|
218
220
|
/**
|
|
219
|
-
* @param {{ code?: number, message?: string }}
|
|
221
|
+
* @param {{ code?: number, message?: string }} e
|
|
220
222
|
*/
|
|
221
|
-
const handleConfigurationError = ({ message = MESSAGE }
|
|
223
|
+
const handleConfigurationError = ({ message = MESSAGE }) => { info(`Configuration error: "${message}"`) }
|
|
222
224
|
|
|
223
225
|
const getPackageJsonPath = (directory = DIRECTORY) => resolve(join(directory, 'package.json'))
|
|
224
226
|
|
|
@@ -402,7 +404,7 @@ function rmrf (d = DIRECTORY) {
|
|
|
402
404
|
}
|
|
403
405
|
}
|
|
404
406
|
|
|
405
|
-
info(commands)
|
|
407
|
+
info(commands, options)
|
|
406
408
|
|
|
407
409
|
const {
|
|
408
410
|
stdout,
|
|
@@ -443,7 +445,7 @@ function npmi (d = DIRECTORY, registry = REGISTRY, force = false) {
|
|
|
443
445
|
}
|
|
444
446
|
}
|
|
445
447
|
|
|
446
|
-
info(commands)
|
|
448
|
+
info(commands, options)
|
|
447
449
|
|
|
448
450
|
const {
|
|
449
451
|
stdout,
|
|
@@ -484,7 +486,7 @@ function deps (d = DIRECTORY, registry = REGISTRY, force = false) {
|
|
|
484
486
|
}
|
|
485
487
|
}
|
|
486
488
|
|
|
487
|
-
info(commands)
|
|
489
|
+
info(commands, options)
|
|
488
490
|
|
|
489
491
|
const {
|
|
490
492
|
stdout,
|
|
@@ -504,6 +506,8 @@ export {
|
|
|
504
506
|
REGISTRY,
|
|
505
507
|
AUTHOR,
|
|
506
508
|
NVM,
|
|
509
|
+
OUT,
|
|
510
|
+
ERR,
|
|
507
511
|
handlePackageError,
|
|
508
512
|
handleConfigurationError,
|
|
509
513
|
getPackageJsonPath,
|
package/bin/node/deps.mjs
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
stdout,
|
|
5
|
+
stderr
|
|
6
|
+
} from 'node:process'
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
createWriteStream
|
|
10
|
+
} from 'node:fs'
|
|
11
|
+
|
|
3
12
|
import {
|
|
4
13
|
exec
|
|
5
14
|
} from 'node:child_process'
|
|
6
15
|
|
|
16
|
+
import write from '@sequencemedia/write'
|
|
17
|
+
|
|
7
18
|
import '#deps/src/common/debug'
|
|
8
19
|
|
|
20
|
+
import {
|
|
21
|
+
OUT,
|
|
22
|
+
ERR
|
|
23
|
+
} from '#deps/src/common/env'
|
|
24
|
+
|
|
9
25
|
import {
|
|
10
26
|
getOptions
|
|
11
27
|
} from '#deps/src/common/options'
|
|
@@ -17,10 +33,15 @@ import {
|
|
|
17
33
|
handleComplete
|
|
18
34
|
} from '#deps/bin/common'
|
|
19
35
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
36
|
+
if (OUT) stdout.write = write(stdout, createWriteStream(OUT))
|
|
37
|
+
if (ERR) stderr.write = write(stderr, createWriteStream(ERR))
|
|
38
|
+
|
|
39
|
+
{
|
|
40
|
+
const {
|
|
41
|
+
stdout,
|
|
42
|
+
stderr
|
|
43
|
+
} = exec(`${DEPS} ${ARGS}`, getOptions(), handleComplete)
|
|
24
44
|
|
|
25
|
-
if (stdout) stdout.on('data', use('deps-deps'))
|
|
26
|
-
if (stderr) stderr.on('data', use('deps-deps:error'))
|
|
45
|
+
if (stdout) stdout.on('data', use('deps-deps'))
|
|
46
|
+
if (stderr) stderr.on('data', use('deps-deps:error'))
|
|
47
|
+
}
|
package/bin/node/execute.mjs
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
stdout,
|
|
5
|
+
stderr
|
|
6
|
+
} from 'node:process'
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
createWriteStream
|
|
10
|
+
} from 'node:fs'
|
|
11
|
+
|
|
3
12
|
import {
|
|
4
13
|
resolve,
|
|
5
14
|
dirname
|
|
@@ -13,11 +22,15 @@ import {
|
|
|
13
22
|
Command
|
|
14
23
|
} from 'commander'
|
|
15
24
|
|
|
25
|
+
import write from '@sequencemedia/write'
|
|
26
|
+
|
|
16
27
|
import debug from '#deps/src/common/debug'
|
|
17
28
|
|
|
18
29
|
import {
|
|
19
30
|
VERSION,
|
|
20
|
-
PLATFORM
|
|
31
|
+
PLATFORM,
|
|
32
|
+
OUT,
|
|
33
|
+
ERR
|
|
21
34
|
} from '#deps/src/common/env'
|
|
22
35
|
|
|
23
36
|
import {
|
|
@@ -509,6 +522,9 @@ async function executePath (directory, registry, force, message, author) {
|
|
|
509
522
|
}
|
|
510
523
|
}
|
|
511
524
|
|
|
525
|
+
if (OUT) stdout.write = write(stdout, createWriteStream(OUT))
|
|
526
|
+
if (ERR) stderr.write = write(stderr, createWriteStream(ERR))
|
|
527
|
+
|
|
512
528
|
/**
|
|
513
529
|
* @function app
|
|
514
530
|
*/
|
package/bin/node/head.mjs
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
stdout,
|
|
5
|
+
stderr
|
|
6
|
+
} from 'node:process'
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
createWriteStream
|
|
10
|
+
} from 'node:fs'
|
|
11
|
+
|
|
3
12
|
import {
|
|
4
13
|
exec
|
|
5
14
|
} from 'node:child_process'
|
|
6
15
|
|
|
16
|
+
import write from '@sequencemedia/write'
|
|
17
|
+
|
|
7
18
|
import '#deps/src/common/debug'
|
|
8
19
|
|
|
20
|
+
import {
|
|
21
|
+
OUT,
|
|
22
|
+
ERR
|
|
23
|
+
} from '#deps/src/common/env'
|
|
24
|
+
|
|
9
25
|
import {
|
|
10
26
|
getOptions
|
|
11
27
|
} from '#deps/src/common/options'
|
|
@@ -17,10 +33,15 @@ import {
|
|
|
17
33
|
handleComplete
|
|
18
34
|
} from '#deps/bin/common'
|
|
19
35
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
36
|
+
if (OUT) stdout.write = write(stdout, createWriteStream(OUT))
|
|
37
|
+
if (ERR) stderr.write = write(stderr, createWriteStream(ERR))
|
|
38
|
+
|
|
39
|
+
{
|
|
40
|
+
const {
|
|
41
|
+
stdout,
|
|
42
|
+
stderr
|
|
43
|
+
} = exec(`${HEAD} ${ARGS}`, getOptions(), handleComplete)
|
|
24
44
|
|
|
25
|
-
if (stdout) stdout.on('data', use('deps-head'))
|
|
26
|
-
if (stderr) stderr.on('data', use('deps-head:error'))
|
|
45
|
+
if (stdout) stdout.on('data', use('deps-head'))
|
|
46
|
+
if (stderr) stderr.on('data', use('deps-head:error'))
|
|
47
|
+
}
|
package/bin/node/install.mjs
CHANGED
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
stdout,
|
|
5
|
+
stderr
|
|
6
|
+
} from 'node:process'
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
createWriteStream
|
|
10
|
+
} from 'node:fs'
|
|
11
|
+
|
|
3
12
|
import {
|
|
4
13
|
Command
|
|
5
14
|
} from 'commander'
|
|
6
15
|
|
|
16
|
+
import write from '@sequencemedia/write'
|
|
17
|
+
|
|
7
18
|
import debug from '#deps/src/common/debug'
|
|
8
19
|
|
|
9
20
|
import {
|
|
10
21
|
VERSION,
|
|
11
|
-
PLATFORM
|
|
22
|
+
PLATFORM,
|
|
23
|
+
OUT,
|
|
24
|
+
ERR
|
|
12
25
|
} from '#deps/src/common/env'
|
|
13
26
|
|
|
14
27
|
import {
|
|
@@ -35,6 +48,9 @@ const log = debug('@modernpoacher/deps')
|
|
|
35
48
|
|
|
36
49
|
log(`\`install\` (${VERSION} - ${PLATFORM}) is awake`)
|
|
37
50
|
|
|
51
|
+
if (OUT) stdout.write = write(stdout, createWriteStream(OUT))
|
|
52
|
+
if (ERR) stderr.write = write(stderr, createWriteStream(ERR))
|
|
53
|
+
|
|
38
54
|
/**
|
|
39
55
|
* @function app
|
|
40
56
|
*/
|
package/bin/node/push.mjs
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
stdout,
|
|
5
|
+
stderr
|
|
6
|
+
} from 'node:process'
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
createWriteStream
|
|
10
|
+
} from 'node:fs'
|
|
11
|
+
|
|
3
12
|
import {
|
|
4
13
|
exec
|
|
5
14
|
} from 'node:child_process'
|
|
6
15
|
|
|
16
|
+
import write from '@sequencemedia/write'
|
|
17
|
+
|
|
7
18
|
import '#deps/src/common/debug'
|
|
8
19
|
|
|
20
|
+
import {
|
|
21
|
+
OUT,
|
|
22
|
+
ERR
|
|
23
|
+
} from '#deps/src/common/env'
|
|
24
|
+
|
|
9
25
|
import {
|
|
10
26
|
getOptions
|
|
11
27
|
} from '#deps/src/common/options'
|
|
@@ -17,10 +33,15 @@ import {
|
|
|
17
33
|
handleComplete
|
|
18
34
|
} from '#deps/bin/common'
|
|
19
35
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
36
|
+
if (OUT) stdout.write = write(stdout, createWriteStream(OUT))
|
|
37
|
+
if (ERR) stderr.write = write(stderr, createWriteStream(ERR))
|
|
38
|
+
|
|
39
|
+
{
|
|
40
|
+
const {
|
|
41
|
+
stdout,
|
|
42
|
+
stderr
|
|
43
|
+
} = exec(`${PUSH} ${ARGS}`, getOptions(), handleComplete)
|
|
24
44
|
|
|
25
|
-
if (stdout) stdout.on('data', use('deps-push'))
|
|
26
|
-
if (stderr) stderr.on('data', use('deps-push:error'))
|
|
45
|
+
if (stdout) stdout.on('data', use('deps-push'))
|
|
46
|
+
if (stderr) stderr.on('data', use('deps-push:error'))
|
|
47
|
+
}
|
package/bin/node/wipe.mjs
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
stdout,
|
|
5
|
+
stderr
|
|
6
|
+
} from 'node:process'
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
createWriteStream
|
|
10
|
+
} from 'node:fs'
|
|
11
|
+
|
|
3
12
|
import {
|
|
4
13
|
exec
|
|
5
14
|
} from 'node:child_process'
|
|
6
15
|
|
|
16
|
+
import write from '@sequencemedia/write'
|
|
17
|
+
|
|
7
18
|
import '#deps/src/common/debug'
|
|
8
19
|
|
|
20
|
+
import {
|
|
21
|
+
OUT,
|
|
22
|
+
ERR
|
|
23
|
+
} from '#deps/src/common/env'
|
|
24
|
+
|
|
9
25
|
import {
|
|
10
26
|
getOptions
|
|
11
27
|
} from '#deps/src/common/options'
|
|
@@ -17,10 +33,15 @@ import {
|
|
|
17
33
|
handleComplete
|
|
18
34
|
} from '#deps/bin/common'
|
|
19
35
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
36
|
+
if (OUT) stdout.write = write(stdout, createWriteStream(OUT))
|
|
37
|
+
if (ERR) stderr.write = write(stderr, createWriteStream(ERR))
|
|
38
|
+
|
|
39
|
+
{
|
|
40
|
+
const {
|
|
41
|
+
stdout,
|
|
42
|
+
stderr
|
|
43
|
+
} = exec(`${WIPE} ${ARGS}`, getOptions(), handleComplete)
|
|
24
44
|
|
|
25
|
-
if (stdout) stdout.on('data', use('deps-wipe'))
|
|
26
|
-
if (stderr) stderr.on('data', use('deps-wipe:error'))
|
|
45
|
+
if (stdout) stdout.on('data', use('deps-wipe'))
|
|
46
|
+
if (stderr) stderr.on('data', use('deps-wipe:error'))
|
|
47
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modernpoacher/deps",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.25",
|
|
4
4
|
"description": "Update NPM package dependencies from the command line",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deps",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"deps-wipe": "bin/deps/wipe.sh"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
+
"@sequencemedia/write": "^0.2.1",
|
|
57
58
|
"commander": "^14.0.0",
|
|
58
59
|
"debug": "^4.4.1",
|
|
59
60
|
"glob": "^11.0.3",
|
package/src/common/env/index.mjs
CHANGED
package/src/index.mjs
CHANGED
|
@@ -296,7 +296,7 @@ export function installSaveBundleSaveExact (d, deps, r, f) {
|
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
info(commands)
|
|
299
|
+
info(commands, options)
|
|
300
300
|
|
|
301
301
|
const {
|
|
302
302
|
stdout,
|
|
@@ -343,7 +343,7 @@ export function installSaveBundle (d, deps, r, f) {
|
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
info(commands)
|
|
346
|
+
info(commands, options)
|
|
347
347
|
|
|
348
348
|
const {
|
|
349
349
|
stdout,
|
|
@@ -390,7 +390,7 @@ export function installSaveOptionalSaveExact (d, deps, r, f) {
|
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
|
|
393
|
-
info(commands)
|
|
393
|
+
info(commands, options)
|
|
394
394
|
|
|
395
395
|
const {
|
|
396
396
|
stdout,
|
|
@@ -437,7 +437,7 @@ export function installSaveOptional (d, deps, r, f) {
|
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
439
|
|
|
440
|
-
info(commands)
|
|
440
|
+
info(commands, options)
|
|
441
441
|
|
|
442
442
|
const {
|
|
443
443
|
stdout,
|
|
@@ -484,7 +484,7 @@ export function installSaveDevSaveExact (d, deps, r, f) {
|
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
-
info(commands)
|
|
487
|
+
info(commands, options)
|
|
488
488
|
|
|
489
489
|
const {
|
|
490
490
|
stdout,
|
|
@@ -531,7 +531,7 @@ export function installSaveDev (d, deps, r, f) {
|
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
|
|
534
|
-
info(commands)
|
|
534
|
+
info(commands, options)
|
|
535
535
|
|
|
536
536
|
const {
|
|
537
537
|
stdout,
|
|
@@ -578,7 +578,7 @@ export function installSaveProdSaveExact (d, deps, r, f) {
|
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
|
|
581
|
-
info(commands)
|
|
581
|
+
info(commands, options)
|
|
582
582
|
|
|
583
583
|
const {
|
|
584
584
|
stdout,
|
|
@@ -625,7 +625,7 @@ export function installSaveProd (d, deps, r, f) {
|
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
627
|
|
|
628
|
-
info(commands)
|
|
628
|
+
info(commands, options)
|
|
629
629
|
|
|
630
630
|
const {
|
|
631
631
|
stdout,
|
package/src/install/index.mjs
CHANGED
|
@@ -119,7 +119,7 @@ export function installSaveExact (d, p, s, r, f) {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
info(commands)
|
|
122
|
+
info(commands, options)
|
|
123
123
|
|
|
124
124
|
const {
|
|
125
125
|
stdout,
|
|
@@ -165,7 +165,7 @@ export function install (d, p, s, r, f) {
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
info(commands)
|
|
168
|
+
info(commands, options)
|
|
169
169
|
|
|
170
170
|
const {
|
|
171
171
|
stdout,
|