@pega/custom-dx-components 0.242.14 → 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 +1 -1
- package/src/tasks/create/index.js +1 -1
- package/src/tasks/create-all/index.js +1 -1
- package/src/tasks/init/template/package.json.mustache +1 -1
- package/src/tasks/list/helper.js +4 -1
- package/src/tasks/revert-webpack/index.js +10 -28
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/DetailsRender.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.tsx +2 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/DetailsRender.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/DetailsRender.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.tsx +2 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/DetailsRender.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/DetailsRender.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.tsx +2 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/DetailsRender.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/DetailsRender.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.tsx +2 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/DetailsRender.tsx +1 -1
package/package.json
CHANGED
|
@@ -132,7 +132,7 @@ const compileMustacheTemplates = async (
|
|
|
132
132
|
// delete file from main components
|
|
133
133
|
fs.rmSync(filePath);
|
|
134
134
|
}
|
|
135
|
-
else if (realFileName
|
|
135
|
+
else if (realFileName.includes(".tsx") || realFileName.includes(".ts") ) {
|
|
136
136
|
// going to search for shared file names an change the import path
|
|
137
137
|
let newOutput = output;
|
|
138
138
|
for (const index in SHARED_FILE_NAMES) {
|
|
@@ -140,7 +140,7 @@ export const compileMustacheTemplates = async (
|
|
|
140
140
|
// delete file from main components
|
|
141
141
|
fs.rmSync(filePath);
|
|
142
142
|
}
|
|
143
|
-
else if (realFileName
|
|
143
|
+
else if (realFileName.includes(".tsx") || realFileName.includes(".ts") ) {
|
|
144
144
|
// going to search for shared file names an change the import path
|
|
145
145
|
let newOutput = output;
|
|
146
146
|
for (const index in SHARED_FILE_NAMES) {
|
|
@@ -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
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Fragment, Children, ReactElement } from 'react';
|
|
2
|
-
import { Grid, Flex, FieldGroup, withConfiguration, GridContainerProps } from '@pega/cosmos-react-core';
|
|
1
|
+
import { Fragment, Children, type ReactElement } from 'react';
|
|
2
|
+
import { Grid, Flex, FieldGroup, withConfiguration, type GridContainerProps } from '@pega/cosmos-react-core';
|
|
3
3
|
import type { PConnFieldProps } from './PConnProps';
|
|
4
4
|
import DetailsRender from './DetailsRender';
|
|
5
5
|
import HighlightRender from './HighlightRender';
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Fragment, Children, ReactElement } from 'react';
|
|
2
|
-
import { Grid, Flex, FieldGroup, withConfiguration, GridContainerProps } from '@pega/cosmos-react-core';
|
|
1
|
+
import { Fragment, Children, type ReactElement } from 'react';
|
|
2
|
+
import { Grid, Flex, FieldGroup, withConfiguration, type GridContainerProps } from '@pega/cosmos-react-core';
|
|
3
3
|
import type { PConnFieldProps } from './PConnProps';
|
|
4
4
|
import DetailsRender from './DetailsRender';
|
|
5
5
|
import HighlightRender from './HighlightRender';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Fragment, Children, ReactElement } from 'react';
|
|
2
|
-
import { Grid, Flex, FieldGroup, withConfiguration, GridContainerProps } from '@pega/cosmos-react-core';
|
|
1
|
+
import { Fragment, Children, type ReactElement } from 'react';
|
|
2
|
+
import { Grid, Flex, FieldGroup, withConfiguration, type GridContainerProps } from '@pega/cosmos-react-core';
|
|
3
3
|
import type { PConnFieldProps } from './PConnProps';
|
|
4
4
|
import DetailsRender from './DetailsRender';
|
|
5
5
|
import HighlightRender from './HighlightRender';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Fragment, Children, ReactElement } from 'react';
|
|
2
|
-
import { Grid, Flex, FieldGroup, withConfiguration, GridContainerProps } from '@pega/cosmos-react-core';
|
|
1
|
+
import { Fragment, Children, type ReactElement } from 'react';
|
|
2
|
+
import { Grid, Flex, FieldGroup, withConfiguration, type GridContainerProps } from '@pega/cosmos-react-core';
|
|
3
3
|
import type { PConnFieldProps } from './PConnProps';
|
|
4
4
|
import DetailsRender from './DetailsRender';
|
|
5
5
|
import HighlightRender from './HighlightRender';
|