owl-cli 6.50.0 → 6.52.0
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.
|
@@ -141,27 +141,26 @@ function diff(obj1, obj2,parentKeys){
|
|
|
141
141
|
result.push({
|
|
142
142
|
type:'changed',
|
|
143
143
|
fieldKey : k1,
|
|
144
|
-
parentKeys: parentKeys,
|
|
144
|
+
parentKeys: JSON.stringify(parentKeys),
|
|
145
145
|
oldv : '' +v1,
|
|
146
146
|
newv : '' + v2
|
|
147
147
|
})
|
|
148
148
|
}
|
|
149
149
|
else{
|
|
150
|
-
|
|
151
|
-
if(v1!==v2 && v1===null){
|
|
150
|
+
if(v2!=null && v1==null){
|
|
152
151
|
result.push({
|
|
153
152
|
type:'added',
|
|
154
153
|
fieldKey : k1,
|
|
155
|
-
parentKeys: parentKeys,
|
|
154
|
+
parentKeys: JSON.stringify(parentKeys),
|
|
156
155
|
oldv : null,
|
|
157
156
|
newv : ''+v2
|
|
158
157
|
})
|
|
159
158
|
}
|
|
160
|
-
else if(v1!==null && v2
|
|
159
|
+
else if(v1!==null && v2==null){
|
|
161
160
|
result.push({
|
|
162
161
|
type:'deleted',
|
|
163
162
|
fieldKey : k1,
|
|
164
|
-
parentKeys: parentKeys,
|
|
163
|
+
parentKeys: JSON.stringify(parentKeys),
|
|
165
164
|
oldv : v1,
|
|
166
165
|
newv : v2
|
|
167
166
|
})
|
|
@@ -180,7 +179,7 @@ function diff(obj1, obj2,parentKeys){
|
|
|
180
179
|
type:'changed',
|
|
181
180
|
fieldKey : k1,
|
|
182
181
|
fieldType:'array',
|
|
183
|
-
parentKeys: parentKeys,
|
|
182
|
+
parentKeys: JSON.stringify(parentKeys),
|
|
184
183
|
diff : ret
|
|
185
184
|
});
|
|
186
185
|
}
|
|
@@ -191,7 +190,7 @@ function diff(obj1, obj2,parentKeys){
|
|
|
191
190
|
result.push({
|
|
192
191
|
type:'deleted',
|
|
193
192
|
fieldKey : k1,
|
|
194
|
-
parentKeys: parentKeys,
|
|
193
|
+
parentKeys: JSON.stringify(parentKeys),
|
|
195
194
|
oldv : '' + v1,
|
|
196
195
|
newv : v2
|
|
197
196
|
})
|
|
@@ -207,13 +206,16 @@ function diff(obj1, obj2,parentKeys){
|
|
|
207
206
|
else{
|
|
208
207
|
//v1 == null;
|
|
209
208
|
if(v2!=null){
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
209
|
+
if(v2!=''){
|
|
210
|
+
result.push({
|
|
211
|
+
type:'added',
|
|
212
|
+
fieldKey : k1,
|
|
213
|
+
parentKeys: JSON.stringify(parentKeys),
|
|
214
|
+
oldv : v1,
|
|
215
|
+
newv : v2
|
|
216
|
+
})
|
|
217
|
+
}
|
|
218
|
+
|
|
217
219
|
}
|
|
218
220
|
}
|
|
219
221
|
|
|
@@ -231,7 +233,7 @@ function diff(obj1, obj2,parentKeys){
|
|
|
231
233
|
result.push({
|
|
232
234
|
type:'added',
|
|
233
235
|
fieldKey : k2,
|
|
234
|
-
parentKeys: parentKeys,
|
|
236
|
+
parentKeys: JSON.stringify(parentKeys),
|
|
235
237
|
oldv : v1==null?null:'' + v1,
|
|
236
238
|
newv : '' +v2
|
|
237
239
|
})
|
|
@@ -242,7 +244,7 @@ function diff(obj1, obj2,parentKeys){
|
|
|
242
244
|
type:'added',
|
|
243
245
|
fieldKey : k2,
|
|
244
246
|
fieldType:'array',
|
|
245
|
-
parentKeys: parentKeys,
|
|
247
|
+
parentKeys: JSON.stringify(parentKeys),
|
|
246
248
|
diff : v2
|
|
247
249
|
});
|
|
248
250
|
}
|
|
@@ -250,7 +252,7 @@ function diff(obj1, obj2,parentKeys){
|
|
|
250
252
|
result.push({
|
|
251
253
|
type:'added',
|
|
252
254
|
fieldKey : k2,
|
|
253
|
-
parentKeys: parentKeys,
|
|
255
|
+
parentKeys: JSON.stringify(parentKeys),
|
|
254
256
|
oldv:null,
|
|
255
257
|
newv:v2
|
|
256
258
|
});
|
|
@@ -572,6 +572,7 @@ var @projectCodeService = (function (pigeon) {
|
|
|
572
572
|
|
|
573
573
|
if(formSpecs && formSpecs.meta && formSpecs.meta.changeLogEnabled){
|
|
574
574
|
var diffresult = diff(oldObj,obj,[]);
|
|
575
|
+
var userName = env.loginUser && env.loginUser.name;
|
|
575
576
|
var changeLog = {
|
|
576
577
|
nv : obj._v,
|
|
577
578
|
ov : oldObj._v,
|
|
@@ -579,6 +580,7 @@ var @projectCodeService = (function (pigeon) {
|
|
|
579
580
|
ot: spec['_t'],
|
|
580
581
|
ts: obj.owl_modifyTime,
|
|
581
582
|
uid: env.loginUserId,
|
|
583
|
+
nn: userName,
|
|
582
584
|
cli: env.cli,
|
|
583
585
|
jobId:env.jobId,
|
|
584
586
|
diff:diffresult
|