upload-assets-oss 0.0.9 → 0.0.10
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.ts +2 -0
- package/dist/npm_plugin/npmQiniuPlugin.d.ts +13 -0
- package/dist/oss_plugin/qiniu.d.ts +42 -0
- package/dist/utils/log.d.ts +1 -0
- package/dist/utils/utils.d.ts +5 -0
- package/dist/vite_plugin/vitePluginQiniu.d.ts +3 -0
- package/dist/webpack_plugin/webpackPluginQiniu.d.ts +8 -0
- package/package.json +1 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Qiniu, { type Options } from '../oss_plugin/qiniu';
|
|
2
|
+
declare class NpmQiuniuPlugin {
|
|
3
|
+
options: Options;
|
|
4
|
+
qiniu: Qiniu;
|
|
5
|
+
constructor(options: Options);
|
|
6
|
+
apply({ filePathAry, outputPath, }: {
|
|
7
|
+
filePathAry: string[];
|
|
8
|
+
outputPath: string;
|
|
9
|
+
}): void;
|
|
10
|
+
batchUpload(filePathAry: string[], buildPath: string): Promise<void>;
|
|
11
|
+
batchDelete(uploadFilePathAry: string[]): Promise<string[]>;
|
|
12
|
+
}
|
|
13
|
+
export default NpmQiuniuPlugin;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import qiniu from 'qiniu';
|
|
2
|
+
export interface Options {
|
|
3
|
+
/**
|
|
4
|
+
* 七牛 Access Key
|
|
5
|
+
*/
|
|
6
|
+
accessKey: string;
|
|
7
|
+
/**
|
|
8
|
+
* 七牛 Secret Key
|
|
9
|
+
*/
|
|
10
|
+
secretKey: string;
|
|
11
|
+
/**
|
|
12
|
+
* 七牛 空间名
|
|
13
|
+
*/
|
|
14
|
+
bucket: string;
|
|
15
|
+
/**
|
|
16
|
+
* 上传文件前,先强制删除之前上传七牛云上的文件
|
|
17
|
+
*/
|
|
18
|
+
forceDelete?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* 文件上传的根目录名称,默认为项目名称
|
|
21
|
+
*/
|
|
22
|
+
rootName?: string;
|
|
23
|
+
/**
|
|
24
|
+
* 是否打印上传日志,默认为false
|
|
25
|
+
*/
|
|
26
|
+
isLog?: boolean;
|
|
27
|
+
}
|
|
28
|
+
declare class Qiniu {
|
|
29
|
+
options: {
|
|
30
|
+
accessKey: string;
|
|
31
|
+
secretKey: string;
|
|
32
|
+
bucket: string;
|
|
33
|
+
};
|
|
34
|
+
uploadToken: string;
|
|
35
|
+
formUploader: qiniu.form_up.FormUploader;
|
|
36
|
+
bucketManager: qiniu.rs.BucketManager;
|
|
37
|
+
constructor(options: Options);
|
|
38
|
+
putFile(key: string, filePath: string): Promise<unknown>;
|
|
39
|
+
getResouceList(prefix: string): Promise<string[]>;
|
|
40
|
+
batchDeleteFile(filenameAry: string[]): Promise<unknown>;
|
|
41
|
+
}
|
|
42
|
+
export default Qiniu;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const log: (text: string, color?: string) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Options } from '../oss_plugin/qiniu';
|
|
2
|
+
import NpmQiniuPlugin from '../npm_plugin/npmQiniuPlugin';
|
|
3
|
+
declare class WebpackPluginQiniu {
|
|
4
|
+
qiniu: NpmQiniuPlugin;
|
|
5
|
+
constructor(options: Options);
|
|
6
|
+
apply(compiler: any): void;
|
|
7
|
+
}
|
|
8
|
+
export default WebpackPluginQiniu;
|