@shakerquiz/utilities 0.3.20 → 0.3.22

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shakerquiz/utilities",
3
- "version": "0.3.20",
3
+ "version": "0.3.22",
4
4
  "author": "yurkimus <yurkimus@gmail.com>",
5
5
  "license": "ISC",
6
6
  "scripts": {
@@ -5,40 +5,12 @@ export namespace Backends {
5
5
  let Users: "Users";
6
6
  }
7
7
  export namespace BackendFeatures {
8
- let Backend_1: ("Checkin" | "City" | "Game" | "Registration" | "Theme" | "User" | "Venue")[];
8
+ let Backend_1: ("City" | "Game" | "Registration" | "Theme" | "User" | "Venue" | "Checkin")[];
9
9
  export { Backend_1 as Backend };
10
10
  let Games_1: ("Game" | "Registration" | "Theme")[];
11
11
  export { Games_1 as Games };
12
12
  let Locations_1: ("City" | "Venue")[];
13
13
  export { Locations_1 as Locations };
14
- let Users_1: ("Checkin" | "User")[];
14
+ let Users_1: ("User" | "Checkin")[];
15
15
  export { Users_1 as Users };
16
16
  }
17
- export namespace BackendNetworkOrigins {
18
- export namespace Backend_2 {
19
- let Docker: string;
20
- let Public: string;
21
- }
22
- export { Backend_2 as Backend };
23
- export namespace Games_2 {
24
- let Docker_1: string;
25
- export { Docker_1 as Docker };
26
- let Public_1: string;
27
- export { Public_1 as Public };
28
- }
29
- export { Games_2 as Games };
30
- export namespace Locations_2 {
31
- let Docker_2: string;
32
- export { Docker_2 as Docker };
33
- let Public_2: string;
34
- export { Public_2 as Public };
35
- }
36
- export { Locations_2 as Locations };
37
- export namespace Users_2 {
38
- let Docker_3: string;
39
- export { Docker_3 as Docker };
40
- let Public_3: string;
41
- export { Public_3 as Public };
42
- }
43
- export { Users_2 as Users };
44
- }
@@ -1,5 +1,4 @@
1
1
  import { Domains } from './domains.js'
2
- import { Networks } from './networks.js'
3
2
  import { Procedures } from './procedures.js'
4
3
 
5
4
  export var Backends = /** @type {const} */ ({
@@ -36,25 +35,3 @@ export var BackendFeatures = {
36
35
  Procedures.Checkin,
37
36
  ],
38
37
  }
39
-
40
- export var BackendNetworkOrigins = {
41
- [Backends.Backend]: {
42
- [Networks.Docker]: '',
43
- [Networks.Public]: '',
44
- },
45
-
46
- [Backends.Games]: {
47
- [Networks.Docker]: '',
48
- [Networks.Public]: '',
49
- },
50
-
51
- [Backends.Locations]: {
52
- [Networks.Docker]: '',
53
- [Networks.Public]: '',
54
- },
55
-
56
- [Backends.Users]: {
57
- [Networks.Docker]: '',
58
- [Networks.Public]: '',
59
- },
60
- }
@@ -3,6 +3,7 @@ export const Features: {
3
3
  '404': "404";
4
4
  Exception: "Exception";
5
5
  Home: "Home";
6
+ Profile: "Profile";
6
7
  City: "City";
7
8
  Game: "Game";
8
9
  Registration: "Registration";
@@ -34,18 +35,6 @@ export const ProcedureServiceDefaults: Record<Procedure, Service>;
34
35
  * @type {Record<Feature, Service>}
35
36
  */
36
37
  export const FeatureServiceDefaults: Record<Feature, Service>;
37
- /**
38
- * @type {Record<Domain, Record<Service, Record<Network, string>>>}
39
- */
40
- export const DomainServiceNetworkOrigins: Record<Domain, Record<Service, Record<Network, string>>>;
41
- /**
42
- * @type {Record<Page, Record<Service, Record<Network, string>>>}
43
- */
44
- export const PageServiceNetworkOrigins: Record<Page, Record<Service, Record<Network, string>>>;
45
- /**
46
- * @type {Record<Procedure, Record<Service, Record<Network, string>>>}
47
- */
48
- export const ProcedureServiceNetworkOrigins: Record<Procedure, Record<Service, Record<Network, string>>>;
49
38
  /**
50
39
  * @type {Record<Feature, Record<Service, Record<Network, string>>>}
51
40
  */
@@ -1,6 +1,5 @@
1
1
  import { Backends } from './backends.js'
2
2
  import { DomainIcons, DomainKindPathnames, Domains } from './domains.js'
3
- import { Frontends } from './frontends.js'
4
3
  import { Networks } from './networks.js'
5
4
  import { PageIcons, PageKindPathnames, Pages } from './pages.js'
6
5
  import {
@@ -8,6 +7,7 @@ import {
8
7
  ProcedureKindPathnames,
9
8
  Procedures,
10
9
  } from './procedures.js'
10
+ import { Services } from './services.js'
11
11
 
12
12
  export var Features = {
13
13
  ...Domains,
@@ -52,6 +52,7 @@ export var PageServiceDefaults = {
52
52
  [Pages['404']]: '',
53
53
  [Pages.Exception]: '',
54
54
  [Pages.Home]: '',
55
+ [Pages.Profile]: '',
55
56
  }
56
57
 
57
58
  /**
@@ -70,396 +71,17 @@ export var FeatureServiceDefaults = {
70
71
  ...ProcedureServiceDefaults,
71
72
  }
72
73
 
73
- /**
74
- * @type {Record<Domain, Record<Service, Record<Network, string>>>}
75
- */
76
- export var DomainServiceNetworkOrigins = {
77
- [Domains.City]: {
78
- [Backends.Backend]: {
79
- [Networks.Docker]: '',
80
- [Networks.Public]: '',
81
- },
82
-
83
- [Backends.Games]: {
84
- [Networks.Docker]: '',
85
- [Networks.Public]: '',
86
- },
87
-
88
- [Backends.Locations]: {
89
- [Networks.Docker]: '',
90
- [Networks.Public]: '',
91
- },
92
-
93
- [Backends.Users]: {
94
- [Networks.Docker]: '',
95
- [Networks.Public]: '',
96
- },
97
-
98
- [Frontends.Admin]: {
99
- [Networks.Docker]: '',
100
- [Networks.Public]: '',
101
- },
102
-
103
- [Frontends.Landing]: {
104
- [Networks.Docker]: '',
105
- [Networks.Public]: '',
106
- },
107
-
108
- [Frontends.MiniApp]: {
109
- [Networks.Docker]: '',
110
- [Networks.Public]: '',
111
- },
112
- },
113
-
114
- [Domains.Game]: {
115
- [Backends.Backend]: {
116
- [Networks.Docker]: '',
117
- [Networks.Public]: '',
118
- },
119
-
120
- [Backends.Games]: {
121
- [Networks.Docker]: '',
122
- [Networks.Public]: '',
123
- },
124
-
125
- [Backends.Locations]: {
126
- [Networks.Docker]: '',
127
- [Networks.Public]: '',
128
- },
129
-
130
- [Backends.Users]: {
131
- [Networks.Docker]: '',
132
- [Networks.Public]: '',
133
- },
134
-
135
- [Frontends.Admin]: {
136
- [Networks.Docker]: '',
137
- [Networks.Public]: '',
138
- },
139
-
140
- [Frontends.Landing]: {
141
- [Networks.Docker]: '',
142
- [Networks.Public]: '',
143
- },
144
-
145
- [Frontends.MiniApp]: {
146
- [Networks.Docker]: '',
147
- [Networks.Public]: '',
148
- },
149
- },
150
-
151
- [Domains.Registration]: {
152
- [Backends.Backend]: {
153
- [Networks.Docker]: '',
154
- [Networks.Public]: '',
155
- },
156
-
157
- [Backends.Games]: {
158
- [Networks.Docker]: '',
159
- [Networks.Public]: '',
160
- },
161
-
162
- [Backends.Locations]: {
163
- [Networks.Docker]: '',
164
- [Networks.Public]: '',
165
- },
166
-
167
- [Backends.Users]: {
168
- [Networks.Docker]: '',
169
- [Networks.Public]: '',
170
- },
171
-
172
- [Frontends.Admin]: {
173
- [Networks.Docker]: '',
174
- [Networks.Public]: '',
175
- },
176
-
177
- [Frontends.Landing]: {
178
- [Networks.Docker]: '',
179
- [Networks.Public]: '',
180
- },
181
-
182
- [Frontends.MiniApp]: {
183
- [Networks.Docker]: '',
184
- [Networks.Public]: '',
185
- },
186
- },
187
-
188
- [Domains.Theme]: {
189
- [Backends.Backend]: {
190
- [Networks.Docker]: '',
191
- [Networks.Public]: '',
192
- },
193
-
194
- [Backends.Games]: {
195
- [Networks.Docker]: '',
196
- [Networks.Public]: '',
197
- },
198
-
199
- [Backends.Locations]: {
200
- [Networks.Docker]: '',
201
- [Networks.Public]: '',
202
- },
203
-
204
- [Backends.Users]: {
205
- [Networks.Docker]: '',
206
- [Networks.Public]: '',
207
- },
208
-
209
- [Frontends.Admin]: {
210
- [Networks.Docker]: '',
211
- [Networks.Public]: '',
212
- },
213
-
214
- [Frontends.Landing]: {
215
- [Networks.Docker]: '',
216
- [Networks.Public]: '',
217
- },
218
-
219
- [Frontends.MiniApp]: {
220
- [Networks.Docker]: '',
221
- [Networks.Public]: '',
222
- },
223
- },
224
-
225
- [Domains.User]: {
226
- [Backends.Backend]: {
227
- [Networks.Docker]: '',
228
- [Networks.Public]: '',
229
- },
230
-
231
- [Backends.Games]: {
232
- [Networks.Docker]: '',
233
- [Networks.Public]: '',
234
- },
235
-
236
- [Backends.Locations]: {
237
- [Networks.Docker]: '',
238
- [Networks.Public]: '',
239
- },
240
-
241
- [Backends.Users]: {
242
- [Networks.Docker]: '',
243
- [Networks.Public]: '',
244
- },
245
-
246
- [Frontends.Admin]: {
247
- [Networks.Docker]: '',
248
- [Networks.Public]: '',
249
- },
250
-
251
- [Frontends.Landing]: {
252
- [Networks.Docker]: '',
253
- [Networks.Public]: '',
254
- },
255
-
256
- [Frontends.MiniApp]: {
257
- [Networks.Docker]: '',
258
- [Networks.Public]: '',
259
- },
260
- },
261
-
262
- [Domains.Venue]: {
263
- [Backends.Backend]: {
264
- [Networks.Docker]: '',
265
- [Networks.Public]: '',
266
- },
267
-
268
- [Backends.Games]: {
269
- [Networks.Docker]: '',
270
- [Networks.Public]: '',
271
- },
272
-
273
- [Backends.Locations]: {
274
- [Networks.Docker]: '',
275
- [Networks.Public]: '',
276
- },
277
-
278
- [Backends.Users]: {
279
- [Networks.Docker]: '',
280
- [Networks.Public]: '',
281
- },
282
-
283
- [Frontends.Admin]: {
284
- [Networks.Docker]: '',
285
- [Networks.Public]: '',
286
- },
287
-
288
- [Frontends.Landing]: {
289
- [Networks.Docker]: '',
290
- [Networks.Public]: '',
291
- },
292
-
293
- [Frontends.MiniApp]: {
294
- [Networks.Docker]: '',
295
- [Networks.Public]: '',
296
- },
297
- },
298
- }
299
-
300
- /**
301
- * @type {Record<Page, Record<Service, Record<Network, string>>>}
302
- */
303
- export var PageServiceNetworkOrigins = {
304
- [Pages['404']]: {
305
- [Backends.Backend]: ({
306
- [Networks.Docker]: '',
307
- [Networks.Public]: '',
308
- }),
309
-
310
- [Backends.Games]: {
311
- [Networks.Docker]: '',
312
- [Networks.Public]: '',
313
- },
314
-
315
- [Backends.Locations]: {
316
- [Networks.Docker]: '',
317
- [Networks.Public]: '',
318
- },
319
-
320
- [Backends.Users]: {
321
- [Networks.Docker]: '',
322
- [Networks.Public]: '',
323
- },
324
-
325
- [Frontends.Admin]: {
326
- [Networks.Docker]: '',
327
- [Networks.Public]: '',
328
- },
329
-
330
- [Frontends.Landing]: {
331
- [Networks.Docker]: '',
332
- [Networks.Public]: '',
333
- },
334
-
335
- [Frontends.MiniApp]: {
336
- [Networks.Docker]: '',
337
- [Networks.Public]: '',
338
- },
339
- },
340
-
341
- [Pages.Exception]: {
342
- [Backends.Backend]: ({
343
- [Networks.Docker]: '',
344
- [Networks.Public]: '',
345
- }),
346
-
347
- [Backends.Games]: {
348
- [Networks.Docker]: '',
349
- [Networks.Public]: '',
350
- },
351
-
352
- [Backends.Locations]: {
353
- [Networks.Docker]: '',
354
- [Networks.Public]: '',
355
- },
356
-
357
- [Backends.Users]: {
358
- [Networks.Docker]: '',
359
- [Networks.Public]: '',
360
- },
361
-
362
- [Frontends.Admin]: {
363
- [Networks.Docker]: '',
364
- [Networks.Public]: '',
365
- },
366
-
367
- [Frontends.Landing]: {
368
- [Networks.Docker]: '',
369
- [Networks.Public]: '',
370
- },
371
-
372
- [Frontends.MiniApp]: {
373
- [Networks.Docker]: '',
374
- [Networks.Public]: '',
375
- },
376
- },
377
-
378
- [Pages.Home]: {
379
- [Backends.Backend]: ({
380
- [Networks.Docker]: '',
381
- [Networks.Public]: '',
382
- }),
383
-
384
- [Backends.Games]: {
385
- [Networks.Docker]: '',
386
- [Networks.Public]: '',
387
- },
388
-
389
- [Backends.Locations]: {
390
- [Networks.Docker]: '',
391
- [Networks.Public]: '',
392
- },
393
-
394
- [Backends.Users]: {
395
- [Networks.Docker]: '',
396
- [Networks.Public]: '',
397
- },
398
-
399
- [Frontends.Admin]: {
400
- [Networks.Docker]: '',
401
- [Networks.Public]: '',
402
- },
403
-
404
- [Frontends.Landing]: {
405
- [Networks.Docker]: '',
406
- [Networks.Public]: '',
407
- },
408
-
409
- [Frontends.MiniApp]: {
410
- [Networks.Docker]: '',
411
- [Networks.Public]: '',
412
- },
413
- },
414
- }
415
-
416
- /**
417
- * @type {Record<Procedure, Record<Service, Record<Network, string>>>}
418
- */
419
- export var ProcedureServiceNetworkOrigins = {
420
- [Procedures.Checkin]: ({
421
- [Backends.Backend]: ({
422
- [Networks.Docker]: '',
423
- [Networks.Public]: '',
424
- }),
425
-
426
- [Backends.Games]: {
427
- [Networks.Docker]: '',
428
- [Networks.Public]: '',
429
- },
430
-
431
- [Backends.Locations]: {
432
- [Networks.Docker]: '',
433
- [Networks.Public]: '',
434
- },
435
-
436
- [Backends.Users]: {
437
- [Networks.Docker]: '',
438
- [Networks.Public]: '',
439
- },
440
-
441
- [Frontends.Admin]: {
442
- [Networks.Docker]: '',
443
- [Networks.Public]: '',
444
- },
445
-
446
- [Frontends.Landing]: {
447
- [Networks.Docker]: '',
448
- [Networks.Public]: '',
449
- },
450
-
451
- [Frontends.MiniApp]: {
452
- [Networks.Docker]: '',
453
- [Networks.Public]: '',
454
- },
455
- }),
456
- }
457
-
458
74
  /**
459
75
  * @type {Record<Feature, Record<Service, Record<Network, string>>>}
460
76
  */
461
- export var FeatureServiceNetworkOrigins = {
462
- ...DomainServiceNetworkOrigins,
463
- ...PageServiceNetworkOrigins,
464
- ...ProcedureServiceNetworkOrigins,
77
+ export var FeatureServiceNetworkOrigins = {}
78
+
79
+ for (var feature in Features) {
80
+ FeatureServiceNetworkOrigins[feature] = {}
81
+ for (var service in Services) {
82
+ FeatureServiceNetworkOrigins[feature][service] = {}
83
+ for (var network in Networks) {
84
+ FeatureServiceNetworkOrigins[feature][service][network] = ''
85
+ }
86
+ }
465
87
  }
@@ -4,31 +4,10 @@ export namespace Frontends {
4
4
  let MiniApp: "MiniApp";
5
5
  }
6
6
  export namespace FrontendFeatures {
7
- let Admin_1: ("Checkin" | "City" | "Game" | "Registration" | "Theme" | "User" | "Venue")[];
7
+ let Admin_1: ("City" | "Game" | "Registration" | "Theme" | "User" | "Venue" | "404" | "Exception" | "Home" | "Profile" | "Checkin")[];
8
8
  export { Admin_1 as Admin };
9
- let Landing_1: ("Game" | "Registration")[];
9
+ let Landing_1: ("Game" | "Registration" | "404" | "Exception" | "Home")[];
10
10
  export { Landing_1 as Landing };
11
- let MiniApp_1: ("Game" | "Registration")[];
11
+ let MiniApp_1: ("Game" | "Registration" | "404" | "Exception" | "Home")[];
12
12
  export { MiniApp_1 as MiniApp };
13
13
  }
14
- export namespace FrontendNetworkOrigins {
15
- export namespace Admin_2 {
16
- let Docker: string;
17
- let Public: string;
18
- }
19
- export { Admin_2 as Admin };
20
- export namespace Landing_2 {
21
- let Docker_1: string;
22
- export { Docker_1 as Docker };
23
- let Public_1: string;
24
- export { Public_1 as Public };
25
- }
26
- export { Landing_2 as Landing };
27
- export namespace MiniApp_2 {
28
- let Docker_2: string;
29
- export { Docker_2 as Docker };
30
- let Public_2: string;
31
- export { Public_2 as Public };
32
- }
33
- export { MiniApp_2 as MiniApp };
34
- }
@@ -1,5 +1,4 @@
1
1
  import { Domains } from './domains.js'
2
- import { Networks } from './networks.js'
3
2
  import { Pages } from './pages.js'
4
3
  import { Procedures } from './procedures.js'
5
4
 
@@ -20,6 +19,7 @@ export var FrontendFeatures = {
20
19
  Pages['404'],
21
20
  Pages.Exception,
22
21
  Pages.Home,
22
+ Pages.Profile,
23
23
  Procedures.Checkin,
24
24
  ],
25
25
 
@@ -39,20 +39,3 @@ export var FrontendFeatures = {
39
39
  Pages.Home,
40
40
  ],
41
41
  }
42
-
43
- export var FrontendNetworkOrigins = {
44
- [Frontends.Admin]: {
45
- [Networks.Docker]: '',
46
- [Networks.Public]: '',
47
- },
48
-
49
- [Frontends.Landing]: {
50
- [Networks.Docker]: '',
51
- [Networks.Public]: '',
52
- },
53
-
54
- [Frontends.MiniApp]: {
55
- [Networks.Docker]: '',
56
- [Networks.Public]: '',
57
- },
58
- }
@@ -2,6 +2,7 @@ export const Pages: {
2
2
  readonly '404': "404";
3
3
  readonly Exception: "Exception";
4
4
  readonly Home: "Home";
5
+ readonly Profile: "Profile";
5
6
  };
6
7
  /**
7
8
  * @type {Record<Page, Icon>}
@@ -6,6 +6,7 @@ export var Pages = /** @type {const} */ ({
6
6
  '404': '404',
7
7
  Exception: 'Exception',
8
8
  Home: 'Home',
9
+ Profile: 'Profile',
9
10
  })
10
11
 
11
12
  /**
@@ -15,6 +16,7 @@ export var PageIcons = {
15
16
  [Pages['404']]: Icons['exclamation-triangle'],
16
17
  [Pages.Exception]: Icons['exclamation-circle'],
17
18
  [Pages.Home]: Icons['home'],
19
+ [Pages.Profile]: Icons['user'],
18
20
  }
19
21
 
20
22
  /**
@@ -32,6 +34,10 @@ export var PageKindPathnames = {
32
34
  [Pages.Home]: {
33
35
  [Kinds.Unit]: '/',
34
36
  },
37
+
38
+ [Pages.Profile]: {
39
+ [Kinds.Unit]: '/profile',
40
+ },
35
41
  }
36
42
 
37
43
  /**
@@ -64,4 +70,13 @@ export var ProcedureMethodRequirements = {
64
70
  [Methods.POST]: new Set([]),
65
71
  [Methods.PUT]: new Set([]),
66
72
  },
73
+
74
+ [Pages.Profile]: {
75
+ [Methods.DELETE]: new Set([]),
76
+ [Methods.GET]: new Set([]),
77
+ [Methods.OPTIONS]: new Set([]),
78
+ [Methods.PATCH]: new Set([]),
79
+ [Methods.POST]: new Set([]),
80
+ [Methods.PUT]: new Set([]),
81
+ },
67
82
  }
@@ -8,41 +8,13 @@ export const Services: {
8
8
  Users: "Users";
9
9
  };
10
10
  export const ServiceFeatures: {
11
- Admin: ("Checkin" | "City" | "Game" | "Registration" | "Theme" | "User" | "Venue")[];
12
- Landing: ("Game" | "Registration")[];
13
- MiniApp: ("Game" | "Registration")[];
14
- Backend: ("Checkin" | "City" | "Game" | "Registration" | "Theme" | "User" | "Venue")[];
11
+ Admin: ("City" | "Game" | "Registration" | "Theme" | "User" | "Venue" | "Checkin" | "404" | "Exception" | "Home" | "Profile")[];
12
+ Landing: ("Game" | "Registration" | "404" | "Exception" | "Home")[];
13
+ MiniApp: ("Game" | "Registration" | "404" | "Exception" | "Home")[];
14
+ Backend: ("City" | "Game" | "Registration" | "Theme" | "User" | "Venue" | "Checkin")[];
15
15
  Games: ("Game" | "Registration" | "Theme")[];
16
16
  Locations: ("City" | "Venue")[];
17
- Users: ("Checkin" | "User")[];
18
- };
19
- export const ServiceNetworkOrigins: {
20
- Admin: {
21
- Docker: string;
22
- Public: string;
23
- };
24
- Landing: {
25
- Docker: string;
26
- Public: string;
27
- };
28
- MiniApp: {
29
- Docker: string;
30
- Public: string;
31
- };
32
- Backend: {
33
- Docker: string;
34
- Public: string;
35
- };
36
- Games: {
37
- Docker: string;
38
- Public: string;
39
- };
40
- Locations: {
41
- Docker: string;
42
- Public: string;
43
- };
44
- Users: {
45
- Docker: string;
46
- Public: string;
47
- };
17
+ Users: ("User" | "Checkin")[];
48
18
  };
19
+ /** @type {Record<Service, Record<Network, string>>} */
20
+ export const ServiceNetworkOrigins: Record<Service, Record<Network, string>>;
@@ -1,9 +1,6 @@
1
- import { BackendFeatures, BackendNetworkOrigins, Backends } from './backends.js'
2
- import {
3
- FrontendFeatures,
4
- FrontendNetworkOrigins,
5
- Frontends,
6
- } from './frontends.js'
1
+ import { BackendFeatures, Backends } from './backends.js'
2
+ import { FrontendFeatures, Frontends } from './frontends.js'
3
+ import { Networks } from './networks.js'
7
4
 
8
5
  export var Services = {
9
6
  ...Backends,
@@ -15,7 +12,12 @@ export var ServiceFeatures = {
15
12
  ...FrontendFeatures,
16
13
  }
17
14
 
18
- export var ServiceNetworkOrigins = {
19
- ...BackendNetworkOrigins,
20
- ...FrontendNetworkOrigins,
15
+ /** @type {Record<Service, Record<Network, string>>} */
16
+ export var ServiceNetworkOrigins = {}
17
+
18
+ for (var service in Services) {
19
+ ServiceNetworkOrigins[service] = {}
20
+ for (var network in Networks) {
21
+ ServiceNetworkOrigins[service][network] = ''
22
+ }
21
23
  }