@flow-os/client 0.0.47 → 0.0.50
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/config/package.json +2 -2
- package/package.json +1 -5
- package/src/cli/dev.ts +9 -6
- package/src/config/index.ts +4 -0
- package/tsconfig.json +17 -0
package/config/package.json
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "flow-os dev",
|
|
8
8
|
"build": "flow-os build",
|
|
9
|
-
"start": "bun
|
|
9
|
+
"start": "bun ./node_modules/@flow-os/server/src/bin.ts"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@flow-os/client": "^0.0.
|
|
12
|
+
"@flow-os/client": "^0.0.47"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"vite": ">=7.3.0"
|
package/package.json
CHANGED
package/src/cli/dev.ts
CHANGED
|
@@ -152,6 +152,7 @@ export async function dev() {
|
|
|
152
152
|
const T = '\x1b[1;38;2;255;0;135m'; // bold #ff0087
|
|
153
153
|
const U = '\x1b[38;2;255;0;135m';
|
|
154
154
|
const W = 46;
|
|
155
|
+
const innerW = W - 4;
|
|
155
156
|
const proto = useHttps ? 'https' : 'http';
|
|
156
157
|
const local = `${proto}://localhost:${port}`;
|
|
157
158
|
const network = host ? getNetworkUrl(port, useHttps) : null;
|
|
@@ -161,14 +162,16 @@ export async function dev() {
|
|
|
161
162
|
const pad = (s: string, len: number) => s + ' '.repeat(Math.max(0, len - strip(s).length));
|
|
162
163
|
const inner = ' ' + T + 'Flow OS' + R + ' ';
|
|
163
164
|
const innerLen = strip(inner).length;
|
|
164
|
-
const half = Math.max(0, Math.floor((
|
|
165
|
-
const
|
|
166
|
-
const
|
|
165
|
+
const half = Math.max(0, Math.floor((innerW - innerLen) / 2));
|
|
166
|
+
const rest = innerW - half - innerLen;
|
|
167
|
+
const top = U + '╭' + '─'.repeat(half) + inner + U + '─'.repeat(rest) + '╮' + R;
|
|
168
|
+
const bottom = U + '╰' + '─'.repeat(innerW) + '╯' + R;
|
|
169
|
+
const emptyLine = U + '│' + R + ' '.repeat(PAD_LEFT) + ' '.repeat(innerW - PAD_LEFT) + U + '│' + R;
|
|
167
170
|
const localContent = iconLocal + ' Local: ' + U + local + R;
|
|
168
|
-
const localLine = '│' + ' '.repeat(PAD_LEFT) + pad(localContent,
|
|
171
|
+
const localLine = U + '│' + R + ' '.repeat(PAD_LEFT) + pad(localContent, innerW - PAD_LEFT) + U + '│' + R;
|
|
169
172
|
const netContent = network ? iconNetwork + ' Network: ' + U + network + R : iconNetwork + ' Network: (not exposed)';
|
|
170
|
-
const networkLine = '│' + ' '.repeat(PAD_LEFT) + pad(netContent,
|
|
171
|
-
const banner = '\x1b[2A\r\x1b[K\n' + top + '\n' + localLine + '\n' + networkLine + '\n' + bottom + '\n\n';
|
|
173
|
+
const networkLine = U + '│' + R + ' '.repeat(PAD_LEFT) + pad(netContent, innerW - PAD_LEFT) + U + '│' + R;
|
|
174
|
+
const banner = '\x1b[2A\r\x1b[K\n' + top + '\n' + emptyLine + '\n' + localLine + '\n' + networkLine + '\n' + bottom + '\n\n';
|
|
172
175
|
process.stdout.write(banner);
|
|
173
176
|
resolve();
|
|
174
177
|
});
|
package/src/config/index.ts
CHANGED
|
@@ -16,6 +16,10 @@ function OPTIONS(opts: UserOptions): Omit<UserConfig, 'plugins'> {
|
|
|
16
16
|
port: opts.port ?? 3000,
|
|
17
17
|
...(useHttps && { https: true }),
|
|
18
18
|
} as UserConfig['server'],
|
|
19
|
+
esbuild: {
|
|
20
|
+
jsx: 'automatic',
|
|
21
|
+
jsxImportSource: '@flow-os/router',
|
|
22
|
+
},
|
|
19
23
|
};
|
|
20
24
|
}
|
|
21
25
|
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"types": ["bun-types"],
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"noEmit": true,
|
|
10
|
+
"declaration": true,
|
|
11
|
+
"declarationMap": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"isolatedModules": true
|
|
14
|
+
},
|
|
15
|
+
"include": ["src/**/*.ts", "src/**/*.d.ts"],
|
|
16
|
+
"exclude": ["node_modules"]
|
|
17
|
+
}
|