@40rty/ams-cli 0.5.15 → 0.5.16
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/wire.js +2 -1
- package/package.json +1 -1
package/dist/wire.js
CHANGED
|
@@ -435,7 +435,7 @@ function partsText(parts) {
|
|
|
435
435
|
var ModelTurnAskSchema = z11.object({
|
|
436
436
|
kind: z11.enum(["choice", "open"]),
|
|
437
437
|
parts: z11.array(PartSchema).min(1)
|
|
438
|
-
}).refine((ask) => partsText(ask.parts).trim().length > 0, { message: "the question reads as nothing" }).transform((ask) => {
|
|
438
|
+
}).refine((ask) => partsText(ask.parts).trim().length > 0, { message: "the question reads as nothing" }).refine((ask) => /\?["'”’*)\s]*$/.test(partsText(ask.parts)), { message: "an ask is a question" }).transform((ask) => {
|
|
439
439
|
const answers = ask.parts.filter((p) => typeof p !== "string").length;
|
|
440
440
|
if (ask.kind === "choice" && answers >= MIN_CHOICE_ANSWERS && answers <= MAX_CHOICE_ANSWERS) return ask;
|
|
441
441
|
if (ask.kind === "open" && answers === 0) return ask;
|
|
@@ -816,6 +816,7 @@ var WireCatalogEntrySchema = z21.object({
|
|
|
816
816
|
examples: z21.array(z21.record(z21.unknown())).optional(),
|
|
817
817
|
renderedBy: z21.string().optional(),
|
|
818
818
|
alwaysInclude: z21.boolean().optional(),
|
|
819
|
+
asks: z21.boolean().optional(),
|
|
819
820
|
whenToUse: z21.string().optional(),
|
|
820
821
|
dontUseWhen: z21.string().optional(),
|
|
821
822
|
variants: z21.string().optional(),
|