@volter/blender-engine 0.1.34 → 0.1.35
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.
|
@@ -99,7 +99,7 @@ interface WaliProgram {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
interface RuntimeIndex {
|
|
102
|
-
files: { path: string; size: number; mode: number }[];
|
|
102
|
+
files: { path: string; size: number; mode: number; sha256: string }[];
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
/** The substrate, as modules this editor serves. `@vite-ignore` because the
|
|
@@ -261,7 +261,8 @@ async function installedRuntime(
|
|
|
261
261
|
const text = await indexAnswer.text();
|
|
262
262
|
const index = JSON.parse(text) as RuntimeIndex;
|
|
263
263
|
// The tree's version is its index: the same files at the same sizes and modes, in the same order,
|
|
264
|
-
//
|
|
264
|
+
// each with its content's SHA-256, so a file rebuilt with different bytes is a new version
|
|
265
|
+
// whatever its size and time.
|
|
265
266
|
const digest = new Uint8Array(await crypto.subtle.digest('SHA-256', new TextEncoder().encode(text)));
|
|
266
267
|
const tag = [...digest.slice(0, 12)].map((byte) => byte.toString(16).padStart(2, '0')).join('');
|
|
267
268
|
const projectId = `${RUNTIME_STORE_FAMILY}${tag}`;
|