chiitiler 1.23.5 → 1.23.6
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 +3 -3
- package/dist/cli.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -139,10 +139,10 @@ All options can be set via CLI flag or environment variable.
|
|
|
139
139
|
| `--port <n>` | `CHIITILER_PORT` | `3000` |
|
|
140
140
|
| `--debug` | `CHIITILER_DEBUG` | `false` |
|
|
141
141
|
| `--user-agent <ua>` | `CHIITILER_USER_AGENT` | (none) |
|
|
142
|
-
| `--prewarm` | `CHIITILER_PREWARM` | `
|
|
142
|
+
| `--no-prewarm` | `CHIITILER_PREWARM` | `true` |
|
|
143
143
|
| — | `CHIITILER_PROCESSES` | `1` (set `0` for all CPUs) |
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
Prewarm is enabled by default: one tile is rendered at startup **before** the server starts listening, moving shared renderer initialization work into startup. Either `--no-prewarm` or `CHIITILER_PREWARM=false` disables it. Style-specific tiles, glyphs, and sprites are not preloaded.
|
|
146
146
|
|
|
147
147
|
### Cache
|
|
148
148
|
|
|
@@ -181,7 +181,7 @@ npm install
|
|
|
181
181
|
npm run dev # tsx watch mode
|
|
182
182
|
npm run test:unit # vitest
|
|
183
183
|
npm run test:integration # end-to-end
|
|
184
|
-
npm run test:benchmark # see BENCHMARK.md
|
|
184
|
+
npm run test:benchmark # see bench/BENCHMARK.md
|
|
185
185
|
npm run build # bundle to build/main.cjs
|
|
186
186
|
```
|
|
187
187
|
|
package/dist/cli.js
CHANGED
|
@@ -73,8 +73,8 @@ function parsePort(port) {
|
|
|
73
73
|
return 3000;
|
|
74
74
|
}
|
|
75
75
|
function parsePrewarm(prewarmFlag) {
|
|
76
|
-
//
|
|
77
|
-
return prewarmFlag
|
|
76
|
+
// Commander defaults a negated option to true; either opt-out disables warmup.
|
|
77
|
+
return prewarmFlag !== false && process.env.CHIITILER_PREWARM !== 'false';
|
|
78
78
|
}
|
|
79
79
|
function parseDebug(debug) {
|
|
80
80
|
// command-line option
|
|
@@ -106,7 +106,7 @@ export function createProgram() {
|
|
|
106
106
|
.option('--gcs-api-endpoint <api-endpoint>', 'gcs api endpoint', '')
|
|
107
107
|
.option('-p, --port <port>', 'port number')
|
|
108
108
|
.option('--user-agent <user-agent>', 'User-Agent header for outbound HTTP requests')
|
|
109
|
-
.option('--prewarm', '
|
|
109
|
+
.option('--no-prewarm', 'disable startup renderer warmup (enabled by default)')
|
|
110
110
|
.option('-D, --debug', 'debug mode')
|
|
111
111
|
.action(async (options) => {
|
|
112
112
|
// env fallback (CHIITILER_USER_AGENT) is handled in userAgent.ts
|