@depup/vercel 57.0.0-depup.0 → 58.9.0-depup.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 (129) hide show
  1. package/README.md +8 -8
  2. package/changes.json +7 -7
  3. package/dist/chunks/{add-YRZTDNXX.js → add-EN4KBTT6.js} +17 -12
  4. package/dist/chunks/add-HFK7NUGY.js +187 -0
  5. package/dist/chunks/{add-7M577U56.js → add-ZVQJE6BF.js} +51 -14
  6. package/dist/chunks/build-IDCBAC3R.js +243 -0
  7. package/dist/chunks/{chunk-F5PQWDOC.js → chunk-2PPATWD6.js} +1 -1
  8. package/dist/chunks/{chunk-DWMH5M4Q.js → chunk-2SFMOCWR.js} +1 -1
  9. package/dist/chunks/{chunk-WR7JTCGL.js → chunk-3BU2UCGV.js} +1 -1
  10. package/dist/chunks/{chunk-3PKFXNJZ.js → chunk-3KNPVXJ3.js} +7 -5
  11. package/dist/chunks/{chunk-2MJROFVC.js → chunk-3L2YLLHC.js} +8 -5
  12. package/dist/chunks/chunk-3ZE5CFVM.js +346 -0
  13. package/dist/chunks/{chunk-FHEMFAHB.js → chunk-4LDQIDRM.js} +15 -9
  14. package/dist/chunks/{chunk-R5FOIIHT.js → chunk-4N7XLXM2.js} +2 -2
  15. package/dist/chunks/{chunk-3242RXCN.js → chunk-766B6IIX.js} +1 -1
  16. package/dist/chunks/chunk-7AB6QOKM.js +85 -0
  17. package/dist/chunks/chunk-7N26744Z.js +1337 -0
  18. package/dist/chunks/{chunk-OGG6UBXK.js → chunk-7QVJTI5H.js} +1 -1
  19. package/dist/chunks/{chunk-FYQPTH5C.js → chunk-A5KP5HAI.js} +7 -5
  20. package/dist/chunks/{chunk-GIL3VAUR.js → chunk-B3JTF4CF.js} +5 -3
  21. package/dist/chunks/{chunk-4QVAYRYH.js → chunk-BEQV3X2L.js} +16 -1
  22. package/dist/chunks/{chunk-TBR2Q37Y.js → chunk-BX4IGDGM.js} +1576 -1439
  23. package/dist/chunks/{chunk-MIFDRYTN.js → chunk-CKIZU3CI.js} +2 -2
  24. package/dist/chunks/{chunk-4G6QZSBL.js → chunk-CSJBZKC5.js} +6 -4
  25. package/dist/chunks/{chunk-F7X55TOY.js → chunk-DDUZ2VME.js} +42 -16
  26. package/dist/chunks/{chunk-T4NODP6Y.js → chunk-DQXBNALU.js} +8 -6
  27. package/dist/chunks/{chunk-RAFH25WW.js → chunk-E3DRV4WI.js} +98 -1379
  28. package/dist/chunks/chunk-ELA5VN3A.js +305 -0
  29. package/dist/chunks/{chunk-IOAZNR6Z.js → chunk-F45WFNLZ.js} +1 -1
  30. package/dist/chunks/{chunk-NH43BFJ3.js → chunk-FBG4AMAX.js} +2 -2
  31. package/dist/chunks/chunk-G2S2QKKF.js +96 -0
  32. package/dist/chunks/{chunk-YA3WQFLY.js → chunk-GFG6QDIE.js} +1 -1
  33. package/dist/chunks/{chunk-NJUPUGOE.js → chunk-HT2XWSAJ.js} +1 -1
  34. package/dist/chunks/chunk-I2XE3GMB.js +21 -0
  35. package/dist/chunks/chunk-J6LK45HT.js +163 -0
  36. package/dist/chunks/{chunk-ZVLPUREX.js → chunk-JLWQWYKO.js} +2 -2
  37. package/dist/chunks/{chunk-SZXT3PDQ.js → chunk-KBEX5MYS.js} +1 -136
  38. package/dist/chunks/{chunk-2EDWKVNP.js → chunk-KES53W3V.js} +36 -18
  39. package/dist/chunks/{chunk-NZRWTCRM.js → chunk-KT4XXKJK.js} +1 -1
  40. package/dist/chunks/{chunk-XPKWKPWA.js → chunk-KXDWXXJH.js} +27 -1
  41. package/dist/chunks/{chunk-VZSZBD4V.js → chunk-M22O6CYY.js} +1 -1
  42. package/dist/chunks/chunk-MXLA3VQS.js +20 -0
  43. package/dist/chunks/{chunk-HD7B425F.js → chunk-N22RS64U.js} +6 -5
  44. package/dist/chunks/{chunk-A2TYQBX2.js → chunk-NFZHW6HH.js} +1152 -571
  45. package/dist/chunks/{chunk-LHFNIZ2P.js → chunk-O5GNPPTU.js} +4 -2
  46. package/dist/chunks/{chunk-NRNMT43R.js → chunk-PNSWZSLC.js} +7 -13
  47. package/dist/chunks/{chunk-LMHT3QR3.js → chunk-Q6OJHDZK.js} +4 -4
  48. package/dist/chunks/{chunk-MAHINYBW.js → chunk-QRRCK6VX.js} +3 -3
  49. package/dist/chunks/chunk-RBIFXFZX.js +52 -0
  50. package/dist/chunks/{chunk-OF2GNB42.js → chunk-RQ7H43CJ.js} +1 -1
  51. package/dist/chunks/{chunk-KSSNLCL4.js → chunk-SOFC4MLS.js} +2 -2
  52. package/dist/chunks/{chunk-3PGXYIKC.js → chunk-TEQKKTJQ.js} +6 -9
  53. package/dist/chunks/{chunk-GP5VCTEU.js → chunk-TIBP3CPZ.js} +209 -6
  54. package/dist/chunks/{chunk-UDWRZXIT.js → chunk-TJJ562C5.js} +18 -14
  55. package/dist/chunks/{chunk-RYO6FJFB.js → chunk-U6CTW37A.js} +2 -2
  56. package/dist/chunks/{chunk-KCF6S3XF.js → chunk-UMA66MKW.js} +76 -8
  57. package/dist/chunks/chunk-V5P25P7F.js +22 -0
  58. package/dist/chunks/chunk-WWPV6Z24.js +2910 -0
  59. package/dist/chunks/{chunk-QZD5DKUR.js → chunk-XIG4GH62.js} +2 -2
  60. package/dist/chunks/chunk-XLKFJPMT.js +150 -0
  61. package/dist/chunks/{chunk-555WJSO5.js → chunk-YTIUSEWE.js} +7 -5
  62. package/dist/chunks/{chunk-4PGF367U.js → chunk-YUISINFV.js} +233 -63
  63. package/dist/chunks/{chunk-DMSLNAVH.js → chunk-ZX2FSPWV.js} +2 -2
  64. package/dist/chunks/clear-W4AEVUND.js +132 -0
  65. package/dist/chunks/{compile-vercel-config-3OHO3TJA.js → compile-vercel-config-Q45PSZDQ.js} +6 -5
  66. package/dist/chunks/config-MZ3KLGOK.js +159 -0
  67. package/dist/chunks/config-validator.mjs +1 -1
  68. package/dist/chunks/{constants-3FSSR6E7.js → constants-T6BULVX6.js} +1 -1
  69. package/dist/chunks/{delete-VOSJLNEA.js → delete-7NADCRED.js} +8 -7
  70. package/dist/chunks/{delete-3DZOCWCC.js → delete-NAZTL2IK.js} +10 -9
  71. package/dist/chunks/{disable-LQDEVRQF.js → disable-SB224IIS.js} +8 -7
  72. package/dist/chunks/{discard-RGV4JKXQ.js → discard-MME6PI7B.js} +8 -7
  73. package/dist/chunks/{edit-UPZPI54L.js → edit-HKQEFIOY.js} +11 -10
  74. package/dist/chunks/{edit-SFIEOQ24.js → edit-NW4YBUR6.js} +9 -8
  75. package/dist/chunks/{enable-6UVH35WC.js → enable-QEL5CXVD.js} +8 -7
  76. package/dist/chunks/{export-6CEG3CK7.js → export-XDOZTLG3.js} +8 -7
  77. package/dist/chunks/{image-CQRCD2OE.js → image-AJMRAAOW.js} +5 -5
  78. package/dist/chunks/import-builders-7UG32FQA.js +28 -0
  79. package/dist/chunks/{inspect-4ZAH3RFT.js → inspect-4YTOMOOP.js} +11 -10
  80. package/dist/chunks/{inspect-UM3LDRPV.js → inspect-DGBKWCS4.js} +17 -15
  81. package/dist/chunks/{inspect-EXQBIAFF.js → inspect-JPZFHGAF.js} +16 -14
  82. package/dist/chunks/{inspect-K5ZMQG7X.js → inspect-T6HYEMLA.js} +17 -15
  83. package/dist/chunks/{inspect-ZFRY3X3H.js → inspect-TW5DENBM.js} +19 -16
  84. package/dist/chunks/{list-4DRVM7Q4.js → list-ESW6P765.js} +18 -16
  85. package/dist/chunks/{list-KCUHD4OA.js → list-T7LXP6VX.js} +11 -10
  86. package/dist/chunks/{list-FJCBOCCA.js → list-YQ4LADLW.js} +11 -9
  87. package/dist/chunks/{login-DFGYNU3K.js → login-VJESL6WK.js} +25 -54
  88. package/dist/chunks/{ls-RHEQ6YQB.js → ls-2DYO6E4E.js} +22 -20
  89. package/dist/chunks/{ls-34NCZKBE.js → ls-4A6CGBPD.js} +18 -16
  90. package/dist/chunks/{ls-CG6A7UXF.js → ls-5AQBMBOG.js} +18 -16
  91. package/dist/chunks/{ls-4QHHVXXD.js → ls-5I2W7LZQ.js} +20 -17
  92. package/dist/chunks/ls-Y46O3BCS.js +178 -0
  93. package/dist/chunks/{open-E3XADEMX.js → open-SZDSII6L.js} +9 -8
  94. package/dist/chunks/permissions-HRR47E2L.js +95 -0
  95. package/dist/chunks/{publish-Z3AQRUCS.js → publish-D2QWFUP4.js} +8 -7
  96. package/dist/chunks/push-75R5ZZIW.js +183 -0
  97. package/dist/chunks/{query-3EV66DO3.js → query-LL2GMJWQ.js} +15 -13
  98. package/dist/chunks/{reorder-VA5E5ZJT.js → reorder-GNCRV6CV.js} +8 -7
  99. package/dist/chunks/{reply-SNSCNKAW.js → reply-S3UUI6C6.js} +11 -10
  100. package/dist/chunks/{resolve-6ZX4RTXX.js → resolve-PCBDK47N.js} +10 -9
  101. package/dist/chunks/{restore-NEHI5B5P.js → restore-SXI5SHGJ.js} +8 -7
  102. package/dist/chunks/rm-574XTDSM.js +186 -0
  103. package/dist/chunks/{rm-E5ZVLAKO.js → rm-BEIAUTSF.js} +18 -13
  104. package/dist/chunks/{rm-22B22E47.js → rm-YK2EGEPB.js} +15 -11
  105. package/dist/chunks/{rm-FR6KE744.js → rm-ZFWVI6JE.js} +13 -11
  106. package/dist/chunks/{rule-inspect-DMP2CKJQ.js → rule-inspect-QDQUU3EO.js} +22 -27
  107. package/dist/chunks/{rules-EYGXEI2Z.js → rules-FNA3NXZZ.js} +11 -8
  108. package/dist/chunks/{schema-2IIWOBSQ.js → schema-5CASPRP6.js} +13 -11
  109. package/dist/chunks/schema-ZNPIMQL5.js +426 -0
  110. package/dist/chunks/{tags-ZDVYRHAY.js → tags-SRHDQUF6.js} +4 -4
  111. package/dist/chunks/{types-QKLIFDDP.js → types-UWI4HETD.js} +8 -6
  112. package/dist/chunks/{update-QH4DQMZV.js → update-FSTNM3OX.js} +45 -11
  113. package/dist/commands/build/index.js +279 -2935
  114. package/dist/commands/deploy/index.js +61 -38
  115. package/dist/commands/dev/index.js +142 -27
  116. package/dist/commands/env/index.js +389 -178
  117. package/dist/commands/link/index.js +27 -24
  118. package/dist/commands/list/index.js +20 -13
  119. package/dist/commands-bulk.js +8781 -3949
  120. package/dist/help.js +1 -1
  121. package/dist/index.js +60 -48
  122. package/dist/vc.js +11 -14
  123. package/dist/version.mjs +1 -1
  124. package/package.json +75 -127
  125. package/dist/chunks/chunk-3VS4DTAU.js +0 -178
  126. package/dist/chunks/chunk-6OMC3HOW.js +0 -73
  127. package/dist/chunks/chunk-V4RMJKQP.js +0 -36
  128. package/dist/chunks/chunk-YOZCJHLZ.js +0 -204
  129. package/dist/chunks/{chunk-BUZRVER7.js → chunk-P65EEFTR.js} +3 -3
