@basemaps/shared 6.28.1 → 6.29.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 +17 -0
- package/build/cli/base.d.ts +6 -0
- package/build/cli/base.d.ts.map +1 -1
- package/build/cli/base.js +6 -4
- package/build/const.d.ts +2 -0
- package/build/const.d.ts.map +1 -1
- package/build/const.js +2 -0
- package/build/file/index.d.ts.map +1 -1
- package/build/file/index.js +10 -9
- package/package.json +5 -5
- package/build/aws/aws.dynamo.table.d.ts +0 -20
- package/build/aws/aws.dynamo.table.d.ts.map +0 -1
- package/build/aws/aws.dynamo.table.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
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.29.0](https://github.com/linz/basemaps/compare/v6.28.1...v6.29.0) (2022-06-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **cli:** ensure errors are thrown ([#2248](https://github.com/linz/basemaps/issues/2248)) ([c0923fe](https://github.com/linz/basemaps/commit/c0923fe137ce36c610c6e13332292d5c7f573c16))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **config:** create a hash of config bundles and use bundle created timestamp for records ([#2274](https://github.com/linz/basemaps/issues/2274)) ([bd9c7bb](https://github.com/linz/basemaps/commit/bd9c7bbf3f651417b60ba6ad2ca655f89f1f5cd9))
|
|
17
|
+
* **lambda-tiler:** serve assets via /v1/sprites and /v1/fonts ([#2246](https://github.com/linz/basemaps/issues/2246)) ([0e04c63](https://github.com/linz/basemaps/commit/0e04c631363d5b540ae16bfc8c4c7910e1308412))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
## [6.28.1](https://github.com/linz/basemaps/compare/v6.28.0...v6.28.1) (2022-06-07)
|
|
7
24
|
|
|
8
25
|
**Note:** Version bump only for package @basemaps/shared
|
package/build/cli/base.d.ts
CHANGED
|
@@ -11,6 +11,12 @@ export declare const CliId: string;
|
|
|
11
11
|
export declare abstract class BaseCommandLine extends CommandLineParser {
|
|
12
12
|
verbose: import("@rushstack/ts-command-line").CommandLineFlagParameter;
|
|
13
13
|
extraVerbose: import("@rushstack/ts-command-line").CommandLineFlagParameter;
|
|
14
|
+
toolName: string;
|
|
15
|
+
toolDescription: string;
|
|
16
|
+
constructor(opt: {
|
|
17
|
+
toolFilename: string;
|
|
18
|
+
toolDescription: string;
|
|
19
|
+
});
|
|
14
20
|
protected onExecute(): Promise<void>;
|
|
15
21
|
protected onDefineParameters(): void;
|
|
16
22
|
run(): void;
|
package/build/cli/base.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/cli/base.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,gCAAgC,CAAC;AAGxC,uCAAuC;AACvC,eAAO,MAAM,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAKrE,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,KAAK,QAAc,CAAC;AAEjC,8BAAsB,eAAgB,SAAQ,iBAAiB;IAC7D,OAAO,gEAIJ;IACH,YAAY,gEAIT;IAEH,SAAS,CAAC,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAepC,SAAS,CAAC,kBAAkB,IAAI,IAAI;IAI7B,GAAG,IAAI,IAAI;CAUnB"}
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/cli/base.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,gCAAgC,CAAC;AAGxC,uCAAuC;AACvC,eAAO,MAAM,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAKrE,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,KAAK,QAAc,CAAC;AAEjC,8BAAsB,eAAgB,SAAQ,iBAAiB;IAC7D,OAAO,gEAIJ;IACH,YAAY,gEAIT;IAEH,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;gBAEZ,GAAG,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE;IAMlE,SAAS,CAAC,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAepC,SAAS,CAAC,kBAAkB,IAAI,IAAI;IAI7B,GAAG,IAAI,IAAI;CAUnB"}
|
package/build/cli/base.js
CHANGED
|
@@ -15,8 +15,8 @@ export const CliInfo = {
|
|
|
15
15
|
/** Unique Id for this instance of the cli being run */
|
|
16
16
|
export const CliId = ulid.ulid();
|
|
17
17
|
export class BaseCommandLine extends CommandLineParser {
|
|
18
|
-
constructor() {
|
|
19
|
-
super(
|
|
18
|
+
constructor(opt) {
|
|
19
|
+
super(opt);
|
|
20
20
|
this.verbose = this.defineFlagParameter({
|
|
21
21
|
parameterLongName: '--verbose',
|
|
22
22
|
parameterShortName: '-v',
|
|
@@ -27,6 +27,8 @@ export class BaseCommandLine extends CommandLineParser {
|
|
|
27
27
|
parameterShortName: '-V',
|
|
28
28
|
description: 'Show extra extra logging detail',
|
|
29
29
|
});
|
|
30
|
+
this.toolName = opt.toolFilename;
|
|
31
|
+
this.toolDescription = opt.toolDescription;
|
|
30
32
|
}
|
|
31
33
|
onExecute() {
|
|
32
34
|
if (this.verbose.value) {
|
|
@@ -39,7 +41,7 @@ export class BaseCommandLine extends CommandLineParser {
|
|
|
39
41
|
LogConfig.get().level = 'info';
|
|
40
42
|
}
|
|
41
43
|
const logger = LogConfig.get().child({ id: CliId });
|
|
42
|
-
logger.info(CliInfo, '
|
|
44
|
+
logger.info({ package: CliInfo, cli: this.toolName }, 'Cli:Start');
|
|
43
45
|
LogConfig.set(logger);
|
|
44
46
|
return super.onExecute();
|
|
45
47
|
}
|
|
@@ -52,7 +54,7 @@ export class BaseCommandLine extends CommandLineParser {
|
|
|
52
54
|
LogConfig.get().fatal(err.obj, err.message);
|
|
53
55
|
}
|
|
54
56
|
else {
|
|
55
|
-
LogConfig.get().fatal({ err }, 'Failed
|
|
57
|
+
LogConfig.get().fatal({ err, cli: this.toolName }, 'Cli:Failed');
|
|
56
58
|
}
|
|
57
59
|
process.exit(1);
|
|
58
60
|
});
|
package/build/const.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export declare const Const: {
|
|
|
15
15
|
export declare const Env: {
|
|
16
16
|
/** Public URL base that tiles are served from */
|
|
17
17
|
PublicUrlBase: string;
|
|
18
|
+
/** Location of sprites and glyphs */
|
|
19
|
+
AssetLocation: string;
|
|
18
20
|
/** How many tiffs to load at one time */
|
|
19
21
|
TiffConcurrency: string;
|
|
20
22
|
/** Temporary folder used for processing, @default /tmp */
|
package/build/const.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../src/const.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,KAAK;;;;;;;;;;;;;CAajB,CAAC;AAEF,eAAO,MAAM,GAAG;IACd,iDAAiD;;IAGjD,yCAAyC;;IAGzC,0DAA0D;;IAG1D,6DAA6D;;IAG7D,uDAAuD;;IAGvD,6BAA6B;;IAG7B,4BAA4B;;IAG5B,wCAAwC;;IAGxC,kDAAkD;;;QAIhD,gDAAgD;;QAEhD,2DAA2D;;;;;;;;;IAW7D,+EAA+E;iBAClE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIxC,gGAAgG;uBAC7E,MAAM,iBAAiB,MAAM,GAAG,MAAM;oBAazC,OAAO;CAGxB,CAAC"}
|
|
1
|
+
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../src/const.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,KAAK;;;;;;;;;;;;;CAajB,CAAC;AAEF,eAAO,MAAM,GAAG;IACd,iDAAiD;;IAGjD,qCAAqC;;IAGrC,yCAAyC;;IAGzC,0DAA0D;;IAG1D,6DAA6D;;IAG7D,uDAAuD;;IAGvD,6BAA6B;;IAG7B,4BAA4B;;IAG5B,wCAAwC;;IAGxC,kDAAkD;;;QAIhD,gDAAgD;;QAEhD,2DAA2D;;;;;;;;;IAW7D,+EAA+E;iBAClE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIxC,gGAAgG;uBAC7E,MAAM,iBAAiB,MAAM,GAAG,MAAM;oBAazC,OAAO;CAGxB,CAAC"}
|
package/build/const.js
CHANGED
|
@@ -16,6 +16,8 @@ export const Const = {
|
|
|
16
16
|
export const Env = {
|
|
17
17
|
/** Public URL base that tiles are served from */
|
|
18
18
|
PublicUrlBase: 'BASEMAPS_PUBLIC_URL',
|
|
19
|
+
/** Location of sprites and glyphs */
|
|
20
|
+
AssetLocation: 'BASEMAPS_ASSEST_LOCATION',
|
|
19
21
|
/** How many tiffs to load at one time */
|
|
20
22
|
TiffConcurrency: 'TIFF_CONCURRENCY',
|
|
21
23
|
/** Temporary folder used for processing, @default /tmp */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/file/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/file/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AAEjC,OAAO,EAAE,GAAG,IAAI,SAAS,EAAE,MAAM,YAAY,CAAC;AAM9C,OAAO,EAAE,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAI9D,oBAAY,OAAO,GAAG,OAAO,SAAS,GAAG;IACvC,QAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC1C,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,sCAAsC;IACtC,SAAS,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,GAAG,SAA8B,CAAC"}
|
package/build/file/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export * from './file.config.js';
|
|
2
|
-
import {
|
|
2
|
+
import { parseUri } from '@chunkd/core';
|
|
3
|
+
import { fsa as fsaSource } from '@chunkd/fs';
|
|
4
|
+
import { FsAwsS3 } from '@chunkd/source-aws';
|
|
5
|
+
import { AwsCredentials } from '@chunkd/source-aws-v2';
|
|
6
|
+
import S3 from 'aws-sdk/clients/s3.js';
|
|
3
7
|
import { promisify } from 'util';
|
|
4
8
|
import { createGzip, gunzip } from 'zlib';
|
|
5
9
|
import { isConfigS3Role } from './file.config.js';
|
|
6
|
-
import { AwsCredentials } from '@chunkd/source-aws-v2';
|
|
7
10
|
const pGunzip = promisify(gunzip);
|
|
8
11
|
export const fsa = fsaSource;
|
|
9
12
|
fsa.readJson = async function readJson(filePath) {
|
|
@@ -31,12 +34,10 @@ fsa.configure = function configure(cfg) {
|
|
|
31
34
|
return; // ignore local configs
|
|
32
35
|
if (!isConfigS3Role(cfg))
|
|
33
36
|
return; // ignore configs which don't need role assumptions
|
|
34
|
-
const
|
|
35
|
-
|
|
37
|
+
const res = parseUri(cfg.path);
|
|
38
|
+
if (res == null)
|
|
39
|
+
throw new Error('Failed to parse URI: ' + cfg.path);
|
|
40
|
+
const bucketUri = `s3://${res.bucket}/`;
|
|
36
41
|
this.register(bucketUri, AwsCredentials.fsFromRole(cfg.roleArn, cfg.externalId));
|
|
37
42
|
};
|
|
38
|
-
|
|
39
|
-
* Default to using the file handler useful for folders like
|
|
40
|
-
* "C:\" or "directory_name/sub_directory"
|
|
41
|
-
*/
|
|
42
|
-
fsa.register('', fsa.get('file://'));
|
|
43
|
+
fsa.register('s3://', new FsAwsS3(new S3()));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/shared",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.29.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"test": "ospec --globs 'build/**/*.test.js'"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@basemaps/config": "^6.
|
|
26
|
+
"@basemaps/config": "^6.29.0",
|
|
27
27
|
"@basemaps/geo": "^6.28.1",
|
|
28
|
-
"@basemaps/tiler": "^6.
|
|
29
|
-
"@chunkd/source-aws-v2": "^8.
|
|
28
|
+
"@basemaps/tiler": "^6.29.0",
|
|
29
|
+
"@chunkd/source-aws-v2": "^8.4.0",
|
|
30
30
|
"@linzjs/geojson": "^6.28.1",
|
|
31
31
|
"@linzjs/metrics": "^6.28.1",
|
|
32
32
|
"aws-sdk": "^2.890.0",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"files": [
|
|
49
49
|
"build/"
|
|
50
50
|
],
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "9097d2f045d734d0d5acd968f026fe29ab6afcda"
|
|
52
52
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base interface for all dynamo records
|
|
3
|
-
*
|
|
4
|
-
* all records should have these values.
|
|
5
|
-
*/
|
|
6
|
-
export interface BaseDynamoTable {
|
|
7
|
-
/**
|
|
8
|
-
* Primary key of the table
|
|
9
|
-
*/
|
|
10
|
-
id: string;
|
|
11
|
-
/**
|
|
12
|
-
* Date that the key was created
|
|
13
|
-
*/
|
|
14
|
-
createdAt: number;
|
|
15
|
-
/**
|
|
16
|
-
* Date the record was last modified
|
|
17
|
-
*/
|
|
18
|
-
updatedAt: number;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=aws.dynamo.table.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aws.dynamo.table.d.ts","sourceRoot":"","sources":["../../src/aws/aws.dynamo.table.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|