generated from nhcarrigan/template
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 58f411285c | |||
|
de5570b5fc
|
@@ -49,6 +49,18 @@ const initialiseFrontendLogger = (): void => {
|
||||
? argument
|
||||
: JSON.stringify(argument);
|
||||
}).join(" ");
|
||||
|
||||
/*
|
||||
* Ignore errors originating entirely from third-party scripts (e.g. AdSense).
|
||||
* Stack frames from our own code reference elysium.nhcarrigan.com or localhost;
|
||||
* if none are present but external URLs are, the error is not actionable.
|
||||
*/
|
||||
const hasExternalUrl = (/https?:\/\//u).test(message);
|
||||
const hasOurDomain = message.includes("elysium.nhcarrigan.com");
|
||||
const hasOwnFrame = hasOurDomain || message.includes("localhost");
|
||||
if (hasExternalUrl && !hasOwnFrame) {
|
||||
return;
|
||||
}
|
||||
const context = "console.error";
|
||||
post("/api/fe/error", { context, message });
|
||||
};
|
||||
|
||||
+1
-1
@@ -11,6 +11,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nhcarrigan/typescript-config": "4.0.0",
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "6.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+8
-8
@@ -10,10 +10,10 @@ importers:
|
||||
devDependencies:
|
||||
'@nhcarrigan/typescript-config':
|
||||
specifier: 4.0.0
|
||||
version: 4.0.0(typescript@5.9.3)
|
||||
version: 4.0.0(typescript@6.0.2)
|
||||
typescript:
|
||||
specifier: 5.9.3
|
||||
version: 5.9.3
|
||||
specifier: 6.0.2
|
||||
version: 6.0.2
|
||||
|
||||
apps/api:
|
||||
dependencies:
|
||||
@@ -2833,8 +2833,8 @@ packages:
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
typescript@5.9.3:
|
||||
resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}
|
||||
typescript@6.0.2:
|
||||
resolution: {integrity: sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==}
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
@@ -3507,9 +3507,9 @@ snapshots:
|
||||
dependencies:
|
||||
typescript: 5.8.2
|
||||
|
||||
'@nhcarrigan/typescript-config@4.0.0(typescript@5.9.3)':
|
||||
'@nhcarrigan/typescript-config@4.0.0(typescript@6.0.2)':
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
typescript: 6.0.2
|
||||
|
||||
'@nodelib/fs.scandir@2.1.5':
|
||||
dependencies:
|
||||
@@ -6147,7 +6147,7 @@ snapshots:
|
||||
|
||||
typescript@5.8.2: {}
|
||||
|
||||
typescript@5.9.3: {}
|
||||
typescript@6.0.2: {}
|
||||
|
||||
unbox-primitive@1.1.0:
|
||||
dependencies:
|
||||
|
||||
Reference in New Issue
Block a user