rategame-shared 1.1.484 → 1.1.486
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.
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
* - "Upside-down" / "turned" letters used by flip-text generators
|
|
15
15
|
* (⊥, ǝ, ɹ, ʇ, ʞ, ʎ, ɥ, ɐ, ɔ, ∀, ᗺ, ⅄, ...). Requires ≥2 of these
|
|
16
16
|
* to avoid false positives from a stray IPA character.
|
|
17
|
+
* - Cherokee letters used as Latin lookalikes (ᏇᏋᎥᏒᎴ). Requires ≥2 so an
|
|
18
|
+
* isolated Cherokee character does not reject otherwise normal text.
|
|
17
19
|
*
|
|
18
20
|
* Shared by the API (server-side guard) and clients (pre-submit guard).
|
|
19
21
|
*/
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
* - "Upside-down" / "turned" letters used by flip-text generators
|
|
16
16
|
* (⊥, ǝ, ɹ, ʇ, ʞ, ʎ, ɥ, ɐ, ɔ, ∀, ᗺ, ⅄, ...). Requires ≥2 of these
|
|
17
17
|
* to avoid false positives from a stray IPA character.
|
|
18
|
+
* - Cherokee letters used as Latin lookalikes (ᏇᏋᎥᏒᎴ). Requires ≥2 so an
|
|
19
|
+
* isolated Cherokee character does not reject otherwise normal text.
|
|
18
20
|
*
|
|
19
21
|
* Shared by the API (server-side guard) and clients (pre-submit guard).
|
|
20
22
|
*/
|
|
@@ -92,13 +94,29 @@ function containsTurnedLetters(text) {
|
|
|
92
94
|
}
|
|
93
95
|
return false;
|
|
94
96
|
}
|
|
97
|
+
function containsCherokeeLookalikes(text) {
|
|
98
|
+
let count = 0;
|
|
99
|
+
for (const ch of text) {
|
|
100
|
+
const cp = ch.codePointAt(0);
|
|
101
|
+
const isCherokeeLetter = (cp >= 0x13a0 && cp <= 0x13f5) ||
|
|
102
|
+
(cp >= 0x13f8 && cp <= 0x13fd) ||
|
|
103
|
+
(cp >= 0xab70 && cp <= 0xabbf);
|
|
104
|
+
if (isCherokeeLetter) {
|
|
105
|
+
count++;
|
|
106
|
+
if (count >= 2)
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
95
112
|
function containsFancyText(text) {
|
|
96
113
|
if (!text)
|
|
97
114
|
return false;
|
|
98
115
|
return (containsMathAlphanumeric(text) ||
|
|
99
116
|
containsFullwidthAlphanumeric(text) ||
|
|
100
117
|
containsEnclosedAlphanumeric(text) ||
|
|
101
|
-
containsTurnedLetters(text)
|
|
118
|
+
containsTurnedLetters(text) ||
|
|
119
|
+
containsCherokeeLookalikes(text));
|
|
102
120
|
}
|
|
103
121
|
exports.containsFancyText = containsFancyText;
|
|
104
122
|
/**
|
|
@@ -7,12 +7,14 @@ export declare const createCommunityTeamSchema: z.ZodObject<{
|
|
|
7
7
|
teamCode: z.ZodString;
|
|
8
8
|
conference: z.ZodOptional<z.ZodString>;
|
|
9
9
|
division: z.ZodOptional<z.ZodString>;
|
|
10
|
+
specialEvent: z.ZodOptional<z.ZodBoolean>;
|
|
10
11
|
}, "strip", z.ZodTypeAny, {
|
|
11
12
|
name: string;
|
|
12
13
|
image: string;
|
|
13
14
|
teamCode: string;
|
|
14
15
|
city?: string | null | undefined;
|
|
15
16
|
division?: string | undefined;
|
|
17
|
+
specialEvent?: boolean | undefined;
|
|
16
18
|
conference?: string | undefined;
|
|
17
19
|
country?: string | null | undefined;
|
|
18
20
|
}, {
|
|
@@ -21,6 +23,7 @@ export declare const createCommunityTeamSchema: z.ZodObject<{
|
|
|
21
23
|
teamCode: string;
|
|
22
24
|
city?: string | null | undefined;
|
|
23
25
|
division?: string | undefined;
|
|
26
|
+
specialEvent?: boolean | undefined;
|
|
24
27
|
conference?: string | undefined;
|
|
25
28
|
country?: string | null | undefined;
|
|
26
29
|
}>;
|
|
@@ -415,12 +418,14 @@ export declare const communityGameTeamSchema: z.ZodObject<{
|
|
|
415
418
|
teamCode: z.ZodString;
|
|
416
419
|
conference: z.ZodOptional<z.ZodString>;
|
|
417
420
|
division: z.ZodOptional<z.ZodString>;
|
|
421
|
+
specialEvent: z.ZodOptional<z.ZodBoolean>;
|
|
418
422
|
}, "strip", z.ZodTypeAny, {
|
|
419
423
|
name: string;
|
|
420
424
|
image: string;
|
|
421
425
|
teamCode: string;
|
|
422
426
|
city?: string | null | undefined;
|
|
423
427
|
division?: string | undefined;
|
|
428
|
+
specialEvent?: boolean | undefined;
|
|
424
429
|
conference?: string | undefined;
|
|
425
430
|
country?: string | null | undefined;
|
|
426
431
|
}, {
|
|
@@ -429,6 +434,7 @@ export declare const communityGameTeamSchema: z.ZodObject<{
|
|
|
429
434
|
teamCode: string;
|
|
430
435
|
city?: string | null | undefined;
|
|
431
436
|
division?: string | undefined;
|
|
437
|
+
specialEvent?: boolean | undefined;
|
|
432
438
|
conference?: string | undefined;
|
|
433
439
|
country?: string | null | undefined;
|
|
434
440
|
}>>;
|
|
@@ -493,6 +499,7 @@ export declare const communityGameTeamSchema: z.ZodObject<{
|
|
|
493
499
|
teamCode: string;
|
|
494
500
|
city?: string | null | undefined;
|
|
495
501
|
division?: string | undefined;
|
|
502
|
+
specialEvent?: boolean | undefined;
|
|
496
503
|
conference?: string | undefined;
|
|
497
504
|
country?: string | null | undefined;
|
|
498
505
|
} | undefined;
|
|
@@ -523,6 +530,7 @@ export declare const communityGameTeamSchema: z.ZodObject<{
|
|
|
523
530
|
teamCode: string;
|
|
524
531
|
city?: string | null | undefined;
|
|
525
532
|
division?: string | undefined;
|
|
533
|
+
specialEvent?: boolean | undefined;
|
|
526
534
|
conference?: string | undefined;
|
|
527
535
|
country?: string | null | undefined;
|
|
528
536
|
} | undefined;
|
|
@@ -594,12 +602,14 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
594
602
|
teamCode: z.ZodString;
|
|
595
603
|
conference: z.ZodOptional<z.ZodString>;
|
|
596
604
|
division: z.ZodOptional<z.ZodString>;
|
|
605
|
+
specialEvent: z.ZodOptional<z.ZodBoolean>;
|
|
597
606
|
}, "strip", z.ZodTypeAny, {
|
|
598
607
|
name: string;
|
|
599
608
|
image: string;
|
|
600
609
|
teamCode: string;
|
|
601
610
|
city?: string | null | undefined;
|
|
602
611
|
division?: string | undefined;
|
|
612
|
+
specialEvent?: boolean | undefined;
|
|
603
613
|
conference?: string | undefined;
|
|
604
614
|
country?: string | null | undefined;
|
|
605
615
|
}, {
|
|
@@ -608,6 +618,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
608
618
|
teamCode: string;
|
|
609
619
|
city?: string | null | undefined;
|
|
610
620
|
division?: string | undefined;
|
|
621
|
+
specialEvent?: boolean | undefined;
|
|
611
622
|
conference?: string | undefined;
|
|
612
623
|
country?: string | null | undefined;
|
|
613
624
|
}>>;
|
|
@@ -672,6 +683,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
672
683
|
teamCode: string;
|
|
673
684
|
city?: string | null | undefined;
|
|
674
685
|
division?: string | undefined;
|
|
686
|
+
specialEvent?: boolean | undefined;
|
|
675
687
|
conference?: string | undefined;
|
|
676
688
|
country?: string | null | undefined;
|
|
677
689
|
} | undefined;
|
|
@@ -702,6 +714,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
702
714
|
teamCode: string;
|
|
703
715
|
city?: string | null | undefined;
|
|
704
716
|
division?: string | undefined;
|
|
717
|
+
specialEvent?: boolean | undefined;
|
|
705
718
|
conference?: string | undefined;
|
|
706
719
|
country?: string | null | undefined;
|
|
707
720
|
} | undefined;
|
|
@@ -735,12 +748,14 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
735
748
|
teamCode: z.ZodString;
|
|
736
749
|
conference: z.ZodOptional<z.ZodString>;
|
|
737
750
|
division: z.ZodOptional<z.ZodString>;
|
|
751
|
+
specialEvent: z.ZodOptional<z.ZodBoolean>;
|
|
738
752
|
}, "strip", z.ZodTypeAny, {
|
|
739
753
|
name: string;
|
|
740
754
|
image: string;
|
|
741
755
|
teamCode: string;
|
|
742
756
|
city?: string | null | undefined;
|
|
743
757
|
division?: string | undefined;
|
|
758
|
+
specialEvent?: boolean | undefined;
|
|
744
759
|
conference?: string | undefined;
|
|
745
760
|
country?: string | null | undefined;
|
|
746
761
|
}, {
|
|
@@ -749,6 +764,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
749
764
|
teamCode: string;
|
|
750
765
|
city?: string | null | undefined;
|
|
751
766
|
division?: string | undefined;
|
|
767
|
+
specialEvent?: boolean | undefined;
|
|
752
768
|
conference?: string | undefined;
|
|
753
769
|
country?: string | null | undefined;
|
|
754
770
|
}>>;
|
|
@@ -813,6 +829,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
813
829
|
teamCode: string;
|
|
814
830
|
city?: string | null | undefined;
|
|
815
831
|
division?: string | undefined;
|
|
832
|
+
specialEvent?: boolean | undefined;
|
|
816
833
|
conference?: string | undefined;
|
|
817
834
|
country?: string | null | undefined;
|
|
818
835
|
} | undefined;
|
|
@@ -843,6 +860,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
843
860
|
teamCode: string;
|
|
844
861
|
city?: string | null | undefined;
|
|
845
862
|
division?: string | undefined;
|
|
863
|
+
specialEvent?: boolean | undefined;
|
|
846
864
|
conference?: string | undefined;
|
|
847
865
|
country?: string | null | undefined;
|
|
848
866
|
} | undefined;
|
|
@@ -1162,6 +1180,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
1162
1180
|
teamCode: string;
|
|
1163
1181
|
city?: string | null | undefined;
|
|
1164
1182
|
division?: string | undefined;
|
|
1183
|
+
specialEvent?: boolean | undefined;
|
|
1165
1184
|
conference?: string | undefined;
|
|
1166
1185
|
country?: string | null | undefined;
|
|
1167
1186
|
} | undefined;
|
|
@@ -1193,6 +1212,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
1193
1212
|
teamCode: string;
|
|
1194
1213
|
city?: string | null | undefined;
|
|
1195
1214
|
division?: string | undefined;
|
|
1215
|
+
specialEvent?: boolean | undefined;
|
|
1196
1216
|
conference?: string | undefined;
|
|
1197
1217
|
country?: string | null | undefined;
|
|
1198
1218
|
} | undefined;
|
|
@@ -1308,6 +1328,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
1308
1328
|
teamCode: string;
|
|
1309
1329
|
city?: string | null | undefined;
|
|
1310
1330
|
division?: string | undefined;
|
|
1331
|
+
specialEvent?: boolean | undefined;
|
|
1311
1332
|
conference?: string | undefined;
|
|
1312
1333
|
country?: string | null | undefined;
|
|
1313
1334
|
} | undefined;
|
|
@@ -1339,6 +1360,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
1339
1360
|
teamCode: string;
|
|
1340
1361
|
city?: string | null | undefined;
|
|
1341
1362
|
division?: string | undefined;
|
|
1363
|
+
specialEvent?: boolean | undefined;
|
|
1342
1364
|
conference?: string | undefined;
|
|
1343
1365
|
country?: string | null | undefined;
|
|
1344
1366
|
} | undefined;
|
|
@@ -17,6 +17,7 @@ exports.createCommunityTeamSchema = zod_1.z.object({
|
|
|
17
17
|
.max(4, "Team code must be at most 4 characters"),
|
|
18
18
|
conference: zod_1.z.string().optional(),
|
|
19
19
|
division: zod_1.z.string().optional(),
|
|
20
|
+
specialEvent: zod_1.z.boolean().optional(),
|
|
20
21
|
});
|
|
21
22
|
// Stadium creation schema for new stadiums
|
|
22
23
|
exports.createCommunityStadiumSchema = zod_1.z.object({
|