@pikku/kysely 0.12.3 → 0.12.4
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 +12 -0
- package/dist/bin/pikku-kysely-pure.js +0 -0
- package/dist/src/kysely-tables.d.ts +1 -0
- package/dist/src/kysely-workflow-service.d.ts +1 -0
- package/dist/src/kysely-workflow-service.js +11 -0
- package/package.json +5 -5
- package/src/kysely-tables.ts +1 -0
- package/src/kysely-workflow-service.ts +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
## 0.12.0
|
|
2
2
|
|
|
3
|
+
## 0.12.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3e79248: Add setStepChildRunId to workflow service implementations and auto-bootstrap in pikku all
|
|
8
|
+
- Updated dependencies [bb27710]
|
|
9
|
+
- Updated dependencies [a31bc63]
|
|
10
|
+
- Updated dependencies [3e79248]
|
|
11
|
+
- Updated dependencies [b0a81cc]
|
|
12
|
+
- Updated dependencies [6413df7]
|
|
13
|
+
- @pikku/core@0.12.6
|
|
14
|
+
|
|
3
15
|
## 0.12.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
File without changes
|
|
@@ -23,6 +23,7 @@ export declare class KyselyWorkflowService extends PikkuWorkflowService {
|
|
|
23
23
|
setStepScheduled(stepId: string): Promise<void>;
|
|
24
24
|
private insertHistoryRecord;
|
|
25
25
|
private getTimestampFieldForStatus;
|
|
26
|
+
setStepChildRunId(stepId: string, childRunId: string): Promise<void>;
|
|
26
27
|
setStepResult(stepId: string, result: any): Promise<void>;
|
|
27
28
|
setStepError(stepId: string, error: Error): Promise<void>;
|
|
28
29
|
createRetryAttempt(stepId: string, status: 'pending' | 'running'): Promise<StepState>;
|
|
@@ -49,6 +49,7 @@ export class KyselyWorkflowService extends PikkuWorkflowService {
|
|
|
49
49
|
.addColumn('status', 'text', (col) => col.notNull().defaultTo('pending'))
|
|
50
50
|
.addColumn('result', 'text')
|
|
51
51
|
.addColumn('error', 'text')
|
|
52
|
+
.addColumn('child_run_id', 'text')
|
|
52
53
|
.addColumn('branch_taken', 'text')
|
|
53
54
|
.addColumn('retries', 'integer')
|
|
54
55
|
.addColumn('retry_delay', 'text')
|
|
@@ -256,6 +257,16 @@ export class KyselyWorkflowService extends PikkuWorkflowService {
|
|
|
256
257
|
return 'created_at';
|
|
257
258
|
}
|
|
258
259
|
}
|
|
260
|
+
async setStepChildRunId(stepId, childRunId) {
|
|
261
|
+
await this.db
|
|
262
|
+
.updateTable('workflow_step')
|
|
263
|
+
.set({
|
|
264
|
+
child_run_id: childRunId,
|
|
265
|
+
updated_at: new Date(),
|
|
266
|
+
})
|
|
267
|
+
.where('workflow_step_id', '=', stepId)
|
|
268
|
+
.execute();
|
|
269
|
+
}
|
|
259
270
|
async setStepResult(stepId, result) {
|
|
260
271
|
const resultJson = JSON.stringify(result);
|
|
261
272
|
await this.db
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pikku/kysely",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.4",
|
|
4
4
|
"author": "yasser.fadl@gmail.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/src/index.js",
|
|
@@ -16,18 +16,18 @@
|
|
|
16
16
|
"test": "bash run-tests.sh",
|
|
17
17
|
"test:watch": "bash run-tests.sh --watch",
|
|
18
18
|
"test:coverage": "bash run-tests.sh --coverage",
|
|
19
|
-
"release": "npm run build && npm test"
|
|
19
|
+
"release": "npm run build && npm test",
|
|
20
|
+
"prepublishOnly": "yarn build"
|
|
20
21
|
},
|
|
21
22
|
"peerDependencies": {
|
|
22
|
-
"@pikku/core": "^0.12.
|
|
23
|
+
"@pikku/core": "^0.12.6"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
25
|
-
"kysely": "^0.28.
|
|
26
|
+
"kysely": "^0.28.12"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"@types/better-sqlite3": "^7.6.13",
|
|
29
30
|
"better-sqlite3": "^12.6.2",
|
|
30
|
-
"kysely": "^0.28.11",
|
|
31
31
|
"kysely-codegen": "^0.20.0",
|
|
32
32
|
"kysely-plugin-serialize": "^0.8.2",
|
|
33
33
|
"kysely-postgres-js": "^3.0.0",
|
package/src/kysely-tables.ts
CHANGED
|
@@ -72,6 +72,7 @@ export class KyselyWorkflowService extends PikkuWorkflowService {
|
|
|
72
72
|
.addColumn('status', 'text', (col) => col.notNull().defaultTo('pending'))
|
|
73
73
|
.addColumn('result', 'text')
|
|
74
74
|
.addColumn('error', 'text')
|
|
75
|
+
.addColumn('child_run_id', 'text')
|
|
75
76
|
.addColumn('branch_taken', 'text')
|
|
76
77
|
.addColumn('retries', 'integer')
|
|
77
78
|
.addColumn('retry_delay', 'text')
|
|
@@ -347,6 +348,17 @@ export class KyselyWorkflowService extends PikkuWorkflowService {
|
|
|
347
348
|
}
|
|
348
349
|
}
|
|
349
350
|
|
|
351
|
+
async setStepChildRunId(stepId: string, childRunId: string): Promise<void> {
|
|
352
|
+
await this.db
|
|
353
|
+
.updateTable('workflow_step')
|
|
354
|
+
.set({
|
|
355
|
+
child_run_id: childRunId,
|
|
356
|
+
updated_at: new Date(),
|
|
357
|
+
})
|
|
358
|
+
.where('workflow_step_id', '=', stepId)
|
|
359
|
+
.execute()
|
|
360
|
+
}
|
|
361
|
+
|
|
350
362
|
async setStepResult(stepId: string, result: any): Promise<void> {
|
|
351
363
|
const resultJson = JSON.stringify(result)
|
|
352
364
|
|