Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/h3Public

feat: websocket support#671

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
pi0 merged 19 commits intomainfromfeat/websocket
Feb 25, 2024
Merged
Changes from1 commit
Commits
Show all changes
19 commits
Select commitHold shift + click to select a range
cdc27c6
feat: websocket support
pi0Feb 25, 2024
aee323f
add docs
pi0Feb 25, 2024
19f4058
chore: apply automated updates
autofix-ci[bot]Feb 25, 2024
3f4d617
wip
pi0Feb 25, 2024
2753cc1
Merge branch 'main' into feat/websocket
pi0Feb 25, 2024
9239f65
chore: apply automated updates
autofix-ci[bot]Feb 25, 2024
d3d2066
Merge branch 'main' into feat/websocket
pi0Feb 25, 2024
1dba470
wip
pi0Feb 25, 2024
3729993
update doc
pi0Feb 25, 2024
1e06ca3
chore: apply automated updates
autofix-ci[bot]Feb 25, 2024
35704ab
update crossws
pi0Feb 25, 2024
ec2b2d7
inherit props for object syntax
pi0Feb 25, 2024
81f4695
remove log
pi0Feb 25, 2024
862b288
chore: apply automated updates
autofix-ci[bot]Feb 25, 2024
fd1e7e8
update usage
pi0Feb 25, 2024
d3cc0df
Merge branch 'main' into feat/websocket
pi0Feb 25, 2024
a034a60
ignore linter for docs
pi0Feb 25, 2024
1f617da
update types
pi0Feb 25, 2024
75d7323
add adapter notes
pi0Feb 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
inherit props for object syntax
  • Loading branch information
@pi0
pi0 committedFeb 25, 2024
commitec2b2d718865a168c291e2e8f63b0ed4a5deb084
8 changes: 6 additions & 2 deletionssrc/event/utils.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,7 +47,8 @@ export function defineEventHandler<
): EventHandler<Request, Response> {
// Function Syntax
if (typeof handler === "function") {
return Object.assign(handler, { __is_handler__: true });
handler.__is_handler__ = true;
return handler
}
// Object Syntax
const _hooks: _EventHandlerHooks = {
Expand All@@ -57,7 +58,10 @@ export function defineEventHandler<
const _handler: EventHandler<Request, any> = (event) => {
return _callHandler(event, handler.handler, _hooks);
};
return Object.assign(_handler, { __is_handler__: true });
_handler.__is_handler__ = true;
_handler.__resolve__ = handler.handler.__resolve__;
_handler.__websocket__ = handler.websocket
return _handler
}

function _normalizeArray<T>(input?: T | T[]): T[] | undefined {
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp