@serwist/build 10.0.0-preview.1 → 10.0.0-preview.10

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 (111) hide show
  1. package/dist/chunks/constants.js +59 -0
  2. package/dist/chunks/get-manifest.js +11 -0
  3. package/dist/chunks/glob.js +45 -28
  4. package/dist/chunks/inject-manifest.js +29 -0
  5. package/dist/get-manifest.d.ts.map +1 -1
  6. package/dist/index.d.ts +3 -11
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +16 -151
  9. package/dist/index.schema.d.ts +9 -9
  10. package/dist/index.schema.d.ts.map +1 -1
  11. package/dist/index.schema.js +4 -4
  12. package/dist/inject-manifest.d.ts.map +1 -1
  13. package/dist/lib/additional-precache-entries-transform.d.ts.map +1 -1
  14. package/dist/lib/constants.d.ts +2 -0
  15. package/dist/lib/constants.d.ts.map +1 -0
  16. package/dist/lib/escape-regexp.d.ts.map +1 -1
  17. package/dist/lib/get-file-details.d.ts +2 -1
  18. package/dist/lib/get-file-details.d.ts.map +1 -1
  19. package/dist/lib/get-file-manifest-entries.d.ts.map +1 -1
  20. package/dist/lib/modify-url-prefix-transform.d.ts.map +1 -1
  21. package/dist/lib/no-revision-for-urls-matching-transform.d.ts.map +1 -1
  22. package/dist/lib/transform-manifest.d.ts +2 -1
  23. package/dist/lib/transform-manifest.d.ts.map +1 -1
  24. package/dist/lib/validate-options.d.ts.map +1 -1
  25. package/dist/schema/{assertType.d.ts → assert-type.d.ts} +1 -1
  26. package/dist/schema/assert-type.d.ts.map +1 -0
  27. package/dist/schema/base.d.ts +45 -151
  28. package/dist/schema/base.d.ts.map +1 -1
  29. package/dist/schema/{serwistConfigError.d.ts → error.d.ts} +3 -1
  30. package/dist/schema/error.d.ts.map +1 -0
  31. package/dist/schema/get-manifest.d.ts +72 -0
  32. package/dist/schema/get-manifest.d.ts.map +1 -0
  33. package/dist/schema/glob.d.ts +6 -26
  34. package/dist/schema/glob.d.ts.map +1 -1
  35. package/dist/schema/inject-manifest.d.ts +79 -0
  36. package/dist/schema/inject-manifest.d.ts.map +1 -0
  37. package/dist/schema/manifest-entry.d.ts +7 -0
  38. package/dist/schema/manifest-entry.d.ts.map +1 -0
  39. package/dist/schema/manifest-transform.d.ts +64 -0
  40. package/dist/schema/manifest-transform.d.ts.map +1 -0
  41. package/dist/schema/sw-dest.d.ts +8 -0
  42. package/dist/schema/sw-dest.d.ts.map +1 -0
  43. package/dist/schema/utils.d.ts +10 -0
  44. package/dist/schema/utils.d.ts.map +1 -0
  45. package/dist/types.d.ts +12 -13
  46. package/dist/types.d.ts.map +1 -1
  47. package/package.json +14 -12
  48. package/src/index.schema.ts +10 -8
  49. package/src/index.ts +5 -11
  50. package/src/inject-manifest.ts +2 -1
  51. package/src/lib/additional-precache-entries-transform.ts +1 -2
  52. package/src/lib/constants.ts +1 -0
  53. package/src/lib/get-file-details.ts +3 -4
  54. package/src/lib/get-file-manifest-entries.ts +3 -4
  55. package/src/lib/modify-url-prefix-transform.ts +1 -1
  56. package/src/lib/no-revision-for-urls-matching-transform.ts +1 -1
  57. package/src/lib/rebase-path.ts +1 -1
  58. package/src/lib/transform-manifest.ts +3 -3
  59. package/src/lib/translate-url-to-sourcemap-paths.ts +4 -4
  60. package/src/lib/validate-options.ts +12 -6
  61. package/src/schema/base.ts +11 -13
  62. package/src/schema/error.ts +53 -0
  63. package/src/schema/{getManifest.ts → get-manifest.ts} +7 -6
  64. package/src/schema/glob.ts +15 -20
  65. package/src/schema/inject-manifest.ts +24 -0
  66. package/src/schema/manifest-entry.ts +7 -0
  67. package/src/schema/manifest-transform.ts +17 -0
  68. package/src/schema/{swDest.ts → sw-dest.ts} +7 -11
  69. package/src/schema/utils.ts +27 -0
  70. package/src/types.ts +11 -14
  71. package/dist/chunks/getManifest.js +0 -6
  72. package/dist/chunks/injectManifest.js +0 -23
  73. package/dist/chunks/validationErrorMap.js +0 -54
  74. package/dist/lib/errors.d.ts +0 -47
  75. package/dist/lib/errors.d.ts.map +0 -1
  76. package/dist/lib/get-composite-details.d.ts +0 -3
  77. package/dist/lib/get-composite-details.d.ts.map +0 -1
  78. package/dist/lib/get-file-hash.d.ts +0 -2
  79. package/dist/lib/get-file-hash.d.ts.map +0 -1
  80. package/dist/lib/get-file-size.d.ts +0 -2
  81. package/dist/lib/get-file-size.d.ts.map +0 -1
  82. package/dist/lib/get-string-details.d.ts +0 -3
  83. package/dist/lib/get-string-details.d.ts.map +0 -1
  84. package/dist/lib/get-string-hash.d.ts +0 -3
  85. package/dist/lib/get-string-hash.d.ts.map +0 -1
  86. package/dist/schema/assertType.d.ts.map +0 -1
  87. package/dist/schema/getManifest.d.ts +0 -192
  88. package/dist/schema/getManifest.d.ts.map +0 -1
  89. package/dist/schema/injectManifest.d.ts +0 -213
  90. package/dist/schema/injectManifest.d.ts.map +0 -1
  91. package/dist/schema/manifestEntry.d.ts +0 -15
  92. package/dist/schema/manifestEntry.d.ts.map +0 -1
  93. package/dist/schema/manifestTransform.d.ts +0 -125
  94. package/dist/schema/manifestTransform.d.ts.map +0 -1
  95. package/dist/schema/serwistConfigError.d.ts.map +0 -1
  96. package/dist/schema/swDest.d.ts +0 -16
  97. package/dist/schema/swDest.d.ts.map +0 -1
  98. package/dist/schema/validationErrorMap.d.ts +0 -3
  99. package/dist/schema/validationErrorMap.d.ts.map +0 -1
  100. package/src/lib/errors.ts +0 -93
  101. package/src/lib/get-composite-details.ts +0 -31
  102. package/src/lib/get-file-hash.ts +0 -21
  103. package/src/lib/get-file-size.ts +0 -22
  104. package/src/lib/get-string-details.ts +0 -16
  105. package/src/lib/get-string-hash.ts +0 -15
  106. package/src/schema/injectManifest.ts +0 -25
  107. package/src/schema/manifestEntry.ts +0 -9
  108. package/src/schema/manifestTransform.ts +0 -15
  109. package/src/schema/serwistConfigError.ts +0 -6
  110. package/src/schema/validationErrorMap.ts +0 -36
  111. /package/src/schema/{assertType.ts → assert-type.ts} +0 -0
