@modernpoacher/deps 1.5.8 → 1.5.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/common/index.js +3 -3
- package/lib/common/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/install/index.js +1 -1
- package/package.json +1 -1
- package/src/common/index.js +1 -1
- package/src/index.js +16 -144
- package/src/install/index.js +4 -36
package/bin/common/index.js
CHANGED
|
@@ -58,7 +58,7 @@ cd "${directory}"
|
|
|
58
58
|
|
|
59
59
|
rm -rf node_modules package-lock.json
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
exit 0
|
|
62
62
|
`)
|
|
63
63
|
|
|
64
64
|
const getNpmiCommands = (directory = DIRECTORY, registry = REGISTRY, force = false) => normalise(`
|
|
@@ -68,7 +68,7 @@ cd "${directory}"
|
|
|
68
68
|
|
|
69
69
|
${getRegistryParameter(registry, getForceParameter(force, 'npm i'))}
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
exit 0
|
|
72
72
|
`)
|
|
73
73
|
|
|
74
74
|
const getDepsCommands = (directory = DIRECTORY, registry = REGISTRY, force = false) => normalise(`
|
|
@@ -78,7 +78,7 @@ cd "${directory}"
|
|
|
78
78
|
|
|
79
79
|
${getRegistryParameter(registry, getForceParameter(force, 'deps'))}
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
exit 0
|
|
82
82
|
`)
|
|
83
83
|
|
|
84
84
|
function use (key) {
|
package/lib/common/index.js
CHANGED
|
@@ -7,5 +7,5 @@ cd "${directory}"
|
|
|
7
7
|
|
|
8
8
|
${commands}
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
exit 0
|
|
11
11
|
`.replace(/\n\n/gm,String.fromCharCode(10)).trim();exports.getCommands=getCommands;const getProdDependencies=({dependencies={}}={})=>dependencies;exports.getProdDependencies=getProdDependencies;const getDevDependencies=({devDependencies={}}={})=>devDependencies;exports.getDevDependencies=getDevDependencies;const getOptionalDependencies=({optionalDependencies={}}={})=>optionalDependencies;exports.getOptionalDependencies=getOptionalDependencies;const getBundleDependencies=({bundleDependencies=[]}={})=>bundleDependencies;exports.getBundleDependencies=getBundleDependencies;const getPeerDependencies=({peerDependencies}={})=>peerDependencies;exports.getPeerDependencies=getPeerDependencies;const isPreRelease=v=>/-/.test(v);exports.isPreRelease=isPreRelease;const isExact=v=>/^\d/.test(v);exports.isExact=isExact;function getDepsExact(values,configuration){log('getDepsExact');return Object.entries(values).reduce((accumulator,[name,version])=>isExact(version)?accumulator.concat({name,version:Reflect.has(configuration,name)?Reflect.get(configuration,name):version}):accumulator,[]);}function getDeps(values){log('getDeps');return Object.entries(values).reduce((accumulator,[name,version])=>isExact(version)?accumulator:isPreRelease(version)?accumulator.concat({name,version}):accumulator.concat({name,version:'latest'}),[]);}function normalise(value){while(/\s\s|\n/.test(value)){value=value.replace(/\s\s/gm,String.fromCharCode(32)).replace(/\n/gm,String.fromCharCode(32));}return value.trim();}const transformDependency=({name='@modernpoacher/deps',version='latest'}={})=>`${name}@${version}`;exports.transformDependency=transformDependency;function transform(value){log('transform');return Array.isArray(value)?value.map(transformDependency).join(String.fromCharCode(32)).trim():transformDependency(value);}
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.executeBundle=executeBundle;exports.executeDev=executeDev;exports.executeOptional=executeOptional;exports.executeProd=executeProd;exports.getInstallCommands=void 0;exports.getInstallSaveBundleCommands=getInstallSaveBundleCommands;exports.getInstallSaveBundleSaveExactCommands=getInstallSaveBundleSaveExactCommands;exports.getInstallSaveDevCommands=getInstallSaveDevCommands;exports.getInstallSaveDevSaveExactCommands=getInstallSaveDevSaveExactCommands;exports.getInstallSaveExactCommands=void 0;exports.getInstallSaveOptionalCommands=getInstallSaveOptionalCommands;exports.getInstallSaveOptionalSaveExactCommands=getInstallSaveOptionalSaveExactCommands;exports.getInstallSaveProdCommands=getInstallSaveProdCommands;exports.getInstallSaveProdSaveExactCommands=getInstallSaveProdSaveExactCommands;exports.installSaveBundle=installSaveBundle;exports.installSaveBundleSaveExact=installSaveBundleSaveExact;exports.installSaveDev=installSaveDev;exports.installSaveDevSaveExact=installSaveDevSaveExact;exports.installSaveOptional=installSaveOptional;exports.installSaveOptionalSaveExact=installSaveOptionalSaveExact;exports.installSaveProd=installSaveProd;exports.installSaveProdSaveExact=installSaveProdSaveExact;var _debug=_interopRequireDefault(require("debug"));var _os=require("os");var _child_process=require("child_process");var _common=require("./common");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}const log=(0,_debug.default)('@modernpoacher/deps');log(`\`deps\` (${_os.platform}) is awake`);function use(key){const log=(0,_debug.default)(`@modernpoacher/deps:${key}`);return function use(v){const s=v.trim();if(s==='')return;return log(s);};}const getInstallSaveExactCommands=(p,r,f)=>{log('getInstallSaveExactCommands');const c=(0,_common.transform)(p);const commands=`npm i ${c}`;return(0,_common.normalise)((0,_common.getRegistryParameter)(r,(0,_common.getForceParameter)(f,(0,_common.getSaveExactParameter)(commands))));};exports.getInstallSaveExactCommands=getInstallSaveExactCommands;const getInstallCommands=(p,r,f)=>{log('getInstallCommands');const c=(0,_common.transform)(p);const commands=`npm i ${c}`;return(0,_common.normalise)((0,_common.getRegistryParameter)(r,(0,_common.getForceParameter)(f,commands)));};exports.getInstallCommands=getInstallCommands;function getInstallSaveBundleSaveExactCommands(p,r,f){log('getInstallSaveBundleSaveExactCommands');const commands=getInstallSaveExactCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveBundleParameter)(commands));}function getInstallSaveBundleCommands(p,r,f){log('getInstallSaveBundleCommands');const commands=getInstallCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveBundleParameter)(commands));}function getInstallSaveOptionalSaveExactCommands(p,r,f){log('getInstallSaveOptionalSaveExactCommands');const commands=getInstallSaveExactCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveOptionalParameter)(commands));}function getInstallSaveOptionalCommands(p,r,f){log('getInstallSaveOptionalCommands');const commands=getInstallCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveOptionalParameter)(commands));}function getInstallSaveDevSaveExactCommands(p,r,f){log('getInstallSaveDevSaveExactCommands');const commands=getInstallSaveExactCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveDevParameter)(commands));}function getInstallSaveDevCommands(p,r,f){log('getInstallSaveDevCommands');const commands=getInstallCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveDevParameter)(commands));}function getInstallSaveProdSaveExactCommands(p,r,f){log('getInstallSaveProdSaveExactCommands');const commands=getInstallSaveExactCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveProdParameter)(commands));}function getInstallSaveProdCommands(p,r,f){log('getInstallSaveProdCommands');const commands=getInstallCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveProdParameter)(commands));}function installSaveBundleSaveExact(d,p,r,f){log('installSaveBundleSaveExact');return new Promise((resolve,reject)=>{const log=use('install-save-bundle-save-exact');const commands=(0,_common.getCommands)(d,getInstallSaveBundleSaveExactCommands(p,r,f));log(commands);(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.executeBundle=executeBundle;exports.executeDev=executeDev;exports.executeOptional=executeOptional;exports.executeProd=executeProd;exports.getInstallCommands=void 0;exports.getInstallSaveBundleCommands=getInstallSaveBundleCommands;exports.getInstallSaveBundleSaveExactCommands=getInstallSaveBundleSaveExactCommands;exports.getInstallSaveDevCommands=getInstallSaveDevCommands;exports.getInstallSaveDevSaveExactCommands=getInstallSaveDevSaveExactCommands;exports.getInstallSaveExactCommands=void 0;exports.getInstallSaveOptionalCommands=getInstallSaveOptionalCommands;exports.getInstallSaveOptionalSaveExactCommands=getInstallSaveOptionalSaveExactCommands;exports.getInstallSaveProdCommands=getInstallSaveProdCommands;exports.getInstallSaveProdSaveExactCommands=getInstallSaveProdSaveExactCommands;exports.installSaveBundle=installSaveBundle;exports.installSaveBundleSaveExact=installSaveBundleSaveExact;exports.installSaveDev=installSaveDev;exports.installSaveDevSaveExact=installSaveDevSaveExact;exports.installSaveOptional=installSaveOptional;exports.installSaveOptionalSaveExact=installSaveOptionalSaveExact;exports.installSaveProd=installSaveProd;exports.installSaveProdSaveExact=installSaveProdSaveExact;var _debug=_interopRequireDefault(require("debug"));var _os=require("os");var _child_process=require("child_process");var _common=require("./common");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}const log=(0,_debug.default)('@modernpoacher/deps');log(`\`deps\` (${_os.platform}) is awake`);function use(key){const log=(0,_debug.default)(`@modernpoacher/deps:${key}`);return function use(v){const s=v.trim();if(s==='')return;return log(s);};}const getInstallSaveExactCommands=(p,r,f)=>{log('getInstallSaveExactCommands');const c=(0,_common.transform)(p);const commands=`npm i ${c}`;return(0,_common.normalise)((0,_common.getRegistryParameter)(r,(0,_common.getForceParameter)(f,(0,_common.getSaveExactParameter)(commands))));};exports.getInstallSaveExactCommands=getInstallSaveExactCommands;const getInstallCommands=(p,r,f)=>{log('getInstallCommands');const c=(0,_common.transform)(p);const commands=`npm i ${c}`;return(0,_common.normalise)((0,_common.getRegistryParameter)(r,(0,_common.getForceParameter)(f,commands)));};exports.getInstallCommands=getInstallCommands;function getInstallSaveBundleSaveExactCommands(p,r,f){log('getInstallSaveBundleSaveExactCommands');const commands=getInstallSaveExactCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveBundleParameter)(commands));}function getInstallSaveBundleCommands(p,r,f){log('getInstallSaveBundleCommands');const commands=getInstallCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveBundleParameter)(commands));}function getInstallSaveOptionalSaveExactCommands(p,r,f){log('getInstallSaveOptionalSaveExactCommands');const commands=getInstallSaveExactCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveOptionalParameter)(commands));}function getInstallSaveOptionalCommands(p,r,f){log('getInstallSaveOptionalCommands');const commands=getInstallCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveOptionalParameter)(commands));}function getInstallSaveDevSaveExactCommands(p,r,f){log('getInstallSaveDevSaveExactCommands');const commands=getInstallSaveExactCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveDevParameter)(commands));}function getInstallSaveDevCommands(p,r,f){log('getInstallSaveDevCommands');const commands=getInstallCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveDevParameter)(commands));}function getInstallSaveProdSaveExactCommands(p,r,f){log('getInstallSaveProdSaveExactCommands');const commands=getInstallSaveExactCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveProdParameter)(commands));}function getInstallSaveProdCommands(p,r,f){log('getInstallSaveProdCommands');const commands=getInstallCommands(p,r,f);return(0,_common.normalise)((0,_common.getSaveProdParameter)(commands));}function installSaveBundleSaveExact(d,p,r,f){log('installSaveBundleSaveExact');return new Promise((resolve,reject)=>{const log=use('install-save-bundle-save-exact');const commands=(0,_common.getCommands)(d,getInstallSaveBundleSaveExactCommands(p,r,f));log(commands);(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}function installSaveBundle(d,p,r,f){log('installSaveBundle');return new Promise((resolve,reject)=>{const log=use('install-save-bundle');const commands=(0,_common.getCommands)(d,getInstallSaveBundleCommands(p,r,f));log(commands);(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}function installSaveOptionalSaveExact(d,p,r,f){log('installSaveOptionalSaveExact');return new Promise((resolve,reject)=>{const log=use('install-save-otional-save-exact');const commands=(0,_common.getCommands)(d,getInstallSaveOptionalSaveExactCommands(p,r,f));log(commands);(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}function installSaveOptional(d,p,r,f){log('installSaveOptional');return new Promise((resolve,reject)=>{const log=use('install-save-otional');const commands=(0,_common.getCommands)(d,getInstallSaveOptionalCommands(p,r,f));log(commands);(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}function installSaveDevSaveExact(d,p,r,f){log('installSaveDevSaveExact');return new Promise((resolve,reject)=>{const log=use('install-save-dev-save-exact');const commands=(0,_common.getCommands)(d,getInstallSaveDevSaveExactCommands(p,r,f));log(commands);(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}function installSaveDev(d,p,r,f){log('installSaveDev');return new Promise((resolve,reject)=>{const log=use('install-save-dev');const commands=(0,_common.getCommands)(d,getInstallSaveDevCommands(p,r,f));log(commands);(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}function installSaveProdSaveExact(d,p,r,f){log('installSaveProdSaveExact');return new Promise((resolve,reject)=>{const log=use('install-save-prod-save-exact');const commands=(0,_common.getCommands)(d,getInstallSaveProdSaveExactCommands(p,r,f));log(commands);(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}function installSaveProd(d,p,r,f){log('installSaveProd');return new Promise((resolve,reject)=>{const log=use('install-save-prod');const commands=(0,_common.getCommands)(d,getInstallSaveProdCommands(p,r,f));log(commands);(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}async function executeBundle(directory=_common.DIRECTORY,packages={},configuration={},registry=_common.REGISTRY,force=false){log('executeBundle');const depsExact=(0,_common.getDepsExact)(packages,configuration);if(depsExact.length)await installSaveBundleSaveExact(directory,depsExact,registry,force);const deps=(0,_common.getDeps)(packages);if(deps.length)await installSaveBundle(directory,deps,registry,force);}async function executeOptional(directory=_common.DIRECTORY,packages={},configuration={},registry=_common.REGISTRY,force=false){log('executeOptional');const depsExact=(0,_common.getDepsExact)(packages,configuration);if(depsExact.length)await installSaveOptionalSaveExact(directory,depsExact,registry);const deps=(0,_common.getDeps)(packages);if(deps.length)await installSaveOptional(directory,deps,registry);}async function executeDev(directory=_common.DIRECTORY,packages={},configuration={},registry=_common.REGISTRY,force=false){log('executeDev');const depsExact=(0,_common.getDepsExact)(packages,configuration);if(depsExact.length)await installSaveDevSaveExact(directory,depsExact,registry,force);const deps=(0,_common.getDeps)(packages);if(deps.length)await installSaveDev(directory,deps,registry,force);}async function executeProd(directory=_common.DIRECTORY,packages={},configuration={},registry=_common.REGISTRY,force=false){log('executeProd');const depsExact=(0,_common.getDepsExact)(packages,configuration);if(depsExact.length)await installSaveProdSaveExact(directory,depsExact,registry,force);const deps=(0,_common.getDeps)(packages);if(deps.length)await installSaveProd(directory,deps,registry,force);}
|
package/lib/install/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.execute=execute;exports.getInstallSaveExactCommands=exports.getInstallCommands=void 0;exports.install=install;exports.installSaveExact=installSaveExact;var _debug=_interopRequireDefault(require("debug"));var _os=require("os");var _child_process=require("child_process");var _common=require("../common");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}const log=(0,_debug.default)('@modernpoacher/deps:install');log(`\`install\` (${_os.platform}) is awake`);const getInstallSaveExactCommands=(p,s,r,f)=>{log('getInstallSaveExactCommands');const c=(0,_common.transform)(p);const commands=`npm i ${c}`;return(0,_common.normalise)((0,_common.getNoSaveParameter)(s,(0,_common.getRegistryParameter)(r,(0,_common.getForceParameter)(f,(0,_common.getSaveExactParameter)(commands)))));};exports.getInstallSaveExactCommands=getInstallSaveExactCommands;const getInstallCommands=(p,s,r,f)=>{log('getInstallCommands');const c=(0,_common.transform)(p);const commands=`npm i ${c}`;return(0,_common.normalise)((0,_common.getNoSaveParameter)(s,(0,_common.getRegistryParameter)(r,(0,_common.getForceParameter)(f,commands))));};exports.getInstallCommands=getInstallCommands;function installSaveExact(d,p,s,r,f){log('installSaveExact');return new Promise((resolve,reject)=>{const commands=(0,_common.getCommands)(d,getInstallSaveExactCommands(p,s,r,f));(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.execute=execute;exports.getInstallSaveExactCommands=exports.getInstallCommands=void 0;exports.install=install;exports.installSaveExact=installSaveExact;var _debug=_interopRequireDefault(require("debug"));var _os=require("os");var _child_process=require("child_process");var _common=require("../common");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}const log=(0,_debug.default)('@modernpoacher/deps:install');log(`\`install\` (${_os.platform}) is awake`);const getInstallSaveExactCommands=(p,s,r,f)=>{log('getInstallSaveExactCommands');const c=(0,_common.transform)(p);const commands=`npm i ${c}`;return(0,_common.normalise)((0,_common.getNoSaveParameter)(s,(0,_common.getRegistryParameter)(r,(0,_common.getForceParameter)(f,(0,_common.getSaveExactParameter)(commands)))));};exports.getInstallSaveExactCommands=getInstallSaveExactCommands;const getInstallCommands=(p,s,r,f)=>{log('getInstallCommands');const c=(0,_common.transform)(p);const commands=`npm i ${c}`;return(0,_common.normalise)((0,_common.getNoSaveParameter)(s,(0,_common.getRegistryParameter)(r,(0,_common.getForceParameter)(f,commands))));};exports.getInstallCommands=getInstallCommands;function installSaveExact(d,p,s,r,f){log('installSaveExact');return new Promise((resolve,reject)=>{const commands=(0,_common.getCommands)(d,getInstallSaveExactCommands(p,s,r,f));(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}function install(d,p,s,r,f){log('install');return new Promise((resolve,reject)=>{const commands=(0,_common.getCommands)(d,getInstallCommands(p,s,r,f));(0,_child_process.spawn)('/bin/bash',['-c',commands],{shell:true,stdio:'inherit'},e=>!e?resolve():reject(e)).on('close',resolve).on('error',reject);});}async function execute(directory=_common.DIRECTORY,packages={},configuration={},save=false,registry=_common.REGISTRY,force=false){log('execute');const depsExact=(0,_common.getDepsExact)(packages,configuration);if(depsExact.length)await installSaveExact(directory,depsExact,save,registry,force);const deps=(0,_common.getDeps)(packages);if(deps.length)await install(directory,deps,save,registry,force);}
|
package/package.json
CHANGED
package/src/common/index.js
CHANGED
package/src/index.js
CHANGED
|
@@ -277,25 +277,9 @@ export function installSaveBundleSaveExact (d, p, r, f) {
|
|
|
277
277
|
|
|
278
278
|
log(commands)
|
|
279
279
|
|
|
280
|
-
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' },
|
|
281
|
-
if (e) {
|
|
282
|
-
log(e)
|
|
283
|
-
|
|
284
|
-
return (
|
|
285
|
-
reject(e)
|
|
286
|
-
)
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
return (
|
|
290
|
-
resolve()
|
|
291
|
-
)
|
|
292
|
-
})
|
|
280
|
+
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' }, (e) => (!e) ? resolve() : reject(e))
|
|
293
281
|
.on('close', resolve)
|
|
294
|
-
.on('error',
|
|
295
|
-
log(e)
|
|
296
|
-
|
|
297
|
-
reject(e)
|
|
298
|
-
})
|
|
282
|
+
.on('error', reject)
|
|
299
283
|
})
|
|
300
284
|
)
|
|
301
285
|
}
|
|
@@ -322,25 +306,9 @@ export function installSaveBundle (d, p, r, f) {
|
|
|
322
306
|
|
|
323
307
|
log(commands)
|
|
324
308
|
|
|
325
|
-
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' },
|
|
326
|
-
if (e) {
|
|
327
|
-
log(e)
|
|
328
|
-
|
|
329
|
-
return (
|
|
330
|
-
reject(e)
|
|
331
|
-
)
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
return (
|
|
335
|
-
resolve()
|
|
336
|
-
)
|
|
337
|
-
})
|
|
309
|
+
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' }, (e) => (!e) ? resolve() : reject(e))
|
|
338
310
|
.on('close', resolve)
|
|
339
|
-
.on('error',
|
|
340
|
-
log(e)
|
|
341
|
-
|
|
342
|
-
reject(e)
|
|
343
|
-
})
|
|
311
|
+
.on('error', reject)
|
|
344
312
|
})
|
|
345
313
|
)
|
|
346
314
|
}
|
|
@@ -367,25 +335,9 @@ export function installSaveOptionalSaveExact (d, p, r, f) {
|
|
|
367
335
|
|
|
368
336
|
log(commands)
|
|
369
337
|
|
|
370
|
-
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' },
|
|
371
|
-
if (e) {
|
|
372
|
-
log(e)
|
|
373
|
-
|
|
374
|
-
return (
|
|
375
|
-
reject(e)
|
|
376
|
-
)
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
return (
|
|
380
|
-
resolve()
|
|
381
|
-
)
|
|
382
|
-
})
|
|
338
|
+
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' }, (e) => (!e) ? resolve() : reject(e))
|
|
383
339
|
.on('close', resolve)
|
|
384
|
-
.on('error',
|
|
385
|
-
log(e)
|
|
386
|
-
|
|
387
|
-
reject(e)
|
|
388
|
-
})
|
|
340
|
+
.on('error', reject)
|
|
389
341
|
})
|
|
390
342
|
)
|
|
391
343
|
}
|
|
@@ -412,25 +364,9 @@ export function installSaveOptional (d, p, r, f) {
|
|
|
412
364
|
|
|
413
365
|
log(commands)
|
|
414
366
|
|
|
415
|
-
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' },
|
|
416
|
-
if (e) {
|
|
417
|
-
log(e)
|
|
418
|
-
|
|
419
|
-
return (
|
|
420
|
-
reject(e)
|
|
421
|
-
)
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
return (
|
|
425
|
-
resolve()
|
|
426
|
-
)
|
|
427
|
-
})
|
|
367
|
+
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' }, (e) => (!e) ? resolve() : reject(e))
|
|
428
368
|
.on('close', resolve)
|
|
429
|
-
.on('error',
|
|
430
|
-
log(e)
|
|
431
|
-
|
|
432
|
-
reject(e)
|
|
433
|
-
})
|
|
369
|
+
.on('error', reject)
|
|
434
370
|
})
|
|
435
371
|
)
|
|
436
372
|
}
|
|
@@ -457,25 +393,9 @@ export function installSaveDevSaveExact (d, p, r, f) {
|
|
|
457
393
|
|
|
458
394
|
log(commands)
|
|
459
395
|
|
|
460
|
-
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' },
|
|
461
|
-
if (e) {
|
|
462
|
-
log(e)
|
|
463
|
-
|
|
464
|
-
return (
|
|
465
|
-
reject(e)
|
|
466
|
-
)
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
return (
|
|
470
|
-
resolve()
|
|
471
|
-
)
|
|
472
|
-
})
|
|
396
|
+
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' }, (e) => (!e) ? resolve() : reject(e))
|
|
473
397
|
.on('close', resolve)
|
|
474
|
-
.on('error',
|
|
475
|
-
log(e)
|
|
476
|
-
|
|
477
|
-
reject(e)
|
|
478
|
-
})
|
|
398
|
+
.on('error', reject)
|
|
479
399
|
})
|
|
480
400
|
)
|
|
481
401
|
}
|
|
@@ -502,25 +422,9 @@ export function installSaveDev (d, p, r, f) {
|
|
|
502
422
|
|
|
503
423
|
log(commands)
|
|
504
424
|
|
|
505
|
-
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' },
|
|
506
|
-
if (e) {
|
|
507
|
-
log(e)
|
|
508
|
-
|
|
509
|
-
return (
|
|
510
|
-
reject(e)
|
|
511
|
-
)
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
return (
|
|
515
|
-
resolve()
|
|
516
|
-
)
|
|
517
|
-
})
|
|
425
|
+
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' }, (e) => (!e) ? resolve() : reject(e))
|
|
518
426
|
.on('close', resolve)
|
|
519
|
-
.on('error',
|
|
520
|
-
log(e)
|
|
521
|
-
|
|
522
|
-
reject(e)
|
|
523
|
-
})
|
|
427
|
+
.on('error', reject)
|
|
524
428
|
})
|
|
525
429
|
)
|
|
526
430
|
}
|
|
@@ -547,25 +451,9 @@ export function installSaveProdSaveExact (d, p, r, f) {
|
|
|
547
451
|
|
|
548
452
|
log(commands)
|
|
549
453
|
|
|
550
|
-
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' },
|
|
551
|
-
if (e) {
|
|
552
|
-
log(e)
|
|
553
|
-
|
|
554
|
-
return (
|
|
555
|
-
reject(e)
|
|
556
|
-
)
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
return (
|
|
560
|
-
resolve()
|
|
561
|
-
)
|
|
562
|
-
})
|
|
454
|
+
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' }, (e) => (!e) ? resolve() : reject(e))
|
|
563
455
|
.on('close', resolve)
|
|
564
|
-
.on('error',
|
|
565
|
-
log(e)
|
|
566
|
-
|
|
567
|
-
reject(e)
|
|
568
|
-
})
|
|
456
|
+
.on('error', reject)
|
|
569
457
|
})
|
|
570
458
|
)
|
|
571
459
|
}
|
|
@@ -592,25 +480,9 @@ export function installSaveProd (d, p, r, f) {
|
|
|
592
480
|
|
|
593
481
|
log(commands)
|
|
594
482
|
|
|
595
|
-
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' },
|
|
596
|
-
if (e) {
|
|
597
|
-
log(e)
|
|
598
|
-
|
|
599
|
-
return (
|
|
600
|
-
reject(e)
|
|
601
|
-
)
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
return (
|
|
605
|
-
resolve()
|
|
606
|
-
)
|
|
607
|
-
})
|
|
483
|
+
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' }, (e) => (!e) ? resolve() : reject(e))
|
|
608
484
|
.on('close', resolve)
|
|
609
|
-
.on('error',
|
|
610
|
-
log(e)
|
|
611
|
-
|
|
612
|
-
reject(e)
|
|
613
|
-
})
|
|
485
|
+
.on('error', reject)
|
|
614
486
|
})
|
|
615
487
|
)
|
|
616
488
|
}
|
package/src/install/index.js
CHANGED
|
@@ -92,25 +92,9 @@ export function installSaveExact (d, p, s, r, f) {
|
|
|
92
92
|
new Promise((resolve, reject) => {
|
|
93
93
|
const commands = getCommands(d, getInstallSaveExactCommands(p, s, r, f))
|
|
94
94
|
|
|
95
|
-
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' },
|
|
96
|
-
if (e) {
|
|
97
|
-
log(e)
|
|
98
|
-
|
|
99
|
-
return (
|
|
100
|
-
reject(e)
|
|
101
|
-
)
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return (
|
|
105
|
-
resolve()
|
|
106
|
-
)
|
|
107
|
-
})
|
|
95
|
+
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' }, (e) => (!e) ? resolve() : reject(e))
|
|
108
96
|
.on('close', resolve)
|
|
109
|
-
.on('error',
|
|
110
|
-
log(e)
|
|
111
|
-
|
|
112
|
-
reject(e)
|
|
113
|
-
})
|
|
97
|
+
.on('error', reject)
|
|
114
98
|
})
|
|
115
99
|
)
|
|
116
100
|
}
|
|
@@ -135,25 +119,9 @@ export function install (d, p, s, r, f) {
|
|
|
135
119
|
new Promise((resolve, reject) => {
|
|
136
120
|
const commands = getCommands(d, getInstallCommands(p, s, r, f))
|
|
137
121
|
|
|
138
|
-
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' },
|
|
139
|
-
if (e) {
|
|
140
|
-
log(e)
|
|
141
|
-
|
|
142
|
-
return (
|
|
143
|
-
reject(e)
|
|
144
|
-
)
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
return (
|
|
148
|
-
resolve()
|
|
149
|
-
)
|
|
150
|
-
})
|
|
122
|
+
spawn('/bin/bash', ['-c', commands], { shell: true, stdio: 'inherit' }, (e) => (!e) ? resolve() : reject(e))
|
|
151
123
|
.on('close', resolve)
|
|
152
|
-
.on('error',
|
|
153
|
-
log(e)
|
|
154
|
-
|
|
155
|
-
reject(e)
|
|
156
|
-
})
|
|
124
|
+
.on('error', reject)
|
|
157
125
|
})
|
|
158
126
|
)
|
|
159
127
|
}
|