@depup/vercel 57.0.0-depup.0 → 58.4.4-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 (114) hide show
  1. package/README.md +5 -5
  2. package/changes.json +4 -4
  3. package/dist/chunks/{add-YRZTDNXX.js → add-245XOFJO.js} +14 -9
  4. package/dist/chunks/{add-7M577U56.js → add-P7WBQMBW.js} +10 -8
  5. package/dist/chunks/add-XH24V5VU.js +187 -0
  6. package/dist/chunks/build-M7NJYJPE.js +243 -0
  7. package/dist/chunks/{chunk-HD7B425F.js → chunk-2FMPLU44.js} +4 -4
  8. package/dist/chunks/{chunk-LMHT3QR3.js → chunk-2LBVX2H3.js} +3 -3
  9. package/dist/chunks/{chunk-YOZCJHLZ.js → chunk-2MAPZXVV.js} +10 -8
  10. package/dist/chunks/{chunk-DWMH5M4Q.js → chunk-2SFMOCWR.js} +1 -1
  11. package/dist/chunks/{chunk-F5PQWDOC.js → chunk-2WILSD7J.js} +1 -1
  12. package/dist/chunks/{chunk-3PKFXNJZ.js → chunk-3KNPVXJ3.js} +7 -5
  13. package/dist/chunks/{chunk-A2TYQBX2.js → chunk-3QAUXPIR.js} +927 -518
  14. package/dist/chunks/chunk-3ZE5CFVM.js +346 -0
  15. package/dist/chunks/{chunk-555WJSO5.js → chunk-4BUPRO5B.js} +7 -5
  16. package/dist/chunks/{chunk-TBR2Q37Y.js → chunk-4CCY5OPH.js} +1232 -1216
  17. package/dist/chunks/{chunk-FHEMFAHB.js → chunk-4LDQIDRM.js} +15 -9
  18. package/dist/chunks/{chunk-R5FOIIHT.js → chunk-4N7XLXM2.js} +2 -2
  19. package/dist/chunks/{chunk-KCF6S3XF.js → chunk-4UYKSYKQ.js} +10 -6
  20. package/dist/chunks/{chunk-GP5VCTEU.js → chunk-62MH5KPX.js} +207 -4
  21. package/dist/chunks/{chunk-OGG6UBXK.js → chunk-7QVJTI5H.js} +1 -1
  22. package/dist/chunks/{chunk-FYQPTH5C.js → chunk-A5KP5HAI.js} +7 -5
  23. package/dist/chunks/{chunk-2EDWKVNP.js → chunk-AQDWMAPM.js} +32 -16
  24. package/dist/chunks/{chunk-3VS4DTAU.js → chunk-AW5YINX6.js} +106 -12
  25. package/dist/chunks/{chunk-GIL3VAUR.js → chunk-B3JTF4CF.js} +5 -3
  26. package/dist/chunks/{chunk-4QVAYRYH.js → chunk-BEQV3X2L.js} +16 -1
  27. package/dist/chunks/chunk-CPFNFVCL.js +85 -0
  28. package/dist/chunks/{chunk-4G6QZSBL.js → chunk-CSJBZKC5.js} +6 -4
  29. package/dist/chunks/{chunk-3PGXYIKC.js → chunk-EBLH23AQ.js} +2 -2
  30. package/dist/chunks/{chunk-YA3WQFLY.js → chunk-GFG6QDIE.js} +1 -1
  31. package/dist/chunks/{chunk-IOAZNR6Z.js → chunk-HSYF5SI3.js} +1 -1
  32. package/dist/chunks/{chunk-F7X55TOY.js → chunk-IEDUCUDV.js} +6 -5
  33. package/dist/chunks/chunk-J6LK45HT.js +163 -0
  34. package/dist/chunks/{chunk-ZVLPUREX.js → chunk-JLWQWYKO.js} +2 -2
  35. package/dist/chunks/{chunk-SZXT3PDQ.js → chunk-KBEX5MYS.js} +1 -136
  36. package/dist/chunks/{chunk-NZRWTCRM.js → chunk-KT4XXKJK.js} +1 -1
  37. package/dist/chunks/{chunk-VZSZBD4V.js → chunk-M22O6CYY.js} +1 -1
  38. package/dist/chunks/{chunk-3242RXCN.js → chunk-M5NOLAJ4.js} +1 -1
  39. package/dist/chunks/{chunk-2MJROFVC.js → chunk-MAHXF73X.js} +8 -5
  40. package/dist/chunks/{chunk-RYO6FJFB.js → chunk-NJ6QXKQD.js} +2 -2
  41. package/dist/chunks/{chunk-LHFNIZ2P.js → chunk-O5GNPPTU.js} +4 -2
  42. package/dist/chunks/chunk-RBIFXFZX.js +52 -0
  43. package/dist/chunks/{chunk-OF2GNB42.js → chunk-RQ7H43CJ.js} +1 -1
  44. package/dist/chunks/{chunk-4PGF367U.js → chunk-SJYAUEZR.js} +232 -50
  45. package/dist/chunks/{chunk-KSSNLCL4.js → chunk-SOFC4MLS.js} +2 -2
  46. package/dist/chunks/{chunk-UDWRZXIT.js → chunk-TJJ562C5.js} +18 -14
  47. package/dist/chunks/{chunk-NRNMT43R.js → chunk-UE3JUVUZ.js} +7 -13
  48. package/dist/chunks/chunk-V5P25P7F.js +22 -0
  49. package/dist/chunks/{chunk-MIFDRYTN.js → chunk-XE5VSQ25.js} +2 -2
  50. package/dist/chunks/{chunk-QZD5DKUR.js → chunk-XIG4GH62.js} +2 -2
  51. package/dist/chunks/chunk-XLKFJPMT.js +150 -0
  52. package/dist/chunks/{chunk-MAHINYBW.js → chunk-Y5GTPWXB.js} +2 -2
  53. package/dist/chunks/{chunk-NH43BFJ3.js → chunk-YCPUAG77.js} +2 -2
  54. package/dist/chunks/{chunk-T4NODP6Y.js → chunk-YDUINEII.js} +3 -3
  55. package/dist/chunks/{chunk-RAFH25WW.js → chunk-ZGBBPJ6B.js} +10 -6
  56. package/dist/chunks/{chunk-DMSLNAVH.js → chunk-ZX2FSPWV.js} +2 -2
  57. package/dist/chunks/clear-HWIKQ4NC.js +132 -0
  58. package/dist/chunks/{compile-vercel-config-3OHO3TJA.js → compile-vercel-config-U5NRIMZ2.js} +5 -4
  59. package/dist/chunks/config-validator.mjs +1 -1
  60. package/dist/chunks/{delete-3DZOCWCC.js → delete-FZCOUFGN.js} +7 -6
  61. package/dist/chunks/{delete-VOSJLNEA.js → delete-NVMGVD5Z.js} +7 -6
  62. package/dist/chunks/{disable-LQDEVRQF.js → disable-ERM2BWEQ.js} +7 -6
  63. package/dist/chunks/{discard-RGV4JKXQ.js → discard-KM5OLEN4.js} +7 -6
  64. package/dist/chunks/{edit-SFIEOQ24.js → edit-HT3UTATZ.js} +8 -7
  65. package/dist/chunks/{edit-UPZPI54L.js → edit-TOSB2EMI.js} +7 -6
  66. package/dist/chunks/{enable-6UVH35WC.js → enable-BQL6AOQV.js} +7 -6
  67. package/dist/chunks/{export-6CEG3CK7.js → export-UOWQHOG3.js} +7 -6
  68. package/dist/chunks/{image-CQRCD2OE.js → image-F5SC6Q7Y.js} +5 -5
  69. package/dist/chunks/{inspect-ZFRY3X3H.js → inspect-35FU5R62.js} +16 -13
  70. package/dist/chunks/{inspect-UM3LDRPV.js → inspect-5J5GSTOB.js} +14 -12
  71. package/dist/chunks/{inspect-K5ZMQG7X.js → inspect-GKJ6T5H4.js} +14 -12
  72. package/dist/chunks/{inspect-4ZAH3RFT.js → inspect-LGKOLH2O.js} +8 -7
  73. package/dist/chunks/{inspect-EXQBIAFF.js → inspect-PZJM2CWT.js} +13 -11
  74. package/dist/chunks/{list-KCUHD4OA.js → list-2IIE7CAP.js} +8 -7
  75. package/dist/chunks/{list-4DRVM7Q4.js → list-ITFJYYQ2.js} +13 -11
  76. package/dist/chunks/{list-FJCBOCCA.js → list-KZETH3ZE.js} +8 -6
  77. package/dist/chunks/{login-DFGYNU3K.js → login-BQPJCJEZ.js} +22 -51
  78. package/dist/chunks/{ls-RHEQ6YQB.js → ls-7GHDK4MD.js} +13 -11
  79. package/dist/chunks/{ls-CG6A7UXF.js → ls-DL2LA35C.js} +15 -13
  80. package/dist/chunks/{ls-34NCZKBE.js → ls-UXUEP54B.js} +15 -13
  81. package/dist/chunks/ls-YSFWSM6J.js +178 -0
  82. package/dist/chunks/{ls-4QHHVXXD.js → ls-ZZFLH7PK.js} +17 -14
  83. package/dist/chunks/{open-E3XADEMX.js → open-ADNJQN5E.js} +7 -6
  84. package/dist/chunks/permissions-72SZCBIY.js +95 -0
  85. package/dist/chunks/{publish-Z3AQRUCS.js → publish-OOAGSEBM.js} +7 -6
  86. package/dist/chunks/push-B6TZDXNF.js +183 -0
  87. package/dist/chunks/{query-3EV66DO3.js → query-LZWS5TDH.js} +12 -10
  88. package/dist/chunks/{reorder-VA5E5ZJT.js → reorder-MRHFKPMK.js} +7 -6
  89. package/dist/chunks/{reply-SNSCNKAW.js → reply-BKTJXO3B.js} +7 -6
  90. package/dist/chunks/{resolve-6ZX4RTXX.js → resolve-BKVGSGPN.js} +7 -6
  91. package/dist/chunks/{restore-NEHI5B5P.js → restore-USR7SKWV.js} +7 -6
  92. package/dist/chunks/{rm-FR6KE744.js → rm-2UO6BT3A.js} +10 -8
  93. package/dist/chunks/rm-37MKKV3I.js +186 -0
  94. package/dist/chunks/{rm-E5ZVLAKO.js → rm-KUWPNZIS.js} +15 -10
  95. package/dist/chunks/{rm-22B22E47.js → rm-VY3OHKFH.js} +12 -8
  96. package/dist/chunks/{rule-inspect-DMP2CKJQ.js → rule-inspect-JVDOOTWK.js} +13 -11
  97. package/dist/chunks/{rules-EYGXEI2Z.js → rules-NTBFZBIF.js} +8 -8
  98. package/dist/chunks/{schema-2IIWOBSQ.js → schema-6EZ72OVH.js} +11 -9
  99. package/dist/chunks/{tags-ZDVYRHAY.js → tags-HNPC63QA.js} +4 -4
  100. package/dist/chunks/{types-QKLIFDDP.js → types-QTOA2BTQ.js} +7 -5
  101. package/dist/chunks/{update-QH4DQMZV.js → update-LUYWNZP3.js} +10 -8
  102. package/dist/commands/build/index.js +16 -20
  103. package/dist/commands/deploy/index.js +39 -28
  104. package/dist/commands/dev/index.js +112 -20
  105. package/dist/commands/env/index.js +308 -36
  106. package/dist/commands/link/index.js +26 -23
  107. package/dist/commands/list/index.js +16 -9
  108. package/dist/commands-bulk.js +5414 -2654
  109. package/dist/help.js +1 -1
  110. package/dist/index.js +50 -44
  111. package/dist/version.mjs +1 -1
  112. package/package.json +47 -105
  113. package/dist/chunks/chunk-6OMC3HOW.js +0 -73
  114. package/dist/chunks/chunk-V4RMJKQP.js +0 -36
