vercel 54.18.6 → 54.19.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 (72) hide show
  1. package/dist/chunks/{add-DFHK2LCD.js → add-P6CBTAGK.js} +4 -4
  2. package/dist/chunks/add-WB6SXGXX.js +134 -0
  3. package/dist/chunks/{chunk-LQALVXRD.js → chunk-3S2QGKYZ.js} +1 -1
  4. package/dist/chunks/chunk-4QVAYRYH.js +71 -0
  5. package/dist/chunks/{chunk-22CQWS5E.js → chunk-5MVXR7B7.js} +1 -1
  6. package/dist/chunks/{chunk-VKGCONIM.js → chunk-6ISLGUMI.js} +3 -3
  7. package/dist/chunks/chunk-AUECDTMX.js +128 -0
  8. package/dist/chunks/{chunk-3WENOEKR.js → chunk-FM24W7ET.js} +4 -4
  9. package/dist/chunks/{chunk-GXAVQSHO.js → chunk-FVI6UYNL.js} +1 -1
  10. package/dist/chunks/{chunk-DHLDURNP.js → chunk-FZZWTDNQ.js} +2 -2
  11. package/dist/chunks/chunk-I3HGCZ4E.js +72 -0
  12. package/dist/chunks/{chunk-CXGDCPH4.js → chunk-ITU4COOO.js} +12 -3
  13. package/dist/chunks/chunk-KXGWAWRV.js +148 -0
  14. package/dist/chunks/{chunk-NN7E6Y4F.js → chunk-L6QLQSJE.js} +2 -2
  15. package/dist/chunks/{chunk-XQQXV6ZZ.js → chunk-LFODAB54.js} +1 -0
  16. package/dist/chunks/{chunk-I43WUYKE.js → chunk-O2QNLUYX.js} +1 -1
  17. package/dist/chunks/{chunk-BI2IN6RX.js → chunk-P726GMBL.js} +1 -1
  18. package/dist/chunks/{chunk-7273TMGI.js → chunk-Q4A2Q46Z.js} +4 -4
  19. package/dist/chunks/{chunk-ODVBO56J.js → chunk-Q7GZMMHB.js} +2 -2
  20. package/dist/chunks/{chunk-F6YGVA2L.js → chunk-RB7WQKNC.js} +3 -2
  21. package/dist/chunks/{chunk-URFSONFS.js → chunk-RKLBPBRM.js} +1 -1
  22. package/dist/chunks/chunk-RY3AVR6E.js +111 -0
  23. package/dist/chunks/{chunk-QPBO2QDL.js → chunk-SQYJEUZD.js} +4 -4
  24. package/dist/chunks/{chunk-ZAJ4OMXG.js → chunk-TV7GKFSY.js} +1 -1
  25. package/dist/chunks/{chunk-PPW2JATF.js → chunk-U3FBUYRS.js} +1 -1
  26. package/dist/chunks/chunk-VGIMO3ZK.js +17 -0
  27. package/dist/chunks/{chunk-BSSEGYXP.js → chunk-WFXGLPSI.js} +7 -3
  28. package/dist/chunks/{chunk-V7IBBQ2D.js → chunk-YWLVPKNT.js} +1 -1
  29. package/dist/chunks/chunk-ZVDYGXRA.js +363 -0
  30. package/dist/chunks/{chunk-VTE7W5ZP.js → chunk-ZZIAWRCX.js} +0 -8
  31. package/dist/chunks/{compile-vercel-config-WRCB2TG2.js → compile-vercel-config-XEZ2TPQ4.js} +1 -1
  32. package/dist/chunks/{delete-DIFVXSQA.js → delete-O3F4EP2W.js} +2 -2
  33. package/dist/chunks/{disable-623SZAWT.js → disable-SJWGUQKZ.js} +2 -2
  34. package/dist/chunks/{discard-R7YAQI6C.js → discard-EQD6ENC3.js} +2 -2
  35. package/dist/chunks/{edit-CY2RYSKD.js → edit-NAIWNSXE.js} +3 -3
  36. package/dist/chunks/{enable-HHOQLDPW.js → enable-LXO62HU5.js} +2 -2
  37. package/dist/chunks/{export-TNFZHJKM.js → export-EHVTYAAP.js} +2 -2
  38. package/dist/chunks/image-R4JG4NX4.js +73 -0
  39. package/dist/chunks/inspect-57BITHYZ.js +136 -0
  40. package/dist/chunks/{inspect-7JLYYYAR.js → inspect-KYVZQL56.js} +3 -3
  41. package/dist/chunks/inspect-RTJALSXC.js +167 -0
  42. package/dist/chunks/inspect-VXODLWNM.js +163 -0
  43. package/dist/chunks/{list-5LKLQBXP.js → list-BYTNF7D7.js} +3 -3
  44. package/dist/chunks/{list-K4F7WGQR.js → list-MUFZTUZA.js} +2 -2
  45. package/dist/chunks/ls-D7NWJACX.js +165 -0
  46. package/dist/chunks/ls-JPWOOVMW.js +214 -0
  47. package/dist/chunks/{ls-DUHNXBAL.js → ls-PDILBRUL.js} +4 -4
  48. package/dist/chunks/ls-ZDMXBOJF.js +201 -0
  49. package/dist/chunks/{publish-O5UJJQKF.js → publish-27V2MMFS.js} +2 -2
  50. package/dist/chunks/{query-FE6G54EI.js → query-75PT24SH.js} +2 -2
  51. package/dist/chunks/{reorder-YH47SCZC.js → reorder-DCSIJX72.js} +2 -2
  52. package/dist/chunks/{restore-TSR6PO3H.js → restore-NRUBGNSK.js} +2 -2
  53. package/dist/chunks/{rm-PQSDPXP2.js → rm-BJSTNUIJ.js} +4 -4
  54. package/dist/chunks/rm-OSIDD4VR.js +137 -0
  55. package/dist/chunks/rm-ZJQ5DOAW.js +137 -0
  56. package/dist/chunks/{rule-inspect-TNP2HULT.js → rule-inspect-WTU3MGMH.js} +4 -4
  57. package/dist/chunks/{rules-IO4KI6U7.js → rules-6PXGKHFH.js} +6 -6
  58. package/dist/chunks/{schema-QFN4XSPZ.js → schema-Z6L3EN6F.js} +2 -2
  59. package/dist/chunks/tags-HHNNZLC6.js +67 -0
  60. package/dist/chunks/{update-PGYIRCOQ.js → update-TTPNV44H.js} +4 -4
  61. package/dist/commands/build/index.js +148 -50
  62. package/dist/commands/deploy/index.js +13 -10
  63. package/dist/commands/dev/index.js +8 -8
  64. package/dist/commands/dev/next-dev-websocket-shim-preload.cjs +20 -0
  65. package/dist/commands/env/index.js +11 -6
  66. package/dist/commands/link/index.js +10 -7
  67. package/dist/commands/list/index.js +3 -3
  68. package/dist/commands-bulk.js +957 -723
  69. package/dist/help.js +1 -1
  70. package/dist/index.js +22 -9
  71. package/dist/version.mjs +1 -1
  72. package/package.json +15 -15
