vite-plugin-deploy-ftp 0.0.6 → 0.0.7

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/dist/index.js CHANGED
@@ -88,7 +88,14 @@ function vitePluginDeployFtp(option) {
88
88
  `\u5DF2\u8FDE\u63A5 ${import_chalk.default.green(`\u76EE\u5F55: ==> ${protocol + (0, import_vite.normalizePath)(other + uploadPath)}`)}`
89
89
  );
90
90
  if (fileList.length) {
91
- await createBackupFile(client, uploadPath, protocol, other);
91
+ const isBackFiles = await (0, import_prompts.select)({
92
+ message: "\u662F\u5426\u5907\u4EFD\u8FDC\u7A0B\u6587\u4EF6",
93
+ choices: ["\u5426", "\u662F"],
94
+ default: "\u5426"
95
+ });
96
+ if (isBackFiles === "\u662F") {
97
+ await createBackupFile(client, uploadPath, protocol, other);
98
+ }
92
99
  }
93
100
  const uploadFileSpinner = (0, import_ora.default)("\u4E0A\u4F20\u4E2D...").start();
94
101
  await client.uploadFromDir(outDir, uploadPath);
package/dist/index.mjs CHANGED
@@ -54,7 +54,14 @@ function vitePluginDeployFtp(option) {
54
54
  `\u5DF2\u8FDE\u63A5 ${chalk.green(`\u76EE\u5F55: ==> ${protocol + normalizePath(other + uploadPath)}`)}`
55
55
  );
56
56
  if (fileList.length) {
57
- await createBackupFile(client, uploadPath, protocol, other);
57
+ const isBackFiles = await select({
58
+ message: "\u662F\u5426\u5907\u4EFD\u8FDC\u7A0B\u6587\u4EF6",
59
+ choices: ["\u5426", "\u662F"],
60
+ default: "\u5426"
61
+ });
62
+ if (isBackFiles === "\u662F") {
63
+ await createBackupFile(client, uploadPath, protocol, other);
64
+ }
58
65
  }
59
66
  const uploadFileSpinner = ora("\u4E0A\u4F20\u4E2D...").start();
60
67
  await client.uploadFromDir(outDir, uploadPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-deploy-ftp",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",