@revealui/core 0.0.0-canary-20260409021642
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/LICENSE +22 -0
- package/README.md +171 -0
- package/dist/api/compression.d.ts +83 -0
- package/dist/api/compression.d.ts.map +1 -0
- package/dist/api/compression.js +233 -0
- package/dist/api/payload-optimization.d.ts +138 -0
- package/dist/api/payload-optimization.d.ts.map +1 -0
- package/dist/api/payload-optimization.js +320 -0
- package/dist/api/rate-limit.d.ts +114 -0
- package/dist/api/rate-limit.d.ts.map +1 -0
- package/dist/api/rate-limit.js +376 -0
- package/dist/api/response-cache.d.ts +125 -0
- package/dist/api/response-cache.d.ts.map +1 -0
- package/dist/api/response-cache.js +335 -0
- package/dist/api/rest.d.ts +54 -0
- package/dist/api/rest.d.ts.map +1 -0
- package/dist/api/rest.js +465 -0
- package/dist/auth/access.d.ts +25 -0
- package/dist/auth/access.d.ts.map +1 -0
- package/dist/auth/access.js +20 -0
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +2 -0
- package/dist/cache/query-cache.d.ts +100 -0
- package/dist/cache/query-cache.d.ts.map +1 -0
- package/dist/cache/query-cache.js +266 -0
- package/dist/caching/index.d.ts +6 -0
- package/dist/caching/index.d.ts.map +1 -0
- package/dist/caching/index.js +5 -0
- package/dist/client/admin/RichText.d.ts +12 -0
- package/dist/client/admin/RichText.d.ts.map +1 -0
- package/dist/client/admin/RichText.js +5 -0
- package/dist/client/admin/components/AdminDashboard.d.ts +7 -0
- package/dist/client/admin/components/AdminDashboard.d.ts.map +1 -0
- package/dist/client/admin/components/AdminDashboard.js +308 -0
- package/dist/client/admin/components/CollectionList.d.ts +16 -0
- package/dist/client/admin/components/CollectionList.d.ts.map +1 -0
- package/dist/client/admin/components/CollectionList.js +67 -0
- package/dist/client/admin/components/DocumentForm.d.ts +11 -0
- package/dist/client/admin/components/DocumentForm.d.ts.map +1 -0
- package/dist/client/admin/components/DocumentForm.js +223 -0
- package/dist/client/admin/components/GlobalForm.d.ts +11 -0
- package/dist/client/admin/components/GlobalForm.d.ts.map +1 -0
- package/dist/client/admin/components/GlobalForm.js +74 -0
- package/dist/client/admin/context/ServerFunctionContext.d.ts +8 -0
- package/dist/client/admin/context/ServerFunctionContext.d.ts.map +1 -0
- package/dist/client/admin/context/ServerFunctionContext.js +15 -0
- package/dist/client/admin/i18n/en.d.ts +25 -0
- package/dist/client/admin/i18n/en.d.ts.map +1 -0
- package/dist/client/admin/i18n/en.js +25 -0
- package/dist/client/admin/index.d.ts +11 -0
- package/dist/client/admin/index.d.ts.map +1 -0
- package/dist/client/admin/index.js +11 -0
- package/dist/client/admin/layout.d.ts +10 -0
- package/dist/client/admin/layout.d.ts.map +1 -0
- package/dist/client/admin/layout.js +7 -0
- package/dist/client/admin/page.d.ts +38 -0
- package/dist/client/admin/page.d.ts.map +1 -0
- package/dist/client/admin/page.js +15 -0
- package/dist/client/admin/utils/apiClient.d.ts +110 -0
- package/dist/client/admin/utils/apiClient.d.ts.map +1 -0
- package/dist/client/admin/utils/apiClient.js +216 -0
- package/dist/client/admin/utils/index.d.ts +5 -0
- package/dist/client/admin/utils/index.d.ts.map +1 -0
- package/dist/client/admin/utils/index.js +4 -0
- package/dist/client/admin/utils/serializeConfig.d.ts +7 -0
- package/dist/client/admin/utils/serializeConfig.d.ts.map +1 -0
- package/dist/client/admin/utils/serializeConfig.js +35 -0
- package/dist/client/hooks.d.ts +18 -0
- package/dist/client/hooks.d.ts.map +1 -0
- package/dist/client/hooks.js +29 -0
- package/dist/client/index.d.ts +11 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +13 -0
- package/dist/client/richtext/RichTextEditor.d.ts +48 -0
- package/dist/client/richtext/RichTextEditor.d.ts.map +1 -0
- package/dist/client/richtext/RichTextEditor.js +360 -0
- package/dist/client/richtext/components/ImageNodeComponent.d.ts +9 -0
- package/dist/client/richtext/components/ImageNodeComponent.d.ts.map +1 -0
- package/dist/client/richtext/components/ImageNodeComponent.js +98 -0
- package/dist/client/richtext/components/ImageUploadButton.d.ts +13 -0
- package/dist/client/richtext/components/ImageUploadButton.d.ts.map +1 -0
- package/dist/client/richtext/components/ImageUploadButton.js +118 -0
- package/dist/client/richtext/index.d.ts +92 -0
- package/dist/client/richtext/index.d.ts.map +1 -0
- package/dist/client/richtext/index.js +74 -0
- package/dist/client/richtext/nodes/DecoratorBlockNode.d.ts +20 -0
- package/dist/client/richtext/nodes/DecoratorBlockNode.d.ts.map +1 -0
- package/dist/client/richtext/nodes/DecoratorBlockNode.js +29 -0
- package/dist/client/richtext/nodes/ImageNode.d.ts +51 -0
- package/dist/client/richtext/nodes/ImageNode.d.ts.map +1 -0
- package/dist/client/richtext/nodes/ImageNode.js +95 -0
- package/dist/client/richtext/plugins/CollaborationPlugin.d.ts +13 -0
- package/dist/client/richtext/plugins/CollaborationPlugin.d.ts.map +1 -0
- package/dist/client/richtext/plugins/CollaborationPlugin.js +8 -0
- package/dist/client/richtext/plugins/CursorsOverlayPlugin.d.ts +4 -0
- package/dist/client/richtext/plugins/CursorsOverlayPlugin.d.ts.map +1 -0
- package/dist/client/richtext/plugins/CursorsOverlayPlugin.js +50 -0
- package/dist/client/richtext/plugins/FloatingToolbarPlugin.d.ts +7 -0
- package/dist/client/richtext/plugins/FloatingToolbarPlugin.d.ts.map +1 -0
- package/dist/client/richtext/plugins/FloatingToolbarPlugin.js +246 -0
- package/dist/client/richtext/plugins/ImagePlugin.d.ts +3 -0
- package/dist/client/richtext/plugins/ImagePlugin.d.ts.map +1 -0
- package/dist/client/richtext/plugins/ImagePlugin.js +73 -0
- package/dist/client/richtext/plugins/PastePlugin.d.ts +2 -0
- package/dist/client/richtext/plugins/PastePlugin.d.ts.map +1 -0
- package/dist/client/richtext/plugins/PastePlugin.js +36 -0
- package/dist/client/richtext/plugins/ToolbarPlugin.d.ts +8 -0
- package/dist/client/richtext/plugins/ToolbarPlugin.d.ts.map +1 -0
- package/dist/client/richtext/plugins/ToolbarPlugin.js +204 -0
- package/dist/client/ui/index.d.ts +111 -0
- package/dist/client/ui/index.d.ts.map +1 -0
- package/dist/client/ui/index.js +130 -0
- package/dist/collections/CollectionOperations.d.ts +27 -0
- package/dist/collections/CollectionOperations.d.ts.map +1 -0
- package/dist/collections/CollectionOperations.js +48 -0
- package/dist/collections/hooks.d.ts +11 -0
- package/dist/collections/hooks.d.ts.map +1 -0
- package/dist/collections/hooks.js +35 -0
- package/dist/collections/index.d.ts +2 -0
- package/dist/collections/index.d.ts.map +1 -0
- package/dist/collections/index.js +1 -0
- package/dist/collections/operations/create.d.ts +9 -0
- package/dist/collections/operations/create.d.ts.map +1 -0
- package/dist/collections/operations/create.js +130 -0
- package/dist/collections/operations/createMany.d.ts +12 -0
- package/dist/collections/operations/createMany.d.ts.map +1 -0
- package/dist/collections/operations/createMany.js +43 -0
- package/dist/collections/operations/delete.d.ts +10 -0
- package/dist/collections/operations/delete.d.ts.map +1 -0
- package/dist/collections/operations/delete.js +45 -0
- package/dist/collections/operations/deleteMany.d.ts +11 -0
- package/dist/collections/operations/deleteMany.d.ts.map +1 -0
- package/dist/collections/operations/deleteMany.js +50 -0
- package/dist/collections/operations/fieldHooks.d.ts +21 -0
- package/dist/collections/operations/fieldHooks.d.ts.map +1 -0
- package/dist/collections/operations/fieldHooks.js +51 -0
- package/dist/collections/operations/find.d.ts +8 -0
- package/dist/collections/operations/find.d.ts.map +1 -0
- package/dist/collections/operations/find.js +231 -0
- package/dist/collections/operations/findById.d.ts +14 -0
- package/dist/collections/operations/findById.d.ts.map +1 -0
- package/dist/collections/operations/findById.js +111 -0
- package/dist/collections/operations/sqlAdapter.d.ts +23 -0
- package/dist/collections/operations/sqlAdapter.d.ts.map +1 -0
- package/dist/collections/operations/sqlAdapter.js +108 -0
- package/dist/collections/operations/update.d.ts +8 -0
- package/dist/collections/operations/update.d.ts.map +1 -0
- package/dist/collections/operations/update.js +226 -0
- package/dist/collections/operations/updateMany.d.ts +11 -0
- package/dist/collections/operations/updateMany.d.ts.map +1 -0
- package/dist/collections/operations/updateMany.js +52 -0
- package/dist/collections/registry.d.ts +12 -0
- package/dist/collections/registry.d.ts.map +1 -0
- package/dist/collections/registry.js +38 -0
- package/dist/config/index.d.ts +9 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +61 -0
- package/dist/config/runtime.d.ts +22 -0
- package/dist/config/runtime.d.ts.map +1 -0
- package/dist/config/runtime.js +32 -0
- package/dist/config/utils.d.ts +2 -0
- package/dist/config/utils.d.ts.map +1 -0
- package/dist/config/utils.js +21 -0
- package/dist/database/index.d.ts +4 -0
- package/dist/database/index.d.ts.map +1 -0
- package/dist/database/index.js +2 -0
- package/dist/database/safe-parse.d.ts +26 -0
- package/dist/database/safe-parse.d.ts.map +1 -0
- package/dist/database/safe-parse.js +42 -0
- package/dist/database/ssl-config.d.ts +9 -0
- package/dist/database/ssl-config.d.ts.map +1 -0
- package/dist/database/ssl-config.js +7 -0
- package/dist/database/type-adapter.d.ts +113 -0
- package/dist/database/type-adapter.d.ts.map +1 -0
- package/dist/database/type-adapter.js +97 -0
- package/dist/database/universal-postgres.d.ts +45 -0
- package/dist/database/universal-postgres.d.ts.map +1 -0
- package/dist/database/universal-postgres.js +531 -0
- package/dist/dataloader.d.ts +26 -0
- package/dist/dataloader.d.ts.map +1 -0
- package/dist/dataloader.js +176 -0
- package/dist/error-handling/error-boundary.d.ts +94 -0
- package/dist/error-handling/error-boundary.d.ts.map +1 -0
- package/dist/error-handling/error-boundary.js +285 -0
- package/dist/error-handling/error-reporter.d.ts +214 -0
- package/dist/error-handling/error-reporter.d.ts.map +1 -0
- package/dist/error-handling/error-reporter.js +491 -0
- package/dist/error-handling/fallback-components.d.ts +131 -0
- package/dist/error-handling/fallback-components.d.ts.map +1 -0
- package/dist/error-handling/fallback-components.js +371 -0
- package/dist/error-handling/index.d.ts +14 -0
- package/dist/error-handling/index.d.ts.map +1 -0
- package/dist/error-handling/index.js +12 -0
- package/dist/factories/builders.d.ts +50 -0
- package/dist/factories/builders.d.ts.map +1 -0
- package/dist/factories/builders.js +77 -0
- package/dist/factories/index.d.ts +2 -0
- package/dist/factories/index.d.ts.map +1 -0
- package/dist/factories/index.js +1 -0
- package/dist/features.d.ts +88 -0
- package/dist/features.d.ts.map +1 -0
- package/dist/features.js +105 -0
- package/dist/fieldTraversal.d.ts +26 -0
- package/dist/fieldTraversal.d.ts.map +1 -0
- package/dist/fieldTraversal.js +132 -0
- package/dist/fields/config/types.d.ts +48 -0
- package/dist/fields/config/types.d.ts.map +1 -0
- package/dist/fields/config/types.js +20 -0
- package/dist/fields/getDefaultValue.d.ts +16 -0
- package/dist/fields/getDefaultValue.d.ts.map +1 -0
- package/dist/fields/getDefaultValue.js +20 -0
- package/dist/fields/getFieldPaths.d.ts +25 -0
- package/dist/fields/getFieldPaths.d.ts.map +1 -0
- package/dist/fields/getFieldPaths.js +23 -0
- package/dist/fields/hooks/afterRead/index.d.ts +36 -0
- package/dist/fields/hooks/afterRead/index.d.ts.map +1 -0
- package/dist/fields/hooks/afterRead/index.js +70 -0
- package/dist/fields/hooks/afterRead/promise.d.ts +46 -0
- package/dist/fields/hooks/afterRead/promise.d.ts.map +1 -0
- package/dist/fields/hooks/afterRead/promise.js +178 -0
- package/dist/fields/hooks/afterRead/traverseFields.d.ts +44 -0
- package/dist/fields/hooks/afterRead/traverseFields.d.ts.map +1 -0
- package/dist/fields/hooks/afterRead/traverseFields.js +37 -0
- package/dist/generated/index.d.ts +10 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +9 -0
- package/dist/generated/types/cms.d.ts +1766 -0
- package/dist/generated/types/cms.d.ts.map +1 -0
- package/dist/generated/types/cms.js +11 -0
- package/dist/generated/types/index.d.ts +16 -0
- package/dist/generated/types/index.d.ts.map +1 -0
- package/dist/generated/types/index.js +21 -0
- package/dist/generated/types/neon.d.ts +11 -0
- package/dist/generated/types/neon.d.ts.map +1 -0
- package/dist/generated/types/neon.js +13 -0
- package/dist/globals/GlobalOperations.d.ts +24 -0
- package/dist/globals/GlobalOperations.d.ts.map +1 -0
- package/dist/globals/GlobalOperations.js +165 -0
- package/dist/globals/index.d.ts +2 -0
- package/dist/globals/index.d.ts.map +1 -0
- package/dist/globals/index.js +1 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +136 -0
- package/dist/instance/RevealUIInstance.d.ts +6 -0
- package/dist/instance/RevealUIInstance.d.ts.map +1 -0
- package/dist/instance/RevealUIInstance.js +293 -0
- package/dist/instance/index.d.ts +3 -0
- package/dist/instance/index.d.ts.map +1 -0
- package/dist/instance/index.js +2 -0
- package/dist/instance/logger.d.ts +31 -0
- package/dist/instance/logger.d.ts.map +1 -0
- package/dist/instance/logger.js +42 -0
- package/dist/instance/methods/create.d.ts +10 -0
- package/dist/instance/methods/create.d.ts.map +1 -0
- package/dist/instance/methods/create.js +38 -0
- package/dist/instance/methods/delete.d.ts +10 -0
- package/dist/instance/methods/delete.d.ts.map +1 -0
- package/dist/instance/methods/delete.js +24 -0
- package/dist/instance/methods/find.d.ts +10 -0
- package/dist/instance/methods/find.d.ts.map +1 -0
- package/dist/instance/methods/find.js +20 -0
- package/dist/instance/methods/findById.d.ts +13 -0
- package/dist/instance/methods/findById.d.ts.map +1 -0
- package/dist/instance/methods/findById.js +20 -0
- package/dist/instance/methods/hooks.d.ts +14 -0
- package/dist/instance/methods/hooks.d.ts.map +1 -0
- package/dist/instance/methods/hooks.js +34 -0
- package/dist/instance/methods/update.d.ts +10 -0
- package/dist/instance/methods/update.d.ts.map +1 -0
- package/dist/instance/methods/update.js +42 -0
- package/dist/jobs/index.d.ts +16 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +14 -0
- package/dist/jobs/queue.d.ts +57 -0
- package/dist/jobs/queue.d.ts.map +1 -0
- package/dist/jobs/queue.js +134 -0
- package/dist/license-encryption.d.ts +21 -0
- package/dist/license-encryption.d.ts.map +1 -0
- package/dist/license-encryption.js +74 -0
- package/dist/license.d.ts +99 -0
- package/dist/license.d.ts.map +1 -0
- package/dist/license.js +262 -0
- package/dist/monitoring/alerts.d.ts +118 -0
- package/dist/monitoring/alerts.d.ts.map +1 -0
- package/dist/monitoring/alerts.js +324 -0
- package/dist/monitoring/cleanup-manager.d.ts +71 -0
- package/dist/monitoring/cleanup-manager.d.ts.map +1 -0
- package/dist/monitoring/cleanup-manager.js +226 -0
- package/dist/monitoring/health-monitor.d.ts +22 -0
- package/dist/monitoring/health-monitor.d.ts.map +1 -0
- package/dist/monitoring/health-monitor.js +142 -0
- package/dist/monitoring/index.d.ts +14 -0
- package/dist/monitoring/index.d.ts.map +1 -0
- package/dist/monitoring/index.js +17 -0
- package/dist/monitoring/process-registry.d.ts +97 -0
- package/dist/monitoring/process-registry.d.ts.map +1 -0
- package/dist/monitoring/process-registry.js +222 -0
- package/dist/monitoring/query-monitor.d.ts +153 -0
- package/dist/monitoring/query-monitor.d.ts.map +1 -0
- package/dist/monitoring/query-monitor.js +209 -0
- package/dist/monitoring/types.d.ts +231 -0
- package/dist/monitoring/types.d.ts.map +1 -0
- package/dist/monitoring/types.js +42 -0
- package/dist/monitoring/zombie-detector.d.ts +81 -0
- package/dist/monitoring/zombie-detector.d.ts.map +1 -0
- package/dist/monitoring/zombie-detector.js +236 -0
- package/dist/nextjs/index.d.ts +4 -0
- package/dist/nextjs/index.d.ts.map +1 -0
- package/dist/nextjs/index.js +3 -0
- package/dist/nextjs/utilities.d.ts +5 -0
- package/dist/nextjs/utilities.d.ts.map +1 -0
- package/dist/nextjs/utilities.js +16 -0
- package/dist/nextjs/withRevealUI.d.ts +20 -0
- package/dist/nextjs/withRevealUI.d.ts.map +1 -0
- package/dist/nextjs/withRevealUI.js +181 -0
- package/dist/observability/alerts.d.ts +138 -0
- package/dist/observability/alerts.d.ts.map +1 -0
- package/dist/observability/alerts.js +389 -0
- package/dist/observability/health-check.d.ts +91 -0
- package/dist/observability/health-check.d.ts.map +1 -0
- package/dist/observability/health-check.js +345 -0
- package/dist/observability/index.d.ts +12 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +11 -0
- package/dist/observability/logger.d.ts +47 -0
- package/dist/observability/logger.d.ts.map +1 -0
- package/dist/observability/logger.js +140 -0
- package/dist/observability/metrics.d.ts +205 -0
- package/dist/observability/metrics.d.ts.map +1 -0
- package/dist/observability/metrics.js +429 -0
- package/dist/observability/tracing.d.ts +149 -0
- package/dist/observability/tracing.d.ts.map +1 -0
- package/dist/observability/tracing.js +380 -0
- package/dist/plugins/form-builder.d.ts +115 -0
- package/dist/plugins/form-builder.d.ts.map +1 -0
- package/dist/plugins/form-builder.js +239 -0
- package/dist/plugins/index.d.ts +5 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +4 -0
- package/dist/plugins/nested-docs.d.ts +12 -0
- package/dist/plugins/nested-docs.d.ts.map +1 -0
- package/dist/plugins/nested-docs.js +111 -0
- package/dist/plugins/redirects.d.ts +17 -0
- package/dist/plugins/redirects.d.ts.map +1 -0
- package/dist/plugins/redirects.js +62 -0
- package/dist/queries/index.d.ts +2 -0
- package/dist/queries/index.d.ts.map +1 -0
- package/dist/queries/index.js +1 -0
- package/dist/queries/queryBuilder.d.ts +47 -0
- package/dist/queries/queryBuilder.d.ts.map +1 -0
- package/dist/queries/queryBuilder.js +276 -0
- package/dist/relationships/analyzer.d.ts +39 -0
- package/dist/relationships/analyzer.d.ts.map +1 -0
- package/dist/relationships/analyzer.js +135 -0
- package/dist/relationships/index.d.ts +3 -0
- package/dist/relationships/index.d.ts.map +1 -0
- package/dist/relationships/index.js +2 -0
- package/dist/relationships/populate-core.d.ts +57 -0
- package/dist/relationships/populate-core.d.ts.map +1 -0
- package/dist/relationships/populate-core.js +116 -0
- package/dist/relationships/populate-helpers.d.ts +58 -0
- package/dist/relationships/populate-helpers.d.ts.map +1 -0
- package/dist/relationships/populate-helpers.js +82 -0
- package/dist/relationships/population.d.ts +34 -0
- package/dist/relationships/population.d.ts.map +1 -0
- package/dist/relationships/population.js +193 -0
- package/dist/revealui.d.ts +46 -0
- package/dist/revealui.d.ts.map +1 -0
- package/dist/revealui.js +92 -0
- package/dist/richtext/exports/client/rcc.d.ts +37 -0
- package/dist/richtext/exports/client/rcc.d.ts.map +1 -0
- package/dist/richtext/exports/client/rcc.js +182 -0
- package/dist/richtext/exports/server/rsc.d.ts +134 -0
- package/dist/richtext/exports/server/rsc.d.ts.map +1 -0
- package/dist/richtext/exports/server/rsc.js +344 -0
- package/dist/richtext/index.d.ts +161 -0
- package/dist/richtext/index.d.ts.map +1 -0
- package/dist/richtext/index.js +243 -0
- package/dist/richtext/lexical.d.ts +23 -0
- package/dist/richtext/lexical.d.ts.map +1 -0
- package/dist/richtext/lexical.js +35 -0
- package/dist/security/index.d.ts +6 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +5 -0
- package/dist/server/index.d.ts +21 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +28 -0
- package/dist/server/renderPage.d.ts +69 -0
- package/dist/server/renderPage.d.ts.map +1 -0
- package/dist/server/renderPage.js +109 -0
- package/dist/storage/index.d.ts +2 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +2 -0
- package/dist/storage/vercel-blob.d.ts +17 -0
- package/dist/storage/vercel-blob.d.ts.map +1 -0
- package/dist/storage/vercel-blob.js +86 -0
- package/dist/translations/index.d.ts +17 -0
- package/dist/translations/index.d.ts.map +1 -0
- package/dist/translations/index.js +1 -0
- package/dist/types/access.d.ts +67 -0
- package/dist/types/access.d.ts.map +1 -0
- package/dist/types/access.js +8 -0
- package/dist/types/api.d.ts +57 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/api.js +8 -0
- package/dist/types/cms.d.ts +8 -0
- package/dist/types/cms.d.ts.map +1 -0
- package/dist/types/cms.js +6 -0
- package/dist/types/config.d.ts +152 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +9 -0
- package/dist/types/core.d.ts +11 -0
- package/dist/types/core.d.ts.map +1 -0
- package/dist/types/core.js +9 -0
- package/dist/types/extensions.d.ts +116 -0
- package/dist/types/extensions.d.ts.map +1 -0
- package/dist/types/extensions.js +8 -0
- package/dist/types/frontend.d.ts +53 -0
- package/dist/types/frontend.d.ts.map +1 -0
- package/dist/types/frontend.js +7 -0
- package/dist/types/generated.d.ts +12 -0
- package/dist/types/generated.d.ts.map +1 -0
- package/dist/types/generated.js +10 -0
- package/dist/types/hooks.d.ts +53 -0
- package/dist/types/hooks.d.ts.map +1 -0
- package/dist/types/hooks.js +8 -0
- package/dist/types/index.d.ts +49 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +61 -0
- package/dist/types/interfaces/app.d.ts +50 -0
- package/dist/types/interfaces/app.d.ts.map +1 -0
- package/dist/types/interfaces/app.js +5 -0
- package/dist/types/jobs.d.ts +112 -0
- package/dist/types/jobs.d.ts.map +1 -0
- package/dist/types/jobs.js +7 -0
- package/dist/types/legacy.d.ts +147 -0
- package/dist/types/legacy.d.ts.map +1 -0
- package/dist/types/legacy.js +8 -0
- package/dist/types/plugins.d.ts +17 -0
- package/dist/types/plugins.d.ts.map +1 -0
- package/dist/types/plugins.js +8 -0
- package/dist/types/query.d.ts +99 -0
- package/dist/types/query.d.ts.map +1 -0
- package/dist/types/query.js +24 -0
- package/dist/types/request.d.ts +40 -0
- package/dist/types/request.d.ts.map +1 -0
- package/dist/types/request.js +8 -0
- package/dist/types/richtext.d.ts +23 -0
- package/dist/types/richtext.d.ts.map +1 -0
- package/dist/types/richtext.js +8 -0
- package/dist/types/runtime.d.ts +275 -0
- package/dist/types/runtime.d.ts.map +1 -0
- package/dist/types/runtime.js +9 -0
- package/dist/types/schema.d.ts +9 -0
- package/dist/types/schema.d.ts.map +1 -0
- package/dist/types/schema.js +7 -0
- package/dist/types/user.d.ts +48 -0
- package/dist/types/user.d.ts.map +1 -0
- package/dist/types/user.js +8 -0
- package/dist/utils/access-conversion.d.ts +17 -0
- package/dist/utils/access-conversion.d.ts.map +1 -0
- package/dist/utils/access-conversion.js +96 -0
- package/dist/utils/api-wrapper.d.ts +63 -0
- package/dist/utils/api-wrapper.d.ts.map +1 -0
- package/dist/utils/api-wrapper.js +151 -0
- package/dist/utils/block-conversion.d.ts +21 -0
- package/dist/utils/block-conversion.d.ts.map +1 -0
- package/dist/utils/block-conversion.js +109 -0
- package/dist/utils/cache.d.ts +86 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/cache.js +154 -0
- package/dist/utils/deep-clone.d.ts +25 -0
- package/dist/utils/deep-clone.d.ts.map +1 -0
- package/dist/utils/deep-clone.js +114 -0
- package/dist/utils/error-responses.d.ts +57 -0
- package/dist/utils/error-responses.d.ts.map +1 -0
- package/dist/utils/error-responses.js +95 -0
- package/dist/utils/errors.d.ts +133 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +500 -0
- package/dist/utils/field-conversion.d.ts +40 -0
- package/dist/utils/field-conversion.d.ts.map +1 -0
- package/dist/utils/field-conversion.js +275 -0
- package/dist/utils/flattenResult.d.ts +7 -0
- package/dist/utils/flattenResult.d.ts.map +1 -0
- package/dist/utils/flattenResult.js +22 -0
- package/dist/utils/getBlockSelect.d.ts +12 -0
- package/dist/utils/getBlockSelect.d.ts.map +1 -0
- package/dist/utils/getBlockSelect.js +12 -0
- package/dist/utils/getSelectMode.d.ts +8 -0
- package/dist/utils/getSelectMode.d.ts.map +1 -0
- package/dist/utils/getSelectMode.js +21 -0
- package/dist/utils/isValidID.d.ts +5 -0
- package/dist/utils/isValidID.d.ts.map +1 -0
- package/dist/utils/isValidID.js +13 -0
- package/dist/utils/json-parsing.d.ts +48 -0
- package/dist/utils/json-parsing.d.ts.map +1 -0
- package/dist/utils/json-parsing.js +130 -0
- package/dist/utils/logger-client.d.ts +32 -0
- package/dist/utils/logger-client.d.ts.map +1 -0
- package/dist/utils/logger-client.js +55 -0
- package/dist/utils/logger-server.d.ts +32 -0
- package/dist/utils/logger-server.d.ts.map +1 -0
- package/dist/utils/logger-server.js +68 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +12 -0
- package/dist/utils/request-context.d.ts +143 -0
- package/dist/utils/request-context.d.ts.map +1 -0
- package/dist/utils/request-context.js +168 -0
- package/dist/utils/stripUnselectedFields.d.ts +10 -0
- package/dist/utils/stripUnselectedFields.d.ts.map +1 -0
- package/dist/utils/stripUnselectedFields.js +20 -0
- package/dist/utils/type-guards.d.ts +33 -0
- package/dist/utils/type-guards.d.ts.map +1 -0
- package/dist/utils/type-guards.js +63 -0
- package/dist/utils/user.d.ts +14 -0
- package/dist/utils/user.d.ts.map +1 -0
- package/dist/utils/user.js +15 -0
- package/package.json +302 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 RevealUI Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# @revealui/core
|
|
2
|
+
|
|
3
|
+
The core runtime engine for RevealUI — collections, admin UI, rich text, security, observability, and plugins.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Collections & CRUD** — Define content types with field hooks, access control, and validation
|
|
8
|
+
- **Admin Dashboard** — Ready-to-use React admin UI (collection browser, document editor, global forms)
|
|
9
|
+
- **Rich Text** — Lexical-based editor with 20+ features (bold, headings, lists, links, images, blocks)
|
|
10
|
+
- **Security** — CORS, CSP, HSTS, RBAC/ABAC policy engine, encryption (AES-256-GCM), audit logging
|
|
11
|
+
- **GDPR Compliance** — Consent management, data export, deletion, anonymization, breach reporting
|
|
12
|
+
- **Observability** — Structured logging, process health monitoring, alert system, graceful shutdown
|
|
13
|
+
- **Plugins** — Extensible plugin system (form builder, nested docs, redirects)
|
|
14
|
+
- **Feature Gating** — Tier-based licensing (free, pro, max, enterprise/Forge) with JWT license keys
|
|
15
|
+
- **Database** — PostgreSQL adapters (NeonDB + PGlite for testing), connection pooling, SSL/TLS
|
|
16
|
+
- **Storage** — Pluggable storage interface (Vercel Blob adapter included)
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pnpm add @revealui/core
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
### Configuration
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { buildConfig } from '@revealui/core/config'
|
|
30
|
+
|
|
31
|
+
const config = buildConfig({
|
|
32
|
+
collections: [Posts, Categories, Users],
|
|
33
|
+
globals: [Settings, Navigation],
|
|
34
|
+
plugins: [formBuilder(), nestedDocs()],
|
|
35
|
+
})
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Collections
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import type { RevealUICollection } from '@revealui/core'
|
|
42
|
+
|
|
43
|
+
const Posts: RevealUICollection = {
|
|
44
|
+
slug: 'posts',
|
|
45
|
+
fields: [
|
|
46
|
+
{ name: 'title', type: 'text', required: true },
|
|
47
|
+
{ name: 'content', type: 'richText' },
|
|
48
|
+
{ name: 'status', type: 'select', options: ['draft', 'published'] },
|
|
49
|
+
],
|
|
50
|
+
hooks: {
|
|
51
|
+
beforeChange: [({ data }) => ({ ...data, updatedAt: new Date() })],
|
|
52
|
+
},
|
|
53
|
+
access: {
|
|
54
|
+
read: () => true,
|
|
55
|
+
create: ({ req }) => !!req.user,
|
|
56
|
+
},
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Server-Side API
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
import { revealui } from '@revealui/core/server'
|
|
64
|
+
|
|
65
|
+
// Create, read, update, delete
|
|
66
|
+
const post = await revealui.create({ collection: 'posts', data: { title: 'Hello' } })
|
|
67
|
+
const posts = await revealui.find({ collection: 'posts', where: { status: { equals: 'published' } } })
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Admin UI (React)
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
import { AdminDashboard } from '@revealui/core/admin'
|
|
74
|
+
|
|
75
|
+
// Full admin interface with collection browser, document editor, global forms
|
|
76
|
+
function App() {
|
|
77
|
+
return <AdminDashboard />
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Rich Text
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
import { RichTextEditor, BoldFeature, HeadingFeature, ListFeature } from '@revealui/core/richtext/client'
|
|
85
|
+
|
|
86
|
+
<RichTextEditor
|
|
87
|
+
features={[BoldFeature(), HeadingFeature(), ListFeature()]}
|
|
88
|
+
onChange={(json) => console.log(json)}
|
|
89
|
+
/>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Feature Gating
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
import { isLicensed, isFeatureEnabled } from '@revealui/core/features'
|
|
96
|
+
|
|
97
|
+
if (isLicensed('pro')) {
|
|
98
|
+
// Pro-tier feature
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (isFeatureEnabled('ai')) {
|
|
102
|
+
// AI features enabled
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Exports
|
|
107
|
+
|
|
108
|
+
| Subpath | Purpose |
|
|
109
|
+
|---------|---------|
|
|
110
|
+
| `@revealui/core` | Main entry (RevealUI instance) |
|
|
111
|
+
| `@revealui/core/server` | Server-side CRUD API |
|
|
112
|
+
| `@revealui/core/client` | Client-side React hooks and utilities |
|
|
113
|
+
| `@revealui/core/config` | Configuration builder |
|
|
114
|
+
| `@revealui/core/admin` | Admin dashboard components |
|
|
115
|
+
| `@revealui/core/richtext` | Rich text server utilities |
|
|
116
|
+
| `@revealui/core/richtext/client` | Lexical editor React components |
|
|
117
|
+
| `@revealui/core/richtext/html` | HTML serialization |
|
|
118
|
+
| `@revealui/core/richtext/rsc` | React Server Component support |
|
|
119
|
+
| `@revealui/core/security` | Security infrastructure |
|
|
120
|
+
| `@revealui/core/auth` | Auth utilities |
|
|
121
|
+
| `@revealui/core/database` | Database adapters |
|
|
122
|
+
| `@revealui/core/storage` | Storage adapters |
|
|
123
|
+
| `@revealui/core/plugins` | Plugin system |
|
|
124
|
+
| `@revealui/core/features` | Feature flags |
|
|
125
|
+
| `@revealui/core/license` | License validation |
|
|
126
|
+
| `@revealui/core/monitoring` | Health monitoring |
|
|
127
|
+
| `@revealui/core/observability/logger` | Structured logging |
|
|
128
|
+
| `@revealui/core/types` | TypeScript type definitions |
|
|
129
|
+
| `@revealui/core/nextjs` | Next.js integration middleware |
|
|
130
|
+
| `@revealui/core/utils/*` | Utilities (cache, deep-clone, errors) |
|
|
131
|
+
|
|
132
|
+
## Development
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Build
|
|
136
|
+
pnpm build
|
|
137
|
+
|
|
138
|
+
# Type check
|
|
139
|
+
pnpm typecheck
|
|
140
|
+
|
|
141
|
+
# Run tests
|
|
142
|
+
pnpm test
|
|
143
|
+
|
|
144
|
+
# Watch mode
|
|
145
|
+
pnpm dev
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## When to Use This
|
|
149
|
+
|
|
150
|
+
- You're building a content-driven app and need collections, admin UI, and CRUD out of the box
|
|
151
|
+
- You need RBAC/ABAC access control, GDPR compliance, or feature gating by license tier
|
|
152
|
+
- You want a rich text editor (Lexical) integrated with your CMS
|
|
153
|
+
- **Not** for standalone UI components — use `@revealui/presentation`
|
|
154
|
+
- **Not** for raw database queries — use `@revealui/db` directly
|
|
155
|
+
|
|
156
|
+
## JOSHUA Alignment
|
|
157
|
+
|
|
158
|
+
- **Sovereign**: Self-hosted runtime engine — no SaaS dependency for content management, auth, or storage
|
|
159
|
+
- **Unified**: One `buildConfig()` call wires collections, globals, plugins, security, and feature gates into a single configuration
|
|
160
|
+
- **Adaptive**: Plugin system and tier-based feature gating let the platform evolve without breaking existing deployments
|
|
161
|
+
|
|
162
|
+
## Related
|
|
163
|
+
|
|
164
|
+
- [Contracts Package](../contracts/README.md) — Zod schemas and TypeScript types
|
|
165
|
+
- [DB Package](../db/README.md) — Drizzle ORM schema
|
|
166
|
+
- [Auth Package](../auth/README.md) — Authentication system
|
|
167
|
+
- [Architecture Guide](../../docs/ARCHITECTURE.md)
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
MIT
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Response Compression Middleware
|
|
3
|
+
*
|
|
4
|
+
* Implements gzip and brotli compression for API responses
|
|
5
|
+
*/
|
|
6
|
+
import { type NextRequest, NextResponse } from 'next/server';
|
|
7
|
+
interface CompressionOptions {
|
|
8
|
+
threshold?: number;
|
|
9
|
+
level?: number;
|
|
10
|
+
preferBrotli?: boolean;
|
|
11
|
+
excludeTypes?: string[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Compress API response
|
|
15
|
+
*/
|
|
16
|
+
export declare function compressResponse(request: NextRequest, response: NextResponse, options?: CompressionOptions): Promise<NextResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Create compression middleware
|
|
19
|
+
*/
|
|
20
|
+
export declare function createCompressionMiddleware(options?: CompressionOptions): (request: NextRequest, next: () => Promise<NextResponse>) => Promise<NextResponse<unknown>>;
|
|
21
|
+
/**
|
|
22
|
+
* Calculate compression ratio
|
|
23
|
+
*/
|
|
24
|
+
export declare function getCompressionRatio(originalSize: number, compressedSize: number): number;
|
|
25
|
+
/**
|
|
26
|
+
* Get compression stats
|
|
27
|
+
*/
|
|
28
|
+
export interface CompressionStats {
|
|
29
|
+
originalSize: number;
|
|
30
|
+
compressedSize: number;
|
|
31
|
+
compressionRatio: number;
|
|
32
|
+
encoding: string;
|
|
33
|
+
savings: number;
|
|
34
|
+
}
|
|
35
|
+
export declare function getCompressionStats(originalBody: string | Uint8Array, compressedBody: Uint8Array, encoding: string): CompressionStats;
|
|
36
|
+
/**
|
|
37
|
+
* Preset compression configurations
|
|
38
|
+
*/
|
|
39
|
+
export declare const COMPRESSION_PRESETS: {
|
|
40
|
+
readonly fast: {
|
|
41
|
+
readonly threshold: 512;
|
|
42
|
+
readonly level: 3;
|
|
43
|
+
readonly preferBrotli: false;
|
|
44
|
+
};
|
|
45
|
+
readonly balanced: {
|
|
46
|
+
readonly threshold: 1024;
|
|
47
|
+
readonly level: 6;
|
|
48
|
+
readonly preferBrotli: true;
|
|
49
|
+
};
|
|
50
|
+
readonly max: {
|
|
51
|
+
readonly threshold: 512;
|
|
52
|
+
readonly level: 9;
|
|
53
|
+
readonly preferBrotli: true;
|
|
54
|
+
};
|
|
55
|
+
readonly static: {
|
|
56
|
+
readonly threshold: 1024;
|
|
57
|
+
readonly level: 9;
|
|
58
|
+
readonly preferBrotli: true;
|
|
59
|
+
};
|
|
60
|
+
readonly api: {
|
|
61
|
+
readonly threshold: 512;
|
|
62
|
+
readonly level: 6;
|
|
63
|
+
readonly preferBrotli: true;
|
|
64
|
+
readonly excludeTypes: readonly ["image/png", "image/jpeg", "image/gif", "image/webp", "video/mp4", "application/zip", "application/gzip", "application/pdf"];
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Compress JSON response
|
|
69
|
+
*/
|
|
70
|
+
export declare function compressJSON(data: unknown, encoding?: 'gzip' | 'br', level?: number): Promise<Uint8Array>;
|
|
71
|
+
/**
|
|
72
|
+
* Decompress response
|
|
73
|
+
*/
|
|
74
|
+
export declare function decompressBody(body: Uint8Array, encoding: string): Promise<Uint8Array>;
|
|
75
|
+
/**
|
|
76
|
+
* Check if compression is supported
|
|
77
|
+
*/
|
|
78
|
+
export declare function isCompressionSupported(request: NextRequest): {
|
|
79
|
+
gzip: boolean;
|
|
80
|
+
brotli: boolean;
|
|
81
|
+
};
|
|
82
|
+
export {};
|
|
83
|
+
//# sourceMappingURL=compression.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compression.d.ts","sourceRoot":"","sources":["../../src/api/compression.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG7D,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC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|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Response Compression Middleware
|
|
3
|
+
*
|
|
4
|
+
* Implements gzip and brotli compression for API responses
|
|
5
|
+
*/
|
|
6
|
+
import { NextResponse } from 'next/server';
|
|
7
|
+
import { logger } from '../observability/logger.js';
|
|
8
|
+
const DEFAULT_OPTIONS = {
|
|
9
|
+
threshold: 1024, // 1KB minimum
|
|
10
|
+
level: 6, // Balanced compression
|
|
11
|
+
preferBrotli: true,
|
|
12
|
+
excludeTypes: [
|
|
13
|
+
'image/png',
|
|
14
|
+
'image/jpeg',
|
|
15
|
+
'image/gif',
|
|
16
|
+
'image/webp',
|
|
17
|
+
'video/mp4',
|
|
18
|
+
'application/zip',
|
|
19
|
+
'application/gzip',
|
|
20
|
+
'application/pdf',
|
|
21
|
+
],
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Check if response should be compressed
|
|
25
|
+
*/
|
|
26
|
+
function shouldCompress(response, options) {
|
|
27
|
+
const contentType = response.headers.get('content-type') || '';
|
|
28
|
+
const contentLength = parseInt(response.headers.get('content-length') || '0', 10);
|
|
29
|
+
// Check if already compressed
|
|
30
|
+
if (response.headers.get('content-encoding')) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
// Check content type exclusions
|
|
34
|
+
if (options.excludeTypes?.some((type) => contentType.includes(type))) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
// Check size threshold
|
|
38
|
+
if (contentLength > 0 && contentLength < (options.threshold || 0)) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get best compression encoding from Accept-Encoding header
|
|
45
|
+
*/
|
|
46
|
+
function getBestEncoding(request, preferBrotli) {
|
|
47
|
+
const acceptEncoding = request.headers.get('accept-encoding') || '';
|
|
48
|
+
const supportsBrotli = acceptEncoding.includes('br');
|
|
49
|
+
const supportsGzip = acceptEncoding.includes('gzip');
|
|
50
|
+
if (preferBrotli && supportsBrotli) {
|
|
51
|
+
return 'br';
|
|
52
|
+
}
|
|
53
|
+
if (supportsGzip) {
|
|
54
|
+
return 'gzip';
|
|
55
|
+
}
|
|
56
|
+
if (supportsBrotli) {
|
|
57
|
+
return 'br';
|
|
58
|
+
}
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Compress response body
|
|
63
|
+
*/
|
|
64
|
+
async function compressBody(body, encoding, _level) {
|
|
65
|
+
const textEncoder = new TextEncoder();
|
|
66
|
+
const data = typeof body === 'string' ? textEncoder.encode(body) : body;
|
|
67
|
+
if (encoding === 'gzip') {
|
|
68
|
+
// Use CompressionStream API (available in modern environments)
|
|
69
|
+
const stream = new Response(data).body?.pipeThrough(new CompressionStream('gzip'));
|
|
70
|
+
const compressed = await new Response(stream).arrayBuffer();
|
|
71
|
+
return new Uint8Array(compressed);
|
|
72
|
+
}
|
|
73
|
+
if (encoding === 'br') {
|
|
74
|
+
// Brotli compression
|
|
75
|
+
// Note: CompressionStream('deflate-raw') is available, but not 'br' in all environments
|
|
76
|
+
// Fallback to gzip if brotli not available
|
|
77
|
+
try {
|
|
78
|
+
const stream = new Response(data).body?.pipeThrough(new CompressionStream('deflate'));
|
|
79
|
+
const compressed = await new Response(stream).arrayBuffer();
|
|
80
|
+
return new Uint8Array(compressed);
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
// Fallback to gzip
|
|
84
|
+
const stream = new Response(data).body?.pipeThrough(new CompressionStream('gzip'));
|
|
85
|
+
const compressed = await new Response(stream).arrayBuffer();
|
|
86
|
+
return new Uint8Array(compressed);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return data;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Compress API response
|
|
93
|
+
*/
|
|
94
|
+
export async function compressResponse(request, response, options = {}) {
|
|
95
|
+
const opts = { ...DEFAULT_OPTIONS, ...options };
|
|
96
|
+
// Check if should compress
|
|
97
|
+
if (!shouldCompress(response, opts)) {
|
|
98
|
+
return response;
|
|
99
|
+
}
|
|
100
|
+
// Get best encoding
|
|
101
|
+
const encoding = getBestEncoding(request, opts.preferBrotli ?? true);
|
|
102
|
+
if (!encoding) {
|
|
103
|
+
return response;
|
|
104
|
+
}
|
|
105
|
+
try {
|
|
106
|
+
// Get response body
|
|
107
|
+
const body = await response.text();
|
|
108
|
+
// Compress body
|
|
109
|
+
const compressed = await compressBody(body, encoding, opts.level || 6);
|
|
110
|
+
// Create new response with compressed body
|
|
111
|
+
const newResponse = new NextResponse(compressed, {
|
|
112
|
+
status: response.status,
|
|
113
|
+
statusText: response.statusText,
|
|
114
|
+
headers: response.headers,
|
|
115
|
+
});
|
|
116
|
+
// Set compression headers
|
|
117
|
+
newResponse.headers.set('content-encoding', encoding);
|
|
118
|
+
newResponse.headers.set('content-length', compressed.length.toString());
|
|
119
|
+
newResponse.headers.delete('content-length'); // Let runtime set it
|
|
120
|
+
newResponse.headers.set('vary', 'Accept-Encoding');
|
|
121
|
+
return newResponse;
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
logger.error('Compression error', error instanceof Error ? error : new Error(String(error)));
|
|
125
|
+
return response;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Create compression middleware
|
|
130
|
+
*/
|
|
131
|
+
export function createCompressionMiddleware(options = {}) {
|
|
132
|
+
return async (request, next) => {
|
|
133
|
+
const response = await next();
|
|
134
|
+
return compressResponse(request, response, options);
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Calculate compression ratio
|
|
139
|
+
*/
|
|
140
|
+
export function getCompressionRatio(originalSize, compressedSize) {
|
|
141
|
+
return ((originalSize - compressedSize) / originalSize) * 100;
|
|
142
|
+
}
|
|
143
|
+
export function getCompressionStats(originalBody, compressedBody, encoding) {
|
|
144
|
+
const originalSize = typeof originalBody === 'string' ? new Blob([originalBody]).size : originalBody.length;
|
|
145
|
+
const compressedSize = compressedBody.length;
|
|
146
|
+
const compressionRatio = getCompressionRatio(originalSize, compressedSize);
|
|
147
|
+
const savings = originalSize - compressedSize;
|
|
148
|
+
return {
|
|
149
|
+
originalSize,
|
|
150
|
+
compressedSize,
|
|
151
|
+
compressionRatio,
|
|
152
|
+
encoding,
|
|
153
|
+
savings,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Preset compression configurations
|
|
158
|
+
*/
|
|
159
|
+
export const COMPRESSION_PRESETS = {
|
|
160
|
+
// Fast compression, lower ratio
|
|
161
|
+
fast: {
|
|
162
|
+
threshold: 512,
|
|
163
|
+
level: 3,
|
|
164
|
+
preferBrotli: false,
|
|
165
|
+
},
|
|
166
|
+
// Balanced compression
|
|
167
|
+
balanced: {
|
|
168
|
+
threshold: 1024,
|
|
169
|
+
level: 6,
|
|
170
|
+
preferBrotli: true,
|
|
171
|
+
},
|
|
172
|
+
// Maximum compression, slower
|
|
173
|
+
max: {
|
|
174
|
+
threshold: 512,
|
|
175
|
+
level: 9,
|
|
176
|
+
preferBrotli: true,
|
|
177
|
+
},
|
|
178
|
+
// For static assets
|
|
179
|
+
static: {
|
|
180
|
+
threshold: 1024,
|
|
181
|
+
level: 9,
|
|
182
|
+
preferBrotli: true,
|
|
183
|
+
},
|
|
184
|
+
// For API responses
|
|
185
|
+
api: {
|
|
186
|
+
threshold: 512,
|
|
187
|
+
level: 6,
|
|
188
|
+
preferBrotli: true,
|
|
189
|
+
excludeTypes: [
|
|
190
|
+
'image/png',
|
|
191
|
+
'image/jpeg',
|
|
192
|
+
'image/gif',
|
|
193
|
+
'image/webp',
|
|
194
|
+
'video/mp4',
|
|
195
|
+
'application/zip',
|
|
196
|
+
'application/gzip',
|
|
197
|
+
'application/pdf',
|
|
198
|
+
],
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Compress JSON response
|
|
203
|
+
*/
|
|
204
|
+
export async function compressJSON(data, encoding = 'gzip', level = 6) {
|
|
205
|
+
const json = JSON.stringify(data);
|
|
206
|
+
return compressBody(json, encoding, level);
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Decompress response
|
|
210
|
+
*/
|
|
211
|
+
export async function decompressBody(body, encoding) {
|
|
212
|
+
if (encoding === 'gzip') {
|
|
213
|
+
const stream = new Response(body).body?.pipeThrough(new DecompressionStream('gzip'));
|
|
214
|
+
const decompressed = await new Response(stream).arrayBuffer();
|
|
215
|
+
return new Uint8Array(decompressed);
|
|
216
|
+
}
|
|
217
|
+
if (encoding === 'br' || encoding === 'deflate') {
|
|
218
|
+
const stream = new Response(body).body?.pipeThrough(new DecompressionStream('deflate'));
|
|
219
|
+
const decompressed = await new Response(stream).arrayBuffer();
|
|
220
|
+
return new Uint8Array(decompressed);
|
|
221
|
+
}
|
|
222
|
+
return body;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Check if compression is supported
|
|
226
|
+
*/
|
|
227
|
+
export function isCompressionSupported(request) {
|
|
228
|
+
const acceptEncoding = request.headers.get('accept-encoding') || '';
|
|
229
|
+
return {
|
|
230
|
+
gzip: acceptEncoding.includes('gzip'),
|
|
231
|
+
brotli: acceptEncoding.includes('br'),
|
|
232
|
+
};
|
|
233
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Payload Optimization
|
|
3
|
+
*
|
|
4
|
+
* Reduces payload size through field selection, pagination, and data transformation
|
|
5
|
+
*/
|
|
6
|
+
interface PaginationOptions {
|
|
7
|
+
page?: number;
|
|
8
|
+
limit?: number;
|
|
9
|
+
cursor?: string;
|
|
10
|
+
defaultLimit?: number;
|
|
11
|
+
maxLimit?: number;
|
|
12
|
+
}
|
|
13
|
+
interface PaginatedResponse<T> {
|
|
14
|
+
data: T[];
|
|
15
|
+
pagination: {
|
|
16
|
+
page?: number;
|
|
17
|
+
limit: number;
|
|
18
|
+
total?: number;
|
|
19
|
+
hasMore: boolean;
|
|
20
|
+
nextCursor?: string | null;
|
|
21
|
+
prevCursor?: string | null;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
interface FieldSelectionOptions {
|
|
25
|
+
include?: string[];
|
|
26
|
+
exclude?: string[];
|
|
27
|
+
defaultFields?: string[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Paginate array of items
|
|
31
|
+
*/
|
|
32
|
+
export declare function paginateArray<T>(items: T[], options?: PaginationOptions): PaginatedResponse<T>;
|
|
33
|
+
/**
|
|
34
|
+
* Create cursor for cursor-based pagination
|
|
35
|
+
*/
|
|
36
|
+
export declare function createCursor(item: Record<string, unknown>, field?: string): string;
|
|
37
|
+
/**
|
|
38
|
+
* Parse cursor
|
|
39
|
+
*/
|
|
40
|
+
export declare function parseCursor(cursor: string): {
|
|
41
|
+
field: string;
|
|
42
|
+
value: unknown;
|
|
43
|
+
} | null;
|
|
44
|
+
/**
|
|
45
|
+
* Select fields from object
|
|
46
|
+
*/
|
|
47
|
+
export declare function selectFields<T extends Record<string, unknown>>(obj: T, options: FieldSelectionOptions): Partial<T>;
|
|
48
|
+
/**
|
|
49
|
+
* Select fields from array of objects
|
|
50
|
+
*/
|
|
51
|
+
export declare function selectFieldsFromArray<T extends Record<string, unknown>>(items: T[], options: FieldSelectionOptions): Partial<T>[];
|
|
52
|
+
/**
|
|
53
|
+
* Remove null and undefined values
|
|
54
|
+
*/
|
|
55
|
+
export declare function removeEmpty<T extends Record<string, unknown>>(obj: T): Partial<T>;
|
|
56
|
+
/**
|
|
57
|
+
* Flatten nested object
|
|
58
|
+
*/
|
|
59
|
+
export declare function flattenObject(obj: Record<string, unknown>, prefix?: string): Record<string, unknown>;
|
|
60
|
+
/**
|
|
61
|
+
* Minimize JSON response size
|
|
62
|
+
*/
|
|
63
|
+
export declare function minimizeJSON(data: unknown): string;
|
|
64
|
+
/**
|
|
65
|
+
* Format JSON response (for development)
|
|
66
|
+
*/
|
|
67
|
+
export declare function formatJSON(data: unknown): string;
|
|
68
|
+
/**
|
|
69
|
+
* Remove sensitive fields
|
|
70
|
+
*/
|
|
71
|
+
export declare function sanitizeResponse<T extends Record<string, unknown>>(obj: T, sensitiveFields?: string[]): Partial<T>;
|
|
72
|
+
/**
|
|
73
|
+
* Transform timestamps to ISO strings
|
|
74
|
+
*/
|
|
75
|
+
export declare function transformDates<T extends Record<string, unknown>>(obj: T): T;
|
|
76
|
+
/**
|
|
77
|
+
* Calculate payload size in bytes
|
|
78
|
+
*/
|
|
79
|
+
export declare function getPayloadSize(data: unknown): number;
|
|
80
|
+
/**
|
|
81
|
+
* Get payload size in human-readable format
|
|
82
|
+
*/
|
|
83
|
+
export declare function formatPayloadSize(bytes: number): string;
|
|
84
|
+
/**
|
|
85
|
+
* Optimize payload by removing unnecessary data
|
|
86
|
+
*/
|
|
87
|
+
export interface OptimizationResult<T> {
|
|
88
|
+
data: T;
|
|
89
|
+
originalSize: number;
|
|
90
|
+
optimizedSize: number;
|
|
91
|
+
savings: number;
|
|
92
|
+
savingsPercent: number;
|
|
93
|
+
}
|
|
94
|
+
export declare function optimizePayload<T>(data: T, options?: FieldSelectionOptions & {
|
|
95
|
+
removeEmpty?: boolean;
|
|
96
|
+
transformDates?: boolean;
|
|
97
|
+
sanitize?: boolean;
|
|
98
|
+
}): OptimizationResult<T>;
|
|
99
|
+
/**
|
|
100
|
+
* Create API response with optimized payload
|
|
101
|
+
*/
|
|
102
|
+
export declare function createOptimizedResponse<T>(data: T, options?: {
|
|
103
|
+
pagination?: PaginationOptions;
|
|
104
|
+
fields?: FieldSelectionOptions;
|
|
105
|
+
optimize?: boolean;
|
|
106
|
+
compress?: boolean;
|
|
107
|
+
}): {
|
|
108
|
+
data: unknown;
|
|
109
|
+
meta?: {
|
|
110
|
+
pagination?: PaginatedResponse<T>['pagination'];
|
|
111
|
+
size?: {
|
|
112
|
+
original: string;
|
|
113
|
+
optimized: string;
|
|
114
|
+
savings: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Parse field selection from query params
|
|
120
|
+
*/
|
|
121
|
+
export declare function parseFieldsFromQuery(query: string): FieldSelectionOptions;
|
|
122
|
+
/**
|
|
123
|
+
* Parse pagination from query params
|
|
124
|
+
*/
|
|
125
|
+
export declare function parsePaginationFromQuery(query: string): PaginationOptions;
|
|
126
|
+
/**
|
|
127
|
+
* Batch responses to reduce round trips
|
|
128
|
+
*/
|
|
129
|
+
export declare function batchResponses<T>(responses: Array<{
|
|
130
|
+
key: string;
|
|
131
|
+
data: T;
|
|
132
|
+
}>): Record<string, T>;
|
|
133
|
+
/**
|
|
134
|
+
* Create partial response (for large objects)
|
|
135
|
+
*/
|
|
136
|
+
export declare function createPartialResponse<T extends Record<string, unknown>>(obj: T, maxDepth?: number, currentDepth?: number): Partial<T> | string;
|
|
137
|
+
export {};
|
|
138
|
+
//# sourceMappingURL=payload-optimization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload-optimization.d.ts","sourceRoot":"","sources":["../../src/api/payload-optimization.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,UAAU,iBAAiB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,iBAAiB,CAAC,CAAC;IAC3B,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,UAAU,EAAE;QACV,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3B,U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