@get-bb/plugin-sdk 0.6.142 → 0.6.144

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.
@@ -13323,6 +13323,7 @@ type SendMessageRequest = z$1.infer<typeof sendMessageRequestSchema>;
13323
13323
  */
13324
13324
  declare const sendMessageResponseSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
13325
13325
  delivery: z$1.ZodLiteral<"sent">;
13326
+ messageSequence: z$1.ZodNullable<z$1.ZodNumber>;
13326
13327
  ok: z$1.ZodLiteral<true>;
13327
13328
  }, z$1.core.$strip>, z$1.ZodObject<{
13328
13329
  delivery: z$1.ZodLiteral<"queued">;
@@ -13539,6 +13539,7 @@ type SendMessageRequest = z$1.infer<typeof sendMessageRequestSchema>;
13539
13539
  */
13540
13540
  declare const sendMessageResponseSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
13541
13541
  delivery: z$1.ZodLiteral<"sent">;
13542
+ messageSequence: z$1.ZodNullable<z$1.ZodNumber>;
13542
13543
  ok: z$1.ZodLiteral<true>;
13543
13544
  }, z$1.core.$strip>, z$1.ZodObject<{
13544
13545
  delivery: z$1.ZodLiteral<"queued">;
package/dist/host.js CHANGED
@@ -1656,6 +1656,28 @@ async function listLsofProcessCwds() {
1656
1656
  }
1657
1657
  return results;
1658
1658
  }
1659
+ var runningProcessCwdScan = null;
1660
+ var queuedProcessCwdScan = null;
1661
+ function startProcessCwdScan() {
1662
+ const scan = (process.platform === "linux" ? listLinuxProcessCwds() : listLsofProcessCwds()).finally(() => {
1663
+ if (runningProcessCwdScan === scan) runningProcessCwdScan = null;
1664
+ });
1665
+ runningProcessCwdScan = scan;
1666
+ return scan;
1667
+ }
1668
+ function scanProcessCwds() {
1669
+ if (queuedProcessCwdScan !== null) return queuedProcessCwdScan;
1670
+ if (runningProcessCwdScan === null) return startProcessCwdScan();
1671
+ const queued = runningProcessCwdScan.then(
1672
+ () => void 0,
1673
+ () => void 0
1674
+ ).then(() => {
1675
+ queuedProcessCwdScan = null;
1676
+ return startProcessCwdScan();
1677
+ });
1678
+ queuedProcessCwdScan = queued;
1679
+ return queued;
1680
+ }
1659
1681
  async function resolveSweepDirectory(directory) {
1660
1682
  const resolved = resolve(directory);
1661
1683
  let ancestor = dirname2(resolved);
@@ -1690,7 +1712,7 @@ async function listProcessesWithCwdUnder(args) {
1690
1712
  if (directories.length === 0) {
1691
1713
  return [];
1692
1714
  }
1693
- const all = process.platform === "linux" ? await listLinuxProcessCwds() : await listLsofProcessCwds();
1715
+ const all = await scanProcessCwds();
1694
1716
  return all.filter(
1695
1717
  (entry) => entry.pid !== process.pid && directories.some(
1696
1718
  (directory) => isPathUnderDirectory(entry.cwd, directory)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@get-bb/plugin-sdk",
3
- "version": "0.6.142",
3
+ "version": "0.6.144",
4
4
  "homepage": "https://github.com/get-bb/bb#readme",
5
5
  "bugs": {
6
6
  "url": "https://github.com/get-bb/bb/issues"