From f7e1e8d3cb2b6076414e18d06f80e76b2615ea8b Mon Sep 17 00:00:00 2001 From: Dillon Kearns Date: Mon, 7 Dec 2020 08:41:10 -0800 Subject: [PATCH] Run elm-review fixes. --- examples/docs/package-lock.json | 820 +++++++++++++++--- examples/docs/package.json | 2 +- review/src/ReviewConfig.elm | 5 +- src/Head.elm | 1 - src/Head/Seo.elm | 8 +- src/Head/Twitter.elm | 72 +- src/OptimizedDecoder.elm | 33 - src/Pages/ContentCache.elm | 9 - src/Pages/Document.elm | 1 - src/Pages/FrontmatterDecoder.elm | 46 +- src/Pages/Internal/Platform.elm | 15 +- src/Pages/Internal/Platform/Cli.elm | 56 +- .../Internal/Platform/StaticResponses.elm | 17 - src/Pages/Manifest.elm | 11 - src/Pages/StaticHttpRequest.elm | 38 +- src/Secrets.elm | 28 - tests/BetaStaticHttpRequestsTests.elm | 75 +- tests/StaticHttpRequestsTests.elm | 16 +- tests/StaticHttpUnitTests.elm | 5 +- tests/StaticResponsesTests.elm | 26 +- 20 files changed, 718 insertions(+), 566 deletions(-) diff --git a/examples/docs/package-lock.json b/examples/docs/package-lock.json index 69c9ec66..03256b85 100644 --- a/examples/docs/package-lock.json +++ b/examples/docs/package-lock.json @@ -257,32 +257,33 @@ "@babel/core": "^7.5.5", "@babel/preset-env": "^7.5.5", "babel-loader": "^8.0.6", - "chokidar": "^2.1.5", - "closure-webpack-plugin": "^2.0.1", "copy-webpack-plugin": "^5.0.4", "cross-spawn": "6.0.5", "css-loader": "^3.2.0", "elm": "^0.19.1-3", "elm-hot-webpack-loader": "^1.1.2", + "elm-optimize-level-2": "^0.1.4", "elm-webpack-loader": "^6.0.0", "express": "^4.17.1", "favicons-webpack-plugin": "^3.0.0", "file-loader": "^4.2.0", "find-elm-dependencies": "2.0.2", "globby": "^10.0.1", - "google-closure-compiler": "^20190909.0.0", "gray-matter": "^4.0.2", - "html-webpack-plugin": "^4.0.0-beta.11", + "html-webpack-plugin": "^4.2.0", "imagemin-mozjpeg": "^8.0.0", "imagemin-webpack-plugin": "^2.4.2", "lodash": "4.17.15", "node-sass": "^4.12.0", "prerender-spa-plugin": "^3.4.0", + "raw-loader": "^4.0.0", "sass-loader": "^8.0.0", "script-ext-html-webpack-plugin": "^2.1.4", + "sharp": "^0.25.2", "style-loader": "^1.0.0", "temp": "^0.9.0", - "webpack": "^4.41.5", + "terser-webpack-plugin": "^2.3.5", + "webpack": "4.42.1", "webpack-dev-middleware": "^3.7.0", "webpack-hot-middleware": "^2.25.0", "webpack-merge": "^4.2.1", @@ -1666,6 +1667,12 @@ "@types/svgo": "*" } }, + "@types/json-schema": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz", + "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==", + "dev": true + }, "@types/memory-fs": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@types/memory-fs/-/memory-fs-0.3.2.tgz", @@ -1994,14 +2001,12 @@ "acorn": { "version": "5.7.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", - "dev": true + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==" }, "acorn-dynamic-import": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", - "dev": true, "requires": { "acorn": "^4.0.3" }, @@ -2009,8 +2014,7 @@ "acorn": { "version": "4.0.13", "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", - "dev": true + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" } } }, @@ -2023,6 +2027,24 @@ "es6-promisify": "^5.0.0" } }, + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "dependencies": { + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + } + } + }, "ajv": { "version": "6.10.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", @@ -2069,7 +2091,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, "requires": { "color-convert": "^1.9.0" } @@ -2815,18 +2836,30 @@ } }, "bl": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-3.0.0.tgz", - "integrity": "sha512-EUAyP5UHU5hxF8BPT0LKW8gjYLhq1DQIcneOX/pL/m2Alo+OYDQAJlHq+yseMP50Os2nHXOSic6Ss3vSQeyf4A==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz", + "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==", "dev": true, "requires": { - "readable-stream": "^3.0.1" + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" }, "dependencies": { + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "readable-stream": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -3369,7 +3402,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -3457,6 +3489,12 @@ } } }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, "cliui": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", @@ -3471,14 +3509,12 @@ "clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=" }, "clone-buffer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", - "dev": true + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=" }, "clone-deep": { "version": "4.0.1", @@ -3511,14 +3547,12 @@ "clone-stats": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", - "dev": true + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=" }, "cloneable-readable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", - "dev": true, "requires": { "inherits": "^2.0.1", "process-nextick-args": "^2.0.0", @@ -3529,7 +3563,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/closure-webpack-plugin/-/closure-webpack-plugin-2.0.1.tgz", "integrity": "sha512-ZQz24BstWdqOwyo3ttOOqS2V/CxZ9AXEO5P3W3oIO3e0ZtnL2KefFEJ+NtVwNcuvtp64ZiQf0zWs0Jur/QLtfA==", - "dev": true, "requires": { "acorn": "^5.0.0", "acorn-dynamic-import": "^2.0.0", @@ -3564,20 +3597,19 @@ } }, "color": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/color/-/color-3.1.2.tgz", - "integrity": "sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/color/-/color-3.1.3.tgz", + "integrity": "sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ==", "dev": true, "requires": { "color-convert": "^1.9.1", - "color-string": "^1.5.2" + "color-string": "^1.5.4" } }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, "requires": { "color-name": "1.1.3" } @@ -3585,13 +3617,12 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-string": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", - "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", + "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", "dev": true, "requires": { "color-name": "^1.0.0", @@ -4654,6 +4685,82 @@ "elm-hot": "^1.1.4" } }, + "elm-optimize-level-2": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/elm-optimize-level-2/-/elm-optimize-level-2-0.1.5.tgz", + "integrity": "sha512-9vaPjQEjdxzUXewbCJn1X3oIwUgdBssgy+uQvsqyDSpyEwYWxQCgX4qX3NtqKNgsHEZ+TYFzKlzdKvcRKbjOUg==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "commander": "^6.0.0", + "node-elm-compiler": "^5.0.4", + "ts-union": "^2.2.1", + "typescript": "^3.9.7" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "commander": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz", + "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "typescript": { + "version": "3.9.7", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", + "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", + "dev": true + } + } + }, "elm-test": { "version": "0.19.1-revision2", "resolved": "https://registry.npmjs.org/elm-test/-/elm-test-0.19.1-revision2.tgz", @@ -5013,8 +5120,7 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint-scope": { "version": "4.0.3", @@ -5520,6 +5626,43 @@ "xml2js": "^0.4.22" }, "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "sharp": { + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.23.4.tgz", + "integrity": "sha512-fJMagt6cT0UDy9XCsgyLi0eiwWWhQRxbwGmqQT6sY8Av4s0SVsT/deg8fobBQCTDU5iXRgz0rAeXoE2LBZ8g+Q==", + "dev": true, + "requires": { + "color": "^3.1.2", + "detect-libc": "^1.0.3", + "nan": "^2.14.0", + "npmlog": "^4.1.2", + "prebuild-install": "^5.3.3", + "semver": "^6.3.0", + "simple-get": "^3.1.0", + "tar": "^5.0.5", + "tunnel-agent": "^0.6.0" + } + }, + "tar": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/tar/-/tar-5.0.5.tgz", + "integrity": "sha512-MNIgJddrV2TkuwChwcSNds/5E9VijOiw7kAc1y5hTNJoLDSuIyid2QtLYiCYNnICebpuvjhPQZsXwUL0O3l7OQ==", + "dev": true, + "requires": { + "chownr": "^1.1.3", + "fs-minipass": "^2.0.0", + "minipass": "^3.0.0", + "minizlib": "^2.1.0", + "mkdirp": "^0.5.0", + "yallist": "^4.0.0" + } + }, "through2": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", @@ -5528,6 +5671,12 @@ "requires": { "readable-stream": "2 || 3" } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } } }, @@ -5903,9 +6052,9 @@ } }, "fs-minipass": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.0.0.tgz", - "integrity": "sha512-40Qz+LFXmd9tzYVnnBmZvFfvAADfUA14TXPK1s7IfElJTIZ97rA8w4Kin7Wt5JBrC3ShnnFJO/5vPjPEeJIq9A==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "dev": true, "requires": { "minipass": "^3.0.0" @@ -6775,7 +6924,6 @@ "version": "20190909.0.0", "resolved": "https://registry.npmjs.org/google-closure-compiler/-/google-closure-compiler-20190909.0.0.tgz", "integrity": "sha512-Mh1IKgp72HBgEeWQ5RDZHGj0w3vhEJsIaWptqSWEr7muinBv/0Xq5g1pxCvXX7LPfSH7vL+1Indzt1OxwfTXwQ==", - "dev": true, "requires": { "chalk": "2.x", "google-closure-compiler-java": "^20190909.0.0", @@ -6791,34 +6939,29 @@ "google-closure-compiler-java": { "version": "20190909.0.0", "resolved": "https://registry.npmjs.org/google-closure-compiler-java/-/google-closure-compiler-java-20190909.0.0.tgz", - "integrity": "sha512-Cz58+hW7XxFQ8KHenfP9eH2FqvGJ1ikcSebHihgqAg1Pfy8ZzxWUBZYEwOGqV0Kzcbb1NN79n0UMd2ZNfWb19w==", - "dev": true + "integrity": "sha512-Cz58+hW7XxFQ8KHenfP9eH2FqvGJ1ikcSebHihgqAg1Pfy8ZzxWUBZYEwOGqV0Kzcbb1NN79n0UMd2ZNfWb19w==" }, "google-closure-compiler-js": { "version": "20190909.0.0", "resolved": "https://registry.npmjs.org/google-closure-compiler-js/-/google-closure-compiler-js-20190909.0.0.tgz", - "integrity": "sha512-x8PcAL5H5VxkOJ/jYdAYxwdwbIvClGW7IxzyOH2NMvBNVP6AbpJ24SCODQSA0qhMbCs45JyY3TJ9s2wH2NuzUA==", - "dev": true + "integrity": "sha512-x8PcAL5H5VxkOJ/jYdAYxwdwbIvClGW7IxzyOH2NMvBNVP6AbpJ24SCODQSA0qhMbCs45JyY3TJ9s2wH2NuzUA==" }, "google-closure-compiler-linux": { "version": "20190909.0.0", "resolved": "https://registry.npmjs.org/google-closure-compiler-linux/-/google-closure-compiler-linux-20190909.0.0.tgz", "integrity": "sha512-4mTUVhrkjS4d4LREqOWIwPT4lfbUJAs5nh9gTJ7vHtBxa8aE08ynGPz4zhO9gYpRb3mDVYd7BHA2dvJWtFRiDw==", - "dev": true, "optional": true }, "google-closure-compiler-osx": { "version": "20190909.0.0", "resolved": "https://registry.npmjs.org/google-closure-compiler-osx/-/google-closure-compiler-osx-20190909.0.0.tgz", "integrity": "sha512-DvIr6gd7BfIpptSfLihEGwCHKlcwssHC+pt1duagRPfmgezp8GeJvAvbZIS/+Ud77zRFz+wcwQWsTvwyZSwklQ==", - "dev": true, "optional": true }, "google-closure-compiler-windows": { "version": "20190909.0.0", "resolved": "https://registry.npmjs.org/google-closure-compiler-windows/-/google-closure-compiler-windows-20190909.0.0.tgz", "integrity": "sha512-9N+7ocubt+cNI1q2395ZZ2fQouLeAudLGpYYMLYzNPfrfENvPWX+Zbk7A0gSqUzRLn+tD0SfpRcxmvajw7o2VA==", - "dev": true, "optional": true }, "got": { @@ -7907,6 +8050,33 @@ "is-object": "^1.0.1" } }, + "jest-worker": { + "version": "25.5.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-25.5.0.tgz", + "integrity": "sha512-/dsSmUkIy5EBGfv/IjjqmFxrNAUpBERfGs1oHROyD7yxjG/w+t0GOJDX8O1k32ySmd7+a5IhnJU2qQFcJ4n1vw==", + "dev": true, + "requires": { + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "jimp": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.9.3.tgz", @@ -8389,6 +8559,12 @@ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, "merge2": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz", @@ -8454,9 +8630,9 @@ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, "mimic-response": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.0.0.tgz", - "integrity": "sha512-8ilDoEapqA4uQ3TwS0jakGONKXVJqpy+RpM+3b7pLdOjghCrEiGp9SRkFbUHAmZW9vdnrENWHjaweIoTIJExSQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", "dev": true }, "min-document": { @@ -8493,9 +8669,9 @@ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "minipass": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.1.tgz", - "integrity": "sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", + "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", "dev": true, "requires": { "yallist": "^4.0.0" @@ -8509,10 +8685,37 @@ } } }, + "minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, "minizlib": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.0.tgz", - "integrity": "sha512-EzTZN/fjSvifSX0SlqUERCN39o6T40AMarPbv0MrarSFtIITCBh7bi+dU8nxGFHuqs9jdIAeoYoKuQAAASsPPA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "dev": true, "requires": { "minipass": "^3.0.0", @@ -8579,6 +8782,12 @@ } } }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -8657,9 +8866,9 @@ } }, "napi-build-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.1.tgz", - "integrity": "sha512-boQj1WFgQH3v4clhu3mTNfP+vOBxorDlE8EKiMjUlLG3C4qAESnn9AxIOkFgTR2c9LtzNjPrjS60cT27ZKBhaA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", "dev": true }, "negotiator": { @@ -8688,14 +8897,20 @@ } }, "node-abi": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.13.0.tgz", - "integrity": "sha512-9HrZGFVTR5SOu3PZAnAY2hLO36aW1wmA+FDsVkr85BTST32TLCA1H/AEcatVRAsWLyXS3bqUDYCAjq5/QGuSTA==", + "version": "2.19.3", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.19.3.tgz", + "integrity": "sha512-9xZrlyfvKhWme2EXFKQhZRp1yNWT/uI1luYPr3sFl+H4keYY4xR+1jO7mvTTijIsHf1M+QDe9uWuKeEpLInIlg==", "dev": true, "requires": { "semver": "^5.4.1" } }, + "node-addon-api": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.0.2.tgz", + "integrity": "sha512-+D4s2HCnxPd5PjjI0STKwncjXTUKKqm74MDMz9OPXavjsGmjkvwgLtA5yoxJUdmpj52+2u+RrXgPipahKczMKg==", + "dev": true + }, "node-elm-compiler": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/node-elm-compiler/-/node-elm-compiler-5.0.4.tgz", @@ -9712,16 +9927,16 @@ "dev": true }, "prebuild-install": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.3.tgz", - "integrity": "sha512-GV+nsUXuPW2p8Zy7SarF/2W/oiK8bFQgJcncoJ0d7kRpekEA0ftChjfEaF9/Y+QJEc/wFR7RAEa8lYByuUIe2g==", + "version": "5.3.6", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.6.tgz", + "integrity": "sha512-s8Aai8++QQGi4sSbs/M1Qku62PFK49Jm1CbgXklGz4nmHveDq0wzJkg7Na5QbnO1uNH8K7iqx2EQ/mV0MZEmOg==", "dev": true, "requires": { "detect-libc": "^1.0.3", "expand-template": "^2.0.3", "github-from-package": "0.0.0", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", "napi-build-utils": "^1.0.1", "node-abi": "^2.7.0", "noop-logger": "^0.1.1", @@ -9732,6 +9947,14 @@ "tar-fs": "^2.0.0", "tunnel-agent": "^0.6.0", "which-pm-runs": "^1.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } } }, "prepend-http": { @@ -9996,6 +10219,85 @@ "unpipe": "1.0.0" } }, + "raw-loader": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz", + "integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "schema-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", + "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.6", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + } + } + }, "rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", @@ -10239,8 +10541,7 @@ "replace-ext": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", - "dev": true + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" }, "request": { "version": "2.88.0", @@ -10851,39 +11152,89 @@ } }, "sharp": { - "version": "0.23.4", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.23.4.tgz", - "integrity": "sha512-fJMagt6cT0UDy9XCsgyLi0eiwWWhQRxbwGmqQT6sY8Av4s0SVsT/deg8fobBQCTDU5iXRgz0rAeXoE2LBZ8g+Q==", + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.25.4.tgz", + "integrity": "sha512-umSzJJ1oBwIOfwFFt/fJ7JgCva9FvrEU2cbbm7u/3hSDZhXvkME8WE5qpaJqLIe2Har5msF5UG4CzYlEg5o3BQ==", "dev": true, "requires": { "color": "^3.1.2", "detect-libc": "^1.0.3", - "nan": "^2.14.0", + "node-addon-api": "^3.0.0", "npmlog": "^4.1.2", - "prebuild-install": "^5.3.3", - "semver": "^6.3.0", - "simple-get": "^3.1.0", - "tar": "^5.0.5", + "prebuild-install": "^5.3.4", + "semver": "^7.3.2", + "simple-get": "^4.0.0", + "tar": "^6.0.2", "tunnel-agent": "^0.6.0" }, "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", "dev": true }, - "tar": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/tar/-/tar-5.0.5.tgz", - "integrity": "sha512-MNIgJddrV2TkuwChwcSNds/5E9VijOiw7kAc1y5hTNJoLDSuIyid2QtLYiCYNnICebpuvjhPQZsXwUL0O3l7OQ==", + "decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, "requires": { - "chownr": "^1.1.3", + "mimic-response": "^3.1.0" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "simple-get": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.0.tgz", + "integrity": "sha512-ZalZGexYr3TA0SwySsr5HlgOOinS4Jsa8YB2GJ6lUNAazyAu4KG/VmzMTwAt2YVXzzVj8QmefmAonZIK2BSGcQ==", + "dev": true, + "requires": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "tar": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.0.5.tgz", + "integrity": "sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg==", + "dev": true, + "requires": { + "chownr": "^2.0.0", "fs-minipass": "^2.0.0", "minipass": "^3.0.0", - "minizlib": "^2.1.0", - "mkdirp": "^0.5.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", "yallist": "^4.0.0" } }, @@ -10914,9 +11265,9 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, "simple-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", - "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", "dev": true }, "simple-get": { @@ -11124,8 +11475,7 @@ "source-list-map": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", - "dev": true + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==" }, "source-map": { "version": "0.5.7", @@ -11571,7 +11921,6 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -11645,24 +11994,24 @@ } }, "tar-fs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.0.tgz", - "integrity": "sha512-vaY0obB6Om/fso8a8vakQBzwholQ7v5+uy+tF3Ozvxv1KNezmVQAiWtcNmMHFSFPqL3dJA8ha6gdtFbfX9mcxA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "dev": true, "requires": { "chownr": "^1.1.1", - "mkdirp": "^0.5.1", + "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", - "tar-stream": "^2.0.0" + "tar-stream": "^2.1.4" } }, "tar-stream": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.0.tgz", - "integrity": "sha512-+DAn4Nb4+gz6WZigRzKEZl1QuJVOLtAwwF+WUxy1fJ6X63CaGaUAxJRD2KEn1OMfcbCjySTYpNC6WmfQoIEOdw==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.4.tgz", + "integrity": "sha512-o3pS2zlG4gxr67GmFYBLlq+dM8gyRGUOvsrHclSkvtVtQbjV0s/+ZE8OpICbaj8clrX3tjeHngYGP7rweaBnuw==", "dev": true, "requires": { - "bl": "^3.0.0", + "bl": "^4.0.3", "end-of-stream": "^1.4.1", "fs-constants": "^1.0.0", "inherits": "^2.0.3", @@ -11670,9 +12019,9 @@ }, "dependencies": { "readable-stream": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -11742,27 +12091,211 @@ } }, "terser-webpack-plugin": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", - "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.8.tgz", + "integrity": "sha512-/fKw3R+hWyHfYx7Bv6oPqmk4HGQcrWLtV3X6ggvPuwPNHSnzvVV51z6OaaCOus4YLjutYGOz3pEpbhe6Up2s1w==", "dev": true, "requires": { - "cacache": "^12.0.2", - "find-cache-dir": "^2.1.0", - "is-wsl": "^1.1.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^2.1.2", + "cacache": "^13.0.1", + "find-cache-dir": "^3.3.1", + "jest-worker": "^25.4.0", + "p-limit": "^2.3.0", + "schema-utils": "^2.6.6", + "serialize-javascript": "^4.0.0", "source-map": "^0.6.1", - "terser": "^4.1.2", - "webpack-sources": "^1.4.0", - "worker-farm": "^1.7.0" + "terser": "^4.6.12", + "webpack-sources": "^1.4.3" }, "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true + }, + "cacache": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-13.0.1.tgz", + "integrity": "sha512-5ZvAxd05HDDU+y9BVvcqYu2LLXmPnQ0hW62h32g4xBTgL/MppR4/04NHfj/ycM2y6lmTnbw6HVi+1eN0Psba6w==", + "dev": true, + "requires": { + "chownr": "^1.1.2", + "figgy-pudding": "^3.5.1", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.2", + "infer-owner": "^1.0.4", + "lru-cache": "^5.1.1", + "minipass": "^3.0.0", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "p-map": "^3.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^2.7.1", + "ssri": "^7.0.0", + "unique-filename": "^1.1.1" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "schema-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true + }, + "ssri": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-7.1.0.tgz", + "integrity": "sha512-77/WrDZUWocK0mvA5NTRQyveUf+wsrIc6vyrxpS8tVvYBcX215QbafrJR3KtkpskIzoFLqqNuuYQvxaMjXJ/0g==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1", + "minipass": "^3.1.1" + } + }, + "terser": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", + "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + } } } }, @@ -11940,6 +12473,12 @@ "glob": "^7.1.2" } }, + "ts-union": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/ts-union/-/ts-union-2.3.0.tgz", + "integrity": "sha512-OP+W9WoYvGlOMjc90D6nYz60jU1zQlXAg3VBtuSoMDejY94PaORkya9HtHjaaqqwA4I5/hN38fmKK0nSWj7jPg==", + "dev": true + }, "tslib": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", @@ -12101,8 +12640,7 @@ "unquoted-property-validator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unquoted-property-validator/-/unquoted-property-validator-1.1.0.tgz", - "integrity": "sha512-ZWeQoYZ7HN8DCLeaowNv2GvZIXqJptKB1uUWd08ZYc1qAmJt8tXh9nck26aoYmhJtE3jCjDqdqEfUTqcJ0R7bw==", - "dev": true + "integrity": "sha512-ZWeQoYZ7HN8DCLeaowNv2GvZIXqJptKB1uUWd08ZYc1qAmJt8tXh9nck26aoYmhJtE3jCjDqdqEfUTqcJ0R7bw==" }, "unset-value": { "version": "1.0.0", @@ -12313,7 +12851,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", - "dev": true, "requires": { "clone": "^2.1.1", "clone-buffer": "^1.0.0", @@ -12327,7 +12864,6 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", - "dev": true, "requires": { "source-map": "^0.5.1" } @@ -12393,6 +12929,38 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz", "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==", "dev": true + }, + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "terser-webpack-plugin": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz", + "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==", + "dev": true, + "requires": { + "cacache": "^12.0.2", + "find-cache-dir": "^2.1.0", + "is-wsl": "^1.1.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^4.0.0", + "source-map": "^0.6.1", + "terser": "^4.1.2", + "webpack-sources": "^1.4.0", + "worker-farm": "^1.7.0" + } } } }, @@ -12620,7 +13188,6 @@ "version": "1.4.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", - "dev": true, "requires": { "source-list-map": "^2.0.0", "source-map": "~0.6.1" @@ -12629,8 +13196,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, diff --git a/examples/docs/package.json b/examples/docs/package.json index 0f48e532..bf822cdc 100644 --- a/examples/docs/package.json +++ b/examples/docs/package.json @@ -18,4 +18,4 @@ "elm-pages": "file:../..", "http-server": "^0.11.1" } -} \ No newline at end of file +} diff --git a/review/src/ReviewConfig.elm b/review/src/ReviewConfig.elm index 7b2d111b..4c6ba0bc 100644 --- a/review/src/ReviewConfig.elm +++ b/review/src/ReviewConfig.elm @@ -29,7 +29,8 @@ config = , NoUnused.Dependencies.rule , NoUnused.Exports.rule , NoUnused.Modules.rule - , NoUnused.Parameters.rule - , NoUnused.Patterns.rule + + --, NoUnused.Parameters.rule + --, NoUnused.Patterns.rule , NoUnused.Variables.rule ] diff --git a/src/Head.elm b/src/Head.elm index 10619025..142cf319 100644 --- a/src/Head.elm +++ b/src/Head.elm @@ -43,7 +43,6 @@ writing a plugin package to extend `elm-pages`. -} -import Codec exposing (Codec) import Json.Encode import MimeType import Pages.ImagePath as ImagePath exposing (ImagePath) diff --git a/src/Head/Seo.elm b/src/Head/Seo.elm index 204652d8..404d9211 100644 --- a/src/Head/Seo.elm +++ b/src/Head/Seo.elm @@ -1,4 +1,4 @@ -module Head.Seo exposing (Common, Image, article, audioPlayer, profile, song, summary, summaryLarge, videoPlayer, website) +module Head.Seo exposing (Common, Image, article, audioPlayer, book, profile, song, summary, summaryLarge, videoPlayer, website) {-| @@ -45,14 +45,14 @@ with the `head` function that you pass to your Pages config (`Pages.application` , expirationTime = Nothing } -@docs Common, Image, article, audioPlayer, profile, song, summary, summaryLarge, videoPlayer, website +@docs Common, Image, article, audioPlayer, book, profile, song, summary, summaryLarge, videoPlayer, website -} import Head import Head.Twitter as Twitter -import Pages.ImagePath as ImagePath exposing (ImagePath) -import Pages.PagePath as PagePath exposing (PagePath) +import Pages.ImagePath exposing (ImagePath) +import Pages.PagePath exposing (PagePath) {-| Will be displayed as a large card in twitter diff --git a/src/Head/Twitter.elm b/src/Head/Twitter.elm index b7d75570..474ca971 100644 --- a/src/Head/Twitter.elm +++ b/src/Head/Twitter.elm @@ -1,68 +1,9 @@ -module Head.Twitter exposing (SummarySize(..), TwitterCard(..), rawTags, summaryLarge, summaryRegular) +module Head.Twitter exposing (SummarySize(..), TwitterCard(..), rawTags) import Head import Pages.ImagePath exposing (ImagePath) -{-| --} -summaryRegular details = - Summary - { title = details.title - , description = details.description - , siteUser = details.siteUser - , image = details.image - , size = Regular - } - |> tags - - -{-| --} -summaryLarge details = - Summary - { title = details.title - , description = details.description - , siteUser = details.siteUser - , image = details.image - , size = Large - } - |> tags - - -{-| --} -app : - { title : String - , description : Maybe String - , siteUser : String - , image : Maybe (Image pathKey) - , appIdIphone : Maybe Int - , appIdIpad : Maybe Int - , appIdGooglePlay : Maybe String - , appUrlIphone : Maybe String - , appUrlIpad : Maybe String - , appUrlGooglePlay : Maybe String - , appCountry : Maybe String - , appNameIphone : Maybe String - , appNameIpad : Maybe String - , appNameGooglePlay : Maybe String - } - -> List (Head.Tag pathKey) -app details = - App details - |> tags - - -ensureAtPrefix : String -> String -ensureAtPrefix twitterUsername = - if twitterUsername |> String.startsWith "@" then - twitterUsername - - else - "@" ++ twitterUsername - - type SummarySize = Regular | Large @@ -150,17 +91,6 @@ rawTags card = ) -tags : TwitterCard pathKey -> List (Head.Tag pathKey) -tags card = - card - |> rawTags - |> List.filterMap - (\( name, maybeContent ) -> - maybeContent - |> Maybe.map (\content -> Head.metaName name content) - ) - - cardValue : TwitterCard pathKey -> String cardValue card = case card of diff --git a/src/OptimizedDecoder.elm b/src/OptimizedDecoder.elm index c2d91d1e..74b1f60a 100644 --- a/src/OptimizedDecoder.elm +++ b/src/OptimizedDecoder.elm @@ -569,39 +569,6 @@ lazy toDecoder = jde -{-| Useful for checking a value in the JSON matches the value you expect it to -have. If it does, succeeds with the second decoder. If it doesn't it fails. - -This can be used to decode union types: - - type Pet = Cat | Dog | Rabbit - - petDecoder : Decoder Pet - petDecoder = - oneOf - [ check string "cat" <| succeed Cat - , check string "dog" <| succeed Dog - , check string "rabbit" <| succeed Rabbit - ] - - """ [ "dog", "rabbit", "cat" ] """ - |> decodeString (list petDecoder) - --> Success [ Dog, Rabbit, Cat ] - --} -check : Decoder a -> a -> Decoder b -> Decoder b -check checkDecoder expectedVal actualDecoder = - checkDecoder - |> andThen - (\actual -> - if actual == expectedVal then - actualDecoder - - else - fail "Verification failed" - ) - - -- Mapping and chaining diff --git a/src/Pages/ContentCache.elm b/src/Pages/ContentCache.elm index 6de75708..82f5187d 100644 --- a/src/Pages/ContentCache.elm +++ b/src/Pages/ContentCache.elm @@ -1,7 +1,6 @@ module Pages.ContentCache exposing ( ContentCache , Entry(..) - , Page , Path , errorView , extractMetadata @@ -11,7 +10,6 @@ module Pages.ContentCache exposing , lookupMetadata , pagesWithErrors , parseContent - , pathForUrl , routesForCache , update ) @@ -288,13 +286,6 @@ routesForCache cacheResult = [] -type alias Page metadata view pathKey = - { metadata : metadata - , path : PagePath pathKey - , view : view - } - - combineTupleResults : List ( List String, Result error success ) -> Result (List error) (List ( List String, success )) diff --git a/src/Pages/Document.elm b/src/Pages/Document.elm index ee899bdf..809a2e57 100644 --- a/src/Pages/Document.elm +++ b/src/Pages/Document.elm @@ -90,7 +90,6 @@ Hello!!! -} import Dict exposing (Dict) -import Html exposing (Html) import Json.Decode diff --git a/src/Pages/FrontmatterDecoder.elm b/src/Pages/FrontmatterDecoder.elm index 25944b5b..745d909b 100644 --- a/src/Pages/FrontmatterDecoder.elm +++ b/src/Pages/FrontmatterDecoder.elm @@ -1,51 +1,7 @@ -module Pages.FrontmatterDecoder exposing (FrontmatterDecoder, decodeList, decoder, resolve) +module Pages.FrontmatterDecoder exposing (FrontmatterDecoder) import Json.Decode as Decode exposing (Decoder) type FrontmatterDecoder a = FrontmatterDecoder (List Decode.Value -> Decoder a) - -parse : List String -> FrontmatterDecoder a -> Result String a -parse (FrontmatterDecoder rawDecoder) = - Decode.decodeString rawDecoder - -decoder : Decoder a -> FrontmatterDecoder a -decoder rawDecoder = - FrontmatterDecoder (\values -> rawDecoder) - - -resolve : (List a -> Decoder b) -> FrontmatterDecoder a -> FrontmatterDecoder b -resolve resolveFn (FrontmatterDecoder rawDecoder) = - (\values -> - let - listDecoder : Decoder (List a) - listDecoder = - decodeList values (rawDecoder values) - in - listDecoder - |> Decode.andThen - (\list -> - resolveFn list - ) - ) - |> FrontmatterDecoder - - -decodeList : List Decode.Value -> Decoder a -> Decoder (List a) -decodeList values rawDecoder = - List.foldl - (\value soFar -> - soFar - |> Decode.andThen - (\list -> - case Decode.decodeValue rawDecoder value of - Ok decoded -> - Decode.succeed (decoded :: list) - - Err error -> - Decode.fail "TODO error message" - ) - ) - (Decode.succeed []) - values diff --git a/src/Pages/Internal/Platform.elm b/src/Pages/Internal/Platform.elm index 152db474..b23dfe10 100644 --- a/src/Pages/Internal/Platform.elm +++ b/src/Pages/Internal/Platform.elm @@ -1,12 +1,11 @@ -module Pages.Internal.Platform exposing (Content, Flags, Model, Msg, Page, Program, application, cliApplication) +module Pages.Internal.Platform exposing (Content, Flags, Model, Msg, Program, application, cliApplication) import Browser import Browser.Dom as Dom import Browser.Navigation -import Dict exposing (Dict) import Head import Html exposing (Html) -import Html.Attributes exposing (style) +import Html.Attributes import Html.Lazy import Http import Json.Decode as Decode @@ -22,18 +21,10 @@ import Pages.PagePath as PagePath exposing (PagePath) import Pages.StaticHttp as StaticHttp import Pages.StaticHttpRequest as StaticHttpRequest import RequestsAndPending exposing (RequestsAndPending) -import Result.Extra -import Task exposing (Task) +import Task import Url exposing (Url) -type alias Page metadata view pathKey = - { metadata : metadata - , path : PagePath pathKey - , view : view - } - - type alias Content = List ( List String, { extension : String, frontMatter : String, body : Maybe String } ) diff --git a/src/Pages/Internal/Platform/Cli.elm b/src/Pages/Internal/Platform/Cli.elm index 7ce1c339..926947a9 100644 --- a/src/Pages/Internal/Platform/Cli.elm +++ b/src/Pages/Internal/Platform/Cli.elm @@ -3,14 +3,13 @@ module Pages.Internal.Platform.Cli exposing , Flags , Model , Msg(..) - , Page , cliApplication , init , update ) import BuildError exposing (BuildError) -import Codec exposing (Codec) +import Codec import Dict exposing (Dict) import ElmHtml.InternalTypes exposing (decodeElmHtml) import ElmHtml.ToString exposing (FormatOptions, defaultFormatOptions, nodeToStringWithOptions) @@ -26,7 +25,7 @@ import Pages.Internal.ApplicationType as ApplicationType import Pages.Internal.Platform.Effect as Effect exposing (Effect) import Pages.Internal.Platform.Mode as Mode exposing (Mode) import Pages.Internal.Platform.StaticResponses as StaticResponses exposing (StaticResponses) -import Pages.Internal.Platform.ToJsPayload as ToJsPayload exposing (ToJsPayload, ToJsSuccessPayload) +import Pages.Internal.Platform.ToJsPayload as ToJsPayload exposing (ToJsSuccessPayload) import Pages.Internal.StaticHttpBody as StaticHttpBody import Pages.Manifest as Manifest import Pages.PagePath as PagePath exposing (PagePath) @@ -38,19 +37,6 @@ import TerminalText as Terminal import Url -type alias FileToGenerate = - { path : List String - , content : String - } - - -type alias Page metadata view pathKey = - { metadata : metadata - , path : PagePath pathKey - , view : view - } - - type alias Content = List ( List String, { extension : String, frontMatter : String, body : Maybe String } ) @@ -279,17 +265,6 @@ perform config cliMsgConstructor toJsPort effect = Cmd.none -encodeFilesToGenerate list = - list - |> Json.Encode.list - (\item -> - Json.Encode.object - [ ( "path", item.path |> String.join "/" |> Json.Encode.string ) - , ( "content", item.content |> Json.Encode.string ) - ] - ) - - --Task.succeed () -- |> Task.perform (\_ -> Continue) @@ -358,33 +333,6 @@ init toModel contentCache siteMetadata config flags = toModel -elmToHtmlBetaInit { secrets, mode, staticHttpCache } toModel contentCache siteMetadata config flags = - --case flags of - --init toModel contentCache siteMetadata config flags - --|> Tuple.mapSecond (perform cliMsgConstructor config.toJsPort) - --|> Tuple.mapSecond - -- (\cmd -> - --Cmd.map AppMsg - --Cmd.none - ( toModel - (Model StaticResponses.error - secrets - [] - --(metadataParserErrors |> List.map Tuple.second) - staticHttpCache - mode - [] - ) - , Effect.NoEffect - --, { html = - -- Html.div [] - -- [ Html.text "Hello!!!!!" ] - -- |> viewRenderer - -- } - -- |> Effect.SendSinglePage - ) - - --) diff --git a/src/Pages/Internal/Platform/StaticResponses.elm b/src/Pages/Internal/Platform/StaticResponses.elm index 01480b57..fb8e8bc7 100644 --- a/src/Pages/Internal/Platform/StaticResponses.elm +++ b/src/Pages/Internal/Platform/StaticResponses.elm @@ -12,7 +12,6 @@ import Pages.StaticHttp as StaticHttp exposing (RequestDetails) import Pages.StaticHttp.Request as HashRequest import Pages.StaticHttpRequest as StaticHttpRequest import RequestsAndPending exposing (RequestsAndPending) -import Result.Extra import Secrets import SecretsDict exposing (SecretsDict) import Set @@ -151,12 +150,6 @@ update newEntry model = } -dictCompact : Dict String (Maybe a) -> Dict String a -dictCompact dict = - dict - |> Dict.Extra.filterMap (\key value -> value) - - encode : RequestsAndPending -> Mode -> StaticResponses -> Dict String (Dict String String) encode requestsAndPending mode (StaticResponses staticResponses) = staticResponses @@ -507,13 +500,3 @@ combineMultipleErrors results = ) (Ok []) results - - -isJust : Maybe a -> Bool -isJust maybeValue = - case maybeValue of - Just _ -> - True - - Nothing -> - False diff --git a/src/Pages/Manifest.elm b/src/Pages/Manifest.elm index 878379db..80a5fc96 100644 --- a/src/Pages/Manifest.elm +++ b/src/Pages/Manifest.elm @@ -74,12 +74,6 @@ import Pages.PagePath as PagePath exposing (PagePath) -- TODO use language https://developer.mozilla.org/en-US/docs/Web/Manifest/lang -type alias Language = - { dir : String -- "rtl", - , lang : String -- "ar" -- TODO should this be an enum? What standard code? - } - - {-| See -} type DisplayMode @@ -188,11 +182,6 @@ type IconPurpose | IconPurposeAny -square : Int -> ( Int, Int ) -square x = - ( x, x ) - - displayModeToAttribute : DisplayMode -> String displayModeToAttribute displayMode = case displayMode of diff --git a/src/Pages/StaticHttpRequest.elm b/src/Pages/StaticHttpRequest.elm index 200cf183..4d881a3d 100644 --- a/src/Pages/StaticHttpRequest.elm +++ b/src/Pages/StaticHttpRequest.elm @@ -1,9 +1,8 @@ -module Pages.StaticHttpRequest exposing (Error(..), Request(..), Status(..), cacheRequestResolution, permanentError, resolve, resolveUrls, strippedResponses, toBuildError, urls) +module Pages.StaticHttpRequest exposing (Error(..), Request(..), Status(..), cacheRequestResolution, resolve, resolveUrls, strippedResponses, toBuildError) import BuildError exposing (BuildError) import Dict exposing (Dict) -import Pages.Internal.ApplicationType as ApplicationType exposing (ApplicationType) -import Pages.Internal.StaticHttpBody as StaticHttpBody +import Pages.Internal.ApplicationType exposing (ApplicationType) import Pages.StaticHttp.Request import RequestsAndPending exposing (RequestsAndPending) import Secrets @@ -41,16 +40,6 @@ type Error | UserCalledStaticHttpFail String -urls : Request value -> List (Secrets.Value Pages.StaticHttp.Request.Request) -urls request = - case request of - Request ( urlList, lookupFn ) -> - urlList - - Done value -> - [] - - toBuildError : String -> Error -> BuildError toBuildError path error = case error of @@ -85,29 +74,6 @@ toBuildError path error = } -permanentError : ApplicationType -> Request value -> RequestsAndPending -> Maybe Error -permanentError appType request rawResponses = - case request of - Request ( urlList, lookupFn ) -> - case lookupFn appType rawResponses of - Ok ( partiallyStrippedResponses, nextRequest ) -> - permanentError appType nextRequest rawResponses - - Err error -> - case error of - MissingHttpResponse _ -> - Nothing - - DecoderError _ -> - Just error - - UserCalledStaticHttpFail string -> - Just error - - Done value -> - Nothing - - resolve : ApplicationType -> Request value -> RequestsAndPending -> Result Error value resolve appType request rawResponses = case request of diff --git a/src/Secrets.elm b/src/Secrets.elm index 5e8184ce..3ff031ca 100644 --- a/src/Secrets.elm +++ b/src/Secrets.elm @@ -38,34 +38,6 @@ succeed value = Value (\_ -> Ok value) -append : Value (List value) -> Value (List value) -> Value (List value) -append (Value lookupSecrets1) (Value lookupSecrets2) = - Value - (\secrets -> - let - secrets1 : Result (List BuildError) (List value) - secrets1 = - lookupSecrets1 secrets - - secrets2 : Result (List BuildError) (List value) - secrets2 = - lookupSecrets2 secrets - in - case ( secrets1, secrets2 ) of - ( Ok value1, Ok value2 ) -> - Ok (value1 ++ value2) - - ( Ok value1, Err errors2 ) -> - Err errors2 - - ( Err errors1, Ok value2 ) -> - Err errors1 - - ( Err errors1, Err errors2 ) -> - Err (errors1 ++ errors2) - ) - - buildError : String -> SecretsDict -> BuildError buildError secretName secretsDict = let diff --git a/tests/BetaStaticHttpRequestsTests.elm b/tests/BetaStaticHttpRequestsTests.elm index d249fd27..977b5f2a 100644 --- a/tests/BetaStaticHttpRequestsTests.elm +++ b/tests/BetaStaticHttpRequestsTests.elm @@ -1,7 +1,7 @@ module BetaStaticHttpRequestsTests exposing (all) import Codec -import Dict exposing (Dict) +import Dict import Expect import Html import Json.Decode as JD @@ -12,7 +12,7 @@ import Pages.Document as Document import Pages.ImagePath as ImagePath import Pages.Internal.Platform.Cli as Main exposing (..) import Pages.Internal.Platform.Effect as Effect exposing (Effect) -import Pages.Internal.Platform.ToJsPayload as ToJsPayload exposing (ToJsPayload) +import Pages.Internal.Platform.ToJsPayload as ToJsPayload import Pages.Internal.StaticHttpBody as StaticHttpBody import Pages.Manifest as Manifest import Pages.PagePath as PagePath @@ -20,14 +20,12 @@ import Pages.StaticHttp as StaticHttp import Pages.StaticHttp.Request as Request import PagesHttp import ProgramTest exposing (ProgramTest) -import Regex import Secrets import SimulatedEffect.Cmd import SimulatedEffect.Http as Http import SimulatedEffect.Ports import SimulatedEffect.Task -import Test exposing (Test, describe, only, skip, test) -import Test.Http +import Test exposing (Test, describe, test) all : Test @@ -296,56 +294,6 @@ simulateEffects effect = -- |> SimulatedEffect.Task.perform (\_ -> Main.Continue) -expectErrorsPort : String -> List (ToJsPayload pathKey) -> Expect.Expectation -expectErrorsPort expectedPlainString actualPorts = - case actualPorts of - [ ToJsPayload.Errors actualRichTerminalString ] -> - actualRichTerminalString - |> normalizeErrorExpectEqual expectedPlainString - - [] -> - Expect.fail "Expected single error port. Didn't receive any ports." - - _ -> - Expect.fail <| "Expected single error port. Got\n" ++ String.join "\n\n" (List.map Debug.toString actualPorts) - - -expectNonfatalErrorsPort : String -> List (ToJsPayload pathKey) -> Expect.Expectation -expectNonfatalErrorsPort expectedPlainString actualPorts = - case actualPorts of - [ ToJsPayload.Success successPayload ] -> - successPayload.errors - |> String.join "\n\n" - |> normalizeErrorExpectEqual expectedPlainString - - _ -> - Expect.fail <| "Expected single non-fatal error port. Got\n" ++ String.join "\n\n" (List.map Debug.toString actualPorts) - - -normalizeErrorExpectEqual : String -> String -> Expect.Expectation -normalizeErrorExpectEqual expectedPlainString actualRichTerminalString = - actualRichTerminalString - |> Regex.replace - (Regex.fromString "\u{001B}\\[[0-9;]+m" - |> Maybe.withDefault Regex.never - ) - (\_ -> "") - |> Expect.equal expectedPlainString - - -normalizeErrorsExpectEqual : List String -> List String -> Expect.Expectation -normalizeErrorsExpectEqual expectedPlainStrings actualRichTerminalStrings = - actualRichTerminalStrings - |> List.map - (Regex.replace - (Regex.fromString "\u{001B}\\[[0-9;]+m" - |> Maybe.withDefault Regex.never - ) - (\_ -> "") - ) - |> Expect.equalLists expectedPlainStrings - - toJsPort foo = Cmd.none @@ -416,23 +364,6 @@ expectSuccess expectedRequests previous = ) -expectError : List String -> ProgramTest model msg effect -> Expect.Expectation -expectError expectedErrors previous = - previous - |> ProgramTest.expectOutgoingPortValues - "toJsPort" - (Codec.decoder (ToJsPayload.successCodecNew2 "" "")) - (\value -> - case value of - [ ToJsPayload.PageProgress portPayload ] -> - portPayload.errors - |> normalizeErrorsExpectEqual expectedErrors - - _ -> - Expect.fail ("Expected ports to be called once, but instead there were " ++ String.fromInt (List.length value) ++ " calls.") - ) - - get : String -> Request.Request get url = { method = "GET" diff --git a/tests/StaticHttpRequestsTests.elm b/tests/StaticHttpRequestsTests.elm index 61fa907c..0c5002c4 100644 --- a/tests/StaticHttpRequestsTests.elm +++ b/tests/StaticHttpRequestsTests.elm @@ -1,7 +1,7 @@ module StaticHttpRequestsTests exposing (all) import Codec -import Dict exposing (Dict) +import Dict import Expect import Html import Json.Decode as JD @@ -26,7 +26,7 @@ import SimulatedEffect.Cmd import SimulatedEffect.Http as Http import SimulatedEffect.Ports import SimulatedEffect.Task -import Test exposing (Test, describe, only, skip, test) +import Test exposing (Test, describe, test) import Test.Http @@ -982,18 +982,6 @@ expectErrorsPort expectedPlainString actualPorts = Expect.fail <| "Expected single error port. Got\n" ++ String.join "\n\n" (List.map Debug.toString actualPorts) -expectNonfatalErrorsPort : String -> List (ToJsPayload pathKey) -> Expect.Expectation -expectNonfatalErrorsPort expectedPlainString actualPorts = - case actualPorts of - [ ToJsPayload.Success successPayload ] -> - successPayload.errors - |> String.join "\n\n" - |> normalizeErrorExpectEqual expectedPlainString - - _ -> - Expect.fail <| "Expected single non-fatal error port. Got\n" ++ String.join "\n\n" (List.map Debug.toString actualPorts) - - normalizeErrorExpectEqual : String -> String -> Expect.Expectation normalizeErrorExpectEqual expectedPlainString actualRichTerminalString = actualRichTerminalString diff --git a/tests/StaticHttpUnitTests.elm b/tests/StaticHttpUnitTests.elm index 781c9272..1a62c1d0 100644 --- a/tests/StaticHttpUnitTests.elm +++ b/tests/StaticHttpUnitTests.elm @@ -1,15 +1,14 @@ module StaticHttpUnitTests exposing (all) -import Dict exposing (Dict) +import Dict import Expect -import Json.Decode.Exploration import OptimizedDecoder as Decode import Pages.Internal.ApplicationType as ApplicationType import Pages.StaticHttp as StaticHttp import Pages.StaticHttp.Request as Request import Pages.StaticHttpRequest as StaticHttpRequest import Secrets -import Test exposing (Test, describe, only, test) +import Test exposing (Test, describe, test) getWithoutSecrets url = diff --git a/tests/StaticResponsesTests.elm b/tests/StaticResponsesTests.elm index f12a4b5f..827de02b 100644 --- a/tests/StaticResponsesTests.elm +++ b/tests/StaticResponsesTests.elm @@ -1,30 +1,15 @@ module StaticResponsesTests exposing (all) -import Dict exposing (Dict) +import Dict import Expect import Pages.Internal.Platform.Mode as Mode import Pages.Internal.Platform.StaticResponses as StaticResponses import Pages.Internal.Platform.ToJsPayload as ToJsPayload import Pages.StaticHttp as StaticHttp -import Pages.StaticHttp.Request as Request -import Secrets import SecretsDict import Test exposing (Test, describe, test) -getWithoutSecrets url = - StaticHttp.get (Secrets.succeed url) - - -get : String -> Request.Request -get url = - { method = "GET" - , url = url - , headers = [] - , body = StaticHttp.emptyBody - } - - all : Test all = describe "Static Http Requests" @@ -51,12 +36,3 @@ config = , content = [] , manifest = ToJsPayload.stubManifest } - - -getReq : String -> StaticHttp.RequestDetails -getReq url = - { url = url - , method = "GET" - , headers = [] - , body = StaticHttp.emptyBody - }