diff --git a/packages/client-sdk-nodejs/build-scripts/build-lambda-layer.sh b/packages/client-sdk-nodejs/build-scripts/build-lambda-layer.sh deleted file mode 100755 index 0720fed84..000000000 --- a/packages/client-sdk-nodejs/build-scripts/build-lambda-layer.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -set -e -set -x - -CURRENT_DIR=${PWD##*/} -if [[ $CURRENT_DIR -ne 'build-scripts' ]]; then - echo "Please run this script in the build-scripts directory" - exit 1 -fi - -pushd .. - mkdir -p nodejs/node_modules - pushd nodejs/node_modules - npm i @gomomento/sdk - popd - zip -r layer.zip nodejs -popd diff --git a/packages/client-sdk-nodejs/build-scripts/publish-lambda-layer.sh b/packages/client-sdk-nodejs/build-scripts/publish-lambda-layer.sh deleted file mode 100755 index ba218838d..000000000 --- a/packages/client-sdk-nodejs/build-scripts/publish-lambda-layer.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash -set -e -set -x - -CURRENT_DIR=${PWD##*/} -if [[ $CURRENT_DIR -ne 'build-scripts' ]]; then - echo "Please run this script in the build-scripts directory" - exit 1 -fi - -if [ "$#" -ne 1 ]; then - echo "Must pass version as argument to publish the lambda layer" -fi - -LAYER_NAME="momento-sdk-nodejs-experimental" -FILENAME="layer.zip" -pushd .. - if [[ ! -f "${FILENAME}" ]]; then - echo "${FILENAME} does not exist. Please run ./build-lambda-layer.sh first before trying to publish." - exit 1 - fi - - LAYER_VERSION=$(aws lambda publish-layer-version \ - --layer-name "${LAYER_NAME}" \ - --description "Lambda layer using Momento sdk version ${1}" \ - --license-info "Apache License 2.0" \ - --zip-file fileb://${FILENAME} \ - --compatible-runtimes nodejs14.x nodejs12.x | jq '.Version') - - aws lambda add-layer-version-permission \ - --layer-name "${LAYER_NAME}" \ - --version-number "${LAYER_VERSION}" \ - --statement-id "version_${1//\./_}" \ - --principal \* \ - --action lambda:GetLayerVersion -popd diff --git a/packages/client-sdk-nodejs/package.json b/packages/client-sdk-nodejs/package.json index 80bcc3909..d166469ea 100644 --- a/packages/client-sdk-nodejs/package.json +++ b/packages/client-sdk-nodejs/package.json @@ -22,7 +22,7 @@ "lint": "eslint . --ext .ts", "format": "eslint . --ext .ts --fix", "watch": "tsc -w", - "build": "tsc" + "build": "cd ../core && npm run build && cd - && rm -rf dist && tsc" }, "author": "", "license": "Apache-2.0", diff --git a/packages/client-sdk-web/package.json b/packages/client-sdk-web/package.json index c38157dfa..92b9c5ff2 100644 --- a/packages/client-sdk-web/package.json +++ b/packages/client-sdk-web/package.json @@ -22,7 +22,7 @@ "lint": "eslint . --ext .ts", "format": "eslint . --ext .ts --fix", "watch": "tsc -w", - "build": "rm -rf dist && tsc" + "build": "cd ../core && npm run build && cd - && rm -rf dist && tsc" }, "author": "", "license": "Apache-2.0",