slnodejs 6.1.1163 → 6.2.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 +1 -1
- package/browser-agent/dist/browser-agent-all.js +16 -7
- package/browser-agent/dist/browser-agent-all.min.js +2 -2
- package/package.json +4 -2
- package/tsOutputs/build-scanner/js_diff/dry-run-files-mapping.js +8 -2
- package/tsOutputs/build-scanner/js_diff/dry-run-files-mapping.js.map +1 -1
- package/tsOutputs/build-scanner/js_diff/files-mapping.js +9 -2
- package/tsOutputs/build-scanner/js_diff/files-mapping.js.map +1 -1
- package/tsOutputs/cli-parse/cli.js +123 -333
- package/tsOutputs/cli-parse/cli.js.map +1 -1
- package/tsOutputs/cli-parse/config/config-resolver.js +175 -0
- package/tsOutputs/cli-parse/config/config-resolver.js.map +1 -0
- package/tsOutputs/cli-parse/config/config-store.js +40 -0
- package/tsOutputs/cli-parse/config/config-store.js.map +1 -0
- package/tsOutputs/cli-parse/config/create-options-from-keys.js +161 -0
- package/tsOutputs/cli-parse/config/create-options-from-keys.js.map +1 -0
- package/tsOutputs/cli-parse/config/keys/common-keys.js +183 -0
- package/tsOutputs/cli-parse/config/keys/common-keys.js.map +1 -0
- package/tsOutputs/cli-parse/config/keys/component-management-commands-keys.js +21 -0
- package/tsOutputs/cli-parse/config/keys/component-management-commands-keys.js.map +1 -0
- package/tsOutputs/cli-parse/config/keys/config-command-keys.js +16 -0
- package/tsOutputs/cli-parse/config/keys/config-command-keys.js.map +1 -0
- package/tsOutputs/cli-parse/config/keys/dry-run-command-keys.js +59 -0
- package/tsOutputs/cli-parse/config/keys/dry-run-command-keys.js.map +1 -0
- package/tsOutputs/cli-parse/config/keys/end-execution-command-keys.js +9 -0
- package/tsOutputs/cli-parse/config/keys/end-execution-command-keys.js.map +1 -0
- package/tsOutputs/cli-parse/config/keys/instrument-command-keys.js +146 -0
- package/tsOutputs/cli-parse/config/keys/instrument-command-keys.js.map +1 -0
- package/tsOutputs/cli-parse/config/keys/nyc-report-command-keys.js +11 -0
- package/tsOutputs/cli-parse/config/keys/nyc-report-command-keys.js.map +1 -0
- package/tsOutputs/cli-parse/config/keys/pr-config-command-keys.js +32 -0
- package/tsOutputs/cli-parse/config/keys/pr-config-command-keys.js.map +1 -0
- package/tsOutputs/cli-parse/config/keys/scan-command-keys.js +236 -0
- package/tsOutputs/cli-parse/config/keys/scan-command-keys.js.map +1 -0
- package/tsOutputs/cli-parse/config/keys/scanned-command-keys.js +16 -0
- package/tsOutputs/cli-parse/config/keys/scanned-command-keys.js.map +1 -0
- package/tsOutputs/cli-parse/config/keys/start-execution-command-keys.js +9 -0
- package/tsOutputs/cli-parse/config/keys/start-execution-command-keys.js.map +1 -0
- package/tsOutputs/cli-parse/config/keys/test-listener-commands-keys.js +86 -0
- package/tsOutputs/cli-parse/config/keys/test-listener-commands-keys.js.map +1 -0
- package/tsOutputs/cli-parse/config/keys/upload-reports-command-keys.js +38 -0
- package/tsOutputs/cli-parse/config/keys/upload-reports-command-keys.js.map +1 -0
- package/tsOutputs/cli-parse/config/migration/agent-config-bridge.js +44 -0
- package/tsOutputs/cli-parse/config/migration/agent-config-bridge.js.map +1 -0
- package/tsOutputs/cli-parse/config/migration/legacy-adapters.js +157 -0
- package/tsOutputs/cli-parse/config/migration/legacy-adapters.js.map +1 -0
- package/tsOutputs/cli-parse/config/schema.js +63 -0
- package/tsOutputs/cli-parse/config/schema.js.map +1 -0
- package/tsOutputs/cli-parse/config/source-adapters/base-source-adapter.js +53 -0
- package/tsOutputs/cli-parse/config/source-adapters/base-source-adapter.js.map +1 -0
- package/tsOutputs/cli-parse/config/source-adapters/cli-source-adapter.js +27 -0
- package/tsOutputs/cli-parse/config/source-adapters/cli-source-adapter.js.map +1 -0
- package/tsOutputs/cli-parse/config/source-adapters/env-source-adapter.js +27 -0
- package/tsOutputs/cli-parse/config/source-adapters/env-source-adapter.js.map +1 -0
- package/tsOutputs/cli-parse/config/source-adapters/json-file-source-adapter.js +33 -0
- package/tsOutputs/cli-parse/config/source-adapters/json-file-source-adapter.js.map +1 -0
- package/tsOutputs/cli-parse/config/source-adapters/remote-source-adapter.js +27 -0
- package/tsOutputs/cli-parse/config/source-adapters/remote-source-adapter.js.map +1 -0
- package/tsOutputs/cli-parse/config/transformers.js +13 -0
- package/tsOutputs/cli-parse/config/transformers.js.map +1 -0
- package/tsOutputs/cli-parse/config/validation-error.js +40 -0
- package/tsOutputs/cli-parse/config/validation-error.js.map +1 -0
- package/tsOutputs/cli-parse/contracts.d.ts +6 -1
- package/tsOutputs/cli-parse/contracts.js +5 -0
- package/tsOutputs/cli-parse/contracts.js.map +1 -1
- package/tsOutputs/cli-parse/custom-commander.js +2 -18
- package/tsOutputs/cli-parse/custom-commander.js.map +1 -1
- package/tsOutputs/cli-parse/executors/base-executor.js +117 -117
- package/tsOutputs/cli-parse/executors/base-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-end-executor.js +22 -24
- package/tsOutputs/cli-parse/executors/build-end-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/build-executor.js +73 -251
- package/tsOutputs/cli-parse/executors/build-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/config-executor.js +21 -19
- package/tsOutputs/cli-parse/executors/config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js +18 -58
- package/tsOutputs/cli-parse/executors/dry-run/dry-run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/end-execution-executor.js +17 -14
- package/tsOutputs/cli-parse/executors/end-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/instrument-executor.js +24 -93
- package/tsOutputs/cli-parse/executors/instrument-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js +13 -7
- package/tsOutputs/cli-parse/executors/integration-build-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js +2 -3
- package/tsOutputs/cli-parse/executors/integration-build-delete-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js +5 -2
- package/tsOutputs/cli-parse/executors/integration-build-update-components-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/mocha-executor.js +25 -6
- package/tsOutputs/cli-parse/executors/mocha-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js +9 -12
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/pr-config-executor.js +17 -6
- package/tsOutputs/cli-parse/executors/pr-config-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/run-executor.js +15 -15
- package/tsOutputs/cli-parse/executors/run-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/start-execution-executor.js +21 -18
- package/tsOutputs/cli-parse/executors/start-execution-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-executions-executor.js +2 -2
- package/tsOutputs/cli-parse/executors/test-executions-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/test-listener-executor.js +29 -40
- package/tsOutputs/cli-parse/executors/test-listener-executor.js.map +1 -1
- package/tsOutputs/cli-parse/executors/upload-report-executor.js +28 -22
- package/tsOutputs/cli-parse/executors/upload-report-executor.js.map +1 -1
- package/tsOutputs/common/config-process/index.js +3 -3
- package/tsOutputs/common/config-process/index.js.map +1 -1
- package/tsOutputs/common/constants/sl-env-vars.d.ts +2 -0
- package/tsOutputs/common/constants/sl-env-vars.js +4 -0
- package/tsOutputs/common/constants/sl-env-vars.js.map +1 -1
- package/tsOutputs/common/http/backend-proxy.js +2 -2
- package/tsOutputs/common/http/backend-proxy.js.map +1 -1
- package/tsOutputs/common/http/contracts.d.ts +5 -2
- package/tsOutputs/common/http/contracts.js.map +1 -1
- package/tsOutputs/common/ignored-files-handler.d.ts +1 -1
- package/tsOutputs/common/ignored-files-handler.js +6 -1
- package/tsOutputs/common/ignored-files-handler.js.map +1 -1
- package/tsOutputs/common/utils/test-runner-build-session-data-builder.d.ts +2 -2
- package/tsOutputs/common/utils/test-runner-build-session-data-builder.js.map +1 -1
- package/tsOutputs/messages/message-keys.generated.js +1 -1
|
@@ -9,7 +9,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const custom_commander_1 = require("./custom-commander");
|
|
13
12
|
const config_executor_1 = require("./executors/config-executor");
|
|
14
13
|
const pr_config_executor_1 = require("./executors/pr-config-executor");
|
|
15
14
|
const build_executor_1 = require("./executors/build-executor");
|
|
@@ -23,14 +22,29 @@ const integration_build_update_components_executor_1 = require("./executors/inte
|
|
|
23
22
|
const integration_build_delete_components_executor_1 = require("./executors/integration-build-delete-components-executor");
|
|
24
23
|
const build_end_executor_1 = require("./executors/build-end-executor");
|
|
25
24
|
const dry_run_executor_1 = require("./executors/dry-run/dry-run-executor");
|
|
26
|
-
const constants_1 = require("./constants/constants");
|
|
27
25
|
const logger_1 = require("../common/logger");
|
|
28
26
|
const contracts_1 = require("./contracts");
|
|
29
27
|
const instrument_executor_1 = require("./executors/instrument-executor");
|
|
30
|
-
const common_1 = require("../common");
|
|
31
28
|
const process_spawn_helper_1 = require("../common/utils/process-spawn-helper");
|
|
32
29
|
const utils_1 = require("./utils");
|
|
30
|
+
const create_options_from_keys_1 = require("./config/create-options-from-keys");
|
|
31
|
+
const config_command_keys_1 = require("./config/keys/config-command-keys");
|
|
32
|
+
const scan_command_keys_1 = require("./config/keys/scan-command-keys");
|
|
33
|
+
const instrument_command_keys_1 = require("./config/keys/instrument-command-keys");
|
|
34
|
+
const test_listener_commands_keys_1 = require("./config/keys/test-listener-commands-keys");
|
|
35
|
+
const start_execution_command_keys_1 = require("./config/keys/start-execution-command-keys");
|
|
36
|
+
const end_execution_command_keys_1 = require("./config/keys/end-execution-command-keys");
|
|
37
|
+
const upload_reports_command_keys_1 = require("./config/keys/upload-reports-command-keys");
|
|
38
|
+
const nyc_report_command_keys_1 = require("./config/keys/nyc-report-command-keys");
|
|
39
|
+
const dry_run_command_keys_1 = require("./config/keys/dry-run-command-keys");
|
|
40
|
+
const pr_config_command_keys_1 = require("./config/keys/pr-config-command-keys");
|
|
41
|
+
const scanned_command_keys_1 = require("./config/keys/scanned-command-keys");
|
|
42
|
+
const component_management_commands_keys_1 = require("./config/keys/component-management-commands-keys");
|
|
43
|
+
const custom_commander_1 = require("./custom-commander");
|
|
33
44
|
const logger = logger_1.LoggerFactory.getCreateApplicationLogger();
|
|
45
|
+
/**
|
|
46
|
+
* Deprecated. Use schemas defined in cli-parse/config instead.
|
|
47
|
+
*/
|
|
34
48
|
const options = {
|
|
35
49
|
token: 'Token (mandatory if tokenfile is not provided). case-sensitive.',
|
|
36
50
|
tokenfile: 'Token File (mandatory if token is not provided). case-sensitive. default: sltoken.txt',
|
|
@@ -148,287 +162,99 @@ const options = {
|
|
|
148
162
|
};
|
|
149
163
|
const customCommander = new custom_commander_1.CustomCommander();
|
|
150
164
|
const program = customCommander.getCommander();
|
|
151
|
-
program
|
|
152
|
-
.command(contracts_1.COMMANDS.CONFIG)
|
|
153
|
-
.description('Create a buildSessionId')
|
|
154
|
-
.option('--tokenfile <tokenfile>', options.tokenfile, 'sltoken.txt')
|
|
155
|
-
.option('--token <token>', options.token)
|
|
156
|
-
.requiredOption('--appname <appname>', options.appname)
|
|
157
|
-
.requiredOption('--branch <branch>', options.branch)
|
|
158
|
-
.requiredOption('--build <build>', options.build)
|
|
159
|
-
.option('--buildsessionid <buildsessionid>', options.userDefinedBuildSessionId)
|
|
160
|
-
.option('--buildsessionidfile <buildsessionidfile>', options.buildsessionidfile)
|
|
161
|
-
.option('--proxy <proxy>', options.proxy)
|
|
162
|
-
.option('--overrideServer <overrideServer>', options.overrideServer)
|
|
163
|
-
.option('--failbuild <failbuild>', options.failbuild, false)
|
|
164
|
-
.option('--skipUpgrade', options.skipUpgrade, booleanOption, false)
|
|
165
|
-
.option('--beControlledVersions', options.beControlledVersions, booleanOption, false)
|
|
166
|
-
.action(function (cmd) {
|
|
165
|
+
(0, create_options_from_keys_1.createOptionsFromKeys)(program.command(contracts_1.COMMANDS.CONFIG).description('Create a buildSessionId'), config_command_keys_1.configCommandKeys).action(function (cmd) {
|
|
167
166
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
167
|
yield new config_executor_1.ConfigExecutor().execute(cmd);
|
|
169
168
|
});
|
|
170
169
|
});
|
|
171
|
-
program
|
|
170
|
+
(0, create_options_from_keys_1.createOptionsFromKeys)(program
|
|
172
171
|
.command(contracts_1.COMMANDS.PR_CONFIG)
|
|
173
|
-
.description('Create a buildSessionId for pull request integration')
|
|
174
|
-
.option('--tokenfile <tokenfile>', options.tokenfile, 'sltoken.txt')
|
|
175
|
-
.option('--token <token>', options.token)
|
|
176
|
-
.requiredOption('--appname <appname>', options.appname)
|
|
177
|
-
.requiredOption('--targetBranch <targetBranch>', options.targetBranch)
|
|
178
|
-
.requiredOption('--latestCommit <latestCommit>', options.latestCommit)
|
|
179
|
-
.requiredOption('--pullRequestNumber <pullRequestNumber>', options.pullRequestNumber)
|
|
180
|
-
.requiredOption('--repositoryUrl <repositoryUrl>', options.repositoryUrl)
|
|
181
|
-
.option('--branch <branch>', options.branch)
|
|
182
|
-
.option('--build <build>', options.build)
|
|
183
|
-
.option('--proxy <proxy>', options.proxy)
|
|
184
|
-
.option('--overrideServer <overrideServer>', options.overrideServer)
|
|
185
|
-
.option('--buildsessionidfile <buildsessionidfile>', options.buildsessionidfile)
|
|
186
|
-
.option('--failbuild <failbuild>', options.failbuild, false)
|
|
187
|
-
.option('--skipUpgrade', options.skipUpgrade, booleanOption, false)
|
|
188
|
-
.action(function (cmd) {
|
|
172
|
+
.description('Create a buildSessionId for pull request integration'), pr_config_command_keys_1.prConfigCommandKeys).action(function (cmd) {
|
|
189
173
|
return __awaiter(this, void 0, void 0, function* () {
|
|
190
174
|
yield new pr_config_executor_1.PRConfigExecutor().execute(cmd);
|
|
191
175
|
});
|
|
192
176
|
});
|
|
193
|
-
|
|
194
|
-
.
|
|
195
|
-
.
|
|
196
|
-
.option('--distfolderpath <workspacepath>', options.distfolderpath)
|
|
197
|
-
.option('--distpath <workspacepath>', options.distpath)
|
|
198
|
-
.option('--distributablepath <workspacepath>', options.distributablepath)
|
|
199
|
-
.option('--es6Modules', options.es6Modules)
|
|
200
|
-
.option('--ctxPropagationOnly', options.ctxPropagationOnly, false)
|
|
201
|
-
.option('--delayShutdownInSeconds <n>', options.delayShutdownInSeconds, parseInt)
|
|
202
|
-
.option('-o, --outputPath <path>', options.outputpath)
|
|
203
|
-
.option('--babylonPlugins <plugins>', options.babylonPlugins, csvToArray)
|
|
204
|
-
.option('-p, --projectRoot <path>', options.projectRoot)
|
|
205
|
-
.option('--labid <id>', options.labid)
|
|
206
|
-
.option('--collectorUrl <url>', options.collectorUrl)
|
|
207
|
-
.option('--footprintsMapping <type>', options.footprintsMapping, common_1.FootprintsMapping.AGENT)
|
|
208
|
-
.option('--enableOpenTelemetry', options.enableOpenTelemetry)
|
|
209
|
-
.option('--no-reduceFileSize', options.reduceFileSize)
|
|
210
|
-
.option('--allowCORS', options.allowCORS)
|
|
211
|
-
.option('--excludeTokenFromBrowserConfig', options.excludeTokenFromBrowserConfig)
|
|
212
|
-
.option('--splitPreambleIntoFile', options.splitPreambleIntoFile, false)
|
|
213
|
-
.option('--preambleFileName <preambleFileName>', options.preambleFileName)
|
|
214
|
-
.option('--preambleFileUrl <preambleFileUrl>', options.preambleFileUrl)
|
|
215
|
-
.option('--toggleBasedBrowserInstrumentation', options.toggleBasedBrowserInstrumentation, false)
|
|
216
|
-
.option('--allowedDomains <allowedDomains>', options.allowedDomains)
|
|
217
|
-
.action(function (cmd) {
|
|
177
|
+
(0, create_options_from_keys_1.createOptionsFromKeys)(program
|
|
178
|
+
.command(contracts_1.COMMANDS.INSTRUMENT)
|
|
179
|
+
.description('Instrument the javascript for working with the browser test listener.'), instrument_command_keys_1.instrumentCommandKeys).action(function (cmd) {
|
|
218
180
|
return __awaiter(this, void 0, void 0, function* () {
|
|
219
181
|
yield new instrument_executor_1.InstrumentExecutor().execute(cmd);
|
|
220
182
|
});
|
|
221
183
|
});
|
|
222
|
-
function createBuildOptions(
|
|
223
|
-
return (
|
|
224
|
-
.description(description)
|
|
225
|
-
.option('--workspacepath <workspacepath>', options.workspacepath)
|
|
226
|
-
.option('--distfolderpath <workspacepath>', options.distfolderpath)
|
|
227
|
-
.option('--distpath <workspacepath>', options.distpath)
|
|
228
|
-
.option('--distributablepath <workspacepath>', options.distributablepath)
|
|
229
|
-
.option('--scm <scm>', options.scm)
|
|
230
|
-
.option('--usebranchcoverage [usebranchcoverage]', options.usebranchcoverage, booleanOption, false)
|
|
231
|
-
.option('--excludedpaths <excludedpaths>', options.excludedpaths)
|
|
232
|
-
.option('--jobName <jobName>', options.jobName)
|
|
233
|
-
.option('--logsUrl <logsUrl>', options.logsUrl)
|
|
234
|
-
.option('--commit <commit>', options.commit)
|
|
235
|
-
.option('--dependency <dependency>', options.dependency, csvToArray)
|
|
236
|
-
.option('-d, --dependenciesFile <dependenciesFile>', options.dependenciesFile)
|
|
237
|
-
.option('--recursive', 'recursive', true)
|
|
238
|
-
.option('--instrumentForBrowsers', options.instrumentForBrowsers, false)
|
|
239
|
-
.option('--ctxPropagationOnly', options.ctxPropagationOnly, false)
|
|
240
|
-
.option('--es6Modules', options.es6Modules, false)
|
|
241
|
-
.option('--useBabylon [useBabylon]', options.useBabylon, booleanOption, true)
|
|
242
|
-
.option('--sendContributors [sendContributors]', options.sendContributors, booleanOption, true)
|
|
243
|
-
.option('--delayShutdownInSeconds <n>', options.delayShutdownInSeconds, parseInt)
|
|
244
|
-
.option('--instrumentationOnly', options.instrumentationOnly, false)
|
|
245
|
-
.option('--resolveWithoutHash [resolveWithoutHash]', options.resolveWithoutHash, booleanOption, true) // not in use hardcoded to `true` during instrumnetation
|
|
246
|
-
.option('--sourceHash', options.sourceHash)
|
|
247
|
-
.option('--outputpath <outputpath>', options.outputpath)
|
|
248
|
-
.option('--uniqueModuleId <uniqueModuleId>', options.uniqueModuleId)
|
|
249
|
-
.option('--scmProvider <scmProvider>', options.scmProvider)
|
|
250
|
-
.option('--scmBaseUrl <scmBaseUrl>', options.scmBaseUrl)
|
|
251
|
-
.option('--scmVersion <scmVersion>', options.scmVersion)
|
|
252
|
-
.option('--babylonPlugins <babylonPlugins>', options.babylonPlugins, csvToArray)
|
|
253
|
-
.option('--projectRoot <projectRoot>', options.projectRoot)
|
|
254
|
-
.option('--labid <labid>', options.labid)
|
|
255
|
-
.option('--useModulePrefix', options.useModulePrefix, false)
|
|
256
|
-
.option('--collectorUrl <collectorUrl>', options.collectorUrl)
|
|
257
|
-
.option('--footprintsMapping <footprintsMapping>', options.footprintsMapping, 'agent')
|
|
258
|
-
.option('--enableOpenTelemetry', options.enableOpenTelemetry, false)
|
|
259
|
-
.option('--allowCORS <allowCORS>', options.allowCORS)
|
|
260
|
-
.option('--excludeSourceMapFiles [mode]', options.excludeSourceMapFiles)
|
|
261
|
-
.option('--es6Classes [es6Classes]', options.es6Classes)
|
|
262
|
-
.option('--enrichPrivateMethods [enrichPrivateMethods]', options.enrichPrivateMethods)
|
|
263
|
-
.option('--hashIncludeNestedMethods [hashIncludeNestedMethods]', options.hashIncludeNestedMethods)
|
|
264
|
-
.option('--excludeNestedMethods [excludeNestedMethods]', options.excludeNestedMethods)
|
|
265
|
-
.option('--awsConfigure', options.awsConfigure, false)
|
|
266
|
-
.option('--awsConfigKeysToIgnore [keys]', options.awsConfigKeysToIgnore, false)
|
|
267
|
-
.option('--rawCoverage [rawCoverage]', options.rawCoverage, false)
|
|
268
|
-
.option('-l, --enrichByLinesMatch', options.enrichByLinesMatch, false)
|
|
269
|
-
// TODO - remove after new instrumenter has enough usage.
|
|
270
|
-
.option('--newInstrumenter', options.newInstrumenter, false)
|
|
271
|
-
.option('--partialBuildMapping <size>', options.partialBuildMapping)
|
|
272
|
-
.option('--scanDotFolders', options.scanDotFolders, booleanOption, false)
|
|
273
|
-
.option('--excludeTokenFromBrowserConfig', options.excludeTokenFromBrowserConfig, false)
|
|
274
|
-
.option('--compressSlMapping', options.compressSlMapping, false)
|
|
275
|
-
.option('--enableLineCoverage', options.enableLineCoverage, false)
|
|
276
|
-
.option('--splitPreambleIntoFile', options.splitPreambleIntoFile, false)
|
|
277
|
-
.option('--useRelativeSlMapping', options.useRelativeSlMapping, false)
|
|
278
|
-
.option('--embedCorrectUniqueId', options.embedCorrectUniqueId, false)
|
|
279
|
-
.option('--preambleFileName <preambleFileName>', options.preambleFileName)
|
|
280
|
-
.option('--preambleFileUrl <preambleFileUrl>', options.preambleFileUrl)
|
|
281
|
-
.option('--autoResolveProjectRoot', options.autoResolveProjectRoot, false)
|
|
282
|
-
.option('--skipInstrumentingFilesWithoutSourceMap', options.skipInstrumentingFilesWithoutSourceMap, false)
|
|
283
|
-
.option('--toggleBasedBrowserInstrumentation', options.toggleBasedBrowserInstrumentation, false)
|
|
284
|
-
.option('--allowedDomains <allowedDomains>', options.allowedDomains)
|
|
285
|
-
.option('--recognizeBabelCreateClass', options.recognizeBabelCreateClass, false)
|
|
286
|
-
.option('--preferSourceMapFromFile', options.preferSourceMapFromFile, false)
|
|
287
|
-
.option('--enrichByMethodRange', options.enrichByMethodRange, false)
|
|
288
|
-
.option('--experimentalDeduplicateEnrichedMethodsWithOriginals', options.experimentalDeduplicateEnrichedMethodsWithOriginals, false)
|
|
289
|
-
.action(function (cmd) {
|
|
184
|
+
function createBuildOptions(commandSetup) {
|
|
185
|
+
return (0, create_options_from_keys_1.createOptionsFromKeys)(commandSetup, scan_command_keys_1.scanCommandKeys).action(function (cmd) {
|
|
290
186
|
return __awaiter(this, void 0, void 0, function* () {
|
|
291
187
|
setWorkspacepath(cmd);
|
|
292
|
-
yield new build_executor_1.BuildExecutor().
|
|
188
|
+
yield new build_executor_1.BuildExecutor().execute(cmd);
|
|
293
189
|
});
|
|
294
|
-
})
|
|
190
|
+
});
|
|
295
191
|
}
|
|
296
|
-
function createBuildEndOptions(
|
|
297
|
-
return
|
|
298
|
-
.description(description)
|
|
299
|
-
.option('--ok', options.ok)
|
|
300
|
-
.option('--failed', options.failed)
|
|
301
|
-
.action(function (cmd) {
|
|
192
|
+
function createBuildEndOptions(commandSetup) {
|
|
193
|
+
return (0, create_options_from_keys_1.createOptionsFromKeys)(commandSetup, scanned_command_keys_1.scannedCommandKeys).action(function (cmd) {
|
|
302
194
|
return __awaiter(this, void 0, void 0, function* () {
|
|
303
|
-
yield new build_end_executor_1.BuildEndExecutor().
|
|
195
|
+
yield new build_end_executor_1.BuildEndExecutor().execute(cmd);
|
|
304
196
|
});
|
|
305
197
|
});
|
|
306
198
|
}
|
|
307
|
-
createBuildEndOptions(
|
|
308
|
-
command
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
createBuildEndOptions(
|
|
312
|
-
command
|
|
313
|
-
description
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
description
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
description: `Run Build Scanner. Deprecated, use 'scan' instead.`,
|
|
322
|
-
});
|
|
323
|
-
createCommand(`${contracts_1.COMMANDS.MOCHA} [args...]`, true, true)
|
|
324
|
-
.description('Run Unit Tests with Mocha')
|
|
325
|
-
.option('--usebranchcoverage [usebranchcoverage]', options.usebranchcoverage, booleanOption, false)
|
|
326
|
-
// command specific options
|
|
327
|
-
.option('--teststage <teststage>', options.teststage, 'Unit Tests')
|
|
328
|
-
.option('--labid <labid>', options.labid, undefined)
|
|
329
|
-
.option('--testgroupid <testgroupid>', options.testgroupid, undefined)
|
|
330
|
-
.option('--useslnode2 [useslnode2]', options.useslnode2, booleanOption, true)
|
|
331
|
-
.option('--httpServerColoring', options.httpServerColoring, false)
|
|
332
|
-
.option('--httpClientColoring', options.httpClientColoring, false)
|
|
333
|
-
.option('--resolveWithoutHash [resolveWithoutHash]', options.resolveWithoutHash, booleanOption, true)
|
|
334
|
-
.option('--projectRoot <projectRoot>', options.projectRoot)
|
|
335
|
-
.option('--enforceFullRun', options.enforceFullRun, false)
|
|
336
|
-
.option('--tiaDisabled', options.tiaDisabled, booleanOption, false)
|
|
337
|
-
.option('--testProjectId <testProjectId>', options.testProjectId, undefined)
|
|
338
|
-
.option('--prID <prID>', options.prID, undefined)
|
|
339
|
-
.option('--es6Modules', options.es6Modules)
|
|
340
|
-
.action(function (args, cmd) {
|
|
199
|
+
createBuildEndOptions(program
|
|
200
|
+
.command(contracts_1.COMMANDS.COMPLETE_SCAN)
|
|
201
|
+
.alias(contracts_1.COMMANDS.SCANNED)
|
|
202
|
+
.description('Notify Sealights for end of build and status'));
|
|
203
|
+
createBuildEndOptions(program
|
|
204
|
+
.command(contracts_1.COMMANDS.BUILD_END)
|
|
205
|
+
.description(`Notify Sealights for end of build and status. Deprecated, use 'completeScan' instead.`));
|
|
206
|
+
createBuildOptions(program
|
|
207
|
+
.command(contracts_1.COMMANDS.SCAN)
|
|
208
|
+
.alias(contracts_1.COMMANDS.BUILD)
|
|
209
|
+
.description('Run Build Scanner'));
|
|
210
|
+
(0, create_options_from_keys_1.createOptionsFromKeys)(program
|
|
211
|
+
.command(`${contracts_1.COMMANDS.MOCHA} [args...]`)
|
|
212
|
+
.description('Run Unit Tests with Mocha'), test_listener_commands_keys_1.mochaKeys).action(function (args, cmd) {
|
|
341
213
|
return __awaiter(this, void 0, void 0, function* () {
|
|
342
214
|
stripDefaultBuildSessionIdFileWhenLabIdIsProvided(cmd);
|
|
343
215
|
yield new mocha_executor_1.MochaExecutor().execute(cmd, args);
|
|
344
216
|
});
|
|
345
217
|
});
|
|
346
|
-
|
|
347
|
-
.
|
|
348
|
-
.
|
|
349
|
-
// command specific options
|
|
350
|
-
.option('--teststage <teststage>', options.teststage, 'Unit Tests')
|
|
351
|
-
.option('--labid <labid>', options.labid, undefined)
|
|
352
|
-
// general options
|
|
353
|
-
.action(function () {
|
|
354
|
-
notifyDeprecatedCommand(contracts_1.COMMANDS.JASMINE);
|
|
355
|
-
});
|
|
356
|
-
createCommand(`${contracts_1.COMMANDS.MOCHA_PHANTOM_JS} [args...]`)
|
|
357
|
-
.description("Create 'sl-hooks.js' for integration with mocha-phantomjs")
|
|
358
|
-
// command specific options
|
|
359
|
-
.option('--labid <labid>', options.labid, undefined)
|
|
360
|
-
.option('--resolveWithoutHash [resolveWithoutHash]', options.resolveWithoutHash, booleanOption, true)
|
|
361
|
-
// general options
|
|
362
|
-
.action(function () {
|
|
363
|
-
notifyDeprecatedCommand(contracts_1.COMMANDS.MOCHA_PHANTOM_JS);
|
|
364
|
-
});
|
|
365
|
-
createCommand(`${contracts_1.COMMANDS.RUN} [args...]`, true, true)
|
|
366
|
-
.description('Run Program with Agent')
|
|
367
|
-
.option('--usebranchcoverage [usebranchcoverage]', options.usebranchcoverage, booleanOption, false)
|
|
368
|
-
// command specific options
|
|
369
|
-
.option('--teststage <teststage>', options.teststage, 'Unit Tests')
|
|
370
|
-
.option('--proxy <proxy>', options.proxy)
|
|
371
|
-
.option('--overrideServer <overrideServer>', options.overrideServer)
|
|
372
|
-
.option('--useinitialcolor <useinitialcolor>', options.useinitialcolor, false)
|
|
373
|
-
.option('--workspacepath <workspacepath>', options.workspacepath, '.')
|
|
374
|
-
.option('--distfolderpath <workspacepath>', options.distfolderpath, '.')
|
|
375
|
-
.option('--distpath <workspacepath>', options.distpath, '.')
|
|
376
|
-
.option('--distributablepath <workspacepath>', options.distributablepath, '.')
|
|
377
|
-
.option('--labid <labid>', options.labid, undefined)
|
|
378
|
-
.option('--useslnode2 [useslnode2]', options.useslnode2, booleanOption, true)
|
|
379
|
-
.option('--httpServerColoring', options.httpServerColoring, false)
|
|
380
|
-
.option('--httpClientColoring', options.httpClientColoring, false)
|
|
381
|
-
.option('--collectorUrl <collectorUrl>', options.collectorUrl)
|
|
382
|
-
.option('--projectRoot <projectRoot>', options.projectRoot)
|
|
383
|
-
.option('--libraries <libraries>', options.libraries)
|
|
384
|
-
.option('--es6Modules', options.es6Modules)
|
|
385
|
-
.option('--omitFootprintsLeadingSlash', options.omitFootprintsLeadingSlash, false)
|
|
386
|
-
.option('--forwardSignals', options.forwardSignals, false)
|
|
387
|
-
.option('--signalForwardingTimeout <signalForwardingTimeout>', options.signalForwardingTimeout, parseInt, process_spawn_helper_1.ProcessSpawnHelper.DEFAULT_SIGNAL_FORWARDING_TIMEOUT_SECONDS)
|
|
388
|
-
// general options
|
|
389
|
-
.action(function (args, cmd) {
|
|
218
|
+
(0, create_options_from_keys_1.createOptionsFromKeys)(program
|
|
219
|
+
.command(`${contracts_1.COMMANDS.RUN} [args...]`)
|
|
220
|
+
.description('Run Program with Agent'), test_listener_commands_keys_1.runKeys).action(function (args, cmd) {
|
|
390
221
|
return __awaiter(this, void 0, void 0, function* () {
|
|
391
222
|
setWorkspacepath(cmd);
|
|
392
223
|
yield new run_executor_1.RunExecutor().execute(cmd, args);
|
|
393
224
|
});
|
|
394
225
|
});
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
.option('--teststage <teststage>', options.teststage, 'Unit Tests')
|
|
401
|
-
.option('--labid <labid>', options.labid, undefined)
|
|
402
|
-
.option('--testgroupid <testgroupid>', options.testgroupid)
|
|
403
|
-
.action(function (cmd) {
|
|
404
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
405
|
-
yield new start_execution_executor_1.StartExecutionExecutor().execute(cmd);
|
|
226
|
+
function createStartExecutionOptions(commandSetup) {
|
|
227
|
+
(0, create_options_from_keys_1.createOptionsFromKeys)(commandSetup, start_execution_command_keys_1.startExecutionCommandKeys).action(function (cmd) {
|
|
228
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
229
|
+
yield new start_execution_executor_1.StartExecutionExecutor().execute(cmd);
|
|
230
|
+
});
|
|
406
231
|
});
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
.
|
|
414
|
-
.
|
|
415
|
-
|
|
416
|
-
|
|
232
|
+
}
|
|
233
|
+
createStartExecutionOptions(program
|
|
234
|
+
.command(contracts_1.COMMANDS.OPEN_TEST_STAGE)
|
|
235
|
+
.alias(contracts_1.COMMANDS.START)
|
|
236
|
+
.description('Start Execution (opens a test stage)'));
|
|
237
|
+
createStartExecutionOptions(program
|
|
238
|
+
.command(contracts_1.COMMANDS.START_TEST_STAGE)
|
|
239
|
+
.description('Start Execution (opens a test stage)'));
|
|
240
|
+
function createEndExecutionOptions(commandSetup) {
|
|
241
|
+
(0, create_options_from_keys_1.createOptionsFromKeys)(commandSetup, end_execution_command_keys_1.endExecutionCommandKeys).action(function (cmd) {
|
|
242
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
243
|
+
yield new end_execution_executor_1.EndExecutionExecutor().execute(cmd);
|
|
244
|
+
});
|
|
417
245
|
});
|
|
418
|
-
}
|
|
246
|
+
}
|
|
247
|
+
createEndExecutionOptions(program
|
|
248
|
+
.command(contracts_1.COMMANDS.CLOSE_TEST_STAGE)
|
|
249
|
+
.alias(contracts_1.COMMANDS.END)
|
|
250
|
+
.description('End Execution (closes the test stage)'));
|
|
251
|
+
createEndExecutionOptions(program
|
|
252
|
+
.command(contracts_1.COMMANDS.END_TEST_STAGE)
|
|
253
|
+
.description('End Execution (closes the test stage)'));
|
|
419
254
|
/**
|
|
420
255
|
* Upload Junit Reports for the Generic Agent
|
|
421
256
|
*/
|
|
422
|
-
|
|
423
|
-
.description('Upload Reports')
|
|
424
|
-
.option('--labid <labid>', options.labid, undefined)
|
|
425
|
-
.option('--reportFile <reportFile>', options.reportFile, csvToArray, [])
|
|
426
|
-
.option('--reportFilesFolder <reportFilesFolder>', options.reportFilesFolder, csvToArray, [])
|
|
427
|
-
.option('--type <type>', options.type, 'JUnitReport')
|
|
428
|
-
.option('--source <source>', options.source, 'Mocha')
|
|
429
|
-
.option('--hasMoreRequests [hasMoreRequests]', options.hasMoreRequests, booleanOption, true)
|
|
430
|
-
.option('--teststage <teststage>', options.teststage)
|
|
431
|
-
.action(function (cmd) {
|
|
257
|
+
(0, create_options_from_keys_1.createOptionsFromKeys)(program.command(contracts_1.COMMANDS.UPLOAD_REPORTS).description('Upload Reports'), upload_reports_command_keys_1.uploadReportsCommandKeys).action(function (cmd) {
|
|
432
258
|
return __awaiter(this, void 0, void 0, function* () {
|
|
433
259
|
stripDefaultBuildSessionIdFileWhenLabIdIsProvided(cmd);
|
|
434
260
|
let startedExecution = false;
|
|
@@ -457,19 +283,7 @@ createCommand(contracts_1.COMMANDS.UPLOAD_REPORTS, true, true)
|
|
|
457
283
|
}
|
|
458
284
|
});
|
|
459
285
|
});
|
|
460
|
-
|
|
461
|
-
.description('Upload External Report')
|
|
462
|
-
.option('--report <report>', options.report)
|
|
463
|
-
.action(function () {
|
|
464
|
-
notifyDeprecatedCommand(contracts_1.COMMANDS.EXTERNAL_REPORT);
|
|
465
|
-
});
|
|
466
|
-
createCommand(contracts_1.COMMANDS.NYC_REPORT, true, true)
|
|
467
|
-
.description('Upload nyc report')
|
|
468
|
-
.option('--labid <labid>', options.labid, undefined)
|
|
469
|
-
.option('--report <report>', options.nycReport, nyc_report_executor_1.NycReportExecutor.DEFAULT_NYC_REPORT_FILE_LOC)
|
|
470
|
-
.option('--projectRoot <projectRoot>', options.projectRoot)
|
|
471
|
-
.option('--teststage <teststage>', options.teststage)
|
|
472
|
-
.action(function (cmd) {
|
|
286
|
+
(0, create_options_from_keys_1.createOptionsFromKeys)(program.command(contracts_1.COMMANDS.NYC_REPORT).description('Upload nyc report'), nyc_report_command_keys_1.nycReportCommandKeys).action(function (cmd, args) {
|
|
473
287
|
return __awaiter(this, void 0, void 0, function* () {
|
|
474
288
|
stripDefaultBuildSessionIdFileWhenLabIdIsProvided(cmd);
|
|
475
289
|
let startedExecution = false;
|
|
@@ -498,83 +312,24 @@ createCommand(contracts_1.COMMANDS.NYC_REPORT, true, true)
|
|
|
498
312
|
}
|
|
499
313
|
});
|
|
500
314
|
});
|
|
501
|
-
|
|
502
|
-
.
|
|
503
|
-
.
|
|
504
|
-
.option('--componentFile <componentFile>', options.dependenciesFile)
|
|
505
|
-
.action(function (cmd) {
|
|
315
|
+
(0, create_options_from_keys_1.createOptionsFromKeys)(program
|
|
316
|
+
.command(contracts_1.COMMANDS.COMPONENT_UPDATE)
|
|
317
|
+
.description('Add/update components to an integration build'), component_management_commands_keys_1.componentUpdateCommandKeys).action(function (cmd) {
|
|
506
318
|
return __awaiter(this, void 0, void 0, function* () {
|
|
507
319
|
yield new integration_build_update_components_executor_1.IntegrationBuildUpdateComponentsExecutor().execute(cmd);
|
|
508
320
|
});
|
|
509
321
|
});
|
|
510
|
-
|
|
511
|
-
.
|
|
512
|
-
.
|
|
513
|
-
.option('--componentFile <componentFile>', options.dependenciesFile)
|
|
514
|
-
.action(function (cmd) {
|
|
322
|
+
(0, create_options_from_keys_1.createOptionsFromKeys)(program
|
|
323
|
+
.command(contracts_1.COMMANDS.COMPONENT_DELETE)
|
|
324
|
+
.description('Delete components to an integration build'), component_management_commands_keys_1.componentUpdateCommandKeys).action(function (cmd) {
|
|
515
325
|
return __awaiter(this, void 0, void 0, function* () {
|
|
516
326
|
yield new integration_build_delete_components_executor_1.IntegrationBuildDeleteComponentsExecutor().execute(cmd);
|
|
517
327
|
});
|
|
518
328
|
});
|
|
519
|
-
program
|
|
520
|
-
.command(contracts_1.COMMANDS.INSTALL_BABEL)
|
|
521
|
-
.description('Set babel config to support sealights')
|
|
522
|
-
.option('--nodeEnvValue <nodeEnvValue>', options.nodeEnvValue, csvToArray)
|
|
523
|
-
// general options
|
|
524
|
-
.option('--skipUpgrade', options.skipUpgrade, booleanOption, false)
|
|
525
|
-
.action(function () {
|
|
526
|
-
notifyDeprecatedCommand(contracts_1.COMMANDS.INSTALL_BABEL);
|
|
527
|
-
});
|
|
528
|
-
program
|
|
329
|
+
(0, create_options_from_keys_1.createOptionsFromKeys)(program
|
|
529
330
|
.command(contracts_1.COMMANDS.DRY_RUN)
|
|
530
331
|
.description('Dry run mode for the node agent')
|
|
531
|
-
.allowUnknownOption()
|
|
532
|
-
.option('--workspacepath <workspacepath>', options.workspacepath)
|
|
533
|
-
.option('--distfolderpath <workspacepath>', options.distfolderpath)
|
|
534
|
-
.option('--distpath <workspacepath>', options.distpath)
|
|
535
|
-
.option('--distributablepath <workspacepath>', options.distributablepath)
|
|
536
|
-
.option('--scm <scm>', options.scm, 'none')
|
|
537
|
-
.option('--usebranchcoverage [usebranchcoverage]', options.usebranchcoverage, booleanOption, false)
|
|
538
|
-
.option('--excludedpaths <excludedpaths>', options.excludedpaths)
|
|
539
|
-
.option('--instrumentForBrowsers', options.instrumentForBrowsers, false)
|
|
540
|
-
.option('--ctxPropagationOnly', options.ctxPropagationOnly, false)
|
|
541
|
-
.option('--es6Modules', options.es6Modules, false)
|
|
542
|
-
.option('--babylonPlugins <babylonPlugins>', options.babylonPlugins, csvToArray)
|
|
543
|
-
.option('--buildScanProjectRoot <buildScanProjectRoot>', `${options.projectRoot} applied for build scanner`)
|
|
544
|
-
.option('--nycProjectRoot <nycProjectRoot>', `${options.projectRoot} applied for nycReport`)
|
|
545
|
-
.option('--instrumentationOnly', options.instrumentationOnly, false)
|
|
546
|
-
.option('--outputpath <outputpath>', options.outputpath)
|
|
547
|
-
.option('--folderDepth <folderDepth>', options.folderDepth, constants_1.DEFAULT_FOLDER_DEPTH)
|
|
548
|
-
.option('--usebranchcoverage [usebranchcoverage]', options.usebranchcoverage, booleanOption, false)
|
|
549
|
-
.option('--verbose', options.verbose, false)
|
|
550
|
-
.option('--hasNycReport', options.hasNycReport, false)
|
|
551
|
-
.option('--report <report>', options.nycReport, nyc_report_executor_1.NycReportExecutor.DEFAULT_NYC_REPORT_FILE_LOC)
|
|
552
|
-
.option('--sourceHash', options.sourceHash)
|
|
553
|
-
.option('--excludeSourceMapFiles [mode]', options.excludeSourceMapFiles)
|
|
554
|
-
.option('--es6Classes [es6Classes]', options.es6Classes)
|
|
555
|
-
.option('--enrichPrivateMethods [enrichPrivateMethods]', options.enrichPrivateMethods)
|
|
556
|
-
.option('--hashIncludeNestedMethods [hashIncludeNestedMethods]', options.hashIncludeNestedMethods)
|
|
557
|
-
.option('--excludeNestedMethods [excludeNestedMethods]', options.excludeNestedMethods)
|
|
558
|
-
.option('--rawCoverage [rawCoverage]', options.rawCoverage, false)
|
|
559
|
-
.option('-l, --enrichByLinesMatch [enrichByLinesMatch]', options.enrichByLinesMatch)
|
|
560
|
-
// TODO - remove after new instrumenter has enough usage.
|
|
561
|
-
.option('--newInstrumenter', options.newInstrumenter, false)
|
|
562
|
-
.option('--partialBuildMapping <size>', options.partialBuildMapping)
|
|
563
|
-
.option('--scanDotFolders', options.scanDotFolders, booleanOption, false)
|
|
564
|
-
.option('--enableLineCoverage', options.enableLineCoverage, false)
|
|
565
|
-
.option('--splitPreambleIntoFile', options.splitPreambleIntoFile, false)
|
|
566
|
-
.option('--useRelativeSlMapping', options.useRelativeSlMapping, false)
|
|
567
|
-
.option('--embedCorrectUniqueId', options.embedCorrectUniqueId, false)
|
|
568
|
-
.option('--preambleFileName <preambleFileName>', options.preambleFileName)
|
|
569
|
-
.option('--preambleFileUrl <preambleFileUrl>', options.preambleFileUrl)
|
|
570
|
-
.option('--skipInstrumentingFilesWithoutSourceMap', options.skipInstrumentingFilesWithoutSourceMap, false)
|
|
571
|
-
.option('--toggleBasedBrowserInstrumentation', options.toggleBasedBrowserInstrumentation, false)
|
|
572
|
-
.option('--allowedDomains <allowedDomains>', options.allowedDomains)
|
|
573
|
-
.option('--recognizeBabelCreateClass', options.recognizeBabelCreateClass, false)
|
|
574
|
-
.option('--preferSourceMapFromFile', options.preferSourceMapFromFile, false)
|
|
575
|
-
.option('--enrichByMethodRange', options.enrichByMethodRange, false)
|
|
576
|
-
.option('--experimentalDeduplicateEnrichedMethodsWithOriginals', options.experimentalDeduplicateEnrichedMethodsWithOriginals, false)
|
|
577
|
-
.action(function (cmd) {
|
|
332
|
+
.allowUnknownOption(), dry_run_command_keys_1.dryRunCommandKeys).action(function (cmd) {
|
|
578
333
|
return __awaiter(this, void 0, void 0, function* () {
|
|
579
334
|
setWorkspacepath(cmd);
|
|
580
335
|
yield new dry_run_executor_1.DryRunExecutor().execute(cmd);
|
|
@@ -652,15 +407,50 @@ function setWorkspacepath(cmd) {
|
|
|
652
407
|
cmd.distpath ||
|
|
653
408
|
cmd.distributablepath;
|
|
654
409
|
}
|
|
655
|
-
function stripDefaultBuildSessionIdFileWhenLabIdIsProvided(
|
|
656
|
-
// If labId is provided and the user did NOT explicitly provide
|
|
410
|
+
function stripDefaultBuildSessionIdFileWhenLabIdIsProvided(cmd) {
|
|
411
|
+
// If labId is provided and the user did NOT explicitly provide buildSessionIdFile,
|
|
657
412
|
// we should remove the default value
|
|
658
|
-
if (
|
|
413
|
+
if (cmd.labid) {
|
|
659
414
|
const userProvidedBuildSessionIdFile = (0, utils_1.isOptionProvidedByUser)('buildsessionidfile');
|
|
660
415
|
if (!userProvidedBuildSessionIdFile &&
|
|
661
|
-
|
|
662
|
-
delete
|
|
416
|
+
cmd.buildsessionidfile === 'buildSessionId') {
|
|
417
|
+
delete cmd.buildsessionidfile;
|
|
663
418
|
}
|
|
664
419
|
}
|
|
665
420
|
}
|
|
421
|
+
// deprecated commands
|
|
422
|
+
createCommand(`${contracts_1.COMMANDS.JASMINE} [args...]`)
|
|
423
|
+
.description('Run tests with jasmine-node')
|
|
424
|
+
.option('--usebranchcoverage [usebranchcoverage]', options.usebranchcoverage, booleanOption, false)
|
|
425
|
+
// command specific options
|
|
426
|
+
.option('--teststage <teststage>', options.teststage, 'Unit Tests')
|
|
427
|
+
.option('--labid <labid>', options.labid, undefined)
|
|
428
|
+
// general options
|
|
429
|
+
.action(function () {
|
|
430
|
+
notifyDeprecatedCommand(contracts_1.COMMANDS.JASMINE);
|
|
431
|
+
});
|
|
432
|
+
createCommand(`${contracts_1.COMMANDS.MOCHA_PHANTOM_JS} [args...]`)
|
|
433
|
+
.description("Create 'sl-hooks.js' for integration with mocha-phantomjs")
|
|
434
|
+
// command specific options
|
|
435
|
+
.option('--labid <labid>', options.labid, undefined)
|
|
436
|
+
.option('--resolveWithoutHash [resolveWithoutHash]', options.resolveWithoutHash, booleanOption, true)
|
|
437
|
+
// general options
|
|
438
|
+
.action(function () {
|
|
439
|
+
notifyDeprecatedCommand(contracts_1.COMMANDS.MOCHA_PHANTOM_JS);
|
|
440
|
+
});
|
|
441
|
+
createCommand(contracts_1.COMMANDS.EXTERNAL_REPORT)
|
|
442
|
+
.description('Upload External Report')
|
|
443
|
+
.option('--report <report>', options.report)
|
|
444
|
+
.action(function () {
|
|
445
|
+
notifyDeprecatedCommand(contracts_1.COMMANDS.EXTERNAL_REPORT);
|
|
446
|
+
});
|
|
447
|
+
program
|
|
448
|
+
.command(contracts_1.COMMANDS.INSTALL_BABEL)
|
|
449
|
+
.description('Set babel config to support sealights')
|
|
450
|
+
.option('--nodeEnvValue <nodeEnvValue>', options.nodeEnvValue, csvToArray)
|
|
451
|
+
// general options
|
|
452
|
+
.option('--skipUpgrade', options.skipUpgrade, booleanOption, false)
|
|
453
|
+
.action(function () {
|
|
454
|
+
notifyDeprecatedCommand(contracts_1.COMMANDS.INSTALL_BABEL);
|
|
455
|
+
});
|
|
666
456
|
//# sourceMappingURL=cli.js.map
|