Fix up script and npm list

Former-commit-id: e6b91acdea
This commit is contained in:
David Boreham 2023-03-24 02:52:37 -06:00
parent c4e3aa54f1
commit aa01feb98a
2 changed files with 3 additions and 4 deletions

View File

@ -19,13 +19,14 @@ local_npm_registry_url=$1
package_publish_version=$2 package_publish_version=$2
# If we need to handle an additional scope, add it to the list below: # If we need to handle an additional scope, add it to the list below:
npm_scopes_to_handle=("@cerc-io" "@lirewine") npm_scopes_to_handle=("@cerc-io" "@lirewine")
for npm_scope_for_local in ${npm_scopes_to_handle[@]}; do for npm_scope_for_local in ${npm_scopes_to_handle[@]}
do
# We need to configure the local registry # We need to configure the local registry
npm config set ${npm_scope_for_local}:registry ${local_npm_registry_url} npm config set ${npm_scope_for_local}:registry ${local_npm_registry_url}
npm config set -- ${local_npm_registry_url}:_authToken ${CERC_NPM_AUTH_TOKEN} npm config set -- ${local_npm_registry_url}:_authToken ${CERC_NPM_AUTH_TOKEN}
# Find the set of dependencies from the specified scope # Find the set of dependencies from the specified scope
mapfile -t dependencies_from_scope < <(cat package.json | jq -r '.dependencies | with_entries(if (.key|test("^'${npm_scope_for_local}'/.*$")) then ( {key: .key, value: .value } ) else empty end ) | keys[]') mapfile -t dependencies_from_scope < <(cat package.json | jq -r '.dependencies | with_entries(if (.key|test("^'${npm_scope_for_local}'/.*$")) then ( {key: .key, value: .value } ) else empty end ) | keys[]')
echo "Fixing up dependencies" echo "Fixing up dependencies in scope ${npm_scope_for_local}"
for package in "${dependencies_from_scope[@]}" for package in "${dependencies_from_scope[@]}"
do do
echo "Fixing up package ${package}" echo "Fixing up package ${package}"

View File

@ -1,6 +1,4 @@
gem
laconic-sdk laconic-sdk
debug
laconic-registry-cli laconic-registry-cli
gem gem
debug debug