@topolo/cli 0.9.1 → 0.9.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/dist/index.js +14 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1607,7 +1607,7 @@ var TopoloClient = class _TopoloClient {
|
|
|
1607
1607
|
}
|
|
1608
1608
|
const mapped = mapActionInput(entry, input2);
|
|
1609
1609
|
const service = entry.appSlug || entry.appId;
|
|
1610
|
-
|
|
1610
|
+
const result = await this.request({
|
|
1611
1611
|
service,
|
|
1612
1612
|
...entry.apiBaseUrl ? { baseUrl: entry.apiBaseUrl } : {},
|
|
1613
1613
|
method: entry.method,
|
|
@@ -1621,6 +1621,7 @@ var TopoloClient = class _TopoloClient {
|
|
|
1621
1621
|
},
|
|
1622
1622
|
confirm: options.confirm === true || entry.readOnly && !entry.destructive && !entry.requiresConfirmation
|
|
1623
1623
|
});
|
|
1624
|
+
return redactActionResult(result);
|
|
1624
1625
|
}
|
|
1625
1626
|
/**
|
|
1626
1627
|
* Introspect the current credential. Returns the caller's resolved identity,
|
|
@@ -1744,6 +1745,18 @@ function readOptionalString(value) {
|
|
|
1744
1745
|
function isRecord3(value) {
|
|
1745
1746
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1746
1747
|
}
|
|
1748
|
+
function redactActionResult(value) {
|
|
1749
|
+
if (Array.isArray(value)) return value.map(redactActionResult);
|
|
1750
|
+
if (!isRecord3(value)) return value;
|
|
1751
|
+
return Object.fromEntries(Object.entries(value).map(([key, item]) => [
|
|
1752
|
+
key,
|
|
1753
|
+
isSensitiveActionResultKey(key) ? "[REDACTED]" : redactActionResult(item)
|
|
1754
|
+
]));
|
|
1755
|
+
}
|
|
1756
|
+
function isSensitiveActionResultKey(key) {
|
|
1757
|
+
const normalized = key.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
1758
|
+
return ["authorization", "cookie", "setcookie", "proxyauthorization", "capability"].includes(normalized) || /(token|secret|password|privatekey|apikey)$/.test(normalized);
|
|
1759
|
+
}
|
|
1747
1760
|
function resolveConfiguredServiceUrl(slug, serviceUrls) {
|
|
1748
1761
|
for (const serviceKey of serviceKeyCandidates2(slug)) {
|
|
1749
1762
|
const configured = serviceUrls?.[serviceKey];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topolo/cli",
|
|
3
|
-
"version": "0.9.
|
|
4
|
-
"topoloPublishedVersion": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
|
+
"topoloPublishedVersion": "0.9.2",
|
|
5
5
|
"description": "Public command-line interface for Topolo customer organizations, developers, and agents.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"author": "Topolo",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
28
|
-
"@topolo/mcp": "0.11.
|
|
29
|
-
"@topolo/sdk": "0.11.
|
|
28
|
+
"@topolo/mcp": "0.11.9",
|
|
29
|
+
"@topolo/sdk": "0.11.9",
|
|
30
30
|
"commander": "^12.1.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|