@timo9378/flow2code 0.1.9 → 0.2.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/CHANGELOG.md +21 -0
- package/README.md +15 -2
- package/dist/cli.js +101978 -830
- package/dist/compiler.cjs +32 -2
- package/dist/compiler.d.cts +6 -0
- package/dist/compiler.d.ts +6 -0
- package/dist/compiler.js +32 -2
- package/dist/server.d.ts +1 -1
- package/dist/server.js +102677 -1379
- package/out/404.html +1 -1
- package/out/__next.__PAGE__.txt +4 -4
- package/out/__next._full.txt +13 -13
- package/out/__next._head.txt +4 -4
- package/out/__next._index.txt +6 -6
- package/out/__next._tree.txt +2 -2
- package/out/_next/static/chunks/05328cd26bdc795c.js +176 -0
- package/out/_next/static/chunks/06e01c846ae01892.js +1 -0
- package/out/_next/static/chunks/1011f174944c0ca2.js +70 -0
- package/out/_next/static/chunks/1570e9ba5f1b44ed.js +5 -0
- package/out/_next/static/chunks/6167fccccde2e675.css +1 -0
- package/out/_next/static/chunks/{b112c2f519e4b429.js → 7cd04052abfadac1.js} +1 -1
- package/out/_next/static/chunks/8091c1216a95d294.js +1 -0
- package/out/_next/static/chunks/98d53aae29c36c6b.js +1 -0
- package/out/_next/static/chunks/a6dad97d9634a72d.js.map +1 -1
- package/out/_next/static/chunks/{b163b5d7cccbcf42.js → b05daf00cdc6058f.js} +1 -1
- package/out/_next/static/chunks/b3419ee3e3a616d9.js +1 -0
- package/out/_next/static/chunks/{acf223168ac429f7.js → be40d79540010a0d.js} +1 -1
- package/out/_next/static/chunks/{turbopack-576234c945ffdc44.js → turbopack-9da9810f42c97265.js} +1 -1
- package/out/_not-found/__next._full.txt +11 -11
- package/out/_not-found/__next._head.txt +4 -4
- package/out/_not-found/__next._index.txt +6 -6
- package/out/_not-found/__next._not-found/__PAGE__.txt +2 -2
- package/out/_not-found/__next._not-found.txt +3 -3
- package/out/_not-found/__next._tree.txt +2 -2
- package/out/_not-found.html +1 -1
- package/out/_not-found.txt +11 -11
- package/out/index.html +2 -2
- package/out/index.txt +13 -13
- package/package.json +130 -124
- package/out/_next/static/chunks/0bc0a50347ee5f3c.js +0 -51
- package/out/_next/static/chunks/58bf94a9d7047ec0.js +0 -125
- package/out/_next/static/chunks/6b84376656bd9887.js +0 -1
- package/out/_next/static/chunks/83ab8820627f8bfe.css +0 -1
- package/out/_next/static/chunks/ab8888d4b78b94be.js +0 -5
- package/out/_next/static/chunks/b6e8711267bccbbd.js +0 -1
- package/out/_next/static/chunks/fbca595129527827.js +0 -1
- package/scripts/publish-all.sh +0 -56
- /package/out/_next/static/{Ma0MmC8j1mxpQbtLwNajF → hNOHolNViTvQRpVwfaIx-}/_buildManifest.js +0 -0
- /package/out/_next/static/{Ma0MmC8j1mxpQbtLwNajF → hNOHolNViTvQRpVwfaIx-}/_clientMiddlewareManifest.json +0 -0
- /package/out/_next/static/{Ma0MmC8j1mxpQbtLwNajF → hNOHolNViTvQRpVwfaIx-}/_ssgManifest.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,27 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
7
|
|
|
8
|
+
## [0.2.0] — 2026-03-05
|
|
9
|
+
|
|
10
|
+
### Added — VSCode Extension (`vscode-extension/`)
|
|
11
|
+
- **Right-click Decompile** — Right-click any `.ts`/`.js` file (or selection) → "Flow2Code: Decompile to Flow IR" generates `.flow.json` side-by-side with confidence score
|
|
12
|
+
- **Right-click Compile** — Right-click any `.flow.json` → "Flow2Code: Compile to TypeScript" with configurable platform (Next.js / Express / Cloudflare)
|
|
13
|
+
- **Flow Preview** — SVG-based DAG visualization with pan, zoom, fit-to-view, category-colored nodes, and hover tooltips
|
|
14
|
+
- **Auto-Validation Diagnostics** — Inline errors/warnings on open and save for `.flow.json` files, positioned at the offending node/edge in JSON
|
|
15
|
+
- **Custom Editor** — "Open With… > Flow2Code Visual Editor" provides read-only graphical view of `.flow.json` files
|
|
16
|
+
- **Status Bar** — Shows flow name and node/edge count (`$(graph) MyFlow (5N·4E)`) when a `.flow.json` is active; click to preview
|
|
17
|
+
- **Configurable Settings** — `flow2code.platform`, `flow2code.autoValidate`, `flow2code.compileOnSave`
|
|
18
|
+
- **esbuild Bundling** — Self-contained 6.3MB bundle with `@/` alias plugin resolving to main project source
|
|
19
|
+
|
|
20
|
+
### Added — Playwright E2E Testing
|
|
21
|
+
- **20 Playwright E2E tests** — Smoke tests, Node Operations, Toolbar Actions, API Compile Endpoint
|
|
22
|
+
- **Playwright config** — Chromium browser with auto-start dev server on port 3000
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- **Infinite re-render loop** — `FlowNode` badge selector `?? []` created a new array on every store update, causing infinite React setState loop with React Flow dimension measurements. Fixed by using a stable empty array constant.
|
|
26
|
+
- **`useFlowLint` unconditional updates** — Lint hook always called `setNodeBadges()` even when results hadn't changed, feeding the re-render loop. Added shallow comparison before updating.
|
|
27
|
+
- **Platform registration tree-shaking** — Turbopack tree-shook barrel file side effects, causing "Unknown platform" errors in API routes. Fixed by registering platforms directly in `compiler.ts`.
|
|
28
|
+
|
|
8
29
|
## [0.1.9] — 2026-03-05
|
|
9
30
|
|
|
10
31
|
### Fixed
|
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
| Platform Adapters | NextjsPlatform / ExpressPlatform / CloudflarePlatform |
|
|
54
54
|
| Plugin System | `createPluginRegistry()` factory (per-instance) |
|
|
55
55
|
| CLI | Commander.js + Chokidar |
|
|
56
|
-
| Testing | Vitest 4 —
|
|
56
|
+
| Testing | Vitest 4 — 413 tests across 33 test files + 20 Playwright E2E tests |
|
|
57
57
|
| CI | GitHub Actions (Node 20/22 matrix) |
|
|
58
58
|
|
|
59
59
|
## Quick Start
|
|
@@ -185,7 +185,7 @@ flow2code/
|
|
|
185
185
|
│ │ └── storage/ # .flow.json split/merge
|
|
186
186
|
│ ├── cli/ # CLI (compile/watch/init)
|
|
187
187
|
│ └── server/ # Standalone HTTP Server
|
|
188
|
-
├── tests/ #
|
|
188
|
+
├── tests/ # 413 unit tests + 20 E2E tests
|
|
189
189
|
├── .github/workflows/ci.yml # GitHub Actions CI
|
|
190
190
|
├── CONTRIBUTING.md
|
|
191
191
|
└── vitest.config.ts
|
|
@@ -225,6 +225,19 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
|
225
225
|
|
|
226
226
|
For detailed usage examples and workflows, see [USAGE.md](USAGE.md).
|
|
227
227
|
|
|
228
|
+
## VS Code Extension
|
|
229
|
+
|
|
230
|
+
Flow2Code ships a companion VS Code extension under `vscode-extension/`:
|
|
231
|
+
|
|
232
|
+
- **Right-click Decompile** — Decompile any `.ts`/`.js` to a `.flow.json` visual IR
|
|
233
|
+
- **Right-click Compile** — Compile `.flow.json` to TypeScript with platform selection
|
|
234
|
+
- **Flow Preview** — SVG-based DAG visualization with pan, zoom, category coloring
|
|
235
|
+
- **Auto-Validation** — Inline diagnostics for `.flow.json` on open/save
|
|
236
|
+
- **Custom Editor** — "Open With… > Flow2Code Visual Editor" for graphical view
|
|
237
|
+
- **Status Bar** — Shows node/edge count; click to preview
|
|
238
|
+
|
|
239
|
+
See [vscode-extension/README.md](vscode-extension/README.md) for details.
|
|
240
|
+
|
|
228
241
|
## License
|
|
229
242
|
|
|
230
243
|
MIT
|