@adminide-stack/extension-api 0.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/LICENSE +39 -0
- package/README.md +9 -0
- package/lib/connections/jsonrpc2/connection.d.ts +55 -0
- package/lib/connections/jsonrpc2/connection.js +575 -0
- package/lib/connections/jsonrpc2/connection.js.map +1 -0
- package/lib/connections/jsonrpc2/connection.test.d.ts +1 -0
- package/lib/connections/jsonrpc2/connection.test.js +443 -0
- package/lib/connections/jsonrpc2/connection.test.js.map +1 -0
- package/lib/connections/jsonrpc2/events.d.ts +24 -0
- package/lib/connections/jsonrpc2/events.js +117 -0
- package/lib/connections/jsonrpc2/events.js.map +1 -0
- package/lib/connections/jsonrpc2/index.d.ts +5 -0
- package/lib/connections/jsonrpc2/index.js +24 -0
- package/lib/connections/jsonrpc2/index.js.map +1 -0
- package/lib/connections/jsonrpc2/linkedMap.d.ts +29 -0
- package/lib/connections/jsonrpc2/linkedMap.js +254 -0
- package/lib/connections/jsonrpc2/linkedMap.js.map +1 -0
- package/lib/connections/jsonrpc2/linkedMap.test.d.ts +1 -0
- package/lib/connections/jsonrpc2/linkedMap.test.js +62 -0
- package/lib/connections/jsonrpc2/linkedMap.test.js.map +1 -0
- package/lib/connections/jsonrpc2/messages.d.ts +117 -0
- package/lib/connections/jsonrpc2/messages.js +72 -0
- package/lib/connections/jsonrpc2/messages.js.map +1 -0
- package/lib/connections/jsonrpc2/test-helper.d.ts +8 -0
- package/lib/connections/jsonrpc2/test-helper.js +36 -0
- package/lib/connections/jsonrpc2/test-helper.js.map +1 -0
- package/lib/connections/jsonrpc2/trace.d.ts +30 -0
- package/lib/connections/jsonrpc2/trace.js +96 -0
- package/lib/connections/jsonrpc2/trace.js.map +1 -0
- package/lib/connections/jsonrpc2/transport.d.ts +36 -0
- package/lib/connections/jsonrpc2/transport.js +66 -0
- package/lib/connections/jsonrpc2/transport.js.map +1 -0
- package/lib/connections/jsonrpc2/transports/browser-websocket.d.ts +0 -0
- package/lib/connections/jsonrpc2/transports/browser-websocket.js +189 -0
- package/lib/connections/jsonrpc2/transports/browser-websocket.js.map +1 -0
- package/lib/connections/jsonrpc2/transports/merged.d.ts +0 -0
- package/lib/connections/jsonrpc2/transports/merged.js +239 -0
- package/lib/connections/jsonrpc2/transports/merged.js.map +1 -0
- package/lib/connections/jsonrpc2/transports/webSocket.d.ts +0 -0
- package/lib/connections/jsonrpc2/transports/webSocket.js +138 -0
- package/lib/connections/jsonrpc2/transports/webSocket.js.map +1 -0
- package/lib/connections/jsonrpc2/transports/webWorker.d.ts +22 -0
- package/lib/connections/jsonrpc2/transports/webWorker.js +111 -0
- package/lib/connections/jsonrpc2/transports/webWorker.js.map +1 -0
- package/lib/connections/proxy/index.d.ts +1 -0
- package/lib/connections/proxy/index.js +18 -0
- package/lib/connections/proxy/index.js.map +1 -0
- package/lib/connections/proxy/proxy.d.ts +49 -0
- package/lib/connections/proxy/proxy.js +108 -0
- package/lib/connections/proxy/proxy.js.map +1 -0
- package/lib/connections/proxy/proxy.test.d.ts +1 -0
- package/lib/connections/proxy/proxy.test.js +55 -0
- package/lib/connections/proxy/proxy.test.js.map +1 -0
- package/lib/connections/remote-rpc/browser-remote-rpc.d.ts +12 -0
- package/lib/connections/remote-rpc/browser-remote-rpc.js +62 -0
- package/lib/connections/remote-rpc/browser-remote-rpc.js.map +1 -0
- package/lib/connections/remote-rpc/browser-server-rpc.test.d.ts +0 -0
- package/lib/connections/remote-rpc/browser-server-rpc.test.js +317 -0
- package/lib/connections/remote-rpc/browser-server-rpc.test.js.map +1 -0
- package/lib/connections/remote-rpc/index.d.ts +1 -0
- package/lib/connections/remote-rpc/index.js +18 -0
- package/lib/connections/remote-rpc/index.js.map +1 -0
- package/lib/connections/remote-rpc/old-browser-remote-rpc.d.ts +12 -0
- package/lib/connections/remote-rpc/old-browser-remote-rpc.js +41 -0
- package/lib/connections/remote-rpc/old-browser-remote-rpc.js.map +1 -0
- package/lib/connections/remote-rpc/rxjs-websockets.d.ts +18 -0
- package/lib/connections/remote-rpc/rxjs-websockets.js +80 -0
- package/lib/connections/remote-rpc/rxjs-websockets.js.map +1 -0
- package/lib/constants/action-types.d.ts +30 -0
- package/lib/constants/action-types.js +38 -0
- package/lib/constants/action-types.js.map +1 -0
- package/lib/constants/index.d.ts +2 -0
- package/lib/constants/index.js +19 -0
- package/lib/constants/index.js.map +1 -0
- package/lib/constants/types.d.ts +8 -0
- package/lib/constants/types.js +12 -0
- package/lib/constants/types.js.map +1 -0
- package/lib/core/expr/evaluator.d.ts +27 -0
- package/lib/core/expr/evaluator.js +144 -0
- package/lib/core/expr/evaluator.js.map +1 -0
- package/lib/core/expr/evaluator.test.d.ts +1 -0
- package/lib/core/expr/evaluator.test.js +52 -0
- package/lib/core/expr/evaluator.test.js.map +1 -0
- package/lib/core/expr/index.d.ts +3 -0
- package/lib/core/expr/index.js +20 -0
- package/lib/core/expr/index.js.map +1 -0
- package/lib/core/expr/lexer.d.ts +114 -0
- package/lib/core/expr/lexer.js +418 -0
- package/lib/core/expr/lexer.js.map +1 -0
- package/lib/core/expr/parser.d.ts +52 -0
- package/lib/core/expr/parser.js +242 -0
- package/lib/core/expr/parser.js.map +1 -0
- package/lib/core/index.d.ts +2 -0
- package/lib/core/index.js +19 -0
- package/lib/core/index.js.map +1 -0
- package/lib/core/types/ext-host-types-bk.d.ts +0 -0
- package/lib/core/types/ext-host-types-bk.js +1275 -0
- package/lib/core/types/ext-host-types-bk.js.map +1 -0
- package/lib/core/types/ext-host-types.d.ts +32 -0
- package/lib/core/types/ext-host-types.js +71 -0
- package/lib/core/types/ext-host-types.js.map +1 -0
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/index.js +18 -0
- package/lib/core/types/index.js.map +1 -0
- package/lib/errors/errors.d.ts +1 -0
- package/lib/errors/errors.js +13 -0
- package/lib/errors/errors.js.map +1 -0
- package/lib/errors/index.d.ts +1 -0
- package/lib/errors/index.js +18 -0
- package/lib/errors/index.js.map +1 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +24 -0
- package/lib/index.js.map +1 -0
- package/lib/interfaces/command.d.ts +28 -0
- package/lib/interfaces/command.js +3 -0
- package/lib/interfaces/command.js.map +1 -0
- package/lib/interfaces/configuration.d.ts +36 -0
- package/lib/interfaces/configuration.js +3 -0
- package/lib/interfaces/configuration.js.map +1 -0
- package/lib/interfaces/connection.d.ts +12 -0
- package/lib/interfaces/connection.js +3 -0
- package/lib/interfaces/connection.js.map +1 -0
- package/lib/interfaces/context.d.ts +12 -0
- package/lib/interfaces/context.js +3 -0
- package/lib/interfaces/context.js.map +1 -0
- package/lib/interfaces/contributions/contribution-service.d.ts +20 -0
- package/lib/interfaces/contributions/contribution-service.js +3 -0
- package/lib/interfaces/contributions/contribution-service.js.map +1 -0
- package/lib/interfaces/contributions/contribution.d.ts +383 -0
- package/lib/interfaces/contributions/contribution.js +49 -0
- package/lib/interfaces/contributions/contribution.js.map +1 -0
- package/lib/interfaces/contributions/index.d.ts +2 -0
- package/lib/interfaces/contributions/index.js +19 -0
- package/lib/interfaces/contributions/index.js.map +1 -0
- package/lib/interfaces/controller.d.ts +30 -0
- package/lib/interfaces/controller.js +3 -0
- package/lib/interfaces/controller.js.map +1 -0
- package/lib/interfaces/errors.d.ts +5 -0
- package/lib/interfaces/errors.js +3 -0
- package/lib/interfaces/errors.js.map +1 -0
- package/lib/interfaces/ext-services/contributon-registry.d.ts +45 -0
- package/lib/interfaces/ext-services/contributon-registry.js +3 -0
- package/lib/interfaces/ext-services/contributon-registry.js.map +1 -0
- package/lib/interfaces/ext-services/ext-services.d.ts +23 -0
- package/lib/interfaces/ext-services/ext-services.js +3 -0
- package/lib/interfaces/ext-services/ext-services.js.map +1 -0
- package/lib/interfaces/ext-services/extension-service.d.ts +8 -0
- package/lib/interfaces/ext-services/extension-service.js +3 -0
- package/lib/interfaces/ext-services/extension-service.js.map +1 -0
- package/lib/interfaces/ext-services/index.d.ts +8 -0
- package/lib/interfaces/ext-services/index.js +25 -0
- package/lib/interfaces/ext-services/index.js.map +1 -0
- package/lib/interfaces/ext-services/model-service.d.ts +89 -0
- package/lib/interfaces/ext-services/model-service.js +3 -0
- package/lib/interfaces/ext-services/model-service.js.map +1 -0
- package/lib/interfaces/ext-services/panel-view-registry.d.ts +21 -0
- package/lib/interfaces/ext-services/panel-view-registry.js +3 -0
- package/lib/interfaces/ext-services/panel-view-registry.js.map +1 -0
- package/lib/interfaces/ext-services/settings-service.d.ts +18 -0
- package/lib/interfaces/ext-services/settings-service.js +3 -0
- package/lib/interfaces/ext-services/settings-service.js.map +1 -0
- package/lib/interfaces/ext-services/view-service.d.ts +65 -0
- package/lib/interfaces/ext-services/view-service.js +4 -0
- package/lib/interfaces/ext-services/view-service.js.map +1 -0
- package/lib/interfaces/ext-services/viewer-service.d.ts +125 -0
- package/lib/interfaces/ext-services/viewer-service.js +5 -0
- package/lib/interfaces/ext-services/viewer-service.js.map +1 -0
- package/lib/interfaces/extension-manifest.d.ts +8 -0
- package/lib/interfaces/extension-manifest.js +3 -0
- package/lib/interfaces/extension-manifest.js.map +1 -0
- package/lib/interfaces/extension.d.ts +72 -0
- package/lib/interfaces/extension.js +3 -0
- package/lib/interfaces/extension.js.map +1 -0
- package/lib/interfaces/generated-models.d.ts +3716 -0
- package/lib/interfaces/generated-models.js +648 -0
- package/lib/interfaces/generated-models.js.map +1 -0
- package/lib/interfaces/graphql.d.ts +17 -0
- package/lib/interfaces/graphql.js +5 -0
- package/lib/interfaces/graphql.js.map +1 -0
- package/lib/interfaces/index.d.ts +21 -0
- package/lib/interfaces/index.js +38 -0
- package/lib/interfaces/index.js.map +1 -0
- package/lib/interfaces/languages-types.d.ts +65 -0
- package/lib/interfaces/languages-types.js +3 -0
- package/lib/interfaces/languages-types.js.map +1 -0
- package/lib/interfaces/model.d.ts +51 -0
- package/lib/interfaces/model.js +9 -0
- package/lib/interfaces/model.js.map +1 -0
- package/lib/interfaces/plain-types.d.ts +4 -0
- package/lib/interfaces/plain-types.js +6 -0
- package/lib/interfaces/plain-types.js.map +1 -0
- package/lib/interfaces/plainTypes.d.ts +68 -0
- package/lib/interfaces/plainTypes.js +3 -0
- package/lib/interfaces/plainTypes.js.map +1 -0
- package/lib/interfaces/platform-context.d.ts +82 -0
- package/lib/interfaces/platform-context.js +3 -0
- package/lib/interfaces/platform-context.js.map +1 -0
- package/lib/interfaces/react-props/action-item.d.ts +20 -0
- package/lib/interfaces/react-props/action-item.js +3 -0
- package/lib/interfaces/react-props/action-item.js.map +1 -0
- package/lib/interfaces/react-props/extension-controller.d.ts +11 -0
- package/lib/interfaces/react-props/extension-controller.js +3 -0
- package/lib/interfaces/react-props/extension-controller.js.map +1 -0
- package/lib/interfaces/react-props/index.d.ts +3 -0
- package/lib/interfaces/react-props/index.js +20 -0
- package/lib/interfaces/react-props/index.js.map +1 -0
- package/lib/interfaces/react-props/platform-context.d.ts +7 -0
- package/lib/interfaces/react-props/platform-context.js +3 -0
- package/lib/interfaces/react-props/platform-context.js.map +1 -0
- package/lib/interfaces/registry-extension.d.ts +21 -0
- package/lib/interfaces/registry-extension.js +3 -0
- package/lib/interfaces/registry-extension.js.map +1 -0
- package/lib/interfaces/settings.d.ts +51 -0
- package/lib/interfaces/settings.js +3 -0
- package/lib/interfaces/settings.js.map +1 -0
- package/lib/interfaces/text-document.d.ts +57 -0
- package/lib/interfaces/text-document.js +119 -0
- package/lib/interfaces/text-document.js.map +1 -0
- package/lib/interfaces/webview/index.d.ts +3 -0
- package/lib/interfaces/webview/index.js +20 -0
- package/lib/interfaces/webview/index.js.map +1 -0
- package/lib/interfaces/webview/webview-manager-service.d.ts +22 -0
- package/lib/interfaces/webview/webview-manager-service.js +3 -0
- package/lib/interfaces/webview/webview-manager-service.js.map +1 -0
- package/lib/interfaces/webview/webview-port-mapping.d.ts +4 -0
- package/lib/interfaces/webview/webview-port-mapping.js +3 -0
- package/lib/interfaces/webview/webview-port-mapping.js.map +1 -0
- package/lib/interfaces/webview/webview.d.ts +99 -0
- package/lib/interfaces/webview/webview.js +9 -0
- package/lib/interfaces/webview/webview.js.map +1 -0
- package/lib/main.d.ts +0 -0
- package/lib/main.js +3 -0
- package/lib/main.js.map +1 -0
- package/lib/protocol/client.protocol.d.ts +99 -0
- package/lib/protocol/client.protocol.js +8 -0
- package/lib/protocol/client.protocol.js.map +1 -0
- package/lib/protocol/common.protocol.d.ts +289 -0
- package/lib/protocol/common.protocol.js +68 -0
- package/lib/protocol/common.protocol.js.map +1 -0
- package/lib/protocol/editor-missing-types.d.ts +87 -0
- package/lib/protocol/editor-missing-types.js +10 -0
- package/lib/protocol/editor-missing-types.js.map +1 -0
- package/lib/protocol/index.d.ts +6 -0
- package/lib/protocol/index.js +24 -0
- package/lib/protocol/index.js.map +1 -0
- package/lib/protocol/proxy-identifier.d.ts +51 -0
- package/lib/protocol/proxy-identifier.js +59 -0
- package/lib/protocol/proxy-identifier.js.map +1 -0
- package/lib/protocol/rpc-logger.d.ts +8 -0
- package/lib/protocol/rpc-logger.js +60 -0
- package/lib/protocol/rpc-logger.js.map +1 -0
- package/lib/protocol/rpc-protocol.d.ts +148 -0
- package/lib/protocol/rpc-protocol.js +750 -0
- package/lib/protocol/rpc-protocol.js.map +1 -0
- package/lib/protocol/rpc-protocol.test.d.ts +1 -0
- package/lib/protocol/rpc-protocol.test.js +171 -0
- package/lib/protocol/rpc-protocol.test.js.map +1 -0
- package/lib/protocol/server.protocol-bk.d.ts +0 -0
- package/lib/protocol/server.protocol-bk.js +719 -0
- package/lib/protocol/server.protocol-bk.js.map +1 -0
- package/lib/protocol/server.protocol.d.ts +91 -0
- package/lib/protocol/server.protocol.js +31 -0
- package/lib/protocol/server.protocol.js.map +1 -0
- package/lib/protocol/shared/editor.d.ts +4 -0
- package/lib/protocol/shared/editor.js +28 -0
- package/lib/protocol/shared/editor.js.map +1 -0
- package/lib/protocol/shared/tasks.d.ts +104 -0
- package/lib/protocol/shared/tasks.js +4 -0
- package/lib/protocol/shared/tasks.js.map +1 -0
- package/lib/protocol/temporary-types.d.ts +198 -0
- package/lib/protocol/temporary-types.js +30 -0
- package/lib/protocol/temporary-types.js.map +1 -0
- package/lib/protocol/utils/index.d.ts +1 -0
- package/lib/protocol/utils/index.js +18 -0
- package/lib/protocol/utils/index.js.map +1 -0
- package/lib/protocol/utils/lazy-promise.d.ts +18 -0
- package/lib/protocol/utils/lazy-promise.js +69 -0
- package/lib/protocol/utils/lazy-promise.js.map +1 -0
- package/lib/utils/errors.d.ts +6 -0
- package/lib/utils/errors.js +19 -0
- package/lib/utils/errors.js.map +1 -0
- package/lib/utils/extensions.d.ts +9 -0
- package/lib/utils/extensions.js +25 -0
- package/lib/utils/extensions.js.map +1 -0
- package/lib/utils/helper.test.d.ts +9 -0
- package/lib/utils/helper.test.js +15 -0
- package/lib/utils/helper.test.js.map +1 -0
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +25 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/paths-util.d.ts +27 -0
- package/lib/utils/paths-util.js +127 -0
- package/lib/utils/paths-util.js.map +1 -0
- package/lib/utils/rxjs/combineLatestOrDefault.d.ts +28 -0
- package/lib/utils/rxjs/combineLatestOrDefault.js +111 -0
- package/lib/utils/rxjs/combineLatestOrDefault.js.map +1 -0
- package/lib/utils/rxjs/combineLatestOrDefault.test.d.ts +1 -0
- package/lib/utils/rxjs/combineLatestOrDefault.test.js +52 -0
- package/lib/utils/rxjs/combineLatestOrDefault.test.js.map +1 -0
- package/lib/utils/rxjs/index.d.ts +1 -0
- package/lib/utils/rxjs/index.js +18 -0
- package/lib/utils/rxjs/index.js.map +1 -0
- package/lib/utils/util.d.ts +19 -0
- package/lib/utils/util.js +57 -0
- package/lib/utils/util.js.map +1 -0
- package/lib/worker-lib/MessageTypes.d.ts +5 -0
- package/lib/worker-lib/MessageTypes.js +9 -0
- package/lib/worker-lib/MessageTypes.js.map +1 -0
- package/lib/worker-lib/index.d.ts +2 -0
- package/lib/worker-lib/index.js +19 -0
- package/lib/worker-lib/index.js.map +1 -0
- package/lib/worker-lib/webWorkerLink.d.ts +12 -0
- package/lib/worker-lib/webWorkerLink.js +96 -0
- package/lib/worker-lib/webWorkerLink.js.map +1 -0
- package/lib/worker-lib/workerUtils.d.ts +11 -0
- package/lib/worker-lib/workerUtils.js +178 -0
- package/lib/worker-lib/workerUtils.js.map +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.score = exports.match = void 0;
|
|
4
|
+
const minimatch_1 = require("minimatch");
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether any of the document selectors match (or "select") the document.
|
|
7
|
+
*/
|
|
8
|
+
function match(selectors, document) {
|
|
9
|
+
for (const selector of isSingleDocumentSelector(selectors) ? [selectors] : selectors) {
|
|
10
|
+
if (match1(selector, document)) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
exports.match = match;
|
|
17
|
+
function isSingleDocumentSelector(value) {
|
|
18
|
+
return Array.isArray(value) && (value.length === 0 || isDocumentSelectorElement(value[0]));
|
|
19
|
+
}
|
|
20
|
+
function isDocumentSelectorElement(value) {
|
|
21
|
+
return typeof value === 'string' || isDocumentFilter(value);
|
|
22
|
+
}
|
|
23
|
+
function isDocumentFilter(value) {
|
|
24
|
+
const candidate = value;
|
|
25
|
+
return (typeof candidate.language === 'string' ||
|
|
26
|
+
typeof candidate.scheme === 'string' ||
|
|
27
|
+
typeof candidate.pattern === 'string');
|
|
28
|
+
}
|
|
29
|
+
function match1(selector, document) {
|
|
30
|
+
return score(selector, new URL(document.uri), document.languageId) !== 0;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Returns the score that indicates "how well" the document selector matches a document (by its URI and language
|
|
34
|
+
* ID). A higher score indicates a more specific match. The score is a heuristic.
|
|
35
|
+
*
|
|
36
|
+
* For example, a document selector ['*'] matches all documents, so it is not a very specific match for any
|
|
37
|
+
* document (but it *does* match all documents). Its score will be lower than a more specific match, such as the
|
|
38
|
+
* document selector [{language: 'python'}] against a Python document.
|
|
39
|
+
*
|
|
40
|
+
* Taken from
|
|
41
|
+
* https://github.com/Microsoft/vscode/blob/3d35801127f0a62d58d752bc613506e836c5d120/src/vs/editor/common/modes/languageSelector.ts#L24.
|
|
42
|
+
*/
|
|
43
|
+
function score(selector, candidateUri, candidateLanguage) {
|
|
44
|
+
// array -> take max individual value
|
|
45
|
+
let returnValue = 0;
|
|
46
|
+
for (const filter of selector) {
|
|
47
|
+
const value = score1(filter, candidateUri, candidateLanguage);
|
|
48
|
+
if (value === 10) {
|
|
49
|
+
return value; // already at the highest
|
|
50
|
+
}
|
|
51
|
+
if (value > returnValue) {
|
|
52
|
+
returnValue = value;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return returnValue;
|
|
56
|
+
}
|
|
57
|
+
exports.score = score;
|
|
58
|
+
function score1(selector, candidateUri, candidateLanguage) {
|
|
59
|
+
if (typeof selector === 'string') {
|
|
60
|
+
// Shorthand notation: "mylang" -> {language: "mylang"}, "*" -> {language: "*""}.
|
|
61
|
+
if (selector === '*') {
|
|
62
|
+
return 5;
|
|
63
|
+
}
|
|
64
|
+
if (selector === candidateLanguage) {
|
|
65
|
+
return 10;
|
|
66
|
+
}
|
|
67
|
+
return 0;
|
|
68
|
+
}
|
|
69
|
+
const { language, scheme, pattern, baseUri } = selector;
|
|
70
|
+
if (!language && !scheme && !pattern) {
|
|
71
|
+
// `{}` was passed as a document filter, treat it like a wildcard
|
|
72
|
+
return 5;
|
|
73
|
+
}
|
|
74
|
+
let returnValue = 0;
|
|
75
|
+
if (scheme) {
|
|
76
|
+
if (candidateUri.protocol === scheme + ':') {
|
|
77
|
+
returnValue = 10;
|
|
78
|
+
}
|
|
79
|
+
else if (scheme === '*') {
|
|
80
|
+
returnValue = 5;
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
return 0;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (baseUri) {
|
|
87
|
+
if (candidateUri.href.startsWith(baseUri.toString())) {
|
|
88
|
+
returnValue = 5;
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
return 0;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (language) {
|
|
95
|
+
if (language === candidateLanguage) {
|
|
96
|
+
returnValue = 10;
|
|
97
|
+
}
|
|
98
|
+
else if (language === '*') {
|
|
99
|
+
returnValue = Math.max(returnValue, 5);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
return 0;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (pattern) {
|
|
106
|
+
const filePath = decodeURIComponent(candidateUri.protocol === 'git:' ? candidateUri.hash.slice(1) : candidateUri.pathname.replace(/^\//, ''));
|
|
107
|
+
if (filePath.endsWith(pattern) || (0, minimatch_1.default)(filePath, pattern)) {
|
|
108
|
+
returnValue = 10;
|
|
109
|
+
}
|
|
110
|
+
else if (filePath && (0, minimatch_1.default)(filePath, pattern, { dot: true, matchBase: true })) {
|
|
111
|
+
returnValue = 5;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
return 0;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return returnValue;
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=text-document.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-document.js","sourceRoot":"","sources":["../../src/interfaces/text-document.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./webview"), exports);
|
|
18
|
+
__exportStar(require("./webview-port-mapping"), exports);
|
|
19
|
+
__exportStar(require("./webview-manager-service"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/webview/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,yDAAuC;AACvC,4DAA0C"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UriComponents } from '@vscode-alt/monaco-editor/esm/vs/base/common/uri';
|
|
2
|
+
import { VSBuffer } from '@vscode-alt/monaco-editor/esm/vs/base/common/buffer';
|
|
3
|
+
import { IWebviewPortMapping } from './webview-port-mapping';
|
|
4
|
+
export interface WebviewWebContentsId {
|
|
5
|
+
readonly webContentsId: number;
|
|
6
|
+
}
|
|
7
|
+
export interface WebviewWindowId {
|
|
8
|
+
readonly windowId: number;
|
|
9
|
+
}
|
|
10
|
+
export interface IWebviewManagerService {
|
|
11
|
+
reigsterWebview(id: string, windowId: number, metadata: RegisterWebviewMetadata): Promise<void>;
|
|
12
|
+
unregisterWebview(id: string): Promise<void>;
|
|
13
|
+
updateWebviewMetadata(id: string, metadataDelta: Partial<RegisterWebviewMetadata>): Promise<void>;
|
|
14
|
+
didLoadResource(requestId: number, content: VSBuffer | undefined): void;
|
|
15
|
+
setIgnoreMenuShortcuts(id: WebviewWebContentsId | WebviewWindowId, enabled: boolean): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export interface RegisterWebviewMetadata {
|
|
18
|
+
readonly extensionLocation: UriComponents | undefined;
|
|
19
|
+
readonly localResourceRoots: readonly UriComponents[];
|
|
20
|
+
readonly remoteConnectionData: any; /** IRemoteConnectionData | null; **/
|
|
21
|
+
readonly portMappings: readonly IWebviewPortMapping[];
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webview-manager-service.js","sourceRoot":"","sources":["../../../src/interfaces/webview/webview-manager-service.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webview-port-mapping.js","sourceRoot":"","sources":["../../../src/interfaces/webview/webview-port-mapping.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Event } from '@vscode-alt/monaco-editor/esm/vs/base/common/event';
|
|
2
|
+
import { URI } from '@vscode-alt/monaco-editor/esm/vs/base/common/uri';
|
|
3
|
+
import { IExtensionIdentifier } from '../generated-models';
|
|
4
|
+
import { IMouseWheelEvent } from '@vscode-alt/monaco-editor/esm/vs/base/browser/mouseEvent';
|
|
5
|
+
import { Dimension } from '@vscode-alt/monaco-editor/esm/vs/base/browser/dom';
|
|
6
|
+
import * as modes from '@vscode-alt/monaco-editor/esm/vs/editor/common/modes';
|
|
7
|
+
import { IDisposable } from '@vscode-alt/monaco-editor/esm/vs/base/common/lifecycle';
|
|
8
|
+
export interface WebviewIcons {
|
|
9
|
+
readonly light: URI;
|
|
10
|
+
readonly dark: URI;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Handles the creation of webview elements.
|
|
14
|
+
*/
|
|
15
|
+
export interface IWebviewService {
|
|
16
|
+
readonly activeWebView: Webview | undefined;
|
|
17
|
+
createWebviewElement(id: string, options: WebviewOptions, contentOptions: WebviewContentOptions, extension: WebviewExtensionDescription | undefined): WebviewElement;
|
|
18
|
+
createWebviewOverlay(id: string, options: WebviewOptions, contentOptions: WebviewContentOptions, extension: WebviewExtensionDescription | undefined): WebviewOverlay;
|
|
19
|
+
setIcons(id: string, value: WebviewIcons | undefined): void;
|
|
20
|
+
}
|
|
21
|
+
export declare const enum WebviewContentPurpose {
|
|
22
|
+
NotebookRenderer = "notebookRenderer",
|
|
23
|
+
CustomEditor = "customEditor"
|
|
24
|
+
}
|
|
25
|
+
export interface WebviewOptions {
|
|
26
|
+
readonly purpose?: WebviewContentPurpose;
|
|
27
|
+
readonly customClasses?: string;
|
|
28
|
+
readonly enableFindWidget?: boolean;
|
|
29
|
+
readonly tryRestoreScrollPosition?: boolean;
|
|
30
|
+
readonly retainContextWhenHidden?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface WebviewContentOptions {
|
|
33
|
+
readonly allowMultipleAPIAcquire?: boolean;
|
|
34
|
+
readonly allowScripts?: boolean;
|
|
35
|
+
readonly localResourceRoots?: ReadonlyArray<URI>;
|
|
36
|
+
readonly portMapping?: ReadonlyArray<modes.IWebviewPortMapping>;
|
|
37
|
+
readonly enabledCommandUris?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface WebviewExtensionDescription {
|
|
40
|
+
readonly location: URI;
|
|
41
|
+
readonly id: IExtensionIdentifier;
|
|
42
|
+
}
|
|
43
|
+
export interface IDataLinkClickEvent {
|
|
44
|
+
dataURL: string;
|
|
45
|
+
downloadName?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface Webview extends IDisposable {
|
|
48
|
+
readonly id: string;
|
|
49
|
+
html: string;
|
|
50
|
+
contentOptions: WebviewContentOptions;
|
|
51
|
+
localResourcesRoot: URI[];
|
|
52
|
+
extension: WebviewExtensionDescription | undefined;
|
|
53
|
+
initialScrollProgress: number;
|
|
54
|
+
state: string | undefined;
|
|
55
|
+
readonly isFocussed: boolean;
|
|
56
|
+
readonly onDidFocus: Event<void>;
|
|
57
|
+
readonly onDidBlur: Event<void>;
|
|
58
|
+
readonly ondDidDispose: Event<void>;
|
|
59
|
+
readonly onDidClickLink: Event<string>;
|
|
60
|
+
readonly onDidScroll: Event<{
|
|
61
|
+
scrollYPercentage: number;
|
|
62
|
+
}>;
|
|
63
|
+
readonly onDidWheel: Event<IMouseWheelEvent>;
|
|
64
|
+
readonly onDidUpdateState: Event<string | undefined>;
|
|
65
|
+
readonly onDidReload: Event<void>;
|
|
66
|
+
readonly onMessage: Event<any>;
|
|
67
|
+
readonly onMissingCsp: Event<IExtensionIdentifier>;
|
|
68
|
+
postMessage(data: any): void;
|
|
69
|
+
focus(): void;
|
|
70
|
+
reload(): void;
|
|
71
|
+
showFind(): void;
|
|
72
|
+
hideFind(): void;
|
|
73
|
+
runFindAction(previous: boolean): void;
|
|
74
|
+
selectAll(): void;
|
|
75
|
+
copy(): void;
|
|
76
|
+
paste(): void;
|
|
77
|
+
cut(): void;
|
|
78
|
+
undo(): void;
|
|
79
|
+
redo(): void;
|
|
80
|
+
windowDidDragStart(): void;
|
|
81
|
+
windowDidDragEnd(): void;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Basic webview rendered in the dom
|
|
85
|
+
*/
|
|
86
|
+
export interface WebviewElement extends Webview {
|
|
87
|
+
mountTo(parent: HTMLElement): void;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Dynamically created webview drawn over another element.
|
|
91
|
+
*/
|
|
92
|
+
export interface WebviewOverlay extends Webview {
|
|
93
|
+
readonly container: HTMLElement;
|
|
94
|
+
options: WebviewOptions;
|
|
95
|
+
claim(owner: any): void;
|
|
96
|
+
release(owner: any): void;
|
|
97
|
+
getInnerWebview(): Webview | undefined;
|
|
98
|
+
layoutWebviewOverElement(element: HTMLElement, dimension?: Dimension): void;
|
|
99
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebviewContentPurpose = void 0;
|
|
4
|
+
var WebviewContentPurpose;
|
|
5
|
+
(function (WebviewContentPurpose) {
|
|
6
|
+
WebviewContentPurpose["NotebookRenderer"] = "notebookRenderer";
|
|
7
|
+
WebviewContentPurpose["CustomEditor"] = "customEditor";
|
|
8
|
+
})(WebviewContentPurpose = exports.WebviewContentPurpose || (exports.WebviewContentPurpose = {}));
|
|
9
|
+
//# sourceMappingURL=webview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webview.js","sourceRoot":"","sources":["../../../src/interfaces/webview/webview.ts"],"names":[],"mappings":";;;AA2CA,IAAkB,qBAGjB;AAHD,WAAkB,qBAAqB;IACnC,8DAAqC,CAAA;IACrC,sDAA6B,CAAA;AACjC,CAAC,EAHiB,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAGtC"}
|
package/lib/main.d.ts
ADDED
|
File without changes
|
package/lib/main.js
ADDED
package/lib/main.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AAChD,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Unsubscribable } from 'rxjs';
|
|
2
|
+
import * as cdeops from 'cdeops/client';
|
|
3
|
+
import { ICommandHandlerDescription } from '@workbench-stack/core';
|
|
4
|
+
import { ConfigurationTarget } from '@adminide-stack/core';
|
|
5
|
+
import { ITextDocumentItem } from '@workbench-stack/core';
|
|
6
|
+
import { UriComponents } from '@vscode-alt/monaco-editor/esm/vs/base/common/uri';
|
|
7
|
+
import { IRPCProtocol, ProxyIdentifier } from './proxy-identifier';
|
|
8
|
+
import { IOrganizationData, ILanguageFeaturesShape, IConfigurationInitData, IOrganizationConfigurationChangeEventData } from './common.protocol';
|
|
9
|
+
import { IModelChangedEvent } from './temporary-types';
|
|
10
|
+
/**
|
|
11
|
+
* Required information when initializing an extension host.
|
|
12
|
+
*/
|
|
13
|
+
export interface IClientInitData {
|
|
14
|
+
organization?: IOrganizationData | null;
|
|
15
|
+
/** @see {@link module: cdeops.internal.cdeopsURL} */
|
|
16
|
+
cdeopsURL: string;
|
|
17
|
+
/** @see {@link module: cdeops.internal.clientAPplication} */
|
|
18
|
+
clientApplication: 'cdeops' | 'other';
|
|
19
|
+
graphqlSubscriptionUrl?: string;
|
|
20
|
+
extensionSocketUrl?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface IWebExtHostContext extends IRPCProtocol {
|
|
23
|
+
}
|
|
24
|
+
export interface IClientContext extends IRPCProtocol {
|
|
25
|
+
}
|
|
26
|
+
export interface WebExtHostExtensionServiceShape {
|
|
27
|
+
$activateExtension(extensionID: string, bundleURL: string): Promise<void>;
|
|
28
|
+
$deactivateExtension(extensionID: string): Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
export interface ClientThreadConfigurationShape {
|
|
31
|
+
$updateConfigurationOption(target: ConfigurationTarget, key: string, value: any, resource: UriComponents): Promise<void>;
|
|
32
|
+
$removeConfigurationOption(target: ConfigurationTarget, key: string, resource: UriComponents): Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
export interface ClientThreadConfigurationRoleShape {
|
|
35
|
+
$updateConfigurationOption(target: ConfigurationTarget, key: string, value: any, resource: UriComponents): Promise<void>;
|
|
36
|
+
$removeConfigurationOption(target: ConfigurationTarget, key: string, resource: UriComponents): Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
export interface ClientThreadConfigurationPolicyShape {
|
|
39
|
+
$updateConfigurationOption(target: ConfigurationTarget, key: string, value: any, resource: UriComponents): Promise<void>;
|
|
40
|
+
$removeConfigurationOption(target: ConfigurationTarget, key: string, resource: UriComponents): Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
export interface WebExtHostConfigurationShape {
|
|
43
|
+
$initializeConfiguration(data: IConfigurationInitData): void;
|
|
44
|
+
$acceptConfigurationChanged(data: IConfigurationInitData, eventData: IOrganizationConfigurationChangeEventData): void;
|
|
45
|
+
}
|
|
46
|
+
export interface WebExtHostConfigurationRoleShape {
|
|
47
|
+
$initializeConfiguration(data: IConfigurationInitData): void;
|
|
48
|
+
$acceptConfigurationChanged(data: IConfigurationInitData, eventData: IOrganizationConfigurationChangeEventData): void;
|
|
49
|
+
}
|
|
50
|
+
export interface WebExtHostConfigurationPolicyShape {
|
|
51
|
+
$initializeConfiguration(data: IConfigurationInitData): void;
|
|
52
|
+
$acceptConfigurationChanged(data: IConfigurationInitData, eventData: IOrganizationConfigurationChangeEventData): void;
|
|
53
|
+
}
|
|
54
|
+
export interface WebExtHostOrganizationShape {
|
|
55
|
+
$acceptOrganizationData(organization: IOrganizationData): void;
|
|
56
|
+
}
|
|
57
|
+
export interface ClientThreadOrganizationShape {
|
|
58
|
+
$checkExists(includes: string[]): Promise<boolean>;
|
|
59
|
+
$saveAll(includeUntitled?: boolean): Promise<boolean>;
|
|
60
|
+
$updateOrganizationResources(extensionName: string, index: number, deleteCount: number, organizationResourcesToAdd: {
|
|
61
|
+
uri: UriComponents;
|
|
62
|
+
name?: string;
|
|
63
|
+
}[]): Promise<void>;
|
|
64
|
+
$resolveProxy(url: string): Promise<string>;
|
|
65
|
+
}
|
|
66
|
+
export interface ClientThreadLanguageFeaturesShape extends ILanguageFeaturesShape {
|
|
67
|
+
}
|
|
68
|
+
export interface WebExtHostDocumentsShape {
|
|
69
|
+
$acceptDocumentData(doc: ITextDocumentItem[]): void;
|
|
70
|
+
$acceptModelChanged(strURL: UriComponents, e: IModelChangedEvent, isDirty: boolean): void;
|
|
71
|
+
}
|
|
72
|
+
export interface ClientThreadCommandsShape extends Unsubscribable {
|
|
73
|
+
$unregister(id: number): void;
|
|
74
|
+
$registerCommand(id: number, command: string): void;
|
|
75
|
+
$executeCommand<T>(command: string, args: any[]): Promise<any>;
|
|
76
|
+
}
|
|
77
|
+
export interface WebExtHostCommandShape {
|
|
78
|
+
$executeContributedCommand<T>(id: number, args: any[]): Promise<any>;
|
|
79
|
+
$getContributedCommandHandlerDescriptions(): Promise<{
|
|
80
|
+
[id: string]: string | ICommandHandlerDescription;
|
|
81
|
+
}>;
|
|
82
|
+
}
|
|
83
|
+
/** @internal */
|
|
84
|
+
export interface PanelViewData extends Pick<cdeops.PanelView, 'title' | 'content' | 'priority' | 'component'> {
|
|
85
|
+
}
|
|
86
|
+
/** @internal */
|
|
87
|
+
export interface ClientThreadViewsShape {
|
|
88
|
+
$unregister(id: number): void;
|
|
89
|
+
$registerPanelViewProvider(id: number, provider: {
|
|
90
|
+
id: string;
|
|
91
|
+
}): void;
|
|
92
|
+
$acceptPanelViewUpdate(id: number, params: Partial<PanelViewData>): void;
|
|
93
|
+
}
|
|
94
|
+
export interface ClientThreadContextShape {
|
|
95
|
+
$acceptContextUpdates(updates: cdeops.ContextValues): void;
|
|
96
|
+
}
|
|
97
|
+
export declare const ClientContext: {
|
|
98
|
+
ClientThreadLanguageFeatures: ProxyIdentifier<ClientThreadLanguageFeaturesShape>;
|
|
99
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClientContext = void 0;
|
|
4
|
+
const proxy_identifier_1 = require("./proxy-identifier");
|
|
5
|
+
exports.ClientContext = {
|
|
6
|
+
ClientThreadLanguageFeatures: (0, proxy_identifier_1.createMainContextProxyIdentifier)('ClientThreadLanguageFeatures'),
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=client.protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.protocol.js","sourceRoot":"","sources":["../../src/protocol/client.protocol.ts"],"names":[],"mappings":";;;AAMA,yDAAyK;AAoI5J,QAAA,aAAa,GAAG;IACzB,4BAA4B,EAAE,IAAA,mDAAY,EAAoC,8BAA8B,CAAC;CAChH,CAAC"}
|