@alodi/site 0.1.5 → 0.2.0

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/CHANGELOG.md CHANGED
@@ -1,10 +1,11 @@
1
1
  # Changelog
2
2
 
3
- ## [0.1.5](https://git.lodiops.com/bag_web/lodi-site/compare/v0.1.4...v0.1.5) (2025-09-17)
3
+ # [0.2.0](https://git.lodiops.com/bag_web/lodi-site/compare/v0.1.4...v0.2.0) (2025-10-10)
4
4
 
5
5
 
6
6
  ### Features
7
7
 
8
+ * 重写country ([bf7a1f7](https://git.lodiops.com/bag_web/lodi-site/commits/bf7a1f767f0ac47e2ce28f15c970fe245de71bea))
8
9
  * update ([44e9db9](https://git.lodiops.com/bag_web/lodi-site/commits/44e9db9d01501e610cb8711ce050513515733f31))
9
10
 
10
11
  ##
@@ -13,8 +14,10 @@ All notable changes to this project will be documented in this file. Dates are d
13
14
 
14
15
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
15
16
 
16
- #### [v0.1.5](https://nas.415150806.xyz/lodi/bag_web/compare/v0.1.4...v0.1.5)
17
+ #### [v0.2.0](https://nas.415150806.xyz/lodi/bag_web/compare/v0.1.4...v0.2.0)
17
18
 
19
+ - feat: 重写country [`bf7a1f7`](https://nas.415150806.xyz/lodi/bag_web/commit/bf7a1f767f0ac47e2ce28f15c970fe245de71bea)
20
+ - chore(release): v0.1.5 [`ffbd343`](https://nas.415150806.xyz/lodi/bag_web/commit/ffbd3434fb2bc9835711df787b8b690802a3041d)
18
21
  - feat: update [`44e9db9`](https://nas.415150806.xyz/lodi/bag_web/commit/44e9db9d01501e610cb8711ce050513515733f31)
19
22
 
20
23
  #### v0.1.4
package/dist/argv.d.ts CHANGED
@@ -4,15 +4,10 @@ declare const options: readonly [{
4
4
  readonly describe: "指定平台";
5
5
  readonly choices: readonly ["ios", "android"];
6
6
  readonly demandOption: true;
7
- }, {
8
- readonly name: "country";
9
- readonly describe: "指定国家";
10
- readonly choices: ("lodi" | "ncg")[];
11
- readonly demandOption: true;
12
7
  }, {
13
8
  readonly name: "site";
14
9
  readonly describe: "指定站点";
15
- readonly choices: ("291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "wasp" | "82pg" | "91pg" | "ydg777" | "zappspin" | "waspspin" | "haa555" | "vangwin" | "sortewin")[];
10
+ readonly choices: ("291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "ydg777" | "wasp" | "82pg" | "91pg" | "zappspin" | "waspspin" | "haa555" | "vangwin" | "sortewin")[];
16
11
  readonly demandOption: true;
17
12
  }, {
18
13
  readonly name: "api";
package/dist/argv.js CHANGED
@@ -7,23 +7,27 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
7
7
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
8
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
9
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
- import yargs from 'yargs/yargs';
11
10
  import { hideBin } from 'yargs/helpers';
12
- import { CountryKeys, SiteKeys } from "./index";
11
+ import yargs from 'yargs/yargs';
12
+ import { SITE } from "./index";
13
+ // import { COUNTRY } from './index';
14
+
13
15
  var options = [{
14
16
  name: 'platform',
15
17
  describe: '指定平台',
16
18
  choices: ['ios', 'android'],
17
19
  demandOption: true
18
- }, {
19
- name: 'country',
20
- describe: '指定国家',
21
- choices: CountryKeys,
22
- demandOption: true
23
- }, {
20
+ },
21
+ // {
22
+ // name: 'country',
23
+ // describe: '指定国家',
24
+ // choices: Object.values(COUNTRY),
25
+ // demandOption: true,
26
+ // },
27
+ {
24
28
  name: 'site',
25
29
  describe: '指定站点',
26
- choices: SiteKeys,
30
+ choices: Object.values(SITE),
27
31
  demandOption: true
28
32
  }, {
29
33
  name: 'api',
@@ -64,5 +68,4 @@ export function siteArgv() {
64
68
  result.option(item.name, _objectSpread({}, item));
65
69
  });
66
70
  return result;
67
- }
68
- ;
71
+ }
@@ -4,15 +4,10 @@ declare const options: readonly [{
4
4
  readonly describe: "指定平台";
5
5
  readonly choices: readonly ["ios", "android"];
6
6
  readonly demandOption: true;
7
- }, {
8
- readonly name: "country";
9
- readonly describe: "指定国家";
10
- readonly choices: ("lodi" | "ncg")[];
11
- readonly demandOption: true;
12
7
  }, {
13
8
  readonly name: "site";
14
9
  readonly describe: "指定站点";
15
- readonly choices: ("291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "wasp" | "82pg" | "91pg" | "ydg777" | "zappspin" | "waspspin" | "haa555" | "vangwin" | "sortewin")[];
10
+ readonly choices: ("291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "ydg777" | "wasp" | "82pg" | "91pg" | "zappspin" | "waspspin" | "haa555" | "vangwin" | "sortewin")[];
16
11
  readonly demandOption: true;
17
12
  }, {
18
13
  readonly name: "api";
package/dist/cjs/argv.js CHANGED
@@ -32,8 +32,8 @@ __export(argv_exports, {
32
32
  siteArgv: () => siteArgv
33
33
  });
34
34
  module.exports = __toCommonJS(argv_exports);
35
- var import_yargs = __toESM(require("yargs/yargs"));
36
35
  var import_helpers = require("yargs/helpers");
36
+ var import_yargs = __toESM(require("yargs/yargs"));
37
37
  var import_index = require("./index");
38
38
  var options = [
39
39
  {
@@ -42,16 +42,16 @@ var options = [
42
42
  choices: ["ios", "android"],
43
43
  demandOption: true
44
44
  },
45
- {
46
- name: "country",
47
- describe: "指定国家",
48
- choices: import_index.CountryKeys,
49
- demandOption: true
50
- },
45
+ // {
46
+ // name: 'country',
47
+ // describe: '指定国家',
48
+ // choices: Object.values(COUNTRY),
49
+ // demandOption: true,
50
+ // },
51
51
  {
52
52
  name: "site",
53
53
  describe: "指定站点",
54
- choices: import_index.SiteKeys,
54
+ choices: Object.values(import_index.SITE),
55
55
  demandOption: true
56
56
  },
57
57
  {
@@ -1,4 +1,4 @@
1
- import { SiteKey } from './index';
1
+ import { SITE } from './index';
2
2
  export declare const DefaultSupportEmail = "lodics001@outlook.com";
3
3
  export type SiteItem = {
4
4
  name: string;
@@ -24,4 +24,4 @@ export type SiteItem = {
24
24
  support_email: string;
25
25
  };
26
26
  };
27
- export declare const SiteData: Record<SiteKey, SiteItem>;
27
+ export declare const SiteData: Record<(typeof SITE)[keyof typeof SITE], SiteItem>;
@@ -1,3 +1,11 @@
1
+ type ValueType<T extends object> = T[keyof T];
2
+ export declare const COUNTRY: {
3
+ readonly PHL: "PHL";
4
+ readonly THA: "THA";
5
+ readonly VNM: "VNM";
6
+ readonly BRA: "BRA";
7
+ };
8
+ export type CountryName = ValueType<typeof COUNTRY>;
1
9
  export declare const SITE: {
2
10
  readonly JILI_291: "291jili";
3
11
  readonly SUPER_291: "super291";
@@ -12,27 +20,19 @@ export declare const SITE: {
12
20
  readonly LODI_GAME: "lodigame";
13
21
  readonly LOL_646: "lol646";
14
22
  readonly LODI_777: "lodi777";
23
+ readonly YDG_777: "ydg777";
24
+ } & {
15
25
  readonly WASP: "wasp";
16
26
  readonly PG_82: "82pg";
17
27
  readonly PG_91: "91pg";
18
- readonly YDG_777: "ydg777";
19
28
  readonly ZAPP_SPIN: "zappspin";
20
29
  readonly WASP_SPIN: "waspspin";
21
30
  readonly HAA_555: "haa555";
31
+ } & {
22
32
  readonly VANG_WIN: "vangwin";
33
+ } & {
23
34
  readonly SORTE_WIN: "sortewin";
24
35
  };
25
- export declare const SiteKeys: ("291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "wasp" | "82pg" | "91pg" | "ydg777" | "zappspin" | "waspspin" | "haa555" | "vangwin" | "sortewin")[];
26
- export type SiteKey = (typeof SiteKeys)[number];
27
- export declare const COUNTRY: {
28
- readonly LODI: "lodi";
29
- readonly NCG: "ncg";
30
- };
31
- export declare const CountryKeys: ("lodi" | "ncg")[];
32
- export type CountryKey = (typeof CountryKeys)[number];
33
- export declare const NcgSiteKeys: readonly ["wasp", "82pg", "91pg", "zappspin", "waspspin", "haa555"];
34
- export type NcgSiteKey = (typeof NcgSiteKeys)[number];
35
- export declare const isNcgSite: (site: SiteKey) => site is "wasp" | "82pg" | "91pg" | "zappspin" | "waspspin" | "haa555";
36
- export declare const LodiSiteKeys: ("291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "ydg777" | "vangwin" | "sortewin")[];
37
- export type LodiSiteKey = (typeof LodiSiteKeys)[number];
38
- export declare const isLodiSite: (site: SiteKey) => site is "291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "ydg777" | "vangwin" | "sortewin";
36
+ export type SiteName = ValueType<typeof SITE>;
37
+ export declare const getSiteCountry: (site: SiteName) => "PHL" | "THA" | "VNM" | "BRA" | undefined;
38
+ export {};
package/dist/cjs/index.js CHANGED
@@ -20,68 +20,62 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  var src_exports = {};
21
21
  __export(src_exports, {
22
22
  COUNTRY: () => COUNTRY,
23
- CountryKeys: () => CountryKeys,
24
- LodiSiteKeys: () => LodiSiteKeys,
25
- NcgSiteKeys: () => NcgSiteKeys,
26
23
  SITE: () => SITE,
27
- SiteKeys: () => SiteKeys,
28
- isLodiSite: () => isLodiSite,
29
- isNcgSite: () => isNcgSite
24
+ getSiteCountry: () => getSiteCountry
30
25
  });
31
26
  module.exports = __toCommonJS(src_exports);
32
- var SITE = {
33
- JILI_291: "291jili",
34
- SUPER_291: "super291",
35
- JILI_646: "646jili",
36
- LODI_291: "lodi291",
37
- TOP_646: "top646",
38
- JILI_80: "80jili",
39
- PH_646: "ph646",
40
- ACE_291: "ace291",
41
- HOT_646: "hot646",
42
- LODI_646: "lodi646",
43
- LODI_GAME: "lodigame",
44
- LOL_646: "lol646",
45
- LODI_777: "lodi777",
46
- WASP: "wasp",
47
- PG_82: "82pg",
48
- PG_91: "91pg",
49
- YDG_777: "ydg777",
50
- ZAPP_SPIN: "zappspin",
51
- WASP_SPIN: "waspspin",
52
- HAA_555: "haa555",
53
- VANG_WIN: "vangwin",
54
- SORTE_WIN: "sortewin"
55
- };
56
- var SiteKeys = Object.keys(SITE).map(
57
- (x) => SITE[x]
58
- );
59
27
  var COUNTRY = {
60
- LODI: "lodi",
61
- NCG: "ncg"
28
+ PHL: "PHL",
29
+ THA: "THA",
30
+ VNM: "VNM",
31
+ BRA: "BRA"
32
+ };
33
+ var SITE_MAP = {
34
+ [COUNTRY.PHL]: {
35
+ JILI_291: "291jili",
36
+ SUPER_291: "super291",
37
+ JILI_646: "646jili",
38
+ LODI_291: "lodi291",
39
+ TOP_646: "top646",
40
+ JILI_80: "80jili",
41
+ PH_646: "ph646",
42
+ ACE_291: "ace291",
43
+ HOT_646: "hot646",
44
+ LODI_646: "lodi646",
45
+ LODI_GAME: "lodigame",
46
+ LOL_646: "lol646",
47
+ LODI_777: "lodi777",
48
+ YDG_777: "ydg777"
49
+ },
50
+ [COUNTRY.THA]: {
51
+ WASP: "wasp",
52
+ PG_82: "82pg",
53
+ PG_91: "91pg",
54
+ ZAPP_SPIN: "zappspin",
55
+ WASP_SPIN: "waspspin",
56
+ HAA_555: "haa555"
57
+ },
58
+ [COUNTRY.VNM]: {
59
+ VANG_WIN: "vangwin"
60
+ },
61
+ [COUNTRY.BRA]: {
62
+ SORTE_WIN: "sortewin"
63
+ }
62
64
  };
63
- var CountryKeys = Object.keys(COUNTRY).map((x) => COUNTRY[x]);
64
- var NcgSiteKeys = [
65
- SITE.WASP,
66
- SITE.PG_82,
67
- SITE.PG_91,
68
- SITE.ZAPP_SPIN,
69
- SITE.WASP_SPIN,
70
- SITE.HAA_555
71
- ];
72
- var isNcgSite = (site) => NcgSiteKeys.indexOf(site) !== -1;
73
- var LodiSiteKeys = SiteKeys.filter(
74
- (site) => !isNcgSite(site)
65
+ var SITE = Object.keys(SITE_MAP).reduce(
66
+ (acc, cur) => ({ ...acc, ...SITE_MAP[cur] }),
67
+ {}
75
68
  );
76
- var isLodiSite = (site) => LodiSiteKeys.indexOf(site) !== -1;
69
+ var getSiteCountry = (site) => {
70
+ for (const country of Object.keys(SITE_MAP)) {
71
+ if (Object.values(SITE_MAP[country]).some((_) => _ === site)) {
72
+ return country;
73
+ }
74
+ }
75
+ };
77
76
  // Annotate the CommonJS export names for ESM import in node:
78
77
  0 && (module.exports = {
79
78
  COUNTRY,
80
- CountryKeys,
81
- LodiSiteKeys,
82
- NcgSiteKeys,
83
79
  SITE,
84
- SiteKeys,
85
- isLodiSite,
86
- isNcgSite
80
+ getSiteCountry
87
81
  });
package/dist/data.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { SiteKey } from './index';
1
+ import { SITE } from './index';
2
2
  export declare const DefaultSupportEmail = "lodics001@outlook.com";
3
3
  export type SiteItem = {
4
4
  name: string;
@@ -24,4 +24,4 @@ export type SiteItem = {
24
24
  support_email: string;
25
25
  };
26
26
  };
27
- export declare const SiteData: Record<SiteKey, SiteItem>;
27
+ export declare const SiteData: Record<(typeof SITE)[keyof typeof SITE], SiteItem>;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,11 @@
1
+ type ValueType<T extends object> = T[keyof T];
2
+ export declare const COUNTRY: {
3
+ readonly PHL: "PHL";
4
+ readonly THA: "THA";
5
+ readonly VNM: "VNM";
6
+ readonly BRA: "BRA";
7
+ };
8
+ export type CountryName = ValueType<typeof COUNTRY>;
1
9
  export declare const SITE: {
2
10
  readonly JILI_291: "291jili";
3
11
  readonly SUPER_291: "super291";
@@ -12,27 +20,19 @@ export declare const SITE: {
12
20
  readonly LODI_GAME: "lodigame";
13
21
  readonly LOL_646: "lol646";
14
22
  readonly LODI_777: "lodi777";
23
+ readonly YDG_777: "ydg777";
24
+ } & {
15
25
  readonly WASP: "wasp";
16
26
  readonly PG_82: "82pg";
17
27
  readonly PG_91: "91pg";
18
- readonly YDG_777: "ydg777";
19
28
  readonly ZAPP_SPIN: "zappspin";
20
29
  readonly WASP_SPIN: "waspspin";
21
30
  readonly HAA_555: "haa555";
31
+ } & {
22
32
  readonly VANG_WIN: "vangwin";
33
+ } & {
23
34
  readonly SORTE_WIN: "sortewin";
24
35
  };
25
- export declare const SiteKeys: ("291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "wasp" | "82pg" | "91pg" | "ydg777" | "zappspin" | "waspspin" | "haa555" | "vangwin" | "sortewin")[];
26
- export type SiteKey = (typeof SiteKeys)[number];
27
- export declare const COUNTRY: {
28
- readonly LODI: "lodi";
29
- readonly NCG: "ncg";
30
- };
31
- export declare const CountryKeys: ("lodi" | "ncg")[];
32
- export type CountryKey = (typeof CountryKeys)[number];
33
- export declare const NcgSiteKeys: readonly ["wasp", "82pg", "91pg", "zappspin", "waspspin", "haa555"];
34
- export type NcgSiteKey = (typeof NcgSiteKeys)[number];
35
- export declare const isNcgSite: (site: SiteKey) => site is "wasp" | "82pg" | "91pg" | "zappspin" | "waspspin" | "haa555";
36
- export declare const LodiSiteKeys: ("291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "ydg777" | "vangwin" | "sortewin")[];
37
- export type LodiSiteKey = (typeof LodiSiteKeys)[number];
38
- export declare const isLodiSite: (site: SiteKey) => site is "291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "ydg777" | "vangwin" | "sortewin";
36
+ export type SiteName = ValueType<typeof SITE>;
37
+ export declare const getSiteCountry: (site: SiteName) => "PHL" | "THA" | "VNM" | "BRA" | undefined;
38
+ export {};
package/dist/index.js CHANGED
@@ -1,4 +1,16 @@
1
- export var SITE = {
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ export var COUNTRY = {
8
+ PHL: 'PHL',
9
+ THA: 'THA',
10
+ VNM: 'VNM',
11
+ BRA: 'BRA'
12
+ };
13
+ var SITE_MAP = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, COUNTRY.PHL, {
2
14
  JILI_291: '291jili',
3
15
  SUPER_291: 'super291',
4
16
  JILI_646: '646jili',
@@ -12,33 +24,29 @@ export var SITE = {
12
24
  LODI_GAME: 'lodigame',
13
25
  LOL_646: 'lol646',
14
26
  LODI_777: 'lodi777',
27
+ YDG_777: 'ydg777'
28
+ }), COUNTRY.THA, {
15
29
  WASP: 'wasp',
16
30
  PG_82: '82pg',
17
31
  PG_91: '91pg',
18
- YDG_777: 'ydg777',
19
32
  ZAPP_SPIN: 'zappspin',
20
33
  WASP_SPIN: 'waspspin',
21
- HAA_555: 'haa555',
22
- VANG_WIN: 'vangwin',
34
+ HAA_555: 'haa555'
35
+ }), COUNTRY.VNM, {
36
+ VANG_WIN: 'vangwin'
37
+ }), COUNTRY.BRA, {
23
38
  SORTE_WIN: 'sortewin'
24
- };
25
- export var SiteKeys = Object.keys(SITE).map(function (x) {
26
- return SITE[x];
27
- });
28
- export var COUNTRY = {
29
- LODI: 'lodi',
30
- NCG: 'ncg'
31
- };
32
- export var CountryKeys = Object.keys(COUNTRY).map(function (x) {
33
- return COUNTRY[x];
34
- });
35
- export var NcgSiteKeys = [SITE.WASP, SITE.PG_82, SITE.PG_91, SITE.ZAPP_SPIN, SITE.WASP_SPIN, SITE.HAA_555];
36
- export var isNcgSite = function isNcgSite(site) {
37
- return NcgSiteKeys.indexOf(site) !== -1;
38
- };
39
- export var LodiSiteKeys = SiteKeys.filter(function (site) {
40
- return !isNcgSite(site);
41
39
  });
42
- export var isLodiSite = function isLodiSite(site) {
43
- return LodiSiteKeys.indexOf(site) !== -1;
40
+ export var SITE = Object.keys(SITE_MAP).reduce(function (acc, cur) {
41
+ return _objectSpread(_objectSpread({}, acc), SITE_MAP[cur]);
42
+ }, {});
43
+ export var getSiteCountry = function getSiteCountry(site) {
44
+ for (var _i = 0, _Object$keys = Object.keys(SITE_MAP); _i < _Object$keys.length; _i++) {
45
+ var country = _Object$keys[_i];
46
+ if (Object.values(SITE_MAP[country]).some(function (_) {
47
+ return _ === site;
48
+ })) {
49
+ return country;
50
+ }
51
+ }
44
52
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alodi/site",
3
- "version": "0.1.5",
3
+ "version": "0.2.0",
4
4
  "description": "alodi site",
5
5
  "repository": {
6
6
  "type": "git",