@@ -5,11 +5,10 @@ const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
- arg_common_default,
9
8
  getCommandName,
10
9
  parseRetryAfterHeaderAsMillis,
11
10
  require_bytes
12
- } from "./chunk-KSSNLCL4.js";
11
+ } from "./chunk-SOFC4MLS.js";
13
12
  import {
14
13
  output_manager_default
15
14
  } from "./chunk-OX7KI3LF.js";
@@ -21,119 +20,6 @@ import {
21
20
  __toESM
22
21
  } from "./chunk-TZ2YI2VH.js";
23
22
 
24
- // ../../node_modules/.pnpm/arg@5.0.0/node_modules/arg/index.js
25
- var require_arg = __commonJS({
26
- "../../node_modules/.pnpm/arg@5.0.0/node_modules/arg/index.js"(exports, module) {
27
- var flagSymbol = Symbol("arg flag");
28
- var ArgError = class _ArgError extends Error {
29
- constructor(msg, code) {
30
- super(msg);
31
- this.name = "ArgError";
32
- this.code = code;
33
- Object.setPrototypeOf(this, _ArgError.prototype);
34
- }
35
- };
36
- function arg2(opts, { argv = process.argv.slice(2), permissive = false, stopAtPositional = false } = {}) {
37
- if (!opts) {
38
- throw new ArgError("argument specification object is required", "ARG_CONFIG_NO_SPEC");
39
- }
40
- const result = { _: [] };
41
- const aliases = {};
42
- const handlers = {};
43
- for (const key of Object.keys(opts)) {
44
- if (!key) {
45
- throw new ArgError("argument key cannot be an empty string", "ARG_CONFIG_EMPTY_KEY");
46
- }
47
- if (key[0] !== "-") {
48
- throw new ArgError(`argument key must start with '-' but found: '${key}'`, "ARG_CONFIG_NONOPT_KEY");
49
- }
50
- if (key.length === 1) {
51
- throw new ArgError(`argument key must have a name; singular '-' keys are not allowed: ${key}`, "ARG_CONFIG_NONAME_KEY");
52
- }
53
- if (typeof opts[key] === "string") {
54
- aliases[key] = opts[key];
55
- continue;
56
- }
57
- let type = opts[key];
58
- let isFlag = false;
59
- if (Array.isArray(type) && type.length === 1 && typeof type[0] === "function") {
60
- const [fn] = type;
61
- type = (value, name, prev = []) => {
62
- prev.push(fn(value, name, prev[prev.length - 1]));
63
- return prev;
64
- };
65
- isFlag = fn === Boolean || fn[flagSymbol] === true;
66
- } else if (typeof type === "function") {
67
- isFlag = type === Boolean || type[flagSymbol] === true;
68
- } else {
69
- throw new ArgError(`type missing or not a function or valid array type: ${key}`, "ARG_CONFIG_VAD_TYPE");
70
- }
71
- if (key[1] !== "-" && key.length > 2) {
72
- throw new ArgError(`short argument keys (with a single hyphen) must have only one character: ${key}`, "ARG_CONFIG_SHORTOPT_TOOLONG");
73
- }
74
- handlers[key] = [type, isFlag];
75
- }
76
- for (let i = 0, len = argv.length; i < len; i++) {
77
- const wholeArg = argv[i];
78
- if (stopAtPositional && result._.length > 0) {
79
- result._ = result._.concat(argv.slice(i));
80
- break;
81
- }
82
- if (wholeArg === "--") {
83
- result._ = result._.concat(argv.slice(i + 1));
84
- break;
85
- }
86
- if (wholeArg.length > 1 && wholeArg[0] === "-") {
87
- const separatedArguments = wholeArg[1] === "-" || wholeArg.length === 2 ? [wholeArg] : wholeArg.slice(1).split("").map((a) => `-${a}`);
88
- for (let j = 0; j < separatedArguments.length; j++) {
89
- const arg3 = separatedArguments[j];
90
- const [originalArgName, argStr] = arg3[1] === "-" ? arg3.split(/=(.*)/, 2) : [arg3, void 0];
91
- let argName = originalArgName;
92
- while (argName in aliases) {
93
- argName = aliases[argName];
94
- }
95
- if (!(argName in handlers)) {
96
- if (permissive) {
97
- result._.push(arg3);
98
- continue;
99
- } else {
100
- throw new ArgError(`unknown or unexpected option: ${originalArgName}`, "ARG_UNKNOWN_OPTION");
101
- }
102
- }
103
- const [type, isFlag] = handlers[argName];
104
- if (!isFlag && j + 1 < separatedArguments.length) {
105
- throw new ArgError(`option requires argument (but was followed by another short argument): ${originalArgName}`, "ARG_MISSING_REQUIRED_SHORTARG");
106
- }
107
- if (isFlag) {
108
- result[argName] = type(true, argName, result[argName]);
109
- } else if (argStr === void 0) {
110
- if (argv.length < i + 2 || argv[i + 1].length > 1 && argv[i + 1][0] === "-" && !(argv[i + 1].match(/^-?\d*(\.(?=\d))?\d*$/) && (type === Number || // eslint-disable-next-line no-undef
111
- typeof BigInt !== "undefined" && type === BigInt))) {
112
- const extended = originalArgName === argName ? "" : ` (alias for ${argName})`;
113
- throw new ArgError(`option requires argument: ${originalArgName}${extended}`, "ARG_MISSING_REQUIRED_LONGARG");
114
- }
115
- result[argName] = type(argv[i + 1], argName, result[argName]);
116
- ++i;
117
- } else {
118
- result[argName] = type(argStr, argName, result[argName]);
119
- }
120
- }
121
- } else {
122
- result._.push(wholeArg);
123
- }
124
- }
125
- return result;
126
- }
127
- arg2.flag = (fn) => {
128
- fn[flagSymbol] = true;
129
- return fn;
130
- };
131
- arg2.COUNT = arg2.flag((v, name, existingCount) => (existingCount || 0) + 1);
132
- arg2.ArgError = ArgError;
133
- module.exports = arg2;
134
- }
135
- });
136
-
137
23
  // ../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
