@scalar/cli 2.10.0 → 2.11.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.
Files changed (99) hide show
  1. package/README.md +82 -1290
  2. package/chunks/{action-YSVTZVKV.js → action-25QMCP5G.js} +37 -26
  3. package/chunks/{action-X7BA7PQQ.js → action-2VF6LODL.js} +20 -18
  4. package/chunks/{action-5N3P43MD.js → action-5I4XDPPG.js} +16 -15
  5. package/chunks/action-6M5PTDF6.js +100 -0
  6. package/chunks/{action-PAM2EZ22.js → action-73ELLN3T.js} +8 -7
  7. package/chunks/{action-XOADBXSX.js → action-7H3AWCHX.js} +17 -16
  8. package/chunks/{action-KDUFU7TZ.js → action-BRSLSOE5.js} +19 -16
  9. package/chunks/{action-7XOHYWYM.js → action-CQQCKSNS.js} +13 -15
  10. package/chunks/action-D5QWDNQ2.js +65 -0
  11. package/chunks/{action-5RL4NWUZ.js → action-DQDHBOLJ.js} +33 -30
  12. package/chunks/{action-DKDRAIKV.js → action-EYPYQQVM.js} +13 -15
  13. package/chunks/{action-ZFI77WA5.js → action-FMA5ECUA.js} +10 -10
  14. package/chunks/{action-DTEO4YNX.js → action-GXDJLF2G.js} +13 -11
  15. package/chunks/{action-657A4K2D.js → action-HUICEXJZ.js} +26 -23
  16. package/chunks/action-IH6G77C5.js +38 -0
  17. package/chunks/{action-H3RTILLM.js → action-IIQMZVRJ.js} +1 -1
  18. package/chunks/action-IQM54ITT.js +164 -0
  19. package/chunks/{action-EAUTQ77U.js → action-J5TO3UJW.js} +26 -24
  20. package/chunks/{action-UUL6SWV4.js → action-KC3ZCNDR.js} +12 -14
  21. package/chunks/{action-HT42NUUX.js → action-L7TMS3Q3.js} +40 -38
  22. package/chunks/{action-GWYYTUTM.js → action-LAAHRDSR.js} +5 -5
  23. package/chunks/{action-5LF4XYHX.js → action-LR75GHBA.js} +12 -12
  24. package/chunks/{action-PPTFYZWD.js → action-MJMLQFLT.js} +12 -12
  25. package/chunks/action-NHU4CUKT.js +130 -0
  26. package/chunks/{action-4GZI2M5B.js → action-NKTFNFU7.js} +19 -17
  27. package/chunks/{action-CB55NWAU.js → action-NMW5WPD2.js} +9 -9
  28. package/chunks/{action-GFLRD7LO.js → action-OTPXODUE.js} +8 -8
  29. package/chunks/{action-R4PGILN4.js → action-RPCDNGCI.js} +47 -36
  30. package/chunks/{action-TOBU74JH.js → action-RQCXSJPZ.js} +51 -27
  31. package/chunks/{action-JEYDBB3P.js → action-SOYSVG67.js} +15 -15
  32. package/chunks/action-Y7EBKCUU.js +16 -0
  33. package/chunks/{action-XLE37MZL.js → action-YN4TE7TG.js} +23 -22
  34. package/chunks/{action-CABLS46Q.js → action-ZGNVWTHZ.js} +11 -11
  35. package/chunks/{action-4W5GUGEG.js → action-ZKKRPLDK.js} +20 -19
  36. package/chunks/{action-ZKA3RR3S.js → action-ZUZL7R3H.js} +18 -17
  37. package/chunks/{actions-3SAMH7A5.js → actions-S6K76HCW.js} +23 -20
  38. package/chunks/{agent-2ESZI7NO.js → agent-IRNEV4K5.js} +44 -9
  39. package/chunks/{asyncapi-4HGVM3PR.js → asyncapi-WQPIQMEZ.js} +13 -12
  40. package/chunks/{build.action-VBGFGACM.js → build.action-CLBVKFWD.js} +28 -26
  41. package/chunks/chunk-25XERWCE.js +1058 -0
  42. package/chunks/{chunk-35Z7VTJT.js → chunk-3RIUDHLG.js} +52 -38
  43. package/chunks/{chunk-ZYBLQ5CT.js → chunk-3TFOA64C.js} +9 -4
  44. package/chunks/{chunk-CWVYOXXM.js → chunk-4JKXZ5CF.js} +11 -7
  45. package/chunks/{chunk-XAGJJNQW.js → chunk-5L7V7RCH.js} +10 -10
  46. package/chunks/{chunk-KZNRQVMY.js → chunk-ALYM4ZB2.js} +1 -1
  47. package/chunks/chunk-AVZFSWPD.js +37 -0
  48. package/chunks/{chunk-GYRQPDTK.js → chunk-BQYVSPAI.js} +14 -2
  49. package/chunks/{chunk-UDBSV3CK.js → chunk-CSSTCHHF.js} +6083 -4167
  50. package/chunks/{chunk-ZGNDXPLU.js → chunk-DQD2753S.js} +3 -3
  51. package/chunks/{action-F2ZJNURT.js → chunk-EBNFCIKS.js} +7 -10
  52. package/chunks/{chunk-ATNTXKMS.js → chunk-F3OPMYME.js} +118 -38
  53. package/chunks/{chunk-KHF2QXBG.js → chunk-FG5AOTDN.js} +1433 -641
  54. package/chunks/{chunk-K2HIB5BA.js → chunk-GKCVATQJ.js} +3 -3
  55. package/chunks/{chunk-BIMLCGKS.js → chunk-GMHIK5K2.js} +1 -1
  56. package/chunks/{chunk-5SMP756H.js → chunk-GYR5E6RB.js} +2 -2
  57. package/chunks/{chunk-MC4EMNOR.js → chunk-HZN6IIPZ.js} +7 -6
  58. package/chunks/{chunk-VVRUSQCY.js → chunk-I57ID5K7.js} +13 -0
  59. package/chunks/{chunk-VYFGRLVQ.js → chunk-KOD2HX5I.js} +1 -1
  60. package/chunks/{chunk-ZKJPLWRJ.js → chunk-LOLVJNI5.js} +4 -4
  61. package/chunks/{chunk-GLWTVLKM.js → chunk-MN2AFJXM.js} +9 -2
  62. package/chunks/{chunk-WB6PWTMU.js → chunk-N5CJ5MTY.js} +1 -1
  63. package/chunks/{chunk-JXGF5EHC.js → chunk-NWJ37GI2.js} +23 -13
  64. package/chunks/{chunk-3ZJYGGAA.js → chunk-ORCUZITN.js} +1 -1
  65. package/chunks/{chunk-H467HDVV.js → chunk-QMLRYD76.js} +1 -1
  66. package/chunks/{chunk-43WALAW3.js → chunk-SEURG74P.js} +64 -115
  67. package/chunks/{chunk-G4HRW2FZ.js → chunk-SOV4POMS.js} +366 -253
  68. package/chunks/chunk-T34TL6KL.js +222 -0
  69. package/chunks/{chunk-WDIWLXLV.js → chunk-U6VE6JOS.js} +3 -3
  70. package/chunks/{chunk-MMWSCTDB.js → chunk-UFSFY7Z4.js} +19 -19
  71. package/chunks/{chunk-WIEXQUTD.js → chunk-ULRJZXMS.js} +1 -1
  72. package/chunks/{chunk-DHZW7Q7U.js → chunk-US54KYOJ.js} +2 -4
  73. package/chunks/{chunk-36LXIJIZ.js → chunk-V6LUKXBV.js} +1 -16
  74. package/chunks/{chunk-6M7TL2G2.js → chunk-VRZSDUZK.js} +45 -5
  75. package/chunks/chunk-VUXPDHTQ.js +22 -0
  76. package/chunks/chunk-XP5UM7SF.js +21 -0
  77. package/chunks/{chunk-IPZP3VRA.js → chunk-Y6XGC4K5.js} +5 -21
  78. package/chunks/{create.action-DBNIS665.js → create.action-ITEOQ644.js} +34 -32
  79. package/chunks/{delete.action-K7BLK7DK.js → delete.action-77MFPLUN.js} +29 -27
  80. package/chunks/{delete.action-GBOZC45K.js → delete.action-C6VX4S5Q.js} +30 -28
  81. package/chunks/{get.action-N3JOY3OU.js → get.action-3BP4FHZC.js} +16 -15
  82. package/chunks/{get.action-QHKMYZBK.js → get.action-LNBOWUVE.js} +24 -20
  83. package/chunks/{list.action-6SSO3JVN.js → list.action-6CRFQPJT.js} +39 -29
  84. package/chunks/{list.action-TJCS6UEY.js → list.action-KR5YIDR4.js} +37 -26
  85. package/chunks/{publish.action-T24VHRMR.js → publish.action-YBORRPBM.js} +45 -43
  86. package/chunks/{scripts-VIBLGKYG.js → scripts-6CI6U32J.js} +1 -1
  87. package/chunks/{update.action-VOE6PH5F.js → update.action-O7TSXDGV.js} +29 -27
  88. package/chunks/{update.action-OGYNBXRU.js → update.action-QZI7M2MV.js} +30 -28
  89. package/index.js +283 -278
  90. package/package.json +2 -2
  91. package/skills/scalar-cli/SKILL.md +49 -49
  92. package/template.md +66 -253
  93. package/chunks/action-FBRY5JKU.js +0 -37
  94. package/chunks/action-LYCNT3KA.js +0 -73
  95. package/chunks/action-OJ2NK25F.js +0 -121
  96. package/chunks/action-U2L5DCFG.js +0 -91
  97. package/chunks/chunk-MNNGUUKJ.js +0 -405
  98. package/chunks/chunk-ZGVZU6L2.js +0 -422
  99. package/docs.html +0 -6977
