@shakerquiz/utilities 4.0.23 → 4.0.25
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 */
|
|
@@ -192,6 +192,260 @@ export const RoutePathname = Object.freeze(
|
|
|
192
192
|
}),
|
|
193
193
|
)
|
|
194
194
|
|
|
195
|
+
export const RouteParameters = Object.freeze(
|
|
196
|
+
/** @type {const} */ ({
|
|
197
|
+
'role': [
|
|
198
|
+
':role',
|
|
199
|
+
],
|
|
200
|
+
'roles': [],
|
|
201
|
+
'user': [
|
|
202
|
+
':user',
|
|
203
|
+
],
|
|
204
|
+
'user/password': [
|
|
205
|
+
':user',
|
|
206
|
+
],
|
|
207
|
+
'user/role': [
|
|
208
|
+
':user',
|
|
209
|
+
':role',
|
|
210
|
+
],
|
|
211
|
+
'user/city': [
|
|
212
|
+
':user',
|
|
213
|
+
':city',
|
|
214
|
+
],
|
|
215
|
+
'user/cities': [
|
|
216
|
+
':user',
|
|
217
|
+
],
|
|
218
|
+
'users': [],
|
|
219
|
+
'users/password': [],
|
|
220
|
+
'users/role': [
|
|
221
|
+
':role',
|
|
222
|
+
],
|
|
223
|
+
'users/cities': [],
|
|
224
|
+
'checkin': [],
|
|
225
|
+
'cities': [],
|
|
226
|
+
'cities/country': [
|
|
227
|
+
':country',
|
|
228
|
+
],
|
|
229
|
+
'cities/currency': [
|
|
230
|
+
':currency',
|
|
231
|
+
],
|
|
232
|
+
'cities/timezone': [
|
|
233
|
+
':timezone',
|
|
234
|
+
],
|
|
235
|
+
'cities/venues': [],
|
|
236
|
+
'city': [
|
|
237
|
+
':city',
|
|
238
|
+
],
|
|
239
|
+
'city/vk_group_token': [
|
|
240
|
+
':city',
|
|
241
|
+
],
|
|
242
|
+
'city/country': [
|
|
243
|
+
':city',
|
|
244
|
+
':country',
|
|
245
|
+
],
|
|
246
|
+
'city/currency': [
|
|
247
|
+
':city',
|
|
248
|
+
':currency',
|
|
249
|
+
],
|
|
250
|
+
'city/timezone': [
|
|
251
|
+
':city',
|
|
252
|
+
':timezone',
|
|
253
|
+
],
|
|
254
|
+
'city/venue': [
|
|
255
|
+
':city',
|
|
256
|
+
':venue',
|
|
257
|
+
],
|
|
258
|
+
'city/venues': [
|
|
259
|
+
':city',
|
|
260
|
+
],
|
|
261
|
+
'country': [
|
|
262
|
+
':country',
|
|
263
|
+
],
|
|
264
|
+
'countries': [],
|
|
265
|
+
'currency': [
|
|
266
|
+
':currency',
|
|
267
|
+
],
|
|
268
|
+
'currencies': [],
|
|
269
|
+
'timezone': [
|
|
270
|
+
':timezone',
|
|
271
|
+
],
|
|
272
|
+
'timezones': [],
|
|
273
|
+
'venue': [
|
|
274
|
+
':venue',
|
|
275
|
+
],
|
|
276
|
+
'venue/city': [
|
|
277
|
+
':venue',
|
|
278
|
+
':city',
|
|
279
|
+
],
|
|
280
|
+
'venues': [],
|
|
281
|
+
'venues/city': [
|
|
282
|
+
':city',
|
|
283
|
+
],
|
|
284
|
+
'theme': [
|
|
285
|
+
':theme',
|
|
286
|
+
],
|
|
287
|
+
'theme/cover': [
|
|
288
|
+
':theme',
|
|
289
|
+
':cover',
|
|
290
|
+
],
|
|
291
|
+
'themes': [],
|
|
292
|
+
'themes/cover': [
|
|
293
|
+
':cover',
|
|
294
|
+
],
|
|
295
|
+
'themes/games': [],
|
|
296
|
+
'game': [
|
|
297
|
+
':game',
|
|
298
|
+
],
|
|
299
|
+
'game/status': [
|
|
300
|
+
':game',
|
|
301
|
+
],
|
|
302
|
+
'game/statuses': [
|
|
303
|
+
':game',
|
|
304
|
+
],
|
|
305
|
+
'game/city': [
|
|
306
|
+
':game',
|
|
307
|
+
':city',
|
|
308
|
+
],
|
|
309
|
+
'game/registrations': [
|
|
310
|
+
':game',
|
|
311
|
+
],
|
|
312
|
+
'game/registrations/status': [
|
|
313
|
+
':game',
|
|
314
|
+
],
|
|
315
|
+
'game/registrations/lineup': [
|
|
316
|
+
':game',
|
|
317
|
+
],
|
|
318
|
+
'game/registrations/export': [
|
|
319
|
+
':game',
|
|
320
|
+
],
|
|
321
|
+
'game/summary': [
|
|
322
|
+
':game',
|
|
323
|
+
],
|
|
324
|
+
'game/theme': [
|
|
325
|
+
':game',
|
|
326
|
+
':theme',
|
|
327
|
+
],
|
|
328
|
+
'game/theme/cover': [
|
|
329
|
+
':game',
|
|
330
|
+
':theme',
|
|
331
|
+
':cover',
|
|
332
|
+
],
|
|
333
|
+
'game/venue': [
|
|
334
|
+
':game',
|
|
335
|
+
':venue',
|
|
336
|
+
],
|
|
337
|
+
'games': [],
|
|
338
|
+
'games/status': [],
|
|
339
|
+
'games/city': [
|
|
340
|
+
':city',
|
|
341
|
+
],
|
|
342
|
+
'games/registrations': [],
|
|
343
|
+
'games/registrations/export': [],
|
|
344
|
+
'games/summary': [],
|
|
345
|
+
'games/theme': [
|
|
346
|
+
':theme',
|
|
347
|
+
],
|
|
348
|
+
'games/theme/cover': [
|
|
349
|
+
':theme',
|
|
350
|
+
':cover',
|
|
351
|
+
],
|
|
352
|
+
'games/venue': [
|
|
353
|
+
':venue',
|
|
354
|
+
],
|
|
355
|
+
'registration': [
|
|
356
|
+
':registration',
|
|
357
|
+
],
|
|
358
|
+
'registration/status': [
|
|
359
|
+
':registration',
|
|
360
|
+
],
|
|
361
|
+
'registration/statuses': [
|
|
362
|
+
':registration',
|
|
363
|
+
],
|
|
364
|
+
'registration/creation': [
|
|
365
|
+
':registration',
|
|
366
|
+
],
|
|
367
|
+
'registration/confirmation': [
|
|
368
|
+
':registration',
|
|
369
|
+
],
|
|
370
|
+
'registration/cancellation': [
|
|
371
|
+
':registration',
|
|
372
|
+
],
|
|
373
|
+
'registration/lineup': [
|
|
374
|
+
':registration',
|
|
375
|
+
],
|
|
376
|
+
'registration/lineups': [
|
|
377
|
+
':registration',
|
|
378
|
+
],
|
|
379
|
+
'registration/allocation': [
|
|
380
|
+
':registration',
|
|
381
|
+
],
|
|
382
|
+
'registration/reservation': [
|
|
383
|
+
':registration',
|
|
384
|
+
],
|
|
385
|
+
'registration/channel': [
|
|
386
|
+
':registration',
|
|
387
|
+
],
|
|
388
|
+
'registration/export': [
|
|
389
|
+
':registration',
|
|
390
|
+
],
|
|
391
|
+
'registration/city': [
|
|
392
|
+
':registration',
|
|
393
|
+
':city',
|
|
394
|
+
],
|
|
395
|
+
'registration/game': [
|
|
396
|
+
':registration',
|
|
397
|
+
':game',
|
|
398
|
+
],
|
|
399
|
+
'registration/game/theme': [
|
|
400
|
+
':registration',
|
|
401
|
+
':game',
|
|
402
|
+
':theme',
|
|
403
|
+
],
|
|
404
|
+
'registration/game/theme/cover': [
|
|
405
|
+
':registration',
|
|
406
|
+
':game',
|
|
407
|
+
':theme',
|
|
408
|
+
':cover',
|
|
409
|
+
],
|
|
410
|
+
'registration/game/venue': [
|
|
411
|
+
':registration',
|
|
412
|
+
':game',
|
|
413
|
+
':venue',
|
|
414
|
+
],
|
|
415
|
+
'registrations': [],
|
|
416
|
+
'registrations/status': [],
|
|
417
|
+
'registrations/lineup': [],
|
|
418
|
+
'registrations/city': [
|
|
419
|
+
':city',
|
|
420
|
+
],
|
|
421
|
+
'registrations/game': [
|
|
422
|
+
':game',
|
|
423
|
+
],
|
|
424
|
+
'registrations/game/status': [
|
|
425
|
+
':game',
|
|
426
|
+
],
|
|
427
|
+
'registrations/game/theme': [
|
|
428
|
+
':game',
|
|
429
|
+
':theme',
|
|
430
|
+
],
|
|
431
|
+
'registrations/export': [],
|
|
432
|
+
'telegram/webhook': [],
|
|
433
|
+
'telegram/registration/mailing': [
|
|
434
|
+
':registration',
|
|
435
|
+
],
|
|
436
|
+
'chatapp/webhook': [],
|
|
437
|
+
'chatapp/registration': [
|
|
438
|
+
':registration',
|
|
439
|
+
],
|
|
440
|
+
'chatapp/registration/mailing': [
|
|
441
|
+
':registration',
|
|
442
|
+
],
|
|
443
|
+
'bitrix/registration': [
|
|
444
|
+
':registration',
|
|
445
|
+
],
|
|
446
|
+
}),
|
|
447
|
+
)
|
|
448
|
+
|
|
195
449
|
export const PathnameRoute = Object.freeze(
|
|
196
450
|
/** @type {const} */ ({
|
|
197
451
|
'role/:role': 'role',
|