@koda-sl/baker-cli 0.371.0-dev.8cef1f9ea → 0.372.0-dev.0d1659d6a
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 +18 -1
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -64584,6 +64584,8 @@ var shopifyProductRequestSchema = z50.object({
|
|
|
64584
64584
|
content: flag.optional(),
|
|
64585
64585
|
/** One custom field whole, by its name or `namespace.key`. */
|
|
64586
64586
|
field: z50.string().min(1).max(200).optional(),
|
|
64587
|
+
/** With `field`: the option (its `variantId`) whose field to return, when options share one. */
|
|
64588
|
+
variant: z50.string().regex(/^\d{1,30}$/, "an option's variantId").optional(),
|
|
64587
64589
|
/** How many of the option each buy link puts in the cart (1-99, default 1). */
|
|
64588
64590
|
quantity: z50.coerce.number().int().min(1).max(SHOPIFY_MAX_BUY_QUANTITY).optional()
|
|
64589
64591
|
});
|
|
@@ -64727,6 +64729,8 @@ var shopifyFieldRefSchema = z50.object({
|
|
|
64727
64729
|
url: z50.string().optional(),
|
|
64728
64730
|
mimeType: z50.string().optional(),
|
|
64729
64731
|
alt: z50.string().optional(),
|
|
64732
|
+
/** A video's preview image; its `url` is the video file itself. */
|
|
64733
|
+
previewUrl: z50.string().optional(),
|
|
64730
64734
|
/** A product's or a collection's title, from Baker's copy. */
|
|
64731
64735
|
title: z50.string().optional(),
|
|
64732
64736
|
/** An image brought into the library: its imageId, to place like the product's photos. */
|
|
@@ -65053,7 +65057,8 @@ function contentHints(product) {
|
|
|
65053
65057
|
}
|
|
65054
65058
|
const truncated = product.content?.fields.find((field) => field.truncated);
|
|
65055
65059
|
if (truncated) {
|
|
65056
|
-
|
|
65060
|
+
const option = truncated.variantId ? ` --variant ${truncated.variantId}` : "";
|
|
65061
|
+
hints2.push(`Some fields are shown in part: read one whole with \`--field ${truncated.key}${option}\`.`);
|
|
65057
65062
|
}
|
|
65058
65063
|
if (product.content?.unreadable?.length || product.content?.fields.some((field) => field.unreadable)) {
|
|
65059
65064
|
hints2.push(
|
|
@@ -65256,6 +65261,11 @@ registerSchema({
|
|
|
65256
65261
|
description: 'One custom field whole, by its name or its key (e.g. "Size chart" or custom.size_chart)',
|
|
65257
65262
|
required: false
|
|
65258
65263
|
},
|
|
65264
|
+
variant: {
|
|
65265
|
+
type: "string",
|
|
65266
|
+
description: "With --field: the option whose field to return, by its variantId (options share their fields, e.g. --field custom.fit --variant 102)",
|
|
65267
|
+
required: false
|
|
65268
|
+
},
|
|
65259
65269
|
quantity: {
|
|
65260
65270
|
type: "number",
|
|
65261
65271
|
description: "How many of the option each buy link puts in the cart, 1-99 (default 1)",
|
|
@@ -65367,6 +65377,11 @@ var productCommand = defineCommand209({
|
|
|
65367
65377
|
default: false
|
|
65368
65378
|
},
|
|
65369
65379
|
field: { type: "string", description: "One custom field whole, by its name or key", required: false },
|
|
65380
|
+
variant: {
|
|
65381
|
+
type: "string",
|
|
65382
|
+
description: "With --field: the option whose field it is, by its variantId",
|
|
65383
|
+
required: false
|
|
65384
|
+
},
|
|
65370
65385
|
quantity: {
|
|
65371
65386
|
type: "string",
|
|
65372
65387
|
description: "How many each buy link puts in the cart, 1-99 (default 1)",
|
|
@@ -65391,6 +65406,7 @@ var productCommand = defineCommand209({
|
|
|
65391
65406
|
outOfStock: args5["out-of-stock"],
|
|
65392
65407
|
content: args5.content,
|
|
65393
65408
|
field: args5.field,
|
|
65409
|
+
variant: args5.variant,
|
|
65394
65410
|
quantity: args5.quantity,
|
|
65395
65411
|
full: args5.full
|
|
65396
65412
|
})
|
|
@@ -65466,6 +65482,7 @@ Examples:
|
|
|
65466
65482
|
baker shopify product the-complete-snowboard # one product: options with buyUrl, prices, photos, videos
|
|
65467
65483
|
baker shopify product <handle> --content # its whole details: description, custom fields, subscriptions
|
|
65468
65484
|
baker shopify product <handle> --field "Size chart" # one custom field, whole
|
|
65485
|
+
baker shopify product <handle> --field custom.fit --variant <variantId> # one option's field, whole
|
|
65469
65486
|
baker shopify product <handle> --quantity 2 # buy links that put 2 in the cart
|
|
65470
65487
|
baker shopify product <id> --out-of-stock # only its options that are out of stock
|
|
65471
65488
|
baker shopify stock # every product with options out of stock
|