diff --git a/web/bun.lock b/web/bun.lock index 42ab7a23508..2941e48635f 100644 --- a/web/bun.lock +++ b/web/bun.lock @@ -30,7 +30,7 @@ "clsx": "^2.1.1", "cmdk": "^1.1.1", "dayjs": "^1.11.21", - "dompurify": "3.4.11", + "dompurify": "3.4.13", "i18next": "^26.3.4", "i18next-browser-languagedetector": "^8.2.1", "input-otp": "^1.4.2", @@ -76,6 +76,7 @@ "@types/react-dom": "^19.2.3", "@typescript/native-preview": "^7.0.0-dev.20260702.3", "@xyflow/react": "^12.11.1", + "bun-types": "^1.3.14", "embla-carousel-react": "^8.6.0", "happy-dom": "^20.11.1", "knip": "^6.24.0", @@ -87,7 +88,7 @@ }, "overrides": { "brace-expansion": "2.1.1", - "dompurify": "3.4.11", + "dompurify": "3.4.13", "fast-uri": "3.1.2", "hono": "4.12.22", "ip-address": "10.2.0", @@ -1063,6 +1064,8 @@ "buffer-image-size": ["buffer-image-size@0.6.4", "", { "dependencies": { "@types/node": "*" } }, "sha512-nEh+kZOPY1w+gcCMobZ6ETUp9WfibndnosbpwB1iJk/8Gt5ZF2bhS6+B6bPYz424KtwsR6Rflc3tCz1/ghX2dQ=="], + "bun-types": ["bun-types@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="], + "bundle-name": ["bundle-name@4.1.0", "", { "dependencies": { "run-applescript": "^7.0.0" } }, "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q=="], "bytes": ["bytes@3.1.2", "", {}, "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="], @@ -1269,7 +1272,7 @@ "diff": ["diff@8.0.4", "", {}, "sha512-DPi0FmjiSU5EvQV0++GFDOJ9ASQUVFh5kD+OzOnYdi7n3Wpm9hWWGfB/O2blfHcMVTL5WkQXSnRiK9makhrcnw=="], - "dompurify": ["dompurify@3.4.11", "", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-zhlUV12GsaRzMsf9q5M254YhA4+VuF0fG+QFqu6aYpoGlKtz+w8//jBcGVYBgQkR5GHjUomejY84AV+/uPbWdw=="], + "dompurify": ["dompurify@3.4.13", "", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-2vmYIoqjze2d+kakP8S/nS5shfsl587kzwEjcGlTdiksUVgFHnFCsLYDVj/JNqJVOQZGSYBTmuycv0PodwmnMQ=="], "dot-prop": ["dot-prop@6.0.1", "", { "dependencies": { "is-obj": "^2.0.0" } }, "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA=="], diff --git a/web/package.json b/web/package.json index d96a6c4bf2e..209be08c344 100644 --- a/web/package.json +++ b/web/package.json @@ -90,6 +90,7 @@ "@types/react-dom": "^19.2.3", "@typescript/native-preview": "^7.0.0-dev.20260702.3", "@xyflow/react": "^12.11.1", + "bun-types": "^1.3.14", "embla-carousel-react": "^8.6.0", "happy-dom": "^20.11.1", "knip": "^6.24.0", diff --git a/web/src/components/json-code-editor/__tests__/json-code-editor-utils.test.ts b/web/src/components/json-code-editor/__tests__/json-code-editor-utils.test.ts index bbac95fd4f7..bd8d2165dd3 100644 --- a/web/src/components/json-code-editor/__tests__/json-code-editor-utils.test.ts +++ b/web/src/components/json-code-editor/__tests__/json-code-editor-utils.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import { applyJsonSmartEnter, diff --git a/web/src/components/json-code-editor/__tests__/json-code-editor.test.tsx b/web/src/components/json-code-editor/__tests__/json-code-editor.test.tsx index 24959b2cdd5..b3c2211371c 100644 --- a/web/src/components/json-code-editor/__tests__/json-code-editor.test.tsx +++ b/web/src/components/json-code-editor/__tests__/json-code-editor.test.tsx @@ -16,8 +16,9 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { after, describe, test } from 'node:test' +import { after } from 'node:test' import { Window } from 'happy-dom' diff --git a/web/src/components/model-group-selector/__tests__/layout.test.ts b/web/src/components/model-group-selector/__tests__/layout.test.ts index ef5b7e6fe3f..f158f5c3749 100644 --- a/web/src/components/model-group-selector/__tests__/layout.test.ts +++ b/web/src/components/model-group-selector/__tests__/layout.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import { modelGroupSelectorLayoutClasses, diff --git a/web/src/components/ui/dropdown-menu.test.tsx b/web/src/components/ui/dropdown-menu.test.tsx index 71d6afe9750..5d8b62aece9 100644 --- a/web/src/components/ui/dropdown-menu.test.tsx +++ b/web/src/components/ui/dropdown-menu.test.tsx @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import { handleDropdownMenuItemSelect } from './dropdown-menu-events' diff --git a/web/src/features/auth/api.test.ts b/web/src/features/auth/api.test.ts index 455b68866c3..d8a72d07931 100644 --- a/web/src/features/auth/api.test.ts +++ b/web/src/features/auth/api.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import type { RefreshOutcome } from '@/lib/api' import type { AuthBundle } from '@/stores/auth-store' diff --git a/web/src/features/auth/lib/__tests__/oauth-callback-mode.test.ts b/web/src/features/auth/lib/__tests__/oauth-callback-mode.test.ts index 180e7bf034c..25c5ad76629 100644 --- a/web/src/features/auth/lib/__tests__/oauth-callback-mode.test.ts +++ b/web/src/features/auth/lib/__tests__/oauth-callback-mode.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import { getOAuthSessionStorage, diff --git a/web/src/features/auth/lib/auth-redirect.test.ts b/web/src/features/auth/lib/auth-redirect.test.ts index f043c26bc0a..756d6e51379 100644 --- a/web/src/features/auth/lib/auth-redirect.test.ts +++ b/web/src/features/auth/lib/auth-redirect.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import type { AuthUser } from '@/stores/auth-store' diff --git a/web/src/features/auth/lib/oauth-bind-window.test.ts b/web/src/features/auth/lib/oauth-bind-window.test.ts index 3ef4ba43226..137a125d766 100644 --- a/web/src/features/auth/lib/oauth-bind-window.test.ts +++ b/web/src/features/auth/lib/oauth-bind-window.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import { parseTelegramBindCallback, diff --git a/web/src/features/auth/lib/telegram-login.test.ts b/web/src/features/auth/lib/telegram-login.test.ts index 95ee310c5d8..499a59fd0d6 100644 --- a/web/src/features/auth/lib/telegram-login.test.ts +++ b/web/src/features/auth/lib/telegram-login.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import { pickTelegramAuthorization } from './telegram-login' diff --git a/web/src/features/channels/lib/__tests__/channel-field-update.test.ts b/web/src/features/channels/lib/__tests__/channel-field-update.test.ts index d984f656d70..aaaa479aa4d 100644 --- a/web/src/features/channels/lib/__tests__/channel-field-update.test.ts +++ b/web/src/features/channels/lib/__tests__/channel-field-update.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import { CHANNEL_FIELD_UPDATE_DELAY_MS, diff --git a/web/src/features/channels/lib/__tests__/channel-table-row-id.test.ts b/web/src/features/channels/lib/__tests__/channel-table-row-id.test.ts index d0e19bafb77..966c5cb9a2d 100644 --- a/web/src/features/channels/lib/__tests__/channel-table-row-id.test.ts +++ b/web/src/features/channels/lib/__tests__/channel-table-row-id.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import type { Channel } from '../../types' import { getChannelTableRowId, type TagRow } from '../channel-utils' diff --git a/web/src/features/channels/lib/__tests__/new-api-channel.test.ts b/web/src/features/channels/lib/__tests__/new-api-channel.test.ts index 5e4f6c9b460..bcb7f643cc9 100644 --- a/web/src/features/channels/lib/__tests__/new-api-channel.test.ts +++ b/web/src/features/channels/lib/__tests__/new-api-channel.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import { CHANNEL_TYPE_NEW_API, diff --git a/web/src/features/dashboard/lib/flow-selection.test.ts b/web/src/features/dashboard/lib/flow-selection.test.ts index 4317c7175fe..13615383b74 100644 --- a/web/src/features/dashboard/lib/flow-selection.test.ts +++ b/web/src/features/dashboard/lib/flow-selection.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import type { FlowUserFilterOption } from '../types' import { diff --git a/web/src/features/dashboard/lib/flow.test.ts b/web/src/features/dashboard/lib/flow.test.ts index 1645d2f01e6..cd75ee1989e 100644 --- a/web/src/features/dashboard/lib/flow.test.ts +++ b/web/src/features/dashboard/lib/flow.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import type { FlowQuotaDataItem } from '../types' import { diff --git a/web/src/features/keys/components/__tests__/api-key-group-cell.test.tsx b/web/src/features/keys/components/__tests__/api-key-group-cell.test.tsx index 5cb64ae57f7..e405fc3c6b8 100644 --- a/web/src/features/keys/components/__tests__/api-key-group-cell.test.tsx +++ b/web/src/features/keys/components/__tests__/api-key-group-cell.test.tsx @@ -16,8 +16,9 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { after, describe, test } from 'node:test' +import { after } from 'node:test' import { Window } from 'happy-dom' diff --git a/web/src/features/keys/components/__tests__/api-key-group-combobox.test.tsx b/web/src/features/keys/components/__tests__/api-key-group-combobox.test.tsx index 5c3b6525e48..24b164e9510 100644 --- a/web/src/features/keys/components/__tests__/api-key-group-combobox.test.tsx +++ b/web/src/features/keys/components/__tests__/api-key-group-combobox.test.tsx @@ -16,8 +16,9 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { after, describe, test } from 'node:test' +import { after } from 'node:test' import { Window } from 'happy-dom' diff --git a/web/src/features/keys/components/__tests__/api-keys-mutate-drawer.test.tsx b/web/src/features/keys/components/__tests__/api-keys-mutate-drawer.test.tsx index 238d0b21d4d..caded779e96 100644 --- a/web/src/features/keys/components/__tests__/api-keys-mutate-drawer.test.tsx +++ b/web/src/features/keys/components/__tests__/api-keys-mutate-drawer.test.tsx @@ -16,8 +16,9 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { after, afterEach, describe, test } from 'node:test' +import { after, afterEach } from 'node:test' import { Window } from 'happy-dom' diff --git a/web/src/features/keys/components/__tests__/auto-group-order-editor.test.tsx b/web/src/features/keys/components/__tests__/auto-group-order-editor.test.tsx index f37f50755f2..6e3fea29279 100644 --- a/web/src/features/keys/components/__tests__/auto-group-order-editor.test.tsx +++ b/web/src/features/keys/components/__tests__/auto-group-order-editor.test.tsx @@ -16,8 +16,9 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { after, describe, test } from 'node:test' +import { after } from 'node:test' import { Window } from 'happy-dom' diff --git a/web/src/features/keys/components/api-key-group-cell.tsx b/web/src/features/keys/components/api-key-group-cell.tsx index 21a1bc7d9a0..852e68c4404 100644 --- a/web/src/features/keys/components/api-key-group-cell.tsx +++ b/web/src/features/keys/components/api-key-group-cell.tsx @@ -28,7 +28,7 @@ import { } from '@/components/ui/tooltip' import { - // AutoGroupBadge, + AutoGroupBadge, GroupRatioBadge, type GroupRatio, } from './auto-group-visuals' @@ -66,12 +66,14 @@ export function ApiKeyGroupCell(props: ApiKeyGroupCellProps) { /> } > - - {/**/} + {props.crossGroupRetry && ( + + )} + . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import type { TFunction } from 'i18next' diff --git a/web/src/features/playground/hooks/use-stream-request.test.ts b/web/src/features/playground/hooks/use-stream-request.test.ts index a913fec3fe1..74349719cf3 100644 --- a/web/src/features/playground/hooks/use-stream-request.test.ts +++ b/web/src/features/playground/hooks/use-stream-request.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import type { ChatCompletionRequest } from '../types' import { createStreamRequestController } from './use-stream-request' diff --git a/web/src/features/profile/components/__tests__/login-session-utils.test.ts b/web/src/features/profile/components/__tests__/login-session-utils.test.ts index c75df750f48..6d585d3abf9 100644 --- a/web/src/features/profile/components/__tests__/login-session-utils.test.ts +++ b/web/src/features/profile/components/__tests__/login-session-utils.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import type { TFunction } from 'i18next' diff --git a/web/src/features/system-settings/models/__tests__/group-auto-limit-validation.test.ts b/web/src/features/system-settings/models/__tests__/group-auto-limit-validation.test.ts index 4b2a5b6eae4..cf6010296ab 100644 --- a/web/src/features/system-settings/models/__tests__/group-auto-limit-validation.test.ts +++ b/web/src/features/system-settings/models/__tests__/group-auto-limit-validation.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import { positiveIntegerSchema } from '../../utils/numeric-field' diff --git a/web/src/features/system-settings/models/__tests__/tool-price-validation.test.tsx b/web/src/features/system-settings/models/__tests__/tool-price-validation.test.tsx index fc6b8a88aa8..b94ea615827 100644 --- a/web/src/features/system-settings/models/__tests__/tool-price-validation.test.tsx +++ b/web/src/features/system-settings/models/__tests__/tool-price-validation.test.tsx @@ -16,8 +16,9 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { after, describe, test } from 'node:test' +import { after } from 'node:test' import { Window } from 'happy-dom' diff --git a/web/src/features/usage-logs/components/__tests__/cost-display.test.tsx b/web/src/features/usage-logs/components/__tests__/cost-display.test.tsx index fc6294f6ce4..7b144af60ae 100644 --- a/web/src/features/usage-logs/components/__tests__/cost-display.test.tsx +++ b/web/src/features/usage-logs/components/__tests__/cost-display.test.tsx @@ -16,8 +16,9 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { after, describe, test } from 'node:test' +import { after } from 'node:test' import { Window } from 'happy-dom' import type React from 'react' diff --git a/web/src/features/usage-logs/lib/__tests__/tool-surcharge.test.ts b/web/src/features/usage-logs/lib/__tests__/tool-surcharge.test.ts index fb3ea348dbb..740887b5803 100644 --- a/web/src/features/usage-logs/lib/__tests__/tool-surcharge.test.ts +++ b/web/src/features/usage-logs/lib/__tests__/tool-surcharge.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import type { LogOtherData } from '../../types' import { hasToolSurcharge } from '../format' diff --git a/web/src/features/wallet/hooks/use-payment.test.ts b/web/src/features/wallet/hooks/use-payment.test.ts index ebd90a144cd..c0b27121b7f 100644 --- a/web/src/features/wallet/hooks/use-payment.test.ts +++ b/web/src/features/wallet/hooks/use-payment.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import { PAYMENT_TYPES } from '../constants' import { requestPaymentAmount } from './use-payment' diff --git a/web/src/features/wallet/lib/payment.test.ts b/web/src/features/wallet/lib/payment.test.ts index 10e8eabaddf..63d7486f2ca 100644 --- a/web/src/features/wallet/lib/payment.test.ts +++ b/web/src/features/wallet/lib/payment.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import { PAYMENT_TYPES } from '../constants' import { diff --git a/web/src/lib/auth-session.test.ts b/web/src/lib/auth-session.test.ts index 4a97d3c2737..2a5444d45c8 100644 --- a/web/src/lib/auth-session.test.ts +++ b/web/src/lib/auth-session.test.ts @@ -16,8 +16,9 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { afterEach, describe, test } from 'node:test' +import { afterEach } from 'node:test' import { QueryClient } from '@tanstack/react-query' diff --git a/web/src/lib/legacy-route.test.ts b/web/src/lib/legacy-route.test.ts index f14a94b1171..5f0d27c23f9 100644 --- a/web/src/lib/legacy-route.test.ts +++ b/web/src/lib/legacy-route.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import { resolveLegacyRoute } from './legacy-route' diff --git a/web/src/lib/server-error-message.test.ts b/web/src/lib/server-error-message.test.ts index 9e59f4239b0..25b454c6e36 100644 --- a/web/src/lib/server-error-message.test.ts +++ b/web/src/lib/server-error-message.test.ts @@ -16,8 +16,8 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { describe, test } from 'bun:test' import assert from 'node:assert/strict' -import { describe, test } from 'node:test' import { getServerErrorMessageKey } from './server-error-message' diff --git a/web/tsconfig.app.json b/web/tsconfig.app.json index 79f70fc0860..2c0e59544f5 100644 --- a/web/tsconfig.app.json +++ b/web/tsconfig.app.json @@ -6,7 +6,7 @@ "lib": ["ES2022", "DOM", "DOM.Iterable"], "module": "ESNext", "skipLibCheck": true, - "types": ["node"], + "types": ["node", "bun-types"], /* Bundler mode */ "moduleResolution": "Bundler",