@mfjjs/ruflo-setup 0.1.1 → 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 +39 -0
- package/package.json +3 -2
- package/src/cli.js +15 -1
- package/src/hooks.js +12 -9
- package/src/utils.js +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
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
|
+
|
|
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
|
+
|
|
12
|
+
### [0.1.2](https://gitlab.mfj.local:8022/mario/setup-ruflo/compare/v0.1.1...v0.1.2) (2026-03-11)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **cli:** add version printing functionality and update help options ([ffff66b](https://gitlab.mfj.local:8022/mario/setup-ruflo/commit/ffff66b5503016600724608ec179e06e9ecccaa0))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **package:** update pack:dry script to use JSON output and add changelog.md ([d6a675e](https://gitlab.mfj.local:8022/mario/setup-ruflo/commit/d6a675eb8b901566079f647b9d4d6e805474712c))
|
|
23
|
+
|
|
24
|
+
### 0.1.1 (2026-03-10)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* **package:** add publishConfig for public access ([58ea882](https://gitlab.mfj.local:8022/mario/setup-ruflo/commit/58ea882802edf41c6bb6ad02f8659aa6995ea8aa))
|
|
30
|
+
* **setup:** add global /ruflo-setup command and update check message ([9b56d94](https://gitlab.mfj.local:8022/mario/setup-ruflo/commit/9b56d940938b955a2e9cc80e13e1ebb0b26e8dcf))
|
|
31
|
+
* **setup:** add setup script for Ruflo + Claude Flow V3 initialization ([554694f](https://gitlab.mfj.local:8022/mario/setup-ruflo/commit/554694f3e936b59bb3989ba132c47ddf1b5c6e52))
|
|
32
|
+
* **setup:** implement cross-platform CLI for Ruflo setup ([5afb6a1](https://gitlab.mfj.local:8022/mario/setup-ruflo/commit/5afb6a1f128dcad5c5b17736c61dda87b4d0cea3))
|
|
33
|
+
* **setup:** setup for claude and ruflo ([9e68a57](https://gitlab.mfj.local:8022/mario/setup-ruflo/commit/9e68a577ac24827025039a9ef178769630e6ae68))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* **setup:** remove CLAUDE.md template and adjust setup steps ([fdf3304](https://gitlab.mfj.local:8022/mario/setup-ruflo/commit/fdf3304b2572fe79ec8162f3a5bd64e657d0afd5))
|
|
39
|
+
* **setup:** update log messages for Ruflo setup ([46c26a9](https://gitlab.mfj.local:8022/mario/setup-ruflo/commit/46c26a99c5066d8313ccff99d1cbe53719b977c2))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mfjjs/ruflo-setup",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Cross-platform setup CLI for Ruflo + Claude Flow projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"bin",
|
|
11
11
|
"src",
|
|
12
12
|
"templates",
|
|
13
|
+
"CHANGELOG.md",
|
|
13
14
|
"claude-hooks"
|
|
14
15
|
],
|
|
15
16
|
"engines": {
|
|
@@ -29,6 +30,6 @@
|
|
|
29
30
|
"lint": "node --check ./src/cli.js && node --check ./src/setup.js && node --check ./src/hooks.js && node --check ./src/utils.js && node --check ./bin/ruflo-setup.js",
|
|
30
31
|
"test": "node --test tests/cli.test.mjs",
|
|
31
32
|
"test:cli": "node ./bin/ruflo-setup.js --dry-run --skip-init --no-hooks --yes",
|
|
32
|
-
"pack:dry": "pnpm pack --
|
|
33
|
+
"pack:dry": "pnpm pack --json"
|
|
33
34
|
}
|
|
34
35
|
}
|
package/src/cli.js
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
3
4
|
import { parseArgs } from './utils.js';
|
|
4
5
|
import { runSetup } from './setup.js';
|
|
5
6
|
import { getGlobalHookStatus, installGlobalCheckRufloHook } from './hooks.js';
|
|
6
7
|
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
|
|
10
|
+
function printVersion() {
|
|
11
|
+
const { version } = require('../package.json');
|
|
12
|
+
process.stdout.write(`${version}\n`);
|
|
13
|
+
}
|
|
14
|
+
|
|
7
15
|
function printHelp() {
|
|
8
16
|
process.stdout.write(`
|
|
9
17
|
@mfjjs/ruflo-setup
|
|
@@ -19,7 +27,8 @@ Options:
|
|
|
19
27
|
--yes, -y Non-interactive yes for prompts
|
|
20
28
|
--no-hooks Skip global hook installation during setup
|
|
21
29
|
--skip-init Skip 'npx ruflo@latest init --full'
|
|
22
|
-
--
|
|
30
|
+
--version, -v Print version and exit
|
|
31
|
+
--verbose Extra output
|
|
23
32
|
|
|
24
33
|
Examples:
|
|
25
34
|
ruflo-setup
|
|
@@ -36,6 +45,11 @@ function packageRootFromModule() {
|
|
|
36
45
|
|
|
37
46
|
export async function runCli(argv, cwd) {
|
|
38
47
|
try {
|
|
48
|
+
if (argv.includes('--version') || argv.includes('-v')) {
|
|
49
|
+
printVersion();
|
|
50
|
+
return 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
39
53
|
if (argv.includes('--help') || argv.includes('-h')) {
|
|
40
54
|
printHelp();
|
|
41
55
|
return 0;
|
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,
|
package/src/utils.js
CHANGED
|
@@ -59,7 +59,7 @@ export function parseArgs(argv) {
|
|
|
59
59
|
else if (item === '--yes' || item === '-y') flags.yes = true;
|
|
60
60
|
else if (item === '--no-hooks') flags.noHooks = true;
|
|
61
61
|
else if (item === '--skip-init') flags.skipInit = true;
|
|
62
|
-
else if (item === '--verbose'
|
|
62
|
+
else if (item === '--verbose') flags.verbose = true;
|
|
63
63
|
else positional.push(item);
|
|
64
64
|
}
|
|
65
65
|
|