jp.ms.common.modules 1.0.5 → 1.0.7

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,5 @@
1
+ export declare function getCors(): {
2
+ origin: RegExp[];
3
+ methods: string[];
4
+ credentials: boolean;
5
+ } | null;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCors = getCors;
4
+ const process_1 = require("process");
5
+ function getCors() {
6
+ if (process_1.default.env.NODE_ENV === 'prod') {
7
+ return {
8
+ origin: [/test.justpoker.online/],
9
+ methods: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'],
10
+ credentials: true,
11
+ };
12
+ }
13
+ return null;
14
+ }
15
+ //# sourceMappingURL=cors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cors.js","sourceRoot":"","sources":["../../src/config/cors.ts"],"names":[],"mappings":";;AAEA,0BAWC;AAbD,qCAA8B;AAE9B,SAAgB,OAAO;IACrB,IAAI,iBAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;QACpC,OAAO;YACL,MAAM,EAAE,CAAC,uBAAuB,CAAC;YAEjC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC;YAC7D,WAAW,EAAE,IAAI;SAClB,CAAA;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -2,3 +2,4 @@ export { getMenuConfig } from './menu';
2
2
  export { getLocaleConfig } from './locale';
3
3
  export { getDatabaseConfig } from './database';
4
4
  export { getCertificate } from './cert';
5
+ export { getCors } from './cors';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCertificate = exports.getDatabaseConfig = exports.getLocaleConfig = exports.getMenuConfig = void 0;
3
+ exports.getCors = 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");
@@ -9,4 +9,6 @@ var database_1 = require("./database");
9
9
  Object.defineProperty(exports, "getDatabaseConfig", { enumerable: true, get: function () { return database_1.getDatabaseConfig; } });
10
10
  var cert_1 = require("./cert");
11
11
  Object.defineProperty(exports, "getCertificate", { enumerable: true, get: function () { return cert_1.getCertificate; } });
12
+ var cors_1 = require("./cors");
13
+ Object.defineProperty(exports, "getCors", { enumerable: true, get: function () { return cors_1.getCors; } });
12
14
  //# 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;AAC1B,+BAAwC;AAA/B,sGAAA,cAAc,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;AACvB,+BAAiC;AAAxB,+FAAA,OAAO,OAAA"}