File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 resolveAllowedDsns ,
88 resolveTunnelPaths ,
99 setServedTunnel ,
10- withPathBelowBasePath ,
10+ stripBasePathFromTunnelPath ,
1111} from './tunnel' ;
1212
1313/**
@@ -50,7 +50,7 @@ export function applyManagedTunnelDefaults(client: Client | undefined): void {
5050 }
5151
5252 const basePath = normalizeTunnelBasePath ( managedTunnelDefaults ?. basePath ) ;
53- const resolved = withPathBelowBasePath (
53+ const resolved = stripBasePathFromTunnelPath (
5454 tunnelOptions . basePath === undefined && basePath ? { ...tunnelOptions , basePath } : tunnelOptions ,
5555 ) ;
5656 options . _managedTunnel = resolved ;
Original file line number Diff line number Diff line change @@ -76,10 +76,10 @@ export function applyTunnelDefaults(
7676 }
7777
7878 if ( typeof tunnel === 'string' ) {
79- return tunnel . startsWith ( '/' ) ? withPathBelowBasePath ( { ...defaults , path : tunnel } ) : tunnel ;
79+ return tunnel . startsWith ( '/' ) ? stripBasePathFromTunnelPath ( { ...defaults , path : tunnel } ) : tunnel ;
8080 }
8181
82- return withPathBelowBasePath ( { ...defaults , ...( tunnel === true ? { } : tunnel ) } ) ;
82+ return stripBasePathFromTunnelPath ( { ...defaults , ...( tunnel === true ? { } : tunnel ) } ) ;
8383}
8484
8585/**
@@ -395,7 +395,7 @@ export function resolveAllowedDsns(
395395/**
396396 * Makes a fixed `path` relative to `basePath`, so one written with the base path isn't served under it twice.
397397 */
398- export function withPathBelowBasePath ( tunnelOptions : TunnelOptions ) : TunnelOptions {
398+ export function stripBasePathFromTunnelPath ( tunnelOptions : TunnelOptions ) : TunnelOptions {
399399 const path = tunnelOptions . path && stripBasePath ( tunnelOptions . path , tunnelOptions . basePath ) ;
400400
401401 return path ? { ...tunnelOptions , path } : tunnelOptions ;
You can’t perform that action at this time.
0 commit comments