Skip to content

Commit 3c29180

Browse files
committed
Corrigindo problema no dist
1 parent 9e7d336 commit 3c29180

File tree

2 files changed

+85
-85
lines changed

2 files changed

+85
-85
lines changed

README.md

Lines changed: 83 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -4,115 +4,115 @@ Entity diff generator.
44

55
de:
66

7-
``` json
7+
``` javascript
88
{
9-
"id": 1,
10-
"nome": "Fulano da silva",
11-
"empresa": {
12-
"id": 1,
13-
"nome": "Algum lugar",
14-
"cnpj": "12345678910"
9+
id: 1,
10+
nome: "Fulano da silva",
11+
empresa: {
12+
id: 1,
13+
nome: "Algum lugar",
14+
cnpj: "12345678910"
1515
},
16-
"permissoes": [
16+
permissoes: [
1717
{
18-
"id": 1,
19-
"nome": "ADMINISTRADOR"
18+
id: 1,
19+
nome: "ADMINISTRADOR"
2020
},
2121
{
22-
"id": 2,
23-
"nome": "USUARIO"
22+
id: 2,
23+
nome: "USUARIO"
2424
}
2525
]
2626
}
2727
```
2828

2929
para:
3030

31-
``` json
31+
``` javascript
3232
{
33-
"id": 1,
34-
"nome": "Fulano",
35-
"empresa": {
36-
"id": 2,
37-
"nome": "Outro lugar",
38-
"cnpj": "10987654321"
33+
id: 1,
34+
nome: "Fulano",
35+
empresa: {
36+
id: 2,
37+
nome: "Outro lugar",
38+
cnpj: "10987654321"
3939
},
40-
"permissoes": [
40+
permissoes: [
4141
{
42-
"id": 1,
43-
"nome": "SUPER_USER"
42+
id: 1,
43+
nome: "SUPER_USER"
4444
},
4545
{
46-
"id": 4,
47-
"nome": "PROGRAMADOR"
46+
id: 4,
47+
nome: "PROGRAMADOR"
4848
}
4949
]
5050
}
5151
```
5252

5353
**diff**
5454

55-
``` json
55+
``` javascript
5656
[
57-
{
58-
"key": "nome",
59-
"from": "Fulano da silva",
60-
"to": "Fulano"
61-
},
62-
{
63-
"key": "empresa",
64-
"type": "EDITADO",
65-
"details": [
66-
{
67-
"key": "nome",
68-
"from": "Algum lugar",
69-
"to": "Outro lugar"
70-
},
71-
{
72-
"key": "cnpj",
73-
"from": "12345678910",
74-
"to": "10987654321"
75-
}
57+
{
58+
key: "nome",
59+
from: "Fulano da silva",
60+
to: "Fulano"
61+
},
62+
{
63+
key: "empresa",
64+
type: "EDITADO",
65+
details: [
66+
{
67+
key: "nome",
68+
from: "Algum lugar",
69+
to: "Outro lugar"
70+
},
71+
{
72+
key: "cnpj",
73+
from: "12345678910",
74+
to: "10987654321"
75+
}
76+
]
77+
},
78+
{
79+
key: "permissoes",
80+
type: "LISTA",
81+
details: [
82+
{
83+
key: "ADMINISTRADOR",
84+
type: "EDITADO",
85+
details: [
86+
{
87+
key: "nome",
88+
from: "ADMINISTRADOR",
89+
to: "SUPER_USER"
90+
}
7691
]
77-
},
78-
{
79-
"key": "permissoes",
80-
"type": "LISTA",
81-
"details": [
82-
{
83-
"key": "ADMINISTRADOR",
84-
"type": "EDITADO",
85-
"details": [
86-
{
87-
"key": "nome",
88-
"from": "ADMINISTRADOR",
89-
"to": "SUPER_USER"
90-
}
91-
]
92-
},
93-
{
94-
"key": "USUARIO",
95-
"type": "NOVO",
96-
"details": [
97-
{
98-
"key": "nome",
99-
"from": null,
100-
"to": "USUARIO"
101-
}
102-
]
103-
},
104-
{
105-
"key": "PROGRAMADOR",
106-
"type": "REMOVIDO",
107-
"details": [
108-
{
109-
"key": "nome",
110-
"from": "PROGRAMADOR",
111-
"to": null
112-
}
113-
]
114-
}
92+
},
93+
{
94+
key: "PROGRAMADOR",
95+
type: "NOVO",
96+
details: [
97+
{
98+
key: "nome",
99+
from: null,
100+
to: "PROGRAMADOR"
101+
}
115102
]
116-
}
103+
},
104+
{
105+
key: "USUARIO",
106+
type: "REMOVIDO",
107+
details: [
108+
{
109+
key: "nome",
110+
from: "USUARIO",
111+
to: null
112+
}
113+
]
114+
},
115+
]
116+
}
117117
]
118118
```

dist/Diff.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ var Audit = /** @class */ (function () {
9797
from = utils_1.copySkeleton(from);
9898
}
9999
var modified = this.findModifiedDiffs(from, to, key);
100-
var add = this.findDiffsFromLeftToRight(from, to, key, DiffType.NEW);
101-
var remove = this.findDiffsFromLeftToRight(to, from, key, DiffType.REMOVED);
100+
var add = this.findDiffsFromLeftToRight(to, from, key, DiffType.NEW);
101+
var remove = this.findDiffsFromLeftToRight(from, to, key, DiffType.REMOVED);
102102
return __spreadArrays(modified, add, remove);
103103
};
104104
Audit.prototype.findModifiedDiffs = function (right, left, key) {

0 commit comments

Comments
 (0)