@serwist/build 8.2.0 → 8.3.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/index.cjs +10 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +10 -2
- package/package.json +10 -10
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var assert = require('assert');
|
|
4
3
|
var commonTags = require('common-tags');
|
|
4
|
+
var assert = require('assert');
|
|
5
5
|
var crypto = require('crypto');
|
|
6
6
|
var glob = require('glob');
|
|
7
7
|
var upath = require('upath');
|
|
@@ -488,6 +488,14 @@ async function transformManifest({ additionalPrecacheEntries, dontCacheBustURLsM
|
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
async function getFileManifestEntries({ additionalPrecacheEntries, dontCacheBustURLsMatching, globDirectory, globFollow, globIgnores, globPatterns = [], globStrict, manifestTransforms, maximumFileSizeToCacheInBytes, modifyURLPrefix, templatedURLs, disablePrecacheManifest }) {
|
|
491
|
+
if (disablePrecacheManifest) {
|
|
492
|
+
return {
|
|
493
|
+
count: 0,
|
|
494
|
+
size: 0,
|
|
495
|
+
manifestEntries: undefined,
|
|
496
|
+
warnings: []
|
|
497
|
+
};
|
|
498
|
+
}
|
|
491
499
|
const warnings = [];
|
|
492
500
|
const allFileDetails = new Map();
|
|
493
501
|
try {
|
|
@@ -1411,6 +1419,7 @@ function translateURLToSourcemapPaths(url, swSrc, swDest) {
|
|
|
1411
1419
|
};
|
|
1412
1420
|
}
|
|
1413
1421
|
|
|
1422
|
+
exports.errors = errors;
|
|
1414
1423
|
exports.escapeRegExp = escapeRegExp;
|
|
1415
1424
|
exports.getManifest = getManifest;
|
|
1416
1425
|
exports.getSourceMapURL = getSourceMapURL;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { errors } from "./lib/errors.js";
|
|
1
2
|
import { getManifest } from "./get-manifest.js";
|
|
2
3
|
import { injectManifest } from "./inject-manifest.js";
|
|
3
4
|
import { escapeRegExp } from "./lib/escape-regexp.js";
|
|
@@ -5,5 +6,5 @@ import { getSourceMapURL } from "./lib/get-source-map-url.js";
|
|
|
5
6
|
import { replaceAndUpdateSourceMap } from "./lib/replace-and-update-source-map.js";
|
|
6
7
|
import { transformManifest } from "./lib/transform-manifest.js";
|
|
7
8
|
import { validateWebpackInjectManifestOptions } from "./lib/validate-options.js";
|
|
8
|
-
export { escapeRegExp, getManifest, getSourceMapURL, injectManifest, replaceAndUpdateSourceMap, transformManifest, validateWebpackInjectManifestOptions, };
|
|
9
|
+
export { escapeRegExp, errors, getManifest, getSourceMapURL, injectManifest, replaceAndUpdateSourceMap, transformManifest, validateWebpackInjectManifestOptions, };
|
|
9
10
|
export * from "./types.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { errors } from "./lib/errors.js";
|
|
1
2
|
import { getManifest } from "./get-manifest.js";
|
|
2
3
|
import { injectManifest } from "./inject-manifest.js";
|
|
3
4
|
import { escapeRegExp } from "./lib/escape-regexp.js";
|
|
@@ -5,5 +6,5 @@ import { getSourceMapURL } from "./lib/get-source-map-url.js";
|
|
|
5
6
|
import { replaceAndUpdateSourceMap } from "./lib/replace-and-update-source-map.js";
|
|
6
7
|
import { transformManifest } from "./lib/transform-manifest.js";
|
|
7
8
|
import { validateWebpackInjectManifestOptions } from "./lib/validate-options.js";
|
|
8
|
-
export { escapeRegExp, getManifest, getSourceMapURL, injectManifest, replaceAndUpdateSourceMap, transformManifest, validateWebpackInjectManifestOptions, };
|
|
9
|
+
export { escapeRegExp, errors, getManifest, getSourceMapURL, injectManifest, replaceAndUpdateSourceMap, transformManifest, validateWebpackInjectManifestOptions, };
|
|
9
10
|
export * from "./types.js";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import assert from 'assert';
|
|
2
1
|
import { oneLine } from 'common-tags';
|
|
2
|
+
import assert from 'assert';
|
|
3
3
|
import crypto from 'crypto';
|
|
4
4
|
import { glob } from 'glob';
|
|
5
5
|
import upath from 'upath';
|
|
@@ -486,6 +486,14 @@ async function transformManifest({ additionalPrecacheEntries, dontCacheBustURLsM
|
|
|
486
486
|
}
|
|
487
487
|
|
|
488
488
|
async function getFileManifestEntries({ additionalPrecacheEntries, dontCacheBustURLsMatching, globDirectory, globFollow, globIgnores, globPatterns = [], globStrict, manifestTransforms, maximumFileSizeToCacheInBytes, modifyURLPrefix, templatedURLs, disablePrecacheManifest }) {
|
|
489
|
+
if (disablePrecacheManifest) {
|
|
490
|
+
return {
|
|
491
|
+
count: 0,
|
|
492
|
+
size: 0,
|
|
493
|
+
manifestEntries: undefined,
|
|
494
|
+
warnings: []
|
|
495
|
+
};
|
|
496
|
+
}
|
|
489
497
|
const warnings = [];
|
|
490
498
|
const allFileDetails = new Map();
|
|
491
499
|
try {
|
|
@@ -1409,4 +1417,4 @@ function translateURLToSourcemapPaths(url, swSrc, swDest) {
|
|
|
1409
1417
|
};
|
|
1410
1418
|
}
|
|
1411
1419
|
|
|
1412
|
-
export { escapeRegExp, getManifest, getSourceMapURL, injectManifest, replaceAndUpdateSourceMap, transformManifest, validateWebpackInjectManifestOptions };
|
|
1420
|
+
export { errors, escapeRegExp, getManifest, getSourceMapURL, injectManifest, replaceAndUpdateSourceMap, transformManifest, validateWebpackInjectManifestOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serwist/build",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.0",
|
|
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,14 +52,14 @@
|
|
|
52
52
|
"stringify-object": "5.0.0",
|
|
53
53
|
"strip-comments": "2.0.1",
|
|
54
54
|
"upath": "2.0.1",
|
|
55
|
-
"@serwist/background-sync": "8.
|
|
56
|
-
"@serwist/broadcast-update": "8.
|
|
57
|
-
"@serwist/cacheable-response": "8.
|
|
58
|
-
"@serwist/core": "8.
|
|
59
|
-
"@serwist/expiration": "8.
|
|
60
|
-
"@serwist/google-analytics": "8.
|
|
61
|
-
"@serwist/precaching": "8.
|
|
62
|
-
"@serwist/routing": "8.
|
|
55
|
+
"@serwist/background-sync": "8.3.0",
|
|
56
|
+
"@serwist/broadcast-update": "8.3.0",
|
|
57
|
+
"@serwist/cacheable-response": "8.3.0",
|
|
58
|
+
"@serwist/core": "8.3.0",
|
|
59
|
+
"@serwist/expiration": "8.3.0",
|
|
60
|
+
"@serwist/google-analytics": "8.3.0",
|
|
61
|
+
"@serwist/precaching": "8.3.0",
|
|
62
|
+
"@serwist/routing": "8.3.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@types/common-tags": "1.8.4",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@types/strip-comments": "2.0.4",
|
|
70
70
|
"pretty-bytes": "6.1.1",
|
|
71
71
|
"type-fest": "4.8.3",
|
|
72
|
-
"@serwist/constants": "8.
|
|
72
|
+
"@serwist/constants": "8.3.0"
|
|
73
73
|
},
|
|
74
74
|
"scripts": {
|
|
75
75
|
"build": "rimraf dist && cross-env NODE_OPTIONS='--max-old-space-size=4096' NODE_ENV=production rollup --config rollup.config.js",
|