@lunora/vite 1.0.0-alpha.3 → 1.0.0-alpha.300
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/LICENSE.md +6 -0
- package/README.md +19 -2
- package/__assets__/package-og.svg +1 -1
- package/dist/index.d.mts +454 -267
- package/dist/index.d.ts +454 -267
- package/dist/index.mjs +3 -153
- package/dist/packem_shared/CLASS_A_WIRING-BAnDZbel.mjs +24 -0
- package/dist/packem_shared/LUNORA_API_UPDATED_EVENT-CO2Rv2re.mjs +1 -0
- package/dist/packem_shared/WORKER_STARTUP_HINT-COlRTY32.mjs +5 -0
- package/dist/packem_shared/buildStudioUrl-DMMWpguZ.mjs +1 -0
- package/dist/packem_shared/checkLunoraProxy-BNPgNWtV.mjs +1 -0
- package/dist/packem_shared/codegenPlugin-eWUCZzQt.mjs +3 -0
- package/dist/packem_shared/containerLogsPlugin-67PZ8zmb.mjs +1 -0
- package/dist/packem_shared/devStatePlugin-CF4GDvBn.mjs +1 -0
- package/dist/packem_shared/devVariablesPlugin-DbD6cSF0.mjs +1 -0
- package/dist/packem_shared/logStreamPlugin-EMXiy6pI.mjs +3 -0
- package/dist/packem_shared/lunoraSolutionFinder--J0x2mAM.mjs +1 -0
- package/dist/packem_shared/planViteRemoteBindings-ByOliZuE.mjs +1 -0
- package/dist/packem_shared/server-close-DWiO4Vxb.mjs +1 -0
- package/dist/packem_shared/wranglerValidatorPlugin-BlGHjTXZ.mjs +1 -0
- package/package.json +9 -10
- package/dist/packem_shared/CLASS_A_WIRING-Cja0SF6x.mjs +0 -96
- package/dist/packem_shared/DEV_WORKER_ENV_VALUE-Coo6bgVz.mjs +0 -36
- package/dist/packem_shared/STUDIO_PATH-5ppCdBHa.mjs +0 -210
- package/dist/packem_shared/WORKER_STARTUP_HINT-DhsXUW8k.mjs +0 -81
- package/dist/packem_shared/codegenPlugin-BAyt6iWS.mjs +0 -210
- package/dist/packem_shared/devVariablesPlugin-BRWbWHhq.mjs +0 -20
- package/dist/packem_shared/logStreamPlugin-CqvZ17kd.mjs +0 -61
- package/dist/packem_shared/planViteRemoteBindings-QN5ncUS1.mjs +0 -50
- package/dist/packem_shared/reconcileWranglerCrons-PxGwfCp_.mjs +0 -29
- package/dist/packem_shared/wranglerValidatorPlugin-Cf0nLP7-.mjs +0 -63
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
|
@@ -68,9 +68,11 @@ With no options, `lunora()` runs codegen on save, validates `wrangler.jsonc`, in
|
|
|
68
68
|
|
|
69
69
|
```ts
|
|
70
70
|
lunora({
|
|
71
|
-
schemaDir: "lunora", // dir with schema.ts + function files
|
|
72
|
-
generatedDir: "lunora/_generated", // where api.ts/server.ts/dataModel.ts land
|
|
71
|
+
schemaDir: "lunora", // dir with schema.ts + function files (generated output lands in <schemaDir>/_generated)
|
|
73
72
|
apiSpec: "openapi", // "openapi" | "openrpc" | "both" | "none"
|
|
73
|
+
target: "cloudflare", // deploy target the emitted ctx.* surface is tailored to
|
|
74
|
+
allowUnauthenticatedShardAccess: false, // composed class-A worker: allow a client-named shard / fan-out with no authorizeShard
|
|
75
|
+
shard: { cdc: true, reactiveCache: true }, // class-A only: shard DO config for the composed entry (class B/C set this in their own worker entry)
|
|
74
76
|
studio: false, // disable the /__lunora studio
|
|
75
77
|
overlay: false, // disable the runtime error overlay
|
|
76
78
|
validateWrangler: false, // skip the wrangler.jsonc binding check
|
|
@@ -80,6 +82,21 @@ lunora({
|
|
|
80
82
|
|
|
81
83
|
`lunora()` returns a flat `Plugin[]`; Vite flattens nested plugin arrays, so `plugins: [lunora()]` works without spreading.
|
|
82
84
|
|
|
85
|
+
### Error overlay
|
|
86
|
+
|
|
87
|
+
The overlay surfaces dev-time failures in the browser. Lunora ships **solution finders** that turn the common ones — missing/invalid `defineSchema`, reserved or duplicate table names, a bad `.jurisdiction(...)`, a non-literal `unique`, a binding that isn't re-exported by your worker entry, and runtime unique-constraint / optimistic-concurrency conflicts — into an actionable fix hint right in the overlay.
|
|
88
|
+
|
|
89
|
+
`overlay` also accepts an options object forwarded to [`@visulima/vite-overlay`](https://www.npmjs.com/package/@visulima/vite-overlay), so you can add your own finders alongside Lunora's:
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
lunora({
|
|
93
|
+
overlay: {
|
|
94
|
+
// your finders run alongside Lunora's; either side can win per error via `priority`
|
|
95
|
+
solutionFinders: [myCustomFinder],
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
|
|
83
100
|
> This README covers the basics. For the full API, options, and guides, see the **[documentation](https://lunora.sh/docs/packages/vite)**.
|
|
84
101
|
|
|
85
102
|
## Related
|