@shaferllc/keel 0.68.0 → 0.74.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.
- package/AGENTS.md +2 -0
- package/README.md +14 -5
- package/dist/api/api.config.stub +9 -0
- package/dist/api/config.d.ts +13 -0
- package/dist/api/config.js +14 -0
- package/dist/api/index.d.ts +16 -0
- package/dist/api/index.js +13 -0
- package/dist/api/provider.d.ts +10 -0
- package/dist/api/provider.js +17 -0
- package/dist/api/query.d.ts +35 -0
- package/dist/api/query.js +42 -0
- package/dist/api/resource.d.ts +91 -0
- package/dist/api/resource.js +188 -0
- package/dist/core/application.js +6 -0
- package/dist/core/cache.d.ts +1 -2
- package/dist/core/cache.js +9 -2
- package/dist/core/cli/stubs.d.ts +14 -0
- package/dist/core/cli/stubs.js +105 -0
- package/dist/core/console-prompt.d.ts +79 -0
- package/dist/core/console-prompt.js +239 -0
- package/dist/core/console-ui.d.ts +96 -0
- package/dist/core/console-ui.js +187 -0
- package/dist/core/console.d.ts +188 -0
- package/dist/core/console.js +395 -0
- package/dist/core/database.d.ts +70 -1
- package/dist/core/database.js +174 -15
- package/dist/core/env.d.ts +96 -0
- package/dist/core/env.js +140 -0
- package/dist/core/health.d.ts +2 -2
- package/dist/core/health.js +2 -2
- package/dist/core/http/kernel.d.ts +2 -0
- package/dist/core/http/kernel.js +48 -0
- package/dist/core/http/router.d.ts +5 -5
- package/dist/core/http/router.js +5 -5
- package/dist/core/i18n.d.ts +162 -0
- package/dist/core/i18n.js +472 -0
- package/dist/core/index.d.ts +25 -4
- package/dist/core/index.js +13 -3
- package/dist/core/instrumentation.d.ts +113 -0
- package/dist/core/instrumentation.js +52 -0
- package/dist/core/logger.d.ts +7 -0
- package/dist/core/logger.js +28 -1
- package/dist/core/notification.js +10 -1
- package/dist/core/package.d.ts +120 -0
- package/dist/core/package.js +169 -0
- package/dist/core/pages.d.ts +108 -0
- package/dist/core/pages.js +199 -0
- package/dist/core/queue.js +26 -5
- package/dist/core/repl.d.ts +33 -0
- package/dist/core/repl.js +88 -0
- package/dist/core/scheduler.js +6 -0
- package/dist/core/social.d.ts +4 -4
- package/dist/core/social.js +4 -4
- package/dist/core/storage.js +15 -3
- package/dist/core/telemetry.d.ts +208 -0
- package/dist/core/telemetry.js +383 -0
- package/dist/core/template.d.ts +2 -3
- package/dist/core/template.js +2 -3
- package/dist/core/testing.d.ts +170 -1
- package/dist/core/testing.js +504 -2
- package/dist/db/d1.js +13 -0
- package/dist/db/pg.d.ts +13 -0
- package/dist/db/pg.js +46 -4
- package/dist/openapi/config.d.ts +28 -0
- package/dist/openapi/config.js +25 -0
- package/dist/openapi/doc.d.ts +40 -0
- package/dist/openapi/doc.js +20 -0
- package/dist/openapi/export.d.ts +8 -0
- package/dist/openapi/export.js +19 -0
- package/dist/openapi/gate.d.ts +15 -0
- package/dist/openapi/gate.js +27 -0
- package/dist/openapi/index.d.ts +19 -0
- package/dist/openapi/index.js +15 -0
- package/dist/openapi/openapi.config.stub +29 -0
- package/dist/openapi/provider.d.ts +18 -0
- package/dist/openapi/provider.js +35 -0
- package/dist/openapi/routes.d.ts +9 -0
- package/dist/openapi/routes.js +23 -0
- package/dist/openapi/spec.d.ts +23 -0
- package/dist/openapi/spec.js +132 -0
- package/dist/openapi/ui.d.ts +8 -0
- package/dist/openapi/ui.js +31 -0
- package/dist/openapi/zod.d.ts +12 -0
- package/dist/openapi/zod.js +46 -0
- package/dist/watch/config.d.ts +33 -0
- package/dist/watch/config.js +38 -0
- package/dist/watch/entry.d.ts +53 -0
- package/dist/watch/entry.js +105 -0
- package/dist/watch/gate.d.ts +20 -0
- package/dist/watch/gate.js +32 -0
- package/dist/watch/index.d.ts +21 -0
- package/dist/watch/index.js +17 -0
- package/dist/watch/migration.d.ts +7 -0
- package/dist/watch/migration.js +20 -0
- package/dist/watch/provider.d.ts +22 -0
- package/dist/watch/provider.js +58 -0
- package/dist/watch/prune.d.ts +11 -0
- package/dist/watch/prune.js +20 -0
- package/dist/watch/recorder.d.ts +24 -0
- package/dist/watch/recorder.js +39 -0
- package/dist/watch/routes.d.ts +13 -0
- package/dist/watch/routes.js +55 -0
- package/dist/watch/store.d.ts +54 -0
- package/dist/watch/store.js +158 -0
- package/dist/watch/ui/dist/watch.css +1 -0
- package/dist/watch/ui/dist/watch.js +555 -0
- package/dist/watch/ui-shell.d.ts +12 -0
- package/dist/watch/ui-shell.js +24 -0
- package/dist/watch/watch.config.stub +47 -0
- package/dist/watch/watchers.d.ts +12 -0
- package/dist/watch/watchers.js +156 -0
- package/docs/ai-manifest.json +737 -3
- package/docs/api-resources.md +118 -0
- package/docs/configuration.md +74 -0
- package/docs/console.md +193 -13
- package/docs/database.md +101 -0
- package/docs/examples/configuration.ts +40 -0
- package/docs/examples/console.ts +134 -0
- package/docs/examples/database.ts +90 -0
- package/docs/examples/i18n.ts +117 -0
- package/docs/examples/logger.ts +74 -0
- package/docs/examples/mail.ts +103 -0
- package/docs/examples/pages.ts +82 -0
- package/docs/examples/telemetry.ts +127 -0
- package/docs/examples/testing.ts +149 -0
- package/docs/health.md +4 -4
- package/docs/i18n.md +302 -0
- package/docs/logger.md +156 -10
- package/docs/mail.md +73 -0
- package/docs/openapi.md +111 -0
- package/docs/packages.md +118 -0
- package/docs/pages.md +217 -0
- package/docs/storage.md +5 -3
- package/docs/telemetry.md +263 -0
- package/docs/templates.md +3 -4
- package/docs/testing.md +251 -0
- package/docs/watch.md +118 -0
- package/llms-full.txt +2370 -248
- package/llms.txt +12 -1
- package/package.json +18 -2
package/llms.txt
CHANGED
|
@@ -10,6 +10,7 @@ Userland imports everything from `@shaferllc/keel/core`.
|
|
|
10
10
|
## Docs
|
|
11
11
|
|
|
12
12
|
- [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
|
+
- [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 — the Remult idea done the Keel way: explicit, server-side, and composed from pieces you already have.
|
|
13
14
|
- [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.
|
|
14
15
|
- [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.
|
|
15
16
|
- [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.
|
|
@@ -33,6 +34,7 @@ Userland imports everything from `@shaferllc/keel/core`.
|
|
|
33
34
|
- [Helpers](https://github.com/shaferllc/keel/blob/main/docs/helpers.md): Keel gives you a handful of global helper functions so you can reach the running application from anywhere — a route handler, a model, a plain function — without threading a container reference through every call.
|
|
34
35
|
- [Built on Hono](https://github.com/shaferllc/keel/blob/main/docs/hono.md): Keel's HTTP layer is Hono — an ultrafast, web-standard router that runs on Node, Cloudflare Workers, Deno, Bun, and more.
|
|
35
36
|
- [Lifecycle Hooks](https://github.com/shaferllc/keel/blob/main/docs/hooks.md): Tap into the application lifecycle — run code once the app is ready, clean up on shutdown, and observe route registration.
|
|
37
|
+
- [Internationalization](https://github.com/shaferllc/keel/blob/main/docs/i18n.md): Translations with ICU message formatting, plus the Intl formatters that go with them.
|
|
36
38
|
- [Inertia](https://github.com/shaferllc/keel/blob/main/docs/inertia.md): Keel ships a server-side Inertia.js adapter.
|
|
37
39
|
- [Locks](https://github.com/shaferllc/keel/blob/main/docs/locks.md): "Only one of you may do this at a time" — across processes, across nodes.
|
|
38
40
|
- [Logger](https://github.com/shaferllc/keel/blob/main/docs/logger.md): A small leveled logger. It writes structured JSON by default — one line per event, ready for log aggregators — and pretty single-line output in debug. Reach it with the global logger() helper.
|
|
@@ -41,6 +43,9 @@ Userland imports everything from `@shaferllc/keel/core`.
|
|
|
41
43
|
- [Migrations](https://github.com/shaferllc/keel/blob/main/docs/migrations.md): Version your database schema. A migration is a { name, up, down } object; a fluent schema builder describes tables, and the migrator runs them against your connection, tracking what's applied. The SQL is dialect-aware (sqlite / mysql / postgres) and the core imports no driver.
|
|
42
44
|
- [Models](https://github.com/shaferllc/keel/blob/main/docs/models.md): Model is a tiny active-record layer over the query builder.
|
|
43
45
|
- [Notifications](https://github.com/shaferllc/keel/blob/main/docs/notifications.md): Send a message to a recipient over one or more channels — mail, database, or your own — inline or through the queue.
|
|
46
|
+
- [OpenAPI](https://github.com/shaferllc/keel/blob/main/docs/openapi.md): Keel OpenAPI generates an OpenAPI 3 spec from your routes and serves Swagger UI to explore it.
|
|
47
|
+
- [Packages](https://github.com/shaferllc/keel/blob/main/docs/packages.md): A package is a redistributable slice of a Keel app — routes, a UI, config, migrations, console commands — that installs with a single app.register(...).
|
|
48
|
+
- [Pages](https://github.com/shaferllc/keel/blob/main/docs/pages.md): Page-based routing — a file is a route.
|
|
44
49
|
- [Service Providers](https://github.com/shaferllc/keel/blob/main/docs/providers.md): Service providers are the central place to configure your application.
|
|
45
50
|
- [Queues & Jobs](https://github.com/shaferllc/keel/blob/main/docs/queues.md): Move slow work — sending mail, calling an API, processing an upload — off the request path.
|
|
46
51
|
- [Rate Limiting](https://github.com/shaferllc/keel/blob/main/docs/rate-limiting.md): rateLimiter() is a middleware that caps how many requests a client can make in a window.
|
|
@@ -53,13 +58,15 @@ Userland imports everything from `@shaferllc/keel/core`.
|
|
|
53
58
|
- [Social authentication](https://github.com/shaferllc/keel/blob/main/docs/social-auth.md): "Sign in with GitHub / Google / Discord" — OAuth 2.0, without an SDK.
|
|
54
59
|
- [Static Files](https://github.com/shaferllc/keel/blob/main/docs/static-files.md): serveStatic() serves files from a directory (default public/) before your routes run.
|
|
55
60
|
- [Storage](https://github.com/shaferllc/keel/blob/main/docs/storage.md): File storage over a pluggable disk — like the database and mail layers, the core imports no filesystem or SDK, so it runs on Node and the edge.
|
|
56
|
-
- [
|
|
61
|
+
- [Telemetry](https://github.com/shaferllc/keel/blob/main/docs/telemetry.md): Distributed tracing — spans, W3C trace context, and an OTLP exporter — with no SDK.
|
|
62
|
+
- [Templates](https://github.com/shaferllc/keel/blob/main/docs/templates.md): A string templating engine — {{ }} interpolation and @-prefixed tags for logic, includes, layouts, and components.
|
|
57
63
|
- [Testing](https://github.com/shaferllc/keel/blob/main/docs/testing.md): Test your app by injecting requests — no server, no port, no network — and asserting on the response.
|
|
58
64
|
- [Transformers](https://github.com/shaferllc/keel/blob/main/docs/transformers.md): A model knows the database; a transformer knows the API.
|
|
59
65
|
- [URL Builder](https://github.com/shaferllc/keel/blob/main/docs/url-builder.md): Generate URLs from named routes so paths live in one place.
|
|
60
66
|
- [Validation](https://github.com/shaferllc/keel/blob/main/docs/validation.md): validate() parses request input against a schema and returns typed data.
|
|
61
67
|
- [Views](https://github.com/shaferllc/keel/blob/main/docs/views.md): Keel renders HTML with Hono JSX — type-safe components that run identically on Node and on Cloudflare Workers (no filesystem templating, so it ports anywhere).
|
|
62
68
|
- [Vite](https://github.com/shaferllc/keel/blob/main/docs/vite.md): Wire a modern frontend build — bundling, hashed filenames, hot module reload — to Keel's server-rendered HTML, the way modern full-stack frameworks do.
|
|
69
|
+
- [Watch](https://github.com/shaferllc/keel/blob/main/docs/watch.md): Keel Watch is a debug dashboard — a Telescope for Keel.
|
|
63
70
|
|
|
64
71
|
## Examples
|
|
65
72
|
|
|
@@ -71,6 +78,7 @@ Every topic has a runnable, type-checked example:
|
|
|
71
78
|
- [Service Broker example](https://github.com/shaferllc/keel/blob/main/docs/examples/broker.ts)
|
|
72
79
|
- [Cache example](https://github.com/shaferllc/keel/blob/main/docs/examples/cache.ts)
|
|
73
80
|
- [Configuration example](https://github.com/shaferllc/keel/blob/main/docs/examples/configuration.ts)
|
|
81
|
+
- [The Console example](https://github.com/shaferllc/keel/blob/main/docs/examples/console.ts)
|
|
74
82
|
- [The Service Container example](https://github.com/shaferllc/keel/blob/main/docs/examples/container.ts)
|
|
75
83
|
- [Controllers example](https://github.com/shaferllc/keel/blob/main/docs/examples/controllers.ts)
|
|
76
84
|
- [Database example](https://github.com/shaferllc/keel/blob/main/docs/examples/database.ts)
|
|
@@ -83,6 +91,7 @@ Every topic has a runnable, type-checked example:
|
|
|
83
91
|
- [Health Checks example](https://github.com/shaferllc/keel/blob/main/docs/examples/health.ts)
|
|
84
92
|
- [Helpers example](https://github.com/shaferllc/keel/blob/main/docs/examples/helpers.ts)
|
|
85
93
|
- [Lifecycle Hooks example](https://github.com/shaferllc/keel/blob/main/docs/examples/hooks.ts)
|
|
94
|
+
- [Internationalization example](https://github.com/shaferllc/keel/blob/main/docs/examples/i18n.ts)
|
|
86
95
|
- [Inertia example](https://github.com/shaferllc/keel/blob/main/docs/examples/inertia.ts)
|
|
87
96
|
- [Locks example](https://github.com/shaferllc/keel/blob/main/docs/examples/locks.ts)
|
|
88
97
|
- [Logger example](https://github.com/shaferllc/keel/blob/main/docs/examples/logger.ts)
|
|
@@ -91,6 +100,7 @@ Every topic has a runnable, type-checked example:
|
|
|
91
100
|
- [Migrations example](https://github.com/shaferllc/keel/blob/main/docs/examples/migrations.ts)
|
|
92
101
|
- [Models example](https://github.com/shaferllc/keel/blob/main/docs/examples/models.ts)
|
|
93
102
|
- [Notifications example](https://github.com/shaferllc/keel/blob/main/docs/examples/notification.ts)
|
|
103
|
+
- [Pages example](https://github.com/shaferllc/keel/blob/main/docs/examples/pages.ts)
|
|
94
104
|
- [Service Providers example](https://github.com/shaferllc/keel/blob/main/docs/examples/providers.ts)
|
|
95
105
|
- [Queues & Jobs example](https://github.com/shaferllc/keel/blob/main/docs/examples/queues.ts)
|
|
96
106
|
- [Rate Limiting example](https://github.com/shaferllc/keel/blob/main/docs/examples/rate-limiting.ts)
|
|
@@ -101,6 +111,7 @@ Every topic has a runnable, type-checked example:
|
|
|
101
111
|
- [Sessions example](https://github.com/shaferllc/keel/blob/main/docs/examples/sessions.ts)
|
|
102
112
|
- [Static Files example](https://github.com/shaferllc/keel/blob/main/docs/examples/static-files.ts)
|
|
103
113
|
- [Storage example](https://github.com/shaferllc/keel/blob/main/docs/examples/storage.ts)
|
|
114
|
+
- [Telemetry example](https://github.com/shaferllc/keel/blob/main/docs/examples/telemetry.ts)
|
|
104
115
|
- [Templates example](https://github.com/shaferllc/keel/blob/main/docs/examples/templates.ts)
|
|
105
116
|
- [Testing example](https://github.com/shaferllc/keel/blob/main/docs/examples/testing.ts)
|
|
106
117
|
- [Transformers example](https://github.com/shaferllc/keel/blob/main/docs/examples/transformers.ts)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shaferllc/keel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.74.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",
|
|
@@ -48,6 +48,18 @@
|
|
|
48
48
|
"./mcp": {
|
|
49
49
|
"types": "./dist/mcp/server.d.ts",
|
|
50
50
|
"import": "./dist/mcp/server.js"
|
|
51
|
+
},
|
|
52
|
+
"./watch": {
|
|
53
|
+
"types": "./dist/watch/index.d.ts",
|
|
54
|
+
"import": "./dist/watch/index.js"
|
|
55
|
+
},
|
|
56
|
+
"./openapi": {
|
|
57
|
+
"types": "./dist/openapi/index.d.ts",
|
|
58
|
+
"import": "./dist/openapi/index.js"
|
|
59
|
+
},
|
|
60
|
+
"./api": {
|
|
61
|
+
"types": "./dist/api/index.d.ts",
|
|
62
|
+
"import": "./dist/api/index.js"
|
|
51
63
|
}
|
|
52
64
|
},
|
|
53
65
|
"bin": {
|
|
@@ -74,7 +86,9 @@
|
|
|
74
86
|
"test": "node --import tsx --test tests/*.test.ts",
|
|
75
87
|
"test:coverage": "node --import tsx --test --experimental-test-coverage --test-coverage-exclude='tests/**' tests/*.test.ts",
|
|
76
88
|
"build:ai": "tsx scripts/build-ai.ts",
|
|
77
|
-
"build": "
|
|
89
|
+
"build:watch-ui": "vite build --config src/watch/ui/vite.config.ts",
|
|
90
|
+
"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/",
|
|
91
|
+
"build": "npm run build:ai && npm run build:watch-ui && rm -rf dist && tsc -p tsconfig.build.json && npm run build:watch-copy",
|
|
78
92
|
"dev:client": "vite",
|
|
79
93
|
"build:client": "vite build",
|
|
80
94
|
"prepare": "npm run build"
|
|
@@ -95,8 +109,10 @@
|
|
|
95
109
|
},
|
|
96
110
|
"devDependencies": {
|
|
97
111
|
"@hono/node-server": "^1.13.7",
|
|
112
|
+
"@libsql/client": "^0.17.4",
|
|
98
113
|
"@types/node": "^26.1.1",
|
|
99
114
|
"commander": "^12.1.0",
|
|
115
|
+
"preact": "^10.29.7",
|
|
100
116
|
"tsx": "^4.19.2",
|
|
101
117
|
"typescript": "^5.7.2",
|
|
102
118
|
"vite": "^6.4.3"
|