-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
lib/ | ||
node_modules/ | ||
data | ||
registry.env |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare const _default: (path?: string | undefined) => string; | ||
export default _default; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Config } from '@verdaccio/types'; | ||
export interface S3Config extends Config { | ||
bucket: string; | ||
keyPrefix: string; | ||
endpoint?: string; | ||
region?: string; | ||
s3ForcePathStyle?: boolean; | ||
acl?: string; | ||
tarballACL?: string; | ||
accessKeyId?: string; | ||
secretAccessKey?: string; | ||
sessionToken?: string; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { S3 } from 'aws-sdk'; | ||
interface DeleteKeyPrefixOptions { | ||
Bucket: string; | ||
Prefix: string; | ||
} | ||
export declare function deleteKeyPrefix(s3: S3, options: DeleteKeyPrefixOptions, callback: (err: Error | null) => void): void; | ||
export {}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Logger, Config, Callback, IPluginStorage, PluginOptions, Token, TokenFilter } from '@verdaccio/types'; | ||
import { S3Config } from './config'; | ||
import S3PackageManager from './s3PackageManager'; | ||
export default class S3Database implements IPluginStorage<S3Config> { | ||
logger: Logger; | ||
config: S3Config; | ||
private s3; | ||
private _localData; | ||
constructor(config: Config, options: PluginOptions<S3Config>); | ||
getSecret(): Promise<string>; | ||
setSecret(secret: string): Promise<void>; | ||
add(name: string, callback: Callback): void; | ||
search(onPackage: Function, onEnd: Function): Promise<void>; | ||
private _fetchPackageInfo; | ||
remove(name: string, callback: Callback): void; | ||
get(callback: Callback): void; | ||
private _sync; | ||
getPackageStorage(packageName: string): S3PackageManager; | ||
private _getData; | ||
saveToken(token: Token): Promise<void>; | ||
deleteToken(user: string, tokenKey: string): Promise<void>; | ||
readTokens(filter: TokenFilter): Promise<Token[]>; | ||
} |