@avocadostudio-ai/site-sdk 0.22.0 → 0.24.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.
@@ -1,5 +1,6 @@
1
1
  import type { QaState } from "./state.ts";
2
2
  import type { QaCheck } from "./types.ts";
3
+ export declare function gitEnv(): NodeJS.ProcessEnv;
3
4
  /** Installed agent skills and lockfiles are not the integration. */
4
5
  export declare function isExcludedPath(path: string): boolean;
5
6
  /** Paths that are the integration's own: an `avocado` folder, the editor and preview routes, env files. */
@@ -18,9 +18,22 @@ import { existsSync, readFileSync } from "node:fs";
18
18
  import { basename, dirname, extname, join, normalize, sep } from "node:path";
19
19
  import { listSourceFiles } from "./project.js";
20
20
  const STAGE = "invasiveness";
21
+ /*
22
+ * Git run from a hook exports GIT_DIR, GIT_WORK_TREE and GIT_INDEX_FILE, and a
23
+ * child git obeys them over its `cwd`. `avocado qa` in a pre-push hook would
24
+ * then diff whatever repository the hook belongs to, not the site's. Dropping
25
+ * them makes `cwd` decide, which is what this function means.
26
+ */
27
+ export function gitEnv() {
28
+ const env = { ...process.env };
29
+ for (const key of Object.keys(env))
30
+ if (key.startsWith("GIT_"))
31
+ delete env[key];
32
+ return env;
33
+ }
21
34
  function git(cwd, args) {
22
35
  try {
23
- return execFileSync("git", args, { cwd, encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"], maxBuffer: 64 * 1024 * 1024 });
36
+ return execFileSync("git", args, { cwd, env: gitEnv(), encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"], maxBuffer: 64 * 1024 * 1024 });
24
37
  }
25
38
  catch {
26
39
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avocadostudio-ai/site-sdk",
3
- "version": "0.22.0",
3
+ "version": "0.24.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -159,17 +159,17 @@
159
159
  ],
160
160
  "dependencies": {
161
161
  "zod": "^4.3.6",
162
- "@avocadostudio-ai/blocks": "^0.22.0",
163
- "@avocadostudio-ai/preview-adapter": "^0.22.0",
164
- "@avocadostudio-ai/shared": "^0.22.0",
165
- "@avocadostudio-ai/richtext": "^0.22.0"
162
+ "@avocadostudio-ai/blocks": "^0.24.0",
163
+ "@avocadostudio-ai/preview-adapter": "^0.24.0",
164
+ "@avocadostudio-ai/richtext": "^0.24.0",
165
+ "@avocadostudio-ai/shared": "^0.24.0"
166
166
  },
167
167
  "peerDependencies": {
168
+ "better-sqlite3": ">=12.0.0",
168
169
  "next": ">=15.0.0",
169
170
  "react": ">=19.0.0",
170
171
  "react-dom": ">=19.0.0",
171
- "better-sqlite3": ">=12.0.0",
172
- "@avocadostudio-ai/orchestrator-core": "^0.22.0"
172
+ "@avocadostudio-ai/orchestrator-core": "^0.24.0"
173
173
  },
174
174
  "peerDependenciesMeta": {
175
175
  "next": {
@@ -190,6 +190,7 @@
190
190
  },
191
191
  "devDependencies": {
192
192
  "@types/react": "^19.0.10",
193
+ "@types/react-dom": "^19.2.3",
193
194
  "next": "^15.5.25",
194
195
  "tsx": "^4.21.0",
195
196
  "typescript": "^5.7.3"