vercel 58.1.0 → 58.3.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 (106) hide show
  1. package/dist/chunks/{add-QKP6ZCHQ.js → add-3RKTVRL7.js} +10 -8
  2. package/dist/chunks/{add-WKV7KU4Y.js → add-X634O3US.js} +12 -9
  3. package/dist/chunks/add-YTFWON7N.js +187 -0
  4. package/dist/chunks/{build-ZXEK6YEA.js → build-DJIDUWYB.js} +12 -9
  5. package/dist/chunks/{chunk-E4LXCO7U.js → chunk-2SFMOCWR.js} +1 -1
  6. package/dist/chunks/{chunk-NYURBHZJ.js → chunk-3KNPVXJ3.js} +1 -1
  7. package/dist/chunks/chunk-3ZE5CFVM.js +346 -0
  8. package/dist/chunks/{chunk-AX3N4MO2.js → chunk-4LDQIDRM.js} +1 -1
  9. package/dist/chunks/{chunk-LXA2GZ7U.js → chunk-4N7XLXM2.js} +1 -1
  10. package/dist/chunks/{chunk-75MDJ6TK.js → chunk-4UYKSYKQ.js} +1 -1
  11. package/dist/chunks/{chunk-OVW5WUCR.js → chunk-5YXUTGSY.js} +1 -1
  12. package/dist/chunks/{chunk-OG7DIS52.js → chunk-752Z4JQP.js} +1 -1
  13. package/dist/chunks/{chunk-VSMCQSGH.js → chunk-7QVJTI5H.js} +1 -1
  14. package/dist/chunks/{chunk-TCBOCSWF.js → chunk-A5KP5HAI.js} +1 -1
  15. package/dist/chunks/{chunk-V6WHZAPP.js → chunk-AW5YINX6.js} +8 -4
  16. package/dist/chunks/{chunk-YITWM37U.js → chunk-AZNCOIGT.js} +2 -2
  17. package/dist/chunks/{chunk-NGYOR3MN.js → chunk-B3JTF4CF.js} +1 -1
  18. package/dist/chunks/{chunk-4QVAYRYH.js → chunk-BEQV3X2L.js} +16 -1
  19. package/dist/chunks/{chunk-DKS4XDVC.js → chunk-BM5FP7VW.js} +7 -5
  20. package/dist/chunks/{chunk-3YARBN7P.js → chunk-C33L5ZKY.js} +4 -4
  21. package/dist/chunks/{chunk-XTQADJ6S.js → chunk-C6BDHNNF.js} +3 -3
  22. package/dist/chunks/{chunk-TPB4F5XN.js → chunk-CSJBZKC5.js} +1 -1
  23. package/dist/chunks/{chunk-QCB22TQG.js → chunk-D3EEVTWR.js} +2 -2
  24. package/dist/chunks/{chunk-XAWGGWSG.js → chunk-EBLH23AQ.js} +2 -2
  25. package/dist/chunks/{chunk-32IPC6RB.js → chunk-GFG6QDIE.js} +1 -1
  26. package/dist/chunks/{chunk-CSI7GEDD.js → chunk-IH5JOYGQ.js} +2 -2
  27. package/dist/chunks/chunk-J6LK45HT.js +163 -0
  28. package/dist/chunks/{chunk-CXICXWXJ.js → chunk-JID5CRQL.js} +3 -3
  29. package/dist/chunks/{chunk-FBPCJV72.js → chunk-JLWQWYKO.js} +2 -2
  30. package/dist/chunks/{chunk-RL7X7JGK.js → chunk-KBEX5MYS.js} +1 -136
  31. package/dist/chunks/{chunk-LA3BQQQK.js → chunk-KT4XXKJK.js} +1 -1
  32. package/dist/chunks/{chunk-FR352QKR.js → chunk-M22O6CYY.js} +1 -1
  33. package/dist/chunks/{chunk-XTLNPNWY.js → chunk-MAHXF73X.js} +2 -2
  34. package/dist/chunks/{chunk-KLNWR2JI.js → chunk-MTW6MVY7.js} +10 -8
  35. package/dist/chunks/{chunk-JNP3FQR3.js → chunk-NVSQ6KXI.js} +1 -1
  36. package/dist/chunks/{chunk-KY3ZOYJW.js → chunk-O5GNPPTU.js} +1 -1
  37. package/dist/chunks/{chunk-BAUVB2VF.js → chunk-OTQD3MHJ.js} +4 -4
  38. package/dist/chunks/{chunk-C267R2FA.js → chunk-PNXQB4IO.js} +5 -5
  39. package/dist/chunks/{chunk-552YY6QY.js → chunk-QZV24TDR.js} +10 -8
  40. package/dist/chunks/{chunk-TF627KEI.js → chunk-RQ7H43CJ.js} +1 -1
  41. package/dist/chunks/{chunk-JA3QX2H6.js → chunk-RUOBMMEA.js} +2 -2
  42. package/dist/chunks/{chunk-U6PPDPR5.js → chunk-SOFC4MLS.js} +1 -0
  43. package/dist/chunks/{chunk-HXTQVMJZ.js → chunk-UDDCOV62.js} +2 -2
  44. package/dist/chunks/{chunk-5AG7MR7W.js → chunk-UJNNTGJY.js} +3 -3
  45. package/dist/chunks/{chunk-4LSERVQQ.js → chunk-UQJMDWCY.js} +7 -5
  46. package/dist/chunks/{chunk-2D22CMQ7.js → chunk-WXJ6E3MY.js} +6 -4
  47. package/dist/chunks/{chunk-4I7DTZAJ.js → chunk-XIG4GH62.js} +2 -2
  48. package/dist/chunks/chunk-XLKFJPMT.js +150 -0
  49. package/dist/chunks/{chunk-S7LXRKLD.js → chunk-Z5ZQJ5VJ.js} +14 -14
  50. package/dist/chunks/{chunk-6QUKJKFX.js → chunk-ZPH66MB6.js} +313 -290
  51. package/dist/chunks/{chunk-P7IO46BQ.js → chunk-ZX2FSPWV.js} +2 -2
  52. package/dist/chunks/clear-J3OCB2DQ.js +132 -0
  53. package/dist/chunks/{compile-vercel-config-AFGCQEYG.js → compile-vercel-config-G2WILJR4.js} +5 -4
  54. package/dist/chunks/{delete-UGSJQBE7.js → delete-3NQLU7PQ.js} +7 -6
  55. package/dist/chunks/{delete-Y5LNEZXI.js → delete-HKUZTZE7.js} +7 -6
  56. package/dist/chunks/{disable-IF3AHKJD.js → disable-7AIA4JV3.js} +7 -6
  57. package/dist/chunks/{discard-Y6GZBIHJ.js → discard-MIGUGPGO.js} +7 -6
  58. package/dist/chunks/{edit-6TGJKUI5.js → edit-3AU746TG.js} +8 -7
  59. package/dist/chunks/{edit-HNMKZ3YT.js → edit-MDQW3S4R.js} +7 -6
  60. package/dist/chunks/{enable-SE4QM4X3.js → enable-EGNWRQEI.js} +7 -6
  61. package/dist/chunks/{export-5AYL7HCJ.js → export-EMBHNUMU.js} +7 -6
  62. package/dist/chunks/{image-6BYNQVGW.js → image-XXZ5DRIW.js} +5 -5
  63. package/dist/chunks/{inspect-FGYXO4K5.js → inspect-7V5ZHBBB.js} +13 -11
  64. package/dist/chunks/{inspect-LTHZUXA2.js → inspect-MYUNZMLJ.js} +10 -8
  65. package/dist/chunks/{inspect-3KCFHDWA.js → inspect-O7SVDBHM.js} +13 -10
  66. package/dist/chunks/{inspect-DPTRYDFH.js → inspect-S5WJ47OH.js} +8 -7
  67. package/dist/chunks/{inspect-MA36GG73.js → inspect-TXVTHRAZ.js} +10 -8
  68. package/dist/chunks/{list-BTOXZBQK.js → list-BQLJJACX.js} +13 -11
  69. package/dist/chunks/{list-VTQZSIIT.js → list-LC2ON7OM.js} +8 -6
  70. package/dist/chunks/{list-OCW34SRV.js → list-NZ4ZOO6B.js} +8 -7
  71. package/dist/chunks/{login-VSXLK5ZU.js → login-4B7KPSUW.js} +12 -9
  72. package/dist/chunks/ls-4J2WGR7U.js +178 -0
  73. package/dist/chunks/{ls-DRI2AOFB.js → ls-7XMM4KCU.js} +14 -11
  74. package/dist/chunks/{ls-76YTWNKD.js → ls-FRSKR6K2.js} +11 -9
  75. package/dist/chunks/{ls-3UA57DZZ.js → ls-TWNQ7KZN.js} +13 -11
  76. package/dist/chunks/{ls-ZBLTJ5RE.js → ls-WCTLFAPI.js} +11 -9
  77. package/dist/chunks/{open-DVKAE5HP.js → open-J4SAVWUP.js} +7 -6
  78. package/dist/chunks/permissions-67T43WNH.js +95 -0
  79. package/dist/chunks/{publish-F5C4ZA7M.js → publish-CSXOTJLD.js} +7 -6
  80. package/dist/chunks/{push-PKJFQTLO.js → push-7KOVRV5N.js} +12 -9
  81. package/dist/chunks/{query-GT5LCT45.js → query-CTRPYYXR.js} +12 -10
  82. package/dist/chunks/{reorder-AQW4XFDS.js → reorder-E4PPJNEX.js} +7 -6
  83. package/dist/chunks/{reply-FI7SADGU.js → reply-Z742BMF3.js} +7 -6
  84. package/dist/chunks/{resolve-C5G7JJZJ.js → resolve-KPZJZ6IQ.js} +7 -6
  85. package/dist/chunks/{restore-5TLSHQOS.js → restore-ZTH2FY4I.js} +7 -6
  86. package/dist/chunks/{rm-2EN66OYO.js → rm-C4ODJDWP.js} +10 -8
  87. package/dist/chunks/{rm-L7OQPCIE.js → rm-DE37CFKU.js} +13 -10
  88. package/dist/chunks/{rm-C37BHGQI.js → rm-FVGLSIHP.js} +10 -8
  89. package/dist/chunks/rm-VOFJM4XW.js +186 -0
  90. package/dist/chunks/{rule-inspect-V5DRHOTZ.js → rule-inspect-6RLS3ZNB.js} +13 -11
  91. package/dist/chunks/{rules-5XEMLN5G.js → rules-VSXJT2QE.js} +8 -8
  92. package/dist/chunks/{schema-UEOZVBY5.js → schema-3E24G2AG.js} +11 -9
  93. package/dist/chunks/{tags-ZGANV4YD.js → tags-AIZLNITP.js} +4 -4
  94. package/dist/chunks/{types-IKWGLSDF.js → types-QTOA2BTQ.js} +7 -5
  95. package/dist/chunks/{update-DHWSMSMS.js → update-QHWT7YG4.js} +10 -8
  96. package/dist/commands/build/index.js +15 -15
  97. package/dist/commands/deploy/index.js +28 -25
  98. package/dist/commands/dev/index.js +85 -17
  99. package/dist/commands/env/index.js +27 -24
  100. package/dist/commands/link/index.js +25 -22
  101. package/dist/commands/list/index.js +11 -9
  102. package/dist/commands-bulk.js +2204 -1817
  103. package/dist/help.js +1 -1
  104. package/dist/index.js +37 -34
  105. package/dist/version.mjs +1 -1
  106. package/package.json +38 -31
