@capgo/cli 4.10.10 → 4.10.11

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
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [4.10.11](https://github.com/Cap-go/CLI/compare/v4.10.10...v4.10.11) (2024-06-05)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * rename method to get id ([60fa77b](https://github.com/Cap-go/CLI/commit/60fa77b69ceb5f540357856ed9f3a886e0641337))
11
+
5
12
  ### [4.10.10](https://github.com/Cap-go/CLI/compare/v4.10.9...v4.10.10) (2024-06-03)
6
13
 
7
14
 
package/dist/index.js CHANGED
@@ -31048,8 +31048,8 @@ var require_fetch3 = __commonJS({
31048
31048
  session.expires_at = (0, helpers_1.expiresAt)(data.expires_in);
31049
31049
  }
31050
31050
  }
31051
- const user2 = (_a = data.user) !== null && _a !== void 0 ? _a : data;
31052
- return { data: { session, user: user2 }, error: null };
31051
+ const user = (_a = data.user) !== null && _a !== void 0 ? _a : data;
31052
+ return { data: { session, user }, error: null };
31053
31053
  }
31054
31054
  exports2._sessionResponse = _sessionResponse;
31055
31055
  function _sessionResponsePassword(data) {
@@ -31062,8 +31062,8 @@ var require_fetch3 = __commonJS({
31062
31062
  exports2._sessionResponsePassword = _sessionResponsePassword;
31063
31063
  function _userResponse(data) {
31064
31064
  var _a;
31065
- const user2 = (_a = data.user) !== null && _a !== void 0 ? _a : data;
31066
- return { data: { user: user2 }, error: null };
31065
+ const user = (_a = data.user) !== null && _a !== void 0 ? _a : data;
31066
+ return { data: { user }, error: null };
31067
31067
  }
31068
31068
  exports2._userResponse = _userResponse;
31069
31069
  function _ssoResponse(data) {
@@ -31079,11 +31079,11 @@ var require_fetch3 = __commonJS({
31079
31079
  redirect_to,
31080
31080
  verification_type
31081
31081
  };
31082
- const user2 = Object.assign({}, rest);
31082
+ const user = Object.assign({}, rest);
31083
31083
  return {
31084
31084
  data: {
31085
31085
  properties,
31086
- user: user2
31086
+ user
31087
31087
  },
31088
31088
  error: null
31089
31089
  };
@@ -31724,12 +31724,12 @@ var require_GoTrueClient = __commonJS({
31724
31724
  return { data: { user: null, session: null }, error };
31725
31725
  }
31726
31726
  const session = data.session;
31727
- const user2 = data.user;
31727
+ const user = data.user;
31728
31728
  if (data.session) {
31729
31729
  await this._saveSession(data.session);
31730
31730
  await this._notifyAllSubscribers("SIGNED_IN", session);
31731
31731
  }
31732
- return { data: { user: user2, session }, error: null };
31732
+ return { data: { user, session }, error: null };
31733
31733
  } catch (error) {
31734
31734
  if ((0, errors_1.isAuthError)(error)) {
31735
31735
  return { data: { user: null, session: null }, error };
@@ -31794,12 +31794,12 @@ var require_GoTrueClient = __commonJS({
31794
31794
  return { data: { user: null, session: null }, error };
31795
31795
  }
31796
31796
  const session = data.session;
31797
- const user2 = data.user;
31797
+ const user = data.user;
31798
31798
  if (data.session) {
31799
31799
  await this._saveSession(data.session);
31800
31800
  await this._notifyAllSubscribers("SIGNED_IN", session);
31801
31801
  }
31802
- return { data: { user: user2, session }, error: null };
31802
+ return { data: { user, session }, error: null };
31803
31803
  } catch (error) {
31804
31804
  if ((0, errors_1.isAuthError)(error)) {
31805
31805
  return { data: { user: null, session: null }, error };
@@ -32047,12 +32047,12 @@ var require_GoTrueClient = __commonJS({
32047
32047
  throw new Error("An error occurred on token verification.");
32048
32048
  }
32049
32049
  const session = data.session;
32050
- const user2 = data.user;
32050
+ const user = data.user;
32051
32051
  if (session === null || session === void 0 ? void 0 : session.access_token) {
32052
32052
  await this._saveSession(session);
32053
32053
  await this._notifyAllSubscribers(params.type == "recovery" ? "PASSWORD_RECOVERY" : "SIGNED_IN", session);
32054
32054
  }
32055
- return { data: { user: user2, session }, error: null };
32055
+ return { data: { user, session }, error: null };
32056
32056
  } catch (error) {
32057
32057
  if ((0, errors_1.isAuthError)(error)) {
32058
32058
  return { data: { user: null, session: null }, error };
@@ -33287,11 +33287,11 @@ var require_GoTrueClient = __commonJS({
33287
33287
  * {@see GoTrueMFAApi#listFactors}
33288
33288
  */
33289
33289
  async _listFactors() {
33290
- const { data: { user: user2 }, error: userError } = await this.getUser();
33290
+ const { data: { user }, error: userError } = await this.getUser();
33291
33291
  if (userError) {
33292
33292
  return { data: null, error: userError };
33293
33293
  }
33294
- const factors = (user2 === null || user2 === void 0 ? void 0 : user2.factors) || [];
33294
+ const factors = (user === null || user === void 0 ? void 0 : user.factors) || [];
33295
33295
  const totp = factors.filter((factor) => factor.factor_type === "totp" && factor.status === "verified");
33296
33296
  return {
33297
33297
  data: {
@@ -110508,7 +110508,7 @@ async function getUserId(options) {
110508
110508
  // package.json
110509
110509
  var package_default = {
110510
110510
  name: "@capgo/cli",
110511
- version: "4.10.10",
110511
+ version: "4.10.11",
110512
110512
  description: "A CLI to upload to capgo servers",
110513
110513
  author: "github.com/riderx",
110514
110514
  license: "Apache 2.0",
@@ -113109,8 +113109,8 @@ program.command("upload [appId]").alias("u").description("(Deprecated) Upload a
113109
113109
  "--min-update-version <minUpdateVersion>",
113110
113110
  "Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel"
113111
113111
  );
113112
- var user = program.command("user").description("Manage user");
113113
- user.command("account").alias("a").description("Get your account ID").action(getUserId).option("-a, --apikey <apikey>", "apikey to link to your account");
113112
+ var account = program.command("account").description("Manage account");
113113
+ account.command("id").description("Get your account ID").action(getUserId).option("-a, --apikey <apikey>", "apikey to link to your account");
113114
113114
  program.parseAsync();
113115
113115
  /*! Bundled license information:
113116
113116
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
- "version": "4.10.10",
3
+ "version": "4.10.11",
4
4
  "description": "A CLI to upload to capgo servers",
5
5
  "author": "github.com/riderx",
6
6
  "license": "Apache 2.0",
package/src/index.ts CHANGED
@@ -294,12 +294,11 @@ program
294
294
  'Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel',
295
295
  )
296
296
 
297
- const user = program
298
- .command('user')
299
- .description('Manage user')
297
+ const account = program
298
+ .command('account')
299
+ .description('Manage account')
300
300
 
301
- user.command('account')
302
- .alias('a')
301
+ account.command('id')
303
302
  .description('Get your account ID')
304
303
  .action(getUserId)
305
304
  .option('-a, --apikey <apikey>', 'apikey to link to your account')