@serwist/webpack-plugin 9.0.3 → 9.0.4
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.internal.js
CHANGED
|
@@ -27,6 +27,7 @@ class ChildCompilationPlugin {
|
|
|
27
27
|
filename: resolvedDest
|
|
28
28
|
};
|
|
29
29
|
const childCompiler = compilation.createChildCompiler(this.constructor.name, outputOptions, []);
|
|
30
|
+
childCompiler.options.target = "webworker";
|
|
30
31
|
childCompiler.context = parentCompiler.context;
|
|
31
32
|
childCompiler.inputFileSystem = parentCompiler.inputFileSystem;
|
|
32
33
|
childCompiler.outputFileSystem = parentCompiler.outputFileSystem;
|
package/dist/index.js
CHANGED
|
@@ -240,8 +240,12 @@ class InjectManifest {
|
|
|
240
240
|
if (error) {
|
|
241
241
|
reject(error);
|
|
242
242
|
} else {
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
if (childCompilation?.warnings) {
|
|
244
|
+
compilation.warnings.push(...childCompilation.warnings);
|
|
245
|
+
}
|
|
246
|
+
if (childCompilation?.errors) {
|
|
247
|
+
compilation.errors.push(...childCompilation.errors);
|
|
248
|
+
}
|
|
245
249
|
resolve();
|
|
246
250
|
}
|
|
247
251
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject-manifest.d.ts","sourceRoot":"","sources":["../src/inject-manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAe,QAAQ,EAAoC,MAAM,SAAS,CAAC;AACvF,OAAO,KAAK,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AAW3F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,cAAc;IACzB,SAAS,CAAC,MAAM,EAAE,6BAA6B,CAAC;IAChD,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,OAAO,CAAiB;IAEhC;;OAEG;gBACS,MAAM,EAAE,qBAAqB;IAOzC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAa9B;;;;OAIG;YACW,kBAAkB;IAwChC;;;;OAIG;IACH,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IA6B/B;;;;;OAKG;YACW,uBAAuB;
|
|
1
|
+
{"version":3,"file":"inject-manifest.d.ts","sourceRoot":"","sources":["../src/inject-manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAe,QAAQ,EAAoC,MAAM,SAAS,CAAC;AACvF,OAAO,KAAK,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AAW3F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,cAAc;IACzB,SAAS,CAAC,MAAM,EAAE,6BAA6B,CAAC;IAChD,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,OAAO,CAAiB;IAEhC;;OAEG;gBACS,MAAM,EAAE,qBAAqB;IAOzC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAa9B;;;;OAIG;YACW,kBAAkB;IAwChC;;;;OAIG;IACH,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IA6B/B;;;;;OAKG;YACW,uBAAuB;IAqCrC;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAKtB;;;;;OAKG;YACW,UAAU;IAiBxB;;;;OAIG;YACW,SAAS;CAmDxB"}
|
package/dist/lib/schema.d.ts
CHANGED
|
@@ -5,15 +5,15 @@ export declare const webpackPartial: z.ZodObject<{
|
|
|
5
5
|
excludeChunks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
6
6
|
include: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodBoolean>]>, "many">>;
|
|
7
7
|
}, "strict", z.ZodTypeAny, {
|
|
8
|
-
exclude: (string | RegExp | ((args_0: any) =>
|
|
8
|
+
exclude: (string | RegExp | ((args_0: any) => boolean))[];
|
|
9
9
|
chunks?: string[] | undefined;
|
|
10
10
|
excludeChunks?: string[] | undefined;
|
|
11
|
-
include?: (string | RegExp | ((args_0: any) =>
|
|
11
|
+
include?: (string | RegExp | ((args_0: any) => boolean))[] | undefined;
|
|
12
12
|
}, {
|
|
13
13
|
chunks?: string[] | undefined;
|
|
14
|
-
exclude?: (string | RegExp | ((args_0: any) =>
|
|
14
|
+
exclude?: (string | RegExp | ((args_0: any) => boolean))[] | undefined;
|
|
15
15
|
excludeChunks?: string[] | undefined;
|
|
16
|
-
include?: (string | RegExp | ((args_0: any) =>
|
|
16
|
+
include?: (string | RegExp | ((args_0: any) => boolean))[] | undefined;
|
|
17
17
|
}>;
|
|
18
18
|
export declare const injectPartial: z.ZodObject<{
|
|
19
19
|
compileSrc: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -148,7 +148,7 @@ export declare const injectManifestOptions: z.ZodObject<z.objectUtil.extendShape
|
|
|
148
148
|
swDest: z.ZodOptional<z.ZodString>;
|
|
149
149
|
webpackCompilationPlugins: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
150
150
|
}>, "strict", z.ZodTypeAny, {
|
|
151
|
-
exclude: (string | RegExp | ((args_0: any) =>
|
|
151
|
+
exclude: (string | RegExp | ((args_0: any) => boolean))[];
|
|
152
152
|
compileSrc: boolean;
|
|
153
153
|
disablePrecacheManifest: boolean;
|
|
154
154
|
maximumFileSizeToCacheInBytes: number;
|
|
@@ -156,7 +156,7 @@ export declare const injectManifestOptions: z.ZodObject<z.objectUtil.extendShape
|
|
|
156
156
|
swSrc: string;
|
|
157
157
|
chunks?: string[] | undefined;
|
|
158
158
|
excludeChunks?: string[] | undefined;
|
|
159
|
-
include?: (string | RegExp | ((args_0: any) =>
|
|
159
|
+
include?: (string | RegExp | ((args_0: any) => boolean))[] | undefined;
|
|
160
160
|
swDest?: string | undefined;
|
|
161
161
|
webpackCompilationPlugins?: any[] | undefined;
|
|
162
162
|
additionalPrecacheEntries?: (string | {
|
|
@@ -170,34 +170,7 @@ export declare const injectManifestOptions: z.ZodObject<z.objectUtil.extendShape
|
|
|
170
170
|
size: number;
|
|
171
171
|
integrity?: string | undefined;
|
|
172
172
|
revision?: string | null | undefined;
|
|
173
|
-
}[], args_1: unknown) =>
|
|
174
|
-
manifest: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
175
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
176
|
-
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
177
|
-
url: z.ZodString;
|
|
178
|
-
}, {
|
|
179
|
-
size: z.ZodNumber;
|
|
180
|
-
}>, "strip", z.ZodTypeAny, {
|
|
181
|
-
url: string;
|
|
182
|
-
size: number;
|
|
183
|
-
integrity?: string | undefined;
|
|
184
|
-
revision?: string | null | undefined;
|
|
185
|
-
}, {
|
|
186
|
-
url: string;
|
|
187
|
-
size: number;
|
|
188
|
-
integrity?: string | undefined;
|
|
189
|
-
revision?: string | null | undefined;
|
|
190
|
-
}>, "many">;
|
|
191
|
-
warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
192
|
-
}, "strict", z.ZodTypeAny, {
|
|
193
|
-
manifest: {
|
|
194
|
-
url: string;
|
|
195
|
-
size: number;
|
|
196
|
-
integrity?: string | undefined;
|
|
197
|
-
revision?: string | null | undefined;
|
|
198
|
-
}[];
|
|
199
|
-
warnings?: string[] | undefined;
|
|
200
|
-
}, {
|
|
173
|
+
}[], args_1: unknown) => {
|
|
201
174
|
manifest: {
|
|
202
175
|
url: string;
|
|
203
176
|
size: number;
|
|
@@ -205,34 +178,7 @@ export declare const injectManifestOptions: z.ZodObject<z.objectUtil.extendShape
|
|
|
205
178
|
revision?: string | null | undefined;
|
|
206
179
|
}[];
|
|
207
180
|
warnings?: string[] | undefined;
|
|
208
|
-
}
|
|
209
|
-
manifest: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
210
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
211
|
-
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
212
|
-
url: z.ZodString;
|
|
213
|
-
}, {
|
|
214
|
-
size: z.ZodNumber;
|
|
215
|
-
}>, "strip", z.ZodTypeAny, {
|
|
216
|
-
url: string;
|
|
217
|
-
size: number;
|
|
218
|
-
integrity?: string | undefined;
|
|
219
|
-
revision?: string | null | undefined;
|
|
220
|
-
}, {
|
|
221
|
-
url: string;
|
|
222
|
-
size: number;
|
|
223
|
-
integrity?: string | undefined;
|
|
224
|
-
revision?: string | null | undefined;
|
|
225
|
-
}>, "many">;
|
|
226
|
-
warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
227
|
-
}, "strict", z.ZodTypeAny, {
|
|
228
|
-
manifest: {
|
|
229
|
-
url: string;
|
|
230
|
-
size: number;
|
|
231
|
-
integrity?: string | undefined;
|
|
232
|
-
revision?: string | null | undefined;
|
|
233
|
-
}[];
|
|
234
|
-
warnings?: string[] | undefined;
|
|
235
|
-
}, {
|
|
181
|
+
} | Promise<{
|
|
236
182
|
manifest: {
|
|
237
183
|
url: string;
|
|
238
184
|
size: number;
|
|
@@ -240,14 +186,14 @@ export declare const injectManifestOptions: z.ZodObject<z.objectUtil.extendShape
|
|
|
240
186
|
revision?: string | null | undefined;
|
|
241
187
|
}[];
|
|
242
188
|
warnings?: string[] | undefined;
|
|
243
|
-
}>
|
|
189
|
+
}>)[] | undefined;
|
|
244
190
|
modifyURLPrefix?: Record<string, string> | undefined;
|
|
245
191
|
}, {
|
|
246
192
|
swSrc: string;
|
|
247
193
|
chunks?: string[] | undefined;
|
|
248
|
-
exclude?: (string | RegExp | ((args_0: any) =>
|
|
194
|
+
exclude?: (string | RegExp | ((args_0: any) => boolean))[] | undefined;
|
|
249
195
|
excludeChunks?: string[] | undefined;
|
|
250
|
-
include?: (string | RegExp | ((args_0: any) =>
|
|
196
|
+
include?: (string | RegExp | ((args_0: any) => boolean))[] | undefined;
|
|
251
197
|
compileSrc?: boolean | undefined;
|
|
252
198
|
swDest?: string | undefined;
|
|
253
199
|
webpackCompilationPlugins?: any[] | undefined;
|
|
@@ -263,34 +209,7 @@ export declare const injectManifestOptions: z.ZodObject<z.objectUtil.extendShape
|
|
|
263
209
|
size: number;
|
|
264
210
|
integrity?: string | undefined;
|
|
265
211
|
revision?: string | null | undefined;
|
|
266
|
-
}[], args_1: unknown) =>
|
|
267
|
-
manifest: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
268
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
269
|
-
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
270
|
-
url: z.ZodString;
|
|
271
|
-
}, {
|
|
272
|
-
size: z.ZodNumber;
|
|
273
|
-
}>, "strip", z.ZodTypeAny, {
|
|
274
|
-
url: string;
|
|
275
|
-
size: number;
|
|
276
|
-
integrity?: string | undefined;
|
|
277
|
-
revision?: string | null | undefined;
|
|
278
|
-
}, {
|
|
279
|
-
url: string;
|
|
280
|
-
size: number;
|
|
281
|
-
integrity?: string | undefined;
|
|
282
|
-
revision?: string | null | undefined;
|
|
283
|
-
}>, "many">;
|
|
284
|
-
warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
285
|
-
}, "strict", z.ZodTypeAny, {
|
|
286
|
-
manifest: {
|
|
287
|
-
url: string;
|
|
288
|
-
size: number;
|
|
289
|
-
integrity?: string | undefined;
|
|
290
|
-
revision?: string | null | undefined;
|
|
291
|
-
}[];
|
|
292
|
-
warnings?: string[] | undefined;
|
|
293
|
-
}, {
|
|
212
|
+
}[], args_1: unknown) => {
|
|
294
213
|
manifest: {
|
|
295
214
|
url: string;
|
|
296
215
|
size: number;
|
|
@@ -298,34 +217,7 @@ export declare const injectManifestOptions: z.ZodObject<z.objectUtil.extendShape
|
|
|
298
217
|
revision?: string | null | undefined;
|
|
299
218
|
}[];
|
|
300
219
|
warnings?: string[] | undefined;
|
|
301
|
-
}
|
|
302
|
-
manifest: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
303
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
304
|
-
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
305
|
-
url: z.ZodString;
|
|
306
|
-
}, {
|
|
307
|
-
size: z.ZodNumber;
|
|
308
|
-
}>, "strip", z.ZodTypeAny, {
|
|
309
|
-
url: string;
|
|
310
|
-
size: number;
|
|
311
|
-
integrity?: string | undefined;
|
|
312
|
-
revision?: string | null | undefined;
|
|
313
|
-
}, {
|
|
314
|
-
url: string;
|
|
315
|
-
size: number;
|
|
316
|
-
integrity?: string | undefined;
|
|
317
|
-
revision?: string | null | undefined;
|
|
318
|
-
}>, "many">;
|
|
319
|
-
warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
320
|
-
}, "strict", z.ZodTypeAny, {
|
|
321
|
-
manifest: {
|
|
322
|
-
url: string;
|
|
323
|
-
size: number;
|
|
324
|
-
integrity?: string | undefined;
|
|
325
|
-
revision?: string | null | undefined;
|
|
326
|
-
}[];
|
|
327
|
-
warnings?: string[] | undefined;
|
|
328
|
-
}, {
|
|
220
|
+
} | Promise<{
|
|
329
221
|
manifest: {
|
|
330
222
|
url: string;
|
|
331
223
|
size: number;
|
|
@@ -333,7 +225,7 @@ export declare const injectManifestOptions: z.ZodObject<z.objectUtil.extendShape
|
|
|
333
225
|
revision?: string | null | undefined;
|
|
334
226
|
}[];
|
|
335
227
|
warnings?: string[] | undefined;
|
|
336
|
-
}>
|
|
228
|
+
}>)[] | undefined;
|
|
337
229
|
maximumFileSizeToCacheInBytes?: number | undefined;
|
|
338
230
|
modifyURLPrefix?: Record<string, string> | undefined;
|
|
339
231
|
injectionPoint?: string | undefined;
|
package/dist/lib/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/lib/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/lib/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EASmC,CAAC;AAE/D,eAAO,MAAM,aAAa;;;;;;;;;;;;EAMkD,CAAC;AAE7E,eAAO,MAAM,qBAAqB;;;;;;;iBAdL,CAAC;gBACV,CAAC;;;iBACyB,CAAC;gBAAsC,CAAC;;;;;;;;;;;;;iBAiBnC,CAAC;gBACxC,CAAC;;;;iBAAkG,CAAC;gBAAsC,CAAC;;;;;;;;;;;qBAAye,CAAC;oBAA0C,CAAC;;;;qBAAkH,CAAC;oBAA0C,CAAC;;;;;;;qBAAiP,CAAC;oBAA0C,CAAC;;gBAA0D,CAAC;;;;;qBAA6H,CAAC;oBAA0C,CAAC;;gBAA0D,CAAC;;;;;;;;;;;qBAA8Z,CAAC;oBAA0C,CAAC;;;;qBAAkH,CAAC;oBAA0C,CAAC;;;;;;;qBAAiP,CAAC;oBAA0C,CAAC;;gBAA0D,CAAC;;;;;qBAA6H,CAAC;oBAA0C,CAAC;;gBAA0D,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAA3U,CAAC;oBAA0C,CAAC;;;;;;;qBAAhtC,CAAC;oBAA0C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAA41C,CAAC;oBAA0C,CAAC;;;;;;;qBAAhtC,CAAC;oBAA0C,CAAC;;;;;;;EAD/vC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serwist/webpack-plugin",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A plugin for your webpack build process, helping you generate a manifest of local files that should be precached.",
|
|
6
6
|
"files": [
|
|
@@ -56,16 +56,16 @@
|
|
|
56
56
|
"pretty-bytes": "6.1.1",
|
|
57
57
|
"upath": "2.0.1",
|
|
58
58
|
"zod": "3.23.8",
|
|
59
|
-
"@serwist/build": "9.0.
|
|
59
|
+
"@serwist/build": "9.0.4"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@types/node": "20.14.
|
|
62
|
+
"@types/node": "20.14.10",
|
|
63
63
|
"@types/webpack": "5.28.5",
|
|
64
|
-
"rollup": "4.18.
|
|
65
|
-
"typescript": "5.
|
|
66
|
-
"webpack": "5.
|
|
67
|
-
"@serwist/utils": "9.0.
|
|
68
|
-
"@serwist/configs": "9.0.
|
|
64
|
+
"rollup": "4.18.1",
|
|
65
|
+
"typescript": "5.5.3",
|
|
66
|
+
"webpack": "5.93.0",
|
|
67
|
+
"@serwist/utils": "9.0.4",
|
|
68
|
+
"@serwist/configs": "9.0.4"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"typescript": ">=5.0.0",
|
package/src/inject-manifest.ts
CHANGED
|
@@ -177,8 +177,12 @@ export class InjectManifest {
|
|
|
177
177
|
if (error) {
|
|
178
178
|
reject(error);
|
|
179
179
|
} else {
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
if (childCompilation?.warnings) {
|
|
181
|
+
compilation.warnings.push(...childCompilation.warnings);
|
|
182
|
+
}
|
|
183
|
+
if (childCompilation?.errors) {
|
|
184
|
+
compilation.errors.push(...childCompilation.errors);
|
|
185
|
+
}
|
|
182
186
|
|
|
183
187
|
resolve();
|
|
184
188
|
}
|
|
@@ -59,7 +59,7 @@ export class ChildCompilationPlugin implements WebpackPluginInstance {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
const childCompiler = compilation.createChildCompiler(this.constructor.name, outputOptions, []);
|
|
62
|
-
|
|
62
|
+
childCompiler.options.target = "webworker";
|
|
63
63
|
childCompiler.context = parentCompiler.context;
|
|
64
64
|
childCompiler.inputFileSystem = parentCompiler.inputFileSystem;
|
|
65
65
|
childCompiler.outputFileSystem = parentCompiler.outputFileSystem;
|