@mirascript/napi 0.1.6 → 0.1.7

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 CHANGED
@@ -74,15 +74,15 @@ function requireNative() {
74
74
  } else if (process.platform === 'android') {
75
75
  if (process.arch === 'arm64') {
76
76
  try {
77
- return require('./napi.android-arm64.node')
77
+ return require('./mirascript.android-arm64.node')
78
78
  } catch (e) {
79
79
  loadErrors.push(e)
80
80
  }
81
81
  try {
82
82
  const binding = require('@mirascript/napi-android-arm64')
83
83
  const bindingPackageVersion = require('@mirascript/napi-android-arm64/package.json').version
84
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
84
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
86
86
  }
87
87
  return binding
88
88
  } catch (e) {
@@ -90,15 +90,15 @@ function requireNative() {
90
90
  }
91
91
  } else if (process.arch === 'arm') {
92
92
  try {
93
- return require('./napi.android-arm-eabi.node')
93
+ return require('./mirascript.android-arm-eabi.node')
94
94
  } catch (e) {
95
95
  loadErrors.push(e)
96
96
  }
97
97
  try {
98
98
  const binding = require('@mirascript/napi-android-arm-eabi')
99
99
  const bindingPackageVersion = require('@mirascript/napi-android-arm-eabi/package.json').version
100
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
100
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
102
102
  }
103
103
  return binding
104
104
  } catch (e) {
@@ -111,15 +111,15 @@ function requireNative() {
111
111
  if (process.arch === 'x64') {
112
112
  if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') {
113
113
  try {
114
- return require('./napi.win32-x64-gnu.node')
114
+ return require('./mirascript.win32-x64-gnu.node')
115
115
  } catch (e) {
116
116
  loadErrors.push(e)
117
117
  }
118
118
  try {
119
119
  const binding = require('@mirascript/napi-win32-x64-gnu')
120
120
  const bindingPackageVersion = require('@mirascript/napi-win32-x64-gnu/package.json').version
121
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
121
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
123
123
  }
124
124
  return binding
125
125
  } catch (e) {
@@ -127,15 +127,15 @@ function requireNative() {
127
127
  }
128
128
  } else {
129
129
  try {
130
- return require('./napi.win32-x64-msvc.node')
130
+ return require('./mirascript.win32-x64-msvc.node')
131
131
  } catch (e) {
132
132
  loadErrors.push(e)
133
133
  }
134
134
  try {
135
135
  const binding = require('@mirascript/napi-win32-x64-msvc')
136
136
  const bindingPackageVersion = require('@mirascript/napi-win32-x64-msvc/package.json').version
137
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
137
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
139
139
  }
140
140
  return binding
141
141
  } catch (e) {
@@ -144,15 +144,15 @@ function requireNative() {
144
144
  }
145
145
  } else if (process.arch === 'ia32') {
146
146
  try {
147
- return require('./napi.win32-ia32-msvc.node')
147
+ return require('./mirascript.win32-ia32-msvc.node')
148
148
  } catch (e) {
149
149
  loadErrors.push(e)
150
150
  }
151
151
  try {
152
152
  const binding = require('@mirascript/napi-win32-ia32-msvc')
153
153
  const bindingPackageVersion = require('@mirascript/napi-win32-ia32-msvc/package.json').version
154
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
154
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
156
156
  }
157
157
  return binding
158
158
  } catch (e) {
@@ -160,15 +160,15 @@ function requireNative() {
160
160
  }
161
161
  } else if (process.arch === 'arm64') {
162
162
  try {
163
- return require('./napi.win32-arm64-msvc.node')
163
+ return require('./mirascript.win32-arm64-msvc.node')
164
164
  } catch (e) {
165
165
  loadErrors.push(e)
166
166
  }
167
167
  try {
168
168
  const binding = require('@mirascript/napi-win32-arm64-msvc')
169
169
  const bindingPackageVersion = require('@mirascript/napi-win32-arm64-msvc/package.json').version
170
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
170
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
172
172
  }
173
173
  return binding
174
174
  } catch (e) {
@@ -179,15 +179,15 @@ function requireNative() {
179
179
  }
180
180
  } else if (process.platform === 'darwin') {
181
181
  try {
182
- return require('./napi.darwin-universal.node')
182
+ return require('./mirascript.darwin-universal.node')
183
183
  } catch (e) {
184
184
  loadErrors.push(e)
185
185
  }
186
186
  try {
187
187
  const binding = require('@mirascript/napi-darwin-universal')
188
188
  const bindingPackageVersion = require('@mirascript/napi-darwin-universal/package.json').version
189
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
189
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
191
191
  }
192
192
  return binding
193
193
  } catch (e) {
@@ -195,15 +195,15 @@ function requireNative() {
195
195
  }
196
196
  if (process.arch === 'x64') {
197
197
  try {
198
- return require('./napi.darwin-x64.node')
198
+ return require('./mirascript.darwin-x64.node')
199
199
  } catch (e) {
200
200
  loadErrors.push(e)
201
201
  }
202
202
  try {
203
203
  const binding = require('@mirascript/napi-darwin-x64')
204
204
  const bindingPackageVersion = require('@mirascript/napi-darwin-x64/package.json').version
205
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
205
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
207
207
  }
208
208
  return binding
209
209
  } catch (e) {
@@ -211,15 +211,15 @@ function requireNative() {
211
211
  }
212
212
  } else if (process.arch === 'arm64') {
213
213
  try {
214
- return require('./napi.darwin-arm64.node')
214
+ return require('./mirascript.darwin-arm64.node')
215
215
  } catch (e) {
216
216
  loadErrors.push(e)
217
217
  }
218
218
  try {
219
219
  const binding = require('@mirascript/napi-darwin-arm64')
220
220
  const bindingPackageVersion = require('@mirascript/napi-darwin-arm64/package.json').version
221
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
221
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
223
223
  }
224
224
  return binding
225
225
  } catch (e) {
@@ -231,15 +231,15 @@ function requireNative() {
231
231
  } else if (process.platform === 'freebsd') {
232
232
  if (process.arch === 'x64') {
233
233
  try {
234
- return require('./napi.freebsd-x64.node')
234
+ return require('./mirascript.freebsd-x64.node')
235
235
  } catch (e) {
236
236
  loadErrors.push(e)
237
237
  }
238
238
  try {
239
239
  const binding = require('@mirascript/napi-freebsd-x64')
240
240
  const bindingPackageVersion = require('@mirascript/napi-freebsd-x64/package.json').version
241
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
241
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
243
243
  }
244
244
  return binding
245
245
  } catch (e) {
@@ -247,15 +247,15 @@ function requireNative() {
247
247
  }
248
248
  } else if (process.arch === 'arm64') {
249
249
  try {
250
- return require('./napi.freebsd-arm64.node')
250
+ return require('./mirascript.freebsd-arm64.node')
251
251
  } catch (e) {
252
252
  loadErrors.push(e)
253
253
  }
254
254
  try {
255
255
  const binding = require('@mirascript/napi-freebsd-arm64')
256
256
  const bindingPackageVersion = require('@mirascript/napi-freebsd-arm64/package.json').version
257
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
257
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
259
259
  }
260
260
  return binding
261
261
  } catch (e) {
@@ -268,15 +268,15 @@ function requireNative() {
268
268
  if (process.arch === 'x64') {
269
269
  if (isMusl()) {
270
270
  try {
271
- return require('./napi.linux-x64-musl.node')
271
+ return require('./mirascript.linux-x64-musl.node')
272
272
  } catch (e) {
273
273
  loadErrors.push(e)
274
274
  }
275
275
  try {
276
276
  const binding = require('@mirascript/napi-linux-x64-musl')
277
277
  const bindingPackageVersion = require('@mirascript/napi-linux-x64-musl/package.json').version
278
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
278
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
280
280
  }
281
281
  return binding
282
282
  } catch (e) {
@@ -284,15 +284,15 @@ function requireNative() {
284
284
  }
285
285
  } else {
286
286
  try {
287
- return require('./napi.linux-x64-gnu.node')
287
+ return require('./mirascript.linux-x64-gnu.node')
288
288
  } catch (e) {
289
289
  loadErrors.push(e)
290
290
  }
291
291
  try {
292
292
  const binding = require('@mirascript/napi-linux-x64-gnu')
293
293
  const bindingPackageVersion = require('@mirascript/napi-linux-x64-gnu/package.json').version
294
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
294
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
296
296
  }
297
297
  return binding
298
298
  } catch (e) {
@@ -302,15 +302,15 @@ function requireNative() {
302
302
  } else if (process.arch === 'arm64') {
303
303
  if (isMusl()) {
304
304
  try {
305
- return require('./napi.linux-arm64-musl.node')
305
+ return require('./mirascript.linux-arm64-musl.node')
306
306
  } catch (e) {
307
307
  loadErrors.push(e)
308
308
  }
309
309
  try {
310
310
  const binding = require('@mirascript/napi-linux-arm64-musl')
311
311
  const bindingPackageVersion = require('@mirascript/napi-linux-arm64-musl/package.json').version
312
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
312
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
314
314
  }
315
315
  return binding
316
316
  } catch (e) {
@@ -318,15 +318,15 @@ function requireNative() {
318
318
  }
319
319
  } else {
320
320
  try {
321
- return require('./napi.linux-arm64-gnu.node')
321
+ return require('./mirascript.linux-arm64-gnu.node')
322
322
  } catch (e) {
323
323
  loadErrors.push(e)
324
324
  }
325
325
  try {
326
326
  const binding = require('@mirascript/napi-linux-arm64-gnu')
327
327
  const bindingPackageVersion = require('@mirascript/napi-linux-arm64-gnu/package.json').version
328
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
328
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
330
330
  }
331
331
  return binding
332
332
  } catch (e) {
@@ -336,15 +336,15 @@ function requireNative() {
336
336
  } else if (process.arch === 'arm') {
337
337
  if (isMusl()) {
338
338
  try {
339
- return require('./napi.linux-arm-musleabihf.node')
339
+ return require('./mirascript.linux-arm-musleabihf.node')
340
340
  } catch (e) {
341
341
  loadErrors.push(e)
342
342
  }
343
343
  try {
344
344
  const binding = require('@mirascript/napi-linux-arm-musleabihf')
345
345
  const bindingPackageVersion = require('@mirascript/napi-linux-arm-musleabihf/package.json').version
346
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
346
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
348
348
  }
349
349
  return binding
350
350
  } catch (e) {
@@ -352,15 +352,15 @@ function requireNative() {
352
352
  }
353
353
  } else {
354
354
  try {
355
- return require('./napi.linux-arm-gnueabihf.node')
355
+ return require('./mirascript.linux-arm-gnueabihf.node')
356
356
  } catch (e) {
357
357
  loadErrors.push(e)
358
358
  }
359
359
  try {
360
360
  const binding = require('@mirascript/napi-linux-arm-gnueabihf')
361
361
  const bindingPackageVersion = require('@mirascript/napi-linux-arm-gnueabihf/package.json').version
362
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
362
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
364
364
  }
365
365
  return binding
366
366
  } catch (e) {
@@ -370,15 +370,15 @@ function requireNative() {
370
370
  } else if (process.arch === 'loong64') {
371
371
  if (isMusl()) {
372
372
  try {
373
- return require('./napi.linux-loong64-musl.node')
373
+ return require('./mirascript.linux-loong64-musl.node')
374
374
  } catch (e) {
375
375
  loadErrors.push(e)
376
376
  }
377
377
  try {
378
378
  const binding = require('@mirascript/napi-linux-loong64-musl')
379
379
  const bindingPackageVersion = require('@mirascript/napi-linux-loong64-musl/package.json').version
380
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
380
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
382
382
  }
383
383
  return binding
384
384
  } catch (e) {
@@ -386,15 +386,15 @@ function requireNative() {
386
386
  }
387
387
  } else {
388
388
  try {
389
- return require('./napi.linux-loong64-gnu.node')
389
+ return require('./mirascript.linux-loong64-gnu.node')
390
390
  } catch (e) {
391
391
  loadErrors.push(e)
392
392
  }
393
393
  try {
394
394
  const binding = require('@mirascript/napi-linux-loong64-gnu')
395
395
  const bindingPackageVersion = require('@mirascript/napi-linux-loong64-gnu/package.json').version
396
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
396
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
398
398
  }
399
399
  return binding
400
400
  } catch (e) {
@@ -404,15 +404,15 @@ function requireNative() {
404
404
  } else if (process.arch === 'riscv64') {
405
405
  if (isMusl()) {
406
406
  try {
407
- return require('./napi.linux-riscv64-musl.node')
407
+ return require('./mirascript.linux-riscv64-musl.node')
408
408
  } catch (e) {
409
409
  loadErrors.push(e)
410
410
  }
411
411
  try {
412
412
  const binding = require('@mirascript/napi-linux-riscv64-musl')
413
413
  const bindingPackageVersion = require('@mirascript/napi-linux-riscv64-musl/package.json').version
414
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
414
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
416
416
  }
417
417
  return binding
418
418
  } catch (e) {
@@ -420,15 +420,15 @@ function requireNative() {
420
420
  }
421
421
  } else {
422
422
  try {
423
- return require('./napi.linux-riscv64-gnu.node')
423
+ return require('./mirascript.linux-riscv64-gnu.node')
424
424
  } catch (e) {
425
425
  loadErrors.push(e)
426
426
  }
427
427
  try {
428
428
  const binding = require('@mirascript/napi-linux-riscv64-gnu')
429
429
  const bindingPackageVersion = require('@mirascript/napi-linux-riscv64-gnu/package.json').version
430
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
430
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
432
432
  }
433
433
  return binding
434
434
  } catch (e) {
@@ -437,15 +437,15 @@ function requireNative() {
437
437
  }
438
438
  } else if (process.arch === 'ppc64') {
439
439
  try {
440
- return require('./napi.linux-ppc64-gnu.node')
440
+ return require('./mirascript.linux-ppc64-gnu.node')
441
441
  } catch (e) {
442
442
  loadErrors.push(e)
443
443
  }
444
444
  try {
445
445
  const binding = require('@mirascript/napi-linux-ppc64-gnu')
446
446
  const bindingPackageVersion = require('@mirascript/napi-linux-ppc64-gnu/package.json').version
447
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
447
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
449
449
  }
450
450
  return binding
451
451
  } catch (e) {
@@ -453,15 +453,15 @@ function requireNative() {
453
453
  }
454
454
  } else if (process.arch === 's390x') {
455
455
  try {
456
- return require('./napi.linux-s390x-gnu.node')
456
+ return require('./mirascript.linux-s390x-gnu.node')
457
457
  } catch (e) {
458
458
  loadErrors.push(e)
459
459
  }
460
460
  try {
461
461
  const binding = require('@mirascript/napi-linux-s390x-gnu')
462
462
  const bindingPackageVersion = require('@mirascript/napi-linux-s390x-gnu/package.json').version
463
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
463
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
465
465
  }
466
466
  return binding
467
467
  } catch (e) {
@@ -473,15 +473,15 @@ function requireNative() {
473
473
  } else if (process.platform === 'openharmony') {
474
474
  if (process.arch === 'arm64') {
475
475
  try {
476
- return require('./napi.openharmony-arm64.node')
476
+ return require('./mirascript.openharmony-arm64.node')
477
477
  } catch (e) {
478
478
  loadErrors.push(e)
479
479
  }
480
480
  try {
481
481
  const binding = require('@mirascript/napi-openharmony-arm64')
482
482
  const bindingPackageVersion = require('@mirascript/napi-openharmony-arm64/package.json').version
483
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
483
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
485
485
  }
486
486
  return binding
487
487
  } catch (e) {
@@ -489,15 +489,15 @@ function requireNative() {
489
489
  }
490
490
  } else if (process.arch === 'x64') {
491
491
  try {
492
- return require('./napi.openharmony-x64.node')
492
+ return require('./mirascript.openharmony-x64.node')
493
493
  } catch (e) {
494
494
  loadErrors.push(e)
495
495
  }
496
496
  try {
497
497
  const binding = require('@mirascript/napi-openharmony-x64')
498
498
  const bindingPackageVersion = require('@mirascript/napi-openharmony-x64/package.json').version
499
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
499
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
501
501
  }
502
502
  return binding
503
503
  } catch (e) {
@@ -505,15 +505,15 @@ function requireNative() {
505
505
  }
506
506
  } else if (process.arch === 'arm') {
507
507
  try {
508
- return require('./napi.openharmony-arm.node')
508
+ return require('./mirascript.openharmony-arm.node')
509
509
  } catch (e) {
510
510
  loadErrors.push(e)
511
511
  }
512
512
  try {
513
513
  const binding = require('@mirascript/napi-openharmony-arm')
514
514
  const bindingPackageVersion = require('@mirascript/napi-openharmony-arm/package.json').version
515
- if (bindingPackageVersion !== '0.1.6' && 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.1.6 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
515
+ if (bindingPackageVersion !== '0.1.5' && 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.1.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
517
517
  }
518
518
  return binding
519
519
  } catch (e) {
@@ -533,7 +533,7 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
533
533
  let wasiBinding = null
534
534
  let wasiBindingError = null
535
535
  try {
536
- wasiBinding = require('./napi.wasi.cjs')
536
+ wasiBinding = require('./mirascript.wasi.cjs')
537
537
  nativeBinding = wasiBinding
538
538
  } catch (err) {
539
539
  if (process.env.NAPI_RS_FORCE_WASI) {
Binary file
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@mirascript/napi",
3
3
  "type": "module",
4
- "version": "0.1.6",
4
+ "version": "0.1.7",
5
5
  "description": "MiraScript compiler for Node.JS",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": "./dist/index.js",
9
9
  "napi": {
10
- "binaryName": "napi",
10
+ "binaryName": "mirascript",
11
11
  "targets": [
12
12
  "x86_64-pc-windows-msvc",
13
13
  "aarch64-pc-windows-msvc",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "scripts": {
31
31
  "build": "pnpm run build:debug --release",
32
- "build:debug": "napi build --manifest-path ../../crates/napi/Cargo.toml --output-dir dist --platform --esm",
32
+ "build:debug": "napi build --manifest-path ../../crates/node-api/Cargo.toml --output-dir dist --platform --esm",
33
33
  "watch": "nodemon --watch ../../crates/ --ext rs --exec \"pnpm run build:debug\""
34
34
  }
35
35
  }