vercel 54.15.1 → 54.17.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.
- package/dist/chunks/{add-BHCMFK52.js → add-QQY6QOTO.js} +5 -5
- package/dist/chunks/{chunk-4TL5EF3A.js → chunk-2F6JT2OC.js} +4 -1
- package/dist/chunks/{chunk-AWD3IGXU.js → chunk-3NR6OYDV.js} +1 -1
- package/dist/chunks/{chunk-RWRYDAUG.js → chunk-4D42VZRX.js} +1 -1
- package/dist/chunks/{chunk-OOGTHUXU.js → chunk-5X7FBWLF.js} +6 -6
- package/dist/chunks/{chunk-CQ24PL4F.js → chunk-7AQDR2RX.js} +48 -9
- package/dist/chunks/{chunk-TAUAS27Y.js → chunk-7B44AIGE.js} +2 -2
- package/dist/chunks/{chunk-CBMMVXLH.js → chunk-A4B4JQVP.js} +11 -3
- package/dist/chunks/{chunk-AQWK7XXE.js → chunk-BRLY3Q4U.js} +18 -3
- package/dist/chunks/{chunk-D7U6YBVT.js → chunk-DDTKG4J3.js} +1 -1
- package/dist/chunks/{chunk-OEFNWW5M.js → chunk-E6FCE2XJ.js} +2 -2
- package/dist/chunks/{chunk-JNVCGTF2.js → chunk-HJ2TEW5Y.js} +1 -1
- package/dist/chunks/{chunk-PMUUPCDL.js → chunk-JFA4NUXP.js} +1 -1
- package/dist/chunks/{chunk-MABHXDYV.js → chunk-KTX4RQFM.js} +520 -133
- package/dist/chunks/{chunk-TDFUNPL7.js → chunk-KWCZRH7N.js} +5 -8
- package/dist/chunks/{chunk-B5DP7FOH.js → chunk-LGR4JRFA.js} +6 -6
- package/dist/chunks/{chunk-UJZ4RUU6.js → chunk-MS3WAXLU.js} +1 -1
- package/dist/chunks/{chunk-4OEXX4CB.js → chunk-NRIXI6V5.js} +1 -1
- package/dist/chunks/{chunk-4GQBO7KU.js → chunk-P5AZW6W6.js} +8 -2
- package/dist/chunks/{chunk-HIYWSGI7.js → chunk-Q77ALSXR.js} +3 -0
- package/dist/chunks/{chunk-5X6ILMYI.js → chunk-V7JDSYIZ.js} +3 -3
- package/dist/chunks/{chunk-UYC2Q5YZ.js → chunk-WJPWCLMH.js} +1 -1
- package/dist/chunks/{chunk-UEPXHHDN.js → chunk-YW7AYO7N.js} +1 -1
- package/dist/chunks/{compile-vercel-config-LUMMHFTD.js → compile-vercel-config-D2OQCK4B.js} +2 -2
- package/dist/chunks/{delete-X6VOLLCP.js → delete-VMW7FORM.js} +3 -3
- package/dist/chunks/{disable-LFH5IOCZ.js → disable-BDFZELDL.js} +3 -3
- package/dist/chunks/{discard-EVD33PAE.js → discard-WIN3BOXR.js} +3 -3
- package/dist/chunks/{edit-FL3SRS2I.js → edit-IZQX4XAG.js} +5 -5
- package/dist/chunks/{enable-HTU7LQK5.js → enable-RFODZ2L7.js} +3 -3
- package/dist/chunks/{export-R222C6IH.js → export-5CCLXZYT.js} +3 -3
- package/dist/chunks/{inspect-YYTAQP3A.js → inspect-GEUUTDBY.js} +4 -4
- package/dist/chunks/{list-SWJFJSEE.js → list-H35AGNO2.js} +3 -3
- package/dist/chunks/{list-AOJMWKA7.js → list-JIYDXQDJ.js} +4 -4
- package/dist/chunks/{ls-H7KDHFK6.js → ls-WPNFJAS6.js} +5 -5
- package/dist/chunks/{publish-O5VKBFJ6.js → publish-K7OPKXYC.js} +3 -3
- package/dist/chunks/{query-7UDJEOOR.js → query-MAN4NKU4.js} +3 -3
- package/dist/chunks/{reorder-ZPI6Q7DQ.js → reorder-GQ7BOQA7.js} +3 -3
- package/dist/chunks/{restore-7FNMEG4A.js → restore-MODYFJSP.js} +3 -3
- package/dist/chunks/{rm-U37YHRNF.js → rm-A45OKS6U.js} +5 -5
- package/dist/chunks/{routes-YEU33SON.js → routes-KUTLDFIF.js} +2 -2
- package/dist/chunks/{rule-inspect-CVI3TQHN.js → rule-inspect-HJCERQHK.js} +5 -5
- package/dist/chunks/{rules-ZTL4JCZO.js → rules-UNL3IB4P.js} +6 -6
- package/dist/chunks/{schema-LZ6VDRGM.js → schema-WOW2BATT.js} +3 -3
- package/dist/chunks/{update-O6FSP627.js → update-MOM4T2RN.js} +5 -5
- package/dist/commands/build/index.js +18 -18
- package/dist/commands/deploy/index.js +160 -13
- package/dist/commands/dev/index.js +665 -104
- package/dist/commands/env/index.js +6 -6
- package/dist/commands/link/index.js +47 -13
- package/dist/commands/list/index.js +5 -5
- package/dist/commands-bulk.js +44 -40
- package/dist/index.js +46 -42
- package/dist/version.mjs +1 -1
- package/package.json +21 -20
|
@@ -11,39 +11,39 @@ import {
|
|
|
11
11
|
isLambda,
|
|
12
12
|
staticFiles,
|
|
13
13
|
writeBuildResult
|
|
14
|
-
} from "../../chunks/chunk-
|
|
14
|
+
} from "../../chunks/chunk-7AQDR2RX.js";
|
|
15
15
|
import {
|
|
16
16
|
pullCommandLogic
|
|
17
|
-
} from "../../chunks/chunk-
|
|
17
|
+
} from "../../chunks/chunk-LGR4JRFA.js";
|
|
18
18
|
import {
|
|
19
19
|
require_semver
|
|
20
20
|
} from "../../chunks/chunk-IB5L4LKZ.js";
|
|
21
21
|
import {
|
|
22
22
|
pickOverrides,
|
|
23
23
|
readProjectSettings
|
|
24
|
-
} from "../../chunks/chunk-
|
|
24
|
+
} from "../../chunks/chunk-NRIXI6V5.js";
|
|
25
25
|
import "../../chunks/chunk-YI3JV6GM.js";
|
|
26
26
|
import "../../chunks/chunk-BRQ6PX3U.js";
|
|
27
27
|
import {
|
|
28
28
|
stamp_default
|
|
29
29
|
} from "../../chunks/chunk-64IF634X.js";
|
|
30
30
|
import "../../chunks/chunk-VXYGCOKL.js";
|
|
31
|
-
import "../../chunks/chunk-
|
|
31
|
+
import "../../chunks/chunk-P5AZW6W6.js";
|
|
32
32
|
import {
|
|
33
33
|
printProjectNotFoundError
|
|
34
|
-
} from "../../chunks/chunk-
|
|
34
|
+
} from "../../chunks/chunk-V7JDSYIZ.js";
|
|
35
35
|
import {
|
|
36
36
|
AGENT_REASON,
|
|
37
37
|
AGENT_STATUS
|
|
38
38
|
} from "../../chunks/chunk-QH7WYDEP.js";
|
|
39
|
-
import "../../chunks/chunk-
|
|
39
|
+
import "../../chunks/chunk-MS3WAXLU.js";
|
|
40
40
|
import {
|
|
41
41
|
buildCommand
|
|
42
|
-
} from "../../chunks/chunk-
|
|
43
|
-
import "../../chunks/chunk-
|
|
42
|
+
} from "../../chunks/chunk-YW7AYO7N.js";
|
|
43
|
+
import "../../chunks/chunk-2F6JT2OC.js";
|
|
44
44
|
import {
|
|
45
45
|
help
|
|
46
|
-
} from "../../chunks/chunk-
|
|
46
|
+
} from "../../chunks/chunk-3NR6OYDV.js";
|
|
47
47
|
import {
|
|
48
48
|
DEFAULT_VERCEL_CONFIG_FILENAME,
|
|
49
49
|
VERCEL_DIR,
|
|
@@ -65,10 +65,10 @@ import {
|
|
|
65
65
|
resolveProjectCwd,
|
|
66
66
|
ua_default,
|
|
67
67
|
validateConfig
|
|
68
|
-
} from "../../chunks/chunk-
|
|
68
|
+
} from "../../chunks/chunk-KTX4RQFM.js";
|
|
69
69
|
import {
|
|
70
70
|
TelemetryClient
|
|
71
|
-
} from "../../chunks/chunk-
|
|
71
|
+
} from "../../chunks/chunk-Q77ALSXR.js";
|
|
72
72
|
import {
|
|
73
73
|
outputAgentError
|
|
74
74
|
} from "../../chunks/chunk-NHGCQRK5.js";
|
|
@@ -548,7 +548,7 @@ function unsetServiceBuildImmutableEnvVars(restoreEnv) {
|
|
|
548
548
|
function getGeneratedServiceAlreadyBuiltWarning(service) {
|
|
549
549
|
const framework = service.framework ?? "unknown";
|
|
550
550
|
const entrypoint = service.entrypoint ?? service.builder.src ?? "unknown";
|
|
551
|
-
return `Detected already-built service "${service.name}" from lazily generated \`.vercel/output/config.json\` (framework: ${framework}, entrypoint: ${entrypoint}). It will not be treated as a service because its build output already exists at the top level. Configure it in \`vercel.json\` as
|
|
551
|
+
return `Detected already-built service "${service.name}" from lazily generated \`.vercel/output/config.json\` (framework: ${framework}, entrypoint: ${entrypoint}). It will not be treated as a service because its build output already exists at the top level. Configure it in \`vercel.json\` as a \`services\` entry to remove this warning.`;
|
|
552
552
|
}
|
|
553
553
|
async function main(client) {
|
|
554
554
|
const telemetryClient = new BuildTelemetryClient({
|
|
@@ -975,14 +975,13 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
975
975
|
let zeroConfigFallbackRoutes = [];
|
|
976
976
|
let detectedServices;
|
|
977
977
|
let detectedResolvedServices;
|
|
978
|
-
const localConfigWithServicesV2 = localConfig;
|
|
979
978
|
const hasExperimentalServicesV1ConfiguredInVercelConfig = hasNonEmptyObject(
|
|
980
979
|
localConfig.experimentalServices
|
|
981
980
|
);
|
|
982
981
|
const hasExperimentalServicesV2ConfiguredInVercelConfig = hasNonEmptyObject(
|
|
983
|
-
|
|
982
|
+
localConfig.services ?? localConfig.experimentalServicesV2
|
|
984
983
|
);
|
|
985
|
-
const configuredExperimentalServicesV2 = hasExperimentalServicesV2ConfiguredInVercelConfig &&
|
|
984
|
+
const configuredExperimentalServicesV2 = hasExperimentalServicesV2ConfiguredInVercelConfig && (localConfig.services ?? localConfig.experimentalServicesV2) ? localConfig.services ?? localConfig.experimentalServicesV2 : void 0;
|
|
986
985
|
let nestExperimentalServicesV2Output = hasExperimentalServicesV2ConfiguredInVercelConfig;
|
|
987
986
|
let detectedExperimentalServicesV1Config;
|
|
988
987
|
let detectedExperimentalServicesV2Config = configuredExperimentalServicesV2;
|
|
@@ -998,9 +997,8 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
998
997
|
const detectedBuilders = await span.child("vc.detectBuilders").trace(
|
|
999
998
|
() => (0, import_fs_detectors2.detectBuilders)(files, pkg, {
|
|
1000
999
|
...localConfig,
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
},
|
|
1000
|
+
services: void 0,
|
|
1001
|
+
experimentalServicesV2: configuredExperimentalServicesV2,
|
|
1004
1002
|
projectSettings,
|
|
1005
1003
|
ignoreBuildScript: true,
|
|
1006
1004
|
featHandleMiss: true,
|
|
@@ -1632,9 +1630,11 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
1632
1630
|
const generatedBuilders = await span.child("vc.detectGeneratedServices").trace(
|
|
1633
1631
|
() => (0, import_fs_detectors2.detectBuilders)(files, pkg, {
|
|
1634
1632
|
...localConfig,
|
|
1633
|
+
services: void 0,
|
|
1635
1634
|
...generatedExperimentalServicesV2Config ? {
|
|
1636
1635
|
experimentalServicesV2: generatedExperimentalServicesV2Config
|
|
1637
1636
|
} : {
|
|
1637
|
+
experimentalServicesV2: void 0,
|
|
1638
1638
|
experimentalServices: generatedExperimentalServicesV1Config
|
|
1639
1639
|
},
|
|
1640
1640
|
projectSettings,
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
purchaseDomainIfAvailable,
|
|
14
14
|
require_cjs,
|
|
15
15
|
setupDomain
|
|
16
|
-
} from "../../chunks/chunk-
|
|
16
|
+
} from "../../chunks/chunk-KWCZRH7N.js";
|
|
17
17
|
import {
|
|
18
18
|
readLocalConfig
|
|
19
|
-
} from "../../chunks/chunk-
|
|
19
|
+
} from "../../chunks/chunk-A4B4JQVP.js";
|
|
20
20
|
import {
|
|
21
21
|
highlight
|
|
22
22
|
} from "../../chunks/chunk-V5P25P7F.js";
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
deprecatedArchiveSplitTgz,
|
|
41
41
|
getCommandAliases,
|
|
42
42
|
initSubcommand
|
|
43
|
-
} from "../../chunks/chunk-
|
|
43
|
+
} from "../../chunks/chunk-BRLY3Q4U.js";
|
|
44
44
|
import "../../chunks/chunk-YE3C5CUX.js";
|
|
45
45
|
import "../../chunks/chunk-IB56QKCM.js";
|
|
46
46
|
import "../../chunks/chunk-DPS62LHL.js";
|
|
@@ -50,7 +50,7 @@ import "../../chunks/chunk-56AJHIQC.js";
|
|
|
50
50
|
import "../../chunks/chunk-IJJOI63T.js";
|
|
51
51
|
import {
|
|
52
52
|
pickOverrides
|
|
53
|
-
} from "../../chunks/chunk-
|
|
53
|
+
} from "../../chunks/chunk-NRIXI6V5.js";
|
|
54
54
|
import "../../chunks/chunk-BRQ6PX3U.js";
|
|
55
55
|
import {
|
|
56
56
|
stamp_default
|
|
@@ -58,20 +58,20 @@ import {
|
|
|
58
58
|
import "../../chunks/chunk-VXYGCOKL.js";
|
|
59
59
|
import {
|
|
60
60
|
ensureLink
|
|
61
|
-
} from "../../chunks/chunk-
|
|
61
|
+
} from "../../chunks/chunk-P5AZW6W6.js";
|
|
62
62
|
import {
|
|
63
63
|
validatePaths,
|
|
64
64
|
validateRootDirectory
|
|
65
|
-
} from "../../chunks/chunk-
|
|
65
|
+
} from "../../chunks/chunk-V7JDSYIZ.js";
|
|
66
66
|
import {
|
|
67
67
|
AGENT_STATUS
|
|
68
68
|
} from "../../chunks/chunk-QH7WYDEP.js";
|
|
69
|
-
import "../../chunks/chunk-
|
|
70
|
-
import "../../chunks/chunk-
|
|
71
|
-
import "../../chunks/chunk-
|
|
69
|
+
import "../../chunks/chunk-MS3WAXLU.js";
|
|
70
|
+
import "../../chunks/chunk-YW7AYO7N.js";
|
|
71
|
+
import "../../chunks/chunk-2F6JT2OC.js";
|
|
72
72
|
import {
|
|
73
73
|
help
|
|
74
|
-
} from "../../chunks/chunk-
|
|
74
|
+
} from "../../chunks/chunk-3NR6OYDV.js";
|
|
75
75
|
import {
|
|
76
76
|
compileVercelConfig,
|
|
77
77
|
createGitMeta,
|
|
@@ -80,11 +80,12 @@ import {
|
|
|
80
80
|
parseTarget,
|
|
81
81
|
printAlignedLabel,
|
|
82
82
|
require_dist as require_dist2,
|
|
83
|
+
require_frameworks,
|
|
83
84
|
require_lib
|
|
84
|
-
} from "../../chunks/chunk-
|
|
85
|
+
} from "../../chunks/chunk-KTX4RQFM.js";
|
|
85
86
|
import {
|
|
86
87
|
TelemetryClient
|
|
87
|
-
} from "../../chunks/chunk-
|
|
88
|
+
} from "../../chunks/chunk-Q77ALSXR.js";
|
|
88
89
|
import {
|
|
89
90
|
outputAgentError
|
|
90
91
|
} from "../../chunks/chunk-NHGCQRK5.js";
|
|
@@ -92,7 +93,9 @@ import "../../chunks/chunk-N2T234LO.js";
|
|
|
92
93
|
import {
|
|
93
94
|
require_ms
|
|
94
95
|
} from "../../chunks/chunk-GGP5R3FU.js";
|
|
95
|
-
import
|
|
96
|
+
import {
|
|
97
|
+
table
|
|
98
|
+
} from "../../chunks/chunk-LYCSVJIX.js";
|
|
96
99
|
import {
|
|
97
100
|
getCommandNameWithGlobalFlags,
|
|
98
101
|
getFlagsSpecification,
|
|
@@ -142,6 +145,7 @@ import {
|
|
|
142
145
|
// src/commands/deploy/index.ts
|
|
143
146
|
var import_client3 = __toESM(require_dist2(), 1);
|
|
144
147
|
var import_error_utils = __toESM(require_dist(), 1);
|
|
148
|
+
var import_frameworks = __toESM(require_frameworks(), 1);
|
|
145
149
|
var import_bytes = __toESM(require_bytes(), 1);
|
|
146
150
|
var import_chalk = __toESM(require_source(), 1);
|
|
147
151
|
var import_fs_extra2 = __toESM(require_lib(), 1);
|
|
@@ -453,6 +457,11 @@ var DeployTelemetryClient = class extends TelemetryClient {
|
|
|
453
457
|
this.trackCliFlag("no-wait");
|
|
454
458
|
}
|
|
455
459
|
}
|
|
460
|
+
trackCliFlagDry(flag) {
|
|
461
|
+
if (flag) {
|
|
462
|
+
this.trackCliFlag("dry");
|
|
463
|
+
}
|
|
464
|
+
}
|
|
456
465
|
trackCliFlagPrebuilt(flag) {
|
|
457
466
|
if (flag) {
|
|
458
467
|
this.trackCliFlag("prebuilt");
|
|
@@ -1233,6 +1242,7 @@ async function handleDefaultDeploy(client, telemetryClient) {
|
|
|
1233
1242
|
telemetryClient.trackCliFlagPrebuilt(parsedArguments.flags["--prebuilt"]);
|
|
1234
1243
|
telemetryClient.trackCliOptionRegions(parsedArguments.flags["--regions"]);
|
|
1235
1244
|
telemetryClient.trackCliFlagNoWait(parsedArguments.flags["--no-wait"]);
|
|
1245
|
+
telemetryClient.trackCliFlagDry(parsedArguments.flags["--dry"]);
|
|
1236
1246
|
telemetryClient.trackCliFlagYes(parsedArguments.flags["--yes"]);
|
|
1237
1247
|
telemetryClient.trackCliOptionTarget(parsedArguments.flags["--target"]);
|
|
1238
1248
|
telemetryClient.trackCliFlagProd(parsedArguments.flags["--prod"]);
|
|
@@ -1375,6 +1385,7 @@ async function handleDefaultDeploy(client, telemetryClient) {
|
|
|
1375
1385
|
paths
|
|
1376
1386
|
}),
|
|
1377
1387
|
failIfNotFound: !!projectNameOrId,
|
|
1388
|
+
requireExistingLink: parsedArguments.flags["--dry"],
|
|
1378
1389
|
v0: isV0
|
|
1379
1390
|
});
|
|
1380
1391
|
if (typeof link === "number") {
|
|
@@ -1459,6 +1470,34 @@ async function handleDefaultDeploy(client, telemetryClient) {
|
|
|
1459
1470
|
}
|
|
1460
1471
|
}
|
|
1461
1472
|
localConfig = localConfig || {};
|
|
1473
|
+
if (parsedArguments.flags["--dry"]) {
|
|
1474
|
+
try {
|
|
1475
|
+
const summary = await (0, import_client3.inspectDeploymentFiles)({
|
|
1476
|
+
path: cwd,
|
|
1477
|
+
archive: parsedArchive ? "tgz" : void 0,
|
|
1478
|
+
debug: output_manager_default.isDebugEnabled(),
|
|
1479
|
+
prebuilt: parsedArguments.flags["--prebuilt"],
|
|
1480
|
+
vercelOutputDir,
|
|
1481
|
+
projectName: project.name,
|
|
1482
|
+
rootDirectory,
|
|
1483
|
+
bulkRedirectsPath: localConfig.bulkRedirectsPath
|
|
1484
|
+
});
|
|
1485
|
+
const framework = resolveDeploymentFrameworkPreset({
|
|
1486
|
+
localFramework: localConfig.framework,
|
|
1487
|
+
projectFramework: project.framework
|
|
1488
|
+
});
|
|
1489
|
+
printDeploymentDryRun(
|
|
1490
|
+
client,
|
|
1491
|
+
summary,
|
|
1492
|
+
framework,
|
|
1493
|
+
asJson || !client.stdout.isTTY
|
|
1494
|
+
);
|
|
1495
|
+
return 0;
|
|
1496
|
+
} catch (err) {
|
|
1497
|
+
printError(err);
|
|
1498
|
+
return 1;
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1462
1501
|
if (localConfig.name) {
|
|
1463
1502
|
output_manager_default.print(
|
|
1464
1503
|
`${prependEmoji(
|
|
@@ -2068,6 +2107,114 @@ function handleCreateDeployError(error, localConfig) {
|
|
|
2068
2107
|
}
|
|
2069
2108
|
return error;
|
|
2070
2109
|
}
|
|
2110
|
+
function toDeploymentFramework(framework) {
|
|
2111
|
+
return {
|
|
2112
|
+
name: framework.name,
|
|
2113
|
+
slug: framework.slug
|
|
2114
|
+
};
|
|
2115
|
+
}
|
|
2116
|
+
function resolveDeploymentFrameworkPreset({
|
|
2117
|
+
localFramework,
|
|
2118
|
+
projectFramework
|
|
2119
|
+
}) {
|
|
2120
|
+
const frameworkSlug = typeof localFramework === "undefined" ? projectFramework : localFramework;
|
|
2121
|
+
const frameworkPreset = import_frameworks.frameworkList.find(
|
|
2122
|
+
(framework) => framework.slug === frameworkSlug
|
|
2123
|
+
);
|
|
2124
|
+
const otherPreset = import_frameworks.frameworkList.find((framework) => framework.slug === null);
|
|
2125
|
+
return frameworkPreset ? toDeploymentFramework(frameworkPreset) : otherPreset ? toDeploymentFramework(otherPreset) : { name: "Other", slug: null };
|
|
2126
|
+
}
|
|
2127
|
+
function printDeploymentDryRun(client, summary, framework, asJson) {
|
|
2128
|
+
const directories = getDirectoryDistribution(summary.files);
|
|
2129
|
+
const largestFiles = [...summary.files].sort((a, b) => b.size - a.size || a.path.localeCompare(b.path)).slice(0, 10);
|
|
2130
|
+
if (asJson) {
|
|
2131
|
+
client.stdout.write(
|
|
2132
|
+
`${JSON.stringify(
|
|
2133
|
+
{
|
|
2134
|
+
framework,
|
|
2135
|
+
basePath: summary.basePath,
|
|
2136
|
+
fileCount: summary.fileCount,
|
|
2137
|
+
totalSize: summary.totalSize,
|
|
2138
|
+
ignoredCount: summary.ignoredCount,
|
|
2139
|
+
ignored: summary.ignored,
|
|
2140
|
+
directories,
|
|
2141
|
+
largestFiles,
|
|
2142
|
+
files: summary.files
|
|
2143
|
+
},
|
|
2144
|
+
null,
|
|
2145
|
+
2
|
|
2146
|
+
)}
|
|
2147
|
+
`
|
|
2148
|
+
);
|
|
2149
|
+
return;
|
|
2150
|
+
}
|
|
2151
|
+
const lines = [
|
|
2152
|
+
`${import_chalk.default.bold("Deployment Dry Run")}
|
|
2153
|
+
`,
|
|
2154
|
+
`${import_chalk.default.bold("Detected Framework Preset")}: ${framework.name}${framework.slug ? ` (${framework.slug})` : ""}`,
|
|
2155
|
+
`Included: ${summary.fileCount} ${pluralize(
|
|
2156
|
+
"file",
|
|
2157
|
+
summary.fileCount
|
|
2158
|
+
)}, ${formatBytes(summary.totalSize)}`,
|
|
2159
|
+
`Ignored: ${summary.ignoredCount} ${pluralize(
|
|
2160
|
+
"path",
|
|
2161
|
+
summary.ignoredCount
|
|
2162
|
+
)}
|
|
2163
|
+
`
|
|
2164
|
+
];
|
|
2165
|
+
if (directories.length > 0) {
|
|
2166
|
+
lines.push(
|
|
2167
|
+
table(
|
|
2168
|
+
[
|
|
2169
|
+
["Path", "Files", "Size"],
|
|
2170
|
+
...directories.map((item) => [
|
|
2171
|
+
item.path,
|
|
2172
|
+
String(item.fileCount),
|
|
2173
|
+
formatBytes(item.size)
|
|
2174
|
+
])
|
|
2175
|
+
],
|
|
2176
|
+
{ align: ["l", "r", "r"], hsep: 4 }
|
|
2177
|
+
),
|
|
2178
|
+
""
|
|
2179
|
+
);
|
|
2180
|
+
}
|
|
2181
|
+
if (largestFiles.length > 0) {
|
|
2182
|
+
lines.push(
|
|
2183
|
+
import_chalk.default.bold("Largest Files"),
|
|
2184
|
+
table(
|
|
2185
|
+
largestFiles.map((file) => [file.path, formatBytes(file.size)]),
|
|
2186
|
+
{ align: ["l", "r"], hsep: 4 }
|
|
2187
|
+
),
|
|
2188
|
+
""
|
|
2189
|
+
);
|
|
2190
|
+
}
|
|
2191
|
+
output_manager_default.print(`${lines.join("\n")}
|
|
2192
|
+
`);
|
|
2193
|
+
}
|
|
2194
|
+
function getDirectoryDistribution(files) {
|
|
2195
|
+
const directories = /* @__PURE__ */ new Map();
|
|
2196
|
+
for (const file of files) {
|
|
2197
|
+
const [segment] = file.path.split("/");
|
|
2198
|
+
const key = file.path.includes("/") ? segment : file.path;
|
|
2199
|
+
const current = directories.get(key) ?? {
|
|
2200
|
+
path: key,
|
|
2201
|
+
fileCount: 0,
|
|
2202
|
+
size: 0
|
|
2203
|
+
};
|
|
2204
|
+
current.fileCount += 1;
|
|
2205
|
+
current.size += file.size;
|
|
2206
|
+
directories.set(key, current);
|
|
2207
|
+
}
|
|
2208
|
+
return Array.from(directories.values()).sort(
|
|
2209
|
+
(a, b) => b.size - a.size || a.path.localeCompare(b.path)
|
|
2210
|
+
);
|
|
2211
|
+
}
|
|
2212
|
+
function formatBytes(size) {
|
|
2213
|
+
return import_bytes.default.format(size, { decimalPlaces: 1 });
|
|
2214
|
+
}
|
|
2215
|
+
function pluralize(word, count) {
|
|
2216
|
+
return count === 1 ? word : `${word}s`;
|
|
2217
|
+
}
|
|
2071
2218
|
var addProcessEnv = async (log, env) => {
|
|
2072
2219
|
let val;
|
|
2073
2220
|
for (const key of Object.keys(env)) {
|