@neta-art/cohub-cli 2.2.0 → 2.2.1
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.
|
@@ -5,6 +5,7 @@ const PRODUCT_STATUSES = ["draft", "active"];
|
|
|
5
5
|
const PRODUCT_UPDATE_STATUSES = ["draft", "active", "archived"];
|
|
6
6
|
const PRODUCT_VISIBILITIES = ["public", "private"];
|
|
7
7
|
const BENEFIT_STATUSES = ["active", "archived"];
|
|
8
|
+
const MIN_PRODUCT_AMOUNT_USD = 0.5;
|
|
8
9
|
function requireText(value, label, flag) {
|
|
9
10
|
const text = value?.trim();
|
|
10
11
|
if (text)
|
|
@@ -35,11 +36,13 @@ function parseInteger(value, label, options) {
|
|
|
35
36
|
function parseAmountUsd(value) {
|
|
36
37
|
const text = requireText(value, "amount", "--amount-usd <amount>");
|
|
37
38
|
if (!/^(?:\d+|\d+\.\d{1,2}|\.\d{1,2})$/.test(text)) {
|
|
38
|
-
return error("Invalid amount", "--amount-usd must be a
|
|
39
|
+
return error("Invalid amount", "--amount-usd must be a USD amount with at most 2 decimals.");
|
|
39
40
|
}
|
|
40
41
|
const amount = Number(text);
|
|
41
42
|
if (!Number.isFinite(amount))
|
|
42
43
|
return error("Invalid amount", "--amount-usd must be a finite USD amount.");
|
|
44
|
+
if (amount < MIN_PRODUCT_AMOUNT_USD)
|
|
45
|
+
return error("Invalid amount", "--amount-usd must be at least 0.5.");
|
|
43
46
|
return amount;
|
|
44
47
|
}
|
|
45
48
|
function parseMetadataJson(value) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neta-art/cohub-cli",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "CLI for Cohub — spaces, sessions, and agent collaboration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@neta-art/generation": "^0.1.10",
|
|
17
17
|
"commander": "^14.0.3",
|
|
18
18
|
"sharp": "^0.34.5",
|
|
19
|
-
"@neta-art/cohub": "2.2.
|
|
19
|
+
"@neta-art/cohub": "2.2.1"
|
|
20
20
|
},
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public"
|