@shipfox/api-triggers 7.0.1 → 8.0.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/.turbo/turbo-build.log +11 -14
- package/CHANGELOG.md +23 -0
- package/dist/core/drain-cron-schedules.d.ts.map +1 -1
- package/dist/core/drain-cron-schedules.js +8 -0
- package/dist/core/drain-cron-schedules.js.map +1 -1
- package/dist/core/record-trigger-history.d.ts.map +1 -1
- package/dist/core/record-trigger-history.js +9 -0
- package/dist/core/record-trigger-history.js.map +1 -1
- package/dist/temporal/workflows/index.bundle.js +17164 -3306
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +9 -27
- package/src/core/drain-cron-schedules.ts +6 -0
- package/src/core/record-trigger-history.ts +6 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipfox/api-triggers",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "8.0.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/ShipfoxHQ/shipfox.git",
|
|
@@ -26,42 +26,24 @@
|
|
|
26
26
|
"cron-parser": "^5.6.1",
|
|
27
27
|
"drizzle-orm": "^0.45.2",
|
|
28
28
|
"zod": "^4.4.3",
|
|
29
|
-
"@shipfox/api-auth-context": "
|
|
29
|
+
"@shipfox/api-auth-context": "7.1.0",
|
|
30
30
|
"@shipfox/api-definitions-dto": "6.0.0",
|
|
31
|
-
"@shipfox/api-integration-core-dto": "
|
|
32
|
-
"@shipfox/api-projects": "6.0.0",
|
|
31
|
+
"@shipfox/api-integration-core-dto": "8.0.0",
|
|
33
32
|
"@shipfox/api-triggers-dto": "5.0.0",
|
|
34
|
-
"@shipfox/api-workflows-dto": "
|
|
33
|
+
"@shipfox/api-workflows-dto": "8.0.0",
|
|
35
34
|
"@shipfox/config": "1.2.2",
|
|
36
35
|
"@shipfox/expression": "1.1.3",
|
|
37
36
|
"@shipfox/inter-module": "0.2.0",
|
|
38
37
|
"@shipfox/node-drizzle": "0.3.2",
|
|
39
|
-
"@shipfox/node-
|
|
40
|
-
"@shipfox/node-
|
|
41
|
-
"@shipfox/node-
|
|
38
|
+
"@shipfox/node-error-monitoring": "0.2.0",
|
|
39
|
+
"@shipfox/node-fastify": "0.3.0",
|
|
40
|
+
"@shipfox/node-module": "0.5.0",
|
|
41
|
+
"@shipfox/node-opentelemetry": "0.6.0",
|
|
42
42
|
"@shipfox/node-outbox": "0.2.4",
|
|
43
43
|
"@shipfox/node-postgres": "0.4.2",
|
|
44
|
-
"@shipfox/node-temporal": "0.
|
|
44
|
+
"@shipfox/node-temporal": "0.4.0",
|
|
45
45
|
"@shipfox/workflow-document": "2.1.1"
|
|
46
46
|
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@temporalio/activity": "1.18.1",
|
|
49
|
-
"@temporalio/client": "1.18.1",
|
|
50
|
-
"@temporalio/common": "1.18.1",
|
|
51
|
-
"@temporalio/testing": "1.18.1",
|
|
52
|
-
"@temporalio/worker": "1.18.1",
|
|
53
|
-
"@types/pg": "^8.15.5",
|
|
54
|
-
"drizzle-kit": "^0.31.10",
|
|
55
|
-
"fastify": "^5.3.3",
|
|
56
|
-
"fastify-type-provider-zod": "^6.0.0",
|
|
57
|
-
"fishery": "^2.4.0",
|
|
58
|
-
"@shipfox/biome": "1.8.2",
|
|
59
|
-
"@shipfox/depcruise": "1.0.2",
|
|
60
|
-
"@shipfox/swc": "1.2.6",
|
|
61
|
-
"@shipfox/ts-config": "1.3.8",
|
|
62
|
-
"@shipfox/typescript": "1.1.7",
|
|
63
|
-
"@shipfox/vitest": "1.2.3"
|
|
64
|
-
},
|
|
65
47
|
"scripts": {
|
|
66
48
|
"build": "shipfox-swc && shipfox-temporal-bundle dist/temporal/workflows/index.js",
|
|
67
49
|
"check": "shipfox-biome-check",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import {reportError} from '@shipfox/node-error-monitoring';
|
|
1
2
|
import {logger} from '@shipfox/node-opentelemetry';
|
|
2
3
|
import {advanceCronSchedule, claimDueCronSchedules, selectDbNow} from '#db/cron-schedules.js';
|
|
3
4
|
import {db} from '#db/db.js';
|
|
@@ -84,6 +85,11 @@ export async function drainDueCronSchedules(
|
|
|
84
85
|
{err: error, subscriptionId: schedule.subscriptionId},
|
|
85
86
|
'cron drain: transient fire failure; schedule left due for retry',
|
|
86
87
|
);
|
|
88
|
+
reportError(error, {
|
|
89
|
+
boundary: 'triggers.maintenance',
|
|
90
|
+
operation: 'drain-cron-schedules',
|
|
91
|
+
extra: {subscriptionId: schedule.subscriptionId},
|
|
92
|
+
});
|
|
87
93
|
}
|
|
88
94
|
params.onScheduleProcessed?.();
|
|
89
95
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import {reportError} from '@shipfox/node-error-monitoring';
|
|
1
2
|
import {logger} from '@shipfox/node-opentelemetry';
|
|
2
3
|
import type {JobListenerSubscription} from '#core/entities/job-listener-subscription.js';
|
|
3
4
|
import type {TriggerEventOrigin} from '#core/entities/received-event.js';
|
|
@@ -140,6 +141,11 @@ async function safe<T>(
|
|
|
140
141
|
{err: error, label, eventRef, ...(subscriptionId ? {subscriptionId} : {})},
|
|
141
142
|
'trigger history write failed; ignored (best-effort)',
|
|
142
143
|
);
|
|
144
|
+
reportError(error, {
|
|
145
|
+
boundary: 'triggers.history',
|
|
146
|
+
operation: label,
|
|
147
|
+
extra: {eventRef, subscriptionId},
|
|
148
|
+
});
|
|
143
149
|
return undefined;
|
|
144
150
|
}
|
|
145
151
|
}
|