mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
feat(cli): adopt generated oRPC contract for unary endpoints (#37090)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
27 files changed
+798
-184
No files matched your search
@@ -5,7 +5,10 @@ import { afterEach, describe, expect, it } from 'vitest'
|
||||
import { isHttpClientError } from '@/errors/base'
|
||||
import { WorkspacesClient } from './workspaces.js'
|
||||
|
||||
// WorkspacesClient.switch is covered in members.test.ts; this file covers list().
|
||||
// WorkspacesClient.switch is covered in members.test.ts; this file covers list(), which now
|
||||
// routes through the generated oRPC contract (OpenAPILink over http.request). The happy path
|
||||
// asserts the on-the-wire GET /openapi/v1/workspaces is unchanged; the 401 case asserts the
|
||||
// oRPC client surfaces it as the CLI's classified HttpClientError.
|
||||
|
||||
function makeClient(host: string): WorkspacesClient {
|
||||
return new WorkspacesClient(testHttpClient(host, 'dfoa_test'))
|
||||
|
||||
Reference in new issue
Block a user