@crowdedkingdoms/crowdyjs 18.13.1-dev.1 → 18.13.2-dev.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/dist/index.d.ts
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* never an untrusted browser.
|
|
47
47
|
*/
|
|
48
48
|
/** The published package version. Mirrors `package.json`. */
|
|
49
|
-
export declare const VERSION = "18.13.
|
|
49
|
+
export declare const VERSION = "18.13.2-dev.1";
|
|
50
50
|
export { LbCookieStore } from './lb-cookie-store.js';
|
|
51
51
|
export { CrowdyClient, createCrowdyClient, type CrowdyClientConfig, } from './crowdy-client.js';
|
|
52
52
|
export { CROWDY_DEFAULT_TIER, CROWDY_DEFAULT_HOST, CROWDY_DEFAULT_HTTP_ORIGIN, CROWDY_DEFAULT_WS_ORIGIN, } from './default-origin.js';
|
package/dist/index.js
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* never an untrusted browser.
|
|
47
47
|
*/
|
|
48
48
|
/** The published package version. Mirrors `package.json`. */
|
|
49
|
-
export const VERSION = '18.13.
|
|
49
|
+
export const VERSION = '18.13.2-dev.1';
|
|
50
50
|
export { LbCookieStore } from './lb-cookie-store.js';
|
|
51
51
|
export { CrowdyClient, createCrowdyClient, } from './crowdy-client.js';
|
|
52
52
|
// The tier this build defaults to, exported so a consumer can PRINT what it is
|
|
@@ -33,7 +33,7 @@ export interface WorkerLanguageClientOptions {
|
|
|
33
33
|
requestTimeoutMs?: number;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
* LSP
|
|
36
|
+
* LSP JSON-RPC client over a real vscode-jsonrpc MessageConnection.
|
|
37
37
|
* Monaco providers adapt editor calls to this connection; transport framing,
|
|
38
38
|
* request ids, cancellation, errors, and notifications are standard JSON-RPC.
|
|
39
39
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-transport.d.ts","sourceRoot":"","sources":["../../src/live-coding/worker-transport.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"worker-transport.d.ts","sourceRoot":"","sources":["../../src/live-coding/worker-transport.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EAGrB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAC;AASxB,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EAAE,UAAU,EAAE,CAAC;AAE3B,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACpC,gBAAgB,CACd,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,cAAc,EAC1C,QAAQ,EAAE,aAAa,GACtB,IAAI,CAAC;IACR,mBAAmB,CACjB,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,cAAc,EAC1C,QAAQ,EAAE,aAAa,GACtB,IAAI,CAAC;IACR,SAAS,IAAI,IAAI,CAAC;CACnB;AAwDD,mFAAmF;AACnF,qBAAa,mBAAoB,SAAQ,qBAAqB;IAIhD,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHnC,OAAO,CAAC,QAAQ,CAA6B;IAC7C,OAAO,CAAC,SAAS,CAAS;gBAEG,MAAM,EAAE,kBAAkB;IAIvD,MAAM,CAAC,QAAQ,EAAE,YAAY,GAAG,UAAU;IAUjC,OAAO,IAAI,IAAI;IAWxB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAOxB;IAEF,OAAO,CAAC,QAAQ,CAAC,cAAc,CAE7B;IAEF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAM5B;CACH;AAED,mFAAmF;AACnF,qBAAa,mBAAoB,SAAQ,qBAAqB;IAIhD,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHnC,OAAO,CAAC,QAAQ,CAAS;I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AQ,IAAI,IAAI;IAehB,OAAO,IAAI,IAAI;CAahB;AAED,wBAAgB,+BAA+B,IAAI,MAAM,CAKxD;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAE1E"}
|
|
@@ -1,6 +1,61 @@
|
|
|
1
|
-
import { AbstractMessageReader, AbstractMessageWriter, CancellationTokenSource, } from 'vscode-jsonrpc';
|
|
1
|
+
import { AbstractMessageReader, AbstractMessageWriter, CancellationTokenSource, RAL, } from 'vscode-jsonrpc';
|
|
2
2
|
import { ExitNotification, InitializeRequest, InitializedNotification, ShutdownRequest, createProtocolConnection, } from 'vscode-languageserver-protocol';
|
|
3
3
|
import { decodeJsonRpcMessage, } from './lsp-protocol.js';
|
|
4
|
+
/**
|
|
5
|
+
* vscode-jsonrpc 9 does not install a runtime when imported from its main
|
|
6
|
+
* entry. The protocol connection schedules incoming messages through that
|
|
7
|
+
* runtime, so the first message throws and the request waits out its timeout.
|
|
8
|
+
* The browser runtime is the one this worker transport can run: it only needs
|
|
9
|
+
* timers and text encoding, which exist in a page and under Node's test runner.
|
|
10
|
+
*/
|
|
11
|
+
function installJsonRpcRuntime() {
|
|
12
|
+
try {
|
|
13
|
+
RAL();
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
// Not installed yet.
|
|
18
|
+
}
|
|
19
|
+
RAL.install({
|
|
20
|
+
applicationJson: {
|
|
21
|
+
encoder: {
|
|
22
|
+
name: 'application/json',
|
|
23
|
+
encode: (msg) => Promise.resolve(new TextEncoder().encode(JSON.stringify(msg))),
|
|
24
|
+
},
|
|
25
|
+
decoder: {
|
|
26
|
+
name: 'application/json',
|
|
27
|
+
decode: (buffer) => {
|
|
28
|
+
const bytes = buffer instanceof Uint8Array ? buffer : new Uint8Array(buffer);
|
|
29
|
+
return Promise.resolve(JSON.parse(new TextDecoder().decode(bytes)));
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
messageBuffer: {
|
|
34
|
+
create: () => {
|
|
35
|
+
throw new Error('Worker language transport does not frame byte streams');
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
console,
|
|
39
|
+
timer: {
|
|
40
|
+
setTimeout(callback, ms, ...args) {
|
|
41
|
+
const handle = setTimeout(callback, ms, ...args);
|
|
42
|
+
return { dispose: () => clearTimeout(handle) };
|
|
43
|
+
},
|
|
44
|
+
setImmediate(callback, ...args) {
|
|
45
|
+
let cancelled = false;
|
|
46
|
+
queueMicrotask(() => {
|
|
47
|
+
if (!cancelled)
|
|
48
|
+
callback(...args);
|
|
49
|
+
});
|
|
50
|
+
return { dispose: () => { cancelled = true; } };
|
|
51
|
+
},
|
|
52
|
+
setInterval(callback, ms, ...args) {
|
|
53
|
+
const handle = setInterval(callback, ms, ...args);
|
|
54
|
+
return { dispose: () => clearInterval(handle) };
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
}
|
|
4
59
|
/** Standard vscode-jsonrpc MessageReader over structured-clone worker messages. */
|
|
5
60
|
export class WorkerMessageReader extends AbstractMessageReader {
|
|
6
61
|
constructor(worker) {
|
|
@@ -77,7 +132,7 @@ export class WorkerMessageWriter extends AbstractMessageWriter {
|
|
|
77
132
|
}
|
|
78
133
|
}
|
|
79
134
|
/**
|
|
80
|
-
* LSP
|
|
135
|
+
* LSP JSON-RPC client over a real vscode-jsonrpc MessageConnection.
|
|
81
136
|
* Monaco providers adapt editor calls to this connection; transport framing,
|
|
82
137
|
* request ids, cancellation, errors, and notifications are standard JSON-RPC.
|
|
83
138
|
*/
|
|
@@ -89,6 +144,7 @@ export class WorkerLanguageClient {
|
|
|
89
144
|
this.persistentErrorHandlers = new Set();
|
|
90
145
|
this.disposed = false;
|
|
91
146
|
this.terminateTimer = null;
|
|
147
|
+
installJsonRpcRuntime();
|
|
92
148
|
this.reader = new WorkerMessageReader(worker);
|
|
93
149
|
this.writer = new WorkerMessageWriter(worker);
|
|
94
150
|
this.readerErrorDisposable = this.reader.onError((error) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crowdedkingdoms/crowdyjs",
|
|
3
|
-
"version": "18.13.
|
|
3
|
+
"version": "18.13.2-dev.1",
|
|
4
4
|
"description": "Browser-first Crowded Kingdoms SDK with GraphQL, realtime, and local Rust authoring support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
"dompurify": "3.4.16",
|
|
120
120
|
"graphql": "^16.13.2",
|
|
121
121
|
"graphql-ws": "^6.2.1",
|
|
122
|
-
"vscode-jsonrpc": "
|
|
123
|
-
"vscode-languageserver-protocol": "3.
|
|
122
|
+
"vscode-jsonrpc": "9.0.3",
|
|
123
|
+
"vscode-languageserver-protocol": "3.18.4",
|
|
124
124
|
"web-tree-sitter": "0.26.11"
|
|
125
125
|
},
|
|
126
126
|
"overrides": {
|