@icebreakers/monorepo 3.0.1 → 3.0.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.
- package/assets/package.json +5 -5
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{upgrade-CHym1gi7.mjs → upgrade-BddyAYEx.mjs} +1 -1
- package/dist/{upgrade-C7eRZs41.cjs → upgrade-qy3Wgjgw.cjs} +1 -1
- package/package.json +1 -1
- package/templates/apps/client/package.json +16 -12
- package/templates/apps/client/src/App.vue +5 -3
- package/templates/apps/client/src/main.ts +2 -0
- package/templates/apps/client/src/pages/index.vue +329 -39
- package/templates/apps/client/src/query-keys.ts +4 -0
- package/templates/apps/client/src/stores/i18n.ts +1 -0
- package/templates/apps/client/wrangler.jsonc +4 -1
- package/templates/apps/server/package.json +3 -3
- package/templates/packages/vue-lib-template/package.json +3 -3
package/assets/package.json
CHANGED
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"@changesets/cli": "^2.29.7",
|
|
45
45
|
"@commitlint/cli": "^20.1.0",
|
|
46
46
|
"@icebreakers/commitlint-config": "^1.2.2",
|
|
47
|
-
"@icebreakers/eslint-config": "^1.
|
|
47
|
+
"@icebreakers/eslint-config": "^1.6.0",
|
|
48
48
|
"@icebreakers/monorepo": "workspace:*",
|
|
49
49
|
"@icebreakers/stylelint-config": "^1.2.3",
|
|
50
50
|
"@types/fs-extra": "^11.0.4",
|
|
51
51
|
"@types/node": "^24.10.1",
|
|
52
52
|
"@types/semver": "^7.7.1",
|
|
53
|
-
"@vitest/coverage-v8": "~4.0.
|
|
53
|
+
"@vitest/coverage-v8": "~4.0.14",
|
|
54
54
|
"ci-info": "^4.3.1",
|
|
55
55
|
"cross-env": "^10.1.0",
|
|
56
56
|
"defu": "^6.1.4",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"pathe": "^2.0.3",
|
|
65
65
|
"pkg-types": "^2.3.0",
|
|
66
66
|
"rimraf": "^6.1.2",
|
|
67
|
-
"stylelint": "^16.
|
|
68
|
-
"tsdown": "^0.16.
|
|
67
|
+
"stylelint": "^16.26.0",
|
|
68
|
+
"tsdown": "^0.16.7",
|
|
69
69
|
"tslib": "^2.8.1",
|
|
70
70
|
"tsup": "^8.5.1",
|
|
71
71
|
"tsx": "^4.20.6",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"type-fest": "^5.2.0",
|
|
74
74
|
"typescript": "^5.9.3",
|
|
75
75
|
"unbuild": "^3.6.1",
|
|
76
|
-
"vitest": "~4.0.
|
|
76
|
+
"vitest": "~4.0.14",
|
|
77
77
|
"yaml": "^2.8.1"
|
|
78
78
|
},
|
|
79
79
|
"publishConfig": {
|
package/dist/cli.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_upgrade = require('./upgrade-
|
|
1
|
+
const require_upgrade = require('./upgrade-qy3Wgjgw.cjs');
|
|
2
2
|
let node_process = require("node:process");
|
|
3
3
|
node_process = require_upgrade.__toESM(node_process);
|
|
4
4
|
let __inquirer_input = require("@inquirer/input");
|
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as cleanProjects, T as version, c as getCreateChoices, i as init, k as resolveCommandConfig, n as syncNpmMirror, o as createNewProject, r as setVscodeBinaryMirror, s as defaultTemplate, t as upgradeMonorepo, w as name, y as logger } from "./upgrade-
|
|
1
|
+
import { E as cleanProjects, T as version, c as getCreateChoices, i as init, k as resolveCommandConfig, n as syncNpmMirror, o as createNewProject, r as setVscodeBinaryMirror, s as defaultTemplate, t as upgradeMonorepo, w as name, y as logger } from "./upgrade-BddyAYEx.mjs";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import input from "@inquirer/input";
|
|
4
4
|
import select from "@inquirer/select";
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as getWorkspaceData, C as templatesDir, D as defineMonorepoConfig, E as cleanProjects, M as GitClient, O as loadMonorepoConfig, S as rootDir, T as version, _ as toWorkspaceGitignorePath, a as createContext, b as assetsDir, c as getCreateChoices, d as escapeStringRegexp, f as isMatch, g as toPublishGitignorePath, h as isGitignoreFile, i as init, j as getWorkspacePackages, k as resolveCommandConfig, l as getTemplateMap, m as isFileChanged, n as syncNpmMirror, o as createNewProject, p as getFileHash, r as setVscodeBinaryMirror, t as upgradeMonorepo, u as templateMap, v as isIgnorableFsError, w as name, x as packageDir, y as logger } from "./upgrade-
|
|
1
|
+
import { A as getWorkspaceData, C as templatesDir, D as defineMonorepoConfig, E as cleanProjects, M as GitClient, O as loadMonorepoConfig, S as rootDir, T as version, _ as toWorkspaceGitignorePath, a as createContext, b as assetsDir, c as getCreateChoices, d as escapeStringRegexp, f as isMatch, g as toPublishGitignorePath, h as isGitignoreFile, i as init, j as getWorkspacePackages, k as resolveCommandConfig, l as getTemplateMap, m as isFileChanged, n as syncNpmMirror, o as createNewProject, p as getFileHash, r as setVscodeBinaryMirror, t as upgradeMonorepo, u as templateMap, v as isIgnorableFsError, w as name, x as packageDir, y as logger } from "./upgrade-BddyAYEx.mjs";
|
|
2
2
|
|
|
3
3
|
export { GitClient, assetsDir, cleanProjects, createContext, createNewProject, defineMonorepoConfig, escapeStringRegexp, getCreateChoices, getFileHash, getTemplateMap, getWorkspaceData, getWorkspacePackages, init, isFileChanged, isGitignoreFile, isIgnorableFsError, isMatch, loadMonorepoConfig, logger, name, packageDir, resolveCommandConfig, rootDir, setVscodeBinaryMirror, syncNpmMirror, templateMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath, upgradeMonorepo, version };
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
6
|
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
7
|
+
"dev": "vite --host",
|
|
8
8
|
"build": "vue-tsc -b && vite build",
|
|
9
9
|
"lint": "eslint .",
|
|
10
10
|
"lint:fix": "eslint . --fix",
|
|
@@ -15,33 +15,37 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@faker-js/faker": "^10.1.0",
|
|
18
|
-
"@tanstack/vue-query": "^5.
|
|
18
|
+
"@tanstack/vue-query": "^5.92.0",
|
|
19
|
+
"@tanstack/vue-query-devtools": "^6.1.2",
|
|
19
20
|
"@tanstack/vue-table": "^8.21.3",
|
|
20
21
|
"@tanstack/vue-virtual": "^3.13.12",
|
|
21
|
-
"@trpc/client": "^11.7.
|
|
22
|
+
"@trpc/client": "^11.7.2",
|
|
23
|
+
"clsx": "^2.1.1",
|
|
22
24
|
"pinia": "^3.0.4",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
+
"tailwind-merge": "^3.4.0",
|
|
26
|
+
"tailwind-variants": "^3.2.2",
|
|
27
|
+
"vue": "^3.5.25",
|
|
28
|
+
"vue-i18n": "^11.2.2",
|
|
25
29
|
"vue-router": "^4.6.3"
|
|
26
30
|
},
|
|
27
31
|
"devDependencies": {
|
|
28
|
-
"@cloudflare/vite-plugin": "^1.15.
|
|
32
|
+
"@cloudflare/vite-plugin": "^1.15.3",
|
|
29
33
|
"@hono/node-server": "^1.19.6",
|
|
30
34
|
"@hono/trpc-server": "^0.4.0",
|
|
31
35
|
"@tailwindcss/vite": "^4.1.17",
|
|
32
|
-
"@trpc/server": "^11.7.
|
|
36
|
+
"@trpc/server": "^11.7.2",
|
|
33
37
|
"@vitejs/plugin-vue": "^6.0.2",
|
|
34
38
|
"@vitejs/plugin-vue-jsx": "^5.1.2",
|
|
35
39
|
"@vue/tsconfig": "^0.8.1",
|
|
36
|
-
"hono": "^4.10.
|
|
40
|
+
"hono": "^4.10.7",
|
|
37
41
|
"tailwindcss": "^4.1.17",
|
|
38
42
|
"typescript": "~5.9.3",
|
|
39
|
-
"unplugin-vue-router": "^0.17.
|
|
43
|
+
"unplugin-vue-router": "^0.17.1",
|
|
40
44
|
"vite": "^7.2.4",
|
|
41
45
|
"vite-plugin-vue-devtools": "^8.0.5",
|
|
42
46
|
"vite-tsconfig-paths": "^5.1.4",
|
|
43
|
-
"vue-tsc": "3.1.
|
|
44
|
-
"wrangler": "^4.
|
|
45
|
-
"zod": "^4.1.
|
|
47
|
+
"vue-tsc": "3.1.5",
|
|
48
|
+
"wrangler": "^4.51.0",
|
|
49
|
+
"zod": "^4.1.13"
|
|
46
50
|
}
|
|
47
51
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { VueQueryDevtools } from '@tanstack/vue-query-devtools'
|
|
2
3
|
import { RouterView } from 'vue-router'
|
|
3
4
|
</script>
|
|
4
5
|
|
|
5
6
|
<template>
|
|
6
|
-
<
|
|
7
|
+
<div>
|
|
8
|
+
<RouterView />
|
|
9
|
+
</div>
|
|
10
|
+
<VueQueryDevtools />
|
|
7
11
|
</template>
|
|
8
|
-
|
|
9
|
-
<style scoped></style>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VueQueryPlugin } from '@tanstack/vue-query'
|
|
1
2
|
import { createPinia } from 'pinia'
|
|
2
3
|
import { createApp } from 'vue'
|
|
3
4
|
import App from './App.vue'
|
|
@@ -10,5 +11,6 @@ const app = createApp(App)
|
|
|
10
11
|
app.use(router)
|
|
11
12
|
app.use(pinia)
|
|
12
13
|
app.use(i18n)
|
|
14
|
+
app.use(VueQueryPlugin)
|
|
13
15
|
|
|
14
16
|
app.mount('#app')
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
<script setup lang="
|
|
2
|
-
import {
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useQuery, useQueryClient } from '@tanstack/vue-query'
|
|
3
|
+
import { computed } from 'vue'
|
|
3
4
|
import { useI18n } from 'vue-i18n'
|
|
4
|
-
import {
|
|
5
|
+
import { helloKeys } from '@/query-keys'
|
|
6
|
+
import { client } from '@/trpc'
|
|
7
|
+
|
|
8
|
+
type HelloResponse = Awaited<ReturnType<typeof client.hello.query>>
|
|
5
9
|
|
|
6
10
|
const { t, locale } = useI18n()
|
|
7
11
|
function changeLocale(lang: 'en' | 'zh') {
|
|
@@ -12,55 +16,341 @@ function toggleLocale() {
|
|
|
12
16
|
changeLocale(locale.value === 'en' ? 'zh' : 'en')
|
|
13
17
|
}
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
function formatTime(timestamp?: number) {
|
|
20
|
+
if (!timestamp) {
|
|
21
|
+
return '-'
|
|
22
|
+
}
|
|
23
|
+
return new Intl.DateTimeFormat(undefined, {
|
|
24
|
+
hour: '2-digit',
|
|
25
|
+
minute: '2-digit',
|
|
26
|
+
second: '2-digit',
|
|
27
|
+
}).format(new Date(timestamp))
|
|
20
28
|
}
|
|
21
29
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
const queryClient = useQueryClient()
|
|
31
|
+
const helloName = 'icebreakers' as const
|
|
32
|
+
|
|
33
|
+
const helloQuery = useQuery<HelloResponse>({
|
|
34
|
+
queryKey: helloKeys.detail(helloName),
|
|
35
|
+
queryFn: () => client.hello.query(helloName),
|
|
36
|
+
staleTime: 30_000,
|
|
37
|
+
gcTime: 5 * 60_000,
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
const liveData = computed(() => ({
|
|
41
|
+
message: helloQuery.data.value?.message ?? '-',
|
|
42
|
+
time: helloQuery.data.value?.time ?? null,
|
|
43
|
+
formattedTime: formatTime(helloQuery.data.value?.time),
|
|
44
|
+
}))
|
|
45
|
+
|
|
46
|
+
const cachedHello = computed<HelloResponse | undefined>(() => {
|
|
47
|
+
const cached = queryClient.getQueryData<HelloResponse>(
|
|
48
|
+
helloKeys.detail(helloName),
|
|
49
|
+
)
|
|
50
|
+
return helloQuery.data.value ?? cached
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
const queryMeta = computed(() => ({
|
|
54
|
+
status: helloQuery.status.value,
|
|
55
|
+
fetchStatus: helloQuery.fetchStatus.value,
|
|
56
|
+
isFetching: helloQuery.isFetching.value,
|
|
57
|
+
isStale: helloQuery.isStale.value,
|
|
58
|
+
dataUpdatedAt: helloQuery.dataUpdatedAt.value,
|
|
59
|
+
}))
|
|
60
|
+
|
|
61
|
+
const helloErrorMessage = computed(() => {
|
|
62
|
+
const error = helloQuery.error.value
|
|
63
|
+
if (!error) {
|
|
64
|
+
return ''
|
|
65
|
+
}
|
|
66
|
+
if (error instanceof Error) {
|
|
67
|
+
return error.message
|
|
68
|
+
}
|
|
69
|
+
return String(error)
|
|
26
70
|
})
|
|
27
71
|
</script>
|
|
28
72
|
|
|
29
73
|
<template>
|
|
30
|
-
<div>
|
|
31
|
-
<div
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
74
|
+
<div class="min-h-screen bg-slate-950 text-slate-50">
|
|
75
|
+
<div class="mx-auto flex min-h-screen max-w-5xl flex-col gap-6 px-6 py-8">
|
|
76
|
+
<header
|
|
77
|
+
class="
|
|
78
|
+
rounded-2xl bg-linear-to-br from-slate-800 to-slate-900 p-6 shadow-xl
|
|
79
|
+
ring-1 ring-white/5
|
|
80
|
+
"
|
|
81
|
+
>
|
|
82
|
+
<div class="flex flex-wrap items-center justify-between gap-4">
|
|
83
|
+
<div class="space-y-2">
|
|
84
|
+
<p class="text-xs tracking-[0.2em] text-slate-400 uppercase">
|
|
85
|
+
TanStack Query + i18n
|
|
86
|
+
</p>
|
|
87
|
+
<h1 class="text-3xl leading-tight font-semibold">
|
|
88
|
+
{{ t('hello') }}
|
|
89
|
+
</h1>
|
|
90
|
+
<p class="text-sm text-slate-400">
|
|
91
|
+
Minimal data-fetch demo. Everything stays on screen for quick checks.
|
|
92
|
+
</p>
|
|
93
|
+
</div>
|
|
94
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
95
|
+
<button
|
|
96
|
+
class="
|
|
97
|
+
rounded-full bg-white/15 px-4 py-2 text-sm font-medium
|
|
98
|
+
text-slate-50 shadow-sm transition
|
|
99
|
+
hover:scale-[1.02] hover:bg-white/25
|
|
100
|
+
"
|
|
101
|
+
@click="toggleLocale"
|
|
102
|
+
>
|
|
103
|
+
{{ t('toggleLocale') }}
|
|
104
|
+
</button>
|
|
105
|
+
<button
|
|
106
|
+
class="
|
|
107
|
+
rounded-full bg-emerald-500/90 px-4 py-2 text-sm font-semibold
|
|
108
|
+
text-emerald-950 shadow-sm transition
|
|
109
|
+
hover:scale-[1.02] hover:bg-emerald-400
|
|
110
|
+
disabled:opacity-60
|
|
111
|
+
"
|
|
112
|
+
:disabled="helloQuery.isFetching.value"
|
|
113
|
+
@click="helloQuery.refetch()"
|
|
114
|
+
>
|
|
115
|
+
{{ helloQuery.isFetching ? 'Refreshing…' : 'Refetch now' }}
|
|
116
|
+
</button>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
<div
|
|
120
|
+
class="mt-4 flex flex-wrap items-center gap-3 text-xs text-slate-300"
|
|
121
|
+
>
|
|
122
|
+
<span
|
|
123
|
+
class="
|
|
124
|
+
inline-flex items-center gap-2 rounded-full bg-emerald-500/15 px-3
|
|
125
|
+
py-1 font-semibold text-emerald-200 ring-1 ring-emerald-500/30
|
|
126
|
+
"
|
|
127
|
+
>
|
|
128
|
+
<span class="size-2 rounded-full bg-emerald-400" />
|
|
129
|
+
Live data connected
|
|
130
|
+
</span>
|
|
131
|
+
<span
|
|
132
|
+
class="
|
|
133
|
+
rounded-full bg-white/5 px-3 py-1 font-semibold text-white/80
|
|
134
|
+
ring-1 ring-white/10
|
|
135
|
+
"
|
|
136
|
+
>
|
|
137
|
+
Status: {{ helloQuery.status }}
|
|
138
|
+
</span>
|
|
139
|
+
<span
|
|
140
|
+
v-if="helloQuery.isFetching"
|
|
141
|
+
class="
|
|
142
|
+
rounded-full bg-amber-500/15 px-3 py-1 font-semibold
|
|
143
|
+
text-amber-200 ring-1 ring-amber-500/30
|
|
144
|
+
"
|
|
145
|
+
>
|
|
146
|
+
Fetching…
|
|
147
|
+
</span>
|
|
148
|
+
</div>
|
|
149
|
+
</header>
|
|
150
|
+
|
|
37
151
|
<div
|
|
38
152
|
class="
|
|
39
|
-
|
|
153
|
+
grid gap-4
|
|
154
|
+
md:grid-cols-2
|
|
40
155
|
"
|
|
41
156
|
>
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
157
|
+
<section
|
|
158
|
+
class="rounded-2xl bg-slate-900/70 p-5 shadow-lg ring-1 ring-white/5"
|
|
159
|
+
>
|
|
160
|
+
<div class="flex items-center justify-between gap-3">
|
|
161
|
+
<div>
|
|
162
|
+
<h2 class="text-lg font-semibold">
|
|
163
|
+
Live data
|
|
164
|
+
</h2>
|
|
165
|
+
<p class="text-xs text-slate-400">
|
|
166
|
+
Latest response from the server
|
|
167
|
+
</p>
|
|
168
|
+
</div>
|
|
169
|
+
<span
|
|
170
|
+
class="
|
|
171
|
+
rounded-full bg-white/10 px-3 py-1 text-xs font-semibold
|
|
172
|
+
text-white/90 ring-1 ring-white/10
|
|
173
|
+
"
|
|
174
|
+
>
|
|
175
|
+
{{ helloQuery.fetchStatus }}
|
|
176
|
+
</span>
|
|
177
|
+
</div>
|
|
178
|
+
<dl
|
|
179
|
+
class="
|
|
180
|
+
mt-4 grid gap-3
|
|
181
|
+
sm:grid-cols-2
|
|
182
|
+
"
|
|
183
|
+
>
|
|
184
|
+
<div
|
|
185
|
+
class="
|
|
186
|
+
rounded-lg bg-white/5 px-3 py-2 text-sm text-slate-100 ring-1
|
|
187
|
+
ring-white/10
|
|
188
|
+
"
|
|
189
|
+
>
|
|
190
|
+
<dt class="text-xs tracking-wide text-slate-400 uppercase">
|
|
191
|
+
Message
|
|
192
|
+
</dt>
|
|
193
|
+
<dd class="mt-1 font-semibold">
|
|
194
|
+
{{ liveData.message }}
|
|
195
|
+
</dd>
|
|
196
|
+
</div>
|
|
197
|
+
<div
|
|
198
|
+
class="
|
|
199
|
+
rounded-lg bg-white/5 px-3 py-2 text-sm text-slate-100 ring-1
|
|
200
|
+
ring-white/10
|
|
201
|
+
"
|
|
202
|
+
>
|
|
203
|
+
<dt class="text-xs tracking-wide text-slate-400 uppercase">
|
|
204
|
+
Server time
|
|
205
|
+
</dt>
|
|
206
|
+
<dd class="mt-1 font-semibold">
|
|
207
|
+
{{ liveData.formattedTime }}
|
|
208
|
+
</dd>
|
|
209
|
+
</div>
|
|
210
|
+
</dl>
|
|
211
|
+
<pre
|
|
212
|
+
class="
|
|
213
|
+
mt-4 max-h-48 overflow-auto rounded-lg bg-black/40 p-3 text-left
|
|
214
|
+
text-xs leading-relaxed text-slate-100 ring-1 ring-white/10
|
|
215
|
+
"
|
|
216
|
+
>{{ JSON.stringify(liveData, null, 2) }}</pre>
|
|
217
|
+
<p v-if="helloErrorMessage" class="mt-3 text-sm text-rose-200">
|
|
218
|
+
{{ helloErrorMessage }}
|
|
219
|
+
</p>
|
|
220
|
+
</section>
|
|
221
|
+
|
|
222
|
+
<section
|
|
223
|
+
class="rounded-2xl bg-slate-900/70 p-5 shadow-lg ring-1 ring-white/5"
|
|
224
|
+
>
|
|
225
|
+
<div class="flex items-center justify-between gap-3">
|
|
226
|
+
<div>
|
|
227
|
+
<h2 class="text-lg font-semibold">
|
|
228
|
+
Cache snapshot
|
|
229
|
+
</h2>
|
|
230
|
+
<p class="text-xs text-slate-400">
|
|
231
|
+
Result from getQueryData
|
|
232
|
+
</p>
|
|
233
|
+
</div>
|
|
234
|
+
<span
|
|
235
|
+
class="
|
|
236
|
+
rounded-full bg-emerald-500/15 px-3 py-1 text-xs font-semibold
|
|
237
|
+
text-emerald-100 ring-1 ring-emerald-500/30
|
|
238
|
+
"
|
|
239
|
+
>
|
|
240
|
+
{{ cachedHello ? 'Cached' : 'Empty' }}
|
|
241
|
+
</span>
|
|
242
|
+
</div>
|
|
243
|
+
<div
|
|
244
|
+
class="
|
|
245
|
+
mt-3 rounded-lg bg-white/5 px-3 py-2 text-sm text-slate-100 ring-1
|
|
246
|
+
ring-white/10
|
|
247
|
+
"
|
|
248
|
+
>
|
|
249
|
+
<p class="text-xs tracking-wide text-slate-400 uppercase">
|
|
250
|
+
Time
|
|
251
|
+
</p>
|
|
252
|
+
<p class="mt-1 font-semibold">
|
|
253
|
+
{{ formatTime(cachedHello?.time) }}
|
|
254
|
+
</p>
|
|
255
|
+
</div>
|
|
256
|
+
<pre
|
|
257
|
+
class="
|
|
258
|
+
mt-4 max-h-48 overflow-auto rounded-lg bg-black/40 p-3 text-left
|
|
259
|
+
text-xs leading-relaxed text-slate-100 ring-1 ring-white/10
|
|
260
|
+
"
|
|
261
|
+
>{{ JSON.stringify(cachedHello ?? '-', null, 2) }}</pre>
|
|
262
|
+
</section>
|
|
263
|
+
|
|
264
|
+
<section
|
|
46
265
|
class="
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
hover:scale-105
|
|
266
|
+
rounded-2xl bg-slate-900/70 p-5 shadow-lg ring-1 ring-white/5
|
|
267
|
+
md:col-span-2
|
|
50
268
|
"
|
|
51
|
-
@click="toggleLocale"
|
|
52
269
|
>
|
|
53
|
-
<div
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
270
|
+
<div class="flex flex-wrap items-center justify-between gap-3">
|
|
271
|
+
<div>
|
|
272
|
+
<h2 class="text-lg font-semibold">
|
|
273
|
+
Query meta
|
|
274
|
+
</h2>
|
|
275
|
+
<p class="text-xs text-slate-400">
|
|
276
|
+
What TanStack Query is tracking
|
|
277
|
+
</p>
|
|
278
|
+
</div>
|
|
279
|
+
<span
|
|
280
|
+
class="
|
|
281
|
+
rounded-full bg-white/10 px-3 py-1 text-xs font-semibold
|
|
282
|
+
text-white/80 ring-1 ring-white/10
|
|
283
|
+
"
|
|
284
|
+
>
|
|
285
|
+
Updated: {{ formatTime(queryMeta.dataUpdatedAt) }}
|
|
286
|
+
</span>
|
|
287
|
+
</div>
|
|
288
|
+
<div
|
|
289
|
+
class="
|
|
290
|
+
mt-4 grid gap-3
|
|
291
|
+
sm:grid-cols-4
|
|
292
|
+
"
|
|
293
|
+
>
|
|
294
|
+
<div
|
|
295
|
+
class="
|
|
296
|
+
rounded-lg bg-white/5 px-3 py-2 text-xs text-slate-100 ring-1
|
|
297
|
+
ring-white/10
|
|
298
|
+
"
|
|
299
|
+
>
|
|
300
|
+
<p class="text-slate-400">
|
|
301
|
+
Status
|
|
302
|
+
</p>
|
|
303
|
+
<p class="mt-1 font-semibold">
|
|
304
|
+
{{ queryMeta.status }}
|
|
305
|
+
</p>
|
|
306
|
+
</div>
|
|
307
|
+
<div
|
|
308
|
+
class="
|
|
309
|
+
rounded-lg bg-white/5 px-3 py-2 text-xs text-slate-100 ring-1
|
|
310
|
+
ring-white/10
|
|
311
|
+
"
|
|
312
|
+
>
|
|
313
|
+
<p class="text-slate-400">
|
|
314
|
+
Fetch
|
|
315
|
+
</p>
|
|
316
|
+
<p class="mt-1 font-semibold">
|
|
317
|
+
{{ queryMeta.fetchStatus }}
|
|
318
|
+
</p>
|
|
319
|
+
</div>
|
|
320
|
+
<div
|
|
321
|
+
class="
|
|
322
|
+
rounded-lg bg-white/5 px-3 py-2 text-xs text-slate-100 ring-1
|
|
323
|
+
ring-white/10
|
|
324
|
+
"
|
|
325
|
+
>
|
|
326
|
+
<p class="text-slate-400">
|
|
327
|
+
Fetching?
|
|
328
|
+
</p>
|
|
329
|
+
<p class="mt-1 font-semibold">
|
|
330
|
+
{{ queryMeta.isFetching ? 'Yes' : 'No' }}
|
|
331
|
+
</p>
|
|
332
|
+
</div>
|
|
333
|
+
<div
|
|
334
|
+
class="
|
|
335
|
+
rounded-lg bg-white/5 px-3 py-2 text-xs text-slate-100 ring-1
|
|
336
|
+
ring-white/10
|
|
337
|
+
"
|
|
338
|
+
>
|
|
339
|
+
<p class="text-slate-400">
|
|
340
|
+
Stale?
|
|
341
|
+
</p>
|
|
342
|
+
<p class="mt-1 font-semibold">
|
|
343
|
+
{{ queryMeta.isStale ? 'Yes' : 'No' }}
|
|
344
|
+
</p>
|
|
345
|
+
</div>
|
|
346
|
+
</div>
|
|
347
|
+
<pre
|
|
348
|
+
class="
|
|
349
|
+
mt-4 max-h-48 overflow-auto rounded-lg bg-black/40 p-3 text-left
|
|
350
|
+
text-xs leading-relaxed text-slate-100 ring-1 ring-white/10
|
|
351
|
+
"
|
|
352
|
+
>{{ JSON.stringify(queryMeta, null, 2) }}</pre>
|
|
353
|
+
</section>
|
|
64
354
|
</div>
|
|
65
355
|
</div>
|
|
66
356
|
</div>
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
"compatibility_date": "2025-10-16",
|
|
5
5
|
"main": "./worker/fetch-entry.ts",
|
|
6
6
|
"assets": {
|
|
7
|
-
"not_found_handling": "single-page-application"
|
|
7
|
+
"not_found_handling": "single-page-application",
|
|
8
|
+
"run_worker_first": [
|
|
9
|
+
"/api/*"
|
|
10
|
+
]
|
|
8
11
|
},
|
|
9
12
|
"dev": {
|
|
10
13
|
"port": 8787
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"@vue/tsconfig": "^0.8.1",
|
|
52
52
|
"jsdom": "^27.2.0",
|
|
53
53
|
"tailwindcss": "^4.1.17",
|
|
54
|
-
"unplugin-vue-router": "^0.17.
|
|
54
|
+
"unplugin-vue-router": "^0.17.1",
|
|
55
55
|
"vite": "^7.2.4",
|
|
56
56
|
"vite-plugin-dts": "^4.5.4",
|
|
57
|
-
"vue": "^3.5.
|
|
57
|
+
"vue": "^3.5.25",
|
|
58
58
|
"vue-router": "^4.6.3",
|
|
59
|
-
"vue-tsc": "^3.1.
|
|
59
|
+
"vue-tsc": "^3.1.5"
|
|
60
60
|
}
|
|
61
61
|
}
|