@gulbanana/jagman 0.0.4 → 0.0.5

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.
Files changed (75) hide show
  1. package/build/client/_app/immutable/chunks/{mmN8a6Tt.js → B_7WxWth.js} +4 -4
  2. package/build/client/_app/immutable/chunks/B_7WxWth.js.br +0 -0
  3. package/build/client/_app/immutable/chunks/B_7WxWth.js.gz +0 -0
  4. package/build/client/_app/immutable/chunks/{C57ZTIzK.js → DI_TEL1_.js} +1 -1
  5. package/build/client/_app/immutable/chunks/DI_TEL1_.js.br +0 -0
  6. package/build/client/_app/immutable/chunks/DI_TEL1_.js.gz +0 -0
  7. package/build/client/_app/immutable/chunks/{C6Hf_r1k.js → DR2981RY.js} +1 -1
  8. package/build/client/_app/immutable/chunks/DR2981RY.js.br +0 -0
  9. package/build/client/_app/immutable/chunks/DR2981RY.js.gz +0 -0
  10. package/build/client/_app/immutable/entry/{app.D3Pfd1WZ.js → app.DJ6nz241.js} +2 -2
  11. package/build/client/_app/immutable/entry/app.DJ6nz241.js.br +0 -0
  12. package/build/client/_app/immutable/entry/app.DJ6nz241.js.gz +0 -0
  13. package/build/client/_app/immutable/entry/start.p5-CWzZE.js +1 -0
  14. package/build/client/_app/immutable/entry/start.p5-CWzZE.js.br +2 -0
  15. package/build/client/_app/immutable/entry/start.p5-CWzZE.js.gz +0 -0
  16. package/build/client/_app/immutable/nodes/{1.CVTE0KMJ.js → 1.rGC48zSJ.js} +1 -1
  17. package/build/client/_app/immutable/nodes/1.rGC48zSJ.js.br +0 -0
  18. package/build/client/_app/immutable/nodes/1.rGC48zSJ.js.gz +0 -0
  19. package/build/client/_app/immutable/nodes/{3.BMY9vsqC.js → 3.BZnulXqY.js} +1 -1
  20. package/build/client/_app/immutable/nodes/3.BZnulXqY.js.br +0 -0
  21. package/build/client/_app/immutable/nodes/3.BZnulXqY.js.gz +0 -0
  22. package/build/client/_app/immutable/nodes/{5.BKKlzK90.js → 5.Dsbf9o0x.js} +1 -1
  23. package/build/client/_app/immutable/nodes/5.Dsbf9o0x.js.br +0 -0
  24. package/build/client/_app/immutable/nodes/5.Dsbf9o0x.js.gz +0 -0
  25. package/build/client/_app/immutable/nodes/{7.NPBm74iK.js → 7.CSXDU1i2.js} +1 -1
  26. package/build/client/_app/immutable/nodes/7.CSXDU1i2.js.br +0 -0
  27. package/build/client/_app/immutable/nodes/7.CSXDU1i2.js.gz +0 -0
  28. package/build/client/_app/version.json +1 -1
  29. package/build/client/_app/version.json.br +0 -0
  30. package/build/client/_app/version.json.gz +0 -0
  31. package/build/server/chunks/{1-CxO4Kzh1.js → 1-B8AXRNnC.js} +2 -2
  32. package/build/server/chunks/{1-CxO4Kzh1.js.map → 1-B8AXRNnC.js.map} +1 -1
  33. package/build/server/chunks/{3-DaJBc6F7.js → 3-CxxbGHnl.js} +2 -2
  34. package/build/server/chunks/{3-DaJBc6F7.js.map → 3-CxxbGHnl.js.map} +1 -1
  35. package/build/server/chunks/{5-D0rLRSEi.js → 5-CxNV54Nt.js} +2 -2
  36. package/build/server/chunks/{5-D0rLRSEi.js.map → 5-CxNV54Nt.js.map} +1 -1
  37. package/build/server/chunks/{7-CD6xIvek.js → 7-Cop1rV-H.js} +4 -4
  38. package/build/server/chunks/{7-CD6xIvek.js.map → 7-Cop1rV-H.js.map} +1 -1
  39. package/build/server/chunks/{8-Ba6HuV9d.js → 8-HMgqsWFj.js} +3 -3
  40. package/build/server/chunks/{8-Ba6HuV9d.js.map → 8-HMgqsWFj.js.map} +1 -1
  41. package/build/server/chunks/{9-EISvo88_.js → 9-Z14qqukZ.js} +3 -3
  42. package/build/server/chunks/{9-EISvo88_.js.map → 9-Z14qqukZ.js.map} +1 -1
  43. package/build/server/chunks/gg-CHIBD3Kn.js +22 -0
  44. package/build/server/chunks/gg-CHIBD3Kn.js.map +1 -0
  45. package/build/server/chunks/{hooks.server-CudKcacr.js → hooks.server-DQjjN2xX.js} +3 -3
  46. package/build/server/chunks/{hooks.server-CudKcacr.js.map → hooks.server-DQjjN2xX.js.map} +1 -1
  47. package/build/server/index.js +2 -2
  48. package/build/server/index.js.map +1 -1
  49. package/build/server/manifest.js +7 -7
  50. package/build/server/manifest.js.map +1 -1
  51. package/index.js +52 -52
  52. package/native/index.js +5 -0
  53. package/native/package.json +6 -0
  54. package/package.json +3 -4
  55. package/build/client/_app/immutable/chunks/C57ZTIzK.js.br +0 -0
  56. package/build/client/_app/immutable/chunks/C57ZTIzK.js.gz +0 -0
  57. package/build/client/_app/immutable/chunks/C6Hf_r1k.js.br +0 -0
  58. package/build/client/_app/immutable/chunks/C6Hf_r1k.js.gz +0 -0
  59. package/build/client/_app/immutable/chunks/mmN8a6Tt.js.br +0 -0
  60. package/build/client/_app/immutable/chunks/mmN8a6Tt.js.gz +0 -0
  61. package/build/client/_app/immutable/entry/app.D3Pfd1WZ.js.br +0 -0
  62. package/build/client/_app/immutable/entry/app.D3Pfd1WZ.js.gz +0 -0
  63. package/build/client/_app/immutable/entry/start.CiamJ-NC.js +0 -1
  64. package/build/client/_app/immutable/entry/start.CiamJ-NC.js.br +0 -2
  65. package/build/client/_app/immutable/entry/start.CiamJ-NC.js.gz +0 -0
  66. package/build/client/_app/immutable/nodes/1.CVTE0KMJ.js.br +0 -3
  67. package/build/client/_app/immutable/nodes/1.CVTE0KMJ.js.gz +0 -0
  68. package/build/client/_app/immutable/nodes/3.BMY9vsqC.js.br +0 -0
  69. package/build/client/_app/immutable/nodes/3.BMY9vsqC.js.gz +0 -0
  70. package/build/client/_app/immutable/nodes/5.BKKlzK90.js.br +0 -0
  71. package/build/client/_app/immutable/nodes/5.BKKlzK90.js.gz +0 -0
  72. package/build/client/_app/immutable/nodes/7.NPBm74iK.js.br +0 -0
  73. package/build/client/_app/immutable/nodes/7.NPBm74iK.js.gz +0 -0
  74. package/build/server/chunks/gg-y7FqUPzd.js +0 -604
  75. package/build/server/chunks/gg-y7FqUPzd.js.map +0 -1
