@serwist/build 9.1.1 → 9.2.1
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 → constants.js} +5 -1
- package/dist/chunks/get-manifest.js +1 -0
- package/dist/chunks/glob.js +2 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.schema.js +1 -1
- package/dist/lib/constants.d.ts +2 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/schema/glob.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/index.ts +2 -0
- package/src/lib/constants.ts +1 -0
- package/src/schema/glob.ts +2 -1
|
@@ -52,4 +52,8 @@ const validationErrorMap = (error)=>{
|
|
|
52
52
|
return undefined;
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
const DEFAULT_GLOB_PATTERNS = [
|
|
56
|
+
"**/*.{js,css,html}"
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
export { DEFAULT_GLOB_PATTERNS as D, SerwistConfigError as S, validationErrorMap as v };
|
package/dist/chunks/glob.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { D as DEFAULT_GLOB_PATTERNS } from './constants.js';
|
|
2
3
|
|
|
3
4
|
const manifestEntry = z.strictObject({
|
|
4
5
|
integrity: z.string().optional(),
|
|
@@ -57,9 +58,7 @@ const globPartial = z.strictObject({
|
|
|
57
58
|
globIgnores: z.array(z.string()).default([
|
|
58
59
|
"**/node_modules/**/*"
|
|
59
60
|
]),
|
|
60
|
-
globPatterns: z.array(z.string()).default(
|
|
61
|
-
"**/*.{js,css,html}"
|
|
62
|
-
]),
|
|
61
|
+
globPatterns: z.array(z.string()).default(DEFAULT_GLOB_PATTERNS),
|
|
63
62
|
globStrict: z.boolean().default(true),
|
|
64
63
|
templatedURLs: z.record(z.string(), z.union([
|
|
65
64
|
z.string(),
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getManifest } from "./get-manifest.js";
|
|
2
2
|
import { injectManifest } from "./inject-manifest.js";
|
|
3
|
+
import { DEFAULT_GLOB_PATTERNS } from "./lib/constants.js";
|
|
3
4
|
import { errors } from "./lib/errors.js";
|
|
4
5
|
import { escapeRegExp } from "./lib/escape-regexp.js";
|
|
5
6
|
import { getFileManifestEntries } from "./lib/get-file-manifest-entries.js";
|
|
@@ -18,6 +19,6 @@ declare const stringify: {
|
|
|
18
19
|
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
19
20
|
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
20
21
|
};
|
|
21
|
-
export { errors, escapeRegExp, getFileManifestEntries, getManifest, getSourceMapURL, injectManifest, rebasePath, replaceAndUpdateSourceMap, stringify, transformManifest, translateURLToSourcemapPaths, validateGetManifestOptions, validateInjectManifestOptions, };
|
|
22
|
+
export { errors, DEFAULT_GLOB_PATTERNS, escapeRegExp, getFileManifestEntries, getManifest, getSourceMapURL, injectManifest, rebasePath, replaceAndUpdateSourceMap, stringify, transformManifest, translateURLToSourcemapPaths, validateGetManifestOptions, validateInjectManifestOptions, };
|
|
22
23
|
export type * from "./types.js";
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE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ACzF,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"}
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,8 @@ import { globSync } from 'glob';
|
|
|
6
6
|
import fs, { readFileSync } from 'node:fs';
|
|
7
7
|
import prettyBytes from 'pretty-bytes';
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
-
import { v as validationErrorMap, S as SerwistConfigError } from './chunks/
|
|
9
|
+
import { v as validationErrorMap, S as SerwistConfigError } from './chunks/constants.js';
|
|
10
|
+
export { D as DEFAULT_GLOB_PATTERNS } from './chunks/constants.js';
|
|
10
11
|
import fsp from 'node:fs/promises';
|
|
11
12
|
import { SourceMapGenerator, SourceMapConsumer } from 'source-map';
|
|
12
13
|
|
package/dist/index.schema.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { a as asyncFn, b as basePartial, f as fn, g as globPartial, m as manifestEntry, c as manifestTransform, d as manifestTransformResult, o as optionalGlobDirectoryPartial, r as requiredGlobDirectoryPartial } from './chunks/glob.js';
|
|
2
2
|
export { getManifestOptions } from './chunks/get-manifest.js';
|
|
3
3
|
export { i as injectManifestOptions, b as injectPartial, o as optionalSwDestPartial, r as requiredSwDestPartial } from './chunks/inject-manifest.js';
|
|
4
|
-
export { S as SerwistConfigError, v as validationErrorMap } from './chunks/
|
|
4
|
+
export { S as SerwistConfigError, v as validationErrorMap } from './chunks/constants.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
|
|
7
7
|
function assertType() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,UAAyB,CAAC"}
|
|
@@ -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;
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serwist/build",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A module that integrates into your build process, helping you generate a manifest of local files that should be precached.",
|
|
6
6
|
"files": [
|
|
@@ -52,16 +52,16 @@
|
|
|
52
52
|
"glob": "10.4.5",
|
|
53
53
|
"pretty-bytes": "6.1.1",
|
|
54
54
|
"source-map": "0.8.0-beta.0",
|
|
55
|
-
"zod": "4.
|
|
55
|
+
"zod": "4.1.5"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/common-tags": "1.8.4",
|
|
59
|
-
"@types/node": "24.0
|
|
60
|
-
"rollup": "4.
|
|
59
|
+
"@types/node": "24.3.0",
|
|
60
|
+
"rollup": "4.49.0",
|
|
61
61
|
"type-fest": "4.41.0",
|
|
62
|
-
"typescript": "5.
|
|
63
|
-
"@serwist/configs": "9.
|
|
64
|
-
"@serwist/utils": "9.
|
|
62
|
+
"typescript": "5.9.2",
|
|
63
|
+
"@serwist/configs": "9.2.1",
|
|
64
|
+
"@serwist/utils": "9.2.1"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"typescript": ">=5.0.0"
|
package/src/index.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { getManifest } from "./get-manifest.js";
|
|
9
9
|
import { injectManifest } from "./inject-manifest.js";
|
|
10
|
+
import { DEFAULT_GLOB_PATTERNS } from "./lib/constants.js";
|
|
10
11
|
import { errors } from "./lib/errors.js";
|
|
11
12
|
import { escapeRegExp } from "./lib/escape-regexp.js";
|
|
12
13
|
import { getFileManifestEntries } from "./lib/get-file-manifest-entries.js";
|
|
@@ -27,6 +28,7 @@ const stringify = JSON.stringify;
|
|
|
27
28
|
|
|
28
29
|
export {
|
|
29
30
|
errors,
|
|
31
|
+
DEFAULT_GLOB_PATTERNS,
|
|
30
32
|
escapeRegExp,
|
|
31
33
|
getFileManifestEntries,
|
|
32
34
|
getManifest,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const DEFAULT_GLOB_PATTERNS = ["**/*.{js,css,html}"];
|
package/src/schema/glob.ts
CHANGED
|
@@ -8,11 +8,12 @@ import type {
|
|
|
8
8
|
RequiredGlobDirectoryResolved,
|
|
9
9
|
} from "../types.js";
|
|
10
10
|
import { type Equals, assertType } from "./assert-type.js";
|
|
11
|
+
import { DEFAULT_GLOB_PATTERNS } from "../lib/constants.js";
|
|
11
12
|
|
|
12
13
|
export const globPartial = z.strictObject({
|
|
13
14
|
globFollow: z.boolean().default(true),
|
|
14
15
|
globIgnores: z.array(z.string()).default(["**/node_modules/**/*"]),
|
|
15
|
-
globPatterns: z.array(z.string()).default(
|
|
16
|
+
globPatterns: z.array(z.string()).default(DEFAULT_GLOB_PATTERNS),
|
|
16
17
|
globStrict: z.boolean().default(true),
|
|
17
18
|
templatedURLs: z.record(z.string(), z.union([z.string(), z.array(z.string())])).optional(),
|
|
18
19
|
});
|