rigjs 2.0.12 → 2.0.13
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/built/index.js +78 -78
- package/lib/publish/index.ts +8 -0
- package/package.json +1 -1
package/lib/publish/index.ts
CHANGED
|
@@ -2,6 +2,12 @@ import CICD from '@/classes/cicd/CICD';
|
|
|
2
2
|
import CICDCmd from '@/classes/cicd/CICDCmd';
|
|
3
3
|
import CDN from '@/classes/cicd/Deploy/CDN';
|
|
4
4
|
|
|
5
|
+
const delay = async (ms: number) => {
|
|
6
|
+
await new Promise((resolve) => {
|
|
7
|
+
setTimeout(resolve, ms);
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
|
|
5
11
|
const setRewriteUri = async (
|
|
6
12
|
domain: string,
|
|
7
13
|
original: string,
|
|
@@ -24,6 +30,7 @@ const setRewriteUri = async (
|
|
|
24
30
|
if (configInfo.DomainConfigs.DomainConfig[0].Status === 'failed') {
|
|
25
31
|
throw new Error('cdn rewrite fail');
|
|
26
32
|
}
|
|
33
|
+
await delay(3000);
|
|
27
34
|
}
|
|
28
35
|
};
|
|
29
36
|
|
|
@@ -45,6 +52,7 @@ const refreshCache = async (urls: string[], cdn: CDN) => {
|
|
|
45
52
|
if (successCount === desResult.Tasks.length) {
|
|
46
53
|
break;
|
|
47
54
|
}
|
|
55
|
+
await delay(3000);
|
|
48
56
|
}
|
|
49
57
|
console.log('RefreshCache Done');
|
|
50
58
|
};
|
package/package.json
CHANGED