starta.microservice 0.1.2582 → 0.1.2589
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/lib/config.d.ts +2 -60
- package/lib/config.js +32 -84
- package/lib/config.js.map +1 -1
- package/package.json +1 -1
package/lib/config.d.ts
CHANGED
|
@@ -12,16 +12,6 @@ declare const defaultConfig: {
|
|
|
12
12
|
intervalBetweenEmailConfirmationsSec: number;
|
|
13
13
|
intervalBetweenPhoneConfirmationsSec: number;
|
|
14
14
|
};
|
|
15
|
-
mail: {
|
|
16
|
-
from: string;
|
|
17
|
-
key: string;
|
|
18
|
-
adminEmails: string;
|
|
19
|
-
};
|
|
20
|
-
universalLinks: {
|
|
21
|
-
appId: string;
|
|
22
|
-
scheme: string;
|
|
23
|
-
sha256AndroidFingerprint: string;
|
|
24
|
-
};
|
|
25
15
|
mongo: {
|
|
26
16
|
uri: string;
|
|
27
17
|
};
|
|
@@ -43,61 +33,13 @@ declare const defaultConfig: {
|
|
|
43
33
|
ordinaryExpiration: number;
|
|
44
34
|
rememberMeExpiration: number;
|
|
45
35
|
};
|
|
46
|
-
cloudflare: {
|
|
47
|
-
enabled: boolean;
|
|
48
|
-
token: string;
|
|
49
|
-
root: string;
|
|
50
|
-
target: string;
|
|
51
|
-
};
|
|
52
|
-
googlemaps: {
|
|
53
|
-
enabled: boolean;
|
|
54
|
-
key: string;
|
|
55
|
-
jsApi: string;
|
|
56
|
-
};
|
|
57
|
-
googleanalytics: {
|
|
58
|
-
enabled: boolean;
|
|
59
|
-
key: string;
|
|
60
|
-
};
|
|
61
|
-
apiproxy: {
|
|
62
|
-
enabled: boolean;
|
|
63
|
-
commApiUrl: string;
|
|
64
|
-
searchApiUrl: string;
|
|
65
|
-
};
|
|
66
|
-
gtm: {
|
|
67
|
-
enabled: boolean;
|
|
68
|
-
key: string;
|
|
69
|
-
};
|
|
70
|
-
googlesignin: {
|
|
71
|
-
enabled: boolean;
|
|
72
|
-
clientId: string;
|
|
73
|
-
clientSecret: string;
|
|
74
|
-
};
|
|
75
|
-
recaptcha: {
|
|
76
|
-
enabled: boolean;
|
|
77
|
-
privateKey: string;
|
|
78
|
-
publicKey: string;
|
|
79
|
-
};
|
|
80
|
-
stripe: {
|
|
81
|
-
stripePublishableKey: string;
|
|
82
|
-
privateKey: string;
|
|
83
|
-
webhookSecret: string;
|
|
84
|
-
monthlyProductId: string;
|
|
85
|
-
yearlyProductId: string;
|
|
86
|
-
};
|
|
87
36
|
aws: {
|
|
88
37
|
accessKey: string;
|
|
89
38
|
secretKey: string;
|
|
90
39
|
region: string;
|
|
91
40
|
bucketname: string;
|
|
92
41
|
};
|
|
93
|
-
facebooksignin: {
|
|
94
|
-
enabled: boolean;
|
|
95
|
-
appId: string;
|
|
96
|
-
appSecret: string;
|
|
97
|
-
};
|
|
98
|
-
facebookpixel: {
|
|
99
|
-
enabled: boolean;
|
|
100
|
-
pixel: string;
|
|
101
|
-
};
|
|
102
42
|
};
|
|
43
|
+
export declare function overrideConfigWithEnvironment(config: any): void;
|
|
44
|
+
export declare function assignConfig(config: any): void;
|
|
103
45
|
export default defaultConfig;
|
package/lib/config.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assignConfig = exports.overrideConfigWithEnvironment = void 0;
|
|
3
4
|
const defaultConfig = {
|
|
4
5
|
serviceName: 'server',
|
|
5
6
|
production: false,
|
|
@@ -14,16 +15,6 @@ const defaultConfig = {
|
|
|
14
15
|
intervalBetweenEmailConfirmationsSec: 60,
|
|
15
16
|
intervalBetweenPhoneConfirmationsSec: 60,
|
|
16
17
|
},
|
|
17
|
-
mail: {
|
|
18
|
-
from: "info@collaboracia.com",
|
|
19
|
-
key: "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",
|
|
20
|
-
adminEmails: "kutsenko.eugene@test.com"
|
|
21
|
-
},
|
|
22
|
-
universalLinks: {
|
|
23
|
-
appId: 'com.collaboracia.starta.staging',
|
|
24
|
-
scheme: 'starta-staging-one',
|
|
25
|
-
sha256AndroidFingerprint: 'localfingerprint',
|
|
26
|
-
},
|
|
27
18
|
mongo: {
|
|
28
19
|
uri: "mongodb://localhost:27017/collaboracia",
|
|
29
20
|
},
|
|
@@ -45,82 +36,39 @@ const defaultConfig = {
|
|
|
45
36
|
ordinaryExpiration: 1800,
|
|
46
37
|
rememberMeExpiration: 86400
|
|
47
38
|
},
|
|
48
|
-
cloudflare: {
|
|
49
|
-
enabled: false,
|
|
50
|
-
token: "dJYszyjsm5hsOZGVF2HgI5tc6ZzXTPhnw5VUE92w",
|
|
51
|
-
root: "chackloon.com",
|
|
52
|
-
target: "173.249.37.186"
|
|
53
|
-
},
|
|
54
|
-
googlemaps: {
|
|
55
|
-
enabled: true,
|
|
56
|
-
key: "AIzaSyDAv8W4nwmFVoyY6aQuejSr65lp6dGWojw",
|
|
57
|
-
jsApi: "AIzaSyCksEPLYopHRTT9n83F4kzwiDr703EjP7w",
|
|
58
|
-
},
|
|
59
|
-
googleanalytics: {
|
|
60
|
-
enabled: true,
|
|
61
|
-
key: 'UA-212031024-1',
|
|
62
|
-
},
|
|
63
|
-
apiproxy: {
|
|
64
|
-
enabled: true,
|
|
65
|
-
commApiUrl: 'http://localhost:3003',
|
|
66
|
-
searchApiUrl: 'http://localhost:3004',
|
|
67
|
-
},
|
|
68
|
-
gtm: {
|
|
69
|
-
enabled: true,
|
|
70
|
-
key: 'GTM-TFQMP28',
|
|
71
|
-
},
|
|
72
|
-
googlesignin: {
|
|
73
|
-
enabled: true,
|
|
74
|
-
clientId: "127527491923-pb0vta3q7q7rp8c2mtinft8efneb0e03.apps.googleusercontent.com",
|
|
75
|
-
clientSecret: "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",
|
|
76
|
-
},
|
|
77
|
-
recaptcha: {
|
|
78
|
-
enabled: true,
|
|
79
|
-
privateKey: '6Lftwp0cAAAAAHxis5jqfi0m0SIczT-Y7NYjv7U-',
|
|
80
|
-
publicKey: '6Lftwp0cAAAAABxD57trtitXZIxPrQp78AiwWOmZ',
|
|
81
|
-
},
|
|
82
|
-
stripe: {
|
|
83
|
-
stripePublishableKey: 'pk_test_51JktwzK1m3LCqBG8iqs5ND9g3LNEStmvQk2VkNJmNT2icRvsoDd0n1JI7YWCKQ1EvVZvz0SjH0cwJUjzQMypysYt00twS5P1L3',
|
|
84
|
-
privateKey: 'sk_test_51JktwzK1m3LCqBG8q5ZCtqjFeOskDTl2KAkZpoQbyVq7dUbkcXrJlH0vLRABOijEtXdgQ3TXYHslBFiEpq6IfH3L00m7qweFQ6',
|
|
85
|
-
webhookSecret: 'whsec_u1vtlhDJgkuUzDN3aEVtfsaougC5TNAJ',
|
|
86
|
-
monthlyProductId: 'price_1Li0sSK1m3LCqBG8AdUhvxff',
|
|
87
|
-
yearlyProductId: 'price_1Li0tUK1m3LCqBG8I0xYN1yy',
|
|
88
|
-
},
|
|
89
39
|
aws: {
|
|
90
|
-
accessKey: '
|
|
91
|
-
secretKey: '
|
|
92
|
-
region: '
|
|
93
|
-
bucketname: '
|
|
94
|
-
},
|
|
95
|
-
facebooksignin: {
|
|
96
|
-
enabled: true,
|
|
97
|
-
appId: "226803722950504",
|
|
98
|
-
appSecret: "53872b1244f94fae0906074eb40d1e31",
|
|
99
|
-
},
|
|
100
|
-
facebookpixel: {
|
|
101
|
-
enabled: true,
|
|
102
|
-
pixel: '6784908938250138',
|
|
40
|
+
accessKey: 'not set',
|
|
41
|
+
secretKey: 'not set',
|
|
42
|
+
region: 'not set',
|
|
43
|
+
bucketname: 'not set',
|
|
103
44
|
}
|
|
104
45
|
};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
configNode[configPath[configPath.length - 1]]
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
configNode[configPath[configPath.length - 1]]
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
46
|
+
function overrideConfigWithEnvironment(config) {
|
|
47
|
+
Object
|
|
48
|
+
.keys(process.env)
|
|
49
|
+
.filter(key => key.startsWith('cobiconfig__'))
|
|
50
|
+
.forEach(key => {
|
|
51
|
+
const configPath = key.split('__');
|
|
52
|
+
let configNode = config;
|
|
53
|
+
for (let index = 1; index < configPath.length - 1; index++) {
|
|
54
|
+
configNode = configNode[configPath[index]];
|
|
55
|
+
}
|
|
56
|
+
configNode[configPath[configPath.length - 1]] = process.env[key];
|
|
57
|
+
if (configNode[configPath[configPath.length - 1]].toLowerCase() === 'true') {
|
|
58
|
+
configNode[configPath[configPath.length - 1]] = true;
|
|
59
|
+
}
|
|
60
|
+
else if (configNode[configPath[configPath.length - 1]].toLowerCase() === 'false') {
|
|
61
|
+
configNode[configPath[configPath.length - 1]] = false;
|
|
62
|
+
}
|
|
63
|
+
else if (!Number.isNaN(+configNode[configPath[configPath.length - 1]])) {
|
|
64
|
+
configNode[configPath[configPath.length - 1]] = +configNode[configPath[configPath.length - 1]];
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
exports.overrideConfigWithEnvironment = overrideConfigWithEnvironment;
|
|
69
|
+
function assignConfig(config) {
|
|
70
|
+
Object.assign(defaultConfig, config);
|
|
71
|
+
}
|
|
72
|
+
exports.assignConfig = assignConfig;
|
|
125
73
|
exports.default = defaultConfig;
|
|
126
74
|
//# sourceMappingURL=config.js.map
|
package/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;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