Compare commits

...
Author SHA1 Message Date
Kaoru0822andClaude Opus 5.5 0108085e42 fix(cli): restore import-map option descriptions in trace-web-module-imports help
48c352b6b built --import-map-path and --import-map-base-url as
`shape.<field>.describe(...).optional()`. In Zod 4 the description
stays on the inner schema while .optional() returns a new wrapper, and
CLI help reads the wrapper, so both options printed without text and
cliOptionAliases failed on main. Describe the optional wrapper instead.

Fixes #2053

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 05:10:30 +00:00
+5 -4
View File
@@ -31,14 +31,15 @@ export const registerWebModuleCommands = (
}),
options: z.object({
importerUrl: webModuleTraceInputSchema.shape.importer_url,
// Describe the optional wrapper: help reads the outer schema's metadata.
importMapPath: importMapInputSchema.shape.path
.optional()
.describe(
"Absolute local import-map JSON path; requires --import-map-base-url",
)
.optional(),
),
importMapBaseUrl: importMapInputSchema.shape.base_url
.describe("HTTP(S) import-map base URL; requires --import-map-path")
.optional(),
.optional()
.describe("HTTP(S) import-map base URL; requires --import-map-path"),
}),
run: ({ args, options }) =>
withCommandCancellation(async (signal) => {