lunorash 1.0.0-alpha.33 → 1.0.0-alpha.331

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 (56) hide show
  1. package/LICENSE.md +6 -0
  2. package/README.md +38 -13
  3. package/dist/bin.mjs +2 -10
  4. package/dist/client/auth.mjs +1 -1
  5. package/dist/client/pagination.mjs +1 -1
  6. package/dist/client/query.mjs +1 -1
  7. package/dist/client/service.d.mts +1 -0
  8. package/dist/client/service.d.ts +1 -0
  9. package/dist/client/service.mjs +1 -0
  10. package/dist/client/ssr.mjs +1 -1
  11. package/dist/client/upload.d.mts +1 -0
  12. package/dist/client/upload.d.ts +1 -0
  13. package/dist/client/upload.mjs +1 -0
  14. package/dist/client.d.mts +24 -0
  15. package/dist/client.d.ts +24 -0
  16. package/dist/client.mjs +1 -1
  17. package/dist/do.mjs +1 -1
  18. package/dist/errors.d.mts +1 -0
  19. package/dist/errors.d.ts +1 -0
  20. package/dist/errors.mjs +1 -0
  21. package/dist/flags/env.d.mts +1 -0
  22. package/dist/flags/env.d.ts +1 -0
  23. package/dist/flags/env.mjs +1 -0
  24. package/dist/flags/flagship.d.mts +1 -0
  25. package/dist/flags/flagship.d.ts +1 -0
  26. package/dist/flags/flagship.mjs +1 -0
  27. package/dist/flags/memory.d.mts +1 -0
  28. package/dist/flags/memory.d.ts +1 -0
  29. package/dist/flags/memory.mjs +1 -0
  30. package/dist/flags/web.d.mts +1 -0
  31. package/dist/flags/web.d.ts +1 -0
  32. package/dist/flags/web.mjs +1 -0
  33. package/dist/flags.d.mts +1 -0
  34. package/dist/flags.d.ts +1 -0
  35. package/dist/flags.mjs +1 -0
  36. package/dist/index.mjs +1 -1
  37. package/dist/observability.d.mts +1 -0
  38. package/dist/observability.d.ts +1 -0
  39. package/dist/observability.mjs +1 -0
  40. package/dist/platform.d.mts +1 -0
  41. package/dist/platform.d.ts +1 -0
  42. package/dist/platform.mjs +1 -0
  43. package/dist/ratelimit.d.mts +1 -0
  44. package/dist/ratelimit.d.ts +1 -0
  45. package/dist/ratelimit.mjs +1 -0
  46. package/dist/runtime.mjs +1 -1
  47. package/dist/server/data-model.mjs +1 -1
  48. package/dist/server/drizzle.mjs +1 -1
  49. package/dist/server/otel.d.mts +1 -0
  50. package/dist/server/otel.d.ts +1 -0
  51. package/dist/server/otel.mjs +1 -0
  52. package/dist/server/rls/testing.mjs +1 -1
  53. package/dist/server/types.mjs +1 -1
  54. package/dist/server.mjs +1 -1
  55. package/dist/values.mjs +1 -1
  56. package/package.json +60 -7
package/LICENSE.md CHANGED
@@ -103,3 +103,9 @@ Unless required by applicable law or agreed to in writing, software distributed
103
103
  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
104
  CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
105
  specific language governing permissions and limitations under the License.
106
+
107
+ <!-- DEPENDENCIES -->
108
+ <!-- /DEPENDENCIES -->
109
+
110
+ <!-- TYPE_DEPENDENCIES -->
111
+ <!-- /TYPE_DEPENDENCIES -->
package/README.md CHANGED
@@ -34,7 +34,7 @@
34
34
 
35
35
  ---
36
36
 
37
- The Lunora umbrella package: one install for the base of a Lunora app. `lunora` re-exports the server authoring API, the worker runtime, the Durable Objects, and the browser client through subpaths, and ships the `lunora` CLI binary — so you depend on a single package instead of `@lunora/server` + `@lunora/values` + `@lunora/runtime` + `@lunora/do` + `@lunora/client` + `@lunora/cli`.
37
+ The Lunora umbrella package: one install for the base of a Lunora app. `lunorash` re-exports the server authoring API, the worker runtime, the Durable Objects, and the browser client through subpaths, and ships the `lunora` CLI binary — so you depend on a single package instead of `@lunora/server` + `@lunora/values` + `@lunora/runtime` + `@lunora/do` + `@lunora/client` + `@lunora/cli`.
38
38
 
