@mfjjs/ruflo-setup 0.1.2 → 0.1.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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/hooks.js +12 -9
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.3](https://gitlab.mfj.local:8022/mario/setup-ruflo/compare/v0.1.2...v0.1.3) (2026-03-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **hooks:** update session start hook logic to prevent duplicate commands ([f81388e](https://gitlab.mfj.local:8022/mario/setup-ruflo/commit/f81388e46c4c91d72018e68365c4cc4c9831e778))
|
|
11
|
+
|
|
5
12
|
### [0.1.2](https://gitlab.mfj.local:8022/mario/setup-ruflo/compare/v0.1.1...v0.1.2) (2026-03-11)
|
|
6
13
|
|
|
7
14
|
|
package/package.json
CHANGED
package/src/hooks.js
CHANGED
|
@@ -27,16 +27,19 @@ function ensureSessionStartHook(settings, hookCommand) {
|
|
|
27
27
|
firstGroup.hooks = [];
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
const newHook = { type: 'command', command: hookCommand, timeout: 5000 };
|
|
31
|
+
const existingIndex = firstGroup.hooks.findIndex(
|
|
32
|
+
(h) => h && h.type === 'command' && typeof h.command === 'string' && h.command.includes('check-ruflo.cjs')
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
if (existingIndex !== -1) {
|
|
36
|
+
const unchanged = firstGroup.hooks[existingIndex].command === hookCommand;
|
|
37
|
+
firstGroup.hooks[existingIndex] = newHook;
|
|
38
|
+
return unchanged ? false : true;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
firstGroup.hooks.unshift(newHook);
|
|
42
|
+
return true;
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
export function installGlobalCheckRufloHook({
|
|
@@ -95,7 +98,7 @@ export function getGlobalHookStatus({ packageRoot, globalSettingsPath }) {
|
|
|
95
98
|
};
|
|
96
99
|
}
|
|
97
100
|
|
|
98
|
-
const found = sessionStart.some((group) => Array.isArray(group?.hooks) && group.hooks.some((hook) => hook?.type === 'command' && hook?.command ===
|
|
101
|
+
const found = sessionStart.some((group) => Array.isArray(group?.hooks) && group.hooks.some((hook) => hook?.type === 'command' && typeof hook?.command === 'string' && hook.command.includes('check-ruflo.cjs')));
|
|
99
102
|
|
|
100
103
|
return {
|
|
101
104
|
installed: found,
|