@serwist/build 9.0.0-preview.9 → 9.0.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.
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,3 +1,4 @@
1
+ import { SerwistConfigError } from "../schema/serwistConfigError.js";
1
2
  /*
2
3
  Copyright 2021 Google LLC
3
4
 
@@ -6,13 +7,7 @@
6
7
  https://opensource.org/licenses/MIT.
7
8
  */
8
9
  import { validationErrorMap } from "../schema/validationErrorMap.js";
9
- import type {
10
- GetManifestOptionsComplete,
11
- InjectManifestOptionsComplete,
12
- ViteInjectManifestOptionsComplete,
13
- WebpackInjectManifestOptionsComplete,
14
- } from "../types.js";
15
- import { SerwistConfigError } from "./serwist-config-error.js";
10
+ import type { GetManifestOptionsComplete, InjectManifestOptionsComplete } from "../types.js";
16
11
 
17
12
  export const validateGetManifestOptions = async (input: unknown): Promise<GetManifestOptionsComplete> => {
18
13
  const result = await (await import("../schema/getManifest.js")).getManifestOptions.spa(input, { errorMap: validationErrorMap });
@@ -29,19 +24,3 @@ export const validateInjectManifestOptions = async (input: unknown): Promise<Inj
29
24
  }
30
25
  return result.data;
31
26
  };
32
-
33
- export const validateWebpackInjectManifestOptions = async (input: unknown): Promise<WebpackInjectManifestOptionsComplete> => {
34
- const result = await (await import("../schema/webpack.js")).webpackInjectManifestOptions.spa(input, { errorMap: validationErrorMap });
35
- if (!result.success) {
36
- throw new SerwistConfigError({ moduleName: "@serwist/webpack-plugin", message: JSON.stringify(result.error.format(), null, 2) });
37
- }
38
- return result.data;
39
- };
40
-
41
- export const validateViteInjectManifestOptions = async (input: unknown): Promise<ViteInjectManifestOptionsComplete> => {
42
- const result = await (await import("../schema/vite.js")).viteInjectManifestOptions.spa(input, { errorMap: validationErrorMap });
43
- if (!result.success) {
44
- throw new SerwistConfigError({ moduleName: "@serwist/vite", message: JSON.stringify(result.error.format(), null, 2) });
45
- }
46
- return result.data;
47
- };
@@ -1,5 +1,7 @@
1
1
  export type Equals<T, S> = [T] extends [S] ? ([S] extends [T] ? true : false) : false;
2
2
 
3
+ export type Assignable<T, U> = [U] extends [T] ? true : false;
4
+
3
5
  export function assertType<_T extends true>() {
4
6
  // Do nothing
5
7
  }
@@ -5,7 +5,7 @@ import { basePartial } from "./base.js";
5
5
  import { globPartial, requiredGlobDirectoryPartial } from "./glob.js";
6
6
  import { requiredSwDestPartial } from "./swDest.js";
7
7
 
