create-flow-os 0.0.1-dev.1771780350 → 0.0.1-dev.1771781977

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 (43) hide show
  1. package/README.md +22 -3
  2. package/bin/index.js +1 -1
  3. package/lib/utils.ts +91 -0
  4. package/package.json +7 -6
  5. package/profiles/client/package.json +1 -1
  6. package/profiles/{full/packages/client → client/packages/client/build}/config.ts +6 -6
  7. package/profiles/client/packages/client/index.ts +6 -4
  8. package/profiles/client/packages/client/package.json +15 -15
  9. package/profiles/client/packages/client/runtime/dom.ts +2 -0
  10. package/profiles/{full/packages/client → client/packages/client/runtime}/jsx.ts +2 -2
  11. package/profiles/client/packages/client/{start-dev.ts → scripts/start-dev.ts} +1 -4
  12. package/profiles/full/package.json +1 -1
  13. package/profiles/{client/packages/client → full/packages/client/build}/config.ts +6 -6
  14. package/profiles/full/packages/client/index.ts +6 -4
  15. package/profiles/full/packages/client/package.json +15 -15
  16. package/profiles/full/packages/client/runtime/dom.ts +2 -0
  17. package/profiles/{client/packages/client → full/packages/client/runtime}/jsx.ts +2 -2
  18. package/profiles/full/packages/client/{start-dev.ts → scripts/start-dev.ts} +1 -4
  19. package/profiles/full/packages/server/package.json +1 -1
  20. package/profiles/full/packages/server/scripts/start.ts +11 -0
  21. package/profiles/server/packages/server/package.json +1 -1
  22. package/profiles/server/packages/server/scripts/start.ts +11 -0
  23. package/templates/flow.config.server.ts +6 -0
  24. package/profiles/client/packages/client/dom.ts +0 -5
  25. package/profiles/client/packages/style/extension/README.md +0 -7
  26. package/profiles/full/packages/client/dom.ts +0 -5
  27. package/profiles/full/packages/server/start.ts +0 -15
  28. package/profiles/full/packages/style/extension/README.md +0 -7
  29. package/profiles/server/packages/server/start.ts +0 -15
  30. package/profiles/server/packages/style/extension/README.md +0 -7
  31. /package/profiles/client/packages/client/{vite.ts → build/vite.ts} +0 -0
  32. /package/profiles/client/packages/client/{jsx-dev-runtime.ts → runtime/jsx-dev-runtime.ts} +0 -0
  33. /package/profiles/client/packages/client/{jsx-runtime.ts → runtime/jsx-runtime.ts} +0 -0
  34. /package/profiles/client/packages/client/{jsx-types.d.ts → runtime/jsx-types.d.ts} +0 -0
  35. /package/profiles/client/packages/client/{build.ts → scripts/build.ts} +0 -0
  36. /package/profiles/client/packages/client/{preview.ts → scripts/preview.ts} +0 -0
  37. /package/profiles/full/packages/client/{vite.ts → build/vite.ts} +0 -0
  38. /package/profiles/full/packages/client/{jsx-dev-runtime.ts → runtime/jsx-dev-runtime.ts} +0 -0
  39. /package/profiles/full/packages/client/{jsx-runtime.ts → runtime/jsx-runtime.ts} +0 -0
  40. /package/profiles/full/packages/client/{jsx-types.d.ts → runtime/jsx-types.d.ts} +0 -0
  41. /package/profiles/full/packages/client/{build.ts → scripts/build.ts} +0 -0
  42. /package/profiles/full/packages/client/{preview.ts → scripts/preview.ts} +0 -0
  43. /package/{flow.config.client.ts → templates/flow.config.client.ts} +0 -0
package/README.md CHANGED
@@ -1,7 +1,26 @@
1
1
  # create-flow-os
2
2
 