138
24
  var require_ansi_regex = __commonJS({
139
25
  "../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports, module) {
@@ -237,25 +123,6 @@ var require_string_width = __commonJS({
237
123
  }
238
124
  });
239
125
 
240
- // src/util/get-args.ts
241
- var import_arg = __toESM(require_arg(), 1);
242
- function getArgs(argv, argsOptions, argOptions = {}) {
243
- return (0, import_arg.default)(Object.assign({}, arg_common_default(), argsOptions), {
244
- ...argOptions,
245
- argv
246
- });
247
- }
248
- function parseArguments(args, flagsSpecification, parserOptions = {}) {
249
- const { _: positional, ...rest } = (0, import_arg.default)(
250
- Object.assign({}, arg_common_default(), flagsSpecification),
251
- {
252
- ...parserOptions,
253
- argv: args
254
- }
255
- );
256
- return { args: positional, flags: rest };
257
- }
258
-
259
126
  // src/util/output/error.ts
260
127
  var import_chalk = __toESM(require_source(), 1);
261
128
 
@@ -333,8 +200,6 @@ function printError(error2) {
333
200
  }
334
201
 
335
202
  export {
336
- getArgs,
337
- parseArguments,
338
203
  require_strip_ansi,
339
204
  require_string_width,
340
205
  responseError,
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  require_string_width
9
- } from "./chunk-SZXT3PDQ.js";
9
+ } from "./chunk-KBEX5MYS.js";
10
10
  import {
11
11
  __commonJS,
12
12
  __require,
@@ -8,7 +8,7 @@ import {
8
8
  packageName,
9
9
  projectOption,
10
10
  yesOption
11
- } from "./chunk-KSSNLCL4.js";
11
+ } from "./chunk-SOFC4MLS.js";
12
12
 
