@hyphaene/hexa-ts-kit 1.10.0 → 1.12.0
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 +116 -0
- package/dist/{chunk-IBVI6IS2.js → chunk-TGZA3GHG.js} +569 -12
- package/dist/chunk-WXFSGE4N.js +104 -0
- package/dist/cli.js +522 -6
- package/dist/mcp-server.js +2 -2
- package/dist/scanner-QA3DOYP6.js +8 -0
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -46,6 +46,15 @@ hexa-ts scaffold nestjs-feature src/domains/orders/create
|
|
|
46
46
|
|
|
47
47
|
# Scaffold Playwright tests
|
|
48
48
|
hexa-ts scaffold playwright-feature e2e/checkout
|
|
49
|
+
|
|
50
|
+
# Setup vault config (interactive wizard)
|
|
51
|
+
hexa-ts vault:init
|
|
52
|
+
|
|
53
|
+
# Compare vault schemas between refs
|
|
54
|
+
hexa-ts vault:diff --repo <alias> <source-ref> <target-ref>
|
|
55
|
+
|
|
56
|
+
# Quick diff: current branch vs main
|
|
57
|
+
hexa-ts vault:quick-diff
|
|
49
58
|
```
|
|
50
59
|
|
|
51
60
|
### MCP Server
|
|
@@ -174,6 +183,113 @@ match: "*.composable.ts"
|
|
|
174
183
|
---
|
|
175
184
|
```
|
|
176
185
|
|
|
186
|
+
## Vault Diff
|
|
187
|
+
|
|
188
|
+
Compare `vault.schema.json` between git refs to detect configuration changes before deployment.
|
|
189
|
+
|
|
190
|
+
### Modes
|
|
191
|
+
|
|
192
|
+
**Multi-repo** (from anywhere, using `--repo` flag):
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
hexa-ts vault:diff --repo <alias> <source-ref> <target-ref>
|
|
196
|
+
hexa-ts vault:extract --repo <alias> <ref>
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**In-repo** (from inside the git repo):
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
hexa-ts vault:diff <source-ref> <target-ref>
|
|
203
|
+
hexa-ts vault:extract <ref>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Global Configuration
|
|
207
|
+
|
|
208
|
+
Create `~/.hexa/vault.yaml` to define repo aliases for multi-repo mode:
|
|
209
|
+
|
|
210
|
+
```yaml
|
|
211
|
+
repos:
|
|
212
|
+
<alias>:
|
|
213
|
+
url: "<git-remote-url>"
|
|
214
|
+
schemaPath: "<path/to/vault.schema.json>"
|
|
215
|
+
turbineService: "<service-name>" # optional
|
|
216
|
+
cacheDir: "~/.hexa/vault/.cache"
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Each repo entry requires:
|
|
220
|
+
- `url`: Git remote URL (SSH or HTTPS)
|
|
221
|
+
- `schemaPath`: Path to `vault.schema.json` relative to repo root
|
|
222
|
+
- `turbineService` (optional): Turbine service name for environment resolution
|
|
223
|
+
|
|
224
|
+
### Cache
|
|
225
|
+
|
|
226
|
+
Multi-repo mode uses bare git clones cached in `~/.hexa/vault/.cache/`. On each run, the cache is fetched automatically to stay up to date. If a fetch fails, the cache is re-cloned from scratch.
|
|
227
|
+
|
|
228
|
+
### Commands
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# Multi-repo: compare two refs
|
|
232
|
+
hexa-ts vault:diff --repo <alias> <source-ref> <target-ref>
|
|
233
|
+
|
|
234
|
+
# In-repo: compare two refs
|
|
235
|
+
hexa-ts vault:diff <source-ref> <target-ref>
|
|
236
|
+
|
|
237
|
+
# Quick diff: current branch vs main (in-repo only)
|
|
238
|
+
hexa-ts vault:quick-diff
|
|
239
|
+
|
|
240
|
+
# Extract schema from a ref
|
|
241
|
+
hexa-ts vault:extract --repo <alias> <ref>
|
|
242
|
+
hexa-ts vault:extract <ref>
|
|
243
|
+
|
|
244
|
+
# JSON output (for agents)
|
|
245
|
+
hexa-ts vault:diff --repo <alias> <source-ref> <target-ref> --format json
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Output
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
Vault Schema Diff
|
|
252
|
+
Source: <source-ref>
|
|
253
|
+
Target: <target-ref>
|
|
254
|
+
──────────────────────────────────────────────────
|
|
255
|
+
|
|
256
|
+
+ Added:
|
|
257
|
+
config.newFeature: { enabled, options }
|
|
258
|
+
config.workflows: enum(TYPE_A | TYPE_B)[]
|
|
259
|
+
|
|
260
|
+
- Removed:
|
|
261
|
+
config.deprecatedFlag: boolean
|
|
262
|
+
|
|
263
|
+
~ Changed:
|
|
264
|
+
config.items[]: string → number
|
|
265
|
+
|
|
266
|
+
──────────────────────────────────────────────────
|
|
267
|
+
Summary: +2 -1 ~1
|
|
268
|
+
|
|
269
|
+
⚠ Breaking changes detected (removals or type changes)
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
The command exits with code 1 if breaking changes are detected (removals or type changes).
|
|
273
|
+
|
|
274
|
+
### Setup: vault:init
|
|
275
|
+
|
|
276
|
+
Generate `~/.hexa/vault.yaml` automatically by scanning your filesystem for repos with `vault.schema.json`:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
# Interactive wizard (React Ink)
|
|
280
|
+
hexa-ts vault:init
|
|
281
|
+
|
|
282
|
+
# Non-interactive (auto-detect and write)
|
|
283
|
+
hexa-ts vault:init --no-interactive --scan <paths>
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
The wizard:
|
|
287
|
+
1. Asks which directories to scan
|
|
288
|
+
2. Discovers git repos containing `vault.schema.json`
|
|
289
|
+
3. Deduplicates by remote URL (skips worktrees)
|
|
290
|
+
4. Suggests aliases for each repo
|
|
291
|
+
5. Previews and writes `~/.hexa/vault.yaml`
|
|
292
|
+
|
|
177
293
|
## Development
|
|
178
294
|
|
|
179
295
|
### Playground
|