@@ -1,172 +1,66 @@
1
1
  import { z } from "zod";
2
2
  export declare const basePartial: z.ZodObject<{
3
- additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
3
+ additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
4
4
  integrity: z.ZodOptional<z.ZodString>;
5
5
  revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
6
  url: z.ZodString;
7
- }, "strict", z.ZodTypeAny, {
8
- url: string;
9
- integrity?: string | undefined;
10
- revision?: string | null | undefined;
11
- }, {
12
- url: string;
13
- integrity?: string | undefined;
14
- revision?: string | null | undefined;
15
- }>]>, "many">>;
7
+ }, z.core.$strict>]>>>;
16
8
  disablePrecacheManifest: z.ZodDefault<z.ZodBoolean>;
17
- dontCacheBustURLsMatching: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
18
- manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
9
+ dontCacheBustURLsMatching: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
10
+ manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
11
+ size: z.ZodNumber;
19
12
  integrity: z.ZodOptional<z.ZodString>;
20
13
  revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
14
  url: z.ZodString;
22
- }, {
15
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
16
+ manifest: z.ZodArray<z.ZodObject<{
17
+ size: z.ZodNumber;
18
+ integrity: z.ZodOptional<z.ZodString>;
19
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
+ url: z.ZodString;
21
+ }, z.core.$strip>>;
22
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
23
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
23
24
  size: z.ZodNumber;
24
- }>, "strip", z.ZodTypeAny, {
25
- url: string;
26
- size: number;
27
- integrity?: string | undefined;
28
- revision?: string | null | undefined;
29
- }, {
30
- url: string;
31
- size: number;
32
- integrity?: string | undefined;
33
- revision?: string | null | undefined;
34
- }>, "many">, z.ZodOptional<z.ZodUnknown>], null>, z.ZodUnion<[z.ZodPromise<z.ZodObject<{
35
- manifest: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
25
+ integrity: z.ZodOptional<z.ZodString>;
26
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ url: z.ZodString;
28
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
29
+ manifest: z.ZodArray<z.ZodObject<{
30
+ size: z.ZodNumber;
36
31
  integrity: z.ZodOptional<z.ZodString>;
37
32
  revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
38
33
  url: z.ZodString;
39
- }, {
34
+ }, z.core.$strip>>;
35
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
36
+ }, z.core.$strict>>>, z.ZodTransform<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
37
+ size: z.ZodNumber;
38
+ integrity: z.ZodOptional<z.ZodString>;
39
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
40
+ url: z.ZodString;
41
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
42
+ manifest: z.ZodArray<z.ZodObject<{
40
43
  size: z.ZodNumber;
41
- }>, "strip", z.ZodTypeAny, {
42
- url: string;
43
- size: number;
44
- integrity?: string | undefined;
45
- revision?: string | null | undefined;
46
- }, {
47
- url: string;
48
- size: number;
49
- integrity?: string | undefined;
50
- revision?: string | null | undefined;
51
- }>, "many">;
52
- warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
53
- }, "strict", z.ZodTypeAny, {
54
- manifest: {
55
- url: string;
56
- size: number;
57
- integrity?: string | undefined;
58
- revision?: string | null | undefined;
59
- }[];
60
- warnings?: string[] | undefined;
61
- }, {
62
- manifest: {
63
- url: string;
64
- size: number;
65
- integrity?: string | undefined;
66
- revision?: string | null | undefined;
67
- }[];
68
- warnings?: string[] | undefined;
69
- }>>, z.ZodObject<{
70
- manifest: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
71
44
  integrity: z.ZodOptional<z.ZodString>;
72
45
  revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
73
46
  url: z.ZodString;
74
- }, {
47
+ }, z.core.$strip>>;
48
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
49
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
50
+ size: z.ZodNumber;
51
+ integrity: z.ZodOptional<z.ZodString>;
52
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ url: z.ZodString;
54
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
55
+ manifest: z.ZodArray<z.ZodObject<{
75
56
  size: z.ZodNumber;
76
- }>, "strip", z.ZodTypeAny, {
77
- url: string;
78
- size: number;
79
- integrity?: string | undefined;
80
- revision?: string | null | undefined;
81
- }, {
82
- url: string;
83
- size: number;
84
- integrity?: string | undefined;
85
- revision?: string | null | undefined;
86
- }>, "many">;
87
- warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
88
- }, "strict", z.ZodTypeAny, {
89
- manifest: {
90
- url: string;
91
- size: number;
92
- integrity?: string | undefined;
93
- revision?: string | null | undefined;
94
- }[];
95
- warnings?: string[] | undefined;
96
- }, {
97
- manifest: {
98
- url: string;
99
- size: number;
100
- integrity?: string | undefined;
101
- revision?: string | null | undefined;
102
- }[];
103
- warnings?: string[] | undefined;
104
- }>]>>, "many">>;
57
+ integrity: z.ZodOptional<z.ZodString>;
58
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
+ url: z.ZodString;
60
+ }, z.core.$strip>>;
61
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
62
+ }, z.core.$strict>>>>>>;
105
63
  maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
106
64
  modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
107
- }, "strict", z.ZodTypeAny, {
108
- disablePrecacheManifest: boolean;
109
- maximumFileSizeToCacheInBytes: number;
110
- additionalPrecacheEntries?: (string | {
111
- url: string;
112
- integrity?: string | undefined;
113
- revision?: string | null | undefined;
114
- })[] | undefined;
115
- dontCacheBustURLsMatching?: RegExp | undefined;
116
- manifestTransforms?: ((args_0: {
117
- url: string;
118
- size: number;
119
- integrity?: string | undefined;
120
- revision?: string | null | undefined;
121
- }[], args_1: unknown) => {
122
- manifest: {
123
- url: string;
124
- size: number;
125
- integrity?: string | undefined;
126
- revision?: string | null | undefined;
127
- }[];
128
- warnings?: string[] | undefined;
129
- } | Promise<{
130
- manifest: {
131
- url: string;
132
- size: number;
133
- integrity?: string | undefined;
134
- revision?: string | null | undefined;
135
- }[];
136
- warnings?: string[] | undefined;
137
- }>)[] | undefined;
138
- modifyURLPrefix?: Record<string, string> | undefined;
139
- }, {
140
- disablePrecacheManifest?: boolean | undefined;
141
- maximumFileSizeToCacheInBytes?: number | undefined;
142
- additionalPrecacheEntries?: (string | {
143
- url: string;
144
- integrity?: string | undefined;
145
- revision?: string | null | undefined;
146
- })[] | undefined;
147
- dontCacheBustURLsMatching?: RegExp | undefined;
148
- manifestTransforms?: ((args_0: {
149
- url: string;
150
- size: number;
151
- integrity?: string | undefined;
152
- revision?: string | null | undefined;
153
- }[], args_1: unknown) => {
154
- manifest: {
155
- url: string;
156
- size: number;
157
- integrity?: string | undefined;
158
- revision?: string | null | undefined;
159
- }[];
160
- warnings?: string[] | undefined;
161
- } | Promise<{
162
- manifest: {
163
- url: string;
164
- size: number;
165
- integrity?: string | undefined;
166
- revision?: string | null | undefined;
167
- }[];
168
- warnings?: string[] | undefined;
169
- }>)[] | undefined;
170
- modifyURLPrefix?: Record<string, string> | undefined;
171
- }>;
65
+ }, z.core.$strict>;
172
66
  //# sourceMappingURL=base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/schema/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASmC,CAAC"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/schema/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAOtB,CAAC"}
