chore: release v4.5.14 (#4813)
## Summary 4 improvements, 1 bug fix. ## Improvements - Native build server deploys now show a single updating build log line by default; pass `--build-logs full` to stream every line (always used in CI and when output is not a terminal). ([#4817](https://github.com/triggerdotdev/trigger.dev/pull/4817)) - Realtime stream subscriptions can now refresh an expired access token and reconnect, via a new optional `refreshAccessToken` option on the client configuration and the React hooks. ([#4811](https://github.com/triggerdotdev/trigger.dev/pull/4811)) - Subscribe to a realtime stream from its latest record instead of replaying the whole history. Pass `from: "latest"` to `useRealtimeStream`, `streams.read()`, or `fetchStream` to start at the current tail (the latest record, then live updates) instead of replaying (a live "last value" view), and `maxParts` to keep the accumulated `parts` array bounded. A reconnect or remount resumes from the last record it saw, so no records are missed and none are replayed. `from: "latest"` needs a server that supports it; older servers safely fall back to a full replay. ([#4811](https://github.com/triggerdotdev/trigger.dev/pull/4811)) `useRealtimeStream` also gains a `lastEventId` option and returns the `lastEventId` of the last part seen, so you can persist the cursor (for example across a page reload) and resume exactly where you left off. An `onParts` callback delivers each throttled batch of parts with their event ids. ```tsx const { parts, lastEventId } = useRealtimeStream<Frame>(runId, "frames", { from: "latest", // skip history, start at the current tail maxParts: 1, // keep only the most recent frame lastEventId: savedCursor, // resume from a persisted cursor onParts: (batch) => save(batch.at(-1)?.id), // track the cursor accessToken, }); ``` - Added a `useSessionStream` React hook for reading a session's output or input channel in realtime. It accumulates records with automatic resume from the last record you received, and supports `from: "latest"` (start at the current tail, only new records after you connect), `maxRecords` (keep a bounded number of records in memory), a `lastEventId` resume cursor, and an `onRecords` callback that delivers each throttled batch of records with their event ids. ([#4811](https://github.com/triggerdotdev/trigger.dev/pull/4811)) ## Server changes These changes affect the self-hosted Docker image and Trigger.dev Cloud: - Task retries that wait in the queue no longer count against the queue's internal redelivery limit, so runs with many long-delay retries are not wrongly failed with TASK_RUN_DEQUEUED_MAX_RETRIES. ([#4810](https://github.com/triggerdotdev/trigger.dev/pull/4810)) <details> <summary>Raw changeset output</summary> # Releases ## @trigger.dev/build@4.5.14 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.14` ## trigger.dev@4.5.14 ### Patch Changes - Native build server deploys now show a single updating build log line by default; pass `--build-logs full` to stream every line (always used in CI and when output is not a terminal). ([#4817](https://github.com/triggerdotdev/trigger.dev/pull/4817)) - Updated dependencies: - `@trigger.dev/core@4.5.14` - `@trigger.dev/build@4.5.14` - `@trigger.dev/schema-to-json@4.5.14` ## @trigger.dev/core@4.5.14 ### Patch Changes - Realtime stream subscriptions can now refresh an expired access token and reconnect, via a new optional `refreshAccessToken` option on the client configuration and the React hooks. ([#4811](https://github.com/triggerdotdev/trigger.dev/pull/4811)) - Subscribe to a realtime stream from its latest record instead of replaying the whole history. Pass `from: "latest"` to `useRealtimeStream`, `streams.read()`, or `fetchStream` to start at the current tail (the latest record, then live updates) instead of replaying (a live "last value" view), and `maxParts` to keep the accumulated `parts` array bounded. A reconnect or remount resumes from the last record it saw, so no records are missed and none are replayed. `from: "latest"` needs a server that supports it; older servers safely fall back to a full replay. ([#4811](https://github.com/triggerdotdev/trigger.dev/pull/4811)) `useRealtimeStream` also gains a `lastEventId` option and returns the `lastEventId` of the last part seen, so you can persist the cursor (for example across a page reload) and resume exactly where you left off. An `onParts` callback delivers each throttled batch of parts with their event ids. ```tsx const { parts, lastEventId } = useRealtimeStream<Frame>(runId, "frames", { from: "latest", // skip history, start at the current tail maxParts: 1, // keep only the most recent frame lastEventId: savedCursor, // resume from a persisted cursor onParts: (batch) => save(batch.at(-1)?.id), // track the cursor accessToken, }); ``` ## @trigger.dev/python@4.5.14 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.14` - `@trigger.dev/sdk@4.5.14` - `@trigger.dev/build@4.5.14` ## @trigger.dev/react-hooks@4.5.14 ### Patch Changes - Realtime stream subscriptions can now refresh an expired access token and reconnect, via a new optional `refreshAccessToken` option on the client configuration and the React hooks. ([#4811](https://github.com/triggerdotdev/trigger.dev/pull/4811)) - Subscribe to a realtime stream from its latest record instead of replaying the whole history. Pass `from: "latest"` to `useRealtimeStream`, `streams.read()`, or `fetchStream` to start at the current tail (the latest record, then live updates) instead of replaying (a live "last value" view), and `maxParts` to keep the accumulated `parts` array bounded. A reconnect or remount resumes from the last record it saw, so no records are missed and none are replayed. `from: "latest"` needs a server that supports it; older servers safely fall back to a full replay. ([#4811](https://github.com/triggerdotdev/trigger.dev/pull/4811)) `useRealtimeStream` also gains a `lastEventId` option and returns the `lastEventId` of the last part seen, so you can persist the cursor (for example across a page reload) and resume exactly where you left off. An `onParts` callback delivers each throttled batch of parts with their event ids. ```tsx const { parts, lastEventId } = useRealtimeStream<Frame>(runId, "frames", { from: "latest", // skip history, start at the current tail maxParts: 1, // keep only the most recent frame lastEventId: savedCursor, // resume from a persisted cursor onParts: (batch) => save(batch.at(-1)?.id), // track the cursor accessToken, }); ``` - Added a `useSessionStream` React hook for reading a session's output or input channel in realtime. It accumulates records with automatic resume from the last record you received, and supports `from: "latest"` (start at the current tail, only new records after you connect), `maxRecords` (keep a bounded number of records in memory), a `lastEventId` resume cursor, and an `onRecords` callback that delivers each throttled batch of records with their event ids. ([#4811](https://github.com/triggerdotdev/trigger.dev/pull/4811)) - Updated dependencies: - `@trigger.dev/core@4.5.14` ## @trigger.dev/redis-worker@4.5.14 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.14` ## @trigger.dev/rsc@4.5.14 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.14` ## @trigger.dev/schema-to-json@4.5.14 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.14` ## @trigger.dev/sdk@4.5.14 ### Patch Changes - Subscribe to a realtime stream from its latest record instead of replaying the whole history. Pass `from: "latest"` to `useRealtimeStream`, `streams.read()`, or `fetchStream` to start at the current tail (the latest record, then live updates) instead of replaying (a live "last value" view), and `maxParts` to keep the accumulated `parts` array bounded. A reconnect or remount resumes from the last record it saw, so no records are missed and none are replayed. `from: "latest"` needs a server that supports it; older servers safely fall back to a full replay. ([#4811](https://github.com/triggerdotdev/trigger.dev/pull/4811)) `useRealtimeStream` also gains a `lastEventId` option and returns the `lastEventId` of the last part seen, so you can persist the cursor (for example across a page reload) and resume exactly where you left off. An `onParts` callback delivers each throttled batch of parts with their event ids. ```tsx const { parts, lastEventId } = useRealtimeStream<Frame>(runId, "frames", { from: "latest", // skip history, start at the current tail maxParts: 1, // keep only the most recent frame lastEventId: savedCursor, // resume from a persisted cursor onParts: (batch) => save(batch.at(-1)?.id), // track the cursor accessToken, }); ``` - Updated dependencies: - `@trigger.dev/core@4.5.14` </details> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1f8f23027d
commit
f8aacacb8f
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"trigger.dev": patch
|
||||
---
|
||||
|
||||
Native build server deploys now show a single updating build log line by default; pass `--build-logs full` to stream every line (always used in CI and when output is not a terminal).
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
"@trigger.dev/core": patch
|
||||
"@trigger.dev/react-hooks": patch
|
||||
---
|
||||
|
||||
Realtime stream subscriptions can now refresh an expired access token and reconnect, via a new optional `refreshAccessToken` option on the client configuration and the React hooks.
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
"@trigger.dev/react-hooks": patch
|
||||
"@trigger.dev/core": patch
|
||||
"@trigger.dev/sdk": patch
|
||||
---
|
||||
|
||||
Subscribe to a realtime stream from its latest record instead of replaying the whole history. Pass `from: "latest"` to `useRealtimeStream`, `streams.read()`, or `fetchStream` to start at the current tail (the latest record, then live updates) instead of replaying (a live "last value" view), and `maxParts` to keep the accumulated `parts` array bounded. A reconnect or remount resumes from the last record it saw, so no records are missed and none are replayed. `from: "latest"` needs a server that supports it; older servers safely fall back to a full replay.
|
||||
|
||||
`useRealtimeStream` also gains a `lastEventId` option and returns the `lastEventId` of the last part seen, so you can persist the cursor (for example across a page reload) and resume exactly where you left off. An `onParts` callback delivers each throttled batch of parts with their event ids.
|
||||
|
||||
```tsx
|
||||
const { parts, lastEventId } = useRealtimeStream<Frame>(runId, "frames", {
|
||||
from: "latest", // skip history, start at the current tail
|
||||
maxParts: 1, // keep only the most recent frame
|
||||
lastEventId: savedCursor, // resume from a persisted cursor
|
||||
onParts: (batch) => save(batch.at(-1)?.id), // track the cursor
|
||||
accessToken,
|
||||
});
|
||||
```
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@trigger.dev/react-hooks": patch
|
||||
---
|
||||
|
||||
Added a `useSessionStream` React hook for reading a session's output or input channel in realtime. It accumulates records with automatic resume from the last record you received, and supports `from: "latest"` (start at the current tail, only new records after you connect), `maxRecords` (keep a bounded number of records in memory), a `lastEventId` resume cursor, and an `onRecords` callback that delivers each throttled batch of records with their event ids.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
area: webapp
|
||||
type: fix
|
||||
---
|
||||
|
||||
Task retries that wait in the queue no longer count against the queue's internal redelivery limit, so runs with many long-delay retries are not wrongly failed with TASK_RUN_DEQUEUED_MAX_RETRIES.
|
||||
@@ -2,8 +2,8 @@ apiVersion: v2
|
||||
name: trigger
|
||||
description: The official Trigger.dev Helm chart
|
||||
type: application
|
||||
version: 4.5.13
|
||||
appVersion: v4.5.13
|
||||
version: 4.5.14
|
||||
appVersion: v4.5.14
|
||||
home: https://trigger.dev
|
||||
sources:
|
||||
- https://github.com/triggerdotdev/trigger.dev
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @trigger.dev/build
|
||||
|
||||
## 4.5.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies:
|
||||
- `@trigger.dev/core@4.5.14`
|
||||
|
||||
## 4.5.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@trigger.dev/build",
|
||||
"version": "4.5.13",
|
||||
"version": "4.5.14",
|
||||
"description": "trigger.dev build extensions",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
@@ -79,7 +79,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/config": "^6.10.0",
|
||||
"@trigger.dev/core": "workspace:4.5.13",
|
||||
"@trigger.dev/core": "workspace:4.5.14",
|
||||
"mlly": "^1.7.1",
|
||||
"pkg-types": "^1.1.3",
|
||||
"tinyglobby": "^0.2.2",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# trigger.dev
|
||||
|
||||
## 4.5.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Native build server deploys now show a single updating build log line by default; pass `--build-logs full` to stream every line (always used in CI and when output is not a terminal). ([#4817](https://github.com/triggerdotdev/trigger.dev/pull/4817))
|
||||
- Updated dependencies:
|
||||
- `@trigger.dev/core@4.5.14`
|
||||
- `@trigger.dev/build@4.5.14`
|
||||
- `@trigger.dev/schema-to-json@4.5.14`
|
||||
|
||||
## 4.5.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "trigger.dev",
|
||||
"version": "4.5.13",
|
||||
"version": "4.5.14",
|
||||
"description": "A Command-Line Interface for Trigger.dev projects",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
@@ -83,9 +83,9 @@
|
||||
"@opentelemetry/api-logs": "0.218.0",
|
||||
"@opentelemetry/instrumentation": "0.218.0",
|
||||
"@s2-dev/streamstore": "^0.25.0",
|
||||
"@trigger.dev/build": "workspace:4.5.13",
|
||||
"@trigger.dev/core": "workspace:4.5.13",
|
||||
"@trigger.dev/schema-to-json": "workspace:4.5.13",
|
||||
"@trigger.dev/build": "workspace:4.5.14",
|
||||
"@trigger.dev/core": "workspace:4.5.14",
|
||||
"@trigger.dev/schema-to-json": "workspace:4.5.14",
|
||||
"ansi-escapes": "^7.0.0",
|
||||
"braces": "^3.0.3",
|
||||
"c12": "^1.11.1",
|
||||
|
||||
@@ -1,5 +1,24 @@
|
||||
# internal-platform
|
||||
|
||||
## 4.5.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Realtime stream subscriptions can now refresh an expired access token and reconnect, via a new optional `refreshAccessToken` option on the client configuration and the React hooks. ([#4811](https://github.com/triggerdotdev/trigger.dev/pull/4811))
|
||||
- Subscribe to a realtime stream from its latest record instead of replaying the whole history. Pass `from: "latest"` to `useRealtimeStream`, `streams.read()`, or `fetchStream` to start at the current tail (the latest record, then live updates) instead of replaying (a live "last value" view), and `maxParts` to keep the accumulated `parts` array bounded. A reconnect or remount resumes from the last record it saw, so no records are missed and none are replayed. `from: "latest"` needs a server that supports it; older servers safely fall back to a full replay. ([#4811](https://github.com/triggerdotdev/trigger.dev/pull/4811))
|
||||
|
||||
`useRealtimeStream` also gains a `lastEventId` option and returns the `lastEventId` of the last part seen, so you can persist the cursor (for example across a page reload) and resume exactly where you left off. An `onParts` callback delivers each throttled batch of parts with their event ids.
|
||||
|
||||
```tsx
|
||||
const { parts, lastEventId } = useRealtimeStream<Frame>(runId, "frames", {
|
||||
from: "latest", // skip history, start at the current tail
|
||||
maxParts: 1, // keep only the most recent frame
|
||||
lastEventId: savedCursor, // resume from a persisted cursor
|
||||
onParts: (batch) => save(batch.at(-1)?.id), // track the cursor
|
||||
accessToken,
|
||||
});
|
||||
```
|
||||
|
||||
## 4.5.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@trigger.dev/core",
|
||||
"version": "4.5.13",
|
||||
"version": "4.5.14",
|
||||
"description": "Core code used across the Trigger.dev SDK and platform",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @trigger.dev/python
|
||||
|
||||
## 4.5.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies:
|
||||
- `@trigger.dev/core@4.5.14`
|
||||
- `@trigger.dev/sdk@4.5.14`
|
||||
- `@trigger.dev/build@4.5.14`
|
||||
|
||||
## 4.5.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@trigger.dev/python",
|
||||
"version": "4.5.13",
|
||||
"version": "4.5.14",
|
||||
"description": "Python runtime and build extension for Trigger.dev",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
@@ -45,7 +45,7 @@
|
||||
"check-exports": "attw --pack ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@trigger.dev/core": "workspace:4.5.13",
|
||||
"@trigger.dev/core": "workspace:4.5.14",
|
||||
"tinyexec": "^0.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -55,12 +55,12 @@
|
||||
"typescript": "catalog:",
|
||||
"tsx": "4.17.0",
|
||||
"@arethetypeswrong/cli": "^0.18.5",
|
||||
"@trigger.dev/build": "workspace:4.5.13",
|
||||
"@trigger.dev/sdk": "workspace:4.5.13"
|
||||
"@trigger.dev/build": "workspace:4.5.14",
|
||||
"@trigger.dev/sdk": "workspace:4.5.14"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@trigger.dev/sdk": "workspace:^4.5.13",
|
||||
"@trigger.dev/build": "workspace:^4.5.13"
|
||||
"@trigger.dev/sdk": "workspace:^4.5.14",
|
||||
"@trigger.dev/build": "workspace:^4.5.14"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.20.0"
|
||||
|
||||
@@ -1,5 +1,28 @@
|
||||
# @trigger.dev/react-hooks
|
||||
|
||||
## 4.5.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Realtime stream subscriptions can now refresh an expired access token and reconnect, via a new optional `refreshAccessToken` option on the client configuration and the React hooks. ([#4811](https://github.com/triggerdotdev/trigger.dev/pull/4811))
|
||||
- Subscribe to a realtime stream from its latest record instead of replaying the whole history. Pass `from: "latest"` to `useRealtimeStream`, `streams.read()`, or `fetchStream` to start at the current tail (the latest record, then live updates) instead of replaying (a live "last value" view), and `maxParts` to keep the accumulated `parts` array bounded. A reconnect or remount resumes from the last record it saw, so no records are missed and none are replayed. `from: "latest"` needs a server that supports it; older servers safely fall back to a full replay. ([#4811](https://github.com/triggerdotdev/trigger.dev/pull/4811))
|
||||
|
||||
`useRealtimeStream` also gains a `lastEventId` option and returns the `lastEventId` of the last part seen, so you can persist the cursor (for example across a page reload) and resume exactly where you left off. An `onParts` callback delivers each throttled batch of parts with their event ids.
|
||||
|
||||
```tsx
|
||||
const { parts, lastEventId } = useRealtimeStream<Frame>(runId, "frames", {
|
||||
from: "latest", // skip history, start at the current tail
|
||||
maxParts: 1, // keep only the most recent frame
|
||||
lastEventId: savedCursor, // resume from a persisted cursor
|
||||
onParts: (batch) => save(batch.at(-1)?.id), // track the cursor
|
||||
accessToken,
|
||||
});
|
||||
```
|
||||
|
||||
- Added a `useSessionStream` React hook for reading a session's output or input channel in realtime. It accumulates records with automatic resume from the last record you received, and supports `from: "latest"` (start at the current tail, only new records after you connect), `maxRecords` (keep a bounded number of records in memory), a `lastEventId` resume cursor, and an `onRecords` callback that delivers each throttled batch of records with their event ids. ([#4811](https://github.com/triggerdotdev/trigger.dev/pull/4811))
|
||||
- Updated dependencies:
|
||||
- `@trigger.dev/core@4.5.14`
|
||||
|
||||
## 4.5.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@trigger.dev/react-hooks",
|
||||
"version": "4.5.13",
|
||||
"version": "4.5.14",
|
||||
"description": "trigger.dev react hooks",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
@@ -37,7 +37,7 @@
|
||||
"check-exports": "attw --pack ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@trigger.dev/core": "workspace:^4.5.13",
|
||||
"@trigger.dev/core": "workspace:^4.5.14",
|
||||
"swr": "^2.2.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @trigger.dev/redis-worker
|
||||
|
||||
## 4.5.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies:
|
||||
- `@trigger.dev/core@4.5.14`
|
||||
|
||||
## 4.5.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@trigger.dev/redis-worker",
|
||||
"version": "4.5.13",
|
||||
"version": "4.5.14",
|
||||
"description": "Redis worker for trigger.dev",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
@@ -23,7 +23,7 @@
|
||||
"test": "vitest --sequence.concurrent=false --no-file-parallelism"
|
||||
},
|
||||
"dependencies": {
|
||||
"@trigger.dev/core": "workspace:4.5.13",
|
||||
"@trigger.dev/core": "workspace:4.5.14",
|
||||
"nanoid": "^5.1.16",
|
||||
"p-limit": "^6.2.0",
|
||||
"seedrandom": "^3.0.5",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @trigger.dev/rsc
|
||||
|
||||
## 4.5.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies:
|
||||
- `@trigger.dev/core@4.5.14`
|
||||
|
||||
## 4.5.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@trigger.dev/rsc",
|
||||
"version": "4.5.13",
|
||||
"version": "4.5.14",
|
||||
"description": "trigger.dev rsc",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
@@ -37,7 +37,7 @@
|
||||
"check-exports": "attw --pack ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@trigger.dev/core": "workspace:^4.5.13",
|
||||
"@trigger.dev/core": "workspace:^4.5.14",
|
||||
"mlly": "^1.7.1",
|
||||
"react": "19.0.0-rc.1",
|
||||
"react-dom": "19.0.0-rc.1"
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @trigger.dev/schema-to-json
|
||||
|
||||
## 4.5.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies:
|
||||
- `@trigger.dev/core@4.5.14`
|
||||
|
||||
## 4.5.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@trigger.dev/schema-to-json",
|
||||
"version": "4.5.13",
|
||||
"version": "4.5.14",
|
||||
"description": "Convert various schema validation libraries to JSON Schema",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
# @trigger.dev/sdk
|
||||
|
||||
## 4.5.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Subscribe to a realtime stream from its latest record instead of replaying the whole history. Pass `from: "latest"` to `useRealtimeStream`, `streams.read()`, or `fetchStream` to start at the current tail (the latest record, then live updates) instead of replaying (a live "last value" view), and `maxParts` to keep the accumulated `parts` array bounded. A reconnect or remount resumes from the last record it saw, so no records are missed and none are replayed. `from: "latest"` needs a server that supports it; older servers safely fall back to a full replay. ([#4811](https://github.com/triggerdotdev/trigger.dev/pull/4811))
|
||||
|
||||
`useRealtimeStream` also gains a `lastEventId` option and returns the `lastEventId` of the last part seen, so you can persist the cursor (for example across a page reload) and resume exactly where you left off. An `onParts` callback delivers each throttled batch of parts with their event ids.
|
||||
|
||||
```tsx
|
||||
const { parts, lastEventId } = useRealtimeStream<Frame>(runId, "frames", {
|
||||
from: "latest", // skip history, start at the current tail
|
||||
maxParts: 1, // keep only the most recent frame
|
||||
lastEventId: savedCursor, // resume from a persisted cursor
|
||||
onParts: (batch) => save(batch.at(-1)?.id), // track the cursor
|
||||
accessToken,
|
||||
});
|
||||
```
|
||||
|
||||
- Updated dependencies:
|
||||
- `@trigger.dev/core@4.5.14`
|
||||
|
||||
## 4.5.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@trigger.dev/sdk",
|
||||
"version": "4.5.13",
|
||||
"version": "4.5.14",
|
||||
"description": "trigger.dev Node.JS SDK",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
@@ -77,7 +77,7 @@
|
||||
"dependencies": {
|
||||
"@opentelemetry/api": "1.9.1",
|
||||
"@opentelemetry/semantic-conventions": "1.41.1",
|
||||
"@trigger.dev/core": "workspace:4.5.13",
|
||||
"@trigger.dev/core": "workspace:4.5.14",
|
||||
"uncrypto": "^0.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Generated
+11
-11
@@ -1481,7 +1481,7 @@ importers:
|
||||
specifier: ^6.10.0
|
||||
version: 6.19.0(magicast@0.3.5)
|
||||
'@trigger.dev/core':
|
||||
specifier: workspace:4.5.13
|
||||
specifier: workspace:4.5.14
|
||||
version: link:../core
|
||||
mlly:
|
||||
specifier: ^1.7.1
|
||||
@@ -1545,13 +1545,13 @@ importers:
|
||||
specifier: ^0.25.0
|
||||
version: 0.25.0(supports-color@10.0.0)
|
||||
'@trigger.dev/build':
|
||||
specifier: workspace:4.5.13
|
||||
specifier: workspace:4.5.14
|
||||
version: link:../build
|
||||
'@trigger.dev/core':
|
||||
specifier: workspace:4.5.13
|
||||
specifier: workspace:4.5.14
|
||||
version: link:../core
|
||||
'@trigger.dev/schema-to-json':
|
||||
specifier: workspace:4.5.13
|
||||
specifier: workspace:4.5.14
|
||||
version: link:../schema-to-json
|
||||
ansi-escapes:
|
||||
specifier: ^7.0.0
|
||||
@@ -1878,7 +1878,7 @@ importers:
|
||||
packages/python:
|
||||
dependencies:
|
||||
'@trigger.dev/core':
|
||||
specifier: workspace:4.5.13
|
||||
specifier: workspace:4.5.14
|
||||
version: link:../core
|
||||
tinyexec:
|
||||
specifier: ^0.3.2
|
||||
@@ -1888,10 +1888,10 @@ importers:
|
||||
specifier: ^0.18.5
|
||||
version: 0.18.5
|
||||
'@trigger.dev/build':
|
||||
specifier: workspace:4.5.13
|
||||
specifier: workspace:4.5.14
|
||||
version: link:../build
|
||||
'@trigger.dev/sdk':
|
||||
specifier: workspace:4.5.13
|
||||
specifier: workspace:4.5.14
|
||||
version: link:../trigger-sdk
|
||||
'@types/node':
|
||||
specifier: 24.13.3
|
||||
@@ -1912,7 +1912,7 @@ importers:
|
||||
packages/react-hooks:
|
||||
dependencies:
|
||||
'@trigger.dev/core':
|
||||
specifier: workspace:^4.5.13
|
||||
specifier: workspace:^4.5.14
|
||||
version: link:../core
|
||||
react:
|
||||
specifier: 18.3.1
|
||||
@@ -1946,7 +1946,7 @@ importers:
|
||||
packages/redis-worker:
|
||||
dependencies:
|
||||
'@trigger.dev/core':
|
||||
specifier: workspace:4.5.13
|
||||
specifier: workspace:4.5.14
|
||||
version: link:../core
|
||||
cron-parser:
|
||||
specifier: ^4.9.0
|
||||
@@ -1992,7 +1992,7 @@ importers:
|
||||
packages/rsc:
|
||||
dependencies:
|
||||
'@trigger.dev/core':
|
||||
specifier: workspace:^4.5.13
|
||||
specifier: workspace:^4.5.14
|
||||
version: link:../core
|
||||
mlly:
|
||||
specifier: ^1.7.1
|
||||
@@ -2078,7 +2078,7 @@ importers:
|
||||
specifier: 1.41.1
|
||||
version: 1.41.1
|
||||
'@trigger.dev/core':
|
||||
specifier: workspace:4.5.13
|
||||
specifier: workspace:4.5.14
|
||||
version: link:../core
|
||||
react:
|
||||
specifier: 18.3.1
|
||||
|
||||
Reference in New Issue
Block a user