3
- CLI per creare progetti Flow. Package npm: **create-flow-os**. I progetti generati usano i package **@flow.os/** (core, client, server, router, style).
3
+ CLI per generare progetti Flow.os da profili e pacchetti.
4
4
 
5
- **Uso:** `bun create flow-os [nome-progetto]` oppure `bunx create-flow-os [nome-progetto]`.
5
+ ## Cosa modificare
6
6
 
7
- **Dev (chi sviluppa il framework):** da root: `bun run publish:dev` (tutti i package con tag **dev**); per release stabile: `bun run release` (tag **latest**, aumenta le versioni nei package prima). Per provare la versione dev: `bun create flow-os mio-app --dev`.
7
+ - **`config.json`** unica configurazione da editare: profili, pacchetti, dipendenze, tag `@flow:`.
8
+ - **`index.ts`** — entry della CLI create (solo se cambi logica di scaffold).
9
+ - **`lib/utils.ts`** — helper condivisi (copy, transform, findPackageDir).
10
+ - **`templates/`** — `flow.config.client.ts`, `flow.config.server.ts` (usati da gen per i profili).
11
+
12
+ ## Cosa non toccare
13
+
14
+ - **`scripts/`** — `gen.ts` (genera profiles + packages da config), `publish-dev.ts`, `publish.ts`, `version.ts`.
15
+ - **`bin/`** — output di `bun run build`; non editare.
16
+ - **`profiles/`** e **`packages/`** — generati da `bun run gen`; eventuali modifiche vanno fatte nei sorgenti del repo e nei tag nei file, poi rigenerare.
17
+
18
+ ## Comandi
19
+
20
+ - `bun run gen` — rigenera profiles e packages da `config.json`.
21
+ - `bun run build` — compila `index.ts` in `bin/`.
22
+ - `bun run publish:dev` — gen + build + publish su tag `dev`.
23
+ - `bun run version -- patch|minor|major|X.Y.Z` — imposta versioni.
24
+ - `bun run release` — publish su tag `latest`.
25
+
26
+ Il README non è incluso nei file pubblicati su npm (`files` in package.json).
package/bin/index.js CHANGED
@@ -782,7 +782,7 @@ var _2 = () => {
782
782
  // index.ts
783
783
  var import_picocolors3 = __toESM(require_picocolors(), 1);
784
784
 
785
- // utils.ts
785
+ // lib/utils.ts
786
786
  import { mkdir, readdir } from "fs/promises";
787
787
  import { join } from "path";
788
788
  function transformPackageJson(pkg, projectName, extraPackages = {}, useWorkspace = false) {
package/lib/utils.ts ADDED
@@ -0,0 +1,91 @@
1
+ import { mkdir, readdir } from "node:fs/promises";
2
+ import { join } from "node:path";
3
+
4
+ export function transformPackageJson(
5
+ pkg: Record<string, unknown>,
6
+ projectName: string,
7
+ extraPackages: Record<string, string> = {},
8
+ useWorkspace = false
9
+ ): Record<string, unknown> {
10
+ const out = { ...pkg };
11
+ out.name = projectName;
12
+ out.private = true;
13
+ delete out.workspaces;
14
+ const deps = (out.dependencies as Record<string, string>) || {};
15
+ const next: Record<string, string> = {};
16
+ for (const [k, v] of Object.entries(deps)) {
17
+ const isFlow = k.startsWith("@flow.os/") || k === "@flow.os";
18
+ if (v === "workspace:*" || (isFlow && typeof v === "string" && (v.startsWith("file:./packages/") || v.startsWith("file:../")))) {
19
+ next[k] = useWorkspace && isFlow ? "workspace:*" : "^0.0.1";
20
+ } else {
21
+ next[k] = v;
22
+ }
23
+ }
24
+ for (const [k, v] of Object.entries(extraPackages)) {
25
+ if (!(k in next)) next[k] = v;
26
+ }
27
+ out.dependencies = next;
28
+ const devDeps = out.devDependencies as Record<string, string> | undefined;
29
+ if (devDeps) {
30
+ const nextDev: Record<string, string> = {};
31
+ for (const [k, v] of Object.entries(devDeps)) {
32
+ if (k === "vite-plugin-oxlint" || k === "oxlint" || k === "oxfmt") continue;
33
+ nextDev[k] = v;
34
+ }
35
+ out.devDependencies = nextDev;
36
+ }
37
+ return out;
38
+ }
39
+
40
+ /** Scripts in created projects: drop monorepo-only; server start → "server". */
41
+ export function transformScriptsForCreatedProject(scripts: Record<string, string> | undefined): Record<string, string> | undefined {
42
+ if (!scripts) return scripts;
43
+ const drop = new Set(["release", "version"]);
44
+ const out: Record<string, string> = {};
45
+ for (const [key, value] of Object.entries(scripts)) {
46
+ if (drop.has(key)) continue;
47
+ let s = value;
48
+ if (key === "start" && /@flow\.os\/server\/start\.ts/.test(s)) s = "server";
49
+ out[key] = s;
50
+ }
51
+ return Object.keys(out).length ? out : undefined;
52
+ }
53
+
54
+ export async function copyWithExclude(srcDir: string, destDir: string, exclude: string[]): Promise<void> {
55
+ const set = new Set(exclude.map((e) => e.toLowerCase()));
56
+ async function w(dir: string, rel: string): Promise<void> {
57
+ const entries = await readdir(dir, { withFileTypes: true });
58
+ for (const ent of entries) {
59
+ const name = ent.name;
60
+ if (set.has(name.toLowerCase())) continue;
61
+ const relPath = rel ? join(rel, name) : name;
62
+ const srcPath = join(dir, name);
63
+ const destPath = join(destDir, relPath);
64
+ if (ent.isDirectory()) {
65
+ await mkdir(destPath, { recursive: true });
66
+ await w(srcPath, relPath);
67
+ } else {
68
+ await mkdir(join(destDir, rel), { recursive: true });
69
+ await Bun.write(destPath, Bun.file(srcPath));
70
+ }
71
+ }
72
+ }
73
+ await mkdir(destDir, { recursive: true });
74
+ await w(srcDir, "");
75
+ }
76
+
77
+ export async function findPackageDir(repoRoot: string, packageName: string): Promise<string | null> {
78
+ const packagesDir = join(repoRoot, "packages");
79
+ try {
80
+ const entries = await readdir(packagesDir, { withFileTypes: true });
81
+ for (const ent of entries) {
82
+ if (!ent.isDirectory()) continue;
83
+ const pkgPath = join(packagesDir, ent.name, "package.json");
84
+ try {
85
+ const pkg = (await Bun.file(pkgPath).json()) as { name?: string };
86
+ if (pkg.name === packageName) return join(packagesDir, ent.name);
87
+ } catch {}
88
+ }
89
+ } catch {}
90
+ return null;
91
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-flow-os",
3
- "version": "0.0.1-dev.1771780350",
3
+ "version": "0.0.1-dev.1771781977",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create-flow-os": "bin/index.js"
@@ -8,19 +8,20 @@
8
8
  "files": [
9
9
  "bin",
10
10
  "config.json",
11
- "flow.config.client.ts",
11
+ "lib",
12
+ "templates",
12
13
  "profiles",
13
14
  "packages",
14
15
  "LICENSE"
15
16
  ],
16
17
  "license": "PolyForm-Shield-1.0.0",
17
18
  "scripts": {
18
- "gen": "bun gen.ts",
19
+ "gen": "bun scripts/gen.ts",
19
20
  "create": "bun index.ts",
20
21
  "build": "bun build ./index.ts --outdir=bin --target=bun",
21
- "publish:dev": "bun publish-dev.ts",
22
- "version": "bun version.ts",
23
- "release": "bun publish.ts"
22
+ "publish:dev": "bun scripts/publish-dev.ts",
23
+ "version": "bun scripts/version.ts",
24
+ "release": "bun scripts/publish.ts"
24
25
  },
25
26
  "dependencies": {
26
27
  "@clack/prompts": "^0.8.2",
@@ -7,7 +7,7 @@
7
7
  "dev": "flow-os-dev",
8
8
  "build": "tsc -b && flow-os-build",
9
9
  "preview": "flow-os-preview",
10
- "start": "bun node_modules/@flow.os/server/start.ts",
10
+ "start": "bun packages/server/scripts/start.ts",
11
11
  "lint": "oxlint .",
12
12
  "fmt": "oxfmt",
13
13
  "fmt:check": "oxfmt --check",
@@ -41,16 +41,17 @@ function getNetworkUrl(port: number): string | null {
41
41
  return null;
42
42
  }
43
43
 
44
- /** Solo in monorepo (esiste packages/): Rollup in Docker non segue i symlink, quindi alias a path assoluti. Generico: legge packages/ e mappa tutto. Fuori monorepo (npm) ritorna {}. */
44
+ /** Monorepo: alias a path assoluti (Rollup in Docker non segue symlink). Fuori monorepo ritorna {}. */
45
45
  function resolveAlias(): Record<string, string> {
46
46
  const root = path.resolve(process.cwd());
47
47
  const packagesDir = path.join(root, 'packages');
48
48
  if (!fs.existsSync(packagesDir)) return {};
49
49
  const alias: Record<string, string> = {};
50
- const clientJsx = path.join(root, 'packages', 'client', 'jsx-runtime.ts');
51
- if (fs.existsSync(clientJsx)) {
52
- alias['@flow.os/client/jsx-runtime'] = clientJsx;
53
- alias['@flow.os/client/jsx-dev-runtime'] = path.join(root, 'packages', 'client', 'jsx-dev-runtime.ts');
50
+ const clientRuntime = path.join(root, 'packages', 'client', 'runtime');
51
+ const jrx = path.join(clientRuntime, 'jsx-runtime.ts');
52
+ if (fs.existsSync(jrx)) {
53
+ alias['@flow.os/client/jsx-runtime'] = jrx;
54
+ alias['@flow.os/client/jsx-dev-runtime'] = path.join(clientRuntime, 'jsx-dev-runtime.ts');
54
55
  }
55
56
  for (const name of fs.readdirSync(packagesDir)) {
56
57
  const dir = path.join(packagesDir, name);
@@ -89,7 +90,6 @@ const DEFAULTS = {
89
90
  plugins: [] as Plugin[],
90
91
  };
91
92
 
92
- /** Banner Flow OS: sostituisce l'output di Vite con uno custom (Local + Network, box, colori). */
93
93
  function flowServerUrlPlugin(hostEnabled: boolean): Plugin {
94
94
  return {
95
95
  name: 'flow:server-url',
@@ -1,4 +1,6 @@
1
- /// <reference path="./jsx-types.d.ts" />
2
- export { Fragment, jsx, jsxs, jsxDEV } from './jsx.js';
3
- export { normalizeChild, setContent } from './dom.js';
4
- export { default as config } from './config.js';
1
+ /// <reference path="./runtime/jsx-types.d.ts" />
2
+ // API pubblica: tutto da qui o da subpath (./config, ./vite, ./jsx-runtime, ./jsx-dev-runtime)
3
+ export { Fragment, jsx, jsxs, jsxDEV } from './runtime/jsx.js';
4
+ export { normalizeChild, setContent } from './runtime/dom.js';
5
+ export { default as config } from './build/config.js';
6
+ export { applyClassFlow, applyClassAndClassList, applyStyle, applyStyleFlow, applyAttrs } from './features/index.js';
@@ -6,9 +6,9 @@
6
6
  "main": "./index.ts",
7
7
  "types": "./index.ts",
8
8
  "bin": {
9
- "flow-os-dev": "./start-dev.ts",
10
- "flow-os-build": "./build.ts",
11
- "flow-os-preview": "./preview.ts"
9
+ "flow-os-dev": "./scripts/start-dev.ts",
10
+ "flow-os-build": "./scripts/build.ts",
11
+ "flow-os-preview": "./scripts/preview.ts"
12
12
  },
13
13
  "dependencies": {
14
14
  "@flow.os/core": "workspace:*",
@@ -25,24 +25,24 @@
25
25
  "default": "./index.ts"
26
26
  },
27
27
  "./config": {
28
- "types": "./config.ts",
29
- "import": "./config.ts",
30
- "default": "./config.ts"
28
+ "types": "./build/config.ts",
29
+ "import": "./build/config.ts",
30
+ "default": "./build/config.ts"
31
31
  },
32
32
  "./vite": {
33
- "types": "./vite.ts",
34
- "import": "./vite.ts",
35
- "default": "./vite.ts"
33
+ "types": "./build/vite.ts",
34
+ "import": "./build/vite.ts",
35
+ "default": "./build/vite.ts"
36
36
  },
37
37
  "./jsx-runtime": {
38
- "types": "./jsx.ts",
39
- "import": "./jsx.ts",
40
- "default": "./jsx.ts"
38
+ "types": "./runtime/jsx.ts",
39
+ "import": "./runtime/jsx.ts",
40
+ "default": "./runtime/jsx.ts"
41
41
  },
42
42
  "./jsx-dev-runtime": {
43
- "types": "./jsx.ts",
44
- "import": "./jsx.ts",
45
- "default": "./jsx.ts"
43
+ "types": "./runtime/jsx.ts",
44
+ "import": "./runtime/jsx.ts",
45
+ "default": "./runtime/jsx.ts"
46
46
  }
47
47
  }
48
48
  }
@@ -0,0 +1,2 @@
1
+ /** Re-export DOM helpers da @flow.os/core. */
2
+ export { normalizeChild, setContent } from '@flow.os/core';
@@ -1,13 +1,13 @@
1
1
  /// <reference path="./jsx-types.d.ts" />
2
2
  import { effect } from '@flow.os/core';
3
- import { isGetter } from './features/utils.js';
3
+ import { isGetter } from '../features/utils.js';
4
4
  import {
5
5
  applyClassFlow,
6
6
  applyClassAndClassList,
7
7
  applyStyle,
8
8
  applyStyleFlow,
9
9
  applyAttrs,
10
- } from './features/index.js';
10
+ } from '../features/index.js';
11
11
 
12
12
  export const Fragment = Symbol.for('flow.fragment');
13
13
 
@@ -1,8 +1,5 @@
1
1
  #!/usr/bin/env bun
2
- /**
3
- * Flow OS dev server runner. Loads flow.config.ts and starts the dev server.
4
- * Trova una porta libera (3000, 3001, …) prima di avviare, così Vite non si blocca su "trying another one".
5
- */
2
+ /** Dev server: carica flow.config.ts e avvia Vite. Porta libera 3000–3020. */
6
3
 
7
4
  import { pathToFileURL } from 'node:url';
8
5
  import { join } from 'node:path';
@@ -7,7 +7,7 @@
7
7
  "dev": "flow-os-dev",
8
8
  "build": "tsc -b && flow-os-build",
9
9
  "preview": "flow-os-preview",
10
- "start": "bun node_modules/@flow.os/server/start.ts",
10
+ "start": "bun packages/server/scripts/start.ts",
11
11
  "lint": "oxlint .",
12
12
  "fmt": "oxfmt",
13
13
  "fmt:check": "oxfmt --check",
@@ -41,16 +41,17 @@ function getNetworkUrl(port: number): string | null {
41
41
  return null;
42
42
  }
43
43
 
44
- /** Solo in monorepo (esiste packages/): Rollup in Docker non segue i symlink, quindi alias a path assoluti. Generico: legge packages/ e mappa tutto. Fuori monorepo (npm) ritorna {}. */
44
+ /** Monorepo: alias a path assoluti (Rollup in Docker non segue symlink). Fuori monorepo ritorna {}. */
45
45
  function resolveAlias(): Record<string, string> {
46
46
  const root = path.resolve(process.cwd());
47
47
  const packagesDir = path.join(root, 'packages');
48
48
  if (!fs.existsSync(packagesDir)) return {};
49
49
  const alias: Record<string, string> = {};
50
- const clientJsx = path.join(root, 'packages', 'client', 'jsx-runtime.ts');
51
- if (fs.existsSync(clientJsx)) {
52
- alias['@flow.os/client/jsx-runtime'] = clientJsx;
53
- alias['@flow.os/client/jsx-dev-runtime'] = path.join(root, 'packages', 'client', 'jsx-dev-runtime.ts');
50
+ const clientRuntime = path.join(root, 'packages', 'client', 'runtime');
51
+ const jrx = path.join(clientRuntime, 'jsx-runtime.ts');
52
+ if (fs.existsSync(jrx)) {
53
+ alias['@flow.os/client/jsx-runtime'] = jrx;
54
+ alias['@flow.os/client/jsx-dev-runtime'] = path.join(clientRuntime, 'jsx-dev-runtime.ts');
54
55
  }
55
56
  for (const name of fs.readdirSync(packagesDir)) {
56
57
  const dir = path.join(packagesDir, name);
@@ -89,7 +90,6 @@ const DEFAULTS = {
89
90
  plugins: [] as Plugin[],
90
91
  };
91
92
 
92
- /** Banner Flow OS: sostituisce l'output di Vite con uno custom (Local + Network, box, colori). */
93
93
  function flowServerUrlPlugin(hostEnabled: boolean): Plugin {
94
94
  return {
95
95
  name: 'flow:server-url',
@@ -1,4 +1,6 @@
1
- /// <reference path="./jsx-types.d.ts" />
2
- export { Fragment, jsx, jsxs, jsxDEV } from './jsx.js';
3
- export { normalizeChild, setContent } from './dom.js';
4
- export { default as config } from './config.js';
1
+ /// <reference path="./runtime/jsx-types.d.ts" />
2
+ // API pubblica: tutto da qui o da subpath (./config, ./vite, ./jsx-runtime, ./jsx-dev-runtime)
3
+ export { Fragment, jsx, jsxs, jsxDEV } from './runtime/jsx.js';
4
+ export { normalizeChild, setContent } from './runtime/dom.js';
5
+ export { default as config } from './build/config.js';
6
+ export { applyClassFlow, applyClassAndClassList, applyStyle, applyStyleFlow, applyAttrs } from './features/index.js';
@@ -6,9 +6,9 @@
6
6
  "main": "./index.ts",
7
7
  "types": "./index.ts",
8
8
  "bin": {
9
- "flow-os-dev": "./start-dev.ts",
10
- "flow-os-build": "./build.ts",
11
- "flow-os-preview": "./preview.ts"
9
+ "flow-os-dev": "./scripts/start-dev.ts",
10
+ "flow-os-build": "./scripts/build.ts",
11
+ "flow-os-preview": "./scripts/preview.ts"
12
12
  },
13
13
  "dependencies": {
14
14
  "@flow.os/core": "workspace:*",
@@ -25,24 +25,24 @@
25
25
  "default": "./index.ts"
26
26
  },
27
27
  "./config": {
28
- "types": "./config.ts",
29
- "import": "./config.ts",
30
- "default": "./config.ts"
28
+ "types": "./build/config.ts",
29
+ "import": "./build/config.ts",
30
+ "default": "./build/config.ts"
31
31
  },
32
32
  "./vite": {
33
- "types": "./vite.ts",
34
- "import": "./vite.ts",
35
- "default": "./vite.ts"
33
+ "types": "./build/vite.ts",
34
+ "import": "./build/vite.ts",
35
+ "default": "./build/vite.ts"
36
36
  },
37
37
  "./jsx-runtime": {
38
- "types": "./jsx.ts",
39
- "import": "./jsx.ts",
40
- "default": "./jsx.ts"
38
+ "types": "./runtime/jsx.ts",
39
+ "import": "./runtime/jsx.ts",
40
+ "default": "./runtime/jsx.ts"
41
41
  },
42
42
  "./jsx-dev-runtime": {
43
- "types": "./jsx.ts",
44
- "import": "./jsx.ts",
45
- "default": "./jsx.ts"
43
+ "types": "./runtime/jsx.ts",
44
+ "import": "./runtime/jsx.ts",
45
+ "default": "./runtime/jsx.ts"
46
46
  }
47
47
  }
48
48
  }
@@ -0,0 +1,2 @@
1
+ /** Re-export DOM helpers da @flow.os/core. */
2
+ export { normalizeChild, setContent } from '@flow.os/core';
@@ -1,13 +1,13 @@
1
1
  /// <reference path="./jsx-types.d.ts" />
2
2
  import { effect } from '@flow.os/core';
3
- import { isGetter } from './features/utils.js';
3
+ import { isGetter } from '../features/utils.js';
4
4
  import {
5
5
  applyClassFlow,
6
6
  applyClassAndClassList,
7
7
  applyStyle,
8
8
  applyStyleFlow,
9
9
  applyAttrs,
10
- } from './features/index.js';
10
+ } from '../features/index.js';
11
11
 
12
12
  export const Fragment = Symbol.for('flow.fragment');
13
13
 
@@ -1,8 +1,5 @@
1
1
  #!/usr/bin/env bun
2
- /**
3
- * Flow OS dev server runner. Loads flow.config.ts and starts the dev server.
4
- * Trova una porta libera (3000, 3001, …) prima di avviare, così Vite non si blocca su "trying another one".
5
- */
2
+ /** Dev server: carica flow.config.ts e avvia Vite. Porta libera 3000–3020. */
6
3
 
7
4
  import { pathToFileURL } from 'node:url';
8
5
  import { join } from 'node:path';
@@ -6,7 +6,7 @@
6
6
  "main": "./index.ts",
7
7
  "types": "./index.ts",
8
8
  "bin": {
9
- "server": "./start.ts"
9
+ "server": "./scripts/start.ts"
10
10
  },
11
11
  "dependencies": {},
12
12
  "peerDependencies": {
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env bun
2
+ /** Entry produzione: statici + API. Uso: bunx @flow.os/server */
3
+ import { runProductionServer } from '../production.js';
4
+
5
+ const port = process.env['PORT'] ? Number(process.env['PORT']) : 3000;
6
+ runProductionServer({
7
+ routesDir: 'server/routes',
8
+ staticDir: 'dist',
9
+ port,
10
+ hostname: '0.0.0.0',
11
+ });
@@ -6,7 +6,7 @@
6
6
  "main": "./index.ts",
7
7
  "types": "./index.ts",
8
8
  "bin": {
9
- "server": "./start.ts"
9
+ "server": "./scripts/start.ts"
10
10
  },
11
11
  "dependencies": {},
12
12
  "peerDependencies": {
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env bun
2
+ /** Entry produzione: statici + API. Uso: bunx @flow.os/server */
3
+ import { runProductionServer } from '../production.js';
4
+
5
+ const port = process.env['PORT'] ? Number(process.env['PORT']) : 3000;
6
+ runProductionServer({
7
+ routesDir: 'server/routes',
8
+ staticDir: 'dist',
9
+ port,
10
+ hostname: '0.0.0.0',
11
+ });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Server-only: no Vite client. When you add a frontend (e.g. React), add flow.config.ts
3
+ * with: import { config } from '@flow.os/client'; import { flowServer } from '@flow.os/server';
4
+ * export default config({ server: flowServer() });
5
+ */
6
+ export default {};
@@ -1,5 +0,0 @@
1
- /**
2
- * Re-export degli helper DOM da @flow.os (normalizeChild, setContent).
3
- * Usato dal runtime client e da chi importa da @flow.os/client.
4
- */
5
- export { normalizeChild, setContent } from '@flow.os/core';
@@ -1,7 +0,0 @@
1
- # Flow Style — Color Picker
2
-
3
- - **Pallino** (cerchio) prima di ogni colore `#hex` o `rgb(...)`.
4
- - **Quadratino** dell’editor sul colore: **click** → picker nativo inline.
5
- - Alternativa: **Ctrl+Shift+C** con cursore sul colore → input hex/rgb.
6
-
7
- Installazione: Install from VSIX → `flow-style-colors-0.0.1.vsix`.
@@ -1,5 +0,0 @@
1
- /**
2
- * Re-export degli helper DOM da @flow.os (normalizeChild, setContent).
3
- * Usato dal runtime client e da chi importa da @flow.os/client.
4
- */
5
- export { normalizeChild, setContent } from '@flow.os/core';
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env bun
2
- /**
3
- * Entry produzione: lancia il server (statici + API).
4
- * Uso: bunx @flow.os/server oppure "start": "bunx @flow.os/server" in package.json.
5
- */
6
- import { runProductionServer } from './production.js';
7
-
8
- const port = process.env['PORT'] ? Number(process.env['PORT']) : 3000;
9
-
10
- runProductionServer({
11
- routesDir: 'server/routes',
12
- staticDir: 'dist',
13
- port,
14
- hostname: '0.0.0.0',
15
- });
@@ -1,7 +0,0 @@
1
- # Flow Style — Color Picker
2
-
3
- - **Pallino** (cerchio) prima di ogni colore `#hex` o `rgb(...)`.
4
- - **Quadratino** dell’editor sul colore: **click** → picker nativo inline.
5
- - Alternativa: **Ctrl+Shift+C** con cursore sul colore → input hex/rgb.
6
-
7
- Installazione: Install from VSIX → `flow-style-colors-0.0.1.vsix`.
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env bun
2
- /**
3
- * Entry produzione: lancia il server (statici + API).
4
- * Uso: bunx @flow.os/server oppure "start": "bunx @flow.os/server" in package.json.
5
- */
6
- import { runProductionServer } from './production.js';
7
-
8
- const port = process.env['PORT'] ? Number(process.env['PORT']) : 3000;
9
-
10
- runProductionServer({
11
- routesDir: 'server/routes',
12
- staticDir: 'dist',
13
- port,
14
- hostname: '0.0.0.0',
15
- });
@@ -1,7 +0,0 @@
1
- # Flow Style — Color Picker
2
-
3
- - **Pallino** (cerchio) prima di ogni colore `#hex` o `rgb(...)`.
4
- - **Quadratino** dell’editor sul colore: **click** → picker nativo inline.
5
- - Alternativa: **Ctrl+Shift+C** con cursore sul colore → input hex/rgb.
6
-
7
- Installazione: Install from VSIX → `flow-style-colors-0.0.1.vsix`.