@nmtjs/proxy 1.0.0-alpha.2 → 1.0.0-beta.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/index.js +54 -58
- package/package.json +16 -20
package/dist/index.js
CHANGED
|
@@ -3,10 +3,6 @@
|
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
/* auto-generated by NAPI-RS */
|
|
5
5
|
|
|
6
|
-
import { createRequire } from 'node:module'
|
|
7
|
-
const require = createRequire(import.meta.url)
|
|
8
|
-
const __dirname = new URL('.', import.meta.url).pathname
|
|
9
|
-
|
|
10
6
|
const { readFileSync } = require('node:fs')
|
|
11
7
|
let nativeBinding = null
|
|
12
8
|
const loadErrors = []
|
|
@@ -81,8 +77,8 @@ function requireNative() {
|
|
|
81
77
|
try {
|
|
82
78
|
const binding = require('@nmtjs/proxy-android-arm64')
|
|
83
79
|
const bindingPackageVersion = require('@nmtjs/proxy-android-arm64/package.json').version
|
|
84
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
85
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
80
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
81
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
86
82
|
}
|
|
87
83
|
return binding
|
|
88
84
|
} catch (e) {
|
|
@@ -97,8 +93,8 @@ function requireNative() {
|
|
|
97
93
|
try {
|
|
98
94
|
const binding = require('@nmtjs/proxy-android-arm-eabi')
|
|
99
95
|
const bindingPackageVersion = require('@nmtjs/proxy-android-arm-eabi/package.json').version
|
|
100
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
101
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
96
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
97
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
102
98
|
}
|
|
103
99
|
return binding
|
|
104
100
|
} catch (e) {
|
|
@@ -118,8 +114,8 @@ function requireNative() {
|
|
|
118
114
|
try {
|
|
119
115
|
const binding = require('@nmtjs/proxy-win32-x64-gnu')
|
|
120
116
|
const bindingPackageVersion = require('@nmtjs/proxy-win32-x64-gnu/package.json').version
|
|
121
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
122
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
117
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
118
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
123
119
|
}
|
|
124
120
|
return binding
|
|
125
121
|
} catch (e) {
|
|
@@ -134,8 +130,8 @@ function requireNative() {
|
|
|
134
130
|
try {
|
|
135
131
|
const binding = require('@nmtjs/proxy-win32-x64-msvc')
|
|
136
132
|
const bindingPackageVersion = require('@nmtjs/proxy-win32-x64-msvc/package.json').version
|
|
137
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
138
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
133
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
134
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
139
135
|
}
|
|
140
136
|
return binding
|
|
141
137
|
} catch (e) {
|
|
@@ -151,8 +147,8 @@ function requireNative() {
|
|
|
151
147
|
try {
|
|
152
148
|
const binding = require('@nmtjs/proxy-win32-ia32-msvc')
|
|
153
149
|
const bindingPackageVersion = require('@nmtjs/proxy-win32-ia32-msvc/package.json').version
|
|
154
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
155
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
150
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
151
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
156
152
|
}
|
|
157
153
|
return binding
|
|
158
154
|
} catch (e) {
|
|
@@ -167,8 +163,8 @@ function requireNative() {
|
|
|
167
163
|
try {
|
|
168
164
|
const binding = require('@nmtjs/proxy-win32-arm64-msvc')
|
|
169
165
|
const bindingPackageVersion = require('@nmtjs/proxy-win32-arm64-msvc/package.json').version
|
|
170
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
171
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
166
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
167
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
172
168
|
}
|
|
173
169
|
return binding
|
|
174
170
|
} catch (e) {
|
|
@@ -186,8 +182,8 @@ function requireNative() {
|
|
|
186
182
|
try {
|
|
187
183
|
const binding = require('@nmtjs/proxy-darwin-universal')
|
|
188
184
|
const bindingPackageVersion = require('@nmtjs/proxy-darwin-universal/package.json').version
|
|
189
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
190
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
185
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
186
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
191
187
|
}
|
|
192
188
|
return binding
|
|
193
189
|
} catch (e) {
|
|
@@ -202,8 +198,8 @@ function requireNative() {
|
|
|
202
198
|
try {
|
|
203
199
|
const binding = require('@nmtjs/proxy-darwin-x64')
|
|
204
200
|
const bindingPackageVersion = require('@nmtjs/proxy-darwin-x64/package.json').version
|
|
205
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
206
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
201
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
202
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
207
203
|
}
|
|
208
204
|
return binding
|
|
209
205
|
} catch (e) {
|
|
@@ -218,8 +214,8 @@ function requireNative() {
|
|
|
218
214
|
try {
|
|
219
215
|
const binding = require('@nmtjs/proxy-darwin-arm64')
|
|
220
216
|
const bindingPackageVersion = require('@nmtjs/proxy-darwin-arm64/package.json').version
|
|
221
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
222
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
217
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
218
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
223
219
|
}
|
|
224
220
|
return binding
|
|
225
221
|
} catch (e) {
|
|
@@ -238,8 +234,8 @@ function requireNative() {
|
|
|
238
234
|
try {
|
|
239
235
|
const binding = require('@nmtjs/proxy-freebsd-x64')
|
|
240
236
|
const bindingPackageVersion = require('@nmtjs/proxy-freebsd-x64/package.json').version
|
|
241
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
237
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
238
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
243
239
|
}
|
|
244
240
|
return binding
|
|
245
241
|
} catch (e) {
|
|
@@ -254,8 +250,8 @@ function requireNative() {
|
|
|
254
250
|
try {
|
|
255
251
|
const binding = require('@nmtjs/proxy-freebsd-arm64')
|
|
256
252
|
const bindingPackageVersion = require('@nmtjs/proxy-freebsd-arm64/package.json').version
|
|
257
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
258
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
253
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
254
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
259
255
|
}
|
|
260
256
|
return binding
|
|
261
257
|
} catch (e) {
|
|
@@ -275,8 +271,8 @@ function requireNative() {
|
|
|
275
271
|
try {
|
|
276
272
|
const binding = require('@nmtjs/proxy-linux-x64-musl')
|
|
277
273
|
const bindingPackageVersion = require('@nmtjs/proxy-linux-x64-musl/package.json').version
|
|
278
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
279
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
274
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
275
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
280
276
|
}
|
|
281
277
|
return binding
|
|
282
278
|
} catch (e) {
|
|
@@ -291,8 +287,8 @@ function requireNative() {
|
|
|
291
287
|
try {
|
|
292
288
|
const binding = require('@nmtjs/proxy-linux-x64-gnu')
|
|
293
289
|
const bindingPackageVersion = require('@nmtjs/proxy-linux-x64-gnu/package.json').version
|
|
294
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
295
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
290
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
291
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
296
292
|
}
|
|
297
293
|
return binding
|
|
298
294
|
} catch (e) {
|
|
@@ -309,8 +305,8 @@ function requireNative() {
|
|
|
309
305
|
try {
|
|
310
306
|
const binding = require('@nmtjs/proxy-linux-arm64-musl')
|
|
311
307
|
const bindingPackageVersion = require('@nmtjs/proxy-linux-arm64-musl/package.json').version
|
|
312
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
313
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
308
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
309
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
314
310
|
}
|
|
315
311
|
return binding
|
|
316
312
|
} catch (e) {
|
|
@@ -325,8 +321,8 @@ function requireNative() {
|
|
|
325
321
|
try {
|
|
326
322
|
const binding = require('@nmtjs/proxy-linux-arm64-gnu')
|
|
327
323
|
const bindingPackageVersion = require('@nmtjs/proxy-linux-arm64-gnu/package.json').version
|
|
328
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
324
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
325
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
330
326
|
}
|
|
331
327
|
return binding
|
|
332
328
|
} catch (e) {
|
|
@@ -343,8 +339,8 @@ function requireNative() {
|
|
|
343
339
|
try {
|
|
344
340
|
const binding = require('@nmtjs/proxy-linux-arm-musleabihf')
|
|
345
341
|
const bindingPackageVersion = require('@nmtjs/proxy-linux-arm-musleabihf/package.json').version
|
|
346
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
347
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
342
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
343
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
348
344
|
}
|
|
349
345
|
return binding
|
|
350
346
|
} catch (e) {
|
|
@@ -359,8 +355,8 @@ function requireNative() {
|
|
|
359
355
|
try {
|
|
360
356
|
const binding = require('@nmtjs/proxy-linux-arm-gnueabihf')
|
|
361
357
|
const bindingPackageVersion = require('@nmtjs/proxy-linux-arm-gnueabihf/package.json').version
|
|
362
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
363
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
358
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
359
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
364
360
|
}
|
|
365
361
|
return binding
|
|
366
362
|
} catch (e) {
|
|
@@ -377,8 +373,8 @@ function requireNative() {
|
|
|
377
373
|
try {
|
|
378
374
|
const binding = require('@nmtjs/proxy-linux-loong64-musl')
|
|
379
375
|
const bindingPackageVersion = require('@nmtjs/proxy-linux-loong64-musl/package.json').version
|
|
380
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
381
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
376
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
377
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
382
378
|
}
|
|
383
379
|
return binding
|
|
384
380
|
} catch (e) {
|
|
@@ -393,8 +389,8 @@ function requireNative() {
|
|
|
393
389
|
try {
|
|
394
390
|
const binding = require('@nmtjs/proxy-linux-loong64-gnu')
|
|
395
391
|
const bindingPackageVersion = require('@nmtjs/proxy-linux-loong64-gnu/package.json').version
|
|
396
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
397
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
392
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
393
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
398
394
|
}
|
|
399
395
|
return binding
|
|
400
396
|
} catch (e) {
|
|
@@ -411,8 +407,8 @@ function requireNative() {
|
|
|
411
407
|
try {
|
|
412
408
|
const binding = require('@nmtjs/proxy-linux-riscv64-musl')
|
|
413
409
|
const bindingPackageVersion = require('@nmtjs/proxy-linux-riscv64-musl/package.json').version
|
|
414
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
415
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
410
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
411
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
416
412
|
}
|
|
417
413
|
return binding
|
|
418
414
|
} catch (e) {
|
|
@@ -427,8 +423,8 @@ function requireNative() {
|
|
|
427
423
|
try {
|
|
428
424
|
const binding = require('@nmtjs/proxy-linux-riscv64-gnu')
|
|
429
425
|
const bindingPackageVersion = require('@nmtjs/proxy-linux-riscv64-gnu/package.json').version
|
|
430
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
431
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
426
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
427
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
432
428
|
}
|
|
433
429
|
return binding
|
|
434
430
|
} catch (e) {
|
|
@@ -444,8 +440,8 @@ function requireNative() {
|
|
|
444
440
|
try {
|
|
445
441
|
const binding = require('@nmtjs/proxy-linux-ppc64-gnu')
|
|
446
442
|
const bindingPackageVersion = require('@nmtjs/proxy-linux-ppc64-gnu/package.json').version
|
|
447
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
448
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
443
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
444
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
449
445
|
}
|
|
450
446
|
return binding
|
|
451
447
|
} catch (e) {
|
|
@@ -460,8 +456,8 @@ function requireNative() {
|
|
|
460
456
|
try {
|
|
461
457
|
const binding = require('@nmtjs/proxy-linux-s390x-gnu')
|
|
462
458
|
const bindingPackageVersion = require('@nmtjs/proxy-linux-s390x-gnu/package.json').version
|
|
463
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
464
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
459
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
460
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
465
461
|
}
|
|
466
462
|
return binding
|
|
467
463
|
} catch (e) {
|
|
@@ -480,8 +476,8 @@ function requireNative() {
|
|
|
480
476
|
try {
|
|
481
477
|
const binding = require('@nmtjs/proxy-openharmony-arm64')
|
|
482
478
|
const bindingPackageVersion = require('@nmtjs/proxy-openharmony-arm64/package.json').version
|
|
483
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
484
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
479
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
480
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
485
481
|
}
|
|
486
482
|
return binding
|
|
487
483
|
} catch (e) {
|
|
@@ -496,8 +492,8 @@ function requireNative() {
|
|
|
496
492
|
try {
|
|
497
493
|
const binding = require('@nmtjs/proxy-openharmony-x64')
|
|
498
494
|
const bindingPackageVersion = require('@nmtjs/proxy-openharmony-x64/package.json').version
|
|
499
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
500
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
495
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
496
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
501
497
|
}
|
|
502
498
|
return binding
|
|
503
499
|
} catch (e) {
|
|
@@ -512,8 +508,8 @@ function requireNative() {
|
|
|
512
508
|
try {
|
|
513
509
|
const binding = require('@nmtjs/proxy-openharmony-arm')
|
|
514
510
|
const bindingPackageVersion = require('@nmtjs/proxy-openharmony-arm/package.json').version
|
|
515
|
-
if (bindingPackageVersion !== '1.0.0-
|
|
516
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-
|
|
511
|
+
if (bindingPackageVersion !== '1.0.0-beta.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
512
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
517
513
|
}
|
|
518
514
|
return binding
|
|
519
515
|
} catch (e) {
|
|
@@ -579,5 +575,5 @@ if (!nativeBinding) {
|
|
|
579
575
|
throw new Error(`Failed to load native binding`)
|
|
580
576
|
}
|
|
581
577
|
|
|
582
|
-
|
|
583
|
-
|
|
578
|
+
module.exports = nativeBinding
|
|
579
|
+
module.exports.Proxy = nativeBinding.Proxy
|
package/package.json
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nmtjs/proxy",
|
|
3
|
-
"version": "1.0.0-
|
|
4
|
-
"type": "module",
|
|
5
|
-
"exports": {
|
|
6
|
-
".": "./dist/index.js"
|
|
7
|
-
},
|
|
3
|
+
"version": "1.0.0-beta.0",
|
|
8
4
|
"napi": {
|
|
9
5
|
"binaryName": "neemata-proxy",
|
|
10
6
|
"targets": [
|
|
@@ -17,14 +13,12 @@
|
|
|
17
13
|
"armv7-unknown-linux-gnueabihf"
|
|
18
14
|
]
|
|
19
15
|
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"@napi-rs/cli": "^3.4.1"
|
|
22
|
-
},
|
|
23
16
|
"devDependencies": {
|
|
24
|
-
"@
|
|
17
|
+
"@napi-rs/cli": "3.5.1",
|
|
18
|
+
"@biomejs/biome": "2.3.13",
|
|
25
19
|
"@types/node": "^24.0.0",
|
|
26
20
|
"@types/ws": "^8.18.1",
|
|
27
|
-
"vitest": "
|
|
21
|
+
"vitest": "4.0.18",
|
|
28
22
|
"ws": "^8.18.3"
|
|
29
23
|
},
|
|
30
24
|
"files": [
|
|
@@ -33,21 +27,23 @@
|
|
|
33
27
|
"README.md"
|
|
34
28
|
],
|
|
35
29
|
"optionalDependencies": {
|
|
36
|
-
"@nmtjs/proxy-darwin-x64": "1.0.0-
|
|
37
|
-
"@nmtjs/proxy-darwin-arm64": "1.0.0-
|
|
38
|
-
"@nmtjs/proxy-linux-x64-gnu": "1.0.0-
|
|
39
|
-
"@nmtjs/proxy-linux-x64-musl": "1.0.0-
|
|
40
|
-
"@nmtjs/proxy-linux-arm64-gnu": "1.0.0-
|
|
41
|
-
"@nmtjs/proxy-linux-arm64-musl": "1.0.0-
|
|
42
|
-
"@nmtjs/proxy-linux-arm-gnueabihf": "1.0.0-
|
|
30
|
+
"@nmtjs/proxy-darwin-x64": "1.0.0-beta.0",
|
|
31
|
+
"@nmtjs/proxy-darwin-arm64": "1.0.0-beta.0",
|
|
32
|
+
"@nmtjs/proxy-linux-x64-gnu": "1.0.0-beta.0",
|
|
33
|
+
"@nmtjs/proxy-linux-x64-musl": "1.0.0-beta.0",
|
|
34
|
+
"@nmtjs/proxy-linux-arm64-gnu": "1.0.0-beta.0",
|
|
35
|
+
"@nmtjs/proxy-linux-arm64-musl": "1.0.0-beta.0",
|
|
36
|
+
"@nmtjs/proxy-linux-arm-gnueabihf": "1.0.0-beta.0"
|
|
43
37
|
},
|
|
44
38
|
"scripts": {
|
|
45
39
|
"fmt": "$npm_execpath biome check --diagnostic-level=error --write . && cargo fmt",
|
|
46
40
|
"lint": "$npm_execpath biome lint --diagnostic-level=error . && cargo clippy",
|
|
47
41
|
"build:artifact": "napi build --release",
|
|
48
|
-
"build:js": "napi build --
|
|
42
|
+
"build:js": "napi build --js index.js --platform --output-dir ./dist",
|
|
49
43
|
"build": "$npm_execpath build:debug --release",
|
|
50
|
-
"build:debug": "napi build --
|
|
44
|
+
"build:debug": "napi build --js index.js --platform --output-dir ./dist",
|
|
51
45
|
"test": "cargo test && vitest run"
|
|
52
|
-
}
|
|
46
|
+
},
|
|
47
|
+
"main": "dist/index.js",
|
|
48
|
+
"types": "dist/index.d.ts"
|
|
53
49
|
}
|