@lunora/nuxt 1.0.0-alpha.5 → 1.0.0-alpha.7
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/README.md +24 -0
- package/dist/module.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -115,6 +115,30 @@ Single-worker composition rides on two Nitro behaviours that vary across version
|
|
|
115
115
|
reactive-loader handoff. Safe to import from a Nitro server route (no WebSocket,
|
|
116
116
|
no browser globals).
|
|
117
117
|
|
|
118
|
+
## Feature flags
|
|
119
|
+
|
|
120
|
+
`@lunora/nuxt` ships no flag composable — Nuxt _is_ Vue, so read `ctx.flags`
|
|
121
|
+
server-side (a Nitro route, a function, or a reactive loader) and pass the
|
|
122
|
+
resolved value down, or call `useFlag` / `useFlags` from
|
|
123
|
+
[`@lunora/vue`](https://www.npmjs.com/package/@lunora/vue) directly in a
|
|
124
|
+
component for live updates over the WebSocket. Requires
|
|
125
|
+
[`@lunora/flags`](https://www.npmjs.com/package/@lunora/flags) wired in
|
|
126
|
+
`lunora/flags.ts`.
|
|
127
|
+
|
|
128
|
+
```vue
|
|
129
|
+
<script setup lang="ts">
|
|
130
|
+
import { useFlag } from "@lunora/vue";
|
|
131
|
+
|
|
132
|
+
// Live over the Lunora WS — holds `false` until the server resolves it.
|
|
133
|
+
const newHero = useFlag("homepage-hero", false);
|
|
134
|
+
</script>
|
|
135
|
+
|
|
136
|
+
<template>
|
|
137
|
+
<NewHero v-if="newHero" />
|
|
138
|
+
<ClassicHero v-else />
|
|
139
|
+
</template>
|
|
140
|
+
```
|
|
141
|
+
|
|
118
142
|
## Supported Node.js Versions
|
|
119
143
|
|
|
120
144
|
Libraries in this ecosystem make the best effort to track [Node.js' release schedule](https://github.com/nodejs/release#release-schedule).
|
package/dist/module.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/nuxt",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.7",
|
|
4
4
|
"description": "Nuxt module for Lunora — single-worker composition (mounts /_lunora/* into Nitro) plus reactive-loader server helpers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@lunora/client": "1.0.0-alpha.
|
|
54
|
+
"@lunora/client": "1.0.0-alpha.5",
|
|
55
55
|
"@nuxt/kit": "^4.4.8"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|