@provartesting/provardx-cli 0.0.1

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.
Files changed (57) hide show
  1. package/README.md +16 -0
  2. package/lib/Utility/errorCode.d.ts +1 -0
  3. package/lib/Utility/errorCode.js +9 -0
  4. package/lib/Utility/errorCode.js.map +1 -0
  5. package/lib/Utility/errorHandler.d.ts +15 -0
  6. package/lib/Utility/errorHandler.js +27 -0
  7. package/lib/Utility/errorHandler.js.map +1 -0
  8. package/lib/Utility/fileSupport.d.ts +6 -0
  9. package/lib/Utility/fileSupport.js +51 -0
  10. package/lib/Utility/fileSupport.js.map +1 -0
  11. package/lib/Utility/jsonSupport.d.ts +8 -0
  12. package/lib/Utility/jsonSupport.js +55 -0
  13. package/lib/Utility/jsonSupport.js.map +1 -0
  14. package/lib/Utility/propertyFileValidator.d.ts +13 -0
  15. package/lib/Utility/propertyFileValidator.js +103 -0
  16. package/lib/Utility/propertyFileValidator.js.map +1 -0
  17. package/lib/Utility/provarConfig.d.ts +11 -0
  18. package/lib/Utility/provarConfig.js +42 -0
  19. package/lib/Utility/provarConfig.js.map +1 -0
  20. package/lib/Utility/sfProvarCommandResult.d.ts +12 -0
  21. package/lib/Utility/sfProvarCommandResult.js +34 -0
  22. package/lib/Utility/sfProvarCommandResult.js.map +1 -0
  23. package/lib/Utility/stringSupport.d.ts +6 -0
  24. package/lib/Utility/stringSupport.js +32 -0
  25. package/lib/Utility/stringSupport.js.map +1 -0
  26. package/lib/commands/sf/provar/config/generate.d.ts +14 -0
  27. package/lib/commands/sf/provar/config/generate.js +102 -0
  28. package/lib/commands/sf/provar/config/generate.js.map +1 -0
  29. package/lib/commands/sf/provar/config/get.d.ts +10 -0
  30. package/lib/commands/sf/provar/config/get.js +106 -0
  31. package/lib/commands/sf/provar/config/get.js.map +1 -0
  32. package/lib/commands/sf/provar/config/load.d.ts +12 -0
  33. package/lib/commands/sf/provar/config/load.js +87 -0
  34. package/lib/commands/sf/provar/config/load.js.map +1 -0
  35. package/lib/commands/sf/provar/config/set.d.ts +10 -0
  36. package/lib/commands/sf/provar/config/set.js +117 -0
  37. package/lib/commands/sf/provar/config/set.js.map +1 -0
  38. package/lib/commands/sf/provar/config/validate.d.ts +9 -0
  39. package/lib/commands/sf/provar/config/validate.js +40 -0
  40. package/lib/commands/sf/provar/config/validate.js.map +1 -0
  41. package/lib/constants/commandConstants.d.ts +7 -0
  42. package/lib/constants/commandConstants.js +12 -0
  43. package/lib/constants/commandConstants.js.map +1 -0
  44. package/lib/constants/errorMessages.d.ts +13 -0
  45. package/lib/constants/errorMessages.js +24 -0
  46. package/lib/constants/errorMessages.js.map +1 -0
  47. package/lib/constants/propertyFileContent.json +24 -0
  48. package/lib/constants/propertyFileSchema.d.ts +247 -0
  49. package/lib/constants/propertyFileSchema.js +243 -0
  50. package/lib/constants/propertyFileSchema.js.map +1 -0
  51. package/messages/sf.provar.config.generate.md +33 -0
  52. package/messages/sf.provar.config.get.md +17 -0
  53. package/messages/sf.provar.config.load.md +29 -0
  54. package/messages/sf.provar.config.set.md +17 -0
  55. package/messages/sf.provar.config.validate.md +21 -0
  56. package/oclif.manifest.json +143 -0
  57. package/package.json +214 -0
