From 65ff716a15e9ceca3ecaf333a83617bb363b0e84 Mon Sep 17 00:00:00 2001
From: thsaravana
Date: Mon, 22 Feb 2021 18:48:15 +0530
Subject: [PATCH] Test cases for process logic
---
.gitignore | 3 +-
__tests__/__fixtures__/report.xml | 147 +++++++--
__tests__/index.test.js | 65 ----
__tests__/process.test.js | 78 +++++
dist/index.js | 508 ++++++++++++++----------------
src/index.js | 34 +-
src/process.js | 8 +-
7 files changed, 463 insertions(+), 380 deletions(-)
delete mode 100644 __tests__/index.test.js
create mode 100644 __tests__/process.test.js
diff --git a/.gitignore b/.gitignore
index 34977ee..b18bfb2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
node_modules
-.idea
\ No newline at end of file
+.idea
+coverage
\ No newline at end of file
diff --git a/__tests__/__fixtures__/report.xml b/__tests__/__fixtures__/report.xml
index a428993..ca7a401 100644
--- a/__tests__/__fixtures__/report.xml
+++ b/__tests__/__fixtures__/report.xml
@@ -1,8 +1,39 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -10,43 +41,117 @@
-
+
+
+
+
+
+
+
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/__tests__/index.test.js b/__tests__/index.test.js
deleted file mode 100644
index c41ff0d..0000000
--- a/__tests__/index.test.js
+++ /dev/null
@@ -1,65 +0,0 @@
-const { TestScheduler } = require("jest");
-const fs = require('fs');
-const parser = require('xml2js');
-
-test("Read from Report xml", () => {
- const reportPath = "./__tests__/__fixtures__/report.xml"
- console.log("Something");
- var missed = "asdf";
- fs.readFile(reportPath, "utf8", function (_, data) {
- parser.parseString(data, function (_, value) {
- const counters = value["report"]["counter"]
- const report = counters[0]["$"]["type"];
- expect(report).toBe("INSTRUCTION")
-
- counters.forEach(counter => {
- const attr = counter["$"]
- if (attr["type"] == "INSTRUCTION") {
- missed = attr["missed"]
- const covered = attr["covered"]
- expect(missed).toBe("4")
- expect(covered).toBe("7")
- const coverage = parseFloat(covered) / (parseFloat(missed) + parseFloat(covered)) * 100
- expect(coverage).toBeCloseTo(63.636, 2)
- }
- });
- });
- });
- console.log("End");
- console.log(missed);
-});
-
-test("find file from changed files", () => {
- var changedFile = [
- {
- name: '.github/workflows/coverage.yml',
- url: 'https://github.com/thsaravana/jacoco-playground/blob/7e928205a14b3c5f08be3fa2f2005beecb7738b4/.github/workflows/coverage.yml'
- },
- {
- name: 'src/main/java/com/madrapps/jacoco/Utils.java',
- url: 'https://github.com/thsaravana/jacoco-playground/blob/7e928205a14b3c5f08be3fa2f2005beecb7738b4/src/main/java/com/madrapps/jacoco/Utils.java'
- },
- {
- name: 'src/main/kotlin/com/madrapps/jacoco/Math.kt',
- url: 'https://github.com/thsaravana/jacoco-playground/blob/7e928205a14b3c5f08be3fa2f2005beecb7738b4/src/main/kotlin/com/madrapps/jacoco/Math.kt'
- }
- ]
- const result = getFileCoverage(changedFile);
- console.log(`Result = ${result}`);
- console.log(result);
- console.log(`ChangedFile = ${changedFile}`);
- console.log(changedFile);
-});
-
-function getFileCoverage(files) {
- const results = [];
- const sourceFileName = "com/madrapps/jacoco" + "/" + "Math.kt"
- var file = files.find(function (el) {
- return el.name.endsWith(sourceFileName);
- });
- file["fileName"] = "FileName";
- file["coverage"] = 56.89;
- console.log(file);
- results.push(file);
- return results;
-}
\ No newline at end of file
diff --git a/__tests__/process.test.js b/__tests__/process.test.js
new file mode 100644
index 0000000..bb1431b
--- /dev/null
+++ b/__tests__/process.test.js
@@ -0,0 +1,78 @@
+const fs = require('fs');
+const parser = require('xml2js');
+const process = require('../src/process');
+
+test("get overall coverage", async () => {
+ const report = await getReport();
+ const coverage = process.getOverallCoverage(report);
+ expect(coverage).toBeCloseTo(49.01, 1);
+})
+
+describe("get file coverage", function () {
+
+ it("no files changed", async () => {
+ const report = await getReport();
+ const changedFiles = [];
+ const actual = process.getFileCoverage(report, changedFiles);
+ expect(actual).toEqual([]);
+ });
+
+ it("one file changed", async () => {
+ const report = await getReport();
+ const changedFiles = [
+ {
+ filePath: "src/main/java/com/madrapps/jacoco/operation/StringOp.java",
+ url: "https://github.com/thsaravana/jacoco-playground/blob/77b14eb61efcd211ee93a7d8bac80cf292d207cc/src/main/java/com/madrapps/jacoco/operation/StringOp.java"
+ }
+ ];
+ const actual = process.getFileCoverage(report, changedFiles);
+ expect(actual).toEqual([
+ {
+ "filePath": "src/main/java/com/madrapps/jacoco/operation/StringOp.java",
+ "url": "https://github.com/thsaravana/jacoco-playground/blob/77b14eb61efcd211ee93a7d8bac80cf292d207cc/src/main/java/com/madrapps/jacoco/operation/StringOp.java",
+ "name": "StringOp.java",
+ "coverage": 100,
+ }
+ ]);
+ });
+
+ it("multiple files changed", async () => {
+ const report = await getReport();
+ const changedFiles = [
+ {
+ filePath: "src/main/java/com/madrapps/jacoco/operation/StringOp.java",
+ url: "https://github.com/thsaravana/jacoco-playground/blob/77b14eb61efcd211ee93a7d8bac80cf292d207cc/src/main/java/com/madrapps/jacoco/operation/StringOp.java"
+ },
+ {
+ filePath: 'src/main/kotlin/com/madrapps/jacoco/Math.kt',
+ url: 'https://github.com/thsaravana/jacoco-playground/blob/77b14eb61efcd211ee93a7d8bac80cf292d207cc/src/main/kotlin/com/madrapps/jacoco/Math.kt'
+ },
+ {
+ filePath: 'src/test/java/com/madrapps/jacoco/operation/StringOpTest.java',
+ url: 'https://github.com/thsaravana/jacoco-playground/blob/77b14eb61efcd211ee93a7d8bac80cf292d207cc/src/test/java/com/madrapps/jacoco/operation/StringOpTest.java'
+ },
+ ];
+ const actual = process.getFileCoverage(report, changedFiles);
+ expect(actual).toEqual([
+ {
+ "coverage": 46.67,
+ "filePath": "src/main/kotlin/com/madrapps/jacoco/Math.kt",
+ "name": "Math.kt",
+ "url": "https://github.com/thsaravana/jacoco-playground/blob/77b14eb61efcd211ee93a7d8bac80cf292d207cc/src/main/kotlin/com/madrapps/jacoco/Math.kt",
+ },
+ {
+ "filePath": "src/main/java/com/madrapps/jacoco/operation/StringOp.java",
+ "url": "https://github.com/thsaravana/jacoco-playground/blob/77b14eb61efcd211ee93a7d8bac80cf292d207cc/src/main/java/com/madrapps/jacoco/operation/StringOp.java",
+ "name": "StringOp.java",
+ "coverage": 100,
+ },
+ ]);
+ });
+})
+
+async function getReport() {
+ const reportPath = "./__tests__/__fixtures__/report.xml";
+ const reportXml = await fs.promises.readFile(reportPath, "utf-8");
+ const json = await parser.parseStringPromise(reportXml);
+ return json["report"];
+}
diff --git a/dist/index.js b/dist/index.js
index aa97cd2..3478295 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -2,7 +2,7 @@ module.exports =
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
-/***/ 897:
+/***/ 4135:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -16,7 +16,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const os = __importStar(__nccwpck_require__(2087));
-const utils_1 = __nccwpck_require__(7406);
+const utils_1 = __nccwpck_require__(3185);
/**
* Commands
*
@@ -88,7 +88,7 @@ function escapeProperty(s) {
/***/ }),
-/***/ 7296:
+/***/ 4934:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -110,9 +110,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-const command_1 = __nccwpck_require__(897);
-const file_command_1 = __nccwpck_require__(4067);
-const utils_1 = __nccwpck_require__(7406);
+const command_1 = __nccwpck_require__(4135);
+const file_command_1 = __nccwpck_require__(4496);
+const utils_1 = __nccwpck_require__(3185);
const os = __importStar(__nccwpck_require__(2087));
const path = __importStar(__nccwpck_require__(5622));
/**
@@ -333,7 +333,7 @@ exports.getState = getState;
/***/ }),
-/***/ 4067:
+/***/ 4496:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -351,7 +351,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
/* eslint-disable @typescript-eslint/no-explicit-any */
const fs = __importStar(__nccwpck_require__(5747));
const os = __importStar(__nccwpck_require__(2087));
-const utils_1 = __nccwpck_require__(7406);
+const utils_1 = __nccwpck_require__(3185);
function issueCommand(command, message) {
const filePath = process.env[`GITHUB_${command}`];
if (!filePath) {
@@ -369,7 +369,7 @@ exports.issueCommand = issueCommand;
/***/ }),
-/***/ 7406:
+/***/ 3185:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -395,7 +395,7 @@ exports.toCommandValue = toCommandValue;
/***/ }),
-/***/ 559:
+/***/ 2102:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -452,7 +452,7 @@ exports.Context = Context;
/***/ }),
-/***/ 2536:
+/***/ 6794:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -478,8 +478,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getOctokit = exports.context = void 0;
-const Context = __importStar(__nccwpck_require__(559));
-const utils_1 = __nccwpck_require__(2412);
+const Context = __importStar(__nccwpck_require__(2102));
+const utils_1 = __nccwpck_require__(3726);
exports.context = new Context.Context();
/**
* Returns a hydrated octokit ready to use for GitHub Actions
@@ -495,7 +495,7 @@ exports.getOctokit = getOctokit;
/***/ }),
-/***/ 5692:
+/***/ 7266:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -521,7 +521,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getApiBaseUrl = exports.getProxyAgent = exports.getAuthString = void 0;
-const httpClient = __importStar(__nccwpck_require__(1073));
+const httpClient = __importStar(__nccwpck_require__(3789));
function getAuthString(token, options) {
if (!token && !options.auth) {
throw new Error('Parameter token or opts.auth is required');
@@ -545,7 +545,7 @@ exports.getApiBaseUrl = getApiBaseUrl;
/***/ }),
-/***/ 2412:
+/***/ 3726:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -571,12 +571,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getOctokitOptions = exports.GitHub = exports.context = void 0;
-const Context = __importStar(__nccwpck_require__(559));
-const Utils = __importStar(__nccwpck_require__(5692));
+const Context = __importStar(__nccwpck_require__(2102));
+const Utils = __importStar(__nccwpck_require__(7266));
// octokit + plugins
-const core_1 = __nccwpck_require__(4867);
-const plugin_rest_endpoint_methods_1 = __nccwpck_require__(8686);
-const plugin_paginate_rest_1 = __nccwpck_require__(7057);
+const core_1 = __nccwpck_require__(6708);
+const plugin_rest_endpoint_methods_1 = __nccwpck_require__(6719);
+const plugin_paginate_rest_1 = __nccwpck_require__(9442);
exports.context = new Context.Context();
const baseUrl = Utils.getApiBaseUrl();
const defaults = {
@@ -606,7 +606,7 @@ exports.getOctokitOptions = getOctokitOptions;
/***/ }),
-/***/ 1073:
+/***/ 3789:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -614,7 +614,7 @@ exports.getOctokitOptions = getOctokitOptions;
Object.defineProperty(exports, "__esModule", ({ value: true }));
const http = __nccwpck_require__(8605);
const https = __nccwpck_require__(7211);
-const pm = __nccwpck_require__(8746);
+const pm = __nccwpck_require__(8068);
let tunnel;
var HttpCodes;
(function (HttpCodes) {
@@ -1033,7 +1033,7 @@ class HttpClient {
if (useProxy) {
// If using proxy, need tunnel
if (!tunnel) {
- tunnel = __nccwpck_require__(2924);
+ tunnel = __nccwpck_require__(2165);
}
const agentOptions = {
maxSockets: maxSockets,
@@ -1149,7 +1149,7 @@ exports.HttpClient = HttpClient;
/***/ }),
-/***/ 8746:
+/***/ 8068:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -1214,7 +1214,7 @@ exports.checkBypass = checkBypass;
/***/ }),
-/***/ 661:
+/***/ 6218:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -1271,7 +1271,7 @@ exports.createTokenAuth = createTokenAuth;
/***/ }),
-/***/ 4867:
+/***/ 6708:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -1279,11 +1279,11 @@ exports.createTokenAuth = createTokenAuth;
Object.defineProperty(exports, "__esModule", ({ value: true }));
-var universalUserAgent = __nccwpck_require__(9696);
-var beforeAfterHook = __nccwpck_require__(9418);
-var request = __nccwpck_require__(5057);
-var graphql = __nccwpck_require__(5521);
-var authToken = __nccwpck_require__(661);
+var universalUserAgent = __nccwpck_require__(5935);
+var beforeAfterHook = __nccwpck_require__(9924);
+var request = __nccwpck_require__(3711);
+var graphql = __nccwpck_require__(405);
+var authToken = __nccwpck_require__(6218);
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
@@ -1453,7 +1453,7 @@ exports.Octokit = Octokit;
/***/ }),
-/***/ 2380:
+/***/ 6528:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -1461,8 +1461,8 @@ exports.Octokit = Octokit;
Object.defineProperty(exports, "__esModule", ({ value: true }));
-var isPlainObject = __nccwpck_require__(753);
-var universalUserAgent = __nccwpck_require__(9696);
+var isPlainObject = __nccwpck_require__(4903);
+var universalUserAgent = __nccwpck_require__(5935);
function lowercaseKeys(object) {
if (!object) {
@@ -1851,7 +1851,7 @@ exports.endpoint = endpoint;
/***/ }),
-/***/ 5521:
+/***/ 405:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -1859,8 +1859,8 @@ exports.endpoint = endpoint;
Object.defineProperty(exports, "__esModule", ({ value: true }));
-var request = __nccwpck_require__(5057);
-var universalUserAgent = __nccwpck_require__(9696);
+var request = __nccwpck_require__(3711);
+var universalUserAgent = __nccwpck_require__(5935);
const VERSION = "4.6.0";
@@ -1967,7 +1967,7 @@ exports.withCustomRequest = withCustomRequest;
/***/ }),
-/***/ 7057:
+/***/ 9442:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -2107,7 +2107,7 @@ exports.paginateRest = paginateRest;
/***/ }),
-/***/ 8686:
+/***/ 6719:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -3261,7 +3261,7 @@ exports.restEndpointMethods = restEndpointMethods;
/***/ }),
-/***/ 7869:
+/***/ 4009:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -3271,8 +3271,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-var deprecation = __nccwpck_require__(7396);
-var once = _interopDefault(__nccwpck_require__(5350));
+var deprecation = __nccwpck_require__(2889);
+var once = _interopDefault(__nccwpck_require__(2088));
const logOnce = once(deprecation => console.warn(deprecation));
/**
@@ -3324,7 +3324,7 @@ exports.RequestError = RequestError;
/***/ }),
-/***/ 5057:
+/***/ 3711:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -3334,11 +3334,11 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-var endpoint = __nccwpck_require__(2380);
-var universalUserAgent = __nccwpck_require__(9696);
-var isPlainObject = __nccwpck_require__(753);
-var nodeFetch = _interopDefault(__nccwpck_require__(4096));
-var requestError = __nccwpck_require__(7869);
+var endpoint = __nccwpck_require__(6528);
+var universalUserAgent = __nccwpck_require__(5935);
+var isPlainObject = __nccwpck_require__(4903);
+var nodeFetch = _interopDefault(__nccwpck_require__(1798));
+var requestError = __nccwpck_require__(4009);
const VERSION = "5.4.14";
@@ -3480,12 +3480,12 @@ exports.request = request;
/***/ }),
-/***/ 9418:
+/***/ 9924:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-var register = __nccwpck_require__(9289)
-var addHook = __nccwpck_require__(983)
-var removeHook = __nccwpck_require__(211)
+var register = __nccwpck_require__(7218)
+var addHook = __nccwpck_require__(6925)
+var removeHook = __nccwpck_require__(6661)
// bind with array of arguments: https://stackoverflow.com/a/21792913
var bind = Function.bind
@@ -3544,7 +3544,7 @@ module.exports.Collection = Hook.Collection
/***/ }),
-/***/ 983:
+/***/ 6925:
/***/ ((module) => {
module.exports = addHook;
@@ -3597,7 +3597,7 @@ function addHook(state, kind, name, hook) {
/***/ }),
-/***/ 9289:
+/***/ 7218:
/***/ ((module) => {
module.exports = register;
@@ -3631,7 +3631,7 @@ function register(state, name, method, options) {
/***/ }),
-/***/ 211:
+/***/ 6661:
/***/ ((module) => {
module.exports = removeHook;
@@ -3657,7 +3657,7 @@ function removeHook(state, name, method) {
/***/ }),
-/***/ 7396:
+/***/ 2889:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -3685,7 +3685,7 @@ exports.Deprecation = Deprecation;
/***/ }),
-/***/ 753:
+/***/ 4903:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -3731,7 +3731,7 @@ exports.isPlainObject = isPlainObject;
/***/ }),
-/***/ 4096:
+/***/ 1798:
/***/ ((module, exports, __nccwpck_require__) => {
"use strict";
@@ -3896,7 +3896,7 @@ FetchError.prototype.name = 'FetchError';
let convert;
try {
- convert = __nccwpck_require__(3163).convert;
+ convert = __nccwpck_require__(6355).convert;
} catch (e) {}
const INTERNALS = Symbol('Body internals');
@@ -5388,10 +5388,10 @@ exports.FetchError = FetchError;
/***/ }),
-/***/ 5350:
+/***/ 2088:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-var wrappy = __nccwpck_require__(1088)
+var wrappy = __nccwpck_require__(7290)
module.exports = wrappy(once)
module.exports.strict = wrappy(onceStrict)
@@ -5437,7 +5437,7 @@ function onceStrict (fn) {
/***/ }),
-/***/ 7605:
+/***/ 3562:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
;(function (sax) { // wrapper for non-node envs
@@ -7009,15 +7009,15 @@ function onceStrict (fn) {
/***/ }),
-/***/ 2924:
+/***/ 2165:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-module.exports = __nccwpck_require__(2604);
+module.exports = __nccwpck_require__(9785);
/***/ }),
-/***/ 2604:
+/***/ 9785:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
@@ -7289,7 +7289,7 @@ exports.debug = debug; // for test
/***/ }),
-/***/ 9696:
+/***/ 5935:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@@ -7315,7 +7315,7 @@ exports.getUserAgent = getUserAgent;
/***/ }),
-/***/ 1088:
+/***/ 7290:
/***/ ((module) => {
// Returns a wrapper function that returns a wrapped callback
@@ -7355,7 +7355,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 1806:
+/***/ 6138:
/***/ (function(__unused_webpack_module, exports) {
// Generated by CoffeeScript 1.12.7
@@ -7374,7 +7374,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 5838:
+/***/ 3821:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -7383,9 +7383,9 @@ function wrappy (fn, cb) {
var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA,
hasProp = {}.hasOwnProperty;
- builder = __nccwpck_require__(5730);
+ builder = __nccwpck_require__(3710);
- defaults = __nccwpck_require__(637).defaults;
+ defaults = __nccwpck_require__(2753).defaults;
requiresCDATA = function(entry) {
return typeof entry === "string" && (entry.indexOf('&') >= 0 || entry.indexOf('>') >= 0 || entry.indexOf('<') >= 0);
@@ -7508,7 +7508,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 637:
+/***/ 2753:
/***/ (function(__unused_webpack_module, exports) {
// Generated by CoffeeScript 1.12.7
@@ -7587,7 +7587,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 5084:
+/***/ 3988:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -7598,17 +7598,17 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- sax = __nccwpck_require__(7605);
+ sax = __nccwpck_require__(3562);
events = __nccwpck_require__(8614);
- bom = __nccwpck_require__(1806);
+ bom = __nccwpck_require__(6138);
- processors = __nccwpck_require__(8477);
+ processors = __nccwpck_require__(2526);
setImmediate = __nccwpck_require__(8213).setImmediate;
- defaults = __nccwpck_require__(637).defaults;
+ defaults = __nccwpck_require__(2753).defaults;
isEmpty = function(thing) {
return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0;
@@ -7975,7 +7975,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 8477:
+/***/ 2526:
/***/ (function(__unused_webpack_module, exports) {
// Generated by CoffeeScript 1.12.7
@@ -8016,7 +8016,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 958:
+/***/ 1532:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -8026,13 +8026,13 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- defaults = __nccwpck_require__(637);
+ defaults = __nccwpck_require__(2753);
- builder = __nccwpck_require__(5838);
+ builder = __nccwpck_require__(3821);
- parser = __nccwpck_require__(5084);
+ parser = __nccwpck_require__(3988);
- processors = __nccwpck_require__(8477);
+ processors = __nccwpck_require__(2526);
exports.defaults = defaults.defaults;
@@ -8062,7 +8062,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 6805:
+/***/ 675:
/***/ (function(module) {
// Generated by CoffeeScript 1.12.7
@@ -8081,7 +8081,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 126:
+/***/ 5146:
/***/ (function(module) {
// Generated by CoffeeScript 1.12.7
@@ -8111,7 +8111,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 9645:
+/***/ 2245:
/***/ (function(module) {
// Generated by CoffeeScript 1.12.7
@@ -8201,7 +8201,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 5261:
+/***/ 1221:
/***/ (function(module) {
// Generated by CoffeeScript 1.12.7
@@ -8218,16 +8218,16 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 6127:
+/***/ 9794:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
(function() {
var NodeType, XMLAttribute, XMLNode;
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
- XMLNode = __nccwpck_require__(402);
+ XMLNode = __nccwpck_require__(7157);
module.exports = XMLAttribute = (function() {
function XMLAttribute(parent, name, value) {
@@ -8333,7 +8333,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 4514:
+/***/ 3203:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -8342,9 +8342,9 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
- XMLCharacterData = __nccwpck_require__(3492);
+ XMLCharacterData = __nccwpck_require__(4865);
module.exports = XMLCData = (function(superClass) {
extend(XMLCData, superClass);
@@ -8376,7 +8376,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 3492:
+/***/ 4865:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -8385,7 +8385,7 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- XMLNode = __nccwpck_require__(402);
+ XMLNode = __nccwpck_require__(7157);
module.exports = XMLCharacterData = (function(superClass) {
extend(XMLCharacterData, superClass);
@@ -8462,7 +8462,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 4810:
+/***/ 7852:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -8471,9 +8471,9 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
- XMLCharacterData = __nccwpck_require__(3492);
+ XMLCharacterData = __nccwpck_require__(4865);
module.exports = XMLComment = (function(superClass) {
extend(XMLComment, superClass);
@@ -8505,16 +8505,16 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 3400:
+/***/ 4973:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
(function() {
var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList;
- XMLDOMErrorHandler = __nccwpck_require__(1549);
+ XMLDOMErrorHandler = __nccwpck_require__(6161);
- XMLDOMStringList = __nccwpck_require__(693);
+ XMLDOMStringList = __nccwpck_require__(3212);
module.exports = XMLDOMConfiguration = (function() {
function XMLDOMConfiguration() {
@@ -8576,7 +8576,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 1549:
+/***/ 6161:
/***/ (function(module) {
// Generated by CoffeeScript 1.12.7
@@ -8599,7 +8599,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 9091:
+/***/ 7777:
/***/ (function(module) {
// Generated by CoffeeScript 1.12.7
@@ -8638,7 +8638,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 693:
+/***/ 3212:
/***/ (function(module) {
// Generated by CoffeeScript 1.12.7
@@ -8673,7 +8673,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 2250:
+/***/ 2002:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -8682,9 +8682,9 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- XMLNode = __nccwpck_require__(402);
+ XMLNode = __nccwpck_require__(7157);
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
module.exports = XMLDTDAttList = (function(superClass) {
extend(XMLDTDAttList, superClass);
@@ -8735,7 +8735,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 5223:
+/***/ 4351:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -8744,9 +8744,9 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- XMLNode = __nccwpck_require__(402);
+ XMLNode = __nccwpck_require__(7157);
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
module.exports = XMLDTDElement = (function(superClass) {
extend(XMLDTDElement, superClass);
@@ -8780,7 +8780,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 8133:
+/***/ 7136:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -8789,11 +8789,11 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- isObject = __nccwpck_require__(9645).isObject;
+ isObject = __nccwpck_require__(2245).isObject;
- XMLNode = __nccwpck_require__(402);
+ XMLNode = __nccwpck_require__(7157);
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
module.exports = XMLDTDEntity = (function(superClass) {
extend(XMLDTDEntity, superClass);
@@ -8884,7 +8884,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 1286:
+/***/ 7099:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -8893,9 +8893,9 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- XMLNode = __nccwpck_require__(402);
+ XMLNode = __nccwpck_require__(7157);
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
module.exports = XMLDTDNotation = (function(superClass) {
extend(XMLDTDNotation, superClass);
@@ -8943,7 +8943,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 5471:
+/***/ 7501:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -8952,11 +8952,11 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- isObject = __nccwpck_require__(9645).isObject;
+ isObject = __nccwpck_require__(2245).isObject;
- XMLNode = __nccwpck_require__(402);
+ XMLNode = __nccwpck_require__(7157);
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
module.exports = XMLDeclaration = (function(superClass) {
extend(XMLDeclaration, superClass);
@@ -8993,7 +8993,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 5928:
+/***/ 2071:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -9002,21 +9002,21 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- isObject = __nccwpck_require__(9645).isObject;
+ isObject = __nccwpck_require__(2245).isObject;
- XMLNode = __nccwpck_require__(402);
+ XMLNode = __nccwpck_require__(7157);
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
- XMLDTDAttList = __nccwpck_require__(2250);
+ XMLDTDAttList = __nccwpck_require__(2002);
- XMLDTDEntity = __nccwpck_require__(8133);
+ XMLDTDEntity = __nccwpck_require__(7136);
- XMLDTDElement = __nccwpck_require__(5223);
+ XMLDTDElement = __nccwpck_require__(4351);
- XMLDTDNotation = __nccwpck_require__(1286);
+ XMLDTDNotation = __nccwpck_require__(7099);
- XMLNamedNodeMap = __nccwpck_require__(2600);
+ XMLNamedNodeMap = __nccwpck_require__(6986);
module.exports = XMLDocType = (function(superClass) {
extend(XMLDocType, superClass);
@@ -9186,7 +9186,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 6024:
+/***/ 2498:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -9195,19 +9195,19 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- isPlainObject = __nccwpck_require__(9645).isPlainObject;
+ isPlainObject = __nccwpck_require__(2245).isPlainObject;
- XMLDOMImplementation = __nccwpck_require__(9091);
+ XMLDOMImplementation = __nccwpck_require__(7777);
- XMLDOMConfiguration = __nccwpck_require__(3400);
+ XMLDOMConfiguration = __nccwpck_require__(4973);
- XMLNode = __nccwpck_require__(402);
+ XMLNode = __nccwpck_require__(7157);
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
- XMLStringifier = __nccwpck_require__(6777);
+ XMLStringifier = __nccwpck_require__(381);
- XMLStringWriter = __nccwpck_require__(5441);
+ XMLStringWriter = __nccwpck_require__(831);
module.exports = XMLDocument = (function(superClass) {
extend(XMLDocument, superClass);
@@ -9435,7 +9435,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 7431:
+/***/ 2992:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -9443,43 +9443,43 @@ function wrappy (fn, cb) {
var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, ref,
hasProp = {}.hasOwnProperty;
- ref = __nccwpck_require__(9645), isObject = ref.isObject, isFunction = ref.isFunction, isPlainObject = ref.isPlainObject, getValue = ref.getValue;
+ ref = __nccwpck_require__(2245), isObject = ref.isObject, isFunction = ref.isFunction, isPlainObject = ref.isPlainObject, getValue = ref.getValue;
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
- XMLDocument = __nccwpck_require__(6024);
+ XMLDocument = __nccwpck_require__(2498);
- XMLElement = __nccwpck_require__(8953);
+ XMLElement = __nccwpck_require__(9618);
- XMLCData = __nccwpck_require__(4514);
+ XMLCData = __nccwpck_require__(3203);
- XMLComment = __nccwpck_require__(4810);
+ XMLComment = __nccwpck_require__(7852);
- XMLRaw = __nccwpck_require__(7286);
+ XMLRaw = __nccwpck_require__(5917);
- XMLText = __nccwpck_require__(3188);
+ XMLText = __nccwpck_require__(2378);
- XMLProcessingInstruction = __nccwpck_require__(4160);
+ XMLProcessingInstruction = __nccwpck_require__(3928);
- XMLDeclaration = __nccwpck_require__(5471);
+ XMLDeclaration = __nccwpck_require__(7501);
- XMLDocType = __nccwpck_require__(5928);
+ XMLDocType = __nccwpck_require__(2071);
- XMLDTDAttList = __nccwpck_require__(2250);
+ XMLDTDAttList = __nccwpck_require__(2002);
- XMLDTDEntity = __nccwpck_require__(8133);
+ XMLDTDEntity = __nccwpck_require__(7136);
- XMLDTDElement = __nccwpck_require__(5223);
+ XMLDTDElement = __nccwpck_require__(4351);
- XMLDTDNotation = __nccwpck_require__(1286);
+ XMLDTDNotation = __nccwpck_require__(7099);
- XMLAttribute = __nccwpck_require__(6127);
+ XMLAttribute = __nccwpck_require__(9794);
- XMLStringifier = __nccwpck_require__(6777);
+ XMLStringifier = __nccwpck_require__(381);
- XMLStringWriter = __nccwpck_require__(5441);
+ XMLStringWriter = __nccwpck_require__(831);
- WriterState = __nccwpck_require__(5261);
+ WriterState = __nccwpck_require__(1221);
module.exports = XMLDocumentCB = (function() {
function XMLDocumentCB(options, onData, onEnd) {
@@ -9970,7 +9970,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 9869:
+/***/ 413:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -9979,9 +9979,9 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- XMLNode = __nccwpck_require__(402);
+ XMLNode = __nccwpck_require__(7157);
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
module.exports = XMLDummy = (function(superClass) {
extend(XMLDummy, superClass);
@@ -10008,7 +10008,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 8953:
+/***/ 9618:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -10017,15 +10017,15 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- ref = __nccwpck_require__(9645), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue;
+ ref = __nccwpck_require__(2245), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue;
- XMLNode = __nccwpck_require__(402);
+ XMLNode = __nccwpck_require__(7157);
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
- XMLAttribute = __nccwpck_require__(6127);
+ XMLAttribute = __nccwpck_require__(9794);
- XMLNamedNodeMap = __nccwpck_require__(2600);
+ XMLNamedNodeMap = __nccwpck_require__(6986);
module.exports = XMLElement = (function(superClass) {
extend(XMLElement, superClass);
@@ -10313,7 +10313,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 2600:
+/***/ 6986:
/***/ (function(module) {
// Generated by CoffeeScript 1.12.7
@@ -10378,7 +10378,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 402:
+/***/ 7157:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -10386,7 +10386,7 @@ function wrappy (fn, cb) {
var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1,
hasProp = {}.hasOwnProperty;
- ref1 = __nccwpck_require__(9645), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue;
+ ref1 = __nccwpck_require__(2245), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue;
XMLElement = null;
@@ -10425,19 +10425,19 @@ function wrappy (fn, cb) {
this.children = [];
this.baseURI = null;
if (!XMLElement) {
- XMLElement = __nccwpck_require__(8953);
- XMLCData = __nccwpck_require__(4514);
- XMLComment = __nccwpck_require__(4810);
- XMLDeclaration = __nccwpck_require__(5471);
- XMLDocType = __nccwpck_require__(5928);
- XMLRaw = __nccwpck_require__(7286);
- XMLText = __nccwpck_require__(3188);
- XMLProcessingInstruction = __nccwpck_require__(4160);
- XMLDummy = __nccwpck_require__(9869);
- NodeType = __nccwpck_require__(126);
- XMLNodeList = __nccwpck_require__(4058);
- XMLNamedNodeMap = __nccwpck_require__(2600);
- DocumentPosition = __nccwpck_require__(6805);
+ XMLElement = __nccwpck_require__(9618);
+ XMLCData = __nccwpck_require__(3203);
+ XMLComment = __nccwpck_require__(7852);
+ XMLDeclaration = __nccwpck_require__(7501);
+ XMLDocType = __nccwpck_require__(2071);
+ XMLRaw = __nccwpck_require__(5917);
+ XMLText = __nccwpck_require__(2378);
+ XMLProcessingInstruction = __nccwpck_require__(3928);
+ XMLDummy = __nccwpck_require__(413);
+ NodeType = __nccwpck_require__(5146);
+ XMLNodeList = __nccwpck_require__(755);
+ XMLNamedNodeMap = __nccwpck_require__(6986);
+ DocumentPosition = __nccwpck_require__(675);
}
}
@@ -11170,7 +11170,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 4058:
+/***/ 755:
/***/ (function(module) {
// Generated by CoffeeScript 1.12.7
@@ -11205,7 +11205,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 4160:
+/***/ 3928:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -11214,9 +11214,9 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
- XMLCharacterData = __nccwpck_require__(3492);
+ XMLCharacterData = __nccwpck_require__(4865);
module.exports = XMLProcessingInstruction = (function(superClass) {
extend(XMLProcessingInstruction, superClass);
@@ -11261,7 +11261,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 7286:
+/***/ 5917:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -11270,9 +11270,9 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
- XMLNode = __nccwpck_require__(402);
+ XMLNode = __nccwpck_require__(7157);
module.exports = XMLRaw = (function(superClass) {
extend(XMLRaw, superClass);
@@ -11303,7 +11303,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 962:
+/***/ 0:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -11312,11 +11312,11 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
- XMLWriterBase = __nccwpck_require__(6578);
+ XMLWriterBase = __nccwpck_require__(885);
- WriterState = __nccwpck_require__(5261);
+ WriterState = __nccwpck_require__(1221);
module.exports = XMLStreamWriter = (function(superClass) {
extend(XMLStreamWriter, superClass);
@@ -11486,7 +11486,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 5441:
+/***/ 831:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -11495,7 +11495,7 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- XMLWriterBase = __nccwpck_require__(6578);
+ XMLWriterBase = __nccwpck_require__(885);
module.exports = XMLStringWriter = (function(superClass) {
extend(XMLStringWriter, superClass);
@@ -11528,7 +11528,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 6777:
+/***/ 381:
/***/ (function(module) {
// Generated by CoffeeScript 1.12.7
@@ -11775,7 +11775,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 3188:
+/***/ 2378:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -11784,9 +11784,9 @@ function wrappy (fn, cb) {
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
- XMLCharacterData = __nccwpck_require__(3492);
+ XMLCharacterData = __nccwpck_require__(4865);
module.exports = XMLText = (function(superClass) {
extend(XMLText, superClass);
@@ -11851,7 +11851,7 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 6578:
+/***/ 885:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
@@ -11859,37 +11859,37 @@ function wrappy (fn, cb) {
var NodeType, WriterState, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLProcessingInstruction, XMLRaw, XMLText, XMLWriterBase, assign,
hasProp = {}.hasOwnProperty;
- assign = __nccwpck_require__(9645).assign;
+ assign = __nccwpck_require__(2245).assign;
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
- XMLDeclaration = __nccwpck_require__(5471);
+ XMLDeclaration = __nccwpck_require__(7501);
- XMLDocType = __nccwpck_require__(5928);
+ XMLDocType = __nccwpck_require__(2071);
- XMLCData = __nccwpck_require__(4514);
+ XMLCData = __nccwpck_require__(3203);
- XMLComment = __nccwpck_require__(4810);
+ XMLComment = __nccwpck_require__(7852);
- XMLElement = __nccwpck_require__(8953);
+ XMLElement = __nccwpck_require__(9618);
- XMLRaw = __nccwpck_require__(7286);
+ XMLRaw = __nccwpck_require__(5917);
- XMLText = __nccwpck_require__(3188);
+ XMLText = __nccwpck_require__(2378);
- XMLProcessingInstruction = __nccwpck_require__(4160);
+ XMLProcessingInstruction = __nccwpck_require__(3928);
- XMLDummy = __nccwpck_require__(9869);
+ XMLDummy = __nccwpck_require__(413);
- XMLDTDAttList = __nccwpck_require__(2250);
+ XMLDTDAttList = __nccwpck_require__(2002);
- XMLDTDElement = __nccwpck_require__(5223);
+ XMLDTDElement = __nccwpck_require__(4351);
- XMLDTDEntity = __nccwpck_require__(8133);
+ XMLDTDEntity = __nccwpck_require__(7136);
- XMLDTDNotation = __nccwpck_require__(1286);
+ XMLDTDNotation = __nccwpck_require__(7099);
- WriterState = __nccwpck_require__(5261);
+ WriterState = __nccwpck_require__(1221);
module.exports = XMLWriterBase = (function() {
function XMLWriterBase(options) {
@@ -12286,28 +12286,28 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 5730:
+/***/ 3710:
/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) {
// Generated by CoffeeScript 1.12.7
(function() {
var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction, ref;
- ref = __nccwpck_require__(9645), assign = ref.assign, isFunction = ref.isFunction;
+ ref = __nccwpck_require__(2245), assign = ref.assign, isFunction = ref.isFunction;
- XMLDOMImplementation = __nccwpck_require__(9091);
+ XMLDOMImplementation = __nccwpck_require__(7777);
- XMLDocument = __nccwpck_require__(6024);
+ XMLDocument = __nccwpck_require__(2498);
- XMLDocumentCB = __nccwpck_require__(7431);
+ XMLDocumentCB = __nccwpck_require__(2992);
- XMLStringWriter = __nccwpck_require__(5441);
+ XMLStringWriter = __nccwpck_require__(831);
- XMLStreamWriter = __nccwpck_require__(962);
+ XMLStreamWriter = __nccwpck_require__(0);
- NodeType = __nccwpck_require__(126);
+ NodeType = __nccwpck_require__(5146);
- WriterState = __nccwpck_require__(5261);
+ WriterState = __nccwpck_require__(1221);
module.exports.create = function(name, xmldec, doctype, options) {
var doc, root;
@@ -12358,15 +12358,15 @@ function wrappy (fn, cb) {
/***/ }),
-/***/ 3774:
+/***/ 4281:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => {
-const core = __nccwpck_require__(7296);
-const github = __nccwpck_require__(2536);
+const core = __nccwpck_require__(4934);
+const github = __nccwpck_require__(6794);
const fs = __nccwpck_require__(5747);
-const parser = __nccwpck_require__(958);
-const process = __nccwpck_require__(1248);
-const render = __nccwpck_require__(3883);
+const parser = __nccwpck_require__(1532);
+const process = __nccwpck_require__(6332);
+const render = __nccwpck_require__(8279);
const client = github.getOctokit(core.getInput("token"));
@@ -12376,23 +12376,19 @@ action().catch(error => {
async function action() {
try {
- const passPercentage = parseFloat(core.getInput('pass-percentage'));
- console.log(`Pass percentage = ${passPercentage}`);
-
const reportPath = core.getInput('path');
- console.log(`Path = ${reportPath}`);
-
+ const passPercentage = parseFloat(core.getInput('pass-percentage'));
const event = github.context.eventName;
- console.log(`Event = ${event}`);
+ core.info(`Event is ${event}`);
var base;
var head;
- var isPR;
+ var prNumber;
switch (event) {
case 'pull_request':
base = github.context.payload.pull_request.base.sha;
head = github.context.payload.pull_request.head.sha;
- isPR = true;
+ prNumber = github.context.payload.pull_request.number;
break
case 'push':
base = github.context.payload.before;
@@ -12403,28 +12399,18 @@ async function action() {
core.setFailed(`Only pull requests and pushes are supported, ${context.eventName} not supported.`);
}
- console.log(`Base = ${base}`);
- console.log(`Head = ${head}`);
+ core.info(`base sha: ${base}`);
+ core.info(`head sha: ${head}`);
const reportJsonAsync = getJsonReport(reportPath);
const changedFiles = await getChangedFiles(base, head);
- console.log(changedFiles);
const value = await reportJsonAsync;
- console.log("Report JSON -> ", value);
-
const report = value["report"];
- if (isPR) {
- console.log(`Invoked as a result of Pull Request`);
- const prNumber = github.context.payload.pull_request.number;
- console.log(`PR Number = `, prNumber);
-
+ if (prNumber != null) {
const files = process.getFileCoverage(report, changedFiles);
- console.log(files);
const overallCoverage = process.getOverallCoverage(report);
- console.log(overallCoverage);
core.setOutput("coverage-overall", parseFloat(overallCoverage.toFixed(2)));
-
await addComment(prNumber, render.getPRComment(overallCoverage, files, passPercentage));
}
} catch (error) {
@@ -12434,8 +12420,7 @@ async function action() {
async function getJsonReport(xmlPath) {
const reportXml = await fs.promises.readFile(xmlPath, "utf-8");
- const reportJson = await parser.parseStringPromise(reportXml);
- return reportJson;
+ return await parser.parseStringPromise(reportXml);
}
async function getChangedFiles(base, head) {
@@ -12446,8 +12431,6 @@ async function getChangedFiles(base, head) {
repo: github.context.repo.repo
});
- // console.log(util.inspect(response, false, null, true));
-
var changedFiles = [];
response.data.files.forEach(file => {
var changedFile = {
@@ -12456,7 +12439,6 @@ async function getChangedFiles(base, head) {
}
changedFiles.push(changedFile);
});
-
return changedFiles;
}
@@ -12471,7 +12453,7 @@ async function addComment(prNumber, comment) {
/***/ }),
-/***/ 1248:
+/***/ 6332:
/***/ ((module) => {
function getFileCoverage(report, files) {
@@ -12525,7 +12507,7 @@ module.exports = {
/***/ }),
-/***/ 3883:
+/***/ 8279:
/***/ ((module) => {
function getPRComment(overallCoverage, files, minCoverage) {
@@ -12571,7 +12553,7 @@ module.exports = {
/***/ }),
-/***/ 3163:
+/***/ 6355:
/***/ ((module) => {
module.exports = eval("require")("encoding");
@@ -12737,6 +12719,6 @@ module.exports = require("zlib");;
/******/ // module exports must be returned from runtime so entry inlining is disabled
/******/ // startup
/******/ // Load entry module and return exports
-/******/ return __nccwpck_require__(3774);
+/******/ return __nccwpck_require__(4281);
/******/ })()
;
\ No newline at end of file
diff --git a/src/index.js b/src/index.js
index 73e0318..7e88b2f 100644
--- a/src/index.js
+++ b/src/index.js
@@ -13,23 +13,19 @@ action().catch(error => {
async function action() {
try {
- const passPercentage = parseFloat(core.getInput('pass-percentage'));
- console.log(`Pass percentage = ${passPercentage}`);
-
const reportPath = core.getInput('path');
- console.log(`Path = ${reportPath}`);
-
+ const passPercentage = parseFloat(core.getInput('pass-percentage'));
const event = github.context.eventName;
- console.log(`Event = ${event}`);
+ core.info(`Event is ${event}`);
var base;
var head;
- var isPR;
+ var prNumber;
switch (event) {
case 'pull_request':
base = github.context.payload.pull_request.base.sha;
head = github.context.payload.pull_request.head.sha;
- isPR = true;
+ prNumber = github.context.payload.pull_request.number;
break
case 'push':
base = github.context.payload.before;
@@ -40,28 +36,18 @@ async function action() {
core.setFailed(`Only pull requests and pushes are supported, ${context.eventName} not supported.`);
}
- console.log(`Base = ${base}`);
- console.log(`Head = ${head}`);
+ core.info(`base sha: ${base}`);
+ core.info(`head sha: ${head}`);
const reportJsonAsync = getJsonReport(reportPath);
const changedFiles = await getChangedFiles(base, head);
- console.log(changedFiles);
const value = await reportJsonAsync;
- console.log("Report JSON -> ", value);
-
const report = value["report"];
- if (isPR) {
- console.log(`Invoked as a result of Pull Request`);
- const prNumber = github.context.payload.pull_request.number;
- console.log(`PR Number = `, prNumber);
-
+ if (prNumber != null) {
const files = process.getFileCoverage(report, changedFiles);
- console.log(files);
const overallCoverage = process.getOverallCoverage(report);
- console.log(overallCoverage);
core.setOutput("coverage-overall", parseFloat(overallCoverage.toFixed(2)));
-
await addComment(prNumber, render.getPRComment(overallCoverage, files, passPercentage));
}
} catch (error) {
@@ -71,8 +57,7 @@ async function action() {
async function getJsonReport(xmlPath) {
const reportXml = await fs.promises.readFile(xmlPath, "utf-8");
- const reportJson = await parser.parseStringPromise(reportXml);
- return reportJson;
+ return await parser.parseStringPromise(reportXml);
}
async function getChangedFiles(base, head) {
@@ -83,8 +68,6 @@ async function getChangedFiles(base, head) {
repo: github.context.repo.repo
});
- // console.log(util.inspect(response, false, null, true));
-
var changedFiles = [];
response.data.files.forEach(file => {
var changedFile = {
@@ -93,7 +76,6 @@ async function getChangedFiles(base, head) {
}
changedFiles.push(changedFile);
});
-
return changedFiles;
}
diff --git a/src/process.js b/src/process.js
index a228bdc..3f08f0f 100644
--- a/src/process.js
+++ b/src/process.js
@@ -31,11 +31,11 @@ function getOverallCoverage(report) {
function getCoverage(counters) {
var coverage;
counters.forEach(counter => {
- const attr = counter["$"]
+ const attr = counter["$"];
if (attr["type"] == "INSTRUCTION") {
- missed = parseFloat(attr["missed"])
- const covered = parseFloat(attr["covered"])
- coverage = covered / (covered + missed) * 100
+ missed = parseFloat(attr["missed"]);
+ const covered = parseFloat(attr["covered"]);
+ coverage = parseFloat((covered / (covered + missed) * 100).toFixed(2));
}
});
return coverage