askui 0.12.1 → 0.12.2
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/dist/cjs/utils/base_64_image/base-64-image.d.ts +6 -9
- package/dist/cjs/utils/base_64_image/base-64-image.js +32 -33
- package/dist/cjs/utils/base_64_image/sharp.d.ts +2 -0
- package/dist/cjs/utils/base_64_image/sharp.js +56 -0
- package/dist/cjs/utils/proxy/proxy-builder.js +3 -1
- package/dist/cjs/utils/transformations.js +4 -2
- package/dist/esm/utils/base_64_image/base-64-image.d.ts +6 -9
- package/dist/esm/utils/base_64_image/base-64-image.js +32 -33
- package/dist/esm/utils/base_64_image/sharp.d.ts +2 -0
- package/dist/esm/utils/base_64_image/sharp.js +33 -0
- package/dist/esm/utils/proxy/proxy-builder.js +3 -1
- package/dist/esm/utils/transformations.js +4 -2
- package/package.json +4 -3
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
export declare class Base64Image {
|
|
3
|
-
private readonly aSharp;
|
|
4
|
-
private info;
|
|
5
3
|
private buffer;
|
|
6
4
|
static readonly strPrefix = "data:image/png;base64,";
|
|
5
|
+
private _sharp?;
|
|
7
6
|
private constructor();
|
|
8
|
-
private static fromSharp;
|
|
9
7
|
static fromPathOrString(pathOrStr: string): Promise<Base64Image>;
|
|
10
|
-
static fromPath(
|
|
8
|
+
static fromPath(filePath: string): Promise<Base64Image>;
|
|
11
9
|
static fromString(str: string): Promise<Base64Image>;
|
|
12
|
-
static fromBuffer
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
private static fromBuffer;
|
|
11
|
+
private getSharp;
|
|
12
|
+
getInfo(): Promise<sharp.OutputInfo>;
|
|
15
13
|
resizeToFitInto(dimension: number): Promise<Base64Image>;
|
|
16
14
|
toString(): string;
|
|
17
|
-
toBuffer(): Buffer;
|
|
18
15
|
}
|
|
@@ -13,36 +13,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.Base64Image = void 0;
|
|
16
|
-
const
|
|
16
|
+
const fs_1 = __importDefault(require("fs"));
|
|
17
|
+
const sharp_1 = require("./sharp");
|
|
17
18
|
const base_64_image_string_error_1 = require("./base-64-image-string-error");
|
|
18
19
|
class Base64Image {
|
|
19
|
-
constructor(
|
|
20
|
-
this.aSharp = aSharp;
|
|
21
|
-
this.info = info;
|
|
20
|
+
constructor(buffer) {
|
|
22
21
|
this.buffer = buffer;
|
|
23
22
|
}
|
|
24
|
-
static fromSharp(s) {
|
|
25
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
const { info, data } = yield s.toBuffer({ resolveWithObject: true });
|
|
27
|
-
return new Base64Image(s, info, data);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
23
|
static fromPathOrString(pathOrStr) {
|
|
31
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
|
|
33
|
-
return
|
|
34
|
-
}
|
|
35
|
-
catch (error) {
|
|
36
|
-
if (!(error instanceof base_64_image_string_error_1.Base64ImageStringError)) {
|
|
37
|
-
throw error;
|
|
38
|
-
}
|
|
25
|
+
if (pathOrStr.startsWith(Base64Image.strPrefix)) {
|
|
26
|
+
return Base64Image.fromString(pathOrStr);
|
|
39
27
|
}
|
|
40
28
|
return Base64Image.fromPath(pathOrStr);
|
|
41
29
|
});
|
|
42
30
|
}
|
|
43
|
-
static fromPath(
|
|
31
|
+
static fromPath(filePath) {
|
|
44
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
|
|
33
|
+
const data = yield fs_1.default.promises.readFile(filePath, 'base64');
|
|
34
|
+
return Base64Image.fromString(`${Base64Image.strPrefix}${data}`);
|
|
46
35
|
});
|
|
47
36
|
}
|
|
48
37
|
static fromString(str) {
|
|
@@ -51,36 +40,46 @@ class Base64Image {
|
|
|
51
40
|
throw new base_64_image_string_error_1.Base64ImageStringError(str, Base64Image.strPrefix);
|
|
52
41
|
}
|
|
53
42
|
const data = str.substring(Base64Image.strPrefix.length);
|
|
54
|
-
return Base64Image
|
|
43
|
+
return new Base64Image(Buffer.from(data, 'base64'));
|
|
55
44
|
});
|
|
56
45
|
}
|
|
57
46
|
static fromBuffer(buffer) {
|
|
58
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
return Base64Image
|
|
48
|
+
return new Base64Image(buffer);
|
|
60
49
|
});
|
|
61
50
|
}
|
|
62
|
-
|
|
63
|
-
return this
|
|
51
|
+
getSharp() {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
if (this._sharp === undefined) {
|
|
54
|
+
const createSharp = yield (0, sharp_1.getSharpFactory)();
|
|
55
|
+
this._sharp = createSharp(this.buffer);
|
|
56
|
+
}
|
|
57
|
+
return this._sharp;
|
|
58
|
+
});
|
|
64
59
|
}
|
|
65
|
-
|
|
66
|
-
return this
|
|
60
|
+
getInfo() {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
return (yield this.getSharp())
|
|
63
|
+
.toBuffer({ resolveWithObject: true })
|
|
64
|
+
.then(({ info }) => info);
|
|
65
|
+
});
|
|
67
66
|
}
|
|
68
67
|
resizeToFitInto(dimension) {
|
|
69
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
const { width, height } = yield this.getInfo();
|
|
70
|
+
const buffer = yield (yield this.getSharp())
|
|
71
|
+
.resize({
|
|
72
|
+
width: width >= height ? dimension : undefined,
|
|
73
|
+
height: height > width ? dimension : undefined,
|
|
74
|
+
fit: 'contain',
|
|
75
|
+
})
|
|
76
|
+
.toBuffer();
|
|
75
77
|
return Base64Image.fromBuffer(buffer);
|
|
76
78
|
});
|
|
77
79
|
}
|
|
78
80
|
toString() {
|
|
79
81
|
return `${Base64Image.strPrefix}${this.buffer.toString('base64')}`;
|
|
80
82
|
}
|
|
81
|
-
toBuffer() {
|
|
82
|
-
return this.buffer;
|
|
83
|
-
}
|
|
84
83
|
}
|
|
85
84
|
exports.Base64Image = Base64Image;
|
|
86
85
|
Base64Image.strPrefix = 'data:image/png;base64,';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.getSharpFactory = void 0;
|
|
32
|
+
let lazilyInitializedSharpFactory;
|
|
33
|
+
class SharpImportError extends Error {
|
|
34
|
+
}
|
|
35
|
+
function dynamicallyImportSharp() {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
try {
|
|
38
|
+
const sharp = yield Promise.resolve().then(() => __importStar(require('sharp')));
|
|
39
|
+
return sharp.default;
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
throw new SharpImportError('Can\'t find "sharp" module to do resizing of image!'
|
|
43
|
+
+ ' Please, install sharp for resizing support with'
|
|
44
|
+
+ ' "npm install --save-dev sharp" or "npm install --save sharp".');
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function getSharpFactory() {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
if (lazilyInitializedSharpFactory === undefined) {
|
|
51
|
+
lazilyInitializedSharpFactory = yield dynamicallyImportSharp();
|
|
52
|
+
}
|
|
53
|
+
return lazilyInitializedSharpFactory;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
exports.getSharpFactory = getSharpFactory;
|
|
@@ -40,7 +40,9 @@ function dynmicImportHpagent() {
|
|
|
40
40
|
return yield Promise.resolve().then(() => __importStar(require('hpagent')));
|
|
41
41
|
}
|
|
42
42
|
catch (err) {
|
|
43
|
-
throw new ProxyImportError('Can\'t find "hpagent" module to configure proxy!
|
|
43
|
+
throw new ProxyImportError('Can\'t find "hpagent" module to configure proxy!'
|
|
44
|
+
+ ' Please, install hpagent for proxy support with'
|
|
45
|
+
+ ' "npm install --save-dev hpagent" or "npm install --save hpagent".');
|
|
44
46
|
}
|
|
45
47
|
});
|
|
46
48
|
}
|
|
@@ -28,13 +28,15 @@ function resizeBase64ImageWithSameRatio(base64ImageString, maxEdge = 1400) {
|
|
|
28
28
|
lib_1.logger.debug('Image resizing');
|
|
29
29
|
try {
|
|
30
30
|
const image = yield base_64_image_1.Base64Image.fromString(base64ImageString);
|
|
31
|
-
|
|
31
|
+
const imageInfo = yield image.getInfo();
|
|
32
|
+
if (imageInfo.height <= maxEdge && imageInfo.width <= maxEdge) {
|
|
32
33
|
return { base64Image: base64ImageString, resizeRatio: 1 };
|
|
33
34
|
}
|
|
34
35
|
const resizedImage = yield image.resizeToFitInto(maxEdge);
|
|
36
|
+
const resizedImageInfo = yield resizedImage.getInfo();
|
|
35
37
|
return {
|
|
36
38
|
base64Image: resizedImage.toString(),
|
|
37
|
-
resizeRatio:
|
|
39
|
+
resizeRatio: imageInfo.width / resizedImageInfo.width,
|
|
38
40
|
};
|
|
39
41
|
}
|
|
40
42
|
catch (error) {
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
export declare class Base64Image {
|
|
3
|
-
private readonly aSharp;
|
|
4
|
-
private info;
|
|
5
3
|
private buffer;
|
|
6
4
|
static readonly strPrefix = "data:image/png;base64,";
|
|
5
|
+
private _sharp?;
|
|
7
6
|
private constructor();
|
|
8
|
-
private static fromSharp;
|
|
9
7
|
static fromPathOrString(pathOrStr: string): Promise<Base64Image>;
|
|
10
|
-
static fromPath(
|
|
8
|
+
static fromPath(filePath: string): Promise<Base64Image>;
|
|
11
9
|
static fromString(str: string): Promise<Base64Image>;
|
|
12
|
-
static fromBuffer
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
private static fromBuffer;
|
|
11
|
+
private getSharp;
|
|
12
|
+
getInfo(): Promise<sharp.OutputInfo>;
|
|
15
13
|
resizeToFitInto(dimension: number): Promise<Base64Image>;
|
|
16
14
|
toString(): string;
|
|
17
|
-
toBuffer(): Buffer;
|
|
18
15
|
}
|
|
@@ -7,36 +7,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import
|
|
10
|
+
import fs from 'fs';
|
|
11
|
+
import { getSharpFactory } from './sharp';
|
|
11
12
|
import { Base64ImageStringError } from './base-64-image-string-error';
|
|
12
13
|
export class Base64Image {
|
|
13
|
-
constructor(
|
|
14
|
-
this.aSharp = aSharp;
|
|
15
|
-
this.info = info;
|
|
14
|
+
constructor(buffer) {
|
|
16
15
|
this.buffer = buffer;
|
|
17
16
|
}
|
|
18
|
-
static fromSharp(s) {
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
const { info, data } = yield s.toBuffer({ resolveWithObject: true });
|
|
21
|
-
return new Base64Image(s, info, data);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
17
|
static fromPathOrString(pathOrStr) {
|
|
25
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
|
|
27
|
-
return
|
|
28
|
-
}
|
|
29
|
-
catch (error) {
|
|
30
|
-
if (!(error instanceof Base64ImageStringError)) {
|
|
31
|
-
throw error;
|
|
32
|
-
}
|
|
19
|
+
if (pathOrStr.startsWith(Base64Image.strPrefix)) {
|
|
20
|
+
return Base64Image.fromString(pathOrStr);
|
|
33
21
|
}
|
|
34
22
|
return Base64Image.fromPath(pathOrStr);
|
|
35
23
|
});
|
|
36
24
|
}
|
|
37
|
-
static fromPath(
|
|
25
|
+
static fromPath(filePath) {
|
|
38
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
|
|
27
|
+
const data = yield fs.promises.readFile(filePath, 'base64');
|
|
28
|
+
return Base64Image.fromString(`${Base64Image.strPrefix}${data}`);
|
|
40
29
|
});
|
|
41
30
|
}
|
|
42
31
|
static fromString(str) {
|
|
@@ -45,35 +34,45 @@ export class Base64Image {
|
|
|
45
34
|
throw new Base64ImageStringError(str, Base64Image.strPrefix);
|
|
46
35
|
}
|
|
47
36
|
const data = str.substring(Base64Image.strPrefix.length);
|
|
48
|
-
return Base64Image
|
|
37
|
+
return new Base64Image(Buffer.from(data, 'base64'));
|
|
49
38
|
});
|
|
50
39
|
}
|
|
51
40
|
static fromBuffer(buffer) {
|
|
52
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
return Base64Image
|
|
42
|
+
return new Base64Image(buffer);
|
|
54
43
|
});
|
|
55
44
|
}
|
|
56
|
-
|
|
57
|
-
return this
|
|
45
|
+
getSharp() {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
if (this._sharp === undefined) {
|
|
48
|
+
const createSharp = yield getSharpFactory();
|
|
49
|
+
this._sharp = createSharp(this.buffer);
|
|
50
|
+
}
|
|
51
|
+
return this._sharp;
|
|
52
|
+
});
|
|
58
53
|
}
|
|
59
|
-
|
|
60
|
-
return this
|
|
54
|
+
getInfo() {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
return (yield this.getSharp())
|
|
57
|
+
.toBuffer({ resolveWithObject: true })
|
|
58
|
+
.then(({ info }) => info);
|
|
59
|
+
});
|
|
61
60
|
}
|
|
62
61
|
resizeToFitInto(dimension) {
|
|
63
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
const { width, height } = yield this.getInfo();
|
|
64
|
+
const buffer = yield (yield this.getSharp())
|
|
65
|
+
.resize({
|
|
66
|
+
width: width >= height ? dimension : undefined,
|
|
67
|
+
height: height > width ? dimension : undefined,
|
|
68
|
+
fit: 'contain',
|
|
69
|
+
})
|
|
70
|
+
.toBuffer();
|
|
69
71
|
return Base64Image.fromBuffer(buffer);
|
|
70
72
|
});
|
|
71
73
|
}
|
|
72
74
|
toString() {
|
|
73
75
|
return `${Base64Image.strPrefix}${this.buffer.toString('base64')}`;
|
|
74
76
|
}
|
|
75
|
-
toBuffer() {
|
|
76
|
-
return this.buffer;
|
|
77
|
-
}
|
|
78
77
|
}
|
|
79
78
|
Base64Image.strPrefix = 'data:image/png;base64,';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
let lazilyInitializedSharpFactory;
|
|
11
|
+
class SharpImportError extends Error {
|
|
12
|
+
}
|
|
13
|
+
function dynamicallyImportSharp() {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
try {
|
|
16
|
+
const sharp = yield import('sharp');
|
|
17
|
+
return sharp.default;
|
|
18
|
+
}
|
|
19
|
+
catch (err) {
|
|
20
|
+
throw new SharpImportError('Can\'t find "sharp" module to do resizing of image!'
|
|
21
|
+
+ ' Please, install sharp for resizing support with'
|
|
22
|
+
+ ' "npm install --save-dev sharp" or "npm install --save sharp".');
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
export function getSharpFactory() {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
if (lazilyInitializedSharpFactory === undefined) {
|
|
29
|
+
lazilyInitializedSharpFactory = yield dynamicallyImportSharp();
|
|
30
|
+
}
|
|
31
|
+
return lazilyInitializedSharpFactory;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
@@ -17,7 +17,9 @@ function dynmicImportHpagent() {
|
|
|
17
17
|
return yield import('hpagent');
|
|
18
18
|
}
|
|
19
19
|
catch (err) {
|
|
20
|
-
throw new ProxyImportError('Can\'t find "hpagent" module to configure proxy!
|
|
20
|
+
throw new ProxyImportError('Can\'t find "hpagent" module to configure proxy!'
|
|
21
|
+
+ ' Please, install hpagent for proxy support with'
|
|
22
|
+
+ ' "npm install --save-dev hpagent" or "npm install --save hpagent".');
|
|
21
23
|
}
|
|
22
24
|
});
|
|
23
25
|
}
|
|
@@ -25,13 +25,15 @@ export function resizeBase64ImageWithSameRatio(base64ImageString, maxEdge = 1400
|
|
|
25
25
|
logger.debug('Image resizing');
|
|
26
26
|
try {
|
|
27
27
|
const image = yield Base64Image.fromString(base64ImageString);
|
|
28
|
-
|
|
28
|
+
const imageInfo = yield image.getInfo();
|
|
29
|
+
if (imageInfo.height <= maxEdge && imageInfo.width <= maxEdge) {
|
|
29
30
|
return { base64Image: base64ImageString, resizeRatio: 1 };
|
|
30
31
|
}
|
|
31
32
|
const resizedImage = yield image.resizeToFitInto(maxEdge);
|
|
33
|
+
const resizedImageInfo = yield resizedImage.getInfo();
|
|
32
34
|
return {
|
|
33
35
|
base64Image: resizedImage.toString(),
|
|
34
|
-
resizeRatio:
|
|
36
|
+
resizeRatio: imageInfo.width / resizedImageInfo.width,
|
|
35
37
|
};
|
|
36
38
|
}
|
|
37
39
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "askui",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "askui GmbH <info@askui.com> (http://www.askui.com/)",
|
|
6
6
|
"description": "Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on",
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"node-machine-id": "1.1.12",
|
|
59
59
|
"pino": "7.8.1",
|
|
60
60
|
"pino-pretty": "7.5.3",
|
|
61
|
-
"sharp": "0.30.6",
|
|
62
61
|
"tough-cookie": "4.1.2",
|
|
63
62
|
"url-join": "4.0.1",
|
|
64
63
|
"wait-port": "0.2.9",
|
|
@@ -79,12 +78,14 @@
|
|
|
79
78
|
"jest-extended": "^4.0.1",
|
|
80
79
|
"proxy": "^1.0.2",
|
|
81
80
|
"proxy-agent": "^5.0.0",
|
|
82
|
-
"sharp": "0.30.6",
|
|
83
81
|
"shx": "0.3.4",
|
|
84
82
|
"ts-jest": "28.0.4",
|
|
85
83
|
"typescript": "4.5.4"
|
|
86
84
|
},
|
|
87
85
|
"lint-staged": {
|
|
88
86
|
"./**/*.{js,ts}": "eslint --cache --fix --max-warnings 0"
|
|
87
|
+
},
|
|
88
|
+
"optionalDependencies": {
|
|
89
|
+
"sharp": "^0.32.6"
|
|
89
90
|
}
|
|
90
91
|
}
|