@shakerquiz/utilities 4.0.35 → 4.0.37

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@shakerquiz/utilities",
4
- "version": "4.0.35",
4
+ "version": "4.0.37",
5
5
  "author": "yurkimus <yurkimus@gmail.com>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -41,6 +41,14 @@ let service = route =>
41
41
  .map(x => Segment[x].service)
42
42
  .at(0)
43
43
 
44
+ let RouteExcessiveCardinality = Routes
45
+ .map(route => [
46
+ route,
47
+ route.split('/').map(a => Segment[a].cardinality).join('/'),
48
+ ])
49
+ .map(([route, cardinality]) => `'${route}': '${cardinality}'`)
50
+ .join(',\n ')
51
+
44
52
  let RouteCardinality = Routes
45
53
  .map(route => [
46
54
  route,
@@ -92,6 +100,7 @@ let ServiceRoutes = Object
92
100
  Bun.write(
93
101
  './source/codegen/autogenerated.js',
94
102
  template
103
+ .replace('/* route -> excessive cardinality */', RouteExcessiveCardinality)
95
104
  .replace('/* route -> cardinality */', RouteCardinality)
96
105
  .replace('/* route -> pathname */', RoutePathname)
97
106
  .replace('/* route -> parameters */', RouteParameters)
@@ -1,5 +1,11 @@
1
1
  /* --- Autogenerated --- */
2
2
 
3
+ export const RouteExcessiveCardinality = Object.freeze(
4
+ /** @type {const} */ ({
5
+ /* route -> excessive cardinality */
6
+ }),
7
+ )
8
+
3
9
  export const RouteCardinality = Object.freeze(
4
10
  /** @type {const} */ ({
5
11
  /* route -> cardinality */
@@ -1,5 +1,101 @@
1
1
  /* --- Autogenerated --- */
2
2
 
3
+ export const RouteExcessiveCardinality = Object.freeze(
4
+ /** @type {const} */ ({
5
+ 'role': '1',
6
+ 'roles': 'n',
7
+ 'user': '1',
8
+ 'user/password': '1/1',
9
+ 'user/role': '1/1',
10
+ 'user/city': '1/1',
11
+ 'user/cities': '1/n',
12
+ 'users': 'n',
13
+ 'users/password': 'n/1',
14
+ 'users/role': 'n/1',
15
+ 'users/cities': 'n/n',
16
+ 'checkin': '1',
17
+ 'cities': 'n',
18
+ 'cities/country': 'n/1',
19
+ 'cities/currency': 'n/1',
20
+ 'cities/timezone': 'n/1',
21
+ 'cities/venues': 'n/n',
22
+ 'city': '1',
23
+ 'city/vk_group_token': '1/1',
24
+ 'city/country': '1/1',
25
+ 'city/currency': '1/1',
26
+ 'city/timezone': '1/1',
27
+ 'city/venue': '1/1',
28
+ 'city/venues': '1/n',
29
+ 'country': '1',
30
+ 'countries': 'n',
31
+ 'currency': '1',
32
+ 'currencies': 'n',
33
+ 'timezone': '1',
34
+ 'timezones': 'n',
35
+ 'venue': '1',
36
+ 'venue/city': '1/1',
37
+ 'venues': 'n',
38
+ 'venues/city': 'n/1',
39
+ 'cover': '1',
40
+ 'theme': '1',
41
+ 'theme/cover': '1/1',
42
+ 'themes': 'n',
43
+ 'themes/cover': 'n/1',
44
+ 'themes/games': 'n/n',
45
+ 'game': '1',
46
+ 'game/status': '1/1',
47
+ 'game/statuses': '1/n',
48
+ 'game/city': '1/1',
49
+ 'game/registrations': '1/n',
50
+ 'game/registrations/status': '1/n/1',
51
+ 'game/registrations/lineup': '1/n/1',
52
+ 'game/registrations/export': '1/n/1',
53
+ 'game/summary': '1/1',
54
+ 'game/theme': '1/1',
55
+ 'game/theme/cover': '1/1/1',
56
+ 'game/venue': '1/1',
57
+ 'games': 'n',
58
+ 'games/status': 'n/1',
59
+ 'games/city': 'n/1',
60
+ 'games/registrations': 'n/n',
61
+ 'games/registrations/export': 'n/n/1',
62
+ 'games/summary': 'n/1',
63
+ 'games/theme': 'n/1',
64
+ 'games/theme/cover': 'n/1/1',
65
+ 'games/venue': 'n/1',
66
+ 'registration': '1',
67
+ 'registration/status': '1/1',
68
+ 'registration/statuses': '1/n',
69
+ 'registration/creation': '1/1',
70
+ 'registration/confirmation': '1/1',
71
+ 'registration/cancellation': '1/1',
72
+ 'registration/lineup': '1/1',
73
+ 'registration/lineups': '1/n',
74
+ 'registration/channel': '1/1',
75
+ 'registration/export': '1/1',
76
+ 'registration/city': '1/1',
77
+ 'registration/game': '1/1',
78
+ 'registration/game/theme': '1/1/1',
79
+ 'registration/game/theme/cover': '1/1/1/1',
80
+ 'registration/game/venue': '1/1/1',
81
+ 'registrations': 'n',
82
+ 'registrations/status': 'n/1',
83
+ 'registrations/lineup': 'n/1',
84
+ 'registrations/city': 'n/1',
85
+ 'registrations/game': 'n/1',
86
+ 'registrations/game/status': 'n/1/1',
87
+ 'registrations/game/theme': 'n/1/1',
88
+ 'registrations/export': 'n/1',
89
+ 'telegram/webhook': '1/1',
90
+ 'telegram/registration/mailing': '1/1/1',
91
+ 'chatapp/webhook': '1/1',
92
+ 'chatapp/registration': '1/1',
93
+ 'chatapp/registration/mailing': '1/1/1',
94
+ 'bitrix/registration': '1/1',
95
+ 'source': '1',
96
+ }),
97
+ )
98
+
3
99
  export const RouteCardinality = Object.freeze(
4
100
  /** @type {const} */ ({
5
101
  'role': '1',
@@ -92,6 +188,7 @@ export const RouteCardinality = Object.freeze(
92
188
  'chatapp/registration': '1/1',
93
189
  'chatapp/registration/mailing': '1/1',
94
190
  'bitrix/registration': '1/1',
191
+ 'source': '1',
95
192
  }),
96
193
  )
97
194
 
@@ -187,6 +284,7 @@ export const RoutePathname = Object.freeze(
187
284
  'chatapp/registration': 'chatapp/registration/:registration',
188
285
  'chatapp/registration/mailing': 'chatapp/registration/:registration/mailing',
189
286
  'bitrix/registration': 'bitrix/registration/:registration',
287
+ 'source': 'source',
190
288
  }),
191
289
  )
192
290
 
@@ -446,6 +544,7 @@ export const RouteParameters = Object.freeze(
446
544
  'bitrix/registration': [
447
545
  ':registration',
448
546
  ],
547
+ 'source': [],
449
548
  }),
450
549
  )
451
550
 
@@ -541,6 +640,7 @@ export const PathnameRoute = Object.freeze(
541
640
  'chatapp/registration/:registration': 'chatapp/registration',
542
641
  'chatapp/registration/:registration/mailing': 'chatapp/registration/mailing',
543
642
  'bitrix/registration/:registration': 'bitrix/registration',
643
+ 'source': 'source',
544
644
  }),
545
645
  )
546
646
 
@@ -800,6 +900,7 @@ export const PathnameParameters = Object.freeze(
800
900
  'bitrix/registration/:registration': [
801
901
  ':registration',
802
902
  ],
903
+ 'source': [],
803
904
  }),