@@ -1,13 +1,13 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  BaseCollections
4
- } from "./chunk-JXGF5EHC.js";
4
+ } from "./chunk-NWJ37GI2.js";
5
5
  import {
6
6
  getDatabaseClient
7
- } from "./chunk-WDIWLXLV.js";
7
+ } from "./chunk-U6VE6JOS.js";
8
8
  import {
9
9
  publishRecordSchema
10
- } from "./chunk-6M7TL2G2.js";
10
+ } from "./chunk-VRZSDUZK.js";
11
11
 
12
12
  // src/domains/project/deployments/get-deployments.ts
13
13
  function orderDeployments(records) {
@@ -1,11 +1,10 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
- import "./chunk-3MZYUBJ6.js";
3
2
 
4
3
  // src/helpers/documentation/context.ts
5
4
  var AGENT_NOTES = [
6
5
  "Run `scalar <command>` when the CLI is installed, or `npx @scalar/cli <command>` when it is not.",
7
6
  "Run `scalar context` for this command tree as JSON, or `scalar <command> --help` for a single command.",
8
- "Authenticate with a personal token: `scalar auth login --token <token>`, or set `SCALAR_API_KEY` and run `scalar auth login`. Both store the session on disk for later commands. Without a token, `scalar auth login` opens a browser and waits for a person to sign in, so do not run it that way. Check the session with `scalar auth whoami`.",
7
+ "Log in with a personal token: `scalar auth login --token <token>`, or set `SCALAR_API_KEY` and run `scalar auth login`. Both store the session on disk for later commands. Without a token, `scalar auth login` opens a browser and waits for a person to log in, so do not run it that way. Check the session with `scalar auth whoami`.",
9
8
  "Many commands prompt when a value is left out, such as a slug, a team, or a confirmation before overwriting a file, and a prompt blocks a non-interactive run. Pass every value as an argument or flag: for example `--output` on `document bundle` and `document upgrade`, `--yes` on `project rollback`, and `--force` on `project init`.",
10
9
  "Results go to stdout. Errors go to stderr, prefixed with `[ERROR]`."
11
10
  ];
@@ -59,14 +58,12 @@ var buildCliContext = (program) => ({
59
58
  options: visibleOptions(program),
60
59
  commands: program.commands.filter((command) => !isHidden(command)).map((command) => toCommand(command, program.name()))
61
60
  });
61
+ var runnableCommands = (commands) => commands.flatMap((command) => [
62
+ ...command.runnable ? [command] : [],
63
+ ...runnableCommands(command.commands)
64
+ ]);
62
65
 
63
- // src/domains/context/action.ts
64
- var rootCommand = (command) => command.parent ? rootCommand(command.parent) : command;
65
- function contextAction(command) {
66
- const context = buildCliContext(rootCommand(command));
67
- process.stdout.write(`${JSON.stringify(context, null, 2)}
68
- `);
69
- }
70
66
  export {
71
- contextAction
67
+ buildCliContext,
68
+ runnableCommands
72
69
  };
@@ -14,21 +14,29 @@ import {
14
14
  webhookSubscriptionSchema,
15
15
  workspaceSchema,
16
16
  workspaceVersionSchema
17
- } from "./chunk-43WALAW3.js";
17
+ } from "./chunk-SEURG74P.js";
18
18
  import {
19
19
  userSchema
20
- } from "./chunk-ZYBLQ5CT.js";
20
+ } from "./chunk-3TFOA64C.js";
21
21
  import {
22
22
  sdkSchema
23
- } from "./chunk-IPZP3VRA.js";
23
+ } from "./chunk-Y6XGC4K5.js";
24
24
  import {
25
+ mcpEnvironmentSchema
26
+ } from "./chunk-T34TL6KL.js";
27
+ import {
28
+ RENEWAL_MARGIN_MS,
29
+ SESSION_EXPIRED,
30
+ SESSION_MOVED,
25
31
  generateAccessByPersonalToken,
26
32
  getAuthData,
27
- refreshToken
28
- } from "./chunk-35Z7VTJT.js";
33
+ needsRenewal,
34
+ refreshToken,
35
+ renewAuth
36
+ } from "./chunk-3RIUDHLG.js";
29
37
  import {
30
38
  config
31
- } from "./chunk-WB6PWTMU.js";
39
+ } from "./chunk-N5CJ5MTY.js";
32
40
  import {
33
41
  UnifiedDocsMigrationStatus,
34
42
  pendingInviteSchema,
@@ -37,35 +45,37 @@ import {
37
45
  teamNameSchema,
38
46
  teamSdkPricing,
39
47
  userRefSchema
40
- } from "./chunk-GYRQPDTK.js";
48
+ } from "./chunk-BQYVSPAI.js";
41
49
  import {
42
50
  docsProjectSchema,
43
51
  githubInstallSchema,
44
52
  githubProjectSchema,
45
53
  themeSchema
46
- } from "./chunk-6M7TL2G2.js";
54
+ } from "./chunk-VRZSDUZK.js";
47
55
  import {
48
56
  managedDocSchema,
49
57
  managedDocVersionSchema,
50
58
  ruleSchema
51
- } from "./chunk-GLWTVLKM.js";
59
+ } from "./chunk-MN2AFJXM.js";
52
60
  import {
61
+ createdMcpServerSchema,
53
62
  docInstanceSchema,
54
63
  docSourceSchema,
55
64
  docVersionRecordSchema,
65
+ mcpServerSchema,
56
66
  registryGitBindingSchema,
57
- registryPublishRecordSchema
58
- } from "./chunk-MNNGUUKJ.js";
67
+ registryPublishRecordSchema,
68
+ secretMetadataSchema
69
+ } from "./chunk-25XERWCE.js";
59
70
  import {
60
- mcpInstallationSchema,
61
- mcpServerSchema
62
- } from "./chunk-ZGVZU6L2.js";
71
+ teamEnvironmentSchema
72
+ } from "./chunk-AVZFSWPD.js";
63
73
  import {
64
74
  external_exports,
65
75
  nanoidSchema,
66
76
  schemaModel,
67
77
  slugSchema
68
- } from "./chunk-VVRUSQCY.js";
78
+ } from "./chunk-I57ID5K7.js";
69
79
 
