@pega/custom-dx-components 0.242.58 → 0.242.59
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
|
@@ -101,8 +101,8 @@
|
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
103
|
"@pega/configs": "^0.15.1",
|
|
104
|
-
"@pega/custom-dx-components": "~0.242.
|
|
105
|
-
"@pega/pcore-pconnect-typedefs": "
|
|
104
|
+
"@pega/custom-dx-components": "~0.242.59",
|
|
105
|
+
"@pega/pcore-pconnect-typedefs": "3.2.1",
|
|
106
106
|
"@storybook/addon-actions": "^7.6.19",
|
|
107
107
|
"@storybook/addon-essentials": "^7.6.19",
|
|
108
108
|
"@storybook/addon-knobs": "^7.1.1",
|
|
@@ -37,7 +37,7 @@ addDebugLog("restoreConfig", "", "+");
|
|
|
37
37
|
},
|
|
38
38
|
]);
|
|
39
39
|
|
|
40
|
-
await restoreTopLevelConfigFilesFromTemplate();
|
|
40
|
+
await restoreTopLevelConfigFilesFromTemplate(false);
|
|
41
41
|
console.log(chalk.green("Original config files restored."));
|
|
42
42
|
|
|
43
43
|
if (restoreAns.restoreDev) {
|
package/src/util.js
CHANGED
|
@@ -604,7 +604,7 @@ if (showDebug) addDebugLog("getTemplateConfigFiles", ``, "");
|
|
|
604
604
|
|
|
605
605
|
}
|
|
606
606
|
|
|
607
|
-
export const restoreTopLevelConfigFilesFromTemplate = async() => {
|
|
607
|
+
export const restoreTopLevelConfigFilesFromTemplate = async(clearDep = true) => {
|
|
608
608
|
if (showDebug) addDebugLog("restoreTopLevelConfigFilesFromTemplate", ``, "");
|
|
609
609
|
// we can't loose devDep that is part of install, so go get the template mustache and push
|
|
610
610
|
// those in, replacing any changes there, but allowing additional, an keeping it updated
|
|
@@ -661,9 +661,10 @@ if (showDebug) addDebugLog("restoreTopLevelConfigFilesFromTemplate", ``, "");
|
|
|
661
661
|
|
|
662
662
|
|
|
663
663
|
// clear out
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
664
|
+
if (clearDep) {
|
|
665
|
+
cData.dependencies = {};
|
|
666
|
+
cData.devDependencies = {};
|
|
667
|
+
}
|
|
667
668
|
|
|
668
669
|
|
|
669
670
|
const tDep = tData.dependencies;
|
|
@@ -1557,10 +1558,13 @@ if (showDebug) addDebugLog("getComponentsConfigs", "", "");
|
|
|
1557
1558
|
const componentDirectory = await getComponentDirectoryPath(componentKey, compDir);
|
|
1558
1559
|
const configPath = join(componentDirectory, 'config.json');
|
|
1559
1560
|
|
|
1560
|
-
|
|
1561
|
+
if (fs.existsSync(configPath)) {
|
|
1562
|
+
let data = fs.readFileSync(configPath, { encoding: 'utf8' });
|
|
1563
|
+
|
|
1564
|
+
data = JSON.parse(data);
|
|
1565
|
+
componentsConfigJSON.push(data);
|
|
1566
|
+
}
|
|
1561
1567
|
|
|
1562
|
-
data = JSON.parse(data);
|
|
1563
|
-
componentsConfigJSON.push(data);
|
|
1564
1568
|
|
|
1565
1569
|
}
|
|
1566
1570
|
}
|