create-oke 0.5.1 → 0.6.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-oke",
3
- "version": "0.5.1",
3
+ "version": "0.6.1",
4
4
  "description": "Scaffold an okengine app — bunx create-oke@latest <name>",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,5 +1,4 @@
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.
1
+ # Environment template — create-oke copies this to `.env.local` when you scaffold.
3
2
  #
4
3
  # Resolution order (first hit wins):
5
4
  # process.env → .env.local → docker/.env.docker → vault driver → dev fallback
@@ -12,6 +11,12 @@
12
11
  # Uncomment to override compose credentials for a host-managed service.
13
12
  # Host ports under docker mode are unique per project — do not assume defaults.
14
13
 
14
+ # ── App / Console ───────────────────────────────────────────
15
+ # PORT=6530
16
+ # OKE_APP_URL=http://127.0.0.1:6530
17
+ # OKE_CONSOLE_SECRET=
18
+ # MAINTENANCE_MODE=0
19
+
15
20
  # ── channel.email — Mailpit (SMTP + UI) ─────────────────────
16
21
  # OKE_CHANNEL_EMAIL_URL=smtp://127.0.0.1:1025
17
22
  # SMTP_URL=smtp://127.0.0.1:1025
@@ -25,6 +30,31 @@
25
30
  # MP_SMTP_AUTH_ACCEPT_ANY=1
26
31
  # MP_SMTP_AUTH_ALLOW_INSECURE=1
27
32
 
33
+ # ── channel.email — HTTP providers ──────────────────────────
34
+ # RESEND_API_KEY=
35
+ # SNDR_API_KEY=
36
+ # SNDR_BASE_URL=https://api.sndr.sh
37
+ # SNDR_FROM=hello@your-verified-domain.com
38
+
39
+ # ── channel.sms — Taqnyat / Msegat / Unifonic ───────────────
40
+ # TAQNYAT_BEARER_TOKEN=
41
+ # TAQNYAT_SENDER=
42
+ # MSEGAT_USERNAME=
43
+ # MSEGAT_API_KEY=
44
+ # MSEGAT_SENDER=
45
+ # UNIFONIC_APPSID=
46
+ # UNIFONIC_SENDER=
47
+
48
+ # ── channel.whatsapp / push ─────────────────────────────────
49
+ # WHATSAPP_TOKEN=
50
+ # WHATSAPP_PHONE_NUMBER_ID=
51
+ # VAPID_PUBLIC_KEY=
52
+ # VAPID_PRIVATE_KEY=
53
+ # VAPID_SUBJECT=mailto:ops@example.com
54
+ # FCM_PROJECT_ID=
55
+ # FCM_CLIENT_EMAIL=
56
+ # FCM_PRIVATE_KEY=
57
+
28
58
  # ── store.files — object storage (S3) ───────────────────────
29
59
  # OKE_STORE_FILES_URL=http://access-key:secret-key@127.0.0.1:9000/oke
30
60
  # S3_ACCESS_KEY_ID=access-key
@@ -54,3 +84,10 @@
54
84
  # Optional controls:
55
85
  # PGDATA=/var/lib/postgresql/data/pgdata
56
86
  # POSTGRES_INITDB_ARGS=--data-checksums
87
+
88
+ # ── AI ──────────────────────────────────────────────────────
89
+ # OKE_AI_DRIVER=ollama
90
+ # OKE_AI_URL=http://127.0.0.1:11434
91
+ # OKE_AI_MODEL=qwen3.5:9b
92
+ # ANTHROPIC_API_KEY=
93
+ # OPENAI_API_KEY=
@@ -1,2 +1,20 @@
1
- /** Locale strings add keys as channel templates need them. */
2
- export default {};
1
+ import { defineLocale, type MessagesFor } from "okengine";
2
+ import { en } from "./en";
3
+
4
+ /**
5
+ * Arabic message catalog — same keys as English (`satisfies MessagesFor`).
6
+ */
7
+ const ar = {
8
+ errors: {
9
+ notFound: "غير موجود",
10
+ unauthorized: "غير مصرّح",
11
+ },
12
+ greeting: "مرحباً، {name}",
13
+ items:
14
+ "{count, plural, zero {لا عناصر} one {عنصر واحد} two {عنصران} few {# عناصر} many {# عنصراً} other {# عنصر}}",
15
+ place:
16
+ "أنهيت في المرتبة {place, selectordinal, one {#} two {#} few {#} other {#}}!",
17
+ status: "{status, select, online {متصل} offline {غير متصل} other {غير معروف}}",
18
+ } satisfies MessagesFor<typeof en>;
19
+
20
+ defineLocale("ar", ar);
@@ -1,2 +1,26 @@
1
- /** Locale strings add keys as channel templates need them. */
2
- export default {};
1
+ import { defineMessages, defineLocale } from "okengine";
2
+
3
+ /**
4
+ * English message catalog — ICU MessageFormat strings for `fx.t("…")`.
5
+ * Nested objects flatten to dot keys (`errors.notFound`).
6
+ *
7
+ * Augment `Register` so `fx.t` autocompletes keys and rejects typos.
8
+ */
9
+ export const en = defineMessages({
10
+ errors: {
11
+ notFound: "Not found",
12
+ unauthorized: "Unauthorized",
13
+ },
14
+ greeting: "Hello, {name}",
15
+ items: "{count, plural, =0 {no items} one {# item} other {# items}}",
16
+ place: "You finished {place, selectordinal, one {#st} two {#nd} few {#rd} other {#th}}!",
17
+ status: "{status, select, online {Online} offline {Offline} other {Unknown}}",
18
+ });
19
+
20
+ defineLocale("en", en);
21
+
22
+ declare module "okengine" {
23
+ interface Register {
24
+ messages: typeof en;
25
+ }
26
+ }