@tangelo/tangelo-configuration-toolkit 1.10.0 → 1.10.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": "@tangelo/tangelo-configuration-toolkit",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.3",
|
|
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",
|
|
@@ -91,7 +91,7 @@ module.exports = {
|
|
|
91
91
|
let transferPattern = path.join(_paths.apply, filter).toFws();
|
|
92
92
|
|
|
93
93
|
// test if 'cmscustom/tdi' would be included, then add specifically, because following symlinks doesnt work with glob stars
|
|
94
|
-
const tdiIncRegex = /^(({\w*,?)?cmscustom(,?\w*})?\/|\*\/)?\*\*/;
|
|
94
|
+
const tdiIncRegex = /^(config\/)?(({\w*,?)?cmscustom(,?\w*})?\/|\*\/)?\*\*/;
|
|
95
95
|
const tdiPattern = tdiIncRegex.test(transferPattern) ? transferPattern.replace(tdiIncRegex, `${this.deliveryPack ? 'config/' : ''}cmscustom/tdi/**`) : 'nomatch';
|
|
96
96
|
|
|
97
97
|
if (!transferPattern)
|
|
@@ -171,7 +171,7 @@ const transfer = (paths, lrServer) => {
|
|
|
171
171
|
.pipe(g_replace(c.replaceStrings))
|
|
172
172
|
.pipe(through2.obj((file, enc, cb) => {
|
|
173
173
|
file.originalRelativePath = file.relative; // original path needed for sftp.fastPut
|
|
174
|
-
file.path = file.path.replace(/(fonto)
|
|
174
|
+
file.path = file.path.replace(/(fonto).(?:dev|dist|packages.sx-shell-.+src)(.+)/, '$1$2'); // change destination path for fonto build files
|
|
175
175
|
if (!file.relative.endsWith('.map')) files.push(file.relative); // collect all file paths in array for livereload
|
|
176
176
|
cb(null, file);
|
|
177
177
|
}))
|
|
@@ -49,7 +49,7 @@ module.exports = function deploy (argv) {
|
|
|
49
49
|
const transfers = {
|
|
50
50
|
queue: [],
|
|
51
51
|
do () {
|
|
52
|
-
this.queue = this.queue.map(p => p.replace(/(
|
|
52
|
+
this.queue = this.queue.map(p => p.replace(/fonto(.)(?:dist|dev).assets.schemas(.sx-shell-.*?).json/, 'fonto$1packages$2$1src$1assets$1schemas$2.json')) // fonto schema changes can be detected in different paths at the same time, rewrite paths to original package-path because files in build folders can be removed before transfer starts
|
|
53
53
|
this.queue = [...new Set(this.queue)]; // remove duplicates
|
|
54
54
|
this.queue.forEach(v => s.addToCache(v));
|
|
55
55
|
transfer(this.queue, lrServer);
|
|
@@ -75,9 +75,9 @@ module.exports = function deploy (argv) {
|
|
|
75
75
|
if ((event=='add' || event=='change') && (
|
|
76
76
|
// within fonto, transfer build files only, but also schema files, because
|
|
77
77
|
// the "dist" folder isn't watched properly: it does not detect "assets" anymore after building once
|
|
78
|
-
!/fonto[\\\/]/.test(filepath) ||
|
|
79
|
-
/fonto[\\\/]dist/.test(filepath) ||
|
|
80
|
-
(/fonto[\\\/]dev/.test(filepath) && c.envDev) ||
|
|
78
|
+
!/cmscustom.+fonto[\\\/]/.test(filepath) ||
|
|
79
|
+
/fonto[\\\/]dist[\\\/]/.test(filepath) ||
|
|
80
|
+
(/fonto[\\\/]dev[\\\/]/.test(filepath) && c.envDev) ||
|
|
81
81
|
/fonto[\\\/]packages[\\\/]sx-shell-.*?[\\\/]assets[\\\/]schemas[\\\/]/.test(filepath)
|
|
82
82
|
)
|
|
83
83
|
) {
|
|
@@ -149,7 +149,7 @@ module.exports = {
|
|
|
149
149
|
// execute "fdt elements" for each schema package, ignore default elements, and combine results
|
|
150
150
|
const schemasPerElement = {};
|
|
151
151
|
Object.entries(rootSchemas).forEach(([path, obj]) => {
|
|
152
|
-
const data = execSync(`fdt elements --schema
|
|
152
|
+
const data = execSync(`fdt elements --schema packages/${obj.packageName}/src/assets/schemas/${obj.packageName}.json -C name`, {encoding: 'UTF-8'});
|
|
153
153
|
const elements = data.replace(/^.*?Name\*|Printed name\*.*$/gs, '').split(/\s+/);
|
|
154
154
|
const customElements = [...new Set(elements)].filter(e => e && !ignoreElements.includes(e));
|
|
155
155
|
|
|
@@ -195,7 +195,7 @@ module.exports = {
|
|
|
195
195
|
// execute "fdt attributes" for each schema package, ignore default attributes, and combine results
|
|
196
196
|
const schemasPerAttribute = {};
|
|
197
197
|
Object.entries(rootSchemas).forEach(([path, obj]) => {
|
|
198
|
-
const data = execSync(`fdt attributes --schema
|
|
198
|
+
const data = execSync(`fdt attributes --schema packages/${obj.packageName}/src/assets/schemas/${obj.packageName}.json`, {encoding: 'UTF-8'});
|
|
199
199
|
const attributes = data.replace(/^.*?Default value\s+|\s+Printed name\*.*$/gs, '').split(/\n\s+/).map(a => a.split(/\s+/)).map(a =>
|
|
200
200
|
a[0] + (a[2]=='required' ? ' (required)' : '') + (a[3]=='-' ? ' (no default)' : '')
|
|
201
201
|
);
|