@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 CHANGED
@@ -2580,7 +2580,7 @@ import { fileURLToPath } from "url";
2580
2580
 
2581
2581
  // src/version.ts
2582
2582
  function getPackageVersion() {
2583
- return "0.0.1";
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 parsed = Number.parseInt(value, 10);
3318
- if (!Number.isFinite(parsed) || parsed < 1)
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/models",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "CLI-first local model and dataset lifecycle tool for open-source/open-weight catalogs",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",