@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.
- package/README.md +16 -0
- package/lib/Utility/errorCode.d.ts +1 -0
- package/lib/Utility/errorCode.js +9 -0
- package/lib/Utility/errorCode.js.map +1 -0
- package/lib/Utility/errorHandler.d.ts +15 -0
- package/lib/Utility/errorHandler.js +27 -0
- package/lib/Utility/errorHandler.js.map +1 -0
- package/lib/Utility/fileSupport.d.ts +6 -0
- package/lib/Utility/fileSupport.js +51 -0
- package/lib/Utility/fileSupport.js.map +1 -0
- package/lib/Utility/jsonSupport.d.ts +8 -0
- package/lib/Utility/jsonSupport.js +55 -0
- package/lib/Utility/jsonSupport.js.map +1 -0
- package/lib/Utility/propertyFileValidator.d.ts +13 -0
- package/lib/Utility/propertyFileValidator.js +103 -0
- package/lib/Utility/propertyFileValidator.js.map +1 -0
- package/lib/Utility/provarConfig.d.ts +11 -0
- package/lib/Utility/provarConfig.js +42 -0
- package/lib/Utility/provarConfig.js.map +1 -0
- package/lib/Utility/sfProvarCommandResult.d.ts +12 -0
- package/lib/Utility/sfProvarCommandResult.js +34 -0
- package/lib/Utility/sfProvarCommandResult.js.map +1 -0
- package/lib/Utility/stringSupport.d.ts +6 -0
- package/lib/Utility/stringSupport.js +32 -0
- package/lib/Utility/stringSupport.js.map +1 -0
- package/lib/commands/sf/provar/config/generate.d.ts +14 -0
- package/lib/commands/sf/provar/config/generate.js +102 -0
- package/lib/commands/sf/provar/config/generate.js.map +1 -0
- package/lib/commands/sf/provar/config/get.d.ts +10 -0
- package/lib/commands/sf/provar/config/get.js +106 -0
- package/lib/commands/sf/provar/config/get.js.map +1 -0
- package/lib/commands/sf/provar/config/load.d.ts +12 -0
- package/lib/commands/sf/provar/config/load.js +87 -0
- package/lib/commands/sf/provar/config/load.js.map +1 -0
- package/lib/commands/sf/provar/config/set.d.ts +10 -0
- package/lib/commands/sf/provar/config/set.js +117 -0
- package/lib/commands/sf/provar/config/set.js.map +1 -0
- package/lib/commands/sf/provar/config/validate.d.ts +9 -0
- package/lib/commands/sf/provar/config/validate.js +40 -0
- package/lib/commands/sf/provar/config/validate.js.map +1 -0
- package/lib/constants/commandConstants.d.ts +7 -0
- package/lib/constants/commandConstants.js +12 -0
- package/lib/constants/commandConstants.js.map +1 -0
- package/lib/constants/errorMessages.d.ts +13 -0
- package/lib/constants/errorMessages.js +24 -0
- package/lib/constants/errorMessages.js.map +1 -0
- package/lib/constants/propertyFileContent.json +24 -0
- package/lib/constants/propertyFileSchema.d.ts +247 -0
- package/lib/constants/propertyFileSchema.js +243 -0
- package/lib/constants/propertyFileSchema.js.map +1 -0
- package/messages/sf.provar.config.generate.md +33 -0
- package/messages/sf.provar.config.get.md +17 -0
- package/messages/sf.provar.config.load.md +29 -0
- package/messages/sf.provar.config.set.md +17 -0
- package/messages/sf.provar.config.validate.md +21 -0
- package/oclif.manifest.json +143 -0
- package/package.json +214 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.0.1",
|
|
3
|
+
"commands": {
|
|
4
|
+
"sf:provar:config:generate": {
|
|
5
|
+
"id": "sf:provar:config:generate",
|
|
6
|
+
"summary": "Summary of a command.",
|
|
7
|
+
"description": "Generate a boilerplate property file.",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"pluginName": "@provartesting/provardx-cli",
|
|
10
|
+
"pluginAlias": "@provartesting/provardx-cli",
|
|
11
|
+
"pluginType": "core",
|
|
12
|
+
"aliases": [],
|
|
13
|
+
"examples": [
|
|
14
|
+
"Generates the boiler plate properties.json at the given path :\n<%= config.bin %> <%= command.id %> --properties-file 'propertiesFile path'"
|
|
15
|
+
],
|
|
16
|
+
"flags": {
|
|
17
|
+
"json": {
|
|
18
|
+
"name": "json",
|
|
19
|
+
"type": "boolean",
|
|
20
|
+
"description": "Format output as json.",
|
|
21
|
+
"helpGroup": "GLOBAL",
|
|
22
|
+
"allowNo": false
|
|
23
|
+
},
|
|
24
|
+
"properties-file": {
|
|
25
|
+
"name": "properties-file",
|
|
26
|
+
"type": "option",
|
|
27
|
+
"char": "p",
|
|
28
|
+
"summary": "Provardx-properties file path.",
|
|
29
|
+
"required": true,
|
|
30
|
+
"multiple": false
|
|
31
|
+
},
|
|
32
|
+
"no-prompt": {
|
|
33
|
+
"name": "no-prompt",
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"char": "n",
|
|
36
|
+
"summary": "Don't prompt to confirm overwriting of the properties file if it already exists and overwrite it by default.",
|
|
37
|
+
"allowNo": false
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"args": {}
|
|
41
|
+
},
|
|
42
|
+
"sf:provar:config:get": {
|
|
43
|
+
"id": "sf:provar:config:get",
|
|
44
|
+
"summary": "getting values for different properties inside dx properties.json",
|
|
45
|
+
"description": "Getting values for different properties inside PROPERTIES_FILE_PATH loaded under .sf/config.json file",
|
|
46
|
+
"strict": false,
|
|
47
|
+
"pluginName": "@provartesting/provardx-cli",
|
|
48
|
+
"pluginAlias": "@provartesting/provardx-cli",
|
|
49
|
+
"pluginType": "core",
|
|
50
|
+
"aliases": [],
|
|
51
|
+
"examples": [
|
|
52
|
+
"gets the value for the provided property as a key from properties.json loaded inside config.json\n<%= config.bin %> <%= command.id %> 'key'"
|
|
53
|
+
],
|
|
54
|
+
"flags": {
|
|
55
|
+
"json": {
|
|
56
|
+
"name": "json",
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"description": "Format output as json.",
|
|
59
|
+
"helpGroup": "GLOBAL",
|
|
60
|
+
"allowNo": false
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"args": {}
|
|
64
|
+
},
|
|
65
|
+
"sf:provar:config:load": {
|
|
66
|
+
"id": "sf:provar:config:load",
|
|
67
|
+
"summary": "Loading provardx-properties.json into system environment variables.",
|
|
68
|
+
"description": "Loading after internally validating the provardx-properties.json file generated via config generate command",
|
|
69
|
+
"strict": true,
|
|
70
|
+
"pluginName": "@provartesting/provardx-cli",
|
|
71
|
+
"pluginAlias": "@provartesting/provardx-cli",
|
|
72
|
+
"pluginType": "core",
|
|
73
|
+
"aliases": [],
|
|
74
|
+
"examples": [
|
|
75
|
+
"loads the properties.json at the given path\n<%= config.bin %> <%= command.id %> --properties-file 'propertiesFile path'"
|
|
76
|
+
],
|
|
77
|
+
"flags": {
|
|
78
|
+
"json": {
|
|
79
|
+
"name": "json",
|
|
80
|
+
"type": "boolean",
|
|
81
|
+
"description": "Format output as json.",
|
|
82
|
+
"helpGroup": "GLOBAL",
|
|
83
|
+
"allowNo": false
|
|
84
|
+
},
|
|
85
|
+
"properties-file": {
|
|
86
|
+
"name": "properties-file",
|
|
87
|
+
"type": "option",
|
|
88
|
+
"char": "p",
|
|
89
|
+
"summary": "Path of the properties file to be loaded.",
|
|
90
|
+
"required": true,
|
|
91
|
+
"multiple": false
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"args": {}
|
|
95
|
+
},
|
|
96
|
+
"sf:provar:config:set": {
|
|
97
|
+
"id": "sf:provar:config:set",
|
|
98
|
+
"summary": "Setting different properties inside dx-properties.json",
|
|
99
|
+
"description": "Setting different properties inside dx-properties.json loaded under .sf/config.json file",
|
|
100
|
+
"strict": false,
|
|
101
|
+
"pluginName": "@provartesting/provardx-cli",
|
|
102
|
+
"pluginAlias": "@provartesting/provardx-cli",
|
|
103
|
+
"pluginType": "core",
|
|
104
|
+
"aliases": [],
|
|
105
|
+
"examples": [
|
|
106
|
+
"sets the provided properties with resp. values as key=value in properties.json\n<%= config.bin %> <%= command.id %> 'key'='value'"
|
|
107
|
+
],
|
|
108
|
+
"flags": {
|
|
109
|
+
"json": {
|
|
110
|
+
"name": "json",
|
|
111
|
+
"type": "boolean",
|
|
112
|
+
"description": "Format output as json.",
|
|
113
|
+
"helpGroup": "GLOBAL",
|
|
114
|
+
"allowNo": false
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"args": {}
|
|
118
|
+
},
|
|
119
|
+
"sf:provar:config:validate": {
|
|
120
|
+
"id": "sf:provar:config:validate",
|
|
121
|
+
"summary": "Validate the loaded provardx-properties.json against schema.",
|
|
122
|
+
"description": "Validating provardx-properties.json against the schema for all the needed properties with their expected values.",
|
|
123
|
+
"strict": true,
|
|
124
|
+
"pluginName": "@provartesting/provardx-cli",
|
|
125
|
+
"pluginAlias": "@provartesting/provardx-cli",
|
|
126
|
+
"pluginType": "core",
|
|
127
|
+
"aliases": [],
|
|
128
|
+
"examples": [
|
|
129
|
+
"Validate the loaded provardx-properties.json loaded under environment variables :\n<%= config.bin %> <%= command.id %>'"
|
|
130
|
+
],
|
|
131
|
+
"flags": {
|
|
132
|
+
"json": {
|
|
133
|
+
"name": "json",
|
|
134
|
+
"type": "boolean",
|
|
135
|
+
"description": "Format output as json.",
|
|
136
|
+
"helpGroup": "GLOBAL",
|
|
137
|
+
"allowNo": false
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"args": {}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@provartesting/provardx-cli",
|
|
3
|
+
"description": "A plugin for the Salesforce CLI to orchestrate testing activities and report quality metrics to Provar Manager",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@oclif/core": "^2.11.8",
|
|
7
|
+
"@salesforce/core": "^5.2.10",
|
|
8
|
+
"@salesforce/kit": "^3.0.14",
|
|
9
|
+
"@salesforce/sf-plugins-core": "^3.1.14",
|
|
10
|
+
"mochawesome": "^7.1.3",
|
|
11
|
+
"jsonschema": "^1.4.1",
|
|
12
|
+
"tslib": "^2"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@salesforce/cli-plugins-testkit": "^5.0.2",
|
|
16
|
+
"@salesforce/dev-config": "^4.0.1",
|
|
17
|
+
"@salesforce/dev-scripts": "^5.7.0",
|
|
18
|
+
"@salesforce/prettier-config": "^0.0.3",
|
|
19
|
+
"@salesforce/ts-sinon": "^1.4.18",
|
|
20
|
+
"@swc/core": "^1.3.19",
|
|
21
|
+
"@types/chai": "^4.3.10",
|
|
22
|
+
"@types/inquirer": "^9.0.3",
|
|
23
|
+
"@types/mocha": "^10.0.4",
|
|
24
|
+
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
25
|
+
"@typescript-eslint/parser": "^5.62.0",
|
|
26
|
+
"chai": "^4.3.10",
|
|
27
|
+
"eslint": "^8.50.0",
|
|
28
|
+
"eslint-config-prettier": "^8.5.0",
|
|
29
|
+
"eslint-config-salesforce": "^2.0.2",
|
|
30
|
+
"eslint-config-salesforce-typescript": "^1.1.2",
|
|
31
|
+
"eslint-plugin-import": "2.28.1",
|
|
32
|
+
"eslint-plugin-jsdoc": "^46.4.6",
|
|
33
|
+
"eslint-plugin-sf-plugin": "^1.16.2",
|
|
34
|
+
"husky": "^7.0.4",
|
|
35
|
+
"mocha": "^9.2.2",
|
|
36
|
+
"nyc": "^15.1.0",
|
|
37
|
+
"oclif": "^3.17.2",
|
|
38
|
+
"prettier": "^2.8.8",
|
|
39
|
+
"pretty-quick": "^3.1.3",
|
|
40
|
+
"shx": "0.3.4",
|
|
41
|
+
"sinon": "10.0.0",
|
|
42
|
+
"ts-node": "^10.9.1",
|
|
43
|
+
"typescript": "^5.1.6",
|
|
44
|
+
"wireit": "^0.14.0"
|
|
45
|
+
},
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=16.0.0"
|
|
48
|
+
},
|
|
49
|
+
"files": [
|
|
50
|
+
"/lib",
|
|
51
|
+
"/messages",
|
|
52
|
+
"/oclif.manifest.json"
|
|
53
|
+
],
|
|
54
|
+
"keywords": [
|
|
55
|
+
"force",
|
|
56
|
+
"salesforce",
|
|
57
|
+
"sfdx",
|
|
58
|
+
"salesforcedx",
|
|
59
|
+
"sfdx-plugin",
|
|
60
|
+
"sf-plugin",
|
|
61
|
+
"sf"
|
|
62
|
+
],
|
|
63
|
+
"license": "BSD-3-Clause",
|
|
64
|
+
"main": "lib/index.js",
|
|
65
|
+
"oclif": {
|
|
66
|
+
"commands": "./lib/commands",
|
|
67
|
+
"bin": "sf",
|
|
68
|
+
"topicSeparator": " ",
|
|
69
|
+
"devPlugins": [
|
|
70
|
+
"@oclif/plugin-help"
|
|
71
|
+
],
|
|
72
|
+
"topics": {
|
|
73
|
+
"sf": {
|
|
74
|
+
"description": "commands to automate salesforce",
|
|
75
|
+
"subtopics": {
|
|
76
|
+
"provar": {
|
|
77
|
+
"description": "commands to manipulate properties file & automate salesforce using provardx",
|
|
78
|
+
"subtopics": {
|
|
79
|
+
"config": {
|
|
80
|
+
"description": "commands to generate and manipulate provardx-properties file"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"scripts": {
|
|
89
|
+
"build": "wireit",
|
|
90
|
+
"clean": "sf-clean",
|
|
91
|
+
"clean-all": "sf-clean all",
|
|
92
|
+
"clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
|
|
93
|
+
"compile": "wireit",
|
|
94
|
+
"docs": "sf-docs",
|
|
95
|
+
"format": "wireit",
|
|
96
|
+
"lint": "wireit",
|
|
97
|
+
"postinstall": "yarn husky install",
|
|
98
|
+
"postpack": "shx rm -f oclif.manifest.json",
|
|
99
|
+
"prepack": "sf-prepack",
|
|
100
|
+
"test": "wireit",
|
|
101
|
+
"test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --reporter mochawesome",
|
|
102
|
+
"test:only": "wireit",
|
|
103
|
+
"version": "oclif readme"
|
|
104
|
+
},
|
|
105
|
+
"publishConfig": {
|
|
106
|
+
"access": "public"
|
|
107
|
+
},
|
|
108
|
+
"wireit": {
|
|
109
|
+
"build": {
|
|
110
|
+
"dependencies": [
|
|
111
|
+
"compile",
|
|
112
|
+
"lint"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"compile": {
|
|
116
|
+
"command": "tsc -p . --pretty --incremental",
|
|
117
|
+
"files": [
|
|
118
|
+
"src/**/*.ts",
|
|
119
|
+
"**/tsconfig.json",
|
|
120
|
+
"messages/**"
|
|
121
|
+
],
|
|
122
|
+
"output": [
|
|
123
|
+
"lib/**",
|
|
124
|
+
"*.tsbuildinfo"
|
|
125
|
+
],
|
|
126
|
+
"clean": "if-file-deleted"
|
|
127
|
+
},
|
|
128
|
+
"format": {
|
|
129
|
+
"command": "prettier --write \"+(src|test|schemas)/**/*.+(ts|js|json)|command-snapshot.json\"",
|
|
130
|
+
"files": [
|
|
131
|
+
"src/**/*.ts",
|
|
132
|
+
"test/**/*.ts",
|
|
133
|
+
"schemas/**/*.json",
|
|
134
|
+
"command-snapshot.json",
|
|
135
|
+
".prettier*"
|
|
136
|
+
],
|
|
137
|
+
"output": []
|
|
138
|
+
},
|
|
139
|
+
"lint": {
|
|
140
|
+
"command": "eslint src test --color --cache --cache-location .eslintcache",
|
|
141
|
+
"files": [
|
|
142
|
+
"src/**/*.ts",
|
|
143
|
+
"test/**/*.ts",
|
|
144
|
+
"messages/**",
|
|
145
|
+
"**/.eslint*",
|
|
146
|
+
"**/tsconfig.json"
|
|
147
|
+
],
|
|
148
|
+
"output": []
|
|
149
|
+
},
|
|
150
|
+
"test:compile": {
|
|
151
|
+
"command": "tsc -p \"./test\" --pretty ",
|
|
152
|
+
"files": [
|
|
153
|
+
"test/**/*.ts"
|
|
154
|
+
],
|
|
155
|
+
"output": []
|
|
156
|
+
},
|
|
157
|
+
"test": {
|
|
158
|
+
"dependencies": [
|
|
159
|
+
"test:compile",
|
|
160
|
+
"test:only",
|
|
161
|
+
"lint"
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
"test:only": {
|
|
165
|
+
"command": "nyc mocha \"test/**/*.test.ts\"",
|
|
166
|
+
"env": {
|
|
167
|
+
"FORCE_COLOR": "2"
|
|
168
|
+
},
|
|
169
|
+
"files": [
|
|
170
|
+
"test/**/*.ts",
|
|
171
|
+
"src/**/*.ts",
|
|
172
|
+
"**/tsconfig.json",
|
|
173
|
+
".mocha*",
|
|
174
|
+
"!*.nut.ts",
|
|
175
|
+
".nycrc"
|
|
176
|
+
],
|
|
177
|
+
"output": []
|
|
178
|
+
},
|
|
179
|
+
"test:command-reference": {
|
|
180
|
+
"command": "\"./bin/dev\" commandreference:generate --erroronwarnings",
|
|
181
|
+
"files": [
|
|
182
|
+
"src/**/*.ts",
|
|
183
|
+
"messages/**",
|
|
184
|
+
"package.json"
|
|
185
|
+
],
|
|
186
|
+
"output": [
|
|
187
|
+
"tmp/root"
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
"test:deprecation-policy": {
|
|
191
|
+
"command": "\"./bin/dev\" snapshot:compare",
|
|
192
|
+
"files": [
|
|
193
|
+
"src/**/*.ts"
|
|
194
|
+
],
|
|
195
|
+
"output": [],
|
|
196
|
+
"dependencies": [
|
|
197
|
+
"compile"
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
"test:json-schema": {
|
|
201
|
+
"command": "\"./bin/dev\" schema:compare",
|
|
202
|
+
"files": [
|
|
203
|
+
"src/**/*.ts",
|
|
204
|
+
"schemas"
|
|
205
|
+
],
|
|
206
|
+
"output": []
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"author": "Palak Bansal",
|
|
210
|
+
"directories": {
|
|
211
|
+
"lib": "lib",
|
|
212
|
+
"test": "test"
|
|
213
|
+
}
|
|
214
|
+
}
|