forked from firefox-devtools/debugger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
180 lines (157 loc) · 4.25 KB
/
index.js
File metadata and controls
180 lines (157 loc) · 4.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
// @flow
import type { Frame, Scope, Why, WorkerList, MainThread } from "../../types";
import type { State } from "../../reducers/types";
import type { MatchedLocations } from "../../reducers/file-search";
import type { TreeNode } from "../../utils/sources-tree/types";
import type { SearchOperation } from "../../reducers/project-text-search";
import type { BreakpointAction } from "./BreakpointAction";
import type { SourceAction } from "./SourceAction";
import type { UIAction } from "./UIAction";
import type { PauseAction } from "./PauseAction";
import type { ASTAction } from "./ASTAction";
import { clientCommands } from "../../client/firefox";
import type { Panel } from "../../client/firefox/types";
/**
* Flow types
* @module actions/types
*/
/**
* Argument parameters via Thunk middleware for {@link https://github.com/gaearon/redux-thunk|Redux Thunk}
*
* @memberof actions/breakpoints
* @static
* @typedef {Object} ThunkArgs
*/
export type ThunkArgs = {
dispatch: (action: any) => Promise<any>,
getState: () => State,
client: typeof clientCommands,
sourceMaps: any,
panel: Panel
};
export type Thunk = ThunkArgs => any;
export type ActionType = Object | Function;
type ProjectTextSearchResult = {
sourceId: string,
filepath: string,
matches: MatchedLocations[]
};
type AddTabAction = {|
+type: "ADD_TAB",
+url: string,
+framework?: string,
+isOriginal?: boolean,
+sourceId?: string
|};
type UpdateTabAction = {|
+type: "UPDATE_TAB",
+url: string,
+framework?: string,
+isOriginal?: boolean,
+sourceId?: string
|};
type ReplayAction =
| {|
+type: "TRAVEL_TO",
+data: {
paused: {
why: Why,
scopes: Scope[],
frames: Frame[],
selectedFrameId: string,
loadedObjects: Object
},
expressions?: Object[]
},
+position: number
|}
| {|
+type: "CLEAR_HISTORY"
|};
type NavigateAction =
| {| +type: "CONNECT", +mainThread: MainThread, +canRewind: boolean |}
| {| +type: "NAVIGATE", +mainThread: MainThread |};
export type FocusItem = {
thread: string,
item: TreeNode
};
export type SourceTreeAction =
| {| +type: "SET_EXPANDED_STATE", +thread: string, +expanded: any |}
| {| +type: "SET_FOCUSED_SOURCE_ITEM", item: FocusItem |};
export type ProjectTextSearchAction =
| {| +type: "ADD_QUERY", +query: string |}
| {|
+type: "ADD_SEARCH_RESULT",
+result: ProjectTextSearchResult
|}
| {| +type: "UPDATE_STATUS", +status: string |}
| {| +type: "CLEAR_SEARCH_RESULTS" |}
| {| +type: "ADD_ONGOING_SEARCH", +ongoingSearch: SearchOperation |}
| {| +type: "CLEAR_SEARCH" |};
export type FileTextSearchModifier =
| "caseSensitive"
| "wholeWord"
| "regexMatch";
export type FileTextSearchAction =
| {|
+type: "TOGGLE_FILE_SEARCH_MODIFIER",
+modifier: FileTextSearchModifier
|}
| {|
+type: "UPDATE_FILE_SEARCH_QUERY",
+query: string
|}
| {|
+type: "UPDATE_SEARCH_RESULTS",
+results: {
matches: MatchedLocations[],
matchIndex: number,
count: number,
index: number
}
|};
export type QuickOpenAction =
| {| +type: "SET_QUICK_OPEN_QUERY", +query: string |}
| {| +type: "OPEN_QUICK_OPEN", +query?: string |}
| {| +type: "CLOSE_QUICK_OPEN" |};
export type DebugeeAction =
| {|
+type: "SET_WORKERS",
+workers: WorkerList,
+mainThread: string
|}
| {|
+type: "SELECT_THREAD",
+thread: string
|};
export type {
StartPromiseAction,
DonePromiseAction,
ErrorPromiseAction
} from "../utils/middleware/promise";
export type { panelPositionType } from "./UIAction";
export type { ASTAction } from "./ASTAction";
/**
* Actions: Source, Breakpoint, and Navigation
*
* @memberof actions/types
* @static
*/
export type Action =
| AddTabAction
| UpdateTabAction
| SourceAction
| BreakpointAction
| PauseAction
| NavigateAction
| UIAction
| ASTAction
| QuickOpenAction
| FileTextSearchAction
| ProjectTextSearchAction
| DebugeeAction
| ReplayAction
| SourceTreeAction;