{"_id":"@damianmakkink/ipx","name":"@damianmakkink/ipx","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@damianmakkink/ipx","version":"0.0.1","repository":{"type":"git","url":"git+https://github.com/unjs/ipx.git"},"license":"MIT","exports":{".":{"require":"./dist/index.cjs","import":"./dist/index.mjs"}},"main":"dist/index.cjs","module":"dist/index.mjs","types":"./dist/index.d.ts","bin":{"ipx":"dist/cli.js"},"scripts":{"build":"siroc build","dev":"nodemon","lint":"eslint --ext .ts .","prepublishOnly":"yarn build","release":"yarn test && standard-version && git push --follow-tags && npm publish","start":"node bin/ipx.js","test":"yarn lint && jest"},"dependencies":{"consola":"^2.15.3","defu":"^5.0.0","destr":"^1.1.0","etag":"^1.8.1","fs-extra":"^10.0.0","image-meta":"^0.0.1","is-valid-path":"^0.1.1","listhen":"^0.2.4","node-fetch":"^2.6.1","sharp":"^0.29.0","ufo":"^0.7.9","xss":"^1.0.9"},"devDependencies":{"@nuxtjs/eslint-config-typescript":"latest","@types/etag":"latest","@types/fs-extra":"latest","@types/is-valid-path":"latest","@types/jest":"latest","@types/node-fetch":"latest","@types/sharp":"latest","eslint":"latest","jest":"latest","jiti":"latest","nodemon":"latest","siroc":"latest","standard-version":"latest","ts-jest":"latest","typescript":"latest"},"gitHead":"d0d2a64bf2d33550dfeef8f27a32cd997009edff","description":"[![NPM Vernion](https://flat.badgen.net/npm/v/ipx)](https://www.npmjs.com/package/ipx)\r [![NPM Downloads](https://flat.badgen.net/npm/dt/ipx)](https://www.npmjs.com/package/ipx)\r [![Package Size](https://flat.badgen.net/packagephobia/install/ipx)](https:/","bugs":{"url":"https://github.com/unjs/ipx/issues"},"homepage":"https://github.com/unjs/ipx#readme","_id":"@damianmakkink/ipx@0.0.1","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-jL+zv1Xiyrsa9rCY2wSdH2utpcp05HOsTCTORDcCneKdPYLd8R3R1a/HhmYMlIwSHy4AVhsgfE3ftZ7X+DzT4w==","shasum":"be3f7c7e0f8ea56fe3c877fc68a3b32dc800977c","tarball":"https://registry.npmjs.org/@damianmakkink/ipx/-/ipx-0.0.1.tgz","fileCount":7,"unpackedSize":57233,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID1Rkd5Wv8sShlUQZGefbO6iZHwvVWSXkPcN+CpqoGITAiEAtOnj4Gu7JBgihsB86Fh+5xgDdUIf6PdfyPSSXnGbypo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZR0wACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqTxA//XyjBwkiwaWz68AmjkT6KvBTxxzb407jzGTIfvqfM91mKxxqf\r\n4NJJV6PtUx2RuW4JDmUjFkqS4WQt26bgknWb69cUUZhBI8uXnoylyml2PQmE\r\n00OHPWHC7J5h+tzda6YUQiOh55JKAZ8oE0baqPMelpz2NAyD+ZMN3XEVmuyN\r\nJKsnDpU9pg+J42o+ULbeSsYtDxSXFZMtGQmHOUNPDGZ+lSVh8lF1MfoYLbgg\r\nb00hZvIzn/x9jHfvoLGl4v2UU/vmfmU//vI8FZsyLyKi0aYs36JixHaqHN+2\r\nGo0lORmFEwoy6cRjFo/XWL1kChn8uEkw4hgkIf+gy7n2iuDf/KJPhpWAlGnk\r\nZr8+J2qU7Dp3Np6vqcJ6WFpEOYP9w7/d1aK/f0uRZmDxb8utQj/4FzrjSeN8\r\nFo/Kt+DkNxMZUthJ6yPwtGAobx6nJeouPFJwA0hkbQkTxUnSujv8nyEKstew\r\ne/AC6+8srCFglUNGFvdzBhZCsTf5InGi2gCTpXHtAtuhZ2RiMROfm92TpwBp\r\nztl+iPoHV9UF6VCymIsRmKUMCFTusYPbX7Vlj6IP8cUbfLtXwv/kgx7Xg3xe\r\nnUwokdpSwhxXDg++SxiX2vf2Yc3jteLk4MtgXg0XuG5ykf4PRtBvfNZW+rTc\r\n31RjeJKfqTOtXJ5lrIULja0cOS0Yg8I9Gm0=\r\n=PNCB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"damianmakkink","email":"vonoxnl@gmail.com"},"directories":{},"maintainers":[{"name":"damianmakkink","email":"vonoxnl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ipx_0.0.1_1667570992579_0.22142251638093535"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-04T14:09:52.507Z","0.0.1":"2022-11-04T14:09:52.767Z","modified":"2022-11-04T14:09:52.908Z"},"maintainers":[{"name":"damianmakkink","email":"vonoxnl@gmail.com"}],"description":"[![NPM Vernion](https://flat.badgen.net/npm/v/ipx)](https://www.npmjs.com/package/ipx)\r [![NPM Downloads](https://flat.badgen.net/npm/dt/ipx)](https://www.npmjs.com/package/ipx)\r [![Package Size](https://flat.badgen.net/packagephobia/install/ipx)](https:/","homepage":"https://github.com/unjs/ipx#readme","repository":{"type":"git","url":"git+https://github.com/unjs/ipx.git"},"bugs":{"url":"https://github.com/unjs/ipx/issues"},"license":"MIT","readme":"# IPX\r\n\r\n[![NPM Vernion](https://flat.badgen.net/npm/v/ipx)](https://www.npmjs.com/package/ipx)\r\n[![NPM Downloads](https://flat.badgen.net/npm/dt/ipx)](https://www.npmjs.com/package/ipx)\r\n[![Package Size](https://flat.badgen.net/packagephobia/install/ipx)](https://packagephobia.now.sh/result?p=ipx)\r\n\r\nHigh performance, secure and easy to use image proxy based on [sharp](https://github.com/lovell/sharp) and [libvips](https://github.com/libvips/libvips).\r\n\r\n<h2 align=\"center\">Usage</h2>\r\n\r\n### Quick Start\r\n\r\nYou can use `ipx` command to start server using:\r\n\r\n```bash\r\n$ npx ipx\r\n```\r\n\r\nThe default server directory is the current working directory.\r\n\r\n### Programatic Usage\r\n\r\nYou can use IPX as a Connect/Express middleware or directly use ipx api.\r\n\r\n```js\r\nimport { createIPX, createIPXMiddleware } from \"ipx\";\r\n\r\nconst ipx = createIPX(/* options */);\r\nconst app = express();\r\napp.use(\"/image\", createIPXMiddleware(ipx));\r\n```\r\n\r\n### Examples\r\n\r\n> The examples assume that a `static` folder with `buffalo.png` file is present in the directory where IPX server is running.\r\n\r\nGet original image:\r\n\r\n`http://localhost:3000/_/static/buffalo.png`\r\n\r\nChange format to `webp` and keep other things same as source:\r\n\r\n`http://localhost:3000/f_webp/static/buffalo.png`\r\n\r\nKeep original format (`png`) and set width to `200`:\r\n\r\n`http://localhost:3000/w_200/static/buffalo.png`\r\n\r\nResize to `200x200px` using `embed` method and change format to `webp`:\r\n\r\n`http://localhost:3000/embed,f_webp,s_200x200/static/buffalo.png`\r\n\r\n### Modifiers\r\n\r\n| Property    | Docs                                                            | Example                                                 | Comments                                                                                                                                                          |\r\n| ----------- | :-------------------------------------------------------------- | :------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- |\r\n| width / w   | \\_                                                              | `http://localhost:3000/width_200/buffalo.png`           |\r\n| height / h  | \\_                                                              | `http://localhost:3000/height_200/buffalo.png`          |\r\n| resize / s  | \\_                                                              | `http://localhost:3000/s_200x200/buffalo.png`           |\r\n| trim        | [Docs](https://sharp.pixelplumbing.com/api-resize#trim)         | `http://localhost:3000/trim_100/buffalo.png`            |\r\n| format      | [Docs](https://sharp.pixelplumbing.com/api-output#toformat)     | `http://localhost:3000/format_webp/buffalo.png`         | Supported format: `jpg`, `jpeg`, `png`, `webp`, `avif`, `gif`, `heif`                                                                                             |\r\n| quality / q | \\_                                                              | `http://localhost:3000/quality_50/buffalo.png`          | Accepted values: 0 to 100                                                                                                                                         |\r\n| rotate      | [Docs](https://sharp.pixelplumbing.com/api-operation#rotate)    | `http://localhost:3000/rotate_45/buffalo.png`           |\r\n| enlarge     | \\_                                                              | `http://localhost:3000/enlarge,s_2000x2000/buffalo.png` | Allow the image to be upscaled. By default the returned image will never be larger than the source in any dimension, while preserving the requested aspect ratio. |\r\n| flip        | [Docs](https://sharp.pixelplumbing.com/api-operation#flip)      | `http://localhost:3000/flip/buffalo.png`                |\r\n| flop        | [Docs](https://sharp.pixelplumbing.com/api-operation#flop)      | `http://localhost:3000/flop/buffalo.png`                |\r\n| sharpen     | [Docs](https://sharp.pixelplumbing.com/api-operation#sharpen)   | `http://localhost:3000/sharpen_30/buffalo.png`          |\r\n| median      | [Docs](https://sharp.pixelplumbing.com/api-operation#median)    | `http://localhost:3000/median_10/buffalo.png`           |\r\n| gamma       | [Docs](https://sharp.pixelplumbing.com/api-operation#gamma)     | `http://localhost:3000/gamma_3/buffalo.png`             |\r\n| negate      | [Docs](https://sharp.pixelplumbing.com/api-operation#negate)    | `http://localhost:3000/negate/buffalo.png`              |\r\n| normalize   | [Docs](https://sharp.pixelplumbing.com/api-operation#normalize) | `http://localhost:3000/normalize/buffalo.png`           |\r\n| threshold   | [Docs](https://sharp.pixelplumbing.com/api-operation#threshold) | `http://localhost:3000/threshold_10/buffalo.png`        |\r\n| tint        | [Docs](https://sharp.pixelplumbing.com/api-colour#tint)         | `http://localhost:3000/tint_1098123/buffalo.png`        |\r\n| grayscale   | [Docs](https://sharp.pixelplumbing.com/api-colour#grayscale)    | `http://localhost:3000/grayscale/buffalo.png`           |\r\n| animated    | -                                                               | `http://localhost:3000/animated/buffalo.gif`            | Experimental                                                                                                                                                      |\r\n\r\n### Config\r\n\r\nConfig can be customized using `IPX_*` environment variables.\r\n\r\n- `IPX_DIR`\r\n\r\n  - Default: `.` (current working directory)\r\n\r\n- `IPX_DOMAINS`\r\n  - Default: `[]`\r\n\r\n<h2 align=\"center\">License</h2>\r\n\r\nMIT\r\n","readmeFilename":"README.md"}