@blazediff/bin 0.0.1 → 0.1.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 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 compareImages(image1Path, image2Path, options) {
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 compareImages(image1, image2, {
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 CompareImagesOptions {
3
+ interface BlazeDiffBinOptions {
4
4
  outputPath?: string;
5
5
  transformer: BlazeDiffTransformer;
6
6
  coreOptions?: BlazeDiffOptions;
7
7
  }
8
- interface CompareImagesResult {
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 compareImages(image1Path: string, image2Path: string, options: CompareImagesOptions): Promise<CompareImagesResult>;
15
+ declare function blazeDiffBin(image1Path: string, image2Path: string, options: BlazeDiffBinOptions): Promise<BlazeDiffBinResult>;
16
16
 
17
- export { type CompareImagesOptions, type CompareImagesResult, compareImages };
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 CompareImagesOptions {
3
+ interface BlazeDiffBinOptions {
4
4
  outputPath?: string;
5
5
  transformer: BlazeDiffTransformer;
6
6
  coreOptions?: BlazeDiffOptions;
7
7
  }
8
- interface CompareImagesResult {
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 compareImages(image1Path: string, image2Path: string, options: CompareImagesOptions): Promise<CompareImagesResult>;
15
+ declare function blazeDiffBin(image1Path: string, image2Path: string, options: BlazeDiffBinOptions): Promise<BlazeDiffBinResult>;
16
16
 
17
- export { type CompareImagesOptions, type CompareImagesResult, compareImages };
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 d(i,n,r){let[t,e]=await Promise.all([r.transformer.transform(i),r.transformer.transform(n)]);if(t.width!==e.width||t.height!==e.height)throw new Error(`Image dimensions do not match: ${t.width}x${t.height} vs ${e.width}x${e.height}`);let a;r.outputPath&&(a=new Uint8Array(t.data.length));let o=performance.now(),m=s__default.default(t.data,e.data,a,t.width,t.height,r.coreOptions),f=performance.now()-o;return {diffCount:m,width:t.width,height:t.height,outputData:a,duration:f}}exports.compareImages=d;
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 d(i,n,r){let[t,e]=await Promise.all([r.transformer.transform(i),r.transformer.transform(n)]);if(t.width!==e.width||t.height!==e.height)throw new Error(`Image dimensions do not match: ${t.width}x${t.height} vs ${e.width}x${e.height}`);let a;r.outputPath&&(a=new Uint8Array(t.data.length));let o=performance.now(),m=s(t.data,e.data,a,t.width,t.height,r.coreOptions),f=performance.now()-o;return {diffCount:m,width:t.width,height:t.height,outputData:a,duration:f}}export{d as compareImages};
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.1",
3
+ "version": "0.1.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.1",
41
- "@blazediff/pngjs-transformer": "0.0.1",
42
- "@blazediff/sharp-transformer": "0.0.1"
40
+ "@blazediff/core": "0.1.0",
41
+ "@blazediff/pngjs-transformer": "0.1.0",
42
+ "@blazediff/sharp-transformer": "0.1.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.1"
48
+ "@blazediff/types": "0.1.0"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "tsup",