Skip to content

Commit

Permalink
✨ add deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
zhzLuke96 committed Sep 20, 2024
1 parent f8492e8 commit 5c46c46
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 11 deletions.
33 changes: 32 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,39 @@
export * from "./workflow/types";
export * from "./client/WsClient";
export * from "./client/Client";
export * from "./workflow/Workflow";
export * from "./plugins/Plugin";
export * as plugins from "./plugins";
export * as builtins from "./builtins";
export * from "./pipeline";

export * from "./client/types";
export * from "./client/ws.types";
export * from "./client/response.types";

export * from "./workflow/types";
export * from "./pipeline/types";

import { WsClient } from "./client/WsClient";
import { Client } from "./client/Client";
import { Workflow } from "./workflow/Workflow";
import { Plugin } from "./plugins/Plugin";

/**
* @deprecated use `Client` instead
*/
export const ComfyUIApiClient = Client;

/**
* @deprecated use `WsClient` instead
*/
export const ComfyUIWsClient = WsClient;

/**
* @deprecated use `Workflow` instead
*/
export const ComfyUIWorkflow = Workflow;

/**
* @deprecated use `Plugin` instead
*/
export const ClientPlugin = Plugin;
3 changes: 3 additions & 0 deletions src/pipeline/flux.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/**
* TODO pipeline for flux model
*/
3 changes: 3 additions & 0 deletions src/pipeline/sdxl.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/**
* TODO pipeline for SDXL model
*/
3 changes: 1 addition & 2 deletions tests/client.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Client } from "../src/client/Client";
import { Workflow } from "../src/workflow/Workflow";
import { Client, Workflow } from "../src/main";

import { WebSocket } from "ws";
import { create_s1_prompt } from "./test_utils";
Expand Down
3 changes: 1 addition & 2 deletions tests/pipe.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Client } from "../src/client/Client";
import { Workflow } from "../src/workflow/Workflow";
import { Client, Workflow } from "../src/main";

import { WebSocket } from "ws";

Expand Down
3 changes: 1 addition & 2 deletions tests/rest_api.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Client } from "../src/client/Client";
import { Workflow } from "../src/workflow/Workflow";
import { Client, Workflow } from "../src/main";

import { WebSocket } from "ws";
import { create_s1_prompt } from "./test_utils";
Expand Down
3 changes: 1 addition & 2 deletions tests/workflow.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Client } from "../src/client/Client";
import { Workflow } from "../src/workflow/Workflow";
import { Client, Workflow } from "../src/main";

jest.mock("../src/client/Client");

Expand Down
3 changes: 1 addition & 2 deletions tests/ws_api.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Client } from "../src/client/Client";
import { Workflow } from "../src/workflow/Workflow";
import { Client, Workflow } from "../src/main";
import { ComfyUiWsTypes } from "../src/client/ws.types";

import { create_s1_prompt } from "./test_utils";
Expand Down

0 comments on commit 5c46c46

Please sign in to comment.