@visulima/vis 6.5.4 → 6.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/bin/vis.mjs +5 -1
  3. package/dist/bin.js +1 -1
  4. package/dist/binx.js +1 -1
  5. package/dist/config/index.d.ts +17 -2
  6. package/dist/packem_chunks/bloom-sync.js +1 -1
  7. package/dist/packem_chunks/catalog.js +1 -1
  8. package/dist/packem_chunks/cli-exec.js +1 -1
  9. package/dist/packem_chunks/cli-main.js +182 -151
  10. package/dist/packem_chunks/fix.js +1 -1
  11. package/dist/packem_chunks/handler10.js +1 -1
  12. package/dist/packem_chunks/handler12.js +1 -1
  13. package/dist/packem_chunks/handler13.js +1 -1
  14. package/dist/packem_chunks/handler14.js +1 -1
  15. package/dist/packem_chunks/handler15.js +1 -1
  16. package/dist/packem_chunks/handler19.js +1 -1
  17. package/dist/packem_chunks/handler2.js +1 -1
  18. package/dist/packem_chunks/handler20.js +1 -1
  19. package/dist/packem_chunks/handler21.js +1 -1
  20. package/dist/packem_chunks/handler22.js +2 -2
  21. package/dist/packem_chunks/handler23.js +1 -1
  22. package/dist/packem_chunks/handler24.js +1 -1
  23. package/dist/packem_chunks/handler25.js +1 -1
  24. package/dist/packem_chunks/handler26.js +1 -1
  25. package/dist/packem_chunks/handler28.js +1 -1
  26. package/dist/packem_chunks/handler3.js +1 -1
  27. package/dist/packem_chunks/handler4.js +1 -1
  28. package/dist/packem_chunks/handler5.js +1 -1
  29. package/dist/packem_chunks/handler50.js +2 -2
  30. package/dist/packem_chunks/handler51.js +1 -1
  31. package/dist/packem_chunks/handler52.js +1 -1
  32. package/dist/packem_chunks/handler54.js +1 -1
  33. package/dist/packem_chunks/handler55.js +1 -1
  34. package/dist/packem_chunks/handler58.js +3 -3
  35. package/dist/packem_chunks/handler59.js +1 -1
  36. package/dist/packem_chunks/handler6.js +1 -1
  37. package/dist/packem_chunks/handler60.js +1 -1
  38. package/dist/packem_chunks/handler61.js +2 -2
  39. package/dist/packem_chunks/handler62.js +1 -1
  40. package/dist/packem_chunks/handler63.js +1 -1
  41. package/dist/packem_chunks/handler64.js +5 -5
  42. package/dist/packem_chunks/handler65.js +3 -3
  43. package/dist/packem_chunks/handler66.js +3 -3
  44. package/dist/packem_chunks/handler67.js +1 -1
  45. package/dist/packem_chunks/handler68.js +1 -1
  46. package/dist/packem_chunks/handler69.js +1 -1
  47. package/dist/packem_chunks/handler7.js +1 -1
  48. package/dist/packem_chunks/handler70.js +1 -1
  49. package/dist/packem_chunks/handler71.js +1 -1
  50. package/dist/packem_chunks/handler72.js +1 -1
  51. package/dist/packem_chunks/handler73.js +1 -1
  52. package/dist/packem_chunks/handler74.js +1 -1
  53. package/dist/packem_chunks/handler75.js +15 -15
  54. package/dist/packem_chunks/handler76.js +1 -1
  55. package/dist/packem_chunks/handler77.js +10 -10
  56. package/dist/packem_chunks/handler78.js +2 -2
  57. package/dist/packem_chunks/handler79.js +1 -1
  58. package/dist/packem_chunks/handler8.js +1 -1
  59. package/dist/packem_chunks/heal.js +1 -1
  60. package/dist/packem_chunks/help-command.js +1 -1
  61. package/dist/packem_chunks/index7.js +1 -1
  62. package/dist/packem_chunks/keys-refresh.js +1 -1
  63. package/dist/packem_chunks/list.js +1 -1
  64. package/dist/packem_chunks/prune.js +1 -1
  65. package/dist/packem_chunks/status.js +1 -1
  66. package/dist/packem_chunks/sync.js +1 -1
  67. package/dist/packem_chunks/sync2.js +1 -1
  68. package/dist/packem_chunks/tripwire.js +1 -1
  69. package/dist/packem_chunks/verify-lockfile.js +1 -1
  70. package/dist/packem_shared/{advisories-CIk-GN4f.js → advisories-C803XIyf.js} +1 -1
  71. package/dist/packem_shared/{affected-selection-KJi4PXE2.js → affected-selection-N_hH7E2F.js} +1 -1
  72. package/dist/packem_shared/{ai-analysis-DsN-OIWD.js → ai-analysis-Cl0z4yyY.js} +1 -1
  73. package/dist/packem_shared/{ai-cache-oP-8Vvho.js → ai-cache-62Q75Ohc.js} +1 -1
  74. package/dist/packem_shared/{ai-fix-BpRmbHRB.js → ai-fix-B5o7o8D0.js} +1 -1
  75. package/dist/packem_shared/{bin-C6pXyVPL.js → bin-Dg4DTW2J.js} +1 -1
  76. package/dist/packem_shared/{build-scripts-AqY7IQy0.js → build-scripts-DXEaKPbM.js} +1 -1
  77. package/dist/packem_shared/{dependency-scan-Blpo9KJB.js → dependency-scan-DRigy-Ce.js} +1 -1
  78. package/dist/packem_shared/{detect-DLTcax9j.js → detect-Cy4J0ZzQ.js} +1 -1
  79. package/dist/packem_shared/{docker-IMan-ReQ.js → docker-eH4IgLNI.js} +1 -1
  80. package/dist/packem_shared/{ecosystem-gate-DYE1xbEA.js → ecosystem-gate-Bn-P4Yqx.js} +1 -1
  81. package/dist/packem_shared/{env-B-rXCpnL.js → env-B_MqQz0I.js} +1 -1
  82. package/dist/packem_shared/{env-consistency-LGwaZrb4.js → env-consistency-C-gPg1z7.js} +1 -1
  83. package/dist/packem_shared/{failure-log-CqOSmCst.js → failure-log-TINPmB_Y.js} +1 -1
  84. package/dist/packem_shared/glob-Cyk1H9ZL-BcU6BdWa.js +1 -0
  85. package/dist/packem_shared/{index-Zn2hE0HC.js → index-DUGTZGN1.js} +1 -1
  86. package/dist/packem_shared/{index-xHwdLedQ.js → index-DV9plm6F.js} +1 -1
  87. package/dist/packem_shared/{lifecycle-7cCIImyz.js → lifecycle-C2j-_yjz.js} +1 -1
  88. package/dist/packem_shared/{manifests-Cv-l6E7h.js → manifests-Dxq09rdz.js} +1 -1
  89. package/dist/packem_shared/{min-release-age-CZ3XkoSx.js → min-release-age-lSu9fMQU.js} +1 -1
  90. package/dist/packem_shared/{missing-package-json-KsrtjpfC.js → missing-package-json-DX1OyAgd.js} +1 -1
  91. package/dist/packem_shared/{multi-eco-lockfiles-BUNeBCB3.js → multi-eco-lockfiles-BBdBBERS.js} +1 -1
  92. package/dist/packem_shared/{native-config-sync-BpOioKS7.js → native-config-sync-CDV3izkE.js} +1 -1
  93. package/dist/packem_shared/{osv-BrN069IK.js → osv-zlqqFEue.js} +1 -1
  94. package/dist/packem_shared/{package-version-Ba3NbtCc.js → package-version-ilIDuvbM.js} +1 -1
  95. package/dist/packem_shared/{packument-D7knSKP-.js → packument-DgfV5ebL.js} +1 -1
  96. package/dist/packem_shared/{project-name-filter-B5MeWa0B.js → project-name-filter-Bav_usE5.js} +1 -1
  97. package/dist/packem_shared/{provenance-BhdcS8on.js → provenance-iyO7oSbr.js} +1 -1
  98. package/dist/packem_shared/{registry-Bd3v810N.js → registry-DiFjkq9L.js} +41 -41
  99. package/dist/packem_shared/{registry-keys-ChCCi6gS.js → registry-keys-PoCGGEQU.js} +1 -1
  100. package/dist/packem_shared/{renderToString-DR0zDUjh-bM18Jav2.js → renderToString-DR0zDUjh-DIy97Cvo.js} +1 -1
  101. package/dist/packem_shared/{resolve-explicit-CR284YhP.js → resolve-explicit-BxXTTACy.js} +1 -1
  102. package/dist/packem_shared/{run-summary-utils-CnHppdTd.js → run-summary-utils-CWtpwjB-.js} +1 -1
  103. package/dist/packem_shared/{runtime-check-ra6RgZPE.js → runtime-check-B2_65Qxg.js} +1 -1
  104. package/dist/packem_shared/{s1ngularity-D16SlxEN.js → s1ngularity-2ULYV9dv.js} +1 -1
  105. package/dist/packem_shared/{scaffold-files-U8MRP9xv.js → scaffold-files-ljwdtNix.js} +1 -1
  106. package/dist/packem_shared/{scan-progress-DXLRdiC0.js → scan-progress-Bg2J2LtK.js} +1 -1
  107. package/dist/packem_shared/{selectors-D66zhaRy.js → selectors-CZt_FK38.js} +1 -1
  108. package/dist/packem_shared/{signatures-Cpzgkrts.js → signatures-wQxWdScn.js} +1 -1
  109. package/dist/packem_shared/{spinner-rjP357lg.js → spinner-DqhHeEEh.js} +1 -1
  110. package/dist/packem_shared/{table-WHMzV10O.js → table-DWrn2wa0.js} +1 -1
  111. package/dist/packem_shared/{tabs-Zg0TBeDz.js → tabs-CPZha41U.js} +1 -1
  112. package/dist/packem_shared/{toolchain-BT5Wf134.js → toolchain-B7MSc6S4.js} +1 -1
  113. package/dist/packem_shared/{typosquats-D23HsChp.js → typosquats-CCM8oyg7.js} +1 -1
  114. package/dist/packem_shared/{use-measured-height-C074njW2.js → use-measured-height-Zz5Edg6J.js} +1 -1
  115. package/dist/packem_shared/{vis-update-app-aXnF7iVf.js → vis-update-app-CouPhMGg.js} +1 -1
  116. package/dist/packem_shared/{vis-user-error-CyyTUwX4.js → vis-user-error-Ceb7hJQW.js} +1 -1
  117. package/dist/packem_shared/{watch-loop--dOgMJ2f.js → watch-loop-CY-QsO2E.js} +1 -1
  118. package/index.d.ts +213 -204
  119. package/index.js +231 -104
  120. package/package.json +9 -9
  121. package/schemas/project.schema.json +9 -2
  122. package/schemas/vis-config.schema.json +11 -4
  123. package/schemas/vis-release-config.schema.json +2 -2
  124. package/dist/packem_shared/glob-Cyk1H9ZL-D05BMypC.js +0 -1
