@jay-framework/editor-client 0.9.0 → 0.11.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/dist/index.d.ts +3 -2
- package/dist/index.js +3 -0
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _jay_framework_editor_protocol from '@jay-framework/editor-protocol';
|
|
2
|
-
import { ConnectionState, PublishMessage, SaveImageMessage, HasImageMessage,
|
|
2
|
+
import { ConnectionState, EditorProtocolMessageTypes, PublishMessage, PublishResponse, SaveImageMessage, SaveImageResponse, HasImageMessage, HasImageResponse, GetProjectInfoMessage, GetProjectInfoResponse, EditorProtocol, EditorProtocolResponseTypes } from '@jay-framework/editor-protocol';
|
|
3
3
|
|
|
4
4
|
interface ConnectionManagerOptions {
|
|
5
5
|
portRange?: [number, number];
|
|
@@ -29,7 +29,7 @@ declare class ConnectionManager {
|
|
|
29
29
|
disconnect(): Promise<void>;
|
|
30
30
|
getConnectionState(): ConnectionState;
|
|
31
31
|
onConnectionStateChange(callback: ConnectionStateCallback): () => void;
|
|
32
|
-
sendMessage<T extends
|
|
32
|
+
sendMessage<T extends EditorProtocolMessageTypes>(message: T): Promise<T extends PublishMessage ? PublishResponse : T extends SaveImageMessage ? SaveImageResponse : T extends HasImageMessage ? HasImageResponse : T extends GetProjectInfoMessage ? GetProjectInfoResponse : never>;
|
|
33
33
|
private updateConnectionState;
|
|
34
34
|
private scheduleReconnect;
|
|
35
35
|
private discoverServer;
|
|
@@ -52,6 +52,7 @@ declare class EditorClient implements EditorProtocol {
|
|
|
52
52
|
publish(params: PublishMessage): Promise<PublishResponse>;
|
|
53
53
|
saveImage(params: SaveImageMessage): Promise<SaveImageResponse>;
|
|
54
54
|
hasImage(params: HasImageMessage): Promise<HasImageResponse>;
|
|
55
|
+
getProjectInfo(params: GetProjectInfoMessage): Promise<GetProjectInfoResponse>;
|
|
55
56
|
send(params: EditorProtocolMessageTypes): Promise<EditorProtocolResponseTypes>;
|
|
56
57
|
getConnectionManager(): ConnectionManager;
|
|
57
58
|
}
|
package/dist/index.js
CHANGED
|
@@ -251,6 +251,9 @@ class EditorClient {
|
|
|
251
251
|
async hasImage(params) {
|
|
252
252
|
return this.connectionManager.sendMessage(params);
|
|
253
253
|
}
|
|
254
|
+
async getProjectInfo(params) {
|
|
255
|
+
return this.connectionManager.sendMessage(params);
|
|
256
|
+
}
|
|
254
257
|
async send(params) {
|
|
255
258
|
return this.connectionManager.sendMessage(params);
|
|
256
259
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/editor-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"test:watch": "vitest"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@jay-framework/editor-protocol": "^0.
|
|
27
|
+
"@jay-framework/editor-protocol": "^0.11.0",
|
|
28
28
|
"get-port": "^7.0.0",
|
|
29
29
|
"socket.io-client": "^4.7.4",
|
|
30
30
|
"uuid": "^9.0.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@jay-framework/dev-environment": "^0.
|
|
34
|
-
"@jay-framework/jay-cli": "^0.
|
|
33
|
+
"@jay-framework/dev-environment": "^0.11.0",
|
|
34
|
+
"@jay-framework/jay-cli": "^0.11.0",
|
|
35
35
|
"@types/node": "^22.15.21",
|
|
36
36
|
"@types/uuid": "^9.0.7",
|
|
37
37
|
"rimraf": "^5.0.5",
|