Roo-Code/packages/types
Matt Rubens abaa3d8179
Store the organization id in credentials (#5002)
* Store the organization id in credentials

* Better organization logic

* Fix tests

* Update cloud settings defaults

* Fix organization_id handling in Clerk API calls

Address review feedback by properly handling 3 cases for organization_id:
1. Have an org id: send organization_id=THE_ORG_ID
2. Have a personal account: send organization_id= (empty string)
3. Don't know if you have an org id (old credentials): don't send organization_id param at all

Changes:
- Updated clerkCreateSessionToken() to check credentials.organizationId !== undefined
- Updated fetchUserInfo() to handle all 3 cases consistently
- Added fallback logic for old credentials without organization context
- Improved logging for better debugging of organization context

* DRY up organization loading code in AuthService

Extract common organization membership processing logic into reusable helper methods:

- findOrganizationMembership(): Find specific org membership by ID
- findPrimaryOrganizationMembership(): Get first/primary org membership
- setUserOrganizationInfo(): Set organization info on user object

This eliminates duplication between the two clerkGetOrganizationMemberships()
call sites that were doing very similar organization data processing.
2025-06-23 07:23:29 -04:00
..
npm Add telemetry for marketplace tab views and install clicks (#4781) 2025-06-17 11:44:25 -04:00
src Store the organization id in credentials (#5002) 2025-06-23 07:23:29 -04:00
eslint.config.mjs Add a new @roo-code/types package and use it everywhere (#3912) 2025-05-26 12:06:45 -07:00
package.json Farewell jest (#4607) 2025-06-16 21:39:45 -07:00
README.md Bump @roo-code/types to v1.26.0 (#4584) 2025-06-12 11:05:53 -04:00
tsconfig.json Add a new @roo-code/types package and use it everywhere (#3912) 2025-05-26 12:06:45 -07:00
tsup.config.ts Improve configuration for npm publish of @roo-code/types (#4062) 2025-05-27 22:10:41 -07:00
vitest.config.ts Convert jest tests to vitest and disable default watch mode for vitest (#4568) 2025-06-11 14:48:01 -07:00

@roo-code/types

Publish to NPM

First authenticate with NPM:

npm login

Next, manually bump the NPM package version:

cd packages/types/npm && npm version minor && cd -

Finally, publish to NPM:

pnpm --filter @roo-code/types npm:publish

Note that you'll be asked for an MFA code to complete the publish.