@shakerquiz/utilities 4.0.24 → 4.0.26
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
|
@@ -59,6 +59,10 @@ let RoutePathname = Routes
|
|
|
59
59
|
.map(x => `'${x}': '${pathname(x)}'`)
|
|
60
60
|
.join(',\n ')
|
|
61
61
|
|
|
62
|
+
let RouteParameters = Routes
|
|
63
|
+
.map(x => `'${x}': ${JSON.stringify(parameters(pathname(x)), null, 2)}`)
|
|
64
|
+
.join(',\n ')
|
|
65
|
+
|
|
62
66
|
let PathnameRoute = Routes
|
|
63
67
|
.map(x => `'${pathname(x)}': '${x}'`)
|
|
64
68
|
.join(',\n ')
|
|
@@ -90,6 +94,7 @@ Bun.write(
|
|
|
90
94
|
template
|
|
91
95
|
.replace('/* route -> cardinality */', RouteCardinality)
|
|
92
96
|
.replace('/* route -> pathname */', RoutePathname)
|
|
97
|
+
.replace('/* route -> parameters */', RouteParameters)
|
|
93
98
|
.replace('/* pathname -> route */', PathnameRoute)
|
|
94
99
|
.replace('/* pathname -> parameters */', PathnameParameters)
|
|
95
100
|
.replace('/* parameter -> pattern */', ParameterPattern)
|
package/scripts/template.js
CHANGED
|
@@ -12,6 +12,12 @@ export const RoutePathname = Object.freeze(
|
|
|
12
12
|
}),
|
|
13
13
|
)
|
|
14
14
|
|
|
15
|
+
export const RouteParameters = Object.freeze(
|
|
16
|
+
/** @type {const} */ ({
|
|
17
|
+
/* route -> parameters */
|
|
18
|
+
}),
|
|
19
|
+
)
|
|
20
|
+
|
|
15
21
|
export const PathnameRoute = Object.freeze(
|
|
16
22
|
/** @type {const} */ ({
|
|
17
23
|
/* pathname -> route */
|
|
@@ -36,6 +36,7 @@ export const RouteCardinality = Object.freeze(
|
|
|
36
36
|
'venue/city': '1/1',
|
|
37
37
|
'venues': 'n',
|
|
38
38
|
'venues/city': 'n/1',
|
|
39
|
+
'cover': '1',
|
|
39
40
|
'theme': '1',
|
|
40
41
|
'theme/cover': '1/1',
|
|
41
42
|
'themes': 'n',
|
|
@@ -132,6 +133,7 @@ export const RoutePathname = Object.freeze(
|
|
|
132
133
|
'venue/city': 'venue/:venue/city/:city',
|
|
133
134
|
'venues': 'venues',
|
|
134
135
|
'venues/city': 'venues/city/:city',
|
|
136
|
+
'cover': 'cover/:cover',
|
|
135
137
|
'theme': 'theme/:theme',
|
|
136
138
|
'theme/cover': 'theme/:theme/cover/:cover',
|
|
137
139
|
'themes': 'themes',
|
|
@@ -192,6 +194,263 @@ export const RoutePathname = Object.freeze(
|
|
|
192
194
|
}),
|
|
193
195
|
)
|
|
194
196
|
|
|
197
|
+
export const RouteParameters = Object.freeze(
|
|
198
|
+
/** @type {const} */ ({
|
|
199
|
+
'role': [
|
|
200
|
+
':role',
|
|
201
|
+
],
|
|
202
|
+
'roles': [],
|
|
203
|
+
'user': [
|
|
204
|
+
':user',
|
|
205
|
+
],
|
|
206
|
+
'user/password': [
|
|
207
|
+
':user',
|
|
208
|
+
],
|
|
209
|
+
'user/role': [
|
|
210
|
+
':user',
|
|
211
|
+
':role',
|
|
212
|
+
],
|
|
213
|
+
'user/city': [
|
|
214
|
+
':user',
|
|
215
|
+
':city',
|
|
216
|
+
],
|
|
217
|
+
'user/cities': [
|
|
218
|
+
':user',
|
|
219
|
+
],
|
|
220
|
+
'users': [],
|
|
221
|
+
'users/password': [],
|
|
222
|
+
'users/role': [
|
|
223
|
+
':role',
|
|
224
|
+
],
|
|
225
|
+
'users/cities': [],
|
|
226
|
+
'checkin': [],
|
|
227
|
+
'cities': [],
|
|
228
|
+
'cities/country': [
|
|
229
|
+
':country',
|
|
230
|
+
],
|
|
231
|
+
'cities/currency': [
|
|
232
|
+
':currency',
|
|
233
|
+
],
|
|
234
|
+
'cities/timezone': [
|
|
235
|
+
':timezone',
|
|
236
|
+
],
|
|
237
|
+
'cities/venues': [],
|
|
238
|
+
'city': [
|
|
239
|
+
':city',
|
|
240
|
+
],
|
|
241
|
+
'city/vk_group_token': [
|
|
242
|
+
':city',
|
|
243
|
+
],
|
|
244
|
+
'city/country': [
|
|
245
|
+
':city',
|
|
246
|
+
':country',
|
|
247
|
+
],
|
|
248
|
+
'city/currency': [
|
|
249
|
+
':city',
|
|
250
|
+
':currency',
|
|
251
|
+
],
|
|
252
|
+
'city/timezone': [
|
|
253
|
+
':city',
|
|
254
|
+
':timezone',
|
|
255
|
+
],
|
|
256
|
+
'city/venue': [
|
|
257
|
+
':city',
|
|
258
|
+
':venue',
|
|
259
|
+
],
|
|
260
|
+
'city/venues': [
|
|
261
|
+
':city',
|
|
262
|
+
],
|
|
263
|
+
'country': [
|
|
264
|
+
':country',
|
|
265
|
+
],
|
|
266
|
+
'countries': [],
|
|
267
|
+
'currency': [
|
|
268
|
+
':currency',
|
|
269
|
+
],
|
|
270
|
+
'currencies': [],
|
|
271
|
+
'timezone': [
|
|
272
|
+
':timezone',
|
|
273
|
+
],
|
|
274
|
+
'timezones': [],
|
|
275
|
+
'venue': [
|
|
276
|
+
':venue',
|
|
277
|
+
],
|
|
278
|
+
'venue/city': [
|
|
279
|
+
':venue',
|
|
280
|
+
':city',
|
|
281
|
+
],
|
|
282
|
+
'venues': [],
|
|
283
|
+
'venues/city': [
|
|
284
|
+
':city',
|
|
285
|
+
],
|
|
286
|
+
'cover': [
|
|
287
|
+
':cover',
|
|
288
|
+
],
|
|
289
|
+
'theme': [
|
|
290
|
+
':theme',
|
|
291
|
+
],
|
|
292
|
+
'theme/cover': [
|
|
293
|
+
':theme',
|
|
294
|
+
':cover',
|
|
295
|
+
],
|
|
296
|
+
'themes': [],
|
|
297
|
+
'themes/cover': [
|
|
298
|
+
':cover',
|
|
299
|
+
],
|
|
300
|
+
'themes/games': [],
|
|
301
|
+
'game': [
|
|
302
|
+
':game',
|
|
303
|
+
],
|
|
304
|
+
'game/status': [
|
|
305
|
+
':game',
|
|
306
|
+
],
|
|
307
|
+
'game/statuses': [
|
|
308
|
+
':game',
|
|
309
|
+
],
|
|
310
|
+
'game/city': [
|
|
311
|
+
':game',
|
|
312
|
+
':city',
|
|
313
|
+
],
|
|
314
|
+
'game/registrations': [
|
|
315
|
+
':game',
|
|
316
|
+
],
|
|
317
|
+
'game/registrations/status': [
|
|
318
|
+
':game',
|
|
319
|
+
],
|
|
320
|
+
'game/registrations/lineup': [
|
|
321
|
+
':game',
|
|
322
|
+
],
|
|
323
|
+
'game/registrations/export': [
|
|
324
|
+
':game',
|
|
325
|
+
],
|
|
326
|
+
'game/summary': [
|
|
327
|
+
':game',
|
|
328
|
+
],
|
|
329
|
+
'game/theme': [
|
|
330
|
+
':game',
|
|
331
|
+
':theme',
|
|
332
|
+
],
|
|
333
|
+
'game/theme/cover': [
|
|
334
|
+
':game',
|
|
335
|
+
':theme',
|
|
336
|
+
':cover',
|
|
337
|
+
],
|
|
338
|
+
'game/venue': [
|
|
339
|
+
':game',
|
|
340
|
+
':venue',
|
|
341
|
+
],
|
|
342
|
+
'games': [],
|
|
343
|
+
'games/status': [],
|
|
344
|
+
'games/city': [
|
|
345
|
+
':city',
|
|
346
|
+
],
|
|
347
|
+
'games/registrations': [],
|
|
348
|
+
'games/registrations/export': [],
|
|
349
|
+
'games/summary': [],
|
|
350
|
+
'games/theme': [
|
|
351
|
+
':theme',
|
|
352
|
+
],
|
|
353
|
+
'games/theme/cover': [
|
|
354
|
+
':theme',
|
|
355
|
+
':cover',
|
|
356
|
+
],
|
|
357
|
+
'games/venue': [
|
|
358
|
+
':venue',
|
|
359
|
+
],
|
|
360
|
+
'registration': [
|
|
361
|
+
':registration',
|
|
362
|
+
],
|
|
363
|
+
'registration/status': [
|
|
364
|
+
':registration',
|
|
365
|
+
],
|
|
366
|
+
'registration/statuses': [
|
|
367
|
+
':registration',
|
|
368
|
+
],
|
|
369
|
+
'registration/creation': [
|
|
370
|
+
':registration',
|
|
371
|
+
],
|
|
372
|
+
'registration/confirmation': [
|
|
373
|
+
':registration',
|
|
374
|
+
],
|
|
375
|
+
'registration/cancellation': [
|
|
376
|
+
':registration',
|
|
377
|
+
],
|
|
378
|
+
'registration/lineup': [
|
|
379
|
+
':registration',
|
|
380
|
+
],
|
|
381
|
+
'registration/lineups': [
|
|
382
|
+
':registration',
|
|
383
|
+
],
|
|
384
|
+
'registration/allocation': [
|
|
385
|
+
':registration',
|
|
386
|
+
],
|
|
387
|
+
'registration/reservation': [
|
|
388
|
+
':registration',
|
|
389
|
+
],
|
|
390
|
+
'registration/channel': [
|
|
391
|
+
':registration',
|
|
392
|
+
],
|
|
393
|
+
'registration/export': [
|
|
394
|
+
':registration',
|
|
395
|
+
],
|
|
396
|
+
'registration/city': [
|
|
397
|
+
':registration',
|
|
398
|
+
':city',
|
|
399
|
+
],
|
|
400
|
+
'registration/game': [
|
|
401
|
+
':registration',
|
|
402
|
+
':game',
|
|
403
|
+
],
|
|
404
|
+
'registration/game/theme': [
|
|
405
|
+
':registration',
|
|
406
|
+
':game',
|
|
407
|
+
':theme',
|
|
408
|
+
],
|
|
409
|
+
'registration/game/theme/cover': [
|
|
410
|
+
':registration',
|
|
411
|
+
':game',
|
|
412
|
+
':theme',
|
|
413
|
+
':cover',
|
|
414
|
+
],
|
|
415
|
+
'registration/game/venue': [
|
|
416
|
+
':registration',
|
|
417
|
+
':game',
|
|
418
|
+
':venue',
|
|
419
|
+
],
|
|
420
|
+
'registrations': [],
|
|
421
|
+
'registrations/status': [],
|
|
422
|
+
'registrations/lineup': [],
|
|
423
|
+
'registrations/city': [
|
|
424
|
+
':city',
|
|
425
|
+
],
|
|
426
|
+
'registrations/game': [
|
|
427
|
+
':game',
|
|
428
|
+
],
|
|
429
|
+
'registrations/game/status': [
|
|
430
|
+
':game',
|
|
431
|
+
],
|
|
432
|
+
'registrations/game/theme': [
|
|
433
|
+
':game',
|
|
434
|
+
':theme',
|
|
435
|
+
],
|
|
436
|
+
'registrations/export': [],
|
|
437
|
+
'telegram/webhook': [],
|
|
438
|
+
'telegram/registration/mailing': [
|
|
439
|
+
':registration',
|
|
440
|
+
],
|
|
441
|
+
'chatapp/webhook': [],
|
|
442
|
+
'chatapp/registration': [
|
|
443
|
+
':registration',
|
|
444
|
+
],
|
|
445
|
+
'chatapp/registration/mailing': [
|
|
446
|
+
':registration',
|
|
447
|
+
],
|
|
448
|
+
'bitrix/registration': [
|
|
449
|
+
':registration',
|
|
450
|
+
],
|
|
451
|
+
}),
|
|
452
|
+
)
|
|
453
|
+
|
|
195
454
|
export const PathnameRoute = Object.freeze(
|
|
196
455
|
/** @type {const} */ ({
|
|
197
456
|
'role/:role': 'role',
|
|
@@ -228,6 +487,7 @@ export const PathnameRoute = Object.freeze(
|
|
|
228
487
|
'venue/:venue/city/:city': 'venue/city',
|
|
229
488
|
'venues': 'venues',
|
|
230
489
|
'venues/city/:city': 'venues/city',
|
|
490
|
+
'cover/:cover': 'cover',
|
|
231
491
|
'theme/:theme': 'theme',
|
|
232
492
|
'theme/:theme/cover/:cover': 'theme/cover',
|
|
233
493
|
'themes': 'themes',
|
|
@@ -377,6 +637,9 @@ export const PathnameParameters = Object.freeze(
|
|
|
377
637
|
'venues/city/:city': [
|
|
378
638
|
':city',
|
|
379
639
|
],
|
|
640
|
+
'cover/:cover': [
|
|
641
|
+
':cover',
|
|
642
|
+
],
|
|
380
643
|
'theme/:theme': [
|
|
381
644
|
':theme',
|
|
382
645
|
],
|
|
@@ -594,6 +857,7 @@ export const RouteBreakdown = Object.freeze(
|
|
|
594
857
|
'venue/city': 'venue/city',
|
|
595
858
|
'venues': 'venue',
|
|
596
859
|
'venues/city': 'venue/city',
|
|
860
|
+
'cover': 'cover',
|
|
597
861
|
'theme': 'theme',
|
|
598
862
|
'theme/cover': 'theme/cover',
|
|
599
863
|
'themes': 'theme',
|
|
@@ -690,6 +954,7 @@ export const RouteService = Object.freeze(
|
|
|
690
954
|
'venue/city': 'Venues',
|
|
691
955
|
'venues': 'Venues',
|
|
692
956
|
'venues/city': 'Venues',
|
|
957
|
+
'cover': 'Minio',
|
|
693
958
|
'theme': 'Themes',
|
|
694
959
|
'theme/cover': 'Themes',
|
|
695
960
|
'themes': 'Themes',
|
|
@@ -798,6 +1063,9 @@ export const ServiceRoutes = Object.freeze(
|
|
|
798
1063
|
'venues',
|
|
799
1064
|
'venues/city',
|
|
800
1065
|
],
|
|
1066
|
+
'Minio': [
|
|
1067
|
+
'cover',
|
|
1068
|
+
],
|
|
801
1069
|
'Themes': [
|
|
802
1070
|
'theme',
|
|
803
1071
|
'theme/cover',
|