@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,19 @@
|
|
|
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("./webWorkerLink"), exports);
|
|
18
|
+
__exportStar(require("./workerUtils"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/worker-lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,kDAAgC;AAChC,gDAA8B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ApolloLink, Observable } from '@apollo/client';
|
|
2
|
+
export declare class PromiseWorkerLink extends ApolloLink {
|
|
3
|
+
promiseWorker: any;
|
|
4
|
+
constructor({ worker }: {
|
|
5
|
+
worker: any;
|
|
6
|
+
});
|
|
7
|
+
request(operation: any): Observable<unknown>;
|
|
8
|
+
}
|
|
9
|
+
export declare const isASubscriptionOperation: (document: any, operationName: any) => boolean;
|
|
10
|
+
export declare const createWebWorkerLink: ({ worker }: {
|
|
11
|
+
worker: any;
|
|
12
|
+
}) => ApolloLink;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createWebWorkerLink = exports.isASubscriptionOperation = exports.PromiseWorkerLink = void 0;
|
|
4
|
+
/* tslint:disable */
|
|
5
|
+
const graphql_1 = require("graphql");
|
|
6
|
+
const client_1 = require("@apollo/client");
|
|
7
|
+
const PromiseWorker = require('promise-worker');
|
|
8
|
+
class PromiseWorkerLink extends client_1.ApolloLink {
|
|
9
|
+
constructor({ worker }) {
|
|
10
|
+
super();
|
|
11
|
+
this.promiseWorker = null;
|
|
12
|
+
this.promiseWorker = new PromiseWorker(worker);
|
|
13
|
+
}
|
|
14
|
+
request(operation) {
|
|
15
|
+
return new client_1.Observable(observer => {
|
|
16
|
+
this.promiseWorker.postMessage(operation)
|
|
17
|
+
.then(data => {
|
|
18
|
+
observer.next(data);
|
|
19
|
+
observer.complete();
|
|
20
|
+
})
|
|
21
|
+
.catch(observer.error.bind(observer));
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.PromiseWorkerLink = PromiseWorkerLink;
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
// export const createWorkerInterface = ({ worker }) => {
|
|
28
|
+
// // @ts-ignore
|
|
29
|
+
// class WorkerInterface {
|
|
30
|
+
// url;
|
|
31
|
+
// protocol;
|
|
32
|
+
// readyState;
|
|
33
|
+
// constructor(url, protocol) {
|
|
34
|
+
// this.url = url;
|
|
35
|
+
// this.protocol = protocol;
|
|
36
|
+
// // @ts-ignore
|
|
37
|
+
// this.readyState = WorkerInterface.OPEN; // webworker is always opened
|
|
38
|
+
// }
|
|
39
|
+
// close() {
|
|
40
|
+
// console.log('closing noop');
|
|
41
|
+
// }
|
|
42
|
+
// send(serializedMessage) {
|
|
43
|
+
// worker.postMessage(serializedMessage);
|
|
44
|
+
// }
|
|
45
|
+
// set onerror(fn) {
|
|
46
|
+
// worker.onerror = fn;
|
|
47
|
+
// }
|
|
48
|
+
// set onmessage(fn) {
|
|
49
|
+
// worker.onmessage = ({ data }) => {
|
|
50
|
+
// const d = JSON.parse(data);
|
|
51
|
+
// if (Object.keys(MessageTypes).map(k => MessageTypes[k]).indexOf(d.type) !== -1) {
|
|
52
|
+
// fn({ data });
|
|
53
|
+
// }
|
|
54
|
+
// };
|
|
55
|
+
// }
|
|
56
|
+
// }
|
|
57
|
+
// // @ts-ignore
|
|
58
|
+
// WorkerInterfac.CLOSED = 'CLOSED';
|
|
59
|
+
// // @ts-ignore
|
|
60
|
+
// WorkerInterface.OPEN = 'OPEN';
|
|
61
|
+
// // @ts-ignore
|
|
62
|
+
// WorkerInterface.CONNECTING = 'CONNECTING';
|
|
63
|
+
// return WorkerInterface;
|
|
64
|
+
// }
|
|
65
|
+
// export class SubscriptionWorkerLink extends ApolloLink {
|
|
66
|
+
// worker = null;
|
|
67
|
+
// subscriptionClient = null;
|
|
68
|
+
// constructor({ worker }) {
|
|
69
|
+
// super();
|
|
70
|
+
// this.worker = worker;
|
|
71
|
+
// this.subscriptionClient = new SubscriptionClient(null, {}, createWorkerInterface({ worker }));
|
|
72
|
+
// }
|
|
73
|
+
// request(operation) {
|
|
74
|
+
// return this.subscriptionClient.request(operation);
|
|
75
|
+
// }
|
|
76
|
+
// }
|
|
77
|
+
const isASubscriptionOperation = (document, operationName) => {
|
|
78
|
+
const operationAST = (0, graphql_1.getOperationAST)(document, operationName);
|
|
79
|
+
return !!operationAST && operationAST.operation === 'subscription';
|
|
80
|
+
};
|
|
81
|
+
exports.isASubscriptionOperation = isASubscriptionOperation;
|
|
82
|
+
const createWebWorkerLink = ({ worker }) => {
|
|
83
|
+
// const subscriptionWorkerLink = new SubscriptionWorkerLink({ worker });
|
|
84
|
+
const promiseWorkerLink = new PromiseWorkerLink({ worker });
|
|
85
|
+
const link = client_1.ApolloLink.split(operation => {
|
|
86
|
+
const document = (0, graphql_1.parse)(operation.query);
|
|
87
|
+
return (0, exports.isASubscriptionOperation)(document, operation.operationName);
|
|
88
|
+
},
|
|
89
|
+
// subscriptionWorkerLink,
|
|
90
|
+
promiseWorkerLink);
|
|
91
|
+
// (link as any).__subscriptionWorkerLink = subscriptionWorkerLink;
|
|
92
|
+
link.__promiseWorkerLink = promiseWorkerLink;
|
|
93
|
+
return link;
|
|
94
|
+
};
|
|
95
|
+
exports.createWebWorkerLink = createWebWorkerLink;
|
|
96
|
+
//# sourceMappingURL=webWorkerLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webWorkerLink.js","sourceRoot":"","sources":["../../src/worker-lib/webWorkerLink.ts"],"names":[],"mappings":";;;AACA,oBAAoB;AACpB,qCAA+D;AAC/D,2CAAwD;AAIxD,MAAM,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAIhD,MAAa,iBAAkB,SAAQ,mBAAU;IAE/C,YAAY,EAAE,MAAM,EAAE;QACpB,KAAK,EAAE,CAAC;QAFV,kBAAa,GAAG,IAAI,CAAC;QAGnB,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,CAAC,SAAS;QACf,OAAO,IAAI,mBAAU,CAAC,QAAQ,CAAC,EAAE;YAC/B,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,SAAS,CAAC;iBACtC,IAAI,CAAC,IAAI,CAAC,EAAE;gBACX,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACpB,QAAQ,CAAC,QAAQ,EAAE,CAAC;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BAAiB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5D,MAAM,IAAI,GAAG,mBAAU,CAAC,KAAK,CAC3B,SAAS,CAAC,EAAE;QACV,MAAM,QAAQ,GAAG,IAAA,eAAK,EAAC,SAAS,CAAC,KAAY,CAAC,CAAC;QAC/C,OAAO,IAAA,gCAAwB,EAAC,QAAQ,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IACrE,CAAC;IACD,0BAA0B;IAC1B,iBAAiB,CAClB,CAAC;IACF,mEAAmE;IAClE,IAAY,CAAC,mBAAmB,GAAG,iBAAiB,CAAC;IACtD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAdW,QAAA,mBAAmB,uBAc9B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const createWorker: ({ schema, context, beforeRequest, }: {
|
|
2
|
+
schema: any;
|
|
3
|
+
context: any;
|
|
4
|
+
beforeRequest: (request: any) => any;
|
|
5
|
+
}) => any;
|
|
6
|
+
export declare const handleSubscriptions: ({ self, message, schema, context, }: {
|
|
7
|
+
self: any;
|
|
8
|
+
message: any;
|
|
9
|
+
schema: any;
|
|
10
|
+
context: any;
|
|
11
|
+
}) => any;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.handleSubscriptions = exports.createWorker = void 0;
|
|
5
|
+
const graphql_1 = require("graphql");
|
|
6
|
+
const iterall_1 = require("iterall");
|
|
7
|
+
const registerPromiseWorker = require('promise-worker/register');
|
|
8
|
+
const MessageTypes = require("./MessageTypes");
|
|
9
|
+
const createEmptyIterable = () => ({
|
|
10
|
+
next: () => Promise.resolve({ value: undefined, done: true }),
|
|
11
|
+
return: () => Promise.resolve({ value: undefined, done: true }),
|
|
12
|
+
throw: e => Promise.reject(e),
|
|
13
|
+
[iterall_1.$$asyncIterator]: () => this,
|
|
14
|
+
});
|
|
15
|
+
const createIterableFromPromise = promise => {
|
|
16
|
+
let isResolved = false;
|
|
17
|
+
return promise.then(value => {
|
|
18
|
+
if ((0, iterall_1.isAsyncIterable)(value)) {
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
next: () => {
|
|
23
|
+
if (!isResolved) {
|
|
24
|
+
isResolved = true;
|
|
25
|
+
return Promise.resolve({ value, done: false });
|
|
26
|
+
}
|
|
27
|
+
return Promise.resolve({ value: undefined, done: true });
|
|
28
|
+
},
|
|
29
|
+
return: () => {
|
|
30
|
+
isResolved = true;
|
|
31
|
+
return Promise.resolve({ value: undefined, done: true });
|
|
32
|
+
},
|
|
33
|
+
throw: e => {
|
|
34
|
+
isResolved = true;
|
|
35
|
+
return Promise.reject(e);
|
|
36
|
+
},
|
|
37
|
+
[iterall_1.$$asyncIterator]: () => this,
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const createWorker = ({ schema, context, beforeRequest = () => Promise.resolve(), }) => registerPromiseWorker(request => {
|
|
42
|
+
if (request) {
|
|
43
|
+
return beforeRequest(request).then(() => (0, graphql_1.execute)(schema, request.query, {}, Object.assign({}, request.context || {}, context), request.variables, request.operationName));
|
|
44
|
+
}
|
|
45
|
+
return Promise.resolve();
|
|
46
|
+
});
|
|
47
|
+
exports.createWorker = createWorker;
|
|
48
|
+
let _onMessage;
|
|
49
|
+
const getOnMessage = ({ schema, context }) => {
|
|
50
|
+
if (_onMessage)
|
|
51
|
+
return _onMessage;
|
|
52
|
+
const sendMessage = (opId, type, payload) => {
|
|
53
|
+
const message = {
|
|
54
|
+
type,
|
|
55
|
+
id: opId,
|
|
56
|
+
payload,
|
|
57
|
+
};
|
|
58
|
+
self.postMessage(JSON.stringify(message));
|
|
59
|
+
};
|
|
60
|
+
const sendError = (opId, errorPayload, overrideDefaultErrorType) => {
|
|
61
|
+
sendMessage(opId, MessageTypes.GQL_ERROR, errorPayload);
|
|
62
|
+
};
|
|
63
|
+
const connectionContext = {
|
|
64
|
+
isLegacy: false,
|
|
65
|
+
operations: {},
|
|
66
|
+
};
|
|
67
|
+
const unsubscribe = opId => {
|
|
68
|
+
if (connectionContext.operations && connectionContext.operations[opId]) {
|
|
69
|
+
if (connectionContext.operations[opId].return) {
|
|
70
|
+
connectionContext.operations[opId].return();
|
|
71
|
+
}
|
|
72
|
+
delete connectionContext.operations[opId];
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
_onMessage = workerMessage => {
|
|
76
|
+
const message = JSON.parse(workerMessage.data);
|
|
77
|
+
const opId = message.id;
|
|
78
|
+
if (typeof opId !== 'undefined') {
|
|
79
|
+
switch (message.type) {
|
|
80
|
+
case MessageTypes.GQL_STOP:
|
|
81
|
+
unsubscribe(opId);
|
|
82
|
+
break;
|
|
83
|
+
case MessageTypes.GQL_START:
|
|
84
|
+
unsubscribe(opId);
|
|
85
|
+
const baseParams = {
|
|
86
|
+
query: message.payload.query,
|
|
87
|
+
variables: message.payload.variables,
|
|
88
|
+
operationName: message.payload.operationName,
|
|
89
|
+
context,
|
|
90
|
+
formatResponse: undefined,
|
|
91
|
+
formatError: undefined,
|
|
92
|
+
callback: undefined,
|
|
93
|
+
};
|
|
94
|
+
let promisedParams = Promise.resolve(baseParams);
|
|
95
|
+
// set an initial mock subscription to only registering opId
|
|
96
|
+
connectionContext.operations[opId] = createEmptyIterable();
|
|
97
|
+
promisedParams.then(params => {
|
|
98
|
+
if (typeof params !== 'object') {
|
|
99
|
+
const error = `Invalid params returned from onOperation! return values must be an object!`;
|
|
100
|
+
throw new Error(error);
|
|
101
|
+
}
|
|
102
|
+
const document = typeof baseParams.query !== 'string' ? baseParams.query : (0, graphql_1.parse)(baseParams.query);
|
|
103
|
+
let executionIterable;
|
|
104
|
+
const validationErrors = (0, graphql_1.validate)(schema, document, graphql_1.specifiedRules);
|
|
105
|
+
if (validationErrors.length > 0) {
|
|
106
|
+
executionIterable = Promise.resolve(createIterableFromPromise(Promise.resolve({ errors: validationErrors })));
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
let executor = graphql_1.subscribe;
|
|
110
|
+
const promiseOrIterable = executor(schema, document, {}, params.context, params.variables, params.operationName);
|
|
111
|
+
if (!(0, iterall_1.isAsyncIterable)(promiseOrIterable) && promiseOrIterable instanceof Promise) {
|
|
112
|
+
executionIterable = promiseOrIterable;
|
|
113
|
+
}
|
|
114
|
+
else if ((0, iterall_1.isAsyncIterable)(promiseOrIterable)) {
|
|
115
|
+
executionIterable = Promise.resolve(promiseOrIterable);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
throw new Error('Invalid `execute` return type! Only Promise or AsyncIterable are valid values!');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return executionIterable.then(ei => ({
|
|
122
|
+
executionIterable: (0, iterall_1.isAsyncIterable)(ei) ? ei : (0, iterall_1.createAsyncIterator)([ei]),
|
|
123
|
+
params,
|
|
124
|
+
}));
|
|
125
|
+
}).then(({ executionIterable, params }) => {
|
|
126
|
+
(0, iterall_1.forAwaitEach)((0, iterall_1.createAsyncIterator)(executionIterable), value => {
|
|
127
|
+
let result = value;
|
|
128
|
+
if (params.formatResponse) {
|
|
129
|
+
try {
|
|
130
|
+
result = params.formatResponse(value, params);
|
|
131
|
+
}
|
|
132
|
+
catch (err) {
|
|
133
|
+
console.error('Error in formatError function:', err);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
sendMessage(opId, MessageTypes.GQL_DATA, result);
|
|
137
|
+
}).then(() => {
|
|
138
|
+
sendMessage(opId, MessageTypes.GQL_COMPLETE, null);
|
|
139
|
+
}).catch(e => {
|
|
140
|
+
let error = e;
|
|
141
|
+
if (params.formatError) {
|
|
142
|
+
try {
|
|
143
|
+
error = params.formatError(e, params);
|
|
144
|
+
}
|
|
145
|
+
catch (err) {
|
|
146
|
+
console.error('Error in formatError function: ', err);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
// plain Error object cannot be JSON stringified.
|
|
150
|
+
if (Object.keys(e).length === 0) {
|
|
151
|
+
error = { name: e.name, message: e.message };
|
|
152
|
+
}
|
|
153
|
+
sendError(opId, error);
|
|
154
|
+
});
|
|
155
|
+
return executionIterable;
|
|
156
|
+
}).then(subscription => {
|
|
157
|
+
connectionContext.operations[opId] = subscription;
|
|
158
|
+
}).catch(e => {
|
|
159
|
+
if (e.errors) {
|
|
160
|
+
sendMessage(opId, MessageTypes.GQL_DATA, { errors: e.errors });
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
sendError(opId, { message: e.message });
|
|
164
|
+
}
|
|
165
|
+
unsubscribe(opId);
|
|
166
|
+
return;
|
|
167
|
+
});
|
|
168
|
+
break;
|
|
169
|
+
default:
|
|
170
|
+
sendError(opId, { message: 'Invalid message type!' });
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
return _onMessage;
|
|
175
|
+
};
|
|
176
|
+
const handleSubscriptions = ({ self, message, schema, context, }) => getOnMessage({ schema, context })(message);
|
|
177
|
+
exports.handleSubscriptions = handleSubscriptions;
|
|
178
|
+
//# sourceMappingURL=workerUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workerUtils.js","sourceRoot":"","sources":["../../src/worker-lib/workerUtils.ts"],"names":[],"mappings":";AAAA,oBAAoB;;;AAEpB,qCAMiB;AACjB,qCAKiB;AACjB,MAAM,qBAAqB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AAEjE,+CAA+C;AAE/C,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,CAAC;IACjC,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC7D,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,E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AiB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;wBAClC,CAAC,CAAC,CAAC;wBAEL,OAAO,iBAAiB,CAAC;oBAC3B,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE;wBACrB,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC;oBACpD,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;wBACX,IAAI,CAAC,CAAC,MAAM,EAAE;4BACZ,WAAW,CAAC,IAAI,EAAE,YAAY,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;yBAChE;6BAAM;4BACJ,SAAiB,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;yBAClD;wBACD,WAAW,CAAC,IAAI,CAAC,CAAC;wBAClB,OAAO;oBACT,CAAC,CAAC,CAAC;oBACH,MAAM;gBAER;oBACG,SAAiB,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC,CAAC;aAClE;SACF;IACH,CAAC,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,MAAM,EACN,OAAO,GACR,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;AALpC,QAAA,mBAAmB,uBAKiB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@adminide-stack/extension-api",
|
|
3
|
+
"version": "0.0.2-alpha.0",
|
|
4
|
+
"description": "Workbench core for higher packages to depend on",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"author": "CDMBase LLC",
|
|
7
|
+
"main": "lib/index.js",
|
|
8
|
+
"typings": "lib/index.d.ts",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "npm run build:clean && npm run build:lib",
|
|
11
|
+
"build:clean": "rimraf lib",
|
|
12
|
+
"build:lib": "tsc",
|
|
13
|
+
"build:lib:watch": "npm run build:lib -- -w",
|
|
14
|
+
"jest": "./node_modules/.bin/jest",
|
|
15
|
+
"prepublishOnly": "npm run build",
|
|
16
|
+
"test": "jest",
|
|
17
|
+
"test:debug": "npm test -- --runInBand",
|
|
18
|
+
"test:watch": "npm test -- --watch",
|
|
19
|
+
"watch": "npm run build:lib:watch"
|
|
20
|
+
},
|
|
21
|
+
"jest": {
|
|
22
|
+
"moduleFileExtensions": [
|
|
23
|
+
"ts",
|
|
24
|
+
"tsx",
|
|
25
|
+
"js",
|
|
26
|
+
"json"
|
|
27
|
+
],
|
|
28
|
+
"roots": [
|
|
29
|
+
"src"
|
|
30
|
+
],
|
|
31
|
+
"testEnvironment": "node",
|
|
32
|
+
"testRegex": "/__tests__/.*test*\\.(ts|tsx|js)$",
|
|
33
|
+
"transform": {
|
|
34
|
+
"\\.(ts|tsx)$": "<rootDir>/../../node_modules/ts-jest/preprocessor.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@adminide-stack/core": "0.0.2-alpha.0",
|
|
39
|
+
"abort-controller": "^2.0.0",
|
|
40
|
+
"abortable-rx": "^1.0.9",
|
|
41
|
+
"cdeops": "0.0.2-alpha.0",
|
|
42
|
+
"queueing-subject": "0.3.4",
|
|
43
|
+
"utility-types": "^3.10.0",
|
|
44
|
+
"valid-url": "1.0.9"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"mock-socket": "^9.0.8"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"@vscode-alt/monaco-editor": ">=0.17.1",
|
|
51
|
+
"rxjs": "^6.3.3"
|
|
52
|
+
},
|
|
53
|
+
"publishConfig": {
|
|
54
|
+
"access": "public"
|
|
55
|
+
},
|
|
56
|
+
"typescript": {
|
|
57
|
+
"definition": "lib/index.d.ts"
|
|
58
|
+
},
|
|
59
|
+
"gitHead": "adc8a3c248d8d214e66489f332f758759fcdb7a5"
|
|
60
|
+
}
|