@@ -9,31 +9,33 @@ import {
9
9
  handleRulesApiError,
10
10
  parseRulesFlagsAndScope,
11
11
  rulesCollectionPath
12
- } from "./chunk-HXTQVMJZ.js";
13
- import "./chunk-CXICXWXJ.js";
12
+ } from "./chunk-UDDCOV62.js";
13
+ import "./chunk-JID5CRQL.js";
14
14
  import "./chunk-BUZRVER7.js";
15
15
  import {
16
16
  validateJsonOutput
17
17
  } from "./chunk-XPKWKPWA.js";
18
18
  import {
19
19
  rulesAddSubcommand
20
- } from "./chunk-75MDJ6TK.js";
21
- import "./chunk-DKS4XDVC.js";
20
+ } from "./chunk-4UYKSYKQ.js";
21
+ import "./chunk-BM5FP7VW.js";
22
22
  import "./chunk-ECCWJHC6.js";
23
23
  import {
24
24
  AGENT_REASON,
25
25
  buildCommandWithGlobalFlags,
26
26
  outputAgentError
27
- } from "./chunk-S7LXRKLD.js";
27
+ } from "./chunk-Z5ZQJ5VJ.js";
28
28
  import {
29
- parseArguments,
30
29
  printError
31
- } from "./chunk-RL7X7JGK.js";
30
+ } from "./chunk-KBEX5MYS.js";
31
+ import {
32
+ parseArguments
33
+ } from "./chunk-XLKFJPMT.js";
32
34
  import {
33
35
  getFlagsSpecification,
34
36
  isAPIError,
35
37
  packageName
36
- } from "./chunk-U6PPDPR5.js";
38
+ } from "./chunk-SOFC4MLS.js";
37
39
  import "./chunk-P4QNYOFB.js";
38
40
  import "./chunk-52QYYTM5.js";
39
41
  import {
@@ -9,7 +9,7 @@ import {
9
9
  handleVcrApiError,
10
10
  resolveVcrScope,
11
11
  validateVcrJsonOutput
12
- } from "./chunk-XTQADJ6S.js";
12
+ } from "./chunk-C6BDHNNF.js";
13
13
  import "./chunk-G75NFPIT.js";
14
14
  import {
15
15
  outputError
@@ -17,26 +17,29 @@ import {
17
17
  import "./chunk-XPKWKPWA.js";
18
18
  import {
19
19
  addSubcommand
20
- } from "./chunk-V6WHZAPP.js";
21
- import "./chunk-TCBOCSWF.js";
22
- import "./chunk-NGYOR3MN.js";
20
+ } from "./chunk-AW5YINX6.js";
21
+ import "./chunk-A5KP5HAI.js";
22
+ import "./chunk-J6LK45HT.js";
23
+ import "./chunk-B3JTF4CF.js";
23
24
  import "./chunk-R6IGDGX3.js";
24
- import "./chunk-DKS4XDVC.js";
25
+ import "./chunk-BM5FP7VW.js";
25
26
  import "./chunk-ECCWJHC6.js";
26
27
  import {
27
28
  AGENT_REASON,
28
29
  buildCommandWithGlobalFlags,
29
30
  outputAgentError
30
- } from "./chunk-S7LXRKLD.js";
31
+ } from "./chunk-Z5ZQJ5VJ.js";
31
32
  import {
32
- parseArguments,
33
33
  printError
34
- } from "./chunk-RL7X7JGK.js";
34
+ } from "./chunk-KBEX5MYS.js";
35
+ import {
36
+ parseArguments
37
+ } from "./chunk-XLKFJPMT.js";
35
38
  import {
36
39
  getFlagsSpecification,
37
40
  isAPIError,
38
41
  packageName
39
- } from "./chunk-U6PPDPR5.js";
42
+ } from "./chunk-SOFC4MLS.js";
40
43
  import "./chunk-P4QNYOFB.js";
