@mml-io/3d-web-experience-server 0.21.2 → 0.21.3
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/index.js +16 -6
- package/build/index.js.map +3 -3
- package/package.json +14 -12
package/build/index.js
CHANGED
@@ -3,7 +3,8 @@ import fs from "fs";
|
|
3
3
|
import path from "path";
|
4
4
|
import url from "url";
|
5
5
|
import { EditableNetworkedDOM, LocalObservableDOMFactory } from "@mml-io/networked-dom-server";
|
6
|
-
import
|
6
|
+
import { watch } from "chokidar";
|
7
|
+
import micromatch from "micromatch";
|
7
8
|
var getMmlDocumentContent = (documentPath) => {
|
8
9
|
return fs.readFileSync(documentPath, { encoding: "utf8", flag: "r" });
|
9
10
|
};
|
@@ -34,11 +35,20 @@ var MMLDocumentsServer = class {
|
|
34
35
|
});
|
35
36
|
}
|
36
37
|
watch() {
|
37
|
-
this.watcher =
|
38
|
-
|
38
|
+
this.watcher = watch(this.directory, {
|
39
|
+
ignoreInitial: false,
|
40
|
+
ignored: (checkPath, stats) => {
|
41
|
+
if (!stats || !stats.isFile()) {
|
42
|
+
return false;
|
43
|
+
}
|
44
|
+
return !micromatch.isMatch(checkPath, this.watchPattern);
|
45
|
+
},
|
39
46
|
persistent: true
|
40
47
|
});
|
41
|
-
this.watcher.on("add", (fullPath) => {
|
48
|
+
this.watcher.on("add", (fullPath, stats) => {
|
49
|
+
if (!stats || !stats.isFile()) {
|
50
|
+
return;
|
51
|
+
}
|
42
52
|
const relativePath = path.relative(this.directory, fullPath);
|
43
53
|
console.log(`MML Document '${relativePath}' has been added`);
|
44
54
|
const contents = getMmlDocumentContent(fullPath);
|
@@ -93,10 +103,10 @@ import cors from "cors";
|
|
93
103
|
import express from "express";
|
94
104
|
|
95
105
|
// src/websocketDirectoryChangeListener.ts
|
96
|
-
import
|
106
|
+
import { watch as watch2 } from "chokidar";
|
97
107
|
function websocketDirectoryChangeListener(app, options) {
|
98
108
|
const listeningClients = /* @__PURE__ */ new Set();
|
99
|
-
|
109
|
+
watch2(options.directory).on("all", () => {
|
100
110
|
for (const client of listeningClients) {
|
101
111
|
client.send("change");
|
102
112
|
}
|
package/build/index.js.map
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../src/MMLDocumentsServer.ts", "../src/Networked3dWebExperienceServer.ts", "../src/websocketDirectoryChangeListener.ts"],
|
4
|
-
"sourcesContent": ["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport url from \"node:url\";\n\nimport { EditableNetworkedDOM, LocalObservableDOMFactory } from \"@mml-io/networked-dom-server\";\nimport chokidar, { FSWatcher } from \"chokidar\";\nimport WebSocket from \"ws\";\n\nconst getMmlDocumentContent = (documentPath: string) => {\n return fs.readFileSync(documentPath, { encoding: \"utf8\", flag: \"r\" });\n};\n\nexport class MMLDocumentsServer {\n private documents = new Map<\n string,\n {\n documentPath: string;\n document: EditableNetworkedDOM;\n }\n >();\n private watcher: FSWatcher;\n private watchPattern: string;\n\n constructor(\n private directory: string,\n watchPattern: string,\n ) {\n this.watchPattern = path.resolve(directory, watchPattern);\n this.watch();\n }\n\n public dispose() {\n for (const { document } of this.documents.values()) {\n document.dispose();\n }\n this.documents.clear();\n this.watcher.close();\n }\n\n public handle(filename: string, ws: WebSocket) {\n const document = this.documents.get(filename)?.document;\n if (!document) {\n ws.close();\n return;\n }\n\n document.addWebSocket(ws as any);\n ws.on(\"close\", () => {\n document.removeWebSocket(ws as any);\n });\n }\n\n private watch() {\n this.watcher = chokidar.watch(this.watchPattern, {\n ignored: /^\\./,\n persistent: true,\n });\n this.watcher\n .on(\"add\", (fullPath) => {\n const relativePath = path.relative(this.directory, fullPath);\n console.log(`MML Document '${relativePath}' has been added`);\n const contents = getMmlDocumentContent(fullPath);\n const document = new EditableNetworkedDOM(\n url.pathToFileURL(fullPath).toString(),\n LocalObservableDOMFactory,\n );\n document.load(contents);\n\n const currentData = {\n documentPath: fullPath,\n document,\n };\n this.documents.set(relativePath, currentData);\n })\n .on(\"change\", (fullPath) => {\n const relativePath = path.relative(this.directory, fullPath);\n console.log(`MML Document '${relativePath}' has been changed`);\n const contents = getMmlDocumentContent(fullPath);\n const documentState = this.documents.get(relativePath);\n if (!documentState) {\n console.error(`MML Document '${relativePath}' not found`);\n return;\n }\n documentState.document.load(contents);\n })\n .on(\"unlink\", (fullPath) => {\n const relativePath = path.relative(this.directory, fullPath);\n console.log(`MML Document '${relativePath}' has been removed`);\n const documentState = this.documents.get(relativePath);\n if (!documentState) {\n console.error(`MML Document '${relativePath}' not found`);\n return;\n }\n documentState.document.dispose();\n this.documents.delete(relativePath);\n })\n .on(\"error\", (error) => {\n console.error(\"Error whilst watching directory\", error);\n });\n }\n}\n", "import {\n CHAT_NETWORKING_SERVER_ERROR_MESSAGE_TYPE,\n CHAT_NETWORKING_SERVER_SHUTDOWN_ERROR_TYPE,\n ChatNetworkingServer,\n} from \"@mml-io/3d-web-text-chat\";\nimport {\n USER_NETWORKING_SERVER_ERROR_MESSAGE_TYPE,\n USER_NETWORKING_SERVER_SHUTDOWN_ERROR_TYPE,\n UserData,\n UserIdentity,\n UserNetworkingServer,\n} from \"@mml-io/3d-web-user-networking\";\nimport cors from \"cors\";\nimport express from \"express\";\nimport enableWs from \"express-ws\";\nimport WebSocket from \"ws\";\n\nimport { MMLDocumentsServer } from \"./MMLDocumentsServer\";\nimport { websocketDirectoryChangeListener } from \"./websocketDirectoryChangeListener\";\n\ntype UserAuthenticator = {\n generateAuthorizedSessionToken(req: express.Request): Promise<string | null>;\n getClientIdForSessionToken: (sessionToken: string) => {\n id: number;\n } | null;\n onClientConnect(\n clientId: number,\n sessionToken: string,\n userIdentityPresentedOnConnection?: UserIdentity,\n ): Promise<UserData | null> | UserData | null;\n onClientUserIdentityUpdate(clientId: number, userIdentity: UserIdentity): UserData | null;\n onClientDisconnect(clientId: number): void;\n};\n\nexport const defaultSessionTokenPlaceholder = \"SESSION.TOKEN.PLACEHOLDER\";\n\nexport type Networked3dWebExperienceServerConfig = {\n connectionLimit?: number;\n networkPath: string;\n webClientServing: {\n indexUrl: string;\n indexContent: string;\n sessionTokenPlaceholder?: string;\n\n clientBuildDir: string;\n clientUrl: string;\n clientWatchWebsocketPath?: string;\n };\n chatNetworkPath?: string;\n assetServing?: {\n assetsDir: string;\n assetsUrl: string;\n };\n mmlServing?: {\n documentsWatchPath: string;\n documentsDirectoryRoot: string;\n documentsUrl: string;\n };\n userAuthenticator: UserAuthenticator;\n};\n\nexport class Networked3dWebExperienceServer {\n private userNetworkingServer: UserNetworkingServer;\n\n private chatNetworkingServer?: ChatNetworkingServer;\n\n private mmlDocumentsServer?: MMLDocumentsServer;\n\n constructor(private config: Networked3dWebExperienceServerConfig) {\n if (this.config.mmlServing) {\n const { documentsWatchPath, documentsDirectoryRoot } = this.config.mmlServing;\n this.mmlDocumentsServer = new MMLDocumentsServer(documentsDirectoryRoot, documentsWatchPath);\n }\n\n if (this.config.chatNetworkPath) {\n this.chatNetworkingServer = new ChatNetworkingServer({\n getChatUserIdentity: (sessionToken: string) => {\n return this.config.userAuthenticator.getClientIdForSessionToken(sessionToken);\n },\n });\n }\n\n this.userNetworkingServer = new UserNetworkingServer({\n connectionLimit: config.connectionLimit,\n onClientConnect: (\n clientId: number,\n sessionToken: string,\n userIdentityPresentedOnConnection?: UserIdentity,\n ): Promise<UserData | null> | UserData | null => {\n return this.config.userAuthenticator.onClientConnect(\n clientId,\n sessionToken,\n userIdentityPresentedOnConnection,\n );\n },\n onClientUserIdentityUpdate: (\n clientId: number,\n userIdentity: UserIdentity,\n ): UserData | null => {\n // Called whenever a user connects or updates their character/identity\n return this.config.userAuthenticator.onClientUserIdentityUpdate(clientId, userIdentity);\n },\n onClientDisconnect: (clientId: number): void => {\n this.config.userAuthenticator.onClientDisconnect(clientId);\n // Disconnect the corresponding chat client to avoid later conflicts of client ids\n if (this.chatNetworkingServer) {\n this.chatNetworkingServer.disconnectClientId(clientId);\n }\n },\n });\n }\n\n public updateUserCharacter(clientId: number, userData: UserData) {\n console.log(`Initiate server-side update of client ${clientId}`);\n this.userNetworkingServer.updateUserCharacter(clientId, userData);\n }\n\n public dispose(errorMessage?: string) {\n this.userNetworkingServer.dispose(\n errorMessage\n ? {\n type: USER_NETWORKING_SERVER_ERROR_MESSAGE_TYPE,\n errorType: USER_NETWORKING_SERVER_SHUTDOWN_ERROR_TYPE,\n message: errorMessage,\n }\n : undefined,\n );\n if (this.chatNetworkingServer) {\n this.chatNetworkingServer.dispose(\n errorMessage\n ? {\n type: CHAT_NETWORKING_SERVER_ERROR_MESSAGE_TYPE,\n errorType: CHAT_NETWORKING_SERVER_SHUTDOWN_ERROR_TYPE,\n message: errorMessage,\n }\n : undefined,\n );\n }\n if (this.mmlDocumentsServer) {\n this.mmlDocumentsServer.dispose();\n }\n }\n\n registerExpressRoutes(app: enableWs.Application) {\n app.ws(this.config.networkPath, (ws) => {\n this.userNetworkingServer.connectClient(ws);\n });\n\n if (this.config.chatNetworkPath && this.chatNetworkingServer) {\n const chatServer = this.chatNetworkingServer;\n app.ws(this.config.chatNetworkPath, (ws) => {\n chatServer.connectClient(ws);\n });\n }\n\n const webClientServing = this.config.webClientServing;\n if (webClientServing) {\n app.get(webClientServing.indexUrl, async (req: express.Request, res: express.Response) => {\n const token = await this.config.userAuthenticator.generateAuthorizedSessionToken(req);\n if (!token) {\n res.send(\"Error: Could not generate token\");\n return;\n }\n const authorizedDemoIndexContent = webClientServing.indexContent.replace(\n webClientServing.sessionTokenPlaceholder || defaultSessionTokenPlaceholder,\n token,\n );\n res.send(authorizedDemoIndexContent);\n });\n\n app.use(webClientServing.clientUrl, express.static(webClientServing.clientBuildDir));\n if (webClientServing.clientWatchWebsocketPath) {\n websocketDirectoryChangeListener(app, {\n directory: webClientServing.clientBuildDir,\n websocketPath: webClientServing.clientWatchWebsocketPath,\n });\n }\n }\n\n const mmlDocumentsServer = this.mmlDocumentsServer;\n const mmlServing = this.config.mmlServing;\n // Handle example document sockets\n if (mmlServing && mmlDocumentsServer) {\n app.ws(`${mmlServing.documentsUrl}*`, (ws: WebSocket, req: express.Request) => {\n const path = req.params[0];\n console.log(\"document requested\", { path });\n mmlDocumentsServer.handle(path, ws);\n });\n }\n\n if (this.config.assetServing) {\n // Serve assets with CORS allowing all origins\n app.use(\n this.config.assetServing.assetsUrl,\n cors(),\n express.static(this.config.assetServing.assetsDir),\n );\n }\n }\n}\n", "import chokidar from \"chokidar\";\nimport enableWs from \"express-ws\";\nimport WebSocket from \"ws\";\n\nexport function websocketDirectoryChangeListener(\n app: enableWs.Application,\n options: {\n directory: string;\n websocketPath: string;\n },\n) {\n const listeningClients = new Set<WebSocket>();\n chokidar.watch(options.directory).on(\"all\", () => {\n for (const client of listeningClients) {\n client.send(\"change\");\n }\n });\n // Create an event-source that updates whenever the build folder gets modified\n app.ws(options.websocketPath, (ws: WebSocket) => {\n listeningClients.add(ws);\n ws.on(\"close\", () => {\n listeningClients.delete(ws);\n });\n });\n}\n"],
|
5
|
-
"mappings": ";AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,OAAO,SAAS;AAEhB,SAAS,sBAAsB,iCAAiC;AAChE,OAAO,
|
6
|
-
"names": ["
|
4
|
+
"sourcesContent": ["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport url from \"node:url\";\n\nimport { EditableNetworkedDOM, LocalObservableDOMFactory } from \"@mml-io/networked-dom-server\";\nimport { watch, FSWatcher } from \"chokidar\";\nimport micromatch from \"micromatch\";\nimport WebSocket from \"ws\";\n\nconst getMmlDocumentContent = (documentPath: string) => {\n return fs.readFileSync(documentPath, { encoding: \"utf8\", flag: \"r\" });\n};\n\nexport class MMLDocumentsServer {\n private documents = new Map<\n string,\n {\n documentPath: string;\n document: EditableNetworkedDOM;\n }\n >();\n private watcher: FSWatcher;\n private watchPattern: string;\n\n constructor(\n private directory: string,\n watchPattern: string,\n ) {\n this.watchPattern = path.resolve(directory, watchPattern);\n this.watch();\n }\n\n public dispose() {\n for (const { document } of this.documents.values()) {\n document.dispose();\n }\n this.documents.clear();\n this.watcher.close();\n }\n\n public handle(filename: string, ws: WebSocket) {\n const document = this.documents.get(filename)?.document;\n if (!document) {\n ws.close();\n return;\n }\n\n document.addWebSocket(ws as any);\n ws.on(\"close\", () => {\n document.removeWebSocket(ws as any);\n });\n }\n\n private watch() {\n this.watcher = watch(this.directory, {\n ignoreInitial: false,\n ignored: (checkPath, stats) => {\n if (!stats || !stats.isFile()) {\n return false;\n }\n return !micromatch.isMatch(checkPath, this.watchPattern);\n },\n persistent: true,\n });\n this.watcher\n .on(\"add\", (fullPath, stats) => {\n if (!stats || !stats.isFile()) {\n return;\n }\n const relativePath = path.relative(this.directory, fullPath);\n console.log(`MML Document '${relativePath}' has been added`);\n const contents = getMmlDocumentContent(fullPath);\n const document = new EditableNetworkedDOM(\n url.pathToFileURL(fullPath).toString(),\n LocalObservableDOMFactory,\n );\n document.load(contents);\n\n const currentData = {\n documentPath: fullPath,\n document,\n };\n this.documents.set(relativePath, currentData);\n })\n .on(\"change\", (fullPath) => {\n const relativePath = path.relative(this.directory, fullPath);\n console.log(`MML Document '${relativePath}' has been changed`);\n const contents = getMmlDocumentContent(fullPath);\n const documentState = this.documents.get(relativePath);\n if (!documentState) {\n console.error(`MML Document '${relativePath}' not found`);\n return;\n }\n documentState.document.load(contents);\n })\n .on(\"unlink\", (fullPath) => {\n const relativePath = path.relative(this.directory, fullPath);\n console.log(`MML Document '${relativePath}' has been removed`);\n const documentState = this.documents.get(relativePath);\n if (!documentState) {\n console.error(`MML Document '${relativePath}' not found`);\n return;\n }\n documentState.document.dispose();\n this.documents.delete(relativePath);\n })\n .on(\"error\", (error) => {\n console.error(\"Error whilst watching directory\", error);\n });\n }\n}\n", "import {\n CHAT_NETWORKING_SERVER_ERROR_MESSAGE_TYPE,\n CHAT_NETWORKING_SERVER_SHUTDOWN_ERROR_TYPE,\n ChatNetworkingServer,\n} from \"@mml-io/3d-web-text-chat\";\nimport {\n USER_NETWORKING_SERVER_ERROR_MESSAGE_TYPE,\n USER_NETWORKING_SERVER_SHUTDOWN_ERROR_TYPE,\n UserData,\n UserIdentity,\n UserNetworkingServer,\n} from \"@mml-io/3d-web-user-networking\";\nimport cors from \"cors\";\nimport express from \"express\";\nimport enableWs from \"express-ws\";\nimport WebSocket from \"ws\";\n\nimport { MMLDocumentsServer } from \"./MMLDocumentsServer\";\nimport { websocketDirectoryChangeListener } from \"./websocketDirectoryChangeListener\";\n\ntype UserAuthenticator = {\n generateAuthorizedSessionToken(req: express.Request): Promise<string | null>;\n getClientIdForSessionToken: (sessionToken: string) => {\n id: number;\n } | null;\n onClientConnect(\n clientId: number,\n sessionToken: string,\n userIdentityPresentedOnConnection?: UserIdentity,\n ): Promise<UserData | null> | UserData | null;\n onClientUserIdentityUpdate(clientId: number, userIdentity: UserIdentity): UserData | null;\n onClientDisconnect(clientId: number): void;\n};\n\nexport const defaultSessionTokenPlaceholder = \"SESSION.TOKEN.PLACEHOLDER\";\n\nexport type Networked3dWebExperienceServerConfig = {\n connectionLimit?: number;\n networkPath: string;\n webClientServing: {\n indexUrl: string;\n indexContent: string;\n sessionTokenPlaceholder?: string;\n\n clientBuildDir: string;\n clientUrl: string;\n clientWatchWebsocketPath?: string;\n };\n chatNetworkPath?: string;\n assetServing?: {\n assetsDir: string;\n assetsUrl: string;\n };\n mmlServing?: {\n documentsWatchPath: string;\n documentsDirectoryRoot: string;\n documentsUrl: string;\n };\n userAuthenticator: UserAuthenticator;\n};\n\nexport class Networked3dWebExperienceServer {\n private userNetworkingServer: UserNetworkingServer;\n\n private chatNetworkingServer?: ChatNetworkingServer;\n\n private mmlDocumentsServer?: MMLDocumentsServer;\n\n constructor(private config: Networked3dWebExperienceServerConfig) {\n if (this.config.mmlServing) {\n const { documentsWatchPath, documentsDirectoryRoot } = this.config.mmlServing;\n this.mmlDocumentsServer = new MMLDocumentsServer(documentsDirectoryRoot, documentsWatchPath);\n }\n\n if (this.config.chatNetworkPath) {\n this.chatNetworkingServer = new ChatNetworkingServer({\n getChatUserIdentity: (sessionToken: string) => {\n return this.config.userAuthenticator.getClientIdForSessionToken(sessionToken);\n },\n });\n }\n\n this.userNetworkingServer = new UserNetworkingServer({\n connectionLimit: config.connectionLimit,\n onClientConnect: (\n clientId: number,\n sessionToken: string,\n userIdentityPresentedOnConnection?: UserIdentity,\n ): Promise<UserData | null> | UserData | null => {\n return this.config.userAuthenticator.onClientConnect(\n clientId,\n sessionToken,\n userIdentityPresentedOnConnection,\n );\n },\n onClientUserIdentityUpdate: (\n clientId: number,\n userIdentity: UserIdentity,\n ): UserData | null => {\n // Called whenever a user connects or updates their character/identity\n return this.config.userAuthenticator.onClientUserIdentityUpdate(clientId, userIdentity);\n },\n onClientDisconnect: (clientId: number): void => {\n this.config.userAuthenticator.onClientDisconnect(clientId);\n // Disconnect the corresponding chat client to avoid later conflicts of client ids\n if (this.chatNetworkingServer) {\n this.chatNetworkingServer.disconnectClientId(clientId);\n }\n },\n });\n }\n\n public updateUserCharacter(clientId: number, userData: UserData) {\n console.log(`Initiate server-side update of client ${clientId}`);\n this.userNetworkingServer.updateUserCharacter(clientId, userData);\n }\n\n public dispose(errorMessage?: string) {\n this.userNetworkingServer.dispose(\n errorMessage\n ? {\n type: USER_NETWORKING_SERVER_ERROR_MESSAGE_TYPE,\n errorType: USER_NETWORKING_SERVER_SHUTDOWN_ERROR_TYPE,\n message: errorMessage,\n }\n : undefined,\n );\n if (this.chatNetworkingServer) {\n this.chatNetworkingServer.dispose(\n errorMessage\n ? {\n type: CHAT_NETWORKING_SERVER_ERROR_MESSAGE_TYPE,\n errorType: CHAT_NETWORKING_SERVER_SHUTDOWN_ERROR_TYPE,\n message: errorMessage,\n }\n : undefined,\n );\n }\n if (this.mmlDocumentsServer) {\n this.mmlDocumentsServer.dispose();\n }\n }\n\n registerExpressRoutes(app: enableWs.Application) {\n app.ws(this.config.networkPath, (ws) => {\n this.userNetworkingServer.connectClient(ws);\n });\n\n if (this.config.chatNetworkPath && this.chatNetworkingServer) {\n const chatServer = this.chatNetworkingServer;\n app.ws(this.config.chatNetworkPath, (ws) => {\n chatServer.connectClient(ws);\n });\n }\n\n const webClientServing = this.config.webClientServing;\n if (webClientServing) {\n app.get(webClientServing.indexUrl, async (req: express.Request, res: express.Response) => {\n const token = await this.config.userAuthenticator.generateAuthorizedSessionToken(req);\n if (!token) {\n res.send(\"Error: Could not generate token\");\n return;\n }\n const authorizedDemoIndexContent = webClientServing.indexContent.replace(\n webClientServing.sessionTokenPlaceholder || defaultSessionTokenPlaceholder,\n token,\n );\n res.send(authorizedDemoIndexContent);\n });\n\n app.use(webClientServing.clientUrl, express.static(webClientServing.clientBuildDir));\n if (webClientServing.clientWatchWebsocketPath) {\n websocketDirectoryChangeListener(app, {\n directory: webClientServing.clientBuildDir,\n websocketPath: webClientServing.clientWatchWebsocketPath,\n });\n }\n }\n\n const mmlDocumentsServer = this.mmlDocumentsServer;\n const mmlServing = this.config.mmlServing;\n // Handle example document sockets\n if (mmlServing && mmlDocumentsServer) {\n app.ws(`${mmlServing.documentsUrl}*`, (ws: WebSocket, req: express.Request) => {\n const path = req.params[0];\n console.log(\"document requested\", { path });\n mmlDocumentsServer.handle(path, ws);\n });\n }\n\n if (this.config.assetServing) {\n // Serve assets with CORS allowing all origins\n app.use(\n this.config.assetServing.assetsUrl,\n cors(),\n express.static(this.config.assetServing.assetsDir),\n );\n }\n }\n}\n", "import { watch } from \"chokidar\";\nimport enableWs from \"express-ws\";\nimport WebSocket from \"ws\";\n\nexport function websocketDirectoryChangeListener(\n app: enableWs.Application,\n options: {\n directory: string;\n websocketPath: string;\n },\n) {\n const listeningClients = new Set<WebSocket>();\n watch(options.directory).on(\"all\", () => {\n for (const client of listeningClients) {\n client.send(\"change\");\n }\n });\n // Create an event-source that updates whenever the build folder gets modified\n app.ws(options.websocketPath, (ws: WebSocket) => {\n listeningClients.add(ws);\n ws.on(\"close\", () => {\n listeningClients.delete(ws);\n });\n });\n}\n"],
|
5
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AACA,YAAI,KAAK,0BAA0B;AAAA,MACrC,CAAC;AAED,UAAI,IAAI,iBAAiB,WAAW,QAAQ,OAAO,iBAAiB,cAAc,CAAC;AACnF,UAAI,iBAAiB,0BAA0B;AAC7C,yCAAiC,KAAK;AAAA,UACpC,WAAW,iBAAiB;AAAA,UAC5B,eAAe,iBAAiB;AAAA,QAClC,CAAC;AAAA,MACH;AAAA,IACF;AAEA,UAAM,qBAAqB,KAAK;AAChC,UAAM,aAAa,KAAK,OAAO;AAE/B,QAAI,cAAc,oBAAoB;AACpC,UAAI,GAAG,GAAG,WAAW,YAAY,KAAK,CAAC,IAAe,QAAyB;AAC7E,cAAMC,QAAO,IAAI,OAAO,CAAC;AACzB,gBAAQ,IAAI,sBAAsB,EAAE,MAAAA,MAAK,CAAC;AAC1C,2BAAmB,OAAOA,OAAM,EAAE;AAAA,MACpC,CAAC;AAAA,IACH;AAEA,QAAI,KAAK,OAAO,cAAc;AAE5B,UAAI;AAAA,QACF,KAAK,OAAO,aAAa;AAAA,QACzB,KAAK;AAAA,QACL,QAAQ,OAAO,KAAK,OAAO,aAAa,SAAS;AAAA,MACnD;AAAA,IACF;AAAA,EACF;AACF;",
|
6
|
+
"names": ["watch", "path"]
|
7
7
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@mml-io/3d-web-experience-server",
|
3
|
-
"version": "0.21.
|
3
|
+
"version": "0.21.3",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -18,24 +18,26 @@
|
|
18
18
|
"lint-fix": "eslint \"./{src,test}/**/*.{js,jsx,ts,tsx}\" --fix"
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
|
-
"@mml-io/3d-web-client-core": "^0.21.
|
22
|
-
"@mml-io/3d-web-text-chat": "^0.21.
|
23
|
-
"@mml-io/3d-web-user-networking": "^0.21.
|
24
|
-
"@mml-io/3d-web-voice-chat": "^0.21.
|
25
|
-
"@mml-io/networked-dom-server": "0.19.
|
26
|
-
"chokidar": "^
|
21
|
+
"@mml-io/3d-web-client-core": "^0.21.3",
|
22
|
+
"@mml-io/3d-web-text-chat": "^0.21.3",
|
23
|
+
"@mml-io/3d-web-user-networking": "^0.21.3",
|
24
|
+
"@mml-io/3d-web-voice-chat": "^0.21.3",
|
25
|
+
"@mml-io/networked-dom-server": "0.19.3",
|
26
|
+
"chokidar": "^4.0.3",
|
27
27
|
"cors": "^2.8.5",
|
28
|
-
"express": "^4.
|
28
|
+
"express": "^4.21.2",
|
29
29
|
"express-ws": "^5.0.2",
|
30
|
+
"micromatch": "^4.0.8",
|
30
31
|
"three": "0.163.0",
|
31
32
|
"ws": "^8.18.0"
|
32
33
|
},
|
33
34
|
"devDependencies": {
|
34
35
|
"@types/cors": "2.8.17",
|
35
|
-
"@types/express": "^
|
36
|
-
"@types/express-ws": "^3.0.
|
37
|
-
"@types/
|
36
|
+
"@types/express": "^5.0.0",
|
37
|
+
"@types/express-ws": "^3.0.5",
|
38
|
+
"@types/micromatch": "^4.0.9",
|
39
|
+
"@types/node": "^22.13.1",
|
38
40
|
"@types/three": "0.163.0"
|
39
41
|
},
|
40
|
-
"gitHead": "
|
42
|
+
"gitHead": "2334485f39fcb770477cefea72373e908e1ccadd"
|
41
43
|
}
|