@plumile/ui 0.1.112 → 0.1.113
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/lib/esm/atomic/molecules/markdown/components/MarkdownArticleContainer.css.js +0 -1
- package/lib/esm/atomic/molecules/markdown/components/MarkdownTableCell.css.js +1 -0
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/browser/main.js +1 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/api.js +1 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/connection.js +1 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/messages.js +1 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +1 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +1 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.js +11 -0
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.js.map +1 -0
- package/lib/esm/node_modules/{vscode-jsonrpc → vscode-languageserver-protocol/node_modules/vscode-jsonrpc}/lib/browser/main.js +2 -2
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.js.map +1 -0
- package/lib/esm/node_modules/{vscode-jsonrpc → vscode-languageserver-protocol/node_modules/vscode-jsonrpc}/lib/browser/ril.js +2 -2
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.js.map +1 -0
- package/lib/esm/node_modules/{vscode-jsonrpc → vscode-languageserver-protocol/node_modules/vscode-jsonrpc}/lib/common/api.js +14 -14
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.js.map +1 -0
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.js +61 -0
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.js.map +1 -0
- package/lib/esm/node_modules/{vscode-jsonrpc → vscode-languageserver-protocol/node_modules/vscode-jsonrpc}/lib/common/connection.js +9 -9
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.js.map +1 -0
- package/lib/esm/node_modules/{vscode-jsonrpc → vscode-languageserver-protocol/node_modules/vscode-jsonrpc}/lib/common/disposable.js +2 -2
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.js.map +1 -0
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.js +68 -0
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.js.map +1 -0
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.js +38 -0
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.js.map +1 -0
- package/lib/esm/node_modules/{vscode-jsonrpc → vscode-languageserver-protocol/node_modules/vscode-jsonrpc}/lib/common/linkedMap.js +2 -2
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.js.map +1 -0
- package/lib/esm/node_modules/{vscode-jsonrpc → vscode-languageserver-protocol/node_modules/vscode-jsonrpc}/lib/common/messageBuffer.js +2 -2
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js.map +1 -0
- package/lib/esm/node_modules/{vscode-jsonrpc → vscode-languageserver-protocol/node_modules/vscode-jsonrpc}/lib/common/messageReader.js +5 -5
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.js.map +1 -0
- package/lib/esm/node_modules/{vscode-jsonrpc → vscode-languageserver-protocol/node_modules/vscode-jsonrpc}/lib/common/messageWriter.js +5 -5
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.js.map +1 -0
- package/lib/esm/node_modules/{vscode-jsonrpc → vscode-languageserver-protocol/node_modules/vscode-jsonrpc}/lib/common/messages.js +2 -2
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.js.map +1 -0
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.js +22 -0
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.js.map +1 -0
- package/lib/esm/node_modules/{vscode-jsonrpc → vscode-languageserver-protocol/node_modules/vscode-jsonrpc}/lib/common/semaphore.js +2 -2
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.js.map +1 -0
- package/lib/esm/node_modules/{vscode-jsonrpc → vscode-languageserver-protocol/node_modules/vscode-jsonrpc}/lib/common/sharedArrayCancellation.js +2 -2
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js.map +1 -0
- package/package.json +6 -6
- package/lib/esm/node_modules/vscode-jsonrpc/browser.js +0 -11
- package/lib/esm/node_modules/vscode-jsonrpc/browser.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/browser/main.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/browser/ril.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/api.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/connection.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/disposable.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/linkedMap.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messageReader.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messageWriter.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messages.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/semaphore.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connection.js","names":[],"sources":["../../../../../../../../node_modules/vscode-jsonrpc/lib/common/connection.js"],"sourcesContent":["\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createMessageConnection = exports.ConnectionOptions = exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.RequestCancellationReceiverStrategy = exports.IdCancellationReceiverStrategy = exports.ConnectionStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.Trace = exports.NullLogger = exports.ProgressType = exports.ProgressToken = void 0;\nconst ral_1 = require(\"./ral\");\nconst Is = require(\"./is\");\nconst messages_1 = require(\"./messages\");\nconst linkedMap_1 = require(\"./linkedMap\");\nconst events_1 = require(\"./events\");\nconst cancellation_1 = require(\"./cancellation\");\nvar CancelNotification;\n(function (CancelNotification) {\n CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');\n})(CancelNotification || (CancelNotification = {}));\nvar ProgressToken;\n(function (ProgressToken) {\n function is(value) {\n return typeof value === 'string' || typeof value === 'number';\n }\n ProgressToken.is = is;\n})(ProgressToken || (exports.ProgressToken = ProgressToken = {}));\nvar ProgressNotification;\n(function (ProgressNotification) {\n ProgressNotification.type = new messages_1.NotificationType('$/progress');\n})(ProgressNotification || (ProgressNotification = {}));\nclass ProgressType {\n constructor() {\n }\n}\nexports.ProgressType = ProgressType;\nvar StarRequestHandler;\n(function (StarRequestHandler) {\n function is(value) {\n return Is.func(value);\n }\n StarRequestHandler.is = is;\n})(StarRequestHandler || (StarRequestHandler = {}));\nexports.NullLogger = Object.freeze({\n error: () => { },\n warn: () => { },\n info: () => { },\n log: () => { }\n});\nvar Trace;\n(function (Trace) {\n Trace[Trace[\"Off\"] = 0] = \"Off\";\n Trace[Trace[\"Messages\"] = 1] = \"Messages\";\n Trace[Trace[\"Compact\"] = 2] = \"Compact\";\n Trace[Trace[\"Verbose\"] = 3] = \"Verbose\";\n})(Trace || (exports.Trace = Trace = {}));\nvar TraceValues;\n(function (TraceValues) {\n /**\n * Turn tracing off.\n */\n TraceValues.Off = 'off';\n /**\n * Trace messages only.\n */\n TraceValues.Messages = 'messages';\n /**\n * Compact message tracing.\n */\n TraceValues.Compact = 'compact';\n /**\n * Verbose message tracing.\n */\n TraceValues.Verbose = 'verbose';\n})(TraceValues || (exports.TraceValues = TraceValues = {}));\n(function (Trace) {\n function fromString(value) {\n if (!Is.string(value)) {\n return Trace.Off;\n }\n value = value.toLowerCase();\n switch (value) {\n case 'off':\n return Trace.Off;\n case 'messages':\n return Trace.Messages;\n case 'compact':\n return Trace.Compact;\n case 'verbose':\n return Trace.Verbose;\n default:\n return Trace.Off;\n }\n }\n Trace.fromString = fromString;\n function toString(value) {\n switch (value) {\n case Trace.Off:\n return 'off';\n case Trace.Messages:\n return 'messages';\n case Trace.Compact:\n return 'compact';\n case Trace.Verbose:\n return 'verbose';\n default:\n return 'off';\n }\n }\n Trace.toString = toString;\n})(Trace || (exports.Trace = Trace = {}));\nvar TraceFormat;\n(function (TraceFormat) {\n TraceFormat[\"Text\"] = \"text\";\n TraceFormat[\"JSON\"] = \"json\";\n})(TraceFormat || (exports.TraceFormat = TraceFormat = {}));\n(function (TraceFormat) {\n function fromString(value) {\n if (!Is.string(value)) {\n return TraceFormat.Text;\n }\n value = value.toLowerCase();\n if (value === 'json') {\n return TraceFormat.JSON;\n }\n else {\n return TraceFormat.Text;\n }\n }\n TraceFormat.fromString = fromString;\n})(TraceFormat || (exports.TraceFormat = TraceFormat = {}));\nvar SetTraceNotification;\n(function (SetTraceNotification) {\n SetTraceNotification.type = new messages_1.NotificationType('$/setTrace');\n})(SetTraceNotification || (exports.SetTraceNotification = SetTraceNotification = {}));\nvar LogTraceNotification;\n(function (LogTraceNotification) {\n LogTraceNotification.type = new messages_1.NotificationType('$/logTrace');\n})(LogTraceNotification || (exports.LogTraceNotification = LogTraceNotification = {}));\nvar ConnectionErrors;\n(function (ConnectionErrors) {\n /**\n * The connection is closed.\n */\n ConnectionErrors[ConnectionErrors[\"Closed\"] = 1] = \"Closed\";\n /**\n * The connection got disposed.\n */\n ConnectionErrors[ConnectionErrors[\"Disposed\"] = 2] = \"Disposed\";\n /**\n * The connection is already in listening mode.\n */\n ConnectionErrors[ConnectionErrors[\"AlreadyListening\"] = 3] = \"AlreadyListening\";\n})(ConnectionErrors || (exports.ConnectionErrors = ConnectionErrors = {}));\nclass ConnectionError extends Error {\n constructor(code, message) {\n super(message);\n this.code = code;\n Object.setPrototypeOf(this, ConnectionError.prototype);\n }\n}\nexports.ConnectionError = ConnectionError;\nvar ConnectionStrategy;\n(function (ConnectionStrategy) {\n function is(value) {\n const candidate = value;\n return candidate && Is.func(candidate.cancelUndispatched);\n }\n ConnectionStrategy.is = is;\n})(ConnectionStrategy || (exports.ConnectionStrategy = ConnectionStrategy = {}));\nvar IdCancellationReceiverStrategy;\n(function (IdCancellationReceiverStrategy) {\n function is(value) {\n const candidate = value;\n return candidate && (candidate.kind === undefined || candidate.kind === 'id') && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose));\n }\n IdCancellationReceiverStrategy.is = is;\n})(IdCancellationReceiverStrategy || (exports.IdCancellationReceiverStrategy = IdCancellationReceiverStrategy = {}));\nvar RequestCancellationReceiverStrategy;\n(function (RequestCancellationReceiverStrategy) {\n function is(value) {\n const candidate = value;\n return candidate && candidate.kind === 'request' && Is.func(candidate.createCancellationTokenSource) && (candidate.dispose === undefined || Is.func(candidate.dispose));\n }\n RequestCancellationReceiverStrategy.is = is;\n})(RequestCancellationReceiverStrategy || (exports.RequestCancellationReceiverStrategy = RequestCancellationReceiverStrategy = {}));\nvar CancellationReceiverStrategy;\n(function (CancellationReceiverStrategy) {\n CancellationReceiverStrategy.Message = Object.freeze({\n createCancellationTokenSource(_) {\n return new cancellation_1.CancellationTokenSource();\n }\n });\n function is(value) {\n return IdCancellationReceiverStrategy.is(value) || RequestCancellationReceiverStrategy.is(value);\n }\n CancellationReceiverStrategy.is = is;\n})(CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = CancellationReceiverStrategy = {}));\nvar CancellationSenderStrategy;\n(function (CancellationSenderStrategy) {\n CancellationSenderStrategy.Message = Object.freeze({\n sendCancellation(conn, id) {\n return conn.sendNotification(CancelNotification.type, { id });\n },\n cleanup(_) { }\n });\n function is(value) {\n const candidate = value;\n return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup);\n }\n CancellationSenderStrategy.is = is;\n})(CancellationSenderStrategy || (exports.CancellationSenderStrategy = CancellationSenderStrategy = {}));\nvar CancellationStrategy;\n(function (CancellationStrategy) {\n CancellationStrategy.Message = Object.freeze({\n receiver: CancellationReceiverStrategy.Message,\n sender: CancellationSenderStrategy.Message\n });\n function is(value) {\n const candidate = value;\n return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender);\n }\n CancellationStrategy.is = is;\n})(CancellationStrategy || (exports.CancellationStrategy = CancellationStrategy = {}));\nvar MessageStrategy;\n(function (MessageStrategy) {\n function is(value) {\n const candidate = value;\n return candidate && Is.func(candidate.handleMessage);\n }\n MessageStrategy.is = is;\n})(MessageStrategy || (exports.MessageStrategy = MessageStrategy = {}));\nvar ConnectionOptions;\n(function (ConnectionOptions) {\n function is(value) {\n const candidate = value;\n return candidate && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy) || MessageStrategy.is(candidate.messageStrategy));\n }\n ConnectionOptions.is = is;\n})(ConnectionOptions || (exports.ConnectionOptions = ConnectionOptions = {}));\nvar ConnectionState;\n(function (ConnectionState) {\n ConnectionState[ConnectionState[\"New\"] = 1] = \"New\";\n ConnectionState[ConnectionState[\"Listening\"] = 2] = \"Listening\";\n ConnectionState[ConnectionState[\"Closed\"] = 3] = \"Closed\";\n ConnectionState[ConnectionState[\"Disposed\"] = 4] = \"Disposed\";\n})(ConnectionState || (ConnectionState = {}));\nfunction createMessageConnection(messageReader, messageWriter, _logger, options) {\n const logger = _logger !== undefined ? _logger : exports.NullLogger;\n let sequenceNumber = 0;\n let notificationSequenceNumber = 0;\n let unknownResponseSequenceNumber = 0;\n const version = '2.0';\n let starRequestHandler = undefined;\n const requestHandlers = new Map();\n let starNotificationHandler = undefined;\n const notificationHandlers = new Map();\n const progressHandlers = new Map();\n let timer;\n let messageQueue = new linkedMap_1.LinkedMap();\n let responsePromises = new Map();\n let knownCanceledRequests = new Set();\n let requestTokens = new Map();\n let trace = Trace.Off;\n let traceFormat = TraceFormat.Text;\n let tracer;\n let state = ConnectionState.New;\n const errorEmitter = new events_1.Emitter();\n const closeEmitter = new events_1.Emitter();\n const unhandledNotificationEmitter = new events_1.Emitter();\n const unhandledProgressEmitter = new events_1.Emitter();\n const disposeEmitter = new events_1.Emitter();\n const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message;\n function createRequestQueueKey(id) {\n if (id === null) {\n throw new Error(`Can't send requests with id null since the response can't be correlated.`);\n }\n return 'req-' + id.toString();\n }\n function createResponseQueueKey(id) {\n if (id === null) {\n return 'res-unknown-' + (++unknownResponseSequenceNumber).toString();\n }\n else {\n return 'res-' + id.toString();\n }\n }\n function createNotificationQueueKey() {\n return 'not-' + (++notificationSequenceNumber).toString();\n }\n function addMessageToQueue(queue, message) {\n if (messages_1.Message.isRequest(message)) {\n queue.set(createRequestQueueKey(message.id), message);\n }\n else if (messages_1.Message.isResponse(message)) {\n queue.set(createResponseQueueKey(message.id), message);\n }\n else {\n queue.set(createNotificationQueueKey(), message);\n }\n }\n function cancelUndispatched(_message) {\n return undefined;\n }\n function isListening() {\n return state === ConnectionState.Listening;\n }\n function isClosed() {\n return state === ConnectionState.Closed;\n }\n function isDisposed() {\n return state === ConnectionState.Disposed;\n }\n function closeHandler() {\n if (state === ConnectionState.New || state === ConnectionState.Listening) {\n state = ConnectionState.Closed;\n closeEmitter.fire(undefined);\n }\n // If the connection is disposed don't sent close events.\n }\n function readErrorHandler(error) {\n errorEmitter.fire([error, undefined, undefined]);\n }\n function writeErrorHandler(data) {\n errorEmitter.fire(data);\n }\n messageReader.onClose(closeHandler);\n messageReader.onError(readErrorHandler);\n messageWriter.onClose(closeHandler);\n messageWriter.onError(writeErrorHandler);\n function triggerMessageQueue() {\n if (timer || messageQueue.size === 0) {\n return;\n }\n timer = (0, ral_1.default)().timer.setImmediate(() => {\n timer = undefined;\n processMessageQueue();\n });\n }\n function handleMessage(message) {\n if (messages_1.Message.isRequest(message)) {\n handleRequest(message);\n }\n else if (messages_1.Message.isNotification(message)) {\n handleNotification(message);\n }\n else if (messages_1.Message.isResponse(message)) {\n handleResponse(message);\n }\n else {\n handleInvalidMessage(message);\n }\n }\n function processMessageQueue() {\n if (messageQueue.size === 0) {\n return;\n }\n const message = messageQueue.shift();\n try {\n const messageStrategy = options?.messageStrategy;\n if (MessageStrategy.is(messageStrategy)) {\n messageStrategy.handleMessage(message, handleMessage);\n }\n else {\n handleMessage(message);\n }\n }\n finally {\n triggerMessageQueue();\n }\n }\n const callback = (message) => {\n try {\n // We have received a cancellation message. Check if the message is still in the queue\n // and cancel it if allowed to do so.\n if (messages_1.Message.isNotification(message) && message.method === CancelNotification.type.method) {\n const cancelId = message.params.id;\n const key = createRequestQueueKey(cancelId);\n const toCancel = messageQueue.get(key);\n if (messages_1.Message.isRequest(toCancel)) {\n const strategy = options?.connectionStrategy;\n const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);\n if (response && (response.error !== undefined || response.result !== undefined)) {\n messageQueue.delete(key);\n requestTokens.delete(cancelId);\n response.id = toCancel.id;\n traceSendingResponse(response, message.method, Date.now());\n messageWriter.write(response).catch(() => logger.error(`Sending response for canceled message failed.`));\n return;\n }\n }\n const cancellationToken = requestTokens.get(cancelId);\n // The request is already running. Cancel the token\n if (cancellationToken !== undefined) {\n cancellationToken.cancel();\n traceReceivedNotification(message);\n return;\n }\n else {\n // Remember the cancel but still queue the message to\n // clean up state in process message.\n knownCanceledRequests.add(cancelId);\n }\n }\n addMessageToQueue(messageQueue, message);\n }\n finally {\n triggerMessageQueue();\n }\n };\n function handleRequest(requestMessage) {\n if (isDisposed()) {\n // we return here silently since we fired an event when the\n // connection got disposed.\n return;\n }\n function reply(resultOrError, method, startTime) {\n const message = {\n jsonrpc: version,\n id: requestMessage.id\n };\n if (resultOrError instanceof messages_1.ResponseError) {\n message.error = resultOrError.toJson();\n }\n else {\n message.result = resultOrError === undefined ? null : resultOrError;\n }\n traceSendingResponse(message, method, startTime);\n messageWriter.write(message).catch(() => logger.error(`Sending response failed.`));\n }\n function replyError(error, method, startTime) {\n const message = {\n jsonrpc: version,\n id: requestMessage.id,\n error: error.toJson()\n };\n traceSendingResponse(message, method, startTime);\n messageWriter.write(message).catch(() => logger.error(`Sending response failed.`));\n }\n function replySuccess(result, method, startTime) {\n // The JSON RPC defines that a response must either have a result or an error\n // So we can't treat undefined as a valid response result.\n if (result === undefined) {\n result = null;\n }\n const message = {\n jsonrpc: version,\n id: requestMessage.id,\n result: result\n };\n traceSendingResponse(message, method, startTime);\n messageWriter.write(message).catch(() => logger.error(`Sending response failed.`));\n }\n traceReceivedRequest(requestMessage);\n const element = requestHandlers.get(requestMessage.method);\n let type;\n let requestHandler;\n if (element) {\n type = element.type;\n requestHandler = element.handler;\n }\n const startTime = Date.now();\n if (requestHandler || starRequestHandler) {\n const tokenKey = requestMessage.id ?? String(Date.now()); //\n const cancellationSource = IdCancellationReceiverStrategy.is(cancellationStrategy.receiver)\n ? cancellationStrategy.receiver.createCancellationTokenSource(tokenKey)\n : cancellationStrategy.receiver.createCancellationTokenSource(requestMessage);\n if (requestMessage.id !== null && knownCanceledRequests.has(requestMessage.id)) {\n cancellationSource.cancel();\n }\n if (requestMessage.id !== null) {\n requestTokens.set(tokenKey, cancellationSource);\n }\n try {\n let handlerResult;\n if (requestHandler) {\n if (requestMessage.params === undefined) {\n if (type !== undefined && type.numberOfParams !== 0) {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines ${type.numberOfParams} params but received none.`), requestMessage.method, startTime);\n return;\n }\n handlerResult = requestHandler(cancellationSource.token);\n }\n else if (Array.isArray(requestMessage.params)) {\n if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byName) {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by name but received parameters by position`), requestMessage.method, startTime);\n return;\n }\n handlerResult = requestHandler(...requestMessage.params, cancellationSource.token);\n }\n else {\n if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by position but received parameters by name`), requestMessage.method, startTime);\n return;\n }\n handlerResult = requestHandler(requestMessage.params, cancellationSource.token);\n }\n }\n else if (starRequestHandler) {\n handlerResult = starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);\n }\n const promise = handlerResult;\n if (!handlerResult) {\n requestTokens.delete(tokenKey);\n replySuccess(handlerResult, requestMessage.method, startTime);\n }\n else if (promise.then) {\n promise.then((resultOrError) => {\n requestTokens.delete(tokenKey);\n reply(resultOrError, requestMessage.method, startTime);\n }, error => {\n requestTokens.delete(tokenKey);\n if (error instanceof messages_1.ResponseError) {\n replyError(error, requestMessage.method, startTime);\n }\n else if (error && Is.string(error.message)) {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);\n }\n else {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);\n }\n });\n }\n else {\n requestTokens.delete(tokenKey);\n reply(handlerResult, requestMessage.method, startTime);\n }\n }\n catch (error) {\n requestTokens.delete(tokenKey);\n if (error instanceof messages_1.ResponseError) {\n reply(error, requestMessage.method, startTime);\n }\n else if (error && Is.string(error.message)) {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);\n }\n else {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);\n }\n }\n }\n else {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);\n }\n }\n function handleResponse(responseMessage) {\n if (isDisposed()) {\n // See handle request.\n return;\n }\n if (responseMessage.id === null) {\n if (responseMessage.error) {\n logger.error(`Received response message without id: Error is: \\n${JSON.stringify(responseMessage.error, undefined, 4)}`);\n }\n else {\n logger.error(`Received response message without id. No further error information provided.`);\n }\n }\n else {\n const key = responseMessage.id;\n const responsePromise = responsePromises.get(key);\n traceReceivedResponse(responseMessage, responsePromise);\n if (responsePromise !== undefined) {\n responsePromises.delete(key);\n try {\n if (responseMessage.error) {\n const error = responseMessage.error;\n responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));\n }\n else if (responseMessage.result !== undefined) {\n responsePromise.resolve(responseMessage.result);\n }\n else {\n throw new Error('Should never happen.');\n }\n }\n catch (error) {\n if (error.message) {\n logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);\n }\n else {\n logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);\n }\n }\n }\n }\n }\n function handleNotification(message) {\n if (isDisposed()) {\n // See handle request.\n return;\n }\n let type = undefined;\n let notificationHandler;\n if (message.method === CancelNotification.type.method) {\n const cancelId = message.params.id;\n knownCanceledRequests.delete(cancelId);\n traceReceivedNotification(message);\n return;\n }\n else {\n const element = notificationHandlers.get(message.method);\n if (element) {\n notificationHandler = element.handler;\n type = element.type;\n }\n }\n if (notificationHandler || starNotificationHandler) {\n try {\n traceReceivedNotification(message);\n if (notificationHandler) {\n if (message.params === undefined) {\n if (type !== undefined) {\n if (type.numberOfParams !== 0 && type.parameterStructures !== messages_1.ParameterStructures.byName) {\n logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received none.`);\n }\n }\n notificationHandler();\n }\n else if (Array.isArray(message.params)) {\n // There are JSON-RPC libraries that send progress message as positional params although\n // specified as named. So convert them if this is the case.\n const params = message.params;\n if (message.method === ProgressNotification.type.method && params.length === 2 && ProgressToken.is(params[0])) {\n notificationHandler({ token: params[0], value: params[1] });\n }\n else {\n if (type !== undefined) {\n if (type.parameterStructures === messages_1.ParameterStructures.byName) {\n logger.error(`Notification ${message.method} defines parameters by name but received parameters by position`);\n }\n if (type.numberOfParams !== message.params.length) {\n logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received ${params.length} arguments`);\n }\n }\n notificationHandler(...params);\n }\n }\n else {\n if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) {\n logger.error(`Notification ${message.method} defines parameters by position but received parameters by name`);\n }\n notificationHandler(message.params);\n }\n }\n else if (starNotificationHandler) {\n starNotificationHandler(message.method, message.params);\n }\n }\n catch (error) {\n if (error.message) {\n logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);\n }\n else {\n logger.error(`Notification handler '${message.method}' failed unexpectedly.`);\n }\n }\n }\n else {\n unhandledNotificationEmitter.fire(message);\n }\n }\n function handleInvalidMessage(message) {\n if (!message) {\n logger.error('Received empty message.');\n return;\n }\n logger.error(`Received message which is neither a response nor a notification message:\\n${JSON.stringify(message, null, 4)}`);\n // Test whether we find an id to reject the promise\n const responseMessage = message;\n if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {\n const key = responseMessage.id;\n const responseHandler = responsePromises.get(key);\n if (responseHandler) {\n responseHandler.reject(new Error('The received response has neither a result nor an error property.'));\n }\n }\n }\n function stringifyTrace(params) {\n if (params === undefined || params === null) {\n return undefined;\n }\n switch (trace) {\n case Trace.Verbose:\n return JSON.stringify(params, null, 4);\n case Trace.Compact:\n return JSON.stringify(params);\n default:\n return undefined;\n }\n }\n function traceSendingRequest(message) {\n if (trace === Trace.Off || !tracer) {\n return;\n }\n if (traceFormat === TraceFormat.Text) {\n let data = undefined;\n if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) {\n data = `Params: ${stringifyTrace(message.params)}\\n\\n`;\n }\n tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);\n }\n else {\n logLSPMessage('send-request', message);\n }\n }\n function traceSendingNotification(message) {\n if (trace === Trace.Off || !tracer) {\n return;\n }\n if (traceFormat === TraceFormat.Text) {\n let data = undefined;\n if (trace === Trace.Verbose || trace === Trace.Compact) {\n if (message.params) {\n data = `Params: ${stringifyTrace(message.params)}\\n\\n`;\n }\n else {\n data = 'No parameters provided.\\n\\n';\n }\n }\n tracer.log(`Sending notification '${message.method}'.`, data);\n }\n else {\n logLSPMessage('send-notification', message);\n }\n }\n function traceSendingResponse(message, method, startTime) {\n if (trace === Trace.Off || !tracer) {\n return;\n }\n if (traceFormat === TraceFormat.Text) {\n let data = undefined;\n if (trace === Trace.Verbose || trace === Trace.Compact) {\n if (message.error && message.error.data) {\n data = `Error data: ${stringifyTrace(message.error.data)}\\n\\n`;\n }\n else {\n if (message.result) {\n data = `Result: ${stringifyTrace(message.result)}\\n\\n`;\n }\n else if (message.error === undefined) {\n data = 'No result returned.\\n\\n';\n }\n }\n }\n tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);\n }\n else {\n logLSPMessage('send-response', message);\n }\n }\n function traceReceivedRequest(message) {\n if (trace === Trace.Off || !tracer) {\n return;\n }\n if (traceFormat === TraceFormat.Text) {\n let data = undefined;\n if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) {\n data = `Params: ${stringifyTrace(message.params)}\\n\\n`;\n }\n tracer.log(`Received request '${message.method} - (${message.id})'.`, data);\n }\n else {\n logLSPMessage('receive-request', message);\n }\n }\n function traceReceivedNotification(message) {\n if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {\n return;\n }\n if (traceFormat === TraceFormat.Text) {\n let data = undefined;\n if (trace === Trace.Verbose || trace === Trace.Compact) {\n if (message.params) {\n data = `Params: ${stringifyTrace(message.params)}\\n\\n`;\n }\n else {\n data = 'No parameters provided.\\n\\n';\n }\n }\n tracer.log(`Received notification '${message.method}'.`, data);\n }\n else {\n logLSPMessage('receive-notification', message);\n }\n }\n function traceReceivedResponse(message, responsePromise) {\n if (trace === Trace.Off || !tracer) {\n return;\n }\n if (traceFormat === TraceFormat.Text) {\n let data = undefined;\n if (trace === Trace.Verbose || trace === Trace.Compact) {\n if (message.error && message.error.data) {\n data = `Error data: ${stringifyTrace(message.error.data)}\\n\\n`;\n }\n else {\n if (message.result) {\n data = `Result: ${stringifyTrace(message.result)}\\n\\n`;\n }\n else if (message.error === undefined) {\n data = 'No result returned.\\n\\n';\n }\n }\n }\n if (responsePromise) {\n const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';\n tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);\n }\n else {\n tracer.log(`Received response ${message.id} without active response promise.`, data);\n }\n }\n else {\n logLSPMessage('receive-response', message);\n }\n }\n function logLSPMessage(type, message) {\n if (!tracer || trace === Trace.Off) {\n return;\n }\n const lspMessage = {\n isLSPMessage: true,\n type,\n message,\n timestamp: Date.now()\n };\n tracer.log(lspMessage);\n }\n function throwIfClosedOrDisposed() {\n if (isClosed()) {\n throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');\n }\n if (isDisposed()) {\n throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');\n }\n }\n function throwIfListening() {\n if (isListening()) {\n throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');\n }\n }\n function throwIfNotListening() {\n if (!isListening()) {\n throw new Error('Call listen() first.');\n }\n }\n function undefinedToNull(param) {\n if (param === undefined) {\n return null;\n }\n else {\n return param;\n }\n }\n function nullToUndefined(param) {\n if (param === null) {\n return undefined;\n }\n else {\n return param;\n }\n }\n function isNamedParam(param) {\n return param !== undefined && param !== null && !Array.isArray(param) && typeof param === 'object';\n }\n function computeSingleParam(parameterStructures, param) {\n switch (parameterStructures) {\n case messages_1.ParameterStructures.auto:\n if (isNamedParam(param)) {\n return nullToUndefined(param);\n }\n else {\n return [undefinedToNull(param)];\n }\n case messages_1.ParameterStructures.byName:\n if (!isNamedParam(param)) {\n throw new Error(`Received parameters by name but param is not an object literal.`);\n }\n return nullToUndefined(param);\n case messages_1.ParameterStructures.byPosition:\n return [undefinedToNull(param)];\n default:\n throw new Error(`Unknown parameter structure ${parameterStructures.toString()}`);\n }\n }\n function computeMessageParams(type, params) {\n let result;\n const numberOfParams = type.numberOfParams;\n switch (numberOfParams) {\n case 0:\n result = undefined;\n break;\n case 1:\n result = computeSingleParam(type.parameterStructures, params[0]);\n break;\n default:\n result = [];\n for (let i = 0; i < params.length && i < numberOfParams; i++) {\n result.push(undefinedToNull(params[i]));\n }\n if (params.length < numberOfParams) {\n for (let i = params.length; i < numberOfParams; i++) {\n result.push(null);\n }\n }\n break;\n }\n return result;\n }\n const connection = {\n sendNotification: (type, ...args) => {\n throwIfClosedOrDisposed();\n let method;\n let messageParams;\n if (Is.string(type)) {\n method = type;\n const first = args[0];\n let paramStart = 0;\n let parameterStructures = messages_1.ParameterStructures.auto;\n if (messages_1.ParameterStructures.is(first)) {\n paramStart = 1;\n parameterStructures = first;\n }\n let paramEnd = args.length;\n const numberOfParams = paramEnd - paramStart;\n switch (numberOfParams) {\n case 0:\n messageParams = undefined;\n break;\n case 1:\n messageParams = computeSingleParam(parameterStructures, args[paramStart]);\n break;\n default:\n if (parameterStructures === messages_1.ParameterStructures.byName) {\n throw new Error(`Received ${numberOfParams} parameters for 'by Name' notification parameter structure.`);\n }\n messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value));\n break;\n }\n }\n else {\n const params = args;\n method = type.method;\n messageParams = computeMessageParams(type, params);\n }\n const notificationMessage = {\n jsonrpc: version,\n method: method,\n params: messageParams\n };\n traceSendingNotification(notificationMessage);\n return messageWriter.write(notificationMessage).catch((error) => {\n logger.error(`Sending notification failed.`);\n throw error;\n });\n },\n onNotification: (type, handler) => {\n throwIfClosedOrDisposed();\n let method;\n if (Is.func(type)) {\n starNotificationHandler = type;\n }\n else if (handler) {\n if (Is.string(type)) {\n method = type;\n notificationHandlers.set(type, { type: undefined, handler });\n }\n else {\n method = type.method;\n notificationHandlers.set(type.method, { type, handler });\n }\n }\n return {\n dispose: () => {\n if (method !== undefined) {\n notificationHandlers.delete(method);\n }\n else {\n starNotificationHandler = undefined;\n }\n }\n };\n },\n onProgress: (_type, token, handler) => {\n if (progressHandlers.has(token)) {\n throw new Error(`Progress handler for token ${token} already registered`);\n }\n progressHandlers.set(token, handler);\n return {\n dispose: () => {\n progressHandlers.delete(token);\n }\n };\n },\n sendProgress: (_type, token, value) => {\n // This should not await but simple return to ensure that we don't have another\n // async scheduling. Otherwise one send could overtake another send.\n return connection.sendNotification(ProgressNotification.type, { token, value });\n },\n onUnhandledProgress: unhandledProgressEmitter.event,\n sendRequest: (type, ...args) => {\n throwIfClosedOrDisposed();\n throwIfNotListening();\n let method;\n let messageParams;\n let token = undefined;\n if (Is.string(type)) {\n method = type;\n const first = args[0];\n const last = args[args.length - 1];\n let paramStart = 0;\n let parameterStructures = messages_1.ParameterStructures.auto;\n if (messages_1.ParameterStructures.is(first)) {\n paramStart = 1;\n parameterStructures = first;\n }\n let paramEnd = args.length;\n if (cancellation_1.CancellationToken.is(last)) {\n paramEnd = paramEnd - 1;\n token = last;\n }\n const numberOfParams = paramEnd - paramStart;\n switch (numberOfParams) {\n case 0:\n messageParams = undefined;\n break;\n case 1:\n messageParams = computeSingleParam(parameterStructures, args[paramStart]);\n break;\n default:\n if (parameterStructures === messages_1.ParameterStructures.byName) {\n throw new Error(`Received ${numberOfParams} parameters for 'by Name' request parameter structure.`);\n }\n messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value));\n break;\n }\n }\n else {\n const params = args;\n method = type.method;\n messageParams = computeMessageParams(type, params);\n const numberOfParams = type.numberOfParams;\n token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;\n }\n const id = sequenceNumber++;\n let disposable;\n if (token) {\n disposable = token.onCancellationRequested(() => {\n const p = cancellationStrategy.sender.sendCancellation(connection, id);\n if (p === undefined) {\n logger.log(`Received no promise from cancellation strategy when cancelling id ${id}`);\n return Promise.resolve();\n }\n else {\n return p.catch(() => {\n logger.log(`Sending cancellation messages for id ${id} failed`);\n });\n }\n });\n }\n const requestMessage = {\n jsonrpc: version,\n id: id,\n method: method,\n params: messageParams\n };\n traceSendingRequest(requestMessage);\n if (typeof cancellationStrategy.sender.enableCancellation === 'function') {\n cancellationStrategy.sender.enableCancellation(requestMessage);\n }\n return new Promise(async (resolve, reject) => {\n const resolveWithCleanup = (r) => {\n resolve(r);\n cancellationStrategy.sender.cleanup(id);\n disposable?.dispose();\n };\n const rejectWithCleanup = (r) => {\n reject(r);\n cancellationStrategy.sender.cleanup(id);\n disposable?.dispose();\n };\n const responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup };\n try {\n await messageWriter.write(requestMessage);\n responsePromises.set(id, responsePromise);\n }\n catch (error) {\n logger.error(`Sending request failed.`);\n // Writing the message failed. So we need to reject the promise.\n responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, error.message ? error.message : 'Unknown reason'));\n throw error;\n }\n });\n },\n onRequest: (type, handler) => {\n throwIfClosedOrDisposed();\n let method = null;\n if (StarRequestHandler.is(type)) {\n method = undefined;\n starRequestHandler = type;\n }\n else if (Is.string(type)) {\n method = null;\n if (handler !== undefined) {\n method = type;\n requestHandlers.set(type, { handler: handler, type: undefined });\n }\n }\n else {\n if (handler !== undefined) {\n method = type.method;\n requestHandlers.set(type.method, { type, handler });\n }\n }\n return {\n dispose: () => {\n if (method === null) {\n return;\n }\n if (method !== undefined) {\n requestHandlers.delete(method);\n }\n else {\n starRequestHandler = undefined;\n }\n }\n };\n },\n hasPendingResponse: () => {\n return responsePromises.size > 0;\n },\n trace: async (_value, _tracer, sendNotificationOrTraceOptions) => {\n let _sendNotification = false;\n let _traceFormat = TraceFormat.Text;\n if (sendNotificationOrTraceOptions !== undefined) {\n if (Is.boolean(sendNotificationOrTraceOptions)) {\n _sendNotification = sendNotificationOrTraceOptions;\n }\n else {\n _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;\n _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;\n }\n }\n trace = _value;\n traceFormat = _traceFormat;\n if (trace === Trace.Off) {\n tracer = undefined;\n }\n else {\n tracer = _tracer;\n }\n if (_sendNotification && !isClosed() && !isDisposed()) {\n await connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });\n }\n },\n onError: errorEmitter.event,\n onClose: closeEmitter.event,\n onUnhandledNotification: unhandledNotificationEmitter.event,\n onDispose: disposeEmitter.event,\n end: () => {\n messageWriter.end();\n },\n dispose: () => {\n if (isDisposed()) {\n return;\n }\n state = ConnectionState.Disposed;\n disposeEmitter.fire(undefined);\n const error = new messages_1.ResponseError(messages_1.ErrorCodes.PendingResponseRejected, 'Pending response rejected since connection got disposed');\n for (const promise of responsePromises.values()) {\n promise.reject(error);\n }\n responsePromises = new Map();\n requestTokens = new Map();\n knownCanceledRequests = new Set();\n messageQueue = new linkedMap_1.LinkedMap();\n // Test for backwards compatibility\n if (Is.func(messageWriter.dispose)) {\n messageWriter.dispose();\n }\n if (Is.func(messageReader.dispose)) {\n messageReader.dispose();\n }\n },\n listen: () => {\n throwIfClosedOrDisposed();\n throwIfListening();\n state = ConnectionState.Listening;\n messageReader.listen(callback);\n },\n inspect: () => {\n // eslint-disable-next-line no-console\n (0, ral_1.default)().console.log('inspect');\n }\n };\n connection.onNotification(LogTraceNotification.type, (params) => {\n if (trace === Trace.Off || !tracer) {\n return;\n }\n const verbose = trace === Trace.Verbose || trace === Trace.Compact;\n tracer.log(params.message, verbose ? params.verbose : undefined);\n });\n connection.onNotification(ProgressNotification.type, (params) => {\n const handler = progressHandlers.get(params.token);\n if (handler) {\n handler(params.value);\n }\n else {\n unhandledProgressEmitter.fire(params);\n }\n });\n return connection;\n}\nexports.createMessageConnection = createMessageConnection;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;CAMA,AADA,OAAO,eAAe,GAAS,cAAc,EAAE,OAAO,IAAM,CAAC,EAC7D,EAAQ,0BAA0B,EAAQ,oBAAoB,EAAQ,kBAAkB,EAAQ,uBAAuB,EAAQ,6BAA6B,EAAQ,+BAA+B,EAAQ,sCAAsC,EAAQ,iCAAiC,EAAQ,qBAAqB,EAAQ,kBAAkB,EAAQ,mBAAmB,EAAQ,uBAAuB,EAAQ,uBAAuB,EAAQ,cAAc,EAAQ,cAAc,EAAQ,QAAQ,EAAQ,aAAa,EAAQ,eAAe,EAAQ,gBAAgB,KAAK;CAC/iB,IAAM,IAAA,GAAA,EACA,IAAA,GAAA,EACA,IAAA,GAAA,EACA,IAAA,GAAA,EACA,IAAA,GAAA,EACA,IAAA,GAAA,EACF;CACJ,CAAC,SAAU,GAAoB;EAC3B,EAAmB,OAAO,IAAI,EAAW,iBAAiB,kBAAkB;IAC7E,AAAuB,MAAqB,EAAE,CAAE;CACnD,IAAI;CACJ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c,SAAS,EAEvB,EAAG,KAAK,EAAc,QAAQ,IAC9B,EAAc,SAAS;;GAG/B,cAAc;IAIV,AAHA,GAAyB,EACzB,IAAkB,EAClB,IAAQ,EAAgB,WACxB,EAAc,OAAO,GAAS;;GAElC,eAAe;IAEX,CAAC,GAAG,EAAM,UAAU,CAAC,QAAQ,IAAI,UAAU;;GAElD;EAiBD,OAhBA,EAAW,eAAe,EAAqB,OAAO,MAAW;GAC7D,IAAI,MAAU,EAAM,OAAO,CAAC,GACxB;GAEJ,IAAM,IAAU,MAAU,EAAM,WAAW,MAAU,EAAM;GAC3D,EAAO,IAAI,EAAO,SAAS,IAAU,EAAO,UAAU,KAAA,EAAU;IAClE,EACF,EAAW,eAAe,EAAqB,OAAO,MAAW;GAC7D,IAAM,IAAU,EAAiB,IAAI,EAAO,MAAM;GAClD,AAAI,IACA,EAAQ,EAAO,MAAM,GAGrB,GAAyB,KAAK,EAAO;IAE3C,EACK;;CAEX,EAAQ,0BAA0B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"disposable.js","names":[],"sources":["../../../../../../../../node_modules/vscode-jsonrpc/lib/common/disposable.js"],"sourcesContent":["\"use strict\";\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Disposable = void 0;\nvar Disposable;\n(function (Disposable) {\n function create(func) {\n return {\n dispose: func\n };\n }\n Disposable.create = create;\n})(Disposable || (exports.Disposable = Disposable = {}));\n"],"x_google_ignoreList":[0],"mappings":";;;CAMA,AADA,OAAO,eAAe,GAAS,cAAc,EAAE,OAAO,IAAM,CAAC,EAC7D,EAAQ,aAAa,KAAK;CAC1B,IAAI;CACJ,CAAC,SAAU,GAAY;EACnB,SAAS,EAAO,GAAM;GAClB,OAAO,EACH,SAAS,GACZ;;EAEL,EAAW,SAAS;IACrB,MAAe,EAAQ,aAAa,IAAa,EAAE,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linkedMap.js","names":[],"sources":["../../../../../../../../node_modules/vscode-jsonrpc/lib/common/linkedMap.js"],"sourcesContent":["\"use strict\";\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LRUCache = exports.LinkedMap = exports.Touch = void 0;\nvar Touch;\n(function (Touch) {\n Touch.None = 0;\n Touch.First = 1;\n Touch.AsOld = Touch.First;\n Touch.Last = 2;\n Touch.AsNew = Touch.Last;\n})(Touch || (exports.Touch = Touch = {}));\nclass LinkedMap {\n constructor() {\n this[_a] = 'LinkedMap';\n this._map = new Map();\n this._head = undefined;\n this._tail = undefined;\n this._size = 0;\n this._state = 0;\n }\n clear() {\n this._map.clear();\n this._head = undefined;\n this._tail = undefined;\n this._size = 0;\n this._state++;\n }\n isEmpty() {\n return !this._head && !this._tail;\n }\n get size() {\n return this._size;\n }\n get first() {\n return this._head?.value;\n }\n get last() {\n return this._tail?.value;\n }\n has(key) {\n return this._map.has(key);\n }\n get(key, touch = Touch.None) {\n const item = this._map.get(key);\n if (!item) {\n return undefined;\n }\n if (touch !== Touch.None) {\n this.touch(item, touch);\n }\n return item.value;\n }\n set(key, value, touch = Touch.None) {\n let item = this._map.get(key);\n if (item) {\n item.value = value;\n if (touch !== Touch.None) {\n this.touch(item, touch);\n }\n }\n else {\n item = { key, value, next: undefined, previous: undefined };\n switch (touch) {\n case Touch.None:\n this.addItemLast(item);\n break;\n case Touch.First:\n this.addItemFirst(item);\n break;\n case Touch.Last:\n this.addItemLast(item);\n break;\n default:\n this.addItemLast(item);\n break;\n }\n this._map.set(key, item);\n this._size++;\n }\n return this;\n }\n delete(key) {\n return !!this.remove(key);\n }\n remove(key) {\n const item = this._map.get(key);\n if (!item) {\n return undefined;\n }\n this._map.delete(key);\n this.removeItem(item);\n this._size--;\n return item.value;\n }\n shift() {\n if (!this._head && !this._tail) {\n return undefined;\n }\n if (!this._head || !this._tail) {\n throw new Error('Invalid list');\n }\n const item = this._head;\n this._map.delete(item.key);\n this.removeItem(item);\n this._size--;\n return item.value;\n }\n forEach(callbackfn, thisArg) {\n const state = this._state;\n let current = this._head;\n while (current) {\n if (thisArg) {\n callbackfn.bind(thisArg)(current.value, current.key, this);\n }\n else {\n callbackfn(current.value, current.key, this);\n }\n if (this._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n current = current.next;\n }\n }\n keys() {\n const state = this._state;\n let current = this._head;\n const iterator = {\n [Symbol.iterator]: () => {\n return iterator;\n },\n next: () => {\n if (this._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n if (current) {\n const result = { value: current.key, done: false };\n current = current.next;\n return result;\n }\n else {\n return { value: undefined, done: true };\n }\n }\n };\n return iterator;\n }\n values() {\n const state = this._state;\n let current = this._head;\n const iterator = {\n [Symbol.iterator]: () => {\n return iterator;\n },\n next: () => {\n if (this._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n if (current) {\n const result = { value: current.value, done: false };\n current = current.next;\n return result;\n }\n else {\n return { value: undefined, done: true };\n }\n }\n };\n return iterator;\n }\n entries() {\n const state = this._state;\n let current = this._head;\n const iterator = {\n [Symbol.iterator]: () => {\n return iterator;\n },\n next: () => {\n if (this._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n if (current) {\n const result = { value: [current.key, current.value], done: false };\n current = current.next;\n return result;\n }\n else {\n return { value: undefined, done: true };\n }\n }\n };\n return iterator;\n }\n [(_a = Symbol.toStringTag, Symbol.iterator)]() {\n return this.entries();\n }\n trimOld(newSize) {\n if (newSize >= this.size) {\n return;\n }\n if (newSize === 0) {\n this.clear();\n return;\n }\n let current = this._head;\n let currentSize = this.size;\n while (current && currentSize > newSize) {\n this._map.delete(current.key);\n current = current.next;\n currentSize--;\n }\n this._head = current;\n this._size = currentSize;\n if (current) {\n current.previous = undefined;\n }\n this._state++;\n }\n addItemFirst(item) {\n // First time Insert\n if (!this._head && !this._tail) {\n this._tail = item;\n }\n else if (!this._head) {\n throw new Error('Invalid list');\n }\n else {\n item.next = this._head;\n this._head.previous = item;\n }\n this._head = item;\n this._state++;\n }\n addItemLast(item) {\n // First time Insert\n if (!this._head && !this._tail) {\n this._head = item;\n }\n else if (!this._tail) {\n throw new Error('Invalid list');\n }\n else {\n item.previous = this._tail;\n this._tail.next = item;\n }\n this._tail = item;\n this._state++;\n }\n removeItem(item) {\n if (item === this._head && item === this._tail) {\n this._head = undefined;\n this._tail = undefined;\n }\n else if (item === this._head) {\n // This can only happened if size === 1 which is handle\n // by the case above.\n if (!item.next) {\n throw new Error('Invalid list');\n }\n item.next.previous = undefined;\n this._head = item.next;\n }\n else if (item === this._tail) {\n // This can only happened if size === 1 which is handle\n // by the case above.\n if (!item.previous) {\n throw new Error('Invalid list');\n }\n item.previous.next = undefined;\n this._tail = item.previous;\n }\n else {\n const next = item.next;\n const previous = item.previous;\n if (!next || !previous) {\n throw new Error('Invalid list');\n }\n next.previous = previous;\n previous.next = next;\n }\n item.next = undefined;\n item.previous = undefined;\n this._state++;\n }\n touch(item, touch) {\n if (!this._head || !this._tail) {\n throw new Error('Invalid list');\n }\n if ((touch !== Touch.First && touch !== Touch.Last)) {\n return;\n }\n if (touch === Touch.First) {\n if (item === this._head) {\n return;\n }\n const next = item.next;\n const previous = item.previous;\n // Unlink the item\n if (item === this._tail) {\n // previous must be defined since item was not head but is tail\n // So there are more than on item in the map\n previous.next = undefined;\n this._tail = previous;\n }\n else {\n // Both next and previous are not undefined since item was neither head nor tail.\n next.previous = previous;\n previous.next = next;\n }\n // Insert the node at head\n item.previous = undefined;\n item.next = this._head;\n this._head.previous = item;\n this._head = item;\n this._state++;\n }\n else if (touch === Touch.Last) {\n if (item === this._tail) {\n return;\n }\n const next = item.next;\n const previous = item.previous;\n // Unlink the item.\n if (item === this._head) {\n // next must be defined since item was not tail but is head\n // So there are more than on item in the map\n next.previous = undefined;\n this._head = next;\n }\n else {\n // Both next and previous are not undefined since item was neither head nor tail.\n next.previous = previous;\n previous.next = next;\n }\n item.next = undefined;\n item.previous = this._tail;\n this._tail.next = item;\n this._tail = item;\n this._state++;\n }\n }\n toJSON() {\n const data = [];\n this.forEach((value, key) => {\n data.push([key, value]);\n });\n return data;\n }\n fromJSON(data) {\n this.clear();\n for (const [key, value] of data) {\n this.set(key, value);\n }\n }\n}\nexports.LinkedMap = LinkedMap;\nclass LRUCache extends LinkedMap {\n constructor(limit, ratio = 1) {\n super();\n this._limit = limit;\n this._ratio = Math.min(Math.max(0, ratio), 1);\n }\n get limit() {\n return this._limit;\n }\n set limit(limit) {\n this._limit = limit;\n this.checkTrim();\n }\n get ratio() {\n return this._ratio;\n }\n set ratio(ratio) {\n this._ratio = Math.min(Math.max(0, ratio), 1);\n this.checkTrim();\n }\n get(key, touch = Touch.AsNew) {\n return super.get(key, touch);\n }\n peek(key) {\n return super.get(key, Touch.None);\n }\n set(key, value) {\n super.set(key, value, Touch.Last);\n this.checkTrim();\n return this;\n }\n checkTrim() {\n if (this.size > this._limit) {\n this.trimOld(Math.round(this._limit * this._ratio));\n }\n }\n}\nexports.LRUCache = LRUCache;\n"],"x_google_ignoreList":[0],"mappings":";;;CAKA,IAAI;CAEJ,AADA,OAAO,eAAe,GAAS,cAAc,EAAE,OAAO,IAAM,CAAC,EAC7D,EAAQ,WAAW,EAAQ,YAAY,EAAQ,QAAQ,KAAK;CAC5D,IAAI;CACJ,CAAC,SAAU,GAAO;EAKd,AAJA,EAAM,OAAO,GACb,EAAM,QAAQ,GACd,EAAM,QAAQ,EAAM,OACpB,EAAM,OAAO,GACb,EAAM,QAAQ,EAAM;IACrB,MAAU,EAAQ,QAAQ,IAAQ,EAAE,EAAE;CACzC,IAAM,IAAN,MAAgB;EACZ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scode-jsonrpc/lib/common/messageBuffer.js"],"sourcesContent":["\"use strict\";\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AbstractMessageBuffer = void 0;\nconst CR = 13;\nconst LF = 10;\nconst CRLF = '\\r\\n';\nclass AbstractMessageBuffer {\n constructor(encoding = 'utf-8') {\n this._encoding = encoding;\n this._chunks = [];\n this._totalLength = 0;\n }\n get encoding() {\n return this._encoding;\n }\n append(chunk) {\n const toAppend = typeof chunk === 'string' ? this.fromString(chunk, this._encoding) : chunk;\n this._chunks.push(toAppend);\n this._totalLength += toAppend.byteLength;\n }\n tryReadHeaders(lowerCaseKeys = false) {\n if (this._chunks.length === 0) {\n return undefined;\n }\n let state = 0;\n let chunkIndex = 0;\n let offset = 0;\n let chunkBytesRead = 0;\n row: while (chunkIndex < this._chunks.length) {\n const chunk = this._chunks[chunkIndex];\n offset = 0;\n column: while (offset < chunk.length) {\n const value = chunk[offset];\n switch (value) {\n case CR:\n switch (state) {\n case 0:\n state = 1;\n break;\n case 2:\n state = 3;\n break;\n default:\n state = 0;\n }\n break;\n case LF:\n switch (state) {\n case 1:\n state = 2;\n break;\n case 3:\n state = 4;\n offset++;\n break row;\n default:\n state = 0;\n }\n break;\n default:\n state = 0;\n }\n offset++;\n }\n chunkBytesRead += chunk.byteLength;\n chunkIndex++;\n }\n if (state !== 4) {\n return undefined;\n }\n // The buffer contains the two CRLF at the end. So we will\n // have two empty lines after the split at the end as well.\n const buffer = this._read(chunkBytesRead + offset);\n const result = new Map();\n const headers = this.toString(buffer, 'ascii').split(CRLF);\n if (headers.length < 2) {\n return result;\n }\n for (let i = 0; i < headers.length - 2; i++) {\n const header = headers[i];\n const index = header.indexOf(':');\n if (index === -1) {\n throw new Error(`Message header must separate key and value using ':'\\n${header}`);\n }\n const key = header.substr(0, index);\n const value = header.substr(index + 1).trim();\n result.set(lowerCaseKeys ? key.toLowerCase() : key, value);\n }\n return result;\n }\n tryReadBody(length) {\n if (this._totalLength < length) {\n return undefined;\n }\n return this._read(length);\n }\n get numberOfBytes() {\n return this._totalLength;\n }\n _read(byteCount) {\n if (byteCount === 0) {\n return this.emptyBuffer();\n }\n if (byteCount > this._totalLength) {\n throw new Error(`Cannot read so many bytes!`);\n }\n if (this._chunks[0].byteLength === byteCount) {\n // super fast path, precisely first chunk must be returned\n const chunk = this._chunks[0];\n this._chunks.shift();\n this._totalLength -= byteCount;\n return this.asNative(chunk);\n }\n if (this._chunks[0].byteLength > byteCount) {\n // fast path, the reading is entirely within the first chunk\n const chunk = this._chunks[0];\n const result = this.asNative(chunk, byteCount);\n this._chunks[0] = chunk.slice(byteCount);\n this._totalLength -= byteCount;\n return result;\n }\n const result = this.allocNative(byteCount);\n let resultOffset = 0;\n let chunkIndex = 0;\n while (byteCount > 0) {\n const chunk = this._chunks[chunkIndex];\n if (chunk.byteLength > byteCount) {\n // this chunk will survive\n const chunkPart = chunk.slice(0, byteCount);\n result.set(chunkPart, resultOffset);\n resultOffset += byteCount;\n this._chunks[chunkIndex] = chunk.slice(byteCount);\n this._totalLength -= byteCount;\n byteCount -= byteCount;\n }\n else {\n // this chunk will be entirely read\n result.set(chunk, resultOffset);\n resultOffset += chunk.byteLength;\n this._chunks.shift();\n this._totalLength -= chunk.byteLength;\n byteCount -= chunk.byteLength;\n }\n }\n return result;\n }\n}\nexports.AbstractMessageBuffer = AbstractMessageBuffer;\n"],"x_google_ignoreList":[0],"mappings":";;;CAMA,AADA,OAAO,eAAe,GAAS,cAAc,EAAE,OAAO,IAAM,CAAC,EAC7D,EAAQ,wBAAwB,KAAK;CACrC,IAAM,IAAK,IACL,IAAK,IACL,IAAO;CA8Ib,EAAQ,wBAAwB,MA7IJ;EACxB,YAAY,IAAW,SAAS;GAG5B,AAFA,KAAK,YAAY,GACjB,KAAK,UAAU,EAAE,EACjB,KA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EAAO,IAAI,IAAgB,EAAI,aAAa,GAAG,GAAK,EAAM;;GAE9D,OAAO;;EAEX,YAAY,GAAQ;GACZ,WAAK,eAAe,IAGxB,OAAO,KAAK,MAAM,EAAO;;EAE7B,IAAI,gBAAgB;GAChB,OAAO,KAAK;;EAEhB,MAAM,GAAW;GACb,IAAI,MAAc,GACd,OAAO,KAAK,aAAa;GAE7B,IAAI,IAAY,KAAK,cACjB,MAAU,MAAM,6BAA6B;GAEjD,IAAI,KAAK,QAAQ,GAAG,eAAe,GAAW;IAE1C,IAAM,IAAQ,KAAK,QAAQ;IAG3B,OAFA,KAAK,QAAQ,OAAO,EACpB,KAAK,gBAAgB,GACd,KAAK,SAAS,EAAM;;GAE/B,IAAI,KAAK,QAAQ,GAAG,aAAa,GAAW;IAExC,IAAM,IAAQ,KAAK,QAAQ,IACrB,IAAS,KAAK,SAAS,GAAO,EAAU;IAG9C,OAFA,KAAK,QAAQ,KAAK,EAAM,MAAM,EAAU,EACxC,KAAK,gBAAgB,GACd;;GAEX,IAAM,IAAS,KAAK,YAAY,EAAU,EACtC,IAAe;GAEnB,OAAO,IAAY,IAAG;IAClB,IAAM,IAAQ,KAAK,QAAQ;IAC3B,IAAI,EAAM,aAAa,GAAW;KAE9B,IAAM,IAAY,EAAM,MAAM,GAAG,EAAU;KAK3C,AAJA,EAAO,IAAI,GAAW,EAAa,EACnC,KAAgB,GAChB,KAAK,QAAQ,KAAc,EAAM,MAAM,EAAU,EACjD,KAAK,gBAAgB,GACrB,KAAa;WAQb,AAJA,EAAO,IAAI,GAAO,EAAa,EAC/B,KAAgB,EAAM,YACtB,KAAK,QAAQ,OAAO,EACpB,KAAK,gBAAgB,EAAM,YAC3B,KAAa,EAAM;;GAG3B,OAAO"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"messageReader.js","names":[],"sources":["../../../../../../../../node_modules/vscode-jsonrpc/lib/common/messageReader.js"],"sourcesContent":["\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = void 0;\nconst ral_1 = require(\"./ral\");\nconst Is = require(\"./is\");\nconst events_1 = require(\"./events\");\nconst semaphore_1 = require(\"./semaphore\");\nvar MessageReader;\n(function (MessageReader) {\n function is(value) {\n let candidate = value;\n return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&\n Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);\n }\n MessageReader.is = is;\n})(MessageReader || (exports.MessageReader = MessageReader = {}));\nclass AbstractMessageReader {\n constructor() {\n this.errorEmitter = new events_1.Emitter();\n this.closeEmitter = new events_1.Emitter();\n this.partialMessageEmitter = new events_1.Emitter();\n }\n dispose() {\n this.errorEmitter.dispose();\n this.closeEmitter.dispose();\n }\n get onError() {\n return this.errorEmitter.event;\n }\n fireError(error) {\n this.errorEmitter.fire(this.asError(error));\n }\n get onClose() {\n return this.closeEmitter.event;\n }\n fireClose() {\n this.closeEmitter.fire(undefined);\n }\n get onPartialMessage() {\n return this.partialMessageEmitter.event;\n }\n firePartialMessage(info) {\n this.partialMessageEmitter.fire(info);\n }\n asError(error) {\n if (error instanceof Error) {\n return error;\n }\n else {\n return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);\n }\n }\n}\nexports.AbstractMessageReader = AbstractMessageReader;\nvar ResolvedMessageReaderOptions;\n(function (ResolvedMessageReaderOptions) {\n function fromOptions(options) {\n let charset;\n let result;\n let contentDecoder;\n const contentDecoders = new Map();\n let contentTypeDecoder;\n const contentTypeDecoders = new Map();\n if (options === undefined || typeof options === 'string') {\n charset = options ?? 'utf-8';\n }\n else {\n charset = options.charset ?? 'utf-8';\n if (options.contentDecoder !== undefined) {\n contentDecoder = options.contentDecoder;\n contentDecoders.set(contentDecoder.name, contentDecoder);\n }\n if (options.contentDecoders !== undefined) {\n for (const decoder of options.contentDecoders) {\n contentDecoders.set(decoder.name, decoder);\n }\n }\n if (options.contentTypeDecoder !== undefined) {\n contentTypeDecoder = options.contentTypeDecoder;\n contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);\n }\n if (options.contentTypeDecoders !== undefined) {\n for (const decoder of options.contentTypeDecoders) {\n contentTypeDecoders.set(decoder.name, decoder);\n }\n }\n }\n if (contentTypeDecoder === undefined) {\n contentTypeDecoder = (0, ral_1.default)().applicationJson.decoder;\n contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);\n }\n return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders };\n }\n ResolvedMessageReaderOptions.fromOptions = fromOptions;\n})(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {}));\nclass ReadableStreamMessageReader extends AbstractMessageReader {\n constructor(readable, options) {\n super();\n this.readable = readable;\n this.options = ResolvedMessageReaderOptions.fromOptions(options);\n this.buffer = (0, ral_1.default)().messageBuffer.create(this.options.charset);\n this._partialMessageTimeout = 10000;\n this.nextMessageLength = -1;\n this.messageToken = 0;\n this.readSemaphore = new semaphore_1.Semaphore(1);\n }\n set partialMessageTimeout(timeout) {\n this._partialMessageTimeout = timeout;\n }\n get partialMessageTimeout() {\n return this._partialMessageTimeout;\n }\n listen(callback) {\n this.nextMessageLength = -1;\n this.messageToken = 0;\n this.partialMessageTimer = undefined;\n this.callback = callback;\n const result = this.readable.onData((data) => {\n this.onData(data);\n });\n this.readable.onError((error) => this.fireError(error));\n this.readable.onClose(() => this.fireClose());\n return result;\n }\n onData(data) {\n try {\n this.buffer.append(data);\n while (true) {\n if (this.nextMessageLength === -1) {\n const headers = this.buffer.tryReadHeaders(true);\n if (!headers) {\n return;\n }\n const contentLength = headers.get('content-length');\n if (!contentLength) {\n this.fireError(new Error(`Header must provide a Content-Length property.\\n${JSON.stringify(Object.fromEntries(headers))}`));\n return;\n }\n const length = parseInt(contentLength);\n if (isNaN(length)) {\n this.fireError(new Error(`Content-Length value must be a number. Got ${contentLength}`));\n return;\n }\n this.nextMessageLength = length;\n }\n const body = this.buffer.tryReadBody(this.nextMessageLength);\n if (body === undefined) {\n /** We haven't received the full message yet. */\n this.setPartialMessageTimer();\n return;\n }\n this.clearPartialMessageTimer();\n this.nextMessageLength = -1;\n // Make sure that we convert one received message after the\n // other. Otherwise it could happen that a decoding of a second\n // smaller message finished before the decoding of a first larger\n // message and then we would deliver the second message first.\n this.readSemaphore.lock(async () => {\n const bytes = this.options.contentDecoder !== undefined\n ? await this.options.contentDecoder.decode(body)\n : body;\n const message = await this.options.contentTypeDecoder.decode(bytes, this.options);\n this.callback(message);\n }).catch((error) => {\n this.fireError(error);\n });\n }\n }\n catch (error) {\n this.fireError(error);\n }\n }\n clearPartialMessageTimer() {\n if (this.partialMessageTimer) {\n this.partialMessageTimer.dispose();\n this.partialMessageTimer = undefined;\n }\n }\n setPartialMessageTimer() {\n this.clearPartialMessageTimer();\n if (this._partialMessageTimeout <= 0) {\n return;\n }\n this.partialMessageTimer = (0, ral_1.default)().timer.setTimeout((token, timeout) => {\n this.partialMessageTimer = undefined;\n if (token === this.messageToken) {\n this.firePartialMessage({ messageToken: token, waitingTime: timeout });\n this.setPartialMessageTimer();\n }\n }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);\n }\n}\nexports.ReadableStreamMessageReader = ReadableStreamMessageReader;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;CAMA,AADA,OAAO,eAAe,GAAS,cAAc,EAAE,OAAO,IAAM,CAAC,EAC7D,EAAQ,8BAA8B,EAAQ,wBAAwB,EAAQ,gBAAgB,KAAK;CACnG,IAAM,IAAA,GAAA,EACA,IAAA,GAAA,EACA,IAAA,GAAA,EACA,IAAA,GAAA,EACF;CACJ,CAAC,SAAU,GAAe;EACtB,SAAS,EAAG,GAAO;GACf,IAAI,IAAY;GAChB,OAAO,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a;KAAS,CAAC,EACtE,KAAK,wBAAwB;MAElC,KAAK,wBAAwB,KAAK,cAAc,KAAK,uBAAuB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"messageWriter.js","names":[],"sources":["../../../../../../../../node_modules/vscode-jsonrpc/lib/common/messageWriter.js"],"sourcesContent":["\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = void 0;\nconst ral_1 = require(\"./ral\");\nconst Is = require(\"./is\");\nconst semaphore_1 = require(\"./semaphore\");\nconst events_1 = require(\"./events\");\nconst ContentLength = 'Content-Length: ';\nconst CRLF = '\\r\\n';\nvar MessageWriter;\n(function (MessageWriter) {\n function is(value) {\n let candidate = value;\n return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&\n Is.func(candidate.onError) && Is.func(candidate.write);\n }\n MessageWriter.is = is;\n})(MessageWriter || (exports.MessageWriter = MessageWriter = {}));\nclass AbstractMessageWriter {\n constructor() {\n this.errorEmitter = new events_1.Emitter();\n this.closeEmitter = new events_1.Emitter();\n }\n dispose() {\n this.errorEmitter.dispose();\n this.closeEmitter.dispose();\n }\n get onError() {\n return this.errorEmitter.event;\n }\n fireError(error, message, count) {\n this.errorEmitter.fire([this.asError(error), message, count]);\n }\n get onClose() {\n return this.closeEmitter.event;\n }\n fireClose() {\n this.closeEmitter.fire(undefined);\n }\n asError(error) {\n if (error instanceof Error) {\n return error;\n }\n else {\n return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);\n }\n }\n}\nexports.AbstractMessageWriter = AbstractMessageWriter;\nvar ResolvedMessageWriterOptions;\n(function (ResolvedMessageWriterOptions) {\n function fromOptions(options) {\n if (options === undefined || typeof options === 'string') {\n return { charset: options ?? 'utf-8', contentTypeEncoder: (0, ral_1.default)().applicationJson.encoder };\n }\n else {\n return { charset: options.charset ?? 'utf-8', contentEncoder: options.contentEncoder, contentTypeEncoder: options.contentTypeEncoder ?? (0, ral_1.default)().applicationJson.encoder };\n }\n }\n ResolvedMessageWriterOptions.fromOptions = fromOptions;\n})(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {}));\nclass WriteableStreamMessageWriter extends AbstractMessageWriter {\n constructor(writable, options) {\n super();\n this.writable = writable;\n this.options = ResolvedMessageWriterOptions.fromOptions(options);\n this.errorCount = 0;\n this.writeSemaphore = new semaphore_1.Semaphore(1);\n this.writable.onError((error) => this.fireError(error));\n this.writable.onClose(() => this.fireClose());\n }\n async write(msg) {\n return this.writeSemaphore.lock(async () => {\n const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => {\n if (this.options.contentEncoder !== undefined) {\n return this.options.contentEncoder.encode(buffer);\n }\n else {\n return buffer;\n }\n });\n return payload.then((buffer) => {\n const headers = [];\n headers.push(ContentLength, buffer.byteLength.toString(), CRLF);\n headers.push(CRLF);\n return this.doWrite(msg, headers, buffer);\n }, (error) => {\n this.fireError(error);\n throw error;\n });\n });\n }\n async doWrite(msg, headers, data) {\n try {\n await this.writable.write(headers.join(''), 'ascii');\n return this.writable.write(data);\n }\n catch (error) {\n this.handleError(error, msg);\n return Promise.reject(error);\n }\n }\n handleError(error, msg) {\n this.errorCount++;\n this.fireError(error, msg, this.errorCount);\n }\n end() {\n this.writable.end();\n }\n}\nexports.WriteableStreamMessageWriter = WriteableStreamMessageWriter;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;CAMA,AADA,OAAO,eAAe,GAAS,cAAc,EAAE,OAAO,IAAM,CAAC,EAC7D,EAAQ,+BAA+B,EAAQ,wBAAwB,EAAQ,gBAAgB,KAAK;CACpG,IAAM,IAAA,GAAA,EACA,IAAA,GAAA,EACA,IAAA,GAAA,EACA,IAAA,GAAA,EACA,IAAgB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E,EAAQ,+BAA+B,cAjDI,EAAsB;EAC7D,YAAY,GAAU,GAAS;GAO3B,AANA,OAAO,EACP,KAAK,WAAW,GAChB,KAAK,UAAU,EAA6B,YAAY,EAAQ,EAChE,KAAK,aAAa,GAClB,KAAK,iBAAiB,IAAI,EAAY,UAAU,EAAE,EAClD,KAAK,SAAS,SAAS,MAAU,KAAK,UAAU,EAAM,CAAC,EACvD,KAAK,SAAS,cAAc,KAAK,WAAW,CAAC;;EAEjD,MAAM,MAAM,GAAK;GACb,OAAO,KAAK,eAAe,KAAK,YACZ,KAAK,QAAQ,mBAAmB,OAAO,GAAK,KAAK,QAAQ,CAAC,MAAM,MACxE,KAAK,QAAQ,mBAAmB,KAAA,IAIzB,IAHA,KAAK,QAAQ,eAAe,OAAO,EAAO,CAM3C,CAAC,MAAM,MAAW;IAC5B,IAAM,IAAU,EAAE;IAGlB,OAFA,EAAQ,KAAK,GAAe,EAAO,WAAW,UAAU,EAAE,EAAK,EAC/D,EAAQ,KAAK,EAAK,EACX,KAAK,QAAQ,GAAK,GAAS,EAAO;OACzC,MAAU;IAEV,MADA,KAAK,UAAU,EAAM,EACf;KACR,CACJ;;EAEN,MAAM,QAAQ,GAAK,GAAS,GAAM;GAC9B,IAAI;IAEA,OADA,MAAM,KAAK,SAAS,MAAM,EAAQ,KAAK,GAAG,EAAE,QAAQ,EAC7C,KAAK,SAAS,MAAM,EAAK;YAE7B,GAAO;IAEV,OADA,KAAK,YAAY,GAAO,EAAI,EACrB,QAAQ,OAAO,EAAM;;;EAGpC,YAAY,GAAO,GAAK;GAEpB,AADA,KAAK,cACL,KAAK,UAAU,GAAO,GAAK,KAAK,WAAW;;EAE/C,MAAM;GACF,KAAK,SAAS,KAAK"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","names":[],"sources":["../../../../../../../../node_modules/vscode-jsonrpc/lib/common/messages.js"],"sourcesContent":["\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Message = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType = exports.RequestType0 = exports.AbstractMessageSignature = exports.ParameterStructures = exports.ResponseError = exports.ErrorCodes = void 0;\nconst is = require(\"./is\");\n/**\n * Predefined error codes.\n */\nvar ErrorCodes;\n(function (ErrorCodes) {\n // Defined by JSON RPC\n ErrorCodes.ParseError = -32700;\n ErrorCodes.InvalidRequest = -32600;\n ErrorCodes.MethodNotFound = -32601;\n ErrorCodes.InvalidParams = -32602;\n ErrorCodes.InternalError = -32603;\n /**\n * This is the start range of JSON RPC reserved error codes.\n * It doesn't denote a real error code. No application error codes should\n * be defined between the start and end range. For backwards\n * compatibility the `ServerNotInitialized` and the `UnknownErrorCode`\n * are left in the range.\n *\n * @since 3.16.0\n */\n ErrorCodes.jsonrpcReservedErrorRangeStart = -32099;\n /** @deprecated use jsonrpcReservedErrorRangeStart */\n ErrorCodes.serverErrorStart = -32099;\n /**\n * An error occurred when write a message to the transport layer.\n */\n ErrorCodes.MessageWriteError = -32099;\n /**\n * An error occurred when reading a message from the transport layer.\n */\n ErrorCodes.MessageReadError = -32098;\n /**\n * The connection got disposed or lost and all pending responses got\n * rejected.\n */\n ErrorCodes.PendingResponseRejected = -32097;\n /**\n * The connection is inactive and a use of it failed.\n */\n ErrorCodes.ConnectionInactive = -32096;\n /**\n * Error code indicating that a server received a notification or\n * request before the server has received the `initialize` request.\n */\n ErrorCodes.ServerNotInitialized = -32002;\n ErrorCodes.UnknownErrorCode = -32001;\n /**\n * This is the end range of JSON RPC reserved error codes.\n * It doesn't denote a real error code.\n *\n * @since 3.16.0\n */\n ErrorCodes.jsonrpcReservedErrorRangeEnd = -32000;\n /** @deprecated use jsonrpcReservedErrorRangeEnd */\n ErrorCodes.serverErrorEnd = -32000;\n})(ErrorCodes || (exports.ErrorCodes = ErrorCodes = {}));\n/**\n * An error object return in a response in case a request\n * has failed.\n */\nclass ResponseError extends Error {\n constructor(code, message, data) {\n super(message);\n this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;\n this.data = data;\n Object.setPrototypeOf(this, ResponseError.prototype);\n }\n toJson() {\n const result = {\n code: this.code,\n message: this.message\n };\n if (this.data !== undefined) {\n result.data = this.data;\n }\n return result;\n }\n}\nexports.ResponseError = ResponseError;\nclass ParameterStructures {\n constructor(kind) {\n this.kind = kind;\n }\n static is(value) {\n return value === ParameterStructures.auto || value === ParameterStructures.byName || value === ParameterStructures.byPosition;\n }\n toString() {\n return this.kind;\n }\n}\nexports.ParameterStructures = ParameterStructures;\n/**\n * The parameter structure is automatically inferred on the number of parameters\n * and the parameter type in case of a single param.\n */\nParameterStructures.auto = new ParameterStructures('auto');\n/**\n * Forces `byPosition` parameter structure. This is useful if you have a single\n * parameter which has a literal type.\n */\nParameterStructures.byPosition = new ParameterStructures('byPosition');\n/**\n * Forces `byName` parameter structure. This is only useful when having a single\n * parameter. The library will report errors if used with a different number of\n * parameters.\n */\nParameterStructures.byName = new ParameterStructures('byName');\n/**\n * An abstract implementation of a MessageType.\n */\nclass AbstractMessageSignature {\n constructor(method, numberOfParams) {\n this.method = method;\n this.numberOfParams = numberOfParams;\n }\n get parameterStructures() {\n return ParameterStructures.auto;\n }\n}\nexports.AbstractMessageSignature = AbstractMessageSignature;\n/**\n * Classes to type request response pairs\n */\nclass RequestType0 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 0);\n }\n}\nexports.RequestType0 = RequestType0;\nclass RequestType extends AbstractMessageSignature {\n constructor(method, _parameterStructures = ParameterStructures.auto) {\n super(method, 1);\n this._parameterStructures = _parameterStructures;\n }\n get parameterStructures() {\n return this._parameterStructures;\n }\n}\nexports.RequestType = RequestType;\nclass RequestType1 extends AbstractMessageSignature {\n constructor(method, _parameterStructures = ParameterStructures.auto) {\n super(method, 1);\n this._parameterStructures = _parameterStructures;\n }\n get parameterStructures() {\n return this._parameterStructures;\n }\n}\nexports.RequestType1 = RequestType1;\nclass RequestType2 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 2);\n }\n}\nexports.RequestType2 = RequestType2;\nclass RequestType3 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 3);\n }\n}\nexports.RequestType3 = RequestType3;\nclass RequestType4 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 4);\n }\n}\nexports.RequestType4 = RequestType4;\nclass RequestType5 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 5);\n }\n}\nexports.RequestType5 = RequestType5;\nclass RequestType6 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 6);\n }\n}\nexports.RequestType6 = RequestType6;\nclass RequestType7 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 7);\n }\n}\nexports.RequestType7 = RequestType7;\nclass RequestType8 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 8);\n }\n}\nexports.RequestType8 = RequestType8;\nclass RequestType9 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 9);\n }\n}\nexports.RequestType9 = RequestType9;\nclass NotificationType extends AbstractMessageSignature {\n constructor(method, _parameterStructures = ParameterStructures.auto) {\n super(method, 1);\n this._parameterStructures = _parameterStructures;\n }\n get parameterStructures() {\n return this._parameterStructures;\n }\n}\nexports.NotificationType = NotificationType;\nclass NotificationType0 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 0);\n }\n}\nexports.NotificationType0 = NotificationType0;\nclass NotificationType1 extends AbstractMessageSignature {\n constructor(method, _parameterStructures = ParameterStructures.auto) {\n super(method, 1);\n this._parameterStructures = _parameterStructures;\n }\n get parameterStructures() {\n return this._parameterStructures;\n }\n}\nexports.NotificationType1 = NotificationType1;\nclass NotificationType2 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 2);\n }\n}\nexports.NotificationType2 = NotificationType2;\nclass NotificationType3 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 3);\n }\n}\nexports.NotificationType3 = NotificationType3;\nclass NotificationType4 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 4);\n }\n}\nexports.NotificationType4 = NotificationType4;\nclass NotificationType5 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 5);\n }\n}\nexports.NotificationType5 = NotificationType5;\nclass NotificationType6 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 6);\n }\n}\nexports.NotificationType6 = NotificationType6;\nclass NotificationType7 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 7);\n }\n}\nexports.NotificationType7 = NotificationType7;\nclass NotificationType8 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 8);\n }\n}\nexports.NotificationType8 = NotificationType8;\nclass NotificationType9 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 9);\n }\n}\nexports.NotificationType9 = NotificationType9;\nvar Message;\n(function (Message) {\n /**\n * Tests if the given message is a request message\n */\n function isRequest(message) {\n const candidate = message;\n return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));\n }\n Message.isRequest = isRequest;\n /**\n * Tests if the given message is a notification message\n */\n function isNotification(message) {\n const candidate = message;\n return candidate && is.string(candidate.method) && message.id === void 0;\n }\n Message.isNotification = isNotification;\n /**\n * Tests if the given message is a response message\n */\n function isResponse(message) {\n const candidate = message;\n return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);\n }\n Message.isResponse = isResponse;\n})(Message || (exports.Message = Message = {}));\n"],"x_google_ignoreList":[0],"mappings":";;;;CAMA,AADA,OAAO,eAAe,GAAS,cAAc,EAAE,OAAO,IAAM,CAAC,EAC7D,EA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AoB,cALI,EAAyB;EACrD,YAAY,GAAQ;GAChB,MAAM,GAAQ,EAAE;;;CAIxB,IAAI;CACJ,CAAC,SAAU,GAAS;EAIhB,SAAS,EAAU,GAAS;GACxB,IAAM,IAAY;GAClB,OAAO,KAAa,EAAG,OAAO,EAAU,OAAO,KAAK,EAAG,OAAO,EAAU,GAAG,IAAI,EAAG,OAAO,EAAU,GAAG;;EAE1G,EAAQ,YAAY;EAIpB,SAAS,EAAe,GAAS;GAC7B,IAAM,IAAY;GAClB,OAAO,KAAa,EAAG,OAAO,EAAU,OAAO,IAAI,EAAQ,OAAO,KAAK;;EAE3E,EAAQ,iBAAiB;EAIzB,SAAS,EAAW,GAAS;GACzB,IAAM,IAAY;GAClB,OAAO,MAAc,EAAU,WAAW,KAAK,KAAK,CAAC,CAAC,EAAU,WAAW,EAAG,OAAO,EAAU,GAAG,IAAI,EAAG,OAAO,EAAU,GAAG,IAAI,EAAU,OAAO;;EAEtJ,EAAQ,aAAa;IACtB,MAAY,EAAQ,UAAU,IAAU,EAAE,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"semaphore.js","names":[],"sources":["../../../../../../../../node_modules/vscode-jsonrpc/lib/common/semaphore.js"],"sourcesContent":["\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Semaphore = void 0;\nconst ral_1 = require(\"./ral\");\nclass Semaphore {\n constructor(capacity = 1) {\n if (capacity <= 0) {\n throw new Error('Capacity must be greater than 0');\n }\n this._capacity = capacity;\n this._active = 0;\n this._waiting = [];\n }\n lock(thunk) {\n return new Promise((resolve, reject) => {\n this._waiting.push({ thunk, resolve, reject });\n this.runNext();\n });\n }\n get active() {\n return this._active;\n }\n runNext() {\n if (this._waiting.length === 0 || this._active === this._capacity) {\n return;\n }\n (0, ral_1.default)().timer.setImmediate(() => this.doRunNext());\n }\n doRunNext() {\n if (this._waiting.length === 0 || this._active === this._capacity) {\n return;\n }\n const next = this._waiting.shift();\n this._active++;\n if (this._active > this._capacity) {\n throw new Error(`To many thunks active`);\n }\n try {\n const result = next.thunk();\n if (result instanceof Promise) {\n result.then((value) => {\n this._active--;\n next.resolve(value);\n this.runNext();\n }, (err) => {\n this._active--;\n next.reject(err);\n this.runNext();\n });\n }\n else {\n this._active--;\n next.resolve(result);\n this.runNext();\n }\n }\n catch (err) {\n this._active--;\n next.reject(err);\n this.runNext();\n }\n }\n}\nexports.Semaphore = Semaphore;\n"],"x_google_ignoreList":[0],"mappings":";;;;CAMA,AADA,OAAO,eAAe,GAAS,cAAc,EAAE,OAAO,IAAM,CAAC,EAC7D,EAAQ,YAAY,KAAK;CACzB,IAAM,IAAA,GAAA;CA4DN,EAAQ,YAAY,MA3DJ;EACZ,YAAY,IAAW,GAAG;GACtB,IAAI,KAAY,GACZ,MAAU,MAAM,kCAAkC;GAItD,AAFA,KAAK,YAAY,GACjB,KAAK,UAAU,GACf,KAAK,WAAW,EAAE;;EAEtB,KAAK,GAAO;GACR,OAAO,IAAI,SAAS,GAAS,MAAW;IAEpC,AADA,KAAK,SAAS,KAAK;KAAE;KAAO;KAAS;KAAQ,CAAC,EAC9C,KAAK,SAAS;KAChB;;EAEN,IAAI,SAAS;GACT,OAAO,KAAK;;EAEhB,UAAU;GACF,KAAK,SAAS,WAAW,KAAK,KAAK,YAAY,KAAK,cAGvD,GAAG,EAAM,UAAU,CAAC,MAAM,mBAAmB,KAAK,WAAW,CAAC;;EAEnE,YAAY;GACR,IAAI,KAAK,SAAS,WAAW,KAAK,KAAK,YAAY,KAAK,WACpD;GAEJ,IAAM,IAAO,KAAK,SAAS,OAAO;GAElC,IADA,KAAK,WACD,KAAK,UAAU,KAAK,WACpB,MAAU,MAAM,wBAAwB;GAE5C,IAAI;IACA,IAAM,IAAS,EAAK,OAAO;IAC3B,AAAI,aAAkB,UAClB,EAAO,MAAM,MAAU;KAGnB,AAFA,KAAK,WACL,EAAK,QAAQ,EAAM,EACnB,KAAK,SAAS;QACd,MAAQ;KAGR,AAFA,KAAK,WACL,EAAK,OAAO,EAAI,EAChB,KAAK,SAAS;MAChB,IAGF,KAAK,WACL,EAAK,QAAQ,EAAO,EACpB,KAAK,SAAS;YAGf,GAAK;IAGR,AAFA,KAAK,WACL,EAAK,OAAO,EAAI,EAChB,KAAK,SAAS"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sharedArrayCancellation.js","names":[],"sources":["../../../../../../../../node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"],"sourcesContent":["\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SharedArrayReceiverStrategy = exports.SharedArraySenderStrategy = void 0;\nconst cancellation_1 = require(\"./cancellation\");\nvar CancellationState;\n(function (CancellationState) {\n CancellationState.Continue = 0;\n CancellationState.Cancelled = 1;\n})(CancellationState || (CancellationState = {}));\nclass SharedArraySenderStrategy {\n constructor() {\n this.buffers = new Map();\n }\n enableCancellation(request) {\n if (request.id === null) {\n return;\n }\n const buffer = new SharedArrayBuffer(4);\n const data = new Int32Array(buffer, 0, 1);\n data[0] = CancellationState.Continue;\n this.buffers.set(request.id, buffer);\n request.$cancellationData = buffer;\n }\n async sendCancellation(_conn, id) {\n const buffer = this.buffers.get(id);\n if (buffer === undefined) {\n return;\n }\n const data = new Int32Array(buffer, 0, 1);\n Atomics.store(data, 0, CancellationState.Cancelled);\n }\n cleanup(id) {\n this.buffers.delete(id);\n }\n dispose() {\n this.buffers.clear();\n }\n}\nexports.SharedArraySenderStrategy = SharedArraySenderStrategy;\nclass SharedArrayBufferCancellationToken {\n constructor(buffer) {\n this.data = new Int32Array(buffer, 0, 1);\n }\n get isCancellationRequested() {\n return Atomics.load(this.data, 0) === CancellationState.Cancelled;\n }\n get onCancellationRequested() {\n throw new Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`);\n }\n}\nclass SharedArrayBufferCancellationTokenSource {\n constructor(buffer) {\n this.token = new SharedArrayBufferCancellationToken(buffer);\n }\n cancel() {\n }\n dispose() {\n }\n}\nclass SharedArrayReceiverStrategy {\n constructor() {\n this.kind = 'request';\n }\n createCancellationTokenSource(request) {\n const buffer = request.$cancellationData;\n if (buffer === undefined) {\n return new cancellation_1.CancellationTokenSource();\n }\n return new SharedArrayBufferCancellationTokenSource(buffer);\n }\n}\nexports.SharedArrayReceiverStrategy = SharedArrayReceiverStrategy;\n"],"x_google_ignoreList":[0],"mappings":";;;;CAMA,AADA,OAAO,eAAe,GAAS,cAAc,EAAE,OAAO,IAAM,CAAC,EAC7D,EAAQ,8BAA8B,EAAQ,4BAA4B,KAAK;CAC/E,IAAM,IAAA,GAAA,EACF;CAkCJ,CAjCC,SAAU,GAAmB;EAE1B,AADA,EAAkB,WAAW,GAC7B,EAAkB,YAAY;IAC/B,AAAsB,MAAoB,EAAE,CAAE,EA8BjD,EAAQ,4BAA4B,MA7BJ;EAC5B,cAAc;GACV,KAAK,0BAAU,IAAI,KAAK;;EAE5B,mBAAmB,GAAS;GACxB,IAAI,EAAQ,OAAO,MACf;GAEJ,IAAM,IAAS,IAAI,kBAAkB,EAAE,EACjC,IAAO,IAAI,WAAW,GAAQ,GAAG,EAAE;GAGzC,AAFA,EAAK,KAAK,EAAkB,UAC5B,KAAK,QAAQ,IAAI,EAAQ,IAAI,EAAO,EACpC,EAAQ,oBAAoB;;EAEhC,MAAM,iBAAiB,GAAO,GAAI;GAC9B,IAAM,IAAS,KAAK,QAAQ,IAAI,EAAG;GACnC,IAAI,MAAW,KAAA,GACX;GAEJ,IAAM,IAAO,IAAI,WAAW,GAAQ,GAAG,EAAE;GACzC,QAAQ,MAAM,GAAM,GAAG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