@@ -9,8 +9,8 @@ import {
9
9
  handleRulesApiError,
10
10
  parseRulesFlagsAndScope,
11
11
  rulesCollectionPath
12
- } from "./chunk-URFSONFS.js";
13
- import "./chunk-NN7E6Y4F.js";
12
+ } from "./chunk-RKLBPBRM.js";
13
+ import "./chunk-L6QLQSJE.js";
14
14
  import "./chunk-E2ENQE2W.js";
15
15
  import {
16
16
  validateJsonOutput
@@ -21,8 +21,8 @@ import {
21
21
  import {
22
22
  AGENT_REASON
23
23
  } from "./chunk-QH7WYDEP.js";
24
- import "./chunk-BI2IN6RX.js";
25
- import "./chunk-F6YGVA2L.js";
24
+ import "./chunk-P726GMBL.js";
25
+ import "./chunk-RB7WQKNC.js";
26
26
  import {
27
27
  buildCommandWithGlobalFlags,
28
28
  outputAgentError
@@ -0,0 +1,134 @@
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
+ emitVcrArgParseError,
9
+ handleVcrApiError,
10
+ resolveVcrScope,
11
+ validateVcrJsonOutput
12
+ } from "./chunk-ZVDYGXRA.js";
13
+ import {
14
+ outputError
15
+ } from "./chunk-E2ENQE2W.js";
16
+ import "./chunk-XPKWKPWA.js";
17
+ import {
18
+ addSubcommand
19
+ } from "./chunk-KXGWAWRV.js";
20
+ import "./chunk-RY3AVR6E.js";
21
+ import "./chunk-AUECDTMX.js";
22
+ import {
23
+ AGENT_REASON
24
+ } from "./chunk-QH7WYDEP.js";
25
+ import "./chunk-P726GMBL.js";
26
+ import "./chunk-RB7WQKNC.js";
27
+ import {
28
+ buildCommandWithGlobalFlags,
29
+ outputAgentError
30
+ } from "./chunk-IZOHLD5D.js";
31
+ import "./chunk-ECCWJHC6.js";
32
+ import {
33
+ getFlagsSpecification,
34
+ parseArguments,
35
+ printError
36
+ } from "./chunk-EJ6GQI6F.js";
37
+ import {
38
+ isAPIError,
39
+ packageName
40
+ } from "./chunk-P6AK7SVK.js";
41
+ import "./chunk-P4QNYOFB.js";
42
+ import "./chunk-2RVK3DDN.js";
43
+ import {
44
+ output_manager_default
45
+ } from "./chunk-OX7KI3LF.js";
46
+ import "./chunk-GGP5R3FU.js";
47
+ import "./chunk-S7KYDPEM.js";
48
+ import "./chunk-TZ2YI2VH.js";
49
+
50
+ // src/commands/vcr/add.ts
51
+ async function add(client, argv, telemetry) {
52
+ let parsedArgs;
53
+ try {
54
+ parsedArgs = parseArguments(
55
+ argv,
56
+ getFlagsSpecification(addSubcommand.options)
57
+ );
58
+ } catch (err) {
59
+ emitVcrArgParseError(client, err, "vcr add <name> --project <name-or-id>");
60
+ printError(err);
61
+ return 1;
62
+ }
63
+ const fr = validateVcrJsonOutput(client, parsedArgs.flags);
64
+ if (typeof fr === "number") {
65
+ return fr;
66
+ }
67
+ const name = parsedArgs.args[0];
68
+ const project = parsedArgs.flags["--project"];
69
+ telemetry.trackCliOptionProject(project);
70
+ telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);
71
+ if (!name) {
72
+ outputAgentError(
73
+ client,
74
+ {
75
+ status: "error",
76
+ reason: AGENT_REASON.MISSING_ARGUMENTS,
77
+ message: `Missing repository name. Example: ${packageName} vcr add <name>`,
78
+ next: [
79
+ {
80
+ command: buildCommandWithGlobalFlags(client.argv, "vcr add <name>"),
81
+ when: "Replace <name> with the repository name to create"
82
+ }
83
+ ]
84
+ },
85
+ 1
86
+ );
87
+ return outputError(
88
+ client,
89
+ fr.jsonOutput,
90
+ "MISSING_ARGUMENTS",
91
+ "Usage: `vercel vcr add <name>`"
92
+ );
93
+ }
94
+ const scope = await resolveVcrScope(client, {
95
+ project,
96
+ jsonOutput: fr.jsonOutput
97
+ });
98
+ if (typeof scope === "number") {
99
+ return scope;
100
+ }
101
+ const path = `/v1/vcr/repository?teamId=${encodeURIComponent(scope.teamId)}`;
102
+ output_manager_default.spinner("Creating repository...");
103
+ try {
104
+ const created = await client.fetch(
105
+ path,
106
+ {
107
+ method: "POST",
108
+ body: { projectId: scope.projectId, name }
109
+ }
110
+ );
111
+ if (fr.jsonOutput) {
112
+ client.stdout.write(`${JSON.stringify(created, null, 2)}
113
+ `);
114
+ } else {
115
+ output_manager_default.success(`Created repository ${created.repository?.name ?? name}`);
116
+ }
117
+ return 0;
118
+ } catch (err) {
119
+ if (isAPIError(err)) {
120
+ return handleVcrApiError(client, err, fr.jsonOutput, {
121
+ retry: {
122
+ command: buildCommandWithGlobalFlags(client.argv, "vcr ls"),
123
+ when: "List existing repositories (a name conflict means it already exists)"
124
+ }
125
+ });
126
+ }
127
+ throw err;
128
+ } finally {
129
+ output_manager_default.stopSpinner();
130
+ }
131
+ }
132
+ export {
133
+ add as default
134
+ };
@@ -8,7 +8,7 @@ import {
8
8
  formatCondition,
9
9
  formatTransform,
10
10
  isTargetTransform
11
- } from "./chunk-ZAJ4OMXG.js";
11
+ } from "./chunk-TV7GKFSY.js";
12
12
  import {
13
13
  output_manager_default
14
14
  } from "./chunk-OX7KI3LF.js";
