@alodi/site 0.3.1 → 0.4.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/dist/env.js ADDED
@@ -0,0 +1,286 @@
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
+ 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; }
9
+ 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; }
10
+ 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; }
11
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
12
+ 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); }
13
+ import { SITE } from "./site";
14
+ export var PLATFORMS = ['ios', 'android'];
15
+ export var ENVS = ['dev', 'test', 'beta', 'prod'];
16
+ export var SITE_ALIASES = {
17
+ aura69: SITE.PG_91,
18
+ aura88: SITE.PG_82,
19
+ waspwin: SITE.ZAPP_SPIN,
20
+ so99: SITE.SORTE_WIN
21
+ };
22
+ export var DEFAULT_ENV_KEYS = {
23
+ platform: 'BIU_PLATFORM',
24
+ site: 'BIU_SITE',
25
+ api: 'BIU_API',
26
+ ws: 'BIU_WS',
27
+ env: 'BIU_ENV'
28
+ };
29
+ /** 解析站点值,支持别名 */
30
+ export function resolveSite(value) {
31
+ var _SITE_ALIASES$value;
32
+ var site = (_SITE_ALIASES$value = SITE_ALIASES[value]) !== null && _SITE_ALIASES$value !== void 0 ? _SITE_ALIASES$value : value;
33
+ if (!Object.values(SITE).includes(site)) {
34
+ throw new Error("Invalid SITE \"".concat(value, "\", expected one of: ").concat(Object.values(SITE).join(', '), " (aliases: ").concat(Object.keys(SITE_ALIASES).join(', '), ")"));
35
+ }
36
+ return site;
37
+ }
38
+
39
+ /** 读取环境变量;demand 为 true 且缺失时抛错 */
40
+ export function readEnvValue(env, key) {
41
+ var _env$key;
42
+ var demand = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
43
+ var value = (_env$key = env[key]) === null || _env$key === void 0 ? void 0 : _env$key.trim();
44
+ if (!value) {
45
+ if (demand) throw new Error("Missing required env ".concat(key));
46
+ return undefined;
47
+ }
48
+ return value;
49
+ }
50
+
51
+ /** 校验取值是否在可选列表中 */
52
+ export function assertEnvChoice(value, choices, key) {
53
+ if (!choices.includes(value)) {
54
+ throw new Error("Invalid ".concat(key, " \"").concat(value, "\", expected one of: ").concat(choices.join(', ')));
55
+ }
56
+ return value;
57
+ }
58
+
59
+ /** 解析单个字段的 option 配置 */
60
+ export function resolveOptionConfig(conf, defaultEnvKey) {
61
+ var _conf$envKey, _conf$demandOption;
62
+ if (conf === false) return {
63
+ enable: false
64
+ };
65
+ return {
66
+ enable: (conf === null || conf === void 0 ? void 0 : conf.enable) !== false,
67
+ envKey: (_conf$envKey = conf === null || conf === void 0 ? void 0 : conf.envKey) !== null && _conf$envKey !== void 0 ? _conf$envKey : defaultEnvKey,
68
+ demandOption: (_conf$demandOption = conf === null || conf === void 0 ? void 0 : conf.demandOption) !== null && _conf$demandOption !== void 0 ? _conf$demandOption : true,
69
+ choices: conf === null || conf === void 0 ? void 0 : conf.choices
70
+ };
71
+ }
72
+ /**
73
+ * 读取并解析单个环境变量字段,便于扩展自定义配置。
74
+ *
75
+ * @example
76
+ * ```ts
77
+ * const cdn = readEnvField({
78
+ * envKey: 'BIU_CDN',
79
+ * demandOption: false,
80
+ * });
81
+ * ```
82
+ */
83
+ export function readEnvField(_ref) {
84
+ var _ref$env = _ref.env,
85
+ env = _ref$env === void 0 ? process.env : _ref$env,
86
+ envKey = _ref.envKey,
87
+ _ref$demandOption = _ref.demandOption,
88
+ demandOption = _ref$demandOption === void 0 ? true : _ref$demandOption,
89
+ choices = _ref.choices,
90
+ parse = _ref.parse;
91
+ var raw = readEnvValue(env, envKey, demandOption);
92
+ if (raw === undefined) return undefined;
93
+ if (choices) assertEnvChoice(raw, choices, envKey);
94
+ return parse ? parse(raw) : raw;
95
+ }
96
+
97
+ /**
98
+ * 结合 option 配置读取字段;enable 为 false 时返回 undefined。
99
+ *
100
+ * @example
101
+ * ```ts
102
+ * const base = siteEnv({ env, option });
103
+ * const cdn = readEnvOption(env, resolveOptionConfig(option.cdn, 'BIU_CDN'));
104
+ * return { ...base, cdn };
105
+ * ```
106
+ */
107
+ export function readEnvOption(env, conf, parse) {
108
+ if (!conf.enable) return undefined;
109
+ return readEnvField({
110
+ env: env,
111
+ envKey: conf.envKey,
112
+ demandOption: conf.demandOption,
113
+ choices: conf.choices,
114
+ parse: parse
115
+ });
116
+ }
117
+
118
+ /**
119
+ * 从环境变量读取站点构建配置。
120
+ *
121
+ * 默认环境变量:
122
+ * - `BIU_PLATFORM` = ios | android
123
+ * - `BIU_SITE` = 291jili | ...(兼容 aura69 / aura88 / waspwin / so99)
124
+ * - `BIU_API` = https://...
125
+ * - `BIU_WS` = wss://...
126
+ * - `BIU_ENV` = dev | test | beta | prod
127
+ *
128
+ * @example
129
+ * ```bash
130
+ * BIU_PLATFORM=ios BIU_SITE=291jili BIU_API=https://api.example.com BIU_WS=wss://ws.example.com BIU_ENV=prod node build.js
131
+ * ```
132
+ *
133
+ * @example
134
+ * ```ts
135
+ * import { siteEnv, readEnvOption, resolveOptionConfig } from '@alodi/site/env';
136
+ *
137
+ * const { platform, site, api, ws, env } = siteEnv();
138
+ *
139
+ * // 扩展自定义字段
140
+ * const cdn = readEnvOption(process.env, resolveOptionConfig(undefined, 'BIU_CDN'));
141
+ * ```
142
+ */
143
+ export function siteEnv() {
144
+ var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
145
+ _ref2$env = _ref2.env,
146
+ env = _ref2$env === void 0 ? process.env : _ref2$env,
147
+ _ref2$option = _ref2.option,
148
+ option = _ref2$option === void 0 ? {} : _ref2$option;
149
+ var result = {};
150
+ {
151
+ var _conf$choices;
152
+ var conf = resolveOptionConfig(option.platform, DEFAULT_ENV_KEYS.platform);
153
+ var platform = readEnvOption(env, conf.enable ? _objectSpread(_objectSpread({}, conf), {}, {
154
+ choices: (_conf$choices = conf.choices) !== null && _conf$choices !== void 0 ? _conf$choices : PLATFORMS
155
+ }) : conf);
156
+ if (platform !== undefined) result.platform = platform;
157
+ }
158
+ {
159
+ var site = readEnvOption(env, resolveOptionConfig(option.site, DEFAULT_ENV_KEYS.site), resolveSite);
160
+ if (site !== undefined) result.site = site;
161
+ }
162
+ {
163
+ var api = readEnvOption(env, resolveOptionConfig(option.api, DEFAULT_ENV_KEYS.api));
164
+ if (api !== undefined) result.api = api;
165
+ }
166
+ {
167
+ var ws = readEnvOption(env, resolveOptionConfig(option.ws, DEFAULT_ENV_KEYS.ws));
168
+ if (ws !== undefined) result.ws = ws;
169
+ }
170
+ {
171
+ var _conf$choices2;
172
+ var _conf = resolveOptionConfig(option.env, DEFAULT_ENV_KEYS.env);
173
+ var buildEnv = readEnvOption(env, _conf.enable ? _objectSpread(_objectSpread({}, _conf), {}, {
174
+ choices: (_conf$choices2 = _conf.choices) !== null && _conf$choices2 !== void 0 ? _conf$choices2 : ENVS
175
+ }) : _conf);
176
+ if (buildEnv !== undefined) result.env = buildEnv;
177
+ }
178
+ return result;
179
+ }
180
+ /**
181
+ * 将 siteEnv 结果(及扩展字段)转换成可注入的环境变量字典。
182
+ * 默认字段走 DEFAULT_ENV_KEYS;额外字段可用 keys 映射,或直接传完整 envKey。
183
+ *
184
+ * @example
185
+ * ```ts
186
+ * const values = { ...siteEnv(), cdn: 'https://cdn.example.com' };
187
+ * const env = siteEnvToProcessEnv(values, { cdn: 'BIU_CDN' });
188
+ * ```
189
+ */
190
+ export function siteEnvToProcessEnv(values) {
191
+ var keys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_ENV_KEYS;
192
+ var out = {};
193
+ var known = ['platform', 'site', 'api', 'ws', 'env'];
194
+ for (var _i = 0, _known = known; _i < _known.length; _i++) {
195
+ var _keys$name;
196
+ var name = _known[_i];
197
+ var value = values[name];
198
+ if (value === undefined) continue;
199
+ out[(_keys$name = keys[name]) !== null && _keys$name !== void 0 ? _keys$name : DEFAULT_ENV_KEYS[name]] = value;
200
+ }
201
+ for (var _i2 = 0, _Object$entries = Object.entries(values); _i2 < _Object$entries.length; _i2++) {
202
+ var _keys$_name;
203
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i2], 2),
204
+ _name = _Object$entries$_i[0],
205
+ _value = _Object$entries$_i[1];
206
+ if (_value === undefined || known.includes(_name)) continue;
207
+ var envKey = (_keys$_name = keys[_name]) !== null && _keys$_name !== void 0 ? _keys$_name : _name;
208
+ out[envKey] = _value;
209
+ }
210
+ return out;
211
+ }
212
+
213
+ /**
214
+ * 把解析后的配置写回目标 env(默认 process.env),供后续子进程继承。
215
+ *
216
+ * 注意:`node pre.js && vite` 这种 shell 串联时,pre 脚本改动的 process.env
217
+ * 不会影响后续 vite;请在 pre 脚本内 spawn/exec Vite。
218
+ *
219
+ * @example 推荐:预处理后 spawn Vite,复用同一份环境
220
+ * ```ts
221
+ * // scripts/build.mts
222
+ * import { spawnSync } from 'node:child_process';
223
+ * import {
224
+ * siteEnv,
225
+ * applySiteEnv,
226
+ * readEnvOption,
227
+ * resolveOptionConfig,
228
+ * } from '@alodi/site/env';
229
+ *
230
+ * // 1. 解析并校验 BIU_*(含 site 别名归一化)
231
+ * const base = siteEnv();
232
+ *
233
+ * // 2. 按需扩展字段
234
+ * const cdn = readEnvOption(process.env, resolveOptionConfig(undefined, 'BIU_CDN'));
235
+ *
236
+ * // 3. 写回 process.env,供子进程继承
237
+ * applySiteEnv({ ...base, ...(cdn ? { cdn } : {}) }, process.env, {
238
+ * cdn: 'BIU_CDN',
239
+ * });
240
+ *
241
+ * // 4. 在同一进程链路中启动 Vite(不要用 `node pre && vite`)
242
+ * const result = spawnSync('vite', ['build'], {
243
+ * stdio: 'inherit',
244
+ * env: process.env,
245
+ * shell: true,
246
+ * });
247
+ * process.exit(result.status ?? 1);
248
+ * ```
249
+ *
250
+ * @example package.json
251
+ * ```json
252
+ * {
253
+ * "scripts": {
254
+ * "build": "tsx scripts/build.mts"
255
+ * }
256
+ * }
257
+ * ```
258
+ *
259
+ * @example 启动命令
260
+ * ```bash
261
+ * BIU_PLATFORM=ios BIU_SITE=291jili BIU_API=https://api.example.com BIU_WS=wss://ws.example.com BIU_ENV=prod BIU_CDN=https://cdn.example.com npm run build
262
+ * ```
263
+ */
264
+ export function applySiteEnv(values) {
265
+ var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.env;
266
+ var keys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_ENV_KEYS;
267
+ return Object.assign(target, siteEnvToProcessEnv(values, keys));
268
+ }
269
+ function stringifyDotEnvValue(value) {
270
+ if (/[\s#"']/.test(value)) {
271
+ return "\"".concat(value.replace(/\\/g, '\\\\').replace(/"/g, '\\"'), "\"");
272
+ }
273
+ return value;
274
+ }
275
+
276
+ /** 将 env 字典格式化为 dotenv 文本,便于 Vite 读取 */
277
+ export function formatDotEnv(env) {
278
+ return Object.entries(env).filter(function (entry) {
279
+ return entry[1] !== undefined;
280
+ }).map(function (_ref3) {
281
+ var _ref4 = _slicedToArray(_ref3, 2),
282
+ key = _ref4[0],
283
+ value = _ref4[1];
284
+ return "".concat(key, "=").concat(stringifyDotEnvValue(value));
285
+ }).join('\n');
286
+ }
package/dist/index.d.ts CHANGED
@@ -1,39 +1 @@
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>;
9
- export declare const SITE: {
10
- readonly JILI_291: "291jili";
11
- readonly SUPER_291: "super291";
12
- readonly JILI_646: "646jili";
13
- readonly LODI_291: "lodi291";
14
- readonly TOP_646: "top646";
15
- readonly JILI_80: "80jili";
16
- readonly PH_646: "ph646";
17
- readonly ACE_291: "ace291";
18
- readonly HOT_646: "hot646";
19
- readonly LODI_646: "lodi646";
20
- readonly LODI_GAME: "lodigame";
21
- readonly LOL_646: "lol646";
22
- readonly LODI_777: "lodi777";
23
- readonly YDG_777: "ydg777";
24
- } & {
25
- readonly WASP: "wasp";
26
- readonly PG_82: "82pg";
27
- readonly PG_91: "91pg";
28
- readonly ZAPP_SPIN: "zappspin";
29
- readonly WASP_SPIN: "waspspin";
30
- readonly HAA_555: "haa555";
31
- readonly TRADING: "trading";
32
- } & {
33
- readonly VANG_WIN: "vangwin";
34
- } & {
35
- readonly SORTE_WIN: "sortewin";
36
- };
37
- export type SiteName = ValueType<typeof SITE>;
38
- export declare const getSiteCountry: (site: SiteName) => "PHL" | "THA" | "VNM" | "BRA" | undefined;
39
- export {};
1
+ export * from './site';
package/dist/index.js CHANGED
@@ -1,53 +1 @@
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, {
14
- JILI_291: '291jili',
15
- SUPER_291: 'super291',
16
- JILI_646: '646jili',
17
- LODI_291: 'lodi291',
18
- TOP_646: 'top646',
19
- JILI_80: '80jili',
20
- PH_646: 'ph646',
21
- ACE_291: 'ace291',
22
- HOT_646: 'hot646',
23
- LODI_646: 'lodi646',
24
- LODI_GAME: 'lodigame',
25
- LOL_646: 'lol646',
26
- LODI_777: 'lodi777',
27
- YDG_777: 'ydg777'
28
- }), COUNTRY.THA, {
29
- WASP: 'wasp',
30
- PG_82: '82pg',
31
- PG_91: '91pg',
32
- ZAPP_SPIN: 'zappspin',
33
- WASP_SPIN: 'waspspin',
34
- HAA_555: 'haa555',
35
- TRADING: 'trading'
36
- }), COUNTRY.VNM, {
37
- VANG_WIN: 'vangwin'
38
- }), COUNTRY.BRA, {
39
- SORTE_WIN: 'sortewin'
40
- });
41
- export var SITE = Object.keys(SITE_MAP).reduce(function (acc, cur) {
42
- return _objectSpread(_objectSpread({}, acc), SITE_MAP[cur]);
43
- }, {});
44
- export var getSiteCountry = function getSiteCountry(site) {
45
- for (var _i = 0, _Object$keys = Object.keys(SITE_MAP); _i < _Object$keys.length; _i++) {
46
- var country = _Object$keys[_i];
47
- if (Object.values(SITE_MAP[country]).some(function (_) {
48
- return _ === site;
49
- })) {
50
- return country;
51
- }
52
- }
53
- };
1
+ export * from "./site";
package/dist/site.d.ts ADDED
@@ -0,0 +1,217 @@
1
+ export declare const SITE: {
2
+ readonly JILI_291: "291jili";
3
+ readonly SUPER_291: "super291";
4
+ readonly JILI_646: "646jili";
5
+ readonly LODI_291: "lodi291";
6
+ readonly TOP_646: "top646";
7
+ readonly JILI_80: "80jili";
8
+ readonly PH_646: "ph646";
9
+ readonly ACE_291: "ace291";
10
+ readonly HOT_646: "hot646";
11
+ readonly LODI_646: "lodi646";
12
+ readonly LODI_GAME: "lodigame";
13
+ readonly LOL_646: "lol646";
14
+ readonly LODI_777: "lodi777";
15
+ readonly YDG_777: "ydg777";
16
+ readonly WASP: "wasp";
17
+ readonly PG_82: "82pg";
18
+ readonly PG_91: "91pg";
19
+ readonly ZAPP_SPIN: "zappspin";
20
+ readonly WASP_SPIN: "waspspin";
21
+ readonly HAA_555: "haa555";
22
+ readonly TRADING: "trading";
23
+ readonly VANG_WIN: "vangwin";
24
+ readonly SORTE_WIN: "sortewin";
25
+ };
26
+ export type SiteName = (typeof SITE)[keyof typeof SITE];
27
+ export type CountryName = 'PHL' | 'THA' | 'VNM' | 'BRA';
28
+ export declare const SiteConfig: {
29
+ readonly "291jili": {
30
+ readonly name: "291JILI";
31
+ readonly country: "PHL";
32
+ };
33
+ readonly super291: {
34
+ readonly name: "super291";
35
+ readonly country: "PHL";
36
+ };
37
+ readonly "646jili": {
38
+ readonly name: "646JILI";
39
+ readonly country: "PHL";
40
+ };
41
+ readonly lodi291: {
42
+ readonly name: "Lodi291";
43
+ readonly country: "PHL";
44
+ };
45
+ readonly top646: {
46
+ readonly name: "TOP646";
47
+ readonly country: "PHL";
48
+ };
49
+ readonly "80jili": {
50
+ readonly name: "80JILI";
51
+ readonly country: "PHL";
52
+ };
53
+ readonly ph646: {
54
+ readonly name: "PH646";
55
+ readonly country: "PHL";
56
+ };
57
+ readonly ace291: {
58
+ readonly name: "Ace291";
59
+ readonly country: "PHL";
60
+ };
61
+ readonly hot646: {
62
+ readonly name: "HOT646";
63
+ readonly country: "PHL";
64
+ };
65
+ readonly lodi646: {
66
+ readonly name: "Lodi646";
67
+ readonly country: "PHL";
68
+ };
69
+ readonly lodigame: {
70
+ readonly name: "lodigame";
71
+ readonly country: "PHL";
72
+ };
73
+ readonly lol646: {
74
+ readonly name: "lol646";
75
+ readonly country: "PHL";
76
+ };
77
+ readonly lodi777: {
78
+ readonly name: "Lodi777";
79
+ readonly country: "PHL";
80
+ };
81
+ readonly ydg777: {
82
+ readonly name: "ydg777";
83
+ readonly country: "PHL";
84
+ };
85
+ readonly wasp: {
86
+ readonly name: "WASPBET";
87
+ readonly country: "THA";
88
+ };
89
+ readonly "82pg": {
90
+ readonly name: "AURA88";
91
+ readonly country: "THA";
92
+ };
93
+ readonly "91pg": {
94
+ readonly name: "AURA69";
95
+ readonly country: "THA";
96
+ };
97
+ readonly zappspin: {
98
+ readonly name: "WASP.WIN";
99
+ readonly country: "THA";
100
+ };
101
+ readonly waspspin: {
102
+ readonly name: "WASP SPIN";
103
+ readonly country: "THA";
104
+ };
105
+ readonly haa555: {
106
+ readonly name: "HAA555";
107
+ readonly country: "THA";
108
+ };
109
+ readonly trading: {
110
+ readonly name: "COINAX";
111
+ readonly country: "THA";
112
+ };
113
+ readonly vangwin: {
114
+ readonly name: "VANGWIN";
115
+ readonly country: "VNM";
116
+ };
117
+ readonly sortewin: {
118
+ readonly name: "SO99";
119
+ readonly country: "BRA";
120
+ };
121
+ };
122
+ export declare const getSiteConfig: <T extends SiteName>(site: T) => {
123
+ site: T;
124
+ } & {
125
+ readonly "291jili": {
126
+ readonly name: "291JILI";
127
+ readonly country: "PHL";
128
+ };
129
+ readonly super291: {
130
+ readonly name: "super291";
131
+ readonly country: "PHL";
132
+ };
133
+ readonly "646jili": {
134
+ readonly name: "646JILI";
135
+ readonly country: "PHL";
136
+ };
137
+ readonly lodi291: {
138
+ readonly name: "Lodi291";
139
+ readonly country: "PHL";
140
+ };
141
+ readonly top646: {
142
+ readonly name: "TOP646";
143
+ readonly country: "PHL";
144
+ };
145
+ readonly "80jili": {
146
+ readonly name: "80JILI";
147
+ readonly country: "PHL";
148
+ };
149
+ readonly ph646: {
150
+ readonly name: "PH646";
151
+ readonly country: "PHL";
152
+ };
153
+ readonly ace291: {
154
+ readonly name: "Ace291";
155
+ readonly country: "PHL";
156
+ };
157
+ readonly hot646: {
158
+ readonly name: "HOT646";
159
+ readonly country: "PHL";
160
+ };
161
+ readonly lodi646: {
162
+ readonly name: "Lodi646";
163
+ readonly country: "PHL";
164
+ };
165
+ readonly lodigame: {
166
+ readonly name: "lodigame";
167
+ readonly country: "PHL";
168
+ };
169
+ readonly lol646: {
170
+ readonly name: "lol646";
171
+ readonly country: "PHL";
172
+ };
173
+ readonly lodi777: {
174
+ readonly name: "Lodi777";
175
+ readonly country: "PHL";
176
+ };
177
+ readonly ydg777: {
178
+ readonly name: "ydg777";
179
+ readonly country: "PHL";
180
+ };
181
+ readonly wasp: {
182
+ readonly name: "WASPBET";
183
+ readonly country: "THA";
184
+ };
185
+ readonly "82pg": {
186
+ readonly name: "AURA88";
187
+ readonly country: "THA";
188
+ };
189
+ readonly "91pg": {
190
+ readonly name: "AURA69";
191
+ readonly country: "THA";
192
+ };
193
+ readonly zappspin: {
194
+ readonly name: "WASP.WIN";
195
+ readonly country: "THA";
196
+ };
197
+ readonly waspspin: {
198
+ readonly name: "WASP SPIN";
199
+ readonly country: "THA";
200
+ };
201
+ readonly haa555: {
202
+ readonly name: "HAA555";
203
+ readonly country: "THA";
204
+ };
205
+ readonly trading: {
206
+ readonly name: "COINAX";
207
+ readonly country: "THA";
208
+ };
209
+ readonly vangwin: {
210
+ readonly name: "VANGWIN";
211
+ readonly country: "VNM";
212
+ };
213
+ readonly sortewin: {
214
+ readonly name: "SO99";
215
+ readonly country: "BRA";
216
+ };
217
+ }[T];