create-flow-os 0.0.32 → 0.0.33
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 +2 -2
- package/src/init/index.ts +3 -4
- package/src/init/ui.ts +40 -31
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-flow-os",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"license": "PolyForm-Shield-1.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@flow-os/client": "^0.0.
|
|
7
|
+
"@flow-os/client": "^0.0.33"
|
|
8
8
|
},
|
|
9
9
|
"bin": {
|
|
10
10
|
"create-flow-os": "./src/index.ts"
|
package/src/init/index.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { join, dirname } from "path";
|
|
|
7
7
|
import { fileURLToPath } from "url";
|
|
8
8
|
import { libsWithConfig, toShortName, toPkgName } from "./lib";
|
|
9
9
|
import { initLib, fetchFlowPackageVersions } from "./scaffold";
|
|
10
|
-
import { box,
|
|
10
|
+
import { box, withLoading, colors, headerLogo } from "./ui";
|
|
11
11
|
|
|
12
12
|
const { V, Y, E, R, B } = colors;
|
|
13
13
|
|
|
@@ -50,10 +50,9 @@ await withLoading(async (onStep) => {
|
|
|
50
50
|
const iconOk = V + "◆" + R;
|
|
51
51
|
const iconUnrec = Y + "?" + R;
|
|
52
52
|
const iconFail = E + "✕" + R;
|
|
53
|
-
const logoLines = headerLogo().split("\n");
|
|
54
|
-
const lines: string[] = [...logoLines, "", B + "Initialized:" + R, ...toInit.map((l) => iconOk + " " + V + l + R)];
|
|
55
53
|
const out: string[] = [];
|
|
56
|
-
out.push(
|
|
54
|
+
out.push(headerLogo() + "\n");
|
|
55
|
+
out.push(box([B + "Initialized:" + R, ...toInit.map((l) => iconOk + " " + V + l + R)], V));
|
|
57
56
|
if (skipped.length) out.push(box([B + "Unrecognized:" + R, ...skipped.map((l) => iconUnrec + " " + Y + l + R)], Y));
|
|
58
57
|
console.log(out.join(""));
|
|
59
58
|
|
package/src/init/ui.ts
CHANGED
|
@@ -88,42 +88,51 @@ const W = "\x1b[97m"; // bianco
|
|
|
88
88
|
|
|
89
89
|
export const colors = { V, Y, E, R, B, DIM, W };
|
|
90
90
|
|
|
91
|
-
/** Icona layers: 3 quadrati arrotondati sovrapposti
|
|
91
|
+
/** Icona layers: 3 quadrati arrotondati sovrapposti, vista isometrica con shading ▓▒░ */
|
|
92
92
|
const LAYERS_ICON = [
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
93
|
+
" ▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
94
|
+
" ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
95
|
+
" ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
96
|
+
" ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
97
|
+
" ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
98
|
+
" ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
99
|
+
" ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
100
|
+
" ▓▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
101
|
+
" ▓▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
102
|
+
" ▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
103
|
+
" ░▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ ",
|
|
104
|
+
" ▒▒▒░░░░░░▓▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░▒▒▒▓▓▓▓ ",
|
|
105
|
+
" ▒▒▒▒▒░░░░░░░░▓▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░▒▒▒▒▓▓▓▓▓▓▓ ",
|
|
106
|
+
" ▓▒▒▒▒▒▒▒▒▒░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░▒▒▒▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
107
|
+
" ▒▒▒▒▒▓▓▒▒▒▒▒▒░░░░░░░░░▒▒▓▓▓▓▓▓▓▓▓▓▓▒░░░▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
108
|
+
" ▒▒▒▒▒▒▒▒▒▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
109
|
+
" ▒▒▒▒▒▒▒▒▒▒▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
110
|
+
" ▒░░░▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓ ",
|
|
111
|
+
" ▒▒▒▒░░░░░░▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒░▒▒▒▓▓▓▓▓▓ ",
|
|
112
|
+
" ▒▒▒▒▒▒▒░░░░░░░▓▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒░▒▒▒▓▓▓▓▓▓▓▓▓ ",
|
|
113
|
+
" ▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░▒▒▓▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒░░▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
114
|
+
" ▒▒▒▒▒▒▒▓▓▒▒▒▒▒▒░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▒░░▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
115
|
+
" ▒▒▒▒▒▒▒▒▒▒▓▓▒▒▒▒▒▒▒░░░░░░▒░▒▒▒▒▒░░▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
116
|
+
" ▒▒▒▒▒▒▒▒▒▒▒▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
117
|
+
" ▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
118
|
+
" ▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
119
|
+
" ▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
120
|
+
" ▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
|
|
121
|
+
" ▒▒▒▒▓▓▓▓▓▓▓▓▓ ",
|
|
105
122
|
];
|
|
106
123
|
|
|
107
124
|
const FLOW_OS_TEXT = [
|
|
108
|
-
" ███████╗██╗ ██████╗ ██╗ ██╗
|
|
109
|
-
" ██╔════╝██║ ██╔═══██╗██║ ██║
|
|
110
|
-
" █████╗ ██║ ██║ ██║██║ █╗ ██║
|
|
111
|
-
" ██╔══╝ ██║ ██║ ██║██║███╗██║
|
|
112
|
-
" ██║ ███████╗╚██████╔╝╚███╔███╔╝
|
|
113
|
-
" ╚═╝ ╚══════╝ ╚═════╝ ╚══╝╚══╝
|
|
125
|
+
" ███████╗██╗ ██████╗ ██╗ ██╗ ╔█████═╗███████╗",
|
|
126
|
+
" ██╔════╝██║ ██╔═══██╗██║ ██║ ██ ██║██╔════╝",
|
|
127
|
+
" █████╗ ██║ ██║ ██║██║ █╗ ██║ ██ ██║███████╗",
|
|
128
|
+
" ██╔══╝ ██║ ██║ ██║██║███╗██║ ██ ██║╚════██║",
|
|
129
|
+
" ██║ ███████╗╚██████╔╝╚███╔███╔╝ ╚█████═╝███████║",
|
|
130
|
+
" ╚═╝ ╚══════╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝",
|
|
114
131
|
];
|
|
115
132
|
|
|
133
|
+
/** Logo (ASCII utente) sopra, scritta Flow OS sotto, entrambi fuori dal box */
|
|
116
134
|
export function headerLogo(): string {
|
|
117
|
-
const
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
const layersW = 20;
|
|
121
|
-
const out: string[] = [];
|
|
122
|
-
for (let i = 0; i < maxLines; i++) {
|
|
123
|
-
const l = layersLines[i] ?? "";
|
|
124
|
-
const t = textLines[i] ?? "";
|
|
125
|
-
const pad = " ".repeat(Math.max(0, layersW - l.length));
|
|
126
|
-
out.push(W + l + pad + " " + t + R);
|
|
127
|
-
}
|
|
128
|
-
return out.join("\n");
|
|
135
|
+
const logo = LAYERS_ICON.map((l) => W + l + R).join("\n");
|
|
136
|
+
const text = FLOW_OS_TEXT.map((t) => W + t + R).join("\n");
|
|
137
|
+
return logo + "\n\n" + text;
|
|
129
138
|
}
|