From 9f175e13fe7a8464eb1f7761a587e422737f6aca Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Tue, 7 Mar 2023 09:16:13 +0800 Subject: [PATCH] type: fix merge errors. (#23) (#24) --- dist/action.js | 313 ++++++++++++++++++++++++------------------------- src/badges.ts | 11 +- 2 files changed, 162 insertions(+), 162 deletions(-) diff --git a/dist/action.js b/dist/action.js index f90b4fc..7223d0f 100644 --- a/dist/action.js +++ b/dist/action.js @@ -1,7 +1,7 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 7798: +/***/ 28: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; @@ -41,7 +41,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports.issue = exports.issueCommand = void 0; var os = __importStar(__webpack_require__(2037)); -var utils_1 = __webpack_require__(2924); +var utils_1 = __webpack_require__(600); /** * Commands * @@ -109,7 +109,7 @@ function escapeProperty(s) { /***/ }), -/***/ 7096: +/***/ 8397: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; @@ -174,12 +174,12 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; -var command_1 = __webpack_require__(7798); -var file_command_1 = __webpack_require__(3127); -var utils_1 = __webpack_require__(2924); +var command_1 = __webpack_require__(28); +var file_command_1 = __webpack_require__(3035); +var utils_1 = __webpack_require__(600); var os = __importStar(__webpack_require__(2037)); var path = __importStar(__webpack_require__(1017)); -var oidc_utils_1 = __webpack_require__(4445); +var oidc_utils_1 = __webpack_require__(335); /** * The code to exit an action */ @@ -494,7 +494,7 @@ exports.getIDToken = getIDToken; /** * Summary exports */ -var summary_1 = __webpack_require__(316); +var summary_1 = __webpack_require__(2407); Object.defineProperty(exports, "summary", ({ enumerable: true, get: function get() { @@ -504,7 +504,7 @@ Object.defineProperty(exports, "summary", ({ /** * @deprecated use core.summary */ -var summary_2 = __webpack_require__(316); +var summary_2 = __webpack_require__(2407); Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function get() { @@ -514,7 +514,7 @@ Object.defineProperty(exports, "markdownSummary", ({ /** * Path exports */ -var path_utils_1 = __webpack_require__(9551); +var path_utils_1 = __webpack_require__(1476); Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function get() { @@ -536,7 +536,7 @@ Object.defineProperty(exports, "toPlatformPath", ({ /***/ }), -/***/ 3127: +/***/ 3035: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; @@ -578,8 +578,8 @@ exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; /* eslint-disable @typescript-eslint/no-explicit-any */ var fs = __importStar(__webpack_require__(7147)); var os = __importStar(__webpack_require__(2037)); -var uuid_1 = __webpack_require__(7428); -var utils_1 = __webpack_require__(2924); +var uuid_1 = __webpack_require__(6779); +var utils_1 = __webpack_require__(600); function issueFileCommand(command, message) { var filePath = process.env["GITHUB_".concat(command)]; if (!filePath) { @@ -611,7 +611,7 @@ exports.prepareKeyValueMessage = prepareKeyValueMessage; /***/ }), -/***/ 4445: +/***/ 335: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; @@ -651,9 +651,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.OidcClient = void 0; -var http_client_1 = __webpack_require__(7362); -var auth_1 = __webpack_require__(8916); -var core_1 = __webpack_require__(7096); +var http_client_1 = __webpack_require__(5440); +var auth_1 = __webpack_require__(8039); +var core_1 = __webpack_require__(8397); var OidcClient = /*#__PURE__*/function () { function OidcClient() { _classCallCheck(this, OidcClient); @@ -758,7 +758,7 @@ exports.OidcClient = OidcClient; /***/ }), -/***/ 9551: +/***/ 1476: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; @@ -833,7 +833,7 @@ exports.toPlatformPath = toPlatformPath; /***/ }), -/***/ 316: +/***/ 2407: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; @@ -1263,7 +1263,7 @@ exports.summary = _summary; /***/ }), -/***/ 2924: +/***/ 600: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -1311,7 +1311,7 @@ exports.toCommandProperties = toCommandProperties; /***/ }), -/***/ 8916: +/***/ 8039: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; @@ -1473,7 +1473,7 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand /***/ }), -/***/ 7362: +/***/ 5440: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; @@ -1548,8 +1548,8 @@ Object.defineProperty(exports, "__esModule", ({ exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; var http = __importStar(__webpack_require__(3685)); var https = __importStar(__webpack_require__(5687)); -var pm = __importStar(__webpack_require__(785)); -var tunnel = __importStar(__webpack_require__(7548)); +var pm = __importStar(__webpack_require__(4537)); +var tunnel = __importStar(__webpack_require__(8808)); var HttpCodes; (function (HttpCodes) { HttpCodes[HttpCodes["OK"] = 200] = "OK"; @@ -2412,7 +2412,7 @@ var lowercaseKeys = function lowercaseKeys(obj) { /***/ }), -/***/ 785: +/***/ 4537: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; @@ -2497,7 +2497,7 @@ exports.checkBypass = checkBypass; /***/ }), -/***/ 6352: +/***/ 1650: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { var _toArray = (__webpack_require__(1589)["default"]); @@ -2621,17 +2621,17 @@ typeof window == "object" && (window.badgen = V); /***/ }), -/***/ 9720: +/***/ 1081: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var fs = __webpack_require__(3647); +var fs = __webpack_require__(4527); var path = __webpack_require__(1017); -var mkdirsSync = (__webpack_require__(2427).mkdirsSync); -var utimesMillisSync = (__webpack_require__(7160).utimesMillisSync); -var stat = __webpack_require__(5351); +var mkdirsSync = (__webpack_require__(5027).mkdirsSync); +var utimesMillisSync = (__webpack_require__(2818).utimesMillisSync); +var stat = __webpack_require__(1577); function copySync(src, dest, opts) { if (typeof opts === 'function') { opts = { @@ -2765,18 +2765,18 @@ module.exports = copySync; /***/ }), -/***/ 6942: +/***/ 2264: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var fs = __webpack_require__(3647); +var fs = __webpack_require__(4527); var path = __webpack_require__(1017); -var mkdirs = (__webpack_require__(2427).mkdirs); -var pathExists = (__webpack_require__(4750).pathExists); -var utimesMillis = (__webpack_require__(7160).utimesMillis); -var stat = __webpack_require__(5351); +var mkdirs = (__webpack_require__(5027).mkdirs); +var pathExists = (__webpack_require__(9109).pathExists); +var utimesMillis = (__webpack_require__(2818).utimesMillis); +var stat = __webpack_require__(1577); function copy(src, dest, opts, cb) { if (typeof opts === 'function' && !cb) { cb = opts; @@ -2978,21 +2978,21 @@ module.exports = copy; /***/ }), -/***/ 4536: +/***/ 5470: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var u = (__webpack_require__(4477).fromCallback); +var u = (__webpack_require__(7385).fromCallback); module.exports = { - copy: u(__webpack_require__(6942)), - copySync: __webpack_require__(9720) + copy: u(__webpack_require__(2264)), + copySync: __webpack_require__(1081) }; /***/ }), -/***/ 1636: +/***/ 1032: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; @@ -3000,11 +3000,11 @@ module.exports = { var _regeneratorRuntime = (__webpack_require__(7061)["default"]); var _asyncToGenerator = (__webpack_require__(7156)["default"]); -var u = (__webpack_require__(4477).fromPromise); -var fs = __webpack_require__(1979); +var u = (__webpack_require__(7385).fromPromise); +var fs = __webpack_require__(9278); var path = __webpack_require__(1017); -var mkdir = __webpack_require__(2427); -var remove = __webpack_require__(2202); +var mkdir = __webpack_require__(5027); +var remove = __webpack_require__(177); var emptyDir = u( /*#__PURE__*/function () { var _emptyDir = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dir) { var items; @@ -3058,16 +3058,16 @@ module.exports = { /***/ }), -/***/ 9799: +/***/ 2060: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var u = (__webpack_require__(4477).fromCallback); +var u = (__webpack_require__(7385).fromCallback); var path = __webpack_require__(1017); -var fs = __webpack_require__(3647); -var mkdir = __webpack_require__(2427); +var fs = __webpack_require__(4527); +var mkdir = __webpack_require__(5027); function createFile(file, callback) { function makeFile() { fs.writeFile(file, '', function (err) { @@ -3126,19 +3126,19 @@ module.exports = { /***/ }), -/***/ 2861: +/***/ 7951: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var _require = __webpack_require__(9799), +var _require = __webpack_require__(2060), createFile = _require.createFile, createFileSync = _require.createFileSync; -var _require2 = __webpack_require__(9806), +var _require2 = __webpack_require__(5613), createLink = _require2.createLink, createLinkSync = _require2.createLinkSync; -var _require3 = __webpack_require__(7360), +var _require3 = __webpack_require__(6761), createSymlink = _require3.createSymlink, createSymlinkSync = _require3.createSymlinkSync; module.exports = { @@ -3161,18 +3161,18 @@ module.exports = { /***/ }), -/***/ 9806: +/***/ 5613: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var u = (__webpack_require__(4477).fromCallback); +var u = (__webpack_require__(7385).fromCallback); var path = __webpack_require__(1017); -var fs = __webpack_require__(3647); -var mkdir = __webpack_require__(2427); -var pathExists = (__webpack_require__(4750).pathExists); -var _require = __webpack_require__(5351), +var fs = __webpack_require__(4527); +var mkdir = __webpack_require__(5027); +var pathExists = (__webpack_require__(9109).pathExists); +var _require = __webpack_require__(1577), areIdentical = _require.areIdentical; function createLink(srcpath, dstpath, callback) { function makeLink(srcpath, dstpath) { @@ -3225,15 +3225,15 @@ module.exports = { /***/ }), -/***/ 5294: +/***/ 6918: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var path = __webpack_require__(1017); -var fs = __webpack_require__(3647); -var pathExists = (__webpack_require__(4750).pathExists); +var fs = __webpack_require__(4527); +var pathExists = (__webpack_require__(9109).pathExists); /** * Function that returns two types of paths, one relative to symlink, and one @@ -3329,13 +3329,13 @@ module.exports = { /***/ }), -/***/ 6141: +/***/ 3249: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var fs = __webpack_require__(3647); +var fs = __webpack_require__(4527); function symlinkType(srcpath, type, callback) { callback = typeof type === 'function' ? type : callback; type = typeof type === 'function' ? false : type; @@ -3363,27 +3363,27 @@ module.exports = { /***/ }), -/***/ 7360: +/***/ 6761: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var _slicedToArray = (__webpack_require__(7424)["default"]); -var u = (__webpack_require__(4477).fromCallback); +var u = (__webpack_require__(7385).fromCallback); var path = __webpack_require__(1017); -var fs = __webpack_require__(1979); -var _mkdirs = __webpack_require__(2427); +var fs = __webpack_require__(9278); +var _mkdirs = __webpack_require__(5027); var mkdirs = _mkdirs.mkdirs; var mkdirsSync = _mkdirs.mkdirsSync; -var _symlinkPaths = __webpack_require__(5294); +var _symlinkPaths = __webpack_require__(6918); var symlinkPaths = _symlinkPaths.symlinkPaths; var symlinkPathsSync = _symlinkPaths.symlinkPathsSync; -var _symlinkType = __webpack_require__(6141); +var _symlinkType = __webpack_require__(3249); var symlinkType = _symlinkType.symlinkType; var symlinkTypeSync = _symlinkType.symlinkTypeSync; -var pathExists = (__webpack_require__(4750).pathExists); -var _require = __webpack_require__(5351), +var pathExists = (__webpack_require__(9109).pathExists); +var _require = __webpack_require__(1577), areIdentical = _require.areIdentical; function createSymlink(srcpath, dstpath, type, callback) { callback = typeof type === 'function' ? type : callback; @@ -3444,7 +3444,7 @@ module.exports = { /***/ }), -/***/ 1979: +/***/ 9278: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; @@ -3452,8 +3452,8 @@ module.exports = { // This is adapted from https://github.com/normalize/mz // Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors -var u = (__webpack_require__(4477).fromCallback); -var fs = __webpack_require__(3647); +var u = (__webpack_require__(7385).fromCallback); +var fs = __webpack_require__(4527); var api = ['access', 'appendFile', 'chmod', 'chown', 'close', 'copyFile', 'fchmod', 'fchown', 'fdatasync', 'fstat', 'fsync', 'ftruncate', 'futimes', 'lchmod', 'lchown', 'link', 'lstat', 'mkdir', 'mkdtemp', 'open', 'opendir', 'readdir', 'readFile', 'readlink', 'realpath', 'rename', 'rm', 'rmdir', 'stat', 'symlink', 'truncate', 'unlink', 'utimes', 'writeFile'].filter(function (key) { // Some commands are not available on some systems. Ex: // fs.cp was added in Node.js v16.7.0 @@ -3571,27 +3571,27 @@ if (typeof fs.realpath["native"] === 'function') { /***/ }), -/***/ 685: +/***/ 5064: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var _objectSpread = (__webpack_require__(2122)["default"]); -module.exports = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, __webpack_require__(1979)), __webpack_require__(4536)), __webpack_require__(1636)), __webpack_require__(2861)), __webpack_require__(7719)), __webpack_require__(2427)), __webpack_require__(1234)), __webpack_require__(3005)), __webpack_require__(4750)), __webpack_require__(2202)); +module.exports = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, __webpack_require__(9278)), __webpack_require__(5470)), __webpack_require__(1032)), __webpack_require__(7951)), __webpack_require__(6206)), __webpack_require__(5027)), __webpack_require__(9614)), __webpack_require__(4644)), __webpack_require__(9109)), __webpack_require__(177)); /***/ }), -/***/ 7719: +/***/ 6206: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var u = (__webpack_require__(4477).fromPromise); -var jsonFile = __webpack_require__(2412); -jsonFile.outputJson = u(__webpack_require__(3452)); -jsonFile.outputJsonSync = __webpack_require__(6971); +var u = (__webpack_require__(7385).fromPromise); +var jsonFile = __webpack_require__(1347); +jsonFile.outputJson = u(__webpack_require__(3419)); +jsonFile.outputJsonSync = __webpack_require__(1803); // aliases jsonFile.outputJSON = jsonFile.outputJson; jsonFile.outputJSONSync = jsonFile.outputJsonSync; @@ -3603,13 +3603,13 @@ module.exports = jsonFile; /***/ }), -/***/ 2412: +/***/ 1347: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var jsonFile = __webpack_require__(3323); +var jsonFile = __webpack_require__(5641); module.exports = { // jsonfile exports readJson: jsonFile.readFile, @@ -3620,15 +3620,15 @@ module.exports = { /***/ }), -/***/ 6971: +/***/ 1803: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var _require = __webpack_require__(2041), +var _require = __webpack_require__(9309), stringify = _require.stringify; -var _require2 = __webpack_require__(3005), +var _require2 = __webpack_require__(4644), outputFileSync = _require2.outputFileSync; function outputJsonSync(file, data, options) { var str = stringify(data, options); @@ -3638,7 +3638,7 @@ module.exports = outputJsonSync; /***/ }), -/***/ 3452: +/***/ 3419: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; @@ -3646,9 +3646,9 @@ module.exports = outputJsonSync; var _regeneratorRuntime = (__webpack_require__(7061)["default"]); var _asyncToGenerator = (__webpack_require__(7156)["default"]); -var _require = __webpack_require__(2041), +var _require = __webpack_require__(9309), stringify = _require.stringify; -var _require2 = __webpack_require__(3005), +var _require2 = __webpack_require__(4644), outputFile = _require2.outputFile; function outputJson(_x, _x2) { return _outputJson.apply(this, arguments); @@ -3677,14 +3677,14 @@ module.exports = outputJson; /***/ }), -/***/ 2427: +/***/ 5027: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var u = (__webpack_require__(4477).fromPromise); -var _require = __webpack_require__(6581), +var u = (__webpack_require__(7385).fromPromise); +var _require = __webpack_require__(7368), _makeDir = _require.makeDir, makeDirSync = _require.makeDirSync; var makeDir = u(_makeDir); @@ -3700,7 +3700,7 @@ module.exports = { /***/ }), -/***/ 6581: +/***/ 7368: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; @@ -3709,8 +3709,8 @@ module.exports = { var _regeneratorRuntime = (__webpack_require__(7061)["default"]); var _asyncToGenerator = (__webpack_require__(7156)["default"]); var _objectSpread = (__webpack_require__(2122)["default"]); -var fs = __webpack_require__(1979); -var _require = __webpack_require__(5958), +var fs = __webpack_require__(9278); +var _require = __webpack_require__(2288), checkPath = _require.checkPath; var getMode = function getMode(options) { var defaults = { @@ -3749,7 +3749,7 @@ module.exports.makeDirSync = function (dir, options) { /***/ }), -/***/ 5958: +/***/ 2288: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; @@ -3777,32 +3777,32 @@ module.exports.checkPath = function checkPath(pth) { /***/ }), -/***/ 1234: +/***/ 9614: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var u = (__webpack_require__(4477).fromCallback); +var u = (__webpack_require__(7385).fromCallback); module.exports = { - move: u(__webpack_require__(393)), - moveSync: __webpack_require__(9589) + move: u(__webpack_require__(8417)), + moveSync: __webpack_require__(697) }; /***/ }), -/***/ 9589: +/***/ 697: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var fs = __webpack_require__(3647); +var fs = __webpack_require__(4527); var path = __webpack_require__(1017); -var copySync = (__webpack_require__(4536).copySync); -var removeSync = (__webpack_require__(2202).removeSync); -var mkdirpSync = (__webpack_require__(2427).mkdirpSync); -var stat = __webpack_require__(5351); +var copySync = (__webpack_require__(5470).copySync); +var removeSync = (__webpack_require__(177).removeSync); +var mkdirpSync = (__webpack_require__(5027).mkdirpSync); +var stat = __webpack_require__(1577); function moveSync(src, dest, opts) { opts = opts || {}; var overwrite = opts.overwrite || opts.clobber || false; @@ -3848,19 +3848,19 @@ module.exports = moveSync; /***/ }), -/***/ 393: +/***/ 8417: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var fs = __webpack_require__(3647); +var fs = __webpack_require__(4527); var path = __webpack_require__(1017); -var copy = (__webpack_require__(4536).copy); -var remove = (__webpack_require__(2202).remove); -var mkdirp = (__webpack_require__(2427).mkdirp); -var pathExists = (__webpack_require__(4750).pathExists); -var stat = __webpack_require__(5351); +var copy = (__webpack_require__(5470).copy); +var remove = (__webpack_require__(177).remove); +var mkdirp = (__webpack_require__(5027).mkdirp); +var pathExists = (__webpack_require__(9109).pathExists); +var stat = __webpack_require__(1577); function move(src, dest, opts, cb) { if (typeof opts === 'function') { cb = opts; @@ -3923,17 +3923,17 @@ module.exports = move; /***/ }), -/***/ 3005: +/***/ 4644: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var u = (__webpack_require__(4477).fromCallback); -var fs = __webpack_require__(3647); +var u = (__webpack_require__(7385).fromCallback); +var fs = __webpack_require__(4527); var path = __webpack_require__(1017); -var mkdir = __webpack_require__(2427); -var pathExists = (__webpack_require__(4750).pathExists); +var mkdir = __webpack_require__(5027); +var pathExists = (__webpack_require__(9109).pathExists); function outputFile(file, data, encoding, callback) { if (typeof encoding === 'function') { callback = encoding; @@ -3967,14 +3967,14 @@ module.exports = { /***/ }), -/***/ 4750: +/***/ 9109: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var u = (__webpack_require__(4477).fromPromise); -var fs = __webpack_require__(1979); +var u = (__webpack_require__(7385).fromPromise); +var fs = __webpack_require__(9278); function pathExists(path) { return fs.access(path).then(function () { return true; @@ -3989,14 +3989,14 @@ module.exports = { /***/ }), -/***/ 2202: +/***/ 177: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var fs = __webpack_require__(3647); -var u = (__webpack_require__(4477).fromCallback); +var fs = __webpack_require__(4527); +var u = (__webpack_require__(7385).fromCallback); function remove(path, callback) { fs.rm(path, { recursive: true, @@ -4016,14 +4016,14 @@ module.exports = { /***/ }), -/***/ 5351: +/***/ 1577: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var _slicedToArray = (__webpack_require__(7424)["default"]); -var fs = __webpack_require__(1979); +var fs = __webpack_require__(9278); var path = __webpack_require__(1017); var util = __webpack_require__(3837); function getStats(src, dest, opts) { @@ -4212,13 +4212,13 @@ module.exports = { /***/ }), -/***/ 7160: +/***/ 2818: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var fs = __webpack_require__(3647); +var fs = __webpack_require__(4527); function utimesMillis(path, atime, mtime, callback) { // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback) fs.open(path, 'r+', function (err, fd) { @@ -4242,7 +4242,7 @@ module.exports = { /***/ }), -/***/ 3436: +/***/ 3992: /***/ ((module) => { "use strict"; @@ -4265,13 +4265,13 @@ function clone(obj) { /***/ }), -/***/ 3647: +/***/ 4527: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var fs = __webpack_require__(7147); -var polyfills = __webpack_require__(6532); -var legacy = __webpack_require__(6465); -var clone = __webpack_require__(3436); +var polyfills = __webpack_require__(3594); +var legacy = __webpack_require__(6771); +var clone = __webpack_require__(3992); var util = __webpack_require__(3837); /* istanbul ignore next - node 0.x polyfill */ @@ -4621,7 +4621,7 @@ function retry() { /***/ }), -/***/ 6465: +/***/ 6771: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Stream = (__webpack_require__(2781).Stream); @@ -4721,7 +4721,7 @@ function legacy(fs) { /***/ }), -/***/ 6532: +/***/ 3594: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var constants = __webpack_require__(2057); @@ -5041,19 +5041,19 @@ function patch(fs) { /***/ }), -/***/ 3323: +/***/ 5641: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var _regeneratorRuntime = (__webpack_require__(7061)["default"]); var _asyncToGenerator = (__webpack_require__(7156)["default"]); var _fs; try { - _fs = __webpack_require__(3647); + _fs = __webpack_require__(4527); } catch (_) { _fs = __webpack_require__(7147); } -var universalify = __webpack_require__(4477); -var _require = __webpack_require__(2041), +var universalify = __webpack_require__(7385); +var _require = __webpack_require__(9309), stringify = _require.stringify, stripBom = _require.stripBom; function _readFile(_x) { @@ -5174,7 +5174,7 @@ module.exports = jsonfile; /***/ }), -/***/ 2041: +/***/ 9309: /***/ ((module) => { function stringify(obj) { @@ -5202,11 +5202,10 @@ module.exports = { /***/ }), - -/***/ 776: +/***/ 5827: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { -var shorterNames = __webpack_require__(4264); +var shorterNames = __webpack_require__(6535); var REGEX = { whitespace: /\s+/g, urlHexPairs: /%[\dA-F]{2}/g, @@ -5264,7 +5263,7 @@ module.exports = svgToTinyDataUri; /***/ }), -/***/ 4264: +/***/ 6535: /***/ ((module) => { module.exports = { @@ -5326,14 +5325,14 @@ module.exports = { /***/ }), -/***/ 7548: +/***/ 8808: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { -module.exports = __webpack_require__(8992); +module.exports = __webpack_require__(7938); /***/ }), -/***/ 8992: +/***/ 7938: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; @@ -5572,7 +5571,7 @@ exports.debug = debug; // for test /***/ }), -/***/ 4477: +/***/ 7385: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -5611,7 +5610,7 @@ exports.fromPromise = function (fn) { /***/ }), -/***/ 7428: +/***/ 6779: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -6883,10 +6882,8 @@ module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.expo /***/ ((module) => { "use strict"; - module.exports = JSON.parse('{"name":"coverage-badges-cli","version":"1.0.12","description":"Create coverage badges from coverage reports. Using GitHub Actions and GitHub Workflow CPU time (no 3rd parties servers).","homepage":"https://jaywcjlove.github.io/coverage-badges-cli/","license":"MIT","bin":{"coverage-badges":"bin/cli","coverage-badges-cli":"bin/cli"},"scripts":{"prepare":"husky install && npm run package","package":"ncc build src/action.ts","make-badges":"node bin/cli","watch":"tsbb watch --disable-babel","build":"tsbb build --disable-babel","test":"tsbb test","coverage":"tsbb test --coverage"},"files":["bin","lib","src"],"repository":{"type":"git","url":"https://github.com/jaywcjlove/coverage-badges-cli"},"keywords":["coverage","coverage-badges","coverage-badges-cli","badges"],"jest":{"coverageReporters":["lcov","json-summary"]},"lint-staged":{"*.ts?(x)":["npm run package"]},"dependencies":{"@types/fs-extra":"~11.0.0","@types/minimist":"~1.2.2","badgen":"~3.2.2","fs-extra":"~11.1.0","mini-svg-data-uri":"^1.4.4","minimist":"~1.2.5"},"devDependencies":{"@actions/core":"~1.10.0","@kkt/ncc":"~1.0.9","husky":"~8.0.0","lint-staged":"~13.1.0","tsbb":"~3.7.0"}}'); - /***/ }) /******/ }); @@ -7313,21 +7310,19 @@ function _asyncToGenerator(fn) { var external_path_ = __webpack_require__(1017); var external_path_default = /*#__PURE__*/__webpack_require__.n(external_path_); // EXTERNAL MODULE: ./node_modules/fs-extra/lib/index.js -var lib = __webpack_require__(685); +var lib = __webpack_require__(5064); var lib_default = /*#__PURE__*/__webpack_require__.n(lib); // EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js -var core = __webpack_require__(7096); +var core = __webpack_require__(8397); // EXTERNAL MODULE: ./node_modules/badgen/dist/index.js -var dist = __webpack_require__(6352); - +var dist = __webpack_require__(1650); // EXTERNAL MODULE: external "fs" var external_fs_ = __webpack_require__(7147); // EXTERNAL MODULE: ./node_modules/mini-svg-data-uri/index.js -var mini_svg_data_uri = __webpack_require__(776); +var mini_svg_data_uri = __webpack_require__(5827); var mini_svg_data_uri_default = /*#__PURE__*/__webpack_require__.n(mini_svg_data_uri); ;// CONCATENATED MODULE: ./src/badges.ts var getIconString=function getIconString(path){return (0,external_fs_.readFileSync)(path,'utf8');};function badge(option,summary){var _ref=option||{},_ref$label=_ref.label,label=_ref$label===void 0?'coverage':_ref$label,_ref$style=_ref.style,style=_ref$style===void 0?'classic':_ref$style,_ref$type=_ref.type,type=_ref$type===void 0?'statements':_ref$type;var total=summary.total;if(typeof total[type].pct!=='number'){total[type].pct=-1;}var pct=total[type].pct;var colorData={'#49c31a':[100],'#97c40f':[99.99,90],'#a0a127':[89.99,80],'#cba317':[79.99,60],'#ce0000':[59.99,0]};var color=Object.keys(colorData).find(function(value,idx){if(colorData[value].length===1&&pct>=colorData[value][0]){return true;}if(colorData[value].length===2&&pct<=colorData[value][0]&&pct>=colorData[value][1]){return true;}return false;});var badgenArgs={style:style,label:label,status:"".concat(pct<0?'Unknown':"".concat(pct,"%")),color:(color||'e5e5e5').replace(/^#/,'')};if(option.icon){var svgString=getIconString(option.icon);var svgDataUri=mini_svg_data_uri_default()(svgString);badgenArgs.icon=svgDataUri;}return (0,dist.badgen)(badgenArgs);} - ;// CONCATENATED MODULE: ./src/action.ts ;_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _require,version,output,source,label,style,sourceData,svgStr;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;_require=__webpack_require__(4147),version=_require.version;(0,core.info)("coverage-badges-cli v\x1B[32;1m".concat(version,"\x1B[0m"));output=external_path_default().resolve(process.cwd(),(0,core.getInput)('output')||'coverage/badges.svg');source=external_path_default().resolve(process.cwd(),(0,core.getInput)('source')||'coverage/coverage-summary.json');label=(0,core.getInput)('label')||'coverage';style=(0,core.getInput)('style')||'classic';lib_default().ensureDirSync(external_path_default().dirname(output));if(lib_default().existsSync(source)){_context.next=11;break;}(0,core.setFailed)("File \x1B[31m".concat(source,"\x1B[0m does not exist.\n please specify the file directory\n\x1B[35mnpm\x1B[0m coverage-badges-cli \x1B[33m--source\x1B[0m coverage/coverage-summary.json"));return _context.abrupt("return");case 11:(0,core.info)("Source Path: \x1B[32;1m".concat(source,"\x1B[0m"));(0,core.info)("Output Path: \x1B[32;1m".concat(output,"\x1B[0m"));sourceData=lib_default().readJSONSync(source);(0,core.startGroup)("Source Path: \x1B[32;1m".concat(source,"\x1B[0m"));(0,core.info)("".concat(JSON.stringify(sourceData,null,2)));(0,core.endGroup)();svgStr=badge({label:label,style:style},sourceData);(0,core.setOutput)('svg',svgStr);(0,core.startGroup)("SVG String: \x1B[32;1m".concat(output,"\x1B[0m"));(0,core.info)("".concat(svgStr));(0,core.endGroup)();lib_default().writeFileSync(output,svgStr);(0,core.info)("\nCreate Coverage Badges: \x1B[32;1m".concat(external_path_default().relative(process.cwd(),output),"\x1B[0m\n"));_context.next=29;break;case 26:_context.prev=26;_context.t0=_context["catch"](0);(0,core.setFailed)(_context.t0.message);case 29:case"end":return _context.stop();}},_callee,null,[[0,26]]);}))(); })(); diff --git a/src/badges.ts b/src/badges.ts index 570a05d..1045347 100644 --- a/src/badges.ts +++ b/src/badges.ts @@ -4,14 +4,19 @@ import svgToTinyDataUri from 'mini-svg-data-uri'; import { Summary } from './create'; // Copied from `badgen` because it's not exported -type StyleOption = 'flat' | 'classic'; -interface BadgenOptions { +export type StyleOption = 'flat' | 'classic'; + +export interface BadgenOptions { status: string; subject?: string; color?: string; label?: string; - style?: 'flat' | 'classic' + style?: StyleOption; type?: SummaryType + labelColor?: string; + icon?: string; + iconWidth?: number; + scale?: number; } export type SummaryType = 'lines' | 'statements' | 'functions' | 'branches';