diff --git a/auditjs.json b/auditjs.json index 2d7aa065..fbbbc4d7 100644 --- a/auditjs.json +++ b/auditjs.json @@ -1292,6 +1292,22 @@ "reference": "https://ossindex.sonatype.org/vulnerability/CVE-2023-44270?component-type=npm&component-name=postcss&utm_source=auditjs&utm_medium=integration&utm_content=4.0.41" } ] + }, + { + "coordinates": "pkg:npm/browserify-sign@4.2.1", + "description": "adds node crypto signing for browsers", + "reference": "https://ossindex.sonatype.org/component/pkg:npm/browserify-sign@4.2.1?utm_source=auditjs&utm_medium=integration&utm_content=4.0.41", + "vulnerabilities": [ + { + "id": "CVE-2023-46234", + "title": "[CVE-2023-46234] CWE-347: Improper Verification of Cryptographic Signature", + "description": "browserify-sign is a package to duplicate the functionality of node's crypto public key functions, much of this is based on Fedor Indutny's work on indutny/tls.js. An upper bound check issue in `dsaVerify` function allows an attacker to construct signatures that can be successfully verified by any public key, thus leading to a signature forgery attack. All places in this project that involve DSA verification of user-input signatures will be affected by this vulnerability. This issue has been patched in version 4.2.2.\n", + "cvssScore": 6.5, + "cvssVector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N", + "cve": "CVE-2023-46234", + "reference": "https://ossindex.sonatype.org/vulnerability/CVE-2023-46234?component-type=npm&component-name=browserify-sign&utm_source=auditjs&utm_medium=integration&utm_content=4.0.41" + } + ] } ], "ignore": [ @@ -1522,6 +1538,9 @@ }, { "id": "CVE-2023-44270" + }, + { + "id": "CVE-2023-46234" } ] } diff --git a/package-lock.json b/package-lock.json index 9d3dd25c..776e0e39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2508,6 +2508,7 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -4997,6 +4998,14 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@nrwl/cypress": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nrwl/cypress/-/cypress-16.10.0.tgz", + "integrity": "sha512-ns6VQrrF08XYwZE4OduLVK2rwpN6dNrkVArw4fzJccuZ1g3YxR5JSuxpdBQA3FjKWoo2DybivuQudpIlYGq3UQ==", + "dependencies": { + "@nx/cypress": "16.10.0" + } + }, "node_modules/@nrwl/devkit": { "version": "16.9.1", "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.9.1.tgz", @@ -5083,6 +5092,568 @@ "@nx/workspace": "16.9.1" } }, + "node_modules/@nx/cypress": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nx/cypress/-/cypress-16.10.0.tgz", + "integrity": "sha512-suYc5jC6Os0D78Fn2pAIuGOkM6nhIWsSEb94PWwdZWE0XKQiWrgQJZBXDIu3x2zq6oZxYdx8OufUFli8vr4/Tw==", + "dependencies": { + "@nrwl/cypress": "16.10.0", + "@nx/devkit": "16.10.0", + "@nx/js": "16.10.0", + "@nx/linter": "16.10.0", + "@phenomnomnominal/tsquery": "~5.0.1", + "detect-port": "^1.5.1", + "semver": "7.5.3", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "cypress": ">= 3 < 14" + }, + "peerDependenciesMeta": { + "cypress": { + "optional": true + } + } + }, + "node_modules/@nx/cypress/node_modules/@nrwl/devkit": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.10.0.tgz", + "integrity": "sha512-fRloARtsDQoQgQ7HKEy0RJiusg/HSygnmg4gX/0n/Z+SUS+4KoZzvHjXc6T5ZdEiSjvLypJ+HBM8dQzIcVACPQ==", + "dependencies": { + "@nx/devkit": "16.10.0" + } + }, + "node_modules/@nx/cypress/node_modules/@nrwl/js": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nrwl/js/-/js-16.10.0.tgz", + "integrity": "sha512-asybPpyPrxLLDWWdYzFqbgubLmDKLEhoMz8x9MPOm3CH8v2vlIE6hD0JT19GdJArBPxRB33nhjtu8wmJGz5czw==", + "dependencies": { + "@nx/js": "16.10.0" + } + }, + "node_modules/@nx/cypress/node_modules/@nrwl/linter": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nrwl/linter/-/linter-16.10.0.tgz", + "integrity": "sha512-XvMuTeIc2I3630iaqhlV4w3qgABQIo+kv8mT0DbT1HfjjZDm4ST8hrvkdWSf9mCl24vShNL8GDVQVNOX0bZY5A==", + "dependencies": { + "@nx/linter": "16.10.0" + } + }, + "node_modules/@nx/cypress/node_modules/@nrwl/tao": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-16.10.0.tgz", + "integrity": "sha512-QNAanpINbr+Pod6e1xNgFbzK1x5wmZl+jMocgiEFXZ67KHvmbD6MAQQr0MMz+GPhIu7EE4QCTLTyCEMlAG+K5Q==", + "dependencies": { + "nx": "16.10.0", + "tslib": "^2.3.0" + }, + "bin": { + "tao": "index.js" + } + }, + "node_modules/@nx/cypress/node_modules/@nrwl/workspace": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nrwl/workspace/-/workspace-16.10.0.tgz", + "integrity": "sha512-fZeNxhFs/2cm326NebfJIgSI3W4KZN94WGS46wlIBrUUGP5/vwHYsi09Kx6sG1kRkAuZVtgJ33uU2F6xcAWzUA==", + "dependencies": { + "@nx/workspace": "16.10.0" + } + }, + "node_modules/@nx/cypress/node_modules/@nx/devkit": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.10.0.tgz", + "integrity": "sha512-IvKQqRJFDDiaj33SPfGd3ckNHhHi6ceEoqCbAP4UuMXOPPVOX6H0KVk+9tknkPb48B7jWIw6/AgOeWkBxPRO5w==", + "dependencies": { + "@nrwl/devkit": "16.10.0", + "ejs": "^3.1.7", + "enquirer": "~2.3.6", + "ignore": "^5.0.4", + "semver": "7.5.3", + "tmp": "~0.2.1", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "nx": ">= 15 <= 17" + } + }, + "node_modules/@nx/cypress/node_modules/@nx/js": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nx/js/-/js-16.10.0.tgz", + "integrity": "sha512-27AH0/+XTMzOxVS6oV8Zl7/Rr1UDMYsnCVqoCU9CXp087uxcD4VnBOEjsEUlJKh1RdwGE3K0hBkk7NC1LP+vYQ==", + "dependencies": { + "@babel/core": "^7.22.9", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-decorators": "^7.22.7", + "@babel/plugin-transform-runtime": "^7.22.9", + "@babel/preset-env": "^7.22.9", + "@babel/preset-typescript": "^7.22.5", + "@babel/runtime": "^7.22.6", + "@nrwl/js": "16.10.0", + "@nx/devkit": "16.10.0", + "@nx/workspace": "16.10.0", + "@phenomnomnominal/tsquery": "~5.0.1", + "babel-plugin-const-enum": "^1.0.1", + "babel-plugin-macros": "^2.8.0", + "babel-plugin-transform-typescript-metadata": "^0.3.1", + "chalk": "^4.1.0", + "columnify": "^1.6.0", + "detect-port": "^1.5.1", + "fast-glob": "3.2.7", + "fs-extra": "^11.1.0", + "ignore": "^5.0.4", + "js-tokens": "^4.0.0", + "minimatch": "3.0.5", + "npm-package-arg": "11.0.1", + "npm-run-path": "^4.0.1", + "ora": "5.3.0", + "semver": "7.5.3", + "source-map-support": "0.5.19", + "ts-node": "10.9.1", + "tsconfig-paths": "^4.1.2", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "verdaccio": "^5.0.4" + }, + "peerDependenciesMeta": { + "verdaccio": { + "optional": true + } + } + }, + "node_modules/@nx/cypress/node_modules/@nx/linter": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nx/linter/-/linter-16.10.0.tgz", + "integrity": "sha512-G6XBfuMHNHoJDc4n2Gip4fsa9KssT91V5PF2Rd4hILkg4YU8B8mlmHN71stpzwbEyUJtyhyJc5SGgVLrSpRQew==", + "dependencies": { + "@nrwl/linter": "16.10.0", + "@nx/devkit": "16.10.0", + "@nx/js": "16.10.0", + "@phenomnomnominal/tsquery": "~5.0.1", + "tmp": "~0.2.1", + "tslib": "^2.3.0", + "typescript": "~5.1.3" + }, + "peerDependencies": { + "eslint": "^8.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@nx/cypress/node_modules/@nx/nx-darwin-arm64": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-16.10.0.tgz", + "integrity": "sha512-YF+MIpeuwFkyvM5OwgY/rTNRpgVAI/YiR0yTYCZR+X3AAvP775IVlusNgQ3oedTBRUzyRnI4Tknj1WniENFsvQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/cypress/node_modules/@nx/nx-darwin-x64": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-16.10.0.tgz", + "integrity": "sha512-ypi6YxwXgb0kg2ixKXE3pwf5myVNUgWf1CsV5OzVccCM8NzheMO51KDXTDmEpXdzUsfT0AkO1sk5GZeCjhVONg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/cypress/node_modules/@nx/nx-freebsd-x64": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-16.10.0.tgz", + "integrity": "sha512-UeEYFDmdbbDkTQamqvtU8ibgu5jQLgFF1ruNb/U4Ywvwutw2d4ruOMl2e0u9hiNja9NFFAnDbvzrDcMo7jYqYw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/cypress/node_modules/@nx/nx-linux-arm-gnueabihf": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.10.0.tgz", + "integrity": "sha512-WV3XUC2DB6/+bz1sx+d1Ai9q2Cdr+kTZRN50SOkfmZUQyEBaF6DRYpx/a4ahhxH3ktpNfyY8Maa9OEYxGCBkQA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/cypress/node_modules/@nx/nx-linux-arm64-gnu": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.10.0.tgz", + "integrity": "sha512-aWIkOUw995V3ItfpAi5FuxQ+1e9EWLS1cjWM1jmeuo+5WtaKToJn5itgQOkvSlPz+HSLgM3VfXMvOFALNk125g==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/cypress/node_modules/@nx/nx-linux-arm64-musl": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.10.0.tgz", + "integrity": "sha512-uO6Gg+irqpVcCKMcEPIQcTFZ+tDI02AZkqkP7koQAjniLEappd8DnUBSQdcn53T086pHpdc264X/ZEpXFfrKWQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/cypress/node_modules/@nx/nx-linux-x64-gnu": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.10.0.tgz", + "integrity": "sha512-134PW/u/arNFAQKpqMJniC7irbChMPz+W+qtyKPAUXE0XFKPa7c1GtlI/wK2dvP9qJDZ6bKf0KtA0U/m2HMUOA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/cypress/node_modules/@nx/nx-linux-x64-musl": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.10.0.tgz", + "integrity": "sha512-q8sINYLdIJxK/iUx9vRk5jWAWb/2O0PAbOJFwv4qkxBv4rLoN7y+otgCZ5v0xfx/zztFgk/oNY4lg5xYjIso2Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/cypress/node_modules/@nx/nx-win32-arm64-msvc": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.10.0.tgz", + "integrity": "sha512-moJkL9kcqxUdJSRpG7dET3UeLIciwrfP08mzBQ12ewo8K8FzxU8ZUsTIVVdNrwt01CXOdXoweGfdQLjJ4qTURA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/cypress/node_modules/@nx/nx-win32-x64-msvc": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.10.0.tgz", + "integrity": "sha512-5iV2NKZnzxJwZZ4DM5JVbRG/nkhAbzEskKaLBB82PmYGKzaDHuMHP1lcPoD/rtYMlowZgNA/RQndfKvPBPwmXA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/cypress/node_modules/@nx/workspace": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/@nx/workspace/-/workspace-16.10.0.tgz", + "integrity": "sha512-95Eq36bzq2hb095Zvg+Ru8o9oIeOE62tNGGpohBkZPKoK2CUTYEq0AZtdj1suXS82ukCFCyyZ/c/fwxL62HRZA==", + "dependencies": { + "@nrwl/workspace": "16.10.0", + "@nx/devkit": "16.10.0", + "chalk": "^4.1.0", + "enquirer": "~2.3.6", + "ignore": "^5.0.4", + "nx": "16.10.0", + "rxjs": "^7.8.0", + "tslib": "^2.3.0", + "yargs-parser": "21.1.1" + } + }, + "node_modules/@nx/cypress/node_modules/babel-plugin-macros": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz", + "integrity": "sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==", + "dependencies": { + "@babel/runtime": "^7.7.2", + "cosmiconfig": "^6.0.0", + "resolve": "^1.12.0" + } + }, + "node_modules/@nx/cypress/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@nx/cypress/node_modules/cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@nx/cypress/node_modules/dotenv": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" + } + }, + "node_modules/@nx/cypress/node_modules/dotenv-expand": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-10.0.0.tgz", + "integrity": "sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==", + "engines": { + "node": ">=12" + } + }, + "node_modules/@nx/cypress/node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/@nx/cypress/node_modules/fast-glob": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@nx/cypress/node_modules/glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@nx/cypress/node_modules/hosted-git-info": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.1.tgz", + "integrity": "sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==", + "dependencies": { + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@nx/cypress/node_modules/lru-cache": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", + "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/@nx/cypress/node_modules/npm-package-arg": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.1.tgz", + "integrity": "sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ==", + "dependencies": { + "hosted-git-info": "^7.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@nx/cypress/node_modules/nx": { + "version": "16.10.0", + "resolved": "https://registry.npmjs.org/nx/-/nx-16.10.0.tgz", + "integrity": "sha512-gZl4iCC0Hx0Qe1VWmO4Bkeul2nttuXdPpfnlcDKSACGu3ZIo+uySqwOF8yBAxSTIf8xe2JRhgzJN1aFkuezEBg==", + "hasInstallScript": true, + "dependencies": { + "@nrwl/tao": "16.10.0", + "@parcel/watcher": "2.0.4", + "@yarnpkg/lockfile": "^1.1.0", + "@yarnpkg/parsers": "3.0.0-rc.46", + "@zkochan/js-yaml": "0.0.6", + "axios": "^1.0.0", + "chalk": "^4.1.0", + "cli-cursor": "3.1.0", + "cli-spinners": "2.6.1", + "cliui": "^8.0.1", + "dotenv": "~16.3.1", + "dotenv-expand": "~10.0.0", + "enquirer": "~2.3.6", + "figures": "3.2.0", + "flat": "^5.0.2", + "fs-extra": "^11.1.0", + "glob": "7.1.4", + "ignore": "^5.0.4", + "jest-diff": "^29.4.1", + "js-yaml": "4.1.0", + "jsonc-parser": "3.2.0", + "lines-and-columns": "~2.0.3", + "minimatch": "3.0.5", + "node-machine-id": "1.1.12", + "npm-run-path": "^4.0.1", + "open": "^8.4.0", + "semver": "7.5.3", + "string-width": "^4.2.3", + "strong-log-transformer": "^2.1.0", + "tar-stream": "~2.2.0", + "tmp": "~0.2.1", + "tsconfig-paths": "^4.1.2", + "tslib": "^2.3.0", + "v8-compile-cache": "2.3.0", + "yargs": "^17.6.2", + "yargs-parser": "21.1.1" + }, + "bin": { + "nx": "bin/nx.js" + }, + "optionalDependencies": { + "@nx/nx-darwin-arm64": "16.10.0", + "@nx/nx-darwin-x64": "16.10.0", + "@nx/nx-freebsd-x64": "16.10.0", + "@nx/nx-linux-arm-gnueabihf": "16.10.0", + "@nx/nx-linux-arm64-gnu": "16.10.0", + "@nx/nx-linux-arm64-musl": "16.10.0", + "@nx/nx-linux-x64-gnu": "16.10.0", + "@nx/nx-linux-x64-musl": "16.10.0", + "@nx/nx-win32-arm64-msvc": "16.10.0", + "@nx/nx-win32-x64-msvc": "16.10.0" + }, + "peerDependencies": { + "@swc-node/register": "^1.6.7", + "@swc/core": "^1.3.85" + }, + "peerDependenciesMeta": { + "@swc-node/register": { + "optional": true + }, + "@swc/core": { + "optional": true + } + } + }, + "node_modules/@nx/cypress/node_modules/semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@nx/cypress/node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@nx/cypress/node_modules/typescript": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/@nx/cypress/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "node_modules/@nx/devkit": { "version": "16.9.1", "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.9.1.tgz", @@ -37561,7 +38132,9 @@ "name": "@tablecheck/nx", "version": "6.0.1", "dependencies": { + "@nx/cypress": "^16", "@nx/devkit": "^16", + "@nx/js": "^16", "@nx/linter": "^16", "chalk": "^4.1.2", "flat": "5.0.2", diff --git a/packages/nx/generators.json b/packages/nx/generators.json index 88daeb12..2e1540c2 100644 --- a/packages/nx/generators.json +++ b/packages/nx/generators.json @@ -19,6 +19,11 @@ "factory": "./dist/generators/ts-file-types/generator", "schema": "./dist/generators/ts-file-types/schema.json", "description": "ts-file-types generator" + }, + "vite-lib": { + "factory": "./src/generators/vite-lib/generator", + "schema": "./src/generators/vite-lib/schema.json", + "description": "Create a Typescript Lib for use in a vite app monorepo" } } } diff --git a/packages/nx/package.json b/packages/nx/package.json index 86392536..27f59cf8 100644 --- a/packages/nx/package.json +++ b/packages/nx/package.json @@ -23,7 +23,9 @@ "prepublish": "npm run build" }, "dependencies": { + "@nx/cypress": "^16", "@nx/devkit": "^16", + "@nx/js": "^16", "@nx/linter": "^16", "chalk": "^4.1.2", "flat": "5.0.2", diff --git a/packages/nx/src/generators/vite-lib/generator.ts b/packages/nx/src/generators/vite-lib/generator.ts new file mode 100644 index 00000000..65a40a16 --- /dev/null +++ b/packages/nx/src/generators/vite-lib/generator.ts @@ -0,0 +1,40 @@ +import { Tree } from '@nx/devkit'; +import { determineProjectNameAndRootOptions } from '@nx/devkit/src/generators/project-name-and-root-utils'; +import { libraryGeneratorInternal } from '@nx/js/src/generators/library/library'; + +import { qualityGenerator } from '../quality/generator'; + +export async function viteLibGenerator( + tree: Tree, + options: Parameters[1], +) { + await libraryGeneratorInternal(tree, { + ...options, + compiler: 'tsc', + bundler: 'tsc', + includeBabelRc: false, + js: false, + skipTypeCheck: false, + skipTsConfig: false, + linter: 'none', + setParserOptionsProject: false, + strict: true, + }); + + const { projectName } = await determineProjectNameAndRootOptions(tree, { + name: options.name, + projectType: 'library', + directory: options.directory, + importPath: options.importPath, + projectNameAndRootFormat: options.projectNameAndRootFormat, + rootProject: options.rootProject, + callingGenerator: '@tablecheck/nx:vite-lib', + }); + + await qualityGenerator(tree, { + project: projectName, + svgAsComponent: false, + }); +} + +export default viteLibGenerator; diff --git a/packages/nx/src/generators/vite-lib/schema.json b/packages/nx/src/generators/vite-lib/schema.json new file mode 100644 index 00000000..b3e2a6c2 --- /dev/null +++ b/packages/nx/src/generators/vite-lib/schema.json @@ -0,0 +1,92 @@ +{ + "$schema": "http://json-schema.org/schema", + "$id": "ViteLib", + "title": "Create a TypeScript Library", + "description": "Create a TypeScript Library for use in a vite monorepo.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Library name.", + "$default": { + "$source": "argv", + "index": 0 + }, + "x-prompt": "What name would you like to use for the library?", + "pattern": "(?:^@[a-zA-Z0-9-*~][a-zA-Z0-9-*._~]*\\/[a-zA-Z0-9-~][a-zA-Z0-9-._~]*|^[a-zA-Z][^:]*)$" + }, + "directory": { + "type": "string", + "description": "A directory where the lib is placed.", + "x-priority": "important" + }, + "projectNameAndRootFormat": { + "description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).", + "type": "string", + "enum": ["as-provided", "derived"] + }, + "unitTestRunner": { + "type": "string", + "enum": ["vitest", "none"], + "description": "Test runner to use for unit tests.", + "x-prompt": "Which unit test runner would you like to use?" + }, + "tags": { + "type": "string", + "description": "Add tags to the library (used for linting)." + }, + "skipFormat": { + "description": "Skip formatting files.", + "type": "boolean", + "default": false, + "x-priority": "internal" + }, + "testEnvironment": { + "type": "string", + "enum": ["jsdom", "node"], + "description": "The test environment to use if unitTestRunner is set to jest or vitest.", + "default": "jsdom" + }, + "pascalCaseFiles": { + "type": "boolean", + "description": "Use pascal case file names.", + "alias": "P", + "default": false + }, + "publishable": { + "type": "boolean", + "default": false, + "description": "Generate a publishable library.", + "x-priority": "important" + }, + "importPath": { + "type": "string", + "description": "The library name used to import it, like @myorg/my-awesome-lib. Required for publishable library.", + "x-priority": "important" + }, + "buildable": { + "type": "boolean", + "default": true, + "description": "Generate a buildable library.", + "x-deprecated": "Use the `bundler` option for greater control (swc, tsc, rollup, vite, esbuild, none)." + }, + "config": { + "type": "string", + "enum": ["workspace", "project", "npm-scripts"], + "default": "project", + "description": "Determines whether the project's executors should be configured in `workspace.json`, `project.json` or as npm scripts.", + "x-priority": "internal" + }, + "minimal": { + "type": "boolean", + "description": "Generate a library with a minimal setup. No README.md generated.", + "default": false + }, + "simpleName": { + "description": "Don't include the directory in the generated file name.", + "type": "boolean", + "default": false + } + }, + "required": ["name"] +}