funcnodes-react-flow 0.3.7__py3-none-any.whl → 0.3.10__py3-none-any.whl
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.
- funcnodes_react_flow/__init__.py +5 -1
- funcnodes_react_flow/__main__.py +14 -11
- funcnodes_react_flow/run.py +12 -10
- funcnodes_react_flow/static/css/style.css +1744 -40
- funcnodes_react_flow/static/index.html +56 -1
- funcnodes_react_flow/static/js/index.js +106 -0
- funcnodes_react_flow/static/js/index.js.map +1 -0
- {funcnodes_react_flow-0.3.7.dist-info → funcnodes_react_flow-0.3.10.dist-info}/METADATA +2 -2
- funcnodes_react_flow-0.3.10.dist-info/RECORD +24 -0
- {funcnodes_react_flow-0.3.7.dist-info → funcnodes_react_flow-0.3.10.dist-info}/WHEEL +1 -1
- funcnodes_react_flow/static/js/830.js +0 -2
- funcnodes_react_flow/static/js/830.js.LICENSE.txt +0 -29
- funcnodes_react_flow/static/js/main.js +0 -2
- funcnodes_react_flow/static/js/main.js.LICENSE.txt +0 -3183
- funcnodes_react_flow-0.3.7.dist-info/RECORD +0 -26
- {funcnodes_react_flow-0.3.7.dist-info → funcnodes_react_flow-0.3.10.dist-info}/LICENSE +0 -0
- {funcnodes_react_flow-0.3.7.dist-info → funcnodes_react_flow-0.3.10.dist-info}/entry_points.txt +0 -0
funcnodes_react_flow/__init__.py
CHANGED
funcnodes_react_flow/__main__.py
CHANGED
@@ -1,11 +1,6 @@
|
|
1
|
-
from .run import run_server
|
2
|
-
import funcnodes as fn
|
3
1
|
import argparse
|
4
|
-
|
5
|
-
|
6
|
-
from setproctitle import setproctitle
|
7
|
-
except ModuleNotFoundError:
|
8
|
-
setproctitle = print
|
2
|
+
import os
|
3
|
+
import sys
|
9
4
|
|
10
5
|
|
11
6
|
def main():
|
@@ -19,25 +14,33 @@ def main():
|
|
19
14
|
>>> main()
|
20
15
|
None
|
21
16
|
"""
|
17
|
+
|
22
18
|
parser = argparse.ArgumentParser(description="Funcnodes React Cli.")
|
23
19
|
|
24
20
|
parser.add_argument(
|
25
21
|
"--port",
|
26
|
-
default=
|
22
|
+
default=None,
|
27
23
|
help="Port to run the server on",
|
28
24
|
type=int,
|
29
25
|
)
|
30
26
|
parser.add_argument(
|
31
27
|
"--no-browser",
|
32
|
-
action="
|
28
|
+
action="store_true",
|
33
29
|
help="Open the browser after starting the server",
|
34
30
|
)
|
35
31
|
|
36
32
|
args = parser.parse_args()
|
33
|
+
cmd = sys.executable + " -m funcnodes runserver"
|
34
|
+
if args.port:
|
35
|
+
cmd += f" --port {args.port}"
|
36
|
+
if args.no_browser:
|
37
|
+
cmd += " --no-browser"
|
38
|
+
|
39
|
+
os.system(cmd)
|
37
40
|
|
38
|
-
setproctitle("funcnodes_server")
|
39
|
-
run_server(port=args.port, open_browser=args.no_browser)
|
40
41
|
|
42
|
+
# "@mui/icons-material": "^5.15.18",
|
43
|
+
# "@mui/material": "^5.15.18"
|
41
44
|
|
42
45
|
if __name__ == "__main__":
|
43
46
|
main()
|
funcnodes_react_flow/run.py
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
import os
|
2
|
-
from funcnodes.runner import BaseServer
|
3
2
|
|
3
|
+
try:
|
4
|
+
from funcnodes.runner import BaseServer
|
4
5
|
|
5
|
-
class FuncnodesreactflowServer(BaseServer):
|
6
|
-
|
7
|
-
|
6
|
+
class FuncnodesreactflowServer(BaseServer):
|
7
|
+
STATIC_PATH = os.path.join(os.path.dirname(__file__), "static")
|
8
|
+
STATIC_URL = "/static"
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
10
|
+
async def index(self, request):
|
11
|
+
request.match_info["filename"] = "index.html"
|
12
|
+
return await self.serve_static_file(request)
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
def run_server(**kwargs):
|
15
|
+
return FuncnodesreactflowServer.run_server(**kwargs)
|
16
|
+
except (ImportError, ModuleNotFoundError):
|
17
|
+
pass
|