Skip to content

Commit 43d5602

Browse files
pablodeluccaclaude
andcommitted
fix(ci): seed hooks consent in npm smoke test, resolve fresh audit advisories
Two independent CI failures on the PR: - verify-npm-package spawns the packed CLI without a TTY, where the first-run consent gate now (correctly) skips hook installation — seed consent in the smoke HOME so the script keeps exercising the real install path, mirroring server/__tests__/cli.test.ts. - npm audit gained fresh upstream advisories unrelated to this branch: brace-expansion and fast-uri (high, fixed in-range via lockfile) and the ajv@<=6.12.6 ReDoS under the dev-only AsyncAPI RAML parser chain (moderate, pinned to the patched ajv 6.15.0 via nested overrides — same major, so the parser API is untouched). asyncapi validate/generate verified drift-free. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 4ab3e16 commit 43d5602

3 files changed

Lines changed: 74 additions & 156 deletions

File tree

package-lock.json

Lines changed: 51 additions & 152 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@
88
"type": "git",
99
"url": "https://github.com/pixel-agents-hq/pixel-agents"
1010
},
11-
"workspaces": ["server", "webview-ui"],
11+
"workspaces": [
12+
"server",
13+
"webview-ui"
14+
],
1215
"icon": "icon.png",
1316
"license": "MIT",
1417
"engines": {
1518
"node": ">=20",
1619
"vscode": "^1.105.0"
1720
},
18-
"extensionKind": ["workspace"],
21+
"extensionKind": [
22+
"workspace"
23+
],
1924
"categories": [
2025
"Other"
2126
],
@@ -159,7 +164,13 @@
159164
},
160165
"overrides": {
161166
"jsonpath-plus": "^10.4.0",
162-
"brace-expansion": "^5.0.2",
163-
"minimatch": "^10.1.1"
167+
"brace-expansion": "^5.0.9",
168+
"minimatch": "^10.1.1",
169+
"json-schema-migrate": {
170+
"ajv": "^6.15.0"
171+
},
172+
"webapi-parser": {
173+
"ajv": "^6.15.0"
174+
}
164175
}
165176
}

scripts/verify-npm-package.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@ async function verifyInstalledTarball(tarballPath) {
100100
const smokeProject = path.join(smokeRoot, 'project');
101101
fs.mkdirSync(smokeHome, { recursive: true });
102102
fs.mkdirSync(smokeProject, { recursive: true });
103+
// The spawned CLI has no TTY, and without prior consent the first-run gate
104+
// (rightly) skips hook installation there — seed consent so the smoke test
105+
// can exercise the actual install path (mirrors server/__tests__/cli.test.ts).
106+
fs.mkdirSync(path.join(smokeHome, '.pixel-agents'), { recursive: true });
107+
fs.writeFileSync(
108+
path.join(smokeHome, '.pixel-agents', 'config.json'),
109+
JSON.stringify({ hooksConsentGiven: true }),
110+
);
103111
fs.writeFileSync(
104112
path.join(smokeProject, 'package.json'),
105113
JSON.stringify({ name: 'pixel-agents-package-smoke', private: true }, null, 2),

0 commit comments

Comments
 (0)