@takumi-rs/core 0.35.0 → 0.35.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/index.js +68 -50
- package/package.json +11 -9
package/index.js
CHANGED
|
@@ -81,8 +81,8 @@ function requireNative() {
|
|
|
81
81
|
try {
|
|
82
82
|
const binding = require('@takumi-rs/core-android-arm64')
|
|
83
83
|
const bindingPackageVersion = require('@takumi-rs/core-android-arm64/package.json').version
|
|
84
|
-
if (bindingPackageVersion !== '0.35.
|
|
85
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
84
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
85
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
86
86
|
}
|
|
87
87
|
return binding
|
|
88
88
|
} catch (e) {
|
|
@@ -97,8 +97,8 @@ function requireNative() {
|
|
|
97
97
|
try {
|
|
98
98
|
const binding = require('@takumi-rs/core-android-arm-eabi')
|
|
99
99
|
const bindingPackageVersion = require('@takumi-rs/core-android-arm-eabi/package.json').version
|
|
100
|
-
if (bindingPackageVersion !== '0.35.
|
|
101
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
100
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
101
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
102
102
|
}
|
|
103
103
|
return binding
|
|
104
104
|
} catch (e) {
|
|
@@ -109,7 +109,24 @@ function requireNative() {
|
|
|
109
109
|
}
|
|
110
110
|
} else if (process.platform === 'win32') {
|
|
111
111
|
if (process.arch === 'x64') {
|
|
112
|
+
if (process.report?.getReport?.()?.header?.osName?.startsWith?.('MINGW')) {
|
|
113
|
+
try {
|
|
114
|
+
return require('./core.win32-x64-gnu.node')
|
|
115
|
+
} catch (e) {
|
|
116
|
+
loadErrors.push(e)
|
|
117
|
+
}
|
|
112
118
|
try {
|
|
119
|
+
const binding = require('@takumi-rs/core-win32-x64-gnu')
|
|
120
|
+
const bindingPackageVersion = require('@takumi-rs/core-win32-x64-gnu/package.json').version
|
|
121
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
122
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
123
|
+
}
|
|
124
|
+
return binding
|
|
125
|
+
} catch (e) {
|
|
126
|
+
loadErrors.push(e)
|
|
127
|
+
}
|
|
128
|
+
} else {
|
|
129
|
+
try {
|
|
113
130
|
return require('./core.win32-x64-msvc.node')
|
|
114
131
|
} catch (e) {
|
|
115
132
|
loadErrors.push(e)
|
|
@@ -117,13 +134,14 @@ function requireNative() {
|
|
|
117
134
|
try {
|
|
118
135
|
const binding = require('@takumi-rs/core-win32-x64-msvc')
|
|
119
136
|
const bindingPackageVersion = require('@takumi-rs/core-win32-x64-msvc/package.json').version
|
|
120
|
-
if (bindingPackageVersion !== '0.35.
|
|
121
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
137
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
138
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
122
139
|
}
|
|
123
140
|
return binding
|
|
124
141
|
} catch (e) {
|
|
125
142
|
loadErrors.push(e)
|
|
126
143
|
}
|
|
144
|
+
}
|
|
127
145
|
} else if (process.arch === 'ia32') {
|
|
128
146
|
try {
|
|
129
147
|
return require('./core.win32-ia32-msvc.node')
|
|
@@ -133,8 +151,8 @@ function requireNative() {
|
|
|
133
151
|
try {
|
|
134
152
|
const binding = require('@takumi-rs/core-win32-ia32-msvc')
|
|
135
153
|
const bindingPackageVersion = require('@takumi-rs/core-win32-ia32-msvc/package.json').version
|
|
136
|
-
if (bindingPackageVersion !== '0.35.
|
|
137
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
154
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
155
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
138
156
|
}
|
|
139
157
|
return binding
|
|
140
158
|
} catch (e) {
|
|
@@ -149,8 +167,8 @@ function requireNative() {
|
|
|
149
167
|
try {
|
|
150
168
|
const binding = require('@takumi-rs/core-win32-arm64-msvc')
|
|
151
169
|
const bindingPackageVersion = require('@takumi-rs/core-win32-arm64-msvc/package.json').version
|
|
152
|
-
if (bindingPackageVersion !== '0.35.
|
|
153
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
170
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
171
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
154
172
|
}
|
|
155
173
|
return binding
|
|
156
174
|
} catch (e) {
|
|
@@ -168,8 +186,8 @@ function requireNative() {
|
|
|
168
186
|
try {
|
|
169
187
|
const binding = require('@takumi-rs/core-darwin-universal')
|
|
170
188
|
const bindingPackageVersion = require('@takumi-rs/core-darwin-universal/package.json').version
|
|
171
|
-
if (bindingPackageVersion !== '0.35.
|
|
172
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
189
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
190
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
173
191
|
}
|
|
174
192
|
return binding
|
|
175
193
|
} catch (e) {
|
|
@@ -184,8 +202,8 @@ function requireNative() {
|
|
|
184
202
|
try {
|
|
185
203
|
const binding = require('@takumi-rs/core-darwin-x64')
|
|
186
204
|
const bindingPackageVersion = require('@takumi-rs/core-darwin-x64/package.json').version
|
|
187
|
-
if (bindingPackageVersion !== '0.35.
|
|
188
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
205
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
206
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
189
207
|
}
|
|
190
208
|
return binding
|
|
191
209
|
} catch (e) {
|
|
@@ -200,8 +218,8 @@ function requireNative() {
|
|
|
200
218
|
try {
|
|
201
219
|
const binding = require('@takumi-rs/core-darwin-arm64')
|
|
202
220
|
const bindingPackageVersion = require('@takumi-rs/core-darwin-arm64/package.json').version
|
|
203
|
-
if (bindingPackageVersion !== '0.35.
|
|
204
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
221
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
222
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
205
223
|
}
|
|
206
224
|
return binding
|
|
207
225
|
} catch (e) {
|
|
@@ -220,8 +238,8 @@ function requireNative() {
|
|
|
220
238
|
try {
|
|
221
239
|
const binding = require('@takumi-rs/core-freebsd-x64')
|
|
222
240
|
const bindingPackageVersion = require('@takumi-rs/core-freebsd-x64/package.json').version
|
|
223
|
-
if (bindingPackageVersion !== '0.35.
|
|
224
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
241
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
242
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
225
243
|
}
|
|
226
244
|
return binding
|
|
227
245
|
} catch (e) {
|
|
@@ -236,8 +254,8 @@ function requireNative() {
|
|
|
236
254
|
try {
|
|
237
255
|
const binding = require('@takumi-rs/core-freebsd-arm64')
|
|
238
256
|
const bindingPackageVersion = require('@takumi-rs/core-freebsd-arm64/package.json').version
|
|
239
|
-
if (bindingPackageVersion !== '0.35.
|
|
240
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
257
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
258
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
241
259
|
}
|
|
242
260
|
return binding
|
|
243
261
|
} catch (e) {
|
|
@@ -257,8 +275,8 @@ function requireNative() {
|
|
|
257
275
|
try {
|
|
258
276
|
const binding = require('@takumi-rs/core-linux-x64-musl')
|
|
259
277
|
const bindingPackageVersion = require('@takumi-rs/core-linux-x64-musl/package.json').version
|
|
260
|
-
if (bindingPackageVersion !== '0.35.
|
|
261
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
278
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
279
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
262
280
|
}
|
|
263
281
|
return binding
|
|
264
282
|
} catch (e) {
|
|
@@ -273,8 +291,8 @@ function requireNative() {
|
|
|
273
291
|
try {
|
|
274
292
|
const binding = require('@takumi-rs/core-linux-x64-gnu')
|
|
275
293
|
const bindingPackageVersion = require('@takumi-rs/core-linux-x64-gnu/package.json').version
|
|
276
|
-
if (bindingPackageVersion !== '0.35.
|
|
277
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
294
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
295
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
278
296
|
}
|
|
279
297
|
return binding
|
|
280
298
|
} catch (e) {
|
|
@@ -291,8 +309,8 @@ function requireNative() {
|
|
|
291
309
|
try {
|
|
292
310
|
const binding = require('@takumi-rs/core-linux-arm64-musl')
|
|
293
311
|
const bindingPackageVersion = require('@takumi-rs/core-linux-arm64-musl/package.json').version
|
|
294
|
-
if (bindingPackageVersion !== '0.35.
|
|
295
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
312
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
313
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
296
314
|
}
|
|
297
315
|
return binding
|
|
298
316
|
} catch (e) {
|
|
@@ -307,8 +325,8 @@ function requireNative() {
|
|
|
307
325
|
try {
|
|
308
326
|
const binding = require('@takumi-rs/core-linux-arm64-gnu')
|
|
309
327
|
const bindingPackageVersion = require('@takumi-rs/core-linux-arm64-gnu/package.json').version
|
|
310
|
-
if (bindingPackageVersion !== '0.35.
|
|
311
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
328
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
329
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
312
330
|
}
|
|
313
331
|
return binding
|
|
314
332
|
} catch (e) {
|
|
@@ -325,8 +343,8 @@ function requireNative() {
|
|
|
325
343
|
try {
|
|
326
344
|
const binding = require('@takumi-rs/core-linux-arm-musleabihf')
|
|
327
345
|
const bindingPackageVersion = require('@takumi-rs/core-linux-arm-musleabihf/package.json').version
|
|
328
|
-
if (bindingPackageVersion !== '0.35.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
346
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
347
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
330
348
|
}
|
|
331
349
|
return binding
|
|
332
350
|
} catch (e) {
|
|
@@ -341,8 +359,8 @@ function requireNative() {
|
|
|
341
359
|
try {
|
|
342
360
|
const binding = require('@takumi-rs/core-linux-arm-gnueabihf')
|
|
343
361
|
const bindingPackageVersion = require('@takumi-rs/core-linux-arm-gnueabihf/package.json').version
|
|
344
|
-
if (bindingPackageVersion !== '0.35.
|
|
345
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
362
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
363
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
346
364
|
}
|
|
347
365
|
return binding
|
|
348
366
|
} catch (e) {
|
|
@@ -359,8 +377,8 @@ function requireNative() {
|
|
|
359
377
|
try {
|
|
360
378
|
const binding = require('@takumi-rs/core-linux-loong64-musl')
|
|
361
379
|
const bindingPackageVersion = require('@takumi-rs/core-linux-loong64-musl/package.json').version
|
|
362
|
-
if (bindingPackageVersion !== '0.35.
|
|
363
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
380
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
381
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
364
382
|
}
|
|
365
383
|
return binding
|
|
366
384
|
} catch (e) {
|
|
@@ -375,8 +393,8 @@ function requireNative() {
|
|
|
375
393
|
try {
|
|
376
394
|
const binding = require('@takumi-rs/core-linux-loong64-gnu')
|
|
377
395
|
const bindingPackageVersion = require('@takumi-rs/core-linux-loong64-gnu/package.json').version
|
|
378
|
-
if (bindingPackageVersion !== '0.35.
|
|
379
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
396
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
397
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
380
398
|
}
|
|
381
399
|
return binding
|
|
382
400
|
} catch (e) {
|
|
@@ -393,8 +411,8 @@ function requireNative() {
|
|
|
393
411
|
try {
|
|
394
412
|
const binding = require('@takumi-rs/core-linux-riscv64-musl')
|
|
395
413
|
const bindingPackageVersion = require('@takumi-rs/core-linux-riscv64-musl/package.json').version
|
|
396
|
-
if (bindingPackageVersion !== '0.35.
|
|
397
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
414
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
415
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
398
416
|
}
|
|
399
417
|
return binding
|
|
400
418
|
} catch (e) {
|
|
@@ -409,8 +427,8 @@ function requireNative() {
|
|
|
409
427
|
try {
|
|
410
428
|
const binding = require('@takumi-rs/core-linux-riscv64-gnu')
|
|
411
429
|
const bindingPackageVersion = require('@takumi-rs/core-linux-riscv64-gnu/package.json').version
|
|
412
|
-
if (bindingPackageVersion !== '0.35.
|
|
413
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
430
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
431
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
414
432
|
}
|
|
415
433
|
return binding
|
|
416
434
|
} catch (e) {
|
|
@@ -426,8 +444,8 @@ function requireNative() {
|
|
|
426
444
|
try {
|
|
427
445
|
const binding = require('@takumi-rs/core-linux-ppc64-gnu')
|
|
428
446
|
const bindingPackageVersion = require('@takumi-rs/core-linux-ppc64-gnu/package.json').version
|
|
429
|
-
if (bindingPackageVersion !== '0.35.
|
|
430
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
447
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
448
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
431
449
|
}
|
|
432
450
|
return binding
|
|
433
451
|
} catch (e) {
|
|
@@ -442,8 +460,8 @@ function requireNative() {
|
|
|
442
460
|
try {
|
|
443
461
|
const binding = require('@takumi-rs/core-linux-s390x-gnu')
|
|
444
462
|
const bindingPackageVersion = require('@takumi-rs/core-linux-s390x-gnu/package.json').version
|
|
445
|
-
if (bindingPackageVersion !== '0.35.
|
|
446
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
463
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
464
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
447
465
|
}
|
|
448
466
|
return binding
|
|
449
467
|
} catch (e) {
|
|
@@ -462,8 +480,8 @@ function requireNative() {
|
|
|
462
480
|
try {
|
|
463
481
|
const binding = require('@takumi-rs/core-openharmony-arm64')
|
|
464
482
|
const bindingPackageVersion = require('@takumi-rs/core-openharmony-arm64/package.json').version
|
|
465
|
-
if (bindingPackageVersion !== '0.35.
|
|
466
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
483
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
484
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
467
485
|
}
|
|
468
486
|
return binding
|
|
469
487
|
} catch (e) {
|
|
@@ -478,8 +496,8 @@ function requireNative() {
|
|
|
478
496
|
try {
|
|
479
497
|
const binding = require('@takumi-rs/core-openharmony-x64')
|
|
480
498
|
const bindingPackageVersion = require('@takumi-rs/core-openharmony-x64/package.json').version
|
|
481
|
-
if (bindingPackageVersion !== '0.35.
|
|
482
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
499
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
500
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
483
501
|
}
|
|
484
502
|
return binding
|
|
485
503
|
} catch (e) {
|
|
@@ -494,8 +512,8 @@ function requireNative() {
|
|
|
494
512
|
try {
|
|
495
513
|
const binding = require('@takumi-rs/core-openharmony-arm')
|
|
496
514
|
const bindingPackageVersion = require('@takumi-rs/core-openharmony-arm/package.json').version
|
|
497
|
-
if (bindingPackageVersion !== '0.35.
|
|
498
|
-
throw new Error(`Native binding package version mismatch, expected 0.35.
|
|
515
|
+
if (bindingPackageVersion !== '0.35.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
516
|
+
throw new Error(`Native binding package version mismatch, expected 0.35.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
499
517
|
}
|
|
500
518
|
return binding
|
|
501
519
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takumi-rs/core",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.2",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "me@kane.tw",
|
|
6
6
|
"name": "Kane Wang",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"main": "index.js",
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@napi-rs/cli": "3.
|
|
23
|
+
"@napi-rs/cli": "3.3.0",
|
|
24
24
|
"@takumi-rs/helpers": "workspace:*",
|
|
25
25
|
"@takumi-rs/template": "workspace:*",
|
|
26
26
|
"@types/bun": "catalog:",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"napi": {
|
|
37
37
|
"binaryName": "core",
|
|
38
38
|
"targets": [
|
|
39
|
+
"x86_64-apple-darwin",
|
|
39
40
|
"aarch64-apple-darwin",
|
|
40
41
|
"aarch64-unknown-linux-gnu",
|
|
41
42
|
"aarch64-unknown-linux-musl",
|
|
@@ -56,12 +57,13 @@
|
|
|
56
57
|
"type": "module",
|
|
57
58
|
"types": "index.d.ts",
|
|
58
59
|
"optionalDependencies": {
|
|
59
|
-
"@takumi-rs/core-darwin-
|
|
60
|
-
"@takumi-rs/core-
|
|
61
|
-
"@takumi-rs/core-linux-arm64-
|
|
62
|
-
"@takumi-rs/core-
|
|
63
|
-
"@takumi-rs/core-
|
|
64
|
-
"@takumi-rs/core-linux-x64-
|
|
65
|
-
"@takumi-rs/core-
|
|
60
|
+
"@takumi-rs/core-darwin-x64": "0.35.2",
|
|
61
|
+
"@takumi-rs/core-darwin-arm64": "0.35.2",
|
|
62
|
+
"@takumi-rs/core-linux-arm64-gnu": "0.35.2",
|
|
63
|
+
"@takumi-rs/core-linux-arm64-musl": "0.35.2",
|
|
64
|
+
"@takumi-rs/core-win32-arm64-msvc": "0.35.2",
|
|
65
|
+
"@takumi-rs/core-linux-x64-gnu": "0.35.2",
|
|
66
|
+
"@takumi-rs/core-linux-x64-musl": "0.35.2",
|
|
67
|
+
"@takumi-rs/core-win32-x64-msvc": "0.35.2"
|
|
66
68
|
}
|
|
67
69
|
}
|