swpp-backends 1.2.1 → 1.2.3
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/FileAnalyzer.js +4 -1
- package/dist/index.js +1 -1
- package/package.json +1 -2
- package/types/SwppConfig.d.ts +2 -2
package/dist/FileAnalyzer.js
CHANGED
|
@@ -355,7 +355,7 @@ async function eachAllLinkInHtml(domain, url, content, result, event) {
|
|
|
355
355
|
html = fast_html_parser_1.default.parse(content, { style: true, script: true });
|
|
356
356
|
}
|
|
357
357
|
catch (e) {
|
|
358
|
-
(0, Utils_1.error)('HtmlParser', `HTML [
|
|
358
|
+
(0, Utils_1.error)('HtmlParser', `HTML [${url}] 中存在错误语法`);
|
|
359
359
|
}
|
|
360
360
|
if (html)
|
|
361
361
|
each(html);
|
|
@@ -385,6 +385,9 @@ async function eachAllLinkInCss(domain, url, content, result, event) {
|
|
|
385
385
|
break;
|
|
386
386
|
}
|
|
387
387
|
break;
|
|
388
|
+
default:
|
|
389
|
+
++i;
|
|
390
|
+
break;
|
|
388
391
|
}
|
|
389
392
|
}
|
|
390
393
|
return -1;
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ const UpdateJsonBuilder_1 = require("./UpdateJsonBuilder");
|
|
|
8
8
|
const VersionAnalyzer_1 = require("./VersionAnalyzer");
|
|
9
9
|
// noinspection JSUnusedGlobalSymbols
|
|
10
10
|
exports.default = {
|
|
11
|
-
version: '1.2.
|
|
11
|
+
version: '1.2.3',
|
|
12
12
|
cache: {
|
|
13
13
|
readEjectData: Utils_1.readEjectData, readUpdateJson: UpdateJsonBuilder_1.readUpdateJson,
|
|
14
14
|
readRules: SwppRules_1.readRules, readMergeVersionMap: FileAnalyzer_1.readMergeVersionMap,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "swpp-backends",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "types/index.d.ts",
|
|
6
6
|
"description": "Generate a powerful ServiceWorker for your website.",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"types"
|
|
12
12
|
],
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@types/css": "^0.0.33",
|
|
15
14
|
"@types/fast-html-parser": "^1.0.2",
|
|
16
15
|
"@types/node": "^20.4.5",
|
|
17
16
|
"@types/node-fetch": "^2.6.4",
|
package/types/SwppConfig.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export interface RegisterConfig {
|
|
|
32
32
|
/** 与 DOM 端有关的配置 */
|
|
33
33
|
export interface DomConfig {
|
|
34
34
|
/** 缓存更新成功后触发的操作 */
|
|
35
|
-
onsuccess
|
|
35
|
+
onsuccess?: VoidFunction;
|
|
36
36
|
}
|
|
37
37
|
/** 与版本文件相关的配置项 */
|
|
38
38
|
export interface VersionJsonConfig {
|
|
@@ -74,7 +74,7 @@ export interface SwppConfigTemplate {
|
|
|
74
74
|
debug?: boolean;
|
|
75
75
|
};
|
|
76
76
|
/** 与 ServiceWorker 注册有关的配置 */
|
|
77
|
-
register
|
|
77
|
+
register?: boolean | {
|
|
78
78
|
/** 注册成功后执行的代码 */
|
|
79
79
|
onsuccess?: VoidFunction;
|
|
80
80
|
/** 注册失败后执行的代码 */
|