cloudflare-next-intl 0.9.22 → 0.9.23
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.
|
@@ -8,6 +8,10 @@ export const defaultStaleDeployPatterns = [
|
|
|
8
8
|
'minified react error #412',
|
|
9
9
|
'the above error occurred in a react component',
|
|
10
10
|
'the connection to the page was unexpectedly closed',
|
|
11
|
+
'readablestream',
|
|
12
|
+
'readable stream',
|
|
13
|
+
'uncaught exception: undefined',
|
|
14
|
+
'uncaught undefined',
|
|
11
15
|
'server action not found',
|
|
12
16
|
'unrecognizedactionerror',
|
|
13
17
|
];
|
|
@@ -25,11 +29,18 @@ export default function isStaleDeployError(error, patterns) {
|
|
|
25
29
|
return true;
|
|
26
30
|
if (!error)
|
|
27
31
|
return false;
|
|
28
|
-
|
|
32
|
+
let message = '';
|
|
33
|
+
if (error instanceof Error) {
|
|
34
|
+
if (error.name === 'ChunkLoadError' || error.name === 'UnrecognizedActionError')
|
|
35
|
+
return true;
|
|
36
|
+
message = (error.message || '').toLowerCase();
|
|
37
|
+
}
|
|
38
|
+
else if (typeof error === 'string') {
|
|
39
|
+
message = error.toLowerCase();
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
29
42
|
return false;
|
|
30
|
-
|
|
31
|
-
return true;
|
|
32
|
-
const message = (error.message || '').toLowerCase();
|
|
43
|
+
}
|
|
33
44
|
const list = patterns ? patterns.map((p) => p.toLowerCase()) : activeLowercasedPatterns;
|
|
34
45
|
for (const pattern of list) {
|
|
35
46
|
if (message.includes(pattern)) {
|