mcp-google-api 0.26.0 → 0.26.2

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/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  > * **No Support or Feature Requests:** please **do not** open issues, bug reports, or feature requests. They will not be addressed or accepted at this stage.
11
11
  > * **No Warranty:** this software is provided **"AS IS"**, without warranty of any kind, express or implied. Use it strictly for testing and evaluation purposes at your own sole risk.
12
12
 
13
- # mcp-google-api / MCP Google API server (0.26.0)
13
+ # mcp-google-api / MCP Google API server (0.26.2)
14
14
 
15
15
  <p align="center">
16
16
  <img src="https://img.shields.io/badge/node-%3E%3D24-339933?style=flat-square&logo=nodedotjs&logoColor=white" alt="Node.js >= 24">
@@ -212,11 +212,14 @@ mcp-google-api snippet --transport http --port 3100 # HTTP URL snippet
212
212
  ```bash
213
213
  mcp-google-api --ver # installed version, npmjs latest, GitHub latest (three lines)
214
214
  mcp-google-api --upgrade # npm install -g mcp-google-api@latest, then refresh skills and registrations with a summary
215
+ mcp-google-api --upgrade --develop # install the latest tagged GitHub release (any branch)
216
+ mcp-google-api --upgrade --force # force package re-download and complete reinstallation (npm install --force)
217
+ mcp-google-api --upgrade --develop --force # forced reinstall of the latest tagged GitHub release
215
218
  mcp-google-api uninstall # remove MCP registrations + skills from every enabled CLI
216
219
  mcp-google-api --uninstall # npm uninstall -g mcp-google-api
217
220
  ```
218
221
 
219
- `--upgrade` first checks the registry and skips cleanly when the installed version is already the latest; after a successful upgrade it re-runs `install` through the upgraded package and prints the starting → updated version transition plus one entry per processed CLI.
222
+ `--upgrade` reinstalls the package in every invocation with no pre-upgrade version comparison; after a successful upgrade it re-runs `install` through the upgraded package and prints the starting → updated version transition plus one entry per processed CLI. `--force` appends the npm `--force` flag so the package is re-downloaded and fully reinstalled (standard runs, with or without `--develop`, stay unforced).
220
223
 
221
224
  # Documentation
222
225
 
package/dist/cli.js CHANGED
@@ -1671,9 +1671,11 @@ var PACKAGE_UPGRADE_COMMAND = [
1671
1671
  "-g",
1672
1672
  `${DEFAULT_PACKAGE_NAME}@latest`
1673
1673
  ];
1674
+ var UPGRADE_FORCE_OPTION = "--force";
1674
1675
  var GITHUB_UPGRADE_REPOSITORY = "Ogekuri/mcp-google-api";
1675
- function buildDevelopUpgradeCommand(tag) {
1676
- return ["npm", "install", "-g", `github:${GITHUB_UPGRADE_REPOSITORY}#${tag}`];
1676
+ function buildDevelopUpgradeCommand(tag, force = false) {
1677
+ const command = ["npm", "install", "-g", `github:${GITHUB_UPGRADE_REPOSITORY}#${tag}`];
1678
+ return force ? [...command, UPGRADE_FORCE_OPTION] : command;
1677
1679
  }
1678
1680
  var PACKAGE_UNINSTALL_COMMAND = [
1679
1681
  "npm",
@@ -1781,25 +1783,40 @@ async function checkVersionIdle(deps = {}) {
1781
1783
  return result;
1782
1784
  }
1783
1785
  function parseManagementCommand(args) {
1784
- if (args.length === 1) {
1785
- const arg = args[0];
1786
- if (arg === "--ver" || arg === "--version" || arg === "--upgrade" || arg === "--uninstall") {
1787
- return arg;
1786
+ const upgradeCount = args.filter((arg) => arg === "--upgrade").length;
1787
+ if (upgradeCount === 0) {
1788
+ if (args.length === 1) {
1789
+ const arg = args[0];
1790
+ if (arg === "--ver" || arg === "--version" || arg === "--uninstall") {
1791
+ return arg;
1792
+ }
1788
1793
  }
1789
1794
  return void 0;
1790
1795
  }
1791
- if (args.length === 2) {
1792
- const hasUpgrade = args.includes("--upgrade");
1793
- const hasDevelop = args.includes("--develop") || args.includes("--dev");
1794
- if (hasUpgrade && hasDevelop) {
1795
- return "--upgrade";
1796
- }
1796
+ if (upgradeCount !== 1) {
1797
+ return void 0;
1797
1798
  }
1798
- return void 0;
1799
+ const optionTokens = args.filter(
1800
+ (arg) => arg === "--develop" || arg === "--dev" || arg === UPGRADE_FORCE_OPTION
1801
+ );
1802
+ if (args.length !== optionTokens.length + 1) {
1803
+ return void 0;
1804
+ }
1805
+ const channelCount = optionTokens.filter(
1806
+ (arg) => arg === "--develop" || arg === "--dev"
1807
+ ).length;
1808
+ const forceCount = optionTokens.filter((arg) => arg === UPGRADE_FORCE_OPTION).length;
1809
+ if (channelCount > 1 || forceCount > 1) {
1810
+ return void 0;
1811
+ }
1812
+ return "--upgrade";
1799
1813
  }
1800
1814
  function parseUpgradeChannel(args) {
1801
1815
  return args.includes("--develop") || args.includes("--dev") ? "develop" : "npm";
1802
1816
  }
1817
+ function parseUpgradeForce(args) {
1818
+ return args.includes(UPGRADE_FORCE_OPTION);
1819
+ }
1803
1820
  function runPackageManagerCommand(command, deps = {}) {
1804
1821
  const logger = deps.logger ?? Logger;
1805
1822
  const spawnImpl = deps.spawn ?? spawnSync;
@@ -1956,6 +1973,10 @@ function resolveProbeLatestVersion(probe) {
1956
1973
  }
1957
1974
  return "unknown";
1958
1975
  }
1976
+ var VERSION_REPORT_LABEL_WIDTH = 17;
1977
+ function renderVersionReportLine(label, value) {
1978
+ return `${label.padEnd(VERSION_REPORT_LABEL_WIDTH, " ")} : ${value}`;
1979
+ }
1959
1980
  async function resolveUpdatedVersion(options, deps) {
1960
1981
  const probe = await probeLatestVersion({
1961
1982
  ...deps.idleCheck,
@@ -1972,10 +1993,13 @@ async function runVersionCommand(options, deps = {}) {
1972
1993
  const npmLatest = resolveProbeLatestVersion(npmProbe);
1973
1994
  const githubLatest = githubProbe.status === "ok" ? githubProbe.version : `unknown (${githubProbe.message})`;
1974
1995
  const stdout = deps.stdout ?? process.stdout;
1975
- stdout.write(`${installedVersion}
1976
- npmjs latest: ${npmLatest}
1977
- GitHub latest: ${githubLatest}
1978
- `);
1996
+ stdout.write(
1997
+ [
1998
+ renderVersionReportLine("Current Installed", installedVersion),
1999
+ renderVersionReportLine("Latest @ NPMjs", npmLatest),
2000
+ renderVersionReportLine("Latest @ GitHub", githubLatest)
2001
+ ].join("\n") + "\n"
2002
+ );
1979
2003
  return 0;
1980
2004
  }
1981
2005
  async function runUpgradeCommand(options, deps = {}) {
@@ -1985,7 +2009,10 @@ async function runUpgradeCommand(options, deps = {}) {
1985
2009
  (deps.logger ?? Logger).error(`GitHub upgrade channel probe failed: ${githubProbe.message}`);
1986
2010
  return 1;
1987
2011
  }
1988
- const upgraded2 = runPackageUpdateCommand(buildDevelopUpgradeCommand(githubProbe.tag), deps);
2012
+ const upgraded2 = runPackageUpdateCommand(
2013
+ buildDevelopUpgradeCommand(githubProbe.tag, options.force === true),
2014
+ deps
2015
+ );
1989
2016
  if (upgraded2 !== 0) {
1990
2017
  return upgraded2;
1991
2018
  }
@@ -1994,7 +2021,8 @@ async function runUpgradeCommand(options, deps = {}) {
1994
2021
  stdout2.write(renderUpgradeSummary(options.currentVersion, githubProbe.version, outcome2));
1995
2022
  return outcome2.exitCode;
1996
2023
  }
1997
- const upgraded = runPackageUpdateCommand(PACKAGE_UPGRADE_COMMAND, deps);
2024
+ const updateCommand = options.force === true ? [...PACKAGE_UPGRADE_COMMAND, UPGRADE_FORCE_OPTION] : PACKAGE_UPGRADE_COMMAND;
2025
+ const upgraded = runPackageUpdateCommand(updateCommand, deps);
1998
2026
  if (upgraded !== 0) {
1999
2027
  return upgraded;
2000
2028
  }
@@ -3256,7 +3284,8 @@ if (isMainModule) {
3256
3284
  const managementCommand = parseManagementCommand(hideBin(process.argv));
3257
3285
  if (managementCommand !== void 0) {
3258
3286
  const upgradeChannel = parseUpgradeChannel(hideBin(process.argv));
3259
- void runManagementCommand(managementCommand, { currentVersion: packageVersion, channel: upgradeChannel }).then((code) => {
3287
+ const upgradeForce = parseUpgradeForce(hideBin(process.argv));
3288
+ void runManagementCommand(managementCommand, { currentVersion: packageVersion, channel: upgradeChannel, force: upgradeForce }).then((code) => {
3260
3289
  process.exitCode = code;
3261
3290
  }).catch((error) => {
3262
3291
  const message = error instanceof Error ? error.message : String(error);
@@ -3733,6 +3762,7 @@ Usage: mcp-google-api <command> [options]
3733
3762
  --version Alias of --ver
3734
3763
  --upgrade Upgrade the global package to the latest version and refresh installed skills
3735
3764
  --develop | --dev: install the latest tagged GitHub release (any branch)
3765
+ --force: force package re-download and complete reinstallation (npm install --force)
3736
3766
  --uninstall Remove the globally installed mcp-google-api package`
3737
3767
  ).help();
3738
3768
  cli.parse();