react-firebase-ql 2.0.7 → 2.0.9
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/dist/index.js +9 -9
- package/dist/index.mjs +5 -5
- package/package.json +17 -5
package/dist/index.js
CHANGED
|
@@ -17,17 +17,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
20
|
+
// src/client/index.ts
|
|
21
|
+
var client_exports = {};
|
|
22
|
+
__export(client_exports, {
|
|
23
23
|
useAuth: () => useAuth,
|
|
24
24
|
useCount: () => useCount,
|
|
25
25
|
useFetch: () => useFetch,
|
|
26
26
|
useStream: () => useStream
|
|
27
27
|
});
|
|
28
|
-
module.exports = __toCommonJS(
|
|
28
|
+
module.exports = __toCommonJS(client_exports);
|
|
29
29
|
|
|
30
|
-
// src/useAuth.ts
|
|
30
|
+
// src/client/useAuth.ts
|
|
31
31
|
var import_react = require("react");
|
|
32
32
|
|
|
33
33
|
// node_modules/@firebase/util/dist/node-esm/index.node.esm.js
|
|
@@ -4900,7 +4900,7 @@ function _isEmptyString(input) {
|
|
|
4900
4900
|
return typeof input === "undefined" || (input == null ? void 0 : input.length) === 0;
|
|
4901
4901
|
}
|
|
4902
4902
|
|
|
4903
|
-
// src/useAuth.ts
|
|
4903
|
+
// src/client/useAuth.ts
|
|
4904
4904
|
function useAuth(auth, callback) {
|
|
4905
4905
|
(0, import_react.useEffect)(() => {
|
|
4906
4906
|
const unsubscribe = onAuthStateChanged(auth, async (authUser) => {
|
|
@@ -4910,7 +4910,7 @@ function useAuth(auth, callback) {
|
|
|
4910
4910
|
}, []);
|
|
4911
4911
|
}
|
|
4912
4912
|
|
|
4913
|
-
// src/useCounter.ts
|
|
4913
|
+
// src/client/useCounter.ts
|
|
4914
4914
|
var import_firebase_client_ql = require("firebase-client-ql");
|
|
4915
4915
|
var import_react2 = require("react");
|
|
4916
4916
|
var useCount = (param) => {
|
|
@@ -4938,7 +4938,7 @@ var useCount = (param) => {
|
|
|
4938
4938
|
return [data, loading, setLoading];
|
|
4939
4939
|
};
|
|
4940
4940
|
|
|
4941
|
-
// src/useFetch.ts
|
|
4941
|
+
// src/client/useFetch.ts
|
|
4942
4942
|
var import_firebase_client_ql2 = require("firebase-client-ql");
|
|
4943
4943
|
var import_react3 = require("react");
|
|
4944
4944
|
var useFetch = (param) => {
|
|
@@ -4980,7 +4980,7 @@ var useFetch = (param) => {
|
|
|
4980
4980
|
return [data, loading, setLoading];
|
|
4981
4981
|
};
|
|
4982
4982
|
|
|
4983
|
-
// src/useStream.ts
|
|
4983
|
+
// src/client/useStream.ts
|
|
4984
4984
|
var import_firebase_client_ql3 = require("firebase-client-ql");
|
|
4985
4985
|
var import_react4 = require("react");
|
|
4986
4986
|
var useStream = (param, callback) => {
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/useAuth.ts
|
|
1
|
+
// src/client/useAuth.ts
|
|
2
2
|
import { useEffect } from "react";
|
|
3
3
|
|
|
4
4
|
// node_modules/@firebase/util/dist/node-esm/index.node.esm.js
|
|
@@ -4871,7 +4871,7 @@ function _isEmptyString(input) {
|
|
|
4871
4871
|
return typeof input === "undefined" || (input == null ? void 0 : input.length) === 0;
|
|
4872
4872
|
}
|
|
4873
4873
|
|
|
4874
|
-
// src/useAuth.ts
|
|
4874
|
+
// src/client/useAuth.ts
|
|
4875
4875
|
function useAuth(auth, callback) {
|
|
4876
4876
|
useEffect(() => {
|
|
4877
4877
|
const unsubscribe = onAuthStateChanged(auth, async (authUser) => {
|
|
@@ -4881,7 +4881,7 @@ function useAuth(auth, callback) {
|
|
|
4881
4881
|
}, []);
|
|
4882
4882
|
}
|
|
4883
4883
|
|
|
4884
|
-
// src/useCounter.ts
|
|
4884
|
+
// src/client/useCounter.ts
|
|
4885
4885
|
import { errorLogger } from "firebase-client-ql";
|
|
4886
4886
|
import { useCallback, useEffect as useEffect2, useState } from "react";
|
|
4887
4887
|
var useCount = (param) => {
|
|
@@ -4909,7 +4909,7 @@ var useCount = (param) => {
|
|
|
4909
4909
|
return [data, loading, setLoading];
|
|
4910
4910
|
};
|
|
4911
4911
|
|
|
4912
|
-
// src/useFetch.ts
|
|
4912
|
+
// src/client/useFetch.ts
|
|
4913
4913
|
import { errorLogger as errorLogger2 } from "firebase-client-ql";
|
|
4914
4914
|
import { useCallback as useCallback2, useEffect as useEffect3, useState as useState2 } from "react";
|
|
4915
4915
|
var useFetch = (param) => {
|
|
@@ -4951,7 +4951,7 @@ var useFetch = (param) => {
|
|
|
4951
4951
|
return [data, loading, setLoading];
|
|
4952
4952
|
};
|
|
4953
4953
|
|
|
4954
|
-
// src/useStream.ts
|
|
4954
|
+
// src/client/useStream.ts
|
|
4955
4955
|
import { errorLogger as errorLogger3 } from "firebase-client-ql";
|
|
4956
4956
|
import { useEffect as useEffect4 } from "react";
|
|
4957
4957
|
var useStream = (param, callback) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-firebase-ql",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "A React helper library that simplifies using Firebase with side effects and live queries.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"scripts": {
|
|
28
28
|
"clean": "rimraf dist",
|
|
29
|
-
"build": "tsup src/index.ts --dts --format esm,cjs --out-dir dist",
|
|
29
|
+
"build": "tsup src/client/index.ts --dts --format esm,cjs --out-dir dist",
|
|
30
30
|
"prepublishOnly": "npm run build",
|
|
31
|
+
"prepare": "npm run build",
|
|
31
32
|
"test": "vitest",
|
|
32
|
-
"lint": "eslint . --ext .ts,.tsx,.js"
|
|
33
|
-
"prepare": "npm run build"
|
|
33
|
+
"lint": "eslint . --ext .ts,.tsx,.js"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": ">=18",
|
|
37
|
-
"firebase-client-ql"
|
|
37
|
+
"firebase-client-ql": ">=4"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@testing-library/react": "^16.3.0",
|
|
@@ -44,5 +44,17 @@
|
|
|
44
44
|
"tsup": "^6.7.0",
|
|
45
45
|
"typescript": "^5.9.3",
|
|
46
46
|
"vitest": "^0.30.1"
|
|
47
|
+
},
|
|
48
|
+
"sideEffects": false,
|
|
49
|
+
"exports": {
|
|
50
|
+
".": {
|
|
51
|
+
"browser": {
|
|
52
|
+
"import": "./dist/index.esm.js",
|
|
53
|
+
"require": "./dist/index.cjs.js"
|
|
54
|
+
},
|
|
55
|
+
"import": "./dist/index.esm.js",
|
|
56
|
+
"require": "./dist/index.cjs.js",
|
|
57
|
+
"default": "./dist/index.esm.js"
|
|
58
|
+
}
|
|
47
59
|
}
|
|
48
60
|
}
|