@bitsocial/bitsocial-cli 0.19.41 → 0.19.42

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/README.md CHANGED
@@ -344,7 +344,7 @@ EXAMPLES
344
344
  $ bitsocial challenge install ./my-local-challenge
345
345
  ```
346
346
 
347
- _See code: [src/cli/commands/challenge/install.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.41/src/cli/commands/challenge/install.ts)_
347
+ _See code: [src/cli/commands/challenge/install.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.42/src/cli/commands/challenge/install.ts)_
348
348
 
349
349
  ## `bitsocial challenge list`
350
350
 
@@ -367,7 +367,7 @@ EXAMPLES
367
367
  $ bitsocial challenge list -q
368
368
  ```
369
369
 
370
- _See code: [src/cli/commands/challenge/list.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.41/src/cli/commands/challenge/list.ts)_
370
+ _See code: [src/cli/commands/challenge/list.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.42/src/cli/commands/challenge/list.ts)_
371
371
 
372
372
  ## `bitsocial challenge remove NAME`
373
373
 
@@ -392,7 +392,7 @@ EXAMPLES
392
392
  $ bitsocial challenge remove @scope/my-challenge
393
393
  ```
394
394
 
395
- _See code: [src/cli/commands/challenge/remove.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.41/src/cli/commands/challenge/remove.ts)_
395
+ _See code: [src/cli/commands/challenge/remove.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.42/src/cli/commands/challenge/remove.ts)_
396
396
 
397
397
  ## `bitsocial community create`
398
398
 
@@ -417,7 +417,7 @@ EXAMPLES
417
417
  $ bitsocial community create --title 'Hello Plebs' --description 'Welcome'
418
418
  ```
419
419
 
420
- _See code: [src/cli/commands/community/create.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.41/src/cli/commands/community/create.ts)_
420
+ _See code: [src/cli/commands/community/create.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.42/src/cli/commands/community/create.ts)_
421
421
 
422
422
  ## `bitsocial community delete ADDRESSES`
423
423
 
@@ -442,7 +442,7 @@ EXAMPLES
442
442
  $ bitsocial community delete 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu
443
443
  ```
444
444
 
445
- _See code: [src/cli/commands/community/delete.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.41/src/cli/commands/community/delete.ts)_
445
+ _See code: [src/cli/commands/community/delete.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.42/src/cli/commands/community/delete.ts)_
446
446
 
447
447
  ## `bitsocial community edit ADDRESS`
448
448
 
@@ -494,7 +494,7 @@ EXAMPLES
494
494
  $ bitsocial community edit plebbit.bso --settings.fetchThumbnailUrls=false
495
495
  ```
496
496
 
497
- _See code: [src/cli/commands/community/edit.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.41/src/cli/commands/community/edit.ts)_
497
+ _See code: [src/cli/commands/community/edit.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.42/src/cli/commands/community/edit.ts)_
498
498
 
499
499
  ## `bitsocial community get [ADDRESS]`
500
500
 
@@ -525,7 +525,7 @@ EXAMPLES
525
525
  $ bitsocial community get --publicKey 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu
526
526
  ```
527
527
 
528
- _See code: [src/cli/commands/community/get.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.41/src/cli/commands/community/get.ts)_
528
+ _See code: [src/cli/commands/community/get.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.42/src/cli/commands/community/get.ts)_
529
529
 
530
530
  ## `bitsocial community list`
531
531
 
@@ -548,7 +548,7 @@ EXAMPLES
548
548
  $ bitsocial community list
549
549
  ```
550
550
 
551
- _See code: [src/cli/commands/community/list.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.41/src/cli/commands/community/list.ts)_
551
+ _See code: [src/cli/commands/community/list.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.42/src/cli/commands/community/list.ts)_
552
552
 
553
553
  ## `bitsocial community start ADDRESSES`
554
554
 
@@ -577,7 +577,7 @@ EXAMPLES
577
577
  $ bitsocial community start $(bitsocial community list -q)
