microsoft / ado-npm-auth

This package can automatically use the azureauth CLI to fetch tokens and update a user's .npmrc file for authenticating to Azure DevOps npm feeds.
MIT License
9 stars 7 forks source link

Duplicated Code for ADO PAT Generation #24

Open Stuart-Wilcox opened 4 months ago

Stuart-Wilcox commented 4 months ago

Describe the bug

The code for creating an ADO PAT appears to be duplicated between two places in different packages. This makes is confusing for new people to make contributions, and is also just a poor design.

To Reproduce See packages/node-azureauth/src/pat.ts and packages/ado-npm-auth/src/azureauth/ado.ts

Expected behavior One file should have most of this code and then it gets imported in other places

Screenshots Example these types image

Additional context This likely happened as an oversight when we migrated the code