Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
typescript
duniter
Commits
85bad8dd
Commit
85bad8dd
authored
5 years ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
[fix] `search [pattern]` command: add exclusions display
parent
d4834c7f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/modules/dump.ts
+8
-1
8 additions, 1 deletion
app/modules/dump.ts
with
8 additions
and
1 deletion
app/modules/dump.ts
+
8
−
1
View file @
85bad8dd
...
@@ -164,7 +164,7 @@ module.exports = {
...
@@ -164,7 +164,7 @@ module.exports = {
const
blocks
=
Underscore
.
sortBy
(
await
findBlocksMatching
(
pattern
,
files
),
b
=>
b
.
number
)
const
blocks
=
Underscore
.
sortBy
(
await
findBlocksMatching
(
pattern
,
files
),
b
=>
b
.
number
)
const
events
:
{
b
:
BlockDTO
,
event
:
(
IdentityDTO
|
ShortCertificationDTO
|
MembershipDTO
|
ShortRevocation
)
}[]
=
[]
const
events
:
{
b
:
BlockDTO
,
event
:
(
IdentityDTO
|
ShortCertificationDTO
|
MembershipDTO
|
ShortRevocation
|
{
type
:
'
exclusion
'
,
pub
:
string
}
)
}[]
=
[]
for
(
const
b
of
blocks
)
{
for
(
const
b
of
blocks
)
{
b
.
identities
.
filter
(
i
=>
i
.
includes
(
pattern
)).
forEach
(
i
=>
{
b
.
identities
.
filter
(
i
=>
i
.
includes
(
pattern
)).
forEach
(
i
=>
{
events
.
push
({
b
,
event
:
IdentityDTO
.
fromInline
(
i
)
})
events
.
push
({
b
,
event
:
IdentityDTO
.
fromInline
(
i
)
})
...
@@ -178,6 +178,9 @@ module.exports = {
...
@@ -178,6 +178,9 @@ module.exports = {
b
.
revoked
.
filter
(
m
=>
m
.
includes
(
pattern
)).
forEach
(
r
=>
{
b
.
revoked
.
filter
(
m
=>
m
.
includes
(
pattern
)).
forEach
(
r
=>
{
events
.
push
({
b
,
event
:
RevocationDTO
.
fromInline
(
r
)
})
events
.
push
({
b
,
event
:
RevocationDTO
.
fromInline
(
r
)
})
})
})
b
.
excluded
.
filter
(
m
=>
m
.
includes
(
pattern
)).
forEach
(
r
=>
{
events
.
push
({
b
,
event
:
{
type
:
'
exclusion
'
,
pub
:
r
}
})
})
}
}
for
(
const
e
of
events
)
{
for
(
const
e
of
events
)
{
...
@@ -186,6 +189,10 @@ module.exports = {
...
@@ -186,6 +189,10 @@ module.exports = {
const
idty
=
e
.
event
as
IdentityDTO
const
idty
=
e
.
event
as
IdentityDTO
console
.
log
(
'
%s: new identity %s (created on %s)
'
,
date
,
idty
.
uid
,
await
getDateFor
(
server
,
idty
.
buid
as
string
))
console
.
log
(
'
%s: new identity %s (created on %s)
'
,
date
,
idty
.
uid
,
await
getDateFor
(
server
,
idty
.
buid
as
string
))
}
}
if
((
e
.
event
as
{
type
:
'
exclusion
'
,
pub
:
string
}).
type
===
'
exclusion
'
)
{
const
date
=
await
getDateForBlock
(
e
.
b
)
console
.
log
(
'
%s: excluded
'
,
date
)
}
}
}
console
.
log
(
events
.
map
(
e
=>
e
.
event
))
console
.
log
(
events
.
map
(
e
=>
e
.
event
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment