@involvex/syncstuff-cli 0.0.2 → 0.0.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@involvex/syncstuff-cli",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "homepage": "https://syncstuff-web.involvex.workers.dev/",
6
6
  "sponsor": {
@@ -10,7 +10,7 @@
10
10
  "name": "involvex"
11
11
  },
12
12
  "bin": {
13
- "syncstuff": "src/cli/index.ts"
13
+ "syncstuff": "dist/cli.js"
14
14
  },
15
15
  "scripts": {
16
16
  "dev": "bun run src/cli/index.ts",
@@ -13,7 +13,7 @@ export function showversion() {
13
13
  try {
14
14
  const packagePath = join(__dirname, "../../../package.json");
15
15
  const packageJson = JSON.parse(readFileSync(packagePath, "utf-8"));
16
- const version = packageJson.version || "0.0.1";
16
+ const version = packageJson.version;
17
17
 
18
18
  const versionBox = createBox(
19
19
  chalk.cyan.bold("Syncstuff CLI\n\n") +
package/src/utils/ui.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import boxen from "boxen";
2
2
  import chalk from "chalk";
3
+ import { readFileSync } from "fs";
3
4
  import ora from "ora";
5
+ import { join } from "path";
4
6
  import Table from "table";
5
7
 
6
8
  export function success(message: string): void {
@@ -69,9 +71,12 @@ export function animateText(text: string, delay: number = 50): Promise<void> {
69
71
  }
70
72
 
71
73
  export function printHeader(): void {
74
+ const packagePath = join(__dirname, "../../../../package.json");
75
+ const packageJson = JSON.parse(readFileSync(packagePath, "utf-8"));
76
+ const version = packageJson.version;
72
77
  const header = chalk.cyan.bold(`
73
78
  ╔═══════════════════════════════════════╗
74
- ║ Syncstuff CLI v0.0.1
79
+ ║ Syncstuff CLI v${version}
75
80
  ║ Seamless Sync Across Devices ║
76
81
  ╚═══════════════════════════════════════╝
77
82
  `);