vercel 54.1.0 → 54.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 (67) hide show
  1. package/dist/chunks/{add-XFFRWMRQ.js → add-6BI52GC7.js} +8 -8
  2. package/dist/chunks/{chunk-ZKKIBUCU.js → chunk-3NTROBCB.js} +7 -4
  3. package/dist/chunks/{chunk-XVAEOG4L.js → chunk-3TDGMELF.js} +3 -5
  4. package/dist/chunks/{chunk-4OEA5ILS.js → chunk-4CIXZOP4.js} +29 -0
  5. package/dist/chunks/{chunk-V6RCNEUA.js → chunk-4KGRBMBC.js} +8 -8
  6. package/dist/chunks/{chunk-JFVGRFME.js → chunk-5EKBCYHA.js} +1 -1
  7. package/dist/chunks/{chunk-FUBTAFL2.js → chunk-5TTQBT67.js} +1 -1
  8. package/dist/chunks/{chunk-FXOKKAK2.js → chunk-63MSANDD.js} +14 -10
  9. package/dist/chunks/{chunk-PPIAHRII.js → chunk-7UDM3VHD.js} +1 -1
  10. package/dist/chunks/{chunk-LVUE7LLE.js → chunk-AKWLMA5B.js} +1 -1
  11. package/dist/chunks/{chunk-C5YP6KFI.js → chunk-AOJHEPS4.js} +6 -0
  12. package/dist/chunks/{chunk-4VPRHRPA.js → chunk-B3RJGSB2.js} +2 -2
  13. package/dist/chunks/{chunk-ZAAKSLHC.js → chunk-C2V6DCWN.js} +4 -2
  14. package/dist/chunks/{chunk-4PSOOFYO.js → chunk-DJA3IN2X.js} +1 -1
  15. package/dist/chunks/{chunk-FXSXQHVF.js → chunk-EU5K7JFJ.js} +5 -5
  16. package/dist/chunks/{chunk-CVDYWVCD.js → chunk-GJI2IQHA.js} +2 -2
  17. package/dist/chunks/{chunk-4GQQJY5Y.js → chunk-H33IJ7OP.js} +9 -0
  18. package/dist/chunks/{chunk-UVFXUXOZ.js → chunk-HFVP2JUO.js} +311 -72
  19. package/dist/chunks/{chunk-E3NE4SKN.js → chunk-L6Q2EQPI.js} +1 -0
  20. package/dist/chunks/{chunk-DKD6GTQT.js → chunk-OM5Z2KO5.js} +1 -1
  21. package/dist/chunks/{chunk-PNA7EZB2.js → chunk-PU4PEBGY.js} +1 -1
  22. package/dist/chunks/{chunk-F2UPASLT.js → chunk-PXR6WCEU.js} +5 -5
  23. package/dist/chunks/{chunk-N4WFAZKO.js → chunk-R6QYB2GK.js} +13 -3
  24. package/dist/chunks/{chunk-X775BOSL.js → chunk-RNIZUKES.js} +5018 -4454
  25. package/dist/chunks/{chunk-UTXSTM52.js → chunk-SJAFZ3UZ.js} +65 -5
  26. package/dist/chunks/{chunk-J3BCJYPE.js → chunk-SRLTKHXQ.js} +486 -8
  27. package/dist/chunks/{chunk-2DFWEDF7.js → chunk-SRVNEJVN.js} +2 -2
  28. package/dist/chunks/{chunk-XNUHSM7I.js → chunk-SXYVZF6H.js} +3 -3
  29. package/dist/chunks/{chunk-TZMIHH5D.js → chunk-TM2USC5N.js} +6 -11
  30. package/dist/chunks/{chunk-MMF4BVAP.js → chunk-TTOZFGDX.js} +3 -3
  31. package/dist/chunks/{chunk-KWDV5FZH.js → chunk-W64ECC2K.js} +1 -1
  32. package/dist/chunks/{chunk-IFATV36R.js → chunk-YAOSNCGO.js} +5 -8
  33. package/dist/chunks/{chunk-CQANJIEC.js → chunk-YP423QYK.js} +4 -6
  34. package/dist/chunks/{chunk-MUBKPS2Z.js → chunk-ZCMQ43RC.js} +1 -1
  35. package/dist/chunks/{chunk-IIZO5JJ2.js → chunk-ZUK6C2UA.js} +1 -1
  36. package/dist/chunks/{compile-vercel-config-42PRUTEP.js → compile-vercel-config-UTUECEB5.js} +3 -3
  37. package/dist/chunks/{delete-MXCXLO5L.js → delete-FML7PGMQ.js} +6 -6
  38. package/dist/chunks/{disable-LXQSUVY3.js → disable-LJFGBJQD.js} +6 -6
  39. package/dist/chunks/{discard-CKMEANJI.js → discard-JKLUB56V.js} +6 -6
  40. package/dist/chunks/{edit-PKYWQTN6.js → edit-24LNAGLI.js} +8 -8
  41. package/dist/chunks/{enable-IONDBJSL.js → enable-XV6WCSRR.js} +6 -6
  42. package/dist/chunks/{export-YV3QFTMT.js → export-IZAJQNHO.js} +6 -6
  43. package/dist/chunks/{inspect-SF355FJC.js → inspect-4OYBTMEZ.js} +10 -10
  44. package/dist/chunks/{list-ZGR3WI5L.js → list-FOLL3X7L.js} +9 -9
  45. package/dist/chunks/{list-GEI7DMTS.js → list-PEXOOVJA.js} +5 -5
  46. package/dist/chunks/{ls-GYN5LXZK.js → ls-3D5FA5CD.js} +8 -8
  47. package/dist/chunks/{publish-3WCELCTS.js → publish-FV5R2JPI.js} +6 -6
  48. package/dist/chunks/{query-TP56OPX6.js → query-JM422UQL.js} +6 -6
  49. package/dist/chunks/{reorder-QRNHPN5V.js → reorder-H5VPRRYP.js} +6 -6
  50. package/dist/chunks/{restore-IGN4HUFX.js → restore-JPFHV2E2.js} +6 -6
  51. package/dist/chunks/{rm-55RGOT4O.js → rm-AQFIGZB7.js} +8 -8
  52. package/dist/chunks/{routes-2YVMQEPC.js → routes-IBID4NSZ.js} +2 -2
  53. package/dist/chunks/{rule-inspect-QVOVMKDK.js → rule-inspect-XV56NBAE.js} +8 -8
  54. package/dist/chunks/{rules-KRCW5RQK.js → rules-SUXFDKPS.js} +7 -7
  55. package/dist/chunks/{schema-3J3IBIFA.js → schema-3I4KYWU3.js} +7 -7
  56. package/dist/chunks/{types-QAT6PCGL.js → types-V6KTYGWP.js} +3 -3
  57. package/dist/chunks/{update-E5UAD2DD.js → update-3W7ETGXO.js} +8 -8
  58. package/dist/commands/build/index.js +94 -31
  59. package/dist/commands/deploy/index.js +32 -26
  60. package/dist/commands/dev/index.js +86 -36
  61. package/dist/commands/env/index.js +18 -22
  62. package/dist/commands/link/index.js +22 -29
  63. package/dist/commands/list/index.js +10 -10
  64. package/dist/commands-bulk.js +3662 -1847
  65. package/dist/index.js +117 -463
  66. package/dist/version.mjs +1 -1
  67. package/package.json +25 -24