@@ -0,0 +1,71 @@
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/paths.ts
9
+ function baseQuery(scope) {
10
+ return new URLSearchParams({
11
+ teamId: scope.teamId,
12
+ projectId: scope.projectId
13
+ });
14
+ }
15
+ function repositoriesPath(scope, opts = {}) {
16
+ const query = baseQuery(scope);
17
+ if (opts.limit !== void 0) {
18
+ query.set("limit", String(opts.limit));
19
+ }
20
+ if (opts.cursor) {
21
+ query.set("cursor", opts.cursor);
22
+ }
23
+ return `/v1/vcr/repository?${query.toString()}`;
24
+ }
25
+ function repositoryPath(scope, idOrName) {
26
+ return `/v1/vcr/repository/${encodeURIComponent(idOrName)}?${baseQuery(scope).toString()}`;
27
+ }
28
+ function repositoryImagesPath(scope, idOrName, opts = {}) {
29
+ const query = baseQuery(scope);
30
+ if (opts.limit !== void 0) {
31
+ query.set("limit", String(opts.limit));
32
+ }
33
+ if (opts.cursor) {
34
+ query.set("cursor", opts.cursor);
35
+ }
36
+ if (opts.untagged) {
37
+ query.set("untagged", "true");
38
+ }
39
+ return `/v1/vcr/repository/${encodeURIComponent(idOrName)}/images?${query.toString()}`;
40
+ }
41
+ function imagePath(scope, idOrName, imageId) {
42
+ return `/v1/vcr/repository/${encodeURIComponent(idOrName)}/images/${encodeURIComponent(imageId)}?${baseQuery(scope).toString()}`;
43
+ }
44
+ function repositoryTagsPath(scope, idOrName, opts = {}) {
45
+ const query = baseQuery(scope);
46
+ if (opts.limit !== void 0) {
47
+ query.set("limit", String(opts.limit));
48
+ }
49
+ if (opts.cursor) {
50
+ query.set("cursor", opts.cursor);
51
+ }
52
+ if (opts.sortBy) {
53
+ query.set("sortBy", opts.sortBy);
54
+ }
55
+ if (opts.sortOrder) {
56
+ query.set("sortOrder", opts.sortOrder);
57
+ }
58
+ return `/v1/vcr/repository/${encodeURIComponent(idOrName)}/tags?${query.toString()}`;
59
+ }
60
+ function repositoryTagPath(scope, idOrName, tag) {
61
+ return `/v1/vcr/repository/${encodeURIComponent(idOrName)}/tags/${encodeURIComponent(tag)}?${baseQuery(scope).toString()}`;
62
+ }
63
+
64
+ export {
65
+ repositoriesPath,
66
+ repositoryPath,
67
+ repositoryImagesPath,
68
+ imagePath,
69
+ repositoryTagsPath,
70
+ repositoryTagPath
71
+ };
@@ -8,7 +8,7 @@ import {
8
8
  VERCEL_DIR,
9
9
  VERCEL_DIR_PROJECT,
10
10
  require_lib
11
- } from "./chunk-F6YGVA2L.js";
11
+ } from "./chunk-RB7WQKNC.js";
12
12
  import {
13
13
  require_dist
14
14
  } from "./chunk-OX7KI3LF.js";
