@reporting-bi/cli 0.0.17 → 0.0.18

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 +15 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -34446,7 +34446,7 @@ function text(data) {
34446
34446
  async function mcp() {
34447
34447
  const server = new McpServer({
34448
34448
  name: "reporting-bi",
34449
- version: "0.0.17"
34449
+ version: "0.0.18"
34450
34450
  });
34451
34451
  server.tool(
34452
34452
  "status",
@@ -34920,11 +34920,14 @@ var CHECK_INTERVAL = 60 * 60 * 1e3;
34920
34920
  var PACKAGE_NAME = "@reporting-bi/cli";
34921
34921
  var INSTALL_PREFIX = detectPrefix();
34922
34922
  function detectPrefix() {
34923
- const binDir = path4.dirname(process.argv[1]);
34924
- const libIndex = binDir.indexOf(path4.join("lib", "node_modules"));
34925
- if (libIndex > 0) {
34926
- const prefix = binDir.slice(0, libIndex - 1);
34927
- if (prefix !== "/usr" && prefix !== "/usr/local") return prefix;
34923
+ try {
34924
+ const realPath = fs6.realpathSync(process.argv[1]);
34925
+ const libIndex = realPath.indexOf(path4.join("lib", "node_modules"));
34926
+ if (libIndex > 0) {
34927
+ const prefix = realPath.slice(0, libIndex - 1);
34928
+ if (prefix !== "/usr" && prefix !== "/usr/local") return prefix;
34929
+ }
34930
+ } catch {
34928
34931
  }
34929
34932
  return null;
34930
34933
  }
@@ -34987,8 +34990,8 @@ async function checkForUpdate() {
34987
34990
  saveUpdateCheck({ lastCheck: now });
34988
34991
  const latest = await fetchLatestVersion();
34989
34992
  if (!latest) return;
34990
- if (!isNewer(latest, "0.0.17")) return;
34991
- console.log(`\x1B[33mUpdating ${PACKAGE_NAME} ${"0.0.17"} \u2192 ${latest}...\x1B[0m`);
34993
+ if (!isNewer(latest, "0.0.18")) return;
34994
+ console.log(`\x1B[33mUpdating ${PACKAGE_NAME} ${"0.0.18"} \u2192 ${latest}...\x1B[0m`);
34992
34995
  (0, import_node_child_process2.execSync)(npmInstallCmd(latest), { stdio: "inherit" });
34993
34996
  console.log(`\x1B[32mUpdated to ${latest}.\x1B[0m`);
34994
34997
  } catch {
@@ -35000,11 +35003,11 @@ async function forceUpdate() {
35000
35003
  console.error("Could not fetch latest version from npm.");
35001
35004
  process.exit(1);
35002
35005
  }
35003
- if (!isNewer(latest, "0.0.17")) {
35004
- console.log(`Already up to date (${"0.0.17"}).`);
35006
+ if (!isNewer(latest, "0.0.18")) {
35007
+ console.log(`Already up to date (${"0.0.18"}).`);
35005
35008
  return;
35006
35009
  }
35007
- console.log(`Updating ${PACKAGE_NAME} ${"0.0.17"} \u2192 ${latest}...`);
35010
+ console.log(`Updating ${PACKAGE_NAME} ${"0.0.18"} \u2192 ${latest}...`);
35008
35011
  (0, import_node_child_process2.execSync)(npmInstallCmd(latest), { stdio: "inherit" });
35009
35012
  console.log(`\x1B[32mUpdated to ${latest}.\x1B[0m`);
35010
35013
  saveUpdateCheck({ lastCheck: Date.now() });
@@ -35142,7 +35145,7 @@ Examples:
35142
35145
  (async () => {
35143
35146
  const [command, ...args] = process.argv.slice(2);
35144
35147
  if (command === "--version" || command === "-v") {
35145
- console.log("0.0.17");
35148
+ console.log("0.0.18");
35146
35149
  return;
35147
35150
  }
35148
35151
  await checkForUpdate();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reporting-bi/cli",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Reporting.bi CLI — command-line interface for the Reporting.bi platform",
6
6
  "main": "./dist/index.js",