create-flow-os 0.0.1-dev.1771777456 → 0.0.1-dev.1771778757
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 +5 -4
- package/package.json +1 -1
- package/profiles/client/README.md +24 -18
- package/profiles/client/package.json +3 -3
- package/profiles/client/packages/client/package.json +5 -0
- package/profiles/client/scripts/build.ts +14 -0
- package/profiles/client/scripts/dev.ts +23 -0
- package/profiles/client/scripts/preview.ts +14 -0
- package/profiles/full/README.md +24 -18
- package/profiles/full/package.json +3 -3
- package/profiles/full/packages/client/package.json +5 -0
- package/profiles/full/scripts/build.ts +14 -0
- package/profiles/full/scripts/dev.ts +23 -0
- package/profiles/full/scripts/preview.ts +14 -0
- package/profiles/server/README.md +24 -18
package/bin/index.js
CHANGED
|
@@ -820,13 +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
|
|
826
|
+
if (drop.has(key))
|
|
826
827
|
continue;
|
|
827
|
-
let s = value
|
|
828
|
-
if (
|
|
829
|
-
s =
|
|
828
|
+
let s = value;
|
|
829
|
+
if (key === "start" && /@flow\.os\/server\/start\.ts/.test(s))
|
|
830
|
+
s = "server";
|
|
830
831
|
out[key] = s;
|
|
831
832
|
}
|
|
832
833
|
return Object.keys(out).length ? out : undefined;
|
package/package.json
CHANGED
|
@@ -1,28 +1,34 @@
|
|
|
1
1
|
# Flow OS
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
|
8
|
-
|
|
|
9
|
-
| **gen**
|
|
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
|
-
**
|
|
15
|
+
**Pubblicare solo un package** (più veloce):
|
|
15
16
|
|
|
16
17
|
```bash
|
|
17
|
-
bun run dev
|
|
18
|
-
|
|
19
|
-
bun run gen
|
|
18
|
+
bun run publish:dev -- --client
|
|
19
|
+
```
|
|
20
20
|
|
|
21
|
-
|
|
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
|
-
|
|
25
|
-
bun run release -- @flow.os/client create-flow-os
|
|
23
|
+
---
|
|
26
24
|
|
|
27
|
-
|
|
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
|
|
8
|
-
"build": "tsc -b && bun
|
|
9
|
-
"preview": "bun
|
|
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",
|
|
@@ -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:*",
|
|
@@ -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,23 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
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)
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { pathToFileURL } from 'node:url';
|
|
8
|
+
import { join } from 'node:path';
|
|
9
|
+
import { createServer } from 'vite';
|
|
10
|
+
|
|
11
|
+
const cwd = process.cwd();
|
|
12
|
+
const configPath = join(cwd, 'flow.config.ts');
|
|
13
|
+
const configUrl = pathToFileURL(configPath).href;
|
|
14
|
+
|
|
15
|
+
const mod = await import(configUrl).catch((e: Error) => {
|
|
16
|
+
console.error('Flow: could not load flow.config.ts:', e.message);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
});
|
|
19
|
+
const getConfig = mod.default;
|
|
20
|
+
const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
|
|
21
|
+
const server = await createServer(config);
|
|
22
|
+
await server.listen();
|
|
23
|
+
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);
|
package/profiles/full/README.md
CHANGED
|
@@ -1,28 +1,34 @@
|
|
|
1
1
|
# Flow OS
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
|
8
|
-
|
|
|
9
|
-
| **gen**
|
|
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
|
-
**
|
|
15
|
+
**Pubblicare solo un package** (più veloce):
|
|
15
16
|
|
|
16
17
|
```bash
|
|
17
|
-
bun run dev
|
|
18
|
-
|
|
19
|
-
bun run gen
|
|
18
|
+
bun run publish:dev -- --client
|
|
19
|
+
```
|
|
20
20
|
|
|
21
|
-
|
|
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
|
-
|
|
25
|
-
bun run release -- @flow.os/client create-flow-os
|
|
23
|
+
---
|
|
26
24
|
|
|
27
|
-
|
|
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
|
|
8
|
-
"build": "tsc -b && bun
|
|
9
|
-
"preview": "bun
|
|
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",
|
|
@@ -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:*",
|
|
@@ -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,23 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
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)
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { pathToFileURL } from 'node:url';
|
|
8
|
+
import { join } from 'node:path';
|
|
9
|
+
import { createServer } from 'vite';
|
|
10
|
+
|
|
11
|
+
const cwd = process.cwd();
|
|
12
|
+
const configPath = join(cwd, 'flow.config.ts');
|
|
13
|
+
const configUrl = pathToFileURL(configPath).href;
|
|
14
|
+
|
|
15
|
+
const mod = await import(configUrl).catch((e: Error) => {
|
|
16
|
+
console.error('Flow: could not load flow.config.ts:', e.message);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
});
|
|
19
|
+
const getConfig = mod.default;
|
|
20
|
+
const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
|
|
21
|
+
const server = await createServer(config);
|
|
22
|
+
await server.listen();
|
|
23
|
+
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
|
-
|
|
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
|
-
|
|
|
8
|
-
|
|
|
9
|
-
| **gen**
|
|
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
|
-
**
|
|
15
|
+
**Pubblicare solo un package** (più veloce):
|
|
15
16
|
|
|
16
17
|
```bash
|
|
17
|
-
bun run dev
|
|
18
|
-
|
|
19
|
-
bun run gen
|
|
18
|
+
bun run publish:dev -- --client
|
|
19
|
+
```
|
|
20
20
|
|
|
21
|
-
|
|
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
|
-
|
|
25
|
-
bun run release -- @flow.os/client create-flow-os
|
|
23
|
+
---
|
|
26
24
|
|
|
27
|
-
|
|
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`.
|