@pega/custom-dx-components 0.25.29 → 0.25.30

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/custom-dx-components",
3
- "version": "0.25.29",
3
+ "version": "0.25.30",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
@@ -238,6 +238,12 @@ export const importArch = async(filePath, fileName, hadArchive) => {
238
238
  addDebugLog("importArch", `filePath: ${filePath}, fileName: ${fileName}`, "");
239
239
 
240
240
  const currentDirectory = process.cwd();
241
+
242
+ const storeDirectory = join (currentDirectory, ARCHIVES_PATH);
243
+ if (!fs.existsSync(storeDirectory)) {
244
+ fs.mkdirSync(storeDirectory);
245
+ }
246
+
241
247
  const tempDirectory = join(currentDirectory, TEMP_PATH);
242
248
 
243
249
 
@@ -416,6 +422,11 @@ export const importArchServer = async(filePath, fileName, hadArchive) => {
416
422
  addDebugLog("importArch", `filePath: ${filePath}, fileName: ${fileName}`, "");
417
423
 
418
424
  const currentDirectory = process.cwd();
425
+ const storeDirectory = join (currentDirectory, ARCHIVES_PATH);
426
+ if (!fs.existsSync(storeDirectory)) {
427
+ fs.mkdirSync(storeDirectory);
428
+ }
429
+
419
430
  const tempDirectory = join(currentDirectory, TEMP_PATH);
420
431
 
421
432
  const zipFilePath = join(filePath, fileName);
@@ -632,6 +643,11 @@ export const writeZipBuffer = async(fileName, fileBuffer) => {
632
643
  const currentDirectory = process.cwd();
633
644
  const tempDirectory = join(currentDirectory, TEMP_PATH);
634
645
 
646
+ const storeDirectory = join (currentDirectory, ARCHIVES_PATH);
647
+ if (!fs.existsSync(storeDirectory)) {
648
+ fs.mkdirSync(storeDirectory);
649
+ }
650
+
635
651
  if (!fs.existsSync (tempDirectory)) {
636
652
  fs.mkdirSync(tempDirectory);
637
653
  }
@@ -107,7 +107,7 @@
107
107
  "@babel/preset-react": "^7.27.1",
108
108
  "@babel/preset-typescript": "^7.27.1",
109
109
  "@pega/configs": "^0.16.3",
110
- "@pega/custom-dx-components": "~0.25.29",
110
+ "@pega/custom-dx-components": "~0.25.30",
111
111
  "@pega/pcore-pconnect-typedefs": "^4.1.0-alpha.1",
112
112
  "@storybook/addon-actions": "^8.6.12",
113
113
  "@storybook/addon-essentials": "^8.6.12",
@@ -3,6 +3,7 @@ import chalk from 'chalk';
3
3
  import fetch from 'node-fetch';
4
4
  import { join } from 'path';
5
5
  import fs from 'fs';
6
+ import ora from 'ora';
6
7
 
7
8
  import { zipUnArchiveToTempAndReturnBuffer, constructCompleteUrl, getHttpsAgent, getPegaServerConfig, addDebugLog, getConfigDefaults } from '../../util.js';
8
9
 
@@ -166,16 +167,22 @@ export default async (orgLibName, selectedVersion) => {
166
167
 
167
168
  zipContent = zipContent.replaceAll('"', "");
168
169
 
170
+ let spinner;
169
171
  try {
172
+ console.log("");
173
+ spinner = ora('Exporting to server...\n').start();
170
174
  publishComponentLibraryArchiveToServer(content, zipContent, true )
171
175
  .then( () => {
176
+ spinner.stop();
172
177
  console.log(chalk.green.bold(`Success: Published Archive ${content.libraryName}/${content.version} to server.`));
173
178
  })
174
179
  .catch( (err) => {
180
+ spinner.stop();
175
181
  console.log(chalk.red.bold(err));
176
182
  })
177
183
  }
178
184
  catch (err) {
185
+ spinner.stop();
179
186
  console.log(chalk.bold.red(err.toString()));
180
187
  }
181
188