Skip to content

Commit 0bfa7e0

Browse files
authored
Merge 8f3f6a2 into 3273c85
2 parents 3273c85 + 8f3f6a2 commit 0bfa7e0

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

packages/client/lib/commands/ACL_LOG.spec.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ describe('ACL LOG', () => {
3737
'age-seconds',
3838
'4.096',
3939
'client-info',
40-
'id=6 addr=127.0.0.1:63026 fd=8 name= age=9 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=48 qbuf-free=32720 obl=0 oll=0 omem=0 events=r cmd=auth user=default'
40+
'id=6 addr=127.0.0.1:63026 fd=8 name= age=9 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=48 qbuf-free=32720 obl=0 oll=0 omem=0 events=r cmd=auth user=default',
41+
'entry-id',
42+
0,
43+
'timestamp-created',
44+
1675361492408,
45+
'timestamp-last-updated',
46+
1675361492408
4147
]]),
4248
[{
4349
count: 1,
@@ -46,7 +52,10 @@ describe('ACL LOG', () => {
4652
object: 'AUTH',
4753
username: 'someuser',
4854
ageSeconds: 4.096,
49-
clientInfo: 'id=6 addr=127.0.0.1:63026 fd=8 name= age=9 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=48 qbuf-free=32720 obl=0 oll=0 omem=0 events=r cmd=auth user=default'
55+
clientInfo: 'id=6 addr=127.0.0.1:63026 fd=8 name= age=9 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=48 qbuf-free=32720 obl=0 oll=0 omem=0 events=r cmd=auth user=default',
56+
entryId: 0,
57+
timestampCreated: 1675361492408,
58+
timestampLastUpdated: 1675361492408
5059
}]
5160
);
5261
});

packages/client/lib/commands/ACL_LOG.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ type AclLogRawReply = [
2424
_: RedisCommandArgument,
2525
ageSeconds: RedisCommandArgument,
2626
_: RedisCommandArgument,
27-
clientInfo: RedisCommandArgument
27+
clientInfo: RedisCommandArgument,
28+
_: RedisCommandArgument,
29+
entryId: number,
30+
_: RedisCommandArgument,
31+
timestampCreated: number,
32+
_: RedisCommandArgument,
33+
timestampLastUpdated: number,
2834
];
2935

3036
interface AclLog {
@@ -35,6 +41,9 @@ interface AclLog {
3541
username: RedisCommandArgument;
3642
ageSeconds: number;
3743
clientInfo: RedisCommandArgument;
44+
entryId: number;
45+
timestampCreated: number;
46+
timestampLastUpdated: number;
3847
}
3948

4049
export function transformReply(reply: Array<AclLogRawReply>): Array<AclLog> {
@@ -45,6 +54,9 @@ export function transformReply(reply: Array<AclLogRawReply>): Array<AclLog> {
4554
object: log[7],
4655
username: log[9],
4756
ageSeconds: Number(log[11]),
48-
clientInfo: log[13]
57+
clientInfo: log[13],
58+
entryId: log[15],
59+
timestampCreated: log[17],
60+
timestampLastUpdated: log[19],
4961
}));
5062
}

0 commit comments

Comments
 (0)