wreq-js 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wreq-js.d.ts CHANGED
@@ -9,7 +9,7 @@ import { ReadableStream } from "node:stream/web";
9
9
  /**
10
10
  * Browser profile names supported
11
11
  */
12
- type BrowserProfile = 'chrome_100' | 'chrome_101' | 'chrome_104' | 'chrome_105' | 'chrome_106' | 'chrome_107' | 'chrome_108' | 'chrome_109' | 'chrome_110' | 'chrome_114' | 'chrome_116' | 'chrome_117' | 'chrome_118' | 'chrome_119' | 'chrome_120' | 'chrome_123' | 'chrome_124' | 'chrome_126' | 'chrome_127' | 'chrome_128' | 'chrome_129' | 'chrome_130' | 'chrome_131' | 'chrome_132' | 'chrome_133' | 'chrome_134' | 'chrome_135' | 'chrome_136' | 'chrome_137' | 'chrome_138' | 'chrome_139' | 'chrome_140' | 'chrome_141' | 'chrome_142' | 'chrome_143' | 'chrome_144' | 'chrome_145' | 'edge_101' | 'edge_122' | 'edge_127' | 'edge_131' | 'edge_134' | 'edge_135' | 'edge_136' | 'edge_137' | 'edge_138' | 'edge_139' | 'edge_140' | 'edge_141' | 'edge_142' | 'edge_143' | 'edge_144' | 'edge_145' | 'opera_116' | 'opera_117' | 'opera_118' | 'opera_119' | 'firefox_109' | 'firefox_117' | 'firefox_128' | 'firefox_133' | 'firefox_135' | 'firefox_private_135' | 'firefox_android_135' | 'firefox_136' | 'firefox_private_136' | 'firefox_139' | 'firefox_142' | 'firefox_143' | 'firefox_144' | 'firefox_145' | 'firefox_146' | 'firefox_147' | 'safari_ios_17.2' | 'safari_ios_17.4.1' | 'safari_ios_16.5' | 'safari_15.3' | 'safari_15.5' | 'safari_15.6.1' | 'safari_16' | 'safari_16.5' | 'safari_17.0' | 'safari_17.2.1' | 'safari_17.4.1' | 'safari_17.5' | 'safari_17.6' | 'safari_18' | 'safari_ipad_18' | 'safari_18.2' | 'safari_ios_18.1.1' | 'safari_18.3' | 'safari_18.3.1' | 'safari_18.5' | 'safari_26' | 'safari_26.1' | 'safari_26.2' | 'safari_ipad_26' | 'safari_ipad_26.2' | 'safari_ios_26' | 'safari_ios_26.2' | 'okhttp_3.9' | 'okhttp_3.11' | 'okhttp_3.13' | 'okhttp_3.14' | 'okhttp_4.9' | 'okhttp_4.10' | 'okhttp_4.12' | 'okhttp_5';
12
+ type BrowserProfile = 'chrome_100' | 'chrome_101' | 'chrome_104' | 'chrome_105' | 'chrome_106' | 'chrome_107' | 'chrome_108' | 'chrome_109' | 'chrome_110' | 'chrome_114' | 'chrome_116' | 'chrome_117' | 'chrome_118' | 'chrome_119' | 'chrome_120' | 'chrome_123' | 'chrome_124' | 'chrome_126' | 'chrome_127' | 'chrome_128' | 'chrome_129' | 'chrome_130' | 'chrome_131' | 'chrome_132' | 'chrome_133' | 'chrome_134' | 'chrome_135' | 'chrome_136' | 'chrome_137' | 'chrome_138' | 'chrome_139' | 'chrome_140' | 'chrome_141' | 'chrome_142' | 'chrome_143' | 'chrome_144' | 'chrome_145' | 'chrome_146' | 'chrome_147' | 'edge_101' | 'edge_122' | 'edge_127' | 'edge_131' | 'edge_134' | 'edge_135' | 'edge_136' | 'edge_137' | 'edge_138' | 'edge_139' | 'edge_140' | 'edge_141' | 'edge_142' | 'edge_143' | 'edge_144' | 'edge_145' | 'edge_146' | 'edge_147' | 'opera_116' | 'opera_117' | 'opera_118' | 'opera_119' | 'opera_120' | 'opera_121' | 'opera_122' | 'opera_123' | 'opera_124' | 'opera_125' | 'opera_126' | 'opera_127' | 'opera_128' | 'opera_129' | 'opera_130' | 'firefox_109' | 'firefox_117' | 'firefox_128' | 'firefox_133' | 'firefox_135' | 'firefox_private_135' | 'firefox_android_135' | 'firefox_136' | 'firefox_private_136' | 'firefox_139' | 'firefox_142' | 'firefox_143' | 'firefox_144' | 'firefox_145' | 'firefox_146' | 'firefox_147' | 'firefox_148' | 'firefox_149' | 'safari_ios_17.2' | 'safari_ios_17.4.1' | 'safari_ios_16.5' | 'safari_15.3' | 'safari_15.5' | 'safari_15.6.1' | 'safari_16' | 'safari_16.5' | 'safari_17.0' | 'safari_17.2.1' | 'safari_17.4.1' | 'safari_17.5' | 'safari_17.6' | 'safari_18' | 'safari_ipad_18' | 'safari_18.2' | 'safari_ios_18.1.1' | 'safari_18.3' | 'safari_18.3.1' | 'safari_18.5' | 'safari_26' | 'safari_26.1' | 'safari_26.2' | 'safari_ipad_26' | 'safari_ipad_26.2' | 'safari_ios_26' | 'safari_ios_26.2' | 'okhttp_3.9' | 'okhttp_3.11' | 'okhttp_3.13' | 'okhttp_3.14' | 'okhttp_4.9' | 'okhttp_4.10' | 'okhttp_4.12' | 'okhttp_5';
13
13
  /**
14
14
  * Operating systems supported for emulation
15
15
  */
