@edgedev/firebase 2.0.32 → 2.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/edgeFirebase.ts CHANGED
@@ -55,7 +55,7 @@ import {
55
55
  } from "firebase/auth";
56
56
 
57
57
 
58
- import { getStorage, ref as storageRef, uploadBytes, getDownloadURL} from "firebase/storage";
58
+ import { getStorage, ref as storageRef, uploadBytes, getDownloadURL, connectStorageEmulator} from "firebase/storage";
59
59
 
60
60
  import { getFunctions, httpsCallable, connectFunctionsEmulator } from "firebase/functions";
61
61
 
@@ -181,6 +181,7 @@ interface firebaseConfig {
181
181
  measurementId?: string;
182
182
  emulatorFirestore?: string;
183
183
  emulatorFunctions?: string;
184
+ emulatorStorage?: string;
184
185
  }
185
186
 
186
187
  interface actionResponse {
@@ -206,7 +207,8 @@ export const EdgeFirebase = class {
206
207
  measurementId: "",
207
208
  emulatorAuth: "",
208
209
  emulatorFirestore: "",
209
- emulatorFunctions: ""
210
+ emulatorFunctions: "",
211
+ emulatorStorage: "",
210
212
  },
211
213
  isPersistant: false,
212
214
  enablePopupRedirect: false,
@@ -242,7 +244,9 @@ export const EdgeFirebase = class {
242
244
  if (this.firebaseConfig.emulatorFunctions) {
243
245
  connectFunctionsEmulator(this.functions, "127.0.0.1", this.firebaseConfig.emulatorFunctions)
244
246
  }
245
- this.setOnAuthStateChanged();
247
+ if (this.firebaseConfig.emulatorStorage) {
248
+ connectStorageEmulator(this.storage, "127.0.0.1", this.firebaseConfig.emulatorStorage)
249
+ }
246
250
  }
247
251
 
248
252
  private firebaseConfig = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgedev/firebase",
3
- "version": "2.0.32",
3
+ "version": "2.0.33",
4
4
  "description": "Vue 3 / Nuxt 3 Plugin or Nuxt 3 plugin for firebase authentication and firestore.",
5
5
  "main": "index.ts",
6
6
  "scripts": {
@@ -7,4 +7,5 @@ VITE_FIREBASE_APP_ID=
7
7
  VITE_FIREBASE_MEASUREMENT_ID=
8
8
  VITE_FIREBASE_EMULATOR_AUTH=9099
9
9
  VITE_FIREBASE_EMULATOR_FIRESTORE=8080
10
- VITE_FIREBASE_EMULATOR_FUNCTIONS=5001
10
+ VITE_FIREBASE_EMULATOR_FUNCTIONS=5001
11
+ VITE_FIREBASE_EMULATOR_STORAGE=9199
@@ -7,4 +7,5 @@ VITE_FIREBASE_APP_ID=
7
7
  VITE_FIREBASE_MEASUREMENT_ID=
8
8
  VITE_FIREBASE_EMULATOR_AUTH=
9
9
  VITE_FIREBASE_EMULATOR_FIRESTORE=
10
- VITE_FIREBASE_EMULATOR_FUNCTIONS=
10
+ VITE_FIREBASE_EMULATOR_FUNCTIONS=
11
+ VITE_FIREBASE_EMULATOR_STORAGE=
@@ -60,12 +60,12 @@ if [ ! -f "$project_root/functions/.env.prod" ]; then
60
60
  cp ./src/.env.prod "$project_root/functions/.env.prod"
61
61
  fi
62
62
 
63
- if [ ! -f "$project_root/.env.development" ]; then
64
- cp ./src/.env.development "$project_root/.env.development"
63
+ if [ ! -f "$project_root/.env.dev" ]; then
64
+ cp ./src/.env.development "$project_root/.env.dev"
65
65
  fi
66
66
 
67
- if [ ! -f "$project_root/.env.production" ]; then
68
- cp ./src/.env.production "$project_root/.env.production"
67
+ if [ ! -f "$project_root/.env" ]; then
68
+ cp ./src/.env.production "$project_root/.env"
69
69
  fi
70
70
 
71
71
  if [ ! -f "$project_root/functions/package.json" ]; then