@shipstatic/drop 2.13.0-beta.1 → 2.13.0-beta.3
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 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -277,11 +277,12 @@ function rebase(line, base) {
|
|
|
277
277
|
const pattern = line.replace(/(\\ )? *$/, (_, escaped) => escaped ?? "");
|
|
278
278
|
if (pattern === "" || pattern.startsWith("#")) return null;
|
|
279
279
|
if (base === "") return pattern;
|
|
280
|
+
const folder = base.replace(/[\\*?[\]]/g, "\\$&").replace(/^[#!]/, "\\$&");
|
|
280
281
|
const negated = pattern.startsWith("!");
|
|
281
282
|
let body = negated ? pattern.slice(1) : pattern;
|
|
282
283
|
const directoryOnly = body.endsWith("/");
|
|
283
284
|
if (directoryOnly) body = body.slice(0, -1);
|
|
284
|
-
const rebased = body.includes("/") ? `${
|
|
285
|
+
const rebased = body.includes("/") ? `${folder}/${body.replace(/^\//, "")}` : `${folder}/**/${body}`;
|
|
285
286
|
return `${negated ? "!" : ""}${rebased}${directoryOnly ? "/" : ""}`;
|
|
286
287
|
}
|
|
287
288
|
async function projectSource(files) {
|
|
@@ -1029,7 +1030,7 @@ async function processFiles(input, { limits, onStatus }) {
|
|
|
1029
1030
|
};
|
|
1030
1031
|
}
|
|
1031
1032
|
if (finalFiles.length > 0 && !finalFiles.some((f) => f.path === "index.html")) {
|
|
1032
|
-
const details = "There's no index.html at the top of what you
|
|
1033
|
+
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.";
|
|
1033
1034
|
return failure({
|
|
1034
1035
|
title: CANT_DEPLOY,
|
|
1035
1036
|
details,
|
|
@@ -1082,7 +1083,7 @@ async function processFiles(input, { limits, onStatus }) {
|
|
|
1082
1083
|
const message = error instanceof Error ? error.message : String(error);
|
|
1083
1084
|
return failure({
|
|
1084
1085
|
title: COULDNT_PREPARE,
|
|
1085
|
-
details:
|
|
1086
|
+
details: message,
|
|
1086
1087
|
sourceName
|
|
1087
1088
|
});
|
|
1088
1089
|
}
|