@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
- // and its newest file's time (`runtimeTag`'s validator), so a file rebuilt at the same size is a new version.
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}`;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@volter/blender-engine",
3
3
  "author": "Volter AI, Inc.",
4
4
  "license": "GPL-3.0-or-later",
5
- "version": "0.1.34",
5
+ "version": "0.1.35",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },