-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
68 changed files
with
263 additions
and
1,670 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 |
---|---|---|
@@ -1,3 +1,15 @@ | ||
def devtools(working_directory=config.main_dir, api='https://api.replay.io/v1/graphql', subscriptions='wss://api.replay.io/v1/graphql', dispatch='wss://dispatch.replay.io', resource_deps=[]): | ||
local_resource("devtools deps", "yarn install", deps=["package.json"], dir=working_directory, allow_parallel=True) | ||
local_resource("devtools webpack", serve_cmd="rm -rf .next && yarn dev", deps=[], resource_deps=["devtools deps"] + resource_deps, serve_dir=working_directory, serve_env={"NEXT_PUBLIC_API_URL": api, "NEXT_PUBLIC_DISPATCH_URL": dispatch, "NEXT_PUBLIC_API_SUBSCRIPTION_URL": subscriptions}) | ||
local_resource( | ||
"devtools webpack", | ||
serve_cmd="rm -rf .next && npm exec next dev -- -p 8081", | ||
deps=[], | ||
resource_deps=["devtools deps"] + resource_deps, | ||
serve_dir=working_directory, | ||
serve_env={ | ||
"NEXT_PUBLIC_API_URL": api, | ||
"NEXT_PUBLIC_DISPATCH_URL": dispatch, | ||
"NEXT_PUBLIC_API_SUBSCRIPTION_URL": subscriptions, | ||
"DASHBOARD_URL": "http://localhost:8080" | ||
} | ||
) |
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,25 +1,10 @@ | ||
import type { NextRequest } from "next/server"; | ||
import { NextResponse, userAgent } from "next/server"; | ||
import { NextResponse } from "next/server"; | ||
|
||
export function middleware(request: NextRequest) { | ||
const { ua } = userAgent(request); | ||
|
||
if (isMobile(ua)) { | ||
// If the user is attempting to visit Replay on a mobile device for the first time, | ||
// show them a message that it has not been optimized for mobile | ||
// If they have already confirmed this message (detectable via a cookie) then let them through | ||
const cookie = request.cookies.get("mobile-warning-dismissed"); | ||
if (cookie == null && request.nextUrl.pathname !== "/mobile-warning") { | ||
return NextResponse.redirect(new URL("/mobile-warning", request.url)); | ||
} | ||
const url = new URL(request.url); | ||
if (!url.pathname.startsWith("/recording")) { | ||
const dashboardUrl = process.env.DASHBOARD_URL || "https://replay-dashboard.vercel.app"; | ||
return NextResponse.rewrite(`${dashboardUrl}${url.pathname}${url.search}`); | ||
} | ||
} | ||
|
||
// Which routes should this middleware respond to | ||
export const config = { | ||
matcher: ["/", "/team/:path*", "/recording/:path*"], | ||
}; | ||
|
||
function isMobile(ua: string) { | ||
return /iP(hone|ad|od)/.test(ua) || /Android/.test(ua); | ||
} |
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
109 changes: 0 additions & 109 deletions
109
packages/e2e-tests/test-suite-dashboard/test-runs-01.test.ts
This file was deleted.
Oops, something went wrong.
195 changes: 0 additions & 195 deletions
195
packages/e2e-tests/test-suite-dashboard/test-runs-02.test.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.