@tangelo/tangelo-configuration-toolkit 1.9.0 → 1.9.1
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/index.js
CHANGED
|
@@ -106,6 +106,7 @@ else {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
|
|
109
|
+
global._tdiSubmoduleExists = fs.existsSync(path.join(_paths.repo, _paths.tdi));
|
|
109
110
|
global._isPre42 = fs.existsSync(path.join(_paths.repo, _paths.tdi, 'create_new_project')); // folder changed in 4.2
|
|
110
111
|
global._isPre51 = !fs.existsSync(path.join(_paths.repo, _paths.tdi, 'src')); // folder changed in 5.1 (check new folder because old one could still exist after branch switch)
|
|
111
112
|
|
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.1",
|
|
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",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"author": "Iddo Fontijn <iddo.fontijn@tangelo.nl>",
|
|
18
18
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"babel
|
|
21
|
-
"babel
|
|
20
|
+
"@babel/core": "^7.17.4",
|
|
21
|
+
"@babel/preset-env": "^7.16.11",
|
|
22
22
|
"cli-spinner": "^0.2.10",
|
|
23
23
|
"compare-versions": "^4.1.1",
|
|
24
24
|
"del": "^6.0.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"global-modules-path": "^2.3.1",
|
|
29
29
|
"globby": "^6.1.0",
|
|
30
30
|
"gulp": "^4.0.2",
|
|
31
|
-
"gulp-babel": "^
|
|
31
|
+
"gulp-babel": "^8.0.0",
|
|
32
32
|
"gulp-eol": "^0.2.0",
|
|
33
33
|
"gulp-filter": "^7.0.0",
|
|
34
34
|
"gulp-plumber": "^1.2.1",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"gulp-sourcemaps": "^3.0.0",
|
|
38
38
|
"inquirer": "^8.2.0",
|
|
39
39
|
"istextorbinary": "^6.0.0",
|
|
40
|
-
"minimatch": "^
|
|
40
|
+
"minimatch": "^5.0.0",
|
|
41
41
|
"node-ssh": "^12.0.2",
|
|
42
42
|
"object-assign-deep": "^0.4.0",
|
|
43
43
|
"p-limit": "^3.1.0",
|
package/src/lib/gulp-sftp.js
CHANGED
|
@@ -54,7 +54,9 @@ module.exports = {
|
|
|
54
54
|
parallel: serverConfig.config.parallel,
|
|
55
55
|
username: serverConfig.config.username,
|
|
56
56
|
agent: process.platform=='win32' ? 'pageant' : process.env.SSH_AUTH_SOCK,
|
|
57
|
-
agentForward: process.platform!='win32'
|
|
57
|
+
agentForward: process.platform!='win32',
|
|
58
|
+
readyTimeout: 10000,
|
|
59
|
+
retries: 1
|
|
58
60
|
}
|
|
59
61
|
};
|
|
60
62
|
|
|
@@ -105,7 +107,7 @@ module.exports = {
|
|
|
105
107
|
|
|
106
108
|
this.transferPatterns = [transferPattern, tdiPattern, ...this.giPatterns, '!**/*.crdownload']; // ignore patterns must come last
|
|
107
109
|
|
|
108
|
-
if (this.deliveryPack && transferPattern.includes(_paths.tdi)) this.transferPatterns.push(`${_paths.tdi}/src/database/create
|
|
110
|
+
if (this.deliveryPack && transferPattern.includes(_paths.tdi)) this.transferPatterns.push(`${_paths.tdi}/src/database/create*.sql`); // create(_exists).sql is called by tdi install
|
|
109
111
|
|
|
110
112
|
// add time parameters to all xopus requests to overcome cache
|
|
111
113
|
const ts = new Date().toISOString().replace(/-|:/g, '').substring(0,15);
|
|
@@ -6,8 +6,7 @@ const {NodeSSH} = require('node-ssh');
|
|
|
6
6
|
const through2 = require('through2');
|
|
7
7
|
const {spawnSync} = require('child_process');
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
const g_babel = require('gulp-babel');
|
|
9
|
+
const g_babel = require('gulp-babel')({presets: [[require('@babel/preset-env'), {modules: false}]], comments: false, minified: true});
|
|
11
10
|
const g_eol = require('gulp-eol');
|
|
12
11
|
const g_filter = require('gulp-filter');
|
|
13
12
|
const g_plumber = require('gulp-plumber');
|
|
@@ -156,7 +155,7 @@ const transfer = (paths, lrServer) => {
|
|
|
156
155
|
.pipe(xpsF.restore)
|
|
157
156
|
.pipe(jsF)
|
|
158
157
|
.pipe(g_sourcemaps.init())
|
|
159
|
-
.pipe(g_babel
|
|
158
|
+
.pipe(g_babel)
|
|
160
159
|
.pipe(g_sourcemaps.write('.'))
|
|
161
160
|
.pipe(jsF.restore)
|
|
162
161
|
.pipe(sassF)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
const del
|
|
2
|
-
const gulp
|
|
3
|
-
const path
|
|
4
|
-
const
|
|
1
|
+
const del = require('del');
|
|
2
|
+
const gulp = require('gulp');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const sftpClient = require('ssh2-sftp-client');
|
|
5
|
+
const tinylr = require('tiny-lr');
|
|
5
6
|
|
|
6
7
|
const {remote, transfer} = require('./execute');
|
|
7
8
|
const c = require('./config');
|
|
@@ -60,6 +61,12 @@ module.exports = function deploy (argv) {
|
|
|
60
61
|
}
|
|
61
62
|
};
|
|
62
63
|
|
|
64
|
+
// check connection
|
|
65
|
+
if (!c.localTransfer) {
|
|
66
|
+
const sftp = new sftpClient();
|
|
67
|
+
sftp.connect(c.server.ftpConfig).then(() => sftp.end()).catch(err => _error(`Could not connect to server${err ? ': '+err.message : ''}`));
|
|
68
|
+
}
|
|
69
|
+
|
|
63
70
|
// for fonto, only watch dev/dist (for the build, does not detect "assets" most of the times btw)
|
|
64
71
|
gulp.watch([...c.transferPatterns, `!**/fonto/!(${c.envDev?'dev|':''}dist)/**`])
|
|
65
72
|
.on('all', (event, filepath) => {
|
|
@@ -6,18 +6,20 @@ const path = require('path');
|
|
|
6
6
|
|
|
7
7
|
module.exports = function fonto (argv) {
|
|
8
8
|
|
|
9
|
+
if (!_tdiSubmoduleExists) _error('TDI submodule folder is missing.');
|
|
10
|
+
|
|
9
11
|
process.chdir(_paths.apply || '.');
|
|
10
|
-
|
|
12
|
+
|
|
11
13
|
// find fonto instances by searching for manifest.json files having a fonto property
|
|
12
14
|
const fontoPaths = globby.sync(['**/manifest.json', `!${_paths.tdi}/**`])
|
|
13
15
|
.filter(p => (fs.readJsonSync(p, {throws: false}) || {}).edition == 'fontoxml-platform-base')
|
|
14
16
|
.map(p => p.replace('manifest.json', ''))
|
|
15
17
|
;
|
|
16
|
-
|
|
18
|
+
|
|
17
19
|
if (fontoPaths.length==0) _error('No Fonto instance found.');
|
|
18
|
-
|
|
20
|
+
|
|
19
21
|
let promiseChain = Promise.resolve(); // for sequentially executing commands for each fonto instance
|
|
20
|
-
|
|
22
|
+
|
|
21
23
|
fontoPaths.forEach((p, i) => {
|
|
22
24
|
promiseChain = promiseChain
|
|
23
25
|
.then(() => {
|
|
@@ -40,5 +42,5 @@ module.exports = function fonto (argv) {
|
|
|
40
42
|
.catch(error => {
|
|
41
43
|
if (error) _warn(error.message || error);
|
|
42
44
|
});
|
|
43
|
-
|
|
45
|
+
|
|
44
46
|
};
|