13
13
  // src/commands/routes/command.ts
14
14
  var listSubcommand = {
@@ -8,7 +8,7 @@ import {
8
8
  VERCEL_DIR,
9
9
  VERCEL_DIR_PROJECT,
10
10
  require_lib
11
- } from "./chunk-TBR2Q37Y.js";
11
+ } from "./chunk-4CCY5OPH.js";
12
12
  import {
13
13
  require_dist
14
14
  } from "./chunk-OX7KI3LF.js";
@@ -6,13 +6,14 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  rulesAggregateCommand
9
- } from "./chunk-KCF6S3XF.js";
9
+ } from "./chunk-4UYKSYKQ.js";
10
10
  import {
11
11
  formatOption,
12
+ jsonOption,
12
13
  limitOption,
13
14
  packageName,
14
15
  projectOption
15
- } from "./chunk-KSSNLCL4.js";
16
+ } from "./chunk-SOFC4MLS.js";
16
17
 
17
18
  // src/commands/alerts/command.ts
18
19
  var listSubcommand = {
@@ -37,6 +38,7 @@ var inspectSubcommand = {
37
38
  ],
38
39
  options: [
39
40
  formatOption,
41
+ jsonOption,
40
42
  {
41
43
  ...projectOption,
42
44
  shorthand: "p",
@@ -57,7 +59,7 @@ var inspectSubcommand = {
57
59
  },
58
60
  {
59
61
  name: "Inspect as JSON",
60
- value: `${packageName} alerts inspect grp_abc123 --format json`
62
+ value: `${packageName} alerts inspect grp_abc123 --json`
61
63
  }
62
64
  ]
63
65
  };
@@ -112,7 +114,8 @@ var alertsCommand = {
112
114
  description: "End of time range (ISO-8601). Defaults to now."
113
115
  },
114
116
  limitOption,
115
- formatOption
117
+ formatOption,
118
+ jsonOption
116
119
  ],