70
80
  // ../../packages/service-api/dist/apis/access-groups.js
71
81
  function accessGroupsApiFactory(requestService) {
@@ -719,10 +729,6 @@ function managedSchemasApiFactory(requestService) {
719
729
  }
720
730
 
721
731
  // ../../packages/service-api/dist/apis/mcp-servers.js
722
- var createdMcpServerSchema = external_exports.object({
723
- server: mcpServerSchema,
724
- installation: mcpInstallationSchema
725
- });
726
732
  function mcpServersApiFactory(requestService) {
727
733
  async function create(data) {
728
734
  return await requestService.request({
@@ -748,6 +754,17 @@ function mcpServersApiFactory(requestService) {
748
754
  schema: mcpServerSchema
749
755
  });
750
756
  }
757
+ async function saveEnvironments(uid, environments) {
758
+ return await requestService.request({
759
+ url: `core/v1/mcp-servers/${uid}/environments`,
760
+ method: "put",
761
+ data: { environments },
762
+ schema: external_exports.object({
763
+ environments: external_exports.record(external_exports.string(), mcpEnvironmentSchema),
764
+ rows: external_exports.object({ slug: external_exports.string(), id: external_exports.string() }).array()
765
+ })
766
+ });
767
+ }
751
768
  async function del(uid) {
752
769
  return await requestService.request({
753
770
  url: `core/v1/mcp-servers/${uid}`,
@@ -781,6 +798,7 @@ function mcpServersApiFactory(requestService) {
781
798
  create,
782
799
  createInstant,
783
800
  update,
801
+ saveEnvironments,
784
802
  delete: del,
785
803
  claimDomain,
786
804
  releaseDomain,
@@ -1361,6 +1379,43 @@ function sdksApiFactory(requestService) {
1361
1379
  };
1362
1380
  }
1363
1381
 
1382
+ // ../../packages/service-api/dist/apis/team-secrets.js
1383
+ function teamSecretsApiFactory(requestService) {
1384
+ return {
1385
+ /** The team's secrets, or its vars, in one environment */
1386
+ list: (environment, kind = "secret") => requestService.request({
1387
+ url: `core/team/secrets?${new URLSearchParams({ environment, kind })}`,
1388
+ method: "get",
1389
+ schema: external_exports.object({ secrets: secretMetadataSchema.array() })
1390
+ }),
1391
+ /**
1392
+ * Create the name in the environment as a secret or a var. A name the
1393
+ * environment already holds is refused with a 409 in `create` mode, which
1394
+ * core applies to every caller who is not a team admin; a team admin's
1395
+ * write without a mode replaces its value.
1396
+ */
1397
+ create: (data) => requestService.request({
1398
+ url: "core/team/secrets",
1399
+ method: "post",
1400
+ data,
1401
+ schema: secretMetadataSchema
1402
+ }),
1403
+ /** Replace the value of the secret or var with this uid */
1404
+ rotate: (uid, value) => requestService.request({
1405
+ url: `core/team/secrets/${encodeURIComponent(uid)}/rotate`,
1406
+ method: "post",
1407
+ data: { value },
1408
+ schema: secretMetadataSchema
1409
+ }),
1410
+ /** Delete the secret or var with this uid */
1411
+ delete: (uid) => requestService.request({
1412
+ url: `core/team/secrets/${encodeURIComponent(uid)}`,
1413
+ method: "delete",
1414
+ schema: external_exports.null()
1415
+ })
1416
+ };
1417
+ }
1418
+
1364
1419
  // ../../packages/service-api/dist/apis/themes.js
1365
1420
  function themesApiFactory(requestService) {
1366
1421
  async function get(slug) {
@@ -1496,7 +1551,10 @@ function waitlistApiFactory(requestService) {
1496
1551
  }
1497
1552
 
1498
1553
  // ../../packages/service-api/dist/apis/webhooks.js
1499
- var subscriptionSchema = webhookSubscriptionSchema.omit({ teamUid: true });
1554
+ var subscriptionSchema = webhookSubscriptionSchema.omit({
1555
+ teamUid: true,
1556
+ signingSecretUid: true
1557
+ });
1500
1558
  var deliverySchema = webhookDeliverySchema.omit({ teamUid: true });
1501
1559
  var webhooksApiFactory = (requestService) => {
1502
1560
  const create = async (data) => {
@@ -1690,7 +1748,13 @@ function requestServiceFactory(baseUrl, getAuthToken, logger = console) {
1690
1748
  if (data instanceof FormData)
1691
1749
  delete headers["content-type"];
1692
1750
  if (!disableAuth && (getAuthToken || config2.token)) {
1693
- const token = (getAuthToken ? getAuthToken() : config2.token)?.trim();
1751
+ let token;
1752
+ try {
1753
+ const provided = getAuthToken ? getAuthToken() : config2.token;
1754
+ token = (provided instanceof Promise ? await provided : provided)?.trim();
1755
+ } catch (error) {
1756
+ return formatApiError(error instanceof Error ? error.message : "Could not get a token", 401, null, "unauthenticated");
1757
+ }
1694
1758
  if (token) {
1695
1759
  headers.authorization = `Bearer ${token}`;
1696
1760
  } else {
@@ -1991,17 +2055,6 @@ function docsProjectApiFactory(requestService) {
1991
2055
  })
1992
2056
  });
1993
2057
  }
1994
- async function getGitCredentials() {
1995
- return await requestService.request({
1996
- url: "core/forgejo/git-credentials",
1997
- method: "get",
1998
- schema: external_exports.object({
1999
- forgejoBaseUrl: external_exports.string(),
2000
- forgejoToken: external_exports.string(),
2001
- forgejoUsername: external_exports.string()
2002
- })
2003
- });
2004
- }
2005
2058
  async function updateRepoSettings(projectUid, patch) {
2006
2059
  return await requestService.request({
2007
2060
  url: "core/docs-projects/update-repo-settings",
@@ -2081,7 +2134,6 @@ function docsProjectApiFactory(requestService) {
2081
2134
  getProject,
2082
2135
  getConfig,
2083
2136
  putConfig,
2084
- getGitCredentials,
2085
2137
  updateRepoSettings,
2086
2138
  linkGithub,
2087
2139
  unlinkGithub,
@@ -2820,6 +2872,14 @@ function teamApiFactory(requestService, getNewTokens) {
2820
2872
  schema: external_exports.null()
2821
2873
  });
2822
2874
  }
2875
+ async function createEnvironment(slug, name) {
2876
+ return await requestService.request({
2877
+ url: "core/team/environments",
2878
+ method: "post",
2879
+ data: { slug, ...name && { name } },
2880
+ schema: teamEnvironmentSchema.array()
2881
+ });
2882
+ }
2823
2883
  async function getNamespaces() {
2824
2884
  return await requestService.request({
2825
2885
  url: "core/team/namespaces",
@@ -3089,6 +3149,7 @@ function teamApiFactory(requestService, getNewTokens) {
3089
3149
  createNamespace,
3090
3150
  updateNamespace,
3091
3151
  checkNamespace,
3152
+ createEnvironment,
3092
3153
  onboardingSetup,
3093
3154
  onboardingComplete,
3094
3155
  addTeamIcon,
@@ -3110,6 +3171,7 @@ var apiServiceFactory = (baseUrl, getAuthToken, getNewTokens) => {
3110
3171
  user: userApiFactory(requestService),
3111
3172
  auth: authApiFactory(requestService),
3112
3173
  team: teamApiFactory(requestService, getNewTokens),
3174
+ teamSecrets: teamSecretsApiFactory(requestService),
3113
3175
  feedback: feedbackApiFactory(requestService),
3114
3176
  image: imageApiFactory(requestService),
3115
3177
  payment: paymentApiFactory(requestService),
@@ -3142,17 +3204,35 @@ var apiServiceFactory = (baseUrl, getAuthToken, getNewTokens) => {
3142
3204
  var apiService = async (opts) => {
3143
3205
  const auth = await getAuthData(opts);
3144
3206
  auth.addEventListener((state) => Object.assign(auth, state));
3207
+ let startedTeamUid = auth.teamUid;
3208
+ let renewal = null;
3209
+ const freshAccessToken = async () => {
3210
+ if (needsRenewal(auth.accessToken, RENEWAL_MARGIN_MS)) {
3211
+ renewal ??= renewAuth(auth).then(
3212
+ () => void 0,
3213
+ () => {
3214
+ throw new Error(SESSION_EXPIRED);
3215
+ }
3216
+ ).finally(() => {
3217
+ renewal = null;
3218
+ });
3219
+ await renewal;
3220
+ }
3221
+ if (auth.teamUid !== startedTeamUid) throw new Error(SESSION_MOVED);
3222
+ return auth.accessToken;
3223
+ };
3145
3224
  return apiServiceFactory(
3146
3225
  config.services.api,
3147
- () => auth.accessToken,
3226
+ freshAccessToken,
3148
3227
  async (teamUid) => {
3149
3228
  if ("refreshToken" in auth) {
3150
3229
  await refreshToken(auth.refreshToken, teamUid);
3151
- return;
3230
+ } else {
3231
+ await generateAccessByPersonalToken({
3232
+ personalToken: auth.personalToken
3233
+ });
3152
3234
  }
3153
- await generateAccessByPersonalToken({
3154
- personalToken: auth.personalToken
3155
- });
3235
+ startedTeamUid = auth.teamUid;
3156
3236
  }
3157
3237
  );
3158
3238
  };