@blazediff/bin 0.7.2 → 1.0.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 +4 -4
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -97,8 +97,8 @@ Examples:
|
|
|
97
97
|
`);
|
|
98
98
|
}
|
|
99
99
|
function parseRGB(colorStr) {
|
|
100
|
-
const parts = colorStr.split(",").map((s) => parseInt(s.trim()));
|
|
101
|
-
if (parts.length !== 3 || parts.some((p) => isNaN(p) || p < 0 || p > 255)) {
|
|
100
|
+
const parts = colorStr.split(",").map((s) => parseInt(s.trim(), 10));
|
|
101
|
+
if (parts.length !== 3 || parts.some((p) => Number.isNaN(p) || p < 0 || p > 255)) {
|
|
102
102
|
throw new Error(
|
|
103
103
|
`Invalid RGB color format: ${colorStr}. Expected format: r,g,b (e.g., 255,0,0)`
|
|
104
104
|
);
|
|
@@ -134,7 +134,7 @@ function parseArgs() {
|
|
|
134
134
|
case "--threshold":
|
|
135
135
|
if (nextArg) {
|
|
136
136
|
const threshold = parseFloat(nextArg);
|
|
137
|
-
if (isNaN(threshold) || threshold < 0 || threshold > 1) {
|
|
137
|
+
if (Number.isNaN(threshold) || threshold < 0 || threshold > 1) {
|
|
138
138
|
throw new Error(
|
|
139
139
|
`Invalid threshold: ${nextArg}. Must be between 0 and 1`
|
|
140
140
|
);
|
|
@@ -147,7 +147,7 @@ function parseArgs() {
|
|
|
147
147
|
case "--alpha":
|
|
148
148
|
if (nextArg) {
|
|
149
149
|
const alpha = parseFloat(nextArg);
|
|
150
|
-
if (isNaN(alpha) || alpha < 0 || alpha > 1) {
|
|
150
|
+
if (Number.isNaN(alpha) || alpha < 0 || alpha > 1) {
|
|
151
151
|
throw new Error(
|
|
152
152
|
`Invalid alpha: ${nextArg}. Must be between 0 and 1`
|
|
153
153
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blazediff/bin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Command-line interface for the blazediff image comparison library",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"homepage": "https://github.com/teimurjan/blazediff",
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@blazediff/core": "0.
|
|
41
|
-
"@blazediff/pngjs-transformer": "0.
|
|
42
|
-
"@blazediff/sharp-transformer": "0.
|
|
43
|
-
"@blazediff/types": "0.
|
|
40
|
+
"@blazediff/core": "1.0.0",
|
|
41
|
+
"@blazediff/pngjs-transformer": "1.0.0",
|
|
42
|
+
"@blazediff/sharp-transformer": "1.0.0",
|
|
43
|
+
"@blazediff/types": "1.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "^24.3.0",
|