@ghl-ai/aw 0.1.34-beta.20 → 0.1.34-beta.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.
- package/link.mjs +7 -1
- package/package.json +1 -1
package/link.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// link.mjs — Create symlinks from IDE dirs → .aw_registry/
|
|
2
2
|
|
|
3
|
-
import { existsSync, lstatSync, mkdirSync, readdirSync, unlinkSync, symlinkSync, rmdirSync } from 'node:fs';
|
|
3
|
+
import { existsSync, lstatSync, mkdirSync, readdirSync, unlinkSync, symlinkSync, rmdirSync, writeFileSync } from 'node:fs';
|
|
4
4
|
import { join, relative } from 'node:path';
|
|
5
5
|
import { homedir } from 'node:os';
|
|
6
6
|
import * as fmt from './fmt.mjs';
|
|
@@ -250,7 +250,13 @@ export function linkWorkspace(cwd) {
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
+
// Nudge IDE file watchers by creating+deleting a sentinel in each IDE dir.
|
|
254
|
+
// Symlink changes alone aren't reliably detected; a structural file change is.
|
|
253
255
|
if (created > 0) {
|
|
256
|
+
for (const ide of IDE_DIRS) {
|
|
257
|
+
const sentinel = join(cwd, ide, '.aw-sync');
|
|
258
|
+
try { writeFileSync(sentinel, ''); unlinkSync(sentinel); } catch { /* best effort */ }
|
|
259
|
+
}
|
|
254
260
|
fmt.logSuccess(`Linked ${created} IDE symlink${created > 1 ? 's' : ''}`);
|
|
255
261
|
}
|
|
256
262
|
|