Skip to content

Commit d612cef

Browse files
authored
Merge pull request #12 from imgproxy/chore/update-core
Update @imgproxy/imgproxy-js-core
2 parents 53f83c9 + 2053875 commit d612cef

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

.changeset/swift-rabbits-press.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@imgproxy/imgproxy-node": minor
3+
---
4+
5+
Update @imgproxy/imgproxy-js-core

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@
6161
"vitest": "^0.34.1"
6262
},
6363
"dependencies": {
64-
"@imgproxy/imgproxy-js-core": "^1.0.8"
64+
"@imgproxy/imgproxy-js-core": "^1.3.0"
6565
}
6666
}

src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type {
22
Options,
33
OptionsImageInfo,
4-
URL,
4+
URLImageInfo,
55
} from "@imgproxy/imgproxy-js-core";
66

77
export interface IMaybeSignPair {
@@ -21,7 +21,7 @@ export interface ICryptPair {
2121

2222
export interface IRawUrl {
2323
value: string;
24-
displayAs?: URL["type"];
24+
displayAs?: URLImageInfo["type"];
2525
}
2626

2727
interface BaseGenerateImageUrl {

src/utils/normalizeUrl.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { URL } from "@imgproxy/imgproxy-js-core";
1+
import type { URLImageInfo } from "@imgproxy/imgproxy-js-core";
22
import type { IRawUrl } from "../types";
33
import bufferToBase64 from "./bufferToBase64.js";
44
import getEncryptPair from "./getEncryptPair.js";
@@ -10,7 +10,11 @@ interface INormalizeUrl {
1010
encryptIV?: string;
1111
}
1212

13-
const normalizeUrl = ({ url, encryptKey, encryptIV }: INormalizeUrl): URL => {
13+
const normalizeUrl = ({
14+
url,
15+
encryptKey,
16+
encryptIV,
17+
}: INormalizeUrl): URLImageInfo => {
1418
const changedUrl = {
1519
value: typeof url === "string" ? url : url.value,
1620
type: (typeof url === "string" ? "base64" : url.displayAs) || "base64",

0 commit comments

Comments
 (0)