@timo9378/flow2code 0.1.9 → 0.2.1
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 +28 -0
- package/README.md +15 -2
- package/dist/cli.js +74 -7
- 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 +1227 -1010
- 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 → dSp6-CaehEDKVU9OSJABu}/_buildManifest.js +0 -0
- /package/out/_next/static/{Ma0MmC8j1mxpQbtLwNajF → dSp6-CaehEDKVU9OSJABu}/_clientMiddlewareManifest.json +0 -0
- /package/out/_next/static/{Ma0MmC8j1mxpQbtLwNajF → dSp6-CaehEDKVU9OSJABu}/_ssgManifest.js +0 -0
package/out/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--dSp6_CaehEDKVU9OSJABu--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/6167fccccde2e675.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/b3419ee3e3a616d9.js"/><script src="/_next/static/chunks/98d53aae29c36c6b.js" async=""></script><script src="/_next/static/chunks/1570e9ba5f1b44ed.js" async=""></script><script src="/_next/static/chunks/turbopack-9da9810f42c97265.js" async=""></script><script src="/_next/static/chunks/be40d79540010a0d.js" async=""></script><script src="/_next/static/chunks/b05daf00cdc6058f.js" async=""></script><script src="/_next/static/chunks/8091c1216a95d294.js" async=""></script><script src="/_next/static/chunks/7cd04052abfadac1.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Flow2Code | Visual AST Compiler</title><meta name="description" content="Visual backend logic generator: compile canvas nodes directly into native TypeScript code"/><link rel="manifest" href="/site.webmanifest"/><link rel="icon" href="/favicon.ico" sizes="any"/><link rel="icon" href="/favicon-16x16.png" sizes="16x16" type="image/png"/><link rel="icon" href="/favicon-32x32.png" sizes="32x32" type="image/png"/><link rel="apple-touch-icon" href="/apple-touch-icon.png"/><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="antialiased overflow-hidden"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/b3419ee3e3a616d9.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[46798,[\"/_next/static/chunks/be40d79540010a0d.js\"],\"TooltipProvider\"]\n3:I[94482,[\"/_next/static/chunks/b05daf00cdc6058f.js\",\"/_next/static/chunks/8091c1216a95d294.js\"],\"default\"]\n4:I[58298,[\"/_next/static/chunks/be40d79540010a0d.js\",\"/_next/static/chunks/7cd04052abfadac1.js\"],\"default\"]\n5:I[22544,[\"/_next/static/chunks/b05daf00cdc6058f.js\",\"/_next/static/chunks/8091c1216a95d294.js\"],\"default\"]\n6:I[61686,[\"/_next/static/chunks/b05daf00cdc6058f.js\",\"/_next/static/chunks/8091c1216a95d294.js\"],\"OutletBoundary\"]\n7:\"$Sreact.suspense\"\n9:I[61686,[\"/_next/static/chunks/b05daf00cdc6058f.js\",\"/_next/static/chunks/8091c1216a95d294.js\"],\"ViewportBoundary\"]\nb:I[61686,[\"/_next/static/chunks/b05daf00cdc6058f.js\",\"/_next/static/chunks/8091c1216a95d294.js\"],\"MetadataBoundary\"]\nd:I[63491,[\"/_next/static/chunks/b05daf00cdc6058f.js\",\"/_next/static/chunks/8091c1216a95d294.js\"],\"default\"]\n:HL[\"/_next/static/chunks/6167fccccde2e675.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"dSp6-CaehEDKVU9OSJABu\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"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\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style\",\"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\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@8\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L9\",null,{\"children\":\"$La\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"$7\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lc\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[]],\"S\":true}\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[67671,[\"/_next/static/chunks/b05daf00cdc6058f.js\",\"/_next/static/chunks/8091c1216a95d294.js\"],\"IconMark\"]\n8:null\nc:[[\"$\",\"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\"}],[\"$\",\"$Le\",\"7\",{}]]\n"])</script></body></html>
|
package/out/__next.__PAGE__.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
|
-
2:I[
|
|
3
|
-
3:I[52683,["/_next/static/chunks/
|
|
4
|
-
6:I[
|
|
2
|
+
2:I[39308,["/_next/static/chunks/b05daf00cdc6058f.js","/_next/static/chunks/8091c1216a95d294.js"],"ClientPageRoot"]
|
|
3
|
+
3:I[52683,["/_next/static/chunks/be40d79540010a0d.js","/_next/static/chunks/05328cd26bdc795c.js","/_next/static/chunks/1011f174944c0ca2.js"],"default"]
|
|
4
|
+
6:I[61686,["/_next/static/chunks/b05daf00cdc6058f.js","/_next/static/chunks/8091c1216a95d294.js"],"OutletBoundary"]
|
|
5
5
|
7:"$Sreact.suspense"
|
|
6
6
|
:HL["/_next/static/chunks/8a5bd6fe3abc8091.css","style"]
|
|
7
|
-
0:{"buildId":"
|
|
7
|
+
0:{"buildId":"dSp6-CaehEDKVU9OSJABu","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/8a5bd6fe3abc8091.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/05328cd26bdc795c.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/1011f174944c0ca2.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false}
|
|
8
8
|
4:{}
|
|
9
9
|
5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
|
|
10
10
|
8:null
|
package/out/__next._full.txt
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
|
-
2:I[46798,["/_next/static/chunks/
|
|
3
|
-
3:I[
|
|
4
|
-
4:I[58298,["/_next/static/chunks/
|
|
5
|
-
5:I[
|
|
6
|
-
6:I[
|
|
7
|
-
7:I[52683,["/_next/static/chunks/
|
|
8
|
-
a:I[
|
|
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[
|
|
11
|
-
f:I[
|
|
12
|
-
11:I[63491,["/_next/static/chunks/
|
|
13
|
-
:HL["/_next/static/chunks/
|
|
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":"
|
|
15
|
+
0:{"P":null,"b":"dSp6-CaehEDKVU9OSJABu","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[
|
|
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/out/__next._head.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
|
-
2:I[
|
|
3
|
-
3:I[
|
|
2
|
+
2:I[61686,["/_next/static/chunks/b05daf00cdc6058f.js","/_next/static/chunks/8091c1216a95d294.js"],"ViewportBoundary"]
|
|
3
|
+
3:I[61686,["/_next/static/chunks/b05daf00cdc6058f.js","/_next/static/chunks/8091c1216a95d294.js"],"MetadataBoundary"]
|
|
4
4
|
4:"$Sreact.suspense"
|
|
5
|
-
5:I[
|
|
6
|
-
0:{"buildId":"
|
|
5
|
+
5:I[67671,["/_next/static/chunks/b05daf00cdc6058f.js","/_next/static/chunks/8091c1216a95d294.js"],"IconMark"]
|
|
6
|
+
0:{"buildId":"dSp6-CaehEDKVU9OSJABu","rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","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"}],["$","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"}],["$","$L5","7",{}]]}]}]}],null]}],"loading":null,"isPartial":false}
|
package/out/__next._index.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
|
-
2:I[46798,["/_next/static/chunks/
|
|
3
|
-
3:I[
|
|
4
|
-
4:I[58298,["/_next/static/chunks/
|
|
5
|
-
5:I[
|
|
6
|
-
:HL["/_next/static/chunks/
|
|
7
|
-
0:{"buildId":"
|
|
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
|
+
:HL["/_next/static/chunks/6167fccccde2e675.css","style"]
|
|
7
|
+
0:{"buildId":"dSp6-CaehEDKVU9OSJABu","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/6167fccccde2e675.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/be40d79540010a0d.js","async":true}]],["$","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,{}],"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."}]}]]}]}]],[]]}]}]}]}]]}],"loading":null,"isPartial":false}
|
package/out/__next._tree.txt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
:HL["/_next/static/chunks/
|
|
1
|
+
:HL["/_next/static/chunks/6167fccccde2e675.css","style"]
|
|
2
2
|
:HL["/_next/static/chunks/8a5bd6fe3abc8091.css","style"]
|
|
3
|
-
0:{"buildId":"
|
|
3
|
+
0:{"buildId":"dSp6-CaehEDKVU9OSJABu","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,45966,e=>{"use strict";var t=e.i(86983);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])},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 m extends Error{fromVersion;targetVersion;constructor(e,t,a){super(e),this.fromVersion=t,this.targetVersion=a,this.name="MigrationError"}}function T(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 m(`Migration exceeded max iterations (${o}), possible circular migration`,s.version,a);let e=y.find(e=>e.fromVersion===s.version);if(!e)throw new m(`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 m?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);let u=new Set;for(let e of s.edges)u.has(e.id)&&r.push({code:"DUPLICATE_EDGE_ID",message:`Duplicate edge ID: ${e.id}`,edgeId:e.id}),u.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 p=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(...p);let c=new Set;for(let e of s.edges)c.add(e.sourceNodeId),c.add(e.targetNodeId);for(let e of s.nodes)e.category===d.TRIGGER||c.has(e.id)||r.push({code:"ORPHAN_NODE",message:`Node "${e.id}" (${e.label}) is not connected to any other node`,nodeId:e.id});for(let e of s.edges){var g,T;let t=n.get(e.sourceNodeId),a=n.get(e.targetNodeId);if(!t||!a)continue;let s=t.outputs?.find(t=>t.id===e.sourcePortId),o=a.inputs?.find(t=>t.id===e.targetPortId);s&&o&&(g=s.dataType,g!==(T=o.dataType)&&"any"!==g&&"any"!==T&&("object"!==T||"array"!==g)&&("string"!==T||"number"!==g)&&("number"!==T||"string"!==g))&&r.push({code:"TYPE_MISMATCH",message:`Type mismatch on edge "${e.id}": output "${s.label}" (${s.dataType}) → input "${o.label}" (${o.dataType})`,edgeId:e.id,severity:"warning"})}return{valid:0===r.filter(e=>"warning"!==e.severity&&"info"!==e.severity).length,errors:r,migrated:o,migratedIR:o?s:void 0,migrationLog:a}}e.s(["validateFlowIR",()=>T],94501)},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
|
+
`,a=`You are Flow2Code AI Refactor, a specialist in optimizing FlowIR subgraphs.
|
|
126
|
+
|
|
127
|
+
## Your Task
|
|
128
|
+
The user will provide:
|
|
129
|
+
1. A partial FlowIR (subset of nodes and their connecting edges)
|
|
130
|
+
2. A natural language instruction describing how to refactor it
|
|
131
|
+
|
|
132
|
+
You must return a valid partial FlowIR JSON that replaces the given nodes.
|
|
133
|
+
|
|
134
|
+
## Rules
|
|
135
|
+
1. Preserve existing input/output port IDs that connect to nodes OUTSIDE the selection
|
|
136
|
+
2. Keep node IDs stable where possible (rename only when merging/splitting)
|
|
137
|
+
3. All edges must reference valid node IDs and port IDs
|
|
138
|
+
4. Return ONLY valid JSON (no markdown, no explanation)
|
|
139
|
+
5. The result must be a drop-in replacement for the selected subgraph
|
|
140
|
+
|
|
141
|
+
## Output Format
|
|
142
|
+
\`\`\`json
|
|
143
|
+
{
|
|
144
|
+
"nodes": [ ... ],
|
|
145
|
+
"edges": [ ... ]
|
|
146
|
+
}
|
|
147
|
+
\`\`\`
|
|
148
|
+
`,r=`You are Flow2Code AI, a specialist in converting source code into FlowIR JSON for a visual API builder.
|
|
149
|
+
|
|
150
|
+
## Your Task
|
|
151
|
+
Given a code snippet (TypeScript, JavaScript, Python, or any language), analyze its logic and generate the equivalent FlowIR JSON.
|
|
152
|
+
|
|
153
|
+
## Conversion Guidelines
|
|
154
|
+
1. Identify the entry point (HTTP handler, exported function, main) → map to a trigger node
|
|
155
|
+
2. External API calls → fetch_api nodes
|
|
156
|
+
3. Database queries → sql_query nodes
|
|
157
|
+
4. Conditionals (if/else, switch) → if_else nodes
|
|
158
|
+
5. Loops (for, while, map) → for_loop nodes
|
|
159
|
+
6. Variable declarations → declare nodes
|
|
160
|
+
7. Data transformations → transform nodes
|
|
161
|
+
8. Error handling (try/catch) → try_catch nodes
|
|
162
|
+
9. Response/return statements → return_response nodes
|
|
163
|
+
10. Concurrent operations (Promise.all) → promise_all nodes
|
|
164
|
+
|
|
165
|
+
## FlowIR Schema
|
|
166
|
+
(Same schema as FLOW_IR_SYSTEM_PROMPT — nodes, edges, meta)
|
|
167
|
+
|
|
168
|
+
## Rules
|
|
169
|
+
1. There must be EXACTLY ONE trigger node
|
|
170
|
+
2. All node IDs must be unique
|
|
171
|
+
3. Every non-trigger node must be connected via edges
|
|
172
|
+
4. No cycles allowed
|
|
173
|
+
5. Preserve the original code's logic faithfully
|
|
174
|
+
6. Use descriptive labels extracted from the code
|
|
175
|
+
7. Return ONLY valid JSON (no markdown, no explanation)
|
|
176
|
+
`;e.s(["CODE_TO_FLOW_PROMPT",0,r,"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_REFACTOR_PROMPT",0,a,"FLOW_IR_SYSTEM_PROMPT",0,t])},82824,e=>{e.v(t=>Promise.all(["static/chunks/06e01c846ae01892.js"].map(t=>e.l(t))).then(()=>t(69739)))},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)))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,69739,e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function c(e){return function t(){for(var r=this,n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return t.apply(r,[].concat(o,n))}}}function u(e){return({}).toString.call(e).includes("Object")}function a(e){return"function"==typeof e}var l,s,f=c(function(e,t){throw Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),d=function(e,t){return u(t)||f("changeType"),Object.keys(t).some(function(t){return!Object.prototype.hasOwnProperty.call(e,t)})&&f("changeField"),t},g=function(e){a(e)||f("selectorType")},p=function(e){a(e)||u(e)||f("handlerType"),u(e)&&Object.values(e).some(function(e){return!a(e)})&&f("handlersType")},h=function(e){e||f("initialIsRequired"),u(e)||f("initialType"),Object.keys(e).length||f("initialContent")};function y(e,t){return a(t)?t(e.current):t}function m(e,t){return e.current=i(i({},e.current),t),t}function v(e,t,r){return a(t)?t(e.current):Object.keys(r).forEach(function(r){var n;return null==(n=t[r])?void 0:n.call(t,e.current[r])}),r}var b={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},O=(l=function(e,t){throw Error(e[t]||e.default)},function e(){for(var t=this,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return n.length>=l.length?l.apply(this,n):function(){for(var r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];return e.apply(t,[].concat(n,o))}})(b),w=function(e){return(e||O("configIsRequired"),({}).toString.call(e).includes("Object")||O("configType"),e.urls)?(console.warn(b.deprecation),{paths:{vs:e.urls.monacoBase}}):e},j=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}},M={type:"cancelation",msg:"operation is manually canceled"};function E(e){var t=!1,r=new Promise(function(r,n){e.then(function(e){return t?n(M):r(e)}),e.catch(n)});return r.cancel=function(){return t=!0},r}var P=["monaco"],R=function(e){if(Array.isArray(e))return e}(s=({create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h(e),p(t);var r={current:e},n=c(v)(r,t),o=c(m)(r),i=c(d)(e),u=c(y)(r);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return g(e),e(r.current)},function(e){(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}})(n,o,i,u)(e)}]}}).create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}))||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,c,u=[],a=!0,l=!1;try{i=(r=r.call(e)).next,!1;for(;!(a=(n=i.call(r)).done)&&(u.push(n.value),2!==u.length);a=!0);}catch(e){l=!0,o=e}finally{try{if(!a&&null!=r.return&&(c=r.return(),Object(c)!==c))return}finally{if(l)throw o}}return u}}(s,2)||function(e,r){if(e){if("string"==typeof e)return t(e,2);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,2):void 0}}(s,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),S=R[0],k=R[1];function T(e){return document.body.appendChild(e)}function C(e){var t,r,n=S(function(e){return{config:e.config,reject:e.reject}}),o=(t="".concat(n.config.paths.vs,"/loader.js"),r=document.createElement("script"),t&&(r.src=t),r);return o.onload=function(){return e()},o.onerror=n.reject,o}function I(){var e=S(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var r=t.m||t;x(r),e.resolve(r)},function(t){e.reject(t)})}function x(e){S().monaco||k({monaco:e})}var A=new Promise(function(e,t){return k({resolve:e,reject:t})}),D={config:function(e){var t=w(e),r=t.monaco,o=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(t,P);k(function(e){return{config:function e(t,r){return Object.keys(r).forEach(function(n){r[n]instanceof Object&&t[n]&&Object.assign(r[n],e(t[n],r[n]))}),n(n({},t),r)}(e.config,o),monaco:r}})},init:function(){var e=S(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(k({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),E(A);if(window.monaco&&window.monaco.editor)return x(window.monaco),e.resolve(window.monaco),E(A);j(T,C)(I)}return E(A)},__getMonacoInstance:function(){return S(function(e){return e.monaco})}},V=e.i(86746),L={display:"flex",position:"relative",textAlign:"initial"},q={width:"100%"},z={display:"none"},N={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"},_=function({children:e}){return V.default.createElement("div",{style:N},e)},U=(0,V.memo)(function({width:e,height:t,isEditorReady:r,loading:n,_ref:o,className:i,wrapperProps:c}){return V.default.createElement("section",{style:{...L,width:e,height:t},...c},!r&&V.default.createElement(_,null,n),V.default.createElement("div",{ref:o,style:{...q,...!r&&z},className:i}))}),F=function(e){(0,V.useEffect)(e,[])},B=function(e,t,r=!0){let n=(0,V.useRef)(!0);(0,V.useEffect)(n.current||!r?()=>{n.current=!1}:e,t)};function K(){}function Y(e,t,r,n){var o,i,c,u,a,l;return o=e,i=n,o.editor.getModel($(o,i))||(c=e,u=t,a=r,l=n,c.editor.createModel(u,a,l?$(c,l):void 0))}function $(e,t){return e.Uri.parse(t)}var G=(0,V.memo)(function({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:o,originalModelPath:i,modifiedModelPath:c,keepCurrentOriginalModel:u=!1,keepCurrentModifiedModel:a=!1,theme:l="light",loading:s="Loading...",options:f={},height:d="100%",width:g="100%",className:p,wrapperProps:h={},beforeMount:y=K,onMount:m=K}){let[v,b]=(0,V.useState)(!1),[O,w]=(0,V.useState)(!0),j=(0,V.useRef)(null),M=(0,V.useRef)(null),E=(0,V.useRef)(null),P=(0,V.useRef)(m),R=(0,V.useRef)(y),S=(0,V.useRef)(!1);F(()=>{let e=D.init();return e.then(e=>(M.current=e)&&w(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>{let t;return j.current?(t=j.current?.getModel(),void(u||t?.original?.dispose(),a||t?.modified?.dispose(),j.current?.dispose())):e.cancel()}}),B(()=>{if(j.current&&M.current){let t=j.current.getOriginalEditor(),o=Y(M.current,e||"",n||r||"text",i||"");o!==t.getModel()&&t.setModel(o)}},[i],v),B(()=>{if(j.current&&M.current){let e=j.current.getModifiedEditor(),n=Y(M.current,t||"",o||r||"text",c||"");n!==e.getModel()&&e.setModel(n)}},[c],v),B(()=>{let e=j.current.getModifiedEditor();e.getOption(M.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],v),B(()=>{j.current?.getModel()?.original.setValue(e||"")},[e],v),B(()=>{let{original:e,modified:t}=j.current.getModel();M.current.editor.setModelLanguage(e,n||r||"text"),M.current.editor.setModelLanguage(t,o||r||"text")},[r,n,o],v),B(()=>{M.current?.editor.setTheme(l)},[l],v),B(()=>{j.current?.updateOptions(f)},[f],v);let k=(0,V.useCallback)(()=>{if(!M.current)return;R.current(M.current);let u=Y(M.current,e||"",n||r||"text",i||""),a=Y(M.current,t||"",o||r||"text",c||"");j.current?.setModel({original:u,modified:a})},[r,t,o,e,n,i,c]),T=(0,V.useCallback)(()=>{!S.current&&E.current&&(j.current=M.current.editor.createDiffEditor(E.current,{automaticLayout:!0,...f}),k(),M.current?.editor.setTheme(l),b(!0),S.current=!0)},[f,l,k]);return(0,V.useEffect)(()=>{v&&P.current(j.current,M.current)},[v]),(0,V.useEffect)(()=>{O||v||T()},[O,v,T]),V.default.createElement(U,{width:g,height:d,isEditorReady:v,loading:s,_ref:E,className:p,wrapperProps:h})}),H=function(){let[e,t]=(0,V.useState)(D.__getMonacoInstance());return F(()=>{let r;return e||(r=D.init()).then(e=>{t(e)}),()=>r?.cancel()}),e},J=function(e){let t=(0,V.useRef)();return(0,V.useEffect)(()=>{t.current=e},[e]),t.current},Q=new Map,W=(0,V.memo)(function({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:o,path:i,theme:c="light",line:u,loading:a="Loading...",options:l={},overrideServices:s={},saveViewState:f=!0,keepCurrentModel:d=!1,width:g="100%",height:p="100%",className:h,wrapperProps:y={},beforeMount:m=K,onMount:v=K,onChange:b,onValidate:O=K}){let[w,j]=(0,V.useState)(!1),[M,E]=(0,V.useState)(!0),P=(0,V.useRef)(null),R=(0,V.useRef)(null),S=(0,V.useRef)(null),k=(0,V.useRef)(v),T=(0,V.useRef)(m),C=(0,V.useRef)(),I=(0,V.useRef)(n),x=J(i),A=(0,V.useRef)(!1),L=(0,V.useRef)(!1);F(()=>{let e=D.init();return e.then(e=>(P.current=e)&&E(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>R.current?void(C.current?.dispose(),d?f&&Q.set(i,R.current.saveViewState()):R.current.getModel()?.dispose(),R.current.dispose()):e.cancel()}),B(()=>{let c=Y(P.current,e||n||"",t||o||"",i||r||"");c!==R.current?.getModel()&&(f&&Q.set(x,R.current?.saveViewState()),R.current?.setModel(c),f&&R.current?.restoreViewState(Q.get(i)))},[i],w),B(()=>{R.current?.updateOptions(l)},[l],w),B(()=>{R.current&&void 0!==n&&(R.current.getOption(P.current.editor.EditorOption.readOnly)?R.current.setValue(n):n!==R.current.getValue()&&(L.current=!0,R.current.executeEdits("",[{range:R.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),R.current.pushUndoStop(),L.current=!1))},[n],w),B(()=>{let e=R.current?.getModel();e&&o&&P.current?.editor.setModelLanguage(e,o)},[o],w),B(()=>{void 0!==u&&R.current?.revealLine(u)},[u],w),B(()=>{P.current?.editor.setTheme(c)},[c],w);let q=(0,V.useCallback)(()=>{if(!(!S.current||!P.current)&&!A.current){T.current(P.current);let a=i||r,d=Y(P.current,n||e||"",t||o||"",a||"");R.current=P.current?.editor.create(S.current,{model:d,automaticLayout:!0,...l},s),f&&R.current.restoreViewState(Q.get(a)),P.current.editor.setTheme(c),void 0!==u&&R.current.revealLine(u),j(!0),A.current=!0}},[e,t,r,n,o,i,l,s,f,c,u]);return(0,V.useEffect)(()=>{w&&k.current(R.current,P.current)},[w]),(0,V.useEffect)(()=>{M||w||q()},[M,w,q]),I.current=n,(0,V.useEffect)(()=>{w&&b&&(C.current?.dispose(),C.current=R.current?.onDidChangeModelContent(e=>{L.current||b(R.current.getValue(),e)}))},[w,b]),(0,V.useEffect)(()=>{if(w){let e=P.current.editor.onDidChangeMarkers(e=>{let t=R.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=P.current.editor.getModelMarkers({resource:t});O?.(e)}});return()=>{e?.dispose()}}return()=>{}},[w,O]),V.default.createElement(U,{width:g,height:p,isEditorReady:w,loading:a,_ref:S,className:h,wrapperProps:y})});e.s(["DiffEditor",()=>G,"Editor",()=>W,"default",()=>W,"useMonaco",()=>H],50282),e.i(50282),e.s(["DiffEditor",()=>G,"Editor",()=>W,"default",()=>W,"loader",()=>D,"useMonaco",()=>H],69739)}]);
|