package/README.md CHANGED
@@ -13,8 +13,8 @@ npm install @depup/vercel
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [vercel](https://www.npmjs.com/package/vercel) @ 57.0.0 |
17
- | Processed | 2026-07-26 |
16
+ | Original | [vercel](https://www.npmjs.com/package/vercel) @ 58.9.0 |
17
+ | Processed | 2026-08-09 |
18
18
  | Smoke test | failed |
19
19
  | Deps updated | 11 |
20
20
 
@@ -22,16 +22,16 @@ npm install @depup/vercel
22
22
 
23
23
  | Dependency | From | To |
24
24
  |------------|------|-----|
25
- | @vercel/blob | 2.4.0 | ^2.6.1 |
25
+ | @vercel/blob | 2.4.0 | ^2.7.0 |
26
26
  | @vercel/fun | 1.3.0 | ^1.3.1 |
27
27
  | @vercel/prepare-flags-definitions | 0.3.0 | ^0.4.0 |
28
28
  | chokidar | 4.0.0 | ^5.0.0 |
29
- | esbuild | 0.27.0 | ^0.28.1 |
30
- | jose | 5.9.6 | ^6.2.4 |
29
+ | esbuild | 0.27.0 | ^0.28.2 |
30
+ | jose | 5.9.6 | ^6.2.8 |
31
31
  | luxon | ^3.4.0 | ^3.7.2 |
32
- | sandbox | 3.4.0 | ^3.5.3 |
33
- | smol-toml | 1.5.2 | ^1.7.0 |
34
- | undici | 5.29.0 | ^8.9.0 |
32
+ | sandbox | 3.4.0 | ^4.0.0 |
33
+ | smol-toml | 1.5.2 | ^1.7.1 |
34
+ | undici | 5.29.0 | ^8.10.0 |
35
35
  | zod | 4.1.11 | ^4.4.3 |
36
36
 
37
37
  ---
package/changes.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "bumped": {
3
3
  "@vercel/blob": {
4
4
  "from": "2.4.0",
5
- "to": "^2.6.1"
5
+ "to": "^2.7.0"
6
6
  },
7
7
  "@vercel/fun": {
8
8
  "from": "1.3.0",
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "esbuild": {
20
20
  "from": "0.27.0",
21
- "to": "^0.28.1"
21
+ "to": "^0.28.2"
22
22
  },
23
23
  "jose": {
24
24
  "from": "5.9.6",
25
- "to": "^6.2.4"
25
+ "to": "^6.2.8"
26
26
  },
27
27
  "luxon": {
28
28
  "from": "^3.4.0",
@@ -30,21 +30,21 @@
30
30
  },
31
31
  "sandbox": {
32
32
  "from": "3.4.0",
33
- "to": "^3.5.3"
33
+ "to": "^4.0.0"
34
34
  },
35
35
  "smol-toml": {
36
36
  "from": "1.5.2",
37
- "to": "^1.7.0"
37
+ "to": "^1.7.1"
38
38
  },
39
39
  "undici": {
40
40
  "from": "5.29.0",
41
- "to": "^8.9.0"
41
+ "to": "^8.10.0"
42
42
  },
43
43
  "zod": {
44
44
  "from": "4.1.11",
45
45
  "to": "^4.4.3"
46
46
  }
47
47
  },
48
- "timestamp": "2026-07-26T01:06:04.242Z",
48
+ "timestamp": "2026-08-09T00:37:00.760Z",
49
49
  "totalUpdated": 11
50
50
  }
@@ -9,38 +9,43 @@ import {
9
9
  handleVcrApiError,
10
10
  resolveVcrScope,
11
11
  validateVcrJsonOutput
12
- } from "./chunk-GP5VCTEU.js";
12
+ } from "./chunk-TIBP3CPZ.js";
13
+ import "./chunk-G75NFPIT.js";
13
14
  import {
14
15
  outputError
15
- } from "./chunk-BUZRVER7.js";
16
- import "./chunk-XPKWKPWA.js";
16
+ } from "./chunk-P65EEFTR.js";
17
+ import "./chunk-KXDWXXJH.js";
17
18
  import {
18
19
  addSubcommand
19
- } from "./chunk-3VS4DTAU.js";
20
- import "./chunk-GIL3VAUR.js";
21
- import "./chunk-FYQPTH5C.js";
22
- import "./chunk-TBR2Q37Y.js";
20
+ } from "./chunk-ELA5VN3A.js";
21
+ import "./chunk-B3JTF4CF.js";
22
+ import "./chunk-A5KP5HAI.js";
23
+ import "./chunk-J6LK45HT.js";
24
+ import "./chunk-R6IGDGX3.js";
25
+ import "./chunk-BX4IGDGM.js";
23
26
  import "./chunk-ECCWJHC6.js";
