@crombolo/server 0.34.0 → 0.35.2

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.
package/src/settings.ts CHANGED
@@ -442,6 +442,14 @@ const DECLARED = [
442
442
  section: 'Media',
443
443
  description: 'Where uploaded files live on this disk, served at `/media/`.',
444
444
  },
445
+ {
446
+ env: 'CROMBOLO_MEDIA_CACHE_MB',
447
+ kind: 'number',
448
+ default: '64',
449
+ section: 'Media',
450
+ description:
451
+ 'How much memory, in megabytes, each server gives to the media items it has used most recently. Others are looked up when asked for.',
452
+ },
445
453
  {
446
454
  env: 'CROMBOLO_MEDIA_STORE',
447
455
  kind: 'enum',
package/src/site-file.ts CHANGED
@@ -16,12 +16,12 @@ import {
16
16
  BUNDLE_SECTIONS,
17
17
  type BundleFile,
18
18
  type BundlePackageInfo,
19
- blobPath,
20
19
  bundleIdFor,
21
20
  bundlePackageJson,
22
21
  exportBundle,
23
22
  exportPeople,
24
23
  MANIFEST_FILE,
24
+ mediaPath,
25
25
  newSeal,
26
26
  packageNameFor,
27
27
  planStreamedBundle,
@@ -242,7 +242,7 @@ export async function exportSite(
242
242
  let bytes = 0
243
243
  try {
244
244
  const small = new Map(planned.files.map((file) => [file.path, file]))
245
- const blobs = new Map(planned.blobs.map((key) => [blobPath(key), key]))
245
+ const blobs = new Map(planned.blobs.map((key) => [mediaPath(key), key]))
246
246
  const paths = [...small.keys(), ...blobs.keys()].sort((a, b) => a.localeCompare(b))
247
247
  for (const path of paths) {
248
248
  hasher.update(path)