lunorash 0.0.1 → 1.0.0-alpha.2

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 (47) hide show
  1. package/LICENSE.md +105 -0
  2. package/README.md +142 -2
  3. package/__assets__/package-og.svg +14 -0
  4. package/dist/bin.mjs +11 -0
  5. package/dist/client/auth.d.mts +1 -0
  6. package/dist/client/auth.d.ts +1 -0
  7. package/dist/client/auth.mjs +1 -0
  8. package/dist/client/pagination.d.mts +1 -0
  9. package/dist/client/pagination.d.ts +1 -0
  10. package/dist/client/pagination.mjs +1 -0
  11. package/dist/client/query.d.mts +1 -0
  12. package/dist/client/query.d.ts +1 -0
  13. package/dist/client/query.mjs +1 -0
  14. package/dist/client/ssr.d.mts +1 -0
  15. package/dist/client/ssr.d.ts +1 -0
  16. package/dist/client/ssr.mjs +1 -0
  17. package/dist/client.d.mts +1 -0
  18. package/dist/client.d.ts +1 -0
  19. package/dist/client.mjs +1 -0
  20. package/dist/do.d.mts +1 -0
  21. package/dist/do.d.ts +1 -0
  22. package/dist/do.mjs +1 -0
  23. package/dist/index.d.mts +1 -0
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.mjs +1 -0
  26. package/dist/runtime.d.mts +1 -0
  27. package/dist/runtime.d.ts +1 -0
  28. package/dist/runtime.mjs +1 -0
  29. package/dist/server/data-model.d.mts +1 -0
  30. package/dist/server/data-model.d.ts +1 -0
  31. package/dist/server/data-model.mjs +1 -0
  32. package/dist/server/drizzle.d.mts +1 -0
  33. package/dist/server/drizzle.d.ts +1 -0
  34. package/dist/server/drizzle.mjs +1 -0
  35. package/dist/server/rls/testing.d.mts +1 -0
  36. package/dist/server/rls/testing.d.ts +1 -0
  37. package/dist/server/rls/testing.mjs +1 -0
  38. package/dist/server/types.d.mts +1 -0
  39. package/dist/server/types.d.ts +1 -0
  40. package/dist/server/types.mjs +1 -0
  41. package/dist/server.d.mts +1 -0
  42. package/dist/server.d.ts +1 -0
  43. package/dist/server.mjs +1 -0
  44. package/dist/values.d.mts +1 -0
  45. package/dist/values.d.ts +1 -0
  46. package/dist/values.mjs +1 -0
  47. package/package.json +108 -10
package/LICENSE.md ADDED
@@ -0,0 +1,105 @@
1
+ # Functional Source License, Version 1.1, Apache 2.0 Future License
2
+
3
+ ## Abbreviation
4
+
5
+ FSL-1.1-Apache-2.0
6
+
7
+ ## Notice
8
+
9
+ Copyright 2026 anolilab and contributors
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or service
34
+ that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software that
39
+ exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee using
52
+ the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to the
59
+ infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN
79
+ IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following will
93
+ apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,143 @@
1
- # lunorash
1
+ <!-- START_PACKAGE_OG_IMAGE_PLACEHOLDER -->
2
2
 
