@toolproof-npm/shared 0.1.81 → 0.1.82

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.
@@ -35,8 +35,8 @@ export function generateContentAddressedPath(resourceTypeRef, content) {
35
35
  * ```
36
36
  */
37
37
  export function createMaterializedResourceFromPotentialOutput(potentialOutput, content) {
38
- // Generate content-addressed path from the content
39
- const contentString = JSON.stringify(content);
38
+ // Generate content-addressed path from the content (use compact format for hashing)
39
+ const contentString = JSON.stringify(content, null, 2);
40
40
  const path = generateContentAddressedPath(potentialOutput.resourceTypeRef, contentString);
41
41
  return {
42
42
  identity: potentialOutput.identity,
@@ -75,8 +75,8 @@ export function createMaterializedResourceFromPotentialOutput(potentialOutput, c
75
75
  */
76
76
  export function createMaterializedResourceFromScratch(partialResourceMeta, content) {
77
77
  const { identity, resourceTypeRef, creationContext, timestamp } = partialResourceMeta;
78
- // Generate content-addressed path from the content
79
- const contentString = JSON.stringify(content);
78
+ // Generate content-addressed path from the content (use pretty-printed format)
79
+ const contentString = JSON.stringify(content, null, 2);
80
80
  const path = generateContentAddressedPath(resourceTypeRef, contentString);
81
81
  return {
82
82
  identity,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolproof-npm/shared",
3
- "version": "0.1.81",
3
+ "version": "0.1.82",
4
4
  "description": "Core library utilities for ToolProof",
5
5
  "keywords": [
6
6
  "toolproof",