@ray-js/t-agent 0.2.7 → 0.2.8-beta.10
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/README-zh_CN.md +336 -95
- package/README.md +916 -706
- package/dist/chat/ChatBubbleTile.d.ts +2 -2
- package/dist/chat/ChatMessage.js +7 -5
- package/dist/chat/ChatSession.d.ts +2 -2
- package/dist/chat/ChatSession.js +0 -5
- package/dist/chat/deepmerge.d.ts +27 -0
- package/dist/chat/deepmerge.js +141 -0
- package/dist/chat/index.d.ts +1 -0
- package/dist/chat/index.js +3 -1
- package/dist/chat/json.js +6 -1
- package/dist/chat/types.js +2 -0
- package/dist/chat/utils.d.ts +0 -1
- package/dist/chat/utils.js +0 -24
- package/dist/index.js +1 -0
- package/dist/plugins/ui.d.ts +2 -2
- package/package.json +5 -3
|
@@ -29,7 +29,7 @@ export default class ChatBubbleTile extends ChatTile<BubbleTileData> {
|
|
|
29
29
|
id: string;
|
|
30
30
|
type: string;
|
|
31
31
|
locked: boolean;
|
|
32
|
-
children: import("./types").ChatTileObject
|
|
33
|
-
fallback?: import("./types").TipTileData
|
|
32
|
+
children: import("./types").ChatTileObject[];
|
|
33
|
+
fallback?: import("./types").TipTileData;
|
|
34
34
|
};
|
|
35
35
|
}
|
package/dist/chat/ChatMessage.js
CHANGED
|
@@ -8,7 +8,8 @@ import "core-js/modules/web.dom-collections.iterator.js";
|
|
|
8
8
|
import { ChatMessageStatus } from './types';
|
|
9
9
|
import ChatTile from './ChatTile';
|
|
10
10
|
import ChatBubbleTile from './ChatBubbleTile';
|
|
11
|
-
import { deepCloneToPlainObject,
|
|
11
|
+
import { deepCloneToPlainObject, generateId } from './utils';
|
|
12
|
+
import { deepmerge } from './deepmerge';
|
|
12
13
|
import { getLogger } from './Logger';
|
|
13
14
|
export const logger = getLogger('TAgent/ChatAgent');
|
|
14
15
|
export default class ChatMessage {
|
|
@@ -65,7 +66,7 @@ export default class ChatMessage {
|
|
|
65
66
|
show() {
|
|
66
67
|
return this.agent.runWithCatchError(async () => {
|
|
67
68
|
if (this._isShow) {
|
|
68
|
-
|
|
69
|
+
logger.warn('message is already show');
|
|
69
70
|
return;
|
|
70
71
|
}
|
|
71
72
|
await this.agent.hooks.callHook('onMessageChange:before', 'show', this);
|
|
@@ -78,7 +79,7 @@ export default class ChatMessage {
|
|
|
78
79
|
update() {
|
|
79
80
|
return this.agent.runWithCatchError(async () => {
|
|
80
81
|
if (!this._isShow) {
|
|
81
|
-
|
|
82
|
+
logger.warn('message is not show');
|
|
82
83
|
return;
|
|
83
84
|
}
|
|
84
85
|
await this.agent.hooks.callHook('onMessageChange:before', 'update', this);
|
|
@@ -93,12 +94,13 @@ export default class ChatMessage {
|
|
|
93
94
|
remove() {
|
|
94
95
|
return this.agent.runWithCatchError(async () => {
|
|
95
96
|
if (!this._isShow) {
|
|
96
|
-
|
|
97
|
+
logger.warn('message is not show');
|
|
97
98
|
return;
|
|
98
99
|
}
|
|
99
100
|
await this.agent.hooks.callHook('onMessageChange:before', 'remove', this);
|
|
100
101
|
await this.agent.hooks.callHook('onMessageChange', 'remove', this);
|
|
101
102
|
this.agent.session.unbindMessage(this);
|
|
103
|
+
this._isShow = false;
|
|
102
104
|
await this.agent.hooks.callHook('onMessageChange:after', 'remove', this);
|
|
103
105
|
});
|
|
104
106
|
}
|
|
@@ -146,7 +148,7 @@ export default class ChatMessage {
|
|
|
146
148
|
if (override) {
|
|
147
149
|
this.meta = meta;
|
|
148
150
|
} else {
|
|
149
|
-
this.meta =
|
|
151
|
+
this.meta = deepmerge(this.meta, meta);
|
|
150
152
|
}
|
|
151
153
|
return this;
|
|
152
154
|
}
|
|
@@ -14,7 +14,7 @@ export default class ChatSession {
|
|
|
14
14
|
constructor(agent: ChatAgent);
|
|
15
15
|
initValue: (key: string, value: any) => void;
|
|
16
16
|
set: (key: string, value: any) => Promise<void>;
|
|
17
|
-
get: <T = any>(key: string, defaultValue?: T
|
|
17
|
+
get: <T = any>(key: string, defaultValue?: T) => T;
|
|
18
18
|
getData: () => Record<string, any>;
|
|
19
19
|
initMessages: (messages: ChatMessage[]) => void;
|
|
20
20
|
getTileById: (id: string) => ChatTile<any> | undefined;
|
|
@@ -22,7 +22,7 @@ export default class ChatSession {
|
|
|
22
22
|
unbindTile: (tile: ChatTile) => void;
|
|
23
23
|
bindMessage: (message: ChatMessage) => void;
|
|
24
24
|
unbindMessage: (message: ChatMessage) => void;
|
|
25
|
-
onChange: (fn: ChatSessionHooks[
|
|
25
|
+
onChange: (fn: ChatSessionHooks["onChange"]) => () => void;
|
|
26
26
|
getLatestMessage: () => ChatMessage | undefined;
|
|
27
27
|
dispose: () => Promise<void>;
|
|
28
28
|
}
|
package/dist/chat/ChatSession.js
CHANGED
|
@@ -100,10 +100,5 @@ export default class ChatSession {
|
|
|
100
100
|
});
|
|
101
101
|
this.agent = agent;
|
|
102
102
|
this.hooks = createHooks();
|
|
103
|
-
const hooks = ['onChange'];
|
|
104
|
-
for (let i = 0; i < hooks.length; i++) {
|
|
105
|
-
const hook = hooks[i];
|
|
106
|
-
this[hook] = fn => this.hooks.hook(hook, fn);
|
|
107
|
-
}
|
|
108
103
|
}
|
|
109
104
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type PlainObject = Record<string, unknown>;
|
|
2
|
+
type PropertyKeyLike = string | symbol;
|
|
3
|
+
type KeyGetter = (value: PlainObject) => PropertyKeyLike[];
|
|
4
|
+
type IsMergeableObject = (value: unknown) => boolean;
|
|
5
|
+
type CloneFn = <T>(value: T) => T;
|
|
6
|
+
type DeepMergePairFn = <T, U>(target: T, source: U) => any;
|
|
7
|
+
type DeepMergeFn = (...args: any[]) => any;
|
|
8
|
+
type MergeArrayFn = (target: any[], source: any[]) => any[];
|
|
9
|
+
type CloneProtoObjectFn = <T extends PlainObject>(target: T) => T;
|
|
10
|
+
interface MergeArrayUtils {
|
|
11
|
+
clone: CloneFn;
|
|
12
|
+
deepmerge: DeepMergePairFn;
|
|
13
|
+
getKeys: KeyGetter;
|
|
14
|
+
isMergeableObject: IsMergeableObject;
|
|
15
|
+
}
|
|
16
|
+
interface DeepMergeOptions {
|
|
17
|
+
all?: boolean;
|
|
18
|
+
symbols?: boolean;
|
|
19
|
+
onlyDefinedProperties?: boolean;
|
|
20
|
+
cloneProtoObject?: CloneProtoObjectFn;
|
|
21
|
+
isMergeableObject?: IsMergeableObject;
|
|
22
|
+
mergeArray?: (utils: MergeArrayUtils) => MergeArrayFn;
|
|
23
|
+
}
|
|
24
|
+
declare function defaultIsMergeableObjectFactory(): IsMergeableObject;
|
|
25
|
+
export declare function deepmergeConstructor(options?: DeepMergeOptions): DeepMergeFn;
|
|
26
|
+
export declare const deepmerge: DeepMergeFn;
|
|
27
|
+
export { defaultIsMergeableObjectFactory as isMergeableObject };
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import "core-js/modules/es.regexp.constructor.js";
|
|
2
|
+
import "core-js/modules/es.regexp.dot-all.js";
|
|
3
|
+
import "core-js/modules/es.regexp.exec.js";
|
|
4
|
+
const JSON_PROTO = Object.getPrototypeOf({});
|
|
5
|
+
function defaultIsMergeableObjectFactory() {
|
|
6
|
+
return function (value) {
|
|
7
|
+
return typeof value === 'object' && value !== null && !(value instanceof RegExp) && !(value instanceof Date);
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export function deepmergeConstructor(options) {
|
|
11
|
+
function isNotPrototypeKey(value) {
|
|
12
|
+
return value !== 'constructor' && value !== 'prototype' && value !== '__proto__';
|
|
13
|
+
}
|
|
14
|
+
function cloneArray(value) {
|
|
15
|
+
let i = 0;
|
|
16
|
+
const il = value.length;
|
|
17
|
+
const result = new Array(il);
|
|
18
|
+
for (i; i < il; ++i) {
|
|
19
|
+
result[i] = clone(value[i]);
|
|
20
|
+
}
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
function cloneObject(target) {
|
|
24
|
+
const result = {};
|
|
25
|
+
if (cloneProtoObject && Object.getPrototypeOf(target) !== JSON_PROTO) {
|
|
26
|
+
return cloneProtoObject(target);
|
|
27
|
+
}
|
|
28
|
+
const targetKeys = getKeys(target);
|
|
29
|
+
let i;
|
|
30
|
+
let il;
|
|
31
|
+
let key;
|
|
32
|
+
for (i = 0, il = targetKeys.length; i < il; ++i) {
|
|
33
|
+
isNotPrototypeKey(key = targetKeys[i]) && (result[key] = clone(target[key]));
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
const propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
38
|
+
const getKeys = options !== null && options !== void 0 && options.symbols ? function (value) {
|
|
39
|
+
const result = Object.keys(value);
|
|
40
|
+
const keys = Object.getOwnPropertySymbols(value);
|
|
41
|
+
for (let i = 0, il = keys.length; i < il; ++i) {
|
|
42
|
+
propertyIsEnumerable.call(value, keys[i]) && result.push(keys[i]);
|
|
43
|
+
}
|
|
44
|
+
return result;
|
|
45
|
+
} : value => Object.keys(value);
|
|
46
|
+
const cloneProtoObject = typeof (options === null || options === void 0 ? void 0 : options.cloneProtoObject) === 'function' ? options.cloneProtoObject : undefined;
|
|
47
|
+
const isMergeableObject = typeof (options === null || options === void 0 ? void 0 : options.isMergeableObject) === 'function' ? options.isMergeableObject : defaultIsMergeableObjectFactory();
|
|
48
|
+
const onlyDefinedProperties = (options === null || options === void 0 ? void 0 : options.onlyDefinedProperties) === true;
|
|
49
|
+
function isPrimitive(value) {
|
|
50
|
+
return typeof value !== 'object' || value === null;
|
|
51
|
+
}
|
|
52
|
+
const mergeArray = options && typeof options.mergeArray === 'function' ? options.mergeArray({
|
|
53
|
+
clone,
|
|
54
|
+
deepmerge: _deepmerge,
|
|
55
|
+
getKeys,
|
|
56
|
+
isMergeableObject
|
|
57
|
+
}) : function (target, source) {
|
|
58
|
+
const tl = target.length;
|
|
59
|
+
const sl = source.length;
|
|
60
|
+
let i = 0;
|
|
61
|
+
const result = new Array(tl + sl);
|
|
62
|
+
for (i; i < tl; ++i) {
|
|
63
|
+
result[i] = clone(target[i]);
|
|
64
|
+
}
|
|
65
|
+
for (i = 0; i < sl; ++i) {
|
|
66
|
+
result[i + tl] = clone(source[i]);
|
|
67
|
+
}
|
|
68
|
+
return result;
|
|
69
|
+
};
|
|
70
|
+
function clone(entry) {
|
|
71
|
+
return isMergeableObject(entry) ? Array.isArray(entry) ? cloneArray(entry) : cloneObject(entry) : entry;
|
|
72
|
+
}
|
|
73
|
+
function mergeObject(target, source) {
|
|
74
|
+
const result = {};
|
|
75
|
+
const targetKeys = getKeys(target);
|
|
76
|
+
const sourceKeys = getKeys(source);
|
|
77
|
+
let i;
|
|
78
|
+
let il;
|
|
79
|
+
let key;
|
|
80
|
+
for (i = 0, il = targetKeys.length; i < il; ++i) {
|
|
81
|
+
isNotPrototypeKey(key = targetKeys[i]) && sourceKeys.indexOf(key) === -1 && (result[key] = clone(target[key]));
|
|
82
|
+
}
|
|
83
|
+
for (i = 0, il = sourceKeys.length; i < il; ++i) {
|
|
84
|
+
if (!isNotPrototypeKey(key = sourceKeys[i])) {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
if (key in target) {
|
|
88
|
+
if (targetKeys.indexOf(key) !== -1) {
|
|
89
|
+
if (cloneProtoObject && isMergeableObject(source[key]) && Object.getPrototypeOf(source[key]) !== JSON_PROTO) {
|
|
90
|
+
result[key] = cloneProtoObject(source[key]);
|
|
91
|
+
} else {
|
|
92
|
+
result[key] = _deepmerge(target[key], source[key]);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
} else {
|
|
96
|
+
if (onlyDefinedProperties && typeof source[key] === 'undefined') {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
result[key] = clone(source[key]);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return result;
|
|
103
|
+
}
|
|
104
|
+
function _deepmerge(target, source) {
|
|
105
|
+
if (onlyDefinedProperties && typeof source === 'undefined') {
|
|
106
|
+
return clone(target);
|
|
107
|
+
}
|
|
108
|
+
const sourceIsArray = Array.isArray(source);
|
|
109
|
+
const targetIsArray = Array.isArray(target);
|
|
110
|
+
if (isPrimitive(source)) {
|
|
111
|
+
return source;
|
|
112
|
+
}
|
|
113
|
+
if (!isMergeableObject(target)) {
|
|
114
|
+
return clone(source);
|
|
115
|
+
}
|
|
116
|
+
if (sourceIsArray && targetIsArray) {
|
|
117
|
+
return mergeArray(target, source);
|
|
118
|
+
}
|
|
119
|
+
if (sourceIsArray !== targetIsArray) {
|
|
120
|
+
return clone(source);
|
|
121
|
+
}
|
|
122
|
+
return mergeObject(target, source);
|
|
123
|
+
}
|
|
124
|
+
return options !== null && options !== void 0 && options.all ? function () {
|
|
125
|
+
switch (arguments.length) {
|
|
126
|
+
case 0:
|
|
127
|
+
return {};
|
|
128
|
+
case 1:
|
|
129
|
+
return clone(arguments.length <= 0 ? undefined : arguments[0]);
|
|
130
|
+
case 2:
|
|
131
|
+
return _deepmerge(arguments.length <= 0 ? undefined : arguments[0], arguments.length <= 1 ? undefined : arguments[1]);
|
|
132
|
+
}
|
|
133
|
+
let result = {};
|
|
134
|
+
for (let i = 0, il = arguments.length; i < il; ++i) {
|
|
135
|
+
result = _deepmerge(result, i < 0 || arguments.length <= i ? undefined : arguments[i]);
|
|
136
|
+
}
|
|
137
|
+
return result;
|
|
138
|
+
} : _deepmerge;
|
|
139
|
+
}
|
|
140
|
+
export const deepmerge = deepmergeConstructor();
|
|
141
|
+
export { defaultIsMergeableObjectFactory as isMergeableObject };
|
package/dist/chat/index.d.ts
CHANGED
package/dist/chat/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* istanbul ignore file */
|
|
1
2
|
import ChatAgent from './ChatAgent';
|
|
2
3
|
import ChatSession from './ChatSession';
|
|
3
4
|
import StreamResponse from './StreamResponse';
|
|
@@ -11,4 +12,5 @@ export { createHooks, Hookable } from 'hookable';
|
|
|
11
12
|
export { ChatAgent, ChatSession, StreamResponse, ChatTile, ChatBubbleTile, ChatMessage, generateId, getLogger, Logger, Emitter, EmitterEvent, isAbortError, shuffleWithSeed };
|
|
12
13
|
export * from './createChatAgent';
|
|
13
14
|
export * from './types';
|
|
14
|
-
export * from './json';
|
|
15
|
+
export * from './json';
|
|
16
|
+
export * from './deepmerge';
|
package/dist/chat/json.js
CHANGED
|
@@ -297,6 +297,7 @@ function strip(tokens) {
|
|
|
297
297
|
// Dangling key
|
|
298
298
|
// Check "aggressive" strip for empty objects logic from original
|
|
299
299
|
const n = types.length;
|
|
300
|
+
/* istanbul ignore else -- n<2 is structurally unreachable: a dangling IsKey string always has at least a preceding '{' token */
|
|
300
301
|
if (n >= 2) {
|
|
301
302
|
const t2Type = types[n - 2];
|
|
302
303
|
const t2Val = values[n - 2];
|
|
@@ -309,6 +310,8 @@ function strip(tokens) {
|
|
|
309
310
|
continue;
|
|
310
311
|
}
|
|
311
312
|
}
|
|
313
|
+
|
|
314
|
+
/* istanbul ignore next: defensive branch for malformed token sequences */
|
|
312
315
|
if (t2Type === TokenType.Paren && t2Val === '[') {
|
|
313
316
|
if (n >= 3 && types[n - 3] === TokenType.Delimiter) {
|
|
314
317
|
// , [ "key" -> pop 3
|
|
@@ -345,6 +348,7 @@ function strip(tokens) {
|
|
|
345
348
|
}
|
|
346
349
|
if (t === TokenType.Paren) {
|
|
347
350
|
if (v === '[') {
|
|
351
|
+
/* istanbul ignore next: defensive branch for malformed token sequences */
|
|
348
352
|
if (types.length >= 2 && types[types.length - 2] === TokenType.Delimiter) {
|
|
349
353
|
types.length -= 2;
|
|
350
354
|
values.length -= 2;
|
|
@@ -372,6 +376,7 @@ function unstrip(tokens) {
|
|
|
372
376
|
const t = types[i];
|
|
373
377
|
const v = values[i];
|
|
374
378
|
if (t === TokenType.Brace) {
|
|
379
|
+
/* istanbul ignore else -- tokenizer only emits '{' or '}' for Brace tokens */
|
|
375
380
|
if (v === '{') {
|
|
376
381
|
stack.push('}');
|
|
377
382
|
} else if (v === '}') {
|
|
@@ -380,6 +385,7 @@ function unstrip(tokens) {
|
|
|
380
385
|
stack.pop();
|
|
381
386
|
}
|
|
382
387
|
} else if (t === TokenType.Paren) {
|
|
388
|
+
/* istanbul ignore else -- tokenizer only emits '[' or ']' for Paren tokens */
|
|
383
389
|
if (v === '[') {
|
|
384
390
|
stack.push(']');
|
|
385
391
|
} else if (v === ']') {
|
|
@@ -442,7 +448,6 @@ function generate(tokens) {
|
|
|
442
448
|
|
|
443
449
|
/** * Best-effort partial JSON parser: tries to complete dangling structures * and then JSON.parse */
|
|
444
450
|
function stripCodeFence(input) {
|
|
445
|
-
if (typeof input !== 'string') return input;
|
|
446
451
|
const trimmed = input.trim();
|
|
447
452
|
|
|
448
453
|
// 只处理以 ``` 或 ~~~ 开头的
|
package/dist/chat/types.js
CHANGED
package/dist/chat/utils.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare function generateId(length?: number): string;
|
|
2
2
|
export declare function deepCloneToPlainObject(obj: any, visited?: WeakMap<object, any>): any;
|
|
3
|
-
export declare function deepMerge(target: any, source: any): any;
|
|
4
3
|
export declare function isAbortError(reason: any): any;
|
|
5
4
|
export declare function shuffleWithSeed<T>(array: T[], seed: string): T[];
|
package/dist/chat/utils.js
CHANGED
|
@@ -21,7 +21,6 @@ export function deepCloneToPlainObject(obj) {
|
|
|
21
21
|
|
|
22
22
|
// 如果是基本类型(数字、字符串、布尔等),直接返回自身;函数在 JSON 中会被忽略
|
|
23
23
|
if (typeof obj !== 'object') return obj;
|
|
24
|
-
if (typeof obj === 'function') return undefined;
|
|
25
24
|
|
|
26
25
|
// 如果对象已被处理过,直接返回缓存结果,防止循环引用
|
|
27
26
|
if (visited.has(obj)) return visited.get(obj);
|
|
@@ -86,29 +85,6 @@ export function deepCloneToPlainObject(obj) {
|
|
|
86
85
|
}
|
|
87
86
|
return clonedObj;
|
|
88
87
|
}
|
|
89
|
-
export function deepMerge(target, source) {
|
|
90
|
-
if (typeof target !== 'object' || target === null) {
|
|
91
|
-
return source; // 如果目标不是对象,直接返回来源
|
|
92
|
-
}
|
|
93
|
-
if (typeof source !== 'object' || source === null) {
|
|
94
|
-
return target; // 如果来源不是对象,返回目标
|
|
95
|
-
}
|
|
96
|
-
for (const key in source) {
|
|
97
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
98
|
-
const sourceValue = source[key];
|
|
99
|
-
const targetValue = target[key];
|
|
100
|
-
|
|
101
|
-
// 如果是对象,递归合并
|
|
102
|
-
if (typeof sourceValue === 'object' && sourceValue !== null) {
|
|
103
|
-
target[key] = deepMerge(Array.isArray(targetValue) ? [] : targetValue || {}, sourceValue);
|
|
104
|
-
} else {
|
|
105
|
-
// 否则直接赋值
|
|
106
|
-
target[key] = sourceValue;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return target;
|
|
111
|
-
}
|
|
112
88
|
export function isAbortError(reason) {
|
|
113
89
|
return reason && typeof Error !== 'undefined' && reason instanceof Error && reason.name === 'AbortError';
|
|
114
90
|
}
|
package/dist/index.js
CHANGED
package/dist/plugins/ui.d.ts
CHANGED
|
@@ -46,9 +46,9 @@ export declare function withUI(): (agent: ChatAgent) => {
|
|
|
46
46
|
hooks: import("hookable").Hookable<UIHooks, string>;
|
|
47
47
|
ui: {
|
|
48
48
|
callHook: <K extends keyof UIHooks>(hookName: K, payload: UIHooks[K] extends (context: UIHooksContext<infer P, any>) => void ? P : never) => Promise<UIHooks[K] extends (context: UIHooksContext<any, infer R>) => void ? R : null>;
|
|
49
|
-
hook: <
|
|
49
|
+
hook: <K extends keyof UIHooks>(hookName: K, fn: UIHooks[K]) => () => void;
|
|
50
50
|
emitter: Emitter;
|
|
51
51
|
emitEvent: <T extends keyof UIEventMap>(eventName: T, detail: UIEventMap[T]) => void;
|
|
52
|
-
onEvent: <
|
|
52
|
+
onEvent: <T extends keyof UIEventMap>(eventName: T, handler: (detail: UIEventMap[T]) => void) => () => void;
|
|
53
53
|
};
|
|
54
54
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/t-agent",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8-beta.10",
|
|
4
4
|
"author": "Tuya.inc",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
"scripts": {
|
|
25
25
|
"dev": "ray start --type=component --output dist --emit-declaration-dev",
|
|
26
26
|
"build": "ray build --type=component --output dist",
|
|
27
|
-
"clean": "rimraf ./dist"
|
|
27
|
+
"clean": "rimraf ./dist",
|
|
28
|
+
"test": "jest --runInBand",
|
|
29
|
+
"test:coverage": "jest --runInBand --coverage"
|
|
28
30
|
},
|
|
29
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "dd4eae72b02ce8eb7bf75c5aab56aaca0412ea47"
|
|
30
32
|
}
|