@eventmodelers/cli 1.0.48 → 1.0.49
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/cli.js
CHANGED
|
@@ -927,10 +927,14 @@ async function installStack(stackKey, stackCfg, options = {}) {
|
|
|
927
927
|
}
|
|
928
928
|
try {
|
|
929
929
|
execSync('git rev-parse --git-dir', { cwd: targetDir, stdio: 'ignore' });
|
|
930
|
-
|
|
930
|
+
// core.hooksPath is resolved against the repo's actual top level, not `cwd` —
|
|
931
|
+
// a relative `.githooks` breaks silently (no error, hooks just don't run) when
|
|
932
|
+
// targetDir is a subfolder of a larger repo rather than the repo root itself.
|
|
933
|
+
// Use an absolute path so it's correct regardless of where the git root is.
|
|
934
|
+
execSync(`git config core.hooksPath "${join(targetDir, '.githooks')}"`, { cwd: targetDir });
|
|
931
935
|
console.log(' ✓ Installed .githooks/ and set core.hooksPath — commits touching src/slices/ are now scope-guarded');
|
|
932
936
|
} catch {
|
|
933
|
-
console.log(
|
|
937
|
+
console.log(` ✓ Installed .githooks/ — run \`git config core.hooksPath ${join(targetDir, '.githooks')}\` once this directory is a git repo to activate it`);
|
|
934
938
|
}
|
|
935
939
|
} else {
|
|
936
940
|
console.log(' ℹ️ --hooks was given but this stack ships no .githooks/ template — nothing to install');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eventmodelers/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"description": "Eventmodelers CLI — real-time Claude agent + skills for Claude Code, for any stack (Node, Supabase, Axon, Cratis, OpenCQRS, UmaDB, Kurrent, or modeling-only)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -54,6 +54,9 @@ echo ".env created successfully."
|
|
|
54
54
|
|
|
55
55
|
if [ -f .githooks/pre-commit ] && git rev-parse --git-dir >/dev/null 2>&1; then
|
|
56
56
|
chmod +x .githooks/pre-commit 2>/dev/null || true
|
|
57
|
-
|
|
57
|
+
# core.hooksPath resolves against the repo's actual top level, not this directory —
|
|
58
|
+
# a relative ".githooks" silently breaks (no error, hooks just don't run) when this
|
|
59
|
+
# project sits in a subfolder of a larger repo instead of being the repo root itself.
|
|
60
|
+
git config core.hooksPath "$(pwd)/.githooks"
|
|
58
61
|
echo "Configured git to use .githooks/ (slice commit-scope guard)."
|
|
59
62
|
fi
|
|
@@ -54,6 +54,9 @@ echo ".env created successfully."
|
|
|
54
54
|
|
|
55
55
|
if [ -f .githooks/pre-commit ] && git rev-parse --git-dir >/dev/null 2>&1; then
|
|
56
56
|
chmod +x .githooks/pre-commit 2>/dev/null || true
|
|
57
|
-
|
|
57
|
+
# core.hooksPath resolves against the repo's actual top level, not this directory —
|
|
58
|
+
# a relative ".githooks" silently breaks (no error, hooks just don't run) when this
|
|
59
|
+
# project sits in a subfolder of a larger repo instead of being the repo root itself.
|
|
60
|
+
git config core.hooksPath "$(pwd)/.githooks"
|
|
58
61
|
echo "Configured git to use .githooks/ (slice commit-scope guard)."
|
|
59
62
|
fi
|