@visulima/vis 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE.md +159 -19
  3. package/dashboard/dist/index.html +12 -12
  4. package/dist/bin.js +1 -1
  5. package/dist/binx.js +1 -1
  6. package/dist/packem_chunks/CONFIG_FILES.js +1 -1
  7. package/dist/packem_chunks/bloom-status.js +1 -1
  8. package/dist/packem_chunks/bloom-sync.js +1 -1
  9. package/dist/packem_chunks/catalog.js +2 -2
  10. package/dist/packem_chunks/cli-exec.js +1 -1
  11. package/dist/packem_chunks/cli-main.js +132 -132
  12. package/dist/packem_chunks/doctor-probe.js +2 -2
  13. package/dist/packem_chunks/fix.js +5 -5
  14. package/dist/packem_chunks/handler13.js +1 -1
  15. package/dist/packem_chunks/handler14.js +1 -1
  16. package/dist/packem_chunks/handler15.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/handler23.js +1 -1
  20. package/dist/packem_chunks/handler24.js +1 -1
  21. package/dist/packem_chunks/handler26.js +1 -1
  22. package/dist/packem_chunks/handler28.js +1 -1
  23. package/dist/packem_chunks/handler3.js +1 -1
  24. package/dist/packem_chunks/handler50.js +4 -4
  25. package/dist/packem_chunks/handler53.js +1 -1
  26. package/dist/packem_chunks/handler54.js +1 -1
  27. package/dist/packem_chunks/handler59.js +1 -1
  28. package/dist/packem_chunks/handler60.js +1 -1
  29. package/dist/packem_chunks/handler61.js +7 -7
  30. package/dist/packem_chunks/handler62.js +1 -1
  31. package/dist/packem_chunks/handler63.js +1 -1
  32. package/dist/packem_chunks/handler65.js +2 -2
  33. package/dist/packem_chunks/handler66.js +1 -1
  34. package/dist/packem_chunks/handler67.js +25 -24
  35. package/dist/packem_chunks/handler68.js +153 -25
  36. package/dist/packem_chunks/handler69.js +10 -153
  37. package/dist/packem_chunks/handler70.js +22 -10
  38. package/dist/packem_chunks/handler71.js +4 -4
  39. package/dist/packem_chunks/handler72.js +3 -3
  40. package/dist/packem_chunks/handler73.js +6 -6
  41. package/dist/packem_chunks/handler74.js +1 -1
  42. package/dist/packem_chunks/handler75.js +1 -1
  43. package/dist/packem_chunks/handler77.js +1 -1
  44. package/dist/packem_chunks/handler78.js +20 -20
  45. package/dist/packem_chunks/heal.js +4 -4
  46. package/dist/packem_chunks/help-command.js +5 -5
  47. package/dist/packem_chunks/index4.js +6 -8
  48. package/dist/packem_chunks/index6.js +5 -5
  49. package/dist/packem_chunks/prompts.js +1 -1
  50. package/dist/packem_chunks/prune.js +1 -1
  51. package/dist/packem_chunks/shell-runner.js +1 -1
  52. package/dist/packem_chunks/status.js +1 -1
  53. package/dist/packem_chunks/sync.js +1 -1
  54. package/dist/packem_chunks/tar.js +3 -3
  55. package/dist/packem_shared/{advisories-CyDqzi5j.js → advisories-DZd1uGqa.js} +1 -1
  56. package/dist/packem_shared/{affected-selection-DPQR-Bd3.js → affected-selection-CoRXp5H4.js} +1 -1
  57. package/dist/packem_shared/{bin-wafzkjaB.js → bin-C2eYtJ_N.js} +1 -1
  58. package/dist/packem_shared/{cyclonedx-C_ezHg8b.js → cyclonedx-B1vzerwP.js} +1 -1
  59. package/dist/packem_shared/{docker-Br_iFmI-.js → docker-Bex05Qcn.js} +16 -16
  60. package/dist/packem_shared/giget-D8Kwb0kD.js +2 -0
  61. package/dist/packem_shared/index.server-BAjDJSEu.js +2 -0
  62. package/dist/packem_shared/main-BP-w-K-6.js +1 -0
  63. package/dist/packem_shared/{osv-bloom-5wDAoZ1e.js → osv-bloom-1JS__1or.js} +1 -1
  64. package/dist/packem_shared/{package-version-BJkg7-6H.js → package-version-Bb7KGF36.js} +3 -3
  65. package/dist/packem_shared/{project-name-filter-BeREbPMI.js → project-name-filter-DYaIbrXa.js} +1 -1
  66. package/dist/packem_shared/{resolve-explicit-COmP7eqr.js → resolve-explicit-DYaHAVDg.js} +1 -1
  67. package/dist/packem_shared/{s1ngularity-RZOHbGrE.js → s1ngularity-C8sva2SO.js} +1 -1
  68. package/dist/packem_shared/{scan-progress-C9nMDLis.js → scan-progress-aVHGZYWf.js} +1 -1
  69. package/dist/packem_shared/{target-merge-D1xbylFw.js → target-merge-DCGow6Kw.js} +1 -1
  70. package/dist/packem_shared/{typosquats-D8ppc5kr.js → typosquats-Cdsnf6aN.js} +1 -1
  71. package/dist/packem_shared/{vis-user-error-jhNwmkZp.js → vis-user-error-CAu9wIbe.js} +1 -1
  72. package/index.js +26 -26
  73. package/package.json +14 -14
  74. package/dist/packem_shared/giget-CVyyR7x8.js +0 -2
  75. package/dist/packem_shared/index.server-CwSgbeN7.js +0 -2
  76. package/dist/packem_shared/main-BjJN8kWj.js +0 -1
package/index.js CHANGED
@@ -82,7 +82,7 @@ function requireNative() {
82
82
  const binding = require('@visulima/vis-binding-android-arm64')
83
83
  const bindingPackageVersion = require('@visulima/vis-binding-android-arm64/package.json').version
84
84
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
85
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
86
86
  }
87
87
  return binding
