@tangelo/tangelo-configuration-toolkit 1.9.1 → 1.9.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangelo/tangelo-configuration-toolkit",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2",
|
|
4
4
|
"description": "Tangelo Configuration Toolkit is a command-line toolkit which offers support for developing a Tangelo configuration.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"tct": "bin/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"node-ssh": "^12.0.2",
|
|
42
42
|
"object-assign-deep": "^0.4.0",
|
|
43
43
|
"p-limit": "^3.1.0",
|
|
44
|
-
"replace-in-file": "^3.
|
|
44
|
+
"replace-in-file": "^6.3.2",
|
|
45
45
|
"sass": "^1.43.5",
|
|
46
46
|
"saxon-js": "^2.3.0",
|
|
47
47
|
"ssh2-sftp-client": "^7.2.2",
|
package/src/lib/gulp-sftp.js
CHANGED
|
@@ -25,7 +25,7 @@ module.exports = function(ftpConfig, remotedir) {
|
|
|
25
25
|
if (!files[0]) cb();
|
|
26
26
|
|
|
27
27
|
const paths = [...new Set(files.map(({destination}) => path.dirname(destination)))] // collect unique paths
|
|
28
|
-
.filter((p1, i, a) => !a.find(p2 => p1 != p2 && p2.includes(p1))) // remove paths being part of others
|
|
28
|
+
.filter((p1, i, a) => !a.find(p2 => p1 != p2 && p2.includes(p1+'/'))) // remove paths being part of others
|
|
29
29
|
;
|
|
30
30
|
|
|
31
31
|
sftp.connect(ftpConfig)
|
|
@@ -2,10 +2,10 @@ const fs = require('fs-extra');
|
|
|
2
2
|
const globby = require('globby');
|
|
3
3
|
const minimatch = require('minimatch');
|
|
4
4
|
const path = require('path');
|
|
5
|
-
const rif
|
|
5
|
+
const rif = require('replace-in-file');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
const getPaths
|
|
8
|
+
const getPaths = (search, filter) =>
|
|
9
9
|
globby
|
|
10
10
|
.sync(search, {dot: true, ignore: [_paths.tdi + '/**','**/cmscustom/tdi/**']})
|
|
11
11
|
.filter(p => !filter || minimatch(p, filter)
|
|
@@ -47,9 +47,11 @@ module.exports = function steps (step, dry, filter) {
|
|
|
47
47
|
r.to = r.fromtoPairs.map(p => p[1]);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
let filesModCount;
|
|
51
|
+
for (let i=0; i<20 && !dry && r.files[0]; i++) { // execute repeatedly for modified files only (with safety limit of 20)
|
|
52
|
+
r.files = rif.sync(r).filter(f => f.hasChanged).map(f => f.file);
|
|
53
|
+
if (i==0) filesModCount = r.files.length; // save count only after first run (after this only subsets are processed)
|
|
54
|
+
}
|
|
53
55
|
|
|
54
56
|
_write('Files modified:', filesModCount);
|
|
55
57
|
});
|