@pega/custom-dx-components 0.25.55 → 0.25.56

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.25.55",
3
+ "version": "0.25.56",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "keywords": [
@@ -43,7 +43,7 @@ addDebugLog("buildComponent", "", "+");
43
43
  }
44
44
  else {
45
45
 
46
- // VS Code pluggin would send in the component
46
+ // VS Code plugin would send in the component
47
47
  let paramComponentKey;
48
48
  if (options.params.length == 4) {
49
49
  paramComponentKey = options.params[3];
@@ -14,7 +14,7 @@ import { JEST_ASSETS_ORIGINAL_PATH, JEST_ASSETS_LIBRARY_PATH, JEST_CREATE_PATH,
14
14
 
15
15
 
16
16
  const getBuildAssetsQuestions = async () => {
17
- const message = "\n**IMPORTANT** Building Jest Assets will remove any local components in your /src/components directory\n\t and will also delete ALL local archives in your /store and is not reversable!!\n";
17
+ const message = "\n**IMPORTANT** Building Jest Assets will remove any local components in your /src/components directory\n\t and will also delete ALL local archives in your /store and is not reversible!!\n";
18
18
 
19
19
  console.log(`${chalk.yellow.bold(message)}`);
20
20
 
@@ -11,7 +11,7 @@ import {
11
11
 
12
12
 
13
13
  export const getBuildComponentQuestions = async (defaultVersion) => {
14
- addDebugLog("getBuildComoponentQuestions", `defaultVerion: ${defaultVersion}`, "");
14
+ addDebugLog("getBuildComponentQuestions", `defaultVersion: ${defaultVersion}`, "");
15
15
  const components = await getComponents();
16
16
  const defaultPegaConfig = await getPegaServerConfig();
17
17
 
@@ -41,7 +41,7 @@ export default async options => {
41
41
  await showVersion();
42
42
  await cleanUpTemp();
43
43
 
44
- // if we have choosen to use INPUT CONFIG FILE
44
+ // if we have chosen to use INPUT CONFIG FILE
45
45
  // process and exit
46
46
  if (useInputConfig) {
47
47
  const inputConfig = await getInputConfigForCommand("createLib");
@@ -100,7 +100,7 @@ export default async options => {
100
100
  await zipVersionAndArchive(newOrgLib, version);
101
101
 
102
102
  // if didn't have an archive, in case you currently have components there
103
- // update the config jsons
103
+ // update the config json
104
104
  if (!hasArch) {
105
105
  await updateAllComponentsConfig(version);
106
106
  if (okToUpgrade) {
@@ -235,7 +235,7 @@ addDebugLog("createLibrary", "", "+");
235
235
  await zipVersionAndArchive(newOrgLib, version);
236
236
 
237
237
  // if didn't have an archive, in case you currently have components there
238
- // update the config jsons
238
+ // update the config json
239
239
 
240
240
 
241
241
  if (!hasArch) {
@@ -54,7 +54,7 @@ addDebugLog("createVersion", "", "+");
54
54
  const currentDirectory = process.cwd();
55
55
  const componentDirectory = join (currentDirectory, "src", "components");
56
56
 
57
- // if we have choosen to use INPUT CONFIG FILE
57
+ // if we have chosen to use INPUT CONFIG FILE
58
58
  // process and no inputs
59
59
  if (useInputConfig) {
60
60
  const inputConfig = await getInputConfigForCommand("createLibVersion");
@@ -97,7 +97,7 @@ addDebugLog("getLaunchPadFilterQuestions", "", "");
97
97
  }
98
98
 
99
99
  export const deleteLocalComponents = async (sourceOfComponents, options) => {
100
- addDebugLog("deleteLocalComponents", `sourceOfComponnents: ${sourceOfComponents}`, "" );
100
+ addDebugLog("deleteLocalComponents", `sourceOfComponents: ${sourceOfComponents}`, "" );
101
101
  const localComponents = await getComponents();
102
102
 
103
103
  if (localComponents.length > 0) {
@@ -92,7 +92,7 @@ addDebugLog("getLaunchPadFilterQuestions", "", "");
92
92
  }
93
93
 
94
94
  export const deleteLocalComponents = async (sourceOfComponents, options) => {
95
- addDebugLog("deleteLocalComponents", `sourceOfCompnents: ${sourceOfComponents}`, "");
95
+ addDebugLog("deleteLocalComponents", `sourceOfComponents: ${sourceOfComponents}`, "");
96
96
  const localComponents = await getComponents();
97
97
 
98
98
  // eslint-disable-next-line no-restricted-syntax, guard-for-in
@@ -136,7 +136,7 @@ addDebugLog("deleteLocalComponents", `sourceOfCompnents: ${sourceOfComponents}`,
136
136
  };
137
137
 
138
138
  export const deleteServerComponents = async (sourceOfComponents, answers) => {
139
- addDebugLog("deleteServerComponents", `sourceOfCompnents: ${sourceOfComponents}`, "");
139
+ addDebugLog("deleteServerComponents", `sourceOfComponents: ${sourceOfComponents}`, "");
140
140
  const defaultPegaServerConfig = await getPegaServerConfig();
141
141
  const isLaunchpad = defaultPegaServerConfig.serverType === 'launchpad';
142
142
 
@@ -79,8 +79,8 @@ export const getRulesetAndVersionQuestion = async (serverConfig) => {
79
79
  };
80
80
 
81
81
 
82
- async function fetchComponenLibrariessFromInfinity(apiUrl, headers) {
83
- addDebugLog("fetchComponenLibrariessFromInfinity", `apiUrl: ${apiUrl}`, "");
82
+ async function fetchComponentLibrariesFromInfinity(apiUrl, headers) {
83
+ addDebugLog("fetchComponentLibrariesFromInfinity", `apiUrl: ${apiUrl}`, "");
84
84
  const serverConfig = await getPegaServerConfig();
85
85
  return new Promise((resolve, reject) => {
86
86
  let status = 500;
@@ -160,7 +160,7 @@ addDebugLog("getInfinityLibraries", '', "");
160
160
  const headers = {};
161
161
  headers.Authorization = `${tokenType} ${accessToken}`;
162
162
 
163
- fetchComponenLibrariessFromInfinity(url, headers)
163
+ fetchComponentLibrariesFromInfinity(url, headers)
164
164
  .then((response) => resolve(response))
165
165
  .catch((e) => reject(e));
166
166
 
@@ -93,16 +93,16 @@ addDebugLog("deletePublished", "END", "-");
93
93
 
94
94
  if (isLibraryBasedCL) {
95
95
 
96
- const serverConfg = await getPegaServerConfig();
96
+ const serverConfig = await getPegaServerConfig();
97
97
  const { app_name, app_version } = await getApplicationAndVersionFromToken();
98
98
 
99
99
  console.log();
100
- console.log(`Current server: ${chalk.green.bold(`${serverConfg.server}`)}`);
100
+ console.log(`Current server: ${chalk.green.bold(`${serverConfig.server}`)}`);
101
101
  console.log(`List of libraries for Application: ${chalk.green.bold(`${app_name} - ${app_version}`)}`);
102
102
 
103
103
 
104
104
  // want to get all in application, so ignore ruleset/version questions
105
- // const questions = await getRulesetAndVersionQuestion(serverConfg);
105
+ // const questions = await getRulesetAndVersionQuestion(serverConfig);
106
106
  // const answers = await inquirer.prompt(questions);
107
107
  // const { rulesetName, rulesetVersion } = answers;
108
108
 
@@ -56,7 +56,7 @@ addDebugLog("updateConfig", `oldComponentKey: ${oldComponentKey}, newComponentKe
56
56
  configData.library = library;
57
57
  configData.version = version;
58
58
 
59
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
59
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
60
60
  fs.writeFileSync(join(targetDirectory, "/config.json"), JSON.stringify(configData, null, 4), { encoding: 'utf8',flag:'w' });
61
61
 
62
62
  };
@@ -92,7 +92,7 @@ addDebugLog("exportCLArch", `exportPath: ${exportPath}, orgLibName: ${orgLibName
92
92
  const exportFile = join(exportPath, fileName);
93
93
  let output;
94
94
 
95
- // need to build the libary
95
+ // need to build the library
96
96
  console.log(chalk.green(`\nBuilding binaries...\n`));
97
97
  const arOrgLib = orgLibName.split("_")
98
98
  const arVersion = selectedVersion.split("-");
@@ -132,7 +132,7 @@ addDebugLog("exportCLArch", `exportPath: ${exportPath}, orgLibName: ${orgLibName
132
132
  {
133
133
  name: 'overWriteFile',
134
134
  type: 'confirm',
135
- message: 'Overrwrite',
135
+ message: 'Overwrite',
136
136
  default: true
137
137
  },
138
138
  ]);
@@ -219,7 +219,7 @@ addDebugLog("exportArch", `exportPath: ${exportPath}, orgLibName: ${orgLibName},
219
219
  {
220
220
  name: 'overWriteFile',
221
221
  type: 'confirm',
222
- message: 'Overrwrite',
222
+ message: 'Overwrite',
223
223
  default: true
224
224
  },
225
225
  ]);
@@ -319,7 +319,7 @@ export default async options => {
319
319
  // }
320
320
  // }
321
321
 
322
- // diable question to build "CL"
322
+ // disable question to build "CL"
323
323
  // if (fullArchive === "" ) {
324
324
  // const fullArchiveQuestions = await getFullArchiveQuestions();
325
325
  // const fullArchiveAnswers = await inquirer.prompt(fullArchiveQuestions);
@@ -335,7 +335,7 @@ export default async options => {
335
335
 
336
336
  // if Binary, then we need to just build the current library, get the results and
337
337
  // and export an archive as zip
338
- // currently this is depricated, we are not going to export a CL as of yet.
338
+ // currently this is deprecated, we are not going to export a CL as of yet.
339
339
  if (fullArchive === "Binary") {
340
340
 
341
341
  inquirer.registerPrompt('fuzzypath', inquirerFuzzyPath);
@@ -360,7 +360,7 @@ export default async options => {
360
360
 
361
361
  console.log(`\nExporting library ${chalk.bold.green(`${orgLibName}/${selectedVersion}`)}\n`);
362
362
 
363
- // deprecating this code, only export current libary, don't ask for others
363
+ // deprecating this code, only export current library, don't ask for others
364
364
  // need to switchLib/Version to that library to export it
365
365
 
366
366
  // await zipVersionAndArchive(configDef.currentOrgLib, configDef.buildVersion);
@@ -43,7 +43,7 @@ addDebugLog("setTasksConfig", `libraryName: ${libraryName}, version: ${version},
43
43
  compConfig.version = version;
44
44
 
45
45
  // update file
46
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
46
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
47
47
  fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(configData, null, 4), { encoding: 'utf8',flag:'w' });
48
48
  }
49
49
 
@@ -56,7 +56,7 @@ addDebugLog("setPackageOrg", "", "");
56
56
  packageData.organization = organization;
57
57
 
58
58
  // update file
59
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
59
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
60
60
  fs.writeFileSync(packageJsonPath, JSON.stringify(packageData, null, 4), { encoding: 'utf8',flag:'w' });
61
61
 
62
62
  }
@@ -83,7 +83,7 @@ addDebugLog("updateConfig", `oldComponentKey: ${oldComponentKey}, newComponentKe
83
83
  configData.library = library;
84
84
  configData.version = version;
85
85
 
86
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
86
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
87
87
  fs.writeFileSync(join(currentDirectory, "/config.json"), JSON.stringify(configData, null, 4), { encoding: 'utf8',flag:'w' });
88
88
 
89
89
  };
@@ -107,7 +107,7 @@ addDebugLog("updateFile", `fileName: ${fileName}, oldComponentKeyPC: ${oldCompon
107
107
 
108
108
  };
109
109
 
110
- export const reanmeDirectory = async(currentDirectory, targetDirectory) => {
110
+ export const renameDirectory = async(currentDirectory, targetDirectory) => {
111
111
  if (!fs.existsSync(targetDirectory)) {
112
112
  fs.mkdirSync(targetDirectory, { recursive: true });
113
113
  }
@@ -187,7 +187,7 @@ addDebugLog("renameComponent", `library: ${library}, componentKey: ${componentKe
187
187
 
188
188
 
189
189
  // rename the directory
190
- await reanmeDirectory(currentDirectory, targetDirectory);
190
+ await renameDirectory(currentDirectory, targetDirectory);
191
191
 
192
192
 
193
193
  return newComponentKey;
@@ -255,7 +255,7 @@ addDebugLog("getLibraryVersionQuestion", "", "");
255
255
  type: 'rawlist',
256
256
  message: `Import from`,
257
257
  choices: [{name: 'Local directory', value: 'Directory'}, {name: 'Server', value: 'Server'}],
258
- defaut: 'Directory'
258
+ default: 'Directory'
259
259
  }
260
260
  ];
261
261
  };
@@ -73,7 +73,7 @@ addDebugLog("updateConfig", `oldComponentKey: ${oldComponentKey}, newComponentKe
73
73
  configData.library = library;
74
74
  configData.version = version;
75
75
 
76
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
76
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
77
77
  fs.writeFileSync(join(targetDirectory, "/config.json"), JSON.stringify(configData, null, 4), { encoding: 'utf8',flag:'w' });
78
78
 
79
79
  };
@@ -163,7 +163,7 @@ addDebugLog("renameComponent", `library: ${library}, componentKey: ${componentKe
163
163
 
164
164
  };
165
165
 
166
- export const getPackgeOrg = async(packagePath) => {
166
+ export const getPackageOrg = async(packagePath) => {
167
167
  const sPackData = fs.readFileSync(packagePath, { encoding: 'utf8' });
168
168
  const packData = sPackData && JSON.parse(sPackData);
169
169
 
@@ -213,7 +213,7 @@ export const moveComp = async(componentKey, orgLibName, version, copyShared, opt
213
213
  const tempDirectoryComponents = join(tempCompPath, `${newComponentKey}`);
214
214
 
215
215
  const currentSharedPath = join(currentCompPath, "shared");
216
- const targetSharedPatah = join(tempCompPath, "shared");
216
+ const targetSharedPath = join(tempCompPath, "shared");
217
217
 
218
218
  // copy component into temp directory
219
219
  fs.cpSync(currentComponentsPath, tempDirectoryComponents, { recursive: true, force: true });
@@ -223,7 +223,7 @@ export const moveComp = async(componentKey, orgLibName, version, copyShared, opt
223
223
 
224
224
  // copy shared
225
225
  if (copyShared) {
226
- fs.cpSync(currentSharedPath, targetSharedPatah, { recursive: true, force: true });
226
+ fs.cpSync(currentSharedPath, targetSharedPath, { recursive: true, force: true });
227
227
  }
228
228
 
229
229
  console.log(`\nCopied ${chalk.green(`${componentKey}`)} to ${chalk.green(`${orgLibName}/${version}`)} as ${chalk.green(`${newComponentKey}`)}\n`);
@@ -290,7 +290,7 @@ export const importArch = async(filePath, fileName, hadArchive) => {
290
290
  // need to get info from tasks.config and package.json
291
291
  // we won't rely on name of file, as owner can change it
292
292
 
293
- let organization = await getPackgeOrg(tempPackage);
293
+ let organization = await getPackageOrg(tempPackage);
294
294
  let localConfig = await getLocalConfigData(tempTasksConfig);
295
295
 
296
296
  let libName = localConfig.library;
@@ -504,7 +504,7 @@ addDebugLog("importArch", `filePath: ${filePath}, fileName: ${fileName}`, "");
504
504
  // need to get info from tasks.config and package.json
505
505
  // we won't rely on name of file, as owner can change it
506
506
 
507
- let organization = await getPackgeOrg(tempPackage);
507
+ let organization = await getPackageOrg(tempPackage);
508
508
  let localConfig = await getLocalConfigData(tempTasksConfig);
509
509
 
510
510
  let libName = localConfig.library;
@@ -817,7 +817,7 @@ export default async options => {
817
817
 
818
818
  console.log("");
819
819
 
820
- // reapply to save if changed, because imported task.config may have overriden and we want
820
+ // reapply to save if changed, because imported task.config may have overridden and we want
821
821
  // to keep what was entered as the latest
822
822
  await updateSavedFilePath(filePath);
823
823
  }
@@ -973,7 +973,7 @@ export default async options => {
973
973
  console.log("");
974
974
 
975
975
 
976
- // reapply to save if changed, because imported task.config may have overriden and we want
976
+ // reapply to save if changed, because imported task.config may have overridden and we want
977
977
  // to keep what was entered as the latest
978
978
  await updateSavedFilePath(filePath);
979
979
  }
@@ -69,7 +69,7 @@ addDebugLog("updateConfig", `oldComponentKey: ${oldComponentKey}, newComponentKe
69
69
  configData.description = newLabel;
70
70
  }
71
71
 
72
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
72
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
73
73
  fs.writeFileSync(join(targetDirectory, "/config.json"), JSON.stringify(configData, null, 4), { encoding: 'utf8' });
74
74
 
75
75
  };
@@ -107,7 +107,7 @@
107
107
  "@babel/preset-react": "^7.27.1",
108
108
  "@babel/preset-typescript": "^7.27.1",
109
109
  "@pega/configs": "^0.16.3",
110
- "@pega/custom-dx-components": "~0.25.55",
110
+ "@pega/custom-dx-components": "~0.25.56",
111
111
  "@pega/pcore-pconnect-typedefs": "^4.0.0-alpha.0",
112
112
  "@storybook/addon-actions": "^8.6.14",
113
113
  "@storybook/addon-essentials": "^8.6.14",
@@ -30,7 +30,7 @@ export const lintComponent = async (dirToLint) => {
30
30
  }
31
31
  };
32
32
 
33
- // inpsired by https://eslint.org/docs/latest/developer-guide/nodejs-api
33
+ // inspired by https://eslint.org/docs/latest/developer-guide/nodejs-api
34
34
 
35
35
  // (async function main() {
36
36
  // // 1. Create an instance.
@@ -8,7 +8,7 @@ import {
8
8
  checkLibraryAndArchives,
9
9
  getLibraryArchivesVersions,
10
10
  getConfigDefaults,
11
- getLocalArchivedLibrraryVersionData,
11
+ getLocalArchivedLibraryVersionData,
12
12
  getComponentsConfigs,
13
13
  cleanUpTemp } from '../../util.js';
14
14
  import { getArchiveLibraryQuestions } from './helper.js';
@@ -34,7 +34,7 @@ addDebugLog("listLibrary", "", "+");
34
34
  organization = compDef.organization;
35
35
  library = compDef.library;
36
36
  let libraryName;
37
- const currnetVersion = compDef.buildVersion;
37
+ const currentVersion = compDef.buildVersion;
38
38
  let selectedVersion;
39
39
  let libVersions = [];
40
40
  let currentOrStore = "";
@@ -114,7 +114,7 @@ addDebugLog("listLibrary", "", "+");
114
114
  builtOn = "(no date - current)";
115
115
  }
116
116
  else {
117
- data = await getLocalArchivedLibrraryVersionData(libraryName, selectedVersion);
117
+ data = await getLocalArchivedLibraryVersionData(libraryName, selectedVersion);
118
118
  data = JSON.parse(data);
119
119
 
120
120
  if (data[0] && data[0].buildDate) {
@@ -124,7 +124,7 @@ addDebugLog("listLibrary", "", "+");
124
124
 
125
125
  }
126
126
  else {
127
- data = await getLocalArchivedLibrraryVersionData(libraryName, selectedVersion);
127
+ data = await getLocalArchivedLibraryVersionData(libraryName, selectedVersion);
128
128
  data = JSON.parse(data);
129
129
 
130
130
  if (data[0] && data[0].buildDate) {
@@ -68,7 +68,7 @@ addDebugLog("updateConfig", `oldComponentKey: ${oldComponentKey}, newComponentKe
68
68
  configData.description = compLabel;
69
69
  }
70
70
 
71
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
71
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
72
72
  fs.writeFileSync(join(targetDirectory, "/config.json"), JSON.stringify(configData, null, 4), { encoding: 'utf8', flag:'w' });
73
73
 
74
74
  };
@@ -205,11 +205,11 @@ export const moveComp = async(componentKey, copyMove, orgLibName, version, copyS
205
205
  }
206
206
 
207
207
  const currentSharedPath = join(currentCompPath, "shared");
208
- const targetSharedPatah = join(tempCompPath, "shared");
208
+ const targetSharedPath = join(tempCompPath, "shared");
209
209
 
210
210
  // copy shared
211
211
  if (copyShared) {
212
- fs.cpSync(currentSharedPath, targetSharedPatah, { recursive: true, force: true });
212
+ fs.cpSync(currentSharedPath, targetSharedPath, { recursive: true, force: true });
213
213
  }
214
214
 
215
215
  // rearchive temp directory
@@ -225,11 +225,11 @@ export const moveComp = async(componentKey, copyMove, orgLibName, version, copyS
225
225
 
226
226
  if (newComponentKey) {
227
227
  const currentSharedPath = join(currentCompPath, "shared");
228
- const targetSharedPatah = join(tempCompPath, "shared");
228
+ const targetSharedPath = join(tempCompPath, "shared");
229
229
 
230
230
  // copy shared
231
231
  if (copyShared) {
232
- fs.cpSync(currentSharedPath, targetSharedPatah, { recursive: true, force: true });
232
+ fs.cpSync(currentSharedPath, targetSharedPath, { recursive: true, force: true });
233
233
  }
234
234
 
235
235
  console.log(`\n${copiedOrMoved} ${chalk.green(`${componentKey}`)} to ${chalk.green(`${orgLibName}/${version}`)} as ${chalk.green(`${newComponentKey}`)}\n`);
@@ -387,7 +387,7 @@ addDebugLog("move", "", "+");
387
387
  }
388
388
  else {
389
389
 
390
- // VS Code pluggin would send in the component
390
+ // VS Code plugin would send in the component
391
391
  let paramComponentKey;
392
392
  if (options.params.length == 4) {
393
393
  paramComponentKey = options.params[3];
@@ -396,7 +396,7 @@ addDebugLog("move", "", "+");
396
396
  const configDef = getConfigDefaults();
397
397
  console.log(`Current library: ${chalk.green(`${configDef.displayLibVersion}`)}`);
398
398
 
399
- // test to see if currnet library has more than one version
399
+ // test to see if current library has more than one version
400
400
  // if no available versions can not move/copy to it, so send in current lib
401
401
  // as library to be removed from the list
402
402
  let removeOrgLib = "";
@@ -62,13 +62,13 @@ addDebugLog("publish", "", "+");
62
62
  const currentOrgLib = orgLib.currentOrgLib;
63
63
  // const currentVersion = devBuild ? `${orgLib.version}-dev`: orgLib.version;
64
64
  const currentVersion = orgLib.buildVersion;
65
- const serverConfg = await getPegaServerConfig();
65
+ const serverConfig = await getPegaServerConfig();
66
66
  let configJson = {};
67
67
  await applyPegaData(configJson);
68
68
  const {app_name, app_version, sub } = await getApplicationAndVersionFromToken();
69
69
 
70
70
  console.log();
71
- console.log(`Publishing to server: ${chalk.green.bold(`${serverConfg.server}`)}`);
71
+ console.log(`Publishing to server: ${chalk.green.bold(`${serverConfig.server}`)}`);
72
72
  console.log(`Cosmos version: ${chalk.green.bold(`${configJson.packageCosmosVersion}`)}`);
73
73
  console.log(`Application: ${chalk.green.bold(`${app_name} - ${app_version}`)} for ${chalk.magentaBright.bold(`${sub}`)}`);
74
74
  console.log();
@@ -122,7 +122,7 @@ addDebugLog("publish", "", "+");
122
122
 
123
123
  // content = { rulesetName, rulesetVersion };
124
124
  } else {
125
- // VS Code pluggin would send in the component
125
+ // VS Code plugin would send in the component
126
126
  let paramComponentKey;
127
127
  if (options.params.length == 4) {
128
128
  paramComponentKey = options.params[3];
@@ -179,10 +179,10 @@ addDebugLog("publish", "", "+");
179
179
 
180
180
  }
181
181
 
182
- // otherwise continue with original V1 publishig of individual components
182
+ // otherwise continue with original V1 publishing of individual components
183
183
 
184
184
  //
185
- // orginial V1 publish
185
+ // original V1 publish
186
186
  //
187
187
 
188
188
  let OauthData;
@@ -222,7 +222,7 @@ addDebugLog("publish", "", "+");
222
222
 
223
223
  content = { componentKey, rulesetName, rulesetVersion, devBuild };
224
224
  } else {
225
- // VS Code pluggin would send in the component
225
+ // VS Code plugin would send in the component
226
226
  let paramComponentKey;
227
227
  if (options.params.length == 4) {
228
228
  paramComponentKey = options.params[3];
@@ -93,7 +93,7 @@ addDebugLog("zipLibraryComponent", `libraryName: ${libraryName}, libraryVersion:
93
93
  archive.file(componentsConfigJson, { name: path.basename(componentsConfigJson) });
94
94
  }
95
95
 
96
- // Add componentslocalization.jspon (array of component localizations) file
96
+ // Add componentslocalization.json (array of component localizations) file
97
97
  if (fs.existsSync(localizationsJson)) {
98
98
  archive.file(localizationsJson, { name: path.basename(localizationsJson) });
99
99
  }
@@ -444,7 +444,7 @@ addDebugLog("publishLibrary", "", "+");
444
444
  {
445
445
  name: 'override',
446
446
  type: 'confirm',
447
- message: `Do you wish to overrite it`,
447
+ message: `Do you wish to overwrite it`,
448
448
  default: false
449
449
  }
450
450
  ];
@@ -80,7 +80,7 @@ addDebugLog("updateConfig", `oldComponentKey: ${oldComponentKey}, newComponentKe
80
80
 
81
81
  // configData.allowedApplications = allowedApplications;
82
82
 
83
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
83
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
84
84
  fs.writeFileSync(join(targetDirectory, "/config.json"), JSON.stringify(configData, null, 4), { encoding: 'utf8' });
85
85
 
86
86
  };
@@ -242,7 +242,7 @@ addDebugLog("rename", "", "+");
242
242
  }
243
243
  else {
244
244
 
245
- // VS Code pluggin would send in the component
245
+ // VS Code plugin would send in the component
246
246
  let paramComponentKey;
247
247
  if (options.params.length == 4) {
248
248
  paramComponentKey = options.params[3];
@@ -76,7 +76,7 @@ addDebugLog("updateConfig", "", "");
76
76
 
77
77
  configData.allowedApplications = allowedApplications;
78
78
 
79
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
79
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
80
80
  fs.writeFileSync(join(targetDirectory, '/config.json'), JSON.stringify(configData, null, 4), {
81
81
  encoding: 'utf8',flag:'w'
82
82
  });
@@ -32,7 +32,7 @@ addDebugLog("restoreConfig", "", "+");
32
32
  {
33
33
  name: 'restoreDev',
34
34
  type: 'confirm',
35
- message: 'Also restore package dependencies/devDepencies ?',
35
+ message: 'Also restore package dependencies/devDependencies ?',
36
36
  default: false
37
37
  },
38
38
  ]);
@@ -98,7 +98,7 @@ export const showHelpV2 = (isCL) => {
98
98
  console.log(`\n${chalk.underline(`Published Versions (needs authentication)`)}`);
99
99
  console.log(`${chalk.cyan('npm run publish ')}\tpublish current library/version to server (creates a local published library as well)`);
100
100
  console.log(`${chalk.cyan('npm run listPublishedLib ')}\tget contents of published library/version (local or server)`);
101
- console.log(`${chalk.cyan('npm run deletePublishedLib')}\tdelete ALL contents of published libary/version (local or server)`);
101
+ console.log(`${chalk.cyan('npm run deletePublishedLib')}\tdelete ALL contents of published library/version (local or server)`);
102
102
 
103
103
  console.log(`\n${chalk.underline(`Components (in current library/version context)`)}`);
104
104
  console.log(`${chalk.cyan('npm run create ')}\t\tcreate a component`);
@@ -58,7 +58,7 @@ addDebugLog("switchLibrary", "", "+");
58
58
  const componentDirectory = join (currentDirectory, "src", "components");
59
59
  const orgLib = getConfigDefaults();
60
60
 
61
- // if we have choosen to use INPUT CONFIG FILE
61
+ // if we have chosen to use INPUT CONFIG FILE
62
62
  // process and no inputs
63
63
  if (useInputConfig) {
64
64
  const inputConfig = await getInputConfigForCommand("switchLib");
@@ -104,7 +104,7 @@ addDebugLog("switchLibrary", "", "+");
104
104
 
105
105
  }
106
106
  else {
107
- // params are in different order then questions, because want of VS Code pluggin
107
+ // params are in different order then questions, because want of VS Code plugin
108
108
  if (options.params.length >= 6) {
109
109
  newOrgLib = options.params[3];
110
110
  version = options.params[4];
@@ -58,7 +58,7 @@ addDebugLog("switchVersion", "", "+");
58
58
  const orgLib = getConfigDefaults();
59
59
 
60
60
 
61
- // if we have choosen to use INPUT CONFIG FILE
61
+ // if we have chosen to use INPUT CONFIG FILE
62
62
  // process and no inputs
63
63
  if (useInputConfig) {
64
64
  const inputConfig = await getInputConfigForCommand("switchLibVersion");
@@ -309,7 +309,7 @@ const overrideSchema = {
309
309
  };
310
310
 
311
311
  const validateSchema = ajv.compile(schema);
312
- const validateOverideSchema = ajv.compile(overrideSchema);
312
+ const validateOverrideSchema = ajv.compile(overrideSchema);
313
313
 
314
314
 
315
315
 
@@ -354,7 +354,7 @@ export default async (option) => {
354
354
  catch (err) {
355
355
 
356
356
  // for now, if now file just end
357
- console.log(`${chalk.bold.yellow('Config file not availabe for: ' + componentToValidate)}`);
357
+ console.log(`${chalk.bold.yellow('Config file not available for: ' + componentToValidate)}`);
358
358
  return;
359
359
 
360
360
  }
package/src/util.js CHANGED
@@ -114,7 +114,7 @@ export const addDebugLog = (sFunctionName, sLogData, sIncDec) => {
114
114
  export const setUpDefaults = async () => {
115
115
 
116
116
  // defaults, start up function will set these up
117
- // so that won't have to continously hit files to get data
117
+ // so that won't have to continuously hit files to get data
118
118
  // thus saving time.
119
119
  let retrievedConfigData = {
120
120
  serverType: "",
@@ -167,7 +167,7 @@ export const setUpDefaults = async () => {
167
167
  if (data[LIBRARY_BASED_CL]) {
168
168
  retrievedConfigData.isLibraryBasedCL = data[LIBRARY_BASED_CL];
169
169
 
170
- // if this is true, then force librarybased to true, so it doesn't have to be set
170
+ // if this is true, then force library based to true, so it doesn't have to be set
171
171
  if (retrievedConfigData.isLibraryBasedCL) {
172
172
  retrievedConfigData.isLibraryBased = retrievedConfigData.isLibraryBasedCL;
173
173
  }
@@ -524,7 +524,7 @@ if (showDebug) addDebugLog("setLibraryBased", "", "");
524
524
  data[LIBRARY_BASED] = isLibraryBased;
525
525
 
526
526
  // update file
527
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
527
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
528
528
  try {
529
529
  fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(data, null, 4), { encoding: 'utf8',flag:'w' });
530
530
  }
@@ -569,7 +569,7 @@ export const setLibraryBasedCL = async (isLibraryBasedCL) => {
569
569
  }
570
570
 
571
571
  // update file
572
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
572
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
573
573
  try {
574
574
  fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(data, null, 4), { encoding: 'utf8',flag:'w' });
575
575
  }
@@ -845,7 +845,7 @@ if (showDebug) addDebugLog("restoreTopLevelConfigFilesFromTemplate", ``, "");
845
845
  process.exit(1);
846
846
  }
847
847
 
848
- // copy template dependecies and devDependencies
848
+ // copy template dependencies and devDependencies
849
849
  const tData = JSON.parse(retrievedTemplateData);
850
850
 
851
851
 
@@ -1019,7 +1019,7 @@ if (showDebug) addDebugLog("updateServerConfigRuleSetAndVersion", `rulesetName:
1019
1019
  serverConfig.rulesetVersion = rulesetVersion;
1020
1020
 
1021
1021
  // update file
1022
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
1022
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
1023
1023
  fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(configData, null, 4), { encoding: 'utf8',flag:'w' });
1024
1024
 
1025
1025
  }
@@ -1035,7 +1035,7 @@ if (showDebug) addDebugLog("updateServerConfigArchiveRuleSetAndVersion", `rulese
1035
1035
  serverConfig.archiveRulesetVersion = rulesetVersion;
1036
1036
 
1037
1037
  // update file
1038
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
1038
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
1039
1039
  fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(configData, null, 4), { encoding: 'utf8',flag:'w' });
1040
1040
 
1041
1041
  }
@@ -1095,7 +1095,7 @@ if (showDebug) addDebugLog("setConfigDevBuild", `devBuild: ${devBuild}`, "");
1095
1095
  serverConfig.devBuild = devBuild;
1096
1096
 
1097
1097
  // update file
1098
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
1098
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
1099
1099
  fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(configData, null, 4), { encoding: 'utf8',flag:'w' });
1100
1100
  }
1101
1101
 
@@ -1115,7 +1115,7 @@ if (showDebug) addDebugLog("setConfigImportRelativePath", `importRelativePath: $
1115
1115
  configData[IMPORT_RELATIVE_PATH] = importRelativePath;
1116
1116
 
1117
1117
  // update file
1118
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
1118
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
1119
1119
  fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(configData, null, 4), { encoding: 'utf8',flag:'w' });
1120
1120
  }
1121
1121
 
@@ -1127,7 +1127,7 @@ if (showDebug) addDebugLog("setConfigExportRelativePath", `exportRelativePath: $
1127
1127
  configData[EXPORT_RELATIVE_PATH] = exportRelativePath;
1128
1128
 
1129
1129
  // update file
1130
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
1130
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
1131
1131
  fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(configData, null, 4), { encoding: 'utf8',flag:'w' });
1132
1132
  }
1133
1133
 
@@ -1170,7 +1170,7 @@ if (showDebug) addDebugLog("updateConfigVersion", `componentKey: ${componentKey}
1170
1170
 
1171
1171
  // check to see if PegaAboutData exists. If customer decides to put
1172
1172
  // data under PegaAboutData, we won't change the order
1173
- // otherise, will put at bottom
1173
+ // otherwise, will put at bottom
1174
1174
  for (let i in properties) {
1175
1175
  if (properties[i].name && properties[i].name === "PegaAboutData") {
1176
1176
  foundProp = properties[i];
@@ -1238,7 +1238,7 @@ if (showDebug) addDebugLog("setServerType", `serverType: ${serverType}`, "");
1238
1238
  serverConfig.serverType = serverType;
1239
1239
 
1240
1240
  // update file
1241
- // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
1241
+ // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
1242
1242
  fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(configData, null, 4), { encoding: 'utf8',flag:'w' });
1243
1243
 
1244
1244
  // reset
@@ -1795,8 +1795,8 @@ if (showDebug) addDebugLog("getLocalArchivedLibraryVersions", `libraryName: ${li
1795
1795
  .map(dirent => dirent.name);
1796
1796
  };
1797
1797
 
1798
- export const getLocalArchivedLibrraryVersionData = async(libraryName, libraryVersion) => {
1799
- if (showDebug) addDebugLog("getLocalArchivedLibrraryVersionData", `libraryName: ${libraryName}, libraryVersion: ${libraryVersion}`, "");
1798
+ export const getLocalArchivedLibraryVersionData = async(libraryName, libraryVersion) => {
1799
+ if (showDebug) addDebugLog("getLocalArchivedLibraryVersionData", `libraryName: ${libraryName}, libraryVersion: ${libraryVersion}`, "");
1800
1800
  const currentDirectory = process.cwd();
1801
1801
  const archiveDirectory = join (currentDirectory, ARCHIVES_PATH, `${libraryName}`, `${libraryVersion}`);
1802
1802
 
@@ -1943,10 +1943,10 @@ if (showDebug) addDebugLog("getComponentsConfigs", "", "");
1943
1943
  export const createComponentsConfigFile = async (filePath, compDir) => {
1944
1944
  if (showDebug) addDebugLog("createComponentsConfigFile", `filePath: ${filePath}`, "");
1945
1945
  const componentsConfigJSON = await getComponentsConfigs(compDir);
1946
- const compConfgFile = join(filePath, COMPONENTS_CONFIG_FILE_NAME);
1946
+ const compConfigFile = join(filePath, COMPONENTS_CONFIG_FILE_NAME);
1947
1947
 
1948
1948
  // write out file
1949
- fs.writeFileSync(compConfgFile, JSON.stringify(componentsConfigJSON), { encoding: 'utf8',flag:'w' });
1949
+ fs.writeFileSync(compConfigFile, JSON.stringify(componentsConfigJSON), { encoding: 'utf8',flag:'w' });
1950
1950
 
1951
1951
  };
1952
1952
 
@@ -2279,9 +2279,9 @@ if (showDebug) addDebugLog("updateComponentTaskConfig", "", "");
2279
2279
  const orgArchiveRulesetVersion = originalContentsData["server-config"].archiveRulesetVersion;
2280
2280
 
2281
2281
  // we keep server-config but we will restore from archive the
2282
- // rulset/version. Other stuff in task.config will come from archive
2282
+ // ruleset/version. Other stuff in task.config will come from archive
2283
2283
  originalContentsData["server-config"] = contentsData["server-config"];
2284
- // restore ruleset and verion
2284
+ // restore ruleset and version
2285
2285
  originalContentsData["server-config"].rulesetName = orgRuleset;
2286
2286
  originalContentsData["server-config"].rulesetVersion = orgRulesetVersion;
2287
2287