From 800093db327191799da6ebe8864ff66531c91a0b Mon Sep 17 00:00:00 2001 From: Luciano Mammino Date: Fri, 20 Mar 2020 17:42:53 +0000 Subject: [PATCH] Points docs to last stable release (#160) Closes #157 --- .circleci/config.yml | 6 + README.md | 2 +- package-lock.json | 499 +++++++++++++++----- package.json | 13 +- src/scripts/downloadReleases.js | 208 +++++--- src/scripts/processReleases.js | 327 ++++++------- src/scripts/utils.js | 19 + src/scripts/utils/sortVersionTags.js | 20 - src/website/layouts/docs_index.html | 14 +- src/website/layouts/docs_page.html | 19 +- src/website/layouts/docs_version_index.html | 15 +- 11 files changed, 710 insertions(+), 432 deletions(-) create mode 100644 src/scripts/utils.js delete mode 100644 src/scripts/utils/sortVersionTags.js diff --git a/.circleci/config.yml b/.circleci/config.yml index 285f81f77a..304af291fc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,6 +17,7 @@ jobs: keys: - v1-dependencies-{{ checksum "package.json" }} - v1-dependencies- + - v1-releases-cache - run: name: Install dependencies @@ -27,6 +28,11 @@ jobs: - node_modules key: v1-dependencies-{{ checksum "package.json" }} + - save_cache: + paths: + - build-temp/releases + key: v1-releases-cache + - run: name: Test command: npm test diff --git a/README.md b/README.md index 9dbbb975bf..9ce84cbed0 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This project is used to build the website for [fastify web framework](https://gi ## Requirements - - Node 8.3.0+ + - Node 12+ - Install dependencies with `npm install` diff --git a/package-lock.json b/package-lock.json index 37629d02c3..610c7be270 100644 --- a/package-lock.json +++ b/package-lock.json @@ -111,9 +111,9 @@ } }, "acorn": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", - "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", "dev": true }, "acorn-jsx": { @@ -192,6 +192,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, "requires": { "micromatch": "^3.1.4", "normalize-path": "^2.1.1" @@ -201,6 +202,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, "requires": { "remove-trailing-separator": "^1.0.1" } @@ -247,17 +249,20 @@ "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true }, "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true }, "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true }, "array-differ": { "version": "1.0.0", @@ -375,7 +380,8 @@ "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true }, "array.prototype.flat": { "version": "1.2.3", @@ -492,7 +498,8 @@ "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true }, "astral-regex": { "version": "1.0.0", @@ -501,14 +508,15 @@ "dev": true }, "async": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/async/-/async-3.1.0.tgz", - "integrity": "sha512-4vx/aaY6j/j3Lw3fbCHNWP0pPaTCew3F6F3hYyl/tHs/ndmV1q7NW9T5yuJ2XAGwdQrP+6Wu20x06U4APo/iQQ==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" }, "async-each": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==" + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true }, "async-foreach": { "version": "0.1.3", @@ -523,7 +531,8 @@ "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true }, "aws-sign2": { "version": "0.7.0", @@ -535,6 +544,14 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, + "axios": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "requires": { + "follow-redirects": "1.5.10" + } + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -544,6 +561,7 @@ "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, "requires": { "cache-base": "^1.0.1", "class-utils": "^0.3.5", @@ -558,6 +576,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, "requires": { "is-descriptor": "^1.0.0" } @@ -566,6 +585,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -574,6 +594,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -582,6 +603,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -640,7 +662,8 @@ "binary-extensions": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==" + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true }, "block-stream": { "version": "0.0.9", @@ -673,6 +696,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, "requires": { "arr-flatten": "^1.1.0", "array-unique": "^0.3.2", @@ -701,6 +725,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, "requires": { "collection-visit": "^1.0.0", "component-emitter": "^1.2.1", @@ -802,6 +827,7 @@ "version": "2.1.8", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, "requires": { "anymatch": "^2.0.0", "async-each": "^1.0.1", @@ -1032,6 +1058,7 @@ "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, "requires": { "arr-union": "^3.1.0", "define-property": "^0.2.5", @@ -1043,6 +1070,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -1191,6 +1219,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, "requires": { "map-visit": "^1.0.0", "object-visit": "^1.0.0" @@ -1222,10 +1251,16 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" }, + "compare-versions": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", + "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==" + }, "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true }, "concat-map": { "version": "0.0.1", @@ -1277,7 +1312,8 @@ "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -1399,7 +1435,8 @@ "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true }, "deep-is": { "version": "0.1.3", @@ -1419,6 +1456,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, "requires": { "is-descriptor": "^1.0.2", "isobject": "^3.0.1" @@ -1428,6 +1466,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -1436,6 +1475,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -1444,6 +1484,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -1982,6 +2023,7 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, "requires": { "debug": "^2.3.3", "define-property": "^0.2.5", @@ -1996,6 +2038,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -2004,6 +2047,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -2038,6 +2082,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, "requires": { "array-unique": "^0.3.2", "define-property": "^1.0.0", @@ -2053,6 +2098,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, "requires": { "is-descriptor": "^1.0.0" } @@ -2061,6 +2107,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -2069,6 +2116,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -2077,6 +2125,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -2164,6 +2213,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, "requires": { "extend-shallow": "^2.0.1", "is-number": "^3.0.0", @@ -2234,10 +2284,29 @@ "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", "dev": true }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "requires": { + "debug": "=3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true }, "forever-agent": { "version": "0.6.1", @@ -2258,6 +2327,7 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, "requires": { "map-cache": "^0.2.2" } @@ -2310,6 +2380,7 @@ "version": "1.2.9", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "dev": true, "optional": true, "requires": { "nan": "^2.12.1", @@ -2319,21 +2390,25 @@ "abbrev": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", "bundled": true, + "dev": true, "optional": true }, "aproba": { "version": "1.2.0", "bundled": true, + "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.5", "bundled": true, + "dev": true, "optional": true, "requires": { "delegates": "^1.0.0", @@ -2343,11 +2418,13 @@ "balanced-match": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "dev": true, "optional": true, "requires": { "balanced-match": "^1.0.0", @@ -2357,31 +2434,37 @@ "chownr": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", "bundled": true, + "dev": true, "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, + "dev": true, "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, + "dev": true, "optional": true }, "core-util-is": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "debug": { "version": "4.1.1", "bundled": true, + "dev": true, "optional": true, "requires": { "ms": "^2.1.1" @@ -2390,21 +2473,25 @@ "deep-extend": { "version": "0.6.0", "bundled": true, + "dev": true, "optional": true }, "delegates": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", "bundled": true, + "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", "bundled": true, + "dev": true, "optional": true, "requires": { "minipass": "^2.2.1" @@ -2413,11 +2500,13 @@ "fs.realpath": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "gauge": { "version": "2.7.4", "bundled": true, + "dev": true, "optional": true, "requires": { "aproba": "^1.0.3", @@ -2433,6 +2522,7 @@ "glob": { "version": "7.1.3", "bundled": true, + "dev": true, "optional": true, "requires": { "fs.realpath": "^1.0.0", @@ -2446,11 +2536,13 @@ "has-unicode": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.24", "bundled": true, + "dev": true, "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -2459,6 +2551,7 @@ "ignore-walk": { "version": "3.0.1", "bundled": true, + "dev": true, "optional": true, "requires": { "minimatch": "^3.0.4" @@ -2467,6 +2560,7 @@ "inflight": { "version": "1.0.6", "bundled": true, + "dev": true, "optional": true, "requires": { "once": "^1.3.0", @@ -2476,16 +2570,19 @@ "inherits": { "version": "2.0.3", "bundled": true, + "dev": true, "optional": true }, "ini": { "version": "1.3.5", "bundled": true, + "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true, "requires": { "number-is-nan": "^1.0.0" @@ -2494,11 +2591,13 @@ "isarray": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", "bundled": true, + "dev": true, "optional": true, "requires": { "brace-expansion": "^1.1.7" @@ -2507,11 +2606,13 @@ "minimist": { "version": "0.0.8", "bundled": true, + "dev": true, "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "dev": true, "optional": true, "requires": { "safe-buffer": "^5.1.2", @@ -2521,6 +2622,7 @@ "minizlib": { "version": "1.2.1", "bundled": true, + "dev": true, "optional": true, "requires": { "minipass": "^2.2.1" @@ -2529,6 +2631,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "dev": true, "optional": true, "requires": { "minimist": "0.0.8" @@ -2537,11 +2640,13 @@ "ms": { "version": "2.1.1", "bundled": true, + "dev": true, "optional": true }, "needle": { "version": "2.3.0", "bundled": true, + "dev": true, "optional": true, "requires": { "debug": "^4.1.0", @@ -2552,6 +2657,7 @@ "node-pre-gyp": { "version": "0.12.0", "bundled": true, + "dev": true, "optional": true, "requires": { "detect-libc": "^1.0.2", @@ -2569,6 +2675,7 @@ "nopt": { "version": "4.0.1", "bundled": true, + "dev": true, "optional": true, "requires": { "abbrev": "1", @@ -2578,11 +2685,13 @@ "npm-bundled": { "version": "1.0.6", "bundled": true, + "dev": true, "optional": true }, "npm-packlist": { "version": "1.4.1", "bundled": true, + "dev": true, "optional": true, "requires": { "ignore-walk": "^3.0.1", @@ -2592,6 +2701,7 @@ "npmlog": { "version": "4.1.2", "bundled": true, + "dev": true, "optional": true, "requires": { "are-we-there-yet": "~1.1.2", @@ -2603,16 +2713,19 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "object-assign": { "version": "4.1.1", "bundled": true, + "dev": true, "optional": true }, "once": { "version": "1.4.0", "bundled": true, + "dev": true, "optional": true, "requires": { "wrappy": "1" @@ -2621,16 +2734,19 @@ "os-homedir": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "osenv": { "version": "0.1.5", "bundled": true, + "dev": true, "optional": true, "requires": { "os-homedir": "^1.0.0", @@ -2640,16 +2756,19 @@ "path-is-absolute": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", "bundled": true, + "dev": true, "optional": true }, "rc": { "version": "1.2.8", "bundled": true, + "dev": true, "optional": true, "requires": { "deep-extend": "^0.6.0", @@ -2661,6 +2780,7 @@ "minimist": { "version": "1.2.0", "bundled": true, + "dev": true, "optional": true } } @@ -2668,6 +2788,7 @@ "readable-stream": { "version": "2.3.6", "bundled": true, + "dev": true, "optional": true, "requires": { "core-util-is": "~1.0.0", @@ -2682,6 +2803,7 @@ "rimraf": { "version": "2.6.3", "bundled": true, + "dev": true, "optional": true, "requires": { "glob": "^7.1.3" @@ -2690,36 +2812,43 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, + "dev": true, "optional": true }, "safer-buffer": { "version": "2.1.2", "bundled": true, + "dev": true, "optional": true }, "sax": { "version": "1.2.4", "bundled": true, + "dev": true, "optional": true }, "semver": { "version": "5.7.0", "bundled": true, + "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", "bundled": true, + "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", "bundled": true, + "dev": true, "optional": true }, "string-width": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true, "requires": { "code-point-at": "^1.0.0", @@ -2730,6 +2859,7 @@ "string_decoder": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true, "requires": { "safe-buffer": "~5.1.0" @@ -2738,6 +2868,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "dev": true, "optional": true, "requires": { "ansi-regex": "^2.0.0" @@ -2746,11 +2877,13 @@ "strip-json-comments": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "tar": { "version": "4.4.8", "bundled": true, + "dev": true, "optional": true, "requires": { "chownr": "^1.1.1", @@ -2765,11 +2898,13 @@ "util-deprecate": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "wide-align": { "version": "1.1.3", "bundled": true, + "dev": true, "optional": true, "requires": { "string-width": "^1.0.2 || 2" @@ -2778,11 +2913,13 @@ "wrappy": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, + "dev": true, "optional": true } } @@ -2876,7 +3013,8 @@ "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true }, "getpass": { "version": "0.1.7", @@ -2960,6 +3098,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, "requires": { "is-glob": "^3.1.0", "path-dirname": "^1.0.0" @@ -2969,6 +3108,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, "requires": { "is-extglob": "^2.1.0" } @@ -3092,6 +3232,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, "requires": { "get-value": "^2.0.6", "has-values": "^1.0.0", @@ -3102,6 +3243,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, "requires": { "is-number": "^3.0.0", "kind-of": "^4.0.0" @@ -3111,6 +3253,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -3384,6 +3527,7 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -3392,6 +3536,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -3407,6 +3552,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, "requires": { "binary-extensions": "^1.0.0" } @@ -3414,7 +3560,8 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true }, "is-callable": { "version": "1.1.4", @@ -3425,6 +3572,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -3433,6 +3581,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -3448,6 +3597,7 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, "requires": { "is-accessor-descriptor": "^0.1.6", "is-data-descriptor": "^0.1.4", @@ -3457,7 +3607,8 @@ "kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true } } }, @@ -3496,6 +3647,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -3504,6 +3656,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -3520,6 +3673,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, "requires": { "isobject": "^3.0.1" } @@ -3565,7 +3719,8 @@ "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true }, "is-wsl": { "version": "1.1.0", @@ -3586,7 +3741,8 @@ "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true }, "isstream": { "version": "0.1.2", @@ -3660,9 +3816,10 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true }, "klaw": { "version": "1.3.1", @@ -3800,7 +3957,8 @@ "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true }, "map-obj": { "version": "1.0.1", @@ -3817,6 +3975,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, "requires": { "object-visit": "^1.0.0" } @@ -3870,9 +4029,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "path-exists": { "version": "2.1.0", @@ -4187,6 +4346,7 @@ "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -4207,6 +4367,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" @@ -4216,6 +4377,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -4264,6 +4426,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, "requires": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" @@ -4273,6 +4436,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -4347,6 +4511,7 @@ "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -4365,6 +4530,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" @@ -4374,6 +4540,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -4582,14 +4749,119 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nunjucks": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.0.tgz", - "integrity": "sha512-YS/qEQ6N7qCnUdm6EoYRBfJUdWNT0PpKbbRnogV2XyXbBm2STIP1O6yrdZHgwMVK7fIYUx7i8+yatEixnXSB1w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.1.tgz", + "integrity": "sha512-LYlVuC1ZNSalQQkLNNPvcgPt2M9FTY9bs39mTCuFXtqh7jWbYzhDlmz2M6onPiXEhdZo+b9anRhc+uBGuJZ2bQ==", "requires": { "a-sync-waterfall": "^1.0.0", "asap": "^2.0.3", - "chokidar": "^2.0.0", - "yargs": "^3.32.0" + "chokidar": "^3.3.0", + "commander": "^3.0.2" + }, + "dependencies": { + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "optional": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "optional": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "optional": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "chokidar": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz", + "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==", + "optional": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.3.0" + } + }, + "commander": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", + "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==" + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "optional": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fsevents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", + "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "optional": true + }, + "glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "optional": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "optional": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "optional": true + }, + "readdirp": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", + "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==", + "optional": true, + "requires": { + "picomatch": "^2.0.7" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "optional": true, + "requires": { + "is-number": "^7.0.0" + } + } } }, "nunjucks-markdown-filter": { @@ -4621,6 +4893,7 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, "requires": { "copy-descriptor": "^0.1.0", "define-property": "^0.2.5", @@ -4631,6 +4904,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -4639,6 +4913,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -4659,6 +4934,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, "requires": { "isobject": "^3.0.0" } @@ -4688,6 +4964,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, "requires": { "isobject": "^3.0.1" } @@ -4842,6 +5119,14 @@ "error-ex": "^1.2.0" } }, + "parse-link-header": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-link-header/-/parse-link-header-1.0.1.tgz", + "integrity": "sha1-vt/g0hGK64S+deewJUGeyKYRQKc=", + "requires": { + "xtend": "~4.0.1" + } + }, "parseurl": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", @@ -4851,12 +5136,14 @@ "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true }, "path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true }, "path-exists": { "version": "3.0.0", @@ -4907,8 +5194,7 @@ "picomatch": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.0.7.tgz", - "integrity": "sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==", - "dev": true + "integrity": "sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==" }, "pify": { "version": "2.3.0", @@ -4940,7 +5226,8 @@ "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true }, "prelude-ls": { "version": "1.1.2", @@ -5059,6 +5346,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, "requires": { "graceful-fs": "^4.1.11", "micromatch": "^3.1.10", @@ -5096,6 +5384,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, "requires": { "extend-shallow": "^3.0.2", "safe-regex": "^1.1.0" @@ -5105,6 +5394,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" @@ -5114,6 +5404,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -5134,17 +5425,20 @@ "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true }, "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==" + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true }, "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true }, "repeating": { "version": "2.0.1", @@ -5211,24 +5505,6 @@ } } }, - "request-promise-core": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz", - "integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==", - "requires": { - "lodash": "^4.17.15" - } - }, - "request-promise-native": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.8.tgz", - "integrity": "sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ==", - "requires": { - "request-promise-core": "1.1.3", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -5258,7 +5534,8 @@ "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true }, "restore-cursor": { "version": "3.1.0", @@ -5273,7 +5550,8 @@ "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true }, "rimraf": { "version": "3.0.0", @@ -5310,6 +5588,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, "requires": { "ret": "~0.1.10" } @@ -5581,6 +5860,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", @@ -5634,6 +5914,7 @@ "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, "requires": { "base": "^0.11.1", "debug": "^2.2.0", @@ -5649,6 +5930,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -5657,6 +5939,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -5667,6 +5950,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, "requires": { "define-property": "^1.0.0", "isobject": "^3.0.0", @@ -5677,6 +5961,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, "requires": { "is-descriptor": "^1.0.0" } @@ -5685,6 +5970,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -5693,6 +5979,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -5701,6 +5988,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -5713,6 +6001,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, "requires": { "kind-of": "^3.2.0" }, @@ -5721,6 +6010,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -5739,12 +6029,14 @@ "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true }, "source-map-resolve": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, "requires": { "atob": "^2.1.1", "decode-uri-component": "^0.2.0", @@ -5756,7 +6048,8 @@ "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true }, "spdx-correct": { "version": "3.1.0", @@ -5799,6 +6092,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, "requires": { "extend-shallow": "^3.0.0" }, @@ -5807,6 +6101,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" @@ -5816,6 +6111,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -5857,6 +6153,7 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, "requires": { "define-property": "^0.2.5", "object-copy": "^0.1.0" @@ -5866,6 +6163,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -5886,11 +6184,6 @@ "readable-stream": "^2.0.1" } }, - "stealthy-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" - }, "stream-combiner": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", @@ -6121,6 +6414,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -6129,6 +6423,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -6139,6 +6434,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, "requires": { "define-property": "^2.0.2", "extend-shallow": "^3.0.2", @@ -6150,6 +6446,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" @@ -6159,6 +6456,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -6169,6 +6467,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, "requires": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" @@ -6275,6 +6574,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", @@ -6314,6 +6614,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, "requires": { "has-value": "^0.3.1", "isobject": "^3.0.0" @@ -6323,6 +6624,7 @@ "version": "0.3.1", "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, "requires": { "get-value": "^2.0.3", "has-values": "^0.1.4", @@ -6333,6 +6635,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, "requires": { "isarray": "1.0.0" } @@ -6342,7 +6645,8 @@ "has-values": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true } } }, @@ -6373,7 +6677,8 @@ "upath": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true }, "upper-case": { "version": "1.1.3", @@ -6400,12 +6705,14 @@ "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true }, "util-deprecate": { "version": "1.0.2", @@ -6539,11 +6846,6 @@ "resolved": "https://registry.npmjs.org/win-fork/-/win-fork-1.1.1.tgz", "integrity": "sha1-j1jgZW/KAK3IyGoriePNLWotXl4=" }, - "window-size": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" - }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -6629,6 +6931,11 @@ "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", "dev": true }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, "y18n": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", @@ -6644,40 +6951,6 @@ "resolved": "https://registry.npmjs.org/yaml-js/-/yaml-js-0.0.8.tgz", "integrity": "sha1-h8+lqWE/SOJgBUINao7g2m/o2uw=" }, - "yargs": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", - "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", - "requires": { - "camelcase": "^2.0.1", - "cliui": "^3.0.3", - "decamelize": "^1.1.1", - "os-locale": "^1.4.0", - "string-width": "^1.0.1", - "window-size": "^0.1.4", - "y18n": "^3.2.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, "yargs-parser": { "version": "13.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", diff --git a/package.json b/package.json index c3219e2331..89ee0431c0 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,11 @@ "scripts": { "build:cleanup": "rimraf build-temp", "build:create-temp-folder": "mkdirp build-temp", - "build:get-releases": "node src/scripts/downloadReleases.js fastify/fastify build-temp/releases v0.11.0", + "build:get-releases": "node src/scripts/downloadReleases.js fastify/fastify build-temp/releases v1.13.0", "build:process-releases": "node src/scripts/processReleases.js build-temp/releases src/website", "build:website": "node src/scripts/buildWebsite.js", "build:website:watch": "npm run build:website && chokidar 'src/website' -c 'npm run build:website'", - "build": "npm run build:cleanup && npm run build:create-temp-folder && npm run build:get-releases && npm run build:process-releases && npm run build:website", + "build": "npm run build:create-temp-folder && npm run build:get-releases && npm run build:process-releases && npm run build:website", "deploy": "gh-pages -d build --dotfiles", "test:lint": "eslint src --ignore-pattern 'src/website/content/'", "test:images": "node __tests__/organisations-images", @@ -36,9 +36,11 @@ }, "homepage": "https://github.com/fastify/website#readme", "dependencies": { - "async": "^3.1.0", + "async": "^3.2.0", + "axios": "^0.19.2", "clean-css": "^4.2.1", "clone": "^2.1.2", + "compare-versions": "^3.6.0", "debug": "^4.1.1", "js-yaml": "^3.13.1", "lodash": "^4.17.15", @@ -55,10 +57,9 @@ "metalsmith-writemetadata": "^0.4.5", "mkdirp": "^0.5.1", "node-sass": "^4.13.1", - "nunjucks": "^3.2.0", + "nunjucks": "^3.2.1", "nunjucks-markdown-filter": "^0.1.0", - "request": "^2.88.0", - "request-promise-native": "^1.0.8", + "parse-link-header": "^1.0.1", "rimraf": "^3.0.0", "svgo": "^1.3.2", "unzip-stream": "^0.3.0" diff --git a/src/scripts/downloadReleases.js b/src/scripts/downloadReleases.js index c76d16bd51..6ec4b3e3f9 100755 --- a/src/scripts/downloadReleases.js +++ b/src/scripts/downloadReleases.js @@ -1,87 +1,153 @@ #!/usr/bin/env node - -const request = require('request-promise-native') -const mapLimit = require('async/mapLimit') +const crypto = require('crypto') const { resolve, join } = require('path') +const fs = require('fs') +const { promisify } = require('util') +const finished = promisify(require('stream').finished) +const axios = require('axios') const unzip = require('unzip-stream') -const { cpus } = require('os') -const sortVersionTags = require('./utils/sortVersionTags') +const parseLinkHeader = require('parse-link-header') +const compareVersions = require('compare-versions') +const { fileExists } = require('./utils') const repository = process.argv[2] || 'fastify/fastify' const dest = resolve(process.argv[3] || 'releases') -const minRelease = process.argv[4] || 'v0.11.0' +const minRelease = process.argv[4] || 'v1.13.0' + +function md5 (str) { + return crypto.createHash('md5').update(str).digest('hex') +} -console.log(`downloading releases into ${dest}`) +async function getAllReleases (repository, requestConfig) { + let releases = [] + let nextUrl = `https://api.github.com/repos/${repository}/releases` + while (nextUrl) { + const { data, headers } = await axios.get(nextUrl, requestConfig) + const links = parseLinkHeader(headers.link) + nextUrl = links.next ? links.next.url : null + releases = releases.concat(data) + } -const requestConfig = { - json: true, - headers: { 'User-Agent': 'fastify-website-builder-v1' } + return releases } -if (process.env.GH_NAME && process.env.GH_TOKEN) { - console.log(` ยป GitHub API requests authenticated as "${process.env.GH_NAME}"`) - requestConfig.user = process.env.GH_NAME - requestConfig.pass = process.env.GH_TOKEN +function downloadReleases (releases, requestConfig) { + const releasesDownload = Object.values(releases).map(async (release) => { + const destPath = join(dest, release.dest) + if (!release.ignoreCache) { + const hasCache = await fileExists(destPath) + if (hasCache) { + console.log(`Skipped ${release.name} (already in cache)`) + return release + } + } + const { data } = await axios.get(release.url, { ...requestConfig, responseType: 'stream' }) + const stream = data.pipe(unzip.Extract({ path: destPath })) + await finished(stream) + console.log(`Downloaded ${release.name}`) + return release + }) + return Promise.all(releasesDownload) } -request(Object.assign(requestConfig, { url: `https://api.github.com/repos/${repository}/releases` })) - .then((releases) => { - const selectedReleases = releases - // creates version map and label per every release - .map((release) => { - const [major, minor, patch] = release.name.substr(1).split('.').map(Number) - return { - name: release.name, - url: release.zipball_url, - label: `v${major}.${minor}.x`, - version: { major, minor, patch } - } - }) - // removes release prior to a given release - .filter(({ version }) => { - const [major, minor, patch] = minRelease.substr(1).split('.').map(Number) - return ( - version.major > major || - (version.major === major && version.minor > minor) || - (version.major === major && version.minor === minor && version.patch >= patch) - ) - }) - // Keeps only the latest patch per release and creates a map - .reduce((acc, curr) => { - if (!acc[curr.label] || acc[curr.label].version.patch < curr.version.patch) { - acc[curr.label] = curr - } - - return acc - }, {}) - - // Create an alias of the latest release as `latest` - const latestReleaseKey = Object.keys(selectedReleases).sort(sortVersionTags).reverse()[0] - selectedReleases.latest = selectedReleases[latestReleaseKey] - - // Adds current master - selectedReleases.master = { - label: 'master', - name: 'master', - url: `https://github.com/${repository}/archive/master.zip` +async function main () { + console.log(`Downloading releases into ${dest}`) + + const requestConfig = { + responseType: 'json', + headers: { 'User-Agent': 'fastify-website-builder-v2' } + } + + if (process.env.GH_NAME && process.env.GH_TOKEN) { + console.log(`GitHub API requests authenticated as "${process.env.GH_NAME}"`) + requestConfig.auth = { + username: process.env.GH_NAME, + password: process.env.GH_TOKEN } + } - // downloads the releases - mapLimit(Object.keys(selectedReleases), cpus().length * 2, (name, done) => { - const release = selectedReleases[name] - request(Object.assign(requestConfig, { url: release.url })) - .pipe(unzip.Extract({ path: join(dest, name) })) - .on('finish', () => { - console.log(` - ${name}`) - done() - }) - }, (err, data) => { - if (err) throw err - - console.log('All release downloaded') + const releases = await getAllReleases(repository, requestConfig) + console.log(`Found ${releases.length} releases`) + const selectedReleases = releases + // removes draft releases and pre-releases + .filter((release) => !release.draft && !release.prerelease) + // removes releases with invalid names (e.g. 0.2.0 did not have a release name) + .filter((release) => compareVersions.validate(release.name)) + // sorts releases by name descendant + .sort((a, b) => compareVersions(a.name, b.name) * -1) + // creates version map and label per every release + .map((release) => { + const [major, minor, patch] = release.name.split('-', 1)[0].substr(1).split('.').map(Number) + const annotation = release.name.split('-').slice(1).join('-') // catches annotations like `-alpha.1` or `-pre-release.2` + return { + name: release.name, + url: release.zipball_url, + dest: md5(release.zipball_url), + label: `v${major}.${minor}.x`, + docsPath: `v${major}.${minor}.x`, + fullVersion: release.name, + version: { major, minor, patch, annotation } + } }) + // removes release prior to a given release + .filter(({ name, version }) => { + const skip = compareVersions.compare(name, minRelease, '<') + if (skip) { + console.log(`Ignoring "${name}" as it's older than minimum version "${minRelease}"`) + } + return !skip + }) + // Keeps only the latest patch per release and creates a map + .reduce((acc, curr) => { + if (!acc[curr.label] || acc[curr.label].version.patch < curr.version.patch) { + acc[curr.label] = curr + } + + return acc + }, {}) + + // selected the "latest" release at the last release without annotations + const latestRelease = Object.values(selectedReleases) + .sort((a, b) => compareVersions(a.name, b.name) * -1) + .find((r) => r.version.annotation === '') + + // Create an alias of the latest release as `latest` + selectedReleases.latest = { ...latestRelease, name: 'latest', docsPath: 'latest' } + + // Add current master + const masterUrl = `https://github.com/${repository}/archive/master.zip` + selectedReleases.master = { + label: 'master', + name: 'master', + docsPath: 'master', + fullVersion: 'master', + url: masterUrl, + dest: md5(masterUrl), + ignoreCache: true + } + + // downloads the releases + const manifest = await downloadReleases(selectedReleases, requestConfig) + // sort the releases by version and makes sure latest and then master are the first 2 entries + manifest.sort(({ name: a }, { name: b }) => { + switch (true) { + case a === 'latest' && b === 'master': return -1 // latest always goes first + case b === 'latest' && a === 'master': return 1 + case a === 'latest' || a === 'master': return -1 // master is the second + case b === 'latest' || b === 'master': return 1 + default: + return compareVersions(a, b) * -1 // otherwise compare by versions descendant + } }) - .catch((err) => { - console.error(err, err.stack) - process.exit(1) - }) + // saves a manifest with all the current releases in the dest folder + const manifestFile = join(dest, 'releases.json') + await fs.promises.writeFile(manifestFile, JSON.stringify(manifest, null, 2)) + console.log(`Manifest file created: ${manifestFile}`) + + console.log(`Completed: downloaded ${Object.keys(selectedReleases).length} releases`) +} + +main().catch((err) => { + console.error(err) + process.exit(1) +}) diff --git a/src/scripts/processReleases.js b/src/scripts/processReleases.js index 526867f284..4be81230f6 100755 --- a/src/scripts/processReleases.js +++ b/src/scripts/processReleases.js @@ -1,80 +1,89 @@ #!/usr/bin/env node const { join, dirname, basename } = require('path') -const { readdir, lstatSync, writeFile, readFile, existsSync, mkdirSync } = require('fs') -const mapLimit = require('async/mapLimit') -const { cpus } = require('os') +const { promises: fs } = require('fs') const { safeDump } = require('js-yaml') const clone = require('clone') -const sortVersionTags = require('./utils/sortVersionTags') +const { fileExists } = require('./utils') const sourceFolder = process.argv[2] const destFolder = process.argv[3] if (!sourceFolder || !destFolder) { - throw new Error(`Missing parameters sourceFolder and destFolder.\n\nExpected command:\n\t${process.argv[0]} ${process.argv[1]} \n`) + throw new Error(`Missing parameters sourceFolder and destFolder. + + Expected command: + ${process.argv[0]} ${process.argv[1]} +`) } -const extractTOCFromFile = (file, version, cb) => { - readFile(file, 'utf8', (err, data) => { - if (err) return cb(err) - - const content = data.toString() - - const lines = content.split('## Documentation')[1].split('\n\n')[0].split('\n').filter(Boolean) - const re = /master\/docs\/([a-zA-Z-0-9]+\.md)">(.+)<\/b>/ - const toc = lines.map((line) => { - const match = re.exec(line) - const fileName = match[1] - const name = match[2] - const sourceFile = join(dirname(file), 'docs', fileName) - const destinationFile = join(destFolder, 'content', 'docs', version, fileName) - const slug = basename(sourceFile, '.md') - const link = `/docs/${version}/${slug}` - - return { - fileName, - name, - sourceFile, - destinationFile, - slug, - link - } - }) +async function main () { + const releasesFile = join(sourceFolder, 'releases.json') + const releaseFileContent = await fs.readFile(releasesFile, 'utf-8') + const releases = JSON.parse(releaseFileContent) + const masterRelease = releases.find(r => r.name === 'master') + await createDocSources(releases) + await createEcosystemDataFile(masterRelease.dest) + console.log('All releases processed successfully') +} - // fix for missing Factory.md in old versions of TOC - const factoryFileSource = join(dirname(file), 'docs', 'Factory.md') - const hasFactoryFile = existsSync(factoryFileSource) - if (!toc.find((item) => item.fileName === 'Factory.md') && hasFactoryFile) { - toc.push({ - fileName: 'Factory.md', - name: 'Factory', - sourceFile: factoryFileSource, - destinationFile: join(destFolder, 'content', 'docs', version, 'Factory.md'), - slug: 'Factory', - link: '/docs/latest/Factory' - }) - } +async function createDocSources (releases) { + const latestRelease = releases.find(r => r.name === 'latest') + const tocByRelease = await Promise.all(releases.map(getTOCForRelease)) + const indexedToc = releases.reduce((acc, curr, i) => { + acc[curr.docsPath] = tocByRelease[i] + return acc + }, {}) + const versions = releases.map(r => r.docsPath) + await createDocsDataFile(join(destFolder, 'data', 'docs.yml'), { versions, toc: indexedToc, releases }) + await processDocFiles(indexedToc, latestRelease) + await createIndexFiles(releases) +} + +async function extractTOCFromFile (file, release) { + const fileContent = await fs.readFile(file, 'utf8') - cb(null, toc) + // searches for the beginning of the ToC in the file (between '## Documentation' and '\n\n') + const lines = fileContent.split('## Documentation')[1].split('\n\n')[0].split('\n').filter(Boolean) + // every line is a ToC entry + const re = /master\/docs\/([a-zA-Z-0-9]+\.md)">(.+)<\/b>/ + const toc = lines.map((line) => { + const match = re.exec(line) + const fileName = match[1] + const name = match[2] + const sourceFile = join(dirname(file), 'docs', fileName) + const destinationFile = join(destFolder, 'content', 'docs', release.docsPath, fileName) + const slug = basename(sourceFile, '.md') + const link = `/docs/${release.docsPath}/${slug}` + + return { + fileName, + name, + sourceFile, + destinationFile, + slug, + link, + fullVersion: release.fullVersion, + docsPath: release.docsPath, + label: release.label + } }) -} -const getTOCForVersion = (version, cb) => { - const versionFolder = join(sourceFolder, version) - readdir(versionFolder, (err, files) => { - if (err) return cb(err) + return toc +} - const subfolder = files.find(file => file.match(/^fastify-/)) - const indexFile = join(versionFolder, subfolder, 'README.md') +async function getTOCForRelease (release) { + const folder = join(sourceFolder, release.dest) + const files = await fs.readdir(folder) + const subfolder = files.find(file => file.match(/^fastify-/)) + const indexFile = join(folder, subfolder, 'README.md') - return extractTOCFromFile(indexFile, version, cb) - }) + return extractTOCFromFile(indexFile, release) } -const createDocsDataFile = (destination, docsInfo, cb) => { - // remove sourceFile and destinationFile keys from toc +function createDocsDataFile (destination, docsInfo) { const toDump = clone(docsInfo) + // remove sourceFile and destinationFile keys from toc Object.keys(toDump.toc).forEach((version) => { toDump.toc[version].forEach((entry, i) => { delete toDump.toc[version][i].sourceFile @@ -82,10 +91,10 @@ const createDocsDataFile = (destination, docsInfo, cb) => { }) }) - writeFile(destination, safeDump(toDump), 'utf8', cb) + return fs.writeFile(destination, safeDump(toDump), 'utf8') } -const processDocFiles = (docs, latestVersion, cb) => { +async function processDocFiles (docs, latestRelease) { // merge all docs into a single array adding the version as a key in every object const docsArray = Object.keys(docs).reduce((acc, version) => { const curr = docs[version] @@ -95,45 +104,44 @@ const processDocFiles = (docs, latestVersion, cb) => { })) }, []) - mapLimit( - docsArray, - cpus().length * 2, - (item, done) => { - const dir = dirname(item.destinationFile) - if (!existsSync(dir)) { - mkdirSync(dir) - } + for (const item of docsArray) { + const dir = dirname(item.destinationFile) + const hasDir = await fileExists(dir) + if (!hasDir) { + await fs.mkdir(dir) + } - readFile(item.sourceFile, 'utf8', (err, buffer) => { - if (err) return done(err) + const buffer = await fs.readFile(item.sourceFile, 'utf8') - let content = buffer.toString() - // removes doc header from github - content = content.replace(/

Fastify<\/h1>\n/, '') + let content = buffer.toString() - // remap links - content = remapLinks(content, item) + // removes doc header from github + content = content.replace(/

