66 getPluginDefaultSettings ,
77 getPluginSettings ,
88 setPluginSettings ,
9- StateEditor
9+ StateEditor ,
1010} from '@vue-devtools/shared-utils'
1111import {
1212 Hooks ,
@@ -20,7 +20,7 @@ import {
2020 EditStatePayload ,
2121 WithId ,
2222 ComponentTreeNode ,
23- ComponentDevtoolsOptions
23+ ComponentDevtoolsOptions ,
2424} from '@vue/devtools-api'
2525import { DevtoolsHookable } from './hooks'
2626import { BackendContext } from './backend-context'
@@ -56,15 +56,15 @@ export class DevtoolsApi {
5656 const payload = await this . callHook ( Hooks . TRANSFORM_CALL , {
5757 callName,
5858 inArgs : args ,
59- outArgs : args . slice ( )
59+ outArgs : args . slice ( ) ,
6060 } )
6161 return payload . outArgs
6262 }
6363
6464 async getAppRecordName ( app : App , defaultName : string ) : Promise < string > {
6565 const payload = await this . callHook ( Hooks . GET_APP_RECORD_NAME , {
6666 app,
67- name : null
67+ name : null ,
6868 } )
6969 if ( payload . name ) {
7070 return payload . name
@@ -76,14 +76,14 @@ export class DevtoolsApi {
7676 async getAppRootInstance ( app : App ) {
7777 const payload = await this . callHook ( Hooks . GET_APP_ROOT_INSTANCE , {
7878 app,
79- root : null
79+ root : null ,
8080 } )
8181 return payload . root
8282 }
8383
8484 async registerApplication ( app : App ) {
8585 await this . callHook ( Hooks . REGISTER_APPLICATION , {
86- app
86+ app,
8787 } )
8888 }
8989
@@ -92,7 +92,7 @@ export class DevtoolsApi {
9292 componentInstance : instance ,
9393 componentTreeData : null ,
9494 maxDepth,
95- filter
95+ filter,
9696 } )
9797 return payload . componentTreeData
9898 }
@@ -102,15 +102,15 @@ export class DevtoolsApi {
102102 app,
103103 componentInstance : instance ,
104104 treeNode,
105- filter
105+ filter,
106106 } )
107107 return payload . treeNode
108108 }
109109
110110 async walkComponentParents ( instance : ComponentInstance ) {
111111 const payload = await this . callHook ( Hooks . WALK_COMPONENT_PARENTS , {
112112 componentInstance : instance ,
113- parentInstances : [ ]
113+ parentInstances : [ ] ,
114114 } )
115115 return payload . parentInstances
116116 }
@@ -119,47 +119,47 @@ export class DevtoolsApi {
119119 const payload = await this . callHook ( Hooks . INSPECT_COMPONENT , {
120120 app,
121121 componentInstance : instance ,
122- instanceData : null
122+ instanceData : null ,
123123 } )
124124 return payload . instanceData
125125 }
126126
127127 async getComponentBounds ( instance : ComponentInstance ) {
128128 const payload = await this . callHook ( Hooks . GET_COMPONENT_BOUNDS , {
129129 componentInstance : instance ,
130- bounds : null
130+ bounds : null ,
131131 } )
132132 return payload . bounds
133133 }
134134
135135 async getComponentName ( instance : ComponentInstance ) {
136136 const payload = await this . callHook ( Hooks . GET_COMPONENT_NAME , {
137137 componentInstance : instance ,
138- name : null
138+ name : null ,
139139 } )
140140 return payload . name
141141 }
142142
143143 async getComponentInstances ( app : App ) {
144144 const payload = await this . callHook ( Hooks . GET_COMPONENT_INSTANCES , {
145145 app,
146- componentInstances : [ ]
146+ componentInstances : [ ] ,
147147 } )
148148 return payload . componentInstances
149149 }
150150
151151 async getElementComponent ( element : HTMLElement | any ) {
152152 const payload = await this . callHook ( Hooks . GET_ELEMENT_COMPONENT , {
153153 element,
154- componentInstance : null
154+ componentInstance : null ,
155155 } )
156156 return payload . componentInstance
157157 }
158158
159159 async getComponentRootElements ( instance : ComponentInstance ) {
160160 const payload = await this . callHook ( Hooks . GET_COMPONENT_ROOT_ELEMENTS , {
161161 componentInstance : instance ,
162- rootElements : [ ]
162+ rootElements : [ ] ,
163163 } )
164164 return payload . rootElements
165165 }
@@ -172,15 +172,15 @@ export class DevtoolsApi {
172172 path : arrayPath ,
173173 type,
174174 state,
175- set : ( object , path = arrayPath , value = state . value , cb ?) => this . stateEditor . set ( object , path , value , cb || this . stateEditor . createDefaultSetCallback ( state ) )
175+ set : ( object , path = arrayPath , value = state . value , cb ?) => this . stateEditor . set ( object , path , value , cb || this . stateEditor . createDefaultSetCallback ( state ) ) ,
176176 } )
177177 return payload . componentInstance
178178 }
179179
180180 async getComponentDevtoolsOptions ( instance : ComponentInstance ) : Promise < ComponentDevtoolsOptions > {
181181 const payload = await this . callHook ( Hooks . GET_COMPONENT_DEVTOOLS_OPTIONS , {
182182 componentInstance : instance ,
183- options : null
183+ options : null ,
184184 } )
185185 return payload . options || { }
186186 }
@@ -190,10 +190,10 @@ export class DevtoolsApi {
190190 } > {
191191 const payload = await this . callHook ( Hooks . GET_COMPONENT_RENDER_CODE , {
192192 componentInstance : instance ,
193- code : null
193+ code : null ,
194194 } )
195195 return {
196- code : payload . code
196+ code : payload . code ,
197197 }
198198 }
199199
@@ -203,7 +203,7 @@ export class DevtoolsApi {
203203 layerId : eventData . layerId ,
204204 app,
205205 data : eventData . event . data ,
206- all : eventData . all
206+ all : eventData . all ,
207207 } )
208208 return payload . data
209209 }
@@ -217,7 +217,7 @@ export class DevtoolsApi {
217217 inspectorId,
218218 app,
219219 filter,
220- rootNodes : [ ]
220+ rootNodes : [ ] ,
221221 } )
222222 return payload . rootNodes
223223 }
@@ -227,7 +227,7 @@ export class DevtoolsApi {
227227 inspectorId,
228228 app,
229229 nodeId,
230- state : null
230+ state : null ,
231231 } )
232232 return payload . state
233233 }
@@ -241,7 +241,7 @@ export class DevtoolsApi {
241241 path : arrayPath ,
242242 type,
243243 state,
244- set : ( object , path = arrayPath , value = state . value , cb ?) => this . stateEditor . set ( object , path , value , cb || this . stateEditor . createDefaultSetCallback ( state ) )
244+ set : ( object , path = arrayPath , value = state . value , cb ?) => this . stateEditor . set ( object , path , value , cb || this . stateEditor . createDefaultSetCallback ( state ) ) ,
245245 } )
246246 }
247247}
0 commit comments