@adminide-stack/extension-api 5.0.1-alpha.9 → 6.0.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/connections/jsonrpc2/connection.js +5 -13
- package/lib/connections/jsonrpc2/events.js +3 -4
- package/lib/connections/jsonrpc2/linkedMap.js +3 -4
- package/lib/connections/jsonrpc2/messages.js +6 -7
- package/lib/connections/jsonrpc2/test-helper.js +4 -6
- package/lib/connections/jsonrpc2/trace.js +3 -6
- package/lib/connections/jsonrpc2/transport.js +3 -5
- package/lib/connections/jsonrpc2/transports/webWorker.js +3 -5
- package/lib/connections/proxy/proxy.js +7 -8
- package/lib/connections/remote-rpc/browser-remote-rpc.js +3 -9
- package/lib/connections/remote-rpc/rxjs-websockets.d.ts +1 -1
- package/lib/connections/remote-rpc/rxjs-websockets.js +4 -8
- package/lib/constants/action-types.js +5 -6
- package/lib/constants/types.js +2 -3
- package/lib/core/expr/evaluator.js +6 -9
- package/lib/core/expr/lexer.js +6 -7
- package/lib/core/expr/parser.js +4 -6
- package/lib/core/types/ext-host-types.js +5 -8
- package/lib/index.d.ts +2 -0
- package/lib/index.js +1 -8
- package/lib/interfaces/context.d.ts +1 -1
- package/lib/interfaces/contributions/contribution.js +3 -4
- package/lib/interfaces/ext-services/ext-services.d.ts +2 -1
- package/lib/interfaces/generated-models.d.ts +1258 -1086
- package/lib/interfaces/generated-models.js +82 -253
- package/lib/interfaces/graphql.d.ts +1 -1
- package/lib/interfaces/graphql.js +1 -2
- package/lib/interfaces/model.js +2 -3
- package/lib/interfaces/platform-context.d.ts +1 -1
- package/lib/interfaces/text-document.js +4 -6
- package/lib/interfaces/webview/webview.js +2 -3
- package/lib/protocol/client.protocol.js +3 -5
- package/lib/protocol/common.protocol.js +6 -8
- package/lib/protocol/editor-missing-types.js +2 -3
- package/lib/protocol/index.d.ts +3 -0
- package/lib/protocol/proxy-identifier.js +8 -9
- package/lib/protocol/rpc-logger.js +3 -6
- package/lib/protocol/rpc-protocol.js +10 -20
- package/lib/protocol/server.protocol.js +14 -16
- package/lib/protocol/shared/editor.js +4 -6
- package/lib/protocol/temporary-types.js +4 -13
- package/lib/protocol/utils/lazy-promise.js +3 -6
- package/lib/utils/abortable-rx.d.ts +32 -0
- package/lib/utils/abortable-rx.js +112 -0
- package/lib/utils/errors.js +3 -4
- package/lib/utils/extensions.js +3 -5
- package/lib/utils/helper.test.js +2 -3
- package/lib/utils/paths-util.js +5 -7
- package/lib/utils/rxjs/combineLatestOrDefault.js +3 -10
- package/lib/utils/util.js +7 -9
- package/lib/worker-lib/webWorkerLink.d.ts +1 -1
- package/package.json +7 -5
- package/lib/connections/jsonrpc2/connection.js.map +0 -1
- package/lib/connections/jsonrpc2/connection.test.js +0 -441
- package/lib/connections/jsonrpc2/connection.test.js.map +0 -1
- package/lib/connections/jsonrpc2/events.js.map +0 -1
- package/lib/connections/jsonrpc2/index.js +0 -8
- package/lib/connections/jsonrpc2/index.js.map +0 -1
- package/lib/connections/jsonrpc2/linkedMap.js.map +0 -1
- package/lib/connections/jsonrpc2/linkedMap.test.js +0 -60
- package/lib/connections/jsonrpc2/linkedMap.test.js.map +0 -1
- package/lib/connections/jsonrpc2/messages.js.map +0 -1
- package/lib/connections/jsonrpc2/test-helper.js.map +0 -1
- package/lib/connections/jsonrpc2/trace.js.map +0 -1
- package/lib/connections/jsonrpc2/transport.js.map +0 -1
- package/lib/connections/jsonrpc2/transports/browser-websocket.d.ts +0 -0
- package/lib/connections/jsonrpc2/transports/browser-websocket.js +0 -189
- package/lib/connections/jsonrpc2/transports/browser-websocket.js.map +0 -1
- package/lib/connections/jsonrpc2/transports/merged.d.ts +0 -0
- package/lib/connections/jsonrpc2/transports/merged.js +0 -239
- package/lib/connections/jsonrpc2/transports/merged.js.map +0 -1
- package/lib/connections/jsonrpc2/transports/webSocket.d.ts +0 -0
- package/lib/connections/jsonrpc2/transports/webSocket.js +0 -138
- package/lib/connections/jsonrpc2/transports/webSocket.js.map +0 -1
- package/lib/connections/jsonrpc2/transports/webWorker.js.map +0 -1
- package/lib/connections/proxy/index.js +0 -2
- package/lib/connections/proxy/index.js.map +0 -1
- package/lib/connections/proxy/proxy.js.map +0 -1
- package/lib/connections/proxy/proxy.test.js +0 -53
- package/lib/connections/proxy/proxy.test.js.map +0 -1
- package/lib/connections/remote-rpc/browser-remote-rpc.js.map +0 -1
- package/lib/connections/remote-rpc/browser-server-rpc.test.d.ts +0 -0
- package/lib/connections/remote-rpc/browser-server-rpc.test.js +0 -317
- package/lib/connections/remote-rpc/browser-server-rpc.test.js.map +0 -1
- package/lib/connections/remote-rpc/index.js +0 -2
- package/lib/connections/remote-rpc/index.js.map +0 -1
- package/lib/connections/remote-rpc/old-browser-remote-rpc.js +0 -37
- package/lib/connections/remote-rpc/old-browser-remote-rpc.js.map +0 -1
- package/lib/connections/remote-rpc/rxjs-websockets.js.map +0 -1
- package/lib/constants/action-types.js.map +0 -1
- package/lib/constants/index.js +0 -3
- package/lib/constants/index.js.map +0 -1
- package/lib/constants/types.js.map +0 -1
- package/lib/core/expr/evaluator.js.map +0 -1
- package/lib/core/expr/evaluator.test.js +0 -50
- package/lib/core/expr/evaluator.test.js.map +0 -1
- package/lib/core/expr/index.js +0 -4
- package/lib/core/expr/index.js.map +0 -1
- package/lib/core/expr/lexer.js.map +0 -1
- package/lib/core/expr/parser.js.map +0 -1
- package/lib/core/index.js +0 -3
- package/lib/core/index.js.map +0 -1
- package/lib/core/types/ext-host-types-bk.d.ts +0 -0
- package/lib/core/types/ext-host-types-bk.js +0 -1275
- package/lib/core/types/ext-host-types-bk.js.map +0 -1
- package/lib/core/types/ext-host-types.js.map +0 -1
- package/lib/core/types/index.js +0 -2
- package/lib/core/types/index.js.map +0 -1
- package/lib/errors/errors.js +0 -9
- package/lib/errors/errors.js.map +0 -1
- package/lib/errors/index.js +0 -2
- package/lib/errors/index.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/interfaces/command.js +0 -2
- package/lib/interfaces/command.js.map +0 -1
- package/lib/interfaces/configuration.js +0 -2
- package/lib/interfaces/configuration.js.map +0 -1
- package/lib/interfaces/connection.js +0 -2
- package/lib/interfaces/connection.js.map +0 -1
- package/lib/interfaces/context.js +0 -2
- package/lib/interfaces/context.js.map +0 -1
- package/lib/interfaces/contributions/contribution-service.js +0 -2
- package/lib/interfaces/contributions/contribution-service.js.map +0 -1
- package/lib/interfaces/contributions/contribution.js.map +0 -1
- package/lib/interfaces/contributions/index.js +0 -3
- package/lib/interfaces/contributions/index.js.map +0 -1
- package/lib/interfaces/controller.js +0 -2
- package/lib/interfaces/controller.js.map +0 -1
- package/lib/interfaces/errors.js +0 -2
- package/lib/interfaces/errors.js.map +0 -1
- package/lib/interfaces/ext-services/contributon-registry.js +0 -2
- package/lib/interfaces/ext-services/contributon-registry.js.map +0 -1
- package/lib/interfaces/ext-services/ext-services.js +0 -2
- package/lib/interfaces/ext-services/ext-services.js.map +0 -1
- package/lib/interfaces/ext-services/extension-service.js +0 -2
- package/lib/interfaces/ext-services/extension-service.js.map +0 -1
- package/lib/interfaces/ext-services/index.js +0 -9
- package/lib/interfaces/ext-services/index.js.map +0 -1
- package/lib/interfaces/ext-services/model-service.js +0 -2
- package/lib/interfaces/ext-services/model-service.js.map +0 -1
- package/lib/interfaces/ext-services/panel-view-registry.js +0 -2
- package/lib/interfaces/ext-services/panel-view-registry.js.map +0 -1
- package/lib/interfaces/ext-services/settings-service.js +0 -2
- package/lib/interfaces/ext-services/settings-service.js.map +0 -1
- package/lib/interfaces/ext-services/view-service.js +0 -2
- package/lib/interfaces/ext-services/view-service.js.map +0 -1
- package/lib/interfaces/ext-services/viewer-service.js +0 -4
- package/lib/interfaces/ext-services/viewer-service.js.map +0 -1
- package/lib/interfaces/extension-manifest.js +0 -2
- package/lib/interfaces/extension-manifest.js.map +0 -1
- package/lib/interfaces/extension.js +0 -2
- package/lib/interfaces/extension.js.map +0 -1
- package/lib/interfaces/generated-models.js.map +0 -1
- package/lib/interfaces/graphql.js.map +0 -1
- package/lib/interfaces/index.js +0 -22
- package/lib/interfaces/index.js.map +0 -1
- package/lib/interfaces/languages-types.js +0 -2
- package/lib/interfaces/languages-types.js.map +0 -1
- package/lib/interfaces/model.js.map +0 -1
- package/lib/interfaces/plain-types.js +0 -5
- package/lib/interfaces/plain-types.js.map +0 -1
- package/lib/interfaces/plainTypes.js +0 -2
- package/lib/interfaces/plainTypes.js.map +0 -1
- package/lib/interfaces/platform-context.js +0 -2
- package/lib/interfaces/platform-context.js.map +0 -1
- package/lib/interfaces/react-props/action-item.js +0 -2
- package/lib/interfaces/react-props/action-item.js.map +0 -1
- package/lib/interfaces/react-props/extension-controller.js +0 -2
- package/lib/interfaces/react-props/extension-controller.js.map +0 -1
- package/lib/interfaces/react-props/index.js +0 -4
- package/lib/interfaces/react-props/index.js.map +0 -1
- package/lib/interfaces/react-props/platform-context.js +0 -2
- package/lib/interfaces/react-props/platform-context.js.map +0 -1
- package/lib/interfaces/registry-extension.js +0 -2
- package/lib/interfaces/registry-extension.js.map +0 -1
- package/lib/interfaces/settings.js +0 -2
- package/lib/interfaces/settings.js.map +0 -1
- package/lib/interfaces/text-document.js.map +0 -1
- package/lib/interfaces/webview/index.js +0 -4
- package/lib/interfaces/webview/index.js.map +0 -1
- package/lib/interfaces/webview/webview-manager-service.js +0 -2
- package/lib/interfaces/webview/webview-manager-service.js.map +0 -1
- package/lib/interfaces/webview/webview-port-mapping.js +0 -2
- package/lib/interfaces/webview/webview-port-mapping.js.map +0 -1
- package/lib/interfaces/webview/webview.js.map +0 -1
- package/lib/main.d.ts +0 -0
- package/lib/main.js +0 -3
- package/lib/main.js.map +0 -1
- package/lib/protocol/client.protocol.js.map +0 -1
- package/lib/protocol/common.protocol.js.map +0 -1
- package/lib/protocol/editor-missing-types.js.map +0 -1
- package/lib/protocol/index.js +0 -8
- package/lib/protocol/index.js.map +0 -1
- package/lib/protocol/proxy-identifier.js.map +0 -1
- package/lib/protocol/rpc-logger.js.map +0 -1
- package/lib/protocol/rpc-protocol.js.map +0 -1
- package/lib/protocol/rpc-protocol.test.js +0 -169
- package/lib/protocol/rpc-protocol.test.js.map +0 -1
- package/lib/protocol/server.protocol-bk.d.ts +0 -0
- package/lib/protocol/server.protocol-bk.js +0 -719
- package/lib/protocol/server.protocol-bk.js.map +0 -1
- package/lib/protocol/server.protocol.js.map +0 -1
- package/lib/protocol/shared/editor.js.map +0 -1
- package/lib/protocol/shared/tasks.js +0 -3
- package/lib/protocol/shared/tasks.js.map +0 -1
- package/lib/protocol/temporary-types.js.map +0 -1
- package/lib/protocol/utils/index.js +0 -2
- package/lib/protocol/utils/index.js.map +0 -1
- package/lib/protocol/utils/lazy-promise.js.map +0 -1
- package/lib/utils/errors.js.map +0 -1
- package/lib/utils/extensions.js.map +0 -1
- package/lib/utils/helper.test.js.map +0 -1
- package/lib/utils/index.js +0 -8
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/paths-util.js.map +0 -1
- package/lib/utils/rxjs/combineLatestOrDefault.js.map +0 -1
- package/lib/utils/rxjs/combineLatestOrDefault.test.js +0 -50
- package/lib/utils/rxjs/combineLatestOrDefault.test.js.map +0 -1
- package/lib/utils/rxjs/index.js +0 -2
- package/lib/utils/rxjs/index.js.map +0 -1
- package/lib/utils/util.js.map +0 -1
- package/lib/worker-lib/MessageTypes.js +0 -6
- package/lib/worker-lib/MessageTypes.js.map +0 -1
- package/lib/worker-lib/index.js +0 -3
- package/lib/worker-lib/index.js.map +0 -1
- package/lib/worker-lib/webWorkerLink.js +0 -90
- package/lib/worker-lib/webWorkerLink.js.map +0 -1
- package/lib/worker-lib/workerUtils.js +0 -173
- package/lib/worker-lib/workerUtils.js.map +0 -1
@@ -1,8 +1,7 @@
|
|
1
|
-
import minimatch from
|
2
|
-
/**
|
1
|
+
import minimatch from'minimatch';/**
|
3
2
|
* Returns whether any of the document selectors match (or "select") the document.
|
4
3
|
*/
|
5
|
-
|
4
|
+
function match(selectors, document) {
|
6
5
|
for (const selector of isSingleDocumentSelector(selectors) ? [selectors] : selectors) {
|
7
6
|
if (match1(selector, document)) {
|
8
7
|
return true;
|
@@ -36,7 +35,7 @@ function match1(selector, document) {
|
|
36
35
|
* Taken from
|
37
36
|
* https://github.com/Microsoft/vscode/blob/3d35801127f0a62d58d752bc613506e836c5d120/src/vs/editor/common/modes/languageSelector.ts#L24.
|
38
37
|
*/
|
39
|
-
|
38
|
+
function score(selector, candidateUri, candidateLanguage) {
|
40
39
|
// array -> take max individual value
|
41
40
|
let returnValue = 0;
|
42
41
|
for (const filter of selector) {
|
@@ -110,5 +109,4 @@ function score1(selector, candidateUri, candidateLanguage) {
|
|
110
109
|
}
|
111
110
|
}
|
112
111
|
return returnValue;
|
113
|
-
}
|
114
|
-
//# sourceMappingURL=text-document.js.map
|
112
|
+
}export{match,score};
|
@@ -1,6 +1,5 @@
|
|
1
|
-
|
1
|
+
var WebviewContentPurpose;
|
2
2
|
(function (WebviewContentPurpose) {
|
3
3
|
WebviewContentPurpose["NotebookRenderer"] = "notebookRenderer";
|
4
4
|
WebviewContentPurpose["CustomEditor"] = "customEditor";
|
5
|
-
})(WebviewContentPurpose || (WebviewContentPurpose = {}));
|
6
|
-
//# sourceMappingURL=webview.js.map
|
5
|
+
})(WebviewContentPurpose || (WebviewContentPurpose = {}));export{WebviewContentPurpose};
|
@@ -1,5 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
};
|
5
|
-
//# sourceMappingURL=client.protocol.js.map
|
1
|
+
import {createMainContextProxyIdentifier}from'./proxy-identifier.js';const ClientContext = {
|
2
|
+
ClientThreadLanguageFeatures: createMainContextProxyIdentifier('ClientThreadLanguageFeatures'),
|
3
|
+
};export{ClientContext};
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
export class IdObject {
|
1
|
+
import {URI}from'@vscode-alt/monaco-editor/esm/vs/base/common/uri.js';class IdObject {
|
3
2
|
static mixin(object) {
|
4
3
|
object._id = IdObject._n++;
|
5
4
|
return object;
|
@@ -7,7 +6,7 @@ export class IdObject {
|
|
7
6
|
}
|
8
7
|
IdObject._n = 0;
|
9
8
|
// needed
|
10
|
-
|
9
|
+
var ISuggestDataDtoField;
|
11
10
|
(function (ISuggestDataDtoField) {
|
12
11
|
ISuggestDataDtoField["label"] = "a";
|
13
12
|
ISuggestDataDtoField["kind"] = "b";
|
@@ -26,14 +25,14 @@ export var ISuggestDataDtoField;
|
|
26
25
|
// to merge into label
|
27
26
|
ISuggestDataDtoField["label2"] = "o";
|
28
27
|
})(ISuggestDataDtoField || (ISuggestDataDtoField = {}));
|
29
|
-
|
28
|
+
var ISuggestResultDtoField;
|
30
29
|
(function (ISuggestResultDtoField) {
|
31
30
|
ISuggestResultDtoField["defaultRanges"] = "a";
|
32
31
|
ISuggestResultDtoField["completions"] = "b";
|
33
32
|
ISuggestResultDtoField["isIncomplete"] = "c";
|
34
33
|
ISuggestResultDtoField["duration"] = "d";
|
35
34
|
})(ISuggestResultDtoField || (ISuggestResultDtoField = {}));
|
36
|
-
|
35
|
+
function reviveWorkspaceEditDto(data) {
|
37
36
|
if (data && data.edits) {
|
38
37
|
for (const edit of data.edits) {
|
39
38
|
if (typeof edit.resource === 'object') {
|
@@ -47,7 +46,7 @@ export function reviveWorkspaceEditDto(data) {
|
|
47
46
|
}
|
48
47
|
return data;
|
49
48
|
}
|
50
|
-
|
49
|
+
var ObjectIdentifier;
|
51
50
|
(function (ObjectIdentifier) {
|
52
51
|
ObjectIdentifier.name = '$ident';
|
53
52
|
function mixin(obj, id) {
|
@@ -59,5 +58,4 @@ export var ObjectIdentifier;
|
|
59
58
|
return obj[ObjectIdentifier.name];
|
60
59
|
}
|
61
60
|
ObjectIdentifier.of = of;
|
62
|
-
})(ObjectIdentifier || (ObjectIdentifier = {}));
|
63
|
-
//# sourceMappingURL=common.protocol.js.map
|
61
|
+
})(ObjectIdentifier || (ObjectIdentifier = {}));export{ISuggestDataDtoField,ISuggestResultDtoField,IdObject,ObjectIdentifier,reviveWorkspaceEditDto};
|
@@ -1,7 +1,6 @@
|
|
1
|
-
|
1
|
+
var EditorPosition;
|
2
2
|
(function (EditorPosition) {
|
3
3
|
EditorPosition[EditorPosition["ONE"] = 0] = "ONE";
|
4
4
|
EditorPosition[EditorPosition["TWO"] = 1] = "TWO";
|
5
5
|
EditorPosition[EditorPosition["THREE"] = 2] = "THREE";
|
6
|
-
})(EditorPosition || (EditorPosition = {}));
|
7
|
-
//# sourceMappingURL=editor-missing-types.js.map
|
6
|
+
})(EditorPosition || (EditorPosition = {}));export{EditorPosition};
|
package/lib/protocol/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/* tslint:disable */
|
2
|
-
|
2
|
+
class ProxyIdentifier {
|
3
3
|
constructor(isMain, sid, hostId) {
|
4
4
|
this.isMain = isMain;
|
5
5
|
this.sid = sid;
|
@@ -9,27 +9,27 @@ export class ProxyIdentifier {
|
|
9
9
|
}
|
10
10
|
ProxyIdentifier.count = 0;
|
11
11
|
const identifiers = [];
|
12
|
-
|
12
|
+
function createMainContextProxyIdentifier(identifier, hostIdentifier = 1 /* HostIdentifier.ServerMainThread */) {
|
13
13
|
const result = new ProxyIdentifier(true, identifier, hostIdentifier);
|
14
14
|
identifiers[result.nid] = result;
|
15
15
|
return result;
|
16
16
|
}
|
17
|
-
|
17
|
+
function createExtHostContextProxyIdentifier(identifier, hostIdentifier = 0 /* HostIdentifier.ServerExtHost */) {
|
18
18
|
const result = new ProxyIdentifier(false, identifier, hostIdentifier);
|
19
19
|
identifiers[result.nid] = result;
|
20
20
|
return result;
|
21
21
|
}
|
22
|
-
|
22
|
+
function getStringIdentifierForProxy(nid) {
|
23
23
|
return identifiers[nid] ? identifiers[nid].sid : null;
|
24
24
|
}
|
25
|
-
|
25
|
+
var HostIdentifier;
|
26
26
|
(function (HostIdentifier) {
|
27
27
|
HostIdentifier[HostIdentifier["ServerExtHost"] = 0] = "ServerExtHost";
|
28
28
|
HostIdentifier[HostIdentifier["ServerMainThread"] = 1] = "ServerMainThread";
|
29
29
|
HostIdentifier[HostIdentifier["BrowserExtHost"] = 2] = "BrowserExtHost";
|
30
30
|
HostIdentifier[HostIdentifier["BrowserClientThread"] = 3] = "BrowserClientThread";
|
31
31
|
})(HostIdentifier || (HostIdentifier = {}));
|
32
|
-
|
32
|
+
var RequestType;
|
33
33
|
(function (RequestType) {
|
34
34
|
/**
|
35
35
|
* Process the request on the reciever end
|
@@ -44,9 +44,8 @@ export var RequestType;
|
|
44
44
|
*/
|
45
45
|
RequestType[RequestType["ProcessAndForward"] = 2] = "ProcessAndForward";
|
46
46
|
})(RequestType || (RequestType = {}));
|
47
|
-
|
47
|
+
var TransportType;
|
48
48
|
(function (TransportType) {
|
49
49
|
TransportType[TransportType["Socket"] = 0] = "Socket";
|
50
50
|
TransportType[TransportType["WebSocket"] = 1] = "WebSocket";
|
51
|
-
})(TransportType || (TransportType = {}));
|
52
|
-
//# sourceMappingURL=proxy-identifier.js.map
|
51
|
+
})(TransportType || (TransportType = {}));export{HostIdentifier,ProxyIdentifier,RequestType,TransportType,createExtHostContextProxyIdentifier,createMainContextProxyIdentifier,getStringIdentifierForProxy};
|
@@ -1,6 +1,4 @@
|
|
1
1
|
// Enable to see detailed message communication between window and extension host
|
2
|
-
const LOG_EXTENSION_HOST_COMMUNICATION = false;
|
3
|
-
const LOG_USE_COLORS = true;
|
4
2
|
const colorTables = [
|
5
3
|
['#2977B1', '#FC802D', '#34A13A', '#D3282F', '#9366BA'],
|
6
4
|
['#8B564C', '#E177C0', '#7F7F7F', '#BBBE3D', '#2EBECD'],
|
@@ -23,7 +21,7 @@ function pretty(data) {
|
|
23
21
|
}
|
24
22
|
return prettyWithoutArrays(data);
|
25
23
|
}
|
26
|
-
|
24
|
+
class RPCLogger {
|
27
25
|
constructor() {
|
28
26
|
this._totalIncoming = 0;
|
29
27
|
this._totalOutgoing = 0;
|
@@ -31,7 +29,7 @@ export class RPCLogger {
|
|
31
29
|
_log(direction, totalLength, msgLength, req, initiator, str, data) {
|
32
30
|
data = pretty(data);
|
33
31
|
const colorTable = colorTables[initiator];
|
34
|
-
const color =
|
32
|
+
const color = colorTable[req % colorTable.length] ;
|
35
33
|
/* tslint:disable-next-line:max-line-length */
|
36
34
|
let args = [`%c[${direction}]%c[${String(totalLength).padStart(7)}]%c[len: ${String(msgLength).padStart(5)}]%c${String(req).padStart(5)} - ${str}`, 'color: darkgreen', 'color: grey', 'color: grey', `color: ${color}`];
|
37
35
|
if (/\($/.test(str)) {
|
@@ -52,5 +50,4 @@ export class RPCLogger {
|
|
52
50
|
this._totalOutgoing += msgLength;
|
53
51
|
this._log('Win \u2192 Ext', this._totalOutgoing, msgLength, req, initiator, str, data);
|
54
52
|
}
|
55
|
-
}
|
56
|
-
//# sourceMappingURL=rpc-logger.js.map
|
53
|
+
}export{RPCLogger};
|
@@ -1,14 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
import { CancellationToken, CancellationTokenSource } from '@vscode-alt/monaco-editor/esm/vs/base/common/cancellation';
|
4
|
-
import * as errors from '@vscode-alt/monaco-editor/esm/vs/base/common/errors';
|
5
|
-
import { Emitter } from '@vscode-alt/monaco-editor/esm/vs/base/common/event';
|
6
|
-
import { Disposable } from '@vscode-alt/monaco-editor/esm/vs/base/common/lifecycle';
|
7
|
-
import { transformIncomingURIs } from '@vscode-alt/monaco-editor/esm/vs/base/common/uriIpc';
|
8
|
-
import { LazyPromise } from './utils';
|
9
|
-
import { ProxyIdentifier, getStringIdentifierForProxy } from './proxy-identifier';
|
10
|
-
import { VSBuffer } from '@vscode-alt/monaco-editor/esm/vs/base/common/buffer';
|
11
|
-
export function safeStringify(obj, replacer) {
|
1
|
+
import {RunOnceScheduler}from'@vscode-alt/monaco-editor/esm/vs/base/common/async.js';import {CancellationTokenSource,CancellationToken}from'@vscode-alt/monaco-editor/esm/vs/base/common/cancellation.js';import*as errors from'@vscode-alt/monaco-editor/esm/vs/base/common/errors.js';import {Emitter}from'@vscode-alt/monaco-editor/esm/vs/base/common/event.js';import {Disposable}from'@vscode-alt/monaco-editor/esm/vs/base/common/lifecycle.js';import {transformIncomingURIs}from'@vscode-alt/monaco-editor/esm/vs/base/common/uriIpc.js';import {LazyPromise}from'./utils/lazy-promise.js';import {ProxyIdentifier,getStringIdentifierForProxy}from'./proxy-identifier.js';import {VSBuffer}from'@vscode-alt/monaco-editor/esm/vs/base/common/buffer.js';/* tslint:disable */
|
2
|
+
function safeStringify(obj, replacer) {
|
12
3
|
try {
|
13
4
|
return JSON.stringify(obj, replacer);
|
14
5
|
}
|
@@ -27,18 +18,18 @@ function createURIReplacer(transformer) {
|
|
27
18
|
return value;
|
28
19
|
};
|
29
20
|
}
|
30
|
-
|
21
|
+
var RequestInitiator;
|
31
22
|
(function (RequestInitiator) {
|
32
23
|
RequestInitiator[RequestInitiator["LocalSide"] = 0] = "LocalSide";
|
33
24
|
RequestInitiator[RequestInitiator["OtherSide"] = 1] = "OtherSide";
|
34
25
|
})(RequestInitiator || (RequestInitiator = {}));
|
35
|
-
|
26
|
+
var ResponsiveState;
|
36
27
|
(function (ResponsiveState) {
|
37
28
|
ResponsiveState[ResponsiveState["Responsive"] = 0] = "Responsive";
|
38
29
|
ResponsiveState[ResponsiveState["Unresponsive"] = 1] = "Unresponsive";
|
39
30
|
})(ResponsiveState || (ResponsiveState = {}));
|
40
31
|
const noop = () => { };
|
41
|
-
|
32
|
+
class RPCProtocol extends Disposable {
|
42
33
|
constructor(protocol, _localHostId = null, logger = null, transformer = null) {
|
43
34
|
super();
|
44
35
|
this._onDidChangeResponsiveState = this._register(new Emitter());
|
@@ -389,7 +380,7 @@ export class RPCProtocol extends Disposable {
|
|
389
380
|
}
|
390
381
|
}
|
391
382
|
RPCProtocol.UNRESPONSIVE_TIME = 3 * 1000; // 3s
|
392
|
-
|
383
|
+
class MessageBuffer {
|
393
384
|
static alloc(type, req, messageSize) {
|
394
385
|
let result = new MessageBuffer(VSBuffer.alloc(messageSize + 1 /* type */ + 4 /* req */), 0);
|
395
386
|
result.writeUInt8(type);
|
@@ -553,7 +544,7 @@ export class MessageBuffer {
|
|
553
544
|
return arr;
|
554
545
|
}
|
555
546
|
}
|
556
|
-
|
547
|
+
class MessageIO {
|
557
548
|
static _arrayContainsBuffer(arr) {
|
558
549
|
for (let i = 0, len = arr.length; i < len; i++) {
|
559
550
|
if (Buffer.isBuffer(arr[i])) {
|
@@ -719,7 +710,7 @@ export class MessageIO {
|
|
719
710
|
return MessageBuffer.alloc(12 /* MessageType.ReplyErrEmpty */, req, 0).buffer;
|
720
711
|
}
|
721
712
|
}
|
722
|
-
|
713
|
+
var MessageType;
|
723
714
|
(function (MessageType) {
|
724
715
|
MessageType[MessageType["RequestJSONArgs"] = 1] = "RequestJSONArgs";
|
725
716
|
MessageType[MessageType["RequestJSONArgsWithCancellation"] = 2] = "RequestJSONArgsWithCancellation";
|
@@ -734,10 +725,9 @@ export var MessageType;
|
|
734
725
|
MessageType[MessageType["ReplyErrError"] = 11] = "ReplyErrError";
|
735
726
|
MessageType[MessageType["ReplyErrEmpty"] = 12] = "ReplyErrEmpty";
|
736
727
|
})(MessageType || (MessageType = {}));
|
737
|
-
|
728
|
+
var ArgType;
|
738
729
|
(function (ArgType) {
|
739
730
|
ArgType[ArgType["String"] = 1] = "String";
|
740
731
|
ArgType[ArgType["Buffer"] = 2] = "Buffer";
|
741
732
|
ArgType[ArgType["VSBuffer"] = 3] = "VSBuffer";
|
742
|
-
})(ArgType || (ArgType = {}));
|
743
|
-
//# sourceMappingURL=rpc-protocol.js.map
|
733
|
+
})(ArgType || (ArgType = {}));export{ArgType,MessageBuffer,MessageIO,MessageType,RPCProtocol,RequestInitiator,ResponsiveState,safeStringify};
|
@@ -1,28 +1,26 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
MainThreadExtensionService: createMainId('MainThreadExtensionService'),
|
1
|
+
import {createMainContextProxyIdentifier,createExtHostContextProxyIdentifier}from'./proxy-identifier.js';// -- proxy-identifiers are moved to `core` package
|
2
|
+
const MainContext = {
|
3
|
+
MainThreadCommands: createMainContextProxyIdentifier('MainThreadCommands'),
|
4
|
+
MainThreadConfiguration: createMainContextProxyIdentifier('MainThreadConfiguration'),
|
5
|
+
MainThreadUrls: createMainContextProxyIdentifier('MainThreadUrls'),
|
6
|
+
MainThreadOrganization: createMainContextProxyIdentifier('MainThreadOrganization'),
|
7
|
+
MainThreadExtensionService: createMainContextProxyIdentifier('MainThreadExtensionService'),
|
9
8
|
};
|
10
|
-
|
9
|
+
const ExtHostContext = {
|
11
10
|
// ExtHostTreeViews: createExtId<any>('ExtHostTreeViews'),
|
12
|
-
ExtHostCommands:
|
13
|
-
ExtHostConfiguration:
|
11
|
+
ExtHostCommands: createExtHostContextProxyIdentifier('ExtHostCommands'),
|
12
|
+
ExtHostConfiguration: createExtHostContextProxyIdentifier('ExtHostConfiguration'),
|
14
13
|
// ExtHostDocuments: createExtId<ExtHostDocumentsShape>('ExtHostDocuments'),
|
15
|
-
ExtHostExtensionService:
|
16
|
-
ExtHostLogService:
|
14
|
+
ExtHostExtensionService: createExtHostContextProxyIdentifier('ExtHostExtensionService'),
|
15
|
+
ExtHostLogService: createExtHostContextProxyIdentifier('ExtHostLogService'),
|
17
16
|
// ExtHostTerminalService: createExtId<ExtHostTerminalServiceShape>('ExtHostTerminalService'),
|
18
17
|
// ExtHostSCM: createExtId<ExtHostSCMShape>('ExtHostSCM'),
|
19
18
|
// ExtHostSearch: createExtId<ExtHostSearchShape>('ExtHostSearch'),
|
20
19
|
// ExtHostTask: createExtId<ExtHostTaskShape>('ExtHostTask'),
|
21
|
-
ExtHostOrganization:
|
20
|
+
ExtHostOrganization: createExtHostContextProxyIdentifier('ExtHostOrganization'),
|
22
21
|
// ExtHostWindow: createExtId<ExtHostWindowShape>('ExtHostWindow'),
|
23
22
|
// ExtHostWebviews: createExtId<ExtHostWebviewsShape>('ExtHostWebviews'),
|
24
23
|
// ExtHostProgress: createMainId<ExtHostProgressShape>('ExtHostProgress', HostIdentifier.ServerExtHost),
|
25
24
|
// ExtHostUrls: createExtId<ExtHostUrlsShape>('ExtHostUrls'),
|
26
25
|
// ExtHostOutputService: createMainId<ExtHostOutputServiceShape>('ExtHostOutputService', HostIdentifier.ServerExtHost),
|
27
|
-
};
|
28
|
-
//# sourceMappingURL=server.protocol.js.map
|
26
|
+
};export{ExtHostContext,MainContext};
|
@@ -1,6 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export function viewColumnToEditorGroup(editorGroupService, position) {
|
1
|
+
import {ACTIVE_GROUP,SIDE_GROUP}from'@workbench-stack/core';/* tslint:disable */
|
2
|
+
function viewColumnToEditorGroup(editorGroupService, position) {
|
4
3
|
if (typeof position !== 'number' || position === ACTIVE_GROUP) {
|
5
4
|
return ACTIVE_GROUP; // prefer active group when position is undefined or passed in as such
|
6
5
|
}
|
@@ -16,8 +15,7 @@ export function viewColumnToEditorGroup(editorGroupService, position) {
|
|
16
15
|
}
|
17
16
|
return SIDE_GROUP; // open to the side if group not found or we are instructed to
|
18
17
|
}
|
19
|
-
|
18
|
+
function editorGroupToViewColumn(editorGroupService, editorGroup) {
|
20
19
|
const group = (typeof editorGroup === 'number') ? editorGroupService.getGroup(editorGroup) : editorGroup;
|
21
20
|
return editorGroupService.getGroups(2 /* GroupsOrder.GRID_APPEARANCE */).indexOf(group);
|
22
|
-
}
|
23
|
-
//# sourceMappingURL=editor.js.map
|
21
|
+
}export{editorGroupToViewColumn,viewColumnToEditorGroup};
|
@@ -1,18 +1,10 @@
|
|
1
|
-
|
1
|
+
var modes;
|
2
2
|
(function (modes) {
|
3
|
-
/**
|
4
|
-
* @internal
|
5
|
-
*/
|
6
|
-
let DraftMode;
|
7
3
|
(function (DraftMode) {
|
8
4
|
DraftMode[DraftMode["NotSupported"] = 0] = "NotSupported";
|
9
5
|
DraftMode[DraftMode["InDraft"] = 1] = "InDraft";
|
10
6
|
DraftMode[DraftMode["NotInDraft"] = 2] = "NotInDraft";
|
11
|
-
})(
|
12
|
-
/**
|
13
|
-
* @internal
|
14
|
-
*/
|
15
|
-
let CommentThreadCollapsibleState;
|
7
|
+
})(modes.DraftMode || (modes.DraftMode = {}));
|
16
8
|
(function (CommentThreadCollapsibleState) {
|
17
9
|
/**
|
18
10
|
* Determines an item is collapsed
|
@@ -22,6 +14,5 @@ export var modes;
|
|
22
14
|
* Determines an item is expanded
|
23
15
|
*/
|
24
16
|
CommentThreadCollapsibleState[CommentThreadCollapsibleState["Expanded"] = 1] = "Expanded";
|
25
|
-
})(
|
26
|
-
})(modes || (modes = {}));
|
27
|
-
//# sourceMappingURL=temporary-types.js.map
|
17
|
+
})(modes.CommentThreadCollapsibleState || (modes.CommentThreadCollapsibleState = {}));
|
18
|
+
})(modes || (modes = {}));export{modes};
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
// types taken from
|
1
|
+
import {onUnexpectedError}from'@vscode-alt/monaco-editor/esm/vs/base/common/errors.js';// types taken from
|
3
2
|
// https://github.com/andimarek/micro-manager/blob/ac5333a1e0400f6f985ceb0edcbcdfc5a7a79988/src/ipc/ipcRemoteCom.ts
|
4
|
-
|
3
|
+
class LazyPromise {
|
5
4
|
constructor() {
|
6
5
|
this._actual = null;
|
7
6
|
this._actualOk = null;
|
@@ -60,6 +59,4 @@ export class LazyPromise {
|
|
60
59
|
finally(callback) {
|
61
60
|
return this._ensureActual().finally(callback);
|
62
61
|
}
|
63
|
-
}
|
64
|
-
Symbol.toStringTag;
|
65
|
-
//# sourceMappingURL=lazy-promise.js.map
|
62
|
+
}export{LazyPromise};
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { Observable, ObservableInput, OperatorFunction, Subscriber, TeardownLogic } from 'rxjs';
|
2
|
+
/**
|
3
|
+
* Creates an Observable just like RxJS `create`, but exposes an AbortSignal in addition to the subscriber
|
4
|
+
*/
|
5
|
+
export declare const create: <T>(subscribe?: (subscriber: Subscriber<T>, signal: AbortSignal) => TeardownLogic) => Observable<T>;
|
6
|
+
/**
|
7
|
+
* Easiest way to wrap an abortable async function into a Promise.
|
8
|
+
* The factory is called every time the Observable is subscribed to, and the AbortSignal is aborted on unsubscription.
|
9
|
+
*/
|
10
|
+
export declare const defer: <T>(factory: (signal: AbortSignal) => ObservableInput<T>) => Observable<T>;
|
11
|
+
/**
|
12
|
+
* Returns a Promise that resolves with the last emission of the given Observable,
|
13
|
+
* rejects if the Observable errors or rejects with an `AbortError` when the AbortSignal is aborted.
|
14
|
+
*/
|
15
|
+
export declare const toPromise: <T>(observable: Observable<T>, signal?: AbortSignal) => Promise<T>;
|
16
|
+
/**
|
17
|
+
* Calls `next` for every emission and returns a Promise that resolves when the Observable completed, rejects if the
|
18
|
+
* Observable errors or rejects with an `AbortError` when the AbortSignal is aborted.
|
19
|
+
*/
|
20
|
+
export declare const forEach: <T>(source: Observable<T>, next: (value: T) => void, signal?: AbortSignal) => Promise<void>;
|
21
|
+
/**
|
22
|
+
* Like RxJS `switchMap`, but passes an AbortSignal that is aborted when the source emits another element.
|
23
|
+
*/
|
24
|
+
export declare const switchMap: <T, R>(project: (value: T, index: number, abortSignal: AbortSignal) => ObservableInput<R>) => OperatorFunction<T, R>;
|
25
|
+
/**
|
26
|
+
* Like RxJS `concatMap`, but passes an AbortSignal that is aborted when the returned Observable is unsubscribed from.
|
27
|
+
*/
|
28
|
+
export declare const concatMap: <T, R>(project: (value: T, index: number, abortSignal: AbortSignal) => ObservableInput<R>) => OperatorFunction<T, R>;
|
29
|
+
/**
|
30
|
+
* Like RxJS `mergeMap`, but passes an AbortSignal that is aborted when the returned Observable is unsubscribed from.
|
31
|
+
*/
|
32
|
+
export declare const mergeMap: <T, R>(project: (value: T, index: number, abortSignal: AbortSignal) => ObservableInput<R>) => OperatorFunction<T, R>;
|
@@ -0,0 +1,112 @@
|
|
1
|
+
import {Observable,Subscription,from}from'rxjs';import {switchMap as switchMap$1,concatMap as concatMap$1,mergeMap as mergeMap$1}from'rxjs/operators/index.js';/**
|
2
|
+
* Copied from https://github.com/felixfbecker/abortable-rx/blob/master/src/index.ts
|
3
|
+
* To support esm
|
4
|
+
* @returns
|
5
|
+
*
|
6
|
+
*/
|
7
|
+
const createAbortError = () => {
|
8
|
+
const error = new Error('Aborted');
|
9
|
+
error.name = 'AbortError';
|
10
|
+
return error;
|
11
|
+
};
|
12
|
+
/**
|
13
|
+
* Creates an Observable just like RxJS `create`, but exposes an AbortSignal in addition to the subscriber
|
14
|
+
*/
|
15
|
+
const create = (subscribe) => new Observable(subscriber => {
|
16
|
+
const abortController = new AbortController();
|
17
|
+
const subscription = new Subscription();
|
18
|
+
const teardown = subscribe && subscribe(subscriber, abortController.signal);
|
19
|
+
subscription.add(teardown);
|
20
|
+
subscription.add(() => abortController.abort());
|
21
|
+
return subscription;
|
22
|
+
});
|
23
|
+
/**
|
24
|
+
* Easiest way to wrap an abortable async function into a Promise.
|
25
|
+
* The factory is called every time the Observable is subscribed to, and the AbortSignal is aborted on unsubscription.
|
26
|
+
*/
|
27
|
+
const defer = (factory) => create((subscriber, signal) => from(factory(signal)).subscribe(subscriber));
|
28
|
+
/**
|
29
|
+
* Returns a Promise that resolves with the last emission of the given Observable,
|
30
|
+
* rejects if the Observable errors or rejects with an `AbortError` when the AbortSignal is aborted.
|
31
|
+
*/
|
32
|
+
const toPromise = (observable, signal) => new Promise((resolve, reject) => {
|
33
|
+
if (signal && signal.aborted) {
|
34
|
+
reject(createAbortError());
|
35
|
+
return;
|
36
|
+
}
|
37
|
+
let subscription;
|
38
|
+
const listener = () => {
|
39
|
+
subscription.unsubscribe();
|
40
|
+
reject(createAbortError());
|
41
|
+
};
|
42
|
+
const cleanup = () => {
|
43
|
+
if (signal) {
|
44
|
+
signal.removeEventListener('abort', listener);
|
45
|
+
}
|
46
|
+
};
|
47
|
+
let value;
|
48
|
+
subscription = observable.subscribe(val => {
|
49
|
+
value = val;
|
50
|
+
}, err => {
|
51
|
+
cleanup();
|
52
|
+
reject(err);
|
53
|
+
}, () => {
|
54
|
+
cleanup();
|
55
|
+
resolve(value);
|
56
|
+
});
|
57
|
+
if (signal) {
|
58
|
+
signal.addEventListener('abort', listener, { once: true });
|
59
|
+
}
|
60
|
+
});
|
61
|
+
/**
|
62
|
+
* Calls `next` for every emission and returns a Promise that resolves when the Observable completed, rejects if the
|
63
|
+
* Observable errors or rejects with an `AbortError` when the AbortSignal is aborted.
|
64
|
+
*/
|
65
|
+
const forEach = (source, next, signal) => new Promise((resolve, reject) => {
|
66
|
+
if (signal && signal.aborted) {
|
67
|
+
reject(createAbortError());
|
68
|
+
return;
|
69
|
+
}
|
70
|
+
let subscription;
|
71
|
+
const listener = () => {
|
72
|
+
subscription.unsubscribe();
|
73
|
+
reject(createAbortError());
|
74
|
+
};
|
75
|
+
const cleanup = () => {
|
76
|
+
if (signal) {
|
77
|
+
signal.removeEventListener('abort', listener);
|
78
|
+
}
|
79
|
+
};
|
80
|
+
subscription = source.subscribe(value => {
|
81
|
+
try {
|
82
|
+
next(value);
|
83
|
+
}
|
84
|
+
catch (err) {
|
85
|
+
reject(err);
|
86
|
+
if (subscription) {
|
87
|
+
subscription.unsubscribe();
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}, err => {
|
91
|
+
cleanup();
|
92
|
+
reject(err);
|
93
|
+
}, () => {
|
94
|
+
cleanup();
|
95
|
+
resolve();
|
96
|
+
});
|
97
|
+
if (signal) {
|
98
|
+
signal.addEventListener('abort', listener, { once: true });
|
99
|
+
}
|
100
|
+
});
|
101
|
+
/**
|
102
|
+
* Like RxJS `switchMap`, but passes an AbortSignal that is aborted when the source emits another element.
|
103
|
+
*/
|
104
|
+
const switchMap = (project) => source => source.pipe(switchMap$1((value, index) => defer(abortSignal => project(value, index, abortSignal))));
|
105
|
+
/**
|
106
|
+
* Like RxJS `concatMap`, but passes an AbortSignal that is aborted when the returned Observable is unsubscribed from.
|
107
|
+
*/
|
108
|
+
const concatMap = (project) => source => source.pipe(concatMap$1((value, index) => defer(abortSignal => project(value, index, abortSignal))));
|
109
|
+
/**
|
110
|
+
* Like RxJS `mergeMap`, but passes an AbortSignal that is aborted when the returned Observable is unsubscribed from.
|
111
|
+
*/
|
112
|
+
const mergeMap = (project) => source => source.pipe(mergeMap$1((value, index) => defer(abortSignal => project(value, index, abortSignal))));export{concatMap,create,defer,forEach,mergeMap,switchMap,toPromise};
|
package/lib/utils/errors.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
|
1
|
+
const isErrorLike = (val) => !!val && typeof val === 'object' && (!!val.stack || ('message' in val || 'code' in val)) && !('__typename' in val);
|
2
2
|
/**
|
3
3
|
* Ensures a value is a proper Error, copying all properties if needed
|
4
4
|
*/
|
5
|
-
|
5
|
+
const asError = (err) => {
|
6
6
|
if (err instanceof Error) {
|
7
7
|
return err;
|
8
8
|
}
|
@@ -10,5 +10,4 @@ export const asError = (err) => {
|
|
10
10
|
return Object.assign(new Error(err.message), err);
|
11
11
|
}
|
12
12
|
return new Error(err);
|
13
|
-
};
|
14
|
-
//# sourceMappingURL=errors.js.map
|
13
|
+
};export{asError,isErrorLike};
|
package/lib/utils/extensions.js
CHANGED
@@ -1,12 +1,11 @@
|
|
1
|
-
import {
|
2
|
-
/**
|
1
|
+
import {isErrorLike}from'./errors.js';/**
|
3
2
|
* Returns the extension's script URL from its manifest.
|
4
3
|
*
|
5
4
|
* @param extension The extension whose script URL to get.
|
6
5
|
* @throws If the script URL can't be dtermined.
|
7
6
|
* @returns The extension's script URL.
|
8
7
|
*/
|
9
|
-
|
8
|
+
function getScriptURLFromExtensionManifest(extension) {
|
10
9
|
if (!extension.manifest) {
|
11
10
|
throw new Error(`extension ${JSON.stringify(extension.id)}: no mainfest found`);
|
12
11
|
}
|
@@ -17,5 +16,4 @@ export function getScriptURLFromExtensionManifest(extension) {
|
|
17
16
|
throw new Error(`extension ${JSON.stringify(extension.id)}: no "url" property in manifest`);
|
18
17
|
}
|
19
18
|
return extension.manifest.bundleURL;
|
20
|
-
}
|
21
|
-
//# sourceMappingURL=extensions.js.map
|
19
|
+
}export{getScriptURLFromExtensionManifest};
|
package/lib/utils/helper.test.js
CHANGED
package/lib/utils/paths-util.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import {sep}from'@vscode-alt/monaco-editor/esm/vs/base/common/path.js';/********************************************************************************
|
2
2
|
|
3
3
|
Copyright (c) 2015 John Vilk and other contributors.
|
4
4
|
|
@@ -22,9 +22,8 @@ SOFTWARE.
|
|
22
22
|
|
23
23
|
====
|
24
24
|
*/
|
25
|
-
import { sep } from '@vscode-alt/monaco-editor/esm/vs/base/common/path';
|
26
25
|
const replaceRegex = new RegExp('//+', 'g');
|
27
|
-
|
26
|
+
function resolve(...paths) {
|
28
27
|
let processed = [];
|
29
28
|
for (const p of paths) {
|
30
29
|
if (typeof p !== 'string') {
|
@@ -43,7 +42,7 @@ export function resolve(...paths) {
|
|
43
42
|
}
|
44
43
|
return resolved;
|
45
44
|
}
|
46
|
-
|
45
|
+
function relative(from, to) {
|
47
46
|
let i;
|
48
47
|
from = resolve(from);
|
49
48
|
to = resolve(to);
|
@@ -78,7 +77,7 @@ export function relative(from, to) {
|
|
78
77
|
}
|
79
78
|
return rv;
|
80
79
|
}
|
81
|
-
|
80
|
+
function normalize(p) {
|
82
81
|
if (p === '') {
|
83
82
|
p = '.';
|
84
83
|
}
|
@@ -117,5 +116,4 @@ export function normalize(p) {
|
|
117
116
|
function removeDuplicateSeparators(p) {
|
118
117
|
p = p.replace(replaceRegex, sep);
|
119
118
|
return p;
|
120
|
-
}
|
121
|
-
//# sourceMappingURL=paths-util.js.map
|
119
|
+
}export{normalize,relative,resolve};
|