24
27
  import {
25
28
  AGENT_REASON,
26
29
  buildCommandWithGlobalFlags,
27
30
  outputAgentError
28
- } from "./chunk-UDWRZXIT.js";
31
+ } from "./chunk-TJJ562C5.js";
32
+ import "./chunk-GGP5R3FU.js";
29
33
  import {
30
- parseArguments,
31
34
  printError
32
- } from "./chunk-SZXT3PDQ.js";
35
+ } from "./chunk-KBEX5MYS.js";
36
+ import {
37
+ parseArguments
38
+ } from "./chunk-XLKFJPMT.js";
33
39
  import {
34
40
  getFlagsSpecification,
35
41
  isAPIError,
36
42
  packageName
37
- } from "./chunk-KSSNLCL4.js";
43
+ } from "./chunk-SOFC4MLS.js";
38
44
  import "./chunk-P4QNYOFB.js";
39
45
  import "./chunk-52QYYTM5.js";
40
46
  import {
41
47
  output_manager_default
42
48
  } from "./chunk-OX7KI3LF.js";
43
- import "./chunk-GGP5R3FU.js";
44
49
  import "./chunk-S7KYDPEM.js";
45
50
  import "./chunk-TZ2YI2VH.js";
46
51
 
@@ -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-TIBP3CPZ.js";
21
+ import "./chunk-G75NFPIT.js";
22
+ import {
23
+ outputError
24
+ } from "./chunk-P65EEFTR.js";
25
+ import "./chunk-KXDWXXJH.js";
26
+ import {
27
+ permissionsAddSubcommand
28
+ } from "./chunk-J6LK45HT.js";
29
+ import "./chunk-R6IGDGX3.js";
30
+ import "./chunk-BX4IGDGM.js";
31
+ import "./chunk-ECCWJHC6.js";
32
+ import {
33
+ AGENT_REASON,
34
+ buildCommandWithGlobalFlags,
35
+ outputAgentError
36
+ } from "./chunk-TJJ562C5.js";
37
+ import "./chunk-GGP5R3FU.js";
38
+ import {
39
+ printError
40
+ } from "./chunk-KBEX5MYS.js";
41
+ import {
42
+ parseArguments
43
+ } from "./chunk-XLKFJPMT.js";
44
+ import {
45
+ getFlagsSpecification,
46
+ isAPIError,
47
+ packageName
48
+ } from "./chunk-SOFC4MLS.js";
49
+ import "./chunk-P4QNYOFB.js";
50
+ import "./chunk-52QYYTM5.js";
51
+ import {
52
+ output_manager_default
53
+ } from "./chunk-OX7KI3LF.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
+ };
@@ -4,42 +4,59 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
+ import {
8
+ parseCustomAlertQueryBody,
9
+ resolveCustomAlertProjectName,
10
+ setMissingCustomAlertProjectScope
11
+ } from "./chunk-G2S2QKKF.js";
7
12
  import {
8
13
  emitRulesArgParseError,
9
14
  handleRulesApiError,
10
15
  parseRulesFlagsAndScope,
11
16
  rulesCollectionPath
12
- } from "./chunk-MAHINYBW.js";
13
- import "./chunk-T4NODP6Y.js";
14
- import "./chunk-BUZRVER7.js";
17
+ } from "./chunk-QRRCK6VX.js";
18
+ import {
19
+ isCustomAlertRule
20
+ } from "./chunk-TEQKKTJQ.js";
21
+ import "./chunk-DQXBNALU.js";
22
+ import "./chunk-A3NYPUKZ.js";
23
+ import "./chunk-P65EEFTR.js";
24
+ import "./chunk-FGDKMNEN.js";
25
+ import "./chunk-YUISINFV.js";
26
+ import "./chunk-V5P25P7F.js";
27
+ import "./chunk-RQ7H43CJ.js";
15
28
  import {
16
29
  validateJsonOutput
17
- } from "./chunk-XPKWKPWA.js";
30
+ } from "./chunk-KXDWXXJH.js";
18
31
  import {
19
32
  rulesAddSubcommand
20
- } from "./chunk-KCF6S3XF.js";
21
- import "./chunk-TBR2Q37Y.js";
33
+ } from "./chunk-UMA66MKW.js";
34
+ import "./chunk-7AB6QOKM.js";
35
+ import "./chunk-KT4XXKJK.js";
36
+ import "./chunk-BX4IGDGM.js";
22
37
  import "./chunk-ECCWJHC6.js";
