@shipstatic/drop 2.13.0-beta.0 → 2.13.0-beta.2
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.cjs +4 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -92,9 +92,6 @@ var CLIENT_ONLY_ERROR_TYPES = /* @__PURE__ */ new Set([
|
|
|
92
92
|
ErrorType.Config
|
|
93
93
|
]);
|
|
94
94
|
new Set(Object.values(ErrorType).filter((t) => !CLIENT_ONLY_ERROR_TYPES.has(t)));
|
|
95
|
-
function isShipError(error) {
|
|
96
|
-
return error !== null && typeof error === "object" && "name" in error && error.name === "ShipError" && "status" in error;
|
|
97
|
-
}
|
|
98
95
|
var WEB_FILE_EXTENSIONS = [
|
|
99
96
|
// Markup & documents
|
|
100
97
|
"html",
|
|
@@ -277,7 +274,7 @@ function segments(file) {
|
|
|
277
274
|
return filePath(file).replace(/\\/g, "/").split("/").filter(Boolean);
|
|
278
275
|
}
|
|
279
276
|
function rebase(line, base) {
|
|
280
|
-
const pattern = line.replace(/(
|
|
277
|
+
const pattern = line.replace(/(\\ )? *$/, (_, escaped) => escaped ?? "");
|
|
281
278
|
if (pattern === "" || pattern.startsWith("#")) return null;
|
|
282
279
|
if (base === "") return pattern;
|
|
283
280
|
const negated = pattern.startsWith("!");
|
|
@@ -1032,7 +1029,7 @@ async function processFiles(input, { limits, onStatus }) {
|
|
|
1032
1029
|
};
|
|
1033
1030
|
}
|
|
1034
1031
|
if (finalFiles.length > 0 && !finalFiles.some((f) => f.path === "index.html")) {
|
|
1035
|
-
const details = "
|
|
1032
|
+
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
1033
|
return failure({
|
|
1037
1034
|
title: CANT_DEPLOY,
|
|
1038
1035
|
details,
|
|
@@ -1083,10 +1080,9 @@ async function processFiles(input, { limits, onStatus }) {
|
|
|
1083
1080
|
};
|
|
1084
1081
|
} catch (error) {
|
|
1085
1082
|
const message = error instanceof Error ? error.message : String(error);
|
|
1086
|
-
const isValidation = isShipError(error);
|
|
1087
1083
|
return failure({
|
|
1088
|
-
title:
|
|
1089
|
-
details:
|
|
1084
|
+
title: COULDNT_PREPARE,
|
|
1085
|
+
details: message,
|
|
1090
1086
|
sourceName
|
|
1091
1087
|
});
|
|
1092
1088
|
}
|