@hasna/models 0.0.1 → 0.0.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/cli/index.js +6 -3
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -2580,7 +2580,7 @@ import { fileURLToPath } from "url";
|
|
|
2580
2580
|
|
|
2581
2581
|
// src/version.ts
|
|
2582
2582
|
function getPackageVersion() {
|
|
2583
|
-
return "0.0.
|
|
2583
|
+
return "0.0.2";
|
|
2584
2584
|
}
|
|
2585
2585
|
|
|
2586
2586
|
// src/auth.ts
|
|
@@ -3314,8 +3314,11 @@ function planBlockedReason(plan) {
|
|
|
3314
3314
|
return null;
|
|
3315
3315
|
}
|
|
3316
3316
|
function parsePositiveInt(value) {
|
|
3317
|
-
const
|
|
3318
|
-
if (
|
|
3317
|
+
const trimmed = value.trim();
|
|
3318
|
+
if (!/^\d+$/.test(trimmed))
|
|
3319
|
+
throw new Error(`Expected a positive integer, got ${value}`);
|
|
3320
|
+
const parsed = Number(trimmed);
|
|
3321
|
+
if (!Number.isSafeInteger(parsed) || parsed < 1)
|
|
3319
3322
|
throw new Error(`Expected a positive integer, got ${value}`);
|
|
3320
3323
|
return parsed;
|
|
3321
3324
|
}
|