av6-core 1.1.6 → 1.1.7
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.js +4 -5
- package/dist/index.mjs +4 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2064,10 +2064,7 @@ var AuditProxy = class {
|
|
|
2064
2064
|
return original;
|
|
2065
2065
|
}
|
|
2066
2066
|
const isOwn = Object.prototype.hasOwnProperty.call(target, prop);
|
|
2067
|
-
if (!isOwn) {
|
|
2068
|
-
return original;
|
|
2069
|
-
}
|
|
2070
|
-
if (prop === "constructor") {
|
|
2067
|
+
if (!isOwn || prop === "constructor") {
|
|
2071
2068
|
return original;
|
|
2072
2069
|
}
|
|
2073
2070
|
if (wrappedCache.has(prop)) {
|
|
@@ -2086,13 +2083,15 @@ var AuditProxy = class {
|
|
|
2086
2083
|
} finally {
|
|
2087
2084
|
const hasError = !!error;
|
|
2088
2085
|
const message = hasError ? `Error in ${serviceName}.${methodName}` : `Executed ${serviceName}.${methodName}`;
|
|
2089
|
-
|
|
2086
|
+
logger.logIfEnabled({
|
|
2090
2087
|
service: serviceName,
|
|
2091
2088
|
method: methodName,
|
|
2092
2089
|
payload: {
|
|
2093
2090
|
message,
|
|
2094
2091
|
type: hasError ? "ERROR" : "INFO"
|
|
2095
2092
|
}
|
|
2093
|
+
}).catch((err) => {
|
|
2094
|
+
console.error("[Audit] Failed to log audit:", err);
|
|
2096
2095
|
});
|
|
2097
2096
|
}
|
|
2098
2097
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -2015,10 +2015,7 @@ var AuditProxy = class {
|
|
|
2015
2015
|
return original;
|
|
2016
2016
|
}
|
|
2017
2017
|
const isOwn = Object.prototype.hasOwnProperty.call(target, prop);
|
|
2018
|
-
if (!isOwn) {
|
|
2019
|
-
return original;
|
|
2020
|
-
}
|
|
2021
|
-
if (prop === "constructor") {
|
|
2018
|
+
if (!isOwn || prop === "constructor") {
|
|
2022
2019
|
return original;
|
|
2023
2020
|
}
|
|
2024
2021
|
if (wrappedCache.has(prop)) {
|
|
@@ -2037,13 +2034,15 @@ var AuditProxy = class {
|
|
|
2037
2034
|
} finally {
|
|
2038
2035
|
const hasError = !!error;
|
|
2039
2036
|
const message = hasError ? `Error in ${serviceName}.${methodName}` : `Executed ${serviceName}.${methodName}`;
|
|
2040
|
-
|
|
2037
|
+
logger.logIfEnabled({
|
|
2041
2038
|
service: serviceName,
|
|
2042
2039
|
method: methodName,
|
|
2043
2040
|
payload: {
|
|
2044
2041
|
message,
|
|
2045
2042
|
type: hasError ? "ERROR" : "INFO"
|
|
2046
2043
|
}
|
|
2044
|
+
}).catch((err) => {
|
|
2045
|
+
console.error("[Audit] Failed to log audit:", err);
|
|
2047
2046
|
});
|
|
2048
2047
|
}
|
|
2049
2048
|
};
|