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