@eventmodelers/cli 1.0.47 → 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');
|
|
@@ -1704,6 +1708,7 @@ credentialFlags(program
|
|
|
1704
1708
|
.description('Refresh an already-installed kit from the current CLI version — re-copies skills and the kit dir (.build-kit or .agent-modeling-kit) so you pick up script/skill updates after upgrading. Unlike `init`, never touches the project root scaffold or the root CLAUDE.md router, and leaves existing credentials alone unless --force is passed.')
|
|
1705
1709
|
.option('--modeling', 'Refresh the modeling kit (.agent-modeling-kit) instead of a build kit')
|
|
1706
1710
|
.option('--stack <name>', `Override which stack to refresh from (${Object.keys(REINITIABLE_STACKS).join(', ')}) instead of the one recorded in install-manifest.json — use this when the manifest is missing/stale, or to switch a .build-kit install to a different stack`)
|
|
1711
|
+
.option('--hooks', 'Install the slice commit-scope guard (.githooks/pre-commit) and wire it up via `git config core.hooksPath .githooks` — same as `init --hooks`, for turning it on after the fact without a full re-scaffold. Off by default.')
|
|
1707
1712
|
.option('--global', 'Re-install skills into ~/.claude/skills/ instead of the project — defaults to however they were originally installed')
|
|
1708
1713
|
.option('-f, --force', 'Re-prompt for credentials even if a config already has everything required — overwrites the existing config.json'))
|
|
1709
1714
|
.action(async (opts, command) => {
|
|
@@ -1745,6 +1750,7 @@ credentialFlags(program
|
|
|
1745
1750
|
force: opts.force,
|
|
1746
1751
|
credentialOverrides: credentialOverridesFromOpts(opts),
|
|
1747
1752
|
skipRootScaffold: true,
|
|
1753
|
+
hooks: opts.hooks,
|
|
1748
1754
|
});
|
|
1749
1755
|
});
|
|
1750
1756
|
|
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
|