chore: upgrade Vite+ to 0.2.9 (#40762)

This commit is contained in:
yyh 2026-08-14 04:42:28 +00:00 committed by GitHub
parent 3cd23d4ef8
commit 0f63a05d04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
816 changed files with 1782 additions and 2180 deletions

View File

@ -4,7 +4,6 @@
"tailwindCSS.experimental.configFile": "web/app/styles/globals.css",
// Format
"[javascript]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
"[javascriptreact]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
"[typescript]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
@ -25,9 +24,9 @@
"[handlebars]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"oxc.fmt.configPath": "./vite.config.ts",
"oxc.disableNestedConfig": true,
"oxc.fmt.disableNestedConfig": true,
// Lint fix
"eslint.useFlatConfig": true,
"eslint.validate": ["json", "jsonc", "markdown", "yaml", "toml"],
"editor.codeActionsOnSave": {

View File

@ -2,7 +2,7 @@ import type { CommandEntry } from './generate-command-tree.js'
import { existsSync, mkdirSync, mkdtempSync, readFileSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import {
buildTree,
discoverCommands,

View File

@ -3,7 +3,7 @@ import { chmodSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'nod
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
const SCRIPT = fileURLToPath(new URL('./install-cli.sh', import.meta.url))

View File

@ -1,6 +1,6 @@
import { spawnSync } from 'node:child_process'
import { fileURLToPath } from 'node:url'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
const SCRIPT = fileURLToPath(new URL('./install-r2.ps1', import.meta.url))
const hasPwsh = spawnSync('pwsh', ['-v'], { encoding: 'utf8' }).status === 0

View File

@ -1,6 +1,6 @@
import { spawnSync } from 'node:child_process'
import { fileURLToPath } from 'node:url'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
const SCRIPT = fileURLToPath(new URL('./install-r2.sh', import.meta.url))

View File

@ -1,6 +1,6 @@
import { spawnSync } from 'node:child_process'
import { fileURLToPath } from 'node:url'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
const SCRIPT = fileURLToPath(new URL('./install.ps1', import.meta.url))

View File

@ -1,6 +1,6 @@
import { execFileSync } from 'node:child_process'
import { fileURLToPath } from 'node:url'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { FIXTURE_COMPAT, pkgManifestEnv } from '../test/fixtures/pkg-manifest'
const SCRIPT = fileURLToPath(new URL('./release-naming.mjs', import.meta.url))

View File

@ -3,7 +3,7 @@ import { mkdtempSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { FIXTURE_COMPAT, pkgManifestEnv } from '../test/fixtures/pkg-manifest'
const SCRIPT = fileURLToPath(new URL('./release-r2-edge.mjs', import.meta.url))

View File

@ -1,6 +1,6 @@
import { spawnSync } from 'node:child_process'
import { fileURLToPath } from 'node:url'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
const SCRIPT = fileURLToPath(new URL('./release-r2-publish.sh', import.meta.url))

View File

@ -1,7 +1,7 @@
import type { StubServer } from '@test/fixtures/stub-server'
import { testHttpClient } from '@test/fixtures/http-client'
import { jsonResponder, startStubServer } from '@test/fixtures/stub-server'
import { afterEach, describe, expect, it } from 'vitest'
import { afterEach, describe, expect, it } from 'vite-plus/test'
import { isHttpClientError } from '@/errors/base'
import { AccountSessionsClient } from './account-sessions.js'

View File

@ -1,7 +1,7 @@
import type { StubServer } from '@test/fixtures/stub-server'
import { testHttpClient } from '@test/fixtures/http-client'
import { jsonResponder, startStubServer } from '@test/fixtures/stub-server'
import { afterEach, describe, expect, it } from 'vitest'
import { afterEach, describe, expect, it } from 'vite-plus/test'
import { isHttpClientError } from '@/errors/base'
import { AccountClient } from './account.js'

View File

@ -1,7 +1,7 @@
import type { StubServer } from '@test/fixtures/stub-server'
import { testHttpClient } from '@test/fixtures/http-client'
import { jsonResponder, startStubServer } from '@test/fixtures/stub-server'
import { afterEach, describe, expect, it } from 'vitest'
import { afterEach, describe, expect, it } from 'vite-plus/test'
import { isHttpClientError } from '@/errors/base'
import { AppDslClient } from './app-dsl.js'

View File

@ -5,7 +5,7 @@ import { join } from 'node:path'
import { startMock } from '@test/fixtures/dify-mock/server'
import { testHttpClient } from '@test/fixtures/http-client'
import { dump, load } from 'js-yaml'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vite-plus/test'
import { loadAppInfoCache } from '@/cache/app-info'
import { ENV_CACHE_DIR } from '@/store/dir'
import { CACHE_APP_INFO, cachePath, getCache } from '@/store/manager'

View File

@ -1,6 +1,6 @@
import type { ActiveContext } from '@/auth/hosts'
import type { HttpClient } from '@/http/types'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { selectAppReader, SubjectKind, subjectOf } from './app-reader'
import { AppsClient } from './apps'
import { PermittedExternalAppsClient } from './permitted-external-apps'

View File

@ -1,7 +1,7 @@
import type { DifyMock } from '@test/fixtures/dify-mock/server'
import { startMock } from '@test/fixtures/dify-mock/server'
import { testHttpClient } from '@test/fixtures/http-client'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { AppRunClient, buildRunBody } from './app-run.js'
describe('buildRunBody', () => {

View File

@ -1,7 +1,7 @@
import type { StubServer } from '@test/fixtures/stub-server'
import { testHttpClient } from '@test/fixtures/http-client'
import { jsonResponder, startStubServer } from '@test/fixtures/stub-server'
import { afterEach, describe, expect, it } from 'vitest'
import { afterEach, describe, expect, it } from 'vite-plus/test'
import { isHttpClientError } from '@/errors/base'
import { AppsClient } from './apps.js'

View File

@ -5,7 +5,7 @@ import { Buffer } from 'node:buffer'
import * as http from 'node:http'
import { startMock } from '@test/fixtures/dify-mock/server'
import { testHttpClient } from '@test/fixtures/http-client'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { isBaseError } from '@/errors/base'
import { ErrorCode } from '@/errors/codes'
import { DEFAULT_CLIENT_ID, DeviceFlowApi } from './oauth-device.js'

View File

@ -4,7 +4,7 @@ import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { testHttpClient } from '@test/fixtures/http-client'
import { jsonResponder, startStubServer } from '@test/fixtures/stub-server'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { isHttpClientError } from '@/errors/base'
import { FileUploadClient } from './file-upload.js'

View File

@ -1,7 +1,7 @@
import type { StubServer } from '@test/fixtures/stub-server'
import { testHttpClient } from '@test/fixtures/http-client'
import { jsonResponder, startStubServer } from '@test/fixtures/stub-server'
import { afterEach, describe, expect, it } from 'vitest'
import { afterEach, describe, expect, it } from 'vite-plus/test'
import { isHttpClientError } from '@/errors/base'
import { MembersClient } from './members.js'
import { WorkspacesClient } from './workspaces.js'

View File

@ -1,7 +1,7 @@
import type { DifyMock } from '@test/fixtures/dify-mock/server'
import { startMock } from '@test/fixtures/dify-mock/server'
import { testHttpClient } from '@test/fixtures/http-client'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { MetaClient } from './meta.js'
describe('MetaClient', () => {

View File

@ -1,5 +1,5 @@
import type { HttpClient } from '@/http/types'
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it, vi } from 'vite-plus/test'
import { PermittedExternalAppsClient } from './permitted-external-apps'
function fakeHttp() {

View File

@ -1,7 +1,7 @@
import type { StubServer } from '@test/fixtures/stub-server'
import { testHttpClient } from '@test/fixtures/http-client'
import { jsonResponder, startStubServer } from '@test/fixtures/stub-server'
import { afterEach, describe, expect, it } from 'vitest'
import { afterEach, describe, expect, it } from 'vite-plus/test'
import { isHttpClientError } from '@/errors/base'
import { WorkspacesClient } from './workspaces.js'

View File

@ -1,7 +1,7 @@
import type { AccountContext } from './hosts'
import { useTempConfigDir } from '@test/fixtures/config-dir'
import { MemStore } from '@test/fixtures/mem-store'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { AccountContextSchema, notLoggedInError, Registry, RegistrySchema } from './hosts'
describe('RegistrySchema', () => {

View File

@ -3,7 +3,7 @@ import { mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { dump, load } from 'js-yaml'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { ENV_CACHE_DIR } from '@/store/dir'
import { CACHE_APP_INFO, cachePath, getCache } from '@/store/manager'
import { platform } from '@/sys/index'

View File

@ -1,7 +1,7 @@
import { mkdtemp, rm } from 'node:fs/promises'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { ENV_CACHE_DIR } from '@/store/dir'
import { CACHE_COMPAT, getCache } from '@/store/manager'
import { loadCompatStore } from './compat-store'

View File

@ -2,7 +2,7 @@ import { mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'
import { tmpdir } from 'node:os'
import { dirname, join } from 'node:path'
import { load } from 'js-yaml'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { ENV_CACHE_DIR } from '@/store/dir'
import { CACHE_NUDGE, cachePath, getCache } from '@/store/manager'
import { loadNudgeStore, WARN_INTERVAL_MS } from './nudge-store'

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { resolveRetryAttempts } from './global-flags'
describe('resolveRetryAttempts', () => {

View File

@ -1,5 +1,5 @@
import type { CommandConstructor } from '@/framework/command'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import Login from '@/commands/auth/login/index'
import DescribeApp from '@/commands/describe/app/index'
import ExportStudioApp from '@/commands/export/studio-app/index'

View File

@ -6,7 +6,7 @@ import { useTempConfigDir } from '@test/fixtures/config-dir'
import { startMock } from '@test/fixtures/dify-mock/server'
import { testHttpClient } from '@test/fixtures/http-client'
import { MemStore } from '@test/fixtures/mem-store'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vite-plus/test'
import { Registry } from '@/auth/hosts'
import { bufferStreams } from '@/sys/io/streams'
import { listAllSessions, runDevicesList, runDevicesRevoke } from './devices.js'

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { Registry } from '@/auth/hosts'
import { stringifyOutput, table } from '@/framework/output'
import { runAuthList } from './list'

View File

@ -1,6 +1,6 @@
import type { Clock } from './device-flow'
import type { CodeResponse, PollRequest, PollResult, PollSuccess } from '@/api/oauth-device'
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it, vi } from 'vite-plus/test'
import { BaseError } from '@/errors/base'
import { ErrorCode } from '@/errors/codes'
import {

View File

@ -6,7 +6,7 @@ import { useTempConfigDir } from '@test/fixtures/config-dir'
import { startMock } from '@test/fixtures/dify-mock/server'
import { testHttpClient } from '@test/fixtures/http-client'
import { MemStore } from '@test/fixtures/mem-store'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { DeviceFlowApi } from '@/api/oauth-device'
import { createHttpClient } from '@/http/client'
import { bufferStreams } from '@/sys/io/streams'

View File

@ -2,7 +2,7 @@ import { readFile } from 'node:fs/promises'
import { join } from 'node:path'
import { useTempConfigDir } from '@test/fixtures/config-dir'
import { MemStore } from '@test/fixtures/mem-store'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { Registry } from '@/auth/hosts'
import { bufferStreams } from '@/sys/io/streams'
import { runLogout } from './logout.js'

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { Registry } from '@/auth/hosts'
import { bufferStreams } from '@/sys/io/streams'
import { runWhoami } from './whoami'

View File

@ -1,5 +1,5 @@
import { useTempConfigDir } from '@test/fixtures/config-dir'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { isBaseError } from '@/errors/base'
import { ErrorCode } from '@/errors/codes'
import { getConfigurationStore } from '@/store/manager'

View File

@ -1,5 +1,5 @@
import { useTempConfigDir } from '@test/fixtures/config-dir'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { loadConfig } from '@/config/config-loader'
import { isBaseError } from '@/errors/base'
import { ErrorCode, ExitCode } from '@/errors/codes'

View File

@ -1,5 +1,5 @@
import { useTempConfigDir } from '@test/fixtures/config-dir'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { loadConfig } from '@/config/config-loader'
import { isBaseError } from '@/errors/base'
import { ErrorCode } from '@/errors/codes'

View File

@ -1,5 +1,5 @@
import { useTempConfigDir } from '@test/fixtures/config-dir'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { getConfigurationStore } from '@/store/manager'
import { runConfigView } from './run'

View File

@ -1,5 +1,5 @@
/// <reference types="vite/client" />
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { isExcludedCommandPath } from '@/framework/command-fs'
const INDEX_MODULES = import.meta.glob<{ default?: unknown }>('./**/index.ts', { eager: true })

View File

@ -1,6 +1,6 @@
import type { ActiveContext } from '@/auth/hosts'
import type { HttpClient } from '@/http/types'
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it, vi } from 'vite-plus/test'
import { bufferStreams } from '@/sys/io/streams'
import { runCreateMember } from './run.js'

View File

@ -1,6 +1,6 @@
import type { ActiveContext } from '@/auth/hosts'
import type { HttpClient } from '@/http/types'
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it, vi } from 'vite-plus/test'
import { bufferStreams } from '@/sys/io/streams'
import { runDeleteMember } from './run.js'

View File

@ -5,7 +5,7 @@ import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { startMock } from '@test/fixtures/dify-mock/server'
import { testHttpClient } from '@test/fixtures/http-client'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vite-plus/test'
import { loadAppInfoCache } from '@/cache/app-info'
import { formatted, stringifyOutput } from '@/framework/output'
import { ENV_CACHE_DIR } from '@/store/dir'

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { runEnvList } from './run-list'
const stub =

View File

@ -5,7 +5,7 @@ import { join } from 'node:path'
import { DSL_YAML } from '@test/fixtures/dify-mock/scenarios'
import { startMock } from '@test/fixtures/dify-mock/server'
import { testHttpClient } from '@test/fixtures/http-client'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { bufferStreams } from '@/sys/io/streams'
import { runExportApp } from './run.js'

View File

@ -1,5 +1,5 @@
import { zSupportedAppType } from '@dify/contracts/api/openapi/zod.gen'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
// The `get app --mode` whitelist is derived from this generated enum (see index.ts).
// These pins guard the original bug: the CLI must not advertise modes the backend

View File

@ -3,7 +3,7 @@ import type { ActiveContext } from '@/auth/hosts'
import type { HttpClient } from '@/http/types'
import { startMock } from '@test/fixtures/dify-mock/server'
import { testHttpClient } from '@test/fixtures/http-client'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vite-plus/test'
import { stringifyOutput, table } from '@/framework/output'
import { AppListOutput } from './handlers.js'
import { runGetApp } from './run.js'

View File

@ -1,7 +1,7 @@
import type { MemberListResponse } from '@dify/contracts/api/openapi/types.gen'
import type { ActiveContext } from '@/auth/hosts'
import type { HttpClient } from '@/http/types'
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it, vi } from 'vite-plus/test'
import { bufferStreams } from '@/sys/io/streams'
import { runGetMember } from './run.js'

View File

@ -1,5 +1,5 @@
import type { WorkspaceListResponse } from '@dify/contracts/api/openapi/types.gen'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { WorkspaceListOutput, WorkspaceRow } from './handlers'
function env(): WorkspaceListResponse {

View File

@ -2,7 +2,7 @@ import type { DifyMock } from '@test/fixtures/dify-mock/server'
import type { ActiveContext } from '@/auth/hosts'
import { startMock } from '@test/fixtures/dify-mock/server'
import { testHttpClient } from '@test/fixtures/http-client'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { stringifyOutput, table } from '@/framework/output'
import { WorkspaceListOutput } from './handlers.js'
import { EMPTY_WORKSPACES_MESSAGE, runGetWorkspace } from './run.js'

View File

@ -7,7 +7,7 @@ import { join } from 'node:path'
import { DSL_YAML } from '@test/fixtures/dify-mock/scenarios'
import { startMock } from '@test/fixtures/dify-mock/server'
import { testHttpClient } from '@test/fixtures/http-client'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { AppDslClient } from '@/api/app-dsl'
import { bufferStreams } from '@/sys/io/streams'
import { ZERO } from '@/util/uuid.js'

View File

@ -1,5 +1,5 @@
import type { ActiveContext } from '@/auth/hosts'
import { afterEach, describe, expect, it, vi } from 'vitest'
import { afterEach, describe, expect, it, vi } from 'vite-plus/test'
import { AppRunClient } from '@/api/app-run'
import { AppsClient } from '@/api/apps'
import { PermittedExternalAppsClient } from '@/api/permitted-external-apps'

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import RunApp from './index'
describe('run app agentGuide', () => {

View File

@ -1,5 +1,5 @@
import type { ParsedFileFlag } from './file-flags'
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it, vi } from 'vite-plus/test'
import { difyFileType, parseFileFlag, resolveFileInputs } from './file-flags'
describe('parseFileFlag', () => {

View File

@ -1,5 +1,5 @@
import type { HitlPauseData, HitlPausePayload } from './sse-collector'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { buildHitlExitObject, renderHitlHint } from './hitl-render'
function payload(overrides: Partial<HitlPauseData> = {}): HitlPausePayload {

View File

@ -6,7 +6,7 @@ import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { startMock } from '@test/fixtures/dify-mock/server'
import { testHttpClient } from '@test/fixtures/http-client'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vite-plus/test'
import { loadAppInfoCache } from '@/cache/app-info'
import { resumeApp } from '@/commands/resume/app/run'
import { ENV_CACHE_DIR } from '@/store/dir'

View File

@ -1,6 +1,6 @@
import type { HttpClientError } from '@/errors/base'
import type { SseEvent } from '@/http/sse'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { collect, collectorFor, decodeStreamError, HitlPauseError } from './sse-collector'
const enc = new TextEncoder()

View File

@ -1,7 +1,7 @@
import type { SseEvent } from '@/http/sse'
import { Buffer } from 'node:buffer'
import { PassThrough, Writable } from 'node:stream'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { HitlPauseError } from './sse-collector'
import { streamPrinterFor } from './stream-handlers'

View File

@ -1,6 +1,6 @@
import type { ActiveContext } from '@/auth/hosts'
import type { HttpClient } from '@/http/types'
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it, vi } from 'vite-plus/test'
import { bufferStreams } from '@/sys/io/streams'
import { runSetMember } from './run.js'

View File

@ -1,5 +1,5 @@
import type { CommandTree } from '@/framework/registry'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { ExitCode } from '@/errors/codes'
import { run } from '@/framework/run'
import { renderSkill } from '@/help/skill'

View File

@ -1,7 +1,7 @@
import { mkdir, mkdtemp, rm } from 'node:fs/promises'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { AGENTS, detectAgents } from './registry'
describe('detectAgents', () => {

View File

@ -3,7 +3,7 @@ import { existsSync } from 'node:fs'
import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { renderSkill } from '@/help/skill'
import { runSkillsInstall } from './run'

View File

@ -1,6 +1,6 @@
import { useTempConfigDir } from '@test/fixtures/config-dir'
import { MemStore } from '@test/fixtures/mem-store'
import { beforeEach, describe, expect, it } from 'vitest'
import { beforeEach, describe, expect, it } from 'vite-plus/test'
import { Registry } from '@/auth/hosts'
import { bufferStreams } from '@/sys/io/streams'
import { runUseAccount } from './use-account'

View File

@ -1,5 +1,5 @@
import { useTempConfigDir } from '@test/fixtures/config-dir'
import { beforeEach, describe, expect, it } from 'vitest'
import { beforeEach, describe, expect, it } from 'vite-plus/test'
import { Registry } from '@/auth/hosts'
import { bufferStreams } from '@/sys/io/streams'
import { runUseHost } from './use-host'

View File

@ -5,7 +5,7 @@ import type {
import type { ActiveContext } from '@/auth/hosts'
import type { HttpClient } from '@/http/types'
import { useTempConfigDir } from '@test/fixtures/config-dir'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { beforeEach, describe, expect, it, vi } from 'vite-plus/test'
import { Registry } from '@/auth/hosts'
import { selectFromList } from '@/sys/io/select'
import { bufferStreams } from '@/sys/io/streams'

View File

@ -1,4 +1,4 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vite-plus/test'
import * as info from '@/version/info'
import * as probe from '@/version/probe'
import Version, { COMPAT_FAIL_EXIT_CODE } from './index'

View File

@ -1,6 +1,6 @@
import type { YamlStore } from '@/store/store'
import { useTempConfigDir } from '@test/fixtures/config-dir'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { isBaseError } from '@/errors/base'
import { ErrorCode } from '@/errors/codes'
import { getConfigurationStore } from '@/store/manager'

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { isBaseError } from '@/errors/base'
import { ErrorCode } from '@/errors/codes'
import { getKey, knownKeyNames, knownKeys, lookupKey, setKey, unsetKey } from './keys'

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { CONFIG_FILE_NAME } from '@/store/manager'
import { ALLOWED_FORMATS, ConfigFileSchema, CURRENT_SCHEMA_VERSION, emptyConfig } from './schema'

View File

@ -1,4 +1,4 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { ENV_REGISTRY, getEnv, lookupEnv, resolveEnv } from './registry'
describe('env registry', () => {

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { BaseError, HttpClientError, isBaseError, newError, unknownError } from './base'
import { ErrorCode, ExitCode } from './codes'

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { ALL_ERROR_CODES, CODE_TO_EXIT_MAP, ErrorCode, ExitCode, exitFor } from './codes'
describe('error codes', () => {

View File

@ -1,5 +1,5 @@
import type { ErrorBody } from '@dify/contracts/api/openapi/types.gen'
import { afterEach, describe, expect, it } from 'vitest'
import { afterEach, describe, expect, it } from 'vite-plus/test'
import { setVerbose } from '@/framework/context'
import { HttpClientError } from './base'
import { ErrorCode } from './codes'

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { isCommandIndexPath, isExcludedCommandPath } from './command-fs'
describe('isExcludedCommandPath', () => {

View File

@ -1,5 +1,5 @@
import type { FlagDefinition } from './types'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { OutputFormatNotSupportedError, UnsupportedArgValueError } from './errors'
describe('OutputFormatNotSupportedError', () => {

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { UnsupportedArgValueError } from './errors'
import { Args, Flags, parseArgv } from './flags'

View File

@ -1,6 +1,6 @@
import type { CommandConstructor } from './command'
import type { CommandTree } from './registry'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { Args, Flags } from './flags'
import { formatHelp, formatTopLevelHelp } from './help'

View File

@ -1,5 +1,5 @@
import type { FormattedPrintable, NamePrintable, TablePrintable } from './output'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { OutputFormatNotSupportedError } from './errors'
import { formatted, raw, stringifyOutput, table } from './output'

View File

@ -1,5 +1,5 @@
import type { CommandTree } from './registry'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { Command } from './command'
import { findSuggestions, resolveCommand } from './registry'

View File

@ -1,6 +1,6 @@
import type { CommandConstructor } from './command'
import type { CommandTree } from './registry'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { BaseError, HttpClientError, newError } from '@/errors/base'
import { ErrorCode, ExitCode } from '@/errors/codes'
import { CONTRACT } from '@/help/contract'

View File

@ -1,5 +1,5 @@
import type { ErrorBody } from '@dify/contracts/api/openapi/types.gen'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { HttpClientError, newError } from '@/errors/base'
import { ErrorCode } from '@/errors/codes'
import { CONTRACT } from './contract'

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { commandTree } from '@/commands/tree.generated'
import { collectCommands } from '@/framework/registry'
import { versionInfo } from '@/version/info'

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { ENV_REGISTRY } from '@/env/registry'
import { findTopic, TOPICS } from './topics'

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { buildBody, isJSONSerializable } from './body.js'
describe('isJSONSerializable', () => {

View File

@ -5,7 +5,7 @@ import { mkdtempSync, readFileSync, rmSync } from 'node:fs'
import * as https from 'node:https'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
import { afterAll, beforeAll, describe, expect, it } from 'vite-plus/test'
import { createHttpClient } from './client.js'
function generateSelfSignedCert(dir: string): { key: Buffer; cert: Buffer } {

View File

@ -2,7 +2,7 @@ import type { DifyMock } from '@test/fixtures/dify-mock/server'
import type { AddressInfo } from 'node:net'
import * as http from 'node:http'
import { startMock } from '@test/fixtures/dify-mock/server'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vite-plus/test'
import { isBaseError, isHttpClientError } from '@/errors/base'
import { ErrorCode } from '@/errors/codes'
import { openAPIBase } from '@/util/host'

View File

@ -1,5 +1,5 @@
import type { HttpClientError } from '@/errors/base'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { ErrorCode } from '@/errors/codes'
import { classifyResponse } from './error-mapper'

View File

@ -1,7 +1,7 @@
import type { StubServer } from '@test/fixtures/stub-server'
import type { HttpClientError } from '@/errors/base'
import { jsonResponder, startStubServer } from '@test/fixtures/stub-server'
import { afterEach, describe, expect, it } from 'vitest'
import { afterEach, describe, expect, it } from 'vite-plus/test'
import { isHttpClientError } from '@/errors/base'
import { ErrorCode } from '@/errors/codes'
import { openAPIBase } from '@/util/host'

View File

@ -1,4 +1,4 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vite-plus/test'
const PROXY_KEYS = [
'HTTP_PROXY',

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import {
classifyRateLimit,
MAX_HONORED_WAIT_MS,

View File

@ -1,5 +1,5 @@
import type { FetchContext, HttpMethod, ResolvedOptions } from './types.js'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { backoffDelay, isIdempotentRetryMethod, shouldRetry } from './retry.js'
function ctxFor(method: HttpMethod): FetchContext {

View File

@ -1,5 +1,5 @@
import type { SseEvent } from './sse'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { eventNameFromDifyData, normalizeDifyStream } from './sse-dify'
const enc = new TextEncoder()

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { parseSSE } from './sse'
function streamOf(...chunks: string[]): ReadableStream<Uint8Array> {

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { appendSearchParams, joinURL } from './url.js'
describe('joinURL', () => {

View File

@ -1,4 +1,4 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { isBaseError } from '@/errors/base'
import { ExitCode } from '@/errors/codes'
import { LIMIT_DEFAULT, LIMIT_MAX, LIMIT_MIN, parseLimit } from './limit'

View File

@ -1,5 +1,5 @@
import { useTempConfigDir } from '@test/fixtures/config-dir'
import { describe, expect, it } from 'vitest'
import { describe, expect, it } from 'vite-plus/test'
import { loadConfig } from '@/config/config-loader'
import { emptyConfig } from '@/config/schema'
import { saveConfig } from './config-writer'

View File

@ -1,4 +1,4 @@
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { beforeEach, describe, expect, it, vi } from 'vite-plus/test'
import { BaseError } from '@/errors/base'
import { ErrorCode } from '@/errors/codes'

View File

@ -1,4 +1,4 @@
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { beforeEach, describe, expect, it, vi } from 'vite-plus/test'
const passwords = new Map<string, string>()
const setPassword = vi.fn()

View File

@ -1,5 +1,5 @@
import type { TokenStore } from './token-store'
import { describe, expect, it, vi } from 'vitest'
import { describe, expect, it, vi } from 'vite-plus/test'
import { detectTokenStore, getTokenStore } from './manager'
function memStore(label: string): TokenStore & { _label: string } {

View File

@ -2,7 +2,7 @@ import { existsSync, readFileSync, statSync, writeFileSync } from 'node:fs'
import { mkdtemp, rm, writeFile } from 'node:fs/promises'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { BadYamlFormatError, ConcurrentAccessError } from './errors'
import { YamlStore } from './store'

View File

@ -1,7 +1,7 @@
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
import { afterEach, beforeEach, describe, expect, it } from 'vite-plus/test'
import { FileTokenStore } from './token-store'
describe('FileTokenStore', () => {

Some files were not shown because too many files have changed in this diff Show More