vite-plugin-deploy-ftp 0.0.9 → 0.1.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/dist/index.js +12 -4
- package/dist/index.mjs +12 -4
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -28,11 +28,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
default: () => vitePluginDeployFtp
|
|
34
34
|
});
|
|
35
|
-
module.exports = __toCommonJS(
|
|
35
|
+
module.exports = __toCommonJS(index_exports);
|
|
36
36
|
var import_prompts = require("@inquirer/prompts");
|
|
37
37
|
var import_archiver = __toESM(require("archiver"));
|
|
38
38
|
var import_basic_ftp = require("basic-ftp");
|
|
@@ -58,7 +58,15 @@ function vitePluginDeployFtp(option) {
|
|
|
58
58
|
retryDelay = 1e3
|
|
59
59
|
} = option || {};
|
|
60
60
|
if (!host || !user || !password || !uploadPath) {
|
|
61
|
-
|
|
61
|
+
return {
|
|
62
|
+
name: "vite-plugin-deploy-ftp",
|
|
63
|
+
apply: "build",
|
|
64
|
+
enforce: "post",
|
|
65
|
+
configResolved() {
|
|
66
|
+
},
|
|
67
|
+
closeBundle: { sequential: true, order: "post", async handler() {
|
|
68
|
+
} }
|
|
69
|
+
};
|
|
62
70
|
}
|
|
63
71
|
let outDir = "dist";
|
|
64
72
|
return {
|
package/dist/index.mjs
CHANGED
|
@@ -4,9 +4,9 @@ import archiver from "archiver";
|
|
|
4
4
|
import { Client } from "basic-ftp";
|
|
5
5
|
import chalk from "chalk";
|
|
6
6
|
import dayjs from "dayjs";
|
|
7
|
-
import fs from "
|
|
8
|
-
import os from "
|
|
9
|
-
import path from "
|
|
7
|
+
import fs from "fs";
|
|
8
|
+
import os from "os";
|
|
9
|
+
import path from "path";
|
|
10
10
|
import ora from "ora";
|
|
11
11
|
import { normalizePath } from "vite";
|
|
12
12
|
function vitePluginDeployFtp(option) {
|
|
@@ -24,7 +24,15 @@ function vitePluginDeployFtp(option) {
|
|
|
24
24
|
retryDelay = 1e3
|
|
25
25
|
} = option || {};
|
|
26
26
|
if (!host || !user || !password || !uploadPath) {
|
|
27
|
-
|
|
27
|
+
return {
|
|
28
|
+
name: "vite-plugin-deploy-ftp",
|
|
29
|
+
apply: "build",
|
|
30
|
+
enforce: "post",
|
|
31
|
+
configResolved() {
|
|
32
|
+
},
|
|
33
|
+
closeBundle: { sequential: true, order: "post", async handler() {
|
|
34
|
+
} }
|
|
35
|
+
};
|
|
28
36
|
}
|
|
29
37
|
let outDir = "dist";
|
|
30
38
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-deploy-ftp",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -25,21 +25,21 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"description": "将dist目录下的文件上传到ftp服务器",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/node": "^22.
|
|
29
|
-
"tsup": "^8.
|
|
30
|
-
"typescript": "^5.
|
|
28
|
+
"@types/node": "^22.15.32",
|
|
29
|
+
"tsup": "^8.5.0",
|
|
30
|
+
"typescript": "^5.8.3"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"vite": "^6.0.3"
|
|
33
|
+
"vite": "^6.0.3 || ^7"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@inquirer/prompts": "^7.
|
|
36
|
+
"@inquirer/prompts": "^7.5.3",
|
|
37
37
|
"@types/archiver": "^6.0.3",
|
|
38
38
|
"archiver": "^7.0.1",
|
|
39
39
|
"basic-ftp": "^5.0.5",
|
|
40
|
-
"chalk": "^5.
|
|
40
|
+
"chalk": "^5.4.1",
|
|
41
41
|
"dayjs": "^1.11.13",
|
|
42
|
-
"ora": "^8.
|
|
42
|
+
"ora": "^8.2.0"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "tsup",
|