@adminide-stack/extension-api 6.0.3-alpha.8 → 7.0.1-alpha.1
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 +1 -0
- package/lib/connections/jsonrpc2/events.js +6 -2
- package/lib/connections/jsonrpc2/linkedMap.js +4 -0
- package/lib/connections/jsonrpc2/messages.js +2 -0
- package/lib/connections/jsonrpc2/trace.js +1 -0
- package/lib/connections/jsonrpc2/transport.js +4 -4
- package/lib/connections/jsonrpc2/transports/webWorker.js +5 -3
- package/lib/connections/remote-rpc/browser-remote-rpc.js +4 -1
- package/lib/core/expr/evaluator.js +1 -0
- package/lib/core/expr/lexer.js +5 -7
- package/lib/core/expr/parser.js +1 -0
- package/lib/core/types/ext-host-types.js +4 -0
- package/lib/interfaces/generated-models.d.ts +1 -1
- package/lib/interfaces/generated-models.js +1 -1
- package/lib/protocol/common.protocol.js +2 -1
- package/lib/protocol/proxy-identifier.js +7 -1
- package/lib/protocol/rpc-logger.js +2 -4
- package/lib/protocol/rpc-protocol.js +20 -3
- package/lib/protocol/utils/lazy-promise.js +9 -0
- package/lib/utils/rxjs/combineLatestOrDefault.js +6 -4
- package/package.json +5 -4
@@ -29,6 +29,7 @@ var ConnectionErrors;
|
|
29
29
|
ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
|
30
30
|
})(ConnectionErrors || (ConnectionErrors = {}));
|
31
31
|
class ConnectionError extends Error {
|
32
|
+
code;
|
32
33
|
constructor(code, message) {
|
33
34
|
super(message);
|
34
35
|
this.code = code;
|
@@ -8,6 +8,8 @@ var Event;
|
|
8
8
|
Event.None = () => _unsubscribable;
|
9
9
|
})(Event || (Event = {}));
|
10
10
|
class CallbackList {
|
11
|
+
_callbacks;
|
12
|
+
_contexts;
|
11
13
|
add(callback, context = null, bucket) {
|
12
14
|
if (!this._callbacks) {
|
13
15
|
this._callbacks = [];
|
@@ -67,6 +69,9 @@ class CallbackList {
|
|
67
69
|
}
|
68
70
|
}
|
69
71
|
class Emitter {
|
72
|
+
static _noop = () => void 0;
|
73
|
+
_event;
|
74
|
+
_callbacks;
|
70
75
|
/**
|
71
76
|
* For the public to allow to subscribe
|
72
77
|
* to events from this Emitter
|
@@ -108,5 +113,4 @@ class Emitter {
|
|
108
113
|
this._callbacks = undefined;
|
109
114
|
}
|
110
115
|
}
|
111
|
-
}
|
112
|
-
Emitter._noop = () => void 0;export{Emitter,Event};
|
116
|
+
}export{Emitter,Event};
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import {Emitter}from'./events.js';class AbstractMessageReader {
|
2
|
+
errorEmitter;
|
3
|
+
closeEmitter;
|
2
4
|
constructor() {
|
3
5
|
this.errorEmitter = new Emitter();
|
4
6
|
this.closeEmitter = new Emitter();
|
@@ -30,10 +32,8 @@ import {Emitter}from'./events.js';class AbstractMessageReader {
|
|
30
32
|
}
|
31
33
|
}
|
32
34
|
class AbstractMessageWriter {
|
33
|
-
|
34
|
-
|
35
|
-
this.closeEmitter = new Emitter();
|
36
|
-
}
|
35
|
+
errorEmitter = new Emitter();
|
36
|
+
closeEmitter = new Emitter();
|
37
37
|
unsubscribe() {
|
38
38
|
this.errorEmitter.unsubscribe();
|
39
39
|
this.closeEmitter.unsubscribe();
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import {AbstractMessageReader,AbstractMessageWriter}from'../transport.js';class WebWorkerMessageReader extends AbstractMessageReader {
|
2
|
+
worker;
|
3
|
+
pending = [];
|
4
|
+
callback = null;
|
2
5
|
constructor(worker) {
|
3
6
|
super();
|
4
7
|
this.worker = worker;
|
5
|
-
this.pending = [];
|
6
|
-
this.callback = null;
|
7
8
|
worker.addEventListener('message', (e) => {
|
8
9
|
try {
|
9
10
|
this.processMessage(e);
|
@@ -48,10 +49,11 @@ import {AbstractMessageReader,AbstractMessageWriter}from'../transport.js';class
|
|
48
49
|
}
|
49
50
|
}
|
50
51
|
class WebWorkerMessageWriter extends AbstractMessageWriter {
|
52
|
+
worker;
|
53
|
+
errorCount = 0;
|
51
54
|
constructor(worker) {
|
52
55
|
super();
|
53
56
|
this.worker = worker;
|
54
|
-
this.errorCount = 0;
|
55
57
|
}
|
56
58
|
write(message) {
|
57
59
|
try {
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import {QueueingSubject}from'queueing-subject';import {VSBuffer}from'@vscode-alt/monaco-editor/esm/vs/base/common/buffer.js';import {Emitter}from'@vscode-alt/monaco-editor/esm/vs/base/common/event.js';import makeWebSocketObservable,{normalClosureMessage}from'./rxjs-websockets.js';import {switchMap,share}from'rxjs/operators/index.js';class BrowserRemoteRPC {
|
2
|
+
// this subject queues as necessary to ensure every message is delivered
|
3
|
+
input$;
|
4
|
+
_localHostId;
|
5
|
+
_onMessage = new Emitter();
|
2
6
|
constructor(hostId = 2 /* HostIdentifier.BrowserExtHost */) {
|
3
|
-
this._onMessage = new Emitter();
|
4
7
|
this._localHostId = hostId;
|
5
8
|
console.clear();
|
6
9
|
this.input$ = new QueueingSubject();
|
package/lib/core/expr/lexer.js
CHANGED
@@ -106,13 +106,11 @@ function isIdentifierPart(character) {
|
|
106
106
|
}
|
107
107
|
/** Scans an expression. */
|
108
108
|
class Lexer {
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
this.curlyStack = 0;
|
115
|
-
}
|
109
|
+
expression = '';
|
110
|
+
length = 0;
|
111
|
+
_index = 0;
|
112
|
+
marker = 0;
|
113
|
+
curlyStack = 0;
|
116
114
|
/** The current character position of the lexer's cursor. */
|
117
115
|
get index() {
|
118
116
|
return this._index;
|
package/lib/core/expr/parser.js
CHANGED
@@ -12,6 +12,7 @@ import {illegalArgument}from'@vscode-alt/monaco-editor/esm/vs/base/common/errors
|
|
12
12
|
}
|
13
13
|
});
|
14
14
|
}
|
15
|
+
_callOnDispose;
|
15
16
|
constructor(callOnDispose) {
|
16
17
|
this._callOnDispose = callOnDispose;
|
17
18
|
}
|
@@ -39,6 +40,9 @@ var LogLevel;
|
|
39
40
|
LogLevel[LogLevel["Off"] = 7] = "Off";
|
40
41
|
})(LogLevel || (LogLevel = {}));
|
41
42
|
class RelativePattern {
|
43
|
+
base;
|
44
|
+
baseFolder;
|
45
|
+
pattern;
|
42
46
|
constructor(base, pattern) {
|
43
47
|
// if (typeof base !== 'string') {
|
44
48
|
// if (!base || !URI.isUri(base.uri)) {
|
@@ -2,7 +2,7 @@ import { URI, UriComponents } from '@vscode-alt/monaco-editor/esm/vs/base/common
|
|
2
2
|
import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
|
3
3
|
import { MyContext } from '@adminide-stack/core';
|
4
4
|
import { DocumentNode } from 'graphql';
|
5
|
-
import * as Apollo from '@apollo/client
|
5
|
+
import * as Apollo from '@apollo/client';
|
6
6
|
export type Maybe<T> = T | null;
|
7
7
|
export type InputMaybe<T> = Maybe<T>;
|
8
8
|
export type Exact<T extends {
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import {URI}from'@vscode-alt/monaco-editor/esm/vs/base/common/uri.js';class IdObject {
|
2
|
+
_id;
|
3
|
+
static _n = 0;
|
2
4
|
static mixin(object) {
|
3
5
|
object._id = IdObject._n++;
|
4
6
|
return object;
|
5
7
|
}
|
6
8
|
}
|
7
|
-
IdObject._n = 0;
|
8
9
|
// needed
|
9
10
|
var ISuggestDataDtoField;
|
10
11
|
(function (ISuggestDataDtoField) {
|
@@ -1,5 +1,12 @@
|
|
1
1
|
/* tslint:disable */
|
2
2
|
class ProxyIdentifier {
|
3
|
+
static count = 0;
|
4
|
+
_proxyIdentifierBrand;
|
5
|
+
_suppressCompilerUnusedWarning;
|
6
|
+
isMain;
|
7
|
+
sid;
|
8
|
+
nid;
|
9
|
+
hostId;
|
3
10
|
constructor(isMain, sid, hostId) {
|
4
11
|
this.isMain = isMain;
|
5
12
|
this.sid = sid;
|
@@ -7,7 +14,6 @@ class ProxyIdentifier {
|
|
7
14
|
this.hostId = hostId;
|
8
15
|
}
|
9
16
|
}
|
10
|
-
ProxyIdentifier.count = 0;
|
11
17
|
const identifiers = [];
|
12
18
|
function createMainContextProxyIdentifier(identifier, hostIdentifier = 1 /* HostIdentifier.ServerMainThread */) {
|
13
19
|
const result = new ProxyIdentifier(true, identifier, hostIdentifier);
|
@@ -22,10 +22,8 @@ function pretty(data) {
|
|
22
22
|
return prettyWithoutArrays(data);
|
23
23
|
}
|
24
24
|
class RPCLogger {
|
25
|
-
|
26
|
-
|
27
|
-
this._totalOutgoing = 0;
|
28
|
-
}
|
25
|
+
_totalIncoming = 0;
|
26
|
+
_totalOutgoing = 0;
|
29
27
|
_log(direction, totalLength, msgLength, req, initiator, str, data) {
|
30
28
|
data = pretty(data);
|
31
29
|
const colorTable = colorTables[initiator];
|
@@ -30,10 +30,26 @@ var ResponsiveState;
|
|
30
30
|
})(ResponsiveState || (ResponsiveState = {}));
|
31
31
|
const noop = () => { };
|
32
32
|
class RPCProtocol extends Disposable {
|
33
|
+
static UNRESPONSIVE_TIME = 3 * 1000; // 3s
|
34
|
+
_onDidChangeResponsiveState = this._register(new Emitter());
|
35
|
+
onDidChangeResponsiveState = this._onDidChangeResponsiveState.event;
|
36
|
+
_protocol;
|
37
|
+
_logger;
|
38
|
+
_uriTransformer;
|
39
|
+
_uriReplacer;
|
40
|
+
_isDisposed;
|
41
|
+
_locals;
|
42
|
+
_proxies;
|
43
|
+
_lastMessageId;
|
44
|
+
_cancelInvokedHandlers;
|
45
|
+
_pendingRPCReplies;
|
46
|
+
_responsiveState;
|
47
|
+
_unacknowledgedCount;
|
48
|
+
_unresponsiveTime;
|
49
|
+
_asyncCheckUresponsive;
|
50
|
+
localHostId;
|
33
51
|
constructor(protocol, _localHostId = null, logger = null, transformer = null) {
|
34
52
|
super();
|
35
|
-
this._onDidChangeResponsiveState = this._register(new Emitter());
|
36
|
-
this.onDidChangeResponsiveState = this._onDidChangeResponsiveState.event;
|
37
53
|
this.localHostId = _localHostId;
|
38
54
|
this._protocol = protocol;
|
39
55
|
this._logger = logger;
|
@@ -379,7 +395,6 @@ class RPCProtocol extends Disposable {
|
|
379
395
|
return result;
|
380
396
|
}
|
381
397
|
}
|
382
|
-
RPCProtocol.UNRESPONSIVE_TIME = 3 * 1000; // 3s
|
383
398
|
class MessageBuffer {
|
384
399
|
static alloc(type, req, messageSize) {
|
385
400
|
let result = new MessageBuffer(VSBuffer.alloc(messageSize + 1 /* type */ + 4 /* req */), 0);
|
@@ -390,6 +405,8 @@ class MessageBuffer {
|
|
390
405
|
static read(buff, offset) {
|
391
406
|
return new MessageBuffer(buff, offset);
|
392
407
|
}
|
408
|
+
_buff;
|
409
|
+
_offset;
|
393
410
|
get buffer() {
|
394
411
|
return this._buff;
|
395
412
|
}
|
@@ -1,6 +1,15 @@
|
|
1
1
|
import {onUnexpectedError}from'@vscode-alt/monaco-editor/esm/vs/base/common/errors.js';// types taken from
|
2
2
|
// https://github.com/andimarek/micro-manager/blob/ac5333a1e0400f6f985ceb0edcbcdfc5a7a79988/src/ipc/ipcRemoteCom.ts
|
3
3
|
class LazyPromise {
|
4
|
+
[Symbol.toStringTag];
|
5
|
+
_onCancel;
|
6
|
+
_actual;
|
7
|
+
_actualOk;
|
8
|
+
_actualErr;
|
9
|
+
_hasValue;
|
10
|
+
_value;
|
11
|
+
_hasErr;
|
12
|
+
_err;
|
4
13
|
constructor() {
|
5
14
|
this._actual = null;
|
6
15
|
this._actualOk = null;
|
@@ -38,6 +38,7 @@ function combineLatestOrDefault(observables, defaultValue) {
|
|
38
38
|
}
|
39
39
|
}
|
40
40
|
class CombineLatestOperator {
|
41
|
+
defaultValue;
|
41
42
|
constructor(defaultValue) {
|
42
43
|
this.defaultValue = defaultValue;
|
43
44
|
}
|
@@ -46,13 +47,14 @@ class CombineLatestOperator {
|
|
46
47
|
}
|
47
48
|
}
|
48
49
|
class CombineLatestSubscriber extends OuterSubscriber {
|
50
|
+
defaultValue;
|
51
|
+
activeObservables = 0;
|
52
|
+
values = [];
|
53
|
+
observables = [];
|
54
|
+
scheduled = false;
|
49
55
|
constructor(observer, defaultValue) {
|
50
56
|
super(observer);
|
51
57
|
this.defaultValue = defaultValue;
|
52
|
-
this.activeObservables = 0;
|
53
|
-
this.values = [];
|
54
|
-
this.observables = [];
|
55
|
-
this.scheduled = false;
|
56
58
|
}
|
57
59
|
_next(observable) {
|
58
60
|
if (this.defaultValue !== undefined) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@adminide-stack/extension-api",
|
3
|
-
"version": "
|
3
|
+
"version": "7.0.1-alpha.1",
|
4
4
|
"description": "Workbench core for higher packages to depend on",
|
5
5
|
"license": "ISC",
|
6
6
|
"author": "CDMBase LLC",
|
@@ -37,10 +37,11 @@
|
|
37
37
|
}
|
38
38
|
},
|
39
39
|
"dependencies": {
|
40
|
-
"@adminide-stack/core": "
|
40
|
+
"@adminide-stack/core": "7.0.1-alpha.1",
|
41
|
+
"@workbench-stack/core": "3.5.0",
|
41
42
|
"abort-controller": "^2.0.0",
|
42
43
|
"abortable-rx": "^1.0.9",
|
43
|
-
"cdeops": "
|
44
|
+
"cdeops": "7.0.1-alpha.0",
|
44
45
|
"minimatch": "^9.0.0",
|
45
46
|
"queueing-subject": "0.3.4",
|
46
47
|
"utility-types": "^3.10.0",
|
@@ -59,5 +60,5 @@
|
|
59
60
|
"typescript": {
|
60
61
|
"definition": "lib/index.d.ts"
|
61
62
|
},
|
62
|
-
"gitHead": "
|
63
|
+
"gitHead": "7b1bc714d77dd0156dfe5ff7c56060d5b8fc48e6"
|
63
64
|
}
|