@@ -10,10 +10,10 @@ import {
10
10
  } from "./chunk-QH7WYDEP.js";
11
11
  import {
12
12
  getLocalPathConfig
13
- } from "./chunk-V7IBBQ2D.js";
13
+ } from "./chunk-YWLVPKNT.js";
14
14
  import {
15
15
  getScope
16
- } from "./chunk-BI2IN6RX.js";
16
+ } from "./chunk-P726GMBL.js";
17
17
  import {
18
18
  table
19
19
  } from "./chunk-VKBYAWTL.js";
@@ -51,7 +51,7 @@ import {
51
51
  selectAndParseRemoteUrl,
52
52
  selectOrg,
53
53
  writeServicesConfig
54
- } from "./chunk-F6YGVA2L.js";
54
+ } from "./chunk-RB7WQKNC.js";
55
55
  import {
56
56
  buildCommandWithGlobalFlags,
57
57
  outputAgentError,
@@ -0,0 +1,128 @@
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
+ formatOption,
9
+ limitOption,
10
+ projectOption,
11
+ yesOption
12
+ } from "./chunk-EJ6GQI6F.js";
13
+ import {
14
+ packageName
15
+ } from "./chunk-P6AK7SVK.js";
16
+
17
+ // src/commands/vcr/image/command.ts
18
+ var projectScopeOption = {
19
+ ...projectOption,
20
+ shorthand: "p",
21
+ description: "Project name or ID (defaults to the linked project)."
22
+ };
23
+ var cursorOption = {
24
+ name: "cursor",
25
+ shorthand: "c",
26
+ type: String,
27
+ deprecated: false,
28
+ description: "Cursor from a previous page to continue listing from",
29
+ argument: "STRING"
30
+ };
31
+ var imageLsSubcommand = {
32
+ name: "ls",
33
+ aliases: ["list"],
34
+ description: "List images in a container registry repository",
35
+ arguments: [
36
+ {
37
+ name: "repository",
38
+ required: true
39
+ }
40
+ ],
41
+ options: [
42
+ projectScopeOption,
43
+ {
44
+ name: "untagged",
45
+ shorthand: null,
46
+ type: Boolean,
47
+ deprecated: false,
48
+ description: "Only list images that have no tags"
49
+ },
50
+ limitOption,
51
+ cursorOption,
52
+ formatOption
53
+ ],
54
+ examples: [
55
+ {
56
+ name: "List images in a repository",
57
+ value: `${packageName} vcr image ls my-app`
58
+ },
59
+ {
60
+ name: "List untagged images as JSON",
61
+ value: `${packageName} vcr image ls my-app --untagged --format json`
62
+ }
63
+ ]
64
+ };
65
+ var imageInspectSubcommand = {
66
+ name: "inspect",
67
+ aliases: ["get"],
68
+ description: "Show details for a single image, including its layer history",
69
+ arguments: [
70
+ {
71
+ name: "repository",
72
+ required: true
73
+ },
74
+ {
75
+ name: "imageId",
76
+ required: true
77
+ }
78
+ ],
79
+ options: [projectScopeOption, formatOption],
80
+ examples: [
81
+ {
82
+ name: "Inspect an image by id",
83
+ value: `${packageName} vcr image inspect my-app img_abc123`
84
+ }
85
+ ]
86
+ };
87
+ var imageRmSubcommand = {
88
+ name: "rm",
89
+ aliases: ["remove", "delete"],
90
+ description: "Delete an image from a repository",
91
+ arguments: [
92
+ {
93
+ name: "repository",
94
+ required: true
95
+ },
96
+ {
97
+ name: "imageId",
98
+ required: true
99
+ }
100
+ ],
101
+ options: [projectScopeOption, yesOption, formatOption],
102
+ examples: [
103
+ {
104
+ name: "Delete an image by id",
105
+ value: `${packageName} vcr image rm my-app img_abc123`
106
+ },
107
+ {
108
+ name: "Delete an image without the confirmation prompt",
109
+ value: `${packageName} vcr image rm my-app img_abc123 --yes`
110
+ }
111
+ ]
112
+ };
113
+ var imageAggregateCommand = {
114
+ name: "image",
115
+ aliases: ["images"],
116
+ description: "List, inspect, or delete images in a repository",
117
+ arguments: [],
118
+ subcommands: [imageLsSubcommand, imageInspectSubcommand, imageRmSubcommand],
119
+ options: [],
120
+ examples: []
121
+ };
122
+
123
+ export {
124
+ imageLsSubcommand,
125
+ imageInspectSubcommand,
126
+ imageRmSubcommand,
127
+ imageAggregateCommand
128
+ };
@@ -10,7 +10,7 @@ import {
10
10
  progress,
11
11
  require_dist as require_dist2,
12
12
  sleep
13
- } from "./chunk-DHLDURNP.js";
13
+ } from "./chunk-FZZWTDNQ.js";
14
14
  import {
15
15
  suggestNextCommands
16
16
  } from "./chunk-XBN2O34P.js";
