-
-
Notifications
You must be signed in to change notification settings - Fork 544
Expand file tree
/
Copy pathbrowser-paths.ts
More file actions
151 lines (145 loc) · 3.08 KB
/
Copy pathbrowser-paths.ts
File metadata and controls
151 lines (145 loc) · 3.08 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
export type BrowserPlatform = 'windows' | 'mac' | 'linux';
export type KnownTarget =
| 'arc'
| 'brave'
| 'chromium'
| 'chrome'
| 'chrome-beta'
| 'chrome-dev'
| 'chrome-canary'
| 'dia'
| 'edge'
| 'edge-beta'
| 'edge-dev'
| 'edge-canary'
| 'firefox'
| 'firefox-nightly'
| 'firefox-developer-edition'
| 'zen';
export const KNOWN_BROWSER_PATHS: Record<
KnownTarget,
Record<BrowserPlatform, string[]>
> = {
// Chromium based targets
arc: {
mac: ['/Applications/Arc.app/Contents/MacOS/Arc'],
linux: [],
windows: [],
},
brave: {
mac: ['Applications/Brave Browser.app/Contents/MacOS/Brave Browser'],
linux: [],
windows: [],
},
chromium: {
mac: [],
linux: [
// Arch
'/usr/bin/chromium',
],
windows: [],
},
chrome: {
mac: [
'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
'/Applications/Chrome.app/Contents/MacOS/Google Chrome',
],
linux: [],
windows: ['C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'],
},
'chrome-beta': {
mac: [],
linux: [],
windows: [],
},
'chrome-canary': {
mac: [
'/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary',
'/Applications/Chrome Canary.app/Contents/MacOS/Google Chrome Canary',
],
linux: [],
windows: [],
},
'chrome-dev': {
mac: [],
linux: [],
windows: [],
},
dia: {
mac: ['/Applications/Dia.app/Contents/MacOS/Dia'],
linux: [],
windows: [],
},
edge: {
mac: [],
linux: [],
windows: [],
},
'edge-beta': {
mac: [],
linux: [],
windows: [],
},
'edge-canary': {
mac: [],
linux: [],
windows: [],
},
'edge-dev': {
mac: [],
linux: [],
windows: [],
},
// Firefox based targets
firefox: {
mac: ['/Applications/Firefox.app/Contents/MacOS/firefox'],
linux: [
// Arch
'/usr/bin/firefox',
],
windows: [],
},
'firefox-nightly': {
mac: ['/Applications/Firefox Nightly.app/Contents/MacOS/firefox'],
linux: [],
windows: ['C:\\Program Files\\Firefox Nightly\\firefox.exe'],
},
'firefox-developer-edition': {
mac: ['/Applications/Firefox Developer Edition.app/Contents/MacOS/firefox'],
linux: [
// Arch
'/usr/bin/firefox-developer-edition',
],
windows: [],
},
zen: {
mac: [
'/Applications/Zen Browser.app/Contents/MacOS/zen',
// Homebrew Cask
// https://github.com/Homebrew/homebrew-cask/blob/main/Casks/z/zen.rb#L23C13-L23C19
'/Applications/Zen.app/Contents/MacOS/zen',
],
linux: [],
windows: [],
},
};
/**
* When targeting a browser, this map contains the other targets to fall back on
* when a binary could not be found for the primary target.
*/
export const FALLBACK_TARGETS: Partial<Record<KnownTarget, KnownTarget[]>> = {
chrome: [
'chromium',
'chrome-canary',
'chrome-beta',
'chrome-dev',
'brave',
'arc',
'dia',
'edge',
'edge-canary',
'edge-beta',
'edge-dev',
],
firefox: ['firefox-developer-edition', 'firefox-nightly', 'zen'],
};