@goodfoot/claude-code-hooks 1.0.15 → 1.0.17
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/README.md +2 -1
- package/dist/cli.js +3 -3
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -107,7 +107,7 @@ npm test # Run tests
|
|
|
107
107
|
|
|
108
108
|
### Available Hook Types
|
|
109
109
|
|
|
110
|
-
The `--hooks` argument accepts a comma-separated list of any of these
|
|
110
|
+
The `--hooks` argument accepts a comma-separated list of any of these 13 event types:
|
|
111
111
|
|
|
112
112
|
| Hook Type | Description |
|
|
113
113
|
| -------------------- | ------------------------------------------ |
|
|
@@ -123,6 +123,7 @@ The `--hooks` argument accepts a comma-separated list of any of these 12 event t
|
|
|
123
123
|
| `SubagentStop` | When a Task tool completes |
|
|
124
124
|
| `PreCompact` | Before context compaction |
|
|
125
125
|
| `PermissionRequest` | When permission is requested |
|
|
126
|
+
| `Setup` | On init, install, or update events |
|
|
126
127
|
|
|
127
128
|
Hook names are case-insensitive: `stop`, `Stop`, and `STOP` all work.
|
|
128
129
|
|
package/dist/cli.js
CHANGED
|
@@ -382,9 +382,9 @@ async function discoverHookFiles(pattern, cwd) {
|
|
|
382
382
|
async function compileHook(options) {
|
|
383
383
|
const { sourcePath, logFilePath } = options;
|
|
384
384
|
// Create a temporary wrapper file that imports the hook and executes it
|
|
385
|
-
// Use system temp directory with deterministic name based on
|
|
386
|
-
// This ensures
|
|
387
|
-
const hashInputs = [sourcePath, logFilePath
|
|
385
|
+
// Use system temp directory with deterministic name based on hook basename (not full path)
|
|
386
|
+
// This ensures builds are reproducible across different environments/machines
|
|
387
|
+
const hashInputs = [path.basename(sourcePath), logFilePath ? "log" : ""].join(":");
|
|
388
388
|
const buildHash = crypto.createHash("sha256").update(hashInputs).digest("hex").substring(0, 16);
|
|
389
389
|
const tempDir = path.join(os.tmpdir(), "claude-code-hooks-build", buildHash);
|
|
390
390
|
const wrapperPath = path.join(tempDir, "wrapper.ts");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodfoot/claude-code-hooks",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"description": "Type-safe Claude Code hooks library with camelCase types and output builders",
|
|
5
5
|
"homepage": "https://github.com/goodfoot-io/marketplace/tree/main/packages/claude-code-hooks",
|
|
6
6
|
"repository": {
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
"release": "bash ../../scripts/release-package.sh claude-code-hooks",
|
|
28
28
|
"release:dry-run": "bash ../../scripts/release-package.sh claude-code-hooks --dry-run",
|
|
29
29
|
"snapshot:sdk-types": "tsx scripts/snapshot-sdk-types.ts",
|
|
30
|
-
"upgrade:deps": "./scripts/upgrade-deps.sh"
|
|
30
|
+
"upgrade:deps": "./scripts/upgrade-deps.sh",
|
|
31
|
+
"update:docs": "./scripts/update-docs.sh",
|
|
32
|
+
"update:docs:dry-run": "./scripts/update-docs.sh --dry-run"
|
|
31
33
|
},
|
|
32
34
|
"exports": {
|
|
33
35
|
".": {
|