@uniformdev/transformer 1.1.17 → 1.1.18
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 +35 -7
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +34 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -3299,9 +3299,23 @@ var ComponentAdderService = class {
|
|
|
3299
3299
|
throw error;
|
|
3300
3300
|
}
|
|
3301
3301
|
let allowedComponentsUpdated = false;
|
|
3302
|
+
const resolvedParentTypes = [];
|
|
3302
3303
|
for (const parentType of parentTypes) {
|
|
3303
|
-
this.logger.info(`Loading
|
|
3304
|
-
|
|
3304
|
+
this.logger.info(`Loading component: ${parentType}`);
|
|
3305
|
+
let parentComponent;
|
|
3306
|
+
let parentComponentFilePath;
|
|
3307
|
+
try {
|
|
3308
|
+
const result = await this.componentService.loadComponent(fullComponentsDir, parentType, findOptions);
|
|
3309
|
+
parentComponent = result.component;
|
|
3310
|
+
parentComponentFilePath = result.filePath;
|
|
3311
|
+
} catch (error) {
|
|
3312
|
+
if (error instanceof ComponentNotFoundError) {
|
|
3313
|
+
this.logger.warn(`Component not found: ${parentType} (searched: ${fullComponentsDir})`);
|
|
3314
|
+
continue;
|
|
3315
|
+
}
|
|
3316
|
+
throw error;
|
|
3317
|
+
}
|
|
3318
|
+
resolvedParentTypes.push(parentType);
|
|
3305
3319
|
if (!parentComponent.slots) {
|
|
3306
3320
|
parentComponent.slots = [];
|
|
3307
3321
|
}
|
|
@@ -3369,7 +3383,7 @@ var ComponentAdderService = class {
|
|
|
3369
3383
|
);
|
|
3370
3384
|
this.logger.info("");
|
|
3371
3385
|
this.logger.info(
|
|
3372
|
-
`Summary: ${allowedComponentsUpdated ? `${
|
|
3386
|
+
`Summary: ${allowedComponentsUpdated ? `${resolvedParentTypes.length} component definition(s) updated, ` : ""}${compositionsResult} composition(s), ${compositionPatternsResult} composition pattern(s), ${componentPatternsResult} component pattern(s) updated. ${compositionsResult + compositionPatternsResult + componentPatternsResult} instance(s) added.`
|
|
3373
3387
|
);
|
|
3374
3388
|
return {
|
|
3375
3389
|
allowedComponentsUpdated,
|
|
@@ -3418,9 +3432,23 @@ var ComponentAdderService = class {
|
|
|
3418
3432
|
}
|
|
3419
3433
|
const componentTypeInPattern = patternDefinition.type;
|
|
3420
3434
|
let allowedComponentsUpdated = false;
|
|
3435
|
+
const resolvedParentTypes = [];
|
|
3421
3436
|
for (const parentType of parentTypes) {
|
|
3422
|
-
this.logger.info(`Loading
|
|
3423
|
-
|
|
3437
|
+
this.logger.info(`Loading component: ${parentType}`);
|
|
3438
|
+
let parentComponent;
|
|
3439
|
+
let parentComponentFilePath;
|
|
3440
|
+
try {
|
|
3441
|
+
const result = await this.componentService.loadComponent(fullComponentsDir, parentType, findOptions);
|
|
3442
|
+
parentComponent = result.component;
|
|
3443
|
+
parentComponentFilePath = result.filePath;
|
|
3444
|
+
} catch (error) {
|
|
3445
|
+
if (error instanceof ComponentNotFoundError) {
|
|
3446
|
+
this.logger.warn(`Component not found: ${parentType} (searched: ${fullComponentsDir})`);
|
|
3447
|
+
continue;
|
|
3448
|
+
}
|
|
3449
|
+
throw error;
|
|
3450
|
+
}
|
|
3451
|
+
resolvedParentTypes.push(parentType);
|
|
3424
3452
|
if (!parentComponent.slots) {
|
|
3425
3453
|
parentComponent.slots = [];
|
|
3426
3454
|
}
|
|
@@ -3491,7 +3519,7 @@ var ComponentAdderService = class {
|
|
|
3491
3519
|
);
|
|
3492
3520
|
this.logger.info("");
|
|
3493
3521
|
this.logger.info(
|
|
3494
|
-
`Summary: ${allowedComponentsUpdated ? `${
|
|
3522
|
+
`Summary: ${allowedComponentsUpdated ? `${resolvedParentTypes.length} component definition(s) updated, ` : ""}${compositionsResult} composition(s), ${compositionPatternsResult} composition pattern(s), ${componentPatternsResult} component pattern(s) updated. ${compositionsResult + compositionPatternsResult + componentPatternsResult} instance(s) added.`
|
|
3495
3523
|
);
|
|
3496
3524
|
return {
|
|
3497
3525
|
allowedComponentsUpdated,
|
|
@@ -4676,7 +4704,7 @@ function createRemoveFieldCommand() {
|
|
|
4676
4704
|
// package.json
|
|
4677
4705
|
var package_default = {
|
|
4678
4706
|
name: "@uniformdev/transformer",
|
|
4679
|
-
version: "1.1.
|
|
4707
|
+
version: "1.1.18",
|
|
4680
4708
|
description: "CLI tool for transforming Uniform.dev serialization files offline",
|
|
4681
4709
|
type: "module",
|
|
4682
4710
|
bin: {
|