Tmp fixes

This commit is contained in:
a8trejo 2024-11-27 19:37:28 -08:00
parent 2565b744ed
commit 9c27b126f7
3 changed files with 20 additions and 1 deletions

15
.github/scripts/codeartifact-login.sh vendored Executable file
View file

@ -0,0 +1,15 @@
AWS_VERSION=$(aws --version 2>&1 | cut -d/ -f2 | cut -d. -f1)
echo "aws-cli/$AWS_VERSION"
if [ "$AWS_VERSION" -lt 2 ]; then
echo "Skipping .npmrc generation because AWS CLI version is less than 2"
else
echo "Generating .npmrc"
REPO_ENDPOINT=$(aws codeartifact get-repository-endpoint --domain roo --repository roo-dev --format npm | jq -r '.repositoryEndpoint')
echo "registry=$REPO_ENDPOINT" > .npmrc
CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token --domain roo --query authorizationToken --output text)
REPO_PATH=$(echo $REPO_ENDPOINT | sed 's/https://g')
echo "$REPO_PATH:_authToken=$CODEARTIFACT_AUTH_TOKEN" >> .npmrc
fi

2
.gitignore vendored
View file

@ -5,5 +5,7 @@ node_modules
.DS_Store
.npmrc
# Builds
bin

View file

@ -130,11 +130,13 @@
"scripts": {
"build": "npm run build:webview && npm run vsix",
"build:webview": "cd webview-ui && npm run build",
"co:login": "scripts/codeartifact-login.sh",
"co:install": "npm run co:login && npm install",
"changeset": "changeset",
"check-types": "tsc --noEmit",
"compile": "npm run check-types && npm run lint && node esbuild.js",
"compile-tests": "tsc -p . --outDir out",
"install:all": "npm install && cd webview-ui && npm install",
"install:all": "npm run co:install && cd webview-ui && npm install",
"lint": "eslint src --ext ts",
"package": "npm run build:webview && npm run check-types && npm run lint && node esbuild.js --production",
"pretest": "npm run compile-tests && npm run compile && npm run lint",