@lovenyberg/ove 0.2.0 → 0.2.1

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/bin/ove.ts CHANGED
@@ -1,10 +1,28 @@
1
1
  #!/usr/bin/env bun
2
2
 
3
- import { existsSync } from "node:fs";
3
+ import { existsSync, readFileSync } from "node:fs";
4
4
  import { join } from "node:path";
5
5
  import { createInterface } from "node:readline/promises";
6
6
  import { validateConfig, runSetup } from "../src/setup";
7
7
 
8
+ async function checkForUpdate(): Promise<void> {
9
+ try {
10
+ const pkgPath = join(import.meta.dir, "..", "package.json");
11
+ const { name, version: current } = JSON.parse(readFileSync(pkgPath, "utf-8"));
12
+ const res = await fetch(`https://registry.npmjs.org/${name}/latest`, {
13
+ signal: AbortSignal.timeout(3000),
14
+ });
15
+ if (!res.ok) return;
16
+ const { version: latest } = await res.json() as { version: string };
17
+ if (latest && latest !== current) {
18
+ process.stdout.write(`\n Update available: ${current} → ${latest}\n`);
19
+ process.stdout.write(` Run: npm install -g ${name}\n\n`);
20
+ }
21
+ } catch {
22
+ // Silent fail — don't block startup for update checks
23
+ }
24
+ }
25
+
8
26
  const args = process.argv.slice(2);
9
27
  const command = args[0];
10
28
 
@@ -23,7 +41,8 @@ if (command === "init") {
23
41
  }
24
42
 
25
43
  if (command === "start" || !command) {
26
- process.stdout.write("\n Checking config...\n");
44
+ await checkForUpdate();
45
+ process.stdout.write(" Checking config...\n");
27
46
  const { valid, issues } = validateConfig();
28
47
 
29
48
  if (!valid) {
Binary file
package/docs/index.html CHANGED
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <link rel="icon" href="favicon.ico">
6
7
  <title>Ove — Your Grumpy Dev Companion</title>
7
8
  <link rel="preconnect" href="https://fonts.googleapis.com">
8
9
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovenyberg/ove",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Your grumpy but meticulous dev companion. AI coding agent for Slack, WhatsApp, Telegram, Discord, GitHub, HTTP API, and CLI.",
5
5
  "type": "module",
6
6
  "bin": {
package/docs/CNAME DELETED
@@ -1 +0,0 @@
1
- ove.jacksoncage.se