@shipstatic/drop 2.14.1-beta.1 → 2.15.0-beta.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/index.js CHANGED
@@ -261,7 +261,7 @@ function applyStatus(files, status, statusMessage) {
261
261
  return files.map((f) => ({
262
262
  ...f,
263
263
  status,
264
- ...statusMessage === void 0 ? {} : { statusMessage }
264
+ ...{}
265
265
  }));
266
266
  }
267
267
  var NEVER_SOURCE = /* @__PURE__ */ new Set(["node_modules", ".git", "__MACOSX"]);
@@ -1031,15 +1031,6 @@ async function processFiles(input, { limits, onStatus }) {
1031
1031
  }
1032
1032
  };
1033
1033
  }
1034
- if (finalFiles.length > 0 && !finalFiles.some((f) => f.path === "index.html")) {
1035
- const details = "There's no index.html at the top of what you chose. It's the page visitors see first, so your site needs one there.";
1036
- return failure({
1037
- title: CANT_DEPLOY,
1038
- details,
1039
- sourceName,
1040
- files: applyStatus(finalFiles, FileValidationStatus.VALIDATION_FAILED, details)
1041
- });
1042
- }
1043
1034
  const validation = validateFiles(finalFiles.map(toValidatable), limits);
1044
1035
  const validated = finalFiles.map((file, i) => ({
1045
1036
  ...file,
@@ -1050,36 +1041,23 @@ async function processFiles(input, { limits, onStatus }) {
1050
1041
  const issues = validation.errors.map((e) => e.message);
1051
1042
  return failure({
1052
1043
  title: CANT_DEPLOY,
1053
- ...issues.length === 1 ? { details: issues[0] } : { details: `${issues.length} files refused`, errors: issues },
1044
+ ...issues.length === 1 ? { details: issues[0] } : { details: `${issues.length} things to fix`, errors: issues },
1054
1045
  files: validated,
1055
1046
  sourceName
1056
1047
  });
1057
1048
  }
1058
1049
  const readyCount = validated.filter((f) => f.status === FileValidationStatus.READY).length;
1059
1050
  const warnings = validation.warnings.map((w) => w.message);
1060
- if (readyCount > 0) {
1061
- let details = `${pluralize(readyCount, "file", "files", true)} ready`;
1062
- if (validation.warnings.length > 0) {
1063
- details += ` (${pluralize(validation.warnings.length, "empty file", "empty files", true)} excluded)`;
1064
- }
1065
- return {
1066
- phase: "ready",
1067
- files: validated,
1068
- sourceName,
1069
- needsBuild: false,
1070
- status: { title: "Ready", details, ...warnings.length ? { warnings } : {} }
1071
- };
1051
+ let details = `${pluralize(readyCount, "file", "files", true)} ready`;
1052
+ if (validation.warnings.length > 0) {
1053
+ details += ` (${pluralize(validation.warnings.length, "empty file", "empty files", true)} excluded)`;
1072
1054
  }
1073
1055
  return {
1074
1056
  phase: "ready",
1075
1057
  files: validated,
1076
1058
  sourceName,
1077
1059
  needsBuild: false,
1078
- status: {
1079
- title: "All files excluded",
1080
- details: `${pluralize(validation.warnings.length, "file", "files", true)} excluded (empty files cannot be deployed)`,
1081
- warnings
1082
- }
1060
+ status: { title: "Ready", details, ...warnings.length ? { warnings } : {} }
1083
1061
  };
1084
1062
  } catch (error) {
1085
1063
  const message = error instanceof Error ? error.message : String(error);