Skip to content

Commit 7a56ab6

Browse files
committed
fix: clean up node browser routing lint drift
Tighten the browser routing files to the repo's formatter expectations so the node CI lint job passes cleanly again. Made-with: Cursor
1 parent 2f16386 commit 7a56ab6

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

src/client.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ import * as Uploads from './core/uploads';
2020
import * as API from './resources/index';
2121
import { APIPromise } from './core/api-promise';
2222
import { AppListParams, AppListResponse, AppListResponsesOffsetPagination, Apps } from './resources/apps';
23-
import {
24-
BrowserRouteCache,
25-
createRoutingFetch,
26-
type BrowserRoutingOptions,
27-
} from './lib/browser-routing';
23+
import { BrowserRouteCache, createRoutingFetch, type BrowserRoutingOptions } from './lib/browser-routing';
2824
import {
2925
BrowserPool,
3026
BrowserPoolAcquireParams,

src/lib/browser-routing.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,4 +352,3 @@ function headersToRequestOptionsHeaders(headers: Headers): Record<string, string
352352
});
353353
return out;
354354
}
355-

src/lib/browser-transport.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,3 @@ export function resolveBrowserTransport(browser: KernelBrowserLike): ResolvedBro
3838
parseJwtFromCdpWsUrl(browser.cdp_ws_url ?? undefined);
3939
return { sessionId, defaultBaseURL, jwt };
4040
}
41-

tests/lib/browser-routing.test.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
import Kernel from '@onkernel/sdk';
22

33
describe('browser routing', () => {
4-
const normalizeURL = (input: string | URL | Request) =>
5-
typeof input === 'string' ? input : input instanceof URL ? input.toString() : input.url;
4+
const normalizeURL = (input: string | URL | Request) => {
5+
if (typeof input === 'string') {
6+
return input;
7+
}
8+
if (input instanceof URL) {
9+
return input.toString();
10+
}
11+
return input.url;
12+
};
613

714
test('warms cache from browser responses and routes allowlisted subresources directly to the VM', async () => {
815
const calls: Array<{ url: string; headers: Headers }> = [];

0 commit comments

Comments
 (0)