@@ -1,604 +0,0 @@
1
- import { createRequire } from 'node:module';
2
- import { homedir } from 'node:os';
3
-
4
- // prettier-ignore
5
- /* eslint-disable */
6
- // @ts-nocheck
7
- /* auto-generated by NAPI-RS */
8
-
9
- const require$1 = createRequire(import.meta.url);
10
- new URL('.', import.meta.url).pathname;
11
-
12
- const { readFileSync } = require$1('node:fs');
13
- let nativeBinding = null;
14
- const loadErrors = [];
15
-
16
- const isMusl = () => {
17
- let musl = false;
18
- if (process.platform === 'linux') {
19
- musl = isMuslFromFilesystem();
20
- if (musl === null) {
21
- musl = isMuslFromReport();
22
- }
23
- if (musl === null) {
24
- musl = isMuslFromChildProcess();
25
- }
26
- }
27
- return musl
28
- };
29
-
30
- const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-');
31
-
32
- const isMuslFromFilesystem = () => {
33
- try {
34
- return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')
35
- } catch {
36
- return null
37
- }
38
- };
39
-
40
- const isMuslFromReport = () => {
41
- let report = null;
42
- if (typeof process.report?.getReport === 'function') {
43
- process.report.excludeNetwork = true;
44
- report = process.report.getReport();
45
- }
46
- if (!report) {
47
- return null
48
- }
49
- if (report.header && report.header.glibcVersionRuntime) {
50
- return false
51
- }
52
- if (Array.isArray(report.sharedObjects)) {
53
- if (report.sharedObjects.some(isFileMusl)) {
54
- return true
55
- }
56
- }
57
- return false
58
- };
59
-
60
- const isMuslFromChildProcess = () => {
61
- try {
62
- return require$1('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
63
- } catch (e) {
64
- // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
65
- return false
66
- }
67
- };
68
-
69
- function requireNative() {
70
- if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
71
- try {
72
- return require$1(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
73
- } catch (err) {
74
- loadErrors.push(err);
75
- }
76
- } else if (process.platform === 'android') {
77
- if (process.arch === 'arm64') {
78
- try {
79
- return require$1('./libgg.android-arm64.node')
80
- } catch (e) {
81
- loadErrors.push(e);
82
- }
83
- try {
84
- const binding = require$1('@gulbanana/jagman-android-arm64');
85
- const bindingPackageVersion = require$1('@gulbanana/jagman-android-arm64/package.json').version;
86
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
87
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
88
- }
89
- return binding
90
- } catch (e) {
91
- loadErrors.push(e);
92
- }
93
- } else if (process.arch === 'arm') {
94
- try {
95
- return require$1('./libgg.android-arm-eabi.node')
96
- } catch (e) {
97
- loadErrors.push(e);
98
- }
99
- try {
100
- const binding = require$1('@gulbanana/jagman-android-arm-eabi');
101
- const bindingPackageVersion = require$1('@gulbanana/jagman-android-arm-eabi/package.json').version;
102
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
103
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
104
- }
105
- return binding
106
- } catch (e) {
107
- loadErrors.push(e);
108
- }
109
- } else {
110
- loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`));
111
- }
112
- } else if (process.platform === 'win32') {
113
- if (process.arch === 'x64') {
114
- if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') {
115
- try {
116
- return require$1('./libgg.win32-x64-gnu.node')
117
- } catch (e) {
118
- loadErrors.push(e);
119
- }
120
- try {
121
- const binding = require$1('@gulbanana/jagman-win32-x64-gnu');
122
- const bindingPackageVersion = require$1('@gulbanana/jagman-win32-x64-gnu/package.json').version;
123
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
124
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
125
- }
126
- return binding
127
- } catch (e) {
128
- loadErrors.push(e);
129
- }
130
- } else {
131
- try {
132
- return require$1('./libgg.win32-x64-msvc.node')
133
- } catch (e) {
134
- loadErrors.push(e);
135
- }
136
- try {
137
- const binding = require$1('@gulbanana/jagman-win32-x64-msvc');
138
- const bindingPackageVersion = require$1('@gulbanana/jagman-win32-x64-msvc/package.json').version;
139
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
140
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
141
- }
142
- return binding
143
- } catch (e) {
144
- loadErrors.push(e);
145
- }
146
- }
147
- } else if (process.arch === 'ia32') {
148
- try {
149
- return require$1('./libgg.win32-ia32-msvc.node')
150
- } catch (e) {
151
- loadErrors.push(e);
152
- }
153
- try {
154
- const binding = require$1('@gulbanana/jagman-win32-ia32-msvc');
155
- const bindingPackageVersion = require$1('@gulbanana/jagman-win32-ia32-msvc/package.json').version;
156
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
157
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
158
- }
159
- return binding
160
- } catch (e) {
161
- loadErrors.push(e);
162
- }
163
- } else if (process.arch === 'arm64') {
164
- try {
165
- return require$1('./libgg.win32-arm64-msvc.node')
166
- } catch (e) {
167
- loadErrors.push(e);
168
- }
169
- try {
170
- const binding = require$1('@gulbanana/jagman-win32-arm64-msvc');
171
- const bindingPackageVersion = require$1('@gulbanana/jagman-win32-arm64-msvc/package.json').version;
172
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
173
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
174
- }
175
- return binding
176
- } catch (e) {
177
- loadErrors.push(e);
178
- }
179
- } else {
180
- loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`));
181
- }
182
- } else if (process.platform === 'darwin') {
183
- try {
184
- return require$1('./libgg.darwin-universal.node')
185
- } catch (e) {
186
- loadErrors.push(e);
187
- }
188
- try {
189
- const binding = require$1('@gulbanana/jagman-darwin-universal');
190
- const bindingPackageVersion = require$1('@gulbanana/jagman-darwin-universal/package.json').version;
191
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
192
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
193
- }
194
- return binding
195
- } catch (e) {
196
- loadErrors.push(e);
197
- }
198
- if (process.arch === 'x64') {
199
- try {
200
- return require$1('./libgg.darwin-x64.node')
201
- } catch (e) {
202
- loadErrors.push(e);
203
- }
204
- try {
205
- const binding = require$1('@gulbanana/jagman-darwin-x64');
206
- const bindingPackageVersion = require$1('@gulbanana/jagman-darwin-x64/package.json').version;
207
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
208
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
209
- }
210
- return binding
211
- } catch (e) {
212
- loadErrors.push(e);
213
- }
214
- } else if (process.arch === 'arm64') {
215
- try {
216
- return require$1('./libgg.darwin-arm64.node')
217
- } catch (e) {
218
- loadErrors.push(e);
219
- }
220
- try {
221
- const binding = require$1('@gulbanana/jagman-darwin-arm64');
222
- const bindingPackageVersion = require$1('@gulbanana/jagman-darwin-arm64/package.json').version;
223
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
224
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
225
- }
226
- return binding
227
- } catch (e) {
228
- loadErrors.push(e);
229
- }
230
- } else {
231
- loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`));
232
- }
233
- } else if (process.platform === 'freebsd') {
234
- if (process.arch === 'x64') {
235
- try {
236
- return require$1('./libgg.freebsd-x64.node')
237
- } catch (e) {
238
- loadErrors.push(e);
239
- }
240
- try {
241
- const binding = require$1('@gulbanana/jagman-freebsd-x64');
242
- const bindingPackageVersion = require$1('@gulbanana/jagman-freebsd-x64/package.json').version;
243
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
244
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
245
- }
246
- return binding
247
- } catch (e) {
248
- loadErrors.push(e);
249
- }
250
- } else if (process.arch === 'arm64') {
251
- try {
252
- return require$1('./libgg.freebsd-arm64.node')
253
- } catch (e) {
254
- loadErrors.push(e);
255
- }
256
- try {
257
- const binding = require$1('@gulbanana/jagman-freebsd-arm64');
258
- const bindingPackageVersion = require$1('@gulbanana/jagman-freebsd-arm64/package.json').version;
259
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
260
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
261
- }
262
- return binding
263
- } catch (e) {
264
- loadErrors.push(e);
265
- }
266
- } else {
267
- loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
268
- }
269
- } else if (process.platform === 'linux') {
270
- if (process.arch === 'x64') {
271
- if (isMusl()) {
272
- try {
273
- return require$1('./libgg.linux-x64-musl.node')
274
- } catch (e) {
275
- loadErrors.push(e);
276
- }
277
- try {
278
- const binding = require$1('@gulbanana/jagman-linux-x64-musl');
279
- const bindingPackageVersion = require$1('@gulbanana/jagman-linux-x64-musl/package.json').version;
280
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
281
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
282
- }
283
- return binding
284
- } catch (e) {
285
- loadErrors.push(e);
286
- }
287
- } else {
288
- try {
289
- return require$1('./libgg.linux-x64-gnu.node')
290
- } catch (e) {
291
- loadErrors.push(e);
292
- }
293
- try {
294
- const binding = require$1('@gulbanana/jagman-linux-x64-gnu');
295
- const bindingPackageVersion = require$1('@gulbanana/jagman-linux-x64-gnu/package.json').version;
296
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
297
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
298
- }
299
- return binding
300
- } catch (e) {
301
- loadErrors.push(e);
302
- }
303
- }
304
- } else if (process.arch === 'arm64') {
305
- if (isMusl()) {
306
- try {
307
- return require$1('./libgg.linux-arm64-musl.node')
308
- } catch (e) {
309
- loadErrors.push(e);
310
- }
311
- try {
312
- const binding = require$1('@gulbanana/jagman-linux-arm64-musl');
313
- const bindingPackageVersion = require$1('@gulbanana/jagman-linux-arm64-musl/package.json').version;
314
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
315
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
316
- }
317
- return binding
318
- } catch (e) {
319
- loadErrors.push(e);
320
- }
321
- } else {
322
- try {
323
- return require$1('./libgg.linux-arm64-gnu.node')
324
- } catch (e) {
325
- loadErrors.push(e);
326
- }
327
- try {
328
- const binding = require$1('@gulbanana/jagman-linux-arm64-gnu');
329
- const bindingPackageVersion = require$1('@gulbanana/jagman-linux-arm64-gnu/package.json').version;
330
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
331
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
332
- }
333
- return binding
334
- } catch (e) {
335
- loadErrors.push(e);
336
- }
337
- }
338
- } else if (process.arch === 'arm') {
339
- if (isMusl()) {
340
- try {
341
- return require$1('./libgg.linux-arm-musleabihf.node')
342
- } catch (e) {
343
- loadErrors.push(e);
344
- }
345
- try {
346
- const binding = require$1('@gulbanana/jagman-linux-arm-musleabihf');
347
- const bindingPackageVersion = require$1('@gulbanana/jagman-linux-arm-musleabihf/package.json').version;
348
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
349
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
350
- }
351
- return binding
352
- } catch (e) {
353
- loadErrors.push(e);
354
- }
355
- } else {
356
- try {
357
- return require$1('./libgg.linux-arm-gnueabihf.node')
358
- } catch (e) {
359
- loadErrors.push(e);
360
- }
361
- try {
362
- const binding = require$1('@gulbanana/jagman-linux-arm-gnueabihf');
363
- const bindingPackageVersion = require$1('@gulbanana/jagman-linux-arm-gnueabihf/package.json').version;
364
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
365
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
366
- }
367
- return binding
368
- } catch (e) {
369
- loadErrors.push(e);
370
- }
371
- }
372
- } else if (process.arch === 'loong64') {
373
- if (isMusl()) {
374
- try {
375
- return require$1('./libgg.linux-loong64-musl.node')
376
- } catch (e) {
377
- loadErrors.push(e);
378
- }
379
- try {
380
- const binding = require$1('@gulbanana/jagman-linux-loong64-musl');
381
- const bindingPackageVersion = require$1('@gulbanana/jagman-linux-loong64-musl/package.json').version;
382
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
383
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
384
- }
385
- return binding
386
- } catch (e) {
387
- loadErrors.push(e);
388
- }
389
- } else {
390
- try {
391
- return require$1('./libgg.linux-loong64-gnu.node')
392
- } catch (e) {
393
- loadErrors.push(e);
394
- }
395
- try {
396
- const binding = require$1('@gulbanana/jagman-linux-loong64-gnu');
397
- const bindingPackageVersion = require$1('@gulbanana/jagman-linux-loong64-gnu/package.json').version;
398
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
399
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
400
- }
401
- return binding
402
- } catch (e) {
403
- loadErrors.push(e);
404
- }
405
- }
406
- } else if (process.arch === 'riscv64') {
407
- if (isMusl()) {
408
- try {
409
- return require$1('./libgg.linux-riscv64-musl.node')
410
- } catch (e) {
411
- loadErrors.push(e);
412
- }
413
- try {
414
- const binding = require$1('@gulbanana/jagman-linux-riscv64-musl');
415
- const bindingPackageVersion = require$1('@gulbanana/jagman-linux-riscv64-musl/package.json').version;
416
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
417
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
418
- }
419
- return binding
420
- } catch (e) {
421
- loadErrors.push(e);
422
- }
423
- } else {
424
- try {
425
- return require$1('./libgg.linux-riscv64-gnu.node')
426
- } catch (e) {
427
- loadErrors.push(e);
428
- }
429
- try {
430
- const binding = require$1('@gulbanana/jagman-linux-riscv64-gnu');
431
- const bindingPackageVersion = require$1('@gulbanana/jagman-linux-riscv64-gnu/package.json').version;
432
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
433
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
434
- }
435
- return binding
436
- } catch (e) {
437
- loadErrors.push(e);
438
- }
439
- }
440
- } else if (process.arch === 'ppc64') {
441
- try {
442
- return require$1('./libgg.linux-ppc64-gnu.node')
443
- } catch (e) {
444
- loadErrors.push(e);
445
- }
446
- try {
447
- const binding = require$1('@gulbanana/jagman-linux-ppc64-gnu');
448
- const bindingPackageVersion = require$1('@gulbanana/jagman-linux-ppc64-gnu/package.json').version;
449
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
450
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
451
- }
452
- return binding
453
- } catch (e) {
454
- loadErrors.push(e);
455
- }
456
- } else if (process.arch === 's390x') {
457
- try {
458
- return require$1('./libgg.linux-s390x-gnu.node')
459
- } catch (e) {
460
- loadErrors.push(e);
461
- }
462
- try {
463
- const binding = require$1('@gulbanana/jagman-linux-s390x-gnu');
464
- const bindingPackageVersion = require$1('@gulbanana/jagman-linux-s390x-gnu/package.json').version;
465
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
466
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
467
- }
468
- return binding
469
- } catch (e) {
470
- loadErrors.push(e);
471
- }
472
- } else {
473
- loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`));
474
- }
475
- } else if (process.platform === 'openharmony') {
476
- if (process.arch === 'arm64') {
477
- try {
478
- return require$1('./libgg.openharmony-arm64.node')
479
- } catch (e) {
480
- loadErrors.push(e);
481
- }
482
- try {
483
- const binding = require$1('@gulbanana/jagman-openharmony-arm64');
484
- const bindingPackageVersion = require$1('@gulbanana/jagman-openharmony-arm64/package.json').version;
485
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
486
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
487
- }
488
- return binding
489
- } catch (e) {
490
- loadErrors.push(e);
491
- }
492
- } else if (process.arch === 'x64') {
493
- try {
494
- return require$1('./libgg.openharmony-x64.node')
495
- } catch (e) {
496
- loadErrors.push(e);
497
- }
498
- try {
499
- const binding = require$1('@gulbanana/jagman-openharmony-x64');
500
- const bindingPackageVersion = require$1('@gulbanana/jagman-openharmony-x64/package.json').version;
501
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
502
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
503
- }
504
- return binding
505
- } catch (e) {
506
- loadErrors.push(e);
507
- }
508
- } else if (process.arch === 'arm') {
509
- try {
510
- return require$1('./libgg.openharmony-arm.node')
511
- } catch (e) {
512
- loadErrors.push(e);
513
- }
514
- try {
515
- const binding = require$1('@gulbanana/jagman-openharmony-arm');
516
- const bindingPackageVersion = require$1('@gulbanana/jagman-openharmony-arm/package.json').version;
517
- if (bindingPackageVersion !== '0.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
518
- throw new Error(`Native binding package version mismatch, expected 0.0.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
519
- }
520
- return binding
521
- } catch (e) {
522
- loadErrors.push(e);
523
- }
524
- } else {
525
- loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));
526
- }
527
- } else {
528
- loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
529
- }
530
- }
531
-
532
- nativeBinding = requireNative();
533
-
534
- if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
535
- let wasiBinding = null;
536
- let wasiBindingError = null;
537
- try {
538
- wasiBinding = require$1('./libgg.wasi.cjs');
539
- nativeBinding = wasiBinding;
540
- } catch (err) {
541
- if (process.env.NAPI_RS_FORCE_WASI) {
542
- wasiBindingError = err;
543
- }
544
- }
545
- if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
546
- try {
547
- wasiBinding = require$1('@gulbanana/jagman-wasm32-wasi');
548
- nativeBinding = wasiBinding;
549
- } catch (err) {
550
- if (process.env.NAPI_RS_FORCE_WASI) {
551
- if (!wasiBindingError) {
552
- wasiBindingError = err;
553
- } else {
554
- wasiBindingError.cause = err;
555
- }
556
- loadErrors.push(err);
557
- }
558
- }
559
- }
560
- if (process.env.NAPI_RS_FORCE_WASI === 'error' && !wasiBinding) {
561
- const error = new Error('WASI binding not found and NAPI_RS_FORCE_WASI is set to error');
562
- error.cause = wasiBindingError;
563
- throw error
564
- }
565
- }
566
-
567
- if (!nativeBinding) {
568
- if (loadErrors.length > 0) {
569
- throw new Error(
570
- `Cannot find native binding. ` +
571
- `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
572
- 'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
573
- {
574
- cause: loadErrors.reduce((err, cur) => {
575
- cur.cause = err;
576
- return cur
577
- }),
578
- },
579
- )
580
- }
581
- throw new Error(`Failed to load native binding`)
582
- }
583
-
584
- const { startGgWeb: startGgWeb$1, stopAllGgWeb: stopAllGgWeb$1, stopGgWeb } = nativeBinding;
585
-
586
- const HOME = homedir();
587
- function fromDisplayPath(displayPath) {
588
- if (displayPath.startsWith("~")) {
589
- return HOME + displayPath.slice(1);
590
- }
591
- return displayPath;
592
- }
593
- async function startGgWeb(displayPath) {
594
- const fsPath = fromDisplayPath(displayPath);
595
- const port = await startGgWeb$1(fsPath);
596
- return `http://localhost:${port}/log`;
597
- }
598
- function stopAllGgWeb(exceptDisplayPath) {
599
- const exceptFsPath = exceptDisplayPath !== null ? fromDisplayPath(exceptDisplayPath) : void 0;
600
- stopAllGgWeb$1(exceptFsPath);
601
- }
602
-
603
- export { startGgWeb as a, stopAllGgWeb as s };
604
- //# sourceMappingURL=gg-y7FqUPzd.js.map