Socket
Socket
Sign inDemoInstall

ipx

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipx - npm Package Compare versions

Comparing version 2.0.0-1 to 2.0.0

dist/chunks/svgo-xss.cjs

22

dist/index.d.ts
import { Color, KernelEnum, Sharp, SharpOptions } from 'sharp';
import { ImageMeta } from 'image-meta';
import { Config } from 'svgo';
import * as h3 from 'h3';

@@ -30,8 +32,2 @@ import { Storage, Driver } from 'unstorage';

}
interface ImageMeta {
width: number;
height: number;
type: string;
mimeType: string;
}

@@ -118,5 +114,5 @@ declare const quality: Handler;

process: () => Promise<{
data: Buffer;
meta: ImageMeta;
format: string;
data: Buffer | string;
meta?: ImageMeta;
format?: string;
}>;

@@ -130,10 +126,11 @@ };

httpStorage?: IPXStorage;
svgo?: false | Config;
};
declare function createIPX(userOptions: IPXOptions): IPX;
declare function createIPXH3Handler(ipx: IPX): h3.EventHandler<h3.EventHandlerRequest, Promise<Buffer | {
declare function createIPXH3Handler(ipx: IPX): h3.EventHandler<h3.EventHandlerRequest, Promise<string | void | Buffer | {
error: {
message: string;
};
} | null>>;
}>>;
declare function createIPXH3App(ipx: IPX): h3.App;

@@ -149,2 +146,3 @@ declare function createIPXWebServer(ipx: IPX): h3.WebHandler;

allowAllDomains?: boolean;
ignoreCacheControl?: boolean;
};

@@ -161,2 +159,2 @@ declare function ipxHttpStorage(_options?: HTTPStorageOptions): IPXStorage;

export { type HTTPStorageOptions, type Handler, type HandlerContext, type IPX, type IPXOptions, type IPXStorage, type IPXStorageMeta, type IPXStorageOptions, type ImageMeta, type NodeFSSOptions, createIPX, createIPXH3App, createIPXH3Handler, createIPXNodeServer, createIPXPlainServer, createIPXWebServer, ipxFSStorage, ipxHttpStorage, unstorageToIPXStorage };
export { type HTTPStorageOptions, type Handler, type HandlerContext, type IPX, type IPXOptions, type IPXStorage, type IPXStorageMeta, type IPXStorageOptions, type NodeFSSOptions, createIPX, createIPXH3App, createIPXH3Handler, createIPXNodeServer, createIPXPlainServer, createIPXWebServer, ipxFSStorage, ipxHttpStorage, unstorageToIPXStorage };
{
"name": "ipx",
"version": "2.0.0-1",
"version": "2.0.0",
"repository": "unjs/ipx",

@@ -47,3 +47,3 @@ "description": "High performance, secure and easy-to-use image optimizer.",

"h3": "^1.8.2",
"image-meta": "^0.1.1",
"image-meta": "^0.2.0",
"listhen": "^1.5.5",

@@ -53,4 +53,6 @@ "ofetch": "^1.3.3",

"sharp": "^0.32.6",
"ufo": "^1.3.0",
"unstorage": "^1.9.0"
"svgo": "^3.0.2",
"ufo": "^1.3.1",
"unstorage": "^1.9.0",
"xss": "^1.0.14"
},

@@ -60,5 +62,5 @@ "devDependencies": {

"@types/is-valid-path": "^0.1.0",
"@vitest/coverage-v8": "^0.34.5",
"@vitest/coverage-v8": "^0.34.6",
"changelogen": "^0.5.5",
"eslint": "^8.50.0",
"eslint": "^8.51.0",
"eslint-config-unjs": "^0.2.1",

@@ -70,5 +72,5 @@ "jiti": "^1.20.0",

"unbuild": "^2.0.0",
"vitest": "^0.34.5"
"vitest": "^0.34.6"
},
"packageManager": "pnpm@8.8.0"
}

@@ -6,8 +6,8 @@ # 🖼️ IPX

High performance, secure and easy-to-use image optimizer.
> [!NOTE]
> This is the active branch for IPX v2. Check out [ipx/v1](https://github.com/unjs/ipx/tree/v1) for v1 docs.
Powered by [sharp](https://github.com/lovell/sharp) and [libvips](https://github.com/libvips/libvips).
High performance, secure and easy-to-use image optimizer powered by [sharp](https://github.com/lovell/sharp) and [svgo](https://github.com/svg/svgo).
> [!IMPORTANT]
> This is the development branch for IPX v2. Check out [ipx/v1](https://github.com/unjs/ipx/tree/v1) for latest stable docs and [#71](https://github.com/unjs/ipx/issues/171) for v2 roadmap.
Used by [Nuxt Image](https://image.nuxt.com/) and [Netlify](https://www.npmjs.com/package/@netlify/ipx) and open to everyone!

@@ -21,3 +21,3 @@ ## Using CLI

```bash
npx ipx@next-2 serve --dir ./
npx ipx serve --dir ./
```

@@ -28,3 +28,3 @@

```bash
bun x npx ipx@next-2 serve --dir ./
bun x npx ipx serve --dir ./
```

@@ -39,8 +39,3 @@

```ts
import {
createIPX,
createIPXMiddleware,
ipxFSStorage,
ipxHttpStorage,
} from "ipx";
import { createIPX, ipxFSStorage, ipxHttpStorage } from "ipx";

@@ -51,4 +46,2 @@ const ipx = createIPX({

});
const ipxMiddleware = createIPXMiddleware(ipx);
```

@@ -59,7 +52,18 @@

```js
import { createIPX, createIPXMiddleware } from "ipx";
import { listen } from "listhen";
import { createApp, toNodeListener } from "h3";
import {
createIPX,
ipxFSStorage,
ipxHttpStorage,
createIPXH3Handler,
} from "ipx";
const app = createApp().use("/", fromNodeMiddleware(ipxMiddleware));
const ipx = createIPX({
storage: ipxFSStorage({ dir: "./public" }),
httpStorage: ipxHttpStorage({ domains: ["picsum.photos"] }),
});
const app = createApp().use("/", createIPXH3Handler(ipx));
listen(toNodeListener(app));

@@ -73,5 +77,16 @@ ```

import express from "express";
import {
createIPX,
ipxFSStorage,
ipxHttpStorage,
createIPXNodeServer,
} from "ipx";
const app = express().use("/", ipxMiddleware);
const ipx = createIPX({
storage: ipxFSStorage({ dir: "./public" }),
httpStorage: ipxHttpStorage({ domains: ["picsum.photos"] }),
});
const app = express().use("/", createIPXNodeServer(ipx));
listen(app);

@@ -78,0 +93,0 @@ ```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc