| 12 | import { NodeTarget } from './nodeTarget'; |
| 13 | |
| 14 | export class NodeWorkerTarget implements ITarget { |
| 15 | public readonly onNameChanged = new EventEmitter<void>().event; |
| 16 | private attached = false; |
| 17 | private isWaitingForDebugger = true; |
| 18 | |
| 19 | constructor( |
| 20 | public readonly launchConfig: AnyLaunchConfiguration, |
| 21 | public readonly targetInfo: Cdp.Target.TargetInfo, |
| 22 | private readonly parentTarget: NodeTarget, |
| 23 | private readonly targetOriginValue: ITargetOrigin, |
| 24 | private readonly cdp: Cdp.Api, |
| 25 | public readonly logger: ILogger, |
| 26 | ) { |
| 27 | cdp.pause(); |
| 28 | } |
| 29 | |
| 30 | id(): string { |
| 31 | return this.targetInfo.targetId; |
| 32 | } |
| 33 | |
| 34 | name(): string { |
| 35 | return this.targetInfo.title; |
| 36 | } |
| 37 | |
| 38 | fileName(): string | undefined { |
| 39 | return this.targetInfo.url; |
| 40 | } |
| 41 | |
| 42 | type(): string { |
| 43 | return 'node'; |
| 44 | } |
| 45 | |
| 46 | parent(): ITarget | undefined { |
| 47 | return this.parentTarget; |
| 48 | } |
| 49 | |
| 50 | children(): ITarget[] { |
| 51 | return []; |
| 52 | } |
| 53 | |
| 54 | canStop(): boolean { |
| 55 | return false; |
| 56 | } |
| 57 | |
| 58 | stop(): void { |
| 59 | // no-op |
| 60 | } |
| 61 | |
| 62 | canRestart(): boolean { |
| 63 | return false; |
| 64 | } |
| 65 | restart(): void { |
| 66 | // no-op |
| 67 | } |
| 68 | |
| 69 | canAttach(): boolean { |
| 70 | return !this.attached; |
| 71 | } |
nothing calls this directly
no outgoing calls
no test coverage detected