@serwist/build 9.1.0-preview.0 → 9.1.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.
- package/dist/chunks/error.js +55 -0
- package/dist/chunks/get-manifest.js +10 -0
- package/dist/chunks/glob.js +43 -25
- package/dist/chunks/inject-manifest.js +29 -0
- package/dist/get-manifest.d.ts.map +1 -1
- package/dist/index.js +11 -11
- package/dist/index.schema.d.ts +9 -9
- package/dist/index.schema.d.ts.map +1 -1
- package/dist/index.schema.js +4 -4
- package/dist/inject-manifest.d.ts.map +1 -1
- package/dist/lib/additional-precache-entries-transform.d.ts.map +1 -1
- package/dist/lib/escape-regexp.d.ts.map +1 -1
- package/dist/lib/get-composite-details.d.ts.map +1 -1
- package/dist/lib/get-file-details.d.ts.map +1 -1
- package/dist/lib/get-file-hash.d.ts.map +1 -1
- package/dist/lib/get-file-manifest-entries.d.ts.map +1 -1
- package/dist/lib/get-file-size.d.ts.map +1 -1
- package/dist/lib/get-string-details.d.ts.map +1 -1
- package/dist/lib/transform-manifest.d.ts.map +1 -1
- package/dist/lib/validate-options.d.ts.map +1 -1
- package/dist/schema/{assertType.d.ts → assert-type.d.ts} +1 -1
- package/dist/schema/assert-type.d.ts.map +1 -0
- package/dist/schema/base.d.ts +45 -151
- package/dist/schema/base.d.ts.map +1 -1
- package/dist/schema/{serwistConfigError.d.ts → error.d.ts} +3 -1
- package/dist/schema/error.d.ts.map +1 -0
- package/dist/schema/get-manifest.d.ts +72 -0
- package/dist/schema/get-manifest.d.ts.map +1 -0
- package/dist/schema/glob.d.ts +6 -26
- package/dist/schema/glob.d.ts.map +1 -1
- package/dist/schema/inject-manifest.d.ts +79 -0
- package/dist/schema/inject-manifest.d.ts.map +1 -0
- package/dist/schema/manifest-entry.d.ts +7 -0
- package/dist/schema/manifest-entry.d.ts.map +1 -0
- package/dist/schema/manifest-transform.d.ts +64 -0
- package/dist/schema/manifest-transform.d.ts.map +1 -0
- package/dist/schema/sw-dest.d.ts +8 -0
- package/dist/schema/sw-dest.d.ts.map +1 -0
- package/dist/schema/utils.d.ts +10 -0
- package/dist/schema/utils.d.ts.map +1 -0
- package/dist/types.d.ts +11 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/index.schema.ts +10 -8
- package/src/lib/transform-manifest.ts +0 -1
- package/src/lib/translate-url-to-sourcemap-paths.ts +3 -3
- package/src/lib/validate-options.ts +13 -6
- package/src/schema/base.ts +11 -13
- package/src/schema/error.ts +53 -0
- package/src/schema/{getManifest.ts → get-manifest.ts} +7 -6
- package/src/schema/glob.ts +14 -20
- package/src/schema/inject-manifest.ts +24 -0
- package/src/schema/manifest-entry.ts +7 -0
- package/src/schema/manifest-transform.ts +17 -0
- package/src/schema/{swDest.ts → sw-dest.ts} +7 -11
- package/src/schema/utils.ts +27 -0
- package/src/types.ts +10 -4
- package/dist/chunks/getManifest.js +0 -6
- package/dist/chunks/injectManifest.js +0 -23
- package/dist/chunks/validationErrorMap.js +0 -54
- package/dist/schema/assertType.d.ts.map +0 -1
- package/dist/schema/getManifest.d.ts +0 -192
- package/dist/schema/getManifest.d.ts.map +0 -1
- package/dist/schema/injectManifest.d.ts +0 -213
- package/dist/schema/injectManifest.d.ts.map +0 -1
- package/dist/schema/manifestEntry.d.ts +0 -15
- package/dist/schema/manifestEntry.d.ts.map +0 -1
- package/dist/schema/manifestTransform.d.ts +0 -125
- package/dist/schema/manifestTransform.d.ts.map +0 -1
- package/dist/schema/serwistConfigError.d.ts.map +0 -1
- package/dist/schema/swDest.d.ts +0 -16
- package/dist/schema/swDest.d.ts.map +0 -1
- package/dist/schema/validationErrorMap.d.ts +0 -3
- package/dist/schema/validationErrorMap.d.ts.map +0 -1
- package/src/schema/injectManifest.ts +0 -25
- package/src/schema/manifestEntry.ts +0 -9
- package/src/schema/manifestTransform.ts +0 -15
- package/src/schema/serwistConfigError.ts +0 -6
- package/src/schema/validationErrorMap.ts +0 -36
- /package/src/schema/{assertType.ts → assert-type.ts} +0 -0
package/src/schema/glob.ts
CHANGED
|
@@ -7,31 +7,25 @@ import type {
|
|
|
7
7
|
RequiredGlobDirectoryPartial,
|
|
8
8
|
RequiredGlobDirectoryResolved,
|
|
9
9
|
} from "../types.js";
|
|
10
|
-
import { type Equals, assertType } from "./
|
|
10
|
+
import { type Equals, assertType } from "./assert-type.js";
|
|
11
11
|
|
|
12
|
-
export const globPartial = z
|
|
13
|
-
.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
})
|
|
20
|
-
.strict("Do not pass invalid properties to GlobPartial!");
|
|
12
|
+
export const globPartial = z.strictObject({
|
|
13
|
+
globFollow: z.boolean().default(true),
|
|
14
|
+
globIgnores: z.array(z.string()).default(["**/node_modules/**/*"]),
|
|
15
|
+
globPatterns: z.array(z.string()).default(["**/*.{js,css,html}"]),
|
|
16
|
+
globStrict: z.boolean().default(true),
|
|
17
|
+
templatedURLs: z.record(z.string(), z.union([z.string(), z.array(z.string())])).optional(),
|
|
18
|
+
});
|
|
21
19
|
|
|
22
|
-
export const optionalGlobDirectoryPartial = z
|
|
23
|
-
.
|
|
24
|
-
|
|
25
|
-
})
|
|
26
|
-
.strict("Do not pass invalid properties to OptionalGlobDirectoryPartial!");
|
|
20
|
+
export const optionalGlobDirectoryPartial = z.strictObject({
|
|
21
|
+
globDirectory: z.string().optional(),
|
|
22
|
+
});
|
|
27
23
|
|
|
28
24
|
// This needs to be set when using GetManifest or InjectManifest. This is
|
|
29
25
|
// enforced via runtime validation, and needs to be documented.
|
|
30
|
-
export const requiredGlobDirectoryPartial = z
|
|
31
|
-
.
|
|
32
|
-
|
|
33
|
-
})
|
|
34
|
-
.strict("Do not pass invalid properties to RequiredGlobDirectoryPartial!");
|
|
26
|
+
export const requiredGlobDirectoryPartial = z.strictObject({
|
|
27
|
+
globDirectory: z.string(),
|
|
28
|
+
});
|
|
35
29
|
|
|
36
30
|
assertType<Equals<GlobPartial, z.input<typeof globPartial>>>();
|
|
37
31
|
assertType<Equals<GlobResolved, z.output<typeof globPartial>>>();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { InjectManifestOptions, InjectManifestOptionsComplete, InjectPartial, InjectResolved } from "../types.js";
|
|
3
|
+
import { type Equals, assertType } from "./assert-type.js";
|
|
4
|
+
import { basePartial } from "./base.js";
|
|
5
|
+
import { globPartial, requiredGlobDirectoryPartial } from "./glob.js";
|
|
6
|
+
import { requiredSwDestPartial } from "./sw-dest.js";
|
|
7
|
+
|
|
8
|
+
export const baseInjectPartial = z.strictObject({
|
|
9
|
+
injectionPoint: z.string().default("self.__SW_MANIFEST"),
|
|
10
|
+
swSrc: z.string(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export const injectManifestOptions = z.strictObject({
|
|
14
|
+
...basePartial.shape,
|
|
15
|
+
...globPartial.shape,
|
|
16
|
+
...baseInjectPartial.shape,
|
|
17
|
+
...requiredSwDestPartial.shape,
|
|
18
|
+
...requiredGlobDirectoryPartial.shape,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
assertType<Equals<InjectPartial, z.input<typeof baseInjectPartial>>>();
|
|
22
|
+
assertType<Equals<InjectResolved, z.output<typeof baseInjectPartial>>>();
|
|
23
|
+
assertType<Equals<InjectManifestOptions, z.input<typeof injectManifestOptions>>>();
|
|
24
|
+
assertType<Equals<InjectManifestOptionsComplete, z.output<typeof injectManifestOptions>>>();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { manifestEntry } from "./manifest-entry.js";
|
|
3
|
+
import { asyncFn } from "./utils.js";
|
|
4
|
+
|
|
5
|
+
const sizeObject = z.object({ size: z.number() });
|
|
6
|
+
|
|
7
|
+
const manifestEntryWithSize = z.object({ ...manifestEntry.shape, ...sizeObject.shape });
|
|
8
|
+
|
|
9
|
+
export const manifestTransformResult = z.strictObject({
|
|
10
|
+
manifest: z.array(manifestEntryWithSize),
|
|
11
|
+
warnings: z.array(z.string()).optional(),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const manifestTransform = asyncFn({
|
|
15
|
+
input: [z.array(manifestEntryWithSize), z.unknown().optional()],
|
|
16
|
+
output: manifestTransformResult,
|
|
17
|
+
});
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { OptionalSwDestPartial, OptionalSwDestResolved, RequiredSwDestPartial, RequiredSwDestResolved } from "../types.js";
|
|
3
|
-
import { type Equals, assertType } from "./
|
|
3
|
+
import { type Equals, assertType } from "./assert-type.js";
|
|
4
4
|
|
|
5
|
-
export const optionalSwDestPartial = z
|
|
6
|
-
.
|
|
7
|
-
|
|
8
|
-
})
|
|
9
|
-
.strict("Do not pass invalid properties to OptionalSwDest!");
|
|
5
|
+
export const optionalSwDestPartial = z.strictObject({
|
|
6
|
+
swDest: z.string().optional(),
|
|
7
|
+
});
|
|
10
8
|
|
|
11
|
-
export const requiredSwDestPartial = z
|
|
12
|
-
.
|
|
13
|
-
|
|
14
|
-
})
|
|
15
|
-
.strict("Do not pass invalid properties to RequiredSwDest!");
|
|
9
|
+
export const requiredSwDestPartial = z.strictObject({
|
|
10
|
+
swDest: z.string(),
|
|
11
|
+
});
|
|
16
12
|
|
|
17
13
|
assertType<Equals<OptionalSwDestPartial, z.input<typeof optionalSwDestPartial>>>();
|
|
18
14
|
assertType<Equals<OptionalSwDestResolved, z.output<typeof optionalSwDestPartial>>>();
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
export const fn = <TInput extends [z.ZodType, ...z.ZodType[]], TOutput extends z.ZodType>({ input, output }: { input: TInput; output: TOutput }) => {
|
|
4
|
+
const schema = z.function({
|
|
5
|
+
input: z.tuple(input),
|
|
6
|
+
output,
|
|
7
|
+
});
|
|
8
|
+
return z
|
|
9
|
+
.custom<z.core.$InferInnerFunctionType<z.ZodTuple<TInput, null>, TOutput>>((arg) => typeof arg === "function")
|
|
10
|
+
.transform((arg) => schema.implement(arg));
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const asyncFn = <TInput extends [z.ZodType, ...z.ZodType[]], TOutput extends z.ZodType>({
|
|
14
|
+
input,
|
|
15
|
+
output,
|
|
16
|
+
}: {
|
|
17
|
+
input: TInput;
|
|
18
|
+
output: TOutput;
|
|
19
|
+
}) => {
|
|
20
|
+
const schema = z.function({
|
|
21
|
+
input: z.tuple(input),
|
|
22
|
+
output,
|
|
23
|
+
});
|
|
24
|
+
return z
|
|
25
|
+
.custom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput>>((arg) => typeof arg === "function")
|
|
26
|
+
.transform((arg) => schema.implementAsync(arg));
|
|
27
|
+
};
|
package/src/types.ts
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import type { Require } from "@serwist/utils";
|
|
1
|
+
import type { MaybePromise, 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/
|
|
5
|
-
import type {
|
|
4
|
+
import type { manifestEntry } from "./schema/manifest-entry.js";
|
|
5
|
+
import type { manifestTransformResult } from "./schema/manifest-transform.js";
|
|
6
6
|
|
|
7
7
|
export type ManifestEntry = z.input<typeof manifestEntry>;
|
|
8
8
|
|
|
9
9
|
export type ManifestTransformResult = z.input<typeof manifestTransformResult>;
|
|
10
10
|
|
|
11
|
-
export type ManifestTransform =
|
|
11
|
+
export type ManifestTransform = (
|
|
12
|
+
entries: (ManifestEntry & { size: number })[],
|
|
13
|
+
params?: unknown,
|
|
14
|
+
) => MaybePromise<{
|
|
15
|
+
manifest: (ManifestEntry & { size: number })[];
|
|
16
|
+
warnings?: string[] | undefined;
|
|
17
|
+
}>;
|
|
12
18
|
|
|
13
19
|
export interface BasePartial {
|
|
14
20
|
/**
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { b as basePartial, g as globPartial, r as requiredGlobDirectoryPartial } from './glob.js';
|
|
2
|
-
import 'zod';
|
|
3
|
-
|
|
4
|
-
const getManifestOptions = basePartial.merge(globPartial).merge(requiredGlobDirectoryPartial).strict("Do not pass invalid properties to GetManifestOptions!");
|
|
5
|
-
|
|
6
|
-
export { getManifestOptions };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { b as basePartial, g as globPartial, r as requiredGlobDirectoryPartial } from './glob.js';
|
|
3
|
-
|
|
4
|
-
const optionalSwDestPartial = z.object({
|
|
5
|
-
swDest: z.string().optional()
|
|
6
|
-
}).strict("Do not pass invalid properties to OptionalSwDest!");
|
|
7
|
-
const requiredSwDestPartial = z.object({
|
|
8
|
-
swDest: z.string()
|
|
9
|
-
}).strict("Do not pass invalid properties to RequiredSwDest!");
|
|
10
|
-
|
|
11
|
-
const baseInjectPartial = z.object({
|
|
12
|
-
injectionPoint: z.string().min(1, "`injectionPoint` must not be empty!").default("self.__SW_MANIFEST"),
|
|
13
|
-
swSrc: z.string().min(1, "`swSrc` must not be empty!")
|
|
14
|
-
}).strict("Do not pass invalid properties to InjectPartial!");
|
|
15
|
-
const injectManifestOptions = basePartial.merge(globPartial).merge(baseInjectPartial).merge(requiredSwDestPartial).merge(requiredGlobDirectoryPartial).strict("Do not pass invalid properties to InjectManifestOptions!");
|
|
16
|
-
|
|
17
|
-
var injectManifest = /*#__PURE__*/Object.freeze({
|
|
18
|
-
__proto__: null,
|
|
19
|
-
baseInjectPartial: baseInjectPartial,
|
|
20
|
-
injectManifestOptions: injectManifestOptions
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export { injectManifest as a, baseInjectPartial as b, injectManifestOptions as i, optionalSwDestPartial as o, requiredSwDestPartial as r };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
class SerwistConfigError extends Error {
|
|
4
|
-
constructor({ moduleName, message }){
|
|
5
|
-
super(`Received an invalid ${moduleName ?? "Serwist"} configuration: ${message}`);
|
|
6
|
-
Object.setPrototypeOf(this, new.target.prototype);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const validationErrorMap = (error, ctx)=>{
|
|
11
|
-
switch(error.code){
|
|
12
|
-
case z.ZodIssueCode.invalid_type:
|
|
13
|
-
{
|
|
14
|
-
return {
|
|
15
|
-
message: `${error.message ?? "Received invalid type"}: expected ${error.expected}, received ${error.received}.`
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
case z.ZodIssueCode.invalid_literal:
|
|
19
|
-
{
|
|
20
|
-
return {
|
|
21
|
-
message: `${error.message ?? "Received invalid literal"}: expected ${error.expected}, received ${error.received}.`
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
case z.ZodIssueCode.unrecognized_keys:
|
|
25
|
-
{
|
|
26
|
-
return {
|
|
27
|
-
message: `${error.message ?? "Received unrecognized keys"}: ${error.keys.join(",")}`
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
case z.ZodIssueCode.invalid_arguments:
|
|
31
|
-
{
|
|
32
|
-
return {
|
|
33
|
-
message: `${error.message ?? "Received invalid arguments"}: ${error.argumentsError.errors.map((e)=>validationErrorMap(e, ctx)).join(",")}.`
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
case z.ZodIssueCode.invalid_return_type:
|
|
37
|
-
{
|
|
38
|
-
return {
|
|
39
|
-
message: `${error.message ?? "Received invalid return type"}: ${error.returnTypeError.errors.map((e)=>validationErrorMap(e, ctx)).join(",")}.`
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
case z.ZodIssueCode.custom:
|
|
43
|
-
{
|
|
44
|
-
return {
|
|
45
|
-
message: error.message ?? ctx.defaultError
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return {
|
|
50
|
-
message: ctx.defaultError
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export { SerwistConfigError as S, validationErrorMap as v };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assertType.d.ts","sourceRoot":"","sources":["../../src/schema/assertType.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC;AAEtF,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AAE9D,wBAAgB,UAAU,CAAC,EAAE,SAAS,IAAI,UAEzC"}
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import type { z } from "zod";
|
|
2
|
-
export declare const getManifestOptions: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
3
|
-
additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
4
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
5
|
-
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
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">>;
|
|
16
|
-
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<{
|
|
19
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
20
|
-
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
-
url: z.ZodString;
|
|
22
|
-
}, {
|
|
23
|
-
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<{
|
|
36
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
37
|
-
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
38
|
-
url: z.ZodString;
|
|
39
|
-
}, {
|
|
40
|
-
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
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
72
|
-
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
|
-
url: z.ZodString;
|
|
74
|
-
}, {
|
|
75
|
-
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">>;
|
|
105
|
-
maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
|
|
106
|
-
modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
107
|
-
}, {
|
|
108
|
-
globFollow: z.ZodDefault<z.ZodBoolean>;
|
|
109
|
-
globIgnores: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
110
|
-
globPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
111
|
-
globStrict: z.ZodDefault<z.ZodBoolean>;
|
|
112
|
-
templatedURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
|
|
113
|
-
}>, {
|
|
114
|
-
globDirectory: z.ZodString;
|
|
115
|
-
}>, "strict", z.ZodTypeAny, {
|
|
116
|
-
disablePrecacheManifest: boolean;
|
|
117
|
-
maximumFileSizeToCacheInBytes: number;
|
|
118
|
-
globFollow: boolean;
|
|
119
|
-
globIgnores: string[];
|
|
120
|
-
globPatterns: string[];
|
|
121
|
-
globStrict: boolean;
|
|
122
|
-
globDirectory: string;
|
|
123
|
-
additionalPrecacheEntries?: (string | {
|
|
124
|
-
url: string;
|
|
125
|
-
integrity?: string | undefined;
|
|
126
|
-
revision?: string | null | undefined;
|
|
127
|
-
})[] | undefined;
|
|
128
|
-
dontCacheBustURLsMatching?: RegExp | undefined;
|
|
129
|
-
manifestTransforms?: ((args_0: {
|
|
130
|
-
url: string;
|
|
131
|
-
size: number;
|
|
132
|
-
integrity?: string | undefined;
|
|
133
|
-
revision?: string | null | undefined;
|
|
134
|
-
}[], args_1: unknown) => {
|
|
135
|
-
manifest: {
|
|
136
|
-
url: string;
|
|
137
|
-
size: number;
|
|
138
|
-
integrity?: string | undefined;
|
|
139
|
-
revision?: string | null | undefined;
|
|
140
|
-
}[];
|
|
141
|
-
warnings?: string[] | undefined;
|
|
142
|
-
} | Promise<{
|
|
143
|
-
manifest: {
|
|
144
|
-
url: string;
|
|
145
|
-
size: number;
|
|
146
|
-
integrity?: string | undefined;
|
|
147
|
-
revision?: string | null | undefined;
|
|
148
|
-
}[];
|
|
149
|
-
warnings?: string[] | undefined;
|
|
150
|
-
}>)[] | undefined;
|
|
151
|
-
modifyURLPrefix?: Record<string, string> | undefined;
|
|
152
|
-
templatedURLs?: Record<string, string | string[]> | undefined;
|
|
153
|
-
}, {
|
|
154
|
-
globDirectory: string;
|
|
155
|
-
disablePrecacheManifest?: boolean | undefined;
|
|
156
|
-
maximumFileSizeToCacheInBytes?: number | undefined;
|
|
157
|
-
additionalPrecacheEntries?: (string | {
|
|
158
|
-
url: string;
|
|
159
|
-
integrity?: string | undefined;
|
|
160
|
-
revision?: string | null | undefined;
|
|
161
|
-
})[] | undefined;
|
|
162
|
-
dontCacheBustURLsMatching?: RegExp | undefined;
|
|
163
|
-
manifestTransforms?: ((args_0: {
|
|
164
|
-
url: string;
|
|
165
|
-
size: number;
|
|
166
|
-
integrity?: string | undefined;
|
|
167
|
-
revision?: string | null | undefined;
|
|
168
|
-
}[], args_1: unknown) => {
|
|
169
|
-
manifest: {
|
|
170
|
-
url: string;
|
|
171
|
-
size: number;
|
|
172
|
-
integrity?: string | undefined;
|
|
173
|
-
revision?: string | null | undefined;
|
|
174
|
-
}[];
|
|
175
|
-
warnings?: string[] | undefined;
|
|
176
|
-
} | Promise<{
|
|
177
|
-
manifest: {
|
|
178
|
-
url: string;
|
|
179
|
-
size: number;
|
|
180
|
-
integrity?: string | undefined;
|
|
181
|
-
revision?: string | null | undefined;
|
|
182
|
-
}[];
|
|
183
|
-
warnings?: string[] | undefined;
|
|
184
|
-
}>)[] | undefined;
|
|
185
|
-
modifyURLPrefix?: Record<string, string> | undefined;
|
|
186
|
-
globFollow?: boolean | undefined;
|
|
187
|
-
globIgnores?: string[] | undefined;
|
|
188
|
-
globPatterns?: string[] | undefined;
|
|
189
|
-
globStrict?: boolean | undefined;
|
|
190
|
-
templatedURLs?: Record<string, string | string[]> | undefined;
|
|
191
|
-
}>;
|
|
192
|
-
//# sourceMappingURL=getManifest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getManifest.d.ts","sourceRoot":"","sources":["../../src/schema/getManifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAM7B,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGmC,CAAC"}
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const baseInjectPartial: z.ZodObject<{
|
|
3
|
-
injectionPoint: z.ZodDefault<z.ZodString>;
|
|
4
|
-
swSrc: z.ZodString;
|
|
5
|
-
}, "strict", z.ZodTypeAny, {
|
|
6
|
-
injectionPoint: string;
|
|
7
|
-
swSrc: string;
|
|
8
|
-
}, {
|
|
9
|
-
swSrc: string;
|
|
10
|
-
injectionPoint?: string | undefined;
|
|
11
|
-
}>;
|
|
12
|
-
export declare const injectManifestOptions: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
13
|
-
additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
14
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
15
|
-
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
-
url: z.ZodString;
|
|
17
|
-
}, "strict", z.ZodTypeAny, {
|
|
18
|
-
url: string;
|
|
19
|
-
integrity?: string | undefined;
|
|
20
|
-
revision?: string | null | undefined;
|
|
21
|
-
}, {
|
|
22
|
-
url: string;
|
|
23
|
-
integrity?: string | undefined;
|
|
24
|
-
revision?: string | null | undefined;
|
|
25
|
-
}>]>, "many">>;
|
|
26
|
-
disablePrecacheManifest: z.ZodDefault<z.ZodBoolean>;
|
|
27
|
-
dontCacheBustURLsMatching: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
|
|
28
|
-
manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
29
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
30
|
-
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
|
-
url: z.ZodString;
|
|
32
|
-
}, {
|
|
33
|
-
size: z.ZodNumber;
|
|
34
|
-
}>, "strip", z.ZodTypeAny, {
|
|
35
|
-
url: string;
|
|
36
|
-
size: number;
|
|
37
|
-
integrity?: string | undefined;
|
|
38
|
-
revision?: string | null | undefined;
|
|
39
|
-
}, {
|
|
40
|
-
url: string;
|
|
41
|
-
size: number;
|
|
42
|
-
integrity?: string | undefined;
|
|
43
|
-
revision?: string | null | undefined;
|
|
44
|
-
}>, "many">, z.ZodOptional<z.ZodUnknown>], null>, z.ZodUnion<[z.ZodPromise<z.ZodObject<{
|
|
45
|
-
manifest: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
46
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
47
|
-
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
|
-
url: z.ZodString;
|
|
49
|
-
}, {
|
|
50
|
-
size: z.ZodNumber;
|
|
51
|
-
}>, "strip", z.ZodTypeAny, {
|
|
52
|
-
url: string;
|
|
53
|
-
size: number;
|
|
54
|
-
integrity?: string | undefined;
|
|
55
|
-
revision?: string | null | undefined;
|
|
56
|
-
}, {
|
|
57
|
-
url: string;
|
|
58
|
-
size: number;
|
|
59
|
-
integrity?: string | undefined;
|
|
60
|
-
revision?: string | null | undefined;
|
|
61
|
-
}>, "many">;
|
|
62
|
-
warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
63
|
-
}, "strict", z.ZodTypeAny, {
|
|
64
|
-
manifest: {
|
|
65
|
-
url: string;
|
|
66
|
-
size: number;
|
|
67
|
-
integrity?: string | undefined;
|
|
68
|
-
revision?: string | null | undefined;
|
|
69
|
-
}[];
|
|
70
|
-
warnings?: string[] | undefined;
|
|
71
|
-
}, {
|
|
72
|
-
manifest: {
|
|
73
|
-
url: string;
|
|
74
|
-
size: number;
|
|
75
|
-
integrity?: string | undefined;
|
|
76
|
-
revision?: string | null | undefined;
|
|
77
|
-
}[];
|
|
78
|
-
warnings?: string[] | undefined;
|
|
79
|
-
}>>, z.ZodObject<{
|
|
80
|
-
manifest: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
81
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
82
|
-
revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
83
|
-
url: z.ZodString;
|
|
84
|
-
}, {
|
|
85
|
-
size: z.ZodNumber;
|
|
86
|
-
}>, "strip", z.ZodTypeAny, {
|
|
87
|
-
url: string;
|
|
88
|
-
size: number;
|
|
89
|
-
integrity?: string | undefined;
|
|
90
|
-
revision?: string | null | undefined;
|
|
91
|
-
}, {
|
|
92
|
-
url: string;
|
|
93
|
-
size: number;
|
|
94
|
-
integrity?: string | undefined;
|
|
95
|
-
revision?: string | null | undefined;
|
|
96
|
-
}>, "many">;
|
|
97
|
-
warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
98
|
-
}, "strict", z.ZodTypeAny, {
|
|
99
|
-
manifest: {
|
|
100
|
-
url: string;
|
|
101
|
-
size: number;
|
|
102
|
-
integrity?: string | undefined;
|
|
103
|
-
revision?: string | null | undefined;
|
|
104
|
-
}[];
|
|
105
|
-
warnings?: string[] | undefined;
|
|
106
|
-
}, {
|
|
107
|
-
manifest: {
|
|
108
|
-
url: string;
|
|
109
|
-
size: number;
|
|
110
|
-
integrity?: string | undefined;
|
|
111
|
-
revision?: string | null | undefined;
|
|
112
|
-
}[];
|
|
113
|
-
warnings?: string[] | undefined;
|
|
114
|
-
}>]>>, "many">>;
|
|
115
|
-
maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
|
|
116
|
-
modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
117
|
-
}, {
|
|
118
|
-
globFollow: z.ZodDefault<z.ZodBoolean>;
|
|
119
|
-
globIgnores: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
120
|
-
globPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
121
|
-
globStrict: z.ZodDefault<z.ZodBoolean>;
|
|
122
|
-
templatedURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
|
|
123
|
-
}>, {
|
|
124
|
-
injectionPoint: z.ZodDefault<z.ZodString>;
|
|
125
|
-
swSrc: z.ZodString;
|
|
126
|
-
}>, {
|
|
127
|
-
swDest: z.ZodString;
|
|
128
|
-
}>, {
|
|
129
|
-
globDirectory: z.ZodString;
|
|
130
|
-
}>, "strict", z.ZodTypeAny, {
|
|
131
|
-
disablePrecacheManifest: boolean;
|
|
132
|
-
maximumFileSizeToCacheInBytes: number;
|
|
133
|
-
globFollow: boolean;
|
|
134
|
-
globIgnores: string[];
|
|
135
|
-
globPatterns: string[];
|
|
136
|
-
globStrict: boolean;
|
|
137
|
-
injectionPoint: string;
|
|
138
|
-
swSrc: string;
|
|
139
|
-
globDirectory: string;
|
|
140
|
-
swDest: string;
|
|
141
|
-
additionalPrecacheEntries?: (string | {
|
|
142
|
-
url: string;
|
|
143
|
-
integrity?: string | undefined;
|
|
144
|
-
revision?: string | null | undefined;
|
|
145
|
-
})[] | undefined;
|
|
146
|
-
dontCacheBustURLsMatching?: RegExp | undefined;
|
|
147
|
-
manifestTransforms?: ((args_0: {
|
|
148
|
-
url: string;
|
|
149
|
-
size: number;
|
|
150
|
-
integrity?: string | undefined;
|
|
151
|
-
revision?: string | null | undefined;
|
|
152
|
-
}[], args_1: unknown) => {
|
|
153
|
-
manifest: {
|
|
154
|
-
url: string;
|
|
155
|
-
size: number;
|
|
156
|
-
integrity?: string | undefined;
|
|
157
|
-
revision?: string | null | undefined;
|
|
158
|
-
}[];
|
|
159
|
-
warnings?: string[] | undefined;
|
|
160
|
-
} | Promise<{
|
|
161
|
-
manifest: {
|
|
162
|
-
url: string;
|
|
163
|
-
size: number;
|
|
164
|
-
integrity?: string | undefined;
|
|
165
|
-
revision?: string | null | undefined;
|
|
166
|
-
}[];
|
|
167
|
-
warnings?: string[] | undefined;
|
|
168
|
-
}>)[] | undefined;
|
|
169
|
-
modifyURLPrefix?: Record<string, string> | undefined;
|
|
170
|
-
templatedURLs?: Record<string, string | string[]> | undefined;
|
|
171
|
-
}, {
|
|
172
|
-
swSrc: string;
|
|
173
|
-
globDirectory: string;
|
|
174
|
-
swDest: string;
|
|
175
|
-
disablePrecacheManifest?: boolean | undefined;
|
|
176
|
-
maximumFileSizeToCacheInBytes?: number | undefined;
|
|
177
|
-
additionalPrecacheEntries?: (string | {
|
|
178
|
-
url: string;
|
|
179
|
-
integrity?: string | undefined;
|
|
180
|
-
revision?: string | null | undefined;
|
|
181
|
-
})[] | undefined;
|
|
182
|
-
dontCacheBustURLsMatching?: RegExp | undefined;
|
|
183
|
-
manifestTransforms?: ((args_0: {
|
|
184
|
-
url: string;
|
|
185
|
-
size: number;
|
|
186
|
-
integrity?: string | undefined;
|
|
187
|
-
revision?: string | null | undefined;
|
|
188
|
-
}[], args_1: unknown) => {
|
|
189
|
-
manifest: {
|
|
190
|
-
url: string;
|
|
191
|
-
size: number;
|
|
192
|
-
integrity?: string | undefined;
|
|
193
|
-
revision?: string | null | undefined;
|
|
194
|
-
}[];
|
|
195
|
-
warnings?: string[] | undefined;
|
|
196
|
-
} | Promise<{
|
|
197
|
-
manifest: {
|
|
198
|
-
url: string;
|
|
199
|
-
size: number;
|
|
200
|
-
integrity?: string | undefined;
|
|
201
|
-
revision?: string | null | undefined;
|
|
202
|
-
}[];
|
|
203
|
-
warnings?: string[] | undefined;
|
|
204
|
-
}>)[] | undefined;
|
|
205
|
-
modifyURLPrefix?: Record<string, string> | undefined;
|
|
206
|
-
globFollow?: boolean | undefined;
|
|
207
|
-
globIgnores?: string[] | undefined;
|
|
208
|
-
globPatterns?: string[] | undefined;
|
|
209
|
-
globStrict?: boolean | undefined;
|
|
210
|
-
templatedURLs?: Record<string, string | string[]> | undefined;
|
|
211
|
-
injectionPoint?: string | undefined;
|
|
212
|
-
}>;
|
|
213
|
-
//# sourceMappingURL=injectManifest.d.ts.map
|