-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
getSmithyContext()
helper function
- Loading branch information
Steven Yuan
committed
Sep 13, 2023
1 parent
c0c11b4
commit c47b765
Showing
3 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@smithy/util-middleware": patch | ||
--- | ||
|
||
Add `getSmithyContext()` helper function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { HandlerExecutionContext, SMITHY } from "@smithy/types"; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const getSmithyContext = (context: HandlerExecutionContext): Record<string, unknown> => | ||
context[SMITHY] || (context[SMITHY] = {}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
/** | ||
* @internal | ||
*/ | ||
export * from "./getSmithyContext" | ||
/** | ||
* @internal | ||
*/ | ||
|