@mirai/core 0.1.25 → 0.1.26

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.
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.fetchConfig = void 0;
7
- var _Core = require("../Core.constants");
8
7
  var _services = require("../services");
9
8
  const IS_JEST = !!process?.env?.JEST_WORKER_ID;
10
9
  const fetchConfig = async function () {
@@ -13,7 +12,7 @@ const fetchConfig = async function () {
13
12
  type = 'hotel'
14
13
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
15
14
  if (!id) return undefined;
16
- const club = type === _Core.TYPE.CHAIN && !IS_JEST ? await _services.ServiceClub.get(id) : undefined;
15
+ const club = !IS_JEST ? await _services.ServiceClub.get(id) : undefined;
17
16
  const config = await _services.ServiceEngine.get({
18
17
  id,
19
18
  type
@@ -1 +1 @@
1
- {"version":3,"file":"fetchConfig.js","names":["IS_JEST","process","env","JEST_WORKER_ID","fetchConfig","id","type","undefined","club","TYPE","CHAIN","ServiceClub","get","config","ServiceEngine"],"sources":["../../src/helpers/fetchConfig.js"],"sourcesContent":["const IS_JEST = !!process?.env?.JEST_WORKER_ID;\n\nimport { TYPE } from '../Core.constants';\nimport { ServiceClub, ServiceEngine } from '../services';\n\nexport const fetchConfig = async ({ id, type = 'hotel' } = {}) => {\n if (!id) return undefined;\n\n const club = type === TYPE.CHAIN && !IS_JEST ? await ServiceClub.get(id) : undefined;\n const config = await ServiceEngine.get({ id, type });\n\n if (config && club) config.club = club;\n\n return config;\n};\n"],"mappings":";;;;;;AAEA;AACA;AAHA,MAAMA,OAAO,GAAG,CAAC,CAACC,OAAO,EAAEC,GAAG,EAAEC,cAAc;AAKvC,MAAMC,WAAW,GAAG,kBAAuC;EAAA,IAAhC;IAAEC,EAAE;IAAEC,IAAI,GAAG;EAAQ,CAAC,uEAAG,CAAC,CAAC;EAC3D,IAAI,CAACD,EAAE,EAAE,OAAOE,SAAS;EAEzB,MAAMC,IAAI,GAAGF,IAAI,KAAKG,UAAI,CAACC,KAAK,IAAI,CAACV,OAAO,GAAG,MAAMW,qBAAW,CAACC,GAAG,CAACP,EAAE,CAAC,GAAGE,SAAS;EACpF,MAAMM,MAAM,GAAG,MAAMC,uBAAa,CAACF,GAAG,CAAC;IAAEP,EAAE;IAAEC;EAAK,CAAC,CAAC;EAEpD,IAAIO,MAAM,IAAIL,IAAI,EAAEK,MAAM,CAACL,IAAI,GAAGA,IAAI;EAEtC,OAAOK,MAAM;AACf,CAAC;AAAC"}
1
+ {"version":3,"file":"fetchConfig.js","names":["IS_JEST","process","env","JEST_WORKER_ID","fetchConfig","id","type","undefined","club","ServiceClub","get","config","ServiceEngine"],"sources":["../../src/helpers/fetchConfig.js"],"sourcesContent":["const IS_JEST = !!process?.env?.JEST_WORKER_ID;\n\nimport { ServiceClub, ServiceEngine } from '../services';\n\nexport const fetchConfig = async ({ id, type = 'hotel' } = {}) => {\n if (!id) return undefined;\n\n const club = !IS_JEST ? await ServiceClub.get(id) : undefined;\n const config = await ServiceEngine.get({ id, type });\n\n if (config && club) config.club = club;\n\n return config;\n};\n"],"mappings":";;;;;;AAEA;AAFA,MAAMA,OAAO,GAAG,CAAC,CAACC,OAAO,EAAEC,GAAG,EAAEC,cAAc;AAIvC,MAAMC,WAAW,GAAG,kBAAuC;EAAA,IAAhC;IAAEC,EAAE;IAAEC,IAAI,GAAG;EAAQ,CAAC,uEAAG,CAAC,CAAC;EAC3D,IAAI,CAACD,EAAE,EAAE,OAAOE,SAAS;EAEzB,MAAMC,IAAI,GAAG,CAACR,OAAO,GAAG,MAAMS,qBAAW,CAACC,GAAG,CAACL,EAAE,CAAC,GAAGE,SAAS;EAC7D,MAAMI,MAAM,GAAG,MAAMC,uBAAa,CAACF,GAAG,CAAC;IAAEL,EAAE;IAAEC;EAAK,CAAC,CAAC;EAEpD,IAAIK,MAAM,IAAIH,IAAI,EAAEG,MAAM,CAACH,IAAI,GAAGA,IAAI;EAEtC,OAAOG,MAAM;AACf,CAAC;AAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirai/core",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "source": "src/index.js",
5
5
  "repository": "https://gitlab.com/miraicorp/dev/frontend/core",
6
6
  "author": "JΛVI <hello@soyjavi.com>",