@rbbtsn0w/adg 0.4.0-beta.9 → 0.4.0
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.
|
@@ -386,7 +386,8 @@ function parseOutput(hookEvent, stdout) {
|
|
|
386
386
|
const text = stdout.trim();
|
|
387
387
|
if (!text) return {};
|
|
388
388
|
try {
|
|
389
|
-
|
|
389
|
+
const parsed = JSON.parse(text);
|
|
390
|
+
return (typeof parsed === "object" && parsed !== null) ? parsed : {};
|
|
390
391
|
} catch (error) {
|
|
391
392
|
if (hookEvent === "SessionStart") return { additionalContext: text };
|
|
392
393
|
fail("hook command returned invalid JSON", error);
|
|
@@ -185,12 +185,14 @@ function removeProjection(scanDir, name, realDir) {
|
|
|
185
185
|
st = undefined;
|
|
186
186
|
}
|
|
187
187
|
if (realDir) {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
188
|
+
if (existsSync(realDir)) {
|
|
189
|
+
// The real store dir is known: drop the in-place manifest + convention aliases.
|
|
190
|
+
rmSync(join(realDir, ANTIGRAVITY_MANIFEST), { force: true });
|
|
191
|
+
writeAntigravityMcpConfig(realDir, readManifest(realDir), { components: [] });
|
|
192
|
+
writeAntigravityHooks(realDir, readManifest(realDir), { components: [] });
|
|
193
|
+
for (const field of CONVENTION_FIELDS)
|
|
194
|
+
rmIfSymlink(join(realDir, field));
|
|
195
|
+
}
|
|
194
196
|
if (resolve(target) === resolve(realDir))
|
|
195
197
|
return; // in-place: target IS the store folder — never delete it
|
|
196
198
|
// Aliased exposure we created (symlink, or a copy-fallback dir): safe to drop wholesale.
|