Skip to content

CodeArtifact: Add port to example endpoints #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2025

Conversation

viren-nadkarni
Copy link
Member

This PR updates command examples to resemble LocalStack output.

Copy link

@skyrpex skyrpex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes! I just have a question, see below.

@@ -284,44 +282,44 @@ You can configure npm with your CodeArtifact repository without the `awslocal co
Your repository endpoint is used to point npm to your repository to install or publish packages.

```bash
awslocal codeartifact get-repository-endpoint --domain demo-domain --repository demo-repo --format npm
awslocal codeartifact get-repository-endpoint --domain demo-domain --repository demo-repo --format npm --output text
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default output is configured via AWS profiles, right?

Is it necessary for us to override the output here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default the output is json. By overriding to text, you only get the endpoint value.

With the default json output:

$ awslocal codeartifact get-repository-endpoint --domain demo-domain --repository demo-repo --format npm
{
    "repositoryEndpoint": "http://demo-domain-000000000000.d.codeartifact.eu-central-1.localhost.localstack.cloud:4566/npm/demo-repo/"
}

Override to text output using --output text:

$ awslocal codeartifact get-repository-endpoint --domain demo-domain --repository demo-repo --format npm --output text
http://demo-domain-000000000000.d.codeartifact.eu-central-1.localhost.localstack.cloud:4566/npm/demo-repo/

If there are multiple fields, you should use --query repositoryEndpoint but it is implicit here.

Copy link

@skyrpex skyrpex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@viren-nadkarni viren-nadkarni merged commit 575854d into master Jul 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants