@mrclrchtr/supi-lsp 1.11.1 → 1.11.2

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.
Files changed (35) hide show
  1. package/node_modules/@mrclrchtr/supi-code-runtime/node_modules/@mrclrchtr/supi-core/package.json +1 -1
  2. package/node_modules/@mrclrchtr/supi-code-runtime/package.json +2 -2
  3. package/node_modules/@mrclrchtr/supi-core/package.json +1 -1
  4. package/node_modules/vscode-jsonrpc/README.md +2 -17
  5. package/node_modules/vscode-jsonrpc/eslint.config.js +12 -0
  6. package/node_modules/vscode-jsonrpc/lib/browser/main.js +10 -3
  7. package/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts +11 -1
  8. package/node_modules/vscode-jsonrpc/lib/browser/ril.js +58 -4
  9. package/node_modules/vscode-jsonrpc/lib/common/api.d.ts +3 -3
  10. package/node_modules/vscode-jsonrpc/lib/common/api.js +10 -4
  11. package/node_modules/vscode-jsonrpc/lib/common/cancellation.js +41 -5
  12. package/node_modules/vscode-jsonrpc/lib/common/connection.d.ts +76 -67
  13. package/node_modules/vscode-jsonrpc/lib/common/connection.js +217 -160
  14. package/node_modules/vscode-jsonrpc/lib/common/events.js +10 -3
  15. package/node_modules/vscode-jsonrpc/lib/common/is.js +7 -8
  16. package/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts +3 -1
  17. package/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +17 -3
  18. package/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +5 -2
  19. package/node_modules/vscode-jsonrpc/lib/common/messageReader.js +52 -3
  20. package/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +45 -3
  21. package/node_modules/vscode-jsonrpc/lib/common/messages.js +147 -17
  22. package/node_modules/vscode-jsonrpc/lib/common/semaphore.js +8 -2
  23. package/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +4 -3
  24. package/node_modules/vscode-jsonrpc/lib/node/main.d.ts +0 -5
  25. package/node_modules/vscode-jsonrpc/lib/node/main.js +56 -24
  26. package/node_modules/vscode-jsonrpc/lib/node/ril.d.ts +0 -1
  27. package/node_modules/vscode-jsonrpc/lib/node/ril.js +3 -1
  28. package/node_modules/vscode-jsonrpc/package.json +20 -11
  29. package/node_modules/vscode-jsonrpc/tsconfig.tsbuildinfo +1 -0
  30. package/package.json +4 -4
  31. package/node_modules/vscode-jsonrpc/browser.d.ts +0 -6
  32. package/node_modules/vscode-jsonrpc/browser.js +0 -7
  33. package/node_modules/vscode-jsonrpc/node.cmd +0 -5
  34. package/node_modules/vscode-jsonrpc/node.d.ts +0 -6
  35. package/node_modules/vscode-jsonrpc/node.js +0 -7
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-core",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
4
4
  "description": "SuPi core — shared infrastructure for SuPi extensions (XML context tags, config system)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-code-runtime",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
4
4
  "description": "SuPi code-runtime — shared workspace context, capability contracts, and canonical types for the code-understanding stack",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -19,7 +19,7 @@
19
19
  "!__tests__"
20
20
  ],
21
21
  "dependencies": {
22
- "@mrclrchtr/supi-core": "1.11.1"
22
+ "@mrclrchtr/supi-core": "1.11.2"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "@earendil-works/pi-coding-agent": "*"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-core",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
4
4
  "description": "SuPi core — shared infrastructure for SuPi extensions (XML context tags, config system)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![NPM Version](https://img.shields.io/npm/v/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc)
4
4
  [![NPM Downloads](https://img.shields.io/npm/dm/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc)
5
- [![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-node)
5
+ [![Build Status](https://dev.azure.com/vscode/vscode-languageserver-node/_apis/build/status%2Fvscode-languageserver-node?branchName=main)](https://dev.azure.com/vscode/vscode-languageserver-node/_build/latest?definitionId=52&branchName=main)
6
6
 
7
7
  This npm module implements the base messaging protocol spoken between a VSCode language server and a VSCode language client.
8
8
 
@@ -47,23 +47,8 @@ connection.listen();
47
47
 
48
48
  # History
49
49
 
50
- ### 5.0.0
50
+ For the history please see the [main repository](https://github.com/Microsoft/vscode-languageserver-node/blob/master/README.md)
51
51
 
52
- - add progress support
53
- - move JS target to ES2017
54
-
55
- ### 4.0.0
56
-
57
- - move JS target to ES6.
58
-
59
- ### 3.0.0:
60
-
61
- - converted the NPM module to use TypeScript 2.0.3.
62
- - added strict null support.
63
- - support for passing more than one parameter to a request or notification.
64
- - Breaking changes:
65
- - due to the use of TypeScript 2.0.3 and differences in d.ts generation users of the new version need to move to
66
- TypeScript 2.0.3 as well.
67
52
 
68
53
  ## License
69
54
  [MIT](https://github.com/Microsoft/vscode-languageserver-node/blob/master/License.txt)
@@ -0,0 +1,12 @@
1
+ // @ts-check
2
+ 'use strict';
3
+
4
+ const { createConfig } = require('../eslint.config.base.js');
5
+
6
+ module.exports = createConfig(
7
+ ['src/browser/tsconfig.json', 'src/browser/test/tsconfig.json', 'src/common/tsconfig.json', 'src/common/test/tsconfig.json', 'src/node/tsconfig.json', 'src/node/test/tsconfig.json'],
8
+ ['dist/**'],
9
+ {
10
+ 'no-console': 'error',
11
+ }
12
+ );
@@ -17,14 +17,20 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
17
17
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
18
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
19
  };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
20
23
  Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.createMessageConnection = exports.BrowserMessageWriter = exports.BrowserMessageReader = void 0;
22
- const ril_1 = require("./ril");
24
+ exports.BrowserMessageWriter = exports.BrowserMessageReader = void 0;
25
+ exports.createMessageConnection = createMessageConnection;
26
+ const ril_1 = __importDefault(require("./ril"));
23
27
  // Install the browser runtime abstract.
24
28
  ril_1.default.install();
25
29
  const api_1 = require("../common/api");
26
30
  __exportStar(require("../common/api"), exports);
27
31
  class BrowserMessageReader extends api_1.AbstractMessageReader {
32
+ _onData;
33
+ _messageListener;
28
34
  constructor(port) {
29
35
  super();
30
36
  this._onData = new api_1.Emitter();
@@ -40,6 +46,8 @@ class BrowserMessageReader extends api_1.AbstractMessageReader {
40
46
  }
41
47
  exports.BrowserMessageReader = BrowserMessageReader;
42
48
  class BrowserMessageWriter extends api_1.AbstractMessageWriter {
49
+ port;
50
+ errorCount;
43
51
  constructor(port) {
44
52
  super();
45
53
  this.port = port;
@@ -73,4 +81,3 @@ function createMessageConnection(reader, writer, logger, options) {
73
81
  }
74
82
  return (0, api_1.createMessageConnection)(reader, writer, logger, options);
75
83
  }
76
- exports.createMessageConnection = createMessageConnection;
@@ -1,10 +1,20 @@
1
- import { RAL } from '../common/api';
1
+ import { RAL, Disposable } from '../common/api';
2
2
  interface RIL extends RAL {
3
3
  readonly stream: {
4
4
  readonly asReadableStream: (stream: WebSocket) => RAL.ReadableStream;
5
5
  readonly asWritableStream: (stream: WebSocket) => RAL.WritableStream;
6
6
  };
7
7
  }
8
+ export declare class QueueMicrotaskImpl implements Disposable {
9
+ private isDisposed;
10
+ constructor(callback: (...args: any[]) => void, ...args: any[]);
11
+ dispose(): void;
12
+ }
13
+ export declare class PromiseImpl implements Disposable {
14
+ private isDisposed;
15
+ constructor(callback: (...args: any[]) => void, ...args: any[]);
16
+ dispose(): void;
17
+ }
8
18
  declare function RIL(): RIL;
9
19
  declare namespace RIL {
10
20
  function install(): void;
@@ -4,8 +4,11 @@
4
4
  * Licensed under the MIT License. See License.txt in the project root for license information.
5
5
  * ------------------------------------------------------------------------------------------ */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.PromiseImpl = exports.QueueMicrotaskImpl = void 0;
7
8
  const api_1 = require("../common/api");
8
9
  class MessageBuffer extends api_1.AbstractMessageBuffer {
10
+ static emptyBuffer = new Uint8Array(0);
11
+ asciiDecoder;
9
12
  constructor(encoding = 'utf-8') {
10
13
  super(encoding);
11
14
  this.asciiDecoder = new TextDecoder('ascii');
@@ -36,8 +39,10 @@ class MessageBuffer extends api_1.AbstractMessageBuffer {
36
39
  return new Uint8Array(length);
37
40
  }
38
41
  }
39
- MessageBuffer.emptyBuffer = new Uint8Array(0);
40
42
  class ReadableStreamWrapper {
43
+ socket;
44
+ _onData;
45
+ _messageListener;
41
46
  constructor(socket) {
42
47
  this.socket = socket;
43
48
  this._onData = new api_1.Emitter();
@@ -68,6 +73,7 @@ class ReadableStreamWrapper {
68
73
  }
69
74
  }
70
75
  class WritableStreamWrapper {
76
+ socket;
71
77
  constructor(socket) {
72
78
  this.socket = socket;
73
79
  }
@@ -91,7 +97,14 @@ class WritableStreamWrapper {
91
97
  this.socket.send(data);
92
98
  }
93
99
  else {
94
- this.socket.send(data);
100
+ if (data.buffer instanceof ArrayBuffer) {
101
+ this.socket.send(data.buffer);
102
+ }
103
+ else {
104
+ // We can't send a shared array buffer directly, so we need to
105
+ // create a copy of it.
106
+ this.socket.send(new Uint8Array(data.buffer).slice().buffer);
107
+ }
95
108
  }
96
109
  return Promise.resolve();
97
110
  }
@@ -99,6 +112,37 @@ class WritableStreamWrapper {
99
112
  this.socket.close();
100
113
  }
101
114
  }
115
+ class QueueMicrotaskImpl {
116
+ isDisposed;
117
+ constructor(callback, ...args) {
118
+ this.isDisposed = false;
119
+ queueMicrotask(() => {
120
+ if (!this.isDisposed) {
121
+ callback(...args);
122
+ }
123
+ });
124
+ }
125
+ dispose() {
126
+ this.isDisposed = true;
127
+ }
128
+ }
129
+ exports.QueueMicrotaskImpl = QueueMicrotaskImpl;
130
+ class PromiseImpl {
131
+ isDisposed;
132
+ constructor(callback, ...args) {
133
+ this.isDisposed = false;
134
+ Promise.resolve().then(() => {
135
+ if (!this.isDisposed) {
136
+ callback(...args);
137
+ }
138
+ }, () => {
139
+ });
140
+ }
141
+ dispose() {
142
+ this.isDisposed = true;
143
+ }
144
+ }
145
+ exports.PromiseImpl = PromiseImpl;
102
146
  const _textEncoder = new TextEncoder();
103
147
  const _ril = Object.freeze({
104
148
  messageBuffer: Object.freeze({
@@ -135,8 +179,18 @@ const _ril = Object.freeze({
135
179
  return { dispose: () => clearTimeout(handle) };
136
180
  },
137
181
  setImmediate(callback, ...args) {
138
- const handle = setTimeout(callback, 0, ...args);
139
- return { dispose: () => clearTimeout(handle) };
182
+ // Browser don't have setImmediate and setTimeout with 0 delay of 0 can cause problems
183
+ // in webviews and similar environments due to throttling.
184
+ if (typeof globalThis.queueMicrotask === 'function') {
185
+ return new QueueMicrotaskImpl(callback, ...args);
186
+ }
187
+ else if (Promise !== undefined) {
188
+ return new PromiseImpl(callback, ...args);
189
+ }
190
+ else {
191
+ const handle = setTimeout(callback, 0, ...args);
192
+ return { dispose: () => clearTimeout(handle) };
193
+ }
140
194
  },
141
195
  setInterval(callback, ms, ...args) {
142
196
  const handle = setInterval(callback, ms, ...args);
@@ -1,4 +1,4 @@
1
- /// <reference path="../../typings/thenable.d.ts" />
1
+ /// <reference path="../../typings/thenable.d.ts" preserve="true" />
2
2
  import { Message, MessageSignature, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseError, ErrorCodes, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, ResponseMessage, ParameterStructures, _EM } from './messages';
3
3
  import { LinkedMap, LRUCache, Touch } from './linkedMap';
4
4
  import { Disposable } from './disposable';
@@ -9,6 +9,6 @@ import { MessageReader, AbstractMessageReader, ReadableStreamMessageReader, Data
9
9
  import { MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions } from './messageWriter';
10
10
  import { AbstractMessageBuffer } from './messageBuffer';
11
11
  import { ContentTypeEncoderOptions, ContentEncoder, ContentTypeEncoder, ContentTypeDecoderOptions, ContentDecoder, ContentTypeDecoder } from './encoding';
12
- import { Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValues, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, MessageStrategy } from './connection';
12
+ import { Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, RequestParam, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValue, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, IdCancellationReceiverStrategy, RequestCancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, MessageStrategy, TraceValues } from './connection';
13
13
  import RAL from './ral';
14
- export { RAL, Message, MessageSignature, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseError, ErrorCodes, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, ResponseMessage, ParameterStructures, _EM, LinkedMap, Touch, LRUCache, Disposable, Event, Emitter, AbstractCancellationTokenSource, CancellationTokenSource, CancellationToken, SharedArraySenderStrategy, SharedArrayReceiverStrategy, MessageReader, AbstractMessageReader, ReadableStreamMessageReader, DataCallback, MessageReaderOptions, PartialMessageInfo, MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions, AbstractMessageBuffer, ContentTypeEncoderOptions, ContentEncoder, ContentTypeEncoder, ContentTypeDecoderOptions, ContentDecoder, ContentTypeDecoder, Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValues, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, MessageStrategy };
14
+ export { RAL, Message, MessageSignature, RequestMessage, RequestType, RequestType0, RequestType1, RequestType2, RequestType3, RequestType4, RequestType5, RequestType6, RequestType7, RequestType8, RequestType9, ResponseError, ErrorCodes, NotificationMessage, NotificationType, NotificationType0, NotificationType1, NotificationType2, NotificationType3, NotificationType4, NotificationType5, NotificationType6, NotificationType7, NotificationType8, NotificationType9, ResponseMessage, ParameterStructures, _EM, LinkedMap, Touch, LRUCache, Disposable, Event, Emitter, AbstractCancellationTokenSource, CancellationTokenSource, CancellationToken, SharedArraySenderStrategy, SharedArrayReceiverStrategy, MessageReader, AbstractMessageReader, ReadableStreamMessageReader, DataCallback, MessageReaderOptions, PartialMessageInfo, MessageWriter, AbstractMessageWriter, WriteableStreamMessageWriter, MessageWriterOptions, AbstractMessageBuffer, ContentTypeEncoderOptions, ContentEncoder, ContentTypeEncoder, ContentTypeDecoderOptions, ContentDecoder, ContentTypeDecoder, Logger, ConnectionStrategy, ConnectionOptions, MessageConnection, NullLogger, createMessageConnection, ProgressToken, ProgressType, RequestParam, HandlerResult, StarRequestHandler, GenericRequestHandler, RequestHandler0, RequestHandler, RequestHandler1, RequestHandler2, RequestHandler3, RequestHandler4, RequestHandler5, RequestHandler6, RequestHandler7, RequestHandler8, RequestHandler9, StarNotificationHandler, GenericNotificationHandler, NotificationHandler0, NotificationHandler, NotificationHandler1, NotificationHandler2, NotificationHandler3, NotificationHandler4, NotificationHandler5, NotificationHandler6, NotificationHandler7, NotificationHandler8, NotificationHandler9, Trace, TraceValue, TraceValues, TraceFormat, TraceOptions, SetTraceParams, SetTraceNotification, LogTraceParams, LogTraceNotification, Tracer, ConnectionErrors, ConnectionError, CancellationId, CancellationReceiverStrategy, IdCancellationReceiverStrategy, RequestCancellationReceiverStrategy, CancellationSenderStrategy, CancellationStrategy, MessageStrategy };
@@ -3,10 +3,13 @@
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Licensed under the MIT License. See License.txt in the project root for license information.
5
5
  * ------------------------------------------------------------------------------------------ */
6
- /// <reference path="../../typings/thenable.d.ts" />
6
+ /// <reference path="../../typings/thenable.d.ts" preserve="true"/>
7
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
+ };
7
10
  Object.defineProperty(exports, "__esModule", { value: true });
8
11
  exports.ProgressType = exports.ProgressToken = exports.createMessageConnection = exports.NullLogger = exports.ConnectionOptions = exports.ConnectionStrategy = exports.AbstractMessageBuffer = exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = exports.SharedArrayReceiverStrategy = exports.SharedArraySenderStrategy = exports.CancellationToken = exports.CancellationTokenSource = exports.Emitter = exports.Event = exports.Disposable = exports.LRUCache = exports.Touch = exports.LinkedMap = exports.ParameterStructures = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.ErrorCodes = exports.ResponseError = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType0 = exports.RequestType = exports.Message = exports.RAL = void 0;
9
- exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.Trace = void 0;
12
+ exports.MessageStrategy = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.RequestCancellationReceiverStrategy = exports.IdCancellationReceiverStrategy = exports.CancellationReceiverStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.TraceValues = exports.TraceValue = exports.Trace = void 0;
10
13
  const messages_1 = require("./messages");
11
14
  Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return messages_1.Message; } });
12
15
  Object.defineProperty(exports, "RequestType", { enumerable: true, get: function () { return messages_1.RequestType; } });
@@ -67,15 +70,18 @@ Object.defineProperty(exports, "createMessageConnection", { enumerable: true, ge
67
70
  Object.defineProperty(exports, "ProgressToken", { enumerable: true, get: function () { return connection_1.ProgressToken; } });
68
71
  Object.defineProperty(exports, "ProgressType", { enumerable: true, get: function () { return connection_1.ProgressType; } });
69
72
  Object.defineProperty(exports, "Trace", { enumerable: true, get: function () { return connection_1.Trace; } });
70
- Object.defineProperty(exports, "TraceValues", { enumerable: true, get: function () { return connection_1.TraceValues; } });
73
+ Object.defineProperty(exports, "TraceValue", { enumerable: true, get: function () { return connection_1.TraceValue; } });
71
74
  Object.defineProperty(exports, "TraceFormat", { enumerable: true, get: function () { return connection_1.TraceFormat; } });
72
75
  Object.defineProperty(exports, "SetTraceNotification", { enumerable: true, get: function () { return connection_1.SetTraceNotification; } });
73
76
  Object.defineProperty(exports, "LogTraceNotification", { enumerable: true, get: function () { return connection_1.LogTraceNotification; } });
74
77
  Object.defineProperty(exports, "ConnectionErrors", { enumerable: true, get: function () { return connection_1.ConnectionErrors; } });
75
78
  Object.defineProperty(exports, "ConnectionError", { enumerable: true, get: function () { return connection_1.ConnectionError; } });
76
79
  Object.defineProperty(exports, "CancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.CancellationReceiverStrategy; } });
80
+ Object.defineProperty(exports, "IdCancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.IdCancellationReceiverStrategy; } });
81
+ Object.defineProperty(exports, "RequestCancellationReceiverStrategy", { enumerable: true, get: function () { return connection_1.RequestCancellationReceiverStrategy; } });
77
82
  Object.defineProperty(exports, "CancellationSenderStrategy", { enumerable: true, get: function () { return connection_1.CancellationSenderStrategy; } });
78
83
  Object.defineProperty(exports, "CancellationStrategy", { enumerable: true, get: function () { return connection_1.CancellationStrategy; } });
79
84
  Object.defineProperty(exports, "MessageStrategy", { enumerable: true, get: function () { return connection_1.MessageStrategy; } });
80
- const ral_1 = require("./ral");
85
+ Object.defineProperty(exports, "TraceValues", { enumerable: true, get: function () { return connection_1.TraceValues; } });
86
+ const ral_1 = __importDefault(require("./ral"));
81
87
  exports.RAL = ral_1.default;
@@ -3,10 +3,46 @@
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Licensed under the MIT License. See License.txt in the project root for license information.
5
5
  *--------------------------------------------------------------------------------------------*/
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || (function () {
23
+ var ownKeys = function(o) {
24
+ ownKeys = Object.getOwnPropertyNames || function (o) {
25
+ var ar = [];
26
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
+ return ar;
28
+ };
29
+ return ownKeys(o);
30
+ };
31
+ return function (mod) {
32
+ if (mod && mod.__esModule) return mod;
33
+ var result = {};
34
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
+ __setModuleDefault(result, mod);
36
+ return result;
37
+ };
38
+ })();
39
+ var __importDefault = (this && this.__importDefault) || function (mod) {
40
+ return (mod && mod.__esModule) ? mod : { "default": mod };
41
+ };
6
42
  Object.defineProperty(exports, "__esModule", { value: true });
7
43
  exports.CancellationTokenSource = exports.CancellationToken = void 0;
8
- const ral_1 = require("./ral");
9
- const Is = require("./is");
44
+ const ral_1 = __importDefault(require("./ral"));
45
+ const Is = __importStar(require("./is"));
10
46
  const events_1 = require("./events");
11
47
  var CancellationToken;
12
48
  (function (CancellationToken) {
@@ -31,9 +67,8 @@ const shortcutEvent = Object.freeze(function (callback, context) {
31
67
  return { dispose() { handle.dispose(); } };
32
68
  });
33
69
  class MutableToken {
34
- constructor() {
35
- this._isCancelled = false;
36
- }
70
+ _isCancelled = false;
71
+ _emitter;
37
72
  cancel() {
38
73
  if (!this._isCancelled) {
39
74
  this._isCancelled = true;
@@ -63,6 +98,7 @@ class MutableToken {
63
98
  }
64
99
  }
65
100
  class CancellationTokenSource {
101
+ _token;
66
102
  get token() {
67
103
  if (!this._token) {
68
104
  // be lazy and create the token only when