feat: добавить генерацию image variants
- добавлен shared config presets, custom transforms и allowlist hosts - реализованы Backend endpoints для assets, presets и variants - добавлена orchestration через PostgreSQL, RabbitMQ, S3 и worker - обновлён Gateway read-through flow с L1 cache и корректным Vary: Accept - добавлена миграция resize_mode для variants lookup - обновлены dev scripts, env template, lockfile и документация
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
export { createDatabase, createDatabasePool } from "./client.js"
|
||||
export type { Database, DatabasePool } from "./client.js"
|
||||
export * from "./schema.js"
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
export const assetStatusEnum = pgEnum("asset_status", ["active", "disabled", "deleted"])
|
||||
export const variantFormatEnum = pgEnum("variant_format", ["avif", "webp", "jpg", "png"])
|
||||
export const requestedFormatEnum = pgEnum("requested_format", ["auto", "avif", "webp", "jpg", "png"])
|
||||
export const resizeModeEnum = pgEnum("resize_mode", ["fit", "fill"])
|
||||
export const variantStatusEnum = pgEnum("variant_status", ["pending", "processing", "ready", "failed"])
|
||||
|
||||
const timestamps = {
|
||||
@@ -86,6 +87,7 @@ export const imageVariants = pgTable(
|
||||
format: variantFormatEnum("format").notNull(),
|
||||
width: integer("width").notNull(),
|
||||
height: integer("height"),
|
||||
resizeMode: resizeModeEnum("resize_mode").notNull().default("fit"),
|
||||
quality: integer("quality").notNull(),
|
||||
s3Key: text("s3_key").notNull(),
|
||||
contentType: text("content_type"),
|
||||
@@ -103,6 +105,8 @@ export const imageVariants = pgTable(
|
||||
table.assetVersion,
|
||||
table.preset,
|
||||
table.width,
|
||||
table.height,
|
||||
table.resizeMode,
|
||||
table.quality,
|
||||
table.format,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user