@hogsend/engine 0.32.0 → 0.32.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hogsend/engine",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"svix": "^1.95.1",
|
|
41
41
|
"winston": "^3.19.0",
|
|
42
42
|
"zod": "^4.4.3",
|
|
43
|
-
"@hogsend/core": "^0.32.
|
|
44
|
-
"@hogsend/
|
|
45
|
-
"@hogsend/
|
|
46
|
-
"@hogsend/plugin-
|
|
47
|
-
"@hogsend/plugin-
|
|
43
|
+
"@hogsend/core": "^0.32.1",
|
|
44
|
+
"@hogsend/db": "^0.32.1",
|
|
45
|
+
"@hogsend/email": "^0.32.1",
|
|
46
|
+
"@hogsend/plugin-posthog": "^0.32.1",
|
|
47
|
+
"@hogsend/plugin-resend": "^0.32.1"
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"@hogsend/plugin-postmark": "^0.32.
|
|
50
|
+
"@hogsend/plugin-postmark": "^0.32.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^22.15.3",
|
|
@@ -92,9 +92,15 @@ export function runWithJourneyBoundary<T>(
|
|
|
92
92
|
export function createMemoize(hatchetCtx: unknown): JourneyBoundary["memoize"] {
|
|
93
93
|
const ctx = hatchetCtx as HatchetMemoCtx;
|
|
94
94
|
return async <T>(deps: unknown[], fn: () => Promise<T> | T): Promise<T> => {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
// Invoke `ctx.memo(...)` DIRECTLY — never via an extracted
|
|
96
|
+
// `const memo = ctx.memo; memo(...)`, which drops the `this` binding. The
|
|
97
|
+
// SDK's `memo` body opens with `this.throwIfCancelled()`, so an unbound call
|
|
98
|
+
// throws "Cannot read properties of undefined (reading 'throwIfCancelled')"
|
|
99
|
+
// the moment eviction is live (a hatchet-lite >= v0.80.0). This is the live
|
|
100
|
+
// path for EVERY journey side effect (sendEmail / sendConnectorAction /
|
|
101
|
+
// ctx.trigger), so the bug surfaces on the first send under such an engine.
|
|
102
|
+
if (typeof ctx.memo === "function" && ctx.supportsEviction === true) {
|
|
103
|
+
return ctx.memo(fn, deps);
|
|
98
104
|
}
|
|
99
105
|
return fn();
|
|
100
106
|
};
|