@chainpatrol/cli 1.0.0 → 1.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @chainpatrol/cli
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 6def719: Surface `portalVisibility` (PUBLIC / PRIVATE / DISABLED) on the `/user/orgs`
8
+ and `/user/orgs/{slug}` API responses, on `UserOrg` in the SDK, and in the
9
+ `chainpatrol orgs list` / `chainpatrol orgs get` CLI output (human, markdown,
10
+ CSV, and JSON). Server-side changes in `@chainpatrol/external-trpc` and
11
+ `@chainpatrol/validation` back the new field; both are private packages and
12
+ don't need version bumps.
13
+
14
+ ### Patch Changes
15
+
16
+ - 239bfdc: Remove non-zero exit throwing from `chainpatrol healthchecks run` when checks fail
17
+ or error, while preserving failure details in command output.
18
+ - Updated dependencies [6def719]
19
+ - @chainpatrol/sdk@1.1.0
20
+
3
21
  ## 1.0.0
4
22
 
5
23
  ### Major Changes
package/dist/cli.js CHANGED
@@ -1606,7 +1606,7 @@ async function main() {
1606
1606
  }
1607
1607
  case "orgs": {
1608
1608
  if (subcommand === "list") {
1609
- const { runOrgsList } = await import("./list-DNRSTJ63.js");
1609
+ const { runOrgsList } = await import("./list-N2TGW7MP.js");
1610
1610
  await runOrgsList({
1611
1611
  query: cli.flags.query,
1612
1612
  subscriptionStatus: cli.flags.subscriptionStatus,
@@ -1628,7 +1628,7 @@ async function main() {
1628
1628
  if (subcommand === "get") {
1629
1629
  const positionalSlug = action;
1630
1630
  const slug = positionalSlug ?? await tryResolveOrg();
1631
- const { runOrgsGet } = await import("./get-AQG3TLAK.js");
1631
+ const { runOrgsGet } = await import("./get-BZCAHKID.js");
1632
1632
  await runOrgsGet({
1633
1633
  slug,
1634
1634
  json: jsonMode,
@@ -1713,7 +1713,7 @@ async function main() {
1713
1713
  thresholds.minResults = cli.flags.minResults;
1714
1714
  if (cli.flags.lookbackHours !== void 0)
1715
1715
  thresholds.lookbackHours = cli.flags.lookbackHours;
1716
- const { runHealthchecksRun } = await import("./run-SE2SUE64.js");
1716
+ const { runHealthchecksRun } = await import("./run-RRG7D4SN.js");
1717
1717
  await runHealthchecksRun({
1718
1718
  org,
1719
1719
  id: action,
@@ -82,6 +82,7 @@ async function runOrgsGet(options) {
82
82
  "",
83
83
  `- Contact URL: ${organization.contactUrl ?? "(not set)"}`,
84
84
  `- Subscription status: ${organization.subscriptionStatus}`,
85
+ `- Portal visibility: ${organization.portalVisibility}`,
85
86
  `- Services: ${summarizeServices(organization)}`,
86
87
  `- Integrations: ${summarizeIntegrations(organization)}`,
87
88
  `- Obligatory admin approval: ${summarizeObligatoryAdminApproval(organization)}`,
@@ -100,6 +101,7 @@ async function runOrgsGet(options) {
100
101
  name: organization.name,
101
102
  contactUrl: organization.contactUrl ?? "",
102
103
  subscriptionStatus: organization.subscriptionStatus,
104
+ portalVisibility: organization.portalVisibility,
103
105
  reportingActive: organization.services.reporting.active,
104
106
  reviewingActive: organization.services.reviewing.active,
105
107
  protectionActive: organization.services.protection.active,
@@ -133,6 +135,7 @@ async function runOrgsGet(options) {
133
135
  console.log(`${organization.name} (slug: ${organization.slug})`);
134
136
  console.log(` contactUrl: ${organization.contactUrl ?? "(not set)"}`);
135
137
  console.log(` subscriptionStatus: ${organization.subscriptionStatus}`);
138
+ console.log(` portalVisibility: ${organization.portalVisibility}`);
136
139
  console.log(` services: ${summarizeServices(organization)}`);
137
140
  console.log(` integrations: ${summarizeIntegrations(organization)}`);
138
141
  console.log(
@@ -238,7 +238,7 @@ async function runOrgsList(options) {
238
238
  `# Organizations (${organizations.length})`,
239
239
  "",
240
240
  ...organizations.map(
241
- (org) => `- \`${org.slug}\` \u2014 ${org.name} \u2014 ${org.subscriptionStatus} \u2014 contact: ${org.contactUrl ?? "(not set)"} \u2014 ${summarizeServices(org)} \u2014 integrations: ${summarizeIntegrations(org)} \u2014 admin-approval: ${summarizeObligatoryAdminApproval(org)} \u2014 pending-approval: ${summarizePendingApprovals(org)} \u2014 legal: ${summarizeLegalDocuments(org)} \u2014 trademarks: ${summarizeTrademarks(org)}`
241
+ (org) => `- \`${org.slug}\` \u2014 ${org.name} \u2014 ${org.subscriptionStatus} \u2014 portal: ${org.portalVisibility} \u2014 contact: ${org.contactUrl ?? "(not set)"} \u2014 ${summarizeServices(org)} \u2014 integrations: ${summarizeIntegrations(org)} \u2014 admin-approval: ${summarizeObligatoryAdminApproval(org)} \u2014 pending-approval: ${summarizePendingApprovals(org)} \u2014 legal: ${summarizeLegalDocuments(org)} \u2014 trademarks: ${summarizeTrademarks(org)}`
242
242
  )
243
243
  ].join("\n"),
244
244
  csv: toCsvRows(
@@ -247,6 +247,7 @@ async function runOrgsList(options) {
247
247
  name: org.name,
248
248
  contactUrl: org.contactUrl ?? "",
249
249
  subscriptionStatus: org.subscriptionStatus,
250
+ portalVisibility: org.portalVisibility,
250
251
  reportingActive: org.services.reporting.active,
251
252
  reviewingActive: org.services.reviewing.active,
252
253
  protectionActive: org.services.protection.active,
@@ -285,7 +286,7 @@ async function runOrgsList(options) {
285
286
  for (const org of organizations) {
286
287
  const contact = org.contactUrl ?? "(no contact)";
287
288
  console.log(
288
- ` ${org.slug.padEnd(slugWidth)} ${org.name.padEnd(nameWidth)} ${org.subscriptionStatus.padEnd(11)} ${contact} ${summarizeServices(org)} integrations=${summarizeIntegrations(org)} admin-approval=${summarizeObligatoryAdminApproval(org)} pending-approval=${summarizePendingApprovals(org)} legal=${summarizeLegalDocuments(org)} trademarks=${summarizeTrademarks(org)}`
289
+ ` ${org.slug.padEnd(slugWidth)} ${org.name.padEnd(nameWidth)} ${org.subscriptionStatus.padEnd(11)} portal=${org.portalVisibility.padEnd(8)} ${contact} ${summarizeServices(org)} integrations=${summarizeIntegrations(org)} admin-approval=${summarizeObligatoryAdminApproval(org)} pending-approval=${summarizePendingApprovals(org)} legal=${summarizeLegalDocuments(org)} trademarks=${summarizeTrademarks(org)}`
289
290
  );
290
291
  }
291
292
  }
@@ -208,12 +208,6 @@ async function runHealthchecksRun(options) {
208
208
  }
209
209
  }
210
210
  });
211
- if (!overallOk) {
212
- throw new CliExitError(
213
- "One or more healthchecks failed or errored.",
214
- ExitCode.CHECK_FAILED
215
- );
216
- }
217
211
  }
218
212
  export {
219
213
  runHealthchecksRun
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@chainpatrol/cli",
3
3
  "description": "The official ChainPatrol CLI — terminal interface for threat detection",
4
4
  "author": "Umar Ahmed <umar@chainpatrol.io>",
5
- "version": "1.0.0",
5
+ "version": "1.1.0",
6
6
  "license": "UNLICENSED",
7
7
  "homepage": "https://chainpatrol.com/docs/cli",
8
8
  "keywords": [
@@ -33,7 +33,7 @@
33
33
  "lint": "npx oxlint ."
34
34
  },
35
35
  "dependencies": {
36
- "@chainpatrol/sdk": "1.0.0",
36
+ "@chainpatrol/sdk": "1.1.0",
37
37
  "ink": "^7.0.1",
38
38
  "meow": "^14.1.0",
39
39
  "open": "^11.0.0",