From 70d32c00380ef4ef475321670fcc07f6cf81ae04 Mon Sep 17 00:00:00 2001 From: James Messinger Date: Sun, 29 Mar 2020 08:32:01 -0500 Subject: [PATCH] release v1.1.0 --- dist/index.js | 34 ++++++++++++++++++---------- dist/index.js.map | 2 +- dist/sourcemap-register.js | 45 ++++++++------------------------------ package-lock.json | 2 +- package.json | 2 +- 5 files changed, 34 insertions(+), 51 deletions(-) diff --git a/dist/index.js b/dist/index.js index 3781780..60bd48f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -199,15 +199,19 @@ exports.npm = { /** * Gets the latest published version of the specified package. */ - async getLatestVersion(name, { debug }) { + async getLatestVersion(name, options) { + // Update the NPM config with the specified registry and token + await npm_config_1.setNpmConfig(options); try { - debug(`Running command: npm view ${name} version`); + // Get the environment variables to pass to NPM + let env = getNpmEnvironment(options); + options.debug(`Running command: npm view ${name} version`); // Run NPM to get the latest published versiono of the package - let process = await ezSpawn.async("npm", "view", name, "version"); - let version = process.stdout.trim(); + let { stdout } = await ezSpawn.async("npm", ["view", name, "version"], { env }); + let version = stdout.trim(); // Parse/validate the version number let semver = new semver_1.SemVer(version); - debug(`The local version of ${name} is at v${semver}`); + options.debug(`The local version of ${name} is at v${semver}`); return semver; } catch (error) { @@ -225,21 +229,27 @@ exports.npm = { let cwd = path_1.resolve(path_1.dirname(options.package)); // Determine whether to suppress NPM's output let stdio = options.quiet ? "pipe" : "inherit"; - // Only pass environment variables if we need to set the NPM token - let env = Boolean(options.token && process.env.INPUT_TOKEN !== options.token); + // Get the environment variables to pass to NPM + let env = getNpmEnvironment(options); options.debug("Running command: npm publish", { stdio, cwd, env }); // Run NPM to publish the package - await ezSpawn.async("npm", ["publish"], { - cwd, - stdio, - env: env ? { ...process.env, INPUT_TOKEN: options.token } : undefined - }); + await ezSpawn.async("npm", ["publish"], { cwd, stdio, env }); } catch (error) { throw ono_1.ono(error, `Unable to publish ${name} v${version} to NPM.`); } }, }; +/** + * Returns the environment variables that should be passed to NPM, based on the given options. + */ +function getNpmEnvironment(options) { + // Determine if we need to set the NPM token + let needsToken = Boolean(options.token && process.env.INPUT_TOKEN !== options.token); + if (needsToken) { + return { ...process.env, INPUT_TOKEN: options.token }; + } +} /***/ }), diff --git a/dist/index.js.map b/dist/index.js.map index 800cf07..4cb22b1 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["/webpack/bootstrap","../node_modules/cross-spawn/index.js","../node_modules/path-key/index.js","../src/action/index.ts","../src/npm.ts","../external \"os\"","../node_modules/@jsdevtools/ono/cjs/stack.js","../external \"child_process\"","../node_modules/@jsdevtools/ez-spawn/lib/process-error.js","../node_modules/isexe/mode.js","../node_modules/@jsdevtools/ono/cjs/index.js","../src/read-manifest.ts","../node_modules/@jsdevtools/ono/cjs/extend-error.js","../node_modules/@jsdevtools/ez-spawn/lib/sync.js","../node_modules/cross-spawn/lib/util/readShebang.js","../node_modules/@actions/core/lib/command.js","../node_modules/cross-spawn/lib/util/escape.js","../node_modules/@actions/core/lib/core.js","../node_modules/@jsdevtools/ono/cjs/to-json.js","../node_modules/cross-spawn/lib/util/resolveCommand.js","../node_modules/@jsdevtools/ono/cjs/constructor.js","../external \"semver\"","../src/npm-config.ts","../node_modules/cross-spawn/lib/parse.js","../external \"path\"","../node_modules/type-detect/type-detect.js","../external \"util\"","../node_modules/@jsdevtools/ono/cjs/normalize.js","../node_modules/@jsdevtools/ez-spawn/lib/normalize-result.js","../node_modules/@jsdevtools/ez-spawn/lib/index.js","../node_modules/isexe/index.js","../external \"fs\"","../src/normalize-options.ts","../node_modules/@jsdevtools/ono/cjs/singleton.js","../node_modules/@jsdevtools/ono/cjs/isomorphic.node.js","../src/npm-publish.ts","../node_modules/call-me-maybe/index.js","../node_modules/which/which.js","../node_modules/shebang-regex/index.js","../node_modules/isexe/windows.js","../external \"url\"","../node_modules/shebang-command/index.js","../node_modules/@jsdevtools/ez-spawn/lib/normalize-args.js","../node_modules/cross-spawn/lib/enoent.js","../node_modules/@jsdevtools/ez-spawn/lib/process.js","../node_modules/string-argv/index.js","../node_modules/@jsdevtools/ez-spawn/lib/async.js"],"names":[],"mappings":";;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;ACrCa;;AAEb,WAAW,mBAAO,CAAC,GAAe;AAClC,cAAc,mBAAO,CAAC,GAAa;AACnC,eAAe,mBAAO,CAAC,GAAc;;AAErC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,cAAc;AACd,cAAc;AACd,cAAc;;AAEd,cAAc;AACd,cAAc;;;;;;;;;ACtCD;;AAEb,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,cAAc;AACd;AACA,cAAc;;;;;;;;;;;ACfd,wCAAsE;AACtE,+CAA4C;AAG5C;;;GAGG;AACH,KAAK,UAAU,IAAI;IACjB,IAAI;QACF,8BAA8B;QAC9B,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;QAC9C,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;QAE/C,uCAAuC;QACvC,MAAM,OAAO,GAAY;YACvB,KAAK,EAAE,eAAQ,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC5C,QAAQ,EAAE,eAAQ,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAClD,OAAO,EAAE,eAAQ,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAChD,YAAY,EAAE,eAAQ,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAA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AAK,CAAC,8BAA8B,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;YAEnE,iCAAiC;YACjC,MAAM,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE;gBACtC,GAAG;gBACH,KAAK;gBACL,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS;aACtE,CAAC,CAAC;SACJ;QACD,OAAO,KAAK,EAAE;YACZ,MAAM,SAAG,CAAC,KAAK,EAAE,qBAAqB,IAAI,KAAK,OAAO,UAAU,CAAC,CAAC;SACnE;IACH,CAAC;CACF,CAAC;;;;;;;;ACnEF,+B;;;;;;;;ACAa;AACb,sBAAsB,OAAO,iBAAiB,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iC;;;;;;;ACpGA,0C;;;;;;;;ACAa;;AAEb;AACA,6CAA6C,WAAW,MAAM,YAAY;AAC1E;AACA;AACA,cAAc;AACd;AACA,qBAAqB,mBAAm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AA2C,WAAW,yBAAyB;AAC/E;AACA;;;;;;;;;ACzCa;;AAEb,WAAW,mBAAO,CAAC,GAAI;AACvB,uBAAuB,mBAAO,CAAC,GAAiB;;AAEhD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK,YAAY;;AAEjB;AACA;AACA;;AAEA,cAAc;;;;;;;;;ACtBD;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO,iBAAiB,cAAc;AAC5D,wBAAwB,mBAAO,CAAC,EAAI;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,yBAAyB;AACzB;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,IAAI,GAAG,oBAAoB;AAChE;AACA;AACA;AACA;AACA,qBAAqB,WAAW,EAAE,yBAAyB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mC;;;;;;;;AC7Ea;;AAEb;AACA,0CAA0C;;AAE1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,IAAI;;AAEjB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,cAAc,IAAI;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,cAAc;AACd,cAAc;;;;;;;;;AC5CD;AACb;AACA,2BAA2B,+DAA+D,gBAAgB,EAAE,EAAE;AAC9G;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,qFAAqF;AACpH;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO,iBAAiB,cAAc;AAC5D,kBAAkB,mBAAO,CAAC,GAAW;AACrC,wBAAwB,mBAAO,CAAC,EAAI;AACpC,0BAA0B,mBAAO,CAAC,GAAM;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,aAAa,OAAO,cAAc,OAAO,cAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,6BAA6B,UAAU,EAAE,eAAe,EAAE,oBAAoB;AAC9E;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,sCAAsC;AAC3E;AACA,4DAA4D,KAAK;AACjE;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,KAAK;AACrC;AACA,OAAO;AACP,gC;;;;;;;;AChNa;AACb,sBAAsB,OAAO,iBAAiB,cAAc;AAC5D;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,mC;;;;;;;;AChDa;;AAEb,aAAa,mBAAO,CAAC,GAAM;AAC3B,cAAc,mBAAO,CAAC,GAAO;AAC7B,gBAAgB,mBAAO,CAAC,EAAU;;AAElC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,cAAc;;;;;;;;;AClDD;AACb,sBAAsB,OAAO,iBAAiB,cAAc;AAC5D,uBAAuB,mBAAO,CAAC,GAAgB;AAC/C,oBAAoB,mBAAO,CAAC,GAAa;AACzC,kBAAkB,mBAAO,CAAC,GAAW;AACrC;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,gCAAgC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uC;;;;;;;AC7CA,mC;;;;;;;;;;ACAA,yCAAgD;AAChD,uCAAsC;AACtC,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K,EAAE;QACZ,MAAM,SAAG,CAAC,KAAK,EAAE,yCAAyC,UAAU,EAAE,CAAC,CAAC;KACzE;AACH,CAAC;;;;;;;;;ACpGY;;AAEb,aAAa,mBAAO,CAAC,GAAM;AAC3B,uBAAuB,mBAAO,CAAC,GAAuB;AACtD,eAAe,mBAAO,CAAC,GAAe;AACtC,oBAAoB,mBAAO,CAAC,GAAoB;;AAEhD;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,6CAA6C,aAAa;AAC1D;AACA,uDAAuD;AACvD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;AACrC,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;AAEA,cAAc;;;;;;;;AC1Fd,iC;;;;;;;ACAA;AACA,CAAC,KAA4D,GAAG,cAAc;AAC9E,CAAC,SAC+B;AAChC,CAAC,qBAAqB;;AAEtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4DAA4D;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;;;;;;;ACnYD,iC;;;;;;;;ACAa;AACb,sBAAsB,OAAO,iBAAiB,cAAc;AAC5D,0BAA0B,mBAAO,CAAC,GAAmB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,OAAO;AACP,qC;;;;;;;;ACzDa;;AAEb,gBAAgB,mBAAO,CAAC,GAAW;AACnC,qBAAqB,mBAAO,CAAC,GAAiB;;AAE9C,cAAc;;AAEd;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,cAAc;AACzB,WAAW,kBAAkB;AAC7B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,aAAa;AACb;AACA,2BAA2B,6EAA6E;AACxG,6BAA6B,sEAAsE;;AAEnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnCa;;AAEb,cAAc,QAAQ,mBAAO,CAAC,GAAQ;AACtC,cAAc,SAAS,mBAAO,CAAC,GAAS;;;;;;;;ACHxC,SAAS,mBAAO,CAAC,GAAI;AACrB;AACA;AACA,SAAS,mBAAO,CAAC,GAAc;AAC/B,CAAC;AACD,SAAS,mBAAO,CAAC,GAAW;AAC5B;;AAEA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;A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,CAAC;IAClC,OAAO,OAAO,CAAC;AACjB,CAAC;AAxBD,gCAwBC;;;;;;;;;AClCW;;AAEZ;AACA;AACA;;AAEA,cAAc;AACd;AACA;AACA;AACA,0BAA0B,mBAAmB;AAC7C,OAAO;AACP,0BAA0B,UAAU;AACpC,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnBA;AACA;AACA;;AAEA,aAAa,mBAAO,CAAC,GAAM;AAC3B,4BAA4B;AAC5B,cAAc,mBAAO,CAAC,GAAO;;AAE7B;AACA,wCAAwC,IAAI,KAAK,iBAAiB;;AAElE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,KAAK,KAAK;AAC5D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,+BAA+B;AACxC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA,SAAS,+BAA+B;AACxC;;AAEA,iBAAiB,oBAAoB;AACrC;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,oBAAoB;AACvC;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,cAAc;AACd;;;;;;;;;AC5Ha;AACb,cAAc;;;;;;;;ACDd,cAAc;AACd;;AAEA,SAAS,mBAAO,CAAC,GAAI;;AAErB;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B;AAC5B;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;;;;;;;ACzCA,gC;;;;;;;;ACAa;AACb,qBAAqB,mBAAO,CAAC,GAAe;;AAE5C,cAAc;AACd;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,OAAO,GAAG,SAAS;AACzC;;;;;;;;;AClBa;;AAEb,OAAO,wBAAwB,GAAG,mBAAO,CAAC,GAAa,EAAE;AACzD,mBAAmB,mBAAO,CAAC,GAAa;;AAExC,cAAc;;AAEd;AACA,kDAAkD,WAAW,MAAM;AACnE,oCAAoC,0BAA0B;AAC9D,IAAI,0BAA0B;AAC9B;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA,WAAW,OAAO;AAClB,wBAAwB,0BAA0B,KAAK,8BAA8B;AACrF;AACA,WAAW,SAAS;AACpB;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA,MAAM,mCAAmC;;AAEzC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAU;AACV;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,iBAAiB;AAClC;;AAEA;AACA;AACA,kEAAkE,MAAM;AACxE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,UAAU,IAAI,cAAc;AAC/E;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA,iBAAiB,KAAK;AACtB;AACA;;;;;;;;;ACvNa;;AAEb;;AAEA;AACA,sCAAsC,QAAQ,GAAG,iBAAiB;AAClE;AACA;AACA,oBAAoB,QAAQ,GAAG,iBAAiB;AAChD;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iDAAiD;AACjD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,cAAc;AACd;AACA;AACA;AACA;AACA;;;;;;;;;AC1Da;;AAEb;AACA,6CAA6C,WAAW,MAAM,YAAY;AAC1E;AACA;AACA,cAAc;AACd;AACA,aAAa,OAAO;AACpB;AACA,gBAAgB,sEAAsE;AACtF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;;AAEA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,IAAI;AAC3B;AACA;AACA,sBAAsB,IAAI;AAC1B;AACA;;AAEA;AACA;AACA;;;;;;;;;ACjGa;AACb,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP,OAAO;AACP;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3Ca;;AAEb,sBAAsB,mBAAO,CAAC,GAAkB;AAChD,wBAAwB,mBAAO,CAAC,GAAoB;AACpD,cAAc,mBAAO,CAAC,GAAe;AACrC,cAAc,mBAAO,CAAC,EAAa;;AAEnC,cAAc;;AAEd;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA,MAAM,cAAc;AACpB;AACA,SAAS,oBAAoB;AAC7B;AACA;AACA;AACA,OAAO,0CAA0C;;AAEjD;AACA;AACA;AACA,uBAAuB,gCAAgC;AACvD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,gCAAgC;AACzD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,2BAA2B,qDAAqD;AAChF;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,mCAAmC,8DAA8D;AACjG;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t__webpack_require__.ab = __dirname + \"/\";\n\n \t// the startup function\n \tfunction startup() {\n \t\t// Load entry module and return exports\n \t\treturn __webpack_require__(48);\n \t};\n\n \t// run startup\n \treturn startup();\n","'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n","'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n","import { debug, getInput, setFailed, setOutput } from \"@actions/core\";\nimport { npmPublish } from \"../npm-publish\";\nimport { Options } from \"../options\";\n\n/**\n * The main entry point of the GitHub Action\n * @internal\n */\nasync function main(): Promise {\n try {\n // Setup global error handlers\n process.on(\"uncaughtException\", errorHandler);\n process.on(\"unhandledRejection\", errorHandler);\n\n // Get the GitHub Actions input options\n const options: Options = {\n token: getInput(\"token\", { required: true }),\n registry: getInput(\"registry\", { required: true }),\n package: getInput(\"package\", { required: true }),\n checkVersion: getInput(\"check-version\", { required: true }).toLowerCase() === \"true\",\n debug: debugHandler,\n };\n\n // Puglish to NPM\n let results = await npmPublish(options);\n\n // tslint:disable: no-console\n if (results.type === \"none\") {\n console.log(`\\n📦 ${results.package} v${results.version} is already published to NPM`);\n }\n else {\n console.log(`\\n📦 Successfully published ${results.package} v${results.version} to NPM`);\n }\n\n // Set the GitHub Actions output variables\n setOutput(\"type\", results.type);\n setOutput(\"version\", results.version);\n setOutput(\"old-version\", results.oldVersion);\n }\n catch (error) {\n errorHandler(error as Error);\n }\n}\n\n/**\n * Prints errors to the GitHub Actions console\n */\nfunction errorHandler(error: Error): void {\n let message = error.stack || error.message || String(error);\n setFailed(message);\n process.exit();\n}\n\n/**\n * Prints debug logs to the GitHub Actions console\n */\nfunction debugHandler(message: string, data?: object) {\n if (data) {\n message += \"\\n\" + JSON.stringify(data, undefined, 2);\n }\n\n debug(message);\n}\n\n// tslint:disable-next-line: no-floating-promises\nmain();\n","import * as ezSpawn from \"@jsdevtools/ez-spawn\";\nimport { ono } from \"@jsdevtools/ono\";\nimport { StdioOptions } from \"child_process\";\nimport { dirname, resolve } from \"path\";\nimport { SemVer } from \"semver\";\nimport { NormalizedOptions } from \"./normalize-options\";\nimport { setNpmConfig } from \"./npm-config\";\nimport { Manifest } from \"./read-manifest\";\n\n/**\n * Runs NPM commands.\n * @internal\n */\nexport const npm = {\n /**\n * Gets the latest published version of the specified package.\n */\n async getLatestVersion(name: string, { debug }: NormalizedOptions): Promise {\n try {\n debug(`Running command: npm view ${name} version`);\n\n // Run NPM to get the latest published versiono of the package\n let process = await ezSpawn.async(\"npm\", \"view\", name, \"version\");\n let version = process.stdout.trim();\n\n // Parse/validate the version number\n let semver = new SemVer(version);\n\n debug(`The local version of ${name} is at v${semver}`);\n return semver;\n }\n catch (error) {\n throw ono(error, `Unable to determine the current version of ${name} on NPM.`);\n }\n },\n\n\n /**\n * Publishes the specified package to NPM\n */\n async publish({ name, version }: Manifest, options: NormalizedOptions): Promise {\n // Update the NPM config with the specified registry and token\n await setNpmConfig(options);\n\n try {\n // Run \"npm publish\" in the package.json directory\n let cwd = resolve(dirname(options.package));\n\n // Determine whether to suppress NPM's output\n let stdio: StdioOptions = options.quiet ? \"pipe\" : \"inherit\";\n\n // Only pass environment variables if we need to set the NPM token\n let env = Boolean(options.token && process.env.INPUT_TOKEN !== options.token);\n\n options.debug(\"Running command: npm publish\", { stdio, cwd, env });\n\n // Run NPM to publish the package\n await ezSpawn.async(\"npm\", [\"publish\"], {\n cwd,\n stdio,\n env: env ? { ...process.env, INPUT_TOKEN: options.token } : undefined\n });\n }\n catch (error) {\n throw ono(error, `Unable to publish ${name} v${version} to NPM.`);\n }\n },\n};\n","module.exports = require(\"os\");","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst newline = /\\r?\\n/;\nconst onoCall = /\\bono[ @]/;\n/**\n * Is the property lazily computed?\n */\nfunction isLazyStack(stackProp) {\n return Boolean(stackProp &&\n stackProp.configurable &&\n typeof stackProp.get === \"function\");\n}\nexports.isLazyStack = isLazyStack;\n/**\n * Is the stack property writable?\n */\nfunction isWritableStack(stackProp) {\n return Boolean(\n // If there is no stack property, then it's writable, since assigning it will create it\n !stackProp ||\n stackProp.writable ||\n typeof stackProp.set === \"function\");\n}\nexports.isWritableStack = isWritableStack;\n/**\n * Appends the original `Error.stack` property to the new Error's stack.\n */\nfunction joinStacks(newError, originalError) {\n let newStack = popStack(newError.stack);\n let originalStack = originalError ? originalError.stack : undefined;\n if (newStack && originalStack) {\n return newStack + \"\\n\\n\" + originalStack;\n }\n else {\n return newStack || originalStack;\n }\n}\nexports.joinStacks = joinStacks;\n/**\n * Calls `joinStacks` lazily, when the `Error.stack` property is accessed.\n */\nfunction lazyJoinStacks(lazyStack, newError, originalError) {\n if (originalError) {\n Object.defineProperty(newError, \"stack\", {\n get: () => {\n let newStack = lazyStack.get.apply(newError);\n return joinStacks({ stack: newStack }, originalError);\n },\n enumerable: false,\n configurable: true\n });\n }\n else {\n lazyPopStack(newError, lazyStack);\n }\n}\nexports.lazyJoinStacks = lazyJoinStacks;\n/**\n * Removes Ono from the stack, so that the stack starts at the original error location\n */\nfunction popStack(stack) {\n if (stack) {\n let lines = stack.split(newline);\n // Find the Ono call(s) in the stack, and remove them\n let onoStart;\n for (let i = 0; i < lines.length; i++) {\n let line = lines[i];\n if (onoCall.test(line)) {\n if (onoStart === undefined) {\n // We found the first Ono call in the stack trace.\n // There may be other subsequent Ono calls as well.\n onoStart = i;\n }\n }\n else if (onoStart !== undefined) {\n // We found the first non-Ono call after one or more Ono calls.\n // So remove the Ono call lines from the stack trace\n lines.splice(onoStart, i - onoStart);\n break;\n }\n }\n if (lines.length > 0) {\n return lines.join(\"\\n\");\n }\n }\n // If we get here, then the stack doesn't contain a call to `ono`.\n // This may be due to minification or some optimization of the JS engine.\n // So just return the stack as-is.\n return stack;\n}\n/**\n * Calls `popStack` lazily, when the `Error.stack` property is accessed.\n */\nfunction lazyPopStack(error, lazyStack) {\n Object.defineProperty(error, \"stack\", {\n get: () => popStack(lazyStack.get.apply(error)),\n enumerable: false,\n configurable: true\n });\n}\n//# sourceMappingURL=stack.js.map","module.exports = require(\"child_process\");","\"use strict\";\n\n/**\n * An instance of this class is returned by {@link sync} and {@link async} when the process exits\n * with a non-zero status code.\n */\nmodule.exports = class ProcessError extends Error {\n constructor (process) {\n let message = `${process.toString()} exited with a status of ${process.status}.`;\n\n if (process.stderr.length > 0) {\n message += \"\\n\\n\" + process.stderr.toString().trim();\n }\n\n super(message);\n Object.assign(this, process);\n this.name = ProcessError.name;\n }\n};\n","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst singleton_1 = require(\"./singleton\");\nexports.ono = singleton_1.ono;\nvar constructor_1 = require(\"./constructor\");\nexports.Ono = constructor_1.Ono;\n// tslint:disable-next-line: no-default-export\nexports.default = singleton_1.ono;\n// CommonJS default export hack\nif (typeof module === \"object\" && typeof module.exports === \"object\") {\n module.exports = Object.assign(module.exports.default, module.exports); // tslint:disable-line: no-unsafe-any\n}\n//# sourceMappingURL=index.js.map","import { ono } from \"@jsdevtools/ono\";\nimport { promises as fs } from \"fs\";\nimport { resolve } from \"path\";\nimport { SemVer } from \"semver\";\nimport { Debug } from \"./options\";\n\n/**\n * A package manifest (package.json)\n * @internal\n */\nexport interface Manifest {\n name: string;\n version: SemVer;\n}\n\n/**\n * Reads the package manifest (package.json) and returns its parsed contents\n * @internal\n */\nexport async function readManifest(path: string, debug?: Debug): Promise {\n debug && debug(`Reading package manifest from ${resolve(path)}`);\n let json: string;\n\n try {\n json = await fs.readFile(path, \"utf-8\");\n }\n catch (error) {\n throw ono(error, `Unable to read ${path}`);\n }\n\n try {\n let { name, version } = JSON.parse(json) as Record;\n\n if (typeof name !== \"string\" || name.trim().length === 0) {\n throw new TypeError(`Invalid package name`);\n }\n\n let manifest: Manifest = {\n name,\n version: new SemVer(version as string),\n };\n\n debug && debug(\"MANIFEST:\", manifest);\n return manifest;\n }\n catch (error) {\n throw ono(error, `Unable to parse ${path}`);\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst isomorphic_node_1 = require(\"./isomorphic.node\");\nconst stack_1 = require(\"./stack\");\nconst to_json_1 = require(\"./to-json\");\nconst protectedProps = [\"name\", \"message\", \"stack\"];\n/**\n * Extends the new error with the properties of the original error and the `props` object.\n *\n * @param newError - The error object to extend\n * @param originalError - The original error object, if any\n * @param props - Additional properties to add, if any\n */\nfunction extendError(error, originalError, props) {\n let onoError = error;\n extendStack(onoError, originalError);\n // Copy properties from the original error\n if (originalError && typeof originalError === \"object\") {\n mergeErrors(onoError, originalError);\n }\n // The default `toJSON` method doesn't output props like `name`, `message`, `stack`, etc.\n // So replace it with one that outputs every property of the error.\n onoError.toJSON = to_json_1.toJSON;\n // On Node.js, add support for the `util.inspect()` method\n if (isomorphic_node_1.addInspectMethod) {\n isomorphic_node_1.addInspectMethod(onoError);\n }\n // Finally, copy custom properties that were specified by the user.\n // These props OVERWRITE any previous props\n if (props && typeof props === \"object\") {\n Object.assign(onoError, props);\n }\n return onoError;\n}\nexports.extendError = extendError;\n/**\n * Extend the error stack to include its cause\n */\nfunction extendStack(newError, originalError) {\n let stackProp = Object.getOwnPropertyDescriptor(newError, \"stack\");\n if (stack_1.isLazyStack(stackProp)) {\n stack_1.lazyJoinStacks(stackProp, newError, originalError);\n }\n else if (stack_1.isWritableStack(stackProp)) {\n newError.stack = stack_1.joinStacks(newError, originalError);\n }\n}\n/**\n * Merges properties of the original error with the new error.\n *\n * @param newError - The error object to extend\n * @param originalError - The original error object, if any\n */\nfunction mergeErrors(newError, originalError) {\n // Get the original error's keys\n // NOTE: We specifically exclude properties that we have already set on the new error.\n // This is _especially_ important for the `stack` property, because this property has\n // a lazy getter in some environments\n let keys = to_json_1.getDeepKeys(originalError, protectedProps);\n // HACK: We have to cast the errors to `any` so we can use symbol indexers.\n // see https://github.com/Microsoft/TypeScript/issues/1863\n // tslint:disable: no-any no-unsafe-any\n let _newError = newError;\n let _originalError = originalError;\n for (let key of keys) {\n if (_newError[key] === undefined) {\n try {\n _newError[key] = _originalError[key];\n }\n catch (e) {\n // This property is read-only, so it can't be copied\n }\n }\n }\n}\n//# sourceMappingURL=extend-error.js.map","\"use strict\";\n\nconst normalizeArgs = require(\"./normalize-args\");\nconst normalizeResult = require(\"./normalize-result\");\nconst spawnSync = require(\"cross-spawn\").sync;\n\nmodule.exports = sync;\n\n/**\n * Executes the given command synchronously, and returns the buffered results.\n *\n * @param {string|string[]} command - The command to run\n * @param {string|string[]} [args] - The command arguments\n * @param {object} [options] - options\n * @returns {Process}\n *\n * @see {@link normalizeArgs} for argument details\n */\nfunction sync () {\n // Normalize the function arguments\n let { command, args, options, error } = normalizeArgs(arguments);\n\n if (error) {\n // Invalid arguments\n normalizeResult({ command, args, options, error });\n }\n else {\n let result;\n\n try {\n // Run the program\n result = spawnSync(command, args, options);\n }\n catch (error) {\n // An error occurred while spawning or killing the process\n normalizeResult({ error, command, args, options });\n }\n\n // Return the results or throw an error\n return normalizeResult(Object.assign({}, result, { command, args, options }));\n }\n}\n","'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n","\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os = __importStar(require(\"os\"));\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return (s || '')\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return (s || '')\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(\\\\*)\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(\\\\*)$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst command_1 = require(\"./command\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable\n */\nfunction exportVariable(name, val) {\n process.env[name] = val;\n command_1.issueCommand('set-env', { name }, val);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n command_1.issueCommand('add-path', {}, inputPath);\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input. The value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store\n */\nfunction setOutput(name, value) {\n command_1.issueCommand('set-output', { name }, value);\n}\nexports.setOutput = setOutput;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message\n */\nfunction error(message) {\n command_1.issue('error', message);\n}\nexports.error = error;\n/**\n * Adds an warning issue\n * @param message warning issue message\n */\nfunction warning(message) {\n command_1.issue('warning', message);\n}\nexports.warning = warning;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store\n */\nfunction saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\n//# sourceMappingURL=core.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst nonJsonTypes = [\"function\", \"symbol\", \"undefined\"];\nconst protectedProps = [\"constructor\", \"prototype\", \"__proto__\"];\nconst objectPrototype = Object.getPrototypeOf({});\n/**\n * Custom JSON serializer for Error objects.\n * Returns all built-in error properties, as well as extended properties.\n */\nfunction toJSON() {\n // HACK: We have to cast the objects to `any` so we can use symbol indexers.\n // see https://github.com/Microsoft/TypeScript/issues/1863\n // tslint:disable: no-any no-unsafe-any\n let pojo = {};\n let error = this;\n for (let key of getDeepKeys(error)) {\n if (typeof key === \"string\") {\n let value = error[key];\n let type = typeof value;\n if (!nonJsonTypes.includes(type)) {\n pojo[key] = value;\n }\n }\n }\n // tslint:enable: no-any no-unsafe-any\n return pojo;\n}\nexports.toJSON = toJSON;\n/**\n * Returns own, inherited, enumerable, non-enumerable, string, and symbol keys of `obj`.\n * Does NOT return members of the base Object prototype, or the specified omitted keys.\n */\nfunction getDeepKeys(obj, omit = []) {\n let keys = [];\n // Crawl the prototype chain, finding all the string and symbol keys\n while (obj && obj !== objectPrototype) {\n keys = keys.concat(Object.getOwnPropertyNames(obj), Object.getOwnPropertySymbols(obj));\n obj = Object.getPrototypeOf(obj);\n }\n // De-duplicate the list of keys\n let uniqueKeys = new Set(keys);\n // Remove any omitted keys\n for (let key of omit.concat(protectedProps)) {\n uniqueKeys.delete(key);\n }\n return uniqueKeys;\n}\nexports.getDeepKeys = getDeepKeys;\n//# sourceMappingURL=to-json.js.map","'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst pathKey = require('path-key')();\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: (parsed.options.env || process.env)[pathKey],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst extend_error_1 = require(\"./extend-error\");\nconst normalize_1 = require(\"./normalize\");\nconst to_json_1 = require(\"./to-json\");\nconst constructor = Ono;\nexports.Ono = constructor;\n/**\n * Creates an `Ono` instance for a specifc error type.\n */\n// tslint:disable-next-line: variable-name\nfunction Ono(ErrorConstructor, options) {\n options = normalize_1.normalizeOptions(options);\n function ono(...args) {\n let { originalError, props, message } = normalize_1.normalizeArgs(args, options);\n // Create a new error of the specified type\n let newError = new ErrorConstructor(message);\n // Extend the error with the properties of the original error and the `props` object\n return extend_error_1.extendError(newError, originalError, props);\n }\n ono[Symbol.species] = ErrorConstructor;\n return ono;\n}\n/**\n * Returns an object containing all properties of the given Error object,\n * which can be used with `JSON.stringify()`.\n */\nOno.toJSON = function toJSON(error) {\n return to_json_1.toJSON.call(error);\n};\n/**\n * Extends the given Error object with enhanced Ono functionality, such as nested stack traces,\n * additional properties, and improved support for `JSON.stringify()`.\n */\nOno.extend = function extend(error, originalError, props) {\n if (props || originalError instanceof Error) {\n return extend_error_1.extendError(error, originalError, props);\n }\n else if (originalError) {\n return extend_error_1.extendError(error, undefined, originalError);\n }\n else {\n return extend_error_1.extendError(error);\n }\n};\n//# sourceMappingURL=constructor.js.map","module.exports = require(\"semver\");","import * as ezSpawn from \"@jsdevtools/ez-spawn\";\nimport { ono } from \"@jsdevtools/ono\";\nimport { promises as fs } from \"fs\";\nimport { EOL } from \"os\";\nimport { dirname } from \"path\";\nimport { NormalizedOptions } from \"./normalize-options\";\n\n/**\n * Sets/updates the NPM config based on the options.\n * @internal\n */\nexport async function setNpmConfig(options: NormalizedOptions): Promise {\n // Read the current NPM config\n let configPath = await getNpmConfigPath(options);\n let config = await readNpmConfig(configPath, options);\n\n // Update the config\n config = updateConfig(config, options);\n\n // Save the new config\n await writeNpmConfig(configPath, config, options);\n}\n\n\n/**\n * Updates the given NPM config with the specified options.\n */\nfunction updateConfig(config: string, { registry, debug }: NormalizedOptions): string {\n let authDomain = registry.origin.slice(registry.protocol.length);\n\n let lines = config.split(/\\r?\\n/);\n\n // Remove any existing lines that set the registry or token\n lines = lines.filter((line) =>\n !(line.startsWith(\"registry=\") || line.includes(\"_authToken=\"))\n );\n\n // Append the new registry and token to the end of the file\n lines.push(`${authDomain}/:_authToken=\\${INPUT_TOKEN}`);\n lines.push(`registry=${registry.href}`);\n\n config = lines.join(EOL).trim() + EOL;\n\n debug(`NEW NPM CONFIG: \\n${config}`);\n return config;\n}\n\n\n/**\n * Gets the path of the NPM config file.\n */\nasync function getNpmConfigPath({ debug }: NormalizedOptions): Promise {\n try {\n debug(`Running command: npm config get userconfig`);\n\n let process = await ezSpawn.async(\"npm\", \"config\", \"get\", \"userconfig\");\n return process.stdout.trim();\n }\n catch (error) {\n throw ono(error, `Unable to determine the NPM config file path.`);\n }\n}\n\n\n/**\n * Reads the NPM config file.\n */\nasync function readNpmConfig(configPath: string, { debug }: NormalizedOptions): Promise {\n try {\n debug(`Reading NPM config from ${configPath}`);\n\n let config = await fs.readFile(configPath, \"utf-8\");\n\n debug(`OLD NPM CONFIG: \\n${config}`);\n return config;\n }\n catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") {\n debug(`OLD NPM CONFIG: `);\n return \"\";\n }\n\n throw ono(error, `Unable to read the NPM config file: ${configPath}`);\n }\n}\n\n\n/**\n * Writes the NPM config file.\n */\nasync function writeNpmConfig(configPath: string, config: string, { debug }: NormalizedOptions): Promise {\n try {\n debug(`Writing new NPM config to ${configPath}`);\n\n await fs.mkdir(dirname(configPath), { recursive: true });\n await fs.writeFile(configPath, config);\n }\n catch (error) {\n throw ono(error, `Unable to update the NPM config file: ${configPath}`);\n }\n}\n","'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n","module.exports = require(\"path\");","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.typeDetect = factory());\n}(this, (function () { 'use strict';\n\n/* !\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\nvar promiseExists = typeof Promise === 'function';\n\n/* eslint-disable no-undef */\nvar globalObject = typeof self === 'object' ? self : global; // eslint-disable-line id-blacklist\n\nvar symbolExists = typeof Symbol !== 'undefined';\nvar mapExists = typeof Map !== 'undefined';\nvar setExists = typeof Set !== 'undefined';\nvar weakMapExists = typeof WeakMap !== 'undefined';\nvar weakSetExists = typeof WeakSet !== 'undefined';\nvar dataViewExists = typeof DataView !== 'undefined';\nvar symbolIteratorExists = symbolExists && typeof Symbol.iterator !== 'undefined';\nvar symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== 'undefined';\nvar setEntriesExists = setExists && typeof Set.prototype.entries === 'function';\nvar mapEntriesExists = mapExists && typeof Map.prototype.entries === 'function';\nvar setIteratorPrototype = setEntriesExists && Object.getPrototypeOf(new Set().entries());\nvar mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf(new Map().entries());\nvar arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === 'function';\nvar arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]());\nvar stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === 'function';\nvar stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(''[Symbol.iterator]());\nvar toStringLeftSliceLength = 8;\nvar toStringRightSliceLength = -1;\n/**\n * ### typeOf (obj)\n *\n * Uses `Object.prototype.toString` to determine the type of an object,\n * normalising behaviour across engine versions & well optimised.\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\nfunction typeDetect(obj) {\n /* ! Speed optimisation\n * Pre:\n * string literal x 3,039,035 ops/sec ±1.62% (78 runs sampled)\n * boolean literal x 1,424,138 ops/sec ±4.54% (75 runs sampled)\n * number literal x 1,653,153 ops/sec ±1.91% (82 runs sampled)\n * undefined x 9,978,660 ops/sec ±1.92% (75 runs sampled)\n * function x 2,556,769 ops/sec ±1.73% (77 runs sampled)\n * Post:\n * string literal x 38,564,796 ops/sec ±1.15% (79 runs sampled)\n * boolean literal x 31,148,940 ops/sec ±1.10% (79 runs sampled)\n * number literal x 32,679,330 ops/sec ±1.90% (78 runs sampled)\n * undefined x 32,363,368 ops/sec ±1.07% (82 runs sampled)\n * function x 31,296,870 ops/sec ±0.96% (83 runs sampled)\n */\n var typeofObj = typeof obj;\n if (typeofObj !== 'object') {\n return typeofObj;\n }\n\n /* ! Speed optimisation\n * Pre:\n * null x 28,645,765 ops/sec ±1.17% (82 runs sampled)\n * Post:\n * null x 36,428,962 ops/sec ±1.37% (84 runs sampled)\n */\n if (obj === null) {\n return 'null';\n }\n\n /* ! Spec Conformance\n * Test: `Object.prototype.toString.call(window)``\n * - Node === \"[object global]\"\n * - Chrome === \"[object global]\"\n * - Firefox === \"[object Window]\"\n * - PhantomJS === \"[object Window]\"\n * - Safari === \"[object Window]\"\n * - IE 11 === \"[object Window]\"\n * - IE Edge === \"[object Window]\"\n * Test: `Object.prototype.toString.call(this)``\n * - Chrome Worker === \"[object global]\"\n * - Firefox Worker === \"[object DedicatedWorkerGlobalScope]\"\n * - Safari Worker === \"[object DedicatedWorkerGlobalScope]\"\n * - IE 11 Worker === \"[object WorkerGlobalScope]\"\n * - IE Edge Worker === \"[object WorkerGlobalScope]\"\n */\n if (obj === globalObject) {\n return 'global';\n }\n\n /* ! Speed optimisation\n * Pre:\n * array literal x 2,888,352 ops/sec ±0.67% (82 runs sampled)\n * Post:\n * array literal x 22,479,650 ops/sec ±0.96% (81 runs sampled)\n */\n if (\n Array.isArray(obj) &&\n (symbolToStringTagExists === false || !(Symbol.toStringTag in obj))\n ) {\n return 'Array';\n }\n\n // Not caching existence of `window` and related properties due to potential\n // for `window` to be unset before tests in quasi-browser environments.\n if (typeof window === 'object' && window !== null) {\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/browsers.html#location)\n * WhatWG HTML$7.7.3 - The `Location` interface\n * Test: `Object.prototype.toString.call(window.location)``\n * - IE <=11 === \"[object Object]\"\n * - IE Edge <=13 === \"[object Object]\"\n */\n if (typeof window.location === 'object' && obj === window.location) {\n return 'Location';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/#document)\n * WhatWG HTML$3.1.1 - The `Document` object\n * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268)\n * which suggests that browsers should use HTMLTableCellElement for\n * both TD and TH elements. WhatWG separates these.\n * WhatWG HTML states:\n * > For historical reasons, Window objects must also have a\n * > writable, configurable, non-enumerable property named\n * > HTMLDocument whose value is the Document interface object.\n * Test: `Object.prototype.toString.call(document)``\n * - Chrome === \"[object HTMLDocument]\"\n * - Firefox === \"[object HTMLDocument]\"\n * - Safari === \"[object HTMLDocument]\"\n * - IE <=10 === \"[object Document]\"\n * - IE 11 === \"[object HTMLDocument]\"\n * - IE Edge <=13 === \"[object HTMLDocument]\"\n */\n if (typeof window.document === 'object' && obj === window.document) {\n return 'Document';\n }\n\n if (typeof window.navigator === 'object') {\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray)\n * WhatWG HTML$8.6.1.5 - Plugins - Interface MimeTypeArray\n * Test: `Object.prototype.toString.call(navigator.mimeTypes)``\n * - IE <=10 === \"[object MSMimeTypesCollection]\"\n */\n if (typeof window.navigator.mimeTypes === 'object' &&\n obj === window.navigator.mimeTypes) {\n return 'MimeTypeArray';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)\n * WhatWG HTML$8.6.1.5 - Plugins - Interface PluginArray\n * Test: `Object.prototype.toString.call(navigator.plugins)``\n * - IE <=10 === \"[object MSPluginsCollection]\"\n */\n if (typeof window.navigator.plugins === 'object' &&\n obj === window.navigator.plugins) {\n return 'PluginArray';\n }\n }\n\n if ((typeof window.HTMLElement === 'function' ||\n typeof window.HTMLElement === 'object') &&\n obj instanceof window.HTMLElement) {\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)\n * WhatWG HTML$4.4.4 - The `blockquote` element - Interface `HTMLQuoteElement`\n * Test: `Object.prototype.toString.call(document.createElement('blockquote'))``\n * - IE <=10 === \"[object HTMLBlockElement]\"\n */\n if (obj.tagName === 'BLOCKQUOTE') {\n return 'HTMLQuoteElement';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/#htmltabledatacellelement)\n * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableDataCellElement`\n * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)\n * which suggests that browsers should use HTMLTableCellElement for\n * both TD and TH elements. WhatWG separates these.\n * Test: Object.prototype.toString.call(document.createElement('td'))\n * - Chrome === \"[object HTMLTableCellElement]\"\n * - Firefox === \"[object HTMLTableCellElement]\"\n * - Safari === \"[object HTMLTableCellElement]\"\n */\n if (obj.tagName === 'TD') {\n return 'HTMLTableDataCellElement';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/#htmltableheadercellelement)\n * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableHeaderCellElement`\n * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)\n * which suggests that browsers should use HTMLTableCellElement for\n * both TD and TH elements. WhatWG separates these.\n * Test: Object.prototype.toString.call(document.createElement('th'))\n * - Chrome === \"[object HTMLTableCellElement]\"\n * - Firefox === \"[object HTMLTableCellElement]\"\n * - Safari === \"[object HTMLTableCellElement]\"\n */\n if (obj.tagName === 'TH') {\n return 'HTMLTableHeaderCellElement';\n }\n }\n }\n\n /* ! Speed optimisation\n * Pre:\n * Float64Array x 625,644 ops/sec ±1.58% (80 runs sampled)\n * Float32Array x 1,279,852 ops/sec ±2.91% (77 runs sampled)\n * Uint32Array x 1,178,185 ops/sec ±1.95% (83 runs sampled)\n * Uint16Array x 1,008,380 ops/sec ±2.25% (80 runs sampled)\n * Uint8Array x 1,128,040 ops/sec ±2.11% (81 runs sampled)\n * Int32Array x 1,170,119 ops/sec ±2.88% (80 runs sampled)\n * Int16Array x 1,176,348 ops/sec ±5.79% (86 runs sampled)\n * Int8Array x 1,058,707 ops/sec ±4.94% (77 runs sampled)\n * Uint8ClampedArray x 1,110,633 ops/sec ±4.20% (80 runs sampled)\n * Post:\n * Float64Array x 7,105,671 ops/sec ±13.47% (64 runs sampled)\n * Float32Array x 5,887,912 ops/sec ±1.46% (82 runs sampled)\n * Uint32Array x 6,491,661 ops/sec ±1.76% (79 runs sampled)\n * Uint16Array x 6,559,795 ops/sec ±1.67% (82 runs sampled)\n * Uint8Array x 6,463,966 ops/sec ±1.43% (85 runs sampled)\n * Int32Array x 5,641,841 ops/sec ±3.49% (81 runs sampled)\n * Int16Array x 6,583,511 ops/sec ±1.98% (80 runs sampled)\n * Int8Array x 6,606,078 ops/sec ±1.74% (81 runs sampled)\n * Uint8ClampedArray x 6,602,224 ops/sec ±1.77% (83 runs sampled)\n */\n var stringTag = (symbolToStringTagExists && obj[Symbol.toStringTag]);\n if (typeof stringTag === 'string') {\n return stringTag;\n }\n\n var objPrototype = Object.getPrototypeOf(obj);\n /* ! Speed optimisation\n * Pre:\n * regex literal x 1,772,385 ops/sec ±1.85% (77 runs sampled)\n * regex constructor x 2,143,634 ops/sec ±2.46% (78 runs sampled)\n * Post:\n * regex literal x 3,928,009 ops/sec ±0.65% (78 runs sampled)\n * regex constructor x 3,931,108 ops/sec ±0.58% (84 runs sampled)\n */\n if (objPrototype === RegExp.prototype) {\n return 'RegExp';\n }\n\n /* ! Speed optimisation\n * Pre:\n * date x 2,130,074 ops/sec ±4.42% (68 runs sampled)\n * Post:\n * date x 3,953,779 ops/sec ±1.35% (77 runs sampled)\n */\n if (objPrototype === Date.prototype) {\n return 'Date';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-promise.prototype-@@tostringtag)\n * ES6$25.4.5.4 - Promise.prototype[@@toStringTag] should be \"Promise\":\n * Test: `Object.prototype.toString.call(Promise.resolve())``\n * - Chrome <=47 === \"[object Object]\"\n * - Edge <=20 === \"[object Object]\"\n * - Firefox 29-Latest === \"[object Promise]\"\n * - Safari 7.1-Latest === \"[object Promise]\"\n */\n if (promiseExists && objPrototype === Promise.prototype) {\n return 'Promise';\n }\n\n /* ! Speed optimisation\n * Pre:\n * set x 2,222,186 ops/sec ±1.31% (82 runs sampled)\n * Post:\n * set x 4,545,879 ops/sec ±1.13% (83 runs sampled)\n */\n if (setExists && objPrototype === Set.prototype) {\n return 'Set';\n }\n\n /* ! Speed optimisation\n * Pre:\n * map x 2,396,842 ops/sec ±1.59% (81 runs sampled)\n * Post:\n * map x 4,183,945 ops/sec ±6.59% (82 runs sampled)\n */\n if (mapExists && objPrototype === Map.prototype) {\n return 'Map';\n }\n\n /* ! Speed optimisation\n * Pre:\n * weakset x 1,323,220 ops/sec ±2.17% (76 runs sampled)\n * Post:\n * weakset x 4,237,510 ops/sec ±2.01% (77 runs sampled)\n */\n if (weakSetExists && objPrototype === WeakSet.prototype) {\n return 'WeakSet';\n }\n\n /* ! Speed optimisation\n * Pre:\n * weakmap x 1,500,260 ops/sec ±2.02% (78 runs sampled)\n * Post:\n * weakmap x 3,881,384 ops/sec ±1.45% (82 runs sampled)\n */\n if (weakMapExists && objPrototype === WeakMap.prototype) {\n return 'WeakMap';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-dataview.prototype-@@tostringtag)\n * ES6$24.2.4.21 - DataView.prototype[@@toStringTag] should be \"DataView\":\n * Test: `Object.prototype.toString.call(new DataView(new ArrayBuffer(1)))``\n * - Edge <=13 === \"[object Object]\"\n */\n if (dataViewExists && objPrototype === DataView.prototype) {\n return 'DataView';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%mapiteratorprototype%-@@tostringtag)\n * ES6$23.1.5.2.2 - %MapIteratorPrototype%[@@toStringTag] should be \"Map Iterator\":\n * Test: `Object.prototype.toString.call(new Map().entries())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (mapExists && objPrototype === mapIteratorPrototype) {\n return 'Map Iterator';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%setiteratorprototype%-@@tostringtag)\n * ES6$23.2.5.2.2 - %SetIteratorPrototype%[@@toStringTag] should be \"Set Iterator\":\n * Test: `Object.prototype.toString.call(new Set().entries())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (setExists && objPrototype === setIteratorPrototype) {\n return 'Set Iterator';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%arrayiteratorprototype%-@@tostringtag)\n * ES6$22.1.5.2.2 - %ArrayIteratorPrototype%[@@toStringTag] should be \"Array Iterator\":\n * Test: `Object.prototype.toString.call([][Symbol.iterator]())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (arrayIteratorExists && objPrototype === arrayIteratorPrototype) {\n return 'Array Iterator';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%stringiteratorprototype%-@@tostringtag)\n * ES6$21.1.5.2.2 - %StringIteratorPrototype%[@@toStringTag] should be \"String Iterator\":\n * Test: `Object.prototype.toString.call(''[Symbol.iterator]())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (stringIteratorExists && objPrototype === stringIteratorPrototype) {\n return 'String Iterator';\n }\n\n /* ! Speed optimisation\n * Pre:\n * object from null x 2,424,320 ops/sec ±1.67% (76 runs sampled)\n * Post:\n * object from null x 5,838,000 ops/sec ±0.99% (84 runs sampled)\n */\n if (objPrototype === null) {\n return 'Object';\n }\n\n return Object\n .prototype\n .toString\n .call(obj)\n .slice(toStringLeftSliceLength, toStringRightSliceLength);\n}\n\nreturn typeDetect;\n\n})));\n","module.exports = require(\"util\");","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst isomorphic_node_1 = require(\"./isomorphic.node\");\n/**\n * Normalizes Ono options, accounting for defaults and optional options.\n */\nfunction normalizeOptions(options) {\n options = options || {};\n return {\n concatMessages: options.concatMessages === undefined ? true : Boolean(options.concatMessages),\n format: options.format === undefined ? isomorphic_node_1.format\n : (typeof options.format === \"function\" ? options.format : false),\n };\n}\nexports.normalizeOptions = normalizeOptions;\n/**\n * Normalizes the Ono arguments, accounting for defaults, options, and optional arguments.\n */\nfunction normalizeArgs(args, options) {\n let originalError;\n let props;\n let formatArgs;\n let message = \"\";\n // Determine which arguments were actually specified\n if (typeof args[0] === \"string\") {\n formatArgs = args;\n }\n else if (typeof args[1] === \"string\") {\n if (args[0] instanceof Error) {\n originalError = args[0];\n }\n else {\n props = args[0];\n }\n formatArgs = args.slice(1);\n }\n else {\n originalError = args[0];\n props = args[1];\n formatArgs = args.slice(2);\n }\n // If there are any format arguments, then format the error message\n if (formatArgs.length > 0) {\n if (options.format) {\n message = options.format.apply(undefined, formatArgs);\n }\n else {\n message = formatArgs.join(\" \");\n }\n }\n if (options.concatMessages && originalError && originalError.message) {\n // The inner-error's message will be added to the new message\n message += (message ? \" \\n\" : \"\") + originalError.message;\n }\n return { originalError, props, message };\n}\nexports.normalizeArgs = normalizeArgs;\n//# sourceMappingURL=normalize.js.map","\"use strict\";\n\nconst Process = require(\"./process\");\nconst ProcessError = require(\"./process-error\");\n\nmodule.exports = normalizeResult;\n\n/**\n * @param {string} [command] - The command used to run the process\n * @param {string[]} [args] - The command-line arguments that were passed to the process\n * @param {number} [pid] - The process ID\n * @param {string|Buffer} [stdout] - The process's stdout\n * @param {string|Buffer} [stderr] - The process's stderr\n * @param {string[]|Buffer[]} [output] - The process's stdio\n * @param {number} [status] - The process's status code\n * @param {string} [signal] - The signal that was used to kill the process, if any\n * @param {object} [options] - The options used to run the process\n * @param {Error} [error] - An error, if one occurred\n * @returns {Process}\n */\nfunction normalizeResult ({ command, args, pid, stdout, stderr, output, status, signal, options, error }) {\n let process = new Process({ command, args, pid, stdout, stderr, output, status, signal, options });\n\n if (error) {\n if (process.status === undefined) {\n process.status = null;\n }\n throw Object.assign(error, process);\n }\n else if (process.status) {\n throw new ProcessError(process);\n }\n else {\n return process;\n }\n}\n","\"use strict\";\n\nmodule.exports.sync = require(\"./sync\");\nmodule.exports.async = require(\"./async\");\n","var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n","module.exports = require(\"fs\");","import { URL } from \"url\";\nimport { Debug, Options } from \"./options\";\n\n/**\n * Normalized and sanitized options\n * @internal\n */\nexport interface NormalizedOptions {\n token: string;\n registry: URL;\n package: string;\n checkVersion: boolean;\n quiet: boolean;\n debug: Debug;\n}\n\n/**\n * Normalizes and sanitizes options, and fills-in any default values.\n * @internal\n */\nexport function normalizeOptions(options: Options): NormalizedOptions {\n let registryURL = typeof options.registry === \"string\" ? new URL(options.registry) : options.registry;\n\n return {\n token: options.token || \"\",\n registry: registryURL || new URL(\"https://registry.npmjs.org/\"),\n package: options.package || \"package.json\",\n checkVersion: options.checkVersion === undefined ? true : Boolean(options.checkVersion),\n quiet: options.quiet || false,\n debug: options.debug || (() => undefined),\n };\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst constructor_1 = require(\"./constructor\");\nconst singleton = ono;\nexports.ono = singleton;\nono.error = new constructor_1.Ono(Error);\nono.eval = new constructor_1.Ono(EvalError);\nono.range = new constructor_1.Ono(RangeError);\nono.reference = new constructor_1.Ono(ReferenceError);\nono.syntax = new constructor_1.Ono(SyntaxError);\nono.type = new constructor_1.Ono(TypeError);\nono.uri = new constructor_1.Ono(URIError);\nconst onoMap = ono;\n/**\n * Creates a new error with the specified message, properties, and/or inner error.\n * If an inner error is provided, then the new error will match its type, if possible.\n */\nfunction ono(...args) {\n let originalError = args[0];\n // Is the first argument an Error-like object?\n if (typeof originalError === \"object\" && typeof originalError.name === \"string\") {\n // Try to find an Ono singleton method that matches this error type\n for (let typedOno of Object.values(onoMap)) {\n if (typeof typedOno === \"function\" && typedOno.name === \"ono\") {\n let species = typedOno[Symbol.species];\n if (species && species !== Error && (originalError instanceof species || originalError.name === species.name)) {\n // Create an error of the same type\n return typedOno.apply(undefined, args);\n }\n }\n }\n }\n // By default, create a base Error object\n return ono.error.apply(undefined, args);\n}\n//# sourceMappingURL=singleton.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util = require(\"util\");\nconst to_json_1 = require(\"./to-json\");\n// The `inspect()` method is actually a Symbol, not a string key.\n// https://nodejs.org/api/util.html#util_util_inspect_custom\nconst inspectMethod = util.inspect.custom || Symbol.for(\"nodejs.util.inspect.custom\");\n/**\n * Ono supports Node's `util.format()` formatting for error messages.\n *\n * @see https://nodejs.org/api/util.html#util_util_format_format_args\n */\nexports.format = util.format;\n/**\n * Adds an `inspect()` method to support Node's `util.inspect()` function.\n *\n * @see https://nodejs.org/api/util.html#util_util_inspect_custom\n */\nfunction addInspectMethod(newError) {\n // @ts-ignore\n newError[inspectMethod] = inspect;\n}\nexports.addInspectMethod = addInspectMethod;\n/**\n * Returns a representation of the error for Node's `util.inspect()` method.\n *\n * @see https://nodejs.org/api/util.html#util_custom_inspection_functions_on_objects\n */\nfunction inspect() {\n // HACK: We have to cast the objects to `any` so we can use symbol indexers.\n // see https://github.com/Microsoft/TypeScript/issues/1863\n // tslint:disable: no-any no-unsafe-any\n let pojo = {};\n let error = this;\n for (let key of to_json_1.getDeepKeys(error)) {\n let value = error[key];\n pojo[key] = value;\n }\n // Don't include the `inspect()` method on the output object,\n // otherwise it will cause `util.inspect()` to go into an infinite loop\n delete pojo[inspectMethod]; // tslint:disable-line: no-dynamic-delete\n // tslint:enable: no-any no-unsafe-any\n return pojo;\n}\n//# sourceMappingURL=isomorphic.node.js.map","import * as semver from \"semver\";\nimport { normalizeOptions } from \"./normalize-options\";\nimport { npm } from \"./npm\";\nimport { Options } from \"./options\";\nimport { readManifest } from \"./read-manifest\";\nimport { Results } from \"./results\";\n\n/**\n * Publishes a package to NPM, if its version has changed\n */\nexport async function npmPublish(opts: Options = {}): Promise {\n let options = normalizeOptions(opts);\n\n // Get the old and new version numbers\n let manifest = await readManifest(options.package, options.debug);\n let publishedVersion = await npm.getLatestVersion(manifest.name, options);\n\n // Determine if/how the version has changed\n let diff = semver.diff(manifest.version, publishedVersion);\n\n if (diff || !options.checkVersion) {\n // Publish the new version to NPM\n await npm.publish(manifest, options);\n }\n\n let results: Results = {\n package: manifest.name,\n type: diff || \"none\",\n version: manifest.version.raw,\n oldVersion: publishedVersion.raw,\n };\n\n options.debug(\"OUTPUT:\", results);\n return results;\n}\n","\"use strict\"\n\nvar next = (global.process && process.nextTick) || global.setImmediate || function (f) {\n setTimeout(f, 0)\n}\n\nmodule.exports = function maybe (cb, promise) {\n if (cb) {\n promise\n .then(function (result) {\n next(function () { cb(null, result) })\n }, function (err) {\n next(function () { cb(err) })\n })\n return undefined\n }\n else {\n return promise\n }\n}\n","const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","'use strict';\nmodule.exports = /^#!(.*)/;\n","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n","module.exports = require(\"url\");","'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n","\"use strict\";\n\nconst { parseArgsStringToArgv } = require(\"string-argv\"); // possible alternative: parse-spawn-args\nconst detectType = require(\"type-detect\");\n\nmodule.exports = normalizeArgs;\n\n/**\n * This function normalizes the arguments of the {@link sync} and {@link async}\n * so they can be passed to Node's {@link child_process.spawn} or\n * {@link child_process.spawn} functions.\n *\n * @param {string|string[]} command\n * The command to run (e.g. \"git\"), or the command and its arguments as a string\n * (e.g. \"git commit -a -m fixed_stuff\"), or the command and its arguments as an\n * array (e.g. [\"git\", \"commit\", \"-a\", \"-m\", \"fixed stuff\"]).\n *\n * @param {string|string[]} [args]\n * The command arguments as a string (e.g. \"git commit -a -m fixed_stuff\") or as an array\n * (e.g. [\"git\", \"commit\", \"-a\", \"-m\", \"fixed stuff\"]).\n *\n * @param {object} [options]\n * The same options as {@link child_process.spawn} or {@link child_process.spawnSync}.\n *\n * @param {function} [callback]\n * The callback that will receive the results, if applicable.\n *\n * @returns {object}\n */\nfunction normalizeArgs (params) {\n let command, args, options, callback, error;\n\n try {\n // Shift the arguments, if necessary\n ({ command, args, options, callback } = shiftArgs(params));\n\n let commandArgs = [];\n\n if (typeof command === \"string\" && args === undefined) {\n // The command parameter is actually the command AND arguments,\n // so split the string into an array\n command = splitArgString(command);\n }\n\n if (Array.isArray(command)) {\n // Split the command from the arguments\n commandArgs = command.slice(1);\n command = command[0];\n }\n\n if (typeof args === \"string\") {\n // Convert the `args` argument from a string an array\n args = splitArgString(args);\n }\n\n if (Array.isArray(args)) {\n // Add these arguments to any arguments from above\n args = commandArgs.concat(args);\n }\n\n if (args === undefined || args === null) {\n args = commandArgs;\n }\n\n if (options === undefined || options === null) {\n options = {};\n }\n\n // Set default options\n options.encoding = options.encoding || \"utf8\";\n\n // Validate all arguments\n validateArgs(command, args, options, callback);\n }\n catch (err) {\n error = err;\n\n // Sanitize args that are used as output\n command = String(command || \"\");\n args = (Array.isArray(args) ? args : []).map((arg) => String(arg || \"\"));\n }\n\n return { command, args, options, callback, error };\n}\n\n/**\n * Detects whether any optional arguments have been omitted,\n * and shifts the other arguments as needed.\n *\n * @param {string|string[]} command\n * @param {string|string[]} [args]\n * @param {object} [options]\n * @param {function} [callback]\n * @returns {object}\n */\nfunction shiftArgs (params) {\n params = Array.prototype.slice.call(params);\n let command, args, options, callback;\n\n // Check for a callback as the final parameter\n let lastParam = params[params.length - 1];\n if (typeof lastParam === \"function\") {\n callback = lastParam;\n params.pop();\n }\n\n // Check for an options object as the second-to-last parameter\n lastParam = params[params.length - 1];\n if (lastParam === null || lastParam === undefined ||\n (typeof lastParam === \"object\" && !Array.isArray(lastParam))) {\n options = lastParam;\n params.pop();\n }\n\n // The first parameter is the command\n command = params.shift();\n\n // All remaining parameters are the args\n if (params.length === 0) {\n args = undefined;\n }\n else if (params.length === 1 && Array.isArray(params[0])) {\n args = params[0];\n }\n else if (params.length === 1 && params[0] === \"\") {\n args = [];\n }\n else {\n args = params;\n }\n\n return { command, args, options, callback };\n}\n\n/**\n * Validates all arguments, and throws an error if any are invalid.\n *\n * @param {string} command\n * @param {string[]} args\n * @param {object} options\n * @param {function} [callback]\n */\nfunction validateArgs (command, args, options, callback) {\n if (command === undefined || command === null) {\n throw new Error(\"The command to execute is missing.\");\n }\n\n if (typeof command !== \"string\") {\n throw new Error(\"The command to execute should be a string, not \" + friendlyType(command));\n }\n\n if (!Array.isArray(args)) {\n throw new Error(\n \"The command arguments should be a string or an array, not \" +\n friendlyType(args)\n );\n }\n\n for (let i = 0; i < args.length; i++) {\n let arg = args[i];\n\n if (typeof arg !== \"string\") {\n throw new Error(\n `The command arguments should be strings, but argument #${i + 1} is ` +\n friendlyType(arg)\n );\n }\n }\n\n if (typeof options !== \"object\") {\n throw new Error(\n \"The options should be an object, not \" +\n friendlyType(options)\n );\n }\n\n if (callback !== undefined && callback !== null) {\n if (typeof callback !== \"function\") {\n throw new Error(\"The callback should be a function, not \" + friendlyType(callback));\n }\n }\n}\n\n/**\n * Splits an argument string (e.g. git commit -a -m \"fixed stuff\")\n * into an array (e.g. [\"git\", \"commit\", \"-a\", \"-m\", \"fixed stuff\"]).\n *\n * @param {string} argString\n * @returns {string[]}\n */\nfunction splitArgString (argString) {\n try {\n return parseArgsStringToArgv(argString);\n }\n catch (error) {\n throw new Error(`Could not parse the string: ${argString}\\n${error.message}`);\n }\n}\n\n/**\n * Returns the friendly type name of the given value, for use in error messages.\n *\n * @param {*} val\n * @returns {string}\n */\nfunction friendlyType (val) {\n let type = detectType(val);\n let firstChar = String(type)[0].toLowerCase();\n\n if ([\"a\", \"e\", \"i\", \"o\", \"u\"].indexOf(firstChar) === -1) {\n return `a ${type}.`;\n }\n else {\n return `an ${type}.`;\n }\n}\n","'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed, 'spawn');\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n","\"use strict\";\n\n/**\n * An instance of this class is returned by {@link sync} and {@link async}.\n * It contains information about how the process was spawned, how it exited, and its output.\n */\nmodule.exports = class Process {\n /**\n * @param {object} props - Initial property values\n */\n constructor ({ command, args, pid, stdout, stderr, output, status, signal, options }) {\n options = options || {};\n stdout = stdout || (options.encoding === \"buffer\" ? Buffer.from([]) : \"\");\n stderr = stderr || (options.encoding === \"buffer\" ? Buffer.from([]) : \"\");\n output = output || [options.input || null, stdout, stderr];\n\n /**\n * The command that was used to spawn the process\n *\n * @type {string}\n */\n this.command = command || \"\";\n\n /**\n * The command-line arguments that were passed to the process.\n *\n * @type {string[]}\n */\n this.args = args || [];\n\n /**\n * The numeric process ID assigned by the operating system\n *\n * @type {number}\n */\n this.pid = pid || 0;\n\n /**\n * The process's standard output\n *\n * @type {Buffer|string}\n */\n\n this.stdout = output[1];\n\n /**\n * The process's error output\n *\n * @type {Buffer|string}\n */\n this.stderr = output[2];\n\n /**\n * The process's stdio [stdin, stdout, stderr]\n *\n * @type {Buffer[]|string[]}\n */\n this.output = output;\n\n /**\n * The process's status code\n *\n * @type {number}\n */\n this.status = status;\n\n /**\n * The signal used to kill the process, if applicable\n *\n * @type {string}\n */\n this.signal = signal || null;\n }\n\n /**\n * Returns the full command and arguments used to spawn the process\n *\n * @type {string}\n */\n toString () {\n let string = this.command;\n\n for (let arg of this.args) {\n // Escape quotes\n arg = arg.replace(/\"/g, '\\\\\"');\n\n if (arg.indexOf(\" \") >= 0) {\n // Add quotes if the arg contains whitespace\n string += ` \"${arg}\"`;\n }\n else {\n string += ` ${arg}`;\n }\n }\n\n return string;\n }\n};\n","\"use strict\";\r\nexports.__esModule = true;\r\nfunction parseArgsStringToArgv(value, env, file) {\r\n // ([^\\s'\"]([^\\s'\"]*(['\"])([^\\3]*?)\\3)+[^\\s'\"]*) Matches nested quotes until the first space outside of quotes\r\n // [^\\s'\"]+ or Match if not a space ' or \"\r\n // (['\"])([^\\5]*?)\\5 or Match \"quoted text\" without quotes\r\n // `\\3` and `\\5` are a backreference to the quote style (' or \") captured\r\n var myRegexp = /([^\\s'\"]([^\\s'\"]*(['\"])([^\\3]*?)\\3)+[^\\s'\"]*)|[^\\s'\"]+|(['\"])([^\\5]*?)\\5/gi;\r\n var myString = value;\r\n var myArray = [];\r\n if (env) {\r\n myArray.push(env);\r\n }\r\n if (file) {\r\n myArray.push(file);\r\n }\r\n var match;\r\n do {\r\n // Each call to exec returns the next regex match as an array\r\n match = myRegexp.exec(myString);\r\n if (match !== null) {\r\n // Index 1 in the array is the captured group if it exists\r\n // Index 0 is the matched text, which we use if no captured group exists\r\n myArray.push(firstString(match[1], match[6], match[0]));\r\n }\r\n } while (match !== null);\r\n return myArray;\r\n}\r\nexports[\"default\"] = parseArgsStringToArgv;\r\nexports.parseArgsStringToArgv = parseArgsStringToArgv;\r\n// Accepts any number of arguments, and returns the first one that is a string\r\n// (even an empty string)\r\nfunction firstString() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n for (var i = 0; i < args.length; i++) {\r\n var arg = args[i];\r\n if (typeof arg === \"string\") {\r\n return arg;\r\n }\r\n }\r\n}\r\n","\"use strict\";\n\nconst normalizeArgs = require(\"./normalize-args\");\nconst normalizeResult = require(\"./normalize-result\");\nconst maybe = require(\"call-me-maybe\");\nconst spawn = require(\"cross-spawn\");\n\nmodule.exports = async;\n\n/**\n * Executes the given command asynchronously, and returns the buffered\n * results via a callback or Promise.\n *\n * @param {string|string[]} command - The command to run\n * @param {string|string[]} [args] - The command arguments\n * @param {object} [options] - options\n * @param {function} [callback] - callback that will receive the results\n *\n * @returns {Promise|undefined}\n * Returns a Promise if no callback is given. The promise resolves with\n * a {@link Process} object.\n *\n * @see {@link normalizeArgs} for argument details\n */\nfunction async () {\n // Normalize the function arguments\n let { command, args, options, callback, error } = normalizeArgs(arguments);\n\n return maybe(callback, new Promise((resolve, reject) => {\n if (error) {\n // Invalid arguments\n normalizeResult({ command, args, options, error });\n }\n else {\n let spawnedProcess;\n\n try {\n // Spawn the program\n spawnedProcess = spawn(command, args, options);\n }\n catch (error) {\n // An error occurred while spawning the process\n normalizeResult({ error, command, args, options });\n }\n\n let pid = spawnedProcess.pid;\n let stdout = options.encoding === \"buffer\" ? Buffer.from([]) : \"\";\n let stderr = options.encoding === \"buffer\" ? Buffer.from([]) : \"\";\n\n spawnedProcess.stdout && spawnedProcess.stdout.on(\"data\", (data) => {\n if (typeof stdout === \"string\") {\n stdout += data.toString();\n }\n else {\n stdout = Buffer.concat([stdout, data]);\n }\n });\n\n spawnedProcess.stderr && spawnedProcess.stderr.on(\"data\", (data) => {\n if (typeof stderr === \"string\") {\n stderr += data.toString();\n }\n else {\n stderr = Buffer.concat([stderr, data]);\n }\n });\n\n spawnedProcess.on(\"error\", (error) => {\n try {\n normalizeResult({ error, command, args, options, pid, stdout, stderr });\n }\n catch (error) {\n reject(error);\n }\n });\n\n spawnedProcess.on(\"exit\", (status, signal) => {\n try {\n resolve(normalizeResult({ command, args, options, pid, stdout, stderr, status, signal }));\n }\n catch (error) {\n reject(error);\n }\n });\n }\n }));\n}\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["/webpack/bootstrap","../node_modules/cross-spawn/index.js","../node_modules/path-key/index.js","../src/action/index.ts","../src/npm.ts","../external \"os\"","../node_modules/@jsdevtools/ono/cjs/stack.js","../external \"child_process\"","../node_modules/@jsdevtools/ez-spawn/lib/process-error.js","../node_modules/isexe/mode.js","../node_modules/@jsdevtools/ono/cjs/index.js","../src/read-manifest.ts","../node_modules/@jsdevtools/ono/cjs/extend-error.js","../node_modules/@jsdevtools/ez-spawn/lib/sync.js","../node_modules/cross-spawn/lib/util/readShebang.js","../node_modules/@actions/core/lib/command.js","../node_modules/cross-spawn/lib/util/escape.js","../node_modules/@actions/core/lib/core.js","../node_modules/@jsdevtools/ono/cjs/to-json.js","../node_modules/cross-spawn/lib/util/resolveCommand.js","../node_modules/@jsdevtools/ono/cjs/constructor.js","../external \"semver\"","../src/npm-config.ts","../node_modules/cross-spawn/lib/parse.js","../external \"path\"","../node_modules/type-detect/type-detect.js","../external \"util\"","../node_modules/@jsdevtools/ono/cjs/normalize.js","../node_modules/@jsdevtools/ez-spawn/lib/normalize-result.js","../node_modules/@jsdevtools/ez-spawn/lib/index.js","../node_modules/isexe/index.js","../external \"fs\"","../src/normalize-options.ts","../node_modules/@jsdevtools/ono/cjs/singleton.js","../node_modules/@jsdevtools/ono/cjs/isomorphic.node.js","../src/npm-publish.ts","../node_modules/call-me-maybe/index.js","../node_modules/which/which.js","../node_modules/shebang-regex/index.js","../node_modules/isexe/windows.js","../external \"url\"","../node_modules/shebang-command/index.js","../node_modules/@jsdevtools/ez-spawn/lib/normalize-args.js","../node_modules/cross-spawn/lib/enoent.js","../node_modules/@jsdevtools/ez-spawn/lib/process.js","../node_modules/string-argv/index.js","../node_modules/@jsdevtools/ez-spawn/lib/async.js"],"names":[],"mappings":";;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;ACrCa;;AAEb,WAAW,mBAAO,CAAC,GAAe;AAClC,cAAc,mBAAO,CAAC,GAAa;AACnC,eAAe,mBAAO,CAAC,GAAc;;AAErC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,cAAc;AACd,cAAc;AACd,cAAc;;AAEd,cAAc;AACd,cAAc;;;;;;;;;ACtCD;;AAEb,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,cAAc;AACd;AACA,cAAc;;;;;;;;;;;ACfd,wCAAsE;AACtE,+CAA4C;AAG5C;;;GAGG;AACH,KAAK,UAAU,IAAI;IACjB,IAAI;QACF,8BAA8B;QAC9B,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;QAC9C,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;QAE/C,uCAAuC;QACvC,MAAM,OAAO,GAAY;YACvB,KAAK,EAAE,eAAQ,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC5C,QAAQ,EAAE,eAAQ,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAClD,OAAO,EAAE,eAAQ,CAAC,SAAS,EAAE,EAAE,QAAQ,EA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ea;;AAEb,sBAAsB,mBAAO,CAAC,GAAkB;AAChD,wBAAwB,mBAAO,CAAC,GAAoB;AACpD,kBAAkB,mBAAO,CAAC,EAAa;;AAEvC,cAAc;;AAEd;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,aAAa;AACb;AACA,SAAS,oBAAoB;AAC7B;AACA;AACA;AACA,OAAO,gCAAgC;;AAEvC;AACA;AACA,qBAAqB,gCAAgC;AACrD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gCAAgC;AACvD;;AAEA;AACA,2CAA2C,WAAW,yBAAyB;AAC/E;AACA;;;;;;;;;ACzCa;;AAEb,WAAW,mBAAO,CAAC,GAAI;AACvB,uBAAuB,mBAAO,CAAC,GAAiB;;AAEhD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK,YAAY;;AAEjB;AACA;AACA;;AAEA,cAAc;;;;;;;;;ACtBD;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO,iBAAiB,cAAc;AAC5D,wBAAwB,mBAAO,CAAC,EAAI;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,yBAAyB;AACzB;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,IAAI,GAAG,oBAAoB;AAChE;AACA;AACA;AACA;AACA,qBAAqB,WAAW,EAAE,yBAAyB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mC;;;;;;;;AC7Ea;;AAEb;AACA,0CAA0C;;AAE1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,IAAI;;AAEjB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,cAAc,IAAI;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,cAAc;AACd,cAAc;;;;;;;;;AC5CD;AACb;AACA,2BAA2B,+DAA+D,gBAAgB,EAAE,EAAE;AAC9G;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,qFAAqF;AACpH;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO,iBAAiB,cAAc;AAC5D,kBAAkB,mBAAO,CAAC,GAAW;AACrC,wBAAwB,mBAAO,CAAC,EAAI;AACpC,0BAA0B,mBAAO,CAAC,GAAM;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,aAAa,OAAO,cAAc,OAAO,cAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC,6BAA6B,UAAU,EAAE,eAAe,EAAE,oBAAoB;AAC9E;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,sCAAsC;AAC3E;AACA,4DAA4D,KAAK;AACjE;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,KAAK;AACrC;AACA,OAAO;AACP,gC;;;;;;;;AChNa;AACb,sBAAsB,OAAO,iBAAiB,cAAc;AAC5D;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,mC;;;;;;;;AChDa;;AAEb,aAAa,mBAAO,CAAC,GAAM;AAC3B,cAAc,mBAAO,CAAC,GAAO;AAC7B,gBAAgB,mBAAO,CAAC,EAAU;;AAElC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,cAAc;;;;;;;;;AClDD;AACb,sBAAsB,OAAO,iBAAiB,cAA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;;;;;;;ACnYD,iC;;;;;;;;ACAa;AACb,sBAAsB,OAAO,iBAAiB,cAAc;AAC5D,0BAA0B,mBAAO,CAAC,GAAmB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,OAAO;AACP,qC;;;;;;;;ACzDa;;AAEb,gBAAgB,mBAAO,CAAC,GAAW;AACnC,qBAAqB,mBAAO,CAAC,GAAiB;;AAE9C,cAAc;;AAEd;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,cAAc;AACzB,WAAW,kBAAkB;AAC7B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,aAAa;AACb;AACA,2BAA2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;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAU;AACV;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,iBAAiB;AAClC;;AAEA;AACA;AACA,kEAAkE,MAAM;AACxE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,UAAU,IAAI,cAAc;AAC/E;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA,iBAAiB,KAAK;AACtB;AACA;;;;;;;;;ACvNa;;AAEb;;AAEA;AACA,sCAAsC,QAAQ,GAAG,iBAAiB;AAClE;AACA;AACA,oBAAoB,QAAQ,GAAG,iBAAiB;AAChD;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iDAAiD;AACjD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,cAAc;AACd;AACA;AACA;AACA;AACA;;;;;;;;;AC1Da;;AAEb;AACA,6CAA6C,WAAW,MAAM,YAAY;AAC1E;AACA;AACA,cAAc;AACd;AACA,aAAa,OAAO;AACpB;AACA,gBAAgB,sEAAsE;AACtF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;;AAEA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,IAAI;AAC3B;AACA;AACA,sBAAsB,IAAI;AAC1B;AACA;;AAEA;AACA;AACA;;;;;;;;;ACjGa;AACb,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP,OAAO;AACP;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3Ca;;AAEb,sBAAsB,mBAAO,CAAC,GAAkB;AAChD,wBAAwB,mBAAO,CAAC,GAAoB;AACpD,cAAc,mBAAO,CAAC,GAAe;AACrC,cAAc,mBAAO,CAAC,EAAa;;AAEnC,cAAc;;AAEd;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA,MAAM,cAAc;AACpB;AACA,SAAS,oBAAoB;AAC7B;AACA;AACA;AACA,OAAO,0CAA0C;;AAEjD;AACA;AACA;AACA,uBAAuB,gCAAgC;AACvD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,gCAAgC;AACzD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,2BAA2B,qDAAqD;AAChF;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,mCAAmC,8DAA8D;AACjG;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t__webpack_require__.ab = __dirname + \"/\";\n\n \t// the startup function\n \tfunction startup() {\n \t\t// Load entry module and return exports\n \t\treturn __webpack_require__(48);\n \t};\n\n \t// run startup\n \treturn startup();\n","'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n","'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n","import { debug, getInput, setFailed, setOutput } from \"@actions/core\";\nimport { npmPublish } from \"../npm-publish\";\nimport { Options } from \"../options\";\n\n/**\n * The main entry point of the GitHub Action\n * @internal\n */\nasync function main(): Promise {\n try {\n // Setup global error handlers\n process.on(\"uncaughtException\", errorHandler);\n process.on(\"unhandledRejection\", errorHandler);\n\n // Get the GitHub Actions input options\n const options: Options = {\n token: getInput(\"token\", { required: true }),\n registry: getInput(\"registry\", { required: true }),\n package: getInput(\"package\", { required: true }),\n checkVersion: getInput(\"check-version\", { required: true }).toLowerCase() === \"true\",\n debug: debugHandler,\n };\n\n // Puglish to NPM\n let results = await npmPublish(options);\n\n // tslint:disable: no-console\n if (results.type === \"none\") {\n console.log(`\\n📦 ${results.package} v${results.version} is already published to NPM`);\n }\n else {\n console.log(`\\n📦 Successfully published ${results.package} v${results.version} to NPM`);\n }\n\n // Set the GitHub Actions output variables\n setOutput(\"type\", results.type);\n setOutput(\"version\", results.version);\n setOutput(\"old-version\", results.oldVersion);\n }\n catch (error) {\n errorHandler(error as Error);\n }\n}\n\n/**\n * Prints errors to the GitHub Actions console\n */\nfunction errorHandler(error: Error): void {\n let message = error.stack || error.message || String(error);\n setFailed(message);\n process.exit();\n}\n\n/**\n * Prints debug logs to the GitHub Actions console\n */\nfunction debugHandler(message: string, data?: object) {\n if (data) {\n message += \"\\n\" + JSON.stringify(data, undefined, 2);\n }\n\n debug(message);\n}\n\n// tslint:disable-next-line: no-floating-promises\nmain();\n","import * as ezSpawn from \"@jsdevtools/ez-spawn\";\nimport { ono } from \"@jsdevtools/ono\";\nimport { StdioOptions } from \"child_process\";\nimport { dirname, resolve } from \"path\";\nimport { SemVer } from \"semver\";\nimport { NormalizedOptions } from \"./normalize-options\";\nimport { setNpmConfig } from \"./npm-config\";\nimport { Manifest } from \"./read-manifest\";\n\n/**\n * Runs NPM commands.\n * @internal\n */\nexport const npm = {\n /**\n * Gets the latest published version of the specified package.\n */\n async getLatestVersion(name: string, options: NormalizedOptions): Promise {\n // Update the NPM config with the specified registry and token\n await setNpmConfig(options);\n\n try {\n // Get the environment variables to pass to NPM\n let env = getNpmEnvironment(options);\n\n options.debug(`Running command: npm view ${name} version`);\n\n // Run NPM to get the latest published versiono of the package\n let { stdout } = await ezSpawn.async(\"npm\", [\"view\", name, \"version\"], { env });\n let version = stdout.trim();\n\n // Parse/validate the version number\n let semver = new SemVer(version);\n\n options.debug(`The local version of ${name} is at v${semver}`);\n return semver;\n }\n catch (error) {\n throw ono(error, `Unable to determine the current version of ${name} on NPM.`);\n }\n },\n\n\n /**\n * Publishes the specified package to NPM\n */\n async publish({ name, version }: Manifest, options: NormalizedOptions): Promise {\n // Update the NPM config with the specified registry and token\n await setNpmConfig(options);\n\n try {\n // Run \"npm publish\" in the package.json directory\n let cwd = resolve(dirname(options.package));\n\n // Determine whether to suppress NPM's output\n let stdio: StdioOptions = options.quiet ? \"pipe\" : \"inherit\";\n\n // Get the environment variables to pass to NPM\n let env = getNpmEnvironment(options);\n\n options.debug(\"Running command: npm publish\", { stdio, cwd, env });\n\n // Run NPM to publish the package\n await ezSpawn.async(\"npm\", [\"publish\"], { cwd, stdio, env });\n }\n catch (error) {\n throw ono(error, `Unable to publish ${name} v${version} to NPM.`);\n }\n },\n};\n\n\n/**\n * Returns the environment variables that should be passed to NPM, based on the given options.\n */\nfunction getNpmEnvironment(options: NormalizedOptions): NodeJS.ProcessEnv | undefined {\n // Determine if we need to set the NPM token\n let needsToken = Boolean(options.token && process.env.INPUT_TOKEN !== options.token);\n\n if (needsToken) {\n return { ...process.env, INPUT_TOKEN: options.token };\n }\n}\n","module.exports = require(\"os\");","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst newline = /\\r?\\n/;\nconst onoCall = /\\bono[ @]/;\n/**\n * Is the property lazily computed?\n */\nfunction isLazyStack(stackProp) {\n return Boolean(stackProp &&\n stackProp.configurable &&\n typeof stackProp.get === \"function\");\n}\nexports.isLazyStack = isLazyStack;\n/**\n * Is the stack property writable?\n */\nfunction isWritableStack(stackProp) {\n return Boolean(\n // If there is no stack property, then it's writable, since assigning it will create it\n !stackProp ||\n stackProp.writable ||\n typeof stackProp.set === \"function\");\n}\nexports.isWritableStack = isWritableStack;\n/**\n * Appends the original `Error.stack` property to the new Error's stack.\n */\nfunction joinStacks(newError, originalError) {\n let newStack = popStack(newError.stack);\n let originalStack = originalError ? originalError.stack : undefined;\n if (newStack && originalStack) {\n return newStack + \"\\n\\n\" + originalStack;\n }\n else {\n return newStack || originalStack;\n }\n}\nexports.joinStacks = joinStacks;\n/**\n * Calls `joinStacks` lazily, when the `Error.stack` property is accessed.\n */\nfunction lazyJoinStacks(lazyStack, newError, originalError) {\n if (originalError) {\n Object.defineProperty(newError, \"stack\", {\n get: () => {\n let newStack = lazyStack.get.apply(newError);\n return joinStacks({ stack: newStack }, originalError);\n },\n enumerable: false,\n configurable: true\n });\n }\n else {\n lazyPopStack(newError, lazyStack);\n }\n}\nexports.lazyJoinStacks = lazyJoinStacks;\n/**\n * Removes Ono from the stack, so that the stack starts at the original error location\n */\nfunction popStack(stack) {\n if (stack) {\n let lines = stack.split(newline);\n // Find the Ono call(s) in the stack, and remove them\n let onoStart;\n for (let i = 0; i < lines.length; i++) {\n let line = lines[i];\n if (onoCall.test(line)) {\n if (onoStart === undefined) {\n // We found the first Ono call in the stack trace.\n // There may be other subsequent Ono calls as well.\n onoStart = i;\n }\n }\n else if (onoStart !== undefined) {\n // We found the first non-Ono call after one or more Ono calls.\n // So remove the Ono call lines from the stack trace\n lines.splice(onoStart, i - onoStart);\n break;\n }\n }\n if (lines.length > 0) {\n return lines.join(\"\\n\");\n }\n }\n // If we get here, then the stack doesn't contain a call to `ono`.\n // This may be due to minification or some optimization of the JS engine.\n // So just return the stack as-is.\n return stack;\n}\n/**\n * Calls `popStack` lazily, when the `Error.stack` property is accessed.\n */\nfunction lazyPopStack(error, lazyStack) {\n Object.defineProperty(error, \"stack\", {\n get: () => popStack(lazyStack.get.apply(error)),\n enumerable: false,\n configurable: true\n });\n}\n//# sourceMappingURL=stack.js.map","module.exports = require(\"child_process\");","\"use strict\";\n\n/**\n * An instance of this class is returned by {@link sync} and {@link async} when the process exits\n * with a non-zero status code.\n */\nmodule.exports = class ProcessError extends Error {\n constructor (process) {\n let message = `${process.toString()} exited with a status of ${process.status}.`;\n\n if (process.stderr.length > 0) {\n message += \"\\n\\n\" + process.stderr.toString().trim();\n }\n\n super(message);\n Object.assign(this, process);\n this.name = ProcessError.name;\n }\n};\n","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst singleton_1 = require(\"./singleton\");\nexports.ono = singleton_1.ono;\nvar constructor_1 = require(\"./constructor\");\nexports.Ono = constructor_1.Ono;\n// tslint:disable-next-line: no-default-export\nexports.default = singleton_1.ono;\n// CommonJS default export hack\nif (typeof module === \"object\" && typeof module.exports === \"object\") {\n module.exports = Object.assign(module.exports.default, module.exports); // tslint:disable-line: no-unsafe-any\n}\n//# sourceMappingURL=index.js.map","import { ono } from \"@jsdevtools/ono\";\nimport { promises as fs } from \"fs\";\nimport { resolve } from \"path\";\nimport { SemVer } from \"semver\";\nimport { Debug } from \"./options\";\n\n/**\n * A package manifest (package.json)\n * @internal\n */\nexport interface Manifest {\n name: string;\n version: SemVer;\n}\n\n/**\n * Reads the package manifest (package.json) and returns its parsed contents\n * @internal\n */\nexport async function readManifest(path: string, debug?: Debug): Promise {\n debug && debug(`Reading package manifest from ${resolve(path)}`);\n let json: string;\n\n try {\n json = await fs.readFile(path, \"utf-8\");\n }\n catch (error) {\n throw ono(error, `Unable to read ${path}`);\n }\n\n try {\n let { name, version } = JSON.parse(json) as Record;\n\n if (typeof name !== \"string\" || name.trim().length === 0) {\n throw new TypeError(`Invalid package name`);\n }\n\n let manifest: Manifest = {\n name,\n version: new SemVer(version as string),\n };\n\n debug && debug(\"MANIFEST:\", manifest);\n return manifest;\n }\n catch (error) {\n throw ono(error, `Unable to parse ${path}`);\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst isomorphic_node_1 = require(\"./isomorphic.node\");\nconst stack_1 = require(\"./stack\");\nconst to_json_1 = require(\"./to-json\");\nconst protectedProps = [\"name\", \"message\", \"stack\"];\n/**\n * Extends the new error with the properties of the original error and the `props` object.\n *\n * @param newError - The error object to extend\n * @param originalError - The original error object, if any\n * @param props - Additional properties to add, if any\n */\nfunction extendError(error, originalError, props) {\n let onoError = error;\n extendStack(onoError, originalError);\n // Copy properties from the original error\n if (originalError && typeof originalError === \"object\") {\n mergeErrors(onoError, originalError);\n }\n // The default `toJSON` method doesn't output props like `name`, `message`, `stack`, etc.\n // So replace it with one that outputs every property of the error.\n onoError.toJSON = to_json_1.toJSON;\n // On Node.js, add support for the `util.inspect()` method\n if (isomorphic_node_1.addInspectMethod) {\n isomorphic_node_1.addInspectMethod(onoError);\n }\n // Finally, copy custom properties that were specified by the user.\n // These props OVERWRITE any previous props\n if (props && typeof props === \"object\") {\n Object.assign(onoError, props);\n }\n return onoError;\n}\nexports.extendError = extendError;\n/**\n * Extend the error stack to include its cause\n */\nfunction extendStack(newError, originalError) {\n let stackProp = Object.getOwnPropertyDescriptor(newError, \"stack\");\n if (stack_1.isLazyStack(stackProp)) {\n stack_1.lazyJoinStacks(stackProp, newError, originalError);\n }\n else if (stack_1.isWritableStack(stackProp)) {\n newError.stack = stack_1.joinStacks(newError, originalError);\n }\n}\n/**\n * Merges properties of the original error with the new error.\n *\n * @param newError - The error object to extend\n * @param originalError - The original error object, if any\n */\nfunction mergeErrors(newError, originalError) {\n // Get the original error's keys\n // NOTE: We specifically exclude properties that we have already set on the new error.\n // This is _especially_ important for the `stack` property, because this property has\n // a lazy getter in some environments\n let keys = to_json_1.getDeepKeys(originalError, protectedProps);\n // HACK: We have to cast the errors to `any` so we can use symbol indexers.\n // see https://github.com/Microsoft/TypeScript/issues/1863\n // tslint:disable: no-any no-unsafe-any\n let _newError = newError;\n let _originalError = originalError;\n for (let key of keys) {\n if (_newError[key] === undefined) {\n try {\n _newError[key] = _originalError[key];\n }\n catch (e) {\n // This property is read-only, so it can't be copied\n }\n }\n }\n}\n//# sourceMappingURL=extend-error.js.map","\"use strict\";\n\nconst normalizeArgs = require(\"./normalize-args\");\nconst normalizeResult = require(\"./normalize-result\");\nconst spawnSync = require(\"cross-spawn\").sync;\n\nmodule.exports = sync;\n\n/**\n * Executes the given command synchronously, and returns the buffered results.\n *\n * @param {string|string[]} command - The command to run\n * @param {string|string[]} [args] - The command arguments\n * @param {object} [options] - options\n * @returns {Process}\n *\n * @see {@link normalizeArgs} for argument details\n */\nfunction sync () {\n // Normalize the function arguments\n let { command, args, options, error } = normalizeArgs(arguments);\n\n if (error) {\n // Invalid arguments\n normalizeResult({ command, args, options, error });\n }\n else {\n let result;\n\n try {\n // Run the program\n result = spawnSync(command, args, options);\n }\n catch (error) {\n // An error occurred while spawning or killing the process\n normalizeResult({ error, command, args, options });\n }\n\n // Return the results or throw an error\n return normalizeResult(Object.assign({}, result, { command, args, options }));\n }\n}\n","'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n","\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os = __importStar(require(\"os\"));\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return (s || '')\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return (s || '')\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(\\\\*)\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(\\\\*)$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst command_1 = require(\"./command\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable\n */\nfunction exportVariable(name, val) {\n process.env[name] = val;\n command_1.issueCommand('set-env', { name }, val);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n command_1.issueCommand('add-path', {}, inputPath);\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input. The value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store\n */\nfunction setOutput(name, value) {\n command_1.issueCommand('set-output', { name }, value);\n}\nexports.setOutput = setOutput;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message\n */\nfunction error(message) {\n command_1.issue('error', message);\n}\nexports.error = error;\n/**\n * Adds an warning issue\n * @param message warning issue message\n */\nfunction warning(message) {\n command_1.issue('warning', message);\n}\nexports.warning = warning;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store\n */\nfunction saveState(name, value) {\n command_1.issueCommand('save-state', { name }, value);\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\n//# sourceMappingURL=core.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst nonJsonTypes = [\"function\", \"symbol\", \"undefined\"];\nconst protectedProps = [\"constructor\", \"prototype\", \"__proto__\"];\nconst objectPrototype = Object.getPrototypeOf({});\n/**\n * Custom JSON serializer for Error objects.\n * Returns all built-in error properties, as well as extended properties.\n */\nfunction toJSON() {\n // HACK: We have to cast the objects to `any` so we can use symbol indexers.\n // see https://github.com/Microsoft/TypeScript/issues/1863\n // tslint:disable: no-any no-unsafe-any\n let pojo = {};\n let error = this;\n for (let key of getDeepKeys(error)) {\n if (typeof key === \"string\") {\n let value = error[key];\n let type = typeof value;\n if (!nonJsonTypes.includes(type)) {\n pojo[key] = value;\n }\n }\n }\n // tslint:enable: no-any no-unsafe-any\n return pojo;\n}\nexports.toJSON = toJSON;\n/**\n * Returns own, inherited, enumerable, non-enumerable, string, and symbol keys of `obj`.\n * Does NOT return members of the base Object prototype, or the specified omitted keys.\n */\nfunction getDeepKeys(obj, omit = []) {\n let keys = [];\n // Crawl the prototype chain, finding all the string and symbol keys\n while (obj && obj !== objectPrototype) {\n keys = keys.concat(Object.getOwnPropertyNames(obj), Object.getOwnPropertySymbols(obj));\n obj = Object.getPrototypeOf(obj);\n }\n // De-duplicate the list of keys\n let uniqueKeys = new Set(keys);\n // Remove any omitted keys\n for (let key of omit.concat(protectedProps)) {\n uniqueKeys.delete(key);\n }\n return uniqueKeys;\n}\nexports.getDeepKeys = getDeepKeys;\n//# sourceMappingURL=to-json.js.map","'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst pathKey = require('path-key')();\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: (parsed.options.env || process.env)[pathKey],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst extend_error_1 = require(\"./extend-error\");\nconst normalize_1 = require(\"./normalize\");\nconst to_json_1 = require(\"./to-json\");\nconst constructor = Ono;\nexports.Ono = constructor;\n/**\n * Creates an `Ono` instance for a specifc error type.\n */\n// tslint:disable-next-line: variable-name\nfunction Ono(ErrorConstructor, options) {\n options = normalize_1.normalizeOptions(options);\n function ono(...args) {\n let { originalError, props, message } = normalize_1.normalizeArgs(args, options);\n // Create a new error of the specified type\n let newError = new ErrorConstructor(message);\n // Extend the error with the properties of the original error and the `props` object\n return extend_error_1.extendError(newError, originalError, props);\n }\n ono[Symbol.species] = ErrorConstructor;\n return ono;\n}\n/**\n * Returns an object containing all properties of the given Error object,\n * which can be used with `JSON.stringify()`.\n */\nOno.toJSON = function toJSON(error) {\n return to_json_1.toJSON.call(error);\n};\n/**\n * Extends the given Error object with enhanced Ono functionality, such as nested stack traces,\n * additional properties, and improved support for `JSON.stringify()`.\n */\nOno.extend = function extend(error, originalError, props) {\n if (props || originalError instanceof Error) {\n return extend_error_1.extendError(error, originalError, props);\n }\n else if (originalError) {\n return extend_error_1.extendError(error, undefined, originalError);\n }\n else {\n return extend_error_1.extendError(error);\n }\n};\n//# sourceMappingURL=constructor.js.map","module.exports = require(\"semver\");","import * as ezSpawn from \"@jsdevtools/ez-spawn\";\nimport { ono } from \"@jsdevtools/ono\";\nimport { promises as fs } from \"fs\";\nimport { EOL } from \"os\";\nimport { dirname } from \"path\";\nimport { NormalizedOptions } from \"./normalize-options\";\n\n/**\n * Sets/updates the NPM config based on the options.\n * @internal\n */\nexport async function setNpmConfig(options: NormalizedOptions): Promise {\n // Read the current NPM config\n let configPath = await getNpmConfigPath(options);\n let config = await readNpmConfig(configPath, options);\n\n // Update the config\n config = updateConfig(config, options);\n\n // Save the new config\n await writeNpmConfig(configPath, config, options);\n}\n\n\n/**\n * Updates the given NPM config with the specified options.\n */\nfunction updateConfig(config: string, { registry, debug }: NormalizedOptions): string {\n let authDomain = registry.origin.slice(registry.protocol.length);\n\n let lines = config.split(/\\r?\\n/);\n\n // Remove any existing lines that set the registry or token\n lines = lines.filter((line) =>\n !(line.startsWith(\"registry=\") || line.includes(\"_authToken=\"))\n );\n\n // Append the new registry and token to the end of the file\n lines.push(`${authDomain}/:_authToken=\\${INPUT_TOKEN}`);\n lines.push(`registry=${registry.href}`);\n\n config = lines.join(EOL).trim() + EOL;\n\n debug(`NEW NPM CONFIG: \\n${config}`);\n return config;\n}\n\n\n/**\n * Gets the path of the NPM config file.\n */\nasync function getNpmConfigPath({ debug }: NormalizedOptions): Promise {\n try {\n debug(`Running command: npm config get userconfig`);\n\n let process = await ezSpawn.async(\"npm\", \"config\", \"get\", \"userconfig\");\n return process.stdout.trim();\n }\n catch (error) {\n throw ono(error, `Unable to determine the NPM config file path.`);\n }\n}\n\n\n/**\n * Reads the NPM config file.\n */\nasync function readNpmConfig(configPath: string, { debug }: NormalizedOptions): Promise {\n try {\n debug(`Reading NPM config from ${configPath}`);\n\n let config = await fs.readFile(configPath, \"utf-8\");\n\n debug(`OLD NPM CONFIG: \\n${config}`);\n return config;\n }\n catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") {\n debug(`OLD NPM CONFIG: `);\n return \"\";\n }\n\n throw ono(error, `Unable to read the NPM config file: ${configPath}`);\n }\n}\n\n\n/**\n * Writes the NPM config file.\n */\nasync function writeNpmConfig(configPath: string, config: string, { debug }: NormalizedOptions): Promise {\n try {\n debug(`Writing new NPM config to ${configPath}`);\n\n await fs.mkdir(dirname(configPath), { recursive: true });\n await fs.writeFile(configPath, config);\n }\n catch (error) {\n throw ono(error, `Unable to update the NPM config file: ${configPath}`);\n }\n}\n","'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n","module.exports = require(\"path\");","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.typeDetect = factory());\n}(this, (function () { 'use strict';\n\n/* !\n * type-detect\n * Copyright(c) 2013 jake luer \n * MIT Licensed\n */\nvar promiseExists = typeof Promise === 'function';\n\n/* eslint-disable no-undef */\nvar globalObject = typeof self === 'object' ? self : global; // eslint-disable-line id-blacklist\n\nvar symbolExists = typeof Symbol !== 'undefined';\nvar mapExists = typeof Map !== 'undefined';\nvar setExists = typeof Set !== 'undefined';\nvar weakMapExists = typeof WeakMap !== 'undefined';\nvar weakSetExists = typeof WeakSet !== 'undefined';\nvar dataViewExists = typeof DataView !== 'undefined';\nvar symbolIteratorExists = symbolExists && typeof Symbol.iterator !== 'undefined';\nvar symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== 'undefined';\nvar setEntriesExists = setExists && typeof Set.prototype.entries === 'function';\nvar mapEntriesExists = mapExists && typeof Map.prototype.entries === 'function';\nvar setIteratorPrototype = setEntriesExists && Object.getPrototypeOf(new Set().entries());\nvar mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf(new Map().entries());\nvar arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === 'function';\nvar arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]());\nvar stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === 'function';\nvar stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(''[Symbol.iterator]());\nvar toStringLeftSliceLength = 8;\nvar toStringRightSliceLength = -1;\n/**\n * ### typeOf (obj)\n *\n * Uses `Object.prototype.toString` to determine the type of an object,\n * normalising behaviour across engine versions & well optimised.\n *\n * @param {Mixed} object\n * @return {String} object type\n * @api public\n */\nfunction typeDetect(obj) {\n /* ! Speed optimisation\n * Pre:\n * string literal x 3,039,035 ops/sec ±1.62% (78 runs sampled)\n * boolean literal x 1,424,138 ops/sec ±4.54% (75 runs sampled)\n * number literal x 1,653,153 ops/sec ±1.91% (82 runs sampled)\n * undefined x 9,978,660 ops/sec ±1.92% (75 runs sampled)\n * function x 2,556,769 ops/sec ±1.73% (77 runs sampled)\n * Post:\n * string literal x 38,564,796 ops/sec ±1.15% (79 runs sampled)\n * boolean literal x 31,148,940 ops/sec ±1.10% (79 runs sampled)\n * number literal x 32,679,330 ops/sec ±1.90% (78 runs sampled)\n * undefined x 32,363,368 ops/sec ±1.07% (82 runs sampled)\n * function x 31,296,870 ops/sec ±0.96% (83 runs sampled)\n */\n var typeofObj = typeof obj;\n if (typeofObj !== 'object') {\n return typeofObj;\n }\n\n /* ! Speed optimisation\n * Pre:\n * null x 28,645,765 ops/sec ±1.17% (82 runs sampled)\n * Post:\n * null x 36,428,962 ops/sec ±1.37% (84 runs sampled)\n */\n if (obj === null) {\n return 'null';\n }\n\n /* ! Spec Conformance\n * Test: `Object.prototype.toString.call(window)``\n * - Node === \"[object global]\"\n * - Chrome === \"[object global]\"\n * - Firefox === \"[object Window]\"\n * - PhantomJS === \"[object Window]\"\n * - Safari === \"[object Window]\"\n * - IE 11 === \"[object Window]\"\n * - IE Edge === \"[object Window]\"\n * Test: `Object.prototype.toString.call(this)``\n * - Chrome Worker === \"[object global]\"\n * - Firefox Worker === \"[object DedicatedWorkerGlobalScope]\"\n * - Safari Worker === \"[object DedicatedWorkerGlobalScope]\"\n * - IE 11 Worker === \"[object WorkerGlobalScope]\"\n * - IE Edge Worker === \"[object WorkerGlobalScope]\"\n */\n if (obj === globalObject) {\n return 'global';\n }\n\n /* ! Speed optimisation\n * Pre:\n * array literal x 2,888,352 ops/sec ±0.67% (82 runs sampled)\n * Post:\n * array literal x 22,479,650 ops/sec ±0.96% (81 runs sampled)\n */\n if (\n Array.isArray(obj) &&\n (symbolToStringTagExists === false || !(Symbol.toStringTag in obj))\n ) {\n return 'Array';\n }\n\n // Not caching existence of `window` and related properties due to potential\n // for `window` to be unset before tests in quasi-browser environments.\n if (typeof window === 'object' && window !== null) {\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/browsers.html#location)\n * WhatWG HTML$7.7.3 - The `Location` interface\n * Test: `Object.prototype.toString.call(window.location)``\n * - IE <=11 === \"[object Object]\"\n * - IE Edge <=13 === \"[object Object]\"\n */\n if (typeof window.location === 'object' && obj === window.location) {\n return 'Location';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/#document)\n * WhatWG HTML$3.1.1 - The `Document` object\n * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268)\n * which suggests that browsers should use HTMLTableCellElement for\n * both TD and TH elements. WhatWG separates these.\n * WhatWG HTML states:\n * > For historical reasons, Window objects must also have a\n * > writable, configurable, non-enumerable property named\n * > HTMLDocument whose value is the Document interface object.\n * Test: `Object.prototype.toString.call(document)``\n * - Chrome === \"[object HTMLDocument]\"\n * - Firefox === \"[object HTMLDocument]\"\n * - Safari === \"[object HTMLDocument]\"\n * - IE <=10 === \"[object Document]\"\n * - IE 11 === \"[object HTMLDocument]\"\n * - IE Edge <=13 === \"[object HTMLDocument]\"\n */\n if (typeof window.document === 'object' && obj === window.document) {\n return 'Document';\n }\n\n if (typeof window.navigator === 'object') {\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray)\n * WhatWG HTML$8.6.1.5 - Plugins - Interface MimeTypeArray\n * Test: `Object.prototype.toString.call(navigator.mimeTypes)``\n * - IE <=10 === \"[object MSMimeTypesCollection]\"\n */\n if (typeof window.navigator.mimeTypes === 'object' &&\n obj === window.navigator.mimeTypes) {\n return 'MimeTypeArray';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)\n * WhatWG HTML$8.6.1.5 - Plugins - Interface PluginArray\n * Test: `Object.prototype.toString.call(navigator.plugins)``\n * - IE <=10 === \"[object MSPluginsCollection]\"\n */\n if (typeof window.navigator.plugins === 'object' &&\n obj === window.navigator.plugins) {\n return 'PluginArray';\n }\n }\n\n if ((typeof window.HTMLElement === 'function' ||\n typeof window.HTMLElement === 'object') &&\n obj instanceof window.HTMLElement) {\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)\n * WhatWG HTML$4.4.4 - The `blockquote` element - Interface `HTMLQuoteElement`\n * Test: `Object.prototype.toString.call(document.createElement('blockquote'))``\n * - IE <=10 === \"[object HTMLBlockElement]\"\n */\n if (obj.tagName === 'BLOCKQUOTE') {\n return 'HTMLQuoteElement';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/#htmltabledatacellelement)\n * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableDataCellElement`\n * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)\n * which suggests that browsers should use HTMLTableCellElement for\n * both TD and TH elements. WhatWG separates these.\n * Test: Object.prototype.toString.call(document.createElement('td'))\n * - Chrome === \"[object HTMLTableCellElement]\"\n * - Firefox === \"[object HTMLTableCellElement]\"\n * - Safari === \"[object HTMLTableCellElement]\"\n */\n if (obj.tagName === 'TD') {\n return 'HTMLTableDataCellElement';\n }\n\n /* ! Spec Conformance\n * (https://html.spec.whatwg.org/#htmltableheadercellelement)\n * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableHeaderCellElement`\n * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)\n * which suggests that browsers should use HTMLTableCellElement for\n * both TD and TH elements. WhatWG separates these.\n * Test: Object.prototype.toString.call(document.createElement('th'))\n * - Chrome === \"[object HTMLTableCellElement]\"\n * - Firefox === \"[object HTMLTableCellElement]\"\n * - Safari === \"[object HTMLTableCellElement]\"\n */\n if (obj.tagName === 'TH') {\n return 'HTMLTableHeaderCellElement';\n }\n }\n }\n\n /* ! Speed optimisation\n * Pre:\n * Float64Array x 625,644 ops/sec ±1.58% (80 runs sampled)\n * Float32Array x 1,279,852 ops/sec ±2.91% (77 runs sampled)\n * Uint32Array x 1,178,185 ops/sec ±1.95% (83 runs sampled)\n * Uint16Array x 1,008,380 ops/sec ±2.25% (80 runs sampled)\n * Uint8Array x 1,128,040 ops/sec ±2.11% (81 runs sampled)\n * Int32Array x 1,170,119 ops/sec ±2.88% (80 runs sampled)\n * Int16Array x 1,176,348 ops/sec ±5.79% (86 runs sampled)\n * Int8Array x 1,058,707 ops/sec ±4.94% (77 runs sampled)\n * Uint8ClampedArray x 1,110,633 ops/sec ±4.20% (80 runs sampled)\n * Post:\n * Float64Array x 7,105,671 ops/sec ±13.47% (64 runs sampled)\n * Float32Array x 5,887,912 ops/sec ±1.46% (82 runs sampled)\n * Uint32Array x 6,491,661 ops/sec ±1.76% (79 runs sampled)\n * Uint16Array x 6,559,795 ops/sec ±1.67% (82 runs sampled)\n * Uint8Array x 6,463,966 ops/sec ±1.43% (85 runs sampled)\n * Int32Array x 5,641,841 ops/sec ±3.49% (81 runs sampled)\n * Int16Array x 6,583,511 ops/sec ±1.98% (80 runs sampled)\n * Int8Array x 6,606,078 ops/sec ±1.74% (81 runs sampled)\n * Uint8ClampedArray x 6,602,224 ops/sec ±1.77% (83 runs sampled)\n */\n var stringTag = (symbolToStringTagExists && obj[Symbol.toStringTag]);\n if (typeof stringTag === 'string') {\n return stringTag;\n }\n\n var objPrototype = Object.getPrototypeOf(obj);\n /* ! Speed optimisation\n * Pre:\n * regex literal x 1,772,385 ops/sec ±1.85% (77 runs sampled)\n * regex constructor x 2,143,634 ops/sec ±2.46% (78 runs sampled)\n * Post:\n * regex literal x 3,928,009 ops/sec ±0.65% (78 runs sampled)\n * regex constructor x 3,931,108 ops/sec ±0.58% (84 runs sampled)\n */\n if (objPrototype === RegExp.prototype) {\n return 'RegExp';\n }\n\n /* ! Speed optimisation\n * Pre:\n * date x 2,130,074 ops/sec ±4.42% (68 runs sampled)\n * Post:\n * date x 3,953,779 ops/sec ±1.35% (77 runs sampled)\n */\n if (objPrototype === Date.prototype) {\n return 'Date';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-promise.prototype-@@tostringtag)\n * ES6$25.4.5.4 - Promise.prototype[@@toStringTag] should be \"Promise\":\n * Test: `Object.prototype.toString.call(Promise.resolve())``\n * - Chrome <=47 === \"[object Object]\"\n * - Edge <=20 === \"[object Object]\"\n * - Firefox 29-Latest === \"[object Promise]\"\n * - Safari 7.1-Latest === \"[object Promise]\"\n */\n if (promiseExists && objPrototype === Promise.prototype) {\n return 'Promise';\n }\n\n /* ! Speed optimisation\n * Pre:\n * set x 2,222,186 ops/sec ±1.31% (82 runs sampled)\n * Post:\n * set x 4,545,879 ops/sec ±1.13% (83 runs sampled)\n */\n if (setExists && objPrototype === Set.prototype) {\n return 'Set';\n }\n\n /* ! Speed optimisation\n * Pre:\n * map x 2,396,842 ops/sec ±1.59% (81 runs sampled)\n * Post:\n * map x 4,183,945 ops/sec ±6.59% (82 runs sampled)\n */\n if (mapExists && objPrototype === Map.prototype) {\n return 'Map';\n }\n\n /* ! Speed optimisation\n * Pre:\n * weakset x 1,323,220 ops/sec ±2.17% (76 runs sampled)\n * Post:\n * weakset x 4,237,510 ops/sec ±2.01% (77 runs sampled)\n */\n if (weakSetExists && objPrototype === WeakSet.prototype) {\n return 'WeakSet';\n }\n\n /* ! Speed optimisation\n * Pre:\n * weakmap x 1,500,260 ops/sec ±2.02% (78 runs sampled)\n * Post:\n * weakmap x 3,881,384 ops/sec ±1.45% (82 runs sampled)\n */\n if (weakMapExists && objPrototype === WeakMap.prototype) {\n return 'WeakMap';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-dataview.prototype-@@tostringtag)\n * ES6$24.2.4.21 - DataView.prototype[@@toStringTag] should be \"DataView\":\n * Test: `Object.prototype.toString.call(new DataView(new ArrayBuffer(1)))``\n * - Edge <=13 === \"[object Object]\"\n */\n if (dataViewExists && objPrototype === DataView.prototype) {\n return 'DataView';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%mapiteratorprototype%-@@tostringtag)\n * ES6$23.1.5.2.2 - %MapIteratorPrototype%[@@toStringTag] should be \"Map Iterator\":\n * Test: `Object.prototype.toString.call(new Map().entries())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (mapExists && objPrototype === mapIteratorPrototype) {\n return 'Map Iterator';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%setiteratorprototype%-@@tostringtag)\n * ES6$23.2.5.2.2 - %SetIteratorPrototype%[@@toStringTag] should be \"Set Iterator\":\n * Test: `Object.prototype.toString.call(new Set().entries())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (setExists && objPrototype === setIteratorPrototype) {\n return 'Set Iterator';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%arrayiteratorprototype%-@@tostringtag)\n * ES6$22.1.5.2.2 - %ArrayIteratorPrototype%[@@toStringTag] should be \"Array Iterator\":\n * Test: `Object.prototype.toString.call([][Symbol.iterator]())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (arrayIteratorExists && objPrototype === arrayIteratorPrototype) {\n return 'Array Iterator';\n }\n\n /* ! Spec Conformance\n * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%stringiteratorprototype%-@@tostringtag)\n * ES6$21.1.5.2.2 - %StringIteratorPrototype%[@@toStringTag] should be \"String Iterator\":\n * Test: `Object.prototype.toString.call(''[Symbol.iterator]())``\n * - Edge <=13 === \"[object Object]\"\n */\n if (stringIteratorExists && objPrototype === stringIteratorPrototype) {\n return 'String Iterator';\n }\n\n /* ! Speed optimisation\n * Pre:\n * object from null x 2,424,320 ops/sec ±1.67% (76 runs sampled)\n * Post:\n * object from null x 5,838,000 ops/sec ±0.99% (84 runs sampled)\n */\n if (objPrototype === null) {\n return 'Object';\n }\n\n return Object\n .prototype\n .toString\n .call(obj)\n .slice(toStringLeftSliceLength, toStringRightSliceLength);\n}\n\nreturn typeDetect;\n\n})));\n","module.exports = require(\"util\");","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst isomorphic_node_1 = require(\"./isomorphic.node\");\n/**\n * Normalizes Ono options, accounting for defaults and optional options.\n */\nfunction normalizeOptions(options) {\n options = options || {};\n return {\n concatMessages: options.concatMessages === undefined ? true : Boolean(options.concatMessages),\n format: options.format === undefined ? isomorphic_node_1.format\n : (typeof options.format === \"function\" ? options.format : false),\n };\n}\nexports.normalizeOptions = normalizeOptions;\n/**\n * Normalizes the Ono arguments, accounting for defaults, options, and optional arguments.\n */\nfunction normalizeArgs(args, options) {\n let originalError;\n let props;\n let formatArgs;\n let message = \"\";\n // Determine which arguments were actually specified\n if (typeof args[0] === \"string\") {\n formatArgs = args;\n }\n else if (typeof args[1] === \"string\") {\n if (args[0] instanceof Error) {\n originalError = args[0];\n }\n else {\n props = args[0];\n }\n formatArgs = args.slice(1);\n }\n else {\n originalError = args[0];\n props = args[1];\n formatArgs = args.slice(2);\n }\n // If there are any format arguments, then format the error message\n if (formatArgs.length > 0) {\n if (options.format) {\n message = options.format.apply(undefined, formatArgs);\n }\n else {\n message = formatArgs.join(\" \");\n }\n }\n if (options.concatMessages && originalError && originalError.message) {\n // The inner-error's message will be added to the new message\n message += (message ? \" \\n\" : \"\") + originalError.message;\n }\n return { originalError, props, message };\n}\nexports.normalizeArgs = normalizeArgs;\n//# sourceMappingURL=normalize.js.map","\"use strict\";\n\nconst Process = require(\"./process\");\nconst ProcessError = require(\"./process-error\");\n\nmodule.exports = normalizeResult;\n\n/**\n * @param {string} [command] - The command used to run the process\n * @param {string[]} [args] - The command-line arguments that were passed to the process\n * @param {number} [pid] - The process ID\n * @param {string|Buffer} [stdout] - The process's stdout\n * @param {string|Buffer} [stderr] - The process's stderr\n * @param {string[]|Buffer[]} [output] - The process's stdio\n * @param {number} [status] - The process's status code\n * @param {string} [signal] - The signal that was used to kill the process, if any\n * @param {object} [options] - The options used to run the process\n * @param {Error} [error] - An error, if one occurred\n * @returns {Process}\n */\nfunction normalizeResult ({ command, args, pid, stdout, stderr, output, status, signal, options, error }) {\n let process = new Process({ command, args, pid, stdout, stderr, output, status, signal, options });\n\n if (error) {\n if (process.status === undefined) {\n process.status = null;\n }\n throw Object.assign(error, process);\n }\n else if (process.status) {\n throw new ProcessError(process);\n }\n else {\n return process;\n }\n}\n","\"use strict\";\n\nmodule.exports.sync = require(\"./sync\");\nmodule.exports.async = require(\"./async\");\n","var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n","module.exports = require(\"fs\");","import { URL } from \"url\";\nimport { Debug, Options } from \"./options\";\n\n/**\n * Normalized and sanitized options\n * @internal\n */\nexport interface NormalizedOptions {\n token: string;\n registry: URL;\n package: string;\n checkVersion: boolean;\n quiet: boolean;\n debug: Debug;\n}\n\n/**\n * Normalizes and sanitizes options, and fills-in any default values.\n * @internal\n */\nexport function normalizeOptions(options: Options): NormalizedOptions {\n let registryURL = typeof options.registry === \"string\" ? new URL(options.registry) : options.registry;\n\n return {\n token: options.token || \"\",\n registry: registryURL || new URL(\"https://registry.npmjs.org/\"),\n package: options.package || \"package.json\",\n checkVersion: options.checkVersion === undefined ? true : Boolean(options.checkVersion),\n quiet: options.quiet || false,\n debug: options.debug || (() => undefined),\n };\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst constructor_1 = require(\"./constructor\");\nconst singleton = ono;\nexports.ono = singleton;\nono.error = new constructor_1.Ono(Error);\nono.eval = new constructor_1.Ono(EvalError);\nono.range = new constructor_1.Ono(RangeError);\nono.reference = new constructor_1.Ono(ReferenceError);\nono.syntax = new constructor_1.Ono(SyntaxError);\nono.type = new constructor_1.Ono(TypeError);\nono.uri = new constructor_1.Ono(URIError);\nconst onoMap = ono;\n/**\n * Creates a new error with the specified message, properties, and/or inner error.\n * If an inner error is provided, then the new error will match its type, if possible.\n */\nfunction ono(...args) {\n let originalError = args[0];\n // Is the first argument an Error-like object?\n if (typeof originalError === \"object\" && typeof originalError.name === \"string\") {\n // Try to find an Ono singleton method that matches this error type\n for (let typedOno of Object.values(onoMap)) {\n if (typeof typedOno === \"function\" && typedOno.name === \"ono\") {\n let species = typedOno[Symbol.species];\n if (species && species !== Error && (originalError instanceof species || originalError.name === species.name)) {\n // Create an error of the same type\n return typedOno.apply(undefined, args);\n }\n }\n }\n }\n // By default, create a base Error object\n return ono.error.apply(undefined, args);\n}\n//# sourceMappingURL=singleton.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util = require(\"util\");\nconst to_json_1 = require(\"./to-json\");\n// The `inspect()` method is actually a Symbol, not a string key.\n// https://nodejs.org/api/util.html#util_util_inspect_custom\nconst inspectMethod = util.inspect.custom || Symbol.for(\"nodejs.util.inspect.custom\");\n/**\n * Ono supports Node's `util.format()` formatting for error messages.\n *\n * @see https://nodejs.org/api/util.html#util_util_format_format_args\n */\nexports.format = util.format;\n/**\n * Adds an `inspect()` method to support Node's `util.inspect()` function.\n *\n * @see https://nodejs.org/api/util.html#util_util_inspect_custom\n */\nfunction addInspectMethod(newError) {\n // @ts-ignore\n newError[inspectMethod] = inspect;\n}\nexports.addInspectMethod = addInspectMethod;\n/**\n * Returns a representation of the error for Node's `util.inspect()` method.\n *\n * @see https://nodejs.org/api/util.html#util_custom_inspection_functions_on_objects\n */\nfunction inspect() {\n // HACK: We have to cast the objects to `any` so we can use symbol indexers.\n // see https://github.com/Microsoft/TypeScript/issues/1863\n // tslint:disable: no-any no-unsafe-any\n let pojo = {};\n let error = this;\n for (let key of to_json_1.getDeepKeys(error)) {\n let value = error[key];\n pojo[key] = value;\n }\n // Don't include the `inspect()` method on the output object,\n // otherwise it will cause `util.inspect()` to go into an infinite loop\n delete pojo[inspectMethod]; // tslint:disable-line: no-dynamic-delete\n // tslint:enable: no-any no-unsafe-any\n return pojo;\n}\n//# sourceMappingURL=isomorphic.node.js.map","import * as semver from \"semver\";\nimport { normalizeOptions } from \"./normalize-options\";\nimport { npm } from \"./npm\";\nimport { Options } from \"./options\";\nimport { readManifest } from \"./read-manifest\";\nimport { Results } from \"./results\";\n\n/**\n * Publishes a package to NPM, if its version has changed\n */\nexport async function npmPublish(opts: Options = {}): Promise {\n let options = normalizeOptions(opts);\n\n // Get the old and new version numbers\n let manifest = await readManifest(options.package, options.debug);\n let publishedVersion = await npm.getLatestVersion(manifest.name, options);\n\n // Determine if/how the version has changed\n let diff = semver.diff(manifest.version, publishedVersion);\n\n if (diff || !options.checkVersion) {\n // Publish the new version to NPM\n await npm.publish(manifest, options);\n }\n\n let results: Results = {\n package: manifest.name,\n type: diff || \"none\",\n version: manifest.version.raw,\n oldVersion: publishedVersion.raw,\n };\n\n options.debug(\"OUTPUT:\", results);\n return results;\n}\n","\"use strict\"\n\nvar next = (global.process && process.nextTick) || global.setImmediate || function (f) {\n setTimeout(f, 0)\n}\n\nmodule.exports = function maybe (cb, promise) {\n if (cb) {\n promise\n .then(function (result) {\n next(function () { cb(null, result) })\n }, function (err) {\n next(function () { cb(err) })\n })\n return undefined\n }\n else {\n return promise\n }\n}\n","const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","'use strict';\nmodule.exports = /^#!(.*)/;\n","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n","module.exports = require(\"url\");","'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n","\"use strict\";\n\nconst { parseArgsStringToArgv } = require(\"string-argv\"); // possible alternative: parse-spawn-args\nconst detectType = require(\"type-detect\");\n\nmodule.exports = normalizeArgs;\n\n/**\n * This function normalizes the arguments of the {@link sync} and {@link async}\n * so they can be passed to Node's {@link child_process.spawn} or\n * {@link child_process.spawn} functions.\n *\n * @param {string|string[]} command\n * The command to run (e.g. \"git\"), or the command and its arguments as a string\n * (e.g. \"git commit -a -m fixed_stuff\"), or the command and its arguments as an\n * array (e.g. [\"git\", \"commit\", \"-a\", \"-m\", \"fixed stuff\"]).\n *\n * @param {string|string[]} [args]\n * The command arguments as a string (e.g. \"git commit -a -m fixed_stuff\") or as an array\n * (e.g. [\"git\", \"commit\", \"-a\", \"-m\", \"fixed stuff\"]).\n *\n * @param {object} [options]\n * The same options as {@link child_process.spawn} or {@link child_process.spawnSync}.\n *\n * @param {function} [callback]\n * The callback that will receive the results, if applicable.\n *\n * @returns {object}\n */\nfunction normalizeArgs (params) {\n let command, args, options, callback, error;\n\n try {\n // Shift the arguments, if necessary\n ({ command, args, options, callback } = shiftArgs(params));\n\n let commandArgs = [];\n\n if (typeof command === \"string\" && args === undefined) {\n // The command parameter is actually the command AND arguments,\n // so split the string into an array\n command = splitArgString(command);\n }\n\n if (Array.isArray(command)) {\n // Split the command from the arguments\n commandArgs = command.slice(1);\n command = command[0];\n }\n\n if (typeof args === \"string\") {\n // Convert the `args` argument from a string an array\n args = splitArgString(args);\n }\n\n if (Array.isArray(args)) {\n // Add these arguments to any arguments from above\n args = commandArgs.concat(args);\n }\n\n if (args === undefined || args === null) {\n args = commandArgs;\n }\n\n if (options === undefined || options === null) {\n options = {};\n }\n\n // Set default options\n options.encoding = options.encoding || \"utf8\";\n\n // Validate all arguments\n validateArgs(command, args, options, callback);\n }\n catch (err) {\n error = err;\n\n // Sanitize args that are used as output\n command = String(command || \"\");\n args = (Array.isArray(args) ? args : []).map((arg) => String(arg || \"\"));\n }\n\n return { command, args, options, callback, error };\n}\n\n/**\n * Detects whether any optional arguments have been omitted,\n * and shifts the other arguments as needed.\n *\n * @param {string|string[]} command\n * @param {string|string[]} [args]\n * @param {object} [options]\n * @param {function} [callback]\n * @returns {object}\n */\nfunction shiftArgs (params) {\n params = Array.prototype.slice.call(params);\n let command, args, options, callback;\n\n // Check for a callback as the final parameter\n let lastParam = params[params.length - 1];\n if (typeof lastParam === \"function\") {\n callback = lastParam;\n params.pop();\n }\n\n // Check for an options object as the second-to-last parameter\n lastParam = params[params.length - 1];\n if (lastParam === null || lastParam === undefined ||\n (typeof lastParam === \"object\" && !Array.isArray(lastParam))) {\n options = lastParam;\n params.pop();\n }\n\n // The first parameter is the command\n command = params.shift();\n\n // All remaining parameters are the args\n if (params.length === 0) {\n args = undefined;\n }\n else if (params.length === 1 && Array.isArray(params[0])) {\n args = params[0];\n }\n else if (params.length === 1 && params[0] === \"\") {\n args = [];\n }\n else {\n args = params;\n }\n\n return { command, args, options, callback };\n}\n\n/**\n * Validates all arguments, and throws an error if any are invalid.\n *\n * @param {string} command\n * @param {string[]} args\n * @param {object} options\n * @param {function} [callback]\n */\nfunction validateArgs (command, args, options, callback) {\n if (command === undefined || command === null) {\n throw new Error(\"The command to execute is missing.\");\n }\n\n if (typeof command !== \"string\") {\n throw new Error(\"The command to execute should be a string, not \" + friendlyType(command));\n }\n\n if (!Array.isArray(args)) {\n throw new Error(\n \"The command arguments should be a string or an array, not \" +\n friendlyType(args)\n );\n }\n\n for (let i = 0; i < args.length; i++) {\n let arg = args[i];\n\n if (typeof arg !== \"string\") {\n throw new Error(\n `The command arguments should be strings, but argument #${i + 1} is ` +\n friendlyType(arg)\n );\n }\n }\n\n if (typeof options !== \"object\") {\n throw new Error(\n \"The options should be an object, not \" +\n friendlyType(options)\n );\n }\n\n if (callback !== undefined && callback !== null) {\n if (typeof callback !== \"function\") {\n throw new Error(\"The callback should be a function, not \" + friendlyType(callback));\n }\n }\n}\n\n/**\n * Splits an argument string (e.g. git commit -a -m \"fixed stuff\")\n * into an array (e.g. [\"git\", \"commit\", \"-a\", \"-m\", \"fixed stuff\"]).\n *\n * @param {string} argString\n * @returns {string[]}\n */\nfunction splitArgString (argString) {\n try {\n return parseArgsStringToArgv(argString);\n }\n catch (error) {\n throw new Error(`Could not parse the string: ${argString}\\n${error.message}`);\n }\n}\n\n/**\n * Returns the friendly type name of the given value, for use in error messages.\n *\n * @param {*} val\n * @returns {string}\n */\nfunction friendlyType (val) {\n let type = detectType(val);\n let firstChar = String(type)[0].toLowerCase();\n\n if ([\"a\", \"e\", \"i\", \"o\", \"u\"].indexOf(firstChar) === -1) {\n return `a ${type}.`;\n }\n else {\n return `an ${type}.`;\n }\n}\n","'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed, 'spawn');\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n","\"use strict\";\n\n/**\n * An instance of this class is returned by {@link sync} and {@link async}.\n * It contains information about how the process was spawned, how it exited, and its output.\n */\nmodule.exports = class Process {\n /**\n * @param {object} props - Initial property values\n */\n constructor ({ command, args, pid, stdout, stderr, output, status, signal, options }) {\n options = options || {};\n stdout = stdout || (options.encoding === \"buffer\" ? Buffer.from([]) : \"\");\n stderr = stderr || (options.encoding === \"buffer\" ? Buffer.from([]) : \"\");\n output = output || [options.input || null, stdout, stderr];\n\n /**\n * The command that was used to spawn the process\n *\n * @type {string}\n */\n this.command = command || \"\";\n\n /**\n * The command-line arguments that were passed to the process.\n *\n * @type {string[]}\n */\n this.args = args || [];\n\n /**\n * The numeric process ID assigned by the operating system\n *\n * @type {number}\n */\n this.pid = pid || 0;\n\n /**\n * The process's standard output\n *\n * @type {Buffer|string}\n */\n\n this.stdout = output[1];\n\n /**\n * The process's error output\n *\n * @type {Buffer|string}\n */\n this.stderr = output[2];\n\n /**\n * The process's stdio [stdin, stdout, stderr]\n *\n * @type {Buffer[]|string[]}\n */\n this.output = output;\n\n /**\n * The process's status code\n *\n * @type {number}\n */\n this.status = status;\n\n /**\n * The signal used to kill the process, if applicable\n *\n * @type {string}\n */\n this.signal = signal || null;\n }\n\n /**\n * Returns the full command and arguments used to spawn the process\n *\n * @type {string}\n */\n toString () {\n let string = this.command;\n\n for (let arg of this.args) {\n // Escape quotes\n arg = arg.replace(/\"/g, '\\\\\"');\n\n if (arg.indexOf(\" \") >= 0) {\n // Add quotes if the arg contains whitespace\n string += ` \"${arg}\"`;\n }\n else {\n string += ` ${arg}`;\n }\n }\n\n return string;\n }\n};\n","\"use strict\";\r\nexports.__esModule = true;\r\nfunction parseArgsStringToArgv(value, env, file) {\r\n // ([^\\s'\"]([^\\s'\"]*(['\"])([^\\3]*?)\\3)+[^\\s'\"]*) Matches nested quotes until the first space outside of quotes\r\n // [^\\s'\"]+ or Match if not a space ' or \"\r\n // (['\"])([^\\5]*?)\\5 or Match \"quoted text\" without quotes\r\n // `\\3` and `\\5` are a backreference to the quote style (' or \") captured\r\n var myRegexp = /([^\\s'\"]([^\\s'\"]*(['\"])([^\\3]*?)\\3)+[^\\s'\"]*)|[^\\s'\"]+|(['\"])([^\\5]*?)\\5/gi;\r\n var myString = value;\r\n var myArray = [];\r\n if (env) {\r\n myArray.push(env);\r\n }\r\n if (file) {\r\n myArray.push(file);\r\n }\r\n var match;\r\n do {\r\n // Each call to exec returns the next regex match as an array\r\n match = myRegexp.exec(myString);\r\n if (match !== null) {\r\n // Index 1 in the array is the captured group if it exists\r\n // Index 0 is the matched text, which we use if no captured group exists\r\n myArray.push(firstString(match[1], match[6], match[0]));\r\n }\r\n } while (match !== null);\r\n return myArray;\r\n}\r\nexports[\"default\"] = parseArgsStringToArgv;\r\nexports.parseArgsStringToArgv = parseArgsStringToArgv;\r\n// Accepts any number of arguments, and returns the first one that is a string\r\n// (even an empty string)\r\nfunction firstString() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n for (var i = 0; i < args.length; i++) {\r\n var arg = args[i];\r\n if (typeof arg === \"string\") {\r\n return arg;\r\n }\r\n }\r\n}\r\n","\"use strict\";\n\nconst normalizeArgs = require(\"./normalize-args\");\nconst normalizeResult = require(\"./normalize-result\");\nconst maybe = require(\"call-me-maybe\");\nconst spawn = require(\"cross-spawn\");\n\nmodule.exports = async;\n\n/**\n * Executes the given command asynchronously, and returns the buffered\n * results via a callback or Promise.\n *\n * @param {string|string[]} command - The command to run\n * @param {string|string[]} [args] - The command arguments\n * @param {object} [options] - options\n * @param {function} [callback] - callback that will receive the results\n *\n * @returns {Promise|undefined}\n * Returns a Promise if no callback is given. The promise resolves with\n * a {@link Process} object.\n *\n * @see {@link normalizeArgs} for argument details\n */\nfunction async () {\n // Normalize the function arguments\n let { command, args, options, callback, error } = normalizeArgs(arguments);\n\n return maybe(callback, new Promise((resolve, reject) => {\n if (error) {\n // Invalid arguments\n normalizeResult({ command, args, options, error });\n }\n else {\n let spawnedProcess;\n\n try {\n // Spawn the program\n spawnedProcess = spawn(command, args, options);\n }\n catch (error) {\n // An error occurred while spawning the process\n normalizeResult({ error, command, args, options });\n }\n\n let pid = spawnedProcess.pid;\n let stdout = options.encoding === \"buffer\" ? Buffer.from([]) : \"\";\n let stderr = options.encoding === \"buffer\" ? Buffer.from([]) : \"\";\n\n spawnedProcess.stdout && spawnedProcess.stdout.on(\"data\", (data) => {\n if (typeof stdout === \"string\") {\n stdout += data.toString();\n }\n else {\n stdout = Buffer.concat([stdout, data]);\n }\n });\n\n spawnedProcess.stderr && spawnedProcess.stderr.on(\"data\", (data) => {\n if (typeof stderr === \"string\") {\n stderr += data.toString();\n }\n else {\n stderr = Buffer.concat([stderr, data]);\n }\n });\n\n spawnedProcess.on(\"error\", (error) => {\n try {\n normalizeResult({ error, command, args, options, pid, stdout, stderr });\n }\n catch (error) {\n reject(error);\n }\n });\n\n spawnedProcess.on(\"exit\", (status, signal) => {\n try {\n resolve(normalizeResult({ command, args, options, pid, stdout, stderr, status, signal }));\n }\n catch (error) {\n reject(error);\n }\n });\n }\n }));\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/sourcemap-register.js b/dist/sourcemap-register.js index 801d431..c956d60 100644 --- a/dist/sourcemap-register.js +++ b/dist/sourcemap-register.js @@ -578,7 +578,7 @@ function retrieveSourceMapURL(source) { // Get the URL of the source map fileData = retrieveFile(source); - var re = /(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg; + var re = /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/mg; // Keep executing the search to find the *last* sourceMappingURL to avoid // picking up sourceMappingURLs from comments, strings, etc. var lastMatch, match; @@ -651,7 +651,7 @@ function mapSourcePosition(position) { } // Resolve the source URL relative to the URL of the source map - if (sourceMap && sourceMap.map && typeof sourceMap.map.originalPositionFor === 'function') { + if (sourceMap && sourceMap.map) { var originalPosition = sourceMap.map.originalPositionFor(position); // Only return the original position if a matching line was found. If no @@ -776,13 +776,8 @@ function cloneCallSite(frame) { return object; } -function wrapCallSite(frame, state) { - // provides interface backward compatibility - if (state === undefined) { - state = { nextPosition: null, curPosition: null } - } +function wrapCallSite(frame) { if(frame.isNative()) { - state.curPosition = null; return frame; } @@ -796,11 +791,7 @@ function wrapCallSite(frame, state) { // Fix position in Node where some (internal) code is prepended. // See https://github.com/evanw/node-source-map-support/issues/36 - // Header removed in node at ^10.16 || >=11.11.0 - // v11 is not an LTS candidate, we can just test the one version with it. - // Test node versions for: 10.16-19, 10.20+, 12-19, 20-99, 100+, or 11.11 - var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/; - var headerLength = noHeader.test(process.version) ? 0 : 62; + var headerLength = 62; if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) { column -= headerLength; } @@ -810,15 +801,9 @@ function wrapCallSite(frame, state) { line: line, column: column }); - state.curPosition = position; frame = cloneCallSite(frame); var originalFunctionName = frame.getFunctionName; - frame.getFunctionName = function() { - if (state.nextPosition == null) { - return originalFunctionName(); - } - return state.nextPosition.name || originalFunctionName(); - }; + frame.getFunctionName = function() { return position.name || originalFunctionName(); }; frame.getFileName = function() { return position.source; }; frame.getLineNumber = function() { return position.line; }; frame.getColumnNumber = function() { return position.column + 1; }; @@ -840,25 +825,16 @@ function wrapCallSite(frame, state) { } // This function is part of the V8 stack trace API, for more info see: -// https://v8.dev/docs/stack-trace-api +// http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi function prepareStackTrace(error, stack) { if (emptyCacheBetweenOperations) { fileContentsCache = {}; sourceMapCache = {}; } - var name = error.name || 'Error'; - var message = error.message || ''; - var errorString = name + ": " + message; - - var state = { nextPosition: null, curPosition: null }; - var processedStack = []; - for (var i = stack.length - 1; i >= 0; i--) { - processedStack.push('\n at ' + wrapCallSite(stack[i], state)); - state.nextPosition = state.curPosition; - } - state.curPosition = state.nextPosition = null; - return errorString + processedStack.reverse().join(''); + return error + stack.map(function(frame) { + return '\n at ' + wrapCallSite(frame); + }).join(''); } // Generate position and snippet of original source with pointer @@ -1022,9 +998,6 @@ exports.resetRetrieveHandlers = function() { retrieveFileHandlers = originalRetrieveFileHandlers.slice(0); retrieveMapHandlers = originalRetrieveMapHandlers.slice(0); - - retrieveSourceMap = handlerExec(retrieveMapHandlers); - retrieveFile = handlerExec(retrieveFileHandlers); } diff --git a/package-lock.json b/package-lock.json index dfa6503..0fef541 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@jsdevtools/npm-publish", - "version": "1.0.13", + "version": "1.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 55da0d5..fd6645f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@jsdevtools/npm-publish", "description": "Fast, easy publishing to NPM", - "version": "1.0.13", + "version": "1.1.0", "keywords": [ "github-action", "npm",