@sickr/cli 0.9.2 → 0.9.3
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/dist/hookConfig.js +3 -2
- package/package.json +3 -3
package/dist/hookConfig.js
CHANGED
|
@@ -8,15 +8,16 @@ const LEGACY_TAGS = ['@sickr/replay record', 'npx sickr record'];
|
|
|
8
8
|
* Idempotent — re-running never duplicates the SICKR hook. Preserves any
|
|
9
9
|
* existing unrelated hooks.
|
|
10
10
|
*/
|
|
11
|
-
export function mergeHooks(settings,
|
|
11
|
+
export function mergeHooks(settings, recordCommand) {
|
|
12
12
|
const next = { ...(settings ?? {}) };
|
|
13
13
|
next.hooks = { ...(next.hooks ?? {}) };
|
|
14
|
+
const command = /\brecord\b/.test(recordCommand) ? recordCommand : `${recordCommand} record`;
|
|
14
15
|
for (const ev of EVENTS) {
|
|
15
16
|
const groups = Array.isArray(next.hooks[ev]) ? [...next.hooks[ev]] : [];
|
|
16
17
|
const serialized = JSON.stringify(groups);
|
|
17
18
|
const present = serialized.includes(TAG) || LEGACY_TAGS.some((tag) => serialized.includes(tag));
|
|
18
19
|
if (!present)
|
|
19
|
-
groups.push({ hooks: [{ type: 'command', command
|
|
20
|
+
groups.push({ hooks: [{ type: 'command', command }] });
|
|
20
21
|
next.hooks[ev] = groups;
|
|
21
22
|
}
|
|
22
23
|
return next;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@sickr/cli",
|
|
3
|
-
"version": "0.9.
|
|
2
|
+
"name": "@sickr/cli",
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "npx @sickr/cli - replay, live look, and workflow orchestration for AI coding agents.",
|
|
5
|
+
"description": "npx @sickr/cli - replay, live look, and workflow orchestration for AI coding agents.",
|
|
6
6
|
"bin": { "replay": "dist/cli.js", "sickr": "dist/cli.js" },
|
|
7
7
|
"files": ["dist"],
|
|
8
8
|
"publishConfig": { "access": "public" },
|