Programmatic API for managing npm organization memberships and roles
74
Implement utilities to enforce consistent access controls for a scoped package within an npm organization.
otp value and surfaces the error if it still fails. @testowner, admin, and developer roles. @test[user, role] pairs without loading the full list at once. @test@generates
/**
* Applies desired access and ownership rules for a package.
* @param plan Object with packageName, visibility ('public'|'restricted'), optional teamGrants [{ team, permission }], userGrants [{ user, permission }], and owners [string]. Permissions are read-only or read-write. Team names may include org prefixes.
* @param auth Registry auth options including token, optional otp, and registry URL overrides.
* @returns Summary object with resulting visibility, grants, and owners after reconciliation.
*/
export async function applyAccessPlan(plan, auth);
/**
* Returns organization roster grouped by role names.
* @param org Organization name (with or without @ prefix)
* @param auth Registry auth options including token, optional otp, and registry URL overrides.
* @returns { owner: string[], admin: string[], developer: string[] }
*/
export async function getOrgRoster(org, auth);
/**
* Streams organization roster as [user, role] pairs.
* @param org Organization name (with or without @ prefix)
* @param auth Registry auth options including token, optional otp, and registry URL overrides.
* @returns Async iterable yielding [user, role]
*/
export async function streamOrgRoster(org, auth);Provides CLI commands for registry package access control, ownership, organizations, and teams.
Install with Tessl CLI
npx tessl i tessl/npm-libnpmorgdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10