@vibelet/cli 1.2.185 → 1.2.186

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 (29) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/inventory-scan-worker.cjs +1 -1
  3. package/dist/runtime-version.cjs +1 -1
  4. package/dist/tailcat/vibelet-tailcat-darwin-amd64 +0 -0
  5. package/dist/tailcat/vibelet-tailcat-darwin-arm64 +0 -0
  6. package/dist/tailcat/vibelet-tailcat-linux-amd64 +0 -0
  7. package/dist/tailcat/vibelet-tailcat-linux-arm64 +0 -0
  8. package/dist/tailcat/vibelet-tailcat-win32-amd64.exe +0 -0
  9. package/dist/tailcat/vibelet-tailcat-win32-arm64.exe +0 -0
  10. package/dist/vibelet.mjs +92 -113
  11. package/dist/web/assets/App-CnoeNagf.js +11 -0
  12. package/dist/web/assets/{ArchiveSyncPanel-HfbSbAJT.js → ArchiveSyncPanel-BmuZbCNC.js} +1 -1
  13. package/dist/web/assets/{ConnectionSettingsPanel-Y8Um-67e.js → ConnectionSettingsPanel-CBCsJpl3.js} +1 -1
  14. package/dist/web/assets/{DaemonSettingsPanel--znFJEC6.js → DaemonSettingsPanel-BvwnLOlI.js} +1 -1
  15. package/dist/web/assets/{DiffDrawer-BI-wtkQ_.js → DiffDrawer-D1KuAQR4.js} +1 -1
  16. package/dist/web/assets/{FilesControlPanel-B5M5ueO9.js → FilesControlPanel-zSRq3nW9.js} +2 -2
  17. package/dist/web/assets/LanguageSettingsPanel-BynXGit2.js +1 -0
  18. package/dist/web/assets/{NotificationSettingsPanel-IgZdwrhi.js → NotificationSettingsPanel-B1B7EVaN.js} +1 -1
  19. package/dist/web/assets/{SavedTargetsPanel-DggmoRgT.js → SavedTargetsPanel-rIXNVgWc.js} +1 -1
  20. package/dist/web/assets/{ThemeSettingsPanel-vB2Ox3sA.js → ThemeSettingsPanel-qeXJXo6p.js} +1 -1
  21. package/dist/web/assets/{file-text-NAVq0aqX.js → file-text-BvyZLKIE.js} +1 -1
  22. package/dist/web/assets/{highlighted-body-TPN3WLV5-ClieluW-.js → highlighted-body-TPN3WLV5-BpBsGeHz.js} +1 -1
  23. package/dist/web/assets/{index-CXts92Zv.js → index-C912jm0R.js} +1 -1
  24. package/dist/web/assets/{index-D8mZeSsk.css → index-CscvgG9H.css} +1 -1
  25. package/dist/web/assets/{mermaid-O7DHMXV3-D0ujIgIK.js → mermaid-O7DHMXV3-B2G14y_6.js} +3 -3
  26. package/dist/web/index.html +2 -2
  27. package/package.json +1 -1
  28. package/dist/web/assets/App-1V1UoQkP.js +0 -12
  29. package/dist/web/assets/LanguageSettingsPanel-BLwzc7Dm.js +0 -1
