@@ -44,6 +44,7 @@ describe('useExtensionsData', () => {
44
44
45
45
expect ( result . current ) . toEqual ( [
46
46
{
47
+ id : 'pirojok-the-published-extension' ,
47
48
authorName : 'Awesome Inc' ,
48
49
authorUrl : 'https://google.com/awesome' ,
49
50
params : [ ] ,
@@ -93,14 +94,15 @@ describe('useExtensionsData', () => {
93
94
sourceUrl : '' ,
94
95
extensionDetailsUrl :
95
96
'https://firebase.google.com/products/extensions/good-tool' ,
96
- id : 'pirojok-the-published-extension' ,
97
+
97
98
ref :
'awesome-inc/[email protected] ' ,
98
99
iconUri :
99
100
'https://www.gstatic.com/mobilesdk/211001_mobilesdk/google-pay-logo.svg' ,
100
101
publisherIconUri :
101
102
'https://www.gstatic.com/mobilesdk/160503_mobilesdk/logo/2x/firebase_128dp.png' ,
102
103
} ,
103
104
{
105
+ id : 'pirojok-the-local-extension' ,
104
106
authorName : 'Awesome Inc' ,
105
107
authorUrl : 'https://google.com/awesome' ,
106
108
params : [ ] ,
@@ -150,7 +152,65 @@ describe('useExtensionsData', () => {
150
152
sourceUrl : '' ,
151
153
extensionDetailsUrl :
152
154
'https://firebase.google.com/products/extensions/good-tool' ,
153
- id : 'pirojok-the-local-extension' ,
155
+ } ,
156
+ {
157
+ id : 'pirojok-the-dynamic-extension' ,
158
+ authorName : 'Awesome Inc' ,
159
+ authorUrl : 'https://google.com/awesome' ,
160
+ params : [ ] ,
161
+ name : 'good-tool' ,
162
+ displayName : 'Pirojok-the-tool' ,
163
+ specVersion : 'v1beta' ,
164
+ env : {
165
+ ALLOWED_EVENT_TYPES : 'google.firebase.v1.custom-event-occurred' ,
166
+ EVENTARC_CHANNEL :
167
+ 'projects/test-project/locations/us-west1/channels/firebase' ,
168
+ } ,
169
+ allowedEventTypes : [ 'google.firebase.v1.custom-event-occurred' ] ,
170
+ eventarcChannel :
171
+ 'projects/test-project/locations/us-west1/channels/firebase' ,
172
+ events : [
173
+ {
174
+ type : 'google.firebase.v1.custom-event-occurred' ,
175
+ description : 'A custom event occurred' ,
176
+ } ,
177
+ ] ,
178
+ apis : [
179
+ {
180
+ apiName : 'storage-component.googleapis.com' ,
181
+ reason : 'Needed to use Cloud Storage' ,
182
+ } ,
183
+ ] ,
184
+ resources : [
185
+ {
186
+ type : 'firebaseextensions.v1beta.function' ,
187
+ description :
188
+ 'Listens for new images uploaded to your specified Cloud Storage bucket, resizes the images, then stores the resized images in the same bucket. Optionally keeps or deletes the original images.' ,
189
+ name : 'generateResizedImage' ,
190
+ propertiesYaml :
191
+ // eslint-disable-next-line no-template-curly-in-string
192
+ 'availableMemoryMb: 1024\neventTrigger:\n eventType: google.storage.object.finalize\n resource: projects/_/buckets/${param:IMG_BUCKET}\nlocation: ${param:LOCATION}\nruntime: nodejs14\n' ,
193
+ } ,
194
+ ] ,
195
+ roles : [
196
+ {
197
+ role : 'storage.admin' ,
198
+ reason :
199
+ 'Allows the extension to store resized images in Cloud Storage' ,
200
+ } ,
201
+ ] ,
202
+ readmeContent : '' ,
203
+ postinstallContent : '### See it in action' ,
204
+ sourceUrl : '' ,
205
+ extensionDetailsUrl :
206
+ 'https://firebase.google.com/products/extensions/good-tool' ,
207
+
208
+ ref :
'awesome-inc/[email protected] ' ,
209
+ iconUri :
210
+ 'https://www.gstatic.com/mobilesdk/211001_mobilesdk/google-pay-logo.svg' ,
211
+ publisherIconUri :
212
+ 'https://www.gstatic.com/mobilesdk/160503_mobilesdk/logo/2x/firebase_128dp.png' ,
213
+ labels : { createdBy : 'SDK' , codebase : 'default' } ,
154
214
} ,
155
215
] ) ;
156
216
} ) ;
0 commit comments