vite-plugin-deploy-ftp 1.2.2 → 3.0.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/README.md CHANGED
@@ -11,6 +11,7 @@
11
11
  - 自动备份远程文件
12
12
  - 连接重试机制
13
13
  - 选择性文件备份
14
+ - 当前版本仅支持 ESM(`import`),不再提供 CommonJS(`require`)入口
14
15
 
15
16
  ## 安装
16
17
 
package/dist/index.d.ts CHANGED
@@ -1,25 +1,10 @@
1
1
  import { Plugin } from 'vite';
2
2
 
3
- type vitePluginDeployFtpOption = ({
4
- uploadPath: string;
5
- singleBackFiles?: string[];
6
- singleBack?: boolean;
7
- open?: boolean;
8
- maxRetries?: number;
9
- retryDelay?: number;
10
- showBackFile?: boolean;
11
- autoUpload?: boolean;
12
- } & {
13
- ftps: {
14
- name: string;
15
- host?: string;
16
- port?: number;
17
- user?: string;
18
- password?: string;
19
- alias?: string;
20
- }[];
3
+ type vitePluginDeployFtpOption = (BaseOption & {
4
+ ftps: FtpConfig[];
21
5
  defaultFtp?: string;
22
- }) | ({
6
+ }) | (BaseOption & FtpConfig);
7
+ interface BaseOption {
23
8
  uploadPath: string;
24
9
  singleBackFiles?: string[];
25
10
  singleBack?: boolean;
@@ -28,14 +13,18 @@ type vitePluginDeployFtpOption = ({
28
13
  retryDelay?: number;
29
14
  showBackFile?: boolean;
30
15
  autoUpload?: boolean;
31
- } & {
16
+ fancy?: boolean;
17
+ failOnError?: boolean;
18
+ concurrency?: number;
19
+ }
20
+ interface FtpConfig {
32
21
  name?: string;
33
22
  host?: string;
34
23
  port?: number;
35
24
  user?: string;
36
25
  password?: string;
37
26
  alias?: string;
38
- });
27
+ }
39
28
  declare function vitePluginDeployFtp(option: vitePluginDeployFtpOption): Plugin;
40
29
 
41
30
  export { vitePluginDeployFtp as default, type vitePluginDeployFtpOption };