@pega/dx-component-builder-sdk 8.23.15 → 8.23.16

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/dx-component-builder-sdk",
3
- "version": "8.23.15",
3
+ "version": "8.23.16",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
@@ -54,13 +54,7 @@ export const getBuildCategory = async (options) => {
54
54
  ];
55
55
  };
56
56
 
57
- export const getPublishComponentQuestions = async () => {
58
- const components = await getComponentsObj();
59
-
60
- if (components.length == 0) {
61
- console.log(chalk.redBright("No components to publish"));
62
- process.exit(1);
63
- }
57
+ export const getPublishComponentQuestions = async (category) => {
64
58
 
65
59
  const defaultPegaConfig = await getPegaServerConfig();
66
60
 
@@ -154,6 +154,13 @@ export default async options => {
154
154
  }
155
155
 
156
156
  const components = await getComponentsObj(false, category);
157
+
158
+ // end if find no componets
159
+ if (components.length == 0) {
160
+ console.log(chalk.redBright("No components to publish"));
161
+ process.exit(1);
162
+ }
163
+
157
164
  const questions = await getPublishComponentQuestions(category);
158
165
  const answers = await inquirer.prompt(questions);
159
166
  const {sourceMap, devBuild } = answers;
@@ -180,6 +187,7 @@ export default async options => {
180
187
 
181
188
  }
182
189
  else {
190
+
183
191
  for (const component of components) {
184
192
  const componentKey = component.value;
185
193
  const componentKeyName = component.name;