Skip to content

chore: push to prod#524

Merged
dragon-fish merged 139 commits intomasterfrom
dev
Mar 24, 2026
Merged

chore: push to prod#524
dragon-fish merged 139 commits intomasterfrom
dev

Conversation

@dragon-fish
Copy link
Copy Markdown
Member

No description provided.

dragon-fish and others added 30 commits January 7, 2026 18:23
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot and others added 23 commits March 10, 2026 09:50
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…nt-side

- Replace composables/states.ts with dedicated Pinia-style stores (session, artwork, home, ranking, search, following, user-artworks, user-profile)
- Create src/api/pixiv-client.ts as centralized API client with built-in pximg URL replacement
- Move pximg URL rewriting from server-side (api/utils.ts) to client-side (src/utils/pximg.ts)
- Remove deprecated utility files (artworkActions.ts, userActions.ts, siteCache.ts)
- Add .claude to .gitignore
- Add DEV_NOTES/PIXIV_WEB_API.md for API reference

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
BREAKING CHANGE: Complete framework migration from Vue 3 SPA + Vite +
Vercel serverless functions to Nuxt 4 with Nitro server routes.

- Replace Vercel serverless functions (api/) with Nitro server routes
  and middleware (server/routes/, server/middleware/)
- Adopt Nuxt 4 directory structure: app/ for frontend, server/ for
  backend, shared/ for cross-context types
- Replace Vue Router manual config with Nuxt pages/ convention and
  route middleware for aliases/redirects
- Integrate nuxtjs-naive-ui module with unplugin auto-import
- Add @vueuse/nuxt, @pinia/nuxt, @nuxtjs/i18n modules
- Convert pximg/API proxy from Vercel rewrites to Nitro middleware
- Disable SSR (ssr: false) for Naive UI compatibility
- Reorganize components with Nuxt-compatible naming convention
  (Artwork/, Comment/, SideNav/ with path dedup)
- Rename LazyLoad → DeferLoad to avoid Nuxt reserved prefix
- Fix v-for/v-if anti-pattern in ArtworkList causing __vnode errors
- Replace defineAsyncComponent with direct imports for SiteHeader
- Use onClickOutside (VueUse) for dropdown menu
- Add page transition animations via NuxtPage transition prop
- Use useHead for per-page body attributes (home navbar transparency)
- Vendor-independent: deployable with `node .output/server/index.mjs`

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use `type` import for ZipDownloaderOptions to prevent tree-shaking
- Unwrap Pixiv API response envelope (data.body) in fetchMeta
- Apply replacePximgInObject to ugoira meta URLs for proxy routing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use useEventListener (VueUse) for scroll handler in SiteHeader to
  prevent memory leak on unmount
- Read UA blacklist from useRuntimeConfig() in pixiv-proxy middleware,
  falling back to process.env.UA_BLACKLIST for compatibility
- Remove duplicate app/components/userData.ts, unify all callers to
  import from app/composables/userData.ts
- Map legacy VITE_* and UA_BLACKLIST env vars to Nuxt runtimeConfig
  in nuxt.config.ts for backward compatibility

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @dragon-fish, your pull request is larger than the review limit of 150000 diff characters

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pixiv-now Ready Ready Preview, Comment Mar 24, 2026 8:24am

*/
export function createPximgReplacer(baseUrlI: string, baseUrlS: string) {
function replacePximgUrl(str: string): string {
if (!str.includes('pximg.net')) return str

Check failure

Code scanning / CodeQL

Incomplete URL substring sanitization High

'
pximg.net
' can be anywhere in the URL, and arbitrary hosts may come before or after it.

Copilot Autofix

AI 18 days ago

In general, the fix is to avoid checking for pximg.net using includes, and instead either (a) parse the URL and inspect its host, or (b) remove the substring check entirely and rely on precise replacements. In this specific function, the includes check is only an early-return optimization before two exact replaceAll calls; it does not change behavior, only performance. Therefore, the least intrusive, behavior-preserving fix is to remove the substring check and let replaceAll run unconditionally.

Concretely, in app/utils/pximg.ts, within createPximgReplacer, modify replacePximgUrl so that it no longer does if (!str.includes('pximg.net')) return str. Instead, always return str.replaceAll(PXIMG_I, baseUrlI).replaceAll(PXIMG_S, baseUrlS). This has the same logical effect when str contains no occurrences of the pximg prefixes (both replaceAll calls will simply return str unchanged), but it removes the substring-based URL check that CodeQL flags. No additional imports or helper functions are needed.


Suggested changeset 1
app/utils/pximg.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/app/utils/pximg.ts b/app/utils/pximg.ts
--- a/app/utils/pximg.ts
+++ b/app/utils/pximg.ts
@@ -9,7 +9,6 @@
  */
 export function createPximgReplacer(baseUrlI: string, baseUrlS: string) {
   function replacePximgUrl(str: string): string {
-    if (!str.includes('pximg.net')) return str
     return str
       .replaceAll(PXIMG_I, baseUrlI)
       .replaceAll(PXIMG_S, baseUrlS)
EOF
@@ -9,7 +9,6 @@
*/
export function createPximgReplacer(baseUrlI: string, baseUrlS: string) {
function replacePximgUrl(str: string): string {
if (!str.includes('pximg.net')) return str
return str
.replaceAll(PXIMG_I, baseUrlI)
.replaceAll(PXIMG_S, baseUrlS)
Copilot is powered by AI and may make mistakes. Always verify output.
@dragon-fish dragon-fish merged commit 4e6a5a6 into master Mar 24, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants