@serwist/build 9.5.6 → 9.5.8

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 (98) hide show
  1. package/dist/chunks/constants-BLOVm9H2.js +6 -0
  2. package/dist/chunks/constants-BLOVm9H2.js.map +1 -0
  3. package/dist/chunks/error-Cl4d1Wf-.js +31 -0
  4. package/dist/chunks/error-Cl4d1Wf-.js.map +1 -0
  5. package/dist/chunks/get-manifest-De0D0LAJ.js +14 -0
  6. package/dist/chunks/get-manifest-De0D0LAJ.js.map +1 -0
  7. package/dist/chunks/glob-B4_meZ_o.js +67 -0
  8. package/dist/chunks/glob-B4_meZ_o.js.map +1 -0
  9. package/dist/chunks/inject-manifest-DNqDY-04.js +27 -0
  10. package/dist/chunks/inject-manifest-DNqDY-04.js.map +1 -0
  11. package/dist/chunks/manifest-transform-BCUeQ0-V.d.ts +75 -0
  12. package/dist/chunks/manifest-transform-BCUeQ0-V.d.ts.map +1 -0
  13. package/dist/chunks/rolldown-runtime-CzwdidQP.js +13 -0
  14. package/dist/index.d.mts +475 -0
  15. package/dist/index.d.mts.map +1 -0
  16. package/dist/index.mjs +594 -0
  17. package/dist/index.mjs.map +1 -0
  18. package/dist/index.schema.d.mts +278 -0
  19. package/dist/index.schema.d.mts.map +1 -0
  20. package/dist/index.schema.mjs +5 -0
  21. package/package.json +15 -16
  22. package/src/lib/replace-and-update-source-map.ts +0 -1
  23. package/dist/chunks/constants.js +0 -59
  24. package/dist/chunks/get-manifest.js +0 -11
  25. package/dist/chunks/glob.js +0 -75
  26. package/dist/chunks/inject-manifest.js +0 -29
  27. package/dist/get-manifest.d.ts +0 -19
  28. package/dist/get-manifest.d.ts.map +0 -1
  29. package/dist/index.d.ts +0 -24
  30. package/dist/index.d.ts.map +0 -1
  31. package/dist/index.js +0 -614
  32. package/dist/index.schema.d.ts +0 -13
  33. package/dist/index.schema.d.ts.map +0 -1
  34. package/dist/index.schema.js +0 -9
  35. package/dist/inject-manifest.d.ts +0 -29
  36. package/dist/inject-manifest.d.ts.map +0 -1
  37. package/dist/lib/additional-precache-entries-transform.d.ts +0 -12
  38. package/dist/lib/additional-precache-entries-transform.d.ts.map +0 -1
  39. package/dist/lib/constants.d.ts +0 -2
  40. package/dist/lib/constants.d.ts.map +0 -1
  41. package/dist/lib/errors.d.ts +0 -46
  42. package/dist/lib/errors.d.ts.map +0 -1
  43. package/dist/lib/escape-regexp.d.ts +0 -2
  44. package/dist/lib/escape-regexp.d.ts.map +0 -1
  45. package/dist/lib/get-composite-details.d.ts +0 -3
  46. package/dist/lib/get-composite-details.d.ts.map +0 -1
  47. package/dist/lib/get-file-details.d.ts +0 -9
  48. package/dist/lib/get-file-details.d.ts.map +0 -1
  49. package/dist/lib/get-file-hash.d.ts +0 -2
  50. package/dist/lib/get-file-hash.d.ts.map +0 -1
  51. package/dist/lib/get-file-manifest-entries.d.ts +0 -3
  52. package/dist/lib/get-file-manifest-entries.d.ts.map +0 -1
  53. package/dist/lib/get-file-size.d.ts +0 -2
  54. package/dist/lib/get-file-size.d.ts.map +0 -1
  55. package/dist/lib/get-source-map-url.d.ts +0 -2
  56. package/dist/lib/get-source-map-url.d.ts.map +0 -1
  57. package/dist/lib/get-string-details.d.ts +0 -3
  58. package/dist/lib/get-string-details.d.ts.map +0 -1
  59. package/dist/lib/get-string-hash.d.ts +0 -3
  60. package/dist/lib/get-string-hash.d.ts.map +0 -1
  61. package/dist/lib/maximum-size-transform.d.ts +0 -3
  62. package/dist/lib/maximum-size-transform.d.ts.map +0 -1
  63. package/dist/lib/modify-url-prefix-transform.d.ts +0 -5
  64. package/dist/lib/modify-url-prefix-transform.d.ts.map +0 -1
  65. package/dist/lib/no-revision-for-urls-matching-transform.d.ts +0 -3
  66. package/dist/lib/no-revision-for-urls-matching-transform.d.ts.map +0 -1
  67. package/dist/lib/rebase-path.d.ts +0 -5
  68. package/dist/lib/rebase-path.d.ts.map +0 -1
  69. package/dist/lib/replace-and-update-source-map.d.ts +0 -42
  70. package/dist/lib/replace-and-update-source-map.d.ts.map +0 -1
  71. package/dist/lib/transform-manifest.d.ts +0 -61
  72. package/dist/lib/transform-manifest.d.ts.map +0 -1
  73. package/dist/lib/translate-url-to-sourcemap-paths.d.ts +0 -6
  74. package/dist/lib/translate-url-to-sourcemap-paths.d.ts.map +0 -1
  75. package/dist/lib/validate-options.d.ts +0 -4
  76. package/dist/lib/validate-options.d.ts.map +0 -1
  77. package/dist/schema/assert-type.d.ts +0 -4
  78. package/dist/schema/assert-type.d.ts.map +0 -1
  79. package/dist/schema/base.d.ts +0 -66
  80. package/dist/schema/base.d.ts.map +0 -1
  81. package/dist/schema/error.d.ts +0 -9
  82. package/dist/schema/error.d.ts.map +0 -1
  83. package/dist/schema/get-manifest.d.ts +0 -72
  84. package/dist/schema/get-manifest.d.ts.map +0 -1
  85. package/dist/schema/glob.d.ts +0 -15
  86. package/dist/schema/glob.d.ts.map +0 -1
  87. package/dist/schema/inject-manifest.d.ts +0 -79
  88. package/dist/schema/inject-manifest.d.ts.map +0 -1
  89. package/dist/schema/manifest-entry.d.ts +0 -7
  90. package/dist/schema/manifest-entry.d.ts.map +0 -1
  91. package/dist/schema/manifest-transform.d.ts +0 -64
  92. package/dist/schema/manifest-transform.d.ts.map +0 -1
  93. package/dist/schema/sw-dest.d.ts +0 -8
  94. package/dist/schema/sw-dest.d.ts.map +0 -1
  95. package/dist/schema/utils.d.ts +0 -10
  96. package/dist/schema/utils.d.ts.map +0 -1
  97. package/dist/types.d.ts +0 -204
  98. package/dist/types.d.ts.map +0 -1
