@pikku/mongodb 0.12.7 → 0.12.9
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @pikku/mongodb
|
|
2
2
|
|
|
3
|
+
## 0.12.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 41ce2cb: Upgrade to TypeScript 6 and raise the minimum Node.js version to 22.
|
|
8
|
+
|
|
9
|
+
All packages now build against `typescript@^6.0.3` and declare `engines.node >= 22`. Internal tooling (`ts-json-schema-generator`, `zod-to-ts`) was bumped to TypeScript 6-compatible releases.
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [41ce2cb]
|
|
12
|
+
- @pikku/core@0.12.44
|
|
13
|
+
|
|
14
|
+
## 0.12.8
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 72694f6: feat(workflow): expose per-step attempt count + record running/succeeded/failed timestamps
|
|
19
|
+
|
|
20
|
+
`getRunStatus` now returns `attempts` (the latest attempt count) per step, so
|
|
21
|
+
consumers can show retry counts without a second history query. It already
|
|
22
|
+
computed `duration` from `runningAt`/`succeededAt`, but the kysely and mongodb
|
|
23
|
+
workflow stores only stamped those timestamps on the _insert_ path — the
|
|
24
|
+
`running` / `succeeded` / `failed` status transitions updated the history row's
|
|
25
|
+
status without setting `runningAt` / `succeededAt` / `failedAt`, so `duration`
|
|
26
|
+
was always undefined. The transitions now stamp the matching timestamp, so step
|
|
27
|
+
duration is populated for kysely- and mongodb-backed runs. (Redis already
|
|
28
|
+
stamped on transition.) A shared service-suite test guards both behaviours.
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [4be205f]
|
|
31
|
+
- Updated dependencies [061c717]
|
|
32
|
+
- Updated dependencies [2c55e13]
|
|
33
|
+
- Updated dependencies [c745c26]
|
|
34
|
+
- Updated dependencies [57900b5]
|
|
35
|
+
- Updated dependencies [72694f6]
|
|
36
|
+
- @pikku/core@0.12.39
|
|
37
|
+
|
|
3
38
|
## 0.12.7
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
|
@@ -130,7 +130,7 @@ export class MongoDBWorkflowService extends PikkuWorkflowService {
|
|
|
130
130
|
.limit(1)
|
|
131
131
|
.toArray();
|
|
132
132
|
if (latestHistory.length > 0) {
|
|
133
|
-
await this.stepHistory.updateOne({ _id: latestHistory[0]._id }, { $set: { status: 'running' } });
|
|
133
|
+
await this.stepHistory.updateOne({ _id: latestHistory[0]._id }, { $set: { status: 'running', runningAt: new Date() } });
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
async setStepScheduledImpl(stepId) {
|
|
@@ -193,7 +193,7 @@ export class MongoDBWorkflowService extends PikkuWorkflowService {
|
|
|
193
193
|
.limit(1)
|
|
194
194
|
.toArray();
|
|
195
195
|
if (latestHistory.length > 0) {
|
|
196
|
-
await this.stepHistory.updateOne({ _id: latestHistory[0]._id }, { $set: { status: 'succeeded', result } });
|
|
196
|
+
await this.stepHistory.updateOne({ _id: latestHistory[0]._id }, { $set: { status: 'succeeded', result, succeededAt: new Date() } });
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
async setStepErrorImpl(stepId, error) {
|
|
@@ -216,7 +216,13 @@ export class MongoDBWorkflowService extends PikkuWorkflowService {
|
|
|
216
216
|
.limit(1)
|
|
217
217
|
.toArray();
|
|
218
218
|
if (latestHistory.length > 0) {
|
|
219
|
-
await this.stepHistory.updateOne({ _id: latestHistory[0]._id }, {
|
|
219
|
+
await this.stepHistory.updateOne({ _id: latestHistory[0]._id }, {
|
|
220
|
+
$set: {
|
|
221
|
+
status: 'failed',
|
|
222
|
+
error: serializedError,
|
|
223
|
+
failedAt: new Date(),
|
|
224
|
+
},
|
|
225
|
+
});
|
|
220
226
|
}
|
|
221
227
|
}
|
|
222
228
|
async createRetryAttemptImpl(stepId, status) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/mongodb-agent-run-service.ts","../src/mongodb-ai-storage-service.ts","../src/mongodb-channel-store.ts","../src/mongodb-deployment-service.ts","../src/mongodb-eventhub-store.ts","../src/mongodb-secret-service.ts","../src/mongodb-session-store.ts","../src/mongodb-workflow-run-service.ts","../src/mongodb-workflow-service.ts","../src/pikku-mongodb.ts"],"version":"
|
|
1
|
+
{"root":["../src/index.ts","../src/mongodb-agent-run-service.ts","../src/mongodb-ai-storage-service.ts","../src/mongodb-channel-store.ts","../src/mongodb-deployment-service.ts","../src/mongodb-eventhub-store.ts","../src/mongodb-secret-service.ts","../src/mongodb-session-store.ts","../src/mongodb-workflow-run-service.ts","../src/mongodb-workflow-service.ts","../src/pikku-mongodb.ts"],"version":"6.0.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pikku/mongodb",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.9",
|
|
4
4
|
"author": "yasser.fadl@gmail.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/src/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"prepublishOnly": "yarn build"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@pikku/core": "^0.12.
|
|
20
|
+
"@pikku/core": "^0.12.44"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"mongodb": "^6.12.0"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"mongodb": "^6.12.0",
|
|
27
27
|
"mongodb-memory-server": "^10.4.0",
|
|
28
|
-
"typescript": "^
|
|
28
|
+
"typescript": "^6.0.3"
|
|
29
29
|
},
|
|
30
30
|
"exports": {
|
|
31
31
|
".": "./dist/src/index.js"
|
|
@@ -264,7 +264,7 @@ export class MongoDBWorkflowService extends PikkuWorkflowService {
|
|
|
264
264
|
if (latestHistory.length > 0) {
|
|
265
265
|
await this.stepHistory.updateOne(
|
|
266
266
|
{ _id: latestHistory[0]!._id },
|
|
267
|
-
{ $set: { status: 'running' } }
|
|
267
|
+
{ $set: { status: 'running', runningAt: new Date() } }
|
|
268
268
|
)
|
|
269
269
|
}
|
|
270
270
|
}
|
|
@@ -359,7 +359,7 @@ export class MongoDBWorkflowService extends PikkuWorkflowService {
|
|
|
359
359
|
if (latestHistory.length > 0) {
|
|
360
360
|
await this.stepHistory.updateOne(
|
|
361
361
|
{ _id: latestHistory[0]!._id },
|
|
362
|
-
{ $set: { status: 'succeeded', result } }
|
|
362
|
+
{ $set: { status: 'succeeded', result, succeededAt: new Date() } }
|
|
363
363
|
)
|
|
364
364
|
}
|
|
365
365
|
}
|
|
@@ -395,7 +395,7 @@ export class MongoDBWorkflowService extends PikkuWorkflowService {
|
|
|
395
395
|
if (latestHistory.length > 0) {
|
|
396
396
|
await this.stepHistory.updateOne(
|
|
397
397
|
{ _id: latestHistory[0]!._id },
|
|
398
|
-
{ $set: { status: 'failed', error: serializedError } }
|
|
398
|
+
{ $set: { status: 'failed', error: serializedError, failedAt: new Date() } }
|
|
399
399
|
)
|
|
400
400
|
}
|
|
401
401
|
}
|