Fastify<\/h1>\n/, '') - // adds frontmatter - content = + // remap links + content = remapLinks(content, item) + + // adds frontmatter + content = `--- title: ${item.name} layout: docs_page.html path: ${item.link} version: ${item.version} -${item.version === 'latest' ? `canonical: "${item.link.replace(/latest/, latestVersion)}"` : ''} +fullVersion: ${item.fullVersion} +label: ${item.label} +docsPath: ${item.docsPath} +${item.version === 'latest' ? `canonical: "${item.link.replace(/latest/, latestRelease.label)}"` : ''} ${item.version === 'master' ? `github_url: https://github.com/fastify/fastify/blob/master/docs/${item.fileName}` : ''} --- ${content}` - writeFile(item.destinationFile, content, 'utf8', done) - }) - }, - cb - ) + await fs.writeFile(item.destinationFile, content, 'utf8') + console.log(`Created doc page ${item.destinationFile}`) + } } -const remapLinks = (content, item) => { +function remapLinks (content, item) { /* Links remapping rules: /https:\/\/github.com\/fastify\/fastify\/blob\/master\/docs/ -> /docs/[VERSION] @@ -158,22 +166,25 @@ const remapLinks = (content, item) => { .replace(docInternalLinkRx, (match, p1) => match.replace(p1, '')) } -const createVersionIndexFile = (latestVersion) => (version, cb) => { +async function createVersionIndexFile (release) { const content = `--- -title: Documentation - ${version} +title: Documentation - ${release.name} layout: docs_version_index.html -path: /docs/${version} -version: ${version} -${version === 'latest' ? `canonical: "/docs/${latestVersion}"` : ''} +path: /docs/${release.docsPath} +version: ${release.name} +fullVersion: ${release.fullVersion} +label: ${release.label} +docsPath: ${release.docsPath} +${release.name === 'latest' ? `canonical: "/docs/${release.label}"` : ''} github_url: "https://github.com/fastify/website/blob/master/src/website/layouts/docs_version_index.html" ---` - const dest = join(destFolder, 'content', 'docs', version, 'index.md') - console.log(`Creating ${dest}`) - writeFile(dest, content, 'utf8', cb) + const dest = join(destFolder, 'content', 'docs', release.docsPath, 'index.md') + await fs.writeFile(dest, content, 'utf8') + console.log(`Created doc index page ${dest}`) } -const createIndexFiles = (versions, cb) => { +async function createIndexFiles (releases) { // create docs index const docsIndexContent = `--- @@ -184,64 +195,13 @@ github_url: "https://github.com/fastify/website/blob/master/src/website/layouts/ ---` const dest = join(destFolder, 'content', 'docs', 'index.md') - console.log(`Creating ${dest}`) - writeFile(dest, docsIndexContent, 'utf8', (err) => { - if (err) throw err - - const latestVersion = versions[1] - - mapLimit( - versions, - cpus().length * 2, - createVersionIndexFile(latestVersion), - cb - ) - }) -} - -const createDocSources = () => new Promise((resolve, reject) => { - readdir(sourceFolder, (err, files) => { - if (err) return reject(err) - - const dirs = files.filter((file) => { - const stats = lstatSync(join(sourceFolder, file)) - return stats.isDirectory() - }) - - const data = {} - data.versions = dirs.sort(sortVersionTags).reverse() + await fs.writeFile(dest, docsIndexContent, 'utf8') + console.log(`Created docs index at ${dest}`) - mapLimit( - data.versions, - cpus().length * 2, - getTOCForVersion, - (err, toc) => { - if (err) return reject(err) - - const indexedToc = data.versions.reduce((acc, curr, i) => { - acc[curr] = toc[i] - return acc - }, {}) - - createDocsDataFile(join(destFolder, 'data', 'docs.yml'), { versions: data.versions, toc: indexedToc }, (err) => { - if (err) return reject(err) - - const latestVersion = data.versions[1] - - processDocFiles(indexedToc, latestVersion, (err) => { - if (err) return reject(err) - - createIndexFiles(data.versions, (err) => { - if (err) return reject(err) - - return resolve() - }) - }) - }) - } - ) - }) -}) + for (const release of releases) { + await createVersionIndexFile(release) + } +} const extractPlugins = (pluginContent) => { const lines = pluginContent @@ -270,56 +230,39 @@ const extractPlugins = (pluginContent) => { return plugins } -const extractEcosystemFromFile = (file, cb) => { - readFile(file, 'utf8', (err, data) => { - if (err) return cb(err) +async function extractEcosystemFromFile (file) { + const data = await fs.readFile(file, 'utf8') - const content = data.toString() - const corePluginsContent = content - .split('#### [Core](#core)\n')[1] - .split('#### [Community](#community)')[0] + const content = data.toString() + const corePluginsContent = content + .split('#### [Core](#core)\n')[1] + .split('#### [Community](#community)')[0] - const communityPluginsContent = content - .split('#### [Core](#core)\n')[1] - .split('#### [Community](#community)')[1] + const communityPluginsContent = content + .split('#### [Core](#core)\n')[1] + .split('#### [Community](#community)')[1] - const plugins = { - corePlugins: extractPlugins(corePluginsContent), - communityPlugins: extractPlugins(communityPluginsContent) - } - cb(null, { plugins }) - }) + const plugins = { + corePlugins: extractPlugins(corePluginsContent), + communityPlugins: extractPlugins(communityPluginsContent) + } + + return ({ plugins }) } -const createEcosystemDataFile = () => new Promise((resolve, reject) => { - const versionFolder = join(sourceFolder, 'master') +async function createEcosystemDataFile (masterReleaseDownloadPath) { + const versionFolder = join(sourceFolder, masterReleaseDownloadPath) const destination = join(destFolder, 'data', 'ecosystem.yml') - readdir(versionFolder, (err, files) => { - if (err) return reject(err) - - const subfolder = files.find(file => file.match(/^fastify-/)) - const ecosystemFile = join(versionFolder, subfolder, 'docs', 'Ecosystem.md') - - return extractEcosystemFromFile(ecosystemFile, (err, ecosystem) => { - if (err) return reject(err) - - writeFile(destination, safeDump(ecosystem), 'utf8', (err) => { - if (err) return reject(err) + const files = await fs.readdir(versionFolder) + const subfolder = files.find(file => file.match(/^fastify-/)) + const ecosystemFile = join(versionFolder, subfolder, 'docs', 'Ecosystem.md') - console.log(`Ecosystem file dumped in ${destination}`) + const ecosystem = await extractEcosystemFromFile(ecosystemFile) + await fs.writeFile(destination, safeDump(ecosystem), 'utf8') + console.log(`Ecosystem file written: ${destination}`) +} - return resolve() - }) - }) - }) +main().catch((err) => { + console.error(err) + process.exit(1) }) - -Promise.all([ - createDocSources(), - createEcosystemDataFile() -]) - .then(() => console.log('Releases processed correctly')) - .catch((err) => { - console.error('Releases processing failed', err) - process.exit(1) - }) diff --git a/src/scripts/utils.js b/src/scripts/utils.js new file mode 100644 index 0000000000..04d3bde103 --- /dev/null +++ b/src/scripts/utils.js @@ -0,0 +1,19 @@ +const { access } = require('fs') + +function fileExists (path) { + return new Promise((resolve, reject) => { + access(path, function (err) { + if (err) { + if (err.code === 'ENOENT') { + return resolve(false) + } + return reject(err) + } + return resolve(true) + }) + }) +} + +module.exports = { + fileExists +} diff --git a/src/scripts/utils/sortVersionTags.js b/src/scripts/utils/sortVersionTags.js deleted file mode 100644 index d7c092f121..0000000000 --- a/src/scripts/utils/sortVersionTags.js +++ /dev/null @@ -1,20 +0,0 @@ -const sortVersionTags = (a, b) => { - if (a === b) return 0 - if (a === 'master') return 1 - if (b === 'master') return -1 - - const [majorA, minorA, patchA] = a.substr(1).split('.').map(Number) - const [majorB, minorB, patchB] = b.substr(1).split('.').map(Number) - - if ( - majorA > majorB || - (majorA === majorB && minorA > minorB) || - (majorA === majorB && minorA === minorB && patchA > patchB) - ) { - return 1 - } - - return -1 -} - -module.exports = sortVersionTags diff --git a/src/website/layouts/docs_index.html b/src/website/layouts/docs_index.html index c3e0302150..4c894c26c1 100644 --- a/src/website/layouts/docs_index.html +++ b/src/website/layouts/docs_index.html @@ -23,15 +23,13 @@

