@serwist/build 9.5.7 → 9.5.9
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/constants-BLOVm9H2.js +6 -0
- package/dist/chunks/constants-BLOVm9H2.js.map +1 -0
- package/dist/chunks/error-Cl4d1Wf-.js +31 -0
- package/dist/chunks/error-Cl4d1Wf-.js.map +1 -0
- package/dist/chunks/get-manifest-De0D0LAJ.js +14 -0
- package/dist/chunks/get-manifest-De0D0LAJ.js.map +1 -0
- package/dist/chunks/glob-B4_meZ_o.js +67 -0
- package/dist/chunks/glob-B4_meZ_o.js.map +1 -0
- package/dist/chunks/inject-manifest-DNqDY-04.js +27 -0
- package/dist/chunks/inject-manifest-DNqDY-04.js.map +1 -0
- package/dist/chunks/manifest-transform-BCUeQ0-V.d.ts +75 -0
- package/dist/chunks/manifest-transform-BCUeQ0-V.d.ts.map +1 -0
- package/dist/chunks/rolldown-runtime-CzwdidQP.js +13 -0
- package/dist/index.d.mts +475 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +594 -0
- package/dist/index.mjs.map +1 -0
- package/dist/index.schema.d.mts +278 -0
- package/dist/index.schema.d.mts.map +1 -0
- package/dist/index.schema.mjs +5 -0
- package/package.json +15 -16
- package/dist/chunks/constants.js +0 -59
- package/dist/chunks/get-manifest.js +0 -11
- package/dist/chunks/glob.js +0 -75
- package/dist/chunks/inject-manifest.js +0 -29
- package/dist/get-manifest.d.ts +0 -19
- package/dist/get-manifest.d.ts.map +0 -1
- package/dist/index.d.ts +0 -24
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -614
- package/dist/index.schema.d.ts +0 -13
- package/dist/index.schema.d.ts.map +0 -1
- package/dist/index.schema.js +0 -9
- package/dist/inject-manifest.d.ts +0 -29
- package/dist/inject-manifest.d.ts.map +0 -1
- package/dist/lib/additional-precache-entries-transform.d.ts +0 -12
- package/dist/lib/additional-precache-entries-transform.d.ts.map +0 -1
- package/dist/lib/constants.d.ts +0 -2
- package/dist/lib/constants.d.ts.map +0 -1
- package/dist/lib/errors.d.ts +0 -46
- package/dist/lib/errors.d.ts.map +0 -1
- package/dist/lib/escape-regexp.d.ts +0 -2
- package/dist/lib/escape-regexp.d.ts.map +0 -1
- package/dist/lib/get-composite-details.d.ts +0 -3
- package/dist/lib/get-composite-details.d.ts.map +0 -1
- package/dist/lib/get-file-details.d.ts +0 -9
- package/dist/lib/get-file-details.d.ts.map +0 -1
- package/dist/lib/get-file-hash.d.ts +0 -2
- package/dist/lib/get-file-hash.d.ts.map +0 -1
- package/dist/lib/get-file-manifest-entries.d.ts +0 -3
- package/dist/lib/get-file-manifest-entries.d.ts.map +0 -1
- package/dist/lib/get-file-size.d.ts +0 -2
- package/dist/lib/get-file-size.d.ts.map +0 -1
- package/dist/lib/get-source-map-url.d.ts +0 -2
- package/dist/lib/get-source-map-url.d.ts.map +0 -1
- package/dist/lib/get-string-details.d.ts +0 -3
- package/dist/lib/get-string-details.d.ts.map +0 -1
- package/dist/lib/get-string-hash.d.ts +0 -3
- package/dist/lib/get-string-hash.d.ts.map +0 -1
- package/dist/lib/maximum-size-transform.d.ts +0 -3
- package/dist/lib/maximum-size-transform.d.ts.map +0 -1
- package/dist/lib/modify-url-prefix-transform.d.ts +0 -5
- package/dist/lib/modify-url-prefix-transform.d.ts.map +0 -1
- package/dist/lib/no-revision-for-urls-matching-transform.d.ts +0 -3
- package/dist/lib/no-revision-for-urls-matching-transform.d.ts.map +0 -1
- package/dist/lib/rebase-path.d.ts +0 -5
- package/dist/lib/rebase-path.d.ts.map +0 -1
- package/dist/lib/replace-and-update-source-map.d.ts +0 -42
- package/dist/lib/replace-and-update-source-map.d.ts.map +0 -1
- package/dist/lib/transform-manifest.d.ts +0 -61
- package/dist/lib/transform-manifest.d.ts.map +0 -1
- package/dist/lib/translate-url-to-sourcemap-paths.d.ts +0 -6
- package/dist/lib/translate-url-to-sourcemap-paths.d.ts.map +0 -1
- package/dist/lib/validate-options.d.ts +0 -4
- package/dist/lib/validate-options.d.ts.map +0 -1
- package/dist/schema/assert-type.d.ts +0 -4
- package/dist/schema/assert-type.d.ts.map +0 -1
- package/dist/schema/base.d.ts +0 -66
- package/dist/schema/base.d.ts.map +0 -1
- package/dist/schema/error.d.ts +0 -9
- package/dist/schema/error.d.ts.map +0 -1
- package/dist/schema/get-manifest.d.ts +0 -72
- package/dist/schema/get-manifest.d.ts.map +0 -1
- package/dist/schema/glob.d.ts +0 -15
- package/dist/schema/glob.d.ts.map +0 -1
- package/dist/schema/inject-manifest.d.ts +0 -79
- package/dist/schema/inject-manifest.d.ts.map +0 -1
- package/dist/schema/manifest-entry.d.ts +0 -7
- package/dist/schema/manifest-entry.d.ts.map +0 -1
- package/dist/schema/manifest-transform.d.ts +0 -64
- package/dist/schema/manifest-transform.d.ts.map +0 -1
- package/dist/schema/sw-dest.d.ts +0 -8
- package/dist/schema/sw-dest.d.ts.map +0 -1
- package/dist/schema/utils.d.ts +0 -10
- package/dist/schema/utils.d.ts.map +0 -1
- package/dist/types.d.ts +0 -204
- package/dist/types.d.ts.map +0 -1
package/dist/chunks/glob.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { D as DEFAULT_GLOB_PATTERNS } from './constants.js';
|
|
3
|
-
|
|
4
|
-
const manifestEntry = z.strictObject({
|
|
5
|
-
integrity: z.string().optional(),
|
|
6
|
-
revision: z.string().nullable().optional(),
|
|
7
|
-
url: z.string()
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
const fn = ({ input, output })=>{
|
|
11
|
-
const schema = z.function({
|
|
12
|
-
input: z.tuple(input),
|
|
13
|
-
output
|
|
14
|
-
});
|
|
15
|
-
return z.custom((arg)=>typeof arg === "function").transform((arg)=>schema.implement(arg));
|
|
16
|
-
};
|
|
17
|
-
const asyncFn = ({ input, output })=>{
|
|
18
|
-
const schema = z.function({
|
|
19
|
-
input: z.tuple(input),
|
|
20
|
-
output
|
|
21
|
-
});
|
|
22
|
-
return z.custom((arg)=>typeof arg === "function").transform((arg)=>schema.implementAsync(arg));
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const sizeObject = z.object({
|
|
26
|
-
size: z.number()
|
|
27
|
-
});
|
|
28
|
-
const manifestEntryWithSize = z.object({
|
|
29
|
-
...manifestEntry.shape,
|
|
30
|
-
...sizeObject.shape
|
|
31
|
-
});
|
|
32
|
-
const manifestTransformResult = z.strictObject({
|
|
33
|
-
manifest: z.array(manifestEntryWithSize),
|
|
34
|
-
warnings: z.array(z.string()).optional()
|
|
35
|
-
});
|
|
36
|
-
const manifestTransform = asyncFn({
|
|
37
|
-
input: [
|
|
38
|
-
z.array(manifestEntryWithSize),
|
|
39
|
-
z.unknown().optional()
|
|
40
|
-
],
|
|
41
|
-
output: manifestTransformResult
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
const basePartial = z.strictObject({
|
|
45
|
-
additionalPrecacheEntries: z.array(z.union([
|
|
46
|
-
z.string(),
|
|
47
|
-
manifestEntry
|
|
48
|
-
])).optional(),
|
|
49
|
-
disablePrecacheManifest: z.boolean().default(false),
|
|
50
|
-
dontCacheBustURLsMatching: z.instanceof(RegExp).optional(),
|
|
51
|
-
manifestTransforms: z.array(manifestTransform).optional(),
|
|
52
|
-
maximumFileSizeToCacheInBytes: z.number().default(2097152),
|
|
53
|
-
modifyURLPrefix: z.record(z.string(), z.string()).optional()
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
const globPartial = z.strictObject({
|
|
57
|
-
globFollow: z.boolean().default(true),
|
|
58
|
-
globIgnores: z.array(z.string()).default([
|
|
59
|
-
"**/node_modules/**/*"
|
|
60
|
-
]),
|
|
61
|
-
globPatterns: z.array(z.string()).default(DEFAULT_GLOB_PATTERNS),
|
|
62
|
-
globStrict: z.boolean().default(true),
|
|
63
|
-
templatedURLs: z.record(z.string(), z.union([
|
|
64
|
-
z.string(),
|
|
65
|
-
z.array(z.string())
|
|
66
|
-
])).optional()
|
|
67
|
-
});
|
|
68
|
-
const optionalGlobDirectoryPartial = z.strictObject({
|
|
69
|
-
globDirectory: z.string().optional()
|
|
70
|
-
});
|
|
71
|
-
const requiredGlobDirectoryPartial = z.strictObject({
|
|
72
|
-
globDirectory: z.string()
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
export { asyncFn as a, basePartial as b, manifestTransform as c, manifestTransformResult as d, fn as f, globPartial as g, manifestEntry as m, optionalGlobDirectoryPartial as o, requiredGlobDirectoryPartial as r };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { r as requiredGlobDirectoryPartial, g as globPartial, b as basePartial } from './glob.js';
|
|
3
|
-
|
|
4
|
-
const optionalSwDestPartial = z.strictObject({
|
|
5
|
-
swDest: z.string().optional()
|
|
6
|
-
});
|
|
7
|
-
const requiredSwDestPartial = z.strictObject({
|
|
8
|
-
swDest: z.string()
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
const baseInjectPartial = z.strictObject({
|
|
12
|
-
injectionPoint: z.string().default("self.__SW_MANIFEST"),
|
|
13
|
-
swSrc: z.string()
|
|
14
|
-
});
|
|
15
|
-
const injectManifestOptions = z.strictObject({
|
|
16
|
-
...basePartial.shape,
|
|
17
|
-
...globPartial.shape,
|
|
18
|
-
...baseInjectPartial.shape,
|
|
19
|
-
...requiredSwDestPartial.shape,
|
|
20
|
-
...requiredGlobDirectoryPartial.shape
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
var injectManifest = /*#__PURE__*/Object.freeze({
|
|
24
|
-
__proto__: null,
|
|
25
|
-
baseInjectPartial: baseInjectPartial,
|
|
26
|
-
injectManifestOptions: injectManifestOptions
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export { injectManifest as a, baseInjectPartial as b, injectManifestOptions as i, optionalSwDestPartial as o, requiredSwDestPartial as r };
|
package/dist/get-manifest.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { GetManifestOptions, GetManifestResult } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* This method returns a list of URLs to precache, referred to as a "precache
|
|
4
|
-
* manifest", along with details about the number of entries and their size,
|
|
5
|
-
* based on the options you provide.
|
|
6
|
-
*
|
|
7
|
-
* ```
|
|
8
|
-
* // The following lists some common options; see the rest of the documentation
|
|
9
|
-
* // for the full set of options and defaults.
|
|
10
|
-
* const {count, manifestEntries, size, warnings} = await getManifest({
|
|
11
|
-
* dontCacheBustURLsMatching: [new RegExp('...')],
|
|
12
|
-
* globDirectory: '...',
|
|
13
|
-
* globPatterns: ['...', '...'],
|
|
14
|
-
* maximumFileSizeToCacheInBytes: ...,
|
|
15
|
-
* });
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare const getManifest: (config: GetManifestOptions) => Promise<GetManifestResult>;
|
|
19
|
-
//# sourceMappingURL=get-manifest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-manifest.d.ts","sourceRoot":"","sources":["../src/get-manifest.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAExE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,GAAU,QAAQ,kBAAkB,KAAG,OAAO,CAAC,iBAAiB,CAIvF,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { getManifest } from "./get-manifest.js";
|
|
2
|
-
import { injectManifest } from "./inject-manifest.js";
|
|
3
|
-
import { DEFAULT_GLOB_PATTERNS } from "./lib/constants.js";
|
|
4
|
-
import { errors } from "./lib/errors.js";
|
|
5
|
-
import { escapeRegExp } from "./lib/escape-regexp.js";
|
|
6
|
-
import { getFileManifestEntries } from "./lib/get-file-manifest-entries.js";
|
|
7
|
-
import { getSourceMapURL } from "./lib/get-source-map-url.js";
|
|
8
|
-
import { rebasePath } from "./lib/rebase-path.js";
|
|
9
|
-
import { replaceAndUpdateSourceMap } from "./lib/replace-and-update-source-map.js";
|
|
10
|
-
import { transformManifest } from "./lib/transform-manifest.js";
|
|
11
|
-
import { translateURLToSourcemapPaths } from "./lib/translate-url-to-sourcemap-paths.js";
|
|
12
|
-
import { validateGetManifestOptions, validateInjectManifestOptions } from "./lib/validate-options.js";
|
|
13
|
-
/**
|
|
14
|
-
* Use `JSON.stringify` instead.
|
|
15
|
-
*
|
|
16
|
-
* @deprecated
|
|
17
|
-
*/
|
|
18
|
-
declare const stringify: {
|
|
19
|
-
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
20
|
-
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
21
|
-
};
|
|
22
|
-
export { errors, DEFAULT_GLOB_PATTERNS, escapeRegExp, getFileManifestEntries, getManifest, getSourceMapURL, injectManifest, rebasePath, replaceAndUpdateSourceMap, stringify, transformManifest, translateURLToSourcemapPaths, validateGetManifestOptions, validateInjectManifestOptions, };
|
|
23
|
-
export type * from "./types.js";
|
|
24
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAGtG;;;;GAIG;AACH,QAAA,MAAM,SAAS;;;CAAiB,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,qBAAqB,EACrB,YAAY,EACZ,sBAAsB,EACtB,WAAW,EACX,eAAe,EACf,cAAc,EACd,UAAU,EACV,yBAAyB,EACzB,SAAS,EACT,iBAAiB,EACjB,4BAA4B,EAC5B,0BAA0B,EAC1B,6BAA6B,GAC9B,CAAC;AAEF,mBAAmB,YAAY,CAAC"}
|