frontpage-host 0.2.7 → 0.2.8

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.
@@ -433,8 +433,8 @@ export async function runShop(args) {
433
433
  const variantId = requireVariantId(takeFlag(work, "--id") ?? takeFlag(work, "--variant"));
434
434
  const priceCents = parseCentsFlag(takeFlag(work, "--price-cents"), "priceCents");
435
435
  const discountCents = parseCentsFlag(takeFlag(work, "--discount-cents"), "discountPriceCents");
436
- const clearDiscount = hasFlag(work, "--clear-discount");
437
- if (clearDiscount && discountCents !== undefined) {
436
+ const clearDiscount = takeBoolish(work, "--clear-discount", "clear-discount");
437
+ if (clearDiscount !== undefined && discountCents !== undefined) {
438
438
  throw new CliHttpError("Use either --discount-cents or --clear-discount, not both.", EXIT_USAGE, 0, "bad_request");
439
439
  }
440
440
  const stockRaw = takeFlag(work, "--stock");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frontpage-host",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Frontpage CLI — manage your site from the terminal",
5
5
  "type": "module",
6
6
  "bin": {