@pega/custom-dx-components 0.242.59 → 0.242.61
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 +1 -1
- package/src/tasks/export-archive/helper.js +12 -4
- package/src/tasks/import-archive/helper.js +12 -4
- package/src/tasks/import-comp/helper.js +29 -4
- package/src/tasks/import-comp/index.js +1 -1
- package/src/tasks/init/template/package.json.mustache +1 -1
- package/src/util.js +3 -3
package/package.json
CHANGED
|
@@ -101,8 +101,11 @@ export const updateSavedExportFilePath = async(filePath) => {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
if (filePath.indexOf(defaultPath) === 0) {
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
let relativePath = "";
|
|
105
|
+
if (filePath !== defaultPath) {
|
|
106
|
+
// same starting path, so we can save the relative
|
|
107
|
+
relativePath = filePath.replace(defaultPath.concat("/"), "");
|
|
108
|
+
}
|
|
106
109
|
|
|
107
110
|
await setConfigExportRelativePath(relativePath);
|
|
108
111
|
await forceDefaultsUpdate();
|
|
@@ -112,8 +115,13 @@ export const updateSavedExportFilePath = async(filePath) => {
|
|
|
112
115
|
else {
|
|
113
116
|
// mac
|
|
114
117
|
if (filePath.indexOf(defaultPath) === 0) {
|
|
115
|
-
|
|
116
|
-
|
|
118
|
+
|
|
119
|
+
let relativePath = "";
|
|
120
|
+
if (filePath !== defaultPath) {
|
|
121
|
+
// same starting path, so we can save the relative
|
|
122
|
+
relativePath = filePath.replace(defaultPath.concat("/"), "");
|
|
123
|
+
}
|
|
124
|
+
|
|
117
125
|
|
|
118
126
|
await setConfigExportRelativePath(relativePath);
|
|
119
127
|
await forceDefaultsUpdate();
|
|
@@ -287,8 +287,12 @@ export const updateSavedFilePath = async(filePath) => {
|
|
|
287
287
|
}
|
|
288
288
|
|
|
289
289
|
if (filePath.indexOf(defaultPath) === 0) {
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
|
|
291
|
+
let relativePath = "";
|
|
292
|
+
if (filePath !== defaultPath) {
|
|
293
|
+
// same starting path, so we can save the relative
|
|
294
|
+
relativePath = filePath.replace(defaultPath.concat("/"), "");
|
|
295
|
+
}
|
|
292
296
|
|
|
293
297
|
await setConfigImportRelativePath(relativePath);
|
|
294
298
|
await forceDefaultsUpdate();
|
|
@@ -298,8 +302,12 @@ export const updateSavedFilePath = async(filePath) => {
|
|
|
298
302
|
else {
|
|
299
303
|
// mac
|
|
300
304
|
if (filePath.indexOf(defaultPath) === 0) {
|
|
301
|
-
|
|
302
|
-
|
|
305
|
+
|
|
306
|
+
let relativePath = "";
|
|
307
|
+
if (filePath !== defaultPath) {
|
|
308
|
+
// same starting path, so we can save the relative
|
|
309
|
+
relativePath = filePath.replace(defaultPath.concat("/"), "");
|
|
310
|
+
}
|
|
303
311
|
|
|
304
312
|
await setConfigImportRelativePath(relativePath);
|
|
305
313
|
await forceDefaultsUpdate();
|
|
@@ -54,15 +54,40 @@ export const updateSavedFilePath = async(filePath) => {
|
|
|
54
54
|
|
|
55
55
|
let defaultPath = join(path.sep, arPathParts[0], arPathParts[1], arPathParts[2]);
|
|
56
56
|
|
|
57
|
-
if (
|
|
58
|
-
//
|
|
59
|
-
|
|
57
|
+
if (path.sep != "/") {
|
|
58
|
+
// windows
|
|
59
|
+
if (defaultPath.indexOf(path.sep) === 0) {
|
|
60
|
+
// if start with \\, then remove
|
|
61
|
+
defaultPath = defaultPath.substring(1);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (filePath.indexOf(defaultPath) === 0) {
|
|
65
|
+
|
|
66
|
+
let relativePath = "";
|
|
67
|
+
if (filePath !== defaultPath) {
|
|
68
|
+
// same starting path, so we can save the relative
|
|
69
|
+
relativePath = filePath.replace(defaultPath.concat("/"), "");
|
|
70
|
+
}
|
|
60
71
|
|
|
61
|
-
if (relativePath != configDef.importRelativePath) {
|
|
62
72
|
await setConfigImportRelativePath(relativePath);
|
|
63
73
|
await forceDefaultsUpdate();
|
|
74
|
+
|
|
64
75
|
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
// mac
|
|
79
|
+
if (filePath.indexOf(defaultPath) === 0) {
|
|
65
80
|
|
|
81
|
+
let relativePath = "";
|
|
82
|
+
if (filePath !== defaultPath) {
|
|
83
|
+
// same starting path, so we can save the relative
|
|
84
|
+
relativePath = filePath.replace(defaultPath.concat("/"), "");
|
|
85
|
+
}
|
|
66
86
|
|
|
87
|
+
await setConfigImportRelativePath(relativePath);
|
|
88
|
+
await forceDefaultsUpdate();
|
|
89
|
+
|
|
90
|
+
}
|
|
67
91
|
}
|
|
92
|
+
|
|
68
93
|
}
|
|
@@ -284,7 +284,7 @@ addDebugLog("getFolderList", `filePath: ${filePath}`, "");
|
|
|
284
284
|
if (fs.existsSync(filePath)) {
|
|
285
285
|
return fs
|
|
286
286
|
.readdirSync(filePath, { withFileTypes: true })
|
|
287
|
-
.filter(dirent => dirent.isDirectory())
|
|
287
|
+
.filter(dirent => dirent.isDirectory() && !dirent.name.startsWith("."))
|
|
288
288
|
.map(dirent => dirent.name);
|
|
289
289
|
}
|
|
290
290
|
else {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
103
|
"@pega/configs": "^0.15.1",
|
|
104
|
-
"@pega/custom-dx-components": "~0.242.
|
|
104
|
+
"@pega/custom-dx-components": "~0.242.61",
|
|
105
105
|
"@pega/pcore-pconnect-typedefs": "3.2.1",
|
|
106
106
|
"@storybook/addon-actions": "^7.6.19",
|
|
107
107
|
"@storybook/addon-essentials": "^7.6.19",
|
package/src/util.js
CHANGED
|
@@ -861,7 +861,7 @@ if (showDebug) addDebugLog("setConfigImportRelativePath", `importRelativePath: $
|
|
|
861
861
|
}
|
|
862
862
|
|
|
863
863
|
export const setConfigExportRelativePath = async (exportRelativePath) => {
|
|
864
|
-
if (showDebug) addDebugLog("
|
|
864
|
+
if (showDebug) addDebugLog("setConfigExportRelativePath", `exportRelativePath: ${exportRelativePath}`, "");
|
|
865
865
|
const currentDirectory = process.cwd();
|
|
866
866
|
const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
867
867
|
let configData = await getPegaConfig(true);
|
|
@@ -1952,8 +1952,8 @@ if (showDebug) addDebugLog("restoreFromArchive", `fileName: ${fileName}, orgLibN
|
|
|
1952
1952
|
|
|
1953
1953
|
const tempPackagePath = join (tempDirectory, PACKAGE_JSON_FILENAME);
|
|
1954
1954
|
const currentPackagePath = join(currentDirectory, PACKAGE_JSON_FILENAME);
|
|
1955
|
-
const tempDirectoryComponents = join(tempDirectory, "src"
|
|
1956
|
-
const currentComponentsPath = join(currentDirectory, "src"
|
|
1955
|
+
const tempDirectoryComponents = join(tempDirectory, "src");
|
|
1956
|
+
const currentComponentsPath = join(currentDirectory, "src");
|
|
1957
1957
|
|
|
1958
1958
|
// remove all config files
|
|
1959
1959
|
await removeTopLevelConfigFiles(currentDirectory);
|