@pega/custom-dx-components 0.242.60 → 0.242.62

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.242.60",
3
+ "version": "0.242.62",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
@@ -55,7 +55,7 @@
55
55
  "sass-loader": "^13.3.3",
56
56
  "terser-webpack-plugin": "5.3.10",
57
57
  "ts-loader": "^9.5.1",
58
- "typescript": "~5.2.2",
58
+ "typescript": "~5.3.3",
59
59
  "unarchive": "^1.1.3",
60
60
  "url-loader": "4.1.1",
61
61
  "webpack": "5.89.0"
@@ -20,12 +20,13 @@
20
20
  "delete": "custom-dx-components delete",
21
21
  "deleteAll": "custom-dx-components deleteAll",
22
22
  "importComponent": "custom-dx-components importComponent",
23
+ "help": "custom-dx-components showHelp",
23
24
  "_***Component_mode_only***": "Component only commands",
24
25
  "publish": "custom-dx-components publish",
25
26
  "publishAll": "custom-dx-components publishAll",
26
27
  "promoteWebPack": "custom-dx-components promoteWebPack",
27
28
  "revertWebPack": "custom-dx-components revertWebPack",
28
- "_***Library_mode_only***": "Library mode only commands",
29
+ "_***Library_mode_only***": "Library mode only commands, Beta capability and subject to change. Developer experimental. Do not use in a Production Deployment",
29
30
  "createLib": "custom-dx-components createLibrary",
30
31
  "switchLib": "custom-dx-components switchLibrary",
31
32
  "createLibVersion": "custom-dx-components createVersion",
@@ -44,7 +45,7 @@
44
45
  "exportLibVersion": "custom-dx-components exportArchive",
45
46
  "validate": "custom-dx-components buildComponent",
46
47
  "validateAll": "custom-dx-components buildAllComponents",
47
- "help": "custom-dx-components showHelp",
48
+ "_***Internal_only***": "Internal usage only",
48
49
  "_internal-test-coverage": "node --input-type=module --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand node_modules/@pega/custom-dx-component --ci --testResultsProcessor='jest-junit' --coverage",
49
50
  "_internal-test": "echo 'Running functional and unit tests will DELETE existing local components, proceed (y/n)?' && read proceed && if test \"$proceed\" = \"y\"; then npm run _internal-test-full; fi ",
50
51
  "_internal-test-full": "npm run _internal-test-functional && npm run _internal-test-unit",
@@ -101,7 +102,7 @@
101
102
  },