package/dist/wreq-js.js CHANGED
@@ -88,13 +88,24 @@ function loadNativeBinding() {
88
88
  }
89
89
  }
90
90
  }
91
- if (platform === "linux" && arch === "arm64") try {
92
- return nativeRequire("../rust/wreq-js.linux-arm64-gnu.node");
93
- } catch {
91
+ if (platform === "linux" && arch === "arm64") {
92
+ if (libc === "musl") try {
93
+ return nativeRequire("../rust/wreq-js.linux-arm64-musl.node");
94
+ } catch {
95
+ try {
96
+ return nativeRequire("../rust/wreq-js.node");
97
+ } catch {
98
+ throw new Error("Failed to load native module for linux-arm64-musl. Tried: ../rust/wreq-js.linux-arm64-musl.node and ../rust/wreq-js.node. Make sure the package is installed correctly and the native module is built for your platform.");
99
+ }
100
+ }
94
101
  try {
95
- return nativeRequire("../rust/wreq-js.node");
102
+ return nativeRequire("../rust/wreq-js.linux-arm64-gnu.node");
96
103
  } catch {
97
- throw new Error("Failed to load native module for linux-arm64-gnu. Tried: ../rust/wreq-js.linux-arm64-gnu.node and ../rust/wreq-js.node. Make sure the package is installed correctly and the native module is built for your platform.");
104
+ try {
105
+ return nativeRequire("../rust/wreq-js.node");
106
+ } catch {
107
+ throw new Error("Failed to load native module for linux-arm64-gnu. Tried: ../rust/wreq-js.linux-arm64-gnu.node and ../rust/wreq-js.node. Make sure the package is installed correctly and the native module is built for your platform.");
108
+ }
98
109
  }
99
110
  }
100
111
  if (platform === "win32" && arch === "x64") try {
@@ -106,7 +117,7 @@ function loadNativeBinding() {
106
117
  throw new Error("Failed to load native module for win32-x64-msvc. Tried: ../rust/wreq-js.win32-x64-msvc.node and ../rust/wreq-js.node. Make sure the package is installed correctly and the native module is built for your platform.");
107
118
  }
108
119
  }
109
- throw new Error(`Unsupported platform: ${platform}-${arch}${libc ? `-${libc}` : ""}. Supported platforms: darwin-x64, darwin-arm64, linux-x64-gnu, linux-x64-musl, linux-arm64-gnu, win32-x64-msvc`);
120
+ throw new Error(`Unsupported platform: ${platform}-${arch}${libc ? `-${libc}` : ""}. Supported platforms: darwin-x64, darwin-arm64, linux-x64-gnu, linux-x64-musl, linux-arm64-gnu, linux-arm64-musl, win32-x64-msvc`);
110
121
  }
111
122
  nativeBinding = loadNativeBinding();
112
123
  const websocketFinalizer = typeof FinalizationRegistry === "function" ? new FinalizationRegistry((connection) => {