@pega/custom-dx-components 24.2.10 → 24.2.12
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/constants.js +1 -0
- package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.tsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.tsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/demo.stories.tsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.tsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.tsx.mustache +4 -4
- package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.tsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.tsx.mustache +3 -3
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/demo.stories.tsx.mustache +2 -2
- package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.stories.tsx.mustache +4 -4
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/demo.stories.tsx.mustache +2 -2
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.tsx.mustache +3 -3
- package/src/tasks/export-archive/helper.js +14 -0
- package/src/tasks/export-archive/index.js +151 -28
- package/src/tasks/init/template/package.json.mustache +4 -4
- package/src/util.js +64 -14
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +4 -4
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.tsx +2 -2
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +2 -2
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +3 -3
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +2 -2
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +2 -2
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +3 -3
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +2 -2
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +3 -3
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +4 -4
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.tsx +2 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +2 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +3 -3
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +2 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +2 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +3 -3
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +2 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +3 -3
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.tsx +4 -4
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.tsx +2 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +2 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +3 -3
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +2 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.tsx +2 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +3 -3
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.tsx +2 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +3 -3
- package/tests/functional/localLibCreateLibBuildLibDeleteLib.test.js +1 -1
- package/tests/functional/localLibCreateLibBuildLibListPubDeleteLib.test.js +1 -1
- package/tests/functional/localLibCreateLibExportImportLib.test.js +1 -1
- package/tests/functional/localLibCreateLibExportLib.test.js +1 -1
- package/tests/functional/localLibCreateLibValidateDeleteLib.test.js +1 -1
package/package.json
CHANGED
package/src/constants.js
CHANGED
|
@@ -15,6 +15,7 @@ export const LIBRARY_BASED = 'libraryMode';
|
|
|
15
15
|
export const SHARED_DIRECTORY = 'shared';
|
|
16
16
|
export const SHOW_DEBUG = 'showDebug';
|
|
17
17
|
export const ARCHIVES_PATH = 'store';
|
|
18
|
+
export const BIN_ARCHIVES_PATH = 'bin-arch';
|
|
18
19
|
export const TEMP_PATH = 'store/temp';
|
|
19
20
|
export const COMPONENTS_CONFIG_FILE_NAME = 'componentsconfig.json';
|
|
20
21
|
|
|
@@ -15,7 +15,7 @@ export default meta;
|
|
|
15
15
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
16
16
|
|
|
17
17
|
if (!window.PCore) {
|
|
18
|
-
window.PCore = {};
|
|
18
|
+
window.PCore = {} as any;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
window.PCore.getEnvironmentInfo = () => {
|
|
@@ -26,7 +26,7 @@ window.PCore.getEnvironmentInfo = () => {
|
|
|
26
26
|
getLocale: () => {
|
|
27
27
|
return 'en-GB';
|
|
28
28
|
}
|
|
29
|
-
};
|
|
29
|
+
} as any;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
export const Base{{COMPONENT_CLASS_NAME}}: Story = args => {
|
|
@@ -14,7 +14,7 @@ type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
if (!window.PCore) {
|
|
17
|
-
window.PCore = {};
|
|
17
|
+
window.PCore = {} as any;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
window.PCore.getEnvironmentInfo = () => {
|
|
@@ -25,7 +25,7 @@ window.PCore.getEnvironmentInfo = () => {
|
|
|
25
25
|
getLocale: () => {
|
|
26
26
|
return 'en-GB';
|
|
27
27
|
}
|
|
28
|
-
};
|
|
28
|
+
} as any;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
|
package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/demo.stories.tsx.mustache
CHANGED
|
@@ -15,7 +15,7 @@ export default meta;
|
|
|
15
15
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
16
16
|
|
|
17
17
|
if (!window.PCore) {
|
|
18
|
-
window.PCore = {};
|
|
18
|
+
window.PCore = {} as any;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
const statelistData = {
|
|
@@ -49,7 +49,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
|
|
|
49
49
|
resolve(statelistData);
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
};
|
|
52
|
+
} as any;
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
const props = {
|
|
@@ -21,7 +21,7 @@ export default meta;
|
|
|
21
21
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
22
22
|
|
|
23
23
|
if (!window.PCore) {
|
|
24
|
-
window.PCore = {};
|
|
24
|
+
window.PCore = {} as any;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
window.PCore.getLocaleUtils = () => {
|
|
@@ -29,7 +29,7 @@ window.PCore.getLocaleUtils = () => {
|
|
|
29
29
|
getLocaleValue: (value: any) => {
|
|
30
30
|
return value;
|
|
31
31
|
}
|
|
32
|
-
};
|
|
32
|
+
} as any;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
window.PCore.getUserApi = () => {
|
|
@@ -39,7 +39,7 @@ window.PCore.getUserApi = () => {
|
|
|
39
39
|
resolve(operatorDetails);
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
};
|
|
42
|
+
} as any;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
const Region = (props: any) => {
|
package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache
CHANGED
|
@@ -20,7 +20,7 @@ export default meta;
|
|
|
20
20
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
21
21
|
|
|
22
22
|
if (!window.PCore) {
|
|
23
|
-
window.PCore = {};
|
|
23
|
+
window.PCore = {} as any;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
window.PCore.getLocaleUtils = () => {
|
|
@@ -28,7 +28,7 @@ window.PCore.getLocaleUtils = () => {
|
|
|
28
28
|
getLocaleValue: (value: any) => {
|
|
29
29
|
return value;
|
|
30
30
|
}
|
|
31
|
-
};
|
|
31
|
+
} as any;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
window.PCore.getUserApi = () => {
|
|
@@ -38,7 +38,7 @@ window.PCore.getUserApi = () => {
|
|
|
38
38
|
resolve(operatorDetails);
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
};
|
|
41
|
+
} as any;
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
const Region = (props: any) => {
|
|
@@ -19,7 +19,7 @@ type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
|
19
19
|
|
|
20
20
|
export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
|
|
21
21
|
if (!window.PCore) {
|
|
22
|
-
window.PCore = {};
|
|
22
|
+
window.PCore = {} as any;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
window.PCore.getLocaleUtils = () => {
|
|
@@ -27,7 +27,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
|
|
|
27
27
|
getLocaleValue: (val: any) => {
|
|
28
28
|
return val;
|
|
29
29
|
}
|
|
30
|
-
};
|
|
30
|
+
} as any;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
const configProps = pyHome1Resolved.children[0].children[0].config;
|
|
@@ -15,7 +15,7 @@ export default meta;
|
|
|
15
15
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
16
16
|
|
|
17
17
|
if (!window.PCore) {
|
|
18
|
-
window.PCore = {};
|
|
18
|
+
window.PCore = {} as any;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
|
|
@@ -25,7 +25,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
|
|
|
25
25
|
CASE_INFO: {
|
|
26
26
|
CASE_INFO_ID: 'caseInfo.ID'
|
|
27
27
|
}
|
|
28
|
-
};
|
|
28
|
+
} as any;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
window.PCore.getLocaleUtils = () => {
|
|
@@ -33,7 +33,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
|
|
|
33
33
|
getLocaleValue: (value: any) => {
|
|
34
34
|
return value;
|
|
35
35
|
}
|
|
36
|
-
};
|
|
36
|
+
} as any;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
window.PCore.getDataApiUtils = () => {
|
|
@@ -43,7 +43,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
|
|
|
43
43
|
resolve(historyData);
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
};
|
|
46
|
+
} as any;
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
const props = {
|
|
@@ -17,7 +17,7 @@ export default meta;
|
|
|
17
17
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
18
18
|
|
|
19
19
|
if (!window.PCore) {
|
|
20
|
-
window.PCore = {};
|
|
20
|
+
window.PCore = {} as any;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const worklistData = {
|
|
@@ -59,7 +59,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
|
|
|
59
59
|
resolve(worklistData);
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
};
|
|
62
|
+
} as any;
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
const props = {
|
|
@@ -15,7 +15,7 @@ export default meta;
|
|
|
15
15
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
16
16
|
|
|
17
17
|
if (!window.PCore) {
|
|
18
|
-
window.PCore = {};
|
|
18
|
+
window.PCore = {} as any;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
window.PCore.getLocaleUtils = () => {
|
|
@@ -23,7 +23,7 @@ window.PCore.getLocaleUtils = () => {
|
|
|
23
23
|
getLocaleValue: (value: any) => {
|
|
24
24
|
return value;
|
|
25
25
|
}
|
|
26
|
-
};
|
|
26
|
+
} as any;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
window.PCore.getUserApi = () => {
|
|
@@ -33,7 +33,7 @@ window.PCore.getUserApi = () => {
|
|
|
33
33
|
resolve(operatorDetails);
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
};
|
|
36
|
+
} as any;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
|
package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/demo.stories.tsx.mustache
CHANGED
|
@@ -15,7 +15,7 @@ export default meta;
|
|
|
15
15
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
16
16
|
|
|
17
17
|
if (!window.PCore) {
|
|
18
|
-
window.PCore = {};
|
|
18
|
+
window.PCore = {} as any;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
const countrylistData = {
|
|
@@ -47,7 +47,7 @@ window.PCore.getDataPageUtils = () => {
|
|
|
47
47
|
resolve(countrylistData);
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
};
|
|
50
|
+
} as any;
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
|
|
@@ -15,7 +15,7 @@ export default meta;
|
|
|
15
15
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
16
16
|
|
|
17
17
|
if (!window.PCore) {
|
|
18
|
-
window.PCore = {};
|
|
18
|
+
window.PCore = {} as any;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
window.PCore.getConstants = () => {
|
|
@@ -23,7 +23,7 @@ window.PCore.getConstants = () => {
|
|
|
23
23
|
CASE_INFO: {
|
|
24
24
|
CASE_INFO_ID: 'caseInfo.ID'
|
|
25
25
|
}
|
|
26
|
-
};
|
|
26
|
+
} as any;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
window.PCore.getLocaleUtils = () => {
|
|
@@ -31,7 +31,7 @@ window.PCore.getLocaleUtils = () => {
|
|
|
31
31
|
getLocaleValue: (value: any) => {
|
|
32
32
|
return value;
|
|
33
33
|
}
|
|
34
|
-
};
|
|
34
|
+
} as any;
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
window.PCore.getDataApiUtils = () => {
|
|
@@ -41,7 +41,7 @@ window.PCore.getDataApiUtils = () => {
|
|
|
41
41
|
resolve(historyData);
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
};
|
|
44
|
+
} as any;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
|
|
@@ -16,7 +16,7 @@ export default meta;
|
|
|
16
16
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
17
17
|
|
|
18
18
|
if (!window.PCore) {
|
|
19
|
-
window.PCore = {};
|
|
19
|
+
window.PCore = {} as any;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
const worklistData = {
|
|
@@ -57,7 +57,7 @@ window.PCore.getDataApiUtils = () => {
|
|
|
57
57
|
resolve(worklistData);
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
};
|
|
60
|
+
} as any;
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
|
|
@@ -15,7 +15,7 @@ export default meta;
|
|
|
15
15
|
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
16
16
|
|
|
17
17
|
if (!window.PCore) {
|
|
18
|
-
window.PCore = {};
|
|
18
|
+
window.PCore = {} as any;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
window.PCore.getLocaleUtils = () => {
|
|
@@ -23,7 +23,7 @@ window.PCore.getLocaleUtils = () => {
|
|
|
23
23
|
getLocaleValue: (value: any) => {
|
|
24
24
|
return value;
|
|
25
25
|
}
|
|
26
|
-
};
|
|
26
|
+
} as any;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
window.PCore.getUserApi = () => {
|
|
@@ -33,7 +33,7 @@ window.PCore.getUserApi = () => {
|
|
|
33
33
|
resolve(operatorDetails);
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
};
|
|
36
|
+
} as any;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
|
|
@@ -86,6 +86,20 @@ addDebugLog("getLibraryVersionQuestion", "", "");
|
|
|
86
86
|
];
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
+
export const getFullArchiveQuestions = async () => {
|
|
90
|
+
|
|
91
|
+
return [
|
|
92
|
+
{
|
|
93
|
+
name: 'fullArchive',
|
|
94
|
+
type: 'rawlist',
|
|
95
|
+
message: 'Type of export',
|
|
96
|
+
choices: [{name: 'Full Archive (code)', value: 'Full'}, {name: 'CL Binary (runtime only)', value: 'Binary'}],
|
|
97
|
+
default: 'Full'
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
];
|
|
101
|
+
}
|
|
102
|
+
|
|
89
103
|
export const updateSavedExportFilePath = async(filePath) => {
|
|
90
104
|
const currentDirectory = process.cwd();
|
|
91
105
|
const arPathParts = currentDirectory.split(path.sep);
|
|
@@ -15,11 +15,12 @@ import {
|
|
|
15
15
|
getConfigDefaults,
|
|
16
16
|
getLibraryBased,
|
|
17
17
|
zipVersionAndArchive,
|
|
18
|
+
zipVersionAndArchiveCL,
|
|
18
19
|
cleanUpTemp
|
|
19
20
|
} from '../../util.js';
|
|
20
|
-
import { TASKS_CONFIG_JSON_FILENAME, ARCHIVES_PATH } from '../../constants.js';
|
|
21
|
-
import { getFilePathQuestions, getLibraryQuestion, getLibraryVersionQuestion, updateSavedExportFilePath } from './helper.js';
|
|
22
|
-
import {
|
|
21
|
+
import { TASKS_CONFIG_JSON_FILENAME, ARCHIVES_PATH, BIN_ARCHIVES_PATH } from '../../constants.js';
|
|
22
|
+
import { getFilePathQuestions, getLibraryQuestion, getLibraryVersionQuestion, updateSavedExportFilePath, getFullArchiveQuestions } from './helper.js';
|
|
23
|
+
import { localBuildLibrary } from '../build-lib/index.js';
|
|
23
24
|
|
|
24
25
|
export const DXCB_CONFIG_INTERNAL_JSON_FILENAME = 'src/dxcb.config.json';
|
|
25
26
|
const currentDirectory = process.cwd();
|
|
@@ -75,9 +76,95 @@ addDebugLog("updateFile", `fileName: ${fileName}, oldComponentKeyPC: ${oldCompon
|
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
|
|
79
|
+
export const exportCLArch = async(exportPath, orgLibName, selectedVersion) => {
|
|
80
|
+
addDebugLog("exportCLArch", `exportPath: ${exportPath}, orgLibName: ${orgLibName}, selectedVersion: ${selectedVersion}`, "");
|
|
81
|
+
const currentDirectory = process.cwd();
|
|
82
|
+
const archiveDirectory = join (currentDirectory, BIN_ARCHIVES_PATH);
|
|
83
|
+
const fileName = `${orgLibName}_${selectedVersion}.zip`;
|
|
84
|
+
const archFileName = join(archiveDirectory, fileName);
|
|
85
|
+
const configDef = await getConfigDefaults();
|
|
86
|
+
|
|
87
|
+
const exportFile = join(exportPath, fileName);
|
|
88
|
+
let output;
|
|
89
|
+
|
|
90
|
+
// need to build the libary
|
|
91
|
+
console.log(chalk.green(`\nBuilding binaries...\n`));
|
|
92
|
+
const arOrgLib = orgLibName.split("_")
|
|
93
|
+
const arVersion = selectedVersion.split("-");
|
|
94
|
+
const devBuild = arVersion.length > 1 ? true : false;
|
|
95
|
+
|
|
96
|
+
await localBuildLibrary(arOrgLib[0], arOrgLib[1], arVersion[0], devBuild);
|
|
97
|
+
|
|
98
|
+
const libraryDir = join(currentDirectory, orgLibName, selectedVersion );
|
|
99
|
+
if (fs.existsSync(libraryDir)) {
|
|
100
|
+
console.log(chalk.green(`\nExporting binaries...\n`));
|
|
101
|
+
|
|
102
|
+
if (!fs.existsSync(exportPath)) {
|
|
103
|
+
console.log(`\Path: ${chalk.yellow(`${exportPath}`)} doesn't exist.`);
|
|
104
|
+
const newPathAnswer = await inquirer.prompt([
|
|
105
|
+
{
|
|
106
|
+
name: 'createNewPath',
|
|
107
|
+
type: 'confirm',
|
|
108
|
+
message: 'Create path',
|
|
109
|
+
default: true
|
|
110
|
+
},
|
|
111
|
+
]);
|
|
112
|
+
const createNewPath = newPathAnswer.createNewPath;
|
|
113
|
+
if (createNewPath) {
|
|
114
|
+
fs.mkdirSync(exportPath, { recursive: true });
|
|
115
|
+
|
|
116
|
+
await updateSavedExportFilePath(exportPath);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
console.log(chalk.green("Store not exported."));
|
|
120
|
+
process.exit();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (fs.existsSync(exportFile)) {
|
|
125
|
+
console.log(`\nFile: ${chalk.yellow(`${fileName}`)} already exists in ${chalk.yellow(`${exportPath}`)}.`);
|
|
126
|
+
const overwriteQuestion = await inquirer.prompt([
|
|
127
|
+
{
|
|
128
|
+
name: 'overWriteFile',
|
|
129
|
+
type: 'confirm',
|
|
130
|
+
message: 'Overrwrite',
|
|
131
|
+
default: true
|
|
132
|
+
},
|
|
133
|
+
]);
|
|
134
|
+
|
|
135
|
+
if (!overwriteQuestion.overWriteFile) {
|
|
136
|
+
console.log(chalk.green("Store not exported."));
|
|
137
|
+
process.exit();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
// archive it
|
|
144
|
+
output = await zipVersionAndArchiveCL(configDef.currentOrgLib, configDef.buildVersion);
|
|
145
|
+
|
|
146
|
+
// if archiving, need to wait before copying
|
|
147
|
+
output.on('close', function() {
|
|
148
|
+
fs.copyFileSync(archFileName, exportFile );
|
|
149
|
+
|
|
150
|
+
console.log(`\n${chalk.green(`${fileName}`)} has been exported to ${chalk.green(`${exportPath}`)}`);
|
|
151
|
+
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
console.log.chalk.green(`\nBinary does not exist.`);
|
|
157
|
+
}
|
|
158
|
+
|
|
78
159
|
|
|
79
160
|
|
|
80
|
-
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
export const exportArch = async(exportPath, orgLibName, selectedVersion, fullArchive = "Full", currentOrArchive = "" ) => {
|
|
81
168
|
addDebugLog("exportArch", `exportPath: ${exportPath}, orgLibName: ${orgLibName}, selectedVersion: ${selectedVersion}`, "");
|
|
82
169
|
const currentDirectory = process.cwd();
|
|
83
170
|
const archiveDirectory = join (currentDirectory, ARCHIVES_PATH, `${orgLibName}`, `${selectedVersion}`);
|
|
@@ -91,6 +178,11 @@ addDebugLog("exportArch", `exportPath: ${exportPath}, orgLibName: ${orgLibName},
|
|
|
91
178
|
|
|
92
179
|
let archiveBeforeStore = false;
|
|
93
180
|
|
|
181
|
+
if (fullArchive != "Full") {
|
|
182
|
+
await exportCLArch(exportPath, orgLibName, selectedVersion);
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
|
|
94
186
|
|
|
95
187
|
if (orgLibName === configDef.currentOrgLib && selectedVersion === configDef.buildVersion) {
|
|
96
188
|
|
|
@@ -210,46 +302,77 @@ export default async options => {
|
|
|
210
302
|
addDebugLog("exportArchive", "", "+");
|
|
211
303
|
|
|
212
304
|
|
|
213
|
-
if (options.params.length >=
|
|
214
|
-
|
|
215
|
-
const
|
|
216
|
-
const
|
|
217
|
-
const
|
|
305
|
+
if (options.params.length >= 8) {
|
|
306
|
+
let fullArchive = options.params[3];
|
|
307
|
+
const libraryName = options.params[4];
|
|
308
|
+
const libraryVersion = options.params[5];
|
|
309
|
+
const filePath = options.params[6];
|
|
310
|
+
|
|
218
311
|
|
|
219
|
-
|
|
312
|
+
const currentOrArchive = options.params[7];
|
|
313
|
+
|
|
314
|
+
await exportArch(filePath, libraryName, libraryVersion, fullArchive, currentOrArchive );
|
|
220
315
|
|
|
221
316
|
}
|
|
222
317
|
else {
|
|
223
318
|
let orgLibName = "";
|
|
224
319
|
let selectedVersion = "";
|
|
320
|
+
let fullArchive = "";
|
|
225
321
|
|
|
226
|
-
if (options.params.length >=
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
322
|
+
if (options.params.length >= 5) {
|
|
323
|
+
fullArchive = options.params[3];
|
|
324
|
+
orgLibName = options.params[4];
|
|
325
|
+
if (options.params.length >= 6) {
|
|
326
|
+
selectedVersion = options.params[5];
|
|
230
327
|
}
|
|
231
328
|
}
|
|
232
329
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
({ orgLibName } = libraryAnswers);
|
|
330
|
+
if (fullArchive === "" ) {
|
|
331
|
+
const fullArchiveQuestions = await getFullArchiveQuestions();
|
|
332
|
+
const fullArchiveAnswers = await inquirer.prompt(fullArchiveQuestions);
|
|
333
|
+
({ fullArchive } = fullArchiveAnswers);
|
|
238
334
|
}
|
|
239
335
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
336
|
+
let filePathQuestions;
|
|
337
|
+
let filePathAnswers;
|
|
338
|
+
let filePath;
|
|
339
|
+
|
|
340
|
+
// if Binary, then we need to just build the current library, get the results and
|
|
341
|
+
// and export an archive as zip
|
|
342
|
+
if (fullArchive === "Binary") {
|
|
343
|
+
filePathQuestions = await getFilePathQuestions();
|
|
344
|
+
filePathAnswers = await inquirer.prompt(filePathQuestions);
|
|
345
|
+
({ filePath } = filePathAnswers);
|
|
346
|
+
|
|
347
|
+
await updateSavedExportFilePath(filePath);
|
|
348
|
+
|
|
349
|
+
const configDef = getConfigDefaults();
|
|
350
|
+
orgLibName = configDef.currentOrgLib;
|
|
351
|
+
selectedVersion = configDef.buildVersion;
|
|
352
|
+
|
|
353
|
+
|
|
244
354
|
}
|
|
355
|
+
else {
|
|
356
|
+
if (orgLibName === "") {
|
|
357
|
+
const libraryQuestion = await getLibraryQuestion();
|
|
358
|
+
const libraryAnswers = await inquirer.prompt(libraryQuestion);
|
|
359
|
+
({ orgLibName } = libraryAnswers);
|
|
360
|
+
}
|
|
245
361
|
|
|
362
|
+
if (selectedVersion === "") {
|
|
363
|
+
const libraryVersionQuestion = await getLibraryVersionQuestion(orgLibName);
|
|
364
|
+
const libraryVersionAnswer = await inquirer.prompt(libraryVersionQuestion);
|
|
365
|
+
({ selectedVersion } = libraryVersionAnswer);
|
|
366
|
+
}
|
|
246
367
|
|
|
247
|
-
const filePathQuestions = await getFilePathQuestions();
|
|
248
|
-
const filePathAnswers = await inquirer.prompt(filePathQuestions);
|
|
249
|
-
let { filePath } = filePathAnswers;
|
|
250
368
|
|
|
251
|
-
|
|
369
|
+
filePathQuestions = await getFilePathQuestions();
|
|
370
|
+
filePathAnswers = await inquirer.prompt(filePathQuestions);
|
|
371
|
+
({ filePath } = filePathAnswers);
|
|
252
372
|
|
|
373
|
+
await updateSavedExportFilePath(filePath);
|
|
374
|
+
|
|
375
|
+
}
|
|
253
376
|
|
|
254
377
|
// if (path.sep === "/") {
|
|
255
378
|
// if (filePath.lastIndexOf(path.sep) != filePath.length - 1) {
|
|
@@ -257,7 +380,7 @@ export default async options => {
|
|
|
257
380
|
// }
|
|
258
381
|
// }
|
|
259
382
|
|
|
260
|
-
await exportArch( filePath, orgLibName, selectedVersion);
|
|
383
|
+
await exportArch( filePath, orgLibName, selectedVersion, fullArchive);
|
|
261
384
|
|
|
262
385
|
}
|
|
263
386
|
|
|
@@ -78,9 +78,9 @@
|
|
|
78
78
|
"author": "",
|
|
79
79
|
"license": "Enter License",
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@pega/cosmos-react-condition-builder": "
|
|
82
|
-
"@pega/cosmos-react-core": "
|
|
83
|
-
"@pega/cosmos-react-work": "
|
|
81
|
+
"@pega/cosmos-react-condition-builder": "^7.1.2",
|
|
82
|
+
"@pega/cosmos-react-core": "^7.1.2",
|
|
83
|
+
"@pega/cosmos-react-work": "^7.1.2",
|
|
84
84
|
"@pega/eslint-config": "^0.10.2",
|
|
85
85
|
"@pega/tsconfig": "^0.15.1",
|
|
86
86
|
"babel-loader": "^9.1.3",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
103
|
"@pega/configs": "^0.15.1",
|
|
104
|
-
"@pega/custom-dx-components": "~24.2.
|
|
104
|
+
"@pega/custom-dx-components": "~24.2.12",
|
|
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",
|