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

feat(runtime): reuse context #1539

Merged
merged 2 commits into from
Sep 22, 2023
Merged

Conversation

skyoct
Copy link
Contributor

@skyoct skyoct commented Sep 18, 2023

  1. 复用拦截器上下文
  2. 增加varMap用于挂载变量

@skyoct skyoct requested a review from 0fatal September 18, 2023 12:58
@0fatal
Copy link
Contributor

0fatal commented Sep 19, 2023

varMap 的具体用途是?我想应该可以直接在ctx上直接挂载 ctx.xxx

@skyoct
Copy link
Contributor Author

skyoct commented Sep 19, 2023

varMap 的具体用途是?我想应该可以直接在ctx上直接挂载 ctx.xxx

ctx直接挂载前端没办法识别,会有红色波浪线

@maslow
Copy link
Member

maslow commented Sep 19, 2023

varMap 的具体用途是?我想应该可以直接在ctx上直接挂载 ctx.xxx

ctx直接挂载前端没办法识别,会有红色波浪线

可以识别的, express request 对象就是直接挂的。

interface FunctionContext {
  ...
 [key: string]: any
}

@pull-request-size pull-request-size bot added size/L and removed size/M labels Sep 19, 2023
@skyoct skyoct requested a review from 0fatal September 19, 2023 14:36
@skyoct
Copy link
Contributor Author

skyoct commented Sep 22, 2023

@0fatal 帮忙重新review一下

@0fatal 0fatal merged commit acafda5 into labring:main Sep 22, 2023
@skyoct skyoct deleted the feat/runtime_context branch September 22, 2023 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants