@protobase/cli 0.109.2 → 0.109.3
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/dist/cli/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.109.
|
|
3
|
+
"version": "0.109.3",
|
|
4
4
|
"description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@better-auth/core": "^1.7.12",
|
|
45
45
|
"@hono/node-server": "^2.1.3",
|
|
46
|
-
"@protobase/config": "0.109.
|
|
47
|
-
"@protobase/layout": "0.109.
|
|
48
|
-
"@protobase/query": "0.109.
|
|
49
|
-
"@protobase/schema": "0.109.
|
|
50
|
-
"@protobase/server": "0.109.
|
|
51
|
-
"@protobase/ui": "0.109.
|
|
52
|
-
"@protobase/workflows": "0.109.
|
|
46
|
+
"@protobase/config": "0.109.3",
|
|
47
|
+
"@protobase/layout": "0.109.3",
|
|
48
|
+
"@protobase/query": "0.109.3",
|
|
49
|
+
"@protobase/schema": "0.109.3",
|
|
50
|
+
"@protobase/server": "0.109.3",
|
|
51
|
+
"@protobase/ui": "0.109.3",
|
|
52
|
+
"@protobase/workflows": "0.109.3",
|
|
53
53
|
"@react-email/render": "^2.1.0",
|
|
54
54
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
55
55
|
"@sentry/vite-plugin": "^11.10.0",
|
|
@@ -28,11 +28,11 @@ export const tasks = resource('tasks')
|
|
|
28
28
|
```ts title="derived/objectives.verdict.ts"
|
|
29
29
|
import type { DerivedCompute } from '@protobase/server'
|
|
30
30
|
|
|
31
|
-
// "late" once an open task is older than two hours, "open" while any is open, else "done".
|
|
31
|
+
// "late" once an open task is older than two hours, "open" while any is open, else "done": the oldest open task decides.
|
|
32
32
|
export default (async (key, { db, clock }) => {
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
35
|
-
return
|
|
33
|
+
const oldest = await db.selectFrom('tasks').select(['created_at']).where('objective_id', '=', Number(key)).where('status', '=', 'open').orderBy('created_at').limit(1).executeTakeFirst()
|
|
34
|
+
if (!oldest) return 'done'
|
|
35
|
+
return clock.olderThan(oldest.created_at, '2 hours') ? 'late' : 'open'
|
|
36
36
|
}) satisfies DerivedCompute
|
|
37
37
|
```
|
|
38
38
|
|