resuxjs 0.2.26 → 0.2.28
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 +99 -3
- package/dist/cli.js +65 -13
- package/dist/cli.js.map +1 -1
- package/dist/compiler/index.d.ts +5 -2
- package/dist/compiler/index.js +125 -54
- package/dist/compiler/index.js.map +1 -1
- package/dist/runtime/index.d.ts +30 -2
- package/dist/runtime/index.js +267 -35
- package/dist/runtime/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/default/README.md +1 -1
- package/templates/default/middleware/auth.ts +5 -0
- package/templates/default/middleware/log.global.ts +3 -0
- package/templates/default/nitro.config.ts +10 -0
- package/templates/default/pages/index.vue +6 -0
- package/templates/default/plugins/01.app.ts +3 -0
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
definePageMeta({
|
|
3
|
+
middleware: "auth"
|
|
4
|
+
})
|
|
5
|
+
|
|
2
6
|
const count = useState("count", () => 0)
|
|
3
7
|
const config = useRuntimeConfig()
|
|
4
8
|
const appName = String(config.public.appName ?? "Resux App")
|
|
9
|
+
const pluginLabel = String(useResuxApp().provides.starterPlugin ?? "Starter plugin")
|
|
5
10
|
type StarterStats = {
|
|
6
11
|
response: string
|
|
7
12
|
routes: string
|
|
@@ -41,6 +46,7 @@ function increment() {
|
|
|
41
46
|
<p class="eyebrow">Resux starter</p>
|
|
42
47
|
<h1>{{ appName }}</h1>
|
|
43
48
|
<p class="lede">Server-rendered Vue-like files with resumable client handlers.</p>
|
|
49
|
+
<p class="eyebrow">{{ pluginLabel }}</p>
|
|
44
50
|
<div class="actions">
|
|
45
51
|
<button @click="increment">Count: {{ count }}</button>
|
|
46
52
|
<ResuxLink to="/about">About this app</ResuxLink>
|