wreq-js 2.2.0 → 2.2.2
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.cjs +76 -25
- package/dist/wreq-js.cjs.map +1 -1
- package/dist/wreq-js.js +76 -22
- package/dist/wreq-js.js.map +1 -1
- package/package.json +5 -3
- package/rust/wreq-js.darwin-arm64.node +0 -0
- package/rust/wreq-js.darwin-x64.node +0 -0
- package/rust/wreq-js.linux-arm64-gnu.node +0 -0
- package/rust/wreq-js.linux-x64-gnu.node +0 -0
- package/rust/wreq-js.linux-x64-musl.node +0 -0
- package/rust/wreq-js.win32-x64-msvc.node +0 -0
package/dist/wreq-js.js
CHANGED
|
@@ -43,33 +43,87 @@ function loadNativeBinding() {
|
|
|
43
43
|
const platform = process.platform;
|
|
44
44
|
const arch = process.arch;
|
|
45
45
|
const libc = detectLibc();
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
`Unsupported platform: ${platform}-${arch}${libc ? `-${libc}` : ""}. Supported platforms: darwin-x64, darwin-arm64, linux-x64-gnu, linux-x64-musl, linux-arm64-gnu, win32-x64-msvc`
|
|
59
|
-
);
|
|
46
|
+
if (platform === "darwin" && arch === "x64") {
|
|
47
|
+
try {
|
|
48
|
+
return require2("../rust/wreq-js.darwin-x64.node");
|
|
49
|
+
} catch {
|
|
50
|
+
try {
|
|
51
|
+
return require2("../rust/wreq-js.node");
|
|
52
|
+
} catch {
|
|
53
|
+
throw new Error(
|
|
54
|
+
"Failed to load native module for darwin-x64. Tried: ../rust/wreq-js.darwin-x64.node and ../rust/wreq-js.node. Make sure the package is installed correctly and the native module is built for your platform."
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
60
58
|
}
|
|
61
|
-
|
|
62
|
-
try {
|
|
63
|
-
return require2(`../rust/${binaryName}`);
|
|
64
|
-
} catch {
|
|
59
|
+
if (platform === "darwin" && arch === "arm64") {
|
|
65
60
|
try {
|
|
66
|
-
return require2("../rust/wreq-js.node");
|
|
61
|
+
return require2("../rust/wreq-js.darwin-arm64.node");
|
|
67
62
|
} catch {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
try {
|
|
64
|
+
return require2("../rust/wreq-js.node");
|
|
65
|
+
} catch {
|
|
66
|
+
throw new Error(
|
|
67
|
+
"Failed to load native module for darwin-arm64. Tried: ../rust/wreq-js.darwin-arm64.node and ../rust/wreq-js.node. Make sure the package is installed correctly and the native module is built for your platform."
|
|
68
|
+
);
|
|
69
|
+
}
|
|
71
70
|
}
|
|
72
71
|
}
|
|
72
|
+
if (platform === "linux" && arch === "x64") {
|
|
73
|
+
if (libc === "musl") {
|
|
74
|
+
try {
|
|
75
|
+
return require2("../rust/wreq-js.linux-x64-musl.node");
|
|
76
|
+
} catch {
|
|
77
|
+
try {
|
|
78
|
+
return require2("../rust/wreq-js.node");
|
|
79
|
+
} catch {
|
|
80
|
+
throw new Error(
|
|
81
|
+
"Failed to load native module for linux-x64-musl. Tried: ../rust/wreq-js.linux-x64-musl.node and ../rust/wreq-js.node. Make sure the package is installed correctly and the native module is built for your platform."
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
try {
|
|
87
|
+
return require2("../rust/wreq-js.linux-x64-gnu.node");
|
|
88
|
+
} catch {
|
|
89
|
+
try {
|
|
90
|
+
return require2("../rust/wreq-js.node");
|
|
91
|
+
} catch {
|
|
92
|
+
throw new Error(
|
|
93
|
+
"Failed to load native module for linux-x64-gnu. Tried: ../rust/wreq-js.linux-x64-gnu.node and ../rust/wreq-js.node. Make sure the package is installed correctly and the native module is built for your platform."
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (platform === "linux" && arch === "arm64") {
|
|
99
|
+
try {
|
|
100
|
+
return require2("../rust/wreq-js.linux-arm64-gnu.node");
|
|
101
|
+
} catch {
|
|
102
|
+
try {
|
|
103
|
+
return require2("../rust/wreq-js.node");
|
|
104
|
+
} catch {
|
|
105
|
+
throw new Error(
|
|
106
|
+
"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."
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (platform === "win32" && arch === "x64") {
|
|
112
|
+
try {
|
|
113
|
+
return require2("../rust/wreq-js.win32-x64-msvc.node");
|
|
114
|
+
} catch {
|
|
115
|
+
try {
|
|
116
|
+
return require2("../rust/wreq-js.node");
|
|
117
|
+
} catch {
|
|
118
|
+
throw new Error(
|
|
119
|
+
"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."
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
throw new Error(
|
|
125
|
+
`Unsupported platform: ${platform}-${arch}${libc ? `-${libc}` : ""}. Supported platforms: darwin-x64, darwin-arm64, linux-x64-gnu, linux-x64-musl, linux-arm64-gnu, win32-x64-msvc`
|
|
126
|
+
);
|
|
73
127
|
}
|
|
74
128
|
nativeBinding = loadNativeBinding();
|
|
75
129
|
var websocketFinalizer = typeof FinalizationRegistry === "function" ? new FinalizationRegistry((connection) => {
|