Select version

    {% for v in data.docs.versions %} - {% if v !== 'latest' %} - {% set versionName = v %} - {% if v === data.docs.versions[1] %} - {% set versionName = versionName + ' (latest)' %} - {% endif %} -
  • - {{ versionName }} -
  • + {% set versionName = v %} + {% if v === 'latest' %} + {% set versionName = versionName + ' (' + data.docs.releases[0].label + ')' %} {% endif %} +
  • + {{ versionName }} +
  • {% endfor %}
diff --git a/src/website/layouts/docs_page.html b/src/website/layouts/docs_page.html index e11fd289cf..8fabac8f0d 100644 --- a/src/website/layouts/docs_page.html +++ b/src/website/layouts/docs_page.html @@ -5,7 +5,11 @@

- Documentation + {% set versionTitle = fullVersion %} + {% if version == 'latest' %} + {% set versionTitle = 'latest โ€” ' + data.docs.releases[0].fullVersion %} + {% endif %} + Documentation ({{ versionTitle }})

@@ -34,13 +38,7 @@

@@ -61,10 +59,7 @@

diff --git a/src/website/layouts/docs_version_index.html b/src/website/layouts/docs_version_index.html index 528cf0e397..033ffc8fb5 100644 --- a/src/website/layouts/docs_version_index.html +++ b/src/website/layouts/docs_version_index.html @@ -5,10 +5,10 @@

- {% set versionTitle = version %} - {% if version == 'latest' or version == data.docs.versions[1] %} - {% set versionTitle = data.docs.versions[1] + ' โ€” latest' %} - {% endif %} + {% set versionTitle = fullVersion %} + {% if version == 'latest' %} + {% set versionTitle = 'latest โ€” ' + data.docs.releases[0].fullVersion %} + {% endif %} Documentation ({{ versionTitle }})

@@ -27,10 +27,7 @@

@@ -43,7 +40,7 @@

Table of contents

    - {% for item in data.docs.toc[version] %} + {% for item in data.docs.toc[docsPath] %}
  • {{ item.name }}