@pega/custom-dx-components 0.25.22 → 0.25.24
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/build-jest-assets/index.js +0 -1
- package/src/tasks/build-lib/helper.js +0 -2
- package/src/tasks/build-lib/index.js +3 -3
- package/src/tasks/create/index.js +5 -1
- package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/config.json.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/config.json.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/config.json.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/config.json.mustache +1 -0
- package/src/tasks/create-all/index.js +5 -1
- package/src/tasks/delete/helper.js +0 -1
- package/src/tasks/delete/index.js +5 -1
- package/src/tasks/delete-lib/helper.js +0 -1
- package/src/tasks/delete-pub/helper.js +7 -2
- package/src/tasks/delete-version/index.js +0 -1
- package/src/tasks/export-archive/helper.js +7 -1
- package/src/tasks/export-archive/index.js +10 -34
- package/src/tasks/import-archive/helper.js +19 -5
- package/src/tasks/import-archive/index.js +247 -35
- package/src/tasks/import-comp/helper.js +0 -2
- package/src/tasks/init/template/package.json.mustache +1 -1
- package/src/tasks/init/template/tasks.config.json +1 -1
- package/src/tasks/list/helper.js +17 -2
- package/src/tasks/list-lib/index.js +10 -1
- package/src/tasks/list-pub/helper.js +2 -4
- package/src/tasks/list-pub/index.js +15 -2
- package/src/tasks/publish/helper.js +0 -1
- package/src/tasks/publish/index.js +13 -1
- package/src/tasks/publish-all/index.js +10 -1
- package/src/tasks/publish-archive/index.js +53 -83
- package/src/tasks/publish-lib/index.js +0 -23
- package/src/tasks/rename/index.js +9 -1
- package/src/tasks/restore/index.js +19 -13
- package/src/tasks/set-perm/index.js +0 -2
- package/src/tasks/show-help/index.js +1 -5
- package/src/tasks/show-status/index.js +19 -6
- package/src/tasks/store/index.js +39 -18
- package/src/tasks/switch-lib/helper.js +0 -1
- package/src/tasks/validator/index.js +10 -5
- package/src/util.js +21 -77
- package/tests/assets/library/components/create/Pega_DXIL_MyTestText/config.json +1 -0
- package/tests/assets/library/components/create/shared/create-nonce.ts +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/date.ts +0 -24
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts +0 -4
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyText/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +1 -0
- package/tests/assets/library/components/createAll/Constellation/shared/create-nonce.ts +1 -0
- package/tests/assets/original/components/create/Pega_DXIL_MyTestText/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyText/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyBoolean/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCurrency/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDecimal/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyEmail/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyForm/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyInteger/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyParagraph/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPercentage/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPhone/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyText/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyURL/config.json +1 -0
- package/tests/functional/localCreateBuildAllDeleteAll.test.js +8 -8
- package/tests/functional/localCreateBuildDelete.test.js +8 -8
- package/tests/functional/localCreateListDelete.test.js +8 -8
- package/tests/functional/localCreatePublishAllDeleteAll.test.js +8 -8
- package/tests/functional/localCreatePublishDelete.test.js +8 -8
- package/tests/functional/localCreateRenameDelete.test.js +8 -8
- package/tests/functional/localLibCreateLibBuildLibDeleteLib.test.js +1 -1
- package/tests/functional/localLibCreateLibBuildLibListPubDeleteLib.test.js +1 -1
- package/tests/functional/localLibCreateLibStoreRestoreDeleteLib.test.js +376 -0
package/package.json
CHANGED
|
@@ -2,7 +2,6 @@ import fs from 'fs';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import inquirer from 'inquirer';
|
|
5
|
-
import { Listr } from 'listr2';
|
|
6
5
|
import chalk from 'chalk';
|
|
7
6
|
|
|
8
7
|
import { showVersion, getServerType, setServerType, getSubComponents, deleteLocalComponent, checkPathAccess, getComponents, getLibraryBasedCL, setLibraryBasedCL, forceDefaultsUpdate } from '../../util.js';
|
|
@@ -106,9 +106,9 @@ addDebugLog("localBuildLibrary", `organization: ${organization}, library: ${libr
|
|
|
106
106
|
// warnings are part of buildLib
|
|
107
107
|
|
|
108
108
|
// for now
|
|
109
|
-
console.log(chalk.green.bold('Compile check...'));
|
|
110
|
-
await bundleComponent(components[0], null, devBuild, false);
|
|
111
|
-
console.log('');
|
|
109
|
+
// console.log(chalk.green.bold('Compile check...'));
|
|
110
|
+
// await bundleComponent(components[0], null, devBuild, false);
|
|
111
|
+
// console.log('');
|
|
112
112
|
|
|
113
113
|
// remove dist/lib stuff
|
|
114
114
|
await cleanUp();
|
|
@@ -22,7 +22,8 @@ import {
|
|
|
22
22
|
getLibraryBased,
|
|
23
23
|
addDebugLog,
|
|
24
24
|
checkLibraryAndArchives,
|
|
25
|
-
getConfigDefaults
|
|
25
|
+
getConfigDefaults,
|
|
26
|
+
getSubTypeLabel
|
|
26
27
|
} from '../../util.js';
|
|
27
28
|
import { COMPONENT_SCHEMA, SHARED_FILE_NAMES } from '../../constants.js';
|
|
28
29
|
|
|
@@ -103,6 +104,8 @@ const compileMustacheTemplates = async (
|
|
|
103
104
|
files.forEach(file => {
|
|
104
105
|
const filePath = path.join(componentDirectory, file);
|
|
105
106
|
|
|
107
|
+
const subTypeLabel = getSubTypeLabel(type, subtype);
|
|
108
|
+
|
|
106
109
|
const output = compileMustacheTemplate(filePath, {
|
|
107
110
|
COMPONENT_KEY: componentKey,
|
|
108
111
|
COMPONENT_NAME: componentName,
|
|
@@ -114,6 +117,7 @@ const compileMustacheTemplates = async (
|
|
|
114
117
|
ALLOWEDAPPS: JSON.stringify(allowedApplications),
|
|
115
118
|
TYPE: type,
|
|
116
119
|
SUB_TYPE: JSON.stringify(mustacheSubType),
|
|
120
|
+
SUB_TYPE_LABEL: subTypeLabel,
|
|
117
121
|
DESCRIPTION: description,
|
|
118
122
|
IS_TEMPLATE: isTemplate,
|
|
119
123
|
IS_PICKLIST: isPicklist,
|
|
@@ -23,7 +23,8 @@ import { checkPathAccess, showVersion ,
|
|
|
23
23
|
getLibraryBased,
|
|
24
24
|
addDebugLog,
|
|
25
25
|
checkLibraryAndArchives,
|
|
26
|
-
getConfigDefaults
|
|
26
|
+
getConfigDefaults,
|
|
27
|
+
getSubTypeLabel
|
|
27
28
|
} from '../../util.js';
|
|
28
29
|
|
|
29
30
|
import { COMPONENT_SCHEMA, COMPONENTS_DIRECTORY_PATH, TASKS_CONFIG_JSON_FILENAME, COMPONENTS_PATH, CATEGORY_CONSTELLATION, SHARED_FILE_NAMES } from '../../constants.js';
|
|
@@ -113,6 +114,8 @@ export const compileMustacheTemplates = async (
|
|
|
113
114
|
files.forEach((file) => {
|
|
114
115
|
const filePath = path.join(componentDirectory, file);
|
|
115
116
|
|
|
117
|
+
const subTypeLabel = getSubTypeLabel(type, subtype).toString();
|
|
118
|
+
|
|
116
119
|
const output = compileMustacheTemplate(filePath, {
|
|
117
120
|
COMPONENT_KEY: componentKey,
|
|
118
121
|
COMPONENT_NAME: componentName,
|
|
@@ -124,6 +127,7 @@ export const compileMustacheTemplates = async (
|
|
|
124
127
|
ALLOWEDAPPS: JSON.stringify(allowedApplications),
|
|
125
128
|
TYPE: type,
|
|
126
129
|
SUB_TYPE: JSON.stringify(mustacheSubType),
|
|
130
|
+
SUB_TYPE_LABEL: subTypeLabel,
|
|
127
131
|
DESCRIPTION: description,
|
|
128
132
|
IS_TEMPLATE: isTemplate,
|
|
129
133
|
IS_PICKLIST: isPicklist,
|
|
@@ -2,7 +2,11 @@ import inquirer from 'inquirer';
|
|
|
2
2
|
|
|
3
3
|
import { showVersion, getLibraryBased, addDebugLog, checkLibraryAndArchives } from '../../util.js';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
deleteLocalComponents,
|
|
7
|
+
SOURCE_OF_COMPONENT_TYPES,
|
|
8
|
+
deleteServerComponents,
|
|
9
|
+
getDeleteComponentsQuestions } from './helper.js';
|
|
6
10
|
|
|
7
11
|
|
|
8
12
|
const deleteComponentsFn = async (sourceOfComponents, answers, options) => {
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
2
|
import chalk from 'chalk';
|
|
4
3
|
import fetch from 'node-fetch';
|
|
5
4
|
|
|
6
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
getPegaServerConfig,
|
|
7
|
+
addDebugLog,
|
|
8
|
+
getApplicationAndVersionFromToken,
|
|
9
|
+
constructCompleteUrl,
|
|
10
|
+
getHttpsAgent,
|
|
11
|
+
validateRulesetVersion } from '../../util.js';
|
|
7
12
|
import { LIST_COMPONENT_LIBRARIES_SERVICE_REST_ENDPOINT, TOKEN_PATH } from '../../constants.js';
|
|
8
13
|
|
|
9
14
|
export const SOURCE_OF_COMPONENT_TYPES = {
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { join } from 'path';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
addDebugLog,
|
|
6
|
+
getConfigDefaults,
|
|
7
|
+
getLibraryArchiveDirectories,
|
|
8
|
+
getLibraryArchivesVersions,
|
|
9
|
+
setConfigExportRelativePath,
|
|
10
|
+
forceDefaultsUpdate } from '../../util.js';
|
|
5
11
|
|
|
6
12
|
export const SOURCE_OF_COMPONENT_TYPES = {
|
|
7
13
|
SERVER: 'Server',
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import { promisify } from 'util';
|
|
3
3
|
import { join } from 'path';
|
|
4
|
-
import path from 'path';
|
|
5
4
|
|
|
6
5
|
import inquirer from 'inquirer';
|
|
7
6
|
import ncp from 'ncp';
|
|
@@ -21,7 +20,7 @@ import {
|
|
|
21
20
|
checkAccessTokenExpiration
|
|
22
21
|
} from '../../util.js';
|
|
23
22
|
import { TASKS_CONFIG_JSON_FILENAME, ARCHIVES_PATH, BIN_ARCHIVES_PATH } from '../../constants.js';
|
|
24
|
-
import { getFilePathQuestions, getLibraryQuestion, getLibraryVersionQuestion, updateSavedExportFilePath,
|
|
23
|
+
import { getFilePathQuestions, getLibraryQuestion, getLibraryVersionQuestion, updateSavedExportFilePath, getServerOrDirectoryQuestion } from './helper.js';
|
|
25
24
|
import { localBuildLibrary } from '../build-lib/index.js';
|
|
26
25
|
import publishArchive from '../publish-archive/index.js';
|
|
27
26
|
|
|
@@ -143,8 +142,6 @@ addDebugLog("exportCLArch", `exportPath: ${exportPath}, orgLibName: ${orgLibName
|
|
|
143
142
|
}
|
|
144
143
|
}
|
|
145
144
|
|
|
146
|
-
|
|
147
|
-
|
|
148
145
|
// archive it
|
|
149
146
|
output = await zipVersionAndArchiveCL(configDef.currentOrgLib, configDef.buildVersion);
|
|
150
147
|
|
|
@@ -163,9 +160,6 @@ addDebugLog("exportCLArch", `exportPath: ${exportPath}, orgLibName: ${orgLibName
|
|
|
163
160
|
|
|
164
161
|
|
|
165
162
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
163
|
}
|
|
170
164
|
|
|
171
165
|
|
|
@@ -191,30 +185,6 @@ addDebugLog("exportArch", `exportPath: ${exportPath}, orgLibName: ${orgLibName},
|
|
|
191
185
|
|
|
192
186
|
if (orgLibName === configDef.currentOrgLib && selectedVersion === configDef.buildVersion) {
|
|
193
187
|
|
|
194
|
-
/*
|
|
195
|
-
let currentOrStore = currentOrArchive;
|
|
196
|
-
if (currentOrArchive === "") {
|
|
197
|
-
console.log("\nYou've selected the current working library/version.");
|
|
198
|
-
console.log("Export store or the current.");
|
|
199
|
-
const archAnswers = await inquirer.prompt([
|
|
200
|
-
{
|
|
201
|
-
name: 'currentOrStore',
|
|
202
|
-
type: 'rawlist',
|
|
203
|
-
message: 'Select current or store',
|
|
204
|
-
default: "Current",
|
|
205
|
-
choices: ["Current", "Store"]
|
|
206
|
-
},
|
|
207
|
-
]);
|
|
208
|
-
|
|
209
|
-
currentOrStore = archAnswers.currentOrStore;
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
if (currentOrStore === "Current") {
|
|
214
|
-
archiveBeforeStore = true;
|
|
215
|
-
}
|
|
216
|
-
*/
|
|
217
|
-
|
|
218
188
|
// We are just going to archive before store and not ask
|
|
219
189
|
archiveBeforeStore = true;
|
|
220
190
|
|
|
@@ -262,6 +232,8 @@ addDebugLog("exportArch", `exportPath: ${exportPath}, orgLibName: ${orgLibName},
|
|
|
262
232
|
|
|
263
233
|
|
|
264
234
|
if (archiveBeforeStore) {
|
|
235
|
+
|
|
236
|
+
|
|
265
237
|
// archive it
|
|
266
238
|
output = await zipVersionAndArchive(configDef.currentOrgLib, configDef.buildVersion);
|
|
267
239
|
|
|
@@ -386,7 +358,7 @@ export default async options => {
|
|
|
386
358
|
({ selectedVersion } = libraryVersionAnswer);
|
|
387
359
|
}
|
|
388
360
|
|
|
389
|
-
|
|
361
|
+
// when we can export to server, un comment this out
|
|
390
362
|
if (isLibraryBasedCL) {
|
|
391
363
|
if (exportTo === "") {
|
|
392
364
|
const serverOrDirectoryQuestion = await getServerOrDirectoryQuestion();
|
|
@@ -397,8 +369,8 @@ export default async options => {
|
|
|
397
369
|
else {
|
|
398
370
|
exportTo = "Directory";
|
|
399
371
|
}
|
|
400
|
-
|
|
401
|
-
exportTo = "Directory"; // remove this line when above is uncommented out
|
|
372
|
+
|
|
373
|
+
//exportTo = "Directory"; // remove this line when above is uncommented out
|
|
402
374
|
|
|
403
375
|
|
|
404
376
|
if (exportTo === "Directory") {
|
|
@@ -422,6 +394,10 @@ export default async options => {
|
|
|
422
394
|
else {
|
|
423
395
|
await checkAccessTokenExpiration();
|
|
424
396
|
|
|
397
|
+
// archive it
|
|
398
|
+
await zipVersionAndArchive(orgLibName, selectedVersion);
|
|
399
|
+
|
|
400
|
+
|
|
425
401
|
// publish to server
|
|
426
402
|
await publishArchive(orgLibName, selectedVersion);
|
|
427
403
|
|
|
@@ -4,8 +4,25 @@ import path from 'path';
|
|
|
4
4
|
import fetch from 'node-fetch';
|
|
5
5
|
import { join } from 'path';
|
|
6
6
|
import { Listr } from 'listr2';
|
|
7
|
-
import {
|
|
8
|
-
|
|
7
|
+
import {
|
|
8
|
+
addDebugLog,
|
|
9
|
+
getHttpsAgent,
|
|
10
|
+
getConfigDefaults,
|
|
11
|
+
getPegaServerConfig,
|
|
12
|
+
convertIntoPascalCase,
|
|
13
|
+
getComponents,
|
|
14
|
+
getComponentDirectoryPath,
|
|
15
|
+
getDirectoryFiles,
|
|
16
|
+
setConfigImportRelativePath,
|
|
17
|
+
forceDefaultsUpdate,
|
|
18
|
+
constructCompleteUrl } from '../../util.js';
|
|
19
|
+
import {
|
|
20
|
+
TASKS_CONFIG_JSON_FILENAME,
|
|
21
|
+
TEMP_PATH,
|
|
22
|
+
PACKAGE_JSON_FILENAME,
|
|
23
|
+
LIST_COMPONENT_LIBRARY_ARCHIVES_SERVICE_REST_ENDPOINT,
|
|
24
|
+
COMPONENT_LIBRARY_ARCHIVE_SERVICE_REST_ENDPOINT,
|
|
25
|
+
TOKEN_PATH} from '../../constants.js';
|
|
9
26
|
|
|
10
27
|
|
|
11
28
|
|
|
@@ -513,9 +530,6 @@ async function fetchComponentLibraryArchivesFromInfinity(apiUrl, headers) {
|
|
|
513
530
|
);
|
|
514
531
|
|
|
515
532
|
let urlParams = `/app-name/${appName}/file-name/${fileName}/file-type/${fileType}/rulesetname/${ruleSet}/rulesetversion/${ruleSetVersion}`;
|
|
516
|
-
//let urlParams = `&ApplicationName=${ApplicationName}&ApplicationVersion=${ApplicationVersion}&RulesetName=${rulesetName}&RulesetVersion=${rulesetVersion}`;
|
|
517
|
-
//urlParams = encodeURIComponent(urlParams);
|
|
518
|
-
|
|
519
533
|
|
|
520
534
|
url = url.concat(urlParams);
|
|
521
535
|
|