jazz-napi 2.0.0-alpha.14 → 2.0.0-alpha.16
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.d.ts +3 -3
- package/index.js +120 -109
- package/package.json +5 -5
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export declare class NapiRuntime {
|
|
4
|
-
/** Create a new NapiRuntime with
|
|
4
|
+
/** Create a new NapiRuntime with Fjall-backed persistent storage. */
|
|
5
5
|
constructor(
|
|
6
6
|
schemaJson: string,
|
|
7
7
|
appId: string,
|
|
@@ -18,7 +18,7 @@ export declare class NapiRuntime {
|
|
|
18
18
|
userBranch: string,
|
|
19
19
|
tier?: string | undefined | null,
|
|
20
20
|
): NapiRuntime;
|
|
21
|
-
insert(table: string, values: any):
|
|
21
|
+
insert(table: string, values: any): any;
|
|
22
22
|
update(objectId: string, values: any): void;
|
|
23
23
|
delete(objectId: string): void;
|
|
24
24
|
query(
|
|
@@ -44,7 +44,7 @@ export declare class NapiRuntime {
|
|
|
44
44
|
): number;
|
|
45
45
|
/** Phase 2 of 2-phase subscribe: compile, register, sync, attach callback, tick. */
|
|
46
46
|
executeSubscription(handle: number, onUpdate: (...args: any[]) => any): void;
|
|
47
|
-
insertDurable(table: string, values: any, tier: string): Promise<
|
|
47
|
+
insertDurable(table: string, values: any, tier: string): Promise<any>;
|
|
48
48
|
updateDurable(objectId: string, values: any, tier: string): Promise<void>;
|
|
49
49
|
deleteDurable(objectId: string, tier: string): Promise<void>;
|
|
50
50
|
onSyncMessageReceived(messageJson: string): void;
|
package/index.js
CHANGED
|
@@ -6,6 +6,13 @@
|
|
|
6
6
|
const { readFileSync } = require('node:fs')
|
|
7
7
|
let nativeBinding = null;
|
|
8
8
|
const loadErrors = [];
|
|
9
|
+
const NATIVE_BINDING_PACKAGE_SCOPE = "@garden-co";
|
|
10
|
+
const resolveNativeBindingPackage = (name) =>
|
|
11
|
+
`${NATIVE_BINDING_PACKAGE_SCOPE}/${name}`;
|
|
12
|
+
const requireNativeBindingPackage = (name) =>
|
|
13
|
+
require(resolveNativeBindingPackage(name));
|
|
14
|
+
const getNativeBindingPackageVersion = (name) =>
|
|
15
|
+
require(`${resolveNativeBindingPackage(name)}/package.json`).version;
|
|
9
16
|
|
|
10
17
|
const isMusl = () => {
|
|
11
18
|
let musl = false;
|
|
@@ -77,15 +84,15 @@ function requireNative() {
|
|
|
77
84
|
loadErrors.push(e);
|
|
78
85
|
}
|
|
79
86
|
try {
|
|
80
|
-
const binding =
|
|
81
|
-
const bindingPackageVersion =
|
|
87
|
+
const binding = requireNativeBindingPackage("jazz-napi-android-arm64");
|
|
88
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-android-arm64");
|
|
82
89
|
if (
|
|
83
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
90
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
84
91
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
85
92
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
86
93
|
) {
|
|
87
94
|
throw new Error(
|
|
88
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
95
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
89
96
|
);
|
|
90
97
|
}
|
|
91
98
|
return binding;
|
|
@@ -99,15 +106,15 @@ function requireNative() {
|
|
|
99
106
|
loadErrors.push(e);
|
|
100
107
|
}
|
|
101
108
|
try {
|
|
102
|
-
const binding =
|
|
103
|
-
const bindingPackageVersion =
|
|
109
|
+
const binding = requireNativeBindingPackage("jazz-napi-android-arm-eabi");
|
|
110
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-android-arm-eabi");
|
|
104
111
|
if (
|
|
105
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
112
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
106
113
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
107
114
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
108
115
|
) {
|
|
109
116
|
throw new Error(
|
|
110
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
117
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
111
118
|
);
|
|
112
119
|
}
|
|
113
120
|
return binding;
|
|
@@ -129,15 +136,15 @@ function requireNative() {
|
|
|
129
136
|
loadErrors.push(e);
|
|
130
137
|
}
|
|
131
138
|
try {
|
|
132
|
-
const binding =
|
|
133
|
-
const bindingPackageVersion =
|
|
139
|
+
const binding = requireNativeBindingPackage("jazz-napi-win32-x64-gnu");
|
|
140
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-win32-x64-gnu");
|
|
134
141
|
if (
|
|
135
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
142
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
136
143
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
137
144
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
138
145
|
) {
|
|
139
146
|
throw new Error(
|
|
140
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
147
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
141
148
|
);
|
|
142
149
|
}
|
|
143
150
|
return binding;
|
|
@@ -151,15 +158,15 @@ function requireNative() {
|
|
|
151
158
|
loadErrors.push(e);
|
|
152
159
|
}
|
|
153
160
|
try {
|
|
154
|
-
const binding =
|
|
155
|
-
const bindingPackageVersion =
|
|
161
|
+
const binding = requireNativeBindingPackage("jazz-napi-win32-x64-msvc");
|
|
162
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-win32-x64-msvc");
|
|
156
163
|
if (
|
|
157
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
164
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
158
165
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
159
166
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
160
167
|
) {
|
|
161
168
|
throw new Error(
|
|
162
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
169
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
163
170
|
);
|
|
164
171
|
}
|
|
165
172
|
return binding;
|
|
@@ -174,15 +181,15 @@ function requireNative() {
|
|
|
174
181
|
loadErrors.push(e);
|
|
175
182
|
}
|
|
176
183
|
try {
|
|
177
|
-
const binding =
|
|
178
|
-
const bindingPackageVersion =
|
|
184
|
+
const binding = requireNativeBindingPackage("jazz-napi-win32-ia32-msvc");
|
|
185
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-win32-ia32-msvc");
|
|
179
186
|
if (
|
|
180
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
187
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
181
188
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
182
189
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
183
190
|
) {
|
|
184
191
|
throw new Error(
|
|
185
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
192
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
186
193
|
);
|
|
187
194
|
}
|
|
188
195
|
return binding;
|
|
@@ -196,15 +203,15 @@ function requireNative() {
|
|
|
196
203
|
loadErrors.push(e);
|
|
197
204
|
}
|
|
198
205
|
try {
|
|
199
|
-
const binding =
|
|
200
|
-
const bindingPackageVersion =
|
|
206
|
+
const binding = requireNativeBindingPackage("jazz-napi-win32-arm64-msvc");
|
|
207
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-win32-arm64-msvc");
|
|
201
208
|
if (
|
|
202
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
209
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
203
210
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
204
211
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
205
212
|
) {
|
|
206
213
|
throw new Error(
|
|
207
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
214
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
208
215
|
);
|
|
209
216
|
}
|
|
210
217
|
return binding;
|
|
@@ -221,15 +228,15 @@ function requireNative() {
|
|
|
221
228
|
loadErrors.push(e);
|
|
222
229
|
}
|
|
223
230
|
try {
|
|
224
|
-
const binding =
|
|
225
|
-
const bindingPackageVersion =
|
|
231
|
+
const binding = requireNativeBindingPackage("jazz-napi-darwin-universal");
|
|
232
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-darwin-universal");
|
|
226
233
|
if (
|
|
227
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
234
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
228
235
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
229
236
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
230
237
|
) {
|
|
231
238
|
throw new Error(
|
|
232
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
239
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
233
240
|
);
|
|
234
241
|
}
|
|
235
242
|
return binding;
|
|
@@ -243,15 +250,15 @@ function requireNative() {
|
|
|
243
250
|
loadErrors.push(e);
|
|
244
251
|
}
|
|
245
252
|
try {
|
|
246
|
-
const binding =
|
|
247
|
-
const bindingPackageVersion =
|
|
253
|
+
const binding = requireNativeBindingPackage("jazz-napi-darwin-x64");
|
|
254
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-darwin-x64");
|
|
248
255
|
if (
|
|
249
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
256
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
250
257
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
251
258
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
252
259
|
) {
|
|
253
260
|
throw new Error(
|
|
254
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
261
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
255
262
|
);
|
|
256
263
|
}
|
|
257
264
|
return binding;
|
|
@@ -265,15 +272,15 @@ function requireNative() {
|
|
|
265
272
|
loadErrors.push(e);
|
|
266
273
|
}
|
|
267
274
|
try {
|
|
268
|
-
const binding =
|
|
269
|
-
const bindingPackageVersion =
|
|
275
|
+
const binding = requireNativeBindingPackage("jazz-napi-darwin-arm64");
|
|
276
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-darwin-arm64");
|
|
270
277
|
if (
|
|
271
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
278
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
272
279
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
273
280
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
274
281
|
) {
|
|
275
282
|
throw new Error(
|
|
276
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
283
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
277
284
|
);
|
|
278
285
|
}
|
|
279
286
|
return binding;
|
|
@@ -291,15 +298,15 @@ function requireNative() {
|
|
|
291
298
|
loadErrors.push(e);
|
|
292
299
|
}
|
|
293
300
|
try {
|
|
294
|
-
const binding =
|
|
295
|
-
const bindingPackageVersion =
|
|
301
|
+
const binding = requireNativeBindingPackage("jazz-napi-freebsd-x64");
|
|
302
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-freebsd-x64");
|
|
296
303
|
if (
|
|
297
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
304
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
298
305
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
299
306
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
300
307
|
) {
|
|
301
308
|
throw new Error(
|
|
302
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
309
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
303
310
|
);
|
|
304
311
|
}
|
|
305
312
|
return binding;
|
|
@@ -313,15 +320,15 @@ function requireNative() {
|
|
|
313
320
|
loadErrors.push(e);
|
|
314
321
|
}
|
|
315
322
|
try {
|
|
316
|
-
const binding =
|
|
317
|
-
const bindingPackageVersion =
|
|
323
|
+
const binding = requireNativeBindingPackage("jazz-napi-freebsd-arm64");
|
|
324
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-freebsd-arm64");
|
|
318
325
|
if (
|
|
319
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
326
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
320
327
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
321
328
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
322
329
|
) {
|
|
323
330
|
throw new Error(
|
|
324
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
331
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
325
332
|
);
|
|
326
333
|
}
|
|
327
334
|
return binding;
|
|
@@ -340,15 +347,15 @@ function requireNative() {
|
|
|
340
347
|
loadErrors.push(e);
|
|
341
348
|
}
|
|
342
349
|
try {
|
|
343
|
-
const binding =
|
|
344
|
-
const bindingPackageVersion =
|
|
350
|
+
const binding = requireNativeBindingPackage("jazz-napi-linux-x64-musl");
|
|
351
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-linux-x64-musl");
|
|
345
352
|
if (
|
|
346
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
353
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
347
354
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
348
355
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
349
356
|
) {
|
|
350
357
|
throw new Error(
|
|
351
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
358
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
352
359
|
);
|
|
353
360
|
}
|
|
354
361
|
return binding;
|
|
@@ -362,15 +369,15 @@ function requireNative() {
|
|
|
362
369
|
loadErrors.push(e);
|
|
363
370
|
}
|
|
364
371
|
try {
|
|
365
|
-
const binding =
|
|
366
|
-
const bindingPackageVersion =
|
|
372
|
+
const binding = requireNativeBindingPackage("jazz-napi-linux-x64-gnu");
|
|
373
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-linux-x64-gnu");
|
|
367
374
|
if (
|
|
368
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
375
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
369
376
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
370
377
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
371
378
|
) {
|
|
372
379
|
throw new Error(
|
|
373
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
380
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
374
381
|
);
|
|
375
382
|
}
|
|
376
383
|
return binding;
|
|
@@ -386,15 +393,15 @@ function requireNative() {
|
|
|
386
393
|
loadErrors.push(e);
|
|
387
394
|
}
|
|
388
395
|
try {
|
|
389
|
-
const binding =
|
|
390
|
-
const bindingPackageVersion =
|
|
396
|
+
const binding = requireNativeBindingPackage("jazz-napi-linux-arm64-musl");
|
|
397
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-linux-arm64-musl");
|
|
391
398
|
if (
|
|
392
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
399
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
393
400
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
394
401
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
395
402
|
) {
|
|
396
403
|
throw new Error(
|
|
397
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
404
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
398
405
|
);
|
|
399
406
|
}
|
|
400
407
|
return binding;
|
|
@@ -408,15 +415,15 @@ function requireNative() {
|
|
|
408
415
|
loadErrors.push(e);
|
|
409
416
|
}
|
|
410
417
|
try {
|
|
411
|
-
const binding =
|
|
412
|
-
const bindingPackageVersion =
|
|
418
|
+
const binding = requireNativeBindingPackage("jazz-napi-linux-arm64-gnu");
|
|
419
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-linux-arm64-gnu");
|
|
413
420
|
if (
|
|
414
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
421
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
415
422
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
416
423
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
417
424
|
) {
|
|
418
425
|
throw new Error(
|
|
419
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
426
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
420
427
|
);
|
|
421
428
|
}
|
|
422
429
|
return binding;
|
|
@@ -432,16 +439,17 @@ function requireNative() {
|
|
|
432
439
|
loadErrors.push(e);
|
|
433
440
|
}
|
|
434
441
|
try {
|
|
435
|
-
const binding =
|
|
436
|
-
const bindingPackageVersion =
|
|
437
|
-
|
|
442
|
+
const binding = requireNativeBindingPackage("jazz-napi-linux-arm-musleabihf");
|
|
443
|
+
const bindingPackageVersion = getNativeBindingPackageVersion(
|
|
444
|
+
"jazz-napi-linux-arm-musleabihf",
|
|
445
|
+
);
|
|
438
446
|
if (
|
|
439
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
447
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
440
448
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
441
449
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
442
450
|
) {
|
|
443
451
|
throw new Error(
|
|
444
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
452
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
445
453
|
);
|
|
446
454
|
}
|
|
447
455
|
return binding;
|
|
@@ -455,16 +463,17 @@ function requireNative() {
|
|
|
455
463
|
loadErrors.push(e);
|
|
456
464
|
}
|
|
457
465
|
try {
|
|
458
|
-
const binding =
|
|
459
|
-
const bindingPackageVersion =
|
|
460
|
-
|
|
466
|
+
const binding = requireNativeBindingPackage("jazz-napi-linux-arm-gnueabihf");
|
|
467
|
+
const bindingPackageVersion = getNativeBindingPackageVersion(
|
|
468
|
+
"jazz-napi-linux-arm-gnueabihf",
|
|
469
|
+
);
|
|
461
470
|
if (
|
|
462
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
471
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
463
472
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
464
473
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
465
474
|
) {
|
|
466
475
|
throw new Error(
|
|
467
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
476
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
468
477
|
);
|
|
469
478
|
}
|
|
470
479
|
return binding;
|
|
@@ -480,16 +489,17 @@ function requireNative() {
|
|
|
480
489
|
loadErrors.push(e);
|
|
481
490
|
}
|
|
482
491
|
try {
|
|
483
|
-
const binding =
|
|
484
|
-
const bindingPackageVersion =
|
|
485
|
-
|
|
492
|
+
const binding = requireNativeBindingPackage("jazz-napi-linux-loong64-musl");
|
|
493
|
+
const bindingPackageVersion = getNativeBindingPackageVersion(
|
|
494
|
+
"jazz-napi-linux-loong64-musl",
|
|
495
|
+
);
|
|
486
496
|
if (
|
|
487
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
497
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
488
498
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
489
499
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
490
500
|
) {
|
|
491
501
|
throw new Error(
|
|
492
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
502
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
493
503
|
);
|
|
494
504
|
}
|
|
495
505
|
return binding;
|
|
@@ -503,15 +513,15 @@ function requireNative() {
|
|
|
503
513
|
loadErrors.push(e);
|
|
504
514
|
}
|
|
505
515
|
try {
|
|
506
|
-
const binding =
|
|
507
|
-
const bindingPackageVersion =
|
|
516
|
+
const binding = requireNativeBindingPackage("jazz-napi-linux-loong64-gnu");
|
|
517
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-linux-loong64-gnu");
|
|
508
518
|
if (
|
|
509
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
519
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
510
520
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
511
521
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
512
522
|
) {
|
|
513
523
|
throw new Error(
|
|
514
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
524
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
515
525
|
);
|
|
516
526
|
}
|
|
517
527
|
return binding;
|
|
@@ -527,16 +537,17 @@ function requireNative() {
|
|
|
527
537
|
loadErrors.push(e);
|
|
528
538
|
}
|
|
529
539
|
try {
|
|
530
|
-
const binding =
|
|
531
|
-
const bindingPackageVersion =
|
|
532
|
-
|
|
540
|
+
const binding = requireNativeBindingPackage("jazz-napi-linux-riscv64-musl");
|
|
541
|
+
const bindingPackageVersion = getNativeBindingPackageVersion(
|
|
542
|
+
"jazz-napi-linux-riscv64-musl",
|
|
543
|
+
);
|
|
533
544
|
if (
|
|
534
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
545
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
535
546
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
536
547
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
537
548
|
) {
|
|
538
549
|
throw new Error(
|
|
539
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
550
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
540
551
|
);
|
|
541
552
|
}
|
|
542
553
|
return binding;
|
|
@@ -550,15 +561,15 @@ function requireNative() {
|
|
|
550
561
|
loadErrors.push(e);
|
|
551
562
|
}
|
|
552
563
|
try {
|
|
553
|
-
const binding =
|
|
554
|
-
const bindingPackageVersion =
|
|
564
|
+
const binding = requireNativeBindingPackage("jazz-napi-linux-riscv64-gnu");
|
|
565
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-linux-riscv64-gnu");
|
|
555
566
|
if (
|
|
556
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
567
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
557
568
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
558
569
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
559
570
|
) {
|
|
560
571
|
throw new Error(
|
|
561
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
572
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
562
573
|
);
|
|
563
574
|
}
|
|
564
575
|
return binding;
|
|
@@ -573,15 +584,15 @@ function requireNative() {
|
|
|
573
584
|
loadErrors.push(e);
|
|
574
585
|
}
|
|
575
586
|
try {
|
|
576
|
-
const binding =
|
|
577
|
-
const bindingPackageVersion =
|
|
587
|
+
const binding = requireNativeBindingPackage("jazz-napi-linux-ppc64-gnu");
|
|
588
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-linux-ppc64-gnu");
|
|
578
589
|
if (
|
|
579
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
590
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
580
591
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
581
592
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
582
593
|
) {
|
|
583
594
|
throw new Error(
|
|
584
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
595
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
585
596
|
);
|
|
586
597
|
}
|
|
587
598
|
return binding;
|
|
@@ -595,15 +606,15 @@ function requireNative() {
|
|
|
595
606
|
loadErrors.push(e);
|
|
596
607
|
}
|
|
597
608
|
try {
|
|
598
|
-
const binding =
|
|
599
|
-
const bindingPackageVersion =
|
|
609
|
+
const binding = requireNativeBindingPackage("jazz-napi-linux-s390x-gnu");
|
|
610
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-linux-s390x-gnu");
|
|
600
611
|
if (
|
|
601
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
612
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
602
613
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
603
614
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
604
615
|
) {
|
|
605
616
|
throw new Error(
|
|
606
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
617
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
607
618
|
);
|
|
608
619
|
}
|
|
609
620
|
return binding;
|
|
@@ -621,15 +632,15 @@ function requireNative() {
|
|
|
621
632
|
loadErrors.push(e);
|
|
622
633
|
}
|
|
623
634
|
try {
|
|
624
|
-
const binding =
|
|
625
|
-
const bindingPackageVersion =
|
|
635
|
+
const binding = requireNativeBindingPackage("jazz-napi-openharmony-arm64");
|
|
636
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-openharmony-arm64");
|
|
626
637
|
if (
|
|
627
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
638
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
628
639
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
629
640
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
630
641
|
) {
|
|
631
642
|
throw new Error(
|
|
632
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
643
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
633
644
|
);
|
|
634
645
|
}
|
|
635
646
|
return binding;
|
|
@@ -643,15 +654,15 @@ function requireNative() {
|
|
|
643
654
|
loadErrors.push(e);
|
|
644
655
|
}
|
|
645
656
|
try {
|
|
646
|
-
const binding =
|
|
647
|
-
const bindingPackageVersion =
|
|
657
|
+
const binding = requireNativeBindingPackage("jazz-napi-openharmony-x64");
|
|
658
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-openharmony-x64");
|
|
648
659
|
if (
|
|
649
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
660
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
650
661
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
651
662
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
652
663
|
) {
|
|
653
664
|
throw new Error(
|
|
654
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
665
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
655
666
|
);
|
|
656
667
|
}
|
|
657
668
|
return binding;
|
|
@@ -665,15 +676,15 @@ function requireNative() {
|
|
|
665
676
|
loadErrors.push(e);
|
|
666
677
|
}
|
|
667
678
|
try {
|
|
668
|
-
const binding =
|
|
669
|
-
const bindingPackageVersion =
|
|
679
|
+
const binding = requireNativeBindingPackage("jazz-napi-openharmony-arm");
|
|
680
|
+
const bindingPackageVersion = getNativeBindingPackageVersion("jazz-napi-openharmony-arm");
|
|
670
681
|
if (
|
|
671
|
-
bindingPackageVersion !== "2.0.0-alpha.
|
|
682
|
+
bindingPackageVersion !== "2.0.0-alpha.14" &&
|
|
672
683
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
673
684
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
674
685
|
) {
|
|
675
686
|
throw new Error(
|
|
676
|
-
`Native binding package version mismatch, expected 2.0.0-alpha.
|
|
687
|
+
`Native binding package version mismatch, expected 2.0.0-alpha.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
677
688
|
);
|
|
678
689
|
}
|
|
679
690
|
return binding;
|
|
@@ -705,7 +716,7 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
|
705
716
|
}
|
|
706
717
|
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
707
718
|
try {
|
|
708
|
-
wasiBinding =
|
|
719
|
+
wasiBinding = requireNativeBindingPackage("jazz-napi-wasm32-wasi");
|
|
709
720
|
nativeBinding = wasiBinding;
|
|
710
721
|
} catch (err) {
|
|
711
722
|
if (process.env.NAPI_RS_FORCE_WASI) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jazz-napi",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.16",
|
|
4
4
|
"description": "Native Node.js bindings for Jazz runtime",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@garden-co/jazz-napi-darwin-arm64": "2.0.0-alpha.
|
|
34
|
-
"@garden-co/jazz-napi-darwin-x64": "2.0.0-alpha.
|
|
35
|
-
"@garden-co/jazz-napi-linux-x64-gnu": "2.0.0-alpha.
|
|
36
|
-
"@garden-co/jazz-napi-win32-x64-msvc": "2.0.0-alpha.
|
|
33
|
+
"@garden-co/jazz-napi-darwin-arm64": "2.0.0-alpha.16",
|
|
34
|
+
"@garden-co/jazz-napi-darwin-x64": "2.0.0-alpha.16",
|
|
35
|
+
"@garden-co/jazz-napi-linux-x64-gnu": "2.0.0-alpha.16",
|
|
36
|
+
"@garden-co/jazz-napi-win32-x64-msvc": "2.0.0-alpha.16"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "node scripts/build.js",
|