create-flow-os 0.0.29 → 0.0.31

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/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "create-flow-os",
3
- "version": "0.0.29",
3
+ "version": "0.0.31",
4
4
  "license": "PolyForm-Shield-1.0.0",
5
5
  "type": "module",
6
6
  "dependencies": {
7
- "@flow-os/client": "^0.0.29"
7
+ "@flow-os/client": "^0.0.31"
8
8
  },
9
9
  "bin": {
10
10
  "create-flow-os": "./src/index.ts"
@@ -19,5 +19,8 @@
19
19
  "@types/node": "^25.3.0",
20
20
  "bun-types": "^1.3.9",
21
21
  "vite": ">=7.3.0"
22
- }
22
+ },
23
+ "files": [
24
+ "src"
25
+ ]
23
26
  }
package/src/init/index.ts CHANGED
@@ -1,11 +1,13 @@
1
1
  #!/usr/bin/env bun
2
+ // Clear subito per nascondere resolving/installing di Bun
3
+ process.stdout.write("\x1b[2J\x1b[H");
2
4
 
3
5
  import * as readline from "readline";
4
6
  import { join, dirname } from "path";
5
7
  import { fileURLToPath } from "url";
6
8
  import { libsWithConfig, toShortName, toPkgName } from "./lib";
7
9
  import { initLib, fetchFlowPackageVersions } from "./scaffold";
8
- import { box, withLoading, colors } from "./ui";
10
+ import { box, bannerBox, withLoading, colors, asciiLogo } from "./ui";
9
11
 
10
12
  const { V, Y, E, R, B } = colors;
11
13
 
@@ -37,7 +39,7 @@ if (!toInit.length) {
37
39
  }
38
40
 
39
41
  // ───────────────────────────────────────────────────────────────────────────────
40
- // Execute: init con loading UI elegante
42
+ // Execute: init con loading UI
41
43
  // ───────────────────────────────────────────────────────────────────────────────
42
44
  const pkgNames = toInit.map(toPkgName);
43
45
  await withLoading(async (onStep) => {
@@ -48,8 +50,9 @@ await withLoading(async (onStep) => {
48
50
  const iconOk = V + "◆" + R;
49
51
  const iconUnrec = Y + "?" + R;
50
52
  const iconFail = E + "✕" + R;
53
+ const lines: string[] = [asciiLogo(V), "", B + "Initialized:" + R, ...toInit.map((l) => iconOk + " " + V + l + R)];
51
54
  const out: string[] = [];
52
- out.push(box([B + "Initialized:" + R, ...toInit.map((l) => iconOk + " " + V + l + R)], V));
55
+ out.push(bannerBox("Flow OS", lines, V));
53
56
  if (skipped.length) out.push(box([B + "Unrecognized:" + R, ...skipped.map((l) => iconUnrec + " " + Y + l + R)], Y));
54
57
  console.log(out.join(""));
55
58
 
package/src/init/ui.ts CHANGED
@@ -19,6 +19,17 @@ export function pad(s: string, w: number): string {
19
19
  return s + " ".repeat(Math.max(0, w - stripAnsi(s).length));
20
20
  }
21
21
 
22
+ /** Riquadro chiuso: ╔═══ Flow OS ═══╗ con contenuto */
23
+ export function bannerBox(title: string, lines: string[], color: string, w = 74): string {
24
+ const c = color;
25
+ const inner = `═══ ${title} ═══`;
26
+ const padLen = Math.max(0, w - stripAnsi(inner).length - 2);
27
+ const top = c + "╔" + inner + "═".repeat(padLen) + "╗" + R;
28
+ const bottom = c + "╚" + "═".repeat(w) + "╝" + R;
29
+ const body = lines.map((l) => c + "║" + R + " " + pad(l, w - 2) + c + "║" + R).join("\n");
30
+ return "\n" + top + "\n" + body + "\n" + bottom + "\n";
31
+ }
32
+
22
33
  export function box(lines: string[], color: string, w = 52): string {
23
34
  const c = color;
24
35
  const top = c + "╭" + "─".repeat(w) + "╮" + R;
@@ -74,3 +85,17 @@ export async function withLoading<T>(
74
85
  }
75
86
 
76
87
  export const colors = { V, Y, E, R, B, DIM };
88
+
89
+ /** Logo ASCII pixel-style Flow OS (nessuna dipendenza, istantaneo) */
90
+ const ASCII_LOGO = `
91
+ ███████╗██╗ ██████╗ ██╗ ██╗ ██████╗ ███████╗
92
+ ██╔════╝██║ ██╔═══██╗██║ ██║ ██╔══██╗██╔════╝
93
+ █████╗ ██║ ██║ ██║██║ █╗ ██║ ██████╔╝███████╗
94
+ ██╔══╝ ██║ ██║ ██║██║███╗██║ ██╔══██╗╚════██║
95
+ ██║ ███████╗╚██████╔╝╚███╔███╔╝ ██║ ██║███████║
96
+ ╚═╝ ╚══════╝ ╚═════╝ ╚══╝╚══╝ ╚═╝ ╚═╝╚══════╝
97
+ `.trim();
98
+
99
+ export function asciiLogo(color: string): string {
100
+ return ASCII_LOGO.split("\n").map((l) => color + l + R).join("\n");
101
+ }
package/.dockerignore DELETED
@@ -1,5 +0,0 @@
1
- node_modules
2
- **/node_modules
3
- .git
4
- dist
5
- *.md
@@ -1,6 +0,0 @@
1
- {
2
- "files.exclude": {
3
- "**/node_modules": true,
4
- "**/index.html": true
5
- }
6
- }
package/Dockerfile DELETED
@@ -1,14 +0,0 @@
1
- FROM oven/bun:1
2
- WORKDIR /app
3
-
4
- COPY package.json bun.lock* ./
5
- RUN bun install --frozen-lockfile
6
-
7
- COPY . .
8
- RUN bun run build
9
-
10
- ENV NODE_ENV=production
11
- ENV PORT=3000
12
- EXPOSE 3000
13
-
14
- CMD ["bun", "run", "start"]
package/config/flow.ts DELETED
@@ -1,3 +0,0 @@
1
- import { config } from '@flow-os/client';
2
-
3
- export default config();
package/index.html DELETED
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="it">
3
- <head>
4
- <meta charset="UTF-8"/>
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
6
- <title>Flow</title>
7
- <style>html,body{margin:0;padding:0;min-height:100vh}#app{min-height:100vh;box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}</style>
8
- </head>
9
- <body>
10
- <div id="app"></div>
11
- <script type="module">document.getElementById('app').innerHTML='<h1>Flow</h1><p>Dev server ready.</p>';</script>
12
- </body>
13
- </html>
package/prova.ts DELETED
File without changes
package/prova.tsx DELETED
@@ -1,2 +0,0 @@
1
- provaaaaa
2
- sdwdw
package/tsconfig.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "types": ["bun-types", "node"],
4
- "target": "ESNext",
5
- "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "strict": true,
8
- "skipLibCheck": true,
9
- "noEmit": true,
10
- "esModuleInterop": true,
11
- "isolatedModules": true
12
- },
13
- "include": ["src/**/*.ts"],
14
- "exclude": ["node_modules"]
15
- }