@visulima/vis 1.0.0-alpha.37 → 1.0.0-alpha.39
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/CHANGELOG.md +12 -0
- package/LICENSE.md +1 -503
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/config/index.d.ts +7 -0
- package/dist/packem_chunks/DEFAULT_CLEAN_KEEP.js +1 -0
- package/dist/packem_chunks/bin.js +302 -515
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/catalog-detector.js +1 -0
- package/dist/packem_chunks/detect.js +3 -0
- package/dist/packem_chunks/detect2.js +8 -0
- package/dist/packem_chunks/discord.js +4 -0
- package/dist/packem_chunks/dynamic-import.js +1 -0
- package/dist/packem_chunks/extra-files.js +3 -0
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/git.js +3 -0
- package/dist/packem_chunks/handler10.js +1 -1
- package/dist/packem_chunks/handler12.js +1 -1
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler17.js +1 -1
- package/dist/packem_chunks/handler18.js +1 -1
- package/dist/packem_chunks/handler19.js +1 -1
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler3.js +4 -4
- package/dist/packem_chunks/handler30.js +2 -7
- package/dist/packem_chunks/handler31.js +2 -33
- package/dist/packem_chunks/handler32.js +2 -3
- package/dist/packem_chunks/handler33.js +3 -8
- package/dist/packem_chunks/handler34.js +6 -4
- package/dist/packem_chunks/handler35.js +1 -1
- package/dist/packem_chunks/handler36.js +42 -5
- package/dist/packem_chunks/handler37.js +8 -11
- package/dist/packem_chunks/handler38.js +9 -3
- package/dist/packem_chunks/handler39.js +74 -21
- package/dist/packem_chunks/handler4.js +1 -1
- package/dist/packem_chunks/handler40.js +5 -61
- package/dist/packem_chunks/handler41.js +4 -3
- package/dist/packem_chunks/handler42.js +3 -6
- package/dist/packem_chunks/handler43.js +2 -24
- package/dist/packem_chunks/handler44.js +1 -25
- package/dist/packem_chunks/handler45.js +1 -153
- package/dist/packem_chunks/handler46.js +1 -10
- package/dist/packem_chunks/handler47.js +3 -24
- package/dist/packem_chunks/handler48.js +1 -322
- package/dist/packem_chunks/handler49.js +7 -708
- package/dist/packem_chunks/handler5.js +6 -6
- package/dist/packem_chunks/handler50.js +33 -48
- package/dist/packem_chunks/handler51.js +3 -27
- package/dist/packem_chunks/handler52.js +8 -3
- package/dist/packem_chunks/handler53.js +4 -200
- package/dist/packem_chunks/handler54.js +1 -38
- package/dist/packem_chunks/handler55.js +12 -0
- package/dist/packem_chunks/handler56.js +7 -0
- package/dist/packem_chunks/handler57.js +5 -0
- package/dist/packem_chunks/handler58.js +11 -0
- package/dist/packem_chunks/handler59.js +3 -0
- package/dist/packem_chunks/handler60.js +22 -0
- package/dist/packem_chunks/handler61.js +61 -0
- package/dist/packem_chunks/handler62.js +3 -0
- package/dist/packem_chunks/handler63.js +6 -0
- package/dist/packem_chunks/handler64.js +708 -0
- package/dist/packem_chunks/handler65.js +24 -0
- package/dist/packem_chunks/handler66.js +25 -0
- package/dist/packem_chunks/handler67.js +153 -0
- package/dist/packem_chunks/handler68.js +10 -0
- package/dist/packem_chunks/handler69.js +24 -0
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler70.js +322 -0
- package/dist/packem_chunks/handler71.js +48 -0
- package/dist/packem_chunks/handler72.js +27 -0
- package/dist/packem_chunks/handler73.js +3 -0
- package/dist/packem_chunks/handler74.js +190 -0
- package/dist/packem_chunks/handler75.js +38 -0
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/handler9.js +1 -1
- package/dist/packem_chunks/heal-accept.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/index.js +1 -7
- package/dist/packem_chunks/index2.js +7 -0
- package/dist/packem_chunks/interface.js +2 -0
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/list.js +1 -1
- package/dist/packem_chunks/loader.js +1 -1
- package/dist/packem_chunks/orchestrator.js +39 -0
- package/dist/packem_chunks/pre-mode.js +2 -0
- package/dist/packem_chunks/print-config.js +2 -0
- package/dist/packem_chunks/prompts.js +7 -0
- package/dist/packem_chunks/publish-guards.js +1 -0
- package/dist/packem_chunks/registry.js +48 -0
- package/dist/packem_chunks/resolveFormatter.js +9 -0
- package/dist/packem_chunks/security.js +1 -0
- package/dist/packem_chunks/shell-runner.js +1 -0
- package/dist/packem_chunks/slack.js +2 -0
- package/dist/packem_chunks/snapshot.js +2 -0
- package/dist/packem_chunks/stage-publisher.js +1 -0
- package/dist/packem_chunks/staged-registry.js +2 -0
- package/dist/packem_chunks/state.js +3 -0
- package/dist/packem_chunks/success-walk.js +8 -0
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/sync2.js +1 -1
- package/dist/packem_chunks/tripwire.js +1 -1
- package/dist/packem_chunks/verify-lockfile.js +2 -2
- package/dist/packem_chunks/version-resolver.js +2 -0
- package/dist/packem_chunks/webhook.js +1 -0
- package/dist/packem_chunks/workflow-templates.js +167 -0
- package/dist/packem_chunks/workspace.js +2 -0
- package/dist/packem_shared/AfterAllProjectsVersioned-CAKI2nWf.js +1 -0
- package/dist/packem_shared/ReleaseClient-YHzBIxYS.js +1 -0
- package/dist/packem_shared/VisReleaseError-DMGRBTNO.js +1 -0
- package/dist/packem_shared/{ai-analysis-DT3bU-_M.js → ai-analysis-K-DKU3ZA.js} +1 -1
- package/dist/packem_shared/{ai-fix-BkNqd5nP.js → ai-fix-BPrYoCk8.js} +1 -1
- package/dist/packem_shared/api.d-BPftyU9r.d.ts +27 -0
- package/dist/packem_shared/createAdapter-bU4DIP3F.js +1 -0
- package/dist/packem_shared/createVersionActions-BK43SNDH.js +1 -0
- package/dist/packem_shared/{cyclonedx-86-DbHtf.js → cyclonedx-kYozDyxp.js} +3 -3
- package/dist/packem_shared/defineFormatter-D5dCp6Kv.js +1 -0
- package/dist/packem_shared/dependency-scan-anTuZB1t.js +1 -0
- package/dist/packem_shared/{docker-tNrDU3oK.js → docker-BMLrNtWm.js} +1 -1
- package/dist/packem_shared/{failure-log-Dwqt6_Ga.js → failure-log-CEWP3bP0.js} +1 -1
- package/dist/packem_shared/{index-dQ37x8_P.js → index-B4RYu87L.js} +1 -1
- package/dist/packem_shared/index-BJbpNthk.js +1 -0
- package/dist/packem_shared/index-CgcF6_wo.js +1 -0
- package/dist/packem_shared/interface.d-B7VK2rcH.d.ts +148 -0
- package/dist/packem_shared/interface.d-Cezzifoh.d.ts +106 -0
- package/dist/packem_shared/{missing-package-json-41VUWFBY.js → missing-package-json-BfWUxTGv.js} +1 -1
- package/dist/packem_shared/{native-config-sync-BKAZ0NIs.js → native-config-sync-BEkJW7g3.js} +8 -8
- package/dist/packem_shared/pm-runner-OGResYrA.js +1 -0
- package/dist/packem_shared/provenance-_CJjMKwu.js +1 -0
- package/dist/packem_shared/public-api-WqUCiyIe.js +131 -0
- package/dist/packem_shared/{registry-keys-Bf2zzlcZ.js → registry-keys-BfFto6vI.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-jH0RKyMJ.js → resolve-explicit-CMDl55Nz.js} +2 -2
- package/dist/packem_shared/s1ngularity-Dhr3bPk0.js +1 -0
- package/dist/packem_shared/{scan-progress-JBbd9QeT.js → scan-progress-DG7_JmTV.js} +1 -1
- package/dist/packem_shared/{signatures-D1H6h6GH.js → signatures-C730vkyK.js} +2 -2
- package/dist/packem_shared/slug-DoueYuLo.js +1 -0
- package/dist/packem_shared/spinner-CV3WVJLv.js +1 -0
- package/dist/packem_shared/sticky-comment-D6_7-w8T.js +1 -0
- package/dist/packem_shared/{tabs-BqUepRaD.js → tabs-BuTy5gPV.js} +1 -1
- package/dist/packem_shared/{typosquats-C8qg1neE.js → typosquats-DN78xx1x.js} +1 -1
- package/dist/packem_shared/use-measured-height-_eVGWtWt.js +1 -0
- package/dist/packem_shared/verify-6WCmFmy8.js +1 -0
- package/dist/packem_shared/{vis-update-app-CTwRkNgj.js → vis-update-app-k3fDxech.js} +1 -1
- package/dist/release/core/changelog/index.d.ts +5 -0
- package/dist/release/core/changelog/index.js +1 -0
- package/dist/release/core/package-managers/index.d.ts +6 -0
- package/dist/release/core/package-managers/index.js +1 -0
- package/dist/release/core/version-actions/index.d.ts +14 -0
- package/dist/release/core/version-actions/index.js +1 -0
- package/dist/release/index.d.ts +196 -0
- package/dist/release/index.js +1 -0
- package/dist/release/plugin-sdk.d.ts +127 -0
- package/dist/release/plugin-sdk.js +1 -0
- package/dist/release/presets.d.ts +225 -0
- package/dist/release/presets.js +1 -0
- package/dist/release/types.d.ts +1377 -0
- package/dist/release/types.js +1 -0
- package/index.js +578 -752
- package/package.json +52 -10
- package/schemas/vis-config.schema.json +1394 -6
- package/schemas/vis-release-config.schema.json +1390 -0
- package/dist/packem_shared/dependency-scan-BDTH898x.js +0 -1
- package/dist/packem_shared/index-CB4p298r.js +0 -1
- package/dist/packem_shared/index-DMefdF51.js +0 -1
- package/dist/packem_shared/pm-runner-pVihAfxV.js +0 -1
- package/dist/packem_shared/provenance-DMuEftgc.js +0 -1
- package/dist/packem_shared/s1ngularity-BkfgC6NO.js +0 -1
- package/dist/packem_shared/spinner-BXSl864p.js +0 -1
- package/dist/packem_shared/use-measured-height-BBJ9intr.js +0 -1
- package/dist/packem_shared/verify-Du7xZ2BJ.js +0 -1
package/index.js
CHANGED
|
@@ -4,794 +4,620 @@
|
|
|
4
4
|
/* auto-generated by NAPI-RS */
|
|
5
5
|
|
|
6
6
|
import { createRequire } from 'node:module'
|
|
7
|
-
const require = createRequire(import.meta.url)
|
|
8
|
-
const __dirname = new URL(
|
|
7
|
+
const require = createRequire(import.meta.url)
|
|
8
|
+
const __dirname = new URL('.', import.meta.url).pathname
|
|
9
9
|
|
|
10
|
-
const { readFileSync } = require(
|
|
11
|
-
let nativeBinding = null
|
|
12
|
-
const loadErrors = []
|
|
10
|
+
const { readFileSync } = require('node:fs')
|
|
11
|
+
let nativeBinding = null
|
|
12
|
+
const loadErrors = []
|
|
13
13
|
|
|
14
14
|
const isMusl = () => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
if (musl === null) {
|
|
22
|
-
musl = isMuslFromChildProcess();
|
|
23
|
-
}
|
|
15
|
+
let musl = false
|
|
16
|
+
if (process.platform === 'linux') {
|
|
17
|
+
musl = isMuslFromFilesystem()
|
|
18
|
+
if (musl === null) {
|
|
19
|
+
musl = isMuslFromReport()
|
|
24
20
|
}
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
if (musl === null) {
|
|
22
|
+
musl = isMuslFromChildProcess()
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return musl
|
|
26
|
+
}
|
|
27
27
|
|
|
28
|
-
const isFileMusl = (f) => f.includes(
|
|
28
|
+
const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-')
|
|
29
29
|
|
|
30
30
|
const isMuslFromFilesystem = () => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
31
|
+
try {
|
|
32
|
+
return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')
|
|
33
|
+
} catch {
|
|
34
|
+
return null
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
37
|
|
|
38
38
|
const isMuslFromReport = () => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
let report = null
|
|
40
|
+
if (typeof process.report?.getReport === 'function') {
|
|
41
|
+
process.report.excludeNetwork = true
|
|
42
|
+
report = process.report.getReport()
|
|
43
|
+
}
|
|
44
|
+
if (!report) {
|
|
45
|
+
return null
|
|
46
|
+
}
|
|
47
|
+
if (report.header && report.header.glibcVersionRuntime) {
|
|
48
|
+
return false
|
|
49
|
+
}
|
|
50
|
+
if (Array.isArray(report.sharedObjects)) {
|
|
51
|
+
if (report.sharedObjects.some(isFileMusl)) {
|
|
52
|
+
return true
|
|
43
53
|
}
|
|
44
|
-
|
|
45
|
-
|
|
54
|
+
}
|
|
55
|
+
return false
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const isMuslFromChildProcess = () => {
|
|
59
|
+
try {
|
|
60
|
+
return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
|
|
61
|
+
} catch (e) {
|
|
62
|
+
// If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
|
|
63
|
+
return false
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function requireNative() {
|
|
68
|
+
if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
|
|
69
|
+
try {
|
|
70
|
+
return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
|
|
71
|
+
} catch (err) {
|
|
72
|
+
loadErrors.push(err)
|
|
46
73
|
}
|
|
47
|
-
|
|
48
|
-
|
|
74
|
+
} else if (process.platform === 'android') {
|
|
75
|
+
if (process.arch === 'arm64') {
|
|
76
|
+
try {
|
|
77
|
+
return require('./vis-native.android-arm64.node')
|
|
78
|
+
} catch (e) {
|
|
79
|
+
loadErrors.push(e)
|
|
80
|
+
}
|
|
81
|
+
try {
|
|
82
|
+
const binding = require('@visulima/vis-binding-android-arm64')
|
|
83
|
+
const bindingPackageVersion = require('@visulima/vis-binding-android-arm64/package.json').version
|
|
84
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
85
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
86
|
+
}
|
|
87
|
+
return binding
|
|
88
|
+
} catch (e) {
|
|
89
|
+
loadErrors.push(e)
|
|
90
|
+
}
|
|
91
|
+
} else if (process.arch === 'arm') {
|
|
92
|
+
try {
|
|
93
|
+
return require('./vis-native.android-arm-eabi.node')
|
|
94
|
+
} catch (e) {
|
|
95
|
+
loadErrors.push(e)
|
|
96
|
+
}
|
|
97
|
+
try {
|
|
98
|
+
const binding = require('@visulima/vis-binding-android-arm-eabi')
|
|
99
|
+
const bindingPackageVersion = require('@visulima/vis-binding-android-arm-eabi/package.json').version
|
|
100
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
101
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
102
|
+
}
|
|
103
|
+
return binding
|
|
104
|
+
} catch (e) {
|
|
105
|
+
loadErrors.push(e)
|
|
106
|
+
}
|
|
107
|
+
} else {
|
|
108
|
+
loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`))
|
|
49
109
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
110
|
+
} else if (process.platform === 'win32') {
|
|
111
|
+
if (process.arch === 'x64') {
|
|
112
|
+
if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') {
|
|
113
|
+
try {
|
|
114
|
+
return require('./vis-native.win32-x64-gnu.node')
|
|
115
|
+
} catch (e) {
|
|
116
|
+
loadErrors.push(e)
|
|
117
|
+
}
|
|
118
|
+
try {
|
|
119
|
+
const binding = require('@visulima/vis-binding-win32-x64-gnu')
|
|
120
|
+
const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-gnu/package.json').version
|
|
121
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
122
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
123
|
+
}
|
|
124
|
+
return binding
|
|
125
|
+
} catch (e) {
|
|
126
|
+
loadErrors.push(e)
|
|
127
|
+
}
|
|
128
|
+
} else {
|
|
129
|
+
try {
|
|
130
|
+
return require('./vis-native.win32-x64-msvc.node')
|
|
131
|
+
} catch (e) {
|
|
132
|
+
loadErrors.push(e)
|
|
133
|
+
}
|
|
134
|
+
try {
|
|
135
|
+
const binding = require('@visulima/vis-binding-win32-x64-msvc')
|
|
136
|
+
const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-msvc/package.json').version
|
|
137
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
138
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
53
139
|
}
|
|
140
|
+
return binding
|
|
141
|
+
} catch (e) {
|
|
142
|
+
loadErrors.push(e)
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
} else if (process.arch === 'ia32') {
|
|
146
|
+
try {
|
|
147
|
+
return require('./vis-native.win32-ia32-msvc.node')
|
|
148
|
+
} catch (e) {
|
|
149
|
+
loadErrors.push(e)
|
|
150
|
+
}
|
|
151
|
+
try {
|
|
152
|
+
const binding = require('@visulima/vis-binding-win32-ia32-msvc')
|
|
153
|
+
const bindingPackageVersion = require('@visulima/vis-binding-win32-ia32-msvc/package.json').version
|
|
154
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
155
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
156
|
+
}
|
|
157
|
+
return binding
|
|
158
|
+
} catch (e) {
|
|
159
|
+
loadErrors.push(e)
|
|
160
|
+
}
|
|
161
|
+
} else if (process.arch === 'arm64') {
|
|
162
|
+
try {
|
|
163
|
+
return require('./vis-native.win32-arm64-msvc.node')
|
|
164
|
+
} catch (e) {
|
|
165
|
+
loadErrors.push(e)
|
|
166
|
+
}
|
|
167
|
+
try {
|
|
168
|
+
const binding = require('@visulima/vis-binding-win32-arm64-msvc')
|
|
169
|
+
const bindingPackageVersion = require('@visulima/vis-binding-win32-arm64-msvc/package.json').version
|
|
170
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
171
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
172
|
+
}
|
|
173
|
+
return binding
|
|
174
|
+
} catch (e) {
|
|
175
|
+
loadErrors.push(e)
|
|
176
|
+
}
|
|
177
|
+
} else {
|
|
178
|
+
loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`))
|
|
54
179
|
}
|
|
55
|
-
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const isMuslFromChildProcess = () => {
|
|
180
|
+
} else if (process.platform === 'darwin') {
|
|
59
181
|
try {
|
|
60
|
-
|
|
182
|
+
return require('./vis-native.darwin-universal.node')
|
|
61
183
|
} catch (e) {
|
|
62
|
-
|
|
63
|
-
return false;
|
|
184
|
+
loadErrors.push(e)
|
|
64
185
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
186
|
+
try {
|
|
187
|
+
const binding = require('@visulima/vis-binding-darwin-universal')
|
|
188
|
+
const bindingPackageVersion = require('@visulima/vis-binding-darwin-universal/package.json').version
|
|
189
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
190
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
191
|
+
}
|
|
192
|
+
return binding
|
|
193
|
+
} catch (e) {
|
|
194
|
+
loadErrors.push(e)
|
|
195
|
+
}
|
|
196
|
+
if (process.arch === 'x64') {
|
|
197
|
+
try {
|
|
198
|
+
return require('./vis-native.darwin-x64.node')
|
|
199
|
+
} catch (e) {
|
|
200
|
+
loadErrors.push(e)
|
|
201
|
+
}
|
|
202
|
+
try {
|
|
203
|
+
const binding = require('@visulima/vis-binding-darwin-x64')
|
|
204
|
+
const bindingPackageVersion = require('@visulima/vis-binding-darwin-x64/package.json').version
|
|
205
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
206
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
207
|
+
}
|
|
208
|
+
return binding
|
|
209
|
+
} catch (e) {
|
|
210
|
+
loadErrors.push(e)
|
|
211
|
+
}
|
|
212
|
+
} else if (process.arch === 'arm64') {
|
|
213
|
+
try {
|
|
214
|
+
return require('./vis-native.darwin-arm64.node')
|
|
215
|
+
} catch (e) {
|
|
216
|
+
loadErrors.push(e)
|
|
217
|
+
}
|
|
218
|
+
try {
|
|
219
|
+
const binding = require('@visulima/vis-binding-darwin-arm64')
|
|
220
|
+
const bindingPackageVersion = require('@visulima/vis-binding-darwin-arm64/package.json').version
|
|
221
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
222
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
223
|
+
}
|
|
224
|
+
return binding
|
|
225
|
+
} catch (e) {
|
|
226
|
+
loadErrors.push(e)
|
|
227
|
+
}
|
|
228
|
+
} else {
|
|
229
|
+
loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))
|
|
230
|
+
}
|
|
231
|
+
} else if (process.platform === 'freebsd') {
|
|
232
|
+
if (process.arch === 'x64') {
|
|
233
|
+
try {
|
|
234
|
+
return require('./vis-native.freebsd-x64.node')
|
|
235
|
+
} catch (e) {
|
|
236
|
+
loadErrors.push(e)
|
|
237
|
+
}
|
|
238
|
+
try {
|
|
239
|
+
const binding = require('@visulima/vis-binding-freebsd-x64')
|
|
240
|
+
const bindingPackageVersion = require('@visulima/vis-binding-freebsd-x64/package.json').version
|
|
241
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
242
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
243
|
+
}
|
|
244
|
+
return binding
|
|
245
|
+
} catch (e) {
|
|
246
|
+
loadErrors.push(e)
|
|
247
|
+
}
|
|
248
|
+
} else if (process.arch === 'arm64') {
|
|
249
|
+
try {
|
|
250
|
+
return require('./vis-native.freebsd-arm64.node')
|
|
251
|
+
} catch (e) {
|
|
252
|
+
loadErrors.push(e)
|
|
253
|
+
}
|
|
254
|
+
try {
|
|
255
|
+
const binding = require('@visulima/vis-binding-freebsd-arm64')
|
|
256
|
+
const bindingPackageVersion = require('@visulima/vis-binding-freebsd-arm64/package.json').version
|
|
257
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
258
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
259
|
+
}
|
|
260
|
+
return binding
|
|
261
|
+
} catch (e) {
|
|
262
|
+
loadErrors.push(e)
|
|
263
|
+
}
|
|
264
|
+
} else {
|
|
265
|
+
loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`))
|
|
266
|
+
}
|
|
267
|
+
} else if (process.platform === 'linux') {
|
|
268
|
+
if (process.arch === 'x64') {
|
|
269
|
+
if (isMusl()) {
|
|
69
270
|
try {
|
|
70
|
-
|
|
71
|
-
} catch (
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
} else if (process.platform === "android") {
|
|
75
|
-
if (process.arch === "arm64") {
|
|
76
|
-
try {
|
|
77
|
-
return require("./vis-native.android-arm64.node");
|
|
78
|
-
} catch (e) {
|
|
79
|
-
loadErrors.push(e);
|
|
80
|
-
}
|
|
81
|
-
try {
|
|
82
|
-
const binding = require("@visulima/vis-binding-android-arm64");
|
|
83
|
-
const bindingPackageVersion = require("@visulima/vis-binding-android-arm64/package.json").version;
|
|
84
|
-
if (
|
|
85
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
86
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
87
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
88
|
-
) {
|
|
89
|
-
throw new Error(
|
|
90
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
return binding;
|
|
94
|
-
} catch (e) {
|
|
95
|
-
loadErrors.push(e);
|
|
96
|
-
}
|
|
97
|
-
} else if (process.arch === "arm") {
|
|
98
|
-
try {
|
|
99
|
-
return require("./vis-native.android-arm-eabi.node");
|
|
100
|
-
} catch (e) {
|
|
101
|
-
loadErrors.push(e);
|
|
102
|
-
}
|
|
103
|
-
try {
|
|
104
|
-
const binding = require("@visulima/vis-binding-android-arm-eabi");
|
|
105
|
-
const bindingPackageVersion = require("@visulima/vis-binding-android-arm-eabi/package.json").version;
|
|
106
|
-
if (
|
|
107
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
108
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
109
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
110
|
-
) {
|
|
111
|
-
throw new Error(
|
|
112
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
return binding;
|
|
116
|
-
} catch (e) {
|
|
117
|
-
loadErrors.push(e);
|
|
118
|
-
}
|
|
119
|
-
} else {
|
|
120
|
-
loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`));
|
|
121
|
-
}
|
|
122
|
-
} else if (process.platform === "win32") {
|
|
123
|
-
if (process.arch === "x64") {
|
|
124
|
-
if (process.config?.variables?.shlib_suffix === "dll.a" || process.config?.variables?.node_target_type === "shared_library") {
|
|
125
|
-
try {
|
|
126
|
-
return require("./vis-native.win32-x64-gnu.node");
|
|
127
|
-
} catch (e) {
|
|
128
|
-
loadErrors.push(e);
|
|
129
|
-
}
|
|
130
|
-
try {
|
|
131
|
-
const binding = require("@visulima/vis-binding-win32-x64-gnu");
|
|
132
|
-
const bindingPackageVersion = require("@visulima/vis-binding-win32-x64-gnu/package.json").version;
|
|
133
|
-
if (
|
|
134
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
135
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
136
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
137
|
-
) {
|
|
138
|
-
throw new Error(
|
|
139
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
return binding;
|
|
143
|
-
} catch (e) {
|
|
144
|
-
loadErrors.push(e);
|
|
145
|
-
}
|
|
146
|
-
} else {
|
|
147
|
-
try {
|
|
148
|
-
return require("./vis-native.win32-x64-msvc.node");
|
|
149
|
-
} catch (e) {
|
|
150
|
-
loadErrors.push(e);
|
|
151
|
-
}
|
|
152
|
-
try {
|
|
153
|
-
const binding = require("@visulima/vis-binding-win32-x64-msvc");
|
|
154
|
-
const bindingPackageVersion = require("@visulima/vis-binding-win32-x64-msvc/package.json").version;
|
|
155
|
-
if (
|
|
156
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
157
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
158
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
159
|
-
) {
|
|
160
|
-
throw new Error(
|
|
161
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
|
-
return binding;
|
|
165
|
-
} catch (e) {
|
|
166
|
-
loadErrors.push(e);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
} else if (process.arch === "ia32") {
|
|
170
|
-
try {
|
|
171
|
-
return require("./vis-native.win32-ia32-msvc.node");
|
|
172
|
-
} catch (e) {
|
|
173
|
-
loadErrors.push(e);
|
|
174
|
-
}
|
|
175
|
-
try {
|
|
176
|
-
const binding = require("@visulima/vis-binding-win32-ia32-msvc");
|
|
177
|
-
const bindingPackageVersion = require("@visulima/vis-binding-win32-ia32-msvc/package.json").version;
|
|
178
|
-
if (
|
|
179
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
180
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
181
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
182
|
-
) {
|
|
183
|
-
throw new Error(
|
|
184
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
185
|
-
);
|
|
186
|
-
}
|
|
187
|
-
return binding;
|
|
188
|
-
} catch (e) {
|
|
189
|
-
loadErrors.push(e);
|
|
190
|
-
}
|
|
191
|
-
} else if (process.arch === "arm64") {
|
|
192
|
-
try {
|
|
193
|
-
return require("./vis-native.win32-arm64-msvc.node");
|
|
194
|
-
} catch (e) {
|
|
195
|
-
loadErrors.push(e);
|
|
196
|
-
}
|
|
197
|
-
try {
|
|
198
|
-
const binding = require("@visulima/vis-binding-win32-arm64-msvc");
|
|
199
|
-
const bindingPackageVersion = require("@visulima/vis-binding-win32-arm64-msvc/package.json").version;
|
|
200
|
-
if (
|
|
201
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
202
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
203
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
204
|
-
) {
|
|
205
|
-
throw new Error(
|
|
206
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
207
|
-
);
|
|
208
|
-
}
|
|
209
|
-
return binding;
|
|
210
|
-
} catch (e) {
|
|
211
|
-
loadErrors.push(e);
|
|
212
|
-
}
|
|
213
|
-
} else {
|
|
214
|
-
loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`));
|
|
271
|
+
return require('./vis-native.linux-x64-musl.node')
|
|
272
|
+
} catch (e) {
|
|
273
|
+
loadErrors.push(e)
|
|
215
274
|
}
|
|
216
|
-
} else if (process.platform === "darwin") {
|
|
217
275
|
try {
|
|
218
|
-
|
|
276
|
+
const binding = require('@visulima/vis-binding-linux-x64-musl')
|
|
277
|
+
const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-musl/package.json').version
|
|
278
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
279
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
280
|
+
}
|
|
281
|
+
return binding
|
|
219
282
|
} catch (e) {
|
|
220
|
-
|
|
283
|
+
loadErrors.push(e)
|
|
221
284
|
}
|
|
285
|
+
} else {
|
|
222
286
|
try {
|
|
223
|
-
|
|
224
|
-
const bindingPackageVersion = require("@visulima/vis-binding-darwin-universal/package.json").version;
|
|
225
|
-
if (bindingPackageVersion !== "1.0.0-alpha.34" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
|
|
226
|
-
throw new Error(
|
|
227
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
228
|
-
);
|
|
229
|
-
}
|
|
230
|
-
return binding;
|
|
287
|
+
return require('./vis-native.linux-x64-gnu.node')
|
|
231
288
|
} catch (e) {
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
393
|
-
);
|
|
394
|
-
}
|
|
395
|
-
return binding;
|
|
396
|
-
} catch (e) {
|
|
397
|
-
loadErrors.push(e);
|
|
398
|
-
}
|
|
399
|
-
} else {
|
|
400
|
-
try {
|
|
401
|
-
return require("./vis-native.linux-arm64-gnu.node");
|
|
402
|
-
} catch (e) {
|
|
403
|
-
loadErrors.push(e);
|
|
404
|
-
}
|
|
405
|
-
try {
|
|
406
|
-
const binding = require("@visulima/vis-binding-linux-arm64-gnu");
|
|
407
|
-
const bindingPackageVersion = require("@visulima/vis-binding-linux-arm64-gnu/package.json").version;
|
|
408
|
-
if (
|
|
409
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
410
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
411
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
412
|
-
) {
|
|
413
|
-
throw new Error(
|
|
414
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
415
|
-
);
|
|
416
|
-
}
|
|
417
|
-
return binding;
|
|
418
|
-
} catch (e) {
|
|
419
|
-
loadErrors.push(e);
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
} else if (process.arch === "arm") {
|
|
423
|
-
if (isMusl()) {
|
|
424
|
-
try {
|
|
425
|
-
return require("./vis-native.linux-arm-musleabihf.node");
|
|
426
|
-
} catch (e) {
|
|
427
|
-
loadErrors.push(e);
|
|
428
|
-
}
|
|
429
|
-
try {
|
|
430
|
-
const binding = require("@visulima/vis-binding-linux-arm-musleabihf");
|
|
431
|
-
const bindingPackageVersion = require("@visulima/vis-binding-linux-arm-musleabihf/package.json").version;
|
|
432
|
-
if (
|
|
433
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
434
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
435
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
436
|
-
) {
|
|
437
|
-
throw new Error(
|
|
438
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
439
|
-
);
|
|
440
|
-
}
|
|
441
|
-
return binding;
|
|
442
|
-
} catch (e) {
|
|
443
|
-
loadErrors.push(e);
|
|
444
|
-
}
|
|
445
|
-
} else {
|
|
446
|
-
try {
|
|
447
|
-
return require("./vis-native.linux-arm-gnueabihf.node");
|
|
448
|
-
} catch (e) {
|
|
449
|
-
loadErrors.push(e);
|
|
450
|
-
}
|
|
451
|
-
try {
|
|
452
|
-
const binding = require("@visulima/vis-binding-linux-arm-gnueabihf");
|
|
453
|
-
const bindingPackageVersion = require("@visulima/vis-binding-linux-arm-gnueabihf/package.json").version;
|
|
454
|
-
if (
|
|
455
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
456
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
457
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
458
|
-
) {
|
|
459
|
-
throw new Error(
|
|
460
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
461
|
-
);
|
|
462
|
-
}
|
|
463
|
-
return binding;
|
|
464
|
-
} catch (e) {
|
|
465
|
-
loadErrors.push(e);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
} else if (process.arch === "loong64") {
|
|
469
|
-
if (isMusl()) {
|
|
470
|
-
try {
|
|
471
|
-
return require("./vis-native.linux-loong64-musl.node");
|
|
472
|
-
} catch (e) {
|
|
473
|
-
loadErrors.push(e);
|
|
474
|
-
}
|
|
475
|
-
try {
|
|
476
|
-
const binding = require("@visulima/vis-binding-linux-loong64-musl");
|
|
477
|
-
const bindingPackageVersion = require("@visulima/vis-binding-linux-loong64-musl/package.json").version;
|
|
478
|
-
if (
|
|
479
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
480
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
481
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
482
|
-
) {
|
|
483
|
-
throw new Error(
|
|
484
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
485
|
-
);
|
|
486
|
-
}
|
|
487
|
-
return binding;
|
|
488
|
-
} catch (e) {
|
|
489
|
-
loadErrors.push(e);
|
|
490
|
-
}
|
|
491
|
-
} else {
|
|
492
|
-
try {
|
|
493
|
-
return require("./vis-native.linux-loong64-gnu.node");
|
|
494
|
-
} catch (e) {
|
|
495
|
-
loadErrors.push(e);
|
|
496
|
-
}
|
|
497
|
-
try {
|
|
498
|
-
const binding = require("@visulima/vis-binding-linux-loong64-gnu");
|
|
499
|
-
const bindingPackageVersion = require("@visulima/vis-binding-linux-loong64-gnu/package.json").version;
|
|
500
|
-
if (
|
|
501
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
502
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
503
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
504
|
-
) {
|
|
505
|
-
throw new Error(
|
|
506
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
507
|
-
);
|
|
508
|
-
}
|
|
509
|
-
return binding;
|
|
510
|
-
} catch (e) {
|
|
511
|
-
loadErrors.push(e);
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
} else if (process.arch === "riscv64") {
|
|
515
|
-
if (isMusl()) {
|
|
516
|
-
try {
|
|
517
|
-
return require("./vis-native.linux-riscv64-musl.node");
|
|
518
|
-
} catch (e) {
|
|
519
|
-
loadErrors.push(e);
|
|
520
|
-
}
|
|
521
|
-
try {
|
|
522
|
-
const binding = require("@visulima/vis-binding-linux-riscv64-musl");
|
|
523
|
-
const bindingPackageVersion = require("@visulima/vis-binding-linux-riscv64-musl/package.json").version;
|
|
524
|
-
if (
|
|
525
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
526
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
527
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
528
|
-
) {
|
|
529
|
-
throw new Error(
|
|
530
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
531
|
-
);
|
|
532
|
-
}
|
|
533
|
-
return binding;
|
|
534
|
-
} catch (e) {
|
|
535
|
-
loadErrors.push(e);
|
|
536
|
-
}
|
|
537
|
-
} else {
|
|
538
|
-
try {
|
|
539
|
-
return require("./vis-native.linux-riscv64-gnu.node");
|
|
540
|
-
} catch (e) {
|
|
541
|
-
loadErrors.push(e);
|
|
542
|
-
}
|
|
543
|
-
try {
|
|
544
|
-
const binding = require("@visulima/vis-binding-linux-riscv64-gnu");
|
|
545
|
-
const bindingPackageVersion = require("@visulima/vis-binding-linux-riscv64-gnu/package.json").version;
|
|
546
|
-
if (
|
|
547
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
548
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
549
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
550
|
-
) {
|
|
551
|
-
throw new Error(
|
|
552
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
553
|
-
);
|
|
554
|
-
}
|
|
555
|
-
return binding;
|
|
556
|
-
} catch (e) {
|
|
557
|
-
loadErrors.push(e);
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
} else if (process.arch === "ppc64") {
|
|
561
|
-
try {
|
|
562
|
-
return require("./vis-native.linux-ppc64-gnu.node");
|
|
563
|
-
} catch (e) {
|
|
564
|
-
loadErrors.push(e);
|
|
565
|
-
}
|
|
566
|
-
try {
|
|
567
|
-
const binding = require("@visulima/vis-binding-linux-ppc64-gnu");
|
|
568
|
-
const bindingPackageVersion = require("@visulima/vis-binding-linux-ppc64-gnu/package.json").version;
|
|
569
|
-
if (
|
|
570
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
571
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
572
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
573
|
-
) {
|
|
574
|
-
throw new Error(
|
|
575
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
576
|
-
);
|
|
577
|
-
}
|
|
578
|
-
return binding;
|
|
579
|
-
} catch (e) {
|
|
580
|
-
loadErrors.push(e);
|
|
581
|
-
}
|
|
582
|
-
} else if (process.arch === "s390x") {
|
|
583
|
-
try {
|
|
584
|
-
return require("./vis-native.linux-s390x-gnu.node");
|
|
585
|
-
} catch (e) {
|
|
586
|
-
loadErrors.push(e);
|
|
587
|
-
}
|
|
588
|
-
try {
|
|
589
|
-
const binding = require("@visulima/vis-binding-linux-s390x-gnu");
|
|
590
|
-
const bindingPackageVersion = require("@visulima/vis-binding-linux-s390x-gnu/package.json").version;
|
|
591
|
-
if (
|
|
592
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
593
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
594
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
595
|
-
) {
|
|
596
|
-
throw new Error(
|
|
597
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
598
|
-
);
|
|
599
|
-
}
|
|
600
|
-
return binding;
|
|
601
|
-
} catch (e) {
|
|
602
|
-
loadErrors.push(e);
|
|
603
|
-
}
|
|
604
|
-
} else {
|
|
605
|
-
loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`));
|
|
606
|
-
}
|
|
607
|
-
} else if (process.platform === "openharmony") {
|
|
608
|
-
if (process.arch === "arm64") {
|
|
609
|
-
try {
|
|
610
|
-
return require("./vis-native.openharmony-arm64.node");
|
|
611
|
-
} catch (e) {
|
|
612
|
-
loadErrors.push(e);
|
|
613
|
-
}
|
|
614
|
-
try {
|
|
615
|
-
const binding = require("@visulima/vis-binding-openharmony-arm64");
|
|
616
|
-
const bindingPackageVersion = require("@visulima/vis-binding-openharmony-arm64/package.json").version;
|
|
617
|
-
if (
|
|
618
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
619
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
620
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
621
|
-
) {
|
|
622
|
-
throw new Error(
|
|
623
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
624
|
-
);
|
|
625
|
-
}
|
|
626
|
-
return binding;
|
|
627
|
-
} catch (e) {
|
|
628
|
-
loadErrors.push(e);
|
|
629
|
-
}
|
|
630
|
-
} else if (process.arch === "x64") {
|
|
631
|
-
try {
|
|
632
|
-
return require("./vis-native.openharmony-x64.node");
|
|
633
|
-
} catch (e) {
|
|
634
|
-
loadErrors.push(e);
|
|
635
|
-
}
|
|
636
|
-
try {
|
|
637
|
-
const binding = require("@visulima/vis-binding-openharmony-x64");
|
|
638
|
-
const bindingPackageVersion = require("@visulima/vis-binding-openharmony-x64/package.json").version;
|
|
639
|
-
if (
|
|
640
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
641
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
642
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
643
|
-
) {
|
|
644
|
-
throw new Error(
|
|
645
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
646
|
-
);
|
|
647
|
-
}
|
|
648
|
-
return binding;
|
|
649
|
-
} catch (e) {
|
|
650
|
-
loadErrors.push(e);
|
|
651
|
-
}
|
|
652
|
-
} else if (process.arch === "arm") {
|
|
653
|
-
try {
|
|
654
|
-
return require("./vis-native.openharmony-arm.node");
|
|
655
|
-
} catch (e) {
|
|
656
|
-
loadErrors.push(e);
|
|
657
|
-
}
|
|
658
|
-
try {
|
|
659
|
-
const binding = require("@visulima/vis-binding-openharmony-arm");
|
|
660
|
-
const bindingPackageVersion = require("@visulima/vis-binding-openharmony-arm/package.json").version;
|
|
661
|
-
if (
|
|
662
|
-
bindingPackageVersion !== "1.0.0-alpha.34" &&
|
|
663
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
664
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
665
|
-
) {
|
|
666
|
-
throw new Error(
|
|
667
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.37 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
668
|
-
);
|
|
669
|
-
}
|
|
670
|
-
return binding;
|
|
671
|
-
} catch (e) {
|
|
672
|
-
loadErrors.push(e);
|
|
673
|
-
}
|
|
674
|
-
} else {
|
|
675
|
-
loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));
|
|
289
|
+
loadErrors.push(e)
|
|
290
|
+
}
|
|
291
|
+
try {
|
|
292
|
+
const binding = require('@visulima/vis-binding-linux-x64-gnu')
|
|
293
|
+
const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-gnu/package.json').version
|
|
294
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
295
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
296
|
+
}
|
|
297
|
+
return binding
|
|
298
|
+
} catch (e) {
|
|
299
|
+
loadErrors.push(e)
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
} else if (process.arch === 'arm64') {
|
|
303
|
+
if (isMusl()) {
|
|
304
|
+
try {
|
|
305
|
+
return require('./vis-native.linux-arm64-musl.node')
|
|
306
|
+
} catch (e) {
|
|
307
|
+
loadErrors.push(e)
|
|
308
|
+
}
|
|
309
|
+
try {
|
|
310
|
+
const binding = require('@visulima/vis-binding-linux-arm64-musl')
|
|
311
|
+
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-musl/package.json').version
|
|
312
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
313
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
314
|
+
}
|
|
315
|
+
return binding
|
|
316
|
+
} catch (e) {
|
|
317
|
+
loadErrors.push(e)
|
|
318
|
+
}
|
|
319
|
+
} else {
|
|
320
|
+
try {
|
|
321
|
+
return require('./vis-native.linux-arm64-gnu.node')
|
|
322
|
+
} catch (e) {
|
|
323
|
+
loadErrors.push(e)
|
|
324
|
+
}
|
|
325
|
+
try {
|
|
326
|
+
const binding = require('@visulima/vis-binding-linux-arm64-gnu')
|
|
327
|
+
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-gnu/package.json').version
|
|
328
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
329
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
330
|
+
}
|
|
331
|
+
return binding
|
|
332
|
+
} catch (e) {
|
|
333
|
+
loadErrors.push(e)
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
} else if (process.arch === 'arm') {
|
|
337
|
+
if (isMusl()) {
|
|
338
|
+
try {
|
|
339
|
+
return require('./vis-native.linux-arm-musleabihf.node')
|
|
340
|
+
} catch (e) {
|
|
341
|
+
loadErrors.push(e)
|
|
342
|
+
}
|
|
343
|
+
try {
|
|
344
|
+
const binding = require('@visulima/vis-binding-linux-arm-musleabihf')
|
|
345
|
+
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-musleabihf/package.json').version
|
|
346
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
347
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
348
|
+
}
|
|
349
|
+
return binding
|
|
350
|
+
} catch (e) {
|
|
351
|
+
loadErrors.push(e)
|
|
352
|
+
}
|
|
353
|
+
} else {
|
|
354
|
+
try {
|
|
355
|
+
return require('./vis-native.linux-arm-gnueabihf.node')
|
|
356
|
+
} catch (e) {
|
|
357
|
+
loadErrors.push(e)
|
|
358
|
+
}
|
|
359
|
+
try {
|
|
360
|
+
const binding = require('@visulima/vis-binding-linux-arm-gnueabihf')
|
|
361
|
+
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-gnueabihf/package.json').version
|
|
362
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
363
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
364
|
+
}
|
|
365
|
+
return binding
|
|
366
|
+
} catch (e) {
|
|
367
|
+
loadErrors.push(e)
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
} else if (process.arch === 'loong64') {
|
|
371
|
+
if (isMusl()) {
|
|
372
|
+
try {
|
|
373
|
+
return require('./vis-native.linux-loong64-musl.node')
|
|
374
|
+
} catch (e) {
|
|
375
|
+
loadErrors.push(e)
|
|
376
|
+
}
|
|
377
|
+
try {
|
|
378
|
+
const binding = require('@visulima/vis-binding-linux-loong64-musl')
|
|
379
|
+
const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-musl/package.json').version
|
|
380
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
381
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
382
|
+
}
|
|
383
|
+
return binding
|
|
384
|
+
} catch (e) {
|
|
385
|
+
loadErrors.push(e)
|
|
386
|
+
}
|
|
387
|
+
} else {
|
|
388
|
+
try {
|
|
389
|
+
return require('./vis-native.linux-loong64-gnu.node')
|
|
390
|
+
} catch (e) {
|
|
391
|
+
loadErrors.push(e)
|
|
392
|
+
}
|
|
393
|
+
try {
|
|
394
|
+
const binding = require('@visulima/vis-binding-linux-loong64-gnu')
|
|
395
|
+
const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-gnu/package.json').version
|
|
396
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
397
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
398
|
+
}
|
|
399
|
+
return binding
|
|
400
|
+
} catch (e) {
|
|
401
|
+
loadErrors.push(e)
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
} else if (process.arch === 'riscv64') {
|
|
405
|
+
if (isMusl()) {
|
|
406
|
+
try {
|
|
407
|
+
return require('./vis-native.linux-riscv64-musl.node')
|
|
408
|
+
} catch (e) {
|
|
409
|
+
loadErrors.push(e)
|
|
410
|
+
}
|
|
411
|
+
try {
|
|
412
|
+
const binding = require('@visulima/vis-binding-linux-riscv64-musl')
|
|
413
|
+
const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-musl/package.json').version
|
|
414
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
415
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
416
|
+
}
|
|
417
|
+
return binding
|
|
418
|
+
} catch (e) {
|
|
419
|
+
loadErrors.push(e)
|
|
420
|
+
}
|
|
421
|
+
} else {
|
|
422
|
+
try {
|
|
423
|
+
return require('./vis-native.linux-riscv64-gnu.node')
|
|
424
|
+
} catch (e) {
|
|
425
|
+
loadErrors.push(e)
|
|
426
|
+
}
|
|
427
|
+
try {
|
|
428
|
+
const binding = require('@visulima/vis-binding-linux-riscv64-gnu')
|
|
429
|
+
const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-gnu/package.json').version
|
|
430
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
431
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
432
|
+
}
|
|
433
|
+
return binding
|
|
434
|
+
} catch (e) {
|
|
435
|
+
loadErrors.push(e)
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
} else if (process.arch === 'ppc64') {
|
|
439
|
+
try {
|
|
440
|
+
return require('./vis-native.linux-ppc64-gnu.node')
|
|
441
|
+
} catch (e) {
|
|
442
|
+
loadErrors.push(e)
|
|
443
|
+
}
|
|
444
|
+
try {
|
|
445
|
+
const binding = require('@visulima/vis-binding-linux-ppc64-gnu')
|
|
446
|
+
const bindingPackageVersion = require('@visulima/vis-binding-linux-ppc64-gnu/package.json').version
|
|
447
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
448
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
676
449
|
}
|
|
450
|
+
return binding
|
|
451
|
+
} catch (e) {
|
|
452
|
+
loadErrors.push(e)
|
|
453
|
+
}
|
|
454
|
+
} else if (process.arch === 's390x') {
|
|
455
|
+
try {
|
|
456
|
+
return require('./vis-native.linux-s390x-gnu.node')
|
|
457
|
+
} catch (e) {
|
|
458
|
+
loadErrors.push(e)
|
|
459
|
+
}
|
|
460
|
+
try {
|
|
461
|
+
const binding = require('@visulima/vis-binding-linux-s390x-gnu')
|
|
462
|
+
const bindingPackageVersion = require('@visulima/vis-binding-linux-s390x-gnu/package.json').version
|
|
463
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
464
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
465
|
+
}
|
|
466
|
+
return binding
|
|
467
|
+
} catch (e) {
|
|
468
|
+
loadErrors.push(e)
|
|
469
|
+
}
|
|
677
470
|
} else {
|
|
678
|
-
|
|
471
|
+
loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
|
|
679
472
|
}
|
|
473
|
+
} else if (process.platform === 'openharmony') {
|
|
474
|
+
if (process.arch === 'arm64') {
|
|
475
|
+
try {
|
|
476
|
+
return require('./vis-native.openharmony-arm64.node')
|
|
477
|
+
} catch (e) {
|
|
478
|
+
loadErrors.push(e)
|
|
479
|
+
}
|
|
480
|
+
try {
|
|
481
|
+
const binding = require('@visulima/vis-binding-openharmony-arm64')
|
|
482
|
+
const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm64/package.json').version
|
|
483
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
484
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
485
|
+
}
|
|
486
|
+
return binding
|
|
487
|
+
} catch (e) {
|
|
488
|
+
loadErrors.push(e)
|
|
489
|
+
}
|
|
490
|
+
} else if (process.arch === 'x64') {
|
|
491
|
+
try {
|
|
492
|
+
return require('./vis-native.openharmony-x64.node')
|
|
493
|
+
} catch (e) {
|
|
494
|
+
loadErrors.push(e)
|
|
495
|
+
}
|
|
496
|
+
try {
|
|
497
|
+
const binding = require('@visulima/vis-binding-openharmony-x64')
|
|
498
|
+
const bindingPackageVersion = require('@visulima/vis-binding-openharmony-x64/package.json').version
|
|
499
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
500
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
501
|
+
}
|
|
502
|
+
return binding
|
|
503
|
+
} catch (e) {
|
|
504
|
+
loadErrors.push(e)
|
|
505
|
+
}
|
|
506
|
+
} else if (process.arch === 'arm') {
|
|
507
|
+
try {
|
|
508
|
+
return require('./vis-native.openharmony-arm.node')
|
|
509
|
+
} catch (e) {
|
|
510
|
+
loadErrors.push(e)
|
|
511
|
+
}
|
|
512
|
+
try {
|
|
513
|
+
const binding = require('@visulima/vis-binding-openharmony-arm')
|
|
514
|
+
const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm/package.json').version
|
|
515
|
+
if (bindingPackageVersion !== '1.0.0-alpha.37' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
516
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.39 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
517
|
+
}
|
|
518
|
+
return binding
|
|
519
|
+
} catch (e) {
|
|
520
|
+
loadErrors.push(e)
|
|
521
|
+
}
|
|
522
|
+
} else {
|
|
523
|
+
loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`))
|
|
524
|
+
}
|
|
525
|
+
} else {
|
|
526
|
+
loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))
|
|
527
|
+
}
|
|
680
528
|
}
|
|
681
529
|
|
|
682
|
-
nativeBinding = requireNative()
|
|
530
|
+
nativeBinding = requireNative()
|
|
531
|
+
|
|
532
|
+
// NAPI_RS_FORCE_WASI is a tri-state flag:
|
|
533
|
+
// unset / any other value → native binding preferred, WASI is only a fallback
|
|
534
|
+
// 'true' → force WASI fallback even if native loaded
|
|
535
|
+
// 'error' → force WASI and throw if no WASI binding is found
|
|
536
|
+
// Treating any non-empty string as truthy (the historical behavior) meant
|
|
537
|
+
// NAPI_RS_FORCE_WASI=false, NAPI_RS_FORCE_WASI=0, etc. inadvertently triggered
|
|
538
|
+
// the WASI path, causing ENOENT for packages shipped without a .wasi.cjs file.
|
|
539
|
+
const forceWasi =
|
|
540
|
+
process.env.NAPI_RS_FORCE_WASI === 'true' || process.env.NAPI_RS_FORCE_WASI === 'error'
|
|
683
541
|
|
|
684
|
-
if (!nativeBinding ||
|
|
685
|
-
|
|
686
|
-
|
|
542
|
+
if (!nativeBinding || forceWasi) {
|
|
543
|
+
let wasiBinding = null
|
|
544
|
+
let wasiBindingError = null
|
|
545
|
+
try {
|
|
546
|
+
wasiBinding = require('./vis-native.wasi.cjs')
|
|
547
|
+
nativeBinding = wasiBinding
|
|
548
|
+
} catch (err) {
|
|
549
|
+
if (forceWasi) {
|
|
550
|
+
wasiBindingError = err
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
if (!nativeBinding || forceWasi) {
|
|
687
554
|
try {
|
|
688
|
-
|
|
689
|
-
|
|
555
|
+
wasiBinding = require('@visulima/vis-binding-wasm32-wasi')
|
|
556
|
+
nativeBinding = wasiBinding
|
|
690
557
|
} catch (err) {
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
try {
|
|
697
|
-
wasiBinding = require("@visulima/vis-binding-wasm32-wasi");
|
|
698
|
-
nativeBinding = wasiBinding;
|
|
699
|
-
} catch (err) {
|
|
700
|
-
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
701
|
-
if (!wasiBindingError) {
|
|
702
|
-
wasiBindingError = err;
|
|
703
|
-
} else {
|
|
704
|
-
wasiBindingError.cause = err;
|
|
705
|
-
}
|
|
706
|
-
loadErrors.push(err);
|
|
707
|
-
}
|
|
558
|
+
if (forceWasi) {
|
|
559
|
+
if (!wasiBindingError) {
|
|
560
|
+
wasiBindingError = err
|
|
561
|
+
} else {
|
|
562
|
+
wasiBindingError.cause = err
|
|
708
563
|
}
|
|
564
|
+
loadErrors.push(err)
|
|
565
|
+
}
|
|
709
566
|
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
567
|
+
}
|
|
568
|
+
if (process.env.NAPI_RS_FORCE_WASI === 'error' && !wasiBinding) {
|
|
569
|
+
const error = new Error('WASI binding not found and NAPI_RS_FORCE_WASI is set to error')
|
|
570
|
+
error.cause = wasiBindingError
|
|
571
|
+
throw error
|
|
572
|
+
}
|
|
715
573
|
}
|
|
716
574
|
|
|
717
575
|
if (!nativeBinding) {
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
576
|
+
if (loadErrors.length > 0) {
|
|
577
|
+
throw new Error(
|
|
578
|
+
`Cannot find native binding. ` +
|
|
579
|
+
`npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
|
|
580
|
+
'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
|
|
581
|
+
{
|
|
582
|
+
cause: loadErrors.reduce((err, cur) => {
|
|
583
|
+
cur.cause = err
|
|
584
|
+
return cur
|
|
585
|
+
}),
|
|
586
|
+
},
|
|
587
|
+
)
|
|
588
|
+
}
|
|
589
|
+
throw new Error(`Failed to load native binding`)
|
|
732
590
|
}
|
|
733
591
|
|
|
734
|
-
const {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
} = nativeBinding;
|
|
767
|
-
export { OsvBloomHandle };
|
|
768
|
-
export { advisoriesIngest };
|
|
769
|
-
export { advisoriesQuery };
|
|
770
|
-
export { advisoriesStatus };
|
|
771
|
-
export { allKnownTags };
|
|
772
|
-
export { cleanWorkspace };
|
|
773
|
-
export { detectPackageManager };
|
|
774
|
-
export { execPmCommand };
|
|
775
|
-
export { execPmCommandInteractive };
|
|
776
|
-
export { NATIVE_BINDING_VERSION };
|
|
777
|
-
export { osvBloomDecode };
|
|
778
|
-
export { osvBloomProbe };
|
|
779
|
-
export { osvBloomProbeBatch };
|
|
780
|
-
export { parseShebang };
|
|
781
|
-
export { resolveAdd };
|
|
782
|
-
export { resolveDedupe };
|
|
783
|
-
export { resolveDlx };
|
|
784
|
-
export { resolveEditorconfigDefaults };
|
|
785
|
-
export { resolveExec };
|
|
786
|
-
export { resolveInstall };
|
|
787
|
-
export { resolveLink };
|
|
788
|
-
export { resolveOutdated };
|
|
789
|
-
export { resolvePmCommand };
|
|
790
|
-
export { resolveRemove };
|
|
791
|
-
export { resolveUnlink };
|
|
792
|
-
export { resolveWhy };
|
|
793
|
-
export { sortPackageJsonString };
|
|
794
|
-
export { sortPackageJsonStringWithOptions };
|
|
795
|
-
export { tagsFromPath };
|
|
796
|
-
export { tagsFromPaths };
|
|
797
|
-
export { whichBin };
|
|
592
|
+
const { OsvBloomHandle, advisoriesIngest, advisoriesQuery, advisoriesStatus, allKnownTags, cleanWorkspace, detectPackageManager, execPmCommand, execPmCommandInteractive, NATIVE_BINDING_VERSION, osvBloomDecode, osvBloomProbe, osvBloomProbeBatch, parseShebang, resolveAdd, resolveDedupe, resolveDlx, resolveEditorconfigDefaults, resolveExec, resolveInstall, resolveLink, resolveOutdated, resolvePmCommand, resolveRemove, resolveUnlink, resolveWhy, sortPackageJsonString, sortPackageJsonStringWithOptions, tagsFromPath, tagsFromPaths, whichBin } = nativeBinding
|
|
593
|
+
export { OsvBloomHandle }
|
|
594
|
+
export { advisoriesIngest }
|
|
595
|
+
export { advisoriesQuery }
|
|
596
|
+
export { advisoriesStatus }
|
|
597
|
+
export { allKnownTags }
|
|
598
|
+
export { cleanWorkspace }
|
|
599
|
+
export { detectPackageManager }
|
|
600
|
+
export { execPmCommand }
|
|
601
|
+
export { execPmCommandInteractive }
|
|
602
|
+
export { NATIVE_BINDING_VERSION }
|
|
603
|
+
export { osvBloomDecode }
|
|
604
|
+
export { osvBloomProbe }
|
|
605
|
+
export { osvBloomProbeBatch }
|
|
606
|
+
export { parseShebang }
|
|
607
|
+
export { resolveAdd }
|
|
608
|
+
export { resolveDedupe }
|
|
609
|
+
export { resolveDlx }
|
|
610
|
+
export { resolveEditorconfigDefaults }
|
|
611
|
+
export { resolveExec }
|
|
612
|
+
export { resolveInstall }
|
|
613
|
+
export { resolveLink }
|
|
614
|
+
export { resolveOutdated }
|
|
615
|
+
export { resolvePmCommand }
|
|
616
|
+
export { resolveRemove }
|
|
617
|
+
export { resolveUnlink }
|
|
618
|
+
export { resolveWhy }
|
|
619
|
+
export { sortPackageJsonString }
|
|
620
|
+
export { sortPackageJsonStringWithOptions }
|
|
621
|
+
export { tagsFromPath }
|
|
622
|
+
export { tagsFromPaths }
|
|
623
|
+
export { whichBin }
|