fix: include log-query-engine in package, start MCP server via bin symlink#44
Merged
Conversation
…mlink The 0.1.0 release was missing dist/lib/log-query-engine.js because the files array in package.json did not include it, breaking every entry point at import time. Additionally, the import.meta.url guard in mcp-server.ts compared against the bin symlink path instead of its realpath, so the server exited immediately when started via npx or node_modules/.bin. The guard is unnecessary for a bin-only entry point and was removed. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Whitelisting individual files already caused a broken release once (log-query-engine.js was missing in v0.1.0), so include all compiled lib files instead. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The published v0.1.0 package is broken — both bugs block the gh-aw log analysis workflows in zwave-js/zwave-js#8938.
Bug 1: missing file in the tarball
package.jsonfileslackeddist/lib/log-query-engine.{js,d.ts}. Every entry point (index, CLI, MCP server) fails at import time:Bug 2: MCP server exits immediately via npx
mcp-server.tsguarded startup with animport.meta.url === file://${process.argv[1]}comparison. When started through the bin symlink (npx --package=@zwave-js/log-analyzer zwave-log-analyzer-mcp),argv[1]is the symlink path, the comparison fails, and the process exits 0 without starting the server. The guard is unnecessary for a bin-only entry and was removed.Verification
Packed the tarball, installed it in a scratch project, and drove
node_modules/.bin/zwave-log-analyzer-mcpover stdio:initialize+tools/listnow return all 8 tools.A v0.1.1 release is needed after merging.