Skip to content

Commit 21e7d24

Browse files
Updates (#381)
* Update TS SDK examples to 1.12 * Fix markdown * Fix deprecated API usages
1 parent 394792f commit 21e7d24

36 files changed

Lines changed: 170 additions & 52 deletions

File tree

python/end-to-end-applications/rag-ingestion/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This demo:
77
* Shows how to use Restate as a reliable and resilient recipient of webhook events
88
* How to invoke workflows based on the webhook event
99
* How to use [LangChain](https://www.langchain.com/) with Restate
10-
* Using Restate's [workflows in Python](https://docs.restate.dev/develop/python/workflows).
10+
* Using Restate's [workflows in Python](https://docs.restate.dev/develop/python/services#workflows).
1111

1212
Whenever a new file is uploaded to MinIO, it triggers a webhook event that is sent to a webhook endpoint.
1313
The webhook endpoint is here a Restate handler (docs/webhook), that durable persists and processes all incoming events.

typescript/basics/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"example-3": "ts-node-dev --transpile-only src/3_workflows.ts"
1515
},
1616
"dependencies": {
17-
"@restatedev/restate-sdk": "^1.11.1",
18-
"@restatedev/restate-sdk-clients": "^1.11.1"
17+
"@restatedev/restate-sdk": "^1.12.0",
18+
"@restatedev/restate-sdk-clients": "^1.12.0"
1919
},
2020
"devDependencies": {
2121
"@types/node": "^20.12.12",

typescript/end-to-end-applications/ai-image-workflows/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"stable-diffusion-service": "ts-node-dev --watch ./src --respawn --transpile-only src/stable_diffusion.ts"
1313
},
1414
"dependencies": {
15-
"@restatedev/restate-sdk": "^1.11.1",
15+
"@restatedev/restate-sdk": "^1.12.0",
1616
"axios": "^1.6.7",
1717
"axios-retry": "^4.0.0",
1818
"jimp": "^0.22.10",

typescript/end-to-end-applications/chat-bot/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"flights-task": "RESTATE_LOGGING=INFO ts-node-dev --watch ./src --transpile-only ./src/tasks/flight_prices.ts"
1212
},
1313
"dependencies": {
14-
"@restatedev/restate-sdk": "^1.11.1",
14+
"@restatedev/restate-sdk": "^1.12.0",
1515
"@slack/bolt": "^3.19.0",
1616
"@slack/web-api": "^7.0.4"
1717
},

typescript/end-to-end-applications/chat-bot/src/chat.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ async function interpretCommand(
196196
if (e instanceof Error) {
197197
throw new restate.TerminalError(
198198
`Failed to interpret command: ${e.message}\nCommand:\n${command}`,
199-
{ cause: e },
200199
);
201200
}
202201
throw new restate.TerminalError(`Failed to interpret command: ${e}\nCommand:\n${command}`);
@@ -232,7 +231,6 @@ function parseGptResponse(response: string): GptTaskCommand {
232231
} catch (e: any) {
233232
throw new restate.TerminalError(
234233
`Malformed response from LLM: ${e.message}.\nRaw response:\n${response}`,
235-
{ cause: e },
236234
);
237235
}
238236
}

typescript/end-to-end-applications/chat-bot/src/util/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function httpResponseToError(statusCode: number, bodyText: string): Promi
5555
export function checkRethrowTerminalError(e: unknown): never {
5656
if (e instanceof ReferenceError) {
5757
// a bug in the code is terminal
58-
throw new TerminalError("Error in the code: " + e.message, { cause: e });
58+
throw new TerminalError("Error in the code: " + e.message);
5959
}
6060

6161
throw e;

typescript/end-to-end-applications/food-ordering/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"dev": "RESTATE_DEBUG_LOGGING=JOURNAL ts-node-dev --watch src --respawn --transpile-only src/order-app/app.ts"
1717
},
1818
"dependencies": {
19-
"@restatedev/restate-sdk": "^1.11.1",
19+
"@restatedev/restate-sdk": "^1.12.0",
2020
"@types/node": "^20.6.3",
2121
"@types/uuid": "^9.0.0",
2222
"axios": "^1.4.0",

typescript/end-to-end-applications/food-ordering/webui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"node": "14.17.3"
77
},
88
"dependencies": {
9-
"@restatedev/restate-sdk-clients": "^1.11.1",
9+
"@restatedev/restate-sdk-clients": "^1.12.0",
1010
"axios": "^0.26.0",
1111
"react": "^18.0.0",
1212
"react-dom": "^18.0.0",

typescript/integrations/deployment-lambda-cdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"typescript": "^5.5.4"
2424
},
2525
"dependencies": {
26-
"@restatedev/restate-sdk": "^1.11.1",
26+
"@restatedev/restate-sdk": "^1.12.0",
2727
"aws-cdk-lib": "^2.155.0",
2828
"constructs": "^10.3.0",
2929
"source-map-support": "^0.5.21"

typescript/patterns-use-cases/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"format": "prettier --ignore-path .eslintignore --write \"**/*.+(js|ts|json)\""
1010
},
1111
"dependencies": {
12-
"@restatedev/restate-sdk": "^1.11.1",
13-
"@restatedev/restate-sdk-clients": "^1.11.1",
12+
"@restatedev/restate-sdk": "^1.12.0",
13+
"@restatedev/restate-sdk-clients": "^1.12.0",
1414
"cron-parser": "^5.2.0",
1515
"express": "^5.2.1",
1616
"pg": "^8.10.0",

0 commit comments

Comments
 (0)