@@ -58,55 +58,47 @@ export const DownloadDetails: { [s in DownloadableEmulators]: EmulatorDownloadDe
58
58
database : {
59
59
downloadPath : path . join (
60
60
CACHE_DIR ,
61
- `firebase-database-emulator-v ${ EMULATOR_UPDATE_DETAILS . database . version } .jar` ,
61
+ EMULATOR_UPDATE_DETAILS . database . downloadPathRelativeToCacheDir ,
62
62
) ,
63
63
version : EMULATOR_UPDATE_DETAILS . database . version ,
64
64
opts : {
65
+ ...EMULATOR_UPDATE_DETAILS . database ,
65
66
cacheDir : CACHE_DIR ,
66
- remoteUrl : `https://storage.googleapis.com/firebase-preview-drop/emulator/firebase-database-emulator-v${ EMULATOR_UPDATE_DETAILS . database . version } .jar` ,
67
- expectedSize : EMULATOR_UPDATE_DETAILS . database . expectedSize ,
68
- expectedChecksum : EMULATOR_UPDATE_DETAILS . database . expectedChecksum ,
69
67
namePrefix : "firebase-database-emulator" ,
70
68
} ,
71
69
} ,
72
70
firestore : {
73
71
downloadPath : path . join (
74
72
CACHE_DIR ,
75
- `cloud-firestore-emulator-v ${ EMULATOR_UPDATE_DETAILS . firestore . version } .jar` ,
73
+ EMULATOR_UPDATE_DETAILS . firestore . downloadPathRelativeToCacheDir ,
76
74
) ,
77
75
version : EMULATOR_UPDATE_DETAILS . firestore . version ,
78
76
opts : {
77
+ ...EMULATOR_UPDATE_DETAILS . firestore ,
79
78
cacheDir : CACHE_DIR ,
80
- remoteUrl : `https://storage.googleapis.com/firebase-preview-drop/emulator/cloud-firestore-emulator-v${ EMULATOR_UPDATE_DETAILS . firestore . version } .jar` ,
81
- expectedSize : EMULATOR_UPDATE_DETAILS . firestore . expectedSize ,
82
- expectedChecksum : EMULATOR_UPDATE_DETAILS . firestore . expectedChecksum ,
83
79
namePrefix : "cloud-firestore-emulator" ,
84
80
} ,
85
81
} ,
86
82
storage : {
87
83
downloadPath : path . join (
88
84
CACHE_DIR ,
89
- `cloud-storage-rules-runtime-v ${ EMULATOR_UPDATE_DETAILS . storage . version } .jar` ,
85
+ EMULATOR_UPDATE_DETAILS . storage . downloadPathRelativeToCacheDir ,
90
86
) ,
91
87
version : EMULATOR_UPDATE_DETAILS . storage . version ,
92
88
opts : {
89
+ ...EMULATOR_UPDATE_DETAILS . storage ,
93
90
cacheDir : CACHE_DIR ,
94
- remoteUrl : `https://storage.googleapis.com/firebase-preview-drop/emulator/cloud-storage-rules-runtime-v${ EMULATOR_UPDATE_DETAILS . storage . version } .jar` ,
95
- expectedSize : EMULATOR_UPDATE_DETAILS . storage . expectedSize ,
96
- expectedChecksum : EMULATOR_UPDATE_DETAILS . storage . expectedChecksum ,
97
91
namePrefix : "cloud-storage-rules-emulator" ,
98
92
} ,
99
93
} ,
100
94
ui : {
101
95
version : emulatorUiDetails . version ,
102
- downloadPath : path . join ( CACHE_DIR , `ui-v ${ emulatorUiDetails . version } .zip` ) ,
96
+ downloadPath : path . join ( CACHE_DIR , emulatorUiDetails . downloadPathRelativeToCacheDir ) ,
103
97
unzipDir : path . join ( CACHE_DIR , `ui-v${ emulatorUiDetails . version } ` ) ,
104
- binaryPath : path . join ( CACHE_DIR , `ui-v ${ emulatorUiDetails . version } ` , "server" , "server.mjs" ) ,
98
+ binaryPath : path . join ( CACHE_DIR , emulatorUiDetails . binaryPathRelativeToCacheDir ! ) ,
105
99
opts : {
100
+ ...emulatorUiDetails ,
106
101
cacheDir : CACHE_DIR ,
107
- remoteUrl : `https://storage.googleapis.com/firebase-preview-drop/emulator/ui-v${ emulatorUiDetails . version } .zip` ,
108
- expectedSize : emulatorUiDetails . expectedSize ,
109
- expectedChecksum : emulatorUiDetails . expectedChecksum ,
110
102
skipCache : experiments . isEnabled ( "emulatoruisnapshot" ) ,
111
103
skipChecksumAndSize : experiments . isEnabled ( "emulatoruisnapshot" ) ,
112
104
namePrefix : "ui" ,
@@ -115,43 +107,24 @@ export const DownloadDetails: { [s in DownloadableEmulators]: EmulatorDownloadDe
115
107
pubsub : {
116
108
downloadPath : path . join (
117
109
CACHE_DIR ,
118
- `pubsub-emulator- ${ EMULATOR_UPDATE_DETAILS . pubsub . version } .zip` ,
110
+ EMULATOR_UPDATE_DETAILS . pubsub . downloadPathRelativeToCacheDir ,
119
111
) ,
120
112
version : EMULATOR_UPDATE_DETAILS . pubsub . version ,
121
113
unzipDir : path . join ( CACHE_DIR , `pubsub-emulator-${ EMULATOR_UPDATE_DETAILS . pubsub . version } ` ) ,
122
- binaryPath : path . join (
123
- CACHE_DIR ,
124
- `pubsub-emulator-${ EMULATOR_UPDATE_DETAILS . pubsub . version } ` ,
125
- `pubsub-emulator/bin/cloud-pubsub-emulator${ process . platform === "win32" ? ".bat" : "" } ` ,
126
- ) ,
114
+ binaryPath : path . join ( CACHE_DIR , EMULATOR_UPDATE_DETAILS . pubsub . binaryPathRelativeToCacheDir ! ) ,
127
115
opts : {
116
+ ...EMULATOR_UPDATE_DETAILS . pubsub ,
128
117
cacheDir : CACHE_DIR ,
129
- remoteUrl : `https://storage.googleapis.com/firebase-preview-drop/emulator/pubsub-emulator-${ EMULATOR_UPDATE_DETAILS . pubsub . version } .zip` ,
130
- expectedSize : EMULATOR_UPDATE_DETAILS . pubsub . expectedSize ,
131
- expectedChecksum : EMULATOR_UPDATE_DETAILS . pubsub . expectedChecksum ,
132
118
namePrefix : "pubsub-emulator" ,
133
119
} ,
134
120
} ,
135
121
dataconnect : {
136
- downloadPath : path . join (
137
- CACHE_DIR ,
138
- `dataconnect-emulator-${ dataconnectDetails . version } ${ process . platform === "win32" ? ".exe" : "" } ` ,
139
- ) ,
122
+ downloadPath : path . join ( CACHE_DIR , dataconnectDetails . downloadPathRelativeToCacheDir ) ,
140
123
version : dataconnectDetails . version ,
141
- binaryPath : path . join (
142
- CACHE_DIR ,
143
- `dataconnect-emulator-${ dataconnectDetails . version } ${ process . platform === "win32" ? ".exe" : "" } ` ,
144
- ) ,
124
+ binaryPath : path . join ( CACHE_DIR , dataconnectDetails . downloadPathRelativeToCacheDir ) ,
145
125
opts : {
126
+ ...dataconnectDetails ,
146
127
cacheDir : CACHE_DIR ,
147
- remoteUrl :
148
- process . platform === "darwin"
149
- ? `https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-macos-v${ dataconnectDetails . version } `
150
- : process . platform === "win32"
151
- ? `https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-windows-v${ dataconnectDetails . version } `
152
- : `https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-linux-v${ dataconnectDetails . version } ` ,
153
- expectedSize : dataconnectDetails . expectedSize ,
154
- expectedChecksum : dataconnectDetails . expectedChecksum ,
155
128
skipChecksumAndSize : false ,
156
129
namePrefix : "dataconnect-emulator" ,
157
130
auth : false ,
0 commit comments