39
39
  Part of the [Lunora](https://github.com/anolilab/lunora) framework — a type-safe, real-time backend on Cloudflare Workers + Durable Objects with a Vite-first DX.
40
40
 
@@ -66,6 +66,20 @@ export default defineSchema({
66
66
  });
67
67
  ```
68
68
 
69
+ The `query` / `mutation` / `action` builders are **not** re-exported here: codegen types them against your schema and emits them into your app's `_generated/server` module, so import them from there.
70
+
71
+ ```ts
72
+ // lunora/messages.ts — the procedure builders come from codegen
73
+ import { query, v } from "@/lunora/_generated/server";
74
+
75
+ export const list = query.input({ author: v.id("users") }).query(async ({ ctx, args: { author } }) =>
76
+ ctx.db
77
+ .query("messages")
78
+ .filter((message) => message.author === author)
79
+ .collect(),
80
+ );
81
+ ```
82
+
69
83
  ```ts
70
84
  // src/worker.ts — the worker entry
71
85
  import { createWorker } from "lunorash/runtime";
@@ -85,15 +99,26 @@ pnpm exec lunora deploy
85
99
 
86
100
  ### Subpaths
87
101
 
88
- | Import | Re-exports | Use |
89
- | ------------------------------ | ----------------- | -------------------------------------------------- |
90
- | `lunorash` / `lunorash/server` | `@lunora/server` | `query` / `mutation` / `action`, `defineSchema`, … |
91
- | `lunorash/values` | `@lunora/values` | the `v.*` validator suite |
92
- | `lunorash/runtime` | `@lunora/runtime` | `createWorker` and the query coordinator |
93
- | `lunorash/do` | `@lunora/do` | `ShardDO` / `SessionDO` |
94
- | `lunorash/client` | `@lunora/client` | the browser SDK (`LunoraClient`, `Preloaded`, …) |
102
+ | Import | Re-exports | Use |
103
+ | ------------------------------ | ----------------------- | ---------------------------------------------------------- |
104
+ | `lunorash` / `lunorash/server` | `@lunora/server` | `defineSchema`, `defineTable`, `initLunora`, `cronJobs`, … |
105
+ | `lunorash/values` | `@lunora/values` | the `v.*` validator suite |
106
+ | `lunorash/errors` | `@lunora/errors` | `LunoraError`, the error catalog, `toErrorBody` |
107
+ | `lunorash/runtime` | `@lunora/runtime` | `createWorker` and the query coordinator |
108
+ | `lunorash/do` | `@lunora/do` | `ShardDO` / `SessionDO` |
109
+ | `lunorash/platform` | `@lunora/platform` | Host contracts (`ShardHost`, `SocketHost`, …) |
110
+ | `lunorash/observability` | `@lunora/observability` | Telemetry: logs, metrics, traces, issues |
111
+ | `lunorash/ratelimit` | `@lunora/ratelimit` | `rateLimit()` middleware, `RateLimiter`, `createDbStore` |
112
+ | `lunorash/flags` | `@lunora/flags` | feature flags (`defineFlags`, evaluation) |
113
+ | `lunorash/client` | `@lunora/client` | the browser SDK (`LunoraClient`, `Preloaded`, …) |
114
+
115
+ Granular subpaths are forwarded too:
116
+
117
+ - `@lunora/server/*` — `lunorash/server/types`, `lunorash/server/data-model`, `lunorash/server/drizzle`, `lunorash/server/rls/testing`, `lunorash/server/otel`
118
+ - `@lunora/client/*` — `lunorash/client/query`, `lunorash/client/auth`, `lunorash/client/pagination`, `lunorash/client/ssr`, `lunorash/client/upload`, `lunorash/client/service`
119
+ - `@lunora/flags/*` — `lunorash/flags/env`, `lunorash/flags/flagship`, `lunorash/flags/memory` (the three providers) and `lunorash/flags/web`
95
120
 
96
- Granular subpaths are forwarded too: `lunorash/server/types`, `lunorash/server/data-model`, `lunorash/server/drizzle`, and `lunorash/server/rls/testing` mirror `@lunora/server/*`; `lunorash/client/query`, `lunorash/client/auth`, `lunorash/client/pagination`, and `lunorash/client/ssr` mirror `@lunora/client/*`.
121
+ That is the complete map — 26 subpaths in all. `packages/lunora/package.json`'s `exports` is the source of truth, and `__tests__/exports-map.test.ts` holds it, the built `dist/`, and the sources together.
97
122
 
98
123
  Codegen targets these subpaths automatically: a project with `lunorash` installed gets `_generated/*` files that import from `lunorash/server`, `lunorash/server/data-model`, `lunorash/do`, `lunorash/client`, etc.
99
124
 
@@ -133,10 +158,10 @@ The Lunora umbrella package is open-sourced software licensed under the [FSL-1.1
133
158
 
134
159
  [license-badge]: https://img.shields.io/badge/license-FSL--1.1--Apache--2.0-blue.svg?style=for-the-badge
135
160
  [license]: https://github.com/anolilab/lunora/blob/alpha/LICENSE.md
136
- [npm-version-badge]: https://img.shields.io/npm/v/lunora?style=for-the-badge
137
- [npm-version]: https://www.npmjs.com/package/lunora
138
- [npm-downloads-badge]: https://img.shields.io/npm/dm/lunora?style=for-the-badge
139
- [npm-downloads]: https://www.npmjs.com/package/lunora
161
+ [npm-version-badge]: https://img.shields.io/npm/v/lunorash?style=for-the-badge
162
+ [npm-version]: https://www.npmjs.com/package/lunorash
163
+ [npm-downloads-badge]: https://img.shields.io/npm/dm/lunorash?style=for-the-badge
164
+ [npm-downloads]: https://www.npmjs.com/package/lunorash
140
165
  [prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
141
166
  [prs-welcome]: https://github.com/anolilab/lunora/blob/alpha/.github/CONTRIBUTING.md
142
167
  [typescript-badge]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
package/dist/bin.mjs CHANGED
@@ -1,11 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { runCli } from '@lunora/cli';
3
-
4
- try {
5
- const code = await runCli();
6
- process.exit(code);
7
- } catch (error) {
8
- process.stderr.write(`${error instanceof Error ? error.message : String(error)}
9
- `);
10
- process.exit(1);
11
- }
2
+ import{runCli as e}from"@lunora/cli";try{const r=await e();process.exit(r)}catch(r){process.stderr.write(`${r instanceof Error?r.message:String(r)}
3
+ `),process.exit(1)}
@@ -1 +1 @@
1
- export * from '@lunora/client/auth';
1
+ export*from"@lunora/client/auth";
@@ -1 +1 @@
1
- export * from '@lunora/client/pagination';
1
+ export*from"@lunora/client/pagination";
@@ -1 +1 @@
1
- export * from '@lunora/client/query';
1
+ export*from"@lunora/client/query";
@@ -0,0 +1 @@
1
+ export * from '@lunora/client/service';
@@ -0,0 +1 @@
1
+ export * from '@lunora/client/service';
@@ -0,0 +1 @@
1
+ export*from"@lunora/client/service";
@@ -1 +1 @@
1
- export * from '@lunora/client/ssr';
1
+ export*from"@lunora/client/ssr";
@@ -0,0 +1 @@
1
+ export * from '@lunora/client/upload';
@@ -0,0 +1 @@
1
+ export * from '@lunora/client/upload';
@@ -0,0 +1 @@
1
+ export*from"@lunora/client/upload";
package/dist/client.d.mts CHANGED
@@ -1 +1,25 @@
1
1
  export * from '@lunora/client';
2
+ import '@lunora/client/auth';
3
+ import '@lunora/client/pagination';
4
+ import '@lunora/client/query';
5
+ import '@lunora/client/service';
6
+ import '@lunora/client/ssr';
7
+ import '@lunora/client/upload';
8
+ import '@lunora/do';
9
+ import '@lunora/errors';
10
+ import '@lunora/flags';
11
+ import '@lunora/flags/providers/env';
12
+ import '@lunora/flags/providers/flagship';
13
+ import '@lunora/flags/providers/memory';
14
+ import '@lunora/flags/web';
15
+ import '@lunora/server';
16
+ import '@lunora/observability';
17
+ import '@lunora/platform';
18
+ import '@lunora/ratelimit';
19
+ import '@lunora/runtime';
20
+ import '@lunora/server/data-model';
21
+ import '@lunora/server/drizzle';
22
+ import '@lunora/server/otel';
23
+ import '@lunora/server/rls/testing';
24
+ import '@lunora/server/types';
25
+ import '@lunora/values';
package/dist/client.d.ts CHANGED
@@ -1 +1,25 @@
1
1
  export * from '@lunora/client';
2
+ import '@lunora/client/auth';
3
+ import '@lunora/client/pagination';
4
+ import '@lunora/client/query';
5
+ import '@lunora/client/service';
6
+ import '@lunora/client/ssr';
7
+ import '@lunora/client/upload';
8
+ import '@lunora/do';
9
+ import '@lunora/errors';
10
+ import '@lunora/flags';
11
+ import '@lunora/flags/providers/env';
12
+ import '@lunora/flags/providers/flagship';
13
+ import '@lunora/flags/providers/memory';
14
+ import '@lunora/flags/web';
15
+ import '@lunora/server';
16
+ import '@lunora/observability';
17
+ import '@lunora/platform';
18
+ import '@lunora/ratelimit';
19
+ import '@lunora/runtime';
20
+ import '@lunora/server/data-model';
21
+ import '@lunora/server/drizzle';
22
+ import '@lunora/server/otel';
23
+ import '@lunora/server/rls/testing';
24
+ import '@lunora/server/types';
25
+ import '@lunora/values';
package/dist/client.mjs CHANGED
@@ -1 +1 @@
1
- export * from '@lunora/client';
1
+ export*from"@lunora/client";
package/dist/do.mjs CHANGED
@@ -1 +1 @@
1
- export * from '@lunora/do';
1
+ export*from"@lunora/do";
@@ -0,0 +1 @@
1
+ export * from '@lunora/errors';
@@ -0,0 +1 @@
1
+ export * from '@lunora/errors';
@@ -0,0 +1 @@
1
+ export*from"@lunora/errors";
@@ -0,0 +1 @@
1
+ export * from '@lunora/flags/providers/env';
@@ -0,0 +1 @@
1
+ export * from '@lunora/flags/providers/env';
@@ -0,0 +1 @@
1
+ export*from"@lunora/flags/providers/env";
@@ -0,0 +1 @@
1
+ export * from '@lunora/flags/providers/flagship';
@@ -0,0 +1 @@
1
+ export * from '@lunora/flags/providers/flagship';
@@ -0,0 +1 @@
1
+ export*from"@lunora/flags/providers/flagship";
@@ -0,0 +1 @@
1
+ export * from '@lunora/flags/providers/memory';
@@ -0,0 +1 @@
1
+ export * from '@lunora/flags/providers/memory';
@@ -0,0 +1 @@
1
+ export*from"@lunora/flags/providers/memory";
@@ -0,0 +1 @@
1
+ export * from '@lunora/flags/web';
@@ -0,0 +1 @@
1
+ export * from '@lunora/flags/web';
@@ -0,0 +1 @@
1
+ export*from"@lunora/flags/web";
@@ -0,0 +1 @@
1
+ export * from '@lunora/flags';
@@ -0,0 +1 @@
1
+ export * from '@lunora/flags';
package/dist/flags.mjs ADDED
@@ -0,0 +1 @@
1
+ export*from"@lunora/flags";
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export * from '@lunora/server';
1
+ export*from"@lunora/server";
@@ -0,0 +1 @@
1
+ export * from '@lunora/observability';
@@ -0,0 +1 @@
1
+ export * from '@lunora/observability';
@@ -0,0 +1 @@
1
+ export*from"@lunora/observability";
@@ -0,0 +1 @@
1
+ export * from '@lunora/platform';
@@ -0,0 +1 @@
1
+ export * from '@lunora/platform';
@@ -0,0 +1 @@
1
+ export*from"@lunora/platform";
@@ -0,0 +1 @@
1
+ export * from '@lunora/ratelimit';
@@ -0,0 +1 @@
1
+ export * from '@lunora/ratelimit';
@@ -0,0 +1 @@
1
+ export*from"@lunora/ratelimit";
package/dist/runtime.mjs CHANGED
@@ -1 +1 @@
1
- export * from '@lunora/runtime';
1
+ export*from"@lunora/runtime";
@@ -1 +1 @@
1
- export * from '@lunora/server/data-model';
1
+ export*from"@lunora/server/data-model";
@@ -1 +1 @@
1
- export * from '@lunora/server/drizzle';
1
+ export*from"@lunora/server/drizzle";
@@ -0,0 +1 @@
1
+ export * from '@lunora/server/otel';
@@ -0,0 +1 @@
1
+ export * from '@lunora/server/otel';
@@ -0,0 +1 @@
1
+ export*from"@lunora/server/otel";
@@ -1 +1 @@
1
- export * from '@lunora/server/rls/testing';
1
+ export*from"@lunora/server/rls/testing";
@@ -1 +1 @@
1
- export * from '@lunora/server/types';
1
+ export*from"@lunora/server/types";
package/dist/server.mjs CHANGED
@@ -1 +1 @@
1
- export * from '@lunora/server';
1
+ export*from"@lunora/server";
package/dist/values.mjs CHANGED
@@ -1 +1 @@
1
- export * from '@lunora/values';
1
+ export*from"@lunora/values";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lunorash",
3
- "version": "1.0.0-alpha.33",
3
+ "version": "1.0.0-alpha.331",
4
4
  "description": "The Lunora umbrella package: one install for the server authoring API, worker runtime, Durable Objects, and the lunora CLI",
5
5
  "keywords": [
6
6
  "backend",
@@ -62,10 +62,18 @@
62
62
  "types": "./dist/server/rls/testing.d.ts",
63
63
  "import": "./dist/server/rls/testing.mjs"
64
64
  },
65
+ "./server/otel": {
66
+ "types": "./dist/server/otel.d.ts",
67
+ "import": "./dist/server/otel.mjs"
68
+ },
65
69
  "./values": {
66
70
  "types": "./dist/values.d.ts",
67
71
  "import": "./dist/values.mjs"
68
72
  },
73
+ "./errors": {
74
+ "types": "./dist/errors.d.ts",
75
+ "import": "./dist/errors.mjs"
76
+ },
69
77
  "./runtime": {
70
78
  "types": "./dist/runtime.d.ts",
71
79
  "import": "./dist/runtime.mjs"
@@ -74,6 +82,14 @@
74
82
  "types": "./dist/do.d.ts",
75
83
  "import": "./dist/do.mjs"
76
84
  },
85
+ "./platform": {
86
+ "types": "./dist/platform.d.ts",
87
+ "import": "./dist/platform.mjs"
88
+ },
89
+ "./observability": {
90
+ "types": "./dist/observability.d.ts",
91
+ "import": "./dist/observability.mjs"
92
+ },
77
93
  "./client": {
78
94
  "types": "./dist/client.d.ts",
79
95
  "import": "./dist/client.mjs"
@@ -94,18 +110,55 @@
94
110
  "types": "./dist/client/ssr.d.ts",
95
111
  "import": "./dist/client/ssr.mjs"
96
112
  },
113
+ "./client/upload": {
114
+ "types": "./dist/client/upload.d.ts",
115
+ "import": "./dist/client/upload.mjs"
116
+ },
117
+ "./client/service": {
118
+ "types": "./dist/client/service.d.ts",
119
+ "import": "./dist/client/service.mjs"
120
+ },
121
+ "./flags": {
122
+ "types": "./dist/flags.d.ts",
123
+ "import": "./dist/flags.mjs"
124
+ },
125
+ "./flags/env": {
126
+ "types": "./dist/flags/env.d.ts",
127
+ "import": "./dist/flags/env.mjs"
128
+ },
129
+ "./flags/flagship": {
130
+ "types": "./dist/flags/flagship.d.ts",
131
+ "import": "./dist/flags/flagship.mjs"
132
+ },
133
+ "./flags/memory": {
134
+ "types": "./dist/flags/memory.d.ts",
135
+ "import": "./dist/flags/memory.mjs"
136
+ },
137
+ "./flags/web": {
138
+ "types": "./dist/flags/web.d.ts",
139
+ "import": "./dist/flags/web.mjs"
140
+ },
141
+ "./ratelimit": {
142
+ "types": "./dist/ratelimit.d.ts",
143
+ "import": "./dist/ratelimit.mjs"
144
+ },
97
145
  "./package.json": "./package.json"
98
146
  },
99
147
  "publishConfig": {
100
148
  "access": "public"
101
149
  },
102
150
  "dependencies": {
103
- "@lunora/cli": "1.0.0-alpha.33",
104
- "@lunora/client": "1.0.0-alpha.3",
105
- "@lunora/do": "1.0.0-alpha.7",
106
- "@lunora/runtime": "1.0.0-alpha.6",
107
- "@lunora/server": "1.0.0-alpha.6",
108
- "@lunora/values": "1.0.0-alpha.3"
151
+ "@lunora/cli": "1.0.0-alpha.329",
152
+ "@lunora/client": "1.0.0-alpha.164",
153
+ "@lunora/do": "1.0.0-alpha.184",
154
+ "@lunora/errors": "1.0.0-alpha.48",
155
+ "@lunora/flags": "1.0.0-alpha.62",
156
+ "@lunora/observability": "1.0.0-alpha.111",
157
+ "@lunora/platform": "1.0.0-alpha.46",
158
+ "@lunora/ratelimit": "1.0.0-alpha.96",
159
+ "@lunora/runtime": "1.0.0-alpha.166",
160
+ "@lunora/server": "1.0.0-alpha.163",
161
+ "@lunora/values": "1.0.0-alpha.58"
109
162
  },
110
163
  "engines": {
111
164
  "node": "^22.15.0 || >=24.11.0"