23
38
  import {
24
39
  AGENT_REASON,
25
40
  buildCommandWithGlobalFlags,
26
41
  outputAgentError
27
- } from "./chunk-UDWRZXIT.js";
42
+ } from "./chunk-TJJ562C5.js";
43
+ import "./chunk-GGP5R3FU.js";
28
44
  import {
29
- parseArguments,
30
45
  printError
31
- } from "./chunk-SZXT3PDQ.js";
46
+ } from "./chunk-KBEX5MYS.js";
47
+ import {
48
+ parseArguments
49
+ } from "./chunk-XLKFJPMT.js";
32
50
  import {
33
51
  getFlagsSpecification,
34
52
  isAPIError,
35
53
  packageName
36
- } from "./chunk-KSSNLCL4.js";
54
+ } from "./chunk-SOFC4MLS.js";
37
55
  import "./chunk-P4QNYOFB.js";
38
56
  import "./chunk-52QYYTM5.js";
39
57
  import {
40
58
  output_manager_default
41
59
  } from "./chunk-OX7KI3LF.js";
42
- import "./chunk-GGP5R3FU.js";
43
60
  import "./chunk-S7KYDPEM.js";
44
61
  import "./chunk-TZ2YI2VH.js";
45
62
 
@@ -146,11 +163,31 @@ async function add(client, argv) {
146
163
  output_manager_default.error("Invalid JSON in --body file.");
147
164
  return 1;
148
165
  }
