@temporalio/core-bridge 1.12.0 → 1.12.1
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/index.js +3 -2
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const { isPromise } = require('node:util/types');
|
|
1
2
|
const { getPrebuiltPath } = require('./common');
|
|
2
3
|
const typescriptExports = require('./lib/index');
|
|
3
4
|
const { convertFromNamedError } = require('./lib/errors');
|
|
@@ -9,7 +10,7 @@ function wrapErrors(fn) {
|
|
|
9
10
|
return (...args) => {
|
|
10
11
|
try {
|
|
11
12
|
let res = fn(...args);
|
|
12
|
-
if (res
|
|
13
|
+
if (isPromise(res)) {
|
|
13
14
|
return res.catch((e) => {
|
|
14
15
|
throw convertFromNamedError(e, false);
|
|
15
16
|
});
|
|
@@ -55,7 +56,7 @@ if (process.env.TEMPORAL_TRACE_NATIVE_CALLS?.toLowerCase() === 'true') {
|
|
|
55
56
|
|
|
56
57
|
let res = fn(...args);
|
|
57
58
|
|
|
58
|
-
if (res
|
|
59
|
+
if (isPromise(res)) {
|
|
59
60
|
log(callid, `${fnname}() - received promise`);
|
|
60
61
|
return res.then(
|
|
61
62
|
(x) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temporalio/core-bridge",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.1",
|
|
4
4
|
"description": "Temporal.io SDK Core<>Node bridge",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@grpc/grpc-js": "^1.12.4",
|
|
26
|
-
"@temporalio/common": "1.12.
|
|
26
|
+
"@temporalio/common": "1.12.1",
|
|
27
27
|
"arg": "^5.0.2",
|
|
28
28
|
"cargo-cp-artifact": "^0.1.8",
|
|
29
29
|
"which": "^4.0.0"
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "0e30a8f5a56dceb20fe623e0fa0b329a32b5f117"
|
|
60
60
|
}
|