1 line
38 KiB
JSON
1 line
38 KiB
JSON
{"ast":null,"code":"import { Client } from \"../client.js\";\nimport { readJsonObject, writeJsonObject, readProtobufMessage, writeProtobufMessage } from \"../encoding/index.js\";\nimport { ClientError, ProtoError, ClosedError, WebSocketError, ProtocolVersionError, InternalError } from \"../errors.js\";\nimport { IdAlloc } from \"../id_alloc.js\";\nimport { errorFromProto } from \"../result.js\";\nimport { Sql } from \"../sql.js\";\nimport { impossible } from \"../util.js\";\nimport { WsStream } from \"./stream.js\";\nimport { ClientMsg as json_ClientMsg } from \"./json_encode.js\";\nimport { ClientMsg as protobuf_ClientMsg } from \"./protobuf_encode.js\";\nimport { ServerMsg as json_ServerMsg } from \"./json_decode.js\";\nimport { ServerMsg as protobuf_ServerMsg } from \"./protobuf_decode.js\";\nexport const subprotocolsV2 = new Map([[\"hrana2\", {\n version: 2,\n encoding: \"json\"\n}], [\"hrana1\", {\n version: 1,\n encoding: \"json\"\n}]]);\nexport const subprotocolsV3 = new Map([[\"hrana3-protobuf\", {\n version: 3,\n encoding: \"protobuf\"\n}], [\"hrana3\", {\n version: 3,\n encoding: \"json\"\n}], [\"hrana2\", {\n version: 2,\n encoding: \"json\"\n}], [\"hrana1\", {\n version: 1,\n encoding: \"json\"\n}]]);\n/** A client for the Hrana protocol over a WebSocket. */\nexport class WsClient extends Client {\n #socket;\n // List of callbacks that we queue until the socket transitions from the CONNECTING to the OPEN state.\n #openCallbacks;\n // Have we already transitioned from CONNECTING to OPEN and fired the callbacks in #openCallbacks?\n #opened;\n // Stores the error that caused us to close the client (and the socket). If we are not closed, this is\n // `undefined`.\n #closed;\n // Have we received a response to our \"hello\" from the server?\n #recvdHello;\n // Subprotocol negotiated with the server. It is only available after the socket transitions to the OPEN\n // state.\n #subprotocol;\n // Has the `getVersion()` function been called? This is only used to validate that the API is used\n // correctly.\n #getVersionCalled;\n // A map from request id to the responses that we expect to receive from the server.\n #responseMap;\n // An allocator of request ids.\n #requestIdAlloc;\n // An allocator of stream ids.\n /** @private */\n _streamIdAlloc;\n // An allocator of cursor ids.\n /** @private */\n _cursorIdAlloc;\n // An allocator of SQL text ids.\n #sqlIdAlloc;\n /** @private */\n constructor(socket, jwt) {\n super();\n this.#socket = socket;\n this.#openCallbacks = [];\n this.#opened = false;\n this.#closed = undefined;\n this.#recvdHello = false;\n this.#subprotocol = undefined;\n this.#getVersionCalled = false;\n this.#responseMap = new Map();\n this.#requestIdAlloc = new IdAlloc();\n this._streamIdAlloc = new IdAlloc();\n this._cursorIdAlloc = new IdAlloc();\n this.#sqlIdAlloc = new IdAlloc();\n this.#socket.binaryType = \"arraybuffer\";\n this.#socket.addEventListener(\"open\", () => this.#onSocketOpen());\n this.#socket.addEventListener(\"close\", event => this.#onSocketClose(event));\n this.#socket.addEventListener(\"error\", event => this.#onSocketError(event));\n this.#socket.addEventListener(\"message\", event => this.#onSocketMessage(event));\n this.#send({\n type: \"hello\",\n jwt\n });\n }\n // Send (or enqueue to send) a message to the server.\n #send(msg) {\n if (this.#closed !== undefined) {\n throw new InternalError(\"Trying to send a message on a closed client\");\n }\n if (this.#opened) {\n this.#sendToSocket(msg);\n } else {\n const openCallback = () => this.#sendToSocket(msg);\n const errorCallback = () => undefined;\n this.#openCallbacks.push({\n openCallback,\n errorCallback\n });\n }\n }\n // The socket transitioned from CONNECTING to OPEN\n #onSocketOpen() {\n const protocol = this.#socket.protocol;\n if (protocol === undefined) {\n this.#setClosed(new ClientError(\"The `WebSocket.protocol` property is undefined. This most likely means that the WebSocket \" + \"implementation provided by the environment is broken. If you are using Miniflare 2, \" + \"please update to Miniflare 3, which fixes this problem.\"));\n return;\n } else if (protocol === \"\") {\n this.#subprotocol = {\n version: 1,\n encoding: \"json\"\n };\n } else {\n this.#subprotocol = subprotocolsV3.get(protocol);\n if (this.#subprotocol === undefined) {\n this.#setClosed(new ProtoError(`Unrecognized WebSocket subprotocol: ${JSON.stringify(protocol)}`));\n return;\n }\n }\n for (const callbacks of this.#openCallbacks) {\n callbacks.openCallback();\n }\n this.#openCallbacks.length = 0;\n this.#opened = true;\n }\n #sendToSocket(msg) {\n const encoding = this.#subprotocol.encoding;\n if (encoding === \"json\") {\n const jsonMsg = writeJsonObject(msg, json_ClientMsg);\n this.#socket.send(jsonMsg);\n } else if (encoding === \"protobuf\") {\n const protobufMsg = writeProtobufMessage(msg, protobuf_ClientMsg);\n this.#socket.send(protobufMsg);\n } else {\n throw impossible(encoding, \"Impossible encoding\");\n }\n }\n /** Get the protocol version negotiated with the server, possibly waiting until the socket is open. */\n getVersion() {\n return new Promise((versionCallback, errorCallback) => {\n this.#getVersionCalled = true;\n if (this.#closed !== undefined) {\n errorCallback(this.#closed);\n } else if (!this.#opened) {\n const openCallback = () => versionCallback(this.#subprotocol.version);\n this.#openCallbacks.push({\n openCallback,\n errorCallback\n });\n } else {\n versionCallback(this.#subprotocol.version);\n }\n });\n }\n // Make sure that the negotiated version is at least `minVersion`.\n /** @private */\n _ensureVersion(minVersion, feature) {\n if (this.#subprotocol === undefined || !this.#getVersionCalled) {\n throw new ProtocolVersionError(`${feature} is supported only on protocol version ${minVersion} and higher, ` + \"but the version supported by the WebSocket server is not yet known. \" + \"Use Client.getVersion() to wait until the version is available.\");\n } else if (this.#subprotocol.version < minVersion) {\n throw new ProtocolVersionError(`${feature} is supported on protocol version ${minVersion} and higher, ` + `but the WebSocket server only supports version ${this.#subprotocol.version}`);\n }\n }\n // Send a request to the server and invoke a callback when we get the response.\n /** @private */\n _sendRequest(request, callbacks) {\n if (this.#closed !== undefined) {\n callbacks.errorCallback(new ClosedError(\"Client is closed\", this.#closed));\n return;\n }\n const requestId = this.#requestIdAlloc.alloc();\n this.#responseMap.set(requestId, {\n ...callbacks,\n type: request.type\n });\n this.#send({\n type: \"request\",\n requestId,\n request\n });\n }\n // The socket encountered an error.\n #onSocketError(event) {\n const eventMessage = event.message;\n const message = eventMessage ?? \"WebSocket was closed due to an error\";\n this.#setClosed(new WebSocketError(message));\n }\n // The socket was closed.\n #onSocketClose(event) {\n let message = `WebSocket was closed with code ${event.code}`;\n if (event.reason) {\n message += `: ${event.reason}`;\n }\n this.#setClosed(new WebSocketError(message));\n }\n // Close the client with the given error.\n #setClosed(error) {\n if (this.#closed !== undefined) {\n return;\n }\n this.#closed = error;\n for (const callbacks of this.#openCallbacks) {\n callbacks.errorCallback(error);\n }\n this.#openCallbacks.length = 0;\n for (const [requestId, responseState] of this.#responseMap.entries()) {\n responseState.errorCallback(error);\n this.#requestIdAlloc.free(requestId);\n }\n this.#responseMap.clear();\n this.#socket.close();\n }\n // We received a message from the socket.\n #onSocketMessage(event) {\n if (this.#closed !== undefined) {\n return;\n }\n try {\n let msg;\n const encoding = this.#subprotocol.encoding;\n if (encoding === \"json\") {\n if (typeof event.data !== \"string\") {\n this.#socket.close(3003, \"Only text messages are accepted with JSON encoding\");\n this.#setClosed(new ProtoError(\"Received non-text message from server with JSON encoding\"));\n return;\n }\n msg = readJsonObject(JSON.parse(event.data), json_ServerMsg);\n } else if (encoding === \"protobuf\") {\n if (!(event.data instanceof ArrayBuffer)) {\n this.#socket.close(3003, \"Only binary messages are accepted with Protobuf encoding\");\n this.#setClosed(new ProtoError(\"Received non-binary message from server with Protobuf encoding\"));\n return;\n }\n msg = readProtobufMessage(new Uint8Array(event.data), protobuf_ServerMsg);\n } else {\n throw impossible(encoding, \"Impossible encoding\");\n }\n this.#handleMsg(msg);\n } catch (e) {\n this.#socket.close(3007, \"Could not handle message\");\n this.#setClosed(e);\n }\n }\n // Handle a message from the server.\n #handleMsg(msg) {\n if (msg.type === \"none\") {\n throw new ProtoError(\"Received an unrecognized ServerMsg\");\n } else if (msg.type === \"hello_ok\" || msg.type === \"hello_error\") {\n if (this.#recvdHello) {\n throw new ProtoError(\"Received a duplicated hello response\");\n }\n this.#recvdHello = true;\n if (msg.type === \"hello_error\") {\n throw errorFromProto(msg.error);\n }\n return;\n } else if (!this.#recvdHello) {\n throw new ProtoError(\"Received a non-hello message before a hello response\");\n }\n if (msg.type === \"response_ok\") {\n const requestId = msg.requestId;\n const responseState = this.#responseMap.get(requestId);\n this.#responseMap.delete(requestId);\n if (responseState === undefined) {\n throw new ProtoError(\"Received unexpected OK response\");\n }\n this.#requestIdAlloc.free(requestId);\n try {\n if (responseState.type !== msg.response.type) {\n console.dir({\n responseState,\n msg\n });\n throw new ProtoError(\"Received unexpected type of response\");\n }\n responseState.responseCallback(msg.response);\n } catch (e) {\n responseState.errorCallback(e);\n throw e;\n }\n } else if (msg.type === \"response_error\") {\n const requestId = msg.requestId;\n const responseState = this.#responseMap.get(requestId);\n this.#responseMap.delete(requestId);\n if (responseState === undefined) {\n throw new ProtoError(\"Received unexpected error response\");\n }\n this.#requestIdAlloc.free(requestId);\n responseState.errorCallback(errorFromProto(msg.error));\n } else {\n throw impossible(msg, \"Impossible ServerMsg type\");\n }\n }\n /** Open a {@link WsStream}, a stream for executing SQL statements. */\n openStream() {\n return WsStream.open(this);\n }\n /** Cache a SQL text on the server. This requires protocol version 2 or higher. */\n storeSql(sql) {\n this._ensureVersion(2, \"storeSql()\");\n const sqlId = this.#sqlIdAlloc.alloc();\n const sqlObj = new Sql(this, sqlId);\n const responseCallback = () => undefined;\n const errorCallback = e => sqlObj._setClosed(e);\n const request = {\n type: \"store_sql\",\n sqlId,\n sql\n };\n this._sendRequest(request, {\n responseCallback,\n errorCallback\n });\n return sqlObj;\n }\n /** @private */\n _closeSql(sqlId) {\n if (this.#closed !== undefined) {\n return;\n }\n const responseCallback = () => this.#sqlIdAlloc.free(sqlId);\n const errorCallback = e => this.#setClosed(e);\n const request = {\n type: \"close_sql\",\n sqlId\n };\n this._sendRequest(request, {\n responseCallback,\n errorCallback\n });\n }\n /** Close the client and the WebSocket. */\n close() {\n this.#setClosed(new ClientError(\"Client was manually closed\"));\n }\n /** True if the client is closed. */\n get closed() {\n return this.#closed !== undefined;\n }\n}","map":{"version":3,"names":["Client","readJsonObject","writeJsonObject","readProtobufMessage","writeProtobufMessage","ClientError","ProtoError","ClosedError","WebSocketError","ProtocolVersionError","InternalError","IdAlloc","errorFromProto","Sql","impossible","WsStream","ClientMsg","json_ClientMsg","protobuf_ClientMsg","ServerMsg","json_ServerMsg","protobuf_ServerMsg","subprotocolsV2","Map","version","encoding","subprotocolsV3","WsClient","socket","openCallbacks","opened","closed","recvdHello","subprotocol","getVersionCalled","responseMap","requestIdAlloc","_streamIdAlloc","_cursorIdAlloc","sqlIdAlloc","constructor","jwt","undefined","binaryType","addEventListener","onSocketOpen","event","onSocketClose","onSocketError","onSocketMessage","send","type","#send","msg","sendToSocket","openCallback","errorCallback","push","#onSocketOpen","protocol","setClosed","get","JSON","stringify","callbacks","length","#sendToSocket","jsonMsg","protobufMsg","getVersion","Promise","versionCallback","_ensureVersion","minVersion","feature","_sendRequest","request","requestId","alloc","set","#onSocketError","eventMessage","message","#onSocketClose","code","reason","#setClosed","error","responseState","entries","free","clear","close","#onSocketMessage","data","parse","ArrayBuffer","Uint8Array","handleMsg","e","#handleMsg","delete","response","console","dir","responseCallback","openStream","open","storeSql","sql","sqlId","sqlObj","_setClosed","_closeSql"],"sources":["/Users/shoofle/Projects/the-forest/node_modules/@libsql/hrana-client/lib-esm/ws/client.js"],"sourcesContent":["import { Client } from \"../client.js\";\nimport { readJsonObject, writeJsonObject, readProtobufMessage, writeProtobufMessage, } from \"../encoding/index.js\";\nimport { ClientError, ProtoError, ClosedError, WebSocketError, ProtocolVersionError, InternalError, } from \"../errors.js\";\nimport { IdAlloc } from \"../id_alloc.js\";\nimport { errorFromProto } from \"../result.js\";\nimport { Sql } from \"../sql.js\";\nimport { impossible } from \"../util.js\";\nimport { WsStream } from \"./stream.js\";\nimport { ClientMsg as json_ClientMsg } from \"./json_encode.js\";\nimport { ClientMsg as protobuf_ClientMsg } from \"./protobuf_encode.js\";\nimport { ServerMsg as json_ServerMsg } from \"./json_decode.js\";\nimport { ServerMsg as protobuf_ServerMsg } from \"./protobuf_decode.js\";\nexport const subprotocolsV2 = new Map([\n [\"hrana2\", { version: 2, encoding: \"json\" }],\n [\"hrana1\", { version: 1, encoding: \"json\" }],\n]);\nexport const subprotocolsV3 = new Map([\n [\"hrana3-protobuf\", { version: 3, encoding: \"protobuf\" }],\n [\"hrana3\", { version: 3, encoding: \"json\" }],\n [\"hrana2\", { version: 2, encoding: \"json\" }],\n [\"hrana1\", { version: 1, encoding: \"json\" }],\n]);\n/** A client for the Hrana protocol over a WebSocket. */\nexport class WsClient extends Client {\n #socket;\n // List of callbacks that we queue until the socket transitions from the CONNECTING to the OPEN state.\n #openCallbacks;\n // Have we already transitioned from CONNECTING to OPEN and fired the callbacks in #openCallbacks?\n #opened;\n // Stores the error that caused us to close the client (and the socket). If we are not closed, this is\n // `undefined`.\n #closed;\n // Have we received a response to our \"hello\" from the server?\n #recvdHello;\n // Subprotocol negotiated with the server. It is only available after the socket transitions to the OPEN\n // state.\n #subprotocol;\n // Has the `getVersion()` function been called? This is only used to validate that the API is used\n // correctly.\n #getVersionCalled;\n // A map from request id to the responses that we expect to receive from the server.\n #responseMap;\n // An allocator of request ids.\n #requestIdAlloc;\n // An allocator of stream ids.\n /** @private */\n _streamIdAlloc;\n // An allocator of cursor ids.\n /** @private */\n _cursorIdAlloc;\n // An allocator of SQL text ids.\n #sqlIdAlloc;\n /** @private */\n constructor(socket, jwt) {\n super();\n this.#socket = socket;\n this.#openCallbacks = [];\n this.#opened = false;\n this.#closed = undefined;\n this.#recvdHello = false;\n this.#subprotocol = undefined;\n this.#getVersionCalled = false;\n this.#responseMap = new Map();\n this.#requestIdAlloc = new IdAlloc();\n this._streamIdAlloc = new IdAlloc();\n this._cursorIdAlloc = new IdAlloc();\n this.#sqlIdAlloc = new IdAlloc();\n this.#socket.binaryType = \"arraybuffer\";\n this.#socket.addEventListener(\"open\", () => this.#onSocketOpen());\n this.#socket.addEventListener(\"close\", (event) => this.#onSocketClose(event));\n this.#socket.addEventListener(\"error\", (event) => this.#onSocketError(event));\n this.#socket.addEventListener(\"message\", (event) => this.#onSocketMessage(event));\n this.#send({ type: \"hello\", jwt });\n }\n // Send (or enqueue to send) a message to the server.\n #send(msg) {\n if (this.#closed !== undefined) {\n throw new InternalError(\"Trying to send a message on a closed client\");\n }\n if (this.#opened) {\n this.#sendToSocket(msg);\n }\n else {\n const openCallback = () => this.#sendToSocket(msg);\n const errorCallback = () => undefined;\n this.#openCallbacks.push({ openCallback, errorCallback });\n }\n }\n // The socket transitioned from CONNECTING to OPEN\n #onSocketOpen() {\n const protocol = this.#socket.protocol;\n if (protocol === undefined) {\n this.#setClosed(new ClientError(\"The `WebSocket.protocol` property is undefined. This most likely means that the WebSocket \" +\n \"implementation provided by the environment is broken. If you are using Miniflare 2, \" +\n \"please update to Miniflare 3, which fixes this problem.\"));\n return;\n }\n else if (protocol === \"\") {\n this.#subprotocol = { version: 1, encoding: \"json\" };\n }\n else {\n this.#subprotocol = subprotocolsV3.get(protocol);\n if (this.#subprotocol === undefined) {\n this.#setClosed(new ProtoError(`Unrecognized WebSocket subprotocol: ${JSON.stringify(protocol)}`));\n return;\n }\n }\n for (const callbacks of this.#openCallbacks) {\n callbacks.openCallback();\n }\n this.#openCallbacks.length = 0;\n this.#opened = true;\n }\n #sendToSocket(msg) {\n const encoding = this.#subprotocol.encoding;\n if (encoding === \"json\") {\n const jsonMsg = writeJsonObject(msg, json_ClientMsg);\n this.#socket.send(jsonMsg);\n }\n else if (encoding === \"protobuf\") {\n const protobufMsg = writeProtobufMessage(msg, protobuf_ClientMsg);\n this.#socket.send(protobufMsg);\n }\n else {\n throw impossible(encoding, \"Impossible encoding\");\n }\n }\n /** Get the protocol version negotiated with the server, possibly waiting until the socket is open. */\n getVersion() {\n return new Promise((versionCallback, errorCallback) => {\n this.#getVersionCalled = true;\n if (this.#closed !== undefined) {\n errorCallback(this.#closed);\n }\n else if (!this.#opened) {\n const openCallback = () => versionCallback(this.#subprotocol.version);\n this.#openCallbacks.push({ openCallback, errorCallback });\n }\n else {\n versionCallback(this.#subprotocol.version);\n }\n });\n }\n // Make sure that the negotiated version is at least `minVersion`.\n /** @private */\n _ensureVersion(minVersion, feature) {\n if (this.#subprotocol === undefined || !this.#getVersionCalled) {\n throw new ProtocolVersionError(`${feature} is supported only on protocol version ${minVersion} and higher, ` +\n \"but the version supported by the WebSocket server is not yet known. \" +\n \"Use Client.getVersion() to wait until the version is available.\");\n }\n else if (this.#subprotocol.version < minVersion) {\n throw new ProtocolVersionError(`${feature} is supported on protocol version ${minVersion} and higher, ` +\n `but the WebSocket server only supports version ${this.#subprotocol.version}`);\n }\n }\n // Send a request to the server and invoke a callback when we get the response.\n /** @private */\n _sendRequest(request, callbacks) {\n if (this.#closed !== undefined) {\n callbacks.errorCallback(new ClosedError(\"Client is closed\", this.#closed));\n return;\n }\n const requestId = this.#requestIdAlloc.alloc();\n this.#responseMap.set(requestId, { ...callbacks, type: request.type });\n this.#send({ type: \"request\", requestId, request });\n }\n // The socket encountered an error.\n #onSocketError(event) {\n const eventMessage = event.message;\n const message = eventMessage ?? \"WebSocket was closed due to an error\";\n this.#setClosed(new WebSocketError(message));\n }\n // The socket was closed.\n #onSocketClose(event) {\n let message = `WebSocket was closed with code ${event.code}`;\n if (event.reason) {\n message += `: ${event.reason}`;\n }\n this.#setClosed(new WebSocketError(message));\n }\n // Close the client with the given error.\n #setClosed(error) {\n if (this.#closed !== undefined) {\n return;\n }\n this.#closed = error;\n for (const callbacks of this.#openCallbacks) {\n callbacks.errorCallback(error);\n }\n this.#openCallbacks.length = 0;\n for (const [requestId, responseState] of this.#responseMap.entries()) {\n responseState.errorCallback(error);\n this.#requestIdAlloc.free(requestId);\n }\n this.#responseMap.clear();\n this.#socket.close();\n }\n // We received a message from the socket.\n #onSocketMessage(event) {\n if (this.#closed !== undefined) {\n return;\n }\n try {\n let msg;\n const encoding = this.#subprotocol.encoding;\n if (encoding === \"json\") {\n if (typeof event.data !== \"string\") {\n this.#socket.close(3003, \"Only text messages are accepted with JSON encoding\");\n this.#setClosed(new ProtoError(\"Received non-text message from server with JSON encoding\"));\n return;\n }\n msg = readJsonObject(JSON.parse(event.data), json_ServerMsg);\n }\n else if (encoding === \"protobuf\") {\n if (!(event.data instanceof ArrayBuffer)) {\n this.#socket.close(3003, \"Only binary messages are accepted with Protobuf encoding\");\n this.#setClosed(new ProtoError(\"Received non-binary message from server with Protobuf encoding\"));\n return;\n }\n msg = readProtobufMessage(new Uint8Array(event.data), protobuf_ServerMsg);\n }\n else {\n throw impossible(encoding, \"Impossible encoding\");\n }\n this.#handleMsg(msg);\n }\n catch (e) {\n this.#socket.close(3007, \"Could not handle message\");\n this.#setClosed(e);\n }\n }\n // Handle a message from the server.\n #handleMsg(msg) {\n if (msg.type === \"none\") {\n throw new ProtoError(\"Received an unrecognized ServerMsg\");\n }\n else if (msg.type === \"hello_ok\" || msg.type === \"hello_error\") {\n if (this.#recvdHello) {\n throw new ProtoError(\"Received a duplicated hello response\");\n }\n this.#recvdHello = true;\n if (msg.type === \"hello_error\") {\n throw errorFromProto(msg.error);\n }\n return;\n }\n else if (!this.#recvdHello) {\n throw new ProtoError(\"Received a non-hello message before a hello response\");\n }\n if (msg.type === \"response_ok\") {\n const requestId = msg.requestId;\n const responseState = this.#responseMap.get(requestId);\n this.#responseMap.delete(requestId);\n if (responseState === undefined) {\n throw new ProtoError(\"Received unexpected OK response\");\n }\n this.#requestIdAlloc.free(requestId);\n try {\n if (responseState.type !== msg.response.type) {\n console.dir({ responseState, msg });\n throw new ProtoError(\"Received unexpected type of response\");\n }\n responseState.responseCallback(msg.response);\n }\n catch (e) {\n responseState.errorCallback(e);\n throw e;\n }\n }\n else if (msg.type === \"response_error\") {\n const requestId = msg.requestId;\n const responseState = this.#responseMap.get(requestId);\n this.#responseMap.delete(requestId);\n if (responseState === undefined) {\n throw new ProtoError(\"Received unexpected error response\");\n }\n this.#requestIdAlloc.free(requestId);\n responseState.errorCallback(errorFromProto(msg.error));\n }\n else {\n throw impossible(msg, \"Impossible ServerMsg type\");\n }\n }\n /** Open a {@link WsStream}, a stream for executing SQL statements. */\n openStream() {\n return WsStream.open(this);\n }\n /** Cache a SQL text on the server. This requires protocol version 2 or higher. */\n storeSql(sql) {\n this._ensureVersion(2, \"storeSql()\");\n const sqlId = this.#sqlIdAlloc.alloc();\n const sqlObj = new Sql(this, sqlId);\n const responseCallback = () => undefined;\n const errorCallback = (e) => sqlObj._setClosed(e);\n const request = { type: \"store_sql\", sqlId, sql };\n this._sendRequest(request, { responseCallback, errorCallback });\n return sqlObj;\n }\n /** @private */\n _closeSql(sqlId) {\n if (this.#closed !== undefined) {\n return;\n }\n const responseCallback = () => this.#sqlIdAlloc.free(sqlId);\n const errorCallback = (e) => this.#setClosed(e);\n const request = { type: \"close_sql\", sqlId };\n this._sendRequest(request, { responseCallback, errorCallback });\n }\n /** Close the client and the WebSocket. */\n close() {\n this.#setClosed(new ClientError(\"Client was manually closed\"));\n }\n /** True if the client is closed. */\n get closed() {\n return this.#closed !== undefined;\n }\n}\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,cAAc;AACrC,SAASC,cAAc,EAAEC,eAAe,EAAEC,mBAAmB,EAAEC,oBAAoB,QAAS,sBAAsB;AAClH,SAASC,WAAW,EAAEC,UAAU,EAAEC,WAAW,EAAEC,cAAc,EAAEC,oBAAoB,EAAEC,aAAa,QAAS,cAAc;AACzH,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,cAAc,QAAQ,cAAc;AAC7C,SAASC,GAAG,QAAQ,WAAW;AAC/B,SAASC,UAAU,QAAQ,YAAY;AACvC,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,SAAS,IAAIC,cAAc,QAAQ,kBAAkB;AAC9D,SAASD,SAAS,IAAIE,kBAAkB,QAAQ,sBAAsB;AACtE,SAASC,SAAS,IAAIC,cAAc,QAAQ,kBAAkB;AAC9D,SAASD,SAAS,IAAIE,kBAAkB,QAAQ,sBAAsB;AACtE,OAAO,MAAMC,cAAc,GAAG,IAAIC,GAAG,CAAC,CAClC,CAAC,QAAQ,EAAE;EAAEC,OAAO,EAAE,CAAC;EAAE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