Brandon Liu
3451540a3a
js 3.0.4 ( #370 )
...
* export DecompressFunc type
* add typedoc comments
2024-02-25 18:29:48 +08:00
Brandon Liu
b229c1a8c7
Remove prefetch boolean from JS sources - no reason to ever not use i… ( #353 )
...
* Remove prefetch boolean from JS sources - no reason to ever not use it
* JS optimization for header fetches on etag invalidation [#90 ]
* If promises are shared between requests, only the first invalidation makes the header request.
* If promises are not shared, simply delete the key.
* JS 3.0.3 [#90 ]
* update CHANGELOG
2024-02-05 15:57:30 +08:00
Brandon Liu
61ed024d21
add typedoc [ #287 ] ( #343 )
2024-02-01 14:59:01 +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
6638d040a5
linting and typing improvements [ #287 ] ( #337 )
...
* Typing improvements [#287 ]
* rename FileApiSource to FileSource
* In a few cases we need to use any and biome-ignore. Deferring any restructuring here to js v4.
* replace prettier with biome
2024-01-31 12:22:25 +08:00
Brandon Liu
d7e24d046e
Type safety improvements [ #287 ] ( #335 )
...
* Work through linter issues related to non-null checks and any.
2024-01-29 22:46:08 +08:00
Brandon Liu
a6cbc1961e
Continue linting fixes [ #287 ] ( #332 )
...
* make use of ===, if branches, let/const, string templates, var names consistent style.
2024-01-29 17:41:12 +08:00
Brandon Liu
3b61cc8b49
apply automated linting fixes ( #331 )
2024-01-29 16:04:41 +08:00
Brandon Liu
b815bab09c
js: FetchSource takes optional custom headers ( #112 )
...
* js: FetchSource takes optional custom headers
2023-09-28 15:07:25 +08:00
Brandon Liu
77c956d381
Replace compression polyfill ("Worker" related errors) ( #222 )
...
* replace compression-streams-polyfill with globalThis check [#167 ]
* work around web worker issue with decompression polyfill.
* js 2.10.0-beta.0
* js 2.10.0; update examples
2023-07-31 22:20:42 +08:00
Brandon Liu
10021809dc
add AVIF enum in JS client [ #116 ]
2023-06-22 10:08:34 +08:00
Brandon Liu
b2aa3164fb
use compression-stream-polyfill for faster, native gzip decompression [ #97 , #167 ]
2023-05-22 10:49:16 +08:00
Logan Houp
bf35ff4829
pre-compute tzValues
2023-03-12 01:42:40 -05:00
Logan Houp
c07c73481b
add prettierrc config file
2023-03-11 12:35:07 -05:00
Brandon Liu
b23c98dd39
javascript: fix tile id overflow for z > 15 and error assertions in tests.
2022-12-22 21:56:03 +08:00
Brandon Liu
b8a78a7f6a
js: avoid use of BigInt operations for older safari browsers [ #103 ]
2022-12-10 18:36:04 +08:00
Brandon Liu
cffdb681cf
FetchSource handles servers that return 416 for requests beyond end of file.
...
* Refine the detection of servers that don't support byte serving.
* Improve console errors related to failed Fetch.
2022-12-04 23:03:39 +08:00
Brandon Liu
7b65314ca9
improve metadata view [ #49 ]
2022-12-02 01:51:58 +08:00
Brandon Liu
f457724da1
pass HTTP metadata in S3/R2 Source impls
2022-11-22 14:43:15 +08:00
Brandon Liu
6a1af0f4ca
simplify cache LRU logic; use count and not size
2022-11-21 19:29:34 +08:00
Brandon Liu
5de95b8fbe
modular decompression implementation
2022-11-14 21:58:20 +08:00
Brandon Liu
bcb2313d1e
js: make tryDecompress async
2022-11-14 21:41:57 +08:00
Brandon Liu
302eeab47e
js client: show error when future spec version is read
2022-11-01 17:02:49 +08:00
Brandon Liu
d010efd1ff
js client: Etag-related invalidation fixes [ #90 ]
2022-11-01 16:29:00 +08:00
Brandon Liu
afcd31b511
Fail gracefully when ETag mismatch happens more than once.
...
* Some HTTP servers will return 206 Partial Content with an ETag for the contents, not the entire resource.
* This change allows the client to continue with mismatched ETags if this case is detected.
2022-10-27 15:32:59 +08:00
Brandon Liu
ff19c76403
js code formatting and linting
2022-10-17 23:23:38 +08:00
Brandon Liu
37f315cc57
js: cleaner 404 error, change max directory depth to <= 3
2022-10-14 14:45:58 +08:00
Brandon Liu
6af34274d6
js: richer deprecation messages
2022-10-14 00:08:36 +08:00
Brandon Liu
3d40ca4501
improve v2 compatibility shim populating metadata
2022-10-05 22:42:07 +08:00
Brandon Liu
15be9a6c07
JS: Fix v2 defaults for Compression/TileType
2022-10-05 17:23:11 +08:00
Brandon Liu
b108831159
js v2 compatibility shim supports tile cancellation
2022-10-05 17:22:37 +08:00
Brandon Liu
7526a4b8b6
fix tests for spec magic number/compression changes
2022-10-05 10:46:19 +08:00
Brandon Liu
41b53c2c12
js library has better organization
2022-10-04 23:40:38 +08:00
Brandon Liu
98311c1f12
Finish implementation of v2 compatibility shim in v2.ts
2022-10-04 21:07:49 +08:00
Brandon Liu
3811ff9b1b
js decoder 1.1.0
...
adds fflate dependency; maplibre decoder can read gzipped tiles [#41 ]
2022-07-07 12:36:16 +08:00
Brandon Liu
9962b4e344
improvements to inspector app
2022-06-13 16:48:58 +08:00
Brandon Liu
beef7a3ab7
key by offset+length to allow fetches of magic numbers
2022-06-01 13:33:15 +08:00
Brandon Liu
6018d3d547
js: export more classes, root_entries list method
2022-06-01 10:10:41 +08:00
Brandon Liu
5d7fd9bdf7
modularize JS client to take non-HTTP sources, caching behavior
2022-05-30 12:38:10 +08:00
Brandon Liu
1b9d9966f5
rename pmtiles.ts > index.ts to fix node-style module resolution
2022-02-19 13:21:35 +08:00