[PR #2054] [CLOSED] fix(cli): restore import-map option descriptions in trace-web-module-imports help #4992

Closed
opened 2026-10-31 00:57:47 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2054
Author: @kaoru0822-kitauji
Created: 10/12/2026
Status: ❌ Closed

Base: main ← Head: fix/issue-2053


📝 Commits (1)

  • 0108085 fix(cli): restore import-map option descriptions in trace-web-module-imports help

📊 Changes

1 file changed (+5 additions, -4 deletions)

View changed files

📝 src/cli/webModuleCommands.ts (+5 -4)

📄 Description

Fixes #2053

Problem

rea trace-web-module-imports --help printed --import-map-path and --import-map-base-url with no description. tests/boundary/cli/cliOptionAliases.test.ts ("register only single-character short flags") failed on main for the same reason (main CI run 38205050281).

48c352b6b built both options as importMapInputSchema.shape.<field>.describe(...).optional(). In Zod 4 the description is metadata on the schema .describe() is called on, and .optional() returns a new wrapper without it. CLI help reads the wrapper, so the text, including which option requires the other, was dropped.

Change

Call .describe() on the optional wrapper in src/cli/webModuleCommands.ts. The underlying shared contract fields and their validation are unchanged.

Options:
  --importer-url <string>         Explicit HTTP(S) module URL; useful when captured inline/base context is unknown
  --import-map-path <string>      Absolute local import-map JSON path; requires --import-map-base-url
  --import-map-base-url <string>  HTTP(S) import-map base URL; requires --import-map-path

Validation

  • cliOptionAliases.test.ts fails on the base commit and passes with this change. cliInputSchemaRequired.test.ts, which covers the same options' validation, still passes.
  • npm run lint passes.
  • npm test: 9,073 passed and 15 failed. None of the 15 is caused by this change:
    • 12 are environmental on this host (macOS, Command Line Tools only): nibNativeHierarchy, interfaceBuilderBundle, javascriptRuntimeObservation, javascriptRuntimeTargetLocations, nativeDmgArtifactReader.
    • 3 are in src/adb/AdbProvider.test.ts. They fail identically on the base commit.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/2054 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/issue-2053` --- ### 📝 Commits (1) - [`0108085`](https://github.com/morluto/rea/commit/0108085e423c1ba280000cba7c1f59b4c6d8c84d) fix(cli): restore import-map option descriptions in trace-web-module-imports help ### 📊 Changes **1 file changed** (+5 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/cli/webModuleCommands.ts` (+5 -4) </details> ### 📄 Description Fixes #2053 ## Problem `rea trace-web-module-imports --help` printed `--import-map-path` and `--import-map-base-url` with no description. `tests/boundary/cli/cliOptionAliases.test.ts` ("register only single-character short flags") failed on main for the same reason (main CI run 38205050281). 48c352b6b built both options as `importMapInputSchema.shape.<field>.describe(...).optional()`. In Zod 4 the description is metadata on the schema `.describe()` is called on, and `.optional()` returns a new wrapper without it. CLI help reads the wrapper, so the text, including which option requires the other, was dropped. ## Change Call `.describe()` on the optional wrapper in `src/cli/webModuleCommands.ts`. The underlying shared contract fields and their validation are unchanged. ``` Options: --importer-url <string> Explicit HTTP(S) module URL; useful when captured inline/base context is unknown --import-map-path <string> Absolute local import-map JSON path; requires --import-map-base-url --import-map-base-url <string> HTTP(S) import-map base URL; requires --import-map-path ``` ## Validation - `cliOptionAliases.test.ts` fails on the base commit and passes with this change. `cliInputSchemaRequired.test.ts`, which covers the same options' validation, still passes. - `npm run lint` passes. - `npm test`: 9,073 passed and 15 failed. None of the 15 is caused by this change: - 12 are environmental on this host (macOS, Command Line Tools only): `nibNativeHierarchy`, `interfaceBuilderBundle`, `javascriptRuntimeObservation`, `javascriptRuntimeTargetLocations`, `nativeDmgArtifactReader`. - 3 are in `src/adb/AdbProvider.test.ts`. They fail identically on the base commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:57:47 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#4992
No description provided.