117
120
  examples: [
118
121
  {
@@ -133,7 +136,7 @@ var alertsCommand = {
133
136
  },
134
137
  {
135
138
  name: "Output JSON",
136
- value: `${packageName} alerts --format json`
139
+ value: `${packageName} alerts --json`
137
140
  },
138
141
  {
139
142
  name: "Custom time range",
@@ -6,13 +6,13 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  require_lib
9
- } from "./chunk-TBR2Q37Y.js";
9
+ } from "./chunk-4CCY5OPH.js";
10
10
  import {
11
11
  isNativeBinaryInstall
12
12
  } from "./chunk-ECCWJHC6.js";
13
13
  import {
14
14
  packageName
15
- } from "./chunk-KSSNLCL4.js";
15
+ } from "./chunk-SOFC4MLS.js";
16
16
  import {
17
17
  __toESM
18
18
  } from "./chunk-TZ2YI2VH.js";
@@ -8,11 +8,12 @@ import {
8
8
  allOption,
9
9
  confirmOption,
10
10
  formatOption,
11
+ jsonOption,
11
12
  limitOption,
12
13
  nextOption,
13
14
  packageName,
14
15
  yesOption
15
- } from "./chunk-KSSNLCL4.js";
16
+ } from "./chunk-SOFC4MLS.js";
16
17
 