804
905
  )
805
906
 
@@ -912,6 +1013,7 @@ export const RouteBreakdown = Object.freeze(
912
1013
  'chatapp/registration': 'chatapp/registration',
913
1014
  'chatapp/registration/mailing': 'chatapp/registration/mailing',
914
1015
  'bitrix/registration': 'bitrix/registration',
1016
+ 'source': 'source',
915
1017
  }),
916
1018
  )
917
1019
 
@@ -1007,6 +1109,7 @@ export const RouteService = Object.freeze(
1007
1109
  'chatapp/registration': 'Chatapp',
1008
1110
  'chatapp/registration/mailing': 'Chatapp',
1009
1111
  'bitrix/registration': 'Bitrix',
1112
+ 'source': 'Updates',
1010
1113
  }),
1011
1114
  )
1012
1115
 
@@ -1128,5 +1231,8 @@ export const ServiceRoutes = Object.freeze(
1128
1231
  'Bitrix': [
1129
1232
  'bitrix/registration',
1130
1233
  ],
1234
+ 'Updates': [
1235
+ 'source',
1236
+ ],
1131
1237
  }),
1132
1238
  )
@@ -39,6 +39,7 @@ export const Keys = Object.freeze(
39
39
  'chatapp',
40
40
  'bitrix',
41
41
  'webhook',
42
+ 'source',
42
43
  ]),
43
44
  )
44
45
 
@@ -90,6 +90,7 @@ export const Routes = Object.freeze(
90
90
  'chatapp/registration',
91
91
  'chatapp/registration/mailing',
92
92
  'bitrix/registration',
93
+ 'source',
93
94
  ]),
94
95
  )
95
96
 
@@ -355,6 +355,15 @@ export const Segments = Object.freeze(
355
355
  pattern: undefined,
356
356
  }),
357
357
  ),
358
+ Object.freeze(
359
+ /** @type {const} */ ({
360
+ key: Key['source'],
361
+ cardinality: '1',
362
+ relation: undefined,
363
+ service: Service['Updates'],
364
+ pattern: undefined,
365
+ }),
366
+ ),
358
367
  ]),
359
368
  )
360
369