Skip to content

Commit

Permalink
Rename SourceMapController -> SourceMapsRegistry
Browse files Browse the repository at this point in the history
  • Loading branch information
kmagiera committed Nov 23, 2024
1 parent e359936 commit 32f870b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { Breakpoint } from "@vscode/debugadapter";
import { DebugProtocol } from "@vscode/debugprotocol";
import { SourceMapConsumer } from "source-map";
import { CDPBreakpoint } from "./CDPBreakpoint";
import { SourceMapController } from "./SourceMapsController";
import { SourceMapsRegistry } from "./SourceMapsRegistry";
import { CDPSession } from "./CDPSession";

export class BreakpointsController {
private breakpoints = new Map<string, Array<CDPBreakpoint>>();

constructor(private sourceMapController: SourceMapController, private cdpSession: CDPSession) {}
constructor(private sourceMapController: SourceMapsRegistry, private cdpSession: CDPSession) {}

public updateBreakpointsInSource(sourceURL: string, consumer: SourceMapConsumer) {
// this method gets called after we are informed that a new script has been parsed. If we
Expand Down
4 changes: 2 additions & 2 deletions packages/vscode-extension/src/debugging/CDPBreakpoint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Breakpoint, Source } from "@vscode/debugadapter";
import { SourceMapController } from "./SourceMapsController";
import { SourceMapsRegistry } from "./SourceMapsRegistry";
import { Logger } from "../Logger";
import { CDPSession } from "./CDPSession";

Expand All @@ -12,7 +12,7 @@ export class CDPBreakpoint extends Breakpoint {

constructor(
private cdpSession: CDPSession,
private sourceMapController: SourceMapController,
private sourceMapController: SourceMapsRegistry,
verified: boolean,
line: number,
column?: number,
Expand Down
6 changes: 3 additions & 3 deletions packages/vscode-extension/src/debugging/DebugAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
CDPRemoteObject,
} from "./cdp";
import { VariableStore } from "./variableStore";
import { SourceMapController } from "./SourceMapsController";
import { SourceMapsRegistry } from "./SourceMapsRegistry";
import { BreakpointsController } from "./BreakpointsController";
import { CDPSession } from "./CDPSession";

Expand All @@ -40,7 +40,7 @@ export class DebugAdapter extends DebugSession {
private variableStore: VariableStore = new VariableStore();

private cdpSession: CDPSession;
private sourceMapController: SourceMapController;
private sourceMapController: SourceMapsRegistry;

private breakpointsController: BreakpointsController;

Expand All @@ -61,7 +61,7 @@ export class DebugAdapter extends DebugSession {
this.handleIncomingCDPMethodCalls
);

this.sourceMapController = new SourceMapController(
this.sourceMapController = new SourceMapsRegistry(
configuration.expoPreludeLineCount,
configuration.sourceMapAliases
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function compareIgnoringHost(url1: string, url2: string) {
}
}

export class SourceMapController {
export class SourceMapsRegistry {
private sourceMaps: Array<[string, string, SourceMapConsumer, number]> = [];
private sourceMapFilePaths: Set<string> = new Set();

Expand Down

0 comments on commit 32f870b

Please sign in to comment.