@wspc/cli 0.1.10 → 0.1.11

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.
package/dist/cli.js CHANGED
@@ -1520,9 +1520,9 @@ function createConsistencyFetch(opts) {
1520
1520
  }
1521
1521
 
1522
1522
  // src/version.ts
1523
- var VERSION = "0.1.10";
1523
+ var VERSION = "0.1.11";
1524
1524
  var SPEC_SHA = "bec760cd";
1525
- var SPEC_FETCHED_AT = "2026-07-07T06:24:39.560Z";
1525
+ var SPEC_FETCHED_AT = "2026-07-08T01:27:32.122Z";
1526
1526
  var API_BASE = "https://api.wspc.ai";
1527
1527
 
1528
1528
  // src/index.ts
@@ -6302,6 +6302,7 @@ function containsVersionConflict(value) {
6302
6302
  // src/handwritten/commands/drive/watch.ts
6303
6303
  import { Command as Command81 } from "commander";
6304
6304
  import chokidar from "chokidar";
6305
+ import { watch as fsWatch } from "fs";
6305
6306
  import { relative as relative2, resolve as resolve4 } from "path";
6306
6307
 
6307
6308
  // src/handwritten/commands/drive/realtime.ts
@@ -6718,7 +6719,7 @@ async function runDriveWatch(root, options = {}) {
6718
6719
  writeRealtimeState: (next) => writeDriveRealtimeState(root, next)
6719
6720
  });
6720
6721
  }
6721
- source = options.source ?? createChokidarSource(root);
6722
+ source = options.source ?? createDefaultWatchSource(root);
6722
6723
  source.onChange((path) => {
6723
6724
  if (isDriveInternalPath(root, path)) return;
6724
6725
  scheduleSync(debounceMs);
@@ -6767,6 +6768,27 @@ function driveWatchCommand(options = {}) {
6767
6768
  await runDriveWatch(resolve4(path), options);
6768
6769
  });
6769
6770
  }
6771
+ function createDefaultWatchSource(root) {
6772
+ return process.platform === "win32" ? createNativeRecursiveSource(root) : createChokidarSource(root);
6773
+ }
6774
+ function createNativeRecursiveSource(root) {
6775
+ const handlers = [];
6776
+ const watcher = fsWatch(root, { recursive: true }, (_event, filename) => {
6777
+ if (filename === null) return;
6778
+ const path = resolve4(root, filename.toString());
6779
+ for (const handler of handlers) handler(path);
6780
+ });
6781
+ watcher.on("error", () => {
6782
+ });
6783
+ return {
6784
+ onChange(handler) {
6785
+ handlers.push(handler);
6786
+ },
6787
+ async close() {
6788
+ watcher.close();
6789
+ }
6790
+ };
6791
+ }
6770
6792
  function createChokidarSource(root) {
6771
6793
  const watcher = chokidar.watch(root, {
6772
6794
  ignoreInitial: true,