@blazediff/bin 0.0.1 → 0.2.0
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/cli.js +2 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -25,7 +25,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
|
|
26
26
|
// src/index.ts
|
|
27
27
|
var import_core = __toESM(require("@blazediff/core"));
|
|
28
|
-
async function
|
|
28
|
+
async function blazeDiffBin(image1Path, image2Path, options) {
|
|
29
29
|
const [image1, image2] = await Promise.all([
|
|
30
30
|
options.transformer.transform(image1Path),
|
|
31
31
|
options.transformer.transform(image2Path)
|
|
@@ -198,7 +198,7 @@ async function main() {
|
|
|
198
198
|
try {
|
|
199
199
|
const { image1, image2, options } = parseArgs();
|
|
200
200
|
const transformer = await getTransformer(options.transformer);
|
|
201
|
-
const result = await
|
|
201
|
+
const result = await blazeDiffBin(image1, image2, {
|
|
202
202
|
outputPath: options.outputPath,
|
|
203
203
|
transformer,
|
|
204
204
|
coreOptions: {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { BlazeDiffTransformer, BlazeDiffOptions } from '@blazediff/types';
|
|
2
2
|
|
|
3
|
-
interface
|
|
3
|
+
interface BlazeDiffBinOptions {
|
|
4
4
|
outputPath?: string;
|
|
5
5
|
transformer: BlazeDiffTransformer;
|
|
6
6
|
coreOptions?: BlazeDiffOptions;
|
|
7
7
|
}
|
|
8
|
-
interface
|
|
8
|
+
interface BlazeDiffBinResult {
|
|
9
9
|
diffCount: number;
|
|
10
10
|
width: number;
|
|
11
11
|
height: number;
|
|
12
12
|
outputData?: Uint8Array;
|
|
13
13
|
duration: number;
|
|
14
14
|
}
|
|
15
|
-
declare function
|
|
15
|
+
declare function blazeDiffBin(image1Path: string, image2Path: string, options: BlazeDiffBinOptions): Promise<BlazeDiffBinResult>;
|
|
16
16
|
|
|
17
|
-
export { type
|
|
17
|
+
export { type BlazeDiffBinOptions, type BlazeDiffBinResult, blazeDiffBin as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { BlazeDiffTransformer, BlazeDiffOptions } from '@blazediff/types';
|
|
2
2
|
|
|
3
|
-
interface
|
|
3
|
+
interface BlazeDiffBinOptions {
|
|
4
4
|
outputPath?: string;
|
|
5
5
|
transformer: BlazeDiffTransformer;
|
|
6
6
|
coreOptions?: BlazeDiffOptions;
|
|
7
7
|
}
|
|
8
|
-
interface
|
|
8
|
+
interface BlazeDiffBinResult {
|
|
9
9
|
diffCount: number;
|
|
10
10
|
width: number;
|
|
11
11
|
height: number;
|
|
12
12
|
outputData?: Uint8Array;
|
|
13
13
|
duration: number;
|
|
14
14
|
}
|
|
15
|
-
declare function
|
|
15
|
+
declare function blazeDiffBin(image1Path: string, image2Path: string, options: BlazeDiffBinOptions): Promise<BlazeDiffBinResult>;
|
|
16
16
|
|
|
17
|
-
export { type
|
|
17
|
+
export { type BlazeDiffBinOptions, type BlazeDiffBinResult, blazeDiffBin as default };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var s=require('@blazediff/core');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var s__default=/*#__PURE__*/_interopDefault(s);async function
|
|
1
|
+
'use strict';var s=require('@blazediff/core');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var s__default=/*#__PURE__*/_interopDefault(s);async function m(n,a,e){let[t,i]=await Promise.all([e.transformer.transform(n),e.transformer.transform(a)]);if(t.width!==i.width||t.height!==i.height)throw new Error(`Image dimensions do not match: ${t.width}x${t.height} vs ${i.width}x${i.height}`);let r;e.outputPath&&(r=new Uint8Array(t.data.length));let f=performance.now(),o=s__default.default(t.data,i.data,r,t.width,t.height,e.coreOptions),h=performance.now()-f;return {diffCount:o,width:t.width,height:t.height,outputData:r,duration:h}}module.exports=m;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import s from'@blazediff/core';async function
|
|
1
|
+
import s from'@blazediff/core';async function m(n,a,e){let[t,i]=await Promise.all([e.transformer.transform(n),e.transformer.transform(a)]);if(t.width!==i.width||t.height!==i.height)throw new Error(`Image dimensions do not match: ${t.width}x${t.height} vs ${i.width}x${i.height}`);let r;e.outputPath&&(r=new Uint8Array(t.data.length));let f=performance.now(),o=s(t.data,i.data,r,t.width,t.height,e.coreOptions),h=performance.now()-f;return {diffCount:o,width:t.width,height:t.height,outputData:r,duration:h}}export{m as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blazediff/bin",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Command-line interface for the blazediff image comparison library",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"homepage": "https://github.com/teimurjan/blazediff",
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@blazediff/core": "0.0
|
|
41
|
-
"@blazediff/pngjs-transformer": "0.0
|
|
42
|
-
"@blazediff/sharp-transformer": "0.0
|
|
40
|
+
"@blazediff/core": "0.2.0",
|
|
41
|
+
"@blazediff/pngjs-transformer": "0.2.0",
|
|
42
|
+
"@blazediff/sharp-transformer": "0.2.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^24.3.0",
|
|
46
46
|
"tsup": "8.5.0",
|
|
47
47
|
"typescript": "5.9.2",
|
|
48
|
-
"@blazediff/types": "0.0
|
|
48
|
+
"@blazediff/types": "0.2.0"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "tsup",
|