@guestbell/fast-ftp / Exports
- createLogger
- createLoggerFromPartialConfig
- deleteDirectories
- deleteDirectory
- deleteFiles
- deploy
- dirsToParallelBatches
- getAllDirDirs
- getAllDirFiles
- getAllRemote
- getClientConfig
- getClients
- getDeployConfig
- getFinalFtpConfig
- getFtpFunctionConfig
- removeKeys
- sortFilesBySize
- uploadDirectories
- uploadDirectory
- uploadFiles
Ƭ FtpFunctionConfig: Object
Name | Type |
---|---|
logLevel |
WinstonLogLevel |
retries |
number |
src/types/FtpFunctionConfig.ts:3
Ƭ WinstonLogLevel: "error"
| "warn"
| "info"
| "http"
| "verbose"
| "debug"
| "silly"
• Const
WinstonLogLevels: WinstonLogLevel
[]
▸ createLogger(level
): Logger
Name | Type |
---|---|
level |
WinstonLogLevel |
Logger
▸ createLoggerFromPartialConfig(config
): Logger
Name | Type |
---|---|
config |
Partial <FtpFunctionConfig > |
Logger
▸ deleteDirectories(config
): (clientPool
: ItemPool
<AsyncClient
>, allDirs
: string
[]) => Promise
<void
>
Name | Type |
---|---|
config |
Partial <FtpFunctionConfig > |
fn
▸ (clientPool
, allDirs
): Promise
<void
>
Name | Type |
---|---|
clientPool |
ItemPool <AsyncClient > |
allDirs |
string [] |
Promise
<void
>
src/utils/ftp/deleteDirectories.ts:10
▸ deleteDirectory(config
): (clientPool
: ItemPool
<AsyncClient
>, remoteDir
: string
) => Promise
<void
>
Name | Type |
---|---|
config |
Partial <FtpFunctionConfig > |
fn
▸ (clientPool
, remoteDir
): Promise
<void
>
Name | Type |
---|---|
clientPool |
ItemPool <AsyncClient > |
remoteDir |
string |
Promise
<void
>
src/utils/ftp/deleteDirectory.ts:9
▸ deleteFiles(config
): (clientPool
: ItemPool
<AsyncClient
>, allFiles
: string
[]) => Promise
<void
>
Name | Type |
---|---|
config |
Partial <FtpFunctionConfig > |
fn
▸ (clientPool
, allFiles
): Promise
<void
>
Name | Type |
---|---|
clientPool |
ItemPool <AsyncClient > |
allFiles |
string [] |
Promise
<void
>
src/utils/ftp/deleteFiles.ts:6
▸ deploy(deployConfig
, clientConfig
, ftpFunctionConfig
): Promise
<void
>
Name | Type |
---|---|
deployConfig |
DeployConfig |
clientConfig |
ClientConfig |
ftpFunctionConfig |
Partial <FtpFunctionConfig > |
Promise
<void
>
▸ dirsToParallelBatches(dirs
): string
[][]
Name | Type |
---|---|
dirs |
string [] |
string
[][]
src/utils/misc/dirsToParallelBatches.ts:1
▸ getAllDirDirs(dirPath
, arrayOfFiles?
): string
[]
Name | Type | Default value |
---|---|---|
dirPath |
string |
undefined |
arrayOfFiles |
string [] |
[] |
string
[]
src/utils/fs/getAllDirDirs.ts:3
▸ getAllDirFiles(dirPath
, arrayOfFiles?
): string
[]
Name | Type | Default value |
---|---|---|
dirPath |
string |
undefined |
arrayOfFiles |
string [] |
[] |
string
[]
src/utils/fs/getAllDirFiles.ts:4
▸ getAllRemote(config
): (itemPool
: ItemPool
<AsyncClient
>, remoteDir
: string
) => Promise
<ListingElement
[]>
Name | Type |
---|---|
config |
Partial <FtpFunctionConfig > |
fn
▸ (itemPool
, remoteDir
): Promise
<ListingElement
[]>
Name | Type |
---|---|
itemPool |
ItemPool <AsyncClient > |
remoteDir |
string |
Promise
<ListingElement
[]>
src/utils/ftp/getAllRemote.ts:7
▸ getClientConfig(): ClientConfig
src/utils/misc/getClientConfig.ts:3
▸ getClients(config
): (concurrency
: number
, config
: ClientConfig
) => Promise
<AsyncClient
[]>
Name | Type |
---|---|
config |
Partial <FtpFunctionConfig > |
fn
▸ (concurrency?
, config
): Promise
<AsyncClient
[]>
Name | Type | Default value |
---|---|---|
concurrency |
number |
30 |
config |
ClientConfig |
undefined |
Promise
<AsyncClient
[]>
src/utils/ftp/getClients.ts:11
▸ getDeployConfig(): DeployConfig
src/utils/misc/getDeployConfig.ts:4
▸ getFinalFtpConfig(config
): Object
Name | Type |
---|---|
config |
Partial <FtpFunctionConfig > |
Object
Name | Type |
---|---|
logLevel |
WinstonLogLevel |
retries |
number |
src/utils/misc/getFinalFtpConfig.ts:4
▸ getFtpFunctionConfig(): FtpFunctionConfig
src/utils/misc/getFtpFunctionConfig.ts:6
▸ removeKeys(obj
, keys
): object
Name | Type |
---|---|
obj |
any |
keys |
string [] |
object
src/utils/misc/removeKeys.ts:1
▸ sortFilesBySize(files
): string
[]
Name | Type |
---|---|
files |
string [] |
string
[]
src/utils/fs/sortFilesBySize.ts:3
▸ uploadDirectories(config
): (clientsPool
: ItemPool
<AsyncClient
>, allDirs
: string
[], localDir
: string
, remoteDir
: string
) => Promise
<void
>
Name | Type |
---|---|
config |
Partial <FtpFunctionConfig > |
fn
▸ (clientsPool
, allDirs
, localDir
, remoteDir
): Promise
<void
>
Name | Type |
---|---|
clientsPool |
ItemPool <AsyncClient > |
allDirs |
string [] |
localDir |
string |
remoteDir |
string |
Promise
<void
>
src/utils/ftp/uploadDirectories.ts:10
▸ uploadDirectory(config
): (clientsPool
: ItemPool
<AsyncClient
>, remoteDir
: string
, localDir
: string
) => Promise
<void
>
Name | Type |
---|---|
config |
Partial <FtpFunctionConfig > |
fn
▸ (clientsPool
, remoteDir
, localDir
): Promise
<void
>
Name | Type |
---|---|
clientsPool |
ItemPool <AsyncClient > |
remoteDir |
string |
localDir |
string |
Promise
<void
>
src/utils/ftp/uploadDirectory.ts:8
▸ uploadFiles(config
): (clientsPool
: ItemPool
<AsyncClient
>, allFiles
: string
[], localDir
: string
, remoteDir
: string
) => Promise
<void
>
Name | Type |
---|---|
config |
Partial <FtpFunctionConfig > |
fn
▸ (clientsPool
, allFiles
, localDir
, remoteDir
): Promise
<void
>
Name | Type |
---|---|
clientsPool |
ItemPool <AsyncClient > |
allFiles |
string [] |
localDir |
string |
remoteDir |
string |
Promise
<void
>