@pisell/utils 1.0.11 → 1.0.13
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/index.d.ts +0 -1
- package/es/index.js +1 -1
- package/lib/firebase/config/index.d.ts +2 -11
- package/lib/firebase/config/index.js +43 -10
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -19
- 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/index.d.ts
CHANGED
package/es/index.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/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
5
|
var __copyProps = (to, from, except, desc) => {
|
|
12
6
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
7
|
for (let key of __getOwnPropNames(from))
|
|
@@ -17,21 +11,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
11
|
return to;
|
|
18
12
|
};
|
|
19
13
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
15
|
|
|
30
16
|
// src/index.ts
|
|
31
17
|
var src_exports = {};
|
|
32
|
-
__export(src_exports, {
|
|
33
|
-
firebase: () => import_firebase.default
|
|
34
|
-
});
|
|
35
18
|
module.exports = __toCommonJS(src_exports);
|
|
36
19
|
__reExport(src_exports, require("./otherUtils"), module.exports);
|
|
37
20
|
__reExport(src_exports, require("./typeUtils"), module.exports);
|
|
@@ -39,10 +22,8 @@ __reExport(src_exports, require("./document"), module.exports);
|
|
|
39
22
|
__reExport(src_exports, require("./date"), module.exports);
|
|
40
23
|
__reExport(src_exports, require("./platform"), module.exports);
|
|
41
24
|
__reExport(src_exports, require("./log"), module.exports);
|
|
42
|
-
var import_firebase = __toESM(require("./firebase"));
|
|
43
25
|
// Annotate the CommonJS export names for ESM import in node:
|
|
44
26
|
0 && (module.exports = {
|
|
45
|
-
firebase,
|
|
46
27
|
...require("./otherUtils"),
|
|
47
28
|
...require("./typeUtils"),
|
|
48
29
|
...require("./document"),
|