ws-process 0.3.45 → 0.3.46
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 +6 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import axios from 'axios';
|
|
4
4
|
import * as Sentry from '@sentry/react';
|
|
5
5
|
import {
|
|
6
|
-
defined, clone, makeid, tryit,
|
|
6
|
+
defined, clone, makeid, tryit, wait,
|
|
7
7
|
} from '@bsgp/lib-core';
|
|
8
8
|
import { ref, Loading, getRef } from './Loading-esm';
|
|
9
9
|
import {
|
|
@@ -536,6 +536,7 @@ function handleResponseHandler(res, getState, isLast = true, isFirst = true) {
|
|
|
536
536
|
local.dispatch(
|
|
537
537
|
updateWSProcess(res.processID, {
|
|
538
538
|
jsonResponse: res,
|
|
539
|
+
cbData,
|
|
539
540
|
}),
|
|
540
541
|
);
|
|
541
542
|
|
|
@@ -1170,7 +1171,7 @@ function runProcess(processID, data) {
|
|
|
1170
1171
|
: prcItem.reqParameters;
|
|
1171
1172
|
if (!reqParameters) {
|
|
1172
1173
|
local.afterEachProcess(prc, local.wsProcess.processes);
|
|
1173
|
-
prc.reject({ requestIsFalsy: true, message: 'No request to send, process is stopped' });
|
|
1174
|
+
prc.reject({ requestIsFalsy: true, message: 'No request to send, process is stopped', cbData: prevPrcItem.cbData });
|
|
1174
1175
|
wrapClearWSProcess(processID);
|
|
1175
1176
|
return;
|
|
1176
1177
|
}
|
|
@@ -1212,12 +1213,13 @@ function runProcess(processID, data) {
|
|
|
1212
1213
|
}),
|
|
1213
1214
|
);
|
|
1214
1215
|
|
|
1215
|
-
|
|
1216
|
+
const delaySeconds = prcItem.delaySeconds || 0;
|
|
1217
|
+
wait(delaySeconds).then(() => dispatch(
|
|
1216
1218
|
asyncSend({
|
|
1217
1219
|
...(reqParameters || prcItem.reqParameters),
|
|
1218
1220
|
processID,
|
|
1219
1221
|
}),
|
|
1220
|
-
)
|
|
1222
|
+
))
|
|
1221
1223
|
.then((dataInner) => {
|
|
1222
1224
|
const prcInner = local.wsProcess.processes[dataInner.processID];
|
|
1223
1225
|
const promise = dispatch(
|