@omnitronix/game-engine-sdk 1.0.4 → 2.0.2
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/CHANGELOG.md +86 -0
- package/MIGRATION.md +126 -0
- package/dist/bootstrap/index.d.ts +4 -1
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/bootstrap/index.js +32 -32
- package/dist/common/api-docs/setup-documentation.d.ts +1 -1
- package/dist/common/api-docs/setup-documentation.d.ts.map +1 -1
- package/dist/common/error-handling/all-exceptions.filter.d.ts +0 -3
- package/dist/common/error-handling/all-exceptions.filter.d.ts.map +1 -1
- package/dist/common/error-handling/all-exceptions.filter.js +35 -21
- package/dist/common/error-handling/error-code-mapper.d.ts.map +1 -1
- package/dist/common/error-handling/error-code-mapper.js +15 -70
- package/dist/common/error-handling/internal-error-code.d.ts +13 -59
- package/dist/common/error-handling/internal-error-code.d.ts.map +1 -1
- package/dist/common/error-handling/internal-error-code.js +16 -68
- package/dist/common/logger/logger.d.ts +2 -3
- package/dist/common/logger/logger.d.ts.map +1 -1
- package/dist/common/logger/logger.js +3 -16
- package/dist/common/logger/logging.middleware.d.ts.map +1 -1
- package/dist/common/logger/logging.middleware.js +16 -4
- package/dist/common/metrics/prometheus.service.d.ts +5 -0
- package/dist/common/metrics/prometheus.service.d.ts.map +1 -1
- package/dist/common/metrics/prometheus.service.js +43 -3
- package/dist/common/retry/retry-policy.d.ts.map +1 -1
- package/dist/common/retry/retry-policy.js +9 -4
- package/dist/common/secrets-provider/secrets-provider.aws.d.ts.map +1 -1
- package/dist/common/secrets-provider/secrets-provider.aws.js +2 -1
- package/dist/esm/bootstrap/index.js +33 -33
- package/dist/esm/common/error-handling/all-exceptions.filter.js +36 -22
- package/dist/esm/common/error-handling/error-code-mapper.js +15 -70
- package/dist/esm/common/error-handling/internal-error-code.js +16 -68
- package/dist/esm/common/logger/logger.js +3 -16
- package/dist/esm/common/logger/logging.middleware.js +16 -4
- package/dist/esm/common/metrics/prometheus.service.js +10 -3
- package/dist/esm/common/retry/retry-policy.js +9 -4
- package/dist/esm/common/secrets-provider/secrets-provider.aws.js +2 -1
- package/dist/esm/generated/game-engine-registry_pb.js +5 -11
- package/dist/esm/generated/game-engine_pb.js +10 -24
- package/dist/esm/grpc/connect-router.middleware.js +7 -1
- package/dist/esm/grpc/game-engine.grpc.in-adapter.js +64 -20
- package/dist/esm/health/application/services/health.service.js +33 -39
- package/dist/esm/health/health.module.js +1 -1
- package/dist/esm/health/infrastructure/adapters/out/shutdown/shutdown.out-adapter.js +19 -4
- package/dist/esm/registration/adapters/game-engine-registry.grpc.out-adapter.js +3 -4
- package/dist/esm/registration/services/game-engine-auto-register.service.js +11 -8
- package/dist/generated/game-engine-registry_pb.d.ts +5 -5
- package/dist/generated/game-engine-registry_pb.d.ts.map +1 -1
- package/dist/generated/game-engine-registry_pb.js +4 -10
- package/dist/generated/game-engine_pb.d.ts +26 -10
- package/dist/generated/game-engine_pb.d.ts.map +1 -1
- package/dist/generated/game-engine_pb.js +8 -22
- package/dist/grpc/connect-router.middleware.d.ts +9 -1
- package/dist/grpc/connect-router.middleware.d.ts.map +1 -1
- package/dist/grpc/connect-router.middleware.js +7 -1
- package/dist/grpc/game-engine.grpc.in-adapter.d.ts +18 -3
- package/dist/grpc/game-engine.grpc.in-adapter.d.ts.map +1 -1
- package/dist/grpc/game-engine.grpc.in-adapter.js +64 -20
- package/dist/grpc/index.d.ts +1 -1
- package/dist/grpc/index.d.ts.map +1 -1
- package/dist/health/application/ports/out/shutdown.out-port.d.ts +2 -0
- package/dist/health/application/ports/out/shutdown.out-port.d.ts.map +1 -1
- package/dist/health/application/services/health.service.d.ts.map +1 -1
- package/dist/health/application/services/health.service.js +33 -39
- package/dist/health/domain/health.d.ts +1 -1
- package/dist/health/domain/health.d.ts.map +1 -1
- package/dist/health/health.module.js +1 -1
- package/dist/health/infrastructure/adapters/out/shutdown/shutdown.out-adapter.d.ts +2 -1
- package/dist/health/infrastructure/adapters/out/shutdown/shutdown.out-adapter.d.ts.map +1 -1
- package/dist/health/infrastructure/adapters/out/shutdown/shutdown.out-adapter.js +19 -4
- package/dist/registration/adapters/game-engine-registry.grpc.out-adapter.d.ts.map +1 -1
- package/dist/registration/adapters/game-engine-registry.grpc.out-adapter.js +3 -4
- package/dist/registration/services/game-engine-auto-register.service.d.ts.map +1 -1
- package/dist/registration/services/game-engine-auto-register.service.js +11 -8
- package/dist/types.d.ts +6 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -3
|
@@ -13,6 +13,8 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
13
13
|
var GameEngineGrpcInAdapter_1;
|
|
14
14
|
import { create } from '@bufbuild/protobuf';
|
|
15
15
|
import { Logger } from '../common/logger/logger';
|
|
16
|
+
import { DomainException } from '../common/error-handling/domain.exception';
|
|
17
|
+
import { InternalErrorCode } from '../common/error-handling/internal-error-code';
|
|
16
18
|
import { GetGameEngineInfoResponseSchema, ProcessCommandResponseSchema, } from '../generated/game-engine_pb';
|
|
17
19
|
import { GAME_ENGINE_IN_PORT, } from '../types';
|
|
18
20
|
import { Inject, Injectable } from '@nestjs/common';
|
|
@@ -26,8 +28,9 @@ let GameEngineGrpcInAdapter = GameEngineGrpcInAdapter_1 = class GameEngineGrpcIn
|
|
|
26
28
|
const command = this.extractCommandFromRequest(request);
|
|
27
29
|
const publicState = request.publicState ?? {};
|
|
28
30
|
const privateState = request.privateState ?? {};
|
|
31
|
+
const additionalData = request.additionalData;
|
|
29
32
|
const result = await this.gameEngineInPort.processCommand(publicState, privateState, command);
|
|
30
|
-
return this.createSuccessResponse(result);
|
|
33
|
+
return this.createSuccessResponse(result, additionalData);
|
|
31
34
|
}
|
|
32
35
|
catch (error) {
|
|
33
36
|
this.logger.error('Error in processCommand', error);
|
|
@@ -35,69 +38,110 @@ let GameEngineGrpcInAdapter = GameEngineGrpcInAdapter_1 = class GameEngineGrpcIn
|
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
extractCommandFromRequest(request) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
if (!request.command) {
|
|
42
|
+
throw new DomainException(InternalErrorCode.INVALID_COMMAND, 'Request must contain a command');
|
|
43
|
+
}
|
|
44
|
+
const { id, type, payload } = request.command;
|
|
45
|
+
if (!id) {
|
|
46
|
+
throw new DomainException(InternalErrorCode.INVALID_COMMAND, 'Command must have a non-empty id');
|
|
47
|
+
}
|
|
48
|
+
if (!type) {
|
|
49
|
+
throw new DomainException(InternalErrorCode.INVALID_COMMAND, 'Command must have a non-empty type');
|
|
50
|
+
}
|
|
51
|
+
return { id, type, payload };
|
|
43
52
|
}
|
|
44
|
-
createSuccessResponse(result) {
|
|
53
|
+
createSuccessResponse(result, requestAdditionalData) {
|
|
45
54
|
const rngOutcome = this.convertRngOutcome(result.rngOutcome);
|
|
55
|
+
// additionalData passthrough: game engine result takes precedence, falls back to request
|
|
56
|
+
const additionalData = result.additionalData ?? requestAdditionalData;
|
|
46
57
|
return create(ProcessCommandResponseSchema, {
|
|
47
58
|
success: result.success ?? true,
|
|
59
|
+
// Cast at gRPC boundary: game engine state objects are serialized as protobuf Struct
|
|
48
60
|
publicState: result.publicState,
|
|
49
61
|
privateState: result.privateState,
|
|
50
62
|
outcome: result.outcome,
|
|
51
63
|
message: result.message,
|
|
52
64
|
rngOutcome: rngOutcome,
|
|
65
|
+
additionalData: additionalData,
|
|
53
66
|
});
|
|
54
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Create error response with sanitized message (OWASP A01).
|
|
70
|
+
* Internal error details are logged but never sent to the client.
|
|
71
|
+
* Client receives only the error code string (e.g. "GAME_ENGINE_ERROR").
|
|
72
|
+
*/
|
|
55
73
|
createErrorResponse(request, error) {
|
|
74
|
+
const errorObj = error;
|
|
75
|
+
const errorCode = errorObj && typeof errorObj.errorCode === 'string' ? errorObj.errorCode : undefined;
|
|
56
76
|
return create(ProcessCommandResponseSchema, {
|
|
57
77
|
success: false,
|
|
58
78
|
publicState: request.publicState,
|
|
59
79
|
privateState: request.privateState,
|
|
60
|
-
|
|
80
|
+
// Return error code only — never expose internal error.message to clients
|
|
81
|
+
message: errorCode ?? 'Command processing failed',
|
|
61
82
|
});
|
|
62
83
|
}
|
|
63
84
|
/**
|
|
64
85
|
* Convert RNG outcome from internal format (seed: number) to wire format (seed: string).
|
|
65
86
|
*
|
|
66
87
|
* This conversion happens at the gRPC boundary to match the proto definition.
|
|
88
|
+
* GLI-19 requires provably correct RNG audit trails — invalid seeds must be
|
|
89
|
+
* rejected (not silently corrupted) to maintain integrity.
|
|
67
90
|
*/
|
|
68
91
|
convertRngOutcome(rngOutcome) {
|
|
69
92
|
if (!rngOutcome) {
|
|
70
93
|
return undefined;
|
|
71
94
|
}
|
|
72
|
-
|
|
73
|
-
|
|
95
|
+
return Object.fromEntries(Object.entries(rngOutcome).map(([key, value]) => {
|
|
96
|
+
this.validateRngRecord(key, value);
|
|
97
|
+
return [
|
|
74
98
|
key,
|
|
75
99
|
{
|
|
76
100
|
result: value.result,
|
|
77
|
-
// Convert seed to string for wire format (gRPC proto uses string)
|
|
78
101
|
seed: String(value.seed),
|
|
79
102
|
min: value.min,
|
|
80
103
|
max: value.max,
|
|
81
104
|
},
|
|
82
|
-
]
|
|
105
|
+
];
|
|
106
|
+
}));
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Validate a single RNG outcome record for GLI-19 compliance.
|
|
110
|
+
* Throws INVALID_RNG_SEED on any invalid numeric field to prevent
|
|
111
|
+
* silent data corruption in the audit trail.
|
|
112
|
+
*
|
|
113
|
+
* Note: seed field may come as string from RNG service (JSON parsing).
|
|
114
|
+
* We accept both number and numeric string for seed since it's converted
|
|
115
|
+
* to string for wire format anyway.
|
|
116
|
+
*/
|
|
117
|
+
validateRngRecord(key, record) {
|
|
118
|
+
// Validate result, min, max as strict numbers
|
|
119
|
+
const strictFields = ['result', 'min', 'max'];
|
|
120
|
+
for (const field of strictFields) {
|
|
121
|
+
const val = record[field];
|
|
122
|
+
if (typeof val !== 'number' || !isFinite(val)) {
|
|
123
|
+
throw new DomainException(InternalErrorCode.INVALID_RNG_SEED, `Invalid RNG ${field} for action '${key}': expected finite number, got ${String(val)}`);
|
|
124
|
+
}
|
|
83
125
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
126
|
+
// Validate seed - allow string or number (RNG service may return string)
|
|
127
|
+
const seed = record.seed;
|
|
128
|
+
const seedNum = typeof seed === 'string' ? Number(seed) : seed;
|
|
129
|
+
if (typeof seedNum !== 'number' || !isFinite(seedNum)) {
|
|
130
|
+
throw new DomainException(InternalErrorCode.INVALID_RNG_SEED, `Invalid RNG seed for action '${key}': expected finite number, got ${String(seed)}`);
|
|
131
|
+
}
|
|
132
|
+
if (record.min > record.max) {
|
|
133
|
+
throw new DomainException(InternalErrorCode.INVALID_RNG_SEED, `Invalid RNG range for action '${key}': min (${record.min}) > max (${record.max})`);
|
|
87
134
|
}
|
|
88
|
-
}
|
|
89
|
-
safeStringify(obj) {
|
|
90
|
-
return JSON.stringify(obj, (key, value) => typeof value === 'bigint' ? value.toString() : value);
|
|
91
135
|
}
|
|
92
136
|
async getGameEngineInfo(_request) {
|
|
93
137
|
const gameEngineInfo = await this.gameEngineInPort.getGameEngineInfo();
|
|
94
|
-
// TODO: gameName and provider are available in GameEngineInfo but not in the proto schema.
|
|
95
|
-
// Update game-engine.proto to add these fields in GetGameEngineInfoResponse.
|
|
96
138
|
return create(GetGameEngineInfoResponseSchema, {
|
|
97
139
|
gameCode: gameEngineInfo.gameCode,
|
|
98
140
|
version: gameEngineInfo.version,
|
|
99
141
|
rtp: gameEngineInfo.rtp,
|
|
100
142
|
gameType: gameEngineInfo.gameType,
|
|
143
|
+
gameName: gameEngineInfo.gameName,
|
|
144
|
+
provider: gameEngineInfo.provider,
|
|
101
145
|
});
|
|
102
146
|
}
|
|
103
147
|
};
|
|
@@ -24,49 +24,43 @@ let HealthService = HealthService_1 = class HealthService {
|
|
|
24
24
|
}
|
|
25
25
|
async checkHealth() {
|
|
26
26
|
this.logger.debug('Starting health check...');
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
if (!result.value.healthy) {
|
|
40
|
-
overallHealth = false;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
const failedComponent = {
|
|
45
|
-
healthy: false,
|
|
46
|
-
component: componentName,
|
|
47
|
-
};
|
|
48
|
-
components.push(failedComponent);
|
|
27
|
+
const healthChecks = await Promise.allSettled([
|
|
28
|
+
Promise.resolve(this.systemHealthOutPort.checkMemoryUsage()),
|
|
29
|
+
Promise.resolve(this.systemHealthOutPort.checkSystemResources()),
|
|
30
|
+
]);
|
|
31
|
+
const components = [];
|
|
32
|
+
let overallHealth = true;
|
|
33
|
+
healthChecks.forEach((result, index) => {
|
|
34
|
+
const componentNames = ['memory', 'system'];
|
|
35
|
+
const componentName = componentNames[index];
|
|
36
|
+
if (result.status === 'fulfilled') {
|
|
37
|
+
components.push(result.value);
|
|
38
|
+
if (!result.value.healthy) {
|
|
49
39
|
overallHealth = false;
|
|
50
40
|
}
|
|
51
|
-
});
|
|
52
|
-
const isShuttingDown = this.isApplicationShuttingDown();
|
|
53
|
-
const healthStatus = {
|
|
54
|
-
overall: overallHealth,
|
|
55
|
-
components,
|
|
56
|
-
uptime: process.uptime(),
|
|
57
|
-
shutdownStatus: isShuttingDown ? 'draining' : 'active',
|
|
58
|
-
};
|
|
59
|
-
if (!overallHealth) {
|
|
60
|
-
this.logger.error('Health check failed', { components });
|
|
61
|
-
throw new HealthCheckFailedException('application', healthStatus);
|
|
62
41
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
42
|
+
else {
|
|
43
|
+
const failedComponent = {
|
|
44
|
+
healthy: false,
|
|
45
|
+
component: componentName,
|
|
46
|
+
};
|
|
47
|
+
components.push(failedComponent);
|
|
48
|
+
overallHealth = false;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const isShuttingDown = this.isApplicationShuttingDown();
|
|
52
|
+
const healthStatus = {
|
|
53
|
+
overall: overallHealth,
|
|
54
|
+
components,
|
|
55
|
+
uptime: process.uptime(),
|
|
56
|
+
shutdownStatus: isShuttingDown ? 'draining' : 'active',
|
|
57
|
+
};
|
|
58
|
+
if (!overallHealth) {
|
|
59
|
+
this.logger.error('Health check failed', { components });
|
|
60
|
+
throw new HealthCheckFailedException('application', healthStatus);
|
|
69
61
|
}
|
|
62
|
+
this.logger.debug('Health check passed');
|
|
63
|
+
return healthStatus;
|
|
70
64
|
}
|
|
71
65
|
isApplicationShuttingDown() {
|
|
72
66
|
return this.shutdownOutPort.isShuttingDown();
|
|
@@ -16,10 +16,15 @@ let ShutdownOutAdapter = ShutdownOutAdapter_1 = class ShutdownOutAdapter {
|
|
|
16
16
|
this.configService = configService;
|
|
17
17
|
this.logger = new Logger(ShutdownOutAdapter_1.name);
|
|
18
18
|
this.shuttingDown = false;
|
|
19
|
+
this.cleanupCallbacks = [];
|
|
19
20
|
}
|
|
20
21
|
isShuttingDown() {
|
|
21
22
|
return this.shuttingDown;
|
|
22
23
|
}
|
|
24
|
+
registerCleanupCallback(name, callback) {
|
|
25
|
+
this.cleanupCallbacks.push({ name, callback });
|
|
26
|
+
this.logger.log(`Registered cleanup callback: ${name}`);
|
|
27
|
+
}
|
|
23
28
|
async startGracefulShutdown() {
|
|
24
29
|
if (this.shuttingDown) {
|
|
25
30
|
this.logger.warn('Graceful shutdown already in progress, ignoring duplicate SIGTERM');
|
|
@@ -28,15 +33,25 @@ let ShutdownOutAdapter = ShutdownOutAdapter_1 = class ShutdownOutAdapter {
|
|
|
28
33
|
this.shuttingDown = true;
|
|
29
34
|
this.logger.warn(`SIGTERM received - starting graceful shutdown sequence\n` +
|
|
30
35
|
`Health endpoint now returns HTTP 503 (draining state)`);
|
|
31
|
-
|
|
36
|
+
await this.cleanup();
|
|
32
37
|
}
|
|
33
38
|
async cleanup() {
|
|
34
39
|
this.logger.log('Starting application resources cleanup...');
|
|
40
|
+
const CLEANUP_TIMEOUT_MS = 10000;
|
|
41
|
+
for (const entry of this.cleanupCallbacks) {
|
|
42
|
+
try {
|
|
43
|
+
await Promise.race([
|
|
44
|
+
entry.callback(),
|
|
45
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error(`Cleanup '${entry.name}' timed out`)), CLEANUP_TIMEOUT_MS)),
|
|
46
|
+
]);
|
|
47
|
+
this.logger.log(`Cleanup completed: ${entry.name}`);
|
|
48
|
+
}
|
|
49
|
+
catch (err) {
|
|
50
|
+
this.logger.error(`Cleanup failed: ${entry.name}`, err);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
35
53
|
this.logger.log('Application resources cleanup completed');
|
|
36
54
|
}
|
|
37
|
-
delay(ms) {
|
|
38
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
39
|
-
}
|
|
40
55
|
};
|
|
41
56
|
ShutdownOutAdapter = ShutdownOutAdapter_1 = __decorate([
|
|
42
57
|
Injectable(),
|
|
@@ -31,10 +31,9 @@ let GameEngineRegistryGrpcOutAdapter = class GameEngineRegistryGrpcOutAdapter {
|
|
|
31
31
|
this.client = createClient(GameEngineRegistryService, transport);
|
|
32
32
|
}
|
|
33
33
|
catch (error) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
});
|
|
34
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
35
|
+
const errorStack = error instanceof Error ? error.stack : undefined;
|
|
36
|
+
this.logger.error(`Failed to connect to Game Engine Registry at ${gameEngineRegistryUrl}: ${errorMessage}`, { stack: errorStack });
|
|
38
37
|
throw new Error(`Failed to connect to Game Engine Registry at ${gameEngineRegistryUrl}`);
|
|
39
38
|
}
|
|
40
39
|
}
|
|
@@ -15,7 +15,8 @@ import { HTTP_RETRYABLE_ERRORS } from '../../common/retry/retry-policies';
|
|
|
15
15
|
import { RetryPolicy } from '../../common/retry/retry-policy';
|
|
16
16
|
import { GAME_ENGINE_REGISTRY_OUT_PORT, } from '../ports/game-engine-registry.out-port';
|
|
17
17
|
import { GAME_ENGINE } from '../../types';
|
|
18
|
-
import {
|
|
18
|
+
import { Logger } from '../../common/logger/logger';
|
|
19
|
+
import { Inject, Injectable } from '@nestjs/common';
|
|
19
20
|
import { ConfigService } from '@nestjs/config';
|
|
20
21
|
let GameEngineAutoRegisterService = GameEngineAutoRegisterService_1 = class GameEngineAutoRegisterService {
|
|
21
22
|
constructor(gameEngineRegistryOutPort, gameEngine, configService) {
|
|
@@ -26,10 +27,11 @@ let GameEngineAutoRegisterService = GameEngineAutoRegisterService_1 = class Game
|
|
|
26
27
|
}
|
|
27
28
|
async onModuleInit() {
|
|
28
29
|
// do not await here to not block module initialization
|
|
29
|
-
this.register().catch(error => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
this.register().catch((error) => {
|
|
31
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
32
|
+
const errorStack = error instanceof Error ? error.stack : undefined;
|
|
33
|
+
this.logger.error(`Auto-registration failed: ${errorMessage}`, {
|
|
34
|
+
stack: errorStack,
|
|
33
35
|
});
|
|
34
36
|
});
|
|
35
37
|
}
|
|
@@ -61,9 +63,10 @@ let GameEngineAutoRegisterService = GameEngineAutoRegisterService_1 = class Game
|
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
65
|
catch (error) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
67
|
+
const errorStack = error instanceof Error ? error.stack : undefined;
|
|
68
|
+
this.logger.error(`Failed to register game engine ${gameEngineInfo.gameCode} v${gameEngineInfo.version} at ${serviceHost}: ${errorMessage}`, {
|
|
69
|
+
stack: errorStack,
|
|
67
70
|
});
|
|
68
71
|
return;
|
|
69
72
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { GenFile, GenMessage, GenService } from
|
|
2
|
-
import type { Message } from
|
|
1
|
+
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
3
3
|
/**
|
|
4
4
|
* Describes the file game-engine-registry.proto.
|
|
5
5
|
*/
|
|
@@ -7,7 +7,7 @@ export declare const file_game_engine_registry: GenFile;
|
|
|
7
7
|
/**
|
|
8
8
|
* @generated from message game_engine_registry.RegisterGameEngineRequest
|
|
9
9
|
*/
|
|
10
|
-
export type RegisterGameEngineRequest = Message<
|
|
10
|
+
export type RegisterGameEngineRequest = Message<"game_engine_registry.RegisterGameEngineRequest"> & {
|
|
11
11
|
/**
|
|
12
12
|
* @generated from field: string game_code = 1;
|
|
13
13
|
*/
|
|
@@ -45,7 +45,7 @@ export declare const RegisterGameEngineRequestSchema: GenMessage<RegisterGameEng
|
|
|
45
45
|
/**
|
|
46
46
|
* @generated from message game_engine_registry.RegisterGameEngineResponse
|
|
47
47
|
*/
|
|
48
|
-
export type RegisterGameEngineResponse = Message<
|
|
48
|
+
export type RegisterGameEngineResponse = Message<"game_engine_registry.RegisterGameEngineResponse"> & {
|
|
49
49
|
/**
|
|
50
50
|
* @generated from field: bool success = 1;
|
|
51
51
|
*/
|
|
@@ -68,7 +68,7 @@ export declare const GameEngineRegistryService: GenService<{
|
|
|
68
68
|
* @generated from rpc game_engine_registry.GameEngineRegistryService.RegisterGameEngine
|
|
69
69
|
*/
|
|
70
70
|
registerGameEngine: {
|
|
71
|
-
methodKind:
|
|
71
|
+
methodKind: "unary";
|
|
72
72
|
input: typeof RegisterGameEngineRequestSchema;
|
|
73
73
|
output: typeof RegisterGameEngineResponseSchema;
|
|
74
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"game-engine-registry_pb.d.ts","sourceRoot":"","sources":["../../src/generated/game-engine-registry_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEpF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,
|
|
1
|
+
{"version":3,"file":"game-engine-registry_pb.d.ts","sourceRoot":"","sources":["../../src/generated/game-engine-registry_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEpF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,OACqjB,CAAC;AAE9lB;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAC,gDAAgD,CAAC,GAAG;IAClG;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,+BAA+B,EAAE,UAAU,CAAC,yBAAyB,CACvC,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAAC,iDAAiD,CAAC,GAAG;IACpG;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gCAAgC,EAAE,UAAU,CAAC,0BAA0B,CACzC,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,UAAU,CAAC;IACjD;;OAEG;IACH,kBAAkB,EAAE;QAClB,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,+BAA+B,CAAC;QAC9C,MAAM,EAAE,OAAO,gCAAgC,CAAC;KACjD,CAAC;CACH,CAC0C,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// @generated by protoc-gen-es v2.
|
|
2
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts"
|
|
3
3
|
// @generated from file game-engine-registry.proto (package game_engine_registry, syntax proto3)
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -8,23 +8,17 @@ const codegenv2_1 = require("@bufbuild/protobuf/codegenv2");
|
|
|
8
8
|
/**
|
|
9
9
|
* Describes the file game-engine-registry.proto.
|
|
10
10
|
*/
|
|
11
|
-
exports.file_game_engine_registry =
|
|
12
|
-
/*@__PURE__*/
|
|
13
|
-
(0, codegenv2_1.fileDesc)('ChpnYW1lLWVuZ2luZS1yZWdpc3RyeS5wcm90bxIUZ2FtZV9lbmdpbmVfcmVnaXN0cnkilgEKGVJlZ2lzdGVyR2FtZUVuZ2luZVJlcXVlc3QSEQoJZ2FtZV9jb2RlGAEgASgJEg8KB3ZlcnNpb24YAiABKAkSCwoDcnRwGAMgASgBEhEKCWdhbWVfdHlwZRgEIAEoCRIQCghncnBjX3VybBgFIAEoCRIRCglnYW1lX25hbWUYBiABKAkSEAoIcHJvdmlkZXIYByABKAkiTwoaUmVnaXN0ZXJHYW1lRW5naW5lUmVzcG9uc2USDwoHc3VjY2VzcxgBIAEoCBIUCgdtZXNzYWdlGAIgASgJSACIAQFCCgoIX21lc3NhZ2UylAEKGUdhbWVFbmdpbmVSZWdpc3RyeVNlcnZpY2USdwoSUmVnaXN0ZXJHYW1lRW5naW5lEi8uZ2FtZV9lbmdpbmVfcmVnaXN0cnkuUmVnaXN0ZXJHYW1lRW5naW5lUmVxdWVzdBowLmdhbWVfZW5naW5lX3JlZ2lzdHJ5LlJlZ2lzdGVyR2FtZUVuZ2luZVJlc3BvbnNlYgZwcm90bzM');
|
|
11
|
+
exports.file_game_engine_registry = (0, codegenv2_1.fileDesc)("ChpnYW1lLWVuZ2luZS1yZWdpc3RyeS5wcm90bxIUZ2FtZV9lbmdpbmVfcmVnaXN0cnkilgEKGVJlZ2lzdGVyR2FtZUVuZ2luZVJlcXVlc3QSEQoJZ2FtZV9jb2RlGAEgASgJEg8KB3ZlcnNpb24YAiABKAkSCwoDcnRwGAMgASgBEhEKCWdhbWVfdHlwZRgEIAEoCRIQCghncnBjX3VybBgFIAEoCRIRCglnYW1lX25hbWUYBiABKAkSEAoIcHJvdmlkZXIYByABKAkiTwoaUmVnaXN0ZXJHYW1lRW5naW5lUmVzcG9uc2USDwoHc3VjY2VzcxgBIAEoCBIUCgdtZXNzYWdlGAIgASgJSACIAQFCCgoIX21lc3NhZ2UylAEKGUdhbWVFbmdpbmVSZWdpc3RyeVNlcnZpY2USdwoSUmVnaXN0ZXJHYW1lRW5naW5lEi8uZ2FtZV9lbmdpbmVfcmVnaXN0cnkuUmVnaXN0ZXJHYW1lRW5naW5lUmVxdWVzdBowLmdhbWVfZW5naW5lX3JlZ2lzdHJ5LlJlZ2lzdGVyR2FtZUVuZ2luZVJlc3BvbnNlYgZwcm90bzM");
|
|
14
12
|
/**
|
|
15
13
|
* Describes the message game_engine_registry.RegisterGameEngineRequest.
|
|
16
14
|
* Use `create(RegisterGameEngineRequestSchema)` to create a new message.
|
|
17
15
|
*/
|
|
18
|
-
exports.RegisterGameEngineRequestSchema =
|
|
19
|
-
/*@__PURE__*/
|
|
20
|
-
(0, codegenv2_1.messageDesc)(exports.file_game_engine_registry, 0);
|
|
16
|
+
exports.RegisterGameEngineRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_game_engine_registry, 0);
|
|
21
17
|
/**
|
|
22
18
|
* Describes the message game_engine_registry.RegisterGameEngineResponse.
|
|
23
19
|
* Use `create(RegisterGameEngineResponseSchema)` to create a new message.
|
|
24
20
|
*/
|
|
25
|
-
exports.RegisterGameEngineResponseSchema =
|
|
26
|
-
/*@__PURE__*/
|
|
27
|
-
(0, codegenv2_1.messageDesc)(exports.file_game_engine_registry, 1);
|
|
21
|
+
exports.RegisterGameEngineResponseSchema = (0, codegenv2_1.messageDesc)(exports.file_game_engine_registry, 1);
|
|
28
22
|
/**
|
|
29
23
|
* @generated from service game_engine_registry.GameEngineRegistryService
|
|
30
24
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { GenFile, GenMessage, GenService } from
|
|
2
|
-
import type { JsonObject, Message } from
|
|
1
|
+
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { JsonObject, Message } from "@bufbuild/protobuf";
|
|
3
3
|
/**
|
|
4
4
|
* Describes the file game-engine.proto.
|
|
5
5
|
*/
|
|
@@ -7,7 +7,7 @@ export declare const file_game_engine: GenFile;
|
|
|
7
7
|
/**
|
|
8
8
|
* @generated from message game_engine.ProcessCommandRequest
|
|
9
9
|
*/
|
|
10
|
-
export type ProcessCommandRequest = Message<
|
|
10
|
+
export type ProcessCommandRequest = Message<"game_engine.ProcessCommandRequest"> & {
|
|
11
11
|
/**
|
|
12
12
|
* @generated from field: optional google.protobuf.Struct public_state = 1;
|
|
13
13
|
*/
|
|
@@ -20,6 +20,10 @@ export type ProcessCommandRequest = Message<'game_engine.ProcessCommandRequest'>
|
|
|
20
20
|
* @generated from field: optional game_engine.GameActionCommand command = 3;
|
|
21
21
|
*/
|
|
22
22
|
command?: GameActionCommand;
|
|
23
|
+
/**
|
|
24
|
+
* @generated from field: optional google.protobuf.Struct additional_data = 4;
|
|
25
|
+
*/
|
|
26
|
+
additionalData?: JsonObject;
|
|
23
27
|
};
|
|
24
28
|
/**
|
|
25
29
|
* Describes the message game_engine.ProcessCommandRequest.
|
|
@@ -29,7 +33,7 @@ export declare const ProcessCommandRequestSchema: GenMessage<ProcessCommandReque
|
|
|
29
33
|
/**
|
|
30
34
|
* @generated from message game_engine.GameActionCommand
|
|
31
35
|
*/
|
|
32
|
-
export type GameActionCommand = Message<
|
|
36
|
+
export type GameActionCommand = Message<"game_engine.GameActionCommand"> & {
|
|
33
37
|
/**
|
|
34
38
|
* @generated from field: string id = 1;
|
|
35
39
|
*/
|
|
@@ -51,7 +55,7 @@ export declare const GameActionCommandSchema: GenMessage<GameActionCommand>;
|
|
|
51
55
|
/**
|
|
52
56
|
* @generated from message game_engine.RngOutcomeRecord
|
|
53
57
|
*/
|
|
54
|
-
export type RngOutcomeRecord = Message<
|
|
58
|
+
export type RngOutcomeRecord = Message<"game_engine.RngOutcomeRecord"> & {
|
|
55
59
|
/**
|
|
56
60
|
* @generated from field: double result = 1;
|
|
57
61
|
*/
|
|
@@ -77,7 +81,7 @@ export declare const RngOutcomeRecordSchema: GenMessage<RngOutcomeRecord>;
|
|
|
77
81
|
/**
|
|
78
82
|
* @generated from message game_engine.ProcessCommandResponse
|
|
79
83
|
*/
|
|
80
|
-
export type ProcessCommandResponse = Message<
|
|
84
|
+
export type ProcessCommandResponse = Message<"game_engine.ProcessCommandResponse"> & {
|
|
81
85
|
/**
|
|
82
86
|
* @generated from field: bool success = 1;
|
|
83
87
|
*/
|
|
@@ -106,6 +110,10 @@ export type ProcessCommandResponse = Message<'game_engine.ProcessCommandResponse
|
|
|
106
110
|
rngOutcome: {
|
|
107
111
|
[key: string]: RngOutcomeRecord;
|
|
108
112
|
};
|
|
113
|
+
/**
|
|
114
|
+
* @generated from field: optional google.protobuf.Struct additional_data = 7;
|
|
115
|
+
*/
|
|
116
|
+
additionalData?: JsonObject;
|
|
109
117
|
};
|
|
110
118
|
/**
|
|
111
119
|
* Describes the message game_engine.ProcessCommandResponse.
|
|
@@ -115,7 +123,7 @@ export declare const ProcessCommandResponseSchema: GenMessage<ProcessCommandResp
|
|
|
115
123
|
/**
|
|
116
124
|
* @generated from message game_engine.GetGameEngineInfoRequest
|
|
117
125
|
*/
|
|
118
|
-
export type GetGameEngineInfoRequest = Message<
|
|
126
|
+
export type GetGameEngineInfoRequest = Message<"game_engine.GetGameEngineInfoRequest"> & {};
|
|
119
127
|
/**
|
|
120
128
|
* Describes the message game_engine.GetGameEngineInfoRequest.
|
|
121
129
|
* Use `create(GetGameEngineInfoRequestSchema)` to create a new message.
|
|
@@ -124,7 +132,7 @@ export declare const GetGameEngineInfoRequestSchema: GenMessage<GetGameEngineInf
|
|
|
124
132
|
/**
|
|
125
133
|
* @generated from message game_engine.GetGameEngineInfoResponse
|
|
126
134
|
*/
|
|
127
|
-
export type GetGameEngineInfoResponse = Message<
|
|
135
|
+
export type GetGameEngineInfoResponse = Message<"game_engine.GetGameEngineInfoResponse"> & {
|
|
128
136
|
/**
|
|
129
137
|
* @generated from field: string game_code = 1;
|
|
130
138
|
*/
|
|
@@ -141,6 +149,14 @@ export type GetGameEngineInfoResponse = Message<'game_engine.GetGameEngineInfoRe
|
|
|
141
149
|
* @generated from field: string game_type = 4;
|
|
142
150
|
*/
|
|
143
151
|
gameType: string;
|
|
152
|
+
/**
|
|
153
|
+
* @generated from field: string game_name = 5;
|
|
154
|
+
*/
|
|
155
|
+
gameName: string;
|
|
156
|
+
/**
|
|
157
|
+
* @generated from field: string provider = 6;
|
|
158
|
+
*/
|
|
159
|
+
provider: string;
|
|
144
160
|
};
|
|
145
161
|
/**
|
|
146
162
|
* Describes the message game_engine.GetGameEngineInfoResponse.
|
|
@@ -155,7 +171,7 @@ export declare const GameEngineService: GenService<{
|
|
|
155
171
|
* @generated from rpc game_engine.GameEngineService.ProcessCommand
|
|
156
172
|
*/
|
|
157
173
|
processCommand: {
|
|
158
|
-
methodKind:
|
|
174
|
+
methodKind: "unary";
|
|
159
175
|
input: typeof ProcessCommandRequestSchema;
|
|
160
176
|
output: typeof ProcessCommandResponseSchema;
|
|
161
177
|
};
|
|
@@ -163,7 +179,7 @@ export declare const GameEngineService: GenService<{
|
|
|
163
179
|
* @generated from rpc game_engine.GameEngineService.GetGameEngineInfo
|
|
164
180
|
*/
|
|
165
181
|
getGameEngineInfo: {
|
|
166
|
-
methodKind:
|
|
182
|
+
methodKind: "unary";
|
|
167
183
|
input: typeof GetGameEngineInfoRequestSchema;
|
|
168
184
|
output: typeof GetGameEngineInfoResponseSchema;
|
|
169
185
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"game-engine_pb.d.ts","sourceRoot":"","sources":["../../src/generated/game-engine_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAGpF,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"game-engine_pb.d.ts","sourceRoot":"","sources":["../../src/generated/game-engine_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAGpF,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAC02D,CAAC;AAE14D;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,mCAAmC,CAAC,GAAG;IACjF;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC;IAEzB;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAE5B;;OAEG;IACH,cAAc,CAAC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;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,UAAU,CAAC,sBAAsB,CAC1C,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC,sCAAsC,CAAC,GAAG,EACxF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAE,UAAU,CAAC,wBAAwB,CAC9C,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAC,uCAAuC,CAAC,GAAG;IACzF;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,+BAA+B,EAAE,UAAU,CAAC,yBAAyB,CAChD,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAAU,CAAC;IACzC;;OAEG;IACH,cAAc,EAAE;QACd,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,2BAA2B,CAAC;QAC1C,MAAM,EAAE,OAAO,4BAA4B,CAAC;KAC7C,CAAC;IACF;;OAEG;IACH,iBAAiB,EAAE;QACjB,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,8BAA8B,CAAC;QAC7C,MAAM,EAAE,OAAO,+BAA+B,CAAC;KAChD,CAAC;CACH,CACiC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// @generated by protoc-gen-es v2.
|
|
2
|
+
// @generated by protoc-gen-es v2.11.0 with parameter "target=ts"
|
|
3
3
|
// @generated from file game-engine.proto (package game_engine, syntax proto3)
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -9,51 +9,37 @@ const wkt_1 = require("@bufbuild/protobuf/wkt");
|
|
|
9
9
|
/**
|
|
10
10
|
* Describes the file game-engine.proto.
|
|
11
11
|
*/
|
|
12
|
-
exports.file_game_engine =
|
|
13
|
-
/*@__PURE__*/
|
|
14
|
-
(0, codegenv2_1.fileDesc)('ChFnYW1lLWVuZ2luZS5wcm90bxILZ2FtZV9lbmdpbmUi5QEKFVByb2Nlc3NDb21tYW5kUmVxdWVzdBIyCgxwdWJsaWNfc3RhdGUYASABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0SACIAQESMwoNcHJpdmF0ZV9zdGF0ZRgCIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RIAYgBARI0Cgdjb21tYW5kGAMgASgLMh4uZ2FtZV9lbmdpbmUuR2FtZUFjdGlvbkNvbW1hbmRIAogBAUIPCg1fcHVibGljX3N0YXRlQhAKDl9wcml2YXRlX3N0YXRlQgoKCF9jb21tYW5kImgKEUdhbWVBY3Rpb25Db21tYW5kEgoKAmlkGAEgASgJEgwKBHR5cGUYAiABKAkSLQoHcGF5bG9hZBgDIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RIAIgBAUIKCghfcGF5bG9hZCJKChBSbmdPdXRjb21lUmVjb3JkEg4KBnJlc3VsdBgBIAEoARIMCgRzZWVkGAIgASgJEgsKA21pbhgDIAEoARILCgNtYXgYBCABKAEirgMKFlByb2Nlc3NDb21tYW5kUmVzcG9uc2USDwoHc3VjY2VzcxgBIAEoCBIyCgxwdWJsaWNfc3RhdGUYAiABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0SACIAQESMwoNcHJpdmF0ZV9zdGF0ZRgDIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RIAYgBARItCgdvdXRjb21lGAQgASgLMhcuZ29vZ2xlLnByb3RvYn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FCDwoNX3B1YmxpY19zdGF0ZUIQCg5fcHJpdmF0ZV9zdGF0ZUIKCghfb3V0Y29tZUIKCghfbWVzc2FnZUISChBfYWRkaXRpb25hbF9kYXRhIhoKGEdldEdhbWVFbmdpbmVJbmZvUmVxdWVzdCKEAQoZR2V0R2FtZUVuZ2luZUluZm9SZXNwb25zZRIRCglnYW1lX2NvZGUYASABKAkSDwoHdmVyc2lvbhgCIAEoCRILCgNydHAYAyABKAESEQoJZ2FtZV90eXBlGAQgASgJEhEKCWdhbWVfbmFtZRgFIAEoCRIQCghwcm92aWRlchgGIAEoCTLSAQoRR2FtZUVuZ2luZVNlcnZpY2USWQoOUHJvY2Vzc0NvbW1hbmQSIi5nYW1lX2VuZ2luZS5Qcm9jZXNzQ29tbWFuZFJlcXVlc3QaIy5nYW1lX2VuZ2luZS5Qcm9jZXNzQ29tbWFuZFJlc3BvbnNlEmIKEUdldEdhbWVFbmdpbmVJbmZvEiUuZ2FtZV9lbmdpbmUuR2V0R2FtZUVuZ2luZUluZm9SZXF1ZXN0GiYuZ2FtZV9lbmdpbmUuR2V0R2FtZUVuZ2luZUluZm9SZXNwb25zZWIGcHJvdG8z", [wkt_1.file_google_protobuf_struct]);
|
|
15
13
|
/**
|
|
16
14
|
* Describes the message game_engine.ProcessCommandRequest.
|
|
17
15
|
* Use `create(ProcessCommandRequestSchema)` to create a new message.
|
|
18
16
|
*/
|
|
19
|
-
exports.ProcessCommandRequestSchema =
|
|
20
|
-
/*@__PURE__*/
|
|
21
|
-
(0, codegenv2_1.messageDesc)(exports.file_game_engine, 0);
|
|
17
|
+
exports.ProcessCommandRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_game_engine, 0);
|
|
22
18
|
/**
|
|
23
19
|
* Describes the message game_engine.GameActionCommand.
|
|
24
20
|
* Use `create(GameActionCommandSchema)` to create a new message.
|
|
25
21
|
*/
|
|
26
|
-
exports.GameActionCommandSchema =
|
|
27
|
-
/*@__PURE__*/
|
|
28
|
-
(0, codegenv2_1.messageDesc)(exports.file_game_engine, 1);
|
|
22
|
+
exports.GameActionCommandSchema = (0, codegenv2_1.messageDesc)(exports.file_game_engine, 1);
|
|
29
23
|
/**
|
|
30
24
|
* Describes the message game_engine.RngOutcomeRecord.
|
|
31
25
|
* Use `create(RngOutcomeRecordSchema)` to create a new message.
|
|
32
26
|
*/
|
|
33
|
-
exports.RngOutcomeRecordSchema =
|
|
34
|
-
/*@__PURE__*/
|
|
35
|
-
(0, codegenv2_1.messageDesc)(exports.file_game_engine, 2);
|
|
27
|
+
exports.RngOutcomeRecordSchema = (0, codegenv2_1.messageDesc)(exports.file_game_engine, 2);
|
|
36
28
|
/**
|
|
37
29
|
* Describes the message game_engine.ProcessCommandResponse.
|
|
38
30
|
* Use `create(ProcessCommandResponseSchema)` to create a new message.
|
|
39
31
|
*/
|
|
40
|
-
exports.ProcessCommandResponseSchema =
|
|
41
|
-
/*@__PURE__*/
|
|
42
|
-
(0, codegenv2_1.messageDesc)(exports.file_game_engine, 3);
|
|
32
|
+
exports.ProcessCommandResponseSchema = (0, codegenv2_1.messageDesc)(exports.file_game_engine, 3);
|
|
43
33
|
/**
|
|
44
34
|
* Describes the message game_engine.GetGameEngineInfoRequest.
|
|
45
35
|
* Use `create(GetGameEngineInfoRequestSchema)` to create a new message.
|
|
46
36
|
*/
|
|
47
|
-
exports.GetGameEngineInfoRequestSchema =
|
|
48
|
-
/*@__PURE__*/
|
|
49
|
-
(0, codegenv2_1.messageDesc)(exports.file_game_engine, 4);
|
|
37
|
+
exports.GetGameEngineInfoRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_game_engine, 4);
|
|
50
38
|
/**
|
|
51
39
|
* Describes the message game_engine.GetGameEngineInfoResponse.
|
|
52
40
|
* Use `create(GetGameEngineInfoResponseSchema)` to create a new message.
|
|
53
41
|
*/
|
|
54
|
-
exports.GetGameEngineInfoResponseSchema =
|
|
55
|
-
/*@__PURE__*/
|
|
56
|
-
(0, codegenv2_1.messageDesc)(exports.file_game_engine, 5);
|
|
42
|
+
exports.GetGameEngineInfoResponseSchema = (0, codegenv2_1.messageDesc)(exports.file_game_engine, 5);
|
|
57
43
|
/**
|
|
58
44
|
* @generated from service game_engine.GameEngineService
|
|
59
45
|
*/
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
import type { ConnectRouter } from '@connectrpc/connect';
|
|
1
2
|
import { GameEngineGrpcInAdapter } from './game-engine.grpc.in-adapter';
|
|
3
|
+
export interface ConnectRouterOptions {
|
|
4
|
+
/** Register additional gRPC services (e.g., crash game streaming). */
|
|
5
|
+
additionalRoutes?: (router: ConnectRouter) => void;
|
|
6
|
+
}
|
|
2
7
|
/**
|
|
3
8
|
* Creates Connect router middleware for GameEngineService.
|
|
4
9
|
* This replaces NestJS built-in gRPC transport with Connect-compatible server.
|
|
10
|
+
*
|
|
11
|
+
* @param gameEngineAdapter - The gRPC adapter handling game engine requests
|
|
12
|
+
* @param options - Optional configuration including additional route registration
|
|
5
13
|
*/
|
|
6
|
-
export declare function createConnectRouter(gameEngineAdapter: GameEngineGrpcInAdapter): import("@connectrpc/connect-node/dist/cjs/node-universal-handler").NodeHandlerFn;
|
|
14
|
+
export declare function createConnectRouter(gameEngineAdapter: GameEngineGrpcInAdapter, options?: ConnectRouterOptions): import("@connectrpc/connect-node/dist/cjs/node-universal-handler").NodeHandlerFn;
|
|
7
15
|
//# sourceMappingURL=connect-router.middleware.d.ts.map
|