Add option to verify SVG

This commit is contained in:
lowlighter
2020-10-26 22:55:47 +01:00
parent c7cf5d8212
commit a369905535
3 changed files with 115 additions and 1 deletions

99
action/dist/index.js vendored
View File

@@ -910,6 +910,17 @@ var E_Users_lecoq_Documents_GitHub_gitstats_node_modules_actions_github_lib_gith
const rendered = await metrics({login:user, q}, {graphql, rest, plugins, conf, die})
console.log(`Render | complete`)
//Verify svg
const verify = bool(core.getInput("verify"))
console.log(`Verify SVG | ${verify}`)
if (verify) {
const [libxmljs] = [await __webpack_require__.e(/* import() */ 344).then(__webpack_require__.t.bind(__webpack_require__, 53344, 3))].map(m => (m && m.default) ? m.default : m)
const parsed = libxmljs.parseXml(rendered)
if (parsed.errors.length)
throw new Error(`Malformed SVG : \n${parsed.errors.join("\n")}`)
console.log(`SVG valid | yes`)
}
//Commit to repository
const dryrun = bool(core.getInput("dryrun"))
if (dryrun)
@@ -94334,6 +94345,9 @@ module.exports = require("zlib");
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
@@ -94347,6 +94361,29 @@ module.exports = require("zlib");
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/create fake namespace object */
/******/ (() => {
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = this(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ var def = {};
/******/ if(mode & 2 && typeof value == 'object' && value) {
/******/ for(const key in value) def[key] = () => value[key];
/******/ }
/******/ def['default'] = () => value;
/******/ __webpack_require__.d(ns, def);
/******/ return ns;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
@@ -94359,6 +94396,28 @@ module.exports = require("zlib");
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/ensure chunk */
/******/ (() => {
/******/ __webpack_require__.f = {};
/******/ // This file contains only the entry chunk.
/******/ // The chunk loading function for additional chunks
/******/ __webpack_require__.e = (chunkId) => {
/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
/******/ __webpack_require__.f[key](chunkId, promises);
/******/ return promises;
/******/ }, []));
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/get javascript chunk filename */
/******/ (() => {
/******/ // This function allow to reference async chunks
/******/ __webpack_require__.u = (chunkId) => {
/******/ // return url for filenames based on template
/******/ return "" + chunkId + ".index.js";
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)
@@ -94377,7 +94436,45 @@ module.exports = require("zlib");
/******/
/******/ /* webpack/runtime/compat */
/******/
/******/ __webpack_require__.ab = __dirname + "/";/************************************************************************/
/******/ __webpack_require__.ab = __dirname + "/";/* webpack/runtime/require chunk loading */
/******/ (() => {
/******/ // object to store loaded chunks
/******/ // "1" means "loaded", otherwise not loaded yet
/******/ var installedChunks = {
/******/ 179: 1
/******/ };
/******/
/******/ var installChunk = (chunk) => {
/******/ var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;
/******/ for(var moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) runtime(__webpack_require__);
/******/ for(var i = 0; i < chunkIds.length; i++)
/******/ installedChunks[chunkIds[i]] = 1;
/******/ };
/******/
/******/ // require() chunk loading for javascript
/******/ __webpack_require__.f.require = function(chunkId, promises) {
/******/
/******/ // "1" is the signal for "already loaded"
/******/ if(!installedChunks[chunkId]) {
/******/ if(true) { // all chunks have JS
/******/ installChunk(require("./" + __webpack_require__.u(chunkId)));
/******/ } else installedChunks[chunkId] = 1;
/******/ }
/******/ };
/******/
/******/ // no external install chunk
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/ })();
/******/
/************************************************************************/
/******/ // module exports must be returned from runtime so entry inlining is disabled
/******/ // startup
/******/ // Load entry module and return exports