@shakerquiz/utilities 0.6.13 → 0.6.14
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/.github/workflows/publish.yml +2 -1
- package/package.json +4 -1
- package/scripts/route-cardinality.js +23 -0
- package/scripts/route-parameter.js +29 -0
- package/scripts/route-pathname.js +22 -0
- package/scripts/route-relation.js +26 -0
- package/scripts/route-service.js +25 -0
- package/scripts/templates/route-cardinality.js +5 -0
- package/scripts/templates/route-parameter.js +5 -0
- package/scripts/templates/route-pathname.js +5 -0
- package/scripts/templates/route-relation.js +5 -0
- package/scripts/templates/route-service.js +7 -0
- package/source/entities/cardinality.js +1 -5
- package/source/entities/key.js +41 -0
- package/source/entities/route-cardinality.js +147 -65
- package/source/entities/route-parameter.js +149 -0
- package/source/entities/route-pathname.js +148 -70
- package/source/entities/route-relation.js +149 -0
- package/source/entities/route-service.js +178 -66
- package/source/entities/route.js +81 -70
- package/source/entities/segment.js +255 -0
- package/source/entities/service-runtime.js +9 -9
- package/source/helpers/access.js +44 -13
- package/source/index.js +4 -5
- package/source/entities/cardinality-routes.js +0 -82
- package/source/entities/route-cardinality-route.js +0 -112
- package/source/entities/route-pathname-params.js +0 -12
- package/source/entities/service-routes.js +0 -109
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { Cardinality } from './cardinality.js'
|
|
2
|
-
import { Route } from './route.js'
|
|
3
|
-
|
|
4
|
-
export const RouteCardinalityRoute = Object.freeze({
|
|
5
|
-
[Route['cities']]: {
|
|
6
|
-
[Cardinality['1']]: Route['city'],
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
[Route['cities/country']]: {
|
|
10
|
-
[Cardinality['1-1']]: Route['city/country'],
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
[Route['cities/currency']]: {
|
|
14
|
-
[Cardinality['1-1']]: Route['city/currency'],
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
[Route['cities/timezone']]: {
|
|
18
|
-
[Cardinality['1-1']]: Route['city/timezone'],
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
[Route['cities/venues']]: {
|
|
22
|
-
[Cardinality['1-N']]: Route['city/venues'],
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
[Route['countries']]: {
|
|
26
|
-
[Cardinality['1']]: Route['country'],
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
[Route['currencies']]: {
|
|
30
|
-
[Cardinality['1']]: Route['currency'],
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
[Route['games']]: {
|
|
34
|
-
[Cardinality['1']]: Route['game'],
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
[Route['games/city']]: {
|
|
38
|
-
[Cardinality['1-1']]: Route['game/city'],
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
[Route['games/registrations']]: {
|
|
42
|
-
[Cardinality['1-N']]: Route['game/registrations'],
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
[Route['games/summary']]: {
|
|
46
|
-
[Cardinality['1-1']]: Route['game/summary'],
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
[Route['games/theme']]: {
|
|
50
|
-
[Cardinality['1-1']]: Route['game/theme'],
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
[Route['games/venue']]: {
|
|
54
|
-
[Cardinality['1-1']]: Route['game/venue'],
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
[Route['registrations']]: {
|
|
58
|
-
[Cardinality['1']]: Route['registration'],
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
[Route['registrations/city']]: {
|
|
62
|
-
[Cardinality['1-1']]: Route['registration/city'],
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
[Route['registrations/game']]: {
|
|
66
|
-
[Cardinality['1-1']]: Route['registration/game'],
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
[Route['registrations/game/theme']]: {
|
|
70
|
-
[Cardinality['1-1']]: Route['registration/game/theme'],
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
[Route['roles']]: {
|
|
74
|
-
[Cardinality['1']]: Route['role'],
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
[Route['themes']]: {
|
|
78
|
-
[Cardinality['1']]: Route['theme'],
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
[Route['themes/cover']]: {
|
|
82
|
-
[Cardinality['1-1']]: Route['theme/cover'],
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
[Route['timezones']]: {
|
|
86
|
-
[Cardinality['1']]: Route['timezone'],
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
[Route['user/cities']]: {
|
|
90
|
-
[Cardinality['1-N']]: Route['user/cities'],
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
[Route['users']]: {
|
|
94
|
-
[Cardinality['1']]: Route['user'],
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
[Route['users/cities']]: {
|
|
98
|
-
[Cardinality['1-N']]: Route['user/cities'],
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
[Route['users/role']]: {
|
|
102
|
-
[Cardinality['1-1']]: Route['user/role'],
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
[Route['venues']]: {
|
|
106
|
-
[Cardinality['1']]: Route['venue'],
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
[Route['venues/city']]: {
|
|
110
|
-
[Cardinality['1-1']]: Route['venue/city'],
|
|
111
|
-
},
|
|
112
|
-
})
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { RoutePathname } from './route-pathname.js'
|
|
2
|
-
import { Route } from './route.js'
|
|
3
|
-
|
|
4
|
-
export const RoutePathnameParams = (() => {
|
|
5
|
-
/** @type {Record<keyof typeof Route, string[]>} */
|
|
6
|
-
let object = {}
|
|
7
|
-
|
|
8
|
-
for (const route in RoutePathname)
|
|
9
|
-
object[route] = RoutePathname[route].match(/(:(\w)+)/g) ?? []
|
|
10
|
-
|
|
11
|
-
return Object.freeze(object)
|
|
12
|
-
})()
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { Route } from './route.js'
|
|
2
|
-
import { Service } from './service.js'
|
|
3
|
-
|
|
4
|
-
export const ServiceRoutes = Object.freeze({
|
|
5
|
-
[Service['Users']]: Object.freeze([
|
|
6
|
-
Route['user'],
|
|
7
|
-
Route['user/cities'],
|
|
8
|
-
Route['user/password'],
|
|
9
|
-
Route['user/role'],
|
|
10
|
-
Route['users'],
|
|
11
|
-
Route['users/cities'],
|
|
12
|
-
Route['users/role'],
|
|
13
|
-
]),
|
|
14
|
-
|
|
15
|
-
[Service['Roles']]: Object.freeze([
|
|
16
|
-
Route['role'],
|
|
17
|
-
Route['roles'],
|
|
18
|
-
]),
|
|
19
|
-
|
|
20
|
-
[Service['Checkin']]: Object.freeze([
|
|
21
|
-
Route['checkin'],
|
|
22
|
-
]),
|
|
23
|
-
|
|
24
|
-
[Service['Locations']]: Object.freeze([
|
|
25
|
-
Route['countries'],
|
|
26
|
-
Route['country'],
|
|
27
|
-
Route['currencies'],
|
|
28
|
-
Route['currency'],
|
|
29
|
-
Route['timezone'],
|
|
30
|
-
Route['timezones'],
|
|
31
|
-
]),
|
|
32
|
-
|
|
33
|
-
[Service['Cities']]: Object.freeze([
|
|
34
|
-
Route['cities'],
|
|
35
|
-
Route['cities/country'],
|
|
36
|
-
Route['cities/currency'],
|
|
37
|
-
Route['cities/timezone'],
|
|
38
|
-
Route['cities/venues'],
|
|
39
|
-
Route['city'],
|
|
40
|
-
Route['city/country'],
|
|
41
|
-
Route['city/currency'],
|
|
42
|
-
Route['city/timezone'],
|
|
43
|
-
Route['city/vk_group_token'],
|
|
44
|
-
Route['city/venues'],
|
|
45
|
-
]),
|
|
46
|
-
|
|
47
|
-
[Service['Venues']]: Object.freeze([
|
|
48
|
-
Route['venue'],
|
|
49
|
-
Route['venue/city'],
|
|
50
|
-
Route['venues'],
|
|
51
|
-
Route['venues/city'],
|
|
52
|
-
]),
|
|
53
|
-
|
|
54
|
-
[Service['Themes']]: Object.freeze([
|
|
55
|
-
Route['theme'],
|
|
56
|
-
Route['theme/cover'],
|
|
57
|
-
Route['themes'],
|
|
58
|
-
Route['themes/cover'],
|
|
59
|
-
]),
|
|
60
|
-
|
|
61
|
-
[Service['Games']]: Object.freeze([
|
|
62
|
-
Route['game'],
|
|
63
|
-
Route['game/city'],
|
|
64
|
-
Route['game/registrations'],
|
|
65
|
-
Route['game/registrations/export'],
|
|
66
|
-
Route['game/summary'],
|
|
67
|
-
Route['game/theme'],
|
|
68
|
-
Route['game/venue'],
|
|
69
|
-
Route['games'],
|
|
70
|
-
Route['games/city'],
|
|
71
|
-
Route['games/registrations'],
|
|
72
|
-
Route['games/registrations/export'],
|
|
73
|
-
Route['games/summary'],
|
|
74
|
-
Route['games/theme'],
|
|
75
|
-
Route['games/venue'],
|
|
76
|
-
]),
|
|
77
|
-
|
|
78
|
-
[Service['Registrations']]: Object.freeze([
|
|
79
|
-
Route['registration'],
|
|
80
|
-
Route['registration/cancellation'],
|
|
81
|
-
Route['registration/channel'],
|
|
82
|
-
Route['registration/confirmation'],
|
|
83
|
-
Route['registration/city'],
|
|
84
|
-
Route['registration/game'],
|
|
85
|
-
Route['registration/game/theme'],
|
|
86
|
-
Route['registration/mailing'],
|
|
87
|
-
Route['registrations'],
|
|
88
|
-
Route['registrations/city'],
|
|
89
|
-
Route['registrations/game'],
|
|
90
|
-
Route['registrations/game/theme'],
|
|
91
|
-
Route['registrations/export'],
|
|
92
|
-
]),
|
|
93
|
-
|
|
94
|
-
[Service['Files']]: Object.freeze([]),
|
|
95
|
-
|
|
96
|
-
[Service['Procedures']]: Object.freeze([]),
|
|
97
|
-
|
|
98
|
-
[Service['Integrations']]: Object.freeze([]),
|
|
99
|
-
|
|
100
|
-
[Service['Updates']]: Object.freeze([]),
|
|
101
|
-
|
|
102
|
-
[Service['Hub']]: Object.freeze([]),
|
|
103
|
-
|
|
104
|
-
[Service['Landing']]: Object.freeze([]),
|
|
105
|
-
|
|
106
|
-
[Service['Vkma']]: Object.freeze([]),
|
|
107
|
-
|
|
108
|
-
[Service['Minio']]: Object.freeze([]),
|
|
109
|
-
})
|