@yuuvis/client-cli 19.3.1 → 19.3.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": "@yuuvis/client-cli",
3
- "version": "19.3.1",
3
+ "version": "19.3.2",
4
4
  "main": "index.js",
5
5
  "schematics": "./schematics/factories/collection.json",
6
6
  "bin": {
@@ -44,11 +44,16 @@ async function copyTo(directories, outputDir) {
44
44
  const data = fs.existsSync(filePath) ? JSON.parse(fs.readFileSync(filePath, 'utf-8')) : {};
45
45
  return { ...acc, ...data };
46
46
  }, {});
47
+ const sortedMergedData = Object.keys(mergedData)
48
+ .sort().reduce((sortedObj, key) => {
49
+ sortedObj[key] = mergedData[key];
50
+ return sortedObj;
51
+ }, {});
47
52
  if (!fs.existsSync(outputDir)) {
48
53
  fs.mkdirSync(outputDir, { recursive: true });
49
54
  }
50
55
  const outputFilePath = path.join(outputDir, `${lang}.json`);
51
- fs.writeFileSync(outputFilePath, JSON.stringify(mergedData, null, 2), 'utf-8');
56
+ fs.writeFileSync(outputFilePath, JSON.stringify(sortedMergedData, null, 2), 'utf-8');
52
57
  console.log(`Merged ${lang} files into ${outputFilePath}`);
53
58
  }
54
59
  }