Keep long G-code execution running past full planner queue
This commit is contained in:
@@ -2,18 +2,18 @@ const EVENT_SCHEMA = "event-log.v1";
|
||||
const SNAPSHOT_SCHEMA = "snapshot.v1";
|
||||
const REPLAY_SCHEMA = "replay-timeline.v1";
|
||||
|
||||
export function canonicalJson(value) {
|
||||
export function canonicalJson(value, path = "$") {
|
||||
if (value === null) return "null";
|
||||
if (typeof value === "number") {
|
||||
if (!Number.isFinite(value)) throw new Error("canonical_nonfinite");
|
||||
return JSON.stringify(value);
|
||||
}
|
||||
if (typeof value !== "object") {
|
||||
if (typeof value === "undefined" || typeof value === "function" || typeof value === "symbol") throw new Error("canonical_unsupported");
|
||||
if (typeof value === "undefined" || typeof value === "function" || typeof value === "symbol") throw new Error(`canonical_unsupported:${path}`);
|
||||
return JSON.stringify(value);
|
||||
}
|
||||
if (Array.isArray(value)) return `[${value.map(canonicalJson).join(",")}]`;
|
||||
return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson(value[key])}`).join(",")}}`;
|
||||
if (Array.isArray(value)) return `[${value.map((item, index) => canonicalJson(item, `${path}[${index}]`)).join(",")}]`;
|
||||
return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson(value[key], `${path}.${key}`)}`).join(",")}}`;
|
||||
}
|
||||
|
||||
export function fnv1a64(value) {
|
||||
|
||||
Reference in New Issue
Block a user