@shakerquiz/utilities 4.0.36 → 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.36",
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',