@@ -1,7 +1,9 @@
1
+ import type { z } from "zod";
1
2
  export declare class SerwistConfigError extends Error {
2
3
  constructor({ moduleName, message }: {
3
4
  moduleName?: string;
4
5
  message?: string;
5
6
  });
6
7
  }
7
- //# sourceMappingURL=serwistConfigError.d.ts.map
8
+ export declare const validationErrorMap: z.core.$ZodErrorMap;
9
+ //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/schema/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,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;AAyBD,eAAO,MAAM,kBAAkB,EAAE,CAAC,CAAC,IAAI,CAAC,YAoBvC,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { z } from "zod";
2
+ export declare const getManifestOptions: z.ZodObject<{
3
+ globDirectory: z.ZodString;
4
+ globFollow: z.ZodDefault<z.ZodBoolean>;
5
+ globIgnores: z.ZodDefault<z.ZodArray<z.ZodString>>;
6
+ globPatterns: z.ZodDefault<z.ZodArray<z.ZodString>>;
7
+ globStrict: z.ZodDefault<z.ZodBoolean>;
8
+ templatedURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
9
+ additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
10
+ integrity: z.ZodOptional<z.ZodString>;
11
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ url: z.ZodString;
13
+ }, z.core.$strict>]>>>;
14
+ disablePrecacheManifest: z.ZodDefault<z.ZodBoolean>;
15
+ dontCacheBustURLsMatching: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
16
+ manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
17
+ size: z.ZodNumber;
18
+ integrity: z.ZodOptional<z.ZodString>;
19
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
+ url: z.ZodString;
21
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
22
+ manifest: z.ZodArray<z.ZodObject<{
23
+ size: z.ZodNumber;
24
+ integrity: z.ZodOptional<z.ZodString>;
25
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ url: z.ZodString;
27
+ }, z.core.$strip>>;
28
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
29
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
30
+ size: z.ZodNumber;
31
+ integrity: z.ZodOptional<z.ZodString>;
32
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
+ url: z.ZodString;
34
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
35
+ manifest: z.ZodArray<z.ZodObject<{
36
+ size: z.ZodNumber;
37
+ integrity: z.ZodOptional<z.ZodString>;
38
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
+ url: z.ZodString;
40
+ }, z.core.$strip>>;
41
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
42
+ }, z.core.$strict>>>, z.ZodTransform<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
43
+ size: z.ZodNumber;
44
+ integrity: z.ZodOptional<z.ZodString>;
45
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
+ url: z.ZodString;
47
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
48
+ manifest: z.ZodArray<z.ZodObject<{
49
+ size: z.ZodNumber;
50
+ integrity: z.ZodOptional<z.ZodString>;
51
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
+ url: z.ZodString;
53
+ }, z.core.$strip>>;
54
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
55
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
56
+ size: z.ZodNumber;
57
+ integrity: z.ZodOptional<z.ZodString>;
58
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
+ url: z.ZodString;
60
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
61
+ manifest: z.ZodArray<z.ZodObject<{
62
+ size: z.ZodNumber;
63
+ integrity: z.ZodOptional<z.ZodString>;
64
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
65
+ url: z.ZodString;
66
+ }, z.core.$strip>>;
67
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
68
+ }, z.core.$strict>>>>>>;
69
+ maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
70
+ modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
71
+ }, z.core.$strict>;
72
+ //# sourceMappingURL=get-manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-manifest.d.ts","sourceRoot":"","sources":["../../src/schema/get-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAI7B,CAAC"}
@@ -1,35 +1,15 @@
1
1
  import { z } from "zod";
