@friggframework/core 2.0.0-next.21 → 2.0.0-next.22

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.
@@ -39,7 +39,7 @@ const loadRouterFromObject = (IntegrationClass, routerObject) => {
39
39
 
40
40
  return router;
41
41
  };
42
- const createQueueWorker = (integrationClass) => {
42
+ const createQueueWorker = (integrationClass, integrationFactory) => {
43
43
  class QueueWorker extends Worker {
44
44
  async _run(params, context) {
45
45
  try {
@@ -54,11 +54,11 @@ const createQueueWorker = (integrationClass) => {
54
54
  );
55
55
  } else {
56
56
  instance =
57
- await integrationClass.getInstanceFromIntegrationId({
57
+ await integrationFactory.getInstanceFromIntegrationId({
58
58
  integrationId: params.integrationId,
59
59
  });
60
60
  console.log(
61
- `${params.event} for ${instance.integration.config.type} of integrationId: ${params.integrationId}`
61
+ `${params.event} for ${instance.record.config.type} of integrationId: ${params.integrationId}`
62
62
  );
63
63
  }
64
64
  const res = await instance.send(params.event, {
@@ -3,7 +3,7 @@ const { integrationFactory, createQueueWorker } = require('../backend-utils');
3
3
 
4
4
  const handlers = {};
5
5
  integrationFactory.integrationClasses.forEach((IntegrationClass) => {
6
- const defaultQueueWorker = createQueueWorker(IntegrationClass);
6
+ const defaultQueueWorker = createQueueWorker(IntegrationClass, integrationFactory);
7
7
 
8
8
  handlers[`${IntegrationClass.Definition.name}`] = {
9
9
  queueWorker: createHandler({
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-next.21",
4
+ "version": "2.0.0-next.22",
5
5
  "dependencies": {
6
6
  "@hapi/boom": "^10.0.1",
7
7
  "aws-sdk": "^2.1200.0",
@@ -22,9 +22,9 @@
22
22
  "uuid": "^9.0.1"
23
23
  },
24
24
  "devDependencies": {
25
- "@friggframework/eslint-config": "2.0.0-next.21",
26
- "@friggframework/prettier-config": "2.0.0-next.21",
27
- "@friggframework/test": "2.0.0-next.21",
25
+ "@friggframework/eslint-config": "2.0.0-next.22",
26
+ "@friggframework/prettier-config": "2.0.0-next.22",
27
+ "@friggframework/test": "2.0.0-next.22",
28
28
  "@types/lodash": "4.17.15",
29
29
  "@typescript-eslint/eslint-plugin": "^8.0.0",
30
30
  "chai": "^4.3.6",
@@ -53,5 +53,5 @@
53
53
  },
54
54
  "homepage": "https://github.com/friggframework/frigg#readme",
55
55
  "description": "",
56
- "gitHead": "ad1d397f60175576cb2d939ae6c75533ee5a4c2a"
56
+ "gitHead": "14387b68e349c32da618751925a01b4b3ab37796"
57
57
  }