102
103
  "devDependencies": {
103
104
  "@pega/configs": "^0.15.1",
104
- "@pega/custom-dx-components": "~0.242.60",
105
+ "@pega/custom-dx-components": "~0.242.62",
105
106
  "@pega/pcore-pconnect-typedefs": "3.2.1",
106
107
  "@storybook/addon-actions": "^7.6.19",
107
108
  "@storybook/addon-essentials": "^7.6.19",
@@ -39,19 +39,18 @@ export const showHelpV1 = () => {
39
39
  console.log(`\n${chalk.underline(`Components`)}`);
40
40
  console.log(`${chalk.cyan('npm run create ')}\tcreate a component`);
41
41
  console.log(`${chalk.cyan('npm run createAll ')}\tcreate components of all different types`);
42
- console.log(`${chalk.cyan('npm run buildComponent ')}\tvalidate a component before publishing, checking for errors`);
43
- console.log(`${chalk.cyan('npm run buildAllComponents')}\tvalidate and build a component before publishing, checking for errors`);
44
- console.log(`${chalk.cyan('npm run validateAll ')}\tvalidate and build ALL components before publishing, checking for errors`);
42
+ console.log(`${chalk.cyan('npm run buildComponent ')}\tvalidate and build a component before publishing, checking for errors`);
43
+ console.log(`${chalk.cyan('npm run buildAllComponents')}\tvalidate and build ALL components before publishing, checking for errors`);
45
44
  console.log(`${chalk.cyan('npm run rename ')}\trename a component`);
46
45
  console.log(`${chalk.cyan('npm run importComponent ')}\timport a component from a path`);
47
46
  console.log(`${chalk.cyan('npm run startStorybook ')}\tstorybook components for testing`);
48
47
 
49
- console.log(`\n${chalk.underline(`Local and Server`)}`);
48
+ console.log(`\n${chalk.underline(`Local and Server(needs authentication)`)}`);
50
49
  console.log(`${chalk.cyan('npm run list ')}\tget list of components`);
51
50
  console.log(`${chalk.cyan('npm run delete ')}\tdelete a component`);
52
51
  console.log(`${chalk.cyan('npm run deleteAll ')}\tdelete ALL components`);
53
52
 
54
- console.log(`\n${chalk.underline(`Server`)}`);
53
+ console.log(`\n${chalk.underline(`Server(needs authentication)`)}`);
55
54
  console.log(`${chalk.cyan('npm run publish ')}\tpublish a component to server`);
56
55
  console.log(`${chalk.cyan('npm run publishAll ')}\tpublish ALL components to server`);
57
56
 
@@ -61,7 +60,8 @@ export const showHelpV1 = () => {
61
60
 
62
61
  export const showHelpV2 = () => {
63
62
  console.log("");
64
- console.log(`All commands will not work until a library is created via ${chalk.cyan(`npm run createLib`)}.`);
63
+ console.log(chalk.yellow("**** Beta capability and subject to change. Developer experimental. Do not use in a Production Deployment. ***\n"));
64
+ console.log(`--> All commands will not work until a library is created via ${chalk.cyan(`npm run createLib`)}.`);
65
65
  console.log(`\nnpm run <command>`);
66
66
  console.log(`\nUsage:`);
67
67
 
@@ -70,24 +70,24 @@ export const showHelpV2 = () => {
70
70
  console.log(`${chalk.cyan('npm run authenticate')}\t\tauthenticate to a server (required for publish commands)`);
71
71
 
72
72
  console.log(`\n${chalk.underline(`Library`)}`);
73
- console.log(`${chalk.cyan('npm run createLib' )}\t\tcreate a new library and version`);
73
+ console.log(`${chalk.cyan('npm run createLib' )}\t\tcreate a new library and version (mandatory)`);
74
74
  console.log(`${chalk.cyan('npm run switchLib' )}\t\tswitch to different library and version`);
75
75
  console.log(`${chalk.cyan('npm run listLib ')}\t\tget contents of library and version`);
76
- console.log(`${chalk.cyan('npm run deleteLib ')}\t\tdelete library, version or ALL versions`);
77
- console.log(`${chalk.cyan('npm run showStatus')}\t\tshow state of current library`);
76
+ console.log(`${chalk.cyan('npm run deleteLib ')}\t\tdelete library/version or ALL versions`);
77
+ console.log(`${chalk.cyan('npm run showStatus')}\t\tshow state of current working library/version`);
78
78
 
79
79
  console.log(`\n${chalk.underline(`Library Versions`)}`);
80
80
  console.log(`${chalk.cyan('npm run createLibVersion')}\tcreate a new version within the current library`);
81
81
  console.log(`${chalk.cyan('npm run switchLibVersion')}\tswitch to different version within the current library`);
82
82
  console.log(`${chalk.cyan('npm run deleteLibVersion')}\tdelete current version, move to another version`);
83
- console.log(`${chalk.cyan('npm run storeLibVersion ')}\tstore current version to local storage (must SAVE before)`);
84
- console.log(`${chalk.cyan('npm run exportLibVersion')}\texport currnet version as a zip file to a given local path`);
83
+ console.log(`${chalk.cyan('npm run storeLibVersion ')}\tstore current version to local storage (must SAVE components before)`);
84
+ console.log(`${chalk.cyan('npm run exportLibVersion')}\texport current version as a zip file to a given local path (must SAVE components before)`);
85
85
  console.log(`${chalk.cyan('npm run importLibVersion')}\timport a zip file (created by export) from a given local path`);
86
86
  console.log(`${chalk.cyan('npm run setPermanent ')}\tmake current version permanent or non permanent upon publish`);
87
87
 
88
88
  console.log(`\n${chalk.underline(`Published Versions (needs authentication)`)}`);
89
- console.log(`${chalk.cyan('npm run publish')}\tpublish current library/version to server (creates a local published library as well)`);
90
- console.log(`${chalk.cyan('npm run listPublishedLib')}\tget contents of published library/version (local or server)`);
89
+ console.log(`${chalk.cyan('npm run publish ')}\tpublish current library/version to server (creates a local published library as well)`);
90
+ console.log(`${chalk.cyan('npm run listPublishedLib ')}\tget contents of published library/version (local or server)`);
91
91
  console.log(`${chalk.cyan('npm run deletePublishedLib')}\tdelete ALL contents of published libary/version (local or server)`);
92
92
 
93
93
  console.log(`\n${chalk.underline(`Components (in current library/version context)`)}`);
package/src/util.js CHANGED
@@ -1537,7 +1537,7 @@ if (showDebug) addDebugLog("cleanUp", "", "");
1537
1537
  }
1538
1538
 
1539
1539
  if (fs.existsSync('lib')) {
1540
- fs.rm('lib', { recursive: true }, err => {
1540
+ fs.rm('lib', { recursive: true, force: true }, err => {
1541
1541
  if (err) {
1542
1542
  throw err;
1543
1543
  }
@@ -1952,8 +1952,8 @@ if (showDebug) addDebugLog("restoreFromArchive", `fileName: ${fileName}, orgLibN
1952
1952
 
1953
1953
  const tempPackagePath = join (tempDirectory, PACKAGE_JSON_FILENAME);
1954
1954
  const currentPackagePath = join(currentDirectory, PACKAGE_JSON_FILENAME);
1955
- const tempDirectoryComponents = join(tempDirectory, "src", "components");
1956
- const currentComponentsPath = join(currentDirectory, "src", "components");
1955
+ const tempDirectoryComponents = join(tempDirectory, "src");
1956
+ const currentComponentsPath = join(currentDirectory, "src");
1957
1957
 
1958
1958
  // remove all config files
1959
1959
  await removeTopLevelConfigFiles(currentDirectory);
@@ -83,7 +83,7 @@ describe(`createLib createLib (already exists) deleteLib: ${serverDir} - ${compT
83
83
  it(`npm run createLib - ${isLibraryBased}`, async() => {
84
84
 
85
85
 
86
- const script = `npm run createLib DXIL 0.0.1 N --prefix ../../..`;
86
+ const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
87
87
  const compConf = path.join("store", "Pega_DXIL","0.0.1-dev", "componentsconfig.json");
88
88
 
89
89
  const { stdout, stderr } = await exec(script);
@@ -97,7 +97,7 @@ describe(`createLib createLib (already exists) deleteLib: ${serverDir} - ${compT
97
97
 
98
98
  it(`npm run createLib (already exists) - ${isLibraryBased}`, async() => {
99
99
 
100
- const script = `npm run createLib DXIL 0.0.1 N --prefix ../../..`;
100
+ const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
101
101
 
102
102
  const { stdout, stderr } = await exec(script);
103
103
  expect(stdout).toContain('Library Pega_DXIL already exists.');
@@ -89,7 +89,7 @@ describe(`createLib create buildLib deleteLib deletePublishedLib: ${serverDir} -
89
89
 
90
90
  it(`npm run createLib - ${isLibraryBased}`, async() => {
91
91
 
92
- const script = `npm run createLib DXIL 0.0.1 N --prefix ../../..`;
92
+ const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
93
93
  const compConf = path.join("store", "Pega_DXIL","0.0.1-dev", "componentsconfig.json");
94
94
 
95
95
  const { stdout, stderr } = await exec(script);
@@ -78,7 +78,7 @@ describe(`createLib create buildLib deleteLib deletePublishedLib: ${serverDir} -
78
78
 
79
79
  it(`npm run createLib - ${isLibraryBased}`, async() => {
80
80
 
81
- const script = `npm run createLib DXIL 0.0.1 N --prefix ../../..`;
81
+ const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
82
82
  const compConf = path.join("store", "Pega_DXIL","0.0.1-dev", "componentsconfig.json");
83
83
 
84
84
  const { stdout, stderr } = await exec(script);
@@ -95,7 +95,7 @@ describe(`createLib deleteLib: ${serverDir} - ${compType}` , () => {
95
95
 
96
96
  it(`npm run createLib - ${isLibraryBased}`, async() => {
97
97
 
98
- const script = `npm run createLib DXIL 0.0.1 N --prefix ../../..`;
98
+ const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
99
99
  const compConf = path.join("store", "Pega_DXIL","0.0.1-dev", "componentsconfig.json");
100
100
 
101
101
  const { stdout, stderr } = await exec(script);
@@ -82,7 +82,7 @@ describe(`createLib createAll exportStore importStore deleteLib: ${serverDir} -
82
82
 
83
83
  it(`npm run createLib - ${isLibraryBased}`, async() => {
84
84
 
85
- const script = `npm run createLib DXIL 0.0.1 N --prefix ../../..`;
85
+ const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
86
86
  const compConf = path.join("store", "Pega_DXIL","0.0.1-dev", "componentsconfig.json");
87
87
 
88
88
  const { stdout, stderr } = await exec(script);
@@ -82,7 +82,7 @@ describe(`createLib createAll exportStore deleteLib: ${serverDir} - ${compType}`
82
82
 
83
83
  it(`npm run createLib - ${isLibraryBased}`, async() => {
84
84
 
85
- const script = `npm run createLib DXIL 0.0.1 N --prefix ../../..`;
85
+ const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
86
86
  const compConf = path.join("store", "Pega_DXIL","0.0.1-dev", "componentsconfig.json");
87
87
 
88
88
  const { stdout, stderr } = await exec(script);
@@ -81,7 +81,7 @@ describe(`createLib importComp deleteLib: ${serverDir} - ${compType}` , () => {
81
81
 
82
82
  it(`npm run createLib - ${isLibraryBased}`, async() => {
83
83
 
84
- const script = `npm run createLib Other 0.0.1 N --prefix ../../..`;
84
+ const script = `npm run createLib Other 0.0.1 N Original --prefix ../../..`;
85
85
  const compConf = path.join("store", "Pega_Other","0.0.1-dev", "componentsconfig.json");
86
86
 
87
87
  const { stdout, stderr } = await exec(script);
@@ -81,7 +81,7 @@ describe(`createLib createAll list deleteVersion deleteLib: ${serverDir} - ${com
81
81
 
82
82
  it(`npm run createLib (other) - ${isLibraryBased}`, async() => {
83
83
 
84
- const script = `npm run createLib Other 0.0.1 N --prefix ../../..`;
84
+ const script = `npm run createLib Other 0.0.1 N Original --prefix ../../..`;
85
85
  const compConf = path.join("store", "Pega_Other","0.0.1-dev", "componentsconfig.json");
86
86
 
87
87
  const { stdout, stderr } = await exec(script);
@@ -95,7 +95,7 @@ describe(`createLib createAll list deleteVersion deleteLib: ${serverDir} - ${com
95
95
 
96
96
  it(`npm run createLib (DXIL) - ${isLibraryBased}`, async() => {
97
97
 
98
- const script = `npm run createLib DXIL 0.0.1 N --prefix ../../..`;
98
+ const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
99
99
  const compConf = path.join("store", "Pega_DXIL","0.0.1-dev", "componentsconfig.json");
100
100
 
101
101
  const { stdout, stderr } = await exec(script);
@@ -80,7 +80,7 @@ describe(`createLib createAll list createVersion switchVersion move deleteLib: $
80
80
 
81
81
  it(`npm run createLib - ${isLibraryBased}`, async() => {
82
82
 
83
- const script = `npm run createLib DXIL 0.0.1 N --prefix ../../..`;
83
+ const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
84
84
  const compConf = path.join("store", "Pega_DXIL","0.0.1-dev", "componentsconfig.json");
85
85
 
86
86
  const { stdout, stderr } = await exec(script);
@@ -77,7 +77,7 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
77
77
  it(`npm run createLib - ${isLibraryBased}`, async() => {
78
78
 
79
79
 
80
- const script = `npm run createLib DXIL 0.0.1 N --prefix ../../..`;
80
+ const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
81
81
  const compConf = path.join("store", "Pega_DXIL","0.0.1-dev", "componentsconfig.json");
82
82
 
83
83
  const { stdout, stderr } = await exec(script);
@@ -160,7 +160,7 @@ describe(`createLib createAll list createLib switchLb and deleteLib: ${serverDir
160
160
 
161
161
  it(`npm run createLib other - ${isLibraryBased}`, async() => {
162
162
 
163
- const script = `npm run createLib Other 0.0.1 N --prefix ../../..`;
163
+ const script = `npm run createLib Other 0.0.1 N Original --prefix ../../..`;
164
164
  const compConf = path.join("store", "Pega_Other","0.0.1-dev", "componentsconfig.json");
165
165
 
166
166
  const { stdout, stderr } = await exec(script);
@@ -81,7 +81,7 @@ describe(`createLib setPerm setNotPerm deleteLib: ${serverDir} - ${compType}` ,
81
81
 
82
82
  it(`npm run createLib - ${isLibraryBased}`, async() => {
83
83
 
84
- const script = `npm run createLib DXIL 0.0.1 N --prefix ../../..`;
84
+ const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
85
85
  const compConf = path.join("store", "Pega_DXIL","0.0.1-dev", "componentsconfig.json");
86
86
 
87
87
  const { stdout, stderr } = await exec(script);
@@ -81,7 +81,7 @@ describe(`createLib showStatus and deleteLib: ${serverDir} - ${compType}` , () =
81
81
 
82
82
  it(`npm run createLib - ${isLibraryBased}`, async() => {
83
83
 
84
- const script = `npm run createLib DXIL 0.0.1 N --prefix ../../..`;
84
+ const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
85
85
  const compConf = path.join("store", "Pega_DXIL","0.0.1-dev", "componentsconfig.json");
86
86
 
87
87
  const { stdout, stderr } = await exec(script);
@@ -78,7 +78,7 @@ describe(`createLib create validate deleteLib: ${serverDir} - ${compType}` , ()
78
78
 
79
79
  it(`npm run createLib - ${isLibraryBased}`, async() => {
80
80
 
81
- const script = `npm run createLib DXIL 0.0.1 N --prefix ../../..`;
81
+ const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
82
82
  const compConf = path.join("store", "Pega_DXIL","0.0.1-dev", "componentsconfig.json");
83
83
 
84
84
  const { stdout, stderr } = await exec(script);
@@ -82,7 +82,7 @@ describe(`createLib createAll list createLibVersion(with copy) switchLibe list d
82
82
 
83
83
  it(`npm run createLib - ${isLibraryBased}`, async() => {
84
84
 
85
- const script = `npm run createLib DXIL 0.0.1 N --prefix ../../..`;
85
+ const script = `npm run createLib DXIL 0.0.1 N Original --prefix ../../..`;
86
86
  const compConf = path.join("store", "Pega_DXIL","0.0.1-dev", "componentsconfig.json");
87
87
 
88
88
  const { stdout, stderr } = await exec(script);