jp.ms.common.modules 1.0.3 → 1.0.5

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.
@@ -0,0 +1,6 @@
1
+ export declare function getCertificate(): {
2
+ httpsOptions: {
3
+ key: Buffer<ArrayBufferLike>;
4
+ cert: Buffer<ArrayBufferLike>;
5
+ };
6
+ } | undefined;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCertificate = getCertificate;
4
+ const process = require("process");
5
+ const fs = require("fs");
6
+ function getCertificate() {
7
+ if (process.env.NODE_ENV === 'prod') {
8
+ return {
9
+ httpsOptions: {
10
+ key: fs.readFileSync(process.env.SSL_PRIVATE_KEY_PATH ?? ''),
11
+ cert: fs.readFileSync(process.env.SSL_CERT_PATH ?? ''),
12
+ },
13
+ };
14
+ }
15
+ }
16
+ //# sourceMappingURL=cert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cert.js","sourceRoot":"","sources":["../../src/config/cert.ts"],"names":[],"mappings":";;AAGA,wCASC;AAZD,mCAAmC;AACnC,yBAAyB;AAEzB,SAAgB,cAAc;IAC5B,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;QACpC,OAAO;YACL,YAAY,EAAE;gBACZ,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE,CAAC;gBAC5D,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC;aACvD;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { getMenuConfig } from './menu';
2
2
  export { getLocaleConfig } from './locale';
3
3
  export { getDatabaseConfig } from './database';
4
+ export { getCertificate } from './cert';
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDatabaseConfig = exports.getLocaleConfig = exports.getMenuConfig = void 0;
3
+ exports.getCertificate = exports.getDatabaseConfig = exports.getLocaleConfig = exports.getMenuConfig = void 0;
4
4
  var menu_1 = require("./menu");
5
5
  Object.defineProperty(exports, "getMenuConfig", { enumerable: true, get: function () { return menu_1.getMenuConfig; } });
6
6
  var locale_1 = require("./locale");
7
7
  Object.defineProperty(exports, "getLocaleConfig", { enumerable: true, get: function () { return locale_1.getLocaleConfig; } });
8
8
  var database_1 = require("./database");
9
9
  Object.defineProperty(exports, "getDatabaseConfig", { enumerable: true, get: function () { return database_1.getDatabaseConfig; } });
10
+ var cert_1 = require("./cert");
11
+ Object.defineProperty(exports, "getCertificate", { enumerable: true, get: function () { return cert_1.getCertificate; } });
10
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;AAAA,+BAAuC;AAA9B,qGAAA,aAAa,OAAA;AACtB,mCAA2C;AAAlC,yGAAA,eAAe,OAAA;AACxB,uCAA+C;AAAtC,6GAAA,iBAAiB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;AAAA,+BAAuC;AAA9B,qGAAA,aAAa,OAAA;AACtB,mCAA2C;AAAlC,yGAAA,eAAe,OAAA;AACxB,uCAA+C;AAAtC,6GAAA,iBAAiB,OAAA;AAC1B,+BAAwC;AAA/B,sGAAA,cAAc,OAAA"}
@@ -1,2 +1,2 @@
1
1
  import { I18nAsyncOptions } from 'nestjs-i18n';
2
- export declare function getLocaleConfig(configService: object, dirname: string): I18nAsyncOptions;
2
+ export declare function getLocaleConfig(configService: object): I18nAsyncOptions;
@@ -1,15 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getLocaleConfig = getLocaleConfig;
4
- const path_1 = require("path");
5
4
  const nestjs_i18n_1 = require("nestjs-i18n");
6
- function getLocaleConfig(configService, dirname) {
5
+ function getLocaleConfig(configService) {
7
6
  return {
8
7
  useFactory: async (configService) => {
9
8
  return ({
10
9
  fallbackLanguage: 'en',
11
10
  loaderOptions: {
12
- path: (0, path_1.join)(dirname, configService.get('LOCALE_PATH')),
11
+ path: configService.get('LOCALE_PATH'),
13
12
  watch: true,
14
13
  },
15
14
  });
@@ -1 +1 @@
1
- {"version":3,"file":"locale.js","sourceRoot":"","sources":["../../src/config/locale.ts"],"names":[],"mappings":";;AAIA,0CAkBC;AAtBD,+BAA4B;AAC5B,6CAAsG;AAGtG,SAAgB,eAAe,CAAE,aAAqB,EAAE,OAAe;IACnE,OAAO;QACH,UAAU,EAAE,KAAK,EAAE,aAA4B,EAAE,EAAE;YAC/C,OAAO,CAAC;gBACJ,gBAAgB,EAAE,IAAI;gBACtB,aAAa,EAAE;oBACX,IAAI,EAAE,IAAA,WAAI,EAAC,OAAO,EAAE,aAAa,CAAC,GAAG,CAAS,aAAa,CAAW,CAAC;oBACvE,KAAK,EAAE,IAAI;iBACd;aACJ,CAAC,CAAA;QACN,CAAC;QACD,SAAS,EAAE;YACP,EAAE,GAAG,EAAE,2BAAa,EAAE,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE;YACzC,oCAAsB;YACtB,EAAE,GAAG,EAAE,4BAAc,EAAE,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE;SAC/C;QACD,MAAM,EAAE,CAAC,aAAa,CAAC;KACN,CAAC;AAC1B,CAAC"}
1
+ {"version":3,"file":"locale.js","sourceRoot":"","sources":["../../src/config/locale.ts"],"names":[],"mappings":";;AAGA,0CAkBC;AArBD,6CAAsG;AAGtG,SAAgB,eAAe,CAAE,aAAqB;IAClD,OAAO;QACH,UAAU,EAAE,KAAK,EAAE,aAA4B,EAAE,EAAE;YAC/C,OAAO,CAAC;gBACJ,gBAAgB,EAAE,IAAI;gBACtB,aAAa,EAAE;oBACX,IAAI,EAAE,aAAa,CAAC,GAAG,CAAS,aAAa,CAAW;oBACxD,KAAK,EAAE,IAAI;iBACd;aACJ,CAAC,CAAA;QACN,CAAC;QACD,SAAS,EAAE;YACP,EAAE,GAAG,EAAE,2BAAa,EAAE,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE;YACzC,oCAAsB;YACtB,EAAE,GAAG,EAAE,4BAAc,EAAE,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE;SAC/C;QACD,MAAM,EAAE,CAAC,aAAa,CAAC;KACN,CAAC;AAC1B,CAAC"}