578
578
  ```
579
579
 
580
- _See code: [src/cli/commands/community/start.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.41/src/cli/commands/community/start.ts)_
580
+ _See code: [src/cli/commands/community/start.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.42/src/cli/commands/community/start.ts)_
581
581
 
582
582
  ## `bitsocial community stop ADDRESSES`
583
583
 
@@ -602,7 +602,7 @@ EXAMPLES
602
602
  $ bitsocial community stop Qmb99crTbSUfKXamXwZBe829Vf6w5w5TktPkb6WstC9RFW
603
603
  ```
604
604
 
605
- _See code: [src/cli/commands/community/stop.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.41/src/cli/commands/community/stop.ts)_
605
+ _See code: [src/cli/commands/community/stop.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.42/src/cli/commands/community/stop.ts)_
606
606
 
607
607
  ## `bitsocial daemon`
608
608
 
@@ -644,7 +644,7 @@ EXAMPLES
644
644
  $ bitsocial daemon --chainProviderUrls viem --chainProviderUrls https://mainnet.infura.io/v3/YOUR_KEY
645
645
  ```
646
646
 
647
- _See code: [src/cli/commands/daemon.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.41/src/cli/commands/daemon.ts)_
647
+ _See code: [src/cli/commands/daemon.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.42/src/cli/commands/daemon.ts)_
648
648
 
649
649
  ## `bitsocial help [COMMAND]`
650
650
 
@@ -701,7 +701,7 @@ EXAMPLES
701
701
  $ bitsocial logs --since 1h -f
702
702
  ```
703
703
 
704
- _See code: [src/cli/commands/logs.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.41/src/cli/commands/logs.ts)_
704
+ _See code: [src/cli/commands/logs.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.42/src/cli/commands/logs.ts)_
705
705
 
706
706
  ## `bitsocial update check`
707
707
 
@@ -718,7 +718,7 @@ EXAMPLES
718
718
  $ bitsocial update check
719
719
  ```
720
720
 
721
- _See code: [src/cli/commands/update/check.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.41/src/cli/commands/update/check.ts)_
721
+ _See code: [src/cli/commands/update/check.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.42/src/cli/commands/update/check.ts)_
722
722
 
723
723
  ## `bitsocial update install [VERSION]`
724
724
 
@@ -747,7 +747,7 @@ EXAMPLES
747
747
  $ bitsocial update install --force
748
748
  ```
749
749
 
750
- _See code: [src/cli/commands/update/install.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.41/src/cli/commands/update/install.ts)_
750
+ _See code: [src/cli/commands/update/install.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.42/src/cli/commands/update/install.ts)_
751
751
 
752
752
  ## `bitsocial update versions`
753
753
 
@@ -769,7 +769,7 @@ EXAMPLES
769
769
  $ bitsocial update versions --limit 5
