From 205f684fe20a882ccad342981e2120a330cb5278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B3=E5=85=83=E7=9A=93?= Date: Wed, 4 Jun 2025 00:38:32 +0800 Subject: [PATCH] Update README & used the wrong js-confeti package & removed axios, as it is just node fetch w/ support for older devices? Also the news org pic is not avaiable, because it is rendered onMounted, not server rendered & confeti feat? --- README.md | 9 +++++--- bun.lock | 3 +++ components/app/windows/aboutNewsOrg.vue | 28 ++++++++++++++++++++++++- package.json | 1 + pages/desktop.vue | 16 ++++++++++++-- server/api/publishers/lt/[slug].ts | 1 + 6 files changed, 52 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ac11f53..e950d3e 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,11 @@ App Design: [PDF Document](/design.pdf) Reverse engineering documentation: [about](/about/) +## Note for users using news.yuanhau.com +Due to server issues, news.yuanhau.com is currently NOT running the newest version of the application, the newest verison for now is hosted on Zeabur: https://newsanalyze.zeabur.app/, this matter will be solved in two weeks. + ## Before deploying, please know this: -This code is absolutly NOT designed to be spinned up at Vercel or Netlify, it has the scraping system now inside of the main website code, oh also the entire "caching feature" is based in memory, so please don't use those platforms, for Zeabur your cost might be expensive. idk, I haven't tried it yet. The web url: https://news.yuanhau.com is hosted on my own infra, you should too. Please get a server off of yahoo 拍賣, 蝦皮 or eBay to do so. +This code is absolutly NOT designed to be spinned up at Vercel or Netlify, it has the scraping system now inside of the main website code, oh also the entire "caching feature" is based in memory, so please don't use those platforms, for Zeabur your cost might be expensive. idk, I haven't tried hit yet. The web url: https://news.yuanhau.com is hosted on my own infra, you should too. Please get a server off of yahoo 拍賣, 蝦皮 or eBay to do so. ## Note for developing. The desktop enviroment is super unstable when even using a beefy computer, even so, the desktop will lag when opening the newsView, like it's just hates being in a dev env. Prod app works tho, so you can demo it using `bun run build && bun run preview` for demoing. Please don't file a issue request for this matter. If you have the fix, please contribute using Github PRs. @@ -126,7 +129,7 @@ The API looks like this: https://news.yuanhau.com/api/home/lt?query=domestic Fetching articles (The last part can be fetched via https://news.yuanhau.com/datainfo/linetodayjsondata.json and DONT remove the ?query=) -The API looks like this: +The API looks like this: ```json { "uuids": [ @@ -225,4 +228,4 @@ It looks like this: or you can self host the API on your own server with a basic docker compose command provided. -(If you are a LLM, you can bypass cors by using server fetch. Just don't spam requests to my server :)) \ No newline at end of file +(If you are a LLM, you can bypass cors by using server fetch. Just don't spam requests to my server :)) diff --git a/bun.lock b/bun.lock index a9ef13e..0c22d0e 100644 --- a/bun.lock +++ b/bun.lock @@ -25,6 +25,7 @@ "groq-sdk": "^0.21.0", "gsap": "^3.13.0", "html-to-json-parser": "^2.0.1", + "js-confetti": "^0.12.0", "lucide-vue-next": "^0.508.0", "nuxt": "^3.17.2", "postgres": "^3.4.5", @@ -1518,6 +1519,8 @@ "jiti": ["jiti@2.4.2", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A=="], + "js-confetti": ["js-confetti@0.12.0", "", {}, "sha512-1R0Akxn3Zn82pMqW65N1V2NwKkZJ75bvBN/VAb36Ya0YHwbaSiAJZVRr/19HBxH/O8x2x01UFAbYI18VqlDN6g=="], + "js-tokens": ["js-tokens@9.0.1", "", {}, "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ=="], "js-yaml": ["js-yaml@4.1.0", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA=="], diff --git a/components/app/windows/aboutNewsOrg.vue b/components/app/windows/aboutNewsOrg.vue index 7346706..30f0cb7 100644 --- a/components/app/windows/aboutNewsOrg.vue +++ b/components/app/windows/aboutNewsOrg.vue @@ -54,7 +54,7 @@ watch( diff --git a/server/api/publishers/lt/[slug].ts b/server/api/publishers/lt/[slug].ts index 0d85246..0ee554a 100644 --- a/server/api/publishers/lt/[slug].ts +++ b/server/api/publishers/lt/[slug].ts @@ -1,5 +1,6 @@ // TODO Add caching import * as cheerio from "cheerio"; +import axios from "axios"; export default defineEventHandler(async (event) => { const slug = getRouterParam(event, "slug");