41
44
  import "./chunk-52QYYTM5.js";
42
45
  import {
@@ -0,0 +1,187 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import {
8
+ MAX_CONCURRENT_REQUESTS,
9
+ parseTeamRefs,
10
+ require_async_sema,
11
+ teamRefBody
12
+ } from "./chunk-3ZE5CFVM.js";
13
+ import {
14
+ repositoryPermissionsPath
15
+ } from "./chunk-BEQV3X2L.js";
16
+ import {
17
+ emitVcrArgParseError,
18
+ resolveVcrScope,
19
+ validateVcrJsonOutput
20
+ } from "./chunk-C6BDHNNF.js";
21
+ import "./chunk-G75NFPIT.js";
22
+ import {
23
+ outputError
24
+ } from "./chunk-BUZRVER7.js";
25
+ import "./chunk-XPKWKPWA.js";
26
+ import {
27
+ permissionsAddSubcommand
28
+ } from "./chunk-J6LK45HT.js";
29
+ import "./chunk-R6IGDGX3.js";
30
+ import "./chunk-BM5FP7VW.js";
31
+ import "./chunk-ECCWJHC6.js";
32
+ import {
33
+ AGENT_REASON,
34
+ buildCommandWithGlobalFlags,
35
+ outputAgentError
36
+ } from "./chunk-Z5ZQJ5VJ.js";
37
+ import {
38
+ printError
39
+ } from "./chunk-KBEX5MYS.js";
40
+ import {
41
+ parseArguments
42
+ } from "./chunk-XLKFJPMT.js";
43
+ import {
44
+ getFlagsSpecification,
45
+ isAPIError,
46
+ packageName
47
+ } from "./chunk-SOFC4MLS.js";
48
+ import "./chunk-P4QNYOFB.js";
49
+ import "./chunk-52QYYTM5.js";
50
+ import {
51
+ output_manager_default
52
+ } from "./chunk-OX7KI3LF.js";
53
+ import "./chunk-GGP5R3FU.js";
54
+ import "./chunk-S7KYDPEM.js";
55
+ import {
56
+ __toESM
57
+ } from "./chunk-TZ2YI2VH.js";
58
+
59
+ // src/commands/vcr/permissions/add.ts
60
+ var import_async_sema = __toESM(require_async_sema(), 1);
61
+ var USAGE = "vcr permissions <repository> add <team>[,<team>...]";
62
+ async function add(client, argv, telemetry) {
63
+ let parsedArgs;
64
+ try {
65
+ parsedArgs = parseArguments(
66
+ argv,
67
+ getFlagsSpecification(permissionsAddSubcommand.options)
68
+ );
69
+ } catch (err) {
70
+ emitVcrArgParseError(client, err, USAGE);
71
+ printError(err);
72
+ return 1;
73
+ }
74
+ const fr = validateVcrJsonOutput(client, parsedArgs.flags);
75
+ if (typeof fr === "number") {
76
+ return fr;
77
+ }
78
+ const repository = parsedArgs.args[0];
79
+ const teamRefs = parseTeamRefs(parsedArgs.args.slice(2));
80
+ const project = parsedArgs.flags["--project"];
81
+ telemetry.trackCliOptionProject(project);
82
+ telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);
83
+ if (teamRefs.length === 0) {
84
+ outputAgentError(
85
+ client,
86
+ {
87
+ status: "error",
88
+ reason: AGENT_REASON.MISSING_ARGUMENTS,
89
+ message: `Missing team. Example: ${packageName} vcr permissions ${repository} add team_1a2b3c4d`,
90
+ next: [
91
+ {
92
+ command: buildCommandWithGlobalFlags(client.argv, USAGE),
93
+ when: "Replace <team> with a team id or slug (comma-separate multiple teams)"
94
+ }
95
+ ]
96
+ },
97
+ 1
98
+ );
99
+ return outputError(
100
+ client,
101
+ fr.jsonOutput,
102
+ "MISSING_ARGUMENTS",
103
+ `Usage: \`vercel ${USAGE}\``
104
+ );
105
+ }
106
+ const scope = await resolveVcrScope(client, {
107
+ project,
108
+ jsonOutput: fr.jsonOutput
109
+ });
110
+ if (typeof scope === "number") {
111
+ return scope;
112
+ }
113
+ const path = repositoryPermissionsPath(scope, repository);
114
+ const added = [];
115
+ const failed = [];
116
+ output_manager_default.spinner(
117
+ `Sharing ${repository} with ${teamRefs.length === 1 ? teamRefs[0] : `${teamRefs.length} teams`}...`
118
+ );
119
+ const sema = new import_async_sema.default(MAX_CONCURRENT_REQUESTS);
120
+ let results;
121
+ try {
122
+ results = await Promise.all(
123
+ teamRefs.map(async (team) => {
124
+ await sema.acquire();
125
+ try {
126
+ const result = await client.fetch(path, {
127
+ method: "POST",
128
+ body: teamRefBody(team)
129
+ });
130
+ return { ok: true, team, permission: result.permission };
131
+ } catch (err) {
132
+ if (!isAPIError(err)) {
133
+ throw err;
134
+ }
135
+ const message = err.serverMessage || `API error (${err.status}).`;
136
+ return {
137
+ ok: false,
138
+ team,
139
+ failure: { team, code: err.code || "API_ERROR", message }
140
+ };
141
+ } finally {
142
+ sema.release();
143
+ }
144
+ })
145
+ );
146
+ } finally {
147
+ output_manager_default.stopSpinner();
148
+ }
149
+ for (const result of results) {
150
+ if (result.ok) {
151
+ added.push(result.permission);
152
+ if (!fr.jsonOutput) {
153
+ output_manager_default.success(
154
+ `Shared ${repository} with ${result.permission?.teamSlug ?? result.team}`
155
+ );
156
+ }
157
+ } else {
158
+ failed.push(result.failure);
159
+ if (!fr.jsonOutput) {
160
+ output_manager_default.error(
161
+ `Failed to share ${repository} with ${result.team}: ${result.failure.message}`
162
+ );
163
+ }
164
+ }
165
+ }
166
+ if (failed.length > 0) {
167
+ outputAgentError(
168
+ client,
169
+ {
170
+ status: "error",
171
+ reason: AGENT_REASON.API_ERROR,
172
+ message: `Failed to share ${repository} with ${failed.map((f) => `${f.team} (${f.message})`).join(", ")}`
173
+ },
174
+ 1
175
+ );
176
+ }
177
+ if (fr.jsonOutput) {
178
+ client.stdout.write(
179
+ `${JSON.stringify({ permissions: added, failed }, null, 2)}
180
+ `
181
+ );
182
+ }
183
+ return failed.length > 0 ? 1 : 0;
184
+ }
185
+ export {
186
+ add as default
187
+ };
@@ -23,7 +23,7 @@ import {
23
23
  runEngine,
24
24
  splitPassthrough,
25
25
  validateVcrChoice
26
- } from "./chunk-XTQADJ6S.js";
26
+ } from "./chunk-C6BDHNNF.js";
27
27
  import "./chunk-G75NFPIT.js";
