@uniformdev/transformer 1.1.18 → 1.1.19
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/dist/cli/index.js +20 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -674,9 +674,26 @@ var CompositionConverterService = class {
|
|
|
674
674
|
for (const inst of instances) {
|
|
675
675
|
const existingId = this.findExistingEntryBySourceItem(inst, sourceItemMap);
|
|
676
676
|
if (existingId) {
|
|
677
|
-
this.
|
|
678
|
-
|
|
677
|
+
const existingEntryPath = this.fileSystem.joinPath(
|
|
678
|
+
entriesDirFull,
|
|
679
|
+
`${existingId}.json`
|
|
679
680
|
);
|
|
681
|
+
this.logger.action(
|
|
682
|
+
whatIf,
|
|
683
|
+
"UPDATE",
|
|
684
|
+
`${entriesDir}/${existingId}.json (${flattenType}, merged fields from "${this.truncate(compositionName, 50)}")`
|
|
685
|
+
);
|
|
686
|
+
if (!whatIf) {
|
|
687
|
+
const existingEntry = await this.fileSystem.readFile(existingEntryPath);
|
|
688
|
+
if (existingEntry?.entry) {
|
|
689
|
+
const instanceFields = inst.instance.parameters ?? {};
|
|
690
|
+
existingEntry.entry.fields = {
|
|
691
|
+
...existingEntry.entry.fields,
|
|
692
|
+
...instanceFields
|
|
693
|
+
};
|
|
694
|
+
await this.fileSystem.writeFile(existingEntryPath, existingEntry);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
680
697
|
entriesReused++;
|
|
681
698
|
continue;
|
|
682
699
|
}
|
|
@@ -4704,7 +4721,7 @@ function createRemoveFieldCommand() {
|
|
|
4704
4721
|
// package.json
|
|
4705
4722
|
var package_default = {
|
|
4706
4723
|
name: "@uniformdev/transformer",
|
|
4707
|
-
version: "1.1.
|
|
4724
|
+
version: "1.1.19",
|
|
4708
4725
|
description: "CLI tool for transforming Uniform.dev serialization files offline",
|
|
4709
4726
|
type: "module",
|
|
4710
4727
|
bin: {
|