166
+ const parsedCustomAlertQuery = parseCustomAlertQueryBody(client, body);
167
+ if (typeof parsedCustomAlertQuery === "number") {
168
+ return parsedCustomAlertQuery;
169
+ }
170
+ const customAlertRule = isCustomAlertRule(body);
171
+ if (!customAlertRule && parsedArgs.flags["--project"] && scope.projectId && body.projectId === void 0) {
172
+ body.projectId = `projectId eq '${scope.projectId}'`;
173
+ }
174
+ const customAlertProjectId = typeof body.projectId === "string" ? body.projectId : scope.projectId;
175
+ if (parsedCustomAlertQuery && customAlertProjectId) {
176
+ body.projectId ??= customAlertProjectId;
177
+ const projectName = await resolveCustomAlertProjectName(
178
+ client,
179
+ scope,
180
+ customAlertProjectId
181
+ );
182
+ setMissingCustomAlertProjectScope(
183
+ parsedCustomAlertQuery,
184
+ scope.teamId,
185
+ customAlertProjectId,
186
+ projectName
187
+ );
188
+ }
149
189
  delete body.id;
150
190
  delete body.teamId;
151
- if (scope.projectId !== void 0 && body.projectId === void 0) {
152
- body.projectId = scope.projectId;
153
- }
154
191
  const path = rulesCollectionPath(scope);
