peachsim 0.1.2776 → 0.1.2778

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.
Files changed (150) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/attached-projects.cjs +1 -1
  4. package/dist-lib/auth/shared-session.cjs +1 -1
  5. package/dist-lib/backend-origin.cjs +1 -1
  6. package/dist-lib/beta.cjs +1 -1
  7. package/dist-lib/beta.mjs +2 -2
  8. package/dist-lib/bridge-constants.cjs +1 -1
  9. package/dist-lib/bridge-contract-input.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.mjs +5 -5
  11. package/dist-lib/bridge-contract.cjs +1 -1
  12. package/dist-lib/bridge-contract.mjs +3 -3
  13. package/dist-lib/bundle-channel.cjs +382 -367
  14. package/dist-lib/capture-contract.cjs +1 -1
  15. package/dist-lib/capture-contract.mjs +3 -3
  16. package/dist-lib/cloud-contract.cjs +1 -1
  17. package/dist-lib/cloud-contract.mjs +3 -3
  18. package/dist-lib/cloud-test-args.cjs +1 -1
  19. package/dist-lib/cloud-test-args.mjs +2 -2
  20. package/dist-lib/cloud.cjs +1 -1
  21. package/dist-lib/cloud.mjs +7 -7
  22. package/dist-lib/config.cjs +1 -1
  23. package/dist-lib/config.mjs +5 -5
  24. package/dist-lib/detox/index.cjs +2 -2
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/esm-chunks/{acorn-IHHNENTV.mjs → acorn-RWBIRNWO.mjs} +3 -3
  27. package/dist-lib/esm-chunks/{chunk-2TRDAQRU.mjs → chunk-3RPELUA2.mjs} +36 -14
  28. package/dist-lib/esm-chunks/{chunk-36HOGKZO.mjs → chunk-3WQANOYY.mjs} +1 -1
  29. package/dist-lib/esm-chunks/{chunk-JDQEHVXK.mjs → chunk-5TIUTQ55.mjs} +1 -1
  30. package/dist-lib/esm-chunks/{chunk-NJM5HDIY.mjs → chunk-5WASPTSS.mjs} +1 -1
  31. package/dist-lib/esm-chunks/{chunk-O3DUF5LK.mjs → chunk-6YHF4VYF.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-EYYLB42E.mjs → chunk-DLBUPWTI.mjs} +1 -1
  33. package/dist-lib/esm-chunks/{chunk-XQUTZ3B5.mjs → chunk-EXU474NE.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-JUQ54SX6.mjs → chunk-F3OPIKJC.mjs} +2 -2
  35. package/dist-lib/esm-chunks/{chunk-M7TINJ53.mjs → chunk-G7UJ4BAC.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-RPKBYOUS.mjs → chunk-GSTHJQMW.mjs} +16 -6
  37. package/dist-lib/esm-chunks/{chunk-OM6U2RS3.mjs → chunk-IQSFMB4R.mjs} +4 -4
  38. package/dist-lib/esm-chunks/{chunk-QOWIQPRI.mjs → chunk-K3ULPN2R.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-JHFUDZ3W.mjs → chunk-KBYVKTVK.mjs} +3 -3
  40. package/dist-lib/esm-chunks/{chunk-H3YX4XO2.mjs → chunk-KLA74B7J.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-UQFQZLHK.mjs → chunk-KX7LV722.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-2IFXQO2K.mjs → chunk-LQVLXDRN.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-PLCLVIAA.mjs → chunk-MRIDS3GE.mjs} +5 -5
  44. package/dist-lib/esm-chunks/{chunk-HA4BLBFF.mjs → chunk-N2PEXZGL.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-BB6SVIH3.mjs → chunk-QKTKE4OX.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-YNMAR7R2.mjs → chunk-QUVLFF6I.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-D5UZSYPE.mjs → chunk-VZ3NXXUC.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-RCESKORX.mjs → chunk-X25PQNNH.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-Z6UVYLRY.mjs → chunk-ZDWMPXYI.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{chunk-3XQGFH5D.mjs → chunk-ZWOS2EDN.mjs} +65 -75
  51. package/dist-lib/esm-chunks/{metro-layout-parser-IA2YCSEY.mjs → metro-layout-parser-RRIZOLBE.mjs} +3 -3
  52. package/dist-lib/esm-chunks/{swift-package-prebuilt-TL66ITNV.mjs → swift-package-prebuilt-EIZ7MCKR.mjs} +12 -12
  53. package/dist-lib/esm-chunks/{swift-sdk-app-module-K7Y4YRW3.mjs → swift-sdk-app-module-S2LQ4OXD.mjs} +16 -16
  54. package/dist-lib/esm-chunks/{swift-sdk-image-ZKK3YV3Y.mjs → swift-sdk-image-77FFUGXI.mjs} +16 -16
  55. package/dist-lib/esm-chunks/{swift-sdk-image-producer-Q4ENQ4FM.mjs → swift-sdk-image-producer-XFSFUXQJ.mjs} +5 -5
  56. package/dist-lib/expo-swift-bundle.cjs +304 -289
  57. package/dist-lib/expo-swift-metadata.cjs +1 -1
  58. package/dist-lib/expo-swift-metadata.mjs +7 -7
  59. package/dist-lib/home-paths.cjs +1 -1
  60. package/dist-lib/host/bridge-host.cjs +442 -422
  61. package/dist-lib/host/fetch-proxy-handler.cjs +100 -87
  62. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  63. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  64. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  65. package/dist-lib/host/websocket-proxy.cjs +1 -1
  66. package/dist-lib/index.cjs +1 -1
  67. package/dist-lib/kotlin-host.cjs +1 -1
  68. package/dist-lib/menu.cjs +1 -1
  69. package/dist-lib/menu.mjs +3 -3
  70. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  71. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  72. package/dist-lib/metro-production-bundle.cjs +1 -1
  73. package/dist-lib/metro-production-bundle.mjs +4 -4
  74. package/dist-lib/native-app-identity-project.cjs +20 -15
  75. package/dist-lib/native-app-identity-project.mjs +27 -32
  76. package/dist-lib/native-app-identity.cjs +1 -1
  77. package/dist-lib/native-app-identity.mjs +6 -6
  78. package/dist-lib/native-firebase-metadata.cjs +1 -1
  79. package/dist-lib/native-firebase-metadata.mjs +3 -3
  80. package/dist-lib/pdfium-raster.cjs +1 -1
  81. package/dist-lib/pdfium-raster.mjs +2 -2
  82. package/dist-lib/plist.cjs +1 -1
  83. package/dist-lib/plist.mjs +3 -3
  84. package/dist-lib/profiles.cjs +1 -1
  85. package/dist-lib/public-brand.cjs +1 -1
  86. package/dist-lib/public-origins-lib-esm.json +86 -85
  87. package/dist-lib/public-origins-lib.json +71 -64
  88. package/dist-lib/react-native-host-modules.cjs +1 -1
  89. package/dist-lib/react-native-host-modules.mjs +2 -2
  90. package/dist-lib/reap-browser.cjs +1 -1
  91. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  92. package/dist-lib/sdk.cjs +1 -1
  93. package/dist-lib/sdk.mjs +8 -8
  94. package/dist-lib/skills.cjs +481 -461
  95. package/dist-lib/swift-compile.cjs +91 -62
  96. package/dist-lib/swift-compile.mjs +12 -12
  97. package/dist-lib/swift-package.cjs +1 -1
  98. package/dist-lib/swift-package.mjs +3 -3
  99. package/dist-lib/swift-submit.cjs +1 -1
  100. package/dist-lib/swift-submit.mjs +6 -6
  101. package/dist-lib/swift-svg-raster.cjs +1 -1
  102. package/dist-lib/swift-svg-raster.mjs +2 -2
  103. package/dist-lib/swift-toolchain.cjs +1 -1
  104. package/dist-lib/swift.cjs +1 -1
  105. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  106. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  107. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  108. package/dist-lib/vendor/acorn.cjs +1 -1
  109. package/dist-lib/vendor/magic-string.cjs +1 -1
  110. package/dist-lib/vendor/stream-json.cjs +1 -1
  111. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  112. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  113. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase.cjs +1 -1
  116. package/dist-lib/vendor/terser.cjs +1 -1
  117. package/dist-lib/vendor/valibot.cjs +1 -1
  118. package/dist-lib/vendor/ws.cjs +1 -1
  119. package/dist-lib/vendor/zod.cjs +1 -1
  120. package/dist-lib/worklet-executable.cjs +1 -1
  121. package/dist-lib/worklet-executable.mjs +3 -3
  122. package/dist-types/packages/peach-engine/core-abi/web/sceneClientContract.d.ts +0 -6
  123. package/dist-types/packages/peach-engine/src/components/native-ui/webview-frame-bridge.d.ts +0 -3
  124. package/dist-types/packages/peach-engine/src/engine/native-app-catalog.d.ts +1 -0
  125. package/dist-types/packages/peach-engine/src/engine/native-app-font-config.d.ts +3 -1
  126. package/dist-types/packages/peach-engine/src/render-worker/native-anim-driven-slots.d.ts +0 -1
  127. package/dist-types/packages/peach-engine/src/render-worker/native-text-input-runtime.d.ts +0 -42
  128. package/dist-types/packages/peach-engine/src/render-worker/nativeAnimMirrorContract.d.ts +1 -8
  129. package/dist-types/packages/peach-engine/src/render-worker/nativeTransitionContract.d.ts +1 -15
  130. package/dist-types/packages/peach-engine/src/render-worker/shellScrollContract.d.ts +0 -6
  131. package/dist-types/packages/peach-engine/src/webview-automation-host.d.ts +0 -4
  132. package/package.json +1 -1
  133. package/runtime-companion.json +1 -1
  134. package/src/bazel-project.ts +2 -6
  135. package/src/build-cache.ts +3 -2
  136. package/src/sha256.ts +8 -0
  137. package/src/swift-coverage/indexing.ts +3 -4
  138. package/src/swift-coverage/package.ts +1 -4
  139. package/src/swift-coverage/reader.ts +1 -4
  140. package/src/swift-coverage/source.ts +1 -4
  141. package/src/swift-coverage/xcode-assets.ts +1 -4
  142. package/src/swift-coverage/xcode-bridging.ts +1 -4
  143. package/src/swift-coverage/xcode-packages.ts +1 -4
  144. package/src/swift-coverage/xcode-strings.ts +1 -4
  145. package/src/swift-coverage/xcode.ts +1 -4
  146. package/src/swift-guest-dyld-table.ts +1 -6
  147. package/src/swift-guest-source-inputs.ts +3 -15
  148. package/src/swift-objc-compile.ts +2 -7
  149. package/src/swift-sdk-image.ts +50 -12
  150. package/src/swift-wasm-prune.ts +3 -9
@@ -1,5 +1,4 @@
1
1
  import { execFileSync } from 'node:child_process'
2
- import { createHash } from 'node:crypto'
3
2
  import {
4
3
  existsSync,
5
4
  mkdirSync,
@@ -11,6 +10,7 @@ import {
11
10
  } from 'node:fs'
12
11
  import path from 'node:path'
13
12
  import { PEACH_FORKED_SCRIPT_ENV } from './forked-script-contract'
13
+ import { sha256Hex } from './sha256'
14
14
  import {
15
15
  libraryArchiveTarget,
16
16
  prebuiltSourceObjectPath,
@@ -115,12 +115,6 @@ function clangBinaryStamp(file: string): string {
115
115
  return [file, stat.size, stat.mtimeNs].join(':')
116
116
  }
117
117
 
118
- function sha256Hex(bytes: Buffer | string): string {
119
- if (typeof Bun !== 'undefined')
120
- return new Bun.CryptoHasher('sha256').update(bytes).digest('hex')
121
- return createHash('sha256').update(bytes).digest('hex')
122
- }
123
-
124
118
  function clangWrapperStamp(file: string): string {
125
119
  return sha256Hex(readFileSync(file))
126
120
  }
@@ -643,10 +637,7 @@ export function sourceGuestRuntimeLinks(options: {
643
637
  const file = path.resolve(directory, alias.moduleMap)
644
638
  if (!file.startsWith(directory + path.sep))
645
639
  throw new Error(`invalid framework module map ${alias.moduleMap}`)
646
- if (
647
- createHash('sha256').update(readFileSync(file)).digest('hex') !==
648
- alias.moduleMapSha256
649
- )
640
+ if (sha256Hex(readFileSync(file)) !== alias.moduleMapSha256)
650
641
  throw new Error(`framework module map changed ${alias.moduleMap}`)
651
642
  sdkAliases.set(alias.name, {
652
643
  product: product.id,
@@ -712,10 +703,7 @@ export function sourceGuestRuntimeLinks(options: {
712
703
  const map = path.resolve(root, alias.moduleMap)
713
704
  if (!map.startsWith(root + path.sep))
714
705
  throw new Error(`invalid framework module map ${alias.moduleMap}`)
715
- if (
716
- createHash('sha256').update(readFileSync(map)).digest('hex') !==
717
- alias.moduleMapSha256
718
- )
706
+ if (sha256Hex(readFileSync(map)) !== alias.moduleMapSha256)
719
707
  throw new Error(`framework module map changed ${alias.moduleMap}`)
720
708
  frameworkAliases.set(alias.name, { kind: 'package', targets: closure(alias.targets) })
721
709
  }
@@ -1,9 +1,10 @@
1
1
  import { spawn, spawnSync } from 'node:child_process'
2
- import { createHash, randomUUID } from 'node:crypto'
2
+ import { randomUUID } from 'node:crypto'
3
3
  import fs from 'node:fs'
4
4
  import path from 'node:path'
5
5
  import { mapLimit } from '../../../src/helpers/mapLimit.ts'
6
6
  import { isRecord } from './is-record'
7
+ import { sha256Hex } from './sha256'
7
8
  import { swiftClangImporterFlags } from './swift-objc-import'
8
9
  import { swiftObjCRuntimeFlags } from './swift-objc-runtime'
9
10
  import { iosDeploymentMinimum, objcSdkIntakeFlags } from './swift-objc-standin'
@@ -252,12 +253,6 @@ function compiledFrameworkImports(
252
253
  return imports
253
254
  }
254
255
 
255
- function sha256Hex(bytes: Buffer | string): string {
256
- if (typeof Bun !== 'undefined')
257
- return new Bun.CryptoHasher('sha256').update(bytes).digest('hex')
258
- return createHash('sha256').update(bytes).digest('hex')
259
- }
260
-
261
256
  function regularFileStamp(file: string): string | null {
262
257
  const stat = fs.lstatSync(file, { bigint: true, throwIfNoEntry: false })
263
258
  if (!stat || !stat.isFile()) return null
@@ -204,6 +204,15 @@ export function swiftSdkImageKey(
204
204
  .slice(0, 32)
205
205
  }
206
206
 
207
+ function swiftSdkImageVariantKey(baseKey: string, required: readonly string[]): string {
208
+ if (!required.length) return baseKey
209
+ return createHash('sha256')
210
+ .update(baseKey)
211
+ .update(JSON.stringify(required))
212
+ .digest('hex')
213
+ .slice(0, 32)
214
+ }
215
+
207
216
  const IMAGE_FILE = 'sdk.wasm'
208
217
  const IMAGE_DIGEST = 'sdk.sha256'
209
218
 
@@ -299,16 +308,39 @@ export async function buildSwiftSdkImage(
299
308
  moduleRoot: string,
300
309
  scopedLookups = false,
301
310
  frameworkImports: readonly string[] = [],
302
- options?: { producer?: boolean; signal?: AbortSignal },
311
+ options?: {
312
+ producer?: boolean
313
+ signal?: AbortSignal
314
+ requiredGuestSymbols?: readonly string[]
315
+ },
303
316
  ): Promise<SwiftSdkImage> {
304
317
  const { imports, products } = swiftSdkImageProducts(moduleRoot, frameworkImports)
305
- const key = swiftSdkImageKey(moduleRoot, scopedLookups, products)
306
- const directory = path.join(swiftCacheDir(), 'swift-sdk-images', key)
318
+ const images = path.join(swiftCacheDir(), 'swift-sdk-images')
319
+ const baseKey = swiftSdkImageKey(moduleRoot, scopedLookups, products)
320
+ const required = [...new Set(options?.requiredGuestSymbols)].sort()
321
+ const base = cached(path.join(images, baseKey), baseKey)
322
+ if (base) {
323
+ if (!required.length) return base
324
+ const { functions, data, tls } = base.sdkInterface
325
+ if (
326
+ required.every(
327
+ (name) =>
328
+ functions[name] !== undefined ||
329
+ data[name] !== undefined ||
330
+ tls[name] !== undefined,
331
+ )
332
+ )
333
+ return base
334
+ }
335
+ const key = swiftSdkImageVariantKey(baseKey, required)
336
+ const directory = path.join(images, key)
307
337
  const existing = cached(directory, key)
308
338
  if (existing) return existing
339
+ const distribution = swiftDistributionAt(moduleRoot)
309
340
  if (
310
341
  !options?.producer &&
311
- !swiftDistributionAt(moduleRoot) &&
342
+ !required.length &&
343
+ !distribution &&
312
344
  path.resolve(moduleRoot) === sourceSwiftCheckout() &&
313
345
  process.platform === 'linux' &&
314
346
  process.env.TM_SESSION
@@ -335,7 +367,7 @@ export async function buildSwiftSdkImage(
335
367
  withSwiftRootLock(directory, async () => {
336
368
  const previous = cached(directory, key)
337
369
  if (previous) return previous
338
- if (swiftDistributionAt(moduleRoot)) {
370
+ if (distribution && !required.length) {
339
371
  const entry = swiftSdkImageEntry(key, scopedLookups)
340
372
  const fetched = fetchNativeEntry('sdk-image', entry.name, entry.key)
341
373
  if (fetched) {
@@ -376,6 +408,7 @@ export async function buildSwiftSdkImage(
376
408
  work,
377
409
  scopedLookups,
378
410
  imports,
411
+ required,
379
412
  releaseFrameworks,
380
413
  ),
381
414
  )
@@ -393,6 +426,7 @@ async function linkSwiftSdkImage(
393
426
  work: string,
394
427
  scopedLookups: boolean,
395
428
  imports: readonly string[],
429
+ required: readonly string[],
396
430
  releaseFrameworks: () => void,
397
431
  ): Promise<SwiftSdkImage> {
398
432
  rmSync(work, { recursive: true, force: true })
@@ -579,7 +613,12 @@ async function linkSwiftSdkImage(
579
613
  const quote = (value: string) => JSON.stringify(value)
580
614
  writeFileSync(
581
615
  path.join(work, 'exports.rsp'),
582
- [...defined].map((name) => quote(`--export-if-defined=${name}`)).join('\n'),
616
+ [
617
+ ...[...defined].map((name) => quote(`--export-if-defined=${name}`)),
618
+ ...required
619
+ .filter((name) => !defined.has(name))
620
+ .map((name) => quote(`--export=${name}`)),
621
+ ].join('\n'),
583
622
  )
584
623
  const guestServices = path.join(work, 'peach-guest-services.allow')
585
624
  writeFileSync(guestServices, peachGuestServiceAllowlist)
@@ -674,13 +713,12 @@ async function linkSwiftSdkImage(
674
713
  ? new Bun.CryptoHasher('sha256').update(image).digest('hex')
675
714
  : createHash('sha256').update(image).digest('hex'),
676
715
  )
677
- if (
678
- swiftSdkImageKey(
679
- moduleRoot,
680
- scopedLookups,
681
- swiftSdkImageProducts(moduleRoot, imports).products,
682
- ) !== key
716
+ const baseKey = swiftSdkImageKey(
717
+ moduleRoot,
718
+ scopedLookups,
719
+ swiftSdkImageProducts(moduleRoot, imports).products,
683
720
  )
721
+ if (swiftSdkImageVariantKey(baseKey, required) !== key)
684
722
  throw new Error('Swift SDK image inputs changed during compilation')
685
723
  for (const name of readdirSync(work))
686
724
  if (!SWIFT_SDK_IMAGE_FILES.includes(name))
@@ -22,6 +22,7 @@ import { createHash } from 'node:crypto'
22
22
  import fs from 'node:fs'
23
23
  import path from 'node:path'
24
24
  import * as v from 'valibot'
25
+ import { sha256Hex } from './sha256'
25
26
  import { NATIVE_ARCHIVE_OBJECTS_DIR } from './swift-guest-source-plan'
26
27
  import { OBJC_RUNTIME_LOOKUP_SECTION } from './swift-link-roots'
27
28
  import { referencedResourceClasses } from './swift-resource-class-names'
@@ -39,12 +40,6 @@ import {
39
40
 
40
41
  export { localizeDefinedWasmSymbols, readArMembers }
41
42
 
42
- function sha256Hex(bytes: Uint8Array | Buffer): string {
43
- if (typeof Bun !== 'undefined')
44
- return new Bun.CryptoHasher('sha256').update(bytes).digest('hex')
45
- return createHash('sha256').update(bytes).digest('hex')
46
- }
47
-
48
43
  function readULEB(b: Uint8Array, o: number): [number, number] {
49
44
  let res = 0
50
45
  let shift = 0
@@ -1339,7 +1334,6 @@ export function swiftArchiveMemberProducts(
1339
1334
  }
1340
1335
  return result
1341
1336
  }
1342
- const hash = (bytes: Uint8Array) => createHash('sha256').update(bytes).digest('hex')
1343
1337
  const names = new Set(selected.map((origin) => origin.member))
1344
1338
  const matches = new Map<string, (SwiftArchiveProduct & { ordinal: number })[]>()
1345
1339
  for (const product of products) {
@@ -1348,7 +1342,7 @@ export function swiftArchiveMemberProducts(
1348
1342
  if (!names.has(member.name)) continue
1349
1343
  const ordinal = (counts.get(member.name) ?? 0) + 1
1350
1344
  counts.set(member.name, ordinal)
1351
- const key = `${member.name}\0${hash(member.bytes)}`
1345
+ const key = `${member.name}\0${sha256Hex(member.bytes)}`
1352
1346
  const group = matches.get(key) ?? []
1353
1347
  group.push({ ...product, ordinal })
1354
1348
  matches.set(key, group)
@@ -1362,7 +1356,7 @@ export function swiftArchiveMemberProducts(
1362
1356
  throw new Error(
1363
1357
  `missing SDK archive member ${original.archive}(${original.member})`,
1364
1358
  )
1365
- const sha256 = hash(source.bytes)
1359
+ const sha256 = sha256Hex(source.bytes)
1366
1360
  return {
1367
1361
  original,
1368
1362
  sha256,