[PR #627] [MERGED] feat: support deploy worker with UI assets #664

Closed
opened 2026-02-26 21:32:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/627
Author: @dreamhunter2333
Created: 4/9/2025
Status: Merged
Merged: 4/12/2025
Merged by: @dreamhunter2333

Base: mainHead: feature/dev


📝 Commits (1)

  • 5b1d0c7 feat: support deploy worker with UI assets

📊 Changes

22 files changed (+450 additions, -344 deletions)

View changed files

📝 .github/workflows/backend_deploy.yaml (+8 -0)
📝 frontend/package.json (+1 -1)
📝 frontend/pnpm-lock.yaml (+51 -51)
📝 pages/functions/_middleware.js (+2 -1)
📝 pages/package.json (+1 -1)
📝 vitepress-docs/docs/.vitepress/config.ts (+0 -1)
📝 vitepress-docs/docs/.vitepress/en.ts (+1 -0)
📝 vitepress-docs/docs/.vitepress/zh.ts (+2 -0)
📝 vitepress-docs/docs/zh/guide/actions/github-action.md (+40 -13)
vitepress-docs/docs/zh/guide/actions/pre-requisite.md (+10 -0)
📝 vitepress-docs/docs/zh/guide/cli/pages.md (+6 -3)
📝 vitepress-docs/docs/zh/guide/cli/worker.md (+30 -1)
📝 vitepress-docs/docs/zh/guide/feature/config-smtp-proxy.md (+1 -1)
📝 vitepress-docs/docs/zh/guide/feature/user-oauth2.md (+1 -1)
📝 vitepress-docs/docs/zh/guide/quick-start.md (+1 -1)
📝 vitepress-docs/package.json (+1 -1)
📝 vitepress-docs/pnpm-lock.yaml (+158 -158)
📝 worker/package.json (+4 -4)
📝 worker/pnpm-lock.yaml (+104 -104)
📝 worker/src/types.d.ts (+1 -0)

...and 2 more files

📄 Description

User description

#613


PR Type

enhancement, bug fix


Description

  • Add support for deploying worker with UI assets.

  • Implement middleware to handle static file requests.

  • Update API paths to include /external/.

  • Modify compatibility date in wrangler.toml.template.


Changes walkthrough 📝

Relevant files
Enhancement
types.d.ts
Add `ASSETS` fetcher to bindings                                                 

worker/src/types.d.ts

  • Add ASSETS fetcher to Bindings type.
+1/-0     
worker.ts
Middleware for static file requests and API paths update 

worker/src/worker.ts

  • Define API_PATHS array.
  • Implement middleware to handle static file requests.
  • Update compatibility date.
  • +20/-1   
    _middleware.js
    Update API paths in middleware                                                     

    pages/functions/_middleware.js

    • Update API_PATHS to include /external/.
    +2/-1     
    wrangler.toml.template
    Add assets configuration and update compatibility date     

    worker/wrangler.toml.template

  • Add assets configuration for deploying worker with frontend assets.
  • Update compatibility date.
  • +7/-1     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.

  • 🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

    ## 📋 Pull Request Information **Original PR:** https://github.com/dreamhunter2333/cloudflare_temp_email/pull/627 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 4/9/2025 **Status:** ✅ Merged **Merged:** 4/12/2025 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/dev` --- ### 📝 Commits (1) - [`5b1d0c7`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/5b1d0c7d11a796e9d4ffa14e0548d5c2ec88936c) feat: support deploy worker with UI assets ### 📊 Changes **22 files changed** (+450 additions, -344 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/backend_deploy.yaml` (+8 -0) 📝 `frontend/package.json` (+1 -1) 📝 `frontend/pnpm-lock.yaml` (+51 -51) 📝 `pages/functions/_middleware.js` (+2 -1) 📝 `pages/package.json` (+1 -1) 📝 `vitepress-docs/docs/.vitepress/config.ts` (+0 -1) 📝 `vitepress-docs/docs/.vitepress/en.ts` (+1 -0) 📝 `vitepress-docs/docs/.vitepress/zh.ts` (+2 -0) 📝 `vitepress-docs/docs/zh/guide/actions/github-action.md` (+40 -13) ➕ `vitepress-docs/docs/zh/guide/actions/pre-requisite.md` (+10 -0) 📝 `vitepress-docs/docs/zh/guide/cli/pages.md` (+6 -3) 📝 `vitepress-docs/docs/zh/guide/cli/worker.md` (+30 -1) 📝 `vitepress-docs/docs/zh/guide/feature/config-smtp-proxy.md` (+1 -1) 📝 `vitepress-docs/docs/zh/guide/feature/user-oauth2.md` (+1 -1) 📝 `vitepress-docs/docs/zh/guide/quick-start.md` (+1 -1) 📝 `vitepress-docs/package.json` (+1 -1) 📝 `vitepress-docs/pnpm-lock.yaml` (+158 -158) 📝 `worker/package.json` (+4 -4) 📝 `worker/pnpm-lock.yaml` (+104 -104) 📝 `worker/src/types.d.ts` (+1 -0) _...and 2 more files_ </details> ### 📄 Description ### **User description** #613 ___ ### **PR Type** enhancement, bug fix ___ ### **Description** - Add support for deploying worker with UI assets. - Implement middleware to handle static file requests. - Update API paths to include `/external/`. - Modify compatibility date in `wrangler.toml.template`. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>types.d.ts</strong><dd><code>Add `ASSETS` fetcher to bindings</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/types.d.ts - Add `ASSETS` fetcher to `Bindings` type. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/627/files#diff-583fb024d5c9d1efac71bbea788d8379e5e8fc2f0bb1696a9863c6f6cac54bee">+1/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>worker.ts</strong><dd><code>Middleware for static file requests and API paths update</code>&nbsp; </dd></summary> <hr> worker/src/worker.ts <li>Define <code>API_PATHS</code> array.<br> <li> Implement middleware to handle static file requests.<br> <li> Update compatibility date. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/627/files#diff-c007030a206d7e4e2a4879ba673551e7633ad914b67cfac204096edced3f80a2">+20/-1</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>_middleware.js</strong><dd><code>Update API paths in middleware</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> pages/functions/_middleware.js - Update `API_PATHS` to include `/external/`. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/627/files#diff-39563a77eb3b0bacd108e4a4a824a861abc9f568eef0c2963ba2f07487268f0c">+2/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>wrangler.toml.template</strong><dd><code>Add assets configuration and update compatibility date</code>&nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/wrangler.toml.template <li>Add assets configuration for deploying worker with frontend assets.<br> <li> Update compatibility date. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/627/files#diff-743273da72481b71fbeb1dddfd294be9249554eef65691dfc9bcfa9f0fd971fb">+7/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr></tr></tbody></table> ___ > <details> <summary> Need help?</summary><li>Type <code>/help how to ...</code> in the comments thread for any questions about PR-Agent usage.</li><li>Check out the <a href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a> for more information.</li></details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
    kerem 2026-02-26 21:32:17 +03:00
    Sign in to join this conversation.
    No milestone
    No project
    No assignees
    1 participant
    Notifications
    Due date
    The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

    No due date set.

    Dependencies

    No dependencies set.

    Reference
    starred/cloudflare_temp_email#664
    No description provided.