Skip to content

Commit bfd93bc

Browse files
committed
fix(emulator): missing storage
1 parent 6ee1c49 commit bfd93bc

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
rules_version = '2';
22
service firebase.storage {
33
match /b/{bucket}/o {
4-
match /{allPaths=**} {
5-
allow read, write: if false;
4+
match /tests/{allPaths=**} {
5+
allow read, write: if true;
6+
}
7+
match /demo/{userId}/{allPaths=**} {
8+
allow read: if true;
9+
allow write: if request.auth.uid == userId;
610
}
711
}
812
}

packages/nuxt/src/module.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,13 @@ async function enableEmulators(
419419
return
420420
}
421421

422-
const services = ['auth', 'database', 'firestore', 'functions'] as const
422+
const services = [
423+
'auth',
424+
'database',
425+
'firestore',
426+
'functions',
427+
'storage',
428+
] as const
423429

424430
const defaultHost =
425431
typeof emulatorOptions === 'object' ? emulatorOptions.host : 'localhost'
@@ -544,8 +550,8 @@ type FirebaseEmulatorService =
544550
| 'database'
545551
| 'firestore'
546552
| 'functions'
547-
// | 'hosting' we are the hosting emulator
548553
| 'storage'
554+
// | 'hosting' we are the hosting emulator
549555

550556
type FirebaseEmulatorsToEnable = {
551557
[key in FirebaseEmulatorService]: { host: string; port: number }

packages/nuxt/src/runtime/emulators/storage.plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export default defineNuxtPlugin((nuxtApp) => {
1616
public: { vuefire },
1717
} = useRuntimeConfig()
1818

19-
const host = vuefire?.emulators?.functions?.host
20-
const port = vuefire?.emulators?.functions?.port
19+
const host = vuefire?.emulators?.storage?.host
20+
const port = vuefire?.emulators?.storage?.port
2121

2222
if (!host || !port) {
2323
return

0 commit comments

Comments
 (0)