vite-plugin-norg 1.2.2 → 1.2.3
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/napi/index.js +58 -54
- package/dist/napi/index.linux-x64-gnu.node +0 -0
- package/package.json +2 -2
package/dist/napi/index.js
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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
|
+
|
|
6
10
|
const { readFileSync } = require('node:fs')
|
|
7
11
|
let nativeBinding = null
|
|
8
12
|
const loadErrors = []
|
|
@@ -77,8 +81,8 @@ function requireNative() {
|
|
|
77
81
|
try {
|
|
78
82
|
const binding = require('vite-plugin-norg-android-arm64')
|
|
79
83
|
const bindingPackageVersion = require('vite-plugin-norg-android-arm64/package.json').version
|
|
80
|
-
if (bindingPackageVersion !== '1.2.
|
|
81
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
84
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
82
86
|
}
|
|
83
87
|
return binding
|
|
84
88
|
} catch (e) {
|
|
@@ -93,8 +97,8 @@ function requireNative() {
|
|
|
93
97
|
try {
|
|
94
98
|
const binding = require('vite-plugin-norg-android-arm-eabi')
|
|
95
99
|
const bindingPackageVersion = require('vite-plugin-norg-android-arm-eabi/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '1.2.
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
100
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
102
|
}
|
|
99
103
|
return binding
|
|
100
104
|
} catch (e) {
|
|
@@ -114,8 +118,8 @@ function requireNative() {
|
|
|
114
118
|
try {
|
|
115
119
|
const binding = require('vite-plugin-norg-win32-x64-gnu')
|
|
116
120
|
const bindingPackageVersion = require('vite-plugin-norg-win32-x64-gnu/package.json').version
|
|
117
|
-
if (bindingPackageVersion !== '1.2.
|
|
118
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
121
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
119
123
|
}
|
|
120
124
|
return binding
|
|
121
125
|
} catch (e) {
|
|
@@ -130,8 +134,8 @@ function requireNative() {
|
|
|
130
134
|
try {
|
|
131
135
|
const binding = require('vite-plugin-norg-win32-x64-msvc')
|
|
132
136
|
const bindingPackageVersion = require('vite-plugin-norg-win32-x64-msvc/package.json').version
|
|
133
|
-
if (bindingPackageVersion !== '1.2.
|
|
134
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
137
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
135
139
|
}
|
|
136
140
|
return binding
|
|
137
141
|
} catch (e) {
|
|
@@ -147,8 +151,8 @@ function requireNative() {
|
|
|
147
151
|
try {
|
|
148
152
|
const binding = require('vite-plugin-norg-win32-ia32-msvc')
|
|
149
153
|
const bindingPackageVersion = require('vite-plugin-norg-win32-ia32-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '1.2.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
154
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
156
|
}
|
|
153
157
|
return binding
|
|
154
158
|
} catch (e) {
|
|
@@ -163,8 +167,8 @@ function requireNative() {
|
|
|
163
167
|
try {
|
|
164
168
|
const binding = require('vite-plugin-norg-win32-arm64-msvc')
|
|
165
169
|
const bindingPackageVersion = require('vite-plugin-norg-win32-arm64-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '1.2.
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
170
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
172
|
}
|
|
169
173
|
return binding
|
|
170
174
|
} catch (e) {
|
|
@@ -182,8 +186,8 @@ function requireNative() {
|
|
|
182
186
|
try {
|
|
183
187
|
const binding = require('vite-plugin-norg-darwin-universal')
|
|
184
188
|
const bindingPackageVersion = require('vite-plugin-norg-darwin-universal/package.json').version
|
|
185
|
-
if (bindingPackageVersion !== '1.2.
|
|
186
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
189
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
187
191
|
}
|
|
188
192
|
return binding
|
|
189
193
|
} catch (e) {
|
|
@@ -198,8 +202,8 @@ function requireNative() {
|
|
|
198
202
|
try {
|
|
199
203
|
const binding = require('vite-plugin-norg-darwin-x64')
|
|
200
204
|
const bindingPackageVersion = require('vite-plugin-norg-darwin-x64/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '1.2.
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
205
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
207
|
}
|
|
204
208
|
return binding
|
|
205
209
|
} catch (e) {
|
|
@@ -214,8 +218,8 @@ function requireNative() {
|
|
|
214
218
|
try {
|
|
215
219
|
const binding = require('vite-plugin-norg-darwin-arm64')
|
|
216
220
|
const bindingPackageVersion = require('vite-plugin-norg-darwin-arm64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '1.2.
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
221
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
223
|
}
|
|
220
224
|
return binding
|
|
221
225
|
} catch (e) {
|
|
@@ -234,8 +238,8 @@ function requireNative() {
|
|
|
234
238
|
try {
|
|
235
239
|
const binding = require('vite-plugin-norg-freebsd-x64')
|
|
236
240
|
const bindingPackageVersion = require('vite-plugin-norg-freebsd-x64/package.json').version
|
|
237
|
-
if (bindingPackageVersion !== '1.2.
|
|
238
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
241
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
239
243
|
}
|
|
240
244
|
return binding
|
|
241
245
|
} catch (e) {
|
|
@@ -250,8 +254,8 @@ function requireNative() {
|
|
|
250
254
|
try {
|
|
251
255
|
const binding = require('vite-plugin-norg-freebsd-arm64')
|
|
252
256
|
const bindingPackageVersion = require('vite-plugin-norg-freebsd-arm64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '1.2.
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
257
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
259
|
}
|
|
256
260
|
return binding
|
|
257
261
|
} catch (e) {
|
|
@@ -271,8 +275,8 @@ function requireNative() {
|
|
|
271
275
|
try {
|
|
272
276
|
const binding = require('vite-plugin-norg-linux-x64-musl')
|
|
273
277
|
const bindingPackageVersion = require('vite-plugin-norg-linux-x64-musl/package.json').version
|
|
274
|
-
if (bindingPackageVersion !== '1.2.
|
|
275
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
278
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
276
280
|
}
|
|
277
281
|
return binding
|
|
278
282
|
} catch (e) {
|
|
@@ -287,8 +291,8 @@ function requireNative() {
|
|
|
287
291
|
try {
|
|
288
292
|
const binding = require('vite-plugin-norg-linux-x64-gnu')
|
|
289
293
|
const bindingPackageVersion = require('vite-plugin-norg-linux-x64-gnu/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '1.2.
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
294
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
296
|
}
|
|
293
297
|
return binding
|
|
294
298
|
} catch (e) {
|
|
@@ -305,8 +309,8 @@ function requireNative() {
|
|
|
305
309
|
try {
|
|
306
310
|
const binding = require('vite-plugin-norg-linux-arm64-musl')
|
|
307
311
|
const bindingPackageVersion = require('vite-plugin-norg-linux-arm64-musl/package.json').version
|
|
308
|
-
if (bindingPackageVersion !== '1.2.
|
|
309
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
312
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
310
314
|
}
|
|
311
315
|
return binding
|
|
312
316
|
} catch (e) {
|
|
@@ -321,8 +325,8 @@ function requireNative() {
|
|
|
321
325
|
try {
|
|
322
326
|
const binding = require('vite-plugin-norg-linux-arm64-gnu')
|
|
323
327
|
const bindingPackageVersion = require('vite-plugin-norg-linux-arm64-gnu/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '1.2.
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
328
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
330
|
}
|
|
327
331
|
return binding
|
|
328
332
|
} catch (e) {
|
|
@@ -339,8 +343,8 @@ function requireNative() {
|
|
|
339
343
|
try {
|
|
340
344
|
const binding = require('vite-plugin-norg-linux-arm-musleabihf')
|
|
341
345
|
const bindingPackageVersion = require('vite-plugin-norg-linux-arm-musleabihf/package.json').version
|
|
342
|
-
if (bindingPackageVersion !== '1.2.
|
|
343
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
346
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
344
348
|
}
|
|
345
349
|
return binding
|
|
346
350
|
} catch (e) {
|
|
@@ -355,8 +359,8 @@ function requireNative() {
|
|
|
355
359
|
try {
|
|
356
360
|
const binding = require('vite-plugin-norg-linux-arm-gnueabihf')
|
|
357
361
|
const bindingPackageVersion = require('vite-plugin-norg-linux-arm-gnueabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '1.2.
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
362
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
364
|
}
|
|
361
365
|
return binding
|
|
362
366
|
} catch (e) {
|
|
@@ -373,8 +377,8 @@ function requireNative() {
|
|
|
373
377
|
try {
|
|
374
378
|
const binding = require('vite-plugin-norg-linux-loong64-musl')
|
|
375
379
|
const bindingPackageVersion = require('vite-plugin-norg-linux-loong64-musl/package.json').version
|
|
376
|
-
if (bindingPackageVersion !== '1.2.
|
|
377
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
380
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
378
382
|
}
|
|
379
383
|
return binding
|
|
380
384
|
} catch (e) {
|
|
@@ -389,8 +393,8 @@ function requireNative() {
|
|
|
389
393
|
try {
|
|
390
394
|
const binding = require('vite-plugin-norg-linux-loong64-gnu')
|
|
391
395
|
const bindingPackageVersion = require('vite-plugin-norg-linux-loong64-gnu/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '1.2.
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
396
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
398
|
}
|
|
395
399
|
return binding
|
|
396
400
|
} catch (e) {
|
|
@@ -407,8 +411,8 @@ function requireNative() {
|
|
|
407
411
|
try {
|
|
408
412
|
const binding = require('vite-plugin-norg-linux-riscv64-musl')
|
|
409
413
|
const bindingPackageVersion = require('vite-plugin-norg-linux-riscv64-musl/package.json').version
|
|
410
|
-
if (bindingPackageVersion !== '1.2.
|
|
411
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
414
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
412
416
|
}
|
|
413
417
|
return binding
|
|
414
418
|
} catch (e) {
|
|
@@ -423,8 +427,8 @@ function requireNative() {
|
|
|
423
427
|
try {
|
|
424
428
|
const binding = require('vite-plugin-norg-linux-riscv64-gnu')
|
|
425
429
|
const bindingPackageVersion = require('vite-plugin-norg-linux-riscv64-gnu/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '1.2.
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
430
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
432
|
}
|
|
429
433
|
return binding
|
|
430
434
|
} catch (e) {
|
|
@@ -440,8 +444,8 @@ function requireNative() {
|
|
|
440
444
|
try {
|
|
441
445
|
const binding = require('vite-plugin-norg-linux-ppc64-gnu')
|
|
442
446
|
const bindingPackageVersion = require('vite-plugin-norg-linux-ppc64-gnu/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '1.2.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
447
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
449
|
}
|
|
446
450
|
return binding
|
|
447
451
|
} catch (e) {
|
|
@@ -456,8 +460,8 @@ function requireNative() {
|
|
|
456
460
|
try {
|
|
457
461
|
const binding = require('vite-plugin-norg-linux-s390x-gnu')
|
|
458
462
|
const bindingPackageVersion = require('vite-plugin-norg-linux-s390x-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '1.2.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
463
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
465
|
}
|
|
462
466
|
return binding
|
|
463
467
|
} catch (e) {
|
|
@@ -476,8 +480,8 @@ function requireNative() {
|
|
|
476
480
|
try {
|
|
477
481
|
const binding = require('vite-plugin-norg-openharmony-arm64')
|
|
478
482
|
const bindingPackageVersion = require('vite-plugin-norg-openharmony-arm64/package.json').version
|
|
479
|
-
if (bindingPackageVersion !== '1.2.
|
|
480
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
483
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
481
485
|
}
|
|
482
486
|
return binding
|
|
483
487
|
} catch (e) {
|
|
@@ -492,8 +496,8 @@ function requireNative() {
|
|
|
492
496
|
try {
|
|
493
497
|
const binding = require('vite-plugin-norg-openharmony-x64')
|
|
494
498
|
const bindingPackageVersion = require('vite-plugin-norg-openharmony-x64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '1.2.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
499
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
501
|
}
|
|
498
502
|
return binding
|
|
499
503
|
} catch (e) {
|
|
@@ -508,8 +512,8 @@ function requireNative() {
|
|
|
508
512
|
try {
|
|
509
513
|
const binding = require('vite-plugin-norg-openharmony-arm')
|
|
510
514
|
const bindingPackageVersion = require('vite-plugin-norg-openharmony-arm/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '1.2.
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 1.2.
|
|
515
|
+
if (bindingPackageVersion !== '1.2.3' && 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 1.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
517
|
}
|
|
514
518
|
return binding
|
|
515
519
|
} catch (e) {
|
|
@@ -571,5 +575,5 @@ if (!nativeBinding) {
|
|
|
571
575
|
throw new Error(`Failed to load native binding`)
|
|
572
576
|
}
|
|
573
577
|
|
|
574
|
-
|
|
575
|
-
|
|
578
|
+
const { parseNorg } = nativeBinding
|
|
579
|
+
export { parseNorg }
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"homepage": "https://github.com/bottd/vite-plugin-norg#README",
|
|
5
5
|
"name": "vite-plugin-norg",
|
|
6
|
-
"version": "1.2.
|
|
6
|
+
"version": "1.2.3",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"description": "A Vite plugin for rendering Norg files",
|
|
9
9
|
"main": "dist/plugin/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "npm run build:napi && npm run build:js",
|
|
22
|
-
"build:napi": "napi build --release --platform --output-dir
|
|
22
|
+
"build:napi": "napi build --release --platform --esm --output-dir dist/napi/",
|
|
23
23
|
"build:js": "vite build",
|
|
24
24
|
"clean": "rimraf dist target",
|
|
25
25
|
"lint": "eslint .",
|