@autobe/ui 0.29.2 → 0.30.0-dev.20260315
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/LICENSE +661 -661
- package/README.md +261 -0
- package/lib/components/AutoBeChatMain.js +5 -5
- package/lib/components/AutoBeChatMain.js.map +1 -1
- package/lib/components/AutoBeConfigModal.js +9 -9
- package/lib/components/AutoBeStatusModal.js +4 -4
- package/lib/components/AutoBeStatusModal.js.map +1 -1
- package/lib/components/AutoBeUserMessageMovie.d.ts +2 -2
- package/lib/components/common/ChatBubble.d.ts +2 -2
- package/lib/components/common/openai/OpenAIContent.d.ts +2 -2
- package/lib/components/common/openai/OpenAIContent.js.map +1 -1
- package/lib/components/common/openai/OpenAIUserAudioContent.js +1 -1
- package/lib/components/common/openai/OpenAIUserAudioContent.js.map +1 -1
- package/lib/components/common/openai/OpenAIUserFileContent.js +1 -1
- package/lib/components/common/openai/OpenAIUserFileContent.js.map +1 -1
- package/lib/components/common/openai/OpenAIUserImageContent.d.ts +2 -2
- package/lib/components/events/AutoBeCompleteEventMovie.d.ts +2 -2
- package/lib/components/events/AutoBeCompleteEventMovie.js +5 -5
- package/lib/components/events/AutoBeCompleteEventMovie.js.map +1 -1
- package/lib/components/events/AutoBeCorrectEventMovie.d.ts +2 -2
- package/lib/components/events/AutoBeCorrectEventMovie.js +4 -4
- package/lib/components/events/AutoBeCorrectEventMovie.js.map +1 -1
- package/lib/components/events/AutoBeEventMovie.js +38 -17
- package/lib/components/events/AutoBeEventMovie.js.map +1 -1
- package/lib/components/events/AutoBeProgressEventMovie.js +73 -13
- package/lib/components/events/AutoBeProgressEventMovie.js.map +1 -1
- package/lib/components/events/AutoBeScenarioEventMovie.d.ts +2 -2
- package/lib/components/events/AutoBeScenarioEventMovie.js +18 -5
- package/lib/components/events/AutoBeScenarioEventMovie.js.map +1 -1
- package/lib/components/events/AutoBeStartEventMovie.d.ts +2 -2
- package/lib/components/events/AutoBeStartEventMovie.js +2 -2
- package/lib/components/events/AutoBeStartEventMovie.js.map +1 -1
- package/lib/components/events/AutoBeValidateEventMovie.d.ts +2 -2
- package/lib/components/events/AutoBeValidateEventMovie.js +3 -11
- package/lib/components/events/AutoBeValidateEventMovie.js.map +1 -1
- package/lib/components/events/groups/CorrectEventGroup.d.ts +2 -2
- package/lib/components/events/groups/CorrectEventGroup.js +1 -1
- package/lib/components/events/groups/CorrectEventGroup.js.map +1 -1
- package/lib/components/events/groups/ValidateEventGroup.d.ts +2 -2
- package/lib/components/events/groups/ValidateEventGroup.js +1 -2
- package/lib/components/events/groups/ValidateEventGroup.js.map +1 -1
- package/lib/components/events/utils/eventGrouper.js +1 -2
- package/lib/components/events/utils/eventGrouper.js.map +1 -1
- package/lib/components/upload/AutoBeChatUploadBox.d.ts +3 -4
- package/lib/components/upload/AutoBeChatUploadBox.js +2 -1
- package/lib/components/upload/AutoBeChatUploadBox.js.map +1 -1
- package/lib/components/upload/AutoBeChatUploadSendButton.js +1 -1
- package/lib/components/upload/AutoBeChatUploadSendButton.js.map +1 -1
- package/lib/context/AutoBeAgentContext.d.ts +1 -3
- package/lib/context/AutoBeAgentContext.js +0 -4
- package/lib/context/AutoBeAgentContext.js.map +1 -1
- package/lib/hooks/useSessionStorage.d.ts +4 -0
- package/lib/hooks/useSessionStorage.js +16 -0
- package/lib/hooks/useSessionStorage.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/strategy/AutoBeAgentSessionStorageStrategy.d.ts +10 -0
- package/lib/strategy/AutoBeAgentSessionStorageStrategy.js +117 -0
- package/lib/strategy/AutoBeAgentSessionStorageStrategy.js.map +1 -0
- package/lib/structure/AutoBeListener.js +91 -23
- package/lib/structure/AutoBeListener.js.map +1 -1
- package/lib/structure/AutoBeListenerState.d.ts +3 -3
- package/lib/structure/AutoBeListenerState.js +4 -4
- package/lib/structure/AutoBeListenerState.js.map +1 -1
- package/lib/structure/IAutoBeAgentSessionStorageStrategy.js +1 -1
- package/lib/structure/IAutoBeAgentSessionStorageStrategy.js.map +1 -1
- package/lib/utils/AutoBeFileUploader.d.ts +2 -2
- package/lib/utils/AutoBeFileUploader.js.map +1 -1
- package/package.json +3 -4
- package/src/components/AutoBeAssistantMessageMovie.tsx +22 -22
- package/src/components/AutoBeChatMain.tsx +376 -376
- package/src/components/AutoBeChatSidebar.tsx +414 -414
- package/src/components/AutoBeConfigButton.tsx +83 -83
- package/src/components/AutoBeConfigModal.tsx +443 -443
- package/src/components/AutoBeStatusButton.tsx +75 -75
- package/src/components/AutoBeStatusModal.tsx +486 -484
- package/src/components/AutoBeUserMessageMovie.tsx +27 -27
- package/src/components/common/ActionButton.tsx +205 -205
- package/src/components/common/ActionButtonGroup.tsx +80 -80
- package/src/components/common/AutoBeConfigInput.tsx +185 -185
- package/src/components/common/ChatBubble.tsx +119 -119
- package/src/components/common/Collapsible.tsx +95 -95
- package/src/components/common/CompactSessionIndicator.tsx +73 -73
- package/src/components/common/CompactSessionList.tsx +82 -82
- package/src/components/common/index.ts +8 -8
- package/src/components/common/openai/OpenAIContent.tsx +53 -53
- package/src/components/common/openai/OpenAIUserAudioContent.tsx +70 -70
- package/src/components/common/openai/OpenAIUserFileContent.tsx +76 -76
- package/src/components/common/openai/OpenAIUserImageContent.tsx +34 -34
- package/src/components/common/openai/OpenAIUserTextContent.tsx +15 -15
- package/src/components/common/openai/index.ts +5 -5
- package/src/components/events/AutoBeCompleteEventMovie.tsx +402 -402
- package/src/components/events/AutoBeCorrectEventMovie.tsx +354 -368
- package/src/components/events/AutoBeEventGroupMovie.tsx +18 -18
- package/src/components/events/AutoBeEventMovie.tsx +158 -139
- package/src/components/events/AutoBeProgressEventMovie.tsx +217 -157
- package/src/components/events/AutoBeScenarioEventMovie.tsx +135 -95
- package/src/components/events/AutoBeStartEventMovie.tsx +82 -82
- package/src/components/events/AutoBeValidateEventMovie.tsx +249 -286
- package/src/components/events/README.md +300 -300
- package/src/components/events/common/CollapsibleEventGroup.tsx +211 -211
- package/src/components/events/common/EventCard.tsx +61 -61
- package/src/components/events/common/EventContent.tsx +31 -31
- package/src/components/events/common/EventHeader.tsx +85 -85
- package/src/components/events/common/EventIcon.tsx +82 -82
- package/src/components/events/common/ProgressBar.tsx +64 -64
- package/src/components/events/common/index.ts +13 -13
- package/src/components/events/groups/CorrectEventGroup.tsx +183 -183
- package/src/components/events/groups/ValidateEventGroup.tsx +143 -146
- package/src/components/events/groups/index.ts +8 -8
- package/src/components/events/index.ts +16 -16
- package/src/components/events/utils/eventGrouper.tsx +116 -117
- package/src/components/events/utils/index.ts +1 -1
- package/src/components/index.ts +13 -13
- package/src/components/upload/AutoBeChatUploadBox.tsx +425 -424
- package/src/components/upload/AutoBeChatUploadSendButton.tsx +66 -66
- package/src/components/upload/AutoBeFileUploadBox.tsx +123 -123
- package/src/components/upload/AutoBeUploadConfig.ts +5 -5
- package/src/components/upload/AutoBeVoiceRecoderButton.tsx +100 -100
- package/src/components/upload/index.ts +5 -5
- package/src/constant/color.ts +28 -28
- package/src/context/AutoBeAgentContext.tsx +245 -258
- package/src/context/AutoBeAgentSessionList.tsx +58 -58
- package/src/context/SearchParamsContext.tsx +49 -49
- package/src/hooks/index.ts +3 -3
- package/src/hooks/useEscapeKey.ts +24 -24
- package/src/hooks/useIsomorphicLayoutEffect.ts +8 -8
- package/src/hooks/useMediaQuery.ts +73 -73
- package/src/hooks/useSessionStorage.ts +10 -0
- package/src/icons/Receipt.tsx +74 -74
- package/src/index.ts +9 -8
- package/src/strategy/AutoBeAgentSessionStorageStrategy.ts +127 -0
- package/src/structure/AutoBeListener.ts +373 -304
- package/src/structure/AutoBeListenerState.ts +53 -53
- package/src/structure/IAutoBeAgentSessionStorageStrategy.ts +87 -87
- package/src/structure/IAutoBeEventGroup.ts +6 -6
- package/src/structure/index.ts +4 -4
- package/src/types/config.ts +44 -44
- package/src/types/index.ts +1 -1
- package/src/utils/AutoBeFileUploader.ts +279 -279
- package/src/utils/AutoBeVoiceRecorder.ts +95 -95
- package/src/utils/__tests__/crypto.test.ts +286 -286
- package/src/utils/__tests__/storage.test.ts +229 -229
- package/src/utils/crypto.ts +95 -95
- package/src/utils/index.ts +6 -6
- package/src/utils/number.ts +17 -17
- package/src/utils/storage.ts +96 -96
- package/src/utils/time.ts +14 -14
- package/tsconfig.json +9 -9
- package/vitest.config.ts +15 -15
package/src/utils/number.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export const toCompactNumberFormat = (value: number) => {
|
|
2
|
-
const units = [
|
|
3
|
-
{ value: 1_000_000_000_000_000, symbol: "Q" },
|
|
4
|
-
{ value: 1_000_000_000_000, symbol: "T" },
|
|
5
|
-
{ value: 1_000_000_000, symbol: "B" },
|
|
6
|
-
{ value: 1_000_000, symbol: "M" },
|
|
7
|
-
{ value: 1_000, symbol: "K" },
|
|
8
|
-
];
|
|
9
|
-
|
|
10
|
-
for (const unit of units) {
|
|
11
|
-
if (value >= unit.value) {
|
|
12
|
-
return (value / unit.value).toFixed(1) + unit.symbol;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return value.toString();
|
|
17
|
-
};
|
|
1
|
+
export const toCompactNumberFormat = (value: number) => {
|
|
2
|
+
const units = [
|
|
3
|
+
{ value: 1_000_000_000_000_000, symbol: "Q" },
|
|
4
|
+
{ value: 1_000_000_000_000, symbol: "T" },
|
|
5
|
+
{ value: 1_000_000_000, symbol: "B" },
|
|
6
|
+
{ value: 1_000_000, symbol: "M" },
|
|
7
|
+
{ value: 1_000, symbol: "K" },
|
|
8
|
+
];
|
|
9
|
+
|
|
10
|
+
for (const unit of units) {
|
|
11
|
+
if (value >= unit.value) {
|
|
12
|
+
return (value / unit.value).toFixed(1) + unit.symbol;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return value.toString();
|
|
17
|
+
};
|
package/src/utils/storage.ts
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Encrypted sessionStorage utilities Provides secure storage functions using
|
|
3
|
-
* encryption
|
|
4
|
-
*/
|
|
5
|
-
import { decrypt, encrypt } from "./crypto";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Safely store encrypted data in sessionStorage
|
|
9
|
-
*
|
|
10
|
-
* @param key - Storage key
|
|
11
|
-
* @param value - Plain text value to encrypt and store
|
|
12
|
-
*/
|
|
13
|
-
export const setEncryptedSessionStorage = (
|
|
14
|
-
key: string,
|
|
15
|
-
value: string,
|
|
16
|
-
): void => {
|
|
17
|
-
if (typeof window === "undefined") return;
|
|
18
|
-
|
|
19
|
-
try {
|
|
20
|
-
const encrypted = encrypt(value);
|
|
21
|
-
sessionStorage.setItem(key, encrypted);
|
|
22
|
-
} catch (error) {
|
|
23
|
-
throw new Error(
|
|
24
|
-
`Failed to store encrypted data for key "${key}": ${error instanceof Error ? error.message : String(error)}`,
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Safely retrieve and decrypt data from sessionStorage
|
|
31
|
-
*
|
|
32
|
-
* @param key - Storage key
|
|
33
|
-
* @returns Decrypted plain text value
|
|
34
|
-
*/
|
|
35
|
-
export const getEncryptedSessionStorage = (key: string): string => {
|
|
36
|
-
if (typeof window === "undefined") return "";
|
|
37
|
-
|
|
38
|
-
try {
|
|
39
|
-
const encrypted = sessionStorage.getItem(key);
|
|
40
|
-
if (!encrypted) return "";
|
|
41
|
-
return decrypt(encrypted);
|
|
42
|
-
} catch (error) {
|
|
43
|
-
throw new Error(
|
|
44
|
-
`Failed to retrieve encrypted data for key "${key}": ${error instanceof Error ? error.message : String(error)}`,
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Remove encrypted data from sessionStorage
|
|
51
|
-
*
|
|
52
|
-
* @param key - Storage key
|
|
53
|
-
*/
|
|
54
|
-
export const removeEncryptedSessionStorage = (key: string): void => {
|
|
55
|
-
if (typeof window === "undefined") return;
|
|
56
|
-
|
|
57
|
-
try {
|
|
58
|
-
sessionStorage.removeItem(key);
|
|
59
|
-
} catch (error) {
|
|
60
|
-
throw new Error(
|
|
61
|
-
`Failed to remove encrypted data for key "${key}": ${error instanceof Error ? error.message : String(error)}`,
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Check if encrypted data exists in sessionStorage
|
|
68
|
-
*
|
|
69
|
-
* @param key - Storage key
|
|
70
|
-
* @returns Whether the key exists and has a value
|
|
71
|
-
*/
|
|
72
|
-
export const hasEncryptedSessionStorage = (key: string): boolean => {
|
|
73
|
-
if (typeof window === "undefined") return false;
|
|
74
|
-
|
|
75
|
-
try {
|
|
76
|
-
const value = sessionStorage.getItem(key);
|
|
77
|
-
return value !== null && value !== "";
|
|
78
|
-
} catch (error) {
|
|
79
|
-
throw new Error(
|
|
80
|
-
`Failed to check encrypted data for key "${key}": ${error instanceof Error ? error.message : String(error)}`,
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
/** Clear all sessionStorage data (use with caution) */
|
|
86
|
-
export const clearEncryptedSessionStorage = (): void => {
|
|
87
|
-
if (typeof window === "undefined") return;
|
|
88
|
-
|
|
89
|
-
try {
|
|
90
|
-
sessionStorage.clear();
|
|
91
|
-
} catch (error) {
|
|
92
|
-
throw new Error(
|
|
93
|
-
`Failed to clear sessionStorage: ${error instanceof Error ? error.message : String(error)}`,
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Encrypted sessionStorage utilities Provides secure storage functions using
|
|
3
|
+
* encryption
|
|
4
|
+
*/
|
|
5
|
+
import { decrypt, encrypt } from "./crypto";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Safely store encrypted data in sessionStorage
|
|
9
|
+
*
|
|
10
|
+
* @param key - Storage key
|
|
11
|
+
* @param value - Plain text value to encrypt and store
|
|
12
|
+
*/
|
|
13
|
+
export const setEncryptedSessionStorage = (
|
|
14
|
+
key: string,
|
|
15
|
+
value: string,
|
|
16
|
+
): void => {
|
|
17
|
+
if (typeof window === "undefined") return;
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
const encrypted = encrypt(value);
|
|
21
|
+
sessionStorage.setItem(key, encrypted);
|
|
22
|
+
} catch (error) {
|
|
23
|
+
throw new Error(
|
|
24
|
+
`Failed to store encrypted data for key "${key}": ${error instanceof Error ? error.message : String(error)}`,
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Safely retrieve and decrypt data from sessionStorage
|
|
31
|
+
*
|
|
32
|
+
* @param key - Storage key
|
|
33
|
+
* @returns Decrypted plain text value
|
|
34
|
+
*/
|
|
35
|
+
export const getEncryptedSessionStorage = (key: string): string => {
|
|
36
|
+
if (typeof window === "undefined") return "";
|
|
37
|
+
|
|
38
|
+
try {
|
|
39
|
+
const encrypted = sessionStorage.getItem(key);
|
|
40
|
+
if (!encrypted) return "";
|
|
41
|
+
return decrypt(encrypted);
|
|
42
|
+
} catch (error) {
|
|
43
|
+
throw new Error(
|
|
44
|
+
`Failed to retrieve encrypted data for key "${key}": ${error instanceof Error ? error.message : String(error)}`,
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Remove encrypted data from sessionStorage
|
|
51
|
+
*
|
|
52
|
+
* @param key - Storage key
|
|
53
|
+
*/
|
|
54
|
+
export const removeEncryptedSessionStorage = (key: string): void => {
|
|
55
|
+
if (typeof window === "undefined") return;
|
|
56
|
+
|
|
57
|
+
try {
|
|
58
|
+
sessionStorage.removeItem(key);
|
|
59
|
+
} catch (error) {
|
|
60
|
+
throw new Error(
|
|
61
|
+
`Failed to remove encrypted data for key "${key}": ${error instanceof Error ? error.message : String(error)}`,
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if encrypted data exists in sessionStorage
|
|
68
|
+
*
|
|
69
|
+
* @param key - Storage key
|
|
70
|
+
* @returns Whether the key exists and has a value
|
|
71
|
+
*/
|
|
72
|
+
export const hasEncryptedSessionStorage = (key: string): boolean => {
|
|
73
|
+
if (typeof window === "undefined") return false;
|
|
74
|
+
|
|
75
|
+
try {
|
|
76
|
+
const value = sessionStorage.getItem(key);
|
|
77
|
+
return value !== null && value !== "";
|
|
78
|
+
} catch (error) {
|
|
79
|
+
throw new Error(
|
|
80
|
+
`Failed to check encrypted data for key "${key}": ${error instanceof Error ? error.message : String(error)}`,
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/** Clear all sessionStorage data (use with caution) */
|
|
86
|
+
export const clearEncryptedSessionStorage = (): void => {
|
|
87
|
+
if (typeof window === "undefined") return;
|
|
88
|
+
|
|
89
|
+
try {
|
|
90
|
+
sessionStorage.clear();
|
|
91
|
+
} catch (error) {
|
|
92
|
+
throw new Error(
|
|
93
|
+
`Failed to clear sessionStorage: ${error instanceof Error ? error.message : String(error)}`,
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
};
|
package/src/utils/time.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Formats an ISO timestamp string to display time in Korean locale
|
|
3
|
-
*
|
|
4
|
-
* @param isoString - ISO format timestamp string
|
|
5
|
-
* @returns Formatted time string (HH:mm)
|
|
6
|
-
*/
|
|
7
|
-
export const formatTime = (isoString: string): string => {
|
|
8
|
-
const date = new Date(isoString);
|
|
9
|
-
return date.toLocaleTimeString("ko-KR", {
|
|
10
|
-
hour: "2-digit",
|
|
11
|
-
minute: "2-digit",
|
|
12
|
-
hour12: false,
|
|
13
|
-
});
|
|
14
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Formats an ISO timestamp string to display time in Korean locale
|
|
3
|
+
*
|
|
4
|
+
* @param isoString - ISO format timestamp string
|
|
5
|
+
* @returns Formatted time string (HH:mm)
|
|
6
|
+
*/
|
|
7
|
+
export const formatTime = (isoString: string): string => {
|
|
8
|
+
const date = new Date(isoString);
|
|
9
|
+
return date.toLocaleTimeString("ko-KR", {
|
|
10
|
+
hour: "2-digit",
|
|
11
|
+
minute: "2-digit",
|
|
12
|
+
hour12: false,
|
|
13
|
+
});
|
|
14
|
+
};
|
package/tsconfig.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../internals/config/tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "lib",
|
|
5
|
-
"rootDir": "src",
|
|
6
|
-
"jsx": "react-jsx",
|
|
7
|
-
"lib": ["dom", "dom.iterable", "esnext"]
|
|
8
|
-
},
|
|
9
|
-
"include": ["src/**/*"]
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../internals/config/tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "lib",
|
|
5
|
+
"rootDir": "src",
|
|
6
|
+
"jsx": "react-jsx",
|
|
7
|
+
"lib": ["dom", "dom.iterable", "esnext"]
|
|
8
|
+
},
|
|
9
|
+
"include": ["src/**/*"]
|
|
10
10
|
}
|
package/vitest.config.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineConfig } from "vitest/config";
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
test: {
|
|
5
|
-
environment: "happy-dom",
|
|
6
|
-
globals: true,
|
|
7
|
-
setupFiles: [],
|
|
8
|
-
include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
9
|
-
exclude: ["node_modules", "lib", "dist"],
|
|
10
|
-
coverage: {
|
|
11
|
-
reporter: ["text", "json", "html"],
|
|
12
|
-
exclude: ["node_modules/", "src/**/*.test.ts", "src/**/*.spec.ts"],
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
});
|
|
1
|
+
import { defineConfig } from "vitest/config";
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
test: {
|
|
5
|
+
environment: "happy-dom",
|
|
6
|
+
globals: true,
|
|
7
|
+
setupFiles: [],
|
|
8
|
+
include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
9
|
+
exclude: ["node_modules", "lib", "dist"],
|
|
10
|
+
coverage: {
|
|
11
|
+
reporter: ["text", "json", "html"],
|
|
12
|
+
exclude: ["node_modules/", "src/**/*.test.ts", "src/**/*.spec.ts"],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
});
|