-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nik Nasr <[email protected]>
- Loading branch information
Showing
8 changed files
with
40 additions
and
4 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
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
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,6 @@ | ||
import { overview } from '@restate/features/overview-route'; | ||
|
||
export function meta() { | ||
return [{ title: 'Restate - Overview' }]; | ||
} | ||
export default overview.Component; |
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 |
---|---|---|
|
@@ -11,3 +11,7 @@ | |
*[data-testid='underlay'] { | ||
pointer-events: none; | ||
} | ||
|
||
*[tabindex='0']:not(:has(*)) { | ||
outline: none; | ||
} |
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
20 changes: 20 additions & 0 deletions
20
libs/data-access/middleware-service-worker/src/lib/queryFetcher.ts
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,20 @@ | ||
import { query } from '@restate/data-access/query'; | ||
|
||
const fetchHandler: ProxyHandler<typeof globalThis.fetch> = { | ||
apply: async function (target, thisArg, argumentsList) { | ||
const [resource, init] = argumentsList as [RequestInfo, RequestInit?]; | ||
const url = typeof resource === 'string' ? resource : resource.url; | ||
const urlObject = new URL(url); | ||
if (urlObject.pathname.startsWith('/query/')) { | ||
const response = query(new Request(resource, init)); | ||
if (response) { | ||
return response; | ||
} | ||
} | ||
|
||
return target.call(thisArg, resource, init); | ||
}, | ||
}; | ||
|
||
const originalFetch = globalThis.fetch; | ||
export const queryFetcher = new Proxy(originalFetch, fetchHandler); |
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
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