@@ -4,9 +4,16 @@ 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
+ AGENT_REASON,
9
+ AGENT_STATUS
10
+ } from "./chunk-L6Q2EQPI.js";
7
11
  import {
8
12
  getLocalPathConfig
9
- } from "./chunk-4VPRHRPA.js";
13
+ } from "./chunk-B3RJGSB2.js";
14
+ import {
15
+ getScope
16
+ } from "./chunk-W64ECC2K.js";
10
17
  import {
11
18
  VERCEL_DIR_PROJECT,
12
19
  VERCEL_DIR_README,
@@ -39,13 +46,18 @@ import {
39
46
  selectAndParseRemoteUrl,
40
47
  selectOrg,
41
48
  writeServicesConfig
42
- } from "./chunk-X775BOSL.js";
49
+ } from "./chunk-RNIZUKES.js";
50
+ import {
51
+ buildCommandWithGlobalFlags,
52
+ outputAgentError,
53
+ shouldEmitNonInteractiveCommandError
54
+ } from "./chunk-ULXHXZCZ.js";
43
55
  import {
44
56
  table
45
- } from "./chunk-DKD6GTQT.js";
57
+ } from "./chunk-OM5Z2KO5.js";
46
58
  import {
47
59
  printError
48
- } from "./chunk-4GQQJY5Y.js";
60
+ } from "./chunk-H33IJ7OP.js";
49
61
  import {
50
62
  CantParseJSONFile,
51
63
  ProjectNotFound,
@@ -148,6 +160,53 @@ async function readConfig(dir) {
148
160
  return null;
149
161
  }
150
162
 
163
+ // src/util/projects/project-not-found-error.ts
164
+ async function printProjectNotFoundError(client, projectNameOrId, commandName) {
165
+ let contextName;
166
+ try {
167
+ const scope = await getScope(client);
168
+ contextName = scope.contextName;
169
+ } catch (err) {
170
+ output_manager_default.debug(`getScope failed during error reporting: ${err}`);
171
+ }
172
+ const scopeClause = contextName ? ` (${contextName})` : "";
173
+ const headline = `Project "${projectNameOrId}" was not found in the current scope${scopeClause}.`;
174
+ output_manager_default.error(
175
+ `${headline}
176
+
177
+ If it lives in a different team or account:
178
+ \u2022 Retry with \`--scope <team-slug|your-username>\`, or
179
+ \u2022 Run \`vercel switch <team-slug|your-username>\` to change scope.
180
+
181
+ List accessible teams with \`vercel teams ls\`.`
182
+ );
183
+ if (!shouldEmitNonInteractiveCommandError(client)) {
184
+ return;
185
+ }
186
+ const retryWithScope = buildCommandWithGlobalFlags(
187
+ client.argv,
188
+ `${commandName} --project ${projectNameOrId} --scope <team-slug>`
189
+ );
190
+ outputAgentError(
191
+ client,
192
+ {
193
+ status: AGENT_STATUS.ERROR,
194
+ reason: AGENT_REASON.PROJECT_NOT_FOUND,
195
+ message: `${headline} If it lives in a different team or account, retry with --scope <team-slug|your-username> or run \`vercel switch <team-slug|your-username>\` to change scope.`,
196
+ ...contextName ? { scope: contextName } : {},
197
+ next: [
198
+ { command: "vercel teams ls", when: "list accessible teams" },
199
+ { command: retryWithScope, when: "retry with a specific team" },
200
+ {
201
+ command: "vercel switch <team-slug>",
202
+ when: "change the default scope"
203
+ }
204
+ ]
205
+ },
206
+ 1
207
+ );
208
+ }
209
+
151
210
  // src/util/input/display-services.ts
152
211
  var import_frameworks = __toESM(require_frameworks(), 1);
153
212
  import {
@@ -1479,5 +1538,6 @@ export {
1479
1538
  validatePaths,
1480
1539
  readConfig,
1481
1540
  displayDetectedServices,
1482
- setupAndLink
1541
+ setupAndLink,
1542
+ printProjectNotFoundError
1483
1543
  };
@@ -5,23 +5,25 @@ const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
- getUpdateCommand
9
- } from "./chunk-FUBTAFL2.js";
8
+ getUpdateCommand,
9
+ isGlobal
10
+ } from "./chunk-5TTQBT67.js";
10
11
  import {
11
12
  getGlobalPathConfig,
12
- login
13
- } from "./chunk-F2UPASLT.js";
13
+ login,
14
+ writeToConfigFile
15
+ } from "./chunk-PXR6WCEU.js";
14
16
  import {
15
17
  apiCommand,
16
18
  listSubcommand2 as listSubcommand,
17
19
  loginCommand
18
- } from "./chunk-UVFXUXOZ.js";
20
+ } from "./chunk-HFVP2JUO.js";
19
21
  import {
20
22
  help
21
- } from "./chunk-MMF4BVAP.js";
23
+ } from "./chunk-TTOZFGDX.js";
22
24
  import {
23
25
  TelemetryClient
24
- } from "./chunk-4OEA5ILS.js";
26
+ } from "./chunk-4CIXZOP4.js";
25
27
  import {
26
28
  require_ms
27
29
  } from "./chunk-CO5D46AG.js";
