feat(cli): bundle the Slack connector into the CLI for zero-setup peek connect add slack#161
Open
harry-harish wants to merge 1 commit into
Open
feat(cli): bundle the Slack connector into the CLI for zero-setup peek connect add slack#161harry-harish wants to merge 1 commit into
peek connect add slack#161harry-harish wants to merge 1 commit into
Conversation
`peek connect add slack` now spawns a pre-bundled connector shipped inside @peekdev/cli (dist/connectors/slack.js), so setup drops to `npm i -g @peekdev/cli && peek connect add slack && peek connect start` — no monorepo clone, no `--local` build. - scripts/bundle-connectors.mjs: esbuild @peekdev/connector-slack from source (connector-core aliased to source too); only @napi-rs/keyring stays external. - descriptors.ts: slack spawns the bundle with the CLI's own Node binary. - package.json: bundle step in build; @napi-rs/keyring runtime dep; esbuild dev. - connector-slack README: document the bundled path + correct the scope table to the 8 scopes the connector actually uses. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: harry-harish <harry652k15@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe CLI now bundles the Slack connector with esbuild, externalizes its native keyring dependency, and spawns the generated module through Node.js. Slack documentation and release metadata describe the bundled and local-development workflows. ChangesSlack connector bundling and execution
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant Bundler
participant ConnectDaemon
participant Node
CLI->>Bundler: run bundle-connectors.mjs
Bundler-->>CLI: write dist/connectors/slack.js
ConnectDaemon->>CLI: resolve Slack descriptor
CLI->>Node: spawn process.execPath with slack.js
Node-->>ConnectDaemon: run bundled Slack connector
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
What
peek connect add slacknow spawns a pre-bundled connector shipped inside@peekdev/cli(dist/connectors/slack.js), so setup drops from clone → pnpm build →--localto:npm i -g @peekdev/cli peek connect add slack # no clone, no build, no --local peek connect startHow
scripts/bundle-connectors.mjs(new): esbuilds@peekdev/connector-slackfrom source intodist/connectors/slack.js, aliasing@peekdev/connector-coreto source too — so the private connector packages never need to be published or pre-built.@slack/bolt+@anthropic-ai/sdkare inlined.@napi-rs/keyringis the only external (native module, can't be inlined). It's now a runtime dependency of@peekdev/cli, so npm installs its platform binary and the bundle resolves it at spawn time — tokens still go to the OS keychain.descriptors.ts: theslacksurface now spawnsnode <cli>/dist/connectors/slack.js(resolved relative to the install) instead of an externalpeek-connector-slackbin. The CLI still only spawns connectors (no connector code imported at runtime).connector-slack/README.md: documents the bundled path and corrects the scope table to the 8 scopes the connector actually uses.Verification
pnpm --filter @peekdev/cli... build→dist/connectors/slack.js(3.3 MB).@napi-rs/keyring,@slack/bolt,@anthropic-ai/sdk,connector-core; runs intomain()(stops at the Node-22 guard on a Node-20 box, as expected).typecheckandlintclean.better-sqlite3native-ABI mismatch (Node-20 box vs a Node-22 build) — reproduced identically onmain; unrelated to this change and green on CI (Node 22).Changeset included (minor bump for
@peekdev/cli).🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
peek connect add slackwithout cloning the repository or using a local build.Documentation