@shakerquiz/utilities 4.0.7 → 4.0.8
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
package/scripts/codegen.js
CHANGED
|
@@ -41,10 +41,6 @@ let service = route =>
|
|
|
41
41
|
.map(x => Segment[x].service)
|
|
42
42
|
.at(0)
|
|
43
43
|
|
|
44
|
-
let Route = Routes
|
|
45
|
-
.map(x => `'${x}': '${x}'`)
|
|
46
|
-
.join(',\n ')
|
|
47
|
-
|
|
48
44
|
let RouteCardinality = Routes
|
|
49
45
|
.map(route => [
|
|
50
46
|
route,
|
|
@@ -92,7 +88,6 @@ let ServiceRoutes = Object
|
|
|
92
88
|
Bun.write(
|
|
93
89
|
'./source/codegen/autogenerated.js',
|
|
94
90
|
template
|
|
95
|
-
.replace('/* route */', Route)
|
|
96
91
|
.replace('/* route -> cardinality */', RouteCardinality)
|
|
97
92
|
.replace('/* route -> pathname */', RoutePathname)
|
|
98
93
|
.replace('/* pathname -> route */', PathnameRoute)
|
package/scripts/template.js
CHANGED
|
@@ -1,87 +1,5 @@
|
|
|
1
1
|
/* --- Autogenerated --- */
|
|
2
2
|
|
|
3
|
-
export const Route = Object.freeze(
|
|
4
|
-
/** @type {const} */ ({
|
|
5
|
-
'role': 'role',
|
|
6
|
-
'roles': 'roles',
|
|
7
|
-
'user': 'user',
|
|
8
|
-
'user/password': 'user/password',
|
|
9
|
-
'user/role': 'user/role',
|
|
10
|
-
'user/city': 'user/city',
|
|
11
|
-
'user/cities': 'user/cities',
|
|
12
|
-
'users': 'users',
|
|
13
|
-
'users/password': 'users/password',
|
|
14
|
-
'users/role': 'users/role',
|
|
15
|
-
'users/cities': 'users/cities',
|
|
16
|
-
'checkin': 'checkin',
|
|
17
|
-
'cities': 'cities',
|
|
18
|
-
'cities/country': 'cities/country',
|
|
19
|
-
'cities/currency': 'cities/currency',
|
|
20
|
-
'cities/timezone': 'cities/timezone',
|
|
21
|
-
'cities/venues': 'cities/venues',
|
|
22
|
-
'city': 'city',
|
|
23
|
-
'city/vk_group_token': 'city/vk_group_token',
|
|
24
|
-
'city/country': 'city/country',
|
|
25
|
-
'city/currency': 'city/currency',
|
|
26
|
-
'city/timezone': 'city/timezone',
|
|
27
|
-
'city/venue': 'city/venue',
|
|
28
|
-
'city/venues': 'city/venues',
|
|
29
|
-
'country': 'country',
|
|
30
|
-
'countries': 'countries',
|
|
31
|
-
'currency': 'currency',
|
|
32
|
-
'currencies': 'currencies',
|
|
33
|
-
'timezone': 'timezone',
|
|
34
|
-
'timezones': 'timezones',
|
|
35
|
-
'venue': 'venue',
|
|
36
|
-
'venue/city': 'venue/city',
|
|
37
|
-
'venues': 'venues',
|
|
38
|
-
'venues/city': 'venues/city',
|
|
39
|
-
'theme': 'theme',
|
|
40
|
-
'theme/cover': 'theme/cover',
|
|
41
|
-
'themes': 'themes',
|
|
42
|
-
'themes/cover': 'themes/cover',
|
|
43
|
-
'themes/games': 'themes/games',
|
|
44
|
-
'game': 'game',
|
|
45
|
-
'game/city': 'game/city',
|
|
46
|
-
'game/registration': 'game/registration',
|
|
47
|
-
'game/registrations': 'game/registrations',
|
|
48
|
-
'game/registrations/export': 'game/registrations/export',
|
|
49
|
-
'game/summary': 'game/summary',
|
|
50
|
-
'game/theme': 'game/theme',
|
|
51
|
-
'game/theme/cover': 'game/theme/cover',
|
|
52
|
-
'game/venue': 'game/venue',
|
|
53
|
-
'games': 'games',
|
|
54
|
-
'games/city': 'games/city',
|
|
55
|
-
'games/registrations': 'games/registrations',
|
|
56
|
-
'games/registrations/export': 'games/registrations/export',
|
|
57
|
-
'games/summary': 'games/summary',
|
|
58
|
-
'games/theme': 'games/theme',
|
|
59
|
-
'games/theme/cover': 'games/theme/cover',
|
|
60
|
-
'games/venue': 'games/venue',
|
|
61
|
-
'registration': 'registration',
|
|
62
|
-
'registration/cancellation': 'registration/cancellation',
|
|
63
|
-
'registration/channel': 'registration/channel',
|
|
64
|
-
'registration/confirmation': 'registration/confirmation',
|
|
65
|
-
'registration/export': 'registration/export',
|
|
66
|
-
'registration/city': 'registration/city',
|
|
67
|
-
'registration/game': 'registration/game',
|
|
68
|
-
'registration/game/theme': 'registration/game/theme',
|
|
69
|
-
'registration/game/theme/cover': 'registration/game/theme/cover',
|
|
70
|
-
'registration/game/venue': 'registration/game/venue',
|
|
71
|
-
'registrations': 'registrations',
|
|
72
|
-
'registrations/city': 'registrations/city',
|
|
73
|
-
'registrations/game': 'registrations/game',
|
|
74
|
-
'registrations/game/theme': 'registrations/game/theme',
|
|
75
|
-
'registrations/export': 'registrations/export',
|
|
76
|
-
'telegram/webhook': 'telegram/webhook',
|
|
77
|
-
'telegram/registration/mailing': 'telegram/registration/mailing',
|
|
78
|
-
'chatapp/webhook': 'chatapp/webhook',
|
|
79
|
-
'chatapp/registration': 'chatapp/registration',
|
|
80
|
-
'chatapp/registration/mailing': 'chatapp/registration/mailing',
|
|
81
|
-
'bitrix/registration': 'bitrix/registration',
|
|
82
|
-
}),
|
|
83
|
-
)
|
|
84
|
-
|
|
85
3
|
export const RouteCardinality = Object.freeze(
|
|
86
4
|
/** @type {const} */ ({
|
|
87
5
|
'role': '1',
|
|
@@ -3,20 +3,22 @@
|
|
|
3
3
|
* - HTTP/1.1 (Core Methods): {@link https://datatracker.ietf.org/doc/html/rfc7231#section-4.3}
|
|
4
4
|
* - PATCH: {@link https://datatracker.ietf.org/doc/html/rfc5789}
|
|
5
5
|
*/
|
|
6
|
-
export const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
export const Methods = Object.freeze(
|
|
7
|
+
/** @type {const} */ ([
|
|
8
|
+
'DELETE',
|
|
9
|
+
'GET',
|
|
10
|
+
'OPTIONS',
|
|
11
|
+
'PATCH',
|
|
12
|
+
'POST',
|
|
13
|
+
'PUT',
|
|
14
|
+
]),
|
|
15
|
+
)
|
|
14
16
|
|
|
15
|
-
export const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
export const Method = Object.freeze(
|
|
18
|
+
/** @type {{ [x in typeof Methods[number]]: x }} */ (
|
|
19
|
+
Methods.reduce(
|
|
20
|
+
(o, x) => (o[x] = x, o),
|
|
21
|
+
{},
|
|
22
|
+
)
|
|
23
|
+
),
|
|
24
|
+
)
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
export const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export const Networks = Object.freeze(
|
|
2
|
+
/** @type {const} */ ([
|
|
3
|
+
'Docker',
|
|
4
|
+
'Public',
|
|
5
|
+
]),
|
|
6
|
+
)
|
|
5
7
|
|
|
6
|
-
export const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
])
|
|
8
|
+
export const Network = Object.freeze(
|
|
9
|
+
/** @type {{ [x in typeof Networks[number]]: x }} */ (
|
|
10
|
+
Networks.reduce(
|
|
11
|
+
(o, x) => (o[x] = x, o),
|
|
12
|
+
{},
|
|
13
|
+
)
|
|
14
|
+
),
|
|
15
|
+
)
|