@@ -1,64 +0,0 @@
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.$InferOuterFunctionTypeAsync<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
@@ -1 +0,0 @@
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"}
@@ -1,8 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,10 +0,0 @@
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
@@ -1 +0,0 @@
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 DELETED
@@ -1,204 +0,0 @@
1
- import type { MaybePromise, Require } from "@serwist/utils";
2
- import type { PackageJson } from "type-fest";
3
- import type { z } from "zod";
4
- import type { manifestEntry } from "./schema/manifest-entry.js";
5
- import type { manifestTransformResult } from "./schema/manifest-transform.js";
6
- export type ManifestEntry = z.input<typeof manifestEntry>;
7
- export type ManifestTransformResult = z.input<typeof manifestTransformResult>;
8
- export type ManifestTransform = (entries: (ManifestEntry & {
9
- size: number;
10
- })[], params?: unknown) => MaybePromise<ManifestTransformResult>;
11
- export type ResolvedManifestTransform = (entries: (ManifestEntry & {
12
- size: number;
13
- })[], params?: unknown) => Promise<ManifestTransformResult>;
14
- export interface BasePartial {
15
- /**
16
- * A list of entries to be precached, in addition to any entries that are
17
- * generated as part of the build configuration.
18
- */
19
- additionalPrecacheEntries?: (string | ManifestEntry)[];
20
- /**
21
- * Whether the precache manifest should be set to `undefined`. Essentially whether `@serwist/build` should
22
- * be disabled. Mostly useful when you want it to only check if the provided options are valid.
23
- * @default false
24
- */
25
- disablePrecacheManifest?: boolean;
26
- /**
27
- * Assets that match this will be assumed to be uniquely versioned via their
28
- * URL, and exempted from the normal HTTP cache-busting that's done when
29
- * populating the precache. While not required, it's recommended that if your
30
- * existing build process already inserts a `[hash]` value into each filename,
31
- * you provide a RegExp that will detect that, as it will reduce the bandwidth
32
- * consumed when precaching.
33
- */
34
- dontCacheBustURLsMatching?: RegExp;
35
- /**
36
- * One or more functions which will be applied sequentially against the
37
- * generated manifest. If `modifyURLPrefix` or `dontCacheBustURLsMatching` are
38
- * also specified, their corresponding transformations will be applied first.
39
- */
40
- manifestTransforms?: ManifestTransform[];
41
- /**
42
- * Determines the maximum size of files that will be precached. This prevents
43
- * you from inadvertently precaching very large files that might have accidentally
44
- * matched one of your patterns.
45
- * @default 2097152
46
- */
47
- maximumFileSizeToCacheInBytes?: number;
48
- /**
49
- * An object mapping string prefixes to replacement string values. This can be
50
- * used to, e.g., remove or add a path prefix from a manifest entry if your
51
- * web hosting setup doesn't match your local filesystem setup. As an
52
- * alternative with more flexibility, you can use the `manifestTransforms`
53
- * option and provide a function that modifies the entries in the manifest
54
- * using whatever logic you provide.
55
- *
56
- * Example usage:
57
- *
58
- * ```
59
- * // Replace a '/dist/' prefix with '/', and also prepend
60
- * // '/static' to every URL.
61
- * modifyURLPrefix: {
62
- * '/dist/': '/',
63
- * '': '/static',
64
- * }
65
- * ```
66
- */
67
- modifyURLPrefix?: {
68
- [key: string]: string;
69
- };
70
- }
71
- export interface BaseResolved extends Require<BasePartial, "disablePrecacheManifest" | "maximumFileSizeToCacheInBytes"> {
72
- manifestTransforms?: ResolvedManifestTransform[];
73
- }
74
- export interface RequiredGlobDirectoryPartial {
75
- /**
76
- * The local directory you wish to match `globPatterns` against. The path is
77
- * relative to the current directory.
78
- */
79
- globDirectory: string;
80
- }
81
- export type RequiredGlobDirectoryResolved = RequiredGlobDirectoryPartial;
82
- export interface OptionalGlobDirectoryPartial {
83
- /**
84
- * The local directory you wish to match `globPatterns` against. The path is
85
- * relative to the current directory.
86
- */
87
- globDirectory?: string;
88
- }
89
- export type OptionalGlobDirectoryResolved = OptionalGlobDirectoryPartial;
90
- export interface GlobPartial {
91
- /**
92
- * Determines whether or not symlinks are followed when generating the
93
- * precache manifest. For more information, see the definition of `follow` in
94
- * [`node-glob`'s documentation](https://github.com/isaacs/node-glob#options).
95
- * @default true
96
- */
97
- globFollow?: boolean;
98
- /**
99
- * A set of patterns matching files to always exclude when generating the
100
- * precache manifest. For more information, see the definition of `ignore` in
101
- * [`node-glob`'s documentation](https://github.com/isaacs/node-glob#options).
102
- * @default
103
- * ```
104
- * ["**\/node_modules\/**\/*"]
105
- * ```
106
- */
107
- globIgnores?: string[];
108
- /**
109
- * Files matching any of these patterns will be included in the precache
110
- * manifest. For more information, see
111
- * [`node-glob`'s Glob Primer](https://github.com/isaacs/node-glob#glob-primer).
112
- * @default
113
- * ```
114
- * ["**\/*.{js,css,html}"]
115
- * ```
116
- */
117
- globPatterns?: string[];
118
- /**
119
- * If true, an error reading a directory when generating a precache manifest
120
- * will cause the build to fail. If false, the problematic directory will be
121
- * skipped. For more information, see the definition of `strict` in
122
- * [`node-glob`'s documentation](https://github.com/isaacs/node-glob#options).
123
- * @default true
124
- */
125
- globStrict?: boolean;
126
- /**
127
- * If a URL is rendered based on some server-side logic, its contents may
128
- * depend on multiple files or on some other unique string value. The keys in
129
- * this object are server-rendered URLs. If the values are an array of
130
- * strings, they will be interpreted as glob patterns, and the contents of
131
- * any files matching the patterns will be used to uniquely version the URL.
132
- * If used with a single string, it will be interpreted as unique versioning
133
- * information that you've generated for a given URL.
134
- */
135
- templatedURLs?: {
136
- [key: string]: string | string[];
137
- };
138
- }
139
- export type GlobResolved = Require<GlobPartial, "globFollow" | "globIgnores" | "globPatterns" | "globStrict">;
140
- export interface InjectPartial {
141
- /**
142
- * The string to find inside of the `swSrc` file. Once found, it will be
143
- * replaced by the generated precache manifest.
144
- * @default "self.__SW_MANIFEST"
145
- */
146
- injectionPoint?: string;
147
- /**
148
- * The path to the service worker file that will be read during
149
- * the build process, relative to the current working directory.
150
- */
151
- swSrc: string;
152
- }
153
- export type InjectResolved = Require<InjectPartial, "injectionPoint">;
154
- export interface RequiredSwDestPartial {
155
- /**
156
- * The path and filename of the service worker file that will be created by
157
- * the build process. It must end in '.js'.
158
- */
159
- swDest: string;
160
- }
161
- export type RequiredSwDestResolved = RequiredSwDestPartial;
162
- export interface OptionalSwDestPartial {
163
- /**
164
- * The path and filename of the service worker file that will be created by
165
- * the build process. It must end in '.js'. If omitted, the path will be
166
- * based on `swSrc`.
167
- */
168
- swDest?: string;
169
- }
170
- export type OptionalSwDestResolved = OptionalSwDestPartial;
171
- export type GetManifestOptions = BasePartial & GlobPartial & RequiredGlobDirectoryPartial;
172
- export type GetManifestOptionsComplete = BaseResolved & GlobResolved & RequiredGlobDirectoryResolved;
173
- export type InjectManifestOptions = BasePartial & GlobPartial & InjectPartial & RequiredSwDestPartial & RequiredGlobDirectoryPartial;
174
- export type InjectManifestOptionsComplete = BaseResolved & GlobResolved & InjectResolved & RequiredSwDestResolved & RequiredGlobDirectoryResolved;
175
- export interface GetManifestResult {
176
- count: number;
177
- manifestEntries: ManifestEntry[] | undefined;
178
- size: number;
179
- warnings: string[];
180
- }
181
- export type BuildResult = Omit<GetManifestResult, "manifestEntries"> & {
182
- filePaths: string[];
183
- };
184
- /**
185
- * @private
186
- */
187
- export interface FileDetails {
188
- file: string;
189
- hash: string | null;
190
- size: number;
191
- }
192
- /**
193
- * @private
194
- */
195
- export type BuildType = "dev" | "prod";
196
- /**
197
- * @private
198
- */
199
- export type SerwistPackageJSON = PackageJson;
200
- /**
201
- * @private
202
- */
203
- export type MethodNames = "GetManifest" | "InjectManifest" | "WebpackInjectManifest" | "ViteInjectManifest";
204
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAE9E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,CAAC,aAAa,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,YAAY,CAAC,uBAAuB,CAAC,CAAC;AAE3I,MAAM,MAAM,yBAAyB,GAAG,CAAC,OAAO,EAAE,CAAC,aAAa,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAE9I,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,yBAAyB,CAAC,EAAE,CAAC,MAAM,GAAG,aAAa,CAAC,EAAE,CAAC;IACvD;;;;OAIG;IACH,uBAAuB,CAAC,EA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