@temporalio/nexus 1.17.1 → 1.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/context.d.ts +6 -0
- package/lib/context.js +1 -0
- package/lib/context.js.map +1 -1
- package/package.json +20 -6
- package/src/context.ts +8 -0
package/lib/context.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export interface HandlerContext {
|
|
|
15
15
|
client: Client;
|
|
16
16
|
namespace: string;
|
|
17
17
|
taskQueue: string;
|
|
18
|
+
endpoint: string;
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
20
21
|
* Holds information about the current Nexus Operation Execution.
|
|
@@ -30,6 +31,11 @@ export interface OperationInfo {
|
|
|
30
31
|
* Task Queue this Nexus Operation is executing on
|
|
31
32
|
*/
|
|
32
33
|
readonly taskQueue: string;
|
|
34
|
+
/**
|
|
35
|
+
* Nexus Endpoint this Operation was routed through.
|
|
36
|
+
* Only available with server version 1.30.0 or later.
|
|
37
|
+
*/
|
|
38
|
+
readonly endpoint: string;
|
|
33
39
|
}
|
|
34
40
|
/**
|
|
35
41
|
* A logger for use in Nexus Handler scope.
|
package/lib/context.js
CHANGED
package/lib/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;;AAaA,8CAMC;
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;;AAaA,8CAMC;AAyGD,8BAEC;AASD,sCAOC;AA9ID,uDAAqD;AAIrD,oGAAoG;AAEpG,0EAA0E;AAC1E,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;AACjF,IAAI,CAAE,UAAkB,CAAC,uBAAuB,CAAC,EAAE,CAAC;IACjD,UAAkB,CAAC,uBAAuB,CAAC,GAAG,IAAI,oCAAiB,EAAkB,CAAC;AACzF,CAAC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AgB;IACtC,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW;QACnC,OAAO,iBAAiB,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;IAC5E,CAAC;IACD,eAAe,CAAC,IAAI,EAAE,SAAS,GAAG,KAAK,EAAE,IAAI,EAAE,WAAW;QACxD,OAAO,iBAAiB,EAAE,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;IACzF,CAAC;IACD,WAAW,CAAC,IAAI,EAAE,SAAS,GAAG,KAAK,EAAE,IAAI,EAAE,WAAW;QACpD,OAAO,iBAAiB,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;IACrF,CAAC;IACD,QAAQ,CAAC,IAAI;QACX,OAAO,iBAAiB,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;CACF,CAAC;AAEF;;;;;GAKG;AACH,SAAgB,SAAS;IACvB,OAAO,iBAAiB,EAAE,CAAC,MAAM,CAAC;AACpC,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,aAAa;IAC3B,MAAM,GAAG,GAAG,iBAAiB,EAAE,CAAC;IAChC,OAAO;QACL,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,QAAQ,EAAE,GAAG,CAAC,QAAQ;KACvB,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temporalio/nexus",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.2",
|
|
4
4
|
"description": "Temporal.io SDK Nexus sub-package",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -12,12 +12,20 @@
|
|
|
12
12
|
],
|
|
13
13
|
"author": "Temporal Technologies Inc. <sdk@temporal.io>",
|
|
14
14
|
"license": "MIT",
|
|
15
|
+
"ava": {
|
|
16
|
+
"timeout": "60s",
|
|
17
|
+
"concurrency": 1,
|
|
18
|
+
"workerThreads": false
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"ava": "^5.3.1"
|
|
22
|
+
},
|
|
15
23
|
"dependencies": {
|
|
16
24
|
"long": "^5.2.3",
|
|
17
25
|
"nexus-rpc": "^0.0.2",
|
|
18
|
-
"@temporalio/client": "1.17.
|
|
19
|
-
"@temporalio/common": "1.17.
|
|
20
|
-
"@temporalio/proto": "1.17.
|
|
26
|
+
"@temporalio/client": "1.17.2",
|
|
27
|
+
"@temporalio/common": "1.17.2",
|
|
28
|
+
"@temporalio/proto": "1.17.2"
|
|
21
29
|
},
|
|
22
30
|
"bugs": {
|
|
23
31
|
"url": "https://github.com/temporalio/sdk-typescript/issues"
|
|
@@ -36,6 +44,12 @@
|
|
|
36
44
|
},
|
|
37
45
|
"files": [
|
|
38
46
|
"src",
|
|
39
|
-
"lib"
|
|
40
|
-
|
|
47
|
+
"lib",
|
|
48
|
+
"!src/__tests__",
|
|
49
|
+
"!lib/__tests__"
|
|
50
|
+
],
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "tsc --build",
|
|
53
|
+
"test": "ava ./lib/__tests__/test-*.js"
|
|
54
|
+
}
|
|
41
55
|
}
|
package/src/context.ts
CHANGED
|
@@ -31,6 +31,7 @@ export interface HandlerContext {
|
|
|
31
31
|
client: Client;
|
|
32
32
|
namespace: string;
|
|
33
33
|
taskQueue: string;
|
|
34
|
+
endpoint: string;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
/**
|
|
@@ -48,6 +49,12 @@ export interface OperationInfo {
|
|
|
48
49
|
* Task Queue this Nexus Operation is executing on
|
|
49
50
|
*/
|
|
50
51
|
readonly taskQueue: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Nexus Endpoint this Operation was routed through.
|
|
55
|
+
* Only available with server version 1.30.0 or later.
|
|
56
|
+
*/
|
|
57
|
+
readonly endpoint: string;
|
|
51
58
|
}
|
|
52
59
|
|
|
53
60
|
// Basic APIs //////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -131,5 +138,6 @@ export function operationInfo(): OperationInfo {
|
|
|
131
138
|
return {
|
|
132
139
|
namespace: ctx.namespace,
|
|
133
140
|
taskQueue: ctx.taskQueue,
|
|
141
|
+
endpoint: ctx.endpoint,
|
|
134
142
|
};
|
|
135
143
|
}
|