@trendai-crem/claude-skills 1.5.0 → 1.5.1

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.
Files changed (2) hide show
  1. package/cli.js +6 -6
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -163,16 +163,16 @@ function setupAutoUpdate() {
163
163
 
164
164
  settings.hooks ??= {};
165
165
 
166
+ const isOurHook = e =>
167
+ e.hooks?.some(h => typeof h.command === 'string' &&
168
+ (h.command === installScript || h.command === notifyScript));
169
+
166
170
  settings.hooks.SessionStart ??= [];
167
- settings.hooks.SessionStart = settings.hooks.SessionStart.filter(
168
- e => !e.hooks?.some(h => typeof h.command === 'string' && h.command === installScript)
169
- );
171
+ settings.hooks.SessionStart = settings.hooks.SessionStart.filter(e => !isOurHook(e));
170
172
  settings.hooks.SessionStart.push({ hooks: [{ type: 'command', command: installScript }] });
171
173
 
172
174
  settings.hooks.UserPromptSubmit ??= [];
173
- settings.hooks.UserPromptSubmit = settings.hooks.UserPromptSubmit.filter(
174
- e => !e.hooks?.some(h => typeof h.command === 'string' && h.command === notifyScript)
175
- );
175
+ settings.hooks.UserPromptSubmit = settings.hooks.UserPromptSubmit.filter(e => !isOurHook(e));
176
176
  settings.hooks.UserPromptSubmit.push({ hooks: [{ type: 'command', command: notifyScript }] });
177
177
 
178
178
  const tmpPath = join(tmpdir(), `claude-settings-${process.pid}.json`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trendai-crem/claude-skills",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Claude Code skills installer for the trendai-crem team",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {