diff --git a/.tools/update_node_examples.sh b/.tools/update_node_examples.sh index e1d43814..ecf1f664 100755 --- a/.tools/update_node_examples.sh +++ b/.tools/update_node_examples.sh @@ -19,9 +19,11 @@ bump_ts_sdk $PROJECT_ROOT/templates/typescript bump_ts_sdk $PROJECT_ROOT/templates/typescript-testing bump_ts_sdk_clients $PROJECT_ROOT/templates/typescript-testing bump_ts_sdk $PROJECT_ROOT/templates/typescript-lambda-cdk -bump_ts_sdk $PROJECT_ROOT/templates/cloudflare-worker bump_ts_sdk $PROJECT_ROOT/templates/bun +# Cloudflare workers has a different module +npm --prefix $PROJECT_ROOT/templates/cloudflare-worker install @restatedev/restate-sdk-cloudflare-workers@^$NEW_VERSION + # deno bump - it doesn't use a package.json, only import strings # -i works differently in gnu sed and mac (bsd) sed - best avoided tmp=$(mktemp) diff --git a/basics/basics-typescript/package.json b/basics/basics-typescript/package.json index e27d86a1..8a5b624b 100644 --- a/basics/basics-typescript/package.json +++ b/basics/basics-typescript/package.json @@ -16,8 +16,8 @@ "example-6": "ts-node-dev --transpile-only src/6_events_state.ts" }, "dependencies": { - "@restatedev/restate-sdk": "^1.3.3", - "@restatedev/restate-sdk-clients": "^1.3.3" + "@restatedev/restate-sdk": "^1.4.0", + "@restatedev/restate-sdk-clients": "^1.4.0" }, "devDependencies": { "@restatedev/restate": "^1.1.0", diff --git a/end-to-end-applications/typescript/ai-image-workflows/package.json b/end-to-end-applications/typescript/ai-image-workflows/package.json index 6e0067bf..fd44b73f 100644 --- a/end-to-end-applications/typescript/ai-image-workflows/package.json +++ b/end-to-end-applications/typescript/ai-image-workflows/package.json @@ -14,7 +14,7 @@ "workflow-service": "ts-node-dev --watch ./src --respawn --transpile-only src/workflow/workflow.ts" }, "dependencies": { - "@restatedev/restate-sdk": "^1.3.3", + "@restatedev/restate-sdk": "^1.4.0", "axios": "^1.6.7", "axios-retry": "^4.0.0", "express": "^4.18.2", diff --git a/end-to-end-applications/typescript/chat-bot/package.json b/end-to-end-applications/typescript/chat-bot/package.json index c838f5aa..aa2a44cf 100644 --- a/end-to-end-applications/typescript/chat-bot/package.json +++ b/end-to-end-applications/typescript/chat-bot/package.json @@ -11,7 +11,7 @@ "flights-task": "RESTATE_LOGGING=INFO ts-node-dev --watch ./src --transpile-only ./src/tasks/flight_prices.ts" }, "dependencies": { - "@restatedev/restate-sdk": "^1.3.3", + "@restatedev/restate-sdk": "^1.4.0", "@slack/bolt": "^3.19.0", "@slack/web-api": "^7.0.4" }, diff --git a/end-to-end-applications/typescript/food-ordering/app/package-lock.json b/end-to-end-applications/typescript/food-ordering/app/package-lock.json index 2280c7b8..f3106ad9 100644 --- a/end-to-end-applications/typescript/food-ordering/app/package-lock.json +++ b/end-to-end-applications/typescript/food-ordering/app/package-lock.json @@ -8,7 +8,7 @@ "name": "@restatedev/examples-e2e-food-ordering", "version": "0.8.0", "dependencies": { - "@restatedev/restate-sdk": "^1.3.3", + "@restatedev/restate-sdk": "^1.4.0", "@types/node": "^20.6.3", "@types/uuid": "^9.0.0", "axios": "^1.4.0", @@ -24,11 +24,6 @@ "typescript": "^5.0.2" } }, - "node_modules/@bufbuild/protobuf": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.8.0.tgz", - "integrity": "sha512-qR9FwI8QKIveDnUYutvfzbC21UZJJryYrLuZGjeZ/VGz+vXelUkK+xgkOHsvPEdYEdxtgUUq4313N8QtOehJ1Q==" - }, "node_modules/@esbuild/android-arm": { "version": "0.18.20", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", @@ -382,21 +377,22 @@ } }, "node_modules/@restatedev/restate-sdk": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@restatedev/restate-sdk/-/restate-sdk-1.3.3.tgz", - "integrity": "sha512-NY426F2qzbzkfpJ0uuw5Nm83o04LWoXbXAKgGlAobWNlGo2bBFEbucCE4Crmluqy9/uZd/HASlKFZO+zB8s0Ug==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@restatedev/restate-sdk/-/restate-sdk-1.4.0.tgz", + "integrity": "sha512-rNiK6eoDWf6S1WIB1WEODGr0QZ3aI95/gdvZ+Lst8XqN4NKuz6vNZvGvID/SI/v2/gXMpq2XaYzYAp+BtimqDQ==", + "license": "MIT", "dependencies": { - "@bufbuild/protobuf": "^1.8.0", - "@restatedev/restate-sdk-core": "^1.3.3" + "@restatedev/restate-sdk-core": "^1.4.0" }, "engines": { "node": ">= 18.13" } }, "node_modules/@restatedev/restate-sdk-core": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@restatedev/restate-sdk-core/-/restate-sdk-core-1.3.3.tgz", - "integrity": "sha512-PmxbIoOn9c5HWb5ESYpHOsL/yoSvpc5c6MWfnoc/RoGnZCSo+cPE9/x9aNZwzc8w+Hlk8J5A8dP+oy+MZzt1qQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@restatedev/restate-sdk-core/-/restate-sdk-core-1.4.0.tgz", + "integrity": "sha512-siSmtsMTCr+xxYB1cqjW0jDODzbkET1FUe+6X9txaMz8JqGLeEUdZHu6+SNtwZefFiLhvzk/f5Te3m6LTXy52Q==", + "license": "MIT", "engines": { "node": ">= 18.13" } diff --git a/end-to-end-applications/typescript/food-ordering/app/package.json b/end-to-end-applications/typescript/food-ordering/app/package.json index bfe55004..561b0c49 100644 --- a/end-to-end-applications/typescript/food-ordering/app/package.json +++ b/end-to-end-applications/typescript/food-ordering/app/package.json @@ -15,7 +15,7 @@ "app-dev": "RESTATE_DEBUG_LOGGING=JOURNAL ts-node-dev --watch src --respawn --transpile-only src/order-app/app.ts" }, "dependencies": { - "@restatedev/restate-sdk": "^1.3.3", + "@restatedev/restate-sdk": "^1.4.0", "@types/node": "^20.6.3", "@types/uuid": "^9.0.0", "axios": "^1.4.0", diff --git a/end-to-end-applications/typescript/food-ordering/webui/package-lock.json b/end-to-end-applications/typescript/food-ordering/webui/package-lock.json index 7baa3de8..4d5aacde 100644 --- a/end-to-end-applications/typescript/food-ordering/webui/package-lock.json +++ b/end-to-end-applications/typescript/food-ordering/webui/package-lock.json @@ -8,7 +8,7 @@ "name": "@restatedev/example-ecommerce-store-react-shopping-cart", "version": "0.1.0", "dependencies": { - "@restatedev/restate-sdk-clients": "^1.3.3", + "@restatedev/restate-sdk-clients": "^1.4.0", "axios": "^0.26.0", "react": "^18.0.0", "react-dom": "^18.0.0", @@ -2911,20 +2911,22 @@ } }, "node_modules/@restatedev/restate-sdk-clients": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@restatedev/restate-sdk-clients/-/restate-sdk-clients-1.3.3.tgz", - "integrity": "sha512-FlcwmIH34+HBiGY5wOKOjJvHeUNHBACZJBatFkRFagKdJLZ/XDBMF+oObblagu4hUDlmhMDPlXlpS8g+7fgq6A==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@restatedev/restate-sdk-clients/-/restate-sdk-clients-1.4.0.tgz", + "integrity": "sha512-1W+2lKE0PBpGUfXvE9bD4RnXL4DmR9pgUjiNsTRcd6KtlG05QxYKXR5yetXBm/RW2RMt85cSvl8FOc+X5jYabA==", + "license": "MIT", "dependencies": { - "@restatedev/restate-sdk-core": "^1.3.3" + "@restatedev/restate-sdk-core": "^1.4.0" }, "engines": { "node": ">= 18.13" } }, "node_modules/@restatedev/restate-sdk-core": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@restatedev/restate-sdk-core/-/restate-sdk-core-1.3.3.tgz", - "integrity": "sha512-PmxbIoOn9c5HWb5ESYpHOsL/yoSvpc5c6MWfnoc/RoGnZCSo+cPE9/x9aNZwzc8w+Hlk8J5A8dP+oy+MZzt1qQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@restatedev/restate-sdk-core/-/restate-sdk-core-1.4.0.tgz", + "integrity": "sha512-siSmtsMTCr+xxYB1cqjW0jDODzbkET1FUe+6X9txaMz8JqGLeEUdZHu6+SNtwZefFiLhvzk/f5Te3m6LTXy52Q==", + "license": "MIT", "engines": { "node": ">= 18.13" } @@ -18528,17 +18530,17 @@ } }, "@restatedev/restate-sdk-clients": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@restatedev/restate-sdk-clients/-/restate-sdk-clients-1.3.3.tgz", - "integrity": "sha512-FlcwmIH34+HBiGY5wOKOjJvHeUNHBACZJBatFkRFagKdJLZ/XDBMF+oObblagu4hUDlmhMDPlXlpS8g+7fgq6A==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@restatedev/restate-sdk-clients/-/restate-sdk-clients-1.4.0.tgz", + "integrity": "sha512-1W+2lKE0PBpGUfXvE9bD4RnXL4DmR9pgUjiNsTRcd6KtlG05QxYKXR5yetXBm/RW2RMt85cSvl8FOc+X5jYabA==", "requires": { - "@restatedev/restate-sdk-core": "^1.3.3" + "@restatedev/restate-sdk-core": "^1.4.0" } }, "@restatedev/restate-sdk-core": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@restatedev/restate-sdk-core/-/restate-sdk-core-1.3.3.tgz", - "integrity": "sha512-PmxbIoOn9c5HWb5ESYpHOsL/yoSvpc5c6MWfnoc/RoGnZCSo+cPE9/x9aNZwzc8w+Hlk8J5A8dP+oy+MZzt1qQ==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@restatedev/restate-sdk-core/-/restate-sdk-core-1.4.0.tgz", + "integrity": "sha512-siSmtsMTCr+xxYB1cqjW0jDODzbkET1FUe+6X9txaMz8JqGLeEUdZHu6+SNtwZefFiLhvzk/f5Te3m6LTXy52Q==" }, "@rollup/plugin-babel": { "version": "5.3.1", diff --git a/end-to-end-applications/typescript/food-ordering/webui/package.json b/end-to-end-applications/typescript/food-ordering/webui/package.json index c5b27340..f2446b04 100644 --- a/end-to-end-applications/typescript/food-ordering/webui/package.json +++ b/end-to-end-applications/typescript/food-ordering/webui/package.json @@ -6,7 +6,7 @@ "node": "14.17.3" }, "dependencies": { - "@restatedev/restate-sdk-clients": "^1.3.3", + "@restatedev/restate-sdk-clients": "^1.4.0", "axios": "^0.26.0", "react": "^18.0.0", "react-dom": "^18.0.0", diff --git a/patterns-use-cases/async-signals-payment/async-signals-payment-typescript/package.json b/patterns-use-cases/async-signals-payment/async-signals-payment-typescript/package.json index d6e172ef..cb89b369 100644 --- a/patterns-use-cases/async-signals-payment/async-signals-payment-typescript/package.json +++ b/patterns-use-cases/async-signals-payment/async-signals-payment-typescript/package.json @@ -9,7 +9,7 @@ "app-dev": "ts-node-dev --watch ./src --transpile-only ./src/payment_handler.ts" }, "dependencies": { - "@restatedev/restate-sdk": "^1.3.3", + "@restatedev/restate-sdk": "^1.4.0", "stripe": "^14.15.0" }, "devDependencies": { diff --git a/patterns-use-cases/durable-promises/durable-promises-typescript/package.json b/patterns-use-cases/durable-promises/durable-promises-typescript/package.json index 213ad17b..1f1cf4c4 100644 --- a/patterns-use-cases/durable-promises/durable-promises-typescript/package.json +++ b/patterns-use-cases/durable-promises/durable-promises-typescript/package.json @@ -14,8 +14,8 @@ "example3": "ts-node --transpile-only ./src/3_example_parallel_processes.ts" }, "dependencies": { - "@restatedev/restate-sdk": "^1.3.3", - "@restatedev/restate-sdk-clients": "^1.3.3" + "@restatedev/restate-sdk": "^1.4.0", + "@restatedev/restate-sdk-clients": "^1.4.0" }, "devDependencies": { "@restatedev/restate": "^1.1.0", diff --git a/patterns-use-cases/payment-state-machine/payment-state-machine-typescript/package.json b/patterns-use-cases/payment-state-machine/payment-state-machine-typescript/package.json index 78bfb8f9..e40a4638 100644 --- a/patterns-use-cases/payment-state-machine/payment-state-machine-typescript/package.json +++ b/patterns-use-cases/payment-state-machine/payment-state-machine-typescript/package.json @@ -13,7 +13,7 @@ "app-dev": "ts-node-dev --watch ./src --transpile-only ./src/payment_service.ts" }, "dependencies": { - "@restatedev/restate-sdk": "^1.3.3" + "@restatedev/restate-sdk": "^1.4.0" }, "devDependencies": { "@types/node": "^20.12.7", diff --git a/patterns-use-cases/sagas/sagas-typescript/package.json b/patterns-use-cases/sagas/sagas-typescript/package.json index 85d8f3e9..5cfa5cad 100644 --- a/patterns-use-cases/sagas/sagas-typescript/package.json +++ b/patterns-use-cases/sagas/sagas-typescript/package.json @@ -7,7 +7,7 @@ "build": "tsc --noEmitOnError" }, "dependencies": { - "@restatedev/restate-sdk": "^1.3.3" + "@restatedev/restate-sdk": "^1.4.0" }, "devDependencies": { "@types/node": "^20.12.7", diff --git a/patterns-use-cases/state-machines/state-machines-typescript/package.json b/patterns-use-cases/state-machines/state-machines-typescript/package.json index 2e0a487a..308da7bb 100644 --- a/patterns-use-cases/state-machines/state-machines-typescript/package.json +++ b/patterns-use-cases/state-machines/state-machines-typescript/package.json @@ -12,7 +12,7 @@ "example-crash": "CRASH_PROCESS=true ./utils/restart-process.sh 'RESTATE_DEBUG_LOGGING=OFF ts-node-dev --transpile-only src/state_machine.ts'" }, "dependencies": { - "@restatedev/restate-sdk": "^1.3.3" + "@restatedev/restate-sdk": "^1.4.0" }, "devDependencies": { "@restatedev/restate": "^1.1.0", diff --git a/templates/bun/package.json b/templates/bun/package.json index edc7978f..01187dfa 100644 --- a/templates/bun/package.json +++ b/templates/bun/package.json @@ -9,7 +9,7 @@ "format": "prettier --write \"src/*.+(js|ts|json)\"" }, "dependencies": { - "@restatedev/restate-sdk": "^1.3.3" + "@restatedev/restate-sdk": "^1.4.0" }, "devDependencies": { "@types/bun": "^1.1.5", diff --git a/templates/cloudflare-worker/package.json b/templates/cloudflare-worker/package.json index 1ce92832..aed60be6 100644 --- a/templates/cloudflare-worker/package.json +++ b/templates/cloudflare-worker/package.json @@ -10,12 +10,12 @@ "format": "prettier --write \"src/*.+(js|ts|json)\"" }, "dependencies": { - "@restatedev/restate-sdk": "^1.3.3" + "@restatedev/restate-sdk-cloudflare-workers": "^1.4.0" }, "devDependencies": { "@cloudflare/workers-types": "^4.20240605.0", "prettier": "^3.3.2", "typescript": "^5.4.5", - "wrangler": "^3.0.0" + "wrangler": "^3.81.0" } } diff --git a/templates/cloudflare-worker/src/index.ts b/templates/cloudflare-worker/src/index.ts index 42101cc4..c1340170 100644 --- a/templates/cloudflare-worker/src/index.ts +++ b/templates/cloudflare-worker/src/index.ts @@ -1,4 +1,4 @@ -import { Context, endpoint, service } from "@restatedev/restate-sdk/fetch"; +import { Context, endpoint, service } from "@restatedev/restate-sdk-cloudflare-workers/fetch"; // Template of a Restate service and handler // diff --git a/templates/deno/main.ts b/templates/deno/main.ts index 339aa98d..e695a61d 100644 --- a/templates/deno/main.ts +++ b/templates/deno/main.ts @@ -2,7 +2,7 @@ import { Context, endpoint, service, -} from "npm:@restatedev/restate-sdk@^1.2.1/fetch"; +} from "npm:@restatedev/restate-sdk@^1.4.0/fetch"; // Template of a Restate service and handler // diff --git a/templates/typescript-testing/package.json b/templates/typescript-testing/package.json index b9a46ea6..53ef0707 100644 --- a/templates/typescript-testing/package.json +++ b/templates/typescript-testing/package.json @@ -14,8 +14,8 @@ "test": "DEBUG=testcontainers,testcontainers:exec,testcontainers:containers jest --maxWorkers=1 --detectOpenHandles" }, "dependencies": { - "@restatedev/restate-sdk": "^1.3.3", - "@restatedev/restate-sdk-clients": "^1.3.3" + "@restatedev/restate-sdk": "^1.4.0", + "@restatedev/restate-sdk-clients": "^1.4.0" }, "devDependencies": { "@types/jest": "^29.4.0", diff --git a/templates/typescript-testing/test/restate_test_environment.ts b/templates/typescript-testing/test/restate_test_environment.ts index 1845e450..25b0d304 100644 --- a/templates/typescript-testing/test/restate_test_environment.ts +++ b/templates/typescript-testing/test/restate_test_environment.ts @@ -37,14 +37,15 @@ async function prepareRestateTestContainer( restateServerPort: number ): Promise { const restateContainer = new GenericContainer( - "docker.io/restatedev/restate:1.0.1" + "docker.io/restatedev/restate:1.1" ) // Expose ports .withExposedPorts(8080, 9070) // Wait start on health checks .withWaitStrategy( Wait.forAll([ - Wait.forHttp("/health", 9070), + Wait.forHttp("/restate/health", 8080), + Wait.forHttp("/health", 9070) ]) ); diff --git a/templates/typescript/package.json b/templates/typescript/package.json index 33e30c7b..6705371e 100644 --- a/templates/typescript/package.json +++ b/templates/typescript/package.json @@ -13,7 +13,7 @@ "app-dev": "ts-node-dev --watch ./src --respawn --transpile-only ./src/app.ts" }, "dependencies": { - "@restatedev/restate-sdk": "^1.3.3" + "@restatedev/restate-sdk": "^1.4.0" }, "devDependencies": { "@types/node": "^20.14.2", diff --git a/tutorials/tour-of-restate-typescript/package.json b/tutorials/tour-of-restate-typescript/package.json index d80737c9..9f3c3c59 100644 --- a/tutorials/tour-of-restate-typescript/package.json +++ b/tutorials/tour-of-restate-typescript/package.json @@ -20,7 +20,7 @@ "author": "Restate Developers", "email": "code@restate.dev", "dependencies": { - "@restatedev/restate-sdk": "^1.3.3", + "@restatedev/restate-sdk": "^1.4.0", "uuid": "^9.0.0" }, "devDependencies": {