@shipstatic/drop 2.13.0-beta.2 → 2.13.0-beta.4
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/README.md +1 -1
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -188,7 +188,7 @@ const ready = drop.files.filter(f => f.status === FileValidationStatus.READY);
|
|
|
188
188
|
|
|
189
189
|
## Build on upload
|
|
190
190
|
|
|
191
|
-
Drop recognises an unbuilt project (source files with `package.json` / `node_modules`) and sets `needsBuild`.
|
|
191
|
+
Drop recognises an unbuilt project (source files with `package.json` / `node_modules`) and sets `needsBuild`. `node_modules` stays behind (it is skipped during traversal and stripped from folder-picker selections), and so does whatever the project's `.gitignore` lists, read the way git reads it, so an old `dist/` the project ignores never rides along. A project's source isn't the site, so neither the entry-point check nor deploy validation applies to it: Astro, Next.js, SvelteKit and Eleventy have no `index.html` until they are built. Every file goes straight to `ready`, and the build gives the verdict.
|
|
192
192
|
|
|
193
193
|
Pass the signal through to the SDK:
|
|
194
194
|
|
package/dist/index.cjs
CHANGED
|
@@ -277,11 +277,13 @@ 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
|
-
|
|
285
|
+
if (body.replace(/^\//, "") === "") return null;
|
|
286
|
+
const rebased = body.includes("/") ? `${folder}/${body.replace(/^\//, "")}` : `${folder}/**/${body}`;
|
|
285
287
|
return `${negated ? "!" : ""}${rebased}${directoryOnly ? "/" : ""}`;
|
|
286
288
|
}
|
|
287
289
|
async function projectSource(files) {
|
|
@@ -1024,7 +1026,7 @@ async function processFiles(input, { limits, onStatus }) {
|
|
|
1024
1026
|
needsBuild: true,
|
|
1025
1027
|
status: {
|
|
1026
1028
|
title: "Ready",
|
|
1027
|
-
details: `${ship.pluralize(ready.length, "file", "files", true)} ready
|
|
1029
|
+
details: `${ship.pluralize(ready.length, "file", "files", true)} ready. We'll build the project.`
|
|
1028
1030
|
}
|
|
1029
1031
|
};
|
|
1030
1032
|
}
|