@serwist/build 9.0.0-preview.9 → 9.0.1

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.
Files changed (74) hide show
  1. package/dist/chunks/glob.js +3 -3
  2. package/dist/chunks/injectManifest.js +5 -5
  3. package/dist/index.d.ts +2 -2
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +24 -50
  6. package/dist/index.schema.d.ts +13 -0
  7. package/dist/index.schema.d.ts.map +1 -0
  8. package/dist/index.schema.js +9 -0
  9. package/dist/lib/additional-precache-entries-transform.d.ts +6 -8
  10. package/dist/lib/additional-precache-entries-transform.d.ts.map +1 -1
  11. package/dist/lib/get-file-details.d.ts +3 -9
  12. package/dist/lib/get-file-details.d.ts.map +1 -1
  13. package/dist/lib/get-file-hash.d.ts +1 -1
  14. package/dist/lib/get-file-hash.d.ts.map +1 -1
  15. package/dist/lib/get-file-manifest-entries.d.ts +2 -2
  16. package/dist/lib/get-file-manifest-entries.d.ts.map +1 -1
  17. package/dist/lib/get-string-details.d.ts +1 -1
  18. package/dist/lib/get-string-details.d.ts.map +1 -1
  19. package/dist/lib/get-string-hash.d.ts +1 -1
  20. package/dist/lib/get-string-hash.d.ts.map +1 -1
  21. package/dist/lib/transform-manifest.d.ts +4 -3
  22. package/dist/lib/transform-manifest.d.ts.map +1 -1
  23. package/dist/lib/validate-options.d.ts +1 -3
  24. package/dist/lib/validate-options.d.ts.map +1 -1
  25. package/dist/schema/assertType.d.ts +1 -0
  26. package/dist/schema/assertType.d.ts.map +1 -1
  27. package/dist/schema/base.d.ts +24 -24
  28. package/dist/schema/getManifest.d.ts +24 -24
  29. package/dist/schema/injectManifest.d.ts +27 -27
  30. package/dist/schema/injectManifest.d.ts.map +1 -1
  31. package/dist/schema/manifestEntry.d.ts +3 -3
  32. package/dist/schema/manifestTransform.d.ts +18 -18
  33. package/dist/{lib/serwist-config-error.d.ts → schema/serwistConfigError.d.ts} +1 -1
  34. package/dist/schema/serwistConfigError.d.ts.map +1 -0
  35. package/dist/types.d.ts +9 -152
  36. package/dist/types.d.ts.map +1 -1
  37. package/package.json +15 -24
  38. package/src/index.schema.ts +29 -0
  39. package/src/index.ts +2 -3
  40. package/src/inject-manifest.ts +1 -1
  41. package/src/lib/additional-precache-entries-transform.ts +4 -8
  42. package/src/lib/get-composite-details.ts +2 -2
  43. package/src/lib/get-file-details.ts +9 -17
  44. package/src/lib/get-file-hash.ts +4 -4
  45. package/src/lib/get-file-manifest-entries.ts +5 -5
  46. package/src/lib/get-string-details.ts +5 -7
  47. package/src/lib/get-string-hash.ts +1 -1
  48. package/src/lib/transform-manifest.ts +28 -16
  49. package/src/lib/validate-options.ts +2 -23
  50. package/src/schema/assertType.ts +2 -0
  51. package/src/schema/injectManifest.ts +4 -4
  52. package/src/schema/manifestEntry.ts +1 -1
  53. package/src/types.ts +9 -184
  54. package/dist/chunks/vite.js +0 -7
  55. package/dist/chunks/webpack.js +0 -33
  56. package/dist/index.next.d.ts +0 -3
  57. package/dist/index.next.d.ts.map +0 -1
  58. package/dist/index.next.js +0 -38
  59. package/dist/lib/serwist-config-error.d.ts.map +0 -1
  60. package/dist/lib/validate-next-options.d.ts +0 -3
  61. package/dist/lib/validate-next-options.d.ts.map +0 -1
  62. package/dist/schema/next.d.ts +0 -240
  63. package/dist/schema/next.d.ts.map +0 -1
  64. package/dist/schema/vite.d.ts +0 -196
  65. package/dist/schema/vite.d.ts.map +0 -1
  66. package/dist/schema/webpack.d.ts +0 -225
  67. package/dist/schema/webpack.d.ts.map +0 -1
  68. package/src/index.next.ts +0 -3
  69. package/src/lib/validate-next-options.ts +0 -14
  70. package/src/schema/next.ts +0 -33
  71. package/src/schema/vite.ts +0 -18
  72. package/src/schema/webpack.ts +0 -46
  73. package/dist/chunks/{serwist-config-error.js → validationErrorMap.js} +7 -7
  74. /package/src/{lib/serwist-config-error.ts → schema/serwistConfigError.ts} +0 -0
