vibelet 1.2.20 → 1.2.22

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.
@@ -1,2 +1,2 @@
1
- var s=require("node:fs"),n=require("node:path"),c="@vibelet/cli";function a(e){try{let r=JSON.parse((0,s.readFileSync)(e,"utf8"));if(r.name===c&&typeof r.version=="string"&&r.version.length>0)return r.version}catch{}return null}function p(){return"1.2.20"}var i=p();process.stdout.write(`${i}
1
+ var s=require("node:fs"),n=require("node:path"),c="@vibelet/cli";function a(e){try{let r=JSON.parse((0,s.readFileSync)(e,"utf8"));if(r.name===c&&typeof r.version=="string"&&r.version.length>0)return r.version}catch{}return null}function p(){return"1.2.22"}var i=p();process.stdout.write(`${i}
2
2
  `);
package/dist/vibelet.mjs CHANGED
@@ -6584,6 +6584,7 @@ function bootoutLaunchdService({
6584
6584
  launchDomain,
6585
6585
  label,
6586
6586
  plistPath,
6587
+ isServiceLoaded,
6587
6588
  }) {
6588
6589
  const attempts = [
6589
6590
  ['bootout', launchDomain, plistPath],
@@ -6600,6 +6601,12 @@ function bootoutLaunchdService({
6600
6601
  lastMissingResult = result;
6601
6602
  continue;
6602
6603
  }
6604
+ // launchctl bootout occasionally exits non-zero (e.g. "5: Input/output
6605
+ // error") after the service is actually gone. Trust post-attempt state
6606
+ // when the caller can check it.
6607
+ if (typeof isServiceLoaded === 'function' && !isServiceLoaded()) {
6608
+ return { ok: true, result };
6609
+ }
6603
6610
  return { ok: false, result };
6604
6611
  }
6605
6612
 
@@ -7078,12 +7085,17 @@ function createDarwinBackend() {
7078
7085
  return (0,node_child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync)('launchctl', args, { encoding: 'utf8' });
7079
7086
  }
7080
7087
 
7088
+ function isServiceLoaded() {
7089
+ return launchctl(['print', `${launchDomain}/${label}`]).status === 0;
7090
+ }
7091
+
7081
7092
  function bootoutService() {
7082
7093
  return (0,_vibelet_launchd_mjs__WEBPACK_IMPORTED_MODULE_9__/* .bootoutLaunchdService */ .B)({
7083
7094
  launchctl,
7084
7095
  launchDomain,
7085
7096
  label,
7086
7097
  plistPath,
7098
+ isServiceLoaded,
7087
7099
  });
7088
7100
  }
7089
7101
 
@@ -7145,7 +7157,7 @@ ${envSection}
7145
7157
  handlesProcessLifecycle: true,
7146
7158
 
7147
7159
  isServiceInstalled() {
7148
- return launchctl(['print', `${launchDomain}/${label}`]).status === 0;
7160
+ return isServiceLoaded();
7149
7161
  },
7150
7162
 
7151
7163
  install() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibelet",
3
- "version": "1.2.20",
3
+ "version": "1.2.22",
4
4
  "description": "Cross-platform CLI for installing and running the Vibelet daemon",
5
5
  "homepage": "https://vibelet.icu",
6
6
  "files": [