feat: add wrike connector#57
Conversation
Implement @hasna/connect-wrike with REST API v4 client, CLI, registry entry, and focused tests.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit dfa23f1. Configure here.
|
|
||
| function getFormat(cmd: Command): OutputFormat { | ||
| const parent = cmd.parent; | ||
| return (parent?.opts().format || 'pretty') as OutputFormat; |
There was a problem hiding this comment.
Root format flag ignored
Low Severity
The version command resolves output format via getFormat(program), which only reads program.parent?.opts().format. The root command has no parent, so --format json is ignored and output stays in pretty mode.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit dfa23f1. Configure here.
| if (!profileExists(opts.profile)) { | ||
| error(`Profile "${opts.profile}" does not exist. Create it with "${CONNECTOR_NAME} profile create ${opts.profile}"`); | ||
| process.exit(1); | ||
| } |
There was a problem hiding this comment.
Explicit default profile rejected
Medium Severity
The CLI requires profileExists when --profile is set, but getCurrentProfile already treats default as active before default.json exists. connect-wrike -p default fails on a fresh install while the same commands without -p default still run.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit dfa23f1. Configure here.


Summary
@hasna/connect-wrikepackage underconnectors/wrike/with REST API v4 client (bearer auth, configurable host), CLI, types/utils, and placeholder.env.examplewrikein Business Tools category and add search synonymTest plan
bun installat worktree rootbun run typecheckbun test connectors/wrike(11 pass)bun test src/lib/registry.test.ts src/lib/synonyms.test.ts(35 pass)rg 'beepmedia|hasnaxyz' connectors/wrike— no matchesbun testsuite (pre-existing CLI subprocess failures in worktree; unrelated to wrike)Note
Low Risk
Greenfield connector with no changes to shared runtime; risk is limited to new optional integration code and catalog metadata.
Overview
Adds a new
@hasna/connect-wrikepackage underconnectors/wrike/with a programmaticWrikeclient andconnect-wrikeCLI for Wrike REST API v4.Auth uses a permanent API token with lowercase
bearerinAuthorization, plus a configurable host (www.wrike.comor EUapp-eu.wrike.com). Credentials load from env (WRIKE_API_TOKEN,WRIKE_HOST) or profile files under~/.hasna/connectors/connect-wrike/. The HTTP layer JSON-stringifies array query params (e.g.fields) and maps API errors toWrikeApiError.Surface area covers tasks, folders, spaces, workflows, custom fields, comments, timelogs, contacts, workflows listing, and related CRUD/list operations exposed through Commander subcommands. Bun tests mock
fetchfor bearer header, host URLs, errors, and a few API helpers.The monorepo catalog gains Wrike in Business Tools (
business-tools.ts), andwrikeis added to theprojectsearch synonym list.Reviewed by Cursor Bugbot for commit dfa23f1. Bugbot is set up for automated code reviews on this repo. Configure here.