@huggingface/inference
Advanced tools
Comparing version 2.0.0-rc1 to 2.0.0-rc2
{ | ||
"name": "@huggingface/inference", | ||
"version": "2.0.0rc1", | ||
"version": "2.0.0-rc2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": "Tim Mikeladze <tim.mikeladze@gmail.com>", |
import * as tasks from "./tasks"; | ||
import type { Options, RequestArgs } from "./types"; | ||
import type { DistributiveOmit } from "./utils/distributive-omit"; | ||
@@ -8,3 +9,3 @@ type Task = typeof tasks; | ||
[key in keyof Task]: ( | ||
args: Omit<Parameters<Task[key]>[0], "accessToken">, | ||
args: DistributiveOmit<Parameters<Task[key]>[0], "accessToken">, | ||
options?: Parameters<Task[key]>[1] | ||
@@ -16,3 +17,3 @@ ) => ReturnType<Task[key]>; | ||
[key in keyof Task]: ( | ||
args: Omit<Parameters<Task[key]>[0], "accessToken" | "model">, | ||
args: DistributiveOmit<Parameters<Task[key]>[0], "accessToken" | "model">, | ||
options?: Parameters<Task[key]>[1] | ||
@@ -56,3 +57,3 @@ ) => ReturnType<Task[key]>; | ||
enumerable: false, | ||
value: (params: Omit<RequestArgs, "model">, options: Options) => | ||
value: (params: RequestArgs, options: Options) => | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
@@ -59,0 +60,0 @@ fn({ ...params, accessToken, model: endpointUrl } as any, { ...defaultOptions, ...options }), |
@@ -39,5 +39,5 @@ export interface Options { | ||
export type RequestArgs = BaseArgs & | ||
({ data?: Blob | ArrayBuffer } | { inputs: unknown }) & { | ||
({ data: Blob | ArrayBuffer } | { inputs: unknown }) & { | ||
parameters?: Record<string, unknown>; | ||
accessToken?: string; | ||
}; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
113926
40
2925
4