@pisell/utils 1.0.25 → 1.0.26

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.
@@ -1,7 +1,11 @@
1
1
  import { FirebaseApp } from 'firebase/app';
2
+ import { Auth } from 'firebase/auth';
3
+ import { Database } from 'firebase/database';
2
4
  declare let firebaseApp: FirebaseApp;
5
+ declare let auth: Auth;
6
+ declare let database: Database;
3
7
  export declare const initFirebase: (config?: any) => void;
4
- export { firebaseApp };
8
+ export { database, firebaseApp, auth };
5
9
  export declare const getPath: (path: string) => string;
6
10
  export declare const setAuthStateChangeCallback: (callback: (user: any) => void) => void;
7
11
  export declare const signUp: (email: string, password: string) => Promise<import("firebase/auth").User>;
@@ -30,7 +30,7 @@ if (isClient && window.__wxjs_environment !== "miniprogram" && isDefaultInit) {
30
30
  }
31
31
 
32
32
  // 导出 Firebase 配置,以便在需要时进行访问
33
- export { firebaseApp };
33
+ export { database, firebaseApp, auth };
34
34
 
35
35
  // 配置化 Firebase 路径
36
36
  export var getPath = function getPath(path) {
@@ -1,7 +1,11 @@
1
1
  import { FirebaseApp } from 'firebase/app';
2
+ import { Auth } from 'firebase/auth';
3
+ import { Database } from 'firebase/database';
2
4
  declare let firebaseApp: FirebaseApp;
5
+ declare let auth: Auth;
6
+ declare let database: Database;
3
7
  export declare const initFirebase: (config?: any) => void;
4
- export { firebaseApp };
8
+ export { database, firebaseApp, auth };
5
9
  export declare const getPath: (path: string) => string;
6
10
  export declare const setAuthStateChangeCallback: (callback: (user: any) => void) => void;
7
11
  export declare const signUp: (email: string, password: string) => Promise<import("firebase/auth").User>;
@@ -19,6 +19,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  // src/firebase/index.ts
20
20
  var firebase_exports = {};
21
21
  __export(firebase_exports, {
22
+ auth: () => auth,
23
+ database: () => database,
22
24
  default: () => firebase_default,
23
25
  firebaseApp: () => firebaseApp,
24
26
  getPath: () => getPath,
@@ -133,6 +135,8 @@ var firebase_default = {
133
135
  };
134
136
  // Annotate the CommonJS export names for ESM import in node:
135
137
  0 && (module.exports = {
138
+ auth,
139
+ database,
136
140
  firebaseApp,
137
141
  getPath,
138
142
  initFirebase,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/utils",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "sideEffects": false,
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",