@@ -20,7 +20,7 @@ import {
20
20
  } from "./chunk-SGL3NMOP.js";
21
21
  import {
22
22
  CommandTimeout
23
- } from "./chunk-BSSEGYXP.js";
23
+ } from "./chunk-WFXGLPSI.js";
24
24
  import {
25
25
  showPluginTipIfNeeded
26
26
  } from "./chunk-NJUPUGOE.js";
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-64IF634X.js";
30
30
  import {
31
31
  getScope
32
- } from "./chunk-BI2IN6RX.js";
32
+ } from "./chunk-P726GMBL.js";
33
33
  import {
34
34
  getProjectByNameOrId,
35
35
  param,
@@ -37,7 +37,7 @@ import {
37
37
  require_dist as require_dist3,
38
38
  require_pluralize,
39
39
  ua_default
40
- } from "./chunk-F6YGVA2L.js";
40
+ } from "./chunk-RB7WQKNC.js";
41
41
  import {
42
42
  require_strip_ansi,
43
43
  responseError
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  require_lib
9
- } from "./chunk-F6YGVA2L.js";
9
+ } from "./chunk-RB7WQKNC.js";
10
10
  import {
11
11
  isNativeBinaryInstall
12
12
  } from "./chunk-ECCWJHC6.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-V5P25P7F.js";
