refactor: update component declarations and remove unused imports

chore: bump dependencies to latest versions for improved stability

fix: update API base URL for client and httpClientAdapter

refactor: reorganize imports in index.tsx for better readability

chore: add observability configuration in wrangler.jsonc
This commit is contained in:
2026-01-20 18:49:17 +07:00
parent 21950753ab
commit 1fe77f24dc
7 changed files with 114 additions and 100 deletions

View File

@@ -681,6 +681,6 @@ export class Api<
export const client = new Api({
baseUrl: 'r',
// baseUrl: 'https://interesting-atmosphere-encryption-value.trycloudflare.com',
// baseUrl: 'https://cheapest-representations-corporations-related.trycloudflare.com',
customFetch
});

View File

@@ -10,8 +10,7 @@ export const customFetch = async (url: string, options: RequestInit) => {
Object.assign(options, {
headers: c.req.header()
});
const res = await fetch(["https://interesting-atmosphere-encryption-value.trycloudflare.com", url.replace(/r\//, '')].join('/'), options);
console.log('Fetching URL:', res);
const res = await fetch(["https://cheapest-representations-corporations-related.trycloudflare.com", url.replace(/r\//, '')].join('/'), options);
res.headers.forEach((value, key) => {
c.header(key, value);
});

View File

@@ -1,16 +1,14 @@
import { Hono } from 'hono'
import { createApp } from './main';
import { renderToWebStream } from 'vue/server-renderer';
import { streamText } from 'hono/streaming';
import { renderSSRHead } from '@unhead/vue/server';
import { buildBootstrapScript, getHrefFromManifest, loadCssByModules } from './lib/manifest';
import { Hono } from 'hono';
import { contextStorage } from 'hono/context-storage';
import { cors } from "hono/cors";
import { endpoint, firebaseAuthMiddleware, rpcServer } from './api/rpc';
import { streamText } from 'hono/streaming';
import isMobile from 'is-mobile';
import { useAuthStore } from './stores/auth';
import { cssContent } from './lib/primeCssContent';
import { renderToWebStream } from 'vue/server-renderer';
import { buildBootstrapScript } from './lib/manifest';
import { styleTags } from './lib/primePassthrough';
import { createApp } from './main';
import { useAuthStore } from './stores/auth';
// @ts-ignore
import Base from '@primevue/core/base';
const app = new Hono()
@@ -32,12 +30,15 @@ app.use(cors(), async (c, next) => {
return next()
}
const url = new URL(c.req.url)
url.host = 'interesting-atmosphere-encryption-value.trycloudflare.com'
url.host = 'cheapest-representations-corporations-related.trycloudflare.com'
url.protocol = 'https:'
url.pathname = path.replace(/^\/r/, '') || '/'
url.port = ''
const req = new Request(url.toString(), c.req.raw)
return fetch(req)
const req = new Request(url.toString(), c.req.raw);
const res = await fetch(req).catch(err => console.error('Error during proxy request: ', err.message));
// return c.body(res, res.status, res.headers);
console.log('Proxy request to: ', url.toString(), ' response: ', res?.status, JSON.stringify(c.req.header(), null, 2));
return res
});
app.get("/.well-known/*", (c) => {
return c.json({ ok: true });