@pega/custom-dx-components 0.242.15 → 0.242.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
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@pega/configs": "^0.6.0",
|
|
83
|
-
"@pega/custom-dx-components": "0.242.
|
|
83
|
+
"@pega/custom-dx-components": "0.242.16",
|
|
84
84
|
"@pega/pcore-pconnect-typedefs": "~3.0.0",
|
|
85
85
|
"@storybook/addon-actions": "^7.6.7",
|
|
86
86
|
"@storybook/addon-essentials": "^7.6.19",
|
package/src/tasks/list/helper.js
CHANGED
|
@@ -102,7 +102,10 @@ async function fetchComponentsFromInfinity(apiUrl, headers) {
|
|
|
102
102
|
})
|
|
103
103
|
.then((response) => {
|
|
104
104
|
status = response.status;
|
|
105
|
-
if (status ===
|
|
105
|
+
if (status === 401) {
|
|
106
|
+
throw new Error('Error occurred in authentication. Please regenerate using authenticate');
|
|
107
|
+
}
|
|
108
|
+
else if (status === 404){
|
|
106
109
|
throw new Error('404: Server resource not found');
|
|
107
110
|
}
|
|
108
111
|
else if (status === 405){
|
|
@@ -1,51 +1,34 @@
|
|
|
1
|
-
|
|
2
1
|
import fs from 'fs';
|
|
3
|
-
import path
|
|
4
|
-
import { URL, fileURLToPath } from 'url';
|
|
2
|
+
import path from 'path';
|
|
5
3
|
|
|
6
4
|
import chalk from 'chalk';
|
|
7
|
-
import { up } from 'inquirer/lib/utils/readline.js';
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
convertIntoPascalCase,
|
|
11
|
-
showVersion,
|
|
12
|
-
updateUseWebPackPromotion,
|
|
13
|
-
getLibraryBased
|
|
14
|
-
} from '../../util.js';
|
|
15
|
-
import {
|
|
16
|
-
WEBPACK_CONFIG_JS_FILENAME,
|
|
17
|
-
BUILDER_INDEX_FILE_PATH
|
|
18
|
-
} from '../../constants.js';
|
|
19
5
|
|
|
20
|
-
|
|
6
|
+
import { showVersion, updateUseWebPackPromotion, getLibraryBased } from '../../util.js';
|
|
7
|
+
import { WEBPACK_CONFIG_JS_FILENAME } from '../../constants.js';
|
|
21
8
|
|
|
9
|
+
const isLibraryBased = await getLibraryBased();
|
|
22
10
|
|
|
23
11
|
export const renamePromotedWebPack = async () => {
|
|
24
|
-
|
|
25
12
|
// call this function from top level
|
|
26
13
|
// fs.copyFileSync("./webpack.config.js", "webpack.config.js")
|
|
27
14
|
|
|
28
15
|
const promoteWebPackDir = path.resolve(WEBPACK_CONFIG_JS_FILENAME);
|
|
29
|
-
const renamedPromoteWebPackDir = path.resolve(`${WEBPACK_CONFIG_JS_FILENAME
|
|
16
|
+
const renamedPromoteWebPackDir = path.resolve(`${WEBPACK_CONFIG_JS_FILENAME}.notused`);
|
|
30
17
|
|
|
31
18
|
try {
|
|
32
19
|
fs.renameSync(promoteWebPackDir, renamedPromoteWebPackDir);
|
|
33
|
-
}
|
|
34
|
-
catch (ex) {
|
|
20
|
+
} catch (ex) {
|
|
35
21
|
console.log(chalk.bold.red(`File ${promoteWebPackDir} not found.`));
|
|
36
22
|
process.exit();
|
|
37
23
|
}
|
|
38
24
|
|
|
39
|
-
console.log(chalk.bold.green(
|
|
25
|
+
console.log(chalk.bold.green('Bundler reverted to using internal webpack.config.js.'));
|
|
40
26
|
console.log(chalk.bold.green(`File ${promoteWebPackDir} marked as not used.`));
|
|
27
|
+
};
|
|
41
28
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export default async options => {
|
|
29
|
+
export default async () => {
|
|
47
30
|
if (isLibraryBased) {
|
|
48
|
-
console.log(`Command only supported for ${chalk.bold.green('non library based')} components.`)
|
|
31
|
+
console.log(`Command only supported for ${chalk.bold.green('non library based')} components.`);
|
|
49
32
|
process.exit();
|
|
50
33
|
}
|
|
51
34
|
|
|
@@ -53,5 +36,4 @@ export default async options => {
|
|
|
53
36
|
|
|
54
37
|
await renamePromotedWebPack();
|
|
55
38
|
await updateUseWebPackPromotion(false);
|
|
56
|
-
|
|
57
39
|
};
|