diff --git a/.gitignore b/.gitignore index 1168f09509b3..1b672a73cd7b 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ npm-debug.log* .idea/**/shelf .idea +.tsup diff --git a/package-lock.json b/package-lock.json index 5bf364b35e94..c9de13f8ba49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -84,6 +84,7 @@ "tmp": "^0.2.1", "ts-jest": "^29.1.2", "ts-node": "^10.9.1", + "tsup": "^8.0.2", "typedoc": "^0.25.12", "typescript": "5.1.6" }, @@ -5706,6 +5707,19 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.14.3.tgz", + "integrity": "sha512-ljcuiDI4V3ySuc7eSk4lQ9wU8J8r8KrOUvB2U+TtK0TiW6OFDmJ+DdIjjwZHIw9CNxzbmXY39wwpzYuFDwNXuw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-arm64-gnu": { "version": "4.13.2", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.2.tgz", @@ -8695,6 +8709,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bundle-require": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-4.0.2.tgz", + "integrity": "sha512-jwzPOChofl67PSTW2SGubV9HBQAhhR2i6nskiOThauo9dzwDUgOWQScFVaJkjEfYX+UXiD+LEx8EblQMc2wIag==", + "dev": true, + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.17" + } + }, "node_modules/bunyan": { "version": "1.8.15", "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.15.tgz", @@ -17478,6 +17507,15 @@ "@sideway/pinpoint": "^2.0.0" } }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -18214,6 +18252,15 @@ "node": ">=4" } }, + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, "node_modules/loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", @@ -18318,6 +18365,12 @@ "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", "dev": true }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", + "dev": true + }, "node_modules/lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", @@ -27710,6 +27763,744 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, + "node_modules/tsup": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.0.2.tgz", + "integrity": "sha512-NY8xtQXdH7hDUAZwcQdY/Vzlw9johQsaqf7iwZ6g1DOUlFYQ5/AtVAjTvihhEyeRlGo4dLRVHtrRaL35M1daqQ==", + "dev": true, + "dependencies": { + "bundle-require": "^4.0.0", + "cac": "^6.7.12", + "chokidar": "^3.5.1", + "debug": "^4.3.1", + "esbuild": "^0.19.2", + "execa": "^5.0.0", + "globby": "^11.0.3", + "joycon": "^3.0.1", + "postcss-load-config": "^4.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.0.2", + "source-map": "0.8.0-beta.0", + "sucrase": "^3.20.3", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@microsoft/api-extractor": "^7.36.0", + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": ">=4.5.0" + }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/tsup/node_modules/@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-riscv64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-s390x": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/linux-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/netbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/openbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/sunos-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/win32-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/win32-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@esbuild/win32-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsup/node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.3.tgz", + "integrity": "sha512-X9alQ3XM6I9IlSlmC8ddAvMSyG1WuHk5oUnXGw+yUBs3BFoTizmG1La/Gr8fVJvDWAq+zlYTZ9DBgrlKRVY06g==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/tsup/node_modules/@rollup/rollup-android-arm64": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.3.tgz", + "integrity": "sha512-eQK5JIi+POhFpzk+LnjKIy4Ks+pwJ+NXmPxOCSvOKSNRPONzKuUvWE+P9JxGZVxrtzm6BAYMaL50FFuPe0oWMQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/tsup/node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.3.tgz", + "integrity": "sha512-Od4vE6f6CTT53yM1jgcLqNfItTsLt5zE46fdPaEmeFHvPs5SjZYlLpHrSiHEKR1+HdRfxuzXHjDOIxQyC3ptBA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/tsup/node_modules/@rollup/rollup-darwin-x64": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.3.tgz", + "integrity": "sha512-0IMAO21axJeNIrvS9lSe/PGthc8ZUS+zC53O0VhF5gMxfmcKAP4ESkKOCwEi6u2asUrt4mQv2rjY8QseIEb1aw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/tsup/node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.3.tgz", + "integrity": "sha512-ge2DC7tHRHa3caVEoSbPRJpq7azhG+xYsd6u2MEnJ6XzPSzQsTKyXvh6iWjXRf7Rt9ykIUWHtl0Uz3T6yXPpKw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/tsup/node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.3.tgz", + "integrity": "sha512-Eci2us9VTHm1eSyn5/eEpaC7eP/mp5n46gTRB3Aar3BgSvDQGJZuicyq6TsH4HngNBgVqC5sDYxOzTExSU+NjA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/tsup/node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.3.tgz", + "integrity": "sha512-UrBoMLCq4E92/LCqlh+blpqMz5h1tJttPIniwUgOFJyjWI1qrtrDhhpHPuFxULlUmjFHfloWdixtDhSxJt5iKw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/tsup/node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.3.tgz", + "integrity": "sha512-5aRjvsS8q1nWN8AoRfrq5+9IflC3P1leMoy4r2WjXyFqf3qcqsxRCfxtZIV58tCxd+Yv7WELPcO9mY9aeQyAmw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/tsup/node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.3.tgz", + "integrity": "sha512-sk/Qh1j2/RJSX7FhEpJn8n0ndxy/uf0kI/9Zc4b1ELhqULVdTfN6HL31CDaTChiBAOgLcsJ1sgVZjWv8XNEsAQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/tsup/node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.3.tgz", + "integrity": "sha512-jOO/PEaDitOmY9TgkxF/TQIjXySQe5KVYB57H/8LRP/ux0ZoO8cSHCX17asMSv3ruwslXW/TLBcxyaUzGRHcqg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/tsup/node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.3.tgz", + "integrity": "sha512-8ybV4Xjy59xLMyWo3GCfEGqtKV5M5gCSrZlxkPGvEPCGDLNla7v48S662HSGwRd6/2cSneMQWiv+QzcttLrrOA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/tsup/node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.3.tgz", + "integrity": "sha512-s+xf1I46trOY10OqAtZ5Rm6lzHre/UiLA1J2uOhCFXWkbZrJRkYBPO6FhvGfHmdtQ3Bx793MNa7LvoWFAm93bg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/tsup/node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.3.tgz", + "integrity": "sha512-+4h2WrGOYsOumDQ5S2sYNyhVfrue+9tc9XcLWLh+Kw3UOxAvrfOrSMFon60KspcDdytkNDh7K2Vs6eMaYImAZg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/tsup/node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.3.tgz", + "integrity": "sha512-T1l7y/bCeL/kUwh9OD4PQT4aM7Bq43vX05htPJJ46RTI4r5KNt6qJRzAfNfM+OYMNEVBWQzR2Gyk+FXLZfogGw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/tsup/node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.3.tgz", + "integrity": "sha512-/BypzV0H1y1HzgYpxqRaXGBRqfodgoBBCcsrujT6QRcakDQdfU+Lq9PENPh5jB4I44YWq+0C2eHsHya+nZY1sA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/tsup/node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/tsup/node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, + "node_modules/tsup/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/tsup/node_modules/rollup": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.3.tgz", + "integrity": "sha512-ag5tTQKYsj1bhrFC9+OEWqb5O6VYgtQDO9hPDBMmIbePwhfSr+ExlcU741t8Dhw5DkPCQf6noz0jb36D6W9/hw==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.14.3", + "@rollup/rollup-android-arm64": "4.14.3", + "@rollup/rollup-darwin-arm64": "4.14.3", + "@rollup/rollup-darwin-x64": "4.14.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.14.3", + "@rollup/rollup-linux-arm-musleabihf": "4.14.3", + "@rollup/rollup-linux-arm64-gnu": "4.14.3", + "@rollup/rollup-linux-arm64-musl": "4.14.3", + "@rollup/rollup-linux-powerpc64le-gnu": "4.14.3", + "@rollup/rollup-linux-riscv64-gnu": "4.14.3", + "@rollup/rollup-linux-s390x-gnu": "4.14.3", + "@rollup/rollup-linux-x64-gnu": "4.14.3", + "@rollup/rollup-linux-x64-musl": "4.14.3", + "@rollup/rollup-win32-arm64-msvc": "4.14.3", + "@rollup/rollup-win32-ia32-msvc": "4.14.3", + "@rollup/rollup-win32-x64-msvc": "4.14.3", + "fsevents": "~2.3.2" + } + }, + "node_modules/tsup/node_modules/source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "dev": true, + "dependencies": { + "whatwg-url": "^7.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tsup/node_modules/tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/tsup/node_modules/webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "node_modules/tsup/node_modules/whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, "node_modules/tsutils": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", @@ -35948,6 +36739,13 @@ "dev": true, "optional": true }, + "@rollup/rollup-linux-arm-musleabihf": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.14.3.tgz", + "integrity": "sha512-ljcuiDI4V3ySuc7eSk4lQ9wU8J8r8KrOUvB2U+TtK0TiW6OFDmJ+DdIjjwZHIw9CNxzbmXY39wwpzYuFDwNXuw==", + "dev": true, + "optional": true + }, "@rollup/rollup-linux-arm64-gnu": { "version": "4.13.2", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.2.tgz", @@ -38163,6 +38961,15 @@ "run-applescript": "^5.0.0" } }, + "bundle-require": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-4.0.2.tgz", + "integrity": "sha512-jwzPOChofl67PSTW2SGubV9HBQAhhR2i6nskiOThauo9dzwDUgOWQScFVaJkjEfYX+UXiD+LEx8EblQMc2wIag==", + "dev": true, + "requires": { + "load-tsconfig": "^0.2.3" + } + }, "bunyan": { "version": "1.8.15", "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.15.tgz", @@ -44413,6 +45220,12 @@ "@sideway/pinpoint": "^2.0.0" } }, + "joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -45015,6 +45828,12 @@ } } }, + "load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true + }, "loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", @@ -45104,6 +45923,12 @@ "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", "dev": true }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", + "dev": true + }, "lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", @@ -51576,6 +52401,400 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, + "tsup": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.0.2.tgz", + "integrity": "sha512-NY8xtQXdH7hDUAZwcQdY/Vzlw9johQsaqf7iwZ6g1DOUlFYQ5/AtVAjTvihhEyeRlGo4dLRVHtrRaL35M1daqQ==", + "dev": true, + "requires": { + "bundle-require": "^4.0.0", + "cac": "^6.7.12", + "chokidar": "^3.5.1", + "debug": "^4.3.1", + "esbuild": "^0.19.2", + "execa": "^5.0.0", + "globby": "^11.0.3", + "joycon": "^3.0.1", + "postcss-load-config": "^4.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.0.2", + "source-map": "0.8.0-beta.0", + "sucrase": "^3.20.3", + "tree-kill": "^1.2.2" + }, + "dependencies": { + "@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-android-arm-eabi": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.3.tgz", + "integrity": "sha512-X9alQ3XM6I9IlSlmC8ddAvMSyG1WuHk5oUnXGw+yUBs3BFoTizmG1La/Gr8fVJvDWAq+zlYTZ9DBgrlKRVY06g==", + "dev": true, + "optional": true + }, + "@rollup/rollup-android-arm64": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.3.tgz", + "integrity": "sha512-eQK5JIi+POhFpzk+LnjKIy4Ks+pwJ+NXmPxOCSvOKSNRPONzKuUvWE+P9JxGZVxrtzm6BAYMaL50FFuPe0oWMQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-arm64": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.3.tgz", + "integrity": "sha512-Od4vE6f6CTT53yM1jgcLqNfItTsLt5zE46fdPaEmeFHvPs5SjZYlLpHrSiHEKR1+HdRfxuzXHjDOIxQyC3ptBA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-x64": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.3.tgz", + "integrity": "sha512-0IMAO21axJeNIrvS9lSe/PGthc8ZUS+zC53O0VhF5gMxfmcKAP4ESkKOCwEi6u2asUrt4mQv2rjY8QseIEb1aw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.3.tgz", + "integrity": "sha512-ge2DC7tHRHa3caVEoSbPRJpq7azhG+xYsd6u2MEnJ6XzPSzQsTKyXvh6iWjXRf7Rt9ykIUWHtl0Uz3T6yXPpKw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-gnu": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.3.tgz", + "integrity": "sha512-Eci2us9VTHm1eSyn5/eEpaC7eP/mp5n46gTRB3Aar3BgSvDQGJZuicyq6TsH4HngNBgVqC5sDYxOzTExSU+NjA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-musl": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.3.tgz", + "integrity": "sha512-UrBoMLCq4E92/LCqlh+blpqMz5h1tJttPIniwUgOFJyjWI1qrtrDhhpHPuFxULlUmjFHfloWdixtDhSxJt5iKw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.3.tgz", + "integrity": "sha512-5aRjvsS8q1nWN8AoRfrq5+9IflC3P1leMoy4r2WjXyFqf3qcqsxRCfxtZIV58tCxd+Yv7WELPcO9mY9aeQyAmw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-riscv64-gnu": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.3.tgz", + "integrity": "sha512-sk/Qh1j2/RJSX7FhEpJn8n0ndxy/uf0kI/9Zc4b1ELhqULVdTfN6HL31CDaTChiBAOgLcsJ1sgVZjWv8XNEsAQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-s390x-gnu": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.3.tgz", + "integrity": "sha512-jOO/PEaDitOmY9TgkxF/TQIjXySQe5KVYB57H/8LRP/ux0ZoO8cSHCX17asMSv3ruwslXW/TLBcxyaUzGRHcqg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-gnu": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.3.tgz", + "integrity": "sha512-8ybV4Xjy59xLMyWo3GCfEGqtKV5M5gCSrZlxkPGvEPCGDLNla7v48S662HSGwRd6/2cSneMQWiv+QzcttLrrOA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-musl": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.3.tgz", + "integrity": "sha512-s+xf1I46trOY10OqAtZ5Rm6lzHre/UiLA1J2uOhCFXWkbZrJRkYBPO6FhvGfHmdtQ3Bx793MNa7LvoWFAm93bg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-arm64-msvc": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.3.tgz", + "integrity": "sha512-+4h2WrGOYsOumDQ5S2sYNyhVfrue+9tc9XcLWLh+Kw3UOxAvrfOrSMFon60KspcDdytkNDh7K2Vs6eMaYImAZg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-ia32-msvc": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.3.tgz", + "integrity": "sha512-T1l7y/bCeL/kUwh9OD4PQT4aM7Bq43vX05htPJJ46RTI4r5KNt6qJRzAfNfM+OYMNEVBWQzR2Gyk+FXLZfogGw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-x64-msvc": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.3.tgz", + "integrity": "sha512-/BypzV0H1y1HzgYpxqRaXGBRqfodgoBBCcsrujT6QRcakDQdfU+Lq9PENPh5jB4I44YWq+0C2eHsHya+nZY1sA==", + "dev": true, + "optional": true + }, + "@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "requires": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "rollup": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.3.tgz", + "integrity": "sha512-ag5tTQKYsj1bhrFC9+OEWqb5O6VYgtQDO9hPDBMmIbePwhfSr+ExlcU741t8Dhw5DkPCQf6noz0jb36D6W9/hw==", + "dev": true, + "requires": { + "@rollup/rollup-android-arm-eabi": "4.14.3", + "@rollup/rollup-android-arm64": "4.14.3", + "@rollup/rollup-darwin-arm64": "4.14.3", + "@rollup/rollup-darwin-x64": "4.14.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.14.3", + "@rollup/rollup-linux-arm-musleabihf": "4.14.3", + "@rollup/rollup-linux-arm64-gnu": "4.14.3", + "@rollup/rollup-linux-arm64-musl": "4.14.3", + "@rollup/rollup-linux-powerpc64le-gnu": "4.14.3", + "@rollup/rollup-linux-riscv64-gnu": "4.14.3", + "@rollup/rollup-linux-s390x-gnu": "4.14.3", + "@rollup/rollup-linux-x64-gnu": "4.14.3", + "@rollup/rollup-linux-x64-musl": "4.14.3", + "@rollup/rollup-win32-arm64-msvc": "4.14.3", + "@rollup/rollup-win32-ia32-msvc": "4.14.3", + "@rollup/rollup-win32-x64-msvc": "4.14.3", + "@types/estree": "1.0.5", + "fsevents": "~2.3.2" + } + }, + "source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "dev": true, + "requires": { + "whatwg-url": "^7.0.0" + } + }, + "tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + } + } + }, "tsutils": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", diff --git a/package.json b/package.json index febdf2b41f5d..784d2167a876 100644 --- a/package.json +++ b/package.json @@ -174,6 +174,7 @@ "tmp": "^0.2.1", "ts-jest": "^29.1.2", "ts-node": "^10.9.1", + "tsup": "^8.0.2", "typedoc": "^0.25.12", "typescript": "5.1.6" }, diff --git a/packages/lexical-clipboard/package.json b/packages/lexical-clipboard/package.json index 72ea001e9a13..84076aec25d9 100644 --- a/packages/lexical-clipboard/package.json +++ b/packages/lexical-clipboard/package.json @@ -11,7 +11,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalClipboard.js", - "types": "index.d.ts", "dependencies": { "@lexical/html": "0.14.5", "@lexical/list": "0.14.5", @@ -29,14 +28,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalClipboard.d.ts", "development": "./LexicalClipboard.dev.mjs", "production": "./LexicalClipboard.prod.mjs", "node": "./LexicalClipboard.node.mjs", "default": "./LexicalClipboard.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalClipboard.d.ts", "development": "./LexicalClipboard.dev.js", "production": "./LexicalClipboard.prod.js", "default": "./LexicalClipboard.js" diff --git a/packages/lexical-code/package.json b/packages/lexical-code/package.json index 20379b43a335..3f271e94c86c 100644 --- a/packages/lexical-code/package.json +++ b/packages/lexical-code/package.json @@ -10,7 +10,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalCode.js", - "types": "index.d.ts", "dependencies": { "@lexical/utils": "0.14.5", "lexical": "0.14.5", @@ -29,14 +28,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalCode.d.ts", "development": "./LexicalCode.dev.mjs", "production": "./LexicalCode.prod.mjs", "node": "./LexicalCode.node.mjs", "default": "./LexicalCode.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalCode.d.ts", "development": "./LexicalCode.dev.js", "production": "./LexicalCode.prod.js", "default": "./LexicalCode.js" diff --git a/packages/lexical-devtools-core/package.json b/packages/lexical-devtools-core/package.json index 889cd6587e6c..a4cbd74e9348 100644 --- a/packages/lexical-devtools-core/package.json +++ b/packages/lexical-devtools-core/package.json @@ -10,7 +10,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalDevtoolsCore.js", - "types": "index.d.ts", "dependencies": { "@lexical/html": "0.14.5", "@lexical/link": "0.14.5", @@ -33,14 +32,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalDevtoolsCore.d.ts", "development": "./LexicalDevtoolsCore.dev.mjs", "production": "./LexicalDevtoolsCore.prod.mjs", "node": "./LexicalDevtoolsCore.node.mjs", "default": "./LexicalDevtoolsCore.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalDevtoolsCore.d.ts", "development": "./LexicalDevtoolsCore.dev.js", "production": "./LexicalDevtoolsCore.prod.js", "default": "./LexicalDevtoolsCore.js" diff --git a/packages/lexical-dragon/package.json b/packages/lexical-dragon/package.json index a4025fe17bb3..ef994c3c5e2e 100644 --- a/packages/lexical-dragon/package.json +++ b/packages/lexical-dragon/package.json @@ -11,7 +11,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalDragon.js", - "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/facebook/lexical", @@ -22,14 +21,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalDragon.d.ts", "development": "./LexicalDragon.dev.mjs", "production": "./LexicalDragon.prod.mjs", "node": "./LexicalDragon.node.mjs", "default": "./LexicalDragon.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalDragon.d.ts", "development": "./LexicalDragon.dev.js", "production": "./LexicalDragon.prod.js", "default": "./LexicalDragon.js" diff --git a/packages/lexical-file/package.json b/packages/lexical-file/package.json index 65f98c29c09e..300503fd8783 100644 --- a/packages/lexical-file/package.json +++ b/packages/lexical-file/package.json @@ -12,7 +12,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalFile.js", - "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/facebook/lexical", @@ -23,14 +22,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalFile.d.ts", "development": "./LexicalFile.dev.mjs", "production": "./LexicalFile.prod.mjs", "node": "./LexicalFile.node.mjs", "default": "./LexicalFile.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalFile.d.ts", "development": "./LexicalFile.dev.js", "production": "./LexicalFile.prod.js", "default": "./LexicalFile.js" diff --git a/packages/lexical-hashtag/package.json b/packages/lexical-hashtag/package.json index 4292445ceb13..e1b3718a208a 100644 --- a/packages/lexical-hashtag/package.json +++ b/packages/lexical-hashtag/package.json @@ -10,7 +10,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalHashtag.js", - "types": "index.d.ts", "dependencies": { "@lexical/utils": "0.14.5", "lexical": "0.14.5" @@ -25,14 +24,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalHashtag.d.ts", "development": "./LexicalHashtag.dev.mjs", "production": "./LexicalHashtag.prod.mjs", "node": "./LexicalHashtag.node.mjs", "default": "./LexicalHashtag.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalHashtag.d.ts", "development": "./LexicalHashtag.dev.js", "production": "./LexicalHashtag.prod.js", "default": "./LexicalHashtag.js" diff --git a/packages/lexical-headless/package.json b/packages/lexical-headless/package.json index 4c174031b2e0..00eeefdc46c1 100644 --- a/packages/lexical-headless/package.json +++ b/packages/lexical-headless/package.json @@ -10,7 +10,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalHeadless.js", - "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/facebook/lexical", @@ -21,14 +20,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalHeadless.d.ts", "development": "./LexicalHeadless.dev.mjs", "production": "./LexicalHeadless.prod.mjs", "node": "./LexicalHeadless.node.mjs", "default": "./LexicalHeadless.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalHeadless.d.ts", "development": "./LexicalHeadless.dev.js", "production": "./LexicalHeadless.prod.js", "default": "./LexicalHeadless.js" diff --git a/packages/lexical-history/package.json b/packages/lexical-history/package.json index d642f0f14185..4f59ef46eb09 100644 --- a/packages/lexical-history/package.json +++ b/packages/lexical-history/package.json @@ -10,7 +10,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalHistory.js", - "types": "index.d.ts", "dependencies": { "@lexical/utils": "0.14.5", "lexical": "0.14.5" @@ -25,14 +24,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalHistory.d.ts", "development": "./LexicalHistory.dev.mjs", "production": "./LexicalHistory.prod.mjs", "node": "./LexicalHistory.node.mjs", "default": "./LexicalHistory.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalHistory.d.ts", "development": "./LexicalHistory.dev.js", "production": "./LexicalHistory.prod.js", "default": "./LexicalHistory.js" diff --git a/packages/lexical-html/package.json b/packages/lexical-html/package.json index fa330cc5bd40..f62e7fde4db8 100644 --- a/packages/lexical-html/package.json +++ b/packages/lexical-html/package.json @@ -10,7 +10,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalHtml.js", - "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/facebook/lexical", @@ -26,14 +25,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalHtml.d.ts", "development": "./LexicalHtml.dev.mjs", "production": "./LexicalHtml.prod.mjs", "node": "./LexicalHtml.node.mjs", "default": "./LexicalHtml.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalHtml.d.ts", "development": "./LexicalHtml.dev.js", "production": "./LexicalHtml.prod.js", "default": "./LexicalHtml.js" diff --git a/packages/lexical-html/src/index.ts b/packages/lexical-html/src/index.ts index 52f946f8057a..328ac3e94f0c 100644 --- a/packages/lexical-html/src/index.ts +++ b/packages/lexical-html/src/index.ts @@ -52,7 +52,7 @@ export function $generateHtmlFromNodes( ): string { if ( typeof document === 'undefined' || - (typeof window === 'undefined' && typeof global.window === 'undefined') + (typeof window === 'undefined' && typeof globalThis.window === 'undefined') ) { throw new Error( 'To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.', diff --git a/packages/lexical-link/package.json b/packages/lexical-link/package.json index c9953490b310..6025ee87e072 100644 --- a/packages/lexical-link/package.json +++ b/packages/lexical-link/package.json @@ -10,7 +10,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalLink.js", - "types": "index.d.ts", "dependencies": { "@lexical/utils": "0.14.5", "lexical": "0.14.5" @@ -25,14 +24,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalLink.d.ts", "development": "./LexicalLink.dev.mjs", "production": "./LexicalLink.prod.mjs", "node": "./LexicalLink.node.mjs", "default": "./LexicalLink.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalLink.d.ts", "development": "./LexicalLink.dev.js", "production": "./LexicalLink.prod.js", "default": "./LexicalLink.js" diff --git a/packages/lexical-list/package.json b/packages/lexical-list/package.json index 5db96bf11389..4c9fbfdd114b 100644 --- a/packages/lexical-list/package.json +++ b/packages/lexical-list/package.json @@ -10,7 +10,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalList.js", - "types": "index.d.ts", "dependencies": { "@lexical/utils": "0.14.5", "lexical": "0.14.5" @@ -25,14 +24,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalList.d.ts", "development": "./LexicalList.dev.mjs", "production": "./LexicalList.prod.mjs", "node": "./LexicalList.node.mjs", "default": "./LexicalList.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalList.d.ts", "development": "./LexicalList.dev.js", "production": "./LexicalList.prod.js", "default": "./LexicalList.js" diff --git a/packages/lexical-mark/package.json b/packages/lexical-mark/package.json index a75f3cfcf757..6db8da82abc0 100644 --- a/packages/lexical-mark/package.json +++ b/packages/lexical-mark/package.json @@ -10,7 +10,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalMark.js", - "types": "index.d.ts", "dependencies": { "@lexical/utils": "0.14.5", "lexical": "0.14.5" @@ -25,14 +24,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalMark.d.ts", "development": "./LexicalMark.dev.mjs", "production": "./LexicalMark.prod.mjs", "node": "./LexicalMark.node.mjs", "default": "./LexicalMark.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalMark.d.ts", "development": "./LexicalMark.dev.js", "production": "./LexicalMark.prod.js", "default": "./LexicalMark.js" diff --git a/packages/lexical-markdown/package.json b/packages/lexical-markdown/package.json index 013cedab31b1..88990f62c051 100644 --- a/packages/lexical-markdown/package.json +++ b/packages/lexical-markdown/package.json @@ -10,7 +10,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalMarkdown.js", - "types": "index.d.ts", "dependencies": { "@lexical/code": "0.14.5", "@lexical/link": "0.14.5", @@ -30,14 +29,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalMarkdown.d.ts", "development": "./LexicalMarkdown.dev.mjs", "production": "./LexicalMarkdown.prod.mjs", "node": "./LexicalMarkdown.node.mjs", "default": "./LexicalMarkdown.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalMarkdown.d.ts", "development": "./LexicalMarkdown.dev.js", "production": "./LexicalMarkdown.prod.js", "default": "./LexicalMarkdown.js" diff --git a/packages/lexical-offset/package.json b/packages/lexical-offset/package.json index 930741e2d514..7b586c12448f 100644 --- a/packages/lexical-offset/package.json +++ b/packages/lexical-offset/package.json @@ -10,7 +10,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalOffset.js", - "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/facebook/lexical", @@ -21,14 +20,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalOffset.d.ts", "development": "./LexicalOffset.dev.mjs", "production": "./LexicalOffset.prod.mjs", "node": "./LexicalOffset.node.mjs", "default": "./LexicalOffset.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalOffset.d.ts", "development": "./LexicalOffset.dev.js", "production": "./LexicalOffset.prod.js", "default": "./LexicalOffset.js" diff --git a/packages/lexical-overflow/package.json b/packages/lexical-overflow/package.json index 9474f6a4ad06..ebab034d8cca 100644 --- a/packages/lexical-overflow/package.json +++ b/packages/lexical-overflow/package.json @@ -10,7 +10,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalOverflow.js", - "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/facebook/lexical", @@ -21,14 +20,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalOverflow.d.ts", "development": "./LexicalOverflow.dev.mjs", "production": "./LexicalOverflow.prod.mjs", "node": "./LexicalOverflow.node.mjs", "default": "./LexicalOverflow.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalOverflow.d.ts", "development": "./LexicalOverflow.dev.js", "production": "./LexicalOverflow.prod.js", "default": "./LexicalOverflow.js" diff --git a/packages/lexical-plain-text/package.json b/packages/lexical-plain-text/package.json index 3927be3d489d..391e29d18572 100644 --- a/packages/lexical-plain-text/package.json +++ b/packages/lexical-plain-text/package.json @@ -9,7 +9,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalPlainText.js", - "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/facebook/lexical", @@ -20,14 +19,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalPlainText.d.ts", "development": "./LexicalPlainText.dev.mjs", "production": "./LexicalPlainText.prod.mjs", "node": "./LexicalPlainText.node.mjs", "default": "./LexicalPlainText.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalPlainText.d.ts", "development": "./LexicalPlainText.dev.js", "production": "./LexicalPlainText.prod.js", "default": "./LexicalPlainText.js" diff --git a/packages/lexical-rich-text/package.json b/packages/lexical-rich-text/package.json index ea8eee04a36e..2ea846d23184 100644 --- a/packages/lexical-rich-text/package.json +++ b/packages/lexical-rich-text/package.json @@ -9,7 +9,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalRichText.js", - "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/facebook/lexical", @@ -20,14 +19,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalRichText.d.ts", "development": "./LexicalRichText.dev.mjs", "production": "./LexicalRichText.prod.mjs", "node": "./LexicalRichText.node.mjs", "default": "./LexicalRichText.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalRichText.d.ts", "development": "./LexicalRichText.dev.js", "production": "./LexicalRichText.prod.js", "default": "./LexicalRichText.js" diff --git a/packages/lexical-selection/package.json b/packages/lexical-selection/package.json index d1c119bbf4b1..a1165808742c 100644 --- a/packages/lexical-selection/package.json +++ b/packages/lexical-selection/package.json @@ -11,7 +11,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalSelection.js", - "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/facebook/lexical", @@ -22,14 +21,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalSelection.d.ts", "development": "./LexicalSelection.dev.mjs", "production": "./LexicalSelection.prod.mjs", "node": "./LexicalSelection.node.mjs", "default": "./LexicalSelection.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalSelection.d.ts", "development": "./LexicalSelection.dev.js", "production": "./LexicalSelection.prod.js", "default": "./LexicalSelection.js" diff --git a/packages/lexical-table/package.json b/packages/lexical-table/package.json index de91cbebdb2c..3142d1a76037 100644 --- a/packages/lexical-table/package.json +++ b/packages/lexical-table/package.json @@ -10,7 +10,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalTable.js", - "types": "index.d.ts", "dependencies": { "@lexical/utils": "0.14.5", "lexical": "0.14.5" @@ -25,14 +24,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalTable.d.ts", "development": "./LexicalTable.dev.mjs", "production": "./LexicalTable.prod.mjs", "node": "./LexicalTable.node.mjs", "default": "./LexicalTable.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalTable.d.ts", "development": "./LexicalTable.dev.js", "production": "./LexicalTable.prod.js", "default": "./LexicalTable.js" diff --git a/packages/lexical-text/package.json b/packages/lexical-text/package.json index 00a95fd6a20a..55f36f69d93a 100644 --- a/packages/lexical-text/package.json +++ b/packages/lexical-text/package.json @@ -11,7 +11,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalText.js", - "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/facebook/lexical", @@ -22,14 +21,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalText.d.ts", "development": "./LexicalText.dev.mjs", "production": "./LexicalText.prod.mjs", "node": "./LexicalText.node.mjs", "default": "./LexicalText.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalText.d.ts", "development": "./LexicalText.dev.js", "production": "./LexicalText.prod.js", "default": "./LexicalText.js" diff --git a/packages/lexical-utils/package.json b/packages/lexical-utils/package.json index 78540c6c02cc..874c1049bcfc 100644 --- a/packages/lexical-utils/package.json +++ b/packages/lexical-utils/package.json @@ -10,7 +10,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalUtils.js", - "types": "index.d.ts", "dependencies": { "@lexical/list": "0.14.5", "@lexical/selection": "0.14.5", @@ -27,14 +26,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalUtils.d.ts", "development": "./LexicalUtils.dev.mjs", "production": "./LexicalUtils.prod.mjs", "node": "./LexicalUtils.node.mjs", "default": "./LexicalUtils.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalUtils.d.ts", "development": "./LexicalUtils.dev.js", "production": "./LexicalUtils.prod.js", "default": "./LexicalUtils.js" diff --git a/packages/lexical-yjs/index.ts b/packages/lexical-yjs/index.ts deleted file mode 100644 index ed15b7e92ba9..000000000000 --- a/packages/lexical-yjs/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ - -module.exports = require('./dist/LexicalYjs.js'); diff --git a/packages/lexical-yjs/package.json b/packages/lexical-yjs/package.json index 46941f47b1b9..3d763d5349f6 100644 --- a/packages/lexical-yjs/package.json +++ b/packages/lexical-yjs/package.json @@ -13,7 +13,6 @@ "license": "MIT", "version": "0.14.5", "main": "LexicalYjs.js", - "types": "index.d.ts", "dependencies": { "@lexical/offset": "0.14.5", "lexical": "0.14.5" @@ -31,14 +30,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./LexicalYjs.d.ts", "development": "./LexicalYjs.dev.mjs", "production": "./LexicalYjs.prod.mjs", "node": "./LexicalYjs.node.mjs", "default": "./LexicalYjs.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./LexicalYjs.d.ts", "development": "./LexicalYjs.dev.js", "production": "./LexicalYjs.prod.js", "default": "./LexicalYjs.js" diff --git a/packages/lexical-yjs/types.ts b/packages/lexical-yjs/src/types.d.ts similarity index 100% rename from packages/lexical-yjs/types.ts rename to packages/lexical-yjs/src/types.d.ts diff --git a/packages/lexical/package.json b/packages/lexical/package.json index 99c2f26ddeba..6fc6d38c0695 100644 --- a/packages/lexical/package.json +++ b/packages/lexical/package.json @@ -11,7 +11,6 @@ "license": "MIT", "version": "0.14.5", "main": "Lexical.js", - "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/facebook/lexical", @@ -22,14 +21,14 @@ "exports": { ".": { "import": { - "types": "./index.d.ts", + "types": "./Lexical.d.ts", "development": "./Lexical.dev.mjs", "production": "./Lexical.prod.mjs", "node": "./Lexical.node.mjs", "default": "./Lexical.mjs" }, "require": { - "types": "./index.d.ts", + "types": "./Lexical.d.ts", "development": "./Lexical.dev.js", "production": "./Lexical.prod.js", "default": "./Lexical.js" diff --git a/scripts/build.js b/scripts/build.js index d271fcdf63c2..33d5d2faffd2 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -21,9 +21,10 @@ const extractErrorCodes = require('./error-codes/extract-errors'); const alias = require('@rollup/plugin-alias'); const compiler = require('@ampproject/rollup-plugin-closure-compiler'); const terser = require('@rollup/plugin-terser'); -const {exec} = require('child-process-promise'); const {packagesManager} = require('./shared/packagesManager'); const npmToWwwName = require('./www/npmToWwwName'); +const tsup = require('tsup'); +const fixupDts = require('./shared/fixupDts'); const headerTemplate = fs.readFileSync( path.resolve(__dirname, 'www', 'headerTemplate.js'), @@ -135,6 +136,7 @@ function getExtension(format) { */ async function build(name, inputFile, outputPath, outputFile, isProd, format) { const extensions = ['.js', '.jsx', '.ts', '.tsx']; + const comment = getComment(); const inputOptions = { external(modulePath, src) { return externals.includes(modulePath); @@ -239,11 +241,17 @@ async function build(name, inputFile, outputPath, outputFile, isProd, format) { { renderChunk(source) { // Assets pipeline might use "export" word in the beginning of the line - // as a dependency, avoiding it with empty comment in front - const patchedSource = isWWW - ? source.replace(/^(export(?!s))/gm, '/**/$1') - : source; - return `${getComment()}\n${patchedSource}`; + // as a dependency, avoiding it with empty comment in front. + // Also replace any copyright headers since we unconditionally + // add it to the front. + const patchedSource = ( + isWWW + ? source + .replace(/^(export(?!s))/gm, '/**/$1') + .replace(headerTemplate, '') + : source + ).replace(comment, ''); + return `${comment}\n${patchedSource}`; }, }, ], @@ -301,21 +309,43 @@ function getFileName(fileName, isProd, format) { } /** - * - * @param {string} packageName - * @param {string} outputPath + * @typedef {import('./shared/PackageMetadata').PackageMetadata} PackageMetadata + * @typedef {import('./shared/PackageMetadata').ModuleBuildDefinition} ModuleBuildDefinition */ -async function buildTSDeclarationFiles(packageName, outputPath) { - await exec('tsc -p ./tsconfig.build.json'); -} /** - * - * @param {string} packageName - * @param {string} outputPath + * @param {PackageMetadata} pkg + * @param {ModuleBuildDefinition[]} modules */ -function moveTSDeclarationFilesIntoDist(packageName, outputPath) { - fs.copySync(`./.ts-temp/packages/${packageName}/src`, outputPath); +async function buildTSDeclarationFiles(pkg, modules) { + /** + * Package dir relative paths to source files + * @type {Record} + */ + const entrypoints = {}; + /** Absolute paths to dist .d.ts files */ + const outputs = []; + for (const {sourceFileName, outputFileName} of modules) { + entrypoints[outputFileName] = `src/${sourceFileName}`; + outputs.push(pkg.resolve('dist', `${outputFileName}.d.ts`)); + } + /** Preserve the cwd since we need to chdir for tsup to work properly */ + const cwd = process.cwd(); + try { + process.chdir(pkg.resolve()); + await tsup.build( + await tsup.defineConfig({ + dts: {only: true}, + entry: entrypoints, + noExternal: [/^shared($|\/)/], + silent: true, + tsconfig: '../../tsconfig.build.json', + }), + ); + } finally { + process.chdir(cwd); + } + outputs.forEach(fixupDts); } /** @@ -391,14 +421,13 @@ function buildForkModules(outputPath, outputFileName, format, exports) { } async function buildAll() { - if (!isWWW && (isRelease || isProduction)) { - await buildTSDeclarationFiles(); - } - const formats = isWWW ? ['cjs'] : ['cjs', 'esm']; for (const pkg of packagesManager.getPublicPackages()) { - const {name, sourcePath, outputPath, packageName, modules} = + const {name, sourcePath, outputPath, modules} = pkg.getPackageBuildDefinition(); + if (!isWWW && (isRelease || isProduction)) { + await buildTSDeclarationFiles(pkg, modules); + } for (const module of modules) { for (const format of formats) { const {sourceFileName, outputFileName} = module; @@ -432,10 +461,6 @@ async function buildAll() { } } } - - if (!isWWW && (isRelease || isProduction)) { - moveTSDeclarationFilesIntoDist(packageName, outputPath); - } } } diff --git a/scripts/npm/npm-init.js b/scripts/npm/npm-init.js index 44ab8d4b9fef..b94c67e7e051 100644 --- a/scripts/npm/npm-init.js +++ b/scripts/npm/npm-init.js @@ -40,5 +40,4 @@ module.exports = { license: lexicalPkg.packageJson.license, repository: {...lexicalPkg.packageJson.repository, directory: workspace}, main: `${npmToWwwName(pkgDirName)}.js`, - types: 'index.d.ts', }; diff --git a/scripts/shared/fixupDts.js b/scripts/shared/fixupDts.js new file mode 100644 index 000000000000..82dcfbec5ef6 --- /dev/null +++ b/scripts/shared/fixupDts.js @@ -0,0 +1,61 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + */ + +'use strict'; +const fs = require('fs-extra'); +const ts = require('typescript'); +const prettier = require('prettier'); + +const headerTemplate = fs.readFileSync( + './scripts/www/headerTemplate.js', + 'utf-8', +); + +/** + * Remove all declare global {} statements from output .d.ts files. + * + * @param {string} dtsPath + */ +module.exports = function fixupDts(dtsPath) { + const ast = ts.createSourceFile( + dtsPath, + fs.readFileSync(dtsPath, 'utf-8'), + ts.ScriptTarget.Latest, + ); + ast.statements = ts.factory.createNodeArray( + ast.statements.filter((statement) => { + switch (statement.kind) { + case ts.SyntaxKind.ModuleDeclaration: { + const modDecl = + /** @type {import('typescript').ModuleDeclaration} */ (statement); + if (modDecl.name.text === 'global') { + return false; + } + break; + } + } + return true; + }), + ); + const printer = ts.createPrinter({ + newLine: ts.NewLineKind.LineFeed, + removeComments: false, + }); + const contents = + headerTemplate + + prettier.format(printer.printFile(ast).replaceAll(headerTemplate, ''), { + filepath: dtsPath, + singleQuote: true, + }); + // Note that we can't fix up the false exports because if a module exports + // a default and a type then the `export =` syntax can't be used + // https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseExportDefault.md + // example: + // npx @arethetypeswrong/cli --pack packages/lexical-react/npm --ignore-rules false-export-default --ignore-rules false-cjs + fs.writeFileSync(dtsPath, contents); +}; diff --git a/scripts/updateVersion.js b/scripts/updateVersion.js index ffcdb5e529d4..d6b9f8adc8f4 100644 --- a/scripts/updateVersion.js +++ b/scripts/updateVersion.js @@ -97,6 +97,10 @@ function exportEntry(basename, typesBasename = `${basename}.d.ts`) { return { /* eslint-disable sort-keys-fix/sort-keys-fix */ import: { + // This can trigger the false CJS warning but that is ok since + // the types really are indistinguishable with the resolution + // settings that we care about + // https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md types, ...withEnvironments(`${prefix}.mjs`), node: `${prefix}.node.mjs`, diff --git a/tsconfig.build.json b/tsconfig.build.json index dc17b674c796..75e557010de9 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -3,6 +3,7 @@ "noEmit": false, "declaration": true, "emitDeclarationOnly": true, + "useDefineForClassFields": false, "declarationDir": "./.ts-temp", "strict": true, "paths": {