How To Guides
How to display differences between a layout and a ledger
CLI allows users to check differences between the active ledger and a selected layout.
Displaying differences using CLI
Bellow is an example of how to find changes between the active ledger and a selected layout using the Minka CLI.
Ensure that you are connected to a server and have an active ledger set in the context before proceeding.
$ minka layout diff
? Select layout: Cross Ledger Payments
Schemas
---------------------------------------------------------------------------
[
...
...
{
data: {
handle: "p2p"
schema: {
properties: {
custom: {
properties: {
description: {
type: "string"
}
}
required: [
"description"
]
type: "object"
}
}
required: [
"custom"
]
}
}
}
...
]
Changes marked with red are present in ledger but not in the layout.
On the other hand, changes marked with green are present in layout but not in ledger
$ minka layout diff
? Select layout: Cross Ledger Payments
Schemas
---------------------------------------------------------------------------
[
...
...
{
data: {
handle: "p2p"
schema: {
properties: {
custom: {
properties: {
description: {
type: "string"
}
}
required: [
"description"
]
type: "object"
}
}
required: [
"custom"
]
}
}
}
...
]
Policies
---------------------------------------------------------------------------
[
...
{
data: {
handle: "default"
values: [
... (3 entries)
{
action: "spend"
action: "any"
}
...
]
}
}
...
]
Use the option --select
to filter the record types you want to see
$ minka layout diff --select=policy
? Select layout: Cross Ledger Payments
Policies
---------------------------------------------------------------------------
[
...
{
data: {
handle: "default"
values: [
... (3 entries)
{
action: "spend"
action: "any"
}
...
]
}
}
...
]