@breadboard-ai/build
Advanced tools
Comparing version
# Changelog | ||
## 0.10.1 | ||
### Patch Changes | ||
- 690ebe6: Allow definition inputs/outputs to be optional | ||
- Updated dependencies [5c015f2] | ||
- @google-labs/breadboard@0.27.1 | ||
## 0.10.0 | ||
@@ -4,0 +12,0 @@ |
@@ -22,5 +22,5 @@ /** | ||
export interface Definition<SI extends { | ||
[K: string]: JsonSerializable; | ||
[K: string]: JsonSerializable | undefined; | ||
}, SO extends { | ||
[K: string]: JsonSerializable; | ||
[K: string]: JsonSerializable | undefined; | ||
}, DI extends JsonSerializable | undefined, DO extends JsonSerializable | undefined, OI extends keyof SI, R extends boolean, PI extends string | false, PO extends string | false, IM extends { | ||
@@ -37,5 +37,5 @@ [K: string]: InputMetadata; | ||
export declare class DefinitionImpl<SI extends { | ||
[K: string]: JsonSerializable; | ||
[K: string]: JsonSerializable | undefined; | ||
}, SO extends { | ||
[K: string]: JsonSerializable; | ||
[K: string]: JsonSerializable | undefined; | ||
}, DI extends JsonSerializable | undefined, DO extends JsonSerializable | undefined, OI extends keyof SI, R extends boolean, PI extends string | false, PO extends string | false, IM extends { | ||
@@ -59,3 +59,3 @@ [K: string]: InputMetadata; | ||
type StrictInstantiateArgs<SI extends { | ||
[K: string]: JsonSerializable; | ||
[K: string]: JsonSerializable | undefined; | ||
}, OI extends keyof SI, DI extends JsonSerializable | undefined, A extends LooseInstantiateArgs, IM extends { | ||
@@ -78,3 +78,3 @@ [K: string]: InputMetadata; | ||
type InstanceInputs<SI extends { | ||
[K: string]: JsonSerializable; | ||
[K: string]: JsonSerializable | undefined; | ||
}, DI extends JsonSerializable | undefined, A extends LooseInstantiateArgs> = Expand<SI & { | ||
@@ -84,5 +84,5 @@ [K in keyof Omit<A, "$id" | "$metadata">]: K extends keyof SI ? SI[K] : DI; | ||
type InstanceOutputs<SI extends { | ||
[K: string]: JsonSerializable; | ||
[K: string]: JsonSerializable | undefined; | ||
}, SO extends { | ||
[K: string]: JsonSerializable; | ||
[K: string]: JsonSerializable | undefined; | ||
}, DO extends JsonSerializable | undefined, R extends boolean, A extends LooseInstantiateArgs> = R extends true ? Expand<SO & { | ||
@@ -89,0 +89,0 @@ [K in Exclude<keyof A, keyof SI | "$id" | "$metadata">]: DO; |
@@ -13,3 +13,3 @@ /** | ||
export declare class Instance<I extends { | ||
[K: string]: JsonSerializable; | ||
[K: string]: JsonSerializable | undefined; | ||
}, O extends { | ||
@@ -22,3 +22,3 @@ [K: string]: JsonSerializable | undefined; | ||
readonly inputs: { | ||
[K in keyof I]: InputPort<I[K]>; | ||
[K in keyof I]: InputPort<Exclude<I[K], undefined>>; | ||
}; | ||
@@ -28,3 +28,3 @@ readonly outputs: { | ||
}; | ||
readonly primaryInput: PI extends keyof I ? InputPort<I[PI]> : undefined; | ||
readonly primaryInput: PI extends keyof I ? InputPort<Exclude<I[PI], undefined>> : undefined; | ||
readonly primaryOutput: PO extends keyof O ? OutputPort<O[PO]> : undefined; | ||
@@ -31,0 +31,0 @@ readonly [OutputPortGetter]: PO extends keyof O ? OutputPort<O[PO]> : undefined; |
{ | ||
"name": "@breadboard-ai/build", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"description": "JavaScript library for building boards and defining new node types for the Breadboard AI prototyping library", | ||
@@ -122,3 +122,3 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@google-labs/breadboard": "^0.27.0", | ||
"@google-labs/breadboard": "^0.27.1", | ||
"@types/json-schema": "^7.0.15" | ||
@@ -125,0 +125,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
418808
0.12%1
Infinity%