vite-plugin-deploy-oss 0.0.15 → 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 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 src_exports = {};
32
- __export(src_exports, {
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
33
  default: () => vitePluginDeployOss
34
34
  });
35
- module.exports = __toCommonJS(src_exports);
35
+ module.exports = __toCommonJS(index_exports);
36
36
  var import_ali_oss = __toESM(require("ali-oss"));
37
37
  var import_chalk = __toESM(require("chalk"));
38
38
  var import_delete_empty = __toESM(require("delete-empty"));
@@ -62,6 +62,9 @@ function vitePluginDeployOss(option) {
62
62
  } = option || {};
63
63
  let upload = false;
64
64
  let outDir = "";
65
+ const maxListeners = Math.max(20, concurrency * 3);
66
+ process.stdout?.setMaxListeners?.(maxListeners);
67
+ process.stderr?.setMaxListeners?.(maxListeners);
65
68
  const validateOptions = () => {
66
69
  const errors = [];
67
70
  if (!accessKeyId) errors.push("accessKeyId is required");
@@ -87,8 +90,7 @@ function vitePluginDeployOss(option) {
87
90
  });
88
91
  if (result.res.status === 200) {
89
92
  const url = alias ? alias + name : result.url;
90
- console.log(`${import_chalk.default.green("\u2713")} ${filePath}`);
91
- console.log(`=> ${import_chalk.default.cyan(url)}`);
93
+ console.log(`${import_chalk.default.green("\u2713")} ${filePath} => ${import_chalk.default.cyan(url)}`);
92
94
  if (autoDelete) {
93
95
  try {
94
96
  (0, import_node_fs.unlinkSync)(filePath);
package/dist/index.mjs CHANGED
@@ -3,8 +3,8 @@ import oss from "ali-oss";
3
3
  import chalk from "chalk";
4
4
  import deleteEmpty from "delete-empty";
5
5
  import { globSync } from "glob";
6
- import { unlinkSync } from "node:fs";
7
- import { resolve } from "node:path";
6
+ import { unlinkSync } from "fs";
7
+ import { resolve } from "path";
8
8
  import { normalizePath } from "vite";
9
9
  function vitePluginDeployOss(option) {
10
10
  const {
@@ -28,6 +28,9 @@ function vitePluginDeployOss(option) {
28
28
  } = option || {};
29
29
  let upload = false;
30
30
  let outDir = "";
31
+ const maxListeners = Math.max(20, concurrency * 3);
32
+ process.stdout?.setMaxListeners?.(maxListeners);
33
+ process.stderr?.setMaxListeners?.(maxListeners);
31
34
  const validateOptions = () => {
32
35
  const errors = [];
33
36
  if (!accessKeyId) errors.push("accessKeyId is required");
@@ -53,8 +56,7 @@ function vitePluginDeployOss(option) {
53
56
  });
54
57
  if (result.res.status === 200) {
55
58
  const url = alias ? alias + name : result.url;
56
- console.log(`${chalk.green("\u2713")} ${filePath}`);
57
- console.log(`=> ${chalk.cyan(url)}`);
59
+ console.log(`${chalk.green("\u2713")} ${filePath} => ${chalk.cyan(url)}`);
58
60
  if (autoDelete) {
59
61
  try {
60
62
  unlinkSync(filePath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-deploy-oss",
3
- "version": "0.0.15",
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,18 +25,20 @@
25
25
  "license": "MIT",
26
26
  "description": "将dist目录下的文件上传到阿里云oss",
27
27
  "devDependencies": {
28
- "@types/node": "^22.10.1",
29
- "tsup": "^8.3.5",
30
- "typescript": "^5.7.2",
31
- "vite": "^6.0.3"
28
+ "@types/node": "^22.15.32",
29
+ "tsup": "^8.5.0",
30
+ "typescript": "^5.8.3"
31
+ },
32
+ "peerDependencies": {
33
+ "vite": "^6.0.3 || ^7"
32
34
  },
33
35
  "dependencies": {
34
36
  "@types/ali-oss": "^6.16.11",
35
37
  "@types/delete-empty": "^3.0.5",
36
- "ali-oss": "^6.22.0",
37
- "chalk": "^5.3.0",
38
+ "ali-oss": "^6.23.0",
39
+ "chalk": "^5.4.1",
38
40
  "delete-empty": "^3.0.0",
39
- "glob": "^11.0.0"
41
+ "glob": "^11.0.3"
40
42
  },
41
43
  "scripts": {
42
44
  "build": "tsup",