generated from boneskull/boneskull-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove componentregistry, fix broken test paths
- Loading branch information
Showing
34 changed files
with
361 additions
and
987 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
127 changes: 0 additions & 127 deletions
127
packages/midnight-smoker/src/component/component/component-registry.ts
This file was deleted.
Oops, something went wrong.
86 changes: 0 additions & 86 deletions
86
packages/midnight-smoker/src/component/component/component.ts
This file was deleted.
Oops, something went wrong.
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
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
8 changes: 3 additions & 5 deletions
8
packages/midnight-smoker/src/error/invalid-component-error.ts
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,13 +1,11 @@ | ||
import type {ComponentKind} from '#constants'; | ||
import {BaseSmokerError} from './base-error'; | ||
|
||
export class InvalidComponentError extends BaseSmokerError<{ | ||
id: string; | ||
kind: ComponentKind; | ||
def: unknown; | ||
}> { | ||
public readonly id = 'InvalidComponentError'; | ||
|
||
constructor(message: string, kind: ComponentKind, id: string) { | ||
super(message, {id, kind}); | ||
constructor(message: string, def: unknown) { | ||
super(message, {def}); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import {type ComponentKind, type ComponentKinds} from '#constants'; | ||
import {type Executor} from '#schema/executor'; | ||
import {type PkgManagerDef} from '#schema/pkg-manager-def'; | ||
import {type SomeReporterDef} from '#schema/reporter-def'; | ||
import {type SomeRuleDef} from '#schema/rule-def'; | ||
import {type StaticPluginMetadata} from '#schema/static-plugin-metadata'; | ||
// import Debug from 'debug'; | ||
|
||
// const debug = Debug('midnight-smoker:component'); | ||
export type ComponentObject<T extends ComponentKind> = | ||
T extends typeof ComponentKinds.RuleDef | ||
? SomeRuleDef | ||
: T extends typeof ComponentKinds.PkgManagerDef | ||
? PkgManagerDef | ||
: T extends typeof ComponentKinds.ReporterDef | ||
? SomeReporterDef | ||
: T extends typeof ComponentKinds.Executor | ||
? Executor | ||
: never; | ||
|
||
export interface Component<T extends ComponentKind = ComponentKind> { | ||
readonly id: string; | ||
readonly kind: T; | ||
readonly pluginName: string; | ||
readonly componentName: string; | ||
readonly isBlessed: boolean; | ||
readonly plugin: StaticPluginMetadata; | ||
} | ||
|
||
export type SomeComponentObject = ComponentObject<any>; | ||
|
||
export type SomeComponent = Component<any>; |
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
Oops, something went wrong.