From a433c7556c58b4363970717bd64dafafb1af553a Mon Sep 17 00:00:00 2001 From: CCherry07 <2405693142@qq.com> Date: Sun, 13 Oct 2024 12:16:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat(rust-plugins):=20=F0=9F=8E=B8=20vue-js?= =?UTF-8?q?x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 9 + rust-plugins/vue-jsx/.gitignore | 197 + rust-plugins/vue-jsx/Cargo.lock | 2192 +++++++++++ rust-plugins/vue-jsx/Cargo.toml | 19 + .../vue-jsx/npm/darwin-arm64/README.md | 3 + .../vue-jsx/npm/darwin-arm64/package.json | 18 + rust-plugins/vue-jsx/npm/darwin-x64/README.md | 3 + .../vue-jsx/npm/darwin-x64/package.json | 18 + .../vue-jsx/npm/linux-arm64-gnu/README.md | 3 + .../vue-jsx/npm/linux-arm64-gnu/package.json | 21 + .../vue-jsx/npm/linux-arm64-musl/README.md | 3 + .../vue-jsx/npm/linux-arm64-musl/package.json | 21 + .../vue-jsx/npm/linux-x64-gnu/README.md | 3 + .../vue-jsx/npm/linux-x64-gnu/package.json | 21 + .../vue-jsx/npm/linux-x64-musl/README.md | 3 + .../vue-jsx/npm/linux-x64-musl/package.json | 18 + .../vue-jsx/npm/win32-arm64-msvc/README.md | 3 + .../vue-jsx/npm/win32-arm64-msvc/package.json | 18 + .../vue-jsx/npm/win32-ia32-msvc/README.md | 3 + .../vue-jsx/npm/win32-ia32-msvc/package.json | 18 + .../vue-jsx/npm/win32-x64-msvc/README.md | 3 + .../vue-jsx/npm/win32-x64-msvc/package.json | 18 + rust-plugins/vue-jsx/options.d.ts | 3 + rust-plugins/vue-jsx/package.json | 43 + rust-plugins/vue-jsx/playground/.gitignore | 22 + rust-plugins/vue-jsx/playground/README.md | 37 + .../vue-jsx/playground/farm.config.ts | 6 + rust-plugins/vue-jsx/playground/index.html | 16 + rust-plugins/vue-jsx/playground/package.json | 20 + .../vue-jsx/playground/public/favicon.ico | Bin 0 -> 4154 bytes rust-plugins/vue-jsx/playground/src/App.vue | 32 + .../vue-jsx/playground/src/assets/logo.png | Bin 0 -> 16859 bytes .../vue-jsx/playground/src/assets/vue.svg | 1 + .../playground/src/components/HelloWorld.vue | 32 + rust-plugins/vue-jsx/playground/src/env.d.ts | 2 + rust-plugins/vue-jsx/playground/src/index.ts | 5 + rust-plugins/vue-jsx/playground/src/style.css | 80 + rust-plugins/vue-jsx/playground/tsconfig.json | 25 + .../vue-jsx/playground/tsconfig.node.json | 11 + rust-plugins/vue-jsx/pnpm-lock.yaml | 3232 +++++++++++++++++ rust-plugins/vue-jsx/pnpm-workspace.yaml | 3 + rust-plugins/vue-jsx/rust-toolchain.toml | 3 + rust-plugins/vue-jsx/rustfmt.toml | 2 + rust-plugins/vue-jsx/scripts/func.js | 3 + rust-plugins/vue-jsx/scripts/index.d.ts | 3 + rust-plugins/vue-jsx/scripts/index.js | 124 + rust-plugins/vue-jsx/scripts/watch.sh | 3 + rust-plugins/vue-jsx/src/lib.rs | 20 + 48 files changed, 6343 insertions(+) create mode 100644 rust-plugins/vue-jsx/.gitignore create mode 100644 rust-plugins/vue-jsx/Cargo.lock create mode 100644 rust-plugins/vue-jsx/Cargo.toml create mode 100644 rust-plugins/vue-jsx/npm/darwin-arm64/README.md create mode 100644 rust-plugins/vue-jsx/npm/darwin-arm64/package.json create mode 100644 rust-plugins/vue-jsx/npm/darwin-x64/README.md create mode 100644 rust-plugins/vue-jsx/npm/darwin-x64/package.json create mode 100644 rust-plugins/vue-jsx/npm/linux-arm64-gnu/README.md create mode 100644 rust-plugins/vue-jsx/npm/linux-arm64-gnu/package.json create mode 100644 rust-plugins/vue-jsx/npm/linux-arm64-musl/README.md create mode 100644 rust-plugins/vue-jsx/npm/linux-arm64-musl/package.json create mode 100644 rust-plugins/vue-jsx/npm/linux-x64-gnu/README.md create mode 100644 rust-plugins/vue-jsx/npm/linux-x64-gnu/package.json create mode 100644 rust-plugins/vue-jsx/npm/linux-x64-musl/README.md create mode 100644 rust-plugins/vue-jsx/npm/linux-x64-musl/package.json create mode 100644 rust-plugins/vue-jsx/npm/win32-arm64-msvc/README.md create mode 100644 rust-plugins/vue-jsx/npm/win32-arm64-msvc/package.json create mode 100644 rust-plugins/vue-jsx/npm/win32-ia32-msvc/README.md create mode 100644 rust-plugins/vue-jsx/npm/win32-ia32-msvc/package.json create mode 100644 rust-plugins/vue-jsx/npm/win32-x64-msvc/README.md create mode 100644 rust-plugins/vue-jsx/npm/win32-x64-msvc/package.json create mode 100644 rust-plugins/vue-jsx/options.d.ts create mode 100644 rust-plugins/vue-jsx/package.json create mode 100644 rust-plugins/vue-jsx/playground/.gitignore create mode 100644 rust-plugins/vue-jsx/playground/README.md create mode 100644 rust-plugins/vue-jsx/playground/farm.config.ts create mode 100644 rust-plugins/vue-jsx/playground/index.html create mode 100644 rust-plugins/vue-jsx/playground/package.json create mode 100644 rust-plugins/vue-jsx/playground/public/favicon.ico create mode 100644 rust-plugins/vue-jsx/playground/src/App.vue create mode 100644 rust-plugins/vue-jsx/playground/src/assets/logo.png create mode 100644 rust-plugins/vue-jsx/playground/src/assets/vue.svg create mode 100644 rust-plugins/vue-jsx/playground/src/components/HelloWorld.vue create mode 100644 rust-plugins/vue-jsx/playground/src/env.d.ts create mode 100644 rust-plugins/vue-jsx/playground/src/index.ts create mode 100644 rust-plugins/vue-jsx/playground/src/style.css create mode 100644 rust-plugins/vue-jsx/playground/tsconfig.json create mode 100644 rust-plugins/vue-jsx/playground/tsconfig.node.json create mode 100644 rust-plugins/vue-jsx/pnpm-lock.yaml create mode 100644 rust-plugins/vue-jsx/pnpm-workspace.yaml create mode 100644 rust-plugins/vue-jsx/rust-toolchain.toml create mode 100644 rust-plugins/vue-jsx/rustfmt.toml create mode 100644 rust-plugins/vue-jsx/scripts/func.js create mode 100644 rust-plugins/vue-jsx/scripts/index.d.ts create mode 100644 rust-plugins/vue-jsx/scripts/index.js create mode 100644 rust-plugins/vue-jsx/scripts/watch.sh create mode 100644 rust-plugins/vue-jsx/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index aec7f8e..5e01c64 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -867,6 +867,15 @@ dependencies = [ "farmfe_toolkit_plugin_types", ] +[[package]] +name = "farmfe_plugin_vue_jsx" +version = "0.0.0" +dependencies = [ + "farmfe_core", + "farmfe_macro_plugin", + "farmfe_toolkit_plugin_types", +] + [[package]] name = "farmfe_plugin_yaml" version = "0.0.1" diff --git a/rust-plugins/vue-jsx/.gitignore b/rust-plugins/vue-jsx/.gitignore new file mode 100644 index 0000000..50e4f22 --- /dev/null +++ b/rust-plugins/vue-jsx/.gitignore @@ -0,0 +1,197 @@ +# Created by https://www.toptal.com/developers/gitignore/api/node +# Edit at https://www.toptal.com/developers/gitignore?templates=node + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# End of https://www.toptal.com/developers/gitignore/api/node + +# Created by https://www.toptal.com/developers/gitignore/api/macos +# Edit at https://www.toptal.com/developers/gitignore?templates=macos + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +# End of https://www.toptal.com/developers/gitignore/api/macos + +# Created by https://www.toptal.com/developers/gitignore/api/windows +# Edit at https://www.toptal.com/developers/gitignore?templates=windows + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/windows + +#Added by cargo + +/target +# Cargo.lock + +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions + +*.farm diff --git a/rust-plugins/vue-jsx/Cargo.lock b/rust-plugins/vue-jsx/Cargo.lock new file mode 100644 index 0000000..7fdd132 --- /dev/null +++ b/rust-plugins/vue-jsx/Cargo.lock @@ -0,0 +1,2192 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "serde", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "ast_node" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab31376d309dd3bfc9cfb3c11c93ce0e0741bbe0354b20e7f8c60b044730b79" +dependencies = [ + "proc-macro2", + "quote", + "swc_macros_common", + "syn 2.0.65", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64-simd" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "781dd20c3aff0bd194fe7d2a977dd92f21c173891f3a03b677359e5fa457e5d5" +dependencies = [ + "simd-abstraction", +] + +[[package]] +name = "better_scoped_tls" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "794edcc9b3fb07bb4aecaa11f093fd45663b4feadb782d68303a2268bc2701de" +dependencies = [ + "scoped-tls", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "browserslist-rs" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdf0ca73de70c3da94e4194e4a01fe732378f55d47cf4c0588caab22a0dbfa14" +dependencies = [ + "ahash 0.8.8", + "chrono", + "either", + "indexmap", + "itertools 0.13.0", + "nom", + "once_cell", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "bstr" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + +[[package]] +name = "bytecheck" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" +dependencies = [ + "bytecheck_derive 0.6.11", + "ptr_meta", + "simdutf8", +] + +[[package]] +name = "bytecheck" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41502630fe304ce54cbb2f8389e017784dee2b0328147779fcbe43b9db06d35d" +dependencies = [ + "bytecheck_derive 0.7.0", + "ptr_meta", + "simdutf8", +] + +[[package]] +name = "bytecheck_derive" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bytecheck_derive" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda88c587085bc07dc201ab9df871bd9baa5e07f7754b745e4d7194b43ac1eda" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "windows-targets 0.52.0", +] + +[[package]] +name = "const_format" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "ctor" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.3", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "data-encoding" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" + +[[package]] +name = "debugid" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" +dependencies = [ + "serde", + "uuid", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "enhanced-magic-string" +version = "0.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6082b74cc322c69840d97a7d7cba3ee9ed34fa70536fb51a69824f36742960f5" +dependencies = [ + "base64 0.22.1", + "farmfe_utils", + "parking_lot", + "regex", + "sourcemap", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "farm_plugin_test1" +version = "0.0.0" +dependencies = [ + "farmfe_core", + "farmfe_macro_plugin", + "farmfe_toolkit_plugin_types", +] + +[[package]] +name = "farmfe_core" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ace47d8f9846d426af3462d631690d5eba8ae778f58ce4b096d410975d9df6f" +dependencies = [ + "blake2", + "bytecheck 0.7.0", + "dashmap", + "downcast-rs", + "enhanced-magic-string", + "farmfe_macro_cache_item", + "farmfe_utils", + "globset", + "heck", + "hex", + "parking_lot", + "petgraph", + "ptr_meta", + "rayon", + "regex", + "relative-path", + "rkyv", + "rkyv_dyn", + "rkyv_typename", + "serde", + "serde_json", + "swc_common", + "swc_css_ast", + "swc_css_prefixer", + "swc_ecma_ast", + "swc_ecma_parser", + "swc_html_ast", + "thiserror", + "wax", +] + +[[package]] +name = "farmfe_macro_cache_item" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61782617a57f8fa265ce3b4111763d703d457fef83c06341d2eed55cbc06297" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "farmfe_macro_plugin" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "055ed906d281675468dc70294716c6af0b6b904f09fdd7b111865cc72b4f4933" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "farmfe_toolkit_plugin_types" +version = "0.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b9933e059e6d28fb4c81e78aabfd1ca9288feb7a9e2c0516b4f08ca8b2d5c80" +dependencies = [ + "farmfe_core", + "lazy_static", + "libloading", +] + +[[package]] +name = "farmfe_utils" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d797c8fb2b5c357bd730dc119169e663f8ae7dfbc606696350c104e39324749d" +dependencies = [ + "base64 0.21.7", + "pathdiff", + "sha2", +] + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "from_variant" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc9cc75639b041067353b9bce2450d6847e547276c6fbe4487d7407980e07db" +dependencies = [ + "proc-macro2", + "swc_macros_common", + "syn 2.0.65", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "ghost" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0e085ded9f1267c32176b40921b9754c474f7dd96f7e808d4a982e48aa1e854" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "globset" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +dependencies = [ + "aho-corasick", + "bstr", + "log", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.8", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hstr" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0f5356d62012374578cd3a5c013d6586de3efbca3b53379fc1edfbb95c9db14" +dependencies = [ + "hashbrown 0.14.3", + "new_debug_unreachable", + "once_cell", + "phf", + "rustc-hash", + "triomphe", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "if_chain" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", + "serde", +] + +[[package]] +name = "inventory" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0eb5160c60ba1e809707918ee329adb99d222888155835c6feedba19f6c3fd4" +dependencies = [ + "ctor", + "ghost", + "inventory-impl", +] + +[[package]] +name = "inventory-impl" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e41b53715c6f0c4be49510bb82dee2c1e51c8586d885abe65396e82ed518548" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "is-macro" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a85abdc13717906baccb5a1e435556ce0df215f242892f721dff62bf25288f" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "js-sys" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "memchr" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "miette" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" +dependencies = [ + "miette-derive", + "once_cell", + "thiserror", + "unicode-width", +] + +[[package]] +name = "miette-derive" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", + "serde", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "outref" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f222829ae9293e33a9f5e9f440c6760a3d450a64affe1846486b140db81c1f4" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "backtrace", + "cfg-if", + "libc", + "petgraph", + "redox_syscall", + "smallvec", + "thread-id", + "windows-targets 0.48.5", +] + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pori" +version = "0.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a63d338dec139f56dacc692ca63ad35a6be6a797442479b55acd611d79e906" +dependencies = [ + "nom", +] + +[[package]] +name = "preset_env_base" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b30eab18be480c194938e433e269d5298a279f6410f02fbc73f3576a325c110" +dependencies = [ + "ahash 0.8.8", + "anyhow", + "browserslist-rs", + "dashmap", + "from_variant", + "once_cell", + "semver 1.0.21", + "serde", + "st-map", + "tracing", +] + +[[package]] +name = "proc-macro2" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "psm" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +dependencies = [ + "cc", +] + +[[package]] +name = "ptr_meta" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" +dependencies = [ + "ptr_meta_derive", +] + +[[package]] +name = "ptr_meta_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" + +[[package]] +name = "rayon" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "regex" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "relative-path" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" + +[[package]] +name = "rend" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" +dependencies = [ + "bytecheck 0.6.11", +] + +[[package]] +name = "rkyv" +version = "0.7.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" +dependencies = [ + "bitvec", + "bytecheck 0.6.11", + "bytes", + "hashbrown 0.12.3", + "ptr_meta", + "rend", + "rkyv_derive", + "seahash", + "tinyvec", + "uuid", +] + +[[package]] +name = "rkyv_derive" +version = "0.7.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "rkyv_dyn" +version = "0.7.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7087f1bf1fdffcf7391cd0755df81c47f8a87fe863bab93f99d9f6bbf16b40b7" +dependencies = [ + "inventory", + "lazy_static", + "ptr_meta", + "rkyv", + "rkyv_dyn_derive", + "rkyv_typename", +] + +[[package]] +name = "rkyv_dyn_derive" +version = "0.7.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f21d9c9cfb6d952b4baf89f1ffcfaccd56e0f8c81510f5a7b04de2c034bad18" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "rkyv_typename" +version = "0.7.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f3b496694520c6001309c86ab52cf126d084778eb8a372b6bed1400f0562b8" +dependencies = [ + "rkyv_typename_derive", +] + +[[package]] +name = "rkyv_typename_derive" +version = "0.7.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05589f3fceeb5ad55f3a68b6ac56274feeb3c1b8215b4734d2562b78134a3551" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver 0.9.0", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "seahash" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +dependencies = [ + "serde", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + +[[package]] +name = "serde" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "serde_json" +version = "1.0.115" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "simd-abstraction" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cadb29c57caadc51ff8346233b5cec1d240b68ce55cf1afc764818791876987" +dependencies = [ + "outref", +] + +[[package]] +name = "simdutf8" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "smallvec" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e" + +[[package]] +name = "smartstring" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" +dependencies = [ + "autocfg", + "static_assertions", + "version_check", +] + +[[package]] +name = "sourcemap" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "208d40b9e8cad9f93613778ea295ed8f3c2b1824217c6cfc7219d3f6f45b96d4" +dependencies = [ + "base64-simd", + "bitvec", + "data-encoding", + "debugid", + "if_chain", + "rustc-hash", + "rustc_version", + "serde", + "serde_json", + "unicode-id-start", + "url", +] + +[[package]] +name = "st-map" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a8a5c4e5cc839409346495370b2df67489cafd7fa83616d0547a9697a6a89a1" +dependencies = [ + "arrayvec", + "static-map-macro", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "stacker" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "winapi", +] + +[[package]] +name = "static-map-macro" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf483ea7e0e3a03d1b91687895814425149ad77facd3e2b6839dde26da98454" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "string_enum" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e383308aebc257e7d7920224fa055c632478d92744eca77f99be8fa1545b90" +dependencies = [ + "proc-macro2", + "quote", + "swc_macros_common", + "syn 2.0.65", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "swc_atoms" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6567e4e67485b3e7662b486f1565bdae54bd5b9d6b16b2ba1a9babb1e42125" +dependencies = [ + "bytecheck 0.6.11", + "hstr", + "once_cell", + "rkyv", + "rustc-hash", + "serde", +] + +[[package]] +name = "swc_common" +version = "0.34.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9087befec6b63911f9d2f239e4f91c9b21589c169b86ed2d616944d23cf4a243" +dependencies = [ + "ast_node", + "better_scoped_tls", + "bytecheck 0.6.11", + "cfg-if", + "either", + "from_variant", + "new_debug_unreachable", + "num-bigint", + "once_cell", + "parking_lot", + "rkyv", + "rustc-hash", + "serde", + "siphasher", + "sourcemap", + "swc_atoms", + "swc_eq_ignore_macros", + "swc_visit", + "tracing", + "unicode-width", + "url", +] + +[[package]] +name = "swc_css_ast" +version = "0.141.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89a5f28ff625a89de2a269bde3ed3b99be74bb9d3dc78dea6f3b071991b2cbf4" +dependencies = [ + "is-macro", + "rkyv", + "string_enum", + "swc_atoms", + "swc_common", +] + +[[package]] +name = "swc_css_prefixer" +version = "0.155.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9930655060121c32d829e13fe4fa11294c03e71eb84c22e039703c929dcdf7" +dependencies = [ + "once_cell", + "preset_env_base", + "serde", + "serde_json", + "swc_atoms", + "swc_common", + "swc_css_ast", + "swc_css_utils", + "swc_css_visit", +] + +[[package]] +name = "swc_css_utils" +version = "0.138.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b135df778449825f38d54664bb179c839b3285f9a553ec10dd3cc3eafb751599" +dependencies = [ + "once_cell", + "serde", + "serde_json", + "swc_atoms", + "swc_common", + "swc_css_ast", + "swc_css_visit", +] + +[[package]] +name = "swc_css_visit" +version = "0.140.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c97dceaa18c8ae7f5a4c991e15efc5c333e5880b58ee6d61e42fd1365748ff05" +dependencies = [ + "serde", + "swc_atoms", + "swc_common", + "swc_css_ast", + "swc_visit", +] + +[[package]] +name = "swc_ecma_ast" +version = "0.115.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7be1306930c235435a892104c00c2b5e16231043c085d5a10bd3e7537b15659b" +dependencies = [ + "bitflags 2.5.0", + "bytecheck 0.6.11", + "is-macro", + "num-bigint", + "phf", + "rkyv", + "scoped-tls", + "serde", + "string_enum", + "swc_atoms", + "swc_common", + "unicode-id-start", +] + +[[package]] +name = "swc_ecma_parser" +version = "0.146.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a4e0c2e85f12c63b85c805e923079b04d1fb3e25edd069d638eed5f2098de74" +dependencies = [ + "either", + "new_debug_unreachable", + "num-bigint", + "num-traits", + "phf", + "serde", + "smallvec", + "smartstring", + "stacker", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "tracing", + "typed-arena", +] + +[[package]] +name = "swc_eq_ignore_macros" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "695a1d8b461033d32429b5befbf0ad4d7a2c4d6ba9cd5ba4e0645c615839e8e4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "swc_html_ast" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b909aca7c9cbd630a461d4a0a1d476ac13704dc515d2a79264c93d3280b02d23" +dependencies = [ + "is-macro", + "rkyv", + "string_enum", + "swc_atoms", + "swc_common", +] + +[[package]] +name = "swc_macros_common" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91745f3561057493d2da768437c427c0e979dff7396507ae02f16c981c4a8466" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "swc_visit" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043d11fe683dcb934583ead49405c0896a5af5face522e4682c16971ef7871b9" +dependencies = [ + "either", + "swc_visit_macros", +] + +[[package]] +name = "swc_visit_macros" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae9ef18ff8daffa999f729db056d2821cd2f790f3a11e46422d19f46bb193e7" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "swc_macros_common", + "syn 2.0.65", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2863d96a84c6439701d7a38f9de935ec562c8832cc55d1dde0f513b52fad106" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tardar" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900c942f83b6a8b9998cc8f74ad3ffa24b7ff3c4279ea1c1c52d95dced9f3516" +dependencies = [ + "miette", + "vec1", +] + +[[package]] +name = "thiserror" +version = "1.0.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "thread-id" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0ec81c46e9eb50deaa257be2f148adf052d1fb7701cfd55ccfab2525280b70b" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "triomphe" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" +dependencies = [ + "serde", + "stable_deref_trait", +] + +[[package]] +name = "typed-arena" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-id-start" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02aebfa694eccbbbffdd92922c7de136b9fe764396d2f10e21bce1681477cfc1" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-width" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "uuid" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" + +[[package]] +name = "vec1" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab68b56840f69efb0fefbe3ab6661499217ffdc58e2eef7c3f6f69835386322" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.65", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" + +[[package]] +name = "wax" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d12a78aa0bab22d2f26ed1a96df7ab58e8a93506a3e20adb47c51a93b4e1357" +dependencies = [ + "const_format", + "itertools 0.11.0", + "miette", + "nom", + "pori", + "regex", + "tardar", + "thiserror", + "walkdir", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] diff --git a/rust-plugins/vue-jsx/Cargo.toml b/rust-plugins/vue-jsx/Cargo.toml new file mode 100644 index 0000000..0d4feb2 --- /dev/null +++ b/rust-plugins/vue-jsx/Cargo.toml @@ -0,0 +1,19 @@ +[package] +edition = "2021" +name = "farmfe_plugin_vue_jsx" +version = "0.0.0" + +[lib] +crate-type = ["cdylib", "rlib"] + +[dependencies] +farmfe_core = { workspace = true } +farmfe_toolkit_plugin_types = { workspace = true } +farmfe_macro_plugin = { workspace = true } +swc-vue-jsx-visitor = "0.3.2" +swc_core = { version = "0.99", features = [ + "ecma_parser", + "ecma_plugin_transform", + "ecma_utils", +] } + diff --git a/rust-plugins/vue-jsx/npm/darwin-arm64/README.md b/rust-plugins/vue-jsx/npm/darwin-arm64/README.md new file mode 100644 index 0000000..294e4f8 --- /dev/null +++ b/rust-plugins/vue-jsx/npm/darwin-arm64/README.md @@ -0,0 +1,3 @@ +# `farmfe-plugin-vue-jsx-darwin-arm64` + +This is the **aarch64-apple-darwin** binary for `farmfe-plugin-vue-jsx` diff --git a/rust-plugins/vue-jsx/npm/darwin-arm64/package.json b/rust-plugins/vue-jsx/npm/darwin-arm64/package.json new file mode 100644 index 0000000..5f8df12 --- /dev/null +++ b/rust-plugins/vue-jsx/npm/darwin-arm64/package.json @@ -0,0 +1,18 @@ +{ + "name": "farmfe-plugin-vue-jsx-darwin-arm64", + "version": "0.1.2", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} diff --git a/rust-plugins/vue-jsx/npm/darwin-x64/README.md b/rust-plugins/vue-jsx/npm/darwin-x64/README.md new file mode 100644 index 0000000..d5e52e3 --- /dev/null +++ b/rust-plugins/vue-jsx/npm/darwin-x64/README.md @@ -0,0 +1,3 @@ +# `farmfe-plugin-vue-jsx-darwin-x64` + +This is the **x86_64-apple-darwin** binary for `farmfe-plugin-vue-jsx` diff --git a/rust-plugins/vue-jsx/npm/darwin-x64/package.json b/rust-plugins/vue-jsx/npm/darwin-x64/package.json new file mode 100644 index 0000000..46d9c0c --- /dev/null +++ b/rust-plugins/vue-jsx/npm/darwin-x64/package.json @@ -0,0 +1,18 @@ +{ + "name": "farmfe-plugin-vue-jsx-darwin-x64", + "version": "0.0.0", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} diff --git a/rust-plugins/vue-jsx/npm/linux-arm64-gnu/README.md b/rust-plugins/vue-jsx/npm/linux-arm64-gnu/README.md new file mode 100644 index 0000000..2a09fa1 --- /dev/null +++ b/rust-plugins/vue-jsx/npm/linux-arm64-gnu/README.md @@ -0,0 +1,3 @@ +# `farmfe-plugin-vue-jsx-linux-arm64-gnu` + +This is the **aarch64-unknown-linux-gnu** binary for `farmfe-plugin-vue-jsx` diff --git a/rust-plugins/vue-jsx/npm/linux-arm64-gnu/package.json b/rust-plugins/vue-jsx/npm/linux-arm64-gnu/package.json new file mode 100644 index 0000000..e915539 --- /dev/null +++ b/rust-plugins/vue-jsx/npm/linux-arm64-gnu/package.json @@ -0,0 +1,21 @@ +{ + "name": "farmfe-plugin-vue-jsx-linux-arm64-gnu", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "glibc" + ] +} diff --git a/rust-plugins/vue-jsx/npm/linux-arm64-musl/README.md b/rust-plugins/vue-jsx/npm/linux-arm64-musl/README.md new file mode 100644 index 0000000..48fa3b1 --- /dev/null +++ b/rust-plugins/vue-jsx/npm/linux-arm64-musl/README.md @@ -0,0 +1,3 @@ +# `farmfe-plugin-vue-jsx-linux-arm64-musl` + +This is the **aarch64-unknown-linux-musl** binary for `farmfe-plugin-vue-jsx` diff --git a/rust-plugins/vue-jsx/npm/linux-arm64-musl/package.json b/rust-plugins/vue-jsx/npm/linux-arm64-musl/package.json new file mode 100644 index 0000000..d339077 --- /dev/null +++ b/rust-plugins/vue-jsx/npm/linux-arm64-musl/package.json @@ -0,0 +1,21 @@ +{ + "name": "farmfe-plugin-vue-jsx-linux-arm64-musl", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "glibc" + ] +} diff --git a/rust-plugins/vue-jsx/npm/linux-x64-gnu/README.md b/rust-plugins/vue-jsx/npm/linux-x64-gnu/README.md new file mode 100644 index 0000000..6745159 --- /dev/null +++ b/rust-plugins/vue-jsx/npm/linux-x64-gnu/README.md @@ -0,0 +1,3 @@ +# `farmfe-plugin-vue-jsx-linux-x64-gnu` + +This is the **x86_64-unknown-linux-gnu** binary for `farmfe-plugin-vue-jsx` diff --git a/rust-plugins/vue-jsx/npm/linux-x64-gnu/package.json b/rust-plugins/vue-jsx/npm/linux-x64-gnu/package.json new file mode 100644 index 0000000..894d0c9 --- /dev/null +++ b/rust-plugins/vue-jsx/npm/linux-x64-gnu/package.json @@ -0,0 +1,21 @@ +{ + "name": "farmfe-plugin-vue-jsx-linux-x64-gnu", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "glibc" + ] +} diff --git a/rust-plugins/vue-jsx/npm/linux-x64-musl/README.md b/rust-plugins/vue-jsx/npm/linux-x64-musl/README.md new file mode 100644 index 0000000..307ea83 --- /dev/null +++ b/rust-plugins/vue-jsx/npm/linux-x64-musl/README.md @@ -0,0 +1,3 @@ +# `farmfe-plugin-vue-jsx-linux-x64-musl` + +This is the **x86_64-unknown-linux-musl** binary for `farmfe-plugin-vue-jsx` diff --git a/rust-plugins/vue-jsx/npm/linux-x64-musl/package.json b/rust-plugins/vue-jsx/npm/linux-x64-musl/package.json new file mode 100644 index 0000000..da16178 --- /dev/null +++ b/rust-plugins/vue-jsx/npm/linux-x64-musl/package.json @@ -0,0 +1,18 @@ +{ + "name": "farmfe-plugin-vue-jsx-linux-x64-musl", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} diff --git a/rust-plugins/vue-jsx/npm/win32-arm64-msvc/README.md b/rust-plugins/vue-jsx/npm/win32-arm64-msvc/README.md new file mode 100644 index 0000000..f673b1f --- /dev/null +++ b/rust-plugins/vue-jsx/npm/win32-arm64-msvc/README.md @@ -0,0 +1,3 @@ +# `farmfe-plugin-vue-jsx-win32-arm64-msvc` + +This is the aarch64-pc-windows-msvc binary for `farmfe-plugin-vue-jsx` diff --git a/rust-plugins/vue-jsx/npm/win32-arm64-msvc/package.json b/rust-plugins/vue-jsx/npm/win32-arm64-msvc/package.json new file mode 100644 index 0000000..057e9b9 --- /dev/null +++ b/rust-plugins/vue-jsx/npm/win32-arm64-msvc/package.json @@ -0,0 +1,18 @@ +{ + "name": "farmfe-plugin-vue-jsx-win32-arm64-msvc", + "version": "0.0.0", + "os": [ + "win32" + ], + "cpu": [ + "arm64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} diff --git a/rust-plugins/vue-jsx/npm/win32-ia32-msvc/README.md b/rust-plugins/vue-jsx/npm/win32-ia32-msvc/README.md new file mode 100644 index 0000000..5e08b92 --- /dev/null +++ b/rust-plugins/vue-jsx/npm/win32-ia32-msvc/README.md @@ -0,0 +1,3 @@ +# `farmfe-plugin-vue-jsx-win32-ia32-msvc` + +This is the i686-pc-windows-msvc binary for `farmfe-plugin-vue-jsx` diff --git a/rust-plugins/vue-jsx/npm/win32-ia32-msvc/package.json b/rust-plugins/vue-jsx/npm/win32-ia32-msvc/package.json new file mode 100644 index 0000000..2693c3d --- /dev/null +++ b/rust-plugins/vue-jsx/npm/win32-ia32-msvc/package.json @@ -0,0 +1,18 @@ +{ + "name": "farmfe-plugin-vue-jsx-win32-ia32-msvc", + "version": "0.0.0", + "os": [ + "win32" + ], + "cpu": [ + "ia32" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} diff --git a/rust-plugins/vue-jsx/npm/win32-x64-msvc/README.md b/rust-plugins/vue-jsx/npm/win32-x64-msvc/README.md new file mode 100644 index 0000000..49551be --- /dev/null +++ b/rust-plugins/vue-jsx/npm/win32-x64-msvc/README.md @@ -0,0 +1,3 @@ +# `farmfe-plugin-vue-jsx-win32-x64-msvc` + +This is the **x86_64-pc-windows-msvc** binary for `farmfe-plugin-vue-jsx` diff --git a/rust-plugins/vue-jsx/npm/win32-x64-msvc/package.json b/rust-plugins/vue-jsx/npm/win32-x64-msvc/package.json new file mode 100644 index 0000000..5d460dc --- /dev/null +++ b/rust-plugins/vue-jsx/npm/win32-x64-msvc/package.json @@ -0,0 +1,18 @@ +{ + "name": "farmfe-plugin-vue-jsx-win32-x64-msvc", + "version": "0.0.0", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "index.farm", + "files": [ + "index.farm" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} diff --git a/rust-plugins/vue-jsx/options.d.ts b/rust-plugins/vue-jsx/options.d.ts new file mode 100644 index 0000000..876eb23 --- /dev/null +++ b/rust-plugins/vue-jsx/options.d.ts @@ -0,0 +1,3 @@ +export interface IPluginOptions { + +} diff --git a/rust-plugins/vue-jsx/package.json b/rust-plugins/vue-jsx/package.json new file mode 100644 index 0000000..3e42011 --- /dev/null +++ b/rust-plugins/vue-jsx/package.json @@ -0,0 +1,43 @@ +{ + "name": "farmfe-plugin-vue-jsx", + "version": "0.0.0", + "main": "scripts/index.js", + "types": "scripts/index.d.ts", + "type": "module", + "license": "MIT", + "devDependencies": { + "@farmfe/plugin-tools": "latest" + }, + "napi": { + "name": "farmfe_plugin_vue_jsx", + "triples": { + "additional": [ + "aarch64-apple-darwin", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-linux-musl", + "x86_64-unknown-linux-musl", + "i686-pc-windows-msvc", + "aarch64-pc-windows-msvc" + ] + } + }, + "exports": { + ".": { + "import": "./scripts/func.js", + "types": "./scripts/index.d.ts", + "default": "./scripts/index.js" + }, + "./package.json": "./package.json" + }, + "scripts": { + "dev": "cargo watch -w src -s 'scripts/watch.sh'", + "bump": "npx changeset version", + "play": "pnpm --filter playground dev", + "build": "farm-plugin-tools build --platform --cargo-name farmfe_plugin_vue_jsx -p farmfe_plugin_vue_jsx --release", + "prepublishOnly": "farm-plugin-tools prepublish" + }, + "files": [ + "scripts", + "options.d.ts" + ] +} diff --git a/rust-plugins/vue-jsx/playground/.gitignore b/rust-plugins/vue-jsx/playground/.gitignore new file mode 100644 index 0000000..a4cf82d --- /dev/null +++ b/rust-plugins/vue-jsx/playground/.gitignore @@ -0,0 +1,22 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.sln +*.sw? diff --git a/rust-plugins/vue-jsx/playground/README.md b/rust-plugins/vue-jsx/playground/README.md new file mode 100644 index 0000000..0600bdd --- /dev/null +++ b/rust-plugins/vue-jsx/playground/README.md @@ -0,0 +1,37 @@ +# Farm + Vue + +This template should help you start developing using Vue and TypeScript in Farm. + +## Setup + +Install the dependencies: + +```bash +pnpm install +``` + +## Get Started + +Start the dev server: + +```bash +pnpm start +``` + +Build the app for production: + +```bash +pnpm build +``` + +Preview the Production build product: + +```bash +pnpm preview +``` + +Clear persistent cache local files + +```bash +pnpm clean +``` diff --git a/rust-plugins/vue-jsx/playground/farm.config.ts b/rust-plugins/vue-jsx/playground/farm.config.ts new file mode 100644 index 0000000..763dcee --- /dev/null +++ b/rust-plugins/vue-jsx/playground/farm.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from '@farmfe/core'; +import vue from '@vitejs/plugin-vue'; + +export default defineConfig({ + vitePlugins: [vue()] +}); diff --git a/rust-plugins/vue-jsx/playground/index.html b/rust-plugins/vue-jsx/playground/index.html new file mode 100644 index 0000000..92b55b9 --- /dev/null +++ b/rust-plugins/vue-jsx/playground/index.html @@ -0,0 +1,16 @@ + + + + + + + + Farm + Vue3 + TS + + + +
+ + + + \ No newline at end of file diff --git a/rust-plugins/vue-jsx/playground/package.json b/rust-plugins/vue-jsx/playground/package.json new file mode 100644 index 0000000..d48cefd --- /dev/null +++ b/rust-plugins/vue-jsx/playground/package.json @@ -0,0 +1,20 @@ +{ + "name": "playground", + "version": "1.0.0", + "scripts": { + "dev": "farm start", + "start": "farm start", + "build": "farm build", + "preview": "farm preview", + "clean": "farm clean" + }, + "dependencies": { + "vue": "^3.4.0" + }, + "devDependencies": { + "@farmfe/cli": "^1.0.2", + "@farmfe/core": "^1.3.0", + "@vitejs/plugin-vue": "^5.0.4", + "core-js": "^3.30.1" + } +} \ No newline at end of file diff --git a/rust-plugins/vue-jsx/playground/public/favicon.ico b/rust-plugins/vue-jsx/playground/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..80465dedc03cfd08b0e3b118db6e765f65e3adc3 GIT binary patch literal 4154 zcmb`~duWw)9LMqBoO)WB8>rdNSy794a8L80HKCYy;X53Ll~aB<(pZM`qE!25qV^T{4`B6-myS?o2hN82+<+U< zgU>Js#Y@ls0rgpHaWfVd>OhcuLiH?%JvX{-jp-L?TuqIfpde{Z+6RpMT(1M2a zNgW#BR8$vQhXMP8dvl>UUXQDxF|NSvPbf6_&zLFD zH5>=EtG%cFqj(pZ5A8>dbr{yJ+S~!fc|+tT()+LzipxT%okH!;)YStw?b>8VB6{p_in}7AeAdaJ^{r}^?eMB-Gk({ zrayu9w#~ow!{$co^?m3pP+TWG|G2Mpr`Uyk4031DEWT^Zs#|q!fzAf4HC z@HD383zV1%YP(h6O6-MVF$0><`LHpo%n?h&yyCS6;aV%P*?jSIU3mWM_tJK}3hkK- z(TTZGyGg9VBE;t=>{Gt7qs&mJ>d|=ip#xfr=c5gZ$yw07U$FsIX?|Ok>qC96J=cd; z@;YC2-m6XRg(lYaG*Z2nG~YT0)YowAdafLws6MUp<@g2%pfgBwk;0cy``Y{OLgf^v zvdn?TV0Do;U>(}g2+jRrsC}dJR{Q2sg!{9Maj?GBP`Bpc6{z<{_vLJy;6Olit;eS4G)6KtfV<)|&@?~GFW7k{s0_}^bcdli`x%y$}s)w9QNY*W`%sMACqBL=U`#(}{kZI}9O!ob|625;;!v7E?e72>_ YXKTD4qPpQwz4tCb{gqHVI7FV$f0MB}F8}}l literal 0 HcmV?d00001 diff --git a/rust-plugins/vue-jsx/playground/src/App.vue b/rust-plugins/vue-jsx/playground/src/App.vue new file mode 100644 index 0000000..38c90c9 --- /dev/null +++ b/rust-plugins/vue-jsx/playground/src/App.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/rust-plugins/vue-jsx/playground/src/assets/logo.png b/rust-plugins/vue-jsx/playground/src/assets/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..0caeb4381267cff0c3adf3020077c55bac612a20 GIT binary patch literal 16859 zcmXwBWmFtZ(`Avx3GS}JT>`-^IKkcB-DL^BXmE!RoZuGRLvVKu?(X_6&wIWf91d(x zb@gmbch$YOCQ?~Z8Wo8U2?`1dRpyI?3KSH81oDHA0EGO4z1=x3Tj;_n3fpCwAyh=i!LHY@WbqFI%s5*P^3b=QJt<)ms|=?8^nE#<9_ z{_B3hx1ZiV-F0#Y&byp_g7vooa=~N-ad3#3M;D4)zyATSnw+EyvJl}^)&SP;CnYMeT#R?)RCP`5%cVP^^GMLm=Gj+Np}*cL#Lbu0KKM zLrF@8d~RN-3(uGm)EI9!#^GUU( zxA)Ajy!&ZSPKus1VOGLXUu9!VF}I*d_h7ysBmyPf zCi?3A$}ov%ZRMHy)%mU>*w1SykV=u{?epe6geT08o6)M zOP#r`nSPG~z4$FrH*Rycd!rLG>UaA0HwGZDu|%hIyO^sidq6W zhG+NC-bcbRq>EN07|DfUG2&HDS+!TgZ%zdL4J)D5Lp&Ryh!b$E?83LsKQ&N9lU)UW zd2;`poQ6w6HYz<7zsFgQ5aGe#sB?{uoJDM%I?NlL$&pXT;Uea$=6yx)%C%WM>gM;x zAziWT1X&-)4ZZl7**Oi4d@=k;G2^Bt;-)-wHsHJ(X;*b@f;Us+INAmHYflR@l63Y&;W#@#V@Tcu7{k9%z|ivV zs&7{yOtt&LNA-h6w221BCXq}(bq`c7=;oLeyDQ*l#SQ<@MD){fBhhWkoPMa!pCAvf z+D1Y3y0UqHODCXS7p_N>jk*eZBwXpQyno{awGOIxHIy)lk<||&$%O;UPm=LFDW$k1 zO=(QfbayF8e*PFN+{Utb$UP~~<~6}G_{{TIP60Im-p41Xx#8&~E;Yly30Xcs9#;k@ zFm+7II)JYo`UfL^f&h%odE=HqrIv;r<}D90TXQQfcps&>yf%s?yz%V)@rN4=X~8Dh zZ5oyL+fzAEB%HikEo&CN|F5EFPL4g^0 zW2oG%Www4>sXY0Q&R^Xq#ZU`&f`sDW#g5UkRMQ&keh()1YL>_`muaxQx((XWI0?ko z?_N`xj}@ld?0}#%&U^Tq^TUC)!-#dhYHT!8B0SUj!HS-VCMM+$iYs*! zdBb}e?AMVRLJSJlzW;a~S~<1ozxpbHmIo~IYN_1s$z_UcmQ8M7h@cA-zY zyPqs*0~{s;mbz6T%kz@0^4y5Da78E`o%h1)=G-38^qA&rmak-?7UQ7qgwwbJS2W2> zsPV#Z{$p^bKIh&Z>c5sp+$b;+mIq0Oeq@U}buO5cN z5S>LbetGNz0VFocuI;{X4f;pkA22Aaztkg^CR16dbYvf$!p}wYzn>3UfBZ}wJ1xf1 zc9Vrpn}-cdUPCPGW}7ABgyl zpnJJi+dmVe2Z_bla<>#RCIav)mi$w)u!}bp$G$N1r<#Y{OR2fZmG`r3IU4$};I_S* zA$(*N=fxN3IJ1c_lSH;~_>3Z2fC0XpU$CR^H`Ja~5}6kmijIJZc#e8~AlnmIyiIBu8{9sp+t; zW+?TDGjLfx&)$oqi@X`1$LQybMC_kHRhu23V20XmL#uZJh%?v9keHKhB^7l5IG|DQ&3>Lzd2y)|*6O$?28PJ1tuUW#b?c*}NrioPfPXjN_dr z&xMio5^k;FKb85_dPe6x+wdoAxGC%Y#q;=BLx^!L@UI(a(wL{J} z91}G|`SBrYI}ydEYQiw?%={HU_Km+CNI|u>a3{n1#1inPTn!aftt3j-!;v4%{eB$y zN2kCT5OL@17NTRE=O9UE{5KbUrV2o~`^Su9LUMyZaFLsnMVtT0l$R~rBx#Q)%7LBP zyJcFhA@GGwIW<4g2AtC`Q7LF@TqKMg2_7*Z-KCm zhoFRU()sFB_{&PsS2u+YHviG^9X@WApOu88L1RBfxN!68tp}}sI9IJp#U9vn=|ctn zRL&JU(So~;c9SrqpD|dr1|CYe9W%n93m^3)RaxZAQCeFIgKn?WKG|F!Qtr>y);)2pwr$YYTxw%>~an$O!EctrtV0xc(Ku$Uh_ zS(UQ;(&*QzDUQSIa)t8DjSTw0B)WDhNfdFW=Y~-?j3YS~X(?^L*mUg+3HHq)W+1m# z8o}>(qD+%xvBu2=jZ3=T39Kc#p)NW0%mM6Ux24B55Wj9T`q{n4Iq^?Y70f0nlrG+p zZiFDByU}m|Lt&(vS)Pm_CHxZaN$1y%wAS=KFILB56@|-U@~p8;1ghXbPP_Ao$h|gK z?a7niH#%z16AO1%kydZF7GYDJnhZz(Eeub0RNd+PM5Mtpjw}Ddakj!AGunl2)*q=Y zYUzC#BL2WEcw#-N%YPP1h+S7f7%Spw#^n=tVomGR1_v4oF)1*TGLC5IS_650dsL}& zsQlSp#qY+0B30YO&;9U`zdvd;T}GS~K#p?$dwlOt6-Jb6FTsOXq<8OC!zcMStxuTY zLz?EArJrm%AI8WmwzP}Xn@FDLTPbWw>`|E5Q_`?n^4eF-lSV)PO1 zLWtr^Rqd95dl%u4yzpTx!t*k`AxRk7eR&6kmfE1={N53?=4vQ8`+S1^#GnkUY_l&p zXuIpl9P6;Jk_+IsBJA}bzl5+h{Pu6td)?92-{tMViN7P2uenTG77?X{452$P8cme8 z>!x#Ufk2bIB8lQA5DqI;wfN+;;*pTE#R=~R2Hd)7kX1+(}?9Bmc)+0n7mW#4By0gr$5>ys^z$1IOlqIhPR z0onmsw?=j4Gfl#eg;JxNrvP?DR#nd}jDL4kdWTXg8m2=+(3^%1M*d-ADv@eaFMNeOh3}E=r z7&S}LSiL6FX1hhyqZCV<)MY1sN0M9unuFoKWt+WQ_6--b8Kp~`SI~a zr~GVzwjoZ$9{@KkP2?abVO%`NNk!1z;D-6hAC9-1k+eGYfdMuvyK%9 z9wlM4hlp}M)fr7xQKo!euJ9t1=2S*TQLEb@Ir8l_Tc7TUjwPS|=U~5KhdOu$26$Fa zpA^w3RfZ-?#EEil(88$G^B>8HUBBtHdreP4u=WWX#8=_?AH}yPNU&puSksX07&)$op1IjMQga`9o?ct<4EBNUe#RXv9+>c#<|+p6h*cBZF%u4h{gs_-%O z6b35qU!}NZTMzbxPQ-+8g<0ec5tJZJ%J2+YlXuiAS4KVz{F8qk4_*3TmTG6y3>Px) zI796-AwO)o67jVP-`=!xO)9c-i{QCo?NzUh2%nL_3%~CTTTt*r$a?2eGA8-WPz~9@ ziSMLLOp6H@JkhZaJ6!UnS&^_b$K`-Sd^TJDI+e0v^2?fusI>Ibj;=#rDR1=6O;#WR z`8xDaKY5FT)l$nT@yd+88ZSTDt4EAK=n=*=0kv5&P^q zYnHY*E{bqE$71kr!oG9pI9P7b6~<&5Ab!ls3oYilecs-&os=QC^aC0iA{fIyBJ6+q zXs6)&6aC4LXRs&*jy!sGA=ZJtLT{DOAA3+_-47QL+6PXXc&~uKxCW!4{R!n>#|=`k zy+Ikj^@N?QiFK)cd5uozJ)jypqhS1Vh}BWOxG=$>ExYEm(l|hK}&z%NtF(22lHCa@K;s@9l5_9%i zmaTSnXRXZ)!HUac_QAEbLiJHacypzR2htW&YbQx4%fiMIWHb}Txkl_06!9cSb9I!w zF28`$N$lRd7`Ws|>LSKo0`CSQSei^79nt&x z2>zhmup9B={8ELmeAO;&)}bna4S`8(?#dO7yno!F@ExlD z)5RI8T3>@Dp_BCoyDNX8fq3zGs4D2T7oX)1k|}=_wHOS?_R59dqJuQVNtr;QP`pW@ zc(l_ae_w5glWE{c3iyD2bo_|o246P5;jXj)i~H_&JhK_L(sWbgo_ce7F{Pz|&-@`_ zzDb>^Kq{oT_dqLXm_e2(@zy03APgQ`g?$yJ=rucc#$XIEq-cDwOOU!I1$9_1v$L_9 z^v90w{S;nL3sU>Y|2^FzH5(7lkUB~5jvr;8aq@e7H%8bYRLR+)ACb}oXA#cwc+4j` zE~Uk&B(DoBCSahjNxz`??2%MQK;K^+ZPjOdgv?Z7;s2n3VKPl=rci)kq#~r+#<>3> z1{B+ngWy9N?;h|hhVZS|o8+!t(te^rxQawXTisMVF7#t#=E2UBS z=Q(iyd=Rolmu7wQWVfodj3`h@iHwIVtj z0V)a{-F+73%@a*p$vd6r`yCkBM@`=|-MP;Lk!7+$2gZyZ-tW$wXPQER9fDdLO z2_6RggdVTP@vW92Alsr{SI1CkS6x<&h1j}@`e5V%(ImY^E*d8Z$>2hh#8{kC&K~;t zT{X^Ai)-Jb*q5;FStE}fg7rn0@LDvu{YhCFt^~?D~-$8&kvk3nnk| zLE?bNX6wQAl;CTf$nRDi91>;!v_aBOrt*+0$*$O(a3Ss%P`sfzt?hBau0XOMx@J*_ zvnyf)#Phl$ob`Fs5uctfVP>!+6+(npmz9-21mqu$R79H&goauxRW82o*E>;+aNgr# zFurDr*uLQ4Q@^Vdr)bKP^`-uji+V27H z(Ypr{5=NchibRPX*xLL0nh-Y{t8sKyKIY(gWS;)Lqm+_Kixy5#U$~%ouqm!(dv}lU zk_B{?^AXktQFp2#0a4~>VP>RaWWmY(D<4vMnw4-kW)tGrtA&`wVcpKyXHT3)k73R3 zd$DHIy*TN!j1;C{_qqXW_WuAdLKxZan9?2z+4THKbp3n?pOBB{!ka#Vz~^ zI8X<2&mK%sX%WrOhhHntpUowd%qB=2Oj^K&R?-mI*#k#4xcQGrzoca&MH3n*6^D&- zxZcG78jH27?gLh95*)_Kzd6d@soMLI^1Ei-)ejSYO==?O3C8{^MaAJ98UFI0iuZ)_ zGpPyKskO||wW*CY?{yb-%PaYn9WwbjzBY?^}*_B6=PFvTvj zi*P&(XWbCH8-}4!)U@2TON>CNySWse>v}tJd)bmxR^Iqs7;BOr(bH?<;l@oPo@k49 zGDE!zqf;bNh_xc@`|ZbY0d0ILM zszGoThxQdG0VUxrbv3t266QNKKma|Ns6$8d5Z-Y4IPU@9KXv?6Cum;|P%Sn@7JLmgHL$Eruh4^CZ%$XDPenh1IQ@6ZLW_SB{3?Ou!k4;6 zubn}v9(SYa&ewcR9X!|qdNn?MpAw`#W&rSzeP~d9BjEyn<`OUAO#TZMB4YF*=H6BQ zI!XTv-}k1YSvDrUmJHdrvvf)t4xhYd_Mh9aZ1E3d#$lcIy;9Wx@J$tDl9+uNs8t@P zso96!Lw@noHJE^k1;oi)77mf;`t;bdGuTOkFGFUAr7Ge=#I!eoKk zpdsj96Gj30f622=M#+Cn+cNjJ>#xSZkUVFsr5%{U0`~Vjf}D=en+SNlIqhFW6URuS zA^4!C=7y;-i71go81IBB%sI^*Sdt#%OVk-9uI z6=~PowUo#=G0YC;KHtPeQ`s=vO2NMpKi8+OqI&-?W5j(Kpvo;G_C|a(Q%o_s)ya?C z{`j8_juGH+YROK^SYKf1QC{-`rw*+r(rx)81Ti zz^XYKWDBGfbc(Q+%)NfHemjw5p@xPJTmJdB|6zGtlOMKisEgF#T!o)@RDUssbBE)hS>ex-t@|>K;uUVv zFkY@`XQb98-ox?X%@r7|$UxmWJaUIB@roP6wH@8>l1)ZeGMiQ#2XZPDkR;pEwbQ8~ zfhY7dmO~pFTfqd;LOrL}O0$rY!+1O$8p6+Rc)t@gbIWmp=l)Q5I4bj{AoN>ZCQZ2- zY}`7ZUkr@=&D`jpm2Wyor@=e=WM2_meCHie(psnMFFV|2Lh`X9tsAFB93GYfC!o7I zacUD0^e$AYy$AZW5PBBcJZSLMdQF2c!*;-OkQ=~^{U)1IH-0CK`B-H=II2%j8bvN6 zZh&&mghwF^FPS%2Z9Z`DhQD!phylH3RuqUV%F2CvF87Z5(q-(V6#T~NIw0K+m>+U@ zd_XuQjQ#WHO>NS_?L$d5#RHWEyRY(x0N-wogU2hOxC9ntJ4s2)x&1)_AWRTIR`o>i(s8JvM*_8ff?}ijZYqz-fs64m?K6tyx{rQrXz91oBQ7e;! zy7_7CN>u@4U(tly^GngznyZtlC%5^jWF-zx_RV@585&zP4J1chiweSv`eb|k%NR9i zHqc~4p#L$&?0@uK^0oj-6_QkD1MV0OF%-C_FQg!hhF-EIxc*-Y@K$8qe~D{<_ZVWwx%p&PYKfM1d&NIzd4IaDQ-tD8 z5nSbJi;~$vsK`CcTDOU}(o>~RY#=A!RIS{}JFSX0d&>7jsx2u==lRK@z5sy#QgHXp zdJsJ8G-z+VuZ9==_d;&V_>8!z3XJ6sFM>=sbatlncH}LB`^QBReMJNuRJ^E*gU8kj| zc8ceI7@zB6{q z3Zy{rJ1QxI+qBkg;%rvH*`XY&A$5IgjZf4Jecoxm$Qt%`^9qKw{Ze*M?IxSP~4Ynq(-T9I!< zpbd_&SZiDV1ci9GWu0Iz4tzMWiU9lHgF28UblFkb1<5?qaOzi=`e$h9XAdEPmu5K> zbQSUGKZSc6S!Mc*$HTfpom4qTFyA2 zFnPuYhkKf~LNWU44tSu{2&TEd0W0uu@@g}6c^AahKQhbw?5|AGn&AM6)yUPVy5S@E z2H!ItWx{CKIa|v-;GNckBWWe4F8}oCKO2`y4)lAc+5cUIn{gPa_Xk-CyvnOJ!h6+6 z{m=_%C_MVp@MHfUc+fHi_5i+!=4>%Ok4S3xtG?)x9Q_({pKp-2F#5?3eaJv=1Pq#%Yyf&4yr)wx{;h=7sF7=hr?)5mWi%#6kFH`Y% z(0+C`0Xa)p*~UdXqYowp(J3cgeq30KnW`tbMnYs{fv+eLwCUClC2_9LT-?n3-WG!_ zridl}5|wehJFsDXnqhVIsxcyD?EiEvbkLNiO9JhlDom}v3tpRWj7Agxu9&3#w-=oy zWHLJ8E)C5G4UU8ThfHd*kHKXgIaA=o?=UZSdGkZkGV!3f(fg7G+>g<>`31P#I+W=z z7|h?SfbX=1!DB2DM>FBvuIapew7jWMoSUBTJv#dSp&r6$J?wbQN9(1Yd{$wLHLBL{ z+^u6q2*~-Att*T&;a)^D&?-8f#VSu$W3if%i`gdu{Ge5}6ytSjJi%N<(_VshAPaV< z=O2uJ#>F=k<-;CXcMFw4-NXX!YfLAMH3itQWo*xBaygrBNkH$FQKbY-sIYbJs_XBf zUQrquEPx-5yq6zgkHp-LdDtn-(cmY4pghuc{g_fBJ~^-jMv!95$`1nh1t?E67aKD4 z1dhYUk=zgf;UMQPrwUrR@a=LN^Ig|ExQE=dJ_-mvH;MKr_PRr(t?;E(a8A@Bq(b8P zl0`HhJYt|yK{gt0K2Kjue~NBeJu!#M`B|qOnr!%kj&rO@pe!Sd=qG#uJ(zB$gG-eS zXE*bL4OzWyjoPG%>YrnM*7Hv`TpO}Ms_GP&>j3g{3NsaQMy5`X1IT=XUw4z zh5wwSn@lM8qnpLI_RrsF(~UF(fXfN^SsWsX(3e#-xS#1uj(zzPslFi(9D`*WLeA&1 z5M&pLO1nrxxA_jz;u2zB9v1ZRm6I2D+GiiR<)eaE>UXM7*^yL zs+A?vZc?XR%D1G%86O_BR!*@?=M%AOXg4@NJea0muIu&>pY}OEJy6ZZ&cH_Jg1zvm zbxS)rf4a4f00T4*L%#Au?57nF$)c1 z2N6DNs}zgWfnS=-b4?uDttzbtu`c5V{G-ayvmu;r-BzgfX<{)3H_QV;HQX0L`M#_6 z%0SiU3QhBnf%$w>&3;=u;?MATiI3@el6ju#5Blg8u*=M!t!UV*wpSb*R1j-aJ~pTz z)NqvhXaIw|laE@$D%#8rXl!>kjyDEId%vw75q^uwL`5}gMJJw$F>1u_6ZYuWc!?r8GxiUL>(rmcXG8vm!U8|j8 zPPS@aw+T$P9Jae8>~LwgJe6li%<~6J=0)P5#Oo8pqp)$adll;}wx1>y^IrsFbqN}^ zK)}O5Z*GgHIb^fW)ds`XJ70N@iUs*9mj&$k)O^lX8B$rw)>`Ag;Q4`0cYVv|za?(O zK-Jn$Ep+rtSWF##1-H}_sn@hKvg6Tv7iY#3*^mP={U~y?dy-M8xv5?H8gcxZij(T> zmi&5;+@GF*2j7dkzgjLk_88l62u!LQ-+_|<0@WZa5?p3Y%s=mkGQo(lLNnoNxsY)y zC3K`Bq(u1j>1)3?l)tHIpkgBWz&pQNxPiO%Q?eMp(a$2&CdDvJ<%xarwXZ%`zkR}z z{?JX<1k@6FuLwFtDc)&IAiw0J5x;c%DCGEaPBc1{Sj%0$K(Ki(DlON@X7VComBUo- z?}ii16Bc7D@ccFDiD%1xI4cZoj}|66P;4SwzFUCmBvF5r+p##EWBXx*0Xjc>uK463 z*qoW)A%|S3PnJjFm6F1V8jCEM@h245Bb!3DN&rv;w66$o-wSc`6AifPVLrwqURmYN z>9ROu7Kr1m`2B)8kSHD%OIQDhH50&7?@jjyY17f=45r`zCB1aaMg)kDOmWY`6|uZ} z4E>#J(-3|J4l1|rn@42*a8p|vA~U~1wGK^MbIPZXns2U@ZrC8^a_SofrNmUgHK_<0 zv{vs%L()?W_pKvn9*Qd|=m+etHwAH*m;N;A1=~)M1#ple<;oxJ7Qrcsw*y@ILFHq$ zj~!hje_>X8R?wxRV)1@yP*~(^JIE~FNRG!d`V_&HTzmVGb!Ec(hzG4>%Abr_ec*y! z>&?4cUey6|z+3WO+nL(UQdKul+9?z?a&Y*rxk4-cP08`8vRqCZZW;uKT|r1^S8zjV zpaOV|SRC!e@l^MRuND-S8Ys*n=m&K74;0cOm$xzZ!s8cO3&%LT}vJ zZ8aLdyss{4rUlo}wZDWpEEHrE6K~w!#+0Fx=uQedtT|wt`$`4RTEX^NvBg1~a{YC{ zNLbz!F7w>;mRWw$Pa}Jx?mJu~t09b@B{x9qf>vE(Ngf3CBWbWf*?JSEgs8E=-eQX( z$1AWdA6e#LqK`9fDD-#pvW&?G%&TtN;;+m@814K(*lA6XW*ZQ<7DhY=Y^y_+4s=8l zY8mSC=Afn6c$1_*QGT4_vi#CtRrE zdfAxhEcxbN|D%BEz|GeFX^DyqtI;Vb(l5v4!w26lw%p{@?D+3jUf{y|5T5R3u!-nO zZIiFqkD3c?XvNAfoJm+8w2g4BNpVK_E&67yO4lgl7*%|TEfQY@MDaC=jar9x)@Xi1 z?RL0{M3kGRJj|#+o_{qNzi0cKBTWpV5Nk%>`~RVCg9)XBy7&^e8P1~3aKbD1SV9h? z4nf(@F!pnhT-4lu5bTq0ID>LD3UW>k^zP(8<;v;V{td3%Seg9*Vjhy;2!|2`Y#>@N zMVoDNn#Wf4?ihF7<(r<-5n`A;&2Hme+ogC z3@j#k0YD<*+rgCUJOqb0ql{>WB%q_uRpm5ekliTDNp|X%5$g!f9_&F((tQ=FZoMCiL^H%GN zJaS8&ATo=8;L@@IYMy=c3Kio$CRA}MZZMft<%;F)zsQ49)}*i>?F{b>=h$O;_5;*% zYr)Mw8W@SVpxJNaec5>4GiodZ3BE9&3#%K1u9>u6K7H9_HQ3pr$%Zj*vZv?W`yu!< z8AA8yUNg*Cu}NX{Ink1$?fwHTFx?4gI%bArRTKQYTYtFPbpQ!9-g(}U{h zS^9R|n}Re!=dmg)K_cXwC0HbQOo_M4Dw=UNm?W)ZM~-?V?LZP{N&$ zsJcT%oCxv8_?;2u3U!yK!g)2Q8PD_)cA5oGRDZR#T7OITJQi%twTP^jE**TVer1B) zbxW&AMt1EwozUqn&<){x^&I!QELhpSq?=?Wyu9(rKaXw*oRpKXwrDTW;NaUZP|Qni z6;+;6G$}nAC7fvj#(B2q07Iu@2*=R;`5zdlH=eA>w`M2SH{Dm4R$D0#3xPX|692S*A=tI>Ai?L{<|6{1 zxvRD^iGd>S#TgE~5VBUq8X!{)pcPDV-(*4i8a@TZu*dDcU4RiBj`jeo>inkN8Dkng zWWHVg_g!y{!pc!5G>IrV5Hy&G^k9Il$D7s;*XPJKeQD7dyI5IQA2ws$x5)-118$TD zj5bVpW0;EZVcA|$#+6}_WQK%LoY9_tXd{;}9F=2;2zc! zWdcyoQ@G1tD=TjtnIWSriUp6#fy!L*e0uA*PYu2+C+8>nHk$qwfD)QyG~seE04|AM zTLRn-Y38T4Z5~v5JwlR$Zd!}{BG zf!fla>0wJ<>m~s%M{i|nGSmCAmqB`PKnTDH-rhvlb9Ym0W**B{%pFfZ` z%UsUnEJtG_&_t-|fQ;rxN8Z$W@0=EEn$ zsh{o8R1Kk&8T_|gX4Q1I=Aqwr`YrPJR6#nU^-RMWiR&li@PRXhij*7FpusT{e|VaNShh&v;dPpZqfeVg`ahjq%J zvKw(wK#x4#>{cBi@D**d6|UUd*mjA?VbrAI-%RxWLf?_jkYrXsv;^Ci3JAASLD>f8 zdC8ra)xB|=mqD^ymm<;Q61fprI4L-@*layI0T*?ameWtBbL+&~Ae@_`cr}K!KE46Z z`CuE;PF#MZnx?OE?bre$5=EQKGiX^&A22e5yrI@t8yc@phlMhX@9L}WjROI0S4*pP z4Cj;mIEOJ7iOQ<^rXNZgWM0+KHTBa&U9!H9q%|^#GaIm++M@P%iZS@IU}VEMjb`iKl7$)8x$vakTpE!10$BK1y`xTQSP%vv1mD#R3)>Ff64pC~?IS_CNp%s7SdWKk)f>?H z(}8|y3+10oAWRZL1ti0(*}PLv7|6gTX&p~c=^i+|s12A-j07E+?7JMOJC-kotq6+v zp}8vB0W~kpSX_^r@PEfdI^5*PIt7}(3rP_V$$#vN&}Qjwr>%2Tr0I7y=SwSqV@Ivt zn4ESfDO2Xaz;m~Z>@=IlJ&hiT+2mj&bW1YMpW$(t+w zp&s+_waDdiH(2rry+e6$|El7R(-xD%PhCaF4kE!Z@E8#i;8XoC)3C(OCU(g^# zT~s1Nk8{CV?$mllLYRl21M3d3rk1x2ahmtVnw4NdJ@=I3xBtElmQ_RCca-O5<-hIv zpSbpn%Tc%h~0Nd7sdhRjuumvM~iIWKV)T&`b^o{FOI z34yq}fA@ass*FeJkr7+PBK(Q5e)&&dXK4t3On1(8+|W1|iM7t<_h*lth7zL5!BvaU z?WQgpQV}6XJ>heiE(uji>rbN9+Zc#9}u0 z=|=o`A%d%YEWoI=N)*fO+5Y>a;l@e{%NP5(LD-H4J=j)a%Niq$^myxsDBa)hr9?Ft zrX+PNxl6few^$;JPM+~L2Gd{Avs_@ZhCm@Se~)cC zCa3Pm1j^zw`9~t>a%!>n>UCn(JSt|uQBjY&n*tlq3CjjiI;8N0JkAISOofXrNEbQCe`zqi zKLro0{VMHiwvc)qMs>iFl8XkF5NWA{E>I#Y(ySlonp_mP1|dWnL(}=nz`t;LMh8#+ z3h>Xy{?oM;exC2c+XzHuhMW}d1|7E3DApTl6;w*?*ELn`8gZ0k+Hoxe^NdC4r zI#m2wSAfyb#7+&c`N$l1ctQCmhEZw?_Mz<9CBZ!tW4#!D5gq}53$}Qr10^7p{=Pl( zU>|uW_C)1)+1Hvh4X_CVb}?t-;;iWfUmo=G5hQ2^Ke!b0LH75)?+}35aP$-Z zT%dLVagbVHy5U#qfPG2sUNDNKzcMpFO|@fc?g(1X$Tv^?R%$-PpF8}QJ5s%vUx>Rx z@f|JULg|WjKGXeuS8f)C^E=Y^uq!$-{FCcyM_qLrf*amGlFlMBn_?ppF|`P>*dD z&PZ+^>l!~ko$7n^6|Wm<@c}~{E{W!W8(Ip|U@rR=^Vs+2xUT_zx@IDn(c99}6^@ z!Een%<^yeDWrUVXKq2RaoF6kkPFCc9?O7td*^*~lWkzF#VIDqmvyCS+*|m$Lt-ZZ# zg}cg%!oU{Tt9vI}q2es(a*7n(Y^3oi{ojo7JO(v#4s&+ChQ*MU)+dSM-?ByzMHxHF z9f_t?vRJI| z4u{8FBF+p~)po~Y7y|15PZ{UOCFx&eaz=pFeSCazrr^7L*8E5z{NFc+>XOF&xM_@P zQdcT(_sG{_i3lHTq)MFTAhB?s28g7uiq&f$!nC-zErr;vaB z#CUHKF5I{O+%4xr(S2z^~yXR z5}>sMdKAFHu5>zy>sQDF4GG~8yV-+g)7z}yz7=EKb5;6<2OC1_<6kPJZ4h0Jd`)dt zyhJHJ%e`RthA)iRD(4UXrB3~>Y4jI1NH5@!Qp`4*3-YO2IAVUyh#P*y9m7@pDSO4j z2iX{FUQV@NxNKf#rTB$Ulm7BvpysDnNcr>#E^?!cx}3>Z#nyl2ZL9(z1W~2me-v5x z@FUzSnH!+=*}9$IgJm~mhVQ(^zHl@tq(WBERoh}0=p}4Qm9^(Wy=zc zo1Kw46$76{Of`_83=g#lB~_`J`fn`$U_B(qw0EwaSGL=ftuRB!0P1_VrbQOsdiFoa zI|BUQ-wOaZ|ER@uJa)_U``W+Vt17A4Wf=mpE=NBSSIwq1R^;Wtq|FAw@3eIjAWJ#!;F|Jaf!Mdc zFB%I8k`OEr{-HgFX=%0O5DnmFj-DPNK{JAU$`7MhQ3Q+%N&}{dBn&;(Pf7CGUNgGu_lj z6gI%;KFGTVgh#{1BsrDgA)T+K!7_8=Gbs0w5Q703sM%2#d1&uZ2%q>XyoBH!3u5q@ ji-;d@RD^`>{4E>P*d_6jJR9=11}GUxMTtr=qi_EQr81c) literal 0 HcmV?d00001 diff --git a/rust-plugins/vue-jsx/playground/src/assets/vue.svg b/rust-plugins/vue-jsx/playground/src/assets/vue.svg new file mode 100644 index 0000000..770e9d3 --- /dev/null +++ b/rust-plugins/vue-jsx/playground/src/assets/vue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/rust-plugins/vue-jsx/playground/src/components/HelloWorld.vue b/rust-plugins/vue-jsx/playground/src/components/HelloWorld.vue new file mode 100644 index 0000000..7135f2b --- /dev/null +++ b/rust-plugins/vue-jsx/playground/src/components/HelloWorld.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/rust-plugins/vue-jsx/playground/src/env.d.ts b/rust-plugins/vue-jsx/playground/src/env.d.ts new file mode 100644 index 0000000..4ae8e90 --- /dev/null +++ b/rust-plugins/vue-jsx/playground/src/env.d.ts @@ -0,0 +1,2 @@ +declare module '*.vue'; +declare module '*.svg'; diff --git a/rust-plugins/vue-jsx/playground/src/index.ts b/rust-plugins/vue-jsx/playground/src/index.ts new file mode 100644 index 0000000..f8c23e4 --- /dev/null +++ b/rust-plugins/vue-jsx/playground/src/index.ts @@ -0,0 +1,5 @@ +import { createApp } from 'vue'; +import './style.css'; +import App from './App.vue'; + +createApp(App).mount('#app'); diff --git a/rust-plugins/vue-jsx/playground/src/style.css b/rust-plugins/vue-jsx/playground/src/style.css new file mode 100644 index 0000000..6efbecc --- /dev/null +++ b/rust-plugins/vue-jsx/playground/src/style.css @@ -0,0 +1,80 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-text-size-adjust: 100%; +} + +a { + font-weight: 500; + color: #9F1A8F; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #9F1A8F; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +.card { + padding: 2em; +} + +#app { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #9F1A8F; + } + button { + background-color: #f9f9f9; + } +} diff --git a/rust-plugins/vue-jsx/playground/tsconfig.json b/rust-plugins/vue-jsx/playground/tsconfig.json new file mode 100644 index 0000000..ee019e9 --- /dev/null +++ b/rust-plugins/vue-jsx/playground/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"], + "references": [{ "path": "./tsconfig.node.json" }] +} \ No newline at end of file diff --git a/rust-plugins/vue-jsx/playground/tsconfig.node.json b/rust-plugins/vue-jsx/playground/tsconfig.node.json new file mode 100644 index 0000000..8d42325 --- /dev/null +++ b/rust-plugins/vue-jsx/playground/tsconfig.node.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "strict": true + }, + "include": ["farm.config.ts"] +} diff --git a/rust-plugins/vue-jsx/pnpm-lock.yaml b/rust-plugins/vue-jsx/pnpm-lock.yaml new file mode 100644 index 0000000..84c8107 --- /dev/null +++ b/rust-plugins/vue-jsx/pnpm-lock.yaml @@ -0,0 +1,3232 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@farmfe/plugin-tools': + specifier: latest + version: 0.1.1 + + playground: + dependencies: + vue: + specifier: ^3.4.0 + version: 3.5.12 + devDependencies: + '@farmfe/cli': + specifier: ^1.0.2 + version: 1.0.4 + '@farmfe/core': + specifier: ^1.3.0 + version: 1.3.27 + '@vitejs/plugin-vue': + specifier: ^5.0.4 + version: 5.1.4(vite@5.4.8(@types/node@22.7.5))(vue@3.5.12) + core-js: + specifier: ^3.30.1 + version: 3.38.1 + +packages: + + '@babel/helper-string-parser@7.25.7': + resolution: {integrity: sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.25.7': + resolution: {integrity: sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.25.8': + resolution: {integrity: sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/runtime@7.25.7': + resolution: {integrity: sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.25.8': + resolution: {integrity: sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==} + engines: {node: '>=6.9.0'} + + '@changesets/apply-release-plan@7.0.5': + resolution: {integrity: sha512-1cWCk+ZshEkSVEZrm2fSj1Gz8sYvxgUL4Q78+1ZZqeqfuevPTPk033/yUZ3df8BKMohkqqHfzj0HOOrG0KtXTw==} + + '@changesets/assemble-release-plan@6.0.4': + resolution: {integrity: sha512-nqICnvmrwWj4w2x0fOhVj2QEGdlUuwVAwESrUo5HLzWMI1rE5SWfsr9ln+rDqWB6RQ2ZyaMZHUcU7/IRaUJS+Q==} + + '@changesets/changelog-git@0.2.0': + resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} + + '@changesets/cli@2.27.9': + resolution: {integrity: sha512-q42a/ZbDnxPpCb5Wkm6tMVIxgeI9C/bexntzTeCFBrQEdpisQqk8kCHllYZMDjYtEc1ZzumbMJAG8H0Z4rdvjg==} + hasBin: true + + '@changesets/config@3.0.3': + resolution: {integrity: sha512-vqgQZMyIcuIpw9nqFIpTSNyc/wgm/Lu1zKN5vECy74u95Qx/Wa9g27HdgO4NkVAaq+BGA8wUc/qvbvVNs93n6A==} + + '@changesets/errors@0.2.0': + resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} + + '@changesets/get-dependents-graph@2.1.2': + resolution: {integrity: sha512-sgcHRkiBY9i4zWYBwlVyAjEM9sAzs4wYVwJUdnbDLnVG3QwAaia1Mk5P8M7kraTOZN+vBET7n8KyB0YXCbFRLQ==} + + '@changesets/get-release-plan@4.0.4': + resolution: {integrity: sha512-SicG/S67JmPTrdcc9Vpu0wSQt7IiuN0dc8iR5VScnnTVPfIaLvKmEGRvIaF0kcn8u5ZqLbormZNTO77bCEvyWw==} + + '@changesets/get-version-range-type@0.4.0': + resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} + + '@changesets/git@3.0.1': + resolution: {integrity: sha512-pdgHcYBLCPcLd82aRcuO0kxCDbw/yISlOtkmwmE8Odo1L6hSiZrBOsRl84eYG7DRCab/iHnOkWqExqc4wxk2LQ==} + + '@changesets/logger@0.1.1': + resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} + + '@changesets/parse@0.4.0': + resolution: {integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==} + + '@changesets/pre@2.0.1': + resolution: {integrity: sha512-vvBJ/If4jKM4tPz9JdY2kGOgWmCowUYOi5Ycv8dyLnEE8FgpYYUo1mgJZxcdtGGP3aG8rAQulGLyyXGSLkIMTQ==} + + '@changesets/read@0.6.1': + resolution: {integrity: sha512-jYMbyXQk3nwP25nRzQQGa1nKLY0KfoOV7VLgwucI0bUO8t8ZLCr6LZmgjXsiKuRDc+5A6doKPr9w2d+FEJ55zQ==} + + '@changesets/should-skip-package@0.1.1': + resolution: {integrity: sha512-H9LjLbF6mMHLtJIc/eHR9Na+MifJ3VxtgP/Y+XLn4BF7tDTEN1HNYtH6QMcjP1uxp9sjaFYmW8xqloaCi/ckTg==} + + '@changesets/types@4.1.0': + resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} + + '@changesets/types@6.0.0': + resolution: {integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==} + + '@changesets/write@0.3.2': + resolution: {integrity: sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==} + + '@esbuild/aix-ppc64@0.21.5': + resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.21.5': + resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.21.5': + resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.21.5': + resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.21.5': + resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.21.5': + resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.21.5': + resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.21.5': + resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.21.5': + resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.21.5': + resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.21.5': + resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.21.5': + resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.21.5': + resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.21.5': + resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.21.5': + resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.21.5': + resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.21.5': + resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-x64@0.21.5': + resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-x64@0.21.5': + resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.21.5': + resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.21.5': + resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.21.5': + resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.21.5': + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + + '@farmfe/cli@1.0.4': + resolution: {integrity: sha512-bau/2P7DylHUDksUvbvJod/Ew4dl5ZICYVgTNn0EfrJM/ZuwLaV8LjmPo0pM4y1QOZmg/N3B9DwkXO89DrutYQ==} + engines: {node: '>= 16'} + hasBin: true + + '@farmfe/core-darwin-arm64@1.3.27': + resolution: {integrity: sha512-07oxuW+aLRXsi7Wb/6tmVGGYjXyL3s36U1fUJQU01LmAyVFv/l8j3t3sl2YNuXR7Z7iR9TPAgIxGBR8dTVa1tA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@farmfe/core-darwin-x64@1.3.27': + resolution: {integrity: sha512-mOGPywdgLQYsr1T6vmmLP38yjpWoBMcGfMc8V8xAHHU1Ma8UTTZtFsF+bqt7MJMlpvwfDxc6YNT8UMctYKs+1Q==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@farmfe/core-linux-arm64-gnu@1.3.27': + resolution: {integrity: sha512-vL2ERKEx84qOd2a4m5AqaSDCrSzXCA8hRCdvG1xvsQC4rAqK4KiXA8/3ob0QpB9VsZkwOf9O7UQYUxslGOkoog==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@farmfe/core-linux-arm64-musl@1.3.27': + resolution: {integrity: sha512-dr97FsHvH5gJm3cAoKHfgl45vVDg9tF3L0hLDK5viJ131QeOLDD6tWCVxpWwqTkz/QPl/7+k4UvSe7W3tW+sxg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@farmfe/core-linux-x64-gnu@1.3.27': + resolution: {integrity: sha512-AviUhkc5WahENUUpZY/DFGXU2g5FboSea03fU9h42Sao2pnkpXe8Fnd59HKJLNqnzewBbzRCGRIj8WszEDxboQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@farmfe/core-linux-x64-musl@1.3.27': + resolution: {integrity: sha512-8X1NTUCMdI33Fk/ACPljICYQ/QFJ7Ppo9RYnov8Py1T4UECO67yW2h1r9drpI1gFEegvWFF/Ff0EtxrkTg1VUg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [musl] + + '@farmfe/core-win32-arm64-msvc@1.3.27': + resolution: {integrity: sha512-3xM1DS3XNuMopnjzUFYYQ77qSpjEbTPb9u5t2BjwL0g/CoJfTj3aGE8oj3ku/Z9lA+5E2X1nkQrRMEZim1OnpA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@farmfe/core-win32-ia32-msvc@1.3.27': + resolution: {integrity: sha512-9iNixkce8FUjZ0GrX15s/0txkssxDtcxt5FkDkoHdgr+/u+X+uo36rY33XXW0lbdT3cLr0OIfW3yJ/Ce1bmFBQ==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + '@farmfe/core-win32-x64-msvc@1.3.27': + resolution: {integrity: sha512-ov7pI3S4kzcG5xQCgvZ9XoL6ttFlx3wMPaLYN2Qh0aKTT4LtD7WEcGtD4mgoNZEyn/IhJYo42h10GnbT2anY0g==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@farmfe/core@1.3.27': + resolution: {integrity: sha512-kOfbUOXzTPVWeRk/WBMy3Q2LxTuIVHscLtdUM/MA17j/NPiv1gxyWfAuFUJ8FGj817s+pxRgX1SquW4sZkT6bA==} + engines: {node: '>=16.15.1'} + + '@farmfe/plugin-tools@0.1.1': + resolution: {integrity: sha512-7ox1VgCI5AWFrIUQVLEYGdqCSGNBJYRC0Yhu5sK0a/sR/OSaZa97MdiKA80LkM6UgK+dDFy49rPre10U/M7yww==} + hasBin: true + + '@farmfe/runtime-plugin-hmr@3.5.7': + resolution: {integrity: sha512-6vFwVOKcD++fe1ji+MVFV3CMSBF6A/lxpbPqvjVh30KcE0CXWSGcu8XOycgRZAieoRPRsojGRNNVePil6NFv6g==} + + '@farmfe/runtime-plugin-import-meta@0.2.2': + resolution: {integrity: sha512-xrWJOHbmhVJX+a6LtRpv5wvj/uqpPQFZIKeHfT+mqybKRSC9+JxDgOySLzYUbT8beSTtXgcxGXf55EN3Byd0ng==} + + '@farmfe/runtime@0.12.6': + resolution: {integrity: sha512-vvQJh4z3CLJHVvrRL/93URCo8BxvU8GmlGMW/GZXvrFyUmhKz4KSoL0aiHXbe8ELsBXUDpAzoxaJR4I+xM1hZg==} + + '@farmfe/utils@0.0.1': + resolution: {integrity: sha512-QLbgNrojcvxfumXA/H329XAXhoCahmeSH3JmaiwwJEGS2QAmWfgAJMegjwlt6OmArGVO4gSbJ7Xbmm1idZZs+g==} + + '@farmfe/utils@0.1.0': + resolution: {integrity: sha512-neNJQGqV7XL4XifG1uHOBFSFLy2yx1/DVZNRA7nfeEAXEksVZTwWA+fZrYEaI0w7Sw6K/9NYn9Jgpn+NAT0mcg==} + + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + + '@koa/cors@5.0.0': + resolution: {integrity: sha512-x/iUDjcS90W69PryLDIMgFyV21YLTnG9zOpPXS7Bkt2b8AsY3zZsIpOLBkYr9fBcF3HbkKaER5hOBZLfpLgYNw==} + engines: {node: '>= 14.0.0'} + + '@ljharb/through@2.3.13': + resolution: {integrity: sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ==} + engines: {node: '>= 0.4'} + + '@manypkg/find-root@1.1.0': + resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} + + '@manypkg/get-packages@1.1.3': + resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} + + '@mdn/browser-compat-data@5.6.6': + resolution: {integrity: sha512-Ar810M/WlJUpUt0uDxeUO8+UJ1fV4dbyilqYzOhPcBfjkgV454vs9S77IMcVcnPqu7o12tPGd1S1Wj9nDnn21A==} + + '@napi-rs/cli@2.18.4': + resolution: {integrity: sha512-SgJeA4df9DE2iAEpr3M2H0OKl/yjtg1BnRI5/JyowS71tUWhrfSu2LT0V3vlHET+g1hBVlrO60PmEXwUEKp8Mg==} + engines: {node: '>= 10'} + hasBin: true + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@rollup/rollup-android-arm-eabi@4.24.0': + resolution: {integrity: sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.24.0': + resolution: {integrity: sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.24.0': + resolution: {integrity: sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.24.0': + resolution: {integrity: sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-linux-arm-gnueabihf@4.24.0': + resolution: {integrity: sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-arm-musleabihf@4.24.0': + resolution: {integrity: sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==} + cpu: [arm] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-arm64-gnu@4.24.0': + resolution: {integrity: sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-arm64-musl@4.24.0': + resolution: {integrity: sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': + resolution: {integrity: sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-riscv64-gnu@4.24.0': + resolution: {integrity: sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-s390x-gnu@4.24.0': + resolution: {integrity: sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-gnu@4.24.0': + resolution: {integrity: sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-musl@4.24.0': + resolution: {integrity: sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rollup/rollup-win32-arm64-msvc@4.24.0': + resolution: {integrity: sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.24.0': + resolution: {integrity: sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.24.0': + resolution: {integrity: sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==} + cpu: [x64] + os: [win32] + + '@swc/helpers@0.5.13': + resolution: {integrity: sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==} + + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + + '@types/http-proxy@1.17.15': + resolution: {integrity: sha512-25g5atgiVNTIv0LBDTg1H74Hvayx0ajtJPLLcYE3whFv75J0pWNtOBzaXJQgDTmrX1bx5U9YC2w/n65BN1HwRQ==} + + '@types/node@12.20.55': + resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} + + '@types/node@22.7.5': + resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} + + '@types/object-path@0.11.4': + resolution: {integrity: sha512-4tgJ1Z3elF/tOMpA8JLVuR9spt9Ynsf7+JjqsQ2IqtiPJtcLoHoXcT6qU4E10cPFqyXX5HDm9QwIzZhBSkLxsw==} + + '@types/semver@7.5.8': + resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} + + '@types/ua-parser-js@0.7.39': + resolution: {integrity: sha512-P/oDfpofrdtF5xw433SPALpdSchtJmY7nsJItf8h3KXqOslkbySh8zq4dSWXH2oTjRvJ5PczVEoCZPow6GicLg==} + + '@vitejs/plugin-vue@5.1.4': + resolution: {integrity: sha512-N2XSI2n3sQqp5w7Y/AN/L2XDjBIRGqXko+eDp42sydYSBeJuSm5a1sLf8zakmo8u7tA8NmBgoDLA1HeOESjp9A==} + engines: {node: ^18.0.0 || >=20.0.0} + peerDependencies: + vite: ^5.0.0 + vue: ^3.2.25 + + '@vue/compiler-core@3.5.12': + resolution: {integrity: sha512-ISyBTRMmMYagUxhcpyEH0hpXRd/KqDU4ymofPgl2XAkY9ZhQ+h0ovEZJIiPop13UmR/54oA2cgMDjgroRelaEw==} + + '@vue/compiler-dom@3.5.12': + resolution: {integrity: sha512-9G6PbJ03uwxLHKQ3P42cMTi85lDRvGLB2rSGOiQqtXELat6uI4n8cNz9yjfVHRPIu+MsK6TE418Giruvgptckg==} + + '@vue/compiler-sfc@3.5.12': + resolution: {integrity: sha512-2k973OGo2JuAa5+ZlekuQJtitI5CgLMOwgl94BzMCsKZCX/xiqzJYzapl4opFogKHqwJk34vfsaKpfEhd1k5nw==} + + '@vue/compiler-ssr@3.5.12': + resolution: {integrity: sha512-eLwc7v6bfGBSM7wZOGPmRavSWzNFF6+PdRhE+VFJhNCgHiF8AM7ccoqcv5kBXA2eWUfigD7byekvf/JsOfKvPA==} + + '@vue/reactivity@3.5.12': + resolution: {integrity: sha512-UzaN3Da7xnJXdz4Okb/BGbAaomRHc3RdoWqTzlvd9+WBR5m3J39J1fGcHes7U3za0ruYn/iYy/a1euhMEHvTAg==} + + '@vue/runtime-core@3.5.12': + resolution: {integrity: sha512-hrMUYV6tpocr3TL3Ad8DqxOdpDe4zuQY4HPY3X/VRh+L2myQO8MFXPAMarIOSGNu0bFAjh1yBkMPXZBqCk62Uw==} + + '@vue/runtime-dom@3.5.12': + resolution: {integrity: sha512-q8VFxR9A2MRfBr6/55Q3umyoN7ya836FzRXajPB6/Vvuv0zOPL+qltd9rIMzG/DbRLAIlREmnLsplEF/kotXKA==} + + '@vue/server-renderer@3.5.12': + resolution: {integrity: sha512-I3QoeDDeEPZm8yR28JtY+rk880Oqmj43hreIBVTicisFTx/Dl7JpG72g/X7YF8hnQD3IFhkky5i2bPonwrTVPg==} + peerDependencies: + vue: 3.5.12 + + '@vue/shared@3.5.12': + resolution: {integrity: sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg==} + + accepts@1.3.8: + resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} + engines: {node: '>= 0.6'} + + ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + better-path-resolve@1.0.0: + resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} + engines: {node: '>=4'} + + big-integer@1.6.52: + resolution: {integrity: sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==} + engines: {node: '>=0.6'} + + binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + engines: {node: '>=8'} + + bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + + bplist-parser@0.2.0: + resolution: {integrity: sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==} + engines: {node: '>= 5.10.0'} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + browserslist@4.24.0: + resolution: {integrity: sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + + bundle-name@3.0.0: + resolution: {integrity: sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==} + engines: {node: '>=12'} + + bytes@3.1.2: + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} + + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + + cache-content-type@1.0.1: + resolution: {integrity: sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==} + engines: {node: '>= 6.0.0'} + + call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + + caniuse-lite@1.0.30001668: + resolution: {integrity: sha512-nWLrdxqCdblixUO+27JtGJJE/txpJlyUy5YN1u53wLZkP0emYCo5zgS6QYft7VUYR42LGgi/S5hdLZTrnyIddw==} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chalk@5.3.0: + resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + + chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + + ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} + engines: {node: '>=8'} + + cli-cursor@3.1.0: + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} + engines: {node: '>=8'} + + cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} + + cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} + + clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + + co@4.6.0: + resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} + engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + compressible@2.0.18: + resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==} + engines: {node: '>= 0.6'} + + content-disposition@0.5.4: + resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} + engines: {node: '>= 0.6'} + + content-type@1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + + cookies@0.9.1: + resolution: {integrity: sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==} + engines: {node: '>= 0.8'} + + core-js@3.38.1: + resolution: {integrity: sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==} + + cross-spawn@5.1.0: + resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} + + cross-spawn@7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + + csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + + debug@3.2.7: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + deep-equal@1.0.1: + resolution: {integrity: sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==} + + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + + default-browser-id@3.0.0: + resolution: {integrity: sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==} + engines: {node: '>=12'} + + default-browser@4.0.0: + resolution: {integrity: sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==} + engines: {node: '>=14.16'} + + defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + + define-lazy-prop@3.0.0: + resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} + engines: {node: '>=12'} + + delegates@1.0.0: + resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} + + depd@1.1.2: + resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==} + engines: {node: '>= 0.6'} + + depd@2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + + destroy@1.2.0: + resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + + detect-indent@6.1.0: + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} + + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + + dotenv-expand@11.0.6: + resolution: {integrity: sha512-8NHi73otpWsZGBSZwwknTXS5pqMOrk9+Ssrna8xCaxkzEpU9OTf9R5ArQGVw03//Zmk9MOwLPng9WwndvpAJ5g==} + engines: {node: '>=12'} + + dotenv@16.4.5: + resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} + engines: {node: '>=12'} + + ee-first@1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + + electron-to-chromium@1.5.36: + resolution: {integrity: sha512-HYTX8tKge/VNp6FGO+f/uVDmUkq+cEfcxYhKf15Akc4M5yxt5YmorwlAitKWjWhWQnKcDRBAQKXkhqqXMqcrjw==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + encodeurl@1.0.2: + resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} + engines: {node: '>= 0.8'} + + enquirer@2.4.1: + resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} + engines: {node: '>=8.6'} + + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + + es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + esbuild@0.21.5: + resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} + engines: {node: '>=12'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + + escape-string-regexp@5.0.0: + resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} + engines: {node: '>=12'} + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + eventemitter3@4.0.7: + resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} + + execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} + + execa@7.2.0: + resolution: {integrity: sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==} + engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0} + + extendable-error@0.1.7: + resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} + + external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + + farm-browserslist-generator@1.0.5: + resolution: {integrity: sha512-igffWSQATGV2ZJEvDBIB9Q2QfVOr+vv/JTZaaNoYfW/nrCGZ58zyJ0kSkFQEvptGUWf6idECqj82ykli4Ueplw==} + engines: {node: '>=16.15.1', npm: '>=7.0.0', pnpm: '>=3.2.0', yarn: '>=1.13'} + + farm-plugin-replace-dirname-darwin-arm64@0.2.1: + resolution: {integrity: sha512-9FThv/qoFuj3cJjv9P6YnXbBwPQ5TwGjnr50ejXdZn13Ehz0+7w7EscbRsZHNvT7p24p6i0Y9NUSallcWc2syw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + farm-plugin-replace-dirname-darwin-x64@0.2.1: + resolution: {integrity: sha512-Msqrh8mAPBbEpANpa0z9uQBr1/MO+PaHgBxym/aNs1vpxB4KAs6JQWYKtO+Ob7JzFyV6d9lIRhpnpxzxTqSIfA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + farm-plugin-replace-dirname-linux-arm64-gnu@0.2.1: + resolution: {integrity: sha512-ZKuxGu9G01CW521uTQHh+IP8pcT/NolGQfcQuEmBpD8epJ8per8Ps52fS05u5TGniaOg+ySZpt7HxbX+++k1YQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + farm-plugin-replace-dirname-linux-arm64-musl@0.2.1: + resolution: {integrity: sha512-m3gH8ggczbRYTHZSNp3LjIQIcqhvDO4O78bxXc8O1ozKD8M47/YfQLyQV06M7H4rZ8s6XV3Bb1kAcRAASp3M5A==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + farm-plugin-replace-dirname-linux-x64-gnu@0.2.1: + resolution: {integrity: sha512-MehKkoM2RFw3sCnEu9nCbXKjxtC3hfTad0h/dC+Z8iEBcLEReVLoNzHWWUa6BxkxqDtB82/BWO/ObSUj/VUnwQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [glibc] + + farm-plugin-replace-dirname-linux-x64-musl@0.2.1: + resolution: {integrity: sha512-o1qPZi16N/sHOteZYJVv6UmZFK3QKpVQrywk/4spJI0mPH9A9Y+G6iBE2Tqjb3d+1Hb6phr++EBJHZ2x1ajtGQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + farm-plugin-replace-dirname-win32-arm64-msvc@0.2.1: + resolution: {integrity: sha512-Xn/wYFkgb7SsTlSaefFtvxNbXEVdvZB854b/rBZu47+MRQpSnBIPwnTGcqo8eNTMjtnY4beGGtcd78iqMVAHFQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + farm-plugin-replace-dirname-win32-ia32-msvc@0.2.1: + resolution: {integrity: sha512-YtIu5CS/BSgbQZb1qjaBg0cEKvB4vCIbBxNn64H468zwliPbE93SAIyiwu6cL3la59cjBP4sEbz4ZAWyY9GoMQ==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + farm-plugin-replace-dirname-win32-x64-msvc@0.2.1: + resolution: {integrity: sha512-KUAf4rcv3Nz+CpGs4zr+ZRu4hWRp7SHQBgpX+mb0hhMjRvn+LoWm2qCL2q9Gp3jsTDVmzjPbyZxp/9UJKx13lQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + farm-plugin-replace-dirname@0.2.1: + resolution: {integrity: sha512-aJ4euQzxoq0sVu4AwXrNQflHJrSZdrdApGEyVRtN6KiCop3CHXnTg9ydlyCNXN2unQB283aNjojvCd5E/32KgA==} + + fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + + fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + + figures@5.0.0: + resolution: {integrity: sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==} + engines: {node: '>=14'} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + + follow-redirects@1.15.9: + resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + + fresh@0.5.2: + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} + engines: {node: '>= 0.6'} + + fs-extra@11.2.0: + resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} + engines: {node: '>=14.14'} + + fs-extra@7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + + fs-extra@8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + + get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + + gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} + + has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + http-assert@1.5.0: + resolution: {integrity: sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==} + engines: {node: '>= 0.8'} + + http-errors@1.6.3: + resolution: {integrity: sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==} + engines: {node: '>= 0.6'} + + http-errors@1.8.1: + resolution: {integrity: sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==} + engines: {node: '>= 0.6'} + + http-proxy-middleware@3.0.2: + resolution: {integrity: sha512-fBLFpmvDzlxdckwZRjM0wWtwDZ4KBtQ8NFqhrFKoEtK4myzuiumBuNTxD+F4cVbXfOZljIbrynmvByofDzT7Ag==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + http-proxy@1.18.1: + resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} + engines: {node: '>=8.0.0'} + + human-id@1.0.2: + resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} + + human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} + + human-signals@4.3.1: + resolution: {integrity: sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==} + engines: {node: '>=14.18.0'} + + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + inherits@2.0.3: + resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + inquirer@9.2.12: + resolution: {integrity: sha512-mg3Fh9g2zfuVWJn6lhST0O7x4n03k7G8Tx5nvikJkbq8/CK47WDVm+UznF0G6s5Zi0KcyUisr6DU8T67N5U+1Q==} + engines: {node: '>=14.18.0'} + + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + + is-docker@2.2.1: + resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} + engines: {node: '>=8'} + hasBin: true + + is-docker@3.0.0: + resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + hasBin: true + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-generator-function@1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-inside-container@1.0.0: + resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} + engines: {node: '>=14.16'} + hasBin: true + + is-interactive@1.0.0: + resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} + engines: {node: '>=8'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-plain-object@5.0.0: + resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} + engines: {node: '>=0.10.0'} + + is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + + is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + is-subdir@1.2.0: + resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} + engines: {node: '>=4'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + is-unicode-supported@1.3.0: + resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} + engines: {node: '>=12'} + + is-windows@1.0.2: + resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} + engines: {node: '>=0.10.0'} + + is-wsl@2.2.0: + resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} + engines: {node: '>=8'} + + isbot@3.8.0: + resolution: {integrity: sha512-vne1mzQUTR+qsMLeCBL9+/tgnDXRyc2pygLGl/WsgA+EZKIiB5Ehu0CiVTHIIk30zhJ24uGz4M5Ppse37aR0Hg==} + engines: {node: '>=12'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + js-yaml@3.14.1: + resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + hasBin: true + + jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + + jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + + keygrip@1.1.0: + resolution: {integrity: sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==} + engines: {node: '>= 0.6'} + + koa-compose@4.1.0: + resolution: {integrity: sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==} + + koa-compress@5.1.1: + resolution: {integrity: sha512-UgMIN7ZoEP2DuoSQmD6CYvFSLt0NReGlc2qSY4bO4Oq0L56OiD9pDG41Kj/zFmVY/A3Wvmn4BqKcfq5H30LGIg==} + engines: {node: '>= 12'} + + koa-connect@2.1.0: + resolution: {integrity: sha512-O9pcFafHk0oQsBevlbTBlB9co+2RUQJ4zCzu3qJPmGlGoeEZkne+7gWDkecqDPSbCtED6LmhlQladxs6NjOnMQ==} + + koa-convert@2.0.0: + resolution: {integrity: sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==} + engines: {node: '>= 10'} + + koa-is-json@1.0.0: + resolution: {integrity: sha512-+97CtHAlWDx0ndt0J8y3P12EWLwTLMXIfMnYDev3wOTwH/RpBGMlfn4bDXlMEg1u73K6XRE9BbUp+5ZAYoRYWw==} + + koa-send@5.0.1: + resolution: {integrity: sha512-tmcyQ/wXXuxpDxyNXv5yNNkdAMdFRqwtegBXUaowiQzUKqJehttS0x2j0eOZDQAyloAth5w6wwBImnFzkUz3pQ==} + engines: {node: '>= 8'} + + koa-static@5.0.0: + resolution: {integrity: sha512-UqyYyH5YEXaJrf9S8E23GoJFQZXkBVJ9zYYMPGz919MSX1KuvAcycIuS0ci150HCoPf4XQVhQ84Qf8xRPWxFaQ==} + engines: {node: '>= 7.6.0'} + + koa@2.15.3: + resolution: {integrity: sha512-j/8tY9j5t+GVMLeioLaxweJiKUayFhlGqNTzf2ZGwL0ZCQijd2RLHK0SLW5Tsko8YyyqCZC2cojIb0/s62qTAg==} + engines: {node: ^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4} + + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + + lodash.debounce@4.0.8: + resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} + + lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + loglevel@1.9.2: + resolution: {integrity: sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==} + engines: {node: '>= 0.6.0'} + + lru-cache@4.1.5: + resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} + + magic-string@0.30.12: + resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} + + media-typer@0.3.0: + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} + engines: {node: '>= 0.6'} + + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-db@1.53.0: + resolution: {integrity: sha512-oHlN/w+3MQ3rba9rqFr6V/ypF10LSkdwUysQL7GkXoTgIWeV+tcXGA852TBxH+gsh8UWoyhR1hKcoMJTuWflpg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + + mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + + mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + mute-stream@1.0.0: + resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + negotiator@0.6.3: + resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} + engines: {node: '>= 0.6'} + + node-releases@2.0.18: + resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + npm-run-path@4.0.1: + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} + + npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + object-path@0.11.8: + resolution: {integrity: sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==} + engines: {node: '>= 10.12.0'} + + on-finished@2.4.1: + resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} + engines: {node: '>= 0.8'} + + onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + + onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + + only@0.0.2: + resolution: {integrity: sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==} + + open@9.1.0: + resolution: {integrity: sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==} + engines: {node: '>=14.16'} + + ora@5.4.1: + resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + engines: {node: '>=10'} + + os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + + outdent@0.5.0: + resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + + p-filter@2.1.0: + resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} + engines: {node: '>=8'} + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + + p-map@2.1.0: + resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} + engines: {node: '>=6'} + + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + + package-manager-detector@0.2.2: + resolution: {integrity: sha512-VgXbyrSNsml4eHWIvxxG/nTL4wgybMTXCV2Un/+yEc3aDKKU6nQBZjbeP3Pl3qm9Qg92X/1ng4ffvCeD/zwHgg==} + + parseurl@1.3.3: + resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} + engines: {node: '>= 0.8'} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + + picocolors@1.1.0: + resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + pify@4.0.1: + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} + + postcss@8.4.47: + resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} + engines: {node: ^10 || ^12 || >=14} + + prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + + pseudomap@1.0.2: + resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + read-yaml-file@1.1.0: + resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} + engines: {node: '>=6'} + + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + + regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + + requires-port@1.0.0: + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + + resolve-path@1.4.0: + resolution: {integrity: sha512-i1xevIst/Qa+nA9olDxLWnLk8YZbi8R/7JPbCMcgyWaFR6bKWaexgJgEB5oc2PKMjYdrHynyz0NY+if+H98t1w==} + engines: {node: '>= 0.8'} + + restore-cursor@3.1.0: + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} + + reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rollup@4.24.0: + resolution: {integrity: sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + run-applescript@5.0.0: + resolution: {integrity: sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==} + engines: {node: '>=12'} + + run-async@3.0.0: + resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} + engines: {node: '>=0.12.0'} + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + rxjs@7.8.1: + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + + setprototypeof@1.1.0: + resolution: {integrity: sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==} + + setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + + shebang-command@1.2.0: + resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} + engines: {node: '>=0.10.0'} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@1.0.0: + resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} + engines: {node: '>=0.10.0'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + spawndamnit@2.0.0: + resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} + + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + + statuses@1.5.0: + resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} + engines: {node: '>= 0.6'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + + strip-final-newline@2.0.0: + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} + + strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + term-size@2.2.1: + resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} + engines: {node: '>=8'} + + titleize@3.0.0: + resolution: {integrity: sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==} + engines: {node: '>=12'} + + tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + + to-fast-properties@2.0.0: + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} + engines: {node: '>=4'} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + + tslib@2.7.0: + resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + + tsscmp@1.0.6: + resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==} + engines: {node: '>=0.6.x'} + + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + + type-is@1.6.18: + resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} + engines: {node: '>= 0.6'} + + ua-parser-js@1.0.39: + resolution: {integrity: sha512-k24RCVWlEcjkdOxYmVJgeD/0a1TiSpqLg+ZalVGV9lsnr4yqu0w7tX/x2xX6G4zpkgQnRf89lxuZ1wsbjXM8lw==} + hasBin: true + + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + + universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + + untildify@4.0.0: + resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} + engines: {node: '>=8'} + + update-browserslist-db@1.1.1: + resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + vary@1.1.2: + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} + + vite@5.4.8: + resolution: {integrity: sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + + vue@3.5.12: + resolution: {integrity: sha512-CLVZtXtn2ItBIi/zHZ0Sg1Xkb7+PU32bJJ8Bmy7ts3jxXTcbfsEfBivFYYWz1Hur+lalqGAh65Coin0r+HRUfg==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + walkdir@0.4.1: + resolution: {integrity: sha512-3eBwRyEln6E1MSzcxcVpQIhRG8Q1jLvEqRmCZqS3dsfXEDR/AhOF4d+jHg1qvDCpYaVRZjENPQyrVxAkQqxPgQ==} + engines: {node: '>=6.0.0'} + + wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + + which@1.3.1: + resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} + hasBin: true + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + yallist@2.1.2: + resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} + + ylru@1.4.0: + resolution: {integrity: sha512-2OQsPNEmBCvXuFlIni/a+Rn+R2pHW9INm0BxXJ4hVDA8TirqMj+J/Rp9ItLatT/5pZqWwefVrTQcHpixsxnVlA==} + engines: {node: '>= 4.0.0'} + + zod-validation-error@1.5.0: + resolution: {integrity: sha512-/7eFkAI4qV0tcxMBB/3+d2c1P6jzzZYdYSlBuAklzMuCrJu5bzJfHS0yVAS87dRHVlhftd6RFJDIvv03JgkSbw==} + engines: {node: '>=16.0.0'} + peerDependencies: + zod: ^3.18.0 + + zod@3.23.8: + resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} + +snapshots: + + '@babel/helper-string-parser@7.25.7': {} + + '@babel/helper-validator-identifier@7.25.7': {} + + '@babel/parser@7.25.8': + dependencies: + '@babel/types': 7.25.8 + + '@babel/runtime@7.25.7': + dependencies: + regenerator-runtime: 0.14.1 + + '@babel/types@7.25.8': + dependencies: + '@babel/helper-string-parser': 7.25.7 + '@babel/helper-validator-identifier': 7.25.7 + to-fast-properties: 2.0.0 + + '@changesets/apply-release-plan@7.0.5': + dependencies: + '@changesets/config': 3.0.3 + '@changesets/get-version-range-type': 0.4.0 + '@changesets/git': 3.0.1 + '@changesets/should-skip-package': 0.1.1 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + detect-indent: 6.1.0 + fs-extra: 7.0.1 + lodash.startcase: 4.4.0 + outdent: 0.5.0 + prettier: 2.8.8 + resolve-from: 5.0.0 + semver: 7.6.3 + + '@changesets/assemble-release-plan@6.0.4': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/should-skip-package': 0.1.1 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + semver: 7.6.3 + + '@changesets/changelog-git@0.2.0': + dependencies: + '@changesets/types': 6.0.0 + + '@changesets/cli@2.27.9': + dependencies: + '@changesets/apply-release-plan': 7.0.5 + '@changesets/assemble-release-plan': 6.0.4 + '@changesets/changelog-git': 0.2.0 + '@changesets/config': 3.0.3 + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/get-release-plan': 4.0.4 + '@changesets/git': 3.0.1 + '@changesets/logger': 0.1.1 + '@changesets/pre': 2.0.1 + '@changesets/read': 0.6.1 + '@changesets/should-skip-package': 0.1.1 + '@changesets/types': 6.0.0 + '@changesets/write': 0.3.2 + '@manypkg/get-packages': 1.1.3 + ansi-colors: 4.1.3 + ci-info: 3.9.0 + enquirer: 2.4.1 + external-editor: 3.1.0 + fs-extra: 7.0.1 + mri: 1.2.0 + p-limit: 2.3.0 + package-manager-detector: 0.2.2 + picocolors: 1.1.0 + resolve-from: 5.0.0 + semver: 7.6.3 + spawndamnit: 2.0.0 + term-size: 2.2.1 + + '@changesets/config@3.0.3': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/logger': 0.1.1 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + micromatch: 4.0.8 + + '@changesets/errors@0.2.0': + dependencies: + extendable-error: 0.1.7 + + '@changesets/get-dependents-graph@2.1.2': + dependencies: + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + picocolors: 1.1.0 + semver: 7.6.3 + + '@changesets/get-release-plan@4.0.4': + dependencies: + '@changesets/assemble-release-plan': 6.0.4 + '@changesets/config': 3.0.3 + '@changesets/pre': 2.0.1 + '@changesets/read': 0.6.1 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + + '@changesets/get-version-range-type@0.4.0': {} + + '@changesets/git@3.0.1': + dependencies: + '@changesets/errors': 0.2.0 + '@manypkg/get-packages': 1.1.3 + is-subdir: 1.2.0 + micromatch: 4.0.8 + spawndamnit: 2.0.0 + + '@changesets/logger@0.1.1': + dependencies: + picocolors: 1.1.0 + + '@changesets/parse@0.4.0': + dependencies: + '@changesets/types': 6.0.0 + js-yaml: 3.14.1 + + '@changesets/pre@2.0.1': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + + '@changesets/read@0.6.1': + dependencies: + '@changesets/git': 3.0.1 + '@changesets/logger': 0.1.1 + '@changesets/parse': 0.4.0 + '@changesets/types': 6.0.0 + fs-extra: 7.0.1 + p-filter: 2.1.0 + picocolors: 1.1.0 + + '@changesets/should-skip-package@0.1.1': + dependencies: + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 + + '@changesets/types@4.1.0': {} + + '@changesets/types@6.0.0': {} + + '@changesets/write@0.3.2': + dependencies: + '@changesets/types': 6.0.0 + fs-extra: 7.0.1 + human-id: 1.0.2 + prettier: 2.8.8 + + '@esbuild/aix-ppc64@0.21.5': + optional: true + + '@esbuild/android-arm64@0.21.5': + optional: true + + '@esbuild/android-arm@0.21.5': + optional: true + + '@esbuild/android-x64@0.21.5': + optional: true + + '@esbuild/darwin-arm64@0.21.5': + optional: true + + '@esbuild/darwin-x64@0.21.5': + optional: true + + '@esbuild/freebsd-arm64@0.21.5': + optional: true + + '@esbuild/freebsd-x64@0.21.5': + optional: true + + '@esbuild/linux-arm64@0.21.5': + optional: true + + '@esbuild/linux-arm@0.21.5': + optional: true + + '@esbuild/linux-ia32@0.21.5': + optional: true + + '@esbuild/linux-loong64@0.21.5': + optional: true + + '@esbuild/linux-mips64el@0.21.5': + optional: true + + '@esbuild/linux-ppc64@0.21.5': + optional: true + + '@esbuild/linux-riscv64@0.21.5': + optional: true + + '@esbuild/linux-s390x@0.21.5': + optional: true + + '@esbuild/linux-x64@0.21.5': + optional: true + + '@esbuild/netbsd-x64@0.21.5': + optional: true + + '@esbuild/openbsd-x64@0.21.5': + optional: true + + '@esbuild/sunos-x64@0.21.5': + optional: true + + '@esbuild/win32-arm64@0.21.5': + optional: true + + '@esbuild/win32-ia32@0.21.5': + optional: true + + '@esbuild/win32-x64@0.21.5': + optional: true + + '@farmfe/cli@1.0.4': + dependencies: + cac: 6.7.14 + cross-spawn: 7.0.3 + inquirer: 9.2.12 + walkdir: 0.4.1 + + '@farmfe/core-darwin-arm64@1.3.27': + optional: true + + '@farmfe/core-darwin-x64@1.3.27': + optional: true + + '@farmfe/core-linux-arm64-gnu@1.3.27': + optional: true + + '@farmfe/core-linux-arm64-musl@1.3.27': + optional: true + + '@farmfe/core-linux-x64-gnu@1.3.27': + optional: true + + '@farmfe/core-linux-x64-musl@1.3.27': + optional: true + + '@farmfe/core-win32-arm64-msvc@1.3.27': + optional: true + + '@farmfe/core-win32-ia32-msvc@1.3.27': + optional: true + + '@farmfe/core-win32-x64-msvc@1.3.27': + optional: true + + '@farmfe/core@1.3.27': + dependencies: + '@farmfe/runtime': 0.12.6 + '@farmfe/runtime-plugin-hmr': 3.5.7 + '@farmfe/runtime-plugin-import-meta': 0.2.2 + '@farmfe/utils': 0.1.0 + '@koa/cors': 5.0.0 + '@swc/helpers': 0.5.13 + chokidar: 3.6.0 + deepmerge: 4.3.1 + dotenv: 16.4.5 + dotenv-expand: 11.0.6 + execa: 7.2.0 + farm-browserslist-generator: 1.0.5 + farm-plugin-replace-dirname: 0.2.1 + fast-glob: 3.3.2 + fs-extra: 11.2.0 + http-proxy-middleware: 3.0.2 + is-plain-object: 5.0.0 + koa: 2.15.3 + koa-compress: 5.1.1 + koa-connect: 2.1.0 + koa-static: 5.0.0 + lodash.debounce: 4.0.8 + loglevel: 1.9.2 + open: 9.1.0 + ws: 8.18.0 + zod: 3.23.8 + zod-validation-error: 1.5.0(zod@3.23.8) + optionalDependencies: + '@farmfe/core-darwin-arm64': 1.3.27 + '@farmfe/core-darwin-x64': 1.3.27 + '@farmfe/core-linux-arm64-gnu': 1.3.27 + '@farmfe/core-linux-arm64-musl': 1.3.27 + '@farmfe/core-linux-x64-gnu': 1.3.27 + '@farmfe/core-linux-x64-musl': 1.3.27 + '@farmfe/core-win32-arm64-msvc': 1.3.27 + '@farmfe/core-win32-ia32-msvc': 1.3.27 + '@farmfe/core-win32-x64-msvc': 1.3.27 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@farmfe/plugin-tools@0.1.1': + dependencies: + '@farmfe/utils': 0.1.0 + '@napi-rs/cli': 2.18.4 + cac: 6.7.14 + + '@farmfe/runtime-plugin-hmr@3.5.7': + dependencies: + core-js: 3.38.1 + + '@farmfe/runtime-plugin-import-meta@0.2.2': + dependencies: + core-js: 3.38.1 + + '@farmfe/runtime@0.12.6': + dependencies: + core-js: 3.38.1 + + '@farmfe/utils@0.0.1': {} + + '@farmfe/utils@0.1.0': {} + + '@jridgewell/sourcemap-codec@1.5.0': {} + + '@koa/cors@5.0.0': + dependencies: + vary: 1.1.2 + + '@ljharb/through@2.3.13': + dependencies: + call-bind: 1.0.7 + + '@manypkg/find-root@1.1.0': + dependencies: + '@babel/runtime': 7.25.7 + '@types/node': 12.20.55 + find-up: 4.1.0 + fs-extra: 8.1.0 + + '@manypkg/get-packages@1.1.3': + dependencies: + '@babel/runtime': 7.25.7 + '@changesets/types': 4.1.0 + '@manypkg/find-root': 1.1.0 + fs-extra: 8.1.0 + globby: 11.1.0 + read-yaml-file: 1.1.0 + + '@mdn/browser-compat-data@5.6.6': {} + + '@napi-rs/cli@2.18.4': {} + + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.17.1 + + '@rollup/rollup-android-arm-eabi@4.24.0': + optional: true + + '@rollup/rollup-android-arm64@4.24.0': + optional: true + + '@rollup/rollup-darwin-arm64@4.24.0': + optional: true + + '@rollup/rollup-darwin-x64@4.24.0': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.24.0': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.24.0': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.24.0': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.24.0': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.24.0': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.24.0': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.24.0': + optional: true + + '@rollup/rollup-linux-x64-musl@4.24.0': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.24.0': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.24.0': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.24.0': + optional: true + + '@swc/helpers@0.5.13': + dependencies: + tslib: 2.7.0 + + '@types/estree@1.0.6': {} + + '@types/http-proxy@1.17.15': + dependencies: + '@types/node': 22.7.5 + + '@types/node@12.20.55': {} + + '@types/node@22.7.5': + dependencies: + undici-types: 6.19.8 + + '@types/object-path@0.11.4': {} + + '@types/semver@7.5.8': {} + + '@types/ua-parser-js@0.7.39': {} + + '@vitejs/plugin-vue@5.1.4(vite@5.4.8(@types/node@22.7.5))(vue@3.5.12)': + dependencies: + vite: 5.4.8(@types/node@22.7.5) + vue: 3.5.12 + + '@vue/compiler-core@3.5.12': + dependencies: + '@babel/parser': 7.25.8 + '@vue/shared': 3.5.12 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.1 + + '@vue/compiler-dom@3.5.12': + dependencies: + '@vue/compiler-core': 3.5.12 + '@vue/shared': 3.5.12 + + '@vue/compiler-sfc@3.5.12': + dependencies: + '@babel/parser': 7.25.8 + '@vue/compiler-core': 3.5.12 + '@vue/compiler-dom': 3.5.12 + '@vue/compiler-ssr': 3.5.12 + '@vue/shared': 3.5.12 + estree-walker: 2.0.2 + magic-string: 0.30.12 + postcss: 8.4.47 + source-map-js: 1.2.1 + + '@vue/compiler-ssr@3.5.12': + dependencies: + '@vue/compiler-dom': 3.5.12 + '@vue/shared': 3.5.12 + + '@vue/reactivity@3.5.12': + dependencies: + '@vue/shared': 3.5.12 + + '@vue/runtime-core@3.5.12': + dependencies: + '@vue/reactivity': 3.5.12 + '@vue/shared': 3.5.12 + + '@vue/runtime-dom@3.5.12': + dependencies: + '@vue/reactivity': 3.5.12 + '@vue/runtime-core': 3.5.12 + '@vue/shared': 3.5.12 + csstype: 3.1.3 + + '@vue/server-renderer@3.5.12(vue@3.5.12)': + dependencies: + '@vue/compiler-ssr': 3.5.12 + '@vue/shared': 3.5.12 + vue: 3.5.12 + + '@vue/shared@3.5.12': {} + + accepts@1.3.8: + dependencies: + mime-types: 2.1.35 + negotiator: 0.6.3 + + ansi-colors@4.1.3: {} + + ansi-escapes@4.3.2: + dependencies: + type-fest: 0.21.3 + + ansi-regex@5.0.1: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + + argparse@1.0.10: + dependencies: + sprintf-js: 1.0.3 + + array-union@2.1.0: {} + + base64-js@1.5.1: {} + + better-path-resolve@1.0.0: + dependencies: + is-windows: 1.0.2 + + big-integer@1.6.52: {} + + binary-extensions@2.3.0: {} + + bl@4.1.0: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + + bplist-parser@0.2.0: + dependencies: + big-integer: 1.6.52 + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + browserslist@4.24.0: + dependencies: + caniuse-lite: 1.0.30001668 + electron-to-chromium: 1.5.36 + node-releases: 2.0.18 + update-browserslist-db: 1.1.1(browserslist@4.24.0) + + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + bundle-name@3.0.0: + dependencies: + run-applescript: 5.0.0 + + bytes@3.1.2: {} + + cac@6.7.14: {} + + cache-content-type@1.0.1: + dependencies: + mime-types: 2.1.35 + ylru: 1.4.0 + + call-bind@1.0.7: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.2 + + caniuse-lite@1.0.30001668: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chalk@5.3.0: {} + + chardet@0.7.0: {} + + chokidar@3.6.0: + dependencies: + anymatch: 3.1.3 + braces: 3.0.3 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + + ci-info@3.9.0: {} + + cli-cursor@3.1.0: + dependencies: + restore-cursor: 3.1.0 + + cli-spinners@2.9.2: {} + + cli-width@4.1.0: {} + + clone@1.0.4: {} + + co@4.6.0: {} + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + compressible@2.0.18: + dependencies: + mime-db: 1.53.0 + + content-disposition@0.5.4: + dependencies: + safe-buffer: 5.2.1 + + content-type@1.0.5: {} + + cookies@0.9.1: + dependencies: + depd: 2.0.0 + keygrip: 1.1.0 + + core-js@3.38.1: {} + + cross-spawn@5.1.0: + dependencies: + lru-cache: 4.1.5 + shebang-command: 1.2.0 + which: 1.3.1 + + cross-spawn@7.0.3: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + csstype@3.1.3: {} + + debug@3.2.7: + dependencies: + ms: 2.1.3 + + debug@4.3.7: + dependencies: + ms: 2.1.3 + + deep-equal@1.0.1: {} + + deepmerge@4.3.1: {} + + default-browser-id@3.0.0: + dependencies: + bplist-parser: 0.2.0 + untildify: 4.0.0 + + default-browser@4.0.0: + dependencies: + bundle-name: 3.0.0 + default-browser-id: 3.0.0 + execa: 7.2.0 + titleize: 3.0.0 + + defaults@1.0.4: + dependencies: + clone: 1.0.4 + + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + + define-lazy-prop@3.0.0: {} + + delegates@1.0.0: {} + + depd@1.1.2: {} + + depd@2.0.0: {} + + destroy@1.2.0: {} + + detect-indent@6.1.0: {} + + dir-glob@3.0.1: + dependencies: + path-type: 4.0.0 + + dotenv-expand@11.0.6: + dependencies: + dotenv: 16.4.5 + + dotenv@16.4.5: {} + + ee-first@1.1.1: {} + + electron-to-chromium@1.5.36: {} + + emoji-regex@8.0.0: {} + + encodeurl@1.0.2: {} + + enquirer@2.4.1: + dependencies: + ansi-colors: 4.1.3 + strip-ansi: 6.0.1 + + entities@4.5.0: {} + + es-define-property@1.0.0: + dependencies: + get-intrinsic: 1.2.4 + + es-errors@1.3.0: {} + + esbuild@0.21.5: + optionalDependencies: + '@esbuild/aix-ppc64': 0.21.5 + '@esbuild/android-arm': 0.21.5 + '@esbuild/android-arm64': 0.21.5 + '@esbuild/android-x64': 0.21.5 + '@esbuild/darwin-arm64': 0.21.5 + '@esbuild/darwin-x64': 0.21.5 + '@esbuild/freebsd-arm64': 0.21.5 + '@esbuild/freebsd-x64': 0.21.5 + '@esbuild/linux-arm': 0.21.5 + '@esbuild/linux-arm64': 0.21.5 + '@esbuild/linux-ia32': 0.21.5 + '@esbuild/linux-loong64': 0.21.5 + '@esbuild/linux-mips64el': 0.21.5 + '@esbuild/linux-ppc64': 0.21.5 + '@esbuild/linux-riscv64': 0.21.5 + '@esbuild/linux-s390x': 0.21.5 + '@esbuild/linux-x64': 0.21.5 + '@esbuild/netbsd-x64': 0.21.5 + '@esbuild/openbsd-x64': 0.21.5 + '@esbuild/sunos-x64': 0.21.5 + '@esbuild/win32-arm64': 0.21.5 + '@esbuild/win32-ia32': 0.21.5 + '@esbuild/win32-x64': 0.21.5 + + escalade@3.2.0: {} + + escape-html@1.0.3: {} + + escape-string-regexp@5.0.0: {} + + esprima@4.0.1: {} + + estree-walker@2.0.2: {} + + eventemitter3@4.0.7: {} + + execa@5.1.1: + dependencies: + cross-spawn: 7.0.3 + get-stream: 6.0.1 + human-signals: 2.1.0 + is-stream: 2.0.1 + merge-stream: 2.0.0 + npm-run-path: 4.0.1 + onetime: 5.1.2 + signal-exit: 3.0.7 + strip-final-newline: 2.0.0 + + execa@7.2.0: + dependencies: + cross-spawn: 7.0.3 + get-stream: 6.0.1 + human-signals: 4.3.1 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.3.0 + onetime: 6.0.0 + signal-exit: 3.0.7 + strip-final-newline: 3.0.0 + + extendable-error@0.1.7: {} + + external-editor@3.1.0: + dependencies: + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 + + farm-browserslist-generator@1.0.5: + dependencies: + '@mdn/browser-compat-data': 5.6.6 + '@types/object-path': 0.11.4 + '@types/semver': 7.5.8 + '@types/ua-parser-js': 0.7.39 + browserslist: 4.24.0 + caniuse-lite: 1.0.30001668 + isbot: 3.8.0 + object-path: 0.11.8 + semver: 7.6.3 + ua-parser-js: 1.0.39 + + farm-plugin-replace-dirname-darwin-arm64@0.2.1: + optional: true + + farm-plugin-replace-dirname-darwin-x64@0.2.1: + optional: true + + farm-plugin-replace-dirname-linux-arm64-gnu@0.2.1: + optional: true + + farm-plugin-replace-dirname-linux-arm64-musl@0.2.1: + optional: true + + farm-plugin-replace-dirname-linux-x64-gnu@0.2.1: + optional: true + + farm-plugin-replace-dirname-linux-x64-musl@0.2.1: + optional: true + + farm-plugin-replace-dirname-win32-arm64-msvc@0.2.1: + optional: true + + farm-plugin-replace-dirname-win32-ia32-msvc@0.2.1: + optional: true + + farm-plugin-replace-dirname-win32-x64-msvc@0.2.1: + optional: true + + farm-plugin-replace-dirname@0.2.1: + dependencies: + '@changesets/cli': 2.27.9 + '@farmfe/utils': 0.0.1 + cac: 6.7.14 + optionalDependencies: + farm-plugin-replace-dirname-darwin-arm64: 0.2.1 + farm-plugin-replace-dirname-darwin-x64: 0.2.1 + farm-plugin-replace-dirname-linux-arm64-gnu: 0.2.1 + farm-plugin-replace-dirname-linux-arm64-musl: 0.2.1 + farm-plugin-replace-dirname-linux-x64-gnu: 0.2.1 + farm-plugin-replace-dirname-linux-x64-musl: 0.2.1 + farm-plugin-replace-dirname-win32-arm64-msvc: 0.2.1 + farm-plugin-replace-dirname-win32-ia32-msvc: 0.2.1 + farm-plugin-replace-dirname-win32-x64-msvc: 0.2.1 + + fast-glob@3.3.2: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + + fastq@1.17.1: + dependencies: + reusify: 1.0.4 + + figures@5.0.0: + dependencies: + escape-string-regexp: 5.0.0 + is-unicode-supported: 1.3.0 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + find-up@4.1.0: + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + + follow-redirects@1.15.9(debug@4.3.7): + optionalDependencies: + debug: 4.3.7 + + fresh@0.5.2: {} + + fs-extra@11.2.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + + fs-extra@7.0.1: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + + fs-extra@8.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + get-intrinsic@1.2.4: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.2 + + get-stream@6.0.1: {} + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + globby@11.1.0: + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.3.2 + merge2: 1.4.1 + slash: 3.0.0 + + gopd@1.0.1: + dependencies: + get-intrinsic: 1.2.4 + + graceful-fs@4.2.11: {} + + has-flag@4.0.0: {} + + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.0 + + has-proto@1.0.3: {} + + has-symbols@1.0.3: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.0.3 + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + http-assert@1.5.0: + dependencies: + deep-equal: 1.0.1 + http-errors: 1.8.1 + + http-errors@1.6.3: + dependencies: + depd: 1.1.2 + inherits: 2.0.3 + setprototypeof: 1.1.0 + statuses: 1.5.0 + + http-errors@1.8.1: + dependencies: + depd: 1.1.2 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 1.5.0 + toidentifier: 1.0.1 + + http-proxy-middleware@3.0.2: + dependencies: + '@types/http-proxy': 1.17.15 + debug: 4.3.7 + http-proxy: 1.18.1(debug@4.3.7) + is-glob: 4.0.3 + is-plain-object: 5.0.0 + micromatch: 4.0.8 + transitivePeerDependencies: + - supports-color + + http-proxy@1.18.1(debug@4.3.7): + dependencies: + eventemitter3: 4.0.7 + follow-redirects: 1.15.9(debug@4.3.7) + requires-port: 1.0.0 + transitivePeerDependencies: + - debug + + human-id@1.0.2: {} + + human-signals@2.1.0: {} + + human-signals@4.3.1: {} + + iconv-lite@0.4.24: + dependencies: + safer-buffer: 2.1.2 + + ieee754@1.2.1: {} + + ignore@5.3.2: {} + + inherits@2.0.3: {} + + inherits@2.0.4: {} + + inquirer@9.2.12: + dependencies: + '@ljharb/through': 2.3.13 + ansi-escapes: 4.3.2 + chalk: 5.3.0 + cli-cursor: 3.1.0 + cli-width: 4.1.0 + external-editor: 3.1.0 + figures: 5.0.0 + lodash: 4.17.21 + mute-stream: 1.0.0 + ora: 5.4.1 + run-async: 3.0.0 + rxjs: 7.8.1 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + + is-binary-path@2.1.0: + dependencies: + binary-extensions: 2.3.0 + + is-docker@2.2.1: {} + + is-docker@3.0.0: {} + + is-extglob@2.1.1: {} + + is-fullwidth-code-point@3.0.0: {} + + is-generator-function@1.0.10: + dependencies: + has-tostringtag: 1.0.2 + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-inside-container@1.0.0: + dependencies: + is-docker: 3.0.0 + + is-interactive@1.0.0: {} + + is-number@7.0.0: {} + + is-plain-object@5.0.0: {} + + is-stream@2.0.1: {} + + is-stream@3.0.0: {} + + is-subdir@1.2.0: + dependencies: + better-path-resolve: 1.0.0 + + is-unicode-supported@0.1.0: {} + + is-unicode-supported@1.3.0: {} + + is-windows@1.0.2: {} + + is-wsl@2.2.0: + dependencies: + is-docker: 2.2.1 + + isbot@3.8.0: {} + + isexe@2.0.0: {} + + js-yaml@3.14.1: + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + + jsonfile@4.0.0: + optionalDependencies: + graceful-fs: 4.2.11 + + jsonfile@6.1.0: + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + + keygrip@1.1.0: + dependencies: + tsscmp: 1.0.6 + + koa-compose@4.1.0: {} + + koa-compress@5.1.1: + dependencies: + bytes: 3.1.2 + compressible: 2.0.18 + http-errors: 1.8.1 + koa-is-json: 1.0.0 + + koa-connect@2.1.0: {} + + koa-convert@2.0.0: + dependencies: + co: 4.6.0 + koa-compose: 4.1.0 + + koa-is-json@1.0.0: {} + + koa-send@5.0.1: + dependencies: + debug: 4.3.7 + http-errors: 1.8.1 + resolve-path: 1.4.0 + transitivePeerDependencies: + - supports-color + + koa-static@5.0.0: + dependencies: + debug: 3.2.7 + koa-send: 5.0.1 + transitivePeerDependencies: + - supports-color + + koa@2.15.3: + dependencies: + accepts: 1.3.8 + cache-content-type: 1.0.1 + content-disposition: 0.5.4 + content-type: 1.0.5 + cookies: 0.9.1 + debug: 4.3.7 + delegates: 1.0.0 + depd: 2.0.0 + destroy: 1.2.0 + encodeurl: 1.0.2 + escape-html: 1.0.3 + fresh: 0.5.2 + http-assert: 1.5.0 + http-errors: 1.8.1 + is-generator-function: 1.0.10 + koa-compose: 4.1.0 + koa-convert: 2.0.0 + on-finished: 2.4.1 + only: 0.0.2 + parseurl: 1.3.3 + statuses: 1.5.0 + type-is: 1.6.18 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + + locate-path@5.0.0: + dependencies: + p-locate: 4.1.0 + + lodash.debounce@4.0.8: {} + + lodash.startcase@4.4.0: {} + + lodash@4.17.21: {} + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + loglevel@1.9.2: {} + + lru-cache@4.1.5: + dependencies: + pseudomap: 1.0.2 + yallist: 2.1.2 + + magic-string@0.30.12: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + + media-typer@0.3.0: {} + + merge-stream@2.0.0: {} + + merge2@1.4.1: {} + + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + + mime-db@1.52.0: {} + + mime-db@1.53.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + mimic-fn@2.1.0: {} + + mimic-fn@4.0.0: {} + + mri@1.2.0: {} + + ms@2.1.3: {} + + mute-stream@1.0.0: {} + + nanoid@3.3.7: {} + + negotiator@0.6.3: {} + + node-releases@2.0.18: {} + + normalize-path@3.0.0: {} + + npm-run-path@4.0.1: + dependencies: + path-key: 3.1.1 + + npm-run-path@5.3.0: + dependencies: + path-key: 4.0.0 + + object-path@0.11.8: {} + + on-finished@2.4.1: + dependencies: + ee-first: 1.1.1 + + onetime@5.1.2: + dependencies: + mimic-fn: 2.1.0 + + onetime@6.0.0: + dependencies: + mimic-fn: 4.0.0 + + only@0.0.2: {} + + open@9.1.0: + dependencies: + default-browser: 4.0.0 + define-lazy-prop: 3.0.0 + is-inside-container: 1.0.0 + is-wsl: 2.2.0 + + ora@5.4.1: + dependencies: + bl: 4.1.0 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-spinners: 2.9.2 + is-interactive: 1.0.0 + is-unicode-supported: 0.1.0 + log-symbols: 4.1.0 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + + os-tmpdir@1.0.2: {} + + outdent@0.5.0: {} + + p-filter@2.1.0: + dependencies: + p-map: 2.1.0 + + p-limit@2.3.0: + dependencies: + p-try: 2.2.0 + + p-locate@4.1.0: + dependencies: + p-limit: 2.3.0 + + p-map@2.1.0: {} + + p-try@2.2.0: {} + + package-manager-detector@0.2.2: {} + + parseurl@1.3.3: {} + + path-exists@4.0.0: {} + + path-is-absolute@1.0.1: {} + + path-key@3.1.1: {} + + path-key@4.0.0: {} + + path-type@4.0.0: {} + + picocolors@1.1.0: {} + + picomatch@2.3.1: {} + + pify@4.0.1: {} + + postcss@8.4.47: + dependencies: + nanoid: 3.3.7 + picocolors: 1.1.0 + source-map-js: 1.2.1 + + prettier@2.8.8: {} + + pseudomap@1.0.2: {} + + queue-microtask@1.2.3: {} + + read-yaml-file@1.1.0: + dependencies: + graceful-fs: 4.2.11 + js-yaml: 3.14.1 + pify: 4.0.1 + strip-bom: 3.0.0 + + readable-stream@3.6.2: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + + readdirp@3.6.0: + dependencies: + picomatch: 2.3.1 + + regenerator-runtime@0.14.1: {} + + requires-port@1.0.0: {} + + resolve-from@5.0.0: {} + + resolve-path@1.4.0: + dependencies: + http-errors: 1.6.3 + path-is-absolute: 1.0.1 + + restore-cursor@3.1.0: + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + + reusify@1.0.4: {} + + rollup@4.24.0: + dependencies: + '@types/estree': 1.0.6 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.24.0 + '@rollup/rollup-android-arm64': 4.24.0 + '@rollup/rollup-darwin-arm64': 4.24.0 + '@rollup/rollup-darwin-x64': 4.24.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.24.0 + '@rollup/rollup-linux-arm-musleabihf': 4.24.0 + '@rollup/rollup-linux-arm64-gnu': 4.24.0 + '@rollup/rollup-linux-arm64-musl': 4.24.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.24.0 + '@rollup/rollup-linux-riscv64-gnu': 4.24.0 + '@rollup/rollup-linux-s390x-gnu': 4.24.0 + '@rollup/rollup-linux-x64-gnu': 4.24.0 + '@rollup/rollup-linux-x64-musl': 4.24.0 + '@rollup/rollup-win32-arm64-msvc': 4.24.0 + '@rollup/rollup-win32-ia32-msvc': 4.24.0 + '@rollup/rollup-win32-x64-msvc': 4.24.0 + fsevents: 2.3.3 + + run-applescript@5.0.0: + dependencies: + execa: 5.1.1 + + run-async@3.0.0: {} + + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + + rxjs@7.8.1: + dependencies: + tslib: 2.7.0 + + safe-buffer@5.2.1: {} + + safer-buffer@2.1.2: {} + + semver@7.6.3: {} + + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + + setprototypeof@1.1.0: {} + + setprototypeof@1.2.0: {} + + shebang-command@1.2.0: + dependencies: + shebang-regex: 1.0.0 + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@1.0.0: {} + + shebang-regex@3.0.0: {} + + signal-exit@3.0.7: {} + + slash@3.0.0: {} + + source-map-js@1.2.1: {} + + spawndamnit@2.0.0: + dependencies: + cross-spawn: 5.1.0 + signal-exit: 3.0.7 + + sprintf-js@1.0.3: {} + + statuses@1.5.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-bom@3.0.0: {} + + strip-final-newline@2.0.0: {} + + strip-final-newline@3.0.0: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + term-size@2.2.1: {} + + titleize@3.0.0: {} + + tmp@0.0.33: + dependencies: + os-tmpdir: 1.0.2 + + to-fast-properties@2.0.0: {} + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + toidentifier@1.0.1: {} + + tslib@2.7.0: {} + + tsscmp@1.0.6: {} + + type-fest@0.21.3: {} + + type-is@1.6.18: + dependencies: + media-typer: 0.3.0 + mime-types: 2.1.35 + + ua-parser-js@1.0.39: {} + + undici-types@6.19.8: {} + + universalify@0.1.2: {} + + universalify@2.0.1: {} + + untildify@4.0.0: {} + + update-browserslist-db@1.1.1(browserslist@4.24.0): + dependencies: + browserslist: 4.24.0 + escalade: 3.2.0 + picocolors: 1.1.0 + + util-deprecate@1.0.2: {} + + vary@1.1.2: {} + + vite@5.4.8(@types/node@22.7.5): + dependencies: + esbuild: 0.21.5 + postcss: 8.4.47 + rollup: 4.24.0 + optionalDependencies: + '@types/node': 22.7.5 + fsevents: 2.3.3 + + vue@3.5.12: + dependencies: + '@vue/compiler-dom': 3.5.12 + '@vue/compiler-sfc': 3.5.12 + '@vue/runtime-dom': 3.5.12 + '@vue/server-renderer': 3.5.12(vue@3.5.12) + '@vue/shared': 3.5.12 + + walkdir@0.4.1: {} + + wcwidth@1.0.1: + dependencies: + defaults: 1.0.4 + + which@1.3.1: + dependencies: + isexe: 2.0.0 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + wrap-ansi@6.2.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + ws@8.18.0: {} + + yallist@2.1.2: {} + + ylru@1.4.0: {} + + zod-validation-error@1.5.0(zod@3.23.8): + dependencies: + zod: 3.23.8 + + zod@3.23.8: {} diff --git a/rust-plugins/vue-jsx/pnpm-workspace.yaml b/rust-plugins/vue-jsx/pnpm-workspace.yaml new file mode 100644 index 0000000..bf93c07 --- /dev/null +++ b/rust-plugins/vue-jsx/pnpm-workspace.yaml @@ -0,0 +1,3 @@ +packages: + - '.' + - playground diff --git a/rust-plugins/vue-jsx/rust-toolchain.toml b/rust-plugins/vue-jsx/rust-toolchain.toml new file mode 100644 index 0000000..0eb96b5 --- /dev/null +++ b/rust-plugins/vue-jsx/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "nightly-2024-04-16" +components = ["clippy", "rustfmt", "rust-src", "rustc-dev"] diff --git a/rust-plugins/vue-jsx/rustfmt.toml b/rust-plugins/vue-jsx/rustfmt.toml new file mode 100644 index 0000000..cab5731 --- /dev/null +++ b/rust-plugins/vue-jsx/rustfmt.toml @@ -0,0 +1,2 @@ +tab_spaces = 2 +edition = "2021" diff --git a/rust-plugins/vue-jsx/scripts/func.js b/rust-plugins/vue-jsx/scripts/func.js new file mode 100644 index 0000000..ebd41be --- /dev/null +++ b/rust-plugins/vue-jsx/scripts/func.js @@ -0,0 +1,3 @@ +import binPath from "./index.js"; + +export default (options)=>[binPath,options]; diff --git a/rust-plugins/vue-jsx/scripts/index.d.ts b/rust-plugins/vue-jsx/scripts/index.d.ts new file mode 100644 index 0000000..ae1464e --- /dev/null +++ b/rust-plugins/vue-jsx/scripts/index.d.ts @@ -0,0 +1,3 @@ +import type { IPluginOptions } from '../options.d'; +declare const binPath: (options?: IPluginOptions) => [string, IPluginOptions]; +export default binPath; diff --git a/rust-plugins/vue-jsx/scripts/index.js b/rust-plugins/vue-jsx/scripts/index.js new file mode 100644 index 0000000..4547e72 --- /dev/null +++ b/rust-plugins/vue-jsx/scripts/index.js @@ -0,0 +1,124 @@ +import { existsSync, readFileSync } from 'fs'; +import { createRequire } from 'module'; +import { dirname, join } from 'path'; +import { fileURLToPath } from 'url'; + +const { platform, arch } = process; +const currentDir = dirname(fileURLToPath(import.meta.url)); + +let binPath = null; + +const require = createRequire(import.meta.url); + +function isMusl() { + // For Node 10 + if (!process.report || typeof process.report.getReport !== 'function') { + try { + return readFileSync('/usr/bin/ldd', 'utf8').includes('musl'); + } catch (e) { + return true; + } + } else { + const { glibcVersionRuntime } = process.report.getReport().header; + return !glibcVersionRuntime; + } +} + +switch (platform) { + case 'win32': + switch (arch) { + case 'x64': + if (existsSync(join(currentDir, '../npm/win32-x64-msvc/index.farm'))) { + binPath = join(currentDir, '../npm/win32-x64-msvc/index.farm'); + } else { + binPath = require.resolve('farmfe-plugin-vue-jsx-win32-x64-msvc'); + } + + break; + case 'ia32': + if (existsSync(join(currentDir, '../npm/win32-ia32-msvc/index.farm'))) { + binPath = join(currentDir, '../npm/win32-ia32-msvc/index.farm'); + } else { + binPath = require.resolve('farmfe-plugin-vue-jsx-win32-ia32-msvc'); + } + + break; + case 'arm64': + if (existsSync(join(currentDir, '../npm/win32-arm64-msvc/index.farm'))) { + binPath = join(currentDir, '../npm/win32-arm64-msvc/index.farm'); + } else { + binPath = require.resolve('farmfe-plugin-vue-jsx-win32-arm64-msvc'); + } + + break; + default: + throw new Error(`Unsupported architecture on Windows: ${arch}`); + } + break; + case 'darwin': + switch (arch) { + case 'x64': + if (existsSync(join(currentDir, '../npm/darwin-x64/index.farm'))) { + binPath = join(currentDir, '../npm/darwin-x64/index.farm'); + } else { + binPath = require.resolve('farmfe-plugin-vue-jsx-darwin-x64'); + } + break; + case 'arm64': + if (existsSync(join(currentDir, '../npm/darwin-arm64/index.farm'))) { + binPath = join(currentDir, '../npm/darwin-arm64/index.farm'); + } else { + binPath = require.resolve('farmfe-plugin-vue-jsx-darwin-arm64'); + } + break; + default: + throw new Error(`Unsupported architecture on macOS: ${arch}`); + } + break; + case 'linux': + switch (arch) { + case 'x64': + if (isMusl()) { + if (existsSync(join(currentDir, '../npm/linux-x64-musl/index.farm'))) { + binPath = join(currentDir, '../npm/linux-x64-musl/index.farm'); + } else { + binPath = require.resolve('farmfe-plugin-vue-jsx-linux-x64-musl'); + } + } else { + if (existsSync(join(currentDir, '../npm/linux-x64-gnu/index.farm'))) { + binPath = join(currentDir, '../npm/linux-x64-gnu/index.farm'); + } else { + binPath = require.resolve('farmfe-plugin-vue-jsx-linux-x64-gnu'); + } + } + + break; + + case 'arm64': + if (isMusl()) { + if ( + existsSync(join(currentDir, '../npm/linux-arm64-musl/index.farm')) + ) { + binPath = join(currentDir, '../npm/linux-arm64-musl/index.farm'); + } else { + binPath = require.resolve('farmfe-plugin-vue-jsx-linux-arm64-musl'); + } + } else { + if ( + existsSync(join(currentDir, '../npm/linux-arm64-gnu/index.farm')) + ) { + binPath = join(currentDir, '../npm/linux-arm64-gnu/index.farm'); + } else { + binPath = require.resolve('farmfe-plugin-vue-jsx-linux-arm64-gnu'); + } + } + break; + default: + throw new Error(`Unsupported architecture on Linux: ${arch}`); + } + break; + default: + throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`); +} + +export default binPath; diff --git a/rust-plugins/vue-jsx/scripts/watch.sh b/rust-plugins/vue-jsx/scripts/watch.sh new file mode 100644 index 0000000..255a484 --- /dev/null +++ b/rust-plugins/vue-jsx/scripts/watch.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +npm run build diff --git a/rust-plugins/vue-jsx/src/lib.rs b/rust-plugins/vue-jsx/src/lib.rs new file mode 100644 index 0000000..05689cb --- /dev/null +++ b/rust-plugins/vue-jsx/src/lib.rs @@ -0,0 +1,20 @@ +#![deny(clippy::all)] + +use farmfe_core::{config::Config, plugin::Plugin}; + +use farmfe_macro_plugin::farm_plugin; + +#[farm_plugin] +pub struct FarmfePluginVueJsx {} + +impl FarmfePluginVueJsx { + fn new(config: &Config, options: String) -> Self { + Self {} + } +} + +impl Plugin for FarmfePluginVueJsx { + fn name(&self) -> &str { + "FarmfePluginVueJsx" + } +} From 4f3fa27857aa9ffb858962748ea321a5533728ab Mon Sep 17 00:00:00 2001 From: CCherry07 <2405693142@qq.com> Date: Sun, 13 Oct 2024 13:31:13 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat(rust-plugins):=20=F0=9F=8E=B8=20vue-js?= =?UTF-8?q?x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit init vue jsx --- Cargo.lock | 766 +++++++-- rust-plugins/vue-jsx/Cargo.toml | 8 +- .../vue-jsx/crates/visitor/Cargo.toml | 25 + .../vue-jsx/crates/visitor/src/directive.rs | 350 ++++ .../vue-jsx/crates/visitor/src/lib.rs | 1475 +++++++++++++++++ .../vue-jsx/crates/visitor/src/options.rs | 92 + .../vue-jsx/crates/visitor/src/patch_flags.rs | 20 + .../crates/visitor/src/resolve_type.rs | 1242 ++++++++++++++ .../vue-jsx/crates/visitor/src/slot_flag.rs | 5 + .../vue-jsx/crates/visitor/src/util.rs | 287 ++++ .../vue-jsx/crates/visitor/tests/fixture.rs | 58 + .../input.jsx | 9 + .../output.js | 28 + .../tests/fixture/custom-directive/input.jsx | 1 + .../tests/fixture/custom-directive/output.js | 7 + .../tests/fixture/custom-element/config.json | 3 + .../tests/fixture/custom-element/input.jsx | 1 + .../tests/fixture/custom-element/output.js | 2 + .../custom-pragma-in-comment/input.jsx | 2 + .../custom-pragma-in-comment/output.js | 3 + .../custom-pragma-in-options/config.json | 3 + .../custom-pragma-in-options/input.jsx | 1 + .../custom-pragma-in-options/output.js | 2 + .../fixture/disable-object-slot/config.json | 4 + .../fixture/disable-object-slot/input.jsx | 1 + .../fixture/disable-object-slot/output.js | 5 + .../tests/fixture/empty-string/input.jsx | 1 + .../tests/fixture/empty-string/output.js | 2 + .../fragment-already-imported/config.json | 1 + .../fragment-already-imported/input.jsx | 3 + .../fragment-already-imported/output.js | 4 + .../fixture/function-expr-slot/config.json | 4 + .../fixture/function-expr-slot/input.jsx | 1 + .../fixture/function-expr-slot/output.js | 4 + .../infer-component-name/disabled/input.tsx | 3 + .../infer-component-name/disabled/output.js | 2 + .../infer-component-name/enabled/config.json | 3 + .../infer-component-name/enabled/input.tsx | 9 + .../infer-component-name/enabled/output.js | 13 + .../fixture/keep-alive-named-import/input.jsx | 3 + .../fixture/keep-alive-named-import/output.js | 3 + .../keep-alive-namespace-import/input.jsx | 3 + .../keep-alive-namespace-import/output.js | 3 + .../fixture/keep-namespace-import/input.jsx | 2 + .../fixture/keep-namespace-import/output.js | 3 + .../fixture/merge-class-style-attrs/input.jsx | 1 + .../fixture/merge-class-style-attrs/output.js | 5 + .../tests/fixture/merge-props-order/input.jsx | 1 + .../tests/fixture/merge-props-order/output.js | 6 + .../fixture/model-as-prop-name/input.jsx | 1 + .../fixture/model-as-prop-name/output.js | 5 + .../fixture/multiple-exprs-slot/config.json | 4 + .../fixture/multiple-exprs-slot/input.jsx | 1 + .../fixture/multiple-exprs-slot/output.js | 5 + .../fixture/nesting-slot-flags/input.jsx | 16 + .../fixture/nesting-slot-flags/output.js | 28 + .../fixture/non-literal-expr-slot/config.json | 4 + .../fixture/non-literal-expr-slot/input.jsx | 2 + .../fixture/non-literal-expr-slot/output.js | 10 + .../override-props-multiple/config.json | 3 + .../fixture/override-props-multiple/input.jsx | 1 + .../fixture/override-props-multiple/output.js | 11 + .../fixture/override-props-single/config.json | 3 + .../fixture/override-props-single/input.jsx | 1 + .../fixture/override-props-single/output.js | 2 + .../reassign-variable-as-component/input.jsx | 13 + .../reassign-variable-as-component/output.js | 22 + .../resolve-emits-types/disabled/input.tsx | 3 + .../resolve-emits-types/disabled/output.js | 2 + .../exported-interface/config.json | 3 + .../exported-interface/input.tsx | 5 + .../exported-interface/output.js | 10 + .../exported-type-alias/config.json | 3 + .../exported-type-alias/input.tsx | 5 + .../exported-type-alias/output.js | 10 + .../resolve-emits-types/fn-type/config.json | 3 + .../resolve-emits-types/fn-type/input.tsx | 7 + .../resolve-emits-types/fn-type/output.js | 24 + .../interface-with-extends/config.json | 3 + .../interface-with-extends/input.tsx | 6 + .../interface-with-extends/output.js | 13 + .../resolve-emits-types/interface/config.json | 3 + .../resolve-emits-types/interface/input.tsx | 5 + .../resolve-emits-types/interface/output.js | 10 + .../property-syntax/config.json | 3 + .../property-syntax/input.tsx | 5 + .../property-syntax/output.js | 17 + .../referenced-exported-fn-type/config.json | 3 + .../referenced-exported-fn-type/input.tsx | 5 + .../referenced-exported-fn-type/output.js | 8 + .../referenced-fn-type/config.json | 3 + .../referenced-fn-type/input.tsx | 5 + .../referenced-fn-type/output.js | 8 + .../type-alias/config.json | 3 + .../resolve-emits-types/type-alias/input.tsx | 5 + .../resolve-emits-types/type-alias/output.js | 10 + .../type-references-in-union/config.json | 3 + .../type-references-in-union/input.tsx | 9 + .../type-references-in-union/output.js | 14 + .../check-define-component/config.json | 3 + .../check-define-component/input.tsx | 7 + .../check-define-component/output.js | 9 + .../resolve-props-types/disabled/input.tsx | 7 + .../resolve-props-types/disabled/output.js | 5 + .../resolve-props-types/function/config.json | 3 + .../resolve-props-types/function/input.tsx | 21 + .../resolve-props-types/function/output.js | 51 + .../config.json | 3 + .../input.tsx | 9 + .../output.js | 31 + .../config.json | 3 + .../input.tsx | 6 + .../output.js | 17 + .../indexed-access-type-advanced/config.json | 3 + .../indexed-access-type-advanced/input.tsx | 7 + .../indexed-access-type-advanced/output.js | 29 + .../indexed-access-type-literal/config.json | 3 + .../indexed-access-type-literal/input.tsx | 6 + .../indexed-access-type-literal/output.js | 17 + .../indexed-access-type-number/config.json | 3 + .../indexed-access-type-number/input.tsx | 17 + .../indexed-access-type-number/output.js | 55 + .../interface-merging/config.json | 3 + .../interface-merging/input.tsx | 13 + .../interface-merging/output.js | 22 + .../intersection-type/config.json | 3 + .../intersection-type/input.tsx | 7 + .../intersection-type/output.js | 31 + .../resolve-props-types/optional/config.json | 3 + .../resolve-props-types/optional/input.tsx | 10 + .../resolve-props-types/optional/output.js | 31 + .../options-object/config.json | 3 + .../options-object/input.tsx | 16 + .../options-object/output.js | 21 + .../reference-class/config.json | 3 + .../reference-class/input.tsx | 5 + .../reference-class/output.js | 13 + .../reference-exported-interface/config.json | 3 + .../reference-exported-interface/input.tsx | 5 + .../reference-exported-interface/output.js | 12 + .../reference-exported-type/config.json | 3 + .../reference-exported-type/input.tsx | 5 + .../reference-exported-type/output.js | 12 + .../reference-interface-extends/config.json | 3 + .../reference-interface-extends/input.tsx | 8 + .../reference-interface-extends/output.js | 33 + .../reference-interface/config.json | 3 + .../reference-interface/input.tsx | 7 + .../reference-interface/output.js | 20 + .../reference-type/config.json | 3 + .../reference-type/input.tsx | 5 + .../reference-type/output.js | 12 + .../runtime-types/config.json | 3 + .../runtime-types/input.tsx | 91 + .../runtime-types/output.js | 323 ++++ .../resolve-props-types/scope/config.json | 3 + .../resolve-props-types/scope/input.tsx | 15 + .../resolve-props-types/scope/output.js | 25 + .../type-literal/config.json | 3 + .../type-literal/input.tsx | 14 + .../type-literal/output.js | 43 + .../union-type/config.json | 3 + .../resolve-props-types/union-type/input.tsx | 18 + .../resolve-props-types/union-type/output.js | 35 + .../utility-type-omit/config.json | 3 + .../utility-type-omit/input.tsx | 6 + .../utility-type-omit/output.js | 15 + .../utility-type-partial/config.json | 3 + .../utility-type-partial/input.tsx | 5 + .../utility-type-partial/output.js | 17 + .../utility-type-pick/config.json | 3 + .../utility-type-pick/input.tsx | 6 + .../utility-type-pick/output.js | 19 + .../utility-type-required/config.json | 3 + .../utility-type-required/input.tsx | 5 + .../utility-type-required/output.js | 17 + .../with-defaults/config.json | 3 + .../with-defaults/input.tsx | 44 + .../with-defaults/output.js | 128 ++ .../tests/fixture/single-attr/input.jsx | 1 + .../tests/fixture/single-attr/output.js | 2 + .../slot-in-arrow-function-bug/input.jsx | 17 + .../slot-in-arrow-function-bug/output.js | 46 + .../input.jsx | 4 + .../output.js | 4 + .../visitor/tests/fixture/v-html/input.jsx | 1 + .../visitor/tests/fixture/v-html/output.js | 4 + .../v-model-value-supports-variable/input.jsx | 13 + .../v-model-value-supports-variable/output.js | 42 + .../v-model-with-arg-and-modifier/input.jsx | 1 + .../v-model-with-arg-and-modifier/output.js | 11 + .../fixture/v-model-with-checkbox/input.jsx | 1 + .../fixture/v-model-with-checkbox/output.js | 5 + .../v-model-with-dynamic-type-input/input.jsx | 1 + .../v-model-with-dynamic-type-input/output.js | 5 + .../input.jsx | 1 + .../output.js | 6 + .../fixture/v-model-with-radio/input.jsx | 4 + .../fixture/v-model-with-radio/output.js | 12 + .../fixture/v-model-with-select/input.jsx | 5 + .../fixture/v-model-with-select/output.js | 15 + .../fixture/v-model-with-text-input/input.jsx | 1 + .../fixture/v-model-with-text-input/output.js | 4 + .../fixture/v-model-with-textarea/input.jsx | 1 + .../fixture/v-model-with-textarea/output.js | 4 + .../visitor/tests/fixture/v-models/input.jsx | 1 + .../visitor/tests/fixture/v-models/output.js | 14 + .../visitor/tests/fixture/v-show/input.jsx | 1 + .../visitor/tests/fixture/v-show/output.js | 7 + .../tests/fixture/v-slots-complex/input.jsx | 4 + .../tests/fixture/v-slots-complex/output.js | 17 + .../visitor/tests/fixture/v-slots/input.jsx | 1 + .../visitor/tests/fixture/v-slots/output.js | 2 + .../visitor/tests/fixture/v-text/input.jsx | 1 + .../visitor/tests/fixture/v-text/output.js | 4 + .../tests/fixture/without-jsx/input.jsx | 2 + .../tests/fixture/without-jsx/output.js | 2 + .../tests/fixture/without-props/input.jsx | 1 + .../tests/fixture/without-props/output.js | 2 + rust-plugins/vue-jsx/src/lib.rs | 1 + 220 files changed, 6435 insertions(+), 150 deletions(-) create mode 100644 rust-plugins/vue-jsx/crates/visitor/Cargo.toml create mode 100644 rust-plugins/vue-jsx/crates/visitor/src/directive.rs create mode 100644 rust-plugins/vue-jsx/crates/visitor/src/lib.rs create mode 100644 rust-plugins/vue-jsx/crates/visitor/src/options.rs create mode 100644 rust-plugins/vue-jsx/crates/visitor/src/patch_flags.rs create mode 100644 rust-plugins/vue-jsx/crates/visitor/src/resolve_type.rs create mode 100644 rust-plugins/vue-jsx/crates/visitor/src/slot_flag.rs create mode 100644 rust-plugins/vue-jsx/crates/visitor/src/util.rs create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture.rs create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive-with-argument-and-modifiers/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive-with-argument-and-modifiers/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-element/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-element/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-element/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-comment/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-comment/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-options/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-options/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-options/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/disable-object-slot/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/disable-object-slot/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/disable-object-slot/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/empty-string/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/empty-string/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/fragment-already-imported/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/fragment-already-imported/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/fragment-already-imported/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/function-expr-slot/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/function-expr-slot/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/function-expr-slot/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/disabled/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/disabled/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/enabled/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/enabled/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/enabled/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-named-import/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-named-import/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-namespace-import/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-namespace-import/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-namespace-import/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-namespace-import/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-class-style-attrs/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-class-style-attrs/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-props-order/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-props-order/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/model-as-prop-name/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/model-as-prop-name/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/multiple-exprs-slot/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/multiple-exprs-slot/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/multiple-exprs-slot/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/nesting-slot-flags/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/nesting-slot-flags/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/non-literal-expr-slot/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/non-literal-expr-slot/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/non-literal-expr-slot/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-multiple/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-multiple/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-multiple/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-single/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-single/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-single/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/reassign-variable-as-component/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/reassign-variable-as-component/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/disabled/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/disabled/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-interface/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-interface/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-interface/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-type-alias/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-type-alias/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-type-alias/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/fn-type/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/fn-type/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/fn-type/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface-with-extends/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface-with-extends/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface-with-extends/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/property-syntax/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/property-syntax/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/property-syntax/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-exported-fn-type/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-exported-fn-type/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-exported-fn-type/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-fn-type/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-fn-type/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-fn-type/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-alias/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-alias/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-alias/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-references-in-union/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-references-in-union/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-references-in-union/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/check-define-component/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/check-define-component/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/check-define-component/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/disabled/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/disabled/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/function/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/function/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/function/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-advanced/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-advanced/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-advanced/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-literal/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-literal/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-literal/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-advanced/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-advanced/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-advanced/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-literal/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-literal/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-literal/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-number/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-number/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-number/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/interface-merging/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/interface-merging/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/interface-merging/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/intersection-type/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/intersection-type/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/intersection-type/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/optional/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/optional/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/optional/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/options-object/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/options-object/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/options-object/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-class/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-class/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-class/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-interface/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-interface/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-interface/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-type/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-type/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-type/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface-extends/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface-extends/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface-extends/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-type/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-type/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-type/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/runtime-types/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/runtime-types/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/runtime-types/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/scope/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/scope/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/scope/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/type-literal/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/type-literal/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/type-literal/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/union-type/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/union-type/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/union-type/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-omit/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-omit/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-omit/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-partial/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-partial/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-partial/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-pick/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-pick/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-pick/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-required/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-required/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-required/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/with-defaults/config.json create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/with-defaults/input.tsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/with-defaults/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/single-attr/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/single-attr/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/slot-in-arrow-function-bug/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/slot-in-arrow-function-bug/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/specifiers-merged-into-single-import-decl/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/specifiers-merged-into-single-import-decl/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-html/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-html/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-value-supports-variable/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-value-supports-variable/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-arg-and-modifier/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-arg-and-modifier/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-checkbox/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-checkbox/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-dynamic-type-input/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-dynamic-type-input/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-input-lazy-modifier/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-input-lazy-modifier/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-radio/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-radio/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-select/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-select/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-text-input/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-text-input/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-textarea/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-textarea/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-models/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-models/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-show/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-show/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-slots-complex/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-slots-complex/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-slots/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-slots/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-text/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-text/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/without-jsx/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/without-jsx/output.js create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/without-props/input.jsx create mode 100644 rust-plugins/vue-jsx/crates/visitor/tests/fixture/without-props/output.js diff --git a/Cargo.lock b/Cargo.lock index 5e01c64..9c0aaed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,9 +14,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] @@ -82,6 +82,15 @@ dependencies = [ "libc", ] +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + [[package]] name = "anstream" version = "0.6.15" @@ -155,7 +164,18 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.79", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", ] [[package]] @@ -178,14 +198,14 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" @@ -225,9 +245,9 @@ dependencies = [ [[package]] name = "better_scoped_tls" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794edcc9b3fb07bb4aecaa11f093fd45663b4feadb782d68303a2268bc2701de" +checksum = "297b153aa5e573b5863108a6ddc9d5c968bd0b20e75cc614ee9821d2f45679c7" dependencies = [ "scoped-tls", ] @@ -283,7 +303,7 @@ dependencies = [ "ahash 0.8.11", "chrono", "either", - "indexmap 2.5.0", + "indexmap 2.6.0", "itertools 0.13.0", "nom", "once_cell", @@ -307,6 +327,9 @@ name = "bumpalo" version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +dependencies = [ + "allocator-api2", +] [[package]] name = "bytecheck" @@ -360,9 +383,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "camino" @@ -382,6 +405,20 @@ dependencies = [ "serde", ] +[[package]] +name = "cargo_metadata" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "cargo_metadata" version = "0.18.1" @@ -398,9 +435,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.19" +version = "1.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d74707dde2ba56f86ae90effb3b43ddd369504387e718014de010cec7959800" +checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" dependencies = [ "shlex", ] @@ -425,9 +462,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.17" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -435,9 +472,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.17" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -447,14 +484,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -554,6 +591,18 @@ dependencies = [ "typenum", ] +[[package]] +name = "css_dataset" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0ed4c49b3d82ab5e2a0167f0d24d30872cbd8526b54fb060c84295ad7b6d71d" +dependencies = [ + "phf 0.11.2", + "phf_codegen", + "serde", + "serde_json", +] + [[package]] name = "csv" version = "1.3.0" @@ -623,6 +672,18 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + +[[package]] +name = "difference" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" + [[package]] name = "digest" version = "0.10.7" @@ -676,7 +737,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -685,6 +746,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "farmfe_core" version = "0.6.4" @@ -874,6 +945,7 @@ dependencies = [ "farmfe_core", "farmfe_macro_plugin", "farmfe_toolkit_plugin_types", + "swc-vue-jsx-visitor", ] [[package]] @@ -928,7 +1000,7 @@ dependencies = [ "swc_ecma_transforms_base 0.140.3", "swc_ecma_utils 0.130.3", "swc_ecma_visit 0.101.0", - "swc_error_reporters", + "swc_error_reporters 0.18.1", "swc_html_codegen", "swc_html_minifier", "swc_html_parser 0.40.0", @@ -957,6 +1029,12 @@ dependencies = [ "sha2", ] +[[package]] +name = "fastrand" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" + [[package]] name = "fervid" version = "0.2.0" @@ -1060,6 +1138,12 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3ea1ec5f8307826a5b71094dd91fc04d4ae75d5709b20ad351c7fb4815c86ec" +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -1077,7 +1161,7 @@ checksum = "32016f1242eb82af5474752d00fd8ebcd9004bd69b462b1c91de833972d08ed4" dependencies = [ "proc-macro2", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1125,7 +1209,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1136,14 +1220,14 @@ checksum = "b0e085ded9f1267c32176b40921b9754c474f7dd96f7e808d4a982e48aa1e854" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "gimli" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -1160,8 +1244,8 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -1183,6 +1267,12 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + [[package]] name = "heck" version = "0.4.1" @@ -1195,6 +1285,15 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hermit-abi" version = "0.3.9" @@ -1272,12 +1371,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", "serde", ] @@ -1325,7 +1424,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1360,9 +1459,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1448,9 +1547,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.158" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libloading" @@ -1480,6 +1579,12 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + [[package]] name = "lock_api" version = "0.4.12" @@ -1498,13 +1603,22 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "markdown" -version = "1.0.0-alpha.20" +version = "1.0.0-alpha.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "911a8325e6fb87b89890cd4529a2ab34c2669c026279e61c26b7140a3d821ccb" +checksum = "a6491e6c702bf7e3b24e769d800746d5f2c06a6c6a2db7992612e0f429029e81" dependencies = [ "unicode-id", ] +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "mdxjs" version = "0.2.5" @@ -1556,7 +1670,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1567,7 +1681,7 @@ checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1607,7 +1721,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", "wasi", "windows-sys 0.52.0", @@ -1638,6 +1752,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-bigint" version = "0.4.6" @@ -1679,24 +1803,24 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] [[package]] name = "object" -version = "0.36.4" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "outref" @@ -1704,6 +1828,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f222829ae9293e33a9f5e9f440c6760a3d450a64affe1846486b140db81c1f4" +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "owo-colors" version = "4.1.0" @@ -1744,9 +1874,9 @@ checksum = "ecba01bf2678719532c5e3059e0b5f0811273d94b397088b82e3bd0a78c78fdd" [[package]] name = "pathdiff" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361" [[package]] name = "percent-encoding" @@ -1761,7 +1891,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.5.0", + "indexmap 2.6.0", ] [[package]] @@ -1785,6 +1915,16 @@ dependencies = [ "phf_shared 0.11.2", ] +[[package]] +name = "phf_codegen" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" +dependencies = [ + "phf_generator 0.11.2", + "phf_shared 0.11.2", +] + [[package]] name = "phf_generator" version = "0.10.0" @@ -1829,7 +1969,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1915,6 +2055,16 @@ dependencies = [ "tracing", ] +[[package]] +name = "pretty_assertions" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" +dependencies = [ + "diff", + "yansi", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -1958,7 +2108,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1969,9 +2119,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" dependencies = [ "unicode-ident", ] @@ -2078,41 +2228,56 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.4" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.5", ] [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "regress" @@ -2234,6 +2399,19 @@ dependencies = [ "semver 0.9.0", ] +[[package]] +name = "rustix" +version = "0.38.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + [[package]] name = "rustversion" version = "1.0.17" @@ -2320,7 +2498,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2329,7 +2507,7 @@ version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.6.0", "itoa", "memchr", "ryu", @@ -2342,7 +2520,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.6.0", "itoa", "ryu", "serde", @@ -2371,6 +2549,15 @@ dependencies = [ "digest", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "shlex" version = "1.3.0" @@ -2397,9 +2584,9 @@ dependencies = [ [[package]] name = "simdutf8" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "siphasher" @@ -2531,7 +2718,7 @@ checksum = "710e9696ef338691287aeb937ee6ffe60022f579d3c8d2fd9d58973a9a10a466" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2575,7 +2762,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2605,6 +2792,34 @@ dependencies = [ "swc_xml", ] +[[package]] +name = "swc-vue-jsx-visitor" +version = "0.3.2" +dependencies = [ + "bitflags 2.6.0", + "css_dataset", + "fnv", + "indexmap 2.6.0", + "regex", + "serde", + "serde_json", + "swc_core 0.96.9", + "testing 0.38.1", +] + +[[package]] +name = "swc_allocator" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76aa0eb65c0f39f9b6d82a7e5192c30f7ac9a78f084a21f270de1d8c600ca388" +dependencies = [ + "bumpalo", + "hashbrown 0.14.5", + "ptr_meta", + "rustc-hash", + "triomphe", +] + [[package]] name = "swc_atoms" version = "0.4.43" @@ -2700,7 +2915,7 @@ dependencies = [ "string_cache", "swc_atoms 0.4.43", "swc_eq_ignore_macros", - "swc_visit", + "swc_visit 0.5.14", "tracing", "unicode-width", "url", @@ -2726,7 +2941,7 @@ dependencies = [ "sourcemap 8.0.1", "swc_atoms 0.6.7", "swc_eq_ignore_macros", - "swc_visit", + "swc_visit 0.5.14", "tracing", "unicode-width", "url", @@ -2738,7 +2953,9 @@ version = "0.34.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9087befec6b63911f9d2f239e4f91c9b21589c169b86ed2d616944d23cf4a243" dependencies = [ + "anyhow", "ast_node", + "atty", "better_scoped_tls", "bytecheck 0.6.12", "cfg-if", @@ -2755,7 +2972,36 @@ dependencies = [ "sourcemap 8.0.1", "swc_atoms 0.6.7", "swc_eq_ignore_macros", - "swc_visit", + "swc_visit 0.5.14", + "termcolor", + "tracing", + "unicode-width", + "url", +] + +[[package]] +name = "swc_common" +version = "0.36.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "457fb92efa9f0c849d6bc4e86561982d464176bc3df96bb22baed5e98309e090" +dependencies = [ + "ast_node", + "better_scoped_tls", + "cfg-if", + "either", + "from_variant", + "new_debug_unreachable", + "num-bigint", + "once_cell", + "parking_lot", + "rustc-hash", + "serde", + "siphasher", + "swc_allocator", + "swc_atoms 0.6.7", + "swc_eq_ignore_macros", + "swc_visit 0.6.2", + "termcolor", "tracing", "unicode-width", "url", @@ -2768,7 +3014,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4740e53eaf68b101203c1df0937d5161a29f3c13bceed0836ddfe245b72dd000" dependencies = [ "anyhow", - "indexmap 2.5.0", + "indexmap 2.6.0", "serde", "serde_json", "sourcemap 9.0.0", @@ -2785,7 +3031,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2826,13 +3072,19 @@ version = "0.96.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de60918c09a10e55b659b4e70029d283da815e3107b22f79ec9fac280d4d8843" dependencies = [ + "once_cell", "swc_atoms 0.6.7", "swc_common 0.34.4", "swc_ecma_ast 0.115.1", "swc_ecma_codegen 0.151.1", "swc_ecma_parser 0.146.12", "swc_ecma_transforms_base 0.140.3", + "swc_ecma_transforms_testing", + "swc_ecma_utils 0.130.3", "swc_ecma_visit 0.101.0", + "swc_plugin", + "swc_plugin_macro", + "swc_plugin_proxy", "vergen 8.3.2", ] @@ -2904,7 +3156,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3020,7 +3272,7 @@ dependencies = [ "swc_atoms 0.6.7", "swc_common 0.33.26", "swc_css_ast 0.140.23", - "swc_visit", + "swc_visit 0.5.14", ] [[package]] @@ -3033,7 +3285,7 @@ dependencies = [ "swc_atoms 0.6.7", "swc_common 0.34.4", "swc_css_ast 0.141.0", - "swc_visit", + "swc_visit 0.5.14", ] [[package]] @@ -3156,7 +3408,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3196,7 +3448,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d23a9a192078d1d074113d77d8ad811f2a81a4447ae967739824da5d391616bf" dependencies = [ "arrayvec", - "indexmap 2.5.0", + "indexmap 2.6.0", "is-macro 0.3.6", "serde", "serde_derive", @@ -3393,7 +3645,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adde00302d7ddb37f312ee6d07078c7f3c7ede36c0f81c5050bae1d4c3fe501c" dependencies = [ "arrayvec", - "indexmap 2.5.0", + "indexmap 2.6.0", "num-bigint", "num_cpus", "once_cell", @@ -3492,7 +3744,7 @@ checksum = "9cd4847a3356a01bb9a73ccdd1c462dfdaed66d27d7ea6d6785ee1b54c9556ce" dependencies = [ "anyhow", "dashmap", - "indexmap 2.5.0", + "indexmap 2.6.0", "once_cell", "preset_env_base", "rustc-hash", @@ -3509,6 +3761,19 @@ dependencies = [ "swc_ecma_visit 0.101.0", ] +[[package]] +name = "swc_ecma_testing" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f495dae76f1ef3f5be46993b050c3c7f9bf534bcdacf1e40789d32255040776" +dependencies = [ + "anyhow", + "hex", + "sha2", + "testing 0.36.0", + "tracing", +] + [[package]] name = "swc_ecma_transforms" version = "0.232.1" @@ -3560,7 +3825,7 @@ checksum = "660badfe2eed8b6213ec9dcd71aa0786f8fb46ffa012e0313bcba1fe4a9a5c73" dependencies = [ "better_scoped_tls", "bitflags 2.6.0", - "indexmap 2.5.0", + "indexmap 2.6.0", "once_cell", "phf 0.11.2", "rustc-hash", @@ -3583,7 +3848,7 @@ checksum = "d37dc505c92af56d0f77cf6f31a6ccd37ac40cad1e01ff77277e0b1c70e8f8ff" dependencies = [ "better_scoped_tls", "bitflags 2.6.0", - "indexmap 2.5.0", + "indexmap 2.6.0", "once_cell", "phf 0.11.2", "rayon", @@ -3620,7 +3885,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "626198f214d4c09adc98ab14565c19d72b6df9630f7e806ef9b2ef05a5fd17a5" dependencies = [ "arrayvec", - "indexmap 2.5.0", + "indexmap 2.6.0", "is-macro 0.3.6", "num-bigint", "rayon", @@ -3659,7 +3924,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3671,7 +3936,7 @@ dependencies = [ "Inflector", "anyhow", "bitflags 2.6.0", - "indexmap 2.5.0", + "indexmap 2.6.0", "is-macro 0.3.6", "path-clean", "pathdiff", @@ -3721,7 +3986,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "724a8306e98c1b1f9640fc44c1acc0c971f6daa17651919e06b64f905d4a4564" dependencies = [ "dashmap", - "indexmap 2.5.0", + "indexmap 2.6.0", "once_cell", "petgraph", "rayon", @@ -3767,7 +4032,7 @@ checksum = "446da32cac8299973aaf1d37496562bfd0c1e4f3c3ab5d0af6f07f42e8184102" dependencies = [ "base64 0.21.7", "dashmap", - "indexmap 2.5.0", + "indexmap 2.6.0", "once_cell", "rayon", "serde", @@ -3784,6 +4049,32 @@ dependencies = [ "swc_ecma_visit 0.101.0", ] +[[package]] +name = "swc_ecma_transforms_testing" +version = "0.143.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20932deae5f94d2c2d722ed2ed70a140e1e9f19d105414c02572bd49e83fb29a" +dependencies = [ + "ansi_term", + "anyhow", + "base64 0.21.7", + "hex", + "serde", + "serde_json", + "sha2", + "sourcemap 8.0.1", + "swc_common 0.34.4", + "swc_ecma_ast 0.115.1", + "swc_ecma_codegen 0.151.1", + "swc_ecma_parser 0.146.12", + "swc_ecma_testing", + "swc_ecma_transforms_base 0.140.3", + "swc_ecma_utils 0.130.3", + "swc_ecma_visit 0.101.0", + "tempfile", + "testing 0.36.0", +] + [[package]] name = "swc_ecma_transforms_typescript" version = "0.191.2" @@ -3807,7 +4098,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "146562ac3515c8de0fa9d479c43ae673cf9df9ece814f8b8130686080a7251ac" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.6.0", "rustc-hash", "swc_atoms 0.6.7", "swc_common 0.34.4", @@ -3842,7 +4133,7 @@ version = "0.127.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15d40abfc4f3a7bfdf54d11ac705cc9dd0836c48bf085b359143b4d40b50cb31" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.6.0", "num_cpus", "once_cell", "rustc-hash", @@ -3860,7 +4151,7 @@ version = "0.130.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13e62b199454a576c5fdbd7e1bef8ab88a395427456d8a713d994b7d469833aa" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.6.0", "num_cpus", "once_cell", "rayon", @@ -3884,7 +4175,7 @@ dependencies = [ "swc_atoms 0.4.43", "swc_common 0.30.5", "swc_ecma_ast 0.102.5", - "swc_visit", + "swc_visit 0.5.14", "tracing", ] @@ -3898,7 +4189,7 @@ dependencies = [ "swc_atoms 0.6.7", "swc_common 0.33.26", "swc_ecma_ast 0.112.6", - "swc_visit", + "swc_visit 0.5.14", "tracing", ] @@ -3912,7 +4203,7 @@ dependencies = [ "swc_atoms 0.6.7", "swc_common 0.34.4", "swc_ecma_ast 0.115.1", - "swc_visit", + "swc_visit 0.5.14", "tracing", ] @@ -3924,7 +4215,7 @@ checksum = "63db0adcff29d220c3d151c5b25c0eabe7e32dd936212b84cdaa1392e3130497" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3940,6 +4231,19 @@ dependencies = [ "swc_common 0.34.4", ] +[[package]] +name = "swc_error_reporters" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e02c81943772dc4fb0a6228360552d353fedc1a368ee6d80a5172ecb376b1796" +dependencies = [ + "anyhow", + "miette 7.2.0", + "once_cell", + "parking_lot", + "swc_common 0.36.3", +] + [[package]] name = "swc_fast_graph" version = "0.18.5" @@ -3958,7 +4262,7 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c00cf5c1687e9858fb9de1ffa90a3e21369095406e97ace870a389320d105b0a" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.6.0", "petgraph", "rustc-hash", "swc_common 0.34.4", @@ -4027,7 +4331,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -4119,18 +4423,52 @@ dependencies = [ "swc_atoms 0.6.7", "swc_common 0.34.4", "swc_html_ast 0.34.0", - "swc_visit", + "swc_visit 0.5.14", ] [[package]] name = "swc_macros_common" -version = "0.3.13" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27e18fbfe83811ffae2bb23727e45829a0d19c6870bced7c0f545cc99ad248dd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + +[[package]] +name = "swc_plugin" +version = "0.90.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f486687bfb7b5c560868f69ed2d458b880cebc9babebcb67e49f31b55c5bf847" +checksum = "3b059b8bb5b74cc5fc54559e8de09195fbddd20f4bb363b176b741993ef4894a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "swc_plugin_macro" +version = "0.9.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3232db481484070637b20a155c064096c0ea1ba04fa2247b89b618661b3574f4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", +] + +[[package]] +name = "swc_plugin_proxy" +version = "0.44.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d5460f8f89905a6d698d8d9a965f6c99888c8ebcbb5a0266556d06ad39f09f7" +dependencies = [ + "better_scoped_tls", + "rkyv", + "swc_common 0.34.4", + "swc_ecma_ast 0.115.1", + "swc_trace_macro", + "tracing", ] [[package]] @@ -4150,7 +4488,7 @@ checksum = "ff9719b6085dd2824fd61938a881937be14b08f95e2d27c64c825a9f65e052ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -4163,6 +4501,16 @@ dependencies = [ "swc_visit_macros", ] +[[package]] +name = "swc_visit" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ceb044142ba2719ef9eb3b6b454fce61ab849eb696c34d190f04651955c613d" +dependencies = [ + "either", + "new_debug_unreachable", +] + [[package]] name = "swc_visit_macros" version = "0.5.13" @@ -4173,7 +4521,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -4224,7 +4572,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -4247,7 +4595,7 @@ dependencies = [ "serde", "swc_atoms 0.4.43", "swc_common 0.30.5", - "swc_visit", + "swc_visit 0.5.14", "swc_xml_ast", ] @@ -4264,9 +4612,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -4289,6 +4637,86 @@ dependencies = [ "vec1", ] +[[package]] +name = "tempfile" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +dependencies = [ + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "testing" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27d395aa823f3ad1ad845ed74b96188f493b469794cfbe9ef82f03196064086f" +dependencies = [ + "ansi_term", + "cargo_metadata 0.15.4", + "difference", + "once_cell", + "pretty_assertions", + "regex", + "serde", + "serde_json", + "swc_common 0.34.4", + "swc_error_reporters 0.18.1", + "testing_macros", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "testing" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dda7450d6e429db582ca8a2cf698f3bc63bc04dae8d857936e810180e510c86" +dependencies = [ + "ansi_term", + "cargo_metadata 0.18.1", + "difference", + "once_cell", + "pretty_assertions", + "regex", + "serde", + "serde_json", + "swc_common 0.36.3", + "swc_error_reporters 0.20.0", + "testing_macros", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "testing_macros" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a39660370116afe46d5ff8bcb01b7afe2140dda3137ef5cb1914681e37a4ee06" +dependencies = [ + "anyhow", + "glob", + "once_cell", + "proc-macro2", + "quote", + "regex", + "relative-path", + "syn 2.0.79", +] + [[package]] name = "textwrap" version = "0.16.1" @@ -4302,22 +4730,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -4330,6 +4758,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + [[package]] name = "time" version = "0.3.36" @@ -4402,7 +4840,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -4424,7 +4862,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -4434,13 +4872,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", ] [[package]] name = "triomphe" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6631e42e10b40c0690bf92f404ebcfe6e1fdb480391d15f17cc8e96eeed5369" +checksum = "ef8f7726da4807b58ea5c96fdc122f80702030edc33b35aff9190a51148ccc85" dependencies = [ "serde", "stable_deref_trait", @@ -4469,15 +4937,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-id" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1b6def86329695390197b82c1e244a54a131ceb66c996f2088a3876e2ae083f" +checksum = "10103c57044730945224467c09f71a4db0071c123a0648cc3e818913bde6b561" [[package]] name = "unicode-id-start" @@ -4499,24 +4967,24 @@ checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-xid" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unsafe-libyaml" @@ -4547,6 +5015,12 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "vec1" version = "1.12.1" @@ -4575,7 +5049,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2990d9ea5967266ea0ccf413a4aa5c42a93dbcfda9cb49a97de6931726b12566" dependencies = [ "anyhow", - "cargo_metadata", + "cargo_metadata 0.18.1", "regex", "rustversion", ] @@ -4604,9 +5078,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -4615,24 +5089,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4640,22 +5114,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wax" @@ -4820,6 +5294,12 @@ dependencies = [ "xml-rs", ] +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + [[package]] name = "zerocopy" version = "0.7.35" @@ -4838,5 +5318,5 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] diff --git a/rust-plugins/vue-jsx/Cargo.toml b/rust-plugins/vue-jsx/Cargo.toml index 0d4feb2..5d00346 100644 --- a/rust-plugins/vue-jsx/Cargo.toml +++ b/rust-plugins/vue-jsx/Cargo.toml @@ -10,10 +10,4 @@ crate-type = ["cdylib", "rlib"] farmfe_core = { workspace = true } farmfe_toolkit_plugin_types = { workspace = true } farmfe_macro_plugin = { workspace = true } -swc-vue-jsx-visitor = "0.3.2" -swc_core = { version = "0.99", features = [ - "ecma_parser", - "ecma_plugin_transform", - "ecma_utils", -] } - +swc-vue-jsx-visitor = { path = "./crates/visitor" } diff --git a/rust-plugins/vue-jsx/crates/visitor/Cargo.toml b/rust-plugins/vue-jsx/crates/visitor/Cargo.toml new file mode 100644 index 0000000..8dca230 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "swc-vue-jsx-visitor" +description = "SWC visitor for transforming Vue JSX." +version = "0.3.2" +authors = ["Pig Fang "] +license = "MIT" +repository = "https://github.com/g-plane/swc-plugin-vue-jsx" +edition = "2021" + +[dependencies] +bitflags = "2.4" +css_dataset = "0.3" +fnv = "1.0" +indexmap = "2.1" +regex = "1.10" +serde = { version = "1.0", features = ["derive"] } +swc_core = { version = "0.96", features = [ + "ecma_parser", + "ecma_plugin_transform", + "ecma_utils", +] } + +[dev-dependencies] +serde_json = "1.0" +testing = "0.38" diff --git a/rust-plugins/vue-jsx/crates/visitor/src/directive.rs b/rust-plugins/vue-jsx/crates/visitor/src/directive.rs new file mode 100644 index 0000000..e05ea66 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/src/directive.rs @@ -0,0 +1,350 @@ +use std::{collections::BTreeSet, str::Split}; +use swc_core::{ + common::DUMMY_SP, + ecma::{ + ast::*, + atoms::JsWord, + utils::{quote_ident, quote_str}, + }, + plugin::errors::HANDLER, +}; + +pub(crate) fn is_directive(jsx_attr: &JSXAttr) -> bool { + let name = match &jsx_attr.name { + JSXAttrName::Ident(ident) => &ident.sym, + JSXAttrName::JSXNamespacedName(JSXNamespacedName { ns, .. }) => &ns.sym, + }; + matches!(name.as_bytes(), [b'v', b'-' | b'A'..=b'Z', ..]) +} + +pub(crate) struct NormalDirective { + pub(crate) name: JsWord, + pub(crate) argument: Option, + pub(crate) modifiers: Option, + pub(crate) value: Expr, +} + +pub(crate) struct VModelDirective { + pub(crate) argument: Option, + pub(crate) transformed_argument: Option, + pub(crate) modifiers: Option, + pub(crate) value: Expr, +} + +pub(crate) enum Directive { + Normal(NormalDirective), + Text(Expr), + Html(Expr), + VModel(VModelDirective), + Slots(Option>), +} + +pub(crate) fn parse_directive(jsx_attr: &JSXAttr, is_component: bool) -> Directive { + let (name, argument, splitted) = match &jsx_attr.name { + JSXAttrName::Ident(ident) => { + let mut splitted = ident + .sym + .trim_start_matches('v') + .trim_start_matches('-') + .split('_'); + ( + splitted.next().unwrap_or(&*ident.sym).to_ascii_lowercase(), + splitted.next(), + splitted, + ) + } + JSXAttrName::JSXNamespacedName(JSXNamespacedName { ns, name, .. }) => { + let mut splitted = name.sym.split('_'); + ( + ns.sym + .trim_start_matches('v') + .trim_start_matches('-') + .to_ascii_lowercase(), + Some(splitted.next().unwrap_or(&*name.sym)), + splitted, + ) + } + }; + + let mut argument = argument.map(|argument| Expr::Lit(Lit::Str(quote_str!(argument)))); + + match &*name { + "html" => return parse_v_html_directive(jsx_attr), + "text" => return parse_v_text_directive(jsx_attr), + "model" => return parse_v_model_directive(jsx_attr, is_component, argument, splitted), + "slots" => return parse_v_slots_directive(jsx_attr), + _ => {} + } + + let mut modifiers = None; + let value; + + if let Some(JSXAttrValue::JSXExprContainer(JSXExprContainer { + expr: JSXExpr::Expr(expr), + .. + })) = &jsx_attr.value + { + if let Expr::Array(ArrayLit { elems, .. }) = &**expr { + value = match elems.get(0) { + Some(Some(ExprOrSpread { spread: None, expr })) => (**expr).clone(), + _ => Expr::Ident(quote_ident!("").into()), + }; + if let Some(Some(ExprOrSpread { spread: None, expr })) = elems.get(1) { + match &**expr { + Expr::Array(ArrayLit { elems, .. }) => { + modifiers = Some(parse_modifiers(elems)); + } + expr => { + if argument.is_none() { + argument = Some(expr.clone()); + } + if let Some(Some(ExprOrSpread { spread: None, expr })) = elems.get(2) { + if let Expr::Array(ArrayLit { elems, .. }) = &**expr { + modifiers = Some(parse_modifiers(elems)); + } + } + } + } + } else { + modifiers = Some(splitted.map(JsWord::from).collect()); + } + } else { + modifiers = Some(splitted.map(JsWord::from).collect()); + value = (**expr).clone(); + } + } else { + modifiers = Some(splitted.map(JsWord::from).collect()); + value = Expr::Ident(quote_ident!("").into()); + } + + Directive::Normal(NormalDirective { + name: JsWord::from(name), + argument: if modifiers + .as_ref() + .map(|modifiers| !modifiers.is_empty()) + .unwrap_or_default() + { + argument.or_else(|| { + Some(Expr::Unary(UnaryExpr { + span: DUMMY_SP, + op: op!("void"), + arg: Box::new(Expr::Lit(Lit::Num(Number { + span: DUMMY_SP, + value: 0.0, + raw: None, + }))), + })) + }) + } else { + argument + }, + modifiers: modifiers.and_then(|modifiers| transform_modifiers(modifiers, false)), + value, + }) +} + +fn parse_modifiers(exprs: &[Option]) -> BTreeSet { + exprs + .iter() + .filter_map(|expr| match expr { + Some(ExprOrSpread { spread: None, expr }) => match &**expr { + Expr::Lit(Lit::Str(Str { value, .. })) => Some(value.clone()), + _ => None, + }, + _ => None, + }) + .collect() +} + +fn parse_v_text_directive(jsx_attr: &JSXAttr) -> Directive { + let expr = match &jsx_attr.value { + Some(JSXAttrValue::Lit(lit)) => Expr::Lit(lit.clone()), + Some(JSXAttrValue::JSXExprContainer(JSXExprContainer { + expr: JSXExpr::Expr(expr), + .. + })) => { + if let Some(Some(ExprOrSpread { spread: None, expr })) = + expr.as_array().and_then(|array| array.elems.get(0)) + { + (**expr).clone() + } else { + (**expr).clone() + } + } + None => { + HANDLER.with(|handler| { + handler.span_err( + jsx_attr.span, + "You have to use JSX Expression inside your `v-text`.", + ); + }); + Expr::Lit(Lit::Bool(Bool { + span: DUMMY_SP, + value: true, + })) + } + _ => unreachable!(), + }; + + Directive::Text(expr) +} + +fn parse_v_html_directive(jsx_attr: &JSXAttr) -> Directive { + let expr = match &jsx_attr.value { + Some(JSXAttrValue::Lit(lit)) => Expr::Lit(lit.clone()), + Some(JSXAttrValue::JSXExprContainer(JSXExprContainer { + expr: JSXExpr::Expr(expr), + .. + })) => { + if let Some(Some(ExprOrSpread { spread: None, expr })) = + expr.as_array().and_then(|array| array.elems.get(0)) + { + (**expr).clone() + } else { + (**expr).clone() + } + } + None => { + HANDLER.with(|handler| { + handler.span_err( + jsx_attr.span, + "You have to use JSX Expression inside your `v-html`.", + ); + }); + Expr::Lit(Lit::Bool(Bool { + span: DUMMY_SP, + value: true, + })) + } + _ => unreachable!(), + }; + + Directive::Html(expr) +} + +fn parse_v_model_directive( + jsx_attr: &JSXAttr, + is_component: bool, + mut argument: Option, + splitted_attr_name: Split, +) -> Directive { + let attr_value = match &jsx_attr.value { + Some(JSXAttrValue::JSXExprContainer(JSXExprContainer { + expr: JSXExpr::Expr(expr), + .. + })) => (**expr).clone(), + _ => { + HANDLER.with(|handler| { + handler.span_err( + jsx_attr.span, + "You have to use JSX Expression inside your `v-model`.", + ); + }); + Expr::Ident(quote_ident!("").into()) + } + }; + + let mut modifiers = None; + let value; + + if let Expr::Array(ArrayLit { elems, .. }) = attr_value { + value = match elems.get(0) { + Some(Some(ExprOrSpread { spread: None, expr })) => (**expr).clone(), + _ => Expr::Ident(quote_ident!("").into()), + }; + if let Some(Some(ExprOrSpread { spread: None, expr })) = elems.get(1) { + match &**expr { + Expr::Array(ArrayLit { elems, .. }) => { + if is_component && argument.is_none() { + argument = Some(Expr::Lit(Lit::Null(Null { span: DUMMY_SP }))); + } + modifiers = Some(parse_modifiers(elems)); + } + expr => { + if argument.is_none() { + argument = Some(expr.clone()); + } + if let Some(Some(ExprOrSpread { spread: None, expr })) = elems.get(2) { + if let Expr::Array(ArrayLit { elems, .. }) = &**expr { + modifiers = Some(parse_modifiers(elems)); + } + } + } + } + } else { + if is_component && argument.is_none() { + argument = Some(Expr::Lit(Lit::Null(Null { span: DUMMY_SP }))); + } + modifiers = Some(splitted_attr_name.map(JsWord::from).collect()); + } + } else { + modifiers = Some(splitted_attr_name.map(JsWord::from).collect()); + value = attr_value.clone(); + } + + Directive::VModel(VModelDirective { + argument: argument.clone(), + transformed_argument: if !is_component + && modifiers + .as_ref() + .map(|modifiers| !modifiers.is_empty()) + .unwrap_or_default() + { + argument.or_else(|| { + Some(Expr::Unary(UnaryExpr { + span: DUMMY_SP, + op: op!("void"), + arg: Box::new(Expr::Lit(Lit::Num(Number { + span: DUMMY_SP, + value: 0.0, + raw: None, + }))), + })) + }) + } else { + argument + }, + modifiers: modifiers.and_then(|modifiers| transform_modifiers(modifiers, is_component)), + value, + }) +} + +fn transform_modifiers(modifiers: BTreeSet, quote_prop: bool) -> Option { + if modifiers.is_empty() { + None + } else { + Some(Expr::Object(ObjectLit { + span: DUMMY_SP, + props: modifiers + .into_iter() + .map(|modifier| { + PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: if quote_prop { + PropName::Str(quote_str!(modifier)) + } else { + PropName::Ident(quote_ident!(modifier)) + }, + value: Box::new(Expr::Lit(Lit::Bool(Bool { + span: DUMMY_SP, + value: true, + }))), + }))) + }) + .collect(), + })) + } +} + +fn parse_v_slots_directive(jsx_attr: &JSXAttr) -> Directive { + let expr = match &jsx_attr.value { + Some(JSXAttrValue::JSXExprContainer(JSXExprContainer { + expr: JSXExpr::Expr(expr), + .. + })) => match &**expr { + Expr::Ident(..) | Expr::Object(..) => Some(expr.clone()), + _ => None, + }, + _ => None, + }; + Directive::Slots(expr) +} diff --git a/rust-plugins/vue-jsx/crates/visitor/src/lib.rs b/rust-plugins/vue-jsx/crates/visitor/src/lib.rs new file mode 100644 index 0000000..17d4547 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/src/lib.rs @@ -0,0 +1,1475 @@ +use directive::{is_directive, parse_directive, Directive, NormalDirective}; +use fnv::FnvHashMap; +use indexmap::IndexSet; +pub use options::{Options, Regex}; +use patch_flags::PatchFlags; +use slot_flag::SlotFlag; +use std::{borrow::Cow, collections::BTreeMap, mem}; +use swc_core::{ + common::{comments::Comments, Mark, Span, Spanned, SyntaxContext, DUMMY_SP}, + ecma::{ + ast::*, + atoms::JsWord, + utils::{private_ident, quote_ident, quote_str}, + visit::{VisitMut, VisitMutWith}, + }, + plugin::errors::HANDLER, +}; + +mod directive; +mod options; +mod patch_flags; +mod resolve_type; +mod slot_flag; +mod util; + +const FRAGMENT: &str = "Fragment"; +const KEEP_ALIVE: &str = "KeepAlive"; + +struct AttrsTransformationResult<'a> { + attrs: Expr, + patch_flags: PatchFlags, + dynamic_props: Option>>, + slots: Option>, +} + +pub struct VueJsxTransformVisitor +where + C: Comments, +{ + options: Options, + vue_imports: BTreeMap<&'static str, Ident>, + transform_on_helper: Option, + + define_component: Option, + interfaces: FnvHashMap<(JsWord, SyntaxContext), TsInterfaceDecl>, + type_aliases: FnvHashMap<(JsWord, SyntaxContext), TsType>, + + unresolved_mark: Mark, + comments: Option, + + pragma: Option, + slot_helper_ident: Option, + injecting_vars: Vec, + slot_counter: usize, + slot_flag_stack: Vec, + + assignment_left: Option, + injecting_consts: Vec, +} + +impl VueJsxTransformVisitor +where + C: Comments, +{ + pub fn new(options: Options, unresolved_mark: Mark, comments: Option) -> Self { + Self { + options, + vue_imports: Default::default(), + transform_on_helper: None, + + define_component: None, + interfaces: Default::default(), + type_aliases: Default::default(), + + unresolved_mark, + comments, + + pragma: None, + slot_helper_ident: None, + injecting_vars: Default::default(), + slot_counter: 1, + slot_flag_stack: Default::default(), + + assignment_left: None, + injecting_consts: Default::default(), + } + } + + fn import_from_vue(&mut self, item: &'static str) -> Ident { + self + .vue_imports + .entry(item) + .or_insert_with_key(|name| private_ident!(format!("_{name}"))) + .clone() + } + + fn generate_slot_helper(&mut self) -> Ident { + self + .slot_helper_ident + .get_or_insert_with(|| private_ident!("_isSlot")) + .clone() + } + + fn transform_jsx_element(&mut self, jsx_element: &JSXElement) -> Expr { + if self.options.optimize { + self.slot_flag_stack.push(SlotFlag::Stable); + } + + let is_component = self.is_component(&jsx_element.opening.name); + let mut directives = vec![]; + let AttrsTransformationResult { + attrs, + patch_flags, + dynamic_props, + slots, + } = self.transform_attrs(&jsx_element.opening.attrs, is_component, &mut directives); + let mut vnode_call_args = vec![ + ExprOrSpread { + spread: None, + expr: Box::new(self.transform_tag(&jsx_element.opening.name)), + }, + ExprOrSpread { + spread: None, + expr: Box::new(attrs), + }, + ExprOrSpread { + spread: None, + expr: Box::new(self.transform_children(&jsx_element.children, is_component, slots)), + }, + ]; + if self.options.optimize { + if !patch_flags.is_empty() { + vnode_call_args.push(ExprOrSpread { + spread: None, + expr: Box::new(Expr::Lit(Lit::Num(Number { + span: DUMMY_SP, + value: patch_flags.bits() as f64, + raw: None, + }))), + }); + } + match dynamic_props { + Some(dynamic_props) if !dynamic_props.is_empty() => vnode_call_args.push(ExprOrSpread { + spread: None, + expr: Box::new(Expr::Array(ArrayLit { + span: DUMMY_SP, + elems: dynamic_props + .into_iter() + .map(|prop| { + Some(ExprOrSpread { + spread: None, + expr: Box::new(Expr::Lit(Lit::Str(quote_str!(prop)))), + }) + }) + .collect(), + })), + }), + _ => {} + } + } + + let create_vnode_call = Expr::Call(CallExpr { + span: DUMMY_SP, + callee: Callee::Expr(Box::new(Expr::Ident(self.get_pragma()))), + args: vnode_call_args, + type_args: None, + }); + + if directives.is_empty() { + create_vnode_call + } else { + Expr::Call(CallExpr { + span: DUMMY_SP, + callee: Callee::Expr(Box::new(Expr::Ident( + self.import_from_vue("withDirectives"), + ))), + args: vec![ + ExprOrSpread { + spread: None, + expr: Box::new(create_vnode_call), + }, + ExprOrSpread { + spread: None, + expr: Box::new(Expr::Array(ArrayLit { + span: DUMMY_SP, + elems: directives + .into_iter() + .map(|directive| { + let mut elems = vec![ + Some(ExprOrSpread { + spread: None, + expr: Box::new(self.resolve_directive(&directive.name, jsx_element)), + }), + Some(ExprOrSpread { + spread: None, + expr: Box::new(directive.value), + }), + ]; + if let Some(argument) = directive.argument { + elems.push(Some(ExprOrSpread { + spread: None, + expr: Box::new(argument), + })); + } + if let Some(modifiers) = directive.modifiers { + elems.push(Some(ExprOrSpread { + spread: None, + expr: Box::new(modifiers), + })); + } + Some(ExprOrSpread { + spread: None, + expr: Box::new(Expr::Array(ArrayLit { + span: DUMMY_SP, + elems, + })), + }) + }) + .collect(), + })), + }, + ], + type_args: None, + }) + } + } + + fn transform_jsx_fragment(&mut self, jsx_fragment: &JSXFragment) -> Expr { + if self.options.optimize { + self.slot_flag_stack.push(SlotFlag::Stable); + } + + Expr::Call(CallExpr { + span: DUMMY_SP, + callee: Callee::Expr(Box::new(Expr::Ident(self.get_pragma()))), + args: vec![ + ExprOrSpread { + spread: None, + expr: Box::new(Expr::Ident(self.import_from_vue(FRAGMENT))), + }, + ExprOrSpread { + spread: None, + expr: Box::new(Expr::Lit(Lit::Null(Null { span: DUMMY_SP }))), + }, + ExprOrSpread { + spread: None, + expr: Box::new(self.transform_children(&jsx_fragment.children, false, None)), + }, + ], + type_args: None, + }) + } + + fn transform_tag(&mut self, jsx_element_name: &JSXElementName) -> Expr { + match jsx_element_name { + JSXElementName::Ident(ident) => { + let name = &*ident.sym; + if name.as_bytes()[0].is_ascii_lowercase() + && (css_dataset::tags::STANDARD_HTML_TAGS.contains(name) + || css_dataset::tags::SVG_TAGS.contains(name)) + { + Expr::Lit(Lit::Str(quote_str!(name))) + } else if name == FRAGMENT { + Expr::Ident(self.import_from_vue(FRAGMENT)) + } else if self + .options + .custom_element_patterns + .iter() + .any(|pattern| pattern.is_match(name)) + { + Expr::Lit(Lit::Str(quote_str!(name))) + } else if ident.to_id().1.has_mark(self.unresolved_mark) { + // for components that can't be resolved from current file + Expr::Call(CallExpr { + span: DUMMY_SP, + callee: Callee::Expr(Box::new(Expr::Ident( + self.import_from_vue("resolveComponent"), + ))), + args: vec![ExprOrSpread { + spread: None, + expr: Box::new(Expr::Lit(Lit::Str(quote_str!(name)))), + }], + type_args: None, + }) + } else { + Expr::Ident(ident.clone()) + } + } + JSXElementName::JSXMemberExpr(expr) => Expr::JSXMember(expr.clone()), + JSXElementName::JSXNamespacedName(name) => Expr::JSXNamespacedName(name.clone()), + } + } + + fn transform_attrs<'a>( + &mut self, + attrs: &'a [JSXAttrOrSpread], + is_component: bool, + directives: &mut Vec, + ) -> AttrsTransformationResult<'a> { + let mut slots = None; + + if attrs.is_empty() { + return AttrsTransformationResult { + attrs: Expr::Lit(Lit::Null(Null { span: DUMMY_SP })), + patch_flags: PatchFlags::empty(), + dynamic_props: None, + slots, + }; + } + + let mut dynamic_props = IndexSet::new(); + + // patch flags analysis + let mut has_ref = false; + let mut has_class_binding = false; + let mut has_style_binding = false; + let mut has_hydration_event_binding = false; + let mut has_dynamic_keys = false; + + let (mut props, mut merge_args) = attrs.iter().fold( + ( + Vec::with_capacity(attrs.len()), + Vec::with_capacity(attrs.len()), + ), + |(mut props, mut merge_args), jsx_attr_or_spread| { + match jsx_attr_or_spread { + JSXAttrOrSpread::JSXAttr(jsx_attr) if is_directive(jsx_attr) => { + match parse_directive(jsx_attr, is_component) { + Directive::Normal(directive) => directives.push(directive), + Directive::Html(expr) => { + props.push(PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Str(quote_str!("innerHTML")), + value: Box::new(expr), + })))); + dynamic_props.insert("innerHTML".into()); + } + Directive::Text(expr) => { + props.push(PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Str(quote_str!("textContent")), + value: Box::new(expr), + })))); + dynamic_props.insert("textContent".into()); + } + Directive::VModel(directive) => { + if is_component { + props.push(PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: match &directive.argument { + Some(Expr::Lit(Lit::Null(..))) | None => { + dynamic_props.insert("modelValue".into()); + PropName::Str(quote_str!("modelValue")) + } + Some(Expr::Lit(Lit::Str(Str { value, .. }))) => { + dynamic_props.insert(Cow::from(value.to_string())); + PropName::Str(quote_str!(&**value)) + } + Some(expr) => PropName::Computed(ComputedPropName { + span: DUMMY_SP, + expr: Box::new(expr.clone()), + }), + }, + value: Box::new(directive.value.clone()), + })))); + if let Some(modifiers) = directive.modifiers { + props.push(PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: match &directive.argument { + Some(Expr::Lit(Lit::Null(..))) | None => { + PropName::Str(quote_str!("modelModifiers")) + } + Some(Expr::Lit(Lit::Str(Str { value, .. }))) => { + PropName::Str(quote_str!(format!("{value}Modifiers"))) + } + Some(expr) => PropName::Computed(ComputedPropName { + span: DUMMY_SP, + expr: Box::new(Expr::Bin(BinExpr { + span: DUMMY_SP, + op: op!(bin, "+"), + left: Box::new(expr.clone()), + right: Box::new(Expr::Lit(Lit::Str(quote_str!("Modifiers")))), + })), + }), + }, + value: Box::new(modifiers), + })))) + } + } else { + directives.push(NormalDirective { + name: JsWord::from("model"), + argument: directive.transformed_argument, + modifiers: directive.modifiers.clone(), + value: directive.value.clone(), + }); + } + + props.push(PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: match directive.argument { + Some(Expr::Lit(Lit::Null(..))) | None => { + dynamic_props.insert("onUpdate:modelValue".into()); + PropName::Str(quote_str!("onUpdate:modelValue")) + } + Some(Expr::Lit(Lit::Str(Str { value, .. }))) => { + let name = format!("onUpdate:{value}"); + let prop_name = PropName::Str(quote_str!(&*name)); + dynamic_props.insert(name.into()); + prop_name + } + Some(expr) => { + has_dynamic_keys = true; + PropName::Computed(ComputedPropName { + span: DUMMY_SP, + expr: Box::new(Expr::Bin(BinExpr { + span: DUMMY_SP, + op: op!(bin, "+"), + left: Box::new(Expr::Lit(Lit::Str(quote_str!("onUpdate")))), + right: Box::new(expr), + })), + }) + } + }, + value: Box::new(Expr::Arrow(ArrowExpr { + span: DUMMY_SP, + params: vec![Pat::Ident(BindingIdent { + id: quote_ident!("$event").into(), + type_ann: None, + })], + body: Box::new(BlockStmtOrExpr::Expr(Box::new(Expr::Assign(AssignExpr { + span: DUMMY_SP, + op: op!("="), + left: AssignTarget::Simple(SimpleAssignTarget::Paren(ParenExpr { + span: DUMMY_SP, + expr: Box::new(directive.value), + })), + right: Box::new(Expr::Ident(quote_ident!("$event").into())), + })))), + is_async: false, + is_generator: false, + type_params: None, + return_type: None, + })), + })))); + } + Directive::Slots(expr) => slots = expr, + } + } + JSXAttrOrSpread::JSXAttr(jsx_attr) => { + let attr_name = match &jsx_attr.name { + JSXAttrName::Ident(ident) => Cow::from(&*ident.sym), + JSXAttrName::JSXNamespacedName(name) => { + Cow::from(format!("{}:{}", name.ns.sym, name.name.sym)) + } + }; + let attr_value = jsx_attr + .value + .as_ref() + .map(|value| match value { + JSXAttrValue::Lit(Lit::Str(str)) => Box::new(Expr::Lit(Lit::Str(quote_str!( + util::transform_text(&str.value) + )))), + JSXAttrValue::Lit(..) => { + unreachable!("JSX attribute value literal must be string") + } + JSXAttrValue::JSXExprContainer(JSXExprContainer { + expr: JSXExpr::Expr(expr), + .. + }) => expr.clone(), + JSXAttrValue::JSXExprContainer(JSXExprContainer { + expr: JSXExpr::JSXEmptyExpr(expr), + .. + }) => Box::new(Expr::JSXEmpty(*expr)), + JSXAttrValue::JSXElement(element) => Box::new(Expr::JSXElement(element.clone())), + JSXAttrValue::JSXFragment(fragment) => { + Box::new(Expr::JSXFragment(fragment.clone())) + } + }) + .unwrap_or_else(|| { + Box::new(Expr::Lit(Lit::Bool(Bool { + span: DUMMY_SP, + value: true, + }))) + }); + + if attr_name == "ref" { + has_ref = true; + } else if !jsx_attr + .value + .as_ref() + .map(util::is_jsx_attr_value_constant) + .unwrap_or_default() + { + if !is_component && util::is_on(&attr_name) + // omit the flag for click handlers becaues hydration gives click + // dedicated fast path. + && !attr_name.eq_ignore_ascii_case("onclick") + // omit v-model handlers + && attr_name != "onUpdate:modelValue" + { + has_hydration_event_binding = true; + } + match &*attr_name { + "class" if !is_component => has_class_binding = true, + "style" if !is_component => has_style_binding = true, + "key" | "on" | "ref" => {} + _ => { + dynamic_props.insert(attr_name.clone()); + } + } + } + + if self.options.transform_on && (attr_name == "on" || attr_name == "nativeOn") { + merge_args.push(Expr::Call(CallExpr { + span: DUMMY_SP, + callee: Callee::Expr(Box::new(Expr::Ident( + self + .transform_on_helper + .get_or_insert_with(|| private_ident!("_transformOn")) + .clone(), + ))), + args: vec![ExprOrSpread { + spread: None, + expr: attr_value, + }], + type_args: None, + })); + } else { + props.push(PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Str(quote_str!(attr_name)), + value: attr_value, + })))); + } + } + JSXAttrOrSpread::SpreadElement(spread) => { + has_dynamic_keys = true; + + if !props.is_empty() && self.options.merge_props { + merge_args.push(Expr::Object(ObjectLit { + span: DUMMY_SP, + props: util::dedupe_props(mem::take(&mut props)), + })); + } + + if let Expr::Object(object) = &*spread.expr { + if self.options.merge_props { + merge_args.push(Expr::Object(object.clone())); + } else { + props.extend_from_slice(&object.props); + } + } else if self.options.merge_props { + merge_args.push(*spread.expr.clone()); + } else { + props.push(PropOrSpread::Spread(spread.clone())); + } + } + } + (props, merge_args) + }, + ); + + let expr = if !merge_args.is_empty() { + if !props.is_empty() { + merge_args.push(Expr::Object(ObjectLit { + span: DUMMY_SP, + props: if self.options.merge_props { + util::dedupe_props(mem::take(&mut props)) + } else { + mem::take(&mut props) + }, + })); + } + match merge_args.as_slice() { + [expr] => expr.clone(), + _ => Expr::Call(CallExpr { + span: DUMMY_SP, + callee: Callee::Expr(Box::new(Expr::Ident(self.import_from_vue("mergeProps")))), + args: merge_args + .into_iter() + .map(|expr| ExprOrSpread { + spread: None, + expr: Box::new(expr), + }) + .collect(), + type_args: None, + }), + } + } else if !props.is_empty() { + if let [PropOrSpread::Spread(SpreadElement { expr, .. })] = props.as_slice() { + *expr.clone() + } else { + Expr::Object(ObjectLit { + span: DUMMY_SP, + props: if self.options.merge_props { + util::dedupe_props(props) + } else { + props + }, + }) + } + } else { + Expr::Lit(Lit::Null(Null { span: DUMMY_SP })) + }; + + let mut patch_flags = PatchFlags::empty(); + if has_dynamic_keys { + patch_flags.insert(PatchFlags::FULL_PROPS); + } else { + if has_class_binding { + patch_flags.insert(PatchFlags::CLASS); + } + if has_style_binding { + patch_flags.insert(PatchFlags::STYLE); + } + if !dynamic_props.is_empty() { + patch_flags.insert(PatchFlags::PROPS); + } + if has_hydration_event_binding { + patch_flags.insert(PatchFlags::HYDRATE_EVENTS); + } + } + if (patch_flags.is_empty() || patch_flags == PatchFlags::HYDRATE_EVENTS) + && (has_ref || !directives.is_empty()) + { + patch_flags.insert(PatchFlags::NEED_PATCH); + } + + AttrsTransformationResult { + attrs: expr, + patch_flags, + dynamic_props: Some(dynamic_props), + slots, + } + } + + fn transform_children( + &mut self, + children: &[JSXElementChild], + is_component: bool, + slots: Option>, + ) -> Expr { + let elems = children + .iter() + .filter_map(|child| match child { + JSXElementChild::JSXText(jsx_text) => { + self.transform_jsx_text(jsx_text).map(|expr| ExprOrSpread { + spread: None, + expr: Box::new(expr), + }) + } + JSXElementChild::JSXExprContainer(JSXExprContainer { + expr: JSXExpr::JSXEmptyExpr(..), + .. + }) => None, + JSXElementChild::JSXExprContainer(JSXExprContainer { + expr: JSXExpr::Expr(expr), + .. + }) => { + if self.options.optimize { + match &**expr { + Expr::Ident(ident) if !ident.to_id().1.has_mark(self.unresolved_mark) => { + self.slot_flag_stack.fill(SlotFlag::Dynamic); + } + _ => {} + } + } + Some(ExprOrSpread { + spread: None, + expr: expr.clone(), + }) + } + JSXElementChild::JSXSpreadChild(JSXSpreadChild { expr, .. }) => { + if self.options.optimize { + match &**expr { + Expr::Ident(ident) if !ident.to_id().1.has_mark(self.unresolved_mark) => { + self.slot_flag_stack.fill(SlotFlag::Dynamic); + } + _ => {} + } + } + Some(ExprOrSpread { + spread: Some(DUMMY_SP), + expr: expr.clone(), + }) + } + JSXElementChild::JSXElement(jsx_element) => Some(ExprOrSpread { + spread: None, + expr: Box::new(self.transform_jsx_element(jsx_element)), + }), + JSXElementChild::JSXFragment(jsx_fragment) => Some(ExprOrSpread { + spread: None, + expr: Box::new(self.transform_jsx_fragment(jsx_fragment)), + }), + }) + .map(Some) + .collect::>(); + + let slot_flag = if self.options.optimize { + self.slot_flag_stack.pop().unwrap_or(SlotFlag::Stable) + } else { + SlotFlag::Stable + }; + + match elems.as_slice() { + [] => { + if let Some(slots) = slots { + *slots + } else { + Expr::Lit(Lit::Null(Null { span: DUMMY_SP })) + } + } + [Some(ExprOrSpread { spread: None, expr })] => match &**expr { + expr @ Expr::Ident(..) if is_component => { + let elems = self.build_iife(elems.clone()); + if self.options.enable_object_slots { + Expr::Cond(CondExpr { + span: DUMMY_SP, + test: Box::new(Expr::Call(CallExpr { + span: DUMMY_SP, + callee: Callee::Expr(Box::new(Expr::Ident(self.generate_slot_helper()))), + args: vec![ExprOrSpread { + spread: None, + expr: Box::new(expr.clone()), + }], + type_args: None, + })), + cons: Box::new(expr.clone()), + alt: Box::new(self.wrap_children(elems, slot_flag, slots)), + }) + } else { + self.wrap_children(elems, slot_flag, slots) + } + } + expr @ Expr::Call(..) if expr.span() != DUMMY_SP && is_component => { + // the element was generated and doesn't have location information + if self.options.enable_object_slots { + let slot_ident = self.generate_unique_slot_ident(); + Expr::Cond(CondExpr { + span: DUMMY_SP, + test: Box::new(Expr::Call(CallExpr { + span: DUMMY_SP, + callee: Callee::Expr(Box::new(Expr::Ident(self.generate_slot_helper()))), + args: vec![ExprOrSpread { + spread: None, + expr: Box::new(Expr::Assign(AssignExpr { + span: DUMMY_SP, + op: op!("="), + left: AssignTarget::Simple(SimpleAssignTarget::Paren(ParenExpr { + span: DUMMY_SP, + expr: Box::new(Expr::Ident(slot_ident.clone())), + })), + right: Box::new(expr.clone()), + })), + }], + type_args: None, + })), + cons: Box::new(Expr::Ident(slot_ident.clone())), + alt: { + let elems = self.build_iife(vec![Some(ExprOrSpread { + spread: None, + expr: Box::new(Expr::Ident(slot_ident)), + })]); + Box::new(self.wrap_children(elems, slot_flag, slots)) + }, + }) + } else { + self.wrap_children(elems, slot_flag, slots) + } + } + expr @ Expr::Fn(..) | expr @ Expr::Arrow(..) => Expr::Object(ObjectLit { + span: DUMMY_SP, + props: vec![PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Ident(quote_ident!("default")), + value: Box::new(expr.clone()), + })))], + }), + Expr::Object(ObjectLit { props, .. }) => { + let mut props = props.clone(); + if self.options.optimize { + props.push(PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Ident(quote_ident!("_")), + value: Box::new(Expr::Lit(Lit::Num(Number { + span: DUMMY_SP, + value: slot_flag as u8 as f64, + raw: None, + }))), + })))); + } + Expr::Object(ObjectLit { + span: DUMMY_SP, + props, + }) + } + _ => { + if is_component { + self.wrap_children(elems, slot_flag, slots) + } else { + Expr::Array(ArrayLit { + span: DUMMY_SP, + elems, + }) + } + } + }, + _ => { + if is_component { + self.wrap_children(elems, slot_flag, slots) + } else { + Expr::Array(ArrayLit { + span: DUMMY_SP, + elems, + }) + } + } + } + } + + fn wrap_children( + &self, + elems: Vec>, + slot_flag: SlotFlag, + slots: Option>, + ) -> Expr { + let mut props = vec![PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Ident(quote_ident!("default")), + value: Box::new(Expr::Arrow(ArrowExpr { + span: DUMMY_SP, + params: vec![], + body: Box::new(BlockStmtOrExpr::Expr(Box::new(Expr::Array(ArrayLit { + span: DUMMY_SP, + elems, + })))), + is_async: false, + is_generator: false, + type_params: None, + return_type: None, + })), + })))]; + + if let Some(expr) = slots { + match *expr { + Expr::Object(ObjectLit { + props: slot_props, .. + }) => props.extend_from_slice(&slot_props), + _ => props.push(PropOrSpread::Spread(SpreadElement { + dot3_token: DUMMY_SP, + expr, + })), + } + } + + if self.options.optimize { + props.push(PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Ident(quote_ident!("_")), + value: Box::new(Expr::Lit(Lit::Num(Number { + span: DUMMY_SP, + value: slot_flag as u8 as f64, + raw: None, + }))), + })))); + } + + Expr::Object(ObjectLit { + span: DUMMY_SP, + props, + }) + } + + fn generate_unique_slot_ident(&mut self) -> Ident { + let ident = if self.slot_counter == 1 { + private_ident!("_slot") + } else { + private_ident!(format!("_slot{}", self.slot_counter)) + }; + self.injecting_vars.push(VarDeclarator { + span: DUMMY_SP, + name: Pat::Ident(BindingIdent { + id: ident.clone(), + type_ann: None, + }), + init: None, + definite: false, + }); + + self.slot_counter += 1; + ident + } + + fn transform_jsx_text(&mut self, jsx_text: &JSXText) -> Option { + let text = util::transform_text(&jsx_text.value); + if text.is_empty() { + None + } else { + Some(Expr::Call(CallExpr { + span: DUMMY_SP, + callee: Callee::Expr(Box::new(Expr::Ident( + self.import_from_vue("createTextVNode"), + ))), + args: vec![ExprOrSpread { + spread: None, + expr: Box::new(Expr::Lit(Lit::Str(quote_str!(text)))), + }], + type_args: None, + })) + } + } + + fn resolve_directive(&mut self, directive_name: &str, jsx_element: &JSXElement) -> Expr { + match directive_name { + "show" => Expr::Ident(self.import_from_vue("vShow")), + "model" => match &jsx_element.opening.name { + JSXElementName::Ident(ident) if &ident.sym == "select" => { + Expr::Ident(self.import_from_vue("vModelSelect")) + } + JSXElementName::Ident(ident) if &ident.sym == "textarea" => { + Expr::Ident(self.import_from_vue("vModelText")) + } + _ => { + let typ = + jsx_element.opening.attrs.iter().find_map( + |jsx_attr_or_spread| match jsx_attr_or_spread { + JSXAttrOrSpread::JSXAttr(JSXAttr { + name: JSXAttrName::Ident(ident), + value, + .. + }) if &ident.sym == "type" => value.as_ref(), + _ => None, + }, + ); + match typ { + Some(JSXAttrValue::Lit(Lit::Str(str))) if &str.value == "checkbox" => { + Expr::Ident(self.import_from_vue("vModelCheckbox")) + } + Some(JSXAttrValue::Lit(Lit::Str(str))) if &str.value == "radio" => { + Expr::Ident(self.import_from_vue("vModelRadio")) + } + Some(JSXAttrValue::Lit(Lit::Str(..))) | None => { + Expr::Ident(self.import_from_vue("vModelText")) + } + Some(..) => Expr::Ident(self.import_from_vue("vModelDynamic")), + } + } + }, + _ => Expr::Call(CallExpr { + span: DUMMY_SP, + callee: Callee::Expr(Box::new(Expr::Ident( + self.import_from_vue("resolveDirective"), + ))), + args: vec![ExprOrSpread { + spread: None, + expr: Box::new(Expr::Lit(Lit::Str(quote_str!(directive_name)))), + }], + type_args: None, + }), + } + } + + fn is_component(&self, element_name: &JSXElementName) -> bool { + let name = match element_name { + JSXElementName::Ident(Ident { sym, .. }) => sym, + JSXElementName::JSXMemberExpr(JSXMemberExpr { prop, .. }) => &*prop.sym, + JSXElementName::JSXNamespacedName(JSXNamespacedName { name, .. }) => &*name.sym, + }; + let should_transformed_to_slots = !self + .vue_imports + .get(FRAGMENT) + .map(|ident| &*ident.sym == name) + .unwrap_or_default() + && name != KEEP_ALIVE; + + if matches!(element_name, JSXElementName::JSXMemberExpr(..)) { + should_transformed_to_slots + } else { + self + .options + .custom_element_patterns + .iter() + .all(|pattern| !pattern.is_match(name)) + && should_transformed_to_slots + && !(name.as_bytes()[0].is_ascii_lowercase() + && (css_dataset::tags::STANDARD_HTML_TAGS.contains(name) + || css_dataset::tags::SVG_TAGS.contains(name))) + } + } + + fn get_pragma(&mut self) -> Ident { + self + .pragma + .as_ref() + .or(self.options.pragma.as_ref()) + .map(|name| quote_ident!(name.as_str()).into()) + .unwrap_or_else(|| self.import_from_vue("createVNode")) + } + + fn search_jsx_pragma(&mut self, span: Span) { + if let Some(comments) = &self.comments { + comments.with_leading(span.lo, |comments| { + let pragma = comments.iter().find_map(|comment| { + let trimmed = comment.text.trim(); + trimmed + .strip_prefix('*') + .unwrap_or(trimmed) + .trim() + .strip_prefix("@jsx") + .map(str::trim) + }); + if let Some(pragma) = pragma { + self.pragma = Some(pragma.to_string()); + } + }); + } + } + + fn build_iife(&mut self, elems: Vec>) -> Vec> { + let left = self.assignment_left.take(); + if let Some(left) = left { + elems + .into_iter() + .map(|elem| match elem { + Some(ExprOrSpread { spread: None, expr }) => match *expr { + Expr::Ident(ident) if ident.sym == left.sym => { + let name = private_ident!(format!("_{}", ident.sym)); + self.injecting_consts.push(VarDeclarator { + span: DUMMY_SP, + name: Pat::Ident(BindingIdent { + id: name.clone(), + type_ann: None, + }), + init: Some(Box::new(Expr::Call(CallExpr { + span: DUMMY_SP, + callee: Callee::Expr(Box::new(Expr::Fn(FnExpr { + ident: None, + function: Box::new(Function { + params: vec![], + decorators: vec![], + span: DUMMY_SP, + body: Some(BlockStmt { + span: DUMMY_SP, + stmts: vec![Stmt::Return(ReturnStmt { + span: DUMMY_SP, + arg: Some(Box::new(Expr::Ident(ident))), + })], + }), + is_generator: false, + is_async: false, + type_params: None, + return_type: None, + }), + }))), + args: vec![], + type_args: None, + }))), + definite: false, + }); + Some(ExprOrSpread { + spread: None, + expr: Box::new(Expr::Ident(name)), + }) + } + expr => Some(ExprOrSpread { + spread: None, + expr: Box::new(expr), + }), + }, + _ => elem, + }) + .collect() + } else { + elems + } + } + + fn is_define_component_call(&self, CallExpr { callee, .. }: &CallExpr) -> bool { + callee + .as_expr() + .and_then(|expr| expr.as_ident()) + .and_then(|ident| { + self + .define_component + .map(|ctxt| ctxt == ident.span.ctxt && ident.sym == "defineComponent") + }) + .unwrap_or_default() + } +} + +impl VisitMut for VueJsxTransformVisitor +where + C: Comments, +{ + fn visit_mut_module(&mut self, module: &mut Module) { + self.search_jsx_pragma(module.span); + module + .body + .iter() + .for_each(|item| self.search_jsx_pragma(item.span())); + + module.visit_mut_children_with(self); + + if !self.injecting_consts.is_empty() { + module.body.insert( + 0, + ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(VarDecl { + span: DUMMY_SP, + kind: VarDeclKind::Const, + decls: mem::take(&mut self.injecting_consts), + declare: false, + })))), + ); + } + + if !self.injecting_vars.is_empty() { + module.body.insert( + 0, + ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(VarDecl { + span: DUMMY_SP, + kind: VarDeclKind::Let, + decls: mem::take(&mut self.injecting_vars), + declare: false, + })))), + ); + self.slot_counter = 1; + } + + if let Some(slot_helper) = &self.slot_helper_ident { + module.body.insert( + 0, + ModuleItem::Stmt(Stmt::Decl(Decl::Fn(util::build_slot_helper( + slot_helper.clone(), + self.import_from_vue("isVNode"), + )))), + ) + } + + if let Some(helper) = &self.transform_on_helper { + module.body.insert( + 0, + ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { + span: DUMMY_SP, + specifiers: vec![ImportSpecifier::Default(ImportDefaultSpecifier { + span: DUMMY_SP, + local: helper.clone(), + })], + src: Box::new(quote_str!("@vue/babel-helper-vue-transform-on")), + type_only: false, + with: None, + phase: Default::default(), + })), + ) + } + + if !self.vue_imports.is_empty() { + module.body.insert( + 0, + ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { + span: DUMMY_SP, + specifiers: self + .vue_imports + .iter() + .map(|(imported, local)| { + ImportSpecifier::Named(ImportNamedSpecifier { + span: DUMMY_SP, + local: local.clone(), + imported: Some(ModuleExportName::Ident(quote_ident!(*imported).into())), + is_type_only: false, + }) + }) + .collect(), + src: Box::new(quote_str!("vue")), + type_only: false, + with: None, + phase: Default::default(), + })), + ); + } + } + + fn visit_mut_stmts(&mut self, stmts: &mut Vec) { + stmts.visit_mut_children_with(self); + + if !self.injecting_consts.is_empty() { + stmts.insert( + 0, + Stmt::Decl(Decl::Var(Box::new(VarDecl { + span: DUMMY_SP, + kind: VarDeclKind::Const, + decls: mem::take(&mut self.injecting_consts), + declare: false, + }))), + ); + } + + if !self.injecting_vars.is_empty() { + stmts.insert( + 0, + Stmt::Decl(Decl::Var(Box::new(VarDecl { + span: DUMMY_SP, + kind: VarDeclKind::Let, + decls: mem::take(&mut self.injecting_vars), + declare: false, + }))), + ); + self.slot_counter = 1; + } + } + + fn visit_mut_arrow_expr(&mut self, arrow_expr: &mut ArrowExpr) { + arrow_expr.visit_mut_children_with(self); + + if !self.injecting_consts.is_empty() || !self.injecting_vars.is_empty() { + if let BlockStmtOrExpr::Expr(ret) = &*arrow_expr.body { + let mut stmts = Vec::with_capacity(3); + + if !self.injecting_consts.is_empty() { + stmts.push(Stmt::Decl(Decl::Var(Box::new(VarDecl { + span: DUMMY_SP, + kind: VarDeclKind::Const, + decls: mem::take(&mut self.injecting_consts), + declare: false, + })))); + } + + if !self.injecting_vars.is_empty() { + stmts.push(Stmt::Decl(Decl::Var(Box::new(VarDecl { + span: DUMMY_SP, + kind: VarDeclKind::Let, + decls: mem::take(&mut self.injecting_vars), + declare: false, + })))); + self.slot_counter = 1; + } + + stmts.push(Stmt::Return(ReturnStmt { + span: DUMMY_SP, + arg: Some(ret.clone()), + })); + + arrow_expr.body = Box::new(BlockStmtOrExpr::BlockStmt(BlockStmt { + span: DUMMY_SP, + stmts, + })); + } + } + } + + fn visit_mut_expr(&mut self, expr: &mut Expr) { + expr.visit_mut_children_with(self); + + match expr { + Expr::JSXElement(jsx_element) => *expr = self.transform_jsx_element(jsx_element), + Expr::JSXFragment(jsx_fragment) => *expr = self.transform_jsx_fragment(jsx_fragment), + Expr::Assign(AssignExpr { + left: AssignTarget::Simple(simple_assign_target), + .. + }) => { + if let SimpleAssignTarget::Ident(binding_ident) = &*simple_assign_target { + self.assignment_left = Some(binding_ident.id.clone()); + } + } + _ => {} + } + } + + // decouple `v-models` + fn visit_mut_jsx_opening_element(&mut self, jsx_opening_element: &mut JSXOpeningElement) { + jsx_opening_element.visit_mut_children_with(self); + + let Some(index) = + jsx_opening_element + .attrs + .iter() + .enumerate() + .find_map(|(i, jsx_attr_or_spread)| match jsx_attr_or_spread { + JSXAttrOrSpread::JSXAttr(JSXAttr { + name: JSXAttrName::Ident(Ident { sym, .. }), + .. + }) if sym == "v-models" => Some(i), + _ => None, + }) + else { + return; + }; + + let JSXAttrOrSpread::JSXAttr(JSXAttr { value, .. }) = jsx_opening_element.attrs.remove(index) + else { + unreachable!() + }; + + let Some(JSXAttrValue::JSXExprContainer(JSXExprContainer { + expr: JSXExpr::Expr(expr), + .. + })) = value + else { + HANDLER.with(|handler| { + handler.span_err( + value.span(), + "you should pass a Two-dimensional Arrays to v-models", + ) + }); + return; + }; + let Expr::Array(ArrayLit { elems, .. }) = *expr else { + HANDLER.with(|handler| { + handler.span_err( + expr.span(), + "you should pass a Two-dimensional Arrays to v-models", + ) + }); + return; + }; + + jsx_opening_element + .attrs + .splice(index..index, util::decouple_v_models(elems)); + } + + fn visit_mut_import_decl(&mut self, import_decl: &mut ImportDecl) { + import_decl.visit_mut_children_with(self); + + if import_decl.src.value != "vue" { + return; + } + + let ctxt = import_decl.specifiers.iter().find_map(|specifier| { + if let ImportSpecifier::Named(ImportNamedSpecifier { + local, + imported: None, + .. + }) = specifier + { + (local.sym == "defineComponent").then_some(local.span.ctxt) + } else { + None + } + }); + if let Some(ctxt) = ctxt { + self.define_component = Some(ctxt); + } + } + + fn visit_mut_ts_interface_decl(&mut self, ts_interface_decl: &mut TsInterfaceDecl) { + ts_interface_decl.visit_mut_children_with(self); + if self.options.resolve_type { + let key = (ts_interface_decl.id.sym.clone(), ts_interface_decl.id.span.ctxt); + if let Some(interface) = self.interfaces.get_mut(&key) { + interface + .body + .body + .extend_from_slice(&ts_interface_decl.body.body); + } else { + self.interfaces.insert(key, ts_interface_decl.clone()); + } + } + } + + fn visit_mut_ts_type_alias_decl(&mut self, ts_type_alias_decl: &mut TsTypeAliasDecl) { + ts_type_alias_decl.visit_mut_children_with(self); + if self.options.resolve_type { + self.type_aliases.insert( + ( + ts_type_alias_decl.id.sym.clone(), + ts_type_alias_decl.id.span.ctxt, + ), + (*ts_type_alias_decl.type_ann).clone(), + ); + } + } + + fn visit_mut_call_expr(&mut self, call_expr: &mut CallExpr) { + call_expr.visit_mut_children_with(self); + + if !self.options.resolve_type { + return; + } + + if !self.is_define_component_call(call_expr) { + return; + } + + let Some(maybe_setup) = call_expr.args.first() else { + return; + }; + + let props_types = self.extract_props_type(maybe_setup); + let emits_types = self.extract_emits_type(maybe_setup); + if let Some(prop_types) = props_types { + inject_define_component_option(call_expr, "props", prop_types); + } + if let Some(emits_type) = emits_types { + inject_define_component_option(call_expr, "emits", Expr::Array(emits_type)); + } + } + + fn visit_mut_var_declarator(&mut self, var_declarator: &mut VarDeclarator) { + var_declarator.visit_mut_children_with(self); + + if !self.options.resolve_type { + return; + } + let Pat::Ident(name) = &var_declarator.name else { + return; + }; + let Some(Expr::Call(call)) = var_declarator.init.as_deref_mut() else { + return; + }; + if !self.is_define_component_call(call) { + return; + } + + inject_define_component_option( + call, + "name", + Expr::Lit(Lit::Str(quote_str!(name.sym.clone()))), + ); + } +} + +fn inject_define_component_option(call: &mut CallExpr, name: &'static str, value: Expr) { + let options = call.args.get_mut(1); + if options + .as_ref() + .and_then(|options| options.spread) + .is_some() + { + return; + } + + match options.map(|options| &mut *options.expr) { + Some(Expr::Object(object)) => { + if !object.props.iter().any(|prop| { + prop + .as_prop() + .and_then(|prop| prop.as_key_value()) + .and_then(|key_value| key_value.key.as_ident()) + .map(|ident| ident.sym == name) + .unwrap_or_default() + }) { + object + .props + .push(PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Ident(quote_ident!(name)), + value: Box::new(value), + })))); + } + } + Some(..) => { + let expr = Expr::Object(ObjectLit { + props: vec![ + PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Ident(quote_ident!(name)), + value: Box::new(value), + }))), + PropOrSpread::Spread(SpreadElement { + expr: call.args.remove(1).expr, + dot3_token: DUMMY_SP, + }), + ], + span: DUMMY_SP, + }); + call.args.insert( + 1, + ExprOrSpread { + expr: Box::new(expr), + spread: None, + }, + ); + } + None => { + call.args.push(ExprOrSpread { + expr: Box::new(Expr::Object(ObjectLit { + props: vec![PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Ident(quote_ident!(name)), + value: Box::new(value), + })))], + span: DUMMY_SP, + })), + spread: None, + }); + } + } +} diff --git a/rust-plugins/vue-jsx/crates/visitor/src/options.rs b/rust-plugins/vue-jsx/crates/visitor/src/options.rs new file mode 100644 index 0000000..2e8105b --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/src/options.rs @@ -0,0 +1,92 @@ +use serde::{ + de::{Error, Unexpected, Visitor}, + Deserialize, Deserializer, +}; +use std::{fmt, ops::Deref}; + +#[derive(Clone, Debug, Deserialize)] +#[serde(rename_all = "camelCase", default)] +pub struct Options { + pub transform_on: bool, + pub optimize: bool, + pub custom_element_patterns: Vec, + pub merge_props: bool, + pub enable_object_slots: bool, + pub pragma: Option, + pub resolve_type: bool, +} + +impl Default for Options { + fn default() -> Self { + Self { + transform_on: false, + optimize: false, + custom_element_patterns: Default::default(), + merge_props: true, + enable_object_slots: true, + pragma: None, + resolve_type: false, + } + } +} + +#[derive(Clone, Debug)] +pub struct Regex(regex::Regex); + +impl Regex { + pub fn new(re: &str) -> Result { + regex::Regex::new(re).map(Self) + } +} + +impl From for Regex { + fn from(value: regex::Regex) -> Self { + Self(value) + } +} + +impl Deref for Regex { + type Target = regex::Regex; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +impl<'de> Deserialize<'de> for Regex { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + deserializer.deserialize_string(RegexVisitor) + } +} + +/// Serde visitor for parsing string as the [`Regex`] type. +struct RegexVisitor; + +impl<'de> Visitor<'de> for RegexVisitor { + type Value = Regex; + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + write!(formatter, "a string that represents a regex") + } + + fn visit_str(self, v: &str) -> Result + where + E: Error, + { + regex::Regex::new(v) + .map(Regex) + .map_err(|_| E::invalid_value(Unexpected::Str(v), &"a valid regex")) + } + + fn visit_string(self, v: String) -> Result + where + E: Error, + { + regex::Regex::new(&v) + .map(Regex) + .map_err(|_| E::invalid_value(Unexpected::Str(&v), &"a valid regex")) + } +} diff --git a/rust-plugins/vue-jsx/crates/visitor/src/patch_flags.rs b/rust-plugins/vue-jsx/crates/visitor/src/patch_flags.rs new file mode 100644 index 0000000..871b604 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/src/patch_flags.rs @@ -0,0 +1,20 @@ +use bitflags::bitflags; + +bitflags! { + #[derive(PartialEq, Eq)] + pub struct PatchFlags: i16 { + const TEXT = 1; + const CLASS = 1 << 1; + const STYLE = 1 << 2; + const PROPS = 1 << 3; + const FULL_PROPS = 1 << 4; + const HYDRATE_EVENTS = 1 << 5; + const STABLE_FRAGMENT = 1 << 6; + const KEYED_FRAGMENT = 1 << 7; + const UNKEYED_FRAGMENT = 1 << 8; + const NEED_PATCH = 1 << 9; + const DYNAMIC_SLOTS = 1 << 10; + const HOISTED = -1; + const BAIL = -2; + } +} diff --git a/rust-plugins/vue-jsx/crates/visitor/src/resolve_type.rs b/rust-plugins/vue-jsx/crates/visitor/src/resolve_type.rs new file mode 100644 index 0000000..bc25555 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/src/resolve_type.rs @@ -0,0 +1,1242 @@ +use crate::VueJsxTransformVisitor; +use indexmap::{IndexMap, IndexSet}; +use std::borrow::Cow; +use swc_core::{ + common::{comments::Comments, EqIgnoreSpan, Span, Spanned, DUMMY_SP}, + ecma::{ + ast::*, + atoms::{js_word, JsWord}, + utils::{quote_ident, quote_str}, + }, + plugin::errors::HANDLER, +}; + +enum RefinedTsTypeElement { + Property(TsPropertySignature), + GetterSignature(TsGetterSignature), + MethodSignature(TsMethodSignature), + CallSignature(TsCallSignatureDecl), +} + +struct PropIr { + types: IndexSet>, + required: bool, +} + +impl VueJsxTransformVisitor +where + C: Comments, +{ + pub(crate) fn extract_props_type(&mut self, setup_fn: &ExprOrSpread) -> Option { + let mut defaults = None; + let Some(first_param_type) = (if let ExprOrSpread { expr, spread: None } = setup_fn { + match &**expr { + Expr::Arrow(arrow) => arrow.params.first().and_then(|param| { + if let Pat::Assign(AssignPat { right, .. }) = param { + defaults = Some(&**right); + } + extract_type_ann_from_pat(param) + }), + Expr::Fn(fn_expr) => fn_expr.function.params.first().and_then(|param| { + if let Pat::Assign(AssignPat { right, .. }) = ¶m.pat { + defaults = Some(&**right); + } + extract_type_ann_from_pat(¶m.pat) + }), + _ => None, + } + } else { + None + }) else { + return None; + }; + + enum Defaults<'n> { + Static(Vec<(Cow<'n, PropName>, Expr)>), + Dynamic(&'n Expr), + } + let defaults = defaults.map(|defaults| { + if let Expr::Object(ObjectLit { props, .. }) = defaults { + if let Some(props) = props + .iter() + .map(|prop| { + if let PropOrSpread::Prop(prop) = prop { + match &**prop { + Prop::Shorthand(ident) => Some(( + Cow::Owned(PropName::Ident(ident.clone().into())), + Expr::Arrow(ArrowExpr { + params: vec![], + body: Box::new(BlockStmtOrExpr::Expr(Box::new( + Expr::Ident(ident.clone()), + ))), + is_async: false, + is_generator: false, + span: DUMMY_SP, + type_params: None, + return_type: None, + }), + )), + Prop::KeyValue(KeyValueProp { key, value }) => { + let Some(key) = try_unwrap_lit_prop_name(key) else { + return None; + }; + Some(( + key, + if value.is_lit() { + (**value).clone() + } else { + Expr::Arrow(ArrowExpr { + params: vec![], + body: Box::new(BlockStmtOrExpr::Expr( + value.clone(), + )), + is_async: false, + is_generator: false, + span: DUMMY_SP, + type_params: None, + return_type: None, + }) + }, + )) + } + Prop::Getter(GetterProp { + key, + body: Some(body), + .. + }) => { + let Some(key) = try_unwrap_lit_prop_name(key) else { + return None; + }; + Some(( + key, + Expr::Arrow(ArrowExpr { + params: vec![], + body: Box::new(BlockStmtOrExpr::BlockStmt( + body.clone(), + )), + is_async: false, + is_generator: false, + span: DUMMY_SP, + type_params: None, + return_type: None, + + }), + )) + } + Prop::Method(MethodProp { key, function }) => { + let Some(key) = try_unwrap_lit_prop_name(key) else { + return None; + }; + Some(( + key, + Expr::Fn(FnExpr { + ident: None, + function: function.clone(), + }), + )) + } + _ => None, + } + } else { + None + } + }) + .collect::>>() + { + Defaults::Static(props) + } else { + Defaults::Dynamic(defaults) + } + } else { + Defaults::Dynamic(defaults) + } + }); + + Some(match defaults { + Some(Defaults::Static(props)) => { + Expr::Object(self.build_props_type(first_param_type, Some(props))) + } + Some(Defaults::Dynamic(expr)) => { + let merge_defaults = self.import_from_vue("mergeDefaults"); + Expr::Call(CallExpr { + callee: Callee::Expr(Box::new(Expr::Ident(merge_defaults))), + args: vec![ + ExprOrSpread { + expr: Box::new(Expr::Object( + self.build_props_type(first_param_type, None), + )), + spread: None, + }, + ExprOrSpread { + expr: Box::new(expr.clone()), + spread: None, + }, + ], + span: if let Some(comments) = &self.comments { + let span = Span::dummy_with_cmt(); + comments.add_pure_comment(span.lo); + span + } else { + DUMMY_SP + }, + type_args: None + }) + } + None => Expr::Object(self.build_props_type(first_param_type, None)), + }) + } + + fn build_props_type( + &self, + TsTypeAnn { type_ann, .. }: &TsTypeAnn, + defaults: Option, Expr)>>, + ) -> ObjectLit { + let mut props = Vec::with_capacity(3); + self.resolve_type_elements(type_ann, &mut props); + + let cap = props.len(); + let irs = props.into_iter().fold( + IndexMap::::with_capacity(cap), + |mut irs, prop| { + match prop { + RefinedTsTypeElement::Property(TsPropertySignature { + key, + computed, + optional, + type_ann, + .. + }) => { + let prop_name = extract_prop_name(*key, computed); + let types = if let Some(type_ann) = type_ann { + self.infer_runtime_type(&type_ann.type_ann) + } else { + let mut types = IndexSet::with_capacity(1); + types.insert(None); + types + }; + if let Some((_, ir)) = irs + .iter_mut() + .find(|(key, _)| prop_name.eq_ignore_span(key)) + { + if optional { + ir.required = false; + } + ir.types.extend(types); + } else { + irs.insert( + prop_name, + PropIr { + types, + required: !optional, + }, + ); + } + } + RefinedTsTypeElement::GetterSignature(TsGetterSignature { + key, + computed, + type_ann, + .. + }) => { + let prop_name = extract_prop_name(*key, computed); + let types = if let Some(type_ann) = type_ann { + self.infer_runtime_type(&type_ann.type_ann) + } else { + let mut types = IndexSet::with_capacity(1); + types.insert(None); + types + }; + if let Some((_, ir)) = irs + .iter_mut() + .find(|(key, _)| prop_name.eq_ignore_span(key)) + { + ir.types.extend(types); + } else { + irs.insert( + prop_name, + PropIr { + types, + required: true, + }, + ); + } + } + RefinedTsTypeElement::MethodSignature(TsMethodSignature { + key, + computed, + optional, + .. + }) => { + let prop_name = extract_prop_name(*key, computed); + let ty = Some(js_word!("Function")); + if let Some((_, ir)) = irs + .iter_mut() + .find(|(key, _)| prop_name.eq_ignore_span(key)) + { + if optional { + ir.required = false; + } + ir.types.insert(ty); + } else { + let mut types = IndexSet::with_capacity(1); + types.insert(ty); + irs.insert( + prop_name, + PropIr { + types, + required: !optional, + }, + ); + } + } + RefinedTsTypeElement::CallSignature(..) => {} + } + irs + }, + ); + + ObjectLit { + props: irs + .into_iter() + .map(|(prop_name, mut ir)| { + let mut props = vec![ + PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Ident(quote_ident!("type")), + value: Box::new(if ir.types.len() == 1 { + if let Some(ty) = ir.types.pop().unwrap() { + Expr::Ident(quote_ident!(ty).into()) + } else { + Expr::Lit(Lit::Null(Null { span: DUMMY_SP })) + } + } else { + Expr::Array(ArrayLit { + elems: ir + .types + .into_iter() + .map(|ty| { + Some(ExprOrSpread { + expr: Box::new(if let Some(ty) = ty { + Expr::Ident(quote_ident!(ty).into()) + } else { + Expr::Lit(Lit::Null(Null { span: DUMMY_SP })) + }), + spread: None, + }) + }) + .collect(), + span: DUMMY_SP, + }) + }), + }))), + PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Ident(quote_ident!("required")), + value: Box::new(Expr::Lit(Lit::Bool(Bool { + value: ir.required, + span: DUMMY_SP, + }))), + }))), + ]; + if let Some((_, default)) = defaults.iter().flatten().find(|(name, _)| { + name.eq_ignore_span(&prop_name) + || if let ( + PropName::Ident(Ident { sym: a, .. }), + PropName::Str(Str { value: b, .. }), + ) + | ( + PropName::Str(Str { value: a, .. }), + PropName::Ident(Ident { sym: b, .. }), + ) = (&**name, &prop_name) + { + a == b + } else { + false + } + }) { + props.push(PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Ident(quote_ident!("default")), + value: Box::new(default.clone()), + })))); + } + PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { + key: prop_name, + value: Box::new(Expr::Object(ObjectLit { + props, + span: DUMMY_SP, + })), + }))) + }) + .collect(), + span: DUMMY_SP, + } + } + + fn resolve_type_elements(&self, ty: &TsType, props: &mut Vec) { + match ty { + TsType::TsTypeLit(TsTypeLit { members, .. }) => { + props.extend(members.iter().filter_map(|member| match member { + TsTypeElement::TsPropertySignature(prop) => { + Some(RefinedTsTypeElement::Property(prop.clone())) + } + TsTypeElement::TsMethodSignature(method) => { + Some(RefinedTsTypeElement::MethodSignature(method.clone())) + } + TsTypeElement::TsGetterSignature(getter) => { + Some(RefinedTsTypeElement::GetterSignature(getter.clone())) + } + TsTypeElement::TsCallSignatureDecl(call) => { + Some(RefinedTsTypeElement::CallSignature(call.clone())) + } + _ => None, + })); + } + TsType::TsUnionOrIntersectionType( + TsUnionOrIntersectionType::TsIntersectionType(TsIntersectionType { types, .. }) + | TsUnionOrIntersectionType::TsUnionType(TsUnionType { types, .. }), + ) => { + types + .iter() + .for_each(|ty| self.resolve_type_elements(ty, props)); + } + TsType::TsTypeRef(TsTypeRef { + type_name: TsEntityName::Ident(ident), + type_params, + span, + .. + }) => { + let key = (ident.sym.clone(), ident.span.ctxt); + if let Some(aliased) = self.type_aliases.get(&key) { + self.resolve_type_elements(aliased, props); + } else if let Some(TsInterfaceDecl { + extends, + body: TsInterfaceBody { body, .. }, + .. + }) = self.interfaces.get(&key) + { + props.extend(body.iter().filter_map(|element| match element { + TsTypeElement::TsPropertySignature(prop) => { + Some(RefinedTsTypeElement::Property(prop.clone())) + } + TsTypeElement::TsMethodSignature(method) => { + Some(RefinedTsTypeElement::MethodSignature(method.clone())) + } + TsTypeElement::TsGetterSignature(getter) => { + Some(RefinedTsTypeElement::GetterSignature(getter.clone())) + } + TsTypeElement::TsCallSignatureDecl(call) => { + Some(RefinedTsTypeElement::CallSignature(call.clone())) + } + _ => None, + })); + extends + .iter() + .filter_map(|parent| parent.expr.as_ident()) + .for_each(|ident| { + self.resolve_type_elements( + &TsType::TsTypeRef(TsTypeRef { + type_name: TsEntityName::Ident(ident.clone()), + type_params: None, + span: DUMMY_SP, + }), + props, + ) + }); + } else if ident.span.ctxt.has_mark(self.unresolved_mark) { + match &*ident.sym { + "Partial" => { + if let Some(param) = type_params + .as_deref() + .and_then(|params| params.params.first()) + { + let mut inner_props = vec![]; + self.resolve_type_elements(param, &mut inner_props); + props.extend(inner_props.into_iter().map(|mut prop| { + match &mut prop { + RefinedTsTypeElement::Property(property) => { + property.optional = true; + } + RefinedTsTypeElement::MethodSignature(method) => { + method.optional = true; + } + RefinedTsTypeElement::GetterSignature(..) => {} + RefinedTsTypeElement::CallSignature(..) => {} + } + prop + })); + } + } + "Required" => { + if let Some(param) = type_params + .as_deref() + .and_then(|params| params.params.first()) + { + let mut inner_props = vec![]; + self.resolve_type_elements(param, &mut inner_props); + props.extend(inner_props.into_iter().map(|mut prop| { + match &mut prop { + RefinedTsTypeElement::Property(TsPropertySignature { + optional, + .. + }) + | RefinedTsTypeElement::MethodSignature( + TsMethodSignature { optional, .. }, + ) => { + *optional = false; + } + RefinedTsTypeElement::GetterSignature(..) + | RefinedTsTypeElement::CallSignature(..) => {} + } + prop + })); + } + } + "Pick" => { + if let Some((object, keys)) = type_params + .as_deref() + .and_then(|params| params.params.first().zip(params.params.get(1))) + { + let keys = self.resolve_string_or_union_strings(keys); + let mut inner_props = vec![]; + self.resolve_type_elements(object, &mut inner_props); + props.extend(inner_props.into_iter().filter(|prop| match prop { + RefinedTsTypeElement::Property(TsPropertySignature { + key, + .. + }) + | RefinedTsTypeElement::MethodSignature(TsMethodSignature { + key, + .. + }) + | RefinedTsTypeElement::GetterSignature(TsGetterSignature { + key, + .. + }) => match &**key { + Expr::Ident(ident) => keys.contains(&ident.sym), + Expr::Lit(Lit::Str(str)) => keys.contains(&str.value), + _ => false, + }, + RefinedTsTypeElement::CallSignature(..) => false, + })); + } + } + "Omit" => { + if let Some((object, keys)) = type_params + .as_deref() + .and_then(|params| params.params.first().zip(params.params.get(1))) + { + let keys = self.resolve_string_or_union_strings(keys); + let mut inner_props = vec![]; + self.resolve_type_elements(object, &mut inner_props); + props.extend(inner_props.into_iter().filter(|prop| match prop { + RefinedTsTypeElement::Property(TsPropertySignature { + key, + .. + }) + | RefinedTsTypeElement::MethodSignature(TsMethodSignature { + key, + .. + }) + | RefinedTsTypeElement::GetterSignature(TsGetterSignature { + key, + .. + }) => match &**key { + Expr::Ident(ident) => !keys.contains(&ident.sym), + Expr::Lit(Lit::Str(str)) => !keys.contains(&str.value), + _ => true, + }, + RefinedTsTypeElement::CallSignature(..) => true, + })); + } + } + _ => { + HANDLER.with(|handler| { + handler.span_err( + *span, + "Unresolvable type reference or unsupported built-in utility type.", + ); + }); + } + } + } else { + HANDLER.with(|handler| { + handler.span_err(*span, "Types from other modules can't be resolved."); + }); + } + } + TsType::TsIndexedAccessType(TsIndexedAccessType { + obj_type, + index_type, + .. + }) => { + if let Some(ty) = self.resolve_indexed_access(obj_type, index_type) { + self.resolve_type_elements(&ty, props); + } else { + HANDLER.with(|handler| { + handler.span_err(ty.span(), "Unresolvable type."); + }); + } + } + TsType::TsFnOrConstructorType(TsFnOrConstructorType::TsFnType(TsFnType { + params, + type_params, + type_ann, + .. + })) => { + props.push(RefinedTsTypeElement::CallSignature(TsCallSignatureDecl { + params: params.clone(), + type_ann: Some(type_ann.clone()), + type_params: type_params.clone(), + span: DUMMY_SP, + })); + } + TsType::TsParenthesizedType(TsParenthesizedType { type_ann, .. }) + | TsType::TsOptionalType(TsOptionalType { type_ann, .. }) => { + self.resolve_type_elements(type_ann, props); + } + _ => HANDLER.with(|handler| { + handler.span_err(ty.span(), "Unresolvable type."); + }), + } + } + + fn resolve_string_or_union_strings(&self, ty: &TsType) -> Vec { + match ty { + TsType::TsLitType(TsLitType { + lit: TsLit::Str(key), + .. + }) => vec![key.value.clone()], + TsType::TsUnionOrIntersectionType(TsUnionOrIntersectionType::TsUnionType( + TsUnionType { types, .. }, + )) => types + .iter() + .fold(Vec::with_capacity(types.len()), |mut strings, ty| { + if let TsType::TsLitType(TsLitType { + lit: TsLit::Str(str), + .. + }) = &**ty + { + strings.push(str.value.clone()); + } else { + strings.extend_from_slice(&self.resolve_string_or_union_strings(ty)); + } + strings + }), + TsType::TsTypeRef(TsTypeRef { + type_name: TsEntityName::Ident(ident), + .. + }) => { + if let Some(aliased) = self.type_aliases.get(&(ident.sym.clone(), ident.span.ctxt)) { + self.resolve_string_or_union_strings(aliased) + } else if ident.span.ctxt.has_mark(self.unresolved_mark) { + HANDLER.with(|handler| { + handler.span_err( + ty.span(), + "Unresolvable type reference or unsupported built-in utility type.", + ); + }); + vec![] + } else { + HANDLER.with(|handler| { + handler.span_err(ty.span(), "Types from other modules can't be resolved."); + }); + vec![] + } + } + _ => { + HANDLER + .with(|handler| handler.span_err(ty.span(), "Unsupported type as index key.")); + vec![] + } + } + } + + fn resolve_indexed_access(&self, obj: &TsType, index: &TsType) -> Option { + match obj { + TsType::TsTypeRef(TsTypeRef { + type_name: TsEntityName::Ident(ident), + type_params, + .. + }) => { + let key = (ident.sym.clone(), ident.span.ctxt); + if let Some(aliased) = self.type_aliases.get(&key) { + self.resolve_indexed_access(aliased, index) + } else if let Some(interface) = self.interfaces.get(&key) { + let mut properties = match index { + TsType::TsKeywordType(TsKeywordType { + kind: TsKeywordTypeKind::TsStringKeyword, + .. + }) => interface + .body + .body + .iter() + .filter_map(|element| match element { + TsTypeElement::TsCallSignatureDecl(..) + | TsTypeElement::TsConstructSignatureDecl(..) + | TsTypeElement::TsSetterSignature(..) => None, + TsTypeElement::TsPropertySignature(TsPropertySignature { + key, + type_ann, + .. + }) + | TsTypeElement::TsGetterSignature(TsGetterSignature { + key, + type_ann, + .. + }) => { + if matches!(&**key, Expr::Ident(..) | Expr::Lit(Lit::Str(..))) { + type_ann.as_ref().map(|type_ann| type_ann.type_ann.clone()) + } else { + None + } + } + TsTypeElement::TsIndexSignature(TsIndexSignature { + type_ann, + .. + }) => type_ann.as_ref().map(|type_ann| type_ann.type_ann.clone()), + TsTypeElement::TsMethodSignature(..) => { + Some(Box::new(TsType::TsTypeRef(TsTypeRef { + type_name: TsEntityName::Ident( + quote_ident!("Function").into(), + ), + type_params: None, + span: DUMMY_SP, + }))) + } + }) + .collect(), + TsType::TsLitType(TsLitType { + lit: TsLit::Str(..), + .. + }) + | TsType::TsUnionOrIntersectionType( + TsUnionOrIntersectionType::TsUnionType(..), + ) + | TsType::TsTypeRef(..) => { + let keys = self.resolve_string_or_union_strings(index); + interface + .body + .body + .iter() + .filter_map(|element| match element { + TsTypeElement::TsPropertySignature(TsPropertySignature { + key, + type_ann, + .. + }) + | TsTypeElement::TsGetterSignature(TsGetterSignature { + key, + type_ann, + .. + }) => { + if let Expr::Ident(Ident { sym: key, .. }) + | Expr::Lit(Lit::Str(Str { value: key, .. })) = &**key + { + if keys.contains(key) { + type_ann + .as_ref() + .map(|type_ann| type_ann.type_ann.clone()) + } else { + None + } + } else { + None + } + } + TsTypeElement::TsMethodSignature(TsMethodSignature { + key, + .. + }) => { + if let Expr::Ident(Ident { sym: key, .. }) + | Expr::Lit(Lit::Str(Str { value: key, .. })) = &**key + { + if keys.contains(key) { + Some(Box::new(TsType::TsTypeRef(TsTypeRef { + type_name: TsEntityName::Ident( + quote_ident!("Function").into(), + ), + type_params: None, + span: DUMMY_SP, + }))) + } else { + None + } + } else { + None + } + } + TsTypeElement::TsCallSignatureDecl(..) + | TsTypeElement::TsConstructSignatureDecl(..) + | TsTypeElement::TsSetterSignature(..) + | TsTypeElement::TsIndexSignature(..) => None, + }) + .collect() + } + _ => vec![], + }; + if properties.len() == 1 { + Some((*properties.remove(0)).clone()) + } else { + Some(TsType::TsUnionOrIntersectionType( + TsUnionOrIntersectionType::TsUnionType(TsUnionType { + types: properties, + span: DUMMY_SP, + }), + )) + } + } else if ident.span.ctxt.has_mark(self.unresolved_mark) { + if ident.sym == "Array" { + type_params + .as_ref() + .and_then(|params| params.params.first()) + .map(|ty| (**ty).clone()) + } else { + None + } + } else { + None + } + } + TsType::TsTypeLit(TsTypeLit { members, .. }) => { + let mut properties = match index { + TsType::TsKeywordType(TsKeywordType { + kind: TsKeywordTypeKind::TsStringKeyword, + .. + }) => members + .iter() + .filter_map(|member| match member { + TsTypeElement::TsCallSignatureDecl(..) + | TsTypeElement::TsConstructSignatureDecl(..) + | TsTypeElement::TsSetterSignature(..) => None, + TsTypeElement::TsPropertySignature(TsPropertySignature { + key, + type_ann, + .. + }) + | TsTypeElement::TsGetterSignature(TsGetterSignature { + key, + type_ann, + .. + }) => { + if matches!(&**key, Expr::Ident(..) | Expr::Lit(Lit::Str(..))) { + type_ann.as_ref().map(|type_ann| type_ann.type_ann.clone()) + } else { + None + } + } + TsTypeElement::TsIndexSignature(TsIndexSignature { + type_ann, .. + }) => type_ann.as_ref().map(|type_ann| type_ann.type_ann.clone()), + TsTypeElement::TsMethodSignature(..) => { + Some(Box::new(TsType::TsTypeRef(TsTypeRef { + type_name: TsEntityName::Ident(quote_ident!("Function").into()), + type_params: None, + span: DUMMY_SP, + }))) + } + }) + .collect(), + TsType::TsLitType(TsLitType { + lit: TsLit::Str(..), + .. + }) + | TsType::TsTypeRef(..) + | TsType::TsUnionOrIntersectionType(TsUnionOrIntersectionType::TsUnionType( + .., + )) => { + let keys = self.resolve_string_or_union_strings(index); + members + .iter() + .filter_map(|member| match member { + TsTypeElement::TsPropertySignature(TsPropertySignature { + key, + type_ann, + .. + }) + | TsTypeElement::TsGetterSignature(TsGetterSignature { + key, + type_ann, + .. + }) => { + if let Expr::Ident(Ident { sym: key, .. }) + | Expr::Lit(Lit::Str(Str { value: key, .. })) = &**key + { + if keys.contains(key) { + type_ann + .as_ref() + .map(|type_ann| type_ann.type_ann.clone()) + } else { + None + } + } else { + None + } + } + TsTypeElement::TsMethodSignature(TsMethodSignature { + key, .. + }) => { + if let Expr::Ident(Ident { sym: key, .. }) + | Expr::Lit(Lit::Str(Str { value: key, .. })) = &**key + { + if keys.contains(key) { + Some(Box::new(TsType::TsTypeRef(TsTypeRef { + type_name: TsEntityName::Ident( + quote_ident!("Function").into(), + ), + type_params: None, + span: DUMMY_SP, + }))) + } else { + None + } + } else { + None + } + } + TsTypeElement::TsCallSignatureDecl(..) + | TsTypeElement::TsConstructSignatureDecl(..) + | TsTypeElement::TsSetterSignature(..) + | TsTypeElement::TsIndexSignature(..) => None, + }) + .collect() + } + _ => vec![], + }; + if properties.len() == 1 { + Some(*properties.remove(0)) + } else { + Some(TsType::TsUnionOrIntersectionType( + TsUnionOrIntersectionType::TsUnionType(TsUnionType { + types: properties, + span: DUMMY_SP, + }), + )) + } + } + TsType::TsArrayType(TsArrayType { elem_type, .. }) => { + if matches!( + index, + TsType::TsKeywordType(TsKeywordType { + kind: TsKeywordTypeKind::TsNumberKeyword, + .. + }) | TsType::TsLitType(TsLitType { + lit: TsLit::Number(..), + .. + }) + ) { + Some((**elem_type).clone()) + } else { + None + } + } + TsType::TsTupleType(TsTupleType { elem_types, .. }) => match index { + TsType::TsLitType(TsLitType { + lit: TsLit::Number(num), + .. + }) => elem_types + .get(num.value as usize) + .map(|element| (*element.ty).clone()), + TsType::TsKeywordType(TsKeywordType { + kind: TsKeywordTypeKind::TsNumberKeyword, + .. + }) => Some(TsType::TsUnionOrIntersectionType( + TsUnionOrIntersectionType::TsUnionType(TsUnionType { + types: elem_types + .iter() + .map(|TsTupleElement { ty, .. }| ty.clone()) + .collect(), + span: DUMMY_SP, + }), + )), + _ => None, + }, + _ => None, + } + } + + fn infer_runtime_type(&self, ty: &TsType) -> IndexSet> { + let mut runtime_types = IndexSet::with_capacity(1); + match ty { + TsType::TsKeywordType(keyword) => match keyword.kind { + TsKeywordTypeKind::TsStringKeyword => { + runtime_types.insert(Some(js_word!("String"))); + } + TsKeywordTypeKind::TsNumberKeyword => { + runtime_types.insert(Some(js_word!("Number"))); + } + TsKeywordTypeKind::TsBooleanKeyword => { + runtime_types.insert(Some(js_word!("Boolean"))); + } + TsKeywordTypeKind::TsObjectKeyword => { + runtime_types.insert(Some(js_word!("Object"))); + } + TsKeywordTypeKind::TsNullKeyword => { + runtime_types.insert(None); + } + TsKeywordTypeKind::TsBigIntKeyword => { + runtime_types.insert(Some(js_word!("BigInt"))); + } + TsKeywordTypeKind::TsSymbolKeyword => { + runtime_types.insert(Some(js_word!("Symbol"))); + } + _ => { + runtime_types.insert(None); + } + }, + TsType::TsTypeLit(TsTypeLit { members, .. }) => { + members.iter().for_each(|member| { + if let TsTypeElement::TsCallSignatureDecl(..) + | TsTypeElement::TsConstructSignatureDecl(..) = member + { + runtime_types.insert(Some(js_word!("Function"))); + } else { + runtime_types.insert(Some(js_word!("Object"))); + } + }); + } + TsType::TsFnOrConstructorType(..) => { + runtime_types.insert(Some(js_word!("Function"))); + } + TsType::TsArrayType(..) | TsType::TsTupleType(..) => { + runtime_types.insert(Some(js_word!("Array"))); + } + TsType::TsLitType(TsLitType { lit, .. }) => match lit { + TsLit::Str(..) | TsLit::Tpl(..) => { + runtime_types.insert(Some(js_word!("String"))); + } + TsLit::Bool(..) => { + runtime_types.insert(Some(js_word!("Boolean"))); + } + TsLit::Number(..) | TsLit::BigInt(..) => { + runtime_types.insert(Some(js_word!("Number"))); + } + }, + TsType::TsTypeRef(TsTypeRef { + type_name: TsEntityName::Ident(ident), + type_params, + .. + }) => { + let key = (ident.sym.clone(), ident.span.ctxt); + if let Some(aliased) = self.type_aliases.get(&key) { + runtime_types.extend(self.infer_runtime_type(aliased)); + } else if let Some(TsInterfaceDecl { + body: TsInterfaceBody { body, .. }, + .. + }) = self.interfaces.get(&key) + { + body.iter().for_each(|element| { + if let TsTypeElement::TsCallSignatureDecl(..) + | TsTypeElement::TsConstructSignatureDecl(..) = element + { + runtime_types.insert(Some(js_word!("Function"))); + } else { + runtime_types.insert(Some(js_word!("Object"))); + } + }); + } else { + match &*ident.sym { + "Array" | "Function" | "Object" | "Set" | "Map" | "WeakSet" | "WeakMap" + | "Date" | "Promise" | "Error" | "RegExp" => { + runtime_types.insert(Some(ident.sym.clone())); + } + "Partial" | "Required" | "Readonly" | "Record" | "Pick" | "Omit" + | "InstanceType" => { + runtime_types.insert(Some(js_word!("Object"))); + } + "Uppercase" | "Lowercase" | "Capitalize" | "Uncapitalize" => { + runtime_types.insert(Some(js_word!("String"))); + } + "Parameters" | "ConstructorParameters" => { + runtime_types.insert(Some(js_word!("Array"))); + } + "NonNullable" => { + if let Some(ty) = type_params + .as_ref() + .and_then(|type_params| type_params.params.first()) + { + let types = self.infer_runtime_type(ty); + runtime_types.extend(types.into_iter().filter(|ty| ty.is_some())); + } else { + runtime_types.insert(Some(js_word!("Object"))); + } + } + "Exclude" | "OmitThisParameter" => { + if let Some(ty) = type_params + .as_ref() + .and_then(|type_params| type_params.params.first()) + { + runtime_types.extend(self.infer_runtime_type(ty)); + } else { + runtime_types.insert(Some(js_word!("Object"))); + } + } + "Extract" => { + if let Some(ty) = type_params + .as_ref() + .and_then(|type_params| type_params.params.get(1)) + { + runtime_types.extend(self.infer_runtime_type(ty)); + } else { + runtime_types.insert(Some(js_word!("Object"))); + } + } + _ => { + runtime_types.insert(Some(js_word!("Object"))); + } + } + } + } + TsType::TsParenthesizedType(TsParenthesizedType { type_ann, .. }) => { + runtime_types.extend(self.infer_runtime_type(type_ann)); + } + TsType::TsUnionOrIntersectionType( + TsUnionOrIntersectionType::TsUnionType(TsUnionType { types, .. }) + | TsUnionOrIntersectionType::TsIntersectionType(TsIntersectionType { types, .. }), + ) => runtime_types.extend(types.iter().flat_map(|ty| self.infer_runtime_type(ty))), + TsType::TsIndexedAccessType(TsIndexedAccessType { + obj_type, + index_type, + .. + }) => { + if let Some(ty) = self.resolve_indexed_access(obj_type, index_type) { + runtime_types.extend(self.infer_runtime_type(&ty)); + } + } + TsType::TsOptionalType(TsOptionalType { type_ann, .. }) => { + runtime_types.extend(self.infer_runtime_type(type_ann)); + } + _ => { + runtime_types.insert(Some(js_word!("Object"))); + } + }; + runtime_types + } + + pub(crate) fn extract_emits_type(&self, setup_fn: &ExprOrSpread) -> Option { + let Some(TsTypeAnn { + type_ann: second_param_type, + .. + }) = (if let ExprOrSpread { expr, spread: None } = setup_fn { + match &**expr { + Expr::Arrow(arrow) => match arrow.params.get(1) { + Some(Pat::Ident(ident)) => ident.type_ann.as_deref(), + Some(Pat::Array(array)) => array.type_ann.as_deref(), + Some(Pat::Object(object)) => object.type_ann.as_deref(), + _ => return None, + }, + Expr::Fn(fn_expr) => match fn_expr.function.params.get(1).map(|param| ¶m.pat) { + Some(Pat::Ident(ident)) => ident.type_ann.as_deref(), + Some(Pat::Array(array)) => array.type_ann.as_deref(), + Some(Pat::Object(object)) => object.type_ann.as_deref(), + _ => return None, + }, + _ => return None, + } + } else { + return None; + }) + else { + return None; + }; + + match &**second_param_type { + TsType::TsTypeRef(TsTypeRef { + type_name: TsEntityName::Ident(ident), + type_params: Some(type_params), + .. + }) if ident.sym == "SetupContext" => { + if let Some(emits_def) = type_params.params.first() { + let mut emits = Vec::with_capacity(1); + self.resolve_type_elements(emits_def, &mut emits); + Some(ArrayLit { + elems: emits + .into_iter() + .flat_map(|emit| match emit { + RefinedTsTypeElement::MethodSignature(TsMethodSignature { + key, + .. + }) + | RefinedTsTypeElement::Property(TsPropertySignature { + key, .. + }) => match &*key { + Expr::Ident(ident) => vec![ident.sym.clone()], + Expr::Lit(Lit::Str(str)) => vec![str.value.clone()], + _ => vec![], + }, + RefinedTsTypeElement::CallSignature(TsCallSignatureDecl { + params, + .. + }) => params + .first() + .and_then(|param| match param { + TsFnParam::Ident(ident) => ident.type_ann.as_deref(), + TsFnParam::Array(array) => array.type_ann.as_deref(), + TsFnParam::Rest(rest) => rest.type_ann.as_deref(), + TsFnParam::Object(object) => object.type_ann.as_deref(), + }) + .map(|type_ann| { + self.resolve_string_or_union_strings(&type_ann.type_ann) + }) + .unwrap_or_default(), + RefinedTsTypeElement::GetterSignature(..) => vec![], + }) + .map(|name| { + Some(ExprOrSpread { + expr: Box::new(Expr::Lit(Lit::Str(quote_str!(name)))), + spread: None, + }) + }) + .collect(), + span: DUMMY_SP, + }) + } else { + None + } + } + _ => None, + } + } +} + +fn extract_prop_name(expr: Expr, computed: bool) -> PropName { + match expr { + Expr::Ident(ident) => PropName::Ident(ident.into()), + Expr::Lit(Lit::Str(str)) => PropName::Str(str), + Expr::Lit(Lit::Num(num)) => PropName::Num(num), + Expr::Lit(Lit::BigInt(bigint)) => PropName::BigInt(bigint), + _ => { + if computed { + PropName::Computed(ComputedPropName { + expr: Box::new(expr), + span: DUMMY_SP, + }) + } else { + HANDLER.with(|handler| handler.span_err(expr.span(), "Unsupported prop key.")); + PropName::Ident(quote_ident!("")) + } + } + } +} + +fn try_unwrap_lit_prop_name(prop_name: &PropName) -> Option> { + match prop_name { + PropName::Ident(..) | PropName::Str(..) | PropName::Num(..) | PropName::BigInt(..) => { + Some(Cow::Borrowed(prop_name)) + } + PropName::Computed(ComputedPropName { expr, .. }) => match &**expr { + Expr::Ident(ident) => Some(Cow::Owned(PropName::Ident(ident.clone().into()))), + Expr::Lit(Lit::Str(str)) => Some(Cow::Owned(PropName::Str(str.clone()))), + Expr::Lit(Lit::Num(num)) => Some(Cow::Owned(PropName::Num(num.clone()))), + Expr::Lit(Lit::BigInt(bigint)) => Some(Cow::Owned(PropName::BigInt(bigint.clone()))), + _ => None, + }, + } +} + +fn extract_type_ann_from_pat(pat: &Pat) -> Option<&TsTypeAnn> { + match pat { + Pat::Ident(ident) => ident.type_ann.as_deref(), + Pat::Object(object) => object.type_ann.as_deref(), + Pat::Array(array) => array.type_ann.as_deref(), + Pat::Assign(assign) => extract_type_ann_from_pat(&assign.left), + _ => None, + } +} diff --git a/rust-plugins/vue-jsx/crates/visitor/src/slot_flag.rs b/rust-plugins/vue-jsx/crates/visitor/src/slot_flag.rs new file mode 100644 index 0000000..1922078 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/src/slot_flag.rs @@ -0,0 +1,5 @@ +#[derive(Clone, Debug)] +pub enum SlotFlag { + Stable = 1, + Dynamic = 2, +} diff --git a/rust-plugins/vue-jsx/crates/visitor/src/util.rs b/rust-plugins/vue-jsx/crates/visitor/src/util.rs new file mode 100644 index 0000000..8691a21 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/src/util.rs @@ -0,0 +1,287 @@ +use swc_core::{ + common::DUMMY_SP, + ecma::{ + ast::*, + utils::{private_ident, quote_ident, quote_str}, + }, +}; + +pub(crate) fn build_slot_helper(helper_name: Ident, is_vnode: Ident) -> FnDecl { + let arg = private_ident!("s"); + + FnDecl { + ident: helper_name, + declare: false, + function: Box::new(Function { + params: vec![Param { + span: DUMMY_SP, + decorators: vec![], + pat: Pat::Ident(BindingIdent { + id: arg.clone(), + type_ann: None, + }), + }], + decorators: vec![], + span: DUMMY_SP, + body: Some(BlockStmt { + span: DUMMY_SP, + stmts: vec![Stmt::Return(ReturnStmt { + span: DUMMY_SP, + arg: Some(Box::new(Expr::Bin(BinExpr { + span: DUMMY_SP, + op: op!("||"), + left: Box::new(Expr::Bin(BinExpr { + span: DUMMY_SP, + op: op!("==="), + left: Box::new(Expr::Unary(UnaryExpr { + span: DUMMY_SP, + op: op!("typeof"), + arg: Box::new(Expr::Ident(arg.clone())), + })), + right: Box::new(Expr::Lit(Lit::Str(quote_str!("function")))), + })), + right: Box::new(Expr::Bin(BinExpr { + span: DUMMY_SP, + op: op!("&&"), + left: Box::new(Expr::Bin(BinExpr { + span: DUMMY_SP, + op: op!("==="), + left: Box::new(Expr::Call(CallExpr { + span: DUMMY_SP, + callee: Callee::Expr(Box::new(Expr::Member(MemberExpr { + span: DUMMY_SP, + obj: Box::new(Expr::Member(MemberExpr { + span: DUMMY_SP, + obj: Box::new(Expr::Object(ObjectLit { + span: DUMMY_SP, + props: vec![], + })), + prop: MemberProp::Ident(quote_ident!("toString")), + })), + prop: MemberProp::Ident(quote_ident!("call")), + }))), + args: vec![ExprOrSpread { + spread: None, + expr: Box::new(Expr::Ident(arg.clone())), + }], + type_args: None, + })), + right: Box::new(Expr::Lit(Lit::Str(quote_str!("[object Object]")))), + })), + right: Box::new(Expr::Unary(UnaryExpr { + span: DUMMY_SP, + op: op!("!"), + arg: Box::new(Expr::Call(CallExpr { + span: DUMMY_SP, + callee: Callee::Expr(Box::new(Expr::Ident(is_vnode))), + args: vec![ExprOrSpread { + spread: None, + expr: Box::new(Expr::Ident(arg)), + }], + type_args: None, + })), + })), + })), + }))), + })], + }), + is_generator: false, + is_async: false, + type_params: None, + return_type: None, + }), + } +} + +pub(crate) fn is_jsx_attr_value_constant(value: &JSXAttrValue) -> bool { + match value { + JSXAttrValue::Lit(..) => true, + JSXAttrValue::JSXExprContainer(JSXExprContainer { + expr: JSXExpr::Expr(expr), + .. + }) => is_constant(expr), + _ => false, + } +} + +fn is_constant(expr: &Expr) -> bool { + match expr { + Expr::Ident(ident) => &ident.sym == "undefined", + Expr::Array(ArrayLit { elems, .. }) => elems.iter().all(|element| match element { + Some(ExprOrSpread { spread: None, expr }) => is_constant(expr), + _ => false, + }), + Expr::Object(ObjectLit { props, .. }) => props.iter().all(|prop| { + if let PropOrSpread::Prop(prop) = prop { + match &**prop { + Prop::KeyValue(KeyValueProp { value, .. }) => is_constant(value), + Prop::Shorthand(ident) => &ident.sym == "undefined", + _ => false, + } + } else { + false + } + }), + Expr::Lit(..) => true, + _ => false, + } +} + +pub(crate) fn is_on(attr_name: &str) -> bool { + match attr_name.as_bytes() { + [b'o', b'n', c, ..] => !c.is_ascii_lowercase(), + _ => false, + } +} + +pub(crate) fn dedupe_props(props: Vec) -> Vec { + let capacity = props.len(); + props.into_iter().fold( + Vec::with_capacity(capacity), + |mut defined, prop_or_spread| { + if let PropOrSpread::Prop(prop) = prop_or_spread { + if let Prop::KeyValue(KeyValueProp { + key: + PropName::Str(Str { + value: ref name, + raw, + span, + }), + value, + }) = *prop + { + match defined.iter_mut().find_map(|item| match item { + PropOrSpread::Prop(prop) => match &mut **prop { + Prop::KeyValue(KeyValueProp { + key: + PropName::Str(Str { + value: defined_name, + .. + }), + value, + .. + }) if defined_name == name => Some(value), + _ => None, + }, + _ => None, + }) { + Some(defined_value) + if name == "class" || name == "style" || name.starts_with("on") => + { + if let Expr::Array(ArrayLit { elems, .. }) = &mut **defined_value { + elems.push(Some(ExprOrSpread { + spread: None, + expr: value, + })); + } else { + *defined_value = Box::new(Expr::Array(ArrayLit { + span: DUMMY_SP, + elems: vec![ + Some(ExprOrSpread { + spread: None, + expr: defined_value.clone(), + }), + Some(ExprOrSpread { + spread: None, + expr: value, + }), + ], + })); + } + } + Some(..) => {} + None => { + defined.push(PropOrSpread::Prop(Box::new(Prop::KeyValue( + KeyValueProp { + key: PropName::Str(Str { + span, + value: name.clone(), + raw, + }), + value, + }, + )))); + } + } + } else { + defined.push(PropOrSpread::Prop(prop)); + } + } else { + defined.push(prop_or_spread); + } + defined + }, + ) +} + +pub(crate) fn decouple_v_models( + elems: Vec>, +) -> impl Iterator { + elems + .into_iter() + .filter_map(|elem| match elem { + Some(ExprOrSpread { spread: None, expr }) => expr.array(), + _ => None, + }) + .map(|ArrayLit { mut elems, .. }| { + let argument = elems + .get(1) + .and_then(|elem| { + if let Some(ExprOrSpread { spread: None, expr }) = elem { + expr.as_lit() + } else { + None + } + }) + .and_then(|lit| { + if let Lit::Str(Str { value, .. }) = lit { + Some(value.clone()) + } else { + None + } + }); + if argument.is_some() { + elems.remove(1); + } + JSXAttrOrSpread::JSXAttr(JSXAttr { + span: DUMMY_SP, + name: if let Some(argument) = argument { + JSXAttrName::JSXNamespacedName(JSXNamespacedName { + ns: quote_ident!("v-model"), + name: quote_ident!(argument), + }) + } else { + JSXAttrName::Ident(quote_ident!("v-model")) + }, + value: Some(JSXAttrValue::JSXExprContainer(JSXExprContainer { + span: DUMMY_SP, + expr: JSXExpr::Expr(Box::new(Expr::Array(ArrayLit { + span: DUMMY_SP, + elems, + }))), + })), + }) + }) +} + +pub(crate) fn transform_text(text: &str) -> String { + let jsx_text_value = text.replace('\t', " "); + let mut jsx_text_lines = jsx_text_value.lines().enumerate().peekable(); + + let mut lines = vec![]; + while let Some((index, line)) = jsx_text_lines.next() { + let line = if index == 0 { + // first line + line.trim_end() + } else if jsx_text_lines.peek().is_none() { + // last line + line.trim_start() + } else { + line.trim() + }; + if !line.is_empty() { + lines.push(line); + } + } + lines.join(" ") +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture.rs b/rust-plugins/vue-jsx/crates/visitor/tests/fixture.rs new file mode 100644 index 0000000..2150138 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture.rs @@ -0,0 +1,58 @@ +use std::{fs, io::ErrorKind, path::PathBuf}; +use swc_core::{ + common::{chain, Mark}, + ecma::{ + parser::{EsConfig, Syntax, TsConfig}, + transforms::{base::resolver, testing::test_fixture}, + visit::as_folder, + }, +}; +use swc_vue_jsx_visitor::{Options, VueJsxTransformVisitor}; + +#[testing::fixture("tests/fixture/**/input.jsx")] +#[testing::fixture("tests/fixture/**/input.tsx")] +fn test(input: PathBuf) { + let config = match fs::read_to_string(input.with_file_name("config.json")) { + Ok(json) => serde_json::from_str(&json).unwrap(), + Err(err) if err.kind() == ErrorKind::NotFound => Options { + optimize: true, + ..Default::default() + }, + Err(err) => panic!("failed to read `config.json`: {err}"), + }; + let output = input.with_file_name("output.js"); + + let is_ts = input + .extension() + .map(|ext| ext.to_string_lossy()) + .map(|ext| &*ext == "tsx") + .unwrap_or_default(); + + test_fixture( + if is_ts { + Syntax::Typescript(TsConfig { + tsx: true, + ..Default::default() + }) + } else { + Syntax::Es(EsConfig { + jsx: true, + ..Default::default() + }) + }, + &|tester| { + let unresolved_mark = Mark::new(); + chain!( + resolver(unresolved_mark, Mark::new(), is_ts), + as_folder(VueJsxTransformVisitor::new( + config.clone(), + unresolved_mark, + Some(tester.comments.clone()) + )) + ) + }, + &input, + &output, + Default::default(), + ) +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive-with-argument-and-modifiers/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive-with-argument-and-modifiers/input.jsx new file mode 100644 index 0000000..6e5ddb0 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive-with-argument-and-modifiers/input.jsx @@ -0,0 +1,9 @@ +<> + + + + + + + + diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive-with-argument-and-modifiers/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive-with-argument-and-modifiers/output.js new file mode 100644 index 0000000..8d82387 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive-with-argument-and-modifiers/output.js @@ -0,0 +1,28 @@ +import { + Fragment as _Fragment, + createVNode as _createVNode, + resolveComponent as _resolveComponent, + resolveDirective as _resolveDirective, + withDirectives as _withDirectives, +} from "vue"; +_createVNode(_Fragment, null, [ + _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x]]), + _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x]]), + _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x, 'y']]), + _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x, 'y', { + a: true, + b: true + }]]), + _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x, void 0, { + a: true, + b: true + }]]), + _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x, y, { + a: true, + b: true + }]]), + _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x, y, { + a: true, + b: true + }]]), +]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive/input.jsx new file mode 100644 index 0000000..fce8c2b --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive/input.jsx @@ -0,0 +1 @@ + diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive/output.js new file mode 100644 index 0000000..be21e30 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-directive/output.js @@ -0,0 +1,7 @@ +import { + createVNode as _createVNode, + resolveComponent as _resolveComponent, + resolveDirective as _resolveDirective, + withDirectives as _withDirectives, +} from "vue"; +_withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("cus"), x]]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-element/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-element/config.json new file mode 100644 index 0000000..3c9123c --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-element/config.json @@ -0,0 +1,3 @@ +{ + "customElementPatterns": ["foo"] +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-element/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-element/input.jsx new file mode 100644 index 0000000..3353782 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-element/input.jsx @@ -0,0 +1 @@ +foo diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-element/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-element/output.js new file mode 100644 index 0000000..19e6e41 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-element/output.js @@ -0,0 +1,2 @@ +import { createTextVNode as _createTextVNode, createVNode as _createVNode } from "vue"; +_createVNode("foo", null, [_createVNode("span", null, [_createTextVNode("foo")])]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-comment/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-comment/input.jsx new file mode 100644 index 0000000..71fdbac --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-comment/input.jsx @@ -0,0 +1,2 @@ +/* @jsx custom */ +
Hello
diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-comment/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-comment/output.js new file mode 100644 index 0000000..f866ebb --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-comment/output.js @@ -0,0 +1,3 @@ +/* @jsx custom */ +import { createTextVNode as _createTextVNode } from "vue"; +custom("div", { "id": "custom" }, [_createTextVNode("Hello")]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-options/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-options/config.json new file mode 100644 index 0000000..e71a5ca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-options/config.json @@ -0,0 +1,3 @@ +{ + "pragma": "custom" +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-options/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-options/input.jsx new file mode 100644 index 0000000..eb97d7f --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-options/input.jsx @@ -0,0 +1 @@ +
pragma
diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-options/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-options/output.js new file mode 100644 index 0000000..c603eee --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/custom-pragma-in-options/output.js @@ -0,0 +1,2 @@ +import { createTextVNode as _createTextVNode } from "vue"; +custom("div", null, [_createTextVNode("pragma")]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/disable-object-slot/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/disable-object-slot/config.json new file mode 100644 index 0000000..f1f2c11 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/disable-object-slot/config.json @@ -0,0 +1,4 @@ +{ + "optimize": true, + "enableObjectSlots": false +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/disable-object-slot/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/disable-object-slot/input.jsx new file mode 100644 index 0000000..dd7bdbb --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/disable-object-slot/input.jsx @@ -0,0 +1 @@ +{slots.default()} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/disable-object-slot/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/disable-object-slot/output.js new file mode 100644 index 0000000..5676d41 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/disable-object-slot/output.js @@ -0,0 +1,5 @@ +import { createVNode as _createVNode, resolveComponent as _resolveComponent } from "vue"; +_createVNode(_resolveComponent("Badge"), null, { + default: () => [slots.default()], + _: 1 +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/empty-string/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/empty-string/input.jsx new file mode 100644 index 0000000..7a1cc4d --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/empty-string/input.jsx @@ -0,0 +1 @@ +

diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/empty-string/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/empty-string/output.js new file mode 100644 index 0000000..3545722 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/empty-string/output.js @@ -0,0 +1,2 @@ +import { createVNode as _createVNode } from "vue"; +_createVNode("h1", { "title": "" }, null); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/fragment-already-imported/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/fragment-already-imported/config.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/fragment-already-imported/config.json @@ -0,0 +1 @@ +{} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/fragment-already-imported/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/fragment-already-imported/input.jsx new file mode 100644 index 0000000..5b19caf --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/fragment-already-imported/input.jsx @@ -0,0 +1,3 @@ +import { Fragment as _Fragment } from 'vue' +const Root1 = () => <>root1 +const Root2 = () => <_Fragment>root2 diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/fragment-already-imported/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/fragment-already-imported/output.js new file mode 100644 index 0000000..97c024e --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/fragment-already-imported/output.js @@ -0,0 +1,4 @@ +import { Fragment as _Fragment, createTextVNode as _createTextVNode, createVNode as _createVNode } from "vue"; +import { Fragment as _Fragment1 } from 'vue'; +const Root1 = () => _createVNode(_Fragment, null, [_createTextVNode("root1")]); +const Root2 = () => _createVNode(_Fragment1, null, [_createTextVNode("root2")]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/function-expr-slot/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/function-expr-slot/config.json new file mode 100644 index 0000000..c09cd55 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/function-expr-slot/config.json @@ -0,0 +1,4 @@ +{ + "optimize": true, + "enableObjectSlots": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/function-expr-slot/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/function-expr-slot/input.jsx new file mode 100644 index 0000000..d0bd0ec --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/function-expr-slot/input.jsx @@ -0,0 +1 @@ +
{() => "foo"} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/function-expr-slot/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/function-expr-slot/output.js new file mode 100644 index 0000000..9b9c6df --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/function-expr-slot/output.js @@ -0,0 +1,4 @@ +import { createVNode as _createVNode, resolveComponent as _resolveComponent } from "vue"; +_createVNode(_resolveComponent("A"), null, { + default: () => "foo" +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/disabled/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/disabled/input.tsx new file mode 100644 index 0000000..3875e2b --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/disabled/input.tsx @@ -0,0 +1,3 @@ +import { defineComponent } from 'vue' + +const Foo = defineComponent(() => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/disabled/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/disabled/output.js new file mode 100644 index 0000000..50d70ac --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/disabled/output.js @@ -0,0 +1,2 @@ +import { defineComponent } from 'vue'; +const Foo = defineComponent(()=>{}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/enabled/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/enabled/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/enabled/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/enabled/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/enabled/input.tsx new file mode 100644 index 0000000..2d1e446 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/enabled/input.tsx @@ -0,0 +1,9 @@ +import { defineComponent } from 'vue' + +const Component1 = defineComponent(() => { }) + +const Component2 = defineComponent(() => { }, { foo: 'bar' }) + +const Component3 = defineComponent(() => { }, opts) + +const Component4 = defineComponent(() => { }, ...args) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/enabled/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/enabled/output.js new file mode 100644 index 0000000..ae42df6 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/infer-component-name/enabled/output.js @@ -0,0 +1,13 @@ +import { defineComponent } from 'vue'; +const Component1 = defineComponent(()=>{}, { + name: "Component1" +}); +const Component2 = defineComponent(()=>{}, { + foo: 'bar', + name: "Component2" +}); +const Component3 = defineComponent(()=>{}, { + name: "Component3", + ...opts +}); +const Component4 = defineComponent(()=>{}, ...args); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-named-import/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-named-import/input.jsx new file mode 100644 index 0000000..8c780b0 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-named-import/input.jsx @@ -0,0 +1,3 @@ +import { KeepAlive } from 'vue'; + +123 diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-named-import/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-named-import/output.js new file mode 100644 index 0000000..47426c4 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-named-import/output.js @@ -0,0 +1,3 @@ +import { createTextVNode as _createTextVNode, createVNode as _createVNode } from "vue"; +import { KeepAlive } from 'vue'; +_createVNode(KeepAlive, null, [_createTextVNode("123")]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-namespace-import/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-namespace-import/input.jsx new file mode 100644 index 0000000..5768a1d --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-namespace-import/input.jsx @@ -0,0 +1,3 @@ +import * as Vue from 'vue'; + +123 diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-namespace-import/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-namespace-import/output.js new file mode 100644 index 0000000..66c6209 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-alive-namespace-import/output.js @@ -0,0 +1,3 @@ +import { createTextVNode as _createTextVNode, createVNode as _createVNode } from "vue"; +import * as Vue from 'vue'; +_createVNode(Vue.KeepAlive, null, [_createTextVNode("123")]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-namespace-import/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-namespace-import/input.jsx new file mode 100644 index 0000000..42d0eef --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-namespace-import/input.jsx @@ -0,0 +1,2 @@ +import * as Vue from 'vue'; +
Vue
diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-namespace-import/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-namespace-import/output.js new file mode 100644 index 0000000..2cc7b40 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/keep-namespace-import/output.js @@ -0,0 +1,3 @@ +import { createTextVNode as _createTextVNode, createVNode as _createVNode } from "vue"; +import * as Vue from 'vue'; +_createVNode("div", null, [_createTextVNode("Vue")]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-class-style-attrs/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-class-style-attrs/input.jsx new file mode 100644 index 0000000..0cbdef3 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-class-style-attrs/input.jsx @@ -0,0 +1 @@ +
diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-class-style-attrs/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-class-style-attrs/output.js new file mode 100644 index 0000000..024fa2d --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-class-style-attrs/output.js @@ -0,0 +1,5 @@ +import { createVNode as _createVNode } from "vue"; +_createVNode("div", { + "class": ["a", b], + "style": ["color: red", s] +}, null, 6); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-props-order/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-props-order/input.jsx new file mode 100644 index 0000000..7e75963 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-props-order/input.jsx @@ -0,0 +1 @@ + diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-props-order/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-props-order/output.js new file mode 100644 index 0000000..4abd84b --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/merge-props-order/output.js @@ -0,0 +1,6 @@ +import { createTextVNode as _createTextVNode, createVNode as _createVNode, mergeProps as _mergeProps } from "vue"; +_createVNode("button", _mergeProps({ + "loading": true +}, x, { + "type": "submit" +}), [_createTextVNode("btn")], 16, ["loading"]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/model-as-prop-name/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/model-as-prop-name/input.jsx new file mode 100644 index 0000000..fbd2b60 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/model-as-prop-name/input.jsx @@ -0,0 +1 @@ + diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/model-as-prop-name/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/model-as-prop-name/output.js new file mode 100644 index 0000000..c1a8e46 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/model-as-prop-name/output.js @@ -0,0 +1,5 @@ +import { createVNode as _createVNode, resolveComponent as _resolveComponent } from "vue"; +_createVNode(_resolveComponent("C"), { + "model": foo, + "onUpdate:model": $event => foo = $event +}, null, 8, ["model", "onUpdate:model"]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/multiple-exprs-slot/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/multiple-exprs-slot/config.json new file mode 100644 index 0000000..c09cd55 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/multiple-exprs-slot/config.json @@ -0,0 +1,4 @@ +{ + "optimize": true, + "enableObjectSlots": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/multiple-exprs-slot/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/multiple-exprs-slot/input.jsx new file mode 100644 index 0000000..8757af5 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/multiple-exprs-slot/input.jsx @@ -0,0 +1 @@ +{foo}{bar} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/multiple-exprs-slot/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/multiple-exprs-slot/output.js new file mode 100644 index 0000000..2e94b2c --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/multiple-exprs-slot/output.js @@ -0,0 +1,5 @@ +import { createVNode as _createVNode, resolveComponent as _resolveComponent } from "vue"; +_createVNode(_resolveComponent("A"), null, { + default: () => [foo, bar], + _: 1 +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/nesting-slot-flags/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/nesting-slot-flags/input.jsx new file mode 100644 index 0000000..0f621ec --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/nesting-slot-flags/input.jsx @@ -0,0 +1,16 @@ +let defined; + + + {unknown1} + + {unknown2} + + {unknown3} + {defined} + + + + {unknown4} + {unknown5} + + diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/nesting-slot-flags/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/nesting-slot-flags/output.js new file mode 100644 index 0000000..003fbad --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/nesting-slot-flags/output.js @@ -0,0 +1,28 @@ +import { createVNode as _createVNode, isVNode as _isVNode, resolveComponent as _resolveComponent } from "vue"; +function _isSlot(s) { + return typeof s === "function" || ({}).toString.call(s) === "[object Object]" && !_isVNode(s); +} +let defined; +_createVNode(_resolveComponent("Comp"), null, { + default: () => [ + unknown1, + _createVNode(_resolveComponent("Comp"), null, { + default: () => [unknown2, _createVNode(_resolveComponent("Comp"), null, { + default: () => [unknown3, _createVNode(_resolveComponent("Comp"), null, _isSlot(defined) ? defined : { + default: () => [defined], + _: 2 + })], + _: 2 + })], + _: 2 + }), + _createVNode(_resolveComponent("Comp"), null, { + default: () => [unknown4, _createVNode(_resolveComponent("Comp"), null, _isSlot(unknown5) ? unknown5 : { + default: () => [unknown5], + _: 1 + })], + _: 1 + }), + ], + _: 2 +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/non-literal-expr-slot/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/non-literal-expr-slot/config.json new file mode 100644 index 0000000..c09cd55 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/non-literal-expr-slot/config.json @@ -0,0 +1,4 @@ +{ + "optimize": true, + "enableObjectSlots": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/non-literal-expr-slot/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/non-literal-expr-slot/input.jsx new file mode 100644 index 0000000..76fdd0c --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/non-literal-expr-slot/input.jsx @@ -0,0 +1,2 @@ +const foo = () => 1; +{foo()}; diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/non-literal-expr-slot/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/non-literal-expr-slot/output.js new file mode 100644 index 0000000..bc06c00 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/non-literal-expr-slot/output.js @@ -0,0 +1,10 @@ +import { createVNode as _createVNode, isVNode as _isVNode, resolveComponent as _resolveComponent } from "vue"; +function _isSlot(s) { + return typeof s === "function" || ({}).toString.call(s) === "[object Object]" && !_isVNode(s); +} +let _slot; +const foo = () => 1; +_createVNode(_resolveComponent("A"), null, _isSlot(_slot = foo()) ? _slot : { + default: () => [_slot], + _: 1 +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-multiple/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-multiple/config.json new file mode 100644 index 0000000..a881159 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-multiple/config.json @@ -0,0 +1,3 @@ +{ + "mergeProps": false +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-multiple/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-multiple/input.jsx new file mode 100644 index 0000000..a69c6db --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-multiple/input.jsx @@ -0,0 +1 @@ + diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-multiple/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-multiple/output.js new file mode 100644 index 0000000..f05845f --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-multiple/output.js @@ -0,0 +1,11 @@ +import { createVNode as _createVNode, resolveComponent as _resolveComponent } from "vue"; +_createVNode(_resolveComponent("A"), { + "loading": true, + ...a, + b: 1, + c: { + d: 2 + }, + "class": "x", + "style": x +}, null); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-single/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-single/config.json new file mode 100644 index 0000000..a881159 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-single/config.json @@ -0,0 +1,3 @@ +{ + "mergeProps": false +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-single/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-single/input.jsx new file mode 100644 index 0000000..a9a59bb --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-single/input.jsx @@ -0,0 +1 @@ +
diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-single/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-single/output.js new file mode 100644 index 0000000..8b75fcf --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/override-props-single/output.js @@ -0,0 +1,2 @@ +import { createVNode as _createVNode } from "vue"; +_createVNode("div", a, null); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/reassign-variable-as-component/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/reassign-variable-as-component/input.jsx new file mode 100644 index 0000000..63ee067 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/reassign-variable-as-component/input.jsx @@ -0,0 +1,13 @@ +import { defineComponent } from 'vue'; +let a = 1; +const A = defineComponent({ + setup(_, { slots }) { + return () => {slots.default()}; + }, +}); + +const _a2 = 2; + +a = _a2; + +a = {a}; diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/reassign-variable-as-component/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/reassign-variable-as-component/output.js new file mode 100644 index 0000000..3a79cfa --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/reassign-variable-as-component/output.js @@ -0,0 +1,22 @@ +import { createVNode as _createVNode, isVNode as _isVNode } from "vue"; +function _isSlot(s) { + return typeof s === "function" || ({}).toString.call(s) === "[object Object]" && !_isVNode(s); +} +const _a = function () { + return a; +}(); +import { defineComponent } from 'vue'; +let a = 1; +const A = defineComponent({ + setup(_, { + slots + }) { + return () => _createVNode("span", null, [slots.default()]); + } +}); +const _a2 = 2; +a = _a2; +a = _createVNode(A, null, _isSlot(a) ? a : { + default: () => [_a], + _: 2 +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/disabled/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/disabled/input.tsx new file mode 100644 index 0000000..3249882 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/disabled/input.tsx @@ -0,0 +1,3 @@ +import { defineComponent, type SetupContext } from 'vue' + +defineComponent((_, ctx: SetupContext<(e: 'foo' | 'bar') => void>) => {}) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/disabled/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/disabled/output.js new file mode 100644 index 0000000..bcd7c1f --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/disabled/output.js @@ -0,0 +1,2 @@ +import { defineComponent, type SetupContext } from 'vue'; +defineComponent((_, ctx: SetupContext<(e: 'foo' | 'bar') => void>)=>{}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-interface/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-interface/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-interface/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-interface/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-interface/input.tsx new file mode 100644 index 0000000..fd8d5f6 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-interface/input.tsx @@ -0,0 +1,5 @@ +import { defineComponent, type SetupContext } from 'vue' + +export interface Emits { (e: 'foo' | 'bar'): void } + +defineComponent((_, ctx: SetupContext) => {}) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-interface/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-interface/output.js new file mode 100644 index 0000000..d476fdb --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-interface/output.js @@ -0,0 +1,10 @@ +import { defineComponent, type SetupContext } from 'vue'; +export interface Emits { + (e: 'foo' | 'bar') : void; +} +defineComponent((_, ctx: SetupContext)=>{}, { + emits: [ + "foo", + "bar" + ] +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-type-alias/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-type-alias/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-type-alias/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-type-alias/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-type-alias/input.tsx new file mode 100644 index 0000000..1ab35eb --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-type-alias/input.tsx @@ -0,0 +1,5 @@ +import { defineComponent, type SetupContext } from 'vue' + +export type Emits = { (e: 'foo' | 'bar'): void } + +defineComponent((_, ctx: SetupContext) => {}) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-type-alias/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-type-alias/output.js new file mode 100644 index 0000000..1d651db --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/exported-type-alias/output.js @@ -0,0 +1,10 @@ +import { defineComponent, type SetupContext } from 'vue'; +export type Emits = { + (e: 'foo' | 'bar') : void; +}; +defineComponent((_, ctx: SetupContext)=>{}, { + emits: [ + "foo", + "bar" + ] +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/fn-type/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/fn-type/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/fn-type/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/fn-type/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/fn-type/input.tsx new file mode 100644 index 0000000..e022a18 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/fn-type/input.tsx @@ -0,0 +1,7 @@ +import { defineComponent, type SetupContext } from 'vue' + +defineComponent((_, ctx: SetupContext<(e: 'foo' | 'bar') => void>) => {}) + +defineComponent((_, ctx: SetupContext<((e: 'foo' | 'bar') => void) | ((e: 'baz', id: number) => void)>) => {}) + +defineComponent((_, ctx: SetupContext<{(e: 'foo' | 'bar'): void; (e: 'baz', id: number): void;}>) => {}) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/fn-type/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/fn-type/output.js new file mode 100644 index 0000000..475fdc7 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/fn-type/output.js @@ -0,0 +1,24 @@ +import { defineComponent, type SetupContext } from 'vue'; +defineComponent((_, ctx: SetupContext<(e: 'foo' | 'bar') => void>)=>{}, { + emits: [ + "foo", + "bar" + ] +}); +defineComponent((_, ctx: SetupContext<((e: 'foo' | 'bar') => void) | ((e: 'baz', id: number) => void)>)=>{}, { + emits: [ + "foo", + "bar", + "baz" + ] +}); +defineComponent((_, ctx: SetupContext<{ + (e: 'foo' | 'bar') : void; + (e: 'baz', id: number) : void; +}>)=>{}, { + emits: [ + "foo", + "bar", + "baz" + ] +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface-with-extends/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface-with-extends/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface-with-extends/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface-with-extends/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface-with-extends/input.tsx new file mode 100644 index 0000000..2ea5cb8 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface-with-extends/input.tsx @@ -0,0 +1,6 @@ +import { defineComponent, type SetupContext } from 'vue' + +interface Base { (e: 'foo'): void } +interface Emits extends Base { (e: 'bar'): void } + +defineComponent((_, ctx: SetupContext) => {}) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface-with-extends/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface-with-extends/output.js new file mode 100644 index 0000000..5b958f3 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface-with-extends/output.js @@ -0,0 +1,13 @@ +import { defineComponent, type SetupContext } from 'vue'; +interface Base { + (e: 'foo') : void; +} +interface Emits extends Base { + (e: 'bar') : void; +} +defineComponent((_, ctx: SetupContext)=>{}, { + emits: [ + "bar", + "foo" + ] +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface/input.tsx new file mode 100644 index 0000000..46f34de --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface/input.tsx @@ -0,0 +1,5 @@ +import { defineComponent, type SetupContext } from 'vue' + +interface Emits { (e: 'foo' | 'bar'): void } + +defineComponent((_, ctx: SetupContext) => {}) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface/output.js new file mode 100644 index 0000000..b13e5dc --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/interface/output.js @@ -0,0 +1,10 @@ +import { defineComponent, type SetupContext } from 'vue'; +interface Emits { + (e: 'foo' | 'bar') : void; +} +defineComponent((_, ctx: SetupContext)=>{}, { + emits: [ + "foo", + "bar" + ] +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/property-syntax/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/property-syntax/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/property-syntax/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/property-syntax/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/property-syntax/input.tsx new file mode 100644 index 0000000..5e8019f --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/property-syntax/input.tsx @@ -0,0 +1,5 @@ +import { defineComponent, type SetupContext } from 'vue' + +defineComponent((_, ctx: SetupContext<{ foo: [], bar: [] }>) => {}) + +defineComponent((_, ctx: SetupContext<{ 'foo:bar': [] }>) => {}) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/property-syntax/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/property-syntax/output.js new file mode 100644 index 0000000..da89ed5 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/property-syntax/output.js @@ -0,0 +1,17 @@ +import { defineComponent, type SetupContext } from 'vue'; +defineComponent((_, ctx: SetupContext<{ + foo: []; + bar: []; +}>)=>{}, { + emits: [ + "foo", + "bar" + ] +}); +defineComponent((_, ctx: SetupContext<{ + 'foo:bar': []; +}>)=>{}, { + emits: [ + "foo:bar" + ] +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-exported-fn-type/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-exported-fn-type/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-exported-fn-type/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-exported-fn-type/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-exported-fn-type/input.tsx new file mode 100644 index 0000000..b4d2a6e --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-exported-fn-type/input.tsx @@ -0,0 +1,5 @@ +import { defineComponent, type SetupContext } from 'vue' + +export type Emits = (e: 'foo' | 'bar') => void + +defineComponent((_, ctx: SetupContext) => {}) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-exported-fn-type/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-exported-fn-type/output.js new file mode 100644 index 0000000..457a657 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-exported-fn-type/output.js @@ -0,0 +1,8 @@ +import { defineComponent, type SetupContext } from 'vue'; +export type Emits = (e: 'foo' | 'bar') => void; +defineComponent((_, ctx: SetupContext)=>{}, { + emits: [ + "foo", + "bar" + ] +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-fn-type/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-fn-type/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-fn-type/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-fn-type/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-fn-type/input.tsx new file mode 100644 index 0000000..729919b --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-fn-type/input.tsx @@ -0,0 +1,5 @@ +import { defineComponent, type SetupContext } from 'vue' + +type Emits = (e: 'foo' | 'bar') => void + +defineComponent((_, ctx: SetupContext) => {}) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-fn-type/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-fn-type/output.js new file mode 100644 index 0000000..6d9e513 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/referenced-fn-type/output.js @@ -0,0 +1,8 @@ +import { defineComponent, type SetupContext } from 'vue'; +type Emits = (e: 'foo' | 'bar') => void; +defineComponent((_, ctx: SetupContext)=>{}, { + emits: [ + "foo", + "bar" + ] +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-alias/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-alias/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-alias/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-alias/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-alias/input.tsx new file mode 100644 index 0000000..51bbac6 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-alias/input.tsx @@ -0,0 +1,5 @@ +import { defineComponent, type SetupContext } from 'vue' + +type Emits = { (e: 'foo' | 'bar'): void } + +defineComponent((_, ctx: SetupContext) => {}) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-alias/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-alias/output.js new file mode 100644 index 0000000..3c6849e --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-alias/output.js @@ -0,0 +1,10 @@ +import { defineComponent, type SetupContext } from 'vue'; +type Emits = { + (e: 'foo' | 'bar') : void; +}; +defineComponent((_, ctx: SetupContext)=>{}, { + emits: [ + "foo", + "bar" + ] +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-references-in-union/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-references-in-union/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-references-in-union/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-references-in-union/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-references-in-union/input.tsx new file mode 100644 index 0000000..0303592 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-references-in-union/input.tsx @@ -0,0 +1,9 @@ +import { defineComponent, type SetupContext } from 'vue' + +type BaseEmit = "change" +type Emit = "some" | "emit" | BaseEmit + +defineComponent((_, ctx: SetupContext<{ + (e: Emit): void; + (e: "another", val: string): void; +}>) => {}) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-references-in-union/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-references-in-union/output.js new file mode 100644 index 0000000..315854d --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-emits-types/type-references-in-union/output.js @@ -0,0 +1,14 @@ +import { defineComponent, type SetupContext } from 'vue'; +type BaseEmit = "change"; +type Emit = "some" | "emit" | BaseEmit; +defineComponent((_, ctx: SetupContext<{ + (e: Emit) : void; + (e: "another", val: string) : void; +}>)=>{}, { + emits: [ + "some", + "emit", + "change", + "another" + ] +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/check-define-component/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/check-define-component/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/check-define-component/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/check-define-component/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/check-define-component/input.tsx new file mode 100644 index 0000000..42b75ac --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/check-define-component/input.tsx @@ -0,0 +1,7 @@ +function scope() { + function defineComponent() {} + + defineComponent((props: { msg: string }) => {}) +} + +defineComponent((props: { msg: string }) => {}) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/check-define-component/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/check-define-component/output.js new file mode 100644 index 0000000..2944ced --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/check-define-component/output.js @@ -0,0 +1,9 @@ +function scope() { + function defineComponent1() {} + defineComponent1((props: { + msg: string; + })=>{}); +} +defineComponent((props: { + msg: string; +})=>{}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/disabled/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/disabled/input.tsx new file mode 100644 index 0000000..3888274 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/disabled/input.tsx @@ -0,0 +1,7 @@ +import { defineComponent } from 'vue' + +type Props = { + foo: string +} + +defineComponent((props: Props) => {}) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/disabled/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/disabled/output.js new file mode 100644 index 0000000..3999007 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/disabled/output.js @@ -0,0 +1,5 @@ +import { defineComponent } from 'vue'; +type Props = { + foo: string; +}; +defineComponent((props: Props)=>{}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/function/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/function/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/function/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/function/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/function/input.tsx new file mode 100644 index 0000000..b54da35 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/function/input.tsx @@ -0,0 +1,21 @@ +import { defineComponent } from 'vue' + +defineComponent(({}: { + foo: number, +}) => { }) + +defineComponent(([]: { + foo: number, +}) => { }) + +defineComponent(function (props: { + foo: number, +}) { }) + +defineComponent(function ({}: { + foo: number, +}) { }) + +defineComponent(function ([]: { + foo: number, +}) { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/function/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/function/output.js new file mode 100644 index 0000000..8f01b1b --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/function/output.js @@ -0,0 +1,51 @@ +import { defineComponent } from 'vue'; +defineComponent(({}: { + foo: number; +})=>{}, { + props: { + foo: { + type: Number, + required: true + } + } +}); +defineComponent(([]: { + foo: number; +})=>{}, { + props: { + foo: { + type: Number, + required: true + } + } +}); +defineComponent(function(props: { + foo: number; +}) {}, { + props: { + foo: { + type: Number, + required: true + } + } +}); +defineComponent(function({}: { + foo: number; +}) {}, { + props: { + foo: { + type: Number, + required: true + } + } +}); +defineComponent(function([]: { + foo: number; +}) {}, { + props: { + foo: { + type: Number, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-advanced/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-advanced/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-advanced/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-advanced/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-advanced/input.tsx new file mode 100644 index 0000000..030fbf8 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-advanced/input.tsx @@ -0,0 +1,9 @@ +import { defineComponent } from 'vue' + +type K = 'foo' | 'bar' +interface T { foo: string, bar: number } +interface Foo { foo: T[string] } +interface Bar { bar: string } +interface S { foo: Foo, bar: Bar } + +defineComponent((props: S[K]) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-advanced/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-advanced/output.js new file mode 100644 index 0000000..7906d0a --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-advanced/output.js @@ -0,0 +1,31 @@ +import { defineComponent } from 'vue'; +type K = 'foo' | 'bar'; +interface T { + foo: string; + bar: number; +} +interface Foo { + foo: T[string]; +} +interface Bar { + bar: string; +} +interface S { + foo: Foo; + bar: Bar; +} +defineComponent((props: S[K])=>{}, { + props: { + foo: { + type: [ + String, + Number + ], + required: true + }, + bar: { + type: String, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-literal/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-literal/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-literal/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-literal/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-literal/input.tsx new file mode 100644 index 0000000..5defe97 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-literal/input.tsx @@ -0,0 +1,6 @@ +import { defineComponent } from 'vue' + +interface T { bar: number } +interface S { nested: { foo: T['bar'] }} + +defineComponent((props: S['nested']) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-literal/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-literal/output.js new file mode 100644 index 0000000..d00023b --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-interface-literal/output.js @@ -0,0 +1,17 @@ +import { defineComponent } from 'vue'; +interface T { + bar: number; +} +interface S { + nested: { + foo: T['bar']; + }; +} +defineComponent((props: S['nested'])=>{}, { + props: { + foo: { + type: Number, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-advanced/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-advanced/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-advanced/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-advanced/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-advanced/input.tsx new file mode 100644 index 0000000..e5076f0 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-advanced/input.tsx @@ -0,0 +1,7 @@ +import { defineComponent } from 'vue' + +type K = 'foo' | 'bar' +type T = { foo: string, bar: number } +type S = { foo: { foo: T[string] }, bar: { bar: string } } + +defineComponent((props: S[K]) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-advanced/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-advanced/output.js new file mode 100644 index 0000000..4a8b699 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-advanced/output.js @@ -0,0 +1,29 @@ +import { defineComponent } from 'vue'; +type K = 'foo' | 'bar'; +type T = { + foo: string; + bar: number; +}; +type S = { + foo: { + foo: T[string]; + }; + bar: { + bar: string; + }; +}; +defineComponent((props: S[K])=>{}, { + props: { + foo: { + type: [ + String, + Number + ], + required: true + }, + bar: { + type: String, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-literal/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-literal/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-literal/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-literal/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-literal/input.tsx new file mode 100644 index 0000000..84c54f0 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-literal/input.tsx @@ -0,0 +1,6 @@ +import { defineComponent } from 'vue' + +type T = { bar: number } +type S = { nested: { foo: T['bar'] }} + +defineComponent((props: S['nested']) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-literal/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-literal/output.js new file mode 100644 index 0000000..6d3b11e --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-literal/output.js @@ -0,0 +1,17 @@ +import { defineComponent } from 'vue'; +type T = { + bar: number; +}; +type S = { + nested: { + foo: T['bar']; + }; +}; +defineComponent((props: S['nested'])=>{}, { + props: { + foo: { + type: Number, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-number/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-number/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-number/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-number/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-number/input.tsx new file mode 100644 index 0000000..7723534 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-number/input.tsx @@ -0,0 +1,17 @@ +import { defineComponent } from 'vue' + +type A = (string | number)[] +type AA = Array +type T = [1, 'foo'] +type TT = [foo: 1, bar: 'foo'] +type Optional = [1?] + +defineComponent((props: { + foo: A[number], + bar: AA[number], + tuple: T[number], + tuple0: T[0], + tuple1: T[1], + namedTuple: TT[number], + optional: Optional[0], +}) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-number/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-number/output.js new file mode 100644 index 0000000..59cec8d --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/indexed-access-type-number/output.js @@ -0,0 +1,55 @@ +import { defineComponent } from 'vue'; +type A = (string | number)[]; +type AA = Array; +type T = [1, 'foo']; +type TT = [foo: 1, bar: 'foo']; +type Optional = [1?]; +defineComponent((props: { + foo: A[number]; + bar: AA[number]; + tuple: T[number]; + tuple0: T[0]; + tuple1: T[1]; + namedTuple: TT[number]; + optional: Optional[0]; +})=>{}, { + props: { + foo: { + type: [ + String, + Number + ], + required: true + }, + bar: { + type: String, + required: true + }, + tuple: { + type: [ + Number, + String + ], + required: true + }, + tuple0: { + type: Number, + required: true + }, + tuple1: { + type: String, + required: true + }, + namedTuple: { + type: [ + Number, + String + ], + required: true + }, + optional: { + type: Number, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/interface-merging/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/interface-merging/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/interface-merging/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/interface-merging/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/interface-merging/input.tsx new file mode 100644 index 0000000..4ecbc59 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/interface-merging/input.tsx @@ -0,0 +1,13 @@ +import { defineComponent } from 'vue' + +interface Foo { + a: string +} +interface Foo { + b: number +} + +defineComponent((props: { + foo: Foo['a'], + bar: Foo['b'], +}) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/interface-merging/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/interface-merging/output.js new file mode 100644 index 0000000..6653b13 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/interface-merging/output.js @@ -0,0 +1,22 @@ +import { defineComponent } from 'vue'; +interface Foo { + a: string; +} +interface Foo { + b: number; +} +defineComponent((props: { + foo: Foo['a']; + bar: Foo['b']; +})=>{}, { + props: { + foo: { + type: String, + required: true + }, + bar: { + type: Number, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/intersection-type/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/intersection-type/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/intersection-type/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/intersection-type/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/intersection-type/input.tsx new file mode 100644 index 0000000..14617b3 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/intersection-type/input.tsx @@ -0,0 +1,7 @@ +import { defineComponent } from 'vue' + +type Foo = { foo: number } +type Bar = { bar: string } +type Baz = { bar: string | boolean } + +defineComponent((props: { self: any } & Foo & Bar & Baz) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/intersection-type/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/intersection-type/output.js new file mode 100644 index 0000000..05627ee --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/intersection-type/output.js @@ -0,0 +1,31 @@ +import { defineComponent } from 'vue'; +type Foo = { + foo: number; +}; +type Bar = { + bar: string; +}; +type Baz = { + bar: string | boolean; +}; +defineComponent((props: { + self: any; +} & Foo & Bar & Baz)=>{}, { + props: { + self: { + type: null, + required: true + }, + foo: { + type: Number, + required: true + }, + bar: { + type: [ + String, + Boolean + ], + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/optional/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/optional/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/optional/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/optional/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/optional/input.tsx new file mode 100644 index 0000000..8608b9a --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/optional/input.tsx @@ -0,0 +1,10 @@ +import { defineComponent } from 'vue' + +defineComponent((props: { + foo?: number, // property + bar?(): void, // method + 'baz'?: string, // string literal key + + untyped1?, + untyped2?(), +}) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/optional/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/optional/output.js new file mode 100644 index 0000000..1ac9003 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/optional/output.js @@ -0,0 +1,31 @@ +import { defineComponent } from 'vue'; +defineComponent((props: { + foo?: number; + bar?(): void; + 'baz'?: string; + untyped1?; + untyped2?(); +})=>{}, { + props: { + foo: { + type: Number, + required: false + }, + bar: { + type: Function, + required: false + }, + 'baz': { + type: String, + required: false + }, + untyped1: { + type: null, + required: false + }, + untyped2: { + type: Function, + required: false + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/options-object/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/options-object/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/options-object/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/options-object/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/options-object/input.tsx new file mode 100644 index 0000000..032ed83 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/options-object/input.tsx @@ -0,0 +1,16 @@ +import { defineComponent } from 'vue' + +defineComponent((props: { + foo: number, +}) => { }, {}) + +// shouldn't be resolved +defineComponent((props: { + foo: number, +}) => { }, { + props: { + bar: { + type: String, + }, + }, +}) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/options-object/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/options-object/output.js new file mode 100644 index 0000000..0c2e335 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/options-object/output.js @@ -0,0 +1,21 @@ +import { defineComponent } from 'vue'; +defineComponent((props: { + foo: number; +})=>{}, { + props: { + foo: { + type: Number, + required: true + } + } +}); +// shouldn't be resolved +defineComponent((props: { + foo: number; +})=>{}, { + props: { + bar: { + type: String + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-class/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-class/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-class/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-class/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-class/input.tsx new file mode 100644 index 0000000..1659a68 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-class/input.tsx @@ -0,0 +1,5 @@ +import { defineComponent } from 'vue' + +class Foo {} + +defineComponent((props: { foo: Foo }) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-class/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-class/output.js new file mode 100644 index 0000000..e0038fc --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-class/output.js @@ -0,0 +1,13 @@ +import { defineComponent } from 'vue'; +class Foo { +} +defineComponent((props: { + foo: Foo; +})=>{}, { + props: { + foo: { + type: Object, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-interface/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-interface/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-interface/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-interface/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-interface/input.tsx new file mode 100644 index 0000000..11dd98a --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-interface/input.tsx @@ -0,0 +1,5 @@ +import { defineComponent } from 'vue' + +export interface Aliased { foo: number } + +defineComponent((props: Aliased) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-interface/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-interface/output.js new file mode 100644 index 0000000..116b527 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-interface/output.js @@ -0,0 +1,12 @@ +import { defineComponent } from 'vue'; +export interface Aliased { + foo: number; +} +defineComponent((props: Aliased)=>{}, { + props: { + foo: { + type: Number, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-type/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-type/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-type/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-type/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-type/input.tsx new file mode 100644 index 0000000..ec6287c --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-type/input.tsx @@ -0,0 +1,5 @@ +import { defineComponent } from 'vue' + +export type Aliased = { foo: number } + +defineComponent((props: Aliased) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-type/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-type/output.js new file mode 100644 index 0000000..efa7dd5 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-exported-type/output.js @@ -0,0 +1,12 @@ +import { defineComponent } from 'vue'; +export type Aliased = { + foo: number; +}; +defineComponent((props: Aliased)=>{}, { + props: { + foo: { + type: Number, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface-extends/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface-extends/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface-extends/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface-extends/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface-extends/input.tsx new file mode 100644 index 0000000..e5ec12b --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface-extends/input.tsx @@ -0,0 +1,8 @@ +import { defineComponent } from 'vue' + +export interface A { a(): void } +export interface B extends A { b: boolean } +interface C { c: string } +interface Aliased extends B, C { foo: number } + +defineComponent((props: Aliased) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface-extends/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface-extends/output.js new file mode 100644 index 0000000..4d3bf16 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface-extends/output.js @@ -0,0 +1,33 @@ +import { defineComponent } from 'vue'; +export interface A { + a(): void; +} +export interface B extends A { + b: boolean; +} +interface C { + c: string; +} +interface Aliased extends B, C { + foo: number; +} +defineComponent((props: Aliased)=>{}, { + props: { + foo: { + type: Number, + required: true + }, + b: { + type: Boolean, + required: true + }, + a: { + type: Function, + required: true + }, + c: { + type: String, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface/input.tsx new file mode 100644 index 0000000..a95a816 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface/input.tsx @@ -0,0 +1,7 @@ +import { defineComponent } from 'vue' + +interface Aliased { foo: number } + +defineComponent((props: Aliased) => { }) + +defineComponent((props: (Aliased)) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface/output.js new file mode 100644 index 0000000..b9b8e7f --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-interface/output.js @@ -0,0 +1,20 @@ +import { defineComponent } from 'vue'; +interface Aliased { + foo: number; +} +defineComponent((props: Aliased)=>{}, { + props: { + foo: { + type: Number, + required: true + } + } +}); +defineComponent((props: (Aliased))=>{}, { + props: { + foo: { + type: Number, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-type/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-type/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-type/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-type/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-type/input.tsx new file mode 100644 index 0000000..da9e0c8 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-type/input.tsx @@ -0,0 +1,5 @@ +import { defineComponent } from 'vue' + +type Aliased = { foo: number } + +defineComponent((props: Aliased) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-type/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-type/output.js new file mode 100644 index 0000000..cd7a921 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/reference-type/output.js @@ -0,0 +1,12 @@ +import { defineComponent } from 'vue'; +type Aliased = { + foo: number; +}; +defineComponent((props: Aliased)=>{}, { + props: { + foo: { + type: Number, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/runtime-types/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/runtime-types/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/runtime-types/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/runtime-types/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/runtime-types/input.tsx new file mode 100644 index 0000000..df342ef --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/runtime-types/input.tsx @@ -0,0 +1,91 @@ +import { defineComponent } from 'vue' + +type FunctionType = { + (): void +} +type ObjectType = { + foo: string +} +type MixedType = { + foo: string + (): void +} + +interface FunctionInterface { + (): void +} +interface ObjectInterface { + foo: string +} +interface MixedInterface { + foo: string + (): void +} + +defineComponent((props: { + a: string + b: number + c: boolean + d: object + e: null + f: bigint + g: symbol + h: any + i: () => void + j: new () => object + k: string[] + l: Array + m: [string, number] + n: 'literal' + o: 123 + p: 123n + q: true + r: FunctionType + s: ObjectType + t: MixedType + u: FunctionInterface + v: ObjectInterface + w: MixedInterface +}) => { }) + +defineComponent((props: { + function: Function, + object: Object, + set: Set, + map: Map, + weakSet: WeakSet, + weakMap: WeakMap, + date: Date, + promise: Promise, + error: Error, + regexp: RegExp, +}) => { }) + +defineComponent((props: { + partial: Partial<{ foo: string }>, + required: Required<{ foo?: string }>, + readonly: Readonly<{ foo: string }>, + record: Record, + pick: Pick<{ foo: string, bar: number }, 'foo'>, + omit: Omit<{ foo: string, bar: number }, 'foo'>, + instance: InstanceType, +}) => { }) + +defineComponent((props: { + uppercase: Uppercase<'foo'>, + lowercase: Lowercase<'FOO'>, + capitalize: Capitalize<'foo'>, + uncapitalize: Uncapitalize<'FOO'>, +}) => { }) + +defineComponent((props: { + parameters: Parameters<() => void>, + constructorParameters: ConstructorParameters, +}) => { }) + +defineComponent((props: { + nonNullable: NonNullable, + exclude: Exclude, + extract: Extract, + omitThisParameter: OmitThisParameter<(this: string) => void>, +}) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/runtime-types/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/runtime-types/output.js new file mode 100644 index 0000000..ed8d7ab --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/runtime-types/output.js @@ -0,0 +1,323 @@ +import { defineComponent } from 'vue'; +type FunctionType = { + () : void; +}; +type ObjectType = { + foo: string; +}; +type MixedType = { + foo: string; + () : void; +}; +interface FunctionInterface { + () : void; +} +interface ObjectInterface { + foo: string; +} +interface MixedInterface { + foo: string; + () : void; +} +defineComponent((props: { + a: string; + b: number; + c: boolean; + d: object; + e: null; + f: bigint; + g: symbol; + h: any; + i: () => void; + j: new() => object; + k: string[]; + l: Array; + m: [string, number]; + n: 'literal'; + o: 123; + p: 123n; + q: true; + r: FunctionType; + s: ObjectType; + t: MixedType; + u: FunctionInterface; + v: ObjectInterface; + w: MixedInterface; +})=>{}, { + props: { + a: { + type: String, + required: true + }, + b: { + type: Number, + required: true + }, + c: { + type: Boolean, + required: true + }, + d: { + type: Object, + required: true + }, + e: { + type: null, + required: true + }, + f: { + type: BigInt, + required: true + }, + g: { + type: Symbol, + required: true + }, + h: { + type: null, + required: true + }, + i: { + type: Function, + required: true + }, + j: { + type: Function, + required: true + }, + k: { + type: Array, + required: true + }, + l: { + type: Array, + required: true + }, + m: { + type: Array, + required: true + }, + n: { + type: String, + required: true + }, + o: { + type: Number, + required: true + }, + p: { + type: Number, + required: true + }, + q: { + type: Boolean, + required: true + }, + r: { + type: Function, + required: true + }, + s: { + type: Object, + required: true + }, + t: { + type: [ + Object, + Function + ], + required: true + }, + u: { + type: Function, + required: true + }, + v: { + type: Object, + required: true + }, + w: { + type: [ + Object, + Function + ], + required: true + } + } +}); +defineComponent((props: { + function: Function; + object: Object; + set: Set; + map: Map; + weakSet: WeakSet; + weakMap: WeakMap; + date: Date; + promise: Promise; + error: Error; + regexp: RegExp; +})=>{}, { + props: { + function: { + type: Function, + required: true + }, + object: { + type: Object, + required: true + }, + set: { + type: Set, + required: true + }, + map: { + type: Map, + required: true + }, + weakSet: { + type: WeakSet, + required: true + }, + weakMap: { + type: WeakMap, + required: true + }, + date: { + type: Date, + required: true + }, + promise: { + type: Promise, + required: true + }, + error: { + type: Error, + required: true + }, + regexp: { + type: RegExp, + required: true + } + } +}); +defineComponent((props: { + partial: Partial<{ + foo: string; + }>; + required: Required<{ + foo?: string; + }>; + readonly: Readonly<{ + foo: string; + }>; + record: Record; + pick: Pick<{ + foo: string; + bar: number; + }, 'foo'>; + omit: Omit<{ + foo: string; + bar: number; + }, 'foo'>; + instance: InstanceType; +})=>{}, { + props: { + partial: { + type: Object, + required: true + }, + required: { + type: Object, + required: true + }, + readonly: { + type: Object, + required: true + }, + record: { + type: Object, + required: true + }, + pick: { + type: Object, + required: true + }, + omit: { + type: Object, + required: true + }, + instance: { + type: Object, + required: true + } + } +}); +defineComponent((props: { + uppercase: Uppercase<'foo'>; + lowercase: Lowercase<'FOO'>; + capitalize: Capitalize<'foo'>; + uncapitalize: Uncapitalize<'FOO'>; +})=>{}, { + props: { + uppercase: { + type: String, + required: true + }, + lowercase: { + type: String, + required: true + }, + capitalize: { + type: String, + required: true + }, + uncapitalize: { + type: String, + required: true + } + } +}); +defineComponent((props: { + parameters: Parameters<() => void>; + constructorParameters: ConstructorParameters; +})=>{}, { + props: { + parameters: { + type: Array, + required: true + }, + constructorParameters: { + type: Array, + required: true + } + } +}); +defineComponent((props: { + nonNullable: NonNullable; + exclude: Exclude; + extract: Extract; + omitThisParameter: OmitThisParameter<(this: string) => void>; +})=>{}, { + props: { + nonNullable: { + type: String, + required: true + }, + exclude: { + type: [ + String, + Number, + Boolean + ], + required: true + }, + extract: { + type: Boolean, + required: true + }, + omitThisParameter: { + type: Function, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/scope/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/scope/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/scope/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/scope/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/scope/input.tsx new file mode 100644 index 0000000..90b8c45 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/scope/input.tsx @@ -0,0 +1,15 @@ +import { defineComponent } from 'vue' + +type Props = { + foo: string +} + +function scope() { + type Props = { + bar: number + } + + defineComponent((props: Props) => {}) +} + +defineComponent((props: Props) => {}) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/scope/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/scope/output.js new file mode 100644 index 0000000..d885dfa --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/scope/output.js @@ -0,0 +1,25 @@ +import { defineComponent } from 'vue'; +type Props = { + foo: string; +}; +function scope() { + type Props = { + bar: number; + }; + defineComponent((props: Props)=>{}, { + props: { + bar: { + type: Number, + required: true + } + } + }); +} +defineComponent((props: Props)=>{}, { + props: { + foo: { + type: String, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/type-literal/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/type-literal/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/type-literal/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/type-literal/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/type-literal/input.tsx new file mode 100644 index 0000000..cfde591 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/type-literal/input.tsx @@ -0,0 +1,14 @@ +import { defineComponent } from 'vue' + +defineComponent((props: { + foo: number, // property + bar(): void, // method + 'baz': string, // string literal key + get qux(): number, // getter + (e: 'foo'): void, // call signature + (e: 'bar'): void, + + untyped1, + get untyped2(), + untyped3(), +}) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/type-literal/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/type-literal/output.js new file mode 100644 index 0000000..aeaf609 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/type-literal/output.js @@ -0,0 +1,43 @@ +import { defineComponent } from 'vue'; +defineComponent((props: { + foo: number; + bar(): void; + 'baz': string; + get qux(): number; + (e: 'foo') : void; + (e: 'bar') : void; + untyped1; + get untyped2(); + untyped3(); +})=>{}, { + props: { + foo: { + type: Number, + required: true + }, + bar: { + type: Function, + required: true + }, + 'baz': { + type: String, + required: true + }, + qux: { + type: Number, + required: true + }, + untyped1: { + type: null, + required: true + }, + untyped2: { + type: null, + required: true + }, + untyped3: { + type: Function, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/union-type/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/union-type/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/union-type/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/union-type/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/union-type/input.tsx new file mode 100644 index 0000000..c96de52 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/union-type/input.tsx @@ -0,0 +1,18 @@ +import { defineComponent } from 'vue' + +interface CommonProps { + size?: 'xl' | 'l' | 'm' | 's' | 'xs' +} + +type ConditionalProps = + | { + color: 'normal' | 'primary' | 'secondary' + appearance: 'normal' | 'outline' | 'text' + } + | { + color: number + appearance: 'outline' + note: string + } + +defineComponent((props: CommonProps & ConditionalProps) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/union-type/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/union-type/output.js new file mode 100644 index 0000000..e12f597 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/union-type/output.js @@ -0,0 +1,35 @@ +import { defineComponent } from 'vue'; +interface CommonProps { + size?: 'xl' | 'l' | 'm' | 's' | 'xs'; +} +type ConditionalProps = { + color: 'normal' | 'primary' | 'secondary'; + appearance: 'normal' | 'outline' | 'text'; +} | { + color: number; + appearance: 'outline'; + note: string; +}; +defineComponent((props: CommonProps & ConditionalProps)=>{}, { + props: { + size: { + type: String, + required: false + }, + color: { + type: [ + String, + Number + ], + required: true + }, + appearance: { + type: String, + required: true + }, + note: { + type: String, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-omit/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-omit/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-omit/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-omit/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-omit/input.tsx new file mode 100644 index 0000000..5531f66 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-omit/input.tsx @@ -0,0 +1,6 @@ +import { defineComponent } from 'vue' + +type T = { foo: number, bar: string, baz: boolean } +type K = 'foo' | 'bar' + +defineComponent((props: Omit) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-omit/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-omit/output.js new file mode 100644 index 0000000..90b2a43 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-omit/output.js @@ -0,0 +1,15 @@ +import { defineComponent } from 'vue'; +type T = { + foo: number; + bar: string; + baz: boolean; +}; +type K = 'foo' | 'bar'; +defineComponent((props: Omit)=>{}, { + props: { + baz: { + type: Boolean, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-partial/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-partial/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-partial/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-partial/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-partial/input.tsx new file mode 100644 index 0000000..96d28fa --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-partial/input.tsx @@ -0,0 +1,5 @@ +import { defineComponent } from 'vue' + +type T = { foo: number, bar: string } + +defineComponent((props: Partial) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-partial/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-partial/output.js new file mode 100644 index 0000000..8740bb1 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-partial/output.js @@ -0,0 +1,17 @@ +import { defineComponent } from 'vue'; +type T = { + foo: number; + bar: string; +}; +defineComponent((props: Partial)=>{}, { + props: { + foo: { + type: Number, + required: false + }, + bar: { + type: String, + required: false + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-pick/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-pick/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-pick/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-pick/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-pick/input.tsx new file mode 100644 index 0000000..308a27d --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-pick/input.tsx @@ -0,0 +1,6 @@ +import { defineComponent } from 'vue' + +type T = { foo: number, bar: string, baz: boolean } +type K = 'foo' | 'bar' + +defineComponent((props: Pick) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-pick/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-pick/output.js new file mode 100644 index 0000000..750fd8e --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-pick/output.js @@ -0,0 +1,19 @@ +import { defineComponent } from 'vue'; +type T = { + foo: number; + bar: string; + baz: boolean; +}; +type K = 'foo' | 'bar'; +defineComponent((props: Pick)=>{}, { + props: { + foo: { + type: Number, + required: true + }, + bar: { + type: String, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-required/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-required/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-required/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-required/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-required/input.tsx new file mode 100644 index 0000000..40d6ba1 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-required/input.tsx @@ -0,0 +1,5 @@ +import { defineComponent } from 'vue' + +type T = { foo?: number, bar?: string } + +defineComponent((props: Required) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-required/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-required/output.js new file mode 100644 index 0000000..7529eec --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/utility-type-required/output.js @@ -0,0 +1,17 @@ +import { defineComponent } from 'vue'; +type T = { + foo?: number; + bar?: string; +}; +defineComponent((props: Required)=>{}, { + props: { + foo: { + type: Number, + required: true + }, + bar: { + type: String, + required: true + } + } +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/with-defaults/config.json b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/with-defaults/config.json new file mode 100644 index 0000000..46eaaca --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/with-defaults/config.json @@ -0,0 +1,3 @@ +{ + "resolveType": true +} diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/with-defaults/input.tsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/with-defaults/input.tsx new file mode 100644 index 0000000..e552464 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/with-defaults/input.tsx @@ -0,0 +1,44 @@ +import { defineComponent } from 'vue' +import { defaults } from './foo' + +defineComponent((props: { + foo?: string, + bar?: number, + baz: boolean, + qux?(): number, + quux?(): void, + quuxx?: Promise, + fred?: string, +} = { + foo: 'hi', + qux() { + return 1 + }, + ['quux']() { }, + async quuxx() { + return await Promise.resolve('hi') + }, + get fred() { + return 'fred' + }, + }) => { }) + +defineComponent((props: { + foo?: string, + bar?: number, + baz: boolean, +} = { ...defaults }) => { }) + +defineComponent((props: { + foo?: string, + bar?: number, + baz: boolean, +} = defaults) => { }) + +defineComponent((props: { + foo?: () => 'string', +} = { + ['fo' + 'o']() { + return 'foo' + }, + }) => { }) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/with-defaults/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/with-defaults/output.js new file mode 100644 index 0000000..3f0a4e2 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/resolve-props-types/with-defaults/output.js @@ -0,0 +1,128 @@ +import { mergeDefaults as _mergeDefaults } from "vue"; +import { defineComponent } from 'vue'; +import { defaults } from './foo'; +defineComponent((props: { + foo?: string; + bar?: number; + baz: boolean; + qux?(): number; + quux?(): void; + quuxx?: Promise; + fred?: string; +} = { + foo: 'hi', + qux () { + return 1; + }, + ['quux'] () {}, + async quuxx () { + return await Promise.resolve('hi'); + }, + get fred () { + return 'fred'; + } +})=>{}, { + props: { + foo: { + type: String, + required: false, + default: 'hi' + }, + bar: { + type: Number, + required: false + }, + baz: { + type: Boolean, + required: true + }, + qux: { + type: Function, + required: false, + default: function() { + return 1; + } + }, + quux: { + type: Function, + required: false, + default: function() {} + }, + quuxx: { + type: Promise, + required: false, + default: async function() { + return await Promise.resolve('hi'); + } + }, + fred: { + type: String, + required: false, + default: ()=>{ + return 'fred'; + } + } + } +}); +defineComponent((props: { + foo?: string; + bar?: number; + baz: boolean; +} = { + ...defaults +})=>{}, { + props: /*#__PURE__*/ _mergeDefaults({ + foo: { + type: String, + required: false + }, + bar: { + type: Number, + required: false + }, + baz: { + type: Boolean, + required: true + } + }, { + ...defaults + }) +}); +defineComponent((props: { + foo?: string; + bar?: number; + baz: boolean; +} = defaults)=>{}, { + props: /*#__PURE__*/ _mergeDefaults({ + foo: { + type: String, + required: false + }, + bar: { + type: Number, + required: false + }, + baz: { + type: Boolean, + required: true + } + }, defaults) +}); +defineComponent((props: { + foo?: () => 'string'; +} = { + ['fo' + 'o'] () { + return 'foo'; + } +})=>{}, { + props: /*#__PURE__*/ _mergeDefaults({ + foo: { + type: Function, + required: false + } + }, { + ['fo' + 'o'] () { + return 'foo'; + } + }) +}); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/single-attr/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/single-attr/input.jsx new file mode 100644 index 0000000..e099411 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/single-attr/input.jsx @@ -0,0 +1 @@ +
single
diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/single-attr/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/single-attr/output.js new file mode 100644 index 0000000..5a3c502 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/single-attr/output.js @@ -0,0 +1,2 @@ +import { createTextVNode as _createTextVNode, createVNode as _createVNode } from "vue"; +_createVNode("div", x, [_createTextVNode("single")], 16); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/slot-in-arrow-function-bug/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/slot-in-arrow-function-bug/input.jsx new file mode 100644 index 0000000..01e49e5 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/slot-in-arrow-function-bug/input.jsx @@ -0,0 +1,17 @@ +const Component = (row) => ( + + + {t('text1')} + + + {t('text2')} + + + {t('text3')} + + +) diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/slot-in-arrow-function-bug/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/slot-in-arrow-function-bug/output.js new file mode 100644 index 0000000..7de5531 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/slot-in-arrow-function-bug/output.js @@ -0,0 +1,46 @@ +import { createVNode as _createVNode, isVNode as _isVNode, resolveComponent as _resolveComponent } from "vue"; +function _isSlot(s) { + return typeof s === "function" || ({}).toString.call(s) === "[object Object]" && !_isVNode(s); +} +const Component = (row)=>{ + let _slot, _slot2, _slot3; + return _createVNode(_resolveComponent("NSpace"), null, { + default: ()=>[ + _createVNode(_resolveComponent("NButton"), { + "type": "primary", + "secondary": true, + "onClick": handler1 + }, _isSlot(_slot = t('text1')) ? _slot : { + default: ()=>[ + _slot + ], + _: 1 + }, 8, [ + "secondary", + "onClick" + ]), + _createVNode(_resolveComponent("NButton"), { + "onClick": handler2 + }, _isSlot(_slot2 = t('text2')) ? _slot2 : { + default: ()=>[ + _slot2 + ], + _: 1 + }, 8, [ + "onClick" + ]), + _createVNode(_resolveComponent("NButton"), { + "type": "error", + "onClick": handler3 + }, _isSlot(_slot3 = t('text3')) ? _slot3 : { + default: ()=>[ + _slot3 + ], + _: 1 + }, 8, [ + "onClick" + ]) + ], + _: 1 + }); +}; diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/specifiers-merged-into-single-import-decl/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/specifiers-merged-into-single-import-decl/input.jsx new file mode 100644 index 0000000..491633b --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/specifiers-merged-into-single-import-decl/input.jsx @@ -0,0 +1,4 @@ +import { createVNode, Fragment as _Fragment } from 'vue'; +import { vShow } from 'vue' + +<_Fragment /> diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/specifiers-merged-into-single-import-decl/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/specifiers-merged-into-single-import-decl/output.js new file mode 100644 index 0000000..e66cfd1 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/specifiers-merged-into-single-import-decl/output.js @@ -0,0 +1,4 @@ +import { createVNode as _createVNode } from "vue"; +import { createVNode, Fragment as _Fragment } from 'vue'; +import { vShow } from 'vue'; +_createVNode(_Fragment, null, null); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-html/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-html/input.jsx new file mode 100644 index 0000000..9dfc7c7 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-html/input.jsx @@ -0,0 +1 @@ +

diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-html/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-html/output.js new file mode 100644 index 0000000..a26721f --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-html/output.js @@ -0,0 +1,4 @@ +import { createVNode as _createVNode } from "vue"; +_createVNode("h1", { + "innerHTML": "
foo
" +}, null, 8, ["innerHTML"]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-value-supports-variable/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-value-supports-variable/input.jsx new file mode 100644 index 0000000..69ddcd3 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-value-supports-variable/input.jsx @@ -0,0 +1,13 @@ +const foo = 'foo'; + +const a = () => 'a'; + +const b = { c: 'c' }; +<> + + + + + + + diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-value-supports-variable/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-value-supports-variable/output.js new file mode 100644 index 0000000..4523fc3 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-value-supports-variable/output.js @@ -0,0 +1,42 @@ +import { Fragment as _Fragment, createVNode as _createVNode, resolveComponent as _resolveComponent } from "vue"; +const foo = 'foo'; +const a = () => 'a'; +const b = { + c: 'c' +}; +_createVNode(_Fragment, null, [ + _createVNode(_resolveComponent("A"), { [foo]: xx, ["onUpdate" + foo]: $event => xx = $event }, null, 16), + _createVNode(_resolveComponent("B"), { + "modelValue": xx, + "modelModifiers": { "a": true }, + "onUpdate:modelValue": $event => xx = $event, + }, null, 8, ["modelValue", "onUpdate:modelValue"]), + _createVNode(_resolveComponent("C"), { + [foo]: xx, + [foo + "Modifiers"]: { + "a": true + }, + ["onUpdate" + foo]: $event => xx = $event, + }, null, 16), + _createVNode(_resolveComponent("D"), { + [foo === 'foo' ? 'a' : 'b']: xx, + [(foo === 'foo' ? 'a' : 'b') + "Modifiers"]: { + "a": true + }, + ["onUpdate" + (foo === 'foo' ? 'a' : 'b')]: $event => xx = $event, + }, null, 16), + _createVNode(_resolveComponent("E"), { + [a()]: xx, + [a() + "Modifiers"]: { + "a": true + }, + ["onUpdate" + a()]: $event => xx = $event + }, null, 16), + _createVNode(_resolveComponent("F"), { + [b.c]: xx, + [b.c + "Modifiers"]: { + "a": true + }, + ["onUpdate" + b.c]: $event => xx = $event + }, null, 16), +]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-arg-and-modifier/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-arg-and-modifier/input.jsx new file mode 100644 index 0000000..28aa3c8 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-arg-and-modifier/input.jsx @@ -0,0 +1 @@ + diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-arg-and-modifier/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-arg-and-modifier/output.js new file mode 100644 index 0000000..2728559 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-arg-and-modifier/output.js @@ -0,0 +1,11 @@ +import { createVNode as _createVNode, resolveComponent as _resolveComponent } from "vue"; +_createVNode(_resolveComponent("Child"), { + "value": this.foo, + "valueModifiers": { + "double": true + }, + "onUpdate:value": ($event)=>this.foo = $event +}, null, 8, [ + "value", + "onUpdate:value" +]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-checkbox/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-checkbox/input.jsx new file mode 100644 index 0000000..248df3e --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-checkbox/input.jsx @@ -0,0 +1 @@ + diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-checkbox/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-checkbox/output.js new file mode 100644 index 0000000..a7b29c5 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-checkbox/output.js @@ -0,0 +1,5 @@ +import { createVNode as _createVNode, vModelCheckbox as _vModelCheckbox, withDirectives as _withDirectives } from "vue"; +_withDirectives(_createVNode("input", { + "type": "checkbox", + "onUpdate:modelValue": $event => test = $event +}, null, 8, ["onUpdate:modelValue"]), [[_vModelCheckbox, test]]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-dynamic-type-input/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-dynamic-type-input/input.jsx new file mode 100644 index 0000000..e672d8a --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-dynamic-type-input/input.jsx @@ -0,0 +1 @@ + diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-dynamic-type-input/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-dynamic-type-input/output.js new file mode 100644 index 0000000..d25b596 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-dynamic-type-input/output.js @@ -0,0 +1,5 @@ +import { createVNode as _createVNode, vModelDynamic as _vModelDynamic, withDirectives as _withDirectives } from "vue"; +_withDirectives(_createVNode("input", { + "type": type, + "onUpdate:modelValue": $event => test = $event +}, null, 8, ["type", "onUpdate:modelValue"]), [[_vModelDynamic, test]]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-input-lazy-modifier/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-input-lazy-modifier/input.jsx new file mode 100644 index 0000000..be55a2c --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-input-lazy-modifier/input.jsx @@ -0,0 +1 @@ + diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-input-lazy-modifier/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-input-lazy-modifier/output.js new file mode 100644 index 0000000..f10f6f2 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-input-lazy-modifier/output.js @@ -0,0 +1,6 @@ +import { createVNode as _createVNode, vModelText as _vModelText, withDirectives as _withDirectives } from "vue"; +_withDirectives(_createVNode("input", { + "onUpdate:modelValue": $event => test = $event +}, null, 8, ["onUpdate:modelValue"]), [[_vModelText, test, void 0, { + lazy: true +}]]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-radio/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-radio/input.jsx new file mode 100644 index 0000000..356b722 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-radio/input.jsx @@ -0,0 +1,4 @@ +<> + + + diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-radio/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-radio/output.js new file mode 100644 index 0000000..bc2d4d2 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-radio/output.js @@ -0,0 +1,12 @@ +import { Fragment as _Fragment, createVNode as _createVNode, vModelRadio as _vModelRadio, withDirectives as _withDirectives } from "vue"; +_createVNode(_Fragment, null, [_withDirectives(_createVNode("input", { + "type": "radio", + "value": "1", + "onUpdate:modelValue": $event => test = $event, + "name": "test" +}, null, 8, ["onUpdate:modelValue"]), [[_vModelRadio, test]]), _withDirectives(_createVNode("input", { + "type": "radio", + "value": "2", + "onUpdate:modelValue": $event => test = $event, + "name": "test" +}, null, 8, ["onUpdate:modelValue"]), [[_vModelRadio, test]])]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-select/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-select/input.jsx new file mode 100644 index 0000000..6f1516c --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-select/input.jsx @@ -0,0 +1,5 @@ + diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-select/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-select/output.js new file mode 100644 index 0000000..ec2d6ac --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-select/output.js @@ -0,0 +1,15 @@ +import { + createTextVNode as _createTextVNode, + createVNode as _createVNode, + vModelSelect as _vModelSelect, + withDirectives as _withDirectives, +} from "vue"; +_withDirectives(_createVNode("select", { + "onUpdate:modelValue": $event => test = $event +}, [_createVNode("option", { + "value": "1" +}, [_createTextVNode("a")]), _createVNode("option", { + "value": 2 +}, [_createTextVNode("b")]), _createVNode("option", { + "value": 3 +}, [_createTextVNode("c")])], 8, ["onUpdate:modelValue"]), [[_vModelSelect, test]]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-text-input/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-text-input/input.jsx new file mode 100644 index 0000000..2052a0c --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-text-input/input.jsx @@ -0,0 +1 @@ + diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-text-input/output.js b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-text-input/output.js new file mode 100644 index 0000000..ce8e4d4 --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-text-input/output.js @@ -0,0 +1,4 @@ +import { createVNode as _createVNode, vModelText as _vModelText, withDirectives as _withDirectives } from "vue"; +_withDirectives(_createVNode("input", { + "onUpdate:modelValue": $event => test = $event +}, null, 8, ["onUpdate:modelValue"]), [[_vModelText, test]]); diff --git a/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-textarea/input.jsx b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-textarea/input.jsx new file mode 100644 index 0000000..72e35bf --- /dev/null +++ b/rust-plugins/vue-jsx/crates/visitor/tests/fixture/v-model-with-textarea/input.jsx @@ -0,0 +1 @@ +