fix: code blocks incorrect escaping + deps update

This commit is contained in:
NGPixel 2020-03-20 23:23:13 -04:00
parent 2810f7b5af
commit b529ad21c9
7 changed files with 712 additions and 357 deletions

View File

@ -148,7 +148,7 @@
<script> <script>
import _ from 'lodash' import _ from 'lodash'
import uuid from 'uuid/v4' import { v4 as uuid } from 'uuid'
import treeSaveMutation from 'gql/admin/navigation/navigation-mutation-save-tree.gql' import treeSaveMutation from 'gql/admin/navigation/navigation-mutation-save-tree.gql'
import treeQuery from 'gql/admin/navigation/navigation-query-tree.gql' import treeQuery from 'gql/admin/navigation/navigation-query-tree.gql'

View File

@ -225,7 +225,7 @@
<script> <script>
import _ from 'lodash' import _ from 'lodash'
import uuid from 'uuid/v4' import { v4 as uuid } from 'uuid'
import { get, sync } from 'vuex-pathify' import { get, sync } from 'vuex-pathify'
export default { export default {

View File

@ -36,19 +36,19 @@
}, },
"dependencies": { "dependencies": {
"@aoberoi/passport-slack": "1.0.5", "@aoberoi/passport-slack": "1.0.5",
"@azure/storage-blob": "12.1.0", "@azure/storage-blob": "12.1.1",
"@bugsnag/js": "6.5.2", "@bugsnag/js": "6.5.2",
"@exlinc/keycloak-passport": "1.0.2", "@exlinc/keycloak-passport": "1.0.2",
"@root/csr": "0.8.1", "@root/csr": "0.8.1",
"@root/keypairs": "0.9.0", "@root/keypairs": "0.9.0",
"@root/pem": "1.0.4", "@root/pem": "1.0.4",
"acme": "3.0.3", "acme": "3.0.3",
"algoliasearch": "4.0.3", "algoliasearch": "4.1.0",
"apollo-fetch": "0.7.0", "apollo-fetch": "0.7.0",
"apollo-server": "2.10.1", "apollo-server": "2.11.0",
"apollo-server-express": "2.10.1", "apollo-server-express": "2.11.0",
"auto-load": "3.0.4", "auto-load": "3.0.4",
"aws-sdk": "2.624.0", "aws-sdk": "2.639.0",
"azure-search-client": "3.1.5", "azure-search-client": "3.1.5",
"bcryptjs-then": "1.0.1", "bcryptjs-then": "1.0.1",
"bluebird": "3.7.2", "bluebird": "3.7.2",
@ -59,13 +59,13 @@
"chokidar": "3.3.1", "chokidar": "3.3.1",
"clean-css": "4.2.3", "clean-css": "4.2.3",
"compression": "1.7.4", "compression": "1.7.4",
"connect-session-knex": "1.5.0", "connect-session-knex": "1.6.0",
"cookie-parser": "1.4.4", "cookie-parser": "1.4.5",
"cors": "2.8.5", "cors": "2.8.5",
"custom-error-instance": "2.1.1", "custom-error-instance": "2.1.1",
"dependency-graph": "0.9.0", "dependency-graph": "0.9.0",
"diff": "4.0.2", "diff": "4.0.2",
"diff2html": "3.1.2", "diff2html": "3.1.6",
"dotize": "0.3.0", "dotize": "0.3.0",
"elasticsearch6": "npm:@elastic/elasticsearch@6", "elasticsearch6": "npm:@elastic/elasticsearch@6",
"elasticsearch7": "npm:@elastic/elasticsearch@7", "elasticsearch7": "npm:@elastic/elasticsearch@7",
@ -73,10 +73,10 @@
"express": "4.17.1", "express": "4.17.1",
"express-brute": "1.0.1", "express-brute": "1.0.1",
"express-session": "1.17.0", "express-session": "1.17.0",
"file-type": "14.1.2", "file-type": "14.1.4",
"filesize": "6.1.0", "filesize": "6.1.0",
"fs-extra": "8.1.0", "fs-extra": "8.1.0",
"getos": "3.1.4", "getos": "3.1.5",
"graphql": "14.6.0", "graphql": "14.6.0",
"graphql-list-fields": "2.0.2", "graphql-list-fields": "2.0.2",
"graphql-rate-limit-directive": "1.2.1", "graphql-rate-limit-directive": "1.2.1",
@ -84,7 +84,7 @@
"graphql-tools": "4.0.7", "graphql-tools": "4.0.7",
"he": "1.2.0", "he": "1.2.0",
"highlight.js": "9.18.1", "highlight.js": "9.18.1",
"i18next": "19.3.1", "i18next": "19.3.2",
"i18next-express-middleware": "1.9.1", "i18next-express-middleware": "1.9.1",
"i18next-node-fs-backend": "2.1.3", "i18next-node-fs-backend": "2.1.3",
"image-size": "0.8.3", "image-size": "0.8.3",
@ -94,7 +94,7 @@
"jsonwebtoken": "8.5.1", "jsonwebtoken": "8.5.1",
"katex": "0.11.1", "katex": "0.11.1",
"klaw": "3.0.0", "klaw": "3.0.0",
"knex": "0.20.10", "knex": "0.20.11",
"lodash": "4.17.15", "lodash": "4.17.15",
"markdown-it": "10.0.0", "markdown-it": "10.0.0",
"markdown-it-abbr": "1.0.4", "markdown-it-abbr": "1.0.4",
@ -113,15 +113,15 @@
"mime-types": "2.1.26", "mime-types": "2.1.26",
"moment": "2.24.0", "moment": "2.24.0",
"moment-timezone": "0.5.28", "moment-timezone": "0.5.28",
"mongodb": "3.5.3", "mongodb": "3.5.5",
"ms": "2.1.2", "ms": "2.1.2",
"mssql": "6.1.0", "mssql": "6.2.0",
"multer": "1.4.2", "multer": "1.4.2",
"mysql2": "2.1.0", "mysql2": "2.1.0",
"nanoid": "2.1.11", "nanoid": "2.1.11",
"node-2fa": "1.1.2", "node-2fa": "1.1.2",
"node-cache": "5.1.0", "node-cache": "5.1.0",
"nodemailer": "6.4.3", "nodemailer": "6.4.5",
"objection": "2.1.3", "objection": "2.1.3",
"passport": "0.4.1", "passport": "0.4.1",
"passport-auth0": "1.3.2", "passport-auth0": "1.3.2",
@ -134,7 +134,7 @@
"passport-gitlab2": "5.0.0", "passport-gitlab2": "5.0.0",
"passport-google-oauth20": "2.0.0", "passport-google-oauth20": "2.0.0",
"passport-jwt": "4.0.0", "passport-jwt": "4.0.0",
"passport-ldapauth": "2.1.3", "passport-ldapauth": "2.1.4",
"passport-local": "1.0.0", "passport-local": "1.0.0",
"passport-microsoft": "0.0.5", "passport-microsoft": "0.0.5",
"passport-oauth2": "1.5.0", "passport-oauth2": "1.5.0",
@ -159,25 +159,25 @@
"scim-query-filter-parser": "2.0.4", "scim-query-filter-parser": "2.0.4",
"semver": "7.1.3", "semver": "7.1.3",
"serve-favicon": "2.5.0", "serve-favicon": "2.5.0",
"simple-git": "1.131.0", "simple-git": "1.132.0",
"solr-node": "1.2.1", "solr-node": "1.2.1",
"sqlite3": "4.1.1", "sqlite3": "4.1.1",
"ssh2": "0.8.7", "ssh2": "0.8.8",
"ssh2-promise": "0.1.6", "ssh2-promise": "0.1.6",
"striptags": "3.1.1", "striptags": "3.1.1",
"subscriptions-transport-ws": "0.9.16", "subscriptions-transport-ws": "0.9.16",
"tar-fs": "2.0.0", "tar-fs": "2.0.0",
"twemoji": "12.1.5", "twemoji": "12.1.5",
"uslug": "1.0.4", "uslug": "1.0.4",
"uuid": "3.4.0", "uuid": "7.0.2",
"validate.js": "0.13.1", "validate.js": "0.13.1",
"winston": "3.2.1", "winston": "3.2.1",
"xss": "1.0.6", "xss": "1.0.6",
"yargs": "15.1.0" "yargs": "15.3.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.8.4", "@babel/cli": "^7.8.4",
"@babel/core": "^7.8.4", "@babel/core": "^7.8.7",
"@babel/plugin-proposal-class-properties": "^7.8.3", "@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-decorators": "^7.8.3", "@babel/plugin-proposal-decorators": "^7.8.3",
"@babel/plugin-proposal-export-namespace-from": "^7.8.3", "@babel/plugin-proposal-export-namespace-from": "^7.8.3",
@ -187,12 +187,12 @@
"@babel/plugin-proposal-throw-expressions": "^7.8.3", "@babel/plugin-proposal-throw-expressions": "^7.8.3",
"@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-import-meta": "^7.8.3", "@babel/plugin-syntax-import-meta": "^7.8.3",
"@babel/polyfill": "^7.8.3", "@babel/polyfill": "^7.8.7",
"@babel/preset-env": "^7.8.4", "@babel/preset-env": "^7.8.7",
"@mdi/font": "4.9.95", "@mdi/font": "5.0.45",
"@panter/vue-i18next": "0.15.2", "@panter/vue-i18next": "0.15.2",
"@requarks/ckeditor5": "12.4.0-wiki.14", "@requarks/ckeditor5": "12.4.0-wiki.14",
"@vue/babel-preset-app": "4.2.2", "@vue/babel-preset-app": "4.2.3",
"animate-sass": "0.8.2", "animate-sass": "0.8.2",
"animated-number-vue": "1.0.0", "animated-number-vue": "1.0.0",
"apollo-cache-inmemory": "1.6.5", "apollo-cache-inmemory": "1.6.5",
@ -205,7 +205,7 @@
"apollo-link-ws": "1.0.19", "apollo-link-ws": "1.0.19",
"apollo-utilities": "1.3.3", "apollo-utilities": "1.3.3",
"autoprefixer": "9.7.4", "autoprefixer": "9.7.4",
"babel-eslint": "10.0.3", "babel-eslint": "10.1.0",
"babel-jest": "25.1.0", "babel-jest": "25.1.0",
"babel-loader": "^8.0.6", "babel-loader": "^8.0.6",
"babel-plugin-graphql-tag": "2.5.0", "babel-plugin-graphql-tag": "2.5.0",
@ -215,7 +215,7 @@
"cache-loader": "4.1.0", "cache-loader": "4.1.0",
"chart.js": "2.9.3", "chart.js": "2.9.3",
"clean-webpack-plugin": "3.0.0", "clean-webpack-plugin": "3.0.0",
"clipboard": "2.0.4", "clipboard": "2.0.6",
"codemirror": "5.52.0", "codemirror": "5.52.0",
"copy-webpack-plugin": "5.1.1", "copy-webpack-plugin": "5.1.1",
"core-js": "3.6.4", "core-js": "3.6.4",
@ -231,10 +231,10 @@
"eslint-plugin-node": "11.0.0", "eslint-plugin-node": "11.0.0",
"eslint-plugin-promise": "4.2.1", "eslint-plugin-promise": "4.2.1",
"eslint-plugin-standard": "4.0.1", "eslint-plugin-standard": "4.0.1",
"eslint-plugin-vue": "6.2.1", "eslint-plugin-vue": "6.2.2",
"fibers": "4.0.2", "fibers": "4.0.2",
"file-loader": "5.1.0", "file-loader": "5.1.0",
"filepond": "4.11.0", "filepond": "4.13.0",
"filepond-plugin-file-validate-type": "1.2.4", "filepond-plugin-file-validate-type": "1.2.4",
"filesize.js": "2.0.0", "filesize.js": "2.0.0",
"graphql-persisted-document-loader": "2.0.0", "graphql-persisted-document-loader": "2.0.0",
@ -265,13 +265,13 @@
"pug-plain-loader": "1.0.0", "pug-plain-loader": "1.0.0",
"raw-loader": "4.0.0", "raw-loader": "4.0.0",
"resolve-url-loader": "3.1.1", "resolve-url-loader": "3.1.1",
"sass": "1.25.0", "sass": "1.26.3",
"sass-loader": "8.0.2", "sass-loader": "8.0.2",
"sass-resources-loader": "2.0.1", "sass-resources-loader": "2.0.1",
"script-ext-html-webpack-plugin": "2.1.4", "script-ext-html-webpack-plugin": "2.1.4",
"simple-progress-webpack-plugin": "1.1.2", "simple-progress-webpack-plugin": "1.1.2",
"style-loader": "1.1.3", "style-loader": "1.1.3",
"terser": "4.6.3", "terser": "4.6.6",
"twemoji-awesome": "1.0.6", "twemoji-awesome": "1.0.6",
"url-loader": "3.0.0", "url-loader": "3.0.0",
"velocity-animate": "1.5.2", "velocity-animate": "1.5.2",
@ -284,19 +284,19 @@
"vue-hot-reload-api": "2.3.4", "vue-hot-reload-api": "2.3.4",
"vue-loader": "15.9.0", "vue-loader": "15.9.0",
"vue-moment": "4.1.0", "vue-moment": "4.1.0",
"vue-router": "3.1.5", "vue-router": "3.1.6",
"vue-status-indicator": "1.2.1", "vue-status-indicator": "1.2.1",
"vue-template-compiler": "2.6.11", "vue-template-compiler": "2.6.11",
"vue2-animate": "2.1.3", "vue2-animate": "2.1.3",
"vuedraggable": "2.23.2", "vuedraggable": "2.23.2",
"vuescroll": "4.14.4", "vuescroll": "4.15.0",
"vuetify": "2.2.14", "vuetify": "2.2.17",
"vuetify-loader": "1.4.3", "vuetify-loader": "1.4.3",
"vuex": "3.1.2", "vuex": "3.1.3",
"vuex-pathify": "1.4.1", "vuex-pathify": "1.4.1",
"vuex-persistedstate": "2.7.1", "vuex-persistedstate": "2.7.1",
"webpack": "4.41.6", "webpack": "4.42.0",
"webpack-bundle-analyzer": "3.6.0", "webpack-bundle-analyzer": "3.6.1",
"webpack-cli": "3.3.11", "webpack-cli": "3.3.11",
"webpack-dev-middleware": "3.7.2", "webpack-dev-middleware": "3.7.2",
"webpack-hot-middleware": "2.25.0", "webpack-hot-middleware": "2.25.0",

View File

@ -1,7 +1,7 @@
const _ = require('lodash') const _ = require('lodash')
const request = require('request-promise') const request = require('request-promise')
const bugsnag = require('@bugsnag/node') const bugsnag = require('@bugsnag/node')
const uuid = require('uuid/v4') const { v4: uuid } = require('uuid')
const qs = require('querystring') const qs = require('querystring')
const os = require('os') const os = require('os')

View File

@ -9,7 +9,7 @@ const URL = require('url').URL
module.exports = { module.exports = {
async render() { async render() {
const $ = cheerio.load(this.input, { const $ = cheerio.load(this.input, {
decodeEntities: false decodeEntities: true
}) })
if ($.root().children().length < 1) { if ($.root().children().length < 1) {
@ -229,7 +229,7 @@ module.exports = {
headers.push(headerSlug) headers.push(headerSlug)
}) })
let output = $.html('body').replace('<body>', '').replace('</body>', '') let output = decodeEscape($.html('body').replace('<body>', '').replace('</body>', ''))
// -------------------------------- // --------------------------------
// STEP: POST // STEP: POST
@ -243,3 +243,14 @@ module.exports = {
return output return output
} }
} }
function decodeEscape (string) {
return string.replace(/&#x([0-9a-f]{1,6});/ig, (entity, code) => {
code = parseInt(code, 16)
// Don't unescape ASCII characters, assuming they're encoded for a good reason
if (code < 0x80) return entity
return String.fromCodePoint(code)
})
}

View File

@ -1,5 +1,5 @@
const path = require('path') const path = require('path')
const uuid = require('uuid/v4') const { v4: uuid } = require('uuid')
const bodyParser = require('body-parser') const bodyParser = require('body-parser')
const compression = require('compression') const compression = require('compression')
const express = require('express') const express = require('express')

972
yarn.lock

File diff suppressed because it is too large Load Diff