[PR #415] [MERGED] feat: add ADDRESS_CHECK_REGEX #569

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

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/415
Author: @dreamhunter2333
Created: 8/16/2024
Status: Merged
Merged: 8/16/2024
Merged by: @dreamhunter2333

Base: mainHead: feature/dev


📝 Commits (1)

  • d0db8fa feat: add ADDRESS_CHECK_REGEX

📊 Changes

14 files changed (+74 additions, -20 deletions)

View changed files

📝 CHANGELOG.md (+5 -1)
📝 frontend/package.json (+1 -1)
📝 pages/package.json (+1 -1)
📝 vitepress-docs/docs/en/cli.md (+3 -1)
📝 vitepress-docs/docs/zh/guide/cli/worker.md (+3 -1)
📝 vitepress-docs/package.json (+1 -1)
📝 worker/package.json (+1 -1)
📝 worker/src/admin_api/index.ts (+7 -1)
📝 worker/src/common.ts (+36 -5)
📝 worker/src/constants.ts (+1 -1)
📝 worker/src/mails_api/index.ts (+6 -1)
📝 worker/src/telegram_api/common.ts (+5 -4)
📝 worker/src/types.d.ts (+1 -0)
📝 worker/wrangler.toml.template (+3 -1)

📄 Description

User description

#414


PR Type

Enhancement, Documentation


Description

  • Refactored newAddress function calls across multiple files to use an object for parameters.
  • Added checkNameRegex function to validate address names against ADDRESS_CHECK_REGEX.
  • Updated Bindings type to include ADDRESS_CHECK_REGEX.
  • Added /user_api/oauth2 to the list of paths that bypass middleware.
  • Updated documentation to include information about the new ADDRESS_CHECK_REGEX feature.

Changes walkthrough 📝

Relevant files
Enhancement
6 files
index.ts
Refactor `newAddress` function call to use object parameters

worker/src/admin_api/index.ts

  • Updated newAddress function call to use an object for parameters.
  • Added enableCheckNameRegex parameter with a default value of false.
  • +7/-1     
    common.ts
    Add name validation using `ADDRESS_CHECK_REGEX`                   

    worker/src/common.ts

  • Added checkNameRegex function to validate name against
    ADDRESS_CHECK_REGEX.
  • Updated newAddress function to include enableCheckNameRegex parameter.

  • +36/-5   
    index.ts
    Refactor `newAddress` function call to use object parameters

    worker/src/mails_api/index.ts

  • Updated newAddress function call to use an object for parameters.
  • +6/-1     
    common.ts
    Refactor `newAddress` function call to use object parameters

    worker/src/telegram_api/common.ts

  • Updated newAddress function call to use an object for parameters.
  • +5/-4     
    types.d.ts
    Add `ADDRESS_CHECK_REGEX` to `Bindings` type                         

    worker/src/types.d.ts

    • Added ADDRESS_CHECK_REGEX to Bindings type.
    +1/-0     
    worker.ts
    Add `/user_api/oauth2` to middleware bypass paths               

    worker/src/worker.ts

  • Added /user_api/oauth2 to the list of paths that bypass middleware.
  • +1/-0     
    Documentation
    4 files
    CHANGELOG.md
    Update CHANGELOG for `ADDRESS_CHECK_REGEX` feature             

    CHANGELOG.md

  • Documented the addition of ADDRESS_CHECK_REGEX for address name
    validation.
  • +5/-1     
    cli.md
    Document `ADDRESS_CHECK_REGEX` in CLI guide                           

    vitepress-docs/docs/en/cli.md

    • Added documentation for ADDRESS_CHECK_REGEX.
    +3/-1     
    worker.md
    Document `ADDRESS_CHECK_REGEX` in CLI guide (Chinese)       

    vitepress-docs/docs/zh/guide/cli/worker.md

    • Added documentation for ADDRESS_CHECK_REGEX.
    +3/-1     
    wrangler.toml.template
    Add `ADDRESS_CHECK_REGEX` configuration example                   

    worker/wrangler.toml.template

    • Added ADDRESS_CHECK_REGEX configuration example.
    +3/-1     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions


    🔄 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/415 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 8/16/2024 **Status:** ✅ Merged **Merged:** 8/16/2024 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/dev` --- ### 📝 Commits (1) - [`d0db8fa`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/d0db8fad68ea55aa7e63134d68c1d584a1f2ccec) feat: add ADDRESS_CHECK_REGEX ### 📊 Changes **14 files changed** (+74 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+5 -1) 📝 `frontend/package.json` (+1 -1) 📝 `pages/package.json` (+1 -1) 📝 `vitepress-docs/docs/en/cli.md` (+3 -1) 📝 `vitepress-docs/docs/zh/guide/cli/worker.md` (+3 -1) 📝 `vitepress-docs/package.json` (+1 -1) 📝 `worker/package.json` (+1 -1) 📝 `worker/src/admin_api/index.ts` (+7 -1) 📝 `worker/src/common.ts` (+36 -5) 📝 `worker/src/constants.ts` (+1 -1) 📝 `worker/src/mails_api/index.ts` (+6 -1) 📝 `worker/src/telegram_api/common.ts` (+5 -4) 📝 `worker/src/types.d.ts` (+1 -0) 📝 `worker/wrangler.toml.template` (+3 -1) </details> ### 📄 Description ### **User description** #414 ___ ### **PR Type** Enhancement, Documentation ___ ### **Description** - Refactored `newAddress` function calls across multiple files to use an object for parameters. - Added `checkNameRegex` function to validate address names against `ADDRESS_CHECK_REGEX`. - Updated `Bindings` type to include `ADDRESS_CHECK_REGEX`. - Added `/user_api/oauth2` to the list of paths that bypass middleware. - Updated documentation to include information about the new `ADDRESS_CHECK_REGEX` feature. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>6 files</summary><table> <tr> <td> <details> <summary><strong>index.ts</strong><dd><code>Refactor `newAddress` function call to use object parameters</code></dd></summary> <hr> worker/src/admin_api/index.ts <li>Updated <code>newAddress</code> function call to use an object for parameters.<br> <li> Added <code>enableCheckNameRegex</code> parameter with a default value of <code>false</code>.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/415/files#diff-b470c4c47ce4a700cd8aac644d07d8a747d439bb6d69e9392a198b3a931fe2e7">+7/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>common.ts</strong><dd><code>Add name validation using `ADDRESS_CHECK_REGEX`</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/common.ts <li>Added <code>checkNameRegex</code> function to validate name against <br><code>ADDRESS_CHECK_REGEX</code>.<br> <li> Updated <code>newAddress</code> function to include <code>enableCheckNameRegex</code> parameter.<br> <br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/415/files#diff-fcc08fd5aa3c190d0d45c7e3dd208e5ee831d360b272fdd5869607cf472c5eb1">+36/-5</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>index.ts</strong><dd><code>Refactor `newAddress` function call to use object parameters</code></dd></summary> <hr> worker/src/mails_api/index.ts <li>Updated <code>newAddress</code> function call to use an object for parameters.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/415/files#diff-83710df6a60b2b512e134f32ad9890ab9a255040f6019f0d5603f72f4561cea4">+6/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>common.ts</strong><dd><code>Refactor `newAddress` function call to use object parameters</code></dd></summary> <hr> worker/src/telegram_api/common.ts <li>Updated <code>newAddress</code> function call to use an object for parameters.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/415/files#diff-962b7426663cb9f82119a7691d62d1401a72e3c85654a12b7b21e014d1414eab">+5/-4</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>types.d.ts</strong><dd><code>Add `ADDRESS_CHECK_REGEX` to `Bindings` type</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/types.d.ts - Added `ADDRESS_CHECK_REGEX` to `Bindings` type. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/415/files#diff-583fb024d5c9d1efac71bbea788d8379e5e8fc2f0bb1696a9863c6f6cac54bee">+1/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>worker.ts</strong><dd><code>Add `/user_api/oauth2` to middleware bypass paths</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/worker.ts <li>Added <code>/user_api/oauth2</code> to the list of paths that bypass middleware.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/415/files#diff-c007030a206d7e4e2a4879ba673551e7633ad914b67cfac204096edced3f80a2">+1/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>4 files</summary><table> <tr> <td> <details> <summary><strong>CHANGELOG.md</strong><dd><code>Update CHANGELOG for `ADDRESS_CHECK_REGEX` feature</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> CHANGELOG.md <li>Documented the addition of <code>ADDRESS_CHECK_REGEX</code> for address name <br>validation.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/415/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed">+5/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>cli.md</strong><dd><code>Document `ADDRESS_CHECK_REGEX` in CLI guide</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> vitepress-docs/docs/en/cli.md - Added documentation for `ADDRESS_CHECK_REGEX`. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/415/files#diff-3f8f72a691fa19c8581621e91cf67ad28855af7a57e58513f6563cf4c8886e5f">+3/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>worker.md</strong><dd><code>Document `ADDRESS_CHECK_REGEX` in CLI guide (Chinese)</code>&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> vitepress-docs/docs/zh/guide/cli/worker.md - Added documentation for `ADDRESS_CHECK_REGEX`. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/415/files#diff-f760a2ec5dad4b6bda0bd4a9325274567778add8cb984e73650dbaaf680c9178">+3/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>wrangler.toml.template</strong><dd><code>Add `ADDRESS_CHECK_REGEX` configuration example</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/wrangler.toml.template - Added `ADDRESS_CHECK_REGEX` configuration example. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/415/files#diff-743273da72481b71fbeb1dddfd294be9249554eef65691dfc9bcfa9f0fd971fb">+3/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
    kerem 2026-02-26 21:31:49 +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#569
    No description provided.