2
2
  export declare const globPartial: z.ZodObject<{
3
3
  globFollow: z.ZodDefault<z.ZodBoolean>;
4
- globIgnores: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5
- globPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4
+ globIgnores: z.ZodDefault<z.ZodArray<z.ZodString>>;
5
+ globPatterns: z.ZodDefault<z.ZodArray<z.ZodString>>;
6
6
  globStrict: z.ZodDefault<z.ZodBoolean>;
7
- templatedURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
8
- }, "strict", z.ZodTypeAny, {
9
- globFollow: boolean;
10
- globIgnores: string[];
11
- globPatterns: string[];
12
- globStrict: boolean;
13
- templatedURLs?: Record<string, string | string[]> | undefined;
14
- }, {
15
- globFollow?: boolean | undefined;
16
- globIgnores?: string[] | undefined;
17
- globPatterns?: string[] | undefined;
18
- globStrict?: boolean | undefined;
19
- templatedURLs?: Record<string, string | string[]> | undefined;
20
- }>;
7
+ templatedURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
8
+ }, z.core.$strict>;
21
9
  export declare const optionalGlobDirectoryPartial: z.ZodObject<{
22
10
  globDirectory: z.ZodOptional<z.ZodString>;
23
- }, "strict", z.ZodTypeAny, {
24
- globDirectory?: string | undefined;
25
- }, {
26
- globDirectory?: string | undefined;
27
- }>;
11
+ }, z.core.$strict>;
28
12
  export declare const requiredGlobDirectoryPartial: z.ZodObject<{
29
13
  globDirectory: z.ZodString;
30
- }, "strict", z.ZodTypeAny, {
31
- globDirectory: string;
32
- }, {
33
- globDirectory: string;
34
- }>;
14
+ }, z.core.$strict>;
35
15
  //# sourceMappingURL=glob.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/schema/glob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;EAQmC,CAAC;AAE5D,eAAO,MAAM,4BAA4B;;;;;;EAImC,CAAC;AAI7E,eAAO,MAAM,4BAA4B;;;;;;EAImC,CAAC"}
