tt-uploader 1.0.27 → 1.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/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "tt-uploader",
3
- "version": "1.0.27",
3
+ "version": "1.1.0",
4
4
  "description": "a upload component",
5
5
  "main": "dist/index.js",
6
6
  "typings": "./types/index.d.ts",
7
7
  "scripts": {
8
- "build-umd": "webpack --config webpack.config.js --progress --color --display-modules -p",
8
+ "build-umd": "webpack --config webpack.config.js --progress --color",
9
9
  "build": "rm -rf dist && npm run build-umd",
10
- "demo": "NODE_ENV=development DEMO_TYPE=single webpack --config webpack.config.js --watch --devtool cheap-module-eval-source-map",
10
+ "demo": "NODE_ENV=development DEMO_TYPE=single webpack --config webpack.config.js --watch --devtool eval-cheap-module-source-map",
11
11
  "demo-multi": "NODE_ENV=development DEMO_TYPE=multi webpack --config webpack.config.js --watch --devtool cheap-module-eval-source-map",
12
12
  "test": "jest --no-cache",
13
13
  "prepublish": "npm run build",
@@ -31,13 +31,14 @@
31
31
  "eslint": "^6.8.0",
32
32
  "jest": "^24.9.0",
33
33
  "uglifyjs-webpack-plugin": "^2.2.0",
34
- "webpack": "^4.41.2",
35
- "webpack-cli": "^3.3.9",
34
+ "webpack": "^5.86.0",
35
+ "webpack-cli": "^5.1.4",
36
36
  "worker-loader": "^2.0.0"
37
37
  },
38
38
  "dependencies": {
39
- "crypto-js": "^3.1.9-1",
40
- "events": "^1.1.1"
39
+ "crypto-js": "^4.1.1",
40
+ "events": "^1.1.1",
41
+ "jsrsasign": "^10.8.6"
41
42
  },
42
43
  "jest": {
43
44
  "testEnvironment": "node"
package/types/index.d.ts CHANGED
@@ -7,7 +7,7 @@ export interface STSToken {
7
7
  }
8
8
 
9
9
  export interface Action {
10
- name: 'GetMeta' | 'StartWorkflow' | 'Snapshot' | 'Encryption' | 'AddOptionInfo' | 'CaptionUpload'
10
+ name: 'GetMeta' | 'StartWorkflow' | 'Snapshot' | 'Encryption' | 'AddOptionInfo'
11
11
  input?: any
12
12
  }
13
13
 
@@ -18,6 +18,11 @@ export interface VideoConfig {
18
18
 
19
19
  export interface ImageConfig {
20
20
  serviceId: string
21
+ imagexEnableEncrypt?: boolean,
22
+ // 数据加密密钥(256位)
23
+ imagexEncryptKey?: string,
24
+ // rsa公钥(pem格式规范)
25
+ imagexPublicKey?: string,
21
26
  }
22
27
 
23
28
  export interface ObjectConfig {
@@ -62,12 +67,13 @@ export interface ImageFileOption {
62
67
  file: Blob | Blob[]
63
68
  stsToken: STSToken
64
69
  storeKey?: string | string[]
65
- type?: 'image'
70
+ type?: 'image' | 'object'
66
71
  prefix?: string
67
72
  skipMeta?: boolean
68
73
  skipCommit?: boolean
69
74
  serviceId?: string
70
75
  processAction?: Action[]
76
+ overwrite?: Boolean
71
77
  }
72
78
 
73
79
 
@@ -77,6 +83,7 @@ export default class TTUploader {
77
83
  setOption(options: UpdateOptions): void
78
84
  addFile(fileOption: FileOption): string
79
85
  addImageFile(imageFileOption: ImageFileOption): string
86
+ addImageXFile(imageFileOption: ImageFileOption): string
80
87
  setServiceId(serviceId: string): string
81
88
  getServiceId(): string
82
89
  start(key?: string): void