@shaferllc/keel 0.79.0 → 0.81.0

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 (84) hide show
  1. package/README.md +3 -1
  2. package/dist/accounts/accounts.config.stub +50 -0
  3. package/dist/accounts/config.d.ts +46 -0
  4. package/dist/accounts/config.js +39 -0
  5. package/dist/accounts/flows.d.ts +50 -0
  6. package/dist/accounts/flows.js +133 -0
  7. package/dist/accounts/index.d.ts +28 -0
  8. package/dist/accounts/index.js +23 -0
  9. package/dist/accounts/migration.d.ts +14 -0
  10. package/dist/accounts/migration.js +39 -0
  11. package/dist/accounts/provider.d.ts +18 -0
  12. package/dist/accounts/provider.js +37 -0
  13. package/dist/accounts/routes.d.ts +15 -0
  14. package/dist/accounts/routes.js +116 -0
  15. package/dist/accounts/store.d.ts +33 -0
  16. package/dist/accounts/store.js +37 -0
  17. package/dist/accounts/tokens.d.ts +60 -0
  18. package/dist/accounts/tokens.js +116 -0
  19. package/dist/accounts/totp.d.ts +58 -0
  20. package/dist/accounts/totp.js +134 -0
  21. package/dist/accounts/two-factor.d.ts +56 -0
  22. package/dist/accounts/two-factor.js +146 -0
  23. package/dist/billing/billable.d.ts +83 -0
  24. package/dist/billing/billable.js +177 -0
  25. package/dist/billing/billing.config.stub +33 -0
  26. package/dist/billing/builder.d.ts +54 -0
  27. package/dist/billing/builder.js +104 -0
  28. package/dist/billing/config.d.ts +43 -0
  29. package/dist/billing/config.js +35 -0
  30. package/dist/billing/crypto.d.ts +11 -0
  31. package/dist/billing/crypto.js +27 -0
  32. package/dist/billing/drivers/fake.d.ts +58 -0
  33. package/dist/billing/drivers/fake.js +190 -0
  34. package/dist/billing/drivers/index.d.ts +11 -0
  35. package/dist/billing/drivers/index.js +22 -0
  36. package/dist/billing/drivers/paddle.d.ts +39 -0
  37. package/dist/billing/drivers/paddle.js +197 -0
  38. package/dist/billing/drivers/stripe.d.ts +33 -0
  39. package/dist/billing/drivers/stripe.js +278 -0
  40. package/dist/billing/events.d.ts +25 -0
  41. package/dist/billing/events.js +7 -0
  42. package/dist/billing/gateway.d.ts +170 -0
  43. package/dist/billing/gateway.js +24 -0
  44. package/dist/billing/index.d.ts +28 -0
  45. package/dist/billing/index.js +19 -0
  46. package/dist/billing/manager.d.ts +34 -0
  47. package/dist/billing/manager.js +61 -0
  48. package/dist/billing/migration.d.ts +13 -0
  49. package/dist/billing/migration.js +68 -0
  50. package/dist/billing/provider.d.ts +20 -0
  51. package/dist/billing/provider.js +42 -0
  52. package/dist/billing/routes.d.ts +11 -0
  53. package/dist/billing/routes.js +21 -0
  54. package/dist/billing/subscription-item.d.ts +18 -0
  55. package/dist/billing/subscription-item.js +11 -0
  56. package/dist/billing/subscription.d.ts +85 -0
  57. package/dist/billing/subscription.js +157 -0
  58. package/dist/billing/webhooks.d.ts +26 -0
  59. package/dist/billing/webhooks.js +75 -0
  60. package/dist/core/database.d.ts +36 -0
  61. package/dist/core/database.js +141 -4
  62. package/dist/core/index.d.ts +5 -2
  63. package/dist/core/index.js +3 -2
  64. package/dist/core/migrations.d.ts +52 -2
  65. package/dist/core/migrations.js +134 -3
  66. package/dist/core/model-events.d.ts +34 -0
  67. package/dist/core/model-events.js +71 -0
  68. package/dist/core/model-query.d.ts +68 -0
  69. package/dist/core/model-query.js +234 -0
  70. package/dist/core/model.d.ts +91 -4
  71. package/dist/core/model.js +217 -32
  72. package/dist/core/relations.d.ts +53 -0
  73. package/dist/core/relations.js +242 -0
  74. package/docs/accounts.md +214 -0
  75. package/docs/ai-manifest.json +70 -1
  76. package/docs/billing.md +242 -0
  77. package/docs/database.md +33 -0
  78. package/docs/examples/accounts.ts +150 -0
  79. package/docs/migrations.md +32 -3
  80. package/docs/models.md +133 -3
  81. package/docs/packages.md +3 -1
  82. package/llms-full.txt +671 -7
  83. package/llms.txt +3 -0
  84. package/package.json +10 -2
package/llms.txt CHANGED
@@ -9,11 +9,13 @@ Userland imports everything from `@shaferllc/keel/core`.
9
9
 
