create-oke 0.2.8 → 0.3.2

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.
Files changed (142) hide show
  1. package/README.md +11 -32
  2. package/package.json +2 -4
  3. package/src/cli.test.ts +29 -117
  4. package/src/cli.ts +16 -139
  5. package/src/docs-origin.ts +2 -3
  6. package/src/index.ts +1 -2
  7. package/src/scaffold.ts +13 -31
  8. package/src/templates.ts +12 -90
  9. package/src/transform.ts +1 -1
  10. package/template/.env.example +56 -0
  11. package/{templates/standard → template}/README.md +25 -12
  12. package/template/bun.lock +845 -0
  13. package/template/drizzle.config.ts +25 -0
  14. package/{templates/full → template}/oke.config.ts +11 -7
  15. package/{templates/minimal → template}/src/core.ts +1 -1
  16. package/template/src/schema.decl.ts +12 -0
  17. package/examples/linkly/.env.example +0 -15
  18. package/examples/linkly/drizzle.config.ts +0 -11
  19. package/examples/linkly/oke.config.ts +0 -12
  20. package/examples/linkly/package.json +0 -18
  21. package/examples/linkly/src/app.ts +0 -21
  22. package/examples/linkly/src/core.ts +0 -4
  23. package/examples/linkly/src/flows/analytics/index.ts +0 -39
  24. package/examples/linkly/src/flows/links/index.ts +0 -82
  25. package/examples/linkly/src/flows/links/shapes.ts +0 -22
  26. package/examples/linkly/src/flows/links/signals.ts +0 -14
  27. package/examples/linkly/src/gates.ts +0 -10
  28. package/examples/linkly/src/schema.decl.ts +0 -39
  29. package/examples/linkly/src/schema.generated.ts +0 -30
  30. package/examples/linkly/src/schema.ts +0 -2
  31. package/examples/linkly/tests/linkly.test.ts +0 -19
  32. package/examples/notes/.env.example +0 -12
  33. package/examples/notes/drizzle.config.ts +0 -11
  34. package/examples/notes/oke.config.ts +0 -14
  35. package/examples/notes/package.json +0 -19
  36. package/examples/notes/src/app.ts +0 -13
  37. package/examples/notes/src/core.ts +0 -4
  38. package/examples/notes/src/flows/notes/index.ts +0 -58
  39. package/examples/notes/src/schema.ts +0 -9
  40. package/examples/notes/tests/notes.test.ts +0 -10
  41. package/examples/provisions/.env.example +0 -19
  42. package/examples/provisions/drizzle.config.ts +0 -11
  43. package/examples/provisions/oke.config.ts +0 -19
  44. package/examples/provisions/package.json +0 -18
  45. package/examples/provisions/src/app.ts +0 -60
  46. package/examples/provisions/src/channels.ts +0 -15
  47. package/examples/provisions/src/core.ts +0 -4
  48. package/examples/provisions/src/flows/notifications/index.ts +0 -25
  49. package/examples/provisions/src/flows/orders/index.ts +0 -97
  50. package/examples/provisions/src/flows/orders/shapes.ts +0 -21
  51. package/examples/provisions/src/flows/orders/signals.ts +0 -19
  52. package/examples/provisions/src/flows/payments/index.ts +0 -43
  53. package/examples/provisions/src/flows/payments/shapes.ts +0 -3
  54. package/examples/provisions/src/flows/payments/stripe.ts +0 -18
  55. package/examples/provisions/src/gates.ts +0 -4
  56. package/examples/provisions/src/locales/ar.ts +0 -1
  57. package/examples/provisions/src/locales/en.ts +0 -1
  58. package/examples/provisions/src/plugins/audit-schema.ts +0 -2
  59. package/examples/provisions/src/plugins/audit.ts +0 -14
  60. package/examples/provisions/src/schema.ts +0 -16
  61. package/examples/provisions/src/vault.ts +0 -16
  62. package/examples/provisions/tests/orders.test.ts +0 -19
  63. package/examples/skyport/.env.example +0 -34
  64. package/examples/skyport/drizzle.config.ts +0 -11
  65. package/examples/skyport/evals/triage.jsonl +0 -1
  66. package/examples/skyport/oke.config.ts +0 -47
  67. package/examples/skyport/oke.images.lock +0 -4
  68. package/examples/skyport/package.json +0 -19
  69. package/examples/skyport/src/ai.ts +0 -25
  70. package/examples/skyport/src/app.ts +0 -46
  71. package/examples/skyport/src/channels.ts +0 -12
  72. package/examples/skyport/src/core.ts +0 -4
  73. package/examples/skyport/src/flows/bookings/index.ts +0 -73
  74. package/examples/skyport/src/flows/bookings/shapes.ts +0 -6
  75. package/examples/skyport/src/flows/bookings/signals.ts +0 -13
  76. package/examples/skyport/src/flows/notifications/index.ts +0 -16
  77. package/examples/skyport/src/flows/payments/index.ts +0 -14
  78. package/examples/skyport/src/flows/payments/shapes.ts +0 -5
  79. package/examples/skyport/src/flows/support/index.ts +0 -50
  80. package/examples/skyport/src/flows/users/elements.ts +0 -2
  81. package/examples/skyport/src/flows/users/index.ts +0 -12
  82. package/examples/skyport/src/flows/users/shapes.ts +0 -6
  83. package/examples/skyport/src/gates.ts +0 -10
  84. package/examples/skyport/src/journeys.ts +0 -9
  85. package/examples/skyport/src/locales/ar.ts +0 -4
  86. package/examples/skyport/src/locales/en.ts +0 -4
  87. package/examples/skyport/src/plugins/audit-schema.ts +0 -7
  88. package/examples/skyport/src/plugins/audit.ts +0 -14
  89. package/examples/skyport/src/plugins/panel.tsx +0 -4
  90. package/examples/skyport/src/schema.ts +0 -25
  91. package/examples/skyport/src/vault.ts +0 -24
  92. package/examples/skyport/tests/support.test.ts +0 -16
  93. package/src/sync-templates.ts +0 -77
  94. package/templates/full/.env.example +0 -24
  95. package/templates/full/README.md +0 -65
  96. package/templates/full/drizzle.config.ts +0 -14
  97. package/templates/full/package.json +0 -18
  98. package/templates/full/src/ai.ts +0 -11
  99. package/templates/full/src/app.ts +0 -34
  100. package/templates/full/src/channels.ts +0 -9
  101. package/templates/full/src/core.ts +0 -4
  102. package/templates/full/src/flows/main/index.ts +0 -45
  103. package/templates/full/src/flows/main/shapes.ts +0 -3
  104. package/templates/full/src/flows/main/signals.ts +0 -8
  105. package/templates/full/src/gates.ts +0 -4
  106. package/templates/full/src/locales/ar.ts +0 -3
  107. package/templates/full/src/locales/en.ts +0 -3
  108. package/templates/full/src/schema.ts +0 -8
  109. package/templates/full/src/vault.ts +0 -9
  110. package/templates/full/tests/full.test.ts +0 -11
  111. package/templates/hello/.env.example +0 -9
  112. package/templates/hello/README.md +0 -40
  113. package/templates/hello/oke.config.ts +0 -3
  114. package/templates/hello/package.json +0 -14
  115. package/templates/hello/src/app.ts +0 -10
  116. package/templates/hello/src/flows/hello/index.ts +0 -27
  117. package/templates/hello/tests/hello.test.ts +0 -10
  118. package/templates/minimal/.env.example +0 -13
  119. package/templates/minimal/README.md +0 -49
  120. package/templates/minimal/drizzle.config.ts +0 -14
  121. package/templates/minimal/oke.config.ts +0 -14
  122. package/templates/minimal/package.json +0 -18
  123. package/templates/minimal/src/app.ts +0 -13
  124. package/templates/minimal/src/flows/main/index.ts +0 -49
  125. package/templates/minimal/src/schema.ts +0 -8
  126. package/templates/minimal/tests/minimal.test.ts +0 -13
  127. package/templates/standard/.env.example +0 -21
  128. package/templates/standard/drizzle.config.ts +0 -14
  129. package/templates/standard/oke.config.ts +0 -51
  130. package/templates/standard/src/core.ts +0 -4
  131. package/templates/standard/src/schema.ts +0 -9
  132. /package/{templates/standard → template}/package.json +0 -0
  133. /package/{templates/standard → template}/src/app.ts +0 -0
  134. /package/{templates/standard → template}/src/channels.ts +0 -0
  135. /package/{templates/standard → template}/src/flows/main/index.ts +0 -0
  136. /package/{templates/standard → template}/src/flows/main/shapes.ts +0 -0
  137. /package/{templates/standard → template}/src/flows/main/signals.ts +0 -0
  138. /package/{templates/standard → template}/src/gates.ts +0 -0
  139. /package/{templates/standard → template}/src/locales/ar.ts +0 -0
  140. /package/{templates/standard → template}/src/locales/en.ts +0 -0
  141. /package/{templates/standard → template}/src/vault.ts +0 -0
  142. /package/{templates/standard → template}/tests/standard.test.ts +0 -0
