comfyui-node 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +0 -1
- package/dist/client.js.map +1 -1
- package/dist/constants.d.ts +9 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +9 -0
- package/dist/constants.js.map +1 -1
- package/dist/features/base.d.ts +21 -0
- package/dist/features/base.d.ts.map +1 -1
- package/dist/features/base.js +21 -0
- package/dist/features/base.js.map +1 -1
- package/dist/tools.d.ts +22 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +22 -0
- package/dist/tools.js.map +1 -1
- package/dist/typed-event-target.d.ts +29 -0
- package/dist/typed-event-target.d.ts.map +1 -1
- package/dist/typed-event-target.js +29 -2
- package/dist/typed-event-target.js.map +1 -1
- package/dist/types/error.d.ts +134 -8
- package/dist/types/error.d.ts.map +1 -1
- package/dist/types/error.js +134 -8
- package/dist/types/error.js.map +1 -1
- package/dist/types/event.d.ts +219 -0
- package/dist/types/event.d.ts.map +1 -1
- package/dist/types/manager.d.ts +99 -0
- package/dist/types/manager.d.ts.map +1 -1
- package/dist/types/manager.js +90 -0
- package/dist/types/manager.js.map +1 -1
- package/dist/types/sampler.d.ts +12 -2
- package/dist/types/sampler.d.ts.map +1 -1
- package/dist/types/tool.d.ts +15 -0
- package/dist/types/tool.d.ts.map +1 -1
- package/dist/utils/response-error.d.ts +10 -0
- package/dist/utils/response-error.d.ts.map +1 -1
- package/dist/utils/response-error.js +15 -1
- package/dist/utils/response-error.js.map +1 -1
- package/package.json +3 -2
package/dist/types/sampler.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Union type of all supported sampler names in ComfyUI
|
|
3
|
+
* Provides intellisense for officially enumerated sampler names
|
|
4
|
+
* while permitting forward-compatible arbitrary strings.
|
|
5
|
+
*/
|
|
6
|
+
export type TSamplerName = "euler" | "euler_cfg_pp" | "euler_ancestral" | "euler_ancestral_cfg_pp" | "heun" | "heunpp2" | "dpm_2" | "dpm_2_ancestral" | "lms" | "dpm_fast" | "dpm_adaptive" | "dpmpp_2s_ancestral" | "dpmpp_2s_ancestral_cfg_pp" | "dpmpp_sde" | "dpmpp_sde_gpu" | "dpmpp_2m" | "dpmpp_2m_cfg_pp" | "dpmpp_2m_sde" | "dpmpp_2m_sde_gpu" | "dpmpp_2m_sde_heun" | "dpmpp_2m_sde_heun_gpu" | "dpmpp_3m_sde" | "dpmpp_3m_sde_gpu" | "ddpm" | "lcm" | "ipndm" | "ipndm_v" | "deis" | "res_multistep" | "res_multistep_cfg_pp" | "res_multistep_ancestral" | "res_multistep_ancestral_cfg_pp" | "gradient_estimation" | "gradient_estimation_cfg_pp" | "er_sde" | "seeds_2" | "seeds_3" | "sa_solver" | "sa_solver_pece" | "ddim" | "uni_pc" | "uni_pc_bh2";
|
|
7
|
+
/**
|
|
8
|
+
* Union type of all supported scheduler names in ComfyUI
|
|
9
|
+
* Provides intellisense for officially enumerated scheduler names
|
|
10
|
+
* while permitting forward-compatible arbitrary strings.
|
|
11
|
+
*/
|
|
12
|
+
export type TSchedulerName = "simple" | "sgm_uniform" | "karras" | "exponential" | "ddim_uniform" | "beta" | "normal" | "linear_quadratic" | "kl_optimal";
|
|
3
13
|
//# sourceMappingURL=sampler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampler.d.ts","sourceRoot":"","sources":["../../src/types/sampler.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GACpB,OAAO,GACP,cAAc,GACd,iBAAiB,GACjB,wBAAwB,GACxB,MAAM,GACN,SAAS,GACT,OAAO,GACP,iBAAiB,GACjB,KAAK,GACL,UAAU,GACV,cAAc,GACd,oBAAoB,GACpB,WAAW,GACX,eAAe,GACf,UAAU,GACV,cAAc,GACd,kBAAkB,GAClB,cAAc,GACd,kBAAkB,GAClB,MAAM,GACN,KAAK,GACL,OAAO,GACP,SAAS,GACT,MAAM,GACN,MAAM,GACN,QAAQ,GACR,YAAY,CAAC;AAEjB,MAAM,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"sampler.d.ts","sourceRoot":"","sources":["../../src/types/sampler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,YAAY,GACpB,OAAO,GACP,cAAc,GACd,iBAAiB,GACjB,wBAAwB,GACxB,MAAM,GACN,SAAS,GACT,OAAO,GACP,iBAAiB,GACjB,KAAK,GACL,UAAU,GACV,cAAc,GACd,oBAAoB,GACpB,2BAA2B,GAC3B,WAAW,GACX,eAAe,GACf,UAAU,GACV,iBAAiB,GACjB,cAAc,GACd,kBAAkB,GAClB,mBAAmB,GACnB,uBAAuB,GACvB,cAAc,GACd,kBAAkB,GAClB,MAAM,GACN,KAAK,GACL,OAAO,GACP,SAAS,GACT,MAAM,GACN,eAAe,GACf,sBAAsB,GACtB,yBAAyB,GACzB,gCAAgC,GAChC,qBAAqB,GACrB,4BAA4B,GAC5B,QAAQ,GACR,SAAS,GACT,SAAS,GACT,WAAW,GACX,gBAAgB,GAChB,MAAM,GACN,QAAQ,GACR,YAAY,CAAC;AAEjB;;;;GAIG;AACH,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,aAAa,GACb,QAAQ,GACR,aAAa,GACb,cAAc,GACd,MAAM,GACN,QAAQ,GACR,kBAAkB,GAClB,YAAY,CAAC"}
|
package/dist/types/tool.d.ts
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper type to fix array types for better type inference
|
|
3
|
+
*/
|
|
1
4
|
export type FixArr<T> = T extends readonly any[] ? Omit<T, Exclude<keyof any[], number>> : T;
|
|
5
|
+
/**
|
|
6
|
+
* Helper type to drop the initial dot from a string type
|
|
7
|
+
*/
|
|
2
8
|
export type DropInitDot<T> = T extends `.${infer U}` ? U : T;
|
|
9
|
+
/**
|
|
10
|
+
* Helper type to extract deep keys from an object type
|
|
11
|
+
*/
|
|
3
12
|
export type _DeepKeys<T> = T extends object ? {
|
|
4
13
|
[K in (string | number) & keyof T]: `${`.${K}`}${"" | _DeepKeys<FixArr<T[K]>>}`;
|
|
5
14
|
}[(string | number) & keyof T] : never;
|
|
15
|
+
/**
|
|
16
|
+
* Type to extract all deep keys from an object type, removing the initial dot
|
|
17
|
+
*/
|
|
6
18
|
export type DeepKeys<T> = DropInitDot<_DeepKeys<FixArr<T>>>;
|
|
19
|
+
/**
|
|
20
|
+
* Helper type to simplify complex types for better IntelliSense
|
|
21
|
+
*/
|
|
7
22
|
export type Simplify<T> = {
|
|
8
23
|
[K in keyof T]: T[K];
|
|
9
24
|
} & {};
|
package/dist/types/tool.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/types/tool.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/types/tool.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GACvC;KACG,CAAC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;CAChF,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,GAC9B,KAAK,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG,EAAE,CAAC"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { EnqueueFailedError } from "../types/error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Builds a detailed EnqueueFailedError from a Response object
|
|
4
|
+
* @param resp - The Response object to extract error information from
|
|
5
|
+
* @returns A promise that resolves to an EnqueueFailedError with detailed information
|
|
6
|
+
*/
|
|
2
7
|
export declare function buildEnqueueFailedError(resp: Response): Promise<EnqueueFailedError>;
|
|
8
|
+
/**
|
|
9
|
+
* Normalizes an unknown error to an EnqueueFailedError
|
|
10
|
+
* @param e - The unknown error to normalize
|
|
11
|
+
* @returns An EnqueueFailedError instance
|
|
12
|
+
*/
|
|
3
13
|
export declare function normalizeUnknownError(e: unknown): EnqueueFailedError;
|
|
4
14
|
//# sourceMappingURL=response-error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-error.d.ts","sourceRoot":"","sources":["../../src/utils/response-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"response-error.d.ts","sourceRoot":"","sources":["../../src/utils/response-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAsBvD;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA6BzF;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAQpE"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { EnqueueFailedError } from "../types/error.js";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Extract a diagnostic reason string from arbitrary JSON
|
|
4
|
+
* @param json - The JSON object to extract the reason from
|
|
5
|
+
* @returns A string reason or undefined if none could be extracted
|
|
6
|
+
*/
|
|
3
7
|
function extractReason(json) {
|
|
4
8
|
if (!json || typeof json !== "object")
|
|
5
9
|
return undefined;
|
|
@@ -17,6 +21,11 @@ function extractReason(json) {
|
|
|
17
21
|
}
|
|
18
22
|
return undefined;
|
|
19
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Builds a detailed EnqueueFailedError from a Response object
|
|
26
|
+
* @param resp - The Response object to extract error information from
|
|
27
|
+
* @returns A promise that resolves to an EnqueueFailedError with detailed information
|
|
28
|
+
*/
|
|
20
29
|
export async function buildEnqueueFailedError(resp) {
|
|
21
30
|
let bodyJSON;
|
|
22
31
|
let bodyTextSnippet;
|
|
@@ -49,6 +58,11 @@ export async function buildEnqueueFailedError(resp) {
|
|
|
49
58
|
reason
|
|
50
59
|
});
|
|
51
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Normalizes an unknown error to an EnqueueFailedError
|
|
63
|
+
* @param e - The unknown error to normalize
|
|
64
|
+
* @returns An EnqueueFailedError instance
|
|
65
|
+
*/
|
|
52
66
|
export function normalizeUnknownError(e) {
|
|
53
67
|
if (e instanceof EnqueueFailedError)
|
|
54
68
|
return e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-error.js","sourceRoot":"","sources":["../../src/utils/response-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD
|
|
1
|
+
{"version":3,"file":"response-error.js","sourceRoot":"","sources":["../../src/utils/response-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;GAIG;AACH,SAAS,aAAa,CAAC,IAAa;IAClC,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IACxD,MAAM,WAAW,GAAG,IAA+B,CAAC;IACpD,MAAM,MAAM,GAAI,WAAmB,CAAC,KAAK,IAAK,WAAmB,CAAC,OAAO,IAAK,WAAmB,CAAC,MAAM,CAAC;IACzG,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC;IACxD,IAAI,KAAK,CAAC,OAAO,CAAE,WAAmB,CAAC,MAAM,CAAC,IAAK,WAAmB,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACrF,MAAM,KAAK,GAAI,WAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QAC5C,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACvC,OAAO,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QAC7E,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,IAAc;IAC1D,IAAI,QAAiB,CAAC;IAC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UAAU,IAAI,CAAC,IAAK,CAAS,CAAC,QAAQ,YAAY,QAAQ,EAAE,CAAC;QAC7F,mGAAmG;QACnG,OAAO,IAAI,kBAAkB,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IACxE,CAAC;IACD,MAAM,MAAM,GAAI,CAAS,EAAE,OAAO,CAAC;IACnC,OAAO,IAAI,kBAAkB,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,CAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;AACvF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comfyui-node",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "ComfyUI Node.js Client",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"typecov:strict": "type-coverage --detail --ignore-catch --at-least 90",
|
|
52
52
|
"dist:fresh": "bun run build && bun run dist:fresh:check",
|
|
53
53
|
"dist:fresh:check": "bun scripts/dist-fresh-check.mjs",
|
|
54
|
+
"update-samplers": "bun scripts/update-sampler-types.ts",
|
|
54
55
|
"check:all": "bun run build && bun run test && bun run typecov:strict && bun run dist:fresh",
|
|
55
56
|
"prepublishOnly": "bun run check:all"
|
|
56
57
|
},
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@types/bun": "^1.2.21",
|
|
63
64
|
"@types/jest": "^30.0.0",
|
|
64
|
-
"@types/node": "24.3.
|
|
65
|
+
"@types/node": "24.3.2",
|
|
65
66
|
"@types/ws": "^8.18.1",
|
|
66
67
|
"cross-env": "^10.0.0",
|
|
67
68
|
"@istanbuljs/schema": "^0.1.3",
|