cob-cli 2.37.2 → 2.38.2

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.
@@ -51,8 +51,9 @@ async function _syncFiles(executionType, cmdEnv, from, to, extraOptions = []) {
51
51
  "--delete",
52
52
  "--chmod=Fg+w",
53
53
  "--no-perms",
54
+ "--filter='merge " + path.resolve(__dirname,"rsyncFilter-pre.txt") + "'",
54
55
  cmdEnv.rsyncFilter ? "--filter='merge " + cmdEnv.rsyncFilter + "'" : "",
55
- "--filter='merge " + path.resolve(__dirname,"rsyncFilter.txt") + "'",
56
+ "--filter='merge " + path.resolve(__dirname,"rsyncFilter-post.txt") + "'",
56
57
  executionType == _syncFiles.COPY ? "-v" : "--dry-run"
57
58
  ].concat(productExtraOptions),
58
59
  { shell: true, env: { "RSYNC_RSH": "ssh -v -o ConnectTimeout=30 -o ServerAliveInterval=30 -o ServerAliveCountMax=30" } }
@@ -9,25 +9,4 @@
9
9
  - /hornetq
10
10
  - /elasticsearch
11
11
  - /db
12
- - /reports
13
-
14
- - health.conf
15
-
16
- - uploaded
17
- - .processed
18
- - .failed
19
- - recordm-importer.log*
20
- - recordm-importer*.jar
21
-
22
- - node_modules
23
- - .git
24
- - .gitkeep
25
- - *.rc
26
- - *.iml
27
- - *.swap
28
- - *.swp
29
- - .DS_Store
30
- - .env.json
31
- - .idea
32
-
33
- - **.ENV__*__.*
12
+ - /reports
@@ -0,0 +1,20 @@
1
+ - health.conf
2
+
3
+ - uploaded
4
+ - .processed
5
+ - .failed
6
+ - recordm-importer.log*
7
+ - recordm-importer*.jar
8
+
9
+ - node_modules
10
+ - .git
11
+ - .gitkeep
12
+ - *.rc
13
+ - *.iml
14
+ - *.swap
15
+ - *.swp
16
+ - .DS_Store
17
+ - .env.json
18
+ - .idea
19
+
20
+ - **.ENV__*__.*
@@ -1,3 +1,4 @@
1
+ const chokidar = require('chokidar');
1
2
  const fs = require('fs-extra');
2
3
  const execa = require('execa');
3
4
  const git = require('simple-git');
@@ -56,8 +57,14 @@ async function otherFilesContiousReload(cmdEnv) {
56
57
  const changedFile = change.split(" ")[1];
57
58
  await addFileToCurrentTest(cmdEnv.server, changedFile, changedFiles, changeType, restoreChanges);
58
59
  }
59
-
60
- watcher.process = fs.watch('.', { recursive: true }, async (eventType, changedFile) => {
60
+ watcher.process = chokidar.watch('.', {
61
+ //ignored: /(^|[\/\\])\../, // ignore dotfiles
62
+ persistent: true,
63
+ usePolling: true,
64
+ ignoreInitial: true
65
+ });
66
+ watcher.process.on('all', async (eventType, changedFile) => {
67
+ console.log(eventType, changedFile);
61
68
  // Não é preciso fazer nada para directorias que só existem no servidor
62
69
  let product = changedFile.split("/")[0];
63
70
  let productDir = resolveCobPath(cmdEnv.server, "serverLive", product).split(":")[1];
@@ -72,7 +79,7 @@ async function otherFilesContiousReload(cmdEnv) {
72
79
 
73
80
  let isLocalFile = false;
74
81
  try {
75
- isFile = fs.lstatSync(changedFile).isFile()
82
+ isLocalFile = fs.lstatSync(changedFile).isFile()
76
83
  } catch {}
77
84
 
78
85
  if (
@@ -86,6 +93,7 @@ async function otherFilesContiousReload(cmdEnv) {
86
93
  && changedFile.indexOf(IN_PROGRESS_TEST_FILE) < 0
87
94
  && (isLocalFile || await isRemoteFile())
88
95
  ) {
96
+
89
97
  try {
90
98
  await addFileToCurrentTest(cmdEnv.server, changedFile, changedFiles, " Syncing ".bgRed.bold + " ", restoreChanges );
91
99
  changedFiles.add(changedFile);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cob-cli",
3
- "version": "2.37.2",
3
+ "version": "2.38.2",
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": {
@@ -33,7 +33,8 @@
33
33
  "webpack": "^5.75.0",
34
34
  "webpack-cli": "^5.0.1",
35
35
  "webpack-dev-server": "^4.11.1",
36
- "xdg-basedir": "^5.1.0"
36
+ "xdg-basedir": "^5.1.0",
37
+ "chokidar": "^3.5.3"
37
38
  },
38
39
  "keywords": [],
39
40
  "author": "mimes70",