File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed
aws-distro-opentelemetry-node-autoinstrumentation Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -euf -o pipefail
4+
5+ rm -rf ./build/workspace/node_modules
6+
7+ # Space separated list of external NPM packages
8+ EXTERNAL_PACKAGES=( " import-in-the-middle" )
9+
10+ for EXTERNAL_PACKAGE in " ${EXTERNAL_PACKAGES[@]} "
11+ do
12+ echo " Installing external package $EXTERNAL_PACKAGE ..."
13+
14+ PACKAGE_VERSION=$( npm query " #$EXTERNAL_PACKAGE " \
15+ | grep version \
16+ | head -1 \
17+ | awk -F: ' { print $2 }' \
18+ | sed ' s/[",]//g' )
19+
20+ echo " Resolved version of the external package $EXTERNAL_PACKAGE : $PACKAGE_VERSION "
21+
22+ npm install " $EXTERNAL_PACKAGE @$PACKAGE_VERSION " --prefix ./build/workspace --production --ignore-scripts
23+
24+ echo " Installed external package $EXTERNAL_PACKAGE "
25+ done
Original file line number Diff line number Diff line change 2424 "clean" : " rimraf build/*" ,
2525 "compile:tsc" : " tsc -p ." ,
2626 "compile:webpack" : " webpack" ,
27- "compile" : " npm run compile:webpack" ,
27+ "compile" : " npm run compile:webpack && npm run install-externals" ,
28+ "install-externals" : " ./install-externals.sh" ,
2829 "lint" : " eslint . --ext .ts" ,
2930 "lint:fix" : " eslint . --ext .ts --fix" ,
3031 "create-version" : " node -p \" 'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts" ,
You can’t perform that action at this time.
0 commit comments