chiitiler 1.24.1 → 2.0.0-pre.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -167,6 +167,11 @@ Prewarm is enabled by default: one tile is rendered at startup **before** the se
167
167
 
168
168
  ### Cache
169
169
 
170
+ Renderer Maps are reused per style and rendering mode without an idle timeout.
171
+ They are released when their pool is evicted from the 10-entry LRU or explicitly
172
+ closed. This avoids repeated initialization after quiet periods, at the cost of
173
+ retaining native renderer memory between requests.
174
+
170
175
  | Flag | Env | Default |
171
176
  | --- | --- | --- |
172
177
  | `--cache <none\|memory\|file\|s3\|gcs>` | `CHIITILER_CACHE_METHOD` | `none` |
@@ -220,6 +225,44 @@ const cache = ChiitilerCache.withMemoryCache(
220
225
  - **Docker Compose** — see [`docker-compose.yml`](./docker-compose.yml) (includes RustFS + fake-gcs-server for local testing)
221
226
  - **AWS Lambda** — ready-to-deploy CDK app in [`cdk/`](./cdk)
222
227
 
228
+ Images built from this Dockerfile compile the MapLibre Native version pinned in `package-lock.json`
229
+ with EGL and use Mesa's surfaceless software renderer. Xvfb and `DISPLAY` are
230
+ not required. This affects chiitiler's Docker images only; upstream npm binaries
231
+ are unchanged. The first image build compiles MapLibre Native and takes longer;
232
+ subsequent application-only builds reuse that layer. Native compilation uses two
233
+ jobs by default (`--build-arg NATIVE_BUILD_JOBS=4` to increase it).
234
+
235
+ The production runtime uses `scratch` with a stripped Node executable, the
236
+ application, Lambda Adapter, CA certificates, and the shared libraries and Mesa
237
+ drivers needed to run them. It has no shell or package manager; use the `dev`
238
+ target for an interactive development environment.
239
+
240
+ To build and check rendering without a display server or network:
241
+
242
+ ```sh
243
+ docker build -t chiitiler:egl .
244
+ docker run --rm --network none \
245
+ -v "$PWD/tests/docker-egl.mjs:/app/docker-egl.mjs:ro" \
246
+ chiitiler:egl node /app/docker-egl.mjs
247
+ ```
248
+
249
+ ### Pre-releases from a branch
250
+
251
+ A release tag can point to a PR branch commit; merging into `main` is not
252
+ required. Set `package.json` and the lockfile to the release version, tag that
253
+ commit (for example `v2.0.0-pre.0`), and publish a GitHub pre-release. Both
254
+ publication workflows run on `release.published` and check that the release tag
255
+ matches `package.json`.
256
+
257
+ Pre-releases publish the versioned GHCR image and the npm `next` tag without
258
+ updating `latest`. Stable releases also update GHCR `latest` and use npm
259
+ `latest`. A prerelease suffix in the package version always selects `next`,
260
+ even if the GitHub pre-release checkbox is omitted.
261
+
262
+ For manual workflow runs, select the branch/tag and the `channel` input
263
+ (default `next`). Choosing `latest` for a prerelease version fails before
264
+ publication. Production container tags use `v<package version>` for manual runs.
265
+
223
266
  ## Develop
224
267
 
225
268
  Requires Node.js 24.12+ and `sharp` system deps (see [Dockerfile](./Dockerfile)).
@@ -50,6 +50,10 @@ async function getRenderPool(style, cache, mode) {
50
50
  destroy: (map) => {
51
51
  map.release();
52
52
  },
53
+ }, {
54
+ // Keep initialized Maps until their pool is evicted or closed. Disable
55
+ // idle housekeeping rather than running a timer in warm Lambda environments.
56
+ houseKeepInterval: 0,
53
57
  });
54
58
  mapPoolCache.set(cacheKey, newPool);
55
59
  return newPool;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "chiitiler",
4
- "version": "1.24.1",
4
+ "version": "2.0.0-pre.0",
5
5
  "description": "Tiny map rendering server for MapLibre Style Spec",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",