10
10
  ## Docs
11
11
 
12
+ - [Accounts](https://github.com/shaferllc/keel/blob/main/docs/accounts.md): Password reset, email verification, and two-factor authentication — the flows every app with a login needs, built on primitives already in core (hash, encryption, mail, rate-limit).
12
13
  - [Building Keel apps with AI](https://github.com/shaferllc/keel/blob/main/docs/ai.md): Keel is built to be written with an AI agent.
13
14
  - [API Resources](https://github.com/shaferllc/keel/blob/main/docs/api-resources.md): apiResource(router, Model, options) generates a full CRUD REST API from a Keel model — explicit, server-side, and composed from pieces you already have.
14
15
  - [Architecture](https://github.com/shaferllc/keel/blob/main/docs/architecture.md): Keel is small on purpose. This page maps the pieces and traces a request from socket to response. Nothing here is magic — every layer is a short, readable file in src/core/, and this guide is mostly a reading order for it.
15
16
  - [Authentication](https://github.com/shaferllc/keel/blob/main/docs/authentication.md): Session-based auth built on the pieces you already have: sessions hold the login, hashing checks passwords.
16
17
  - [Authorization](https://github.com/shaferllc/keel/blob/main/docs/authorization.md): Where authentication answers who you are, authorization answers what you're allowed to do.
18
+ - [Billing](https://github.com/shaferllc/keel/blob/main/docs/billing.md): Keel Billing is a subscription-billing layer — a port of Laravel Cashier — for charging customers, managing subscriptions, and reconciling gateway state through webhooks.
17
19
  - [Broadcasting](https://github.com/shaferllc/keel/blob/main/docs/broadcasting.md): Push events to clients in real time over named channels.
18
20
  - [Service Broker](https://github.com/shaferllc/keel/blob/main/docs/broker.md): Structure an application as services that talk to each other by name instead of by import.
19
21
  - [Cache](https://github.com/shaferllc/keel/blob/main/docs/cache.md): A small cache with TTLs and the remember pattern.
@@ -72,6 +74,7 @@ Userland imports everything from `@shaferllc/keel/core`.
72
74
 
73
75
  Every topic has a runnable, type-checked example:
74
76
 
77
+ - [Accounts example](https://github.com/shaferllc/keel/blob/main/docs/examples/accounts.ts)
75
78
  - [API Resources example](https://github.com/shaferllc/keel/blob/main/docs/examples/api-resources.ts)
76
79
  - [Authentication example](https://github.com/shaferllc/keel/blob/main/docs/examples/authentication.ts)
77
80
  - [Authorization example](https://github.com/shaferllc/keel/blob/main/docs/examples/authorization.ts)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shaferllc/keel",
3
- "version": "0.79.0",
3
+ "version": "0.81.0",
4
4
  "type": "module",
5
5
  "description": "The house framework for Node.js — a service container, providers, routing, JSX views, and a code-generating console.",
6
6
  "license": "MIT",
@@ -61,6 +61,14 @@
61
61
  "types": "./dist/api/index.d.ts",
62
62
  "import": "./dist/api/index.js"
63
63
  },
64
+ "./accounts": {
65
+ "types": "./dist/accounts/index.d.ts",
66
+ "import": "./dist/accounts/index.js"
67
+ },
68
+ "./billing": {
69
+ "types": "./dist/billing/index.d.ts",
70
+ "import": "./dist/billing/index.js"
71
+ },
64
72
  "./cli": {
65
73
  "types": "./dist/core/cli/index.d.ts",
66
74
  "import": "./dist/core/cli/index.js"
@@ -89,7 +97,7 @@
89
97
  "test:coverage": "node --import tsx --test --experimental-test-coverage --test-coverage-exclude='tests/**' tests/*.test.ts",
90
98
  "build:ai": "tsx scripts/build-ai.ts",
91
99
  "build:watch-ui": "vite build --config src/watch/ui/vite.config.ts",
92
- "build:watch-copy": "mkdir -p dist/watch/ui && cp -R src/watch/ui/dist dist/watch/ui/dist && cp src/watch/watch.config.stub dist/watch/ && cp src/openapi/openapi.config.stub dist/openapi/ && cp src/api/api.config.stub dist/api/",
100
+ "build:watch-copy": "mkdir -p dist/watch/ui && cp -R src/watch/ui/dist dist/watch/ui/dist && cp src/watch/watch.config.stub dist/watch/ && cp src/openapi/openapi.config.stub dist/openapi/ && cp src/api/api.config.stub dist/api/ && cp src/billing/billing.config.stub dist/billing/ && cp src/accounts/accounts.config.stub dist/accounts/",
93
101
  "build": "npm run build:ai && npm run build:watch-ui && rm -rf dist && tsc -p tsconfig.build.json && npm run build:watch-copy",
94
102
  "prepare": "npm run build",
95
103
  "typecheck:tests": "tsc --noEmit -p tsconfig.tests.json",