155
192
  output_manager_default.spinner("Creating alert rule...");
156
193
  try {
@@ -0,0 +1,243 @@
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
+ DEFAULT_TAG,
9
+ buildRepositoryReference,
10
+ parseNameArg,
11
+ validateImageParts
12
+ } from "./chunk-RBIFXFZX.js";
13
+ import {
14
+ VCR_ENGINES,
15
+ emitVcrArgParseError,
16
+ isBuildxAvailable,
17
+ isEngineInstalled,
18
+ pushCompressionArgs,
19
+ reportEngineCommandFailure,
20
+ reportEnginePushFailure,
21
+ resolveRegistry,
22
+ resolveVcrScope,
23
+ runEngine,
24
+ splitPassthrough,
25
+ validateVcrChoice
26
+ } from "./chunk-TIBP3CPZ.js";
27
+ import "./chunk-G75NFPIT.js";
28
+ import {
29
+ outputError
30
+ } from "./chunk-P65EEFTR.js";
31
+ import "./chunk-KXDWXXJH.js";
32
+ import {
33
+ buildSubcommand
34
+ } from "./chunk-ELA5VN3A.js";
35
+ import "./chunk-B3JTF4CF.js";
36
+ import "./chunk-A5KP5HAI.js";
37
+ import "./chunk-J6LK45HT.js";
38
+ import "./chunk-R6IGDGX3.js";
39
+ import "./chunk-BX4IGDGM.js";
40
+ import "./chunk-ECCWJHC6.js";
41
+ import {
42
+ AGENT_REASON,
43
+ buildCommandWithGlobalFlags,
44
+ outputAgentError
45
+ } from "./chunk-TJJ562C5.js";
46
+ import "./chunk-GGP5R3FU.js";
47
+ import {
48
+ printError
49
+ } from "./chunk-KBEX5MYS.js";
50
+ import {
51
+ parseArguments
52
+ } from "./chunk-XLKFJPMT.js";
53
+ import {
54
+ getFlagsSpecification
55
+ } from "./chunk-SOFC4MLS.js";
56
+ import "./chunk-P4QNYOFB.js";
57
+ import "./chunk-52QYYTM5.js";
58
+ import {
59
+ output_manager_default
60
+ } from "./chunk-OX7KI3LF.js";
61
+ import "./chunk-S7KYDPEM.js";
62
+ import "./chunk-TZ2YI2VH.js";
63
+
64
+ // src/commands/vcr/build.ts
65
+ var DEFAULT_PLATFORM = "linux/amd64";
66
+ async function build(client, telemetry) {
67
+ const { own, passthrough } = splitPassthrough(client.argv);
68
+ let parsedArgs;
69
+ try {
70
+ parsedArgs = parseArguments(
71
+ own,
72
+ getFlagsSpecification(buildSubcommand.options)
73
+ );
74
+ } catch (err) {
75
+ emitVcrArgParseError(client, err, "vcr build <engine> [path] [name[:tag]]");
76
+ printError(err);
77
+ return 1;
78
+ }
79
+ const [engineArg, pathArg, nameArg] = parsedArgs.args.slice(2);
80
+ const project = parsedArgs.flags["--project"];
81
+ const platform = parsedArgs.flags["--platform"];
82
+ const push = Boolean(parsedArgs.flags["--push"]);
83
+ telemetry.trackCliArgumentEngine(engineArg);
84
+ telemetry.trackCliArgumentPath(pathArg);
85
+ telemetry.trackCliArgumentName(nameArg);
86
+ telemetry.trackCliOptionProject(project);
87
+ telemetry.trackCliOptionPlatform(platform);
88
+ telemetry.trackCliFlagPush(push);
89
+ if (!engineArg) {
90
+ const message = `Missing engine. Choose one of: ${VCR_ENGINES.join(", ")}.`;
91
+ outputAgentError(
92
+ client,
93
+ {
94
+ status: "error",
95
+ reason: AGENT_REASON.MISSING_ARGUMENTS,
96
+ message,
97
+ next: [
98
+ {
99
+ command: buildCommandWithGlobalFlags(
100
+ client.argv,
101
+ "vcr build docker"
102
+ ),
103
+ when: "Replace docker with the container tool you use"
104
+ }
105
+ ]
106
+ },
107
+ 1
108
+ );
109
+ return outputError(client, false, "MISSING_ARGUMENTS", message);
110
+ }
111
+ const choiceError = validateVcrChoice(
112
+ client,
113
+ "engine",
114
+ engineArg,
115
+ VCR_ENGINES,
116
+ false
117
+ );
118
+ if (typeof choiceError === "number") {
119
+ return choiceError;
120
+ }
121
+ const engine = engineArg;
122
+ if (!isEngineInstalled(engine)) {
123
+ const message = `\`${engine}\` is not installed or not on your PATH. Install it and try again.`;
124
+ outputAgentError(
125
+ client,
126
+ {
127
+ status: "error",
128
+ reason: "engine_not_found",
129
+ message
130
+ },
131
+ 1
132
+ );
133
+ return outputError(client, false, "ENGINE_NOT_FOUND", message);
134
+ }
135
+ const scope = await resolveVcrScope(client, { project, jsonOutput: false });
136
+ if (typeof scope === "number") {
137
+ return scope;
138
+ }
139
+ const parsed = parseNameArg(nameArg, scope.projectName);
140
+ if ("error" in parsed) {
141
+ outputAgentError(
142
+ client,
143
+ {
144
+ status: "error",
145
+ reason: AGENT_REASON.INVALID_ARGUMENTS,
146
+ message: parsed.error
147
+ },
148
+ 1
149
+ );
150
+ return outputError(client, false, "INVALID_ARGUMENTS", parsed.error);
151
+ }
152
+ const validationError = validateImageParts(parsed);
153
+ if (validationError) {
154
+ outputAgentError(
155
+ client,
156
+ {
157
+ status: "error",
158
+ reason: AGENT_REASON.INVALID_ARGUMENTS,
159
+ message: validationError
160
+ },
161
+ 1
162
+ );
163
+ return outputError(client, false, "INVALID_ARGUMENTS", validationError);
164
+ }
165
+ const base = buildRepositoryReference({
166
+ registry: resolveRegistry(),
167
+ teamSlug: scope.teamSlug,
168
+ projectName: scope.projectName,
169
+ repository: parsed.repository
170
+ });
171
+ const ref = `${base}:${parsed.tag ?? DEFAULT_TAG}`;
172
+ const contextPath = pathArg ?? ".";
173
+ const buildPlatform = platform ?? DEFAULT_PLATFORM;
174
+ if (push && engine === "docker" && await isBuildxAvailable()) {
175
+ const outputSpec = `type=image,name=${ref},push=true,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true`;
176
+ const engineArgs2 = [
177
+ "buildx",
178
+ "build",
179
+ "--platform",
180
+ buildPlatform,
181
+ "--output",
182
+ outputSpec,
183
+ ...passthrough,
184
+ contextPath
185
+ ];
186
+ output_manager_default.log(`Running: ${engine} ${engineArgs2.join(" ")}`);
187
+ const result2 = await runEngine(engine, engineArgs2, {
188
+ cwd: client.cwd,
189
+ captureStderr: true
190
+ });
191
+ if (result2.exitCode !== 0) {
192
+ return reportEnginePushFailure(client, engine, "buildx build", result2);
193
+ }
194
+ output_manager_default.success(`Built and pushed ${ref} (zstd compression)`);
195
+ return 0;
196
+ }
197
+ if (push && engine === "docker") {
198
+ output_manager_default.warn(
199
+ "Docker Buildx is not available; building and pushing without zstd compression. Install Buildx for smaller, faster image pushes."
200
+ );
201
+ }
202
+ const engineArgs = [
203
+ "build",
204
+ "--platform",
205
+ buildPlatform,
206
+ "--tag",
207
+ ref,
208
+ ...passthrough,
209
+ contextPath
210
+ ];
211
+ output_manager_default.log(`Running: ${engine} ${engineArgs.join(" ")}`);
212
+ const result = await runEngine(engine, engineArgs, { cwd: client.cwd });
213
+ if (result.exitCode !== 0) {
214
+ return reportEngineCommandFailure(client, engine, "build", result);
215
+ }
216
+ if (!push) {
217
+ output_manager_default.success(`Built ${ref}`);
218
+ output_manager_default.log(
219
+ `Push it with \`${buildCommandWithGlobalFlags(
220
+ client.argv,
221
+ `vcr push ${engine}${nameArg ? ` ${nameArg}` : ""}`
222
+ )}\`.`
223
+ );
224
+ return 0;
225
+ }
226
+ const pushArgs = ["push", ...pushCompressionArgs(engine), ref];
227
+ output_manager_default.log(`Running: ${engine} ${pushArgs.join(" ")}`);
228
+ const pushResult = await runEngine(engine, pushArgs, {
229
+ cwd: client.cwd,
230
+ captureStderr: true
231
+ });
232
+ if (pushResult.exitCode !== 0) {
233
+ return reportEnginePushFailure(client, engine, "push", pushResult);
234
+ }
235
+ const compressed = engine !== "docker";
236
+ output_manager_default.success(
237
+ `Built and pushed ${ref}${compressed ? " (zstd compression)" : ""}`
238
+ );
239
+ return 0;
240
+ }
241
+ export {
242
+ build as default
243
+ };
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  ALIGNED_LABEL_WIDTH
9
- } from "./chunk-TBR2Q37Y.js";
9
+ } from "./chunk-BX4IGDGM.js";
10
10
  import {
11
11
  require_ms
12
12
  } from "./chunk-GGP5R3FU.js";
@@ -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-OF2GNB42.js";
9
+ } from "./chunk-RQ7H43CJ.js";
10
10
  import {
11
11
  require_dist
12
12
  } from "./chunk-OX7KI3LF.js";