@tangelo/tangelo-configuration-toolkit 1.17.0 → 1.17.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangelo/tangelo-configuration-toolkit",
3
- "version": "1.17.0",
3
+ "version": "1.17.1",
4
4
  "engines": {
5
5
  "node": ">=14.0.0"
6
6
  },
@@ -28,7 +28,7 @@ module.exports = function packageUpdateCheck () {
28
28
  const updateMsg = (va) => `| Update ${pkg} to ${va} | ` + `npm i -g ${_packages[pkg].name}`.white;
29
29
  const {versionAvailable} = _appdata[`updateCheck${pkg}`] || {};
30
30
 
31
- if (new Date() - new Date(_appdata[`updateCheck${pkg}`]?.executed || 0) > 1000*3600*24*7) { // check every week
31
+ if (new Date() - new Date(_appdata[`updateCheck${pkg}`]?.executed || 0) > 1000*3600*24*1) { // check every day
32
32
  doUpdateCheck(pkg).then(r => r && _warn(updateMsg(r)));
33
33
  }
34
34
  else if (versionAvailable) {
@@ -235,8 +235,15 @@ module.exports = {
235
235
 
236
236
  return cmdExec(`${fdt} localization extract ${templateFile} --paths ` + packagesDirs)
237
237
  .then(() => cmdExec(`${fdt} localization update ${messagesFile} ${templateFile}`))
238
- .then(() => fs.readFile(messagesFile, {encoding: 'UTF-8'}))
239
- .then(data => fs.outputFile(messagesFile, data.replace(/src\/operations-_/g, 'src/_'))) // remove "operations-" prefix from meta[.file]
238
+ .then(() => fs.readJson(messagesFile))
239
+ .then(data => // compress meta object into string array "refs" and remove "operations-" prefix from paths
240
+ data.map(msg => {
241
+ msg.refs = msg.meta.map(r => Object.values(r).join(':').replace(/src\/operations-_/, 'src/_'));
242
+ delete msg.meta;
243
+ return msg;
244
+ })
245
+ )
246
+ .then(data => fs.outputJson(messagesFile, data, {spaces: 2}))
240
247
  .then(() => {
241
248
  _info('Cleanup temp files:');
242
249
  return del([templateFile, ...attrCfgTmpFiles]);
@@ -51,7 +51,7 @@ module.exports = function migrate (argv) {
51
51
  a.script = cmdlScript.value;
52
52
  }
53
53
 
54
- let filter = path.join(_paths.apply, argv.filter).toFws(); // Default set filter with filter added to the command argument -f
54
+ let filter = path.join(_paths.apply, argv.filter??'**').toFws(); // Default set filter with filter added to the command argument -f
55
55
 
56
56
  if (a.filter === 'projects' && _repoconfig.length > a.projects.length) {
57
57
  // push paths of chosen active documents to projectFolders (only if not all projects are chosen)