Brandon Liu
534a66b5c0
pmtiles js 4.3.0 ( #531 )
...
* pmtiles js 4.3.0
* bump dependents
* update lockfiles
2025-02-21 15:52:39 +08:00
Brandon Liu
61e60c69d2
Make aws/cloudflare depend on pmtiles from npm [ #455 ] ( #515 )
...
* Make aws/cloudflare depend on pmtiles from npm [#455 ]
This is clearer to developers than relying on the local code being built.
* update check_examples.py
* bump openlayers to v2 with upgrade of pmtiles to v4 [#455 ]
* update to 4.2.1
2025-01-14 17:09:11 +08:00
Brandon Liu
5b075048cc
js: cleanup error throwing to always use new Error ( #504 )
2024-12-13 14:42:13 +08:00
Brandon Liu
e678dd5326
Pmtiles js v4 ( #499 )
...
* pmtiles js v4: remove pmtiles spec v2 compatibility [#287 ]
* restructure ts files into src
* add tsup for building ESM/CJS and making types work in ESM
* bump fflate dependency
* update CHANGELOG for js 4.0.0
2024-11-26 11:56:41 +08:00
Aapeli
d36823476b
Fix AWS build instructions ( #458 )
2024-09-19 10:05:41 +08:00
Brandon Liu
6f5479439b
add getTileJson method to PMTiles class [ #239 , #247 ] ( #453 )
...
* add getTileJson method to PMTiles class [#239 , #247 ]
* update docs related to FetchSource and headers [#397 ]
2024-09-18 15:57:14 +08:00
Brandon Liu
353a7611e8
serverless/cloudflare: update Wrangler version and compatibility dates. ( #450 )
...
* serverless/cloudflare: update Wrangler version and compatibility dates.
* fix Lambda build
2024-09-12 16:54:59 +08:00
Brandon Liu
61c38459ba
Switch lambda-function.zip to use CommonJS instead of ESM to match CloudFormation inlined template [ #448 ] ( #449 )
2024-09-12 10:17:09 +08:00
Brandon Liu
089d13d637
AWS updates ( #447 )
...
* AWS updates
* CloudFormation stack parameter for changing CloudFront tile cache TTL.
* S3 requests are always set as Requester Pays, enabling fetching from buckets in other accounts.
2024-09-11 13:45:40 +08:00
Brandon Liu
3f320aeda0
AWS Lambda: update dependencies ( #439 )
...
* fix fast-xml-parser security issue.
* update types to nodejs20
* replace deprecated @aws-sdk/node-http-handler with @smithy/node-http-handler, which requires bundling as it's not included in the Lambda runtime.
2024-09-04 11:34:44 +08:00
Brandon Liu
bcd5571ba5
Update CloudFormation template. ( #435 )
...
* Update CloudFormation template.
* Inline Lambda code into CloudFormation template.
read x-distribution-name header in TileJSON response if PUBLIC_HOSTNAME is not set.
* include both build-zip and build-cloudformation-stack in CI
2024-09-02 15:10:12 +08:00
Honricris
0fd91faf72
Aws Cloudformation Template Added ( #434 )
...
Co-authored-by: chonrc <chonrc00@estudiantes.unileon.es >
2024-08-27 13:03:00 +08:00
Markus Wendorf
dd8fdcd37d
cache-control ( #423 )
...
Change CACHE_MAX_AGE to CACHE_CONTROL in AWS and Cloudflare
2024-07-09 10:11:33 +02:00
Brandon Liu
43133f40c7
remove unused code ( #372 )
2024-02-26 11:25:35 +08:00
Brandon Liu
5b8627b0d8
Implement ETag logic for AWS and Cloudflare [ #90 ] ( #354 )
2024-02-07 11:46:05 +08:00
Brandon Liu
e86dd554be
lint cloudflare implementation ( #352 )
...
Add linters to AWS and cloudflare implementations [#287 ]
2024-02-05 16:59:06 +08:00
Brandon Liu
179b1590b1
JS: ETags logic as part of Sources [ #90 ] ( #341 )
...
* Simplifies ETag logic into Source, making if-match conditional requests possible.
* Avoid if-match in FetchSource for latency reasons - use cache buster on ETag change
* handle weak ETags correctly
* add mock fetch server for testing ETags [#90 ]
2024-01-31 23:00:24 +08:00
Brandon Liu
22d7a58f36
replace esbuild runner with tsx ( #333 )
...
* also bump esbuild to latest version in all package.jsons
2024-01-29 17:51:42 +08:00
Brandon Liu
8925d4272b
add utility module for AWS regions. ( #259 )
2023-09-28 14:31:22 +08:00
Blayne Chard
d1ea859443
add ETag and cache-control headers for 200 responses ( #231 )
...
* add etag and cache control headers for 200 responses
* fixup eTag -> ETag
2023-08-08 11:11:42 +08:00
Brandon Liu
7bab1d744e
aws: bump s3 client to 3.360.0 ( #216 )
...
* aws: bump s3 client to 3.360.0
2023-07-07 15:34:46 +08:00
Brandon Liu
0cac52741b
aws: return 501 instead of 400 if no PUBLIC_HOSTNAME configured for TileJSON
2023-06-23 20:23:19 +08:00
Brandon Liu
10021809dc
add AVIF enum in JS client [ #116 ]
2023-06-22 10:08:34 +08:00
Brandon Liu
17218ecb77
Merge pull request #170 from protomaps/cloudflare-tilejson
...
Cloudflare TileJSON
2023-06-21 18:34:28 +08:00
Brandon Liu
dc8eb73458
TileJSON support for Cloudflare and AWS [ #169 ]
...
* Remove TILE_PATH configuration as this makes supporting non-tile paths difficult
* create shared/ dir in serverless for common code
* linting fixes
2023-06-21 18:19:10 +08:00
Brandon Liu
7250f81846
serverless: improve error message if request doesn't match archive type [ #190 ]
2023-06-07 09:26:51 -04:00
Brandon Liu
cdda65a7eb
serverless js: make formatting consistent
2023-03-13 14:29:59 +08:00
James Scott-Brown
75da1623e2
correct build-> install in README
2023-03-06 16:23:36 +00:00
James Scott-Brown
ee86cb6c82
clarify build instructions for AWS lambda function
...
Doing a clean checkout then npm run build isn't enough to build the Lambda function - it will result in errors like
```
X [ERROR] Could not resolve "fflate"
../../js/index.ts:1:31:
1 │ import { decompressSync } from "fflate";
╵ ~~~~~~~~
You can mark the path "fflate" as external to exclude it from the bundle, which will remove this
error.
```
2023-03-06 16:22:21 +00:00
Brandon Liu
283b9f9d24
refactor AWS handler with modular handlerRaw
2022-12-21 16:30:56 +08:00
Brandon Liu
4e68e8eb13
Lambda: attach CORS headers for all 2xx-4xx responses
2022-11-24 13:06:09 +08:00
Brandon Liu
5b4737e066
serverless: fix cache keying with multiple archives.
2022-11-24 02:06:00 +08:00
Brandon Liu
ce6a4dbe0a
fix build and serverless READMEs
2022-11-23 12:06:26 +08:00
Brandon Liu
6b36663d10
serverless README cleanups, wrangler.toml is gitignored
2022-11-23 11:55:57 +08:00
Brandon Liu
f9a4848684
AWS Lambda: set 500ms timeouts on s3 requests to work around latency spikes.
2022-11-23 10:38:03 +08:00
Brandon Liu
f457724da1
pass HTTP metadata in S3/R2 Source impls
2022-11-22 14:43:15 +08:00
Brandon Liu
a619aa84e2
make tsconfigs consistent
2022-11-22 10:59:09 +08:00
Brandon Liu
9a3f519207
pmtiles_path can have {name} multiple times [ #97 ]
2022-11-22 10:47:31 +08:00
Brandon Liu
d986c418e4
aws README fixes
2022-11-22 10:46:40 +08:00
Brandon Liu
b01d90a1d0
AWS Lambda: add dev/staging CORS configuration variable.
2022-11-21 19:29:36 +08:00
Brandon Liu
533df1ba1c
AWS Lambda: Special case API Gateway responses to recompress data, to work around base64/binary content issues.
2022-11-21 19:29:36 +08:00
Brandon Liu
1d74564ab4
allow both pbf and mvt extensions for vector tiles for now. In the future, pbf option will be removed.
2022-11-21 19:29:36 +08:00
Brandon Liu
1da20f4f49
update AWS Lambda README with API Gateway and content-type details.
2022-11-21 19:29:36 +08:00
Brandon Liu
e86d9b7e04
AWS Lambda: port to node 18 and aws sdk v3
2022-11-21 19:29:36 +08:00
Brandon Liu
f3a5e0ab32
fix README aws examples
2022-11-21 19:29:36 +08:00
Brandon Liu
652666288b
cf set cache size explicitly
2022-11-21 19:29:36 +08:00
Brandon Liu
9fd1d39ab5
aws/cf depend on js/index instead of dist
2022-11-21 19:29:10 +08:00
Brandon Liu
4f0292ff91
lambda: native decompression, 256MB LRU cache
2022-11-21 19:29:10 +08:00
Brandon Liu
6d866e3507
AWS Lambda: mime types and extensions; remove CORS config from code
2022-11-14 14:39:58 +08:00
Brandon Liu
79c87fb04a
MIME type fixups for CDN compression
2022-11-11 20:21:22 +08:00