dreaction-protocol 1.0.3 → 1.0.5
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/command.d.ts +4 -2
- package/lib/command.d.ts.map +1 -1
- package/lib/command.js +1 -0
- package/lib/customCommand.d.ts +6 -1
- package/lib/customCommand.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/command.ts +7 -2
- package/src/customCommand.ts +7 -1
package/lib/command.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AsyncStorageMutationState } from './asyncStorage';
|
|
2
|
-
import {
|
|
2
|
+
import { CustomCommandRegisterPayload, CustomCommandResponsePayload } from './customCommand';
|
|
3
3
|
import { DataWatchPayload } from './data';
|
|
4
4
|
import type { LogPayload } from './log';
|
|
5
5
|
import { NetworkPayload } from './network';
|
|
@@ -28,6 +28,7 @@ export declare const CommandType: {
|
|
|
28
28
|
readonly StateValuesRequest: "state.values.request";
|
|
29
29
|
readonly CustomCommandRegister: "customCommand.register";
|
|
30
30
|
readonly CustomCommandUnregister: "customCommand.unregister";
|
|
31
|
+
readonly CustomCommandResponse: "customCommand.response";
|
|
31
32
|
readonly Clear: "clear";
|
|
32
33
|
readonly ReplLsResponse: "repl.ls.response";
|
|
33
34
|
readonly ReplExecuteResponse: "repl.execute.response";
|
|
@@ -59,8 +60,9 @@ export interface CommandMap {
|
|
|
59
60
|
[CommandType.StateValuesSubscribe]: StateValuesSubscribePayload;
|
|
60
61
|
[CommandType.StateKeysRequest]: StateKeysRequestPayload;
|
|
61
62
|
[CommandType.StateValuesRequest]: StateValuesRequestPayload;
|
|
62
|
-
[CommandType.CustomCommandRegister]:
|
|
63
|
+
[CommandType.CustomCommandRegister]: CustomCommandRegisterPayload;
|
|
63
64
|
[CommandType.CustomCommandUnregister]: any;
|
|
65
|
+
[CommandType.CustomCommandResponse]: CustomCommandResponsePayload;
|
|
64
66
|
[CommandType.Clear]: undefined;
|
|
65
67
|
[CommandType.ReplLsResponse]: any;
|
|
66
68
|
[CommandType.ReplExecuteResponse]: any;
|
package/lib/command.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCd,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAE5E,MAAM,WAAW,UAAU;IACzB,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,cAAc,CAAC;IAC1C,CAAC,WAAW,CAAC,oBAAoB,CAAC,EAAE,yBAAyB,CAAC;IAC9D,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC;IAC7B,CAAC,WAAW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cAAc,CAAC,EAAE,GAAG,CAAC;IAClC,CAAC,WAAW,CAAC,mBAAmB,CAAC,EAAE,GAAG,CAAC;IACvC,CAAC,WAAW,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC;IACtC,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC;IACxC,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC5C,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IACjC,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,MAAM,OAAO,GAAG;KACnB,IAAI,IAAI,MAAM,UAAU,GAAG;QAC1B,IAAI,EAAE,IAAI,CAAC;QACX,YAAY,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,IAAI,CAAC;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,OAAO,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;KAC3B;CACF,CAAC,MAAM,UAAU,CAAC,CAAC;AAEpB,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC"}
|
package/lib/command.js
CHANGED
|
@@ -24,6 +24,7 @@ exports.CommandType = {
|
|
|
24
24
|
StateValuesRequest: 'state.values.request',
|
|
25
25
|
CustomCommandRegister: 'customCommand.register',
|
|
26
26
|
CustomCommandUnregister: 'customCommand.unregister',
|
|
27
|
+
CustomCommandResponse: 'customCommand.response',
|
|
27
28
|
Clear: 'clear',
|
|
28
29
|
ReplLsResponse: 'repl.ls.response',
|
|
29
30
|
ReplExecuteResponse: 'repl.execute.response',
|
package/lib/customCommand.d.ts
CHANGED
|
@@ -2,11 +2,16 @@ export interface CustomCommandArg {
|
|
|
2
2
|
name: string;
|
|
3
3
|
type: 'string';
|
|
4
4
|
}
|
|
5
|
-
export interface
|
|
5
|
+
export interface CustomCommandRegisterPayload {
|
|
6
6
|
id: number;
|
|
7
7
|
command: string;
|
|
8
8
|
title: string | undefined;
|
|
9
9
|
description: string | undefined;
|
|
10
|
+
responseViewType?: 'auto' | 'table';
|
|
10
11
|
args: CustomCommandArg[] | undefined;
|
|
11
12
|
}
|
|
13
|
+
export interface CustomCommandResponsePayload {
|
|
14
|
+
command: string;
|
|
15
|
+
payload: any;
|
|
16
|
+
}
|
|
12
17
|
//# sourceMappingURL=customCommand.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customCommand.d.ts","sourceRoot":"","sources":["../src/customCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"customCommand.d.ts","sourceRoot":"","sources":["../src/customCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC,IAAI,EAAE,gBAAgB,EAAE,GAAG,SAAS,CAAC;CACtC;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,GAAG,CAAC;CACd"}
|
package/package.json
CHANGED
package/src/command.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { AsyncStorageMutationState } from './asyncStorage';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
CustomCommandRegisterPayload,
|
|
4
|
+
CustomCommandResponsePayload,
|
|
5
|
+
} from './customCommand';
|
|
3
6
|
import { DataWatchPayload } from './data';
|
|
4
7
|
import type { LogPayload } from './log';
|
|
5
8
|
import { NetworkPayload } from './network';
|
|
@@ -41,6 +44,7 @@ export const CommandType = {
|
|
|
41
44
|
StateValuesRequest: 'state.values.request',
|
|
42
45
|
CustomCommandRegister: 'customCommand.register',
|
|
43
46
|
CustomCommandUnregister: 'customCommand.unregister',
|
|
47
|
+
CustomCommandResponse: 'customCommand.response',
|
|
44
48
|
Clear: 'clear',
|
|
45
49
|
ReplLsResponse: 'repl.ls.response',
|
|
46
50
|
ReplExecuteResponse: 'repl.execute.response',
|
|
@@ -75,8 +79,9 @@ export interface CommandMap {
|
|
|
75
79
|
[CommandType.StateValuesSubscribe]: StateValuesSubscribePayload;
|
|
76
80
|
[CommandType.StateKeysRequest]: StateKeysRequestPayload;
|
|
77
81
|
[CommandType.StateValuesRequest]: StateValuesRequestPayload;
|
|
78
|
-
[CommandType.CustomCommandRegister]:
|
|
82
|
+
[CommandType.CustomCommandRegister]: CustomCommandRegisterPayload;
|
|
79
83
|
[CommandType.CustomCommandUnregister]: any;
|
|
84
|
+
[CommandType.CustomCommandResponse]: CustomCommandResponsePayload;
|
|
80
85
|
[CommandType.Clear]: undefined;
|
|
81
86
|
[CommandType.ReplLsResponse]: any;
|
|
82
87
|
[CommandType.ReplExecuteResponse]: any;
|
package/src/customCommand.ts
CHANGED
|
@@ -3,10 +3,16 @@ export interface CustomCommandArg {
|
|
|
3
3
|
type: 'string';
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
export interface
|
|
6
|
+
export interface CustomCommandRegisterPayload {
|
|
7
7
|
id: number;
|
|
8
8
|
command: string;
|
|
9
9
|
title: string | undefined;
|
|
10
10
|
description: string | undefined;
|
|
11
|
+
responseViewType?: 'auto' | 'table';
|
|
11
12
|
args: CustomCommandArg[] | undefined;
|
|
12
13
|
}
|
|
14
|
+
|
|
15
|
+
export interface CustomCommandResponsePayload {
|
|
16
|
+
command: string;
|
|
17
|
+
payload: any;
|
|
18
|
+
}
|