1
+ {"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/schema/glob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,WAAW;;;;;;kBAMtB,CAAC;AAEH,eAAO,MAAM,4BAA4B;;kBAEvC,CAAC;AAIH,eAAO,MAAM,4BAA4B;;kBAEvC,CAAC"}
@@ -0,0 +1,79 @@
1
+ import { z } from "zod";
2
+ export declare const baseInjectPartial: z.ZodObject<{
3
+ injectionPoint: z.ZodPrefault<z.ZodString>;
4
+ swSrc: z.ZodString;
5
+ }, z.core.$strict>;
6
+ export declare const injectManifestOptions: z.ZodObject<{
7
+ globDirectory: z.ZodString;
8
+ swDest: z.ZodString;
9
+ injectionPoint: z.ZodPrefault<z.ZodString>;
10
+ swSrc: z.ZodString;
11
+ globFollow: z.ZodDefault<z.ZodBoolean>;
12
+ globIgnores: z.ZodDefault<z.ZodArray<z.ZodString>>;
13
+ globPatterns: z.ZodDefault<z.ZodArray<z.ZodString>>;
14
+ globStrict: z.ZodDefault<z.ZodBoolean>;
15
+ templatedURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
16
+ additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
17
+ integrity: z.ZodOptional<z.ZodString>;
18
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ url: z.ZodString;
20
+ }, z.core.$strict>]>>>;
21
+ disablePrecacheManifest: z.ZodDefault<z.ZodBoolean>;
22
+ dontCacheBustURLsMatching: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
23
+ manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
24
+ size: z.ZodNumber;
25
+ integrity: z.ZodOptional<z.ZodString>;
26
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ url: z.ZodString;
28
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
29
+ manifest: z.ZodArray<z.ZodObject<{
30
+ size: z.ZodNumber;
31
+ integrity: z.ZodOptional<z.ZodString>;
32
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
+ url: z.ZodString;
34
+ }, z.core.$strip>>;
35
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
36
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
37
+ size: z.ZodNumber;
38
+ integrity: z.ZodOptional<z.ZodString>;
39
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
40
+ url: z.ZodString;
41
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
42
+ manifest: z.ZodArray<z.ZodObject<{
43
+ size: z.ZodNumber;
44
+ integrity: z.ZodOptional<z.ZodString>;
45
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
+ url: z.ZodString;
47
+ }, z.core.$strip>>;
48
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
49
+ }, z.core.$strict>>>, z.ZodTransform<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
50
+ size: z.ZodNumber;
51
+ integrity: z.ZodOptional<z.ZodString>;
52
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ url: z.ZodString;
54
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
55
+ manifest: z.ZodArray<z.ZodObject<{
56
+ size: z.ZodNumber;
57
+ integrity: z.ZodOptional<z.ZodString>;
58
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
+ url: z.ZodString;
60
+ }, z.core.$strip>>;
61
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
62
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
63
+ size: z.ZodNumber;
64
+ integrity: z.ZodOptional<z.ZodString>;
65
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
+ url: z.ZodString;
67
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
68
+ manifest: z.ZodArray<z.ZodObject<{
69
+ size: z.ZodNumber;
70
+ integrity: z.ZodOptional<z.ZodString>;
71
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
72
+ url: z.ZodString;
73
+ }, z.core.$strip>>;
74
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
75
+ }, z.core.$strict>>>>>>;
76
+ maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
77
+ modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
78
+ }, z.core.$strict>;
79
+ //# sourceMappingURL=inject-manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inject-manifest.d.ts","sourceRoot":"","sources":["../../src/schema/inject-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,iBAAiB;;;kBAG5B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAMhC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { z } from "zod";
2
+ export declare const manifestEntry: z.ZodObject<{
3
+ integrity: z.ZodOptional<z.ZodString>;
4
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
+ url: z.ZodString;
6
+ }, z.core.$strict>;
7
+ //# sourceMappingURL=manifest-entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-entry.d.ts","sourceRoot":"","sources":["../../src/schema/manifest-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,aAAa;;;;kBAIxB,CAAC"}
@@ -0,0 +1,64 @@
1
+ import { z } from "zod";
2
+ export declare const manifestTransformResult: z.ZodObject<{
3
+ manifest: z.ZodArray<z.ZodObject<{
4
+ size: z.ZodNumber;
5
+ integrity: z.ZodOptional<z.ZodString>;
6
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ url: z.ZodString;
8
+ }, z.core.$strip>>;
9
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
10
+ }, z.core.$strict>;
11
+ export declare const manifestTransform: z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
12
+ size: z.ZodNumber;
13
+ integrity: z.ZodOptional<z.ZodString>;
14
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ url: z.ZodString;
16
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
17
+ manifest: z.ZodArray<z.ZodObject<{
18
+ size: z.ZodNumber;
19
+ integrity: z.ZodOptional<z.ZodString>;
20
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
+ url: z.ZodString;
22
+ }, z.core.$strip>>;
23
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
24
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
25
+ size: z.ZodNumber;
26
+ integrity: z.ZodOptional<z.ZodString>;
27
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
+ url: z.ZodString;
29
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
30
+ manifest: z.ZodArray<z.ZodObject<{
31
+ size: z.ZodNumber;
32
+ integrity: z.ZodOptional<z.ZodString>;
33
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
+ url: z.ZodString;
35
+ }, z.core.$strip>>;
36
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
37
+ }, z.core.$strict>>>, z.ZodTransform<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
38
+ size: z.ZodNumber;
39
+ integrity: z.ZodOptional<z.ZodString>;
40
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
41
+ url: z.ZodString;
42
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
43
+ manifest: z.ZodArray<z.ZodObject<{
44
+ size: z.ZodNumber;
45
+ integrity: z.ZodOptional<z.ZodString>;
46
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
+ url: z.ZodString;
48
+ }, z.core.$strip>>;
49
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
50
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
51
+ size: z.ZodNumber;
52
+ integrity: z.ZodOptional<z.ZodString>;
53
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
+ url: z.ZodString;
55
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
56
+ manifest: z.ZodArray<z.ZodObject<{
57
+ size: z.ZodNumber;
58
+ integrity: z.ZodOptional<z.ZodString>;
59
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ url: z.ZodString;
61
+ }, z.core.$strip>>;
62
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
63
+ }, z.core.$strict>>>>;
64
+ //# sourceMappingURL=manifest-transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-transform.d.ts","sourceRoot":"","sources":["../../src/schema/manifest-transform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,uBAAuB;;;;;;;;kBAGlC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAG5B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+ export declare const optionalSwDestPartial: z.ZodObject<{
3
+ swDest: z.ZodOptional<z.ZodString>;
4
+ }, z.core.$strict>;
5
+ export declare const requiredSwDestPartial: z.ZodObject<{
6
+ swDest: z.ZodString;
7
+ }, z.core.$strict>;
8
+ //# sourceMappingURL=sw-dest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sw-dest.d.ts","sourceRoot":"","sources":["../../src/schema/sw-dest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,qBAAqB;;kBAEhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;kBAEhC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { z } from "zod";
2
+ export declare const fn: <TInput extends [z.ZodType, ...z.ZodType[]], TOutput extends z.ZodType>({ input, output }: {
3
+ input: TInput;
4
+ output: TOutput;
5
+ }) => z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<TInput, null>, TOutput>, z.core.$InferInnerFunctionType<z.ZodTuple<TInput, null>, TOutput>>, z.ZodTransform<(...args: TInput extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [.../*elided*/ any, (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]>; } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]>; } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]>; } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]>; } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]>; } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]>; } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]>; } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]>; } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]>; } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]>; } : [], (z.core.input<Tail> | undefined)?] : { [k_1 in keyof TInput]: z.core.input<TInput[k_1]>; } : []) => z.core.input<TOutput> extends z.core.output<TOutput> ? z.core.output<TOutput> & z.core.input<TOutput> : z.core.output<TOutput>, z.core.$InferInnerFunctionType<z.ZodTuple<TInput, null>, TOutput>>>;
6
+ export declare const asyncFn: <TInput extends [z.ZodType, ...z.ZodType[]], TOutput extends z.ZodType>({ input, output, }: {
7
+ input: TInput;
8
+ output: TOutput;
9
+ }) => z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput>>, z.ZodTransform<Awaited<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput> extends infer T ? T extends z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput> ? T extends z.core.$InferOuterFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput> ? T : z.core.$InferOuterFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput> : never : never>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput>>>;
10
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/schema/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,EAAE,GAAI,MAAM,SAAS,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,SAAS,CAAC,CAAC,OAAO,EAAE,mBAAmB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,uiGAQ9I,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,MAAM,SAAS,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,SAAS,CAAC,CAAC,OAAO,EAAE,oBAG5F;IACD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;CACjB,umBAQA,CAAC"}
package/dist/types.d.ts CHANGED
@@ -1,11 +1,18 @@
1
- import type { Require, Prettify } from "@serwist/utils";
1
+ import type { MaybePromise, Prettify, Require } from "@serwist/utils";
2
2
  import type { PackageJson } from "type-fest";