770
770
  ```
771
771
 
772
- _See code: [src/cli/commands/update/versions.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.41/src/cli/commands/update/versions.ts)_
772
+ _See code: [src/cli/commands/update/versions.ts](https://github.com/bitsocialnet/bitsocial-cli/blob/v0.19.42/src/cli/commands/update/versions.ts)_
773
773
  <!-- commandsstop -->
774
774
 
775
775
  ## Contribution
@@ -0,0 +1 @@
1
+ export declare function printBanner(): void;
@@ -0,0 +1,94 @@
1
+ // ASCII banner, edited as two parallel grids.
2
+ //
3
+ // SHAPE holds the raw glyphs (braille art + figlet text). Leave these alone
4
+ // unless you want to change the art itself.
5
+ //
6
+ // COLORS is the paint map. Each character corresponds 1:1 to the character
7
+ // at the same position in SHAPE:
8
+ // B = blue (#1a4fd0) — the sphere
9
+ // S = silver (#e5e7eb) — the rings and the "Bitsocial" text
10
+ // . = no color (pass the glyph through as-is; use this for spaces)
11
+ //
12
+ // To retouch the art, find a glyph in SHAPE, then flip the character at the
13
+ // same column in the matching COLORS row. A common case: a ring cell came out
14
+ // blue because the sphere mask had more dots there — change its 'B' to 'S'.
15
+ //
16
+ // Both grids MUST have the same number of rows. Each row in COLORS must be at
17
+ // least as wide as the corresponding SHAPE row (extra chars are ignored).
18
+ // Palette sourced from bitsocialnet/bitsocial-web/about/tailwind.config.ts.
19
+ const SHAPE = [
20
+ " ⢀⣴⣿⣿⣦⡀ ",
21
+ " ⣾⣿⠁⠈⣿⣷⡀ ",
22
+ " ⢸⣿⡇ ⢸⣿⣇ ",
23
+ " ⢀⣀⣼⣿⣷⣶⣶⣶⣿⣿⣄⡀ ",
24
+ " ⢀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⡀ ",
25
+ " ⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦ 888888b. d8b 888 d8b 888",
26
+ " ⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀ 888 \"88b Y8P 888 Y8P 888",
27
+ " ⣀⣤⣤⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣶⣦⣤⣀ 888 .88P 888 888",
28
+ "⣰⣿⡿⠛⠉⠉ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⠉⠉⠛⠟⣿⣦ 8888888K. 888 888888 .d8888b .d88b. .d8888b 888 8888b. 888",
29
+ "⠻⣷⣦⣤⣀⣀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⢀⣀⣀⣴⣿⠟ 888 \"Y88b 888 888 88K d88\"\"88b d88P\" 888 \"88b 888",
30
+ " ⠉⠛⠻⠿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠟⠛⠉ 888 888 888 888 \"Y8888b. 888 888 888 888 .d888888 888",
31
+ " ⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿ 888 d88P 888 Y88b. X88 Y88..88P Y88b. 888 888 888 888",
32
+ " ⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟ 8888888P\" 888 \"Y888 88888P' \"Y88P\" \"Y8888P 888 \"Y888888 888",
33
+ " ⠈⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠁ ",
34
+ " ⠉⠛⢿⣿⣿⣿⣿⣿⣿⣿⠛⠉ ",
35
+ " ⢸⣿⡆ ⣿⡿ ",
36
+ " ⠈⢿⣷⡀⣸⣿⠃ ",
37
+ " ⠈⠿⣿⡿⠃ "
38
+ ];
39
+ const COLORS = [
40
+ "................SSSSSS.......................................................................................",
41
+ "................SSSSSSS......................................................................................",
42
+ "...............SSSSSSSS......................................................................................",
43
+ ".............BBBBBBBBSSBB....................................................................................",
44
+ "..........BBBBBBBBBBBSSBBBBB.................................................................................",
45
+ ".........BBBBBBBBBBBBSSBBBBBB...............SSSSSSSS...SSS.SSS...............................SSS..........SSS",
46
+ ".......BBBBBBBBBBBBBBSSBBBBBBBB.............SSS..SSSS..SSS.SSS...............................SSS..........SSS",
47
+ "..SSSSSBBBBBBBBBBBBBBSSBBBBBBBBSSSSSSS......SSS..SSSS......SSS............................................SSS",
48
+ "SSSSSS.BBBBBBBBBBBBBBSSBBBBBBBBSSSSSSS......SSSSSSSSS..SSS.SSSSSS.SSSSSSS...SSSSSS...SSSSSSS.SSS..SSSSSS..SSS",
49
+ "SSSSSS.BBBBBBBBBBBBBBSSBBBBBBBBSSSSSSS......SSS..SSSSS.SSS.SSS....SSS......SSSSSSSS.SSSSS....SSS.....SSSS.SSS",
50
+ "..SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS......SSS....SSS.SSS.SSS....SSSSSSSS.SSS..SSS.SSS......SSS.SSSSSSSS.SSS",
51
+ ".......BBBBBBBBBBBBBBSSBBBBBBBBBBBBBBB......SSS...SSSS.SSS.SSSSS.......SSS.SSSSSSSS.SSSSS....SSS.SSS..SSS.SSS",
52
+ ".........BBBBBBBBBBBBSSBBBBBBBBB............SSSSSSSSS..SSS..SSSSS..SSSSSSS..SSSSSS...SSSSSSS.SSS.SSSSSSSS.SSS",
53
+ "..........BBBBBBBBBBBSSBBBBBBB...............................................................................",
54
+ ".............BBBBBBBBSSBBBB..................................................................................",
55
+ "...............SSSSSSSSS.....................................................................................",
56
+ "...............SSSSSSSS......................................................................................",
57
+ "................SSSSSS......................................................................................."
58
+ ];
59
+ const BLUE = "\x1b[38;2;26;79;208m";
60
+ const SILVER = "\x1b[38;2;229;231;235m";
61
+ const RESET = "\x1b[0m";
62
+ function paint(shape, colors) {
63
+ let out = "";
64
+ let current = ".";
65
+ for (let i = 0; i < shape.length; i++) {
66
+ const glyph = shape[i];
67
+ const want = colors[i] ?? ".";
68
+ if (want !== current) {
69
+ if (current !== ".")
70
+ out += RESET;
71
+ if (want === "B")
72
+ out += BLUE;
73
+ else if (want === "S")
74
+ out += SILVER;
75
+ current = want;
76
+ }
77
+ out += glyph;
78
+ }
79
+ if (current !== ".")
80
+ out += RESET;
81
+ return out;
82
+ }
83
+ function supportsColor() {
84
+ if (process.env["NO_COLOR"])
85
+ return false;
86
+ if (process.env["FORCE_COLOR"])
87
+ return true;
88
+ return Boolean(process.stdout.isTTY);
89
+ }
90
+ export function printBanner() {
91
+ const useColor = supportsColor();
92
+ const lines = SHAPE.map((row, i) => (useColor ? paint(row, COLORS[i] ?? "") : row));
93
+ process.stdout.write(lines.join("\n") + "\n\n");
94
+ }
@@ -5,6 +5,7 @@ import path from "path";
5
5
  import tcpPortUsed from "tcp-port-used";
6
6
  import { getLanIpV4Address, PKCLogger, setupDebugLogger, loadKuboConfigFile, parseMultiAddrKuboRpcToUrl, parseMultiAddrIpfsGatewayToUrl } from "../../util.js";
7
7
  import { startDaemonServer } from "../../webui/daemon-server.js";
8
+ import { printBanner } from "../ascii-banner.js";
8
9
  import { loadChallengesIntoPKC } from "../../challenge-packages/challenge-utils.js";
9
10
  import { migrateDataDirectory } from "../../common-utils/data-migration.js";
10
11
  import { createBsoResolvers } from "../../common-utils/resolvers.js";
@@ -149,6 +150,7 @@ export default class Daemon extends Command {
149
150
  return { logFilePath, stdoutWrite };
150
151
  }
151
152
  async run() {
153
+ printBanner();
152
154
  // Non-blocking update check — fire-and-forget, won't delay startup
153
155
  import("../../update/npm-registry.js")
154
156
  .then(({ fetchLatestVersion }) => fetchLatestVersion().then(async (latest) => {
@@ -0,0 +1,3 @@
1
+ import { Hook } from "@oclif/core";
2
+ declare const hook: Hook<"init">;
3
+ export default hook;
@@ -0,0 +1,15 @@
1
+ import { printBanner } from "../../ascii-banner.js";
2
+ const hook = async function (opts) {
3
+ // Skip when --version is being handled by version-hook
4
+ if (process.argv.includes("--version"))
5
+ return;
6
+ // Show banner on bare `bitsocial` invocation (no command, no help flag).
7
+ // oclif sets opts.id to undefined when no command is matched; argv length > 2
8
+ // means the user passed flags/args and expects normal command output.
9
+ const bareInvocation = process.argv.length <= 2;
10
+ const helpInvocation = !opts.id && (process.argv.includes("--help") || process.argv.includes("-h") || process.argv.includes("help"));
11
+ if (bareInvocation || helpInvocation) {
12
+ printBanner();
13
+ }
14
+ };
15
+ export default hook;
@@ -703,5 +703,5 @@
703
703
  ]
704
704
  }
705
705
  },
706
- "version": "0.19.41"
706
+ "version": "0.19.42"
707
707
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitsocial/bitsocial-cli",
3
- "version": "0.19.41",
3
+ "version": "0.19.42",
4
4
  "description": "Command line interface to Bitsocial API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "homepage": "https://github.com/bitsocialnet/bitsocial-cli",
@@ -62,7 +62,8 @@
62
62
  },
63
63
  "hooks": {
64
64
  "init": [
65
- "./dist/cli/hooks/init/version-hook"
65
+ "./dist/cli/hooks/init/version-hook",
66
+ "./dist/cli/hooks/init/banner-hook"
66
67
  ],
67
68
  "prerun": [
68
69
  "./dist/cli/hooks/prerun/parse-dynamic-flags-hook"