@visulima/vis 1.0.0-alpha.7 → 1.0.0-alpha.9
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 +107 -47
- package/LICENSE.md +44 -1
- package/README.md +56 -0
- package/dist/bin.js +1 -991
- package/dist/config.d.ts +1073 -68
- package/dist/config.js +1 -1
- package/dist/generate/index.d.ts +155 -30
- package/dist/packem_chunks/handler.js +1 -0
- package/dist/packem_chunks/handler10.js +1 -0
- package/dist/packem_chunks/handler11.js +1 -0
- package/dist/packem_chunks/handler12.js +153 -0
- package/dist/packem_chunks/handler13.js +1 -0
- package/dist/packem_chunks/handler14.js +3 -0
- package/dist/packem_chunks/handler15.js +1 -0
- package/dist/packem_chunks/handler16.js +2 -0
- package/dist/packem_chunks/handler17.js +7 -0
- package/dist/packem_chunks/handler18.js +1 -0
- package/dist/packem_chunks/handler19.js +19 -0
- package/dist/packem_chunks/handler2.js +1 -0
- package/dist/packem_chunks/handler20.js +428 -0
- package/dist/packem_chunks/handler21.js +22 -0
- package/dist/packem_chunks/handler22.js +3 -0
- package/dist/packem_chunks/handler23.js +5 -0
- package/dist/packem_chunks/handler24.js +1 -0
- package/dist/packem_chunks/handler25.js +20 -0
- package/dist/packem_chunks/handler26.js +1 -0
- package/dist/packem_chunks/handler27.js +1 -0
- package/dist/packem_chunks/handler28.js +1 -0
- package/dist/packem_chunks/handler29.js +2 -0
- package/dist/packem_chunks/handler3.js +2 -0
- package/dist/packem_chunks/handler30.js +22 -0
- package/dist/packem_chunks/handler31.js +1 -0
- package/dist/packem_chunks/handler32.js +1 -0
- package/dist/packem_chunks/handler33.js +37 -0
- package/dist/packem_chunks/handler34.js +3 -0
- package/dist/packem_chunks/handler35.js +23 -0
- package/dist/packem_chunks/handler36.js +5 -0
- package/dist/packem_chunks/handler37.js +27 -0
- package/dist/packem_chunks/handler38.js +1 -0
- package/dist/packem_chunks/handler39.js +2 -0
- package/dist/packem_chunks/handler4.js +5 -0
- package/dist/packem_chunks/handler40.js +1 -0
- package/dist/packem_chunks/handler41.js +5 -0
- package/dist/packem_chunks/handler42.js +1 -0
- package/dist/packem_chunks/handler43.js +24 -0
- package/dist/packem_chunks/handler44.js +3 -0
- package/dist/packem_chunks/handler45.js +1 -0
- package/dist/packem_chunks/handler5.js +4 -0
- package/dist/packem_chunks/handler6.js +2 -0
- package/dist/packem_chunks/handler7.js +24 -0
- package/dist/packem_chunks/handler8.js +6 -0
- package/dist/packem_chunks/handler9.js +8 -0
- package/dist/packem_shared/VisUpdateApp-BBx3idMI.js +1 -0
- package/dist/packem_shared/ai-analysis-DDqXRFxY.js +67 -0
- package/dist/packem_shared/bin-BaZZ32BK.js +93 -0
- package/dist/packem_shared/cache-directory-DL8hfXeG.js +1 -0
- package/dist/packem_shared/catalog-CuSpuB_R.js +12 -0
- package/dist/packem_shared/dependency-scan-BoLG2Fez.js +1 -0
- package/dist/packem_shared/docker-BcfqH4Av.js +2 -0
- package/dist/packem_shared/flakiness-DSIHZGBT.js +1 -0
- package/dist/packem_shared/otelPlugin-DxyvBcXO.js +1 -0
- package/dist/packem_shared/runtime-check-CGHal8SO.js +1 -0
- package/dist/packem_shared/selectors-CfH9ZY08.js +3 -0
- package/dist/packem_shared/symbols-CIMw60-G.js +1 -0
- package/dist/packem_shared/toolchain-C3ZG0o_X.js +5 -0
- package/dist/packem_shared/typosquats-Bpq4zcWL.js +1 -0
- package/dist/packem_shared/utils-DrNg0XTR.js +1 -0
- package/index.js +555 -727
- package/package.json +29 -19
- package/schemas/project.schema.json +1 -1
- package/schemas/vis-config.schema.json +47 -1
- package/dist/ai-analysis.d.ts +0 -26
- package/dist/ai-cache.d.ts +0 -21
- package/dist/ai-types.d.ts +0 -16
- package/dist/audit-config.d.ts +0 -24
- package/dist/bin.d.ts +0 -1
- package/dist/cache-directory.d.ts +0 -73
- package/dist/catalog.d.ts +0 -136
- package/dist/codeowners.d.ts +0 -30
- package/dist/commands/action-graph.d.ts +0 -8
- package/dist/commands/add.d.ts +0 -3
- package/dist/commands/affected.d.ts +0 -3
- package/dist/commands/ai.d.ts +0 -3
- package/dist/commands/analyze.d.ts +0 -3
- package/dist/commands/approve-builds.d.ts +0 -3
- package/dist/commands/audit.d.ts +0 -23
- package/dist/commands/cache.d.ts +0 -86
- package/dist/commands/check.d.ts +0 -3
- package/dist/commands/ci.d.ts +0 -19
- package/dist/commands/clean.d.ts +0 -3
- package/dist/commands/create/discovery.d.ts +0 -42
- package/dist/commands/create/index.d.ts +0 -13
- package/dist/commands/create/prompts.d.ts +0 -31
- package/dist/commands/create/random-name.d.ts +0 -15
- package/dist/commands/create/templates/builtin.d.ts +0 -15
- package/dist/commands/create/templates/generator.d.ts +0 -14
- package/dist/commands/create/templates/index.d.ts +0 -13
- package/dist/commands/create/templates/monorepo.d.ts +0 -16
- package/dist/commands/create/templates/remote.d.ts +0 -41
- package/dist/commands/create/templates/types.d.ts +0 -46
- package/dist/commands/create/utils.d.ts +0 -42
- package/dist/commands/dedupe.d.ts +0 -3
- package/dist/commands/devcontainer.d.ts +0 -3
- package/dist/commands/dlx.d.ts +0 -3
- package/dist/commands/docker.d.ts +0 -22
- package/dist/commands/doctor.d.ts +0 -15
- package/dist/commands/exec.d.ts +0 -3
- package/dist/commands/generate.d.ts +0 -10
- package/dist/commands/graph.d.ts +0 -3
- package/dist/commands/hook/constants.d.ts +0 -8
- package/dist/commands/hook/index.d.ts +0 -3
- package/dist/commands/hook/install.d.ts +0 -7
- package/dist/commands/hook/migrate.d.ts +0 -27
- package/dist/commands/hook/uninstall.d.ts +0 -3
- package/dist/commands/ignore-helpers.d.ts +0 -157
- package/dist/commands/ignore.d.ts +0 -17
- package/dist/commands/implode.d.ts +0 -3
- package/dist/commands/info.d.ts +0 -3
- package/dist/commands/init.d.ts +0 -14
- package/dist/commands/install.d.ts +0 -3
- package/dist/commands/link.d.ts +0 -3
- package/dist/commands/list.d.ts +0 -3
- package/dist/commands/migrate/backup.d.ts +0 -8
- package/dist/commands/migrate/constants.d.ts +0 -16
- package/dist/commands/migrate/deps.d.ts +0 -32
- package/dist/commands/migrate/gitleaks.d.ts +0 -29
- package/dist/commands/migrate/index.d.ts +0 -3
- package/dist/commands/migrate/json.d.ts +0 -22
- package/dist/commands/migrate/kingfisher.d.ts +0 -14
- package/dist/commands/migrate/lint-staged.d.ts +0 -62
- package/dist/commands/migrate/moon.d.ts +0 -5
- package/dist/commands/migrate/nano-staged.d.ts +0 -30
- package/dist/commands/migrate/nx.d.ts +0 -12
- package/dist/commands/migrate/prompt.d.ts +0 -2
- package/dist/commands/migrate/secretlint.d.ts +0 -14
- package/dist/commands/migrate/shared.d.ts +0 -29
- package/dist/commands/migrate/turborepo.d.ts +0 -11
- package/dist/commands/migrate/types.d.ts +0 -27
- package/dist/commands/migrate/verify.d.ts +0 -12
- package/dist/commands/optimize.d.ts +0 -38
- package/dist/commands/pm.d.ts +0 -3
- package/dist/commands/remove.d.ts +0 -3
- package/dist/commands/run.d.ts +0 -16
- package/dist/commands/sbom.d.ts +0 -10
- package/dist/commands/secrets.d.ts +0 -3
- package/dist/commands/sort-package-json.d.ts +0 -3
- package/dist/commands/staged.d.ts +0 -10
- package/dist/commands/status.d.ts +0 -3
- package/dist/commands/sync.d.ts +0 -16
- package/dist/commands/task-why.d.ts +0 -3
- package/dist/commands/unlink.d.ts +0 -3
- package/dist/commands/update.d.ts +0 -3
- package/dist/commands/upgrade.d.ts +0 -3
- package/dist/commands/why.d.ts +0 -3
- package/dist/docker.d.ts +0 -73
- package/dist/flakiness.d.ts +0 -40
- package/dist/generate/discover.d.ts +0 -29
- package/dist/generate/loader.d.ts +0 -15
- package/dist/generate/moon-adapter/filename-interp.d.ts +0 -42
- package/dist/generate/moon-adapter/filters.d.ts +0 -22
- package/dist/generate/moon-adapter/frontmatter.d.ts +0 -39
- package/dist/generate/moon-adapter/index.d.ts +0 -19
- package/dist/generate/moon-adapter/tera-subset.d.ts +0 -85
- package/dist/generate/moon-adapter/util.d.ts +0 -14
- package/dist/generate/prompts.d.ts +0 -25
- package/dist/generate/remote.d.ts +0 -43
- package/dist/generate/runner.d.ts +0 -37
- package/dist/generate/types.d.ts +0 -152
- package/dist/hooks.d.ts +0 -118
- package/dist/native-binding.d.ts +0 -158
- package/dist/output.d.ts +0 -40
- package/dist/overrides.d.ts +0 -82
- package/dist/package-manager.d.ts +0 -23
- package/dist/packem_shared/otelPlugin-CJLkguJ8.js +0 -1
- package/dist/plugins/config-loader.d.ts +0 -3
- package/dist/plugins/otel.d.ts +0 -63
- package/dist/plugins/post-command.d.ts +0 -3
- package/dist/plugins/security-enforcement.d.ts +0 -3
- package/dist/pm-runner.d.ts +0 -44
- package/dist/run-report.d.ts +0 -40
- package/dist/runtime-check.d.ts +0 -27
- package/dist/sbom/cyclonedx.d.ts +0 -39
- package/dist/sbom/installed-package.d.ts +0 -49
- package/dist/sbom/license.d.ts +0 -31
- package/dist/sbom/lockfile.d.ts +0 -34
- package/dist/sbom/purl.d.ts +0 -25
- package/dist/sbom/resolve-specifier.d.ts +0 -24
- package/dist/sbom/types.d.ts +0 -196
- package/dist/secrets/baseline.d.ts +0 -20
- package/dist/secrets/format.d.ts +0 -14
- package/dist/secrets/git.d.ts +0 -6
- package/dist/secrets/spinner.d.ts +0 -9
- package/dist/security.d.ts +0 -64
- package/dist/selectors.d.ts +0 -81
- package/dist/shell-history.d.ts +0 -16
- package/dist/socket-security.d.ts +0 -129
- package/dist/staged/cli-parse.d.ts +0 -18
- package/dist/staged/config.d.ts +0 -14
- package/dist/staged/errors/apply-empty-commit-error.d.ts +0 -4
- package/dist/staged/errors/config-error.d.ts +0 -4
- package/dist/staged/errors/get-backup-stash-error.d.ts +0 -4
- package/dist/staged/errors/git-error.d.ts +0 -6
- package/dist/staged/errors/index.d.ts +0 -12
- package/dist/staged/errors/restore-original-state-error.d.ts +0 -4
- package/dist/staged/errors/staged-error.d.ts +0 -8
- package/dist/staged/errors/task-error.d.ts +0 -6
- package/dist/staged/git/diff.d.ts +0 -76
- package/dist/staged/git/exec.d.ts +0 -43
- package/dist/staged/git/index.d.ts +0 -77
- package/dist/staged/git/stash.d.ts +0 -37
- package/dist/staged/index.d.ts +0 -13
- package/dist/staged/match.d.ts +0 -12
- package/dist/staged/renderer/index.d.ts +0 -9
- package/dist/staged/renderer/ink/index.d.ts +0 -4
- package/dist/staged/renderer/plain.d.ts +0 -12
- package/dist/staged/tasks/build.d.ts +0 -13
- package/dist/staged/tasks/exec.d.ts +0 -56
- package/dist/staged/tasks/run.d.ts +0 -26
- package/dist/staged/types.d.ts +0 -173
- package/dist/target-discovery.d.ts +0 -59
- package/dist/target-options.d.ts +0 -261
- package/dist/tips.d.ts +0 -41
- package/dist/tui/components/CheckProgressApp.d.ts +0 -6
- package/dist/tui/components/CommandSummary.d.ts +0 -17
- package/dist/tui/components/Header.d.ts +0 -13
- package/dist/tui/components/OutputPanel.d.ts +0 -17
- package/dist/tui/components/QuitDialog.d.ts +0 -15
- package/dist/tui/components/TaskListPanel.d.ts +0 -19
- package/dist/tui/components/TaskRow.d.ts +0 -12
- package/dist/tui/components/TaskStore.d.ts +0 -80
- package/dist/tui/components/VisTaskRunnerApp.d.ts +0 -17
- package/dist/tui/components/devcontainer/DevcontainerStore.d.ts +0 -66
- package/dist/tui/components/devcontainer/VisDevcontainerApp.d.ts +0 -9
- package/dist/tui/components/devcontainer/catalogs/extensions.d.ts +0 -8
- package/dist/tui/components/devcontainer/catalogs/features.d.ts +0 -8
- package/dist/tui/components/devcontainer/catalogs/filters.d.ts +0 -4
- package/dist/tui/components/devcontainer/catalogs/mount-suggestions.d.ts +0 -19
- package/dist/tui/components/devcontainer/catalogs/templates.d.ts +0 -8
- package/dist/tui/components/devcontainer/devcontainer-io.d.ts +0 -14
- package/dist/tui/components/devcontainer/sections/DockerComposeSection.d.ts +0 -11
- package/dist/tui/components/devcontainer/sections/EnvironmentSection.d.ts +0 -16
- package/dist/tui/components/devcontainer/sections/ExtensionsSection.d.ts +0 -11
- package/dist/tui/components/devcontainer/sections/FeaturesSection.d.ts +0 -11
- package/dist/tui/components/devcontainer/sections/GeneralSection.d.ts +0 -12
- package/dist/tui/components/devcontainer/sections/LifecycleSection.d.ts +0 -13
- package/dist/tui/components/devcontainer/sections/MountsSection.d.ts +0 -16
- package/dist/tui/components/devcontainer/sections/PortsSection.d.ts +0 -10
- package/dist/tui/components/devcontainer/sections/PreviewPanel.d.ts +0 -11
- package/dist/tui/components/devcontainer/types.d.ts +0 -53
- package/dist/tui/components/devcontainer/validate.d.ts +0 -16
- package/dist/tui/components/graph/GraphStore.d.ts +0 -42
- package/dist/tui/components/graph/ProjectDetailPanel.d.ts +0 -10
- package/dist/tui/components/graph/ProjectListPanel.d.ts +0 -20
- package/dist/tui/components/graph/VisGraphApp.d.ts +0 -8
- package/dist/tui/components/optimize/OptimizeDetailPanel.d.ts +0 -9
- package/dist/tui/components/optimize/OptimizeListPanel.d.ts +0 -16
- package/dist/tui/components/optimize/OptimizeStore.d.ts +0 -50
- package/dist/tui/components/optimize/VisOptimizeApp.d.ts +0 -8
- package/dist/tui/components/optimize/constants.d.ts +0 -7
- package/dist/tui/components/update/PackageDetailPanel.d.ts +0 -12
- package/dist/tui/components/update/PackageListPanel.d.ts +0 -21
- package/dist/tui/components/update/UpdateStore.d.ts +0 -62
- package/dist/tui/components/update/VisUpdateApp.d.ts +0 -18
- package/dist/tui/dynamic-life-cycle.d.ts +0 -22
- package/dist/tui/formatting-utils.d.ts +0 -17
- package/dist/tui/pretty-time.d.ts +0 -8
- package/dist/tui/static-life-cycle.d.ts +0 -28
- package/dist/tui/status-utils.d.ts +0 -20
- package/dist/tui/symbols.d.ts +0 -7
- package/dist/tui/types.d.ts +0 -11
- package/dist/typosquats.d.ts +0 -70
- package/dist/upgrade-check.d.ts +0 -30
- package/dist/utils.d.ts +0 -22
- package/dist/watch.d.ts +0 -65
- package/dist/workspace.d.ts +0 -675
package/index.js
CHANGED
|
@@ -4,770 +4,598 @@
|
|
|
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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.8' && 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.8 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.5" && 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.5 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
|
-
if (
|
|
244
|
-
bindingPackageVersion !== "1.0.0-alpha.5" &&
|
|
245
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
246
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
247
|
-
) {
|
|
248
|
-
throw new Error(
|
|
249
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
250
|
-
);
|
|
251
|
-
}
|
|
252
|
-
return binding;
|
|
253
|
-
} catch (e) {
|
|
254
|
-
loadErrors.push(e);
|
|
255
|
-
}
|
|
256
|
-
} else if (process.arch === "arm64") {
|
|
257
|
-
try {
|
|
258
|
-
return require("./vis-native.darwin-arm64.node");
|
|
259
|
-
} catch (e) {
|
|
260
|
-
loadErrors.push(e);
|
|
261
|
-
}
|
|
262
|
-
try {
|
|
263
|
-
const binding = require("@visulima/vis-binding-darwin-arm64");
|
|
264
|
-
const bindingPackageVersion = require("@visulima/vis-binding-darwin-arm64/package.json").version;
|
|
265
|
-
if (
|
|
266
|
-
bindingPackageVersion !== "1.0.0-alpha.5" &&
|
|
267
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
268
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
269
|
-
) {
|
|
270
|
-
throw new Error(
|
|
271
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
272
|
-
);
|
|
273
|
-
}
|
|
274
|
-
return binding;
|
|
275
|
-
} catch (e) {
|
|
276
|
-
loadErrors.push(e);
|
|
277
|
-
}
|
|
278
|
-
} else {
|
|
279
|
-
loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`));
|
|
280
|
-
}
|
|
281
|
-
} else if (process.platform === "freebsd") {
|
|
282
|
-
if (process.arch === "x64") {
|
|
283
|
-
try {
|
|
284
|
-
return require("./vis-native.freebsd-x64.node");
|
|
285
|
-
} catch (e) {
|
|
286
|
-
loadErrors.push(e);
|
|
287
|
-
}
|
|
288
|
-
try {
|
|
289
|
-
const binding = require("@visulima/vis-binding-freebsd-x64");
|
|
290
|
-
const bindingPackageVersion = require("@visulima/vis-binding-freebsd-x64/package.json").version;
|
|
291
|
-
if (
|
|
292
|
-
bindingPackageVersion !== "1.0.0-alpha.5" &&
|
|
293
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
294
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
295
|
-
) {
|
|
296
|
-
throw new Error(
|
|
297
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
298
|
-
);
|
|
299
|
-
}
|
|
300
|
-
return binding;
|
|
301
|
-
} catch (e) {
|
|
302
|
-
loadErrors.push(e);
|
|
303
|
-
}
|
|
304
|
-
} else if (process.arch === "arm64") {
|
|
305
|
-
try {
|
|
306
|
-
return require("./vis-native.freebsd-arm64.node");
|
|
307
|
-
} catch (e) {
|
|
308
|
-
loadErrors.push(e);
|
|
309
|
-
}
|
|
310
|
-
try {
|
|
311
|
-
const binding = require("@visulima/vis-binding-freebsd-arm64");
|
|
312
|
-
const bindingPackageVersion = require("@visulima/vis-binding-freebsd-arm64/package.json").version;
|
|
313
|
-
if (
|
|
314
|
-
bindingPackageVersion !== "1.0.0-alpha.5" &&
|
|
315
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
316
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
317
|
-
) {
|
|
318
|
-
throw new Error(
|
|
319
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
320
|
-
);
|
|
321
|
-
}
|
|
322
|
-
return binding;
|
|
323
|
-
} catch (e) {
|
|
324
|
-
loadErrors.push(e);
|
|
325
|
-
}
|
|
326
|
-
} else {
|
|
327
|
-
loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
|
|
328
|
-
}
|
|
329
|
-
} else if (process.platform === "linux") {
|
|
330
|
-
if (process.arch === "x64") {
|
|
331
|
-
if (isMusl()) {
|
|
332
|
-
try {
|
|
333
|
-
return require("./vis-native.linux-x64-musl.node");
|
|
334
|
-
} catch (e) {
|
|
335
|
-
loadErrors.push(e);
|
|
336
|
-
}
|
|
337
|
-
try {
|
|
338
|
-
const binding = require("@visulima/vis-binding-linux-x64-musl");
|
|
339
|
-
const bindingPackageVersion = require("@visulima/vis-binding-linux-x64-musl/package.json").version;
|
|
340
|
-
if (
|
|
341
|
-
bindingPackageVersion !== "1.0.0-alpha.5" &&
|
|
342
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
343
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
344
|
-
) {
|
|
345
|
-
throw new Error(
|
|
346
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
347
|
-
);
|
|
348
|
-
}
|
|
349
|
-
return binding;
|
|
350
|
-
} catch (e) {
|
|
351
|
-
loadErrors.push(e);
|
|
352
|
-
}
|
|
353
|
-
} else {
|
|
354
|
-
try {
|
|
355
|
-
return require("./vis-native.linux-x64-gnu.node");
|
|
356
|
-
} catch (e) {
|
|
357
|
-
loadErrors.push(e);
|
|
358
|
-
}
|
|
359
|
-
try {
|
|
360
|
-
const binding = require("@visulima/vis-binding-linux-x64-gnu");
|
|
361
|
-
const bindingPackageVersion = require("@visulima/vis-binding-linux-x64-gnu/package.json").version;
|
|
362
|
-
if (
|
|
363
|
-
bindingPackageVersion !== "1.0.0-alpha.5" &&
|
|
364
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
365
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
366
|
-
) {
|
|
367
|
-
throw new Error(
|
|
368
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
369
|
-
);
|
|
370
|
-
}
|
|
371
|
-
return binding;
|
|
372
|
-
} catch (e) {
|
|
373
|
-
loadErrors.push(e);
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
} else if (process.arch === "arm64") {
|
|
377
|
-
if (isMusl()) {
|
|
378
|
-
try {
|
|
379
|
-
return require("./vis-native.linux-arm64-musl.node");
|
|
380
|
-
} catch (e) {
|
|
381
|
-
loadErrors.push(e);
|
|
382
|
-
}
|
|
383
|
-
try {
|
|
384
|
-
const binding = require("@visulima/vis-binding-linux-arm64-musl");
|
|
385
|
-
const bindingPackageVersion = require("@visulima/vis-binding-linux-arm64-musl/package.json").version;
|
|
386
|
-
if (
|
|
387
|
-
bindingPackageVersion !== "1.0.0-alpha.5" &&
|
|
388
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
389
|
-
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
390
|
-
) {
|
|
391
|
-
throw new Error(
|
|
392
|
-
`Native binding package version mismatch, expected 1.0.0-alpha.5 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.5" &&
|
|
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.5 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.8' && 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.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
296
|
+
}
|
|
297
|
+
return binding
|
|
298
|
+
} catch (e) {
|
|
299
|
+
loadErrors.push(e)
|
|
676
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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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.8' && 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.8 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()
|
|
683
531
|
|
|
684
532
|
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
685
|
-
|
|
686
|
-
|
|
533
|
+
let wasiBinding = null
|
|
534
|
+
let wasiBindingError = null
|
|
535
|
+
try {
|
|
536
|
+
wasiBinding = require('./vis-native.wasi.cjs')
|
|
537
|
+
nativeBinding = wasiBinding
|
|
538
|
+
} catch (err) {
|
|
539
|
+
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
540
|
+
wasiBindingError = err
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
687
544
|
try {
|
|
688
|
-
|
|
689
|
-
|
|
545
|
+
wasiBinding = require('@visulima/vis-binding-wasm32-wasi')
|
|
546
|
+
nativeBinding = wasiBinding
|
|
690
547
|
} 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
|
-
}
|
|
548
|
+
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
549
|
+
if (!wasiBindingError) {
|
|
550
|
+
wasiBindingError = err
|
|
551
|
+
} else {
|
|
552
|
+
wasiBindingError.cause = err
|
|
708
553
|
}
|
|
554
|
+
loadErrors.push(err)
|
|
555
|
+
}
|
|
709
556
|
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
557
|
+
}
|
|
558
|
+
if (process.env.NAPI_RS_FORCE_WASI === 'error' && !wasiBinding) {
|
|
559
|
+
const error = new Error('WASI binding not found and NAPI_RS_FORCE_WASI is set to error')
|
|
560
|
+
error.cause = wasiBindingError
|
|
561
|
+
throw error
|
|
562
|
+
}
|
|
715
563
|
}
|
|
716
564
|
|
|
717
565
|
if (!nativeBinding) {
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
566
|
+
if (loadErrors.length > 0) {
|
|
567
|
+
throw new Error(
|
|
568
|
+
`Cannot find native binding. ` +
|
|
569
|
+
`npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
|
|
570
|
+
'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
|
|
571
|
+
{
|
|
572
|
+
cause: loadErrors.reduce((err, cur) => {
|
|
573
|
+
cur.cause = err
|
|
574
|
+
return cur
|
|
575
|
+
}),
|
|
576
|
+
},
|
|
577
|
+
)
|
|
578
|
+
}
|
|
579
|
+
throw new Error(`Failed to load native binding`)
|
|
732
580
|
}
|
|
733
581
|
|
|
734
|
-
const {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
} = nativeBinding;
|
|
755
|
-
export { cleanWorkspace };
|
|
756
|
-
export { detectPackageManager };
|
|
757
|
-
export { execPmCommand };
|
|
758
|
-
export { execPmCommandInteractive };
|
|
759
|
-
export { NATIVE_BINDING_VERSION };
|
|
760
|
-
export { resolveAdd };
|
|
761
|
-
export { resolveDedupe };
|
|
762
|
-
export { resolveDlx };
|
|
763
|
-
export { resolveExec };
|
|
764
|
-
export { resolveInstall };
|
|
765
|
-
export { resolveLink };
|
|
766
|
-
export { resolveOutdated };
|
|
767
|
-
export { resolvePmCommand };
|
|
768
|
-
export { resolveRemove };
|
|
769
|
-
export { resolveUnlink };
|
|
770
|
-
export { resolveWhy };
|
|
771
|
-
export { sortPackageJsonString };
|
|
772
|
-
export { sortPackageJsonStringWithOptions };
|
|
773
|
-
export { whichBin };
|
|
582
|
+
const { cleanWorkspace, detectPackageManager, execPmCommand, execPmCommandInteractive, NATIVE_BINDING_VERSION, resolveAdd, resolveDedupe, resolveDlx, resolveExec, resolveInstall, resolveLink, resolveOutdated, resolvePmCommand, resolveRemove, resolveUnlink, resolveWhy, sortPackageJsonString, sortPackageJsonStringWithOptions, whichBin } = nativeBinding
|
|
583
|
+
export { cleanWorkspace }
|
|
584
|
+
export { detectPackageManager }
|
|
585
|
+
export { execPmCommand }
|
|
586
|
+
export { execPmCommandInteractive }
|
|
587
|
+
export { NATIVE_BINDING_VERSION }
|
|
588
|
+
export { resolveAdd }
|
|
589
|
+
export { resolveDedupe }
|
|
590
|
+
export { resolveDlx }
|
|
591
|
+
export { resolveExec }
|
|
592
|
+
export { resolveInstall }
|
|
593
|
+
export { resolveLink }
|
|
594
|
+
export { resolveOutdated }
|
|
595
|
+
export { resolvePmCommand }
|
|
596
|
+
export { resolveRemove }
|
|
597
|
+
export { resolveUnlink }
|
|
598
|
+
export { resolveWhy }
|
|
599
|
+
export { sortPackageJsonString }
|
|
600
|
+
export { sortPackageJsonStringWithOptions }
|
|
601
|
+
export { whichBin }
|