@graphql-hive/router-query-planner 0.0.1-manual.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -74,33 +74,13 @@ function requireNative() {
74
74
  } else if (process.platform === 'android') {
75
75
  if (process.arch === 'arm64') {
76
76
  try {
77
- return require('./hive_router.android-arm64.node')
78
- } catch (e) {
79
- loadErrors.push(e)
80
- }
81
- try {
82
- const binding = require('@graphql-hive/router-android-arm64')
83
- const bindingPackageVersion = require('@graphql-hive/router-android-arm64/package.json').version
84
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
86
- }
87
- return binding
77
+ return require('./hive_router_query_planner.android-arm64.node')
88
78
  } catch (e) {
89
79
  loadErrors.push(e)
90
80
  }
91
81
  } else if (process.arch === 'arm') {
92
82
  try {
93
- return require('./hive_router.android-arm-eabi.node')
94
- } catch (e) {
95
- loadErrors.push(e)
96
- }
97
- try {
98
- const binding = require('@graphql-hive/router-android-arm-eabi')
99
- const bindingPackageVersion = require('@graphql-hive/router-android-arm-eabi/package.json').version
100
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
102
- }
103
- return binding
83
+ return require('./hive_router_query_planner.android-arm-eabi.node')
104
84
  } catch (e) {
105
85
  loadErrors.push(e)
106
86
  }
@@ -111,66 +91,26 @@ function requireNative() {
111
91
  if (process.arch === 'x64') {
112
92
  if (process.report?.getReport?.()?.header?.osName?.startsWith?.('MINGW')) {
113
93
  try {
114
- return require('./hive_router.win32-x64-gnu.node')
115
- } catch (e) {
116
- loadErrors.push(e)
117
- }
118
- try {
119
- const binding = require('@graphql-hive/router-win32-x64-gnu')
120
- const bindingPackageVersion = require('@graphql-hive/router-win32-x64-gnu/package.json').version
121
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
123
- }
124
- return binding
94
+ return require('./hive_router_query_planner.win32-x64-gnu.node')
125
95
  } catch (e) {
126
96
  loadErrors.push(e)
127
97
  }
128
98
  } else {
129
99
  try {
130
- return require('./hive_router.win32-x64-msvc.node')
131
- } catch (e) {
132
- loadErrors.push(e)
133
- }
134
- try {
135
- const binding = require('@graphql-hive/router-win32-x64-msvc')
136
- const bindingPackageVersion = require('@graphql-hive/router-win32-x64-msvc/package.json').version
137
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
139
- }
140
- return binding
100
+ return require('./hive_router_query_planner.win32-x64-msvc.node')
141
101
  } catch (e) {
142
102
  loadErrors.push(e)
143
103
  }
144
104
  }
145
105
  } else if (process.arch === 'ia32') {
146
106
  try {
147
- return require('./hive_router.win32-ia32-msvc.node')
148
- } catch (e) {
149
- loadErrors.push(e)
150
- }
151
- try {
152
- const binding = require('@graphql-hive/router-win32-ia32-msvc')
153
- const bindingPackageVersion = require('@graphql-hive/router-win32-ia32-msvc/package.json').version
154
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
156
- }
157
- return binding
107
+ return require('./hive_router_query_planner.win32-ia32-msvc.node')
158
108
  } catch (e) {
159
109
  loadErrors.push(e)
160
110
  }
161
111
  } else if (process.arch === 'arm64') {
162
112
  try {
163
- return require('./hive_router.win32-arm64-msvc.node')
164
- } catch (e) {
165
- loadErrors.push(e)
166
- }
167
- try {
168
- const binding = require('@graphql-hive/router-win32-arm64-msvc')
169
- const bindingPackageVersion = require('@graphql-hive/router-win32-arm64-msvc/package.json').version
170
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
172
- }
173
- return binding
113
+ return require('./hive_router_query_planner.win32-arm64-msvc.node')
174
114
  } catch (e) {
175
115
  loadErrors.push(e)
176
116
  }
@@ -179,49 +119,19 @@ function requireNative() {
179
119
  }
180
120
  } else if (process.platform === 'darwin') {
181
121
  try {
182
- return require('./hive_router.darwin-universal.node')
183
- } catch (e) {
184
- loadErrors.push(e)
185
- }
186
- try {
187
- const binding = require('@graphql-hive/router-darwin-universal')
188
- const bindingPackageVersion = require('@graphql-hive/router-darwin-universal/package.json').version
189
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
191
- }
192
- return binding
122
+ return require('./hive_router_query_planner.darwin-universal.node')
193
123
  } catch (e) {
194
124
  loadErrors.push(e)
195
125
  }