10
10
  import {
11
11
  getLocalPathConfig
12
- } from "./chunk-V7IBBQ2D.js";
12
+ } from "./chunk-YWLVPKNT.js";
13
13
  import {
14
14
  DEFAULT_VERCEL_CONFIG_FILENAME,
15
15
  VERCEL_CONFIG_EXTENSIONS,
@@ -36,7 +36,7 @@ import {
36
36
  useKeypress,
37
37
  usePrefix,
38
38
  useState
39
- } from "./chunk-F6YGVA2L.js";
39
+ } from "./chunk-RB7WQKNC.js";
40
40
  import {
41
41
  require_load_json_file
42
42
  } from "./chunk-ECCWJHC6.js";
@@ -0,0 +1,72 @@
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
+ require_bytes
9
+ } from "./chunk-P6AK7SVK.js";
10
+ import {
11
+ require_ms
12
+ } from "./chunk-GGP5R3FU.js";
13
+ import {
14
+ __toESM
15
+ } from "./chunk-TZ2YI2VH.js";
16
+
17
+ // src/commands/vcr/utils/format.ts
18
+ var import_ms = __toESM(require_ms(), 1);
19
+ var import_bytes = __toESM(require_bytes(), 1);
20
+ function formatBytes(size) {
21
+ if (typeof size !== "number" || Number.isNaN(size)) {
22
+ return "-";
23
+ }
24
+ return import_bytes.default.format(size, { decimalPlaces: 1 }) ?? "-";
25
+ }
26
+ function formatRelativeTime(iso) {
27
+ const time = new Date(iso).getTime();
28
+ if (Number.isNaN(time)) {
29
+ return "-";
30
+ }
31
+ return `${(0, import_ms.default)(Date.now() - time)} ago`;
32
+ }
33
+ function formatDigest(digest) {
34
+ if (!digest) {
35
+ return "-";
36
+ }
37
+ return digest.replace(/^sha256:/, "").slice(0, 12);
38
+ }
39
+ function formatImageStatus(status) {
40
+ switch (status) {
41
+ case "ready":
42
+ return "Ready";
43
+ case "preparing":
44
+ return "Preparing";
45
+ case "unoptimized":
46
+ return "Ready (unoptimized)";
47
+ default:
48
+ return "-";
49
+ }
50
+ }
51
+ var VCR_REGISTRY = "vcr.vercel.com";
52
+ function formatImageReference(teamSlug, projectName, repositoryName, digest) {
53
+ if (!digest) {
54
+ return "-";
55
+ }
56
+ return `${VCR_REGISTRY}/${teamSlug}/${projectName}/${repositoryName}@${digest}`;
57
+ }
58
+ function formatTagReference(teamSlug, projectName, repositoryName, tag) {
59
+ if (!tag) {
60
+ return "-";
61
+ }
62
+ return `${VCR_REGISTRY}/${teamSlug}/${projectName}/${repositoryName}:${tag}`;
63
+ }
64
+
65
+ export {
66
+ formatBytes,
67
+ formatRelativeTime,
68
+ formatDigest,
69
+ formatImageStatus,
70
+ formatImageReference,
71
+ formatTagReference
72
+ };
@@ -18,7 +18,7 @@ import {
18
18
  require_lib,
19
19
  require_minimatch,
20
20
  require_pluralize
21
- } from "./chunk-F6YGVA2L.js";
21
+ } from "./chunk-RB7WQKNC.js";
22
22
  import {
23
23
  CantParseJSONFile,
24
24
  cmd,
@@ -11229,7 +11229,8 @@ import {
11229
11229
  isExperimentalBackendsEnabled,
11230
11230
  isExperimentalService,
11231
11231
  isExperimentalServiceV2,
11232
- isExternalSymlink
11232
+ isExternalSymlink,
11233
+ isSymbolicLink
11233
11234
  } from "@vercel/build-utils";
11234
11235
 
11235
11236
  // src/util/build/merge.ts
@@ -12016,6 +12017,8 @@ function stripParentSegments(path2) {
12016
12017
  return segments.slice(i).join("/");
12017
12018
  }
12018
12019
  function filesWithoutFsRefs(files, repoRootPath, sharedDest, standalone) {
12020
+ const repoRootResolved = process.env.VERCEL_RESOLVE_ROOT_DIRECTORY === "1";
12021
+ const symlinkDirs = repoRootResolved && standalone && sharedDest ? Object.entries(files).filter(([, f]) => f.type === "FileFsRef" && isSymbolicLink(f.mode)).map(([p]) => `${normalizePath(p)}/`) : [];
12019
12022
  let filePathMap;
12020
12023
  const out = {};
12021
12024
  const shared = {};
@@ -12023,7 +12026,13 @@ function filesWithoutFsRefs(files, repoRootPath, sharedDest, standalone) {
12023
12026
  if (file.type === "FileFsRef") {
12024
12027
  if (!filePathMap)
12025
12028
  filePathMap = {};
12026
- if (standalone && sharedDest) {
12029
+ if (standalone && sharedDest && repoRootResolved) {
12030
+ const normalized = normalizePath(path2);
12031
+ if (symlinkDirs.some((prefix) => normalized.startsWith(prefix))) {
12032
+ continue;
12033
+ }
12034
+ out[normalized] = file;
12035
+ } else if (standalone && sharedDest) {
12027
12036
  if (isExternalSymlink(file)) {
12028
12037
  continue;
12029
12038
  }