Skip to content

Commit

Permalink
fix: service client
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-goodwin committed Jan 3, 2024
1 parent e1c30c3 commit 618e3a0
Show file tree
Hide file tree
Showing 3 changed files with 2,490 additions and 756 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@
"nag": "pnpm --filter tests-cdk run nag"
},
"devDependencies": {
"@types/jest": "^29",
"@types/node": "^20",
"@types/jest": "^29.5.11",
"@types/node": "^20.10.6",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.17.0",
"eslint": "^8.40.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint": "^8.56.0",
"eslint-config-prettier": "^8.10.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.32.2",
"husky": "^8.0.2",
"jest": "^29.5.0",
"eslint-plugin-react": "^7.33.2",
"husky": "^8.0.3",
"jest": "^29.7.0",
"lerna": "^6.6.2",
"lint-staged": "^13.0.3",
"lint-staged": "^13.3.0",
"prettier": "^2.8.8",
"ts-jest": "^29.1.0",
"turbo": "^1.9.9",
"ts-jest": "^29.1.1",
"turbo": "^1.11.2",
"typescript": "^5.3.3"
},
"lint-staged": {
Expand Down
15 changes: 4 additions & 11 deletions packages/@eventual/client/src/service-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,15 @@ export function proxyServiceClient(
namespace?: string
) {
return new Proxy(this, {
get: (_, commandName: string) => {
return (
_self: any,
_target: any,
[input, options]: [
input: any,
options?: { headers?: Record<string, string> }
]
) =>
get:
(_, commandName: string) =>
(input: any, options?: { headers?: Record<string, string> }) =>
this.httpClient.rpc({
command: commandName,
payload: input,
headers: options?.headers,
namespace,
});
},
}),
});
}

Expand Down
Loading

0 comments on commit 618e3a0

Please sign in to comment.