wasm-image-optimization 0.1.8 → 0.1.9
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/next/index.js +1 -1
- package/dist/next/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/next/package.json +0 -3
package/dist/next/index.js
CHANGED
package/dist/next/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/next/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/next/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,IAAI,MAAM,6BAA6B,CAAC;AAE/C,MAAM,QAAQ,GAAG,QAAQ,CAAC;IACxB,eAAe,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE;QAC3C,QAAQ,CAAC,MAAM,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;CACF,CAAC,CAAC;AAEH,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 '../workers//libImage.js';\nimport WASM from '../esm/libImage.wasm?module';\n\nconst libImage = LibImage({\n instantiateWasm: async (imports, receiver) => {\n receiver(await WebAssembly.instantiate(WASM, imports));\n },\n});\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.9",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./esm": {
|
|
7
7
|
"default": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"scripts": {
|
|
49
49
|
"test": "yarn ts-node test",
|
|
50
50
|
"lint:fix": "eslint --fix src/ && prettier -w src",
|
|
51
|
-
"build": "tsc && tsc -p ./tsconfig.csj.json && cpy esm dist
|
|
51
|
+
"build": "tsc && tsc -p ./tsconfig.csj.json && cpy esm dist",
|
|
52
52
|
"build:wasm": "docker compose -f docker/docker-compose.yml run emcc make -j",
|
|
53
53
|
"docker:shell": "docker compose -f docker/docker-compose.yml run emcc bash -l"
|
|
54
54
|
},
|
package/dist/next/package.json
DELETED