@@ -30,7 +32,7 @@ import {
30
32
  parseArguments,
31
33
  printError,
32
34
  require_strip_ansi
33
- } from "./chunk-4GQQJY5Y.js";
35
+ } from "./chunk-H33IJ7OP.js";
34
36
  import {
35
37
  packageName
36
38
  } from "./chunk-UGXBNJMO.js";
@@ -45,6 +47,440 @@ import {
45
47
  __toESM
46
48
  } from "./chunk-TZ2YI2VH.js";
47
49
 
50
+ // ../../node_modules/.pnpm/ci-info@4.1.0/node_modules/ci-info/vendors.json
51
+ var require_vendors = __commonJS({
52
+ "../../node_modules/.pnpm/ci-info@4.1.0/node_modules/ci-info/vendors.json"(exports, module) {
53
+ module.exports = [
54
+ {
55
+ name: "Agola CI",
56
+ constant: "AGOLA",
57
+ env: "AGOLA_GIT_REF",
58
+ pr: "AGOLA_PULL_REQUEST_ID"
59
+ },
60
+ {
61
+ name: "Appcircle",
62
+ constant: "APPCIRCLE",
63
+ env: "AC_APPCIRCLE",
64
+ pr: {
65
+ env: "AC_GIT_PR",
66
+ ne: "false"
67
+ }
68
+ },
69
+ {
70
+ name: "AppVeyor",
71
+ constant: "APPVEYOR",
72
+ env: "APPVEYOR",
73
+ pr: "APPVEYOR_PULL_REQUEST_NUMBER"
74
+ },
75
+ {
76
+ name: "AWS CodeBuild",
77
+ constant: "CODEBUILD",
78
+ env: "CODEBUILD_BUILD_ARN",
79
+ pr: {
80
+ env: "CODEBUILD_WEBHOOK_EVENT",
81
+ any: [
82
+ "PULL_REQUEST_CREATED",
83
+ "PULL_REQUEST_UPDATED",
84
+ "PULL_REQUEST_REOPENED"
85
+ ]
86
+ }
87
+ },
88
+ {
89
+ name: "Azure Pipelines",
90
+ constant: "AZURE_PIPELINES",
91
+ env: "TF_BUILD",
92
+ pr: {
93
+ BUILD_REASON: "PullRequest"
94
+ }
95
+ },
96
+ {
97
+ name: "Bamboo",
98
+ constant: "BAMBOO",
99
+ env: "bamboo_planKey"
100
+ },
101
+ {
102
+ name: "Bitbucket Pipelines",
103
+ constant: "BITBUCKET",
104
+ env: "BITBUCKET_COMMIT",
105
+ pr: "BITBUCKET_PR_ID"
106
+ },
107
+ {
108
+ name: "Bitrise",
109
+ constant: "BITRISE",
110
+ env: "BITRISE_IO",
111
+ pr: "BITRISE_PULL_REQUEST"
112
+ },
113
+ {
114
+ name: "Buddy",
115
+ constant: "BUDDY",
116
+ env: "BUDDY_WORKSPACE_ID",
117
+ pr: "BUDDY_EXECUTION_PULL_REQUEST_ID"
118
+ },
119
+ {
120
+ name: "Buildkite",
121
+ constant: "BUILDKITE",
122
+ env: "BUILDKITE",
123
+ pr: {
124
+ env: "BUILDKITE_PULL_REQUEST",
125
+ ne: "false"
126
+ }
127
+ },
128
+ {
129
+ name: "CircleCI",
130
+ constant: "CIRCLE",
131
+ env: "CIRCLECI",
132
+ pr: "CIRCLE_PULL_REQUEST"
133
+ },
134
+ {
135
+ name: "Cirrus CI",
136
+ constant: "CIRRUS",
137
+ env: "CIRRUS_CI",
138
+ pr: "CIRRUS_PR"
139
+ },
140
+ {
141
+ name: "Codefresh",
142
+ constant: "CODEFRESH",
143
+ env: "CF_BUILD_ID",
144
+ pr: {
145
+ any: [
146
+ "CF_PULL_REQUEST_NUMBER",
147
+ "CF_PULL_REQUEST_ID"
148
+ ]
149
+ }
150
+ },
151
+ {
152
+ name: "Codemagic",
153
+ constant: "CODEMAGIC",
154
+ env: "CM_BUILD_ID",
155
+ pr: "CM_PULL_REQUEST"
156
+ },
157
+ {
158
+ name: "Codeship",
159
+ constant: "CODESHIP",
160
+ env: {
161
+ CI_NAME: "codeship"
162
+ }
163
+ },
164
+ {
165
+ name: "Drone",
166
+ constant: "DRONE",
167
+ env: "DRONE",
168
+ pr: {
169
+ DRONE_BUILD_EVENT: "pull_request"
170
+ }
171
+ },
172
+ {
173
+ name: "dsari",
174
+ constant: "DSARI",
175
+ env: "DSARI"
176
+ },
177
+ {
178
+ name: "Earthly",
179
+ constant: "EARTHLY",
180
+ env: "EARTHLY_CI"
181
+ },
182
+ {
183
+ name: "Expo Application Services",
184
+ constant: "EAS",
185
+ env: "EAS_BUILD"
186
+ },
187
+ {
188
+ name: "Gerrit",
189
+ constant: "GERRIT",
190
+ env: "GERRIT_PROJECT"
191
+ },
192
+ {
193
+ name: "Gitea Actions",
194
+ constant: "GITEA_ACTIONS",
195
+ env: "GITEA_ACTIONS"
196
+ },
197
+ {
198
+ name: "GitHub Actions",
199
+ constant: "GITHUB_ACTIONS",
200
+ env: "GITHUB_ACTIONS",
201
+ pr: {
202
+ GITHUB_EVENT_NAME: "pull_request"
203
+ }
204
+ },
205
+ {
206
+ name: "GitLab CI",
207
+ constant: "GITLAB",
208
+ env: "GITLAB_CI",
209
+ pr: "CI_MERGE_REQUEST_ID"
210
+ },
211
+ {
212
+ name: "GoCD",
213
+ constant: "GOCD",
214
+ env: "GO_PIPELINE_LABEL"
215
+ },
216
+ {
217
+ name: "Google Cloud Build",
218
+ constant: "GOOGLE_CLOUD_BUILD",
219
+ env: "BUILDER_OUTPUT"
220
+ },
221
+ {
222
+ name: "Harness CI",
223
+ constant: "HARNESS",
224
+ env: "HARNESS_BUILD_ID"
225
+ },
226
+ {
227
+ name: "Heroku",
228
+ constant: "HEROKU",
229
+ env: {
230
+ env: "NODE",
231
+ includes: "/app/.heroku/node/bin/node"
232
+ }
233
+ },
234
+ {
235
+ name: "Hudson",
236
+ constant: "HUDSON",
237
+ env: "HUDSON_URL"
238
+ },
239
+ {
240
+ name: "Jenkins",
241
+ constant: "JENKINS",
242
+ env: [
243
+ "JENKINS_URL",
244
+ "BUILD_ID"
245
+ ],
246
+ pr: {
247
+ any: [
248
+ "ghprbPullId",
249
+ "CHANGE_ID"
250
+ ]
251
+ }
252
+ },
253
+ {
254
+ name: "LayerCI",
255
+ constant: "LAYERCI",
256
+ env: "LAYERCI",
257
+ pr: "LAYERCI_PULL_REQUEST"
258
+ },
259
+ {
260
+ name: "Magnum CI",
261
+ constant: "MAGNUM",
262
+ env: "MAGNUM"
263
+ },
264
+ {
265
+ name: "Netlify CI",
266
+ constant: "NETLIFY",
267
+ env: "NETLIFY",
268
+ pr: {
269
+ env: "PULL_REQUEST",
270
+ ne: "false"
271
+ }
272
+ },
273
+ {
274
+ name: "Nevercode",
275
+ constant: "NEVERCODE",
276
+ env: "NEVERCODE",
277
+ pr: {
278
+ env: "NEVERCODE_PULL_REQUEST",
279
+ ne: "false"
280
+ }
281
+ },
282
+ {
283
+ name: "Prow",
284
+ constant: "PROW",
285
+ env: "PROW_JOB_ID"
286
+ },
287
+ {
288
+ name: "ReleaseHub",
289
+ constant: "RELEASEHUB",
290
+ env: "RELEASE_BUILD_ID"
291
+ },
292
+ {
293
+ name: "Render",
294
+ constant: "RENDER",
295
+ env: "RENDER",
296
+ pr: {
297
+ IS_PULL_REQUEST: "true"
298
+ }
299
+ },
300
+ {
301
+ name: "Sail CI",
302
+ constant: "SAIL",
303
+ env: "SAILCI",
304
+ pr: "SAIL_PULL_REQUEST_NUMBER"
305
+ },
306
+ {
307
+ name: "Screwdriver",
308
+ constant: "SCREWDRIVER",
309
+ env: "SCREWDRIVER",
310
+ pr: {
311
+ env: "SD_PULL_REQUEST",
312
+ ne: "false"
313
+ }
314
+ },
315
+ {
316
+ name: "Semaphore",
317
+ constant: "SEMAPHORE",
318
+ env: "SEMAPHORE",
319
+ pr: "PULL_REQUEST_NUMBER"
320
+ },
321
+ {
322
+ name: "Sourcehut",
323
+ constant: "SOURCEHUT",
324
+ env: {
325
+ CI_NAME: "sourcehut"
326
+ }
327
+ },
328
+ {
329
+ name: "Strider CD",
330
+ constant: "STRIDER",
331
+ env: "STRIDER"
332
+ },
333
+ {
334
+ name: "TaskCluster",
335
+ constant: "TASKCLUSTER",
336
+ env: [
337
+ "TASK_ID",
338
+ "RUN_ID"
339
+ ]
340
+ },
341
+ {
342
+ name: "TeamCity",
343
+ constant: "TEAMCITY",
344
+ env: "TEAMCITY_VERSION"
345
+ },
346
+ {
347
+ name: "Travis CI",
348
+ constant: "TRAVIS",
349
+ env: "TRAVIS",
350
+ pr: {
351
+ env: "TRAVIS_PULL_REQUEST",
352
+ ne: "false"
353
+ }
354
+ },
355
+ {
356
+ name: "Vela",
357
+ constant: "VELA",
358
+ env: "VELA",
359
+ pr: {
360
+ VELA_PULL_REQUEST: "1"
361
+ }
362
+ },
363
+ {
364
+ name: "Vercel",
365
+ constant: "VERCEL",
366
+ env: {
367
+ any: [
368
+ "NOW_BUILDER",
369
+ "VERCEL"
370
+ ]
371
+ },
372
+ pr: "VERCEL_GIT_PULL_REQUEST_ID"
373
+ },
374
+ {
375
+ name: "Visual Studio App Center",
376
+ constant: "APPCENTER",
377
+ env: "APPCENTER_BUILD_ID"
378
+ },
379
+ {
380
+ name: "Woodpecker",
381
+ constant: "WOODPECKER",
382
+ env: {
383
+ CI: "woodpecker"
384
+ },
385
+ pr: {
386
+ CI_BUILD_EVENT: "pull_request"
387
+ }
388
+ },
389
+ {
390
+ name: "Xcode Cloud",
391
+ constant: "XCODE_CLOUD",
392
+ env: "CI_XCODE_PROJECT",
393
+ pr: "CI_PULL_REQUEST_NUMBER"
394
+ },
395
+ {
396
+ name: "Xcode Server",
397
+ constant: "XCODE_SERVER",
398
+ env: "XCS"
399
+ }
400
+ ];
401
+ }
402
+ });
403
+
404
+ // ../../node_modules/.pnpm/ci-info@4.1.0/node_modules/ci-info/index.js
405
+ var require_ci_info = __commonJS({
406
+ "../../node_modules/.pnpm/ci-info@4.1.0/node_modules/ci-info/index.js"(exports) {
407
+ "use strict";
408
+ var vendors = require_vendors();
409
+ var env = process.env;
410
+ Object.defineProperty(exports, "_vendors", {
411
+ value: vendors.map(function(v) {
412
+ return v.constant;
413
+ })
414
+ });
415
+ exports.name = null;
416
+ exports.isPR = null;
417
+ exports.id = null;
418
+ vendors.forEach(function(vendor) {
419
+ const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env];
420
+ const isCI = envs.every(function(obj) {
421
+ return checkEnv(obj);
422
+ });
423
+ exports[vendor.constant] = isCI;
424
+ if (!isCI) {
425
+ return;
426
+ }
427
+ exports.name = vendor.name;
428
+ exports.isPR = checkPR(vendor);
429
+ exports.id = vendor.constant;
430
+ });
431
+ exports.isCI = !!(env.CI !== "false" && // Bypass all checks if CI env is explicitly set to 'false'
432
+ (env.BUILD_ID || // Jenkins, Cloudbees
433
+ env.BUILD_NUMBER || // Jenkins, TeamCity
434
+ env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari
435
+ env.CI_APP_ID || // Appflow
436
+ env.CI_BUILD_ID || // Appflow
437
+ env.CI_BUILD_NUMBER || // Appflow
438
+ env.CI_NAME || // Codeship and others
439
+ env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
440
+ env.RUN_ID || // TaskCluster, dsari
441
+ exports.name || false));
442
+ function checkEnv(obj) {
443
+ if (typeof obj === "string")
444
+ return !!env[obj];
445
+ if ("env" in obj) {
446
+ return env[obj.env] && env[obj.env].includes(obj.includes);
447
+ }
448
+ if ("any" in obj) {
449
+ return obj.any.some(function(k) {
450
+ return !!env[k];
451
+ });
452
+ }
453
+ return Object.keys(obj).every(function(k) {
454
+ return env[k] === obj[k];
455
+ });
456
+ }
457
+ function checkPR(vendor) {
458
+ switch (typeof vendor.pr) {
459
+ case "string":
460
+ return !!env[vendor.pr];
461
+ case "object":
462
+ if ("env" in vendor.pr) {
463
+ if ("any" in vendor.pr) {
464
+ return vendor.pr.any.some(function(key) {
465
+ return env[vendor.pr.env] === key;
466
+ });
467
+ } else {
468
+ return vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne;
469
+ }
470
+ } else if ("any" in vendor.pr) {
471
+ return vendor.pr.any.some(function(key) {
472
+ return !!env[key];
473
+ });
474
+ } else {
475
+ return checkEnv(vendor.pr);
476
+ }
477
+ default:
478
+ return null;
479
+ }
480
+ }
481
+ }
482
+ });
483
+
48
484
  // ../../node_modules/.pnpm/jaro-winkler@0.2.8/node_modules/jaro-winkler/index.js
49
485
  var require_jaro_winkler = __commonJS({
50
486
  "../../node_modules/.pnpm/jaro-winkler@0.2.8/node_modules/jaro-winkler/index.js"(exports, module) {
@@ -2171,6 +2607,43 @@ async function executeUpgrade() {
2171
2607
  });
2172
2608
  }
2173
2609
 
2610
+ // src/util/updates.ts
2611
+ var import_ci_info = __toESM(require_ci_info(), 1);
2612
+ function isAutoUpdateEnabled(config) {
2613
+ return config.updates?.auto === true;
2614
+ }
2615
+ function hasAutoUpdatePreference(config) {
2616
+ return typeof config.updates?.auto === "boolean";
2617
+ }
2618
+ function setAutoUpdate(client, enabled) {
2619
+ client.config = {
2620
+ ...client.config,
2621
+ updates: {
2622
+ ...client.config.updates,
2623
+ auto: enabled
2624
+ }
2625
+ };
2626
+ writeToConfigFile(client.config);
2627
+ }
2628
+ async function canAutoUpdate(client, exitCode, command) {
2629
+ if (!isAutoUpdateEnabled(client.config)) {
2630
+ return false;
2631
+ }
2632
+ if (exitCode !== 0) {
2633
+ return false;
2634
+ }
2635
+ if (import_ci_info.default.isCI) {
2636
+ return false;
2637
+ }
2638
+ if (client.nonInteractive || client.isAgent) {
2639
+ return false;
2640
+ }
2641
+ if (command === "upgrade") {
2642
+ return false;
2643
+ }
2644
+ return isGlobal();
2645
+ }
2646
+
2174
2647
  // src/commands/login/index.ts
2175
2648
  var import_chalk5 = __toESM(require_source(), 1);
2176
2649
 
@@ -2314,6 +2787,11 @@ export {
2314
2787
  api,
2315
2788
  tryOpenApiFallback,
2316
2789
  executeUpgrade,
2790
+ require_ci_info,
2791
+ isAutoUpdateEnabled,
2792
+ hasAutoUpdatePreference,
2793
+ setAutoUpdate,
2794
+ canAutoUpdate,
2317
2795
  login2 as login,
2318
2796
  box
2319
2797
  };
@@ -6,10 +6,10 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  table
9
- } from "./chunk-DKD6GTQT.js";
9
+ } from "./chunk-OM5Z2KO5.js";
10
10
  import {
11
11
  require_strip_ansi
12
- } from "./chunk-4GQQJY5Y.js";
12
+ } from "./chunk-H33IJ7OP.js";
13
13
  import {
14
14
  require_source
15
15
  } from "./chunk-S7KYDPEM.js";
