@erdoai/cli 0.55.0 → 0.55.1

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/dist/index.js +13 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -783,6 +783,12 @@ var ErdoClient = class {
783
783
  connectIntegration(body) {
784
784
  return this.request("POST", "/v1/integrations-connect", body);
785
785
  }
786
+ // `connected` reports whether the connection exists, which is not the same as
787
+ // whether it works: a key retired at the provider leaves status 'connected'
788
+ // here, because the connector platform keeps signing calls with it and simply
789
+ // relays the provider's refusal. `provider_auth_failed_at` is when that last
790
+ // happened, and the `note` says so in words — a connection carrying one needs
791
+ // reauthorizing even though nothing else looks wrong.
786
792
  checkIntegrationConnection(app) {
787
793
  return this.request("GET", `/v1/integrations-connect/${encodeURIComponent(app)}`);
788
794
  }
@@ -3707,7 +3713,7 @@ integrationsCmd.command("apps [query]").description("Search connectable apps (na
3707
3713
  fail(e);
3708
3714
  }
3709
3715
  });
3710
- integrationsCmd.command("connect <app>").description("Connect an app \u2014 pass its API key or other credentials with -c, or omit them to get a browser connect URL for OAuth apps").option("-c, --credential <key=value...>", "credential field, e.g. -c api_key=\u2026 (repeatable); rejected by OAuth apps, which have no credential to pass", (v, acc) => acc.concat(v), []).option("-n, --name <name>", "display name for the connection").action(async (app, opts) => {
3716
+ integrationsCmd.command("connect <app>").description("Connect an app \u2014 pass its API key or other credentials with -c, or omit them to get a browser connect URL for OAuth apps").option("-c, --credential <key=value...>", "credential field, e.g. -c api_key=\u2026 (repeatable); rejected by OAuth apps, which have no credential to pass", (v, acc) => acc.concat(v), []).option("-n, --name <name>", "display name for the connection").option("--rotate", "replace the credentials of the app's existing connection instead of adding a second one \u2014 for a key that was rotated at the provider; requires -c").action(async (app, opts) => {
3711
3717
  try {
3712
3718
  let credentials;
3713
3719
  if (opts.credential.length) {
@@ -3718,7 +3724,12 @@ integrationsCmd.command("connect <app>").description("Connect an app \u2014 pass
3718
3724
  credentials[c.slice(0, eq)] = c.slice(eq + 1);
3719
3725
  }
3720
3726
  }
3721
- const res = await new ErdoClient().connectIntegration({ app, name: opts.name, credentials });
3727
+ const res = await new ErdoClient().connectIntegration({
3728
+ app,
3729
+ name: opts.name,
3730
+ credentials,
3731
+ rotate_credentials: opts.rotate || void 0
3732
+ });
3722
3733
  print(res);
3723
3734
  const notes = [];
3724
3735
  const org2 = formatOrg(res.organization_name, res.organization_slug);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.55.0",
3
+ "version": "0.55.1",
4
4
  "description": "Erdo CLI — drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {