create-flow-os 0.0.1-dev.1771777625 → 0.0.1-dev.1771778985

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
@@ -820,11 +820,14 @@ function transformPackageJson(pkg, projectName, extraPackages = {}, useWorkspace
820
820
  function transformScriptsForCreatedProject(scripts) {
821
821
  if (!scripts)
822
822
  return scripts;
823
+ const drop = new Set(["release", "version"]);
823
824
  const out = {};
824
825
  for (const [key, value] of Object.entries(scripts)) {
825
- if (key === "release")
826
+ if (drop.has(key))
826
827
  continue;
827
- let s = value.replace(/bun\s+packages\/client\/start-dev\.ts\b/, "flow-os-dev").replace(/bun\s+packages\/client\/build\.ts\b/g, "flow-os-build").replace(/bun\s+packages\/client\/preview\.ts\b/, "flow-os-preview").replace(/bun\s+(\.\/)?node_modules\/@flow\.os\/client\/start-dev\.ts\b/, "flow-os-dev").replace(/bun\s+(\.\/)?node_modules\/@flow\.os\/client\/build\.ts\b/g, "flow-os-build").replace(/bun\s+(\.\/)?node_modules\/@flow\.os\/client\/preview\.ts\b/, "flow-os-preview").replace(/bun\s+(\.\/)?node_modules\/@flow\.os\/server\/start\.ts\b/, "server");
828
+ let s = value;
829
+ if (key === "start" && /@flow\.os\/server\/start\.ts/.test(s))
830
+ s = "server";
828
831
  out[key] = s;
829
832
  }
830
833
  return Object.keys(out).length ? out : undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-flow-os",
3
- "version": "0.0.1-dev.1771777625",
3
+ "version": "0.0.1-dev.1771778985",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create-flow-os": "bin/index.js"
@@ -1,28 +1,34 @@
1
1
  # Flow OS
2
2
 
3
- ## Comandi
3
+ Tutti i comandi dalla **root** del repo.
4
+
5
+ ---
6
+
7
+ ## Dev (sviluppo e canale dev)
4
8
 
5
9
  | Comando | Cosa fa |
6
- |--------|---------|
7
- | **dev** | Avvia il server di sviluppo (client + eventuale server). |
8
- | **build** | Build di produzione del client. |
9
- | **gen** | Rigenera `profiles/` e `packages/` da `config.json` e dai tag `// @flow: <id>` nei file. |
10
- | **version** | Aggiorna la versione (patch/minor/major o valore esatto) nei package. Solo i package indicati, altrimenti tutti. |
11
- | **release** | Pubblica su npm (tag `latest`). Solo i package indicati, altrimenti tutti. |
12
- | **publish:dev** | Pubblica su npm con tag `dev` (versione `0.0.1-dev.<timestamp>`). |
10
+ |---------|---------|
11
+ | `bun run dev` | Avvia il server di sviluppo (client + server). |
12
+ | `bun run gen` | Rigenera i template (profiles + packages in create-flow). Di solito non serve: lo fa già `publish:dev`. |
13
+ | `bun run publish:dev` | Esegue **gen** + **build** create-flow e pubblica tutto su npm con tag **dev**. |
13
14
 
14
- **Esecuzione**
15
+ **Pubblicare solo un package** (più veloce):
15
16
 
16
17
  ```bash
17
- bun run dev
18
- bun run build
19
- bun run gen
18
+ bun run publish:dev -- --client
19
+ ```
20
20
 
21
- bun run version -- patch
22
- bun run version -- patch @flow.os/client create-flow-os
21
+ (Stesso comando con `--style`, `--core`, `--router`, `--server` al posto di `--client`.)
23
22
 
24
- bun run release
25
- bun run release -- @flow.os/client create-flow-os
23
+ ---
26
24
 
27
- bun run publish:dev
28
- ```
25
+ ## Prod (release su latest)
26
+
27
+ | Comando | Cosa fa |
28
+ |---------|---------|
29
+ | `bun run version -- <patch|minor|major|X.Y.Z>` | Aggiorna la versione nei package. Es.: `patch` per tutti, oppure `bun run version -- 1.0.0` per impostare tutti a 1.0.0. |
30
+ | `bun run version -- patch @flow.os/client create-flow-os` | Aggiorna solo i package indicati. |
31
+ | `bun run release` | Pubblica su npm con tag **latest**. Va usato **dopo** aver lanciato `version`. |
32
+ | `bun run release -- @flow.os/client create-flow-os` | Pubblica solo i package indicati. |
33
+
34
+ **Ordine per una release prod:** prima `bun run version -- patch` (o minor/major), poi `bun run release`.
@@ -4,9 +4,9 @@
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
7
- "dev": "bun packages/client/start-dev.ts",
8
- "build": "tsc -b && bun packages/client/build.ts",
9
- "preview": "bun packages/client/preview.ts",
7
+ "dev": "bun scripts/dev.ts",
8
+ "build": "tsc -b && bun scripts/build.ts",
9
+ "preview": "bun scripts/preview.ts",
10
10
  "start": "bun node_modules/@flow.os/server/start.ts",
11
11
  "lint": "oxlint .",
12
12
  "fmt": "oxfmt",
@@ -109,8 +109,11 @@ function flowServerUrlPlugin(hostEnabled: boolean): Plugin {
109
109
  export default function config(
110
110
  options: FlowConfigOptions = {}
111
111
  ): () => Promise<ReturnType<typeof import('vite').defineConfig>> {
112
- const { port = DEFAULTS.port, host = DEFAULTS.host, server = DEFAULTS.server, plugins = DEFAULTS.plugins } = options;
112
+ const { port: optPort = DEFAULTS.port, host = DEFAULTS.host, server = DEFAULTS.server, plugins = DEFAULTS.plugins } = options;
113
113
  return async () => {
114
+ const envPort = process.env.FLOW_DEV_PORT;
115
+ const port = envPort ? parseInt(envPort, 10) : optPort;
116
+ const strictPort = !!envPort;
114
117
  const { flow } = await import('./vite.js');
115
118
  const allPlugins = [
116
119
  flowServerUrlPlugin(host === true),
@@ -122,13 +125,13 @@ export default function config(
122
125
  ...baseLogger,
123
126
  info: (msg: string, opts?: { clear?: boolean }) => {
124
127
  const t = msg.replace(/\s+/g, ' ');
125
- if (/VITE\s+v?\d|ready\s+in|Local:\s*http|Network:\s*http|press\s+h\s+enter/i.test(t)) return;
128
+ if (/VITE\s+v?\d|ready\s+in|Local:\s*http|Network:\s*http|press\s+h\s+enter|Port\s+\d+\s+is\s+in\s+use/i.test(t)) return;
126
129
  baseLogger.info(msg, opts);
127
130
  },
128
131
  };
129
132
  return {
130
133
  resolve: Object.keys(alias).length ? { alias } : {},
131
- server: { port, host, strictPort: false },
134
+ server: { port, host, strictPort },
132
135
  customLogger,
133
136
  build: {
134
137
  rollupOptions: {
@@ -5,6 +5,11 @@
5
5
  "type": "module",
6
6
  "main": "./index.ts",
7
7
  "types": "./index.ts",
8
+ "bin": {
9
+ "flow-os-dev": "./start-dev.ts",
10
+ "flow-os-build": "./build.ts",
11
+ "flow-os-preview": "./preview.ts"
12
+ },
8
13
  "dependencies": {
9
14
  "@flow.os/core": "workspace:*",
10
15
  "@flow.os/router": "workspace:*",
@@ -1,17 +1,39 @@
1
1
  #!/usr/bin/env bun
2
2
  /**
3
3
  * Flow OS dev server runner. Loads flow.config.ts and starts the dev server.
4
- * Usage: bun node_modules/@flow.os/client/start-dev.ts (or bun packages/client/start-dev.ts in monorepo)
4
+ * Trova una porta libera (3000, 3001, …) prima di avviare, così Vite non si blocca su "trying another one".
5
5
  */
6
6
 
7
7
  import { pathToFileURL } from 'node:url';
8
8
  import { join } from 'node:path';
9
9
  import { createServer } from 'vite';
10
+ import net from 'node:net';
10
11
 
11
12
  const cwd = process.cwd();
12
13
  const configPath = join(cwd, 'flow.config.ts');
13
14
  const configUrl = pathToFileURL(configPath).href;
14
15
 
16
+ function isPortFree(port: number): Promise<boolean> {
17
+ return new Promise((resolve) => {
18
+ const s = net.createServer();
19
+ s.once('error', () => resolve(false));
20
+ s.once('listening', () => {
21
+ s.close(() => resolve(true));
22
+ });
23
+ s.listen(port, '127.0.0.1');
24
+ });
25
+ }
26
+
27
+ async function findFreePort(from: number, to: number): Promise<number> {
28
+ for (let p = from; p <= to; p++) {
29
+ if (await isPortFree(p)) return p;
30
+ }
31
+ throw new Error(`Nessuna porta libera tra ${from} e ${to}`);
32
+ }
33
+
34
+ const port = await findFreePort(3000, 3020);
35
+ process.env.FLOW_DEV_PORT = String(port);
36
+
15
37
  const mod = await import(configUrl).catch((e: Error) => {
16
38
  console.error('Flow: could not load flow.config.ts:', e.message);
17
39
  process.exit(1);
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env bun
2
+ import { pathToFileURL } from 'node:url';
3
+ import { join } from 'node:path';
4
+ import { build } from 'vite';
5
+
6
+ const cwd = process.cwd();
7
+ const configPath = join(cwd, 'flow.config.ts');
8
+ const mod = await import(pathToFileURL(configPath).href).catch((e: Error) => {
9
+ console.error('Flow: could not load flow.config.ts:', e.message);
10
+ process.exit(1);
11
+ });
12
+ const getConfig = mod.default;
13
+ const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
14
+ await build(config);
@@ -0,0 +1,45 @@
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
+ */
6
+
7
+ import { pathToFileURL } from 'node:url';
8
+ import { join } from 'node:path';
9
+ import { createServer } from 'vite';
10
+ import net from 'node:net';
11
+
12
+ const cwd = process.cwd();
13
+ const configPath = join(cwd, 'flow.config.ts');
14
+ const configUrl = pathToFileURL(configPath).href;
15
+
16
+ function isPortFree(port: number): Promise<boolean> {
17
+ return new Promise((resolve) => {
18
+ const s = net.createServer();
19
+ s.once('error', () => resolve(false));
20
+ s.once('listening', () => {
21
+ s.close(() => resolve(true));
22
+ });
23
+ s.listen(port, '127.0.0.1');
24
+ });
25
+ }
26
+
27
+ async function findFreePort(from: number, to: number): Promise<number> {
28
+ for (let p = from; p <= to; p++) {
29
+ if (await isPortFree(p)) return p;
30
+ }
31
+ throw new Error(`Nessuna porta libera tra ${from} e ${to}`);
32
+ }
33
+
34
+ const port = await findFreePort(3000, 3020);
35
+ process.env.FLOW_DEV_PORT = String(port);
36
+
37
+ const mod = await import(configUrl).catch((e: Error) => {
38
+ console.error('Flow: could not load flow.config.ts:', e.message);
39
+ process.exit(1);
40
+ });
41
+ const getConfig = mod.default;
42
+ const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
43
+ const server = await createServer(config);
44
+ await server.listen();
45
+ server.watcher.on('change', () => {});
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env bun
2
+ import { pathToFileURL } from 'node:url';
3
+ import { join } from 'node:path';
4
+ import { preview } from 'vite';
5
+
6
+ const cwd = process.cwd();
7
+ const configPath = join(cwd, 'flow.config.ts');
8
+ const mod = await import(pathToFileURL(configPath).href).catch((e: Error) => {
9
+ console.error('Flow: could not load flow.config.ts:', e.message);
10
+ process.exit(1);
11
+ });
12
+ const getConfig = mod.default;
13
+ const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
14
+ await preview(config);
@@ -1,28 +1,34 @@
1
1
  # Flow OS
2
2
 
3
- ## Comandi
3
+ Tutti i comandi dalla **root** del repo.
4
+
5
+ ---
6
+
7
+ ## Dev (sviluppo e canale dev)
4
8
 
5
9
  | Comando | Cosa fa |
6
- |--------|---------|
7
- | **dev** | Avvia il server di sviluppo (client + eventuale server). |
8
- | **build** | Build di produzione del client. |
9
- | **gen** | Rigenera `profiles/` e `packages/` da `config.json` e dai tag `// @flow: <id>` nei file. |
10
- | **version** | Aggiorna la versione (patch/minor/major o valore esatto) nei package. Solo i package indicati, altrimenti tutti. |
11
- | **release** | Pubblica su npm (tag `latest`). Solo i package indicati, altrimenti tutti. |
12
- | **publish:dev** | Pubblica su npm con tag `dev` (versione `0.0.1-dev.<timestamp>`). |
10
+ |---------|---------|
11
+ | `bun run dev` | Avvia il server di sviluppo (client + server). |
12
+ | `bun run gen` | Rigenera i template (profiles + packages in create-flow). Di solito non serve: lo fa già `publish:dev`. |
13
+ | `bun run publish:dev` | Esegue **gen** + **build** create-flow e pubblica tutto su npm con tag **dev**. |
13
14
 
14
- **Esecuzione**
15
+ **Pubblicare solo un package** (più veloce):
15
16
 
16
17
  ```bash
17
- bun run dev
18
- bun run build
19
- bun run gen
18
+ bun run publish:dev -- --client
19
+ ```
20
20
 
21
- bun run version -- patch
22
- bun run version -- patch @flow.os/client create-flow-os
21
+ (Stesso comando con `--style`, `--core`, `--router`, `--server` al posto di `--client`.)
23
22
 
24
- bun run release
25
- bun run release -- @flow.os/client create-flow-os
23
+ ---
26
24
 
27
- bun run publish:dev
28
- ```
25
+ ## Prod (release su latest)
26
+
27
+ | Comando | Cosa fa |
28
+ |---------|---------|
29
+ | `bun run version -- <patch|minor|major|X.Y.Z>` | Aggiorna la versione nei package. Es.: `patch` per tutti, oppure `bun run version -- 1.0.0` per impostare tutti a 1.0.0. |
30
+ | `bun run version -- patch @flow.os/client create-flow-os` | Aggiorna solo i package indicati. |
31
+ | `bun run release` | Pubblica su npm con tag **latest**. Va usato **dopo** aver lanciato `version`. |
32
+ | `bun run release -- @flow.os/client create-flow-os` | Pubblica solo i package indicati. |
33
+
34
+ **Ordine per una release prod:** prima `bun run version -- patch` (o minor/major), poi `bun run release`.
@@ -4,9 +4,9 @@
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
7
- "dev": "bun packages/client/start-dev.ts",
8
- "build": "tsc -b && bun packages/client/build.ts",
9
- "preview": "bun packages/client/preview.ts",
7
+ "dev": "bun scripts/dev.ts",
8
+ "build": "tsc -b && bun scripts/build.ts",
9
+ "preview": "bun scripts/preview.ts",
10
10
  "start": "bun node_modules/@flow.os/server/start.ts",
11
11
  "lint": "oxlint .",
12
12
  "fmt": "oxfmt",
@@ -109,8 +109,11 @@ function flowServerUrlPlugin(hostEnabled: boolean): Plugin {
109
109
  export default function config(
110
110
  options: FlowConfigOptions = {}
111
111
  ): () => Promise<ReturnType<typeof import('vite').defineConfig>> {
112
- const { port = DEFAULTS.port, host = DEFAULTS.host, server = DEFAULTS.server, plugins = DEFAULTS.plugins } = options;
112
+ const { port: optPort = DEFAULTS.port, host = DEFAULTS.host, server = DEFAULTS.server, plugins = DEFAULTS.plugins } = options;
113
113
  return async () => {
114
+ const envPort = process.env.FLOW_DEV_PORT;
115
+ const port = envPort ? parseInt(envPort, 10) : optPort;
116
+ const strictPort = !!envPort;
114
117
  const { flow } = await import('./vite.js');
115
118
  const allPlugins = [
116
119
  flowServerUrlPlugin(host === true),
@@ -122,13 +125,13 @@ export default function config(
122
125
  ...baseLogger,
123
126
  info: (msg: string, opts?: { clear?: boolean }) => {
124
127
  const t = msg.replace(/\s+/g, ' ');
125
- if (/VITE\s+v?\d|ready\s+in|Local:\s*http|Network:\s*http|press\s+h\s+enter/i.test(t)) return;
128
+ if (/VITE\s+v?\d|ready\s+in|Local:\s*http|Network:\s*http|press\s+h\s+enter|Port\s+\d+\s+is\s+in\s+use/i.test(t)) return;
126
129
  baseLogger.info(msg, opts);
127
130
  },
128
131
  };
129
132
  return {
130
133
  resolve: Object.keys(alias).length ? { alias } : {},
131
- server: { port, host, strictPort: false },
134
+ server: { port, host, strictPort },
132
135
  customLogger,
133
136
  build: {
134
137
  rollupOptions: {
@@ -5,6 +5,11 @@
5
5
  "type": "module",
6
6
  "main": "./index.ts",
7
7
  "types": "./index.ts",
8
+ "bin": {
9
+ "flow-os-dev": "./start-dev.ts",
10
+ "flow-os-build": "./build.ts",
11
+ "flow-os-preview": "./preview.ts"
12
+ },
8
13
  "dependencies": {
9
14
  "@flow.os/core": "workspace:*",
10
15
  "@flow.os/router": "workspace:*",
@@ -1,17 +1,39 @@
1
1
  #!/usr/bin/env bun
2
2
  /**
3
3
  * Flow OS dev server runner. Loads flow.config.ts and starts the dev server.
4
- * Usage: bun node_modules/@flow.os/client/start-dev.ts (or bun packages/client/start-dev.ts in monorepo)
4
+ * Trova una porta libera (3000, 3001, …) prima di avviare, così Vite non si blocca su "trying another one".
5
5
  */
6
6
 
7
7
  import { pathToFileURL } from 'node:url';
8
8
  import { join } from 'node:path';
9
9
  import { createServer } from 'vite';
10
+ import net from 'node:net';
10
11
 
11
12
  const cwd = process.cwd();
12
13
  const configPath = join(cwd, 'flow.config.ts');
13
14
  const configUrl = pathToFileURL(configPath).href;
14
15
 
16
+ function isPortFree(port: number): Promise<boolean> {
17
+ return new Promise((resolve) => {
18
+ const s = net.createServer();
19
+ s.once('error', () => resolve(false));
20
+ s.once('listening', () => {
21
+ s.close(() => resolve(true));
22
+ });
23
+ s.listen(port, '127.0.0.1');
24
+ });
25
+ }
26
+
27
+ async function findFreePort(from: number, to: number): Promise<number> {
28
+ for (let p = from; p <= to; p++) {
29
+ if (await isPortFree(p)) return p;
30
+ }
31
+ throw new Error(`Nessuna porta libera tra ${from} e ${to}`);
32
+ }
33
+
34
+ const port = await findFreePort(3000, 3020);
35
+ process.env.FLOW_DEV_PORT = String(port);
36
+
15
37
  const mod = await import(configUrl).catch((e: Error) => {
16
38
  console.error('Flow: could not load flow.config.ts:', e.message);
17
39
  process.exit(1);
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env bun
2
+ import { pathToFileURL } from 'node:url';
3
+ import { join } from 'node:path';
4
+ import { build } from 'vite';
5
+
6
+ const cwd = process.cwd();
7
+ const configPath = join(cwd, 'flow.config.ts');
8
+ const mod = await import(pathToFileURL(configPath).href).catch((e: Error) => {
9
+ console.error('Flow: could not load flow.config.ts:', e.message);
10
+ process.exit(1);
11
+ });
12
+ const getConfig = mod.default;
13
+ const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
14
+ await build(config);
@@ -0,0 +1,45 @@
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
+ */
6
+
7
+ import { pathToFileURL } from 'node:url';
8
+ import { join } from 'node:path';
9
+ import { createServer } from 'vite';
10
+ import net from 'node:net';
11
+
12
+ const cwd = process.cwd();
13
+ const configPath = join(cwd, 'flow.config.ts');
14
+ const configUrl = pathToFileURL(configPath).href;
15
+
16
+ function isPortFree(port: number): Promise<boolean> {
17
+ return new Promise((resolve) => {
18
+ const s = net.createServer();
19
+ s.once('error', () => resolve(false));
20
+ s.once('listening', () => {
21
+ s.close(() => resolve(true));
22
+ });
23
+ s.listen(port, '127.0.0.1');
24
+ });
25
+ }
26
+
27
+ async function findFreePort(from: number, to: number): Promise<number> {
28
+ for (let p = from; p <= to; p++) {
29
+ if (await isPortFree(p)) return p;
30
+ }
31
+ throw new Error(`Nessuna porta libera tra ${from} e ${to}`);
32
+ }
33
+
34
+ const port = await findFreePort(3000, 3020);
35
+ process.env.FLOW_DEV_PORT = String(port);
36
+
37
+ const mod = await import(configUrl).catch((e: Error) => {
38
+ console.error('Flow: could not load flow.config.ts:', e.message);
39
+ process.exit(1);
40
+ });
41
+ const getConfig = mod.default;
42
+ const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
43
+ const server = await createServer(config);
44
+ await server.listen();
45
+ server.watcher.on('change', () => {});
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env bun
2
+ import { pathToFileURL } from 'node:url';
3
+ import { join } from 'node:path';
4
+ import { preview } from 'vite';
5
+
6
+ const cwd = process.cwd();
7
+ const configPath = join(cwd, 'flow.config.ts');
8
+ const mod = await import(pathToFileURL(configPath).href).catch((e: Error) => {
9
+ console.error('Flow: could not load flow.config.ts:', e.message);
10
+ process.exit(1);
11
+ });
12
+ const getConfig = mod.default;
13
+ const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
14
+ await preview(config);
@@ -1,28 +1,34 @@
1
1
  # Flow OS
2
2
 
3
- ## Comandi
3
+ Tutti i comandi dalla **root** del repo.
4
+
5
+ ---
6
+
7
+ ## Dev (sviluppo e canale dev)
4
8
 
5
9
  | Comando | Cosa fa |
6
- |--------|---------|
7
- | **dev** | Avvia il server di sviluppo (client + eventuale server). |
8
- | **build** | Build di produzione del client. |
9
- | **gen** | Rigenera `profiles/` e `packages/` da `config.json` e dai tag `// @flow: <id>` nei file. |
10
- | **version** | Aggiorna la versione (patch/minor/major o valore esatto) nei package. Solo i package indicati, altrimenti tutti. |
11
- | **release** | Pubblica su npm (tag `latest`). Solo i package indicati, altrimenti tutti. |
12
- | **publish:dev** | Pubblica su npm con tag `dev` (versione `0.0.1-dev.<timestamp>`). |
10
+ |---------|---------|
11
+ | `bun run dev` | Avvia il server di sviluppo (client + server). |
12
+ | `bun run gen` | Rigenera i template (profiles + packages in create-flow). Di solito non serve: lo fa già `publish:dev`. |
13
+ | `bun run publish:dev` | Esegue **gen** + **build** create-flow e pubblica tutto su npm con tag **dev**. |
13
14
 
14
- **Esecuzione**
15
+ **Pubblicare solo un package** (più veloce):
15
16
 
16
17
  ```bash
17
- bun run dev
18
- bun run build
19
- bun run gen
18
+ bun run publish:dev -- --client
19
+ ```
20
20
 
21
- bun run version -- patch
22
- bun run version -- patch @flow.os/client create-flow-os
21
+ (Stesso comando con `--style`, `--core`, `--router`, `--server` al posto di `--client`.)
23
22
 
24
- bun run release
25
- bun run release -- @flow.os/client create-flow-os
23
+ ---
26
24
 
27
- bun run publish:dev
28
- ```
25
+ ## Prod (release su latest)
26
+
27
+ | Comando | Cosa fa |
28
+ |---------|---------|
29
+ | `bun run version -- <patch|minor|major|X.Y.Z>` | Aggiorna la versione nei package. Es.: `patch` per tutti, oppure `bun run version -- 1.0.0` per impostare tutti a 1.0.0. |
30
+ | `bun run version -- patch @flow.os/client create-flow-os` | Aggiorna solo i package indicati. |
31
+ | `bun run release` | Pubblica su npm con tag **latest**. Va usato **dopo** aver lanciato `version`. |
32
+ | `bun run release -- @flow.os/client create-flow-os` | Pubblica solo i package indicati. |
33
+
34
+ **Ordine per una release prod:** prima `bun run version -- patch` (o minor/major), poi `bun run release`.