@babylonjs-toolkit/server 0.0.0-stage → 9.35.1
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/CUSTOM.md +1690 -0
- package/DEPLOY.md +2012 -0
- package/README.md +1081 -2
- package/lib/AbuseLimits.d.ts +64 -0
- package/lib/AbuseLimits.js +121 -0
- package/lib/Authentication.d.ts +86 -0
- package/lib/Authentication.js +272 -0
- package/lib/BootSessionOwner.d.ts +86 -0
- package/lib/BootSessionOwner.js +116 -0
- package/lib/ColyseusLoggerAdapter.d.ts +32 -0
- package/lib/ColyseusLoggerAdapter.js +73 -0
- package/lib/DedicatedSceneRegistry.d.ts +52 -0
- package/lib/DedicatedSceneRegistry.js +74 -0
- package/lib/DedicatedSession.d.ts +152 -0
- package/lib/DedicatedSession.js +173 -0
- package/lib/DualTransport.d.ts +112 -0
- package/lib/DualTransport.js +197 -0
- package/lib/GameServer.d.ts +64 -0
- package/lib/GameServer.js +647 -0
- package/lib/GameServerConfig.d.ts +387 -0
- package/lib/GameServerConfig.js +1059 -0
- package/lib/GameServerLobbyRoom.d.ts +33 -0
- package/lib/GameServerLobbyRoom.js +56 -0
- package/lib/GameServerLogger.d.ts +111 -0
- package/lib/GameServerLogger.js +190 -0
- package/lib/GameServerMetrics.d.ts +158 -0
- package/lib/GameServerMetrics.js +276 -0
- package/lib/GameServerState.d.ts +164 -0
- package/lib/GameServerState.js +26 -0
- package/lib/HeadlessRuntime.d.ts +316 -0
- package/lib/HeadlessRuntime.js +380 -0
- package/lib/JoinGate.d.ts +34 -0
- package/lib/JoinGate.js +221 -0
- package/lib/NetworkAddresses.d.ts +33 -0
- package/lib/NetworkAddresses.js +90 -0
- package/lib/PlayerTokens.d.ts +17 -0
- package/lib/PlayerTokens.js +24 -0
- package/lib/RoomServerTransport.d.ts +73 -0
- package/lib/RoomServerTransport.js +90 -0
- package/lib/ServerEndpoints.d.ts +133 -0
- package/lib/ServerEndpoints.js +247 -0
- package/lib/ServerInit.d.ts +28 -0
- package/lib/ServerInit.js +113 -0
- package/lib/SessionRoom.d.ts +391 -0
- package/lib/SessionRoom.js +930 -0
- package/lib/TlsCertificates.d.ts +35 -0
- package/lib/TlsCertificates.js +130 -0
- package/lib/admin/AccountRoutes.d.ts +8 -0
- package/lib/admin/AccountRoutes.js +502 -0
- package/lib/admin/AdminAccounts.d.ts +329 -0
- package/lib/admin/AdminAccounts.js +607 -0
- package/lib/admin/AdminApiRouter.d.ts +202 -0
- package/lib/admin/AdminApiRouter.js +465 -0
- package/lib/admin/AdminApiTypes.d.ts +1782 -0
- package/lib/admin/AdminApiTypes.js +4 -0
- package/lib/admin/AdminAudit.d.ts +113 -0
- package/lib/admin/AdminAudit.js +266 -0
- package/lib/admin/AdminCli.d.ts +7 -0
- package/lib/admin/AdminCli.js +351 -0
- package/lib/admin/AdminClock.d.ts +51 -0
- package/lib/admin/AdminClock.js +10 -0
- package/lib/admin/AdminConsole.d.ts +39 -0
- package/lib/admin/AdminConsole.js +325 -0
- package/lib/admin/AdminConstants.d.ts +147 -0
- package/lib/admin/AdminConstants.js +167 -0
- package/lib/admin/AdminCrypto.d.ts +19 -0
- package/lib/admin/AdminCrypto.js +29 -0
- package/lib/admin/AdminExtensionsHost.d.ts +176 -0
- package/lib/admin/AdminExtensionsHost.js +307 -0
- package/lib/admin/AdminPasswords.d.ts +33 -0
- package/lib/admin/AdminPasswords.js +92 -0
- package/lib/admin/AdminPermissions.d.ts +28 -0
- package/lib/admin/AdminPermissions.js +74 -0
- package/lib/admin/AdminRecords.d.ts +196 -0
- package/lib/admin/AdminRecords.js +3 -0
- package/lib/admin/AdminRequestBodies.d.ts +47 -0
- package/lib/admin/AdminRequestBodies.js +84 -0
- package/lib/admin/AdminRequestGate.d.ts +38 -0
- package/lib/admin/AdminRequestGate.js +59 -0
- package/lib/admin/AdminResponses.d.ts +103 -0
- package/lib/admin/AdminResponses.js +164 -0
- package/lib/admin/AdminServices.d.ts +99 -0
- package/lib/admin/AdminServices.js +4 -0
- package/lib/admin/AdminStaticFiles.d.ts +29 -0
- package/lib/admin/AdminStaticFiles.js +97 -0
- package/lib/admin/AdminStore.d.ts +152 -0
- package/lib/admin/AdminStore.js +46 -0
- package/lib/admin/AlertChannels.d.ts +43 -0
- package/lib/admin/AlertChannels.js +120 -0
- package/lib/admin/AlertEngine.d.ts +231 -0
- package/lib/admin/AlertEngine.js +681 -0
- package/lib/admin/AlertRoutes.d.ts +8 -0
- package/lib/admin/AlertRoutes.js +180 -0
- package/lib/admin/ApiKeyRoutes.d.ts +8 -0
- package/lib/admin/ApiKeyRoutes.js +53 -0
- package/lib/admin/ApiKeys.d.ts +63 -0
- package/lib/admin/ApiKeys.js +167 -0
- package/lib/admin/AuditRoutes.d.ts +8 -0
- package/lib/admin/AuditRoutes.js +106 -0
- package/lib/admin/AuthToolRoutes.d.ts +13 -0
- package/lib/admin/AuthToolRoutes.js +164 -0
- package/lib/admin/BanList.d.ts +87 -0
- package/lib/admin/BanList.js +152 -0
- package/lib/admin/CborDecoder.d.ts +18 -0
- package/lib/admin/CborDecoder.js +201 -0
- package/lib/admin/ColyseusCloudClient.d.ts +313 -0
- package/lib/admin/ColyseusCloudClient.js +272 -0
- package/lib/admin/ColyseusCloudRoutes.d.ts +8 -0
- package/lib/admin/ColyseusCloudRoutes.js +91 -0
- package/lib/admin/ColyseusCloudService.d.ts +180 -0
- package/lib/admin/ColyseusCloudService.js +476 -0
- package/lib/admin/ColyseusCloudSettings.d.ts +16 -0
- package/lib/admin/ColyseusCloudSettings.js +29 -0
- package/lib/admin/ColyseusCloudViews.d.ts +105 -0
- package/lib/admin/ColyseusCloudViews.js +371 -0
- package/lib/admin/CommonPasswords.d.ts +6 -0
- package/lib/admin/CommonPasswords.js +19 -0
- package/lib/admin/ConfigOverrides.d.ts +174 -0
- package/lib/admin/ConfigOverrides.js +406 -0
- package/lib/admin/ConfigRoutes.d.ts +8 -0
- package/lib/admin/ConfigRoutes.js +91 -0
- package/lib/admin/ConsoleSessions.d.ts +112 -0
- package/lib/admin/ConsoleSessions.js +201 -0
- package/lib/admin/DedicatedRoutes.d.ts +21 -0
- package/lib/admin/DedicatedRoutes.js +254 -0
- package/lib/admin/ExtensionRoutes.d.ts +8 -0
- package/lib/admin/ExtensionRoutes.js +145 -0
- package/lib/admin/FileAdminStore.d.ts +157 -0
- package/lib/admin/FileAdminStore.js +349 -0
- package/lib/admin/FleetDirectory.d.ts +323 -0
- package/lib/admin/FleetDirectory.js +489 -0
- package/lib/admin/FleetLeader.d.ts +43 -0
- package/lib/admin/FleetLeader.js +89 -0
- package/lib/admin/FleetRoutes.d.ts +55 -0
- package/lib/admin/FleetRoutes.js +465 -0
- package/lib/admin/HealthWarnings.d.ts +10 -0
- package/lib/admin/HealthWarnings.js +95 -0
- package/lib/admin/LeaderboardRoutes.d.ts +8 -0
- package/lib/admin/LeaderboardRoutes.js +569 -0
- package/lib/admin/LogBuffer.d.ts +60 -0
- package/lib/admin/LogBuffer.js +92 -0
- package/lib/admin/LogRedaction.d.ts +15 -0
- package/lib/admin/LogRedaction.js +72 -0
- package/lib/admin/LogRoutes.d.ts +45 -0
- package/lib/admin/LogRoutes.js +307 -0
- package/lib/admin/MaintenanceMode.d.ts +41 -0
- package/lib/admin/MaintenanceMode.js +74 -0
- package/lib/admin/MaintenanceWindows.d.ts +91 -0
- package/lib/admin/MaintenanceWindows.js +207 -0
- package/lib/admin/MetricsRoutes.d.ts +8 -0
- package/lib/admin/MetricsRoutes.js +209 -0
- package/lib/admin/MetricsSampler.d.ts +124 -0
- package/lib/admin/MetricsSampler.js +211 -0
- package/lib/admin/OneTimeCodes.d.ts +60 -0
- package/lib/admin/OneTimeCodes.js +162 -0
- package/lib/admin/OpenIdConnect.d.ts +146 -0
- package/lib/admin/OpenIdConnect.js +335 -0
- package/lib/admin/Passkeys.d.ts +130 -0
- package/lib/admin/Passkeys.js +432 -0
- package/lib/admin/PlayerRoutes.d.ts +20 -0
- package/lib/admin/PlayerRoutes.js +676 -0
- package/lib/admin/RedisAdminStore.d.ts +114 -0
- package/lib/admin/RedisAdminStore.js +258 -0
- package/lib/admin/RolloutCoordinator.d.ts +99 -0
- package/lib/admin/RolloutCoordinator.js +321 -0
- package/lib/admin/ServerEvents.d.ts +57 -0
- package/lib/admin/ServerEvents.js +89 -0
- package/lib/admin/SessionRoutes.d.ts +113 -0
- package/lib/admin/SessionRoutes.js +386 -0
- package/lib/admin/UserRoutes.d.ts +8 -0
- package/lib/admin/UserRoutes.js +214 -0
- package/lib/cli.d.ts +2 -0
- package/lib/cli.js +221 -0
- package/lib/console/assets/index-CI5N7c-T.js +21 -0
- package/lib/console/assets/index-DPitvzLp.css +1 -0
- package/lib/console/favicon.svg +1 -0
- package/lib/console/index.html +16 -0
- package/lib/discord/DiscordOAuth.d.ts +57 -0
- package/lib/discord/DiscordOAuth.js +127 -0
- package/lib/discord/DiscordSessions.d.ts +79 -0
- package/lib/discord/DiscordSessions.js +135 -0
- package/lib/discord/DiscordSignInConstants.d.ts +54 -0
- package/lib/discord/DiscordSignInConstants.js +55 -0
- package/lib/discord/DiscordSignInRoutes.d.ts +51 -0
- package/lib/discord/DiscordSignInRoutes.js +359 -0
- package/lib/index.d.ts +24 -0
- package/lib/index.js +18 -0
- package/lib/leaderboards/FileLeaderboardRankStore.d.ts +293 -0
- package/lib/leaderboards/FileLeaderboardRankStore.js +808 -0
- package/lib/leaderboards/LeaderboardConstants.d.ts +63 -0
- package/lib/leaderboards/LeaderboardConstants.js +70 -0
- package/lib/leaderboards/LeaderboardError.d.ts +15 -0
- package/lib/leaderboards/LeaderboardError.js +20 -0
- package/lib/leaderboards/LeaderboardIdentity.d.ts +44 -0
- package/lib/leaderboards/LeaderboardIdentity.js +72 -0
- package/lib/leaderboards/LeaderboardPublicApi.d.ts +17 -0
- package/lib/leaderboards/LeaderboardPublicApi.js +389 -0
- package/lib/leaderboards/LeaderboardRankStore.d.ts +296 -0
- package/lib/leaderboards/LeaderboardRankStore.js +18 -0
- package/lib/leaderboards/LeaderboardRules.d.ts +122 -0
- package/lib/leaderboards/LeaderboardRules.js +472 -0
- package/lib/leaderboards/LeaderboardScheduler.d.ts +43 -0
- package/lib/leaderboards/LeaderboardScheduler.js +103 -0
- package/lib/leaderboards/LeaderboardService.d.ts +669 -0
- package/lib/leaderboards/LeaderboardService.js +1667 -0
- package/lib/leaderboards/LeaderboardTransfer.d.ts +35 -0
- package/lib/leaderboards/LeaderboardTransfer.js +580 -0
- package/lib/leaderboards/RedisLeaderboardRankStore.d.ts +282 -0
- package/lib/leaderboards/RedisLeaderboardRankStore.js +691 -0
- package/package.json +64 -4
- package/templates/init/Caddyfile +6 -0
- package/templates/init/DEPLOY.md +233 -0
- package/templates/init/Dockerfile +12 -0
- package/templates/init/app.json +21 -0
- package/templates/init/aws/README.md +118 -0
- package/templates/init/aws/ecs-fargate-alb.yml +207 -0
- package/templates/init/aws/ecs-fargate-nlb-quic.yml +210 -0
- package/templates/init/babylon-game-server.config.mjs +158 -0
- package/templates/init/colyseus-cloud/README.md +133 -0
- package/templates/init/colyseus-cloud/babylon-game-server.config.mjs +36 -0
- package/templates/init/colyseus-cloud/ecosystem.config.cjs +35 -0
- package/templates/init/colyseus-cloud/gitignore +6 -0
- package/templates/init/colyseus-cloud/package.json +15 -0
- package/templates/init/digitalocean-app.yaml +30 -0
- package/templates/init/docker-compose.full.yml +45 -0
- package/templates/init/docker-compose.websocket.yml +41 -0
- package/templates/init/fly.toml +56 -0
- package/templates/init/heroku.yml +11 -0
- package/templates/init/kubernetes/deployment.yaml +71 -0
- package/templates/init/kubernetes/redis.yaml +73 -0
- package/templates/init/kubernetes/service.yaml +24 -0
- package/templates/init/monitoring/grafana-dashboard.json +539 -0
- package/templates/init/monitoring/prometheus-alerts.yml +51 -0
- package/templates/init/monitoring/prometheus-scrape.yml +17 -0
- package/templates/init/railway.json +13 -0
- package/templates/init/render.yaml +19 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** What `writeRecipes` did with each file of the starter folder. */
|
|
2
|
+
export interface InitResult {
|
|
3
|
+
/** Absolute paths of the files written. */
|
|
4
|
+
written: string[];
|
|
5
|
+
/** Absolute paths of the files left alone because they already existed (no `force`). */
|
|
6
|
+
skipped: string[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The version of this package (the banner, and the image tag the recipes pin).
|
|
10
|
+
* @returns The version from package.json.
|
|
11
|
+
*/
|
|
12
|
+
export declare function readPackageVersion(): string;
|
|
13
|
+
/**
|
|
14
|
+
* Writes the starter folder of `babylon-game-server init`: every file under `templates/init/` (relative paths kept,
|
|
15
|
+
* except the renames in TEMPLATE_FILE_NAMES, and `{{version}}` replaced with the package version) plus a `.env.example`
|
|
16
|
+
* generated from CONFIG_OPTIONS (D3, D27).
|
|
17
|
+
* TLS, UDP and auth are disabled in everything it writes (D2).
|
|
18
|
+
* @param targetFolder The folder to write into (created when missing).
|
|
19
|
+
* @param force True to overwrite files that already exist; otherwise they are skipped.
|
|
20
|
+
* @returns The files written and the files skipped, as absolute paths.
|
|
21
|
+
*/
|
|
22
|
+
export declare function writeRecipes(targetFolder: string, force: boolean): Promise<InitResult>;
|
|
23
|
+
/**
|
|
24
|
+
* The text of `.env.example`: one `# <description>` line and one `GAME_SERVER_<…>=<default>` line per option. Secrets
|
|
25
|
+
* and unset (null) options are left empty, so nothing secret or misleading is ever suggested.
|
|
26
|
+
* @returns The file text.
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildEnvironmentExample(): string;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { mkdir, readdir, writeFile } from "node:fs/promises";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { CONFIG_OPTIONS, DEFAULT_GAME_SERVER_CONFIG, readPath } from "./GameServerConfig.js";
|
|
6
|
+
/** The recipe templates shipped with the package (`templates/init/`, D27). */
|
|
7
|
+
const TEMPLATE_FOLDER = fileURLToPath(new URL("../templates/init/", import.meta.url));
|
|
8
|
+
/** The package manifest, read for the version stamped into the recipes. */
|
|
9
|
+
const PACKAGE_MANIFEST_URL = new URL("../package.json", import.meta.url);
|
|
10
|
+
/** The placeholder every template uses for the package (and image) version. */
|
|
11
|
+
const VERSION_PLACEHOLDER = /\{\{version\}\}/g;
|
|
12
|
+
/** The generated environment file name. */
|
|
13
|
+
const ENVIRONMENT_EXAMPLE_FILE = ".env.example";
|
|
14
|
+
/** Separator of list values in an environment variable. */
|
|
15
|
+
const LIST_SEPARATOR = ",";
|
|
16
|
+
/**
|
|
17
|
+
* Templates written under another name, keyed by their path under `templates/init/`. npm drops a real `.gitignore`
|
|
18
|
+
* from a published package, so that template ships as `gitignore`.
|
|
19
|
+
*/
|
|
20
|
+
const TEMPLATE_FILE_NAMES = new Map([
|
|
21
|
+
[path.join("colyseus-cloud", "gitignore"), path.join("colyseus-cloud", ".gitignore")]
|
|
22
|
+
]);
|
|
23
|
+
/**
|
|
24
|
+
* The version of this package (the banner, and the image tag the recipes pin).
|
|
25
|
+
* @returns The version from package.json.
|
|
26
|
+
*/
|
|
27
|
+
export function readPackageVersion() {
|
|
28
|
+
const packageJson = JSON.parse(readFileSync(PACKAGE_MANIFEST_URL, "utf8"));
|
|
29
|
+
return packageJson.version;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Writes the starter folder of `babylon-game-server init`: every file under `templates/init/` (relative paths kept,
|
|
33
|
+
* except the renames in TEMPLATE_FILE_NAMES, and `{{version}}` replaced with the package version) plus a `.env.example`
|
|
34
|
+
* generated from CONFIG_OPTIONS (D3, D27).
|
|
35
|
+
* TLS, UDP and auth are disabled in everything it writes (D2).
|
|
36
|
+
* @param targetFolder The folder to write into (created when missing).
|
|
37
|
+
* @param force True to overwrite files that already exist; otherwise they are skipped.
|
|
38
|
+
* @returns The files written and the files skipped, as absolute paths.
|
|
39
|
+
*/
|
|
40
|
+
export async function writeRecipes(targetFolder, force) {
|
|
41
|
+
const result = { written: [], skipped: [] };
|
|
42
|
+
const absoluteTarget = path.resolve(targetFolder);
|
|
43
|
+
const version = readPackageVersion();
|
|
44
|
+
const templatePaths = await listTemplateFiles(TEMPLATE_FOLDER);
|
|
45
|
+
for (const relativePath of templatePaths) {
|
|
46
|
+
const templateText = readFileSync(path.join(TEMPLATE_FOLDER, relativePath), "utf8");
|
|
47
|
+
const writtenPath = TEMPLATE_FILE_NAMES.get(relativePath) ?? relativePath;
|
|
48
|
+
await writeRecipeFile(path.join(absoluteTarget, writtenPath), templateText.replace(VERSION_PLACEHOLDER, version), force, result);
|
|
49
|
+
}
|
|
50
|
+
await writeRecipeFile(path.join(absoluteTarget, ENVIRONMENT_EXAMPLE_FILE), buildEnvironmentExample(), force, result);
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The text of `.env.example`: one `# <description>` line and one `GAME_SERVER_<…>=<default>` line per option. Secrets
|
|
55
|
+
* and unset (null) options are left empty, so nothing secret or misleading is ever suggested.
|
|
56
|
+
* @returns The file text.
|
|
57
|
+
*/
|
|
58
|
+
export function buildEnvironmentExample() {
|
|
59
|
+
const lines = [
|
|
60
|
+
"# Babylon Game Server environment variables (every option; generated from CONFIG_OPTIONS).",
|
|
61
|
+
"# Precedence: defaults < Colyseus Cloud's defaults (on that host only) < config file < environment < command-line flags. Unset variables keep the default.",
|
|
62
|
+
""
|
|
63
|
+
];
|
|
64
|
+
for (const definition of CONFIG_OPTIONS) {
|
|
65
|
+
lines.push("# " + definition.description);
|
|
66
|
+
lines.push(definition.environmentVariable + "=" + exampleValue(definition));
|
|
67
|
+
lines.push("");
|
|
68
|
+
}
|
|
69
|
+
return lines.join("\n");
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The value `.env.example` shows for an option: its default, or empty for secrets and nulls.
|
|
73
|
+
* @param definition The option.
|
|
74
|
+
* @returns The text after `=`.
|
|
75
|
+
*/
|
|
76
|
+
function exampleValue(definition) {
|
|
77
|
+
if (definition.isSecret)
|
|
78
|
+
return "";
|
|
79
|
+
const defaultValue = readPath(DEFAULT_GAME_SERVER_CONFIG, definition.path);
|
|
80
|
+
if (defaultValue == null)
|
|
81
|
+
return "";
|
|
82
|
+
if (Array.isArray(defaultValue))
|
|
83
|
+
return defaultValue.join(LIST_SEPARATOR);
|
|
84
|
+
return String(defaultValue);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Writes one recipe file, or records it as skipped when it exists and `force` is off.
|
|
88
|
+
* @param filePath Absolute path of the file.
|
|
89
|
+
* @param text The file text.
|
|
90
|
+
* @param force True to overwrite an existing file.
|
|
91
|
+
* @param result The result the file is recorded in.
|
|
92
|
+
*/
|
|
93
|
+
async function writeRecipeFile(filePath, text, force, result) {
|
|
94
|
+
if (existsSync(filePath) && !force) {
|
|
95
|
+
result.skipped.push(filePath);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
await mkdir(path.dirname(filePath), { recursive: true });
|
|
99
|
+
await writeFile(filePath, text);
|
|
100
|
+
result.written.push(filePath);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Lists every file under a folder, as paths relative to it, sorted so the output order is stable.
|
|
104
|
+
* @param folder The folder.
|
|
105
|
+
* @returns The relative file paths.
|
|
106
|
+
*/
|
|
107
|
+
async function listTemplateFiles(folder) {
|
|
108
|
+
const entries = await readdir(folder, { recursive: true, withFileTypes: true });
|
|
109
|
+
const files = entries
|
|
110
|
+
.filter((entry) => entry.isFile())
|
|
111
|
+
.map((entry) => path.relative(folder, path.join(entry.parentPath, entry.name)));
|
|
112
|
+
return files.sort();
|
|
113
|
+
}
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import { Room, type AuthContext, type Client } from "colyseus";
|
|
2
|
+
import { type DedicatedRoomOptions } from "./DedicatedSession.js";
|
|
3
|
+
import type { DiscordSessionPlayerView } from "./discord/DiscordSignInRoutes.js";
|
|
4
|
+
import { type FusionConnectRequest } from "./HeadlessRuntime.js";
|
|
5
|
+
import { type JoinGateResult } from "./JoinGate.js";
|
|
6
|
+
import type { AdminNoticePayload, DedicatedRestartOptions, SessionDetailView, SessionInspectorView, SessionSummaryView } from "./admin/AdminApiTypes.js";
|
|
7
|
+
/** What a session room is created with: a joiner's request (the creator's join options), or DedicatedRoomOptions. */
|
|
8
|
+
type SessionCreateOptions = Partial<DedicatedRoomOptions> & Partial<FusionConnectRequest>;
|
|
9
|
+
/**
|
|
10
|
+
* The Colyseus room of one network session ("fusion_session", D10). It hosts TOOLKIT.FusionSessionLogic, the same class
|
|
11
|
+
* the in-process LoopbackHub runs: the room only carries bytes and control messages between the sockets and the logic.
|
|
12
|
+
* Client-to-room frames arrive as bytes type FUSION_BYTES_TO_ROOM; room-to-client frames leave as FUSION_BYTES_FROM_ROOM
|
|
13
|
+
* prefixed with their source player (D11). Unreliable frames travel as WebTransport datagrams (FUSION_UNRELIABLE_TO_ROOM /
|
|
14
|
+
* FUSION_UNRELIABLE_FROM_ROOM) when the client is on WebTransport, else on the same reliable bytes messages (D7).
|
|
15
|
+
*/
|
|
16
|
+
export declare class SessionRoom extends Room {
|
|
17
|
+
/** The runtime's TOOLKIT namespace (Babylon Toolkit Networking). */
|
|
18
|
+
private toolkit;
|
|
19
|
+
/** The session rules. */
|
|
20
|
+
private logic;
|
|
21
|
+
/** Seats by client session id, for reconnects. */
|
|
22
|
+
private readonly seats;
|
|
23
|
+
/** The headless Server-mode session a dedicated room runs, or null (T13). */
|
|
24
|
+
private dedicatedSession;
|
|
25
|
+
/** True for a room that runs a headless Server-mode runner (DedicatedSession). */
|
|
26
|
+
private hostsDedicatedRunner;
|
|
27
|
+
/** The game server this room belongs to (limits, hooks, metrics). */
|
|
28
|
+
private serverState;
|
|
29
|
+
/** The session name, for hooks and logs. */
|
|
30
|
+
private sessionName;
|
|
31
|
+
/** The TOOLKIT.GameMode of the joiner that created the session, or null. */
|
|
32
|
+
private creatorGameMode;
|
|
33
|
+
/** Seconds an on-demand room stays open empty, or null for every other room (they never idle-close, D19). */
|
|
34
|
+
private idleSeconds;
|
|
35
|
+
/** The configured scene an on-demand room runs, for logs. */
|
|
36
|
+
private onDemandSceneName;
|
|
37
|
+
/** The scene a dedicated room runs (its configured name, else its scene file), or null for other rooms. */
|
|
38
|
+
private dedicatedSceneName;
|
|
39
|
+
/** Who started this room's dedicated runner (game-server-admin-console T9). */
|
|
40
|
+
private dedicatedStartedBy;
|
|
41
|
+
/** The pending idle close of an empty on-demand room, or null. */
|
|
42
|
+
private idleTimer;
|
|
43
|
+
/** Settles once an on-demand room's runner has loaded (rejects when it failed), or null for other rooms. */
|
|
44
|
+
private dedicatedRunnerReady;
|
|
45
|
+
/** True once the room was disposed. */
|
|
46
|
+
private isDisposed;
|
|
47
|
+
/** ISO time the room was created. */
|
|
48
|
+
private createdAt;
|
|
49
|
+
/** The last session description the logic published, or null before the first. */
|
|
50
|
+
private lastSessionInfo;
|
|
51
|
+
/** Frame totals since creation (counted whether or not metrics are on). */
|
|
52
|
+
private readonly traffic;
|
|
53
|
+
/** Start of the current traffic window, in performance.now() milliseconds. */
|
|
54
|
+
private trafficWindowStartedAt;
|
|
55
|
+
/** Total bytes at the start of the current traffic window. */
|
|
56
|
+
private trafficWindowBytes;
|
|
57
|
+
/** Bytes per second over the last full ROOM_TRAFFIC_WINDOW_MS. */
|
|
58
|
+
private bytesPerSecond;
|
|
59
|
+
/** Host migrations seen in updateSession (logic.isMigratingHost turning false). */
|
|
60
|
+
private readonly hostMigrationLog;
|
|
61
|
+
/** The host seen while no migration ran, or null. */
|
|
62
|
+
private lastHostPlayerId;
|
|
63
|
+
/** Whether a host migration was running at the last update. */
|
|
64
|
+
private wasMigratingHost;
|
|
65
|
+
/** True when a dedicated Server-mode runner hosts this session. */
|
|
66
|
+
get isDedicated(): boolean;
|
|
67
|
+
/** The session's TOOLKIT.GameMode name ("Shared", "Host", "Server", …), or "Pending" before its first join. */
|
|
68
|
+
get gameModeName(): string;
|
|
69
|
+
/** Clients connected to the room now. */
|
|
70
|
+
get playerCount(): number;
|
|
71
|
+
/**
|
|
72
|
+
* The join gate of sessions (D10): runs at matchmaking, before a seat is reserved.
|
|
73
|
+
* @param token The bearer token the client sent.
|
|
74
|
+
* @param options The join request.
|
|
75
|
+
* @param context Colyseus' matchmaking context.
|
|
76
|
+
* @returns The identity and client address, stored as client.auth.
|
|
77
|
+
* @throws ServerError when the gate refuses the join.
|
|
78
|
+
*/
|
|
79
|
+
static onAuth(token: string, options: FusionConnectRequest, context: AuthContext): Promise<JoinGateResult>;
|
|
80
|
+
/**
|
|
81
|
+
* Creates the session logic and wires the message handlers. The first join creates the session itself (A10); a room
|
|
82
|
+
* created with `dedicated` (DedicatedSession.start) runs a headless Server-mode runner first, and stays open while
|
|
83
|
+
* empty. A Client-mode join naming a configured on-demand scene (NETWORK_DEDICATED_SCENE_PROPERTY) starts that
|
|
84
|
+
* scene's dedicated runner here, and the room closes once it has been empty for the scene's idleSeconds (D19).
|
|
85
|
+
* @param options The creation options: a joiner's request, or DedicatedRoomOptions.
|
|
86
|
+
* @throws ServerError(503, "MaxCcuReached: …") when the process already hosts limits.maxSessions sessions, or
|
|
87
|
+
* limits.maxDedicatedSessions dedicated ones.
|
|
88
|
+
* @throws ServerError(404, "GameNotFound: …") when a Client join names a scene that is not configured for on demand.
|
|
89
|
+
*/
|
|
90
|
+
onCreate(options?: SessionCreateOptions): Promise<void>;
|
|
91
|
+
/** Stops a dedicated room's server runner with the room, and leaves the server's live sessions. */
|
|
92
|
+
onDispose(): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Admits a client through the session logic (A10). The requested player count is clamped to the server's cap and the
|
|
95
|
+
* identity is always the one the gate verified, never a client-sent value (D12, D14). A join of an on-demand room waits
|
|
96
|
+
* until its dedicated runner has loaded.
|
|
97
|
+
* @param client The joining client.
|
|
98
|
+
* @param options Its join request.
|
|
99
|
+
* @throws ServerError with JOIN_REFUSED_CODE and the ShutdownReason name when the session refuses the join.
|
|
100
|
+
* @throws ServerError(503, "GameNotFound: …") when the on-demand scene failed to load.
|
|
101
|
+
*/
|
|
102
|
+
onJoin(client: Client, options: FusionConnectRequest): Promise<void>;
|
|
103
|
+
/**
|
|
104
|
+
* Ends the session at the end of a drain (D17): every client is told GameClosed (FUSION_CONTROL_SHUTDOWN), then the
|
|
105
|
+
* room disconnects them with CloseCode.SERVER_SHUTDOWN.
|
|
106
|
+
*/
|
|
107
|
+
closeForShutdown(): Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* A client dropped without leaving: the logic holds its slot and the room keeps its seat for the grace period (D8).
|
|
110
|
+
* Colyseus also calls it for a join that onJoin refused; such a client has no seat and nothing to hold.
|
|
111
|
+
* @param client The dropped client.
|
|
112
|
+
*/
|
|
113
|
+
onDrop(client: Client): void;
|
|
114
|
+
/**
|
|
115
|
+
* A dropped client came back within the grace period: it resumes its player id.
|
|
116
|
+
* @param client The reconnected client.
|
|
117
|
+
*/
|
|
118
|
+
onReconnect(client: Client): void;
|
|
119
|
+
/**
|
|
120
|
+
* A client left for good (or its reconnect window closed).
|
|
121
|
+
* @param client The leaving client.
|
|
122
|
+
*/
|
|
123
|
+
onLeave(client: Client): void;
|
|
124
|
+
/**
|
|
125
|
+
* This session as a row of the admin session list (game-server-admin-console R18).
|
|
126
|
+
* @returns The row.
|
|
127
|
+
*/
|
|
128
|
+
adminSummary(): SessionSummaryView;
|
|
129
|
+
/**
|
|
130
|
+
* This session with its players for the admin session page (DR §6.6).
|
|
131
|
+
* @param includeAddresses False hides each player's address (callers without players.viewAddresses).
|
|
132
|
+
* @returns The session page.
|
|
133
|
+
*/
|
|
134
|
+
adminDescribe(includeAddresses: boolean): SessionDetailView;
|
|
135
|
+
/**
|
|
136
|
+
* The verified Discord players of this session (discord-sign-in D17): each seat whose identity is one of this
|
|
137
|
+
* server's Discord sessions. Typed names and other auth identities are left out.
|
|
138
|
+
* @returns The players, by player id.
|
|
139
|
+
*/
|
|
140
|
+
discordPlayers(): DiscordSessionPlayerView[];
|
|
141
|
+
/**
|
|
142
|
+
* The session's network objects (the inspector, spec 4): a dedicated runner's objects, or the object state a
|
|
143
|
+
* Shared-mode session stores for late joiners.
|
|
144
|
+
* @returns The objects, or available false with the reason.
|
|
145
|
+
*/
|
|
146
|
+
adminInspect(): SessionInspectorView;
|
|
147
|
+
/**
|
|
148
|
+
* Kicks a player (D12): it is told DisconnectedByPluginLogic with the admin's message, refused a fresh join to this
|
|
149
|
+
* session for KICK_REJOIN_BLOCK_SECONDS unless allowRejoin, and disconnected with CloseCode.CONSENTED, so no
|
|
150
|
+
* reconnect seat is held.
|
|
151
|
+
* @param playerId The player.
|
|
152
|
+
* @param message Shown to the player.
|
|
153
|
+
* @param allowRejoin True to let the player join again at once.
|
|
154
|
+
* @returns False when no connected player has that id.
|
|
155
|
+
*/
|
|
156
|
+
adminKickPlayer(playerId: number, message: string, allowRejoin: boolean): Promise<boolean>;
|
|
157
|
+
/**
|
|
158
|
+
* Closes the session from the console (D12): every player is told GameClosed with the admin's message, then the room
|
|
159
|
+
* disconnects them with CloseCode.SERVER_SHUTDOWN.
|
|
160
|
+
* @param message Shown to the players.
|
|
161
|
+
*/
|
|
162
|
+
adminClose(message: string): Promise<void>;
|
|
163
|
+
/**
|
|
164
|
+
* Locks or unlocks the session against new joins from the console.
|
|
165
|
+
* @param locked True to lock.
|
|
166
|
+
*/
|
|
167
|
+
adminSetLocked(locked: boolean): Promise<void>;
|
|
168
|
+
/**
|
|
169
|
+
* Sends a notice to one player or to everyone (FUSION_CONTROL_NOTICE, D13).
|
|
170
|
+
* @param notice The notice.
|
|
171
|
+
* @param playerId The player, or 0 for everyone.
|
|
172
|
+
* @returns How many connected players were targeted.
|
|
173
|
+
*/
|
|
174
|
+
adminSendNotice(notice: AdminNoticePayload, playerId: number): number;
|
|
175
|
+
/**
|
|
176
|
+
* Stops a dedicated session from the console (D23, R17): every player is told GameClosed with the admin's message,
|
|
177
|
+
* and the room disconnects on the next turn of the event loop, so this call's reply reaches the caller first.
|
|
178
|
+
* onDispose then stops the runner. Nothing restarts it by itself, boot sessions included (DR §9).
|
|
179
|
+
* @param message Shown to the players.
|
|
180
|
+
* @returns What a restart needs, or null when this room runs no dedicated runner (nothing is stopped).
|
|
181
|
+
*/
|
|
182
|
+
adminStopDedicated(message: string): DedicatedRestartOptions | null;
|
|
183
|
+
/**
|
|
184
|
+
* Disconnects the playing clients a new ban matches (D15): each is told ConnectionRefused with the message.
|
|
185
|
+
* @param userIds Banned user ids.
|
|
186
|
+
* @param addresses Banned addresses (concrete addresses of this room's clients; ranges are resolved by the caller).
|
|
187
|
+
* @param message Shown to the players.
|
|
188
|
+
* @returns How many clients were disconnected.
|
|
189
|
+
*/
|
|
190
|
+
adminDisconnectBanned(userIds: string[], addresses: string[], message: string): number;
|
|
191
|
+
/**
|
|
192
|
+
* Builds the session logic and its message handlers. A room created by DedicatedSession.start loads its headless
|
|
193
|
+
* runner before it is listed; an on-demand room starts loading and is listed at once, so concurrent joinOrCreate
|
|
194
|
+
* calls for the same session find this room instead of starting a second runner (Colyseus waits only about half a
|
|
195
|
+
* second for a concurrent create, less than a scene takes to load). Its joins wait for the runner in onJoin.
|
|
196
|
+
* @param options The creation options: a joiner's request, or DedicatedRoomOptions.
|
|
197
|
+
* @param onDemandOptions The runner options of an on-demand scene, or null.
|
|
198
|
+
*/
|
|
199
|
+
private createSession;
|
|
200
|
+
/**
|
|
201
|
+
* Loads an on-demand room's headless runner. A scene that fails to load is logged with its cause, the room is locked
|
|
202
|
+
* (a later join creates a fresh room and tries again) and it closes after its idle time (§Error policy).
|
|
203
|
+
* @param options The runner options from the registry.
|
|
204
|
+
* @throws ServerError(503, "GameNotFound: the dedicated scene <name> failed to load").
|
|
205
|
+
*/
|
|
206
|
+
private loadOnDemandRunner;
|
|
207
|
+
/**
|
|
208
|
+
* The dedicated room options of a Client-mode join that names an on-demand scene (D19), built from the registry entry,
|
|
209
|
+
* never from client-sent locations.
|
|
210
|
+
* @param options The creation options.
|
|
211
|
+
* @returns The options, or null when the join names no dedicated scene.
|
|
212
|
+
* @throws ServerError(404, "GameNotFound: …") when the scene is not configured, or not for on demand.
|
|
213
|
+
*/
|
|
214
|
+
private resolveOnDemandScene;
|
|
215
|
+
/**
|
|
216
|
+
* The newest buffered log lines of this room for its admin page (R18).
|
|
217
|
+
* @param includeAddresses False removes client addresses (callers without players.viewAddresses).
|
|
218
|
+
* @returns The lines, oldest first (none while the console is off).
|
|
219
|
+
*/
|
|
220
|
+
private recentLogLines;
|
|
221
|
+
/**
|
|
222
|
+
* Keeps a dedicated room's scene and starter for the console.
|
|
223
|
+
* @param options The dedicated room options.
|
|
224
|
+
*/
|
|
225
|
+
private rememberDedicatedScene;
|
|
226
|
+
/**
|
|
227
|
+
* The dedicated part of the session page (D23): the scene, who started it and the frame history (empty while an
|
|
228
|
+
* on-demand runner still loads).
|
|
229
|
+
* @returns The part, or null for a session without a dedicated runner.
|
|
230
|
+
*/
|
|
231
|
+
private describeDedicated;
|
|
232
|
+
/**
|
|
233
|
+
* Refuses another dedicated room once the process runs limits.maxDedicatedSessions of them (D14). This room is
|
|
234
|
+
* already in the live set, so only the others count.
|
|
235
|
+
* @throws ServerError(503, "MaxCcuReached: …").
|
|
236
|
+
*/
|
|
237
|
+
private checkDedicatedCap;
|
|
238
|
+
/**
|
|
239
|
+
* Closes an on-demand room after idleSeconds without clients (D19); a join before then cancels it (onJoin).
|
|
240
|
+
*/
|
|
241
|
+
private startIdleTimer;
|
|
242
|
+
/**
|
|
243
|
+
* Expires reconnect holds (A9). A room kept open for a host migration that ended with nobody left (the elected host
|
|
244
|
+
* never came back) closes.
|
|
245
|
+
*/
|
|
246
|
+
private updateSession;
|
|
247
|
+
/**
|
|
248
|
+
* Keeps the room open while a host migration waits for the restarted runners (they all leave and rejoin, D31); a
|
|
249
|
+
* dedicated room never closes by itself.
|
|
250
|
+
*/
|
|
251
|
+
private refreshAutoDispose;
|
|
252
|
+
/**
|
|
253
|
+
* Joins a client to the session logic, turning a refusal into a join error the client's join call rejects with.
|
|
254
|
+
* @param sessionId The client's session id.
|
|
255
|
+
* @param request The join request.
|
|
256
|
+
* @returns The welcome (the logic has already sent it to the client).
|
|
257
|
+
* @throws ServerError with JOIN_REFUSED_CODE and the ShutdownReason name.
|
|
258
|
+
*/
|
|
259
|
+
private admit;
|
|
260
|
+
/**
|
|
261
|
+
* Joins a new client to the session logic, counting a refusal in the metrics by its ShutdownReason name.
|
|
262
|
+
* @param sessionId The client's session id.
|
|
263
|
+
* @param request The join request.
|
|
264
|
+
* @returns The welcome.
|
|
265
|
+
* @throws ServerError with JOIN_REFUSED_CODE and the ShutdownReason name.
|
|
266
|
+
*/
|
|
267
|
+
private admitCounted;
|
|
268
|
+
/**
|
|
269
|
+
* Forwards a client's session control message (fusion:*) to the session logic; other message types are ignored.
|
|
270
|
+
* @param client The sending client.
|
|
271
|
+
* @param type The message type.
|
|
272
|
+
* @param payload The payload.
|
|
273
|
+
*/
|
|
274
|
+
private receiveControl;
|
|
275
|
+
/**
|
|
276
|
+
* The session logic's outputs, bound to this room's clients and listing.
|
|
277
|
+
* @returns The outputs.
|
|
278
|
+
*/
|
|
279
|
+
private createOutputs;
|
|
280
|
+
/**
|
|
281
|
+
* Passes a client's frame to the session logic on the channel it arrived on (D7), counting it.
|
|
282
|
+
* @param client The sending client.
|
|
283
|
+
* @param payload The envelope (route byte + uint16 target + frame).
|
|
284
|
+
* @param channel The TOOLKIT.RpcChannel it arrived on.
|
|
285
|
+
*/
|
|
286
|
+
private receiveFrame;
|
|
287
|
+
/**
|
|
288
|
+
* Sends a frame to one client, prefixed with its source player (D11). An Unreliable frame goes as a WebTransport
|
|
289
|
+
* datagram when the client has one and the prefixed frame fits NETWORK_MAX_UNRELIABLE_FRAME_BYTES; every other frame
|
|
290
|
+
* uses the reliable bytes message (D7).
|
|
291
|
+
* @param clientKey The receiving client's session id.
|
|
292
|
+
* @param sourcePlayerId The sending player.
|
|
293
|
+
* @param frame The frame.
|
|
294
|
+
* @param channel The TOOLKIT.RpcChannel the frame was sent on (default Reliable).
|
|
295
|
+
*/
|
|
296
|
+
private sendFrameTo;
|
|
297
|
+
/**
|
|
298
|
+
* Counts one frame in the server metrics, when they are on (D16).
|
|
299
|
+
* @param direction "in" from the client, "out" to it.
|
|
300
|
+
* @param client The client.
|
|
301
|
+
* @param channel The TOOLKIT.RpcChannel it travels on.
|
|
302
|
+
* @param byteLength The frame size in bytes.
|
|
303
|
+
*/
|
|
304
|
+
private countFrame;
|
|
305
|
+
/**
|
|
306
|
+
* Sends a control message to one client.
|
|
307
|
+
* @param clientKey The receiving client's session id.
|
|
308
|
+
* @param name The control message name.
|
|
309
|
+
* @param payload The payload.
|
|
310
|
+
*/
|
|
311
|
+
private sendControlTo;
|
|
312
|
+
/**
|
|
313
|
+
* Publishes the session description to the lobby listing: metadata, visibility and capacity in one update. The
|
|
314
|
+
* metadata keeps the sessionName filter value: Colyseus matches filterBy fields against the listing's metadata, which
|
|
315
|
+
* setMatchmaking replaces rather than merges.
|
|
316
|
+
* @param session The description.
|
|
317
|
+
*/
|
|
318
|
+
private publishSession;
|
|
319
|
+
/**
|
|
320
|
+
* Locks or unlocks the room against new joins (full or closed sessions).
|
|
321
|
+
* @param locked True to lock.
|
|
322
|
+
*/
|
|
323
|
+
private setLocked;
|
|
324
|
+
/**
|
|
325
|
+
* Clamps a requested player count to limits.maxPlayersPerSession (D14).
|
|
326
|
+
* @param requestedPlayerCount The count the joiner asked for.
|
|
327
|
+
* @returns The count the session may use.
|
|
328
|
+
*/
|
|
329
|
+
private clampPlayerCount;
|
|
330
|
+
/**
|
|
331
|
+
* Measures the room's byte rate once per ROOM_TRAFFIC_WINDOW_MS (R18).
|
|
332
|
+
*/
|
|
333
|
+
private sampleTraffic;
|
|
334
|
+
/**
|
|
335
|
+
* Records a host migration when logic.isMigratingHost turns false with a different host than before (R18).
|
|
336
|
+
*/
|
|
337
|
+
private watchHostMigration;
|
|
338
|
+
/**
|
|
339
|
+
* The Host-mode host's player id.
|
|
340
|
+
* @returns The id, or null when no player is the host.
|
|
341
|
+
*/
|
|
342
|
+
private currentHostPlayerId;
|
|
343
|
+
/**
|
|
344
|
+
* The client session id of a player.
|
|
345
|
+
* @param playerId The player.
|
|
346
|
+
* @returns The session id, or null when no seat has that player.
|
|
347
|
+
*/
|
|
348
|
+
private sessionIdOfPlayer;
|
|
349
|
+
/**
|
|
350
|
+
* The players of the session page, from the seats and the logic's player list.
|
|
351
|
+
* @param includeAddresses False hides the addresses.
|
|
352
|
+
* @returns The players, by player id.
|
|
353
|
+
*/
|
|
354
|
+
private describePlayers;
|
|
355
|
+
/**
|
|
356
|
+
* Refuses a kicked player's fresh joins to this session (R19); a presence failure is logged and the kick goes on.
|
|
357
|
+
* @param seat The kicked player's seat.
|
|
358
|
+
*/
|
|
359
|
+
private blockRejoin;
|
|
360
|
+
/**
|
|
361
|
+
* Tells the admin console and the leaderboard service a player joined or left (player history and session presence,
|
|
362
|
+
* game-server-leaderboards D10).
|
|
363
|
+
* @param kind "joined" or "left".
|
|
364
|
+
* @param seat The player's seat.
|
|
365
|
+
*/
|
|
366
|
+
private reportPlayerSession;
|
|
367
|
+
/**
|
|
368
|
+
* This session's description for the hooks.
|
|
369
|
+
* @returns The event.
|
|
370
|
+
*/
|
|
371
|
+
private sessionEvent;
|
|
372
|
+
/**
|
|
373
|
+
* Calls a session hook, if the server has it.
|
|
374
|
+
* @param hookName The hook.
|
|
375
|
+
*/
|
|
376
|
+
private callSessionHook;
|
|
377
|
+
/**
|
|
378
|
+
* Calls a player hook, if the server has it.
|
|
379
|
+
* @param hookName The hook.
|
|
380
|
+
* @param playerId The player.
|
|
381
|
+
* @param identity The player's verified identity, or null.
|
|
382
|
+
*/
|
|
383
|
+
private callPlayerHook;
|
|
384
|
+
/**
|
|
385
|
+
* Runs a hook call; a hook that throws is logged with its name and the session carries on (§Error policy).
|
|
386
|
+
* @param hookName The hook, for the log.
|
|
387
|
+
* @param invoke Calls the hook on the server's hooks.
|
|
388
|
+
*/
|
|
389
|
+
private callHook;
|
|
390
|
+
}
|
|
391
|
+
export {};
|