Scope npm registry to @aetoskia in drone pipeline
All checks were successful
continuous-integration/drone/tag Build is passing
All checks were successful
continuous-integration/drone/tag Build is passing
The registry was set globally, forcing public transitive deps through the private Verdaccio (no uplink), which 404'd `npm install`. Scope it to `@aetoskia:registry` so only @aetoskia/* resolve from the private registry. Also correct the stale package-lock name and ignore local .npmrc.
This commit is contained in:
12
.drone.yml
12
.drone.yml
@@ -30,7 +30,8 @@ steps:
|
||||
exit 1
|
||||
fi
|
||||
NPM_HOST=$(echo "$NPM_REPO_URL" | sed -E 's|^[a-z]+://||; s|/*$||')
|
||||
echo "registry=$NPM_REPO_URL" > /tmp/.npmrc
|
||||
NPM_SCOPE="@$(node -p "require('./package.json').name.split('/')[0].replace(/^@/,'')")"
|
||||
echo "$NPM_SCOPE:registry=$NPM_REPO_URL" > /tmp/.npmrc
|
||||
echo "//$NPM_HOST/:_auth=$(echo -n "$NPM_USERNAME:$NPM_PASSWORD" | base64 | tr -d '\n')" >> /tmp/.npmrc
|
||||
echo "Checking if $PACKAGE_NAME@$VERSION exists on $NPM_REPO_URL ..."
|
||||
if npm view "$PACKAGE_NAME@$VERSION" version --userconfig /tmp/.npmrc >/dev/null 2>&1; then
|
||||
@@ -56,7 +57,8 @@ steps:
|
||||
exit 1
|
||||
fi
|
||||
NPM_HOST=$(echo "$NPM_REPO_URL" | sed -E 's|^[a-z]+://||; s|/*$||')
|
||||
echo "registry=$NPM_REPO_URL" > .npmrc
|
||||
NPM_SCOPE="@$(node -p "require('./package.json').name.split('/')[0].replace(/^@/,'')")"
|
||||
echo "$NPM_SCOPE:registry=$NPM_REPO_URL" > .npmrc
|
||||
echo "//$NPM_HOST/:_auth=$(echo -n "$NPM_USERNAME:$NPM_PASSWORD" | base64 | tr -d '\n')" >> .npmrc
|
||||
- npm install
|
||||
- echo "Running quality gate..."
|
||||
@@ -82,7 +84,8 @@ steps:
|
||||
commands:
|
||||
- |
|
||||
NPM_HOST=$(echo "$NPM_REPO_URL" | sed -E 's|^[a-z]+://||; s|/*$||')
|
||||
echo "registry=$NPM_REPO_URL" > .npmrc
|
||||
NPM_SCOPE="@$(node -p "require('./package.json').name.split('/')[0].replace(/^@/,'')")"
|
||||
echo "$NPM_SCOPE:registry=$NPM_REPO_URL" > .npmrc
|
||||
echo "//$NPM_HOST/:_auth=$(echo -n "$NPM_USERNAME:$NPM_PASSWORD" | base64 | tr -d '\n')" >> .npmrc
|
||||
- echo "Publishing to private npm at $NPM_REPO_URL ..."
|
||||
- npm publish --access restricted
|
||||
@@ -122,7 +125,8 @@ steps:
|
||||
- apk add --no-cache git
|
||||
- |
|
||||
NPM_HOST=$(echo "$NPM_REPO_URL" | sed -E 's|^[a-z]+://||; s|/*$||')
|
||||
echo "registry=$NPM_REPO_URL" > /tmp/.npmrc
|
||||
NPM_SCOPE="@$(node -p "require('./package.json').name.split('/')[0].replace(/^@/,'')")"
|
||||
echo "$NPM_SCOPE:registry=$NPM_REPO_URL" > /tmp/.npmrc
|
||||
echo "//$NPM_HOST/:_auth=$(echo -n "$NPM_USERNAME:$NPM_PASSWORD" | base64 | tr -d '\n')" >> /tmp/.npmrc
|
||||
- |
|
||||
set -e
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@ coverage/
|
||||
.DS_Store
|
||||
site/
|
||||
docs/mcp/
|
||||
.npmrc
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "doc-weaver",
|
||||
"name": "@aetoskia/doc-weaver",
|
||||
"version": "0.1.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "doc-weaver",
|
||||
"name": "@aetoskia/doc-weaver",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@modelcontextprotocol/sdk": "^1.17.4",
|
||||
|
||||
Reference in New Issue
Block a user