|
1 |
| -export default CopyPlugin; |
2 |
| -export type Schema = import("schema-utils/declarations/validate").Schema; |
3 |
| -export type Compiler = import("webpack").Compiler; |
4 |
| -export type Compilation = import("webpack").Compilation; |
5 |
| -export type WebpackError = import("webpack").WebpackError; |
6 |
| -export type Asset = import("webpack").Asset; |
7 |
| -export type GlobbyOptions = import("globby").Options; |
8 |
| -export type GlobEntry = import("globby").GlobEntry; |
9 |
| -export type WebpackLogger = ReturnType<Compilation["getLogger"]>; |
10 |
| -export type CacheFacade = ReturnType<Compilation["getCache"]>; |
11 |
| -export type Etag = ReturnType< |
12 |
| - ReturnType<Compilation["getCache"]>["getLazyHashedEtag"] |
13 |
| ->; |
14 |
| -export type Snapshot = ReturnType< |
15 |
| - Compilation["fileSystemInfo"]["mergeSnapshots"] |
16 |
| ->; |
17 |
| -export type Force = boolean; |
18 |
| -export type CopiedResult = { |
19 |
| - sourceFilename: string; |
20 |
| - absoluteFilename: string; |
21 |
| - filename: string; |
22 |
| - source: Asset["source"]; |
23 |
| - force: Force | undefined; |
24 |
| - info: { |
25 |
| - [key: string]: string; |
26 |
| - }; |
27 |
| -}; |
28 |
| -export type StringPattern = string; |
29 |
| -export type NoErrorOnMissing = boolean; |
30 |
| -export type Context = string; |
31 |
| -export type From = string; |
32 |
| -export type ToFunction = (pathData: { |
33 |
| - context: string; |
34 |
| - absoluteFilename?: string; |
35 |
| -}) => string; |
36 |
| -export type To = string | ToFunction; |
37 |
| -export type ToType = "dir" | "file" | "template"; |
38 |
| -export type TransformerFunction = ( |
39 |
| - input: Buffer, |
40 |
| - absoluteFilename: string |
41 |
| -) => any; |
42 |
| -export type TransformerCacheObject = |
43 |
| - | { |
44 |
| - keys: { |
45 |
| - [key: string]: any; |
46 |
| - }; |
47 |
| - } |
48 |
| - | { |
49 |
| - keys: ( |
50 |
| - defaultCacheKeys: { |
51 |
| - [key: string]: any; |
52 |
| - }, |
53 |
| - absoluteFilename: string |
54 |
| - ) => Promise<{ |
55 |
| - [key: string]: any; |
56 |
| - }>; |
57 |
| - }; |
58 |
| -export type TransformerObject = { |
59 |
| - transformer: TransformerFunction; |
60 |
| - cache?: boolean | TransformerCacheObject | undefined; |
61 |
| -}; |
62 |
| -export type Transform = TransformerFunction | TransformerObject; |
63 |
| -export type Filter = (filepath: string) => any; |
64 |
| -export type TransformAllFunction = ( |
65 |
| - data: { |
66 |
| - data: Buffer; |
67 |
| - sourceFilename: string; |
68 |
| - absoluteFilename: string; |
69 |
| - }[] |
70 |
| -) => any; |
71 |
| -export type Info = |
72 |
| - | { |
73 |
| - [key: string]: string; |
74 |
| - } |
75 |
| - | ((item: { |
76 |
| - absoluteFilename: string; |
77 |
| - sourceFilename: string; |
78 |
| - filename: string; |
79 |
| - toType: ToType; |
80 |
| - }) => { |
81 |
| - [key: string]: string; |
82 |
| - }); |
83 |
| -export type ObjectPattern = { |
84 |
| - from: From; |
85 |
| - globOptions?: import("globby").Options | undefined; |
86 |
| - context?: string | undefined; |
87 |
| - to?: To | undefined; |
88 |
| - toType?: ToType | undefined; |
89 |
| - info?: Info | undefined; |
90 |
| - filter?: Filter | undefined; |
91 |
| - transform?: Transform | undefined; |
92 |
| - transformAll?: TransformAllFunction | undefined; |
93 |
| - force?: boolean | undefined; |
94 |
| - priority?: number | undefined; |
95 |
| - noErrorOnMissing?: boolean | undefined; |
96 |
| -}; |
97 |
| -export type Pattern = StringPattern | ObjectPattern; |
98 |
| -export type AdditionalOptions = { |
99 |
| - concurrency?: number | undefined; |
100 |
| -}; |
101 |
| -export type PluginOptions = { |
102 |
| - patterns: Pattern[]; |
103 |
| - options?: AdditionalOptions | undefined; |
104 |
| -}; |
| 1 | +export = CopyPlugin; |
105 | 2 | /** @typedef {import("schema-utils/declarations/validate").Schema} Schema */
|
106 | 3 | /** @typedef {import("webpack").Compiler} Compiler */
|
107 | 4 | /** @typedef {import("webpack").Compilation} Compilation */
|
@@ -257,3 +154,136 @@ declare class CopyPlugin {
|
257 | 154 | */
|
258 | 155 | apply(compiler: Compiler): void;
|
259 | 156 | }
|
| 157 | +declare namespace CopyPlugin { |
| 158 | + export { |
| 159 | + Schema, |
| 160 | + Compiler, |
| 161 | + Compilation, |
| 162 | + WebpackError, |
| 163 | + Asset, |
| 164 | + GlobbyOptions, |
| 165 | + GlobEntry, |
| 166 | + WebpackLogger, |
| 167 | + CacheFacade, |
| 168 | + Etag, |
| 169 | + Snapshot, |
| 170 | + Force, |
| 171 | + CopiedResult, |
| 172 | + StringPattern, |
| 173 | + NoErrorOnMissing, |
| 174 | + Context, |
| 175 | + From, |
| 176 | + ToFunction, |
| 177 | + To, |
| 178 | + ToType, |
| 179 | + TransformerFunction, |
| 180 | + TransformerCacheObject, |
| 181 | + TransformerObject, |
| 182 | + Transform, |
| 183 | + Filter, |
| 184 | + TransformAllFunction, |
| 185 | + Info, |
| 186 | + ObjectPattern, |
| 187 | + Pattern, |
| 188 | + AdditionalOptions, |
| 189 | + PluginOptions, |
| 190 | + }; |
| 191 | +} |
| 192 | +type Compiler = import("webpack").Compiler; |
| 193 | +type PluginOptions = { |
| 194 | + patterns: Pattern[]; |
| 195 | + options?: AdditionalOptions | undefined; |
| 196 | +}; |
| 197 | +type Schema = import("schema-utils/declarations/validate").Schema; |
| 198 | +type Compilation = import("webpack").Compilation; |
| 199 | +type WebpackError = import("webpack").WebpackError; |
| 200 | +type Asset = import("webpack").Asset; |
| 201 | +type GlobbyOptions = import("globby").Options; |
| 202 | +type GlobEntry = import("globby").GlobEntry; |
| 203 | +type WebpackLogger = ReturnType<Compilation["getLogger"]>; |
| 204 | +type CacheFacade = ReturnType<Compilation["getCache"]>; |
| 205 | +type Etag = ReturnType< |
| 206 | + ReturnType<Compilation["getCache"]>["getLazyHashedEtag"] |
| 207 | +>; |
| 208 | +type Snapshot = ReturnType<Compilation["fileSystemInfo"]["mergeSnapshots"]>; |
| 209 | +type Force = boolean; |
| 210 | +type CopiedResult = { |
| 211 | + sourceFilename: string; |
| 212 | + absoluteFilename: string; |
| 213 | + filename: string; |
| 214 | + source: Asset["source"]; |
| 215 | + force: Force | undefined; |
| 216 | + info: { |
| 217 | + [key: string]: string; |
| 218 | + }; |
| 219 | +}; |
| 220 | +type StringPattern = string; |
| 221 | +type NoErrorOnMissing = boolean; |
| 222 | +type Context = string; |
| 223 | +type From = string; |
| 224 | +type ToFunction = (pathData: { |
| 225 | + context: string; |
| 226 | + absoluteFilename?: string; |
| 227 | +}) => string; |
| 228 | +type To = string | ToFunction; |
| 229 | +type ToType = "dir" | "file" | "template"; |
| 230 | +type TransformerFunction = (input: Buffer, absoluteFilename: string) => any; |
| 231 | +type TransformerCacheObject = |
| 232 | + | { |
| 233 | + keys: { |
| 234 | + [key: string]: any; |
| 235 | + }; |
| 236 | + } |
| 237 | + | { |
| 238 | + keys: ( |
| 239 | + defaultCacheKeys: { |
| 240 | + [key: string]: any; |
| 241 | + }, |
| 242 | + absoluteFilename: string |
| 243 | + ) => Promise<{ |
| 244 | + [key: string]: any; |
| 245 | + }>; |
| 246 | + }; |
| 247 | +type TransformerObject = { |
| 248 | + transformer: TransformerFunction; |
| 249 | + cache?: boolean | TransformerCacheObject | undefined; |
| 250 | +}; |
| 251 | +type Transform = TransformerFunction | TransformerObject; |
| 252 | +type Filter = (filepath: string) => any; |
| 253 | +type TransformAllFunction = ( |
| 254 | + data: { |
| 255 | + data: Buffer; |
| 256 | + sourceFilename: string; |
| 257 | + absoluteFilename: string; |
| 258 | + }[] |
| 259 | +) => any; |
| 260 | +type Info = |
| 261 | + | { |
| 262 | + [key: string]: string; |
| 263 | + } |
| 264 | + | ((item: { |
| 265 | + absoluteFilename: string; |
| 266 | + sourceFilename: string; |
| 267 | + filename: string; |
| 268 | + toType: ToType; |
| 269 | + }) => { |
| 270 | + [key: string]: string; |
| 271 | + }); |
| 272 | +type ObjectPattern = { |
| 273 | + from: From; |
| 274 | + globOptions?: import("globby").Options | undefined; |
| 275 | + context?: string | undefined; |
| 276 | + to?: To | undefined; |
| 277 | + toType?: ToType | undefined; |
| 278 | + info?: Info | undefined; |
| 279 | + filter?: Filter | undefined; |
| 280 | + transform?: Transform | undefined; |
| 281 | + transformAll?: TransformAllFunction | undefined; |
| 282 | + force?: boolean | undefined; |
| 283 | + priority?: number | undefined; |
| 284 | + noErrorOnMissing?: boolean | undefined; |
| 285 | +}; |
| 286 | +type Pattern = StringPattern | ObjectPattern; |
| 287 | +type AdditionalOptions = { |
| 288 | + concurrency?: number | undefined; |
| 289 | +}; |
0 commit comments