@shakerquiz/utilities 0.3.14 → 0.3.15
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 +1 -1
- package/source/enumerations/features.js +130 -0
- package/source/enumerations/frontends.js +10 -0
- package/source/enumerations/pages.d.ts +17 -0
- package/source/enumerations/pages.js +67 -0
- package/source/enumerations/procedures.js +0 -1
- package/source/globals.d.ts +2 -1
- package/source/index.d.ts +1 -0
- package/source/index.js +1 -0
package/package.json
CHANGED
|
@@ -2,10 +2,12 @@ import { Backends } from './backends.js'
|
|
|
2
2
|
import { DomainKindPathnames, Domains } from './domains.js'
|
|
3
3
|
import { Frontends } from './frontends.js'
|
|
4
4
|
import { Networks } from './networks.js'
|
|
5
|
+
import { PageKindPathnames, Pages } from './pages.js'
|
|
5
6
|
import { ProcedureKindPathnames, Procedures } from './procedures.js'
|
|
6
7
|
|
|
7
8
|
export var Features = {
|
|
8
9
|
...Domains,
|
|
10
|
+
...Pages,
|
|
9
11
|
...Procedures,
|
|
10
12
|
}
|
|
11
13
|
|
|
@@ -14,6 +16,7 @@ export var Features = {
|
|
|
14
16
|
*/
|
|
15
17
|
export var FeatureKindPathnames = {
|
|
16
18
|
...DomainKindPathnames,
|
|
19
|
+
...PageKindPathnames,
|
|
17
20
|
...ProcedureKindPathnames,
|
|
18
21
|
}
|
|
19
22
|
|
|
@@ -29,6 +32,15 @@ export var DomainServiceDefaults = {
|
|
|
29
32
|
[Domains.Venue]: Backends.Locations,
|
|
30
33
|
}
|
|
31
34
|
|
|
35
|
+
/**
|
|
36
|
+
* @type {Record<Page, Service>}
|
|
37
|
+
*/
|
|
38
|
+
export var PageServiceDefaults = {
|
|
39
|
+
[Pages['404']]: '',
|
|
40
|
+
[Pages.Exception]: '',
|
|
41
|
+
[Pages.Home]: '',
|
|
42
|
+
}
|
|
43
|
+
|
|
32
44
|
/**
|
|
33
45
|
* @type {Record<Procedure, Service>}
|
|
34
46
|
*/
|
|
@@ -41,6 +53,7 @@ export var ProcedureServiceDefaults = {
|
|
|
41
53
|
*/
|
|
42
54
|
export var FeatureServiceDefaults = {
|
|
43
55
|
...DomainServiceDefaults,
|
|
56
|
+
...PageServiceDefaults,
|
|
44
57
|
...ProcedureServiceDefaults,
|
|
45
58
|
}
|
|
46
59
|
|
|
@@ -271,6 +284,122 @@ export var DomainServiceNetworkOrigins = {
|
|
|
271
284
|
},
|
|
272
285
|
}
|
|
273
286
|
|
|
287
|
+
/**
|
|
288
|
+
* @type {Record<Page, Record<Service, Record<Network, string>>>}
|
|
289
|
+
*/
|
|
290
|
+
export var PageServiceNetworkOrigins = {
|
|
291
|
+
[Pages['404']]: {
|
|
292
|
+
[Backends.Backend]: ({
|
|
293
|
+
[Networks.Docker]: '',
|
|
294
|
+
[Networks.Public]: '',
|
|
295
|
+
}),
|
|
296
|
+
|
|
297
|
+
[Backends.Games]: {
|
|
298
|
+
[Networks.Docker]: '',
|
|
299
|
+
[Networks.Public]: '',
|
|
300
|
+
},
|
|
301
|
+
|
|
302
|
+
[Backends.Locations]: {
|
|
303
|
+
[Networks.Docker]: '',
|
|
304
|
+
[Networks.Public]: '',
|
|
305
|
+
},
|
|
306
|
+
|
|
307
|
+
[Backends.Users]: {
|
|
308
|
+
[Networks.Docker]: '',
|
|
309
|
+
[Networks.Public]: '',
|
|
310
|
+
},
|
|
311
|
+
|
|
312
|
+
[Frontends.Admin]: {
|
|
313
|
+
[Networks.Docker]: '',
|
|
314
|
+
[Networks.Public]: '',
|
|
315
|
+
},
|
|
316
|
+
|
|
317
|
+
[Frontends.Landing]: {
|
|
318
|
+
[Networks.Docker]: '',
|
|
319
|
+
[Networks.Public]: '',
|
|
320
|
+
},
|
|
321
|
+
|
|
322
|
+
[Frontends.MiniApp]: {
|
|
323
|
+
[Networks.Docker]: '',
|
|
324
|
+
[Networks.Public]: '',
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
|
|
328
|
+
[Pages.Exception]: {
|
|
329
|
+
[Backends.Backend]: ({
|
|
330
|
+
[Networks.Docker]: '',
|
|
331
|
+
[Networks.Public]: '',
|
|
332
|
+
}),
|
|
333
|
+
|
|
334
|
+
[Backends.Games]: {
|
|
335
|
+
[Networks.Docker]: '',
|
|
336
|
+
[Networks.Public]: '',
|
|
337
|
+
},
|
|
338
|
+
|
|
339
|
+
[Backends.Locations]: {
|
|
340
|
+
[Networks.Docker]: '',
|
|
341
|
+
[Networks.Public]: '',
|
|
342
|
+
},
|
|
343
|
+
|
|
344
|
+
[Backends.Users]: {
|
|
345
|
+
[Networks.Docker]: '',
|
|
346
|
+
[Networks.Public]: '',
|
|
347
|
+
},
|
|
348
|
+
|
|
349
|
+
[Frontends.Admin]: {
|
|
350
|
+
[Networks.Docker]: '',
|
|
351
|
+
[Networks.Public]: '',
|
|
352
|
+
},
|
|
353
|
+
|
|
354
|
+
[Frontends.Landing]: {
|
|
355
|
+
[Networks.Docker]: '',
|
|
356
|
+
[Networks.Public]: '',
|
|
357
|
+
},
|
|
358
|
+
|
|
359
|
+
[Frontends.MiniApp]: {
|
|
360
|
+
[Networks.Docker]: '',
|
|
361
|
+
[Networks.Public]: '',
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
|
|
365
|
+
[Pages.Home]: {
|
|
366
|
+
[Backends.Backend]: ({
|
|
367
|
+
[Networks.Docker]: '',
|
|
368
|
+
[Networks.Public]: '',
|
|
369
|
+
}),
|
|
370
|
+
|
|
371
|
+
[Backends.Games]: {
|
|
372
|
+
[Networks.Docker]: '',
|
|
373
|
+
[Networks.Public]: '',
|
|
374
|
+
},
|
|
375
|
+
|
|
376
|
+
[Backends.Locations]: {
|
|
377
|
+
[Networks.Docker]: '',
|
|
378
|
+
[Networks.Public]: '',
|
|
379
|
+
},
|
|
380
|
+
|
|
381
|
+
[Backends.Users]: {
|
|
382
|
+
[Networks.Docker]: '',
|
|
383
|
+
[Networks.Public]: '',
|
|
384
|
+
},
|
|
385
|
+
|
|
386
|
+
[Frontends.Admin]: {
|
|
387
|
+
[Networks.Docker]: '',
|
|
388
|
+
[Networks.Public]: '',
|
|
389
|
+
},
|
|
390
|
+
|
|
391
|
+
[Frontends.Landing]: {
|
|
392
|
+
[Networks.Docker]: '',
|
|
393
|
+
[Networks.Public]: '',
|
|
394
|
+
},
|
|
395
|
+
|
|
396
|
+
[Frontends.MiniApp]: {
|
|
397
|
+
[Networks.Docker]: '',
|
|
398
|
+
[Networks.Public]: '',
|
|
399
|
+
},
|
|
400
|
+
},
|
|
401
|
+
}
|
|
402
|
+
|
|
274
403
|
/**
|
|
275
404
|
* @type {Record<Procedure, Record<Service, Record<Network, string>>>}
|
|
276
405
|
*/
|
|
@@ -318,5 +447,6 @@ export var ProcedureServiceNetworkOrigins = {
|
|
|
318
447
|
*/
|
|
319
448
|
export var FeatureServiceNetworkOrigins = {
|
|
320
449
|
...DomainServiceNetworkOrigins,
|
|
450
|
+
...PageServiceNetworkOrigins,
|
|
321
451
|
...ProcedureServiceNetworkOrigins,
|
|
322
452
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Domains } from './domains.js'
|
|
2
2
|
import { Networks } from './networks.js'
|
|
3
|
+
import { Pages } from './pages.js'
|
|
3
4
|
import { Procedures } from './procedures.js'
|
|
4
5
|
|
|
5
6
|
export var Frontends = /** @type {const} */ ({
|
|
@@ -16,17 +17,26 @@ export var FrontendFeatures = {
|
|
|
16
17
|
Domains.Theme,
|
|
17
18
|
Domains.User,
|
|
18
19
|
Domains.Venue,
|
|
20
|
+
Pages['404'],
|
|
21
|
+
Pages.Exception,
|
|
22
|
+
Pages.Home,
|
|
19
23
|
Procedures.Checkin,
|
|
20
24
|
],
|
|
21
25
|
|
|
22
26
|
[Frontends.Landing]: [
|
|
23
27
|
Domains.Game,
|
|
24
28
|
Domains.Registration,
|
|
29
|
+
Pages['404'],
|
|
30
|
+
Pages.Exception,
|
|
31
|
+
Pages.Home,
|
|
25
32
|
],
|
|
26
33
|
|
|
27
34
|
[Frontends.MiniApp]: [
|
|
28
35
|
Domains.Game,
|
|
29
36
|
Domains.Registration,
|
|
37
|
+
Pages['404'],
|
|
38
|
+
Pages.Exception,
|
|
39
|
+
Pages.Home,
|
|
30
40
|
],
|
|
31
41
|
}
|
|
32
42
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const Pages: {
|
|
2
|
+
readonly '404': "404";
|
|
3
|
+
readonly Exception: "Exception";
|
|
4
|
+
readonly Home: "Home";
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @type {Record<Page, Icon>}
|
|
8
|
+
*/
|
|
9
|
+
export const PageIcons: Record<Page, Icon>;
|
|
10
|
+
/**
|
|
11
|
+
* @type {Record<Page, Record<Kind, string>>}
|
|
12
|
+
*/
|
|
13
|
+
export const PageKindPathnames: Record<Page, Record<Kind, string>>;
|
|
14
|
+
/**
|
|
15
|
+
* @type {Record<Page, Record<Method, Set<Requirement>>>}
|
|
16
|
+
*/
|
|
17
|
+
export const ProcedureMethodRequirements: Record<Page, Record<Method, Set<Requirement>>>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Icons } from './icons.js'
|
|
2
|
+
import { Kinds } from './kinds.js'
|
|
3
|
+
import { Methods } from './methods.js'
|
|
4
|
+
|
|
5
|
+
export var Pages = /** @type {const} */ ({
|
|
6
|
+
'404': '404',
|
|
7
|
+
Exception: 'Exception',
|
|
8
|
+
Home: 'Home',
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @type {Record<Page, Icon>}
|
|
13
|
+
*/
|
|
14
|
+
export var PageIcons = {
|
|
15
|
+
[Pages['404']]: Icons['exclamation-triangle'],
|
|
16
|
+
[Pages.Exception]: Icons['exclamation-circle'],
|
|
17
|
+
[Pages.Home]: Icons['home'],
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @type {Record<Page, Record<Kind, string>>}
|
|
22
|
+
*/
|
|
23
|
+
export var PageKindPathnames = {
|
|
24
|
+
[Pages['404']]: {
|
|
25
|
+
[Kinds.Unit]: '/404',
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
[Pages.Exception]: {
|
|
29
|
+
[Kinds.Unit]: '/exception',
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
[Pages.Home]: {
|
|
33
|
+
[Kinds.Unit]: '/',
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @type {Record<Page, Record<Method, Set<Requirement>>>}
|
|
39
|
+
*/
|
|
40
|
+
export var ProcedureMethodRequirements = {
|
|
41
|
+
[Pages['404']]: {
|
|
42
|
+
[Methods.DELETE]: new Set([]),
|
|
43
|
+
[Methods.GET]: new Set([]),
|
|
44
|
+
[Methods.OPTIONS]: new Set([]),
|
|
45
|
+
[Methods.PATCH]: new Set([]),
|
|
46
|
+
[Methods.POST]: new Set([]),
|
|
47
|
+
[Methods.PUT]: new Set([]),
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
[Pages.Exception]: {
|
|
51
|
+
[Methods.DELETE]: new Set([]),
|
|
52
|
+
[Methods.GET]: new Set([]),
|
|
53
|
+
[Methods.OPTIONS]: new Set([]),
|
|
54
|
+
[Methods.PATCH]: new Set([]),
|
|
55
|
+
[Methods.POST]: new Set([]),
|
|
56
|
+
[Methods.PUT]: new Set([]),
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
[Pages.Home]: {
|
|
60
|
+
[Methods.DELETE]: new Set([]),
|
|
61
|
+
[Methods.GET]: new Set([]),
|
|
62
|
+
[Methods.OPTIONS]: new Set([]),
|
|
63
|
+
[Methods.PATCH]: new Set([]),
|
|
64
|
+
[Methods.POST]: new Set([]),
|
|
65
|
+
[Methods.PUT]: new Set([]),
|
|
66
|
+
},
|
|
67
|
+
}
|
package/source/globals.d.ts
CHANGED
|
@@ -46,8 +46,9 @@ type Requirement =
|
|
|
46
46
|
*/
|
|
47
47
|
|
|
48
48
|
type Domain = keyof typeof import('./enumerations/domains.js').Domains
|
|
49
|
+
type Page = keyof typeof import('./enumerations/pages.js').Pages
|
|
49
50
|
type Procedure = keyof typeof import('./enumerations/procedures.js').Procedures
|
|
50
|
-
type Feature = Domain | Procedure
|
|
51
|
+
type Feature = Domain | Page | Procedure
|
|
51
52
|
|
|
52
53
|
type Backend = keyof typeof import('./enumerations/backends.js').Backends
|
|
53
54
|
type Frontend = keyof typeof import('./enumerations/frontends.js').Frontends
|
package/source/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './enumerations/icons.js'
|
|
|
21
21
|
export * from './enumerations/kinds.js'
|
|
22
22
|
export * from './enumerations/methods.js'
|
|
23
23
|
export * from './enumerations/networks.js'
|
|
24
|
+
export * from './enumerations/pages.js'
|
|
24
25
|
export * from './enumerations/phases.js'
|
|
25
26
|
export * from './enumerations/procedures.js'
|
|
26
27
|
export * from './enumerations/regexps.js'
|
package/source/index.js
CHANGED
|
@@ -21,6 +21,7 @@ export * from './enumerations/icons.js'
|
|
|
21
21
|
export * from './enumerations/kinds.js'
|
|
22
22
|
export * from './enumerations/methods.js'
|
|
23
23
|
export * from './enumerations/networks.js'
|
|
24
|
+
export * from './enumerations/pages.js'
|
|
24
25
|
export * from './enumerations/phases.js'
|
|
25
26
|
export * from './enumerations/procedures.js'
|
|
26
27
|
export * from './enumerations/regexps.js'
|