okengine 0.6.0 → 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.
Files changed (38) hide show
  1. package/README.md +148 -13
  2. package/package.json +3 -3
  3. package/site/content/docs/elements/channel.mdx +71 -7
  4. package/site/content/docs/reference/configuration.mdx +5 -4
  5. package/site/content/docs/reference/environment-variables.mdx +32 -8
  6. package/src/cli/openbao-restart.integration.test.ts +106 -97
  7. package/src/docker/dockerfile.integration.test.ts +126 -119
  8. package/src/docker/stack.integration.test.ts +118 -102
  9. package/src/drivers/ai-ollama-tools.integration.test.ts +8 -6
  10. package/src/drivers/ai-ollama.integration.test.ts +3 -19
  11. package/src/drivers/channel-fcm.ts +49 -53
  12. package/src/drivers/channel-msegat.ts +61 -0
  13. package/src/drivers/channel-sently-map.ts +57 -0
  14. package/src/drivers/channel-sently.test.ts +99 -0
  15. package/src/drivers/channel-sndr.ts +28 -0
  16. package/src/drivers/channel-taqnyat.ts +57 -0
  17. package/src/drivers/channel-types.ts +79 -2
  18. package/src/drivers/channel-unifonic.ts +26 -43
  19. package/src/drivers/channel-wa-cloud.ts +33 -47
  20. package/src/drivers/channel-webpush.ts +39 -239
  21. package/src/drivers/index.ts +4 -0
  22. package/src/elements/channel/costs.test.ts +2 -2
  23. package/src/elements/channel/costs.ts +14 -2
  24. package/src/elements/channel/mime.ts +11 -0
  25. package/src/elements/channel/runtime.ts +94 -0
  26. package/src/elements/channel/sndr-webhooks.test.ts +26 -0
  27. package/src/elements/channel.ts +10 -1
  28. package/src/elements/index.ts +9 -0
  29. package/src/kernel/boot-bind/channel.test.ts +68 -3
  30. package/src/kernel/boot-bind/channel.ts +93 -2
  31. package/src/plugins/auth-delivery.mailpit.integration.test.ts +10 -4
  32. package/src/release/exports.test.ts +26 -0
  33. package/src/release/exports.ts +64 -5
  34. package/src/release/index.ts +5 -0
  35. package/src/release/measure.exports.test.ts +13 -1
  36. package/src/release/measure.ts +76 -13
  37. package/src/release/official-plugins.ts +46 -0
  38. package/src/release/readme.test.ts +30 -2
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Official `okengine/plugins` named exports measured for CI budgets.
3
+ * Categories match `site/content/docs/plugins/index.mdx`.
4
+ * Keep in sync with the docs catalogue — landing + budgets both read this.
5
+ */
6
+
7
+ /** Docs / landing category for an official plugin. */
8
+ export type PluginBudgetCategory = "auth" | "security" | "ops" | "perf";
9
+
10
+ /** One official plugin entry measured as `export:./plugins/<name>`. */
11
+ export type OfficialPluginBudget = {
12
+ /** Named export from `okengine/plugins`. */
13
+ readonly name: string;
14
+ /** Basename under `src/plugins/` (e.g. `magic-link.ts`). */
15
+ readonly file: string;
16
+ /** Docs category. */
17
+ readonly category: PluginBudgetCategory;
18
+ };
19
+
20
+ /** Category display order (docs index). */
21
+ export const PLUGIN_BUDGET_CATEGORIES: readonly PluginBudgetCategory[] = [
22
+ "auth",
23
+ "security",
24
+ "ops",
25
+ "perf",
26
+ ] as const;
27
+
28
+ /**
29
+ * Canonical official plugins — membership, file mapping, and grouping.
30
+ * Order within a category is docs order; landing may re-sort by size.
31
+ */
32
+ export const OFFICIAL_PLUGIN_BUDGETS: readonly OfficialPluginBudget[] = [
33
+ { name: "username", file: "username.ts", category: "auth" },
34
+ { name: "anonymous", file: "anonymous.ts", category: "auth" },
35
+ { name: "magicLink", file: "magic-link.ts", category: "auth" },
36
+ { name: "emailOtp", file: "email-otp.ts", category: "auth" },
37
+ { name: "phoneNumber", file: "phone-number.ts", category: "auth" },
38
+ { name: "twoFactor", file: "two-factor.ts", category: "auth" },
39
+ { name: "passkey", file: "passkey.ts", category: "auth" },
40
+ { name: "headers", file: "headers.ts", category: "security" },
41
+ { name: "cors", file: "cors.ts", category: "security" },
42
+ { name: "csrf", file: "csrf.ts", category: "security" },
43
+ { name: "ipAllowlist", file: "ip-allowlist.ts", category: "security" },
44
+ { name: "maintenanceMode", file: "maintenance-mode.ts", category: "ops" },
45
+ { name: "compression", file: "compression.ts", category: "perf" },
46
+ ] as const;
@@ -36,6 +36,26 @@ describe("budgets markdown", () => {
36
36
  group: "exports",
37
37
  ok: true,
38
38
  },
39
+ {
40
+ id: "export:./plugins/cors",
41
+ label: "cors",
42
+ value: 2048,
43
+ limit: 2304,
44
+ unit: "bytes",
45
+ gate: "regression",
46
+ group: "plugins",
47
+ ok: true,
48
+ },
49
+ {
50
+ id: "export:./plugins/username",
51
+ label: "username",
52
+ value: 3072,
53
+ limit: 3328,
54
+ unit: "bytes",
55
+ gate: "regression",
56
+ group: "plugins",
57
+ ok: true,
58
+ },
39
59
  {
40
60
  id: "export:./drivers/postgres",
41
61
  label: "postgres",
@@ -52,10 +72,18 @@ describe("budgets markdown", () => {
52
72
  expect(md.startsWith("# Budgets\n")).toBe(true);
53
73
  expect(md).toContain("## Core");
54
74
  expect(md).toContain("## Exports");
75
+ expect(md).toContain("## Plugins");
76
+ expect(md).toContain("### Auth");
77
+ expect(md).toContain("### Security");
55
78
  expect(md).toContain("## Drivers");
56
- expect(md).toContain("| channel |");
57
- expect(md).toContain("| postgres |");
79
+ expect(md).toMatch(/\|\s*channel\s*\|/);
80
+ expect(md).toMatch(/\|\s*cors\s*\|/);
81
+ expect(md).toMatch(/\|\s*username\s*\|/);
82
+ expect(md).toMatch(/\|\s*postgres\s*\|/);
58
83
  expect(md).toContain("[`budgets.json`](budgets.json)");
59
84
  expect(md).not.toContain("./channel");
85
+ // oxfmt-aligned separators (not compact `|---|---|---|`) so Format stays green
86
+ expect(md).not.toContain("|---|---|---|");
87
+ expect(md).toMatch(/\| -{3,} \| -{3,} \| -{3,} \|/);
60
88
  });
61
89
  });