@modernpoacher/deps 2.0.7 → 2.0.9
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/app.mjs +11 -7
- package/bin/common/index.mjs +7 -8
- package/bin/install/app.mjs +11 -7
- package/package.json +1 -1
package/bin/app.mjs
CHANGED
|
@@ -81,13 +81,17 @@ async function app () {
|
|
|
81
81
|
}
|
|
82
82
|
} = process
|
|
83
83
|
|
|
84
|
-
const PACKAGE =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
const PACKAGE = (
|
|
85
|
+
await hasPackage(DEPS_PATH)
|
|
86
|
+
? await getPackage(DEPS_PATH)
|
|
87
|
+
: {}
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
const CONFIGURATION = (
|
|
91
|
+
await hasConfiguration(DEPS_PATH)
|
|
92
|
+
? await getConfiguration(DEPS_PATH)
|
|
93
|
+
: {}
|
|
94
|
+
)
|
|
91
95
|
|
|
92
96
|
const {
|
|
93
97
|
saveProd: P,
|
package/bin/common/index.mjs
CHANGED
|
@@ -32,7 +32,9 @@ import {
|
|
|
32
32
|
AUTHOR,
|
|
33
33
|
NVM,
|
|
34
34
|
getRegistryParameter,
|
|
35
|
-
getForceParameter
|
|
35
|
+
getForceParameter,
|
|
36
|
+
getExportPath,
|
|
37
|
+
getNvm
|
|
36
38
|
} from '#deps/src/common'
|
|
37
39
|
|
|
38
40
|
const log = debug('@modernpoacher/deps')
|
|
@@ -67,23 +69,20 @@ rmdir /s /q node_modules 2> nul & \
|
|
|
67
69
|
del package-lock.json 2> nul
|
|
68
70
|
`)
|
|
69
71
|
: () => tidy(`
|
|
70
|
-
rm -rf node_modules
|
|
72
|
+
rm -rf node_modules \
|
|
73
|
+
package-lock.json
|
|
71
74
|
`)
|
|
72
75
|
|
|
73
76
|
const getNpmiCommands = PLATFORM === 'win32'
|
|
74
77
|
? (registry = REGISTRY, force = false) => tidy(getRegistryParameter(registry, getForceParameter(force, 'npm i')))
|
|
75
78
|
: (registry = REGISTRY, force = false) => tidy(`
|
|
76
|
-
|
|
77
|
-
. "${NVM}" 2> /dev/null
|
|
78
|
-
${getRegistryParameter(registry, getForceParameter(force, 'npm i'))}
|
|
79
|
+
${getExportPath(getNvm(getRegistryParameter(registry, getForceParameter(force, 'npm i'))))}
|
|
79
80
|
`)
|
|
80
81
|
|
|
81
82
|
const getDepsCommands = PLATFORM === 'win32'
|
|
82
83
|
? (registry = REGISTRY, force = false) => tidy(getRegistryParameter(registry, getForceParameter(force, 'deps')))
|
|
83
84
|
: (registry = REGISTRY, force = false) => tidy(`
|
|
84
|
-
|
|
85
|
-
. "${NVM}" 2> /dev/null
|
|
86
|
-
${getRegistryParameter(registry, getForceParameter(force, 'deps'))}
|
|
85
|
+
${getExportPath(getNvm(getRegistryParameter(registry, getForceParameter(force, 'deps'))))}
|
|
87
86
|
`)
|
|
88
87
|
|
|
89
88
|
function use (key) {
|
package/bin/install/app.mjs
CHANGED
|
@@ -81,13 +81,17 @@ async function app () {
|
|
|
81
81
|
}
|
|
82
82
|
} = process
|
|
83
83
|
|
|
84
|
-
const PACKAGE =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
const PACKAGE = (
|
|
85
|
+
await hasPackage(DEPS_PATH)
|
|
86
|
+
? await getPackage(DEPS_PATH)
|
|
87
|
+
: {}
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
const CONFIGURATION = (
|
|
91
|
+
await hasConfiguration(DEPS_PATH)
|
|
92
|
+
? await getConfiguration(DEPS_PATH)
|
|
93
|
+
: {}
|
|
94
|
+
)
|
|
91
95
|
|
|
92
96
|
const {
|
|
93
97
|
prod: P,
|