lazy-skill 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/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import { installCommand } from "./commands/install.js";
9
9
  import { themeCommand } from "./commands/theme.js";
10
10
  import { listenCommand } from "./commands/listen.js";
11
11
  import { warnIfOutdated } from "./lib/version-check.js";
12
- const VERSION = "0.2.0";
12
+ const VERSION = "0.2.1";
13
13
  function help() {
14
14
  const theme = THEMES[readConfig().theme];
15
15
  const cmd = (name) => rgb(theme.accent, name.padEnd(26));
@@ -9,7 +9,9 @@ import { style, rgb } from "../ui/theme.js";
9
9
  *
10
10
  * Best-effort by design — never blocks startup, never fails the command.
11
11
  */
12
- const REGISTRY = "https://registry.npmjs.org/lazy-skill/latest";
12
+ // The package root, not /latest: the abbreviated-metadata Accept header is
13
+ // only valid here, and /latest answers 406 for it.
14
+ const REGISTRY = "https://registry.npmjs.org/lazy-skill";
13
15
  const TIMEOUT_MS = 2500;
14
16
  function isOlder(current, latest) {
15
17
  const parse = (v) => v.split(".").map((n) => Number.parseInt(n, 10) || 0);
@@ -33,7 +35,8 @@ export async function warnIfOutdated(current, theme) {
33
35
  clearTimeout(timer);
34
36
  if (!res.ok)
35
37
  return;
36
- const { version } = (await res.json());
38
+ const body = (await res.json());
39
+ const version = body["dist-tags"]?.latest;
37
40
  if (!version || !isOlder(current, version))
38
41
  return;
39
42
  console.log(` ${style.yellow("!")} You are running ${current}; ${style.bold(version)} is out.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lazy-skill",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Found an AI skill while scrolling? Install it to your computer from your phone.",
5
5
  "type": "module",
6
6
  "bin": {