@sylphx/flow 1.4.10 → 1.4.11
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 +10 -0
- package/package.json +1 -1
- package/src/utils/sync-utils.ts +20 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @sylphx/flow
|
|
2
2
|
|
|
3
|
+
## 1.4.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 22ddfb9: Fix sync to dynamically scan templates instead of hardcoding (CRITICAL):
|
|
8
|
+
- Now scans assets/ directory at runtime for agents, slash commands, and rules
|
|
9
|
+
- Prevents sync from breaking when templates change
|
|
10
|
+
- Old commands (commit, context, explain, review, test) now correctly detected as unknown files
|
|
11
|
+
- New commands (cleanup, improve, polish, quality, release) properly recognized as Flow templates
|
|
12
|
+
|
|
3
13
|
## 1.4.10
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/package.json
CHANGED
package/src/utils/sync-utils.ts
CHANGED
|
@@ -3,13 +3,29 @@ import path from 'node:path';
|
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import type { Target } from '../types.js';
|
|
5
5
|
import { MCP_SERVER_REGISTRY } from '../config/servers.js';
|
|
6
|
+
import { getAgentsDir, getSlashCommandsDir, getRulesDir } from './paths.js';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* Scan directory for .md files and return basenames
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
function scanTemplateDir(dir: string): string[] {
|
|
12
|
+
if (!fs.existsSync(dir)) return [];
|
|
13
|
+
|
|
14
|
+
try {
|
|
15
|
+
return fs.readdirSync(dir, { withFileTypes: true })
|
|
16
|
+
.filter((f) => f.isFile() && f.name.endsWith('.md'))
|
|
17
|
+
.map((f) => f.name);
|
|
18
|
+
} catch {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Flow template filenames (scanned from assets at runtime)
|
|
25
|
+
*/
|
|
26
|
+
const FLOW_AGENTS = scanTemplateDir(getAgentsDir());
|
|
27
|
+
const FLOW_SLASH_COMMANDS = scanTemplateDir(getSlashCommandsDir());
|
|
28
|
+
const FLOW_RULES = scanTemplateDir(getRulesDir());
|
|
13
29
|
|
|
14
30
|
/**
|
|
15
31
|
* Categorized files for sync
|