Switch lambda-function.zip to use CommonJS instead of ESM to match CloudFormation inlined template [#448] (#449)

This commit is contained in:
Brandon Liu
2024-09-12 10:17:09 +08:00
committed by GitHub
parent ab5534df7e
commit 61c38459ba
2 changed files with 2 additions and 2 deletions

View File

@@ -25,7 +25,7 @@
], ],
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/protomaps/PMTiles.git" "url": "https://github.com/protomaps/PMTiles.git"
}, },
"bugs": { "bugs": {
"url": "https://github.com/protomaps/PMTiles/issues" "url": "https://github.com/protomaps/PMTiles/issues"

View File

@@ -13,7 +13,7 @@
"private": true, "private": true,
"scripts": { "scripts": {
"tsc": "tsc --noEmit --watch", "tsc": "tsc --noEmit --watch",
"build-zip": "esbuild src/index.ts --target=es2020 --outfile=dist/index.mjs --format=esm --bundle --platform=node --target=node20 --external:@aws-sdk/client-s3 --external:@aws-sdk/node-http-handler --banner:js=//$(git describe --always) && cd dist && zip lambda_function.zip index.mjs", "build-zip": "esbuild src/index.ts --target=es2020 --outfile=dist/index.mjs --format=cjs --bundle --platform=node --target=node20 --external:@aws-sdk/client-s3 --external:@aws-sdk/node-http-handler --banner:js=//$(git describe --always) && cd dist && zip lambda_function.zip index.js",
"build-cloudformation-stack": "esbuild src/index.ts --target=es2020 --minify --outfile=dist/index.js --format=cjs --bundle --platform=node --target=node20 --external:@aws-sdk/client-s3 --banner:js=//sha:$(git describe --always) && tsx inline_lambda.ts", "build-cloudformation-stack": "esbuild src/index.ts --target=es2020 --minify --outfile=dist/index.js --format=cjs --bundle --platform=node --target=node20 --external:@aws-sdk/client-s3 --banner:js=//sha:$(git describe --always) && tsx inline_lambda.ts",
"test": "tsx ../shared/index.test.ts", "test": "tsx ../shared/index.test.ts",
"biome": "biome check --config-path=../../js/ src --apply", "biome": "biome check --config-path=../../js/ src --apply",