uwonbot 1.2.1 → 1.2.2

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/bin/uwonbot.js +9 -7
  2. package/package.json +1 -1
package/bin/uwonbot.js CHANGED
@@ -9,12 +9,19 @@ import { startAgent } from '../src/agent.js';
9
9
  import { runSetupWizard } from '../src/setup.js';
10
10
  import { enableAutostart, disableAutostart, isAutostartEnabled } from '../src/autostart.js';
11
11
 
12
+ import { readFileSync } from 'fs';
13
+ import { fileURLToPath } from 'url';
14
+ import { dirname, join } from 'path';
15
+
16
+ const __uwonDir = dirname(fileURLToPath(import.meta.url));
17
+ const __uwonPkg = JSON.parse(readFileSync(join(__uwonDir, '..', 'package.json'), 'utf8'));
18
+
12
19
  showBanner();
13
20
 
14
21
  program
15
22
  .name('uwonbot')
16
23
  .description('Uwonbot AI Assistant — Your AI controls your computer')
17
- .version('1.1.7');
24
+ .version(__uwonPkg.version);
18
25
 
19
26
  program
20
27
  .command('login')
@@ -130,12 +137,7 @@ program
130
137
  console.log(chalk.cyan(' Checking for updates...'));
131
138
  try {
132
139
  const latest = execSync('npm view uwonbot version', { encoding: 'utf8' }).trim();
133
- const { readFileSync } = await import('fs');
134
- const { fileURLToPath } = await import('url');
135
- const { dirname, join } = await import('path');
136
- const __dirname = dirname(fileURLToPath(import.meta.url));
137
- const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8'));
138
- const current = pkg.version;
140
+ const current = __uwonPkg.version;
139
141
  if (current === latest) {
140
142
  console.log(chalk.green(` ✓ Already on latest version (v${current})`));
141
143
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uwonbot",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Uwonbot AI Assistant CLI — Your AI controls your computer",
5
5
  "main": "src/index.js",
6
6
  "bin": {