prodex 1.4.0 β 1.4.4
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 +234 -234
- package/dist/cli/cli-input.js +7 -2
- package/dist/cli/cli-input.js.map +1 -1
- package/dist/cli/init.js +2 -1
- package/dist/cli/init.js.map +1 -1
- package/dist/constants/config.js +1 -1
- package/dist/constants/config.js.map +1 -1
- package/dist/constants/default-config.js +13 -4
- package/dist/constants/default-config.js.map +1 -1
- package/dist/constants/flags.js +6 -0
- package/dist/constants/flags.js.map +1 -1
- package/dist/core/managers/config.js +38 -6
- package/dist/core/managers/config.js.map +1 -1
- package/dist/debug.js +2 -1
- package/dist/debug.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.js +8 -0
- package/dist/lib/utils.js.map +1 -1
- package/dist/resolvers/js/js-resolver.js +13 -11
- package/dist/resolvers/js/js-resolver.js.map +1 -1
- package/dist/resolvers/js/resolve-alias.js +15 -12
- package/dist/resolvers/js/resolve-alias.js.map +1 -1
- package/dist/resolvers/php/php-resolver.js +6 -4
- package/dist/resolvers/php/php-resolver.js.map +1 -1
- package/dist/shared/collections.js.map +1 -1
- package/dist/shared/patterns.js +3 -1
- package/dist/shared/patterns.js.map +1 -1
- package/dist/types/cli.types.js.map +1 -1
- package/dist/types/config.types.js.map +1 -1
- package/package.json +6 -4
- package/dist/cli/flags.js +0 -43
- package/dist/cli/flags.js.map +0 -1
- package/dist/constants/config-loader.js +0 -95
- package/dist/constants/config-loader.js.map +0 -1
- package/dist/core/cache.js +0 -54
- package/dist/core/cache.js.map +0 -1
- package/dist/core/config-manager.js +0 -104
- package/dist/core/config-manager.js.map +0 -1
- package/dist/core/file-utils.js +0 -1
- package/dist/core/file-utils.js.map +0 -1
- package/dist/core/managers/config-manager.js +0 -104
- package/dist/core/managers/config-manager.js.map +0 -1
- package/dist/core/parsers/extract-imports.js +0 -46
- package/dist/core/parsers/extract-imports.js.map +0 -1
- package/dist/resolvers/js/alias-loader.js +0 -53
- package/dist/resolvers/js/alias-loader.js.map +0 -1
- package/dist/resolvers/php/patterns.js +0 -50
- package/dist/resolvers/php/patterns.js.map +0 -1
- package/dist/resolvers/shared/excludes.js +0 -12
- package/dist/resolvers/shared/excludes.js.map +0 -1
- package/dist/resolvers/shared/file-cache.js +0 -1
- package/dist/resolvers/shared/file-cache.js.map +0 -1
- package/dist/resolvers/shared/resolve-alias.js +0 -62
- package/dist/resolvers/shared/resolve-alias.js.map +0 -1
- package/dist/resolvers/shared/stats.js +0 -17
- package/dist/resolvers/shared/stats.js.map +0 -1
- package/dist/shared/stats.js +0 -32
- package/dist/shared/stats.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,234 +1,234 @@
|
|
|
1
|
-
# π§© Prodex v1.2.0
|
|
2
|
-
|
|
3
|
-
> **Build the maze, I'll write a map.**
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## π§ Whatβs New β v1.2.0
|
|
8
|
-
|
|
9
|
-
- π **Full CLI support with integrated [Sade](https://github.com/lukeed/sade).**
|
|
10
|
-
Prodex now runs entirely from the terminal β no `prodex.json` required.
|
|
11
|
-
Supports short flags and native glob patterns for flexible targeting.
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
prodex -f "**/web.php,**/app.tsx" -i "**/*.d.ts" -x "node_modules/**"
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
prodex --files "**/web.php,**/app.tsx" --include **/*types.ts --exclude "@shadcn/**"
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
- π§Ύ **Markdown mode added and now default.**
|
|
22
|
-
Output is fully fenced and linkable β jump between the index and any code block.
|
|
23
|
-
Text mode remains available using `--txt` or `-t`.
|
|
24
|
-
|
|
25
|
-
- π **Output naming improved.**
|
|
26
|
-
Output files are now versioned by default.
|
|
27
|
-
Custom names are supported using `--name` or `-n`.
|
|
28
|
-
Naming conventions have been updated for cleaner, consistent results.
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## βοΈ Usage
|
|
33
|
-
|
|
34
|
-
Prodex v1.2.0 runs entirely from the command line.
|
|
35
|
-
Interactive mode is currently unstable β use CLI flags instead.
|
|
36
|
-
|
|
37
|
-
### Installation
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
npm install -g prodex
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Or run without installing:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
npx prodex
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
### Basic Run
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
prodex -f "**/web.php,**/app.tsx"
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### With Includes, exclude, and Custom Name
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
prodex -f "**/web.php,**/app.tsx" -i "**/*.d.ts" -x "node_modules/**" -n "combined-output"
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Flag Reference
|
|
64
|
-
|
|
65
|
-
| Flag | Short | Description |
|
|
66
|
-
| ----------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
67
|
-
| `--files` | `-f` | Entry files β starting points for dependency resolution. Accepts multiple names or globs. |
|
|
68
|
-
| `--include` | `-i` | Adds extra files or patterns to include (e.g. `.d.ts`, interface, or type files). These files are **not dependency-resolved** β theyβre appended as-is. |
|
|
69
|
-
| `--exclude` | `-x` | Patterns or folders to skip during the scan. |
|
|
70
|
-
| `--name` | `-n` | Custom output filename (without extension). Versioning still applies automatically. |
|
|
71
|
-
|
|
72
|
-
> Globs are powered by [Fast-Glob](https://github.com/mrmlnc/fast-glob).
|
|
73
|
-
> Use **comma-separated values** for multiple entries.
|
|
74
|
-
> Wrap globs in quotes when they include special characters like `|` or `&`.
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
## π§ Plans
|
|
79
|
-
|
|
80
|
-
- **Alias Resolution Improvements**
|
|
81
|
-
Planned overhaul of alias handling to support deeper nested paths, wildcard matching, and auto-mapped imports across mixed stacks.
|
|
82
|
-
|
|
83
|
-
- **Language Support**
|
|
84
|
-
Currently supports **JavaScript**, **React**, and **Laravel + React** stacks.
|
|
85
|
-
May work with other frameworks but remains untested.
|
|
86
|
-
Broader multi-language support is planned for future versions.
|
|
87
|
-
|
|
88
|
-
- **Combined Output**
|
|
89
|
-
All code from multiple entries is merged into a single output file.
|
|
90
|
-
Thereβs currently **no limit** on output size, but itβs advised to avoid combining _too many large entries_ in a single run.
|
|
91
|
-
Future versions will include **smart naming** and **automatic splitting** for oversized outputs.
|
|
92
|
-
|
|
93
|
-
- **Performance Optimizations**
|
|
94
|
-
Planned improvements to resolver speed and dependency traversal for faster processing on large projects.
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## π§© Features
|
|
99
|
-
|
|
100
|
-
| Status | Feature | Description |
|
|
101
|
-
| :----: | --------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
102
|
-
| β
| **Cross-language indexing** | Resolves imports across JS, TS, React, and PHP (Laravel) projects. |
|
|
103
|
-
| β
| **Markdown output** | Generates clean `.md` files with anchors, back-to-top links, and fenced code blocks. |
|
|
104
|
-
| β
| **Text output** | Optional `.txt` mode using `--txt` or `-t`. |
|
|
105
|
-
| β
| **Glob support** | Works with flexible glob patterns powered by [Fast-Glob](https://github.com/mrmlnc/fast-glob). |
|
|
106
|
-
| β
| **Custom output names** | Define your own output prefix using `--name` or `-n`. |
|
|
107
|
-
| β οΈ | **Interactive picker (UI)** | Still unstable β not recommended for production use. |
|
|
108
|
-
| β οΈ | **Alias resolution** | Basic alias mapping supported; advanced cases in progress. |
|
|
109
|
-
| π§ | **Smart file splitting** | Planned for large combined outputs. |
|
|
110
|
-
| π§ | **PSR-4 deep scan** | Planned to improve PHP dependency resolution. |
|
|
111
|
-
| π§ | **Speed optimization** | Further resolver and I/O improvements under development. |
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## π§± Use Cases
|
|
116
|
-
|
|
117
|
-
Prodex can technically combine your entire codebase into one file β
|
|
118
|
-
but itβs **best used in parts**, focusing on specific sections or features.
|
|
119
|
-
Each run produces a clean, self-contained map showing all related files and dependencies.
|
|
120
|
-
|
|
121
|
-
### π§© Common Scenarios
|
|
122
|
-
|
|
123
|
-
- **π€ Project Awareness for AI Assistants**
|
|
124
|
-
Generate compact `.md` summaries of key parts of your project.
|
|
125
|
-
These can be shared with AI tools (like ChatGPT, Claude, or Copilot) to give them structured context about your codebase β without exposing unnecessary files.
|
|
126
|
-
|
|
127
|
-
- **π¦ Feature or Module Mapping**
|
|
128
|
-
Combine everything connected to a specific feature (e.g., `Checkout`, `Dashboard`, or `Payments`).
|
|
129
|
-
Prodex gathers all linked imports, helpers, and files into one readable document.
|
|
130
|
-
|
|
131
|
-
- **π Dependency Insight**
|
|
132
|
-
Trace how a particular entry file connects through your stack β whether itβs `app.tsx` on the frontend or `routes/web.php` on the backend.
|
|
133
|
-
Great for debugging, refactoring, or understanding cross-stack dependencies.
|
|
134
|
-
|
|
135
|
-
- **π Documentation Bundles**
|
|
136
|
-
Create readable Markdown maps per module or domain instead of one large export.
|
|
137
|
-
Each output acts as a focused, navigable view of your code relationships.
|
|
138
|
-
|
|
139
|
-
- **π§ Team Handoffs**
|
|
140
|
-
Share isolated code scopes (like `Auth`, `Payments`, or `User Management`) with full dependency context.
|
|
141
|
-
Makes onboarding and code reviews significantly faster.
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## π§© Recommended Workflow
|
|
146
|
-
|
|
147
|
-
Prodex works best when used to **map and export projects in logical parts** rather than all at once.
|
|
148
|
-
Each run focuses on one or more entry points, and Prodex automatically **loads all imports recursively** for those files β
|
|
149
|
-
then appends any files matched by the `--include` flag.
|
|
150
|
-
|
|
151
|
-
### π§ Suggested Pattern
|
|
152
|
-
|
|
153
|
-
1. **Pick a meaningful entry file**
|
|
154
|
-
Example:
|
|
155
|
-
|
|
156
|
-
- Frontend: `resources/js/**/dashboard.tsx`
|
|
157
|
-
- Backend: `routes/**/(web|api).php`
|
|
158
|
-
- Shared logic: `app/Services/**/PaymentService.php`
|
|
159
|
-
|
|
160
|
-
2. **Run Prodex with includes for type or interface files**
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
prodex -f "**/dashboard.tsx" -i "**/*.d.ts,**/*.interface.ts"
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
3. **Export separate maps for each major area**
|
|
167
|
-
|
|
168
|
-
```bash
|
|
169
|
-
prodex -f "**/dashboard.tsx" -n "dashboard-map"
|
|
170
|
-
prodex -f "**/(web|api).php" -n "backend-map"
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
4. **Use them together**
|
|
174
|
-
Store each output in `/prodex/`
|
|
175
|
-
These maps can be shared with teammates or loaded into AI tools for structured, code-aware assistance.
|
|
176
|
-
|
|
177
|
-
> β‘ Each run recursively resolves every import, applies includes, and outputs one complete dependency map for that section.
|
|
178
|
-
|
|
179
|
-
---
|
|
180
|
-
|
|
181
|
-
## βοΈ Optional β `prodex.json`
|
|
182
|
-
|
|
183
|
-
`prodex.json` is **fully optional** in v1.2.0.
|
|
184
|
-
You can run Prodex entirely from the command line, but the config file can be useful for saved defaults.
|
|
185
|
-
|
|
186
|
-
### πͺ Quick Setup
|
|
187
|
-
|
|
188
|
-
You can generate a ready-to-use config file with:
|
|
189
|
-
|
|
190
|
-
```bash
|
|
191
|
-
prodex init
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
This creates a `prodex.json` file in your project root with sensible defaults β including base directories, globs, and priority files.
|
|
195
|
-
|
|
196
|
-
### π§© Running with a Config File
|
|
197
|
-
|
|
198
|
-
If youβve defined your entry files in the config under `entry.files`,
|
|
199
|
-
you can run Prodex directly without specifying `--files`:
|
|
200
|
-
|
|
201
|
-
```bash
|
|
202
|
-
prodex -c
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
The `-c` (or `--ci`) flag skips interactive mode and uses the config values automatically.
|
|
206
|
-
Specifying `-f` ( or `--files`) from the CLI also disables the picker by default.
|
|
207
|
-
|
|
208
|
-
You can permanently disable the picker in the config by setting:
|
|
209
|
-
|
|
210
|
-
```json
|
|
211
|
-
"entry": {
|
|
212
|
-
"ui": {
|
|
213
|
-
"enablePicker": false
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
---
|
|
219
|
-
|
|
220
|
-
## π License
|
|
221
|
-
|
|
222
|
-
**MIT License**
|
|
223
|
-
Β© 2025 [emxhive](https://github.com/emxhive)
|
|
224
|
-
|
|
225
|
-
---
|
|
226
|
-
|
|
227
|
-
## β οΈ Note from the Author
|
|
228
|
-
|
|
229
|
-
Prodex is still a **work in progress**.
|
|
230
|
-
Some parts of the experience may be rough, especially around interactive mode and advanced resolvers.
|
|
231
|
-
Updates are released **multiple times per week β sometimes daily** β to keep improving stability and support.
|
|
232
|
-
|
|
233
|
-
Please stay up to date for the best experience.
|
|
234
|
-
Thank you for testing Prodex early. β€οΈ
|
|
1
|
+
# π§© Prodex v1.2.0
|
|
2
|
+
|
|
3
|
+
> **Build the maze, I'll write a map.**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## π§ Whatβs New β v1.2.0
|
|
8
|
+
|
|
9
|
+
- π **Full CLI support with integrated [Sade](https://github.com/lukeed/sade).**
|
|
10
|
+
Prodex now runs entirely from the terminal β no `prodex.json` required.
|
|
11
|
+
Supports short flags and native glob patterns for flexible targeting.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
prodex -f "**/web.php,**/app.tsx" -i "**/*.d.ts" -x "node_modules/**"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
prodex --files "**/web.php,**/app.tsx" --include **/*types.ts --exclude "@shadcn/**"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- π§Ύ **Markdown mode added and now default.**
|
|
22
|
+
Output is fully fenced and linkable β jump between the index and any code block.
|
|
23
|
+
Text mode remains available using `--txt` or `-t`.
|
|
24
|
+
|
|
25
|
+
- π **Output naming improved.**
|
|
26
|
+
Output files are now versioned by default.
|
|
27
|
+
Custom names are supported using `--name` or `-n`.
|
|
28
|
+
Naming conventions have been updated for cleaner, consistent results.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## βοΈ Usage
|
|
33
|
+
|
|
34
|
+
Prodex v1.2.0 runs entirely from the command line.
|
|
35
|
+
Interactive mode is currently unstable β use CLI flags instead.
|
|
36
|
+
|
|
37
|
+
### Installation
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install -g prodex
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Or run without installing:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx prodex
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
### Basic Run
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
prodex -f "**/web.php,**/app.tsx"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### With Includes, exclude, and Custom Name
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
prodex -f "**/web.php,**/app.tsx" -i "**/*.d.ts" -x "node_modules/**" -n "combined-output"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Flag Reference
|
|
64
|
+
|
|
65
|
+
| Flag | Short | Description |
|
|
66
|
+
| ----------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
67
|
+
| `--files` | `-f` | Entry files β starting points for dependency resolution. Accepts multiple names or globs. |
|
|
68
|
+
| `--include` | `-i` | Adds extra files or patterns to include (e.g. `.d.ts`, interface, or type files). These files are **not dependency-resolved** β theyβre appended as-is. |
|
|
69
|
+
| `--exclude` | `-x` | Patterns or folders to skip during the scan. |
|
|
70
|
+
| `--name` | `-n` | Custom output filename (without extension). Versioning still applies automatically. |
|
|
71
|
+
|
|
72
|
+
> Globs are powered by [Fast-Glob](https://github.com/mrmlnc/fast-glob).
|
|
73
|
+
> Use **comma-separated values** for multiple entries.
|
|
74
|
+
> Wrap globs in quotes when they include special characters like `|` or `&`.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## π§ Plans
|
|
79
|
+
|
|
80
|
+
- **Alias Resolution Improvements**
|
|
81
|
+
Planned overhaul of alias handling to support deeper nested paths, wildcard matching, and auto-mapped imports across mixed stacks.
|
|
82
|
+
|
|
83
|
+
- **Language Support**
|
|
84
|
+
Currently supports **JavaScript**, **React**, and **Laravel + React** stacks.
|
|
85
|
+
May work with other frameworks but remains untested.
|
|
86
|
+
Broader multi-language support is planned for future versions.
|
|
87
|
+
|
|
88
|
+
- **Combined Output**
|
|
89
|
+
All code from multiple entries is merged into a single output file.
|
|
90
|
+
Thereβs currently **no limit** on output size, but itβs advised to avoid combining _too many large entries_ in a single run.
|
|
91
|
+
Future versions will include **smart naming** and **automatic splitting** for oversized outputs.
|
|
92
|
+
|
|
93
|
+
- **Performance Optimizations**
|
|
94
|
+
Planned improvements to resolver speed and dependency traversal for faster processing on large projects.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## π§© Features
|
|
99
|
+
|
|
100
|
+
| Status | Feature | Description |
|
|
101
|
+
| :----: | --------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
102
|
+
| β
| **Cross-language indexing** | Resolves imports across JS, TS, React, and PHP (Laravel) projects. |
|
|
103
|
+
| β
| **Markdown output** | Generates clean `.md` files with anchors, back-to-top links, and fenced code blocks. |
|
|
104
|
+
| β
| **Text output** | Optional `.txt` mode using `--txt` or `-t`. |
|
|
105
|
+
| β
| **Glob support** | Works with flexible glob patterns powered by [Fast-Glob](https://github.com/mrmlnc/fast-glob). |
|
|
106
|
+
| β
| **Custom output names** | Define your own output prefix using `--name` or `-n`. |
|
|
107
|
+
| β οΈ | **Interactive picker (UI)** | Still unstable β not recommended for production use. |
|
|
108
|
+
| β οΈ | **Alias resolution** | Basic alias mapping supported; advanced cases in progress. |
|
|
109
|
+
| π§ | **Smart file splitting** | Planned for large combined outputs. |
|
|
110
|
+
| π§ | **PSR-4 deep scan** | Planned to improve PHP dependency resolution. |
|
|
111
|
+
| π§ | **Speed optimization** | Further resolver and I/O improvements under development. |
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## π§± Use Cases
|
|
116
|
+
|
|
117
|
+
Prodex can technically combine your entire codebase into one file β
|
|
118
|
+
but itβs **best used in parts**, focusing on specific sections or features.
|
|
119
|
+
Each run produces a clean, self-contained map showing all related files and dependencies.
|
|
120
|
+
|
|
121
|
+
### π§© Common Scenarios
|
|
122
|
+
|
|
123
|
+
- **π€ Project Awareness for AI Assistants**
|
|
124
|
+
Generate compact `.md` summaries of key parts of your project.
|
|
125
|
+
These can be shared with AI tools (like ChatGPT, Claude, or Copilot) to give them structured context about your codebase β without exposing unnecessary files.
|
|
126
|
+
|
|
127
|
+
- **π¦ Feature or Module Mapping**
|
|
128
|
+
Combine everything connected to a specific feature (e.g., `Checkout`, `Dashboard`, or `Payments`).
|
|
129
|
+
Prodex gathers all linked imports, helpers, and files into one readable document.
|
|
130
|
+
|
|
131
|
+
- **π Dependency Insight**
|
|
132
|
+
Trace how a particular entry file connects through your stack β whether itβs `app.tsx` on the frontend or `routes/web.php` on the backend.
|
|
133
|
+
Great for debugging, refactoring, or understanding cross-stack dependencies.
|
|
134
|
+
|
|
135
|
+
- **π Documentation Bundles**
|
|
136
|
+
Create readable Markdown maps per module or domain instead of one large export.
|
|
137
|
+
Each output acts as a focused, navigable view of your code relationships.
|
|
138
|
+
|
|
139
|
+
- **π§ Team Handoffs**
|
|
140
|
+
Share isolated code scopes (like `Auth`, `Payments`, or `User Management`) with full dependency context.
|
|
141
|
+
Makes onboarding and code reviews significantly faster.
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## π§© Recommended Workflow
|
|
146
|
+
|
|
147
|
+
Prodex works best when used to **map and export projects in logical parts** rather than all at once.
|
|
148
|
+
Each run focuses on one or more entry points, and Prodex automatically **loads all imports recursively** for those files β
|
|
149
|
+
then appends any files matched by the `--include` flag.
|
|
150
|
+
|
|
151
|
+
### π§ Suggested Pattern
|
|
152
|
+
|
|
153
|
+
1. **Pick a meaningful entry file**
|
|
154
|
+
Example:
|
|
155
|
+
|
|
156
|
+
- Frontend: `resources/js/**/dashboard.tsx`
|
|
157
|
+
- Backend: `routes/**/(web|api).php`
|
|
158
|
+
- Shared logic: `app/Services/**/PaymentService.php`
|
|
159
|
+
|
|
160
|
+
2. **Run Prodex with includes for type or interface files**
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
prodex -f "**/dashboard.tsx" -i "**/*.d.ts,**/*.interface.ts"
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
3. **Export separate maps for each major area**
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
prodex -f "**/dashboard.tsx" -n "dashboard-map"
|
|
170
|
+
prodex -f "**/(web|api).php" -n "backend-map"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
4. **Use them together**
|
|
174
|
+
Store each output in `/prodex/`
|
|
175
|
+
These maps can be shared with teammates or loaded into AI tools for structured, code-aware assistance.
|
|
176
|
+
|
|
177
|
+
> β‘ Each run recursively resolves every import, applies includes, and outputs one complete dependency map for that section.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## βοΈ Optional β `prodex.json`
|
|
182
|
+
|
|
183
|
+
`prodex.json` is **fully optional** in v1.2.0.
|
|
184
|
+
You can run Prodex entirely from the command line, but the config file can be useful for saved defaults.
|
|
185
|
+
|
|
186
|
+
### πͺ Quick Setup
|
|
187
|
+
|
|
188
|
+
You can generate a ready-to-use config file with:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
prodex init
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
This creates a `prodex.json` file in your project root with sensible defaults β including base directories, globs, and priority files.
|
|
195
|
+
|
|
196
|
+
### π§© Running with a Config File
|
|
197
|
+
|
|
198
|
+
If youβve defined your entry files in the config under `entry.files`,
|
|
199
|
+
you can run Prodex directly without specifying `--files`:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
prodex -c
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
The `-c` (or `--ci`) flag skips interactive mode and uses the config values automatically.
|
|
206
|
+
Specifying `-f` ( or `--files`) from the CLI also disables the picker by default.
|
|
207
|
+
|
|
208
|
+
You can permanently disable the picker in the config by setting:
|
|
209
|
+
|
|
210
|
+
```json
|
|
211
|
+
"entry": {
|
|
212
|
+
"ui": {
|
|
213
|
+
"enablePicker": false
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## π License
|
|
221
|
+
|
|
222
|
+
**MIT License**
|
|
223
|
+
Β© 2025 [emxhive](https://github.com/emxhive)
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## β οΈ Note from the Author
|
|
228
|
+
|
|
229
|
+
Prodex is still a **work in progress**.
|
|
230
|
+
Some parts of the experience may be rough, especially around interactive mode and advanced resolvers.
|
|
231
|
+
Updates are released **multiple times per week β sometimes daily** β to keep improving stability and support.
|
|
232
|
+
|
|
233
|
+
Please stay up to date for the best experience.
|
|
234
|
+
Thank you for testing Prodex early. β€οΈ
|
package/dist/cli/cli-input.js
CHANGED
|
@@ -22,10 +22,15 @@ function parseCliInput(argv = process.argv) {
|
|
|
22
22
|
registerFlags(program);
|
|
23
23
|
let parsed = { rootArg: "", root: undefined, flags: {} };
|
|
24
24
|
program.action((root, opts) => {
|
|
25
|
+
let lroot = root;
|
|
25
26
|
const cwd = process.cwd();
|
|
27
|
+
if (root?.startsWith("@")) {
|
|
28
|
+
opts.shortcut = root.slice(1).trim();
|
|
29
|
+
lroot = undefined;
|
|
30
|
+
}
|
|
26
31
|
parsed = {
|
|
27
|
-
rootArg:
|
|
28
|
-
root:
|
|
32
|
+
rootArg: lroot,
|
|
33
|
+
root: lroot ? path_1.default.resolve(cwd, lroot) : cwd,
|
|
29
34
|
flags: { ...opts },
|
|
30
35
|
};
|
|
31
36
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-input.js","sourceRoot":"","sources":["../../src/cli/cli-input.ts"],"names":[],"mappings":";;;;;AAWA,
|
|
1
|
+
{"version":3,"file":"cli-input.js","sourceRoot":"","sources":["../../src/cli/cli-input.ts"],"names":[],"mappings":"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","sourcesContent":["import sade from \"sade\";\nimport path from \"path\";\nimport pkg from \"../../package.json\";\nimport fs from \"fs\";\nimport { FLAG_MAP } from \"../constants/flags\";\nimport type { ParsedInput } from \"../types\";\n\n/**\n * Unified CLI parser powered by Sade and FLAG_MAP.\n * Returns { root, flags, warnings, errors }.\n */\nexport function parseCliInput(argv: string[] = process.argv) {\n\tif (argv.includes(\"-v\") || argv.includes(\"--version\")) {\n\t\tconsole.log(`prodex v${pkg.version}`);\n\t\tprocess.exit(0);\n\t}\n\n\tconst program = sade(\"prodex [root]\");\n\tregisterFlags(program);\n\n\tlet parsed: ParsedInput = { rootArg: \"\", root: undefined, flags: {} };\n\n\tprogram.action((root: string | undefined, opts: Record<string, any>) => {\n\t\tlet lroot= root;\n\t\tconst cwd = process.cwd();\n\t\tif(root?.startsWith(\"@\")){\n\t\t\topts.shortcut= root.slice(1).trim();\n\t\t\tlroot= undefined;\n\t\t}\n\t\tparsed = {\n\t\t\trootArg: lroot,\n\t\t\troot: lroot ? path.resolve(cwd, lroot) : cwd,\n\t\t\tflags: { ...opts },\n\t\t};\n\t});\n\n\tprogram.parse(argv);\n\n\tconst warnings: string[] = [];\n\tconst errors: string[] = [];\n\n\tparsed.flags = normalizeFlags(parsed.flags, warnings, errors);\n\tvalidateArgs(parsed, warnings, errors);\n\n\treturn { ...parsed, warnings, errors };\n}\n\nfunction registerFlags(program: ReturnType<typeof sade>) {\n\tfor (const [key, meta] of Object.entries(FLAG_MAP)) {\n\t\tconst short = meta.short ? `-${meta.short}, ` : \"\";\n\t\tconst long = `--${key}`;\n\t\tconst desc = meta.description;\n\t\tconst defaultVal = meta.type === \"boolean\" ? false : undefined;\n\t\tprogram.option(`${short}${long}`, desc, defaultVal);\n\t}\n}\n\n/** Convert flag values to correct types based on FLAG_MAP metadata. */\nfunction normalizeFlags(flags: Record<string, any>, warnings: string[], errors: string[]) {\n\tfor (const [key, meta] of Object.entries(FLAG_MAP)) {\n\t\tconst raw = flags[key];\n\t\tif (raw === undefined) continue;\n\n\t\tswitch (meta.type) {\n\t\t\tcase \"number\": {\n\t\t\t\tconst num = Number(raw);\n\t\t\t\tif (Number.isNaN(num)) errors.push(`Flag --${key} expected a number but got \"${raw}\"`);\n\t\t\t\telse flags[key] = num;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"list\": {\n\t\t\t\tflags[key] = String(raw)\n\t\t\t\t\t.split(\",\")\n\t\t\t\t\t.map((v) => v.trim())\n\t\t\t\t\t.filter(Boolean);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\tif (meta.type === \"string\") flags[key] = String(raw);\n\t\t\t}\n\t\t}\n\t}\n\treturn flags;\n}\n\n/** Validate path argument and report unrecognized flags. */\nfunction validateArgs(parsed: ParsedInput, warnings: string[], errors: string[]) {\n\tconst { rootArg } = parsed;\n\n\tif (rootArg) {\n\t\tif (!fs.existsSync(parsed.root)) {\n\t\t\terrors.push(`Invalid path argument: \"${rootArg}\" does not exist.`);\n\t\t} else if (!fs.statSync(parsed.root).isDirectory()) {\n\t\t\terrors.push(`Path argument \"${rootArg}\" is not a directory.`);\n\t\t}\n\t}\n\n\tconst unknown = parsed.flags?._ || [];\n\tif (unknown.length) {\n\t\twarnings.push(`Unrecognized arguments detected [${unknown.join(\", \")}]- They were ignored.`);\n\t}\n\n\tif (warnings.length) console.warn(\"Warnings:\", warnings);\n\tif (errors.length) {\n\t\tfor (const err of errors) console.error(err);\n\t\tprocess.exit(1);\n\t}\n}\n"]}
|
package/dist/cli/init.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.initProdex = initProdex;
|
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const default_config_1 = require("../constants/default-config");
|
|
10
|
+
const utils_1 = require("../lib/utils");
|
|
10
11
|
async function initProdex() {
|
|
11
12
|
console.log("πͺ Prodex Init β Configuration Wizard (v3");
|
|
12
13
|
const dest = path_1.default.join(process.cwd(), "prodex.json");
|
|
@@ -14,7 +15,7 @@ async function initProdex() {
|
|
|
14
15
|
console.error("prodex.json already exists. Delete or modify it manually.\n");
|
|
15
16
|
return;
|
|
16
17
|
}
|
|
17
|
-
fs_1.default.writeFileSync(dest,
|
|
18
|
+
fs_1.default.writeFileSync(dest, (0, utils_1.toJson)(default_config_1.DEFAULT_PRODEX_CONFIG) + "\n", "utf8");
|
|
18
19
|
console.log(`β
Created ${dest}`);
|
|
19
20
|
console.log("π‘ Globs supported everywhere (include, exclude, priority).");
|
|
20
21
|
}
|
package/dist/cli/init.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":";;;;;AAKA,gCAaC;AAlBD,4CAAoB;AACpB,gDAAwB;AACxB,gEAAoE;AACpE,wCAAsC;AAE/B,KAAK,UAAU,UAAU;IAC/B,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;IAEzD,MAAM,IAAI,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,aAAa,CAAC,CAAC;IAErD,IAAI,YAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACzB,OAAO,CAAC,KAAK,CAAC,6DAA6D,CAAC,CAAC;QAC7E,OAAO;IACR,CAAC;IAED,YAAE,CAAC,aAAa,CAAC,IAAI,EAAE,IAAA,cAAM,EAAC,sCAAqB,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC;IACrE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC;IACjC,OAAO,CAAC,GAAG,CAAC,6DAA6D,CAAC,CAAC;AAC5E,CAAC","sourcesContent":["import fs from \"fs\";\nimport path from \"path\";\nimport { DEFAULT_PRODEX_CONFIG } from \"../constants/default-config\";\nimport { toJson } from \"../lib/utils\";\n\nexport async function initProdex() {\n\tconsole.log(\"πͺ Prodex Init β Configuration Wizard (v3\");\n\n\tconst dest = path.join(process.cwd(), \"prodex.json\");\n\n\tif (fs.existsSync(dest)) {\n\t\tconsole.error(\"prodex.json already exists. Delete or modify it manually.\\n\");\n\t\treturn;\n\t}\n\n\tfs.writeFileSync(dest, toJson(DEFAULT_PRODEX_CONFIG) + \"\\n\", \"utf8\");\n\tconsole.log(`β
Created ${dest}`);\n\tconsole.log(\"π‘ Globs supported everywhere (include, exclude, priority).\");\n}\n"]}
|
package/dist/constants/config.js
CHANGED
|
@@ -24,5 +24,5 @@ exports.SUFFIX = "trace";
|
|
|
24
24
|
* - Trims and removes empty elements.
|
|
25
25
|
* - Filters out invalid or unusable characters for Fast-Glob.
|
|
26
26
|
*/
|
|
27
|
-
exports.VALID_GLOB_CHARS = /^[\w\-@./*?|!{}\[\]^$()+]+$/;
|
|
27
|
+
exports.VALID_GLOB_CHARS = /^[\w\-@./*?|!{}\[\]^$()+]+$/;
|
|
28
28
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/constants/config.ts"],"names":[],"mappings":";;;AAAA,6DAA+D;AAC/D,gEAAkE;AAErD,QAAA,SAAS,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC5D,QAAA,SAAS,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACnD,QAAA,SAAS,GAAG,IAAI,GAAG,CAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC9F,QAAA,OAAO,GAAG,OAAO,CAAC;AAElB,QAAA,SAAS,GAAG;IACxB,MAAM,EAAE,gCAAiB;IACzB,KAAK,EAAE,8BAAgB;IACvB,MAAM,EAAE,8BAAgB;IACxB,OAAO,EAAE,8BAAgB;IACzB,KAAK,EAAE,8BAAgB;CACvB,CAAC;AAEW,QAAA,aAAa,GAAG,CAAC,oBAAoB,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;AAErE,QAAA,MAAM,GAAG,OAAO,CAAC;AAE9B;;;;;;;GAOG;AACU,QAAA,gBAAgB,GAAG,6BAA6B,CAAC
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/constants/config.ts"],"names":[],"mappings":";;;AAAA,6DAA+D;AAC/D,gEAAkE;AAErD,QAAA,SAAS,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC5D,QAAA,SAAS,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACnD,QAAA,SAAS,GAAG,IAAI,GAAG,CAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC9F,QAAA,OAAO,GAAG,OAAO,CAAC;AAElB,QAAA,SAAS,GAAG;IACxB,MAAM,EAAE,gCAAiB;IACzB,KAAK,EAAE,8BAAgB;IACvB,MAAM,EAAE,8BAAgB;IACxB,OAAO,EAAE,8BAAgB;IACzB,KAAK,EAAE,8BAAgB;CACvB,CAAC;AAEW,QAAA,aAAa,GAAG,CAAC,oBAAoB,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;AAErE,QAAA,MAAM,GAAG,OAAO,CAAC;AAE9B;;;;;;;GAOG;AACU,QAAA,gBAAgB,GAAG,6BAA6B,CAAC","sourcesContent":["import { resolveJsImports } from \"../resolvers/js/js-resolver\";\nimport { resolvePhpImports } from \"../resolvers/php/php-resolver\";\n\nexport const CODE_EXTS = [\".js\", \".mjs\", \".ts\", \".tsx\", \".d.ts\", \".php\"];\nexport const BASE_EXTS = [\".ts\", \".tsx\", \".js\", \".jsx\", \".mjs\"];\nexport const REAL_EXTS = new Set<string>([\".ts\", \".tsx\", \".js\", \".jsx\", \".mjs\", \".cjs\", \".d.ts\", \".json\"]);\nexport const DTS_EXT = \".d.ts\";\n\nexport const RESOLVERS = {\n\t\".php\": resolvePhpImports,\n\t\".ts\": resolveJsImports,\n\t\".tsx\": resolveJsImports,\n\t\".d.ts\": resolveJsImports,\n\t\".js\": resolveJsImports,\n};\n\nexport const GLOBAL_IGNORE = [\"**/node_modules/**\", \"**/vendor/**\", \"**/dist/**\"];\n\nexport const SUFFIX = \"trace\";\n\n/**\n * Normalize and sanitize pattern fields.\n * - Always returns an array.\n * - Accepts string or string[].\n * - Splits comma-separated strings.\n * - Trims and removes empty elements.\n * - Filters out invalid or unusable characters for Fast-Glob.\n */\nexport const VALID_GLOB_CHARS = /^[\\w\\-@./*?|!{}\\[\\]^$()+]+$/;\n"]}
|
|
@@ -7,6 +7,7 @@ exports.DEFAULT_PRODEX_CONFIG = void 0;
|
|
|
7
7
|
*/
|
|
8
8
|
exports.DEFAULT_PRODEX_CONFIG = {
|
|
9
9
|
version: 3.1,
|
|
10
|
+
$schema: "https://raw.githubusercontent.com/emxhive/prodex/main/schema/prodex.schema.json",
|
|
10
11
|
output: {
|
|
11
12
|
dir: "prodex",
|
|
12
13
|
versioned: true,
|
|
@@ -18,18 +19,26 @@ exports.DEFAULT_PRODEX_CONFIG = {
|
|
|
18
19
|
ui: {
|
|
19
20
|
roots: ["app", "routes", "resources/js/**"],
|
|
20
21
|
scanDepth: 2,
|
|
21
|
-
priority: ["**/routes/web.php", "**/
|
|
22
|
+
priority: ["**/routes/web.php", "**/app.*"],
|
|
22
23
|
},
|
|
23
24
|
},
|
|
24
25
|
resolve: {
|
|
25
|
-
include: ["**/*.d.ts"
|
|
26
|
+
include: ["**/*.d.ts"],
|
|
26
27
|
aliases: {
|
|
27
|
-
"@
|
|
28
|
-
"@data": "resources/js/data",
|
|
28
|
+
"@": "resources/js",
|
|
29
29
|
},
|
|
30
30
|
exclude: ["node_modules/**", "@shadcn/**", "**/components/ui/**"],
|
|
31
31
|
depth: 10,
|
|
32
32
|
limit: 200,
|
|
33
33
|
},
|
|
34
|
+
shortcuts: {
|
|
35
|
+
dashboard: {
|
|
36
|
+
files: ["**/dashboard.tsx"],
|
|
37
|
+
include: ["**.app.tsx", "**/*.d.ts"],
|
|
38
|
+
},
|
|
39
|
+
web: {
|
|
40
|
+
files: ["**/web.php", "**/api.php"],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
34
43
|
};
|
|
35
44
|
//# sourceMappingURL=default-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-config.js","sourceRoot":"","sources":["../../src/constants/default-config.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACU,QAAA,qBAAqB,GAAqB;
|
|
1
|
+
{"version":3,"file":"default-config.js","sourceRoot":"","sources":["../../src/constants/default-config.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACU,QAAA,qBAAqB,GAAqB;IACtD,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,iFAAiF;IAC1F,MAAM,EAAE;QACP,GAAG,EAAE,QAAQ;QACb,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,UAAU;QAClB,MAAM,EAAE,IAAI;KACZ;IACD,KAAK,EAAE;QACN,KAAK,EAAE,EAAE;QACT,EAAE,EAAE;YACH,KAAK,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,iBAAiB,CAAC;YAC3C,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,CAAC,mBAAmB,EAAE,UAAU,CAAC;SAC3C;KACD;IACD,OAAO,EAAE;QACR,OAAO,EAAE,CAAC,WAAW,CAAC;QACtB,OAAO,EAAE;YACR,GAAG,EAAE,cAAc;SACnB;QACD,OAAO,EAAE,CAAC,iBAAiB,EAAE,YAAY,EAAE,qBAAqB,CAAC;QACjE,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,GAAG;KACV;IAED,SAAS,EAAE;QACV,SAAS,EAAE;YACV,KAAK,EAAE,CAAC,kBAAkB,CAAC;YAC3B,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC;SACpC;QAED,GAAG,EAAE;YACJ,KAAK,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;SACnC;KACD;CACD,CAAC","sourcesContent":["import type { ProdexConfigFile } from \"../types/config.types\";\n\n/**\n * Default configuration for Prodex.\n * Conforms strictly to ProdexConfig for full type safety.\n */\nexport const DEFAULT_PRODEX_CONFIG: ProdexConfigFile = {\n\tversion: 3.1,\n\t$schema: \"https://raw.githubusercontent.com/emxhive/prodex/main/schema/prodex.schema.json\",\n\toutput: {\n\t\tdir: \"prodex\",\n\t\tversioned: true,\n\t\tprefix: \"combined\",\n\t\tformat: \"md\",\n\t},\n\tentry: {\n\t\tfiles: [],\n\t\tui: {\n\t\t\troots: [\"app\", \"routes\", \"resources/js/**\"],\n\t\t\tscanDepth: 2,\n\t\t\tpriority: [\"**/routes/web.php\", \"**/app.*\"],\n\t\t},\n\t},\n\tresolve: {\n\t\tinclude: [\"**/*.d.ts\"],\n\t\taliases: {\n\t\t\t\"@\": \"resources/js\",\n\t\t},\n\t\texclude: [\"node_modules/**\", \"@shadcn/**\", \"**/components/ui/**\"],\n\t\tdepth: 10,\n\t\tlimit: 200,\n\t},\n\n\tshortcuts: {\n\t\tdashboard: {\n\t\t\tfiles: [\"**/dashboard.tsx\"],\n\t\t\tinclude: [\"**.app.tsx\", \"**/*.d.ts\"],\n\t\t},\n\n\t\tweb: {\n\t\t\tfiles: [\"**/web.php\", \"**/api.php\"],\n\t\t},\n\t},\n};\n"]}
|
package/dist/constants/flags.js
CHANGED
|
@@ -50,6 +50,12 @@ exports.FLAG_MAP = {
|
|
|
50
50
|
description: "Enable debug logs.",
|
|
51
51
|
apply: () => { },
|
|
52
52
|
},
|
|
53
|
+
shortcut: {
|
|
54
|
+
short: "a",
|
|
55
|
+
type: "string",
|
|
56
|
+
description: "Apply a config shortcut by name.",
|
|
57
|
+
apply: () => { },
|
|
58
|
+
},
|
|
53
59
|
help: {
|
|
54
60
|
short: "h",
|
|
55
61
|
type: "boolean",
|