fileflows 1.0.0 → 1.0.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.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # File Flows CLI
1
+ # FileFlows CLI
2
2
 
3
3
  A CLI tool for generating `FILE_FLOWS.md` - analyzes project files and creates comprehensive documentation showing data flow relationships.
4
4
 
5
- [![npm version](https://badge.fury.io/js/file-flows-cli.svg)](https://badge.fury.io/js/file-flows-cli)
5
+ [![npm version](https://badge.fury.io/js/fileflows.svg)](https://badge.fury.io/js/fileflows)
6
6
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
7
7
 
8
8
  ## Features
@@ -17,12 +17,12 @@ A CLI tool for generating `FILE_FLOWS.md` - analyzes project files and creates c
17
17
 
18
18
  ### Global Installation (Recommended)
19
19
  ```bash
20
- npm install -g file-flows-cli
20
+ npm install -g fileflows
21
21
  ```
22
22
 
23
23
  ### Local Installation
24
24
  ```bash
25
- npm install file-flows-cli
25
+ npm install fileflows
26
26
  ```
27
27
 
28
28
  ### Development/Direct Use
@@ -35,28 +35,37 @@ npm install @babel/parser globby
35
35
  ### Global Installation
36
36
  ```bash
37
37
  # Analyze current directory (generates FILE_FLOWS.md)
38
- file-flows
38
+ fileflows
39
39
 
40
40
  # Analyze specific directory
41
- file-flows --dir ./src
41
+ fileflows --dir ./src
42
42
 
43
43
  # Custom output file
44
- file-flows --output my-flows.md
44
+ fileflows --output my-flows.md
45
45
 
46
46
  # Show help
47
- file-flows --help
47
+ fileflows --help
48
48
  ```
49
49
 
50
50
  ### Local Installation
51
51
  ```bash
52
52
  # Using npx
53
- npx file-flows
53
+ npx fileflows
54
54
 
55
- # Using npm scripts
56
- npm run file-flows
55
+ # Using npm scripts (if added to package.json)
56
+ npm run generate
57
57
 
58
58
  # Direct node execution
59
- node node_modules/file-flows-cli/cli-file-flows.js
59
+ node node_modules/fileflows/cli.js
60
+ ```
61
+
62
+ ### Development/Direct Use
63
+ ```bash
64
+ # Clone or download the repository, then:
65
+ node cli.js # Analyze current directory
66
+ node cli.js --dir ./src # Analyze src directory
67
+ node cli.js --output flows.md # Custom output file
68
+ node cli.js --help # Show help
60
69
  ```
61
70
 
62
71
  ## How It Works
@@ -102,4 +111,20 @@ The generated `FILE_FLOWS.md` includes:
102
111
  ---
103
112
  ```
104
113
 
114
+ ## Command Line Options
115
+
116
+ ```
117
+ Usage: node cli.js [options]
118
+
119
+ Options:
120
+ --dir <path> Directory to analyze (default: current directory)
121
+ --output <file> Output file path (default: FILE_FLOWS.md)
122
+ --help, -h Show this help message
123
+
124
+ Examples:
125
+ node cli.js # Analyze current directory
126
+ node cli.js --dir ./src # Analyze src directory
127
+ node cli.js --output flows.md # Custom output file
128
+ ```
129
+
105
130
  This tool preserves all the sophisticated analysis capabilities of the original system while providing a clean, focused CLI interface.
@@ -119,7 +119,9 @@ async function generateFileFlows(rootDir = `.`, outputFile = null) {
119
119
  : parseOtherFile(content, relPath, ext);
120
120
 
121
121
  for (const [label, value] of Object.entries(metadata)) {
122
- if (value.length > 0) section.push(`**${label}:** ${value.join(`, `)}`);
122
+ // 🚩AI: Ensure value is always an array before calling join
123
+ const arrayValue = Array.isArray(value) ? value : [value];
124
+ if (arrayValue.length > 0) section.push(`**${label}:** ${arrayValue.join(`, `)}`);
123
125
  }
124
126
 
125
127
  section.push(`\n---\n`);
@@ -21,7 +21,7 @@ function parseOtherFile(content, relPath, ext) {
21
21
  Summary: summary
22
22
  };
23
23
  } catch {
24
- return { Keys: [], Summary: 'Malformed JSON' };
24
+ return { Keys: [], Summary: ['Malformed JSON'] };
25
25
  }
26
26
  case `md`:
27
27
  const headings = lines
@@ -57,7 +57,7 @@ function parseOtherFile(content, relPath, ext) {
57
57
  .filter(Boolean);
58
58
  return {
59
59
  Types: types,
60
- Summary: 'GraphQL Schema'
60
+ Summary: ['GraphQL Schema']
61
61
  };
62
62
  case `sh`:
63
63
  const commands = lines
@@ -93,10 +93,10 @@ function parseOtherFile(content, relPath, ext) {
93
93
 
94
94
  return {
95
95
  Tags: tags.slice(0, localVars.MAX_HTML_TAGS),
96
- Summary: title
96
+ Summary: [title]
97
97
  };
98
98
  default:
99
- return { Summary: 'Unknown file type' };
99
+ return { Summary: ['Unknown file type'] };
100
100
  }
101
101
  }
102
102
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fileflows",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "CLI tool for deploying data workflow analysis documentation",
5
5
  "main": "cli.js",
6
6
  "bin": {
@@ -66,8 +66,8 @@
66
66
  "arqitect": "^1.0.7",
67
67
  "loqatevars": "^1.0.6",
68
68
  "madge": "^8.0.0",
69
- "qtests": "^1.1.4",
70
- "quantumagent": "^1.0.4",
69
+ "qtests": "^1.1.8",
70
+ "quantumagent": "^1.0.5",
71
71
  "repomix": "^1.2.0",
72
72
  "unqommented": "^1.1.0"
73
73
  }