@@ -1,2 +1,2 @@
1
- var c=require("node:fs"),n=require("node:path"),p="@vibelet/cli";function i(r){try{let e=JSON.parse((0,c.readFileSync)(r,"utf8"));if(e.name===p&&typeof e.version=="string"&&e.version.length>0)return e.version}catch{}return null}function l(){return"1.2.185"}var a=l();process.stdout.write(`${a}
1
+ var c=require("node:fs"),n=require("node:path"),p="@vibelet/cli";function i(r){try{let e=JSON.parse((0,c.readFileSync)(r,"utf8"));if(e.name===p&&typeof e.version=="string"&&e.version.length>0)return e.version}catch{}return null}function l(){return"1.2.186"}var a=l();process.stdout.write(`${a}
2
2
  `);
package/dist/vibelet.mjs CHANGED
@@ -12369,7 +12369,7 @@ function canUseSystemdUserManager({ spawnSyncImpl = node_child_process__WEBPACK_
12369
12369
 
12370
12370
  /***/ }),
12371
12371
 
12372
- /***/ 2629:
12372
+ /***/ 636:
12373
12373
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
12374
12374
 
12375
12375
 
@@ -12422,112 +12422,6 @@ var websocket_server = __nccwpck_require__(3261);
12422
12422
 
12423
12423
  /* harmony default export */ const wrapper = (websocket);
12424
12424
 
12425
- ;// CONCATENATED MODULE: ./bin/terminal-process-tree.mjs
12426
-
12427
-
12428
- const TAKEOVER_STOP_TIMEOUT_MS = 3000;
12429
-
12430
- function terminal_process_tree_sendSignal(child, signal) {
12431
- if (!child.pid || child.exitCode !== null || child.signalCode !== null) return;
12432
- try {
12433
- process.kill(child.pid, signal);
12434
- } catch {
12435
- // Already exited.
12436
- }
12437
- }
12438
-
12439
- function isPidAlive(pid) {
12440
- if (!pid) return false;
12441
- try {
12442
- process.kill(pid, 0);
12443
- return true;
12444
- } catch {
12445
- return false;
12446
- }
12447
- }
12448
-
12449
- function collectProcessTreePids(rootPid) {
12450
- if (!rootPid) return [];
12451
- let rows;
12452
- try {
12453
- rows = (0,external_node_child_process_.execFileSync)('ps', ['-axo', 'pid=,ppid='], {
12454
- encoding: 'utf8',
12455
- stdio: ['ignore', 'pipe', 'ignore'],
12456
- });
12457
- } catch {
12458
- return [rootPid];
12459
- }
12460
- const childrenByParent = new Map();
12461
- for (const line of rows.split('\n')) {
12462
- const [pidText, ppidText] = line.trim().split(/\s+/);
12463
- const pid = Number(pidText);
12464
- const ppid = Number(ppidText);
12465
- if (!Number.isFinite(pid) || !Number.isFinite(ppid)) continue;
12466
- const children = childrenByParent.get(ppid) ?? [];
12467
- children.push(pid);
12468
- childrenByParent.set(ppid, children);
12469
- }
12470
- const out = [];
12471
- const visit = (pid) => {
12472
- out.push(pid);
12473
- for (const childPid of childrenByParent.get(pid) ?? []) {
12474
- visit(childPid);
12475
- }
12476
- };
12477
- visit(rootPid);
12478
- return out;
12479
- }
12480
-
12481
- function sendSignalToPids(pids, signal) {
12482
- for (const pid of [...pids].reverse()) {
12483
- try {
12484
- process.kill(pid, signal);
12485
- } catch {
12486
- // Already exited.
12487
- }
12488
- }
12489
- }
12490
-
12491
- async function waitForProcessTreeExit(pids, timeoutMs) {
12492
- const deadline = Date.now() + timeoutMs;
12493
- while ([...pids].some(isPidAlive)) {
12494
- const remainingMs = deadline - Date.now();
12495
- if (remainingMs <= 0) return false;
12496
- await new Promise((resolve) => setTimeout(resolve, Math.min(remainingMs, 10)));
12497
- }
12498
- return true;
12499
- }
12500
-
12501
- async function waitForExitOrTimeout(childExit, timeoutMs) {
12502
- let timer;
12503
- const timeout = new Promise((resolve) => {
12504
- timer = setTimeout(() => resolve(null), timeoutMs);
12505
- });
12506
- const result = await Promise.race([childExit, timeout]);
12507
- clearTimeout(timer);
12508
- return result;
12509
- }
12510
-
12511
- async function stopNativeChild(
12512
- child,
12513
- childExit,
12514
- { interruptTimeoutMs = TAKEOVER_STOP_TIMEOUT_MS, terminateTimeoutMs = 1000, killTimeoutMs = 1000 } = {},
12515
- ) {
12516
- if (child.exitCode !== null || child.signalCode !== null) return true;
12517
- const trackedPids = new Set(collectProcessTreePids(child.pid));
12518
- terminal_process_tree_sendSignal(child, 'SIGINT');
12519
- await waitForExitOrTimeout(childExit, interruptTimeoutMs);
12520
- if (await waitForProcessTreeExit(trackedPids, 0)) return true;
12521
-
12522
- for (const pid of collectProcessTreePids(child.pid)) trackedPids.add(pid);
12523
- sendSignalToPids(trackedPids, 'SIGTERM');
12524
- if (await waitForProcessTreeExit(trackedPids, terminateTimeoutMs)) return true;
12525
-
12526
- for (const pid of collectProcessTreePids(child.pid)) trackedPids.add(pid);
12527
- sendSignalToPids(trackedPids, 'SIGKILL');
12528
- return waitForProcessTreeExit(trackedPids, killTimeoutMs);
12529
- }
12530
-
12531
12425
  ;// CONCATENATED MODULE: ./bin/terminal-wrapper.mjs
12532
12426
 
12533
12427
 
@@ -12536,13 +12430,10 @@ async function stopNativeChild(
12536
12430
 
12537
12431
 
12538
12432
 
12539
-
12540
-
12541
-
12542
12433
  const terminalControlTokenPath = (0,external_node_path_.join)((0,external_node_os_.homedir)(), '.vibelet', 'runtime', 'terminal-control-token');
12543
12434
 
12544
- const terminal_wrapper_TAKEOVER_STOP_TIMEOUT_MS = 3000;
12545
- const TAKEOVER_MODE_SETTLE_TIMEOUT_MS = terminal_wrapper_TAKEOVER_STOP_TIMEOUT_MS + 2000;
12435
+ const TAKEOVER_STOP_TIMEOUT_MS = 3000;
12436
+ const TAKEOVER_MODE_SETTLE_TIMEOUT_MS = TAKEOVER_STOP_TIMEOUT_MS + 2000;
12546
12437
  const SWITCHBACK_RESTORE_NOTICE_MS = 1200;
12547
12438
  const SWITCHBACK_BUSY_RETRY_DELAY_MS = 750;
12548
12439
  const TERMINAL_CONTROL_RECONNECT_DELAY_MS = 1000;
@@ -12874,6 +12765,94 @@ function waitForChildExit(child) {
12874
12765
  });
12875
12766
  }
12876
12767
 
12768
+ function sendSignal(child, signal) {
12769
+ if (!child.pid || child.exitCode !== null || child.signalCode !== null) return;
12770
+ try {
12771
+ process.kill(child.pid, signal);
12772
+ } catch {
12773
+ // Already exited.
12774
+ }
12775
+ }
12776
+
12777
+ function isPidAlive(pid) {
12778
+ if (!pid) return false;
12779
+ try {
12780
+ process.kill(pid, 0);
12781
+ return true;
12782
+ } catch {
12783
+ return false;
12784
+ }
12785
+ }
12786
+
12787
+ function collectProcessTreePids(rootPid) {
12788
+ if (!rootPid) return [];
12789
+ let rows;
12790
+ try {
12791
+ rows = (0,external_node_child_process_.execFileSync)('ps', ['-axo', 'pid=,ppid='], {
12792
+ encoding: 'utf8',
12793
+ stdio: ['ignore', 'pipe', 'ignore'],
12794
+ });
12795
+ } catch {
12796
+ return [rootPid];
12797
+ }
12798
+ const childrenByParent = new Map();
12799
+ for (const line of rows.split('\n')) {
12800
+ const [pidText, ppidText] = line.trim().split(/\s+/);
12801
+ const pid = Number(pidText);
12802
+ const ppid = Number(ppidText);
12803
+ if (!Number.isFinite(pid) || !Number.isFinite(ppid)) continue;
12804
+ const children = childrenByParent.get(ppid) ?? [];
12805
+ children.push(pid);
12806
+ childrenByParent.set(ppid, children);
12807
+ }
12808
+ const out = [];
12809
+ const visit = (pid) => {
12810
+ out.push(pid);
12811
+ for (const childPid of childrenByParent.get(pid) ?? []) {
12812
+ visit(childPid);
12813
+ }
12814
+ };
12815
+ visit(rootPid);
12816
+ return out;
12817
+ }
12818
+
12819
+ function sendSignalToProcessTree(child, signal) {
12820
+ if (!child.pid || child.exitCode !== null || child.signalCode !== null) return;
12821
+ const pids = collectProcessTreePids(child.pid);
12822
+ for (const pid of pids.reverse()) {
12823
+ try {
12824
+ process.kill(pid, signal);
12825
+ } catch {
12826
+ // Already exited.
12827
+ }
12828
+ }
12829
+ }
12830
+
12831
+ async function waitForExitOrTimeout(childExit, timeoutMs) {
12832
+ let timer;
12833
+ const timeout = new Promise((resolve) => {
12834
+ timer = setTimeout(() => resolve(null), timeoutMs);
12835
+ });
12836
+ const result = await Promise.race([childExit, timeout]);
12837
+ clearTimeout(timer);
12838
+ return result;
12839
+ }
12840
+
12841
+ async function stopNativeChild(
12842
+ child,
12843
+ childExit,
12844
+ { interruptTimeoutMs = TAKEOVER_STOP_TIMEOUT_MS, terminateTimeoutMs = 1000, killTimeoutMs = 1000 } = {},
12845
+ ) {
12846
+ if (child.exitCode !== null || child.signalCode !== null) return true;
12847
+ sendSignal(child, 'SIGINT');
12848
+ if (await waitForExitOrTimeout(childExit, interruptTimeoutMs)) return true;
12849
+ sendSignalToProcessTree(child, 'SIGTERM');
12850
+ if (await waitForExitOrTimeout(childExit, terminateTimeoutMs)) return true;
12851
+ sendSignalToProcessTree(child, 'SIGKILL');
12852
+ if (await waitForExitOrTimeout(childExit, killTimeoutMs)) return true;
12853
+ return !isPidAlive(child.pid);
12854
+ }
12855
+
12877
12856
  function waitMs(ms) {
12878
12857
  return new Promise((resolve) => {
12879
12858
  setTimeout(resolve, ms);
@@ -14866,7 +14845,7 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
14866
14845
  /* harmony import */ var _vibelet_help_mjs__WEBPACK_IMPORTED_MODULE_16__ = __nccwpck_require__(4162);
14867
14846
  /* harmony import */ var _vibelet_tailcat_config_mjs__WEBPACK_IMPORTED_MODULE_10__ = __nccwpck_require__(5798);
14868
14847
  /* harmony import */ var _vibelet_runtime_policy_mjs__WEBPACK_IMPORTED_MODULE_12__ = __nccwpck_require__(4);
14869
- /* harmony import */ var _terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(2629);
14848
+ /* harmony import */ var _terminal_wrapper_mjs__WEBPACK_IMPORTED_MODULE_11__ = __nccwpck_require__(636);
14870
14849
  /* harmony import */ var _vibelet_pairing_connections_mjs__WEBPACK_IMPORTED_MODULE_15__ = __nccwpck_require__(7721);
14871
14850
 
14872
14851