8
- export const injectPartial = z
8
+ export const baseInjectPartial = z
9
9
  .object({
10
10
  injectionPoint: z.string().default("self.__SW_MANIFEST"),
11
11
  swSrc: z.string(),
@@ -14,12 +14,12 @@ export const injectPartial = z
14
14
 
15
15
  export const injectManifestOptions = basePartial
16
16
  .merge(globPartial)
17
- .merge(injectPartial)
17
+ .merge(baseInjectPartial)
18
18
  .merge(requiredSwDestPartial)
19
19
  .merge(requiredGlobDirectoryPartial)
20
20
  .strict("Do not pass invalid properties to InjectManifestOptions!");
21
21
 
22
- assertType<Equals<InjectPartial, z.input<typeof injectPartial>>>();
23
- assertType<Equals<InjectResolved, z.output<typeof injectPartial>>>();
22
+ assertType<Equals<InjectPartial, z.input<typeof baseInjectPartial>>>();
23
+ assertType<Equals<InjectResolved, z.output<typeof baseInjectPartial>>>();
24
24
  assertType<Equals<InjectManifestOptions, z.input<typeof injectManifestOptions>>>();
25
25
  assertType<Equals<InjectManifestOptionsComplete, z.output<typeof injectManifestOptions>>>();
@@ -3,7 +3,7 @@ import { z } from "zod";
3
3
  export const manifestEntry = z
4
4
  .object({
5
5
  integrity: z.string().optional(),
6
- revision: z.string().nullable(),
6
+ revision: z.string().nullable().optional(),
7
7
  url: z.string(),
8
8
  })
9
9
  .strict("Do not pass invalid properties to ManifestEntry!");
package/src/types.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import type { Require } from "@serwist/utils";
2
- import type { Pattern as GlobPattern } from "fast-glob";
3
2
  import type { PackageJson } from "type-fest";
4
3
  import type { z } from "zod";
5
4
  import type { manifestEntry } from "./schema/manifestEntry.js";
@@ -39,9 +38,9 @@ export interface BasePartial {
39
38
  */
40
39
  manifestTransforms?: ManifestTransform[];
41
40
  /**
42
- * This value can be used to determine the maximum size of files that will be
43
- * precached. This prevents you from inadvertently precaching very large files
44
- * that might have accidentally matched one of your patterns.
41
+ * Determines the maximum size of files that will be precached. This prevents
42
+ * you from inadvertently precaching very large files that might have accidentally
43
+ * matched one of your patterns.
45
44
  * @default 2097152
46
45
  */
47
46
  maximumFileSizeToCacheInBytes?: number;
@@ -97,14 +96,14 @@ export interface GlobPartial {
97
96
  /**
98
97
  * Determines whether or not symlinks are followed when generating the
99
98
  * precache manifest. For more information, see the definition of `follow` in
100
- * [`glob`'s documentation](https://github.com/isaacs/node-glob#options).
99
+ * [`node-glob`'s documentation](https://github.com/isaacs/node-glob#options).
101
100
  * @default true
102
101
  */
103
102
  globFollow?: boolean;
104
103
  /**
105
104
  * A set of patterns matching files to always exclude when generating the
106
105
  * precache manifest. For more information, see the definition of `ignore` in
107
- * [`glob`'s documentation](https://github.com/isaacs/node-glob#options).
106
+ * [`node-glob`'s documentation](https://github.com/isaacs/node-glob#options).
108
107
  * @default
109
108
  * ```
110
109
  * ["**\/node_modules\/**\/*"]
@@ -114,7 +113,7 @@ export interface GlobPartial {
114
113
  /**
115
114
  * Files matching any of these patterns will be included in the precache
116
115
  * manifest. For more information, see
117
- * [`glob`'s Glob Primer](https://github.com/isaacs/node-glob#glob-primer).
116
+ * [`node-glob`'s Glob Primer](https://github.com/isaacs/node-glob#glob-primer).
118
117
  * @default
119
118
  * ```
120
119
  * ["**\/*.{js,css,html}"]
@@ -125,7 +124,7 @@ export interface GlobPartial {
125
124
  * If true, an error reading a directory when generating a precache manifest
126
125
  * will cause the build to fail. If false, the problematic directory will be
127
126
  * skipped. For more information, see the definition of `strict` in
128
- * [`glob`'s documentation](https://github.com/isaacs/node-glob#options).
127
+ * [`node-glob`'s documentation](https://github.com/isaacs/node-glob#options).
129
128
  * @default true
130
129
  */
131
130
  globStrict?: boolean;
@@ -133,7 +132,7 @@ export interface GlobPartial {
133
132
  * If a URL is rendered based on some server-side logic, its contents may
134
133
  * depend on multiple files or on some other unique string value. The keys in
135
134
  * this object are server-rendered URLs. If the values are an array of
136
- * strings, they will be interpreted as `glob` patterns, and the contents of
135
+ * strings, they will be interpreted as glob patterns, and the contents of
137
136
  * any files matching the patterns will be used to uniquely version the URL.
138
137
  * If used with a single string, it will be interpreted as unique versioning
139
138
  * information that you've generated for a given URL.
@@ -161,43 +160,6 @@ export interface InjectPartial {
161
160
 
162
161
  export type InjectResolved = Require<InjectPartial, "injectionPoint">;
163
162
 
164
- export interface WebpackPartial {
165
- /**
166
- * One or more chunk names whose corresponding output files should be included
167
- * in the precache manifest.
168
- */
169
- chunks?: string[];
170
- // We can't use the @default annotation here to assign the value via AJV, as
171
- // an (RegExp)[] can't be serialized into JSON.
172
- // The default value of [/\.map$/, /^manifest.*\.js$/] will be assigned by
173
- // the validation function, and we need to reflect that in the docs.
174
- /**
175
- * One or more specifiers used to exclude assets from the precache manifest.
176
- * This is interpreted following
177
- * [the same rules](https://webpack.js.org/configuration/module/#condition)
178
- * as `webpack`'s standard `exclude` option.
179
- * @default
180
- * ```
181
- * [/\.map$/, /^manifest.*\.js$]
182
- * ```
183
- */
184
- exclude?: (string | RegExp | ((arg0: any) => boolean))[];
185
- /**
186
- * One or more chunk names whose corresponding output files should be excluded
187
- * from the precache manifest.
188
- */
189
- excludeChunks?: string[];
190
- /**
191
- * One or more specifiers used to include assets in the precache manifest.
192
- * This is interpreted following
193
- * [the same rules](https://webpack.js.org/configuration/module/#condition)
194
- * as `webpack`'s standard `include` option.
195
- */
196
- include?: (string | RegExp | ((arg0: any) => boolean))[];
197
- }
198
-
199
- export type WebpackResolved = Require<WebpackPartial, "exclude">;
200
-
201
163
  export interface RequiredSwDestPartial {
202
164
  /**
203
165
  * The path and filename of the service worker file that will be created by
@@ -219,121 +181,6 @@ export interface OptionalSwDestPartial {
219
181
 
220
182
  export type OptionalSwDestResolved = OptionalSwDestPartial;
221
183
 
222
- export interface WebpackInjectManifestPartial {
223
- /**
224
- * When `true` (the default), the `swSrc` file will be compiled by `webpack`.
225
- * When `false`, compilation will not occur (and `webpackCompilationPlugins`
226
- * can't be used.) Set to `false` if you want to inject the manifest into,
227
- * e.g., a JSON file.
228
- * @default true
229
- */
230
- compileSrc?: boolean;
231
- // This can only be set if `compileSrc` is true, but that restriction can't be
232
- // represented in TypeScript. It's enforced via custom runtime validation
233
- // logic and needs to be documented.
234
- /**
235
- * Optional `webpack` plugins that will be used when compiling the `swSrc`
236
- * input file. Only valid if `compileSrc` is `true`.
237
- */
238
- webpackCompilationPlugins?: any[];
239
- }
240
-
241
- export type WebpackInjectManifestResolved = Require<WebpackInjectManifestPartial, "compileSrc">;
242
-
243
- export interface NextInjectManifestPartial {
244
- /**
245
- * Enables additional route caching when users navigate through pages with
246
- * `next/link`. This improves the user experience in some cases but it
247
- * also adds a bit of overhead due to additional network calls.
248
- * @default false
249
- */
250
- cacheOnNavigation?: boolean;
251
- /**
252
- * Whether Serwist should be disabled.
253
- * @default false
254
- */
255
- disable?: boolean;
256
- /**
257
- * Whether `@serwist/next` should automatically register the service worker for you. If
258
- * you want to register the service worker yourself, set this to `false` and run
259
- * `window.serwist.register()` in `componentDidMount` or `useEffect`.
260
- * @example
261
- * ```tsx
262
- * // app/register-pwa.tsx
263
- * "use client";
264
- * import { useEffect } from "react";
265
- * import type { Serwist } from "@serwist/window";
266
- *
267
- * declare global {
268
- * interface Window {
269
- * serwist: Serwist;
270
- * }
271
- * }
272
- *
273
- * export default function RegisterPWA() {
274
- * useEffect(() => {
275
- * if ("serviceWorker" in navigator && window.serwist !== undefined) {
276
- * window.serwist.register();
277
- * }
278
- * }, []);
279
- * return <></>;
280
- * }
281
- *
282
- * // app/layout.tsx
283
- * import RegisterPWA from "./register-pwa";
284
- *
285
- * export default function RootLayout({
286
- * children,
287
- * }: {
288
- * children: React.ReactNode;
289
- * }) {
290
- * return (
291
- * <html lang="en">
292
- * <head />
293
- * <body>
294
- * <RegisterPWA />
295
- * {children}
296
- * </body>
297
- * </html>
298
- * );
299
- * }
300
- * ```
301
- * @default true
302
- */
303
- register?: boolean;
304
- /**
305
- * Whether Serwist should reload the app when it goes online.
306
- * @default true
307
- */
308
- reloadOnOnline?: boolean;
309
- /**
310
- * The service worker's URL scope. Set to `/foo/` so that paths under `/foo/` are under the service
311
- * worker's control while others are not.
312
- * @default nextConfig.basePath
313
- */
314
- scope?: string;
315
- /**
316
- * The URL to the service worker.
317
- * @default "/sw.js"
318
- */
319
- swUrl?: string;
320
- /**
321
- * Files in the public directory matching any of these patterns
322
- * will be included in the precache manifest. For more information,
323
- * see [`fast-glob`'s documentation](https://github.com/mrmlnc/fast-glob?tab=readme-ov-file#pattern-syntax).
324
- * @default
325
- * ```
326
- * ["**\/*"]
327
- * ```
328
- */
329
- globPublicPatterns?: GlobPattern | GlobPattern[];
330
- }
331
-
332
- export type NextInjectManifestResolved = Require<
333
- NextInjectManifestPartial,
334
- "cacheOnNavigation" | "disable" | "register" | "reloadOnOnline" | "swUrl" | "globPublicPatterns"
335
- >;
336
-
337
184
  export type GetManifestOptions = BasePartial & GlobPartial & RequiredGlobDirectoryPartial;
338
185
 
339
186
  export type GetManifestOptionsComplete = BaseResolved & GlobResolved & RequiredGlobDirectoryResolved;
@@ -342,28 +189,6 @@ export type InjectManifestOptions = BasePartial & GlobPartial & InjectPartial &
342
189
 
343
190
  export type InjectManifestOptionsComplete = BaseResolved & GlobResolved & InjectResolved & RequiredSwDestResolved & RequiredGlobDirectoryResolved;
344
191
 
345
- export type WebpackInjectManifestOptions = BasePartial & WebpackPartial & InjectPartial & OptionalSwDestPartial & WebpackInjectManifestPartial;
346
-
347
- export type WebpackInjectManifestOptionsComplete = BaseResolved &
348
- WebpackResolved &
349
- InjectResolved &
350
- OptionalSwDestResolved &
351
- WebpackInjectManifestResolved;
352
-
353
- export type ViteInjectManifestOptions = BasePartial & GlobPartial & InjectPartial & RequiredSwDestPartial & RequiredGlobDirectoryPartial;
354
-
355
- export type ViteInjectManifestOptionsComplete = BaseResolved & GlobResolved & InjectResolved & RequiredSwDestResolved & RequiredGlobDirectoryResolved;
356
-
357
- export type NextInjectManifestOptions = Omit<
358
- WebpackInjectManifestOptions & RequiredSwDestPartial & NextInjectManifestPartial,
359
- "disablePrecacheManifest"
360
- >;
361
-
362
- export type NextInjectManifestOptionsComplete = Omit<
363
- WebpackInjectManifestOptionsComplete & RequiredSwDestResolved & NextInjectManifestResolved,
364
- "disablePrecacheManifest"
365
- >;
366
-
367
192
  export interface GetManifestResult {
368
193
  count: number;
369
194
  manifestEntries: ManifestEntry[] | undefined;
@@ -380,7 +205,7 @@ export type BuildResult = Omit<GetManifestResult, "manifestEntries"> & {
380
205
  */
381
206
  export interface FileDetails {
382
207
  file: string;
383
- hash: string;
208
+ hash: string | null;
384
209
  size: number;
385
210
  }
386
211
 
@@ -1,7 +0,0 @@
1
- import { b as basePartial, g as globPartial, r as requiredGlobDirectoryPartial } from './glob.js';
2
- import { i as injectPartial, r as requiredSwDestPartial } from './injectManifest.js';
3
- import 'zod';
4
-
5
- const viteInjectManifestOptions = basePartial.merge(globPartial).merge(injectPartial).merge(requiredSwDestPartial).merge(requiredGlobDirectoryPartial).strict("Do not pass invalid properties to ViteInjectManifestPartial!");
6
-
7
- export { viteInjectManifestOptions };
@@ -1,33 +0,0 @@
1
- import { z } from 'zod';
2
- import { b as basePartial } from './glob.js';
3
- import { i as injectPartial, o as optionalSwDestPartial } from './injectManifest.js';
4
-
5
- const webpackPartial = z.object({
6
- chunks: z.array(z.string()).optional(),
7
- exclude: z.array(z.union([
8
- z.string(),
9
- z.instanceof(RegExp),
10
- z.function(z.tuple([
11
- z.any()
12
- ]), z.boolean())
13
- ])).default([
14
- /\.map$/,
15
- /^manifest.*\.js$/
16
- ]),
17
- excludeChunks: z.array(z.string()).optional(),
18
- include: z.array(z.union([
19
- z.string(),
20
- z.instanceof(RegExp),
21
- z.function(z.tuple([
22
- z.any()
23
- ]), z.boolean())
24
- ])).optional()
25
- }).strict("Do not pass invalid properties to WebpackPartial!");
26
- const webpackInjectManifestPartial = z.object({
27
- compileSrc: z.boolean().default(true),
28
- swDest: z.string().optional(),
29
- webpackCompilationPlugins: z.array(z.any()).optional()
30
- }).strict("Do not pass invalid properties to WebpackInjectManifestPartial!");
31
- const webpackInjectManifestOptions = basePartial.merge(webpackPartial).merge(injectPartial).merge(optionalSwDestPartial).merge(webpackInjectManifestPartial).strict("Do not pass invalid properties to WebpackInjectManifestOptions!");
32
-
33
- export { webpackInjectManifestOptions, webpackInjectManifestPartial, webpackPartial };
@@ -1,3 +0,0 @@
1
- import { validateNextInjectManifestOptions } from "./lib/validate-next-options.js";
2
- export { validateNextInjectManifestOptions };
3
- //# sourceMappingURL=index.next.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.next.d.ts","sourceRoot":"","sources":["../src/index.next.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,gCAAgC,CAAC;AAEnF,OAAO,EAAE,iCAAiC,EAAE,CAAC"}
@@ -1,38 +0,0 @@
1
- import { z } from 'zod';
2
- import { r as requiredSwDestPartial } from './chunks/injectManifest.js';
3
- import { webpackInjectManifestOptions } from './chunks/webpack.js';
4
- import { v as validationErrorMap, S as SerwistConfigError } from './chunks/serwist-config-error.js';
5
- import './chunks/glob.js';
6
-
7
- const nextInjectManifestPartial = z.object({
8
- cacheOnNavigation: z.boolean().default(false),
9
- disable: z.boolean().default(false),
10
- register: z.boolean().default(true),
11
- reloadOnOnline: z.boolean().default(true),
12
- scope: z.string().optional(),
13
- swUrl: z.string().default("/sw.js"),
14
- globPublicPatterns: z.union([
15
- z.string(),
16
- z.array(z.string())
17
- ]).default([
18
- "**/*"
19
- ])
20
- }).strict("Do not pass invalid properties to NextInjectManifestPartial!");
21
- const nextInjectManifestOptions = webpackInjectManifestOptions.merge(requiredSwDestPartial).merge(nextInjectManifestPartial).omit({
22
- disablePrecacheManifest: true
23
- }).strict("Do not pass invalid properties to NextInjectManifestOptions!");
24
-
25
- const validateNextInjectManifestOptions = (input)=>{
26
- const result = nextInjectManifestOptions.safeParse(input, {
27
- errorMap: validationErrorMap
28
- });
29
- if (!result.success) {
30
- throw new SerwistConfigError({
31
- moduleName: "@serwist/next",
32
- message: JSON.stringify(result.error.format(), null, 2)
33
- });
34
- }
35
- return result.data;
36
- };
37
-
38
- export { validateNextInjectManifestOptions };
@@ -1 +0,0 @@
1
- {"version":3,"file":"serwist-config-error.d.ts","sourceRoot":"","sources":["../../src/lib/serwist-config-error.ts"],"names":[],"mappings":"AAAA,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;CAI/E"}
@@ -1,3 +0,0 @@
1
- import type { NextInjectManifestOptionsComplete } from "../types.js";
2
- export declare const validateNextInjectManifestOptions: (input: unknown) => NextInjectManifestOptionsComplete;
3
- //# sourceMappingURL=validate-next-options.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate-next-options.d.ts","sourceRoot":"","sources":["../../src/lib/validate-next-options.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAGrE,eAAO,MAAM,iCAAiC,UAAW,OAAO,KAAG,iCAQlE,CAAC"}