Refresh the homepage and improve export and draft guidance

This commit is contained in:
2026-10-04 17:48:39 +05:00
parent 04cc4f39f6
commit 244d27a309
33 changed files with 2110 additions and 215 deletions

View File

@@ -0,0 +1,9 @@
import dev.minegeo.plugin.UploadClient;
import com.google.gson.JsonParser;
import java.nio.file.*;
public class UploadSmoke {
public static void main(String[] args) throws Exception {
String token=JsonParser.parseString(Files.readString(Path.of(args[2]))).getAsJsonObject().get("token").getAsString();
new UploadClient(args[0],token).upload(Path.of(args[1]),message->System.out.println(message),()->false);
}
}

View File

@@ -46,6 +46,29 @@ test("dataset requires five unique in-bounds viewpoints and safe paths", () => {
assets: [{ path: "terrain.json.gz", sha256: "a".repeat(64), bytes: 100 }],
};
assert.equal(datasetSchema.safeParse(base).success, true);
assert.equal(datasetSchema.safeParse({ ...base, assets: [] }).success, false);
assert.equal(
datasetSchema.safeParse({ ...base, source: "fabric" }).success,
false,
);
const capture = {
...base,
source: "fabric",
assets: [
"map.png",
...base.viewpoints.flatMap((point) =>
["px", "nx", "py", "ny", "pz", "nz"].map(
(face) => `${point.id}/${face}.png`,
),
),
].map((path) => ({ path, sha256: "a".repeat(64), bytes: 100 })),
};
assert.equal(datasetSchema.safeParse(capture).success, true);
assert.equal(
datasetSchema.safeParse({ ...capture, assets: capture.assets.slice(1) })
.success,
false,
);
assert.equal(
datasetSchema.safeParse({ ...base, viewpoints: base.viewpoints.slice(1) })
.success,