@edgedev/firebase 1.9.3 → 1.9.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgedev/firebase",
3
- "version": "1.9.3",
3
+ "version": "1.9.4",
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": {
package/src/functions.js CHANGED
@@ -128,7 +128,6 @@ exports.updateUser = functions.firestore.document('staged-users/{docId}').onUpda
128
128
  return shouldProcess(eventRef).then((process) => {
129
129
  if (process) {
130
130
  // Note: we can trust on newData.uid because we are checking in rules that it matches the auth.uid
131
- // TODO: user might be invited to join another org with reg code.. if used when logged will combine new staged-user doc into first stage-user doc and sync to users.
132
131
  if (newData.userId) {
133
132
  const userRef = db.collection('users').doc(newData.userId)
134
133
  setUser(userRef, newData, oldData, stagedDocId).then(() => {
@@ -22,12 +22,12 @@ awk '/\/\/ #EDGE FIREBASE RULES START/,/\/\/ #EDGE FIREBASE RULES END/' ./src/fi
22
22
  sed -e '1s/^/\/\/ #EDGE FIREBASE RULES START\n/' -e '$s/$/\n\/\/ #EDGE FIREBASE RULES END/' \
23
23
  >> "$project_root/firestore.rules";
24
24
 
25
- if [ ! -f ./functions/index.js ]; then
26
- mkdir -p ./functions
25
+ if [ ! -f "$project_root/functions/index.js" ]; then
26
+ mkdir -p "$project_root/functions"
27
27
  echo "const functions = require('firebase-functions');" > ./functions/index.js;
28
28
  echo "const admin = require('firebase-admin');" >> ./functions/index.js;
29
29
  echo "admin.initializeApp();" >> ./functions/index.js;
30
- echo "const db = admin.firestore();" >> ./functions/index.js;
30
+ echo "const db = admin.firestore();" >> "$project_root/functions/index.js";
31
31
  fi
32
32
 
33
33
  [ "$(tail -c1 $project_root/functions/index.js)" != "" ] && echo "" >> "$project_root/functions/index.js"