3
3
  import type { z } from "zod";
4
- import type { manifestEntry } from "./schema/manifestEntry.js";
5
- import type { manifestTransform, manifestTransformResult } from "./schema/manifestTransform.js";
4
+ import type { manifestEntry } from "./schema/manifest-entry.js";
5
+ import type { manifestTransformResult } from "./schema/manifest-transform.js";
6
6
  export type ManifestEntry = z.input<typeof manifestEntry>;
7
7
  export type ManifestTransformResult = z.input<typeof manifestTransformResult>;
8
- export type ManifestTransform = z.input<typeof manifestTransform>;
8
+ export type ManifestTransform = (entries: (ManifestEntry & {
9
+ size: number;
10
+ })[], params?: unknown) => MaybePromise<{
11
+ manifest: (ManifestEntry & {
12
+ size: number;
13
+ })[];
14
+ warnings?: string[] | undefined;
15
+ }>;
9
16
  export interface BasePartial {
10
17
  /**
11
18
  * A list of entries to be precached, in addition to any entries that are
@@ -104,7 +111,7 @@ export interface GlobPartial {
104
111
  * [`node-glob`'s Glob Primer](https://github.com/isaacs/node-glob#glob-primer).
105
112
  * @default
106
113
  * ```
107
- * ["**\/*.{js,css,html}"]
114
+ * ["**\/*.{js,css,html,ico,apng,png,avif,jpg,jpeg,jfif,pjpeg,pjp,gif,svg,webp,json,webmanifest}"]
108
115
  * ```
109
116
  */
110
117
  globPatterns?: string[];
@@ -174,14 +181,6 @@ export interface GetManifestResult {
174
181
  export type BuildResult = Omit<GetManifestResult, "manifestEntries"> & {
175
182
  filePaths: string[];
176
183
  };
177
- /**
178
- * @private
179
- */
180
- export interface FileDetails {
181
- file: string;
182
- hash: string | null;
183
- size: number;
184
- }
185
184
  /**
186
185
  * @private
187
186
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,E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