88
88
  } catch (e) {
@@ -98,7 +98,7 @@ function requireNative() {
98
98
  const binding = require('@visulima/vis-binding-android-arm-eabi')
99
99
  const bindingPackageVersion = require('@visulima/vis-binding-android-arm-eabi/package.json').version
100
100
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
101
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
102
102
  }
103
103
  return binding
104
104
  } catch (e) {
@@ -119,7 +119,7 @@ function requireNative() {
119
119
  const binding = require('@visulima/vis-binding-win32-x64-gnu')
120
120
  const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-gnu/package.json').version
121
121
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
122
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
123
123
  }
124
124
  return binding
125
125
  } catch (e) {
@@ -135,7 +135,7 @@ function requireNative() {
135
135
  const binding = require('@visulima/vis-binding-win32-x64-msvc')
136
136
  const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-msvc/package.json').version
137
137
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
138
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
139
139
  }
140
140
  return binding
141
141
  } catch (e) {
@@ -152,7 +152,7 @@ function requireNative() {
152
152
  const binding = require('@visulima/vis-binding-win32-ia32-msvc')
153
153
  const bindingPackageVersion = require('@visulima/vis-binding-win32-ia32-msvc/package.json').version
154
154
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
155
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
156
156
  }
157
157
  return binding
158
158
  } catch (e) {
@@ -168,7 +168,7 @@ function requireNative() {
168
168
  const binding = require('@visulima/vis-binding-win32-arm64-msvc')
169
169
  const bindingPackageVersion = require('@visulima/vis-binding-win32-arm64-msvc/package.json').version
170
170
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
171
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
172
172
  }
173
173
  return binding
174
174
  } catch (e) {
@@ -187,7 +187,7 @@ function requireNative() {
187
187
  const binding = require('@visulima/vis-binding-darwin-universal')
188
188
  const bindingPackageVersion = require('@visulima/vis-binding-darwin-universal/package.json').version
189
189
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
190
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
191
191
  }
192
192
  return binding
193
193
  } catch (e) {
@@ -203,7 +203,7 @@ function requireNative() {
203
203
  const binding = require('@visulima/vis-binding-darwin-x64')
204
204
  const bindingPackageVersion = require('@visulima/vis-binding-darwin-x64/package.json').version
205
205
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
206
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
207
207
  }
208
208
  return binding
209
209
  } catch (e) {
@@ -219,7 +219,7 @@ function requireNative() {
219
219
  const binding = require('@visulima/vis-binding-darwin-arm64')
220
220
  const bindingPackageVersion = require('@visulima/vis-binding-darwin-arm64/package.json').version
221
221
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
222
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
223
223
  }
224
224
  return binding
225
225
  } catch (e) {
@@ -239,7 +239,7 @@ function requireNative() {
239
239
  const binding = require('@visulima/vis-binding-freebsd-x64')
240
240
  const bindingPackageVersion = require('@visulima/vis-binding-freebsd-x64/package.json').version
241
241
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
242
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
243
243
  }
244
244
  return binding
245
245
  } catch (e) {
@@ -255,7 +255,7 @@ function requireNative() {
255
255
  const binding = require('@visulima/vis-binding-freebsd-arm64')
256
256
  const bindingPackageVersion = require('@visulima/vis-binding-freebsd-arm64/package.json').version
257
257
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
258
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
259
259
  }
260
260
  return binding
261
261
  } catch (e) {
@@ -276,7 +276,7 @@ function requireNative() {
276
276
  const binding = require('@visulima/vis-binding-linux-x64-musl')
277
277
  const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-musl/package.json').version
278
278
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
279
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
280
280
  }
281
281
  return binding
282
282
  } catch (e) {
@@ -292,7 +292,7 @@ function requireNative() {
292
292
  const binding = require('@visulima/vis-binding-linux-x64-gnu')
293
293
  const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-gnu/package.json').version
294
294
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
295
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
296
296
  }
297
297
  return binding
298
298
  } catch (e) {
@@ -310,7 +310,7 @@ function requireNative() {
310
310
  const binding = require('@visulima/vis-binding-linux-arm64-musl')
311
311
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-musl/package.json').version
312
312
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
313
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
314
314
  }
315
315
  return binding
316
316
  } catch (e) {
@@ -326,7 +326,7 @@ function requireNative() {
326
326
  const binding = require('@visulima/vis-binding-linux-arm64-gnu')
327
327
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-gnu/package.json').version
328
328
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
329
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
330
330
  }
331
331
  return binding
332
332
  } catch (e) {
@@ -344,7 +344,7 @@ function requireNative() {
344
344
  const binding = require('@visulima/vis-binding-linux-arm-musleabihf')
345
345
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-musleabihf/package.json').version
346
346
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
347
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
348
348
  }
349
349
  return binding
350
350
  } catch (e) {
@@ -360,7 +360,7 @@ function requireNative() {
360
360
  const binding = require('@visulima/vis-binding-linux-arm-gnueabihf')
361
361
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-gnueabihf/package.json').version
362
362
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
363
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
364
364
  }
365
365
  return binding
366
366
  } catch (e) {
@@ -378,7 +378,7 @@ function requireNative() {
378
378
  const binding = require('@visulima/vis-binding-linux-loong64-musl')
379
379
  const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-musl/package.json').version
380
380
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
381
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
382
382
  }
383
383
  return binding
384
384
  } catch (e) {
@@ -394,7 +394,7 @@ function requireNative() {
394
394
  const binding = require('@visulima/vis-binding-linux-loong64-gnu')
395
395
  const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-gnu/package.json').version
396
396
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
397
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
398
398
  }
399
399
  return binding
400
400
  } catch (e) {
@@ -412,7 +412,7 @@ function requireNative() {
412
412
  const binding = require('@visulima/vis-binding-linux-riscv64-musl')
413
413
  const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-musl/package.json').version
414
414
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
415
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
416
416
  }
417
417
  return binding
418
418
  } catch (e) {
@@ -428,7 +428,7 @@ function requireNative() {
428
428
  const binding = require('@visulima/vis-binding-linux-riscv64-gnu')
429
429
  const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-gnu/package.json').version
430
430
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
431
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
432
432
  }
433
433
  return binding
434
434
  } catch (e) {
@@ -445,7 +445,7 @@ function requireNative() {
445
445
  const binding = require('@visulima/vis-binding-linux-ppc64-gnu')
446
446
  const bindingPackageVersion = require('@visulima/vis-binding-linux-ppc64-gnu/package.json').version
447
447
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
448
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
449
449
  }
450
450
  return binding
451
451
  } catch (e) {
@@ -461,7 +461,7 @@ function requireNative() {
461
461
  const binding = require('@visulima/vis-binding-linux-s390x-gnu')
462
462
  const bindingPackageVersion = require('@visulima/vis-binding-linux-s390x-gnu/package.json').version
463
463
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
464
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
465
465
  }
466
466
  return binding
467
467
  } catch (e) {
@@ -481,7 +481,7 @@ function requireNative() {
481
481
  const binding = require('@visulima/vis-binding-openharmony-arm64')
482
482
  const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm64/package.json').version
483
483
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
484
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
485
485
  }
486
486
  return binding
487
487
  } catch (e) {
@@ -497,7 +497,7 @@ function requireNative() {
497
497
  const binding = require('@visulima/vis-binding-openharmony-x64')
498
498
  const bindingPackageVersion = require('@visulima/vis-binding-openharmony-x64/package.json').version
499
499
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
500
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
501
501
  }
502
502
  return binding
503
503
  } catch (e) {
@@ -513,7 +513,7 @@ function requireNative() {
513
513
  const binding = require('@visulima/vis-binding-openharmony-arm')
514
514
  const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm/package.json').version
515
515
  if (bindingPackageVersion !== '2.0.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 3.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
516
+ throw new Error(`Native binding package version mismatch, expected 3.0.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
517
517
  }
518
518
  return binding
519
519
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/vis",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
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",
@@ -120,11 +120,11 @@
120
120
  "@visulima/source-map": "3.0.1",
121
121
  "@visulima/tabular": "4.1.0",
122
122
  "@visulima/task-runner": "1.0.4",
123
- "@visulima/tui": "4.0.0",
124
- "@visulima/tui-kit": "1.0.3",
125
- "module-replacements": "^2.11.0",
126
- "module-replacements-codemods": "^2.0.1",
127
- "react": "19.2.7",
123
+ "@visulima/tui": "4.0.1",
124
+ "@visulima/tui-kit": "1.0.4",
125
+ "module-replacements": "^3.1.0",
126
+ "module-replacements-codemods": "^2.0.2",
127
+ "react": "19.2.8",
128
128
  "react-reconciler": ">=0.33.0"
129
129
  },
130
130
  "peerDependencies": {
@@ -148,14 +148,14 @@
148
148
  }
149
149
  },
150
150
  "optionalDependencies": {
151
- "@visulima/vis-binding-darwin-arm64": "3.0.1",
152
- "@visulima/vis-binding-darwin-x64": "3.0.1",
153
- "@visulima/vis-binding-linux-arm64-musl": "3.0.1",
154
- "@visulima/vis-binding-linux-x64-gnu": "3.0.1",
155
- "@visulima/vis-binding-linux-arm64-gnu": "3.0.1",
156
- "@visulima/vis-binding-linux-x64-musl": "3.0.1",
157
- "@visulima/vis-binding-win32-x64-msvc": "3.0.1",
158
- "@visulima/vis-binding-win32-arm64-msvc": "3.0.1"
151
+ "@visulima/vis-binding-darwin-x64": "3.0.2",
152
+ "@visulima/vis-binding-linux-arm64-gnu": "3.0.2",
153
+ "@visulima/vis-binding-linux-arm64-musl": "3.0.2",
154
+ "@visulima/vis-binding-linux-x64-gnu": "3.0.2",
155
+ "@visulima/vis-binding-darwin-arm64": "3.0.2",
156
+ "@visulima/vis-binding-linux-x64-musl": "3.0.2",
157
+ "@visulima/vis-binding-win32-arm64-msvc": "3.0.2",
158
+ "@visulima/vis-binding-win32-x64-msvc": "3.0.2"
159
159
  },
160
160
  "engines": {
161
161
  "node": "^22.14.0 || >=24.10.0"
@@ -1,2 +0,0 @@
1
- import{createRequire as ce}from"node:module";let le;const ue=t=>(le??=ce(import.meta.url))(t),y=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,w=t=>{if(typeof y<"u"&&y.versions&&y.versions.node){const[e,r]=y.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return y.getBuiltinModule(t)}return ue(t)},{existsSync:m,openSync:de,readSync:he,closeSync:fe,statSync:pe,createWriteStream:V,readdirSync:me,renameSync:ge}=w("node:fs"),{readFile:X,mkdir:O,rm:x,writeFile:we,mkdtemp:ve}=w("node:fs/promises"),{PassThrough:q,Readable:z,pipeline:_e}=w("node:stream"),{pipeline:J}=w("node:stream/promises"),{spawn:Y}=w("node:child_process"),{basename:be,normalize:$e,delimiter:T,resolve:K,dirname:M,join:j}=w("node:path"),{cwd:Z}=y,ye=w("node:readline"),{homedir:Ee,tmpdir:Q}=w("node:os"),{promisify:ke}=w("node:util");var D=Object.defineProperty,xe=(t,e)=>{let r={};for(var n in t)D(r,n,{get:t[n],enumerable:!0});return D(r,Symbol.toStringTag,{value:"Module"}),r};const Te=/^[A-Za-z]:\//;function C(t=""){return t&&t.replace(/\\/g,"/").replace(Te,e=>e.toUpperCase())}const Ce=/^[/\\]{2}/,Ae=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,ee=/^[A-Za-z]:$/,te=function(t){if(t.length===0)return".";t=C(t);let e=t.match(Ce),r=E(t),n=t[t.length-1]==="/";return t=re(t,!r),t.length===0?r?"/":n?"./":".":(n&&(t+="/"),ee.test(t)&&(t+="/"),e?r?`//${t}`:`//./${t}`:r&&!E(t)?`/${t}`:t)},P=function(...t){let e="";for(let r of t)if(r)if(e.length>0){let n=e[e.length-1]==="/",s=r[0]==="/";n&&s?e+=r.slice(1):e+=n||s?r:`/${r}`}else e+=r;return te(e)};function Se(){return typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}const p=function(...t){t=t.map(n=>C(n));let e="",r=!1;for(let n=t.length-1;n>=-1&&!r;n--){let s=n>=0?t[n]:Se();!s||s.length===0||(e=`${s}/${e}`,r=E(s))}return e=re(e,!r),r&&!E(e)?`/${e}`:e.length>0?e:"."};function re(t,e){let r="",n=0,s=-1,o=0,i=null;for(let a=0;a<=t.length;++a){if(a<t.length)i=t[a];else{if(i==="/")break;i="/"}if(i==="/"){if(!(s===a-1||o===1))if(o===2){if(r.length<2||n!==2||r[r.length-1]!=="."||r[r.length-2]!=="."){if(r.length>2){let c=r.lastIndexOf("/");c===-1?(r="",n=0):(r=r.slice(0,c),n=r.length-1-r.lastIndexOf("/")),s=a,o=0;continue}else if(r.length>0){r="",n=0,s=a,o=0;continue}}e&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${t.slice(s+1,a)}`:r=t.slice(s+1,a),n=a-s-1;s=a,o=0}else i==="."&&o!==-1?++o:o=-1}return r}const E=function(t){return Ae.test(t)},ne=function(t){let e=C(t).replace(/\/$/,"").split("/").slice(0,-1);return e.length===1&&ee.test(e[0])&&(e[0]+="/"),e.join("/")||(E(t)?"/":".")},se=function(t,e){let r=C(t).split("/"),n="";for(let s=r.length-1;s>=0;s--){let o=r[s];if(o){n=o;break}}return n},Oe=/^path$/i,F={key:"PATH",value:""};function oe(t){for(let e in t){if(!Object.prototype.hasOwnProperty.call(t,e)||!Oe.test(e))continue;let r=t[e];return r?{key:e,value:r}:F}return F}function Ie(t,e){let r=e.value.split(T),n=[],s=t,o;do n.push(K(s,"node_modules",".bin")),o=s,s=M(s);while(s!==o);n.push(M(process.execPath));let i=n.concat(r).join(T);return{key:e.key,value:i}}function ze(t,e,r=!0){let n={...process.env,...e};if(!r)return n;let s=Ie(t,oe(n));return n[s.key]=s.value,n}const Me=t=>{let e=t.length,r=new q,n=()=>{--e===0&&r.end()};for(let s of t)J(s,r,{end:!1}).then(n).catch(n);return r},S=/([()\][%!^"`<>&|;, *?])/g,je=/^#!\s*(.+)/,De=/\.(?:com|exe)$/i,Pe=/node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i,Fe=process.platform==="win32",Ge=[".EXE",".CMD",".BAT",".COM"];function Re(t,e=[],r={}){if(r.shell===!0||!Fe)return{command:t,args:e,options:r};let n=G(t,r),s=null;if(n!==null){let o=Buffer.alloc(150),i=null;try{i=de(n,"r"),he(i,o,0,150,0)}catch{}finally{i!==null&&fe(i)}let a=o.toString().match(je);if(a!==null){let c=a[1].trim(),d=c.indexOf(" "),l=d===-1?c:c.slice(0,d),f=d===-1?"":c.slice(d+1),h=be(l);s=h==="env"?f||null:h}}if(s!==null&&n!==null&&(e=[n,...e],t=s,n=G(t,r)),n===null||!De.test(n)){let o=n!==null&&Pe.test(n);t=$e(t),t=t.replace(S,"^$1"),e=e.map(i=>(i=i.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),i=i.replace(/(?=(\\+?)?)\1$/,"$1$1"),i=`"${i}"`,i=i.replace(S,"^$1"),o&&(i=i.replace(S,"^$1")),i)),e=["/d","/s","/c",`"${[t,...e].join(" ")}"`],t=r.env?.comspec??"cmd.exe",r={...r,windowsVerbatimArguments:!0}}return{command:t,args:e,options:r}}function G(t,e){let r=(e.cwd??Z()).toString(),n=e.env??process.env,s=oe(n).value,o=t.includes("/")||t.includes("\\")?[""]:[r,...s.split(T)],i=n.PATHEXT?n.PATHEXT.split(T):Ge;t.includes(".")&&i[0]!==""&&i.unshift("");for(let a of o){let c=K(r,a.startsWith('"')&&a.endsWith('"')&&a.length>1?a.slice(1,-1):a,t);for(let d of i){let l=c+d;try{if(pe(l).isFile())return l}catch{}}}return null}var R=class extends Error{result;output;get exitCode(){if(this.result.exitCode!==null)return this.result.exitCode}constructor(t,e){super(`Process exited with non-zero status (${t.exitCode})`),this.result=t,this.output=e}};const Be={timeout:void 0,persist:!1},Ue={windowsHide:!0};function He(t){let e=new AbortController;for(let r of t){if(r.aborted)return e.abort(),r;r.addEventListener("abort",()=>{e.abort(r.reason)},{signal:e.signal})}return e.signal}async function B(t){let e="";try{for await(let r of t)e+=r.toString()}catch{}return e}var Ne=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}constructor(t,e,r){this._options={...Be,...r},this._command=t,this._args=e??[],this._processClosed=new Promise(n=>{this._resolveClose=n})}kill(t){return this._process?.kill(t)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(t,e,r){return Le(t,e,{...r,stdin:this})}async*[Symbol.asyncIterator](){let t=this._process;if(!t)return;let e=[];this._streamErr&&e.push(this._streamErr),this._streamOut&&e.push(this._streamOut);let r=Me(e),n=ye.createInterface({input:r});for await(let s of n)yield s.toString();if(await this._processClosed,t.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new R(this)}async _waitForOutput(){let t=this._process;if(!t)throw Error("No process was started");let[e,r]=await Promise.all([this._streamOut?B(this._streamOut):"",this._streamErr?B(this._streamErr):""]);await this._processClosed;let{stdin:n}=this._options;if(n&&typeof n!="string"&&await n,t.removeAllListeners(),this._thrownError)throw this._thrownError;let s={stderr:r,stdout:e,exitCode:this.exitCode};if(this._options.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new R(this,s);return s}then(t,e){return this._waitForOutput().then(t,e)}_streamOut;_streamErr;spawn(){let t=Z(),e=this._options,r={...Ue,...e.nodeOptions},n=[];this._resetState(),e.timeout!==void 0&&n.push(AbortSignal.timeout(e.timeout)),e.signal!==void 0&&n.push(e.signal),e.persist===!0&&(r.detached=!0),n.length>0&&(r.signal=He(n)),r.env=ze(t,r.env,e.nodePath);let s=Re(this._command,this._args,r),o=Y(s.command,s.args,s.options);if(o.stderr&&(this._streamErr=o.stderr),o.stdout&&(this._streamOut=o.stdout),this._process=o,o.once("error",this._onError),o.once("close",this._onClose),o.stdin){let{stdin:i}=e;typeof i=="string"?o.stdin.end(i):i?.process?.stdout?.pipe(o.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(t=>{this._resolveClose=t}),this._thrownError=void 0}_onError=t=>{if(t.name==="AbortError"&&(!(t.cause instanceof Error)||t.cause.name!=="TimeoutError")){this._aborted=!0;return}this._thrownError=t};_onClose=()=>{this._resolveClose&&this._resolveClose()}};const I=(t,e,r)=>{let n=new Ne(t,e,r);return n.spawn(),n},Le=I;var We=xe({detectPackageManager:()=>ie,installDependencies:()=>Ze,packageManagers:()=>_});async function Ve(t,e,r={}){let n=te(t).split("/");for(;n.length>0;){let s=await e(n.join("/")||"/");if(s||!r.includeParentDirs)return s;n.pop()}}function Xe(t){let e;return()=>(e===void 0&&(e=t().then(r=>(e=r,e))),e)}const qe=Xe(async()=>{if(globalThis.process?.versions?.webcontainer)return!1;try{let{exitCode:t}=await I("corepack",["--version"]);return t===0}catch{return!1}});async function Je(t,e,r={}){let n=t!=="npm"&&t!=="bun"&&t!=="deno"&&r.corepack!==!1&&await qe()?["corepack",[t,...e]]:[t,e],{exitCode:s,stdout:o,stderr:i}=await I(n[0],n[1],{nodeOptions:{cwd:p(r.cwd||process.cwd()),env:r.env,stdio:r.silent?"pipe":"inherit"}});if(s!==0)throw Error(`\`${n.flat().join(" ")}\` failed.${r.silent?["",o,i].join(`
2
- `):""}`)}async function Ye(t={}){let e=t.cwd||process.cwd(),r={...process.env,...t.env},n=(typeof t.packageManager=="string"?_.find(s=>s.name===t.packageManager):t.packageManager)||await ie(t.cwd||process.cwd());if(!n)throw Error("No package manager auto-detected.");return{cwd:e,env:r,silent:t.silent??!1,packageManager:n,dev:t.dev??!1,workspace:t.workspace,global:t.global??!1,dry:t.dry??!1,corepack:t.corepack??!0}}function Ke(t){let[e,r]=(t||"").split("@"),[n,s]=r?.split("+")||[];if(e&&e!=="-"&&/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(e))return{name:e,version:n,buildMeta:s};let o=(e||"").replace(/\W+/g,"");return{name:o,version:n,buildMeta:s,warnings:[`Abnormal characters found in \`packageManager\` field, sanitizing from \`${e}\` to \`${o}\``]}}const _=[{name:"npm",command:"npm",lockFile:"package-lock.json"},{name:"pnpm",command:"pnpm",lockFile:"pnpm-lock.yaml",files:["pnpm-workspace.yaml"]},{name:"bun",command:"bun",lockFile:["bun.lockb","bun.lock"]},{name:"yarn",command:"yarn",lockFile:"yarn.lock",files:[".yarnrc.yml"]},{name:"deno",command:"deno",lockFile:"deno.lock",files:["deno.json"]}];async function ie(t,e={}){let r=await Ve(p(t||"."),async n=>{if(!e.ignorePackageJSON){let s=P(n,"package.json");if(m(s)){let o=JSON.parse(await X(s,"utf8"));if(o?.packageManager){let{name:i,version:a="0.0.0",buildMeta:c,warnings:d}=Ke(o.packageManager);if(i){let l=a.split(".")[0],f=_.find(h=>h.name===i&&h.majorVersion===l)||_.find(h=>h.name===i);return{name:i,command:i,version:a,majorVersion:l,buildMeta:c,warnings:d,files:f?.files,lockFile:f?.lockFile}}}}if(m(P(n,"deno.json")))return _.find(o=>o.name==="deno")}if(!e.ignoreLockFile){for(let s of _)if([s.lockFile,s.files].flat().filter(Boolean).some(o=>m(p(n,o))))return{...s}}},{includeParentDirs:e.includeParentDirs??!0});if(!r&&!e.ignoreArgv){let n=process.argv[1];if(n){for(let s of _)if(RegExp(`[/\\\\]\\.?${s.command}`).test(n))return s}}return r}async function Ze(t={}){let e=await Ye(t),r=t.frozenLockFile?{npm:["ci"],yarn:["install","--immutable"],bun:["install","--frozen-lockfile"],pnpm:["install","--frozen-lockfile"],deno:["install","--frozen"]}[e.packageManager.name]:["install"];return t.ignoreWorkspace&&e.packageManager.name==="pnpm"&&r.push("--ignore-workspace"),e.dry||await Je(e.packageManager.command,r,{cwd:e.cwd,silent:e.silent,corepack:e.corepack}),{exec:{command:e.packageManager.command,args:r}}}const Qe=Object.defineProperty({__proto__:null,basename:se,dirname:ne,dist_exports:We,resolve:p},Symbol.toStringTag,{value:"Module"});async function et(t,e,r={}){const n=e+".json",s=JSON.parse(await X(n,"utf8").catch(()=>"{}")),o=(await k(t,{method:"HEAD",headers:r.headers}).catch(()=>{}))?.headers.get("etag");if(s.etag===o&&m(e))return;typeof o=="string"&&(s.etag=o);const i=await k(t,{headers:r.headers});if(i.status>=400)throw new Error(`Failed to download ${t}: ${i.status} ${i.statusText}`);const a=V(e);await ke(_e)(i.body,a),await we(n,JSON.stringify(s),"utf8")}const tt=/^(?<repo>[-\w.]+\/[-\w.]+)(?<subdir>[^#]+)?(?<ref>#[-\w./@]+)?/,rt=/^(?<repo>[-\w.]+(?:\/[-\w.]+)+?)(?:::(?<subdir>[^#]*))?(?<ref>#[-\w./@]+)?$/;function A(t,e){const r=e?.expandRepo||t.includes("::"),n=t.match(r?rt:tt)?.groups||{},s=r?n.subdir?"/"+n.subdir:"/":n.subdir||"/";return{repo:n.repo||"",subdir:s,ref:n.ref?n.ref.slice(1):"main"}}function v(...t){process.env.DEBUG&&console.debug("[giget]",...t)}async function k(t,e={}){e.headers?.["sec-fetch-mode"]&&(e.mode=e.headers["sec-fetch-mode"]);const r=await fetch(t,{...e,headers:ae(e.headers)}).catch(n=>{throw new Error(`Failed to download ${t}: ${n}`,{cause:n})});if(e.validateStatus&&r.status>=400)throw new Error(`Failed to fetch ${t}: ${r.status} ${r.statusText}`);return r}function nt(){const t=process.env.XDG_CACHE_HOME?p(process.env.XDG_CACHE_HOME,"giget"):p(Ee(),".cache/giget");if(process.platform==="win32"){const e=p(Q(),"giget");if(!m(e)&&m(t))try{ge(t,e)}catch{}return e}return t}function ae(t={}){const e={};for(const[r,n]of Object.entries(t))n&&(e[r.toLowerCase()]=n);return e}const st=(t,e)=>{const r=ot(t);return{name:r.name,version:r.subdir?`${r.version||"default"}-${r.subdir.replaceAll("/","-")}`:r.version,tar:({auth:n}={})=>it(r,n??e.auth)}};function ot(t,e={}){const r=e.cwd??process.cwd();let n=t.replace(/#.*$/,""),s;if(/^[./]/.test(t))n=p(r,n);else if(/^https?:\/\//.test(n)){const l=/^(https?:\/\/[^/]+)\/([\w.-]+\/[\w.-]+?)(?:\.git)?(?:\/(.+))?$/.exec(n);if(l){const[,f,h,g]=l;n=`${f}/${h}`,g&&(s=g)}}else if(n.includes("@")){const l=/^(.*?:[\w.-]+\/[\w.-]+?)(?:\.git)?(?:\/(.+))?$/.exec(n);if(l){const[,f,h]=l;n=f,h&&(s=h)}}else{const l={"github:":"https://github.com/","gh:":"https://github.com/","gitlab:":"https://gitlab.com/","bitbucket:":"https://bitbucket.org/","sourcehut:":"https://git.sr.ht/~"},f=/^(.+?:)/.exec(n)?.at(1);f&&l[f]?n=n.replace(f,l[f]):f||(n=`${(process.env.GIGET_GIT_HOST||"https://github.com/").replace(/\/$/,"")}/${n}`);const h=/^(https?:\/\/[^/]+\/~?[\w.-]+\/[\w.-]+?)(?:\.git)?(?:\/(.+))?$/.exec(n);if(h){const[,g,u]=h;n=g,u&&(s=u)}}const o=n.replace(/^https?:\/\//,"").replace(/^.+@/,"").replace(/(\.git)?(#.*)?$/,"").replace(/^\W+/,"").replaceAll(/[:/]/g,"-"),[i,a]=/#(.+)$/.exec(t)?.at(1)?.split(":")??[],c=i||void 0,d=a||s;return{uri:n,name:o,...c&&{version:c},...d&&{subdir:d}}}async function it(t,e){const r=await ve(j(Q(),"giget-git-"));if(e&&/[\r\n]/.test(e))throw new Error("Auth token must not contain newline characters");const n={...process.env,GIT_TERMINAL_PROMPT:"0"};e&&(n.GIT_CONFIG_COUNT="1",n.GIT_CONFIG_KEY_0="http.extraHeader",n.GIT_CONFIG_VALUE_0=`Authorization: Bearer ${e}`);const s={env:n,timeout:6e4},o=at(),i=c=>H(c,s,o),a=c=>H(c,{...s,cwd:r},o);try{const c=["clone","--progress","--depth","1"];t.subdir&&c.push("--filter=blob:none","--sparse","--no-checkout"),t.version&&c.push("--branch",t.version),c.push("--",t.uri,r);try{o.update("Cloning..."),await i(c),o.update("Cloned.")}catch(u){if(!t.version)throw u;v("Shallow clone failed, falling back to full clone:",u),o.update("Shallow clone failed, cloning..."),await x(r,{recursive:!0,force:!0}),await O(r,{recursive:!0}),await a(["init"]),await a(["remote","add","origin",t.uri]),await a(["fetch","origin"]),await a(["checkout",t.version]),o.update("Fetched.")}t.subdir&&(o.update(`Sparse checkout ${t.subdir}...`),await a(["sparse-checkout","set",t.subdir]),await a(["checkout"])),o.update("Packing...");const d=t.subdir?j(r,t.subdir):r,{create:l}=await import("../packem_chunks/tar.js").then(u=>u.index_min_exports);o.done();const f=l({gzip:!0,cwd:d,filter:u=>!u.startsWith(".git/")&&u!==".git"&&!u.startsWith("./.git/")&&u!=="./.git"},["."]).pipe(new q);let h=!1;const g=()=>{h||(h=!0,x(r,{recursive:!0,force:!0}))};return f.on("end",g),f.on("error",g),f.on("close",g),f}catch(c){throw o.done(),await x(r,{recursive:!0,force:!0}),c}}const U=["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"];function H(t,e,r){return new Promise((n,s)=>{const o=Y("git",t,{...e,stdio:["ignore","pipe","pipe"]});o.stdout.resume();let i="";o.stderr?.on("data",a=>{const c=a.toString();for(const d of c.split(/[\r\n]/)){const l=d.trim();l&&(i=l)}r&&r.update(i)}),o.on("close",a=>{a===0?n(i):s(new Error(`git ${t[0]} exited with code ${a}. Is git installed?`))}),o.on("error",a=>{a.code==="ENOENT"?s(new Error("git is not installed or not found in PATH")):s(a)})})}function at(){if(!process.stderr.isTTY)return{update(s){},done(){}};let t="",e=0;const r=()=>{const s=U[e%U.length];e++,process.stderr.write(`\x1B[2K\r\x1B[2m${s} ${t}\x1B[0m`)},n=setInterval(r,80);return{update(s){t=s,r()},done(){clearInterval(n),process.stderr.write("\x1B[2K\r")}}}const N=async(t,e)=>{if(t.endsWith(".json"))return await L(t,e);const r=new URL(t);let n=se(r.pathname);try{const s=await k(r.href,{method:"HEAD",validateStatus:!0,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0}});if((s.headers.get("content-type")||"").includes("application/json"))return await L(t,e);const o=s.headers.get("content-disposition")?.match(/filename="?(.+)"?/)?.[1];o&&(n=o.split(".")[0])}catch(s){v(`Failed to fetch HEAD for ${r.href}:`,s)}return{name:`${n}-${r.href.slice(0,8)}`,version:"",subdir:"",tar:r.href,defaultDir:n,headers:{Authorization:e.auth?`Bearer ${e.auth}`:void 0}}},L=async(t,e)=>{const r=await(await k(t,{validateStatus:!0,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0}})).json();if(!r.tar||!r.name)throw new Error(`Invalid template info from ${t}. name or tar fields are missing!`);return r},W=(t,e)=>{const r=A(t),n=process.env.GIGET_GITHUB_URL||"https://api.github.com";return{name:r.repo.replace("/","-"),version:r.ref,subdir:r.subdir,headers:{Authorization:e.auth?`Bearer ${e.auth}`:void 0,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"},url:`${n.replace("api.github.com","github.com")}/${r.repo}/tree/${r.ref}${r.subdir}`,tar:`${n}/repos/${r.repo}/tarball/${r.ref}`}},ct=(t,e)=>{const r=A(t,{expandRepo:!0}),n=process.env.GIGET_GITLAB_URL||"https://gitlab.com";return{name:r.repo.replace("/","-"),version:r.ref,subdir:r.subdir,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0,"sec-fetch-mode":"same-origin"},url:`${n}/${r.repo}/tree/${r.ref}${r.subdir}`,tar:`${n}/${r.repo}/-/archive/${r.ref}.tar.gz`}},lt=(t,e)=>{const r=A(t);return{name:r.repo.replace("/","-"),version:r.ref,subdir:r.subdir,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0},url:`https://bitbucket.com/${r.repo}/src/${r.ref}${r.subdir}`,tar:`https://bitbucket.org/${r.repo}/get/${r.ref}.tar.gz`}},ut=(t,e)=>{const r=A(t);return{name:r.repo.replace("/","-"),version:r.ref,subdir:r.subdir,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0},url:`https://git.sr.ht/~${r.repo}/tree/${r.ref}/item${r.subdir}`,tar:`https://git.sr.ht/~${r.repo}/archive/${r.ref}.tar.gz`}},dt={http:N,https:N,git:st,github:W,gh:W,gitlab:ct,bitbucket:lt,sourcehut:ut},ht="https://raw.githubusercontent.com/unjs/giget/main/templates",ft=(t=ht,e={})=>(async r=>{const n=Date.now(),s=`${t}/${r}.json`,o=await k(s,{headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0}});if(o.status>=400)throw new Error(`Failed to download ${r} template info from ${s}: ${o.status} ${o.statusText}`);const i=await o.json();if(!i.tar||!i.name)throw new Error(`Invalid template info from ${s}. name or tar fields are missing!`);return v(`Fetched ${r} template info from ${s} in ${Date.now()-n}ms`),i}),pt=/^([\w+-.]+):/;function mt(t){if(!t)return;if(typeof t=="function")return t;const e=globalThis.process.getBuiltinModule?.("node:path")?.matchesGlob;if(typeof e!="function")throw new TypeError("Ignore patterns require `path.matchesGlob` which is supported in Node.js v22.5.0, v20.17.0 or later.");return r=>t.some(n=>e(r,n))}async function wt(t,e={}){const r=mt(e.ignore);e.registry=process.env.GIGET_REGISTRY??e.registry,e.auth=process.env.GIGET_AUTH??e.auth;const n=e.registry===!1?void 0:ft(e.registry,{auth:e.auth});let s=e.provider||(n?"registry":"github"),o=t;const i=t.match(pt);i&&(s=i[1],o=t.slice(i[0].length),(s==="http"||s==="https")&&(o=t)),s.endsWith("+git")&&(o=`${s.slice(0,-4)}:${o}`,s="git");const a=e.providers?.[s]||dt[s]||n;if(!a)throw new Error(`Unsupported provider: ${s}`);const c=await Promise.resolve().then(()=>a(o,{auth:e.auth})).catch(u=>{throw new Error(`Failed to download template from ${s}: ${u.message}`)});if(!c)throw new Error(`Failed to resolve template from ${s}`);c.name=(c.name||"template").replace(/[^\da-z-]/gi,"-"),c.defaultDir=(c.defaultDir||c.name).replace(/[^\da-z-]/gi,"-");const d=p(p(nt(),s,c.name),(c.version||c.name)+".tar.gz");if(e.preferOffline&&m(d)&&(e.offline=!0),!e.offline){await O(ne(d),{recursive:!0});const u=Date.now();if(typeof c.tar=="function"){const b=c.tar;await(async()=>{const $=await b({auth:e.auth});await J($ instanceof z?$:z.fromWeb($),V(d))})().catch($=>{if(!m(d))throw $;v("Download error. Using cached version:",$),e.offline=!0})}else await et(c.tar,d,{headers:{Authorization:e.auth?`Bearer ${e.auth}`:void 0,...ae(c.headers)}}).catch(b=>{if(!m(d))throw b;v("Download error. Using cached version:",b),e.offline=!0});v(`Downloaded to ${d} in ${Date.now()-u}ms`)}if(!m(d))throw new Error(`Tarball not found: ${d} (offline: ${e.offline})`);const l=p(p(e.cwd||"."),e.dir||c.defaultDir);if(e.forceClean&&await x(l,{recursive:!0,force:!0}),!e.force&&m(l)&&me(l).length>0)throw new Error(`Destination ${l} already exists.`);await O(l,{recursive:!0});const f=Date.now(),h=c.subdir?.replace(/^\//,"")||"",{extract:g}=await import("../packem_chunks/tar.js").then(u=>u.index_min_exports);if(await g({file:d,cwd:l,onReadEntry(u){u.path=u.path.split("/").splice(1).join("/"),h&&(u.path.startsWith(h+"/")?u.path=u.path.slice(h.length):u.path=""),r&&u.path&&r(u.path.replace(/^\//,""))&&(u.path="")}}),v(`Extracted to ${l} in ${Date.now()-f}ms`),e.install){v("Installing dependencies...");const{installDependencies:u}=await Promise.resolve().then(()=>Qe).then(b=>b.dist_exports);await u({cwd:l,silent:e.silent,...typeof e.install=="object"?e.install:{}})}return{...c,source:o,dir:l}}export{xe as _,wt as d};
@@ -1,2 +0,0 @@
1
- const G=/^-{1,2}(no-color|no-colors|color=false|color=never)$/,P=/^-{1,2}(color=256)$/,D=/^-{1,2}(color=16m|color=full|color=truecolor)$/,L=/^-{1,2}(color|colors|color=true|color=always)$/,F=/-mono|dumb/i,Y=/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/,j=/-256(color)?$/i,W=/^screen|^tmux|^xterm|^vt[1-5]\d\d|^ansi|color|mintty|rxvt|cygwin|linux/i,V=()=>{const r=globalThis.process?.getBuiltinModule;return typeof r!="function"?"":r("node:os").release()},_=(r,e={})=>{const{isTTY:s,sniffFlags:i=!0}=e,l=globalThis,g=l.Deno!=null,u=l.process??l.Deno??{},p=u.argv??u.args??[],B=i?p.indexOf("--"):-1,a=d=>{if(!i)return!1;const R=p.findIndex(k=>d.test(k));return R!==-1&&(B===-1||R<B)};let n={};try{n=g?l.Deno.env.toObject():u.env??{}}catch{}const o="FORCE_COLOR",b=o in n,c=n[o]??void 0,$=typeof c=="string",O=typeof c=="number";let m;if(c==="true")m=1;else if(c==="false")m=0;else if($&&c.length===0)m=1;else if($&&c.length>0){const d=Number.parseInt(c,10);m=Number.isNaN(d)?void 0:Math.max(0,Math.min(d,3))}else O&&(m=Number.isNaN(c)?void 0:Math.max(0,Math.min(c,3)));if(c!=="true"&&c!=="false"&&m!==void 0&&m<4)return m;const w=b&&m!==void 0&&m>0;if(b&&m===0||a(G)||!w&&"NO_COLOR"in n)return 0;if(a(P))return 2;if(a(D))return 3;if(a(L))return 1;const y=m??0;if("TF_BUILD"in n&&"AGENT_NAME"in n)return 1;if(n.TERM&&F.test(n.TERM))return y;if(g?l.Deno.build.os==="windows":u.platform==="win32"){if("WT_SESSION"in n)return 3;if("ANSICON"in n)return 1;try{let d;g?d=l.Deno.osRelease():typeof u.os?.release=="function"?d=u.os.release():d=V();const R=d.split(".");return Number(R[0])>=10&&Number(R[2])>=10586?Number(R[2])>=14931?3:2:1}catch{}}if("CI"in n)return["GITEA_ACTIONS","CIRCLECI","GITHUB_WORKFLOW","GITHUB_ACTIONS"].some(d=>d in n)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(d=>d in n)||n.CI_NAME==="codeship"?1:y;if(n.TERMINAL_EMULATOR?.includes("JediTerm"))return 3;if("TEAMCITY_VERSION"in n)return Y.test(n.TEAMCITY_VERSION)?1:0;if(n.COLORTERM==="truecolor"||n.TERM==="xterm-kitty"||n.TERM==="xterm-ghostty"||n.TERM==="wezterm")return 3;if("TERM_PROGRAM"in n){const d=Number.parseInt((n.TERM_PROGRAM_VERSION??"").split(".")[0],10);if(n.TERM_PROGRAM==="iTerm.app")return d>=3?3:2;if(n.TERM_PROGRAM==="Apple_Terminal")return 2}if(j.test(n.TERM))return 2;let T;return s!==void 0?T=s:g?T=r==="out"?l.Deno.stdout.isTerminal():l.Deno.stderr.isTerminal():"PM2_HOME"in n&&"pm_id"in n?T=!0:T=!!u[`std${r}`]?.isTTY,T&&W.test(n.TERM)||"COLORTERM"in n?1:y},H=()=>_("out"),U=()=>_("err");function q({onlyFirst:r=!1}={}){const e="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(e,r?void 0:"g")}const M=(r,e,s)=>e>r?e:Math.min(r,s),z=/^#?([a-f\d]{3}|[a-f\d]{6})$/i,J=r=>{let[,e]=z.exec(r)??[];const s=e?e.length:0;if(s===3){const l=e.charAt(0),g=e.charAt(1),u=e.charAt(2);e=l+l+g+g+u+u}else if(s!==6)return globalThis.process?.env?.NODE_ENV!=="production"&&console.warn(`[@visulima/colorize] Invalid hex color "${r}"; expected a 3- or 6-digit hex string (e.g. "#96C" or "#E0115F"). Falling back to black.`),[0,0,0];const i=Number.parseInt(e,16);return[i>>16&255,i>>8&255,i&255]},v=(r,e,s)=>r===e&&e===s?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/51)+6*Math.round(e/51)+Math.round(s/51),S=r=>{let e,s,i;if(r<8)return 30+r;if(r<16)return 90+(r-8);if(r>=232)e=s=i=((r-232)*10+8)/255;else{r-=16;const u=r%36;e=Math.floor(r/36)/5,s=Math.floor(u/6)/5,i=u%6/5}const l=Math.max(e,s,i)*2;if(l===0)return 30;const g=30+(Math.round(i)<<2|Math.round(s)<<1|Math.round(e));return l===2?g+60:g},N=(r,e,s)=>S(v(r,e,s)),h=39,f=49,C=10,E={close:"",open:""},I=r=>{const e=r>0?(o,b)=>({close:`\x1B[${String(b)}m`,open:`\x1B[${String(o)}m`}):()=>E,s=o=>(b,c,$)=>o(v(Number(b),Number(c),Number($))),i=o=>b=>{const[c,$,O]=J(b);return o(c,$,O)};let l=o=>e(`38;5;${String(o)}`,h),g=o=>e(`48;5;${String(o)}`,f),u=(o,b,c)=>e(`38;2;${String(o)};${String(b)};${String(c)}`,h),p=(o,b,c)=>e(`48;2;${String(o)};${String(b)};${String(c)}`,f);r===1?(l=o=>e(S(Number(o)),h),g=o=>e(S(Number(o))+C,f),u=(o,b,c)=>e(N(Number(o),Number(b),Number(c)),h),p=(o,b,c)=>e(N(Number(o),Number(b),Number(c))+C,f)):r===2&&(u=s(l),p=s(g));const B={bold:e(1,22),dim:e(2,22),hidden:e(8,28),inverse:e(7,27),italic:e(3,23),overline:e(53,55),reset:e(0,0),strike:e(9,29),strikethrough:e(9,29),underline:e(4,24),visible:E},a={bgBlack:e(40,f),bgBlackBright:e(100,f),bgBlue:e(44,f),bgBlueBright:e(104,f),bgCyan:e(46,f),bgCyanBright:e(106,f),bgGray:e(100,f),bgGreen:e(42,f),bgGreenBright:e(102,f),bgGrey:e(100,f),bgMagenta:e(45,f),bgMagentaBright:e(105,f),bgRed:e(41,f),bgRedBright:e(101,f),bgWhite:e(47,f),bgWhiteBright:e(107,f),bgYellow:e(43,f),bgYellowBright:e(103,f),black:e(30,h),blackBright:e(90,h),blue:e(34,h),blueBright:e(94,h),cyan:e(36,h),cyanBright:e(96,h),gray:e(90,h),green:e(32,h),greenBright:e(92,h),grey:e(90,h),magenta:e(35,h),magentaBright:e(95,h),red:e(31,h),redBright:e(91,h),white:e(37,h),whiteBright:e(97,h),yellow:e(33,h),yellowBright:e(93,h)},n={bg:o=>g(M(o,0,255)),bgHex:i(p),bgRgb:(o,b,c)=>p(M(o,0,255),M(b,0,255),M(c,0,255)),fg:o=>l(M(o,0,255)),hex:i(u),rgb:(o,b,c)=>u(M(o,0,255),M(b,0,255),M(c,0,255))};return{baseColors:a,baseStyles:B,styleMethods:n}},x=H(),K=U();I(x);const X=(r,e,s)=>{if(e==="")return r;let i=r.indexOf(e);if(i<0)return r;const l=e.length;let g=0,u="";for(;~i;)u+=r.slice(g,i)+s,g=i+l,i=r.indexOf(e,g);return u+r.slice(g)},Z=(r,e,s)=>{if(r==null||r==="")return"";let i;if(r.raw===void 0?i=String(r):i=String.raw(r,...e),i.includes("\x1B"))for(let l=s;l;l=l.props)i=X(i,l.close,l.open);return i.includes(`
2
- `)&&(i=i.replace(/(\r*\n)/g,`${s.closeStack}$1${s.openStack}`)),s.openStack+i+s.closeStack},A=function(r){const e=r?.level??x,{baseColors:s,baseStyles:i,styleMethods:l}=I(e),g={};let u=null;const p=({props:a},{close:n,open:o})=>{const b=(a?.openStack??"")+o,c=n+(a?.closeStack??""),$=(O,...m)=>Z(O,m,$.props);return Object.setPrototypeOf($,u),$.props={close:n,closeStack:c,open:o,openStack:b,props:a},$.open=b,$.close=c,$},B=a=>String(a);B.strip=a=>a.replaceAll(q(),"");for(const a in s)g[a]={get(){const n=p(this,s[a]);return Object.defineProperty(this,a,{value:n}),n}};for(const a in i)g[a]={get(){const n=p(this,i[a]);return Object.defineProperty(this,a,{value:n}),n}};for(const a in l)g[a]={get(){return(...n)=>p(this,l[a](...n))}};return g.ansi256=g.fg,g.bgAnsi256=g.bg,u=Object.defineProperties({},g),Object.setPrototypeOf(B,u),B},t=new A;new A({level:K});t.ansi256;t.bg;t.bgAnsi256;t.bgHex;t.bgRgb;t.fg;t.hex;t.rgb;t.strip;t.bgBlack;t.bgBlackBright;t.bgBlue;t.bgBlueBright;t.bgCyan;t.bgCyanBright;t.bgGray;t.bgGreen;t.bgGreenBright;t.bgGrey;t.bgMagenta;t.bgMagentaBright;t.bgRed;t.bgRedBright;t.bgWhite;t.bgWhiteBright;t.bgYellow;t.bgYellowBright;t.black;t.blackBright;t.blue;t.blueBright;const Q=t.bold,ee=t.cyan;t.cyanBright;const te=t.dim;t.gray;const re=t.green;t.greenBright;t.grey;t.hidden;const ne=t.inverse;t.italic;const oe=t.magenta;t.magentaBright;t.overline;const ie=t.red;t.redBright;t.reset;t.strike;t.strikethrough;const se=t.underline;t.visible;t.white;t.whiteBright;const ce=t.yellow;t.yellowBright;export{U as $,ee as D,te as F,re as J,ne as P,oe as T,ie as X,se as e,Q as q,ce as r,t,H as w};
@@ -1 +0,0 @@
1
- import{createRequire as $}from"node:module";let P;const S=t=>(P??=$(import.meta.url))(t),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=t=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[s,e]=u.versions.node.split(".").map(Number);if(s>22||s===22&&e>=3||s===20&&e>=16)return u.getBuiltinModule(t)}return S(t)},{spawn:T}=h("node:child_process"),{cwd:E}=u,{basename:j,normalize:k,delimiter:p,resolve:y,dirname:m}=h("node:path"),{pipeline:A}=h("node:stream/promises"),{PassThrough:q}=h("node:stream"),B=h("node:readline"),{openSync:F,readSync:H,closeSync:M,statSync:R}=h("node:fs"),z=/^path$/i,w={key:"PATH",value:""};function b(t){for(const s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||!z.test(s))continue;const e=t[s];return e?{key:s,value:e}:w}return w}function I(t,s){const e=s.value.split(p),o=[];let r=t,i;do o.push(y(r,"node_modules",".bin")),i=r,r=m(r);while(r!==i);o.push(m(process.execPath));const n=o.concat(e).join(p);return{key:s.key,value:n}}function L(t,s,e=!0){const o={...process.env,...s};if(!e)return o;const r=I(t,b(o));return o[r.key]=r.value,o}const N=t=>{let s=t.length;const e=new q,o=()=>{--s===0&&e.end()};for(const r of t)A(r,e,{end:!1}).then(o).catch(o);return e},_=/([()\][%!^"`<>&|;, *?])/g,X=/^#!\s*(.+)/,D=/\.(?:com|exe)$/i,W=/node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i,V=process.platform==="win32",G=[".EXE",".CMD",".BAT",".COM"];function J(t,s=[],e={}){if(e.shell===!0||!V)return{command:t,args:s,options:e};let o=g(t,e),r=null;if(o!==null){const n=Buffer.alloc(150);let c=null;try{c=F(o,"r"),H(c,n,0,150,0)}catch{}finally{c!==null&&M(c)}const d=n.toString().match(X);if(d!==null){const a=d[1].trim(),l=a.indexOf(" "),x=l!==-1?a.slice(0,l):a,O=l!==-1?a.slice(l+1):"",f=j(x);r=f==="env"?O||null:f}}if(r!==null&&o!==null&&(s=[o,...s],t=r,o=g(t,e)),o===null||!D.test(o)){const i=o!==null&&W.test(o);t=k(t),t=t.replace(_,"^$1"),s=s.map(n=>(n=n.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),n=n.replace(/(?=(\\+?)?)\1$/,"$1$1"),n=`"${n}"`,n=n.replace(_,"^$1"),i&&(n=n.replace(_,"^$1")),n)),s=["/d","/s","/c",`"${[t,...s].join(" ")}"`],t=e.env?.comspec??"cmd.exe",e={...e,windowsVerbatimArguments:!0}}return{command:t,args:s,options:e}}function g(t,s){const e=(s.cwd??E()).toString(),o=s.env??process.env,r=b(o).value,i=t.includes("/")||t.includes("\\")?[""]:[e,...r.split(p)],n=o.PATHEXT?o.PATHEXT.split(p):G;t.includes(".")&&n[0]!==""&&n.unshift("");for(const c of i){const d=y(e,c.startsWith('"')&&c.endsWith('"')&&c.length>1?c.slice(1,-1):c,t);for(const a of n){const l=d+a;try{if(R(l).isFile())return l}catch{}}}return null}var v=class extends Error{result;output;get exitCode(){if(this.result.exitCode!==null)return this.result.exitCode}constructor(t,s){super(`Process exited with non-zero status (${t.exitCode})`),this.result=t,this.output=s}};const K={timeout:void 0,persist:!1},Q={windowsHide:!0};function U(t){const s=new AbortController;for(const e of t){if(e.aborted)return s.abort(),e;const o=()=>{s.abort(e.reason)};e.addEventListener("abort",o,{signal:s.signal})}return s.signal}async function C(t){let s="";try{for await(const e of t)s+=e.toString()}catch{}return s}var Y=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}constructor(t,s,e){this._options={...K,...e},this._command=t,this._args=s??[],this._processClosed=new Promise(o=>{this._resolveClose=o})}kill(t){return this._process?.kill(t)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(t,s,e){return tt(t,s,{...e,stdin:this})}async*[Symbol.asyncIterator](){const t=this._process;if(!t)return;const s=[];this._streamErr&&s.push(this._streamErr),this._streamOut&&s.push(this._streamOut);const e=N(s),o=B.createInterface({input:e});for await(const r of o)yield r.toString();if(await this._processClosed,t.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new v(this)}async _waitForOutput(){const t=this._process;if(!t)throw new Error("No process was started");const[s,e]=await Promise.all([this._streamOut?C(this._streamOut):"",this._streamErr?C(this._streamErr):""]);await this._processClosed;const{stdin:o}=this._options;if(o&&typeof o!="string"&&await o,t.removeAllListeners(),this._thrownError)throw this._thrownError;const r={stderr:e,stdout:s,exitCode:this.exitCode};if(this._options.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new v(this,r);return r}then(t,s){return this._waitForOutput().then(t,s)}_streamOut;_streamErr;spawn(){const t=E(),s=this._options,e={...Q,...s.nodeOptions},o=[];this._resetState(),s.timeout!==void 0&&o.push(AbortSignal.timeout(s.timeout)),s.signal!==void 0&&o.push(s.signal),s.persist===!0&&(e.detached=!0),o.length>0&&(e.signal=U(o)),e.env=L(t,e.env,s.nodePath);const r=J(this._command,this._args,e),i=T(r.command,r.args,r.options);if(i.stderr&&(this._streamErr=i.stderr),i.stdout&&(this._streamOut=i.stdout),this._process=i,i.once("error",this._onError),i.once("close",this._onClose),i.stdin){const{stdin:n}=s;typeof n=="string"?i.stdin.end(n):n?.process?.stdout?.pipe(i.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(t=>{this._resolveClose=t}),this._thrownError=void 0}_onError=t=>{if(t.name==="AbortError"&&(!(t.cause instanceof Error)||t.cause.name!=="TimeoutError")){this._aborted=!0;return}this._thrownError=t};_onClose=()=>{this._resolveClose&&this._resolveClose()}};const Z=(t,s,e)=>{const o=new Y(t,s,e);return o.spawn(),o},tt=Z;export{Z as R};