Comparing version 5.2.0-rc.8 to 5.2.0-rc.9
@@ -10,3 +10,3 @@ 'use strict'; | ||
var version = "5.2.0-rc.8"; | ||
var version = "5.2.0-rc.9"; | ||
@@ -13,0 +13,0 @@ var main$1 = "Usage: pagedip <command> [--debug] [--silent] [--dev] [--help]\n [--version]\n\n The Pagedip CLI tool.\n\nCommands\n register Register this host with a Pagedip License key.\n install Install a Pagedip package by name.\n run Run a Pagedip app.\n start, server, ee Start a basic Pagedip Enterprise server.\n\n This is the main Pagedip CLI tool. With this tool you can install Pagedip\n packages, run servers, and more.\n\n The following app names can be used as commands directly: api, auth,\n couchdb-setup, editor, enterprise-edition, live, setup, theme, theme-server\n\n Run --help on any command for further help documentation.\n\nOptions\n --debug Show debug messages.\n -s, --silent All logs will be hidden.\n --dev Run in development mode.\n -h, -H, --help Shows this message.\n -v, -V, --version Prints the version and exits."; |
101
index.js
@@ -7,8 +7,7 @@ 'use strict'; | ||
var child_process = require('child_process'); | ||
var getNpmCliPath = _interopDefault(require('npm-cli-path')); | ||
var utilNpm = require('@pagedip/util-npm'); | ||
var resolve = require('@pagedip/util-resolve'); | ||
var resolve__default = _interopDefault(resolve); | ||
var fs = _interopDefault(require('mz/fs')); | ||
var child_process$1 = require('mz/child_process'); | ||
var child_process = require('mz/child_process'); | ||
var libRc = require('@pagedip/lib-rc'); | ||
@@ -185,46 +184,2 @@ var path = require('path'); | ||
var toConsumableArray = function (arr) { | ||
if (Array.isArray(arr)) { | ||
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; | ||
return arr2; | ||
} else { | ||
return Array.from(arr); | ||
} | ||
}; | ||
function formatPackageName(pkg) { | ||
@@ -242,42 +197,2 @@ if (typeof pkg !== "string" || !pkg) { | ||
var npmCli = void 0; | ||
var npmPath = function () { | ||
var _ref = asyncToGenerator(function* () { | ||
if (npmCli) return npmCli; | ||
var p = yield getNpmCliPath(); | ||
npmCli = p; | ||
return p; | ||
}); | ||
return function npmPath() { | ||
return _ref.apply(this, arguments); | ||
}; | ||
}(); | ||
var npmCommand = function () { | ||
var _ref2 = asyncToGenerator(function* (args) { | ||
var cli = yield npmPath(); | ||
return yield new Promise(function (resolve$$1, reject) { | ||
var cp = child_process.spawn("node", [cli].concat(toConsumableArray(args)), { | ||
stdio: "inherit" | ||
}); | ||
cp.on("exit", function (code) { | ||
code ? reject(new Error("npm command failed")) : resolve$$1(); | ||
}); | ||
cp.on("error", reject); | ||
}); | ||
}); | ||
return function npmCommand(_x) { | ||
return _ref2.apply(this, arguments); | ||
}; | ||
}(); | ||
function npmInstall(pkgname) { | ||
return npmCommand(["i", pkgname, "-g"]); | ||
} | ||
var install = (function () { | ||
@@ -288,7 +203,7 @@ var _ref = asyncToGenerator(function* (pkgs, opts) { | ||
opts = opts || {}; | ||
pkgs = pkgs.map(formatPackageName); | ||
for (var i = 0; i < pkgs.length; i++) { | ||
if (opts.logger) opts.logger.debug("Installing package '%s'", pkgs[i]); | ||
yield npmInstall(formatPackageName(pkgs[i])); | ||
} | ||
if (opts.logger) opts.logger.debug("Installing packages '%s'", pkgs); | ||
yield utilNpm.npmInstall(pkgs.concat("-g")); | ||
}); | ||
@@ -332,4 +247,4 @@ | ||
yield fs.writeFile(path.join(libRc.globalPath, ".pdlicense"), license); | ||
yield child_process$1.exec("npm config set @pagedip:registry https://license.system.pagedip.com/npm"); | ||
yield child_process$1.exec("npm config set //license.system.pagedip.com/:_authToken " + license); | ||
yield child_process.exec("npm config set @pagedip:registry https://license.system.pagedip.com/npm"); | ||
yield child_process.exec("npm config set //license.system.pagedip.com/:_authToken " + license); | ||
}); | ||
@@ -336,0 +251,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"public": true, | ||
"version": "5.2.0-rc.8", | ||
"version": "5.2.0-rc.9", | ||
"author": "Tyler Johnson <tyler@beneaththeink.com>", | ||
@@ -30,2 +30,3 @@ "repository": { | ||
"@pagedip/util-resolve": "^1.0.0-rc.4", | ||
"@pagedip/util-npm": "^1.0.0-rc.0", | ||
"inquirer": "^3.1.1", | ||
@@ -46,3 +47,3 @@ "mz": "^2.7.0", | ||
], | ||
"gitHead": "ec545a5ce43b80b4a16db5d2689c7a2a6c0807d6" | ||
"gitHead": "ce3fa13eca8a4eb4e82e0890ae9889b961d8fec0" | ||
} |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
0
15412
7
430
+ Added@pagedip/util-logger@2.2.8(transitive)
+ Added@pagedip/util-npm@1.4.7(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedaproba@2.0.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedcolor-support@1.1.3(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcomponent-emitter@1.3.1(transitive)
+ Addedcookiejar@2.1.4(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddebug@3.2.7(transitive)
+ Addeddeep-extend@0.6.0(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedform-data@2.5.1(transitive)
+ Addedformidable@1.2.6(transitive)
+ Addedgauge@3.0.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedglobal-npm@0.3.0(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedmethods@1.1.2(transitive)
+ Addedmime@1.6.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedms@2.1.3(transitive)
+ Addedobject-inspect@1.13.2(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedqs@6.13.0(transitive)
+ Addedrc@1.2.8(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedregistry-auth-token@3.4.0(transitive)
+ Addedsafe-buffer@5.1.25.2.1(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedsuperagent@3.8.3(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)