vite-plugin-deploy-oss 0.0.2 → 0.0.3

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.d.mts CHANGED
@@ -13,6 +13,7 @@ type vitePluginDeployOssOption = oss.Options & {
13
13
  alias?: string;
14
14
  autoDelete?: boolean;
15
15
  skip?: string | string[];
16
+ open?: boolean;
16
17
  };
17
18
  declare function vitePluginDeployOss(option: vitePluginDeployOssOption): Plugin;
18
19
 
package/dist/index.d.ts CHANGED
@@ -13,6 +13,7 @@ type vitePluginDeployOssOption = oss.Options & {
13
13
  alias?: string;
14
14
  autoDelete?: boolean;
15
15
  skip?: string | string[];
16
+ open?: boolean;
16
17
  };
17
18
  declare function vitePluginDeployOss(option: vitePluginDeployOssOption): Plugin;
18
19
 
package/dist/index.js CHANGED
@@ -53,6 +53,7 @@ function vitePluginDeployOss(option) {
53
53
  secure = true,
54
54
  autoDelete = false,
55
55
  alias,
56
+ open = true,
56
57
  ...props
57
58
  } = option || {};
58
59
  let upload = false;
@@ -62,6 +63,7 @@ function vitePluginDeployOss(option) {
62
63
  apply: "build",
63
64
  enforce: "post",
64
65
  async config(config) {
66
+ if (!open) return;
65
67
  if (!accessKeyId || !accessKeySecret || !bucket || !region) {
66
68
  console.log(`:: ${import_chalk.default.red("\u7F3A\u5C11\u5FC5\u8981\u53C2\u6570")}`);
67
69
  return;
@@ -75,6 +77,7 @@ function vitePluginDeployOss(option) {
75
77
  sequential: true,
76
78
  order: "post",
77
79
  async handler() {
80
+ if (!open) return;
78
81
  if (!upload) return;
79
82
  console.log(`:: ${import_chalk.default.blue("\u5F00\u59CB\u4E0A\u4F20\u6587\u4EF6")} =>
80
83
  `);
package/dist/index.mjs CHANGED
@@ -19,6 +19,7 @@ function vitePluginDeployOss(option) {
19
19
  secure = true,
20
20
  autoDelete = false,
21
21
  alias,
22
+ open = true,
22
23
  ...props
23
24
  } = option || {};
24
25
  let upload = false;
@@ -28,6 +29,7 @@ function vitePluginDeployOss(option) {
28
29
  apply: "build",
29
30
  enforce: "post",
30
31
  async config(config) {
32
+ if (!open) return;
31
33
  if (!accessKeyId || !accessKeySecret || !bucket || !region) {
32
34
  console.log(`:: ${chalk.red("\u7F3A\u5C11\u5FC5\u8981\u53C2\u6570")}`);
33
35
  return;
@@ -41,6 +43,7 @@ function vitePluginDeployOss(option) {
41
43
  sequential: true,
42
44
  order: "post",
43
45
  async handler() {
46
+ if (!open) return;
44
47
  if (!upload) return;
45
48
  console.log(`:: ${chalk.blue("\u5F00\u59CB\u4E0A\u4F20\u6587\u4EF6")} =>
46
49
  `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-deploy-oss",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",