@pega/custom-dx-components 0.25.43 → 0.25.45
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/README.md +1 -1
- package/package.json +26 -32
- package/src/tasks/bundle/builder/index.js +15 -15
- package/src/tasks/create/index.js +4 -1
- package/src/tasks/export-archive/index.js +0 -11
- package/src/tasks/import-archive/helper.js +38 -39
- package/src/tasks/import-archive/index.js +2 -9
- package/src/tasks/import-comp/index.js +0 -9
- package/src/tasks/init/index.js +59 -62
- package/src/tasks/init/template/README.md +1 -1
- package/src/tasks/init/template/package.json.mustache +1 -2
- package/src/tasks/list-pub/helper.js +0 -3
- package/src/tasks/publish/index.js +5 -1
- package/src/tasks/publish-lib/index.js +0 -7
- package/src/tasks/restore/index.js +0 -3
- package/src/tasks/show-status/index.js +2 -1
- package/src/tasks/validator/index.js +8 -0
- package/src/util.js +482 -468
- package/tests/functional/localLibCreateLibExportImportLib.test.js +1 -1
|
@@ -22,7 +22,8 @@ import {
|
|
|
22
22
|
getConfigDefaults,
|
|
23
23
|
getInputConfigForCommand,
|
|
24
24
|
convertYNToBoolean,
|
|
25
|
-
checkForBranch
|
|
25
|
+
checkForBranch,
|
|
26
|
+
applyPegaData } from '../../util.js';
|
|
26
27
|
|
|
27
28
|
import { getPublishComponentQuestions, publishComponentToServer, zipComponent } from './helper.js';
|
|
28
29
|
import { default as buildLibrary } from '../build-lib/index.js';
|
|
@@ -61,9 +62,12 @@ addDebugLog("publish", "", "+");
|
|
|
61
62
|
// const currentVersion = devBuild ? `${orgLib.version}-dev`: orgLib.version;
|
|
62
63
|
const currentVersion = orgLib.buildVersion;
|
|
63
64
|
const serverConfg = await getPegaServerConfig();
|
|
65
|
+
let configJson = {};
|
|
66
|
+
await applyPegaData(configJson);
|
|
64
67
|
|
|
65
68
|
console.log();
|
|
66
69
|
console.log(`Publishing to server: ${chalk.green.bold(`${serverConfg.server}`)}`);
|
|
70
|
+
console.log(`Cosmos version: ${chalk.green.bold(`${configJson.packageCosmosVersion}`)}`);
|
|
67
71
|
|
|
68
72
|
if (useInputConfig) {
|
|
69
73
|
const inputConfig = await getInputConfigForCommand("publish");
|
|
@@ -110,13 +110,6 @@ addDebugLog("zipLibraryComponent", `libraryName: ${libraryName}, libraryVersion:
|
|
|
110
110
|
localizationsContent = Buffer.from(fs.readFileSync(localizationsJson)).toString();
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
// if (fs.existsSync(libraryDirectory)) {
|
|
114
|
-
// fs.rm(libraryDirectory, { recursive: true }, err => {
|
|
115
|
-
// if (err) {
|
|
116
|
-
// throw err;
|
|
117
|
-
// }
|
|
118
|
-
// });
|
|
119
|
-
// }
|
|
120
113
|
|
|
121
114
|
return { zipContent, configContent, localizationsContent};
|
|
122
115
|
};
|
|
@@ -370,10 +370,18 @@ export default async (option) => {
|
|
|
370
370
|
throw new Error(`Invalid schema json in config.json: ${er}`);
|
|
371
371
|
}
|
|
372
372
|
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
373
376
|
const valid = validateSchema(data);
|
|
374
377
|
|
|
375
378
|
if (valid) {
|
|
376
379
|
|
|
380
|
+
if (data.description === "") {
|
|
381
|
+
throw new Error(`Invalid schema json in config.json: 'description' cannot be blank.`);
|
|
382
|
+
process.exit(1);
|
|
383
|
+
}
|
|
384
|
+
|
|
377
385
|
if (
|
|
378
386
|
componentToValidate &&
|
|
379
387
|
!/^[A-Za-z0-9]+_[A-Za-z0-9]+_[A-Za-z0-9]+$/.test(componentToValidate)
|