196
126
  if (process.arch === 'x64') {
197
127
  try {
198
- return require('./hive_router.darwin-x64.node')
199
- } catch (e) {
200
- loadErrors.push(e)
201
- }
202
- try {
203
- const binding = require('@graphql-hive/router-darwin-x64')
204
- const bindingPackageVersion = require('@graphql-hive/router-darwin-x64/package.json').version
205
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
207
- }
208
- return binding
128
+ return require('./hive_router_query_planner.darwin-x64.node')
209
129
  } catch (e) {
210
130
  loadErrors.push(e)
211
131
  }
212
132
  } else if (process.arch === 'arm64') {
213
133
  try {
214
- return require('./hive_router.darwin-arm64.node')
215
- } catch (e) {
216
- loadErrors.push(e)
217
- }
218
- try {
219
- const binding = require('@graphql-hive/router-darwin-arm64')
220
- const bindingPackageVersion = require('@graphql-hive/router-darwin-arm64/package.json').version
221
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
223
- }
224
- return binding
134
+ return require('./hive_router_query_planner.darwin-arm64.node')
225
135
  } catch (e) {
226
136
  loadErrors.push(e)
227
137
  }
@@ -231,33 +141,13 @@ function requireNative() {
231
141
  } else if (process.platform === 'freebsd') {
232
142
  if (process.arch === 'x64') {
233
143
  try {
234
- return require('./hive_router.freebsd-x64.node')
235
- } catch (e) {
236
- loadErrors.push(e)
237
- }
238
- try {
239
- const binding = require('@graphql-hive/router-freebsd-x64')
240
- const bindingPackageVersion = require('@graphql-hive/router-freebsd-x64/package.json').version
241
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
243
- }
244
- return binding
144
+ return require('./hive_router_query_planner.freebsd-x64.node')
245
145
  } catch (e) {
246
146
  loadErrors.push(e)
247
147
  }
248
148
  } else if (process.arch === 'arm64') {
249
149
  try {
250
- return require('./hive_router.freebsd-arm64.node')
251
- } catch (e) {
252
- loadErrors.push(e)
253
- }
254
- try {
255
- const binding = require('@graphql-hive/router-freebsd-arm64')
256
- const bindingPackageVersion = require('@graphql-hive/router-freebsd-arm64/package.json').version
257
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
259
- }
260
- return binding
150
+ return require('./hive_router_query_planner.freebsd-arm64.node')
261
151
  } catch (e) {
262
152
  loadErrors.push(e)
263
153
  }
