@alodi/site 0.0.1

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/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # `@alodi/site`
2
+
3
+ > TODO: description
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ const site = require('@alodi/site');
9
+
10
+ // TODO: DEMONSTRATE API
11
+ ```
@@ -0,0 +1,45 @@
1
+ /// <reference types="yargs" />
2
+ declare const options: readonly [{
3
+ readonly name: "platform";
4
+ readonly describe: "指定平台";
5
+ readonly choices: readonly ["ios", "android"];
6
+ readonly demandOption: true;
7
+ }, {
8
+ readonly name: "country";
9
+ readonly describe: "指定国家";
10
+ readonly choices: ("lodi" | "ncg")[];
11
+ readonly demandOption: true;
12
+ }, {
13
+ readonly name: "site";
14
+ readonly describe: "指定站点";
15
+ readonly choices: ("291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "wasp" | "82pg" | "91pg" | "ydg777")[];
16
+ readonly demandOption: true;
17
+ }, {
18
+ readonly name: "api";
19
+ readonly describe: "指定接口api域名,请带上协议";
20
+ readonly type: "string";
21
+ readonly demandOption: true;
22
+ }, {
23
+ readonly name: "ws";
24
+ readonly describe: "指定ws域名,请带上协议";
25
+ readonly type: "string";
26
+ readonly demandOption: true;
27
+ }, {
28
+ readonly name: "env";
29
+ readonly describe: "指定构建环境";
30
+ readonly choices: readonly ["dev", "test", "beta", "prod"];
31
+ readonly demandOption: true;
32
+ }];
33
+ type ParseArgvOption = {
34
+ argv?: string[];
35
+ option?: Partial<Record<(typeof options)[number]['name'], {
36
+ enable?: boolean;
37
+ describe?: string;
38
+ description?: string;
39
+ choices?: string[];
40
+ demandOption?: boolean;
41
+ [key: string]: any;
42
+ } | false>>;
43
+ };
44
+ export declare function siteArgv({ argv, option }?: ParseArgvOption): import("yargs").Argv<{}>;
45
+ export {};
@@ -0,0 +1,94 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/argv.ts
30
+ var argv_exports = {};
31
+ __export(argv_exports, {
32
+ siteArgv: () => siteArgv
33
+ });
34
+ module.exports = __toCommonJS(argv_exports);
35
+ var import_yargs = __toESM(require("yargs/yargs"));
36
+ var import_helpers = require("yargs/helpers");
37
+ var import_index = require("./index");
38
+ var options = [
39
+ {
40
+ name: "platform",
41
+ describe: "指定平台",
42
+ choices: ["ios", "android"],
43
+ demandOption: true
44
+ },
45
+ {
46
+ name: "country",
47
+ describe: "指定国家",
48
+ choices: import_index.CountryKeys,
49
+ demandOption: true
50
+ },
51
+ {
52
+ name: "site",
53
+ describe: "指定站点",
54
+ choices: import_index.SiteKeys,
55
+ demandOption: true
56
+ },
57
+ {
58
+ name: "api",
59
+ describe: "指定接口api域名,请带上协议",
60
+ type: "string",
61
+ demandOption: true
62
+ },
63
+ {
64
+ name: "ws",
65
+ describe: "指定ws域名,请带上协议",
66
+ type: "string",
67
+ demandOption: true
68
+ },
69
+ {
70
+ name: "env",
71
+ describe: "指定构建环境",
72
+ choices: ["dev", "test", "beta", "prod"],
73
+ demandOption: true
74
+ }
75
+ ];
76
+ function siteArgv({ argv = process.argv, option = {} } = {}) {
77
+ const result = (0, import_yargs.default)((0, import_helpers.hideBin)(argv));
78
+ options.map(({ name, ...item }) => ({
79
+ ...item,
80
+ enable: !!(option[name] ?? true),
81
+ ...option[name],
82
+ name
83
+ // description: option[name]?.description || item.description || item.choices?.join(' | '),
84
+ })).filter((x) => x.enable).forEach((item) => {
85
+ result.option(item.name, {
86
+ ...item
87
+ });
88
+ });
89
+ return result;
90
+ }
91
+ // Annotate the CommonJS export names for ESM import in node:
92
+ 0 && (module.exports = {
93
+ siteArgv
94
+ });
@@ -0,0 +1,26 @@
1
+ import { SiteKey } from "./index";
2
+ export type SiteItem = {
3
+ name: string;
4
+ /**meta og:* twitter:* */
5
+ seo: {
6
+ /**og:url/twitter:url */
7
+ url: string;
8
+ /**og:site_name/twitter:card */
9
+ site_name: string;
10
+ };
11
+ text: {
12
+ /**用在网页标题 291JILI */
13
+ title: string;
14
+ /**用在首页文案 */
15
+ site: string;
16
+ domain: string;
17
+ /**291JILI */
18
+ facebookMessenger: string;
19
+ /**291JILI */
20
+ instagram: string;
21
+ telegram: string;
22
+ /**目前用在help文案 */
23
+ support_email: string;
24
+ };
25
+ };
26
+ export declare const SiteData: Record<SiteKey, SiteItem>;
@@ -0,0 +1,303 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/data.ts
20
+ var data_exports = {};
21
+ __export(data_exports, {
22
+ SiteData: () => SiteData
23
+ });
24
+ module.exports = __toCommonJS(data_exports);
25
+ var import_index = require("./index");
26
+ var SiteData = {
27
+ [import_index.SITE.ACE_291]: {
28
+ name: "Ace291",
29
+ seo: {
30
+ url: "https://lodivip.com",
31
+ site_name: "lodivip.com"
32
+ },
33
+ text: {
34
+ title: "Ace291 Gaming",
35
+ site: "lodivip.com",
36
+ domain: "www.Ace291.com",
37
+ facebookMessenger: "Ace291",
38
+ instagram: "Ace291",
39
+ telegram: "LodiBonusOfficial",
40
+ support_email: "support@group291.com"
41
+ }
42
+ },
43
+ [import_index.SITE.HOT_646]: {
44
+ name: "HOT646",
45
+ seo: {
46
+ url: "https://www.hot646.com/",
47
+ site_name: "hot646.com"
48
+ },
49
+ text: {
50
+ title: "HOT646",
51
+ site: "hot-646.com",
52
+ domain: "www.HOT646.com",
53
+ facebookMessenger: "Hot646",
54
+ instagram: "HOT646",
55
+ telegram: "official646bonus",
56
+ support_email: "support@group646.com"
57
+ }
58
+ },
59
+ [import_index.SITE.JILI_291]: {
60
+ name: "291JILI",
61
+ seo: {
62
+ url: "https://www.lodiSlot.com/",
63
+ site_name: "lodiSlot.com"
64
+ },
65
+ text: {
66
+ title: "291JILI",
67
+ site: "lodislot.com",
68
+ domain: "www.291JILI.com",
69
+ facebookMessenger: "291jili",
70
+ instagram: "291JILI",
71
+ telegram: "LodiBonusOfficial",
72
+ support_email: "support@group291.com"
73
+ }
74
+ },
75
+ [import_index.SITE.JILI_646]: {
76
+ name: "646JILI",
77
+ seo: {
78
+ url: "https://www.lodiSlot.com/",
79
+ site_name: "lodiSlot.com"
80
+ },
81
+ text: {
82
+ title: "646JILI",
83
+ site: "646jili.ph",
84
+ domain: "www.646JILI.com",
85
+ facebookMessenger: "646jili",
86
+ instagram: "646JILI",
87
+ telegram: "official646bonus",
88
+ support_email: "support@group646.com"
89
+ }
90
+ },
91
+ [import_index.SITE.JILI_80]: {
92
+ name: "80JILI",
93
+ seo: {
94
+ url: "https://www.80jili.com/",
95
+ site_name: "80jili.com"
96
+ },
97
+ text: {
98
+ title: "80JILI.COM - Resorts World or Fontana Casino & 80JILI",
99
+ site: "",
100
+ domain: "www.80JILI.com",
101
+ facebookMessenger: "80JILI",
102
+ instagram: "80JILI",
103
+ telegram: "jili80club",
104
+ support_email: "support@group291.com"
105
+ }
106
+ },
107
+ [import_index.SITE.LODI_291]: {
108
+ name: "Lodi291",
109
+ seo: {
110
+ url: "https://www.lodi291.ph/",
111
+ site_name: "lodi291.com"
112
+ },
113
+ text: {
114
+ title: "Lodi291",
115
+ site: "291win.com",
116
+ domain: "www.Lodi291.com",
117
+ facebookMessenger: "Lodi291",
118
+ instagram: "Lodi291",
119
+ telegram: "LodiBonusOfficial",
120
+ support_email: "support@group291.com"
121
+ }
122
+ },
123
+ [import_index.SITE.LODI_646]: {
124
+ name: "Lodi646",
125
+ seo: {
126
+ url: "https://www.lodi646.com/",
127
+ site_name: "lodi646.com"
128
+ },
129
+ text: {
130
+ title: "Lodi646",
131
+ site: "646live.com",
132
+ domain: "www.LODI646.com",
133
+ facebookMessenger: "Lodi646",
134
+ instagram: "LODI646",
135
+ telegram: "official646bonus",
136
+ support_email: "support@group646.com"
137
+ }
138
+ },
139
+ [import_index.SITE.LODI_777]: {
140
+ name: "Lodi777",
141
+ seo: {
142
+ url: "https://lodi777.ph/",
143
+ site_name: "lodi777.ph"
144
+ },
145
+ text: {
146
+ title: "Lodi777",
147
+ site: "lodi777.com",
148
+ domain: "www.lodi777.ph",
149
+ facebookMessenger: "LODI777",
150
+ instagram: "lodi777",
151
+ telegram: "LodiBonusOfficial",
152
+ support_email: "support@group291.com"
153
+ }
154
+ },
155
+ [import_index.SITE.LODI_GAME]: {
156
+ name: "lodigame",
157
+ seo: {
158
+ url: "https://www.lodiGame.com/",
159
+ site_name: "lodiGame.com"
160
+ },
161
+ text: {
162
+ title: "lodigame",
163
+ site: "lodigame.com",
164
+ domain: "www.lodigame.com",
165
+ facebookMessenger: "Lodigame-Official",
166
+ instagram: "lodigame",
167
+ telegram: "LodiBonusOfficial",
168
+ support_email: "support@group291.com"
169
+ }
170
+ },
171
+ [import_index.SITE.LOL_646]: {
172
+ name: "lol646",
173
+ seo: {
174
+ url: "https://lol646.ph/",
175
+ site_name: "lol646.ph"
176
+ },
177
+ text: {
178
+ title: "lol646",
179
+ site: "lol-646.com",
180
+ domain: "www.lol646.ph",
181
+ facebookMessenger: "LOL646Official",
182
+ instagram: "lol646",
183
+ telegram: "official646bonus",
184
+ support_email: "support@group646.com"
185
+ }
186
+ },
187
+ [import_index.SITE.PG_82]: {
188
+ name: "82PG",
189
+ seo: {
190
+ url: "https://www.82pg.com/",
191
+ site_name: "82pg.com"
192
+ },
193
+ text: {
194
+ title: "82PG Gaming",
195
+ site: "82pg.com",
196
+ domain: "www.82PG.com",
197
+ facebookMessenger: "82PGgaming",
198
+ instagram: "82PG_ph",
199
+ telegram: "",
200
+ support_email: ""
201
+ }
202
+ },
203
+ [import_index.SITE.PG_91]: {
204
+ name: "91PG",
205
+ seo: {
206
+ url: "https://www.91pg.com/",
207
+ site_name: "91pg.com"
208
+ },
209
+ text: {
210
+ title: "91PG Gaming",
211
+ site: "91pg.com",
212
+ domain: "91PG.com",
213
+ facebookMessenger: "91PGgaming",
214
+ instagram: "91PG_ph",
215
+ telegram: "",
216
+ support_email: ""
217
+ }
218
+ },
219
+ [import_index.SITE.PH_646]: {
220
+ name: "PH646",
221
+ seo: {
222
+ url: "https://www.646ph.com",
223
+ site_name: "646ph.com"
224
+ },
225
+ text: {
226
+ title: "PH646",
227
+ site: "ph-646.com",
228
+ domain: "www.PH646.com",
229
+ facebookMessenger: "646PH.Official",
230
+ instagram: "PH646",
231
+ telegram: "official646bonus",
232
+ support_email: "support@group646.com"
233
+ }
234
+ },
235
+ [import_index.SITE.SUPER_291]: {
236
+ name: "super291",
237
+ seo: {
238
+ url: "https://www.291bet1.com/",
239
+ site_name: "291bet1.com"
240
+ },
241
+ text: {
242
+ title: "super291",
243
+ site: "super291.ph",
244
+ domain: "www.super291.com",
245
+ facebookMessenger: "Super291",
246
+ instagram: "super291",
247
+ telegram: "LodiBonusOfficial",
248
+ support_email: "support@group291.com"
249
+ }
250
+ },
251
+ [import_index.SITE.TOP_646]: {
252
+ name: "TOP646",
253
+ seo: {
254
+ url: "https://www.mnl646.ph/",
255
+ site_name: "mnl646.ph"
256
+ },
257
+ text: {
258
+ title: "TOP646",
259
+ site: "top-646.com",
260
+ domain: "www.TOP646.com",
261
+ facebookMessenger: "Top646",
262
+ instagram: "TOP646",
263
+ telegram: "official646bonus",
264
+ support_email: "support@group646.com"
265
+ }
266
+ },
267
+ [import_index.SITE.WASP]: {
268
+ name: "WASPBET",
269
+ seo: {
270
+ url: "https://www.waspth.com",
271
+ site_name: "waspth.com"
272
+ },
273
+ text: {
274
+ title: "WASPBET Gaming",
275
+ site: "waspth.com",
276
+ domain: "www.WASPBET.com",
277
+ facebookMessenger: "WASPBETgaming",
278
+ instagram: "WASPBET_ph",
279
+ telegram: "",
280
+ support_email: ""
281
+ }
282
+ },
283
+ [import_index.SITE.YDG_777]: {
284
+ name: "ydg777",
285
+ seo: {
286
+ url: "https://www.ydg777.com/",
287
+ site_name: "ydg777.com"
288
+ },
289
+ text: {
290
+ title: "YDG777",
291
+ site: "ydg777.com",
292
+ domain: "www.ydg777.com",
293
+ facebookMessenger: "ydg777",
294
+ instagram: "ydg777",
295
+ telegram: "YDG777Bonus",
296
+ support_email: "support@group291.com"
297
+ }
298
+ }
299
+ };
300
+ // Annotate the CommonJS export names for ESM import in node:
301
+ 0 && (module.exports = {
302
+ SiteData
303
+ });
@@ -0,0 +1,33 @@
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 WASP: "wasp";
16
+ readonly PG_82: "82pg";
17
+ readonly PG_91: "91pg";
18
+ readonly YDG_777: "ydg777";
19
+ };
20
+ export declare const SiteKeys: ("291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "wasp" | "82pg" | "91pg" | "ydg777")[];
21
+ export type SiteKey = (typeof SiteKeys)[number];
22
+ export declare const COUNTRY: {
23
+ readonly LODI: "lodi";
24
+ readonly NCG: "ncg";
25
+ };
26
+ export declare const CountryKeys: ("lodi" | "ncg")[];
27
+ export type CountryKey = typeof CountryKeys[number];
28
+ export declare const NcgSiteKeys: readonly ["wasp", "82pg", "91pg"];
29
+ export type NcgSiteKey = typeof NcgSiteKeys[number];
30
+ export declare const isNcgSite: (site: SiteKey) => site is "wasp" | "82pg" | "91pg";
31
+ export declare const LodiSiteKeys: ("291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "ydg777")[];
32
+ export type LodiSiteKey = typeof LodiSiteKeys[number];
33
+ export declare const isLodiSite: (site: SiteKey) => site is "291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "ydg777";
@@ -0,0 +1,71 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/index.ts
20
+ var src_exports = {};
21
+ __export(src_exports, {
22
+ COUNTRY: () => COUNTRY,
23
+ CountryKeys: () => CountryKeys,
24
+ LodiSiteKeys: () => LodiSiteKeys,
25
+ NcgSiteKeys: () => NcgSiteKeys,
26
+ SITE: () => SITE,
27
+ SiteKeys: () => SiteKeys,
28
+ isLodiSite: () => isLodiSite,
29
+ isNcgSite: () => isNcgSite
30
+ });
31
+ 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
+ };
51
+ var SiteKeys = Object.keys(SITE).map((x) => SITE[x]);
52
+ var COUNTRY = {
53
+ LODI: "lodi",
54
+ NCG: "ncg"
55
+ };
56
+ var CountryKeys = Object.keys(COUNTRY).map((x) => COUNTRY[x]);
57
+ var NcgSiteKeys = [SITE.WASP, SITE.PG_82, SITE.PG_91];
58
+ var isNcgSite = (site) => NcgSiteKeys.indexOf(site) !== -1;
59
+ var LodiSiteKeys = SiteKeys.filter((site) => !isNcgSite(site));
60
+ var isLodiSite = (site) => LodiSiteKeys.indexOf(site) !== -1;
61
+ // Annotate the CommonJS export names for ESM import in node:
62
+ 0 && (module.exports = {
63
+ COUNTRY,
64
+ CountryKeys,
65
+ LodiSiteKeys,
66
+ NcgSiteKeys,
67
+ SITE,
68
+ SiteKeys,
69
+ isLodiSite,
70
+ isNcgSite
71
+ });
@@ -0,0 +1,45 @@
1
+ /// <reference types="yargs" />
2
+ declare const options: readonly [{
3
+ readonly name: "platform";
4
+ readonly describe: "指定平台";
5
+ readonly choices: readonly ["ios", "android"];
6
+ readonly demandOption: true;
7
+ }, {
8
+ readonly name: "country";
9
+ readonly describe: "指定国家";
10
+ readonly choices: ("lodi" | "ncg")[];
11
+ readonly demandOption: true;
12
+ }, {
13
+ readonly name: "site";
14
+ readonly describe: "指定站点";
15
+ readonly choices: ("291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "wasp" | "82pg" | "91pg" | "ydg777")[];
16
+ readonly demandOption: true;
17
+ }, {
18
+ readonly name: "api";
19
+ readonly describe: "指定接口api域名,请带上协议";
20
+ readonly type: "string";
21
+ readonly demandOption: true;
22
+ }, {
23
+ readonly name: "ws";
24
+ readonly describe: "指定ws域名,请带上协议";
25
+ readonly type: "string";
26
+ readonly demandOption: true;
27
+ }, {
28
+ readonly name: "env";
29
+ readonly describe: "指定构建环境";
30
+ readonly choices: readonly ["dev", "test", "beta", "prod"];
31
+ readonly demandOption: true;
32
+ }];
33
+ type ParseArgvOption = {
34
+ argv?: string[];
35
+ option?: Partial<Record<(typeof options)[number]['name'], {
36
+ enable?: boolean;
37
+ describe?: string;
38
+ description?: string;
39
+ choices?: string[];
40
+ demandOption?: boolean;
41
+ [key: string]: any;
42
+ } | false>>;
43
+ };
44
+ export declare function siteArgv({ argv, option }?: ParseArgvOption): import("yargs").Argv<{}>;
45
+ export {};
@@ -0,0 +1,68 @@
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
+ var _excluded = ["name"];
3
+ 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; }
4
+ 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; }
5
+ 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; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
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
+ 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
+ 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
+ import { hideBin } from 'yargs/helpers';
12
+ import { CountryKeys, SiteKeys } from "./index";
13
+ var options = [{
14
+ name: 'platform',
15
+ describe: '指定平台',
16
+ choices: ['ios', 'android'],
17
+ demandOption: true
18
+ }, {
19
+ name: 'country',
20
+ describe: '指定国家',
21
+ choices: CountryKeys,
22
+ demandOption: true
23
+ }, {
24
+ name: 'site',
25
+ describe: '指定站点',
26
+ choices: SiteKeys,
27
+ demandOption: true
28
+ }, {
29
+ name: 'api',
30
+ describe: '指定接口api域名,请带上协议',
31
+ type: 'string',
32
+ demandOption: true
33
+ }, {
34
+ name: 'ws',
35
+ describe: '指定ws域名,请带上协议',
36
+ type: 'string',
37
+ demandOption: true
38
+ }, {
39
+ name: 'env',
40
+ describe: '指定构建环境',
41
+ choices: ['dev', 'test', 'beta', 'prod'],
42
+ demandOption: true
43
+ }];
44
+ export function siteArgv() {
45
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
46
+ _ref$argv = _ref.argv,
47
+ argv = _ref$argv === void 0 ? process.argv : _ref$argv,
48
+ _ref$option = _ref.option,
49
+ option = _ref$option === void 0 ? {} : _ref$option;
50
+ var result = yargs(hideBin(argv));
51
+ options.map(function (_ref2) {
52
+ var _option$name;
53
+ var name = _ref2.name,
54
+ item = _objectWithoutProperties(_ref2, _excluded);
55
+ return _objectSpread(_objectSpread(_objectSpread({}, item), {}, {
56
+ enable: !!((_option$name = option[name]) !== null && _option$name !== void 0 ? _option$name : true)
57
+ }, option[name]), {}, {
58
+ name: name
59
+ // description: option[name]?.description || item.description || item.choices?.join(' | '),
60
+ });
61
+ }).filter(function (x) {
62
+ return x.enable;
63
+ }).forEach(function (item) {
64
+ result.option(item.name, _objectSpread({}, item));
65
+ });
66
+ return result;
67
+ }
68
+ ;
@@ -0,0 +1,26 @@
1
+ import { SiteKey } from "./index";
2
+ export type SiteItem = {
3
+ name: string;
4
+ /**meta og:* twitter:* */
5
+ seo: {
6
+ /**og:url/twitter:url */
7
+ url: string;
8
+ /**og:site_name/twitter:card */
9
+ site_name: string;
10
+ };
11
+ text: {
12
+ /**用在网页标题 291JILI */
13
+ title: string;
14
+ /**用在首页文案 */
15
+ site: string;
16
+ domain: string;
17
+ /**291JILI */
18
+ facebookMessenger: string;
19
+ /**291JILI */
20
+ instagram: string;
21
+ telegram: string;
22
+ /**目前用在help文案 */
23
+ support_email: string;
24
+ };
25
+ };
26
+ export declare const SiteData: Record<SiteKey, SiteItem>;
@@ -0,0 +1,262 @@
1
+ var _SiteData;
2
+ 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); }
3
+ 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; }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
5
+ 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); }
6
+ import { SITE } from "./index";
7
+ export var SiteData = (_SiteData = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_SiteData, SITE.ACE_291, {
8
+ name: 'Ace291',
9
+ seo: {
10
+ url: 'https://lodivip.com',
11
+ site_name: 'lodivip.com'
12
+ },
13
+ text: {
14
+ title: 'Ace291 Gaming',
15
+ site: 'lodivip.com',
16
+ domain: 'www.Ace291.com',
17
+ facebookMessenger: 'Ace291',
18
+ instagram: 'Ace291',
19
+ telegram: 'LodiBonusOfficial',
20
+ support_email: 'support@group291.com'
21
+ }
22
+ }), SITE.HOT_646, {
23
+ name: 'HOT646',
24
+ seo: {
25
+ url: 'https://www.hot646.com/',
26
+ site_name: 'hot646.com'
27
+ },
28
+ text: {
29
+ title: 'HOT646',
30
+ site: 'hot-646.com',
31
+ domain: 'www.HOT646.com',
32
+ facebookMessenger: 'Hot646',
33
+ instagram: 'HOT646',
34
+ telegram: 'official646bonus',
35
+ support_email: 'support@group646.com'
36
+ }
37
+ }), SITE.JILI_291, {
38
+ name: '291JILI',
39
+ seo: {
40
+ url: 'https://www.lodiSlot.com/',
41
+ site_name: 'lodiSlot.com'
42
+ },
43
+ text: {
44
+ title: '291JILI',
45
+ site: 'lodislot.com',
46
+ domain: 'www.291JILI.com',
47
+ facebookMessenger: '291jili',
48
+ instagram: '291JILI',
49
+ telegram: 'LodiBonusOfficial',
50
+ support_email: 'support@group291.com'
51
+ }
52
+ }), SITE.JILI_646, {
53
+ name: '646JILI',
54
+ seo: {
55
+ url: 'https://www.lodiSlot.com/',
56
+ site_name: 'lodiSlot.com'
57
+ },
58
+ text: {
59
+ title: '646JILI',
60
+ site: '646jili.ph',
61
+ domain: 'www.646JILI.com',
62
+ facebookMessenger: '646jili',
63
+ instagram: '646JILI',
64
+ telegram: 'official646bonus',
65
+ support_email: 'support@group646.com'
66
+ }
67
+ }), SITE.JILI_80, {
68
+ name: '80JILI',
69
+ seo: {
70
+ url: 'https://www.80jili.com/',
71
+ site_name: '80jili.com'
72
+ },
73
+ text: {
74
+ title: '80JILI.COM - Resorts World or Fontana Casino & 80JILI',
75
+ site: '',
76
+ domain: 'www.80JILI.com',
77
+ facebookMessenger: '80JILI',
78
+ instagram: '80JILI',
79
+ telegram: 'jili80club',
80
+ support_email: 'support@group291.com'
81
+ }
82
+ }), SITE.LODI_291, {
83
+ name: 'Lodi291',
84
+ seo: {
85
+ url: 'https://www.lodi291.ph/',
86
+ site_name: 'lodi291.com'
87
+ },
88
+ text: {
89
+ title: 'Lodi291',
90
+ site: '291win.com',
91
+ domain: 'www.Lodi291.com',
92
+ facebookMessenger: 'Lodi291',
93
+ instagram: 'Lodi291',
94
+ telegram: 'LodiBonusOfficial',
95
+ support_email: 'support@group291.com'
96
+ }
97
+ }), SITE.LODI_646, {
98
+ name: 'Lodi646',
99
+ seo: {
100
+ url: 'https://www.lodi646.com/',
101
+ site_name: 'lodi646.com'
102
+ },
103
+ text: {
104
+ title: 'Lodi646',
105
+ site: '646live.com',
106
+ domain: 'www.LODI646.com',
107
+ facebookMessenger: 'Lodi646',
108
+ instagram: 'LODI646',
109
+ telegram: 'official646bonus',
110
+ support_email: 'support@group646.com'
111
+ }
112
+ }), SITE.LODI_777, {
113
+ name: 'Lodi777',
114
+ seo: {
115
+ url: 'https://lodi777.ph/',
116
+ site_name: 'lodi777.ph'
117
+ },
118
+ text: {
119
+ title: 'Lodi777',
120
+ site: 'lodi777.com',
121
+ domain: 'www.lodi777.ph',
122
+ facebookMessenger: 'LODI777',
123
+ instagram: 'lodi777',
124
+ telegram: 'LodiBonusOfficial',
125
+ support_email: 'support@group291.com'
126
+ }
127
+ }), SITE.LODI_GAME, {
128
+ name: 'lodigame',
129
+ seo: {
130
+ url: 'https://www.lodiGame.com/',
131
+ site_name: 'lodiGame.com'
132
+ },
133
+ text: {
134
+ title: 'lodigame',
135
+ site: 'lodigame.com',
136
+ domain: 'www.lodigame.com',
137
+ facebookMessenger: 'Lodigame-Official',
138
+ instagram: 'lodigame',
139
+ telegram: 'LodiBonusOfficial',
140
+ support_email: 'support@group291.com'
141
+ }
142
+ }), SITE.LOL_646, {
143
+ name: 'lol646',
144
+ seo: {
145
+ url: 'https://lol646.ph/',
146
+ site_name: 'lol646.ph'
147
+ },
148
+ text: {
149
+ title: 'lol646',
150
+ site: 'lol-646.com',
151
+ domain: 'www.lol646.ph',
152
+ facebookMessenger: 'LOL646Official',
153
+ instagram: 'lol646',
154
+ telegram: 'official646bonus',
155
+ support_email: 'support@group646.com'
156
+ }
157
+ }), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_SiteData, SITE.PG_82, {
158
+ name: '82PG',
159
+ seo: {
160
+ url: 'https://www.82pg.com/',
161
+ site_name: '82pg.com'
162
+ },
163
+ text: {
164
+ title: '82PG Gaming',
165
+ site: '82pg.com',
166
+ domain: 'www.82PG.com',
167
+ facebookMessenger: '82PGgaming',
168
+ instagram: '82PG_ph',
169
+ telegram: '',
170
+ support_email: ''
171
+ }
172
+ }), SITE.PG_91, {
173
+ name: '91PG',
174
+ seo: {
175
+ url: 'https://www.91pg.com/',
176
+ site_name: '91pg.com'
177
+ },
178
+ text: {
179
+ title: '91PG Gaming',
180
+ site: '91pg.com',
181
+ domain: '91PG.com',
182
+ facebookMessenger: '91PGgaming',
183
+ instagram: '91PG_ph',
184
+ telegram: '',
185
+ support_email: ''
186
+ }
187
+ }), SITE.PH_646, {
188
+ name: 'PH646',
189
+ seo: {
190
+ url: 'https://www.646ph.com',
191
+ site_name: '646ph.com'
192
+ },
193
+ text: {
194
+ title: 'PH646',
195
+ site: 'ph-646.com',
196
+ domain: 'www.PH646.com',
197
+ facebookMessenger: '646PH.Official',
198
+ instagram: 'PH646',
199
+ telegram: 'official646bonus',
200
+ support_email: 'support@group646.com'
201
+ }
202
+ }), SITE.SUPER_291, {
203
+ name: 'super291',
204
+ seo: {
205
+ url: 'https://www.291bet1.com/',
206
+ site_name: '291bet1.com'
207
+ },
208
+ text: {
209
+ title: 'super291',
210
+ site: 'super291.ph',
211
+ domain: 'www.super291.com',
212
+ facebookMessenger: 'Super291',
213
+ instagram: 'super291',
214
+ telegram: 'LodiBonusOfficial',
215
+ support_email: 'support@group291.com'
216
+ }
217
+ }), SITE.TOP_646, {
218
+ name: 'TOP646',
219
+ seo: {
220
+ url: 'https://www.mnl646.ph/',
221
+ site_name: 'mnl646.ph'
222
+ },
223
+ text: {
224
+ title: 'TOP646',
225
+ site: 'top-646.com',
226
+ domain: 'www.TOP646.com',
227
+ facebookMessenger: 'Top646',
228
+ instagram: 'TOP646',
229
+ telegram: 'official646bonus',
230
+ support_email: 'support@group646.com'
231
+ }
232
+ }), SITE.WASP, {
233
+ name: 'WASPBET',
234
+ seo: {
235
+ url: 'https://www.waspth.com',
236
+ site_name: 'waspth.com'
237
+ },
238
+ text: {
239
+ title: 'WASPBET Gaming',
240
+ site: 'waspth.com',
241
+ domain: 'www.WASPBET.com',
242
+ facebookMessenger: 'WASPBETgaming',
243
+ instagram: 'WASPBET_ph',
244
+ telegram: '',
245
+ support_email: ''
246
+ }
247
+ }), SITE.YDG_777, {
248
+ name: 'ydg777',
249
+ seo: {
250
+ url: 'https://www.ydg777.com/',
251
+ site_name: 'ydg777.com'
252
+ },
253
+ text: {
254
+ title: 'YDG777',
255
+ site: 'ydg777.com',
256
+ domain: 'www.ydg777.com',
257
+ facebookMessenger: 'ydg777',
258
+ instagram: 'ydg777',
259
+ telegram: 'YDG777Bonus',
260
+ support_email: 'support@group291.com'
261
+ }
262
+ }));
@@ -0,0 +1,33 @@
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 WASP: "wasp";
16
+ readonly PG_82: "82pg";
17
+ readonly PG_91: "91pg";
18
+ readonly YDG_777: "ydg777";
19
+ };
20
+ export declare const SiteKeys: ("291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "wasp" | "82pg" | "91pg" | "ydg777")[];
21
+ export type SiteKey = (typeof SiteKeys)[number];
22
+ export declare const COUNTRY: {
23
+ readonly LODI: "lodi";
24
+ readonly NCG: "ncg";
25
+ };
26
+ export declare const CountryKeys: ("lodi" | "ncg")[];
27
+ export type CountryKey = typeof CountryKeys[number];
28
+ export declare const NcgSiteKeys: readonly ["wasp", "82pg", "91pg"];
29
+ export type NcgSiteKey = typeof NcgSiteKeys[number];
30
+ export declare const isNcgSite: (site: SiteKey) => site is "wasp" | "82pg" | "91pg";
31
+ export declare const LodiSiteKeys: ("291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "ydg777")[];
32
+ export type LodiSiteKey = typeof LodiSiteKeys[number];
33
+ export declare const isLodiSite: (site: SiteKey) => site is "291jili" | "super291" | "646jili" | "lodi291" | "top646" | "80jili" | "ph646" | "ace291" | "hot646" | "lodi646" | "lodigame" | "lol646" | "lodi777" | "ydg777";
@@ -0,0 +1,39 @@
1
+ export var SITE = {
2
+ JILI_291: '291jili',
3
+ SUPER_291: 'super291',
4
+ JILI_646: '646jili',
5
+ LODI_291: 'lodi291',
6
+ TOP_646: 'top646',
7
+ JILI_80: '80jili',
8
+ PH_646: 'ph646',
9
+ ACE_291: 'ace291',
10
+ HOT_646: 'hot646',
11
+ LODI_646: 'lodi646',
12
+ LODI_GAME: 'lodigame',
13
+ LOL_646: 'lol646',
14
+ LODI_777: 'lodi777',
15
+ WASP: 'wasp',
16
+ PG_82: '82pg',
17
+ PG_91: '91pg',
18
+ YDG_777: 'ydg777'
19
+ };
20
+ export var SiteKeys = Object.keys(SITE).map(function (x) {
21
+ return SITE[x];
22
+ });
23
+ export var COUNTRY = {
24
+ LODI: 'lodi',
25
+ NCG: 'ncg'
26
+ };
27
+ export var CountryKeys = Object.keys(COUNTRY).map(function (x) {
28
+ return COUNTRY[x];
29
+ });
30
+ export var NcgSiteKeys = [SITE.WASP, SITE.PG_82, SITE.PG_91];
31
+ export var isNcgSite = function isNcgSite(site) {
32
+ return NcgSiteKeys.indexOf(site) !== -1;
33
+ };
34
+ export var LodiSiteKeys = SiteKeys.filter(function (site) {
35
+ return !isNcgSite(site);
36
+ });
37
+ export var isLodiSite = function isLodiSite(site) {
38
+ return LodiSiteKeys.indexOf(site) !== -1;
39
+ };
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@alodi/site",
3
+ "version": "0.0.1",
4
+ "description": "lodi site",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git@git.lodiops.com:bag_web/lodi-mono.git"
8
+ },
9
+ "license": "ISC",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/esm/index.d.ts",
13
+ "import": "./dist/esm/index.js",
14
+ "require": "./dist/cjs/index.js"
15
+ },
16
+ "./data": {
17
+ "types": "./dist/esm/data.d.ts",
18
+ "import": "./dist/esm/data.js",
19
+ "require": "./dist/cjs/data.js"
20
+ },
21
+ "./argv": {
22
+ "types": "./dist/esm/argv.d.ts",
23
+ "import": "./dist/esm/argv.js",
24
+ "require": "./dist/cjs/argv.js"
25
+ },
26
+ "./*": "./*"
27
+ },
28
+ "main": "dist/cjs/index.js",
29
+ "module": "dist/esm/index.js",
30
+ "types": "dist/esm/index.d.ts",
31
+ "directories": {
32
+ "lib": "lib",
33
+ "test": "__tests__"
34
+ },
35
+ "files": [
36
+ "dist",
37
+ "CHANGELOG.md"
38
+ ],
39
+ "scripts": {
40
+ "build": "father build",
41
+ "build:watch": "father dev"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^22.13.4",
45
+ "@types/yargs": "^17.0.33",
46
+ "yargs": "^17.7.2"
47
+ },
48
+ "publishConfig": {
49
+ "access": "public"
50
+ },
51
+ "gitHead": "323e47b0d5cf217408ac7b07a93485145aba8223"
52
+ }