@@ -7,10 +7,10 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  AGENT_REASON,
9
9
  AGENT_STATUS
10
- } from "./chunk-E3NE4SKN.js";
10
+ } from "./chunk-L6Q2EQPI.js";
11
11
  import {
12
12
  getLinkedProject
13
- } from "./chunk-X775BOSL.js";
13
+ } from "./chunk-RNIZUKES.js";
14
14
  import {
15
15
  buildCommandWithYes,
16
16
  outputAgentError
@@ -20,7 +20,7 @@ import {
20
20
  getGlobalFlagsOnlyFromArgs,
21
21
  parseArguments,
22
22
  printError
23
- } from "./chunk-4GQQJY5Y.js";
23
+ } from "./chunk-H33IJ7OP.js";
24
24
  import {
25
25
  getCommandName,
26
26
  getCommandNamePlain
@@ -6,11 +6,12 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  rulesAggregateCommand
9
- } from "./chunk-XVAEOG4L.js";
9
+ } from "./chunk-3TDGMELF.js";
10
10
  import {
11
11
  formatOption,
12
- limitOption
13
- } from "./chunk-4GQQJY5Y.js";
12
+ limitOption,
13
+ projectOption
14
+ } from "./chunk-H33IJ7OP.js";
14
15
  import {
15
16
  packageName
16
17
  } from "./chunk-UGXBNJMO.js";
@@ -39,11 +40,8 @@ var inspectSubcommand = {
39
40
  options: [
40
41
  formatOption,
41
42
  {
42
- name: "project",
43
+ ...projectOption,
43
44
  shorthand: "p",
44
- type: String,
45
- argument: "NAME_OR_ID",
46
- deprecated: false,
47
45
  description: "Filter by project (overrides auto-detected linked project)."
48
46
  },
49
47
  {
@@ -81,11 +79,8 @@ var alertsCommand = {
81
79
  description: "Filter by alert type. Repeatable and comma-separated (for example --type usage_anomaly,error_anomaly)."
82
80
  },
83
81
  {
84
- name: "project",
82
+ ...projectOption,
85
83
  shorthand: "p",
86
- type: String,
87
- argument: "NAME_OR_ID",
88
- deprecated: false,
89
84
  description: "Filter by project (overrides auto-detected linked project)."
90
85
  },
91
86
  {