depwire-cli 0.9.20 → 0.9.22
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 +34 -17
- package/dist/{chunk-H6Q2OEGP.js → chunk-QHVWDUSX.js} +382 -1921
- package/dist/chunk-XBCQPU63.js +2002 -0
- package/dist/index.js +20 -356
- package/dist/mcpb-entry.js +5 -3
- package/dist/sdk.d.ts +237 -0
- package/dist/sdk.js +32 -0
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -144,31 +144,48 @@ Settings → Features → Experimental → Enable MCP → Add Server:
|
|
|
144
144
|
| `get_health_score` | Get 0-100 dependency health score with recommendations |
|
|
145
145
|
| `find_dead_code` | Find dead code — symbols defined but never referenced |
|
|
146
146
|
| `get_temporal_graph` | Show how the graph evolved over git history |
|
|
147
|
-
| `simulate_change` | Simulate
|
|
147
|
+
| `simulate_change` | Simulate a move/delete/rename/split/merge before touching code. Returns health score delta, broken imports, and affected nodes. Zero file I/O. |
|
|
148
148
|
|
|
149
|
-
##
|
|
149
|
+
## SDK
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
depwire-cli exposes a public SDK for programmatic use:
|
|
152
152
|
|
|
153
153
|
```bash
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
# What happens if I move this file?
|
|
158
|
-
depwire whatif . --simulate move --target src/utils/helpers.ts --destination src/core/helpers.ts
|
|
154
|
+
npm install depwire-cli
|
|
155
|
+
```
|
|
159
156
|
|
|
160
|
-
|
|
161
|
-
|
|
157
|
+
```typescript
|
|
158
|
+
import {
|
|
159
|
+
parseProject,
|
|
160
|
+
buildGraph,
|
|
161
|
+
calculateHealthScore,
|
|
162
|
+
analyzeDeadCode,
|
|
163
|
+
generateDocs,
|
|
164
|
+
SimulationEngine,
|
|
165
|
+
searchSymbols,
|
|
166
|
+
getImpact,
|
|
167
|
+
getArchitectureSummary,
|
|
168
|
+
DepwireSDKVersion
|
|
169
|
+
} from 'depwire-cli/sdk';
|
|
162
170
|
```
|
|
163
171
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
172
|
+
The SDK is the stable public API surface. All cloud and tooling integrations
|
|
173
|
+
should import from `depwire-cli/sdk` — never from internal paths.
|
|
174
|
+
|
|
175
|
+
## What If Simulation
|
|
176
|
+
|
|
177
|
+
Simulate architectural changes before touching any code:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
depwire whatif . --simulate delete --target src/utils/encode.ts
|
|
181
|
+
depwire whatif . --simulate move --target src/utils/encode.ts --destination src/core/encode.ts
|
|
182
|
+
depwire whatif . --simulate rename --target src/utils/encode.ts --destination src/utils/encoder.ts
|
|
183
|
+
depwire whatif . --simulate split --target src/services/auth.ts --symbols "validateToken,refreshToken"
|
|
184
|
+
depwire whatif . --simulate merge --target src/utils/helpers.ts --merge-target src/utils/formatters.ts
|
|
185
|
+
```
|
|
170
186
|
|
|
171
|
-
|
|
187
|
+
Returns: health score delta, broken imports, affected nodes, circular deps introduced/resolved.
|
|
188
|
+
Also available as MCP tool `simulate_change` for AI coding assistants.
|
|
172
189
|
|
|
173
190
|
## Why Depwire
|
|
174
191
|
|