Skip to content

Commit

Permalink
fix: fixes for storage plugin types per code review (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlucool authored and sergiohgz committed Jul 25, 2019
1 parent b032e8c commit 04fccb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ type StringValue = string | void | null;
max_body_size?: string;
notifications?: Notifications;
middlewares?: any;
storage_filters?: any;
filters?: any;
checkSecretKey(token: string): string;
getMatchedPackagesSpec(storage: string): PackageAccess | void;
[key: string]: any;
Expand Down Expand Up @@ -442,6 +442,6 @@ type StringValue = string | void | null;
}

interface IPluginStorageFilter<T> extends IPlugin<T> {
filter_metadata(packageInfo: Package, cb: Callback): void;
filter_metadata(packageInfo: Package): Promise<Package>;
}
}
6 changes: 3 additions & 3 deletions core/types/src/flow/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ declare interface verdaccio$Config {
max_body_size?: string;
notifications?: verdaccio$Notifications;
middlewares?: any;
storage_filters?: any;
filters?: any;
checkSecretKey(token: string): string;
getMatchedPackagesSpec(storage: string): verdaccio$PackageAccess | void;
[key: string]: any;
Expand Down Expand Up @@ -409,7 +409,7 @@ declare interface verdaccio$IBasicAuth {

declare interface verdaccio$IPlugin {
version?: string;
close(): void;
// Optional: close(): void;
}

declare type verdaccio$PluginOptions = {
Expand All @@ -431,7 +431,7 @@ declare interface verdaccio$IPluginMiddleware extends verdaccio$IPlugin {
}

declare interface verdaccio$IPluginStorageFilter extends verdaccio$IPlugin {
filter_metadata(packageInfo: verdaccio$Package, cb: verdaccio$Callback): void;
filter_metadata(packageInfo: verdaccio$Package): Promise<verdaccio$Package>;
}

declare module "@verdaccio/local-storage" {
Expand Down

0 comments on commit 04fccb8

Please sign in to comment.