@@ -268,33 +158,13 @@ function requireNative() {
268
158
  if (process.arch === 'x64') {
269
159
  if (isMusl()) {
270
160
  try {
271
- return require('./hive_router.linux-x64-musl.node')
272
- } catch (e) {
273
- loadErrors.push(e)
274
- }
275
- try {
276
- const binding = require('@graphql-hive/router-linux-x64-musl')
277
- const bindingPackageVersion = require('@graphql-hive/router-linux-x64-musl/package.json').version
278
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
280
- }
281
- return binding
161
+ return require('./hive_router_query_planner.linux-x64-musl.node')
282
162
  } catch (e) {
283
163
  loadErrors.push(e)
284
164
  }
285
165
  } else {
286
166
  try {
287
- return require('./hive_router.linux-x64-gnu.node')
288
- } catch (e) {
289
- loadErrors.push(e)
290
- }
291
- try {
292
- const binding = require('@graphql-hive/router-linux-x64-gnu')
293
- const bindingPackageVersion = require('@graphql-hive/router-linux-x64-gnu/package.json').version
294
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
296
- }
297
- return binding
167
+ return require('./hive_router_query_planner.linux-x64-gnu.node')
298
168
  } catch (e) {
299
169
  loadErrors.push(e)
300
170
  }
@@ -302,33 +172,13 @@ function requireNative() {
302
172
  } else if (process.arch === 'arm64') {
303
173
  if (isMusl()) {
304
174
  try {
305
- return require('./hive_router.linux-arm64-musl.node')
306
- } catch (e) {
307
- loadErrors.push(e)
308
- }
309
- try {
310
- const binding = require('@graphql-hive/router-linux-arm64-musl')
311
- const bindingPackageVersion = require('@graphql-hive/router-linux-arm64-musl/package.json').version
312
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
314
- }
315
- return binding
175
+ return require('./hive_router_query_planner.linux-arm64-musl.node')
316
176
  } catch (e) {
317
177
  loadErrors.push(e)
318
178
  }
319
179
  } else {
320
180
  try {
321
- return require('./hive_router.linux-arm64-gnu.node')
322
- } catch (e) {
323
- loadErrors.push(e)
324
- }
325
- try {
326
- const binding = require('@graphql-hive/router-linux-arm64-gnu')
327
- const bindingPackageVersion = require('@graphql-hive/router-linux-arm64-gnu/package.json').version
328
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
330
- }
331
- return binding
181
+ return require('./hive_router_query_planner.linux-arm64-gnu.node')
332
182
  } catch (e) {
333
183
  loadErrors.push(e)
334
184
  }
@@ -336,33 +186,13 @@ function requireNative() {
336
186
  } else if (process.arch === 'arm') {
337
187
  if (isMusl()) {
338
188
  try {
339
- return require('./hive_router.linux-arm-musleabihf.node')
340
- } catch (e) {
341
- loadErrors.push(e)
342
- }
343
- try {
344
- const binding = require('@graphql-hive/router-linux-arm-musleabihf')
345
- const bindingPackageVersion = require('@graphql-hive/router-linux-arm-musleabihf/package.json').version
346
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
348
- }
349
- return binding
189
+ return require('./hive_router_query_planner.linux-arm-musleabihf.node')
350
190
  } catch (e) {
351
191
  loadErrors.push(e)
352
192
  }
353
193
  } else {
354
194
  try {
355
- return require('./hive_router.linux-arm-gnueabihf.node')
356
- } catch (e) {
357
- loadErrors.push(e)
358
- }
359
- try {
360
- const binding = require('@graphql-hive/router-linux-arm-gnueabihf')
361
- const bindingPackageVersion = require('@graphql-hive/router-linux-arm-gnueabihf/package.json').version
362
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
364
- }
365
- return binding
195
+ return require('./hive_router_query_planner.linux-arm-gnueabihf.node')
366
196
  } catch (e) {
367
197
  loadErrors.push(e)
368
198
  }
@@ -370,33 +200,13 @@ function requireNative() {
370
200
  } else if (process.arch === 'loong64') {
371
201
  if (isMusl()) {
372
202
  try {
373
- return require('./hive_router.linux-loong64-musl.node')
374
- } catch (e) {
375
- loadErrors.push(e)
376
- }
377
- try {
378
- const binding = require('@graphql-hive/router-linux-loong64-musl')
379
- const bindingPackageVersion = require('@graphql-hive/router-linux-loong64-musl/package.json').version
380
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
382
- }
383
- return binding
203
+ return require('./hive_router_query_planner.linux-loong64-musl.node')
384
204
  } catch (e) {
385
205
  loadErrors.push(e)
386
206
  }
387
207
  } else {
388
208
  try {
389
- return require('./hive_router.linux-loong64-gnu.node')
390
- } catch (e) {
391
- loadErrors.push(e)
392
- }
393
- try {
394
- const binding = require('@graphql-hive/router-linux-loong64-gnu')
395
- const bindingPackageVersion = require('@graphql-hive/router-linux-loong64-gnu/package.json').version
396
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
398
- }
399
- return binding
209
+ return require('./hive_router_query_planner.linux-loong64-gnu.node')
400
210
  } catch (e) {
401
211
  loadErrors.push(e)
402
212
  }
@@ -404,66 +214,26 @@ function requireNative() {
404
214
  } else if (process.arch === 'riscv64') {
405
215
  if (isMusl()) {
406
216
  try {
407
- return require('./hive_router.linux-riscv64-musl.node')
408
- } catch (e) {
409
- loadErrors.push(e)
410
- }
411
- try {
412
- const binding = require('@graphql-hive/router-linux-riscv64-musl')
413
- const bindingPackageVersion = require('@graphql-hive/router-linux-riscv64-musl/package.json').version
414
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
416
- }
417
- return binding
217
+ return require('./hive_router_query_planner.linux-riscv64-musl.node')
418
218
  } catch (e) {
419
219
  loadErrors.push(e)
420
220
  }
421
221
  } else {
422
222
  try {
423
- return require('./hive_router.linux-riscv64-gnu.node')
424
- } catch (e) {
425
- loadErrors.push(e)
426
- }
427
- try {
428
- const binding = require('@graphql-hive/router-linux-riscv64-gnu')
429
- const bindingPackageVersion = require('@graphql-hive/router-linux-riscv64-gnu/package.json').version
430
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
432
- }
433
- return binding
223
+ return require('./hive_router_query_planner.linux-riscv64-gnu.node')
434
224
  } catch (e) {
435
225
  loadErrors.push(e)
436
226
  }
437
227
  }
438
228
  } else if (process.arch === 'ppc64') {
439
229
  try {
440
- return require('./hive_router.linux-ppc64-gnu.node')
441
- } catch (e) {
442
- loadErrors.push(e)
443
- }
444
- try {
445
- const binding = require('@graphql-hive/router-linux-ppc64-gnu')
446
- const bindingPackageVersion = require('@graphql-hive/router-linux-ppc64-gnu/package.json').version
447
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
449
- }
450
- return binding
230
+ return require('./hive_router_query_planner.linux-ppc64-gnu.node')
451
231
  } catch (e) {
452
232
  loadErrors.push(e)
453
233
  }
454
234
  } else if (process.arch === 's390x') {
455
235
  try {
456
- return require('./hive_router.linux-s390x-gnu.node')
457
- } catch (e) {
458
- loadErrors.push(e)
459
- }
460
- try {
461
- const binding = require('@graphql-hive/router-linux-s390x-gnu')
462
- const bindingPackageVersion = require('@graphql-hive/router-linux-s390x-gnu/package.json').version
463
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
465
- }
466
- return binding
236
+ return require('./hive_router_query_planner.linux-s390x-gnu.node')
467
237
  } catch (e) {
468
238
  loadErrors.push(e)
469
239
  }
@@ -473,49 +243,19 @@ function requireNative() {
473
243
  } else if (process.platform === 'openharmony') {
474
244
  if (process.arch === 'arm64') {
475
245
  try {
476
- return require('./hive_router.openharmony-arm64.node')
477
- } catch (e) {
478
- loadErrors.push(e)
479
- }
480
- try {
481
- const binding = require('@graphql-hive/router-openharmony-arm64')
482
- const bindingPackageVersion = require('@graphql-hive/router-openharmony-arm64/package.json').version
483
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
485
- }
486
- return binding
246
+ return require('./hive_router_query_planner.openharmony-arm64.node')
487
247
  } catch (e) {
488
248
  loadErrors.push(e)
489
249
  }
490
250
  } else if (process.arch === 'x64') {
491
251
  try {
492
- return require('./hive_router.openharmony-x64.node')
493
- } catch (e) {
494
- loadErrors.push(e)
495
- }
496
- try {
497
- const binding = require('@graphql-hive/router-openharmony-x64')
498
- const bindingPackageVersion = require('@graphql-hive/router-openharmony-x64/package.json').version
499
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
501
- }
502
- return binding
252
+ return require('./hive_router_query_planner.openharmony-x64.node')
503
253
  } catch (e) {
504
254
  loadErrors.push(e)
505
255
  }
506
256
  } else if (process.arch === 'arm') {
507
257
  try {
508
- return require('./hive_router.openharmony-arm.node')
509
- } catch (e) {
510
- loadErrors.push(e)
511
- }
512
- try {
513
- const binding = require('@graphql-hive/router-openharmony-arm')
514
- const bindingPackageVersion = require('@graphql-hive/router-openharmony-arm/package.json').version
515
- if (bindingPackageVersion !== '0.0.0' && 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.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
517
- }
518
- return binding
258
+ return require('./hive_router_query_planner.openharmony-arm.node')
519
259
  } catch (e) {
520
260
  loadErrors.push(e)
521
261
  }
@@ -533,24 +273,13 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
533
273
  let wasiBinding = null
534
274
  let wasiBindingError = null
535
275
  try {
536
- wasiBinding = require('./hive_router.wasi.cjs')
276
+ wasiBinding = require('./hive_router_query_planner.wasi.cjs')
537
277
  nativeBinding = wasiBinding
538
278
  } catch (err) {
539
279
  if (process.env.NAPI_RS_FORCE_WASI) {
540
280
  wasiBindingError = err
541
281
  }
542
282
  }
543
- if (!nativeBinding) {
544
- try {
545
- wasiBinding = require('@graphql-hive/router-wasm32-wasi')
546
- nativeBinding = wasiBinding
547
- } catch (err) {
548
- if (process.env.NAPI_RS_FORCE_WASI) {
549
- wasiBindingError.cause = err
550
- loadErrors.push(err)
551
- }
552
- }
553
- }
554
283
  if (process.env.NAPI_RS_FORCE_WASI === 'error' && !wasiBinding) {
555
284
  const error = new Error('WASI binding not found and NAPI_RS_FORCE_WASI is set to error')
556
285
  error.cause = wasiBindingError
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-hive/router-query-planner",
3
- "version": "0.0.1-manual.1",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "repository": {
14
14
  "type": "git",
15
- "url": "https://github.com/graphql-hive/router.git",
15
+ "url": "git+https://github.com/graphql-hive/router.git",
16
16
  "directory": "lib/node-addon"
17
17
  },
18
18
  "homepage": "https://the-guild.dev/graphql/hive/docs/router",
@@ -26,7 +26,7 @@
26
26
  "access": "public"
27
27
  },
28
28
  "napi": {
29
- "binaryName": "hive_router",
29
+ "binaryName": "hive_router_query_planner",
30
30
  "targets": [
31
31
  "aarch64-unknown-linux-gnu",
32
32
  "x86_64-unknown-linux-gnu",
@@ -47,4 +47,4 @@
47
47
  "devDependencies": {
48
48
  "@napi-rs/cli": "^3.2.0"
49
49
  }
50
- }
50
+ }
Binary file
Binary file