package/index.js CHANGED
@@ -1,14 +1,16 @@
1
- // prettier-ignore
2
1
  /* eslint-disable */
3
2
  // @ts-nocheck
4
3
  /* auto-generated by NAPI-RS */
5
4
 
6
5
  import { createRequire } from 'module'
7
6
  const require = createRequire(import.meta.url)
8
- const __dirname = new URL('.', import.meta.url).pathname
9
7
 
10
8
  const { readFileSync } = require('fs')
11
9
  let nativeBinding = null
10
+ // Which artifact actually loaded. The WASI fallback chain overwrites it with
11
+ // the flavor it resolved; the late native retry below leaves it alone because
12
+ // it only runs while no WASI candidate has been loaded.
13
+ let __napiLoadedBindingTarget = 'native'
12
14
  const loadErrors = []
13
15
 
14
16
  const isMusl = () => {
@@ -67,7 +69,16 @@ const isMuslFromChildProcess = () => {
67
69
  function requireNative() {
68
70
  if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
69
71
  try {
70
- return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
72
+ const overrideBinding = require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)
73
+ // The override may be a generated WASI loader, which already reports its
74
+ // own flavor. Adopt it: `module.exports` aliases this object, so claiming
75
+ // 'native' would both misreport the artifact and overwrite the loader's
76
+ // marker through the alias.
77
+ __napiLoadedBindingTarget =
78
+ overrideBinding && typeof overrideBinding.__napiBindingTarget === 'string'
79
+ ? overrideBinding.__napiBindingTarget
80
+ : 'native'
81
+ return overrideBinding
71
82
  } catch (err) {
72
83
  loadErrors.push(err)
73
84
  }
@@ -81,8 +92,8 @@ function requireNative() {
81
92
  try {
82
93
  const binding = require('@visulima/vis-binding-android-arm64')
83
94
  const bindingPackageVersion = require('@visulima/vis-binding-android-arm64/package.json').version
84
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
95
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
96
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
86
97
  }
87
98
  return binding
88
99
  } catch (e) {
@@ -97,8 +108,8 @@ function requireNative() {
97
108
  try {
98
109
  const binding = require('@visulima/vis-binding-android-arm-eabi')
99
110
  const bindingPackageVersion = require('@visulima/vis-binding-android-arm-eabi/package.json').version
100
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
111
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
112
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
102
113
  }
103
114
  return binding
104
115
  } catch (e) {
@@ -111,36 +122,36 @@ function requireNative() {
111
122
  if (process.arch === 'x64') {
112
123
  if ((process.config && process.config.variables && process.config.variables.shlib_suffix === 'dll.a') || (process.config && process.config.variables && process.config.variables.node_target_type === 'shared_library')) {
113
124
  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 !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
125
+ return require('./vis-native.win32-x64-gnu.node')
126
+ } catch (e) {
127
+ loadErrors.push(e)
128
+ }
129
+ try {
130
+ const binding = require('@visulima/vis-binding-win32-x64-gnu')
131
+ const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-gnu/package.json').version
132
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
133
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
134
+ }
135
+ return binding
136
+ } catch (e) {
137
+ loadErrors.push(e)
123
138
  }
124
- return binding
125
- } catch (e) {
126
- loadErrors.push(e)
127
- }
128
139
  } else {
129
140
  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 !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
141
+ return require('./vis-native.win32-x64-msvc.node')
142
+ } catch (e) {
143
+ loadErrors.push(e)
144
+ }
145
+ try {
146
+ const binding = require('@visulima/vis-binding-win32-x64-msvc')
147
+ const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-msvc/package.json').version
148
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
149
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
150
+ }
151
+ return binding
152
+ } catch (e) {
153
+ loadErrors.push(e)
139
154
  }
140
- return binding
141
- } catch (e) {
142
- loadErrors.push(e)
143
- }
144
155
  }