28
28
  import {
29
29
  outputError
@@ -31,24 +31,27 @@ import {
31
31
  import "./chunk-XPKWKPWA.js";
32
32
  import {
33
33
  buildSubcommand
34
- } from "./chunk-V6WHZAPP.js";
35
- import "./chunk-TCBOCSWF.js";
36
- import "./chunk-NGYOR3MN.js";
34
+ } from "./chunk-AW5YINX6.js";
35
+ import "./chunk-A5KP5HAI.js";
36
+ import "./chunk-J6LK45HT.js";
37
+ import "./chunk-B3JTF4CF.js";
37
38
  import "./chunk-R6IGDGX3.js";
38
- import "./chunk-DKS4XDVC.js";
39
+ import "./chunk-BM5FP7VW.js";
39
40
  import "./chunk-ECCWJHC6.js";
40
41
  import {
41
42
  AGENT_REASON,
42
43
  buildCommandWithGlobalFlags,
43
44
  outputAgentError
44
- } from "./chunk-S7LXRKLD.js";
45
+ } from "./chunk-Z5ZQJ5VJ.js";
45
46
  import {
46
- parseArguments,
47
47
  printError
48
- } from "./chunk-RL7X7JGK.js";
48
+ } from "./chunk-KBEX5MYS.js";
49
+ import {
50
+ parseArguments
51
+ } from "./chunk-XLKFJPMT.js";
49
52
  import {
50
53
  getFlagsSpecification
51
- } from "./chunk-U6PPDPR5.js";
54
+ } from "./chunk-SOFC4MLS.js";
52
55
  import "./chunk-P4QNYOFB.js";
