create-oke 0.17.2 → 0.18.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/package.json +1 -1
- package/src/agents-md.ts +2 -2
- package/templates/advanced/src/db/schema.decl.ts +4 -4
- package/templates/advanced/src/flows/main/health.ts +2 -6
- package/templates/advanced/src/flows/main/route.ts +1 -1
- package/templates/advanced/src/flows/notes/[id]/archive.ts +1 -1
- package/templates/advanced/src/flows/notes/[id]/attach.ts +1 -1
- package/templates/advanced/src/flows/notes/[id]/get.ts +1 -1
- package/templates/advanced/src/flows/notes/[id]/summarize.ts +1 -1
- package/templates/advanced/src/flows/notes/create.ts +1 -1
- package/templates/advanced/src/flows/notes/digest.ts +1 -1
- package/templates/advanced/src/flows/notes/list.ts +1 -1
- package/templates/advanced/src/flows/notes/on-created.ts +1 -1
- package/templates/standard/src/db/schema.decl.ts +4 -4
- package/templates/standard/src/flows/main/health.ts +2 -6
- package/templates/standard/src/flows/main/route.ts +1 -1
- package/templates/standard/src/flows/notes/[id]/archive.ts +1 -1
- package/templates/standard/src/flows/notes/[id]/get.ts +1 -1
- package/templates/standard/src/flows/notes/create.ts +1 -1
- package/templates/standard/src/flows/notes/list.ts +1 -1
package/package.json
CHANGED
package/src/agents-md.ts
CHANGED
|
@@ -47,13 +47,13 @@ An element earns its place only if it has irreducible physics. New
|
|
|
47
47
|
infrastructure becomes a new **driver** for an existing element — never a
|
|
48
48
|
ninth element.
|
|
49
49
|
|
|
50
|
-
##
|
|
50
|
+
## Core programming vocabulary
|
|
51
51
|
|
|
52
52
|
\`\`\`typescript
|
|
53
53
|
import { on, flow, signal, store, clock, gate, vault, channel, ai, plugin } from "okengine";
|
|
54
54
|
\`\`\`
|
|
55
55
|
|
|
56
|
-
That is the
|
|
56
|
+
That is the core programming vocabulary. Everything else is derived.
|
|
57
57
|
|
|
58
58
|
## The fx rule
|
|
59
59
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { store, field
|
|
1
|
+
import { store, field } from "okengine";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Notes domain — abstract declarations, emitted to
|
|
5
5
|
* `src/db/schema.drizzle.ts` for the active dialect by `oke db` / `oke dev`.
|
|
6
6
|
*/
|
|
7
7
|
export const notes = store.schema.table("notes", {
|
|
8
|
-
id: field.
|
|
8
|
+
id: field.id().primaryKey(),
|
|
9
9
|
title: field.text().notNull(),
|
|
10
10
|
body: field.text().notNull(),
|
|
11
|
-
archivedAt: field.
|
|
12
|
-
createdAt: field.
|
|
11
|
+
archivedAt: field.timestamp(),
|
|
12
|
+
createdAt: field.timestamp().notNull().now(),
|
|
13
13
|
});
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { on, flow, http } from "okengine";
|
|
2
|
-
import { z } from "zod";
|
|
1
|
+
import { on, flow, http } from "okengine/http";
|
|
3
2
|
|
|
4
3
|
/** Liveness for probes and `bun test`. */
|
|
5
4
|
export const health = on(
|
|
6
5
|
http.get().public(),
|
|
7
|
-
flow({
|
|
8
|
-
out: z.object({ ok: z.literal(true) }),
|
|
9
|
-
do: () => ({ ok: true as const }),
|
|
10
|
-
}),
|
|
6
|
+
flow({ do: () => ({ ok: true }) }),
|
|
11
7
|
);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { store, field
|
|
1
|
+
import { store, field } from "okengine";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Notes domain — abstract declarations, emitted to
|
|
5
5
|
* `src/db/schema.drizzle.ts` for the active dialect by `oke db` / `oke dev`.
|
|
6
6
|
*/
|
|
7
7
|
export const notes = store.schema.table("notes", {
|
|
8
|
-
id: field.
|
|
8
|
+
id: field.id().primaryKey(),
|
|
9
9
|
title: field.text().notNull(),
|
|
10
10
|
body: field.text().notNull(),
|
|
11
|
-
archivedAt: field.
|
|
12
|
-
createdAt: field.
|
|
11
|
+
archivedAt: field.timestamp(),
|
|
12
|
+
createdAt: field.timestamp().notNull().now(),
|
|
13
13
|
});
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { on, flow, http } from "okengine";
|
|
2
|
-
import { z } from "zod";
|
|
1
|
+
import { on, flow, http } from "okengine/http";
|
|
3
2
|
|
|
4
3
|
/** Liveness for probes and `bun test`. */
|
|
5
4
|
export const health = on(
|
|
6
5
|
http.get().public(),
|
|
7
|
-
flow({
|
|
8
|
-
out: z.object({ ok: z.literal(true) }),
|
|
9
|
-
do: () => ({ ok: true as const }),
|
|
10
|
-
}),
|
|
6
|
+
flow({ do: () => ({ ok: true }) }),
|
|
11
7
|
);
|