├── .cargo └── config ├── .github ├── ISSUE_TEMPLATE │ └── bug_report.yml └── workflows │ ├── cargo.yml │ └── publish.yml ├── .gitignore ├── .husky └── pre-commit ├── .kodiak.toml ├── .prettierrc.json ├── Cargo.lock ├── Cargo.toml ├── README.md ├── package.json ├── rust-toolchain ├── src ├── app.rs ├── lib.rs ├── page.rs └── utils.rs ├── tests ├── fixture.rs └── fixture │ ├── app │ ├── children │ │ ├── code.js │ │ └── output.js │ ├── general │ │ ├── code.js │ │ └── output.js │ └── member │ │ ├── code.js │ │ └── output.js │ └── page │ ├── skip │ ├── either-is-missing │ │ ├── page │ │ │ ├── code.js │ │ │ └── output.js │ │ └── ssg_props │ │ │ ├── code.js │ │ │ └── output.js │ ├── export-from │ │ ├── code.js │ │ └── output.js │ ├── gip-in-app-js │ │ ├── code.js │ │ └── output.js │ └── multiple-exports │ │ ├── init-and-other │ │ ├── code.js │ │ └── output.js │ │ └── init-and-others │ │ ├── code.js │ │ └── output.js │ └── transform │ ├── export-from │ ├── page │ │ ├── code.js │ │ └── output.js │ └── props │ │ ├── code.js │ │ └── output.js │ ├── general │ ├── arrow │ │ ├── code.js │ │ └── output.js │ ├── class │ │ ├── code.js │ │ └── output.js │ └── function │ │ ├── code.js │ │ └── output.js │ ├── get-initial-props │ ├── class │ │ ├── code.js │ │ └── output.js │ ├── function-export-page-first │ │ ├── code.js │ │ └── output.js │ └── function │ │ ├── code.js │ │ └── output.js │ ├── get-static-props-with-paths │ ├── code.js │ └── output.js │ ├── import-export │ ├── code.js │ └── output.js │ └── mutable │ ├── code.js │ └── output.js ├── tools ├── client.tsx └── tools.tsx ├── tsconfig.json └── yarn.lock /.cargo/config: -------------------------------------------------------------------------------- 1 | # These command aliases are not final, may change 2 | [alias] 3 | # Alias to build actual plugin binary for the specified target. 4 | prepublish = "build --target wasm32-wasi" -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: Use this when the plugin breaks something 3 | labels: bug 4 | body: 5 | - type: checkboxes 6 | attributes: 7 | label: Verify Next.js canary release 8 | description: '`next@canary` is the canary version of Next.js that ships daily. It includes all features and fixes that have not been released to the stable version yet. Think of canary as a public beta. Some issues may already be fixed in the canary version, so please verify that your issue reproduces before opening a new issue.' 9 | options: 10 | - label: I verified that the issue exists in the latest Next.js canary release 11 | required: true 12 | - type: textarea 13 | id: description 14 | attributes: 15 | label: Describe the bug 16 | description: | 17 | Explain both the bug and how to reproduce it. 18 | Also, you can put the error logs on here. 19 | validations: 20 | required: true 21 | - type: textarea 22 | id: expected-behavior 23 | attributes: 24 | label: Expected behavior 25 | description: A clear and concise description of what you expect to happen. 26 | validations: 27 | required: true 28 | - type: input 29 | id: repro-link 30 | attributes: 31 | label: Reproduction link 32 | description: Leave URL of the repository or playground if it exists 33 | - type: input 34 | id: version 35 | attributes: 36 | label: Version 37 | validations: 38 | required: true 39 | - type: textarea 40 | id: config 41 | attributes: 42 | label: Config 43 | description: Paste your plugin options in `next.confing.js` here. 44 | render: javascript 45 | - type: textarea 46 | id: addition 47 | attributes: 48 | label: Additional context 49 | placeholder: Add any other context about the problem here. 50 | -------------------------------------------------------------------------------- /.github/workflows/cargo.yml: -------------------------------------------------------------------------------- 1 | name: Cargo 2 | 3 | on: 4 | push: 5 | branches: [canary] 6 | paths: 7 | - 'src/**' 8 | - 'tests/**' 9 | - '.cargo/**' 10 | - 'Cargo.*' 11 | - '.github/workflows/**' 12 | pull_request: 13 | paths: 14 | - 'src/**' 15 | - 'tests/**' 16 | - '.cargo/**' 17 | - 'Cargo.*' 18 | - '.github/workflows/**' 19 | 20 | env: 21 | RUST_LOG: debug 22 | CARGO_INCREMENTAL: 0 23 | CI: "1" 24 | 25 | jobs: 26 | test: 27 | strategy: 28 | fail-fast: false 29 | matrix: 30 | os: [ubuntu-latest, windows-latest] 31 | 32 | name: Test - ${{ matrix.os }} 33 | runs-on: ${{ matrix.os }} 34 | steps: 35 | - name: Handle line endings 36 | shell: bash 37 | if: runner.os == 'Windows' 38 | run: | 39 | git config --system core.autocrlf false 40 | git config --system core.eol lf 41 | - uses: actions/checkout@v2 42 | with: 43 | submodules: true 44 | 45 | - name: Setup node 46 | uses: actions/setup-node@v2 47 | with: 48 | node-version: 16 49 | 50 | - name: Install Rust 51 | uses: actions-rs/toolchain@v1 52 | with: 53 | profile: minimal 54 | override: true 55 | 56 | - name: Configure path (windows) 57 | shell: bash 58 | if: runner.os == 'Windows' 59 | run: | 60 | echo 'C:\\npm\\prefix' >> $GITHUB_PATH 61 | - name: Cache 62 | uses: actions/cache@v2 63 | with: 64 | path: | 65 | ~/.cargo/ 66 | key: cargo-dev-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} 67 | restore-keys: | 68 | cargo-dev-${{ runner.os }} 69 | - name: Run cargo test 70 | run: | 71 | cargo test --all --color always 72 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*' 7 | 8 | env: 9 | RUST_LOG: debug 10 | CARGO_INCREMENTAL: 0 11 | 12 | jobs: 13 | build: 14 | name: Build 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v2 18 | with: 19 | submodules: true 20 | 21 | - name: Setup node 22 | uses: actions/setup-node@v2 23 | with: 24 | node-version: 18 25 | cache: yarn 26 | 27 | - name: Install packages 28 | shell: bash 29 | run: yarn 30 | 31 | - name: Install Rust 32 | uses: actions-rs/toolchain@v1 33 | with: 34 | profile: minimal 35 | override: true 36 | 37 | - name: Install wasm target 38 | shell: bash 39 | run: | 40 | rustup target add wasm32-wasi 41 | 42 | - name: Build plugin 43 | shell: bash 44 | run: cargo prepublish --release 45 | env: 46 | MACOSX_DEPLOYMENT_TARGET: "10.13" 47 | 48 | - name: List files 49 | shell: bash 50 | run: | 51 | ls -al target/wasm32-wasi/release 52 | - name: Configure npm 53 | run: | 54 | echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc 55 | env: 56 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 57 | 58 | - name: Publish npm packages 59 | run: | 60 | npm publish --access public 61 | env: 62 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | ^target/ 3 | target 4 | /node_modules 5 | /dist 6 | /tools.* 7 | *.wasm 8 | .DS_Store -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx lint-staged 5 | -------------------------------------------------------------------------------- /.kodiak.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | [approve] 4 | auto_approve_usernames = ["orionmiz"] 5 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 2 3 | } 4 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "Inflector" 7 | version = "0.11.4" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" 10 | dependencies = [ 11 | "lazy_static", 12 | "regex", 13 | ] 14 | 15 | [[package]] 16 | name = "addr2line" 17 | version = "0.17.0" 18 | source = "registry+https://github.com/rust-lang/crates.io-index" 19 | checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" 20 | dependencies = [ 21 | "gimli", 22 | ] 23 | 24 | [[package]] 25 | name = "adler" 26 | version = "1.0.2" 27 | source = "registry+https://github.com/rust-lang/crates.io-index" 28 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 29 | 30 | [[package]] 31 | name = "ahash" 32 | version = "0.7.6" 33 | source = "registry+https://github.com/rust-lang/crates.io-index" 34 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 35 | dependencies = [ 36 | "getrandom", 37 | "once_cell", 38 | "version_check", 39 | ] 40 | 41 | [[package]] 42 | name = "ahash" 43 | version = "0.8.3" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" 46 | dependencies = [ 47 | "cfg-if", 48 | "getrandom", 49 | "once_cell", 50 | "version_check", 51 | ] 52 | 53 | [[package]] 54 | name = "aho-corasick" 55 | version = "0.7.19" 56 | source = "registry+https://github.com/rust-lang/crates.io-index" 57 | checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" 58 | dependencies = [ 59 | "memchr", 60 | ] 61 | 62 | [[package]] 63 | name = "ansi_term" 64 | version = "0.12.1" 65 | source = "registry+https://github.com/rust-lang/crates.io-index" 66 | checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 67 | dependencies = [ 68 | "winapi", 69 | ] 70 | 71 | [[package]] 72 | name = "anyhow" 73 | version = "1.0.71" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" 76 | 77 | [[package]] 78 | name = "ast_node" 79 | version = "0.9.6" 80 | source = "registry+https://github.com/rust-lang/crates.io-index" 81 | checksum = "c3e3e06ec6ac7d893a0db7127d91063ad7d9da8988f8a1a256f03729e6eec026" 82 | dependencies = [ 83 | "proc-macro2", 84 | "quote", 85 | "swc_macros_common", 86 | "syn 2.0.23", 87 | ] 88 | 89 | [[package]] 90 | name = "atty" 91 | version = "0.2.14" 92 | source = "registry+https://github.com/rust-lang/crates.io-index" 93 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 94 | dependencies = [ 95 | "hermit-abi", 96 | "libc", 97 | "winapi", 98 | ] 99 | 100 | [[package]] 101 | name = "autocfg" 102 | version = "1.1.0" 103 | source = "registry+https://github.com/rust-lang/crates.io-index" 104 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 105 | 106 | [[package]] 107 | name = "backtrace" 108 | version = "0.3.66" 109 | source = "registry+https://github.com/rust-lang/crates.io-index" 110 | checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" 111 | dependencies = [ 112 | "addr2line", 113 | "cc", 114 | "cfg-if", 115 | "libc", 116 | "miniz_oxide", 117 | "object", 118 | "rustc-demangle", 119 | ] 120 | 121 | [[package]] 122 | name = "base64" 123 | version = "0.21.7" 124 | source = "registry+https://github.com/rust-lang/crates.io-index" 125 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 126 | 127 | [[package]] 128 | name = "better_scoped_tls" 129 | version = "0.1.1" 130 | source = "registry+https://github.com/rust-lang/crates.io-index" 131 | checksum = "794edcc9b3fb07bb4aecaa11f093fd45663b4feadb782d68303a2268bc2701de" 132 | dependencies = [ 133 | "scoped-tls", 134 | ] 135 | 136 | [[package]] 137 | name = "bitflags" 138 | version = "1.3.2" 139 | source = "registry+https://github.com/rust-lang/crates.io-index" 140 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 141 | 142 | [[package]] 143 | name = "bitflags" 144 | version = "2.3.3" 145 | source = "registry+https://github.com/rust-lang/crates.io-index" 146 | checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" 147 | 148 | [[package]] 149 | name = "bitvec" 150 | version = "1.0.1" 151 | source = "registry+https://github.com/rust-lang/crates.io-index" 152 | checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" 153 | dependencies = [ 154 | "funty", 155 | "radium", 156 | "tap", 157 | "wyz", 158 | ] 159 | 160 | [[package]] 161 | name = "block-buffer" 162 | version = "0.10.4" 163 | source = "registry+https://github.com/rust-lang/crates.io-index" 164 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 165 | dependencies = [ 166 | "generic-array", 167 | ] 168 | 169 | [[package]] 170 | name = "bytecheck" 171 | version = "0.6.11" 172 | source = "registry+https://github.com/rust-lang/crates.io-index" 173 | checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" 174 | dependencies = [ 175 | "bytecheck_derive", 176 | "ptr_meta", 177 | "simdutf8", 178 | ] 179 | 180 | [[package]] 181 | name = "bytecheck_derive" 182 | version = "0.6.11" 183 | source = "registry+https://github.com/rust-lang/crates.io-index" 184 | checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" 185 | dependencies = [ 186 | "proc-macro2", 187 | "quote", 188 | "syn 1.0.99", 189 | ] 190 | 191 | [[package]] 192 | name = "camino" 193 | version = "1.1.4" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" 196 | dependencies = [ 197 | "serde", 198 | ] 199 | 200 | [[package]] 201 | name = "cargo-platform" 202 | version = "0.1.2" 203 | source = "registry+https://github.com/rust-lang/crates.io-index" 204 | checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" 205 | dependencies = [ 206 | "serde", 207 | ] 208 | 209 | [[package]] 210 | name = "cargo_metadata" 211 | version = "0.15.4" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" 214 | dependencies = [ 215 | "camino", 216 | "cargo-platform", 217 | "semver 1.0.17", 218 | "serde", 219 | "serde_json", 220 | "thiserror", 221 | ] 222 | 223 | [[package]] 224 | name = "cc" 225 | version = "1.0.73" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" 228 | 229 | [[package]] 230 | name = "cfg-if" 231 | version = "1.0.0" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 234 | 235 | [[package]] 236 | name = "cpufeatures" 237 | version = "0.2.5" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" 240 | dependencies = [ 241 | "libc", 242 | ] 243 | 244 | [[package]] 245 | name = "crypto-common" 246 | version = "0.1.6" 247 | source = "registry+https://github.com/rust-lang/crates.io-index" 248 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 249 | dependencies = [ 250 | "generic-array", 251 | "typenum", 252 | ] 253 | 254 | [[package]] 255 | name = "ctor" 256 | version = "0.1.23" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | checksum = "cdffe87e1d521a10f9696f833fe502293ea446d7f256c06128293a4119bdf4cb" 259 | dependencies = [ 260 | "quote", 261 | "syn 1.0.99", 262 | ] 263 | 264 | [[package]] 265 | name = "data-encoding" 266 | version = "2.3.3" 267 | source = "registry+https://github.com/rust-lang/crates.io-index" 268 | checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" 269 | 270 | [[package]] 271 | name = "debugid" 272 | version = "0.8.0" 273 | source = "registry+https://github.com/rust-lang/crates.io-index" 274 | checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" 275 | dependencies = [ 276 | "serde", 277 | "uuid", 278 | ] 279 | 280 | [[package]] 281 | name = "diff" 282 | version = "0.1.13" 283 | source = "registry+https://github.com/rust-lang/crates.io-index" 284 | checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" 285 | 286 | [[package]] 287 | name = "difference" 288 | version = "2.0.0" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" 291 | 292 | [[package]] 293 | name = "digest" 294 | version = "0.10.7" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 297 | dependencies = [ 298 | "block-buffer", 299 | "crypto-common", 300 | ] 301 | 302 | [[package]] 303 | name = "either" 304 | version = "1.8.0" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" 307 | 308 | [[package]] 309 | name = "equivalent" 310 | version = "1.0.1" 311 | source = "registry+https://github.com/rust-lang/crates.io-index" 312 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 313 | 314 | [[package]] 315 | name = "errno" 316 | version = "0.3.8" 317 | source = "registry+https://github.com/rust-lang/crates.io-index" 318 | checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" 319 | dependencies = [ 320 | "libc", 321 | "windows-sys 0.52.0", 322 | ] 323 | 324 | [[package]] 325 | name = "fastrand" 326 | version = "2.0.1" 327 | source = "registry+https://github.com/rust-lang/crates.io-index" 328 | checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" 329 | 330 | [[package]] 331 | name = "form_urlencoded" 332 | version = "1.2.0" 333 | source = "registry+https://github.com/rust-lang/crates.io-index" 334 | checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" 335 | dependencies = [ 336 | "percent-encoding", 337 | ] 338 | 339 | [[package]] 340 | name = "from_variant" 341 | version = "0.1.7" 342 | source = "registry+https://github.com/rust-lang/crates.io-index" 343 | checksum = "3a0b11eeb173ce52f84ebd943d42e58813a2ebb78a6a3ff0a243b71c5199cd7b" 344 | dependencies = [ 345 | "proc-macro2", 346 | "swc_macros_common", 347 | "syn 2.0.23", 348 | ] 349 | 350 | [[package]] 351 | name = "funty" 352 | version = "2.0.0" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" 355 | 356 | [[package]] 357 | name = "generic-array" 358 | version = "0.14.6" 359 | source = "registry+https://github.com/rust-lang/crates.io-index" 360 | checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" 361 | dependencies = [ 362 | "typenum", 363 | "version_check", 364 | ] 365 | 366 | [[package]] 367 | name = "getrandom" 368 | version = "0.2.7" 369 | source = "registry+https://github.com/rust-lang/crates.io-index" 370 | checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" 371 | dependencies = [ 372 | "cfg-if", 373 | "libc", 374 | "wasi", 375 | ] 376 | 377 | [[package]] 378 | name = "gimli" 379 | version = "0.26.2" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" 382 | 383 | [[package]] 384 | name = "glob" 385 | version = "0.3.0" 386 | source = "registry+https://github.com/rust-lang/crates.io-index" 387 | checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" 388 | 389 | [[package]] 390 | name = "hashbrown" 391 | version = "0.12.3" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 394 | dependencies = [ 395 | "ahash 0.7.6", 396 | ] 397 | 398 | [[package]] 399 | name = "hashbrown" 400 | version = "0.14.3" 401 | source = "registry+https://github.com/rust-lang/crates.io-index" 402 | checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" 403 | 404 | [[package]] 405 | name = "hermit-abi" 406 | version = "0.1.19" 407 | source = "registry+https://github.com/rust-lang/crates.io-index" 408 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 409 | dependencies = [ 410 | "libc", 411 | ] 412 | 413 | [[package]] 414 | name = "hex" 415 | version = "0.4.3" 416 | source = "registry+https://github.com/rust-lang/crates.io-index" 417 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 418 | 419 | [[package]] 420 | name = "hstr" 421 | version = "0.2.7" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | checksum = "17fafeca18cf0927e23ea44d7a5189c10536279dfe9094e0dfa953053fbb5377" 424 | dependencies = [ 425 | "new_debug_unreachable", 426 | "once_cell", 427 | "phf", 428 | "rustc-hash", 429 | "smallvec", 430 | ] 431 | 432 | [[package]] 433 | name = "idna" 434 | version = "0.4.0" 435 | source = "registry+https://github.com/rust-lang/crates.io-index" 436 | checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" 437 | dependencies = [ 438 | "unicode-bidi", 439 | "unicode-normalization", 440 | ] 441 | 442 | [[package]] 443 | name = "if_chain" 444 | version = "1.0.2" 445 | source = "registry+https://github.com/rust-lang/crates.io-index" 446 | checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" 447 | 448 | [[package]] 449 | name = "indexmap" 450 | version = "2.2.2" 451 | source = "registry+https://github.com/rust-lang/crates.io-index" 452 | checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" 453 | dependencies = [ 454 | "equivalent", 455 | "hashbrown 0.14.3", 456 | ] 457 | 458 | [[package]] 459 | name = "is-macro" 460 | version = "0.3.0" 461 | source = "registry+https://github.com/rust-lang/crates.io-index" 462 | checksum = "f4467ed1321b310c2625c5aa6c1b1ffc5de4d9e42668cf697a08fb033ee8265e" 463 | dependencies = [ 464 | "Inflector", 465 | "pmutil", 466 | "proc-macro2", 467 | "quote", 468 | "syn 2.0.23", 469 | ] 470 | 471 | [[package]] 472 | name = "is_ci" 473 | version = "1.1.1" 474 | source = "registry+https://github.com/rust-lang/crates.io-index" 475 | checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb" 476 | 477 | [[package]] 478 | name = "itoa" 479 | version = "1.0.3" 480 | source = "registry+https://github.com/rust-lang/crates.io-index" 481 | checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" 482 | 483 | [[package]] 484 | name = "lazy_static" 485 | version = "1.4.0" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 488 | 489 | [[package]] 490 | name = "libc" 491 | version = "0.2.153" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" 494 | 495 | [[package]] 496 | name = "linux-raw-sys" 497 | version = "0.4.13" 498 | source = "registry+https://github.com/rust-lang/crates.io-index" 499 | checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" 500 | 501 | [[package]] 502 | name = "lock_api" 503 | version = "0.4.8" 504 | source = "registry+https://github.com/rust-lang/crates.io-index" 505 | checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390" 506 | dependencies = [ 507 | "autocfg", 508 | "scopeguard", 509 | ] 510 | 511 | [[package]] 512 | name = "log" 513 | version = "0.4.17" 514 | source = "registry+https://github.com/rust-lang/crates.io-index" 515 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 516 | dependencies = [ 517 | "cfg-if", 518 | ] 519 | 520 | [[package]] 521 | name = "matchers" 522 | version = "0.1.0" 523 | source = "registry+https://github.com/rust-lang/crates.io-index" 524 | checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" 525 | dependencies = [ 526 | "regex-automata", 527 | ] 528 | 529 | [[package]] 530 | name = "memchr" 531 | version = "2.7.1" 532 | source = "registry+https://github.com/rust-lang/crates.io-index" 533 | checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" 534 | 535 | [[package]] 536 | name = "miette" 537 | version = "4.7.1" 538 | source = "registry+https://github.com/rust-lang/crates.io-index" 539 | checksum = "1c90329e44f9208b55f45711f9558cec15d7ef8295cc65ecd6d4188ae8edc58c" 540 | dependencies = [ 541 | "atty", 542 | "backtrace", 543 | "miette-derive", 544 | "once_cell", 545 | "owo-colors", 546 | "supports-color", 547 | "supports-hyperlinks", 548 | "supports-unicode", 549 | "terminal_size", 550 | "textwrap", 551 | "thiserror", 552 | "unicode-width", 553 | ] 554 | 555 | [[package]] 556 | name = "miette-derive" 557 | version = "4.7.1" 558 | source = "registry+https://github.com/rust-lang/crates.io-index" 559 | checksum = "6b5bc45b761bcf1b5e6e6c4128cd93b84c218721a8d9b894aa0aff4ed180174c" 560 | dependencies = [ 561 | "proc-macro2", 562 | "quote", 563 | "syn 1.0.99", 564 | ] 565 | 566 | [[package]] 567 | name = "miniz_oxide" 568 | version = "0.5.4" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" 571 | dependencies = [ 572 | "adler", 573 | ] 574 | 575 | [[package]] 576 | name = "new_debug_unreachable" 577 | version = "1.0.4" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" 580 | 581 | [[package]] 582 | name = "next_superjson" 583 | version = "0.6.3" 584 | dependencies = [ 585 | "serde", 586 | "serde_json", 587 | "swc_core", 588 | "testing 0.33.19", 589 | ] 590 | 591 | [[package]] 592 | name = "nu-ansi-term" 593 | version = "0.46.0" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" 596 | dependencies = [ 597 | "overload", 598 | "winapi", 599 | ] 600 | 601 | [[package]] 602 | name = "num-bigint" 603 | version = "0.4.3" 604 | source = "registry+https://github.com/rust-lang/crates.io-index" 605 | checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" 606 | dependencies = [ 607 | "autocfg", 608 | "num-integer", 609 | "num-traits", 610 | "serde", 611 | ] 612 | 613 | [[package]] 614 | name = "num-integer" 615 | version = "0.1.45" 616 | source = "registry+https://github.com/rust-lang/crates.io-index" 617 | checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 618 | dependencies = [ 619 | "autocfg", 620 | "num-traits", 621 | ] 622 | 623 | [[package]] 624 | name = "num-traits" 625 | version = "0.2.15" 626 | source = "registry+https://github.com/rust-lang/crates.io-index" 627 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 628 | dependencies = [ 629 | "autocfg", 630 | ] 631 | 632 | [[package]] 633 | name = "num_cpus" 634 | version = "1.13.1" 635 | source = "registry+https://github.com/rust-lang/crates.io-index" 636 | checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" 637 | dependencies = [ 638 | "hermit-abi", 639 | "libc", 640 | ] 641 | 642 | [[package]] 643 | name = "object" 644 | version = "0.29.0" 645 | source = "registry+https://github.com/rust-lang/crates.io-index" 646 | checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" 647 | dependencies = [ 648 | "memchr", 649 | ] 650 | 651 | [[package]] 652 | name = "once_cell" 653 | version = "1.18.0" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 656 | 657 | [[package]] 658 | name = "output_vt100" 659 | version = "0.1.3" 660 | source = "registry+https://github.com/rust-lang/crates.io-index" 661 | checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" 662 | dependencies = [ 663 | "winapi", 664 | ] 665 | 666 | [[package]] 667 | name = "overload" 668 | version = "0.1.1" 669 | source = "registry+https://github.com/rust-lang/crates.io-index" 670 | checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" 671 | 672 | [[package]] 673 | name = "owo-colors" 674 | version = "3.5.0" 675 | source = "registry+https://github.com/rust-lang/crates.io-index" 676 | checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" 677 | 678 | [[package]] 679 | name = "parking_lot" 680 | version = "0.12.1" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 683 | dependencies = [ 684 | "lock_api", 685 | "parking_lot_core", 686 | ] 687 | 688 | [[package]] 689 | name = "parking_lot_core" 690 | version = "0.9.3" 691 | source = "registry+https://github.com/rust-lang/crates.io-index" 692 | checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" 693 | dependencies = [ 694 | "cfg-if", 695 | "libc", 696 | "redox_syscall 0.2.16", 697 | "smallvec", 698 | "windows-sys 0.36.1", 699 | ] 700 | 701 | [[package]] 702 | name = "percent-encoding" 703 | version = "2.3.0" 704 | source = "registry+https://github.com/rust-lang/crates.io-index" 705 | checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" 706 | 707 | [[package]] 708 | name = "phf" 709 | version = "0.11.2" 710 | source = "registry+https://github.com/rust-lang/crates.io-index" 711 | checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" 712 | dependencies = [ 713 | "phf_macros", 714 | "phf_shared 0.11.2", 715 | ] 716 | 717 | [[package]] 718 | name = "phf_generator" 719 | version = "0.10.0" 720 | source = "registry+https://github.com/rust-lang/crates.io-index" 721 | checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" 722 | dependencies = [ 723 | "phf_shared 0.10.0", 724 | "rand", 725 | ] 726 | 727 | [[package]] 728 | name = "phf_generator" 729 | version = "0.11.2" 730 | source = "registry+https://github.com/rust-lang/crates.io-index" 731 | checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" 732 | dependencies = [ 733 | "phf_shared 0.11.2", 734 | "rand", 735 | ] 736 | 737 | [[package]] 738 | name = "phf_macros" 739 | version = "0.11.2" 740 | source = "registry+https://github.com/rust-lang/crates.io-index" 741 | checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" 742 | dependencies = [ 743 | "phf_generator 0.11.2", 744 | "phf_shared 0.11.2", 745 | "proc-macro2", 746 | "quote", 747 | "syn 2.0.23", 748 | ] 749 | 750 | [[package]] 751 | name = "phf_shared" 752 | version = "0.10.0" 753 | source = "registry+https://github.com/rust-lang/crates.io-index" 754 | checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" 755 | dependencies = [ 756 | "siphasher", 757 | ] 758 | 759 | [[package]] 760 | name = "phf_shared" 761 | version = "0.11.2" 762 | source = "registry+https://github.com/rust-lang/crates.io-index" 763 | checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" 764 | dependencies = [ 765 | "siphasher", 766 | ] 767 | 768 | [[package]] 769 | name = "pin-project-lite" 770 | version = "0.2.9" 771 | source = "registry+https://github.com/rust-lang/crates.io-index" 772 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 773 | 774 | [[package]] 775 | name = "pmutil" 776 | version = "0.6.1" 777 | source = "registry+https://github.com/rust-lang/crates.io-index" 778 | checksum = "52a40bc70c2c58040d2d8b167ba9a5ff59fc9dab7ad44771cfde3dcfde7a09c6" 779 | dependencies = [ 780 | "proc-macro2", 781 | "quote", 782 | "syn 2.0.23", 783 | ] 784 | 785 | [[package]] 786 | name = "ppv-lite86" 787 | version = "0.2.16" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" 790 | 791 | [[package]] 792 | name = "precomputed-hash" 793 | version = "0.1.1" 794 | source = "registry+https://github.com/rust-lang/crates.io-index" 795 | checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" 796 | 797 | [[package]] 798 | name = "pretty_assertions" 799 | version = "1.3.0" 800 | source = "registry+https://github.com/rust-lang/crates.io-index" 801 | checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755" 802 | dependencies = [ 803 | "ctor", 804 | "diff", 805 | "output_vt100", 806 | "yansi", 807 | ] 808 | 809 | [[package]] 810 | name = "proc-macro2" 811 | version = "1.0.63" 812 | source = "registry+https://github.com/rust-lang/crates.io-index" 813 | checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" 814 | dependencies = [ 815 | "unicode-ident", 816 | ] 817 | 818 | [[package]] 819 | name = "psm" 820 | version = "0.1.21" 821 | source = "registry+https://github.com/rust-lang/crates.io-index" 822 | checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" 823 | dependencies = [ 824 | "cc", 825 | ] 826 | 827 | [[package]] 828 | name = "ptr_meta" 829 | version = "0.1.4" 830 | source = "registry+https://github.com/rust-lang/crates.io-index" 831 | checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" 832 | dependencies = [ 833 | "ptr_meta_derive", 834 | ] 835 | 836 | [[package]] 837 | name = "ptr_meta_derive" 838 | version = "0.1.4" 839 | source = "registry+https://github.com/rust-lang/crates.io-index" 840 | checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" 841 | dependencies = [ 842 | "proc-macro2", 843 | "quote", 844 | "syn 1.0.99", 845 | ] 846 | 847 | [[package]] 848 | name = "quote" 849 | version = "1.0.29" 850 | source = "registry+https://github.com/rust-lang/crates.io-index" 851 | checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" 852 | dependencies = [ 853 | "proc-macro2", 854 | ] 855 | 856 | [[package]] 857 | name = "radium" 858 | version = "0.7.0" 859 | source = "registry+https://github.com/rust-lang/crates.io-index" 860 | checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" 861 | 862 | [[package]] 863 | name = "rand" 864 | version = "0.8.5" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 867 | dependencies = [ 868 | "libc", 869 | "rand_chacha", 870 | "rand_core", 871 | ] 872 | 873 | [[package]] 874 | name = "rand_chacha" 875 | version = "0.3.1" 876 | source = "registry+https://github.com/rust-lang/crates.io-index" 877 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 878 | dependencies = [ 879 | "ppv-lite86", 880 | "rand_core", 881 | ] 882 | 883 | [[package]] 884 | name = "rand_core" 885 | version = "0.6.3" 886 | source = "registry+https://github.com/rust-lang/crates.io-index" 887 | checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" 888 | dependencies = [ 889 | "getrandom", 890 | ] 891 | 892 | [[package]] 893 | name = "redox_syscall" 894 | version = "0.2.16" 895 | source = "registry+https://github.com/rust-lang/crates.io-index" 896 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 897 | dependencies = [ 898 | "bitflags 1.3.2", 899 | ] 900 | 901 | [[package]] 902 | name = "redox_syscall" 903 | version = "0.3.5" 904 | source = "registry+https://github.com/rust-lang/crates.io-index" 905 | checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" 906 | dependencies = [ 907 | "bitflags 1.3.2", 908 | ] 909 | 910 | [[package]] 911 | name = "regex" 912 | version = "1.6.0" 913 | source = "registry+https://github.com/rust-lang/crates.io-index" 914 | checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" 915 | dependencies = [ 916 | "aho-corasick", 917 | "memchr", 918 | "regex-syntax", 919 | ] 920 | 921 | [[package]] 922 | name = "regex-automata" 923 | version = "0.1.10" 924 | source = "registry+https://github.com/rust-lang/crates.io-index" 925 | checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" 926 | dependencies = [ 927 | "regex-syntax", 928 | ] 929 | 930 | [[package]] 931 | name = "regex-syntax" 932 | version = "0.6.27" 933 | source = "registry+https://github.com/rust-lang/crates.io-index" 934 | checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" 935 | 936 | [[package]] 937 | name = "relative-path" 938 | version = "1.7.2" 939 | source = "registry+https://github.com/rust-lang/crates.io-index" 940 | checksum = "0df32d82cedd1499386877b062ebe8721f806de80b08d183c70184ef17dd1d42" 941 | 942 | [[package]] 943 | name = "rend" 944 | version = "0.4.0" 945 | source = "registry+https://github.com/rust-lang/crates.io-index" 946 | checksum = "581008d2099240d37fb08d77ad713bcaec2c4d89d50b5b21a8bb1996bbab68ab" 947 | dependencies = [ 948 | "bytecheck", 949 | ] 950 | 951 | [[package]] 952 | name = "rkyv" 953 | version = "0.7.42" 954 | source = "registry+https://github.com/rust-lang/crates.io-index" 955 | checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58" 956 | dependencies = [ 957 | "bitvec", 958 | "bytecheck", 959 | "hashbrown 0.12.3", 960 | "ptr_meta", 961 | "rend", 962 | "rkyv_derive", 963 | "seahash", 964 | "tinyvec", 965 | "uuid", 966 | ] 967 | 968 | [[package]] 969 | name = "rkyv_derive" 970 | version = "0.7.41" 971 | source = "registry+https://github.com/rust-lang/crates.io-index" 972 | checksum = "ac1c672430eb41556291981f45ca900a0239ad007242d1cb4b4167af842db666" 973 | dependencies = [ 974 | "proc-macro2", 975 | "quote", 976 | "syn 1.0.99", 977 | ] 978 | 979 | [[package]] 980 | name = "rustc-demangle" 981 | version = "0.1.21" 982 | source = "registry+https://github.com/rust-lang/crates.io-index" 983 | checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" 984 | 985 | [[package]] 986 | name = "rustc-hash" 987 | version = "1.1.0" 988 | source = "registry+https://github.com/rust-lang/crates.io-index" 989 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 990 | 991 | [[package]] 992 | name = "rustc_version" 993 | version = "0.2.3" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 996 | dependencies = [ 997 | "semver 0.9.0", 998 | ] 999 | 1000 | [[package]] 1001 | name = "rustix" 1002 | version = "0.38.8" 1003 | source = "registry+https://github.com/rust-lang/crates.io-index" 1004 | checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" 1005 | dependencies = [ 1006 | "bitflags 2.3.3", 1007 | "errno", 1008 | "libc", 1009 | "linux-raw-sys", 1010 | "windows-sys 0.48.0", 1011 | ] 1012 | 1013 | [[package]] 1014 | name = "rustversion" 1015 | version = "1.0.14" 1016 | source = "registry+https://github.com/rust-lang/crates.io-index" 1017 | checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" 1018 | 1019 | [[package]] 1020 | name = "ryu" 1021 | version = "1.0.11" 1022 | source = "registry+https://github.com/rust-lang/crates.io-index" 1023 | checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" 1024 | 1025 | [[package]] 1026 | name = "scoped-tls" 1027 | version = "1.0.1" 1028 | source = "registry+https://github.com/rust-lang/crates.io-index" 1029 | checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" 1030 | 1031 | [[package]] 1032 | name = "scopeguard" 1033 | version = "1.1.0" 1034 | source = "registry+https://github.com/rust-lang/crates.io-index" 1035 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1036 | 1037 | [[package]] 1038 | name = "seahash" 1039 | version = "4.1.0" 1040 | source = "registry+https://github.com/rust-lang/crates.io-index" 1041 | checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" 1042 | 1043 | [[package]] 1044 | name = "semver" 1045 | version = "0.9.0" 1046 | source = "registry+https://github.com/rust-lang/crates.io-index" 1047 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 1048 | dependencies = [ 1049 | "semver-parser", 1050 | ] 1051 | 1052 | [[package]] 1053 | name = "semver" 1054 | version = "1.0.17" 1055 | source = "registry+https://github.com/rust-lang/crates.io-index" 1056 | checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" 1057 | dependencies = [ 1058 | "serde", 1059 | ] 1060 | 1061 | [[package]] 1062 | name = "semver-parser" 1063 | version = "0.7.0" 1064 | source = "registry+https://github.com/rust-lang/crates.io-index" 1065 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 1066 | 1067 | [[package]] 1068 | name = "serde" 1069 | version = "1.0.144" 1070 | source = "registry+https://github.com/rust-lang/crates.io-index" 1071 | checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" 1072 | dependencies = [ 1073 | "serde_derive", 1074 | ] 1075 | 1076 | [[package]] 1077 | name = "serde_derive" 1078 | version = "1.0.144" 1079 | source = "registry+https://github.com/rust-lang/crates.io-index" 1080 | checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" 1081 | dependencies = [ 1082 | "proc-macro2", 1083 | "quote", 1084 | "syn 1.0.99", 1085 | ] 1086 | 1087 | [[package]] 1088 | name = "serde_json" 1089 | version = "1.0.85" 1090 | source = "registry+https://github.com/rust-lang/crates.io-index" 1091 | checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" 1092 | dependencies = [ 1093 | "itoa", 1094 | "ryu", 1095 | "serde", 1096 | ] 1097 | 1098 | [[package]] 1099 | name = "sha2" 1100 | version = "0.10.8" 1101 | source = "registry+https://github.com/rust-lang/crates.io-index" 1102 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 1103 | dependencies = [ 1104 | "cfg-if", 1105 | "cpufeatures", 1106 | "digest", 1107 | ] 1108 | 1109 | [[package]] 1110 | name = "sharded-slab" 1111 | version = "0.1.4" 1112 | source = "registry+https://github.com/rust-lang/crates.io-index" 1113 | checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" 1114 | dependencies = [ 1115 | "lazy_static", 1116 | ] 1117 | 1118 | [[package]] 1119 | name = "simdutf8" 1120 | version = "0.1.4" 1121 | source = "registry+https://github.com/rust-lang/crates.io-index" 1122 | checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" 1123 | 1124 | [[package]] 1125 | name = "siphasher" 1126 | version = "0.3.10" 1127 | source = "registry+https://github.com/rust-lang/crates.io-index" 1128 | checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" 1129 | 1130 | [[package]] 1131 | name = "smallvec" 1132 | version = "1.13.1" 1133 | source = "registry+https://github.com/rust-lang/crates.io-index" 1134 | checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" 1135 | 1136 | [[package]] 1137 | name = "smartstring" 1138 | version = "1.0.1" 1139 | source = "registry+https://github.com/rust-lang/crates.io-index" 1140 | checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" 1141 | dependencies = [ 1142 | "autocfg", 1143 | "static_assertions", 1144 | "version_check", 1145 | ] 1146 | 1147 | [[package]] 1148 | name = "smawk" 1149 | version = "0.3.1" 1150 | source = "registry+https://github.com/rust-lang/crates.io-index" 1151 | checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" 1152 | 1153 | [[package]] 1154 | name = "sourcemap" 1155 | version = "6.4.1" 1156 | source = "registry+https://github.com/rust-lang/crates.io-index" 1157 | checksum = "e4cbf65ca7dc576cf50e21f8d0712d96d4fcfd797389744b7b222a85cdf5bd90" 1158 | dependencies = [ 1159 | "data-encoding", 1160 | "debugid", 1161 | "if_chain", 1162 | "rustc_version", 1163 | "serde", 1164 | "serde_json", 1165 | "unicode-id", 1166 | "url", 1167 | ] 1168 | 1169 | [[package]] 1170 | name = "stable_deref_trait" 1171 | version = "1.2.0" 1172 | source = "registry+https://github.com/rust-lang/crates.io-index" 1173 | checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 1174 | 1175 | [[package]] 1176 | name = "stacker" 1177 | version = "0.1.15" 1178 | source = "registry+https://github.com/rust-lang/crates.io-index" 1179 | checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" 1180 | dependencies = [ 1181 | "cc", 1182 | "cfg-if", 1183 | "libc", 1184 | "psm", 1185 | "winapi", 1186 | ] 1187 | 1188 | [[package]] 1189 | name = "static_assertions" 1190 | version = "1.1.0" 1191 | source = "registry+https://github.com/rust-lang/crates.io-index" 1192 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 1193 | 1194 | [[package]] 1195 | name = "string_cache" 1196 | version = "0.8.7" 1197 | source = "registry+https://github.com/rust-lang/crates.io-index" 1198 | checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" 1199 | dependencies = [ 1200 | "new_debug_unreachable", 1201 | "once_cell", 1202 | "parking_lot", 1203 | "phf_shared 0.10.0", 1204 | "precomputed-hash", 1205 | "serde", 1206 | ] 1207 | 1208 | [[package]] 1209 | name = "string_cache_codegen" 1210 | version = "0.5.2" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" 1213 | dependencies = [ 1214 | "phf_generator 0.10.0", 1215 | "phf_shared 0.10.0", 1216 | "proc-macro2", 1217 | "quote", 1218 | ] 1219 | 1220 | [[package]] 1221 | name = "string_enum" 1222 | version = "0.4.2" 1223 | source = "registry+https://github.com/rust-lang/crates.io-index" 1224 | checksum = "1b650ea2087d32854a0f20b837fc56ec987a1cb4f758c9757e1171ee9812da63" 1225 | dependencies = [ 1226 | "proc-macro2", 1227 | "quote", 1228 | "swc_macros_common", 1229 | "syn 2.0.23", 1230 | ] 1231 | 1232 | [[package]] 1233 | name = "supports-color" 1234 | version = "1.3.0" 1235 | source = "registry+https://github.com/rust-lang/crates.io-index" 1236 | checksum = "4872ced36b91d47bae8a214a683fe54e7078875b399dfa251df346c9b547d1f9" 1237 | dependencies = [ 1238 | "atty", 1239 | "is_ci", 1240 | ] 1241 | 1242 | [[package]] 1243 | name = "supports-hyperlinks" 1244 | version = "1.2.0" 1245 | source = "registry+https://github.com/rust-lang/crates.io-index" 1246 | checksum = "590b34f7c5f01ecc9d78dba4b3f445f31df750a67621cf31626f3b7441ce6406" 1247 | dependencies = [ 1248 | "atty", 1249 | ] 1250 | 1251 | [[package]] 1252 | name = "supports-unicode" 1253 | version = "1.0.2" 1254 | source = "registry+https://github.com/rust-lang/crates.io-index" 1255 | checksum = "a8b945e45b417b125a8ec51f1b7df2f8df7920367700d1f98aedd21e5735f8b2" 1256 | dependencies = [ 1257 | "atty", 1258 | ] 1259 | 1260 | [[package]] 1261 | name = "swc_atoms" 1262 | version = "0.5.6" 1263 | source = "registry+https://github.com/rust-lang/crates.io-index" 1264 | checksum = "93d0307dc4bfd107d49c7528350c372758cfca94fb503629b9a056e6a1572860" 1265 | dependencies = [ 1266 | "once_cell", 1267 | "rustc-hash", 1268 | "serde", 1269 | "string_cache", 1270 | "string_cache_codegen", 1271 | "triomphe", 1272 | ] 1273 | 1274 | [[package]] 1275 | name = "swc_atoms" 1276 | version = "0.6.5" 1277 | source = "registry+https://github.com/rust-lang/crates.io-index" 1278 | checksum = "7d538eaaa6f085161d088a04cf0a3a5a52c5a7f2b3bd9b83f73f058b0ed357c0" 1279 | dependencies = [ 1280 | "bytecheck", 1281 | "hstr", 1282 | "once_cell", 1283 | "rkyv", 1284 | "rustc-hash", 1285 | "serde", 1286 | ] 1287 | 1288 | [[package]] 1289 | name = "swc_common" 1290 | version = "0.31.16" 1291 | source = "registry+https://github.com/rust-lang/crates.io-index" 1292 | checksum = "c6414bd4e553f5638961d39b07075ffd37a3d63176829592f4a5900260d94ca1" 1293 | dependencies = [ 1294 | "ahash 0.8.3", 1295 | "ast_node", 1296 | "atty", 1297 | "better_scoped_tls", 1298 | "cfg-if", 1299 | "either", 1300 | "from_variant", 1301 | "new_debug_unreachable", 1302 | "num-bigint", 1303 | "once_cell", 1304 | "parking_lot", 1305 | "rustc-hash", 1306 | "serde", 1307 | "siphasher", 1308 | "string_cache", 1309 | "swc_atoms 0.5.6", 1310 | "swc_eq_ignore_macros", 1311 | "swc_visit", 1312 | "termcolor", 1313 | "tracing", 1314 | "unicode-width", 1315 | "url", 1316 | ] 1317 | 1318 | [[package]] 1319 | name = "swc_common" 1320 | version = "0.33.18" 1321 | source = "registry+https://github.com/rust-lang/crates.io-index" 1322 | checksum = "c85e8b15d0fb87691e27c8f3cf953748db3ccd2a39e165d6d5275a48fb0d29e3" 1323 | dependencies = [ 1324 | "anyhow", 1325 | "ast_node", 1326 | "atty", 1327 | "better_scoped_tls", 1328 | "bytecheck", 1329 | "cfg-if", 1330 | "either", 1331 | "from_variant", 1332 | "new_debug_unreachable", 1333 | "num-bigint", 1334 | "once_cell", 1335 | "parking_lot", 1336 | "rkyv", 1337 | "rustc-hash", 1338 | "serde", 1339 | "siphasher", 1340 | "sourcemap", 1341 | "swc_atoms 0.6.5", 1342 | "swc_eq_ignore_macros", 1343 | "swc_visit", 1344 | "termcolor", 1345 | "tracing", 1346 | "unicode-width", 1347 | "url", 1348 | ] 1349 | 1350 | [[package]] 1351 | name = "swc_core" 1352 | version = "0.90.14" 1353 | source = "registry+https://github.com/rust-lang/crates.io-index" 1354 | checksum = "1304ef91579d46206f5244e6286f28a979acf3d9caf98a05d05cc2b0bb94df45" 1355 | dependencies = [ 1356 | "once_cell", 1357 | "swc_atoms 0.6.5", 1358 | "swc_common 0.33.18", 1359 | "swc_ecma_ast", 1360 | "swc_ecma_parser", 1361 | "swc_ecma_transforms_base", 1362 | "swc_ecma_transforms_testing", 1363 | "swc_ecma_utils", 1364 | "swc_ecma_visit", 1365 | "swc_plugin", 1366 | "swc_plugin_macro", 1367 | "swc_plugin_proxy", 1368 | "vergen", 1369 | ] 1370 | 1371 | [[package]] 1372 | name = "swc_ecma_ast" 1373 | version = "0.112.4" 1374 | source = "registry+https://github.com/rust-lang/crates.io-index" 1375 | checksum = "36226eb87bfd2f5620bde04f149a4b869ab34e78496d60cb0d8eb9da765d0732" 1376 | dependencies = [ 1377 | "bitflags 2.3.3", 1378 | "bytecheck", 1379 | "is-macro", 1380 | "num-bigint", 1381 | "phf", 1382 | "rkyv", 1383 | "scoped-tls", 1384 | "string_enum", 1385 | "swc_atoms 0.6.5", 1386 | "swc_common 0.33.18", 1387 | "unicode-id", 1388 | ] 1389 | 1390 | [[package]] 1391 | name = "swc_ecma_codegen" 1392 | version = "0.148.7" 1393 | source = "registry+https://github.com/rust-lang/crates.io-index" 1394 | checksum = "5ba8669ab28bb5d1e65c1e8690257c026745ac368e0101c2c6544d4a03afc95e" 1395 | dependencies = [ 1396 | "memchr", 1397 | "num-bigint", 1398 | "once_cell", 1399 | "rustc-hash", 1400 | "serde", 1401 | "sourcemap", 1402 | "swc_atoms 0.6.5", 1403 | "swc_common 0.33.18", 1404 | "swc_ecma_ast", 1405 | "swc_ecma_codegen_macros", 1406 | "tracing", 1407 | ] 1408 | 1409 | [[package]] 1410 | name = "swc_ecma_codegen_macros" 1411 | version = "0.7.4" 1412 | source = "registry+https://github.com/rust-lang/crates.io-index" 1413 | checksum = "394b8239424b339a12012ceb18726ed0244fce6bf6345053cb9320b2791dcaa5" 1414 | dependencies = [ 1415 | "proc-macro2", 1416 | "quote", 1417 | "swc_macros_common", 1418 | "syn 2.0.23", 1419 | ] 1420 | 1421 | [[package]] 1422 | name = "swc_ecma_parser" 1423 | version = "0.143.5" 1424 | source = "registry+https://github.com/rust-lang/crates.io-index" 1425 | checksum = "20823cac99a9adbd4c03fb5e126aaccbf92446afedad99252a0e1fc76e2ffc43" 1426 | dependencies = [ 1427 | "either", 1428 | "new_debug_unreachable", 1429 | "num-bigint", 1430 | "num-traits", 1431 | "phf", 1432 | "serde", 1433 | "smallvec", 1434 | "smartstring", 1435 | "stacker", 1436 | "swc_atoms 0.6.5", 1437 | "swc_common 0.33.18", 1438 | "swc_ecma_ast", 1439 | "tracing", 1440 | "typed-arena", 1441 | ] 1442 | 1443 | [[package]] 1444 | name = "swc_ecma_testing" 1445 | version = "0.22.20" 1446 | source = "registry+https://github.com/rust-lang/crates.io-index" 1447 | checksum = "e1279bd6336c901852146c05a0dbae09f78056b0ab32ffa64b5a1088da073d48" 1448 | dependencies = [ 1449 | "anyhow", 1450 | "hex", 1451 | "sha2", 1452 | "testing 0.35.19", 1453 | "tracing", 1454 | ] 1455 | 1456 | [[package]] 1457 | name = "swc_ecma_transforms_base" 1458 | version = "0.137.10" 1459 | source = "registry+https://github.com/rust-lang/crates.io-index" 1460 | checksum = "66539401f619730b26d380a120b91b499f80cbdd9bb15d00aa73bc3a4d4cc394" 1461 | dependencies = [ 1462 | "better_scoped_tls", 1463 | "bitflags 2.3.3", 1464 | "indexmap", 1465 | "once_cell", 1466 | "phf", 1467 | "rustc-hash", 1468 | "serde", 1469 | "smallvec", 1470 | "swc_atoms 0.6.5", 1471 | "swc_common 0.33.18", 1472 | "swc_ecma_ast", 1473 | "swc_ecma_parser", 1474 | "swc_ecma_utils", 1475 | "swc_ecma_visit", 1476 | "tracing", 1477 | ] 1478 | 1479 | [[package]] 1480 | name = "swc_ecma_transforms_testing" 1481 | version = "0.140.10" 1482 | source = "registry+https://github.com/rust-lang/crates.io-index" 1483 | checksum = "d70d13125e86b0aa940ba326930447a43e0640fa6fed1ca512a1ae78ecafc278" 1484 | dependencies = [ 1485 | "ansi_term", 1486 | "anyhow", 1487 | "base64", 1488 | "hex", 1489 | "serde", 1490 | "serde_json", 1491 | "sha2", 1492 | "sourcemap", 1493 | "swc_common 0.33.18", 1494 | "swc_ecma_ast", 1495 | "swc_ecma_codegen", 1496 | "swc_ecma_parser", 1497 | "swc_ecma_testing", 1498 | "swc_ecma_transforms_base", 1499 | "swc_ecma_utils", 1500 | "swc_ecma_visit", 1501 | "tempfile", 1502 | "testing 0.35.19", 1503 | ] 1504 | 1505 | [[package]] 1506 | name = "swc_ecma_utils" 1507 | version = "0.127.7" 1508 | source = "registry+https://github.com/rust-lang/crates.io-index" 1509 | checksum = "14482e455df85486d68a51533a31645d511e56df93a35cadf0eabbe7abe96b98" 1510 | dependencies = [ 1511 | "indexmap", 1512 | "num_cpus", 1513 | "once_cell", 1514 | "rustc-hash", 1515 | "swc_atoms 0.6.5", 1516 | "swc_common 0.33.18", 1517 | "swc_ecma_ast", 1518 | "swc_ecma_visit", 1519 | "tracing", 1520 | "unicode-id", 1521 | ] 1522 | 1523 | [[package]] 1524 | name = "swc_ecma_visit" 1525 | version = "0.98.4" 1526 | source = "registry+https://github.com/rust-lang/crates.io-index" 1527 | checksum = "df0127694c36d656ea9eab5c170cdd8ab398246ae2a335de26961c913a4aca47" 1528 | dependencies = [ 1529 | "num-bigint", 1530 | "swc_atoms 0.6.5", 1531 | "swc_common 0.33.18", 1532 | "swc_ecma_ast", 1533 | "swc_visit", 1534 | "tracing", 1535 | ] 1536 | 1537 | [[package]] 1538 | name = "swc_eq_ignore_macros" 1539 | version = "0.1.3" 1540 | source = "registry+https://github.com/rust-lang/crates.io-index" 1541 | checksum = "695a1d8b461033d32429b5befbf0ad4d7a2c4d6ba9cd5ba4e0645c615839e8e4" 1542 | dependencies = [ 1543 | "proc-macro2", 1544 | "quote", 1545 | "syn 2.0.23", 1546 | ] 1547 | 1548 | [[package]] 1549 | name = "swc_error_reporters" 1550 | version = "0.15.16" 1551 | source = "registry+https://github.com/rust-lang/crates.io-index" 1552 | checksum = "108322b719696e8c368c39dc6d8748494ea2aa870e7d80ea5956078aa6b4dd4d" 1553 | dependencies = [ 1554 | "anyhow", 1555 | "miette", 1556 | "once_cell", 1557 | "parking_lot", 1558 | "swc_common 0.31.16", 1559 | ] 1560 | 1561 | [[package]] 1562 | name = "swc_error_reporters" 1563 | version = "0.17.17" 1564 | source = "registry+https://github.com/rust-lang/crates.io-index" 1565 | checksum = "5a76d4fb0aae65d68fd03b44d8ee0d66fa6b08c5fe0d9bb34c150ec0cad5a998" 1566 | dependencies = [ 1567 | "anyhow", 1568 | "miette", 1569 | "once_cell", 1570 | "parking_lot", 1571 | "swc_common 0.33.18", 1572 | ] 1573 | 1574 | [[package]] 1575 | name = "swc_macros_common" 1576 | version = "0.3.9" 1577 | source = "registry+https://github.com/rust-lang/crates.io-index" 1578 | checksum = "50176cfc1cbc8bb22f41c6fe9d1ec53fbe057001219b5954961b8ad0f336fce9" 1579 | dependencies = [ 1580 | "proc-macro2", 1581 | "quote", 1582 | "syn 2.0.23", 1583 | ] 1584 | 1585 | [[package]] 1586 | name = "swc_plugin" 1587 | version = "0.90.0" 1588 | source = "registry+https://github.com/rust-lang/crates.io-index" 1589 | checksum = "ca5df720531bfbd7ceb1139319c39c20c446abfb8f7e0eb47b104205a71152b4" 1590 | dependencies = [ 1591 | "once_cell", 1592 | ] 1593 | 1594 | [[package]] 1595 | name = "swc_plugin_macro" 1596 | version = "0.9.16" 1597 | source = "registry+https://github.com/rust-lang/crates.io-index" 1598 | checksum = "3232db481484070637b20a155c064096c0ea1ba04fa2247b89b618661b3574f4" 1599 | dependencies = [ 1600 | "proc-macro2", 1601 | "quote", 1602 | "syn 2.0.23", 1603 | ] 1604 | 1605 | [[package]] 1606 | name = "swc_plugin_proxy" 1607 | version = "0.41.4" 1608 | source = "registry+https://github.com/rust-lang/crates.io-index" 1609 | checksum = "3c1a30d289547b936d33a8e5222e049c89b9c84ab706aac0a5c224ecf1b21bcb" 1610 | dependencies = [ 1611 | "better_scoped_tls", 1612 | "rkyv", 1613 | "swc_common 0.33.18", 1614 | "swc_ecma_ast", 1615 | "swc_trace_macro", 1616 | "tracing", 1617 | ] 1618 | 1619 | [[package]] 1620 | name = "swc_trace_macro" 1621 | version = "0.1.3" 1622 | source = "registry+https://github.com/rust-lang/crates.io-index" 1623 | checksum = "ff9719b6085dd2824fd61938a881937be14b08f95e2d27c64c825a9f65e052ba" 1624 | dependencies = [ 1625 | "proc-macro2", 1626 | "quote", 1627 | "syn 2.0.23", 1628 | ] 1629 | 1630 | [[package]] 1631 | name = "swc_visit" 1632 | version = "0.5.9" 1633 | source = "registry+https://github.com/rust-lang/crates.io-index" 1634 | checksum = "358e246dedeb4ae8efacebcce1360dc2f9b6c0b4c1ad8b737cc60f5b6633691a" 1635 | dependencies = [ 1636 | "either", 1637 | "swc_visit_macros", 1638 | ] 1639 | 1640 | [[package]] 1641 | name = "swc_visit_macros" 1642 | version = "0.5.10" 1643 | source = "registry+https://github.com/rust-lang/crates.io-index" 1644 | checksum = "fbbbb9d77d5112f90ed7ea00477135b16c4370c872b93a0b63b766e8710650ad" 1645 | dependencies = [ 1646 | "Inflector", 1647 | "pmutil", 1648 | "proc-macro2", 1649 | "quote", 1650 | "swc_macros_common", 1651 | "syn 2.0.23", 1652 | ] 1653 | 1654 | [[package]] 1655 | name = "syn" 1656 | version = "1.0.99" 1657 | source = "registry+https://github.com/rust-lang/crates.io-index" 1658 | checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" 1659 | dependencies = [ 1660 | "proc-macro2", 1661 | "quote", 1662 | "unicode-ident", 1663 | ] 1664 | 1665 | [[package]] 1666 | name = "syn" 1667 | version = "2.0.23" 1668 | source = "registry+https://github.com/rust-lang/crates.io-index" 1669 | checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" 1670 | dependencies = [ 1671 | "proc-macro2", 1672 | "quote", 1673 | "unicode-ident", 1674 | ] 1675 | 1676 | [[package]] 1677 | name = "tap" 1678 | version = "1.0.1" 1679 | source = "registry+https://github.com/rust-lang/crates.io-index" 1680 | checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" 1681 | 1682 | [[package]] 1683 | name = "tempfile" 1684 | version = "3.8.0" 1685 | source = "registry+https://github.com/rust-lang/crates.io-index" 1686 | checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" 1687 | dependencies = [ 1688 | "cfg-if", 1689 | "fastrand", 1690 | "redox_syscall 0.3.5", 1691 | "rustix", 1692 | "windows-sys 0.48.0", 1693 | ] 1694 | 1695 | [[package]] 1696 | name = "termcolor" 1697 | version = "1.1.3" 1698 | source = "registry+https://github.com/rust-lang/crates.io-index" 1699 | checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" 1700 | dependencies = [ 1701 | "winapi-util", 1702 | ] 1703 | 1704 | [[package]] 1705 | name = "terminal_size" 1706 | version = "0.1.17" 1707 | source = "registry+https://github.com/rust-lang/crates.io-index" 1708 | checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" 1709 | dependencies = [ 1710 | "libc", 1711 | "winapi", 1712 | ] 1713 | 1714 | [[package]] 1715 | name = "testing" 1716 | version = "0.33.19" 1717 | source = "registry+https://github.com/rust-lang/crates.io-index" 1718 | checksum = "359d2548f4919624af6cd1001e0a3ac9f081f8312e47fdca7650c11c9935981b" 1719 | dependencies = [ 1720 | "ansi_term", 1721 | "cargo_metadata", 1722 | "difference", 1723 | "once_cell", 1724 | "pretty_assertions", 1725 | "regex", 1726 | "serde_json", 1727 | "swc_common 0.31.16", 1728 | "swc_error_reporters 0.15.16", 1729 | "testing_macros", 1730 | "tracing", 1731 | "tracing-subscriber", 1732 | ] 1733 | 1734 | [[package]] 1735 | name = "testing" 1736 | version = "0.35.19" 1737 | source = "registry+https://github.com/rust-lang/crates.io-index" 1738 | checksum = "bd2a7fea73e3b4693c08cbdf71806e4a51effdcbe82bebdb12532b49784232e8" 1739 | dependencies = [ 1740 | "ansi_term", 1741 | "cargo_metadata", 1742 | "difference", 1743 | "once_cell", 1744 | "pretty_assertions", 1745 | "regex", 1746 | "serde", 1747 | "serde_json", 1748 | "swc_common 0.33.18", 1749 | "swc_error_reporters 0.17.17", 1750 | "testing_macros", 1751 | "tracing", 1752 | "tracing-subscriber", 1753 | ] 1754 | 1755 | [[package]] 1756 | name = "testing_macros" 1757 | version = "0.2.12" 1758 | source = "registry+https://github.com/rust-lang/crates.io-index" 1759 | checksum = "f9d3864d4184569c1428645a51a304b3b6e8d3094cd61fb3cce8dfdd9f6d0f72" 1760 | dependencies = [ 1761 | "anyhow", 1762 | "glob", 1763 | "once_cell", 1764 | "proc-macro2", 1765 | "quote", 1766 | "regex", 1767 | "relative-path", 1768 | "syn 2.0.23", 1769 | ] 1770 | 1771 | [[package]] 1772 | name = "textwrap" 1773 | version = "0.15.0" 1774 | source = "registry+https://github.com/rust-lang/crates.io-index" 1775 | checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" 1776 | dependencies = [ 1777 | "smawk", 1778 | "unicode-linebreak", 1779 | "unicode-width", 1780 | ] 1781 | 1782 | [[package]] 1783 | name = "thiserror" 1784 | version = "1.0.34" 1785 | source = "registry+https://github.com/rust-lang/crates.io-index" 1786 | checksum = "8c1b05ca9d106ba7d2e31a9dab4a64e7be2cce415321966ea3132c49a656e252" 1787 | dependencies = [ 1788 | "thiserror-impl", 1789 | ] 1790 | 1791 | [[package]] 1792 | name = "thiserror-impl" 1793 | version = "1.0.34" 1794 | source = "registry+https://github.com/rust-lang/crates.io-index" 1795 | checksum = "e8f2591983642de85c921015f3f070c665a197ed69e417af436115e3a1407487" 1796 | dependencies = [ 1797 | "proc-macro2", 1798 | "quote", 1799 | "syn 1.0.99", 1800 | ] 1801 | 1802 | [[package]] 1803 | name = "thread_local" 1804 | version = "1.1.4" 1805 | source = "registry+https://github.com/rust-lang/crates.io-index" 1806 | checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" 1807 | dependencies = [ 1808 | "once_cell", 1809 | ] 1810 | 1811 | [[package]] 1812 | name = "tinyvec" 1813 | version = "1.6.0" 1814 | source = "registry+https://github.com/rust-lang/crates.io-index" 1815 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1816 | dependencies = [ 1817 | "tinyvec_macros", 1818 | ] 1819 | 1820 | [[package]] 1821 | name = "tinyvec_macros" 1822 | version = "0.1.0" 1823 | source = "registry+https://github.com/rust-lang/crates.io-index" 1824 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 1825 | 1826 | [[package]] 1827 | name = "tracing" 1828 | version = "0.1.37" 1829 | source = "registry+https://github.com/rust-lang/crates.io-index" 1830 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 1831 | dependencies = [ 1832 | "cfg-if", 1833 | "pin-project-lite", 1834 | "tracing-attributes", 1835 | "tracing-core", 1836 | ] 1837 | 1838 | [[package]] 1839 | name = "tracing-attributes" 1840 | version = "0.1.26" 1841 | source = "registry+https://github.com/rust-lang/crates.io-index" 1842 | checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" 1843 | dependencies = [ 1844 | "proc-macro2", 1845 | "quote", 1846 | "syn 2.0.23", 1847 | ] 1848 | 1849 | [[package]] 1850 | name = "tracing-core" 1851 | version = "0.1.31" 1852 | source = "registry+https://github.com/rust-lang/crates.io-index" 1853 | checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" 1854 | dependencies = [ 1855 | "once_cell", 1856 | "valuable", 1857 | ] 1858 | 1859 | [[package]] 1860 | name = "tracing-log" 1861 | version = "0.1.3" 1862 | source = "registry+https://github.com/rust-lang/crates.io-index" 1863 | checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" 1864 | dependencies = [ 1865 | "lazy_static", 1866 | "log", 1867 | "tracing-core", 1868 | ] 1869 | 1870 | [[package]] 1871 | name = "tracing-subscriber" 1872 | version = "0.3.17" 1873 | source = "registry+https://github.com/rust-lang/crates.io-index" 1874 | checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" 1875 | dependencies = [ 1876 | "matchers", 1877 | "nu-ansi-term", 1878 | "once_cell", 1879 | "regex", 1880 | "sharded-slab", 1881 | "smallvec", 1882 | "thread_local", 1883 | "tracing", 1884 | "tracing-core", 1885 | "tracing-log", 1886 | ] 1887 | 1888 | [[package]] 1889 | name = "triomphe" 1890 | version = "0.1.8" 1891 | source = "registry+https://github.com/rust-lang/crates.io-index" 1892 | checksum = "f1ee9bd9239c339d714d657fac840c6d2a4f9c45f4f9ec7b0975113458be78db" 1893 | dependencies = [ 1894 | "serde", 1895 | "stable_deref_trait", 1896 | ] 1897 | 1898 | [[package]] 1899 | name = "typed-arena" 1900 | version = "2.0.1" 1901 | source = "registry+https://github.com/rust-lang/crates.io-index" 1902 | checksum = "0685c84d5d54d1c26f7d3eb96cd41550adb97baed141a761cf335d3d33bcd0ae" 1903 | 1904 | [[package]] 1905 | name = "typenum" 1906 | version = "1.16.0" 1907 | source = "registry+https://github.com/rust-lang/crates.io-index" 1908 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 1909 | 1910 | [[package]] 1911 | name = "unicode-bidi" 1912 | version = "0.3.13" 1913 | source = "registry+https://github.com/rust-lang/crates.io-index" 1914 | checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 1915 | 1916 | [[package]] 1917 | name = "unicode-id" 1918 | version = "0.3.2" 1919 | source = "registry+https://github.com/rust-lang/crates.io-index" 1920 | checksum = "69fe8d9274f490a36442acb4edfd0c4e473fdfc6a8b5cd32f28a0235761aedbe" 1921 | 1922 | [[package]] 1923 | name = "unicode-ident" 1924 | version = "1.0.3" 1925 | source = "registry+https://github.com/rust-lang/crates.io-index" 1926 | checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" 1927 | 1928 | [[package]] 1929 | name = "unicode-linebreak" 1930 | version = "0.1.2" 1931 | source = "registry+https://github.com/rust-lang/crates.io-index" 1932 | checksum = "3a52dcaab0c48d931f7cc8ef826fa51690a08e1ea55117ef26f89864f532383f" 1933 | dependencies = [ 1934 | "regex", 1935 | ] 1936 | 1937 | [[package]] 1938 | name = "unicode-normalization" 1939 | version = "0.1.22" 1940 | source = "registry+https://github.com/rust-lang/crates.io-index" 1941 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 1942 | dependencies = [ 1943 | "tinyvec", 1944 | ] 1945 | 1946 | [[package]] 1947 | name = "unicode-width" 1948 | version = "0.1.9" 1949 | source = "registry+https://github.com/rust-lang/crates.io-index" 1950 | checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" 1951 | 1952 | [[package]] 1953 | name = "url" 1954 | version = "2.4.0" 1955 | source = "registry+https://github.com/rust-lang/crates.io-index" 1956 | checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" 1957 | dependencies = [ 1958 | "form_urlencoded", 1959 | "idna", 1960 | "percent-encoding", 1961 | ] 1962 | 1963 | [[package]] 1964 | name = "uuid" 1965 | version = "1.3.3" 1966 | source = "registry+https://github.com/rust-lang/crates.io-index" 1967 | checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" 1968 | 1969 | [[package]] 1970 | name = "valuable" 1971 | version = "0.1.0" 1972 | source = "registry+https://github.com/rust-lang/crates.io-index" 1973 | checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" 1974 | 1975 | [[package]] 1976 | name = "vergen" 1977 | version = "8.2.4" 1978 | source = "registry+https://github.com/rust-lang/crates.io-index" 1979 | checksum = "bbc5ad0d9d26b2c49a5ab7da76c3e79d3ee37e7821799f8223fcb8f2f391a2e7" 1980 | dependencies = [ 1981 | "anyhow", 1982 | "rustversion", 1983 | ] 1984 | 1985 | [[package]] 1986 | name = "version_check" 1987 | version = "0.9.4" 1988 | source = "registry+https://github.com/rust-lang/crates.io-index" 1989 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1990 | 1991 | [[package]] 1992 | name = "wasi" 1993 | version = "0.11.0+wasi-snapshot-preview1" 1994 | source = "registry+https://github.com/rust-lang/crates.io-index" 1995 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1996 | 1997 | [[package]] 1998 | name = "winapi" 1999 | version = "0.3.9" 2000 | source = "registry+https://github.com/rust-lang/crates.io-index" 2001 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2002 | dependencies = [ 2003 | "winapi-i686-pc-windows-gnu", 2004 | "winapi-x86_64-pc-windows-gnu", 2005 | ] 2006 | 2007 | [[package]] 2008 | name = "winapi-i686-pc-windows-gnu" 2009 | version = "0.4.0" 2010 | source = "registry+https://github.com/rust-lang/crates.io-index" 2011 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2012 | 2013 | [[package]] 2014 | name = "winapi-util" 2015 | version = "0.1.5" 2016 | source = "registry+https://github.com/rust-lang/crates.io-index" 2017 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 2018 | dependencies = [ 2019 | "winapi", 2020 | ] 2021 | 2022 | [[package]] 2023 | name = "winapi-x86_64-pc-windows-gnu" 2024 | version = "0.4.0" 2025 | source = "registry+https://github.com/rust-lang/crates.io-index" 2026 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2027 | 2028 | [[package]] 2029 | name = "windows-sys" 2030 | version = "0.36.1" 2031 | source = "registry+https://github.com/rust-lang/crates.io-index" 2032 | checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" 2033 | dependencies = [ 2034 | "windows_aarch64_msvc 0.36.1", 2035 | "windows_i686_gnu 0.36.1", 2036 | "windows_i686_msvc 0.36.1", 2037 | "windows_x86_64_gnu 0.36.1", 2038 | "windows_x86_64_msvc 0.36.1", 2039 | ] 2040 | 2041 | [[package]] 2042 | name = "windows-sys" 2043 | version = "0.48.0" 2044 | source = "registry+https://github.com/rust-lang/crates.io-index" 2045 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 2046 | dependencies = [ 2047 | "windows-targets 0.48.5", 2048 | ] 2049 | 2050 | [[package]] 2051 | name = "windows-sys" 2052 | version = "0.52.0" 2053 | source = "registry+https://github.com/rust-lang/crates.io-index" 2054 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 2055 | dependencies = [ 2056 | "windows-targets 0.52.0", 2057 | ] 2058 | 2059 | [[package]] 2060 | name = "windows-targets" 2061 | version = "0.48.5" 2062 | source = "registry+https://github.com/rust-lang/crates.io-index" 2063 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 2064 | dependencies = [ 2065 | "windows_aarch64_gnullvm 0.48.5", 2066 | "windows_aarch64_msvc 0.48.5", 2067 | "windows_i686_gnu 0.48.5", 2068 | "windows_i686_msvc 0.48.5", 2069 | "windows_x86_64_gnu 0.48.5", 2070 | "windows_x86_64_gnullvm 0.48.5", 2071 | "windows_x86_64_msvc 0.48.5", 2072 | ] 2073 | 2074 | [[package]] 2075 | name = "windows-targets" 2076 | version = "0.52.0" 2077 | source = "registry+https://github.com/rust-lang/crates.io-index" 2078 | checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" 2079 | dependencies = [ 2080 | "windows_aarch64_gnullvm 0.52.0", 2081 | "windows_aarch64_msvc 0.52.0", 2082 | "windows_i686_gnu 0.52.0", 2083 | "windows_i686_msvc 0.52.0", 2084 | "windows_x86_64_gnu 0.52.0", 2085 | "windows_x86_64_gnullvm 0.52.0", 2086 | "windows_x86_64_msvc 0.52.0", 2087 | ] 2088 | 2089 | [[package]] 2090 | name = "windows_aarch64_gnullvm" 2091 | version = "0.48.5" 2092 | source = "registry+https://github.com/rust-lang/crates.io-index" 2093 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 2094 | 2095 | [[package]] 2096 | name = "windows_aarch64_gnullvm" 2097 | version = "0.52.0" 2098 | source = "registry+https://github.com/rust-lang/crates.io-index" 2099 | checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" 2100 | 2101 | [[package]] 2102 | name = "windows_aarch64_msvc" 2103 | version = "0.36.1" 2104 | source = "registry+https://github.com/rust-lang/crates.io-index" 2105 | checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" 2106 | 2107 | [[package]] 2108 | name = "windows_aarch64_msvc" 2109 | version = "0.48.5" 2110 | source = "registry+https://github.com/rust-lang/crates.io-index" 2111 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 2112 | 2113 | [[package]] 2114 | name = "windows_aarch64_msvc" 2115 | version = "0.52.0" 2116 | source = "registry+https://github.com/rust-lang/crates.io-index" 2117 | checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" 2118 | 2119 | [[package]] 2120 | name = "windows_i686_gnu" 2121 | version = "0.36.1" 2122 | source = "registry+https://github.com/rust-lang/crates.io-index" 2123 | checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" 2124 | 2125 | [[package]] 2126 | name = "windows_i686_gnu" 2127 | version = "0.48.5" 2128 | source = "registry+https://github.com/rust-lang/crates.io-index" 2129 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 2130 | 2131 | [[package]] 2132 | name = "windows_i686_gnu" 2133 | version = "0.52.0" 2134 | source = "registry+https://github.com/rust-lang/crates.io-index" 2135 | checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" 2136 | 2137 | [[package]] 2138 | name = "windows_i686_msvc" 2139 | version = "0.36.1" 2140 | source = "registry+https://github.com/rust-lang/crates.io-index" 2141 | checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" 2142 | 2143 | [[package]] 2144 | name = "windows_i686_msvc" 2145 | version = "0.48.5" 2146 | source = "registry+https://github.com/rust-lang/crates.io-index" 2147 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 2148 | 2149 | [[package]] 2150 | name = "windows_i686_msvc" 2151 | version = "0.52.0" 2152 | source = "registry+https://github.com/rust-lang/crates.io-index" 2153 | checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" 2154 | 2155 | [[package]] 2156 | name = "windows_x86_64_gnu" 2157 | version = "0.36.1" 2158 | source = "registry+https://github.com/rust-lang/crates.io-index" 2159 | checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" 2160 | 2161 | [[package]] 2162 | name = "windows_x86_64_gnu" 2163 | version = "0.48.5" 2164 | source = "registry+https://github.com/rust-lang/crates.io-index" 2165 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 2166 | 2167 | [[package]] 2168 | name = "windows_x86_64_gnu" 2169 | version = "0.52.0" 2170 | source = "registry+https://github.com/rust-lang/crates.io-index" 2171 | checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" 2172 | 2173 | [[package]] 2174 | name = "windows_x86_64_gnullvm" 2175 | version = "0.48.5" 2176 | source = "registry+https://github.com/rust-lang/crates.io-index" 2177 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 2178 | 2179 | [[package]] 2180 | name = "windows_x86_64_gnullvm" 2181 | version = "0.52.0" 2182 | source = "registry+https://github.com/rust-lang/crates.io-index" 2183 | checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" 2184 | 2185 | [[package]] 2186 | name = "windows_x86_64_msvc" 2187 | version = "0.36.1" 2188 | source = "registry+https://github.com/rust-lang/crates.io-index" 2189 | checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" 2190 | 2191 | [[package]] 2192 | name = "windows_x86_64_msvc" 2193 | version = "0.48.5" 2194 | source = "registry+https://github.com/rust-lang/crates.io-index" 2195 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 2196 | 2197 | [[package]] 2198 | name = "windows_x86_64_msvc" 2199 | version = "0.52.0" 2200 | source = "registry+https://github.com/rust-lang/crates.io-index" 2201 | checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" 2202 | 2203 | [[package]] 2204 | name = "wyz" 2205 | version = "0.5.1" 2206 | source = "registry+https://github.com/rust-lang/crates.io-index" 2207 | checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" 2208 | dependencies = [ 2209 | "tap", 2210 | ] 2211 | 2212 | [[package]] 2213 | name = "yansi" 2214 | version = "0.5.1" 2215 | source = "registry+https://github.com/rust-lang/crates.io-index" 2216 | checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" 2217 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "next_superjson" 3 | version = "0.6.3" 4 | edition = "2021" 5 | authors = ["JH.Lee "] 6 | description = "SWC Plugin of SuperJSON for Next.js" 7 | license = "MIT/Apache-2.0" 8 | repository = "https://github.com/orionmiz/next-superjson-plugin" 9 | 10 | [lib] 11 | crate-type = ["cdylib", "rlib"] 12 | 13 | [dependencies] 14 | serde = "1.0.144" 15 | serde_json = "1.0.85" 16 | swc_core = { version = "0.90.*", features = ["ecma_plugin_transform", "ecma_ast", "ecma_utils", "ecma_visit", "ecma_transforms", "ecma_parser", "common"] } 17 | 18 | [dev-dependencies] 19 | testing = "0.33.11" 20 | 21 | [profile.release] 22 | lto = true 23 | strip = true 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Next SuperJSON Plugin

