@basemaps/lambda-tiler 6.35.0 → 6.36.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 +12 -0
- package/build/routes/__tests__/fonts.test.js +15 -11
- package/build/routes/__tests__/fonts.test.js.map +1 -1
- package/build/routes/__tests__/sprites.test.js +5 -10
- package/build/routes/__tests__/sprites.test.js.map +1 -1
- package/build/routes/fonts.js +1 -1
- package/build/routes/fonts.js.map +1 -1
- package/build/util/assets.provider.d.ts.map +1 -1
- package/build/util/assets.provider.js +2 -6
- package/build/util/assets.provider.js.map +1 -1
- package/build/util/config.loader.d.ts.map +1 -1
- package/build/util/config.loader.js +8 -1
- package/build/util/config.loader.js.map +1 -1
- package/dist/index.js +44 -44
- package/dist/node_modules/.package-lock.json +13 -10
- package/dist/node_modules/minimist/.eslintrc +54 -0
- package/dist/node_modules/minimist/.github/FUNDING.yml +12 -0
- package/dist/node_modules/minimist/.nycrc +14 -0
- package/dist/node_modules/minimist/CHANGELOG.md +212 -0
- package/dist/node_modules/minimist/{readme.markdown → README.md} +20 -1
- package/dist/node_modules/minimist/package.json +39 -9
- package/dist/node_modules/node-abi/abi_registry.json +8 -1
- package/dist/node_modules/node-abi/package.json +1 -1
- package/dist/node_modules/semver/classes/range.js +3 -0
- package/dist/node_modules/semver/index.js +81 -41
- package/dist/node_modules/semver/package.json +21 -10
- package/dist/package-lock.json +23 -20
- package/dist/package.json +1 -1
- package/package.json +4 -4
- package/src/routes/__tests__/fonts.test.ts +16 -16
- package/src/routes/__tests__/sprites.test.ts +6 -10
- package/src/routes/fonts.ts +1 -1
- package/src/util/assets.provider.ts +2 -5
- package/src/util/config.loader.ts +7 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/minimist/.travis.yml +0 -8
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semver",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.8",
|
|
4
4
|
"description": "The semantic version parser used by npm.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "tap",
|
|
8
8
|
"snap": "tap",
|
|
9
|
-
"preversion": "npm test",
|
|
10
|
-
"postversion": "npm publish",
|
|
11
|
-
"postpublish": "git push origin --follow-tags",
|
|
12
9
|
"lint": "eslint \"**/*.js\"",
|
|
13
10
|
"postlint": "template-oss-check",
|
|
14
11
|
"lintfix": "npm run lint -- --fix",
|
|
15
|
-
"prepublishOnly": "git push origin --follow-tags",
|
|
16
12
|
"posttest": "npm run lint",
|
|
17
13
|
"template-oss-apply": "template-oss-apply --force"
|
|
18
14
|
},
|
|
19
15
|
"devDependencies": {
|
|
20
16
|
"@npmcli/eslint-config": "^3.0.1",
|
|
21
|
-
"@npmcli/template-oss": "
|
|
17
|
+
"@npmcli/template-oss": "4.4.4",
|
|
22
18
|
"tap": "^16.0.0"
|
|
23
19
|
},
|
|
24
20
|
"license": "ISC",
|
|
@@ -31,6 +27,7 @@
|
|
|
31
27
|
},
|
|
32
28
|
"files": [
|
|
33
29
|
"bin/",
|
|
30
|
+
"lib/",
|
|
34
31
|
"classes/",
|
|
35
32
|
"functions/",
|
|
36
33
|
"internal/",
|
|
@@ -41,7 +38,11 @@
|
|
|
41
38
|
],
|
|
42
39
|
"tap": {
|
|
43
40
|
"check-coverage": true,
|
|
44
|
-
"coverage-map": "map.js"
|
|
41
|
+
"coverage-map": "map.js",
|
|
42
|
+
"nyc-arg": [
|
|
43
|
+
"--exclude",
|
|
44
|
+
"tap-snapshots/**"
|
|
45
|
+
]
|
|
45
46
|
},
|
|
46
47
|
"engines": {
|
|
47
48
|
"node": ">=10"
|
|
@@ -52,17 +53,18 @@
|
|
|
52
53
|
"author": "GitHub Inc.",
|
|
53
54
|
"templateOSS": {
|
|
54
55
|
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
55
|
-
"version": "
|
|
56
|
+
"version": "4.4.4",
|
|
56
57
|
"engines": ">=10",
|
|
58
|
+
"content": "./scripts",
|
|
57
59
|
"ciVersions": [
|
|
58
60
|
"10.0.0",
|
|
59
61
|
"10.x",
|
|
60
62
|
"12.x",
|
|
61
63
|
"14.x",
|
|
62
|
-
"16.x"
|
|
64
|
+
"16.x",
|
|
65
|
+
"18.x"
|
|
63
66
|
],
|
|
64
67
|
"distPaths": [
|
|
65
|
-
"bin/",
|
|
66
68
|
"classes/",
|
|
67
69
|
"functions/",
|
|
68
70
|
"internal/",
|
|
@@ -70,6 +72,15 @@
|
|
|
70
72
|
"index.js",
|
|
71
73
|
"preload.js",
|
|
72
74
|
"range.bnf"
|
|
75
|
+
],
|
|
76
|
+
"allowPaths": [
|
|
77
|
+
"/classes/",
|
|
78
|
+
"/functions/",
|
|
79
|
+
"/internal/",
|
|
80
|
+
"/ranges/",
|
|
81
|
+
"/index.js",
|
|
82
|
+
"/preload.js",
|
|
83
|
+
"/range.bnf"
|
|
73
84
|
]
|
|
74
85
|
}
|
|
75
86
|
}
|
package/dist/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/lambda-tiler",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.36.0",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@basemaps/lambda-tiler",
|
|
9
|
-
"version": "6.
|
|
9
|
+
"version": "6.36.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"sharp": "0.30.7"
|
|
@@ -222,9 +222,12 @@
|
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
224
|
"node_modules/minimist": {
|
|
225
|
-
"version": "1.2.
|
|
226
|
-
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.
|
|
227
|
-
"integrity": "sha512-
|
|
225
|
+
"version": "1.2.7",
|
|
226
|
+
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
|
|
227
|
+
"integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
|
|
228
|
+
"funding": {
|
|
229
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
230
|
+
}
|
|
228
231
|
},
|
|
229
232
|
"node_modules/mkdirp-classic": {
|
|
230
233
|
"version": "0.5.3",
|
|
@@ -237,9 +240,9 @@
|
|
|
237
240
|
"integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
|
|
238
241
|
},
|
|
239
242
|
"node_modules/node-abi": {
|
|
240
|
-
"version": "3.
|
|
241
|
-
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.
|
|
242
|
-
"integrity": "sha512-
|
|
243
|
+
"version": "3.26.0",
|
|
244
|
+
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.26.0.tgz",
|
|
245
|
+
"integrity": "sha512-jRVtMFTChbi2i/jqo/i2iP9634KMe+7K1v35mIdj3Mn59i5q27ZYhn+sW6npISM/PQg7HrP2kwtRBMmh5Uvzdg==",
|
|
243
246
|
"dependencies": {
|
|
244
247
|
"semver": "^7.3.5"
|
|
245
248
|
},
|
|
@@ -341,9 +344,9 @@
|
|
|
341
344
|
]
|
|
342
345
|
},
|
|
343
346
|
"node_modules/semver": {
|
|
344
|
-
"version": "7.3.
|
|
345
|
-
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.
|
|
346
|
-
"integrity": "sha512-
|
|
347
|
+
"version": "7.3.8",
|
|
348
|
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
|
349
|
+
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
|
347
350
|
"dependencies": {
|
|
348
351
|
"lru-cache": "^6.0.0"
|
|
349
352
|
},
|
|
@@ -632,9 +635,9 @@
|
|
|
632
635
|
"integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="
|
|
633
636
|
},
|
|
634
637
|
"minimist": {
|
|
635
|
-
"version": "1.2.
|
|
636
|
-
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.
|
|
637
|
-
"integrity": "sha512-
|
|
638
|
+
"version": "1.2.7",
|
|
639
|
+
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
|
|
640
|
+
"integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g=="
|
|
638
641
|
},
|
|
639
642
|
"mkdirp-classic": {
|
|
640
643
|
"version": "0.5.3",
|
|
@@ -647,9 +650,9 @@
|
|
|
647
650
|
"integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
|
|
648
651
|
},
|
|
649
652
|
"node-abi": {
|
|
650
|
-
"version": "3.
|
|
651
|
-
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.
|
|
652
|
-
"integrity": "sha512-
|
|
653
|
+
"version": "3.26.0",
|
|
654
|
+
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.26.0.tgz",
|
|
655
|
+
"integrity": "sha512-jRVtMFTChbi2i/jqo/i2iP9634KMe+7K1v35mIdj3Mn59i5q27ZYhn+sW6npISM/PQg7HrP2kwtRBMmh5Uvzdg==",
|
|
653
656
|
"requires": {
|
|
654
657
|
"semver": "^7.3.5"
|
|
655
658
|
}
|
|
@@ -722,9 +725,9 @@
|
|
|
722
725
|
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
|
723
726
|
},
|
|
724
727
|
"semver": {
|
|
725
|
-
"version": "7.3.
|
|
726
|
-
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.
|
|
727
|
-
"integrity": "sha512-
|
|
728
|
+
"version": "7.3.8",
|
|
729
|
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
|
730
|
+
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
|
728
731
|
"requires": {
|
|
729
732
|
"lru-cache": "^6.0.0"
|
|
730
733
|
}
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/lambda-tiler",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.36.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/linz/basemaps.git",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"types": "./build/index.d.ts",
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@basemaps/config": "^6.
|
|
25
|
+
"@basemaps/config": "^6.36.0",
|
|
26
26
|
"@basemaps/geo": "^6.32.1",
|
|
27
|
-
"@basemaps/shared": "^6.
|
|
27
|
+
"@basemaps/shared": "^6.36.0",
|
|
28
28
|
"@basemaps/tiler": "^6.35.0",
|
|
29
29
|
"@basemaps/tiler-sharp": "^6.35.0",
|
|
30
30
|
"@chunkd/fs": "^8.5.1",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"@types/sharp": "^0.30.3",
|
|
59
59
|
"pretty-json-log": "^1.0.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "c232694ad1f1186b7b56a8af1def56ef165df8fd"
|
|
62
62
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { base58, ConfigProviderMemory } from '@basemaps/config';
|
|
2
|
-
import {
|
|
2
|
+
import { getDefaultConfig } from '@basemaps/shared';
|
|
3
3
|
import { fsa } from '@chunkd/fs';
|
|
4
4
|
import o from 'ospec';
|
|
5
|
+
import { createSandbox } from 'sinon';
|
|
5
6
|
import { handler } from '../../index.js';
|
|
6
7
|
import { CachedConfig } from '../../util/config.cache.js';
|
|
8
|
+
import { ConfigLoader } from '../../util/config.loader.js';
|
|
7
9
|
import { CoSources } from '../../util/source.cache.js';
|
|
8
10
|
import { Api, mockRequest, mockUrlRequest } from '../../__tests__/xyz.util.js';
|
|
9
11
|
import { fontList } from '../fonts.js';
|
|
@@ -11,18 +13,20 @@ import { FsMemory } from './memory.fs.js';
|
|
|
11
13
|
|
|
12
14
|
o.spec('/v1/fonts', () => {
|
|
13
15
|
const memory = new FsMemory();
|
|
16
|
+
const sandbox = createSandbox();
|
|
17
|
+
const config = new ConfigProviderMemory();
|
|
18
|
+
|
|
14
19
|
o.before(() => {
|
|
15
20
|
fsa.register('memory://', memory);
|
|
16
21
|
});
|
|
17
|
-
const assetLocation = process.env[Env.AssetLocation];
|
|
18
22
|
|
|
19
23
|
o.beforeEach(() => {
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
config.assets = 'memory://';
|
|
25
|
+
sandbox.stub(ConfigLoader, 'getDefaultConfig').resolves(config);
|
|
22
26
|
});
|
|
23
27
|
|
|
24
28
|
o.afterEach(() => {
|
|
25
|
-
|
|
29
|
+
sandbox.restore();
|
|
26
30
|
CachedConfig.cache.clear();
|
|
27
31
|
CoSources.cache.clear();
|
|
28
32
|
memory.files.clear();
|
|
@@ -34,7 +38,7 @@ o.spec('/v1/fonts', () => {
|
|
|
34
38
|
});
|
|
35
39
|
|
|
36
40
|
o('should return a list of fonts found', async () => {
|
|
37
|
-
await fsa.write('memory://fonts.json', Buffer.from(JSON.stringify(['Roboto Black', 'Roboto Thin'])));
|
|
41
|
+
await fsa.write('memory://fonts/fonts.json', Buffer.from(JSON.stringify(['Roboto Black', 'Roboto Thin'])));
|
|
38
42
|
const res = await fontList(mockRequest('/v1/fonts.json'));
|
|
39
43
|
o(res.status).equals(200);
|
|
40
44
|
o(res.header('content-type')).equals('application/json');
|
|
@@ -44,7 +48,6 @@ o.spec('/v1/fonts', () => {
|
|
|
44
48
|
|
|
45
49
|
o('should get the correct font', async () => {
|
|
46
50
|
await fsa.write('memory://fonts/Roboto Thin/0-255.pbf', Buffer.from(''));
|
|
47
|
-
|
|
48
51
|
const res255 = await handler.router.handle(mockRequest('/v1/fonts/Roboto Thin/0-255.pbf'));
|
|
49
52
|
o(res255.status).equals(200);
|
|
50
53
|
o(res255.header('content-type')).equals('application/x-protobuf');
|
|
@@ -58,7 +61,6 @@ o.spec('/v1/fonts', () => {
|
|
|
58
61
|
|
|
59
62
|
o('should get the correct utf8 font', async () => {
|
|
60
63
|
await fsa.write('memory://fonts/🦄 🌈/0-255.pbf', Buffer.from(''));
|
|
61
|
-
|
|
62
64
|
const res255 = await handler.router.handle(mockRequest('/v1/fonts/🦄 🌈/0-255.pbf'));
|
|
63
65
|
o(res255.status).equals(200);
|
|
64
66
|
o(res255.header('content-type')).equals('application/x-protobuf');
|
|
@@ -74,14 +76,12 @@ o.spec('/v1/fonts', () => {
|
|
|
74
76
|
});
|
|
75
77
|
|
|
76
78
|
o('should get the correct utf8 font with default assets', async () => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const res255 = await handler.router.handle(
|
|
83
|
-
mockUrlRequest('/v1/fonts/🦄 🌈/0-255.pbf', `?config=${configLocation}`, Api.header),
|
|
84
|
-
);
|
|
79
|
+
getDefaultConfig().assets = undefined;
|
|
80
|
+
sandbox
|
|
81
|
+
.stub(config.ConfigBundle, 'get')
|
|
82
|
+
.resolves({ id: 'cb_latest', name: 'latest', path: 'latest', hash: 'hash', assets: 'memory://' });
|
|
83
|
+
await fsa.write('memory://fonts/Roboto Thin/0-255.pbf', Buffer.from(''));
|
|
84
|
+
const res255 = await handler.router.handle(mockRequest('/v1/fonts/Roboto Thin/0-255.pbf'));
|
|
85
85
|
o(res255.status).equals(200);
|
|
86
86
|
o(res255.header('content-type')).equals('application/x-protobuf');
|
|
87
87
|
o(res255.header('content-encoding')).equals(undefined);
|
|
@@ -1,35 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConfigProviderMemory } from '@basemaps/config';
|
|
2
2
|
import { fsa } from '@chunkd/fs';
|
|
3
3
|
import o from 'ospec';
|
|
4
4
|
import { createSandbox } from 'sinon';
|
|
5
5
|
import { gunzipSync, gzipSync } from 'zlib';
|
|
6
6
|
import { handler } from '../../index.js';
|
|
7
|
+
import { ConfigLoader } from '../../util/config.loader.js';
|
|
7
8
|
import { mockRequest } from '../../__tests__/xyz.util.js';
|
|
8
9
|
import { FsMemory } from './memory.fs.js';
|
|
9
10
|
|
|
10
11
|
o.spec('/v1/sprites', () => {
|
|
11
12
|
const memory = new FsMemory();
|
|
12
13
|
const sandbox = createSandbox();
|
|
14
|
+
const config = new ConfigProviderMemory();
|
|
15
|
+
|
|
13
16
|
o.before(() => {
|
|
14
17
|
fsa.register('memory://', memory);
|
|
15
18
|
});
|
|
16
|
-
const assetLocation = process.env[Env.AssetLocation];
|
|
17
19
|
|
|
18
20
|
o.beforeEach(() => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
config.assets = 'memory://';
|
|
22
|
+
sandbox.stub(ConfigLoader, 'getDefaultConfig').resolves(config);
|
|
21
23
|
});
|
|
22
24
|
|
|
23
25
|
o.afterEach(() => {
|
|
24
|
-
getDefaultConfig().assets = assetLocation;
|
|
25
26
|
memory.files.clear();
|
|
26
27
|
sandbox.restore();
|
|
27
28
|
});
|
|
28
|
-
o('should return 404 if no assets defined', async () => {
|
|
29
|
-
delete process.env[Env.AssetLocation];
|
|
30
|
-
const res404 = await handler.router.handle(mockRequest('/v1/sprites/topographic.json'));
|
|
31
|
-
o(res404.status).equals(404);
|
|
32
|
-
});
|
|
33
29
|
|
|
34
30
|
o('should fetch a json document', async () => {
|
|
35
31
|
await Promise.all([
|
package/src/routes/fonts.ts
CHANGED
|
@@ -12,5 +12,5 @@ export async function fontGet(req: LambdaHttpRequest<FontGet>): Promise<LambdaHt
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export async function fontList(req: LambdaHttpRequest): Promise<LambdaHttpResponse> {
|
|
15
|
-
return assetProvider.serve(req, 'fonts.json', 'application/json');
|
|
15
|
+
return assetProvider.serve(req, path.join('fonts', 'fonts.json'), 'application/json');
|
|
16
16
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Env } from '@basemaps/shared';
|
|
2
1
|
import { fsa } from '@chunkd/fs';
|
|
3
2
|
import { LambdaHttpResponse, LambdaHttpRequest, HttpHeader } from '@linzjs/lambda';
|
|
4
3
|
import { ConfigLoader } from './config.loader.js';
|
|
@@ -46,11 +45,9 @@ export class AssetProvider {
|
|
|
46
45
|
*/
|
|
47
46
|
async serve(req: LambdaHttpRequest, file: string, contentType: string): Promise<LambdaHttpResponse> {
|
|
48
47
|
const config = await ConfigLoader.load(req);
|
|
49
|
-
let assetLocation = Env.get(Env.AssetLocation);
|
|
50
48
|
if (config == null) return NotFound();
|
|
51
|
-
if (config.assets
|
|
52
|
-
|
|
53
|
-
const buf = await assetProvider.get(assetLocation, file);
|
|
49
|
+
if (config.assets == null) return NotFound();
|
|
50
|
+
const buf = await assetProvider.get(config.assets, file);
|
|
54
51
|
if (buf == null) return NotFound();
|
|
55
52
|
const cacheKey = Etag.key(buf);
|
|
56
53
|
if (Etag.isNotModified(req, cacheKey)) return NotModified();
|
|
@@ -12,7 +12,13 @@ const SafeProtocols = new Set(['s3', 'memory']);
|
|
|
12
12
|
export class ConfigLoader {
|
|
13
13
|
/** Exposed for testing */
|
|
14
14
|
static async getDefaultConfig(): Promise<BasemapsConfigProvider> {
|
|
15
|
-
|
|
15
|
+
const config = getDefaultConfig();
|
|
16
|
+
if (config.assets == null) {
|
|
17
|
+
const cb = await config.ConfigBundle.get(config.ConfigBundle.id('latest'));
|
|
18
|
+
if (cb == null) throw new LambdaHttpResponse(400, 'Unable to get lastest config bundle for asset.');
|
|
19
|
+
config.assets = cb.assets;
|
|
20
|
+
}
|
|
21
|
+
return config;
|
|
16
22
|
}
|
|
17
23
|
|
|
18
24
|
/** Lookup the config path from a request and return a standardized location */
|