Skip to content

Commit 4783bbb

Browse files
committed
Rebase over SDK 1.13.0 release
1 parent fdbd9d0 commit 4783bbb

5 files changed

Lines changed: 82 additions & 20 deletions

File tree

nexus-hello/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "temporal-hello-world",
2+
"name": "nexus-hello",
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
@@ -22,16 +22,16 @@
2222
]
2323
},
2424
"dependencies": {
25-
"@temporalio/activity": "file:///Users/jwatkins/Development/Temporal/TypeScriptSDK/sdk-typescript-2//packages/activity",
26-
"@temporalio/client": "file:///Users/jwatkins/Development/Temporal/TypeScriptSDK/sdk-typescript-2//packages/client",
27-
"@temporalio/nexus": "file:///Users/jwatkins/Development/Temporal/TypeScriptSDK/sdk-typescript-2//packages/nexus",
28-
"@temporalio/worker": "file:///Users/jwatkins/Development/Temporal/TypeScriptSDK/sdk-typescript-2//packages/worker",
29-
"@temporalio/workflow": "file:///Users/jwatkins/Development/Temporal/TypeScriptSDK/sdk-typescript-2//packages/workflow",
25+
"@temporalio/activity": "^1.13.0",
26+
"@temporalio/client": "^1.13.0",
27+
"@temporalio/nexus": "^1.13.0",
28+
"@temporalio/worker": "^1.13.0",
29+
"@temporalio/workflow": "^1.13.0",
3030
"nexus-rpc": "^0.0.1",
3131
"nanoid": "3.x"
3232
},
3333
"devDependencies": {
34-
"@temporalio/testing": "file:///Users/jwatkins/Development/Temporal/TypeScriptSDK/sdk-typescript-2//packages/testing",
34+
"@temporalio/testing": "^1.13.0",
3535
"@tsconfig/node18": "^18.2.4",
3636
"@types/mocha": "8.x",
3737
"@types/node": "^22.9.1",
@@ -46,4 +46,4 @@
4646
"ts-node": "^10.9.2",
4747
"typescript": "^5.6.3"
4848
}
49-
}
49+
}

nexus-hello/src/caller/worker.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import { NativeConnection, Worker } from '@temporalio/worker';
22

3-
43
async function run() {
54
const connection = await NativeConnection.connect({
65
address: 'localhost:7233',
76
});
87
try {
98
const namespace = 'my-caller-namespace';
10-
const callerTaskQueue = 'nexus-hello-caller-task-queue'
9+
const callerTaskQueue = 'nexus-hello-caller-task-queue';
1110
const worker = await Worker.create({
1211
connection,
1312
namespace,

nexus-hello/src/caller/workflows.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ export async function echoCallerWorkflow(message: string): Promise<string> {
1010
endpoint: HELLO_SERVICE_ENDPOINT,
1111
});
1212

13-
const result = await nexusClient.executeOperation(
14-
'echo',
15-
{ message },
16-
{ scheduleToCloseTimeout: '10s' }
17-
);
13+
const result = await nexusClient.executeOperation('echo', { message }, { scheduleToCloseTimeout: '10s' });
1814

1915
return result.message;
2016
}
@@ -28,7 +24,7 @@ export async function helloCallerWorkflow(name: string, language: LanguageCode):
2824
const helloResult = await nexusClient.executeOperation(
2925
'hello',
3026
{ name, language },
31-
{ scheduleToCloseTimeout: '10s' }
27+
{ scheduleToCloseTimeout: '10s' },
3228
);
3329

3430
return helloResult.message;

nexus-hello/src/service/handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const helloServiceHandler = nexus.serviceHandler(helloService, {
1414
// You may also access a Temporal Client by calling `temporalNexus.getClient()`.
1515
// That Client can be used to make arbitrary calls, such as signaling, querying,
1616
// or listing workflows.
17-
return input
17+
return input;
1818
},
1919
hello: new temporalNexus.WorkflowRunOperationHandler<HelloInput, HelloOutput>(
2020
// WorkflowRunOperationHandler takes a function that receives the Operation's context and input.

pnpm-lock.yaml

Lines changed: 70 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)