Module

x/lambda/artifacts

A deno runtime for AWS Lambda. Deploy deno via docker, SAM, serverless, or bundle it yourself.
Very Popular
Go to Latest
File
#!/bin/shset -euo pipefail
## Generate zip artifacts for deno-lambda publishing.#
# populate the cache from deno.land/x/lambda so we use the current filesmkdir -p .deno_dir/deps/https/deno.land/x/lambda/cp mod.ts .deno_dir/deps/https/deno.land/x/lambda/mod.tscp types.d.ts .deno_dir/deps/https/deno.land/x/lambda/types.d.ts# this shouldn't require a fetch to deno.landDENO_DIR=/src/runtime/.deno_dir ./bin/deno cache hello.ts
# assert the required files are going to be present in the zipls bin/deno &> /dev/null && ls bootstrap &> /dev/null && ls hello.ts &> /dev/null
cp -R .deno_dir/gen/file/$PWD/. .deno_dir/LAMBDA_TASK_ROOTzip -qq deno-lambda-layer.zip -x '.deno_dir/gen/file/*' -r .deno_dir ./bin/deno bootstrap hello.tszip -qq deno-lambda-example.zip -x '.deno_dir/gen/file/*' -r .deno_dir hello.ts
DENO_DIR=/src/runtime/.deno_dir ./bin/deno bundle hello.ts hello.bundle.js
rm -rf .deno_dirmkdir -p .deno_dir/deps/https/deno.land/x/lambda/cp mod.ts .deno_dir/deps/https/deno.land/x/lambda/mod.tsDENO_DIR=/src/runtime/.deno_dir ./bin/deno cache lock.tscp -R .deno_dir/gen/file/$PWD/. .deno_dir/LAMBDA_TASK_ROOTzip -qq lock.zip -x '.deno_dir/gen/file/*' -r .deno_dir lock.ts