@mablhq/mabl-cli 1.61.8 → 2.0.3
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/Globals.js +11 -7
- package/api/basicApiClient.js +10 -10
- package/api/mablApiClient.js +39 -1
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowser.js +6 -6
- package/browserLauncher/playwrightBrowserLauncher/playwrightPage.js +8 -0
- package/cli.js +1 -0
- package/commands/app-files/app-files.js +5 -0
- package/commands/app-files/app-files_cmds/create.js +98 -0
- package/commands/app-files/app-files_cmds/delete.js +31 -0
- package/commands/app-files/app-files_cmds/download.js +50 -0
- package/commands/app-files/app-files_cmds/list.js +72 -0
- package/commands/config/config_cmds/install.js +92 -0
- package/commands/constants.js +10 -3
- package/commands/tests/testsUtil.js +45 -15
- package/commands/tests/tests_cmds/run-mobile.js +218 -0
- package/commands/tests/tests_cmds/run.js +11 -9
- package/core/util.js +36 -2
- package/env/defaultEnv.js +2 -1
- package/env/dev.js +2 -1
- package/env/env.js +3 -1
- package/env/local.js +2 -1
- package/env/prod.js +2 -1
- package/execution/index.js +13 -1
- package/execution/runAppiumServer.js +133 -0
- package/http/MablHttpAgent.js +4 -1
- package/http/RequestFilteringHttpAgent.js +3 -3
- package/http/axiosProxyConfig.js +27 -22
- package/http/httpUtil.js +6 -10
- package/mablApi/index.js +1 -1
- package/mablscript/MablAction.js +1 -1
- package/mablscript/MablStep.js +28 -2
- package/mablscript/MablStepV2.js +51 -0
- package/mablscript/MablSymbol.js +6 -2
- package/mablscript/actions/ExtractAction.js +11 -6
- package/mablscript/actions/FindAction.js +5 -5
- package/mablscript/actions/JavaScriptAction.js +19 -12
- package/mablscript/importer.js +97 -14
- package/mablscript/mobile/steps/CreateVariableMobileStep.js +53 -0
- package/mablscript/mobile/steps/EnterTextStep.js +41 -0
- package/mablscript/mobile/steps/NavigateBackStep.js +20 -0
- package/mablscript/mobile/steps/NavigateHomeStep.js +21 -0
- package/mablscript/mobile/steps/ScrollStep.js +37 -0
- package/mablscript/mobile/steps/SetOrientationStep.js +20 -0
- package/mablscript/mobile/steps/TapStep.js +37 -0
- package/mablscript/mobile/steps/actions/MobileFindAction.js +23 -0
- package/mablscript/mobile/steps/stepUtil.js +71 -0
- package/mablscript/mobile/tests/StepTestsUtil.js +20 -0
- package/mablscript/mobile/tests/TestMobileFindDescriptors.js +215 -0
- package/mablscript/mobile/tests/steps/CreateVariableMobileStep.mobiletest.js +287 -0
- package/mablscript/mobile/tests/steps/EnterTextStep.mobiletest.js +74 -0
- package/mablscript/mobile/tests/steps/GeneralHumanization.mobiletest.js +167 -0
- package/mablscript/mobile/tests/steps/NavigateBackStep.mobiletest.js +22 -0
- package/mablscript/mobile/tests/steps/NavigateHomeStep.mobiletest.js +22 -0
- package/mablscript/mobile/tests/steps/ScrollStep.mobiletest.js +112 -0
- package/mablscript/mobile/tests/steps/SetOrientationStep.mobiletest.js +27 -0
- package/mablscript/mobile/tests/steps/TapStep.mobiletest.js +53 -0
- package/mablscript/steps/AssertStep.js +48 -38
- package/mablscript/steps/AssertStepOld.js +30 -2
- package/mablscript/steps/CreateVariableStep.js +9 -2
- package/mablscript/steps/EchoStep.js +4 -3
- package/mablscript/steps/ElseIfConditionStep.js +8 -2
- package/mablscript/steps/ElseStep.js +2 -1
- package/mablscript/steps/EndStep.js +2 -1
- package/mablscript/steps/EvaluateJavaScriptStep.js +6 -1
- package/mablscript/steps/IfConditionStep.js +17 -10
- package/mablscript/steps/SendHttpRequestStep.js +4 -3
- package/mablscript/steps/WaitStep.js +4 -3
- package/mablscript/types/GetVariableDescriptor.js +8 -3
- package/mablscript/types/mobile/CreateVariableMobileStepDescriptor.js +9 -0
- package/mablscript/types/mobile/EnterTextStepDescriptor.js +2 -0
- package/mablscript/types/mobile/NavigateBackStepDescriptor.js +2 -0
- package/mablscript/types/mobile/NavigateHomeStepDescriptor.js +2 -0
- package/mablscript/types/mobile/ScrollStepDescriptor.js +2 -0
- package/mablscript/types/mobile/SetOrientationStepDescriptor.js +8 -0
- package/mablscript/types/mobile/StepWithMobileFindDescriptor.js +2 -0
- package/mablscript/types/mobile/TapStepDescriptor.js +8 -0
- package/mablscriptFind/index.js +1 -1
- package/package.json +13 -6
- package/resources/pdf-viewer/embeddedPdfDetection.js +1 -14
- package/resources/webdriver.js +21 -0
- package/upload/index.js +5 -0
- package/util/FileCache.js +180 -0
- package/util/Lazy.js +90 -0
- package/util/MobileAppFileCache.js +102 -0
- package/util/RichPromise.js +3 -1
- package/webdriver/index.js +41 -0
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.parseBrowserType = exports.toBasicHttpAuthenticationCredentials = exports.logTestInfoIfPresent = exports.milliSecondsToSeconds = exports.calculateTotalTimeSeconds = exports.extractTestRunConfig = exports.pullDownTestRunConfig = exports.validateRunCommandWithLabels = exports.validateRunEditCommand = exports.cleanupTestResources = exports.sleep = exports.editTheTest = exports.runTheTest = exports.prepareTrainerForSplitPlayback = exports.cleanUpInitialPages = exports.getExtensionBackgroundPageWithCliTool = exports.createBrowserForExecutionEngine = exports.createBrowser = exports.getFinalUrl = void 0;
|
|
29
|
+
exports.parseBrowserType = exports.toBasicHttpAuthenticationCredentials = exports.logTestInfoIfPresent = exports.milliSecondsToSeconds = exports.calculateTotalTimeSeconds = exports.headerArrayToRecord = exports.extractTestRunConfig = exports.pullDownTestRunConfig = exports.validateRunCommandWithLabels = exports.validateRunEditCommand = exports.cleanupTestResources = exports.sleep = exports.editTheTest = exports.runTheTest = exports.prepareTrainerForSplitPlayback = exports.cleanUpInitialPages = exports.getExtensionBackgroundPageWithCliTool = exports.createBrowserForExecutionEngine = exports.createBrowser = exports.getFinalUrl = void 0;
|
|
30
30
|
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
31
31
|
const fs = __importStar(require("fs-extra"));
|
|
32
32
|
const os = __importStar(require("os"));
|
|
@@ -398,7 +398,7 @@ function validateRunCommandWithLabels(testId, suppliedLabelsInclude, suppliedLab
|
|
|
398
398
|
}
|
|
399
399
|
exports.validateRunCommandWithLabels = validateRunCommandWithLabels;
|
|
400
400
|
async function pullDownTestRunConfig(testRunId, apiClient) {
|
|
401
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
401
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
402
402
|
const journeyRun = await apiClient.getTestRun(testRunId);
|
|
403
403
|
const planRun = await apiClient.getPlanRun(journeyRun.parent_execution);
|
|
404
404
|
const testDatatablevariables = ((_a = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey_parameters) === null || _a === void 0 ? void 0 : _a.user_variables) &&
|
|
@@ -414,29 +414,38 @@ async function pullDownTestRunConfig(testRunId, apiClient) {
|
|
|
414
414
|
dataTableVariables: testDatatablevariables,
|
|
415
415
|
deviceEmulation: (_h = journeyRun.journey_parameters) === null || _h === void 0 ? void 0 : _h.device_emulation,
|
|
416
416
|
environmentId: (_k = (_j = journeyRun.journey_parameters) === null || _j === void 0 ? void 0 : _j.deployment) === null || _k === void 0 ? void 0 : _k.environment_id,
|
|
417
|
+
extraHttpHeaders: ((_l = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _l === void 0 ? void 0 : _l.http_headers_required) === true
|
|
418
|
+
? (_o = (_m = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _m === void 0 ? void 0 : _m.http_headers) === null || _o === void 0 ? void 0 : _o.reduce((headers, header) => {
|
|
419
|
+
var _a;
|
|
420
|
+
return ({
|
|
421
|
+
...headers,
|
|
422
|
+
[header.name]: (_a = header.value) !== null && _a !== void 0 ? _a : '',
|
|
423
|
+
});
|
|
424
|
+
}, {})
|
|
425
|
+
: undefined,
|
|
417
426
|
filterHttpRequests: false,
|
|
418
|
-
importedVariables: (
|
|
427
|
+
importedVariables: (_p = journeyRun.journey_parameters) === null || _p === void 0 ? void 0 : _p.imported_variables,
|
|
419
428
|
localizationOptions: journeyRun.localization_options,
|
|
420
|
-
pageLoadWait: (
|
|
429
|
+
pageLoadWait: (_q = journeyRun.journey_parameters) === null || _q === void 0 ? void 0 : _q.page_load_wait,
|
|
421
430
|
runId: journeyRun.id,
|
|
422
|
-
testId: (
|
|
423
|
-
url: (
|
|
431
|
+
testId: (_r = journeyRun.journey) === null || _r === void 0 ? void 0 : _r.invariant_id,
|
|
432
|
+
url: (_t = (_s = journeyRun.journey_parameters) === null || _s === void 0 ? void 0 : _s.deployment) === null || _t === void 0 ? void 0 : _t.uri,
|
|
424
433
|
};
|
|
425
434
|
}
|
|
426
435
|
exports.pullDownTestRunConfig = pullDownTestRunConfig;
|
|
427
436
|
async function extractTestRunConfig(executionMessage, apiClient) {
|
|
428
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
437
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
429
438
|
const journeyRun = (_a = executionMessage.journey_run) !== null && _a !== void 0 ? _a : (await apiClient.getTestRun(executionMessage.journey_run_id));
|
|
430
439
|
const planRun = executionMessage.plan_run;
|
|
431
440
|
const maybeRunnerType = ((_b = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _b === void 0 ? void 0 : _b.nodejs_runtime_variant)
|
|
432
441
|
?
|
|
433
442
|
(_c = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _c === void 0 ? void 0 : _c.nodejs_runtime_variant
|
|
434
443
|
: undefined;
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
? (_f = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _f === void 0 ? void 0 : _f.http_auth_credentials_id
|
|
444
|
+
const config = {
|
|
445
|
+
basicAuthCredentialsId: ((_d = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _d === void 0 ? void 0 : _d.http_auth_credentials_required)
|
|
446
|
+
? (_e = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _e === void 0 ? void 0 : _e.http_auth_credentials_id
|
|
439
447
|
: undefined,
|
|
448
|
+
branchName: (_f = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey_parameters) === null || _f === void 0 ? void 0 : _f.source_control_tag,
|
|
440
449
|
credentialsId: ((_g = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _g === void 0 ? void 0 : _g.credentials_required)
|
|
441
450
|
? (_h = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _h === void 0 ? void 0 : _h.credentials_id
|
|
442
451
|
: undefined,
|
|
@@ -444,17 +453,38 @@ async function extractTestRunConfig(executionMessage, apiClient) {
|
|
|
444
453
|
(0, utils_1.variableRowAsScenario)((_k = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey_parameters) === null || _k === void 0 ? void 0 : _k.user_variables),
|
|
445
454
|
deviceEmulation: (_l = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey_parameters) === null || _l === void 0 ? void 0 : _l.device_emulation,
|
|
446
455
|
environmentId: (_o = (_m = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey_parameters) === null || _m === void 0 ? void 0 : _m.deployment) === null || _o === void 0 ? void 0 : _o.environment_id,
|
|
456
|
+
extraHttpHeaders: ((_p = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _p === void 0 ? void 0 : _p.http_headers_required) === true
|
|
457
|
+
? headerArrayToRecord((_q = planRun === null || planRun === void 0 ? void 0 : planRun.run_policy) === null || _q === void 0 ? void 0 : _q.http_headers)
|
|
458
|
+
: undefined,
|
|
447
459
|
filterHttpRequests: true,
|
|
448
|
-
importedVariables: (
|
|
460
|
+
importedVariables: (_r = journeyRun.journey_parameters) === null || _r === void 0 ? void 0 : _r.imported_variables,
|
|
449
461
|
localizationOptions: journeyRun.localization_options,
|
|
450
|
-
pageLoadWait: (
|
|
462
|
+
pageLoadWait: (_s = journeyRun.journey_parameters) === null || _s === void 0 ? void 0 : _s.page_load_wait,
|
|
451
463
|
runId: journeyRun.id,
|
|
452
464
|
runnerType: maybeRunnerType,
|
|
453
|
-
testId: (
|
|
454
|
-
url: (
|
|
465
|
+
testId: (_t = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey) === null || _t === void 0 ? void 0 : _t.invariant_id,
|
|
466
|
+
url: (_v = (_u = journeyRun === null || journeyRun === void 0 ? void 0 : journeyRun.journey_parameters) === null || _u === void 0 ? void 0 : _u.deployment) === null || _v === void 0 ? void 0 : _v.uri,
|
|
455
467
|
};
|
|
468
|
+
if (executionMessage.test_type === mablApi_1.TestTypeEnum.Mobile) {
|
|
469
|
+
const mobileMessage = executionMessage;
|
|
470
|
+
config.mobileConfig = {
|
|
471
|
+
platformName: mobileMessage.mobile_device.platform,
|
|
472
|
+
mobileAppFileId: mobileMessage.mobile_app_file_id,
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
return config;
|
|
456
476
|
}
|
|
457
477
|
exports.extractTestRunConfig = extractTestRunConfig;
|
|
478
|
+
function headerArrayToRecord(headers) {
|
|
479
|
+
return headers === null || headers === void 0 ? void 0 : headers.reduce((headers, header) => {
|
|
480
|
+
var _a;
|
|
481
|
+
return ({
|
|
482
|
+
...headers,
|
|
483
|
+
[header.name]: (_a = header.value) !== null && _a !== void 0 ? _a : '',
|
|
484
|
+
});
|
|
485
|
+
}, {});
|
|
486
|
+
}
|
|
487
|
+
exports.headerArrayToRecord = headerArrayToRecord;
|
|
458
488
|
function calculateTotalTimeSeconds(startTimeMillis, endTimeMillis) {
|
|
459
489
|
return (endTimeMillis - startTimeMillis) / 1000;
|
|
460
490
|
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
const path_1 = require("path");
|
|
27
|
+
const defaultEnv_1 = require("../../../env/defaultEnv");
|
|
28
|
+
const execution_1 = require("../../../execution");
|
|
29
|
+
const mablApi_1 = require("../../../mablApi");
|
|
30
|
+
const loggingProvider_1 = require("../../../providers/logging/loggingProvider");
|
|
31
|
+
const util_1 = require("../../commandUtil/util");
|
|
32
|
+
const constants_1 = require("../../constants");
|
|
33
|
+
const testsUtil_1 = require("../testsUtil");
|
|
34
|
+
const runUtils_1 = require("./runUtils");
|
|
35
|
+
const MobileAppFileCache_1 = require("../../../util/MobileAppFileCache");
|
|
36
|
+
const fs = __importStar(require("fs"));
|
|
37
|
+
const resourceUtil_1 = require("../../../util/resourceUtil");
|
|
38
|
+
const chalk = require('chalk');
|
|
39
|
+
const execution = require('../../../execution/index');
|
|
40
|
+
exports.command = `run-mobile`;
|
|
41
|
+
exports.describe = false;
|
|
42
|
+
exports.builder = (yargs) => {
|
|
43
|
+
yargs
|
|
44
|
+
.example('$0 tests run-mobile --id <id> --app-file <path> --platform <platform>', 'run mobile test locally by id')
|
|
45
|
+
.option(constants_1.CommandArgId, {
|
|
46
|
+
describe: 'The id of the test to run',
|
|
47
|
+
type: 'string',
|
|
48
|
+
})
|
|
49
|
+
.option(constants_1.CommandArgMobileAppFile, {
|
|
50
|
+
describe: 'The path to the mobile application binary',
|
|
51
|
+
type: 'string',
|
|
52
|
+
})
|
|
53
|
+
.option(constants_1.CommandArgMobileAppFileId, {
|
|
54
|
+
describe: 'The ID of a previously uploaded mobile app file',
|
|
55
|
+
type: 'string',
|
|
56
|
+
})
|
|
57
|
+
.option(constants_1.CommandArgMobilePlatform, {
|
|
58
|
+
describe: 'The mobile platform',
|
|
59
|
+
defaultDescription: 'inferred from app binary extension',
|
|
60
|
+
type: 'string',
|
|
61
|
+
choices: [mablApi_1.MobilePlatformEnum.Android, mablApi_1.MobilePlatformEnum.Ios],
|
|
62
|
+
})
|
|
63
|
+
.option(constants_1.CommandArgWorkspaceId, {
|
|
64
|
+
alias: constants_1.CommandArgAliases.WorkspaceId,
|
|
65
|
+
describe: 'Workspace to run against',
|
|
66
|
+
nargs: 1,
|
|
67
|
+
type: 'string',
|
|
68
|
+
})
|
|
69
|
+
.option(constants_1.CommandArgReporter, {
|
|
70
|
+
describe: 'Output test run information for specified reporter',
|
|
71
|
+
hidden: true,
|
|
72
|
+
type: 'string',
|
|
73
|
+
choices: [constants_1.ReporterOptions.Mochawesome],
|
|
74
|
+
})
|
|
75
|
+
.option(constants_1.CommandArgReporterOptions, {
|
|
76
|
+
describe: 'Reporter options as comma separated key/values pairs. e.g. "reportDir=path/to,json=true"',
|
|
77
|
+
hidden: true,
|
|
78
|
+
type: 'string',
|
|
79
|
+
})
|
|
80
|
+
.option(constants_1.CommandArgMobileDeviceName, {
|
|
81
|
+
describe: 'Full name of the device to use for the test',
|
|
82
|
+
hidden: false,
|
|
83
|
+
type: 'string',
|
|
84
|
+
})
|
|
85
|
+
.implies(constants_1.CommandArgReporterOptions, constants_1.CommandArgReporter)
|
|
86
|
+
.middleware(inferMobilePlatform);
|
|
87
|
+
};
|
|
88
|
+
const exitCodeOnError = 1;
|
|
89
|
+
exports.handler = (0, util_1.failWrapper)(run, exitCodeOnError);
|
|
90
|
+
function validateMobileCommand(id, appFile, appFileId, platform) {
|
|
91
|
+
if (!id || (!appFile && !appFileId) || !platform) {
|
|
92
|
+
loggingProvider_1.logger.error(chalk.red(`Please provide the arguments --${constants_1.CommandArgId}, --${constants_1.CommandArgMobileAppFile} or --${constants_1.CommandArgMobileAppFileId}, and --${constants_1.CommandArgMobilePlatform}`));
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
if (appFile && appFileId) {
|
|
96
|
+
loggingProvider_1.logger.error(chalk.red(`Only one of { --${constants_1.CommandArgMobileAppFile}, --${constants_1.CommandArgMobileAppFileId} } may be specified`));
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
async function run(parsed) {
|
|
102
|
+
if (!validateMobileCommand(parsed[constants_1.CommandArgId], parsed[constants_1.CommandArgMobileAppFile], parsed[constants_1.CommandArgMobileAppFileId], parsed[constants_1.CommandArgMobilePlatform])) {
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}
|
|
105
|
+
const commandStartTime = Date.now();
|
|
106
|
+
let workspaceId;
|
|
107
|
+
try {
|
|
108
|
+
workspaceId = await (0, util_1.getWorkspaceId)(parsed);
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
}
|
|
112
|
+
const parentDirOfNodeModulesDir = (0, resourceUtil_1.findNodeModulesDirectories)()[0];
|
|
113
|
+
const mobileToolsInstalled = fs.existsSync((0, path_1.resolve)(parentDirOfNodeModulesDir, 'node_modules/appium-uiautomator2-driver'));
|
|
114
|
+
if (!mobileToolsInstalled) {
|
|
115
|
+
loggingProvider_1.logger.error(`[ERROR] Missing the mobile tools for running tests, run ${chalk.magenta('mabl config install mobile-tools')} to install them`);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const platformName = (0, execution_1.parsePlatformName)(parsed[constants_1.CommandArgMobilePlatform]);
|
|
119
|
+
await validateSystemRequirements(platformName, parsed[constants_1.CommandArgMobileDeviceName]);
|
|
120
|
+
const testRunnerConfig = {
|
|
121
|
+
_cliCreated: true,
|
|
122
|
+
filterHttpRequests: false,
|
|
123
|
+
testId: parsed.id,
|
|
124
|
+
workspaceId,
|
|
125
|
+
mobileConfig: {
|
|
126
|
+
mobileAppFileId: parsed[constants_1.CommandArgMobileAppFileId],
|
|
127
|
+
path: parsed[constants_1.CommandArgMobileAppFile],
|
|
128
|
+
platformName,
|
|
129
|
+
avdName: parsed[constants_1.CommandArgMobileDeviceName],
|
|
130
|
+
udid: parsed[constants_1.CommandArgMobileDeviceName],
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
loggingProvider_1.logger.info('Warming up test runner...');
|
|
134
|
+
const mablTestsRunner = await execution.createMablTestRunner(testRunnerConfig);
|
|
135
|
+
const results = await mablTestsRunner.run();
|
|
136
|
+
if ((mablTestsRunner === null || mablTestsRunner === void 0 ? void 0 : mablTestsRunner.mablTestRunners) !== undefined) {
|
|
137
|
+
mablTestsRunner.mablTestRunners
|
|
138
|
+
.filter((tr) => tr instanceof execution_1.MablTestRunner)
|
|
139
|
+
.forEach((tr) => {
|
|
140
|
+
const testContext = tr.testContext;
|
|
141
|
+
(0, testsUtil_1.cleanupTestResources)(testContext);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
await (0, runUtils_1.logTestResults)(results, parsed, commandStartTime, generateRunCommandTemplate(parsed, results));
|
|
145
|
+
if (!results.success && !testRunnerConfig.keepBrowserOpen) {
|
|
146
|
+
process.exit(1);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function generateRunCommandTemplate(parsed, testResults) {
|
|
150
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
151
|
+
const testResult = testResults.testResults[0];
|
|
152
|
+
let templateCommand = `${defaultEnv_1.SCRIPT_NAME} ${parsed._.join(' ')} \\\n`;
|
|
153
|
+
if ((_a = testResult === null || testResult === void 0 ? void 0 : testResult.rerunConfig) === null || _a === void 0 ? void 0 : _a.environmentId) {
|
|
154
|
+
templateCommand = `${templateCommand} --${constants_1.CommandArgEnvironmentId} ${(_b = testResult === null || testResult === void 0 ? void 0 : testResult.rerunConfig) === null || _b === void 0 ? void 0 : _b.environmentId} \\\n`;
|
|
155
|
+
}
|
|
156
|
+
if ((_c = testResult === null || testResult === void 0 ? void 0 : testResult.rerunConfig) === null || _c === void 0 ? void 0 : _c.credentialsId) {
|
|
157
|
+
templateCommand = `${templateCommand} --${constants_1.CommandArgCredentials} ${(_d = testResult === null || testResult === void 0 ? void 0 : testResult.rerunConfig) === null || _d === void 0 ? void 0 : _d.credentialsId} \\\n`;
|
|
158
|
+
}
|
|
159
|
+
if ((_e = testResult === null || testResult === void 0 ? void 0 : testResult.rerunConfig) === null || _e === void 0 ? void 0 : _e.url) {
|
|
160
|
+
templateCommand = `${templateCommand} --${constants_1.CommandArgUrl} ${(_f = testResult === null || testResult === void 0 ? void 0 : testResult.rerunConfig) === null || _f === void 0 ? void 0 : _f.url} \\\n`;
|
|
161
|
+
}
|
|
162
|
+
if ((_g = testResult === null || testResult === void 0 ? void 0 : testResult.rerunConfig) === null || _g === void 0 ? void 0 : _g.branch) {
|
|
163
|
+
templateCommand = `${templateCommand} --${constants_1.CommandArgMablBranch} ${testResult.rerunConfig.branch} \\\n`;
|
|
164
|
+
}
|
|
165
|
+
const testIdVal = parsed.id ? parsed.id : '<TEST-ID>';
|
|
166
|
+
templateCommand = `${templateCommand} --${constants_1.CommandArgId} ${testIdVal}`;
|
|
167
|
+
return templateCommand;
|
|
168
|
+
}
|
|
169
|
+
async function validateSystemRequirements(platform, deviceName) {
|
|
170
|
+
let requirements;
|
|
171
|
+
if (platform === mablApi_1.MobilePlatformEnum.Ios) {
|
|
172
|
+
requirements = await (0, execution_1.systemIsSimulatorReady)(deviceName);
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
requirements = await (0, execution_1.systemIsEmulatorReady)(deviceName);
|
|
176
|
+
}
|
|
177
|
+
if (!requirements.requirementsMet) {
|
|
178
|
+
const errorMessages = [];
|
|
179
|
+
Object.values(requirements.checks).forEach((requirement) => {
|
|
180
|
+
if (!requirement.requirementsMet && requirement.informationalText) {
|
|
181
|
+
errorMessages.push(requirement.informationalText);
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
loggingProvider_1.logger.error('Failed while checking system requirements for testing mobile code. Errors: ');
|
|
185
|
+
for (const errorMessage of errorMessages) {
|
|
186
|
+
loggingProvider_1.logger.error(` * ${errorMessage}`);
|
|
187
|
+
}
|
|
188
|
+
process.exit(exitCodeOnError);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
async function inferMobilePlatform(argv) {
|
|
192
|
+
if (!argv[constants_1.CommandArgMobilePlatform] && argv[constants_1.CommandArgMobileAppFileId]) {
|
|
193
|
+
if (argv[constants_1.CommandArgMobileAppFileId]) {
|
|
194
|
+
try {
|
|
195
|
+
const { platform } = await new MobileAppFileCache_1.MobileAppFileCache().getMobileAppFileImmutableFields(argv[constants_1.CommandArgMobileAppFileId]);
|
|
196
|
+
if (platform) {
|
|
197
|
+
argv[constants_1.CommandArgMobilePlatform] = platform.toString().toLowerCase();
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
catch (error) {
|
|
202
|
+
loggingProvider_1.logger.warn(chalk.yellow(`Warning: Unable to fetch mobile app file ${argv[constants_1.CommandArgMobileAppFile]}: ${error}`));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
const extension = (0, path_1.extname)(argv[constants_1.CommandArgMobileAppFile]).toLowerCase();
|
|
206
|
+
switch (extension) {
|
|
207
|
+
case '.apk':
|
|
208
|
+
argv[constants_1.CommandArgMobilePlatform] = mablApi_1.MobilePlatformEnum.Android;
|
|
209
|
+
break;
|
|
210
|
+
case '.ipa':
|
|
211
|
+
case '.app':
|
|
212
|
+
argv[constants_1.CommandArgMobilePlatform] = mablApi_1.MobilePlatformEnum.Ios;
|
|
213
|
+
break;
|
|
214
|
+
default:
|
|
215
|
+
loggingProvider_1.logger.warn(chalk.yellow(`Warning: Unable to infer the mobile platform from the file extension: '${extension}' Please provide a --platform command line argument.`));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
@@ -61,11 +61,6 @@ exports.builder = (yargs) => {
|
|
|
61
61
|
describe: 'Workspace to run against',
|
|
62
62
|
nargs: 1,
|
|
63
63
|
type: 'string',
|
|
64
|
-
})
|
|
65
|
-
.option(constants_1.CommandArgEnableLink, {
|
|
66
|
-
describe: 'Enable usage of mabl Link for test run. For local CLI runs link agent label set in the environment is ignored.',
|
|
67
|
-
type: 'boolean',
|
|
68
|
-
hidden: true,
|
|
69
64
|
})
|
|
70
65
|
.option(constants_1.CommandArgEnvironmentId, {
|
|
71
66
|
alias: constants_1.CommandArgAliases.EnvironmentId,
|
|
@@ -186,6 +181,11 @@ exports.builder = (yargs) => {
|
|
|
186
181
|
nargs: 1,
|
|
187
182
|
choices: constants_1.ValidBrowserTypesForLocalRuns,
|
|
188
183
|
hidden: true,
|
|
184
|
+
})
|
|
185
|
+
.option(constants_1.CommandArgUseTestExecutionProxy, {
|
|
186
|
+
describe: 'Route test HTTP traffic through a local proxy',
|
|
187
|
+
type: 'boolean',
|
|
188
|
+
hidden: true,
|
|
189
189
|
})
|
|
190
190
|
.check((argv) => {
|
|
191
191
|
(0, testsUtil_1.validateRunCommandWithLabels)(argv[constants_1.CommandArgId], argv[constants_1.CommandArgLabelsInclude], argv[constants_1.CommandArgLabelsExclude], argv[constants_1.CommandArgTestRunId], argv[constants_1.CommandArgFromPlanId], true, argv[constants_1.CommandArgTestFile]);
|
|
@@ -247,7 +247,7 @@ async function run(parsed) {
|
|
|
247
247
|
dataTableVariables: scenario,
|
|
248
248
|
disableIsolation: parsed[constants_1.CommandArgBrowserDisableIsolation],
|
|
249
249
|
enableExtensions: parsed[constants_1.CommandArgBrowserEnableExtensions],
|
|
250
|
-
enableLink:
|
|
250
|
+
enableLink: false,
|
|
251
251
|
environmentId: parsed[constants_1.CommandArgEnvironmentId],
|
|
252
252
|
extraHttpHeaders,
|
|
253
253
|
filterHttpRequests: false,
|
|
@@ -265,6 +265,7 @@ async function run(parsed) {
|
|
|
265
265
|
testFile: parsed[constants_1.CommandArgTestFile],
|
|
266
266
|
testId: parsed.id,
|
|
267
267
|
url: parsed.url,
|
|
268
|
+
useTestExecutionProxy: parsed[constants_1.CommandArgUseTestExecutionProxy],
|
|
268
269
|
userAgent: parsed[constants_1.CommandArgUserAgent],
|
|
269
270
|
usingDataTableId: parsed[constants_1.CommandArgDataTableId],
|
|
270
271
|
width: parsed.width,
|
|
@@ -282,10 +283,11 @@ async function run(parsed) {
|
|
|
282
283
|
});
|
|
283
284
|
}
|
|
284
285
|
await (0, runUtils_1.logTestResults)(results, parsed, commandStartTime, generateRunCommandTemplate(parsed, results));
|
|
285
|
-
if (!
|
|
286
|
-
|
|
286
|
+
if (!testRunnerConfig.keepBrowserOpen) {
|
|
287
|
+
if (!results.success) {
|
|
288
|
+
process.exit(1);
|
|
289
|
+
}
|
|
287
290
|
}
|
|
288
|
-
return 'done';
|
|
289
291
|
}
|
|
290
292
|
exports.run = run;
|
|
291
293
|
function generateRunCommandTemplate(parsed, testResults) {
|
package/core/util.js
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getApiClientFromOptions = void 0;
|
|
6
|
+
exports.validateAuthentication = exports.getApiClientFromOptions = exports.getApiClient = exports.INVALID_AUTH_ERROR = void 0;
|
|
4
7
|
const mablApiClientFactory_1 = require("../api/mablApiClientFactory");
|
|
8
|
+
const asyncUtil_1 = require("../util/asyncUtil");
|
|
9
|
+
const authenticationProvider_1 = require("../providers/authenticationProvider");
|
|
10
|
+
const types_1 = require("../api/types");
|
|
11
|
+
const mablApi_1 = require("../mablApi");
|
|
12
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
13
|
+
const DEFAULT_ASYNC_TIMEOUT_MILLIS = 120000;
|
|
14
|
+
exports.INVALID_AUTH_ERROR = `Auth with user credentials required. Please run ${chalk_1.default.magenta('mabl auth login')} to log in with your mabl account`;
|
|
15
|
+
async function getApiClient(options = {}) {
|
|
16
|
+
const { asyncTimeoutMillis, authenticationConfig, runOptions, userAuthOnly, validateAuth, } = options;
|
|
17
|
+
const apiClient = await (0, asyncUtil_1.promiseWithTimeout)(getApiClientFromOptions(runOptions, userAuthOnly), asyncTimeoutMillis !== null && asyncTimeoutMillis !== void 0 ? asyncTimeoutMillis : DEFAULT_ASYNC_TIMEOUT_MILLIS, 'Get API client from options');
|
|
18
|
+
if (validateAuth !== null && validateAuth !== void 0 ? validateAuth : true) {
|
|
19
|
+
await (0, asyncUtil_1.promiseWithTimeout)(validateAuthentication(apiClient, authenticationConfig !== null && authenticationConfig !== void 0 ? authenticationConfig : (await (0, asyncUtil_1.promiseWithTimeout)(new authenticationProvider_1.AuthenticationProvider().getAuthConfigWithAutoRenew(), DEFAULT_ASYNC_TIMEOUT_MILLIS, 'Get auth config with auto renew'))), asyncTimeoutMillis !== null && asyncTimeoutMillis !== void 0 ? asyncTimeoutMillis : DEFAULT_ASYNC_TIMEOUT_MILLIS, 'Validate auth');
|
|
20
|
+
}
|
|
21
|
+
return apiClient;
|
|
22
|
+
}
|
|
23
|
+
exports.getApiClient = getApiClient;
|
|
5
24
|
async function getApiClientFromOptions(trainingSessionOptions, userAuthOnly) {
|
|
6
|
-
if (trainingSessionOptions.authToken) {
|
|
25
|
+
if (trainingSessionOptions === null || trainingSessionOptions === void 0 ? void 0 : trainingSessionOptions.authToken) {
|
|
7
26
|
return mablApiClientFactory_1.MablApiClientFactory.createApiClientForAccessToken(trainingSessionOptions.authToken);
|
|
8
27
|
}
|
|
9
28
|
if (userAuthOnly) {
|
|
@@ -12,3 +31,18 @@ async function getApiClientFromOptions(trainingSessionOptions, userAuthOnly) {
|
|
|
12
31
|
return mablApiClientFactory_1.MablApiClientFactory.createApiClient();
|
|
13
32
|
}
|
|
14
33
|
exports.getApiClientFromOptions = getApiClientFromOptions;
|
|
34
|
+
async function validateAuthentication(apiClient, authConfig) {
|
|
35
|
+
if (authConfig.authType !== types_1.AuthType.ApiKey) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
const keyDetails = await apiClient.getApiKeyDetails();
|
|
40
|
+
if (keyDetails.type === mablApi_1.ApiKeyType.CommandLineInterface) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
catch (_) {
|
|
45
|
+
}
|
|
46
|
+
throw new Error(exports.INVALID_AUTH_ERROR);
|
|
47
|
+
}
|
|
48
|
+
exports.validateAuthentication = validateAuthentication;
|
package/env/defaultEnv.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FIND_OVERRIDE_PATH = exports.ELECTRON_PROTOCOL = exports.SCRIPT_NAME = exports.OKTA_URL = exports.OKTA_CLIENT_ID = exports.LOCAL_TRAINER_PATH = exports.EXTENSION_ID = exports.ENV = exports.DEBUG_EVENT_EMITTER = exports.CONSOLE_LOGGING_LEVEL = exports.CONF_FILE_VERSION = exports.CONF_FILE_PROJECT_NAME = exports.BASE_APP_URL = exports.BASE_API_URL = void 0;
|
|
3
|
+
exports.UPLOAD_SERVICE_URL = exports.FIND_OVERRIDE_PATH = exports.ELECTRON_PROTOCOL = exports.SCRIPT_NAME = exports.OKTA_URL = exports.OKTA_CLIENT_ID = exports.LOCAL_TRAINER_PATH = exports.EXTENSION_ID = exports.ENV = exports.DEBUG_EVENT_EMITTER = exports.CONSOLE_LOGGING_LEVEL = exports.CONF_FILE_VERSION = exports.CONF_FILE_PROJECT_NAME = exports.BASE_APP_URL = exports.BASE_API_URL = void 0;
|
|
4
4
|
exports.BASE_API_URL = 'https://api.mabl.com';
|
|
5
5
|
exports.BASE_APP_URL = 'https://app.mabl.com';
|
|
6
6
|
exports.CONF_FILE_PROJECT_NAME = 'mabl-cli';
|
|
@@ -15,3 +15,4 @@ exports.OKTA_URL = 'https://auth2.mabl.com';
|
|
|
15
15
|
exports.SCRIPT_NAME = 'mabl';
|
|
16
16
|
exports.ELECTRON_PROTOCOL = 'mabl-app';
|
|
17
17
|
exports.FIND_OVERRIDE_PATH = undefined;
|
|
18
|
+
exports.UPLOAD_SERVICE_URL = 'https://upload.mabl.com';
|
package/env/dev.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FIND_OVERRIDE_PATH = exports.ELECTRON_PROTOCOL = exports.SCRIPT_NAME = exports.OKTA_URL = exports.OKTA_CLIENT_ID = exports.LOCAL_TRAINER_PATH = exports.EXTENSION_ID = exports.ENV = exports.DEBUG_EVENT_EMITTER = exports.CONSOLE_LOGGING_LEVEL = exports.CONF_FILE_VERSION = exports.CONF_FILE_PROJECT_NAME = exports.BASE_APP_URL = exports.BASE_API_URL = void 0;
|
|
3
|
+
exports.UPLOAD_SERVICE_URL = exports.FIND_OVERRIDE_PATH = exports.ELECTRON_PROTOCOL = exports.SCRIPT_NAME = exports.OKTA_URL = exports.OKTA_CLIENT_ID = exports.LOCAL_TRAINER_PATH = exports.EXTENSION_ID = exports.ENV = exports.DEBUG_EVENT_EMITTER = exports.CONSOLE_LOGGING_LEVEL = exports.CONF_FILE_VERSION = exports.CONF_FILE_PROJECT_NAME = exports.BASE_APP_URL = exports.BASE_API_URL = void 0;
|
|
4
4
|
exports.BASE_API_URL = 'https://api-dev.mabl.com';
|
|
5
5
|
exports.BASE_APP_URL = 'https://app-dev.mabl.com';
|
|
6
6
|
exports.CONF_FILE_PROJECT_NAME = 'mabl-cli-dev';
|
|
@@ -15,3 +15,4 @@ exports.OKTA_URL = 'https://auth2-dev.mabl.com';
|
|
|
15
15
|
exports.SCRIPT_NAME = 'mabl-dev';
|
|
16
16
|
exports.ELECTRON_PROTOCOL = 'mabl-app-dev';
|
|
17
17
|
exports.FIND_OVERRIDE_PATH = undefined;
|
|
18
|
+
exports.UPLOAD_SERVICE_URL = 'https://upload-dev.mabl.com';
|
package/env/env.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.setConfigFileProjectName = exports.setGlobalConfigEnv = exports.EnvOption = exports.ELECTRON_PROTOCOL = exports.SCRIPT_NAME = exports.OKTA_URL = exports.OKTA_CLIENT_ID = exports.LOCAL_TRAINER_PATH = exports.FIND_OVERRIDE_PATH = exports.EXTENSION_ID = exports.ENV = exports.DEBUG_EVENT_EMITTER = exports.CONSOLE_LOGGING_LEVEL = exports.CONF_FILE_VERSION = exports.CONF_FILE_PROJECT_NAME = exports.BASE_APP_URL = exports.BASE_API_URL = void 0;
|
|
26
|
+
exports.setConfigFileProjectName = exports.setGlobalConfigEnv = exports.EnvOption = exports.UPLOAD_SERVICE_URL = exports.ELECTRON_PROTOCOL = exports.SCRIPT_NAME = exports.OKTA_URL = exports.OKTA_CLIENT_ID = exports.LOCAL_TRAINER_PATH = exports.FIND_OVERRIDE_PATH = exports.EXTENSION_ID = exports.ENV = exports.DEBUG_EVENT_EMITTER = exports.CONSOLE_LOGGING_LEVEL = exports.CONF_FILE_VERSION = exports.CONF_FILE_PROJECT_NAME = exports.BASE_APP_URL = exports.BASE_API_URL = void 0;
|
|
27
27
|
const localEnv = __importStar(require("./local"));
|
|
28
28
|
const devEnv = __importStar(require("./dev"));
|
|
29
29
|
const prodEnv = __importStar(require("./prod"));
|
|
@@ -42,6 +42,7 @@ exports.OKTA_CLIENT_ID = defaultEnv.OKTA_CLIENT_ID;
|
|
|
42
42
|
exports.OKTA_URL = defaultEnv.OKTA_URL;
|
|
43
43
|
exports.SCRIPT_NAME = defaultEnv.SCRIPT_NAME;
|
|
44
44
|
exports.ELECTRON_PROTOCOL = defaultEnv.ELECTRON_PROTOCOL;
|
|
45
|
+
exports.UPLOAD_SERVICE_URL = defaultEnv.UPLOAD_SERVICE_URL;
|
|
45
46
|
var EnvOption;
|
|
46
47
|
(function (EnvOption) {
|
|
47
48
|
EnvOption["dev"] = "dev";
|
|
@@ -68,6 +69,7 @@ function setGlobalConfigEnv(env) {
|
|
|
68
69
|
exports.SCRIPT_NAME = envMap[env].SCRIPT_NAME;
|
|
69
70
|
exports.ELECTRON_PROTOCOL = envMap[env].ELECTRON_PROTOCOL;
|
|
70
71
|
exports.FIND_OVERRIDE_PATH = envMap[env].FIND_OVERRIDE_PATH;
|
|
72
|
+
exports.UPLOAD_SERVICE_URL = envMap[env].UPLOAD_SERVICE_URL;
|
|
71
73
|
}
|
|
72
74
|
exports.setGlobalConfigEnv = setGlobalConfigEnv;
|
|
73
75
|
function setConfigFileProjectName(projectName) {
|
package/env/local.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FIND_OVERRIDE_PATH = exports.ELECTRON_PROTOCOL = exports.SCRIPT_NAME = exports.OKTA_URL = exports.OKTA_CLIENT_ID = exports.LOCAL_TRAINER_PATH = exports.EXTENSION_ID = exports.ENV = exports.DEBUG_EVENT_EMITTER = exports.CONSOLE_LOGGING_LEVEL = exports.CONF_FILE_VERSION = exports.CONF_FILE_PROJECT_NAME = exports.BASE_APP_URL = exports.BASE_API_URL = void 0;
|
|
3
|
+
exports.UPLOAD_SERVICE_URL = exports.FIND_OVERRIDE_PATH = exports.ELECTRON_PROTOCOL = exports.SCRIPT_NAME = exports.OKTA_URL = exports.OKTA_CLIENT_ID = exports.LOCAL_TRAINER_PATH = exports.EXTENSION_ID = exports.ENV = exports.DEBUG_EVENT_EMITTER = exports.CONSOLE_LOGGING_LEVEL = exports.CONF_FILE_VERSION = exports.CONF_FILE_PROJECT_NAME = exports.BASE_APP_URL = exports.BASE_API_URL = void 0;
|
|
4
4
|
exports.BASE_API_URL = 'http://localhost:8080';
|
|
5
5
|
exports.BASE_APP_URL = 'https://app-local.mabl.com:3000';
|
|
6
6
|
exports.CONF_FILE_PROJECT_NAME = 'mabl-cli-local';
|
|
@@ -15,3 +15,4 @@ exports.OKTA_URL = 'https://auth2-dev.mabl.com';
|
|
|
15
15
|
exports.SCRIPT_NAME = 'mabl-local';
|
|
16
16
|
exports.ELECTRON_PROTOCOL = 'mabl-app-local';
|
|
17
17
|
exports.FIND_OVERRIDE_PATH = undefined;
|
|
18
|
+
exports.UPLOAD_SERVICE_URL = 'https://upload-dev.mabl.com';
|
package/env/prod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FIND_OVERRIDE_PATH = exports.ELECTRON_PROTOCOL = exports.SCRIPT_NAME = exports.OKTA_URL = exports.OKTA_CLIENT_ID = exports.LOCAL_TRAINER_PATH = exports.EXTENSION_ID = exports.ENV = exports.DEBUG_EVENT_EMITTER = exports.CONSOLE_LOGGING_LEVEL = exports.CONF_FILE_VERSION = exports.CONF_FILE_PROJECT_NAME = exports.BASE_APP_URL = exports.BASE_API_URL = void 0;
|
|
3
|
+
exports.UPLOAD_SERVICE_URL = exports.FIND_OVERRIDE_PATH = exports.ELECTRON_PROTOCOL = exports.SCRIPT_NAME = exports.OKTA_URL = exports.OKTA_CLIENT_ID = exports.LOCAL_TRAINER_PATH = exports.EXTENSION_ID = exports.ENV = exports.DEBUG_EVENT_EMITTER = exports.CONSOLE_LOGGING_LEVEL = exports.CONF_FILE_VERSION = exports.CONF_FILE_PROJECT_NAME = exports.BASE_APP_URL = exports.BASE_API_URL = void 0;
|
|
4
4
|
exports.BASE_API_URL = 'https://api.mabl.com';
|
|
5
5
|
exports.BASE_APP_URL = 'https://app.mabl.com';
|
|
6
6
|
exports.CONF_FILE_PROJECT_NAME = 'mabl-cli';
|
|
@@ -15,3 +15,4 @@ exports.OKTA_URL = 'https://auth2.mabl.com';
|
|
|
15
15
|
exports.SCRIPT_NAME = 'mabl';
|
|
16
16
|
exports.ELECTRON_PROTOCOL = 'mabl-app';
|
|
17
17
|
exports.FIND_OVERRIDE_PATH = undefined;
|
|
18
|
+
exports.UPLOAD_SERVICE_URL = 'https://upload.mabl.com';
|