diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15c4d06..38d4739 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,10 @@ on: - docs/** pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-ci + cancel-in-progress: true + jobs: build: strategy: diff --git a/Cargo.lock b/Cargo.lock index 3a91878..6aab893 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -137,6 +137,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "io-uring" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] + [[package]] name = "itoa" version = "1.0.15" @@ -174,11 +185,22 @@ dependencies = [ "adler2", ] +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi", + "windows-sys", +] + [[package]] name = "napi" -version = "3.0.0-beta.10" +version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a8bf588b2ea96bdf618cac8a81b2b6cb5e0f0f86a1ac4ac62859ab78fd79a8" +checksum = "afaf586c21f260e9dc327ae3585fc6efcbb24a416d5151da38bbd35a1f2663c8" dependencies = [ "bitflags", "ctor", @@ -190,15 +212,15 @@ dependencies = [ [[package]] name = "napi-build" -version = "2.2.1" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44e0e3177307063d3e7e55b7dd7b648cca9d7f46daa35422c0d98cc2bf48c2c1" +checksum = "dcae8ad5609d14afb3a3b91dee88c757016261b151e9dcecabf1b2a31a6cab14" [[package]] name = "napi-derive" -version = "3.0.0-beta.10" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf56acb0b78c92cba806a559cfe62513f53cc4a7947807e2ff3c4ef865e9b3a" +checksum = "43e61844e0c0bb81e711f2084abe7cff187b03ca21ff8b000cb59bbda61e15a9" dependencies = [ "convert_case", "ctor", @@ -210,9 +232,9 @@ dependencies = [ [[package]] name = "napi-derive-backend" -version = "2.0.0-beta.10" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6862700f1bdfe43767dc2fd3577306cf6342431f078b765c8336454dda382f1d" +checksum = "b7ab19e9b98efb13895f492a2e367ca50c955ac3c4723613af73fdda4011afcc" dependencies = [ "convert_case", "proc-macro2", @@ -223,9 +245,9 @@ dependencies = [ [[package]] name = "napi-sys" -version = "3.0.0-alpha.3" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4401c63f866b42d673a8b213d5662c84a0701b0f6c3acff7e2b9fc439f1675d" +checksum = "3e4e7135a8f97aa0f1509cce21a8a1f9dcec1b50d8dee006b48a5adb69a9d64d" dependencies = [ "libloading", ] @@ -287,6 +309,12 @@ version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +[[package]] +name = "slab" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" + [[package]] name = "syn" version = "2.0.104" @@ -300,12 +328,16 @@ dependencies = [ [[package]] name = "tokio" -version = "1.45.1" +version = "1.46.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" +checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" dependencies = [ "backtrace", + "io-uring", + "libc", + "mio", "pin-project-lite", + "slab", "tokio-macros", ] @@ -332,6 +364,21 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.52.6" diff --git a/Cargo.toml b/Cargo.toml index c6946c2..face882 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ default = [] napi-support = ["dep:napi", "dep:napi-derive", "dep:napi-build"] [build-dependencies] -napi-build = { version = "2.2.1", optional = true } +napi-build = { version = "2", optional = true } [dependencies] async-trait = "0.1.88" @@ -29,8 +29,8 @@ http = "1.0" # http-rewriter = { path = "../http-rewriter" } # napi = { path = "../napi-rs/crates/napi", features = ["napi4"], optional = true } # napi-derive = { path = "../napi-rs/crates/macro", optional = true } -napi = { version = "3.0.0-beta.8", features = ["napi4"], optional = true } -napi-derive = { version = "3.0.0-beta.8", optional = true } +napi = { version = "3", features = ["napi4"], optional = true } +napi-derive = { version = "3", optional = true } # napi = { version = "2.12.2", default-features = false, features = ["napi4"], optional = true } # napi-derive = { version = "2.12.2", optional = true } diff --git a/package.json b/package.json index 7457c58..85aa6c9 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,9 @@ }, "license": "MIT", "devDependencies": { - "@napi-rs/cli": "3.0.0-alpha.89", + "@napi-rs/cli": "^3.0.4", "@oxc-node/core": "^0.0.23", - "oxlint": "^0.16.0" + "oxlint": "^0.16.12" }, "engines": { "node": ">= 10" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d293b13..9aeee21 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,28 +9,28 @@ importers: .: devDependencies: '@napi-rs/cli': - specifier: 3.0.0-alpha.89 - version: 3.0.0-alpha.89(@emnapi/runtime@1.4.3) + specifier: ^3.0.4 + version: 3.0.4(@emnapi/runtime@1.4.5) '@oxc-node/core': specifier: ^0.0.23 version: 0.0.23 oxlint: - specifier: ^0.16.0 + specifier: ^0.16.12 version: 0.16.12 packages: - '@emnapi/core@1.4.3': - resolution: {integrity: sha512-4m62DuCE07lw01soJwPiBGC0nAww0Q+RY70VZ+n49yDIO13yyinhbWCeNnaob0lakDtWQzSdtNWzJeOJt2ma+g==} + '@emnapi/core@1.4.5': + resolution: {integrity: sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q==} - '@emnapi/runtime@1.4.3': - resolution: {integrity: sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==} + '@emnapi/runtime@1.4.5': + resolution: {integrity: sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg==} - '@emnapi/wasi-threads@1.0.2': - resolution: {integrity: sha512-5n3nTJblwRi8LlXkJ9eBzu+kZR8Yxcc7ubakyQTFzPMtIhFpUBRbsnc2Dv88IZDIbCDlBiWrknhB4Lsz7mg6BA==} + '@emnapi/wasi-threads@1.0.4': + resolution: {integrity: sha512-PJR+bOmMOPH8AtcTGAyYNiuJ3/Fcoj2XN/gBEWzDIKh254XO+mM9XoXHk5GNEhodxeMznbg7BlRojVbKN+gC6g==} - '@inquirer/checkbox@4.1.8': - resolution: {integrity: sha512-d/QAsnwuHX2OPolxvYcgSj7A9DO9H6gVOy2DvBTx+P2LH2iRTo/RSGV3iwCzW024nP9hw98KIuDmdyhZQj1UQg==} + '@inquirer/checkbox@4.2.0': + resolution: {integrity: sha512-fdSw07FLJEU5vbpOPzXo5c6xmMGDzbZE2+niuDHX5N6mc6V0Ebso/q3xiHra4D73+PMsC8MJmcaZKuAAoaQsSA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -38,8 +38,8 @@ packages: '@types/node': optional: true - '@inquirer/confirm@5.1.12': - resolution: {integrity: sha512-dpq+ielV9/bqgXRUbNH//KsY6WEw9DrGPmipkpmgC1Y46cwuBTNx7PXFWTjc3MQ+urcc0QxoVHcMI0FW4Ok0hg==} + '@inquirer/confirm@5.1.14': + resolution: {integrity: sha512-5yR4IBfe0kXe59r1YCTG8WXkUbl7Z35HK87Sw+WUyGD8wNUx7JvY7laahzeytyE1oLn74bQnL7hstctQxisQ8Q==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -47,8 +47,8 @@ packages: '@types/node': optional: true - '@inquirer/core@10.1.13': - resolution: {integrity: sha512-1viSxebkYN2nJULlzCxES6G9/stgHSepZ9LqqfdIGPHj5OHhiBUXVS0a6R0bEC2A+VL4D9w6QB66ebCr6HGllA==} + '@inquirer/core@10.1.15': + resolution: {integrity: sha512-8xrp836RZvKkpNbVvgWUlxjT4CraKk2q+I3Ksy+seI2zkcE+y6wNs1BVhgcv8VyImFecUhdQrYLdW32pAjwBdA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -56,8 +56,8 @@ packages: '@types/node': optional: true - '@inquirer/editor@4.2.13': - resolution: {integrity: sha512-WbicD9SUQt/K8O5Vyk9iC2ojq5RHoCLK6itpp2fHsWe44VxxcA9z3GTWlvjSTGmMQpZr+lbVmrxdHcumJoLbMA==} + '@inquirer/editor@4.2.15': + resolution: {integrity: sha512-wst31XT8DnGOSS4nNJDIklGKnf+8shuauVrWzgKegWUe28zfCftcWZ2vktGdzJgcylWSS2SrDnYUb6alZcwnCQ==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -65,8 +65,8 @@ packages: '@types/node': optional: true - '@inquirer/expand@4.0.15': - resolution: {integrity: sha512-4Y+pbr/U9Qcvf+N/goHzPEXiHH8680lM3Dr3Y9h9FFw4gHS+zVpbj8LfbKWIb/jayIB4aSO4pWiBTrBYWkvi5A==} + '@inquirer/expand@4.0.17': + resolution: {integrity: sha512-PSqy9VmJx/VbE3CT453yOfNa+PykpKg/0SYP7odez1/NWBGuDXgPhp4AeGYYKjhLn5lUUavVS/JbeYMPdH50Mw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -74,12 +74,12 @@ packages: '@types/node': optional: true - '@inquirer/figures@1.0.12': - resolution: {integrity: sha512-MJttijd8rMFcKJC8NYmprWr6hD3r9Gd9qUC0XwPNwoEPWSMVJwA2MlXxF+nhZZNMY+HXsWa+o7KY2emWYIn0jQ==} + '@inquirer/figures@1.0.13': + resolution: {integrity: sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==} engines: {node: '>=18'} - '@inquirer/input@4.1.12': - resolution: {integrity: sha512-xJ6PFZpDjC+tC1P8ImGprgcsrzQRsUh9aH3IZixm1lAZFK49UGHxM3ltFfuInN2kPYNfyoPRh+tU4ftsjPLKqQ==} + '@inquirer/input@4.2.1': + resolution: {integrity: sha512-tVC+O1rBl0lJpoUZv4xY+WGWY8V5b0zxU1XDsMsIHYregdh7bN5X5QnIONNBAl0K765FYlAfNHS2Bhn7SSOVow==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -87,8 +87,8 @@ packages: '@types/node': optional: true - '@inquirer/number@3.0.15': - resolution: {integrity: sha512-xWg+iYfqdhRiM55MvqiTCleHzszpoigUpN5+t1OMcRkJrUrw7va3AzXaxvS+Ak7Gny0j2mFSTv2JJj8sMtbV2g==} + '@inquirer/number@3.0.17': + resolution: {integrity: sha512-GcvGHkyIgfZgVnnimURdOueMk0CztycfC8NZTiIY9arIAkeOgt6zG57G+7vC59Jns3UX27LMkPKnKWAOF5xEYg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -96,8 +96,8 @@ packages: '@types/node': optional: true - '@inquirer/password@4.0.15': - resolution: {integrity: sha512-75CT2p43DGEnfGTaqFpbDC2p2EEMrq0S+IRrf9iJvYreMy5mAWj087+mdKyLHapUEPLjN10mNvABpGbk8Wdraw==} + '@inquirer/password@4.0.17': + resolution: {integrity: sha512-DJolTnNeZ00E1+1TW+8614F7rOJJCM4y4BAGQ3Gq6kQIG+OJ4zr3GLjIjVVJCbKsk2jmkmv6v2kQuN/vriHdZA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -105,8 +105,8 @@ packages: '@types/node': optional: true - '@inquirer/prompts@7.5.3': - resolution: {integrity: sha512-8YL0WiV7J86hVAxrh3fE5mDCzcTDe1670unmJRz6ArDgN+DBK1a0+rbnNWp4DUB5rPMwqD5ZP6YHl9KK1mbZRg==} + '@inquirer/prompts@7.7.1': + resolution: {integrity: sha512-XDxPrEWeWUBy8scAXzXuFY45r/q49R0g72bUzgQXZ1DY/xEFX+ESDMkTQolcb5jRBzaNJX2W8XQl6krMNDTjaA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -114,8 +114,8 @@ packages: '@types/node': optional: true - '@inquirer/rawlist@4.1.3': - resolution: {integrity: sha512-7XrV//6kwYumNDSsvJIPeAqa8+p7GJh7H5kRuxirct2cgOcSWwwNGoXDRgpNFbY/MG2vQ4ccIWCi8+IXXyFMZA==} + '@inquirer/rawlist@4.1.5': + resolution: {integrity: sha512-R5qMyGJqtDdi4Ht521iAkNqyB6p2UPuZUbMifakg1sWtu24gc2Z8CJuw8rP081OckNDMgtDCuLe42Q2Kr3BolA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -123,8 +123,8 @@ packages: '@types/node': optional: true - '@inquirer/search@3.0.15': - resolution: {integrity: sha512-YBMwPxYBrADqyvP4nNItpwkBnGGglAvCLVW8u4pRmmvOsHUtCAUIMbUrLX5B3tFL1/WsLGdQ2HNzkqswMs5Uaw==} + '@inquirer/search@3.0.17': + resolution: {integrity: sha512-CuBU4BAGFqRYors4TNCYzy9X3DpKtgIW4Boi0WNkm4Ei1hvY9acxKdBdyqzqBCEe4YxSdaQQsasJlFlUJNgojw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -132,8 +132,8 @@ packages: '@types/node': optional: true - '@inquirer/select@4.2.3': - resolution: {integrity: sha512-OAGhXU0Cvh0PhLz9xTF/kx6g6x+sP+PcyTiLvCrewI99P3BBeexD+VbuwkNDvqGkk3y2h5ZiWLeRP7BFlhkUDg==} + '@inquirer/select@4.3.1': + resolution: {integrity: sha512-Gfl/5sqOF5vS/LIrSndFgOh7jgoe0UXEizDqahFRkq5aJBLegZ6WjuMh/hVEJwlFQjyLq1z9fRtvUMkb7jM1LA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -141,8 +141,8 @@ packages: '@types/node': optional: true - '@inquirer/type@3.0.7': - resolution: {integrity: sha512-PfunHQcjwnju84L+ycmcMKB/pTPIngjUJvfnRhKY6FKPuYXlM4aQCb/nIdTFR6BEhMjFvngzvng/vBAJMZpLSA==} + '@inquirer/type@3.0.8': + resolution: {integrity: sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -150,8 +150,8 @@ packages: '@types/node': optional: true - '@napi-rs/cli@3.0.0-alpha.89': - resolution: {integrity: sha512-Xi/B/unPVZJx12Qmj9+Z3+vfgmGdhp2tjtvH1VFjC6VrToh/i1fOBSv77j9WhYYWayFGhIit7nLcxQWxigXr8A==} + '@napi-rs/cli@3.0.4': + resolution: {integrity: sha512-ilbCI69DVDQcIUSUB504LM1+Nhvo0jKycWAzzPJ22YwUoWrru/w0+V5sfjPINgkshQ4Ykv+oZOJXk9Kg1ZBUvg==} engines: {node: '>= 16'} hasBin: true peerDependencies: @@ -163,15 +163,15 @@ packages: emnapi: optional: true - '@napi-rs/cross-toolchain@0.0.19': - resolution: {integrity: sha512-StHXqYANdTaMFqJJ3JXHqKQMylOzOJPcrOCd9Nt2NIGfvfaXK3SzpmNfkJimkOAYfTsfpfuRERsML0bUZCpHBQ==} + '@napi-rs/cross-toolchain@1.0.0': + resolution: {integrity: sha512-5Ha9SkZC8NjLB4Xe6C9v+3c+Oraz9FdbuN2L4d/mh1kTK8Y/zGt5geM/U+sboAP3HoK2aRWRnx4GK0eV3oPoUQ==} peerDependencies: - '@napi-rs/cross-toolchain-arm64-target-aarch64': ^0.0.19 - '@napi-rs/cross-toolchain-arm64-target-armv7': ^0.0.19 - '@napi-rs/cross-toolchain-arm64-target-x86_64': ^0.0.19 - '@napi-rs/cross-toolchain-x64-target-aarch64': ^0.0.19 - '@napi-rs/cross-toolchain-x64-target-armv7': ^0.0.19 - '@napi-rs/cross-toolchain-x64-target-x86_64': ^0.0.19 + '@napi-rs/cross-toolchain-arm64-target-aarch64': ^1.0.0 + '@napi-rs/cross-toolchain-arm64-target-armv7': ^1.0.0 + '@napi-rs/cross-toolchain-arm64-target-x86_64': ^1.0.0 + '@napi-rs/cross-toolchain-x64-target-aarch64': ^1.0.0 + '@napi-rs/cross-toolchain-x64-target-armv7': ^1.0.0 + '@napi-rs/cross-toolchain-x64-target-x86_64': ^1.0.0 peerDependenciesMeta: '@napi-rs/cross-toolchain-arm64-target-aarch64': optional: true @@ -186,300 +186,303 @@ packages: '@napi-rs/cross-toolchain-x64-target-x86_64': optional: true - '@napi-rs/lzma-android-arm-eabi@1.4.3': - resolution: {integrity: sha512-XpjRUZ/EbWtVbMvW+ucon5Ykz7PjMoX65mIlUdAiVnaPGykzFAUrl8dl6Br5bfqnhQQfDjjUIgTAwWl3G++n1g==} + '@napi-rs/lzma-android-arm-eabi@1.4.4': + resolution: {integrity: sha512-smZtN41ebtYw+vxn1q3IXhns1hUzFNUcgHxknZKFQSKaybYZ4KxMiiBIw5UqJ9rw1dkaHqokcC1YeAfu8vfG2A==} engines: {node: '>= 10'} cpu: [arm] os: [android] - '@napi-rs/lzma-android-arm64@1.4.3': - resolution: {integrity: sha512-Bve6BF/4pnlO6HotIgRWgmUT3rbbW/QH471RF/GBA29GfEeUOPEdfQWC7tlzrLYsVFNX2KCWKd+XlxQNz9sRaA==} + '@napi-rs/lzma-android-arm64@1.4.4': + resolution: {integrity: sha512-s+h9bM3Z31FL0IPfWF4kBCebWxJBtpFvje6ikzmeUg1/jjWAP81IJC5j75zz5TEWt+Zf3Bip0uVlQhCZmqlpKA==} engines: {node: '>= 10'} cpu: [arm64] os: [android] - '@napi-rs/lzma-darwin-arm64@1.4.3': - resolution: {integrity: sha512-UxTb56kL6pSVTsZ1ShibnqLSwJZLTWtPU5TNYuyIjVNQYAIG8JQ5Yxz35azjwBCK7AjD8pBdpWLYUSyJRGAVAw==} + '@napi-rs/lzma-darwin-arm64@1.4.4': + resolution: {integrity: sha512-aF5wxA0SFlRalxeyz7TpmFuztHlG9D0qew+1gz0tiRs4gituT3CCsR0PSBZ2LbalTY/7RqmYP4ssLQus+p8tqg==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@napi-rs/lzma-darwin-x64@1.4.3': - resolution: {integrity: sha512-ps6HiwGKS1P4ottyV2/hVboZ0ugdM1Z1qO9YFpcuKweORfxAkxwJ6S8jOt7G27LQiWiiQHVwsUCODTHDFhOUPQ==} + '@napi-rs/lzma-darwin-x64@1.4.4': + resolution: {integrity: sha512-80gD9kvXPPBz6V4C7SXcPo0o7ySlneDVRpebAHN1DubIEwhdrMFuqmtaATwT5MTraZSrQ4CHF275MQuwiHtlGw==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@napi-rs/lzma-freebsd-x64@1.4.3': - resolution: {integrity: sha512-W49h41U3+vLnbthbPzvJX1fQtTG+1jyUlfB+wX3oxILvIur06PjJRdMXrFtOZpWkFsihK9gO2DRkQYQJIIgTZw==} + '@napi-rs/lzma-freebsd-x64@1.4.4': + resolution: {integrity: sha512-wd+jwYQRIzkGtUvInYLWSrqRtDatIvwNm/w9k43f+oABBsnP4veJkyKGGm4SQQa35Ki8IXVzYdGTa4eSTi+Org==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] - '@napi-rs/lzma-linux-arm-gnueabihf@1.4.3': - resolution: {integrity: sha512-11PNPiMGuwwxIxd9yPZY3Ek6RFGFRFQb/AtMStJIwlmJ6sM/djEknClLJVbVXbC/nqm7htVZEr+qmYgoDy0fAw==} + '@napi-rs/lzma-linux-arm-gnueabihf@1.4.4': + resolution: {integrity: sha512-KiMgBugjFQfgeZTebuBVHL8ta/nZ2cfzd0Jge0e0y/WX/p7ZkVyCox/TTu9EU2H9OeBAFKTRmIDoqhHlBbkqyA==} engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@napi-rs/lzma-linux-arm64-gnu@1.4.3': - resolution: {integrity: sha512-XzlxZjSXTcrWFHbvvv2xbV5+bSV5IJqCJ8CCksc7xV3uWEAso9yBPJ8VSRD3GPc7ZoBDRqJmgCb/HQzHpLBekw==} + '@napi-rs/lzma-linux-arm64-gnu@1.4.4': + resolution: {integrity: sha512-l0T2fKeDqnczeNFqFsE8W2+J7386BGaHCbD409sDGOUW3Fhn9FlHkkC4qAnWhieaLqCdnorj+LQAzYM371IXrQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@napi-rs/lzma-linux-arm64-musl@1.4.3': - resolution: {integrity: sha512-k4fWiI4Pm61Esj8hnm7NWIbpZueTtP2jlJqmMhTqJyjqW3NUxbTHjSErZOZKIFRF1B3if4v5Tyzo7JL2X+BaSQ==} + '@napi-rs/lzma-linux-arm64-musl@1.4.4': + resolution: {integrity: sha512-rm43dqf5pw5HV3EineWl4IBbzg3Iwuiucl614AyhLHmSHTf6/AJJID7rqwM8Qbhe2abM+9NT+2WI9HRM1ZtkJA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@napi-rs/lzma-linux-ppc64-gnu@1.4.3': - resolution: {integrity: sha512-tTIfk+TYZYbFySxaCMuzp4Zz1T3I6OYVYNAm+IrCSkZDLmUKUzBK3+Su+mT+PjcTNsAiHBa5NVjARXC7b7jmgQ==} + '@napi-rs/lzma-linux-ppc64-gnu@1.4.4': + resolution: {integrity: sha512-QzNVcCdq6j4LYOtLUDEyE9wg8tY8kmbQ6TZrqjYQUD2nebTW24lmzFhdeI3xzUzVN5rRt4js1UnL1cPCT5HrSw==} engines: {node: '>= 10'} cpu: [ppc64] os: [linux] - '@napi-rs/lzma-linux-riscv64-gnu@1.4.3': - resolution: {integrity: sha512-HPyLYOYhkN7QYaWiKWhSnsLmx/l0pqgiiyaYeycgxCm9dwL8ummFWxveZqYjqdbUUvG7Mgi1jqgRe+55MVdyZQ==} + '@napi-rs/lzma-linux-riscv64-gnu@1.4.4': + resolution: {integrity: sha512-7jpyKpBX0LpklkmGBzz1cQJ/QRN+E6h1xSZVeN6KCtLBrCd6LCX3owZMRzSYmdpI6Zr30DrWo0HOUZiKMzgzBg==} engines: {node: '>= 10'} cpu: [riscv64] os: [linux] - '@napi-rs/lzma-linux-s390x-gnu@1.4.3': - resolution: {integrity: sha512-YkcV+RSZZIMM3D5sPZqvo2Q7/tHXBhgJWBi+6ceo46pTlqgn/nH+pVz+CzsDmLWz5hqNSXyv5IAhOcg2CH6rAg==} + '@napi-rs/lzma-linux-s390x-gnu@1.4.4': + resolution: {integrity: sha512-ngUxVZIytn2UHY92RnijtT11VhWO32mfa1LFX03GWMWdQl50bV/IqcZR0WYRWlBCd7DZrOf16AY2IR/lwovE7A==} engines: {node: '>= 10'} cpu: [s390x] os: [linux] - '@napi-rs/lzma-linux-x64-gnu@1.4.3': - resolution: {integrity: sha512-ep6PLjN1+g4P12Hc7sLRmVpXXaHX22ykqxnOzjXUoj1KTph5XgM4+fUCyE5dsYI+lB4/tXqFuf9ZeFgHk5f00A==} + '@napi-rs/lzma-linux-x64-gnu@1.4.4': + resolution: {integrity: sha512-mUGH8hpWJU4FXhn61cD7sHTUEBiWU5JYOhh6ErCIZ0BOoBH/0kYPptfqvJA6G9EfVIcfbtYKxJYYtFC5sbf+eA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@napi-rs/lzma-linux-x64-musl@1.4.3': - resolution: {integrity: sha512-QkCO6rVw0Z7eY0ziVc4aCFplbOTMpt0UBLPXWxsPd2lXtkAlRChzqaHOxdcL/HoLmBsqdCxmG0EZuHuAP/vKZQ==} + '@napi-rs/lzma-linux-x64-musl@1.4.4': + resolution: {integrity: sha512-ysM4mYSfWGO2h8YZVn0GH7zMZX42hU0h7IomC4/oBJmAk5BIlOGnRB8XQmyz1A7neSi6aByjAlZmW4CrZlI9Uw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@napi-rs/lzma-wasm32-wasi@1.4.3': - resolution: {integrity: sha512-+rMamB0xaeDyVt4OP4cV888cnmso+m78iUebNhGcrL/WXIziwql50KQrmj7PBdBCza/W7XEcraZT8pO8gSDGcg==} + '@napi-rs/lzma-wasm32-wasi@1.4.4': + resolution: {integrity: sha512-MyDIU8a6jJqhK4L1ISFrb9OeKaGlI3FptCo2JFoEWYaenWHRwEepFqkyuECeIe34xtU2jtJcpXhEtpnCxuAE1Q==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@napi-rs/lzma-win32-arm64-msvc@1.4.3': - resolution: {integrity: sha512-6gQ+R6ztw11hswdsEu0jsOOXXnJPwhOA1yHRjqfuFemhf6esMd8l9b0uh3BfLBNe7qumtrH4KLrHu8yC9pSY3g==} + '@napi-rs/lzma-win32-arm64-msvc@1.4.4': + resolution: {integrity: sha512-GqoJu7iL7OTqkBQGLps7rXQHZ5sdcZF7tOY06rlYO03ZNkUCjhNpmkuUsPXVnGstqgoGwzMNW6TcSsO/YWotEw==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@napi-rs/lzma-win32-ia32-msvc@1.4.3': - resolution: {integrity: sha512-+AJeJQoGE+QtZKlwM4VzDkfLmUa+6DsGOO5zdbIPlRCB6PEstRCXxp8lkMiQBNgk9f/IO0UEkRcJSZ+Hhqd8zw==} + '@napi-rs/lzma-win32-ia32-msvc@1.4.4': + resolution: {integrity: sha512-cnExNqWKl0JkLcKlFVuqUrTuQsYP8nstWGT3fz7mPhgqHFOgGmd1l9tDFhqgul7Kt0QTddZRbKl6jlkV7DjSQw==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@napi-rs/lzma-win32-x64-msvc@1.4.3': - resolution: {integrity: sha512-66dFCX9ACpVUyTTom89nxhllc88yJyjxGFHO0M2olFcrSJArulfbE9kNIATgh04NDAe/l8VsDhnAxWuvJY1GuA==} + '@napi-rs/lzma-win32-x64-msvc@1.4.4': + resolution: {integrity: sha512-15SoQgMgktF73ZnLQPkzCwtxyQ+4VuD8n5Puis1H48QRjUNnXXpqTGFyWdLPdd14vcxbndgcYvJtSjOXTfNHiw==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@napi-rs/lzma@1.4.3': - resolution: {integrity: sha512-uBjLLoUM9ll03jL/bP7XjyPg0vTU0vQ35N1vVqQHbzlK/fVZyuF2B1p/A6kqPsFFhaoBKgO6oaxsuerv091RtQ==} + '@napi-rs/lzma@1.4.4': + resolution: {integrity: sha512-C53oqFQESm5XkjFKJpXtBXYm2ZiwvrQrsgM1K+/itmSXyQYa4NpB7m0W/peF8riXpxHUt6ycOeMK9rp2enTchQ==} engines: {node: '>= 10'} - '@napi-rs/tar-android-arm-eabi@0.1.5': - resolution: {integrity: sha512-FM2qNG3ELeYibnZC8dfsCV4i/pql1nlLKVINfRC7TSwqFfgj5gbezZ0rT8gRPHbLyslVt6m4MPZfRE8Uj/MuCA==} + '@napi-rs/tar-android-arm-eabi@1.0.0': + resolution: {integrity: sha512-oEntU16IkWykPJnSwv/VIICzIt2SwEsz45z2Ab+EXOas10EB+pu0z31AiSNI5pr1CaJcadbf1JGMI9aOtbAuRQ==} engines: {node: '>= 10'} cpu: [arm] os: [android] - '@napi-rs/tar-android-arm64@0.1.5': - resolution: {integrity: sha512-OpP0QyD+K0a68nqyko793lLWiC2BN1wWF/Doatus1OCKxgj61vtrUPVO2cQGQS5i07I/+YGRF8lD0tQDrk4JDQ==} + '@napi-rs/tar-android-arm64@1.0.0': + resolution: {integrity: sha512-b2X7nQ/wH2VGzzl4KhVOR/gHqxIuqrUjMY8VKJYxAGdCrmUPRfc47kersiu6DG706kSv9T+BxeeUQvwqnXZRXQ==} engines: {node: '>= 10'} cpu: [arm64] os: [android] - '@napi-rs/tar-darwin-arm64@0.1.5': - resolution: {integrity: sha512-sfyM/9gxFabdMTFt4quvLJuKbXS6StGIUf7Cp3l8aV2WqCURJevdpN6wW8XtGBo/iSnAP52ERwMRdyIavPYruw==} + '@napi-rs/tar-darwin-arm64@1.0.0': + resolution: {integrity: sha512-m1Ug1452/DOUbJGSuJuHRTUCBQOXY0arGqXCHuSiaQhBQQjgBhlbHWCv291gV8CytFYd5lvSyiG2gFUU26Qd7A==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@napi-rs/tar-darwin-x64@0.1.5': - resolution: {integrity: sha512-NtY8bADKE/3ODBM3hW/RgPeeERJpI6/jgipT3eLJ/CQWY1VJ6t9GHR7anJKhx1oxVdmSfqfCGMolM8WPV9x9bw==} + '@napi-rs/tar-darwin-x64@1.0.0': + resolution: {integrity: sha512-1RiC53g1y4pxX7P2L9sbZcqsw6dfXvGnTNwXHDjg4ATZncZa7uoPUWa7aHAGcQm8ZBO4P0ICt2SHOepstDWWTg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@napi-rs/tar-freebsd-x64@0.1.5': - resolution: {integrity: sha512-azl0nWrDJAGg25cGVKEY7UtU5ABGz4sQASKvemDLwGbzMDtkJgCoPb+OunI1pezijRAyhiuZEQ4jK8S1qNAWCg==} + '@napi-rs/tar-freebsd-x64@1.0.0': + resolution: {integrity: sha512-uLaYn+eO3ZY2ojbohdlRFcuqYP+j2alovtuLdFvCzzsArg4DSnmcJvEQ+I4l99lfyThYB1c8GA64oxSOfmn/UA==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] - '@napi-rs/tar-linux-arm-gnueabihf@0.1.5': - resolution: {integrity: sha512-OjGdKjaW7b0m96rAvsLthMBhwYSSgpTM/WkHqRJo91HCYQ6tHXDBnq4VIQx2FpwT1PoetvRsbSgy0tOc95iYjA==} + '@napi-rs/tar-linux-arm-gnueabihf@1.0.0': + resolution: {integrity: sha512-PhGIaT45i1Fj5iY6NiWYTLPUOHb7rXiwnqKhco+IXOeIclaGcEVoAbhrLiLGQrfv9viLdyhzAxECoOr+zKnApw==} engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@napi-rs/tar-linux-arm64-gnu@0.1.5': - resolution: {integrity: sha512-o3b2VE5c7+NFb6XRcXrdXgur1yhpx+XNItFoeJUMBE8z0AGAISf2DJSbcJawmefUvrGtr+iLr61hsr6f2hw+5Q==} + '@napi-rs/tar-linux-arm64-gnu@1.0.0': + resolution: {integrity: sha512-syDburynsi2WxhD0hVUfNDpRowG+3Luiv2BKiYOUEwMZy6E/By1vQCn2NbLAqoPxaE9N/4Cp3xcW+Hn+CZ2EFA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@napi-rs/tar-linux-arm64-musl@0.1.5': - resolution: {integrity: sha512-5xTxsoPVqovnZ197CqTc+q3psRM4i+ErdiyfDgkG4nP045jh50gp22WKZuE24dc7/iS+IyUrM3+PRbmj2mzR8g==} + '@napi-rs/tar-linux-arm64-musl@1.0.0': + resolution: {integrity: sha512-KlrlAxNaZbWvGKgr4g4Cm5dRdwlogBaF3fvysaqR0kT8pA4ODBHtjsbx+ErhrQNDfg6QZIEfmFn3lrsTG/lqUA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@napi-rs/tar-linux-ppc64-gnu@0.1.5': - resolution: {integrity: sha512-7FF1u8EkDpCEPCgU0/kvuzsO+opB7eIbsGfKRIbOqrDT7c1DYxDetNTtukPvNoT2kvwfxxThgTfcPADPxdOE/w==} + '@napi-rs/tar-linux-ppc64-gnu@1.0.0': + resolution: {integrity: sha512-IbB4I8RFcvKI/zGsboUQPmlKoXfXgNOMiJw7Cbe7T1OBeYzDy6n/yEUEaG4zIbocxqjRVsF4ElrW1V/0Ihlqzg==} engines: {node: '>= 10'} cpu: [ppc64] os: [linux] - '@napi-rs/tar-linux-s390x-gnu@0.1.5': - resolution: {integrity: sha512-uyIZ7OLCLHtVBpogoJUD0GSAF1IUa3d5c5AVUemTLIwYkVgzdEB+khh3i2+/oKObf79ZKfQ8mYxOryHqfx+ulw==} + '@napi-rs/tar-linux-s390x-gnu@1.0.0': + resolution: {integrity: sha512-Tl4HSo07u3TLsNQ4KEVfYKdHVNfF/k0o5KQlyGnePiO34Kb+NfaqSKMspjSkrmXKEc0PjB+u9af3BZdTUwml4Q==} engines: {node: '>= 10'} cpu: [s390x] os: [linux] - '@napi-rs/tar-linux-x64-gnu@0.1.5': - resolution: {integrity: sha512-y8pFyVTU6lSYiW2lse6i1Ns9yt9mBkAqPbcJnIjqC7ZqRd61T6g3XZDSrKmsM6ycTfsAqoE5WyyFxBjQN29AOA==} + '@napi-rs/tar-linux-x64-gnu@1.0.0': + resolution: {integrity: sha512-Xe57Yz4MKSeG6HGECiIHuBKFwAuqs2fzwblTdMd1CoSgaaUc/K/dKTDWZwPtjC0Hh5pM86K0WZuwggbsjmFGNg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@napi-rs/tar-linux-x64-musl@0.1.5': - resolution: {integrity: sha512-8phLYc0QX+tqvp34PQHUulZUi4sy/fdg1KgFHiyYExTRRleBB01vM7KSn7Bk9dwH7lannO5D7j4O8OY46Xcr/A==} + '@napi-rs/tar-linux-x64-musl@1.0.0': + resolution: {integrity: sha512-VA4RXspXyelNAtaFEf2ZLnTYXRILVlH20OGV0oqzuUcQzpwEwK2cJbYtYHK+yCYpxrNbEGsAwN+12LYJMW+NlA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@napi-rs/tar-wasm32-wasi@0.1.5': - resolution: {integrity: sha512-OpVWC/bwY0zb6nbQDg6koxeZGb441gXwPkaYVjaK4O0TJjNpRKbokLAMlGFtcc/sVSPjghFL0+enfnLDt/P7og==} + '@napi-rs/tar-wasm32-wasi@1.0.0': + resolution: {integrity: sha512-yPMq3jMldKOi6rbbhKp+7zfaRsA2toIfRV7TbqSzwz64S5euiMrsZQcrq3F9oTtFu4wCSLo83IsNdgoVuiy44g==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@napi-rs/tar-win32-arm64-msvc@0.1.5': - resolution: {integrity: sha512-FXwQA2Ib55q98szshvDsitgo2iLW2lTD1Q53e8dPMGobPa2yL5e8IjJDCcMI7XJwBZPl9YjJk7nAb8y20DXF+Q==} + '@napi-rs/tar-win32-arm64-msvc@1.0.0': + resolution: {integrity: sha512-VdUjZK8jh6mvGRiurK3ms6Yt2hbBbtYjzKCn78Mnme2KGC585Kx1jXl7HShvreCgqh3r0162OSygoE7d/I0Jlw==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@napi-rs/tar-win32-ia32-msvc@0.1.5': - resolution: {integrity: sha512-XEt58yFslNkwf2yJ+uX5nDNmPAk15Metkx2hVPeH29mOpuG2H8nuS8/42hZ+dQfZf3xABRjyurVMMH9JcgLZIQ==} + '@napi-rs/tar-win32-ia32-msvc@1.0.0': + resolution: {integrity: sha512-8d/4iRXROPXLoe+4FEqXkpgP2KD9A45VUf76WfT6nXZwzQuoh+9WCJNRPVs5vfXV1SMnG9Z32WNc2ivCq0+HZw==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@napi-rs/tar-win32-x64-msvc@0.1.5': - resolution: {integrity: sha512-9Rq0Ob4S5NGFwNL3kGQkgrYlObqQgw19QMSZdVuhzZ9sSxn9OSF5cWgZ/n1oMEPWK+u6n9GSN2XbPn4DI7pm7Q==} + '@napi-rs/tar-win32-x64-msvc@1.0.0': + resolution: {integrity: sha512-HHtL1g0niVa4xDvyfi9wQtCTDDKkhDlaOb3bmayTqWs29mk+pcVHBST3OdXaaViSaduqdG9meosU5sOj5iKQAQ==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@napi-rs/tar@0.1.5': - resolution: {integrity: sha512-skgWKcpjtUqJUk1jwhVl8vXYCXQlFC532KiryU3hQBr6ZIJk0E0qD9FG99hUqtPko8mIMS5HDPO+uSnvHfgRVg==} + '@napi-rs/tar@1.0.0': + resolution: {integrity: sha512-4sE8bFyOQFKcjWwBoBMtB+YIgKTqQFOFQZWKJP54jENpFulw8cieBaYoA3bbKCCFxXl2jCFulFKDtDErPWULTg==} engines: {node: '>= 10'} - '@napi-rs/wasm-runtime@0.2.11': - resolution: {integrity: sha512-9DPkXtvHydrcOsopiYpUgPHpmj0HWZKMUnL2dZqpvC42lsratuBG06V5ipyno0fUek5VlFsNQ+AcFATSrJXgMA==} + '@napi-rs/wasm-runtime@0.2.12': + resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==} - '@napi-rs/wasm-tools-android-arm-eabi@0.0.3': - resolution: {integrity: sha512-T2tme8w5jZ/ZCjJurqNtKCxYtGoDjW9v2rn1bfI60ewCfkYXNpxrTURdkOib85sz+BcwmOfXn0enbg5W9KohoQ==} + '@napi-rs/wasm-runtime@1.0.1': + resolution: {integrity: sha512-KVlQ/jgywZpixGCKMNwxStmmbYEMyokZpCf2YuIChhfJA2uqfAKNEM8INz7zzTo55iEXfBhIIs3VqYyqzDLj8g==} + + '@napi-rs/wasm-tools-android-arm-eabi@1.0.0': + resolution: {integrity: sha512-Ks0hplmrYatIjSi8XeTObCi0x13AOQD41IQXpBjrz+UK71gDkbxyLWO7B/ckuels3mC1DW3OCQCv+q0lPnaG/A==} engines: {node: '>= 10'} cpu: [arm] os: [android] - '@napi-rs/wasm-tools-android-arm64@0.0.3': - resolution: {integrity: sha512-siHTjrxxBrvsVty5X2jI5waAyzJpr756GqGVUqxqS2eoTuqYRfgaFNvX8asp9LAagFtOojfD0fZfuvxK7dc4Rw==} + '@napi-rs/wasm-tools-android-arm64@1.0.0': + resolution: {integrity: sha512-Ppu1/YGLSC/ohkOA8R5YfDh1dCuCHWJObu/BTorAY55YDXIiWy400CoungbYwoRT53K+ixNrg8/zRHnpuqwkRg==} engines: {node: '>= 10'} cpu: [arm64] os: [android] - '@napi-rs/wasm-tools-darwin-arm64@0.0.3': - resolution: {integrity: sha512-0MqsSOYJ4jXcLv/nAInS8nwU+/hL0rSEJo7JXKj3dhkT9UNSj4zfidcOaIb05O9VskJBPmV040+edtWPHXNt2Q==} + '@napi-rs/wasm-tools-darwin-arm64@1.0.0': + resolution: {integrity: sha512-EUU7NvmmKASMLecu7hUHhv9XN2Thf8j+2/zCCMuFuAAlY+eZiOVfrajbZ/RE8CZ4oyfkb0bWFg/CQcmcXAatTw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@napi-rs/wasm-tools-darwin-x64@0.0.3': - resolution: {integrity: sha512-yXAK2mrlBMZZYK/59JRHZu/c683HFpr5ork1cn++fy8gqUBRLbjuq47VDjA7oyLW5SmWqNDhmhjFTDGvfIvcUg==} + '@napi-rs/wasm-tools-darwin-x64@1.0.0': + resolution: {integrity: sha512-hlX21sqy0AEnmn2abarmCXV3fpyIQN+fKqeHNuawti9ZpaJCL6gZCtUGqpUxURjXNjXSI8rywInJE2YmeVQSJQ==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@napi-rs/wasm-tools-freebsd-x64@0.0.3': - resolution: {integrity: sha512-K1rne814utBd9Zo9LCggQ5h0TSnzGPzA+sG78Qr7KfFz8XQxEGDRH5wpzXyF1KaKav2RmO6wGMXlasDgIcq7GA==} + '@napi-rs/wasm-tools-freebsd-x64@1.0.0': + resolution: {integrity: sha512-T9SOSfIgrdEGQzzquKMOfD3PF6TxG5hL2o5voZtLUALA0yjO+GnpFyv8tAcxKYd7ngWzzK5Uwk7e1z9PcsQZMg==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] - '@napi-rs/wasm-tools-linux-arm64-gnu@0.0.3': - resolution: {integrity: sha512-Yu3gtpvGc2+hcay3SU5MK7EMrGPBq/V4i8mpw/MEYUCzOb7Vd9aL8CryElzlk0SIbktG08VYMdhFFFoJAjlYtg==} + '@napi-rs/wasm-tools-linux-arm64-gnu@1.0.0': + resolution: {integrity: sha512-qHNLY0GLTZK8M/cQOy2OAaRDfk3YOlWAwlAO4KSIAseuXHAaGya3Ay//kbmwzzs8h6TKf/eAeXDwcGxze5ecxw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@napi-rs/wasm-tools-linux-arm64-musl@0.0.3': - resolution: {integrity: sha512-XN+sPgEwFw3P47wDvtcQyOoZNghIL8gaiRjEGzprB+kE9N21GkuMbk3kdjiBBJkjqKF25f4fbOvNAY0jQEAO3A==} + '@napi-rs/wasm-tools-linux-arm64-musl@1.0.0': + resolution: {integrity: sha512-54BWWTg5I9n77PRUKErBe3BKqkmbjm0GRpUKJgGdlcessC9Oxa/yVDy2BPtmJP1pQR3VabkXR63H+ZGaH5qKxw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@napi-rs/wasm-tools-linux-x64-gnu@0.0.3': - resolution: {integrity: sha512-mfMvMEqn33YtEjIyLPguZ6yDsNtF5zV7mqc99620YDyj2SLa0aI35TNTc7Dm+/hlgqHRKhdudsWGfYc4dBND2Q==} + '@napi-rs/wasm-tools-linux-x64-gnu@1.0.0': + resolution: {integrity: sha512-wpRkiy0QBM/zpaGAn5I1HfddQul0vGrdlindT2UHtOYK1zvam524M6LJXBtmhBkXS5a4F2HZiZXns8Wuc7dq4w==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@napi-rs/wasm-tools-linux-x64-musl@0.0.3': - resolution: {integrity: sha512-KXMsXWGELoN5xgPCoRHbgt5TScSx8BK2GcCHKJ9OPZ2HMfsXbLgS/SNi6vz1CbLMZMLPBY2G6HAk0gzLGyS0mQ==} + '@napi-rs/wasm-tools-linux-x64-musl@1.0.0': + resolution: {integrity: sha512-Ua94ruWB18uKyIz/nj+by2ZxfBbFzbqiiD564ocBHGbrUffpR6Us74uVwxO7rImc/WvCfJqap9ezqmaTvmK7SA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@napi-rs/wasm-tools-wasm32-wasi@0.0.3': - resolution: {integrity: sha512-v3iMHnAfMteogpbqHTFeLXPeAzL5AhpDJLvZvLXbuRiMsMRL0dn8CbcEnYja2P/Ui6Xlyky6PcaUsepOUTNb7A==} + '@napi-rs/wasm-tools-wasm32-wasi@1.0.0': + resolution: {integrity: sha512-gWVdt1UK575VKTnFRcYTe0qMZA5bFV2w69qDAhX8hG6tajjxbVyvu4jgsYvv/bJrBrxFsNbXMlEU1d0X7iWziA==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@napi-rs/wasm-tools-win32-arm64-msvc@0.0.3': - resolution: {integrity: sha512-HWrg9cW+u+rQKL9XCQILaGGs6mDYdwX9nwcTIvJAjrpGWu8Dp4wz6i66w6YKHqVng1suGYjjr+LH4/1e0tDaAg==} + '@napi-rs/wasm-tools-win32-arm64-msvc@1.0.0': + resolution: {integrity: sha512-1kv+DM7z6c9OLcjMtO1/kfdxS5hwXtW1OLIHBU41dtKz5jD3quapYrCjB7AVEZh/JVM765UaLOl31huVucJjRw==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@napi-rs/wasm-tools-win32-ia32-msvc@0.0.3': - resolution: {integrity: sha512-h99hAWvQKhcloyPfPi0IjrvKRToTE9Z4UVXoXZhcjpCGmr3o1qW+1FAupRy/TcVdMjUJNLE/aenml3UPqzQEQw==} + '@napi-rs/wasm-tools-win32-ia32-msvc@1.0.0': + resolution: {integrity: sha512-OwcyXtU2Zi3YVHYjmomM3u7jRNPY1j+IPehqCVEqd60jOTOXRZNPGoAvOC7Lw6HX/RGzOJnIcJZbVfKrz5WN1g==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@napi-rs/wasm-tools-win32-x64-msvc@0.0.3': - resolution: {integrity: sha512-7/6IpzMi9VGYxLcc9SJyu9ZIdbDwyyb09glVF/2SFEgke9F5H46XzRrAdSoRnjfcq/tdLyHKJbnpCIB257qVYg==} + '@napi-rs/wasm-tools-win32-x64-msvc@1.0.0': + resolution: {integrity: sha512-xat6gnp/G/WCe6U6HKzawotz9zpqsM5a+Dx+S0MPX4AKP7+oztC2/6tkp8KtOPT2bMRMekNntXadHKk0XqW61Q==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@napi-rs/wasm-tools@0.0.3': - resolution: {integrity: sha512-p7NT5wnOIwmP0f3KbXlMabeld5dPFsADpHMWJaBodTSmnPE8P4msguxKJLKWquqAS1FY2dsjBZ62K0/hfiqAUg==} + '@napi-rs/wasm-tools@1.0.0': + resolution: {integrity: sha512-GL43zmDN6AFmomd7eTJOdZkXDvocucjqJcBs/IY51ZTxHvBeb1SXTM0/rI2VJ7C3FTiyATTt2D8chonCi0UTgw==} engines: {node: '>= 10'} '@octokit/auth-token@6.0.0': resolution: {integrity: sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w==} engines: {node: '>= 20'} - '@octokit/core@7.0.2': - resolution: {integrity: sha512-ODsoD39Lq6vR6aBgvjTnA3nZGliknKboc9Gtxr7E4WDNqY24MxANKcuDQSF0jzapvGb3KWOEDrKfve4HoWGK+g==} + '@octokit/core@7.0.3': + resolution: {integrity: sha512-oNXsh2ywth5aowwIa7RKtawnkdH6LgU1ztfP9AIUCQCvzysB+WeU8o2kyyosDPwBZutPpjZDKPQGIzzrfTWweQ==} engines: {node: '>= 20'} '@octokit/endpoint@11.0.0': @@ -493,8 +496,8 @@ packages: '@octokit/openapi-types@25.1.0': resolution: {integrity: sha512-idsIggNXUKkk0+BExUn1dQ92sfysJrje03Q0bv0e+KPLrvyqZF8MnBpFz8UNfYDwB3Ie7Z0TByjWfzxt7vseaA==} - '@octokit/plugin-paginate-rest@13.1.0': - resolution: {integrity: sha512-16iNOa4rTTjaWtfsPGJcYYL79FJakseX8TQFIPfVuSPC3s5nkS/DSNQPFPc5lJHgEDBWNMxSApHrEymNblhA9w==} + '@octokit/plugin-paginate-rest@13.1.1': + resolution: {integrity: sha512-q9iQGlZlxAVNRN2jDNskJW/Cafy7/XE52wjZ5TTvyhyOD904Cvx//DNyoO3J/MXJ0ve3rPoNWKEg5iZrisQSuw==} engines: {node: '>= 20'} peerDependencies: '@octokit/core': '>=6' @@ -653,8 +656,8 @@ packages: cpu: [x64] os: [win32] - '@tybys/wasm-util@0.9.0': - resolution: {integrity: sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==} + '@tybys/wasm-util@0.10.0': + resolution: {integrity: sha512-VyyPYFlOMNylG45GoAe0xDoLwWuowvf92F9kySqzYh8vmYm7D2u4iUJKa1tOUpS70Ku13ASrOkS4ScXFsTaCNQ==} ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} @@ -715,6 +718,10 @@ packages: fast-content-type-parse@3.0.0: resolution: {integrity: sha512-ZvLdcY8P+N8mGQJahJV5G4U88CSvT1rP8ApL6uETe88MBXrBHAkZlSEySdUlyztF7ccb+Znos3TFqaepHxdhBg==} + find-up@7.0.0: + resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==} + engines: {node: '>=18'} + iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -727,6 +734,10 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + locate-path@7.2.0: + resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + lodash-es@4.17.21: resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} @@ -746,6 +757,18 @@ packages: engines: {node: '>=8.*'} hasBin: true + p-limit@4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + p-locate@6.0.0: + resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + path-exists@5.0.0: + resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + pirates@4.0.7: resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} engines: {node: '>= 6'} @@ -774,9 +797,6 @@ packages: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} - toml@3.0.0: - resolution: {integrity: sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==} - tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -787,55 +807,60 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} + unicorn-magic@0.1.0: + resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} + engines: {node: '>=18'} + universal-user-agent@7.0.3: resolution: {integrity: sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==} - wasm-sjlj@1.0.6: - resolution: {integrity: sha512-pjaKtLJejlWm6+okPV2X1A6nIsRDD4qeK97eCh8DP8KXi3Nzn/HY01vpHhZHlhDri12eZqipjm8HhdTVw+ATxw==} - wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} + yocto-queue@1.2.1: + resolution: {integrity: sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==} + engines: {node: '>=12.20'} + yoctocolors-cjs@2.1.2: resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} engines: {node: '>=18'} snapshots: - '@emnapi/core@1.4.3': + '@emnapi/core@1.4.5': dependencies: - '@emnapi/wasi-threads': 1.0.2 + '@emnapi/wasi-threads': 1.0.4 tslib: 2.8.1 optional: true - '@emnapi/runtime@1.4.3': + '@emnapi/runtime@1.4.5': dependencies: tslib: 2.8.1 optional: true - '@emnapi/wasi-threads@1.0.2': + '@emnapi/wasi-threads@1.0.4': dependencies: tslib: 2.8.1 optional: true - '@inquirer/checkbox@4.1.8': + '@inquirer/checkbox@4.2.0': dependencies: - '@inquirer/core': 10.1.13 - '@inquirer/figures': 1.0.12 - '@inquirer/type': 3.0.7 + '@inquirer/core': 10.1.15 + '@inquirer/figures': 1.0.13 + '@inquirer/type': 3.0.8 ansi-escapes: 4.3.2 yoctocolors-cjs: 2.1.2 - '@inquirer/confirm@5.1.12': + '@inquirer/confirm@5.1.14': dependencies: - '@inquirer/core': 10.1.13 - '@inquirer/type': 3.0.7 + '@inquirer/core': 10.1.15 + '@inquirer/type': 3.0.8 - '@inquirer/core@10.1.13': + '@inquirer/core@10.1.15': dependencies: - '@inquirer/figures': 1.0.12 - '@inquirer/type': 3.0.7 + '@inquirer/figures': 1.0.13 + '@inquirer/type': 3.0.8 ansi-escapes: 4.3.2 cli-width: 4.1.0 mute-stream: 2.0.0 @@ -843,89 +868,88 @@ snapshots: wrap-ansi: 6.2.0 yoctocolors-cjs: 2.1.2 - '@inquirer/editor@4.2.13': + '@inquirer/editor@4.2.15': dependencies: - '@inquirer/core': 10.1.13 - '@inquirer/type': 3.0.7 + '@inquirer/core': 10.1.15 + '@inquirer/type': 3.0.8 external-editor: 3.1.0 - '@inquirer/expand@4.0.15': + '@inquirer/expand@4.0.17': dependencies: - '@inquirer/core': 10.1.13 - '@inquirer/type': 3.0.7 + '@inquirer/core': 10.1.15 + '@inquirer/type': 3.0.8 yoctocolors-cjs: 2.1.2 - '@inquirer/figures@1.0.12': {} + '@inquirer/figures@1.0.13': {} - '@inquirer/input@4.1.12': + '@inquirer/input@4.2.1': dependencies: - '@inquirer/core': 10.1.13 - '@inquirer/type': 3.0.7 + '@inquirer/core': 10.1.15 + '@inquirer/type': 3.0.8 - '@inquirer/number@3.0.15': + '@inquirer/number@3.0.17': dependencies: - '@inquirer/core': 10.1.13 - '@inquirer/type': 3.0.7 + '@inquirer/core': 10.1.15 + '@inquirer/type': 3.0.8 - '@inquirer/password@4.0.15': + '@inquirer/password@4.0.17': dependencies: - '@inquirer/core': 10.1.13 - '@inquirer/type': 3.0.7 + '@inquirer/core': 10.1.15 + '@inquirer/type': 3.0.8 ansi-escapes: 4.3.2 - '@inquirer/prompts@7.5.3': + '@inquirer/prompts@7.7.1': dependencies: - '@inquirer/checkbox': 4.1.8 - '@inquirer/confirm': 5.1.12 - '@inquirer/editor': 4.2.13 - '@inquirer/expand': 4.0.15 - '@inquirer/input': 4.1.12 - '@inquirer/number': 3.0.15 - '@inquirer/password': 4.0.15 - '@inquirer/rawlist': 4.1.3 - '@inquirer/search': 3.0.15 - '@inquirer/select': 4.2.3 - - '@inquirer/rawlist@4.1.3': + '@inquirer/checkbox': 4.2.0 + '@inquirer/confirm': 5.1.14 + '@inquirer/editor': 4.2.15 + '@inquirer/expand': 4.0.17 + '@inquirer/input': 4.2.1 + '@inquirer/number': 3.0.17 + '@inquirer/password': 4.0.17 + '@inquirer/rawlist': 4.1.5 + '@inquirer/search': 3.0.17 + '@inquirer/select': 4.3.1 + + '@inquirer/rawlist@4.1.5': dependencies: - '@inquirer/core': 10.1.13 - '@inquirer/type': 3.0.7 + '@inquirer/core': 10.1.15 + '@inquirer/type': 3.0.8 yoctocolors-cjs: 2.1.2 - '@inquirer/search@3.0.15': + '@inquirer/search@3.0.17': dependencies: - '@inquirer/core': 10.1.13 - '@inquirer/figures': 1.0.12 - '@inquirer/type': 3.0.7 + '@inquirer/core': 10.1.15 + '@inquirer/figures': 1.0.13 + '@inquirer/type': 3.0.8 yoctocolors-cjs: 2.1.2 - '@inquirer/select@4.2.3': + '@inquirer/select@4.3.1': dependencies: - '@inquirer/core': 10.1.13 - '@inquirer/figures': 1.0.12 - '@inquirer/type': 3.0.7 + '@inquirer/core': 10.1.15 + '@inquirer/figures': 1.0.13 + '@inquirer/type': 3.0.8 ansi-escapes: 4.3.2 yoctocolors-cjs: 2.1.2 - '@inquirer/type@3.0.7': {} + '@inquirer/type@3.0.8': {} - '@napi-rs/cli@3.0.0-alpha.89(@emnapi/runtime@1.4.3)': + '@napi-rs/cli@3.0.4(@emnapi/runtime@1.4.5)': dependencies: - '@inquirer/prompts': 7.5.3 - '@napi-rs/cross-toolchain': 0.0.19 - '@napi-rs/wasm-tools': 0.0.3 + '@inquirer/prompts': 7.7.1 + '@napi-rs/cross-toolchain': 1.0.0 + '@napi-rs/wasm-tools': 1.0.0 '@octokit/rest': 22.0.0 clipanion: 4.0.0-rc.4(typanion@3.14.0) colorette: 2.0.20 debug: 4.4.1 + find-up: 7.0.0 js-yaml: 4.1.0 lodash-es: 4.17.21 semver: 7.7.2 - toml: 3.0.0 typanion: 3.14.0 - wasm-sjlj: 1.0.6 optionalDependencies: - '@emnapi/runtime': 1.4.3 + '@emnapi/runtime': 1.4.5 transitivePeerDependencies: - '@napi-rs/cross-toolchain-arm64-target-aarch64' - '@napi-rs/cross-toolchain-arm64-target-armv7' @@ -936,223 +960,230 @@ snapshots: - '@types/node' - supports-color - '@napi-rs/cross-toolchain@0.0.19': + '@napi-rs/cross-toolchain@1.0.0': dependencies: - '@napi-rs/lzma': 1.4.3 - '@napi-rs/tar': 0.1.5 + '@napi-rs/lzma': 1.4.4 + '@napi-rs/tar': 1.0.0 debug: 4.4.1 transitivePeerDependencies: - supports-color - '@napi-rs/lzma-android-arm-eabi@1.4.3': + '@napi-rs/lzma-android-arm-eabi@1.4.4': optional: true - '@napi-rs/lzma-android-arm64@1.4.3': + '@napi-rs/lzma-android-arm64@1.4.4': optional: true - '@napi-rs/lzma-darwin-arm64@1.4.3': + '@napi-rs/lzma-darwin-arm64@1.4.4': optional: true - '@napi-rs/lzma-darwin-x64@1.4.3': + '@napi-rs/lzma-darwin-x64@1.4.4': optional: true - '@napi-rs/lzma-freebsd-x64@1.4.3': + '@napi-rs/lzma-freebsd-x64@1.4.4': optional: true - '@napi-rs/lzma-linux-arm-gnueabihf@1.4.3': + '@napi-rs/lzma-linux-arm-gnueabihf@1.4.4': optional: true - '@napi-rs/lzma-linux-arm64-gnu@1.4.3': + '@napi-rs/lzma-linux-arm64-gnu@1.4.4': optional: true - '@napi-rs/lzma-linux-arm64-musl@1.4.3': + '@napi-rs/lzma-linux-arm64-musl@1.4.4': optional: true - '@napi-rs/lzma-linux-ppc64-gnu@1.4.3': + '@napi-rs/lzma-linux-ppc64-gnu@1.4.4': optional: true - '@napi-rs/lzma-linux-riscv64-gnu@1.4.3': + '@napi-rs/lzma-linux-riscv64-gnu@1.4.4': optional: true - '@napi-rs/lzma-linux-s390x-gnu@1.4.3': + '@napi-rs/lzma-linux-s390x-gnu@1.4.4': optional: true - '@napi-rs/lzma-linux-x64-gnu@1.4.3': + '@napi-rs/lzma-linux-x64-gnu@1.4.4': optional: true - '@napi-rs/lzma-linux-x64-musl@1.4.3': + '@napi-rs/lzma-linux-x64-musl@1.4.4': optional: true - '@napi-rs/lzma-wasm32-wasi@1.4.3': + '@napi-rs/lzma-wasm32-wasi@1.4.4': dependencies: - '@napi-rs/wasm-runtime': 0.2.11 + '@napi-rs/wasm-runtime': 1.0.1 optional: true - '@napi-rs/lzma-win32-arm64-msvc@1.4.3': + '@napi-rs/lzma-win32-arm64-msvc@1.4.4': optional: true - '@napi-rs/lzma-win32-ia32-msvc@1.4.3': + '@napi-rs/lzma-win32-ia32-msvc@1.4.4': optional: true - '@napi-rs/lzma-win32-x64-msvc@1.4.3': + '@napi-rs/lzma-win32-x64-msvc@1.4.4': optional: true - '@napi-rs/lzma@1.4.3': + '@napi-rs/lzma@1.4.4': optionalDependencies: - '@napi-rs/lzma-android-arm-eabi': 1.4.3 - '@napi-rs/lzma-android-arm64': 1.4.3 - '@napi-rs/lzma-darwin-arm64': 1.4.3 - '@napi-rs/lzma-darwin-x64': 1.4.3 - '@napi-rs/lzma-freebsd-x64': 1.4.3 - '@napi-rs/lzma-linux-arm-gnueabihf': 1.4.3 - '@napi-rs/lzma-linux-arm64-gnu': 1.4.3 - '@napi-rs/lzma-linux-arm64-musl': 1.4.3 - '@napi-rs/lzma-linux-ppc64-gnu': 1.4.3 - '@napi-rs/lzma-linux-riscv64-gnu': 1.4.3 - '@napi-rs/lzma-linux-s390x-gnu': 1.4.3 - '@napi-rs/lzma-linux-x64-gnu': 1.4.3 - '@napi-rs/lzma-linux-x64-musl': 1.4.3 - '@napi-rs/lzma-wasm32-wasi': 1.4.3 - '@napi-rs/lzma-win32-arm64-msvc': 1.4.3 - '@napi-rs/lzma-win32-ia32-msvc': 1.4.3 - '@napi-rs/lzma-win32-x64-msvc': 1.4.3 + '@napi-rs/lzma-android-arm-eabi': 1.4.4 + '@napi-rs/lzma-android-arm64': 1.4.4 + '@napi-rs/lzma-darwin-arm64': 1.4.4 + '@napi-rs/lzma-darwin-x64': 1.4.4 + '@napi-rs/lzma-freebsd-x64': 1.4.4 + '@napi-rs/lzma-linux-arm-gnueabihf': 1.4.4 + '@napi-rs/lzma-linux-arm64-gnu': 1.4.4 + '@napi-rs/lzma-linux-arm64-musl': 1.4.4 + '@napi-rs/lzma-linux-ppc64-gnu': 1.4.4 + '@napi-rs/lzma-linux-riscv64-gnu': 1.4.4 + '@napi-rs/lzma-linux-s390x-gnu': 1.4.4 + '@napi-rs/lzma-linux-x64-gnu': 1.4.4 + '@napi-rs/lzma-linux-x64-musl': 1.4.4 + '@napi-rs/lzma-wasm32-wasi': 1.4.4 + '@napi-rs/lzma-win32-arm64-msvc': 1.4.4 + '@napi-rs/lzma-win32-ia32-msvc': 1.4.4 + '@napi-rs/lzma-win32-x64-msvc': 1.4.4 - '@napi-rs/tar-android-arm-eabi@0.1.5': + '@napi-rs/tar-android-arm-eabi@1.0.0': optional: true - '@napi-rs/tar-android-arm64@0.1.5': + '@napi-rs/tar-android-arm64@1.0.0': optional: true - '@napi-rs/tar-darwin-arm64@0.1.5': + '@napi-rs/tar-darwin-arm64@1.0.0': optional: true - '@napi-rs/tar-darwin-x64@0.1.5': + '@napi-rs/tar-darwin-x64@1.0.0': optional: true - '@napi-rs/tar-freebsd-x64@0.1.5': + '@napi-rs/tar-freebsd-x64@1.0.0': optional: true - '@napi-rs/tar-linux-arm-gnueabihf@0.1.5': + '@napi-rs/tar-linux-arm-gnueabihf@1.0.0': optional: true - '@napi-rs/tar-linux-arm64-gnu@0.1.5': + '@napi-rs/tar-linux-arm64-gnu@1.0.0': optional: true - '@napi-rs/tar-linux-arm64-musl@0.1.5': + '@napi-rs/tar-linux-arm64-musl@1.0.0': optional: true - '@napi-rs/tar-linux-ppc64-gnu@0.1.5': + '@napi-rs/tar-linux-ppc64-gnu@1.0.0': optional: true - '@napi-rs/tar-linux-s390x-gnu@0.1.5': + '@napi-rs/tar-linux-s390x-gnu@1.0.0': optional: true - '@napi-rs/tar-linux-x64-gnu@0.1.5': + '@napi-rs/tar-linux-x64-gnu@1.0.0': optional: true - '@napi-rs/tar-linux-x64-musl@0.1.5': + '@napi-rs/tar-linux-x64-musl@1.0.0': optional: true - '@napi-rs/tar-wasm32-wasi@0.1.5': + '@napi-rs/tar-wasm32-wasi@1.0.0': dependencies: - '@napi-rs/wasm-runtime': 0.2.11 + '@napi-rs/wasm-runtime': 1.0.1 optional: true - '@napi-rs/tar-win32-arm64-msvc@0.1.5': + '@napi-rs/tar-win32-arm64-msvc@1.0.0': optional: true - '@napi-rs/tar-win32-ia32-msvc@0.1.5': + '@napi-rs/tar-win32-ia32-msvc@1.0.0': optional: true - '@napi-rs/tar-win32-x64-msvc@0.1.5': + '@napi-rs/tar-win32-x64-msvc@1.0.0': optional: true - '@napi-rs/tar@0.1.5': + '@napi-rs/tar@1.0.0': optionalDependencies: - '@napi-rs/tar-android-arm-eabi': 0.1.5 - '@napi-rs/tar-android-arm64': 0.1.5 - '@napi-rs/tar-darwin-arm64': 0.1.5 - '@napi-rs/tar-darwin-x64': 0.1.5 - '@napi-rs/tar-freebsd-x64': 0.1.5 - '@napi-rs/tar-linux-arm-gnueabihf': 0.1.5 - '@napi-rs/tar-linux-arm64-gnu': 0.1.5 - '@napi-rs/tar-linux-arm64-musl': 0.1.5 - '@napi-rs/tar-linux-ppc64-gnu': 0.1.5 - '@napi-rs/tar-linux-s390x-gnu': 0.1.5 - '@napi-rs/tar-linux-x64-gnu': 0.1.5 - '@napi-rs/tar-linux-x64-musl': 0.1.5 - '@napi-rs/tar-wasm32-wasi': 0.1.5 - '@napi-rs/tar-win32-arm64-msvc': 0.1.5 - '@napi-rs/tar-win32-ia32-msvc': 0.1.5 - '@napi-rs/tar-win32-x64-msvc': 0.1.5 - - '@napi-rs/wasm-runtime@0.2.11': + '@napi-rs/tar-android-arm-eabi': 1.0.0 + '@napi-rs/tar-android-arm64': 1.0.0 + '@napi-rs/tar-darwin-arm64': 1.0.0 + '@napi-rs/tar-darwin-x64': 1.0.0 + '@napi-rs/tar-freebsd-x64': 1.0.0 + '@napi-rs/tar-linux-arm-gnueabihf': 1.0.0 + '@napi-rs/tar-linux-arm64-gnu': 1.0.0 + '@napi-rs/tar-linux-arm64-musl': 1.0.0 + '@napi-rs/tar-linux-ppc64-gnu': 1.0.0 + '@napi-rs/tar-linux-s390x-gnu': 1.0.0 + '@napi-rs/tar-linux-x64-gnu': 1.0.0 + '@napi-rs/tar-linux-x64-musl': 1.0.0 + '@napi-rs/tar-wasm32-wasi': 1.0.0 + '@napi-rs/tar-win32-arm64-msvc': 1.0.0 + '@napi-rs/tar-win32-ia32-msvc': 1.0.0 + '@napi-rs/tar-win32-x64-msvc': 1.0.0 + + '@napi-rs/wasm-runtime@0.2.12': + dependencies: + '@emnapi/core': 1.4.5 + '@emnapi/runtime': 1.4.5 + '@tybys/wasm-util': 0.10.0 + optional: true + + '@napi-rs/wasm-runtime@1.0.1': dependencies: - '@emnapi/core': 1.4.3 - '@emnapi/runtime': 1.4.3 - '@tybys/wasm-util': 0.9.0 + '@emnapi/core': 1.4.5 + '@emnapi/runtime': 1.4.5 + '@tybys/wasm-util': 0.10.0 optional: true - '@napi-rs/wasm-tools-android-arm-eabi@0.0.3': + '@napi-rs/wasm-tools-android-arm-eabi@1.0.0': optional: true - '@napi-rs/wasm-tools-android-arm64@0.0.3': + '@napi-rs/wasm-tools-android-arm64@1.0.0': optional: true - '@napi-rs/wasm-tools-darwin-arm64@0.0.3': + '@napi-rs/wasm-tools-darwin-arm64@1.0.0': optional: true - '@napi-rs/wasm-tools-darwin-x64@0.0.3': + '@napi-rs/wasm-tools-darwin-x64@1.0.0': optional: true - '@napi-rs/wasm-tools-freebsd-x64@0.0.3': + '@napi-rs/wasm-tools-freebsd-x64@1.0.0': optional: true - '@napi-rs/wasm-tools-linux-arm64-gnu@0.0.3': + '@napi-rs/wasm-tools-linux-arm64-gnu@1.0.0': optional: true - '@napi-rs/wasm-tools-linux-arm64-musl@0.0.3': + '@napi-rs/wasm-tools-linux-arm64-musl@1.0.0': optional: true - '@napi-rs/wasm-tools-linux-x64-gnu@0.0.3': + '@napi-rs/wasm-tools-linux-x64-gnu@1.0.0': optional: true - '@napi-rs/wasm-tools-linux-x64-musl@0.0.3': + '@napi-rs/wasm-tools-linux-x64-musl@1.0.0': optional: true - '@napi-rs/wasm-tools-wasm32-wasi@0.0.3': + '@napi-rs/wasm-tools-wasm32-wasi@1.0.0': dependencies: - '@napi-rs/wasm-runtime': 0.2.11 + '@napi-rs/wasm-runtime': 1.0.1 optional: true - '@napi-rs/wasm-tools-win32-arm64-msvc@0.0.3': + '@napi-rs/wasm-tools-win32-arm64-msvc@1.0.0': optional: true - '@napi-rs/wasm-tools-win32-ia32-msvc@0.0.3': + '@napi-rs/wasm-tools-win32-ia32-msvc@1.0.0': optional: true - '@napi-rs/wasm-tools-win32-x64-msvc@0.0.3': + '@napi-rs/wasm-tools-win32-x64-msvc@1.0.0': optional: true - '@napi-rs/wasm-tools@0.0.3': + '@napi-rs/wasm-tools@1.0.0': optionalDependencies: - '@napi-rs/wasm-tools-android-arm-eabi': 0.0.3 - '@napi-rs/wasm-tools-android-arm64': 0.0.3 - '@napi-rs/wasm-tools-darwin-arm64': 0.0.3 - '@napi-rs/wasm-tools-darwin-x64': 0.0.3 - '@napi-rs/wasm-tools-freebsd-x64': 0.0.3 - '@napi-rs/wasm-tools-linux-arm64-gnu': 0.0.3 - '@napi-rs/wasm-tools-linux-arm64-musl': 0.0.3 - '@napi-rs/wasm-tools-linux-x64-gnu': 0.0.3 - '@napi-rs/wasm-tools-linux-x64-musl': 0.0.3 - '@napi-rs/wasm-tools-wasm32-wasi': 0.0.3 - '@napi-rs/wasm-tools-win32-arm64-msvc': 0.0.3 - '@napi-rs/wasm-tools-win32-ia32-msvc': 0.0.3 - '@napi-rs/wasm-tools-win32-x64-msvc': 0.0.3 + '@napi-rs/wasm-tools-android-arm-eabi': 1.0.0 + '@napi-rs/wasm-tools-android-arm64': 1.0.0 + '@napi-rs/wasm-tools-darwin-arm64': 1.0.0 + '@napi-rs/wasm-tools-darwin-x64': 1.0.0 + '@napi-rs/wasm-tools-freebsd-x64': 1.0.0 + '@napi-rs/wasm-tools-linux-arm64-gnu': 1.0.0 + '@napi-rs/wasm-tools-linux-arm64-musl': 1.0.0 + '@napi-rs/wasm-tools-linux-x64-gnu': 1.0.0 + '@napi-rs/wasm-tools-linux-x64-musl': 1.0.0 + '@napi-rs/wasm-tools-wasm32-wasi': 1.0.0 + '@napi-rs/wasm-tools-win32-arm64-msvc': 1.0.0 + '@napi-rs/wasm-tools-win32-ia32-msvc': 1.0.0 + '@napi-rs/wasm-tools-win32-x64-msvc': 1.0.0 '@octokit/auth-token@6.0.0': {} - '@octokit/core@7.0.2': + '@octokit/core@7.0.3': dependencies: '@octokit/auth-token': 6.0.0 '@octokit/graphql': 9.0.1 @@ -1175,18 +1206,18 @@ snapshots: '@octokit/openapi-types@25.1.0': {} - '@octokit/plugin-paginate-rest@13.1.0(@octokit/core@7.0.2)': + '@octokit/plugin-paginate-rest@13.1.1(@octokit/core@7.0.3)': dependencies: - '@octokit/core': 7.0.2 + '@octokit/core': 7.0.3 '@octokit/types': 14.1.0 - '@octokit/plugin-request-log@6.0.0(@octokit/core@7.0.2)': + '@octokit/plugin-request-log@6.0.0(@octokit/core@7.0.3)': dependencies: - '@octokit/core': 7.0.2 + '@octokit/core': 7.0.3 - '@octokit/plugin-rest-endpoint-methods@16.0.0(@octokit/core@7.0.2)': + '@octokit/plugin-rest-endpoint-methods@16.0.0(@octokit/core@7.0.3)': dependencies: - '@octokit/core': 7.0.2 + '@octokit/core': 7.0.3 '@octokit/types': 14.1.0 '@octokit/request-error@7.0.0': @@ -1203,10 +1234,10 @@ snapshots: '@octokit/rest@22.0.0': dependencies: - '@octokit/core': 7.0.2 - '@octokit/plugin-paginate-rest': 13.1.0(@octokit/core@7.0.2) - '@octokit/plugin-request-log': 6.0.0(@octokit/core@7.0.2) - '@octokit/plugin-rest-endpoint-methods': 16.0.0(@octokit/core@7.0.2) + '@octokit/core': 7.0.3 + '@octokit/plugin-paginate-rest': 13.1.1(@octokit/core@7.0.3) + '@octokit/plugin-request-log': 6.0.0(@octokit/core@7.0.3) + '@octokit/plugin-rest-endpoint-methods': 16.0.0(@octokit/core@7.0.3) '@octokit/types@14.1.0': dependencies: @@ -1250,7 +1281,7 @@ snapshots: '@oxc-node/core-wasm32-wasi@0.0.23': dependencies: - '@napi-rs/wasm-runtime': 0.2.11 + '@napi-rs/wasm-runtime': 0.2.12 optional: true '@oxc-node/core-win32-arm64-msvc@0.0.23': @@ -1310,7 +1341,7 @@ snapshots: '@oxlint/win32-x64@0.16.12': optional: true - '@tybys/wasm-util@0.9.0': + '@tybys/wasm-util@0.10.0': dependencies: tslib: 2.8.1 optional: true @@ -1359,6 +1390,12 @@ snapshots: fast-content-type-parse@3.0.0: {} + find-up@7.0.0: + dependencies: + locate-path: 7.2.0 + path-exists: 5.0.0 + unicorn-magic: 0.1.0 + iconv-lite@0.4.24: dependencies: safer-buffer: 2.1.2 @@ -1369,6 +1406,10 @@ snapshots: dependencies: argparse: 2.0.1 + locate-path@7.2.0: + dependencies: + p-locate: 6.0.0 + lodash-es@4.17.21: {} ms@2.1.3: {} @@ -1388,6 +1429,16 @@ snapshots: '@oxlint/win32-arm64': 0.16.12 '@oxlint/win32-x64': 0.16.12 + p-limit@4.0.0: + dependencies: + yocto-queue: 1.2.1 + + p-locate@6.0.0: + dependencies: + p-limit: 4.0.0 + + path-exists@5.0.0: {} + pirates@4.0.7: {} safer-buffer@2.1.2: {} @@ -1410,8 +1461,6 @@ snapshots: dependencies: os-tmpdir: 1.0.2 - toml@3.0.0: {} - tslib@2.8.1: optional: true @@ -1419,9 +1468,9 @@ snapshots: type-fest@0.21.3: {} - universal-user-agent@7.0.3: {} + unicorn-magic@0.1.0: {} - wasm-sjlj@1.0.6: {} + universal-user-agent@7.0.3: {} wrap-ansi@6.2.0: dependencies: @@ -1429,4 +1478,6 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + yocto-queue@1.2.1: {} + yoctocolors-cjs@2.1.2: {} diff --git a/src/extensions.rs b/src/extensions.rs index 6bfed7d..b444ac5 100644 --- a/src/extensions.rs +++ b/src/extensions.rs @@ -95,9 +95,10 @@ impl ResponseLog { Self { buffer } } - /// Append data to the log + /// Append data to the log with a trailing newline pub fn append(&mut self, data: impl AsRef<[u8]>) { self.buffer.extend_from_slice(data.as_ref()); + self.buffer.extend_from_slice(b"\n"); } /// Get the log content as bytes @@ -154,6 +155,63 @@ impl From<&str> for ResponseException { } } +/// Response body buffer for if you need to accumulate response +/// body chunks before you're ready to build a response object. +#[derive(Clone, Debug, Default)] +pub struct BodyBuffer { + buffer: BytesMut, +} + +impl BodyBuffer { + /// Create a new empty body + pub fn new() -> Self { + Self::default() + } + + /// Create a body with initial content + pub fn from_bytes(bytes: impl Into) -> Self { + let bytes = bytes.into(); + let mut buffer = BytesMut::with_capacity(bytes.len()); + buffer.extend_from_slice(&bytes); + Self { buffer } + } + + /// Append data to the body + pub fn append(&mut self, data: impl AsRef<[u8]>) { + self.buffer.extend_from_slice(data.as_ref()); + } + + /// Get the body content as bytes + pub fn as_bytes(&self) -> &[u8] { + &self.buffer + } + + /// Convert the body to Bytes + pub fn into_bytes(self) -> Bytes { + self.buffer.freeze() + } + + /// Convert the body to BytesMut + pub fn into_bytes_mut(self) -> BytesMut { + self.buffer + } + + /// Get the length of the body + pub fn len(&self) -> usize { + self.buffer.len() + } + + /// Check if the body is empty + pub fn is_empty(&self) -> bool { + self.buffer.is_empty() + } + + /// Clear the body + pub fn clear(&mut self) { + self.buffer.clear(); + } +} + /// Extension trait for http::Request /// /// This trait provides methods to access and modify socket information related @@ -298,6 +356,21 @@ pub trait ResponseBuilderExt { /// Set exception in response builder fn exception(self, exception: impl Into) -> http::response::Builder; + + /// Set body in response builder + fn body_buffer(self, body: BodyBuffer) -> http::response::Builder; + + /// Get mutable access to the log extension + fn log_mut(&mut self) -> &mut ResponseLog; + + /// Get mutable access to the body extension + fn body_buffer_mut(&mut self) -> &mut BodyBuffer; + + /// Append to the log extension + fn append_log(&mut self, data: impl AsRef<[u8]>) -> &mut Self; + + /// Append to the body extension + fn append_body(&mut self, data: impl AsRef<[u8]>) -> &mut Self; } impl ResponseBuilderExt for http::response::Builder { @@ -308,6 +381,36 @@ impl ResponseBuilderExt for http::response::Builder { fn exception(self, exception: impl Into) -> http::response::Builder { self.extension(ResponseException::new(exception)) } + + fn body_buffer(self, body: BodyBuffer) -> http::response::Builder { + self.extension(body) + } + + fn log_mut(&mut self) -> &mut ResponseLog { + let extensions = self.extensions_mut().unwrap(); + if extensions.get::().is_none() { + extensions.insert(ResponseLog::new()); + } + extensions.get_mut::().unwrap() + } + + fn body_buffer_mut(&mut self) -> &mut BodyBuffer { + let extensions = self.extensions_mut().unwrap(); + if extensions.get::().is_none() { + extensions.insert(BodyBuffer::new()); + } + extensions.get_mut::().unwrap() + } + + fn append_log(&mut self, data: impl AsRef<[u8]>) -> &mut Self { + self.log_mut().append(data); + self + } + + fn append_body(&mut self, data: impl AsRef<[u8]>) -> &mut Self { + self.body_buffer_mut().append(data); + self + } } #[cfg(test)] @@ -341,18 +444,34 @@ mod tests { log.append("Hello"); log.append(" World"); - assert_eq!(log.as_bytes(), b"Hello World"); - assert_eq!(log.len(), 11); + assert_eq!(log.as_bytes(), b"Hello\n World\n"); + assert_eq!(log.len(), 13); assert!(!log.is_empty()); let bytes = log.clone().into_bytes(); - assert_eq!(&bytes[..], b"Hello World"); + assert_eq!(&bytes[..], b"Hello\n World\n"); log.clear(); assert!(log.is_empty()); let log = ResponseLog::from_bytes("Initial content"); assert_eq!(log.as_bytes(), b"Initial content"); + + // Test that newlines are always added + let mut log = ResponseLog::new(); + log.append("Line with newline\n"); + log.append("Line without newline"); + assert_eq!( + log.as_bytes(), + b"Line with newline\n\nLine without newline\n" + ); + + // Test empty append also adds newline + log.append(""); + assert_eq!( + log.as_bytes(), + b"Line with newline\n\nLine without newline\n\n" + ); } #[test] @@ -405,7 +524,7 @@ mod tests { response.append_log(" - more data"); assert_eq!( response.log().unwrap().as_bytes(), - b"Initial log - more data" + b"Initial log - more data\n" ); // Set exception diff --git a/src/handler.rs b/src/handler.rs index 527a3e1..c105583 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -223,7 +223,7 @@ mod tests { assert_eq!(response.body(), &Bytes::from("OK")); let log = response.log().unwrap(); - assert_eq!(log.as_bytes(), b"POST /api/users"); + assert_eq!(log.as_bytes(), b"POST /api/users\n"); } /// Test handler that uses socket info diff --git a/src/lib.rs b/src/lib.rs index 7c52fda..0f24561 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,8 +16,8 @@ pub mod types; pub mod napi; pub use extensions::{ - RequestBuilderExt, RequestExt, ResponseBuilderExt, ResponseException, ResponseExt, ResponseLog, - SocketInfo, + BodyBuffer, RequestBuilderExt, RequestExt, ResponseBuilderExt, ResponseException, ResponseExt, + ResponseLog, SocketInfo, }; pub use handler::Handler; pub use types::{Request, Response}; diff --git a/src/napi.rs b/src/napi.rs index 3d320b9..7885395 100644 --- a/src/napi.rs +++ b/src/napi.rs @@ -14,7 +14,7 @@ use napi_derive::napi; use crate::{ Request as InnerRequest, RequestBuilderExt, RequestExt, Response as InnerResponse, - ResponseBuilderExt, SocketInfo as InnerSocketInfo, + ResponseBuilderExt, ResponseExt, SocketInfo as InnerSocketInfo, }; // @@ -301,7 +301,7 @@ impl Headers { /// headers.set('Accept', 'application/json'); /// headers.set('Accept', 'text/html'); /// - /// console.log(headers.getLine('Accept')); // application/json, text/html + /// console.log(headers.getLine('Accept')); // application/json,text/html /// ``` #[napi] pub fn get_line(&self, key: String) -> Option { @@ -309,7 +309,7 @@ impl Headers { if values.is_empty() { None } else { - Some(values.join(", ")) + Some(values.join(",")) } } @@ -569,8 +569,8 @@ impl Headers { pub struct RequestOptions { /// The HTTP method for the request. pub method: Option, - /// The URI for the request. - pub uri: String, + /// The URL for the request. + pub url: String, /// The headers for the request. #[napi(ts_type = "Headers | HeaderMap")] pub headers: Option, @@ -616,9 +616,43 @@ impl Request { None => return Err(Error::new(Status::InvalidArg, "Missing `options` argument")), }; + // Parse the initial URI to check if it's a full URL or just a path + let initial_uri: http::Uri = options + .url + .parse() + .map_err(|_| Error::new(Status::InvalidArg, "Invalid URL"))?; + + let mut final_uri = initial_uri.clone(); + + // If we only have a path (no scheme/authority), try to reconstruct from Host header + if initial_uri.scheme().is_none() && initial_uri.authority().is_none() { + if let Some(ref headers) = options.headers { + if let Some(host_value) = headers.get("host".to_string()) { + // Reconstruct the full URI using the Host header + let scheme = "https"; // Default to HTTPS + let full_url = format!( + "{}://{}{}", + scheme, + host_value, + initial_uri + .path_and_query() + .map(|pq| pq.as_str()) + .unwrap_or("/") + ); + + final_uri = full_url.parse().map_err(|_| { + Error::new( + Status::InvalidArg, + "Invalid reconstructed URL from Host header", + ) + })?; + } + } + } + let mut request = RequestBuilder::new() .method(options.method.unwrap_or_else(|| "GET".to_string()).as_str()) - .uri(&options.uri); + .uri(final_uri); if let Some(headers) = options.headers { for (key, value) in headers.iter() { @@ -639,10 +673,7 @@ impl Request { .map(|body| BytesMut::from(body.deref())) .unwrap_or_default(); - let request = request - .uri(options.uri.as_str()) - .body(body) - .expect("Failed to build request"); + let request = request.body(body).expect("Failed to build request"); Ok(Request(request)) } @@ -654,7 +685,7 @@ impl Request { /// ```js /// const request = new Request({ /// method: "GET", - /// uri: "/index.php" + /// url: "/index.php" /// }); /// /// console.log(request.method); // GET @@ -670,7 +701,7 @@ impl Request { /// /// ```js /// const request = new Request({ - /// uri: "/index.php" + /// url: "/index.php" /// }); /// /// request.method = "POST"; @@ -685,50 +716,66 @@ impl Request { Ok(()) } - /// Get the URI for the request. + /// Get the full URL for the request, including scheme and authority. /// /// # Examples /// /// ```js /// const request = new Request({ - /// uri: "/index.php" + /// url: "https://example.com/index.php" /// }); /// - /// console.log(request.uri); // /index.php + /// console.log(request.url); // https://example.com/index.php /// ``` #[napi(getter, enumerable = true)] - pub fn uri(&self) -> String { + pub fn url(&self) -> String { self.0.uri().to_string() } - /// Set the URI for the request. + /// Set the URL for the request. /// /// # Examples /// /// ```js /// const request = new Request({ - /// uri: "/index.php" + /// url: "https://example.com/index.php" /// }); /// - /// request.uri = "/new-uri"; - /// console.log(request.uri); // /new-uri + /// request.url = "https://example.com/new-url"; + /// console.log(request.url); // https://example.com/new-url /// ``` - #[napi(setter, enumerable = true, js_name = "uri")] - pub fn set_uri(&mut self, uri: String) -> Result<()> { - *self.0.uri_mut() = uri + #[napi(setter, enumerable = true, js_name = "url")] + pub fn set_url(&mut self, url: String) -> Result<()> { + *self.0.uri_mut() = url .parse() - .map_err(|_| Error::new(Status::InvalidArg, "Invalid URI"))?; + .map_err(|_| Error::new(Status::InvalidArg, "Invalid URL"))?; Ok(()) } + /// Get the path portion of the URL for the request. + /// + /// # Examples + /// + /// ```js + /// const request = new Request({ + /// url: "https://example.com/api/users?id=123" + /// }); + /// + /// console.log(request.path); // /api/users + /// ``` + #[napi(getter, enumerable = true)] + pub fn path(&self) -> String { + self.0.uri().path().to_string() + } + /// Get the headers for the request. /// /// # Examples /// /// ```js /// const request = new Request({ - /// uri: "/index.php", + /// url: "/index.php", /// headers: { /// 'Content-Type': ['application/json'] /// } @@ -749,7 +796,7 @@ impl Request { /// /// ```js /// const request = new Request({ - /// uri: "/index.php" + /// url: "/index.php" /// }); /// /// request.headers = new Headers({ @@ -771,7 +818,7 @@ impl Request { /// /// ```js /// const request = new Request({ - /// uri: "/index.php", + /// url: "/index.php", /// docroot: "/var/www/html" /// }); /// @@ -788,7 +835,7 @@ impl Request { /// /// ```js /// const request = new Request({ - /// uri: "/index.php" + /// url: "/index.php" /// }); /// /// request.docroot = "/var/www/html"; @@ -805,7 +852,7 @@ impl Request { /// /// ```js /// const request = new Request({ - /// uri: "/v2/api/thing", + /// url: "/v2/api/thing", /// body: Buffer.from(JSON.stringify({ /// message: 'Hello, world!' /// })) @@ -824,7 +871,7 @@ impl Request { /// /// ```js /// const request = new Request({ - /// uri: "/v2/api/thing" + /// url: "/v2/api/thing" /// }); /// /// request.body = Buffer.from(JSON.stringify({ @@ -845,7 +892,7 @@ impl Request { /// ```js /// const request = new Request({ /// method: "GET", - /// uri: "/index.php", + /// url: "https://example.com/index.php", /// headers: { /// 'Content-Type': ['application/json'] /// }, @@ -860,7 +907,7 @@ impl Request { pub fn to_json(&self, env: &Env) -> Result { let mut obj = Object::new(env)?; obj.set("method", self.method())?; - obj.set("uri", self.uri())?; + obj.set("url", self.url())?; obj.set("headers", self.headers().to_json(env)?)?; obj.set("body", self.body())?; Ok(obj) @@ -916,6 +963,8 @@ pub struct ResponseOptions { pub body: Option, /// The log output for the request. pub log: Option, + /// The exception output for the request. + pub exception: Option, } /// Wraps an http::Response instance to expose it to JavaScript. @@ -979,6 +1028,10 @@ impl Response { builder = builder.log(BytesMut::from(log.deref())); } + if let Some(exception) = options.exception { + builder = builder.exception(exception); + } + let body = options .body .map(|body| BytesMut::from(body.deref())) @@ -1112,6 +1165,41 @@ impl Response { *self.0.body_mut() = BytesMut::from(body.deref()); } + /// Get the log of the response as a Buffer. + /// + /// # Examples + /// + /// ```js + /// const response = new Response({ + /// log: Buffer.from('Log message') + /// }); + /// + /// console.log(response.log.toString()); // Log message + /// ``` + #[napi(getter, enumerable = true)] + pub fn log(&self) -> Buffer { + self.0 + .log() + .map(|log| Buffer::from(log.as_bytes().to_vec())) + .unwrap_or_else(|| Buffer::from(vec![])) + } + + /// Get the exception of the response. + /// + /// # Examples + /// + /// ```js + /// const response = new Response({ + /// exception: 'Error message' + /// }); + /// + /// console.log(response.exception); // Error message + /// ``` + #[napi(getter, enumerable = true)] + pub fn exception(&self) -> Option { + self.0.exception().map(|e| e.0.clone()) + } + /// Convert the response to a JSON object representation. /// /// # Examples @@ -1135,6 +1223,19 @@ impl Response { obj.set("status", self.status())?; obj.set("headers", self.headers().to_json(env)?)?; obj.set("body", self.body())?; + + // Only include log if it has content + if let Some(log) = self.0.log() { + if !log.is_empty() { + obj.set("log", Buffer::from(log.as_bytes().to_vec()))?; + } + } + + // Include exception if present + if let Some(exception) = self.0.exception() { + obj.set("exception", exception.0.clone())?; + } + Ok(obj) } } diff --git a/src/types.rs b/src/types.rs index 6f72bcc..7278e90 100644 --- a/src/types.rs +++ b/src/types.rs @@ -135,7 +135,7 @@ mod tests { assert_eq!( response.log().unwrap().as_bytes(), - b"Initial log - more info" + b"Initial log - more info\n" ); assert_eq!( response.exception().unwrap().message(), diff --git a/test/headers.test.mjs b/test/headers.test.mjs index 3534588..eaa675d 100644 --- a/test/headers.test.mjs +++ b/test/headers.test.mjs @@ -70,7 +70,7 @@ test('Headers', async t => { baz: ['buz', 'bux'] }) strictEqual(headers.getLine('foo'), 'bar', 'should return the correct line for a single-value header') - strictEqual(headers.getLine('baz'), 'buz, bux', 'should return the correct line for a multi-value header') + strictEqual(headers.getLine('baz'), 'buz,bux', 'should return the correct line for a multi-value header') strictEqual(headers.getLine('not-exists'), null, 'should return null for non-existing header') }) diff --git a/test/request.test.mjs b/test/request.test.mjs index 3e75df0..4c8bf10 100644 --- a/test/request.test.mjs +++ b/test/request.test.mjs @@ -12,12 +12,12 @@ test('Request', async t => { }) throws(() => new Request({}), { - message: 'Missing field `uri`', + message: 'Missing field `url`', }) doesNotThrow(() => new Request({ method: 'GET', - uri: '/test.php', + url: 'https://example.com/test.php', headers: { 'Content-Type': 'application/json' }, body: Buffer.from('Hello, World!') }), 'should construct with an object argument') @@ -26,7 +26,7 @@ test('Request', async t => { await t.test('method', () => { const request = new Request({ method: 'POST', - uri: '/test' + url: 'https://example.com/test' }) strictEqual(request.method, 'POST', 'should set the method correctly') @@ -34,21 +34,64 @@ test('Request', async t => { strictEqual(request.method, 'PUT', 'should allow method to be changed') }) - await t.test('uri', () => { + await t.test('url', () => { const request = new Request({ method: 'GET', - uri: '/test' + url: 'https://example.com/test' }) - strictEqual(request.uri, '/test', 'should set the URI correctly') - request.uri = '/new-test' - strictEqual(request.uri, '/new-test', 'should allow URI to be changed') + strictEqual(request.url, 'https://example.com/test', 'should set the URL correctly') + request.url = 'https://example.com/new-test' + strictEqual(request.url, 'https://example.com/new-test', 'should allow URL to be changed') + }) + + await t.test('path', () => { + const request = new Request({ + method: 'GET', + url: 'https://example.com/api/users?id=123' + }) + + strictEqual(request.path, '/api/users', 'should return just the path portion') + + // Test with a simple path-only URL + const simpleRequest = new Request({ + method: 'GET', + url: '/simple-path' + }) + strictEqual(simpleRequest.path, '/simple-path', 'should handle path-only URLs') + }) + + await t.test('url reconstruction from Host header', () => { + // Test that path-only URLs are reconstructed using Host header + const request = new Request({ + method: 'GET', + url: '/api/data?param=value', + headers: { + 'Host': 'api.example.com', + 'Content-Type': 'application/json' + } + }) + + strictEqual(request.url, 'https://api.example.com/api/data?param=value', 'should reconstruct full URL from Host header') + strictEqual(request.path, '/api/data', 'should still return correct path portion') + + // Test that full URLs are not modified even with Host header + const fullUrlRequest = new Request({ + method: 'GET', + url: 'https://original.com/test', + headers: { + 'Host': 'different.com' + } + }) + + strictEqual(fullUrlRequest.url, 'https://original.com/test', 'should not modify full URLs based on Host header') + strictEqual(fullUrlRequest.path, '/test', 'should return correct path for full URL') }) await t.test('headers', () => { const request = new Request({ method: 'GET', - uri: '/test', + url: 'https://example.com/test', headers: { 'Content-Type': 'application/json', 'X-Custom-Header': 'CustomValue' @@ -71,7 +114,7 @@ test('Request', async t => { await t.test('docroot', () => { const docroot = '/var/www/html' const request = new Request({ - uri: '/test', + url: 'https://example.com/test', docroot }) @@ -84,7 +127,7 @@ test('Request', async t => { const body = Buffer.from('Hello, World!') const request = new Request({ method: 'POST', - uri: '/test', + url: 'https://example.com/test', body }) @@ -98,14 +141,14 @@ test('Request', async t => { await t.test('toJSON', () => { const request = new Request({ method: 'GET', - uri: '/test', + url: 'https://example.com/test', headers: { 'Content-Type': 'application/json' }, body: Buffer.from('Hello, World!') }) deepStrictEqual(request.toJSON(), { method: 'GET', - uri: '/test', + url: 'https://example.com/test', headers: { 'content-type': 'application/json' }, body: Buffer.from('Hello, World!') }, 'should convert to JSON correctly')