2 |

🔌 SuperJSON Plugin for Next.js (SWC)

3 | 4 | ### /pages (Pages Directory) 5 | 6 | ```jsx 7 | export default function Page({ date }) { 8 | return
Today is {date.toDateString()}
; 9 | } 10 | 11 | // You can also use getInitialProps, getStaticProps 12 | export const getServerSideProps = () => { 13 | return { 14 | props: { 15 | date: new Date(), 16 | }, 17 | }; 18 | }; 19 | ``` 20 | 21 | - Allows pre-rendering functions to return props including [Non-JSON Values](https://github.com/blitz-js/superjson#parse)(Date, Map, Set..) 22 | 23 | ### /app (App Directory) 24 | 25 | ```jsx 26 | // Use "data-superjson" attribute to pass non-serializable props to client components 27 | // No needs to change the propsType of Client Component (It's type-safe!) 28 | 29 | export default function ServerComponent() { 30 | const date = new Date(); 31 | return ; 32 | } 33 | ``` 34 | 35 | - Provides `data-superjson` attribute for [Server Component > Client Component Serialization](https://beta.nextjs.org/docs/rendering/server-and-client-components#passing-props-from-server-to-client-components-serialization). 36 | 37 | ## Usage 38 | 39 | Install packages first: 40 | 41 | ```sh 42 | npm install superjson next-superjson-plugin 43 | # or Yarn 44 | yarn add superjson next-superjson-plugin 45 | ``` 46 | 47 | Add the plugin into `next.config.js` 48 | 49 | ```js 50 | // next.config.js 51 | module.exports = { 52 | experimental: { 53 | swcPlugins: [["next-superjson-plugin", {}]], 54 | }, 55 | }; 56 | ``` 57 | 58 | ### Options 59 | 60 | You can use the `excluded` option to exclude specific properties from serialization. 61 | 62 | ```js 63 | ['next-superjson-plugin', { excluded: ["someProp"] }], 64 | ``` 65 | 66 | ## How it works 67 | 68 | ```mermaid 69 | sequenceDiagram 70 | participant Next.js 71 | participant SWC Plugin 72 | participant SuperJSON 73 | Next.js->>SWC Plugin: Request Transform 74 | SWC Plugin->>SWC Plugin: Transform Pages/Components
To Use SuperJSON 75 | SWC Plugin->>Next.js: Take Modules 76 | Next.js-->SuperJSON: Connected 77 | Next.js->>SuperJSON: Serialize Props
(Date, BigInt, Set, Map..) 78 | Note over SWC Plugin: getInitialProps
getServerSideProps
getStaticProps
Server Components 79 | SuperJSON->>Next.js: Deserialize Props 80 | Note over SWC Plugin: Pages
Client Components 81 | 82 | ``` 83 | 84 | ## Bug Report 85 | 86 | ⚠️ Keep in mind: SWC Plugin is still an experimental feature for Next.js 87 | 88 | Plugin always ensures compatibility with [Next.js Canary version](https://nextjs.org/docs/messages/opening-an-issue) only. 89 | 90 | [Leave an Issue](https://github.com/orionmiz/next-superjson-plugin/issues) 91 | 92 | ## Special Thanks 93 | 94 | - [kdy1](https://github.com/kdy1) (Main creator of swc project) 95 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "next-superjson-plugin", 3 | "version": "0.6.3", 4 | "description": "Automatically transform your Next.js Pages to use SuperJSON with SWC", 5 | "author": "JH.Lee ", 6 | "homepage": "https://github.com/blitz-js/next-superjson-plugin#readme", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/blitz-js/next-superjson-plugin.git" 10 | }, 11 | "bugs": { 12 | "url": "https://github.com/blitz-js/next-superjson-plugin/issues", 13 | "email": "contact@jins.dev" 14 | }, 15 | "license": "MIT", 16 | "keywords": [ 17 | "swc-plugin" 18 | ], 19 | "type": "module", 20 | "main": "./dist/next_superjson.wasm", 21 | "exports": { 22 | ".": "./dist/next_superjson.wasm", 23 | "./tools": "./dist/tools.js", 24 | "./client": "./dist/client.js" 25 | }, 26 | "preferUnplugged": true, 27 | "scripts": { 28 | "prepack": "tsc && cp target/wasm32-wasi/release/next_superjson.wasm ./dist", 29 | "prepare": "husky install" 30 | }, 31 | "files": [ 32 | "dist" 33 | ], 34 | "peerDependencies": { 35 | "next": "^13.0 || ^14.0", 36 | "superjson": "^1 || ^2" 37 | }, 38 | "dependencies": { 39 | "hoist-non-react-statics": "^3.3.2" 40 | }, 41 | "devDependencies": { 42 | "@types/hoist-non-react-statics": "^3.3.1", 43 | "husky": "^8.0.2", 44 | "lint-staged": "^13.0.3", 45 | "next": "^13", 46 | "prettier": "^2.7.1", 47 | "superjson": "^2", 48 | "typescript": "^5.3.3" 49 | }, 50 | "lint-staged": { 51 | "*.rs": [ 52 | "rustfmt --" 53 | ], 54 | "*.{ts,json}": [ 55 | "prettier --write" 56 | ] 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /rust-toolchain: -------------------------------------------------------------------------------- 1 | nightly-2023-03-09 -------------------------------------------------------------------------------- /src/app.rs: -------------------------------------------------------------------------------- 1 | use std::vec; 2 | 3 | use swc_core::{ 4 | common::{util::take::Take, DUMMY_SP}, 5 | ecma::{ 6 | ast::*, 7 | utils::{is_valid_ident, prepend_stmts}, 8 | visit::*, 9 | }, 10 | }; 11 | 12 | use crate::Config; 13 | 14 | static DIRECTIVE: &str = "data-superjson"; 15 | static SERIALIZER_FUNCTION: &str = "serialize"; 16 | static DESERIALIZER_COMPONENT: &str = "SuperJSONComponent"; 17 | static DESERIALIZER_PROPS_ATTR: &str = "props"; 18 | static DESERIALIZER_PROPS_COMPONENT: &str = "component"; 19 | static TOOLS_SRC: &str = "next-superjson-plugin/tools"; 20 | static CLIENT_SRC: &str = "next-superjson-plugin/client"; 21 | 22 | struct AppTransformer { 23 | transformed: bool, 24 | } 25 | 26 | pub fn transform_app(_: Config) -> impl VisitMut { 27 | AppTransformer { transformed: false } 28 | } 29 | 30 | trait JSXUtil { 31 | fn as_expr(&self) -> Expr; 32 | } 33 | 34 | impl JSXUtil for JSXMemberExpr { 35 | fn as_expr(&self) -> Expr { 36 | match &self.obj { 37 | JSXObject::Ident(id) => id.clone().into(), 38 | JSXObject::JSXMemberExpr(member) => MemberExpr { 39 | obj: Box::new(member.as_expr()), 40 | prop: MemberProp::Ident(member.prop.clone()), 41 | span: DUMMY_SP, 42 | } 43 | .into(), 44 | } 45 | } 46 | } 47 | 48 | impl JSXUtil for JSXElementName { 49 | fn as_expr(&self) -> Expr { 50 | match self { 51 | JSXElementName::Ident(id) => { 52 | if is_valid_ident(&id.sym) { 53 | id.clone().into() 54 | } else { 55 | Lit::Str(id.sym.clone().into()).into() 56 | } 57 | } 58 | JSXElementName::JSXMemberExpr(member) => MemberExpr { 59 | obj: Box::new(member.as_expr()), 60 | prop: member.prop.clone().into(), 61 | span: DUMMY_SP, 62 | } 63 | .into(), 64 | // namespace cannot be component 65 | _ => unreachable!(), 66 | } 67 | } 68 | } 69 | 70 | impl VisitMut for AppTransformer { 71 | fn visit_mut_module_items(&mut self, items: &mut Vec) { 72 | items.visit_mut_children_with(self); 73 | 74 | if self.transformed { 75 | // add import decl 76 | 77 | prepend_stmts( 78 | items, 79 | vec![ 80 | ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { 81 | specifiers: vec![ImportNamedSpecifier { 82 | local: Ident::new(SERIALIZER_FUNCTION.into(), DUMMY_SP), 83 | span: DUMMY_SP, 84 | imported: None, 85 | is_type_only: false, 86 | } 87 | .into()], 88 | src: Box::new(TOOLS_SRC.into()), 89 | ..ImportDecl::dummy() 90 | })), 91 | ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { 92 | specifiers: vec![ImportDefaultSpecifier { 93 | local: Ident::new(DESERIALIZER_COMPONENT.into(), DUMMY_SP), 94 | span: DUMMY_SP, 95 | } 96 | .into()], 97 | src: Box::new(CLIENT_SRC.into()), 98 | ..ImportDecl::dummy() 99 | })), 100 | ] 101 | .into_iter(), 102 | ); 103 | } 104 | } 105 | 106 | fn visit_mut_jsx_element(&mut self, elem: &mut JSXElement) { 107 | elem.visit_mut_children_with(self); 108 | 109 | let mut found = false; 110 | 111 | // find and remove data-superjson directive 112 | elem.opening.attrs.retain(|attr_or_spread| { 113 | if let JSXAttrOrSpread::JSXAttr(JSXAttr { 114 | name: JSXAttrName::Ident(id), 115 | .. 116 | }) = attr_or_spread 117 | { 118 | if &*id.sym == DIRECTIVE { 119 | found = true; 120 | return false; 121 | } 122 | } 123 | true 124 | }); 125 | 126 | if found { 127 | // attrs -> obj props 128 | let list: Vec = elem 129 | .opening 130 | .attrs 131 | .take() 132 | .into_iter() 133 | .map(|attr_or_spread| match attr_or_spread { 134 | JSXAttrOrSpread::JSXAttr(attr) => { 135 | let key: PropName = match attr.name { 136 | JSXAttrName::Ident(id) => id.into(), 137 | JSXAttrName::JSXNamespacedName(ns_name) => PropName::Str( 138 | format!("{}:{}", ns_name.ns.sym, ns_name.name.sym).into(), 139 | ), 140 | }; 141 | 142 | let value: Box = match attr.value { 143 | Some(JSXAttrValue::JSXExprContainer(JSXExprContainer { 144 | expr: JSXExpr::Expr(expr), 145 | .. 146 | })) => expr, 147 | Some(JSXAttrValue::JSXElement(element)) => { 148 | Box::new(Expr::JSXElement(element)) 149 | } 150 | Some(JSXAttrValue::JSXFragment(fragment)) => { 151 | Box::new(Expr::JSXFragment(fragment)) 152 | } 153 | Some(JSXAttrValue::Lit(lit)) => lit.into(), 154 | None => Box::new(Expr::Lit(Lit::Bool(Bool { 155 | value: true, 156 | span: DUMMY_SP, 157 | }))), 158 | _ => unreachable!(), 159 | }; 160 | 161 | Box::new(Prop::KeyValue(KeyValueProp { key, value })).into() 162 | } 163 | JSXAttrOrSpread::SpreadElement(spread) => SpreadElement { 164 | expr: spread.expr, 165 | dot3_token: DUMMY_SP, 166 | } 167 | .into(), 168 | }) 169 | .collect(); 170 | 171 | // replace attrs 172 | elem.opening.attrs = vec![ 173 | JSXAttr { 174 | name: Ident::new(DESERIALIZER_PROPS_ATTR.into(), DUMMY_SP).into(), 175 | span: DUMMY_SP, 176 | value: Some( 177 | JSXExprContainer { 178 | expr: Box::new(Expr::Call(CallExpr { 179 | args: vec![Expr::Object(ObjectLit { 180 | span: DUMMY_SP, 181 | props: list, 182 | }) 183 | .into()], 184 | callee: Box::new(Expr::Ident(Ident::new( 185 | SERIALIZER_FUNCTION.into(), 186 | DUMMY_SP, 187 | ))) 188 | .into(), 189 | span: DUMMY_SP, 190 | type_args: None, 191 | })) 192 | .into(), 193 | span: DUMMY_SP, 194 | } 195 | .into(), 196 | ), 197 | } 198 | .into(), 199 | JSXAttr { 200 | name: Ident::new(DESERIALIZER_PROPS_COMPONENT.into(), DUMMY_SP).into(), 201 | span: DUMMY_SP, 202 | value: Some( 203 | JSXExprContainer { 204 | expr: Box::new(elem.opening.name.as_expr()).into(), 205 | span: DUMMY_SP, 206 | } 207 | .into(), 208 | ), 209 | } 210 | .into(), 211 | ]; 212 | 213 | // change element name 214 | elem.opening.name = Ident::new(DESERIALIZER_COMPONENT.into(), DUMMY_SP).into(); 215 | 216 | if let Some(closing) = &mut elem.closing { 217 | closing.name = Ident::new(DESERIALIZER_COMPONENT.into(), DUMMY_SP).into(); 218 | } 219 | 220 | self.transformed = true; 221 | } 222 | } 223 | } 224 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | use std::path::{Component, Path}; 2 | 3 | use serde::Deserialize; 4 | use swc_core::{ 5 | ecma::{ast::*, visit::*}, 6 | plugin::{ 7 | metadata::TransformPluginMetadataContextKind, plugin_transform, 8 | proxies::TransformPluginProgramMetadata, 9 | }, 10 | }; 11 | 12 | use app::*; 13 | use page::*; 14 | 15 | pub mod app; 16 | pub mod page; 17 | mod utils; 18 | 19 | #[derive(Debug, Default, Clone, Deserialize)] 20 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 21 | pub struct Config { 22 | #[serde(default)] 23 | pub excluded: Vec, 24 | } 25 | 26 | pub enum DirType { 27 | Page, 28 | App, 29 | } 30 | 31 | #[plugin_transform] 32 | pub fn process_transform(program: Program, _metadata: TransformPluginProgramMetadata) -> Program { 33 | let raw_cwd = _metadata 34 | .get_context(&TransformPluginMetadataContextKind::Cwd) 35 | .unwrap(); 36 | 37 | let raw_path = _metadata 38 | .get_context(&TransformPluginMetadataContextKind::Filename) 39 | .unwrap(); 40 | 41 | // Windows path separator -> Unix path separator 42 | let cwd = &raw_cwd.replace('\\', "/"); 43 | let path = &raw_path.replace('\\', "/"); 44 | 45 | // overlapping prefix 46 | let prefix = cwd 47 | .chars() 48 | .zip(path.chars()) 49 | .take_while(|(a, b)| a == b) 50 | .map(|(a, _)| a) 51 | .collect::(); 52 | 53 | if let Some(relative_path) = path.strip_prefix(&prefix) { 54 | let mut is_page = false; 55 | 56 | for component in Path::new(relative_path).components() { 57 | match component { 58 | Component::Normal(str) => match str.to_str().unwrap_or_default() { 59 | // skip non-source stuff 60 | "node_modules" => { 61 | return program; 62 | } 63 | "pages" => { 64 | is_page = true; 65 | break; 66 | } 67 | _ => {} 68 | }, 69 | _ => {} 70 | } 71 | } 72 | 73 | // consider server components outside the app directory 74 | let dir_type = if is_page { DirType::Page } else { DirType::App }; 75 | 76 | let config = serde_json::from_str::( 77 | &_metadata 78 | .get_transform_plugin_config() 79 | .unwrap_or_else(|| "{}".to_string()), 80 | ) 81 | .expect("Failed to parse plugin config"); 82 | 83 | match dir_type { 84 | DirType::Page => program.fold_with(&mut as_folder(transform_page(config))), 85 | DirType::App => program.fold_with(&mut as_folder(transform_app(config))), 86 | } 87 | } else { 88 | program 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/page.rs: -------------------------------------------------------------------------------- 1 | use std::ops::IndexMut; 2 | 3 | use swc_core::{ 4 | common::{util::take::Take, DUMMY_SP}, 5 | ecma::{ 6 | ast::*, 7 | utils::{prepend_stmt, ExprFactory}, 8 | visit::*, 9 | }, 10 | }; 11 | 12 | use crate::{utils::*, Config}; 13 | 14 | static SSG_EXPORTS: &[&str; 2] = &["getStaticProps", "getServerSideProps"]; 15 | static INITIAL_PROPS: &str = "getInitialProps"; 16 | 17 | // import { withSuperJSONProps as _withSuperJSONProps } from "next-superjson-plugin/tools"; 18 | static SUPERJSON_PROPS_IMPORTED: &str = "withSuperJSONProps"; 19 | pub static SUPERJSON_PROPS_LOCAL: &str = "_withSuperJSONProps"; 20 | 21 | // import { withSuperJSONInitProps as _withSuperJSONInitProps } from "next-superjson-plugin/tools"; 22 | static SUPERJSON_INIT_PROPS_IMPORTED: &str = "withSuperJSONInitProps"; 23 | pub static SUPERJSON_INIT_PROPS_LOCAL: &str = "_withSuperJSONInitProps"; 24 | 25 | // import { withSuperJSONPage as _withSuperJSONPage } from "next-superjson-plugin/tools"; 26 | static SUPERJSON_PAGE_IMPORTED: &str = "withSuperJSONPage"; 27 | pub static SUPERJSON_PAGE_LOCAL: &str = "_withSuperJSONPage"; 28 | 29 | // import { not_gSSP as _NEXT_SUPERJSON_IMPORTED_PROPS } from '..' 30 | // const _NEXT_SUPERJSON_SSG_PROPS = wrap(_NEXT_SUPERJSON_IMPORTED_PROPS) 31 | // export { _NEXT_SUPERJSON_SSG_PROPS as gSSP } 32 | pub static NEXT_SSG_PROPS_LOCAL: &str = "_NEXT_SUPERJSON_IMPORTED_PROPS"; 33 | pub static NEXT_SSG_PROPS_ORIG: &str = "_NEXT_SUPERJSON_SSG_PROPS"; 34 | 35 | // import { unwrapped as _NEXT_SUPERJSON_IMPORTED_PAGE } from 'src' 36 | // export default wrap(_NEXT_SUPERJSON_IMPORTED_PAGE) 37 | static NEXT_PAGE_LOCAL: &str = "_NEXT_SUPERJSON_IMPORTED_PAGE"; 38 | 39 | #[derive(Default)] 40 | struct PositionHolder { 41 | orig: Option, 42 | decl: Option, 43 | spec: Option, 44 | } 45 | 46 | #[derive(Default)] 47 | struct TransformTarget { 48 | export: PositionHolder, 49 | ident: PositionHolder, 50 | skip: bool, 51 | } 52 | 53 | struct PageTransformer { 54 | excluded: Vec, 55 | 56 | props: TransformTarget, 57 | page: TransformTarget, 58 | 59 | has_init_props: bool, 60 | use_init_props: bool, 61 | keep_init_props: bool, 62 | 63 | has_multiple_props: bool, 64 | } 65 | 66 | pub fn transform_page(config: Config) -> impl VisitMut { 67 | PageTransformer { 68 | excluded: config.excluded, 69 | 70 | props: Default::default(), 71 | page: Default::default(), 72 | 73 | has_init_props: false, 74 | use_init_props: false, 75 | keep_init_props: false, 76 | 77 | has_multiple_props: false, 78 | } 79 | } 80 | 81 | impl VisitMut for PageTransformer { 82 | fn visit_mut_module_items(&mut self, items: &mut Vec) { 83 | self.find_page(items); 84 | 85 | if self.page.export.orig.is_none() { 86 | return; 87 | } 88 | 89 | self.find_ssg_prop(items); 90 | 91 | if self.props.export.orig.is_none() { 92 | if !self.use_init_props || self.has_multiple_props { 93 | return; 94 | } 95 | 96 | self.props.skip = true; 97 | } 98 | 99 | let mut new_items = vec![]; 100 | 101 | let mut temp_page = None; 102 | 103 | for (pos, item) in items.iter_mut().enumerate() { 104 | if self.props.ident.orig.is_some() 105 | && pos == self.props.ident.orig.unwrap() 106 | && !self.props.skip 107 | { 108 | match item { 109 | // gSSP = .. 110 | // => 111 | // gSSP = wrap(.., excluded) 112 | ModuleItem::Stmt(Stmt::Expr(ExprStmt { expr, .. })) => { 113 | let assign_expr = expr.as_mut_assign().unwrap(); 114 | 115 | assign_expr.right = 116 | assign_expr.right.take().wrap_props(self.excluded_expr()); 117 | 118 | new_items.push(item.take()); 119 | } 120 | ModuleItem::Stmt(Stmt::Decl(decl)) => match decl { 121 | // function gSSP .. 122 | // => 123 | // const gSSP = wrap(.., excluded) 124 | Decl::Fn(fn_decl) => { 125 | *decl = fn_decl.take().as_wrapped_var_decl(self.excluded_expr()); 126 | 127 | new_items.push(item.take()); 128 | } 129 | // const gSSP = .. 130 | // => 131 | // const gSSP = wrap(.., excluded) 132 | Decl::Var(var_decl) => { 133 | let v = var_decl.decls.index_mut(self.props.ident.decl.unwrap()); 134 | 135 | v.init = Some(v.init.take().unwrap().wrap_props(self.excluded_expr())); 136 | 137 | new_items.push(item.take()); 138 | } 139 | _ => {} 140 | }, 141 | // export function not_gSSP() .. 142 | // => 143 | // export const not_gSSP = wrap(function not_gSSP()..) 144 | ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(ExportDecl { 145 | decl: export_decl, 146 | .. 147 | })) => match export_decl { 148 | Decl::Fn(fn_decl) => { 149 | *export_decl = fn_decl.take().as_wrapped_var_decl(self.excluded_expr()); 150 | 151 | new_items.push(item.take()); 152 | } 153 | // export const not_gSSP = .. 154 | // => 155 | // export const not_gSSP = wrap(..) 156 | Decl::Var(var_decl) => { 157 | let v = var_decl.decls.index_mut(self.props.ident.decl.unwrap()); 158 | 159 | v.init = Some(v.init.take().unwrap().wrap_props(self.excluded_expr())); 160 | 161 | new_items.push(item.take()); 162 | } 163 | _ => {} 164 | }, 165 | // import { not_gSSP as gSSP } from '..' <- 166 | // export { gSSP } 167 | // => 168 | // import { not_gSSP as _NEXT_SUPERJSON_IMPORTED_PROPS } from '..' 169 | // const _NEXT_SUPERJSON_SSG_PROPS = wrap(_NEXT_SUPERJSON_IMPORTED_PROPS) 170 | // export { _NEXT_SUPERJSON_SSG_PROPS as gSSP } 171 | // 172 | // import { not_gSSP } from '..' <- 173 | // export { not_gSSP as gSSP } 174 | // => 175 | // import { not_gSSP as _NEXT_SUPERJSON_IMPORTED_PROPS } from '..' 176 | // const _NEXT_SUPERJSON_SSG_PROPS = wrap(_NEXT_SUPERJSON_IMPORTED_PROPS) 177 | // export { _NEXT_SUPERJSON_SSG_PROPS as gSSP } 178 | ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { 179 | specifiers, .. 180 | })) => { 181 | let s = specifiers 182 | .index_mut(self.props.ident.spec.unwrap()) 183 | .as_mut_named() 184 | .unwrap(); 185 | 186 | // imported: None, local: not_gSSP 187 | // => 188 | // imported: not_gSSP, local: _NEXT_SUPERJSON_IMPORTED_PROPS 189 | if s.imported.is_none() { 190 | s.imported = Some(ModuleExportName::Ident(s.local.take())); 191 | } 192 | 193 | s.local = Ident::new(NEXT_SSG_PROPS_LOCAL.into(), DUMMY_SP); 194 | 195 | new_items.push(item.take()); 196 | 197 | new_items.push(temp_props_item(self.excluded_expr())); 198 | } 199 | _ => {} 200 | } 201 | } else { 202 | if !self.props.skip && pos == self.props.export.orig.unwrap() { 203 | match item { 204 | ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(ExportDecl { 205 | decl: export_decl, 206 | .. 207 | })) => { 208 | match export_decl { 209 | // export function gSSP.. 210 | // => 211 | // export const gSSP = wrap(.., excluded) 212 | Decl::Fn(fn_decl) => { 213 | *export_decl = 214 | fn_decl.take().as_wrapped_var_decl(self.excluded_expr()); 215 | } 216 | // export const gSSP = .. 217 | // => 218 | // export const gSSP = wrap(.., excluded) 219 | Decl::Var(var_decl) => { 220 | let v = 221 | var_decl.decls.index_mut(self.props.export.decl.unwrap()); 222 | 223 | v.init = Some( 224 | v.init.take().unwrap().wrap_props(self.excluded_expr()), 225 | ); 226 | } 227 | _ => {} 228 | } 229 | } 230 | 231 | ModuleItem::ModuleDecl(ModuleDecl::ExportNamed(NamedExport { 232 | specifiers, 233 | src, 234 | .. 235 | })) => { 236 | // export { not_gSSP as gSSP } from '..' 237 | // => 238 | // import { not_gSSP as _NEXT_SUPERJSON_IMPORTED_PROPS } from '..' 239 | // const _NEXT_SUPERJSON_SSG_PROPS = wrap(_NEXT_SUPERJSON_IMPORTED_PROPS, excluded) 240 | // export { _NEXT_SUPERJSON_SSG_PROPS as gSSP } 241 | if let Some(src) = src { 242 | let s = specifiers 243 | .index_mut(self.props.export.spec.unwrap()) 244 | .as_mut_named() 245 | .take() 246 | .unwrap(); 247 | 248 | new_items.push(temp_import_item( 249 | s.orig.clone(), 250 | NEXT_SSG_PROPS_LOCAL, 251 | src, 252 | )); 253 | 254 | new_items.push(temp_props_item(self.excluded_expr())); 255 | 256 | new_items.push(ModuleItem::ModuleDecl(ModuleDecl::ExportNamed( 257 | NamedExport { 258 | with: None, 259 | span: DUMMY_SP, 260 | specifiers: vec![ExportSpecifier::Named( 261 | ExportNamedSpecifier { 262 | exported: s.exported.take(), 263 | is_type_only: false, 264 | orig: ModuleExportName::Ident(Ident::new( 265 | NEXT_SSG_PROPS_ORIG.into(), 266 | DUMMY_SP, 267 | )), 268 | span: DUMMY_SP, 269 | }, 270 | )], 271 | src: None, 272 | type_only: false, 273 | }, 274 | ))); 275 | 276 | specifiers.remove(self.props.export.spec.unwrap()); 277 | 278 | // export { gSSP } 279 | // export { not_gSSP as gSSP } 280 | // => 281 | // export { _NEXT_SUPERJSON_SSG_PROPS as gSSP } 282 | } else { 283 | let s = specifiers 284 | .index_mut(self.props.export.spec.unwrap()) 285 | .as_mut_named() 286 | .unwrap(); 287 | 288 | if s.exported.is_none() { 289 | s.exported = Some(s.orig.clone()); 290 | } 291 | 292 | // case 1: imported 293 | // import { not_gSSP as _NEXT_SUPERJSON_IMPORTED_PROPS } 294 | // => _NEXT_SUPERJSON_SSG_PROPS 295 | // 296 | // case 2: local 297 | // const gSSP = () => {} 298 | // => gSSP 299 | if self.props.ident.spec.is_some() { 300 | s.orig = ModuleExportName::Ident(Ident::new( 301 | NEXT_SSG_PROPS_ORIG.into(), 302 | DUMMY_SP, 303 | )); 304 | } 305 | } 306 | } 307 | _ => {} 308 | } 309 | } 310 | 311 | let mut keep_page = false; 312 | 313 | if pos == self.page.export.orig.unwrap() && !self.page.skip { 314 | match item { 315 | ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultExpr( 316 | ExportDefaultExpr { expr, .. }, 317 | )) => { 318 | keep_page = true; 319 | *expr = expr.take().wrap_page(); 320 | } 321 | ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultDecl( 322 | ExportDefaultDecl { decl, .. }, 323 | )) => { 324 | keep_page = true; 325 | // TODO: remove duplicate code 326 | match decl { 327 | DefaultDecl::Class(class_expr) => { 328 | if class_expr.ident.is_some() { 329 | let id = class_expr.ident.as_ref().unwrap().clone(); 330 | 331 | new_items.push(ModuleItem::Stmt(Stmt::Decl( 332 | class_expr.take().as_class_decl().unwrap().into(), 333 | ))); 334 | 335 | *item = ModuleItem::ModuleDecl( 336 | ModuleDecl::ExportDefaultExpr(ExportDefaultExpr { 337 | expr: Box::new(Expr::Ident(id)).wrap_page(), 338 | span: DUMMY_SP, 339 | }), 340 | ); 341 | } else { 342 | let expr: Box = Box::new(class_expr.take().into()); 343 | 344 | *item = ModuleItem::ModuleDecl( 345 | ModuleDecl::ExportDefaultExpr(ExportDefaultExpr { 346 | expr: expr.wrap_page(), 347 | span: DUMMY_SP, 348 | }), 349 | ); 350 | } 351 | } 352 | DefaultDecl::Fn(fn_expr) => { 353 | if fn_expr.ident.is_some() { 354 | let id = fn_expr.ident.as_ref().unwrap().clone(); 355 | 356 | new_items.push(ModuleItem::Stmt(Stmt::Decl( 357 | fn_expr.take().as_fn_decl().unwrap().into(), 358 | ))); 359 | 360 | *item = ModuleItem::ModuleDecl( 361 | ModuleDecl::ExportDefaultExpr(ExportDefaultExpr { 362 | expr: Box::new(Expr::Ident(id)).wrap_page(), 363 | span: DUMMY_SP, 364 | }), 365 | ); 366 | } else { 367 | let expr: Box = Box::new(fn_expr.take().into()); 368 | 369 | *item = ModuleItem::ModuleDecl( 370 | ModuleDecl::ExportDefaultExpr(ExportDefaultExpr { 371 | expr: expr.wrap_page(), 372 | span: DUMMY_SP, 373 | }), 374 | ); 375 | } 376 | } 377 | _ => {} 378 | } 379 | } 380 | ModuleItem::ModuleDecl(ModuleDecl::ExportNamed(NamedExport { 381 | specifiers, 382 | src, 383 | .. 384 | })) => { 385 | let s = specifiers 386 | .index_mut(self.page.export.spec.unwrap()) 387 | .as_mut_named() 388 | .take() 389 | .unwrap(); 390 | 391 | // export { unwrapped as default } from 'src' 392 | // => 393 | // import { unwrapped as _NEXT_SUPERJSON_IMPORTED_PAGE } from 'src' 394 | // export default wrap(_NEXT_SUPERJSON_IMPORTED_PAGE) 395 | if let Some(src) = src { 396 | new_items.push(temp_import_item( 397 | s.orig.clone(), 398 | NEXT_PAGE_LOCAL, 399 | src, 400 | )); 401 | 402 | let new_page = ModuleItem::ModuleDecl( 403 | ModuleDecl::ExportDefaultExpr(ExportDefaultExpr { 404 | expr: Box::new(Expr::Ident(Ident::new( 405 | NEXT_PAGE_LOCAL.into(), 406 | DUMMY_SP, 407 | ))) 408 | .wrap_page(), 409 | span: DUMMY_SP, 410 | }), 411 | ); 412 | temp_page = Some(new_page); 413 | 414 | // export { Page as default } 415 | // => 416 | // export default wrap(Page, excluded) 417 | } else { 418 | if let ModuleExportName::Ident(id) = &s.orig { 419 | let new_page = ModuleItem::ModuleDecl( 420 | ModuleDecl::ExportDefaultExpr(ExportDefaultExpr { 421 | expr: Box::new(Expr::Ident(id.clone())).wrap_page(), 422 | span: DUMMY_SP, 423 | }), 424 | ); 425 | temp_page = Some(new_page); 426 | } 427 | } 428 | 429 | specifiers.remove(self.page.export.spec.unwrap()); 430 | } 431 | _ => {} 432 | } 433 | } 434 | 435 | match item { 436 | ModuleItem::ModuleDecl(ModuleDecl::ExportNamed(NamedExport { 437 | specifiers, 438 | .. 439 | })) => { 440 | if !specifiers.is_empty() { 441 | if !keep_page { 442 | new_items.push(item.take()); 443 | } else { 444 | temp_page = Some(item.take()); 445 | } 446 | } 447 | } 448 | _ => { 449 | if !keep_page { 450 | new_items.push(item.take()); 451 | } else { 452 | temp_page = Some(item.take()); 453 | } 454 | } 455 | } 456 | } 457 | } 458 | 459 | if let Some(tmp) = temp_page { 460 | new_items.push(tmp); 461 | } 462 | 463 | // TODO: these two stmts can be combined 464 | if !self.props.skip { 465 | prepend_stmt( 466 | &mut new_items, 467 | superjson_import_decl(SUPERJSON_PROPS_IMPORTED), 468 | ); 469 | } 470 | if self.use_init_props { 471 | prepend_stmt( 472 | &mut new_items, 473 | superjson_import_decl(SUPERJSON_INIT_PROPS_IMPORTED), 474 | ); 475 | } 476 | if !self.page.skip { 477 | prepend_stmt( 478 | &mut new_items, 479 | superjson_import_decl(SUPERJSON_PAGE_IMPORTED), 480 | ); 481 | } 482 | 483 | *items = new_items; 484 | } 485 | 486 | fn visit_mut_class_member(&mut self, member: &mut ClassMember) { 487 | member.visit_mut_children_with(self); 488 | match member { 489 | ClassMember::ClassProp(p) => { 490 | if let PropName::Ident(id) = &p.key { 491 | if &*id.sym == INITIAL_PROPS { 492 | if let Some(expr) = &mut p.value { 493 | self.use_init_props = true; 494 | if !self.keep_init_props { 495 | p.value = Some(expr.take().wrap_init_props(self.excluded_expr())); 496 | } 497 | } 498 | } 499 | } 500 | } 501 | ClassMember::Method(m) => { 502 | if let PropName::Ident(id) = &m.key { 503 | if &*id.sym == INITIAL_PROPS { 504 | self.use_init_props = true; 505 | if !self.keep_init_props { 506 | *member = ClassMember::ClassProp(ClassProp { 507 | accessibility: m.accessibility.take(), 508 | declare: false, 509 | decorators: vec![], 510 | definite: false, 511 | is_abstract: m.is_abstract, 512 | is_optional: m.is_optional, 513 | is_override: m.is_override, 514 | is_static: m.is_static, 515 | key: m.key.take(), 516 | readonly: false, 517 | span: DUMMY_SP, 518 | type_ann: None, 519 | value: Some( 520 | Box::new(Expr::Fn(FnExpr { 521 | function: m.function.take(), 522 | ident: None, 523 | })) 524 | .wrap_init_props(self.excluded_expr()), 525 | ), 526 | }); 527 | } 528 | } 529 | } 530 | } 531 | _ => {} 532 | } 533 | } 534 | 535 | fn visit_mut_assign_expr(&mut self, a: &mut AssignExpr) { 536 | a.visit_mut_children_with(self); 537 | 538 | if a.left.is_simple() { 539 | if let Some(mut expr) = a.left.take().simple() { 540 | if let Some(MemberExpr { prop, .. }) = expr.as_mut_member() { 541 | prop.visit_mut_children_with(self); 542 | } 543 | 544 | if self.has_init_props { 545 | if !self.keep_init_props { 546 | a.right = a.right.take().wrap_init_props(self.excluded_expr()); 547 | } 548 | self.use_init_props = true; 549 | self.has_init_props = false; 550 | } 551 | 552 | a.left = AssignTarget::Simple(expr); 553 | } 554 | } 555 | } 556 | 557 | fn visit_mut_member_prop(&mut self, p: &mut MemberProp) { 558 | p.visit_mut_children_with(self); 559 | 560 | if let Some(id) = p.as_ident() { 561 | if &*id.sym == INITIAL_PROPS { 562 | self.has_init_props = true; 563 | } 564 | } 565 | } 566 | } 567 | 568 | impl PageTransformer { 569 | pub fn excluded_expr(&mut self) -> ExprOrSpread { 570 | ExprOrSpread { 571 | spread: None, 572 | expr: Box::new(Expr::Array(ArrayLit { 573 | span: DUMMY_SP, 574 | elems: self 575 | .excluded 576 | .iter() 577 | .map(|e| { 578 | Some(ExprOrSpread { 579 | spread: None, 580 | expr: Box::new(Expr::Lit(Lit::Str(Str { 581 | span: DUMMY_SP, 582 | value: e.clone().into(), 583 | raw: None, 584 | }))), 585 | }) 586 | }) 587 | .collect(), 588 | })), 589 | } 590 | } 591 | 592 | pub fn find_ssg_prop(&mut self, items: &mut Vec) { 593 | let mut ssg_prop_ident = None; 594 | 595 | let mut first = None; 596 | 597 | items.iter_mut().enumerate().any(|(pos, item)| { 598 | let found = match item { 599 | // check has ssg props 600 | ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(ExportDecl { decl, .. })) => { 601 | match decl { 602 | Decl::Fn(fn_decl) => SSG_EXPORTS.contains(&&*fn_decl.ident.sym), 603 | Decl::Var(var_decl) => { 604 | let pos = var_decl.decls.iter().position(|decl| { 605 | SSG_EXPORTS.contains(&&*decl.name.as_ident().unwrap().sym) 606 | }); 607 | 608 | if self.props.export.decl.is_none() { 609 | self.props.export.decl = pos; 610 | } 611 | 612 | pos.is_some() 613 | } 614 | _ => false, 615 | } 616 | } 617 | ModuleItem::ModuleDecl(ModuleDecl::ExportNamed(NamedExport { 618 | specifiers, 619 | src, 620 | .. 621 | })) => { 622 | let pos = specifiers.iter().position(|specifier| match specifier { 623 | ExportSpecifier::Named(ExportNamedSpecifier { 624 | orig: ModuleExportName::Ident(orig_id), 625 | exported, 626 | .. 627 | }) => { 628 | let exported_as = match exported { 629 | Some(ModuleExportName::Ident(exported_id)) => &exported_id.sym, 630 | _ => &orig_id.sym, 631 | }; 632 | 633 | if SSG_EXPORTS.contains(&&**exported_as) { 634 | self.props.skip = src.is_some() 635 | && (exported.is_none() || (&&**exported_as == &&*orig_id.sym)); 636 | 637 | if !self.props.skip { 638 | ssg_prop_ident = Some((*orig_id.sym).to_string()); 639 | } 640 | return true; 641 | } 642 | false 643 | } 644 | _ => false, 645 | }); 646 | 647 | if self.props.export.spec.is_none() { 648 | self.props.export.spec = pos; 649 | } 650 | 651 | pos.is_some() 652 | } 653 | _ => false, 654 | }; 655 | 656 | if found { 657 | if first.is_some() { 658 | self.has_multiple_props = true; 659 | return true; 660 | } 661 | first = Some(pos); 662 | } 663 | 664 | false 665 | }); 666 | 667 | if self.has_multiple_props { 668 | return; 669 | } 670 | 671 | self.keep_init_props = first.is_some(); 672 | 673 | // check initial props 674 | items 675 | .iter_mut() 676 | .for_each(|item| item.visit_mut_children_with(self)); 677 | 678 | if first.is_some() && self.use_init_props { 679 | self.has_multiple_props = true; 680 | return; 681 | } 682 | 683 | self.props.export.orig = first; 684 | 685 | if ssg_prop_ident.is_some() && !self.props.skip { 686 | let mut n = items.len(); 687 | 688 | while n > 0 { 689 | n -= 1; 690 | 691 | if self.props.export.orig.unwrap() == n { 692 | continue; 693 | } 694 | 695 | match &items[n] { 696 | // gSSP = .. 697 | ModuleItem::Stmt(Stmt::Expr(ExprStmt { expr, .. })) => { 698 | if expr.is_assign() { 699 | let assign = expr.as_assign().unwrap(); 700 | 701 | let left = assign.left.as_ident(); 702 | 703 | if left.is_some() { 704 | if assign.op == op!("=") 705 | && &*left.unwrap().sym == ssg_prop_ident.as_ref().unwrap() 706 | { 707 | self.props.ident.orig = Some(n); 708 | break; 709 | } 710 | } 711 | } 712 | } 713 | // function gSSP() .. 714 | // const gSSP = .. 715 | ModuleItem::Stmt(Stmt::Decl(decl)) => match decl { 716 | Decl::Fn(fn_decl) => { 717 | if &*fn_decl.ident.sym == ssg_prop_ident.as_ref().unwrap() { 718 | self.props.ident.orig = Some(n); 719 | break; 720 | } 721 | } 722 | Decl::Var(var_decl) => { 723 | self.props.ident.decl = var_decl.decls.iter().position(|decl| { 724 | let id = decl.name.as_ident(); 725 | 726 | if id.is_some() 727 | && &*id.unwrap().sym == ssg_prop_ident.as_ref().unwrap() 728 | { 729 | self.props.ident.orig = Some(n); 730 | return true; 731 | } 732 | 733 | false 734 | }); 735 | 736 | if self.props.ident.decl.is_some() { 737 | break; 738 | } 739 | } 740 | _ => {} 741 | }, 742 | 743 | // export function not_gSSP() .. 744 | // export const not_gSSP = .. 745 | ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(ExportDecl { 746 | decl: export_decl, 747 | .. 748 | })) => match export_decl { 749 | Decl::Fn(fn_decl) => { 750 | if &*fn_decl.ident.sym == ssg_prop_ident.as_ref().unwrap() { 751 | self.props.ident.orig = Some(n); 752 | break; 753 | } 754 | } 755 | Decl::Var(var_decl) => { 756 | self.props.ident.decl = var_decl.decls.iter().position(|decl| { 757 | let id = decl.name.as_ident(); 758 | 759 | if id.is_some() 760 | && &*id.unwrap().sym == ssg_prop_ident.as_ref().unwrap() 761 | { 762 | self.props.ident.orig = Some(n); 763 | return true; 764 | } 765 | 766 | false 767 | }); 768 | 769 | if self.props.ident.decl.is_some() { 770 | break; 771 | } 772 | } 773 | _ => {} 774 | }, 775 | // import { gSSP } from '..' 776 | ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { 777 | specifiers, .. 778 | })) => { 779 | self.props.ident.spec = specifiers.iter().position(|specifier| { 780 | if let ImportSpecifier::Named(ImportNamedSpecifier { 781 | local, 782 | imported, 783 | .. 784 | }) = specifier 785 | { 786 | if &*local.sym == ssg_prop_ident.as_ref().unwrap() { 787 | if imported.is_some() { 788 | if let ModuleExportName::Ident(ident) = 789 | imported.as_ref().unwrap() 790 | { 791 | self.props.skip = SSG_EXPORTS.contains(&&*ident.sym); 792 | } 793 | } 794 | 795 | self.props.ident.orig = Some(n); 796 | return true; 797 | } 798 | } 799 | false 800 | }); 801 | 802 | if self.props.ident.orig.is_some() { 803 | break; 804 | } 805 | } 806 | _ => {} 807 | } 808 | } 809 | } 810 | } 811 | 812 | pub fn find_page(&mut self, items: &Vec) { 813 | self.page.export.orig = items.iter().position(|item| match item { 814 | // check has page 815 | ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultExpr(_)) => true, 816 | ModuleItem::ModuleDecl(ModuleDecl::ExportDefaultDecl(_)) => true, 817 | ModuleItem::ModuleDecl(ModuleDecl::ExportNamed(NamedExport { 818 | specifiers, 819 | src, 820 | .. 821 | })) => { 822 | self.page.export.spec = specifiers.iter().position(|spec| match spec { 823 | ExportSpecifier::Named(ExportNamedSpecifier { 824 | orig: ModuleExportName::Ident(Ident { sym, .. }), 825 | exported, 826 | .. 827 | }) => match exported { 828 | Some(ModuleExportName::Ident(Ident { 829 | sym: exported_sym, .. 830 | })) => { 831 | self.page.skip = 832 | exported_sym == "default" && sym == "default" && src.is_some(); 833 | exported_sym == "default" 834 | } 835 | _ => { 836 | // export { default } from 'source' -> skip 837 | self.page.skip = src.is_some() && sym == "default"; 838 | self.page.skip 839 | } 840 | }, 841 | _ => false, 842 | }); 843 | 844 | self.page.export.spec.is_some() 845 | } 846 | _ => false, 847 | }) 848 | } 849 | } 850 | -------------------------------------------------------------------------------- /src/utils.rs: -------------------------------------------------------------------------------- 1 | use swc_core::{ 2 | common::{util::take::Take, DUMMY_SP}, 3 | ecma::{ast::*, utils::ExprFactory}, 4 | }; 5 | 6 | use crate::page::{ 7 | NEXT_SSG_PROPS_LOCAL, NEXT_SSG_PROPS_ORIG, SUPERJSON_INIT_PROPS_LOCAL, SUPERJSON_PAGE_LOCAL, 8 | SUPERJSON_PROPS_LOCAL, 9 | }; 10 | 11 | pub fn superjson_import_decl(superjson_import_name: &str) -> ModuleItem { 12 | ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { 13 | with: None, 14 | phase: ImportPhase::Evaluation, 15 | span: DUMMY_SP, 16 | type_only: false, 17 | specifiers: vec![ImportSpecifier::Named(ImportNamedSpecifier { 18 | local: Ident { 19 | sym: format!("_{superjson_import_name}").into(), 20 | span: DUMMY_SP, 21 | optional: false, 22 | }, 23 | span: DUMMY_SP, 24 | imported: Some(ModuleExportName::Ident(Ident { 25 | //sym: superjson_import_name.into(), 26 | sym: superjson_import_name.into(), 27 | span: DUMMY_SP, 28 | optional: false, 29 | })), 30 | is_type_only: false, 31 | })], 32 | src: Box::new(Str { 33 | span: DUMMY_SP, 34 | value: "next-superjson-plugin/tools".into(), 35 | raw: None, 36 | }), 37 | })) 38 | } 39 | 40 | pub fn temp_props_item(excluded: ExprOrSpread) -> ModuleItem { 41 | ModuleItem::Stmt(Stmt::Decl(Decl::Var(Box::new(VarDecl { 42 | declare: false, 43 | decls: vec![VarDeclarator { 44 | definite: false, 45 | init: Some( 46 | Box::new(Expr::Ident(Ident::new( 47 | NEXT_SSG_PROPS_LOCAL.into(), 48 | DUMMY_SP, 49 | ))) 50 | .wrap_props(excluded), 51 | ), 52 | name: Pat::Ident(BindingIdent { 53 | id: Ident::new(NEXT_SSG_PROPS_ORIG.into(), DUMMY_SP), 54 | type_ann: None, 55 | }), 56 | span: DUMMY_SP, 57 | }], 58 | kind: VarDeclKind::Const, 59 | span: DUMMY_SP, 60 | })))) 61 | } 62 | 63 | pub fn temp_import_item(imported: ModuleExportName, local: &str, src: &mut Str) -> ModuleItem { 64 | ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { 65 | with: None, 66 | phase: ImportPhase::Evaluation, 67 | span: DUMMY_SP, 68 | specifiers: vec![ImportSpecifier::Named(ImportNamedSpecifier { 69 | imported: Some(imported), 70 | is_type_only: false, 71 | local: Ident::new(local.into(), DUMMY_SP), 72 | span: DUMMY_SP, 73 | })], 74 | // should clone 75 | src: Box::new(src.clone()), 76 | type_only: false, 77 | })) 78 | } 79 | 80 | pub trait Wrapper { 81 | fn wrap_props(self, excluded: ExprOrSpread) -> Box; 82 | fn wrap_init_props(self, excluded: ExprOrSpread) -> Box; 83 | fn wrap_page(self) -> Box; 84 | } 85 | 86 | impl Wrapper for Box { 87 | fn wrap_props(self, excluded: ExprOrSpread) -> Box { 88 | Box::new(Expr::Call(CallExpr { 89 | args: vec![self.as_arg(), excluded], 90 | callee: Ident::new(SUPERJSON_PROPS_LOCAL.into(), DUMMY_SP).as_callee(), 91 | span: DUMMY_SP, 92 | type_args: None, 93 | })) 94 | } 95 | fn wrap_init_props(self, excluded: ExprOrSpread) -> Box { 96 | Box::new(Expr::Call(CallExpr { 97 | args: vec![self.as_arg(), excluded], 98 | callee: Ident::new(SUPERJSON_INIT_PROPS_LOCAL.into(), DUMMY_SP).as_callee(), 99 | span: DUMMY_SP, 100 | type_args: None, 101 | })) 102 | } 103 | fn wrap_page(self) -> Box { 104 | Box::new(Expr::Call(CallExpr { 105 | args: vec![self.as_arg()], 106 | callee: Ident::new(SUPERJSON_PAGE_LOCAL.into(), DUMMY_SP).as_callee(), 107 | span: DUMMY_SP, 108 | type_args: None, 109 | })) 110 | } 111 | } 112 | 113 | pub trait DeclUtil { 114 | fn as_wrapped_var_decl(self, excluded: ExprOrSpread) -> Decl; 115 | } 116 | 117 | impl DeclUtil for FnDecl { 118 | fn as_wrapped_var_decl(mut self, excluded: ExprOrSpread) -> Decl { 119 | Decl::Var(Box::new(VarDecl { 120 | declare: false, 121 | decls: vec![VarDeclarator { 122 | definite: false, 123 | init: Some( 124 | Box::new(Expr::Fn(FnExpr { 125 | function: self.function.take(), 126 | ident: None, 127 | })) 128 | .wrap_props(excluded), 129 | ), 130 | name: Pat::Ident(BindingIdent { 131 | id: self.ident.take(), 132 | type_ann: None, 133 | }), 134 | span: DUMMY_SP, 135 | }], 136 | kind: VarDeclKind::Const, 137 | span: DUMMY_SP, 138 | })) 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /tests/fixture.rs: -------------------------------------------------------------------------------- 1 | use std::path::PathBuf; 2 | use swc_core::ecma::{ 3 | parser::{EsConfig, Syntax}, 4 | transforms::testing::{test_fixture, FixtureTestConfig}, 5 | visit::as_folder, 6 | }; 7 | use testing::fixture; 8 | 9 | use next_superjson::{app::transform_app, page::transform_page, Config}; 10 | 11 | #[fixture("tests/fixture/page/**/code.js")] 12 | fn fixture_page(input: PathBuf) { 13 | let output = input.with_file_name("output.js"); 14 | 15 | test_fixture( 16 | Syntax::Es(EsConfig { 17 | jsx: true, 18 | ..Default::default() 19 | }), 20 | &|_| { 21 | as_folder(transform_page(Config { 22 | excluded: vec!["smth".to_string()], 23 | })) 24 | }, 25 | &input, 26 | &output, 27 | FixtureTestConfig { 28 | ..Default::default() 29 | }, 30 | ); 31 | } 32 | 33 | #[fixture("tests/fixture/app/**/code.js")] 34 | fn fixture_app(input: PathBuf) { 35 | let output = input.with_file_name("output.js"); 36 | 37 | test_fixture( 38 | Syntax::Es(EsConfig { 39 | jsx: true, 40 | ..Default::default() 41 | }), 42 | &|_| { 43 | as_folder(transform_app(Config { 44 | excluded: vec!["smth".to_string()], 45 | })) 46 | }, 47 | &input, 48 | &output, 49 | FixtureTestConfig { 50 | ..Default::default() 51 | }, 52 | ); 53 | } 54 | -------------------------------------------------------------------------------- /tests/fixture/app/children/code.js: -------------------------------------------------------------------------------- 1 | import ClientComponent from "./ClientComponent"; 2 | 3 | export default function Page() { 4 | const rest = {}; 5 | const date = new Date(); 6 | 7 | return ( 8 | 9 |

children

10 |
11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /tests/fixture/app/children/output.js: -------------------------------------------------------------------------------- 1 | import { serialize } from "next-superjson-plugin/tools"; 2 | import SuperJSONComponent from "next-superjson-plugin/client"; 3 | import ClientComponent from "./ClientComponent"; 4 | export default function Page() { 5 | const rest = {}; 6 | const date = new Date(); 7 | return 11 | 12 |

children

13 | 14 |
; 15 | } 16 | -------------------------------------------------------------------------------- /tests/fixture/app/general/code.js: -------------------------------------------------------------------------------- 1 | import ServerComponent from "./ServerComponent"; 2 | import ClientComponent from "./ClientComponent"; 3 | 4 | export default function Page() { 5 | const rest = {}; 6 | const date = new Date(); 7 | 8 | return ( 9 | <> 10 | 11 | 12 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /tests/fixture/app/general/output.js: -------------------------------------------------------------------------------- 1 | import { serialize } from "next-superjson-plugin/tools"; 2 | import SuperJSONComponent from "next-superjson-plugin/client"; 3 | import ServerComponent from "./ServerComponent"; 4 | import ClientComponent from "./ClientComponent"; 5 | 6 | export default function Page() { 7 | const rest = {}; 8 | const date = new Date(); 9 | 10 | return <> 11 | 12 | 19 | ; 20 | } 21 | -------------------------------------------------------------------------------- /tests/fixture/app/member/code.js: -------------------------------------------------------------------------------- 1 | import ServerComponent from "./ServerComponent"; 2 | import Client from "./Client"; 3 | 4 | export default function Page() { 5 | const rest = {}; 6 | const date = new Date(); 7 | 8 | return ( 9 | <> 10 | 11 | 12 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /tests/fixture/app/member/output.js: -------------------------------------------------------------------------------- 1 | import { serialize } from "next-superjson-plugin/tools"; 2 | import SuperJSONComponent from "next-superjson-plugin/client"; 3 | import ServerComponent from "./ServerComponent"; 4 | import Client from "./Client"; 5 | 6 | export default function Page() { 7 | const rest = {}; 8 | const date = new Date(); 9 | 10 | return <> 11 | 12 | 19 | ; 20 | } 21 | -------------------------------------------------------------------------------- /tests/fixture/page/skip/either-is-missing/page/code.js: -------------------------------------------------------------------------------- 1 | export const getServerSideProps = () => {} -------------------------------------------------------------------------------- /tests/fixture/page/skip/either-is-missing/page/output.js: -------------------------------------------------------------------------------- 1 | export const getServerSideProps = () => {} -------------------------------------------------------------------------------- /tests/fixture/page/skip/either-is-missing/ssg_props/code.js: -------------------------------------------------------------------------------- 1 | export default function Page() {} -------------------------------------------------------------------------------- /tests/fixture/page/skip/either-is-missing/ssg_props/output.js: -------------------------------------------------------------------------------- 1 | export default function Page() {} -------------------------------------------------------------------------------- /tests/fixture/page/skip/export-from/code.js: -------------------------------------------------------------------------------- 1 | export { getServerSideProps, default } from 'source' -------------------------------------------------------------------------------- /tests/fixture/page/skip/export-from/output.js: -------------------------------------------------------------------------------- 1 | export { getServerSideProps, default } from 'source' -------------------------------------------------------------------------------- /tests/fixture/page/skip/gip-in-app-js/code.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { 3 | value: true 4 | }); 5 | Object.defineProperty(exports, "AppInitialProps", { 6 | enumerable: true, 7 | get: function() { 8 | return _utils.AppInitialProps; 9 | } 10 | }); 11 | Object.defineProperty(exports, "NextWebVitalsMetric", { 12 | enumerable: true, 13 | get: function() { 14 | return _utils.NextWebVitalsMetric; 15 | } 16 | }); 17 | exports.default = void 0; 18 | var _async_to_generator = require("@swc/helpers/lib/_async_to_generator.js").default; 19 | var _interop_require_default = require("@swc/helpers/lib/_interop_require_default.js").default; 20 | var _react = _interop_require_default(require("react")); 21 | var _utils = require("../shared/lib/utils"); 22 | function appGetInitialProps(_) { 23 | return _appGetInitialProps.apply(this, arguments); 24 | } 25 | function _appGetInitialProps() { 26 | _appGetInitialProps = /** 27 | * `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization. 28 | * This allows for keeping state between navigation, custom error handling, injecting additional data. 29 | */ _async_to_generator(function*({ Component , ctx }) { 30 | const pageProps = yield (0, _utils).loadGetInitialProps(Component, ctx); 31 | return { 32 | pageProps 33 | }; 34 | }); 35 | return _appGetInitialProps.apply(this, arguments); 36 | } 37 | var _Component; 38 | class App extends (_Component = _react.default.Component) { 39 | render() { 40 | const { Component , pageProps } = this.props; 41 | return /*#__PURE__*/ _react.default.createElement(Component, Object.assign({}, pageProps)); 42 | } 43 | } 44 | App.origGetInitialProps = appGetInitialProps; 45 | App.getInitialProps = appGetInitialProps; 46 | exports.default = App; -------------------------------------------------------------------------------- /tests/fixture/page/skip/gip-in-app-js/output.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { 3 | value: true 4 | }); 5 | Object.defineProperty(exports, "AppInitialProps", { 6 | enumerable: true, 7 | get: function() { 8 | return _utils.AppInitialProps; 9 | } 10 | }); 11 | Object.defineProperty(exports, "NextWebVitalsMetric", { 12 | enumerable: true, 13 | get: function() { 14 | return _utils.NextWebVitalsMetric; 15 | } 16 | }); 17 | exports.default = void 0; 18 | var _async_to_generator = require("@swc/helpers/lib/_async_to_generator.js").default; 19 | var _interop_require_default = require("@swc/helpers/lib/_interop_require_default.js").default; 20 | var _react = _interop_require_default(require("react")); 21 | var _utils = require("../shared/lib/utils"); 22 | function appGetInitialProps(_) { 23 | return _appGetInitialProps.apply(this, arguments); 24 | } 25 | function _appGetInitialProps() { 26 | _appGetInitialProps = /** 27 | * `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization. 28 | * This allows for keeping state between navigation, custom error handling, injecting additional data. 29 | */ _async_to_generator(function*({ Component , ctx }) { 30 | const pageProps = yield (0, _utils).loadGetInitialProps(Component, ctx); 31 | return { 32 | pageProps 33 | }; 34 | }); 35 | return _appGetInitialProps.apply(this, arguments); 36 | } 37 | var _Component; 38 | class App extends (_Component = _react.default.Component) { 39 | render() { 40 | const { Component , pageProps } = this.props; 41 | return /*#__PURE__*/ _react.default.createElement(Component, Object.assign({}, pageProps)); 42 | } 43 | } 44 | App.origGetInitialProps = appGetInitialProps; 45 | App.getInitialProps = appGetInitialProps; 46 | exports.default = App; -------------------------------------------------------------------------------- /tests/fixture/page/skip/multiple-exports/init-and-other/code.js: -------------------------------------------------------------------------------- 1 | export default function Page() { 2 | return
Page
; 3 | } 4 | 5 | Page.getInitialProps = () => { 6 | return {}; 7 | } 8 | 9 | export const getStaticProps = () => { 10 | return { 11 | props: {}, 12 | }; 13 | } -------------------------------------------------------------------------------- /tests/fixture/page/skip/multiple-exports/init-and-other/output.js: -------------------------------------------------------------------------------- 1 | export default function Page() { 2 | return
Page
; 3 | } 4 | 5 | Page.getInitialProps = () => { 6 | return {}; 7 | } 8 | 9 | export const getStaticProps = () => { 10 | return { 11 | props: {}, 12 | }; 13 | } -------------------------------------------------------------------------------- /tests/fixture/page/skip/multiple-exports/init-and-others/code.js: -------------------------------------------------------------------------------- 1 | export default function Page() { 2 | return
Page
; 3 | } 4 | 5 | Page.getInitialProps = () => { 6 | return {}; 7 | } 8 | 9 | export const getStaticProps = () => { 10 | return { 11 | props: {}, 12 | }; 13 | } 14 | 15 | export const getServerSideProps = () => { 16 | return { 17 | props: {}, 18 | }; 19 | } -------------------------------------------------------------------------------- /tests/fixture/page/skip/multiple-exports/init-and-others/output.js: -------------------------------------------------------------------------------- 1 | export default function Page() { 2 | return
Page
; 3 | } 4 | 5 | Page.getInitialProps = () => { 6 | return {}; 7 | } 8 | 9 | export const getStaticProps = () => { 10 | return { 11 | props: {}, 12 | }; 13 | } 14 | 15 | export const getServerSideProps = () => { 16 | return { 17 | props: {}, 18 | }; 19 | } -------------------------------------------------------------------------------- /tests/fixture/page/transform/export-from/page/code.js: -------------------------------------------------------------------------------- 1 | export { foo as default, getServerSideProps } from 'source' -------------------------------------------------------------------------------- /tests/fixture/page/transform/export-from/page/output.js: -------------------------------------------------------------------------------- 1 | import { withSuperJSONPage as _withSuperJSONPage } from "next-superjson-plugin/tools"; 2 | import { foo as _NEXT_SUPERJSON_IMPORTED_PAGE } from 'source'; 3 | export { getServerSideProps } from 'source'; 4 | export default _withSuperJSONPage(_NEXT_SUPERJSON_IMPORTED_PAGE); -------------------------------------------------------------------------------- /tests/fixture/page/transform/export-from/props/code.js: -------------------------------------------------------------------------------- 1 | export { default, foo as getServerSideProps } from 'source' -------------------------------------------------------------------------------- /tests/fixture/page/transform/export-from/props/output.js: -------------------------------------------------------------------------------- 1 | import { withSuperJSONProps as _withSuperJSONProps } from "next-superjson-plugin/tools"; 2 | import { foo as _NEXT_SUPERJSON_IMPORTED_PROPS } from 'source'; 3 | const _NEXT_SUPERJSON_SSG_PROPS = _withSuperJSONProps(_NEXT_SUPERJSON_IMPORTED_PROPS, [ 4 | "smth" 5 | ]); 6 | export { _NEXT_SUPERJSON_SSG_PROPS as getServerSideProps }; 7 | export { default } from 'source'; -------------------------------------------------------------------------------- /tests/fixture/page/transform/general/arrow/code.js: -------------------------------------------------------------------------------- 1 | export const getServerSideProps = async () => {} 2 | 3 | export default () => { 4 | return <>; 5 | } 6 | -------------------------------------------------------------------------------- /tests/fixture/page/transform/general/arrow/output.js: -------------------------------------------------------------------------------- 1 | import { withSuperJSONPage as _withSuperJSONPage } from "next-superjson-plugin/tools"; 2 | import { withSuperJSONProps as _withSuperJSONProps } from "next-superjson-plugin/tools"; 3 | export const getServerSideProps = _withSuperJSONProps(async () => {}, [ 4 | "smth" 5 | ]); 6 | export default _withSuperJSONPage(() => { 7 | return <>; 8 | }); 9 | -------------------------------------------------------------------------------- /tests/fixture/page/transform/general/class/code.js: -------------------------------------------------------------------------------- 1 | export async function getServerSideProps() {} 2 | 3 | export default class Page { 4 | render() { 5 | return <>; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/fixture/page/transform/general/class/output.js: -------------------------------------------------------------------------------- 1 | import { withSuperJSONPage as _withSuperJSONPage } from "next-superjson-plugin/tools"; 2 | import { withSuperJSONProps as _withSuperJSONProps } from "next-superjson-plugin/tools"; 3 | export const getServerSideProps = _withSuperJSONProps(async function() {}, [ 4 | "smth" 5 | ]); 6 | class Page { 7 | render() { 8 | return <>; 9 | } 10 | } 11 | export default _withSuperJSONPage(Page); 12 | -------------------------------------------------------------------------------- /tests/fixture/page/transform/general/function/code.js: -------------------------------------------------------------------------------- 1 | export async function getServerSideProps() {} 2 | 3 | export default function Page() { 4 | return <>; 5 | } 6 | -------------------------------------------------------------------------------- /tests/fixture/page/transform/general/function/output.js: -------------------------------------------------------------------------------- 1 | import { withSuperJSONPage as _withSuperJSONPage } from "next-superjson-plugin/tools"; 2 | import { withSuperJSONProps as _withSuperJSONProps } from "next-superjson-plugin/tools"; 3 | export const getServerSideProps = _withSuperJSONProps(async function () {}, [ 4 | "smth", 5 | ]); 6 | function Page() { 7 | return <>; 8 | } 9 | export default _withSuperJSONPage(Page); 10 | -------------------------------------------------------------------------------- /tests/fixture/page/transform/get-initial-props/class/code.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | class Page extends React.Component { 4 | static async getInitialProps(ctx) { 5 | const res = await fetch('https://api.github.com/repos/vercel/next.js') 6 | const json = await res.json() 7 | return { stars: json.stargazers_count } 8 | } 9 | 10 | render() { 11 | return
Next stars: {this.props.stars}
12 | } 13 | } 14 | 15 | export default Page -------------------------------------------------------------------------------- /tests/fixture/page/transform/get-initial-props/class/output.js: -------------------------------------------------------------------------------- 1 | import { withSuperJSONPage as _withSuperJSONPage } from "next-superjson-plugin/tools"; 2 | import { withSuperJSONInitProps as _withSuperJSONInitProps } from "next-superjson-plugin/tools"; 3 | import React from 'react' 4 | 5 | class Page extends React.Component { 6 | static getInitialProps = _withSuperJSONInitProps(async function(ctx) { 7 | const res = await fetch('https://api.github.com/repos/vercel/next.js') 8 | const json = await res.json() 9 | return { stars: json.stargazers_count } 10 | }, ["smth"]) 11 | 12 | render() { 13 | return
Next stars: {this.props.stars}
14 | } 15 | } 16 | 17 | export default _withSuperJSONPage(Page) -------------------------------------------------------------------------------- /tests/fixture/page/transform/get-initial-props/function-export-page-first/code.js: -------------------------------------------------------------------------------- 1 | export default function Page({ date }) { 2 | return
{date.getDate()}
3 | } 4 | 5 | Page.getInitialProps = () => { 6 | return { 7 | date: new Date() 8 | } 9 | } -------------------------------------------------------------------------------- /tests/fixture/page/transform/get-initial-props/function-export-page-first/output.js: -------------------------------------------------------------------------------- 1 | import { withSuperJSONPage as _withSuperJSONPage } from "next-superjson-plugin/tools"; 2 | import { withSuperJSONInitProps as _withSuperJSONInitProps } from "next-superjson-plugin/tools"; 3 | 4 | function Page({ date }) { 5 | return
{date.getDate()}
6 | } 7 | 8 | Page.getInitialProps = _withSuperJSONInitProps(() => { 9 | return { 10 | date: new Date() 11 | } 12 | }, ["smth"]); 13 | 14 | export default _withSuperJSONPage(Page); -------------------------------------------------------------------------------- /tests/fixture/page/transform/get-initial-props/function/code.js: -------------------------------------------------------------------------------- 1 | function Page({ stars }) { 2 | return
Next stars: {stars}
3 | } 4 | 5 | Page.getInitialProps = async (ctx) => { 6 | const res = await fetch('https://api.github.com/repos/vercel/next.js') 7 | const json = await res.json() 8 | return { stars: json.stargazers_count } 9 | } 10 | 11 | export default Page -------------------------------------------------------------------------------- /tests/fixture/page/transform/get-initial-props/function/output.js: -------------------------------------------------------------------------------- 1 | import { withSuperJSONPage as _withSuperJSONPage } from "next-superjson-plugin/tools"; 2 | import { withSuperJSONInitProps as _withSuperJSONInitProps } from "next-superjson-plugin/tools"; 3 | 4 | function Page({ stars }) { 5 | return
Next stars: {stars}
6 | } 7 | 8 | Page.getInitialProps = _withSuperJSONInitProps(async (ctx) => { 9 | const res = await fetch('https://api.github.com/repos/vercel/next.js') 10 | const json = await res.json() 11 | return { stars: json.stargazers_count } 12 | }, ["smth"]) 13 | 14 | export default _withSuperJSONPage(Page) -------------------------------------------------------------------------------- /tests/fixture/page/transform/get-static-props-with-paths/code.js: -------------------------------------------------------------------------------- 1 | export const getStaticProps = () => {}; 2 | export const getStaticPaths = () => {}; 3 | 4 | export default () => { 5 | return <>; 6 | }; 7 | -------------------------------------------------------------------------------- /tests/fixture/page/transform/get-static-props-with-paths/output.js: -------------------------------------------------------------------------------- 1 | import { withSuperJSONPage as _withSuperJSONPage } from "next-superjson-plugin/tools"; 2 | import { withSuperJSONProps as _withSuperJSONProps } from "next-superjson-plugin/tools"; 3 | export const getStaticProps = _withSuperJSONProps(() => {}, ["smth"]); 4 | export const getStaticPaths = () => {}; 5 | export default _withSuperJSONPage(() => { 6 | return <>; 7 | }); 8 | -------------------------------------------------------------------------------- /tests/fixture/page/transform/import-export/code.js: -------------------------------------------------------------------------------- 1 | import { foo, default as Page } from 'source' 2 | 3 | export { foo as getServerSideProps } 4 | 5 | export default Page -------------------------------------------------------------------------------- /tests/fixture/page/transform/import-export/output.js: -------------------------------------------------------------------------------- 1 | import { withSuperJSONPage as _withSuperJSONPage } from "next-superjson-plugin/tools"; 2 | import { withSuperJSONProps as _withSuperJSONProps } from "next-superjson-plugin/tools"; 3 | import { foo as _NEXT_SUPERJSON_IMPORTED_PROPS, default as Page } from 'source'; 4 | const _NEXT_SUPERJSON_SSG_PROPS = _withSuperJSONProps(_NEXT_SUPERJSON_IMPORTED_PROPS, [ 5 | "smth" 6 | ]); 7 | export { _NEXT_SUPERJSON_SSG_PROPS as getServerSideProps }; 8 | export default _withSuperJSONPage(Page); -------------------------------------------------------------------------------- /tests/fixture/page/transform/mutable/code.js: -------------------------------------------------------------------------------- 1 | let foo = 1; 2 | foo = 2; 3 | export { foo as getServerSideProps }; 4 | foo = () => {}; 5 | export default () => {} 6 | -------------------------------------------------------------------------------- /tests/fixture/page/transform/mutable/output.js: -------------------------------------------------------------------------------- 1 | import { withSuperJSONPage as _withSuperJSONPage } from "next-superjson-plugin/tools"; 2 | import { withSuperJSONProps as _withSuperJSONProps } from "next-superjson-plugin/tools"; 3 | let foo = 1; 4 | foo = 2; 5 | export { foo as getServerSideProps }; 6 | foo = _withSuperJSONProps(() => {}, ["smth"]); 7 | export default _withSuperJSONPage(() => {}); 8 | -------------------------------------------------------------------------------- /tools/client.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { SuperJSONProps, withSuperJSONPage } from "./tools"; 4 | import * as React from "react"; 5 | 6 | export default function SuperJSONComponent

({ 7 | component, 8 | props, 9 | children 10 | }: { 11 | component: React.ComponentType

; 12 | props: SuperJSONProps

; 13 | children?: React.ReactNode; 14 | }) { 15 | const WithSuperJSON = withSuperJSONPage(component); 16 | return {children}; 17 | } 18 | -------------------------------------------------------------------------------- /tools/tools.tsx: -------------------------------------------------------------------------------- 1 | // original tool source from 'babel-plugin-superjson-next' 2 | 3 | import hoistNonReactStatics from "hoist-non-react-statics"; 4 | import type { GetServerSideProps } from "next"; 5 | import React from "react"; 6 | import SuperJSON from "superjson"; 7 | 8 | export type SuperJSONProps

= P & { 9 | _superjson?: ReturnType["meta"]; 10 | }; 11 | 12 | export function withSuperJSONProps

( 13 | gssp: GetServerSideProps

, 14 | exclude: string[] = [] 15 | ): GetServerSideProps> { 16 | return async function withSuperJSON(...args) { 17 | const result = await gssp(...args); 18 | 19 | if (!("props" in result)) { 20 | return result; 21 | } 22 | 23 | if (!result.props) { 24 | return result; 25 | } 26 | 27 | const excludedPropValues = exclude.map((propKey) => { 28 | const value = (result.props as any)[propKey]; 29 | delete (result.props as any)[propKey]; 30 | return value; 31 | }); 32 | 33 | const { json, meta } = SuperJSON.serialize(result.props); 34 | const props = json as any; 35 | 36 | if (meta) { 37 | props._superjson = meta; 38 | } 39 | 40 | exclude.forEach((key, index) => { 41 | const excludedPropValue = excludedPropValues[index]; 42 | if (typeof excludedPropValue !== "undefined") { 43 | props[key] = excludedPropValue; 44 | } 45 | }); 46 | 47 | return { 48 | ...result, 49 | props, 50 | }; 51 | }; 52 | } 53 | 54 | export function withSuperJSONInitProps(gip: any, exclude: string[] = []): any { 55 | return async function withSuperJSON(...args: any[]) { 56 | const result = await gip(...args); 57 | 58 | const excludedPropValues = exclude.map((propKey) => { 59 | const value = (result as any)[propKey]; 60 | delete (result as any)[propKey]; 61 | return value; 62 | }); 63 | 64 | const { json, meta } = SuperJSON.serialize(result); 65 | const props = json as any; 66 | 67 | if (meta) { 68 | props._superjson = meta; 69 | } 70 | 71 | exclude.forEach((key, index) => { 72 | const excludedPropValue = excludedPropValues[index]; 73 | if (typeof excludedPropValue !== "undefined") { 74 | props[key] = excludedPropValue; 75 | } 76 | }); 77 | 78 | return { 79 | ...result, 80 | ...props, 81 | }; 82 | }; 83 | } 84 | 85 | export function deserializeProps

(serializedProps: SuperJSONProps

): P { 86 | const { _superjson, ...props } = serializedProps; 87 | return SuperJSON.deserialize({ json: props as any, meta: _superjson }); 88 | } 89 | 90 | export function withSuperJSONPage

( 91 | Page: React.ComponentType

92 | ): React.ComponentType> { 93 | function WithSuperJSON(serializedProps: SuperJSONProps

) { 94 | return (serializedProps)} />; 95 | } 96 | 97 | hoistNonReactStatics(WithSuperJSON, Page); 98 | 99 | return WithSuperJSON; 100 | } 101 | 102 | export function serialize

(props: P): SuperJSONProps

{ 103 | const { json, meta: _superjson } = SuperJSON.serialize(props); 104 | 105 | return { 106 | ...(json as any), 107 | _superjson, 108 | }; 109 | } 110 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["tools"], 3 | "compilerOptions": { 4 | "declaration": true, 5 | "sourceMap": true, 6 | "target": "ESNext", 7 | "rootDir": "tools", 8 | "outDir": "dist", 9 | "strict": true, 10 | "module": "ESNext", 11 | "moduleResolution": "Bundler", 12 | "esModuleInterop": true, 13 | "jsx": "react-jsx", 14 | "skipLibCheck": true 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@next/env@13.0.3": 6 | version "13.0.3" 7 | resolved "https://registry.yarnpkg.com/@next/env/-/env-13.0.3.tgz#f2ecec9a6634aed28dca9e7b79bd65d9c516a1b4" 8 | integrity sha512-/4WzeG61Ot/PxsghXkSqQJ6UohFfwXoZ3dtsypmR9EBP+OIax9JRq0trq8Z/LCT9Aq4JbihVkaazRWguORjTAw== 9 | 10 | "@next/swc-android-arm-eabi@13.0.3": 11 | version "13.0.3" 12 | resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.3.tgz#87ce3b7d81ec198f5360f4393e5e03f112758696" 13 | integrity sha512-uxfUoj65CdFc1gX2q7GtBX3DhKv9Kn343LMqGNvXyuTpYTGMmIiVY7b9yF8oLWRV0gVKqhZBZifUmoPE8SJU6Q== 14 | 15 | "@next/swc-android-arm64@13.0.3": 16 | version "13.0.3" 17 | resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-13.0.3.tgz#2029f759cb3e85082da15ced94704a68e390a0e9" 18 | integrity sha512-t2k+WDfg7Cq2z/EnalKGsd/9E5F4Hdo1xu+UzZXYDpKUI9zgE6Bz8ajQb8m8txv3qOaWdKuDa5j5ziq9Acd1Xw== 19 | 20 | "@next/swc-darwin-arm64@13.0.3": 21 | version "13.0.3" 22 | resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.3.tgz#f5deafd3feccf7c24b81df9a6a06d4d13bec254f" 23 | integrity sha512-wV6j6SZ1bc/YHOLCLk9JVqaZTCCey6HBV7inl2DriHsHqIcO6F3+QiYf0KXwRP9BE0GSZZrYd5mZQm2JPTHdJA== 24 | 25 | "@next/swc-darwin-x64@13.0.3": 26 | version "13.0.3" 27 | resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.3.tgz#4d4321c02b88fdd052e7a0cc8b3719ac16f8ad4b" 28 | integrity sha512-jaI2CMuYWvUtRixV3AIjUhnxUDU1FKOR+8hADMhYt3Yz+pCKuj4RZ0n0nY5qUf3qT1AtvnJXEgyatSFJhSp/wQ== 29 | 30 | "@next/swc-freebsd-x64@13.0.3": 31 | version "13.0.3" 32 | resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.3.tgz#f2cbac9dc03172ef94275a6380cdd4d08024fcd4" 33 | integrity sha512-nbyT0toBTJrcj5TCB9pVnQpGJ3utGyQj4CWegZs1ulaeUQ5Z7CS/qt8nRyYyOKYHtOdSCJ9Nw5F/RgKNkdpOdw== 34 | 35 | "@next/swc-linux-arm-gnueabihf@13.0.3": 36 | version "13.0.3" 37 | resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.3.tgz#1b12006a25518ddc6ee9c58852149f82639876cf" 38 | integrity sha512-1naLxYvRUQCoFCU1nMkcQueRc0Iux9xBv1L5pzH2ejtIWFg8BrSgyuluJG4nyAhFCx4WG863IEIkAaefOowVdA== 39 | 40 | "@next/swc-linux-arm64-gnu@13.0.3": 41 | version "13.0.3" 42 | resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.3.tgz#f44a34fc073b91ad2ab7dd757c063e764e642ddc" 43 | integrity sha512-3Z4A8JkuGWpMVbUhUPQInK/SLY+kijTT78Q/NZCrhLlyvwrVxaQALJNlXzxDLraUgv4oVH0Wz/FIw1W9PUUhxA== 44 | 45 | "@next/swc-linux-arm64-musl@13.0.3": 46 | version "13.0.3" 47 | resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.3.tgz#5fd31e1149f151393b98239b5a6a96316459d19a" 48 | integrity sha512-MoYe9SM40UaunTjC+01c9OILLH3uSoeri58kDMu3KF/EFEvn1LZ6ODeDj+SLGlAc95wn46hrRJS2BPmDDE+jFQ== 49 | 50 | "@next/swc-linux-x64-gnu@13.0.3": 51 | version "13.0.3" 52 | resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.3.tgz#a9b414123f26912fc830e5a65dd02e1ca56e2ead" 53 | integrity sha512-z22T5WGnRanjLMXdF0NaNjSpBlEzzY43t5Ysp3nW1oI6gOkub6WdQNZeHIY7A2JwkgSWZmtjLtf+Fzzz38LHeQ== 54 | 55 | "@next/swc-linux-x64-musl@13.0.3": 56 | version "13.0.3" 57 | resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.3.tgz#113f896de5e818ab40e6ec046538203cdd07dab0" 58 | integrity sha512-ZOMT7zjBFmkusAtr47k8xs/oTLsNlTH6xvYb+iux7yly2hZGwhfBLzPGBsbeMZukZ96IphJTagT+C033s6LNVA== 59 | 60 | "@next/swc-win32-arm64-msvc@13.0.3": 61 | version "13.0.3" 62 | resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.3.tgz#2ae5abe61f982a10f7742e97ac57f166751734aa" 63 | integrity sha512-Q4BM16Djl+Oah9UdGrvjFYgoftYB2jNd+rtRGPX5Mmxo09Ry/KiLbOZnoUyoIxKc1xPyfqMXuaVsAFQLYs0KEQ== 64 | 65 | "@next/swc-win32-ia32-msvc@13.0.3": 66 | version "13.0.3" 67 | resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.3.tgz#1a9c0d36c7dab1620257e85ada702c5acd9875d6" 68 | integrity sha512-Sa8yGkNeRUsic8Qjf7MLIAfP0p0+einK/wIqJ8UO1y76j+8rRQu42AMs5H4Ax1fm9GEYq6I8njHtY59TVpTtGQ== 69 | 70 | "@next/swc-win32-x64-msvc@13.0.3": 71 | version "13.0.3" 72 | resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.3.tgz#7db0adbea7b4aafdbe2a7745d2c7c048903876ad" 73 | integrity sha512-IAptmSqA7k4tQzaw2NAkoEjj3+Dz9ceuvlEHwYh770MMDL4V0ku2m+UHrmn5HUCEDHhgwwjg2nyf6728q2jr1w== 74 | 75 | "@swc/helpers@0.4.11": 76 | version "0.4.11" 77 | resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.11.tgz#db23a376761b3d31c26502122f349a21b592c8de" 78 | integrity sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw== 79 | dependencies: 80 | tslib "^2.4.0" 81 | 82 | "@types/hoist-non-react-statics@^3.3.1": 83 | version "3.3.1" 84 | resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" 85 | integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== 86 | dependencies: 87 | "@types/react" "*" 88 | hoist-non-react-statics "^3.3.0" 89 | 90 | "@types/prop-types@*": 91 | version "15.7.5" 92 | resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" 93 | integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== 94 | 95 | "@types/react@*": 96 | version "18.0.15" 97 | resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.15.tgz#d355644c26832dc27f3e6cbf0c4f4603fc4ab7fe" 98 | integrity sha512-iz3BtLuIYH1uWdsv6wXYdhozhqj20oD4/Hk2DNXIn1kFsmp9x8d9QB6FnPhfkbhd2PgEONt9Q1x/ebkwjfFLow== 99 | dependencies: 100 | "@types/prop-types" "*" 101 | "@types/scheduler" "*" 102 | csstype "^3.0.2" 103 | 104 | "@types/scheduler@*": 105 | version "0.16.2" 106 | resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" 107 | integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== 108 | 109 | aggregate-error@^3.0.0: 110 | version "3.1.0" 111 | resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" 112 | integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== 113 | dependencies: 114 | clean-stack "^2.0.0" 115 | indent-string "^4.0.0" 116 | 117 | ansi-escapes@^4.3.0: 118 | version "4.3.2" 119 | resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" 120 | integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== 121 | dependencies: 122 | type-fest "^0.21.3" 123 | 124 | ansi-regex@^5.0.1: 125 | version "5.0.1" 126 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" 127 | integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== 128 | 129 | ansi-regex@^6.0.1: 130 | version "6.0.1" 131 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" 132 | integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== 133 | 134 | ansi-styles@^4.0.0: 135 | version "4.3.0" 136 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" 137 | integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== 138 | dependencies: 139 | color-convert "^2.0.1" 140 | 141 | ansi-styles@^6.0.0: 142 | version "6.2.1" 143 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" 144 | integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== 145 | 146 | astral-regex@^2.0.0: 147 | version "2.0.0" 148 | resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" 149 | integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== 150 | 151 | braces@^3.0.2: 152 | version "3.0.2" 153 | resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" 154 | integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== 155 | dependencies: 156 | fill-range "^7.0.1" 157 | 158 | caniuse-lite@^1.0.30001406: 159 | version "1.0.30001431" 160 | resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz#e7c59bd1bc518fae03a4656be442ce6c4887a795" 161 | integrity sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ== 162 | 163 | clean-stack@^2.0.0: 164 | version "2.2.0" 165 | resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" 166 | integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== 167 | 168 | cli-cursor@^3.1.0: 169 | version "3.1.0" 170 | resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" 171 | integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== 172 | dependencies: 173 | restore-cursor "^3.1.0" 174 | 175 | cli-truncate@^2.1.0: 176 | version "2.1.0" 177 | resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" 178 | integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== 179 | dependencies: 180 | slice-ansi "^3.0.0" 181 | string-width "^4.2.0" 182 | 183 | cli-truncate@^3.1.0: 184 | version "3.1.0" 185 | resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-3.1.0.tgz#3f23ab12535e3d73e839bb43e73c9de487db1389" 186 | integrity sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA== 187 | dependencies: 188 | slice-ansi "^5.0.0" 189 | string-width "^5.0.0" 190 | 191 | client-only@0.0.1: 192 | version "0.0.1" 193 | resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1" 194 | integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== 195 | 196 | color-convert@^2.0.1: 197 | version "2.0.1" 198 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" 199 | integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== 200 | dependencies: 201 | color-name "~1.1.4" 202 | 203 | color-name@~1.1.4: 204 | version "1.1.4" 205 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" 206 | integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== 207 | 208 | colorette@^2.0.16, colorette@^2.0.17: 209 | version "2.0.19" 210 | resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" 211 | integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== 212 | 213 | commander@^9.3.0: 214 | version "9.4.1" 215 | resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" 216 | integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== 217 | 218 | copy-anything@^3.0.2: 219 | version "3.0.5" 220 | resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-3.0.5.tgz#2d92dce8c498f790fa7ad16b01a1ae5a45b020a0" 221 | integrity sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w== 222 | dependencies: 223 | is-what "^4.1.8" 224 | 225 | cross-spawn@^7.0.3: 226 | version "7.0.3" 227 | resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" 228 | integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== 229 | dependencies: 230 | path-key "^3.1.0" 231 | shebang-command "^2.0.0" 232 | which "^2.0.1" 233 | 234 | csstype@^3.0.2: 235 | version "3.1.0" 236 | resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.0.tgz#4ddcac3718d787cf9df0d1b7d15033925c8f29f2" 237 | integrity sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA== 238 | 239 | debug@^4.3.4: 240 | version "4.3.4" 241 | resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" 242 | integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== 243 | dependencies: 244 | ms "2.1.2" 245 | 246 | eastasianwidth@^0.2.0: 247 | version "0.2.0" 248 | resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" 249 | integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== 250 | 251 | emoji-regex@^8.0.0: 252 | version "8.0.0" 253 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" 254 | integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== 255 | 256 | emoji-regex@^9.2.2: 257 | version "9.2.2" 258 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" 259 | integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== 260 | 261 | execa@^6.1.0: 262 | version "6.1.0" 263 | resolved "https://registry.yarnpkg.com/execa/-/execa-6.1.0.tgz#cea16dee211ff011246556388effa0818394fb20" 264 | integrity sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA== 265 | dependencies: 266 | cross-spawn "^7.0.3" 267 | get-stream "^6.0.1" 268 | human-signals "^3.0.1" 269 | is-stream "^3.0.0" 270 | merge-stream "^2.0.0" 271 | npm-run-path "^5.1.0" 272 | onetime "^6.0.0" 273 | signal-exit "^3.0.7" 274 | strip-final-newline "^3.0.0" 275 | 276 | fill-range@^7.0.1: 277 | version "7.0.1" 278 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" 279 | integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== 280 | dependencies: 281 | to-regex-range "^5.0.1" 282 | 283 | get-stream@^6.0.1: 284 | version "6.0.1" 285 | resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" 286 | integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== 287 | 288 | hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: 289 | version "3.3.2" 290 | resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" 291 | integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== 292 | dependencies: 293 | react-is "^16.7.0" 294 | 295 | human-signals@^3.0.1: 296 | version "3.0.1" 297 | resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-3.0.1.tgz#c740920859dafa50e5a3222da9d3bf4bb0e5eef5" 298 | integrity sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ== 299 | 300 | husky@^8.0.2: 301 | version "8.0.2" 302 | resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.2.tgz#5816a60db02650f1f22c8b69b928fd6bcd77a236" 303 | integrity sha512-Tkv80jtvbnkK3mYWxPZePGFpQ/tT3HNSs/sasF9P2YfkMezDl3ON37YN6jUUI4eTg5LcyVynlb6r4eyvOmspvg== 304 | 305 | indent-string@^4.0.0: 306 | version "4.0.0" 307 | resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" 308 | integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== 309 | 310 | is-fullwidth-code-point@^3.0.0: 311 | version "3.0.0" 312 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" 313 | integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== 314 | 315 | is-fullwidth-code-point@^4.0.0: 316 | version "4.0.0" 317 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88" 318 | integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== 319 | 320 | is-number@^7.0.0: 321 | version "7.0.0" 322 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" 323 | integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== 324 | 325 | is-stream@^3.0.0: 326 | version "3.0.0" 327 | resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" 328 | integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== 329 | 330 | is-what@^4.1.8: 331 | version "4.1.16" 332 | resolved "https://registry.yarnpkg.com/is-what/-/is-what-4.1.16.tgz#1ad860a19da8b4895ad5495da3182ce2acdd7a6f" 333 | integrity sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A== 334 | 335 | isexe@^2.0.0: 336 | version "2.0.0" 337 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 338 | integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== 339 | 340 | lilconfig@2.0.5: 341 | version "2.0.5" 342 | resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.5.tgz#19e57fd06ccc3848fd1891655b5a447092225b25" 343 | integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg== 344 | 345 | lint-staged@^13.0.3: 346 | version "13.0.3" 347 | resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.0.3.tgz#d7cdf03a3830b327a2b63c6aec953d71d9dc48c6" 348 | integrity sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug== 349 | dependencies: 350 | cli-truncate "^3.1.0" 351 | colorette "^2.0.17" 352 | commander "^9.3.0" 353 | debug "^4.3.4" 354 | execa "^6.1.0" 355 | lilconfig "2.0.5" 356 | listr2 "^4.0.5" 357 | micromatch "^4.0.5" 358 | normalize-path "^3.0.0" 359 | object-inspect "^1.12.2" 360 | pidtree "^0.6.0" 361 | string-argv "^0.3.1" 362 | yaml "^2.1.1" 363 | 364 | listr2@^4.0.5: 365 | version "4.0.5" 366 | resolved "https://registry.yarnpkg.com/listr2/-/listr2-4.0.5.tgz#9dcc50221583e8b4c71c43f9c7dfd0ef546b75d5" 367 | integrity sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA== 368 | dependencies: 369 | cli-truncate "^2.1.0" 370 | colorette "^2.0.16" 371 | log-update "^4.0.0" 372 | p-map "^4.0.0" 373 | rfdc "^1.3.0" 374 | rxjs "^7.5.5" 375 | through "^2.3.8" 376 | wrap-ansi "^7.0.0" 377 | 378 | log-update@^4.0.0: 379 | version "4.0.0" 380 | resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" 381 | integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== 382 | dependencies: 383 | ansi-escapes "^4.3.0" 384 | cli-cursor "^3.1.0" 385 | slice-ansi "^4.0.0" 386 | wrap-ansi "^6.2.0" 387 | 388 | merge-stream@^2.0.0: 389 | version "2.0.0" 390 | resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" 391 | integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== 392 | 393 | micromatch@^4.0.5: 394 | version "4.0.5" 395 | resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" 396 | integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== 397 | dependencies: 398 | braces "^3.0.2" 399 | picomatch "^2.3.1" 400 | 401 | mimic-fn@^2.1.0: 402 | version "2.1.0" 403 | resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" 404 | integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== 405 | 406 | mimic-fn@^4.0.0: 407 | version "4.0.0" 408 | resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" 409 | integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== 410 | 411 | ms@2.1.2: 412 | version "2.1.2" 413 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" 414 | integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== 415 | 416 | nanoid@^3.3.4: 417 | version "3.3.4" 418 | resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" 419 | integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== 420 | 421 | next@^13: 422 | version "13.0.3" 423 | resolved "https://registry.yarnpkg.com/next/-/next-13.0.3.tgz#577e2f7cdd9c9dba79353cd57fd854fe7e506a44" 424 | integrity sha512-rFQeepcenRxKzeKlh1CsmEnxsJwhIERtbUjmYnKZyDInZsU06lvaGw5DT44rlNp1Rv2MT/e9vffZ8vK+ytwXHA== 425 | dependencies: 426 | "@next/env" "13.0.3" 427 | "@swc/helpers" "0.4.11" 428 | caniuse-lite "^1.0.30001406" 429 | postcss "8.4.14" 430 | styled-jsx "5.1.0" 431 | use-sync-external-store "1.2.0" 432 | optionalDependencies: 433 | "@next/swc-android-arm-eabi" "13.0.3" 434 | "@next/swc-android-arm64" "13.0.3" 435 | "@next/swc-darwin-arm64" "13.0.3" 436 | "@next/swc-darwin-x64" "13.0.3" 437 | "@next/swc-freebsd-x64" "13.0.3" 438 | "@next/swc-linux-arm-gnueabihf" "13.0.3" 439 | "@next/swc-linux-arm64-gnu" "13.0.3" 440 | "@next/swc-linux-arm64-musl" "13.0.3" 441 | "@next/swc-linux-x64-gnu" "13.0.3" 442 | "@next/swc-linux-x64-musl" "13.0.3" 443 | "@next/swc-win32-arm64-msvc" "13.0.3" 444 | "@next/swc-win32-ia32-msvc" "13.0.3" 445 | "@next/swc-win32-x64-msvc" "13.0.3" 446 | 447 | normalize-path@^3.0.0: 448 | version "3.0.0" 449 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" 450 | integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== 451 | 452 | npm-run-path@^5.1.0: 453 | version "5.1.0" 454 | resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" 455 | integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== 456 | dependencies: 457 | path-key "^4.0.0" 458 | 459 | object-inspect@^1.12.2: 460 | version "1.12.2" 461 | resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" 462 | integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== 463 | 464 | onetime@^5.1.0: 465 | version "5.1.2" 466 | resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" 467 | integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== 468 | dependencies: 469 | mimic-fn "^2.1.0" 470 | 471 | onetime@^6.0.0: 472 | version "6.0.0" 473 | resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" 474 | integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== 475 | dependencies: 476 | mimic-fn "^4.0.0" 477 | 478 | p-map@^4.0.0: 479 | version "4.0.0" 480 | resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" 481 | integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== 482 | dependencies: 483 | aggregate-error "^3.0.0" 484 | 485 | path-key@^3.1.0: 486 | version "3.1.1" 487 | resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" 488 | integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== 489 | 490 | path-key@^4.0.0: 491 | version "4.0.0" 492 | resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" 493 | integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== 494 | 495 | picocolors@^1.0.0: 496 | version "1.0.0" 497 | resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" 498 | integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== 499 | 500 | picomatch@^2.3.1: 501 | version "2.3.1" 502 | resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" 503 | integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== 504 | 505 | pidtree@^0.6.0: 506 | version "0.6.0" 507 | resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" 508 | integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== 509 | 510 | postcss@8.4.14: 511 | version "8.4.14" 512 | resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf" 513 | integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== 514 | dependencies: 515 | nanoid "^3.3.4" 516 | picocolors "^1.0.0" 517 | source-map-js "^1.0.2" 518 | 519 | prettier@^2.7.1: 520 | version "2.7.1" 521 | resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" 522 | integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== 523 | 524 | react-is@^16.7.0: 525 | version "16.13.1" 526 | resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" 527 | integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== 528 | 529 | restore-cursor@^3.1.0: 530 | version "3.1.0" 531 | resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" 532 | integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== 533 | dependencies: 534 | onetime "^5.1.0" 535 | signal-exit "^3.0.2" 536 | 537 | rfdc@^1.3.0: 538 | version "1.3.0" 539 | resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" 540 | integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== 541 | 542 | rxjs@^7.5.5: 543 | version "7.5.7" 544 | resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.7.tgz#2ec0d57fdc89ece220d2e702730ae8f1e49def39" 545 | integrity sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA== 546 | dependencies: 547 | tslib "^2.1.0" 548 | 549 | shebang-command@^2.0.0: 550 | version "2.0.0" 551 | resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" 552 | integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== 553 | dependencies: 554 | shebang-regex "^3.0.0" 555 | 556 | shebang-regex@^3.0.0: 557 | version "3.0.0" 558 | resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" 559 | integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== 560 | 561 | signal-exit@^3.0.2, signal-exit@^3.0.7: 562 | version "3.0.7" 563 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" 564 | integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== 565 | 566 | slice-ansi@^3.0.0: 567 | version "3.0.0" 568 | resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" 569 | integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== 570 | dependencies: 571 | ansi-styles "^4.0.0" 572 | astral-regex "^2.0.0" 573 | is-fullwidth-code-point "^3.0.0" 574 | 575 | slice-ansi@^4.0.0: 576 | version "4.0.0" 577 | resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" 578 | integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== 579 | dependencies: 580 | ansi-styles "^4.0.0" 581 | astral-regex "^2.0.0" 582 | is-fullwidth-code-point "^3.0.0" 583 | 584 | slice-ansi@^5.0.0: 585 | version "5.0.0" 586 | resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-5.0.0.tgz#b73063c57aa96f9cd881654b15294d95d285c42a" 587 | integrity sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ== 588 | dependencies: 589 | ansi-styles "^6.0.0" 590 | is-fullwidth-code-point "^4.0.0" 591 | 592 | source-map-js@^1.0.2: 593 | version "1.0.2" 594 | resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" 595 | integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== 596 | 597 | string-argv@^0.3.1: 598 | version "0.3.1" 599 | resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" 600 | integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== 601 | 602 | string-width@^4.1.0, string-width@^4.2.0: 603 | version "4.2.3" 604 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" 605 | integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== 606 | dependencies: 607 | emoji-regex "^8.0.0" 608 | is-fullwidth-code-point "^3.0.0" 609 | strip-ansi "^6.0.1" 610 | 611 | string-width@^5.0.0: 612 | version "5.1.2" 613 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" 614 | integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== 615 | dependencies: 616 | eastasianwidth "^0.2.0" 617 | emoji-regex "^9.2.2" 618 | strip-ansi "^7.0.1" 619 | 620 | strip-ansi@^6.0.0, strip-ansi@^6.0.1: 621 | version "6.0.1" 622 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" 623 | integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== 624 | dependencies: 625 | ansi-regex "^5.0.1" 626 | 627 | strip-ansi@^7.0.1: 628 | version "7.0.1" 629 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" 630 | integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw== 631 | dependencies: 632 | ansi-regex "^6.0.1" 633 | 634 | strip-final-newline@^3.0.0: 635 | version "3.0.0" 636 | resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" 637 | integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== 638 | 639 | styled-jsx@5.1.0: 640 | version "5.1.0" 641 | resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.0.tgz#4a5622ab9714bd3fcfaeec292aa555871f057563" 642 | integrity sha512-/iHaRJt9U7T+5tp6TRelLnqBqiaIT0HsO0+vgyj8hK2KUk7aejFqRrumqPUlAqDwAj8IbS/1hk3IhBAAK/FCUQ== 643 | dependencies: 644 | client-only "0.0.1" 645 | 646 | superjson@^2: 647 | version "2.2.1" 648 | resolved "https://registry.yarnpkg.com/superjson/-/superjson-2.2.1.tgz#9377a7fa80fedb10c851c9dbffd942d4bcf79733" 649 | integrity sha512-8iGv75BYOa0xRJHK5vRLEjE2H/i4lulTjzpUXic3Eg8akftYjkmQDa8JARQ42rlczXyFR3IeRoeFCc7RxHsYZA== 650 | dependencies: 651 | copy-anything "^3.0.2" 652 | 653 | through@^2.3.8: 654 | version "2.3.8" 655 | resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" 656 | integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== 657 | 658 | to-regex-range@^5.0.1: 659 | version "5.0.1" 660 | resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" 661 | integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== 662 | dependencies: 663 | is-number "^7.0.0" 664 | 665 | tslib@^2.1.0: 666 | version "2.4.1" 667 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" 668 | integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== 669 | 670 | tslib@^2.4.0: 671 | version "2.4.0" 672 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" 673 | integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== 674 | 675 | type-fest@^0.21.3: 676 | version "0.21.3" 677 | resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" 678 | integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== 679 | 680 | typescript@^5.3.3: 681 | version "5.3.3" 682 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" 683 | integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== 684 | 685 | use-sync-external-store@1.2.0: 686 | version "1.2.0" 687 | resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" 688 | integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== 689 | 690 | which@^2.0.1: 691 | version "2.0.2" 692 | resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" 693 | integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== 694 | dependencies: 695 | isexe "^2.0.0" 696 | 697 | wrap-ansi@^6.2.0: 698 | version "6.2.0" 699 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" 700 | integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== 701 | dependencies: 702 | ansi-styles "^4.0.0" 703 | string-width "^4.1.0" 704 | strip-ansi "^6.0.0" 705 | 706 | wrap-ansi@^7.0.0: 707 | version "7.0.0" 708 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" 709 | integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== 710 | dependencies: 711 | ansi-styles "^4.0.0" 712 | string-width "^4.1.0" 713 | strip-ansi "^6.0.0" 714 | 715 | yaml@^2.1.1: 716 | version "2.1.3" 717 | resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.1.3.tgz#9b3a4c8aff9821b696275c79a8bee8399d945207" 718 | integrity sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg== 719 | --------------------------------------------------------------------------------