@pega/custom-dx-components 0.25.30 → 0.25.32
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 +3 -5
- package/eslint.config.mjs +227 -0
- package/package.json +3 -3
- package/src/constants.js +1 -1
- package/src/tasks/create/index.js +8 -2
- package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.ts.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +2 -3
- package/src/tasks/create/templates/Constellation/Field/Text-Input/{StatusWork.tsx → StatusWork.tsx.mustache} +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/Avatar.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/HighlightRender.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/StatusWork.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Avatar.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/HighlightRender.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/StatusWork.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/PAGE/GetNextWork.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.tsx.mustache +0 -1
- package/src/tasks/create-all/index.js +18 -2
- package/src/tasks/create-lib/helper.js +1 -2
- package/src/tasks/delete-pub/index.js +1 -1
- package/src/tasks/export-archive/helper.js +1 -1
- package/src/tasks/import-archive/index.js +22 -11
- package/src/tasks/init/template/.eslintignore +1 -0
- package/src/tasks/init/template/README.md +3 -5
- package/src/tasks/init/template/eslint.config.mjs +227 -0
- package/src/tasks/init/template/package.json.mustache +3 -2
- package/src/tasks/init/template/tasks.config.json +2 -2
- package/src/tasks/init/template/tsconfig.build.json +2 -1
- package/src/tasks/init/template/tsconfig.json +1 -0
- package/src/tasks/list-pub/index.js +4 -1
- package/src/tasks/promote-webpack/index.js +0 -3
- package/src/tasks/publish/index.js +2 -0
- package/src/tasks/publish-archive/index.js +2 -1
- package/src/tasks/show-help/index.js +9 -2
- package/src/tasks/show-status/index.js +7 -1
- package/src/tasks/validator/index.js +5 -0
- package/src/util.js +30 -2
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/Avatar.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/HighlightRender.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/StatusWork.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/GetNextWork.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/index.tsx +2 -3
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts +2 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTextInput/StatusWork.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/Avatar.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/HighlightRender.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/StatusWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/GetNextWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/index.tsx +2 -3
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +1 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts +2 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/StatusWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/Avatar.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/HighlightRender.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/StatusWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/GetNextWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/index.tsx +2 -3
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +1 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/repeat-utils.ts +2 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/StatusWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +0 -1
- package/tests/functional/localCreateAllListDeleteAll.test.js +4 -0
- package/tests/functional/localCreateBuildAllDeleteAll.test.js +4 -0
- package/tests/functional/localCreateBuildDelete.test.js +4 -0
- package/tests/functional/localCreateListDelete.test.js +11 -6
- package/tests/functional/localCreatePublishAllDeleteAll.test.js +4 -0
- package/tests/functional/localCreatePublishDelete.test.js +4 -0
- package/tests/functional/localCreateRenameDelete.test.js +4 -0
- package/tests/functional/localLibCreateLibValidateDeleteLib.test.js +3 -3
- package/tests/functional/localPromoteRevertWP.test.js +9 -8
- package/.eslintrc.json +0 -18
- package/src/tasks/init/template/.eslintrc.json +0 -240
package/README.md
CHANGED
|
@@ -8,15 +8,13 @@ This project provides you with an environment to extend Constellation by giving
|
|
|
8
8
|
|
|
9
9
|
Ensure you have access to the following in your system:
|
|
10
10
|
|
|
11
|
-
- Pega Infinity Server version
|
|
11
|
+
- Pega Infinity Server version 25.1 or later
|
|
12
12
|
|
|
13
13
|
- Git version 2.30 or later
|
|
14
14
|
|
|
15
|
-
- System node version
|
|
15
|
+
- System node version >= 22.15.0
|
|
16
16
|
|
|
17
|
-
- System npm version
|
|
18
|
-
|
|
19
|
-
- Recommended (node 20, npm 10)
|
|
17
|
+
- System npm version 10
|
|
20
18
|
|
|
21
19
|
## Latest Documentation
|
|
22
20
|
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import js from '@eslint/js';
|
|
5
|
+
import { FlatCompat } from '@eslint/eslintrc';
|
|
6
|
+
import tseslint from 'typescript-eslint';
|
|
7
|
+
import sonarjs from 'eslint-plugin-sonarjs';
|
|
8
|
+
import importPlugin from 'eslint-plugin-import';
|
|
9
|
+
import react from 'eslint-plugin-react';
|
|
10
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
|
11
|
+
|
|
12
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
+
const __dirname = path.dirname(__filename);
|
|
14
|
+
const compat = new FlatCompat({
|
|
15
|
+
baseDirectory: __dirname,
|
|
16
|
+
recommendedConfig: js.configs.recommended,
|
|
17
|
+
sonarjs: sonarjs.configs.recommended,
|
|
18
|
+
importPlugin: importPlugin.configs.recommended,
|
|
19
|
+
react: react.configs.recommended,
|
|
20
|
+
reactHooks: reactHooks.configs.recommended,
|
|
21
|
+
allConfig: js.configs.all
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export default tseslint.config(
|
|
25
|
+
tseslint.configs.recommended,
|
|
26
|
+
globalIgnores([
|
|
27
|
+
'**/node_modules',
|
|
28
|
+
'packages/*/lib',
|
|
29
|
+
'!**/.storybook',
|
|
30
|
+
'.storybook/public',
|
|
31
|
+
'**/demo.stories.jsx',
|
|
32
|
+
'**/mock.stories.js',
|
|
33
|
+
'**/demo.stories.tsx',
|
|
34
|
+
'**/demo.test.tsx',
|
|
35
|
+
'**/mock.stories.ts',
|
|
36
|
+
'**/*.mdx',
|
|
37
|
+
'**/webpack.config.js',
|
|
38
|
+
'src/helpers/config_access.js',
|
|
39
|
+
'**/*.html',
|
|
40
|
+
'**/*.css',
|
|
41
|
+
'**/*.json',
|
|
42
|
+
'**/*.md',
|
|
43
|
+
'**/*.svg',
|
|
44
|
+
'**/*.zip',
|
|
45
|
+
'**/*.d.ts',
|
|
46
|
+
'*.storybook/*',
|
|
47
|
+
'**/*.cjs',
|
|
48
|
+
'**/paths.js',
|
|
49
|
+
'dist/*',
|
|
50
|
+
'lib/*'
|
|
51
|
+
]),
|
|
52
|
+
{
|
|
53
|
+
languageOptions: {
|
|
54
|
+
globals: {
|
|
55
|
+
PCore: 'readonly',
|
|
56
|
+
window: true,
|
|
57
|
+
console: true,
|
|
58
|
+
document: true,
|
|
59
|
+
fetch: true
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
ecmaVersion: 13,
|
|
63
|
+
sourceType: 'script',
|
|
64
|
+
|
|
65
|
+
parserOptions: {
|
|
66
|
+
project: 'tsconfig.json'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
settings: {
|
|
71
|
+
'import/resolver': {
|
|
72
|
+
typescript: {},
|
|
73
|
+
|
|
74
|
+
node: {
|
|
75
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx']
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
react: {
|
|
80
|
+
version: 'detect'
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
plugins: { sonarjs, import: importPlugin, react, 'react-hooks': reactHooks },
|
|
85
|
+
rules: {
|
|
86
|
+
'prettier/prettier': 'off',
|
|
87
|
+
'sonarjs/cognitive-complexity': 'off',
|
|
88
|
+
'sonarjs/no-identical-functions': 'off',
|
|
89
|
+
'sonarjs/no-duplicate-string': 'off',
|
|
90
|
+
'sonarjs/no-nested-template-literals': 'off',
|
|
91
|
+
'@typescript-eslint/array-type': 'off',
|
|
92
|
+
'@typescript-eslint/no-wrapper-object-types': 'off',
|
|
93
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
94
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
95
|
+
'@typescript-eslint/ban-ts-comment': 'off',
|
|
96
|
+
'@typescript-eslint/no-unsafe-function-type': 'off',
|
|
97
|
+
'@typescript-eslint/no-inferrable-types': 'off',
|
|
98
|
+
'import/extensions': ['off', 'never'],
|
|
99
|
+
'import/named': 'off',
|
|
100
|
+
'import/no-cycle': 'off',
|
|
101
|
+
'import/no-duplicates': 'off',
|
|
102
|
+
'import/no-extraneous-dependencies': 'off',
|
|
103
|
+
'import/no-named-as-default': 'off',
|
|
104
|
+
'import/no-named-as-default-member': 'off',
|
|
105
|
+
'import/no-self-import': 'off',
|
|
106
|
+
'import/no-unresolved': 'off',
|
|
107
|
+
'import/no-useless-path-segments': 'off',
|
|
108
|
+
'import/order': 'off',
|
|
109
|
+
'no-else-return': 'off',
|
|
110
|
+
'no-restricted-syntax': 'off',
|
|
111
|
+
'no-underscore-dangle': 'off',
|
|
112
|
+
'jsx-a11y/alt-text': 'off',
|
|
113
|
+
'jsx-a11y/anchor-is-valid': 'off',
|
|
114
|
+
'jsx-a11y/click-events-have-key-events': 'off',
|
|
115
|
+
'jsx-a11y/label-has-associated-control': 'off',
|
|
116
|
+
'jsx-a11y/no-static-element-interactions': 'off',
|
|
117
|
+
'react/jsx-fragments': 'off',
|
|
118
|
+
'react/jsx-no-bind': 'off',
|
|
119
|
+
'react/self-closing-comp': 'off',
|
|
120
|
+
'sonarjs/prefer-immediate-return': 'off',
|
|
121
|
+
'@typescript-eslint/dot-notation': 'off',
|
|
122
|
+
'@typescript-eslint/naming-convention': 'off',
|
|
123
|
+
'@typescript-eslint/ban-types': 'off',
|
|
124
|
+
eqeqeq: 'off',
|
|
125
|
+
'no-alert': 'off',
|
|
126
|
+
'no-console': 'error',
|
|
127
|
+
'no-fallthrough': 'error',
|
|
128
|
+
'no-undef': 'error',
|
|
129
|
+
'no-unused-vars': 'off',
|
|
130
|
+
'no-var': 'off',
|
|
131
|
+
yoda: 'error',
|
|
132
|
+
'no-irregular-whitespace': 'off',
|
|
133
|
+
'no-empty': 'off',
|
|
134
|
+
'no-new-object': 'off',
|
|
135
|
+
'import/no-relative-packages': 'off',
|
|
136
|
+
'import/no-mutable-exports': 'error',
|
|
137
|
+
'sonarjs/max-switch-cases': 'error',
|
|
138
|
+
'sonarjs/no-collapsible-if': 'error',
|
|
139
|
+
'sonarjs/no-all-duplicated-branches': 'error',
|
|
140
|
+
'sonarjs/no-duplicated-branches': 'error',
|
|
141
|
+
'sonarjs/no-gratuitous-expressions': 'off',
|
|
142
|
+
'sonarjs/no-ignored-return': 'error',
|
|
143
|
+
'sonarjs/no-small-switch': 'error',
|
|
144
|
+
'sonarjs/prefer-object-literal': 'error',
|
|
145
|
+
'sonarjs/prefer-single-boolean-return': 'error',
|
|
146
|
+
'@typescript-eslint/no-shadow': 'error',
|
|
147
|
+
'react/default-props-match-prop-types': 'error',
|
|
148
|
+
'react/no-unescaped-entities': 'error',
|
|
149
|
+
'react/no-unused-prop-types': 'error',
|
|
150
|
+
'react/static-property-placement': 'error',
|
|
151
|
+
'array-callback-return': 'error',
|
|
152
|
+
camelcase: 'error',
|
|
153
|
+
'func-names': 'error',
|
|
154
|
+
'no-case-declarations': 'error',
|
|
155
|
+
'no-lonely-if': 'error',
|
|
156
|
+
'no-nested-ternary': 'error',
|
|
157
|
+
'no-plusplus': 'error',
|
|
158
|
+
'no-restricted-globals': 'error',
|
|
159
|
+
'no-restricted-properties': 'error',
|
|
160
|
+
'no-shadow': 'error',
|
|
161
|
+
radix: 'error',
|
|
162
|
+
'spaced-comment': 'error',
|
|
163
|
+
'import/newline-after-import': 'error',
|
|
164
|
+
'sonarjs/no-nested-switch': 'error',
|
|
165
|
+
'@typescript-eslint/no-array-constructor': 'error',
|
|
166
|
+
'@typescript-eslint/no-unused-vars': 'error',
|
|
167
|
+
'@typescript-eslint/no-useless-constructor': 'error',
|
|
168
|
+
'react/button-has-type': 'error',
|
|
169
|
+
'react/jsx-curly-brace-presence': 'error',
|
|
170
|
+
'react/jsx-boolean-value': 'error',
|
|
171
|
+
'react/no-array-index-key': 'error',
|
|
172
|
+
'class-methods-use-this': 'error',
|
|
173
|
+
'guard-for-in': 'error',
|
|
174
|
+
'no-unneeded-ternary': 'error',
|
|
175
|
+
'no-unused-expressions': 'error',
|
|
176
|
+
'operator-assignment': 'error',
|
|
177
|
+
'prefer-template': 'error',
|
|
178
|
+
'vars-on-top': 'error',
|
|
179
|
+
'prefer-regex-literals': 'off',
|
|
180
|
+
'no-use-before-define': 'off',
|
|
181
|
+
'@typescript-eslint/no-use-before-define': 'error'
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
files: ['**/*.@(ts|tsx)'],
|
|
186
|
+
|
|
187
|
+
rules: {
|
|
188
|
+
'@typescript-eslint/method-signature-style': ['error', 'property'],
|
|
189
|
+
quotes: 'off',
|
|
190
|
+
'@typescript-eslint/quotes': 'off'
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
files: ['**/*.@(jsx|tsx|mdx)'],
|
|
195
|
+
|
|
196
|
+
rules: {
|
|
197
|
+
'react/react-in-jsx-scope': 'off',
|
|
198
|
+
'react-hooks/rules-of-hooks': 'off',
|
|
199
|
+
'react-hooks/exhaustive-deps': 'off'
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
files: ['**/*.@(ts|tsx)'],
|
|
204
|
+
rules: {
|
|
205
|
+
'no-undef': 'error',
|
|
206
|
+
'no-console': 'off',
|
|
207
|
+
'import/prefer-default-export': 'off',
|
|
208
|
+
'import/no-relative-packages': 'off',
|
|
209
|
+
'react/jsx-fragments': 'off',
|
|
210
|
+
'react/react-in-jsx-scope': 'off',
|
|
211
|
+
'react-hooks/exhaustive-deps': 'off',
|
|
212
|
+
'sonarjs/cognitive-complexity': ['warn', 45]
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
files: ['**/*.@(js|jsx|ts|tsx|mdx)'],
|
|
217
|
+
rules: {}
|
|
218
|
+
},
|
|
219
|
+
|
|
220
|
+
{
|
|
221
|
+
files: ['*/**/mocks/**.@(mocks|styles).@(tsx|ts)'],
|
|
222
|
+
|
|
223
|
+
rules: {
|
|
224
|
+
'import/prefer-default-export': ['off']
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/custom-dx-components",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.32",
|
|
4
4
|
"description": "Utility for building custom UI components",
|
|
5
5
|
"bin": "./bin/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@babel/plugin-transform-class-properties": "^7.27.1",
|
|
20
20
|
"@babel/preset-react": "^7.27.1",
|
|
21
21
|
"@pega/auth": "^0.2.24",
|
|
22
|
-
"@pega/constellation-dx-components-build-utils": "^2.0.
|
|
22
|
+
"@pega/constellation-dx-components-build-utils": "^2.0.4",
|
|
23
23
|
"@pega/inquirer-fuzzy-path": "^3.0.0",
|
|
24
24
|
"ajv": "^8.17.1",
|
|
25
25
|
"ajv-keywords": "^5.1.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"compression-webpack-plugin": "^11.1.0",
|
|
32
32
|
"css-loader": "7.1.2",
|
|
33
33
|
"css-minimizer-webpack-plugin": "^7.0.2",
|
|
34
|
-
"eslint": "^
|
|
34
|
+
"eslint": "^9.27.0",
|
|
35
35
|
"execa": "^9.5.2",
|
|
36
36
|
"file-loader": "6.2.0",
|
|
37
37
|
"fs-extra": "^11.3.0",
|
package/src/constants.js
CHANGED
|
@@ -22,7 +22,7 @@ export const ARCHIVES_PATH = 'store';
|
|
|
22
22
|
export const BIN_ARCHIVES_PATH = 'bin-arch';
|
|
23
23
|
export const TEMP_PATH = 'store/temp';
|
|
24
24
|
export const COMPONENTS_CONFIG_FILE_NAME = 'componentsconfig.json';
|
|
25
|
-
|
|
25
|
+
export const MAX_RFT_CHARS = 64;
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
/* REST end points */
|
|
@@ -23,7 +23,8 @@ import {
|
|
|
23
23
|
addDebugLog,
|
|
24
24
|
checkLibraryAndArchives,
|
|
25
25
|
getConfigDefaults,
|
|
26
|
-
getSubTypeLabel
|
|
26
|
+
getSubTypeLabel,
|
|
27
|
+
getMaxComponentNameCount
|
|
27
28
|
} from '../../util.js';
|
|
28
29
|
import { COMPONENT_SCHEMA, SHARED_FILE_NAMES } from '../../constants.js';
|
|
29
30
|
|
|
@@ -309,6 +310,7 @@ addDebugLog("create", "", "+");
|
|
|
309
310
|
);
|
|
310
311
|
} else {
|
|
311
312
|
const componentDefaults = getConfigDefaults();
|
|
313
|
+
const maxChars = getMaxComponentNameCount();
|
|
312
314
|
const questions = [
|
|
313
315
|
{
|
|
314
316
|
name: 'type',
|
|
@@ -356,7 +358,7 @@ addDebugLog("create", "", "+");
|
|
|
356
358
|
},
|
|
357
359
|
{
|
|
358
360
|
name: 'componentName',
|
|
359
|
-
message:
|
|
361
|
+
message: `Enter component name (required) (${maxChars} max chars)`,
|
|
360
362
|
validate: value => {
|
|
361
363
|
/* value should not be empty
|
|
362
364
|
It should not have spaces
|
|
@@ -364,8 +366,12 @@ addDebugLog("create", "", "+");
|
|
|
364
366
|
Only case-insensitive alphanumeric values are allowed
|
|
365
367
|
*/
|
|
366
368
|
if (value && !/^\d/.test(value) && value === sanitize(value)) {
|
|
369
|
+
if (value.length > maxChars) {
|
|
370
|
+
return `${value.length - maxChars} too many characters.`
|
|
371
|
+
}
|
|
367
372
|
return true;
|
|
368
373
|
}
|
|
374
|
+
|
|
369
375
|
return 'Only alphanumeric values are allowed, starting with alphabets, no spaces.';
|
|
370
376
|
}
|
|
371
377
|
},
|
package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2
1
|
/* eslint-disable sonarjs/cognitive-complexity */
|
|
3
2
|
import { useEffect, useRef, useState, useMemo, type MutableRefObject, type SetStateAction } from 'react';
|
|
4
3
|
import { ComboBox, menuHelpers, debounce, throttle, Button, Icon, withConfiguration, type MenuGroupProps, type MenuItemProps } from '@pega/cosmos-react-core';
|
|
@@ -414,6 +413,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
414
413
|
const { isSearchableOnKey } = props;
|
|
415
414
|
|
|
416
415
|
const [items, setItems] = useState(() => []);
|
|
416
|
+
// eslint-disable-next-line prefer-const
|
|
417
417
|
let selectItem: ((id: string, ev?: any) => void) | ((arg0: never) => void);
|
|
418
418
|
|
|
419
419
|
// convert associated to datapage listtype and transform props
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* eslint-disable sonarjs/no-collapsible-if */
|
|
2
|
+
/* eslint-disable sonarjs/cognitive-complexity */
|
|
2
3
|
/* eslint-disable func-names */
|
|
3
4
|
// @ts-nocheck
|
|
4
5
|
import { splitConditionTree } from '@pega/cosmos-react-condition-builder';
|
|
@@ -267,7 +268,7 @@ export function getDescriptorsFieldName(property, pageClass) {
|
|
|
267
268
|
return property;
|
|
268
269
|
}
|
|
269
270
|
|
|
270
|
-
// eslint-disable-next-line
|
|
271
|
+
// eslint-disable-next-line, sonarjs/cognitive-complexity
|
|
271
272
|
export function preparePatchQueryFields(fields, isDataObject = false, classID = '', getPConnect) {
|
|
272
273
|
const queryFields = [];
|
|
273
274
|
// Descriptors can be configured only for single selectionMode properties
|
package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache
CHANGED
|
@@ -77,7 +77,6 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
77
77
|
const propName: string = stateProps.value;
|
|
78
78
|
const configProps = pConn.getConfigProps();
|
|
79
79
|
const className = pConn.getCaseInfo().getClassName();
|
|
80
|
-
const { getLocaleRuleNameFromKeys, getLocalizedValue } = pConn;
|
|
81
80
|
|
|
82
81
|
// @ts-ignore
|
|
83
82
|
let configProperty = pConn.getRawMetadata()?.config?.value || '';
|
|
@@ -139,10 +138,10 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
139
138
|
id={`${fullReference}.${item.key}`}
|
|
140
139
|
value={item.key}
|
|
141
140
|
key={`${fullReference}.${item.key}`}
|
|
142
|
-
label={getLocalizedValue(
|
|
141
|
+
label={pConn.getLocalizedValue(
|
|
143
142
|
isDatapage ? item.text : item.value,
|
|
144
143
|
localePath,
|
|
145
|
-
getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
|
|
144
|
+
pConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
|
|
146
145
|
)}
|
|
147
146
|
name={fullReference}
|
|
148
147
|
/>
|
|
@@ -24,7 +24,8 @@ import { checkPathAccess, showVersion ,
|
|
|
24
24
|
addDebugLog,
|
|
25
25
|
checkLibraryAndArchives,
|
|
26
26
|
getConfigDefaults,
|
|
27
|
-
getSubTypeLabel
|
|
27
|
+
getSubTypeLabel,
|
|
28
|
+
getMaxPrefixCount
|
|
28
29
|
} from '../../util.js';
|
|
29
30
|
|
|
30
31
|
import { COMPONENT_SCHEMA, COMPONENTS_DIRECTORY_PATH, TASKS_CONFIG_JSON_FILENAME, COMPONENTS_PATH, CATEGORY_CONSTELLATION, SHARED_FILE_NAMES } from '../../constants.js';
|
|
@@ -409,10 +410,25 @@ addDebugLog("createAll", "", "+");
|
|
|
409
410
|
options
|
|
410
411
|
);
|
|
411
412
|
} else {
|
|
413
|
+
const maxPrefixCount = getMaxPrefixCount();
|
|
412
414
|
const questions = [
|
|
413
415
|
{
|
|
414
416
|
name: 'prefix',
|
|
415
|
-
message:
|
|
417
|
+
message: `Enter prefix label (${maxPrefixCount} max chars)`,
|
|
418
|
+
validate: value => {
|
|
419
|
+
/* value should not be empty
|
|
420
|
+
It should not start with a number
|
|
421
|
+
Only case-insensitive alphanumeric values are allowed
|
|
422
|
+
*/
|
|
423
|
+
if (value && !/^\d/.test(value) ) {
|
|
424
|
+
if (value.length > maxPrefixCount) {
|
|
425
|
+
return `${value.length - maxPrefixCount} too many characters.`
|
|
426
|
+
}
|
|
427
|
+
return true;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
return 'Only alphanumeric values are allowed, starting with alphabets';
|
|
431
|
+
}
|
|
416
432
|
},
|
|
417
433
|
{
|
|
418
434
|
name: 'version',
|
|
@@ -62,11 +62,10 @@ addDebugLog("getCreateLibComponentQuestions", "", "");
|
|
|
62
62
|
|
|
63
63
|
const isLibraryBasedCL = getLibraryBasedCL();
|
|
64
64
|
|
|
65
|
-
|
|
66
65
|
return [
|
|
67
66
|
{
|
|
68
67
|
name: 'libraryName',
|
|
69
|
-
message: 'Enter
|
|
68
|
+
message: 'Enter library name',
|
|
70
69
|
default: libraryName,
|
|
71
70
|
validate: value => {
|
|
72
71
|
/* value should not be empty
|
|
@@ -138,7 +138,7 @@ addDebugLog("deletePublished", "END", "-");
|
|
|
138
138
|
else {
|
|
139
139
|
// No library with that name
|
|
140
140
|
const serverConfig = await getPegaServerConfig();
|
|
141
|
-
console.log(chalk.redBright(`No server component libraries exist in given ruleset ${chalk.bold(`${
|
|
141
|
+
console.log(chalk.redBright(`No server component libraries exist in given ruleset ${chalk.bold(`${rulesetName}:${rulesetVersion}`)}`));
|
|
142
142
|
addDebugLog("listPublished", "END", "-");
|
|
143
143
|
process.exit(1);
|
|
144
144
|
|
|
@@ -58,7 +58,7 @@ addDebugLog("getFilePathQuestions", "", "");
|
|
|
58
58
|
rootPath: startDirectory,
|
|
59
59
|
// rootPath :: String
|
|
60
60
|
// Root search directory
|
|
61
|
-
suggestOnly:
|
|
61
|
+
suggestOnly: true,
|
|
62
62
|
// suggestOnly :: Bool
|
|
63
63
|
// Restrict prompt answer to available choices or use them as suggestions
|
|
64
64
|
depthLimit: 2,
|
|
@@ -24,13 +24,15 @@ import {
|
|
|
24
24
|
unZipFromArchive,
|
|
25
25
|
zipVersionAndArchive,
|
|
26
26
|
getLibraryArchiveDirectories,
|
|
27
|
+
getHaveDependencyDifference,
|
|
27
28
|
hasLibraryAndVersion,
|
|
28
29
|
cleanUpTemp,
|
|
29
30
|
hasArchives,
|
|
30
31
|
restoreFromArchive,
|
|
31
32
|
forceDefaultsUpdate,
|
|
32
33
|
getUseInputConfig,
|
|
33
|
-
getInputConfigForCommand
|
|
34
|
+
getInputConfigForCommand,
|
|
35
|
+
getPegaServerConfig
|
|
34
36
|
} from '../../util.js';
|
|
35
37
|
import { TASKS_CONFIG_JSON_FILENAME, ARCHIVES_PATH, TEMP_PATH } from '../../constants.js';
|
|
36
38
|
import { getFilePathQuestions, getFileNameQuestions, updateTempArchive, updateSavedFilePath, getServerOrDirectoryQuestion, getLibraryArchiveQuestion, getServerLibraryArchives, getServerLibraryArchive } from './helper.js';
|
|
@@ -324,7 +326,7 @@ export const importArch = async(filePath, fileName, hadArchive) => {
|
|
|
324
326
|
const newLibNameAnswers = await inquirer.prompt([
|
|
325
327
|
{
|
|
326
328
|
name: 'libraryName',
|
|
327
|
-
message: 'Enter new
|
|
329
|
+
message: 'Enter new library name',
|
|
328
330
|
validate: value => {
|
|
329
331
|
/* value should not be empty
|
|
330
332
|
It should not have spaces
|
|
@@ -409,10 +411,13 @@ export const importArch = async(filePath, fileName, hadArchive) => {
|
|
|
409
411
|
await forceDefaultsUpdate();
|
|
410
412
|
await showCurrentStatus();
|
|
411
413
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
414
|
+
if (getHaveDependencyDifference()) {
|
|
415
|
+
console.log('\n***************************************************************');
|
|
416
|
+
console.log(chalk.bold.yellow('Dependencies have changed between versions, recommend updating.'));
|
|
417
|
+
console.log(`>>> PLEASE run ${chalk.bold.yellow("'npm update'")}.`);
|
|
418
|
+
console.log('***************************************************************\n');
|
|
419
|
+
}
|
|
420
|
+
|
|
416
421
|
}
|
|
417
422
|
|
|
418
423
|
|
|
@@ -519,7 +524,7 @@ addDebugLog("importArch", `filePath: ${filePath}, fileName: ${fileName}`, "");
|
|
|
519
524
|
const newLibNameAnswers = await inquirer.prompt([
|
|
520
525
|
{
|
|
521
526
|
name: 'libraryName',
|
|
522
|
-
message: 'Enter new
|
|
527
|
+
message: 'Enter new library name',
|
|
523
528
|
validate: value => {
|
|
524
529
|
/* value should not be empty
|
|
525
530
|
It should not have spaces
|
|
@@ -604,10 +609,13 @@ addDebugLog("importArch", `filePath: ${filePath}, fileName: ${fileName}`, "");
|
|
|
604
609
|
await forceDefaultsUpdate();
|
|
605
610
|
await showCurrentStatus();
|
|
606
611
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
612
|
+
if (getHaveDependencyDifference()) {
|
|
613
|
+
console.log('\n***************************************************************');
|
|
614
|
+
console.log(chalk.bold.yellow('Dependencies have changed between versions, recommend updating.'));
|
|
615
|
+
console.log(`>>> PLEASE run ${chalk.bold.yellow("'npm update'")}.`);
|
|
616
|
+
console.log('***************************************************************\n');
|
|
617
|
+
}
|
|
618
|
+
|
|
611
619
|
}
|
|
612
620
|
|
|
613
621
|
|
|
@@ -749,6 +757,9 @@ export default async options => {
|
|
|
749
757
|
|
|
750
758
|
if (archiveVersions && archiveVersions.pxResults.length > 0) {
|
|
751
759
|
// ALL option
|
|
760
|
+
const defaultPegaServerConfig = await getPegaServerConfig();
|
|
761
|
+
|
|
762
|
+
console.log(`\nRetrieved archives from server ${chalk.bold.green(`${defaultPegaServerConfig.server}`)}.`)
|
|
752
763
|
|
|
753
764
|
// to name value pairs
|
|
754
765
|
const archiveResults = archiveVersions["pxResults"].map( archive => ( { value: `${archive.pyApplicationName},${archive.pyFileName},${archive.pyFileType},${archive.pyRuleSet},${archive.pyRuleSetVersion}`, name: `${archive.pyLabel}, ${archive.pyRuleSet}:${archive.pyRuleSetVersion}` }) );
|
|
@@ -8,15 +8,13 @@ This project provides you with an environment to extend Constellation by giving
|
|
|
8
8
|
|
|
9
9
|
Ensure you have access to the following in your system:
|
|
10
10
|
|
|
11
|
-
- Pega Infinity Server version
|
|
11
|
+
- Pega Infinity Server version 25.1 or later
|
|
12
12
|
|
|
13
13
|
- Git version 2.30 or later
|
|
14
14
|
|
|
15
|
-
- System node version
|
|
15
|
+
- System node version >= 22.15.0
|
|
16
16
|
|
|
17
|
-
- System npm version
|
|
18
|
-
|
|
19
|
-
- Recommended (node 20, npm 10)
|
|
17
|
+
- System npm version 10
|
|
20
18
|
|
|
21
19
|
## Latest Documentation
|
|
22
20
|
|