create-message-kit 1.0.19 → 1.0.21
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/index.js +16 -12
- package/package.json +1 -1
package/index.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
import { program } from "commander";
|
3
3
|
import { dirname, resolve } from "node:path";
|
4
4
|
import { fileURLToPath } from "node:url";
|
5
|
-
import {
|
5
|
+
import { log, outro, text, select } from "@clack/prompts";
|
6
6
|
import { default as fs } from "fs-extra";
|
7
7
|
import { isCancel } from "@clack/prompts";
|
8
8
|
import pc from "picocolors";
|
@@ -14,21 +14,25 @@ const packageJson = JSON.parse(
|
|
14
14
|
fs.readFileSync(resolve(__dirname, "package.json"), "utf8"),
|
15
15
|
);
|
16
16
|
const version = packageJson.version;
|
17
|
-
|
17
|
+
const pckMessageKitLib = JSON.parse(
|
18
|
+
fs.readFileSync(resolve(__dirname, "../message-kit/package.json"), "utf8"),
|
19
|
+
);
|
20
|
+
const versionMessageKitLib = pckMessageKitLib.version;
|
18
21
|
program
|
19
22
|
.name("byob")
|
20
23
|
.description("CLI to initialize projects")
|
21
24
|
.action(async () => {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
25
|
+
log.info(pc.cyan(`Welcome to MessageKit v${versionMessageKitLib}!`));
|
26
|
+
const coolLogo = `
|
27
|
+
███╗ ███╗███████╗███████╗███████╗ █████╗ ██████╗ ███████╗██╗ ██╗██╗████████╗
|
28
|
+
████╗ ████║██╔════╝██╔════╝██╔════╝██╔══██╗██╔════╝ ██╔════╝██║ ██╔╝██║╚══██╔══╝
|
29
|
+
██╔████╔██║█████╗ ███████╗███████╗███████║██║ ███╗█████╗ █████╔╝ ██║ ██║
|
30
|
+
██║╚██╔╝██║██╔══╝ ╚════██║╚════██║██╔══██║██║ ██║██╔══╝ ██╔═██╗ ██║ ██║
|
31
|
+
██║ ╚═╝ ██║███████╗███████║███████║██║ ██║╚██████╔╝███████╗██║ ██╗██║ ██║
|
32
|
+
╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝
|
33
|
+
Powered by XMTP`;
|
34
|
+
|
35
|
+
log.info(pc.red(coolLogo));
|
32
36
|
|
33
37
|
const { templateType, displayName, destDir } = await gatherProjectInfo();
|
34
38
|
|