@@ -1,240 +0,0 @@
1
- import { z } from "zod";
2
- export declare const nextInjectManifestPartial: z.ZodObject<{
3
- cacheOnNavigation: z.ZodDefault<z.ZodBoolean>;
4
- disable: z.ZodDefault<z.ZodBoolean>;
5
- register: z.ZodDefault<z.ZodBoolean>;
6
- reloadOnOnline: z.ZodDefault<z.ZodBoolean>;
7
- scope: z.ZodOptional<z.ZodString>;
8
- swUrl: z.ZodDefault<z.ZodString>;
9
- globPublicPatterns: z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
10
- }, "strict", z.ZodTypeAny, {
11
- cacheOnNavigation: boolean;
12
- disable: boolean;
13
- register: boolean;
14
- reloadOnOnline: boolean;
15
- swUrl: string;
16
- globPublicPatterns: (string | string[]) & (string | string[] | undefined);
17
- scope?: string | undefined;
18
- }, {
19
- cacheOnNavigation?: boolean | undefined;
20
- disable?: boolean | undefined;
21
- register?: boolean | undefined;
22
- reloadOnOnline?: boolean | undefined;
23
- scope?: string | undefined;
24
- swUrl?: string | undefined;
25
- globPublicPatterns?: string | string[] | undefined;
26
- }>;
27
- export declare const nextInjectManifestOptions: z.ZodObject<Omit<{
28
- disablePrecacheManifest: z.ZodDefault<z.ZodBoolean>;
29
- maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
30
- additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
31
- integrity: z.ZodOptional<z.ZodString>;
32
- revision: z.ZodNullable<z.ZodString>;
33
- url: z.ZodString;
34
- }, "strict", z.ZodTypeAny, {
35
- revision: string | null;
36
- url: string;
37
- integrity?: string | undefined;
38
- }, {
39
- revision: string | null;
40
- url: string;
41
- integrity?: string | undefined;
42
- }>]>, "many">>;
43
- dontCacheBustURLsMatching: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
44
- manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[z.ZodArray<z.ZodObject<{
45
- integrity: z.ZodOptional<z.ZodString>;
46
- revision: z.ZodNullable<z.ZodString>;
47
- url: z.ZodString;
48
- size: z.ZodNumber;
49
- }, "strip", z.ZodTypeAny, {
50
- revision: string | null;
51
- url: string;
52
- size: number;
53
- integrity?: string | undefined;
54
- }, {
55
- revision: string | null;
56
- url: string;
57
- size: number;
58
- integrity?: string | undefined;
59
- }>, "many">, z.ZodOptional<z.ZodUnknown>], null>, z.ZodUnion<[z.ZodPromise<z.ZodObject<{
60
- manifest: z.ZodArray<z.ZodObject<{
61
- integrity: z.ZodOptional<z.ZodString>;
62
- revision: z.ZodNullable<z.ZodString>;
63
- url: z.ZodString;
64
- size: z.ZodNumber;
65
- }, "strip", z.ZodTypeAny, {
66
- revision: string | null;
67
- url: string;
68
- size: number;
69
- integrity?: string | undefined;
70
- }, {
71
- revision: string | null;
72
- url: string;
73
- size: number;
74
- integrity?: string | undefined;
75
- }>, "many">;
76
- warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
77
- }, "strict", z.ZodTypeAny, {
78
- manifest: {
79
- revision: string | null;
80
- url: string;
81
- size: number;
82
- integrity?: string | undefined;
83
- }[];
84
- warnings?: string[] | undefined;
85
- }, {
86
- manifest: {
87
- revision: string | null;
88
- url: string;
89
- size: number;
90
- integrity?: string | undefined;
91
- }[];
92
- warnings?: string[] | undefined;
93
- }>>, z.ZodObject<{
94
- manifest: z.ZodArray<z.ZodObject<{
95
- integrity: z.ZodOptional<z.ZodString>;
96
- revision: z.ZodNullable<z.ZodString>;
97
- url: z.ZodString;
98
- size: z.ZodNumber;
99
- }, "strip", z.ZodTypeAny, {
100
- revision: string | null;
101
- url: string;
102
- size: number;
103
- integrity?: string | undefined;
104
- }, {
105
- revision: string | null;
106
- url: string;
107
- size: number;
108
- integrity?: string | undefined;
109
- }>, "many">;
110
- warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
111
- }, "strict", z.ZodTypeAny, {
112
- manifest: {
113
- revision: string | null;
114
- url: string;
115
- size: number;
116
- integrity?: string | undefined;
117
- }[];
118
- warnings?: string[] | undefined;
119
- }, {
120
- manifest: {
121
- revision: string | null;
122
- url: string;
123
- size: number;
124
- integrity?: string | undefined;
125
- }[];
126
- warnings?: string[] | undefined;
127
- }>]>>, "many">>;
128
- modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
129
- injectionPoint: z.ZodDefault<z.ZodString>;
130
- swSrc: z.ZodString;
131
- exclude: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodBoolean>]>, "many">>;
132
- chunks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
133
- excludeChunks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
134
- 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">>;
135
- compileSrc: z.ZodDefault<z.ZodBoolean>;
136
- webpackCompilationPlugins: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
137
- swDest: z.ZodString;
138
- cacheOnNavigation: z.ZodDefault<z.ZodBoolean>;
139
- disable: z.ZodDefault<z.ZodBoolean>;
140
- register: z.ZodDefault<z.ZodBoolean>;
141
- reloadOnOnline: z.ZodDefault<z.ZodBoolean>;
142
- scope: z.ZodOptional<z.ZodString>;
143
- swUrl: z.ZodDefault<z.ZodString>;
144
- globPublicPatterns: z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
145
- }, "disablePrecacheManifest">, "strict", z.ZodTypeAny, {
146
- maximumFileSizeToCacheInBytes: number;
147
- injectionPoint: string;
148
- swSrc: string;
149
- exclude: (string | RegExp | ((args_0: any) => boolean))[];
150
- compileSrc: boolean;
151
- cacheOnNavigation: boolean;
152
- disable: boolean;
153
- register: boolean;
154
- reloadOnOnline: boolean;
155
- swUrl: string;
156
- globPublicPatterns: (string | string[]) & (string | string[] | undefined);
157
- swDest: string;
158
- additionalPrecacheEntries?: (string | {
159
- revision: string | null;
160
- url: string;
161
- integrity?: string | undefined;
162
- })[] | undefined;
163
- dontCacheBustURLsMatching?: RegExp | undefined;
164
- manifestTransforms?: ((args_0: {
165
- revision: string | null;
166
- url: string;
167
- size: number;
168
- integrity?: string | undefined;
169
- }[], args_1: unknown) => {
170
- manifest: {
171
- revision: string | null;
172
- url: string;
173
- size: number;
174
- integrity?: string | undefined;
175
- }[];
176
- warnings?: string[] | undefined;
177
- } | Promise<{
178
- manifest: {
179
- revision: string | null;
180
- url: string;
181
- size: number;
182
- integrity?: string | undefined;
183
- }[];
184
- warnings?: string[] | undefined;
185
- }>)[] | undefined;
186
- modifyURLPrefix?: Record<string, string> | undefined;
187
- chunks?: string[] | undefined;
188
- excludeChunks?: string[] | undefined;
189
- include?: (string | RegExp | ((args_0: any) => boolean))[] | undefined;
190
- webpackCompilationPlugins?: any[] | undefined;
191
- scope?: string | undefined;
192
- }, {
193
- swSrc: string;
194
- swDest: string;
195
- maximumFileSizeToCacheInBytes?: number | undefined;
196
- additionalPrecacheEntries?: (string | {
197
- revision: string | null;
198
- url: string;
199
- integrity?: string | undefined;
200
- })[] | undefined;
201
- dontCacheBustURLsMatching?: RegExp | undefined;
202
- manifestTransforms?: ((args_0: {
203
- revision: string | null;
204
- url: string;
205
- size: number;
206
- integrity?: string | undefined;
207
- }[], args_1: unknown) => {
208
- manifest: {
209
- revision: string | null;
210
- url: string;
211
- size: number;
212
- integrity?: string | undefined;
213
- }[];
214
- warnings?: string[] | undefined;
215
- } | Promise<{
216
- manifest: {
217
- revision: string | null;
218
- url: string;
219
- size: number;
220
- integrity?: string | undefined;
221
- }[];
222
- warnings?: string[] | undefined;
223
- }>)[] | undefined;
224
- modifyURLPrefix?: Record<string, string> | undefined;
225
- injectionPoint?: string | undefined;
226
- exclude?: (string | RegExp | ((args_0: any) => boolean))[] | undefined;
227
- chunks?: string[] | undefined;
228
- excludeChunks?: string[] | undefined;
229
- include?: (string | RegExp | ((args_0: any) => boolean))[] | undefined;
230
- compileSrc?: boolean | undefined;
231
- webpackCompilationPlugins?: any[] | undefined;
232
- cacheOnNavigation?: boolean | undefined;
233
- disable?: boolean | undefined;
234
- register?: boolean | undefined;
235
- reloadOnOnline?: boolean | undefined;
236
- swUrl?: string | undefined;
237
- globPublicPatterns?: string | string[] | undefined;
238
- scope?: string | undefined;
239
- }>;
240
- //# sourceMappingURL=next.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../src/schema/next.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;EAUmC,CAAC;AAE1E,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAImC,CAAC"}
@@ -1,196 +0,0 @@
1
- import type { z } from "zod";
2
- export declare const viteInjectManifestOptions: z.ZodObject<{
3
- disablePrecacheManifest: z.ZodDefault<z.ZodBoolean>;
4
- maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
5
- additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
6
- integrity: z.ZodOptional<z.ZodString>;
7
- revision: z.ZodNullable<z.ZodString>;
8
- url: z.ZodString;
9
- }, "strict", z.ZodTypeAny, {
10
- revision: string | null;
11
- url: string;
12
- integrity?: string | undefined;
13
- }, {
14
- revision: string | null;
15
- url: string;
16
- integrity?: string | undefined;
17
- }>]>, "many">>;
18
- dontCacheBustURLsMatching: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
19
- manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[z.ZodArray<z.ZodObject<{
20
- integrity: z.ZodOptional<z.ZodString>;
21
- revision: z.ZodNullable<z.ZodString>;
22
- url: z.ZodString;
23
- size: z.ZodNumber;
24
- }, "strip", z.ZodTypeAny, {
25
- revision: string | null;
26
- url: string;
27
- size: number;
28
- integrity?: string | undefined;
29
- }, {
30
- revision: string | null;
31
- url: string;
32
- size: number;
33
- integrity?: string | undefined;
34
- }>, "many">, z.ZodOptional<z.ZodUnknown>], null>, z.ZodUnion<[z.ZodPromise<z.ZodObject<{
35
- manifest: z.ZodArray<z.ZodObject<{
36
- integrity: z.ZodOptional<z.ZodString>;
37
- revision: z.ZodNullable<z.ZodString>;
38
- url: z.ZodString;
39
- size: z.ZodNumber;
40
- }, "strip", z.ZodTypeAny, {
41
- revision: string | null;
42
- url: string;
43
- size: number;
44
- integrity?: string | undefined;
45
- }, {
46
- revision: string | null;
47
- url: string;
48
- size: number;
49
- integrity?: string | undefined;
50
- }>, "many">;
51
- warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
52
- }, "strict", z.ZodTypeAny, {
53
- manifest: {
54
- revision: string | null;
55
- url: string;
56
- size: number;
57
- integrity?: string | undefined;
58
- }[];
59
- warnings?: string[] | undefined;
60
- }, {
61
- manifest: {
62
- revision: string | null;
63
- url: string;
64
- size: number;
65
- integrity?: string | undefined;
66
- }[];
67
- warnings?: string[] | undefined;
68
- }>>, z.ZodObject<{
69
- manifest: z.ZodArray<z.ZodObject<{
70
- integrity: z.ZodOptional<z.ZodString>;
71
- revision: z.ZodNullable<z.ZodString>;
72
- url: z.ZodString;
73
- size: z.ZodNumber;
74
- }, "strip", z.ZodTypeAny, {
75
- revision: string | null;
76
- url: string;
77
- size: number;
78
- integrity?: string | undefined;
79
- }, {
80
- revision: string | null;
81
- url: string;
82
- size: number;
83
- integrity?: string | undefined;
84
- }>, "many">;
85
- warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
86
- }, "strict", z.ZodTypeAny, {
87
- manifest: {
88
- revision: string | null;
89
- url: string;
90
- size: number;
91
- integrity?: string | undefined;
92
- }[];
93
- warnings?: string[] | undefined;
94
- }, {
95
- manifest: {
96
- revision: string | null;
97
- url: string;
98
- size: number;
99
- integrity?: string | undefined;
100
- }[];
101
- warnings?: string[] | undefined;
102
- }>]>>, "many">>;
103
- modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
104
- globFollow: z.ZodDefault<z.ZodBoolean>;
105
- globIgnores: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
106
- globPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
107
- globStrict: z.ZodDefault<z.ZodBoolean>;
108
- templatedURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
109
- injectionPoint: z.ZodDefault<z.ZodString>;
110
- swSrc: z.ZodString;
111
- swDest: z.ZodString;
112
- globDirectory: z.ZodString;
113
- }, "strict", z.ZodTypeAny, {
114
- disablePrecacheManifest: boolean;
115
- maximumFileSizeToCacheInBytes: number;
116
- globFollow: boolean;
117
- globIgnores: string[];
118
- globPatterns: string[];
119
- globStrict: boolean;
120
- injectionPoint: string;
121
- swSrc: string;
122
- swDest: string;
123
- globDirectory: string;
124
- additionalPrecacheEntries?: (string | {
125
- revision: string | null;
126
- url: string;
127
- integrity?: string | undefined;
128
- })[] | undefined;
129
- dontCacheBustURLsMatching?: RegExp | undefined;
130
- manifestTransforms?: ((args_0: {
131
- revision: string | null;
132
- url: string;
133
- size: number;
134
- integrity?: string | undefined;
135
- }[], args_1: unknown) => {
136
- manifest: {
137
- revision: string | null;
138
- url: string;
139
- size: number;
140
- integrity?: string | undefined;
141
- }[];
142
- warnings?: string[] | undefined;
143
- } | Promise<{
144
- manifest: {
145
- revision: string | null;
146
- url: string;
147
- size: number;
148
- integrity?: string | undefined;
149
- }[];
150
- warnings?: string[] | undefined;
151
- }>)[] | undefined;
152
- modifyURLPrefix?: Record<string, string> | undefined;
153
- templatedURLs?: Record<string, string | string[]> | undefined;
154
- }, {
155
- swSrc: string;
156
- swDest: string;
157
- globDirectory: string;
158
- disablePrecacheManifest?: boolean | undefined;
159
- maximumFileSizeToCacheInBytes?: number | undefined;
160
- additionalPrecacheEntries?: (string | {
161
- revision: string | null;
162
- url: string;
163
- integrity?: string | undefined;
164
- })[] | undefined;
165
- dontCacheBustURLsMatching?: RegExp | undefined;
166
- manifestTransforms?: ((args_0: {
167
- revision: string | null;
168
- url: string;
169
- size: number;
170
- integrity?: string | undefined;
171
- }[], args_1: unknown) => {
172
- manifest: {
173
- revision: string | null;
174
- url: string;
175
- size: number;
176
- integrity?: string | undefined;
177
- }[];
178
- warnings?: string[] | undefined;
179
- } | Promise<{
180
- manifest: {
181
- revision: string | null;
182
- url: string;
183
- size: number;
184
- integrity?: string | undefined;
185
- }[];
186
- warnings?: string[] | undefined;
187
- }>)[] | undefined;
188
- modifyURLPrefix?: Record<string, string> | undefined;
189
- globFollow?: boolean | undefined;
190
- globIgnores?: string[] | undefined;
191
- globPatterns?: string[] | undefined;
192
- globStrict?: boolean | undefined;
193
- templatedURLs?: Record<string, string | string[]> | undefined;
194
- injectionPoint?: string | undefined;
195
- }>;
196
- //# sourceMappingURL=vite.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../../src/schema/vite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAS7B,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKmC,CAAC"}
@@ -1,225 +0,0 @@
1
- import { z } from "zod";
2
- export declare const webpackPartial: z.ZodObject<{
3
- chunks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4
- exclude: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodBoolean>]>, "many">>;
5
- excludeChunks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
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
- }, "strict", z.ZodTypeAny, {
8
- exclude: (string | RegExp | ((args_0: any) => boolean))[];
9
- chunks?: string[] | undefined;
10
- excludeChunks?: string[] | undefined;
11
- include?: (string | RegExp | ((args_0: any) => boolean))[] | undefined;
12
- }, {
13
- chunks?: string[] | undefined;
14
- exclude?: (string | RegExp | ((args_0: any) => boolean))[] | undefined;
15
- excludeChunks?: string[] | undefined;
16
- include?: (string | RegExp | ((args_0: any) => boolean))[] | undefined;
17
- }>;
18
- export declare const webpackInjectManifestPartial: z.ZodObject<{
19
- compileSrc: z.ZodDefault<z.ZodBoolean>;
20
- swDest: z.ZodOptional<z.ZodString>;
21
- webpackCompilationPlugins: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
22
- }, "strict", z.ZodTypeAny, {
23
- compileSrc: boolean;
24
- swDest?: string | undefined;
25
- webpackCompilationPlugins?: any[] | undefined;
26
- }, {
27
- compileSrc?: boolean | undefined;
28
- swDest?: string | undefined;
29
- webpackCompilationPlugins?: any[] | undefined;
30
- }>;
31
- export declare const webpackInjectManifestOptions: z.ZodObject<{
32
- disablePrecacheManifest: z.ZodDefault<z.ZodBoolean>;
33
- maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
34
- additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
35
- integrity: z.ZodOptional<z.ZodString>;
36
- revision: z.ZodNullable<z.ZodString>;
37
- url: z.ZodString;
38
- }, "strict", z.ZodTypeAny, {
39
- revision: string | null;
40
- url: string;
41
- integrity?: string | undefined;
42
- }, {
43
- revision: string | null;
44
- url: string;
45
- integrity?: string | undefined;
46
- }>]>, "many">>;
47
- dontCacheBustURLsMatching: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
48
- manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[z.ZodArray<z.ZodObject<{
49
- integrity: z.ZodOptional<z.ZodString>;
50
- revision: z.ZodNullable<z.ZodString>;
51
- url: z.ZodString;
52
- size: z.ZodNumber;
53
- }, "strip", z.ZodTypeAny, {
54
- revision: string | null;
55
- url: string;
56
- size: number;
57
- integrity?: string | undefined;
58
- }, {
59
- revision: string | null;
60
- url: string;
61
- size: number;
62
- integrity?: string | undefined;
63
- }>, "many">, z.ZodOptional<z.ZodUnknown>], null>, z.ZodUnion<[z.ZodPromise<z.ZodObject<{
64
- manifest: z.ZodArray<z.ZodObject<{
65
- integrity: z.ZodOptional<z.ZodString>;
66
- revision: z.ZodNullable<z.ZodString>;
67
- url: z.ZodString;
68
- size: z.ZodNumber;
69
- }, "strip", z.ZodTypeAny, {
70
- revision: string | null;
71
- url: string;
72
- size: number;
73
- integrity?: string | undefined;
74
- }, {
75
- revision: string | null;
76
- url: string;
77
- size: number;
78
- integrity?: string | undefined;
79
- }>, "many">;
80
- warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
81
- }, "strict", z.ZodTypeAny, {
82
- manifest: {
83
- revision: string | null;
84
- url: string;
85
- size: number;
86
- integrity?: string | undefined;
87
- }[];
88
- warnings?: string[] | undefined;
89
- }, {
90
- manifest: {
91
- revision: string | null;
92
- url: string;
93
- size: number;
94
- integrity?: string | undefined;
95
- }[];
96
- warnings?: string[] | undefined;
97
- }>>, z.ZodObject<{
98
- manifest: z.ZodArray<z.ZodObject<{
99
- integrity: z.ZodOptional<z.ZodString>;
100
- revision: z.ZodNullable<z.ZodString>;
101
- url: z.ZodString;
102
- size: z.ZodNumber;
103
- }, "strip", z.ZodTypeAny, {
104
- revision: string | null;
105
- url: string;
106
- size: number;
107
- integrity?: string | undefined;
108
- }, {
109
- revision: string | null;
110
- url: string;
111
- size: number;
112
- integrity?: string | undefined;
113
- }>, "many">;
114
- warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
115
- }, "strict", z.ZodTypeAny, {
116
- manifest: {
117
- revision: string | null;
118
- url: string;
119
- size: number;
120
- integrity?: string | undefined;
121
- }[];
122
- warnings?: string[] | undefined;
123
- }, {
124
- manifest: {
125
- revision: string | null;
126
- url: string;
127
- size: number;
128
- integrity?: string | undefined;
129
- }[];
130
- warnings?: string[] | undefined;
131
- }>]>>, "many">>;
132
- modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
133
- injectionPoint: z.ZodDefault<z.ZodString>;
134
- swSrc: z.ZodString;
135
- exclude: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>, z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodBoolean>]>, "many">>;
136
- chunks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
137
- excludeChunks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
138
- 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">>;
139
- compileSrc: z.ZodDefault<z.ZodBoolean>;
140
- swDest: z.ZodOptional<z.ZodString>;
141
- webpackCompilationPlugins: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
142
- }, "strict", z.ZodTypeAny, {
143
- disablePrecacheManifest: boolean;
144
- maximumFileSizeToCacheInBytes: number;
145
- injectionPoint: string;
146
- swSrc: string;
147
- exclude: (string | RegExp | ((args_0: any) => boolean))[];
148
- compileSrc: boolean;
149
- additionalPrecacheEntries?: (string | {
150
- revision: string | null;
151
- url: string;
152
- integrity?: string | undefined;
153
- })[] | undefined;
154
- dontCacheBustURLsMatching?: RegExp | undefined;
155
- manifestTransforms?: ((args_0: {
156
- revision: string | null;
157
- url: string;
158
- size: number;
159
- integrity?: string | undefined;
160
- }[], args_1: unknown) => {
161
- manifest: {
162
- revision: string | null;
163
- url: string;
164
- size: number;
165
- integrity?: string | undefined;
166
- }[];
167
- warnings?: string[] | undefined;
168
- } | Promise<{
169
- manifest: {
170
- revision: string | null;
171
- url: string;
172
- size: number;
173
- integrity?: string | undefined;
174
- }[];
175
- warnings?: string[] | undefined;
176
- }>)[] | undefined;
177
- modifyURLPrefix?: Record<string, string> | undefined;
178
- chunks?: string[] | undefined;
179
- excludeChunks?: string[] | undefined;
180
- include?: (string | RegExp | ((args_0: any) => boolean))[] | undefined;
181
- swDest?: string | undefined;
182
- webpackCompilationPlugins?: any[] | undefined;
183
- }, {
184
- swSrc: string;
185
- disablePrecacheManifest?: boolean | undefined;
186
- maximumFileSizeToCacheInBytes?: number | undefined;
187
- additionalPrecacheEntries?: (string | {
188
- revision: string | null;
189
- url: string;
190
- integrity?: string | undefined;
191
- })[] | undefined;
192
- dontCacheBustURLsMatching?: RegExp | undefined;
193
- manifestTransforms?: ((args_0: {
194
- revision: string | null;
195
- url: string;
196
- size: number;
197
- integrity?: string | undefined;
198
- }[], args_1: unknown) => {
199
- manifest: {
200
- revision: string | null;
201
- url: string;
202
- size: number;
203
- integrity?: string | undefined;
204
- }[];
205
- warnings?: string[] | undefined;
206
- } | Promise<{
207
- manifest: {
208
- revision: string | null;
209
- url: string;
210
- size: number;
211
- integrity?: string | undefined;
212
- }[];
213
- warnings?: string[] | undefined;
214
- }>)[] | undefined;
215
- modifyURLPrefix?: Record<string, string> | undefined;
216
- injectionPoint?: string | undefined;
217
- exclude?: (string | RegExp | ((args_0: any) => boolean))[] | undefined;
218
- chunks?: string[] | undefined;
219
- excludeChunks?: string[] | undefined;
220
- include?: (string | RegExp | ((args_0: any) => boolean))[] | undefined;
221
- compileSrc?: boolean | undefined;
222
- swDest?: string | undefined;
223
- webpackCompilationPlugins?: any[] | undefined;
224
- }>;
225
- //# sourceMappingURL=webpack.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../../src/schema/webpack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EASmC,CAAC;AAE/D,eAAO,MAAM,4BAA4B;;;;;;;;;;;;EAMmC,CAAC;AAE7E,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKmC,CAAC"}
package/src/index.next.ts DELETED
@@ -1,3 +0,0 @@
1
- import { validateNextInjectManifestOptions } from "./lib/validate-next-options.js";
2
-
3
- export { validateNextInjectManifestOptions };
@@ -1,14 +0,0 @@
1
- import { nextInjectManifestOptions } from "../schema/next.js";
2
- import { validationErrorMap } from "../schema/validationErrorMap.js";
3
- import type { NextInjectManifestOptionsComplete } from "../types.js";
4
- import { SerwistConfigError } from "./serwist-config-error.js";
5
-
6
- export const validateNextInjectManifestOptions = (input: unknown): NextInjectManifestOptionsComplete => {
7
- const result = nextInjectManifestOptions.safeParse(input, {
8
- errorMap: validationErrorMap,
9
- });
10
- if (!result.success) {
11
- throw new SerwistConfigError({ moduleName: "@serwist/next", message: JSON.stringify(result.error.format(), null, 2) });
12
- }
13
- return result.data;
14
- };