cob-cli 2.6.2 → 2.6.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cob-cli",
3
- "version": "2.6.2",
3
+ "version": "2.6.3",
4
4
  "description": "A command line utility to help Cult of Bits partners develop with higher speed and reusing common code and best practices.",
5
5
  "preferGlobal": true,
6
6
  "repository": {
@@ -30,7 +30,7 @@ def getAuditFieldsUpdates(auditFields,instanceFields) {
30
30
  auditFields.each { auditField ->
31
31
  if( auditField.op == "creator" && msg.action == "update" && msg.value(auditField.name) != null) return // 'creator' fields are only changed in 'update' if the previous value was empty (meaning it was a field that was not visible)
32
32
  if( msg.action == 'update' && !msg.diff) return // Only continues if there is at least one change
33
- if( auditField.args == "usermURI") {
33
+ if( auditField.args == "uri") {
34
34
  updates << [(auditField.name) : actionPacks.get("userm").getUser(msg.user).data._links.self]
35
35
 
36
36
  } else if( auditField.args == "username") {
@@ -46,8 +46,7 @@ def getAuditFieldsUpdates(auditFields,instanceFields) {
46
46
 
47
47
  // ========================================================================================================
48
48
  def getAuditFields(definitionName) {
49
- /**/log.info("[\$audit] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
50
- /**/log.info("[\$audit] Update 'auditFields' for '$definitionName'... ");
49
+ log.info("[\$audit] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
51
50
 
52
51
  // Obtém detalhes da definição
53
52
  def definitionEncoded = URLEncoder.encode(definitionName, "utf-8").replace("+", "%20")
@@ -68,14 +67,14 @@ def getAuditFields(definitionName) {
68
67
  // Finalmente obtém a lista de campos que é necessário calcular
69
68
  def auditFields = [];
70
69
  fields.each { fieldId,field ->
71
- def matcher = field.description =~ /[$]audit\.(creator|updater)\.(username|usermURI|time)/
70
+ def matcher = field.description =~ /[$]audit\.(creator|updater)\.(username|uri|time)/
72
71
  if(matcher) {
73
72
  def op = matcher[0][1]
74
73
  def arg = matcher[0][2]
75
74
  auditFields << [fieldId: fieldId, name:field.name, op : op, args: arg]
76
75
  }
77
76
  }
78
- log.info("[\$audit] fields for '$definitionName': $auditFields");
79
- /**/log.info("[\$audit] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
77
+ log.info("[\$audit] Update 'auditFields' for '$definitionName': $auditFields");
78
+ log.info("[\$audit] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
80
79
  return auditFields
81
80
  }
@@ -2,14 +2,14 @@
2
2
  cob.custom.customize.push(function (core, utils, ui) {
3
3
  core.customizeAllInstances((instance, presenter) =>
4
4
  {
5
- let userFPs = presenter.findFieldPs( fp => /[$]audit\.(creator|updater)\.(username|usermURI|time)/.exec(fp.field.fieldDefinition.description) )
5
+ let userFPs = presenter.findFieldPs( fp => /[$]audit\.(creator|updater)\.(username|uri|time)/.exec(fp.field.fieldDefinition.description) )
6
6
  userFPs.forEach( fp => {
7
7
  fp.disable()
8
8
  if(!instance.isNew() || presenter.isGroupEdit()) return //Only update if it's on create interface (updates will only be changed by the backend)
9
9
  if(/[$]audit\.(creator|updater)\.username/.exec(fp.field.fieldDefinition.description)) {
10
10
  fp.setValue(core.getCurrentLoggedInUser())
11
11
  }
12
- if(/[$]audit\.(creator|updater)\.usermURI/.exec(fp.field.fieldDefinition.description)) {
12
+ if(/[$]audit\.(creator|updater)\.uri/.exec(fp.field.fieldDefinition.description)) {
13
13
  fp.setValue(core.getCurrentLoggedInUserUri())
14
14
  }
15
15
  if(/[$]audit\.(creator|updater)\.time/.exec(fp.field.fieldDefinition.description)) {
@@ -119,7 +119,6 @@ def getAllAplicableValuesForVarName(fieldId,varName,varFieldIds,instanceFields,t
119
119
  // ========================================================================================================
120
120
  def getAllCalculationFields(definitionName) {
121
121
  log.info("[\$calc] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
122
- log.info("[\$calc] update 'calculationFields' for '$definitionName'... ");
123
122
 
124
123
  // Obtém detalhes da definição
125
124
  def definitionEncoded = URLEncoder.encode(definitionName, "utf-8").replace("+", "%20")
@@ -156,7 +155,7 @@ def getAllCalculationFields(definitionName) {
156
155
  }
157
156
  previousId = fieldId
158
157
  }
159
- log.info("[\$calc] fields for '$definitionName': $calculationFields");
158
+ log.info("[\$calc] Update 'calculationFields' for '$definitionName': $calculationFields");
160
159
  log.info("[\$calc] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
161
160
  return calculationFields
162
161
  }