cloudflare-mcp-smart-proxy 1.5.3 → 1.5.4

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/connector-cli.js +10 -2
  2. package/package.json +1 -1
package/connector-cli.js CHANGED
@@ -133,6 +133,10 @@ function defaultConnectorId(ecosystem, workspaceRoot) {
133
133
  return `connector.${ecosystem}.${workspaceName}`;
134
134
  }
135
135
 
136
+ function shouldInstallExistingCredential({ credentialExists, reapply, approvalCode }) {
137
+ return credentialExists && !reapply && !approvalCode;
138
+ }
139
+
136
140
  async function activationFetch(url, options = {}) {
137
141
  const response = await fetch(url, options);
138
142
  const data = await response.json().catch(() => ({}));
@@ -225,7 +229,11 @@ async function runActivation(options) {
225
229
  console.error('After approval, rerun this command with --approval-code <code>.');
226
230
  };
227
231
 
228
- if (fs.existsSync(paths.credentialPath) && !reapply) {
232
+ if (shouldInstallExistingCredential({
233
+ credentialExists: fs.existsSync(paths.credentialPath),
234
+ reapply,
235
+ approvalCode
236
+ })) {
229
237
  const connection = JSON.parse(fs.readFileSync(paths.credentialPath, 'utf8'));
230
238
  await installClaimedConnection(connection);
231
239
  return;
@@ -393,4 +401,4 @@ if (isMainEntrypoint()) {
393
401
  main();
394
402
  }
395
403
 
396
- export { isMainEntrypoint, parseArgs };
404
+ export { isMainEntrypoint, parseArgs, shouldInstallExistingCredential };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudflare-mcp-smart-proxy",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "Smart proxy for Cloudflare MCP - routes tools to cloud or local execution",
5
5
  "repository": {
6
6
  "type": "git",