145
156
  } else if (process.arch === 'ia32') {
146
157
  try {
@@ -151,8 +162,8 @@ function requireNative() {
151
162
  try {
152
163
  const binding = require('@visulima/vis-binding-win32-ia32-msvc')
153
164
  const bindingPackageVersion = require('@visulima/vis-binding-win32-ia32-msvc/package.json').version
154
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
165
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
166
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
156
167
  }
157
168
  return binding
158
169
  } catch (e) {
@@ -167,8 +178,8 @@ function requireNative() {
167
178
  try {
168
179
  const binding = require('@visulima/vis-binding-win32-arm64-msvc')
169
180
  const bindingPackageVersion = require('@visulima/vis-binding-win32-arm64-msvc/package.json').version
170
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
181
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
182
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
172
183
  }
173
184
  return binding
174
185
  } catch (e) {
@@ -186,8 +197,8 @@ function requireNative() {
186
197
  try {
187
198
  const binding = require('@visulima/vis-binding-darwin-universal')
188
199
  const bindingPackageVersion = require('@visulima/vis-binding-darwin-universal/package.json').version
189
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
200
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
201
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
191
202
  }
192
203
  return binding
193
204
  } catch (e) {
@@ -202,8 +213,8 @@ function requireNative() {
202
213
  try {
203
214
  const binding = require('@visulima/vis-binding-darwin-x64')
204
215
  const bindingPackageVersion = require('@visulima/vis-binding-darwin-x64/package.json').version
205
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
216
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
217
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
207
218
  }
208
219
  return binding
209
220
  } catch (e) {
@@ -218,8 +229,8 @@ function requireNative() {
218
229
  try {
219
230
  const binding = require('@visulima/vis-binding-darwin-arm64')
220
231
  const bindingPackageVersion = require('@visulima/vis-binding-darwin-arm64/package.json').version
221
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
232
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
233
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
223
234
  }
224
235
  return binding
225
236
  } catch (e) {
@@ -238,8 +249,8 @@ function requireNative() {
238
249
  try {
239
250
  const binding = require('@visulima/vis-binding-freebsd-x64')
240
251
  const bindingPackageVersion = require('@visulima/vis-binding-freebsd-x64/package.json').version
241
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
252
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
253
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
243
254
  }
244
255
  return binding
245
256
  } catch (e) {
@@ -254,8 +265,8 @@ function requireNative() {
254
265
  try {
255
266
  const binding = require('@visulima/vis-binding-freebsd-arm64')
256
267
  const bindingPackageVersion = require('@visulima/vis-binding-freebsd-arm64/package.json').version
257
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
268
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
269
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
259
270
  }
260
271
  return binding
261
272
  } catch (e) {
@@ -275,8 +286,8 @@ function requireNative() {
275
286
  try {
276
287
  const binding = require('@visulima/vis-binding-linux-x64-musl')
277
288
  const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-musl/package.json').version
278
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
289
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
290
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
280
291
  }
281
292
  return binding
282
293
  } catch (e) {
@@ -291,8 +302,8 @@ function requireNative() {
291
302
  try {
292
303
  const binding = require('@visulima/vis-binding-linux-x64-gnu')
293
304
  const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-gnu/package.json').version
294
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
305
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
306
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
296
307
  }
297
308
  return binding
298
309
  } catch (e) {
@@ -309,8 +320,8 @@ function requireNative() {
309
320
  try {
310
321
  const binding = require('@visulima/vis-binding-linux-arm64-musl')
311
322
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-musl/package.json').version
312
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
323
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
324
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
314
325
  }
315
326
  return binding
316
327
  } catch (e) {
@@ -325,8 +336,8 @@ function requireNative() {
325
336
  try {
326
337
  const binding = require('@visulima/vis-binding-linux-arm64-gnu')
327
338
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-gnu/package.json').version
328
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
339
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
340
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
330
341
  }
331
342
  return binding
332
343
  } catch (e) {
@@ -343,8 +354,8 @@ function requireNative() {
343
354
  try {
344
355
  const binding = require('@visulima/vis-binding-linux-arm-musleabihf')
345
356
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-musleabihf/package.json').version
346
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
357
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
358
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
348
359
  }
349
360
  return binding
350
361
  } catch (e) {
@@ -359,8 +370,8 @@ function requireNative() {
359
370
  try {
360
371
  const binding = require('@visulima/vis-binding-linux-arm-gnueabihf')
361
372
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-gnueabihf/package.json').version
362
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
373
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
374
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
364
375
  }
365
376
  return binding
366
377
  } catch (e) {
@@ -377,8 +388,8 @@ function requireNative() {
377
388
  try {
378
389
  const binding = require('@visulima/vis-binding-linux-loong64-musl')
379
390
  const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-musl/package.json').version
380
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
391
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
392
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
382
393
  }
383
394
  return binding
384
395
  } catch (e) {
@@ -393,8 +404,8 @@ function requireNative() {
393
404
  try {
394
405
  const binding = require('@visulima/vis-binding-linux-loong64-gnu')
395
406
  const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-gnu/package.json').version
396
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
407
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
408
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
398
409
  }
399
410
  return binding
400
411
  } catch (e) {
@@ -411,8 +422,8 @@ function requireNative() {
411
422
  try {
412
423
  const binding = require('@visulima/vis-binding-linux-riscv64-musl')
413
424
  const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-musl/package.json').version
414
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
425
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
426
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
416
427
  }
417
428
  return binding
418
429
  } catch (e) {
@@ -427,8 +438,8 @@ function requireNative() {
427
438
  try {
428
439
  const binding = require('@visulima/vis-binding-linux-riscv64-gnu')
429
440
  const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-gnu/package.json').version
430
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
441
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
442
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
432
443
  }
433
444
  return binding
434
445
  } catch (e) {
@@ -444,8 +455,8 @@ function requireNative() {
444
455
  try {
445
456
  const binding = require('@visulima/vis-binding-linux-ppc64-gnu')
446
457
  const bindingPackageVersion = require('@visulima/vis-binding-linux-ppc64-gnu/package.json').version
447
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
458
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
459
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
449
460
  }
450
461
  return binding
451
462
  } catch (e) {
@@ -460,8 +471,8 @@ function requireNative() {
460
471
  try {
461
472
  const binding = require('@visulima/vis-binding-linux-s390x-gnu')
462
473
  const bindingPackageVersion = require('@visulima/vis-binding-linux-s390x-gnu/package.json').version
463
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
474
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
475
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
465
476
  }
466
477
  return binding
467
478
  } catch (e) {
@@ -480,8 +491,8 @@ function requireNative() {
480
491
  try {
481
492
  const binding = require('@visulima/vis-binding-openharmony-arm64')
482
493
  const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm64/package.json').version
483
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
494
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
495
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
485
496
  }
486
497
  return binding
487
498
  } catch (e) {
@@ -496,8 +507,8 @@ function requireNative() {
496
507
  try {
497
508
  const binding = require('@visulima/vis-binding-openharmony-x64')
498
509
  const bindingPackageVersion = require('@visulima/vis-binding-openharmony-x64/package.json').version
499
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
510
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
511
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
501
512
  }
502
513
  return binding
503
514
  } catch (e) {
@@ -512,8 +523,8 @@ function requireNative() {
512
523
  try {
513
524
  const binding = require('@visulima/vis-binding-openharmony-arm')
514
525
  const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm/package.json').version
515
- if (bindingPackageVersion !== '4.3.1' && 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 6.5.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
526
+ if (bindingPackageVersion !== '6.6.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
527
+ throw new Error(`Native binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
517
528
  }
518
529
  return binding
519
530
  } catch (e) {
@@ -527,47 +538,165 @@ function requireNative() {
527
538
  }
528
539
  }
529
540
 
530
- nativeBinding = requireNative()
541
+ function createLoadErrorChain(errors) {
542
+ return errors.reduce((previous, current) => {
543
+ let message
544
+ try {
545
+ message =
546
+ current && typeof current.message === 'string'
547
+ ? current.message
548
+ : String(current)
549
+ } catch {
550
+ message = 'Unknown error'
551
+ }
552
+ const error = new Error(message)
553
+ error.cause = previous
554
+ return error
555
+ }, null)
556
+ }
531
557
 
532
558
  // NAPI_RS_FORCE_WASI is a tri-state flag:
533
559
  // 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
560
+ // 'true' → prefer WASI, but retain native as a lazy fallback
561
+ // 'error' → require WASI without initializing a native fallback
536
562
  // Treating any non-empty string as truthy (the historical behavior) meant
537
563
  // NAPI_RS_FORCE_WASI=false, NAPI_RS_FORCE_WASI=0, etc. inadvertently triggered
538
564
  // the WASI path, causing ENOENT for packages shipped without a .wasi.cjs file.
565
+ //
566
+ // NAPI_RS_WASI_FLAVOR selects one exact generated flavor and implies strict
567
+ // WASI loading. It never crosses into another flavor or falls back to native.
568
+ const __napiWasiFlavors = ['wasm32-wasi']
569
+ const __napiWasiFlavor = process.env.NAPI_RS_WASI_FLAVOR
570
+ const __napiWasiFlavorRequested =
571
+ typeof __napiWasiFlavor === 'string' && __napiWasiFlavor.length > 0
572
+ if (
573
+ __napiWasiFlavorRequested &&
574
+ __napiWasiFlavors.indexOf(__napiWasiFlavor) === -1
575
+ ) {
576
+ throw new Error(
577
+ 'Unsupported WASI flavor "' +
578
+ __napiWasiFlavor +
579
+ '". Available flavors: ' +
580
+ __napiWasiFlavors.join(', '),
581
+ )
582
+ }
583
+ const forceWasiError = process.env.NAPI_RS_FORCE_WASI === 'error'
539
584
  const forceWasi =
540
- process.env.NAPI_RS_FORCE_WASI === 'true' || process.env.NAPI_RS_FORCE_WASI === 'error'
585
+ process.env.NAPI_RS_FORCE_WASI === 'true' ||
586
+ forceWasiError ||
587
+ __napiWasiFlavorRequested
588
+
589
+ if (!forceWasi) {
590
+ nativeBinding = requireNative()
591
+ }
541
592
 
542
593
  if (!nativeBinding || forceWasi) {
543
594
  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
595
+ let wasiBindingLoaded = false
596
+ const wasiBindingErrors = []
597
+ const __napiWasiResolveCandidate = (specifier, isPackage, localArtifacts) => {
598
+ try {
599
+ require.resolve(specifier)
600
+ } catch (resolveError) {
601
+ if (!resolveError || resolveError.code !== 'MODULE_NOT_FOUND') {
602
+ throw resolveError
603
+ }
604
+ if (isPackage) {
605
+ try {
606
+ require.resolve(specifier + '/package.json')
607
+ } catch (packageError) {
608
+ if (packageError && packageError.code === 'MODULE_NOT_FOUND') {
609
+ return resolveError
610
+ }
611
+ // An exports restriction proves the package exists even when its
612
+ // package.json is not public. Preserve the root resolution failure.
613
+ throw resolveError
614
+ }
615
+ // The package exists but its main/export target is broken.
616
+ throw resolveError
617
+ }
618
+ return resolveError
551
619
  }
620
+ if (localArtifacts) {
621
+ let artifactError = null
622
+ for (let i = 0; i < localArtifacts.length; i++) {
623
+ try {
624
+ require.resolve(localArtifacts[i])
625
+ return null
626
+ } catch (resolveError) {
627
+ if (!resolveError || resolveError.code !== 'MODULE_NOT_FOUND') {
628
+ throw resolveError
629
+ }
630
+ artifactError = resolveError
631
+ }
632
+ }
633
+ return artifactError
634
+ }
635
+ return null
552
636
  }
553
- if (!nativeBinding || forceWasi) {
637
+ if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === 'wasm32-wasi')) {
638
+ let candidateError = null
639
+ let candidateFailed = false
554
640
  try {
555
- wasiBinding = require('@visulima/vis-binding-wasm32-wasi')
556
- nativeBinding = wasiBinding
641
+ candidateError = __napiWasiResolveCandidate('./vis-native.wasi.cjs', false, ['./vis-native.wasm32-wasi.debug.wasm', './vis-native.wasm32-wasi.wasm'])
642
+ candidateFailed = candidateError !== null
643
+ if (!candidateFailed) {
644
+ wasiBinding = require('./vis-native.wasi.cjs')
645
+ nativeBinding = wasiBinding
646
+ __napiLoadedBindingTarget = 'wasm32-wasi'
647
+ wasiBindingLoaded = true
648
+ }
557
649
  } catch (err) {
558
- if (forceWasi) {
559
- if (!wasiBindingError) {
560
- wasiBindingError = err
561
- } else {
562
- wasiBindingError.cause = err
650
+ candidateError = err
651
+ candidateFailed = true
652
+ }
653
+ if (candidateFailed) {
654
+ wasiBindingErrors.push(candidateError)
655
+ loadErrors.push(candidateError)
656
+ }
657
+ }
658
+ if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === 'wasm32-wasi')) {
659
+ let candidateError = null
660
+ let candidateFailed = false
661
+ try {
662
+ candidateError = __napiWasiResolveCandidate('@visulima/vis-binding-wasm32-wasi', true, undefined)
663
+ candidateFailed = candidateError !== null
664
+ if (!candidateFailed) {
665
+ if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
666
+ const bindingPackageVersion = require('@visulima/vis-binding-wasm32-wasi/package.json').version
667
+ if (bindingPackageVersion !== '6.6.0') {
668
+ throw new Error(`WASI binding package version mismatch, expected 6.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
669
+ }
563
670
  }
564
- loadErrors.push(err)
671
+ wasiBinding = require('@visulima/vis-binding-wasm32-wasi')
672
+ nativeBinding = wasiBinding
673
+ __napiLoadedBindingTarget = 'wasm32-wasi'
674
+ wasiBindingLoaded = true
565
675
  }
676
+ } catch (err) {
677
+ candidateError = err
678
+ candidateFailed = true
679
+ }
680
+ if (candidateFailed) {
681
+ wasiBindingErrors.push(candidateError)
682
+ loadErrors.push(candidateError)
566
683
  }
567
684
  }
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
685
+ if (
686
+ !wasiBindingLoaded &&
687
+ forceWasi &&
688
+ !forceWasiError &&
689
+ !__napiWasiFlavorRequested
690
+ ) {
691
+ nativeBinding = requireNative()
692
+ }
693
+ if ((forceWasiError || __napiWasiFlavorRequested) && !wasiBindingLoaded) {
694
+ const error = new Error(
695
+ __napiWasiFlavorRequested
696
+ ? 'WASI binding for flavor "' + __napiWasiFlavor + '" not found'
697
+ : 'WASI binding not found and NAPI_RS_FORCE_WASI is set to error',
698
+ )
699
+ error.cause = createLoadErrorChain(wasiBindingErrors)
571
700
  throw error
572
701
  }
573
702
  }
@@ -581,10 +710,7 @@ if (!nativeBinding) {
581
710
  )
582
711
  // assign instead of the `new Error(message, { cause })` options form,
583
712
  // which Node < 16.9 silently ignores
584
- error.cause = loadErrors.reduce((err, cur) => {
585
- cur.cause = err
586
- return cur
587
- })
713
+ error.cause = createLoadErrorChain(loadErrors)
588
714
  throw error
589
715
  }
590
716
  throw new Error(`Failed to load native binding`)
@@ -623,3 +749,4 @@ export { tagsFromPath }
623
749
  export { tagsFromPaths }
624
750
  export { transformTs }
625
751
  export { whichBin }
752
+ export const __napiBindingTarget = __napiLoadedBindingTarget
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/vis",
3
- "version": "6.5.4",
3
+ "version": "6.6.1",
4
4
  "description": "A monorepo dev toolkit — task runner, remote caching, security scanning, git hooks, and AI agent integrations — powered by @visulima/task-runner",
5
5
  "keywords": [
6
6
  "build",
@@ -152,14 +152,14 @@
152
152
  }
153
153
  },
154
154
  "optionalDependencies": {
155
- "@visulima/vis-binding-darwin-arm64": "6.5.4",
156
- "@visulima/vis-binding-darwin-x64": "6.5.4",
157
- "@visulima/vis-binding-linux-arm64-gnu": "6.5.4",
158
- "@visulima/vis-binding-linux-arm64-musl": "6.5.4",
159
- "@visulima/vis-binding-linux-x64-gnu": "6.5.4",
160
- "@visulima/vis-binding-linux-x64-musl": "6.5.4",
161
- "@visulima/vis-binding-win32-arm64-msvc": "6.5.4",
162
- "@visulima/vis-binding-win32-x64-msvc": "6.5.4"
155
+ "@visulima/vis-binding-darwin-arm64": "6.6.1",
156
+ "@visulima/vis-binding-darwin-x64": "6.6.1",
157
+ "@visulima/vis-binding-linux-arm64-gnu": "6.6.1",
158
+ "@visulima/vis-binding-linux-arm64-musl": "6.6.1",
159
+ "@visulima/vis-binding-linux-x64-gnu": "6.6.1",
160
+ "@visulima/vis-binding-linux-x64-musl": "6.6.1",
161
+ "@visulima/vis-binding-win32-arm64-msvc": "6.6.1",
162
+ "@visulima/vis-binding-win32-x64-msvc": "6.6.1"
163
163
  },
164
164
  "engines": {
165
165
  "node": "^22.14.0 || >=24.10.0"
@@ -106,9 +106,16 @@
106
106
  "targets": {
107
107
  "type": "object",
108
108
  "additionalProperties": {
109
- "$ref": "#/$defs/VisTargetConfiguration"
109
+ "anyOf": [
110
+ {
111
+ "$ref": "#/$defs/VisTargetConfiguration"
112
+ },
113
+ {
114
+ "type": "null"
115
+ }
116
+ ]
110
117
  },
111
- "description": "Vis-style target definitions (merged on top of package.json scripts)."
118
+ "description": "Vis-style target definitions (merged on top of package.json scripts). `null` removes a target the project would otherwise get from a `package.json` script, a workspace task default, or target inference — e.g. a root convenience script that only forwards to another project."
112
119
  },
113
120
  "$schema": {
114
121
  "type": "string",