@reporting-bi/cli 0.0.13 → 0.0.14

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/dist/index.js +24 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -34368,7 +34368,7 @@ function text(data) {
34368
34368
  async function mcp() {
34369
34369
  const server = new McpServer({
34370
34370
  name: "reporting-bi",
34371
- version: "0.0.13"
34371
+ version: "0.0.14"
34372
34372
  });
34373
34373
  server.tool(
34374
34374
  "status",
@@ -34870,13 +34870,28 @@ async function checkForUpdate() {
34870
34870
  saveUpdateCheck({ lastCheck: now });
34871
34871
  const latest = await fetchLatestVersion();
34872
34872
  if (!latest) return;
34873
- if (!isNewer(latest, "0.0.13")) return;
34874
- console.log(`\x1B[33mUpdating ${PACKAGE_NAME} ${"0.0.13"} \u2192 ${latest}...\x1B[0m`);
34873
+ if (!isNewer(latest, "0.0.14")) return;
34874
+ console.log(`\x1B[33mUpdating ${PACKAGE_NAME} ${"0.0.14"} \u2192 ${latest}...\x1B[0m`);
34875
34875
  (0, import_node_child_process2.execSync)(`npm install -g ${PACKAGE_NAME}@${latest}`, { stdio: "inherit" });
34876
34876
  console.log(`\x1B[32mUpdated to ${latest}.\x1B[0m`);
34877
34877
  } catch {
34878
34878
  }
34879
34879
  }
34880
+ async function forceUpdate() {
34881
+ const latest = await fetchLatestVersion();
34882
+ if (!latest) {
34883
+ console.error("Could not fetch latest version from npm.");
34884
+ process.exit(1);
34885
+ }
34886
+ if (!isNewer(latest, "0.0.14")) {
34887
+ console.log(`Already up to date (${"0.0.14"}).`);
34888
+ return;
34889
+ }
34890
+ console.log(`Updating ${PACKAGE_NAME} ${"0.0.14"} \u2192 ${latest}...`);
34891
+ (0, import_node_child_process2.execSync)(`npm install -g ${PACKAGE_NAME}@${latest}`, { stdio: "inherit" });
34892
+ console.log(`\x1B[32mUpdated to ${latest}.\x1B[0m`);
34893
+ saveUpdateCheck({ lastCheck: Date.now() });
34894
+ }
34880
34895
 
34881
34896
  // USAGE.md
34882
34897
  var USAGE_default = `Reporting.bi CLI
@@ -34888,6 +34903,8 @@ Commands:
34888
34903
  logout [domain] Logout and revoke tokens (default: active connection)
34889
34904
  use <domain> [--accounting <id>] Switch active connection and/or set accounting
34890
34905
  status Show all connections and active status
34906
+ update Force update to latest version from npm
34907
+ mcp Start MCP server (for AI agents, stdio transport)
34891
34908
 
34892
34909
  Accounting:
34893
34910
  accounting list List available accountings
@@ -34999,7 +35016,7 @@ Examples:
34999
35016
  (async () => {
35000
35017
  const [command, ...args] = process.argv.slice(2);
35001
35018
  if (command === "--version" || command === "-v") {
35002
- console.log("0.0.13");
35019
+ console.log("0.0.14");
35003
35020
  return;
35004
35021
  }
35005
35022
  await checkForUpdate();
@@ -35055,6 +35072,9 @@ Examples:
35055
35072
  case "mcp":
35056
35073
  mcp();
35057
35074
  break;
35075
+ case "update":
35076
+ forceUpdate();
35077
+ break;
35058
35078
  default:
35059
35079
  console.log(USAGE_default);
35060
35080
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reporting-bi/cli",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Reporting.bi CLI — command-line interface for the Reporting.bi platform",
6
6
  "main": "./dist/index.js",