ipx 0.9.9 → 0.9.10

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.
@@ -560,7 +560,7 @@ function handleRequest(req, ipx) {
560
560
  }
561
561
  function createIPXMiddleware(ipx) {
562
562
  return function IPXMiddleware(req, res) {
563
- handleRequest({ url: req.url, headers: req.headers }, ipx).then((_res) => {
563
+ return handleRequest({ url: req.url, headers: req.headers }, ipx).then((_res) => {
564
564
  res.statusCode = _res.statusCode;
565
565
  res.statusMessage = _res.statusMessage;
566
566
  for (const name in _res.headers) {
@@ -549,7 +549,7 @@ function handleRequest(req, ipx) {
549
549
  }
550
550
  function createIPXMiddleware(ipx) {
551
551
  return function IPXMiddleware(req, res) {
552
- handleRequest({ url: req.url, headers: req.headers }, ipx).then((_res) => {
552
+ return handleRequest({ url: req.url, headers: req.headers }, ipx).then((_res) => {
553
553
  res.statusCode = _res.statusCode;
554
554
  res.statusMessage = _res.statusMessage;
555
555
  for (const name in _res.headers) {
package/dist/index.d.ts CHANGED
@@ -49,6 +49,6 @@ interface IPXHResponse {
49
49
  body: any;
50
50
  }
51
51
  declare function handleRequest(req: IPXHRequest, ipx: IPX): Promise<IPXHResponse>;
52
- declare function createIPXMiddleware(ipx: IPX): (req: IncomingMessage, res: ServerResponse) => void;
52
+ declare function createIPXMiddleware(ipx: IPX): (req: IncomingMessage, res: ServerResponse) => Promise<void>;
53
53
 
54
54
  export { IPX, IPXCTX, IPXHRequest, IPXHResponse, IPXOptions, ImageMeta, Source, SourceData, SourceFactory, createIPX, createIPXMiddleware, handleRequest };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ipx",
3
- "version": "0.9.9",
3
+ "version": "0.9.10",
4
4
  "repository": "unjs/ipx",
5
5
  "license": "MIT",
6
6
  "exports": {
@@ -25,9 +25,9 @@
25
25
  "image-meta": "^0.1.1",
26
26
  "listhen": "^0.2.13",
27
27
  "ohmyfetch": "^0.4.18",
28
- "pathe": "^0.3.0",
28
+ "pathe": "^0.3.2",
29
29
  "sharp": "^0.30.7",
30
- "ufo": "^0.8.4",
30
+ "ufo": "^0.8.5",
31
31
  "xss": "^1.0.13"
32
32
  },
33
33
  "devDependencies": {
@@ -46,7 +46,7 @@
46
46
  "unbuild": "latest",
47
47
  "vitest": "latest"
48
48
  },
49
- "packageManager": "pnpm@7.3.0",
49
+ "packageManager": "pnpm@7.5.0",
50
50
  "scripts": {
51
51
  "build": "unbuild",
52
52
  "dev": "nodemon",