agiagent-dev 2026.1.30 → 2026.1.32
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/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
0c8337264f78308ab09fce8a670fbfae17efd8cad8a60f1d46a50e9a48a5eec6
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -2,7 +2,24 @@ import { spawnSync } from "node:child_process";
|
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
// Check if we're in a development context (git repo with .git directory)
|
|
7
|
+
function isDevContext(repoRoot) {
|
|
8
|
+
return fs.existsSync(path.join(repoRoot, ".git"));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Dynamically import setup-git-hooks only in dev context
|
|
12
|
+
async function maybeSetupGitHooks(repoRoot) {
|
|
13
|
+
if (!isDevContext(repoRoot)) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
const { setupGitHooks } = await import("./setup-git-hooks.js");
|
|
18
|
+
setupGitHooks({ repoRoot });
|
|
19
|
+
} catch {
|
|
20
|
+
// Skip if setup-git-hooks.js is not available (e.g., in published package)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
6
23
|
|
|
7
24
|
function detectPackageManager(ua = process.env.npm_config_user_agent ?? "") {
|
|
8
25
|
// Examples:
|
|
@@ -303,12 +320,12 @@ function trySetupCompletion(repoRoot) {
|
|
|
303
320
|
}
|
|
304
321
|
}
|
|
305
322
|
|
|
306
|
-
function main() {
|
|
323
|
+
async function main() {
|
|
307
324
|
const repoRoot = getRepoRoot();
|
|
308
325
|
process.chdir(repoRoot);
|
|
309
326
|
|
|
310
327
|
ensureExecutable(path.join(repoRoot, "dist", "/entry.js"));
|
|
311
|
-
|
|
328
|
+
await maybeSetupGitHooks(repoRoot);
|
|
312
329
|
trySetupCompletion(repoRoot);
|
|
313
330
|
|
|
314
331
|
if (!shouldApplyPnpmPatchedDependenciesFallback()) {
|
|
@@ -344,7 +361,7 @@ try {
|
|
|
344
361
|
process.env.NODE_ENV === "test";
|
|
345
362
|
|
|
346
363
|
if (!skip) {
|
|
347
|
-
main();
|
|
364
|
+
await main();
|
|
348
365
|
}
|
|
349
366
|
} catch (err) {
|
|
350
367
|
console.error(String(err));
|