@colyseus/monitor 0.16.0-preview.2 → 0.16.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.
- package/build/api.d.ts +1 -1
- package/build/api.js +95 -80
- package/build/api.js.map +7 -0
- package/build/api.mjs +68 -0
- package/build/api.mjs.map +7 -0
- package/build/ext/Room.js +62 -68
- package/build/ext/Room.js.map +7 -0
- package/build/ext/Room.mjs +72 -0
- package/build/ext/Room.mjs.map +7 -0
- package/build/index.d.ts +1 -1
- package/build/index.js +44 -18
- package/build/index.js.map +7 -0
- package/build/index.mjs +15 -0
- package/build/index.mjs.map +7 -0
- package/build/{static/build/frontend → src}/components/RoomList.d.ts +1 -0
- package/build/src/services.d.ts +3 -0
- package/build/{static/build → src-backend}/api.d.ts +1 -1
- package/build/{static/build → src-backend}/index.d.ts +1 -1
- package/build/static/bundle.js +24 -24
- package/build/static/bundle.js.map +1 -1
- package/build/static/styles.css +148 -137
- package/build/static/styles.css.map +1 -1
- package/build.mjs +90 -0
- package/package.json +10 -9
- package/src-backend/api.ts +84 -0
- package/src-backend/ext/Room.ts +67 -0
- package/src-backend/index.ts +31 -0
- package/tsconfig.json +5 -4
- package/webpack.config.js +2 -2
- package/build/static/build/frontend/services.d.ts +0 -5
- /package/build/{static/build/frontend → src}/App.d.ts +0 -0
- /package/build/{static/build/frontend → src}/components/CAppBar.d.ts +0 -0
- /package/build/{static/build/frontend → src}/components/RoomInspect.d.ts +0 -0
- /package/build/{static/build/frontend → src}/helpers/helpers.d.ts +0 -0
- /package/build/{static/build/frontend → src}/index.d.ts +0 -0
- /package/build/{static/build → src-backend}/ext/Room.d.ts +0 -0
package/build/index.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src-backend/index.ts
|
|
2
|
+
import express from "express";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import { getAPI } from "./api.mjs";
|
|
5
|
+
import "./ext/Room.mjs";
|
|
6
|
+
var frontendDirectory = path.resolve(__dirname, "..", "build", "static");
|
|
7
|
+
function monitor(opts = {}) {
|
|
8
|
+
const router = express.Router();
|
|
9
|
+
router.use(express.static(frontendDirectory));
|
|
10
|
+
router.use("/api", getAPI(opts));
|
|
11
|
+
return router;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
monitor
|
|
15
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src-backend/index.ts"],
|
|
4
|
+
"sourcesContent": ["import express from 'express';\nimport path from 'path';\n\nimport { getAPI } from './api.js';\nimport './ext/Room.js';\n\nconst frontendDirectory = path.resolve(__dirname, \"..\", \"build\", \"static\");\n\nexport interface MonitorOptions {\n columns: Array<\n 'roomId' |\n 'name' |\n 'clients' |\n 'maxClients' |\n 'locked' |\n 'elapsedTime' |\n { metadata: string } |\n 'processId' |\n \"publicAddress\"\n >\n}\n\n/**\n * TODO: expose the `router` instead on next major version.\n */\nexport function monitor (opts: Partial<MonitorOptions> = {}): express.Router {\n const router = express.Router();\n router.use(express.static(frontendDirectory));\n router.use('/api', getAPI(opts));\n return router;\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,OAAO,aAAa;AACpB,OAAO,UAAU;AAEjB,SAAS,cAAc;AACvB,OAAO;AAEP,IAAM,oBAAoB,KAAK,QAAQ,WAAW,MAAM,SAAS,QAAQ;AAmBlE,SAAS,QAAS,OAAgC,CAAC,GAAmB;AACzE,QAAM,SAAS,QAAQ,OAAO;AAC9B,SAAO,IAAI,QAAQ,OAAO,iBAAiB,CAAC;AAC5C,SAAO,IAAI,QAAQ,OAAO,IAAI,CAAC;AAC/B,SAAO;AACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -15,6 +15,7 @@ export declare class RoomList extends React.Component {
|
|
|
15
15
|
updateRoomListInterval: number;
|
|
16
16
|
isSelected: (index: any) => boolean;
|
|
17
17
|
componentWillMount(): void;
|
|
18
|
+
componentWillUnmount(): void;
|
|
18
19
|
fetchRoomList(): Promise<void>;
|
|
19
20
|
handleRowSelection: (selectedRows: any) => void;
|
|
20
21
|
inspectRoom(roomId: any): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MonitorOptions } from
|
|
1
|
+
import type { MonitorOptions } from './index.js';
|
|
2
2
|
export declare function getAPI(opts: Partial<MonitorOptions>): any;
|