@provartesting/provardx-cli 0.0.3 → 0.0.5
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 +5 -0
- package/lib/Utility/errorCode.d.ts +1 -1
- package/lib/Utility/errorCode.js +1 -2
- package/lib/Utility/errorCode.js.map +1 -1
- package/lib/Utility/errorHandler.d.ts +1 -1
- package/lib/Utility/errorHandler.js +2 -7
- package/lib/Utility/errorHandler.js.map +1 -1
- package/lib/Utility/fileSupport.d.ts +1 -0
- package/lib/Utility/fileSupport.js +8 -36
- package/lib/Utility/fileSupport.js.map +1 -1
- package/lib/Utility/jsonSupport.js +4 -11
- package/lib/Utility/jsonSupport.js.map +1 -1
- package/lib/Utility/propertyFileValidator.d.ts +1 -1
- package/lib/Utility/propertyFileValidator.js +26 -44
- package/lib/Utility/propertyFileValidator.js.map +1 -1
- package/lib/Utility/provarConfig.d.ts +1 -1
- package/lib/Utility/provarConfig.js +3 -7
- package/lib/Utility/provarConfig.js.map +1 -1
- package/lib/Utility/provardxExecutor.d.ts +7 -0
- package/lib/Utility/provardxExecutor.js +31 -0
- package/lib/Utility/provardxExecutor.js.map +1 -0
- package/lib/Utility/sfProvarCommandResult.d.ts +1 -1
- package/lib/Utility/sfProvarCommandResult.js +1 -5
- package/lib/Utility/sfProvarCommandResult.js.map +1 -1
- package/lib/Utility/stringSupport.d.ts +2 -0
- package/lib/Utility/stringSupport.js +12 -7
- package/lib/Utility/stringSupport.js.map +1 -1
- package/lib/Utility/userSupport.d.ts +15 -0
- package/lib/Utility/userSupport.js +56 -0
- package/lib/Utility/userSupport.js.map +1 -0
- package/lib/commands/{sf/provar → provar/automation}/config/generate.d.ts +3 -3
- package/lib/commands/provar/automation/config/generate.js +70 -0
- package/lib/commands/provar/automation/config/generate.js.map +1 -0
- package/lib/commands/{sf/provar → provar/automation}/config/get.d.ts +1 -1
- package/lib/commands/provar/automation/config/get.js +74 -0
- package/lib/commands/provar/automation/config/get.js.map +1 -0
- package/lib/commands/{sf/provar → provar/automation}/config/load.d.ts +2 -2
- package/lib/commands/provar/automation/config/load.js +55 -0
- package/lib/commands/provar/automation/config/load.js.map +1 -0
- package/lib/commands/{sf/provar → provar/automation}/config/set.d.ts +1 -1
- package/lib/commands/provar/automation/config/set.js +85 -0
- package/lib/commands/provar/automation/config/set.js.map +1 -0
- package/lib/commands/{sf/provar → provar/automation}/config/validate.d.ts +1 -1
- package/lib/commands/provar/automation/config/validate.js +31 -0
- package/lib/commands/provar/automation/config/validate.js.map +1 -0
- package/lib/commands/provar/automation/metadata/download.d.ts +13 -0
- package/lib/commands/provar/automation/metadata/download.js +94 -0
- package/lib/commands/provar/automation/metadata/download.js.map +1 -0
- package/lib/constants/commandConstants.d.ts +6 -5
- package/lib/constants/commandConstants.js +8 -10
- package/lib/constants/commandConstants.js.map +1 -1
- package/lib/constants/errorMessages.js +2 -5
- package/lib/constants/errorMessages.js.map +1 -1
- package/lib/constants/propertyFileContent.d.ts +24 -0
- package/lib/constants/propertyFileContent.js +25 -0
- package/lib/constants/propertyFileContent.js.map +1 -0
- package/lib/constants/propertyFileSchema.d.ts +7 -0
- package/lib/constants/propertyFileSchema.js +9 -4
- package/lib/constants/propertyFileSchema.js.map +1 -1
- package/lib/constants/sfCommandConstants.d.ts +4 -0
- package/lib/constants/sfCommandConstants.js +6 -0
- package/lib/constants/sfCommandConstants.js.map +1 -0
- package/messages/provar.metadata.download.md +23 -0
- package/messages/sf.provar.config.generate.md +3 -3
- package/messages/sf.provar.config.get.md +3 -3
- package/messages/sf.provar.config.load.md +3 -3
- package/messages/sf.provar.config.set.md +3 -3
- package/messages/sf.provar.config.validate.md +3 -3
- package/oclif.manifest.json +341 -73
- package/package.json +37 -48
- package/lib/commands/sf/provar/config/generate.js +0 -102
- package/lib/commands/sf/provar/config/generate.js.map +0 -1
- package/lib/commands/sf/provar/config/get.js +0 -106
- package/lib/commands/sf/provar/config/get.js.map +0 -1
- package/lib/commands/sf/provar/config/load.js +0 -87
- package/lib/commands/sf/provar/config/load.js.map +0 -1
- package/lib/commands/sf/provar/config/set.js +0 -117
- package/lib/commands/sf/provar/config/set.js.map +0 -1
- package/lib/commands/sf/provar/config/validate.js +0 -40
- package/lib/commands/sf/provar/config/validate.js.map +0 -1
- package/lib/constants/propertyFileContent.json +0 -24
|
@@ -1,102 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@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@ -1,106 +0,0 @@
|
|
|
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 fileSystem = __importStar(require("fs"));
|
|
36
|
-
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
37
|
-
const core_1 = require("@salesforce/core");
|
|
38
|
-
const sfProvarCommandResult_1 = require("../../../../Utility/sfProvarCommandResult");
|
|
39
|
-
const errorHandler_1 = __importDefault(require("../../../../Utility/errorHandler"));
|
|
40
|
-
const provarConfig_1 = require("../../../../Utility/provarConfig");
|
|
41
|
-
const errorMessages_1 = require("../../../../constants/errorMessages");
|
|
42
|
-
const jsonSupport_1 = require("../../../../Utility/jsonSupport");
|
|
43
|
-
/**
|
|
44
|
-
* Gets the value for specified propertykey under arguments from provardx-properties.json
|
|
45
|
-
* laoded under config.json
|
|
46
|
-
*
|
|
47
|
-
*/
|
|
48
|
-
core_1.Messages.importMessagesDirectory(__dirname);
|
|
49
|
-
const messages = core_1.Messages.loadMessages('@provartesting/provardx-cli', 'sf.provar.config.get');
|
|
50
|
-
class SfProvarConfigGet extends sf_plugins_core_1.SfCommand {
|
|
51
|
-
constructor() {
|
|
52
|
-
super(...arguments);
|
|
53
|
-
this.errorHandler = new errorHandler_1.default();
|
|
54
|
-
}
|
|
55
|
-
async run() {
|
|
56
|
-
const { argv, flags } = await this.parse(SfProvarConfigGet);
|
|
57
|
-
const config = await provarConfig_1.ProvarConfig.loadConfig(this.errorHandler);
|
|
58
|
-
const propertiesFilePath = config.get('PROVARDX_PROPERTIES_FILE_PATH')?.toString();
|
|
59
|
-
let attributeValue = null;
|
|
60
|
-
if (propertiesFilePath === undefined || !fileSystem.existsSync(propertiesFilePath)) {
|
|
61
|
-
this.errorHandler.addErrorsToList('MISSING_FILE', errorMessages_1.errorMessages.MISSINGFILEERROR);
|
|
62
|
-
return (0, sfProvarCommandResult_1.populateResult)(flags, this.errorHandler, messages, this.log.bind(this));
|
|
63
|
-
}
|
|
64
|
-
try {
|
|
65
|
-
/* eslint-disable */
|
|
66
|
-
if (!argv.length) {
|
|
67
|
-
this.errorHandler.addErrorsToList('MISSING_PROPERTY', errorMessages_1.errorMessages.MISSING_PROPERTY_GET);
|
|
68
|
-
return (0, sfProvarCommandResult_1.populateResult)(flags, this.errorHandler, messages, this.log.bind(this));
|
|
69
|
-
}
|
|
70
|
-
const data = fileSystem.readFileSync(propertiesFilePath, { encoding: 'utf8' });
|
|
71
|
-
const propertyFileContent = JSON.parse(data);
|
|
72
|
-
const propertyName = argv[0];
|
|
73
|
-
if (propertyName.includes('.')) {
|
|
74
|
-
if (!(0, jsonSupport_1.checkNestedProperty)(propertyFileContent, propertyName)) {
|
|
75
|
-
this.errorHandler.addErrorsToList('UNKNOWN_PROPERTY', errorMessages_1.errorMessages.UNKNOWN_PROPERTY);
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
attributeValue = (0, jsonSupport_1.getNestedProperty)(propertyFileContent, propertyName);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
if (!propertyFileContent.hasOwnProperty(propertyName)) {
|
|
83
|
-
this.errorHandler.addErrorsToList('UNKNOWN_PROPERTY', errorMessages_1.errorMessages.UNKNOWN_PROPERTY);
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
attributeValue = propertyFileContent[propertyName];
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
catch (err) {
|
|
91
|
-
if (err.name === 'SyntaxError') {
|
|
92
|
-
this.errorHandler.addErrorsToList('MALFORMED_FILE', errorMessages_1.errorMessages.MALFORMEDFILEERROR);
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
throw err;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return (0, sfProvarCommandResult_1.populateResult)(flags, this.errorHandler, messages, this.log.bind(this), attributeValue);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
SfProvarConfigGet.summary = messages.getMessage('summary');
|
|
102
|
-
SfProvarConfigGet.description = messages.getMessage('description');
|
|
103
|
-
SfProvarConfigGet.examples = messages.getMessages('examples');
|
|
104
|
-
SfProvarConfigGet.strict = false;
|
|
105
|
-
exports.default = SfProvarConfigGet;
|
|
106
|
-
//# sourceMappingURL=get.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../../src/commands/sf/provar/config/get.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+CAAiC;AACjC,iEAAwD;AACxD,2CAA4C;AAC5C,qFAAkG;AAClG,oFAA4D;AAC5D,mEAAgE;AAChE,uEAAoE;AACpE,iEAAyF;AAEzF;;;;GAIG;AAEH,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,6BAA6B,EAAE,sBAAsB,CAAC,CAAC;AAE9F,MAAqB,iBAAkB,SAAQ,2BAAgC;IAA/E;;QAMU,iBAAY,GAAG,IAAI,sBAAY,EAAE,CAAC;IA8C5C,CAAC;IA5CQ,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC5D,MAAM,MAAM,GAAiB,MAAM,2BAAY,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9E,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC,EAAE,QAAQ,EAAE,CAAC;QACnF,IAAI,cAAc,GAAG,IAAI,CAAC;QAE1B,IAAI,kBAAkB,KAAK,SAAS,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE;YAClF,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,cAAc,EAAE,6BAAa,CAAC,gBAAgB,CAAC,CAAC;YAClF,OAAO,IAAA,sCAAc,EAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IA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,eAAe,CAAC,gBAAgB,EAAE,6BAAa,CAAC,kBAAkB,CAAC,CAAC;aACvF;iBAAM;gBACL,MAAM,GAAG,CAAC;aACX;SACF;QAED,OAAO,IAAA,sCAAc,EAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,cAAc,CAAC,CAAC;IACjG,CAAC;;AAlDsB,yBAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,AAAjC,CAAkC;AACzC,6BAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,AAArC,CAAsC;AACjD,0BAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,AAAnC,CAAoC;AAC5C,wBAAM,GAAG,KAAK,AAAR,CAAS;kBAJnB,iBAAiB"}
|
|
@@ -1,87 +0,0 @@
|
|
|
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 fileSystem = __importStar(require("fs"));
|
|
36
|
-
const path_1 = require("path");
|
|
37
|
-
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
38
|
-
const core_1 = require("@salesforce/core");
|
|
39
|
-
const sfProvarCommandResult_1 = require("../../../../Utility/sfProvarCommandResult");
|
|
40
|
-
const errorHandler_1 = __importDefault(require("../../../../Utility/errorHandler"));
|
|
41
|
-
const provarConfig_1 = require("../../../../Utility/provarConfig");
|
|
42
|
-
const propertyFileValidator_1 = __importDefault(require("../../../../Utility/propertyFileValidator"));
|
|
43
|
-
const errorMessages_1 = require("../../../../constants/errorMessages");
|
|
44
|
-
/**
|
|
45
|
-
* Loads the path to provardx-properties.json to the user directory ${user}/.sf/config.json
|
|
46
|
-
* So, that further any command can be run at any location by picking up the properties.json file
|
|
47
|
-
* from config.json file.
|
|
48
|
-
*
|
|
49
|
-
*/
|
|
50
|
-
core_1.Messages.importMessagesDirectory(__dirname);
|
|
51
|
-
const messages = core_1.Messages.loadMessages('@provartesting/provardx-cli', 'sf.provar.config.load');
|
|
52
|
-
class SfProvarConfigLoad extends sf_plugins_core_1.SfCommand {
|
|
53
|
-
constructor() {
|
|
54
|
-
super(...arguments);
|
|
55
|
-
this.errorHandler = new errorHandler_1.default();
|
|
56
|
-
}
|
|
57
|
-
async run() {
|
|
58
|
-
const { flags } = await this.parse(SfProvarConfigLoad);
|
|
59
|
-
/* eslint-disable */
|
|
60
|
-
const propertiesFileName = (0, path_1.resolve)(flags['properties-file']);
|
|
61
|
-
const propertyFileValidator = new propertyFileValidator_1.default(this.errorHandler);
|
|
62
|
-
const config = await provarConfig_1.ProvarConfig.loadConfig(this.errorHandler);
|
|
63
|
-
if (!fileSystem.existsSync(propertiesFileName)) {
|
|
64
|
-
this.errorHandler.addErrorsToList('INVALID_PATH', errorMessages_1.errorMessages.INVALID_PATH);
|
|
65
|
-
return (0, sfProvarCommandResult_1.populateResult)(flags, this.errorHandler, messages, this.log.bind(this));
|
|
66
|
-
}
|
|
67
|
-
config.set('PROVARDX_PROPERTIES_FILE_PATH', propertiesFileName);
|
|
68
|
-
await config.write();
|
|
69
|
-
if (!(await propertyFileValidator.validate())) {
|
|
70
|
-
config.unset('PROVARDX_PROPERTIES_FILE_PATH');
|
|
71
|
-
await config.write();
|
|
72
|
-
}
|
|
73
|
-
return (0, sfProvarCommandResult_1.populateResult)(flags, this.errorHandler, messages, this.log.bind(this));
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
SfProvarConfigLoad.summary = messages.getMessage('summary');
|
|
77
|
-
SfProvarConfigLoad.description = messages.getMessage('description');
|
|
78
|
-
SfProvarConfigLoad.examples = messages.getMessages('examples');
|
|
79
|
-
SfProvarConfigLoad.flags = {
|
|
80
|
-
'properties-file': sf_plugins_core_1.Flags.string({
|
|
81
|
-
summary: messages.getMessage('flags.properties-file.summary'),
|
|
82
|
-
char: 'p',
|
|
83
|
-
required: true,
|
|
84
|
-
}),
|
|
85
|
-
};
|
|
86
|
-
exports.default = SfProvarConfigLoad;
|
|
87
|
-
//# sourceMappingURL=load.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load.js","sourceRoot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AC;QAChE,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,IAAI,CAAC,CAAC,MAAM,qBAAqB,CAAC,QAAQ,EAAE,CAAC,EAAE;YAC7C,MAAM,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;YAC9C,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;SACtB;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;;AA/BsB,0BAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,AAAjC,CAAkC;AACzC,8BAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,AAArC,CAAsC;AACjD,2BAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,AAAnC,CAAoC;AAC5C,wBAAK,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;CACH,AAN2B,CAM1B;kBAViB,kBAAkB"}
|
|
@@ -1,117 +0,0 @@
|
|
|
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 fileSystem = __importStar(require("fs"));
|
|
36
|
-
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
37
|
-
const core_1 = require("@salesforce/core");
|
|
38
|
-
const sfProvarCommandResult_1 = require("../../../../Utility/sfProvarCommandResult");
|
|
39
|
-
const errorHandler_1 = __importDefault(require("../../../../Utility/errorHandler"));
|
|
40
|
-
const errorMessages_1 = require("../../../../constants/errorMessages");
|
|
41
|
-
const provarConfig_1 = require("../../../../Utility/provarConfig");
|
|
42
|
-
const jsonSupport_1 = require("../../../../Utility/jsonSupport");
|
|
43
|
-
/**
|
|
44
|
-
* Sets the specified property key and value inside provardx-properties.json
|
|
45
|
-
* loaded under config file
|
|
46
|
-
*
|
|
47
|
-
*/
|
|
48
|
-
core_1.Messages.importMessagesDirectory(__dirname);
|
|
49
|
-
const messages = core_1.Messages.loadMessages('@provartesting/provardx-cli', 'sf.provar.config.set');
|
|
50
|
-
class SfProvarConfigSet extends sf_plugins_core_1.SfCommand {
|
|
51
|
-
constructor() {
|
|
52
|
-
super(...arguments);
|
|
53
|
-
this.errorHandler = new errorHandler_1.default();
|
|
54
|
-
}
|
|
55
|
-
async run() {
|
|
56
|
-
const { argv, flags } = await this.parse(SfProvarConfigSet);
|
|
57
|
-
// eslint-disable-next-line
|
|
58
|
-
const config = await provarConfig_1.ProvarConfig.loadConfig(this.errorHandler);
|
|
59
|
-
const propertiesFilePath = config.get('PROVARDX_PROPERTIES_FILE_PATH')?.toString();
|
|
60
|
-
if (propertiesFilePath === undefined || !fileSystem.existsSync(propertiesFilePath)) {
|
|
61
|
-
this.errorHandler.addErrorsToList('MISSING_FILE', errorMessages_1.errorMessages.MISSINGFILEERROR);
|
|
62
|
-
return (0, sfProvarCommandResult_1.populateResult)(flags, this.errorHandler, messages, this.log.bind(this));
|
|
63
|
-
}
|
|
64
|
-
try {
|
|
65
|
-
/* eslint-disable */
|
|
66
|
-
const parsed = (0, sf_plugins_core_1.parseVarArgs)({}, argv);
|
|
67
|
-
if (Object.keys(parsed).length === 0) {
|
|
68
|
-
this.errorHandler.addErrorsToList('MISSING_PROPERTY', errorMessages_1.errorMessages.MISSING_PROPERTY);
|
|
69
|
-
return (0, sfProvarCommandResult_1.populateResult)(flags, this.errorHandler, messages, this.log.bind(this));
|
|
70
|
-
}
|
|
71
|
-
const data = fileSystem.readFileSync(propertiesFilePath, { encoding: 'utf8' });
|
|
72
|
-
const propertyFileContent = JSON.parse(data);
|
|
73
|
-
for (let [propertyName, propertyValue] of Object.entries(parsed)) {
|
|
74
|
-
if (!propertyValue) {
|
|
75
|
-
this.errorHandler.addErrorsToList('MISSING_VALUE', errorMessages_1.errorMessages.MISSING_VALUE);
|
|
76
|
-
}
|
|
77
|
-
if (propertyName.length < 1) {
|
|
78
|
-
this.errorHandler.addErrorsToList('MISSING_PROPERTY', errorMessages_1.errorMessages.MISSING_PROPERTY);
|
|
79
|
-
}
|
|
80
|
-
try {
|
|
81
|
-
propertyValue = (0, jsonSupport_1.parseJSONString)(propertyValue);
|
|
82
|
-
}
|
|
83
|
-
catch (err) {
|
|
84
|
-
this.errorHandler.addErrorsToList('INVALID_VALUE', errorMessages_1.errorMessages.INVALID_VALUE);
|
|
85
|
-
return (0, sfProvarCommandResult_1.populateResult)(flags, this.errorHandler, messages, this.log.bind(this));
|
|
86
|
-
}
|
|
87
|
-
if (propertyName.includes('.')) {
|
|
88
|
-
(0, jsonSupport_1.setNestedProperty)(propertyFileContent, propertyName, propertyValue);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
propertyFileContent[propertyName] = propertyValue;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
if (this.errorHandler.getErrors().length == 0) {
|
|
95
|
-
fileSystem.writeFileSync(propertiesFilePath, JSON.stringify(propertyFileContent, null, 3));
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
catch (err) {
|
|
99
|
-
if (err.name === 'InvalidArgumentFormatError') {
|
|
100
|
-
this.errorHandler.addErrorsToList('INVALID_ARGUMENT', errorMessages_1.errorMessages.INVALID_ARGUMENT);
|
|
101
|
-
}
|
|
102
|
-
else if (err.name === 'SyntaxError') {
|
|
103
|
-
this.errorHandler.addErrorsToList('MALFORMED_FILE', errorMessages_1.errorMessages.MALFORMEDFILEERROR);
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
throw err;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
return (0, sfProvarCommandResult_1.populateResult)(flags, this.errorHandler, messages, this.log.bind(this));
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
SfProvarConfigSet.summary = messages.getMessage('summary');
|
|
113
|
-
SfProvarConfigSet.description = messages.getMessage('description');
|
|
114
|
-
SfProvarConfigSet.examples = messages.getMessages('examples');
|
|
115
|
-
SfProvarConfigSet.strict = false;
|
|
116
|
-
exports.default = SfProvarConfigSet;
|
|
117
|
-
//# sourceMappingURL=set.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set.js","sourceRoot":"","sources":["../../../../../src/commands/sf/provar/config/set.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+CAAiC;AACjC,iEAAsE;AACtE,2CAA4C;AAC5C,qFAAkG;AAClG,oFAA4D;AAC5D,uEAAoE;AACpE,mEAAgE;AAChE,iEAAqF;AAErF;;;;GAIG;AAEH,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,6BAA6B,EAAE,sBAAsB,CAAC,CAAC;AAE9F,MAAqB,iBAAkB,SAAQ,2BAAgC;IAA/E;;QAMU,iBAAY,GAAG,IAAI,sBAAY,EAAE,CAAC;IAwD5C,CAAC;IAtDQ,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC5D,2BAA2B;QAC3B,MAAM,MAAM,GAAiB,MAAM,2BAAY,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9E,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC,EAAE,QAAQ,EAAE,CAAC;QAEnF,IAAI,kBAAkB,KAAK,SAAS,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE;YAClF,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,cAAc,EAAE,6BAAa,CAAC,gBAAgB,CAAC,CAAC;YAClF,OAAO,IAAA,sCAAc,EAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,G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W,CAAC,UAAU,CAAC,AAAnC,CAAoC;AAC5C,wBAAM,GAAG,KAAK,AAAR,CAAS;kBAJnB,iBAAiB"}
|
|
@@ -1,40 +0,0 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
13
|
-
const core_1 = require("@salesforce/core");
|
|
14
|
-
const errorHandler_1 = __importDefault(require("../../../../Utility/errorHandler"));
|
|
15
|
-
const sfProvarCommandResult_1 = require("../../../../Utility/sfProvarCommandResult");
|
|
16
|
-
const propertyFileValidator_1 = __importDefault(require("../../../../Utility/propertyFileValidator"));
|
|
17
|
-
/**
|
|
18
|
-
* Validates the provardx-properties.json against JSON standards and provardx schema
|
|
19
|
-
* mentioned under PropertyFileSchema.ts
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
core_1.Messages.importMessagesDirectory(__dirname);
|
|
23
|
-
const messages = core_1.Messages.loadMessages('@provartesting/provardx-cli', 'sf.provar.config.validate');
|
|
24
|
-
class SfProvarConfigValidate extends sf_plugins_core_1.SfCommand {
|
|
25
|
-
constructor() {
|
|
26
|
-
super(...arguments);
|
|
27
|
-
this.errorHandler = new errorHandler_1.default();
|
|
28
|
-
}
|
|
29
|
-
async run() {
|
|
30
|
-
const { flags } = await this.parse(SfProvarConfigValidate);
|
|
31
|
-
const propertyFileValidator = new propertyFileValidator_1.default(this.errorHandler);
|
|
32
|
-
await propertyFileValidator.validate();
|
|
33
|
-
return (0, sfProvarCommandResult_1.populateResult)(flags, this.errorHandler, messages, this.log.bind(this));
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
SfProvarConfigValidate.summary = messages.getMessage('summary');
|
|
37
|
-
SfProvarConfigValidate.description = messages.getMessage('description');
|
|
38
|
-
SfProvarConfigValidate.examples = messages.getMessages('examples');
|
|
39
|
-
exports.default = SfProvarConfigValidate;
|
|
40
|
-
//# sourceMappingURL=validate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../../src/commands/sf/provar/config/validate.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;AAEH,iEAAwD;AACxD,2CAA4C;AAC5C,oFAA4D;AAC5D,qFAAkG;AAClG,sGAA8E;AAE9E;;;;GAIG;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;;QAIU,iBAAY,GAAiB,IAAI,sBAAY,EAAE,CAAC;IAS1D,CAAC;IAPQ,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC3D,MAAM,qBAAqB,GAAG,IAAI,+BAAqB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3E,MAAM,qBAAqB,CAAC,QAAQ,EAAE,CAAC;QAEvC,OAAO,IAAA,sCAAc,EAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACjF,CAAC;;AAXsB,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;kBAHhD,sBAAsB"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"provarHome": "${PROVAR_HOME}",
|
|
3
|
-
"projectPath": "${PROVAR_PROJECT_PATH}",
|
|
4
|
-
"resultsPath": "${PROVAR_RESULTS_PATH}",
|
|
5
|
-
"smtpPath": "",
|
|
6
|
-
"resultsPathDisposition": "Increment",
|
|
7
|
-
"testOutputLevel": "BASIC",
|
|
8
|
-
"pluginOutputlevel": "WARNING",
|
|
9
|
-
"stopOnError": false,
|
|
10
|
-
"lightningMode": true,
|
|
11
|
-
"connectionRefreshType": "Reload",
|
|
12
|
-
"metadata": {
|
|
13
|
-
"metadataLevel": "Reuse",
|
|
14
|
-
"cachePath": "../.provarCaches"
|
|
15
|
-
},
|
|
16
|
-
"environment": {
|
|
17
|
-
"testEnvironment": "${PROVAR_TEST_ENVIRONMENT}",
|
|
18
|
-
"webBrowser": "Chrome",
|
|
19
|
-
"webBrowserConfig": "Full Screen",
|
|
20
|
-
"webBrowserProviderName": "Desktop",
|
|
21
|
-
"webBrowserDeviceName": "Full Screen"
|
|
22
|
-
},
|
|
23
|
-
"testprojectSecrets": "${PROVAR_TEST_PROJECT_SECRETS}"
|
|
24
|
-
}
|