mcp-google-api 0.26.0 → 0.26.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/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.1)
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;
1798
+ }
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;
1797
1811
  }
1798
- return void 0;
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;
@@ -1985,7 +2002,10 @@ async function runUpgradeCommand(options, deps = {}) {
1985
2002
  (deps.logger ?? Logger).error(`GitHub upgrade channel probe failed: ${githubProbe.message}`);
1986
2003
  return 1;
1987
2004
  }
1988
- const upgraded2 = runPackageUpdateCommand(buildDevelopUpgradeCommand(githubProbe.tag), deps);
2005
+ const upgraded2 = runPackageUpdateCommand(
2006
+ buildDevelopUpgradeCommand(githubProbe.tag, options.force === true),
2007
+ deps
2008
+ );
1989
2009
  if (upgraded2 !== 0) {
1990
2010
  return upgraded2;
1991
2011
  }
@@ -1994,7 +2014,8 @@ async function runUpgradeCommand(options, deps = {}) {
1994
2014
  stdout2.write(renderUpgradeSummary(options.currentVersion, githubProbe.version, outcome2));
1995
2015
  return outcome2.exitCode;
1996
2016
  }
1997
- const upgraded = runPackageUpdateCommand(PACKAGE_UPGRADE_COMMAND, deps);
2017
+ const updateCommand = options.force === true ? [...PACKAGE_UPGRADE_COMMAND, UPGRADE_FORCE_OPTION] : PACKAGE_UPGRADE_COMMAND;
2018
+ const upgraded = runPackageUpdateCommand(updateCommand, deps);
1998
2019
  if (upgraded !== 0) {
1999
2020
  return upgraded;
2000
2021
  }
@@ -3256,7 +3277,8 @@ if (isMainModule) {
3256
3277
  const managementCommand = parseManagementCommand(hideBin(process.argv));
3257
3278
  if (managementCommand !== void 0) {
3258
3279
  const upgradeChannel = parseUpgradeChannel(hideBin(process.argv));
3259
- void runManagementCommand(managementCommand, { currentVersion: packageVersion, channel: upgradeChannel }).then((code) => {
3280
+ const upgradeForce = parseUpgradeForce(hideBin(process.argv));
3281
+ void runManagementCommand(managementCommand, { currentVersion: packageVersion, channel: upgradeChannel, force: upgradeForce }).then((code) => {
3260
3282
  process.exitCode = code;
3261
3283
  }).catch((error) => {
3262
3284
  const message = error instanceof Error ? error.message : String(error);
@@ -3733,6 +3755,7 @@ Usage: mcp-google-api <command> [options]
3733
3755
  --version Alias of --ver
3734
3756
  --upgrade Upgrade the global package to the latest version and refresh installed skills
3735
3757
  --develop | --dev: install the latest tagged GitHub release (any branch)
3758
+ --force: force package re-download and complete reinstallation (npm install --force)
3736
3759
  --uninstall Remove the globally installed mcp-google-api package`
3737
3760
  ).help();
3738
3761
  cli.parse();