Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

chore: replace tsx with native Node TypeScript execution (#42742)

Stephen Zhou1fc040183c62
diff --git a/.github/workflows/accessibility-e2e.yml b/.github/workflows/accessibility-e2e.yml
index 362d7d94e9c..8822b9b12e0 100644
--- a/.github/workflows/accessibility-e2e.yml
+++ b/.github/workflows/accessibility-e2e.yml
@@ -80,7 +80,7 @@ jobs:
if [[ "$WCAG_PAGE" == "all" ]]; then
vp run e2e:accessibility:${{ inputs.level }}
else
- pnpm exec tsx ./scripts/run-cucumber.ts --full -- --tags "@axe and @wcag-${{ inputs.level }} and @wcag-page-$WCAG_PAGE"
+ pnpm exec node ./scripts/run-cucumber.ts --full -- --tags "@axe and @wcag-${{ inputs.level }} and @wcag-page-$WCAG_PAGE"
fi
- name: Upload accessibility Cucumber report
diff --git a/.github/workflows/cli-smoke.yml b/.github/workflows/cli-smoke.yml
index 7c70a52428b..13ed79cac23 100644
--- a/.github/workflows/cli-smoke.yml
+++ b/.github/workflows/cli-smoke.yml
@@ -51,7 +51,7 @@ jobs:
- name: Run smoke against live dify
working-directory: ./cli
- run: pnpm exec tsx scripts/run-smoke.ts --base-url http://localhost:5001
+ run: pnpm exec node scripts/run-smoke.ts --base-url http://localhost:5001
- name: Dump dify logs on failure
if: failure()
diff --git a/.github/workflows/post-merge.yml b/.github/workflows/post-merge.yml
index bb2deed6450..4b00687fb6e 100644
--- a/.github/workflows/post-merge.yml
+++ b/.github/workflows/post-merge.yml
@@ -36,7 +36,6 @@ jobs:
- 'e2e/package.json'
- 'e2e/test-env.ts'
- 'e2e/tsconfig.json'
- - 'e2e/tsx-register.js'
- 'package.json'
- 'pnpm-lock.yaml'
- '.github/workflows/post-merge.yml'
diff --git a/e2e/AGENTS.md b/e2e/AGENTS.md
index 73e70c710bb..379924286b3 100644
--- a/e2e/AGENTS.md
+++ b/e2e/AGENTS.md
@@ -9,7 +9,7 @@ Run commands from the repository root. Install dependencies and browsers once wi
- Existing initialized instance: `pnpm -C e2e e2e`
- Standalone automated WCAG Level A scan: `pnpm -C e2e e2e:accessibility:a`
- Standalone automated WCAG Level AA scan: `pnpm -C e2e e2e:accessibility:aa`
-- One-page automated WCAG scan: `pnpm -C e2e exec tsx ./scripts/run-cucumber.ts --full -- --tags "@axe and @wcag-a and @wcag-page-studio"` (replace the level and page tag as needed)
+- One-page automated WCAG scan: `pnpm -C e2e exec node ./scripts/run-cucumber.ts --full -- --tags "@axe and @wcag-a and @wcag-page-studio"` (replace the level and page tag as needed)
- Reset, initialize, and run deterministic scenarios: `pnpm -C e2e e2e:full`
- Prepare and run scenarios backed by shared fixtures: `E2E_START_AGENT_BACKEND=1 pnpm -C e2e e2e:prepared`
- Tagged subset: `pnpm -C e2e e2e -- --tags @smoke`
diff --git a/e2e/cucumber.config.ts b/e2e/cucumber.config.ts
index b7768c36d7b..b00224f4b87 100644
--- a/e2e/cucumber.config.ts
+++ b/e2e/cucumber.config.ts
@@ -1,5 +1,5 @@
import type { IConfiguration } from '@cucumber/cucumber'
-import './scripts/env-register'
+import './scripts/env-register.ts'
const hasCliTags = process.argv.some((arg) => arg === '--tags' || arg.startsWith('--tags='))
const defaultNonExternalTags =
@@ -15,7 +15,7 @@ const config = {
'html:./cucumber-report/report.html',
'message:./cucumber-report/report.ndjson',
],
- import: ['./tsx-register.js', 'features/**/*.ts'],
+ import: ['features/**/*.ts'],
paths: ['features/**/*.feature'],
tags,
timeout: 60_000,
diff --git a/e2e/features/agent-v2/support/access-point.ts b/e2e/features/agent-v2/support/access-point.ts
index 014e4a3c53d..e60f0420330 100644
--- a/e2e/features/agent-v2/support/access-point.ts
+++ b/e2e/features/agent-v2/support/access-point.ts
@@ -1,6 +1,6 @@
import type { AgentAppDetailWithSite } from '@dify/contracts/api/console/agent/types.gen'
import type { ChatRequestPayloadWithUser } from '@dify/contracts/api/service/types.gen'
-import { consumeServiceApiSse, SERVICE_API_STREAM_TIMEOUT_MS } from './service-api-sse'
+import { consumeServiceApiSse, SERVICE_API_STREAM_TIMEOUT_MS } from './service-api-sse.ts'
export type AgentServiceApiChatResult = {
body: unknown
diff --git a/e2e/features/agent-v2/support/agent-build-draft.ts b/e2e/features/agent-v2/support/agent-build-draft.ts
index 7946739ac53..8e9dfcbdaa9 100644
--- a/e2e/features/agent-v2/support/agent-build-draft.ts
+++ b/e2e/features/agent-v2/support/agent-build-draft.ts
@@ -2,7 +2,7 @@ import type {
AgentBuildDraftResponse,
AgentSoulConfig,
} from '@dify/contracts/api/console/agent/types.gen'
-import type { ConsoleClient } from '../../../support/api/console-client'
+import type { ConsoleClient } from '../../../support/api/console-client.ts'
import { ORPCError } from '@orpc/client'
export async function saveAgentBuildDraft(
diff --git a/e2e/features/agent-v2/support/agent.ts b/e2e/features/agent-v2/support/agent.ts
index c2fa98ea081..017782707c6 100644
--- a/e2e/features/agent-v2/support/agent.ts
+++ b/e2e/features/agent-v2/support/agent.ts
@@ -6,13 +6,13 @@ import type {
AgentReferencingWorkflowsResponse,
AgentSoulConfig,
} from '@dify/contracts/api/console/agent/types.gen'
-import type { ConsoleClient } from '../../../support/api/console-client'
-import { assertE2EResourceName, createE2EResourceName } from '../../../support/naming'
+import type { ConsoleClient } from '../../../support/api/console-client.ts'
+import { assertE2EResourceName, createE2EResourceName } from '../../../support/naming.ts'
import {
createPublishableAgentSoulConfig,
defaultAgentSoulConfig,
normalAgentSoulConfig,
-} from './agent-soul'
+} from './agent-soul.ts'
export type CreateTestAgentOptions = {
description?: string
diff --git a/e2e/features/agent-v2/support/config-assets.ts b/e2e/features/agent-v2/support/config-assets.ts
index abc4be6e6eb..67ec146bf74 100644
--- a/e2e/features/agent-v2/support/config-assets.ts
+++ b/e2e/features/agent-v2/support/config-assets.ts
@@ -4,7 +4,7 @@ import type {
AgentConfigSkillRefConfig,
AgentConfigSkillUploadResponse,
} from '@dify/contracts/api/console/agent/types.gen'
-import type { ConsoleClient } from '../../../support/api/console-client'
+import type { ConsoleClient } from '../../../support/api/console-client.ts'
import { Buffer } from 'node:buffer'
import { readFile } from 'node:fs/promises'
import path from 'node:path'
diff --git a/e2e/features/agent-v2/support/fixtures/access.ts b/e2e/features/agent-v2/support/fixtures/access.ts
index bb4ad8e7206..f0091d81365 100644
--- a/e2e/features/agent-v2/support/fixtures/access.ts
+++ b/e2e/features/agent-v2/support/fixtures/access.ts
@@ -1,8 +1,8 @@
-import type { ConsoleClient } from '../../../../support/api/console-client'
-import type { DifyWorld } from '../../../support/world'
-import type { PreseededResource } from './common'
-import { requirePreseededAgent, requirePreseededWorkflow } from './agents'
-import { failFixturePrerequisite } from './common'
+import type { ConsoleClient } from '../../../../support/api/console-client.ts'
+import type { DifyWorld } from '../../../support/world.ts'
+import type { PreseededResource } from './common.ts'
+import { requirePreseededAgent, requirePreseededWorkflow } from './agents.ts'
+import { failFixturePrerequisite } from './common.ts'
export async function requirePreseededAgentWorkflowReference(
world: DifyWorld,
diff --git a/e2e/features/agent-v2/support/fixtures/agent-backend.ts b/e2e/features/agent-v2/support/fixtures/agent-backend.ts
index 2df62dcafcd..70650e514b0 100644
--- a/e2e/features/agent-v2/support/fixtures/agent-backend.ts
+++ b/e2e/features/agent-v2/support/fixtures/agent-backend.ts
@@ -1,5 +1,5 @@
-import type { DifyWorld } from '../../../support/world'
-import { failFixturePrerequisite } from './common'
+import type { DifyWorld } from '../../../support/world.ts'
+import { failFixturePrerequisite } from './common.ts'
const isTruthyEnv = (value: string | undefined) => value === '1' || value === 'true'
diff --git a/e2e/features/agent-v2/support/fixtures/agents.ts b/e2e/features/agent-v2/support/fixtures/agents.ts
index 6636a2ee524..43d351f9eac 100644
--- a/e2e/features/agent-v2/support/fixtures/agents.ts
+++ b/e2e/features/agent-v2/support/fixtures/agents.ts
@@ -1,12 +1,12 @@
-import type { ConsoleClient } from '../../../../support/api/console-client'
-import type { DifyWorld } from '../../../support/world'
-import type { PreseededResource } from './common'
+import type { ConsoleClient } from '../../../../support/api/console-client.ts'
+import type { DifyWorld } from '../../../support/world.ts'
+import type { PreseededResource } from './common.ts'
import {
agentBuilderExpectedTokens,
agentBuilderFixedInputs,
agentBuilderPreseededResources,
-} from '../agent-builder-resources'
-import { agentBuilderTestMaterials } from '../test-materials'
+} from '../agent-builder-resources.ts'
+import { agentBuilderTestMaterials } from '../test-materials.ts'
import {
asArray,
asRecord,
@@ -14,9 +14,9 @@ import {
failFixturePrerequisite,
findResourceByName,
hasNamedOrKeyedEntry,
-} from './common'
-import { requireReadyPreseededDataset } from './datasets'
-import { requireAgentBuilderStableChatModel } from './models'
+} from './common.ts'
+import { requireReadyPreseededDataset } from './datasets.ts'
+import { requireAgentBuilderStableChatModel } from './models.ts'
import {
findToolEntry,
hasToolEntry,
@@ -24,7 +24,7 @@ import {
requirePreseededTool,
splitToolDisplayName,
splitToolResourceId,
-} from './tools'
+} from './tools.ts'
const hasKnowledgeDataset = (soul: Record<string, unknown>, dataset: PreseededResource) => {
const knowledge = asRecord(soul.knowledge)
diff --git a/e2e/features/agent-v2/support/fixtures/common.ts b/e2e/features/agent-v2/support/fixtures/common.ts
index 809e7b8a77f..7572dff9602 100644
--- a/e2e/features/agent-v2/support/fixtures/common.ts
+++ b/e2e/features/agent-v2/support/fixtures/common.ts
@@ -1,4 +1,4 @@
-import type { DifyWorld } from '../../../support/world'
+import type { DifyWorld } from '../../../support/world.ts'
export type PreseededResource = NonNullable<
DifyWorld['agentBuilder']['fixtures']['preseededResources'][string]
diff --git a/e2e/features/agent-v2/support/fixtures/datasets.ts b/e2e/features/agent-v2/support/fixtures/datasets.ts
index bcfcc9369fb..1c7ec293ead 100644
--- a/e2e/features/agent-v2/support/fixtures/datasets.ts
+++ b/e2e/features/agent-v2/support/fixtures/datasets.ts
@@ -2,15 +2,15 @@ import type {
DatasetListItemResponse,
DocumentWithSegmentsListResponse,
} from '@dify/contracts/api/console/datasets/types.gen'
-import type { ConsoleClient } from '../../../../support/api/console-client'
-import type { DifyWorld } from '../../../support/world'
-import type { PreseededResource } from './common'
+import type { ConsoleClient } from '../../../../support/api/console-client.ts'
+import type { DifyWorld } from '../../../support/world.ts'
+import type { PreseededResource } from './common.ts'
import {
agentBuilderExpectedTokens,
agentBuilderFixedInputs,
agentBuilderPreseededResources,
-} from '../agent-builder-resources'
-import { failFixturePrerequisite, findResourceByName } from './common'
+} from '../agent-builder-resources.ts'
+import { failFixturePrerequisite, findResourceByName } from './common.ts'
type DocumentIndexingStatus =
| 'cleaning'
diff --git a/e2e/features/agent-v2/support/fixtures/models.ts b/e2e/features/agent-v2/support/fixtures/models.ts
index b00d1448a95..43f4888b420 100644
--- a/e2e/features/agent-v2/support/fixtures/models.ts
+++ b/e2e/features/agent-v2/support/fixtures/models.ts
@@ -1,7 +1,7 @@
-import type { ConsoleClient } from '../../../../support/api/console-client'
-import type { DifyWorld } from '../../../support/world'
-import { agentBuilderPreseededResources } from '../agent-builder-resources'
-import { failFixturePrerequisite } from './common'
+import type { ConsoleClient } from '../../../../support/api/console-client.ts'
+import type { DifyWorld } from '../../../support/world.ts'
+import { agentBuilderPreseededResources } from '../agent-builder-resources.ts'
+import { failFixturePrerequisite } from './common.ts'
const stableChatModelProviderEnv = 'E2E_STABLE_MODEL_PROVIDER'
const stableChatModelNameEnv = 'E2E_STABLE_MODEL_NAME'
diff --git a/e2e/features/agent-v2/support/fixtures/tools.ts b/e2e/features/agent-v2/support/fixtures/tools.ts
index b380848920b..0fd90b76a87 100644
--- a/e2e/features/agent-v2/support/fixtures/tools.ts
+++ b/e2e/features/agent-v2/support/fixtures/tools.ts
@@ -1,7 +1,7 @@
-import type { ConsoleClient } from '../../../../support/api/console-client'
-import type { DifyWorld } from '../../../support/world'
-import type { PreseededResource } from './common'
-import { asRecord, asString, failFixturePrerequisite, matchesNameOrLabel } from './common'
+import type { ConsoleClient } from '../../../../support/api/console-client.ts'
+import type { DifyWorld } from '../../../support/world.ts'
+import type { PreseededResource } from './common.ts'
+import { asRecord, asString, failFixturePrerequisite, matchesNameOrLabel } from './common.ts'
export const splitToolDisplayName = (resourceName: string) => {
const [providerName, toolName] = resourceName.split('/').map((item) => item.trim())
diff --git a/e2e/features/agent-v2/support/seed.ts b/e2e/features/agent-v2/support/seed.ts
index 9ad0fc7be85..22d24f1babe 100644
--- a/e2e/features/agent-v2/support/seed.ts
+++ b/e2e/features/agent-v2/support/seed.ts
@@ -5,28 +5,28 @@ import type {
} from '@dify/contracts/api/console/agent/types.gen'
import type { KnowledgeConfig } from '@dify/contracts/api/console/datasets/types.gen'
import type { ModelType } from '@dify/contracts/api/console/workspaces/types.gen'
-import type { SeedContext, SeedResource, SeedTask } from '../../../support/seed'
+import type { SeedContext, SeedResource, SeedTask } from '../../../support/seed.ts'
import { readFile } from 'node:fs/promises'
-import { createTestApp } from '../../../support/api/apps'
-import { bootstrapMarketplacePlugins } from '../../../support/marketplace-plugins'
-import { sleep } from '../../../support/process'
-import { blocked, created, skipped, updated, verified } from '../../../support/seed'
-import { createTestAgent, saveAgentComposerDraft } from './agent'
+import { createTestApp } from '../../../support/api/apps.ts'
+import { bootstrapMarketplacePlugins } from '../../../support/marketplace-plugins.ts'
+import { sleep } from '../../../support/process.ts'
+import { blocked, created, skipped, updated, verified } from '../../../support/seed.ts'
import {
agentBuilderExpectedTokens,
agentBuilderFixedInputs,
agentBuilderPreseededResources,
-} from './agent-builder-resources'
+} from './agent-builder-resources.ts'
import {
createAgentSoulConfigWithKnowledgeDataset,
createAgentSoulConfigWithModel,
normalAgentSoulConfig,
-} from './agent-soul'
-import { uploadAgentConfigFileToDraft, uploadAgentConfigSkillToDraft } from './config-assets'
-import { isRecord, matchesNameOrLabel } from './fixtures/common'
-import { splitToolDisplayName } from './fixtures/tools'
-import { agentBuilderTestMaterials, getAgentBuilderTestMaterialPath } from './test-materials'
-import { syncAgentV2WorkflowDraft } from './workflow'
+} from './agent-soul.ts'
+import { createTestAgent, saveAgentComposerDraft } from './agent.ts'
+import { uploadAgentConfigFileToDraft, uploadAgentConfigSkillToDraft } from './config-assets.ts'
+import { isRecord, matchesNameOrLabel } from './fixtures/common.ts'
+import { splitToolDisplayName } from './fixtures/tools.ts'
+import { agentBuilderTestMaterials, getAgentBuilderTestMaterialPath } from './test-materials.ts'
+import { syncAgentV2WorkflowDraft } from './workflow.ts'
type StableModel = {
name: string
diff --git a/e2e/features/agent-v2/support/test-materials.ts b/e2e/features/agent-v2/support/test-materials.ts
index a1b9a811ce8..d048b4b889e 100644
--- a/e2e/features/agent-v2/support/test-materials.ts
+++ b/e2e/features/agent-v2/support/test-materials.ts
@@ -1,4 +1,7 @@
-import { getGeneratedTextMaterialPath, getTestMaterialPath } from '../../../support/test-materials'
+import {
+ getGeneratedTextMaterialPath,
+ getTestMaterialPath,
+} from '../../../support/test-materials.ts'
export const agentBuilderTestMaterials = {
smallFile: 'agent-small-file.txt',
diff --git a/e2e/features/agent-v2/support/tools.ts b/e2e/features/agent-v2/support/tools.ts
index 8e71db91639..bba05c15cf6 100644
--- a/e2e/features/agent-v2/support/tools.ts
+++ b/e2e/features/agent-v2/support/tools.ts
@@ -1,5 +1,5 @@
-import type { DifyWorld } from '../../support/world'
-import { splitToolDisplayName, splitToolResourceId } from './fixtures/tools'
+import type { DifyWorld } from '../../support/world.ts'
+import { splitToolDisplayName, splitToolResourceId } from './fixtures/tools.ts'
export const getPreseededToolContract = (world: DifyWorld, resourceName: string) => {
const resource = world.agentBuilder.fixtures.preseededResources[resourceName]
diff --git a/e2e/features/agent-v2/support/workflow.ts b/e2e/features/agent-v2/support/workflow.ts
index 48a548787c0..382fd0824ea 100644
--- a/e2e/features/agent-v2/support/workflow.ts
+++ b/e2e/features/agent-v2/support/workflow.ts
@@ -1,5 +1,5 @@
import type { SyncDraftWorkflowPayload } from '@dify/contracts/api/console/apps/types.gen'
-import type { ConsoleClient } from '../../../support/api/console-client'
+import type { ConsoleClient } from '../../../support/api/console-client.ts'
import * as z from 'zod'
const agentV2WorkflowNodeId = 'agent-v2'
diff --git a/e2e/features/step-definitions/accessibility/axe.steps.ts b/e2e/features/step-definitions/accessibility/axe.steps.ts
index 12bbe95d01a..4c07ad74174 100644
--- a/e2e/features/step-definitions/accessibility/axe.steps.ts
+++ b/e2e/features/step-definitions/accessibility/axe.steps.ts
@@ -1,5 +1,5 @@
-import type { DifyWorld } from '../../support/world'
-import AxeBuilder from '@axe-core/playwright'
+import type { DifyWorld } from '../../support/world.ts'
+import { AxeBuilder } from '@axe-core/playwright'
import { Then } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
diff --git a/e2e/features/step-definitions/accessibility/keyboard-navigation.steps.ts b/e2e/features/step-definitions/accessibility/keyboard-navigation.steps.ts
index 25bf478bc0c..1f3b5294d3d 100644
--- a/e2e/features/step-definitions/accessibility/keyboard-navigation.steps.ts
+++ b/e2e/features/step-definitions/accessibility/keyboard-navigation.steps.ts
@@ -1,8 +1,8 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { adminCredentials } from '../../../fixtures/auth'
-import { e2eBrowser } from '../../../test-env'
+import { adminCredentials } from '../../../fixtures/auth.ts'
+import { e2eBrowser } from '../../../test-env.ts'
const getAccountMenuTrigger = (world: DifyWorld) =>
world.getPage().getByRole('button', { name: 'Account' })
diff --git a/e2e/features/step-definitions/accessibility/navigation.steps.ts b/e2e/features/step-definitions/accessibility/navigation.steps.ts
index af37b1ca6d1..e12300a7899 100644
--- a/e2e/features/step-definitions/accessibility/navigation.steps.ts
+++ b/e2e/features/step-definitions/accessibility/navigation.steps.ts
@@ -1,11 +1,11 @@
import type { Page } from '@playwright/test'
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Then, When } from '@cucumber/cucumber'
-import { waitForAgentsConsole } from '../../../support/agents'
-import { waitForAppsConsole } from '../../../support/apps'
-import { waitForConsoleHome } from '../../../support/home'
-import { waitForModelProviderIntegrations } from '../../../support/integrations'
-import { waitForKnowledgeConsole } from '../../../support/knowledge'
+import { waitForAgentsConsole } from '../../../support/agents.ts'
+import { waitForAppsConsole } from '../../../support/apps.ts'
+import { waitForConsoleHome } from '../../../support/home.ts'
+import { waitForModelProviderIntegrations } from '../../../support/integrations.ts'
+import { waitForKnowledgeConsole } from '../../../support/knowledge.ts'
type AccessibilityPageConfig = {
path: string
diff --git a/e2e/features/step-definitions/agent-v2/access-point-helpers.ts b/e2e/features/step-definitions/agent-v2/access-point-helpers.ts
index f0e5c01d776..ed196b3db0f 100644
--- a/e2e/features/step-definitions/agent-v2/access-point-helpers.ts
+++ b/e2e/features/step-definitions/agent-v2/access-point-helpers.ts
@@ -1,4 +1,4 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
export const getCurrentAgentId = (world: DifyWorld) => {
const agentId = world.createdAgentIds.at(-1)
diff --git a/e2e/features/step-definitions/agent-v2/access-point-service-api.steps.ts b/e2e/features/step-definitions/agent-v2/access-point-service-api.steps.ts
index 575efcec42b..aba2b4f123a 100644
--- a/e2e/features/step-definitions/agent-v2/access-point-service-api.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/access-point-service-api.steps.ts
@@ -1,13 +1,13 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given, Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { sendAgentServiceApiChatMessage } from '../../agent-v2/support/access-point'
+import { sendAgentServiceApiChatMessage } from '../../agent-v2/support/access-point.ts'
import {
agentBuilderExpectedTokens,
agentBuilderFixedInputs,
-} from '../../agent-v2/support/agent-builder-resources'
-import { SERVICE_API_RUNTIME_STEP_TIMEOUT_MS } from '../../agent-v2/support/service-api-sse'
-import { getCurrentAgentId, getServiceApiCard } from './access-point-helpers'
+} from '../../agent-v2/support/agent-builder-resources.ts'
+import { SERVICE_API_RUNTIME_STEP_TIMEOUT_MS } from '../../agent-v2/support/service-api-sse.ts'
+import { getCurrentAgentId, getServiceApiCard } from './access-point-helpers.ts'
const API_KEY_DIALOG_NAME = /^API Key$/i
diff --git a/e2e/features/step-definitions/agent-v2/access-point-web-app.steps.ts b/e2e/features/step-definitions/agent-v2/access-point-web-app.steps.ts
index a71d04f295d..90e7833b1c7 100644
--- a/e2e/features/step-definitions/agent-v2/access-point-web-app.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/access-point-web-app.steps.ts
@@ -1,10 +1,10 @@
import type { Page } from '@playwright/test'
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { getAgentWebAppURL } from '../../agent-v2/support/access-point'
-import { agentBuilderExpectedTokens } from '../../agent-v2/support/agent-builder-resources'
-import { getCurrentAgentId, getDialog, getWebAppCard } from './access-point-helpers'
+import { getAgentWebAppURL } from '../../agent-v2/support/access-point.ts'
+import { agentBuilderExpectedTokens } from '../../agent-v2/support/agent-builder-resources.ts'
+import { getCurrentAgentId, getDialog, getWebAppCard } from './access-point-helpers.ts'
const WEB_APP_RUNTIME_RESPONSE_STEP_TIMEOUT_MS = 180_000
diff --git a/e2e/features/step-definitions/agent-v2/access-point-workflow.steps.ts b/e2e/features/step-definitions/agent-v2/access-point-workflow.steps.ts
index 472bad694d2..65aac798785 100644
--- a/e2e/features/step-definitions/agent-v2/access-point-workflow.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/access-point-workflow.steps.ts
@@ -1,9 +1,9 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { getAgentReferencingWorkflows } from '../../agent-v2/support/agent'
-import { agentBuilderPreseededResources } from '../../agent-v2/support/agent-builder-resources'
-import { getAccessRegion, getPreseededResource } from './access-point-helpers'
+import { agentBuilderPreseededResources } from '../../agent-v2/support/agent-builder-resources.ts'
+import { getAgentReferencingWorkflows } from '../../agent-v2/support/agent.ts'
+import { getAccessRegion, getPreseededResource } from './access-point-helpers.ts'
Then(
'I should see the Agent v2 Workflow access reference for {string}',
diff --git a/e2e/features/step-definitions/agent-v2/access-point.steps.ts b/e2e/features/step-definitions/agent-v2/access-point.steps.ts
index 956d4f0b776..cef9ccb67a2 100644
--- a/e2e/features/step-definitions/agent-v2/access-point.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/access-point.steps.ts
@@ -1,15 +1,15 @@
-import type { DifyWorld } from '../../support/world'
-import type { AccessSurfaceName } from './access-point-helpers'
+import type { DifyWorld } from '../../support/world.ts'
+import type { AccessSurfaceName } from './access-point-helpers.ts'
import { Given, Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { publishAgentWithPublishableDraft } from '../../agent-v2/support/agent'
+import { publishAgentWithPublishableDraft } from '../../agent-v2/support/agent.ts'
import {
getAccessSurfaceCard,
getCurrentAgentId,
getPreseededResource,
getServiceApiCard,
getWebAppCard,
-} from './access-point-helpers'
+} from './access-point-helpers.ts'
const toggleAgentAccess = async (
world: DifyWorld,
diff --git a/e2e/features/step-definitions/agent-v2/advanced-settings.steps.ts b/e2e/features/step-definitions/agent-v2/advanced-settings.steps.ts
index 64e09de1a68..7f1cb497006 100644
--- a/e2e/features/step-definitions/agent-v2/advanced-settings.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/advanced-settings.steps.ts
@@ -1,4 +1,4 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
diff --git a/e2e/features/step-definitions/agent-v2/agent-edit.steps.ts b/e2e/features/step-definitions/agent-v2/agent-edit.steps.ts
index 0a30ed03150..bb9537f9b04 100644
--- a/e2e/features/step-definitions/agent-v2/agent-edit.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/agent-edit.steps.ts
@@ -1,22 +1,22 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given, Then, When } from '@cucumber/cucumber'
import { zPostAgentByAgentIdCopyResponse } from '@dify/contracts/api/console/agent/zod.gen'
import { expect } from '@playwright/test'
-import { createE2EResourceName } from '../../../support/naming'
+import { createE2EResourceName } from '../../../support/naming.ts'
import {
agentBuilderExpectedTokens,
agentBuilderFixedInputs,
agentBuilderPreseededResources,
-} from '../../agent-v2/support/agent-builder-resources'
-import { normalAgentPrompt } from '../../agent-v2/support/agent-soul'
-import { asArray, asRecord, asString } from '../../agent-v2/support/fixtures/common'
-import { agentBuilderTestMaterials } from '../../agent-v2/support/test-materials'
+} from '../../agent-v2/support/agent-builder-resources.ts'
+import { normalAgentPrompt } from '../../agent-v2/support/agent-soul.ts'
+import { asArray, asRecord, asString } from '../../agent-v2/support/fixtures/common.ts'
+import { agentBuilderTestMaterials } from '../../agent-v2/support/test-materials.ts'
import {
expectProviderToolActionVisible,
getCurrentAgentId,
getPreseededAgent,
openAgentKnowledgeRetrievalDialog,
-} from './configure-helpers'
+} from './configure-helpers.ts'
const getComposerInheritanceSnapshot = async (world: DifyWorld, agentId: string) => {
const draft = await world
diff --git a/e2e/features/step-definitions/agent-v2/agent-roster.steps.ts b/e2e/features/step-definitions/agent-v2/agent-roster.steps.ts
index 228a54eaa99..6ebb2ea8b59 100644
--- a/e2e/features/step-definitions/agent-v2/agent-roster.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/agent-roster.steps.ts
@@ -1,8 +1,8 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Then, When } from '@cucumber/cucumber'
import { zPostAgentResponse } from '@dify/contracts/api/console/agent/zod.gen'
import { expect } from '@playwright/test'
-import { createE2EResourceName } from '../../../support/naming'
+import { createE2EResourceName } from '../../../support/naming.ts'
When('I create an Agent v2 test agent from the Agent Roster', async function (this: DifyWorld) {
const page = this.getPage()
diff --git a/e2e/features/step-definitions/agent-v2/build-draft.steps.ts b/e2e/features/step-definitions/agent-v2/build-draft.steps.ts
index 2ec1e1c45f5..de469373b5e 100644
--- a/e2e/features/step-definitions/agent-v2/build-draft.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/build-draft.steps.ts
@@ -1,36 +1,36 @@
import type { AgentBuildDraftResponse } from '@dify/contracts/api/console/agent/types.gen'
import type { Page, Response } from '@playwright/test'
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { readFile } from 'node:fs/promises'
import { Given, Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { saveAgentComposerDraft } from '../../agent-v2/support/agent'
import {
agentBuildDraftExists,
saveAgentBuildDraft,
-} from '../../agent-v2/support/agent-build-draft'
+} from '../../agent-v2/support/agent-build-draft.ts'
import {
agentBuilderFixedInputs,
agentBuilderPreseededResources,
-} from '../../agent-v2/support/agent-builder-resources'
+} from '../../agent-v2/support/agent-builder-resources.ts'
import {
createAgentSoulConfigWithModel,
normalAgentPrompt,
normalAgentSoulConfig,
updatedAgentPrompt,
updatedAgentSoulConfig,
-} from '../../agent-v2/support/agent-soul'
-import { uploadAgentConfigFileToDraft } from '../../agent-v2/support/config-assets'
+} from '../../agent-v2/support/agent-soul.ts'
+import { saveAgentComposerDraft } from '../../agent-v2/support/agent.ts'
+import { uploadAgentConfigFileToDraft } from '../../agent-v2/support/config-assets.ts'
import {
agentBuilderTestMaterials,
getAgentBuilderTestMaterialPath,
-} from '../../agent-v2/support/test-materials'
+} from '../../agent-v2/support/test-materials.ts'
import {
expectAgentModelRequiredFeedback,
getAgentEnvVariableValue,
getCurrentAgentId,
uploadSummaryConfigSkillForBuildDraft,
-} from './configure-helpers'
+} from './configure-helpers.ts'
const BUILD_DRAFT_RUNTIME_STEP_TIMEOUT_MS = 180_000
const BUILD_DRAFT_NOTE_SYNC_TIMEOUT_MS = 30_000
diff --git a/e2e/features/step-definitions/agent-v2/configure-helpers.ts b/e2e/features/step-definitions/agent-v2/configure-helpers.ts
index 4867eb83034..3ba84bac349 100644
--- a/e2e/features/step-definitions/agent-v2/configure-helpers.ts
+++ b/e2e/features/step-definitions/agent-v2/configure-helpers.ts
@@ -1,14 +1,14 @@
import type { Locator } from '@playwright/test'
-import type { AgentComposerEnvVariable } from '../../agent-v2/support/agent-soul'
-import type { DifyWorld } from '../../support/world'
+import type { AgentComposerEnvVariable } from '../../agent-v2/support/agent-soul.ts'
+import type { DifyWorld } from '../../support/world.ts'
import { zPostAgentByAgentIdConfigFilesResponse } from '@dify/contracts/api/console/agent/zod.gen'
import { expect } from '@playwright/test'
-import { normalAgentPrompt } from '../../agent-v2/support/agent-soul'
-import { uploadAgentConfigSkillToDraft } from '../../agent-v2/support/config-assets'
+import { normalAgentPrompt } from '../../agent-v2/support/agent-soul.ts'
+import { uploadAgentConfigSkillToDraft } from '../../agent-v2/support/config-assets.ts'
import {
agentBuilderTestMaterials,
getAgentBuilderTestMaterialPath,
-} from '../../agent-v2/support/test-materials'
+} from '../../agent-v2/support/test-materials.ts'
export const getCurrentAgentId = (world: DifyWorld) => {
const agentId = world.createdAgentIds.at(-1)
diff --git a/e2e/features/step-definitions/agent-v2/configure.steps.ts b/e2e/features/step-definitions/agent-v2/configure.steps.ts
index 8fdaae41822..afb4dcbcd80 100644
--- a/e2e/features/step-definitions/agent-v2/configure.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/configure.steps.ts
@@ -1,14 +1,8 @@
import type { Page } from '@playwright/test'
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given, Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { waitForAgentConfigureAutosaved } from '../../../support/agent-configure'
-import {
- createConfiguredTestAgent,
- createTestAgent,
- getAgentConfigurePath,
- saveAgentComposerDraft,
-} from '../../agent-v2/support/agent'
+import { waitForAgentConfigureAutosaved } from '../../../support/agent-configure.ts'
import {
concurrentFirstAgentPrompt,
concurrentSecondAgentPrompt,
@@ -17,12 +11,18 @@ import {
normalAgentPrompt,
normalAgentSoulConfig,
updatedAgentPrompt,
-} from '../../agent-v2/support/agent-soul'
+} from '../../agent-v2/support/agent-soul.ts'
+import {
+ createConfiguredTestAgent,
+ createTestAgent,
+ getAgentConfigurePath,
+ saveAgentComposerDraft,
+} from '../../agent-v2/support/agent.ts'
import {
expectNormalAgentPromptDraft,
getCurrentAgentId,
getPreseededAgent,
-} from './configure-helpers'
+} from './configure-helpers.ts'
const concurrentAgentPrompts = [concurrentFirstAgentPrompt, concurrentSecondAgentPrompt]
diff --git a/e2e/features/step-definitions/agent-v2/env-editor.steps.ts b/e2e/features/step-definitions/agent-v2/env-editor.steps.ts
index 45983d796d2..3af800549ba 100644
--- a/e2e/features/step-definitions/agent-v2/env-editor.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/env-editor.steps.ts
@@ -1,8 +1,8 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { agentBuilderFixedInputs } from '../../agent-v2/support/agent-builder-resources'
-import { getAgentBuilderTestMaterialPath } from '../../agent-v2/support/test-materials'
+import { agentBuilderFixedInputs } from '../../agent-v2/support/agent-builder-resources.ts'
+import { getAgentBuilderTestMaterialPath } from '../../agent-v2/support/test-materials.ts'
import {
expectAgentEnvVariableAbsent,
expectAgentEnvVariableHidden,
@@ -14,7 +14,7 @@ import {
getCurrentAgentId,
getEnvVariableKey,
openAgentAdvancedSettings,
-} from './configure-helpers'
+} from './configure-helpers.ts'
When(
'I add the plain Agent v2 environment variable from Advanced Settings',
diff --git a/e2e/features/step-definitions/agent-v2/files.steps.ts b/e2e/features/step-definitions/agent-v2/files.steps.ts
index 95359439776..781dcb80842 100644
--- a/e2e/features/step-definitions/agent-v2/files.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/files.steps.ts
@@ -1,13 +1,13 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { agentBuilderTestMaterials } from '../../agent-v2/support/test-materials'
+import { agentBuilderTestMaterials } from '../../agent-v2/support/test-materials.ts'
import {
expectAgentConfigFileHidden,
expectAgentConfigFileSaved,
expectAgentConfigFileVisible,
uploadAgentConfigFile,
-} from './configure-helpers'
+} from './configure-helpers.ts'
When('I upload the small Agent v2 file from the Files section', async function (this: DifyWorld) {
await uploadAgentConfigFile(this, 'smallFile')
diff --git a/e2e/features/step-definitions/agent-v2/fixtures.steps.ts b/e2e/features/step-definitions/agent-v2/fixtures.steps.ts
index 1fb531ecc7a..56a1b5d3b7b 100644
--- a/e2e/features/step-definitions/agent-v2/fixtures.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/fixtures.steps.ts
@@ -1,21 +1,21 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given } from '@cucumber/cucumber'
-import { requirePreseededAgentWorkflowReference } from '../../agent-v2/support/fixtures/access'
-import { requireAgentBackendRuntime } from '../../agent-v2/support/fixtures/agent-backend'
+import { requirePreseededAgentWorkflowReference } from '../../agent-v2/support/fixtures/access.ts'
+import { requireAgentBackendRuntime } from '../../agent-v2/support/fixtures/agent-backend.ts'
import {
requirePreseededAgent,
requirePreseededDualRetrievalAgentConfiguration,
requirePreseededFullConfigAgentCoreConfiguration,
requirePreseededToolStatesAgentConfiguration,
requirePreseededWorkflow,
-} from '../../agent-v2/support/fixtures/agents'
-import { requireReadyPreseededDataset } from '../../agent-v2/support/fixtures/datasets'
+} from '../../agent-v2/support/fixtures/agents.ts'
+import { requireReadyPreseededDataset } from '../../agent-v2/support/fixtures/datasets.ts'
import {
requireAgentBuilderAgentDecisionChatModel,
requireAgentBuilderSpeechToTextModel,
requireAgentBuilderStableChatModel,
-} from '../../agent-v2/support/fixtures/models'
-import { requirePreseededTool } from '../../agent-v2/support/fixtures/tools'
+} from '../../agent-v2/support/fixtures/models.ts'
+import { requirePreseededTool } from '../../agent-v2/support/fixtures/tools.ts'
Given('the Agent Builder stable chat model is available', async function (this: DifyWorld) {
const stableModel = await requireAgentBuilderStableChatModel(this, this.getConsoleClient())
diff --git a/e2e/features/step-definitions/agent-v2/knowledge.steps.ts b/e2e/features/step-definitions/agent-v2/knowledge.steps.ts
index a409ebbea56..70f81e207d2 100644
--- a/e2e/features/step-definitions/agent-v2/knowledge.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/knowledge.steps.ts
@@ -1,18 +1,18 @@
import type { Locator } from '@playwright/test'
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given, Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { createConfiguredTestAgent } from '../../agent-v2/support/agent'
import {
agentBuilderFixedInputs,
agentBuilderPreseededResources,
-} from '../../agent-v2/support/agent-builder-resources'
+} from '../../agent-v2/support/agent-builder-resources.ts'
import {
createAgentSoulConfigWithKnowledgeDataset,
normalAgentSoulConfig,
-} from '../../agent-v2/support/agent-soul'
-import { asArray, asRecord } from '../../agent-v2/support/fixtures/common'
-import { getCurrentAgentId } from './configure-helpers'
+} from '../../agent-v2/support/agent-soul.ts'
+import { createConfiguredTestAgent } from '../../agent-v2/support/agent.ts'
+import { asArray, asRecord } from '../../agent-v2/support/fixtures/common.ts'
+import { getCurrentAgentId } from './configure-helpers.ts'
const getPreseededKnowledgeBase = (world: DifyWorld) => {
const resource =
diff --git a/e2e/features/step-definitions/agent-v2/output-variables.steps.ts b/e2e/features/step-definitions/agent-v2/output-variables.steps.ts
index 77917464595..7295f99bfb3 100644
--- a/e2e/features/step-definitions/agent-v2/output-variables.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/output-variables.steps.ts
@@ -1,11 +1,11 @@
import type { DataTable } from '@cucumber/cucumber'
import type { DeclaredOutputConfig } from '@dify/contracts/api/console/apps/types.gen'
-import type { AgentV2WorkflowOutputVariable, DifyWorld } from '../../support/world'
+import type { AgentV2WorkflowOutputVariable, DifyWorld } from '../../support/world.ts'
import { Then, When } from '@cucumber/cucumber'
import { zDeclaredOutputConfig } from '@dify/contracts/api/console/apps/zod.gen'
import { expect } from '@playwright/test'
import * as z from 'zod'
-import { getAgentV2WorkflowNodeData } from '../../agent-v2/support/workflow'
+import { getAgentV2WorkflowNodeData } from '../../agent-v2/support/workflow.ts'
const taskOutputName = 'e2e_report'
const renamedTaskOutputName = 'e2e_final_report'
diff --git a/e2e/features/step-definitions/agent-v2/publish.steps.ts b/e2e/features/step-definitions/agent-v2/publish.steps.ts
index 7faead97d26..42d08e58c65 100644
--- a/e2e/features/step-definitions/agent-v2/publish.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/publish.steps.ts
@@ -1,8 +1,8 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { waitForAgentConfigureAutosaved } from '../../../support/agent-configure'
-import { expectAgentModelRequiredFeedback, getCurrentAgentId } from './configure-helpers'
+import { waitForAgentConfigureAutosaved } from '../../../support/agent-configure.ts'
+import { expectAgentModelRequiredFeedback, getCurrentAgentId } from './configure-helpers.ts'
When('I publish the Agent v2 draft', async function (this: DifyWorld) {
const page = this.getPage()
diff --git a/e2e/features/step-definitions/agent-v2/speech-to-text.steps.ts b/e2e/features/step-definitions/agent-v2/speech-to-text.steps.ts
index 07187edf69d..c06dc9f8c58 100644
--- a/e2e/features/step-definitions/agent-v2/speech-to-text.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/speech-to-text.steps.ts
@@ -1,13 +1,13 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given, Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { voiceInputTestMaterial } from '../../../support/test-materials'
-import { createConfiguredTestAgent } from '../../agent-v2/support/agent'
+import { voiceInputTestMaterial } from '../../../support/test-materials.ts'
import {
createAgentSoulConfigWithSpeechToText,
normalAgentSoulConfig,
-} from '../../agent-v2/support/agent-soul'
-import { getCurrentAgentId } from './configure-helpers'
+} from '../../agent-v2/support/agent-soul.ts'
+import { createConfiguredTestAgent } from '../../agent-v2/support/agent.ts'
+import { getCurrentAgentId } from './configure-helpers.ts'
const getAgentInput = (world: DifyWorld) =>
world.getPage().getByPlaceholder('Describe what your agent should do')
diff --git a/e2e/features/step-definitions/agent-v2/tools.steps.ts b/e2e/features/step-definitions/agent-v2/tools.steps.ts
index d1fd0099a0b..d63e96cc7fd 100644
--- a/e2e/features/step-definitions/agent-v2/tools.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/tools.steps.ts
@@ -1,23 +1,23 @@
import type { AgentSoulDifyToolConfig } from '@dify/contracts/api/console/agent/types.gen'
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given, Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { sendAgentServiceApiChatMessage } from '../../agent-v2/support/access-point'
-import { createConfiguredTestAgent } from '../../agent-v2/support/agent'
+import { sendAgentServiceApiChatMessage } from '../../agent-v2/support/access-point.ts'
import {
agentBuilderExpectedTokens,
agentBuilderPreseededResources,
-} from '../../agent-v2/support/agent-builder-resources'
+} from '../../agent-v2/support/agent-builder-resources.ts'
import {
createAgentSoulConfigWithDifyTool,
createAgentSoulConfigWithModel,
normalAgentSoulConfig,
-} from '../../agent-v2/support/agent-soul'
-import { asArray, asRecord, asString } from '../../agent-v2/support/fixtures/common'
-import { hasToolEntry } from '../../agent-v2/support/fixtures/tools'
-import { SERVICE_API_RUNTIME_STEP_TIMEOUT_MS } from '../../agent-v2/support/service-api-sse'
-import { getPreseededToolContract } from '../../agent-v2/support/tools'
-import { expectProviderToolActionVisible, getCurrentAgentId } from './configure-helpers'
+} from '../../agent-v2/support/agent-soul.ts'
+import { createConfiguredTestAgent } from '../../agent-v2/support/agent.ts'
+import { asArray, asRecord, asString } from '../../agent-v2/support/fixtures/common.ts'
+import { hasToolEntry } from '../../agent-v2/support/fixtures/tools.ts'
+import { SERVICE_API_RUNTIME_STEP_TIMEOUT_MS } from '../../agent-v2/support/service-api-sse.ts'
+import { getPreseededToolContract } from '../../agent-v2/support/tools.ts'
+import { expectProviderToolActionVisible, getCurrentAgentId } from './configure-helpers.ts'
const getToolsSection = (world: DifyWorld) => world.getPage().getByRole('region', { name: 'Tools' })
diff --git a/e2e/features/step-definitions/agent-v2/workflow-node.steps.ts b/e2e/features/step-definitions/agent-v2/workflow-node.steps.ts
index 79453305827..0e79ae5cbf7 100644
--- a/e2e/features/step-definitions/agent-v2/workflow-node.steps.ts
+++ b/e2e/features/step-definitions/agent-v2/workflow-node.steps.ts
@@ -1,15 +1,15 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given, Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { createTestApp } from '../../../support/api/apps'
-import { createE2EResourceName } from '../../../support/naming'
-import { createConfiguredTestAgent } from '../../agent-v2/support/agent'
+import { createTestApp } from '../../../support/api/apps.ts'
+import { createE2EResourceName } from '../../../support/naming.ts'
import {
createAgentSoulConfigWithModel,
normalAgentPrompt,
normalAgentSoulConfig,
-} from '../../agent-v2/support/agent-soul'
-import { syncAgentV2WorkflowDraft } from '../../agent-v2/support/workflow'
+} from '../../agent-v2/support/agent-soul.ts'
+import { createConfiguredTestAgent } from '../../agent-v2/support/agent.ts'
+import { syncAgentV2WorkflowDraft } from '../../agent-v2/support/workflow.ts'
Given(
'a workflow app with an Agent v2 node has been created via API',
diff --git a/e2e/features/step-definitions/apps/app-detail-navigation.steps.ts b/e2e/features/step-definitions/apps/app-detail-navigation.steps.ts
index 6110d2f4305..791376d8cb7 100644
--- a/e2e/features/step-definitions/apps/app-detail-navigation.steps.ts
+++ b/e2e/features/step-definitions/apps/app-detail-navigation.steps.ts
@@ -1,4 +1,4 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { When } from '@cucumber/cucumber'
When('I navigate to the app access point page', async function (this: DifyWorld) {
diff --git a/e2e/features/step-definitions/apps/create-app.steps.ts b/e2e/features/step-definitions/apps/create-app.steps.ts
index f632f310a33..fea577bf7b6 100644
--- a/e2e/features/step-definitions/apps/create-app.steps.ts
+++ b/e2e/features/step-definitions/apps/create-app.steps.ts
@@ -1,9 +1,9 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Then, When } from '@cucumber/cucumber'
import { zPostAppsResponse } from '@dify/contracts/api/console/apps/zod.gen'
import { expect } from '@playwright/test'
-import { openBlankAppCreation } from '../../../support/apps'
-import { createE2EResourceName } from '../../../support/naming'
+import { openBlankAppCreation } from '../../../support/apps.ts'
+import { createE2EResourceName } from '../../../support/naming.ts'
const appModeByType: Record<string, string> = {
Agent: 'agent-chat',
diff --git a/e2e/features/step-definitions/apps/delete-app.steps.ts b/e2e/features/step-definitions/apps/delete-app.steps.ts
index 6179857e543..80f6894ad17 100644
--- a/e2e/features/step-definitions/apps/delete-app.steps.ts
+++ b/e2e/features/step-definitions/apps/delete-app.steps.ts
@@ -1,4 +1,4 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
diff --git a/e2e/features/step-definitions/apps/duplicate-app.steps.ts b/e2e/features/step-definitions/apps/duplicate-app.steps.ts
index 71bdf8bf0af..2abf5a3223a 100644
--- a/e2e/features/step-definitions/apps/duplicate-app.steps.ts
+++ b/e2e/features/step-definitions/apps/duplicate-app.steps.ts
@@ -1,10 +1,10 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given, When } from '@cucumber/cucumber'
import { zPostAppsByAppIdCopyResponse } from '@dify/contracts/api/console/apps/zod.gen'
import { expect } from '@playwright/test'
-import { createTestApp } from '../../../support/api/apps'
-import { waitForAppsConsole } from '../../../support/apps'
-import { createE2EResourceName } from '../../../support/naming'
+import { createTestApp } from '../../../support/api/apps.ts'
+import { waitForAppsConsole } from '../../../support/apps.ts'
+import { createE2EResourceName } from '../../../support/naming.ts'
Given('there is an existing E2E app available for testing', async function (this: DifyWorld) {
const name = createE2EResourceName('App', 'Test')
diff --git a/e2e/features/step-definitions/apps/export-app.steps.ts b/e2e/features/step-definitions/apps/export-app.steps.ts
index cf794296679..8c73c6c6c20 100644
--- a/e2e/features/step-definitions/apps/export-app.steps.ts
+++ b/e2e/features/step-definitions/apps/export-app.steps.ts
@@ -1,4 +1,4 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Buffer } from 'node:buffer'
import { readFile } from 'node:fs/promises'
import { Then } from '@cucumber/cucumber'
diff --git a/e2e/features/step-definitions/apps/publish-app.steps.ts b/e2e/features/step-definitions/apps/publish-app.steps.ts
index 9b7c402a065..905f3af537c 100644
--- a/e2e/features/step-definitions/apps/publish-app.steps.ts
+++ b/e2e/features/step-definitions/apps/publish-app.steps.ts
@@ -1,4 +1,4 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
diff --git a/e2e/features/step-definitions/apps/share-app.steps.ts b/e2e/features/step-definitions/apps/share-app.steps.ts
index 93af0e8865d..a16d9864a9b 100644
--- a/e2e/features/step-definitions/apps/share-app.steps.ts
+++ b/e2e/features/step-definitions/apps/share-app.steps.ts
@@ -1,10 +1,10 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given, Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { createTestApp } from '../../../support/api/apps'
-import { getAppSiteURL } from '../../../support/api/web-apps'
-import { syncRunnableWorkflowDraft } from '../../../support/api/workflows'
-import { createE2EResourceName } from '../../../support/naming'
+import { createTestApp } from '../../../support/api/apps.ts'
+import { getAppSiteURL } from '../../../support/api/web-apps.ts'
+import { syncRunnableWorkflowDraft } from '../../../support/api/workflows.ts'
+import { createE2EResourceName } from '../../../support/naming.ts'
Given('a workflow app has been published and shared via API', async function (this: DifyWorld) {
const client = this.getConsoleClient()
diff --git a/e2e/features/step-definitions/apps/switch-app-mode.steps.ts b/e2e/features/step-definitions/apps/switch-app-mode.steps.ts
index caf5b22e1ae..a0482e9caa6 100644
--- a/e2e/features/step-definitions/apps/switch-app-mode.steps.ts
+++ b/e2e/features/step-definitions/apps/switch-app-mode.steps.ts
@@ -1,8 +1,8 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given, Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { createTestApp } from '../../../support/api/apps'
-import { createE2EResourceName } from '../../../support/naming'
+import { createTestApp } from '../../../support/api/apps.ts'
+import { createE2EResourceName } from '../../../support/naming.ts'
Given(
'there is an existing E2E completion app available for testing',
diff --git a/e2e/features/step-definitions/apps/web-app-service.steps.ts b/e2e/features/step-definitions/apps/web-app-service.steps.ts
index 8937ba9b3c8..d4532f3c9b9 100644
--- a/e2e/features/step-definitions/apps/web-app-service.steps.ts
+++ b/e2e/features/step-definitions/apps/web-app-service.steps.ts
@@ -1,11 +1,11 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given, Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { createTestApp } from '../../../support/api/apps'
-import { getAppSiteURL } from '../../../support/api/web-apps'
-import { syncRunnableWorkflowDraft } from '../../../support/api/workflows'
-import { createE2EResourceName } from '../../../support/naming'
-import { baseURL, defaultLocale } from '../../../test-env'
+import { createTestApp } from '../../../support/api/apps.ts'
+import { getAppSiteURL } from '../../../support/api/web-apps.ts'
+import { syncRunnableWorkflowDraft } from '../../../support/api/workflows.ts'
+import { createE2EResourceName } from '../../../support/naming.ts'
+import { baseURL, defaultLocale } from '../../../test-env.ts'
Given('a new runnable workflow app has been published', async function (this: DifyWorld) {
const client = this.getConsoleClient()
diff --git a/e2e/features/step-definitions/apps/workflow-run.steps.ts b/e2e/features/step-definitions/apps/workflow-run.steps.ts
index e6e7cd4362a..4ea397012c3 100644
--- a/e2e/features/step-definitions/apps/workflow-run.steps.ts
+++ b/e2e/features/step-definitions/apps/workflow-run.steps.ts
@@ -1,7 +1,7 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given, Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { syncRunnableWorkflowDraft } from '../../../support/api/workflows'
+import { syncRunnableWorkflowDraft } from '../../../support/api/workflows.ts'
Given('a minimal runnable workflow draft has been synced', async function (this: DifyWorld) {
const appId = this.createdAppIds.at(-1)
diff --git a/e2e/features/step-definitions/auth/session-refresh.steps.ts b/e2e/features/step-definitions/auth/session-refresh.steps.ts
index c74431a6d62..fb8d21d36a5 100644
--- a/e2e/features/step-definitions/auth/session-refresh.steps.ts
+++ b/e2e/features/step-definitions/auth/session-refresh.steps.ts
@@ -1,4 +1,4 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
diff --git a/e2e/features/step-definitions/auth/sign-in.steps.ts b/e2e/features/step-definitions/auth/sign-in.steps.ts
index efe9357df13..863e2315945 100644
--- a/e2e/features/step-definitions/auth/sign-in.steps.ts
+++ b/e2e/features/step-definitions/auth/sign-in.steps.ts
@@ -1,6 +1,6 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { When } from '@cucumber/cucumber'
-import { adminCredentials } from '../../../fixtures/auth'
+import { adminCredentials } from '../../../fixtures/auth.ts'
When('I open the sign-in page', async function (this: DifyWorld) {
await this.getPage().goto('/signin')
diff --git a/e2e/features/step-definitions/auth/sign-out.steps.ts b/e2e/features/step-definitions/auth/sign-out.steps.ts
index 0cc5f76ccc5..7b27c99b782 100644
--- a/e2e/features/step-definitions/auth/sign-out.steps.ts
+++ b/e2e/features/step-definitions/auth/sign-out.steps.ts
@@ -1,4 +1,4 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
diff --git a/e2e/features/step-definitions/common/app.steps.ts b/e2e/features/step-definitions/common/app.steps.ts
index 0aac989b5f4..2acd84b4648 100644
--- a/e2e/features/step-definitions/common/app.steps.ts
+++ b/e2e/features/step-definitions/common/app.steps.ts
@@ -1,11 +1,11 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given, When } from '@cucumber/cucumber'
import { zCreateAppPayload } from '@dify/contracts/api/console/apps/zod.gen'
import { expect } from '@playwright/test'
-import { createTestApp } from '../../../support/api/apps'
-import { syncMinimalWorkflowDraft } from '../../../support/api/workflows'
-import { waitForAppsConsole } from '../../../support/apps'
-import { createE2EResourceName } from '../../../support/naming'
+import { createTestApp } from '../../../support/api/apps.ts'
+import { syncMinimalWorkflowDraft } from '../../../support/api/workflows.ts'
+import { waitForAppsConsole } from '../../../support/apps.ts'
+import { createE2EResourceName } from '../../../support/naming.ts'
Given('a {string} app has been created via API', async function (this: DifyWorld, mode: string) {
const appMode = zCreateAppPayload.shape.mode.parse(mode)
diff --git a/e2e/features/step-definitions/common/auth.steps.ts b/e2e/features/step-definitions/common/auth.steps.ts
index 67c18dfe6c3..57ae56cc9d5 100644
--- a/e2e/features/step-definitions/common/auth.steps.ts
+++ b/e2e/features/step-definitions/common/auth.steps.ts
@@ -1,4 +1,4 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Given } from '@cucumber/cucumber'
Given('I am signed in as the default E2E admin', async function (this: DifyWorld) {
diff --git a/e2e/features/step-definitions/common/navigation.steps.ts b/e2e/features/step-definitions/common/navigation.steps.ts
index 16729f79510..e76d23d09f1 100644
--- a/e2e/features/step-definitions/common/navigation.steps.ts
+++ b/e2e/features/step-definitions/common/navigation.steps.ts
@@ -1,8 +1,8 @@
-import type { DifyWorld } from '../../support/world'
+import type { DifyWorld } from '../../support/world.ts'
import { Then, When } from '@cucumber/cucumber'
import { expect } from '@playwright/test'
-import { waitForAppsConsole } from '../../../support/apps'
-import { waitForConsoleHome } from '../../../support/home'
+import { waitForAppsConsole } from '../../../support/apps.ts'
+import { waitForConsoleHome } from '../../../support/home.ts'
When('I open the default console entry', async function (this: DifyWorld) {
await this.getPage().goto('/')
diff --git a/e2e/features/support/hooks.ts b/e2e/features/support/hooks.ts
index 9716b1af122..fc185684da9 100644
--- a/e2e/features/support/hooks.ts
+++ b/e2e/features/support/hooks.ts
@@ -1,16 +1,16 @@
import type { Browser, Page } from '@playwright/test'
import type { Buffer } from 'node:buffer'
-import type { CleanupTask } from '../../support/cleanup'
-import type { DifyWorld } from './world'
+import type { CleanupTask } from '../../support/cleanup.ts'
+import type { DifyWorld } from './world.ts'
import { mkdir, writeFile } from 'node:fs/promises'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { After, AfterAll, Before, setDefaultTimeout, Status } from '@cucumber/cucumber'
import { chromium, webkit } from '@playwright/test'
-import { AUTH_BOOTSTRAP_TIMEOUT_MS, ensureAuthenticatedState } from '../../fixtures/auth'
-import { runCleanupTasks, shouldFailForCleanupErrors } from '../../support/cleanup'
-import { getVoiceInputTestMaterialPath } from '../../support/test-materials'
-import { baseURL, cucumberHeadless, cucumberSlowMo, e2eBrowser } from '../../test-env'
+import { AUTH_BOOTSTRAP_TIMEOUT_MS, ensureAuthenticatedState } from '../../fixtures/auth.ts'
+import { runCleanupTasks, shouldFailForCleanupErrors } from '../../support/cleanup.ts'
+import { getVoiceInputTestMaterialPath } from '../../support/test-materials.ts'
+import { baseURL, cucumberHeadless, cucumberSlowMo, e2eBrowser } from '../../test-env.ts'
const e2eRoot = fileURLToPath(new URL('../..', import.meta.url))
const artifactsDir = path.join(e2eRoot, 'cucumber-report', 'artifacts')
diff --git a/e2e/features/support/world.ts b/e2e/features/support/world.ts
index 04d73fa8dde..2d55e88b1cd 100644
--- a/e2e/features/support/world.ts
+++ b/e2e/features/support/world.ts
@@ -1,13 +1,13 @@
import type { IWorldOptions } from '@cucumber/cucumber'
import type { APIRequestContext, Browser, BrowserContext, Download, Page } from '@playwright/test'
-import type { AuthSessionMetadata } from '../../fixtures/auth'
-import type { ConsoleClient } from '../../support/api/console-client'
+import type { AuthSessionMetadata } from '../../fixtures/auth.ts'
+import type { ConsoleClient } from '../../support/api/console-client.ts'
import { setWorldConstructor, World } from '@cucumber/cucumber'
import { request } from '@playwright/test'
-import { authStatePath, readAuthSessionMetadata } from '../../fixtures/auth'
-import { createConsoleClient } from '../../support/api/console-client'
-import { runCleanupTasks } from '../../support/cleanup'
-import { apiURL, baseURL, defaultLocale } from '../../test-env'
+import { authStatePath, readAuthSessionMetadata } from '../../fixtures/auth.ts'
+import { createConsoleClient } from '../../support/api/console-client.ts'
+import { runCleanupTasks } from '../../support/cleanup.ts'
+import { apiURL, baseURL, defaultLocale } from '../../test-env.ts'
export type ScenarioCleanup = () => Promise<void> | void
export type CreatedAgentConfigFile = {
diff --git a/e2e/fixtures/auth.ts b/e2e/fixtures/auth.ts
index 582f23fadba..0caa8144904 100644
--- a/e2e/fixtures/auth.ts
+++ b/e2e/fixtures/auth.ts
@@ -3,8 +3,8 @@ import { Buffer } from 'node:buffer'
import { mkdir, readFile, writeFile } from 'node:fs/promises'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
-import { createConsoleClient } from '../support/api/console-client'
-import { defaultBaseURL, defaultLocale } from '../test-env'
+import { createConsoleClient } from '../support/api/console-client.ts'
+import { defaultBaseURL, defaultLocale } from '../test-env.ts'
export type AuthSessionMetadata = {
adminEmail: string
diff --git a/e2e/package.json b/e2e/package.json
index 9c37769c1ce..8b1b0231ddb 100644
--- a/e2e/package.json
+++ b/e2e/package.json
@@ -3,28 +3,28 @@
"private": true,
"type": "module",
"scripts": {
- "e2e": "tsx ./scripts/run-cucumber.ts",
+ "e2e": "node ./scripts/run-cucumber.ts",
"e2e:accessibility": "pnpm run e2e:accessibility:aa",
- "e2e:accessibility:a": "tsx ./scripts/run-cucumber.ts --full -- --tags \"@axe and @wcag-a\"",
- "e2e:accessibility:aa": "tsx ./scripts/run-cucumber.ts --full -- --tags \"@axe and @wcag-aa\"",
- "e2e:external": "tsx ./scripts/run-external-runtime.ts",
- "e2e:external:prepare": "tsx ./scripts/run-cucumber.ts --seed-only --profile external-runtime",
- "e2e:full": "tsx ./scripts/run-cucumber.ts --full",
- "e2e:full:headed": "tsx ./scripts/run-cucumber.ts --full --headed",
- "e2e:headed": "tsx ./scripts/run-cucumber.ts --headed",
+ "e2e:accessibility:a": "node ./scripts/run-cucumber.ts --full -- --tags \"@axe and @wcag-a\"",
+ "e2e:accessibility:aa": "node ./scripts/run-cucumber.ts --full -- --tags \"@axe and @wcag-aa\"",
+ "e2e:external": "node ./scripts/run-external-runtime.ts",
+ "e2e:external:prepare": "node ./scripts/run-cucumber.ts --seed-only --profile external-runtime",
+ "e2e:full": "node ./scripts/run-cucumber.ts --full",
+ "e2e:full:headed": "node ./scripts/run-cucumber.ts --full --headed",
+ "e2e:headed": "node ./scripts/run-cucumber.ts --headed",
"e2e:install": "playwright install --with-deps chromium webkit",
"e2e:install:ci": "playwright install --with-deps --only-shell chromium webkit",
"e2e:install:ci:chromium": "playwright install --with-deps --only-shell chromium",
"e2e:install:ci:webkit": "playwright install --with-deps --only-shell webkit",
- "e2e:middleware:down": "tsx ./scripts/setup.ts middleware-down",
- "e2e:middleware:up": "tsx ./scripts/setup.ts middleware-up",
- "e2e:post-merge": "tsx ./scripts/run-post-merge.ts",
- "e2e:post-merge:prepare": "tsx ./scripts/run-cucumber.ts --seed-only --profile post-merge",
- "e2e:prepared": "tsx ./scripts/run-prepared.ts",
- "e2e:prepared:prepare": "tsx ./scripts/run-cucumber.ts --seed-only --profile prepared",
- "e2e:reset": "tsx ./scripts/setup.ts reset",
- "e2e:web:build": "tsx ./scripts/setup.ts web-build",
- "seed": "tsx ./scripts/run-cucumber.ts --seed-only",
+ "e2e:middleware:down": "node ./scripts/setup.ts middleware-down",
+ "e2e:middleware:up": "node ./scripts/setup.ts middleware-up",
+ "e2e:post-merge": "node ./scripts/run-post-merge.ts",
+ "e2e:post-merge:prepare": "node ./scripts/run-cucumber.ts --seed-only --profile post-merge",
+ "e2e:prepared": "node ./scripts/run-prepared.ts",
+ "e2e:prepared:prepare": "node ./scripts/run-cucumber.ts --seed-only --profile prepared",
+ "e2e:reset": "node ./scripts/setup.ts reset",
+ "e2e:web:build": "node ./scripts/setup.ts web-build",
+ "seed": "node ./scripts/run-cucumber.ts --seed-only",
"test:unit": "vp test run",
"type-check": "tsc"
},
@@ -41,7 +41,6 @@
"@types/node": "catalog:",
"@typescript/native": "catalog:",
"eventsource-parser": "catalog:",
- "tsx": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vite-plus": "catalog:",
diff --git a/e2e/scripts/common.ts b/e2e/scripts/common.ts
index f0969f06543..d27bbc06b3c 100644
--- a/e2e/scripts/common.ts
+++ b/e2e/scripts/common.ts
@@ -6,7 +6,7 @@ import { access, copyFile, readFile, writeFile } from 'node:fs/promises'
import net from 'node:net'
import path from 'node:path'
import { fileURLToPath, pathToFileURL } from 'node:url'
-import { sleep } from '../support/process'
+import { sleep } from '../support/process.ts'
type RunCommandOptions = {
command: string
diff --git a/e2e/scripts/env-register.ts b/e2e/scripts/env-register.ts
index b4e69651d8b..cd800e34264 100644
--- a/e2e/scripts/env-register.ts
+++ b/e2e/scripts/env-register.ts
@@ -1,4 +1,4 @@
-import { loadE2eEnv, validateE2eEnv } from './env'
+import { loadE2eEnv, validateE2eEnv } from './env.ts'
// Entry points import this before test-env.ts so e2e/.env.local can affect base URLs and runner flags.
loadE2eEnv()
diff --git a/e2e/scripts/env.ts b/e2e/scripts/env.ts
index 996dbe3cc32..e07f5176c1a 100644
--- a/e2e/scripts/env.ts
+++ b/e2e/scripts/env.ts
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs'
import path from 'node:path'
import { createEnv } from '@t3-oss/env-core'
import * as z from 'zod'
-import { e2eDir } from './common'
+import { e2eDir } from './common.ts'
const booleanString = z.enum(['0', '1', 'false', 'true'])
const jsonObjectString = z.string().refine((value) => {
diff --git a/e2e/scripts/run-cucumber.ts b/e2e/scripts/run-cucumber.ts
index 3816735ee9c..1c55566e5e5 100644
--- a/e2e/scripts/run-cucumber.ts
+++ b/e2e/scripts/run-cucumber.ts
@@ -1,16 +1,16 @@
-import type { ManagedProcess } from '../support/process'
+import type { ManagedProcess } from '../support/process.ts'
import { mkdir, readFile, rm } from 'node:fs/promises'
import path from 'node:path'
-import { runCleanupTasks } from '../support/cleanup'
-import { assertCucumberScenariosStarted } from '../support/cucumber-messages'
-import { startLoggedProcess, stopManagedProcess, waitForUrl } from '../support/process'
-import { startWebServer, stopWebServer } from '../support/web-server'
-import { apiURL, baseURL, reuseExistingWebServer } from '../test-env'
-import { e2eDir, isMainModule, runCommand } from './common'
-import { parseRunOptions, shouldStartManagedAgentBackend } from './run-options'
-import { runSeed } from './seed-runner'
-import { resetState, startMiddleware, stopMiddleware } from './setup'
-import './env-register'
+import { runCleanupTasks } from '../support/cleanup.ts'
+import { assertCucumberScenariosStarted } from '../support/cucumber-messages.ts'
+import { startLoggedProcess, stopManagedProcess, waitForUrl } from '../support/process.ts'
+import { startWebServer, stopWebServer } from '../support/web-server.ts'
+import { apiURL, baseURL, reuseExistingWebServer } from '../test-env.ts'
+import { e2eDir, isMainModule, runCommand } from './common.ts'
+import { parseRunOptions, shouldStartManagedAgentBackend } from './run-options.ts'
+import { runSeed } from './seed-runner.ts'
+import { resetState, startMiddleware, stopMiddleware } from './setup.ts'
+import './env-register.ts'
const hasCustomTags = (forwardArgs: string[]) =>
forwardArgs.some((arg) => arg === '--tags' || arg.startsWith('--tags='))
@@ -132,7 +132,7 @@ const main = async () => {
if (startAgentBackendForRun) {
shellctlProcess = await startLoggedProcess({
command: process.execPath,
- args: ['--import', 'tsx', './scripts/setup.ts', 'shellctl-sandbox'],
+ args: ['./scripts/setup.ts', 'shellctl-sandbox'],
cwd: e2eDir,
label: 'shellctl sandbox',
logFilePath: path.join(logDir, 'cucumber-shellctl-sandbox.log'),
@@ -146,7 +146,7 @@ const main = async () => {
difyAgentProcess = await startLoggedProcess({
command: process.execPath,
- args: ['--import', 'tsx', './scripts/setup.ts', 'agent-backend'],
+ args: ['./scripts/setup.ts', 'agent-backend'],
cwd: e2eDir,
env: { E2E_START_AGENT_BACKEND: '1' },
label: 'agent backend',
@@ -162,7 +162,7 @@ const main = async () => {
apiProcess = await startLoggedProcess({
command: process.execPath,
- args: ['--import', 'tsx', './scripts/setup.ts', 'api'],
+ args: ['./scripts/setup.ts', 'api'],
cwd: e2eDir,
env: startAgentBackendForRun ? { E2E_START_AGENT_BACKEND: '1' } : undefined,
label: 'api server',
@@ -176,13 +176,7 @@ const main = async () => {
celeryProcess = await startLoggedProcess({
command: process.execPath,
- args: [
- '--import',
- 'tsx',
- './scripts/setup.ts',
- 'celery',
- ...(seed ? ['--queues', seedCeleryQueues] : []),
- ],
+ args: ['./scripts/setup.ts', 'celery', ...(seed ? ['--queues', seedCeleryQueues] : [])],
cwd: e2eDir,
label: 'celery worker',
logFilePath: path.join(logDir, 'cucumber-celery.log'),
@@ -191,7 +185,7 @@ const main = async () => {
await startWebServer({
baseURL,
command: process.execPath,
- args: ['--import', 'tsx', './scripts/setup.ts', 'web'],
+ args: ['./scripts/setup.ts', 'web'],
cwd: e2eDir,
logFilePath: path.join(logDir, 'cucumber-web.log'),
reuseExistingServer: reuseExistingWebServer,
@@ -211,8 +205,6 @@ const main = async () => {
const result = await runCommand({
command: process.execPath,
args: [
- '--import',
- 'tsx',
'./node_modules/@cucumber/cucumber/bin/cucumber.js',
'--config',
'./cucumber.config.ts',
diff --git a/e2e/scripts/run-external-runtime.ts b/e2e/scripts/run-external-runtime.ts
index b2a748037ca..d96f41348d1 100644
--- a/e2e/scripts/run-external-runtime.ts
+++ b/e2e/scripts/run-external-runtime.ts
@@ -1,5 +1,5 @@
-import { e2eDir, isMainModule, runForegroundProcess } from './common'
-import './env-register'
+import { e2eDir, isMainModule, runForegroundProcess } from './common.ts'
+import './env-register.ts'
const defaultExternalRuntimeTags = '@external-model or @external-tool'
@@ -7,8 +7,6 @@ const main = async () => {
await runForegroundProcess({
command: process.execPath,
args: [
- '--import',
- 'tsx',
'./scripts/run-cucumber.ts',
'--full',
'--profile',
diff --git a/e2e/scripts/run-options.ts b/e2e/scripts/run-options.ts
index 16b5c0a2deb..b12eab0ac60 100644
--- a/e2e/scripts/run-options.ts
+++ b/e2e/scripts/run-options.ts
@@ -1,4 +1,4 @@
-import type { SeedOptions } from './seed-runner'
+import type { SeedOptions } from './seed-runner.ts'
export type RunOptions = {
forwardArgs: string[]
diff --git a/e2e/scripts/run-post-merge.ts b/e2e/scripts/run-post-merge.ts
index 4c01b8528dc..5e598df5c00 100644
--- a/e2e/scripts/run-post-merge.ts
+++ b/e2e/scripts/run-post-merge.ts
@@ -1,5 +1,5 @@
-import { e2eDir, isMainModule, runForegroundProcess } from './common'
-import './env-register'
+import { e2eDir, isMainModule, runForegroundProcess } from './common.ts'
+import './env-register.ts'
const postMergeTags = '@prepared or @external-model or @external-tool'
@@ -7,8 +7,6 @@ const main = async () => {
await runForegroundProcess({
command: process.execPath,
args: [
- '--import',
- 'tsx',
'./scripts/run-cucumber.ts',
'--full',
'--profile',
diff --git a/e2e/scripts/run-prepared.ts b/e2e/scripts/run-prepared.ts
index 658c91ff973..32b623c3d63 100644
--- a/e2e/scripts/run-prepared.ts
+++ b/e2e/scripts/run-prepared.ts
@@ -1,5 +1,5 @@
-import { e2eDir, isMainModule, runForegroundProcess } from './common'
-import './env-register'
+import { e2eDir, isMainModule, runForegroundProcess } from './common.ts'
+import './env-register.ts'
const preparedTags = '@prepared'
@@ -7,8 +7,6 @@ const main = async () => {
await runForegroundProcess({
command: process.execPath,
args: [
- '--import',
- 'tsx',
'./scripts/run-cucumber.ts',
'--full',
'--profile',
diff --git a/e2e/scripts/seed-runner.ts b/e2e/scripts/seed-runner.ts
index b6cb013029e..448a7ef25ed 100644
--- a/e2e/scripts/seed-runner.ts
+++ b/e2e/scripts/seed-runner.ts
@@ -1,9 +1,9 @@
import { chromium } from '@playwright/test'
-import { createAgentV2SeedTasks } from '../features/agent-v2/support/seed'
-import { ensureAuthenticatedState } from '../fixtures/auth'
-import { createStandaloneConsoleSession } from '../support/api/console-session'
-import { runSeedTasks, writeSeedReport } from '../support/seed'
-import { baseURL } from '../test-env'
+import { createAgentV2SeedTasks } from '../features/agent-v2/support/seed.ts'
+import { ensureAuthenticatedState } from '../fixtures/auth.ts'
+import { createStandaloneConsoleSession } from '../support/api/console-session.ts'
+import { runSeedTasks, writeSeedReport } from '../support/seed.ts'
+import { baseURL } from '../test-env.ts'
export type SeedOptions = {
allowBlocked: boolean
diff --git a/e2e/scripts/setup.ts b/e2e/scripts/setup.ts
index 6caf27435ac..39d282054fd 100644
--- a/e2e/scripts/setup.ts
+++ b/e2e/scripts/setup.ts
@@ -1,7 +1,7 @@
import { createHash } from 'node:crypto'
import { access, mkdir, readFile, rm, writeFile } from 'node:fs/promises'
import path from 'node:path'
-import { waitForUrl } from '../support/process'
+import { waitForUrl } from '../support/process.ts'
import {
apiDir,
apiEnvExampleFile,
@@ -26,8 +26,8 @@ import {
runForegroundProcess,
waitForCondition,
webDir,
-} from './common'
-import './env-register'
+} from './common.ts'
+import './env-register.ts'
const buildIdPath = path.join(webDir, '.next', 'BUILD_ID')
const webBuildStampPath = path.join(webDir, '.next', 'e2e-web-build.sha256')
@@ -569,7 +569,7 @@ export const startMiddleware = async () => {
const printUsage = () => {
console.log(
- 'Usage: tsx ./scripts/setup.ts <reset|middleware-up|middleware-down|shellctl-sandbox|agent-backend|api|celery [--queues queues]|web|web-build>',
+ 'Usage: node ./scripts/setup.ts <reset|middleware-up|middleware-down|shellctl-sandbox|agent-backend|api|celery [--queues queues]|web|web-build>',
)
}
diff --git a/e2e/support/api/apps.ts b/e2e/support/api/apps.ts
index a6976325013..6bceee4e145 100644
--- a/e2e/support/api/apps.ts
+++ b/e2e/support/api/apps.ts
@@ -1,6 +1,6 @@
import type { CreateAppPayload, PostAppsResponse } from '@dify/contracts/api/console/apps/types.gen'
-import type { ConsoleClient } from './console-client'
-import { assertE2EResourceName, createE2EResourceName } from '../naming'
+import type { ConsoleClient } from './console-client.ts'
+import { assertE2EResourceName, createE2EResourceName } from '../naming.ts'
export async function createTestApp(
client: ConsoleClient,
diff --git a/e2e/support/api/console-client.ts b/e2e/support/api/console-client.ts
index 7a6a24604b8..36bd4a1d601 100644
--- a/e2e/support/api/console-client.ts
+++ b/e2e/support/api/console-client.ts
@@ -1,13 +1,13 @@
import type { ContractRouterClient } from '@orpc/contract'
import type { JsonifiedClient } from '@orpc/openapi-client'
import type { APIRequestContext } from '@playwright/test'
-import type { ConsoleClientContext } from './playwright-fetch'
+import type { ConsoleClientContext } from './playwright-fetch.ts'
import { consoleRouterContract } from '@dify/contracts/api/console/router.gen'
import { createORPCClient } from '@orpc/client'
import { RequestValidationPlugin, ResponseValidationPlugin } from '@orpc/contract/plugins'
import { OpenAPILink } from '@orpc/openapi-client/fetch'
-import { apiURL } from '../../test-env'
-import { createPlaywrightFetch } from './playwright-fetch'
+import { apiURL } from '../../test-env.ts'
+import { createPlaywrightFetch } from './playwright-fetch.ts'
type ConsoleRequestContext = Pick<APIRequestContext, 'fetch' | 'storageState'>
diff --git a/e2e/support/api/console-session.ts b/e2e/support/api/console-session.ts
index ab7fc8790ac..8918ac40d2c 100644
--- a/e2e/support/api/console-session.ts
+++ b/e2e/support/api/console-session.ts
@@ -1,7 +1,7 @@
import { request } from '@playwright/test'
-import { authStatePath } from '../../fixtures/auth'
-import { apiURL } from '../../test-env'
-import { createConsoleClient } from './console-client'
+import { authStatePath } from '../../fixtures/auth.ts'
+import { apiURL } from '../../test-env.ts'
+import { createConsoleClient } from './console-client.ts'
export async function createStandaloneConsoleSession() {
const requestContext = await request.newContext({
diff --git a/e2e/support/api/workflows.ts b/e2e/support/api/workflows.ts
index b47dbeeb624..08fca864a2f 100644
--- a/e2e/support/api/workflows.ts
+++ b/e2e/support/api/workflows.ts
@@ -1,5 +1,5 @@
import type { SyncDraftWorkflowPayload } from '@dify/contracts/api/console/apps/types.gen'
-import type { ConsoleClient } from './console-client'
+import type { ConsoleClient } from './console-client.ts'
export async function syncMinimalWorkflowDraft(
client: ConsoleClient,
diff --git a/e2e/support/marketplace-plugins.ts b/e2e/support/marketplace-plugins.ts
index 902371411fb..653b083c1b7 100644
--- a/e2e/support/marketplace-plugins.ts
+++ b/e2e/support/marketplace-plugins.ts
@@ -1,10 +1,10 @@
import type { PluginInstallTask } from '@dify/contracts/api/console/workspaces/types.gen'
-import type { ConsoleClient } from './api/console-client'
-import type { SeedContext, SeedResult } from './seed'
+import type { ConsoleClient } from './api/console-client.ts'
+import type { SeedContext, SeedResult } from './seed.ts'
import { Buffer } from 'node:buffer'
import { ORPCError } from '@orpc/client'
-import { sleep } from './process'
-import { blocked, created, skipped, verified } from './seed'
+import { sleep } from './process.ts'
+import { blocked, created, skipped, verified } from './seed.ts'
type MarketplacePluginBootstrapConfig = {
defaultPluginIds: string[]
diff --git a/e2e/support/seed.ts b/e2e/support/seed.ts
index e0ec106de0d..5d363456ca0 100644
--- a/e2e/support/seed.ts
+++ b/e2e/support/seed.ts
@@ -1,7 +1,7 @@
-import type { ConsoleClient } from './api/console-client'
+import type { ConsoleClient } from './api/console-client.ts'
import { mkdir, writeFile } from 'node:fs/promises'
import path from 'node:path'
-import { e2eDir } from '../scripts/common'
+import { e2eDir } from '../scripts/common.ts'
export type SeedStatus = 'blocked' | 'created' | 'skipped' | 'updated' | 'verified'
diff --git a/e2e/support/web-server.ts b/e2e/support/web-server.ts
index 674209e8089..93af093068f 100644
--- a/e2e/support/web-server.ts
+++ b/e2e/support/web-server.ts
@@ -1,5 +1,5 @@
-import type { ManagedProcess } from './process'
-import { isPortReachable, startLoggedProcess, stopManagedProcess, waitForUrl } from './process'
+import type { ManagedProcess } from './process.ts'
+import { isPortReachable, startLoggedProcess, stopManagedProcess, waitForUrl } from './process.ts'
type WebServerStartOptions = {
baseURL: string
diff --git a/e2e/test-env.ts b/e2e/test-env.ts
index ec2de36f5ec..79f61e46103 100644
--- a/e2e/test-env.ts
+++ b/e2e/test-env.ts
@@ -1,4 +1,4 @@
-import './scripts/env-register'
+import './scripts/env-register.ts'
export const defaultBaseURL = 'http://127.0.0.1:3000'
export const defaultApiURL = 'http://127.0.0.1:5001'
diff --git a/e2e/tests/agent-backend-readiness.test.ts b/e2e/tests/agent-backend-readiness.test.ts
index dbd860955a9..b968c1d7a62 100644
--- a/e2e/tests/agent-backend-readiness.test.ts
+++ b/e2e/tests/agent-backend-readiness.test.ts
@@ -1,6 +1,6 @@
-import type { DifyWorld } from '../features/support/world'
+import type { DifyWorld } from '../features/support/world.ts'
import { afterEach, describe, expect, it, vi } from 'vite-plus/test'
-import { requireAgentBackendRuntime } from '../features/agent-v2/support/fixtures/agent-backend'
+import { requireAgentBackendRuntime } from '../features/agent-v2/support/fixtures/agent-backend.ts'
describe('requireAgentBackendRuntime', () => {
afterEach(() => {
diff --git a/e2e/tests/agent-v2-seed.test.ts b/e2e/tests/agent-v2-seed.test.ts
index 397a135a498..8cadc1f9d79 100644
--- a/e2e/tests/agent-v2-seed.test.ts
+++ b/e2e/tests/agent-v2-seed.test.ts
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vite-plus/test'
-import { createAgentV2SeedTasks } from '../features/agent-v2/support/seed'
+import { createAgentV2SeedTasks } from '../features/agent-v2/support/seed.ts'
const baseTaskIds = [
'marketplace-plugins',
diff --git a/e2e/tests/cleanup.test.ts b/e2e/tests/cleanup.test.ts
index cebe3c1133a..f8013024d49 100644
--- a/e2e/tests/cleanup.test.ts
+++ b/e2e/tests/cleanup.test.ts
@@ -1,5 +1,5 @@
import { describe, expect, it, vi } from 'vite-plus/test'
-import { runCleanupTasks, shouldFailForCleanupErrors } from '../support/cleanup'
+import { runCleanupTasks, shouldFailForCleanupErrors } from '../support/cleanup.ts'
describe('runCleanupTasks', () => {
it('runs every task in order', async () => {
diff --git a/e2e/tests/console-client.test.ts b/e2e/tests/console-client.test.ts
index 0f45b1c56ca..c4dc5429d22 100644
--- a/e2e/tests/console-client.test.ts
+++ b/e2e/tests/console-client.test.ts
@@ -1,8 +1,8 @@
import type { APIRequestContext, APIResponse } from '@playwright/test'
import { Buffer } from 'node:buffer'
import { describe, expect, it, vi } from 'vite-plus/test'
-import { createConsoleClient } from '../support/api/console-client'
-import { createPlaywrightFetch } from '../support/api/playwright-fetch'
+import { createConsoleClient } from '../support/api/console-client.ts'
+import { createPlaywrightFetch } from '../support/api/playwright-fetch.ts'
const createApiResponse = ({
body = '',
diff --git a/e2e/tests/cucumber-messages.test.ts b/e2e/tests/cucumber-messages.test.ts
index 3628648b222..7607bb38543 100644
--- a/e2e/tests/cucumber-messages.test.ts
+++ b/e2e/tests/cucumber-messages.test.ts
@@ -2,7 +2,7 @@ import { describe, expect, it } from 'vite-plus/test'
import {
assertCucumberScenariosStarted,
countStartedCucumberScenarios,
-} from '../support/cucumber-messages'
+} from '../support/cucumber-messages.ts'
describe('countStartedCucumberScenarios', () => {
it('counts test case start messages', () => {
diff --git a/e2e/tests/managed-runtime-environment.test.ts b/e2e/tests/managed-runtime-environment.test.ts
index 19d3b1ea73b..30608d90ecd 100644
--- a/e2e/tests/managed-runtime-environment.test.ts
+++ b/e2e/tests/managed-runtime-environment.test.ts
@@ -1,5 +1,5 @@
import { afterEach, describe, expect, it, vi } from 'vite-plus/test'
-import { getAgentBackendEnvironment } from '../scripts/setup'
+import { getAgentBackendEnvironment } from '../scripts/setup.ts'
describe('managed runtime environment', () => {
afterEach(() => {
diff --git a/e2e/tests/marketplace-plugins.test.ts b/e2e/tests/marketplace-plugins.test.ts
index e55af9ed282..b64766373c8 100644
--- a/e2e/tests/marketplace-plugins.test.ts
+++ b/e2e/tests/marketplace-plugins.test.ts
@@ -1,7 +1,7 @@
-import type { ConsoleClient } from '../support/api/console-client'
+import type { ConsoleClient } from '../support/api/console-client.ts'
import { ORPCError } from '@orpc/client'
import { afterEach, describe, expect, it, vi } from 'vite-plus/test'
-import { bootstrapMarketplacePlugins } from '../support/marketplace-plugins'
+import { bootstrapMarketplacePlugins } from '../support/marketplace-plugins.ts'
const createMarketplaceConsoleClient = (installError: unknown) => {
const installMarketplace = vi.fn().mockRejectedValue(installError)
diff --git a/e2e/tests/run-options.test.ts b/e2e/tests/run-options.test.ts
index f6404c4ce14..462f86a6541 100644
--- a/e2e/tests/run-options.test.ts
+++ b/e2e/tests/run-options.test.ts
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vite-plus/test'
-import { parseRunOptions, shouldStartManagedAgentBackend } from '../scripts/run-options'
+import { parseRunOptions, shouldStartManagedAgentBackend } from '../scripts/run-options.ts'
describe('E2E run options', () => {
it('forwards Cucumber arguments without requesting seed data', () => {
diff --git a/e2e/tests/service-api-sse.test.ts b/e2e/tests/service-api-sse.test.ts
index 812ac0020a0..5a3468671f3 100644
--- a/e2e/tests/service-api-sse.test.ts
+++ b/e2e/tests/service-api-sse.test.ts
@@ -1,6 +1,6 @@
import assert from 'node:assert/strict'
import { describe, it } from 'vite-plus/test'
-import { consumeServiceApiSse } from '../features/agent-v2/support/service-api-sse'
+import { consumeServiceApiSse } from '../features/agent-v2/support/service-api-sse.ts'
const encodeChunks = (text: string, splitPoints: number[]) => {
const bytes = new TextEncoder().encode(text)
diff --git a/e2e/tests/test-env.test.ts b/e2e/tests/test-env.test.ts
index bc6e336213a..d5910b1ba54 100644
--- a/e2e/tests/test-env.test.ts
+++ b/e2e/tests/test-env.test.ts
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vite-plus/test'
-import { resolveE2EBrowser } from '../test-env'
+import { resolveE2EBrowser } from '../test-env.ts'
describe('resolveE2EBrowser', () => {
it('uses Chromium by default', () => {
diff --git a/e2e/tsconfig.json b/e2e/tsconfig.json
index 3e72e790cfe..2fb64d93581 100644
--- a/e2e/tsconfig.json
+++ b/e2e/tsconfig.json
@@ -2,7 +2,10 @@
"extends": "@dify/tsconfig/node.json",
"compilerOptions": {
"lib": ["ES2023", "DOM"],
+ "module": "NodeNext",
+ "moduleResolution": "NodeNext",
"types": ["node", "@playwright/test", "@cucumber/cucumber"],
+ "allowImportingTsExtensions": true,
"allowJs": false,
"verbatimModuleSyntax": true
},
diff --git a/e2e/tsx-register.js b/e2e/tsx-register.js
deleted file mode 100644
index 257bae887a3..00000000000
--- a/e2e/tsx-register.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import { register } from 'tsx/esm/api'
-
-register()
diff --git a/packages/contracts/account-profile-zod.test.ts b/packages/contracts/account-profile-zod.test.ts
index fcd10d0d8a1..236cd11e8ea 100644
--- a/packages/contracts/account-profile-zod.test.ts
+++ b/packages/contracts/account-profile-zod.test.ts
@@ -2,7 +2,7 @@ import { describe, expect, it } from 'vite-plus/test'
import {
zAccountPasswordPayload,
zAccountProfilePatchPayload,
-} from './generated/api/console/account/zod.gen'
+} from './generated/api/console/account/zod.gen.ts'
describe('generated account profile schema', () => {
it('matches the server rules for partial updates', () => {
diff --git a/packages/contracts/binary-zod.test.ts b/packages/contracts/binary-zod.test.ts
index 2aee0ffcdec..833d1eed38f 100644
--- a/packages/contracts/binary-zod.test.ts
+++ b/packages/contracts/binary-zod.test.ts
@@ -2,9 +2,9 @@ import { describe, expect, it } from 'vite-plus/test'
import {
zGetAppsByAppIdExportResponse,
zPostAppsImportsBody,
-} from './generated/api/console/apps/zod.gen'
-import { zPostFilesUploadBody } from './generated/api/console/files/zod.gen'
-import { zPostWorkspacesCurrentPluginUploadPkgBody } from './generated/api/console/workspaces/zod.gen'
+} from './generated/api/console/apps/zod.gen.ts'
+import { zPostFilesUploadBody } from './generated/api/console/files/zod.gen.ts'
+import { zPostWorkspacesCurrentPluginUploadPkgBody } from './generated/api/console/workspaces/zod.gen.ts'
describe('generated binary schemas', () => {
it('accepts binary package imports alongside YAML import requests', () => {
diff --git a/packages/contracts/console.ts b/packages/contracts/console.ts
index ea712f2924a..6bd9c1d7dd8 100644
--- a/packages/contracts/console.ts
+++ b/packages/contracts/console.ts
@@ -1,6 +1,6 @@
-import { consoleRouterContract as generatedConsoleRouterContract } from './generated/api/console/router.gen'
-import { contract as enterpriseAppDeployContract } from './generated/enterprise-app-deploy/orpc.gen'
-import { contract as knowledgeFsContract } from './generated/knowledge-fs/orpc.gen'
+import { consoleRouterContract as generatedConsoleRouterContract } from './generated/api/console/router.gen.ts'
+import { contract as enterpriseAppDeployContract } from './generated/enterprise-app-deploy/orpc.gen.ts'
+import { contract as knowledgeFsContract } from './generated/knowledge-fs/orpc.gen.ts'
export const consoleRouterContract = {
...generatedConsoleRouterContract,
diff --git a/packages/contracts/generated/api/console/account/orpc.gen.ts b/packages/contracts/generated/api/console/account/orpc.gen.ts
index 8648b2d6d9a..bfddb462052 100644
--- a/packages/contracts/generated/api/console/account/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/account/orpc.gen.ts
@@ -42,7 +42,7 @@ import {
zPostAccountPasswordResponse,
zPostAccountTimezoneBody,
zPostAccountTimezoneResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Get account avatar url
diff --git a/packages/contracts/generated/api/console/activate/orpc.gen.ts b/packages/contracts/generated/api/console/activate/orpc.gen.ts
index 3bb61c9e7f1..edbd7e6f43d 100644
--- a/packages/contracts/generated/api/console/activate/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/activate/orpc.gen.ts
@@ -7,7 +7,7 @@ import {
zGetActivateCheckResponse,
zPostActivateBody,
zPostActivateResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Check if activation token is valid
diff --git a/packages/contracts/generated/api/console/agent/orpc.gen.ts b/packages/contracts/generated/api/console/agent/orpc.gen.ts
index 7c46bd356b5..e3f74a2b8cb 100644
--- a/packages/contracts/generated/api/console/agent/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/agent/orpc.gen.ts
@@ -157,7 +157,7 @@ import {
zPutAgentByAgentIdComposerResponse,
zPutAgentByAgentIdPath,
zPutAgentByAgentIdResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const get = oc
.route({
diff --git a/packages/contracts/generated/api/console/all-workspaces/orpc.gen.ts b/packages/contracts/generated/api/console/all-workspaces/orpc.gen.ts
index a11ca62580a..b4bec0ea9a6 100644
--- a/packages/contracts/generated/api/console/all-workspaces/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/all-workspaces/orpc.gen.ts
@@ -2,7 +2,7 @@
import { oc } from '@orpc/contract'
import * as z from 'zod'
-import { zGetAllWorkspacesQuery, zGetAllWorkspacesResponse } from './zod.gen'
+import { zGetAllWorkspacesQuery, zGetAllWorkspacesResponse } from './zod.gen.ts'
export const get = oc
.route({
diff --git a/packages/contracts/generated/api/console/api-based-extension/orpc.gen.ts b/packages/contracts/generated/api/console/api-based-extension/orpc.gen.ts
index 38c0930b219..6fc39311a76 100644
--- a/packages/contracts/generated/api/console/api-based-extension/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/api-based-extension/orpc.gen.ts
@@ -13,7 +13,7 @@ import {
zPostApiBasedExtensionByIdPath,
zPostApiBasedExtensionByIdResponse,
zPostApiBasedExtensionResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Delete API-based extension
diff --git a/packages/contracts/generated/api/console/api-key-auth/orpc.gen.ts b/packages/contracts/generated/api/console/api-key-auth/orpc.gen.ts
index abac14bbdd3..9fa561caa7e 100644
--- a/packages/contracts/generated/api/console/api-key-auth/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/api-key-auth/orpc.gen.ts
@@ -8,7 +8,7 @@ import {
zGetApiKeyAuthDataSourceResponse,
zPostApiKeyAuthDataSourceBindingBody,
zPostApiKeyAuthDataSourceBindingResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const post = oc
.route({
diff --git a/packages/contracts/generated/api/console/app-dsl-version/orpc.gen.ts b/packages/contracts/generated/api/console/app-dsl-version/orpc.gen.ts
index 7c7d7065e8d..35305b818fc 100644
--- a/packages/contracts/generated/api/console/app-dsl-version/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/app-dsl-version/orpc.gen.ts
@@ -1,7 +1,7 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
-import { zGetAppDslVersionResponse } from './zod.gen'
+import { zGetAppDslVersionResponse } from './zod.gen.ts'
/**
* Get current app DSL version for workflow clipboard compatibility
diff --git a/packages/contracts/generated/api/console/app/orpc.gen.ts b/packages/contracts/generated/api/console/app/orpc.gen.ts
index 22dfb24ba0e..40ae9e7816a 100644
--- a/packages/contracts/generated/api/console/app/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/app/orpc.gen.ts
@@ -2,7 +2,7 @@
import { oc } from '@orpc/contract'
import * as z from 'zod'
-import { zGetAppPromptTemplatesQuery, zGetAppPromptTemplatesResponse } from './zod.gen'
+import { zGetAppPromptTemplatesQuery, zGetAppPromptTemplatesResponse } from './zod.gen.ts'
/**
* Get advanced prompt templates based on app mode and model configuration
diff --git a/packages/contracts/generated/api/console/apps/orpc.gen.ts b/packages/contracts/generated/api/console/apps/orpc.gen.ts
index d2f3910cd36..a34b647f07b 100644
--- a/packages/contracts/generated/api/console/apps/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/apps/orpc.gen.ts
@@ -458,7 +458,7 @@ import {
zPutAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerResponse,
zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetPath,
zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const get = oc
.route({
diff --git a/packages/contracts/generated/api/console/auth/orpc.gen.ts b/packages/contracts/generated/api/console/auth/orpc.gen.ts
index c6c15175972..656131d486a 100644
--- a/packages/contracts/generated/api/console/auth/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/auth/orpc.gen.ts
@@ -27,7 +27,7 @@ import {
zPostAuthPluginDatasourceByProviderIdUpdateNameResponse,
zPostAuthPluginDatasourceByProviderIdUpdatePath,
zPostAuthPluginDatasourceByProviderIdUpdateResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const get = oc
.route({
diff --git a/packages/contracts/generated/api/console/billing/orpc.gen.ts b/packages/contracts/generated/api/console/billing/orpc.gen.ts
index 1100fac53d1..9d0dbb85b54 100644
--- a/packages/contracts/generated/api/console/billing/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/billing/orpc.gen.ts
@@ -9,7 +9,7 @@ import {
zPutBillingPartnersByPartnerKeyTenantsBody,
zPutBillingPartnersByPartnerKeyTenantsPath,
zPutBillingPartnersByPartnerKeyTenantsResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const get = oc
.route({
diff --git a/packages/contracts/generated/api/console/code-based-extension/orpc.gen.ts b/packages/contracts/generated/api/console/code-based-extension/orpc.gen.ts
index d3ff087d207..d12029f30b5 100644
--- a/packages/contracts/generated/api/console/code-based-extension/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/code-based-extension/orpc.gen.ts
@@ -2,7 +2,7 @@
import { oc } from '@orpc/contract'
import * as z from 'zod'
-import { zGetCodeBasedExtensionQuery, zGetCodeBasedExtensionResponse } from './zod.gen'
+import { zGetCodeBasedExtensionQuery, zGetCodeBasedExtensionResponse } from './zod.gen.ts'
/**
* Get code-based extension data by module name
diff --git a/packages/contracts/generated/api/console/compliance/orpc.gen.ts b/packages/contracts/generated/api/console/compliance/orpc.gen.ts
index f699f7eea6b..d10ccd595b5 100644
--- a/packages/contracts/generated/api/console/compliance/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/compliance/orpc.gen.ts
@@ -2,7 +2,7 @@
import { oc } from '@orpc/contract'
import * as z from 'zod'
-import { zGetComplianceDownloadQuery, zGetComplianceDownloadResponse } from './zod.gen'
+import { zGetComplianceDownloadQuery, zGetComplianceDownloadResponse } from './zod.gen.ts'
/**
* Get compliance document download link
diff --git a/packages/contracts/generated/api/console/data-source/orpc.gen.ts b/packages/contracts/generated/api/console/data-source/orpc.gen.ts
index e6aafabe1ff..692089d1845 100644
--- a/packages/contracts/generated/api/console/data-source/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/data-source/orpc.gen.ts
@@ -9,7 +9,7 @@ import {
zPatchDataSourceIntegratesByBindingIdByActionPath,
zPatchDataSourceIntegratesByBindingIdByActionResponse,
zPatchDataSourceIntegratesResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const get = oc
.route({
diff --git a/packages/contracts/generated/api/console/datasets/orpc.gen.ts b/packages/contracts/generated/api/console/datasets/orpc.gen.ts
index 98f1450cd1a..2f4cb4b31ef 100644
--- a/packages/contracts/generated/api/console/datasets/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/datasets/orpc.gen.ts
@@ -187,7 +187,7 @@ import {
zPutDatasetsByDatasetIdDocumentsByDocumentIdMetadataBody,
zPutDatasetsByDatasetIdDocumentsByDocumentIdMetadataPath,
zPutDatasetsByDatasetIdDocumentsByDocumentIdMetadataResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Get dataset API base information
diff --git a/packages/contracts/generated/api/console/email-code-login/orpc.gen.ts b/packages/contracts/generated/api/console/email-code-login/orpc.gen.ts
index 0303757aedb..cdc882477d1 100644
--- a/packages/contracts/generated/api/console/email-code-login/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/email-code-login/orpc.gen.ts
@@ -7,7 +7,7 @@ import {
zPostEmailCodeLoginResponse,
zPostEmailCodeLoginValidityBody,
zPostEmailCodeLoginValidityResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const post = oc
.route({
diff --git a/packages/contracts/generated/api/console/email-register/orpc.gen.ts b/packages/contracts/generated/api/console/email-register/orpc.gen.ts
index 0278e0afaf6..0a2cab4c199 100644
--- a/packages/contracts/generated/api/console/email-register/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/email-register/orpc.gen.ts
@@ -9,7 +9,7 @@ import {
zPostEmailRegisterSendEmailResponse,
zPostEmailRegisterValidityBody,
zPostEmailRegisterValidityResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const post = oc
.route({
diff --git a/packages/contracts/generated/api/console/explore/orpc.gen.ts b/packages/contracts/generated/api/console/explore/orpc.gen.ts
index 79ad0839470..3a7b6845f0f 100644
--- a/packages/contracts/generated/api/console/explore/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/explore/orpc.gen.ts
@@ -11,7 +11,7 @@ import {
zGetExploreAppsResponse,
zGetExploreBannersQuery,
zGetExploreBannersResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const get = oc
.route({
diff --git a/packages/contracts/generated/api/console/features/orpc.gen.ts b/packages/contracts/generated/api/console/features/orpc.gen.ts
index cdde66b21ad..626f5597be1 100644
--- a/packages/contracts/generated/api/console/features/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/features/orpc.gen.ts
@@ -1,7 +1,7 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
-import { zGetFeaturesResponse, zGetFeaturesVectorSpaceResponse } from './zod.gen'
+import { zGetFeaturesResponse, zGetFeaturesVectorSpaceResponse } from './zod.gen.ts'
/**
* Get vector-space usage and limit for current tenant
diff --git a/packages/contracts/generated/api/console/files/orpc.gen.ts b/packages/contracts/generated/api/console/files/orpc.gen.ts
index 3703a064313..aa0ab8ce043 100644
--- a/packages/contracts/generated/api/console/files/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/files/orpc.gen.ts
@@ -9,7 +9,7 @@ import {
zGetFilesUploadResponse,
zPostFilesUploadBody,
zPostFilesUploadResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const get = oc
.route({
diff --git a/packages/contracts/generated/api/console/forgot-password/orpc.gen.ts b/packages/contracts/generated/api/console/forgot-password/orpc.gen.ts
index 07e293ebd1b..4d1e8b7cd75 100644
--- a/packages/contracts/generated/api/console/forgot-password/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/forgot-password/orpc.gen.ts
@@ -9,7 +9,7 @@ import {
zPostForgotPasswordResponse,
zPostForgotPasswordValidityBody,
zPostForgotPasswordValidityResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Reset password with verification token
diff --git a/packages/contracts/generated/api/console/form/orpc.gen.ts b/packages/contracts/generated/api/console/form/orpc.gen.ts
index 070c360c29d..b34838db77d 100644
--- a/packages/contracts/generated/api/console/form/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/form/orpc.gen.ts
@@ -8,7 +8,7 @@ import {
zPostFormHumanInputByFormTokenBody,
zPostFormHumanInputByFormTokenPath,
zPostFormHumanInputByFormTokenResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Get human input form definition by form token
diff --git a/packages/contracts/generated/api/console/init/orpc.gen.ts b/packages/contracts/generated/api/console/init/orpc.gen.ts
index eef7c8522c6..23afef4956d 100644
--- a/packages/contracts/generated/api/console/init/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/init/orpc.gen.ts
@@ -2,7 +2,7 @@
import { oc } from '@orpc/contract'
import * as z from 'zod'
-import { zGetInitResponse, zPostInitBody, zPostInitResponse } from './zod.gen'
+import { zGetInitResponse, zPostInitBody, zPostInitResponse } from './zod.gen.ts'
/**
* Get initialization validation status.
diff --git a/packages/contracts/generated/api/console/installed-apps/orpc.gen.ts b/packages/contracts/generated/api/console/installed-apps/orpc.gen.ts
index 4a0941ab095..1bd3bc08ccf 100644
--- a/packages/contracts/generated/api/console/installed-apps/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/installed-apps/orpc.gen.ts
@@ -69,7 +69,7 @@ import {
zPostInstalledAppsByInstalledAppIdWorkflowsTasksByTaskIdStopPath,
zPostInstalledAppsByInstalledAppIdWorkflowsTasksByTaskIdStopResponse,
zPostInstalledAppsResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const post = oc
.route({
diff --git a/packages/contracts/generated/api/console/instruction-generate/orpc.gen.ts b/packages/contracts/generated/api/console/instruction-generate/orpc.gen.ts
index a67d8651dfa..03424e585cb 100644
--- a/packages/contracts/generated/api/console/instruction-generate/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/instruction-generate/orpc.gen.ts
@@ -7,7 +7,7 @@ import {
zPostInstructionGenerateResponse,
zPostInstructionGenerateTemplateBody,
zPostInstructionGenerateTemplateResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Get instruction generation template
diff --git a/packages/contracts/generated/api/console/login/orpc.gen.ts b/packages/contracts/generated/api/console/login/orpc.gen.ts
index b853c7ff1c6..367b689788c 100644
--- a/packages/contracts/generated/api/console/login/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/login/orpc.gen.ts
@@ -2,7 +2,7 @@
import { oc } from '@orpc/contract'
import * as z from 'zod'
-import { zPostLoginBody, zPostLoginResponse } from './zod.gen'
+import { zPostLoginBody, zPostLoginResponse } from './zod.gen.ts'
/**
* Authenticate user and login
diff --git a/packages/contracts/generated/api/console/logout/orpc.gen.ts b/packages/contracts/generated/api/console/logout/orpc.gen.ts
index 59c55e3afdb..37e7a6a441f 100644
--- a/packages/contracts/generated/api/console/logout/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/logout/orpc.gen.ts
@@ -1,7 +1,7 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
-import { zPostLogoutResponse } from './zod.gen'
+import { zPostLogoutResponse } from './zod.gen.ts'
export const post = oc
.route({
diff --git a/packages/contracts/generated/api/console/notification/orpc.gen.ts b/packages/contracts/generated/api/console/notification/orpc.gen.ts
index 7024ed95c31..1296996e4dd 100644
--- a/packages/contracts/generated/api/console/notification/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/notification/orpc.gen.ts
@@ -7,7 +7,7 @@ import {
zGetNotificationResponse,
zPostNotificationDismissBody,
zPostNotificationDismissResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Mark a notification as dismissed for the current user.
diff --git a/packages/contracts/generated/api/console/notion/orpc.gen.ts b/packages/contracts/generated/api/console/notion/orpc.gen.ts
index 973f7d54632..b0b8bf4732c 100644
--- a/packages/contracts/generated/api/console/notion/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/notion/orpc.gen.ts
@@ -8,7 +8,7 @@ import {
zGetNotionPagesByPageIdByPageTypePreviewResponse,
zGetNotionPreImportPagesQuery,
zGetNotionPreImportPagesResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const get = oc
.route({
diff --git a/packages/contracts/generated/api/console/oauth/orpc.gen.ts b/packages/contracts/generated/api/console/oauth/orpc.gen.ts
index e65bb04c043..447e0c7eaf8 100644
--- a/packages/contracts/generated/api/console/oauth/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/oauth/orpc.gen.ts
@@ -24,7 +24,7 @@ import {
zPostOauthProviderResponse,
zPostOauthProviderTokenBody,
zPostOauthProviderTokenResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Bind OAuth data source with authorization code
diff --git a/packages/contracts/generated/api/console/onboarding/orpc.gen.ts b/packages/contracts/generated/api/console/onboarding/orpc.gen.ts
index e3d9b96f9ec..b2acf7e9c2c 100644
--- a/packages/contracts/generated/api/console/onboarding/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/onboarding/orpc.gen.ts
@@ -6,7 +6,7 @@ import {
zGetOnboardingStepByStepTourStateResponse,
zPatchOnboardingStepByStepTourStateBody,
zPatchOnboardingStepByStepTourStateResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Get account-level Step-by-step Tour state
diff --git a/packages/contracts/generated/api/console/orpc.gen.ts b/packages/contracts/generated/api/console/orpc.gen.ts
index ce2d8485123..8ee9f6d897e 100644
--- a/packages/contracts/generated/api/console/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/orpc.gen.ts
@@ -1,85 +1,92 @@
// This file is auto-generated by @hey-api/openapi-ts
export const contractLoaders = {
- account: () => import('./account/orpc.gen').then(({ account }) => ({ account })),
- activate: () => import('./activate/orpc.gen').then(({ activate }) => ({ activate })),
- agent: () => import('./agent/orpc.gen').then(({ agent }) => ({ agent })),
+ account: () => import('./account/orpc.gen.ts').then(({ account }) => ({ account })),
+ activate: () => import('./activate/orpc.gen.ts').then(({ activate }) => ({ activate })),
+ agent: () => import('./agent/orpc.gen.ts').then(({ agent }) => ({ agent })),
allWorkspaces: () =>
- import('./all-workspaces/orpc.gen').then(({ allWorkspaces }) => ({ allWorkspaces })),
+ import('./all-workspaces/orpc.gen.ts').then(({ allWorkspaces }) => ({ allWorkspaces })),
apiBasedExtension: () =>
- import('./api-based-extension/orpc.gen').then(({ apiBasedExtension }) => ({
+ import('./api-based-extension/orpc.gen.ts').then(({ apiBasedExtension }) => ({
apiBasedExtension,
})),
- apiKeyAuth: () => import('./api-key-auth/orpc.gen').then(({ apiKeyAuth }) => ({ apiKeyAuth })),
- app: () => import('./app/orpc.gen').then(({ app }) => ({ app })),
+ apiKeyAuth: () => import('./api-key-auth/orpc.gen.ts').then(({ apiKeyAuth }) => ({ apiKeyAuth })),
+ app: () => import('./app/orpc.gen.ts').then(({ app }) => ({ app })),
appDslVersion: () =>
- import('./app-dsl-version/orpc.gen').then(({ appDslVersion }) => ({ appDslVersion })),
- apps: () => import('./apps/orpc.gen').then(({ apps }) => ({ apps })),
- auth: () => import('./auth/orpc.gen').then(({ auth }) => ({ auth })),
- billing: () => import('./billing/orpc.gen').then(({ billing }) => ({ billing })),
+ import('./app-dsl-version/orpc.gen.ts').then(({ appDslVersion }) => ({ appDslVersion })),
+ apps: () => import('./apps/orpc.gen.ts').then(({ apps }) => ({ apps })),
+ auth: () => import('./auth/orpc.gen.ts').then(({ auth }) => ({ auth })),
+ billing: () => import('./billing/orpc.gen.ts').then(({ billing }) => ({ billing })),
codeBasedExtension: () =>
- import('./code-based-extension/orpc.gen').then(({ codeBasedExtension }) => ({
+ import('./code-based-extension/orpc.gen.ts').then(({ codeBasedExtension }) => ({
codeBasedExtension,
})),
- compliance: () => import('./compliance/orpc.gen').then(({ compliance }) => ({ compliance })),
- dataSource: () => import('./data-source/orpc.gen').then(({ dataSource }) => ({ dataSource })),
- datasets: () => import('./datasets/orpc.gen').then(({ datasets }) => ({ datasets })),
+ compliance: () => import('./compliance/orpc.gen.ts').then(({ compliance }) => ({ compliance })),
+ dataSource: () => import('./data-source/orpc.gen.ts').then(({ dataSource }) => ({ dataSource })),
+ datasets: () => import('./datasets/orpc.gen.ts').then(({ datasets }) => ({ datasets })),
emailCodeLogin: () =>
- import('./email-code-login/orpc.gen').then(({ emailCodeLogin }) => ({ emailCodeLogin })),
+ import('./email-code-login/orpc.gen.ts').then(({ emailCodeLogin }) => ({ emailCodeLogin })),
emailRegister: () =>
- import('./email-register/orpc.gen').then(({ emailRegister }) => ({ emailRegister })),
- explore: () => import('./explore/orpc.gen').then(({ explore }) => ({ explore })),
- features: () => import('./features/orpc.gen').then(({ features }) => ({ features })),
- files: () => import('./files/orpc.gen').then(({ files }) => ({ files })),
+ import('./email-register/orpc.gen.ts').then(({ emailRegister }) => ({ emailRegister })),
+ explore: () => import('./explore/orpc.gen.ts').then(({ explore }) => ({ explore })),
+ features: () => import('./features/orpc.gen.ts').then(({ features }) => ({ features })),
+ files: () => import('./files/orpc.gen.ts').then(({ files }) => ({ files })),
forgotPassword: () =>
- import('./forgot-password/orpc.gen').then(({ forgotPassword }) => ({ forgotPassword })),
- form: () => import('./form/orpc.gen').then(({ form }) => ({ form })),
- init: () => import('./init/orpc.gen').then(({ init }) => ({ init })),
+ import('./forgot-password/orpc.gen.ts').then(({ forgotPassword }) => ({ forgotPassword })),
+ form: () => import('./form/orpc.gen.ts').then(({ form }) => ({ form })),
+ init: () => import('./init/orpc.gen.ts').then(({ init }) => ({ init })),
installedApps: () =>
- import('./installed-apps/orpc.gen').then(({ installedApps }) => ({ installedApps })),
+ import('./installed-apps/orpc.gen.ts').then(({ installedApps }) => ({ installedApps })),
instructionGenerate: () =>
- import('./instruction-generate/orpc.gen').then(({ instructionGenerate }) => ({
+ import('./instruction-generate/orpc.gen.ts').then(({ instructionGenerate }) => ({
instructionGenerate,
})),
- login: () => import('./login/orpc.gen').then(({ login }) => ({ login })),
- logout: () => import('./logout/orpc.gen').then(({ logout }) => ({ logout })),
+ login: () => import('./login/orpc.gen.ts').then(({ login }) => ({ login })),
+ logout: () => import('./logout/orpc.gen.ts').then(({ logout }) => ({ logout })),
notification: () =>
- import('./notification/orpc.gen').then(({ notification }) => ({ notification })),
- notion: () => import('./notion/orpc.gen').then(({ notion }) => ({ notion })),
- oauth: () => import('./oauth/orpc.gen').then(({ oauth }) => ({ oauth })),
- onboarding: () => import('./onboarding/orpc.gen').then(({ onboarding }) => ({ onboarding })),
- ping: () => import('./ping/orpc.gen').then(({ ping }) => ({ ping })),
- rag: () => import('./rag/orpc.gen').then(({ rag }) => ({ rag })),
+ import('./notification/orpc.gen.ts').then(({ notification }) => ({ notification })),
+ notion: () => import('./notion/orpc.gen.ts').then(({ notion }) => ({ notion })),
+ oauth: () => import('./oauth/orpc.gen.ts').then(({ oauth }) => ({ oauth })),
+ onboarding: () => import('./onboarding/orpc.gen.ts').then(({ onboarding }) => ({ onboarding })),
+ ping: () => import('./ping/orpc.gen.ts').then(({ ping }) => ({ ping })),
+ rag: () => import('./rag/orpc.gen.ts').then(({ rag }) => ({ rag })),
refreshToken: () =>
- import('./refresh-token/orpc.gen').then(({ refreshToken }) => ({ refreshToken })),
- remoteFiles: () => import('./remote-files/orpc.gen').then(({ remoteFiles }) => ({ remoteFiles })),
+ import('./refresh-token/orpc.gen.ts').then(({ refreshToken }) => ({ refreshToken })),
+ remoteFiles: () =>
+ import('./remote-files/orpc.gen.ts').then(({ remoteFiles }) => ({ remoteFiles })),
resetPassword: () =>
- import('./reset-password/orpc.gen').then(({ resetPassword }) => ({ resetPassword })),
+ import('./reset-password/orpc.gen.ts').then(({ resetPassword }) => ({ resetPassword })),
ruleCodeGenerate: () =>
- import('./rule-code-generate/orpc.gen').then(({ ruleCodeGenerate }) => ({ ruleCodeGenerate })),
+ import('./rule-code-generate/orpc.gen.ts').then(({ ruleCodeGenerate }) => ({
+ ruleCodeGenerate,
+ })),
ruleGenerate: () =>
- import('./rule-generate/orpc.gen').then(({ ruleGenerate }) => ({ ruleGenerate })),
+ import('./rule-generate/orpc.gen.ts').then(({ ruleGenerate }) => ({ ruleGenerate })),
ruleStructuredOutputGenerate: () =>
- import('./rule-structured-output-generate/orpc.gen').then(
+ import('./rule-structured-output-generate/orpc.gen.ts').then(
({ ruleStructuredOutputGenerate }) => ({ ruleStructuredOutputGenerate }),
),
- setup: () => import('./setup/orpc.gen').then(({ setup }) => ({ setup })),
- snippets: () => import('./snippets/orpc.gen').then(({ snippets }) => ({ snippets })),
- spec: () => import('./spec/orpc.gen').then(({ spec }) => ({ spec })),
+ setup: () => import('./setup/orpc.gen.ts').then(({ setup }) => ({ setup })),
+ snippets: () => import('./snippets/orpc.gen.ts').then(({ snippets }) => ({ snippets })),
+ spec: () => import('./spec/orpc.gen.ts').then(({ spec }) => ({ spec })),
systemFeatures: () =>
- import('./system-features/orpc.gen').then(({ systemFeatures }) => ({ systemFeatures })),
- tagBindings: () => import('./tag-bindings/orpc.gen').then(({ tagBindings }) => ({ tagBindings })),
- tags: () => import('./tags/orpc.gen').then(({ tags }) => ({ tags })),
- trialApps: () => import('./trial-apps/orpc.gen').then(({ trialApps }) => ({ trialApps })),
- trialModels: () => import('./trial-models/orpc.gen').then(({ trialModels }) => ({ trialModels })),
- version: () => import('./version/orpc.gen').then(({ version }) => ({ version })),
- website: () => import('./website/orpc.gen').then(({ website }) => ({ website })),
- workflow: () => import('./workflow/orpc.gen').then(({ workflow }) => ({ workflow })),
+ import('./system-features/orpc.gen.ts').then(({ systemFeatures }) => ({ systemFeatures })),
+ tagBindings: () =>
+ import('./tag-bindings/orpc.gen.ts').then(({ tagBindings }) => ({ tagBindings })),
+ tags: () => import('./tags/orpc.gen.ts').then(({ tags }) => ({ tags })),
+ trialApps: () => import('./trial-apps/orpc.gen.ts').then(({ trialApps }) => ({ trialApps })),
+ trialModels: () =>
+ import('./trial-models/orpc.gen.ts').then(({ trialModels }) => ({ trialModels })),
+ version: () => import('./version/orpc.gen.ts').then(({ version }) => ({ version })),
+ website: () => import('./website/orpc.gen.ts').then(({ website }) => ({ website })),
+ workflow: () => import('./workflow/orpc.gen.ts').then(({ workflow }) => ({ workflow })),
workflowGenerate: () =>
- import('./workflow-generate/orpc.gen').then(({ workflowGenerate }) => ({ workflowGenerate })),
+ import('./workflow-generate/orpc.gen.ts').then(({ workflowGenerate }) => ({
+ workflowGenerate,
+ })),
workflowRunArchives: () =>
- import('./workflow-run-archives/orpc.gen').then(({ workflowRunArchives }) => ({
+ import('./workflow-run-archives/orpc.gen.ts').then(({ workflowRunArchives }) => ({
workflowRunArchives,
})),
- workspaces: () => import('./workspaces/orpc.gen').then(({ workspaces }) => ({ workspaces })),
+ workspaces: () => import('./workspaces/orpc.gen.ts').then(({ workspaces }) => ({ workspaces })),
}
diff --git a/packages/contracts/generated/api/console/ping/orpc.gen.ts b/packages/contracts/generated/api/console/ping/orpc.gen.ts
index b931e3bfb27..7465a5c0c60 100644
--- a/packages/contracts/generated/api/console/ping/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/ping/orpc.gen.ts
@@ -1,7 +1,7 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
-import { zGetPingResponse } from './zod.gen'
+import { zGetPingResponse } from './zod.gen.ts'
/**
* Health check endpoint for connection testing.
diff --git a/packages/contracts/generated/api/console/rag/orpc.gen.ts b/packages/contracts/generated/api/console/rag/orpc.gen.ts
index 3609fc31511..d2a27ca561d 100644
--- a/packages/contracts/generated/api/console/rag/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/rag/orpc.gen.ts
@@ -128,7 +128,7 @@ import {
zPostRagPipelinesTransformDatasetsByDatasetIdResponse,
zPutRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResetPath,
zPutRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResetResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const delete_ = oc
.route({
diff --git a/packages/contracts/generated/api/console/refresh-token/orpc.gen.ts b/packages/contracts/generated/api/console/refresh-token/orpc.gen.ts
index 7e8001c2bb7..fba62fd8859 100644
--- a/packages/contracts/generated/api/console/refresh-token/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/refresh-token/orpc.gen.ts
@@ -1,7 +1,7 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
-import { zPostRefreshTokenResponse } from './zod.gen'
+import { zPostRefreshTokenResponse } from './zod.gen.ts'
export const post = oc
.route({
diff --git a/packages/contracts/generated/api/console/remote-files/orpc.gen.ts b/packages/contracts/generated/api/console/remote-files/orpc.gen.ts
index d495e56324b..d45bf7e0779 100644
--- a/packages/contracts/generated/api/console/remote-files/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/remote-files/orpc.gen.ts
@@ -7,7 +7,7 @@ import {
zGetRemoteFilesByUrlResponse,
zPostRemoteFilesUploadBody,
zPostRemoteFilesUploadResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const post = oc
.route({
diff --git a/packages/contracts/generated/api/console/reset-password/orpc.gen.ts b/packages/contracts/generated/api/console/reset-password/orpc.gen.ts
index 7af731391c1..2516ee07dc7 100644
--- a/packages/contracts/generated/api/console/reset-password/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/reset-password/orpc.gen.ts
@@ -2,7 +2,7 @@
import { oc } from '@orpc/contract'
import * as z from 'zod'
-import { zPostResetPasswordBody, zPostResetPasswordResponse } from './zod.gen'
+import { zPostResetPasswordBody, zPostResetPasswordResponse } from './zod.gen.ts'
export const post = oc
.route({
diff --git a/packages/contracts/generated/api/console/router.gen.ts b/packages/contracts/generated/api/console/router.gen.ts
index 2ae3025e0f8..76def14b808 100644
--- a/packages/contracts/generated/api/console/router.gen.ts
+++ b/packages/contracts/generated/api/console/router.gen.ts
@@ -1,59 +1,59 @@
// This file is auto-generated by packages/contracts/openapi-ts.api.config.ts
-import { contract as enterpriseContract } from '../../enterprise/orpc.gen'
-import { account } from './account/orpc.gen'
-import { activate } from './activate/orpc.gen'
-import { agent } from './agent/orpc.gen'
-import { allWorkspaces } from './all-workspaces/orpc.gen'
-import { apiBasedExtension } from './api-based-extension/orpc.gen'
-import { apiKeyAuth } from './api-key-auth/orpc.gen'
-import { appDslVersion } from './app-dsl-version/orpc.gen'
-import { app } from './app/orpc.gen'
-import { apps } from './apps/orpc.gen'
-import { auth } from './auth/orpc.gen'
-import { billing } from './billing/orpc.gen'
-import { codeBasedExtension } from './code-based-extension/orpc.gen'
-import { compliance } from './compliance/orpc.gen'
-import { dataSource } from './data-source/orpc.gen'
-import { datasets } from './datasets/orpc.gen'
-import { emailCodeLogin } from './email-code-login/orpc.gen'
-import { emailRegister } from './email-register/orpc.gen'
-import { explore } from './explore/orpc.gen'
-import { features } from './features/orpc.gen'
-import { files } from './files/orpc.gen'
-import { forgotPassword } from './forgot-password/orpc.gen'
-import { form } from './form/orpc.gen'
-import { init } from './init/orpc.gen'
-import { installedApps } from './installed-apps/orpc.gen'
-import { instructionGenerate } from './instruction-generate/orpc.gen'
-import { login } from './login/orpc.gen'
-import { logout } from './logout/orpc.gen'
-import { notification } from './notification/orpc.gen'
-import { notion } from './notion/orpc.gen'
-import { oauth } from './oauth/orpc.gen'
-import { onboarding } from './onboarding/orpc.gen'
-import { ping } from './ping/orpc.gen'
-import { rag } from './rag/orpc.gen'
-import { refreshToken } from './refresh-token/orpc.gen'
-import { remoteFiles } from './remote-files/orpc.gen'
-import { resetPassword } from './reset-password/orpc.gen'
-import { ruleCodeGenerate } from './rule-code-generate/orpc.gen'
-import { ruleGenerate } from './rule-generate/orpc.gen'
-import { ruleStructuredOutputGenerate } from './rule-structured-output-generate/orpc.gen'
-import { setup } from './setup/orpc.gen'
-import { snippets } from './snippets/orpc.gen'
-import { spec } from './spec/orpc.gen'
-import { systemFeatures } from './system-features/orpc.gen'
-import { tagBindings } from './tag-bindings/orpc.gen'
-import { tags } from './tags/orpc.gen'
-import { trialApps } from './trial-apps/orpc.gen'
-import { trialModels } from './trial-models/orpc.gen'
-import { version } from './version/orpc.gen'
-import { website } from './website/orpc.gen'
-import { workflowGenerate } from './workflow-generate/orpc.gen'
-import { workflowRunArchives } from './workflow-run-archives/orpc.gen'
-import { workflow } from './workflow/orpc.gen'
-import { workspaces } from './workspaces/orpc.gen'
+import { contract as enterpriseContract } from '../../enterprise/orpc.gen.ts'
+import { account } from './account/orpc.gen.ts'
+import { activate } from './activate/orpc.gen.ts'
+import { agent } from './agent/orpc.gen.ts'
+import { allWorkspaces } from './all-workspaces/orpc.gen.ts'
+import { apiBasedExtension } from './api-based-extension/orpc.gen.ts'
+import { apiKeyAuth } from './api-key-auth/orpc.gen.ts'
+import { appDslVersion } from './app-dsl-version/orpc.gen.ts'
+import { app } from './app/orpc.gen.ts'
+import { apps } from './apps/orpc.gen.ts'
+import { auth } from './auth/orpc.gen.ts'
+import { billing } from './billing/orpc.gen.ts'
+import { codeBasedExtension } from './code-based-extension/orpc.gen.ts'
+import { compliance } from './compliance/orpc.gen.ts'
+import { dataSource } from './data-source/orpc.gen.ts'
+import { datasets } from './datasets/orpc.gen.ts'
+import { emailCodeLogin } from './email-code-login/orpc.gen.ts'
+import { emailRegister } from './email-register/orpc.gen.ts'
+import { explore } from './explore/orpc.gen.ts'
+import { features } from './features/orpc.gen.ts'
+import { files } from './files/orpc.gen.ts'
+import { forgotPassword } from './forgot-password/orpc.gen.ts'
+import { form } from './form/orpc.gen.ts'
+import { init } from './init/orpc.gen.ts'
+import { installedApps } from './installed-apps/orpc.gen.ts'
+import { instructionGenerate } from './instruction-generate/orpc.gen.ts'
+import { login } from './login/orpc.gen.ts'
+import { logout } from './logout/orpc.gen.ts'
+import { notification } from './notification/orpc.gen.ts'
+import { notion } from './notion/orpc.gen.ts'
+import { oauth } from './oauth/orpc.gen.ts'
+import { onboarding } from './onboarding/orpc.gen.ts'
+import { ping } from './ping/orpc.gen.ts'
+import { rag } from './rag/orpc.gen.ts'
+import { refreshToken } from './refresh-token/orpc.gen.ts'
+import { remoteFiles } from './remote-files/orpc.gen.ts'
+import { resetPassword } from './reset-password/orpc.gen.ts'
+import { ruleCodeGenerate } from './rule-code-generate/orpc.gen.ts'
+import { ruleGenerate } from './rule-generate/orpc.gen.ts'
+import { ruleStructuredOutputGenerate } from './rule-structured-output-generate/orpc.gen.ts'
+import { setup } from './setup/orpc.gen.ts'
+import { snippets } from './snippets/orpc.gen.ts'
+import { spec } from './spec/orpc.gen.ts'
+import { systemFeatures } from './system-features/orpc.gen.ts'
+import { tagBindings } from './tag-bindings/orpc.gen.ts'
+import { tags } from './tags/orpc.gen.ts'
+import { trialApps } from './trial-apps/orpc.gen.ts'
+import { trialModels } from './trial-models/orpc.gen.ts'
+import { version } from './version/orpc.gen.ts'
+import { website } from './website/orpc.gen.ts'
+import { workflowGenerate } from './workflow-generate/orpc.gen.ts'
+import { workflowRunArchives } from './workflow-run-archives/orpc.gen.ts'
+import { workflow } from './workflow/orpc.gen.ts'
+import { workspaces } from './workspaces/orpc.gen.ts'
const communityContract = {
account,
diff --git a/packages/contracts/generated/api/console/rule-code-generate/orpc.gen.ts b/packages/contracts/generated/api/console/rule-code-generate/orpc.gen.ts
index 88a88e6088f..062a0223ec8 100644
--- a/packages/contracts/generated/api/console/rule-code-generate/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/rule-code-generate/orpc.gen.ts
@@ -2,7 +2,7 @@
import { oc } from '@orpc/contract'
import * as z from 'zod'
-import { zPostRuleCodeGenerateBody, zPostRuleCodeGenerateResponse } from './zod.gen'
+import { zPostRuleCodeGenerateBody, zPostRuleCodeGenerateResponse } from './zod.gen.ts'
/**
* Generate code rules using LLM
diff --git a/packages/contracts/generated/api/console/rule-generate/orpc.gen.ts b/packages/contracts/generated/api/console/rule-generate/orpc.gen.ts
index e231a07daff..ea0c60ed702 100644
--- a/packages/contracts/generated/api/console/rule-generate/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/rule-generate/orpc.gen.ts
@@ -2,7 +2,7 @@
import { oc } from '@orpc/contract'
import * as z from 'zod'
-import { zPostRuleGenerateBody, zPostRuleGenerateResponse } from './zod.gen'
+import { zPostRuleGenerateBody, zPostRuleGenerateResponse } from './zod.gen.ts'
/**
* Generate rule configuration using LLM
diff --git a/packages/contracts/generated/api/console/rule-structured-output-generate/orpc.gen.ts b/packages/contracts/generated/api/console/rule-structured-output-generate/orpc.gen.ts
index 3f43785a56a..f62d367090c 100644
--- a/packages/contracts/generated/api/console/rule-structured-output-generate/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/rule-structured-output-generate/orpc.gen.ts
@@ -5,7 +5,7 @@ import * as z from 'zod'
import {
zPostRuleStructuredOutputGenerateBody,
zPostRuleStructuredOutputGenerateResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Generate structured output rules using LLM
diff --git a/packages/contracts/generated/api/console/setup/orpc.gen.ts b/packages/contracts/generated/api/console/setup/orpc.gen.ts
index e298a076637..113322380d5 100644
--- a/packages/contracts/generated/api/console/setup/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/setup/orpc.gen.ts
@@ -2,7 +2,7 @@
import { oc } from '@orpc/contract'
import * as z from 'zod'
-import { zGetSetupResponse, zPostSetupBody, zPostSetupResponse } from './zod.gen'
+import { zGetSetupResponse, zPostSetupBody, zPostSetupResponse } from './zod.gen.ts'
/**
* Get system setup status.
diff --git a/packages/contracts/generated/api/console/snippets/orpc.gen.ts b/packages/contracts/generated/api/console/snippets/orpc.gen.ts
index f4b77908296..4e664987a77 100644
--- a/packages/contracts/generated/api/console/snippets/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/snippets/orpc.gen.ts
@@ -94,7 +94,7 @@ import {
zPutSnippetsBySnippetIdWorkflowsDraftNodesByNodeIdAgentComposerResponse,
zPutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetPath,
zPutSnippetsBySnippetIdWorkflowsDraftVariablesByVariableIdResetResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Stop a running snippet workflow task
diff --git a/packages/contracts/generated/api/console/spec/orpc.gen.ts b/packages/contracts/generated/api/console/spec/orpc.gen.ts
index a5bc7eaff3a..91a99819723 100644
--- a/packages/contracts/generated/api/console/spec/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/spec/orpc.gen.ts
@@ -1,7 +1,7 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
-import { zGetSpecSchemaDefinitionsResponse } from './zod.gen'
+import { zGetSpecSchemaDefinitionsResponse } from './zod.gen.ts'
/**
* Get system JSON Schema definitions specification
diff --git a/packages/contracts/generated/api/console/system-features/orpc.gen.ts b/packages/contracts/generated/api/console/system-features/orpc.gen.ts
index 4cdfe46ea87..fcc88949c1f 100644
--- a/packages/contracts/generated/api/console/system-features/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/system-features/orpc.gen.ts
@@ -1,7 +1,7 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
-import { zGetSystemFeaturesLicenseResponse, zGetSystemFeaturesResponse } from './zod.gen'
+import { zGetSystemFeaturesLicenseResponse, zGetSystemFeaturesResponse } from './zod.gen.ts'
/**
* Get full license detail (status, expiry, workspace/seat usage)
diff --git a/packages/contracts/generated/api/console/tag-bindings/orpc.gen.ts b/packages/contracts/generated/api/console/tag-bindings/orpc.gen.ts
index 2036b447222..702f86a4a74 100644
--- a/packages/contracts/generated/api/console/tag-bindings/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/tag-bindings/orpc.gen.ts
@@ -7,7 +7,7 @@ import {
zPostTagBindingsRemoveBody,
zPostTagBindingsRemoveResponse,
zPostTagBindingsResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Remove one or more tag bindings from a target.
diff --git a/packages/contracts/generated/api/console/tags/orpc.gen.ts b/packages/contracts/generated/api/console/tags/orpc.gen.ts
index 2398d6517b4..6ec1323b54d 100644
--- a/packages/contracts/generated/api/console/tags/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/tags/orpc.gen.ts
@@ -12,7 +12,7 @@ import {
zPatchTagsByTagIdResponse,
zPostTagsBody,
zPostTagsResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const delete_ = oc
.route({
diff --git a/packages/contracts/generated/api/console/trial-apps/orpc.gen.ts b/packages/contracts/generated/api/console/trial-apps/orpc.gen.ts
index 15ae5b56f51..11dac160a1a 100644
--- a/packages/contracts/generated/api/console/trial-apps/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/trial-apps/orpc.gen.ts
@@ -38,7 +38,7 @@ import {
zPostTrialAppsByAppIdWorkflowsRunResponse,
zPostTrialAppsByAppIdWorkflowsTasksByTaskIdStopPath,
zPostTrialAppsByAppIdWorkflowsTasksByTaskIdStopResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const post = oc
.route({
diff --git a/packages/contracts/generated/api/console/trial-models/orpc.gen.ts b/packages/contracts/generated/api/console/trial-models/orpc.gen.ts
index ce3fb8d09a4..031d6b37fff 100644
--- a/packages/contracts/generated/api/console/trial-models/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/trial-models/orpc.gen.ts
@@ -1,7 +1,7 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
-import { zGetTrialModelsResponse } from './zod.gen'
+import { zGetTrialModelsResponse } from './zod.gen.ts'
/**
* Get hosted credit provider configuration for the current workspace
diff --git a/packages/contracts/generated/api/console/version/orpc.gen.ts b/packages/contracts/generated/api/console/version/orpc.gen.ts
index 661d1a9b3cb..7d63787e52f 100644
--- a/packages/contracts/generated/api/console/version/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/version/orpc.gen.ts
@@ -2,7 +2,7 @@
import { oc } from '@orpc/contract'
import * as z from 'zod'
-import { zGetVersionQuery, zGetVersionResponse } from './zod.gen'
+import { zGetVersionQuery, zGetVersionResponse } from './zod.gen.ts'
/**
* Check for application version updates.
diff --git a/packages/contracts/generated/api/console/website/orpc.gen.ts b/packages/contracts/generated/api/console/website/orpc.gen.ts
index ed6e287f985..772c42d314d 100644
--- a/packages/contracts/generated/api/console/website/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/website/orpc.gen.ts
@@ -8,7 +8,7 @@ import {
zGetWebsiteCrawlStatusByJobIdResponse,
zPostWebsiteCrawlBody,
zPostWebsiteCrawlResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Get website crawl status
diff --git a/packages/contracts/generated/api/console/workflow-generate/orpc.gen.ts b/packages/contracts/generated/api/console/workflow-generate/orpc.gen.ts
index 8887d7f6101..89f05fa39bf 100644
--- a/packages/contracts/generated/api/console/workflow-generate/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/workflow-generate/orpc.gen.ts
@@ -9,7 +9,7 @@ import {
zPostWorkflowGenerateStreamResponse,
zPostWorkflowGenerateSuggestionsBody,
zPostWorkflowGenerateSuggestionsResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Stream a Dify workflow graph (plan then result) via SSE
diff --git a/packages/contracts/generated/api/console/workflow-run-archives/orpc.gen.ts b/packages/contracts/generated/api/console/workflow-run-archives/orpc.gen.ts
index 61837a81d98..34321a36b0a 100644
--- a/packages/contracts/generated/api/console/workflow-run-archives/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/workflow-run-archives/orpc.gen.ts
@@ -8,7 +8,7 @@ import {
zGetWorkflowRunArchivesResponse,
zPostWorkflowRunArchivesDownloadsBody,
zPostWorkflowRunArchivesDownloadsResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Get a temporary workflow-run archive download task
diff --git a/packages/contracts/generated/api/console/workflow/orpc.gen.ts b/packages/contracts/generated/api/console/workflow/orpc.gen.ts
index ec96e7bb903..0505daee95c 100644
--- a/packages/contracts/generated/api/console/workflow/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/workflow/orpc.gen.ts
@@ -7,7 +7,7 @@ import {
zGetWorkflowByWorkflowRunIdEventsResponse,
zGetWorkflowByWorkflowRunIdPauseDetailsPath,
zGetWorkflowByWorkflowRunIdPauseDetailsResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Get workflow execution events stream after resume
diff --git a/packages/contracts/generated/api/console/workspaces/orpc.gen.ts b/packages/contracts/generated/api/console/workspaces/orpc.gen.ts
index 0911774b0dc..c2615dc448b 100644
--- a/packages/contracts/generated/api/console/workspaces/orpc.gen.ts
+++ b/packages/contracts/generated/api/console/workspaces/orpc.gen.ts
@@ -525,7 +525,7 @@ import {
zPutWorkspacesCurrentSkillsBySkillIdFilesResponse,
zPutWorkspacesCurrentToolProviderMcpBody,
zPutWorkspacesCurrentToolProviderMcpResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Get specific agent provider details
diff --git a/packages/contracts/generated/api/openapi/orpc.gen.ts b/packages/contracts/generated/api/openapi/orpc.gen.ts
index 416e9dc9f34..dd0c7ee51e7 100644
--- a/packages/contracts/generated/api/openapi/orpc.gen.ts
+++ b/packages/contracts/generated/api/openapi/orpc.gen.ts
@@ -84,7 +84,7 @@ import {
zPostWorkspacesByWorkspaceIdMembersResponse,
zPostWorkspacesByWorkspaceIdSwitchPath,
zPostWorkspacesByWorkspaceIdSwitchResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Machine-readable catalog of every op on this surface
diff --git a/packages/contracts/generated/api/service/orpc.gen.ts b/packages/contracts/generated/api/service/orpc.gen.ts
index de2363aad6d..07f9ff9eda2 100644
--- a/packages/contracts/generated/api/service/orpc.gen.ts
+++ b/packages/contracts/generated/api/service/orpc.gen.ts
@@ -216,7 +216,7 @@ import {
zPutConversationsByConversationIdVariablesByVariableIdBody,
zPutConversationsByConversationIdVariablesByVariableIdPath,
zPutConversationsByConversationIdVariablesByVariableIdResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Return public Service API metadata without requiring an API key
diff --git a/packages/contracts/generated/api/web/orpc.gen.ts b/packages/contracts/generated/api/web/orpc.gen.ts
index d235d56a60f..f8af2cb52c2 100644
--- a/packages/contracts/generated/api/web/orpc.gen.ts
+++ b/packages/contracts/generated/api/web/orpc.gen.ts
@@ -88,7 +88,7 @@ import {
zPostWorkflowsRunResponse,
zPostWorkflowsTasksByTaskIdStopPath,
zPostWorkflowsTasksByTaskIdStopResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
/**
* Convert audio to text
diff --git a/packages/contracts/generated/enterprise-app-deploy/orpc.gen.ts b/packages/contracts/generated/enterprise-app-deploy/orpc.gen.ts
index 6df55a62422..c7d8a358163 100644
--- a/packages/contracts/generated/enterprise-app-deploy/orpc.gen.ts
+++ b/packages/contracts/generated/enterprise-app-deploy/orpc.gen.ts
@@ -45,7 +45,7 @@ import {
zConsoleDeploymentServicePrecheckWorkflowDeploymentResponse,
zConsoleDeploymentServiceUndeployWorkflowPath,
zConsoleDeploymentServiceUndeployWorkflowResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const listAppEnvironments = oc
.route({
diff --git a/packages/contracts/generated/enterprise/orpc.gen.ts b/packages/contracts/generated/enterprise/orpc.gen.ts
index d8c6383bcba..25c47f2311b 100644
--- a/packages/contracts/generated/enterprise/orpc.gen.ts
+++ b/packages/contracts/generated/enterprise/orpc.gen.ts
@@ -104,7 +104,7 @@ import {
zWebAppAuthSearchForWhilteListCandidatesResponse,
zWebAppAuthUpdateWebAppWhitelistSubjectsBody,
zWebAppAuthUpdateWebAppWhitelistSubjectsResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const listAppInstanceSummaries = oc
.route({
diff --git a/packages/contracts/generated/knowledge-fs/metadata.gen.ts b/packages/contracts/generated/knowledge-fs/metadata.gen.ts
index 1b975bf9339..c0da859bae0 100644
--- a/packages/contracts/generated/knowledge-fs/metadata.gen.ts
+++ b/packages/contracts/generated/knowledge-fs/metadata.gen.ts
@@ -6,7 +6,7 @@ export const knowledgeFsSourceOpenapiSha256 =
export const knowledgeFsConsoleDeclarationsSha256 =
'8bd1924747fdd0d478ca085817cbe000eb7e8630b2c6a03f4f13a6a0fac07946'
export const knowledgeFsGeneratedArtifactSha256 = {
- 'orpc.gen.ts': 'e0d9954f817e97a4e95dd38c4522fb403c8659d741ce485fa671b1b4ce90a540',
+ 'orpc.gen.ts': '11420f82003ec19a90da1b0a4c7f47a395d8700e91d0fb32b6ae533617285950',
'types.gen.ts': 'a558ab80f32a8555bb5b44b7a596ef4a4a7a8cb7904390993aabcc587915f530',
'zod.gen.ts': 'ca698a6fa64a0717e29da5d4678976b55355a2c0fe5ddfa7037325aa79ab4762',
} as const
diff --git a/packages/contracts/generated/knowledge-fs/orpc.gen.ts b/packages/contracts/generated/knowledge-fs/orpc.gen.ts
index 97816509fc2..de54afa8d31 100644
--- a/packages/contracts/generated/knowledge-fs/orpc.gen.ts
+++ b/packages/contracts/generated/knowledge-fs/orpc.gen.ts
@@ -265,7 +265,7 @@ import {
zPutKnowledgeSpacesByIdSourcesBySourceIdSyncPolicyHeaders,
zPutKnowledgeSpacesByIdSourcesBySourceIdSyncPolicyPath,
zPutKnowledgeSpacesByIdSourcesBySourceIdSyncPolicyResponse,
-} from './zod.gen'
+} from './zod.gen.ts'
export const listKnowledgeSpaces = oc
.route({
diff --git a/packages/contracts/openapi-ts.api.config.ts b/packages/contracts/openapi-ts.api.config.ts
index 05d91cd0852..8a15a4bd53c 100644
--- a/packages/contracts/openapi-ts.api.config.ts
+++ b/packages/contracts/openapi-ts.api.config.ts
@@ -496,7 +496,7 @@ const consoleContractEntryContent = (segments: string[]) => {
const contractEntries = contracts
.map(
(contract) =>
- ` ${contract.name}: () => import('./${contract.importPath}/orpc.gen').then(({ ${contract.name} }) => ({ ${contract.name} })),`,
+ ` ${contract.name}: () => import('./${contract.importPath}/orpc.gen.ts').then(({ ${contract.name} }) => ({ ${contract.name} })),`,
)
.join('\n')
@@ -523,7 +523,7 @@ const consoleRouterContractContent = (segments: string[]) => {
})
const imports = contracts
- .map((contract) => `import { ${contract.name} } from './${contract.importPath}/orpc.gen'`)
+ .map((contract) => `import { ${contract.name} } from './${contract.importPath}/orpc.gen.ts'`)
.join('\n')
const communityContractEntries = contracts.map((contract) => ` ${contract.name},`).join('\n')
@@ -531,7 +531,7 @@ const consoleRouterContractContent = (segments: string[]) => {
return `// This file is auto-generated by packages/contracts/openapi-ts.api.config.ts
${imports}
-import { contract as enterpriseContract } from '../../enterprise/orpc.gen'
+import { contract as enterpriseContract } from '../../enterprise/orpc.gen.ts'
const communityContract = {
${communityContractEntries}
@@ -611,6 +611,7 @@ const createApiConfig = (job: ApiJob): UserConfig => ({
file: false,
},
output: {
+ module: { extension: '.ts' },
clean: false,
entryFile: false,
fileName: {
diff --git a/packages/contracts/openapi-ts.enterprise-app-deploy.config.ts b/packages/contracts/openapi-ts.enterprise-app-deploy.config.ts
index f3e76397e08..4c206ac19c0 100644
--- a/packages/contracts/openapi-ts.enterprise-app-deploy.config.ts
+++ b/packages/contracts/openapi-ts.enterprise-app-deploy.config.ts
@@ -2,7 +2,7 @@ import fs from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { defineConfig } from '@hey-api/openapi-ts'
-import { loadOpenApiYaml } from './openapi-yaml'
+import { loadOpenApiYaml } from './openapi-yaml.ts'
type JsonObject = Record<string, unknown>
@@ -292,6 +292,7 @@ const normalizeEnterpriseOpenApi = () => {
export default defineConfig({
input: normalizeEnterpriseOpenApi(),
output: {
+ module: { extension: '.ts' },
entryFile: false,
path: 'generated/enterprise-app-deploy',
fileName: {
diff --git a/packages/contracts/openapi-ts.enterprise.config.ts b/packages/contracts/openapi-ts.enterprise.config.ts
index 68c84feb3b4..920f90fcc03 100644
--- a/packages/contracts/openapi-ts.enterprise.config.ts
+++ b/packages/contracts/openapi-ts.enterprise.config.ts
@@ -2,7 +2,7 @@ import fs from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { defineConfig } from '@hey-api/openapi-ts'
-import { loadOpenApiYaml } from './openapi-yaml'
+import { loadOpenApiYaml } from './openapi-yaml.ts'
type JsonObject = Record<string, unknown>
@@ -291,6 +291,7 @@ const normalizeEnterpriseOpenApi = () => {
export default defineConfig({
input: normalizeEnterpriseOpenApi(),
output: {
+ module: { extension: '.ts' },
entryFile: false,
path: 'generated/enterprise',
fileName: {
diff --git a/packages/contracts/openapi-ts.knowledge-fs.config.ts b/packages/contracts/openapi-ts.knowledge-fs.config.ts
index 7270068414d..e2b111680e3 100644
--- a/packages/contracts/openapi-ts.knowledge-fs.config.ts
+++ b/packages/contracts/openapi-ts.knowledge-fs.config.ts
@@ -11,6 +11,7 @@ export default defineConfig({
file: false,
},
output: {
+ module: { extension: '.ts' },
clean: true,
entryFile: false,
fileName: {
diff --git a/packages/contracts/openapi-yaml.test.ts b/packages/contracts/openapi-yaml.test.ts
index 26127e1128f..d2c03cc72c7 100644
--- a/packages/contracts/openapi-yaml.test.ts
+++ b/packages/contracts/openapi-yaml.test.ts
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vite-plus/test'
-import { loadOpenApiYaml } from './openapi-yaml'
+import { loadOpenApiYaml } from './openapi-yaml.ts'
describe('loadOpenApiYaml', () => {
it('preserves merge keys and timestamps used by v4 documents', () => {
diff --git a/packages/contracts/sandbox-contract.smoke.test.ts b/packages/contracts/sandbox-contract.smoke.test.ts
index 12041d4d9d9..9744e8dcfff 100644
--- a/packages/contracts/sandbox-contract.smoke.test.ts
+++ b/packages/contracts/sandbox-contract.smoke.test.ts
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vite-plus/test'
-import { sandbox as agentSandbox } from './generated/api/console/agent/orpc.gen'
-import { sandbox as appSandbox } from './generated/api/console/apps/orpc.gen'
+import { sandbox as agentSandbox } from './generated/api/console/agent/orpc.gen.ts'
+import { sandbox as appSandbox } from './generated/api/console/apps/orpc.gen.ts'
describe('generated sandbox contracts', () => {
it.each([
diff --git a/packages/contracts/service-api-contract.test.ts b/packages/contracts/service-api-contract.test.ts
index 70225faf193..0600ffd221b 100644
--- a/packages/contracts/service-api-contract.test.ts
+++ b/packages/contracts/service-api-contract.test.ts
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vite-plus/test'
-import { zFileResponse } from './generated/api/console/files/zod.gen'
+import { zFileResponse } from './generated/api/console/files/zod.gen.ts'
import {
zCompletionRequestPayloadWithUser,
zParameters,
@@ -8,7 +8,7 @@ import {
zPostDatasetsByDatasetIdPipelineRunResponse,
zPostWorkflowsByWorkflowIdRunResponse,
zPostWorkflowsRunResponse,
-} from './generated/api/service/zod.gen'
+} from './generated/api/service/zod.gen.ts'
describe('generated Service API schemas', () => {
it('keeps JSON int64 values as numbers', () => {
diff --git a/packages/contracts/tsconfig.json b/packages/contracts/tsconfig.json
index c56a848fea0..49a507d1807 100644
--- a/packages/contracts/tsconfig.json
+++ b/packages/contracts/tsconfig.json
@@ -1,5 +1,10 @@
{
"extends": "@dify/tsconfig/node.json",
"include": ["*.ts", "generated/**/*.ts"],
- "exclude": ["node_modules"]
+ "exclude": ["node_modules"],
+ "compilerOptions": {
+ "module": "NodeNext",
+ "moduleResolution": "NodeNext",
+ "allowImportingTsExtensions": true
+ }
}
diff --git a/packages/iconify-collections/custom-public/index.js b/packages/iconify-collections/custom-public/index.js
deleted file mode 100644
index 109d0a817cb..00000000000
--- a/packages/iconify-collections/custom-public/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict'
-
-const icons = require('./icons.json')
-const info = require('./info.json')
-const metadata = require('./metadata.json')
-const chars = require('./chars.json')
-
-module.exports = { icons, info, metadata, chars }
diff --git a/packages/iconify-collections/custom-vender/index.js b/packages/iconify-collections/custom-vender/index.js
deleted file mode 100644
index 109d0a817cb..00000000000
--- a/packages/iconify-collections/custom-vender/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict'
-
-const icons = require('./icons.json')
-const info = require('./info.json')
-const metadata = require('./metadata.json')
-const chars = require('./chars.json')
-
-module.exports = { icons, info, metadata, chars }
diff --git a/packages/iconify-collections/package.json b/packages/iconify-collections/package.json
index 7c37657dedc..25e2de9137a 100644
--- a/packages/iconify-collections/package.json
+++ b/packages/iconify-collections/package.json
@@ -2,11 +2,11 @@
"name": "@dify/iconify-collections",
"version": "0.0.0-private",
"private": true,
+ "type": "module",
"exports": {
"./custom-public": {
"types": "./custom-public/index.d.ts",
- "import": "./custom-public/index.mjs",
- "require": "./custom-public/index.js"
+ "import": "./custom-public/index.mjs"
},
"./custom-public/icons.json": "./custom-public/icons.json",
"./custom-public/info.json": "./custom-public/info.json",
@@ -14,8 +14,7 @@
"./custom-public/chars.json": "./custom-public/chars.json",
"./custom-vender": {
"types": "./custom-vender/index.d.ts",
- "import": "./custom-vender/index.mjs",
- "require": "./custom-vender/index.js"
+ "import": "./custom-vender/index.mjs"
},
"./custom-vender/icons.json": "./custom-vender/icons.json",
"./custom-vender/info.json": "./custom-vender/info.json",
@@ -23,15 +22,14 @@
"./custom-vender/chars.json": "./custom-vender/chars.json"
},
"scripts": {
- "check:dimensions": "tsx ./scripts/check-icon-dimensions.ts",
- "generate": "tsx ./scripts/generate-collections.ts",
+ "check:dimensions": "node ./scripts/check-icon-dimensions.ts",
+ "generate": "node ./scripts/generate-collections.ts",
"type-check": "tsc"
},
"devDependencies": {
"@dify/tsconfig": "workspace:*",
"@types/node": "catalog:",
"@typescript/native": "catalog:",
- "iconify-import-svg": "catalog:",
- "tsx": "catalog:"
+ "iconify-import-svg": "catalog:"
}
}
diff --git a/packages/iconify-collections/scripts/generate-collections.ts b/packages/iconify-collections/scripts/generate-collections.ts
index 38737fed09a..d25b84293e1 100644
--- a/packages/iconify-collections/scripts/generate-collections.ts
+++ b/packages/iconify-collections/scripts/generate-collections.ts
@@ -140,17 +140,7 @@ import info from './info.json' with { type: 'json' }
import metadata from './metadata.json' with { type: 'json' }
import chars from './chars.json' with { type: 'json' }
-export { icons, info, metadata, chars }
-`
-
-const createIndexJs = (): string => `'use strict'
-
-const icons = require('./icons.json')
-const info = require('./info.json')
-const metadata = require('./metadata.json')
-const chars = require('./chars.json')
-
-module.exports = { icons, info, metadata, chars }
+export { chars, icons, info, metadata }
`
const createIndexTypes = (): string => `export interface IconifyJSON {
@@ -224,7 +214,6 @@ const writeCollectionPackage = async (
await writeFile(path.resolve(targetDir, 'metadata.json'), '{}\n')
await writeFile(path.resolve(targetDir, 'chars.json'), '{}\n')
await writeFile(path.resolve(targetDir, 'index.mjs'), `${createIndexMjs()}\n`)
- await writeFile(path.resolve(targetDir, 'index.js'), `${createIndexJs()}\n`)
await writeFile(path.resolve(targetDir, 'index.d.ts'), `${createIndexTypes()}\n`)
}
diff --git a/packages/iconify-collections/tsconfig.json b/packages/iconify-collections/tsconfig.json
index a175752d797..8df88080876 100644
--- a/packages/iconify-collections/tsconfig.json
+++ b/packages/iconify-collections/tsconfig.json
@@ -1,4 +1,8 @@
{
"extends": "@dify/tsconfig/node.json",
+ "compilerOptions": {
+ "module": "NodeNext",
+ "moduleResolution": "NodeNext"
+ },
"include": ["scripts/**/*.ts"]
}
diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json
index 7a5b20c1db0..18e0733476f 100644
--- a/packages/tsconfig/package.json
+++ b/packages/tsconfig/package.json
@@ -2,6 +2,7 @@
"name": "@dify/tsconfig",
"version": "0.0.0-private",
"private": true,
+ "type": "module",
"exports": {
"./base.json": "./base.json",
"./nextjs.json": "./nextjs.json",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4be12271bc0..24a422fa32c 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -734,9 +734,6 @@ catalogs:
tldts:
specifier: 7.4.13
version: 7.4.13
- tsx:
- specifier: 4.23.13
- version: 4.23.13
typescript:
specifier: npm:@typescript/[email protected]
version: 6.0.2
@@ -1036,9 +1033,6 @@ importers:
eventsource-parser:
specifier: 'catalog:'
version: 4.1.1
- tsx:
- specifier: 'catalog:'
- version: 4.23.13
typescript:
specifier: 'catalog:'
version: '@typescript/[email protected]'
@@ -1243,9 +1237,6 @@ importers:
iconify-import-svg:
specifier: 'catalog:'
version: 0.2.0([email protected])
- tsx:
- specifier: 'catalog:'
- version: 4.23.13
packages/image-resources:
dependencies:
@@ -1857,9 +1848,6 @@ importers:
tailwindcss:
specifier: 'catalog:'
version: 4.3.3
- tsx:
- specifier: 'catalog:'
- version: 4.23.13
typescript:
specifier: 'catalog:'
version: '@typescript/[email protected]'
@@ -17404,6 +17392,7 @@ snapshots:
esbuild: 0.28.2
optionalDependencies:
fsevents: 2.3.3
+ optional: true
dependencies:
@@ -18424,7 +18413,6 @@ time:
[email protected]: '2026-08-24T12:10:36.576Z'
[email protected]: '2026-07-16T12:03:35.267Z'
[email protected]: '2026-09-13T20:59:12.244Z'
- [email protected]: '2026-08-30T00:46:16.265Z'
[email protected]: '2026-07-08T15:55:18.431Z'
[email protected]: '2024-08-29T13:49:01.316Z'
[email protected]: '2026-09-04T14:25:11.648Z'
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index e8f329dd70c..8c3ffb94c25 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -252,7 +252,6 @@ catalog:
svgo: 4.1.0
tailwindcss: 4.3.3
tldts: 7.4.13
- tsx: 4.23.13
typescript: npm:@typescript/[email protected]
uglify-js: 3.19.3
undici: 7.29.1
diff --git a/web/package.json b/web/package.json
index fa1ffed157f..81c646a6e5f 100644
--- a/web/package.json
+++ b/web/package.json
@@ -17,10 +17,10 @@
"dev:inspect": "next dev --inspect",
"dev:proxy": "dev-proxy --config ./dev-proxy.config.ts --env-file ./.env.local",
"dev:vinext": "vinext dev",
- "gen-doc-paths": "tsx ./scripts/gen-doc-paths.ts && vp fmt types/doc-paths.ts",
+ "gen-doc-paths": "node ./scripts/gen-doc-paths.ts && vp fmt types/doc-paths.ts",
"gen-icons": "pnpm --filter @dify/iconify-collections generate",
- "i18n:check": "tsx ./scripts/check-i18n.js",
- "i18n:migrate-selectors": "tsx ./scripts/migrate-i18n-selectors.ts",
+ "i18n:check": "node ./scripts/check-i18n.js",
+ "i18n:migrate-selectors": "node ./scripts/migrate-i18n-selectors.ts",
"lint:a11y": "node ./scripts/lint-a11y.mjs",
"lint:tss": "tsslint --project tsconfig.json",
"preinstall": "npx only-allow pnpm",
@@ -183,7 +183,6 @@
"react-server-dom-webpack": "catalog:",
"storybook": "catalog:",
"tailwindcss": "catalog:",
- "tsx": "catalog:",
"typescript": "catalog:",
"uglify-js": "catalog:",
"vinext": "catalog:",
diff --git a/web/scripts/analyze-i18n-diff.ts b/web/scripts/analyze-i18n-diff.ts
index fbe27cd3e07..b09bd3e073c 100644
--- a/web/scripts/analyze-i18n-diff.ts
+++ b/web/scripts/analyze-i18n-diff.ts
@@ -8,7 +8,7 @@
* 4. Values for existing keys haven't changed
* 5. Lists newly added keys and values
*
- * Usage: npx tsx scripts/analyze-i18n-diff.ts
+ * Usage: node scripts/analyze-i18n-diff.ts
*/
import { execSync } from 'node:child_process'
diff --git a/web/scripts/check-i18n.js b/web/scripts/check-i18n.js
index f364ab1c576..898e797ef9f 100644
--- a/web/scripts/check-i18n.js
+++ b/web/scripts/check-i18n.js
@@ -1,8 +1,8 @@
import fs from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
-import data from '../i18n/languages'
-import { findValueIssues, formatValueIssue } from './check-i18n-values'
+import data from '../i18n/languages.ts'
+import { findValueIssues, formatValueIssue } from './check-i18n-values.ts'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
diff --git a/web/scripts/tsconfig.json b/web/scripts/tsconfig.json
new file mode 100644
index 00000000000..a43b2a58940
--- /dev/null
+++ b/web/scripts/tsconfig.json
@@ -0,0 +1,9 @@
+{
+ "extends": "@dify/tsconfig/node.json",
+ "compilerOptions": {
+ "module": "NodeNext",
+ "moduleResolution": "NodeNext",
+ "allowImportingTsExtensions": true
+ },
+ "include": ["*.ts", "*.js", "*.mjs"]
+}