@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.js
CHANGED
|
@@ -271,11 +271,12 @@ function rebase(line, base) {
|
|
|
271
271
|
const pattern = line.replace(/(\\ )? *$/, (_, escaped) => escaped ?? "");
|
|
272
272
|
if (pattern === "" || pattern.startsWith("#")) return null;
|
|
273
273
|
if (base === "") return pattern;
|
|
274
|
+
const folder = base.replace(/[\\*?[\]]/g, "\\$&").replace(/^[#!]/, "\\$&");
|
|
274
275
|
const negated = pattern.startsWith("!");
|
|
275
276
|
let body = negated ? pattern.slice(1) : pattern;
|
|
276
277
|
const directoryOnly = body.endsWith("/");
|
|
277
278
|
if (directoryOnly) body = body.slice(0, -1);
|
|
278
|
-
const rebased = body.includes("/") ? `${
|
|
279
|
+
const rebased = body.includes("/") ? `${folder}/${body.replace(/^\//, "")}` : `${folder}/**/${body}`;
|
|
279
280
|
return `${negated ? "!" : ""}${rebased}${directoryOnly ? "/" : ""}`;
|
|
280
281
|
}
|
|
281
282
|
async function projectSource(files) {
|
|
@@ -1023,7 +1024,7 @@ async function processFiles(input, { limits, onStatus }) {
|
|
|
1023
1024
|
};
|
|
1024
1025
|
}
|
|
1025
1026
|
if (finalFiles.length > 0 && !finalFiles.some((f) => f.path === "index.html")) {
|
|
1026
|
-
const details = "There's no index.html at the top of what you
|
|
1027
|
+
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.";
|
|
1027
1028
|
return failure({
|
|
1028
1029
|
title: CANT_DEPLOY,
|
|
1029
1030
|
details,
|
|
@@ -1076,7 +1077,7 @@ async function processFiles(input, { limits, onStatus }) {
|
|
|
1076
1077
|
const message = error instanceof Error ? error.message : String(error);
|
|
1077
1078
|
return failure({
|
|
1078
1079
|
title: COULDNT_PREPARE,
|
|
1079
|
-
details:
|
|
1080
|
+
details: message,
|
|
1080
1081
|
sourceName
|
|
1081
1082
|
});
|
|
1082
1083
|
}
|