@takumi-rs/core 2.12.0 → 2.13.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/export.cjs +350 -339
- package/dist/export.d.cts +24 -6
- package/dist/export.d.mts +24 -6
- package/dist/export.mjs +350 -339
- package/index.d.ts +24 -6
- package/package.json +13 -13
package/dist/export.cjs
CHANGED
|
@@ -50,94 +50,97 @@ function requireNative() {
|
|
|
50
50
|
} catch (err) {
|
|
51
51
|
loadErrors.push(err);
|
|
52
52
|
}
|
|
53
|
-
else if (process.platform === "android")
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
53
|
+
else if (process.platform === "android") {
|
|
54
|
+
if (process.arch === "arm64") {
|
|
55
|
+
try {
|
|
56
|
+
return require$1(/* turbopackOptional: true */ "../core.android-arm64.node");
|
|
57
|
+
} catch (e) {
|
|
58
|
+
loadErrors.push(e);
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-android-arm64/core.android-arm64.node");
|
|
62
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-android-arm64/package.json").version;
|
|
63
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
64
|
+
return binding;
|
|
65
|
+
} catch (e) {
|
|
66
|
+
loadErrors.push(e);
|
|
67
|
+
}
|
|
68
|
+
} else if (process.arch === "arm") {
|
|
69
|
+
try {
|
|
70
|
+
return require$1(/* turbopackOptional: true */ "../core.android-arm-eabi.node");
|
|
71
|
+
} catch (e) {
|
|
72
|
+
loadErrors.push(e);
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-android-arm-eabi/core.android-arm-eabi.node");
|
|
76
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-android-arm-eabi/package.json").version;
|
|
77
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
78
|
+
return binding;
|
|
79
|
+
} catch (e) {
|
|
80
|
+
loadErrors.push(e);
|
|
81
|
+
}
|
|
82
|
+
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Android ${process.arch}`));
|
|
83
|
+
} else if (process.platform === "win32") {
|
|
84
|
+
if (process.arch === "x64") {
|
|
85
|
+
if (process.config && process.config.variables && process.config.variables.shlib_suffix === "dll.a" || process.config && process.config.variables && process.config.variables.node_target_type === "shared_library") {
|
|
86
|
+
try {
|
|
87
|
+
return require$1(/* turbopackOptional: true */ "../core.win32-x64-gnu.node");
|
|
88
|
+
} catch (e) {
|
|
89
|
+
loadErrors.push(e);
|
|
90
|
+
}
|
|
91
|
+
try {
|
|
92
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-x64-gnu/core.win32-x64-gnu.node");
|
|
93
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-x64-gnu/package.json").version;
|
|
94
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
95
|
+
return binding;
|
|
96
|
+
} catch (e) {
|
|
97
|
+
loadErrors.push(e);
|
|
98
|
+
}
|
|
99
|
+
} else {
|
|
100
|
+
try {
|
|
101
|
+
return require$1(/* turbopackOptional: true */ "../core.win32-x64-msvc.node");
|
|
102
|
+
} catch (e) {
|
|
103
|
+
loadErrors.push(e);
|
|
104
|
+
}
|
|
105
|
+
try {
|
|
106
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-x64-msvc/core.win32-x64-msvc.node");
|
|
107
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-x64-msvc/package.json").version;
|
|
108
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
109
|
+
return binding;
|
|
110
|
+
} catch (e) {
|
|
111
|
+
loadErrors.push(e);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
} else if (process.arch === "ia32") {
|
|
115
|
+
try {
|
|
116
|
+
return require$1(/* turbopackOptional: true */ "../core.win32-ia32-msvc.node");
|
|
117
|
+
} catch (e) {
|
|
118
|
+
loadErrors.push(e);
|
|
119
|
+
}
|
|
120
|
+
try {
|
|
121
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-ia32-msvc/core.win32-ia32-msvc.node");
|
|
122
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-ia32-msvc/package.json").version;
|
|
123
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
124
|
+
return binding;
|
|
125
|
+
} catch (e) {
|
|
126
|
+
loadErrors.push(e);
|
|
127
|
+
}
|
|
128
|
+
} else if (process.arch === "arm64") {
|
|
129
|
+
try {
|
|
130
|
+
return require$1(/* turbopackOptional: true */ "../core.win32-arm64-msvc.node");
|
|
131
|
+
} catch (e) {
|
|
132
|
+
loadErrors.push(e);
|
|
133
|
+
}
|
|
134
|
+
try {
|
|
135
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-arm64-msvc/core.win32-arm64-msvc.node");
|
|
136
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-arm64-msvc/package.json").version;
|
|
137
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
138
|
+
return binding;
|
|
139
|
+
} catch (e) {
|
|
140
|
+
loadErrors.push(e);
|
|
141
|
+
}
|
|
142
|
+
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Windows: ${process.arch}`));
|
|
143
|
+
} else if (process.platform === "darwin") {
|
|
141
144
|
try {
|
|
142
145
|
return require$1(/* turbopackOptional: true */ "../core.darwin-universal.node");
|
|
143
146
|
} catch (e) {
|
|
@@ -146,7 +149,7 @@ function requireNative() {
|
|
|
146
149
|
try {
|
|
147
150
|
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-darwin-universal/core.darwin-universal.node");
|
|
148
151
|
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-darwin-universal/package.json").version;
|
|
149
|
-
if (bindingPackageVersion !== "2.
|
|
152
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
150
153
|
return binding;
|
|
151
154
|
} catch (e) {
|
|
152
155
|
loadErrors.push(e);
|
|
@@ -160,7 +163,7 @@ function requireNative() {
|
|
|
160
163
|
try {
|
|
161
164
|
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-darwin-x64/core.darwin-x64.node");
|
|
162
165
|
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-darwin-x64/package.json").version;
|
|
163
|
-
if (bindingPackageVersion !== "2.
|
|
166
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
164
167
|
return binding;
|
|
165
168
|
} catch (e) {
|
|
166
169
|
loadErrors.push(e);
|
|
@@ -174,259 +177,267 @@ function requireNative() {
|
|
|
174
177
|
try {
|
|
175
178
|
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-darwin-arm64/core.darwin-arm64.node");
|
|
176
179
|
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-darwin-arm64/package.json").version;
|
|
177
|
-
if (bindingPackageVersion !== "2.
|
|
180
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
178
181
|
return binding;
|
|
179
182
|
} catch (e) {
|
|
180
183
|
loadErrors.push(e);
|
|
181
184
|
}
|
|
182
185
|
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on macOS: ${process.arch}`));
|
|
183
|
-
} else if (process.platform === "freebsd")
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
186
|
+
} else if (process.platform === "freebsd") {
|
|
187
|
+
if (process.arch === "x64") {
|
|
188
|
+
try {
|
|
189
|
+
return require$1(/* turbopackOptional: true */ "../core.freebsd-x64.node");
|
|
190
|
+
} catch (e) {
|
|
191
|
+
loadErrors.push(e);
|
|
192
|
+
}
|
|
193
|
+
try {
|
|
194
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-freebsd-x64/core.freebsd-x64.node");
|
|
195
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-freebsd-x64/package.json").version;
|
|
196
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
197
|
+
return binding;
|
|
198
|
+
} catch (e) {
|
|
199
|
+
loadErrors.push(e);
|
|
200
|
+
}
|
|
201
|
+
} else if (process.arch === "arm64") {
|
|
202
|
+
try {
|
|
203
|
+
return require$1(/* turbopackOptional: true */ "../core.freebsd-arm64.node");
|
|
204
|
+
} catch (e) {
|
|
205
|
+
loadErrors.push(e);
|
|
206
|
+
}
|
|
207
|
+
try {
|
|
208
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-freebsd-arm64/core.freebsd-arm64.node");
|
|
209
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-freebsd-arm64/package.json").version;
|
|
210
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
211
|
+
return binding;
|
|
212
|
+
} catch (e) {
|
|
213
|
+
loadErrors.push(e);
|
|
214
|
+
}
|
|
215
|
+
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
|
|
216
|
+
} else if (process.platform === "linux") {
|
|
217
|
+
if (process.arch === "x64") {
|
|
218
|
+
if (isMusl()) {
|
|
219
|
+
try {
|
|
220
|
+
return require$1(/* turbopackOptional: true */ "../core.linux-x64-musl.node");
|
|
221
|
+
} catch (e) {
|
|
222
|
+
loadErrors.push(e);
|
|
223
|
+
}
|
|
224
|
+
try {
|
|
225
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-x64-musl/core.linux-x64-musl.node");
|
|
226
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-x64-musl/package.json").version;
|
|
227
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
228
|
+
return binding;
|
|
229
|
+
} catch (e) {
|
|
230
|
+
loadErrors.push(e);
|
|
231
|
+
}
|
|
232
|
+
} else {
|
|
233
|
+
try {
|
|
234
|
+
return require$1(/* turbopackOptional: true */ "../core.linux-x64-gnu.node");
|
|
235
|
+
} catch (e) {
|
|
236
|
+
loadErrors.push(e);
|
|
237
|
+
}
|
|
238
|
+
try {
|
|
239
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-x64-gnu/core.linux-x64-gnu.node");
|
|
240
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-x64-gnu/package.json").version;
|
|
241
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
242
|
+
return binding;
|
|
243
|
+
} catch (e) {
|
|
244
|
+
loadErrors.push(e);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
} else if (process.arch === "arm64") {
|
|
248
|
+
if (isMusl()) {
|
|
249
|
+
try {
|
|
250
|
+
return require$1(/* turbopackOptional: true */ "../core.linux-arm64-musl.node");
|
|
251
|
+
} catch (e) {
|
|
252
|
+
loadErrors.push(e);
|
|
253
|
+
}
|
|
254
|
+
try {
|
|
255
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm64-musl/core.linux-arm64-musl.node");
|
|
256
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm64-musl/package.json").version;
|
|
257
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
258
|
+
return binding;
|
|
259
|
+
} catch (e) {
|
|
260
|
+
loadErrors.push(e);
|
|
261
|
+
}
|
|
262
|
+
} else {
|
|
263
|
+
try {
|
|
264
|
+
return require$1(/* turbopackOptional: true */ "../core.linux-arm64-gnu.node");
|
|
265
|
+
} catch (e) {
|
|
266
|
+
loadErrors.push(e);
|
|
267
|
+
}
|
|
268
|
+
try {
|
|
269
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm64-gnu/core.linux-arm64-gnu.node");
|
|
270
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm64-gnu/package.json").version;
|
|
271
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
272
|
+
return binding;
|
|
273
|
+
} catch (e) {
|
|
274
|
+
loadErrors.push(e);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
} else if (process.arch === "arm") {
|
|
278
|
+
if (isMusl()) {
|
|
279
|
+
try {
|
|
280
|
+
return require$1(/* turbopackOptional: true */ "../core.linux-arm-musleabihf.node");
|
|
281
|
+
} catch (e) {
|
|
282
|
+
loadErrors.push(e);
|
|
283
|
+
}
|
|
284
|
+
try {
|
|
285
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm-musleabihf/core.linux-arm-musleabihf.node");
|
|
286
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm-musleabihf/package.json").version;
|
|
287
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
288
|
+
return binding;
|
|
289
|
+
} catch (e) {
|
|
290
|
+
loadErrors.push(e);
|
|
291
|
+
}
|
|
292
|
+
} else {
|
|
293
|
+
try {
|
|
294
|
+
return require$1(/* turbopackOptional: true */ "../core.linux-arm-gnueabihf.node");
|
|
295
|
+
} catch (e) {
|
|
296
|
+
loadErrors.push(e);
|
|
297
|
+
}
|
|
298
|
+
try {
|
|
299
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm-gnueabihf/core.linux-arm-gnueabihf.node");
|
|
300
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm-gnueabihf/package.json").version;
|
|
301
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
302
|
+
return binding;
|
|
303
|
+
} catch (e) {
|
|
304
|
+
loadErrors.push(e);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
} else if (process.arch === "loong64") {
|
|
308
|
+
if (isMusl()) {
|
|
309
|
+
try {
|
|
310
|
+
return require$1(/* turbopackOptional: true */ "../core.linux-loong64-musl.node");
|
|
311
|
+
} catch (e) {
|
|
312
|
+
loadErrors.push(e);
|
|
313
|
+
}
|
|
314
|
+
try {
|
|
315
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-loong64-musl/core.linux-loong64-musl.node");
|
|
316
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-loong64-musl/package.json").version;
|
|
317
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
318
|
+
return binding;
|
|
319
|
+
} catch (e) {
|
|
320
|
+
loadErrors.push(e);
|
|
321
|
+
}
|
|
322
|
+
} else {
|
|
323
|
+
try {
|
|
324
|
+
return require$1(/* turbopackOptional: true */ "../core.linux-loong64-gnu.node");
|
|
325
|
+
} catch (e) {
|
|
326
|
+
loadErrors.push(e);
|
|
327
|
+
}
|
|
328
|
+
try {
|
|
329
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-loong64-gnu/core.linux-loong64-gnu.node");
|
|
330
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-loong64-gnu/package.json").version;
|
|
331
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
332
|
+
return binding;
|
|
333
|
+
} catch (e) {
|
|
334
|
+
loadErrors.push(e);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
} else if (process.arch === "riscv64") {
|
|
338
|
+
if (isMusl()) {
|
|
339
|
+
try {
|
|
340
|
+
return require$1(/* turbopackOptional: true */ "../core.linux-riscv64-musl.node");
|
|
341
|
+
} catch (e) {
|
|
342
|
+
loadErrors.push(e);
|
|
343
|
+
}
|
|
344
|
+
try {
|
|
345
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-riscv64-musl/core.linux-riscv64-musl.node");
|
|
346
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-riscv64-musl/package.json").version;
|
|
347
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
348
|
+
return binding;
|
|
349
|
+
} catch (e) {
|
|
350
|
+
loadErrors.push(e);
|
|
351
|
+
}
|
|
352
|
+
} else {
|
|
353
|
+
try {
|
|
354
|
+
return require$1(/* turbopackOptional: true */ "../core.linux-riscv64-gnu.node");
|
|
355
|
+
} catch (e) {
|
|
356
|
+
loadErrors.push(e);
|
|
357
|
+
}
|
|
358
|
+
try {
|
|
359
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-riscv64-gnu/core.linux-riscv64-gnu.node");
|
|
360
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-riscv64-gnu/package.json").version;
|
|
361
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
362
|
+
return binding;
|
|
363
|
+
} catch (e) {
|
|
364
|
+
loadErrors.push(e);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
} else if (process.arch === "ppc64") {
|
|
368
|
+
try {
|
|
369
|
+
return require$1(/* turbopackOptional: true */ "../core.linux-ppc64-gnu.node");
|
|
370
|
+
} catch (e) {
|
|
371
|
+
loadErrors.push(e);
|
|
372
|
+
}
|
|
373
|
+
try {
|
|
374
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-ppc64-gnu/core.linux-ppc64-gnu.node");
|
|
375
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-ppc64-gnu/package.json").version;
|
|
376
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
377
|
+
return binding;
|
|
378
|
+
} catch (e) {
|
|
379
|
+
loadErrors.push(e);
|
|
380
|
+
}
|
|
381
|
+
} else if (process.arch === "s390x") {
|
|
382
|
+
try {
|
|
383
|
+
return require$1(/* turbopackOptional: true */ "../core.linux-s390x-gnu.node");
|
|
384
|
+
} catch (e) {
|
|
385
|
+
loadErrors.push(e);
|
|
386
|
+
}
|
|
387
|
+
try {
|
|
388
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-s390x-gnu/core.linux-s390x-gnu.node");
|
|
389
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-s390x-gnu/package.json").version;
|
|
390
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
391
|
+
return binding;
|
|
392
|
+
} catch (e) {
|
|
393
|
+
loadErrors.push(e);
|
|
394
|
+
}
|
|
395
|
+
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Linux: ${process.arch}`));
|
|
396
|
+
} else if (process.platform === "openharmony") {
|
|
397
|
+
if (process.arch === "arm64") {
|
|
398
|
+
try {
|
|
399
|
+
return require$1(/* turbopackOptional: true */ "../core.openharmony-arm64.node");
|
|
400
|
+
} catch (e) {
|
|
401
|
+
loadErrors.push(e);
|
|
402
|
+
}
|
|
403
|
+
try {
|
|
404
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-arm64/core.openharmony-arm64.node");
|
|
405
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-arm64/package.json").version;
|
|
406
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
407
|
+
return binding;
|
|
408
|
+
} catch (e) {
|
|
409
|
+
loadErrors.push(e);
|
|
410
|
+
}
|
|
411
|
+
} else if (process.arch === "x64") {
|
|
412
|
+
try {
|
|
413
|
+
return require$1(/* turbopackOptional: true */ "../core.openharmony-x64.node");
|
|
414
|
+
} catch (e) {
|
|
415
|
+
loadErrors.push(e);
|
|
416
|
+
}
|
|
417
|
+
try {
|
|
418
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-x64/core.openharmony-x64.node");
|
|
419
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-x64/package.json").version;
|
|
420
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
421
|
+
return binding;
|
|
422
|
+
} catch (e) {
|
|
423
|
+
loadErrors.push(e);
|
|
424
|
+
}
|
|
425
|
+
} else if (process.arch === "arm") {
|
|
426
|
+
try {
|
|
427
|
+
return require$1(/* turbopackOptional: true */ "../core.openharmony-arm.node");
|
|
428
|
+
} catch (e) {
|
|
429
|
+
loadErrors.push(e);
|
|
430
|
+
}
|
|
431
|
+
try {
|
|
432
|
+
const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-arm/core.openharmony-arm.node");
|
|
433
|
+
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-arm/package.json").version;
|
|
434
|
+
if (bindingPackageVersion !== "2.13.1" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
435
|
+
return binding;
|
|
436
|
+
} catch (e) {
|
|
437
|
+
loadErrors.push(e);
|
|
438
|
+
}
|
|
439
|
+
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));
|
|
440
|
+
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
|
|
430
441
|
}
|
|
431
442
|
function createLoadErrorChain(errors) {
|
|
432
443
|
return errors.reduce((previous, current) => {
|
|
@@ -510,7 +521,7 @@ if (!nativeBinding || forceWasi) {
|
|
|
510
521
|
if (!candidateFailed) {
|
|
511
522
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
512
523
|
const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-wasm32-wasi/package.json").version;
|
|
513
|
-
if (bindingPackageVersion !== "2.
|
|
524
|
+
if (bindingPackageVersion !== "2.13.1") throw new Error(`WASI binding package version mismatch, expected 2.13.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
514
525
|
}
|
|
515
526
|
wasiBinding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-wasm32-wasi/core.wasm32-wasi.node");
|
|
516
527
|
nativeBinding = wasiBinding;
|