@zthun/romulator-api 1.3.4 → 1.4.0

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.
@@ -0,0 +1,9 @@
1
+ import { IZDataMatch } from '@zthun/helpful-query';
2
+ import { IZRomulatorGame } from '@zthun/romulator-client';
3
+ /**
4
+ * A data match function which matches a string (search) filter
5
+ * to a game's name, system slug, or system name.
6
+ */
7
+ export declare class ZRomulatorDataMatchGame implements IZDataMatch<IZRomulatorGame, string> {
8
+ match(data: IZRomulatorGame, filter: string): boolean;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { IZDataRequestQuery } from '@zthun/helpful-query';
2
+ import { IZRomulatorGame } from '@zthun/romulator-client';
3
+ import { IZRomulatorGamesService } from './games-service.mjs';
4
+ export declare class ZRomulatorGamesController {
5
+ private readonly _games;
6
+ constructor(_games: IZRomulatorGamesService);
7
+ list(query: IZDataRequestQuery): Promise<IZRomulatorGame[]>;
8
+ get(identification: string): Promise<IZRomulatorGame>;
9
+ }
@@ -0,0 +1,2 @@
1
+ export declare class ZRomulatorGamesModule {
2
+ }
@@ -0,0 +1,18 @@
1
+ import { IZFileSystemService } from '@zthun/crumbtrail-fs';
2
+ import { IZDataRequest } from '@zthun/helpful-query';
3
+ import { IZLogger } from '@zthun/lumberjacky-log';
4
+ import { IZRomulatorGame } from '@zthun/romulator-client';
5
+ import { IZRestfulGet } from '@zthun/webigail-rest';
6
+ import { IZRomulatorConfigsService } from '../config/configs-service.mjs';
7
+ export declare const ZRomulatorGamesToken: unique symbol;
8
+ export interface IZRomulatorGamesService extends IZRestfulGet<IZRomulatorGame> {
9
+ list(req: IZDataRequest): Promise<IZRomulatorGame[]>;
10
+ }
11
+ export declare class ZRomulatorGamesService implements IZRomulatorGamesService {
12
+ private readonly _file;
13
+ private readonly _config;
14
+ private readonly _logger;
15
+ constructor(_file: IZFileSystemService, _config: IZRomulatorConfigsService, logger: IZLogger);
16
+ list(req: IZDataRequest): Promise<IZRomulatorGame[]>;
17
+ get(id: string): Promise<IZRomulatorGame>;
18
+ }
package/dist/main.cjs CHANGED
@@ -14,27 +14,27 @@ const lodashEs = require('lodash-es');
14
14
  const promises = require('node:fs/promises');
15
15
  const node_path = require('node:path');
16
16
  const node_os = require('node:os');
17
+ const helpfulReflection = require('@zthun/helpful-reflection');
18
+ require('reflect-metadata');
17
19
  const webigailHttp = require('@zthun/webigail-http');
18
20
  const webigailUrl = require('@zthun/webigail-url');
19
21
  const mimeTypes = require('mime-types');
20
22
  const node_fs = require('node:fs');
21
23
  const node_process = require('node:process');
22
- const helpfulReflection = require('@zthun/helpful-reflection');
23
- require('reflect-metadata');
24
24
 
25
- function _ts_decorate$b(decorators, target, key, desc) {
25
+ function _ts_decorate$e(decorators, target, key, desc) {
26
26
  var c = arguments.length, r = c < 3 ? target : desc, d;
27
27
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
28
28
  else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
29
29
  return c > 3 && r && Object.defineProperty(target, key, r), r;
30
30
  }
31
- function _ts_metadata$7(k, v) {
31
+ function _ts_metadata$9(k, v) {
32
32
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
33
33
  }
34
34
  class ZRomulatorConfigUpdateDto {
35
35
  contents;
36
36
  }
37
- _ts_decorate$b([
37
+ _ts_decorate$e([
38
38
  swagger.ApiProperty({
39
39
  type: "object",
40
40
  properties: {}
@@ -46,7 +46,7 @@ _ts_decorate$b([
46
46
  message: "The contents of the config must be an object "
47
47
  }),
48
48
  classValidator.IsNotEmptyObject(),
49
- _ts_metadata$7("design:type", typeof T === "undefined" ? Object : T)
49
+ _ts_metadata$9("design:type", typeof T === "undefined" ? Object : T)
50
50
  ], ZRomulatorConfigUpdateDto.prototype, "contents", void 0);
51
51
 
52
52
  class ZDir {
@@ -77,16 +77,16 @@ class ZRomulatorConfigKnown {
77
77
  }
78
78
  }
79
79
 
80
- function _ts_decorate$a(decorators, target, key, desc) {
80
+ function _ts_decorate$d(decorators, target, key, desc) {
81
81
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
82
82
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
83
83
  else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
84
84
  return c > 3 && r && Object.defineProperty(target, key, r), r;
85
85
  }
86
- function _ts_metadata$6(k, v) {
86
+ function _ts_metadata$8(k, v) {
87
87
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
88
88
  }
89
- function _ts_param$5(paramIndex, decorator) {
89
+ function _ts_param$7(paramIndex, decorator) {
90
90
  return function(target, key) {
91
91
  decorator(target, key, paramIndex);
92
92
  };
@@ -168,25 +168,25 @@ class ZRomulatorConfigsService {
168
168
  return config;
169
169
  }
170
170
  }
171
- ZRomulatorConfigsService = _ts_decorate$a([
171
+ ZRomulatorConfigsService = _ts_decorate$d([
172
172
  common.Injectable(),
173
- _ts_param$5(0, common.Inject(lumberjackyNest.ZLoggerToken)),
174
- _ts_metadata$6("design:type", Function),
175
- _ts_metadata$6("design:paramtypes", [
173
+ _ts_param$7(0, common.Inject(lumberjackyNest.ZLoggerToken)),
174
+ _ts_metadata$8("design:type", Function),
175
+ _ts_metadata$8("design:paramtypes", [
176
176
  typeof IZLogger === "undefined" ? Object : IZLogger
177
177
  ])
178
178
  ], ZRomulatorConfigsService);
179
179
 
180
- function _ts_decorate$9(decorators, target, key, desc) {
180
+ function _ts_decorate$c(decorators, target, key, desc) {
181
181
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
182
182
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
183
183
  else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
184
184
  return c > 3 && r && Object.defineProperty(target, key, r), r;
185
185
  }
186
- function _ts_metadata$5(k, v) {
186
+ function _ts_metadata$7(k, v) {
187
187
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
188
188
  }
189
- function _ts_param$4(paramIndex, decorator) {
189
+ function _ts_param$6(paramIndex, decorator) {
190
190
  return function(target, key) {
191
191
  decorator(target, key, paramIndex);
192
192
  };
@@ -207,16 +207,16 @@ class ZRomulatorConfigsController {
207
207
  return await this._configs.get(identification);
208
208
  }
209
209
  }
210
- _ts_decorate$9([
210
+ _ts_decorate$c([
211
211
  common.Get(),
212
- _ts_param$4(0, common.Query()),
213
- _ts_metadata$5("design:type", Function),
214
- _ts_metadata$5("design:paramtypes", [
212
+ _ts_param$6(0, common.Query()),
213
+ _ts_metadata$7("design:type", Function),
214
+ _ts_metadata$7("design:paramtypes", [
215
215
  typeof IZDataRequestQuery === "undefined" ? Object : IZDataRequestQuery
216
216
  ]),
217
- _ts_metadata$5("design:returntype", Promise)
217
+ _ts_metadata$7("design:returntype", Promise)
218
218
  ], ZRomulatorConfigsController.prototype, "list", null);
219
- _ts_decorate$9([
219
+ _ts_decorate$c([
220
220
  swagger.ApiParam({
221
221
  type: "string",
222
222
  name: "identification",
@@ -233,39 +233,39 @@ _ts_decorate$9([
233
233
  skipNullProperties: false,
234
234
  skipUndefinedProperties: false
235
235
  })),
236
- _ts_param$4(0, common.Param("identification")),
237
- _ts_param$4(1, common.Body()),
238
- _ts_metadata$5("design:type", Function),
239
- _ts_metadata$5("design:paramtypes", [
236
+ _ts_param$6(0, common.Param("identification")),
237
+ _ts_param$6(1, common.Body()),
238
+ _ts_metadata$7("design:type", Function),
239
+ _ts_metadata$7("design:paramtypes", [
240
240
  typeof ZRomulatorConfigId === "undefined" ? Object : ZRomulatorConfigId,
241
241
  typeof ZRomulatorConfigUpdateDto === "undefined" ? Object : ZRomulatorConfigUpdateDto
242
242
  ]),
243
- _ts_metadata$5("design:returntype", Promise)
243
+ _ts_metadata$7("design:returntype", Promise)
244
244
  ], ZRomulatorConfigsController.prototype, "update", null);
245
- _ts_decorate$9([
245
+ _ts_decorate$c([
246
246
  swagger.ApiParam({
247
247
  type: "string",
248
248
  name: "identification",
249
249
  description: "The id of the config"
250
250
  }),
251
251
  common.Get(":identification"),
252
- _ts_param$4(0, common.Param("identification")),
253
- _ts_metadata$5("design:type", Function),
254
- _ts_metadata$5("design:paramtypes", [
252
+ _ts_param$6(0, common.Param("identification")),
253
+ _ts_metadata$7("design:type", Function),
254
+ _ts_metadata$7("design:paramtypes", [
255
255
  typeof ZRomulatorConfigId === "undefined" ? Object : ZRomulatorConfigId
256
256
  ]),
257
- _ts_metadata$5("design:returntype", Promise)
257
+ _ts_metadata$7("design:returntype", Promise)
258
258
  ], ZRomulatorConfigsController.prototype, "get", null);
259
- ZRomulatorConfigsController = _ts_decorate$9([
259
+ ZRomulatorConfigsController = _ts_decorate$c([
260
260
  common.Controller("configs"),
261
- _ts_param$4(0, common.Inject(ZRomulatorConfigsToken)),
262
- _ts_metadata$5("design:type", Function),
263
- _ts_metadata$5("design:paramtypes", [
261
+ _ts_param$6(0, common.Inject(ZRomulatorConfigsToken)),
262
+ _ts_metadata$7("design:type", Function),
263
+ _ts_metadata$7("design:paramtypes", [
264
264
  typeof IZRomulatorConfigsService === "undefined" ? Object : IZRomulatorConfigsService
265
265
  ])
266
266
  ], ZRomulatorConfigsController);
267
267
 
268
- function _ts_decorate$8(decorators, target, key, desc) {
268
+ function _ts_decorate$b(decorators, target, key, desc) {
269
269
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
270
270
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
271
271
  else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -273,7 +273,7 @@ function _ts_decorate$8(decorators, target, key, desc) {
273
273
  }
274
274
  class ZRomulatorConfigsModule {
275
275
  }
276
- ZRomulatorConfigsModule = _ts_decorate$8([
276
+ ZRomulatorConfigsModule = _ts_decorate$b([
277
277
  common.Module({
278
278
  imports: [
279
279
  crumbtrailNest.ZFileSystemModule,
@@ -294,13 +294,13 @@ ZRomulatorConfigsModule = _ts_decorate$8([
294
294
  })
295
295
  ], ZRomulatorConfigsModule);
296
296
 
297
- function _ts_decorate$7(decorators, target, key, desc) {
297
+ function _ts_decorate$a(decorators, target, key, desc) {
298
298
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
299
299
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
300
300
  else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
301
301
  return c > 3 && r && Object.defineProperty(target, key, r), r;
302
302
  }
303
- function _ts_metadata$4(k, v) {
303
+ function _ts_metadata$6(k, v) {
304
304
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
305
305
  }
306
306
  const KnownSystem = "@zthunworks/romulator/known-system";
@@ -396,48 +396,225 @@ const KnownSystem = "@zthunworks/romulator/known-system";
396
396
  return null;
397
397
  }
398
398
  }
399
- _ts_decorate$7([
399
+ _ts_decorate$a([
400
400
  helpfulReflection.ZTag(KnownSystem),
401
- _ts_metadata$4("design:type", Function),
402
- _ts_metadata$4("design:paramtypes", []),
403
- _ts_metadata$4("design:returntype", void 0)
401
+ _ts_metadata$6("design:type", Function),
402
+ _ts_metadata$6("design:paramtypes", []),
403
+ _ts_metadata$6("design:returntype", void 0)
404
404
  ], ZRomulatorSystemKnown, "nes", null);
405
- _ts_decorate$7([
405
+ _ts_decorate$a([
406
406
  helpfulReflection.ZTag(KnownSystem),
407
- _ts_metadata$4("design:type", Function),
408
- _ts_metadata$4("design:paramtypes", []),
409
- _ts_metadata$4("design:returntype", void 0)
407
+ _ts_metadata$6("design:type", Function),
408
+ _ts_metadata$6("design:paramtypes", []),
409
+ _ts_metadata$6("design:returntype", void 0)
410
410
  ], ZRomulatorSystemKnown, "snes", null);
411
- _ts_decorate$7([
411
+ _ts_decorate$a([
412
412
  helpfulReflection.ZTag(KnownSystem),
413
- _ts_metadata$4("design:type", Function),
414
- _ts_metadata$4("design:paramtypes", []),
415
- _ts_metadata$4("design:returntype", void 0)
413
+ _ts_metadata$6("design:type", Function),
414
+ _ts_metadata$6("design:paramtypes", []),
415
+ _ts_metadata$6("design:returntype", void 0)
416
416
  ], ZRomulatorSystemKnown, "n64", null);
417
- _ts_decorate$7([
417
+ _ts_decorate$a([
418
418
  helpfulReflection.ZTag(KnownSystem),
419
- _ts_metadata$4("design:type", Function),
420
- _ts_metadata$4("design:paramtypes", []),
421
- _ts_metadata$4("design:returntype", void 0)
419
+ _ts_metadata$6("design:type", Function),
420
+ _ts_metadata$6("design:paramtypes", []),
421
+ _ts_metadata$6("design:returntype", void 0)
422
422
  ], ZRomulatorSystemKnown, "gc", null);
423
- _ts_decorate$7([
423
+ _ts_decorate$a([
424
424
  helpfulReflection.ZTag(KnownSystem),
425
- _ts_metadata$4("design:type", Function),
426
- _ts_metadata$4("design:paramtypes", []),
427
- _ts_metadata$4("design:returntype", void 0)
425
+ _ts_metadata$6("design:type", Function),
426
+ _ts_metadata$6("design:paramtypes", []),
427
+ _ts_metadata$6("design:returntype", void 0)
428
428
  ], ZRomulatorSystemKnown, "wii", null);
429
- _ts_decorate$7([
429
+ _ts_decorate$a([
430
430
  helpfulReflection.ZTag(KnownSystem),
431
- _ts_metadata$4("design:type", Function),
432
- _ts_metadata$4("design:paramtypes", []),
433
- _ts_metadata$4("design:returntype", void 0)
431
+ _ts_metadata$6("design:type", Function),
432
+ _ts_metadata$6("design:paramtypes", []),
433
+ _ts_metadata$6("design:returntype", void 0)
434
434
  ], ZRomulatorSystemKnown, "wiiu", null);
435
- _ts_decorate$7([
435
+ _ts_decorate$a([
436
436
  helpfulReflection.ZTag(KnownSystem),
437
+ _ts_metadata$6("design:type", Function),
438
+ _ts_metadata$6("design:paramtypes", []),
439
+ _ts_metadata$6("design:returntype", void 0)
440
+ ], ZRomulatorSystemKnown, "switch", null);
441
+
442
+ /**
443
+ * A data match function which matches a string (search) filter
444
+ * to a game's name, system slug, or system name.
445
+ */ class ZRomulatorDataMatchGame {
446
+ match(data, filter) {
447
+ const needle = filter?.trim().toLowerCase();
448
+ const { name = "", system = "" } = data;
449
+ const target = ZRomulatorSystemKnown.from(system);
450
+ const systemName = helpfulFn.firstTruthy("", target?.name);
451
+ if (!needle?.length) {
452
+ return true;
453
+ }
454
+ return [
455
+ name,
456
+ system,
457
+ systemName
458
+ ].filter((s)=>s.length).some((k)=>k.toLowerCase().includes(needle));
459
+ }
460
+ }
461
+
462
+ function _ts_decorate$9(decorators, target, key, desc) {
463
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
464
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
465
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
466
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
467
+ }
468
+ function _ts_metadata$5(k, v) {
469
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
470
+ }
471
+ function _ts_param$5(paramIndex, decorator) {
472
+ return function(target, key) {
473
+ decorator(target, key, paramIndex);
474
+ };
475
+ }
476
+ const ZRomulatorGamesToken = Symbol("romulator-games-service");
477
+ class ZRomulatorGamesService {
478
+ _file;
479
+ _config;
480
+ _logger;
481
+ constructor(_file, _config, logger){
482
+ this._file = _file;
483
+ this._config = _config;
484
+ this._logger = new lumberjackyLog.ZLoggerContext("ZRomulatorGamesService", logger);
485
+ }
486
+ async list(req) {
487
+ const config = ZRomulatorConfigKnown.games();
488
+ const { contents } = await this._config.get(config.id);
489
+ const { gamesFolder } = new romulatorClient.ZRomulatorConfigGamesBuilder().copy(contents).build();
490
+ const { fallback } = romulatorClient.ZRomulatorConfigGamesMetadata.gamesFolder();
491
+ const cwd = helpfulFn.detokenize(helpfulFn.firstDefined(fallback, gamesFolder), process.env);
492
+ const time = new Date();
493
+ let msg = `Searching for games in ${cwd}`;
494
+ this._logger.log(new lumberjackyLog.ZLogEntryBuilder().info().message(msg).build());
495
+ const systems = ZRomulatorSystemKnown.all().map((system)=>system.id);
496
+ const glob = `{${systems.join(",")}}/**/*.zip`;
497
+ const nodes = await this._file.search(glob, {
498
+ cwd,
499
+ stat: false
500
+ });
501
+ const span = new Date().getTime() - time.getTime();
502
+ msg = `Found ${nodes.length} games. Search took ${span} milliseconds.`;
503
+ this._logger.log(new lumberjackyLog.ZLogEntryBuilder().info().message(msg).build());
504
+ const games = nodes.map(({ path })=>{
505
+ const dir = node_path.basename(node_path.dirname(path));
506
+ const { name: file } = node_path.parse(path);
507
+ const id = `${dir}-${lodashEs.kebabCase(file)}`;
508
+ return new romulatorClient.ZRomulatorGameBuilder().id(id).system(dir).file(path).name(file).build();
509
+ });
510
+ const options = new helpfulQuery.ZDataSourceStaticOptionsBuilder().search(new ZRomulatorDataMatchGame()).build();
511
+ const source = new helpfulQuery.ZDataSourceStatic(games, options);
512
+ const $sort = new helpfulQuery.ZSortBuilder().sorts(helpfulFn.firstDefined([], req.sort)).ascending("system").ascending("name").build();
513
+ const $request = new helpfulQuery.ZDataRequestBuilder().copy(req).sort($sort).build();
514
+ const data = await source.retrieve($request);
515
+ return data;
516
+ }
517
+ async get(id) {
518
+ const games = await this.list(new helpfulQuery.ZDataRequestBuilder().build());
519
+ const match = games.find((game)=>game.id === id);
520
+ if (!match) {
521
+ throw new common.NotFoundException(`Unable to find game with id, ${id}.`);
522
+ }
523
+ return match;
524
+ }
525
+ }
526
+ ZRomulatorGamesService = _ts_decorate$9([
527
+ common.Injectable(),
528
+ _ts_param$5(0, common.Inject(crumbtrailNest.ZFileSystemToken)),
529
+ _ts_param$5(1, common.Inject(ZRomulatorConfigsToken)),
530
+ _ts_param$5(2, common.Inject(lumberjackyNest.ZLoggerToken)),
531
+ _ts_metadata$5("design:type", Function),
532
+ _ts_metadata$5("design:paramtypes", [
533
+ typeof IZFileSystemService === "undefined" ? Object : IZFileSystemService,
534
+ typeof IZRomulatorConfigsService === "undefined" ? Object : IZRomulatorConfigsService,
535
+ typeof IZLogger === "undefined" ? Object : IZLogger
536
+ ])
537
+ ], ZRomulatorGamesService);
538
+
539
+ function _ts_decorate$8(decorators, target, key, desc) {
540
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
541
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
542
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
543
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
544
+ }
545
+ function _ts_metadata$4(k, v) {
546
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
547
+ }
548
+ function _ts_param$4(paramIndex, decorator) {
549
+ return function(target, key) {
550
+ decorator(target, key, paramIndex);
551
+ };
552
+ }
553
+ class ZRomulatorGamesController {
554
+ _games;
555
+ constructor(_games){
556
+ this._games = _games;
557
+ }
558
+ list(query) {
559
+ return this._games.list(new helpfulQuery.ZDataRequestBuilder().query(query).build());
560
+ }
561
+ get(identification) {
562
+ return this._games.get(identification);
563
+ }
564
+ }
565
+ _ts_decorate$8([
566
+ common.Get(),
567
+ _ts_param$4(0, common.Query()),
437
568
  _ts_metadata$4("design:type", Function),
438
- _ts_metadata$4("design:paramtypes", []),
569
+ _ts_metadata$4("design:paramtypes", [
570
+ typeof IZDataRequestQuery === "undefined" ? Object : IZDataRequestQuery
571
+ ]),
572
+ _ts_metadata$4("design:returntype", typeof Promise === "undefined" ? Object : Promise)
573
+ ], ZRomulatorGamesController.prototype, "list", null);
574
+ _ts_decorate$8([
575
+ common.Get(":identification"),
576
+ _ts_param$4(0, common.Param("identification")),
577
+ _ts_metadata$4("design:type", Function),
578
+ _ts_metadata$4("design:paramtypes", [
579
+ String
580
+ ]),
439
581
  _ts_metadata$4("design:returntype", void 0)
440
- ], ZRomulatorSystemKnown, "switch", null);
582
+ ], ZRomulatorGamesController.prototype, "get", null);
583
+ ZRomulatorGamesController = _ts_decorate$8([
584
+ common.Controller("games"),
585
+ _ts_param$4(0, common.Inject(ZRomulatorGamesToken)),
586
+ _ts_metadata$4("design:type", Function),
587
+ _ts_metadata$4("design:paramtypes", [
588
+ typeof IZRomulatorGamesService === "undefined" ? Object : IZRomulatorGamesService
589
+ ])
590
+ ], ZRomulatorGamesController);
591
+
592
+ function _ts_decorate$7(decorators, target, key, desc) {
593
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
594
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
595
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
596
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
597
+ }
598
+ class ZRomulatorGamesModule {
599
+ }
600
+ ZRomulatorGamesModule = _ts_decorate$7([
601
+ common.Module({
602
+ imports: [
603
+ ZRomulatorConfigsModule,
604
+ crumbtrailNest.ZFileSystemModule,
605
+ lumberjackyNest.ZLoggerModule
606
+ ],
607
+ controllers: [
608
+ ZRomulatorGamesController
609
+ ],
610
+ providers: [
611
+ {
612
+ provide: ZRomulatorGamesToken,
613
+ useClass: ZRomulatorGamesService
614
+ }
615
+ ]
616
+ })
617
+ ], ZRomulatorGamesModule);
441
618
 
442
619
  function _ts_decorate$6(decorators, target, key, desc) {
443
620
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -870,7 +1047,8 @@ ZRomulatorModule = _ts_decorate([
870
1047
  imports: [
871
1048
  ZRomulatorSystemsModule,
872
1049
  ZRomulatorConfigsModule,
873
- ZRomulatorMediaModule
1050
+ ZRomulatorMediaModule,
1051
+ ZRomulatorGamesModule
874
1052
  ]
875
1053
  })
876
1054
  ], ZRomulatorModule);