-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: anyware pipeline namespace
- Loading branch information
1 parent
24c38cf
commit 3ffea92
Showing
14 changed files
with
69 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import type { FindValueAfter, IsLastValue } from '../../prelude.js' | ||
import type { Private } from '../../private.js' | ||
import type { HookDefinitionMap, HookSequence } from '../hook/definition.js' | ||
import type { HookPrivateInput, HookResultError, PrivateHook } from '../hook/private.js' | ||
export * as Pipeline from './builder.js' | ||
|
||
// dprint-ignore | ||
export type Pipeline< | ||
$HookSequence extends HookSequence = HookSequence, | ||
$HookMap extends HookDefinitionMap<$HookSequence> = HookDefinitionMap<$HookSequence>, | ||
$Result = unknown, | ||
> = | ||
// todo what is the point of private here? Its usually for hiding fields on a user facing interface. But is this type actually user facing? | ||
Private.Add< | ||
{ | ||
hookSequence: $HookSequence | ||
hookMap: $HookMap | ||
result: $Result | ||
}, | ||
{ | ||
hookNamesOrderedBySequence: $HookSequence | ||
hooks: { | ||
[$HookName in $HookSequence[number]]: | ||
PrivateHook< | ||
$HookMap[$HookName]['slots'], | ||
HookPrivateInput< | ||
$HookMap[$HookName]['input'], | ||
$HookMap[$HookName]['slots'] | ||
>, | ||
IsLastValue<$HookName, $HookSequence> extends true | ||
? $Result | ||
: $HookMap[FindValueAfter<$HookName, $HookSequence>] | ||
> | ||
} | ||
passthroughErrorInstanceOf?: Function[] | ||
passthroughErrorWith?: (signal: HookResultError) => boolean | ||
} | ||
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export * from './builder.js' | ||
export * from './Interceptor.js' | ||
export * from './Pipeline.js' | ||
export * from './Pipeline/builder.js' | ||
export * from './Pipeline/Pipeline.js' | ||
export * from './run/runner.js' |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters