@timo9378/flow2code 0.1.8 → 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.
Files changed (50) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +15 -2
  3. package/dist/cli.js +101998 -816
  4. package/dist/compiler.cjs +66 -10
  5. package/dist/compiler.d.cts +6 -0
  6. package/dist/compiler.d.ts +6 -0
  7. package/dist/compiler.js +66 -10
  8. package/dist/server.d.ts +1 -1
  9. package/dist/server.js +102689 -1378
  10. package/out/404.html +1 -1
  11. package/out/__next.__PAGE__.txt +4 -4
  12. package/out/__next._full.txt +13 -13
  13. package/out/__next._head.txt +4 -4
  14. package/out/__next._index.txt +6 -6
  15. package/out/__next._tree.txt +2 -2
  16. package/out/_next/static/chunks/05328cd26bdc795c.js +176 -0
  17. package/out/_next/static/chunks/06e01c846ae01892.js +1 -0
  18. package/out/_next/static/chunks/1011f174944c0ca2.js +70 -0
  19. package/out/_next/static/chunks/1570e9ba5f1b44ed.js +5 -0
  20. package/out/_next/static/chunks/6167fccccde2e675.css +1 -0
  21. package/out/_next/static/chunks/{b112c2f519e4b429.js → 7cd04052abfadac1.js} +1 -1
  22. package/out/_next/static/chunks/8091c1216a95d294.js +1 -0
  23. package/out/_next/static/chunks/98d53aae29c36c6b.js +1 -0
  24. package/out/_next/static/chunks/a6dad97d9634a72d.js.map +1 -1
  25. package/out/_next/static/chunks/{b163b5d7cccbcf42.js → b05daf00cdc6058f.js} +1 -1
  26. package/out/_next/static/chunks/b3419ee3e3a616d9.js +1 -0
  27. package/out/_next/static/chunks/{acf223168ac429f7.js → be40d79540010a0d.js} +1 -1
  28. package/out/_next/static/chunks/{turbopack-576234c945ffdc44.js → turbopack-9da9810f42c97265.js} +1 -1
  29. package/out/_not-found/__next._full.txt +11 -11
  30. package/out/_not-found/__next._head.txt +4 -4
  31. package/out/_not-found/__next._index.txt +6 -6
  32. package/out/_not-found/__next._not-found/__PAGE__.txt +2 -2
  33. package/out/_not-found/__next._not-found.txt +3 -3
  34. package/out/_not-found/__next._tree.txt +2 -2
  35. package/out/_not-found.html +1 -1
  36. package/out/_not-found.txt +11 -11
  37. package/out/index.html +2 -2
  38. package/out/index.txt +13 -13
  39. package/package.json +130 -124
  40. package/out/_next/static/chunks/06054f68c210e89c.js +0 -125
  41. package/out/_next/static/chunks/0bc0a50347ee5f3c.js +0 -51
  42. package/out/_next/static/chunks/6b84376656bd9887.js +0 -1
  43. package/out/_next/static/chunks/83ab8820627f8bfe.css +0 -1
  44. package/out/_next/static/chunks/ab8888d4b78b94be.js +0 -5
  45. package/out/_next/static/chunks/b6e8711267bccbbd.js +0 -1
  46. package/out/_next/static/chunks/fbca595129527827.js +0 -1
  47. package/scripts/publish-all.sh +0 -56
  48. /package/out/_next/static/{EFK7prtbW4K3cbFdFFkDA → hNOHolNViTvQRpVwfaIx-}/_buildManifest.js +0 -0
  49. /package/out/_next/static/{EFK7prtbW4K3cbFdFFkDA → hNOHolNViTvQRpVwfaIx-}/_clientMiddlewareManifest.json +0 -0
  50. /package/out/_next/static/{EFK7prtbW4K3cbFdFFkDA → hNOHolNViTvQRpVwfaIx-}/_ssgManifest.js +0 -0
package/out/index.txt CHANGED
@@ -1,21 +1,21 @@
1
1
  1:"$Sreact.fragment"
