@uniformdev/transformer 1.1.32 → 1.1.33
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 +47 -25
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -4766,20 +4766,31 @@ function createRemoveParameterCommand() {
|
|
|
4766
4766
|
const fileSystem = new FileSystemService();
|
|
4767
4767
|
const componentService = new ComponentService(fileSystem);
|
|
4768
4768
|
const remover = new ParameterRemoverService(fileSystem, componentService, logger);
|
|
4769
|
+
const componentTypes = options.componentType.split("|").map((t) => t.trim()).filter(Boolean);
|
|
4770
|
+
const aggregate = {
|
|
4771
|
+
compositionsModified: 0,
|
|
4772
|
+
compositionPatternsModified: 0,
|
|
4773
|
+
componentPatternsModified: 0
|
|
4774
|
+
};
|
|
4769
4775
|
try {
|
|
4770
|
-
const
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4776
|
+
for (const componentType of componentTypes) {
|
|
4777
|
+
const result = await remover.remove({
|
|
4778
|
+
rootDir: options.rootDir,
|
|
4779
|
+
componentsDir: options.componentsDir,
|
|
4780
|
+
compositionsDir: options.compositionsDir,
|
|
4781
|
+
compositionPatternsDir: options.compositionPatternsDir,
|
|
4782
|
+
componentPatternsDir: options.componentPatternsDir,
|
|
4783
|
+
componentType,
|
|
4784
|
+
parameterId: options.parameterId,
|
|
4785
|
+
whatIf: options.whatIf ?? false,
|
|
4786
|
+
strict: options.strict ?? false
|
|
4787
|
+
});
|
|
4788
|
+
aggregate.compositionsModified += result.compositionsModified;
|
|
4789
|
+
aggregate.compositionPatternsModified += result.compositionPatternsModified;
|
|
4790
|
+
aggregate.componentPatternsModified += result.componentPatternsModified;
|
|
4791
|
+
}
|
|
4781
4792
|
logger.success(
|
|
4782
|
-
`Removed parameter: ${
|
|
4793
|
+
`Removed parameter: ${aggregate.compositionsModified} composition(s), ${aggregate.compositionPatternsModified} composition pattern(s), ${aggregate.componentPatternsModified} component pattern(s) updated`
|
|
4783
4794
|
);
|
|
4784
4795
|
} catch (error) {
|
|
4785
4796
|
if (error instanceof TransformError) {
|
|
@@ -5036,20 +5047,31 @@ function createRemoveFieldCommand() {
|
|
|
5036
5047
|
const fileSystem = new FileSystemService();
|
|
5037
5048
|
const componentService = new ComponentService(fileSystem);
|
|
5038
5049
|
const remover = new FieldRemoverService(fileSystem, componentService, logger);
|
|
5050
|
+
const componentTypes = options.componentType.split("|").map((t) => t.trim()).filter(Boolean);
|
|
5051
|
+
const aggregate = {
|
|
5052
|
+
compositionsModified: 0,
|
|
5053
|
+
compositionPatternsModified: 0,
|
|
5054
|
+
componentPatternsModified: 0
|
|
5055
|
+
};
|
|
5039
5056
|
try {
|
|
5040
|
-
const
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5057
|
+
for (const componentType of componentTypes) {
|
|
5058
|
+
const result = await remover.remove({
|
|
5059
|
+
rootDir: options.rootDir,
|
|
5060
|
+
componentsDir: options.componentsDir,
|
|
5061
|
+
compositionsDir: options.compositionsDir,
|
|
5062
|
+
compositionPatternsDir: options.compositionPatternsDir,
|
|
5063
|
+
componentPatternsDir: options.componentPatternsDir,
|
|
5064
|
+
componentType,
|
|
5065
|
+
parameterId: options.parameterId,
|
|
5066
|
+
whatIf: options.whatIf ?? false,
|
|
5067
|
+
strict: options.strict ?? false
|
|
5068
|
+
});
|
|
5069
|
+
aggregate.compositionsModified += result.compositionsModified;
|
|
5070
|
+
aggregate.compositionPatternsModified += result.compositionPatternsModified;
|
|
5071
|
+
aggregate.componentPatternsModified += result.componentPatternsModified;
|
|
5072
|
+
}
|
|
5051
5073
|
logger.success(
|
|
5052
|
-
`Removed field: ${
|
|
5074
|
+
`Removed field: ${aggregate.compositionsModified} composition(s), ${aggregate.compositionPatternsModified} composition pattern(s), ${aggregate.componentPatternsModified} component pattern(s) updated`
|
|
5053
5075
|
);
|
|
5054
5076
|
} catch (error) {
|
|
5055
5077
|
if (error instanceof TransformError) {
|
|
@@ -5792,7 +5814,7 @@ function createFlattenBlockFieldCommand() {
|
|
|
5792
5814
|
// package.json
|
|
5793
5815
|
var package_default = {
|
|
5794
5816
|
name: "@uniformdev/transformer",
|
|
5795
|
-
version: "1.1.
|
|
5817
|
+
version: "1.1.33",
|
|
5796
5818
|
description: "CLI tool for transforming Uniform.dev serialization files offline",
|
|
5797
5819
|
type: "module",
|
|
5798
5820
|
bin: {
|