3
- 🚧 **Placeholder.** This package name is reserved for an upcoming project. There is no functionality yet — please check back later.
3
+ <a href="https://www.anolilab.com/open-source" align="center">
4
+
5
+ <img src="__assets__/package-og.svg" alt="lunorash" />
6
+
7
+ </a>
8
+
9
+ <h3 align="center">The Lunora umbrella package: one install for the server authoring API, worker runtime, Durable Objects, and the lunora CLI</h3>
10
+
11
+ <!-- END_PACKAGE_OG_IMAGE_PLACEHOLDER -->
12
+
13
+ <br />
14
+
15
+ <div align="center">
16
+
17
+ [![typescript-image][typescript-badge]][typescript-url]
18
+ [![FSL-1.1-Apache-2.0 licence][license-badge]][license]
19
+ [![npm version][npm-version-badge]][npm-version]
20
+ [![npm downloads][npm-downloads-badge]][npm-downloads]
21
+ [![PRs Welcome][prs-welcome-badge]][prs-welcome]
22
+
23
+ </div>
24
+
25
+ ---
26
+
27
+ <div align="center">
28
+ <p>
29
+ <sup>
30
+ Daniel Bannert's open source work is supported by the community on <a href="https://github.com/sponsors/prisis">GitHub Sponsors</a>
31
+ </sup>
32
+ </p>
33
+ </div>
34
+
35
+ ---
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`.
38
+
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
+
41
+ ## Install
42
+
43
+ ```sh
44
+ npm install lunorash
45
+ ```
46
+
47
+ ```sh
48
+ yarn add lunorash
49
+ ```
50
+
51
+ ```sh
52
+ pnpm add lunorash
53
+ ```
54
+
55
+ Pick a framework adapter (`@lunora/react`, `@lunora/vue`, `@lunora/solid`, `@lunora/svelte`, `@lunora/astro`), the Vite plugin (`@lunora/vite`), and any add-ons (`@lunora/auth`, `@lunora/mail`, `@lunora/storage`, …) alongside it — those stay as separate, opt-in installs.
56
+
57
+ ## Usage
58
+
59
+ ```ts
60
+ // lunora/schema.ts — the authoring API
61
+ import { defineSchema, defineTable } from "lunorash/server";
62
+ import { v } from "lunorash/values";
63
+
64
+ export default defineSchema({
65
+ messages: defineTable({ body: v.string(), author: v.id("users") }),
66
+ });
67
+ ```
68
+
69
+ ```ts
70
+ // src/worker.ts — the worker entry
71
+ import { createWorker } from "lunorash/runtime";
72
+
73
+ export { ShardDO } from "lunorash/do";
74
+
75
+ export default createWorker({ shardDO: (env) => env.SHARD });
76
+ ```
77
+
78
+ The `lunora` binary delegates to `@lunora/cli`, so the full CLI is available without a separate dependency:
79
+
80
+ ```sh
81
+ pnpm exec lunora dev
82
+ pnpm exec lunora codegen
83
+ pnpm exec lunora deploy
84
+ ```
85
+
86
+ ### Subpaths
87
+
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`, …) |
95
+
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/*`.
97
+
98
+ 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
+
100
+ > This README covers the basics. For the full API, options, and guides, see the **[documentation](https://lunora.sh/docs)**.
101
+
102
+ ## Related
103
+
104
+ - [`@lunora/server`](https://www.npmjs.com/package/@lunora/server) — the authoring API re-exported at `lunorash/server`.
105
+ - [`@lunora/cli`](https://www.npmjs.com/package/@lunora/cli) — the CLI the `lunora` binary delegates to.
106
+ - [`@lunora/vite`](https://www.npmjs.com/package/@lunora/vite) — the Vite plugin (installed separately).
107
+
108
+ ## Supported Node.js Versions
109
+
110
+ Libraries in this ecosystem make the best effort to track [Node.js' release schedule](https://github.com/nodejs/release#release-schedule).
111
+ Here's [a post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
112
+
113
+ ## Contributing
114
+
115
+ If you would like to help take a look at the [list of issues](https://github.com/anolilab/lunora/issues) and check our [Contributing](https://github.com/anolilab/lunora/blob/alpha/.github/CONTRIBUTING.md) guidelines.
116
+
117
+ > **Note:** please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
118
+
119
+ ## Credits
120
+
121
+ - [Daniel Bannert](https://github.com/prisis)
122
+ - [All Contributors](https://github.com/anolilab/lunora/graphs/contributors)
123
+
124
+ ## Made with ❤️ at Anolilab
125
+
126
+ This is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. [Anolilab](https://www.anolilab.com/open-source) is a Development and AI Studio. Contact us at [hello@anolilab.com](mailto:hello@anolilab.com) if you need any help with these technologies or just want to say hi!
127
+
128
+ ## License
129
+
130
+ The Lunora umbrella package is open-sourced software licensed under the [FSL-1.1-Apache-2.0][license].
131
+
132
+ <!-- badges -->
133
+
134
+ [license-badge]: https://img.shields.io/badge/license-FSL--1.1--Apache--2.0-blue.svg?style=for-the-badge
135
+ [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
140
+ [prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
141
+ [prs-welcome]: https://github.com/anolilab/lunora/blob/alpha/.github/CONTRIBUTING.md
142
+ [typescript-badge]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
143
+ [typescript-url]: https://www.typescriptlang.org/