diff --git a/package-lock.json b/package-lock.json index a455bcf061..b1b551f205 100644 --- a/package-lock.json +++ b/package-lock.json @@ -122,6 +122,7 @@ "pa11y-reporter-cli": "^1.0.1", "path-browserify": "^1.0.1", "plaiceholder": "^2.5.0", + "plop": "^3.1.2", "postcss": "^8.4.12", "postcss-cli": "9.1.0", "postcss-loader": "^5.3.0", @@ -13424,6 +13425,11 @@ "@types/send": "*" } }, + "node_modules/@types/fined": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/fined/-/fined-1.1.3.tgz", + "integrity": "sha512-CWYnSRnun3CGbt6taXeVo2lCbuaj4mchVJ4UF/BdU5TSuIn3AmS13pGMwCsBUoehGbhZrBrpNJZSZI5EVilXww==" + }, "node_modules/@types/formidable": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/@types/formidable/-/formidable-1.2.5.tgz", @@ -13566,6 +13572,15 @@ "@types/node": "*" } }, + "node_modules/@types/liftoff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/liftoff/-/liftoff-4.0.0.tgz", + "integrity": "sha512-Ny/PJkO6nxWAQnaet8q/oWz15lrfwvdvBpuY4treB0CSsBO1CG0fVuNLngR3m3bepQLd+E4c3Y3DlC2okpUvPw==", + "dependencies": { + "@types/fined": "*", + "@types/node": "*" + } + }, "node_modules/@types/lodash": { "version": "4.14.194", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.194.tgz", @@ -14843,7 +14858,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -14856,7 +14870,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true, "engines": { "node": ">=6" } @@ -15168,6 +15181,14 @@ "node": ">=8" } }, + "node_modules/array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -15205,6 +15226,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -19804,6 +19833,68 @@ "node": ">=0.10.0" } }, + "node_modules/del": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", + "integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==", + "dependencies": { + "globby": "^11.0.1", + "graceful-fs": "^4.2.4", + "is-glob": "^4.0.1", + "is-path-cwd": "^2.2.0", + "is-path-inside": "^3.0.2", + "p-map": "^4.0.0", + "rimraf": "^3.0.2", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/del/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/del/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/del/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "engines": { + "node": ">=8" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -19857,6 +19948,14 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/detect-indent": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", @@ -22070,6 +22169,17 @@ "node": ">=6" } }, + "node_modules/expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/expect": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz", @@ -23181,6 +23291,55 @@ "node": ">=8.6" } }, + "node_modules/findup-sync": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-5.0.0.tgz", + "integrity": "sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==", + "dependencies": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.3", + "micromatch": "^4.0.4", + "resolve-dir": "^1.0.1" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/findup-sync/node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/fined": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-2.0.0.tgz", + "integrity": "sha512-OFRzsL6ZMHz5s0JrsEr+TpdGNCtrVtnuG3x1yzGNiQHT0yaDnXAj8V/lWcpJVrnoDpcwXcASxAZYbuXda2Y82A==", + "dependencies": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^5.0.0", + "object.defaults": "^1.1.0", + "object.pick": "^1.3.0", + "parse-filepath": "^1.0.2" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/flagged-respawn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-2.0.0.tgz", + "integrity": "sha512-Gq/a6YCi8zexmGHMuJwahTGzXlAZAOsbCVKduWXC6TlLCjjFRlExMJc4GC2NYPYZ0r/brw9P7CpRgQmlPVeOoA==", + "engines": { + "node": ">= 10.13.0" + } + }, "node_modules/flat": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", @@ -23258,7 +23417,17 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", - "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", + "dependencies": { + "for-in": "^1.0.1" + }, "engines": { "node": ">=0.10.0" } @@ -26829,7 +26998,6 @@ "version": "4.7.7", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dev": true, "dependencies": { "minimist": "^1.2.5", "neo-async": "^2.6.0", @@ -26850,7 +27018,6 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -27274,6 +27441,17 @@ "react-is": "^16.7.0" } }, + "node_modules/homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", @@ -28680,6 +28858,14 @@ "node": ">=4" } }, + "node_modules/is-path-cwd": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "engines": { + "node": ">=6" + } + }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -28981,6 +29167,17 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" }, + "node_modules/isbinaryfile": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", + "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", + "engines": { + "node": ">= 8.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/gjtorikian/" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -35102,6 +35299,35 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/liftoff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-4.0.0.tgz", + "integrity": "sha512-rMGwYF8q7g2XhG2ulBmmJgWv25qBsqRbDn5gH0+wnuyeFt7QBJlHJmtg5qEdn4pN6WVAUMgXnIxytMFRX9c1aA==", + "dependencies": { + "extend": "^3.0.2", + "findup-sync": "^5.0.0", + "fined": "^2.0.0", + "flagged-respawn": "^2.0.0", + "is-plain-object": "^5.0.0", + "object.map": "^1.0.1", + "rechoir": "^0.8.0", + "resolve": "^1.20.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/liftoff/node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, "node_modules/light-my-request": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-4.12.0.tgz", @@ -35984,6 +36210,17 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -38454,6 +38691,75 @@ "node": ">=0.10.0" } }, + "node_modules/node-plop": { + "version": "0.31.1", + "resolved": "https://registry.npmjs.org/node-plop/-/node-plop-0.31.1.tgz", + "integrity": "sha512-qmXJJt3YETFt/e0dtMADVpvck6EvN01Jig086o+J3M6G++mWA7iJ3Pqz4m4kvlynh73Iz2/rcZzxq7xTiF+aIQ==", + "dependencies": { + "@types/inquirer": "^8.2.1", + "change-case": "^4.1.2", + "del": "^6.0.0", + "globby": "^13.1.1", + "handlebars": "^4.4.3", + "inquirer": "^8.2.2", + "isbinaryfile": "^4.0.8", + "lodash.get": "^4.4.2", + "lower-case": "^2.0.2", + "mkdirp": "^1.0.4", + "resolve": "^1.20.0", + "title-case": "^3.0.3", + "upper-case": "^2.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/node-plop/node_modules/@types/inquirer": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-3uT88kxg8lNzY8ay2ZjP44DKcRaTGztqeIvN2zHvhzIBH/uAPaL75aBtdNRKbA7xXoMbBt5kX0M00VKAnfOYlA==", + "dependencies": { + "@types/through": "*", + "rxjs": "^7.2.0" + } + }, + "node_modules/node-plop/node_modules/globby": { + "version": "13.1.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.4.tgz", + "integrity": "sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==", + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.11", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/node-plop/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/node-plop/node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/node-releases": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", @@ -39236,6 +39542,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", + "dependencies": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object.entries": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz", @@ -39296,11 +39616,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", + "dependencies": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", - "dev": true, "dependencies": { "isobject": "^3.0.1" }, @@ -39725,7 +40056,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dev": true, "dependencies": { "aggregate-error": "^3.0.0" }, @@ -40359,6 +40689,14 @@ "resolved": "https://registry.npmjs.org/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz", "integrity": "sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ==" }, + "node_modules/parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/parse-path": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-7.0.0.tgz", @@ -40897,6 +41235,181 @@ "semver-compare": "^1.0.0" } }, + "node_modules/plop": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/plop/-/plop-3.1.2.tgz", + "integrity": "sha512-39SOtQ3WlePXSNqKqAh/QlUSHXHO25iCnyCO3Qs/9UzPVmwVledRTDGvPd2csh+JnHVXz4c63F6fBwdqZHgbUg==", + "dependencies": { + "@types/liftoff": "^4.0.0", + "chalk": "^5.0.1", + "interpret": "^2.2.0", + "liftoff": "^4.0.0", + "minimist": "^1.2.6", + "node-plop": "^0.31.1", + "ora": "^6.0.1", + "v8flags": "^4.0.0" + }, + "bin": { + "plop": "bin/plop.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/plop/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/plop/node_modules/chalk": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", + "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/plop/node_modules/cli-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "dependencies": { + "restore-cursor": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/plop/node_modules/interpret": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/plop/node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/plop/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/plop/node_modules/log-symbols": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz", + "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==", + "dependencies": { + "chalk": "^5.0.0", + "is-unicode-supported": "^1.1.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/plop/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/plop/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/plop/node_modules/ora": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-6.3.1.tgz", + "integrity": "sha512-ERAyNnZOfqM+Ao3RAvIXkYh5joP220yf59gVe2X/cI6SiCxIdi4c9HZKZD8R6q/RDXEje1THBju6iExiSsgJaQ==", + "dependencies": { + "chalk": "^5.0.0", + "cli-cursor": "^4.0.0", + "cli-spinners": "^2.6.1", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^1.1.0", + "log-symbols": "^5.1.0", + "stdin-discarder": "^0.1.0", + "strip-ansi": "^7.0.1", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/plop/node_modules/restore-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/plop/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/png-async": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/png-async/-/png-async-0.9.4.tgz", @@ -44455,6 +44968,51 @@ "node": ">=8" } }, + "node_modules/resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "dependencies": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-dir/node_modules/global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-dir/node_modules/global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "dependencies": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-dir/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, "node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -46439,6 +46997,66 @@ "node": ">= 0.8" } }, + "node_modules/stdin-discarder": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.1.0.tgz", + "integrity": "sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==", + "dependencies": { + "bl": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stdin-discarder/node_modules/bl": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", + "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", + "dependencies": { + "buffer": "^6.0.3", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/stdin-discarder/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/stdin-discarder/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/stop-iteration-iterator": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", @@ -49373,7 +49991,6 @@ "version": "3.17.4", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "dev": true, "optional": true, "bin": { "uglifyjs": "bin/uglifyjs" @@ -50167,6 +50784,14 @@ "node": ">= 8" } }, + "node_modules/v8flags": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-4.0.0.tgz", + "integrity": "sha512-83N0OkTbn6gOjJ2awNuzuK4czeGxwEwBoTqlhBZhnp8o0IJ72mXRQKphj/azwRf3acbDJZYZhbOPEJHd884ELg==", + "engines": { + "node": ">= 10.13.0" + } + }, "node_modules/valid-url": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz", @@ -50846,8 +51471,7 @@ "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" }, "node_modules/wrap-ansi": { "version": "7.0.0", @@ -61401,6 +62025,11 @@ "@types/send": "*" } }, + "@types/fined": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/fined/-/fined-1.1.3.tgz", + "integrity": "sha512-CWYnSRnun3CGbt6taXeVo2lCbuaj4mchVJ4UF/BdU5TSuIn3AmS13pGMwCsBUoehGbhZrBrpNJZSZI5EVilXww==" + }, "@types/formidable": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/@types/formidable/-/formidable-1.2.5.tgz", @@ -61543,6 +62172,15 @@ "@types/node": "*" } }, + "@types/liftoff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/liftoff/-/liftoff-4.0.0.tgz", + "integrity": "sha512-Ny/PJkO6nxWAQnaet8q/oWz15lrfwvdvBpuY4treB0CSsBO1CG0fVuNLngR3m3bepQLd+E4c3Y3DlC2okpUvPw==", + "requires": { + "@types/fined": "*", + "@types/node": "*" + } + }, "@types/lodash": { "version": "4.14.194", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.194.tgz", @@ -62606,7 +63244,6 @@ "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" @@ -62615,8 +63252,7 @@ "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 + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" } } }, @@ -62848,6 +63484,11 @@ "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", "dev": true }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==" + }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -62876,6 +63517,11 @@ "is-string": "^1.0.7" } }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==" + }, "array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -66416,6 +67062,49 @@ } } }, + "del": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", + "integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==", + "requires": { + "globby": "^11.0.1", + "graceful-fs": "^4.2.4", + "is-glob": "^4.0.1", + "is-path-cwd": "^2.2.0", + "is-path-inside": "^3.0.2", + "p-map": "^4.0.0", + "rimraf": "^3.0.2", + "slash": "^3.0.0" + }, + "dependencies": { + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + } + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -66453,6 +67142,11 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==" + }, "detect-indent": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", @@ -68154,6 +68848,14 @@ "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, "expect": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz", @@ -69059,6 +69761,45 @@ } } }, + "findup-sync": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-5.0.0.tgz", + "integrity": "sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==", + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.3", + "micromatch": "^4.0.4", + "resolve-dir": "^1.0.1" + }, + "dependencies": { + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + } + } + }, + "fined": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-2.0.0.tgz", + "integrity": "sha512-OFRzsL6ZMHz5s0JrsEr+TpdGNCtrVtnuG3x1yzGNiQHT0yaDnXAj8V/lWcpJVrnoDpcwXcASxAZYbuXda2Y82A==", + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^5.0.0", + "object.defaults": "^1.1.0", + "object.pick": "^1.3.0", + "parse-filepath": "^1.0.2" + } + }, + "flagged-respawn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-2.0.0.tgz", + "integrity": "sha512-Gq/a6YCi8zexmGHMuJwahTGzXlAZAOsbCVKduWXC6TlLCjjFRlExMJc4GC2NYPYZ0r/brw9P7CpRgQmlPVeOoA==" + }, "flat": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", @@ -69111,8 +69852,15 @@ "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", - "dev": true + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==" + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", + "requires": { + "for-in": "^1.0.1" + } }, "foreachasync": { "version": "3.0.0", @@ -71703,7 +72451,6 @@ "version": "4.7.7", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dev": true, "requires": { "minimist": "^1.2.5", "neo-async": "^2.6.0", @@ -71715,8 +72462,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==" } } }, @@ -72027,6 +72773,14 @@ "react-is": "^16.7.0" } }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "requires": { + "parse-passwd": "^1.0.0" + } + }, "hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", @@ -73034,6 +73788,11 @@ "symbol-observable": "^1.1.0" } }, + "is-path-cwd": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==" + }, "is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -73251,6 +74010,11 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" }, + "isbinaryfile": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", + "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==" + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -77975,6 +78739,31 @@ } } }, + "liftoff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-4.0.0.tgz", + "integrity": "sha512-rMGwYF8q7g2XhG2ulBmmJgWv25qBsqRbDn5gH0+wnuyeFt7QBJlHJmtg5qEdn4pN6WVAUMgXnIxytMFRX9c1aA==", + "requires": { + "extend": "^3.0.2", + "findup-sync": "^5.0.0", + "fined": "^2.0.0", + "flagged-respawn": "^2.0.0", + "is-plain-object": "^5.0.0", + "object.map": "^1.0.1", + "rechoir": "^0.8.0", + "resolve": "^1.20.0" + }, + "dependencies": { + "rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "requires": { + "resolve": "^1.20.0" + } + } + } + }, "light-my-request": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-4.12.0.tgz", @@ -78695,6 +79484,14 @@ } } }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "requires": { + "kind-of": "^6.0.2" + } + }, "makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -80440,6 +81237,62 @@ "resolved": "https://registry.npmjs.org/node-object-hash/-/node-object-hash-2.3.10.tgz", "integrity": "sha512-jY5dPJzw6NHd/KPSfPKJ+IHoFS81/tJ43r34ZeNMXGzCOM8jwQDCD12HYayKIB6MuznrnqIYy2e891NA2g0ibA==" }, + "node-plop": { + "version": "0.31.1", + "resolved": "https://registry.npmjs.org/node-plop/-/node-plop-0.31.1.tgz", + "integrity": "sha512-qmXJJt3YETFt/e0dtMADVpvck6EvN01Jig086o+J3M6G++mWA7iJ3Pqz4m4kvlynh73Iz2/rcZzxq7xTiF+aIQ==", + "requires": { + "@types/inquirer": "^8.2.1", + "change-case": "^4.1.2", + "del": "^6.0.0", + "globby": "^13.1.1", + "handlebars": "^4.4.3", + "inquirer": "^8.2.2", + "isbinaryfile": "^4.0.8", + "lodash.get": "^4.4.2", + "lower-case": "^2.0.2", + "mkdirp": "^1.0.4", + "resolve": "^1.20.0", + "title-case": "^3.0.3", + "upper-case": "^2.0.2" + }, + "dependencies": { + "@types/inquirer": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-3uT88kxg8lNzY8ay2ZjP44DKcRaTGztqeIvN2zHvhzIBH/uAPaL75aBtdNRKbA7xXoMbBt5kX0M00VKAnfOYlA==", + "requires": { + "@types/through": "*", + "rxjs": "^7.2.0" + } + }, + "globby": { + "version": "13.1.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.4.tgz", + "integrity": "sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==", + "requires": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.11", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^4.0.0" + } + }, + "rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "requires": { + "tslib": "^2.1.0" + } + }, + "slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==" + } + } + }, "node-releases": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", @@ -81054,6 +81907,17 @@ "object-keys": "^1.1.1" } }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, "object.entries": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz", @@ -81096,11 +81960,19 @@ "es-abstract": "^1.20.4" } }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", - "dev": true, "requires": { "isobject": "^3.0.1" } @@ -81405,7 +82277,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dev": true, "requires": { "aggregate-error": "^3.0.0" } @@ -81886,6 +82757,11 @@ "resolved": "https://registry.npmjs.org/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz", "integrity": "sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ==" }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==" + }, "parse-path": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-7.0.0.tgz", @@ -82290,6 +83166,111 @@ "semver-compare": "^1.0.0" } }, + "plop": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/plop/-/plop-3.1.2.tgz", + "integrity": "sha512-39SOtQ3WlePXSNqKqAh/QlUSHXHO25iCnyCO3Qs/9UzPVmwVledRTDGvPd2csh+JnHVXz4c63F6fBwdqZHgbUg==", + "requires": { + "@types/liftoff": "^4.0.0", + "chalk": "^5.0.1", + "interpret": "^2.2.0", + "liftoff": "^4.0.0", + "minimist": "^1.2.6", + "node-plop": "^0.31.1", + "ora": "^6.0.1", + "v8flags": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==" + }, + "chalk": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", + "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==" + }, + "cli-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "requires": { + "restore-cursor": "^4.0.0" + } + }, + "interpret": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==" + }, + "is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==" + }, + "is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==" + }, + "log-symbols": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz", + "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==", + "requires": { + "chalk": "^5.0.0", + "is-unicode-supported": "^1.1.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "ora": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-6.3.1.tgz", + "integrity": "sha512-ERAyNnZOfqM+Ao3RAvIXkYh5joP220yf59gVe2X/cI6SiCxIdi4c9HZKZD8R6q/RDXEje1THBju6iExiSsgJaQ==", + "requires": { + "chalk": "^5.0.0", + "cli-cursor": "^4.0.0", + "cli-spinners": "^2.6.1", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^1.1.0", + "log-symbols": "^5.1.0", + "stdin-discarder": "^0.1.0", + "strip-ansi": "^7.0.1", + "wcwidth": "^1.0.1" + } + }, + "restore-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "requires": { + "ansi-regex": "^6.0.1" + } + } + } + }, "png-async": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/png-async/-/png-async-0.9.4.tgz", @@ -84837,6 +85818,44 @@ "resolve-from": "^5.0.0" } }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "dependencies": { + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + } + } + }, "resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -86379,6 +87398,45 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" }, + "stdin-discarder": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.1.0.tgz", + "integrity": "sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==", + "requires": { + "bl": "^5.0.0" + }, + "dependencies": { + "bl": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", + "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", + "requires": { + "buffer": "^6.0.3", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "stop-iteration-iterator": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", @@ -88564,7 +89622,6 @@ "version": "3.17.4", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "dev": true, "optional": true }, "uid-safe": { @@ -89147,6 +90204,11 @@ } } }, + "v8flags": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-4.0.0.tgz", + "integrity": "sha512-83N0OkTbn6gOjJ2awNuzuK4czeGxwEwBoTqlhBZhnp8o0IJ72mXRQKphj/azwRf3acbDJZYZhbOPEJHd884ELg==" + }, "valid-url": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz", @@ -89676,8 +90738,7 @@ "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" }, "wrap-ansi": { "version": "7.0.0", diff --git a/packages/__vital__/package.json b/packages/__vital__/package.json index 69d6eeaace..a6ad246571 100644 --- a/packages/__vital__/package.json +++ b/packages/__vital__/package.json @@ -34,6 +34,7 @@ "@bodiless/cli": "^1.0.0-rc.38", "@bodiless/data": "^1.0.0-rc.38", "@bodiless/fclasses": "^1.0.0-rc.38", + "@bodiless/hydration": "^1.0.0-rc.38", "@bodiless/i18n": "^1.0.0-rc.38", "@bodiless/vital-accordion": "^1.0.0-rc.38", "@bodiless/vital-buttons": "^1.0.0-rc.38", diff --git a/packages/bodiless-scaffold/CHANGELOG.md b/packages/bodiless-scaffold/CHANGELOG.md new file mode 100644 index 0000000000..767840ada8 --- /dev/null +++ b/packages/bodiless-scaffold/CHANGELOG.md @@ -0,0 +1,5 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + diff --git a/packages/bodiless-scaffold/LICENSE b/packages/bodiless-scaffold/LICENSE new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/packages/bodiless-scaffold/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/bodiless-scaffold/README.md b/packages/bodiless-scaffold/README.md new file mode 100644 index 0000000000..f6793a2173 --- /dev/null +++ b/packages/bodiless-scaffold/README.md @@ -0,0 +1,2 @@ +# `@bodiless/scaffold` + diff --git a/packages/bodiless-scaffold/bin/scaffold.js b/packages/bodiless-scaffold/bin/scaffold.js new file mode 100755 index 0000000000..e29a93ab2e --- /dev/null +++ b/packages/bodiless-scaffold/bin/scaffold.js @@ -0,0 +1,6 @@ +#!/usr/bin/env node + +// eslint-disable-next-line import/extensions +import { execute } from '../lib/index.js'; + +execute({}); diff --git a/packages/bodiless-scaffold/package.json b/packages/bodiless-scaffold/package.json new file mode 100644 index 0000000000..42399c0192 --- /dev/null +++ b/packages/bodiless-scaffold/package.json @@ -0,0 +1,43 @@ +{ + "name": "@bodiless/vital-scaffold", + "version": "1.0.0-rc.37", + "description": "A scaffold tool to generate Bodiless-JS components and packages", + "author": "Dewen Li ", + "homepage": "", + "license": "Apache-2.0", + "main": "./lib/index.js", + "type": "module", + "bin": { + "scaffold": "./bin/scaffold.js" + }, + "directories": { + "lib": "lib", + "test": "__tests__", + "bin": "bin" + }, + "files": [ + "/bin", + "/lib" + ], + "repository": { + "type": "git", + "url": "https://github.com/johnsonandjohnson/bodiless-js.git" + }, + "publishConfig": { + "access": "public" + }, + "scripts": { + "scaffold": "./bin/scaffold.js", + "build": "run-p copy build:lib", + "copy": "copyfiles -u 1 \"./src/templates/**/*\" \"./lib/\"", + "build:lib": "tsc --version && tsc -p ./tsconfig.json", + "build:watch": "npm run build -- --watch" + }, + "dependencies": { + "copyfiles": "^2.1.1", + "plop": "^3.1.2" + }, + "devDependencies": { + "@types/node": "^16" + } +} diff --git a/packages/bodiless-scaffold/src/config/component.ts b/packages/bodiless-scaffold/src/config/component.ts new file mode 100644 index 0000000000..0ebbd2c879 --- /dev/null +++ b/packages/bodiless-scaffold/src/config/component.ts @@ -0,0 +1,20 @@ +/** + * Copyright © 2023 Johnson & Johnson + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { NodePlopAPI } from 'plop'; +import config from './component/index.js'; + +export default (plop: NodePlopAPI) => { + plop.setGenerator('component', config); +}; diff --git a/packages/bodiless-scaffold/src/config/component/actions.ts b/packages/bodiless-scaffold/src/config/component/actions.ts new file mode 100644 index 0000000000..c74bb09265 --- /dev/null +++ b/packages/bodiless-scaffold/src/config/component/actions.ts @@ -0,0 +1,108 @@ +/** + * Copyright © 2023 Johnson & Johnson + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { Actions } from 'node-plop'; +import fs from 'fs'; + +const defaultActions: Actions = [ + { + type: 'add', + path: '{{destinationpath}}/components/{{properCase componentName}}/index.ts', + templateFile: '../templates/component/index.ts.hbs', + }, + { + type: 'add', + path: '{{destinationpath}}/components/{{properCase componentName}}/tokens/index.ts', + templateFile: '../templates/component/tokens/index.ts.hbs', + }, + { + type: 'add', + path: '{{destinationpath}}/components/{{properCase componentName}}/tokens/{{camelCase libraryName}}{{properCase componentName}}.ts', + templateFile: '../templates/component/tokens/libraryComponent.ts.hbs', + }, + { + type: 'add', + path: '{{destinationpath}}/components/{{properCase componentName}}/__tests__/{{properCase componentName}}.test.tsx', + templateFile: '../templates/component/tests/Component.test.tsx.hbs', + }, + { + type: 'add', + path: '{{destinationpath}}/components/{{properCase componentName}}' + + '/index.bl-edit.ts', + templateFile: '../templates/component/index.bl-edit.ts.hbs', + }, + { + type: 'add', + path: '{{destinationpath}}/components/{{properCase componentName}}' + + '/index.static.ts', + templateFile: '../templates/component/index.static.ts.hbs', + } +]; + +const actions: Actions = (data) => { + const actionsToRun = [...defaultActions]; + if (!data) return actionsToRun; + const { + shadow = false, + destinationpath, + sourcePackageName, + } = data; + + let rootType = 'add'; + if (fs.existsSync(`${destinationpath}/index.ts`)) { + rootType = 'append'; + } + actionsToRun.push({ + type: rootType, + path: '{{destinationpath}}/index.ts', + templateFile: '../templates/component/index.root.ts.hbs', + }); + + let baseType = 'add'; + if (fs.existsSync(`${destinationpath}/base.ts`)) { + baseType = 'append'; + } + actionsToRun.push({ + type: baseType, + path: '{{destinationpath}}/base.ts', + templateFile: '../templates/component/index.base.ts.hbs', + }); + + if (!sourcePackageName) { + actionsToRun.push( + { + type: 'add', + path: '{{destinationpath}}/components/{{properCase componentName}}/{{properCase componentName}}Clean.tsx', + templateFile: '../templates/component/Clean.tsx.hbs', + }, + { + type: 'add', + path: '{{destinationpath}}/components/{{properCase componentName}}/types.ts', + templateFile: '../templates/component/types.ts.hbs', + }, + ); + } + if (shadow) { + actionsToRun.push({ + type: 'add', + path: '{{destinationpath}}/shadow/{{sourcePackageName}}' + + '/{{properCase componentName}}.ts', + templateFile: '../templates/shadow/component.ts.hbs', + }); + } + + return actionsToRun; +}; + +export default actions; diff --git a/packages/bodiless-scaffold/src/config/component/index.ts b/packages/bodiless-scaffold/src/config/component/index.ts new file mode 100644 index 0000000000..8cf6c9cd8a --- /dev/null +++ b/packages/bodiless-scaffold/src/config/component/index.ts @@ -0,0 +1,25 @@ +/** + * Copyright © 2023 Johnson & Johnson + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { PlopGeneratorConfig } from 'plop'; +import prompts from './prompts.js'; +import actions from './actions.js'; + +const componentGeneratorConfig: PlopGeneratorConfig = { + description: 'Component Scaffold', + prompts, + actions, +}; + +export default componentGeneratorConfig; diff --git a/packages/bodiless-scaffold/src/config/component/prompts.ts b/packages/bodiless-scaffold/src/config/component/prompts.ts new file mode 100644 index 0000000000..713818b733 --- /dev/null +++ b/packages/bodiless-scaffold/src/config/component/prompts.ts @@ -0,0 +1,75 @@ +/** + * Copyright © 2023 Johnson & Johnson + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import type { Prompts } from 'node-plop'; +import { + pathValidator, + componentNameValidator, + libraryNameValidator, + packageNameValidator, +} from './validator.js'; + +const prompts: Prompts = [ + { + type: 'input', + name: 'destinationpath', + message: `Path to directory where component should be created [Required], +e.g. "./", "./src/", "/absolute/path/to/[package name]/src" etc. Default to current directory. +> `, + validate: pathValidator, + default: './', + }, + { + type: 'input', + name: 'componentName', + message: 'Component name [Required]', + validate: componentNameValidator, + }, + { + type: 'input', + name: 'libraryName', + message: 'Library name (eg. myBrand) [Required]', + validate: libraryNameValidator, + }, + { + type: 'input', + name: 'sourcePackageName', + message: 'Upstream package to extend (e.g. `@bodiless/vital-card`). Omit if not extending.', + validate: packageNameValidator, + }, + { + type: 'input', + name: 'sourceLibraryName', + message: 'Upstream library name (eg `vital`) - default `vital`', + validate: libraryNameValidator, + when: ({ sourcePackageName }) => !!sourcePackageName, + default: 'vital', + }, + { + type: 'confirm', + name: 'shadow', + message: 'Shadow the upstream token collection? (otherwise just extend it) - default Y', + default: true, + when: ({ sourcePackageName }) => !!sourcePackageName, + }, + { + type: 'confirm', + name: 'static', + message: `Is the component is always static and never hydrated? +(otherwise both static and dynamic versions will be created) - default N`, + default: false, + }, +]; + +export default prompts; diff --git a/packages/bodiless-scaffold/src/config/component/validator.ts b/packages/bodiless-scaffold/src/config/component/validator.ts new file mode 100644 index 0000000000..089df6ca22 --- /dev/null +++ b/packages/bodiless-scaffold/src/config/component/validator.ts @@ -0,0 +1,69 @@ +/** + * Copyright © 2023 Johnson & Johnson + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import fs from 'fs'; +import path from 'path'; + +// ref: Inquirer.Question.validate +export type PromptValidator = ( + input: any, + answers?: any, +) => (boolean | string | Promise); + +export const pathValidator: PromptValidator = inputPath => { + const resolvedPath = path.resolve(process.cwd(), inputPath); + if ( + fs.existsSync(resolvedPath) + && !fs.lstatSync(resolvedPath).isDirectory() + ) { + return 'Please enter a valid path.'; + } + try { + fs.accessSync(resolvedPath, fs.constants.W_OK); + } catch (err) { + return `Path (${resolvedPath}) is not writable.`; + } + return true; +}; + +export const componentNameValidator: PromptValidator = ( + input, answers +) => { + if (input.match(/[^_a-zA-Z0-9]/)) { + return 'Component/Library name must be underscore or alphanumeric.'; + } + if (answers && answers.destinationpath) { + const componentPath = path.join(answers.destinationpath, 'components', input); + if (fs.existsSync(componentPath)) { + return 'Component directory already exists.'; + } + } + return true; +}; + +export const libraryNameValidator: PromptValidator = ( + input +) => { + if (input.match(/[^_a-zA-Z0-9]/)) { + return 'Component/Library name must be underscore or alphanumeric.'; + } + return true; +}; + +export const packageNameValidator: PromptValidator = input => { + if (input.match(/[^_@/\-a-zA-Z0-9]/)) { + return 'Invalid package name'; + } + return true; +}; diff --git a/packages/bodiless-scaffold/src/config/package/.gitkeep b/packages/bodiless-scaffold/src/config/package/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/bodiless-scaffold/src/config/site/.gitkeep b/packages/bodiless-scaffold/src/config/site/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/bodiless-scaffold/src/index.ts b/packages/bodiless-scaffold/src/index.ts new file mode 100644 index 0000000000..57a38f54e0 --- /dev/null +++ b/packages/bodiless-scaffold/src/index.ts @@ -0,0 +1,53 @@ +/** + * Copyright © 2023 Johnson & Johnson + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Plop, run } from 'plop'; +import { join, dirname } from 'path'; +import { fileURLToPath } from 'url'; + +// Validate scaffold types. Only allow "component" for now. Extend this as needed. +const validScaffoldTypes = ['component']; +const scaffoldType = process.argv.slice(2).shift() || 'component'; +if (!validScaffoldTypes.includes(scaffoldType)) { + console.error(` +Error: Invalid scaffold type: ${scaffoldType}. +Valid types are: "${validScaffoldTypes.join(', ')}"\n`); + process.exit(1); +} + +const dir = dirname(fileURLToPath(import.meta.url)); +const cwd = process.cwd(); +const configPath = join(dir, `config/${scaffoldType}.js`); +const preload = process.env.PLOP_PRELOAD || ''; +const completion = process.env.PLOP_COMPLETION || ''; + +const execute = (env: any) => { + Plop.prepare( + { + cwd, + configPath, + preload: preload || [], + completion, + }, + (env) => { + const options = { + ...env, + dest: cwd, + }; + run(options, undefined, true); + }, + ); +}; + +export { execute }; diff --git a/packages/bodiless-scaffold/src/templates/component/Clean.tsx.hbs b/packages/bodiless-scaffold/src/templates/component/Clean.tsx.hbs new file mode 100644 index 0000000000..e48dbdb92d --- /dev/null +++ b/packages/bodiless-scaffold/src/templates/component/Clean.tsx.hbs @@ -0,0 +1,40 @@ +import React, { FC, Fragment } from 'react'; +import { asVitalTokenSpec } from '@bodiless/vital-elements'; +import { designable, Div } from '@bodiless/fclasses'; +import type { DesignableComponentsProps } from '@bodiless/fclasses'; +import type { {{properCase componentName}}Components } from './types'; + +type {{properCase componentName}}BaseProps = DesignableComponentsProps<{{properCase componentName}}Components>; + +/** + * The starting components for each slot. + */ +const {{camelCase componentName}}Components: {{properCase componentName}}Components = { + Wrapper: Div, + Slot1Wrapper: Div, + Slot1: Fragment, + Slot2Wrapper: Div, + Slot2: Fragment, +}; + +const {{properCase componentName}}Base: FC<{{properCase componentName}}BaseProps> = ({ components: C, ...rest }) => ( + + + + + + + + +); + +const {{properCase componentName}}Clean = designable({{camelCase componentName}}Components, '{{properCase componentName}}')({{properCase componentName}}Base); + +/** + * A token creator that respects the {{properCase componentName}} slots. + * + * @category Token Collection + */ +export const as{{properCase componentName}}Token = asVitalTokenSpec<{{properCase componentName}}Components>(); + +export default {{properCase componentName}}Clean; diff --git a/packages/bodiless-scaffold/src/templates/component/index.base.ts.hbs b/packages/bodiless-scaffold/src/templates/component/index.base.ts.hbs new file mode 100644 index 0000000000..e06c16f1bd --- /dev/null +++ b/packages/bodiless-scaffold/src/templates/component/index.base.ts.hbs @@ -0,0 +1 @@ +export { default as {{camelCase libraryName}}{{properCase componentName}}Base } from './components/{{properCase componentName}}/tokens/{{camelCase libraryName}}{{properCase componentName}}'; diff --git a/packages/bodiless-scaffold/src/templates/component/index.bl-edit.ts.hbs b/packages/bodiless-scaffold/src/templates/component/index.bl-edit.ts.hbs new file mode 100644 index 0000000000..f13a6ce285 --- /dev/null +++ b/packages/bodiless-scaffold/src/templates/component/index.bl-edit.ts.hbs @@ -0,0 +1,34 @@ +{{#unless sourceLibraryName}} +import type { ComponentType } from 'react'; +import { withoutHydration, /* withoutHydrationInline */ } from '@bodiless/hydration'; +import type { {{properCase componentName}}Props } from './types'; +import {{properCase componentName}}{{#unless static}}Clean{{/unless}} from './{{properCase componentName}}Clean'; + +/** + * This clean component is always static. That means it is never hydrated + * in the browser, and must not contain any client-side interactivity. + {{#unless static}} + * + * If anything inserted into a component slot (or any children) requires + * interactivity, Use {{properCase componentName}}Clean instead. + {{/unless}} + */ +const {{properCase componentName}}{{#if static}}Clean{{else}}Static{{/if}}: ComponentType<{{properCase componentName}}Props> = withoutHydration()( + {{properCase componentName}}{{#unless static}}Clean{{/unless}} +); +// @TODO Use withoutHydrationInline if your component renders inline +// const {{properCase componentName}}{{#if static}}Clean{{else}}Static{{/if}}: ComponentType<{{properCase componentName}}Props> = withoutHydrationInline()( +// {{properCase componentName}}{{#unless static}}Clean{{/unless}} +// ); + +export { + {{properCase componentName}}Clean, + {{#unless static}} + {{properCase componentName}}Static, + {{/unless}} +}; +{{/unless}} +export { default as {{camelCase libraryName}}{{properCase componentName}} } from './tokens'; +{{#unless static}} +export { default as {{camelCase libraryName}}{{properCase componentName}}Static } from './tokens'; +{{/unless}} diff --git a/packages/bodiless-scaffold/src/templates/component/index.root.ts.hbs b/packages/bodiless-scaffold/src/templates/component/index.root.ts.hbs new file mode 100644 index 0000000000..c64b14f354 --- /dev/null +++ b/packages/bodiless-scaffold/src/templates/component/index.root.ts.hbs @@ -0,0 +1 @@ +export * from './components/{{properCase componentName}}'; diff --git a/packages/bodiless-scaffold/src/templates/component/index.static.ts.hbs b/packages/bodiless-scaffold/src/templates/component/index.static.ts.hbs new file mode 100644 index 0000000000..da33afbf49 --- /dev/null +++ b/packages/bodiless-scaffold/src/templates/component/index.static.ts.hbs @@ -0,0 +1,22 @@ +import { + staticTokenCollection, + {{#unless sourcePackageName}} + StaticBlock as StaticComponent, + // Use `StaticInline` if your component renders inline elements. + // StaticInline as StaticComponent, + {{/unless}} +} from '@bodiless/hydration'; + +{{#if static}} +export const {{camelCase libraryName}}{{properCase componentName}} = staticTokenCollection; +{{#unless sourcePackageName }} +export const {{properCase componentName}}Clean = StaticComponent; +{{/unless}} +{{else}} +export { default as {{camelCase libraryName}}{{properCase componentName}} } from './tokens'; +export const {{camelCase libraryName}}{{properCase componentName}}Static = staticTokenCollection; +{{#unless sourcePackageName }} +export { default as {{properCase componentName}}Clean } from './{{properCase componentName}}Clean'; +export const {{properCase componentName}}Static = StaticComponent; +{{/unless}} +{{/if}} diff --git a/packages/bodiless-scaffold/src/templates/component/index.ts.hbs b/packages/bodiless-scaffold/src/templates/component/index.ts.hbs new file mode 100644 index 0000000000..be2c646a05 --- /dev/null +++ b/packages/bodiless-scaffold/src/templates/component/index.ts.hbs @@ -0,0 +1,5 @@ +export * from './index.bl-edit'; +{{#unless sourcePackageName}} +export * from './types'; +export { as{{properCase componentName}}Token } from './{{properCase componentName}}Clean'; +{{/unless}} diff --git a/packages/bodiless-scaffold/src/templates/component/tests/Component.test.tsx.hbs b/packages/bodiless-scaffold/src/templates/component/tests/Component.test.tsx.hbs new file mode 100644 index 0000000000..59f049cbf3 --- /dev/null +++ b/packages/bodiless-scaffold/src/templates/component/tests/Component.test.tsx.hbs @@ -0,0 +1,11 @@ +import React from 'react'; +import { testTokens } from '@bodiless/vital-elements'; +{{#if sourcePackageName}} +import { {{properCase componentName}}Clean } from '{{sourcePackageName}}'; +import { {{camelCase libraryName}}{{properCase componentName}} } from '..'; +{{else}} +import { {{properCase componentName}}Clean, {{camelCase libraryName}}{{properCase componentName}} } from '..'; +{{/if}} + +// eslint-disable-next-line jest/valid-describe +describe('{{properCase componentName}} Tokens', testTokens({{properCase componentName}}Clean, {{camelCase libraryName}}{{properCase componentName}})); diff --git a/packages/bodiless-scaffold/src/templates/component/tokens/index.ts.hbs b/packages/bodiless-scaffold/src/templates/component/tokens/index.ts.hbs new file mode 100644 index 0000000000..fca7f16f93 --- /dev/null +++ b/packages/bodiless-scaffold/src/templates/component/tokens/index.ts.hbs @@ -0,0 +1,3 @@ +import tokens from './{{camelCase libraryName}}{{properCase componentName}}'; + +export default tokens; diff --git a/packages/bodiless-scaffold/src/templates/component/tokens/libraryComponent.ts.hbs b/packages/bodiless-scaffold/src/templates/component/tokens/libraryComponent.ts.hbs new file mode 100644 index 0000000000..534b9aed3a --- /dev/null +++ b/packages/bodiless-scaffold/src/templates/component/tokens/libraryComponent.ts.hbs @@ -0,0 +1,169 @@ +{{#if sourcePackageName}} +import { {{camelCase sourceLibraryName}}{{properCase componentName}}Base } from '{{sourcePackageName}}/lib/base'; +import { as{{properCase componentName}}Token } from '{{sourcePackageName}}'; + +const Default = as{{properCase componentName}}Token({ + ...{{camelCase sourceLibraryName}}{{properCase componentName}}Base.Default, + // Core: { + // // Essential behavior or styling added by this token which are very unlikely to be + // // overridden. + // ...{{camelCase sourceLibraryName}}{{properCase componentName}}Base.Default.Core, + // // ... + // }, + // Components: { + // // When the design elements of a complex component are themselves complex components, + // // it is generally best practice to define tokens which apply to the sub-components as a + // // whole, and apply them in the Components domain of the enclosing component. + // ...{{camelCase sourceLibraryName}}{{properCase componentName}}Base.Default.Components, + // // ... + // }, + // A11y: { + // // Behavior or props related to accessibility; e.g. an `aria-labeledby' prop. + // ...{{camelCase sourceLibraryName}}{{properCase componentName}}Base.Default.A11y, + // // ... + // }, + // Analytics: { + // // Behavior or props related to analytics; e.g., pushing events to a data layer. + // ...{{camelCase sourceLibraryName}}{{properCase componentName}}Base.Default.Analytics, + // // ... + // }, + // SEO: { + // // Behavior or props related to search engine optimization, e.g., adding schema.org markup. + // ...{{camelCase sourceLibraryName}}{{properCase componentName}}Base.Default.SEO, + // // ... + // }, + // Layout: { + // // Tokens which define the visual structure of a component, and are thus unlikely to be + // // overridden; e.g., those which define the orientation of a card. + // ...{{camelCase sourceLibraryName}}{{properCase componentName}}Base.Default.Layout, + // // ... + // }, + // Spacing: { + // // Tokens which sit somewhere between Theme and Layout; e.g., padding, margin, + // // line-spacing, etc. + // ...{{camelCase sourceLibraryName}}{{properCase componentName}}Base.Default.Spacing, + // // ... + // }, + // Theme: { + // // Tokens which apply styling which is very likely to be overridden; e.g., colors, + // // typography, sizing such as width and height, etc. + // ...{{camelCase sourceLibraryName}}{{properCase componentName}}Base.Default.Theme, + // // ... + // }, + // A11yContent: { + // // Tokens which provide default content related to accessibility. + // ...{{camelCase sourceLibraryName}}{{properCase componentName}}Base.Default.A11yContent, + // // ... + // }, + // Content: { + // // Tokens which provide default content or other fixed props. Any hardcoded, + // // translatable strings belong in this domain. + // ...{{camelCase sourceLibraryName}}{{properCase componentName}}Base.Default.Content, + // // ... + // }, + // Behavior: { + // // Tokens which define or add behaviors to a component; e.g., the expanding and contracting + // // of an accordion. + // ...{{camelCase sourceLibraryName}}{{properCase componentName}}Base.Default.Behavior, + // // ... + // }, + // Schema: { + // // Tokens which define how a component's data are organized; e.g., node keys. + // ...{{camelCase sourceLibraryName}}{{properCase componentName}}Base.Default.Schema, + // // ... + // }, +}); +{{else}} +import { as{{properCase componentName}}Token } from '../{{properCase componentName}}Clean'; +import type { {{properCase libraryName}}{{properCase componentName}} } from '../types'; + +const Default = as{{properCase componentName}}Token({ + Core: { + // Essential behavior or styling added by this token which are very unlikely to be + // overridden. + // ... + }, + // Components: { + // // When the design elements of a complex component are themselves complex components, + // // it is generally best practice to define tokens which apply to the sub-components as a + // // whole, and apply them in the Components domain of the enclosing component. + // // ... + // }, + // A11y: { + // // Behavior or props related to accessibility; e.g. an `aria-labeledby' prop. + // // ... + // }, + // Analytics: { + // // Behavior or props related to analytics; e.g., pushing events to a data layer. + // // ... + // }, + // SEO: { + // // Behavior or props related to search engine optimization, e.g., adding schema.org markup. + // // ... + // }, + // Layout: { + // // Tokens which define the visual structure of a component, and are thus unlikely to be + // // overridden; e.g., those which define the orientation of a card. + // // ... + // }, + // Spacing: { + // // Tokens which sit somewhere between Theme and Layout; e.g., padding, margin, + // // line-spacing, etc. + // // ... + // }, + // Theme: { + // // Tokens which apply styling which is very likely to be overridden; e.g., colors, + // // typography, sizing such as width and height, etc. + // // ... + // }, + // A11yContent: { + // // Tokens which provide default, localized content related to accessibility. + // // ... + // }, + // Content: { + // // Tokens which provide default content or other fixed props. Any hardcoded, + // // translatable strings belong in this domain. + // // ... + // }, + // Behavior: { + // // Tokens which define or add behaviors to a component; e.g., the expanding and contracting + // // of an accordion. + // // ... + // }, + // Schema: { + // // Tokens which define how a component's data are organized; e.g., node keys. + // Slot1: withChildNode('slot-1'), + // Slot2: withChildNode('slot-2), + // // ... + // }, +}); +{{/if}} + +// Add additional variant tokens or variators here. +// ... + +{{#if sourcePackageName}} +/** + * Tokens for {{properCase componentName}}Clean + * This token collection extends {{camelCase sourceLibraryName}}{{properCase componentName}} + * + * @category Token Collection + * @see {{camelCase sourceLibraryName}}{{properCase componentName}} + */ +const {{camelCase libraryName}}{{properCase componentName}} = { + ...{{camelCase sourceLibraryName}}{{properCase componentName}}Base, +{{else}} +/** + * Tokens for {{properCase componentName}}Clean + * + * @category Token Collection + * @see [[{{properCase libraryName}}{{properCase componentName}}]] + * @see [[{{properCase componentName}}Clean]] + */ +const {{camelCase libraryName}}{{properCase componentName}}: {{properCase libraryName}}{{properCase componentName}} = { +{{/if}} + Default, + // ... +}; + +export default {{camelCase libraryName}}{{properCase componentName}}; diff --git a/packages/bodiless-scaffold/src/templates/component/types.ts.hbs b/packages/bodiless-scaffold/src/templates/component/types.ts.hbs new file mode 100644 index 0000000000..fbbb8fae34 --- /dev/null +++ b/packages/bodiless-scaffold/src/templates/component/types.ts.hbs @@ -0,0 +1,38 @@ +import type { ComponentOrTag, DesignableProps, TokenSpec } from '@bodiless/fclasses'; +import type { DefaultDomains } from '@bodiless/vital-elements'; + +/** + * Type representing the "slots" exposed by the {{properCase componentName}}Clean component. + */ +export type {{properCase componentName}}Components = { + Wrapper: ComponentOrTag, + Slot1Wrapper: ComponentOrTag, + Slot1: ComponentOrTag, + Slot2Wrapper: ComponentOrTag, + Slot2: ComponentOrTag, +}; + +/** + * The props accepted by the {{properCase componentName}}Clean component + */ +export type {{properCase componentName}}Props = DesignableProps<{{properCase componentName}}Components>; + +/** + * The type of a token spec which applies to the {{properCase componentName}}Clean component. + */ +export type {{properCase componentName}}Token = TokenSpec<{{properCase componentName}}Components, DefaultDomains>; + +/** + * Tokens for the {{properCase componentName}}Clean component. + * + * @category Token Collection + * @see [[{{properCase componentName}}Clean]] + */ +export interface {{properCase libraryName}}{{properCase componentName}} { + /** + * Default styling and behavior. + */ + Default: {{properCase componentName}}Token; + + // Document other tokens here. +}; \ No newline at end of file diff --git a/packages/bodiless-scaffold/src/templates/shadow/component.ts.hbs b/packages/bodiless-scaffold/src/templates/shadow/component.ts.hbs new file mode 100644 index 0000000000..34faaafc8e --- /dev/null +++ b/packages/bodiless-scaffold/src/templates/shadow/component.ts.hbs @@ -0,0 +1,4 @@ +import { shadow } from '@bodiless/vital-elements'; +import { {{camelCase libraryName}}{{properCase componentName}} } from '../../../components/{{properCase componentName}}'; + +export default shadow({{camelCase libraryName}}{{properCase componentName}}, '{{properCase libraryName}}:{{properCase componentName}}'); diff --git a/packages/bodiless-scaffold/tsconfig.json b/packages/bodiless-scaffold/tsconfig.json new file mode 100644 index 0000000000..dbbb13d9d1 --- /dev/null +++ b/packages/bodiless-scaffold/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../../tsconfig.settings.json", + "compilerOptions": { + "target": "es2017", + "module": "esnext", + "rootDir": "src", + "outDir": "lib", + "baseUrl": "." + }, + "include": [ + "src" + ], + "exclude": [ + "lib", + "bin", + "node_modules", + "__tests__/**/*.*", + "src/**/__tests__/**/*.*" + ] +}