@serwist/turbopack 10.0.0-preview.10 → 10.0.0-preview.11

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.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { NextResponse } from "next/server.js";
2
2
  import type { InjectManifestOptions } from "./types.js";
3
3
  /**
4
- * Creates a Route Handler that returns the precache manifest.
4
+ * Creates a Route Handler for Serwist files.
5
5
  * @param options Options for {@linkcode getFileManifestEntries}.
6
6
  */
7
7
  export declare const createSerwistRoute: (options: InjectManifestOptions) => {
8
- dynamic: string;
9
- dynamicParams: boolean;
10
- revalidate: boolean;
8
+ dynamic: "force-static";
9
+ dynamicParams: false;
10
+ revalidate: false;
11
11
  generateStaticParams: () => {
12
12
  path: string;
13
13
  }[];
@@ -10,66 +10,10 @@ export declare const injectManifestOptions: z.ZodPipe<z.ZodObject<{
10
10
  globIgnores: z.ZodDefault<z.ZodArray<z.ZodString>>;
11
11
  globStrict: z.ZodDefault<z.ZodBoolean>;
12
12
  templatedURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
13
- additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
14
- integrity: z.ZodOptional<z.ZodString>;
15
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
- url: z.ZodString;
17
- }, z.z.core.$strict>]>>>;
13
+ additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodType<import("@serwist/build").ManifestEntry, import("@serwist/build").ManifestEntry, z.z.core.$ZodTypeInternals<import("@serwist/build").ManifestEntry, import("@serwist/build").ManifestEntry>>]>>>;
18
14
  disablePrecacheManifest: z.ZodDefault<z.ZodBoolean>;
19
15
  dontCacheBustURLsMatching: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
20
- manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodCustom<z.z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
21
- size: z.ZodNumber;
22
- integrity: z.ZodOptional<z.ZodString>;
23
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
- url: z.ZodString;
25
- }, z.z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
26
- manifest: z.ZodArray<z.ZodObject<{
27
- size: z.ZodNumber;
28
- integrity: z.ZodOptional<z.ZodString>;
29
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
30
- url: z.ZodString;
31
- }, z.z.core.$strip>>;
32
- warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
33
- }, z.z.core.$strict>>, z.z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
34
- size: z.ZodNumber;
35
- integrity: z.ZodOptional<z.ZodString>;
36
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
- url: z.ZodString;
38
- }, z.z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
39
- manifest: z.ZodArray<z.ZodObject<{
40
- size: z.ZodNumber;
41
- integrity: z.ZodOptional<z.ZodString>;
42
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
- url: z.ZodString;
44
- }, z.z.core.$strip>>;
45
- warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
46
- }, z.z.core.$strict>>>, z.ZodTransform<z.z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
47
- size: z.ZodNumber;
48
- integrity: z.ZodOptional<z.ZodString>;
49
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
- url: z.ZodString;
51
- }, z.z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
52
- manifest: z.ZodArray<z.ZodObject<{
53
- size: z.ZodNumber;
54
- integrity: z.ZodOptional<z.ZodString>;
55
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
- url: z.ZodString;
57
- }, z.z.core.$strip>>;
58
- warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
59
- }, z.z.core.$strict>>, z.z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
60
- size: z.ZodNumber;
61
- integrity: z.ZodOptional<z.ZodString>;
62
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
- url: z.ZodString;
64
- }, z.z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
65
- manifest: z.ZodArray<z.ZodObject<{
66
- size: z.ZodNumber;
67
- integrity: z.ZodOptional<z.ZodString>;
68
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
- url: z.ZodString;
70
- }, z.z.core.$strip>>;
71
- warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
72
- }, z.z.core.$strict>>>>>>;
16
+ manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodType<import("@serwist/build").ManifestTransform, import("@serwist/build").ManifestTransform, z.z.core.$ZodTypeInternals<import("@serwist/build").ManifestTransform, import("@serwist/build").ManifestTransform>>>>;
73
17
  maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
74
18
  modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
