wasm-image-optimization 0.1.1 → 0.1.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/esm/index.d.ts +2 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export declare const optimizeImage: ({ image, width, height, quality, }: {
|
|
1
|
+
export declare const optimizeImage: ({ image, width, height, quality, format, }: {
|
|
2
2
|
image: BufferSource;
|
|
3
3
|
width?: number | undefined;
|
|
4
4
|
height?: number | undefined;
|
|
5
5
|
quality?: number | undefined;
|
|
6
|
+
format?: "jpeg" | "png" | "webp" | undefined;
|
|
6
7
|
}) => Promise<Uint8Array | null>;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import LibImage from './libImage.js';
|
|
2
2
|
const libImage = LibImage();
|
|
3
|
-
export const optimizeImage = async ({ image, width = 0, height = 0, quality = 100, }) => libImage.then(({ optimize }) => optimize(image, width, height, quality));
|
|
3
|
+
export const optimizeImage = async ({ image, width = 0, height = 0, quality = 100, format = 'webp', }) => libImage.then(({ optimize }) => optimize(image, width, height, quality, format));
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/esm/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC,MAAM,QAAQ,GAAG,QAAQ,EAAE,CAAC;AAE5B,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAAE,EAClC,KAAK,EACL,KAAK,GAAG,CAAC,EACT,MAAM,GAAG,CAAC,EACV,OAAO,GAAG,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/esm/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC,MAAM,QAAQ,GAAG,QAAQ,EAAE,CAAC;AAE5B,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAAE,EAClC,KAAK,EACL,KAAK,GAAG,CAAC,EACT,MAAM,GAAG,CAAC,EACV,OAAO,GAAG,GAAG,EACb,MAAM,GAAG,MAAM,GAOhB,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC","sourcesContent":["import LibImage from './libImage.js';\n\nconst libImage = LibImage();\n\nexport const optimizeImage = async ({\n image,\n width = 0,\n height = 0,\n quality = 100,\n format = 'webp',\n}: {\n image: BufferSource;\n width?: number;\n height?: number;\n quality?: number;\n format?: 'jpeg' | 'png' | 'webp';\n}) => libImage.then(({ optimize }) => optimize(image, width, height, quality, format));\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wasm-image-optimization",
|
|
3
3
|
"description": "Optimize images with wasm on edge runtime",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./edge": {
|
|
7
7
|
"default": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"clone:lib": "git clone https://github.com/webmproject/libwebp && git clone https://github.com/AOMediaCodec/libavif"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@types/node": "^20.10.
|
|
47
|
+
"@types/node": "^20.10.6",
|
|
48
48
|
"@typescript-eslint/eslint-plugin": "^6.16.0",
|
|
49
49
|
"@typescript-eslint/parser": "^6.16.0",
|
|
50
50
|
"cpy-cli": "^5.0.0",
|