@basemaps/lambda-tiler 6.15.0 → 6.18.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/CHANGELOG.md CHANGED
@@ -3,6 +3,45 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [6.18.0](https://github.com/linz/basemaps/compare/v6.17.0...v6.18.0) (2021-12-14)
7
+
8
+ **Note:** Version bump only for package @basemaps/lambda-tiler
9
+
10
+
11
+
12
+
13
+
14
+ # [6.17.0](https://github.com/linz/basemaps/compare/v6.16.1...v6.17.0) (2021-12-05)
15
+
16
+
17
+ ### Features
18
+
19
+ * **lambda-tiler:** Stop caching for the stylejson. ([#2011](https://github.com/linz/basemaps/issues/2011)) ([f29ae16](https://github.com/linz/basemaps/commit/f29ae16cd0b858fd9929a8cbcefa1c5113687bc9))
20
+ * **landing:** use topographic name not topolike ([#2008](https://github.com/linz/basemaps/issues/2008)) ([a281d87](https://github.com/linz/basemaps/commit/a281d874ae8211447282ad41dd497e96689ceb88))
21
+
22
+
23
+
24
+
25
+
26
+ ## [6.16.1](https://github.com/linz/basemaps/compare/v6.16.0...v6.16.1) (2021-11-30)
27
+
28
+ **Note:** Version bump only for package @basemaps/lambda-tiler
29
+
30
+
31
+
32
+
33
+
34
+ # [6.16.0](https://github.com/linz/basemaps/compare/v6.15.0...v6.16.0) (2021-11-29)
35
+
36
+
37
+ ### Bug Fixes
38
+
39
+ * **lambda-tiler:** p-limit is a needed dependency ([#1998](https://github.com/linz/basemaps/issues/1998)) ([dfb1b25](https://github.com/linz/basemaps/commit/dfb1b2575e9b40b96ffa4bdcfa8f1496b18ae25e))
40
+
41
+
42
+
43
+
44
+
6
45
  # [6.15.0](https://github.com/linz/basemaps/compare/v6.14.2...v6.15.0) (2021-11-28)
7
46
 
8
47
 
@@ -172,14 +172,14 @@ o.spec('LambdaXyz', () => {
172
172
  o('should serve tile json for tile_set', async () => {
173
173
  var _a;
174
174
  process.env[Env.PublicUrlBase] = 'https://tiles.test';
175
- const request = mockRequest('/v1/tiles/topolike/Google/tile.json', 'get', apiKeyHeader);
175
+ const request = mockRequest('/v1/tiles/topographic/Google/tile.json', 'get', apiKeyHeader);
176
176
  const res = await handleRequest(request);
177
177
  o(res.status).equals(200);
178
178
  o(res.header('content-type')).equals('application/json');
179
179
  o(res.header('cache-control')).equals('max-age=120');
180
180
  const body = Buffer.from((_a = res.body) !== null && _a !== void 0 ? _a : '', 'base64').toString();
181
181
  o(JSON.parse(body)).deepEquals({
182
- tiles: [`https://tiles.test/v1/tiles/topolike/Google/{z}/{x}/{y}.pbf?api=${apiKey}`],
182
+ tiles: [`https://tiles.test/v1/tiles/topographic/Google/{z}/{x}/{y}.pbf?api=${apiKey}`],
183
183
  minzoom: 0,
184
184
  maxzoom: 15,
185
185
  format: 'pbf',
@@ -194,7 +194,7 @@ o.spec('LambdaXyz', () => {
194
194
  });
195
195
  o('should not found style json', async () => {
196
196
  process.env[Env.PublicUrlBase] = 'https://tiles.test';
197
- const request = mockRequest('/v1/tiles/topolike/Google/style/topolike.json', 'get', apiKeyHeader);
197
+ const request = mockRequest('/v1/tiles/topographic/Google/style/topographic.json', 'get', apiKeyHeader);
198
198
  sandbox.stub(Config.Style, 'get').resolves(null);
199
199
  const res = await handleRequest(request);
200
200
  o(res.status).equals(404);
@@ -203,11 +203,11 @@ o.spec('LambdaXyz', () => {
203
203
  var _a;
204
204
  const host = 'https://tiles.test';
205
205
  process.env[Env.PublicUrlBase] = host;
206
- const request = mockRequest('/v1/tiles/topolike/Google/style/topolike.json', 'get', apiKeyHeader);
206
+ const request = mockRequest('/v1/tiles/topographic/Google/style/topographic.json', 'get', apiKeyHeader);
207
207
  const fakeStyle = {
208
208
  version: 8,
209
209
  id: 'test',
210
- name: 'topolike',
210
+ name: 'topographic',
211
211
  sources: {
212
212
  basemaps_vector: {
213
213
  type: 'vector',
@@ -248,15 +248,15 @@ o.spec('LambdaXyz', () => {
248
248
  metadata: { id: 'test' },
249
249
  };
250
250
  const fakeRecord = {
251
- id: 'st_topolike_production',
252
- name: 'topolike',
251
+ id: 'st_topographic_production',
252
+ name: 'topographic',
253
253
  style: fakeStyle,
254
254
  };
255
255
  sandbox.stub(Config.Style, 'get').resolves(fakeRecord);
256
256
  const res = await handleRequest(request);
257
257
  o(res.status).equals(200);
258
258
  o(res.header('content-type')).equals('application/json');
259
- o(res.header('cache-control')).equals('max-age=120');
259
+ o(res.header('cache-control')).equals('no-store');
260
260
  const body = Buffer.from((_a = res.body) !== null && _a !== void 0 ? _a : '', 'base64').toString();
261
261
  fakeStyle.sources.basemaps_vector = {
262
262
  type: 'vector',
@@ -150,7 +150,7 @@ export const TileRoute = {
150
150
  return NotModified;
151
151
  const response = new LambdaHttpResponse(200, 'ok');
152
152
  response.header(HttpHeader.ETag, cacheKey);
153
- response.header(HttpHeader.CacheControl, 'max-age=120');
153
+ response.header(HttpHeader.CacheControl, 'no-store');
154
154
  response.buffer(data, 'application/json');
155
155
  req.set('bytes', data.byteLength);
156
156
  return response;