@solidactions/cli 3.23.0 → 3.25.0

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/dist/utils/mcp.js CHANGED
@@ -39,6 +39,9 @@ var __importStar = (this && this.__importStar) || (function () {
39
39
  return result;
40
40
  };
41
41
  })();
42
+ var __importDefault = (this && this.__importDefault) || function (mod) {
43
+ return (mod && mod.__esModule) ? mod : { "default": mod };
44
+ };
42
45
  Object.defineProperty(exports, "__esModule", { value: true });
43
46
  exports.McpRpcError = void 0;
44
47
  exports.retryAfterSeconds = retryAfterSeconds;
@@ -47,6 +50,7 @@ exports.callCrewsTool = callCrewsTool;
47
50
  exports.resolveDocsCall = resolveDocsCall;
48
51
  exports.callDocsTool = callDocsTool;
49
52
  exports.callCrewsToolContent = callCrewsToolContent;
53
+ const chalk_1 = __importDefault(require("chalk"));
50
54
  const http = __importStar(require("http"));
51
55
  const https = __importStar(require("https"));
52
56
  const url_1 = require("url");
@@ -140,6 +144,12 @@ async function postMcpTool(config, endpointPath, toolName, args) {
140
144
  process.stderr.write(`solidactions: rate limited by server (429); retrying in ${waitSec}s (attempt ${n + 1}/${RATE_LIMIT_MAX_ATTEMPTS})\n`);
141
145
  await new Promise((resolve) => setTimeout(resolve, waitSec * 1000));
142
146
  }
147
+ if (last.status === 401) {
148
+ // One transport-level 401 branch for every MCP caller (cli#184): the host
149
+ // line every other command prints, never the raw body.
150
+ process.stderr.write(chalk_1.default.red((0, api_1.authFailedLine)(config.host)) + '\n');
151
+ process.exit(1);
152
+ }
143
153
  if (last.status === 404) {
144
154
  throw new Error(`MCP request failed: ${parsed.host} has no ${endpointPath} endpoint — the server may be older or newer than this CLI (${CLI_VERSION}). Raw: HTTP 404 ${last.raw}`);
145
155
  }
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.escapeJsonDisplayText = escapeJsonDisplayText;
6
7
  exports.sanitizeDisplayText = sanitizeDisplayText;
7
8
  exports.formatRevisionSummary = formatRevisionSummary;
8
9
  exports.revisionSha = revisionSha;
@@ -20,7 +21,17 @@ const path_1 = __importDefault(require("path"));
20
21
  const child_process_1 = require("child_process");
21
22
  const form_data_1 = __importDefault(require("form-data"));
22
23
  const table_1 = require("./table");
23
- const DISPLAY_FORMATTING = /[\x00-\x1f\x7f\u061c\u200b-\u200f\u202a-\u202e\u2060\u2066-\u2069\ufeff]/g;
24
+ const DISPLAY_FORMATTING = /[\x00-\x1f\x7f-\x9f\u061c\u200b-\u200f\u202a-\u202e\u2060\u2066-\u2069\ufeff]/g;
25
+ /**
26
+ * Escape every character of the shared display-formatting class as a `\uXXXX`
27
+ * sequence inside an already-serialised JSON string, so terminal-unsafe
28
+ * characters never reach stdout raw while `JSON.parse` still recovers the
29
+ * exact values (cli#189). Machine-readable values are untouched, only their
30
+ * encoding.
31
+ */
32
+ function escapeJsonDisplayText(serialised) {
33
+ return serialised.replace(DISPLAY_FORMATTING, (character) => `\\u${character.charCodeAt(0).toString(16).padStart(4, '0')}`);
34
+ }
24
35
  const SHA_PATTERN = /^[0-9a-f]{7,64}$/i;
25
36
  const STRICT_ISO_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/;
26
37
  function displayValue(value, maxLength) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidactions/cli",
3
- "version": "3.23.0",
3
+ "version": "3.25.0",
4
4
  "description": "SolidActions CLI - Deploy and manage workflow automation",
5
5
  "main": "dist/index.js",
6
6
  "bin": {