@mablhq/mabl-cli 1.13.21 → 1.16.16
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/api/basicApiClient.js +56 -32
- package/api/featureSet.js +27 -0
- package/api/mablApiClient.js +22 -21
- package/api/mablApiClientFactory.js +0 -8
- package/browserLauncher/pageEvent.js +1 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowser.js +3 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowserLauncher.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightDom.js +12 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightPage.js +6 -0
- package/browserLauncher/puppeteerBrowserLauncher/puppeteerBrowser.js +10 -0
- package/browserLauncher/puppeteerBrowserLauncher/puppeteerElementHandle.js +12 -0
- package/browserLauncher/puppeteerBrowserLauncher/puppeteerPage.js +6 -0
- package/commands/applications/applications_cmds/list.js +5 -2
- package/commands/branches/branches_cmds/list.js +5 -2
- package/commands/config/config_cmds/get.js +5 -2
- package/commands/config/config_cmds/list.js +5 -2
- package/commands/credentials/credentials_cmds/list.js +5 -2
- package/commands/deploy/deploy_cmds/executionResultPresenter.js +5 -2
- package/commands/deploy/deploy_cmds/list.js +5 -2
- package/commands/environments/environments_cmds/list.js +5 -2
- package/commands/flows/flows_cmds/list.js +5 -2
- package/commands/plans/plans_cmds/list.js +5 -2
- package/commands/tests/executionUtil.js +6 -1
- package/commands/tests/testsUtil.js +8 -23
- package/commands/tests/tests_cmds/list.js +5 -2
- package/commands/tests/tests_cmds/trainer_cmds/trainerUtil.js +2 -2
- package/commands/workspaces/workspace_cmds/list.js +5 -2
- package/domUtil/index.js +1 -1
- package/execution/index.js +1 -1
- package/execution/index.js.LICENSE.txt +0 -6
- package/mablApi/index.js +1 -1
- package/mablscript/MablStep.js +3 -0
- package/mablscript/steps/AccessibilityCheck.js +14 -2
- package/mablscriptFind/index.js +1 -1
- package/package.json +3 -3
- package/resources/mablFind.js +1 -1
- package/util/resourceUtil.js +39 -13
- package/api/entities/JourneyRunScheduledMessage.js +0 -2
package/util/resourceUtil.js
CHANGED
|
@@ -22,15 +22,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
exports.findNodeModulesDirectory = exports.findDirectory = exports.findResource = void 0;
|
|
23
23
|
const path = __importStar(require("path"));
|
|
24
24
|
const fs = __importStar(require("fs"));
|
|
25
|
-
function findResource(pathInResource) {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return unpackedPath;
|
|
25
|
+
function findResource(pathInResource, resourcesPathOverride) {
|
|
26
|
+
const pathsToCheck = [];
|
|
27
|
+
if (resourcesPathOverride) {
|
|
28
|
+
pathsToCheck.push(`${resourcesPathOverride}/${pathInResource}`);
|
|
30
29
|
}
|
|
31
|
-
|
|
30
|
+
pathsToCheck.push(`${__dirname}/../../resources/${pathInResource}`);
|
|
31
|
+
pathsToCheck.push(`${__dirname}/../resources/${pathInResource}`);
|
|
32
|
+
const foundPath = pathsToCheck
|
|
33
|
+
.map((p) => path.normalize(path.resolve(p)))
|
|
34
|
+
.find(safeExistSync);
|
|
35
|
+
if (foundPath) {
|
|
36
|
+
return foundPath;
|
|
37
|
+
}
|
|
38
|
+
return path.normalize(pathsToCheck[0]);
|
|
32
39
|
}
|
|
33
40
|
exports.findResource = findResource;
|
|
41
|
+
function safeExistSync(path) {
|
|
42
|
+
try {
|
|
43
|
+
return fs.existsSync(path);
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
34
49
|
function findDirectory(pathFromBase) {
|
|
35
50
|
const unpackedPath = path.normalize(path.resolve(`${__dirname}/../../${pathFromBase}`));
|
|
36
51
|
const packedPath = path.normalize(path.resolve(`${__dirname}/../${pathFromBase}`));
|
|
@@ -40,20 +55,31 @@ function findDirectory(pathFromBase) {
|
|
|
40
55
|
return packedPath;
|
|
41
56
|
}
|
|
42
57
|
exports.findDirectory = findDirectory;
|
|
58
|
+
const CLI_NAMES = [
|
|
59
|
+
'mabl-cli',
|
|
60
|
+
'mabl-cli-dev',
|
|
61
|
+
'mabl-cli-internal',
|
|
62
|
+
'mabl-cli-internal-unpacked',
|
|
63
|
+
];
|
|
43
64
|
function findNodeModulesDirectory() {
|
|
44
65
|
const unpackedPath = path.normalize(path.resolve(`${__dirname}/../../../node_modules`));
|
|
45
66
|
if (fs.existsSync(unpackedPath)) {
|
|
46
67
|
return unpackedPath;
|
|
47
68
|
}
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (fs.existsSync(packedAsExecutionEngineDependency)) {
|
|
54
|
-
return packedAsExecutionEngineDependency;
|
|
69
|
+
for (const cliName of CLI_NAMES) {
|
|
70
|
+
const foundPath = checkForPackedPath(cliName);
|
|
71
|
+
if (foundPath) {
|
|
72
|
+
return foundPath;
|
|
73
|
+
}
|
|
55
74
|
}
|
|
56
75
|
const packedPath = path.normalize(path.resolve(`${__dirname}/../../node_modules`));
|
|
57
76
|
return packedPath;
|
|
58
77
|
}
|
|
59
78
|
exports.findNodeModulesDirectory = findNodeModulesDirectory;
|
|
79
|
+
function checkForPackedPath(cliName) {
|
|
80
|
+
const packedCheckPath = path.normalize(path.resolve(`${__dirname}/../../${cliName}/node_modules/`));
|
|
81
|
+
if (fs.existsSync(packedCheckPath)) {
|
|
82
|
+
return packedCheckPath;
|
|
83
|
+
}
|
|
84
|
+
return;
|
|
85
|
+
}
|