}
},
"@vue/cli-overlay": {
- "version": "4.5.8",
- "resolved": "https://registry.npmjs.org/@vue/cli-overlay/-/cli-overlay-4.5.8.tgz",
- "integrity": "sha512-M6q4QPKQfErHk54ycxBASgBadgdsK45f6v2NWUTAiFXdTtqv1Z7gR8JAbQhiXbni/m9571bLJnZFv5c8uhAHnw==",
+ "version": "4.5.9",
+ "resolved": "https://registry.npmjs.org/@vue/cli-overlay/-/cli-overlay-4.5.9.tgz",
+ "integrity": "sha512-E2PWv6tCdUz+eEDj2Th2oxiKmzMe02qi0PcxiNaO7oaqggmEOrp1rLgop7DWpiLDBiqUZk2x0vjK/q2Tz8z/eg==",
"dev": true
},
"@vue/cli-plugin-eslint": {
- "version": "4.5.8",
- "resolved": "https://registry.npmjs.org/@vue/cli-plugin-eslint/-/cli-plugin-eslint-4.5.8.tgz",
- "integrity": "sha512-1lg3K2D/harXbN4FvRoA1b0X9947H+G4Ql/43rxJY39OqswfK/d1ck438Fo9M4l1+zhBSUNDmcjn7Q2EH6qWmA==",
+ "version": "4.5.9",
+ "resolved": "https://registry.npmjs.org/@vue/cli-plugin-eslint/-/cli-plugin-eslint-4.5.9.tgz",
+ "integrity": "sha512-wTsWRiRWPW5ik4bgtlh4P4h63Zgjsyvqx2FY0kcj+bSAnQGPJ3bKUOMU9KQP5EyNH6pAXMVGh2LEXK9WwJMf1w==",
"dev": true,
"requires": {
- "@vue/cli-shared-utils": "^4.5.8",
+ "@vue/cli-shared-utils": "^4.5.9",
"eslint-loader": "^2.2.1",
"globby": "^9.2.0",
"inquirer": "^7.1.0",
}
},
"@vue/cli-plugin-router": {
- "version": "4.5.8",
- "resolved": "https://registry.npmjs.org/@vue/cli-plugin-router/-/cli-plugin-router-4.5.8.tgz",
- "integrity": "sha512-tJwVLdX4jj0Ia/1hsBejRbo4gs0hb2z1z5ert+4Ve5RNdpOKUG69OaPQgXPqvuYSQh9MW7bqG0iJmYtVD+KBNw==",
+ "version": "4.5.9",
+ "resolved": "https://registry.npmjs.org/@vue/cli-plugin-router/-/cli-plugin-router-4.5.9.tgz",
+ "integrity": "sha512-eBBfbZpQ1sJrdlx8i7iReFxSnuzwmrv+s2OCT3kjBd6uWRqGnD4VihpS4srC7vZLzDQrDplumSn0a93L9Qf3wQ==",
"dev": true,
"requires": {
- "@vue/cli-shared-utils": "^4.5.8"
+ "@vue/cli-shared-utils": "^4.5.9"
}
},
"@vue/cli-plugin-vuex": {
- "version": "4.5.8",
- "resolved": "https://registry.npmjs.org/@vue/cli-plugin-vuex/-/cli-plugin-vuex-4.5.8.tgz",
- "integrity": "sha512-wU9WPhay1zBxtdd/HLRYhFRLBbG9lw3YTBJep9sTnYwUeXiEgum4O88Q2j6cwBBPPHMgeMrKMPHS85Jf4hMc0g==",
+ "version": "4.5.9",
+ "resolved": "https://registry.npmjs.org/@vue/cli-plugin-vuex/-/cli-plugin-vuex-4.5.9.tgz",
+ "integrity": "sha512-mFNIJhYiJjzCgytkDHX00ROy5Yzl7prkZpUbeDE0biwcLteMf2s3qZVbESOQl6GcviqcfEt2f3tHQQtLNa+OLg==",
"dev": true
},
"@vue/cli-service": {
- "version": "4.5.8",
- "resolved": "https://registry.npmjs.org/@vue/cli-service/-/cli-service-4.5.8.tgz",
- "integrity": "sha512-YcVEJvA5vQOcfRzhCQDfHxRW9WHvKqlQeiuSvNddfV2uQqKD3ifhsNYiZZuFvbev9qgRUmtmxSafpwYzj/LLBw==",
+ "version": "4.5.9",
+ "resolved": "https://registry.npmjs.org/@vue/cli-service/-/cli-service-4.5.9.tgz",
+ "integrity": "sha512-E3XlfM0q+UnnjbC9rwLIWNo2umZCRwnlMJY0KOhY1hFvqisGIYzFmQQ4o01KGyTx2BZNMuQg7Kw+BZ5gyM1Wig==",
"dev": true,
"requires": {
"@intervolga/optimize-cssnano-plugin": "^1.0.5",
"@types/minimist": "^1.2.0",
"@types/webpack": "^4.0.0",
"@types/webpack-dev-server": "^3.11.0",
- "@vue/cli-overlay": "^4.5.8",
- "@vue/cli-plugin-router": "^4.5.8",
- "@vue/cli-plugin-vuex": "^4.5.8",
- "@vue/cli-shared-utils": "^4.5.8",
+ "@vue/cli-overlay": "^4.5.9",
+ "@vue/cli-plugin-router": "^4.5.9",
+ "@vue/cli-plugin-vuex": "^4.5.9",
+ "@vue/cli-shared-utils": "^4.5.9",
"@vue/component-compiler-utils": "^3.1.2",
"@vue/preload-webpack-plugin": "^1.1.0",
"@vue/web-component-wrapper": "^1.2.0",
}
},
"@vue/cli-shared-utils": {
- "version": "4.5.8",
- "resolved": "https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-4.5.8.tgz",
- "integrity": "sha512-pa6oenhBO/5HeDLRSokiwVN01gROACEDy3ESXWuPmragOREGNmmFKtkPHlqeYavGEX6LFp7f0VK3uMX6UYS5mQ==",
+ "version": "4.5.9",
+ "resolved": "https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-4.5.9.tgz",
+ "integrity": "sha512-anvsrv+rkQC+hgxaT2nQQxnSWSsIzyysZ36LO7qPjXvDRBvcvKLAAviFlUkYbZ+ntbV8puzJ3zw+gUhQw4SEVA==",
"dev": true,
"requires": {
"@hapi/joi": "^15.0.1",
"dev": true
},
"electron-to-chromium": {
- "version": "1.3.596",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.596.tgz",
- "integrity": "sha512-nLO2Wd2yU42eSoNJVQKNf89CcEGqeFZd++QsnN2XIgje1s/19AgctfjLIbPORlvcCO8sYjLwX4iUgDdusOY8Sg==",
+ "version": "1.3.597",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.597.tgz",
+ "integrity": "sha512-VJI21MucKaqyFw0oe3j9BIg+nDF4MHzUZAmUwZzrxho+s8zPCD13Fds07Rgu+MTtAadO4tYTKFdAUksKYUyIJw==",
"dev": true
},
"elliptic": {
}
},
"node-releases": {
- "version": "1.1.66",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.66.tgz",
- "integrity": "sha512-JHEQ1iWPGK+38VLB2H9ef2otU4l8s3yAMt9Xf934r6+ojCYDMHPMqvCc9TnzfeFSP1QEOeU6YZEd3+De0LTCgg==",
+ "version": "1.1.67",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.67.tgz",
+ "integrity": "sha512-V5QF9noGFl3EymEwUYzO+3NTDpGfQB4ve6Qfnzf3UNydMhjQRVPR1DZTuvWiLzaFJYw2fmDwAfnRNEVb64hSIg==",
"dev": true
},
"node-sass": {
"vue-router": "^3.4.9"
},
"devDependencies": {
- "@vue/cli-plugin-eslint": "^4.5.8",
- "@vue/cli-service": "^4.5.8",
+ "@vue/cli-plugin-eslint": "^4.5.9",
+ "@vue/cli-service": "^4.5.9",
"ajv": "^6.12.6",
"apply-loader": "^2.0.0",
"babel-eslint": "^10.1.0",
--- /dev/null
+export default function afterRawLoad(text) {
+ return (
+ text
+ // Next two lines fix a weird issue after last update (2019-11)
+ .replace(/\\n/g, " ")
+ .replace(/\\"/g, '"')
+ .replace('export default "', "")
+ .replace(/";$/, "")
+ );
+}
import { processModalClick } from "@/utils/modalClick";
import { replaceByDiag } from "@/utils/printDiagram";
import { store } from "@/store";
+import afterRawLoad from "@/utils/afterRawLoad";
export default {
name: "my-analyse",
// TODO: game import ==> require some adjustments, like
})
.catch((err) => { this.alertAndQuit("Mispelled variant name", true); });
this.rulesContent =
- require(
- "raw-loader!@/translations/rules/" +
- this.gameRef.vname + "/" +
- this.st.lang + ".pug"
+ afterRawLoad(
+ require(
+ "raw-loader!@/translations/rules/" +
+ this.gameRef.vname + "/" + this.st.lang + ".pug"
).default
- .replace('export default "', "")
- .replace(/";$/, "")
- // Next two lines fix a weird issue after last update (2019-11)
- .replace(/\\n/g, " ")
- .replace(/\\"/g, '"')
- .replace(/(fen:)([^:]*):/g, replaceByDiag);
+ ).replace(/(fen:)([^:]*):/g, replaceByDiag);
},
loadGame: function(orientation) {
this.game.vname = this.gameRef.vname;
<script>
import { store } from "@/store";
+import afterRawLoad from "@/utils/afterRawLoad";
export default {
name: "my-faq",
data: function() {
},
computed: {
content: function() {
- // (AJAX) Request to get FAQ content (plain text, HTML)
return (
- require("raw-loader!@/translations/faq/" + this.st.lang + ".pug")
- // Next two lines fix a weird issue after last update (2019-11)
- .replace(/\\n/g, " ")
- .replace(/\\"/g, '"')
- .replace('module.exports = "', "")
- .replace(/"$/, "")
+ afterRawLoad(
+ require(
+ "raw-loader!@/translations/faq/" + this.st.lang + ".pug"
+ ).default
+ )
);
}
},
import { processModalClick } from "@/utils/modalClick";
import { playMove, getFilteredMove } from "@/utils/playUndo";
import { ArrayFun } from "@/utils/array";
+import afterRawLoad from "@/utils/afterRawLoad";
import params from "@/parameters";
export default {
name: "my-game",
window.V = vModule[game.vname + "Rules"];
this.loadGame(game, callback);
});
- // (AJAX) Request to get rules content (plain text, HTML)
this.rulesContent =
- require(
- "raw-loader!@/translations/rules/" +
- game.vname + "/" +
- this.st.lang + ".pug"
- )
- // Next two lines fix a weird issue after last update (2019-11)
- .replace(/\\n/g, " ")
- .replace(/\\"/g, '"')
- .replace('module.exports = "', "")
- .replace(/"$/, "")
- .replace(/(fen:)([^:]*):/g, replaceByDiag);
+ afterRawLoad(
+ require(
+ "raw-loader!@/translations/rules/" +
+ game.vname + "/" + this.st.lang + ".pug"
+ ).default
+ ).replace(/(fen:)([^:]*):/g, replaceByDiag);
},
// 3 cases for loading a game:
// - from indexedDB (running or completed live game I play)
import { getDiagram, replaceByDiag } from "@/utils/printDiagram";
import { processModalClick } from "@/utils/modalClick";
import { ArrayFun } from "@/utils/array";
+import afterRawLoad from "@/utils/afterRawLoad";
import BaseGame from "@/components/BaseGame.vue";
export default {
name: "my-problems",
this.loadedVar = vid;
cb();
});
- // (AJAX) Request to get rules content (plain text, HTML)
this.rulesContent =
- require(
- "raw-loader!@/translations/rules/" +
- variant.name + "/" +
- this.st.lang + ".pug"
- )
- // Next two lines fix a weird issue after last update (2019-11)
- .replace(/\\n/g, " ")
- .replace(/\\"/g, '"')
- .replace('module.exports = "', "")
- .replace(/"$/, "")
- .replace(/(fen:)([^:]*):/g, replaceByDiag);
+ afterRawLoad(
+ require(
+ "raw-loader!@/translations/rules/" + variant.name + "/" +
+ this.st.lang + ".pug"
+ ).default
+ ).replace(/(fen:)([^:]*):/g, replaceByDiag);
},
trySetDiagram: function(prob) {
// Problem edit: FEN could be wrong or incomplete,
import { store } from "@/store";
import { replaceByDiag } from "@/utils/printDiagram";
import { CompgameStorage } from "@/utils/compgameStorage";
+import afterRawLoad from "@/utils/afterRawLoad";
export default {
name: "my-rules",
components: {
},
content: function() {
if (!this.gameInfo.vname) return ""; //variant not set yet
- // (AJAX) Request to get rules content (plain text, HTML)
return (
- require(
- "raw-loader!@/translations/rules/" +
- this.gameInfo.vname + "/" +
- this.st.lang + ".pug"
+ afterRawLoad(
+ require(
+ "raw-loader!@/translations/rules/" +
+ this.gameInfo.vname + "/" + this.st.lang + ".pug"
).default
- .replace('export default "', "")
- .replace(/";$/, "")
- // Next two lines fix a weird issue after last update (2019-11)
- .replace(/\\n/g, " ")
- .replace(/\\"/g, '"')
- .replace(/(fen:)([^:]*):/g, replaceByDiag)
+ ).replace(/(fen:)([^:]*):/g, replaceByDiag)
);
}
},
<script>
import { store } from "@/store";
+import afterRawLoad from "@/utils/afterRawLoad";
export default {
name: "my-variants",
data: function() {
},
computed: {
content: function() {
- // (AJAX) Request to get rules content (plain text, HTML)
return (
- require(
- "raw-loader!@/translations/variants/" + this.st.lang + ".pug"
+ afterRawLoad(
+ require(
+ "raw-loader!@/translations/variants/" + this.st.lang + ".pug"
).default
- .replace('export default "', "")
- .replace(/";$/, "")
- // Next two lines fix a weird issue after last update (2019-11)
- .replace(/\\n/g, " ")
- .replace(/\\"/g, '"')
+ )
);
}
},