@friggframework/core 2.0.0--canary.608.03436383054a.0 → 2.0.0--canary.608.4bec88a.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.
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
const { Worker } = require('../../core/Worker');
|
|
2
|
+
// Direct path (not the package index) to avoid a circular require: index.js
|
|
3
|
+
// re-exports this module.
|
|
4
|
+
const { createHandler } = require('../../core/create-handler');
|
|
2
5
|
const {
|
|
3
6
|
GetIntegrationInstance,
|
|
4
7
|
} = require('../../integrations/use-cases/get-integration-instance');
|
|
@@ -148,8 +151,14 @@ class UserActionWorker extends Worker {
|
|
|
148
151
|
}
|
|
149
152
|
}
|
|
150
153
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
+
// Wrap in createHandler so the Lambda gets the same runtime setup as every
|
|
155
|
+
// other DB-touching worker: secretsToEnv() (SECRET_ARN injection), connectPrisma()
|
|
156
|
+
// (+ Mongo schema init), and callbackWaitsForEmptyEventLoop=false. The method's
|
|
157
|
+
// return value ({ batchItemFailures }) passes through for ReportBatchItemFailures.
|
|
158
|
+
const userActionQueueWorker = createHandler({
|
|
159
|
+
eventName: 'UserActionQueueWorker',
|
|
160
|
+
isUserFacingResponse: false,
|
|
161
|
+
method: async (event, context) => new UserActionWorker().run(event, context),
|
|
162
|
+
});
|
|
154
163
|
|
|
155
164
|
module.exports = { UserActionWorker, userActionQueueWorker };
|
|
@@ -3,14 +3,13 @@ const { QueuerUtil } = require('../../queues');
|
|
|
3
3
|
|
|
4
4
|
const SCHEMA_VERSION = 1;
|
|
5
5
|
|
|
6
|
-
// Default lifecycle events that MUTATE and
|
|
7
|
-
// Read-shaped defaults (GET_*/REFRESH_*/WEBHOOK_RECEIVED)
|
|
8
|
-
// a queued read would return a 202 ack instead of the
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
]);
|
|
6
|
+
// Default lifecycle events that MUTATE and are routed through this helper, so
|
|
7
|
+
// they may be queued. Read-shaped defaults (GET_*/REFRESH_*/WEBHOOK_RECEIVED)
|
|
8
|
+
// must never be queued — a queued read would return a 202 ack instead of the
|
|
9
|
+
// data the caller expects. ON_DELETE is intentionally excluded: deletion is
|
|
10
|
+
// dispatched directly (and the record is gone immediately after), so a queued
|
|
11
|
+
// worker re-hydrating by id would discard it as terminal.
|
|
12
|
+
const MUTATING_DEFAULT_EVENTS = new Set(['ON_CREATE', 'ON_UPDATE']);
|
|
14
13
|
|
|
15
14
|
// Custom user actions (events not present in defaultEvents) are mutating by
|
|
16
15
|
// intent; only default events are filtered against the allowlist above.
|
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.608.
|
|
4
|
+
"version": "2.0.0--canary.608.4bec88a.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@aws-sdk/client-apigatewaymanagementapi": "^3.588.0",
|
|
7
7
|
"@aws-sdk/client-kms": "^3.588.0",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@friggframework/eslint-config": "2.0.0--canary.608.
|
|
42
|
-
"@friggframework/prettier-config": "2.0.0--canary.608.
|
|
43
|
-
"@friggframework/test": "2.0.0--canary.608.
|
|
41
|
+
"@friggframework/eslint-config": "2.0.0--canary.608.4bec88a.0",
|
|
42
|
+
"@friggframework/prettier-config": "2.0.0--canary.608.4bec88a.0",
|
|
43
|
+
"@friggframework/test": "2.0.0--canary.608.4bec88a.0",
|
|
44
44
|
"@prisma/client": "^6.19.3",
|
|
45
45
|
"@types/lodash": "4.17.15",
|
|
46
46
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "4bec88a53c1c12df8f84aac9b2eeb6b23ba04c05"
|
|
84
84
|
}
|