bdy 1.8.47-dev → 1.8.48-dev
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/distTs/package.json
CHANGED
|
@@ -52,7 +52,7 @@ function createFormData(info, files) {
|
|
|
52
52
|
}
|
|
53
53
|
return formData;
|
|
54
54
|
}
|
|
55
|
-
async function sendSnapshot(snapshot) {
|
|
55
|
+
async function sendSnapshot(snapshot, firstSnapshot) {
|
|
56
56
|
const files = [];
|
|
57
57
|
const preparedSnapshot = prepareSnapshot(snapshot, files);
|
|
58
58
|
const info = {
|
|
@@ -73,6 +73,7 @@ async function sendSnapshot(snapshot) {
|
|
|
73
73
|
commitDetails: context_js_1.commitDetails,
|
|
74
74
|
cliId: context_js_1.cliId,
|
|
75
75
|
executionUrl: context_js_1.executionUrl,
|
|
76
|
+
firstSnapshot,
|
|
76
77
|
};
|
|
77
78
|
const formData = createFormData(info, files);
|
|
78
79
|
const [message] = await sendRequest({
|
|
@@ -106,6 +107,7 @@ async function sendSnapshots(snapshots) {
|
|
|
106
107
|
commitDetails: context_js_1.commitDetails,
|
|
107
108
|
cliId: context_js_1.cliId,
|
|
108
109
|
executionUrl: context_js_1.executionUrl,
|
|
110
|
+
firstSnapshot: true,
|
|
109
111
|
};
|
|
110
112
|
const formData = createFormData(info, files);
|
|
111
113
|
const [message] = await sendRequest({
|
|
@@ -15,6 +15,7 @@ const texts_1 = require("../texts");
|
|
|
15
15
|
const snapshots = [];
|
|
16
16
|
let defaultWidths = [];
|
|
17
17
|
let defaultScaleRatio = 1;
|
|
18
|
+
let firstSnapshot = true;
|
|
18
19
|
function setDefaultSettings({ defaultWidths: width, defaultScaleRatio: scaleRatio, }) {
|
|
19
20
|
defaultWidths = width;
|
|
20
21
|
defaultScaleRatio = scaleRatio;
|
|
@@ -26,11 +27,14 @@ function addSnapshot(snapshot) {
|
|
|
26
27
|
scaleRatio: defaultScaleRatio,
|
|
27
28
|
};
|
|
28
29
|
if (context_js_1.oneByOne) {
|
|
29
|
-
(0, queue_js_1.addToQueue)(() => processSnapshot(preparedSnapshots));
|
|
30
|
+
(0, queue_js_1.addToQueue)(() => processSnapshot(preparedSnapshots, firstSnapshot));
|
|
30
31
|
}
|
|
31
32
|
else {
|
|
32
33
|
snapshots.push(preparedSnapshots);
|
|
33
34
|
}
|
|
35
|
+
if (firstSnapshot) {
|
|
36
|
+
firstSnapshot = false;
|
|
37
|
+
}
|
|
34
38
|
}
|
|
35
39
|
async function finishProcessingSnapshots(spawnedProcessExitCode) {
|
|
36
40
|
if (context_js_1.oneByOne) {
|
|
@@ -40,7 +44,7 @@ async function finishProcessingSnapshots(spawnedProcessExitCode) {
|
|
|
40
44
|
return await processSnapshots();
|
|
41
45
|
}
|
|
42
46
|
}
|
|
43
|
-
async function processSnapshot(snapshot) {
|
|
47
|
+
async function processSnapshot(snapshot, firstSnapshot) {
|
|
44
48
|
let t1;
|
|
45
49
|
if (context_js_1.debug) {
|
|
46
50
|
t1 = performance.now();
|
|
@@ -49,7 +53,7 @@ async function processSnapshot(snapshot) {
|
|
|
49
53
|
? snapshot
|
|
50
54
|
: await getSnapshotWithResources(snapshot);
|
|
51
55
|
try {
|
|
52
|
-
const response = await (0, requests_js_1.sendSnapshot)(preparedSnapshot);
|
|
56
|
+
const response = await (0, requests_js_1.sendSnapshot)(preparedSnapshot, firstSnapshot);
|
|
53
57
|
output_1.default.normal(response);
|
|
54
58
|
}
|
|
55
59
|
catch (error) {
|