File tree 2 files changed +10
-7
lines changed
2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -108,11 +108,11 @@ Execution timeout.
108
108
If it is ` rsync ` , it is the timeout period for executing the command. If it is ` oss-upload-tool ` , it is the single file upload timeout period.
109
109
110
110
### ` onUploadStart `
111
- Type: ` (stats: Stats) => void | Promise<void> `
111
+ Type: ` (stats: Stats, shelljs ) => void | Promise<void> `
112
112
Before upload event.
113
113
114
114
### ` onUploadFinish `
115
- Type: ` (stats: Stats) => void | Promise<void> `
115
+ Type: ` (stats: Stats, shelljs ) => void | Promise<void> `
116
116
Upload complete event.
117
117
118
118
### ` execUploadStartScripts `
Original file line number Diff line number Diff line change @@ -58,13 +58,16 @@ export type TargetItem = {
58
58
/**
59
59
* before upload callback
60
60
*/
61
- onUploadStart ?: ( stats : Stats ) => void | Promise < void > ;
61
+ onUploadStart ?: ( stats : Stats , shelljs : typeof shell ) => void | Promise < void > ;
62
62
/**
63
63
* Upload finish callback
64
64
*/
65
- onUploadFinish ?: ( stats : Stats ) => void | Promise < void > ;
65
+ onUploadFinish ?: (
66
+ stats : Stats ,
67
+ shelljs : typeof shell
68
+ ) => void | Promise < void > ;
66
69
/**
67
- * @link {import ("shelljs").ExecOptions}
70
+ * @link {require ("shelljs").ExecOptions}
68
71
*/
69
72
execOptions ?: ExecOptions ;
70
73
} ;
@@ -151,7 +154,7 @@ class WebpackDeployPlugin {
151
154
return ;
152
155
}
153
156
154
- onUploadStart ?.( stats ) ;
157
+ onUploadStart ?.( stats , shell ) ;
155
158
execScripts ( execUploadStartScripts , {
156
159
...execOptions ,
157
160
cwd : context ,
@@ -182,7 +185,7 @@ class WebpackDeployPlugin {
182
185
return ;
183
186
}
184
187
185
- await onUploadFinish ?.( stats ) ;
188
+ await onUploadFinish ?.( stats , shell ) ;
186
189
execScripts ( execUploadFinishScripts , {
187
190
...execOptions ,
188
191
cwd : context ,
You can’t perform that action at this time.
0 commit comments