package/README.md ADDED
@@ -0,0 +1,16 @@
1
+ Run In dev provardx plugin on your local
2
+ # Prerequisite:
3
+ Node, npm , nvm, yarn, Latest sf cli.
4
+ # Steps to run on local:
5
+ 1. git clone the Repo from the feature branch: https://github.com/ProvarTesting/provardx-cli/
6
+ 2. Install the dependencies on your local from package.json: npm i
7
+ 3. Build the project using the command: yarn prepack
8
+ 4. Need to copy the bin/dev folder to run the commands locally in Dev. Plugin.
9
+ 5. To run the command manually: bin/dev ${command} (example: bin/dev sf provar config generate)
10
+ 6. To run NUTS on your local: yarn run test:nuts
11
+
12
+ # Naming conventions used in provardx-cli development
13
+ 1. camelCase for fileNames/methodNames/Variables
14
+ 2. PascalCase for classNames.
15
+
16
+ Also, we are adding the Copyright/licensing text over every ts file
@@ -0,0 +1 @@
1
+ export type ErrorCode = 'MISSING_FILE' | 'MALFORMED_FILE' | 'MISSING_PROPERTY' | 'MISSING_PROPERTIES' | 'INVALID_VALUES' | 'INVALID_VALUE' | 'MISSING_VALUE' | 'INVALID_FILE_EXTENSION' | 'GENERATE_OPERATION_DENIED' | 'INVALID_PATH' | 'INSUFFICIENT_PERMISSIONS' | 'INVALID_ARGUMENT' | 'INVALID_PROPERTY' | 'UNKNOWN_PROPERTY';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2024 Provar Limited.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.md file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ //# sourceMappingURL=errorCode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorCode.js","sourceRoot":"","sources":["../../src/Utility/errorCode.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
@@ -0,0 +1,15 @@
1
+ import { ErrorCode } from './errorCode';
2
+ /**
3
+ * ErrorHandler to manage multiple errors thrown while execution of commands.
4
+ *
5
+ */
6
+ export type Error = {
7
+ code: ErrorCode;
8
+ message: string;
9
+ };
10
+ export default class ErrorHandler {
11
+ private errors;
12
+ addErrorsToList(eCode: ErrorCode, eMessage: string): void;
13
+ getErrors(): Error[];
14
+ errorsToStringArray(): string[];
15
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2024 Provar Limited.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.md file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ class ErrorHandler {
10
+ constructor() {
11
+ this.errors = [];
12
+ }
13
+ addErrorsToList(eCode, eMessage) {
14
+ this.errors.push({
15
+ code: eCode,
16
+ message: eMessage,
17
+ });
18
+ }
19
+ getErrors() {
20
+ return this.errors;
21
+ }
22
+ errorsToStringArray() {
23
+ return this.errors.map((e) => `[${e.code}] ${e.message}`);
24
+ }
25
+ }
26
+ exports.default = ErrorHandler;
27
+ //# sourceMappingURL=errorHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorHandler.js","sourceRoot":"","sources":["../../src/Utility/errorHandler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAcH,MAAqB,YAAY;IAAjC;QACU,WAAM,GAAY,EAAE,CAAC;IAgB/B,CAAC;IAdQ,eAAe,CAAC,KAAgB,EAAE,QAAgB;QACvD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YACf,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,QAAQ;SAClB,CAAC,CAAC;IACL,CAAC;IAEM,SAAS;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAEM,mBAAmB;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF;AAjBD,+BAiBC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Contains all the methods that deals with generic file related operations.
3
+ *
4
+ */
5
+ export declare function generateFile(filePath: string): void;
6
+ export declare function getExtension(filename: string): string;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2024 Provar Limited.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.md file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || function (mod) {
25
+ if (mod && mod.__esModule) return mod;
26
+ var result = {};
27
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
+ __setModuleDefault(result, mod);
29
+ return result;
30
+ };
31
+ var __importDefault = (this && this.__importDefault) || function (mod) {
32
+ return (mod && mod.__esModule) ? mod : { "default": mod };
33
+ };
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.getExtension = exports.generateFile = void 0;
36
+ const fs = __importStar(require("fs"));
37
+ const propertyFileContent_json_1 = __importDefault(require("../constants/propertyFileContent.json"));
38
+ /**
39
+ * Contains all the methods that deals with generic file related operations.
40
+ *
41
+ */
42
+ function generateFile(filePath) {
43
+ fs.writeFileSync(filePath, JSON.stringify(propertyFileContent_json_1.default, null, 3));
44
+ }
45
+ exports.generateFile = generateFile;
46
+ function getExtension(filename) {
47
+ const i = filename.lastIndexOf('.');
48
+ return i < 0 ? '' : filename.substr(i);
49
+ }
50
+ exports.getExtension = getExtension;
51
+ //# sourceMappingURL=fileSupport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileSupport.js","sourceRoot":"","sources":["../../src/Utility/fileSupport.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,qGAAwE;AAExE;;;GAGG;AAEH,SAAgB,YAAY,CAAC,QAAgB;IAC3C,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,kCAAmB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC3E,CAAC;AAFD,oCAEC;AAED,SAAgB,YAAY,CAAC,QAAgB;IAC3C,MAAM,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC;AAHD,oCAGC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Custom logics from JSON manipulation.
3
+ *
4
+ */
5
+ export declare function getNestedProperty(jsonData: any, property: string): any;
6
+ export declare function checkNestedProperty(jsonData: any, property: string): boolean;
7
+ export declare function setNestedProperty(jsonData: any, property: string, value: string | undefined): void;
8
+ export declare function parseJSONString(jsonInput: string): any;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2024 Provar Limited.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.md file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.parseJSONString = exports.setNestedProperty = exports.checkNestedProperty = exports.getNestedProperty = void 0;
10
+ /**
11
+ * Custom logics from JSON manipulation.
12
+ *
13
+ */
14
+ /* eslint-disable */
15
+ function getNestedProperty(jsonData, property) {
16
+ const propertyPath = property.split('.');
17
+ for (let i = 0; i < propertyPath.length; i++) {
18
+ jsonData = jsonData[propertyPath[i]];
19
+ }
20
+ return jsonData;
21
+ }
22
+ exports.getNestedProperty = getNestedProperty;
23
+ function checkNestedProperty(jsonData, property) {
24
+ const propertyPath = property.split('.');
25
+ for (const nestedProperty of propertyPath) {
26
+ if (!jsonData?.hasOwnProperty(nestedProperty)) {
27
+ return false;
28
+ }
29
+ jsonData = jsonData[nestedProperty];
30
+ }
31
+ return true;
32
+ }
33
+ exports.checkNestedProperty = checkNestedProperty;
34
+ function setNestedProperty(jsonData, property, value) {
35
+ const propertyPath = property.split('.');
36
+ const propertyPathLength = propertyPath.length;
37
+ for (var i = 0; i < propertyPathLength - 1; i++) {
38
+ var nestedProperty = propertyPath[i];
39
+ if (!jsonData[nestedProperty])
40
+ jsonData[nestedProperty] = {};
41
+ jsonData = jsonData[nestedProperty];
42
+ }
43
+ jsonData[propertyPath[propertyPathLength - 1]] = value;
44
+ }
45
+ exports.setNestedProperty = setNestedProperty;
46
+ function parseJSONString(jsonInput) {
47
+ try {
48
+ return JSON.parse(jsonInput);
49
+ }
50
+ catch (err) {
51
+ return jsonInput;
52
+ }
53
+ }
54
+ exports.parseJSONString = parseJSONString;
55
+ //# sourceMappingURL=jsonSupport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonSupport.js","sourceRoot":"","sources":["../../src/Utility/jsonSupport.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;;GAGG;AAEH,oBAAoB;AACpB,SAAgB,iBAAiB,CAAC,QAAa,EAAE,QAAgB;IAC/D,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC5C,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;KACtC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAND,8CAMC;AAED,SAAgB,mBAAmB,CAAC,QAAa,EAAE,QAAgB;IACjE,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzC,KAAK,MAAM,cAAc,IAAI,YAAY,EAAE;QACzC,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,EAAE;YAC7C,OAAO,KAAK,CAAC;SACd;QACD,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;KACrC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AATD,kDASC;AAED,SAAgB,iBAAiB,CAAC,QAAa,EAAE,QAAgB,EAAE,KAAyB;IAC1F,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzC,MAAM,kBAAkB,GAAG,YAAY,CAAC,MAAM,CAAC;IAC/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,kBAAkB,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QAC/C,IAAI,cAAc,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QACrC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;YAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC;QAC7D,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;KACrC;IACD,QAAQ,CAAC,YAAY,CAAC,kBAAkB,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;AACzD,CAAC;AATD,8CASC;AAED,SAAgB,eAAe,CAAC,SAAiB;IAC/C,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;KAC9B;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO,SAAS,CAAC;KAClB;AACH,CAAC;AAND,0CAMC"}
@@ -0,0 +1,13 @@
1
+ import { ValidatorResult } from 'jsonschema';
2
+ import ErrorHandler, { Error } from './errorHandler';
3
+ /**
4
+ * Contains code to load the config file and validation login for provardx-properties.json
5
+ *
6
+ */
7
+ export default class PropertyFileValidator {
8
+ validationResults: ValidatorResult;
9
+ private errorHandler;
10
+ constructor(errorHandler: ErrorHandler);
11
+ validate(): Promise<boolean>;
12
+ getValidationErrors(): Error[];
13
+ }
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2024 Provar Limited.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.md file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || function (mod) {
25
+ if (mod && mod.__esModule) return mod;
26
+ var result = {};
27
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
+ __setModuleDefault(result, mod);
29
+ return result;
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ const fileSystem = __importStar(require("fs"));
33
+ const jsonschema_1 = require("jsonschema");
34
+ const errorMessages_1 = require("../constants/errorMessages");
35
+ const propertyFileSchema_1 = require("../constants/propertyFileSchema");
36
+ const stringSupport_1 = require("./stringSupport");
37
+ const provarConfig_1 = require("./provarConfig");
38
+ /**
39
+ * Contains code to load the config file and validation login for provardx-properties.json
40
+ *
41
+ */
42
+ class PropertyFileValidator {
43
+ constructor(errorHandler) {
44
+ this.errorHandler = errorHandler;
45
+ }
46
+ async validate() {
47
+ const config = await provarConfig_1.ProvarConfig.loadConfig(this.errorHandler);
48
+ const filePath = config.get('PROVARDX_PROPERTIES_FILE_PATH')?.toString();
49
+ const missingRequiredProperties = [];
50
+ const invalidPropertiesValue = [];
51
+ if (filePath === undefined || !fileSystem.existsSync(filePath)) {
52
+ this.errorHandler.addErrorsToList('MISSING_FILE', errorMessages_1.errorMessages.MISSINGFILEERROR);
53
+ }
54
+ else {
55
+ /* eslint-disable */
56
+ const jsonValidator = new jsonschema_1.Validator();
57
+ try {
58
+ this.validationResults = jsonValidator.validate(JSON.parse(fileSystem.readFileSync(filePath).toString()), propertyFileSchema_1.propertyFileSchema);
59
+ if (this.validationResults.errors.length > 0) {
60
+ for (const validationError of this.validationResults.errors) {
61
+ if (validationError.name === 'required') {
62
+ let substring = (0, stringSupport_1.substringAfter)(validationError.property, '.');
63
+ if (substring) {
64
+ substring = substring.concat('.');
65
+ }
66
+ missingRequiredProperties.push(substring + validationError.argument);
67
+ }
68
+ else if (validationError.name === 'enum' || validationError.name === 'type') {
69
+ invalidPropertiesValue.push((0, stringSupport_1.substringAfter)(validationError.property, '.'));
70
+ }
71
+ }
72
+ }
73
+ }
74
+ catch (errors) {
75
+ this.errorHandler.addErrorsToList('MALFORMED_FILE', errorMessages_1.errorMessages.MALFORMEDFILEERROR);
76
+ return false;
77
+ }
78
+ const missingPropertiesCount = missingRequiredProperties.length;
79
+ const invalidValuesCount = invalidPropertiesValue.length;
80
+ if (missingPropertiesCount > 1) {
81
+ this.errorHandler.addErrorsToList('MISSING_PROPERTIES', `The properties ${(0, stringSupport_1.addQuotesAround)(missingRequiredProperties).join(', ')} are missing.`);
82
+ }
83
+ else if (missingPropertiesCount == 1) {
84
+ this.errorHandler.addErrorsToList('MISSING_PROPERTY', `The property ${(0, stringSupport_1.addQuotesAround)(missingRequiredProperties)} is missing.`);
85
+ }
86
+ if (invalidValuesCount > 1) {
87
+ this.errorHandler.addErrorsToList('INVALID_VALUES', `The properties ${(0, stringSupport_1.addQuotesAround)(invalidPropertiesValue).join(', ')} values are not valid.`);
88
+ }
89
+ else if (invalidValuesCount == 1) {
90
+ this.errorHandler.addErrorsToList('INVALID_VALUE', `The property ${(0, stringSupport_1.addQuotesAround)(invalidPropertiesValue)} value is not valid.`);
91
+ }
92
+ }
93
+ if (this.errorHandler.getErrors().length > 0) {
94
+ return false;
95
+ }
96
+ return true;
97
+ }
98
+ getValidationErrors() {
99
+ return this.errorHandler.getErrors();
100
+ }
101
+ }
102
+ exports.default = PropertyFileValidator;
103
+ //# sourceMappingURL=propertyFileValidator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"propertyFileValidator.js","sourceRoot":"","sources":["../../src/Utility/propertyFileValidator.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,11 @@
1
+ import { Config } from '@salesforce/core';
2
+ import ErrorHandler from './errorHandler';
3
+ /**
4
+ * sfdxConfig extended class that deals with any operation over .sf/config.json.
5
+ * ex: what all properties we can add to config.json.
6
+ *
7
+ */
8
+ export declare class ProvarConfig extends Config {
9
+ constructor();
10
+ static loadConfig(errorHandler: ErrorHandler): Promise<ProvarConfig>;
11
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2024 Provar Limited.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.md file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.ProvarConfig = void 0;
10
+ const core_1 = require("@salesforce/core");
11
+ /**
12
+ * sfdxConfig extended class that deals with any operation over .sf/config.json.
13
+ * ex: what all properties we can add to config.json.
14
+ *
15
+ */
16
+ class ProvarConfig extends core_1.Config {
17
+ constructor() {
18
+ const option = { isGlobal: true, isState: true, filename: 'config.json', stateFolder: '.provardx' };
19
+ const allowedProeprties = [];
20
+ allowedProeprties.push({ key: 'PROVARDX_PROPERTIES_FILE_PATH', description: '' });
21
+ ProvarConfig.addAllowedProperties(allowedProeprties);
22
+ super(Object.assign({
23
+ isGlobal: true,
24
+ }, option));
25
+ }
26
+ static async loadConfig(errorHandler) {
27
+ try {
28
+ const config = await ProvarConfig.create();
29
+ await config.read();
30
+ return config;
31
+ }
32
+ catch (error) {
33
+ if (error instanceof core_1.SfError) {
34
+ // eslint-disable-next-line
35
+ errorHandler.addErrorsToList(error.code, error.message);
36
+ }
37
+ throw error;
38
+ }
39
+ }
40
+ }
41
+ exports.ProvarConfig = ProvarConfig;
42
+ //# sourceMappingURL=provarConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provarConfig.js","sourceRoot":"","sources":["../../src/Utility/provarConfig.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAAuE;AAGvE;;;;GAIG;AAEH,MAAa,YAAa,SAAQ,aAAM;IACtC;QACE,MAAM,MAAM,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;QACpG,MAAM,iBAAiB,GAAyB,EAAE,CAAC;QACnD,iBAAiB,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,+BAA+B,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;QAClF,YAAY,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;QACrD,KAAK,CACH,MAAM,CAAC,MAAM,CACX;YACE,QAAQ,EAAE,IAAI;SACf,EACD,MAAM,CACP,CACF,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,YAA0B;QACvD,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,MAAM,EAAE,CAAC;YAC3C,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YACpB,OAAO,MAAM,CAAC;SACf;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,KAAK,YAAY,cAAO,EAAE;gBAC5B,2BAA2B;gBAC3B,YAAY,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;aACzD;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;CACF;AA7BD,oCA6BC"}
@@ -0,0 +1,12 @@
1
+ import { Messages } from '@salesforce/core';
2
+ import ErrorHandler, { Error } from './errorHandler';
3
+ /**
4
+ * Declaring return type and populating return object for async run method of the commands.
5
+ *
6
+ */
7
+ export type SfProvarCommandResult = {
8
+ success: boolean;
9
+ value?: string;
10
+ errors?: Error[];
11
+ };
12
+ export declare function populateResult(flags: any, errorHandler: ErrorHandler, messages: Messages<string>, log: Function, value?: string): SfProvarCommandResult;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2024 Provar Limited.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.md file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.populateResult = void 0;
10
+ /* eslint-disable */
11
+ function populateResult(flags, errorHandler, messages, log, value) {
12
+ let result = { success: true };
13
+ if (errorHandler.getErrors().length > 0) {
14
+ const errorObjects = errorHandler.getErrors();
15
+ if (!flags['json']) {
16
+ throw messages.createError('error.MULTIPLE_ERRORS', errorHandler.errorsToStringArray());
17
+ }
18
+ result = {
19
+ success: false,
20
+ errors: errorObjects,
21
+ };
22
+ }
23
+ else {
24
+ messages.messages.has('success_message') ? log(messages.getMessage('success_message')) : '';
25
+ value != null ? log(value) : '';
26
+ result = {
27
+ success: true,
28
+ value: value,
29
+ };
30
+ }
31
+ return result;
32
+ }
33
+ exports.populateResult = populateResult;
34
+ //# sourceMappingURL=sfProvarCommandResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sfProvarCommandResult.js","sourceRoot":"","sources":["../../src/Utility/sfProvarCommandResult.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAgBH,oBAAoB;AACpB,SAAgB,cAAc,CAC5B,KAAU,EACV,YAA0B,EAC1B,QAA0B,EAC1B,GAAa,EACb,KAAc;IAEd,IAAI,MAAM,GAA0B,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAEtD,IAAI,YAAY,CAAC,SAAS,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;QACvC,MAAM,YAAY,GAAY,YAAY,CAAC,SAAS,EAAE,CAAC;QACvD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;YAClB,MAAM,QAAQ,CAAC,WAAW,CAAC,uBAAuB,EAAE,YAAY,CAAC,mBAAmB,EAAE,CAAC,CAAC;SACzF;QACD,MAAM,GAAG;YACP,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,YAAY;SACrB,CAAC;KACH;SAAM;QACL,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5F,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAChC,MAAM,GAAG;YACP,OAAO,EAAE,IAAI;YACb,KAAK,EAAE,KAAK;SACb,CAAC;KACH;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AA3BD,wCA2BC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Deals with the custom operations on strings.
3
+ *
4
+ */
5
+ export declare function substringAfter(str: string, separator: string): string;
6
+ export declare function addQuotesAround(array: string[]): string[];
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2024 Provar Limited.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.md file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.addQuotesAround = exports.substringAfter = void 0;
10
+ /**
11
+ * Deals with the custom operations on strings.
12
+ *
13
+ */
14
+ function substringAfter(str, separator) {
15
+ if (!str) {
16
+ return str;
17
+ }
18
+ if (separator == null) {
19
+ return '';
20
+ }
21
+ const pos = str.indexOf(separator);
22
+ if (pos === -1) {
23
+ return '';
24
+ }
25
+ return str.substring(pos + separator.length);
26
+ }
27
+ exports.substringAfter = substringAfter;
28
+ function addQuotesAround(array) {
29
+ return array.map((item) => "'" + item + "'");
30
+ }
31
+ exports.addQuotesAround = addQuotesAround;
32
+ //# sourceMappingURL=stringSupport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringSupport.js","sourceRoot":"","sources":["../../src/Utility/stringSupport.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;;GAGG;AAEH,SAAgB,cAAc,CAAC,GAAW,EAAE,SAAiB;IAC3D,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,GAAG,CAAC;KACZ;IACD,IAAI,SAAS,IAAI,IAAI,EAAE;QACrB,OAAO,EAAE,CAAC;KACX;IACD,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACnC,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE;QACd,OAAO,EAAE,CAAC;KACX;IAED,OAAO,GAAG,CAAC,SAAS,CAAC,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;AAC/C,CAAC;AAbD,wCAaC;AACD,SAAgB,eAAe,CAAC,KAAe;IAC7C,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC,CAAC;AAC/C,CAAC;AAFD,0CAEC"}
@@ -0,0 +1,14 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ import { SfProvarCommandResult } from '../../../../Utility/sfProvarCommandResult';
3
+ export default class SfProvarConfigGenerate extends SfCommand<SfProvarCommandResult> {
4
+ static readonly summary: string;
5
+ static readonly description: string;
6
+ static readonly examples: string[];
7
+ static readonly flags: {
8
+ 'properties-file': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
+ 'no-prompt': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ };
11
+ private errorHandler;
12
+ run(): Promise<SfProvarCommandResult>;
13
+ private generatePropertiesFile;
14
+ }
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2024 Provar Limited.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.md file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || function (mod) {
25
+ if (mod && mod.__esModule) return mod;
26
+ var result = {};
27
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
+ __setModuleDefault(result, mod);
29
+ return result;
30
+ };
31
+ var __importDefault = (this && this.__importDefault) || function (mod) {
32
+ return (mod && mod.__esModule) ? mod : { "default": mod };
33
+ };
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ const fs = __importStar(require("fs"));
36
+ const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
37
+ const core_1 = require("@salesforce/core");
38
+ const fileSupport_1 = require("../../../../Utility/fileSupport");
39
+ const errorHandler_1 = __importDefault(require("../../../../Utility/errorHandler"));
40
+ const sfProvarCommandResult_1 = require("../../../../Utility/sfProvarCommandResult");
41
+ const errorMessages_1 = require("../../../../constants/errorMessages");
42
+ /**
43
+ * Generates the boiler plate provardx-properties.json
44
+ *
45
+ */
46
+ core_1.Messages.importMessagesDirectory(__dirname);
47
+ const messages = core_1.Messages.loadMessages('@provartesting/provardx-cli', 'sf.provar.config.generate');
48
+ class SfProvarConfigGenerate extends sf_plugins_core_1.SfCommand {
49
+ constructor() {
50
+ super(...arguments);
51
+ this.errorHandler = new errorHandler_1.default();
52
+ }
53
+ async run() {
54
+ const { flags } = await this.parse(SfProvarConfigGenerate);
55
+ const PropertiesFileName = flags['properties-file'];
56
+ if ((0, fileSupport_1.getExtension)(PropertiesFileName) !== '.json') {
57
+ this.errorHandler.addErrorsToList('INVALID_FILE_EXTENSION', 'Only the .json file extension is supported.');
58
+ }
59
+ else if (fs.existsSync(PropertiesFileName) && !flags['no-prompt']) {
60
+ if (!(await this.confirm(messages.getMessage('PropertiesFileOverwritePromptConfirm')))) {
61
+ this.errorHandler.addErrorsToList('GENERATE_OPERATION_DENIED', errorMessages_1.errorMessages.GENERATE_OPERATION_DENIED);
62
+ }
63
+ else {
64
+ this.generatePropertiesFile(PropertiesFileName);
65
+ }
66
+ }
67
+ else {
68
+ this.generatePropertiesFile(PropertiesFileName);
69
+ }
70
+ return (0, sfProvarCommandResult_1.populateResult)(flags, this.errorHandler, messages, this.log.bind(this));
71
+ }
72
+ generatePropertiesFile(PropertiesFileName) {
73
+ try {
74
+ (0, fileSupport_1.generateFile)(PropertiesFileName);
75
+ /* eslint-disable */
76
+ }
77
+ catch (error) {
78
+ if (error.code === 'ENOENT') {
79
+ this.errorHandler.addErrorsToList('INVALID_PATH', errorMessages_1.errorMessages.INVALID_PATH);
80
+ }
81
+ else if (error.code === 'EPERM' || error.code === 'EACCES') {
82
+ this.errorHandler.addErrorsToList('INSUFFICIENT_PERMISSIONS', 'The user does not have permissions to create the file.');
83
+ }
84
+ }
85
+ }
86
+ }
87
+ SfProvarConfigGenerate.summary = messages.getMessage('summary');
88
+ SfProvarConfigGenerate.description = messages.getMessage('description');
89
+ SfProvarConfigGenerate.examples = messages.getMessages('examples');
90
+ SfProvarConfigGenerate.flags = {
91
+ 'properties-file': sf_plugins_core_1.Flags.string({
92
+ summary: messages.getMessage('flags.properties-file.summary'),
93
+ char: 'p',
94
+ required: true,
95
+ }),
96
+ 'no-prompt': sf_plugins_core_1.Flags.boolean({
97
+ summary: messages.getMessage('flags.no-prompt.summary'),
98
+ char: 'n',
99
+ }),
100
+ };
101
+ exports.default = SfProvarConfigGenerate;
102
+ //# sourceMappingURL=generate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../../src/commands/sf/provar/config/generate.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,iEAA+D;AAC/D,2CAA4C;AAC5C,iEAA6E;AAC7E,oFAA4D;AAC5D,qFAAkG;AAClG,uEAAoE;AAEpE;;;GAGG;AAEH,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,6BAA6B,EAAE,2BAA2B,CAAC,CAAC;AAEnG,MAAqB,sBAAuB,SAAQ,2BAAgC;IAApF;;QAiBU,iBAAY,GAAiB,IAAI,sBAAY,EAAE,CAAC;IAoC1D,CAAC;IAlCQ,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC3D,MAAM,kBAAkB,GAAG,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAEpD,IAAI,IAAA,0BAAY,EAAC,kBAAkB,CAAC,KAAK,OAAO,EAAE;YAChD,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,wBAAwB,EAAE,6CAA6C,CAAC,CAAC;SAC5G;aAAM,IAAI,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;YACnE,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,sCAAsC,CAAC,CAAC,CAAC,EAAE;gBACtF,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,2BAA2B,EAAE,6BAAa,CAAC,yBAAyB,CAAC,CAAC;aACzG;iBAAM;gBACL,IAAI,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;aACjD;SACF;aAAM;YACL,IAAI,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;SACjD;QAED,OAAO,IAAA,sCAAc,EAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACjF,CAAC;IAEO,sBAAsB,CAAC,kBAA0B;QACvD,IAAI;YACF,IAAA,0BAAY,EAAC,kBAAkB,CAAC,CAAC;YACjC,oBAAoB;SACrB;QAAC,OAAO,KAAU,EAAE;YACnB,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;gBAC3B,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,cAAc,EAAE,6BAAa,CAAC,YAAY,CAAC,CAAC;aAC/E;iBAAM,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;gBAC5D,IAAI,CAAC,YAAY,CAAC,eAAe,CAC/B,0BAA0B,EAC1B,wDAAwD,CACzD,CAAC;aACH;SACF;IACH,CAAC;;AAnDsB,8BAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,AAAjC,CAAkC;AACzC,kCAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,AAArC,CAAsC;AACjD,+BAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,AAAnC,CAAoC;AAE5C,4BAAK,GAAG;IAC7B,iBAAiB,EAAE,uBAAK,CAAC,MAAM,CAAC;QAC9B,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,+BAA+B,CAAC;QAC7D,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,WAAW,EAAE,uBAAK,CAAC,OAAO,CAAC;QACzB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;QACvD,IAAI,EAAE,GAAG;KACV,CAAC;CACH,AAV2B,CAU1B;kBAfiB,sBAAsB"}
@@ -0,0 +1,10 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ import { SfProvarCommandResult } from '../../../../Utility/sfProvarCommandResult';
3
+ export default class SfProvarConfigGet extends SfCommand<SfProvarCommandResult> {
4
+ static readonly summary: string;
5
+ static readonly description: string;
6
+ static readonly examples: string[];
7
+ static readonly strict = false;
8
+ private errorHandler;
9
+ run(): Promise<SfProvarCommandResult>;
10
+ }