create-flow-os 0.0.1-dev.1771670224 → 0.0.1-dev.1771670377

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/bin/index.js CHANGED
@@ -922,12 +922,15 @@ function optsForProfile(config, profileId) {
922
922
  }
923
923
  async function main() {
924
924
  const devBadge = useDevTag ? c2.dim(" \xB7 dev") : "";
925
- const CONTENT_W = 42;
926
- const BORDER_W = 46;
925
+ const CONTENT_W = 46;
926
+ const BORDER_W = 50;
927
927
  const introLine = (content) => {
928
928
  const plain = stripAnsi(content);
929
- const pad = Math.max(0, CONTENT_W - plain.length);
930
- return c2.dim(" \u2502 ") + content + " ".repeat(pad) + c2.dim(" \u2502");
929
+ const len = plain.length;
930
+ const pad = Math.max(0, CONTENT_W - len);
931
+ const left = Math.floor(pad / 2);
932
+ const right = pad - left;
933
+ return c2.dim(" \u2502 ") + " ".repeat(left) + content + " ".repeat(right) + c2.dim(" \u2502");
931
934
  };
932
935
  const introBorder = (ch) => c2.dim(" " + (ch === "t" ? "\u256D" : "\u2570") + "\u2500".repeat(BORDER_W) + (ch === "t" ? "\u256E" : "\u256F"));
933
936
  const singleLine = "Create " + c2.bold(c2.cyan("Flow OS")) + devBadge + " application";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-flow-os",
3
- "version": "0.0.1-dev.1771670224",
3
+ "version": "0.0.1-dev.1771670377",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create-flow-os": "bin/index.js"
@@ -1,5 +1,18 @@
1
1
  #!/usr/bin/env bun
2
- import { pathToFileURL } from 'node:url';
3
- import { join } from 'node:path';
2
+ /**
3
+ * Dev server: carica flow.config.ts e avvia il server (non dipende da file nel package @flow.os/client).
4
+ */
5
+ import { pathToFileURL } from "node:url";
6
+ import { join } from "node:path";
7
+ import { createServer } from "vite";
4
8
 
5
- await import(pathToFileURL(join(import.meta.dir, 'node_modules/@flow.os/client/start-dev.ts')).href);
9
+ const cwd = import.meta.dir;
10
+ const configUrl = pathToFileURL(join(cwd, "flow.config.ts")).href;
11
+ const mod = await import(configUrl).catch((e: Error) => {
12
+ console.error("Flow: could not load flow.config.ts:", e.message);
13
+ process.exit(1);
14
+ });
15
+ const getConfig = mod.default;
16
+ const config = typeof getConfig === "function" ? await getConfig() : getConfig;
17
+ const server = await createServer(config);
18
+ await server.listen();
@@ -1,5 +1,18 @@
1
1
  #!/usr/bin/env bun
2
- import { pathToFileURL } from 'node:url';
3
- import { join } from 'node:path';
2
+ /**
3
+ * Dev server: carica flow.config.ts e avvia il server (non dipende da file nel package @flow.os/client).
4
+ */
5
+ import { pathToFileURL } from "node:url";
6
+ import { join } from "node:path";
7
+ import { createServer } from "vite";
4
8
 
5
- await import(pathToFileURL(join(import.meta.dir, 'node_modules/@flow.os/client/start-dev.ts')).href);
9
+ const cwd = import.meta.dir;
10
+ const configUrl = pathToFileURL(join(cwd, "flow.config.ts")).href;
11
+ const mod = await import(configUrl).catch((e: Error) => {
12
+ console.error("Flow: could not load flow.config.ts:", e.message);
13
+ process.exit(1);
14
+ });
15
+ const getConfig = mod.default;
16
+ const config = typeof getConfig === "function" ? await getConfig() : getConfig;
17
+ const server = await createServer(config);
18
+ await server.listen();
@@ -1,5 +1,18 @@
1
1
  #!/usr/bin/env bun
2
- import { pathToFileURL } from 'node:url';
3
- import { join } from 'node:path';
2
+ /**
3
+ * Dev server: carica flow.config.ts e avvia il server (non dipende da file nel package @flow.os/client).
4
+ */
5
+ import { pathToFileURL } from "node:url";
6
+ import { join } from "node:path";
7
+ import { createServer } from "vite";
4
8
 
5
- await import(pathToFileURL(join(import.meta.dir, 'node_modules/@flow.os/client/start-dev.ts')).href);
9
+ const cwd = import.meta.dir;
10
+ const configUrl = pathToFileURL(join(cwd, "flow.config.ts")).href;
11
+ const mod = await import(configUrl).catch((e: Error) => {
12
+ console.error("Flow: could not load flow.config.ts:", e.message);
13
+ process.exit(1);
14
+ });
15
+ const getConfig = mod.default;
16
+ const config = typeof getConfig === "function" ? await getConfig() : getConfig;
17
+ const server = await createServer(config);
18
+ await server.listen();