@basemaps/shared 6.7.0 → 6.11.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 +61 -0
- package/build/__test__/api.path.test.js +57 -60
- package/build/__test__/api.test.js +29 -32
- package/build/__test__/env.test.js +9 -12
- package/build/__test__/util.test.js +36 -39
- package/build/__test__/vdom.parse.test.js +18 -21
- package/build/__test__/vdom.test.js +29 -32
- package/build/api.js +6 -10
- package/build/api.path.d.ts.map +1 -1
- package/build/api.path.js +15 -23
- package/build/aws/aws.dynamo.table.d.ts.map +1 -1
- package/build/aws/aws.dynamo.table.js +1 -2
- package/build/cli/__test__/git.tag.test.js +7 -10
- package/build/cli/api.key.js +4 -9
- package/build/cli/git.tag.js +4 -8
- package/build/composite.error.d.ts +1 -7
- package/build/composite.error.d.ts.map +1 -1
- package/build/composite.error.js +1 -13
- package/build/const.d.ts.map +1 -1
- package/build/const.js +3 -6
- package/build/file/__test__/file.local.test.js +19 -19
- package/build/file/__test__/file.operator.test.helper.d.ts.map +1 -1
- package/build/file/__test__/file.operator.test.helper.js +17 -21
- package/build/file/file.config.d.ts.map +1 -1
- package/build/file/file.config.js +2 -7
- package/build/file/index.d.ts +3 -3
- package/build/file/index.d.ts.map +1 -1
- package/build/file/index.js +14 -23
- package/build/index.d.ts +13 -14
- package/build/index.d.ts.map +1 -1
- package/build/index.js +18 -35
- package/build/log.d.ts +0 -3
- package/build/log.d.ts.map +1 -1
- package/build/log.js +6 -16
- package/build/logger.fatal.error.d.ts.map +1 -1
- package/build/logger.fatal.error.js +1 -5
- package/build/proj/__test__/projection.test.js +30 -33
- package/build/proj/__test__/projection.tile.matrix.set.test.js +130 -78
- package/build/proj/__test__/test.util.d.ts.map +1 -1
- package/build/proj/__test__/test.util.js +10 -17
- package/build/proj/citm2000.js +1 -4
- package/build/proj/nztm2000.js +1 -4
- package/build/proj/projection.d.ts +44 -33
- package/build/proj/projection.d.ts.map +1 -1
- package/build/proj/projection.js +84 -53
- package/build/proj/tile.set.name.d.ts.map +1 -1
- package/build/proj/tile.set.name.js +3 -7
- package/build/util.d.ts.map +1 -1
- package/build/util.js +5 -13
- package/build/vdom.d.ts.map +1 -1
- package/build/vdom.js +4 -11
- package/build/vdom.parse.d.ts +1 -1
- package/build/vdom.parse.d.ts.map +1 -1
- package/build/vdom.parse.js +5 -10
- package/package.json +12 -8
- package/build/__test__/aws.init.test.d.ts +0 -2
- package/build/__test__/aws.init.test.d.ts.map +0 -1
- package/build/__test__/aws.init.test.js +0 -9
- package/build/aws/api.key.table.d.ts +0 -29
- package/build/aws/api.key.table.d.ts.map +0 -1
- package/build/aws/api.key.table.js +0 -38
- package/build/aws/credentials.d.ts +0 -21
- package/build/aws/credentials.d.ts.map +0 -1
- package/build/aws/credentials.js +0 -42
- package/build/aws/index.d.ts +0 -18
- package/build/aws/index.d.ts.map +0 -1
- package/build/aws/index.js +0 -38
- package/build/aws/object.cache.d.ts +0 -6
- package/build/aws/object.cache.d.ts.map +0 -1
- package/build/aws/object.cache.js +0 -17
package/build/aws/index.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Config = exports.Aws = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
/**
|
|
6
|
-
* AWS by default does not reuse http connections this causes requests to the same service
|
|
7
|
-
* (S3, Dynamo, etc) to open a new HTTPS connection for every request the TLS handshake adds
|
|
8
|
-
* a lot of delay to every request (50+ms)
|
|
9
|
-
*
|
|
10
|
-
* This logic caches open TLS connections so that they can be reused
|
|
11
|
-
*
|
|
12
|
-
* **This needs to happen before anything tries to use the AWS SDK**
|
|
13
|
-
*/
|
|
14
|
-
process.env['AWS_NODEJS_CONNECTION_REUSE_ENABLED'] = '1';
|
|
15
|
-
const config_1 = require("@basemaps/config");
|
|
16
|
-
const s3_1 = tslib_1.__importDefault(require("aws-sdk/clients/s3"));
|
|
17
|
-
const const_1 = require("../const");
|
|
18
|
-
const api_key_table_1 = require("./api.key.table");
|
|
19
|
-
const credentials_1 = require("./credentials");
|
|
20
|
-
const s3 = new s3_1.default();
|
|
21
|
-
exports.Aws = {
|
|
22
|
-
s3,
|
|
23
|
-
credentials: {
|
|
24
|
-
/**
|
|
25
|
-
* Get a s3 that is bound to a specific role
|
|
26
|
-
*/
|
|
27
|
-
getS3ForRole(opts) {
|
|
28
|
-
if (opts == null)
|
|
29
|
-
return s3;
|
|
30
|
-
return credentials_1.S3Cache.getOrMake(opts.roleArn, opts);
|
|
31
|
-
},
|
|
32
|
-
getCredentialsForRole(roleArn, externalId) {
|
|
33
|
-
return credentials_1.CredentialsCache.getOrMake(roleArn, { roleArn, externalId });
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
apiKey: new api_key_table_1.ApiKeyTable(),
|
|
37
|
-
};
|
|
38
|
-
exports.Config = new config_1.ConfigDynamo(const_1.Const.TileMetadata.TableName);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object.cache.d.ts","sourceRoot":"","sources":["../../src/aws/object.cache.ts"],"names":[],"mappings":"AAAA,8BAAsB,WAAW,CAAC,CAAC,EAAE,CAAC;IAClC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAa;IAEhC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IASlC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC;CAC9B"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObjectCache = void 0;
|
|
4
|
-
class ObjectCache {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.map = new Map();
|
|
7
|
-
}
|
|
8
|
-
getOrMake(key, args) {
|
|
9
|
-
let existing = this.map.get(key);
|
|
10
|
-
if (existing == null) {
|
|
11
|
-
existing = this.create(args);
|
|
12
|
-
this.map.set(key, existing);
|
|
13
|
-
}
|
|
14
|
-
return existing;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.ObjectCache = ObjectCache;
|