chiitiler 1.14.1 → 1.14.2

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
@@ -87,9 +87,6 @@ docker run -p 3000:3000 -d \
87
87
  -e CHIITILER_S3CACHE_BUCKET=bucketname \
88
88
  -e CHIITILER_S3_REGION=ap-northeast-1 \
89
89
  ghcr.io/kanahiro/chiitiler
90
-
91
- # you also can pass options
92
- docker run -p 8000:8000 ghcr.io/kanahiro/chiitiler tile-server -p 8000 -c s3 -s3b bucketname -s3r ap-northeast-1
93
90
  ```
94
91
 
95
92
  #### Environment Variables
@@ -111,47 +108,12 @@ you can pass server options via environment variables
111
108
  | CHIITILER_S3_ENDPOINT | | s3 endpoint for caching/fetching |
112
109
  | CHIITILER_S3_FORCE_PATH_STYLE | false | force path style for s3, needed for minio |
113
110
 
114
- ### CLI (deprecated)
115
-
116
- - Node.js v18 or v20
117
-
118
- ```sh
119
- npm install
120
- npm run build
121
- node dist/main.js tile-server
122
- # running server: http://localhost:3000
123
-
124
- # develop
125
- npm run dev
126
- # running server: http://localhost:3000
127
- # debug page: http://localhost:3000/debug
128
- ```
129
-
130
- #### options
131
-
132
- ```sh
133
- node dist/main.js tile-server -p 8000 -c file -ctl 60 -fcd cachedir -D
134
- # -p: port number
135
- # -c: cache method
136
- # -ctl: cache ttl
137
- # -fcd: cache directory
138
- # -D: debug mode
139
-
140
- node dist/main.js tile-server -c memory -ctl 60 -mci 1000
141
- # -mci: max cache items
142
-
143
- node dist/main.js tile-server -c s3 -s3b chiitiler -s3r ap-northeast-1
144
- # -s3b: S3 bucket name for cache
145
- # -s3r: S3 bucket region
146
- # caution: TTL is not supported in S3 cache, please utilize S3 lifecycle policy
147
- ```
148
-
149
111
  ### debug page
150
112
 
151
113
  - in debug mode, you can access:
152
- - debug page: <http://localhost:3000/debug>
153
- - You can pass style.json url: <http://localhost:3000/debug?url=https://tile.openstreetmap.jp/styles/osm-bright/style.json>
154
- - editor page: <http://localhost:3000/editor>
114
+ - debug page: <http://localhost:3000/debug>
115
+ - You can pass style.json url: <http://localhost:3000/debug?url=https://tile.openstreetmap.jp/styles/osm-bright/style.json>
116
+ - editor page: <http://localhost:3000/editor>
155
117
 
156
118
  ## supported protocols in style.json
157
119
 
@@ -1,6 +1,6 @@
1
1
  import { getFilesystemSource } from './fs.js';
2
2
  import { getHttpSource } from './http.js';
3
- import { getPmtilesSoruce } from './pmtiles.js';
3
+ import { getPmtilesSource } from './pmtiles.js';
4
4
  import { getMbtilesSource } from './mbtiles.js';
5
5
  import { getS3Source } from './s3.js';
6
6
  import { getCogSource } from './cog.js';
@@ -22,7 +22,7 @@ async function getSource(uri, cache = noneCache()) {
22
22
  else if (uri.startsWith('mbtiles://'))
23
23
  data = await getMbtilesSource(uri);
24
24
  else if (uri.startsWith('pmtiles://'))
25
- data = await getPmtilesSoruce(uri, cache);
25
+ data = await getPmtilesSource(uri, cache);
26
26
  else if (uri.startsWith('cog://'))
27
27
  data = await getCogSource(uri);
28
28
  else
@@ -4,5 +4,5 @@ import { type Cache } from '../cache/index.js';
4
4
  * uri = pmtiles://http://url/to/file.pmtiles/{z}/{x}/{y}
5
5
  * uri = pmtiles://s3://bucket/key/to/file.pmtiles/{z}/{x}/{y}
6
6
  */
7
- declare function getPmtilesSoruce(uri: string, cache?: Cache): Promise<Buffer | null>;
8
- export { getPmtilesSoruce };
7
+ declare function getPmtilesSource(uri: string, cache?: Cache): Promise<Buffer | null>;
8
+ export { getPmtilesSource };
@@ -72,7 +72,7 @@ class S3Source {
72
72
  * uri = pmtiles://http://url/to/file.pmtiles/{z}/{x}/{y}
73
73
  * uri = pmtiles://s3://bucket/key/to/file.pmtiles/{z}/{x}/{y}
74
74
  */
75
- async function getPmtilesSoruce(uri, cache = noneCache()) {
75
+ async function getPmtilesSource(uri, cache = noneCache()) {
76
76
  const pmtilesUri = uri
77
77
  .replace('pmtiles://', '')
78
78
  .replace(/\/\d+\/\d+\/\d+$/, '');
@@ -112,4 +112,4 @@ async function getPmtilesSoruce(uri, cache = noneCache()) {
112
112
  cache.set(uri, buf);
113
113
  return buf;
114
114
  }
115
- export { getPmtilesSoruce };
115
+ export { getPmtilesSource };
@@ -1,2 +1,2 @@
1
- declare function getS3Source(uri: string): Promise<Buffer<Uint8Array<ArrayBufferLike>> | null>;
1
+ declare function getS3Source(uri: string): Promise<Buffer<ArrayBuffer> | null>;
2
2
  export { getS3Source };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "chiitiler",
4
- "version": "1.14.1",
4
+ "version": "1.14.2",
5
5
  "description": "Tiny map rendering server for MapLibre Style Spec",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -26,15 +26,17 @@
26
26
  "@vitest/coverage-v8": "^1.6.0",
27
27
  "esbuild": "^0.25.0",
28
28
  "image-size": "^1.1.1",
29
- "maplibre-gl": "^3.3.1",
30
29
  "ts-node": "^10.9.1",
31
30
  "tsx": "^4.7.1",
32
31
  "typescript": "^5.2.2",
33
- "vitest": "^1.6.0",
32
+ "vitest": "^1.6.0"
33
+ },
34
+ "dependencies": {
34
35
  "@aws-sdk/client-s3": "^3.418.0",
35
36
  "@hono/node-server": "^1.12.0",
36
37
  "@mapbox/sphericalmercator": "^1.2.0",
37
38
  "@mapbox/tilebelt": "^1.0.2",
39
+ "@maplibre/maplibre-gl-native": "^5.4.0",
38
40
  "@maplibre/maplibre-gl-style-spec": "^20.2.0",
39
41
  "better-sqlite3": "^9.6.0",
40
42
  "commander": "^11.0.0",
@@ -43,10 +45,8 @@
43
45
  "hono": "^4.5.4",
44
46
  "lightning-pool": "^4.2.2",
45
47
  "lru-cache": "^11.0.0",
46
- "pmtiles": "^3.0.5"
47
- },
48
- "dependencies": {
49
- "@maplibre/maplibre-gl-native": "^5.4.0",
48
+ "maplibre-gl": "^3.3.1",
49
+ "pmtiles": "^3.0.5",
50
50
  "sharp": "^0.32.5"
51
51
  }
52
52
  }