@crombolo/server 0.34.0 → 0.36.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/package.json +12 -12
- package/src/adapters/audit.ts +1 -0
- package/src/adapters/bundles.ts +5 -4
- package/src/adapters/documents.ts +48 -22
- package/src/bundle-build.ts +7 -1
- package/src/bundle-code.ts +10 -71
- package/src/bundle-media.ts +613 -0
- package/src/bundles.ts +511 -57
- package/src/components.ts +58 -0
- package/src/config.ts +17 -1
- package/src/content-events.ts +11 -6
- package/src/delivery-media.ts +58 -0
- package/src/image-metadata.ts +355 -0
- package/src/imaging.ts +98 -0
- package/src/index.ts +3 -0
- package/src/media-access.ts +337 -0
- package/src/member-auth.ts +24 -3
- package/src/ports.ts +7 -2
- package/src/rate-limit.ts +54 -0
- package/src/schema.ts +78 -8
- package/src/seed/export.ts +16 -6
- package/src/seo.ts +5 -6
- package/src/server.ts +347 -73
- package/src/settings.ts +8 -0
- package/src/site-file.ts +2 -2
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) => [
|
|
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)
|