Make dev server ready for use (#43)

* basic dev server

* nit

* Return empty extensions list for dev server

* Update readme
This commit is contained in:
Chenlei Hu
2024-06-18 21:07:45 -04:00
committed by GitHub
parent 3fca50b997
commit 3225d7cb6f
5 changed files with 27 additions and 11 deletions

View File

@@ -26,8 +26,8 @@ export interface APIConfig {
*/
/**
* @param {{
* mockExtensions?: string[],
* @param {{
* mockExtensions?: string[],
* mockNodeDefs?: Record<string, ComfyObjectInfo>,
* settings?: Record<string, string>
* userConfig?: {storage: "server" | "browser", users?: Record<string, any>, migrated?: boolean },
@@ -59,6 +59,7 @@ export function mockApi(config: APIConfig = {}) {
getNodeDefs: jest.fn(() => mockNodeDefs),
init: jest.fn(),
apiURL: jest.fn((x) => "src/" + x),
fileURL: jest.fn((x) => "src/" + x),
createUser: jest.fn((username) => {
// @ts-ignore
if(username in userConfig.users) {