75
19
  }, z.z.core.$strict>, z.ZodTransform<{
@@ -85,26 +29,9 @@ export declare const injectManifestOptions: z.ZodPipe<z.ZodObject<{
85
29
  disablePrecacheManifest: boolean;
86
30
  maximumFileSizeToCacheInBytes: number;
87
31
  templatedURLs?: Record<string, string | string[]> | undefined;
88
- additionalPrecacheEntries?: (string | {
89
- url: string;
90
- integrity?: string | undefined;
91
- revision?: string | null | undefined;
92
- })[] | undefined;
32
+ additionalPrecacheEntries?: (string | import("@serwist/build").ManifestEntry)[] | undefined;
93
33
  dontCacheBustURLsMatching?: RegExp | undefined;
94
- manifestTransforms?: z.z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
95
- size: z.ZodNumber;
96
- integrity: z.ZodOptional<z.ZodString>;
97
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
- url: z.ZodString;
99
- }, z.z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
100
- manifest: z.ZodArray<z.ZodObject<{
101
- size: z.ZodNumber;
102
- integrity: z.ZodOptional<z.ZodString>;
103
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
- url: z.ZodString;
105
- }, z.z.core.$strip>>;
106
- warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
107
- }, z.z.core.$strict>>[] | undefined;
34
+ manifestTransforms?: import("@serwist/build").ManifestTransform[] | undefined;
108
35
  modifyURLPrefix?: Record<string, string> | undefined;
109
36
  }, {
110
37
  cwd: string;
@@ -119,26 +46,9 @@ export declare const injectManifestOptions: z.ZodPipe<z.ZodObject<{
119
46
  maximumFileSizeToCacheInBytes: number;
120
47
  globDirectory?: string | undefined;
121
48
  templatedURLs?: Record<string, string | string[]> | undefined;
122
- additionalPrecacheEntries?: (string | {
123
- url: string;
124
- integrity?: string | undefined;
125
- revision?: string | null | undefined;
126
- })[] | undefined;
49
+ additionalPrecacheEntries?: (string | import("@serwist/build").ManifestEntry)[] | undefined;
127
50
  dontCacheBustURLsMatching?: RegExp | undefined;
128
- manifestTransforms?: z.z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
129
- size: z.ZodNumber;
130
- integrity: z.ZodOptional<z.ZodString>;
131
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
- url: z.ZodString;
133
- }, z.z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
134
- manifest: z.ZodArray<z.ZodObject<{
135
- size: z.ZodNumber;
136
- integrity: z.ZodOptional<z.ZodString>;
137
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
138
- url: z.ZodString;
139
- }, z.z.core.$strip>>;
140
- warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
141
- }, z.z.core.$strict>>[] | undefined;
51
+ manifestTransforms?: import("@serwist/build").ManifestTransform[] | undefined;
142
52
  modifyURLPrefix?: Record<string, string> | undefined;
143
53
  }>>;
144
54
  //# sourceMappingURL=index.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.schema.d.ts","sourceRoot":"","sources":["../src/index.schema.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgB9B,CAAC"}
1
+ {"version":3,"file":"index.schema.d.ts","sourceRoot":"","sources":["../src/index.schema.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgB9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serwist/turbopack",
3
- "version": "10.0.0-preview.10",
3
+ "version": "10.0.0-preview.11",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "A module that integrates Serwist into your Next.js / Turbopack application.",
@@ -67,9 +67,9 @@
67
67
  "esbuild-wasm": "0.25.8",
68
68
  "kolorist": "1.8.0",
69
69
  "zod": "4.0.5",
70
- "@serwist/build": "10.0.0-preview.10",
71
- "@serwist/window": "10.0.0-preview.10",
72
- "serwist": "10.0.0-preview.10"
70
+ "@serwist/build": "10.0.0-preview.11",
71
+ "@serwist/window": "10.0.0-preview.11",
72
+ "serwist": "10.0.0-preview.11"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@types/node": "24.0.14",
@@ -80,8 +80,8 @@
80
80
  "rollup": "4.45.1",
81
81
  "type-fest": "4.41.0",
82
82
  "typescript": "5.8.3",
83
- "@serwist/configs": "10.0.0-preview.10",
84
- "@serwist/utils": "10.0.0-preview.10"
83
+ "@serwist/utils": "10.0.0-preview.11",
84
+ "@serwist/configs": "10.0.0-preview.11"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "next": ">=14.0.0",
package/src/index.ts CHANGED
@@ -46,13 +46,13 @@ const contentTypeMap: Record<string, string> = {
46
46
  };
47
47
 
48
48
  /**
49
- * Creates a Route Handler that returns the precache manifest.
49
+ * Creates a Route Handler for Serwist files.
50
50
  * @param options Options for {@linkcode getFileManifestEntries}.
51
51
  */
52
52
  export const createSerwistRoute = (options: InjectManifestOptions) => {
53
- const dynamic = "force-static",
54
- dynamicParams = false,
55
- revalidate = false;
53
+ const dynamic = "force-static" as const,
54
+ dynamicParams = false as const,
55
+ revalidate = false as const;
56
56
  const validation = validateGetManifestOptions(options).then((config) => {
57
57
  // Make sure we leave swSrc out of the precache manifest.
58
58
  config.globIgnores.push(