dreaction-protocol 1.0.1 → 1.0.3
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/asyncStorage.d.ts +37 -0
- package/lib/asyncStorage.d.ts.map +1 -0
- package/lib/asyncStorage.js +2 -0
- package/lib/command.d.ts +4 -2
- package/lib/command.d.ts.map +1 -1
- package/lib/customCommand.d.ts +12 -0
- package/lib/customCommand.d.ts.map +1 -0
- package/lib/customCommand.js +2 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/package.json +1 -1
- package/src/asyncStorage.ts +43 -0
- package/src/command.ts +4 -2
- package/src/customCommand.ts +12 -0
- package/src/index.ts +1 -0
- package/lib/reactotron-core-contract.d.ts +0 -6
- package/lib/reactotron-core-contract.d.ts.map +0 -1
- package/lib/reactotron-core-contract.js +0 -21
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type AsyncStorageMutationState = {
|
|
2
|
+
action: 'setItem';
|
|
3
|
+
data: {
|
|
4
|
+
key: string;
|
|
5
|
+
value: string;
|
|
6
|
+
};
|
|
7
|
+
} | {
|
|
8
|
+
action: 'removeItem';
|
|
9
|
+
data: {
|
|
10
|
+
key: string;
|
|
11
|
+
};
|
|
12
|
+
} | {
|
|
13
|
+
action: 'mergeItem';
|
|
14
|
+
data: {
|
|
15
|
+
key: string;
|
|
16
|
+
value: string;
|
|
17
|
+
};
|
|
18
|
+
} | {
|
|
19
|
+
action: 'clear';
|
|
20
|
+
data: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
action: 'multiSet';
|
|
23
|
+
data: {
|
|
24
|
+
pairs: any;
|
|
25
|
+
};
|
|
26
|
+
} | {
|
|
27
|
+
action: 'multiRemove';
|
|
28
|
+
data: {
|
|
29
|
+
keys: any;
|
|
30
|
+
};
|
|
31
|
+
} | {
|
|
32
|
+
action: 'multiMerge';
|
|
33
|
+
data: {
|
|
34
|
+
pairs: any;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=asyncStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asyncStorage.d.ts","sourceRoot":"","sources":["../src/asyncStorage.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yBAAyB,GACjC;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH,GACD;IACE,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH,GACD;IACE,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH,GACD;IACE,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG,CAAC;KACZ,CAAC;CACH,GACD;IACE,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,EAAE;QACJ,IAAI,EAAE,GAAG,CAAC;KACX,CAAC;CACH,GACD;IACE,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG,CAAC;KACZ,CAAC;CACH,CAAC"}
|
package/lib/command.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AsyncStorageMutationState } from './asyncStorage';
|
|
2
|
+
import { CustomCommandPayload } from './customCommand';
|
|
1
3
|
import { DataWatchPayload } from './data';
|
|
2
4
|
import type { LogPayload } from './log';
|
|
3
5
|
import { NetworkPayload } from './network';
|
|
@@ -38,7 +40,7 @@ export declare const CommandType: {
|
|
|
38
40
|
export type CommandTypeKey = (typeof CommandType)[keyof typeof CommandType];
|
|
39
41
|
export interface CommandMap {
|
|
40
42
|
[CommandType.ApiResponse]: NetworkPayload;
|
|
41
|
-
[CommandType.AsyncStorageMutation]:
|
|
43
|
+
[CommandType.AsyncStorageMutation]: AsyncStorageMutationState;
|
|
42
44
|
[CommandType.Benchmark]: any;
|
|
43
45
|
[CommandType.ClientIntro]: any;
|
|
44
46
|
[CommandType.Display]: any;
|
|
@@ -57,7 +59,7 @@ export interface CommandMap {
|
|
|
57
59
|
[CommandType.StateValuesSubscribe]: StateValuesSubscribePayload;
|
|
58
60
|
[CommandType.StateKeysRequest]: StateKeysRequestPayload;
|
|
59
61
|
[CommandType.StateValuesRequest]: StateValuesRequestPayload;
|
|
60
|
-
[CommandType.CustomCommandRegister]:
|
|
62
|
+
[CommandType.CustomCommandRegister]: CustomCommandPayload;
|
|
61
63
|
[CommandType.CustomCommandUnregister]: any;
|
|
62
64
|
[CommandType.Clear]: undefined;
|
|
63
65
|
[CommandType.ReplLsResponse]: 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,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCd,CAAC;AAEX,MA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C,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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface CustomCommandArg {
|
|
2
|
+
name: string;
|
|
3
|
+
type: 'string';
|
|
4
|
+
}
|
|
5
|
+
export interface CustomCommandPayload {
|
|
6
|
+
id: number;
|
|
7
|
+
command: string;
|
|
8
|
+
title: string | undefined;
|
|
9
|
+
description: string | undefined;
|
|
10
|
+
args: CustomCommandArg[] | undefined;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=customCommand.d.ts.map
|
|
@@ -0,0 +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,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,IAAI,EAAE,gBAAgB,EAAE,GAAG,SAAS,CAAC;CACtC"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./command"), exports);
|
|
18
|
+
__exportStar(require("./customCommand"), exports);
|
|
18
19
|
__exportStar(require("./log"), exports);
|
|
19
20
|
__exportStar(require("./data"), exports);
|
|
20
21
|
__exportStar(require("./openInEditor"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export type AsyncStorageMutationState =
|
|
2
|
+
| {
|
|
3
|
+
action: 'setItem';
|
|
4
|
+
data: {
|
|
5
|
+
key: string;
|
|
6
|
+
value: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
| {
|
|
10
|
+
action: 'removeItem';
|
|
11
|
+
data: {
|
|
12
|
+
key: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
| {
|
|
16
|
+
action: 'mergeItem';
|
|
17
|
+
data: {
|
|
18
|
+
key: string;
|
|
19
|
+
value: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
| {
|
|
23
|
+
action: 'clear';
|
|
24
|
+
data: undefined;
|
|
25
|
+
}
|
|
26
|
+
| {
|
|
27
|
+
action: 'multiSet';
|
|
28
|
+
data: {
|
|
29
|
+
pairs: any;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
| {
|
|
33
|
+
action: 'multiRemove';
|
|
34
|
+
data: {
|
|
35
|
+
keys: any;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
| {
|
|
39
|
+
action: 'multiMerge';
|
|
40
|
+
data: {
|
|
41
|
+
pairs: any;
|
|
42
|
+
};
|
|
43
|
+
};
|
package/src/command.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AsyncStorageMutationState } from './asyncStorage';
|
|
2
|
+
import { CustomCommandPayload } from './customCommand';
|
|
1
3
|
import { DataWatchPayload } from './data';
|
|
2
4
|
import type { LogPayload } from './log';
|
|
3
5
|
import { NetworkPayload } from './network';
|
|
@@ -54,7 +56,7 @@ export type CommandTypeKey = (typeof CommandType)[keyof typeof CommandType];
|
|
|
54
56
|
|
|
55
57
|
export interface CommandMap {
|
|
56
58
|
[CommandType.ApiResponse]: NetworkPayload;
|
|
57
|
-
[CommandType.AsyncStorageMutation]:
|
|
59
|
+
[CommandType.AsyncStorageMutation]: AsyncStorageMutationState;
|
|
58
60
|
[CommandType.Benchmark]: any;
|
|
59
61
|
[CommandType.ClientIntro]: any;
|
|
60
62
|
[CommandType.Display]: any;
|
|
@@ -73,7 +75,7 @@ export interface CommandMap {
|
|
|
73
75
|
[CommandType.StateValuesSubscribe]: StateValuesSubscribePayload;
|
|
74
76
|
[CommandType.StateKeysRequest]: StateKeysRequestPayload;
|
|
75
77
|
[CommandType.StateValuesRequest]: StateValuesRequestPayload;
|
|
76
|
-
[CommandType.CustomCommandRegister]:
|
|
78
|
+
[CommandType.CustomCommandRegister]: CustomCommandPayload;
|
|
77
79
|
[CommandType.CustomCommandUnregister]: any;
|
|
78
80
|
[CommandType.Clear]: undefined;
|
|
79
81
|
[CommandType.ReplLsResponse]: any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface CustomCommandArg {
|
|
2
|
+
name: string;
|
|
3
|
+
type: 'string';
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface CustomCommandPayload {
|
|
7
|
+
id: number;
|
|
8
|
+
command: string;
|
|
9
|
+
title: string | undefined;
|
|
10
|
+
description: string | undefined;
|
|
11
|
+
args: CustomCommandArg[] | undefined;
|
|
12
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reactotron-core-contract.d.ts","sourceRoot":"","sources":["../src/reactotron-core-contract.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
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("./command"), exports);
|
|
18
|
-
__exportStar(require("./log"), exports);
|
|
19
|
-
__exportStar(require("./openInEditor"), exports);
|
|
20
|
-
__exportStar(require("./server-events"), exports);
|
|
21
|
-
__exportStar(require("./state"), exports);
|