@mablhq/mabl-cli 2.16.4 → 2.19.13
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/mablApiClient.js +3 -2
- package/browserEngines/chromiumBrowserEngine.js +4 -2
- package/browserLauncher/pageEvent.js +0 -1
- package/browserLauncher/playwrightBrowserLauncher/playwrightHttpRequest.js +6 -7
- package/browserLauncher/playwrightBrowserLauncher/playwrightPage.js +21 -5
- package/commands/auth/auth_cmds/activate-key.js +12 -3
- package/commands/tests/tests_cmds/run-mobile.js +36 -14
- package/commands/tests/tests_cmds/runUtils.js +11 -1
- package/core/messaging/actions/MobileTrainingActions.js +17 -0
- package/domUtil/index.js +1 -1
- package/execution/index.js +2 -2
- package/execution/index.js.LICENSE.txt +15 -0
- package/mablApi/index.js +1 -1
- package/mablscriptFind/index.js +1 -1
- package/package.json +1 -1
- package/resources/mablFind.js +1 -1
- package/socketTunnel/index.js +1 -1
- package/upload/index.js +1 -1
- package/util/FileCache.js +5 -5
package/util/FileCache.js
CHANGED
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.FileCache = void 0;
|
|
7
|
-
const crc32c_1 = require("@aws-crypto/crc32c");
|
|
8
7
|
const fs_1 = require("fs");
|
|
9
8
|
const promises_1 = require("fs/promises");
|
|
10
9
|
const node_path_1 = require("node:path");
|
|
11
10
|
const cachedir_1 = __importDefault(require("cachedir"));
|
|
11
|
+
const upload_1 = require("../upload");
|
|
12
12
|
const env_1 = require("../env/env");
|
|
13
13
|
const loggingProvider_1 = require("../providers/logging/loggingProvider");
|
|
14
14
|
const DEFAULT_READ_BUFFER_SIZE_BYTES = 8 * 1024 * 1024;
|
|
@@ -133,11 +133,11 @@ class FileCache {
|
|
|
133
133
|
const fd = await (0, promises_1.open)(destination, 'w');
|
|
134
134
|
const writeStream = fd.createWriteStream({ autoClose: true });
|
|
135
135
|
const metadata = await new Promise((resolve, reject) => {
|
|
136
|
-
const crc32c = new
|
|
136
|
+
const crc32c = new upload_1.Crc32cChecksum();
|
|
137
137
|
let sizeBytes = 0;
|
|
138
138
|
let percentageComplete = 0;
|
|
139
139
|
writeStream.on('error', (error) => reject(error));
|
|
140
|
-
writeStream.on('close', () => resolve({ crc32cHex: crc32c.
|
|
140
|
+
writeStream.on('close', () => resolve({ crc32cHex: crc32c.digestHex(), sizeBytes }));
|
|
141
141
|
reader.on('error', (error) => reject(error));
|
|
142
142
|
reader.on('end', () => writeStream.close());
|
|
143
143
|
reader.on('data', (chunk) => {
|
|
@@ -159,7 +159,7 @@ class FileCache {
|
|
|
159
159
|
}
|
|
160
160
|
async computeCrc32cHex(path) {
|
|
161
161
|
const fd = await (0, promises_1.open)(path, 'r');
|
|
162
|
-
const crc32c = new
|
|
162
|
+
const crc32c = new upload_1.Crc32cChecksum();
|
|
163
163
|
let totalBytesRead = 0;
|
|
164
164
|
while (true) {
|
|
165
165
|
const { buffer, bytesRead: chunkSizeBytes } = await fd.read({
|
|
@@ -174,7 +174,7 @@ class FileCache {
|
|
|
174
174
|
const chunk = buffer.subarray(0, chunkSizeBytes);
|
|
175
175
|
crc32c.update(chunk);
|
|
176
176
|
}
|
|
177
|
-
return crc32c.
|
|
177
|
+
return crc32c.digestHex();
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
exports.FileCache = FileCache;
|