@konplit-services/common 1.0.252 → 1.0.254
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/build/app.configs.d.ts +6 -0
- package/build/app.configs.js +30 -0
- package/package.json +1 -1
package/build/app.configs.d.ts
CHANGED
|
@@ -147,6 +147,11 @@ declare class AppConfigs {
|
|
|
147
147
|
};
|
|
148
148
|
getAPIPrivateKey(): string;
|
|
149
149
|
getEmailVendor(): string;
|
|
150
|
+
getZeptoMailAPIKey(): string;
|
|
151
|
+
getPlatFormName(): string;
|
|
152
|
+
getNoReplyMail(): string;
|
|
153
|
+
getBCCMail(): string;
|
|
154
|
+
getWebAppUrl(): string;
|
|
150
155
|
getRedisHost(): {
|
|
151
156
|
url: string;
|
|
152
157
|
host: string;
|
|
@@ -211,6 +216,7 @@ declare class AppConfigs {
|
|
|
211
216
|
getValue(key: string): string;
|
|
212
217
|
ensureValues(keys?: string[]): this;
|
|
213
218
|
getNODE_ENV(): string | undefined;
|
|
219
|
+
isDev(): boolean;
|
|
214
220
|
getDSN_Key(): DSN;
|
|
215
221
|
}
|
|
216
222
|
declare const appConfigs: AppConfigs;
|
package/build/app.configs.js
CHANGED
|
@@ -199,6 +199,33 @@ class AppConfigs {
|
|
|
199
199
|
}
|
|
200
200
|
return this.env.EMAIL_VENDOR;
|
|
201
201
|
}
|
|
202
|
+
getZeptoMailAPIKey() {
|
|
203
|
+
if (!this.env.ZEPTOMAIL_KEY) {
|
|
204
|
+
throw new Error("ZEPTOMAIL_KEY is required");
|
|
205
|
+
}
|
|
206
|
+
return this.env.ZEPTOMAIL_KEY;
|
|
207
|
+
}
|
|
208
|
+
getPlatFormName() {
|
|
209
|
+
return this.getAppName();
|
|
210
|
+
}
|
|
211
|
+
getNoReplyMail() {
|
|
212
|
+
if (!this.env.NO_REPLY_EMAIL) {
|
|
213
|
+
throw new Error("NO_REPLY_EMAIL is required");
|
|
214
|
+
}
|
|
215
|
+
return this.env.NO_REPLY_EMAIL;
|
|
216
|
+
}
|
|
217
|
+
getBCCMail() {
|
|
218
|
+
if (!this.env.BCC_EMAIL) {
|
|
219
|
+
throw new Error("BCC_EMAIL is required");
|
|
220
|
+
}
|
|
221
|
+
return this.env.BCC_EMAIL;
|
|
222
|
+
}
|
|
223
|
+
getWebAppUrl() {
|
|
224
|
+
if (!this.env.WEB_URL) {
|
|
225
|
+
throw new Error("WEB_URL is required");
|
|
226
|
+
}
|
|
227
|
+
return this.env.WEB_URL;
|
|
228
|
+
}
|
|
202
229
|
getRedisHost() {
|
|
203
230
|
if (!this.env.REDIS_URL) {
|
|
204
231
|
throw new Error("REDIS_URL is required");
|
|
@@ -761,6 +788,9 @@ class AppConfigs {
|
|
|
761
788
|
getNODE_ENV() {
|
|
762
789
|
return this.env.NODE_ENV;
|
|
763
790
|
}
|
|
791
|
+
isDev() {
|
|
792
|
+
return this.getNODE_ENV() === "development";
|
|
793
|
+
}
|
|
764
794
|
//DNS Secret Keys for ALL 14 Services
|
|
765
795
|
getDSN_Key() {
|
|
766
796
|
if (!this.env.SENTRY_LOG_DNS) {
|