Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix types for cloudflare:queue args #2626

Open
wants to merge 8 commits into
base: v2
Choose a base branch
from

Conversation

dalbodeule
Copy link
Contributor

@dalbodeule dalbodeule commented Jul 19, 2024

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

The queue event(MessageBatch) is wrong types.
What was originally supposed to be MessageBatch, I looked it up today and found that it was written as CloudflareEmailContext.
I just fixed it.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

#2587 (comment)

@pi0 pi0 changed the title [hotifx] queue event(MessageBatch) is wrong types fix: fix types for cloudflare:queue args Jul 21, 2024
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Thanks

@dalbodeule
Copy link
Contributor Author

dalbodeule commented Jul 23, 2024

additional fix: types for cloudflare:queue args

CloudflareEmailContext.raw to ReadableStream<Uint8Array> from ReadableStream

@dalbodeule
Copy link
Contributor Author

I have something additional to ask.

Testing with Nuxt nightly. The error occurs during the build process.

 ERROR  Cannot resolve "cloudflare:email" from "/Users/jioo0224/Desktop/nodejs/sh0rt-kr-email-worker/node_modules/cloudflare-email-kit/dist/index.js" and externals are not allowed!                                                 10:49:18 AM

  at Object.resolveId (node_modules/nitro/dist/rollup/index.mjs:1570:17)
  at async PluginDriver.hookFirstAndGetPlugin (node_modules/rollup/dist/es/shared/node-entry.js:19708:28)
  at async resolveId (node_modules/rollup/dist/es/shared/node-entry.js:18389:26)
  at async ModuleLoader.resolveId (node_modules/rollup/dist/es/shared/node-entry.js:18792:15)
  at async Object.resolveId (node_modules/@rollup/plugin-commonjs/dist/es/index.js:590:10)
  at async PluginDriver.hookFirstAndGetPlugin (node_modules/rollup/dist/es/shared/node-entry.js:19708:28)
  at async resolveId (node_modules/rollup/dist/es/shared/node-entry.js:18389:26)
  at async ModuleLoader.resolveId (node_modules/rollup/dist/es/shared/node-entry.js:18792:15)
  at async ModuleLoader.resolveDynamicImport (node_modules/rollup/dist/es/shared/node-entry.js:19196:82)
  at async node_modules/rollup/dist/es/shared/node-entry.js:19083:32

I would like to ask whether this is also a problem with Nitro and, if so, where I should fix it.

@dalbodeule
Copy link
Contributor Author

dalbodeule commented Jul 23, 2024

I don't know think so.

Maybe this rule or "cloudflare-email-kit" plugin is fault.

Before, "cloudflare-email-kit" module's dependency is all of "browser" dependencies. So, I think that rules is problem...

ADD:

I added this rule. So, It works. (??)

        if (
          id.startsWith("cloudflare:")
        ) {
          return { id, external: true };
        }

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