cob-cli 2.2.7 → 2.4.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.
@@ -52,7 +52,7 @@ exports.checkVersion = checkVersion;
52
52
 
53
53
  /* ************************************ */
54
54
  function setVersion() {
55
- fs.writeFileSync(VersionFilename, require('../../package.json').version)
55
+ fs.writeFileSync(VersionFilename, REPO_VERSION)
56
56
  }
57
57
  exports.setVersion = setVersion;
58
58
 
@@ -131,7 +131,6 @@ async function _getLastEnvironmentDeployed(server) {
131
131
 
132
132
  /* ************************************ */
133
133
  async function _setLastEnvironmentDeployed(server, environmentName) {
134
- await execa('ssh', [server, "mkdir -p " + SERVER_COB_CLI_DIRECTORY ]); //TODO: remove after new sudo mkdir
135
134
  await execa('ssh', [server, "echo '" + environmentName + "' > " + SERVER_LAST_ENV_FILE ]);
136
135
  }
137
136
 
@@ -63,6 +63,7 @@ async function getLastDeployedSha(server) {
63
63
  result = await execa('ssh', [server, "cat " + SERVER_LAST_SHA_FILE ]);
64
64
  } catch (error) {
65
65
  await execa('ssh', [server, "mkdir -p " + SERVER_COB_CLI_DIRECTORY ]);
66
+ await execa('ssh', [server, "setfacl -d -m group:users:rw " + SERVER_COB_CLI_DIRECTORY ]);
66
67
  return null
67
68
  }
68
69
  return result.stdout;
@@ -8,7 +8,6 @@
8
8
  - /elasticsearch
9
9
  - /db
10
10
  - /reports
11
- - /rancid
12
11
 
13
12
  - health.conf
14
13
 
@@ -56,9 +56,12 @@ module.exports = env => {
56
56
  console.log("[CoB] Serving LOCAL -> " + localPath );
57
57
  }
58
58
  return localPath;
59
+ },
60
+ onProxyRes: response => {
61
+ response.headers['content-security-policy'] = "default-src 'unsafe-inline' 'unsafe-eval' https: data: http:";
59
62
  }
60
63
  }
61
64
  }
62
65
  }
63
66
  }
64
- };
67
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cob-cli",
3
- "version": "2.2.7",
3
+ "version": "2.4.0",
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": {
@@ -1,15 +1,17 @@
1
1
  //--------------- $group apenas com $references assumem 'nome' do $references ---------------------
2
+ // Use $style[use-reference-count] on the containing $group that you want to have the result
2
3
  cob.custom.customize.push(function (core, utils, ui) {
3
4
  core.customizeAllInstances(function(instance, presenter) {
4
5
  var mo = new MutationObserver(function (mutations) {
5
6
  mutations.forEach( m => {
6
- let group = $(m.target).parentsUntil(".field-group").parent().find(".group-name")
7
+ let group = $(m.target).parentsUntil(".field-group.custom-use-reference-count").parent().find(".group-name")
7
8
  let labelHTML = $(m.target).parent()[0].innerHTML
8
9
  group[0].innerHTML = labelHTML.substring(0,labelHTML.indexOf("<div"))
10
+ $(m.target).parent().hide()
9
11
  })
10
12
  });
11
13
 
12
- let references = $('.field-group > ol > li > div > div.references-legend').toArray()
14
+ let references = $('.field-group.custom-use-reference-count > ol > li > div > div.references-legend').toArray()
13
15
  references.forEach( reference => {
14
16
  mo.observe(reference, { childList: true, subtree: true });
15
17
  })