@pisell/utils 1.0.12 → 1.0.14
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/es/firebase/config/index.d.ts +2 -11
- package/es/firebase/config/index.js +47 -10
- package/es/platform.js +1 -1
- package/lib/firebase/config/index.d.ts +2 -11
- package/lib/firebase/config/index.js +43 -10
- package/lib/platform.js +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
declare let firebaseConfig: {
|
|
2
|
-
apiKey: string;
|
|
3
|
-
authDomain: string;
|
|
4
|
-
databaseURL: string;
|
|
5
|
-
projectId: string;
|
|
6
|
-
storageBucket: string;
|
|
7
|
-
messagingSenderId: string;
|
|
8
|
-
appId: string;
|
|
9
|
-
measurementId: string;
|
|
10
|
-
};
|
|
11
1
|
declare type InjectedConfigType = {
|
|
12
2
|
apiKey: string;
|
|
13
3
|
authDomain: string;
|
|
@@ -18,4 +8,5 @@ declare type InjectedConfigType = {
|
|
|
18
8
|
databaseURL: string;
|
|
19
9
|
};
|
|
20
10
|
export declare const injectConfig: (context: InjectedConfigType) => void;
|
|
21
|
-
|
|
11
|
+
declare const _default: any;
|
|
12
|
+
export default _default;
|
|
@@ -1,14 +1,51 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
var REACT_APP_API_ENV = process.env.REACT_APP_API_ENV;
|
|
1
3
|
var firebaseConfig = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
'release': {
|
|
5
|
+
apiKey: "AIzaSyBhWzh3z3eGW08oeUH6jKNP_H3msyuBEQc",
|
|
6
|
+
authDomain: "pisell-dev-d6421.firebaseapp.com",
|
|
7
|
+
databaseURL: "https://pisell-dev-d6421-default-rtdb.asia-southeast1.firebasedatabase.app",
|
|
8
|
+
projectId: "pisell-dev-d6421",
|
|
9
|
+
storageBucket: "pisell-dev-d6421.appspot.com",
|
|
10
|
+
messagingSenderId: "426955619429",
|
|
11
|
+
appId: "1:426955619429:web:17b5fc88934bebb6dc1a8c",
|
|
12
|
+
measurementId: "G-YJ5G113V4L"
|
|
13
|
+
},
|
|
14
|
+
'dev': {
|
|
15
|
+
apiKey: "AIzaSyBhWzh3z3eGW08oeUH6jKNP_H3msyuBEQc",
|
|
16
|
+
authDomain: "pisell-dev-d6421.firebaseapp.com",
|
|
17
|
+
databaseURL: "https://pisell-dev-d6421-default-rtdb.asia-southeast1.firebasedatabase.app",
|
|
18
|
+
projectId: "pisell-dev-d6421",
|
|
19
|
+
storageBucket: "pisell-dev-d6421.appspot.com",
|
|
20
|
+
messagingSenderId: "426955619429",
|
|
21
|
+
appId: "1:426955619429:web:17b5fc88934bebb6dc1a8c",
|
|
22
|
+
measurementId: "G-YJ5G113V4L"
|
|
23
|
+
},
|
|
24
|
+
'pre': {
|
|
25
|
+
apiKey: "AIzaSyBhWzh3z3eGW08oeUH6jKNP_H3msyuBEQc",
|
|
26
|
+
authDomain: "pisell-dev-d6421.firebaseapp.com",
|
|
27
|
+
databaseURL: "https://pisell-dev-d6421-default-rtdb.asia-southeast1.firebasedatabase.app",
|
|
28
|
+
projectId: "pisell-dev-d6421",
|
|
29
|
+
storageBucket: "pisell-dev-d6421.appspot.com",
|
|
30
|
+
messagingSenderId: "426955619429",
|
|
31
|
+
appId: "1:426955619429:web:17b5fc88934bebb6dc1a8c",
|
|
32
|
+
measurementId: "G-YJ5G113V4L"
|
|
33
|
+
},
|
|
34
|
+
'prod': {
|
|
35
|
+
apiKey: "AIzaSyBhWzh3z3eGW08oeUH6jKNP_H3msyuBEQc",
|
|
36
|
+
authDomain: "pisell-dev-d6421.firebaseapp.com",
|
|
37
|
+
databaseURL: "https://pisell-dev-product-test.asia-southeast1.firebasedatabase.app",
|
|
38
|
+
projectId: "pisell-dev-d6421",
|
|
39
|
+
storageBucket: "pisell-dev-d6421.appspot.com",
|
|
40
|
+
messagingSenderId: "426955619429",
|
|
41
|
+
appId: "1:426955619429:web:17b5fc88934bebb6dc1a8c",
|
|
42
|
+
measurementId: "G-YJ5G113V4L"
|
|
43
|
+
}
|
|
10
44
|
};
|
|
11
45
|
export var injectConfig = function injectConfig(context) {
|
|
12
|
-
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
firebaseConfig[REACT_APP_API_ENV] = context;
|
|
13
48
|
};
|
|
14
|
-
|
|
49
|
+
|
|
50
|
+
// @ts-ignore
|
|
51
|
+
export default firebaseConfig[REACT_APP_API_ENV];
|
package/es/platform.js
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
declare let firebaseConfig: {
|
|
2
|
-
apiKey: string;
|
|
3
|
-
authDomain: string;
|
|
4
|
-
databaseURL: string;
|
|
5
|
-
projectId: string;
|
|
6
|
-
storageBucket: string;
|
|
7
|
-
messagingSenderId: string;
|
|
8
|
-
appId: string;
|
|
9
|
-
measurementId: string;
|
|
10
|
-
};
|
|
11
1
|
declare type InjectedConfigType = {
|
|
12
2
|
apiKey: string;
|
|
13
3
|
authDomain: string;
|
|
@@ -18,4 +8,5 @@ declare type InjectedConfigType = {
|
|
|
18
8
|
databaseURL: string;
|
|
19
9
|
};
|
|
20
10
|
export declare const injectConfig: (context: InjectedConfigType) => void;
|
|
21
|
-
|
|
11
|
+
declare const _default: any;
|
|
12
|
+
export default _default;
|
|
@@ -23,20 +23,53 @@ __export(config_exports, {
|
|
|
23
23
|
injectConfig: () => injectConfig
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(config_exports);
|
|
26
|
+
var { REACT_APP_API_ENV } = process.env;
|
|
26
27
|
var firebaseConfig = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
"release": {
|
|
29
|
+
apiKey: "AIzaSyBhWzh3z3eGW08oeUH6jKNP_H3msyuBEQc",
|
|
30
|
+
authDomain: "pisell-dev-d6421.firebaseapp.com",
|
|
31
|
+
databaseURL: "https://pisell-dev-d6421-default-rtdb.asia-southeast1.firebasedatabase.app",
|
|
32
|
+
projectId: "pisell-dev-d6421",
|
|
33
|
+
storageBucket: "pisell-dev-d6421.appspot.com",
|
|
34
|
+
messagingSenderId: "426955619429",
|
|
35
|
+
appId: "1:426955619429:web:17b5fc88934bebb6dc1a8c",
|
|
36
|
+
measurementId: "G-YJ5G113V4L"
|
|
37
|
+
},
|
|
38
|
+
"dev": {
|
|
39
|
+
apiKey: "AIzaSyBhWzh3z3eGW08oeUH6jKNP_H3msyuBEQc",
|
|
40
|
+
authDomain: "pisell-dev-d6421.firebaseapp.com",
|
|
41
|
+
databaseURL: "https://pisell-dev-d6421-default-rtdb.asia-southeast1.firebasedatabase.app",
|
|
42
|
+
projectId: "pisell-dev-d6421",
|
|
43
|
+
storageBucket: "pisell-dev-d6421.appspot.com",
|
|
44
|
+
messagingSenderId: "426955619429",
|
|
45
|
+
appId: "1:426955619429:web:17b5fc88934bebb6dc1a8c",
|
|
46
|
+
measurementId: "G-YJ5G113V4L"
|
|
47
|
+
},
|
|
48
|
+
"pre": {
|
|
49
|
+
apiKey: "AIzaSyBhWzh3z3eGW08oeUH6jKNP_H3msyuBEQc",
|
|
50
|
+
authDomain: "pisell-dev-d6421.firebaseapp.com",
|
|
51
|
+
databaseURL: "https://pisell-dev-d6421-default-rtdb.asia-southeast1.firebasedatabase.app",
|
|
52
|
+
projectId: "pisell-dev-d6421",
|
|
53
|
+
storageBucket: "pisell-dev-d6421.appspot.com",
|
|
54
|
+
messagingSenderId: "426955619429",
|
|
55
|
+
appId: "1:426955619429:web:17b5fc88934bebb6dc1a8c",
|
|
56
|
+
measurementId: "G-YJ5G113V4L"
|
|
57
|
+
},
|
|
58
|
+
"prod": {
|
|
59
|
+
apiKey: "AIzaSyBhWzh3z3eGW08oeUH6jKNP_H3msyuBEQc",
|
|
60
|
+
authDomain: "pisell-dev-d6421.firebaseapp.com",
|
|
61
|
+
databaseURL: "https://pisell-dev-product-test.asia-southeast1.firebasedatabase.app",
|
|
62
|
+
projectId: "pisell-dev-d6421",
|
|
63
|
+
storageBucket: "pisell-dev-d6421.appspot.com",
|
|
64
|
+
messagingSenderId: "426955619429",
|
|
65
|
+
appId: "1:426955619429:web:17b5fc88934bebb6dc1a8c",
|
|
66
|
+
measurementId: "G-YJ5G113V4L"
|
|
67
|
+
}
|
|
35
68
|
};
|
|
36
69
|
var injectConfig = (context) => {
|
|
37
|
-
firebaseConfig = context;
|
|
70
|
+
firebaseConfig[REACT_APP_API_ENV] = context;
|
|
38
71
|
};
|
|
39
|
-
var config_default = firebaseConfig;
|
|
72
|
+
var config_default = firebaseConfig[REACT_APP_API_ENV];
|
|
40
73
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41
74
|
0 && (module.exports = {
|
|
42
75
|
injectConfig
|
package/lib/platform.js
CHANGED
|
@@ -57,7 +57,7 @@ var isAndroid = () => {
|
|
|
57
57
|
return navigator.userAgent.toLowerCase().indexOf("android") !== -1;
|
|
58
58
|
};
|
|
59
59
|
var isIos = () => {
|
|
60
|
-
return /iphone|ipad|ipod
|
|
60
|
+
return /iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase());
|
|
61
61
|
};
|
|
62
62
|
// Annotate the CommonJS export names for ESM import in node:
|
|
63
63
|
0 && (module.exports = {
|