@flow-os/client 0.0.47-dev.1772043836 → 0.0.47-dev.1772043897

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli/dev.ts +10 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flow-os/client",
3
- "version": "0.0.47-dev.1772043836",
3
+ "version": "0.0.47-dev.1772043897",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/cli/dev.ts CHANGED
@@ -151,7 +151,9 @@ export async function dev() {
151
151
  httpServer.removeListener('error', onError);
152
152
  const T = '\x1b[1;38;2;255;0;135m'; // bold #ff0087
153
153
  const U = '\x1b[38;2;255;0;135m';
154
- const W = 42;
154
+ const W_COL = '\x1b[97m'; // bianco
155
+ const W = 46;
156
+ const innerW = W - 4;
155
157
  const proto = useHttps ? 'https' : 'http';
156
158
  const local = `${proto}://localhost:${port}`;
157
159
  const network = host ? getNetworkUrl(port, useHttps) : null;
@@ -161,14 +163,15 @@ export async function dev() {
161
163
  const pad = (s: string, len: number) => s + ' '.repeat(Math.max(0, len - strip(s).length));
162
164
  const inner = ' ' + T + 'Flow OS' + R + ' ';
163
165
  const innerLen = strip(inner).length;
164
- const half = Math.max(0, Math.floor((W - 2 - innerLen) / 2));
165
- const top = '╭' + '─'.repeat(half) + inner + '─'.repeat(W - 2 - half - innerLen) + '╮';
166
- const bottom = '' + '─'.repeat(W - 2) + '';
167
- const emptyLine = '' + ' '.repeat(PAD_LEFT) + ' '.repeat(W - PAD_LEFT) + '';
166
+ const half = Math.max(0, Math.floor((innerW - innerLen) / 2));
167
+ const rest = innerW - half - innerLen;
168
+ const top = '' + '─'.repeat(half) + inner + W_COL + '─'.repeat(rest) + '';
169
+ const bottom = '' + W_COL + ''.repeat(innerW) + '';
170
+ const emptyLine = '│' + ' '.repeat(PAD_LEFT) + ' '.repeat(innerW - PAD_LEFT) + '│';
168
171
  const localContent = iconLocal + ' Local: ' + U + local + R;
169
- const localLine = '│' + ' '.repeat(PAD_LEFT) + pad(localContent, W - PAD_LEFT) + '│';
172
+ const localLine = '│' + ' '.repeat(PAD_LEFT) + pad(localContent, innerW - PAD_LEFT) + '│';
170
173
  const netContent = network ? iconNetwork + ' Network: ' + U + network + R : iconNetwork + ' Network: (not exposed)';
171
- const networkLine = '│' + ' '.repeat(PAD_LEFT) + pad(netContent, W - PAD_LEFT) + '│';
174
+ const networkLine = '│' + ' '.repeat(PAD_LEFT) + pad(netContent, innerW - PAD_LEFT) + '│';
172
175
  const banner = '\x1b[2A\r\x1b[K\n' + top + '\n' + emptyLine + '\n' + localLine + '\n' + networkLine + '\n' + bottom + '\n\n';
173
176
  process.stdout.write(banner);
174
177
  resolve();