@meistrari/audit-sdk 0.3.0 → 0.4.1
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/client.d.ts +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -2
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ export interface AuditEvent {
|
|
|
8
8
|
origin: AuditOrigin;
|
|
9
9
|
actor_type?: ActorType;
|
|
10
10
|
correlation_id?: string;
|
|
11
|
-
ip_address?: string;
|
|
12
11
|
user_agent?: string;
|
|
13
12
|
occurred_at?: Date;
|
|
14
13
|
metadata?: Record<string, unknown>;
|
|
14
|
+
ip_address?: string;
|
|
15
15
|
}
|
|
16
16
|
export interface AuditClientConfig {
|
|
17
17
|
baseUrl?: string;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,IAAI,CAAA;AAEjD,KAAK,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAA;AAC9C,KAAK,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAA;AAE9C,MAAM,WAAW,UAAU;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,WAAW,CAAA;IACnB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,IAAI,C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
|
@@ -56,10 +56,10 @@ export class AuditClient {
|
|
|
56
56
|
lastError = new Error(`Server error: ${response.status}`);
|
|
57
57
|
}
|
|
58
58
|
catch (error) {
|
|
59
|
+
lastError = error;
|
|
59
60
|
if (error instanceof AuditError) {
|
|
60
|
-
|
|
61
|
+
break;
|
|
61
62
|
}
|
|
62
|
-
lastError = error;
|
|
63
63
|
}
|
|
64
64
|
await this.sleep(2 ** attempt * 1000);
|
|
65
65
|
}
|
|
@@ -69,6 +69,7 @@ export class AuditClient {
|
|
|
69
69
|
logger.error({
|
|
70
70
|
level: 'error',
|
|
71
71
|
service: 'audit-sdk',
|
|
72
|
+
// This log message is being monitored, if you change it, make sure to update the monitoring configuration accordingly
|
|
72
73
|
message: 'Failed to send audit events after retries',
|
|
73
74
|
event_count: events.length,
|
|
74
75
|
events,
|