53
56
  import "./chunk-52QYYTM5.js";
54
57
  import {
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  truncateEnd
9
- } from "./chunk-TF627KEI.js";
9
+ } from "./chunk-RQ7H43CJ.js";
10
10
  import {
11
11
  require_dist
12
12
  } from "./chunk-OX7KI3LF.js";
@@ -11,7 +11,7 @@ import {
11
11
  nextOption,
12
12
  packageName,
13
13
  projectOption
14
- } from "./chunk-U6PPDPR5.js";
14
+ } from "./chunk-SOFC4MLS.js";
15
15
 
16
16
  // src/commands/activity/command.ts
17
17
  var typesSubcommand = {
@@ -0,0 +1,346 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import {
8
+ __commonJS,
9
+ __require
10
+ } from "./chunk-TZ2YI2VH.js";
11
+
12
+ // ../../node_modules/.pnpm/double-ended-queue@2.1.0-0/node_modules/double-ended-queue/js/deque.js
13
+ var require_deque = __commonJS({
14
+ "../../node_modules/.pnpm/double-ended-queue@2.1.0-0/node_modules/double-ended-queue/js/deque.js"(exports, module) {
15
+ "use strict";
16
+ function Deque(capacity) {
17
+ this._capacity = getCapacity(capacity);
18
+ this._length = 0;
19
+ this._front = 0;
20
+ if (isArray(capacity)) {
21
+ var len = capacity.length;
22
+ for (var i = 0; i < len; ++i) {
23
+ this[i] = capacity[i];
24
+ }
25
+ this._length = len;
26
+ }
27
+ }
28
+ Deque.prototype.toArray = function Deque$toArray() {
29
+ var len = this._length;
30
+ var ret = new Array(len);
31
+ var front = this._front;
32
+ var capacity = this._capacity;
33
+ for (var j = 0; j < len; ++j) {
34
+ ret[j] = this[front + j & capacity - 1];
35
+ }
36
+ return ret;
37
+ };
38
+ Deque.prototype.push = function Deque$push(item) {
39
+ var argsLength = arguments.length;
40
+ var length = this._length;
41
+ if (argsLength > 1) {
42
+ var capacity = this._capacity;
43
+ if (length + argsLength > capacity) {
44
+ for (var i = 0; i < argsLength; ++i) {
45
+ this._checkCapacity(length + 1);
46
+ var j = this._front + length & this._capacity - 1;
47
+ this[j] = arguments[i];
48
+ length++;
49
+ this._length = length;
50
+ }
51
+ return length;
52
+ } else {
53
+ var j = this._front;
54
+ for (var i = 0; i < argsLength; ++i) {
55
+ this[j + length & capacity - 1] = arguments[i];
56
+ j++;
57
+ }
58
+ this._length = length + argsLength;
59
+ return length + argsLength;
60
+ }
61
+ }
62
+ if (argsLength === 0)
63
+ return length;
64
+ this._checkCapacity(length + 1);
65
+ var i = this._front + length & this._capacity - 1;
66
+ this[i] = item;
67
+ this._length = length + 1;
68
+ return length + 1;
69
+ };
70
+ Deque.prototype.pop = function Deque$pop() {
71
+ var length = this._length;
72
+ if (length === 0) {
73
+ return void 0;
74
+ }
75
+ var i = this._front + length - 1 & this._capacity - 1;
76
+ var ret = this[i];
77
+ this[i] = void 0;
78
+ this._length = length - 1;
79
+ return ret;
80
+ };
81
+ Deque.prototype.shift = function Deque$shift() {
82
+ var length = this._length;
83
+ if (length === 0) {
84
+ return void 0;
85
+ }
86
+ var front = this._front;
87
+ var ret = this[front];
88
+ this[front] = void 0;
89
+ this._front = front + 1 & this._capacity - 1;
90
+ this._length = length - 1;
91
+ return ret;
92
+ };
93
+ Deque.prototype.unshift = function Deque$unshift(item) {
94
+ var length = this._length;
95
+ var argsLength = arguments.length;
96
+ if (argsLength > 1) {
97
+ var capacity = this._capacity;
98
+ if (length + argsLength > capacity) {
99
+ for (var i = argsLength - 1; i >= 0; i--) {
100
+ this._checkCapacity(length + 1);
101
+ var capacity = this._capacity;
102
+ var j = (this._front - 1 & capacity - 1 ^ capacity) - capacity;
103
+ this[j] = arguments[i];
104
+ length++;
105
+ this._length = length;
106
+ this._front = j;
107
+ }
108
+ return length;
109
+ } else {
110
+ var front = this._front;
111
+ for (var i = argsLength - 1; i >= 0; i--) {
112
+ var j = (front - 1 & capacity - 1 ^ capacity) - capacity;
113
+ this[j] = arguments[i];
114
+ front = j;
115
+ }
116
+ this._front = front;
117
+ this._length = length + argsLength;
118
+ return length + argsLength;
119
+ }
120
+ }
121
+ if (argsLength === 0)
122
+ return length;
123
+ this._checkCapacity(length + 1);
124
+ var capacity = this._capacity;
125
+ var i = (this._front - 1 & capacity - 1 ^ capacity) - capacity;
126
+ this[i] = item;
127
+ this._length = length + 1;
128
+ this._front = i;
129
+ return length + 1;
130
+ };
131
+ Deque.prototype.peekBack = function Deque$peekBack() {
132
+ var length = this._length;
133
+ if (length === 0) {
134
+ return void 0;
135
+ }
136
+ var index = this._front + length - 1 & this._capacity - 1;
137
+ return this[index];
138
+ };
139
+ Deque.prototype.peekFront = function Deque$peekFront() {
140
+ if (this._length === 0) {
141
+ return void 0;
142
+ }
143
+ return this[this._front];
144
+ };
145
+ Deque.prototype.get = function Deque$get(index) {
146
+ var i = index;
147
+ if (i !== (i | 0)) {
148
+ return void 0;
149
+ }
150
+ var len = this._length;
151
+ if (i < 0) {
152
+ i = i + len;
153
+ }
154
+ if (i < 0 || i >= len) {
155
+ return void 0;
156
+ }
157
+ return this[this._front + i & this._capacity - 1];
158
+ };
159
+ Deque.prototype.isEmpty = function Deque$isEmpty() {
160
+ return this._length === 0;
161
+ };
162
+ Deque.prototype.clear = function Deque$clear() {
163
+ var len = this._length;
164
+ var front = this._front;
165
+ var capacity = this._capacity;
166
+ for (var j = 0; j < len; ++j) {
167
+ this[front + j & capacity - 1] = void 0;
168
+ }
169
+ this._length = 0;
170
+ this._front = 0;
171
+ };
172
+ Deque.prototype.toString = function Deque$toString() {
173
+ return this.toArray().toString();
174
+ };
175
+ Deque.prototype.valueOf = Deque.prototype.toString;
176
+ Deque.prototype.removeFront = Deque.prototype.shift;
177
+ Deque.prototype.removeBack = Deque.prototype.pop;
178
+ Deque.prototype.insertFront = Deque.prototype.unshift;
179
+ Deque.prototype.insertBack = Deque.prototype.push;
180
+ Deque.prototype.enqueue = Deque.prototype.push;
181
+ Deque.prototype.dequeue = Deque.prototype.shift;
182
+ Deque.prototype.toJSON = Deque.prototype.toArray;
183
+ Object.defineProperty(Deque.prototype, "length", {
184
+ get: function() {
185
+ return this._length;
186
+ },
187
+ set: function() {
188
+ throw new RangeError("");
189
+ }
190
+ });
191
+ Deque.prototype._checkCapacity = function Deque$_checkCapacity(size) {
192
+ if (this._capacity < size) {
193
+ this._resizeTo(getCapacity(this._capacity * 1.5 + 16));
194
+ }
195
+ };
196
+ Deque.prototype._resizeTo = function Deque$_resizeTo(capacity) {
197
+ var oldCapacity = this._capacity;
198
+ this._capacity = capacity;
199
+ var front = this._front;
200
+ var length = this._length;
201
+ if (front + length > oldCapacity) {
202
+ var moveItemsCount = front + length & oldCapacity - 1;
203
+ arrayMove(this, 0, this, oldCapacity, moveItemsCount);
204
+ }
205
+ };
206
+ var isArray = Array.isArray;
207
+ function arrayMove(src, srcIndex, dst, dstIndex, len) {
208
+ for (var j = 0; j < len; ++j) {
209
+ dst[j + dstIndex] = src[j + srcIndex];
210
+ src[j + srcIndex] = void 0;
211
+ }
212
+ }
213
+ function pow2AtLeast(n) {
214
+ n = n >>> 0;
215
+ n = n - 1;
216
+ n = n | n >> 1;
217
+ n = n | n >> 2;
218
+ n = n | n >> 4;
219
+ n = n | n >> 8;
220
+ n = n | n >> 16;
221
+ return n + 1;
222
+ }
223
+ function getCapacity(capacity) {
224
+ if (typeof capacity !== "number") {
225
+ if (isArray(capacity)) {
226
+ capacity = capacity.length;
227
+ } else {
228
+ return 16;
229
+ }
230
+ }
231
+ return pow2AtLeast(
232
+ Math.min(
233
+ Math.max(16, capacity),
234
+ 1073741824
235
+ )
236
+ );
237
+ }
238
+ module.exports = Deque;
239
+ }
240
+ });
241
+
242
+ // ../../node_modules/.pnpm/async-sema@2.1.4/node_modules/async-sema/index.js
243
+ var require_async_sema = __commonJS({
244
+ "../../node_modules/.pnpm/async-sema@2.1.4/node_modules/async-sema/index.js"(exports, module) {
245
+ var EventEmitter = __require("events");
246
+ var util = __require("util");
247
+ var Deque = require_deque();
248
+ var ReleaseEmitter = class extends EventEmitter {
249
+ };
250
+ function isFn(x) {
251
+ return typeof x === "function";
252
+ }
253
+ function defaultInit() {
254
+ return "1";
255
+ }
256
+ var Sema = class {
257
+ constructor(nr, { initFn = defaultInit, pauseFn, resumeFn, capacity = 10 } = {}) {
258
+ if (isFn(pauseFn) ^ isFn(resumeFn)) {
259
+ throw new Error("pauseFn and resumeFn must be both set for pausing");
260
+ }
261
+ this.nrTokens = nr;
262
+ this.free = new Deque(nr);
263
+ this.waiting = new Deque(capacity);
264
+ this.releaseEmitter = new ReleaseEmitter();
265
+ this.noTokens = initFn === defaultInit;
266
+ this.pauseFn = pauseFn;
267
+ this.resumeFn = resumeFn;
268
+ this.releaseEmitter.on("release", (token) => {
269
+ const p = this.waiting.shift();
270
+ if (p) {
271
+ p.resolve(token);
272
+ } else {
273
+ if (this.resumeFn && this.paused) {
274
+ this.paused = false;
275
+ this.resumeFn();
276
+ }
277
+ this.free.push(token);
278
+ }
279
+ });
280
+ for (let i = 0; i < nr; i++) {
281
+ this.free.push(initFn());
282
+ }
283
+ }
284
+ async acquire() {
285
+ let token = this.free.pop();
286
+ if (token) {
287
+ return token;
288
+ }
289
+ return new Promise((resolve, reject) => {
290
+ if (this.pauseFn && !this.paused) {
291
+ this.paused = true;
292
+ this.pauseFn();
293
+ }
294
+ this.waiting.push({ resolve, reject });
295
+ });
296
+ }
297
+ async v() {
298
+ return this.acquire();
299
+ }
300
+ release(token) {
301
+ this.releaseEmitter.emit("release", this.noTokens ? "1" : token);
302
+ }
303
+ p(token) {
304
+ return this.release(token);
305
+ }
306
+ drain() {
307
+ const a = new Array(this.nrTokens);
308
+ for (let i = 0; i < this.nrTokens; i++) {
309
+ a[i] = this.acquire();
310
+ }
311
+ return Promise.all(a);
312
+ }
313
+ nrWaiting() {
314
+ return this.waiting.length;
315
+ }
316
+ };
317
+ Sema.prototype.v = util.deprecate(Sema.prototype.v, "`v()` is deperecated; use `acquire()` instead");
318
+ Sema.prototype.p = util.deprecate(Sema.prototype.p, "`p()` is deprecated; use `release()` instead");
319
+ module.exports = Sema;
320
+ }
321
+ });
322
+
323
+ // src/commands/vcr/permissions/team-refs.ts
324
+ var MAX_CONCURRENT_REQUESTS = 10;
325
+ function parseTeamRefs(args) {
326
+ const refs = [];
327
+ for (const arg of args) {
328
+ for (const piece of arg.split(",")) {
329
+ const ref = piece.trim();
330
+ if (ref && !refs.includes(ref)) {
331
+ refs.push(ref);
332
+ }
333
+ }
334
+ }
335
+ return refs;
336
+ }
337
+ function teamRefBody(ref) {
338
+ return ref.startsWith("team_") ? { teamId: ref } : { teamSlug: ref };
339
+ }
340
+
341
+ export {
342
+ require_async_sema,
343
+ MAX_CONCURRENT_REQUESTS,
344
+ parseTeamRefs,
345
+ teamRefBody
346
+ };
@@ -11,7 +11,7 @@ import {
11
11
  packageName,
12
12
  projectOption,
13
13
  yesOption
14
- } from "./chunk-U6PPDPR5.js";
14
+ } from "./chunk-SOFC4MLS.js";
15
15
 
16
16
  // src/commands/comments/command.ts
17
17
  var commentsProjectOption = {