visual-node 0.1.0 → 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 (26) hide show
  1. package/dist/examples/01-hello-world/README.md +25 -0
  2. package/dist/examples/01-hello-world/flow.blueprint +0 -0
  3. package/dist/examples/01-hello-world/flow.json +38 -0
  4. package/dist/examples/01-hello-world/server.js +13 -0
  5. package/dist/examples/02-rest-crud-with-variables/README.md +34 -0
  6. package/dist/examples/02-rest-crud-with-variables/flow.blueprint +0 -0
  7. package/dist/examples/02-rest-crud-with-variables/flow.json +76 -0
  8. package/dist/examples/02-rest-crud-with-variables/server.js +31 -0
  9. package/dist/examples/03-custom-middleware-logging/README.md +26 -0
  10. package/dist/examples/03-custom-middleware-logging/flow.blueprint +0 -0
  11. package/dist/examples/03-custom-middleware-logging/flow.json +45 -0
  12. package/dist/examples/03-custom-middleware-logging/server.js +18 -0
  13. package/dist/examples/04-function-graph-branch/README.md +29 -0
  14. package/dist/examples/04-function-graph-branch/flow.blueprint +0 -0
  15. package/dist/examples/04-function-graph-branch/flow.json +85 -0
  16. package/dist/examples/04-function-graph-branch/server.js +24 -0
  17. package/dist/examples/05-npm-package-require/README.md +30 -0
  18. package/dist/examples/05-npm-package-require/flow.blueprint +0 -0
  19. package/dist/examples/05-npm-package-require/flow.json +47 -0
  20. package/dist/examples/05-npm-package-require/server.js +17 -0
  21. package/dist/examples/README.md +30 -0
  22. package/dist/public/assets/{index-BpXY8lVq.js → index-DFqW8joi.js} +18 -18
  23. package/dist/public/index.html +1 -1
  24. package/dist/server.js +10 -0
  25. package/dist/server.js.map +1 -1
  26. package/package.json +4 -4
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>FlowServer</title>
7
- <script type="module" crossorigin src="/assets/index-BpXY8lVq.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-DFqW8joi.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-6_2vDtnd.css">
9
9
  </head>
10
10
  <body>
package/dist/server.js CHANGED
@@ -1,4 +1,7 @@
1
1
  #!/usr/bin/env node
2
+ import { existsSync } from "node:fs";
3
+ import path from "node:path";
4
+ import { fileURLToPath } from "node:url";
2
5
  import { buildApp } from "./app.js";
3
6
  import { resolveProjectDir } from "./config.js";
4
7
  import { loadInstalledPlugins } from "./plugin-loading.js";
@@ -21,6 +24,13 @@ const app = buildApp({ projectDir });
21
24
  app.listen(port, () => {
22
25
  console.log(`FlowServer editor running at http://localhost:${port}`);
23
26
  console.log(`Project directory: ${projectDir}`);
27
+ // Bundled worked examples (see scripts/copy-examples.mjs) — copied into dist/examples
28
+ // at build time, so this path resolves whether running from source or from the
29
+ // installed npm package.
30
+ const examplesDir = path.join(path.dirname(fileURLToPath(import.meta.url)), "examples");
31
+ if (existsSync(examplesDir)) {
32
+ console.log(`Example flows: ${examplesDir}`);
33
+ }
24
34
  });
25
35
  // Never leave an orphaned generated-server process running after editor-server exits.
26
36
  // `stop()`'s kill() call is synchronous even though the returned promise resolves later —
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,UAAU,GAAG,iBAAiB,EAAE,CAAC;AACvC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;AAE9C,uFAAuF;AACvF,4FAA4F;AAC5F,uFAAuF;AACvF,yFAAyF;AACzF,MAAM,EAA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C1F,yFAAyF;AACzF,KAAK,MAAM,MAAM,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAU,EAAE,CAAC;IACpD,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;QACtB,KAAK,YAAY,CAAC,IAAI,EAAE,CAAC;QACzB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "visual-node",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Visual, node-based backend builder for Node.js. Drag-and-drop flows compile to real, readable Express.js source code.",
5
5
  "type": "module",
6
6
  "main": "./dist/server.js",
@@ -17,8 +17,8 @@
17
17
  "@connectrpc/connect-node": "^2.1.2",
18
18
  "cors": "^2.8.5",
19
19
  "express": "^4.19.2",
20
- "@visual-node/core": "0.1.0",
21
- "@visual-node/proto-gen": "0.1.0"
20
+ "@visual-node/proto-gen": "0.2.0",
21
+ "@visual-node/core": "0.2.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/cors": "^2.8.17",
@@ -31,7 +31,7 @@
31
31
  "vitest": "^2.0.5"
32
32
  },
33
33
  "scripts": {
34
- "build": "tsc -p tsconfig.json && node ../../scripts/copy-ui-assets.mjs",
34
+ "build": "tsc -p tsconfig.json && node ../../scripts/copy-ui-assets.mjs && node ../../scripts/copy-examples.mjs",
35
35
  "dev": "tsx watch src/server.ts",
36
36
  "start": "node dist/server.js",
37
37
  "test": "vitest run"