From 7b8c5a92638e8c385221bfe975c1f9ef234860b6 Mon Sep 17 00:00:00 2001 From: David Knise Date: Sat, 20 Feb 2021 20:42:00 -0800 Subject: [PATCH] Add msca-actions-toolkit to committed node_modules --- .../msca-actions-toolkit/msca-client.js | 109 +++++++ .../msca-actions-toolkit/msca-installer.js | 212 +++++++++++++ .../msca-actions-toolkit/msca-toolkit.proj | 13 + .../msca-actions-toolkit/package.json | 18 ++ package-lock.json | 282 +++++++++++++++++- tsconfig.json | 5 +- 6 files changed, 637 insertions(+), 2 deletions(-) create mode 100644 node_modules/msca-actions-toolkit/msca-client.js create mode 100644 node_modules/msca-actions-toolkit/msca-installer.js create mode 100644 node_modules/msca-actions-toolkit/msca-toolkit.proj create mode 100644 node_modules/msca-actions-toolkit/package.json diff --git a/node_modules/msca-actions-toolkit/msca-client.js b/node_modules/msca-actions-toolkit/msca-client.js new file mode 100644 index 0000000..bc15dd5 --- /dev/null +++ b/node_modules/msca-actions-toolkit/msca-client.js @@ -0,0 +1,109 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = __importStar(require("path")); +const process = __importStar(require("process")); +const core = __importStar(require("@actions/core")); +const exec = __importStar(require("@actions/exec")); +const msca_installer_1 = require("./msca-installer"); +class MscaClient { + constructor() { + this.cliVersion = '0.*'; + } + setupEnvironment() { + return __awaiter(this, void 0, void 0, function* () { + console.log('------------------------------------------------------------------------------'); + if (!process.env.MSCA_FILEPATH) { + let cliVersion = this.resolveCliVersion(); + let mscaInstaller = new msca_installer_1.MscaInstaller(); + yield mscaInstaller.install(cliVersion); + } + console.log('------------------------------------------------------------------------------'); + }); + } + resolveCliVersion() { + let cliVersion = this.cliVersion; + if (process.env.MSCA_VERSION) { + cliVersion = process.env.MSCA_VERSION; + } + return cliVersion; + } + isNullOrWhiteSpace(value) { + return !value || !value.trim(); + } + getCliFilePath() { + let cliFilePath = process.env.MSCA_FILEPATH; + core.debug(`cliFilePath = ${cliFilePath}`); + return cliFilePath; + } + init() { + return __awaiter(this, void 0, void 0, function* () { + try { + let cliFilePath = this.getCliFilePath(); + yield exec.exec(cliFilePath, ['init', '--force']); + } + catch (error) { + core.debug(error); + } + }); + } + run(inputArgs) { + return __awaiter(this, void 0, void 0, function* () { + let cliFilePath = null; + let args = []; + try { + yield this.setupEnvironment(); + yield this.init(); + cliFilePath = process.env.MSCA_FILEPATH; + core.debug(`cliFilePath = ${cliFilePath}`); + if (inputArgs != null) { + for (let i = 0; i < inputArgs.length; i++) { + args.push(inputArgs[i]); + } + } + args.push('--not-break-on-detections'); + if (core.isDebug()) { + args.push('--logger-level'); + args.push('trace'); + } + let sarifFile = path.join(process.env.GITHUB_WORKSPACE, '.gdn', 'msca.sarif'); + core.debug(`sarifFile = ${sarifFile}`); + core.exportVariable('MSCA_SARIF_FILE', sarifFile); + core.setOutput('sarifFile', sarifFile); + args.push('--export-breaking-results-to-file'); + args.push(`${sarifFile}`); + } + catch (error) { + error('Exception occurred while initializing MSCA:'); + error(error); + core.setFailed(error.Message); + return; + } + try { + core.debug('Running Microsoft Security Code Analysis...'); + yield exec.exec(cliFilePath, args); + } + catch (error) { + error(error); + core.setFailed(error.Message); + return; + } + }); + } +} +exports.MscaClient = MscaClient; diff --git a/node_modules/msca-actions-toolkit/msca-installer.js b/node_modules/msca-actions-toolkit/msca-installer.js new file mode 100644 index 0000000..572179f --- /dev/null +++ b/node_modules/msca-actions-toolkit/msca-installer.js @@ -0,0 +1,212 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = __importStar(require("fs")); +const path = __importStar(require("path")); +const process = __importStar(require("process")); +const core = __importStar(require("@actions/core")); +const exec = __importStar(require("@actions/exec")); +class MscaInstaller { + install(cliVersion) { + return __awaiter(this, void 0, void 0, function* () { + console.log('Installing Microsoft Security Code Analysis Cli...'); + if (process.env.MSCA_FILEPATH) { + console.log(`MSCA CLI File Path overriden by %MSCA_FILEPATH%: ${process.env.MSCA_FILEPATH}`); + return; + } + if (process.env.MSCA_DIRECTORY) { + console.log(`MSCA CLI Directory overriden by %MSCA_DIRECTORY%: ${process.env.MSCA_DIRECTORY}`); + let mscaFilePath = path.join(process.env.MSCA_DIRECTORY, 'guardian'); + core.debug(`mscaFilePath = ${mscaFilePath}`); + process.env.MSCA_FILEPATH = mscaFilePath; + return; + } + let mscaDirectory = path.resolve(path.join(process.env.GITHUB_WORKSPACE, '../../_msca')); + core.debug(`mscaDirectory = ${mscaDirectory}`); + this.ensureDirectory(mscaDirectory); + let mscaPackagesDirectory = path.join(mscaDirectory, 'versions'); + core.debug(`mscaPackagesDirectory = ${mscaPackagesDirectory}`); + this.ensureDirectory(mscaPackagesDirectory); + let mscaVersionsDirectory = path.join(mscaPackagesDirectory, 'microsoft.security.codeanalysis.cli'); + core.debug(`mscaVersionsDirectory = ${mscaVersionsDirectory}`); + if (this.isInstalled(mscaVersionsDirectory, cliVersion)) { + return; + } + let failed = false; + let attempts = 0; + let maxAttempts = 2; + do { + failed = false; + const mscaToolkitDirectory = path.resolve(__dirname); + core.debug(`mscaToolkitDirectory = ${mscaToolkitDirectory}`); + const mscaProjectFile = path.join(mscaToolkitDirectory, 'msca-toolkit.proj'); + core.debug(`mscaProjectFile = ${mscaProjectFile}`); + let args = [ + 'restore', + mscaProjectFile, + `/p:MscaPackageVersion=${cliVersion}`, + '--packages', + mscaPackagesDirectory, + '--source', + 'https://api.nuget.org/v3/index.json' + ]; + try { + yield exec.exec('dotnet', args); + } + catch (error) { + core.debug(error); + failed = true; + attempts += 1; + if (attempts > maxAttempts) { + break; + } + } + } while (failed); + this.resolvePackageDirectory(mscaVersionsDirectory, cliVersion); + }); + } + ensureDirectory(directory) { + if (!fs.existsSync(directory)) { + fs.mkdirSync(directory); + } + } + isInstalled(versionsDirectory, cliVersion) { + let installed = false; + if (cliVersion.includes("*")) { + core.debug(`MSCA CLI version contains a latest quantifier: ${cliVersion}. Continuing with install...`); + return installed; + } + this.setVariablesWithVersion(versionsDirectory, cliVersion); + if (fs.existsSync(process.env.MSCA_DIRECTORY)) { + console.log(`MSCA CLI v${cliVersion} already installed.`); + installed = true; + } + return installed; + } + resolvePackageDirectory(versionDirectory, cliVersion) { + if (cliVersion.includes("*")) { + let packageDirectory = this.findLatestVersionDirectory(versionDirectory); + this.setVariables(packageDirectory); + } + else { + this.setVariablesWithVersion(versionDirectory, cliVersion); + } + if (!fs.existsSync(process.env.MSCA_DIRECTORY)) { + throw `MSCA CLI v${cliVersion} was not found after installation.`; + } + } + findLatestVersionDirectory(versionsDirectory, isPreRelease = false) { + let latestDirectory = null; + let latestVersionParts = null; + let latestIsPreRelease = false; + let latestPreReleaseFlag = null; + core.debug(`Searching for all version folders in: ${versionsDirectory}`); + let dirs = this.getDirectories(versionsDirectory); + for (let dirIndex = 0; dirIndex < dirs.length; dirIndex++) { + let dir = dirs[dirIndex]; + if (dir == null || dir == "") { + core.debug(`Skipping null or empty directory: ${dir}`); + continue; + } + core.debug(`Evaluating MSCA directory: ${dir}`); + const dirRegex = new RegExp(/^(\d+\.?){1,6}(\-\w+)?$/g); + if (dirRegex.exec(dir) == null) { + core.debug(`Skipping invalid version directory: ${dir}`); + continue; + } + let fullVersionParts = dir.split("-"); + if (fullVersionParts == null || fullVersionParts.length < 0 || fullVersionParts.length > 2) { + core.debug(`Skipping invalid version directory: ${dir}`); + } + let dirIsPreRelease = fullVersionParts.length > 1; + if (!isPreRelease && dirIsPreRelease) { + core.debug(`Skipping pre-release version directory: ${dir}`); + continue; + } + let dirPreReleaseFlag = null; + if (dirIsPreRelease) { + dirPreReleaseFlag = fullVersionParts[1]; + } + let versionNumbersString = fullVersionParts[0]; + let versionParts = dir.split("."); + let isLatest = latestDirectory == null || latestVersionParts == null; + if (!isLatest) { + let maxVersionParts = versionParts.length; + if (latestVersionParts.length > maxVersionParts) { + maxVersionParts = latestVersionParts.length; + } + for (let versionPartIndex = 0; versionPartIndex < versionParts.length; versionPartIndex++) { + let versionPart = 0; + let latestVersionPart = 0; + let isLastVersionPart = versionPartIndex == (maxVersionParts - 1); + if (versionPartIndex < versionParts.length) { + versionPart = parseInt(versionParts[versionPartIndex]); + } + if (versionPartIndex < latestVersionParts.length) { + latestVersionPart = parseInt(latestVersionParts[versionPartIndex]); + } + if (versionPart > latestVersionPart) { + isLatest = true; + } + else if (versionPart == latestVersionPart) { + isLatest = isLastVersionPart + && + ((isPreRelease && latestIsPreRelease && dirPreReleaseFlag > latestPreReleaseFlag) + || + (!isPreRelease && latestIsPreRelease)); + } + else { + break; + } + if (isLatest) { + break; + } + } + } + if (isLatest) { + core.debug(`Setting latest version directory: ${dir}`); + latestDirectory = path.join(versionsDirectory, dir); + latestVersionParts = versionParts; + latestIsPreRelease = dirIsPreRelease; + latestPreReleaseFlag = dirPreReleaseFlag; + } + } + core.debug(`latestDirectory = ${latestDirectory}`); + return latestDirectory; + } + getDirectories(directory) { + return fs.readdirSync(directory).filter(p => this.isDirectory(directory, p)); + } + isDirectory(directory, p) { + return fs.statSync(path.join(directory, p)).isDirectory(); + } + setVariablesWithVersion(versionDirectory, cliVersion) { + let packageDirectory = path.join(versionDirectory, cliVersion); + core.debug(`packageDirectory = ${packageDirectory}`); + this.setVariables(packageDirectory); + } + setVariables(packageDirectory) { + let mscaDirectory = path.join(packageDirectory, 'tools'); + core.debug(`mscaDirectory = ${mscaDirectory}`); + let mscaFilePath = path.join(mscaDirectory, 'guardian'); + core.debug(`mscaFilePath = ${mscaFilePath}`); + process.env.MSCA_DIRECTORY = mscaDirectory; + process.env.MSCA_FILEPATH = mscaFilePath; + } +} +exports.MscaInstaller = MscaInstaller; diff --git a/node_modules/msca-actions-toolkit/msca-toolkit.proj b/node_modules/msca-actions-toolkit/msca-toolkit.proj new file mode 100644 index 0000000..b2d91c7 --- /dev/null +++ b/node_modules/msca-actions-toolkit/msca-toolkit.proj @@ -0,0 +1,13 @@ + + + + netcoreapp3.1 + Microsoft.Security.CodeAnalysis.Cli + 0.* + + + + + + + \ No newline at end of file diff --git a/node_modules/msca-actions-toolkit/package.json b/node_modules/msca-actions-toolkit/package.json new file mode 100644 index 0000000..e84f1d1 --- /dev/null +++ b/node_modules/msca-actions-toolkit/package.json @@ -0,0 +1,18 @@ +{ + "name": "msca-actions-toolkit", + "version": "1.0.0", + "description": "Microsoft Security Code Analysis for GitHub Actions toolkit.", + "author": "Microsoft Corporation", + "license": "MIT", + "homepage": "https://github.com/microsoft/msca-actions-toolkit", + "dependencies": { + "@actions/core": "1.2.6", + "@actions/exec": "1.0.4", + "js-yaml": "3.13.1" + }, + "devDependencies": { + "@types/node": "^8.0.53", + "typescript": "^4.1.5" + }, + "main": "msca-client.js" +} diff --git a/package-lock.json b/package-lock.json index d5f6ac8..23b1028 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,8 +1,278 @@ { "name": "ossar-action", "version": "1.1.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "version": "1.1.0", + "dependencies": { + "@actions/core": "1.2.6", + "@actions/exec": "1.0.4", + "msca-actions-toolkit": "^1.0.0" + }, + "devDependencies": { + "@types/mocha": "^2.2.44", + "@types/node": "^8.0.53", + "@types/q": "^1.0.6", + "@types/sinon": "^4.1.2", + "sinon": "^4.1.3", + "typescript": "^3.7.5" + } + }, + "node_modules/@actions/core": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz", + "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==" + }, + "node_modules/@actions/exec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.4.tgz", + "integrity": "sha512-4DPChWow9yc9W3WqEbUj8Nr86xkpyE29ZzWjXucHItclLbEW6jr80Zx4nqv18QL6KK65+cifiQZXvnqgTV6oHw==", + "dependencies": { + "@actions/io": "^1.0.1" + } + }, + "node_modules/@actions/io": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.2.tgz", + "integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg==" + }, + "node_modules/@sinonjs/commons": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.4.0.tgz", + "integrity": "sha512-9jHK3YF/8HtJ9wCAbG+j8cD0i0+ATS9A7gXFqS36TblLPNy6rEEc+SB0imo91eCboGaBYGV/MT1/br/J+EE7Tw==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/formatio": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", + "dev": true, + "dependencies": { + "samsam": "1.3.0" + } + }, + "node_modules/@sinonjs/samsam": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.2.tgz", + "integrity": "sha512-ILO/rR8LfAb60Y1Yfp9vxfYAASK43NFC2mLzpvLUbCQY/Qu8YwReboseu8aheCEkyElZF2L2T9mHcR2bgdvZyA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.0.2", + "array-from": "^2.1.1", + "lodash": "^4.17.11" + } + }, + "node_modules/@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "node_modules/@types/mocha": { + "version": "2.2.48", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.48.tgz", + "integrity": "sha512-nlK/iyETgafGli8Zh9zJVCTicvU3iajSkRwOh3Hhiva598CMqNJ4NcVCGMTGKpGpTYj/9R8RLzS9NAykSSCqGw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "8.10.51", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.51.tgz", + "integrity": "sha512-cArrlJp3Yv6IyFT/DYe+rlO8o3SIHraALbBW/+CcCYW/a9QucpLI+n2p4sRxAvl2O35TiecpX2heSZtJjvEO+Q==", + "dev": true + }, + "node_modules/@types/q": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", + "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==", + "dev": true + }, + "node_modules/@types/sinon": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-4.3.3.tgz", + "integrity": "sha512-Tt7w/ylBS/OEAlSCwzB0Db1KbxnkycP/1UkQpbvKFYoUuRn4uYsC3xh5TRPrOjTy0i8TIkSz1JdNL4GPVdf3KQ==", + "dev": true + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-from": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", + "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", + "dev": true + }, + "node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/just-extend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.0.2.tgz", + "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==", + "dev": true + }, + "node_modules/lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "node_modules/lolex": { + "version": "2.7.5", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.5.tgz", + "integrity": "sha512-l9x0+1offnKKIzYVjyXU2SiwhXDLekRzKyhnbyldPHvC7BvLPVpdNUNR2KeMAiCN2D/kLNttZgQD5WjSxuBx3Q==", + "dev": true + }, + "node_modules/msca-actions-toolkit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/msca-actions-toolkit/-/msca-actions-toolkit-1.0.0.tgz", + "integrity": "sha512-sAxBKFX0V9i01xEUco9+5ykFntpT/Us8l9lgpraKPTLkqNbQfUUV6x2JONTzdaS2AydoZlU9LnYGaSv+F72reA==", + "dependencies": { + "@actions/core": "1.2.6", + "@actions/exec": "1.0.4", + "js-yaml": "3.13.1" + } + }, + "node_modules/nise": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.1.tgz", + "integrity": "sha512-edFWm0fsFG2n318rfEnKlTZTkjlbVOFF9XIA+fj+Ed+Qz1laYW2lobwavWoMzGrYDHH1EpiNJgDfvGnkZztR/g==", + "dev": true, + "dependencies": { + "@sinonjs/formatio": "^3.2.1", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "lolex": "^4.1.0", + "path-to-regexp": "^1.7.0" + } + }, + "node_modules/nise/node_modules/@sinonjs/formatio": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.1.tgz", + "integrity": "sha512-tsHvOB24rvyvV2+zKMmPkZ7dXX6LSLKZ7aOtXY6Edklp0uRcgGpOsQTTGTcWViFyx4uhWc6GV8QdnALbIbIdeQ==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^3.1.0" + } + }, + "node_modules/nise/node_modules/lolex": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.2.0.tgz", + "integrity": "sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/samsam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", + "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", + "dev": true + }, + "node_modules/sinon": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-4.5.0.tgz", + "integrity": "sha512-trdx+mB0VBBgoYucy6a9L7/jfQOmvGeaKZT4OOJ+lPAtI8623xyGr8wLiE4eojzBS8G9yXbhx42GHUOVLr4X2w==", + "dev": true, + "dependencies": { + "@sinonjs/formatio": "^2.0.0", + "diff": "^3.1.0", + "lodash.get": "^4.4.2", + "lolex": "^2.2.0", + "nise": "^1.2.0", + "supports-color": "^5.1.0", + "type-detect": "^4.0.5" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "node_modules/typescript": { + "version": "3.7.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", + "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", + "dev": true + } + }, "dependencies": { "@actions/core": { "version": "1.2.6", @@ -151,6 +421,16 @@ "integrity": "sha512-l9x0+1offnKKIzYVjyXU2SiwhXDLekRzKyhnbyldPHvC7BvLPVpdNUNR2KeMAiCN2D/kLNttZgQD5WjSxuBx3Q==", "dev": true }, + "msca-actions-toolkit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/msca-actions-toolkit/-/msca-actions-toolkit-1.0.0.tgz", + "integrity": "sha512-sAxBKFX0V9i01xEUco9+5ykFntpT/Us8l9lgpraKPTLkqNbQfUUV6x2JONTzdaS2AydoZlU9LnYGaSv+F72reA==", + "requires": { + "@actions/core": "1.2.6", + "@actions/exec": "1.0.4", + "js-yaml": "3.13.1" + } + }, "nise": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.1.tgz", diff --git a/tsconfig.json b/tsconfig.json index 28a2cc2..aeb5089 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,8 +8,11 @@ "outDir": "./lib", "rootDir": "./src", "strict": false, + "esModuleInterop": true, "noImplicitAny": false, - "esModuleInterop": true + "removeComments": true, + "sourceMap": false + }, "include": [ "src/**/*"