vite-plugin-deploy-ftp 3.1.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierignore +5 -0
- package/.prettierrc.json +12 -0
- package/dist/index.d.ts +46 -5
- package/dist/index.js +747 -292
- package/package.json +11 -2
package/.prettierignore
ADDED
package/.prettierrc.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/prettierrc",
|
|
3
|
+
"arrowParens": "always",
|
|
4
|
+
"bracketSameLine": false,
|
|
5
|
+
"jsxSingleQuote": true,
|
|
6
|
+
"printWidth": 120,
|
|
7
|
+
"quoteProps": "as-needed",
|
|
8
|
+
"semi": false,
|
|
9
|
+
"singleQuote": true,
|
|
10
|
+
"tabWidth": 2,
|
|
11
|
+
"endOfLine": "lf"
|
|
12
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
2
|
|
|
3
|
-
type vitePluginDeployFtpOption = (BaseOption & {
|
|
4
|
-
ftps: FtpConfig[];
|
|
5
|
-
defaultFtp?: string;
|
|
6
|
-
}) | (BaseOption & FtpConfig);
|
|
7
3
|
interface BaseOption {
|
|
8
4
|
uploadPath: string;
|
|
9
5
|
singleBackFiles?: string[];
|
|
10
6
|
singleBack?: boolean;
|
|
7
|
+
debug?: boolean;
|
|
11
8
|
open?: boolean;
|
|
12
9
|
maxRetries?: number;
|
|
13
10
|
retryDelay?: number;
|
|
@@ -25,6 +22,50 @@ interface FtpConfig {
|
|
|
25
22
|
password?: string;
|
|
26
23
|
alias?: string;
|
|
27
24
|
}
|
|
25
|
+
type vitePluginDeployFtpOption = (BaseOption & {
|
|
26
|
+
ftps: FtpConfig[];
|
|
27
|
+
defaultFtp?: string;
|
|
28
|
+
}) | (BaseOption & FtpConfig);
|
|
29
|
+
interface TempDir {
|
|
30
|
+
path: string;
|
|
31
|
+
cleanup: () => void;
|
|
32
|
+
}
|
|
33
|
+
interface UploadResult {
|
|
34
|
+
success: boolean;
|
|
35
|
+
file: string;
|
|
36
|
+
name: string;
|
|
37
|
+
size: number;
|
|
38
|
+
retries: number;
|
|
39
|
+
error?: Error;
|
|
40
|
+
}
|
|
41
|
+
interface UploadTask {
|
|
42
|
+
filePath: string;
|
|
43
|
+
remotePath: string;
|
|
44
|
+
size: number;
|
|
45
|
+
}
|
|
46
|
+
interface UploadTaskGroup {
|
|
47
|
+
relativeDir: string;
|
|
48
|
+
remoteDir: string;
|
|
49
|
+
tasks: UploadTask[];
|
|
50
|
+
}
|
|
51
|
+
interface FtpConnectConfig {
|
|
52
|
+
host: string;
|
|
53
|
+
port: number;
|
|
54
|
+
user: string;
|
|
55
|
+
password: string;
|
|
56
|
+
}
|
|
57
|
+
interface DeployTargetResult {
|
|
58
|
+
name: string;
|
|
59
|
+
totalFiles: number;
|
|
60
|
+
failedCount: number;
|
|
61
|
+
error?: Error;
|
|
62
|
+
}
|
|
63
|
+
type ValidFtpConfig = Required<Pick<FtpConfig, 'host' | 'user' | 'password'>> & FtpConfig;
|
|
64
|
+
interface BackupSummary {
|
|
65
|
+
title: string;
|
|
66
|
+
items: string[];
|
|
67
|
+
}
|
|
68
|
+
|
|
28
69
|
declare function vitePluginDeployFtp(option: vitePluginDeployFtpOption): Plugin;
|
|
29
70
|
|
|
30
|
-
export { vitePluginDeployFtp as default, type vitePluginDeployFtpOption };
|
|
71
|
+
export { type BackupSummary, type BaseOption, type DeployTargetResult, type FtpConfig, type FtpConnectConfig, type TempDir, type UploadResult, type UploadTask, type UploadTaskGroup, type ValidFtpConfig, vitePluginDeployFtp as default, type vitePluginDeployFtpOption };
|