2
- 2:I[46798,["/_next/static/chunks/acf223168ac429f7.js"],"TooltipProvider"]
3
- 3:I[95731,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"default"]
4
- 4:I[58298,["/_next/static/chunks/acf223168ac429f7.js","/_next/static/chunks/b112c2f519e4b429.js"],"default"]
5
- 5:I[32294,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"default"]
6
- 6:I[55026,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"ClientPageRoot"]
7
- 7:I[52683,["/_next/static/chunks/acf223168ac429f7.js","/_next/static/chunks/06054f68c210e89c.js","/_next/static/chunks/0bc0a50347ee5f3c.js"],"default"]
8
- a:I[5806,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"OutletBoundary"]
2
+ 2:I[46798,["/_next/static/chunks/be40d79540010a0d.js"],"TooltipProvider"]
3
+ 3:I[94482,["/_next/static/chunks/b05daf00cdc6058f.js","/_next/static/chunks/8091c1216a95d294.js"],"default"]
4
+ 4:I[58298,["/_next/static/chunks/be40d79540010a0d.js","/_next/static/chunks/7cd04052abfadac1.js"],"default"]
5
+ 5:I[22544,["/_next/static/chunks/b05daf00cdc6058f.js","/_next/static/chunks/8091c1216a95d294.js"],"default"]
6
+ 6:I[39308,["/_next/static/chunks/b05daf00cdc6058f.js","/_next/static/chunks/8091c1216a95d294.js"],"ClientPageRoot"]
7
+ 7:I[52683,["/_next/static/chunks/be40d79540010a0d.js","/_next/static/chunks/05328cd26bdc795c.js","/_next/static/chunks/1011f174944c0ca2.js"],"default"]
8
+ a:I[61686,["/_next/static/chunks/b05daf00cdc6058f.js","/_next/static/chunks/8091c1216a95d294.js"],"OutletBoundary"]
9
9
  b:"$Sreact.suspense"
10
- d:I[5806,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"ViewportBoundary"]
11
- f:I[5806,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"MetadataBoundary"]
12
- 11:I[63491,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"default"]
13
- :HL["/_next/static/chunks/83ab8820627f8bfe.css","style"]
10
+ d:I[61686,["/_next/static/chunks/b05daf00cdc6058f.js","/_next/static/chunks/8091c1216a95d294.js"],"ViewportBoundary"]
11
+ f:I[61686,["/_next/static/chunks/b05daf00cdc6058f.js","/_next/static/chunks/8091c1216a95d294.js"],"MetadataBoundary"]
12
+ 11:I[63491,["/_next/static/chunks/b05daf00cdc6058f.js","/_next/static/chunks/8091c1216a95d294.js"],"default"]
13
+ :HL["/_next/static/chunks/6167fccccde2e675.css","style"]
14
14
  :HL["/_next/static/chunks/8a5bd6fe3abc8091.css","style"]
15
- 0:{"P":null,"b":"EFK7prtbW4K3cbFdFFkDA","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/83ab8820627f8bfe.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/acf223168ac429f7.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"antialiased overflow-hidden","children":["$","$L2",null,{"delayDuration":200,"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$4","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/b112c2f519e4b429.js","async":true}]],"template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/8a5bd6fe3abc8091.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/06054f68c210e89c.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0bc0a50347ee5f3c.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],null]}],false]],"m":"$undefined","G":["$11",[]],"S":true}
15
+ 0:{"P":null,"b":"hNOHolNViTvQRpVwfaIx-","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/6167fccccde2e675.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/be40d79540010a0d.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"antialiased overflow-hidden","children":["$","$L2",null,{"delayDuration":200,"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$4","errorStyles":[],"errorScripts":[["$","script","script-0",{"src":"/_next/static/chunks/7cd04052abfadac1.js","async":true}]],"template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@8","$@9"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/8a5bd6fe3abc8091.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/05328cd26bdc795c.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/1011f174944c0ca2.js","async":true,"nonce":"$undefined"}]],["$","$La",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@c"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Ld",null,{"children":"$Le"}],["$","div",null,{"hidden":true,"children":["$","$Lf",null,{"children":["$","$b",null,{"name":"Next.Metadata","children":"$L10"}]}]}],null]}],false]],"m":"$undefined","G":["$11",[]],"S":true}
16
16
  8:{}
17
17
  9:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"
18
18
  e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
19
- 12:I[22192,["/_next/static/chunks/b163b5d7cccbcf42.js","/_next/static/chunks/6b84376656bd9887.js"],"IconMark"]
19
+ 12:I[67671,["/_next/static/chunks/b05daf00cdc6058f.js","/_next/static/chunks/8091c1216a95d294.js"],"IconMark"]
20
20
  c:null
21
21
  10:[["$","title","0",{"children":"Flow2Code | Visual AST Compiler"}],["$","meta","1",{"name":"description","content":"Visual backend logic generator: compile canvas nodes directly into native TypeScript code"}],["$","link","2",{"rel":"manifest","href":"/site.webmanifest","crossOrigin":"$undefined"}],["$","link","3",{"rel":"icon","href":"/favicon.ico","sizes":"any"}],["$","link","4",{"rel":"icon","href":"/favicon-16x16.png","sizes":"16x16","type":"image/png"}],["$","link","5",{"rel":"icon","href":"/favicon-32x32.png","sizes":"32x32","type":"image/png"}],["$","link","6",{"rel":"apple-touch-icon","href":"/apple-touch-icon.png"}],["$","$L12","7",{}]]
package/package.json CHANGED
@@ -1,124 +1,130 @@
1
- {
2
- "name": "@timo9378/flow2code",
3
- "version": "0.1.8",
4
- "description": "Visual AST Compiler: Flow-based visual editor that compiles to native TypeScript code",
5
- "type": "module",
6
- "sideEffects": false,
7
- "main": "./dist/compiler.js",
8
- "module": "./dist/compiler.js",
9
- "types": "./dist/compiler.d.ts",
10
- "scripts": {
11
- "dev": "next dev --turbopack",
12
- "dev:server": "tsx src/server/index.ts",
13
- "build": "pnpm build:ui && pnpm build:cli",
14
- "build:ui": "next build",
15
- "build:cli": "tsup && cp src/server/server.d.ts dist/server.d.ts",
16
- "start": "node dist/server.js",
17
- "lint": "eslint .",
18
- "test": "vitest",
19
- "test:run": "vitest run",
20
- "precheck": "pnpm lint && pnpm test:run && pnpm build:cli",
21
- "docs:api": "typedoc",
22
- "compile": "node --loader ts-node/esm src/cli/index.ts compile",
23
- "watch": "node --loader ts-node/esm src/cli/index.ts watch",
24
- "prepublishOnly": "pnpm build",
25
- "postinstall": "node scripts/postinstall.cjs || true"
26
- },
27
- "bin": {
28
- "flow2code": "dist/cli.js"
29
- },
30
- "exports": {
31
- ".": {
32
- "import": "./dist/compiler.js",
33
- "require": "./dist/compiler.cjs",
34
- "types": "./dist/compiler.d.ts"
35
- },
36
- "./compiler": {
37
- "import": "./dist/compiler.js",
38
- "require": "./dist/compiler.cjs",
39
- "types": "./dist/compiler.d.ts"
40
- },
41
- "./server": {
42
- "import": "./dist/server.js",
43
- "types": "./dist/server.d.ts"
44
- }
45
- },
46
- "files": [
47
- "dist",
48
- "out",
49
- "scripts",
50
- "!dist/*.map",
51
- "README.md",
52
- "LICENSE",
53
- "CHANGELOG.md"
54
- ],
55
- "publishConfig": {
56
- "access": "public"
57
- },
58
- "keywords": [
59
- "flow",
60
- "visual-programming",
61
- "ast",
62
- "compiler",
63
- "decompiler",
64
- "typescript",
65
- "code-generator",
66
- "workflow",
67
- "api-builder",
68
- "next.js"
69
- ],
70
- "author": "timo9378",
71
- "license": "MIT",
72
- "repository": {
73
- "type": "git",
74
- "url": "git+https://github.com/timo9378/flow2code.git"
75
- },
76
- "homepage": "https://github.com/timo9378/flow2code#readme",
77
- "engines": {
78
- "node": ">=20.0.0"
79
- },
80
- "bugs": {
81
- "url": "https://github.com/timo9378/flow2code/issues"
82
- },
83
- "packageManager": "pnpm@10.28.0",
84
- "dependencies": {
85
- "chokidar": "^5.0.0",
86
- "commander": "^14.0.3",
87
- "picocolors": "^1.1.1",
88
- "ts-morph": "^27.0.2",
89
- "yaml": "^2.8.2"
90
- },
91
- "devDependencies": {
92
- "@eslint/js": "^10.0.1",
93
- "@tailwindcss/postcss": "^4.2.1",
94
- "@types/node": "^25.3.1",
95
- "@types/react": "^19.2.14",
96
- "@types/react-dom": "^19.2.3",
97
- "@vitejs/plugin-react": "^5.1.4",
98
- "@xyflow/react": "^12.10.1",
99
- "class-variance-authority": "^0.7.1",
100
- "clsx": "^2.1.1",
101
- "cmdk": "^1.1.1",
102
- "eslint": "^10.0.2",
103
- "globals": "^17.3.0",
104
- "lucide-react": "^0.575.0",
105
- "next": "^16.1.6",
106
- "postcss": "^8.5.6",
107
- "prettier": "^3.8.1",
108
- "radix-ui": "^1.4.3",
109
- "react": "^19.2.4",
110
- "react-dom": "^19.2.4",
111
- "shadcn": "^3.8.5",
112
- "tailwind-merge": "^3.5.0",
113
- "tailwindcss": "^4.2.1",
114
- "tsup": "^8.5.1",
115
- "tsx": "^4.21.0",
116
- "tw-animate-css": "^1.4.0",
117
- "typedoc": "^0.28.17",
118
- "typedoc-plugin-markdown": "^4.10.0",
119
- "typescript": "^5.9.3",
120
- "typescript-eslint": "^8.56.1",
121
- "vitest": "^4.0.18",
122
- "zustand": "^5.0.11"
123
- }
124
- }
1
+ {
2
+ "name": "@timo9378/flow2code",
3
+ "version": "0.2.0",
4
+ "description": "Visual AST Compiler: Flow-based visual editor that compiles to native TypeScript code",
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "main": "./dist/compiler.js",
8
+ "module": "./dist/compiler.js",
9
+ "types": "./dist/compiler.d.ts",
10
+ "scripts": {
11
+ "dev": "next dev --turbopack",
12
+ "dev:server": "tsx src/server/index.ts",
13
+ "build": "pnpm build:ui && pnpm build:cli",
14
+ "build:ui": "next build",
15
+ "build:cli": "tsup && cp src/server/server.d.ts dist/server.d.ts",
16
+ "start": "node dist/server.js",
17
+ "lint": "eslint .",
18
+ "test": "vitest",
19
+ "test:run": "vitest run",
20
+ "test:e2e": "playwright test",
21
+ "test:e2e:ui": "playwright test --ui",
22
+ "precheck": "pnpm lint && pnpm test:run && pnpm build:cli",
23
+ "docs:api": "typedoc",
24
+ "compile": "node --loader ts-node/esm src/cli/index.ts compile",
25
+ "watch": "node --loader ts-node/esm src/cli/index.ts watch",
26
+ "prepublishOnly": "pnpm build",
27
+ "postinstall": "node scripts/postinstall.cjs || true"
28
+ },
29
+ "bin": {
30
+ "flow2code": "dist/cli.js"
31
+ },
32
+ "exports": {
33
+ ".": {
34
+ "import": "./dist/compiler.js",
35
+ "require": "./dist/compiler.cjs",
36
+ "types": "./dist/compiler.d.ts"
37
+ },
38
+ "./compiler": {
39
+ "import": "./dist/compiler.js",
40
+ "require": "./dist/compiler.cjs",
41
+ "types": "./dist/compiler.d.ts"
42
+ },
43
+ "./server": {
44
+ "import": "./dist/server.js",
45
+ "types": "./dist/server.d.ts"
46
+ }
47
+ },
48
+ "files": [
49
+ "dist",
50
+ "out",
51
+ "scripts",
52
+ "!dist/*.map",
53
+ "README.md",
54
+ "LICENSE",
55
+ "CHANGELOG.md"
56
+ ],
57
+ "publishConfig": {
58
+ "access": "public"
59
+ },
60
+ "keywords": [
61
+ "flow",
62
+ "visual-programming",
63
+ "ast",
64
+ "compiler",
65
+ "decompiler",
66
+ "typescript",
67
+ "code-generator",
68
+ "workflow",
69
+ "api-builder",
70
+ "next.js"
71
+ ],
72
+ "author": "timo9378",
73
+ "license": "MIT",
74
+ "repository": {
75
+ "type": "git",
76
+ "url": "git+https://github.com/timo9378/flow2code.git"
77
+ },
78
+ "homepage": "https://github.com/timo9378/flow2code#readme",
79
+ "engines": {
80
+ "node": ">=20.0.0"
81
+ },
82
+ "bugs": {
83
+ "url": "https://github.com/timo9378/flow2code/issues"
84
+ },
85
+ "packageManager": "pnpm@10.28.0",
86
+ "dependencies": {
87
+ "@monaco-editor/react": "^4.7.0",
88
+ "chokidar": "^5.0.0",
89
+ "commander": "^14.0.3",
90
+ "monaco-editor": "^0.55.1",
91
+ "picocolors": "^1.1.1",
92
+ "ts-morph": "^27.0.2",
93
+ "yaml": "^2.8.2"
94
+ },
95
+ "devDependencies": {
96
+ "@eslint/js": "^10.0.1",
97
+ "@playwright/test": "^1.58.2",
98
+ "@tailwindcss/postcss": "^4.2.1",
99
+ "@types/node": "^25.3.1",
100
+ "@types/react": "^19.2.14",
101
+ "@types/react-dom": "^19.2.3",
102
+ "@vitejs/plugin-react": "^5.1.4",
103
+ "@xyflow/react": "^12.10.1",
104
+ "class-variance-authority": "^0.7.1",
105
+ "clsx": "^2.1.1",
106
+ "cmdk": "^1.1.1",
107
+ "eslint": "^10.0.2",
108
+ "globals": "^17.3.0",
109
+ "lucide-react": "^0.575.0",
110
+ "next": "^16.1.6",
111
+ "next-devtools-mcp": "^0.3.10",
112
+ "postcss": "^8.5.6",
113
+ "prettier": "^3.8.1",
114
+ "radix-ui": "^1.4.3",
115
+ "react": "^19.2.4",
116
+ "react-dom": "^19.2.4",
117
+ "shadcn": "^3.8.5",
118
+ "tailwind-merge": "^3.5.0",
119
+ "tailwindcss": "^4.2.1",
120
+ "tsup": "^8.5.1",
121
+ "tsx": "^4.21.0",
122
+ "tw-animate-css": "^1.4.0",
123
+ "typedoc": "^0.28.17",
124
+ "typedoc-plugin-markdown": "^4.10.0",
125
+ "typescript": "^5.9.3",
126
+ "typescript-eslint": "^8.56.1",
127
+ "vitest": "^4.0.18",
128
+ "zustand": "^5.0.11"
129
+ }
130
+ }
@@ -1,125 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,45966,e=>{"use strict";var t=e.i(9698);function a(){return void 0!==t.default&&t.default.env?.NEXT_PUBLIC_API_URL?t.default.env.NEXT_PUBLIC_API_URL.replace(/\/$/,""):""}e.s(["getApiBase",()=>a])},44497,e=>{"use strict";let t=`You are Flow2Code AI, a specialist in generating FlowIR JSON for a visual API builder.
2
-
3
- ## Your Task
4
- Given a user's natural language description of an API endpoint or workflow, generate a valid FlowIR JSON object.
5
-
6
- ## FlowIR Schema
7
-
8
- ### Top-level structure:
9
- \`\`\`json
10
- {
11
- "version": "1.0.0",
12
- "meta": {
13
- "name": "string",
14
- "description": "string (optional)",
15
- "createdAt": "ISO 8601 date string",
16
- "updatedAt": "ISO 8601 date string"
17
- },
18
- "nodes": [ ... ],
19
- "edges": [ ... ]
20
- }
21
- \`\`\`
22
-
23
- ### Node structure:
24
- \`\`\`json
25
- {
26
- "id": "unique_string (e.g. trigger_1, fetch_1, response_1)",
27
- "nodeType": "one of the NodeType enums below",
28
- "category": "trigger | action | logic | variable | output",
29
- "label": "human readable label",
30
- "params": { ... type-specific params ... },
31
- "inputs": [{ "id": "string", "label": "string", "dataType": "string|number|boolean|object|array|any|void|Response", "required": boolean }],
32
- "outputs": [{ "id": "string", "label": "string", "dataType": "string|number|boolean|object|array|any|void|Response" }]
33
- }
34
- \`\`\`
35
-
36
- ### Edge structure:
37
- \`\`\`json
38
- {
39
- "id": "unique_string (e.g. e1, e2)",
40
- "sourceNodeId": "node id",
41
- "sourcePortId": "output port id",
42
- "targetNodeId": "node id",
43
- "targetPortId": "input port id"
44
- }
45
- \`\`\`
46
-
47
- ### Available Node Types:
48
-
49
- #### Triggers (category: "trigger") — exactly ONE required per flow:
50
- 1. **http_webhook** — params: { method: "GET"|"POST"|"PUT"|"PATCH"|"DELETE", routePath: "/api/...", parseBody: boolean }
51
- - outputs: [{ id: "request", label: "Request", dataType: "object" }, { id: "body", label: "Body", dataType: "object" }, { id: "query", label: "Query", dataType: "object" }]
52
- - inputs: none
53
-
54
- 2. **cron_job** — params: { schedule: "cron expression", functionName: "string" }
55
- - outputs: [{ id: "output", label: "Output", dataType: "any" }]
56
-
57
- 3. **manual** — params: { functionName: "string", args: [{ name: "string", type: "FlowDataType" }] }
58
- - outputs: [{ id: "output", label: "Output", dataType: "any" }]
59
-
60
- #### Actions (category: "action"):
61
- 4. **fetch_api** — params: { url: "string (supports \${ENV_VAR})", method: "GET"|"POST"|"PUT"|"PATCH"|"DELETE", headers?: {}, body?: "string", parseJson: boolean }
62
- - inputs: [{ id: "input", label: "Input", dataType: "any", required: false }]
63
- - outputs: [{ id: "response", label: "Response", dataType: "object" }, { id: "data", label: "Data", dataType: "any" }]
64
-
65
- 5. **sql_query** — params: { orm: "drizzle"|"prisma"|"raw", query: "SQL string", params?: [] }
66
- - inputs: [{ id: "input", label: "Input", dataType: "any", required: false }]
67
- - outputs: [{ id: "result", label: "Result", dataType: "array" }]
68
-
69
- 6. **redis_cache** — params: { operation: "get"|"set"|"del", key: "string", value?: "string", ttl?: number }
70
- - inputs: [{ id: "input", label: "Input", dataType: "any", required: false }]
71
- - outputs: [{ id: "value", label: "Value", dataType: "any" }]
72
-
73
- 7. **custom_code** — params: { code: "TypeScript code", returnVariable?: "string" }
74
- - inputs: [{ id: "input", label: "Input", dataType: "any", required: false }]
75
- - outputs: [{ id: "result", label: "Result", dataType: "any" }]
76
-
77
- #### Logic (category: "logic"):
78
- 8. **if_else** — params: { condition: "TypeScript expression" }
79
- - inputs: [{ id: "input", label: "Input", dataType: "any", required: true }]
80
- - outputs: [{ id: "true", label: "True", dataType: "any" }, { id: "false", label: "False", dataType: "any" }]
81
-
82
- 9. **for_loop** — params: { iterableExpression: "string", itemVariable: "string", indexVariable?: "string" }
83
- - inputs: [{ id: "iterable", label: "Iterable", dataType: "array", required: true }]
84
- - outputs: [{ id: "item", label: "Item", dataType: "any" }, { id: "result", label: "Result", dataType: "array" }]
85
-
86
- 10. **try_catch** — params: { errorVariable: "string" }
87
- - inputs: [{ id: "input", label: "Input", dataType: "any", required: true }]
88
- - outputs: [{ id: "success", label: "Success", dataType: "any" }, { id: "error", label: "Error", dataType: "object" }]
89
-
90
- 11. **promise_all** — params: {}
91
- - inputs: [{ id: "task1", label: "Task 1", dataType: "any", required: true }, { id: "task2", label: "Task 2", dataType: "any", required: true }]
92
- - outputs: [{ id: "results", label: "Results", dataType: "array" }]
93
-
94
- #### Variables (category: "variable"):
95
- 12. **declare** — params: { name: "string", dataType: "FlowDataType", initialValue?: "expression", isConst: boolean }
96
- - outputs: [{ id: "value", label: "Value", dataType: "any" }]
97
-
98
- 13. **transform** — params: { expression: "TypeScript expression" }
99
- - inputs: [{ id: "input", label: "Input", dataType: "any", required: true }]
100
- - outputs: [{ id: "output", label: "Output", dataType: "any" }]
101
-
102
- #### Output (category: "output"):
103
- 14. **return_response** — params: { statusCode: number, bodyExpression: "JS expression string", headers?: {} }
104
- - inputs: [{ id: "data", label: "Data", dataType: "any", required: true }]
105
-
106
- ## Variable Reference System
107
- - Nodes access previous node's output via: flowState['nodeId']
108
- - In params like condition or bodyExpression, use: flowState['nodeId'] directly
109
- - For environment variables in URLs, use: \${ENV_VAR_NAME}
110
-
111
- ## Rules
112
- 1. There must be EXACTLY ONE trigger node
113
- 2. All node IDs must be unique
114
- 3. Edges must reference valid node IDs and port IDs
115
- 4. No cycles allowed in the graph
116
- 5. STRICT RULE: Every non-trigger node MUST be connected via an edge. For parallel execution branches, you MUST create separate edges connecting the trigger's output to EACH parallel node's input. Do NOT leave any node orphaned!
117
- 6. Use descriptive labels for nodes
118
- 7. Generate sensible default values
119
- 8. For HTTP APIs that receive data, use parseBody: true with POST/PUT/PATCH methods
120
- 9. Always end HTTP flows with a return_response node
121
- 10. Use meaningful nodeId naming like "trigger_1", "fetch_users", "check_auth", "response_ok"
122
-
123
- ## Output
124
- Return ONLY valid JSON (no markdown, no explanation). The JSON must conform to the FlowIR schema above.
125
- `;e.s(["EXAMPLE_PROMPTS",0,["Create a GET /api/users endpoint that fetches the user list from https://jsonplaceholder.typicode.com/users and returns it","Create a POST /api/auth/login endpoint that accepts email and password, validates them, and returns a JWT token","Create a GET /api/weather endpoint that calls a weather API and an air quality API in parallel, then merges and returns the results","Create a POST /api/orders endpoint that accepts order data, writes it to the database, and sends a notification","Create a scheduled task that checks the database for expired orders every hour and updates their status"],"FLOW_IR_SYSTEM_PROMPT",0,t])},94501,68773,e=>{"use strict";let t="1.0.0";var a,r,s,o,n,i,d=((a={}).TRIGGER="trigger",a.ACTION="action",a.LOGIC="logic",a.VARIABLE="variable",a.OUTPUT="output",a),l=((r={}).HTTP_WEBHOOK="http_webhook",r.CRON_JOB="cron_job",r.MANUAL="manual",r),u=((s={}).FETCH_API="fetch_api",s.SQL_QUERY="sql_query",s.REDIS_CACHE="redis_cache",s.CUSTOM_CODE="custom_code",s.CALL_SUBFLOW="call_subflow",s),p=((o={}).IF_ELSE="if_else",o.FOR_LOOP="for_loop",o.TRY_CATCH="try_catch",o.PROMISE_ALL="promise_all",o),c=((n={}).DECLARE="declare",n.TRANSFORM="transform",n),g=((i={}).RETURN_RESPONSE="return_response",i);e.s(["ActionType",()=>u,"CURRENT_IR_VERSION",0,t,"LogicType",()=>p,"NodeCategory",()=>d,"OutputType",()=>g,"TriggerType",()=>l,"VariableType",()=>c],68773);let y=[];class T extends Error{fromVersion;targetVersion;constructor(e,t,a){super(e),this.fromVersion=t,this.targetVersion=a,this.name="MigrationError"}}function m(e){let a,r=[];if(!e||"object"!=typeof e)return{valid:!1,errors:[{code:"INVALID_INPUT",message:"IR input must be a non-null object"}]};if(!Array.isArray(e.nodes))return{valid:!1,errors:[{code:"MISSING_NODES",message:"IR is missing required 'nodes' array"}]};if(!Array.isArray(e.edges))return{valid:!1,errors:[{code:"MISSING_EDGES",message:"IR is missing required 'edges' array"}]};let s=e,o=!1;if(function(e,a=t){return e!==a}(e.version))try{let r=function(e,a=t){let r=[],s={...e};if(s.version===a)return{ir:s,applied:r,migrated:!1};let o=y.length+1,n=0;for(;s.version!==a;){if(n++>o)throw new T(`Migration exceeded max iterations (${o}), possible circular migration`,s.version,a);let e=y.find(e=>e.fromVersion===s.version);if(!e)throw new T(`No migration path found from ${s.version} to ${a}`,s.version,a);s=e.migrate(s),r.push(`${e.fromVersion} → ${e.toVersion}: ${e.description}`)}return{ir:s,applied:r,migrated:!0}}({version:e.version,meta:e.meta,nodes:e.nodes,edges:e.edges},t);r.migrated&&(s=r.ir,o=!0,a=r.applied)}catch(t){t instanceof T?r.push({code:"MIGRATION_FAILED",message:`IR version migration failed: ${t.message}`}):r.push({code:"INVALID_VERSION",message:`Unsupported IR version: ${e.version}`})}o||s.version===t||r.push({code:"INVALID_VERSION",message:`Unsupported IR version: ${s.version} (current: ${t})`});let n=new Map(s.nodes.map(e=>[e.id,e])),i=s.nodes.filter(e=>e.category===d.TRIGGER);0===i.length&&r.push({code:"NO_TRIGGER",message:"Workflow must contain at least one trigger node"}),i.length>1&&r.push({code:"MULTIPLE_TRIGGERS",message:`Workflow must have exactly one trigger, found ${i.length}`});let l=new Set;for(let e of s.nodes)l.has(e.id)&&r.push({code:"DUPLICATE_NODE_ID",message:`Duplicate node ID: ${e.id}`,nodeId:e.id}),l.add(e.id);for(let e of s.edges)n.has(e.sourceNodeId)||r.push({code:"INVALID_EDGE_SOURCE",message:`Edge "${e.id}" references non-existent source node "${e.sourceNodeId}"`,edgeId:e.id}),n.has(e.targetNodeId)||r.push({code:"INVALID_EDGE_TARGET",message:`Edge "${e.id}" references non-existent target node "${e.targetNodeId}"`,edgeId:e.id});let u=function(e,t){let a=[],r=new Map;for(let t of e)r.set(t.id,[]);for(let e of t)r.get(e.sourceNodeId)?.push(e.targetNodeId);let s=new Map;for(let t of e)s.set(t.id,0);for(let t of e){if(0!==s.get(t.id))continue;let e=[[t.id,0]];for(s.set(t.id,1);e.length>0;){let t=e[e.length-1],[o,n]=t,i=r.get(o)??[];if(n>=i.length){s.set(o,2),e.pop();continue}t[1]=n+1;let d=i[n];1===s.get(d)?a.push({code:"CYCLE_DETECTED",message:`Cycle detected: node "${o}" → "${d}"`,nodeId:o}):0===s.get(d)&&(s.set(d,1),e.push([d,0]))}}return a}(s.nodes,s.edges);r.push(...u);let p=new Set;for(let e of s.edges)p.add(e.sourceNodeId),p.add(e.targetNodeId);for(let e of s.nodes)e.category===d.TRIGGER||p.has(e.id)||r.push({code:"ORPHAN_NODE",message:`Node "${e.id}" (${e.label}) is not connected to any other node`,nodeId:e.id});return{valid:0===r.length,errors:r,migrated:o,migratedIR:o?s:void 0,migrationLog:a}}e.s(["validateFlowIR",()=>m],94501)},29641,e=>{e.v(e=>Promise.resolve().then(()=>e(44497)))},30679,e=>{e.v(e=>Promise.resolve().then(()=>e(94501)))},98984,e=>{e.v(e=>Promise.resolve().then(()=>e(45966)))},9830,e=>{e.v(t=>Promise.all(["static/chunks/4ce13068a7e61854.js"].map(t=>e.l(t))).then(()=>t(33958)))}]);