@friggframework/core 2.0.0--canary.460.8b85ecb.0 → 2.0.0--canary.460.ef50528.0
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/handlers/backend-utils.js +19 -9
- package/package.json +5 -5
|
@@ -132,15 +132,25 @@ const createQueueWorker = (integrationClass) => {
|
|
|
132
132
|
class QueueWorker extends Worker {
|
|
133
133
|
async _run(params, context) {
|
|
134
134
|
try {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
135
|
+
if (params.event === 'ON_WEBHOOK') {
|
|
136
|
+
if (!params.data?.integrationId) {
|
|
137
|
+
throw new Error(
|
|
138
|
+
'integrationId is required in data for ON_WEBHOOK event'
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
integrationInstance = await loadIntegrationForWebhook(
|
|
143
|
+
params.data.integrationId
|
|
144
|
+
);
|
|
145
|
+
} else if (params.data?.processId) {
|
|
146
|
+
integrationInstance = await loadIntegrationForProcess(
|
|
147
|
+
params.data.processId,
|
|
148
|
+
integrationClass
|
|
149
|
+
);
|
|
150
|
+
} else {
|
|
151
|
+
// Instantiates a DRY integration class without database records
|
|
152
|
+
integrationInstance = new integrationClass();
|
|
153
|
+
}
|
|
144
154
|
|
|
145
155
|
const dispatcher = new IntegrationEventDispatcher(
|
|
146
156
|
integrationInstance
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/core",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.460.
|
|
4
|
+
"version": "2.0.0--canary.460.ef50528.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@hapi/boom": "^10.0.1",
|
|
7
7
|
"@prisma/client": "^6.16.3",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"uuid": "^9.0.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@friggframework/eslint-config": "2.0.0--canary.460.
|
|
27
|
-
"@friggframework/prettier-config": "2.0.0--canary.460.
|
|
28
|
-
"@friggframework/test": "2.0.0--canary.460.
|
|
26
|
+
"@friggframework/eslint-config": "2.0.0--canary.460.ef50528.0",
|
|
27
|
+
"@friggframework/prettier-config": "2.0.0--canary.460.ef50528.0",
|
|
28
|
+
"@friggframework/test": "2.0.0--canary.460.ef50528.0",
|
|
29
29
|
"@types/lodash": "4.17.15",
|
|
30
30
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
31
31
|
"chai": "^4.3.6",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "ef50528e85534659a61cdc909e77babffc6ae0f7"
|
|
68
68
|
}
|