17
18
  // src/commands/list/command.ts
18
19
  var listCommand = {
@@ -65,7 +66,8 @@ var listCommand = {
65
66
  { name: "prod", shorthand: null, type: Boolean, deprecated: false },
66
67
  yesOption,
67
68
  confirmOption,
68
- formatOption
69
+ formatOption,
70
+ jsonOption
69
71
  ],
70
72
  examples: [
71
73
  {
@@ -0,0 +1,52 @@
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
+
8
+ // src/commands/vcr/utils/image-ref.ts
9
+ var REPOSITORY_PATTERN = /^[a-z0-9]+(?:(?:\.|_|__|-+)[a-z0-9]+)*$/;
10
+ var TAG_PATTERN = /^[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}$/;
11
+ var DEFAULT_TAG = "latest";
12
+ function parseNameArg(nameArg, defaultRepo) {
13
+ if (!nameArg) {
14
+ return { repository: defaultRepo, tag: void 0 };
15
+ }
16
+ if (nameArg.includes("/")) {
17
+ return {
18
+ error: `Invalid image name "${nameArg}". Provide only a repository name (optionally with :tag); the registry, team, and project are added automatically.`
19
+ };
20
+ }
21
+ const colon = nameArg.lastIndexOf(":");
22
+ if (colon === -1) {
23
+ return { repository: nameArg, tag: void 0 };
24
+ }
25
+ const repository = nameArg.slice(0, colon);
26
+ const tag = nameArg.slice(colon + 1);
27
+ if (!repository) {
28
+ return {
29
+ error: `Invalid image name "${nameArg}". Missing repository name before ":".`
30
+ };
31
+ }
32
+ return { repository, tag };
33
+ }
34
+ function validateImageParts(parts) {
35
+ if (!REPOSITORY_PATTERN.test(parts.repository)) {
36
+ return `Invalid repository name "${parts.repository}". Use lowercase letters, digits, and separators (\`.\` \`_\` \`-\`), for example "my-app". Pass a valid name explicitly, e.g. \`... my-app\`.`;
37
+ }
38
+ if (parts.tag !== void 0 && !TAG_PATTERN.test(parts.tag)) {
39
+ return `Invalid tag "${parts.tag}". Tags may contain letters, digits, "_", ".", "-" and be up to 128 characters.`;
40
+ }
41
+ return void 0;
42
+ }
43
+ function buildRepositoryReference(parts) {
44
+ return `${parts.registry}/${parts.teamSlug}/${parts.projectName}/${parts.repository}`;
45
+ }
46
+
47
+ export {
48
+ DEFAULT_TAG,
49
+ parseNameArg,
50
+ validateImageParts,
51
+ buildRepositoryReference
52
+ };
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  require_strip_ansi
9
- } from "./chunk-SZXT3PDQ.js";
9
+ } from "./chunk-KBEX5MYS.js";
10
10
  import {
11
11
  __toESM
12
12
  } from "./chunk-TZ2YI2VH.js";