From 9a4bd02ae76fd8794d506d1edbcefbef2535dbad Mon Sep 17 00:00:00 2001 From: johnnyreilly Date: Mon, 11 Nov 2024 07:13:39 +0000 Subject: [PATCH] feat: rename github ado-npm-auth-lite to azdo-npm-auth --- .github/CONTRIBUTING.md | 10 ++--- .github/DEVELOPMENT.md | 4 +- .github/ISSUE_TEMPLATE.md | 2 +- .github/ISSUE_TEMPLATE/01-bug.yml | 2 +- .github/ISSUE_TEMPLATE/02-documentation.yml | 2 +- .github/ISSUE_TEMPLATE/03-feature.yml | 2 +- .github/ISSUE_TEMPLATE/04-tooling.yml | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 6 +-- .github/workflows/post-release.yml | 4 +- CHANGELOG.md | 24 ++++++------ README.md | 36 +++++++++--------- ...-small.png => azdo-npm-auth-logo-small.png | Bin ...th-lite-logo.png => azdo-npm-auth-logo.png | Bin eslint.config.js | 2 +- package.json | 2 +- src/bin/index.ts | 4 +- src/createPat.ts | 4 +- src/parseProjectNpmrc.test.ts | 4 +- 18 files changed, 55 insertions(+), 55 deletions(-) rename ado-npm-auth-lite-logo-small.png => azdo-npm-auth-logo-small.png (100%) rename ado-npm-auth-lite-logo.png => azdo-npm-auth-logo.png (100%) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 57e34ec..2ef3323 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -Thanks for your interest in contributing to `ado-npm-auth-lite`! 💖 +Thanks for your interest in contributing to `azdo-npm-auth`! 💖 > After this page, see [DEVELOPMENT.md](./DEVELOPMENT.md) for local development instructions. @@ -10,7 +10,7 @@ This project contains a [Contributor Covenant code of conduct](./CODE_OF_CONDUCT ## Reporting Issues -Please do [report an issue on the issue tracker](https://github.com/johnnyreilly/ado-npm-auth-lite/issues/new/choose) if there's any bugfix, documentation improvement, or general enhancement you'd like to see in the repository! Please fully fill out all required fields in the most appropriate issue form. +Please do [report an issue on the issue tracker](https://github.com/johnnyreilly/azdo-npm-auth/issues/new/choose) if there's any bugfix, documentation improvement, or general enhancement you'd like to see in the repository! Please fully fill out all required fields in the most appropriate issue form. ## Sending Contributions @@ -22,8 +22,8 @@ There are two steps involved: ### Finding an Issue -With the exception of very small typos, all changes to this repository generally need to correspond to an [unassigned open issue marked as `status: accepting prs` on the issue tracker](https://github.com/johnnyreilly/ado-npm-auth-lite/issues?q=is%3Aissue+is%3Aopen+label%3A%22status%3A+accepting+prs%22+no%3Aassignee+). -If this is your first time contributing, consider searching for [unassigned issues that also have the `good first issue` label](https://github.com/johnnyreilly/ado-npm-auth-lite/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3A%22status%3A+accepting+prs%22+no%3Aassignee+). +With the exception of very small typos, all changes to this repository generally need to correspond to an [unassigned open issue marked as `status: accepting prs` on the issue tracker](https://github.com/johnnyreilly/azdo-npm-auth/issues?q=is%3Aissue+is%3Aopen+label%3A%22status%3A+accepting+prs%22+no%3Aassignee+). +If this is your first time contributing, consider searching for [unassigned issues that also have the `good first issue` label](https://github.com/johnnyreilly/azdo-npm-auth/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3A%22status%3A+accepting+prs%22+no%3Aassignee+). If the issue you'd like to fix isn't found on the issue, see [Reporting Issues](#reporting-issues) for filing your own (please do!). #### Issue Claiming @@ -42,7 +42,7 @@ Be sure to fill out the pull request template's requested information -- otherwi PRs are also expected to have a title that adheres to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0). Only PR titles need to be in that format, not individual commits. Don't worry if you get this wrong: you can always change the PR title after sending it. -Check [previously merged PRs](https://github.com/johnnyreilly/ado-npm-auth-lite/pulls?q=is%3Apr+is%3Amerged+-label%3Adependencies+) for reference. +Check [previously merged PRs](https://github.com/johnnyreilly/azdo-npm-auth/pulls?q=is%3Apr+is%3Amerged+-label%3Adependencies+) for reference. #### Draft PRs diff --git a/.github/DEVELOPMENT.md b/.github/DEVELOPMENT.md index ee1fc55..db68335 100644 --- a/.github/DEVELOPMENT.md +++ b/.github/DEVELOPMENT.md @@ -3,8 +3,8 @@ After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing pnpm](https://pnpm.io/installation): ```shell -git clone https://github.com/ < your-name-here > /ado-npm-auth-lite -cd ado-npm-auth-lite +git clone https://github.com/ < your-name-here > /azdo-npm-auth +cd azdo-npm-auth pnpm install ``` diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 08ea84b..e500d9f 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,5 +1,5 @@ - + diff --git a/.github/ISSUE_TEMPLATE/01-bug.yml b/.github/ISSUE_TEMPLATE/01-bug.yml index 2b2a291..0e985fd 100644 --- a/.github/ISSUE_TEMPLATE/01-bug.yml +++ b/.github/ISSUE_TEMPLATE/01-bug.yml @@ -7,7 +7,7 @@ body: required: true - label: I have pulled the latest `main` branch of the repository. required: true - - label: I have [searched for related issues](https://github.com/johnnyreilly/ado-npm-auth-lite/issues?q=is%3Aissue) and found none that matched my issue. + - label: I have [searched for related issues](https://github.com/johnnyreilly/azdo-npm-auth/issues?q=is%3Aissue) and found none that matched my issue. required: true type: checkboxes - attributes: diff --git a/.github/ISSUE_TEMPLATE/02-documentation.yml b/.github/ISSUE_TEMPLATE/02-documentation.yml index 3ac1fcd..d27c2cd 100644 --- a/.github/ISSUE_TEMPLATE/02-documentation.yml +++ b/.github/ISSUE_TEMPLATE/02-documentation.yml @@ -5,7 +5,7 @@ body: options: - label: I have pulled the latest `main` branch of the repository. required: true - - label: I have [searched for related issues](https://github.com/johnnyreilly/ado-npm-auth-lite/issues?q=is%3Aissue) and found none that matched my issue. + - label: I have [searched for related issues](https://github.com/johnnyreilly/azdo-npm-auth/issues?q=is%3Aissue) and found none that matched my issue. required: true type: checkboxes - attributes: diff --git a/.github/ISSUE_TEMPLATE/03-feature.yml b/.github/ISSUE_TEMPLATE/03-feature.yml index 40435b9..d77ce0b 100644 --- a/.github/ISSUE_TEMPLATE/03-feature.yml +++ b/.github/ISSUE_TEMPLATE/03-feature.yml @@ -5,7 +5,7 @@ body: options: - label: I have pulled the latest `main` branch of the repository. required: true - - label: I have [searched for related issues](https://github.com/johnnyreilly/ado-npm-auth-lite/issues?q=is%3Aissue) and found none that matched my issue. + - label: I have [searched for related issues](https://github.com/johnnyreilly/azdo-npm-auth/issues?q=is%3Aissue) and found none that matched my issue. required: true type: checkboxes - attributes: diff --git a/.github/ISSUE_TEMPLATE/04-tooling.yml b/.github/ISSUE_TEMPLATE/04-tooling.yml index 62d2118..a83b6be 100644 --- a/.github/ISSUE_TEMPLATE/04-tooling.yml +++ b/.github/ISSUE_TEMPLATE/04-tooling.yml @@ -7,7 +7,7 @@ body: required: true - label: I have pulled the latest `main` branch of the repository. required: true - - label: I have [searched for related issues](https://github.com/johnnyreilly/ado-npm-auth-lite/issues?q=is%3Aissue) and found none that matched my issue. + - label: I have [searched for related issues](https://github.com/johnnyreilly/azdo-npm-auth/issues?q=is%3Aissue) and found none that matched my issue. required: true type: checkboxes - attributes: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4e34484..0b0f29f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,12 +1,12 @@ - ## PR Checklist - [ ] Addresses an existing open issue: fixes #000 -- [ ] That issue was marked as [`status: accepting prs`](https://github.com/johnnyreilly/ado-npm-auth-lite/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) -- [ ] Steps in [CONTRIBUTING.md](https://github.com/johnnyreilly/ado-npm-auth-lite/blob/main/.github/CONTRIBUTING.md) were taken +- [ ] That issue was marked as [`status: accepting prs`](https://github.com/johnnyreilly/azdo-npm-auth/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) +- [ ] Steps in [CONTRIBUTING.md](https://github.com/johnnyreilly/azdo-npm-auth/blob/main/.github/CONTRIBUTING.md) were taken ## Overview diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index abdb56f..5643479 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -14,8 +14,8 @@ jobs: The release is available on: - * [GitHub releases](https://github.com/johnnyreilly/ado-npm-auth-lite/releases/tag/{release_tag}) - * [npm package (@latest dist-tag)](https://www.npmjs.com/package/ado-npm-auth-lite/v/${{ env.npm_version }}) + * [GitHub releases](https://github.com/johnnyreilly/azdo-npm-auth/releases/tag/{release_tag}) + * [npm package (@latest dist-tag)](https://www.npmjs.com/package/azdo-npm-auth/v/${{ env.npm_version }}) Cheers! 📦🚀 diff --git a/CHANGELOG.md b/CHANGELOG.md index fea5238..2771d7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,36 +1,36 @@ -# [0.7.0](https://github.com/johnnyreilly/ado-npm-auth-lite/compare/0.6.0...0.7.0) (2024-11-11) +# [0.7.0](https://github.com/johnnyreilly/azdo-npm-auth/compare/0.6.0...0.7.0) (2024-11-11) ### Features -- rename ado-npm-auth-lite to azdo-npm-auth ([#12](https://github.com/johnnyreilly/ado-npm-auth-lite/issues/12)) ([650adb1](https://github.com/johnnyreilly/ado-npm-auth-lite/commit/650adb1a5f86438ebc3a50577c59e5ae80591cdc)), closes [#000](https://github.com/johnnyreilly/ado-npm-auth-lite/issues/000) +- rename azdo-npm-auth to azdo-npm-auth ([#12](https://github.com/johnnyreilly/azdo-npm-auth/issues/12)) ([650adb1](https://github.com/johnnyreilly/azdo-npm-auth/commit/650adb1a5f86438ebc3a50577c59e5ae80591cdc)), closes [#000](https://github.com/johnnyreilly/azdo-npm-auth/issues/000) -# [0.6.0](https://github.com/johnnyreilly/ado-npm-auth-lite/compare/0.5.0...0.6.0) (2024-11-10) +# [0.6.0](https://github.com/johnnyreilly/azdo-npm-auth/compare/0.5.0...0.6.0) (2024-11-10) ### Features -- fallback to using the Azure CLI ([#11](https://github.com/johnnyreilly/ado-npm-auth-lite/issues/11)) ([1e10db2](https://github.com/johnnyreilly/ado-npm-auth-lite/commit/1e10db2c99fab6275dc8ab16c233b7b2d59a955a)), closes [#10](https://github.com/johnnyreilly/ado-npm-auth-lite/issues/10) +- fallback to using the Azure CLI ([#11](https://github.com/johnnyreilly/azdo-npm-auth/issues/11)) ([1e10db2](https://github.com/johnnyreilly/azdo-npm-auth/commit/1e10db2c99fab6275dc8ab16c233b7b2d59a955a)), closes [#10](https://github.com/johnnyreilly/azdo-npm-auth/issues/10) -# [0.5.0](https://github.com/johnnyreilly/ado-npm-auth-lite/compare/0.4.0...0.5.0) (2024-11-09) +# [0.5.0](https://github.com/johnnyreilly/azdo-npm-auth/compare/0.4.0...0.5.0) (2024-11-09) ### Features -- allow manual supplying pat ([#9](https://github.com/johnnyreilly/ado-npm-auth-lite/issues/9)) ([1d7ab17](https://github.com/johnnyreilly/ado-npm-auth-lite/commit/1d7ab170ae23f1e3271fa023c5ab16d617a297d3)), closes [#8](https://github.com/johnnyreilly/ado-npm-auth-lite/issues/8) +- allow manual supplying pat ([#9](https://github.com/johnnyreilly/azdo-npm-auth/issues/9)) ([1d7ab17](https://github.com/johnnyreilly/azdo-npm-auth/commit/1d7ab170ae23f1e3271fa023c5ab16d617a297d3)), closes [#8](https://github.com/johnnyreilly/azdo-npm-auth/issues/8) -# [0.4.0](https://github.com/johnnyreilly/ado-npm-auth-lite/compare/0.3.0...0.4.0) (2024-11-09) +# [0.4.0](https://github.com/johnnyreilly/azdo-npm-auth/compare/0.3.0...0.4.0) (2024-11-09) ### Features -- logos ([#6](https://github.com/johnnyreilly/ado-npm-auth-lite/issues/6)) ([bab6094](https://github.com/johnnyreilly/ado-npm-auth-lite/commit/bab6094116350ac3d9969572e271b9786a997027)), closes [#7](https://github.com/johnnyreilly/ado-npm-auth-lite/issues/7) +- logos ([#6](https://github.com/johnnyreilly/azdo-npm-auth/issues/6)) ([bab6094](https://github.com/johnnyreilly/azdo-npm-auth/commit/bab6094116350ac3d9969572e271b9786a997027)), closes [#7](https://github.com/johnnyreilly/azdo-npm-auth/issues/7) -# [0.3.0](https://github.com/johnnyreilly/ado-npm-auth-lite/compare/0.2.0...0.3.0) (2024-11-08) +# [0.3.0](https://github.com/johnnyreilly/azdo-npm-auth/compare/0.2.0...0.3.0) (2024-11-08) ### Features -- don't run on ci servers ([#3](https://github.com/johnnyreilly/ado-npm-auth-lite/issues/3)) ([c2f745f](https://github.com/johnnyreilly/ado-npm-auth-lite/commit/c2f745f93d4bb21173669d8a5a76c241aaca1254)), closes [#2](https://github.com/johnnyreilly/ado-npm-auth-lite/issues/2) +- don't run on ci servers ([#3](https://github.com/johnnyreilly/azdo-npm-auth/issues/3)) ([c2f745f](https://github.com/johnnyreilly/azdo-npm-auth/commit/c2f745f93d4bb21173669d8a5a76c241aaca1254)), closes [#2](https://github.com/johnnyreilly/azdo-npm-auth/issues/2) # 0.2.0 (2024-11-07) ### Features -- Initial implementation ([51a8a29](https://github.com/johnnyreilly/ado-npm-auth-lite/commit/51a8a2958be10a7cbf3d04a325c02ec2bf0a7b3a)) -- initialized repo ✨ ([5a155fc](https://github.com/johnnyreilly/ado-npm-auth-lite/commit/5a155fcc1ef7e4efa712b59fb56cc76ec2d29961)) +- Initial implementation ([51a8a29](https://github.com/johnnyreilly/azdo-npm-auth/commit/51a8a2958be10a7cbf3d04a325c02ec2bf0a7b3a)) +- initialized repo ✨ ([5a155fc](https://github.com/johnnyreilly/azdo-npm-auth/commit/5a155fcc1ef7e4efa712b59fb56cc76ec2d29961)) diff --git a/README.md b/README.md index 25b6516..745e2ff 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,23 @@ -

Logo for project

+

Logo for project

-

Azure DevOps npm auth-lite

+

Azure DevOps npm auth

- 🤝 Code of Conduct: Kept - 🤝 Code of Conduct: Kept - 📝 License: MIT - 📦 npm version + 🤝 Code of Conduct: Kept + 🤝 Code of Conduct: Kept + 📝 License: MIT + 📦 npm version 💪 TypeScript: Strict

-Simply set up user authentication to Azure DevOps npm feeds. +Simply set up user authentication to Azure DevOps npm feeds, optionally using the Azure CLI for PAT acquisition. ## Usage -To get `ado-npm-auth-lite` to create the necessary user `.npmrc` file, run the following command: +To get `azdo-npm-auth` to create the necessary user `.npmrc` file, run the following command: ```shell -npx --yes ado-npm-auth-lite --config .npmrc +npx --yes azdo-npm-auth --config .npmrc ``` Should you encounter the following message when you try to `npm i`: @@ -34,15 +34,15 @@ That means either: - You have no user `.npmrc` file **OR** - The token in your user `.npmrc` file is out of date -In either case, running `ado-npm-auth-lite` should resolve the issue. +In either case, running `azdo-npm-auth` should resolve the issue. ## Integration with `package.json` -A great way to use `ado-npm-auth-lite` is as part of a `preinstall` script in your `package.json`: +A great way to use `azdo-npm-auth` is as part of a `preinstall` script in your `package.json`: ```json "scripts": { - "preinstall": "npx --yes ado-npm-auth-lite" + "preinstall": "npx --yes azdo-npm-auth" }, ``` @@ -50,11 +50,11 @@ With the above `preinstall` script in place, when the user performs `npm i` or s ## Prerequisites -If you would like `ado-npm-auth-lite` to acquire a token on your behalf, then it requires that your [Azure DevOps organisation is connected with your Azure account / Microsoft Entra ID](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/connect-organization-to-azure-ad?view=azure-devops). Then, assuming you are authenticated with Azure, it can acquire an Azure DevOps Personal Access Token on your behalf. To authenticate, run `az login`. [If you need to install the Azure CLI, follow these instructions](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli). It is not necessary to run `az login` if you are already authenticated with Azure. +If you would like `azdo-npm-auth` to acquire a token on your behalf, then it requires that your [Azure DevOps organisation is connected with your Azure account / Microsoft Entra ID](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/connect-organization-to-azure-ad?view=azure-devops). Then, assuming you are authenticated with Azure, it can acquire an Azure DevOps Personal Access Token on your behalf. To authenticate, run `az login`. [If you need to install the Azure CLI, follow these instructions](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli). It is not necessary to run `az login` if you are already authenticated with Azure. -You might be worried about `ado-npm-auth-lite` trying to create user `.npmrc` files when running CI builds. Happily this does not happen; it detects whether it is running in a CI environment and does **not** create a user `.npmrc` file in that case. +You might be worried about `azdo-npm-auth` trying to create user `.npmrc` files when running CI builds. Happily this does not happen; it detects whether it is running in a CI environment and does **not** create a user `.npmrc` file in that case. -`ado-npm-auth-lite` requires the project `.npmrc` file exists in order that it can acquire the information to create the content of a user `.npmrc` file. There is an optional `config` parameter; if it is not supplied `ado-npm-auth-lite` will default to use the `.npmrc` in the current project directory. There will be instructions for creating a project `.npmrc` file in Azure DevOps, for connecting to the Azure Artifacts npm feed. A project `.npmrc` file will look something like this: +`azdo-npm-auth` requires the project `.npmrc` file exists in order that it can acquire the information to create the content of a user `.npmrc` file. There is an optional `config` parameter; if it is not supplied `azdo-npm-auth` will default to use the `.npmrc` in the current project directory. There will be instructions for creating a project `.npmrc` file in Azure DevOps, for connecting to the Azure Artifacts npm feed. A project `.npmrc` file will look something like this: ```shell registry=https://pkgs.dev.azure.com/johnnyreilly/_packaging/npmrc-script-organization/npm/registry/ @@ -62,7 +62,7 @@ registry=https://pkgs.dev.azure.com/johnnyreilly/_packaging/npmrc-script-organiz always-auth=true ``` -## Why Azure DevOps npm auth-lite? +## Why Azure DevOps npm auth? Azure DevOps provides a mechanism for publishing npm packages for private use. This package sets up the necessary authentication to access those packages; particularly for non Windows users. @@ -76,9 +76,9 @@ Now consider the onboarding process for a non Windows user: As we can see, there is a significant difference in the onboarding experience between operating systems. Windows users can use a tool named [`vsts-npm-auth`](https://www.npmjs.com/package/vsts-npm-auth) which automates onboarding. Non windows users have a longer road to follow. The instructions walk through manually creating an `.npmrc` file in a users home directory which contains information including a base 64 encoded Azure DevOps Personal Access Token with the Packaging read and write scopes. It is tedious to do. -`ado-npm-auth-lite` aims to automate the toil, and make the onboarding experience for non Windows users as simple as it is for Windows users. +`azdo-npm-auth` aims to automate the toil, and make the onboarding experience for non Windows users as simple as it is for Windows users. -There is an official package named [`ado-npm-auth`](https://github.com/microsoft/ado-npm-auth). However, [due to issues I experienced in using the `ado-npm-auth` package](https://github.com/microsoft/ado-npm-auth/issues/50), I found myself creating `ado-npm-auth-lite`. By the way, the "lite" in `ado-npm-auth-lite` doesn't represent anything in particular; I just couldn't think of another good name. +There is an official package named [`ado-npm-auth`](https://github.com/microsoft/ado-npm-auth). However, [due to issues I experienced in using the `ado-npm-auth` package](https://github.com/microsoft/ado-npm-auth/issues/50), I found myself creating `azdo-npm-auth`. By the way, the "lite" in `azdo-npm-auth` doesn't represent anything in particular; I just couldn't think of another good name. ## Options diff --git a/ado-npm-auth-lite-logo-small.png b/azdo-npm-auth-logo-small.png similarity index 100% rename from ado-npm-auth-lite-logo-small.png rename to azdo-npm-auth-logo-small.png diff --git a/ado-npm-auth-lite-logo.png b/azdo-npm-auth-logo.png similarity index 100% rename from ado-npm-auth-lite-logo.png rename to azdo-npm-auth-logo.png diff --git a/eslint.config.js b/eslint.config.js index a301db8..c1841e5 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -107,7 +107,7 @@ export default tseslint.config( extends: [tseslint.configs.disableTypeChecked], files: ["**/*.md/*.ts"], rules: { - "n/no-missing-import": ["error", { allowModules: ["ado-npm-auth-lite"] }], + "n/no-missing-import": ["error", { allowModules: ["azdo-npm-auth"] }], }, }, { diff --git a/package.json b/package.json index 9283708..d6b5674 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Set up local authentication to Azure DevOps npm feeds", "repository": { "type": "git", - "url": "https://github.com/johnnyreilly/ado-npm-auth-lite" + "url": "https://github.com/johnnyreilly/azdo-npm-auth" }, "license": "MIT", "author": { diff --git a/src/bin/index.ts b/src/bin/index.ts index c733d9d..1534a33 100644 --- a/src/bin/index.ts +++ b/src/bin/index.ts @@ -27,8 +27,8 @@ export async function bin(args: string[]) { const version = await getVersionFromPackageJson(); - const introPrompts = `${chalk.blueBright(`📦🔑 Welcome to`)} ${chalk.bgBlueBright.black(`ado-npm-auth-lite`)} ${chalk.blueBright(`${version}! 📦🔑`)}`; - const outroPrompts = `${chalk.blueBright(`📦🔑 Thanks for using`)} ${chalk.bgBlueBright.black(`ado-npm-auth-lite`)} ${chalk.blueBright(`${version}! 📦🔑`)}`; + const introPrompts = `${chalk.blueBright(`📦🔑 Welcome to`)} ${chalk.bgBlueBright.black(`azdo-npm-auth`)} ${chalk.blueBright(`${version}! 📦🔑`)}`; + const outroPrompts = `${chalk.blueBright(`📦🔑 Thanks for using`)} ${chalk.bgBlueBright.black(`azdo-npm-auth`)} ${chalk.blueBright(`${version}! 📦🔑`)}`; const { values } = parseArgs({ args, diff --git a/src/createPat.ts b/src/createPat.ts index ad37564..051de68 100644 --- a/src/createPat.ts +++ b/src/createPat.ts @@ -37,7 +37,7 @@ export async function createPat({ // https://learn.microsoft.com/en-us/rest/api/azure/devops/tokens/pats/create?view=azure-devops-rest-7.1&tabs=HTTP const url = `https://vssps.dev.azure.com/${organisation}/_apis/tokens/pats?api-version=7.1-preview.1`; const data = { - displayName: `made by ado-npm-auth-lite at: ${new Date().toISOString()}`, + displayName: `made by azdo-npm-auth at: ${new Date().toISOString()}`, scope: "vso.packaging", validTo: futureDate.toISOString(), allOrgs: false, @@ -82,7 +82,7 @@ Please ensure that: 1. Your Azure DevOps organisation is connected with your Azure account / Microsoft Entra ID 2. You are logged into the Azure CLI (use \`az login\` to log in) -If you continue to have issues, consider creating a Personal Access Token with the Packaging read and write scopes manually in Azure DevOps and providing it to \`ado-npm-auth-lite\` using the \`--pat\` option. +If you continue to have issues, consider creating a Personal Access Token with the Packaging read and write scopes manually in Azure DevOps and providing it to \`azdo-npm-auth\` using the \`--pat\` option. You can create a PAT here: https://dev.azure.com/${organisation}/_usersSettings/tokens`; throw new Error(errorMessage); diff --git a/src/parseProjectNpmrc.test.ts b/src/parseProjectNpmrc.test.ts index 3b7fe5c..53f15bc 100644 --- a/src/parseProjectNpmrc.test.ts +++ b/src/parseProjectNpmrc.test.ts @@ -16,7 +16,7 @@ describe("parseProjectNpmrc", () => { always-auth=true`); const result = await parseProjectNpmrc({ - npmrcPath: "/home/john/code/github/ado-npm-auth-lite/.npmrc", + npmrcPath: "/home/john/code/github/azdo-npm-auth/.npmrc", }); expect(result).toEqual({ organisation: "johnnyreilly", @@ -31,7 +31,7 @@ always-auth=true`); mockReadFile.mockResolvedValue(`stuff`); await expect(() => parseProjectNpmrc({ - npmrcPath: "/home/john/code/github/ado-npm-auth-lite/.npmrc", + npmrcPath: "/home/john/code/github/azdo-npm-auth/.npmrc", }), ).rejects.toThrowError("Unable to extract information from project .npmrc"); });