firebase-config -> tracker-list

This commit is contained in:
CoolElectronics 2023-08-15 20:00:18 -04:00
parent aa503383f4
commit 494ef6a4a9
No known key found for this signature in database
GPG key ID: F63593D168636C50
10 changed files with 38 additions and 36 deletions

View file

@ -1,24 +0,0 @@
// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
import { getAuth } from "firebase/auth";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: "AIzaSyCs1LOqsbrAjymIcjvbKxPhFQWXlSPiLTs",
authDomain: "adrift-6c1f6.firebaseapp.com",
projectId: "adrift-6c1f6",
storageBucket: "adrift-6c1f6.appspot.com",
messagingSenderId: "175846512414",
appId: "1:175846512414:web:5c6e06d231ab58e9029b0f",
measurementId: "G-L0P2EF6Q72",
};
console.warn("firebase is initializing");
// Initialize Firebase
export const app = initializeApp(firebaseConfig);
export const auth = getAuth(app);
// export const analytics = getAnalytics(app);

View file

@ -22,7 +22,7 @@
"esbuild": "^0.19.1",
"esbuild-plugin-inline-import": "^1.0.1",
"firebase": "^10.1.0",
"firebase-config": "workspace:*",
"tracker-list": "workspace:*",
"m3-svelte": "^2.0.3",
"postcss": "^8.4.27",
"postcss-load-config": "^4.0.1",

View file

@ -20,7 +20,7 @@
TextField,
} from "m3-svelte";
// note: even though we import firebase, due to the tree shaking, it will only run if we use "auth" so if ADRIFT_DEV is set it won't import
import { auth } from "firebase-config";
// import { auth } from "firebase-config";
import { signInWithEmailAndPassword } from "firebase/auth";
import { getDatabase, onValue, ref, set } from "firebase/database";
import type { Transport } from "protocol";

View file

@ -3,7 +3,7 @@ packages:
- server
- frontend
- client
- firebase-config
- tracker-list
- corium
- Ultraviolet
- Dynamic

View file

@ -15,7 +15,7 @@
"express": "^4.18.2",
"express-ws": "^5.0.2",
"firebase": "^10.1.0",
"firebase-config": "workspace:*",
"tracker-list": "workspace:*",
"ipaddr.js": "^2.1.0",
"isomorphic-ws": "^5.0.0",
"protocol": "workspace:*",
@ -32,4 +32,4 @@
"@types/ws": "^8.5.5",
"nodemon": "^3.0.1"
}
}
}

View file

@ -5,7 +5,7 @@ import expressWs from "express-ws";
import { signInWithEmailAndPassword } from "firebase/auth";
import wrtc from "wrtc";
import { auth } from "firebase-config";
import { getDatabase, onValue, ref, set } from "firebase/database";
import { AdriftServer } from "./server";

View file

@ -1,5 +1,5 @@
{
"name": "firebase-config",
"name": "tracker-list",
"version": "1.0.0",
"description": "",
"main": "src/index.ts",
@ -9,7 +9,5 @@
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"firebase": "^10.1.0"
}
}
"dependencies": {}
}

28
tracker-list/src/index.ts Normal file
View file

@ -0,0 +1,28 @@
let trackers: {
[name: string]: {
firebase: {
apiKey: string;
authDomain: string;
projectId: string;
storageBucket: string;
messagingSenderId: string;
appId: string;
measurementId: string;
}
tracker: string;
}
} = {
"us-central-1": {
firebase: {
apiKey: "AIzaSyCs1LOqsbrAjymIcjvbKxPhFQWXlSPiLTs",
authDomain: "adrift-6c1f6.firebaseapp.com",
projectId: "adrift-6c1f6",
storageBucket: "adrift-6c1f6.appspot.com",
messagingSenderId: "175846512414",
appId: "1:175846512414:web:5c6e06d231ab58e9029b0f",
measurementId: "G-L0P2EF6Q72",
},
tracker: "wss://lb1.mercurywork.shop"
}
};
export default trackers;

View file

@ -15,7 +15,7 @@
"express-ws": "^5.0.2",
"firebase": "^10.1.0",
"firebase-admin": "^11.10.1",
"firebase-config": "workspace:*",
"tracker-list": "workspace:*",
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
},