@leeandrew94/ccm 0.1.11 → 0.1.12

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/ccm.js +7 -1
  2. package/package.json +4 -1
package/bin/ccm.js CHANGED
@@ -1,5 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ // src/cli.ts
4
+ import { readFileSync } from "fs";
5
+ import updateNotifier from "update-notifier";
6
+
3
7
  // src/config.ts
4
8
  import fs from "fs";
5
9
 
@@ -803,7 +807,8 @@ var BASH_COMPLETION = `_ccm_completions() {
803
807
  complete -F _ccm_completions ccm`;
804
808
 
805
809
  // src/cli.ts
806
- var VERSION = "0.1.0";
810
+ var pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf-8"));
811
+ var VERSION = pkg.version;
807
812
  var KNOWN_COMMANDS = /* @__PURE__ */ new Set([
808
813
  "_launch",
809
814
  "_register",
@@ -877,6 +882,7 @@ function parseArgs(argv) {
877
882
  return { command, args };
878
883
  }
879
884
  async function main() {
885
+ updateNotifier({ pkg }).notify();
880
886
  const rawArgs = process.argv.slice(2);
881
887
  if (rawArgs.includes("-v") || rawArgs.includes("--version")) {
882
888
  console.log(`ccm ${VERSION}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leeandrew94/ccm",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Claude Code Model Manager - switch between AI models per terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -38,5 +38,8 @@
38
38
  "devDependencies": {
39
39
  "tsup": "^8.0.0",
40
40
  "typescript": "^5.4.0"
41
+ },
42
+ "dependencies": {
43
+ "update-notifier": "^7.3.1"
41
44
  }
42
45
  }