@oneuptime/common 7.0.3697 → 7.0.3699
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.
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
ExpressRequest,
|
|
3
|
+
ExpressResponse,
|
|
4
|
+
NextFunction,
|
|
5
|
+
} from "../../../Utils/Express";
|
|
2
6
|
import Response from "../../../Utils/Response";
|
|
3
7
|
import { RunOptions, RunReturnType } from "../ComponentCode";
|
|
4
8
|
import TriggerCode, { ExecuteWorkflowType, InitProps } from "../TriggerCode";
|
|
@@ -48,15 +52,23 @@ export default class WebhookTrigger extends TriggerCode {
|
|
|
48
52
|
public override async init(props: InitProps): Promise<void> {
|
|
49
53
|
props.router.get(
|
|
50
54
|
`/trigger/:workflowId`,
|
|
51
|
-
async (req: ExpressRequest, res: ExpressResponse) => {
|
|
52
|
-
|
|
55
|
+
async (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => {
|
|
56
|
+
try {
|
|
57
|
+
await this.initTrigger(req, res, props);
|
|
58
|
+
} catch (e) {
|
|
59
|
+
next(e);
|
|
60
|
+
}
|
|
53
61
|
},
|
|
54
62
|
);
|
|
55
63
|
|
|
56
64
|
props.router.post(
|
|
57
65
|
`/trigger/:workflowId`,
|
|
58
|
-
async (req: ExpressRequest, res: ExpressResponse) => {
|
|
59
|
-
|
|
66
|
+
async (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => {
|
|
67
|
+
try {
|
|
68
|
+
await this.initTrigger(req, res, props);
|
|
69
|
+
} catch (e) {
|
|
70
|
+
next(e);
|
|
71
|
+
}
|
|
60
72
|
},
|
|
61
73
|
);
|
|
62
74
|
}
|
|
@@ -28,11 +28,21 @@ export default class WebhookTrigger extends TriggerCode {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
async init(props) {
|
|
31
|
-
props.router.get(`/trigger/:workflowId`, async (req, res) => {
|
|
32
|
-
|
|
31
|
+
props.router.get(`/trigger/:workflowId`, async (req, res, next) => {
|
|
32
|
+
try {
|
|
33
|
+
await this.initTrigger(req, res, props);
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
next(e);
|
|
37
|
+
}
|
|
33
38
|
});
|
|
34
|
-
props.router.post(`/trigger/:workflowId`, async (req, res) => {
|
|
35
|
-
|
|
39
|
+
props.router.post(`/trigger/:workflowId`, async (req, res, next) => {
|
|
40
|
+
try {
|
|
41
|
+
await this.initTrigger(req, res, props);
|
|
42
|
+
}
|
|
43
|
+
catch (e) {
|
|
44
|
+
next(e);
|
|
45
|
+
}
|
|
36
46
|
});
|
|
37
47
|
}
|
|
38
48
|
async initTrigger(req, res, props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Webhook.js","sourceRoot":"","sources":["../../../../../../Server/Types/Workflow/Components/Webhook.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Webhook.js","sourceRoot":"","sources":["../../../../../../Server/Types/Workflow/Components/Webhook.ts"],"names":[],"mappings":"AAKA,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAE/C,OAAO,WAA+C,MAAM,gBAAgB,CAAC;AAC7E,OAAO,gBAAgB,MAAM,yCAAyC,CAAC;AAEvE,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAE7C,OAAO,WAAW,MAAM,mCAAmC,CAAC;AAC5D,OAAO,iBAAiB,MAAM,0CAA0C,CAAC;AAEzE,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACrD;QACE,KAAK,EAAE,CAAC;QACR,MAAM,gBAAgB,GACpB,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAoB,EAAE,EAAE;YAC9C,OAAO,CAAC,CAAC,EAAE,KAAK,WAAW,CAAC,OAAO,CAAC;QACtC,CAAC,CAAC,CAAC;QAEL,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,MAAM,IAAI,gBAAgB,CA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;IAEM,KAAK,CAAC,WAAW,CACtB,GAAmB,EACnB,GAAoB,EACpB,KAAgB;QAEhB,cAAc;QAEd,kDAAkD;QAElD,MAAM,eAAe,GAAwB;YAC3C,UAAU,EAAE,IAAI,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAW,CAAC;YAC5D,YAAY,EAAE;gBACZ,iBAAiB,EAAE,GAAG,CAAC,OAAO;gBAC9B,gBAAgB,EAAE,GAAG,CAAC,KAAK;gBAC3B,cAAc,EAAE,GAAG,CAAC,IAAI;aACzB;SACF,CAAC;QAEF,MAAM,KAAK,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;QAE7C,QAAQ,CAAC,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;IACrE,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneuptime/common",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3699",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"airtable": "^0.12.2",
|
|
78
78
|
"axios": "^1.7.2",
|
|
79
79
|
"bullmq": "^5.3.3",
|
|
80
|
-
"Common": "npm:@oneuptime/common@7.0.
|
|
80
|
+
"Common": "npm:@oneuptime/common@7.0.3699",
|
|
81
81
|
"cookie-parser": "^1.4.7",
|
|
82
82
|
"cors": "^2.8.5",
|
|
83
83
|
"cron-parser": "^4.8.1",
|