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

chore(account): use Environment object #2734

Closed
wants to merge 2 commits into from
Closed

Conversation

szkl
Copy link
Contributor

@szkl szkl commented Oct 20, 2023

Description

The Email account node can be used out of tRPC runtime where
context object is not available and not possible to construct. The
node class implementations do not have access to tRPC stack,
anyway. This is the first change to replace the tRPC context object
interface in node class definitions.

This specific change is a dependency for the development branch of #2415.

Testing

  • Manual

Checklist

  • I have read the CONTRIBUTING guidelines
  • I have tested my code (manually and/or automated if applicable)
  • I have updated the documentation (if necessary)

@@ -102,7 +104,7 @@ export async function createContext(
env: Environment
) {
const { req } = opts
const contextInner = await createContextInner({ ...opts, ...env })
const contextInner = await createContextInner({ ...opts, ...env, env })
Copy link
Contributor

Choose a reason for hiding this comment

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

The ...env, env bit doesn't look right. Was the intent to replace all env vars that were part of ctx before with a dedicated prop called env?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, no. I actually wanted to keep the changes in this pull request minimal so I didn't make any changes to the existing interface and keep it compatible with the rest. I can fix the rest in a post-feature-follow-up request.

@szkl szkl closed this Oct 23, 2023
@szkl szkl deleted the chore/account/nodes/email branch October 23, 2023 11:46
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