@erdoai/cli 0.104.0 → 0.105.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/index.js +48 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1397,6 +1397,15 @@ var ErdoClient = class {
|
|
|
1397
1397
|
// organization lends to you rather than one this org connected. It is usable
|
|
1398
1398
|
// exactly like your own for as long as the management link lives, and is not
|
|
1399
1399
|
// yours to rotate or disconnect.
|
|
1400
|
+
//
|
|
1401
|
+
// `identity_unreadable` says why `account_id` is absent: the connection's
|
|
1402
|
+
// stored credential could not be read back, so the account could not be
|
|
1403
|
+
// resolved. An absent `account_id` WITHOUT it is the other fact — the
|
|
1404
|
+
// connection genuinely has no account recorded. Do not treat the two the
|
|
1405
|
+
// same; only the second one is a connection you can fix by setting an
|
|
1406
|
+
// account. `identity_unchecked` is a third fact: the lookup itself failed this
|
|
1407
|
+
// time (a transient failure), so nothing is known about the credential — list
|
|
1408
|
+
// again rather than reconnecting.
|
|
1400
1409
|
listIntegrations() {
|
|
1401
1410
|
return this.request("GET", "/v1/integrations");
|
|
1402
1411
|
}
|
|
@@ -1946,7 +1955,40 @@ async function promptLine(question) {
|
|
|
1946
1955
|
// src/integrations.ts
|
|
1947
1956
|
function formatIntegrationListRow(i) {
|
|
1948
1957
|
const provided = i.provided_by_organization_slug ? ` provided by ${i.provided_by_organization_slug}` : "";
|
|
1949
|
-
|
|
1958
|
+
const unreadable = i.identity_unreadable ? " identity unreadable" : "";
|
|
1959
|
+
const unchecked = i.identity_unchecked ? " identity not checked" : "";
|
|
1960
|
+
return `${i.app} ${i.status} ${i.auth_type} ${i.name} ${i.id}${provided}${unreadable}${unchecked}`;
|
|
1961
|
+
}
|
|
1962
|
+
function identityNotes(rows) {
|
|
1963
|
+
const notes = [];
|
|
1964
|
+
const unreadable = rows.filter((i) => i.identity_unreadable);
|
|
1965
|
+
const owned = unreadable.filter((i) => !i.provided_by_organization_slug);
|
|
1966
|
+
if (owned.length) {
|
|
1967
|
+
notes.push(
|
|
1968
|
+
`The stored credential could not be read for ${owned.length} connection(s): ${owned.map((i) => i.id).join(", ")} \u2014 their account is unknown rather than unset. Reconnect them to restore it.`
|
|
1969
|
+
);
|
|
1970
|
+
}
|
|
1971
|
+
const byManager = /* @__PURE__ */ new Map();
|
|
1972
|
+
for (const i of unreadable) {
|
|
1973
|
+
if (!i.provided_by_organization_slug) continue;
|
|
1974
|
+
const ids = byManager.get(i.provided_by_organization_slug) ?? [];
|
|
1975
|
+
ids.push(i.id);
|
|
1976
|
+
byManager.set(i.provided_by_organization_slug, ids);
|
|
1977
|
+
}
|
|
1978
|
+
for (const [manager, ids] of byManager) {
|
|
1979
|
+
notes.push(
|
|
1980
|
+
`The stored credential could not be read for ${ids.length} connection(s) provided by ${manager}: ${ids.join(
|
|
1981
|
+
", "
|
|
1982
|
+
)} \u2014 their account is unknown rather than unset. Only ${manager} can reconnect them; ask an admin there.`
|
|
1983
|
+
);
|
|
1984
|
+
}
|
|
1985
|
+
const unchecked = rows.filter((i) => i.identity_unchecked);
|
|
1986
|
+
if (unchecked.length) {
|
|
1987
|
+
notes.push(
|
|
1988
|
+
`The account could not be checked for ${unchecked.length} connection(s) this time: ${unchecked.map((i) => i.id).join(", ")}. Nothing is known to be wrong with them; run the list again.`
|
|
1989
|
+
);
|
|
1990
|
+
}
|
|
1991
|
+
return notes;
|
|
1950
1992
|
}
|
|
1951
1993
|
|
|
1952
1994
|
// src/scope.ts
|
|
@@ -5161,8 +5203,8 @@ pagesCmd.command("restore <id>").description("Restore a previously deleted page
|
|
|
5161
5203
|
}
|
|
5162
5204
|
});
|
|
5163
5205
|
pagesCmd.command("monitor <id>").description(
|
|
5164
|
-
"Control health monitoring for a published page: --exclude stops all probing (dashboards, trackers, demos); --ack <sig> acknowledges a known failure class (mobile:overflow, desktop:resource, visual:defect, visual:score) so it stops alerting and never auto-repairs while a NEW failure class still alerts"
|
|
5165
|
-
).option("--exclude [reason]", "exclude this page from monitoring entirely (optional reason)").option("--include", "re-include the page in monitoring").option("--ack <sigs>", "comma-separated failure signatures to acknowledge (e.g. mobile:overflow,desktop:resource,visual:defect,visual:score)").option("--unack <sigs>", "comma-separated failure signatures to un-acknowledge").option("--reset", "clear all acknowledged failure signatures").action(async (id, opts) => {
|
|
5206
|
+
"Control health monitoring for a published page: --exclude stops all probing (dashboards, trackers, demos); --canary opts a PRIVATE page into the browser canary (renders it as its owner sees it and reports a broken render to the owner); --ack <sig> acknowledges a known failure class (mobile:overflow, desktop:resource, visual:defect, visual:score) so it stops alerting and never auto-repairs while a NEW failure class still alerts"
|
|
5207
|
+
).option("--exclude [reason]", "exclude this page from monitoring entirely (optional reason)").option("--include", "re-include the page in monitoring").option("--canary", "opt this private page into the browser canary").option("--no-canary", "opt this private page out of the browser canary").option("--ack <sigs>", "comma-separated failure signatures to acknowledge (e.g. mobile:overflow,desktop:resource,visual:defect,visual:score)").option("--unack <sigs>", "comma-separated failure signatures to un-acknowledge").option("--reset", "clear all acknowledged failure signatures").action(async (id, opts) => {
|
|
5166
5208
|
try {
|
|
5167
5209
|
const api = new ErdoClient();
|
|
5168
5210
|
const body = {};
|
|
@@ -5171,6 +5213,7 @@ pagesCmd.command("monitor <id>").description(
|
|
|
5171
5213
|
body.excluded = true;
|
|
5172
5214
|
body.excluded_reason = opts.exclude;
|
|
5173
5215
|
} else if (opts.exclude === true) body.excluded = true;
|
|
5216
|
+
if (opts.canary !== void 0) body.canary = opts.canary;
|
|
5174
5217
|
if (opts.ack) body.ack_add = opts.ack.split(",").map((s) => s.trim()).filter(Boolean);
|
|
5175
5218
|
if (opts.unack) body.ack_remove = opts.unack.split(",").map((s) => s.trim()).filter(Boolean);
|
|
5176
5219
|
if (opts.reset) body.ack_reset = true;
|
|
@@ -7417,6 +7460,8 @@ integrationsCmd.command("list").description("List connected integrations \u2014
|
|
|
7417
7460
|
try {
|
|
7418
7461
|
const { integrations } = await new ErdoClient().listIntegrations();
|
|
7419
7462
|
for (const i of integrations) console.log(formatIntegrationListRow(i));
|
|
7463
|
+
for (const note of identityNotes(integrations)) process.stderr.write(`${note}
|
|
7464
|
+
`);
|
|
7420
7465
|
} catch (e) {
|
|
7421
7466
|
fail(e);
|
|
7422
7467
|
}
|