@applitools/core 4.38.1-debug-20250507.0 → 4.38.1

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.
@@ -46,7 +46,6 @@ function getConsoleLogLimit() {
46
46
  async function runOfflineSnapshots(options) {
47
47
  var _a;
48
48
  const limitConsoleLogs = getConsoleLogLimit();
49
- const throttledRender = (0, throat_1.default)(Number(process.env.APPLITOOLS_RENDER_CONCURRENCY) || 1000, render);
50
49
  if (!options.offlineLocationPath)
51
50
  throw new Error('offlineLocationPath is required');
52
51
  const offlineLocationPath = path_1.default.resolve(options.offlineLocationPath);
@@ -224,7 +223,7 @@ async function runOfflineSnapshots(options) {
224
223
  async function uploadResources(targets, logger) {
225
224
  const uploadLogger = logger.extend({ tags: ['upload-resources'] });
226
225
  const promises = targets.map(async ({ target }) => {
227
- const resourcePromises = Object.values(target.resources)
226
+ let resourcePromises = Object.values(target.resources)
228
227
  .filter(isHashedResource)
229
228
  .map(async (resource) => {
230
229
  return ufgClient.uploadResource({
@@ -243,6 +242,16 @@ async function runOfflineSnapshots(options) {
243
242
  logger: uploadLogger,
244
243
  });
245
244
  });
245
+ resourcePromises = resourcePromises.concat(ufgClient.uploadResource({
246
+ resource: {
247
+ id: '',
248
+ url: '',
249
+ value: await throttledReadFile(path_1.default.join(offlineLocationPath, 'resources', target.snapshot.hash)),
250
+ contentType: target.snapshot.contentType,
251
+ hash: target.snapshot,
252
+ },
253
+ logger: uploadLogger,
254
+ }));
246
255
  return Promise.all(resourcePromises);
247
256
  });
248
257
  await Promise.all(promises);
@@ -253,7 +262,7 @@ async function runOfflineSnapshots(options) {
253
262
  async function runCheck(eyes, target, index, logger) {
254
263
  var _a;
255
264
  const checkLogger = logger.extend({ tags: [`check-${index}`] });
256
- const { mergedCheckSettings, baseTarget } = await throttledRender(target, checkLogger);
265
+ const { mergedCheckSettings, baseTarget } = await render(target, checkLogger);
257
266
  (_a = mergedCheckSettings.stepIndex) !== null && _a !== void 0 ? _a : (mergedCheckSettings.stepIndex = index);
258
267
  await eyes.check({
259
268
  target: { ...baseTarget, isTransformed: true },
@@ -266,7 +275,7 @@ async function runOfflineSnapshots(options) {
266
275
  async function runCheckAndClose(eyes, target, index, logger) {
267
276
  var _a;
268
277
  const checkLogger = logger.extend({ tags: [`check-${index}`] });
269
- const { mergedCheckSettings, baseTarget } = await throttledRender(target, checkLogger);
278
+ const { mergedCheckSettings, baseTarget } = await render(target, checkLogger);
270
279
  (_a = mergedCheckSettings.stepIndex) !== null && _a !== void 0 ? _a : (mergedCheckSettings.stepIndex = index);
271
280
  await eyes.checkAndClose({
272
281
  target: { ...baseTarget, isTransformed: true },
@@ -278,7 +287,7 @@ async function runOfflineSnapshots(options) {
278
287
  }
279
288
  async function runOpenCheckAndClose(target, logger, actualEnvironment) {
280
289
  const checkLogger = logger.extend({ tags: ['open-check-and-close'] });
281
- const { mergedCheckSettings, baseTarget } = await throttledRender(target, checkLogger);
290
+ const { mergedCheckSettings, baseTarget } = await render(target, checkLogger);
282
291
  const settings = (0, merge_configs_1.mergeConfigs)(target.settings, mergedCheckSettings);
283
292
  return core.base.openCheckAndCloseEyes({
284
293
  target: { ...baseTarget, isTransformed: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/core",
3
- "version": "4.38.1-debug-20250507.0",
3
+ "version": "4.38.1",
4
4
  "homepage": "https://applitools.com",
5
5
  "bugs": {
6
6
  "url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
@@ -87,8 +87,8 @@
87
87
  "@applitools/snippets": "2.6.5",
88
88
  "@applitools/socket": "1.2.4",
89
89
  "@applitools/spec-driver-webdriver": "1.2.4",
90
- "@applitools/ufg-client": "1.16.10-debug-20250507.0",
91
- "@applitools/utils": "1.8.1-debug-20250507.0",
90
+ "@applitools/ufg-client": "1.16.10",
91
+ "@applitools/utils": "1.8.1",
92
92
  "@types/ws": "8.5.5",
93
93
  "abort-controller": "3.0.0",
94
94
  "chalk": "4.1.2",
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TestError = void 0;
4
- const core_base_1 = require("@applitools/core-base");
5
- class TestError extends core_base_1.CoreError {
6
- constructor(result) {
7
- if (result.status === 'Failed') {
8
- super(`Test '${result.name}' of '${result.appName}' is failed! See details at ${result.url}`, {
9
- reason: 'test failed',
10
- result,
11
- });
12
- }
13
- else if (result.status === 'Unresolved') {
14
- if (result.isNew) {
15
- super(`Test '${result.name}' of '${result.appName}' is new! Please approve the new baseline at ${result.url}`, {
16
- reason: 'test new',
17
- result,
18
- });
19
- }
20
- else {
21
- super(`Test '${result.name}' of '${result.appName}' detected differences! See details at: ${result.url}`, {
22
- reason: 'test different',
23
- result,
24
- });
25
- }
26
- }
27
- else {
28
- super('');
29
- }
30
- }
31
- }
32
- exports.TestError = TestError;
@@ -1,5 +0,0 @@
1
- import type { TestResult } from '@applitools/core-base';
2
- import { CoreError } from '@applitools/core-base';
3
- export declare class TestError extends CoreError {
4
- constructor(result: TestResult);
5
- }