qarpeo 0.0.0-alpha.10
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 +21 -0
- package/README.md +102 -0
- package/dist/chunks/auth-schema.mjs +219 -0
- package/dist/chunks/wrangler.mjs +783 -0
- package/dist/cli/index.mjs +1085 -0
- package/dist/dev/env.d.ts +12 -0
- package/dist/dev/wrangler.d.ts +18 -0
- package/dist/module.d.ts +16 -0
- package/dist/module.mjs +4436 -0
- package/dist/runtime/ai.d.ts +25 -0
- package/dist/runtime/ai.mjs +106 -0
- package/dist/runtime/analytics.d.ts +24 -0
- package/dist/runtime/analytics.mjs +38 -0
- package/dist/runtime/app/components/BlobImage.vue +100 -0
- package/dist/runtime/app/components/CMSBlocks.vue +93 -0
- package/dist/runtime/app/components/CMSContent.vue +23 -0
- package/dist/runtime/app/components/CMSImage.vue +49 -0
- package/dist/runtime/app/components/CMSLocaleSwitcher.vue +110 -0
- package/dist/runtime/app/components/CMSPreviewBanner.vue +79 -0
- package/dist/runtime/app/components/CMSVersionBanner.vue +49 -0
- package/dist/runtime/app/components/CMSVersionSwitcher.vue +126 -0
- package/dist/runtime/app/components/ContentRenderer.vue +80 -0
- package/dist/runtime/app/components/FileUpload.vue +196 -0
- package/dist/runtime/app/components/ImpersonationBanner.vue +57 -0
- package/dist/runtime/app/components/SignedIn.vue +13 -0
- package/dist/runtime/app/components/SignedOut.vue +13 -0
- package/dist/runtime/app/components/shiki.css +34 -0
- package/dist/runtime/app/composables/analytics.d.ts +125 -0
- package/dist/runtime/app/composables/analytics.mjs +81 -0
- package/dist/runtime/app/composables/api-tokens.d.ts +49 -0
- package/dist/runtime/app/composables/api-tokens.mjs +61 -0
- package/dist/runtime/app/composables/auth.d.ts +50 -0
- package/dist/runtime/app/composables/auth.mjs +101 -0
- package/dist/runtime/app/composables/chat.d.ts +69 -0
- package/dist/runtime/app/composables/chat.mjs +159 -0
- package/dist/runtime/app/composables/cms-preview.d.ts +33 -0
- package/dist/runtime/app/composables/cms-preview.mjs +83 -0
- package/dist/runtime/app/composables/cms.d.ts +307 -0
- package/dist/runtime/app/composables/cms.mjs +355 -0
- package/dist/runtime/app/composables/docs-version.d.ts +35 -0
- package/dist/runtime/app/composables/docs-version.mjs +70 -0
- package/dist/runtime/app/composables/impersonation.d.ts +14 -0
- package/dist/runtime/app/composables/impersonation.mjs +44 -0
- package/dist/runtime/app/composables/notifications.d.ts +35 -0
- package/dist/runtime/app/composables/notifications.mjs +139 -0
- package/dist/runtime/app/composables/organization.d.ts +127 -0
- package/dist/runtime/app/composables/organization.mjs +138 -0
- package/dist/runtime/app/composables/passkey.d.ts +6 -0
- package/dist/runtime/app/composables/passkey.mjs +105 -0
- package/dist/runtime/app/composables/passwordless.d.ts +7 -0
- package/dist/runtime/app/composables/passwordless.mjs +67 -0
- package/dist/runtime/app/composables/payments.d.ts +43 -0
- package/dist/runtime/app/composables/payments.mjs +74 -0
- package/dist/runtime/app/composables/realtime.d.ts +96 -0
- package/dist/runtime/app/composables/realtime.mjs +432 -0
- package/dist/runtime/app/composables/site.d.ts +35 -0
- package/dist/runtime/app/composables/site.mjs +36 -0
- package/dist/runtime/app/composables/storage.d.ts +60 -0
- package/dist/runtime/app/composables/storage.mjs +294 -0
- package/dist/runtime/app/composables/tenant.d.ts +82 -0
- package/dist/runtime/app/composables/tenant.mjs +120 -0
- package/dist/runtime/app/composables/turnstile.d.ts +3 -0
- package/dist/runtime/app/composables/turnstile.mjs +10 -0
- package/dist/runtime/app/composables/two-factor.d.ts +12 -0
- package/dist/runtime/app/composables/two-factor.mjs +65 -0
- package/dist/runtime/app/middleware/auth.global.d.ts +2 -0
- package/dist/runtime/app/middleware/auth.global.mjs +44 -0
- package/dist/runtime/app/pages/cms.vue +2249 -0
- package/dist/runtime/app/pages/devtools/agents.vue +717 -0
- package/dist/runtime/app/pages/devtools/analytics.vue +618 -0
- package/dist/runtime/app/pages/devtools/auth.vue +351 -0
- package/dist/runtime/app/pages/devtools/blob.vue +745 -0
- package/dist/runtime/app/pages/devtools/db.vue +546 -0
- package/dist/runtime/app/pages/devtools/domains.vue +772 -0
- package/dist/runtime/app/pages/devtools/kv.vue +829 -0
- package/dist/runtime/app/pages/devtools/logs.vue +655 -0
- package/dist/runtime/app/pages/devtools/mail.vue +389 -0
- package/dist/runtime/app/pages/devtools/overview.vue +390 -0
- package/dist/runtime/app/pages/devtools/settings.vue +560 -0
- package/dist/runtime/app/pages/devtools.vue +165 -0
- package/dist/runtime/app/plugins/seo.d.ts +2 -0
- package/dist/runtime/app/plugins/seo.mjs +105 -0
- package/dist/runtime/app/plugins/shortcuts.client.d.ts +6 -0
- package/dist/runtime/app/plugins/shortcuts.client.mjs +19 -0
- package/dist/runtime/app/public/sw-notifications.mjs +52 -0
- package/dist/runtime/auth.d.ts +25 -0
- package/dist/runtime/auth.mjs +11 -0
- package/dist/runtime/bindings.d.ts +27 -0
- package/dist/runtime/bindings.mjs +38 -0
- package/dist/runtime/blob.d.ts +26 -0
- package/dist/runtime/blob.mjs +334 -0
- package/dist/runtime/bots.d.ts +1 -0
- package/dist/runtime/bots.mjs +1 -0
- package/dist/runtime/browser.d.ts +21 -0
- package/dist/runtime/browser.mjs +64 -0
- package/dist/runtime/cache.d.ts +19 -0
- package/dist/runtime/cache.mjs +12 -0
- package/dist/runtime/cms.d.ts +2 -0
- package/dist/runtime/cms.mjs +0 -0
- package/dist/runtime/db.d.ts +21 -0
- package/dist/runtime/db.mjs +36 -0
- package/dist/runtime/drizzle.d.ts +11 -0
- package/dist/runtime/drizzle.mjs +18 -0
- package/dist/runtime/email.d.ts +51 -0
- package/dist/runtime/email.mjs +245 -0
- package/dist/runtime/hyperdrive.d.ts +21 -0
- package/dist/runtime/hyperdrive.mjs +49 -0
- package/dist/runtime/index.d.ts +23 -0
- package/dist/runtime/index.mjs +23 -0
- package/dist/runtime/kv.d.ts +16 -0
- package/dist/runtime/kv.mjs +126 -0
- package/dist/runtime/payments.d.ts +2 -0
- package/dist/runtime/payments.mjs +0 -0
- package/dist/runtime/queue.d.ts +21 -0
- package/dist/runtime/queue.mjs +41 -0
- package/dist/runtime/rag.d.ts +1 -0
- package/dist/runtime/rag.mjs +1 -0
- package/dist/runtime/ratelimit.d.ts +21 -0
- package/dist/runtime/ratelimit.mjs +38 -0
- package/dist/runtime/realtime.d.ts +6 -0
- package/dist/runtime/realtime.mjs +13 -0
- package/dist/runtime/server/db/cms-schema.d.ts +651 -0
- package/dist/runtime/server/db/cms-schema.mjs +74 -0
- package/dist/runtime/server/durable-objects/agent.d.ts +14 -0
- package/dist/runtime/server/durable-objects/agent.mjs +571 -0
- package/dist/runtime/server/durable-objects/room.d.ts +34 -0
- package/dist/runtime/server/durable-objects/room.mjs +514 -0
- package/dist/runtime/server/middleware/auth.d.ts +2 -0
- package/dist/runtime/server/middleware/auth.mjs +108 -0
- package/dist/runtime/server/middleware/devtools.d.ts +2 -0
- package/dist/runtime/server/middleware/devtools.mjs +61 -0
- package/dist/runtime/server/middleware/ratelimit.d.ts +2 -0
- package/dist/runtime/server/middleware/ratelimit.mjs +49 -0
- package/dist/runtime/server/middleware/tenancy.d.ts +6 -0
- package/dist/runtime/server/middleware/tenancy.mjs +15 -0
- package/dist/runtime/server/middleware/tracker.d.ts +7 -0
- package/dist/runtime/server/middleware/tracker.mjs +9 -0
- package/dist/runtime/server/plugins/agents.d.ts +7 -0
- package/dist/runtime/server/plugins/agents.mjs +3 -0
- package/dist/runtime/server/plugins/cms.d.ts +7 -0
- package/dist/runtime/server/plugins/cms.mjs +16 -0
- package/dist/runtime/server/plugins/dev-logs.d.ts +1 -0
- package/dist/runtime/server/plugins/dev-logs.mjs +58 -0
- package/dist/runtime/server/plugins/dev-proxy.d.ts +3 -0
- package/dist/runtime/server/plugins/dev-proxy.mjs +21 -0
- package/dist/runtime/server/plugins/env.d.ts +6 -0
- package/dist/runtime/server/plugins/env.mjs +17 -0
- package/dist/runtime/server/plugins/queue.d.ts +6 -0
- package/dist/runtime/server/plugins/queue.mjs +8 -0
- package/dist/runtime/server/routes/__qarpeo/agents/chat.post.d.ts +20 -0
- package/dist/runtime/server/routes/__qarpeo/agents/chat.post.mjs +110 -0
- package/dist/runtime/server/routes/__qarpeo/agents/clear.post.d.ts +7 -0
- package/dist/runtime/server/routes/__qarpeo/agents/clear.post.mjs +15 -0
- package/dist/runtime/server/routes/__qarpeo/agents/create.post.d.ts +17 -0
- package/dist/runtime/server/routes/__qarpeo/agents/create.post.mjs +47 -0
- package/dist/runtime/server/routes/__qarpeo/agents/history.get.d.ts +15 -0
- package/dist/runtime/server/routes/__qarpeo/agents/history.get.mjs +24 -0
- package/dist/runtime/server/routes/__qarpeo/agents/list.get.d.ts +5 -0
- package/dist/runtime/server/routes/__qarpeo/agents/list.get.mjs +63 -0
- package/dist/runtime/server/routes/__qarpeo/analytics/events.get.d.ts +64 -0
- package/dist/runtime/server/routes/__qarpeo/analytics/events.get.mjs +55 -0
- package/dist/runtime/server/routes/__qarpeo/analytics/summary.get.d.ts +30 -0
- package/dist/runtime/server/routes/__qarpeo/analytics/summary.get.mjs +73 -0
- package/dist/runtime/server/routes/__qarpeo/auth/revoke-session.post.d.ts +6 -0
- package/dist/runtime/server/routes/__qarpeo/auth/revoke-session.post.mjs +26 -0
- package/dist/runtime/server/routes/__qarpeo/auth/sessions.get.d.ts +6 -0
- package/dist/runtime/server/routes/__qarpeo/auth/sessions.get.mjs +46 -0
- package/dist/runtime/server/routes/__qarpeo/auth/users.get.d.ts +7 -0
- package/dist/runtime/server/routes/__qarpeo/auth/users.get.mjs +65 -0
- package/dist/runtime/server/routes/__qarpeo/blob/files.get.d.ts +22 -0
- package/dist/runtime/server/routes/__qarpeo/blob/files.get.mjs +36 -0
- package/dist/runtime/server/routes/__qarpeo/db/query.post.d.ts +23 -0
- package/dist/runtime/server/routes/__qarpeo/db/query.post.mjs +34 -0
- package/dist/runtime/server/routes/__qarpeo/db/tables.get.d.ts +31 -0
- package/dist/runtime/server/routes/__qarpeo/db/tables.get.mjs +81 -0
- package/dist/runtime/server/routes/__qarpeo/kv/delete.post.d.ts +11 -0
- package/dist/runtime/server/routes/__qarpeo/kv/delete.post.mjs +18 -0
- package/dist/runtime/server/routes/__qarpeo/kv/get.get.d.ts +11 -0
- package/dist/runtime/server/routes/__qarpeo/kv/get.get.mjs +20 -0
- package/dist/runtime/server/routes/__qarpeo/kv/keys.get.d.ts +8 -0
- package/dist/runtime/server/routes/__qarpeo/kv/keys.get.mjs +27 -0
- package/dist/runtime/server/routes/__qarpeo/kv/set.post.d.ts +14 -0
- package/dist/runtime/server/routes/__qarpeo/kv/set.post.mjs +24 -0
- package/dist/runtime/server/routes/__qarpeo/logs.delete.d.ts +5 -0
- package/dist/runtime/server/routes/__qarpeo/logs.delete.mjs +6 -0
- package/dist/runtime/server/routes/__qarpeo/logs.get.d.ts +5 -0
- package/dist/runtime/server/routes/__qarpeo/logs.get.mjs +26 -0
- package/dist/runtime/server/routes/__qarpeo/logs.post.d.ts +6 -0
- package/dist/runtime/server/routes/__qarpeo/logs.post.mjs +17 -0
- package/dist/runtime/server/routes/__qarpeo/mail/bounce.post.d.ts +5 -0
- package/dist/runtime/server/routes/__qarpeo/mail/bounce.post.mjs +37 -0
- package/dist/runtime/server/routes/__qarpeo/mail/clear.post.d.ts +4 -0
- package/dist/runtime/server/routes/__qarpeo/mail/clear.post.mjs +6 -0
- package/dist/runtime/server/routes/__qarpeo/mail/inbox.get.d.ts +5 -0
- package/dist/runtime/server/routes/__qarpeo/mail/inbox.get.mjs +7 -0
- package/dist/runtime/server/routes/__qarpeo/mail/send-test.post.d.ts +4 -0
- package/dist/runtime/server/routes/__qarpeo/mail/send-test.post.mjs +29 -0
- package/dist/runtime/server/routes/__qarpeo/mail/track/click/[id].get.d.ts +2 -0
- package/dist/runtime/server/routes/__qarpeo/mail/track/click/[id].get.mjs +23 -0
- package/dist/runtime/server/routes/__qarpeo/mail/track/open/[id].get.d.ts +2 -0
- package/dist/runtime/server/routes/__qarpeo/mail/track/open/[id].get.mjs +31 -0
- package/dist/runtime/server/routes/__qarpeo/overview/health.get.d.ts +8 -0
- package/dist/runtime/server/routes/__qarpeo/overview/health.get.mjs +46 -0
- package/dist/runtime/server/routes/__qarpeo/overview.get.d.ts +32 -0
- package/dist/runtime/server/routes/__qarpeo/overview.get.mjs +38 -0
- package/dist/runtime/server/routes/__qarpeo/settings/reset-dev-data.post.d.ts +11 -0
- package/dist/runtime/server/routes/__qarpeo/settings/reset-dev-data.post.mjs +84 -0
- package/dist/runtime/server/routes/__qarpeo/settings.get.d.ts +124 -0
- package/dist/runtime/server/routes/__qarpeo/settings.get.mjs +145 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/create.post.d.ts +7 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/create.post.mjs +26 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-add.post.d.ts +6 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-add.post.mjs +29 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-delete.post.d.ts +7 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-delete.post.mjs +21 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-verify.post.d.ts +9 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/domain-verify.post.mjs +21 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/list.get.d.ts +15 -0
- package/dist/runtime/server/routes/__qarpeo/tenants/list.get.mjs +22 -0
- package/dist/runtime/server/routes/agents/[agent]/chat.post.d.ts +2 -0
- package/dist/runtime/server/routes/agents/[agent]/chat.post.mjs +35 -0
- package/dist/runtime/server/routes/agents/[agent]/clear.post.d.ts +4 -0
- package/dist/runtime/server/routes/agents/[agent]/clear.post.mjs +27 -0
- package/dist/runtime/server/routes/agents/[agent]/history.get.d.ts +4 -0
- package/dist/runtime/server/routes/agents/[agent]/history.get.mjs +27 -0
- package/dist/runtime/server/routes/analytics/events.get.d.ts +3 -0
- package/dist/runtime/server/routes/analytics/events.get.mjs +17 -0
- package/dist/runtime/server/routes/analytics/pageviews.get.d.ts +3 -0
- package/dist/runtime/server/routes/analytics/pageviews.get.mjs +15 -0
- package/dist/runtime/server/routes/analytics/summary.get.d.ts +6 -0
- package/dist/runtime/server/routes/analytics/summary.get.mjs +15 -0
- package/dist/runtime/server/routes/atom.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/atom.xml.get.mjs +76 -0
- package/dist/runtime/server/routes/auth/2fa/disable.post.d.ts +4 -0
- package/dist/runtime/server/routes/auth/2fa/disable.post.mjs +44 -0
- package/dist/runtime/server/routes/auth/2fa/setup.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/2fa/setup.post.mjs +32 -0
- package/dist/runtime/server/routes/auth/2fa/verify.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/2fa/verify.post.mjs +92 -0
- package/dist/runtime/server/routes/auth/[provider]/callback.d.ts +1 -0
- package/dist/runtime/server/routes/auth/[provider]/callback.mjs +1 -0
- package/dist/runtime/server/routes/auth/[provider].d.ts +3 -0
- package/dist/runtime/server/routes/auth/[provider].mjs +95 -0
- package/dist/runtime/server/routes/auth/account.delete.d.ts +5 -0
- package/dist/runtime/server/routes/auth/account.delete.mjs +52 -0
- package/dist/runtime/server/routes/auth/impersonate/start.post.d.ts +5 -0
- package/dist/runtime/server/routes/auth/impersonate/start.post.mjs +14 -0
- package/dist/runtime/server/routes/auth/impersonate/stop.post.d.ts +5 -0
- package/dist/runtime/server/routes/auth/impersonate/stop.post.mjs +5 -0
- package/dist/runtime/server/routes/auth/logout-all.post.d.ts +4 -0
- package/dist/runtime/server/routes/auth/logout-all.post.mjs +16 -0
- package/dist/runtime/server/routes/auth/logout-others.post.d.ts +4 -0
- package/dist/runtime/server/routes/auth/logout-others.post.mjs +11 -0
- package/dist/runtime/server/routes/auth/logout.post.d.ts +4 -0
- package/dist/runtime/server/routes/auth/logout.post.mjs +17 -0
- package/dist/runtime/server/routes/auth/magic-link/send.post.d.ts +10 -0
- package/dist/runtime/server/routes/auth/magic-link/send.post.mjs +29 -0
- package/dist/runtime/server/routes/auth/magic-link/verify.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/magic-link/verify.get.mjs +81 -0
- package/dist/runtime/server/routes/auth/organization/create.post.d.ts +5 -0
- package/dist/runtime/server/routes/auth/organization/create.post.mjs +10 -0
- package/dist/runtime/server/routes/auth/organization/invite.post.d.ts +9 -0
- package/dist/runtime/server/routes/auth/organization/invite.post.mjs +27 -0
- package/dist/runtime/server/routes/auth/organization/join.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/organization/join.post.mjs +15 -0
- package/dist/runtime/server/routes/auth/organization/list.get.d.ts +5 -0
- package/dist/runtime/server/routes/auth/organization/list.get.mjs +7 -0
- package/dist/runtime/server/routes/auth/organization/members/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/auth/organization/members/[id].delete.mjs +33 -0
- package/dist/runtime/server/routes/auth/organization/members/index.get.d.ts +6 -0
- package/dist/runtime/server/routes/auth/organization/members/index.get.mjs +18 -0
- package/dist/runtime/server/routes/auth/organization/mfa.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/organization/mfa.post.mjs +33 -0
- package/dist/runtime/server/routes/auth/organization/sso/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/auth/organization/sso/[id].delete.mjs +28 -0
- package/dist/runtime/server/routes/auth/organization/sso/index.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/organization/sso/index.get.mjs +23 -0
- package/dist/runtime/server/routes/auth/organization/sso/index.post.d.ts +5 -0
- package/dist/runtime/server/routes/auth/organization/sso/index.post.mjs +84 -0
- package/dist/runtime/server/routes/auth/organization/switch.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/organization/switch.post.mjs +14 -0
- package/dist/runtime/server/routes/auth/otp/send.post.d.ts +10 -0
- package/dist/runtime/server/routes/auth/otp/send.post.mjs +29 -0
- package/dist/runtime/server/routes/auth/otp/verify.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/otp/verify.post.mjs +95 -0
- package/dist/runtime/server/routes/auth/sessions/[id].delete.d.ts +5 -0
- package/dist/runtime/server/routes/auth/sessions/[id].delete.mjs +24 -0
- package/dist/runtime/server/routes/auth/sessions.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/sessions.get.mjs +11 -0
- package/dist/runtime/server/routes/auth/sso/login.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/sso/login.get.mjs +94 -0
- package/dist/runtime/server/routes/auth/sso/oidc/callback.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/sso/oidc/callback.get.mjs +113 -0
- package/dist/runtime/server/routes/auth/sso/saml/acs.post.d.ts +2 -0
- package/dist/runtime/server/routes/auth/sso/saml/acs.post.mjs +95 -0
- package/dist/runtime/server/routes/auth/tokens/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/auth/tokens/[id].delete.mjs +13 -0
- package/dist/runtime/server/routes/auth/tokens/create.post.d.ts +9 -0
- package/dist/runtime/server/routes/auth/tokens/create.post.mjs +17 -0
- package/dist/runtime/server/routes/auth/tokens/index.get.d.ts +9 -0
- package/dist/runtime/server/routes/auth/tokens/index.get.mjs +5 -0
- package/dist/runtime/server/routes/auth/turnstile/verify.post.d.ts +2 -0
- package/dist/runtime/server/routes/auth/turnstile/verify.post.mjs +15 -0
- package/dist/runtime/server/routes/auth/user.get.d.ts +2 -0
- package/dist/runtime/server/routes/auth/user.get.mjs +6 -0
- package/dist/runtime/server/routes/auth/webauthn/login/options.post.d.ts +2 -0
- package/dist/runtime/server/routes/auth/webauthn/login/options.post.mjs +17 -0
- package/dist/runtime/server/routes/auth/webauthn/login/verify.post.d.ts +6 -0
- package/dist/runtime/server/routes/auth/webauthn/login/verify.post.mjs +127 -0
- package/dist/runtime/server/routes/auth/webauthn/register/options.post.d.ts +2 -0
- package/dist/runtime/server/routes/auth/webauthn/register/options.post.mjs +47 -0
- package/dist/runtime/server/routes/auth/webauthn/register/verify.post.d.ts +5 -0
- package/dist/runtime/server/routes/auth/webauthn/register/verify.post.mjs +88 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/preview-token.post.d.ts +8 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/preview-token.post.mjs +27 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/publish.post.d.ts +6 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/publish.post.mjs +19 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/review.post.d.ts +6 -0
- package/dist/runtime/server/routes/cms/[collection]/[id]/review.post.mjs +33 -0
- package/dist/runtime/server/routes/cms/[collection]/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/cms/[collection]/[id].delete.mjs +17 -0
- package/dist/runtime/server/routes/cms/[collection]/[id].put.d.ts +4 -0
- package/dist/runtime/server/routes/cms/[collection]/[id].put.mjs +18 -0
- package/dist/runtime/server/routes/cms/[collection]/[slug].get.d.ts +4 -0
- package/dist/runtime/server/routes/cms/[collection]/[slug].get.mjs +19 -0
- package/dist/runtime/server/routes/cms/[collection]/atom.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/cms/[collection]/atom.xml.get.mjs +69 -0
- package/dist/runtime/server/routes/cms/[collection]/by-path.get.d.ts +8 -0
- package/dist/runtime/server/routes/cms/[collection]/by-path.get.mjs +23 -0
- package/dist/runtime/server/routes/cms/[collection]/feed.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/cms/[collection]/feed.xml.get.mjs +65 -0
- package/dist/runtime/server/routes/cms/[collection]/index.get.d.ts +7 -0
- package/dist/runtime/server/routes/cms/[collection]/index.get.mjs +15 -0
- package/dist/runtime/server/routes/cms/[collection]/index.post.d.ts +4 -0
- package/dist/runtime/server/routes/cms/[collection]/index.post.mjs +23 -0
- package/dist/runtime/server/routes/cms/[collection]/references.get.d.ts +19 -0
- package/dist/runtime/server/routes/cms/[collection]/references.get.mjs +47 -0
- package/dist/runtime/server/routes/cms/[collection]/surroundings.get.d.ts +10 -0
- package/dist/runtime/server/routes/cms/[collection]/surroundings.get.mjs +12 -0
- package/dist/runtime/server/routes/cms/collections/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/cms/collections/[id].delete.mjs +10 -0
- package/dist/runtime/server/routes/cms/collections/[id].put.d.ts +4 -0
- package/dist/runtime/server/routes/cms/collections/[id].put.mjs +11 -0
- package/dist/runtime/server/routes/cms/collections/index.get.d.ts +4 -0
- package/dist/runtime/server/routes/cms/collections/index.get.mjs +6 -0
- package/dist/runtime/server/routes/cms/collections/index.post.d.ts +4 -0
- package/dist/runtime/server/routes/cms/collections/index.post.mjs +19 -0
- package/dist/runtime/server/routes/cms/components/index.get.d.ts +17 -0
- package/dist/runtime/server/routes/cms/components/index.get.mjs +16 -0
- package/dist/runtime/server/routes/cms/deploy.post.d.ts +4 -0
- package/dist/runtime/server/routes/cms/deploy.post.mjs +46 -0
- package/dist/runtime/server/routes/cms/export.post.d.ts +10 -0
- package/dist/runtime/server/routes/cms/export.post.mjs +55 -0
- package/dist/runtime/server/routes/cms/navigation.get.d.ts +8 -0
- package/dist/runtime/server/routes/cms/navigation.get.mjs +36 -0
- package/dist/runtime/server/routes/cms/preview/disable.get.d.ts +9 -0
- package/dist/runtime/server/routes/cms/preview/disable.get.mjs +9 -0
- package/dist/runtime/server/routes/cms/preview/enable.get.d.ts +14 -0
- package/dist/runtime/server/routes/cms/preview/enable.get.mjs +42 -0
- package/dist/runtime/server/routes/cms/publish-scheduled.post.d.ts +11 -0
- package/dist/runtime/server/routes/cms/publish-scheduled.post.mjs +35 -0
- package/dist/runtime/server/routes/cms/search.get.d.ts +13 -0
- package/dist/runtime/server/routes/cms/search.get.mjs +137 -0
- package/dist/runtime/server/routes/cms/sync.post.d.ts +7 -0
- package/dist/runtime/server/routes/cms/sync.post.mjs +18 -0
- package/dist/runtime/server/routes/cms/webhooks/[provider].post.d.ts +150 -0
- package/dist/runtime/server/routes/cms/webhooks/[provider].post.mjs +213 -0
- package/dist/runtime/server/routes/docs/search.get.d.ts +15 -0
- package/dist/runtime/server/routes/docs/search.get.mjs +20 -0
- package/dist/runtime/server/routes/feed.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/feed.xml.get.mjs +73 -0
- package/dist/runtime/server/routes/mail/bounce.post.d.ts +14 -0
- package/dist/runtime/server/routes/mail/bounce.post.mjs +56 -0
- package/dist/runtime/server/routes/mail/inbox/[id].get.d.ts +2 -0
- package/dist/runtime/server/routes/mail/inbox/[id].get.mjs +9 -0
- package/dist/runtime/server/routes/mail/inbox.get.d.ts +4 -0
- package/dist/runtime/server/routes/mail/inbox.get.mjs +7 -0
- package/dist/runtime/server/routes/mail/suppressions/[email].delete.d.ts +11 -0
- package/dist/runtime/server/routes/mail/suppressions/[email].delete.mjs +18 -0
- package/dist/runtime/server/routes/mail/suppressions/index.get.d.ts +12 -0
- package/dist/runtime/server/routes/mail/suppressions/index.get.mjs +23 -0
- package/dist/runtime/server/routes/mail/suppressions/index.post.d.ts +10 -0
- package/dist/runtime/server/routes/mail/suppressions/index.post.mjs +23 -0
- package/dist/runtime/server/routes/mail/unsubscribe.d.ts +13 -0
- package/dist/runtime/server/routes/mail/unsubscribe.mjs +91 -0
- package/dist/runtime/server/routes/mail/webhooks.post.d.ts +12 -0
- package/dist/runtime/server/routes/mail/webhooks.post.mjs +71 -0
- package/dist/runtime/server/routes/notifications/[id]/read.post.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/[id]/read.post.mjs +13 -0
- package/dist/runtime/server/routes/notifications/[id].delete.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/[id].delete.mjs +13 -0
- package/dist/runtime/server/routes/notifications/[id].get.d.ts +2 -0
- package/dist/runtime/server/routes/notifications/[id].get.mjs +15 -0
- package/dist/runtime/server/routes/notifications/index.get.d.ts +6 -0
- package/dist/runtime/server/routes/notifications/index.get.mjs +18 -0
- package/dist/runtime/server/routes/notifications/push/subscribe.post.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/push/subscribe.post.mjs +20 -0
- package/dist/runtime/server/routes/notifications/push/unsubscribe.post.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/push/unsubscribe.post.mjs +15 -0
- package/dist/runtime/server/routes/notifications/read-all.post.d.ts +4 -0
- package/dist/runtime/server/routes/notifications/read-all.post.mjs +11 -0
- package/dist/runtime/server/routes/payments/cancel.post.d.ts +7 -0
- package/dist/runtime/server/routes/payments/cancel.post.mjs +9 -0
- package/dist/runtime/server/routes/payments/change-plan.post.d.ts +7 -0
- package/dist/runtime/server/routes/payments/change-plan.post.mjs +12 -0
- package/dist/runtime/server/routes/payments/checkout.post.d.ts +9 -0
- package/dist/runtime/server/routes/payments/checkout.post.mjs +16 -0
- package/dist/runtime/server/routes/payments/pause.post.d.ts +7 -0
- package/dist/runtime/server/routes/payments/pause.post.mjs +9 -0
- package/dist/runtime/server/routes/payments/portal.post.d.ts +5 -0
- package/dist/runtime/server/routes/payments/portal.post.mjs +9 -0
- package/dist/runtime/server/routes/payments/subscription.get.d.ts +6 -0
- package/dist/runtime/server/routes/payments/subscription.get.mjs +9 -0
- package/dist/runtime/server/routes/payments/usage.get.d.ts +12 -0
- package/dist/runtime/server/routes/payments/usage.get.mjs +18 -0
- package/dist/runtime/server/routes/payments/usage.post.d.ts +6 -0
- package/dist/runtime/server/routes/payments/usage.post.mjs +24 -0
- package/dist/runtime/server/routes/payments/webhook.post.d.ts +14 -0
- package/dist/runtime/server/routes/payments/webhook.post.mjs +21 -0
- package/dist/runtime/server/routes/realtime/broadcast.post.d.ts +4 -0
- package/dist/runtime/server/routes/realtime/broadcast.post.mjs +26 -0
- package/dist/runtime/server/routes/realtime/history.delete.d.ts +13 -0
- package/dist/runtime/server/routes/realtime/history.delete.mjs +12 -0
- package/dist/runtime/server/routes/realtime/history.get.d.ts +16 -0
- package/dist/runtime/server/routes/realtime/history.get.mjs +15 -0
- package/dist/runtime/server/routes/realtime/presence.get.d.ts +6 -0
- package/dist/runtime/server/routes/realtime/presence.get.mjs +27 -0
- package/dist/runtime/server/routes/realtime/state.get.d.ts +5 -0
- package/dist/runtime/server/routes/realtime/state.get.mjs +26 -0
- package/dist/runtime/server/routes/realtime/state.post.d.ts +6 -0
- package/dist/runtime/server/routes/realtime/state.post.mjs +37 -0
- package/dist/runtime/server/routes/realtime/ws.get.d.ts +2 -0
- package/dist/runtime/server/routes/realtime/ws.get.mjs +73 -0
- package/dist/runtime/server/routes/robots.txt.get.d.ts +2 -0
- package/dist/runtime/server/routes/robots.txt.get.mjs +41 -0
- package/dist/runtime/server/routes/rss.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/rss.xml.get.mjs +2 -0
- package/dist/runtime/server/routes/sitemap.xml.get.d.ts +2 -0
- package/dist/runtime/server/routes/sitemap.xml.get.mjs +84 -0
- package/dist/runtime/server/routes/storage/file/[...key].delete.d.ts +4 -0
- package/dist/runtime/server/routes/storage/file/[...key].delete.mjs +23 -0
- package/dist/runtime/server/routes/storage/file/[...key].get.d.ts +2 -0
- package/dist/runtime/server/routes/storage/file/[...key].get.mjs +23 -0
- package/dist/runtime/server/routes/storage/files.get.d.ts +14 -0
- package/dist/runtime/server/routes/storage/files.get.mjs +11 -0
- package/dist/runtime/server/routes/storage/presigned.post.d.ts +8 -0
- package/dist/runtime/server/routes/storage/presigned.post.mjs +39 -0
- package/dist/runtime/server/routes/storage/sign.post.d.ts +6 -0
- package/dist/runtime/server/routes/storage/sign.post.mjs +24 -0
- package/dist/runtime/server/routes/storage/upload.post.d.ts +22 -0
- package/dist/runtime/server/routes/storage/upload.post.mjs +96 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.d.ts +8 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.mjs +39 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.d.ts +8 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.mjs +39 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.get.d.ts +8 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.get.mjs +20 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.post.d.ts +8 -0
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.post.mjs +44 -0
- package/dist/runtime/server/routes/tenants/current.get.d.ts +8 -0
- package/dist/runtime/server/routes/tenants/current.get.mjs +6 -0
- package/dist/runtime/server/tasks/cms/publish.d.ts +4 -0
- package/dist/runtime/server/tasks/cms/publish.mjs +18 -0
- package/dist/runtime/server/utils/agent-store.d.ts +24 -0
- package/dist/runtime/server/utils/agent-store.mjs +53 -0
- package/dist/runtime/server/utils/agents-registry-fallback.d.ts +1 -0
- package/dist/runtime/server/utils/agents-registry-fallback.mjs +1 -0
- package/dist/runtime/server/utils/ai.d.ts +119 -0
- package/dist/runtime/server/utils/ai.mjs +607 -0
- package/dist/runtime/server/utils/analytics-query.d.ts +109 -0
- package/dist/runtime/server/utils/analytics-query.mjs +234 -0
- package/dist/runtime/server/utils/auth.d.ts +60 -0
- package/dist/runtime/server/utils/auth.mjs +361 -0
- package/dist/runtime/server/utils/blob-store.d.ts +13 -0
- package/dist/runtime/server/utils/blob-store.mjs +60 -0
- package/dist/runtime/server/utils/bots.d.ts +21 -0
- package/dist/runtime/server/utils/bots.mjs +491 -0
- package/dist/runtime/server/utils/cache.d.ts +33 -0
- package/dist/runtime/server/utils/cache.mjs +128 -0
- package/dist/runtime/server/utils/cms-events.d.ts +17 -0
- package/dist/runtime/server/utils/cms-events.mjs +80 -0
- package/dist/runtime/server/utils/cms-filter.d.ts +3 -0
- package/dist/runtime/server/utils/cms-filter.mjs +34 -0
- package/dist/runtime/server/utils/cms.d.ts +278 -0
- package/dist/runtime/server/utils/cms.mjs +3268 -0
- package/dist/runtime/server/utils/config.d.ts +27 -0
- package/dist/runtime/server/utils/config.mjs +38 -0
- package/dist/runtime/server/utils/context.d.ts +13 -0
- package/dist/runtime/server/utils/context.mjs +98 -0
- package/dist/runtime/server/utils/crypto.d.ts +16 -0
- package/dist/runtime/server/utils/crypto.mjs +56 -0
- package/dist/runtime/server/utils/dev-logs.d.ts +21 -0
- package/dist/runtime/server/utils/dev-logs.mjs +41 -0
- package/dist/runtime/server/utils/dev-proxy.d.ts +1 -0
- package/dist/runtime/server/utils/dev-proxy.mjs +69 -0
- package/dist/runtime/server/utils/domains.d.ts +46 -0
- package/dist/runtime/server/utils/domains.mjs +318 -0
- package/dist/runtime/server/utils/drizzle.d.ts +10 -0
- package/dist/runtime/server/utils/drizzle.mjs +36 -0
- package/dist/runtime/server/utils/email-templates.d.ts +44 -0
- package/dist/runtime/server/utils/email-templates.mjs +373 -0
- package/dist/runtime/server/utils/feed.d.ts +42 -0
- package/dist/runtime/server/utils/feed.mjs +161 -0
- package/dist/runtime/server/utils/impersonation.d.ts +67 -0
- package/dist/runtime/server/utils/impersonation.mjs +298 -0
- package/dist/runtime/server/utils/jobs.d.ts +70 -0
- package/dist/runtime/server/utils/jobs.mjs +125 -0
- package/dist/runtime/server/utils/kv-store.d.ts +9 -0
- package/dist/runtime/server/utils/kv-store.mjs +32 -0
- package/dist/runtime/server/utils/mail-suppression.d.ts +62 -0
- package/dist/runtime/server/utils/mail-suppression.mjs +328 -0
- package/dist/runtime/server/utils/mail.d.ts +90 -0
- package/dist/runtime/server/utils/mail.mjs +366 -0
- package/dist/runtime/server/utils/notifications.d.ts +51 -0
- package/dist/runtime/server/utils/notifications.mjs +215 -0
- package/dist/runtime/server/utils/organization.d.ts +54 -0
- package/dist/runtime/server/utils/organization.mjs +354 -0
- package/dist/runtime/server/utils/passwordless.d.ts +48 -0
- package/dist/runtime/server/utils/passwordless.mjs +179 -0
- package/dist/runtime/server/utils/payments.d.ts +121 -0
- package/dist/runtime/server/utils/payments.mjs +1067 -0
- package/dist/runtime/server/utils/queue-fallback.d.ts +2 -0
- package/dist/runtime/server/utils/queue-fallback.mjs +2 -0
- package/dist/runtime/server/utils/queue.d.ts +4 -0
- package/dist/runtime/server/utils/queue.mjs +3 -0
- package/dist/runtime/server/utils/rag.d.ts +25 -0
- package/dist/runtime/server/utils/rag.mjs +333 -0
- package/dist/runtime/server/utils/ratelimit.d.ts +45 -0
- package/dist/runtime/server/utils/ratelimit.mjs +182 -0
- package/dist/runtime/server/utils/realtime.d.ts +110 -0
- package/dist/runtime/server/utils/realtime.mjs +197 -0
- package/dist/runtime/server/utils/schema-fallback.d.ts +3 -0
- package/dist/runtime/server/utils/schema-fallback.mjs +2 -0
- package/dist/runtime/server/utils/session.d.ts +72 -0
- package/dist/runtime/server/utils/session.mjs +287 -0
- package/dist/runtime/server/utils/sso.d.ts +49 -0
- package/dist/runtime/server/utils/sso.mjs +131 -0
- package/dist/runtime/server/utils/storage.d.ts +111 -0
- package/dist/runtime/server/utils/storage.mjs +654 -0
- package/dist/runtime/server/utils/tenant.d.ts +44 -0
- package/dist/runtime/server/utils/tenant.mjs +285 -0
- package/dist/runtime/server/utils/totp.d.ts +33 -0
- package/dist/runtime/server/utils/totp.mjs +112 -0
- package/dist/runtime/server/utils/tracker.d.ts +72 -0
- package/dist/runtime/server/utils/tracker.mjs +139 -0
- package/dist/runtime/server/utils/turnstile.d.ts +17 -0
- package/dist/runtime/server/utils/turnstile.mjs +68 -0
- package/dist/runtime/server/utils/vapid.d.ts +35 -0
- package/dist/runtime/server/utils/vapid.mjs +211 -0
- package/dist/runtime/storage.d.ts +1 -0
- package/dist/runtime/storage.mjs +0 -0
- package/dist/runtime/types/ai.d.ts +68 -0
- package/dist/runtime/types/ai.mjs +0 -0
- package/dist/runtime/types/analytics.d.ts +30 -0
- package/dist/runtime/types/analytics.mjs +0 -0
- package/dist/runtime/types/auth-globals.d.ts +14 -0
- package/dist/runtime/types/auth.d.ts +153 -0
- package/dist/runtime/types/auth.mjs +0 -0
- package/dist/runtime/types/browser.d.ts +29 -0
- package/dist/runtime/types/browser.mjs +0 -0
- package/dist/runtime/types/d1.d.ts +44 -0
- package/dist/runtime/types/d1.mjs +0 -0
- package/dist/runtime/types/drizzle.d.ts +13 -0
- package/dist/runtime/types/drizzle.mjs +0 -0
- package/dist/runtime/types/durable-object.d.ts +51 -0
- package/dist/runtime/types/durable-object.mjs +0 -0
- package/dist/runtime/types/email.d.ts +66 -0
- package/dist/runtime/types/email.mjs +0 -0
- package/dist/runtime/types/hyperdrive.d.ts +18 -0
- package/dist/runtime/types/hyperdrive.mjs +0 -0
- package/dist/runtime/types/imports.d.ts +58 -0
- package/dist/runtime/types/index.d.ts +156 -0
- package/dist/runtime/types/index.mjs +13 -0
- package/dist/runtime/types/queue.d.ts +67 -0
- package/dist/runtime/types/queue.mjs +0 -0
- package/dist/runtime/types/r2.d.ts +108 -0
- package/dist/runtime/types/r2.mjs +0 -0
- package/dist/runtime/types/ratelimit.d.ts +21 -0
- package/dist/runtime/types/ratelimit.mjs +0 -0
- package/dist/runtime/types/vectorize.d.ts +74 -0
- package/dist/runtime/types/vectorize.mjs +0 -0
- package/dist/runtime/vectorize.d.ts +21 -0
- package/dist/runtime/vectorize.mjs +53 -0
- package/dist/types.d.ts +2750 -0
- package/dist/types.mjs +1 -0
- package/dist/utils/agents.d.ts +8 -0
- package/dist/utils/auth-schema.d.ts +11 -0
- package/dist/utils/bindings.d.ts +16 -0
- package/dist/utils/cms-schema.d.ts +1 -0
- package/dist/utils/cms-sources.d.ts +62 -0
- package/dist/utils/drizzle.d.ts +42 -0
- package/dist/utils/jobs.d.ts +8 -0
- package/dist/utils/local-db.d.ts +28 -0
- package/dist/utils/notifications-schema.d.ts +15 -0
- package/dist/utils/payments-schema.d.ts +11 -0
- package/dist/utils/pkg.d.ts +15 -0
- package/dist/utils/queue.d.ts +8 -0
- package/dist/utils/tenants-schema.d.ts +11 -0
- package/package.json +104 -0
|
@@ -0,0 +1,829 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onMounted, ref, watch } from "vue"
|
|
3
|
+
|
|
4
|
+
definePageMeta({ layout: false })
|
|
5
|
+
|
|
6
|
+
const route = useRoute()
|
|
7
|
+
|
|
8
|
+
const {
|
|
9
|
+
data: kvData,
|
|
10
|
+
status: kvStatus,
|
|
11
|
+
pending: kvPending,
|
|
12
|
+
execute: executeLoadKV,
|
|
13
|
+
} = useFetch<any>("/_qarpeo/api/kv/keys", {
|
|
14
|
+
query: { limit: 100 },
|
|
15
|
+
immediate: false,
|
|
16
|
+
lazy: true,
|
|
17
|
+
default: () => ({ keys: [] }),
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const kvLoading = computed(
|
|
21
|
+
() => kvPending.value || kvStatus.value === "idle" || kvStatus.value === "pending",
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
const kvKeys = computed(() => kvData.value?.keys || [])
|
|
25
|
+
const kvSearch = ref("")
|
|
26
|
+
const filterCategory = ref<"all" | "session" | "cache" | "ratelimit" | "other">("all")
|
|
27
|
+
|
|
28
|
+
const kvSelected = ref<any>(null)
|
|
29
|
+
const kvValueLoading = ref(false)
|
|
30
|
+
const kvEditing = ref(false)
|
|
31
|
+
const kvEditValue = ref("")
|
|
32
|
+
const kvEditTtl = ref("")
|
|
33
|
+
const kvDeleting = ref(false)
|
|
34
|
+
const showDeleteKeyModal = ref(false)
|
|
35
|
+
|
|
36
|
+
const viewMode = ref<"raw" | "pretty">("pretty")
|
|
37
|
+
const copiedKey = ref(false)
|
|
38
|
+
const copiedValue = ref(false)
|
|
39
|
+
|
|
40
|
+
const kvNewKey = ref("")
|
|
41
|
+
const kvNewValue = ref("")
|
|
42
|
+
const kvNewTtl = ref("")
|
|
43
|
+
const kvAdding = ref(false)
|
|
44
|
+
const showAddKeyModal = ref(false)
|
|
45
|
+
|
|
46
|
+
const isJsonValue = computed(() => {
|
|
47
|
+
const val = kvSelected.value?.value
|
|
48
|
+
if (!val || typeof val !== "string") return false
|
|
49
|
+
const trimmed = val.trim()
|
|
50
|
+
if (
|
|
51
|
+
!(
|
|
52
|
+
(trimmed.startsWith("{") && trimmed.endsWith("}")) ||
|
|
53
|
+
(trimmed.startsWith("[") && trimmed.endsWith("]"))
|
|
54
|
+
)
|
|
55
|
+
) {
|
|
56
|
+
return false
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
JSON.parse(trimmed)
|
|
60
|
+
return true
|
|
61
|
+
} catch {
|
|
62
|
+
return false
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
const displayValue = computed(() => {
|
|
67
|
+
const val = kvSelected.value?.value
|
|
68
|
+
if (!val) return "(empty)"
|
|
69
|
+
if (viewMode.value === "pretty" && isJsonValue.value) {
|
|
70
|
+
try {
|
|
71
|
+
return JSON.stringify(JSON.parse(val), null, 2)
|
|
72
|
+
} catch {
|
|
73
|
+
return val
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return val
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
function formatJsonInEdit() {
|
|
80
|
+
try {
|
|
81
|
+
const parsed = JSON.parse(kvEditValue.value)
|
|
82
|
+
kvEditValue.value = JSON.stringify(parsed, null, 2)
|
|
83
|
+
} catch {
|
|
84
|
+
// ignore
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// selectedKey is derived from / synced to the ?key= query param
|
|
89
|
+
const selectedKey = computed({
|
|
90
|
+
get: () => (route.query.key as string) || null,
|
|
91
|
+
set: (key: string | null) => {
|
|
92
|
+
navigateTo({ query: { ...route.query, key: key ?? undefined } })
|
|
93
|
+
},
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
const selectedKeyData = computed(
|
|
97
|
+
() => kvKeys.value.find((k) => k.name === selectedKey.value) || null,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
const isSlideoverOpen = computed({
|
|
101
|
+
get: () => Boolean(selectedKey.value),
|
|
102
|
+
set: (val: boolean) => {
|
|
103
|
+
if (!val) {
|
|
104
|
+
selectedKey.value = null
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
function fmtExpiry(exp?: number) {
|
|
110
|
+
if (!exp) return "Persistent"
|
|
111
|
+
const diff = exp - Math.floor(Date.now() / 1000)
|
|
112
|
+
if (diff < 0) return "Expired"
|
|
113
|
+
if (diff < 60) return `${diff}s left`
|
|
114
|
+
if (diff < 3600) return `${Math.floor(diff / 60)}m left`
|
|
115
|
+
if (diff < 86400) return `${Math.floor(diff / 3600)}h left`
|
|
116
|
+
return new Date(exp * 1000).toLocaleDateString()
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function fmtFullExpiry(exp?: number) {
|
|
120
|
+
if (!exp) return "Never (Persistent key)"
|
|
121
|
+
return new Date(exp * 1000).toLocaleString()
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function getKeyIcon(name: string): string {
|
|
125
|
+
if (name.startsWith("session:") || name.startsWith("auth:")) return "i-lucide-user-check"
|
|
126
|
+
if (name.startsWith("cache:") || name.startsWith("swr:")) return "i-lucide-database"
|
|
127
|
+
if (name.startsWith("ratelimit:") || name.startsWith("rl:")) return "i-lucide-shield-alert"
|
|
128
|
+
if (name.startsWith("domain:") || name.startsWith("tenant:")) return "i-lucide-globe"
|
|
129
|
+
return "i-lucide-key"
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function getKeyPrefix(name: string): string {
|
|
133
|
+
if (name.includes(":")) {
|
|
134
|
+
return name.split(":")[0]
|
|
135
|
+
}
|
|
136
|
+
return "default"
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const counts = computed(() => {
|
|
140
|
+
let session = 0
|
|
141
|
+
let cache = 0
|
|
142
|
+
let ratelimit = 0
|
|
143
|
+
let other = 0
|
|
144
|
+
|
|
145
|
+
for (const k of kvKeys.value) {
|
|
146
|
+
if (k.name.startsWith("session:") || k.name.startsWith("auth:")) {
|
|
147
|
+
session++
|
|
148
|
+
} else if (k.name.startsWith("cache:") || k.name.startsWith("swr:")) {
|
|
149
|
+
cache++
|
|
150
|
+
} else if (k.name.startsWith("ratelimit:") || k.name.startsWith("rl:")) {
|
|
151
|
+
ratelimit++
|
|
152
|
+
} else {
|
|
153
|
+
other++
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return { all: kvKeys.value.length, session, cache, ratelimit, other }
|
|
158
|
+
})
|
|
159
|
+
|
|
160
|
+
const filteredKeys = computed(() => {
|
|
161
|
+
let list = kvKeys.value
|
|
162
|
+
|
|
163
|
+
if (filterCategory.value === "session") {
|
|
164
|
+
list = list.filter((k) => k.name.startsWith("session:") || k.name.startsWith("auth:"))
|
|
165
|
+
} else if (filterCategory.value === "cache") {
|
|
166
|
+
list = list.filter((k) => k.name.startsWith("cache:") || k.name.startsWith("swr:"))
|
|
167
|
+
} else if (filterCategory.value === "ratelimit") {
|
|
168
|
+
list = list.filter((k) => k.name.startsWith("ratelimit:") || k.name.startsWith("rl:"))
|
|
169
|
+
} else if (filterCategory.value === "other") {
|
|
170
|
+
list = list.filter(
|
|
171
|
+
(k) =>
|
|
172
|
+
!k.name.startsWith("session:") &&
|
|
173
|
+
!k.name.startsWith("auth:") &&
|
|
174
|
+
!k.name.startsWith("cache:") &&
|
|
175
|
+
!k.name.startsWith("swr:") &&
|
|
176
|
+
!k.name.startsWith("ratelimit:") &&
|
|
177
|
+
!k.name.startsWith("rl:"),
|
|
178
|
+
)
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (kvSearch.value.trim()) {
|
|
182
|
+
const q = kvSearch.value.toLowerCase()
|
|
183
|
+
list = list.filter((k) => k.name.toLowerCase().includes(q))
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return list
|
|
187
|
+
})
|
|
188
|
+
|
|
189
|
+
// Re-fetch key value whenever URL ?key= param changes
|
|
190
|
+
watch(
|
|
191
|
+
selectedKey,
|
|
192
|
+
async (key) => {
|
|
193
|
+
if (key) {
|
|
194
|
+
await fetchKeyValue(key)
|
|
195
|
+
} else {
|
|
196
|
+
kvSelected.value = null
|
|
197
|
+
kvEditing.value = false
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
{ immediate: true },
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
async function loadKVKeys() {
|
|
204
|
+
await executeLoadKV()
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
async function fetchKeyValue(key: string) {
|
|
208
|
+
kvValueLoading.value = true
|
|
209
|
+
try {
|
|
210
|
+
const data = await $fetch<any>("/_qarpeo/api/kv/get", { query: { key } }).catch(() => null)
|
|
211
|
+
kvSelected.value = data ? { ...data, key } : { key, value: "(error loading value)" }
|
|
212
|
+
kvEditing.value = false
|
|
213
|
+
} finally {
|
|
214
|
+
kvValueLoading.value = false
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function selectKey(item: any) {
|
|
219
|
+
selectedKey.value = item.name
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function toggleKvEdit() {
|
|
223
|
+
kvEditing.value = !kvEditing.value
|
|
224
|
+
kvEditValue.value = kvSelected.value?.value || ""
|
|
225
|
+
const exp = selectedKeyData.value?.expiration || kvSelected.value?.expiration
|
|
226
|
+
if (exp) {
|
|
227
|
+
const diff = exp - Math.floor(Date.now() / 1000)
|
|
228
|
+
kvEditTtl.value = diff > 0 ? String(diff) : ""
|
|
229
|
+
} else {
|
|
230
|
+
kvEditTtl.value = ""
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
async function saveKVEdit() {
|
|
235
|
+
if (!kvSelected.value) return
|
|
236
|
+
await $fetch("/_qarpeo/api/kv/set", {
|
|
237
|
+
method: "POST",
|
|
238
|
+
body: {
|
|
239
|
+
key: kvSelected.value.key,
|
|
240
|
+
value: kvEditValue.value,
|
|
241
|
+
ttl: kvEditTtl.value ? parseInt(kvEditTtl.value, 10) : undefined,
|
|
242
|
+
},
|
|
243
|
+
})
|
|
244
|
+
kvSelected.value.value = kvEditValue.value
|
|
245
|
+
if (kvEditTtl.value) {
|
|
246
|
+
kvSelected.value.expiration = Math.floor(Date.now() / 1000) + parseInt(kvEditTtl.value, 10)
|
|
247
|
+
}
|
|
248
|
+
kvEditing.value = false
|
|
249
|
+
await loadKVKeys()
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
async function deleteKVKey(key: string) {
|
|
253
|
+
kvDeleting.value = true
|
|
254
|
+
try {
|
|
255
|
+
await $fetch("/_qarpeo/api/kv/delete", {
|
|
256
|
+
method: "POST",
|
|
257
|
+
body: { key },
|
|
258
|
+
})
|
|
259
|
+
showDeleteKeyModal.value = false
|
|
260
|
+
selectedKey.value = null
|
|
261
|
+
await loadKVKeys()
|
|
262
|
+
} finally {
|
|
263
|
+
kvDeleting.value = false
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
async function addKVKey() {
|
|
268
|
+
if (!kvNewKey.value || !kvNewValue.value) return
|
|
269
|
+
kvAdding.value = true
|
|
270
|
+
const addedKey = kvNewKey.value
|
|
271
|
+
try {
|
|
272
|
+
await $fetch("/_qarpeo/api/kv/set", {
|
|
273
|
+
method: "POST",
|
|
274
|
+
body: {
|
|
275
|
+
key: kvNewKey.value,
|
|
276
|
+
value: kvNewValue.value,
|
|
277
|
+
ttl: kvNewTtl.value ? parseInt(kvNewTtl.value, 10) : undefined,
|
|
278
|
+
},
|
|
279
|
+
})
|
|
280
|
+
kvNewKey.value = ""
|
|
281
|
+
kvNewValue.value = ""
|
|
282
|
+
kvNewTtl.value = ""
|
|
283
|
+
showAddKeyModal.value = false
|
|
284
|
+
await loadKVKeys()
|
|
285
|
+
selectedKey.value = addedKey
|
|
286
|
+
} finally {
|
|
287
|
+
kvAdding.value = false
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function copyKeyName(key?: string) {
|
|
292
|
+
if (!key) return
|
|
293
|
+
if (typeof navigator !== "undefined") {
|
|
294
|
+
navigator.clipboard?.writeText(key)
|
|
295
|
+
copiedKey.value = true
|
|
296
|
+
setTimeout(() => {
|
|
297
|
+
copiedKey.value = false
|
|
298
|
+
}, 1500)
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function copyValue() {
|
|
303
|
+
if (kvSelected.value?.value && typeof navigator !== "undefined") {
|
|
304
|
+
navigator.clipboard?.writeText(displayValue.value)
|
|
305
|
+
copiedValue.value = true
|
|
306
|
+
setTimeout(() => {
|
|
307
|
+
copiedValue.value = false
|
|
308
|
+
}, 1500)
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
onMounted(() => {
|
|
313
|
+
loadKVKeys()
|
|
314
|
+
})
|
|
315
|
+
</script>
|
|
316
|
+
|
|
317
|
+
<template>
|
|
318
|
+
<!-- ── Single Full-Width Panel with Media/Card Grid ─────────────────── -->
|
|
319
|
+
<UDashboardPanel id="devtools-kv">
|
|
320
|
+
<template #header>
|
|
321
|
+
<UDashboardNavbar>
|
|
322
|
+
<template #title>
|
|
323
|
+
<div class="flex items-center gap-2">
|
|
324
|
+
<UIcon name="i-lucide-zap" class="w-4 h-4 text-primary" />
|
|
325
|
+
<span class="font-bold text-sm text-highlighted">KV Store</span>
|
|
326
|
+
<UBadge size="xs" color="neutral" variant="subtle">Cloudflare KV</UBadge>
|
|
327
|
+
<UBadge size="xs" color="neutral" variant="subtle">
|
|
328
|
+
{{ filteredKeys.length }}
|
|
329
|
+
</UBadge>
|
|
330
|
+
</div>
|
|
331
|
+
</template>
|
|
332
|
+
|
|
333
|
+
<template #right>
|
|
334
|
+
<div class="flex items-center gap-1.5">
|
|
335
|
+
<UButton
|
|
336
|
+
icon="i-lucide-plus"
|
|
337
|
+
label="Add Key"
|
|
338
|
+
size="xs"
|
|
339
|
+
color="primary"
|
|
340
|
+
@click="showAddKeyModal = true"
|
|
341
|
+
/>
|
|
342
|
+
<UButton
|
|
343
|
+
icon="i-lucide-refresh-cw"
|
|
344
|
+
size="xs"
|
|
345
|
+
color="neutral"
|
|
346
|
+
variant="ghost"
|
|
347
|
+
title="Refresh keys"
|
|
348
|
+
:loading="kvLoading"
|
|
349
|
+
@click="loadKVKeys"
|
|
350
|
+
/>
|
|
351
|
+
</div>
|
|
352
|
+
</template>
|
|
353
|
+
</UDashboardNavbar>
|
|
354
|
+
|
|
355
|
+
<!-- Category Filter & Search Toolbar -->
|
|
356
|
+
<UDashboardToolbar>
|
|
357
|
+
<div class="flex items-center gap-1 bg-muted p-0.5 rounded border border-default">
|
|
358
|
+
<UButton
|
|
359
|
+
label="All"
|
|
360
|
+
size="xs"
|
|
361
|
+
:color="filterCategory === 'all' ? 'primary' : 'neutral'"
|
|
362
|
+
:variant="filterCategory === 'all' ? 'subtle' : 'ghost'"
|
|
363
|
+
@click="filterCategory = 'all'"
|
|
364
|
+
>
|
|
365
|
+
<template #trailing>
|
|
366
|
+
<UBadge
|
|
367
|
+
size="xs"
|
|
368
|
+
:color="filterCategory === 'all' ? 'primary' : 'neutral'"
|
|
369
|
+
variant="subtle"
|
|
370
|
+
>
|
|
371
|
+
{{ counts.all }}
|
|
372
|
+
</UBadge>
|
|
373
|
+
</template>
|
|
374
|
+
</UButton>
|
|
375
|
+
|
|
376
|
+
<UButton
|
|
377
|
+
label="Sessions"
|
|
378
|
+
icon="i-lucide-user-check"
|
|
379
|
+
size="xs"
|
|
380
|
+
:color="filterCategory === 'session' ? 'primary' : 'neutral'"
|
|
381
|
+
:variant="filterCategory === 'session' ? 'subtle' : 'ghost'"
|
|
382
|
+
@click="filterCategory = 'session'"
|
|
383
|
+
>
|
|
384
|
+
<template #trailing>
|
|
385
|
+
<UBadge
|
|
386
|
+
size="xs"
|
|
387
|
+
:color="filterCategory === 'session' ? 'primary' : 'neutral'"
|
|
388
|
+
variant="subtle"
|
|
389
|
+
>
|
|
390
|
+
{{ counts.session }}
|
|
391
|
+
</UBadge>
|
|
392
|
+
</template>
|
|
393
|
+
</UButton>
|
|
394
|
+
|
|
395
|
+
<UButton
|
|
396
|
+
label="Cache"
|
|
397
|
+
icon="i-lucide-database"
|
|
398
|
+
size="xs"
|
|
399
|
+
:color="filterCategory === 'cache' ? 'primary' : 'neutral'"
|
|
400
|
+
:variant="filterCategory === 'cache' ? 'subtle' : 'ghost'"
|
|
401
|
+
@click="filterCategory = 'cache'"
|
|
402
|
+
>
|
|
403
|
+
<template #trailing>
|
|
404
|
+
<UBadge
|
|
405
|
+
size="xs"
|
|
406
|
+
:color="filterCategory === 'cache' ? 'primary' : 'neutral'"
|
|
407
|
+
variant="subtle"
|
|
408
|
+
>
|
|
409
|
+
{{ counts.cache }}
|
|
410
|
+
</UBadge>
|
|
411
|
+
</template>
|
|
412
|
+
</UButton>
|
|
413
|
+
|
|
414
|
+
<UButton
|
|
415
|
+
label="Rate Limit"
|
|
416
|
+
icon="i-lucide-shield-alert"
|
|
417
|
+
size="xs"
|
|
418
|
+
:color="filterCategory === 'ratelimit' ? 'primary' : 'neutral'"
|
|
419
|
+
:variant="filterCategory === 'ratelimit' ? 'subtle' : 'ghost'"
|
|
420
|
+
@click="filterCategory = 'ratelimit'"
|
|
421
|
+
>
|
|
422
|
+
<template #trailing>
|
|
423
|
+
<UBadge
|
|
424
|
+
size="xs"
|
|
425
|
+
:color="filterCategory === 'ratelimit' ? 'primary' : 'neutral'"
|
|
426
|
+
variant="subtle"
|
|
427
|
+
>
|
|
428
|
+
{{ counts.ratelimit }}
|
|
429
|
+
</UBadge>
|
|
430
|
+
</template>
|
|
431
|
+
</UButton>
|
|
432
|
+
|
|
433
|
+
<UButton
|
|
434
|
+
label="Other"
|
|
435
|
+
size="xs"
|
|
436
|
+
:color="filterCategory === 'other' ? 'primary' : 'neutral'"
|
|
437
|
+
:variant="filterCategory === 'other' ? 'subtle' : 'ghost'"
|
|
438
|
+
@click="filterCategory = 'other'"
|
|
439
|
+
>
|
|
440
|
+
<template #trailing>
|
|
441
|
+
<UBadge
|
|
442
|
+
size="xs"
|
|
443
|
+
:color="filterCategory === 'other' ? 'primary' : 'neutral'"
|
|
444
|
+
variant="subtle"
|
|
445
|
+
>
|
|
446
|
+
{{ counts.other }}
|
|
447
|
+
</UBadge>
|
|
448
|
+
</template>
|
|
449
|
+
</UButton>
|
|
450
|
+
</div>
|
|
451
|
+
|
|
452
|
+
<!-- Search Input -->
|
|
453
|
+
<div class="flex items-center gap-2 max-w-xs flex-1">
|
|
454
|
+
<UInput
|
|
455
|
+
v-model="kvSearch"
|
|
456
|
+
icon="i-lucide-search"
|
|
457
|
+
placeholder="Search keys…"
|
|
458
|
+
class="w-full"
|
|
459
|
+
/>
|
|
460
|
+
</div>
|
|
461
|
+
</UDashboardToolbar>
|
|
462
|
+
</template>
|
|
463
|
+
|
|
464
|
+
<template #body>
|
|
465
|
+
<div class="space-y-4">
|
|
466
|
+
<!-- Loading Skeleton Grid -->
|
|
467
|
+
<div
|
|
468
|
+
v-if="kvLoading"
|
|
469
|
+
class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-3.5"
|
|
470
|
+
>
|
|
471
|
+
<div
|
|
472
|
+
v-for="i in 10"
|
|
473
|
+
:key="i"
|
|
474
|
+
class="bg-elevated/40 border border-default rounded-xl p-3.5 flex flex-col justify-between h-28 animate-pulse"
|
|
475
|
+
>
|
|
476
|
+
<div class="flex items-start justify-between gap-2">
|
|
477
|
+
<div class="flex items-center gap-2">
|
|
478
|
+
<div class="w-8 h-8 rounded-lg bg-muted"></div>
|
|
479
|
+
<div class="h-4 w-12 rounded bg-muted"></div>
|
|
480
|
+
</div>
|
|
481
|
+
<div class="h-4 w-14 rounded bg-muted"></div>
|
|
482
|
+
</div>
|
|
483
|
+
<div class="h-3 w-3/4 rounded bg-muted"></div>
|
|
484
|
+
<div class="h-2 w-1/2 rounded bg-muted"></div>
|
|
485
|
+
</div>
|
|
486
|
+
</div>
|
|
487
|
+
|
|
488
|
+
<!-- Interactive KV Cards Grid -->
|
|
489
|
+
<div
|
|
490
|
+
v-else-if="filteredKeys.length"
|
|
491
|
+
class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-3.5"
|
|
492
|
+
>
|
|
493
|
+
<UCard v-for="item in filteredKeys" :key="item.name" @click="selectKey(item)">
|
|
494
|
+
<!-- Card Header: Icon + Namespace Tag + TTL Badge -->
|
|
495
|
+
<div class="flex items-start justify-between gap-2 mb-2">
|
|
496
|
+
<div class="flex items-center gap-2 min-w-0">
|
|
497
|
+
<div
|
|
498
|
+
class="w-8 h-8 rounded-lg bg-primary/10 border border-primary/20 flex items-center justify-center shrink-0 text-primary group-hover:scale-105 transition-transform"
|
|
499
|
+
>
|
|
500
|
+
<UIcon :name="getKeyIcon(item.name)" class="w-4 h-4" />
|
|
501
|
+
</div>
|
|
502
|
+
<div class="min-w-0">
|
|
503
|
+
<UBadge size="xs" color="neutral" variant="subtle" class="font-mono text-[10px]">
|
|
504
|
+
{{ getKeyPrefix(item.name) }}
|
|
505
|
+
</UBadge>
|
|
506
|
+
</div>
|
|
507
|
+
</div>
|
|
508
|
+
|
|
509
|
+
<UBadge
|
|
510
|
+
size="xs"
|
|
511
|
+
:color="item.expiration ? 'warning' : 'neutral'"
|
|
512
|
+
variant="subtle"
|
|
513
|
+
class="font-mono text-[10px] shrink-0"
|
|
514
|
+
>
|
|
515
|
+
{{ fmtExpiry(item.expiration) }}
|
|
516
|
+
</UBadge>
|
|
517
|
+
</div>
|
|
518
|
+
|
|
519
|
+
<!-- Card Body: Key Name -->
|
|
520
|
+
<div class="my-1.5 min-w-0">
|
|
521
|
+
<div
|
|
522
|
+
class="font-mono text-xs font-bold text-highlighted group-hover:text-primary transition-colors truncate"
|
|
523
|
+
:title="item.name"
|
|
524
|
+
>
|
|
525
|
+
{{ item.name }}
|
|
526
|
+
</div>
|
|
527
|
+
</div>
|
|
528
|
+
</UCard>
|
|
529
|
+
</div>
|
|
530
|
+
|
|
531
|
+
<!-- Empty State -->
|
|
532
|
+
<div v-else class="flex flex-col items-center justify-center py-20 text-center space-y-3">
|
|
533
|
+
<div
|
|
534
|
+
class="w-12 h-12 rounded-full bg-primary/10 border border-primary/20 flex items-center justify-center text-primary"
|
|
535
|
+
>
|
|
536
|
+
<UIcon name="i-lucide-zap" class="w-6 h-6" />
|
|
537
|
+
</div>
|
|
538
|
+
<div class="font-bold text-sm text-highlighted">No KV keys found</div>
|
|
539
|
+
<p class="text-xs text-muted max-w-sm">
|
|
540
|
+
Store ultra-low latency global key-value data directly on Cloudflare Edge with optional
|
|
541
|
+
TTL expiration.
|
|
542
|
+
</p>
|
|
543
|
+
<UButton
|
|
544
|
+
label="Add First Key"
|
|
545
|
+
icon="i-lucide-plus"
|
|
546
|
+
size="sm"
|
|
547
|
+
color="primary"
|
|
548
|
+
@click="showAddKeyModal = true"
|
|
549
|
+
/>
|
|
550
|
+
</div>
|
|
551
|
+
</div>
|
|
552
|
+
</template>
|
|
553
|
+
</UDashboardPanel>
|
|
554
|
+
|
|
555
|
+
<!-- ── Right Side Slideover for Key Value Inspector & Editor ──────────── -->
|
|
556
|
+
<USlideover v-model:open="isSlideoverOpen" side="right" :title="selectedKey || undefined">
|
|
557
|
+
<template #title>
|
|
558
|
+
<div class="flex items-center gap-2 min-w-0 pr-4">
|
|
559
|
+
<UIcon :name="getKeyIcon(selectedKey || '')" class="w-4 h-4 text-primary shrink-0" />
|
|
560
|
+
<span
|
|
561
|
+
class="font-mono font-bold text-sm text-highlighted truncate"
|
|
562
|
+
:title="selectedKey || ''"
|
|
563
|
+
>
|
|
564
|
+
{{ selectedKey }}
|
|
565
|
+
</span>
|
|
566
|
+
</div>
|
|
567
|
+
</template>
|
|
568
|
+
|
|
569
|
+
<template #body>
|
|
570
|
+
<div v-if="selectedKey" class="space-y-6">
|
|
571
|
+
<!-- Metadata Info Card -->
|
|
572
|
+
<div class="space-y-3">
|
|
573
|
+
<div class="text-xs font-semibold uppercase tracking-wider text-muted">Key Details</div>
|
|
574
|
+
|
|
575
|
+
<div
|
|
576
|
+
class="divide-y divide-default rounded-lg border border-default bg-elevated/40 text-xs font-mono"
|
|
577
|
+
>
|
|
578
|
+
<div class="flex items-center justify-between p-3">
|
|
579
|
+
<span class="text-muted">Key Name</span>
|
|
580
|
+
<div class="flex items-center gap-1.5 min-w-0 ml-2">
|
|
581
|
+
<span class="text-highlighted font-bold truncate">{{ selectedKey }}</span>
|
|
582
|
+
<UButton
|
|
583
|
+
type="button"
|
|
584
|
+
icon="i-lucide-copy"
|
|
585
|
+
color="neutral"
|
|
586
|
+
variant="ghost"
|
|
587
|
+
size="xs"
|
|
588
|
+
title="Copy key name"
|
|
589
|
+
@click="copyKeyName(selectedKey)"
|
|
590
|
+
/>
|
|
591
|
+
</div>
|
|
592
|
+
</div>
|
|
593
|
+
|
|
594
|
+
<div class="flex items-center justify-between p-3">
|
|
595
|
+
<span class="text-muted">Namespace Prefix</span>
|
|
596
|
+
<span class="text-default font-semibold">{{ getKeyPrefix(selectedKey) }}</span>
|
|
597
|
+
</div>
|
|
598
|
+
|
|
599
|
+
<div class="flex items-center justify-between p-3">
|
|
600
|
+
<span class="text-muted">Expiration</span>
|
|
601
|
+
<span class="text-default">{{
|
|
602
|
+
fmtFullExpiry(selectedKeyData?.expiration || kvSelected?.expiration)
|
|
603
|
+
}}</span>
|
|
604
|
+
</div>
|
|
605
|
+
</div>
|
|
606
|
+
</div>
|
|
607
|
+
|
|
608
|
+
<!-- Value Section (View / Edit Mode) -->
|
|
609
|
+
<div class="space-y-3">
|
|
610
|
+
<div class="flex items-center justify-between">
|
|
611
|
+
<span
|
|
612
|
+
class="text-xs font-semibold uppercase tracking-wider text-muted flex items-center gap-1.5"
|
|
613
|
+
>
|
|
614
|
+
<UIcon name="i-lucide-code" class="w-3.5 h-3.5 text-primary" />
|
|
615
|
+
Stored Value
|
|
616
|
+
</span>
|
|
617
|
+
<div class="flex items-center gap-1.5">
|
|
618
|
+
<!-- JSON Format Mode Toggle (only when value is JSON) -->
|
|
619
|
+
<div
|
|
620
|
+
v-if="!kvEditing && isJsonValue"
|
|
621
|
+
class="flex items-center bg-muted/60 rounded p-0.5 border border-default text-[10px]"
|
|
622
|
+
>
|
|
623
|
+
<UButton
|
|
624
|
+
label="Pretty JSON"
|
|
625
|
+
size="xs"
|
|
626
|
+
:color="viewMode === 'pretty' ? 'primary' : 'neutral'"
|
|
627
|
+
:variant="viewMode === 'pretty' ? 'subtle' : 'ghost'"
|
|
628
|
+
@click="viewMode = 'pretty'"
|
|
629
|
+
/>
|
|
630
|
+
<UButton
|
|
631
|
+
label="Raw"
|
|
632
|
+
size="xs"
|
|
633
|
+
:color="viewMode === 'raw' ? 'primary' : 'neutral'"
|
|
634
|
+
:variant="viewMode === 'raw' ? 'subtle' : 'ghost'"
|
|
635
|
+
@click="viewMode = 'raw'"
|
|
636
|
+
/>
|
|
637
|
+
</div>
|
|
638
|
+
|
|
639
|
+
<UButton
|
|
640
|
+
v-if="!kvEditing"
|
|
641
|
+
:icon="copiedValue ? 'i-lucide-check' : 'i-lucide-copy'"
|
|
642
|
+
size="xs"
|
|
643
|
+
:color="copiedValue ? 'success' : 'neutral'"
|
|
644
|
+
variant="ghost"
|
|
645
|
+
:title="copiedValue ? 'Copied to clipboard!' : 'Copy value'"
|
|
646
|
+
@click="copyValue"
|
|
647
|
+
/>
|
|
648
|
+
<UButton
|
|
649
|
+
:label="kvEditing ? 'Cancel Edit' : 'Edit Value'"
|
|
650
|
+
:icon="kvEditing ? 'i-lucide-x' : 'i-lucide-edit'"
|
|
651
|
+
size="xs"
|
|
652
|
+
color="neutral"
|
|
653
|
+
variant="subtle"
|
|
654
|
+
@click="toggleKvEdit"
|
|
655
|
+
/>
|
|
656
|
+
</div>
|
|
657
|
+
</div>
|
|
658
|
+
|
|
659
|
+
<!-- Loading state -->
|
|
660
|
+
<div
|
|
661
|
+
v-if="kvValueLoading"
|
|
662
|
+
class="bg-muted/30 border border-default rounded-xl p-8 text-center text-xs text-muted font-mono"
|
|
663
|
+
>
|
|
664
|
+
<UIcon name="i-lucide-loader" class="w-5 h-5 animate-spin mx-auto mb-2 text-primary" />
|
|
665
|
+
Loading value from KV store…
|
|
666
|
+
</div>
|
|
667
|
+
|
|
668
|
+
<!-- Edit Mode -->
|
|
669
|
+
<div v-else-if="kvEditing" class="space-y-3">
|
|
670
|
+
<div class="flex items-center justify-between text-xs text-muted">
|
|
671
|
+
<span>Value editor</span>
|
|
672
|
+
<UButton
|
|
673
|
+
icon="i-lucide-sparkles"
|
|
674
|
+
label="Format JSON"
|
|
675
|
+
size="xs"
|
|
676
|
+
color="primary"
|
|
677
|
+
variant="ghost"
|
|
678
|
+
class="cursor-pointer"
|
|
679
|
+
@click="formatJsonInEdit"
|
|
680
|
+
/>
|
|
681
|
+
</div>
|
|
682
|
+
<UTextarea
|
|
683
|
+
v-model="kvEditValue"
|
|
684
|
+
class="font-mono text-xs w-full"
|
|
685
|
+
:rows="12"
|
|
686
|
+
placeholder="Enter new value…"
|
|
687
|
+
/>
|
|
688
|
+
|
|
689
|
+
<!-- TTL Field in Edit Mode -->
|
|
690
|
+
<div>
|
|
691
|
+
<div class="text-[11px] text-muted mb-1 flex items-center gap-1">
|
|
692
|
+
<UIcon name="i-lucide-clock" class="w-3 h-3 text-primary" />
|
|
693
|
+
TTL (Seconds from now, leave blank to keep unchanged)
|
|
694
|
+
</div>
|
|
695
|
+
<UInput
|
|
696
|
+
v-model="kvEditTtl"
|
|
697
|
+
type="number"
|
|
698
|
+
placeholder="e.g. 86400 (24h)"
|
|
699
|
+
size="xs"
|
|
700
|
+
class="font-mono"
|
|
701
|
+
/>
|
|
702
|
+
</div>
|
|
703
|
+
|
|
704
|
+
<div class="flex justify-end gap-2 pt-2">
|
|
705
|
+
<UButton
|
|
706
|
+
label="Cancel"
|
|
707
|
+
color="neutral"
|
|
708
|
+
variant="ghost"
|
|
709
|
+
size="xs"
|
|
710
|
+
@click="toggleKvEdit"
|
|
711
|
+
/>
|
|
712
|
+
<UButton
|
|
713
|
+
label="Save Changes"
|
|
714
|
+
size="xs"
|
|
715
|
+
color="primary"
|
|
716
|
+
icon="i-lucide-check"
|
|
717
|
+
@click="saveKVEdit"
|
|
718
|
+
/>
|
|
719
|
+
</div>
|
|
720
|
+
</div>
|
|
721
|
+
|
|
722
|
+
<!-- View Mode -->
|
|
723
|
+
<div
|
|
724
|
+
v-else
|
|
725
|
+
class="bg-muted/30 border border-default rounded-xl p-4 overflow-auto max-h-[380px]"
|
|
726
|
+
>
|
|
727
|
+
<pre class="font-mono text-xs text-default whitespace-pre-wrap break-all">{{
|
|
728
|
+
displayValue
|
|
729
|
+
}}</pre>
|
|
730
|
+
</div>
|
|
731
|
+
</div>
|
|
732
|
+
</div>
|
|
733
|
+
</template>
|
|
734
|
+
|
|
735
|
+
<template #footer>
|
|
736
|
+
<div v-if="selectedKey" class="flex items-center justify-between w-full gap-2">
|
|
737
|
+
<UButton
|
|
738
|
+
:label="copiedKey ? 'Copied!' : 'Copy Key'"
|
|
739
|
+
:icon="copiedKey ? 'i-lucide-check' : 'i-lucide-copy'"
|
|
740
|
+
size="xs"
|
|
741
|
+
:color="copiedKey ? 'success' : 'neutral'"
|
|
742
|
+
variant="subtle"
|
|
743
|
+
@click="copyKeyName(selectedKey)"
|
|
744
|
+
/>
|
|
745
|
+
<UButton
|
|
746
|
+
label="Delete Key"
|
|
747
|
+
icon="i-lucide-trash"
|
|
748
|
+
size="xs"
|
|
749
|
+
color="error"
|
|
750
|
+
variant="subtle"
|
|
751
|
+
@click="showDeleteKeyModal = true"
|
|
752
|
+
/>
|
|
753
|
+
</div>
|
|
754
|
+
</template>
|
|
755
|
+
</USlideover>
|
|
756
|
+
|
|
757
|
+
<!-- Delete Key Confirmation Modal -->
|
|
758
|
+
<UModal v-model:open="showDeleteKeyModal" title="Delete KV Key">
|
|
759
|
+
<template #body>
|
|
760
|
+
<div class="space-y-3">
|
|
761
|
+
<p class="text-xs text-default">
|
|
762
|
+
Are you sure you want to delete
|
|
763
|
+
<span class="font-mono font-bold text-highlighted">{{ selectedKey }}</span
|
|
764
|
+
>?
|
|
765
|
+
</p>
|
|
766
|
+
<p class="text-xs text-muted">
|
|
767
|
+
This key will be permanently removed from the Cloudflare KV namespace. Any clients or
|
|
768
|
+
sessions relying on it will receive null.
|
|
769
|
+
</p>
|
|
770
|
+
</div>
|
|
771
|
+
</template>
|
|
772
|
+
<template #footer>
|
|
773
|
+
<div class="flex justify-end gap-2">
|
|
774
|
+
<UButton
|
|
775
|
+
label="Cancel"
|
|
776
|
+
color="neutral"
|
|
777
|
+
variant="ghost"
|
|
778
|
+
size="xs"
|
|
779
|
+
@click="showDeleteKeyModal = false"
|
|
780
|
+
/>
|
|
781
|
+
<UButton
|
|
782
|
+
label="Confirm Delete"
|
|
783
|
+
color="error"
|
|
784
|
+
size="xs"
|
|
785
|
+
icon="i-lucide-trash"
|
|
786
|
+
:loading="kvDeleting"
|
|
787
|
+
@click="selectedKey && deleteKVKey(selectedKey)"
|
|
788
|
+
/>
|
|
789
|
+
</div>
|
|
790
|
+
</template>
|
|
791
|
+
</UModal>
|
|
792
|
+
|
|
793
|
+
<!-- Add Key Modal -->
|
|
794
|
+
<UModal v-model:open="showAddKeyModal" title="Add KV Key">
|
|
795
|
+
<template #body>
|
|
796
|
+
<div class="space-y-3">
|
|
797
|
+
<div>
|
|
798
|
+
<div class="text-xs text-muted mb-1">Key Name</div>
|
|
799
|
+
<UInput v-model="kvNewKey" placeholder="e.g. session:user_123" class="font-mono" />
|
|
800
|
+
</div>
|
|
801
|
+
<div>
|
|
802
|
+
<div class="text-xs text-muted mb-1">Value (String or JSON)</div>
|
|
803
|
+
<UTextarea
|
|
804
|
+
v-model="kvNewValue"
|
|
805
|
+
placeholder="{ ... }"
|
|
806
|
+
:rows="4"
|
|
807
|
+
class="font-mono text-xs"
|
|
808
|
+
/>
|
|
809
|
+
</div>
|
|
810
|
+
<div>
|
|
811
|
+
<div class="text-xs text-muted mb-1">TTL (Seconds, optional)</div>
|
|
812
|
+
<UInput v-model="kvNewTtl" type="number" placeholder="86400" />
|
|
813
|
+
</div>
|
|
814
|
+
</div>
|
|
815
|
+
</template>
|
|
816
|
+
<template #footer>
|
|
817
|
+
<div class="flex justify-end gap-2">
|
|
818
|
+
<UButton label="Cancel" color="neutral" variant="ghost" @click="showAddKeyModal = false" />
|
|
819
|
+
<UButton
|
|
820
|
+
label="Create Key"
|
|
821
|
+
color="primary"
|
|
822
|
+
:loading="kvAdding"
|
|
823
|
+
:disabled="!kvNewKey || !kvNewValue"
|
|
824
|
+
@click="addKVKey"
|
|
825
|
+
/>
|
|
826
|
+
</div>
|
|
827
|
+
</template>
|
|
828
|
+
</UModal>
|
|
829
|
+
</template>
|