chore(release): version packages - #71
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@universal-data-layer/adapter-nextjs@2.0.0
Minor Changes
#70
5ff7110Thanks @dawidurbanski! - Add config file support and UDL_ENDPOINT injection for Next.js adapterThe adapter commands now read the UDL port from
udl.config.tsand automatically inject theUDL_ENDPOINTenvironment variable when spawning Next.js processes.Features:
dev,build, andstartcommands read port from config fileUDL_ENDPOINTenv var automaticallyudl.config.ts,udl.config.js, andudl.config.mjsBenefits:
UDL_ENDPOINTin environmentudl.query()client automatically uses the correct endpointExample:
Patch Changes
#70
6fe6408Thanks @dawidurbanski! - refactor: remove hardcoded default port valuesRemoved hardcoded default port (4000) from CLI and adapter commands. The port is now only passed when explicitly specified by the user, allowing the config file to determine the default port value instead.
Updated dependencies [
dfc7d90,6430a55,b376bed,5ff7110,5ff7110,2e01999,aba060e,8ec4f2b,5ff7110,6ffae50,051192e,6fe6408,2e01999,0ea71da,5920046,2e01999]:universal-data-layer@2.0.0
Minor Changes
#70
dfc7d90Thanks @dawidurbanski! - Add health check endpoints for production deploymentsIntroduces
/healthand/readyendpoints to support container orchestration (Kubernetes, Docker Swarm), load balancers, and deployment verification.Endpoints:
GET /health- Liveness probe, returns 200 when server is runningGET /ready- Readiness probe, returns 200 when fully initialized, 503 during startupResponse format:
#70
6430a55Thanks @dawidurbanski! - Add webhook HTTP routing with convention-based URL patternRoutes incoming webhook requests to the appropriate plugin handler using a fixed URL pattern
POST /_webhooks/{pluginName}/sync.Features:
/syncpathapplication/jsonWebhookHandlerContextwith store, actions, rawBody, and bodyURL Format:
Exports:
isWebhookRequest- Check if URL is a webhook requestgetPluginFromWebhookUrl- Extract plugin name from webhook URLwebhookHandler- HTTP handler for webhook requestsWEBHOOK_PATH_PREFIX- URL prefix constant (/_webhooks/)#70
b376bedThanks @dawidurbanski! - Add plugin webhook handler export APIPlugins can now export a
registerWebhookHandlerfunction to handle webhooks with custom logic. When exported, it replaces the default CRUD handler for the plugin's/_webhooks/{plugin-name}/syncendpoint.Usage in plugins:
Key benefits:
sourceNodesfor sourcing,registerWebhookHandlerfor webhooks/_webhooks/{plugin-name}/syncHandler context:
The handler receives a flattened context object:
New exports:
PluginWebhookHandler- Type for the handler functionPluginWebhookHandlerContext- Type for the handler contextregisterPluginWebhookHandler- Internal utility for registering custom handlers#70
5ff7110Thanks @dawidurbanski! - Add centralized cache manager for plugin cache coordinationIntroduces a
CacheManagermodule that provides a central point for coordinating plugin cache updates. This enables webhook handlers and remote sync to persist changes to disk after store modifications.Features:
registerPluginCache(pluginName, cache): Register a plugin's cache storageinitPluginCache(pluginName, cacheLocation, customCache?): Initialize and register a cachesavePluginCache(pluginName, store?): Save a specific plugin's nodes to cachesaveAffectedPlugins(affectedPlugins, store?): Save caches for multiple pluginsreplaceAllCaches(store?): Replace all plugin caches (for remote sync)setStore(store): Set the node store reference for cache operationsIntegration:
New exports:
#70
2e01999Thanks @dawidurbanski! - Add default webhook handler for standardized CRUD operationsThis release introduces a default webhook handler that provides a standardized way to create, update, and delete nodes via webhooks. Every loaded plugin automatically gets a webhook endpoint registered with zero configuration required.
Features:
/_webhooks/{plugin-name}/syncendpoint for every plugincreate,update,delete, andupsertoperationsidFieldto look up nodes by external identifiersZero Configuration:
Payload format:
Example requests:
idField support:
When a plugin specifies an
idFieldin its config, the default webhook handler looks up existing nodes by that field:#70
aba060eThanks @dawidurbanski! - Add deletion log for partial sync supportThis release introduces a DeletionLog class that tracks node deletions with timestamps, enabling clients to perform partial sync without needing a full refetch.
Features:
DeletionLogclass for tracking deleted nodesrecordDeletion(node): Record a node deletion with timestampgetDeletedSince(timestamp): Query deletions after a given timecleanup(): Remove entries older than TTL (default: 30 days)toJSON()andfromJSON()for persistenceExample usage:
#70
8ec4f2bThanks @dawidurbanski! - feat(core): add graceful shutdown for production deployments/readyendpoint during shutdown#70
5ff7110Thanks @dawidurbanski! - Add instant webhook relay for remote syncLocal UDL instances can now receive and process webhooks instantly via WebSocket relay, eliminating the need to wait for batch debounce on the production server.
How it works:
webhook:receivedmessage to WebSocket subscribersFeatures:
webhook:queuedevent on WebhookQueue for instant relaywebhook:receivedWebSocket message typebroadcastWebhookReceived(webhook)method on UDLWebSocketServeronWebhookReceivedcallback on WebSocketClient and RemoteSyncConfigConfiguration:
The instant relay is automatically enabled when using remote sync. Local instances register webhook handlers by loading plugins with
isLocal: trueoption.Message format:
Exports:
WebhookReceivedEvent: Event data passed to onWebhookReceived callback#70
6ffae50Thanks @dawidurbanski! - Add outbound webhook triggering with transformPayload supportTrigger outbound webhooks after a batch of incoming webhooks has been processed. This enables the "30 webhooks → 1 build" optimization by notifying external systems (e.g., Vercel deploy hooks, CI systems) once after processing a batch rather than for each individual webhook.
Features:
OutboundWebhookManagerclass for managing outbound webhook notificationsremote.webhooks.outboundPromise.allSettledtransformPayloadcallback for customizing the payload per triggeritemsarray with webhook detailsExample configuration:
transformPayload context:
Default outbound webhook payload:
{ "event": "batch-complete", "timestamp": "2024-01-15T10:30:00.000Z", "summary": { "webhookCount": 30, "plugins": ["@universal-data-layer/plugin-source-contentful"] }, "source": "UDL", "items": [ { "pluginName": "contentful", "body": { "operation": "upsert", ... } }, ... ] }Exports:
OutboundWebhookManager- Class for managing outbound webhooksOutboundWebhookConfig- Configuration type for outbound webhooksOutboundWebhookPayload- Default payload typeOutboundWebhookResult- Result type for trigger operationsTransformPayloadContext- Context type for transformPayload functionTransformPayload- Type for the transform functionWebhookItem- Type for individual webhook item info#70
051192eThanks @dawidurbanski! - feat(core): add remote sync for syncing data from production UDL serverAdded
remote.urlconfig option that allows local UDL servers to sync data from a remote production UDL server instead of sourcing from plugins directly.When configured:
/_syncendpoint on startupNew exports:
UDLWebSocketClient- WebSocket client for connecting to remote UDLfetchRemoteNodes- Fetch all nodes from remote servertryConnectRemoteWebSocket- Connect to remote WebSocketinitRemoteSync- Initialize remote sync (fetch + WebSocket)Usage:
#70
2e01999Thanks @dawidurbanski! - Add sync query API for partial updatesThis release introduces a
GET /_syncendpoint that enables clients to fetch only the nodes that have changed since their last sync. This enables efficient incremental synchronization without requiring a full data refetch.Features:
GET /_sync?since={timestamp}endpoint for querying changestypesquery parameterResponse format:
Example usage:
Type filtering:
Only returns changes for the specified node types.
#70
0ea71daThanks @dawidurbanski! - # AddupdateStrategyconfig option for sync-based source pluginsPlugins can now specify how incremental updates from webhooks should be handled:
'webhook'(default): Process webhook payload directly viaregisterWebhookHandleror the default CRUD handler'sync': Treat webhooks as notifications only and re-runsourceNodesto fetch changes via the plugin's sync APIThis enables plugins with native sync APIs (like Contentful) to reuse their existing
sourceNodeslogic for incremental updates, eliminating the need to maintain separate webhook transformation code.Usage
When webhooks arrive for a plugin with
updateStrategy: 'sync':sourceNodesis called once per affected pluginThe Contentful plugin now uses
updateStrategy: 'sync'by default, leveraging the Contentful Sync API for efficient incremental updates.#70
5920046Thanks @dawidurbanski! - Add webhook queue with debouncing and lifecycle hooksThis release introduces a webhook queue system that batches incoming webhooks and processes them after a configurable debounce period. This prevents N rapid webhook events (e.g., 30 Contentful entry publishes) from triggering N separate processing cycles.
Features:
remote.webhooks.debounceMs, default 5000ms)remote.webhooks.maxQueueSize, default 100)onWebhookReceived: Transform or filter webhooks before queuingonBeforeWebhookTriggered: Run before batch processing (e.g., invalidate CDN cache)onAfterWebhookTriggered: Run after batch processing (e.g., trigger rebuild)Example configuration:
Breaking Changes:
#70
2e01999Thanks @dawidurbanski! - Add WebSocket server for real-time node change notificationsThis release introduces an opt-in WebSocket server that broadcasts node changes to connected clients in real-time. This enables local development machines to receive updates immediately when webhooks modify the data layer, eliminating the need for polling.
Features:
UDLWebSocketServerclass for real-time node change broadcastsnode:created,node:updated,node:deletedevents with full node data*for all types)remote.websocketsin UDL configwsconfigurationConfiguration:
Client usage:
Message types:
node:created,node:updated,node:deleted,connected,subscribed,pongsubscribe,pingPatch Changes
#70
5ff7110Thanks @dawidurbanski! - Add UDL_ENDPOINT environment variable support to configThe
getConfig()function now checks for theUDL_ENDPOINTenvironment variable when config hasn't been explicitly initialized. This allows theudl.query()client to automatically use the correct endpoint in child processes.Features:
UDL_ENDPOINT_ENVconstant for the environment variable nameDEFAULT_UDL_PORTconstant (4000) for consistent default portisConfigInitialized()to check if config was explicitly setresetConfig()for testing isolationHow it works:
When
getConfig()is called and no config was explicitly set viacreateConfig(), it checks for theUDL_ENDPOINTenvironment variable and uses that endpoint if present.This enables scenarios like:
UDL_ENDPOINTwhen spawning Next.jsudl.query()in Next.js code automatically uses the right endpoint#70
6fe6408Thanks @dawidurbanski! - refactor: remove hardcoded default port valuesRemoved hardcoded default port (4000) from CLI and adapter commands. The port is now only passed when explicitly specified by the user, allowing the config file to determine the default port value instead.
@universal-data-layer/codegen-typed-queries@2.0.0
Patch Changes
dfc7d90,6430a55,b376bed,5ff7110,5ff7110,2e01999,aba060e,8ec4f2b,5ff7110,6ffae50,051192e,6fe6408,2e01999,0ea71da,5920046,2e01999]:@universal-data-layer/plugin-source-contentful@2.0.0
Patch Changes
#70
0ea71daThanks @dawidurbanski! - # AddupdateStrategyconfig option for sync-based source pluginsPlugins can now specify how incremental updates from webhooks should be handled:
'webhook'(default): Process webhook payload directly viaregisterWebhookHandleror the default CRUD handler'sync': Treat webhooks as notifications only and re-runsourceNodesto fetch changes via the plugin's sync APIThis enables plugins with native sync APIs (like Contentful) to reuse their existing
sourceNodeslogic for incremental updates, eliminating the need to maintain separate webhook transformation code.Usage
When webhooks arrive for a plugin with
updateStrategy: 'sync':sourceNodesis called once per affected pluginThe Contentful plugin now uses
updateStrategy: 'sync'by default, leveraging the Contentful Sync API for efficient incremental updates.Updated dependencies [
dfc7d90,6430a55,b376bed,5ff7110,5ff7110,2e01999,aba060e,8ec4f2b,5ff7110,6ffae50,051192e,6fe6408,2e01999,0ea71da,5920046,2e01999]: