- Move the read-only OpenAPI compat surface from /api/v2/assets to /mjr/am/compat/assets so it never squats ComfyUI core's /api namespace; the legacy alias is opt-in via MJR_AM_LEGACY_API_V2_ASSETS=1. - Allow Python 3.14 (requires-python <3.15) and add 3.14 to CI and tox. - Stop wrapping api.queuePrompt: progress tracking now resolves the running prompt from the core Jobs API (getJobDetail), then /queue and /history, driven by websocket events. Remove wrapHostQueuePrompt. - Add opt-in Majoor.Integration.HideNativeAssetsTab setting that hides ComfyUI's native Assets sidebar tab through the official getSidebarTabs/unregisterSidebarTab API and restores it when disabled. - Fix all 913 type errors in tsconfig.test.json and type-check tests in CI; drop a duplicated `stubs` key in asset_card_inner test; make addToastHistory's type argument optional for the object form. - Update audit report, changelog, API reference and env var docs.
34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
|
|
vi.mock("../features/viewer/nodeStream/nodeStreamFeatureFlag.js", () => ({
|
|
NODE_STREAM_FEATURE_ENABLED: true,
|
|
}));
|
|
|
|
describe("entryDebugApi", () => {
|
|
beforeEach(() => {
|
|
vi.resetModules();
|
|
globalThis.window = {} as any;
|
|
});
|
|
|
|
afterEach(() => {
|
|
delete globalThis.window;
|
|
vi.restoreAllMocks();
|
|
});
|
|
|
|
it("exposes an inspection-only Node Stream API", async () => {
|
|
const resolveNodeStreamModule = vi.fn(async () => ({
|
|
listAdapters: vi.fn(() => [{ name: "video-output", priority: 10 }]),
|
|
}));
|
|
|
|
const { exposeDebugApis } = await import("../features/runtime/entryDebugApi.js");
|
|
exposeDebugApis({ resolveNodeStreamModule });
|
|
|
|
expect((window as any).MajoorNodeStream.mode).toBe("selection-only");
|
|
expect((window as any).MajoorNodeStream.registerAdapter).toBeUndefined();
|
|
expect((window as any).MajoorNodeStream.createAdapter).toBeUndefined();
|
|
await expect((window as any).MajoorNodeStream.listAdapters()).resolves.toEqual([
|
|
{ name: "video-output", priority: 10 },
|
|
]);
|
|
});
|
|
});
|