@@ -1,8 +0,0 @@
1
- import { signal } from "okengine";
2
- import { z } from "zod";
3
-
4
- /** Trivial signal — replace with real events. */
5
- export const pinged = signal("pinged", {
6
- schema: z.object({ at: z.number() }),
7
- delivery: "once",
8
- });
@@ -1,4 +0,0 @@
1
- import { gate } from "okengine";
2
-
3
- /** Trivial shared gate — replace with real policies. */
4
- export const open = gate.policy("open", () => true);
@@ -1,3 +0,0 @@
1
- export default {
2
- "welcome.subject": "أهلاً",
3
- };
@@ -1,3 +0,0 @@
1
- export default {
2
- "welcome.subject": "Welcome",
3
- };
@@ -1,8 +0,0 @@
1
- import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
2
- import { id, now } from "okengine/store";
3
-
4
- export const entries = sqliteTable("entries", {
5
- id: text("id").primaryKey().$defaultFn(id),
6
- body: text("body").notNull(),
7
- createdAt: integer("created_at").notNull().$defaultFn(now),
8
- });
@@ -1,9 +0,0 @@
1
- import { vault } from "okengine";
2
- import { z } from "zod";
3
-
4
- /** Stub secret contract — replace with your secrets. */
5
- export const appSecret = vault.secret("APP_SECRET", {
6
- schema: z.string().min(1),
7
- description: "Application secret",
8
- dev: "dev-only-secret",
9
- });
@@ -1,11 +0,0 @@
1
- import { test, expect } from "bun:test";
2
- import { createTestApp } from "okengine/test";
3
- import { app } from "../src/app";
4
-
5
- test("boots — health flow with wired elements", async () => {
6
- const t = await createTestApp(app);
7
- const { data, error } = await t.api.main.health({});
8
- expect(error).toBeNull();
9
- expect(data).toEqual({ ok: true });
10
- await t.signals.drain();
11
- });
@@ -1,9 +0,0 @@
1
- # Environment template — copy to `.env.local` for local overrides.
2
- # create-oke copies this file to `.env.local` when you scaffold a new project.
3
- #
4
- # Resolution order (first hit wins):
5
- # process.env → .env.local → docker/.env.docker → vault driver → dev fallback
6
- #
7
- # This template has no Vault declarations and no pinned infrastructure drivers.
8
- # Add variables here when you introduce `vault.secret(...)` in src/vault.ts or
9
- # pin postgres/redis/s3/smtp drivers in oke.config.ts.
@@ -1,40 +0,0 @@
1
- # hello
2
-
3
- Fastest possible “it works” — one unit, two HTTP flows, **no Store**.
4
-
5
- ## Run
6
-
7
- ```bash
8
- bun install
9
- oke dev # app :6530 · Console :6533 · MCP :6535
10
- # or: oke mode docker && oke dev # compose infra on host Bun
11
- ```
12
-
13
- | Port | Try |
14
- | ------- | ---------------------- |
15
- | `:6530` | `GET /` · `GET /hello` |
16
- | `:6533` | Console |
17
- | `:6535` | MCP |
18
-
19
- ## What’s in this template
20
-
21
- ```text
22
- hello/
23
- ├── .env.example # copied to .env.local by create-oke
24
- ├── oke.config.ts
25
- ├── src/
26
- │ ├── app.ts # oke({ name: "hello" }).adopt({ hello })
27
- │ └── flows/hello/index.ts # GET / · GET /hello
28
- └── tests/hello.test.ts
29
- ```
30
-
31
- - **Elements:** Flow only (no `store`, `gate`, `vault`, `channel`, or `ai`)
32
- - **Unit:** `hello`
33
- - **Flows:** `root` (`GET /`), `hello` (`GET /hello` → `{ message: "ok" }`)
34
-
35
- Replace `/hello` with your first real route. When you need persistence, move up to
36
- `minimal` or `standard` — or keep growing this tree.
37
-
38
- ## Agent contract
39
-
40
- See [`AGENTS.md`](./AGENTS.md). Handbook: [okengine.vercel.app/docs](https://okengine.vercel.app/docs)
@@ -1,3 +0,0 @@
1
- import { defineConfig } from "okengine/config";
2
-
3
- export default defineConfig({});
@@ -1,14 +0,0 @@
1
- {
2
- "name": "@oke/template-hello",
3
- "version": "0.0.1",
4
- "private": true,
5
- "type": "module",
6
- "dependencies": {
7
- "okengine": "file:../..",
8
- "zod": "^4.4.3"
9
- },
10
- "scripts": {
11
- "test": "bun test",
12
- "dev": "oke dev"
13
- }
14
- }
@@ -1,10 +0,0 @@
1
- import { oke } from "okengine";
2
- import * as hello from "./flows/hello";
3
-
4
- export const app = oke({ name: "hello" }).adopt({ hello });
5
-
6
- export type App = typeof app;
7
-
8
- Object.assign(app.$options, {
9
- env: "test",
10
- });
@@ -1,27 +0,0 @@
1
- import { on, flow, http } from "okengine";
2
- import { z } from "zod";
3
-
4
- /** First-run welcome — visit :6530/ after `oke dev`. */
5
- export const root = on(
6
- http.get("/"),
7
- flow({
8
- out: z.object({
9
- ok: z.literal(true),
10
- console: z.string(),
11
- try: z.string(),
12
- }),
13
- do: () => ({
14
- ok: true as const,
15
- console: "http://127.0.0.1:6533",
16
- try: "/hello",
17
- }),
18
- }),
19
- );
20
-
21
- export const hello = on(
22
- http.get("/hello"),
23
- flow({
24
- out: z.object({ message: z.string() }),
25
- do: () => ({ message: "ok" }),
26
- }),
27
- );
@@ -1,10 +0,0 @@
1
- import { test, expect } from "bun:test";
2
- import { createTestApp } from "okengine/test";
3
- import { app } from "../src/app";
4
-
5
- test("boots and answers /hello", async () => {
6
- const t = await createTestApp(app);
7
- const { data, error } = await t.api.hello.hello({});
8
- expect(error).toBeNull();
9
- expect(data?.message).toBe("ok");
10
- });
@@ -1,13 +0,0 @@
1
- # Environment template — copy to `.env.local` for local overrides.
2
- # create-oke copies this file to `.env.local` when you scaffold a new project.
3
- #
4
- # Resolution order (first hit wins):
5
- # process.env → .env.local → docker/.env.docker → vault driver → dev fallback
6
- #
7
- # --- Infrastructure (optional) ---
8
- # This app pins postgres for docker/prod SQL in oke.config.ts.
9
- # Local dev uses sqlite by default; uncomment only when overriding postgres URLs.
10
- # Run `oke dev --docker` to write role-accurate keys into `docker/.env.docker`.
11
-
12
- # DATABASE_URL — primary Postgres connection; from your host (Neon, RDS, …) or `docker/.env.docker` after `oke dev --docker`
13
- # DATABASE_URL=postgres://user:password@127.0.0.1:5432/oke
@@ -1,49 +0,0 @@
1
- # minimal
2
-
3
- Smallest shape you’d actually ship — **Store + HTTP flows** over a single table.
4
-
5
- ## Run
6
-
7
- ```bash
8
- bun install
9
- oke dev # app :6530 · Console :6533 · MCP :6535
10
- # or: oke mode docker && oke dev # postgres via compose
11
- ```
12
-
13
- Local `oke dev` auto-runs `oke db push` when `schema.ts` changes (opt out:
14
- `--no-db-push`). Docker/prod never auto-apply DDL — use `oke db migrate`.
15
-
16
- | Port | Try |
17
- | ------- | ------------------------------------------- |
18
- | `:6530` | `GET /` · `GET /entries` · `POST /entries` |
19
- | `:6533` | Console |
20
- | `:6535` | MCP |
21
-
22
- ## What’s in this template
23
-
24
- ```text
25
- minimal/
26
- ├── .env.example # copied to .env.local by create-oke
27
- ├── drizzle.config.ts # oke db push|generate|migrate
28
- ├── oke.config.ts # local: sqlite · docker/prod: postgres
29
- ├── src/
30
- │ ├── app.ts # adopt({ main }), stores: [db]
31
- │ ├── core.ts # store.sql("…")
32
- │ ├── schema.ts # entries table (Drizzle escape hatch)
33
- │ └── flows/main/index.ts # GET / · GET|POST /entries
34
- └── tests/minimal.test.ts
35
- ```
36
-
37
- - **Elements:** Flow · Store (`sql`)
38
- - **Unit:** `main`
39
- - **Flows:** `root`, `list` (`GET /entries`), `create` (`POST /entries` with `{ body }`)
40
- - **Schema:** `entries` — `id`, `body`, `createdAt`
41
-
42
- Swap `entries` for your domain table and grow flows beside it. Prefer
43
- `store.schema.table` + `field.*` in `schema.decl.ts` when you want ORM-agnostic
44
- declare (Linkly); hand-written `schema.ts` remains the escape hatch. Need gates,
45
- channels, or locales? Use `standard`.
46
-
47
- ## Agent contract
48
-
49
- See [`AGENTS.md`](./AGENTS.md). Handbook: [okengine.vercel.app/docs](https://okengine.vercel.app/docs)
@@ -1,14 +0,0 @@
1
- import { defineConfig } from "drizzle-kit";
2
-
3
- /**
4
- * Domain schema sync for `oke db push|generate|migrate`.
5
- * Versioned prod migrations land in `./drizzle` — never mix with `.oke/`.
6
- */
7
- export default defineConfig({
8
- dialect: "sqlite",
9
- schema: "./src/schema.ts",
10
- out: "./drizzle",
11
- dbCredentials: {
12
- url: process.env.OKE_SQLITE_URL ?? "file:.oke/app.sqlite",
13
- },
14
- });
@@ -1,14 +0,0 @@
1
- import { defineConfig } from "okengine/config";
2
-
3
- export default defineConfig({
4
- drivers: {
5
- store: {
6
- sql: {
7
- local: "sqlite",
8
- docker: "postgres",
9
- test: "memory",
10
- prod: "postgres",
11
- },
12
- },
13
- },
14
- });
@@ -1,18 +0,0 @@
1
- {
2
- "name": "@oke/template-minimal",
3
- "version": "0.0.1",
4
- "private": true,
5
- "type": "module",
6
- "dependencies": {
7
- "okengine": "file:../..",
8
- "drizzle-orm": "^1.0.0-rc.4",
9
- "zod": "^4.4.3"
10
- },
11
- "devDependencies": {
12
- "drizzle-kit": "^1.0.0-rc.4"
13
- },
14
- "scripts": {
15
- "test": "bun test",
16
- "dev": "oke dev"
17
- }
18
- }
@@ -1,13 +0,0 @@
1
- import { db } from "./core";
2
-
3
- import { oke } from "okengine";
4
- import * as main from "./flows/main";
5
-
6
- export const app = oke({ name: "minimal" }).adopt({ main });
7
-
8
- export type App = typeof app;
9
-
10
- Object.assign(app.$options, {
11
- env: "test",
12
- stores: [db],
13
- });
@@ -1,49 +0,0 @@
1
- import { on, flow, http } from "okengine";
2
- import { z } from "zod";
3
- import { db } from "../../core";
4
- import { entries } from "../../schema";
5
-
6
- const NewEntry = z.object({ body: z.string().min(1) });
7
- const EntryId = z.object({ id: z.string() });
8
- const Entry = z.object({
9
- id: z.string(),
10
- body: z.string(),
11
- createdAt: z.number(),
12
- });
13
-
14
- /** First-run welcome — visit :6530/ after `oke dev`. */
15
- export const root = on(
16
- http.get("/"),
17
- flow({
18
- out: z.object({
19
- ok: z.literal(true),
20
- console: z.string(),
21
- try: z.string(),
22
- }),
23
- do: () => ({
24
- ok: true as const,
25
- console: "http://127.0.0.1:6533",
26
- try: "GET /entries",
27
- }),
28
- }),
29
- );
30
-
31
- export const create = on(
32
- http.post("/entries"),
33
- flow({
34
- in: NewEntry,
35
- out: EntryId,
36
- do: async (input, fx) => {
37
- const [row] = await fx.store(db).insert(entries).values(input).returning();
38
- return { id: row.id };
39
- },
40
- }),
41
- );
42
-
43
- export const list = on(
44
- http.get("/entries"),
45
- flow({
46
- out: Entry.array(),
47
- do: (_, fx) => fx.store(db).select().from(entries),
48
- }),
49
- );
@@ -1,8 +0,0 @@
1
- import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
2
- import { id, now } from "okengine/store";
3
-
4
- export const entries = sqliteTable("entries", {
5
- id: text("id").primaryKey().$defaultFn(id),
6
- body: text("body").notNull(),
7
- createdAt: integer("created_at").notNull().$defaultFn(now),
8
- });
@@ -1,13 +0,0 @@
1
- import { test, expect } from "bun:test";
2
- import { createTestApp } from "okengine/test";
3
- import { app } from "../src/app";
4
-
5
- test("boots — create then list", async () => {
6
- const t = await createTestApp(app);
7
- const { data, error } = await t.api.main.create({ body: "hello" });
8
- expect(error).toBeNull();
9
- expect(data?.id).toBeTruthy();
10
- const { data: rows } = await t.api.main.list({});
11
- expect(rows?.length).toBe(1);
12
- expect(rows?.[0]?.body).toBe("hello");
13
- });
@@ -1,21 +0,0 @@
1
- # Environment template — copy to `.env.local` for local overrides.
2
- # create-oke copies this file to `.env.local` when you scaffold a new project.
3
- #
4
- # Resolution order (first hit wins):
5
- # process.env → .env.local → docker/.env.docker → vault driver → dev fallback
6
- #
7
- # --- Vault (app secrets) ---
8
- # Declare secrets in src/vault.ts with `vault.secret(...)`, then uncomment lines here.
9
-
10
- # --- Infrastructure (optional) ---
11
- # Commented — this app pins postgres, redis, and smtp (Mailpit) in oke.config.ts.
12
- # Run `oke dev --docker` to write role-accurate keys into `docker/.env.docker`.
13
-
14
- # DATABASE_URL — primary Postgres connection; from your host or `docker/.env.docker` after `oke dev --docker`
15
- # DATABASE_URL=postgres://user:password@127.0.0.1:5432/oke
16
-
17
- # REDIS_URL — Redis/Valkey connection for store.kv; from your host or `docker/.env.docker` after `oke dev --docker`
18
- # REDIS_URL=redis://:password@127.0.0.1:6379
19
-
20
- # SMTP_URL — outbound email (Mailpit in docker dev); from your provider or `docker/.env.docker` after `oke dev --docker`
21
- # SMTP_URL=smtp://127.0.0.1:1025
@@ -1,14 +0,0 @@
1
- import { defineConfig } from "drizzle-kit";
2
-
3
- /**
4
- * Domain schema sync for `oke db push|generate|migrate`.
5
- * Versioned prod migrations land in `./drizzle` — never mix with `.oke/`.
6
- */
7
- export default defineConfig({
8
- dialect: "sqlite",
9
- schema: "./src/schema.ts",
10
- out: "./drizzle",
11
- dbCredentials: {
12
- url: process.env.OKE_SQLITE_URL ?? "file:.oke/app.sqlite",
13
- },
14
- });
@@ -1,51 +0,0 @@
1
- import { defineConfig } from "okengine/config";
2
-
3
- export default defineConfig({
4
- drivers: {
5
- store: {
6
- sql: {
7
- local: "sqlite",
8
- docker: "postgres",
9
- test: "memory",
10
- prod: "postgres",
11
- },
12
- kv: {
13
- local: "memory",
14
- docker: "redis",
15
- test: "memory",
16
- prod: "redis",
17
- },
18
- },
19
- signal: {
20
- local: "memory",
21
- docker: "postgres",
22
- test: "memory",
23
- prod: "postgres",
24
- },
25
- clock: {
26
- local: "memory",
27
- docker: "postgres",
28
- test: "frozen",
29
- prod: "postgres",
30
- },
31
- vault: {
32
- local: "dotenv",
33
- docker: "dotenv",
34
- test: "memory",
35
- prod: "sops",
36
- },
37
- channel: {
38
- email: {
39
- local: "console",
40
- docker: "smtp",
41
- test: "console",
42
- prod: "smtp",
43
- },
44
- },
45
- },
46
- images: {
47
- "store.sql": "postgres:18-alpine",
48
- "store.kv": "redis:8-alpine",
49
- },
50
- i18n: { locales: ["en", "ar"], default: "en", dir: { ar: "rtl" } },
51
- });
@@ -1,4 +0,0 @@
1
- import { store } from "okengine";
2
- import * as schema from "./schema";
3
-
4
- export const db = store.sql("app", { schema });
@@ -1,9 +0,0 @@
1
- import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
2
- import { id, now } from "okengine/store";
3
-
4
- /** Replace with your tables — keep defaults on the schema. */
5
- export const entries = sqliteTable("entries", {
6
- id: text("id").primaryKey().$defaultFn(id),
7
- body: text("body").notNull(),
8
- createdAt: integer("created_at").notNull().$defaultFn(now),
9
- });
File without changes
File without changes
File without changes
File without changes