@basemaps/shared 6.10.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 +11 -0
- package/build/log.d.ts +0 -3
- package/build/log.d.ts.map +1 -1
- package/build/log.js +3 -9
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.11.0](https://github.com/linz/basemaps/compare/v6.10.1...v6.11.0) (2021-10-03)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **server:** use the lambda handler directly ([#1870](https://github.com/linz/basemaps/issues/1870)) ([408ff56](https://github.com/linz/basemaps/commit/408ff5654cc04aae35d05eb5bbc47a51f99ec5b2))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [6.10.0](https://github.com/linz/basemaps/compare/v6.9.1...v6.10.0) (2021-09-22)
|
|
7
18
|
|
|
8
19
|
|
package/build/log.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Writable } from 'stream';
|
|
2
1
|
export interface LogFunc {
|
|
3
2
|
(msg: string): void;
|
|
4
3
|
(obj: Record<string, unknown>, msg: string): void;
|
|
@@ -23,8 +22,6 @@ export declare const LogConfig: {
|
|
|
23
22
|
/** Get the currently configured logger */
|
|
24
23
|
get(): LogType;
|
|
25
24
|
set(log: LogType): void;
|
|
26
|
-
/** Overwrite the logger with a new logger that outputs to the provided stream*/
|
|
27
|
-
setOutputStream(stream: Writable): void;
|
|
28
25
|
/** Disable the logger */
|
|
29
26
|
disable(): void;
|
|
30
27
|
};
|
package/build/log.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,OAAO;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACnD;AAID;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC;CAClD;AAGD;;GAEG;AACH,eAAO,MAAM,SAAS;IACpB,0CAA0C;WACnC,OAAO;aAOL,OAAO,GAAG,IAAI;IAIvB,yBAAyB;eACd,IAAI;CAGhB,CAAC"}
|
package/build/log.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import pino from 'pino';
|
|
2
|
+
import { PrettyTransform } from 'pretty-json-log';
|
|
2
3
|
let currentLog;
|
|
4
|
+
const defaultOpts = { level: 'debug' };
|
|
3
5
|
/**
|
|
4
6
|
* Encapsulate the logger so that it can be swapped out
|
|
5
7
|
*/
|
|
@@ -7,21 +9,13 @@ export const LogConfig = {
|
|
|
7
9
|
/** Get the currently configured logger */
|
|
8
10
|
get() {
|
|
9
11
|
if (currentLog == null) {
|
|
10
|
-
currentLog = pino(
|
|
12
|
+
currentLog = process.stdout.isTTY ? pino(defaultOpts, PrettyTransform.stream()) : pino(defaultOpts);
|
|
11
13
|
}
|
|
12
14
|
return currentLog;
|
|
13
15
|
},
|
|
14
16
|
set(log) {
|
|
15
17
|
currentLog = log;
|
|
16
18
|
},
|
|
17
|
-
/** Overwrite the logger with a new logger that outputs to the provided stream*/
|
|
18
|
-
setOutputStream(stream) {
|
|
19
|
-
let level = 'debug';
|
|
20
|
-
if (currentLog) {
|
|
21
|
-
level = currentLog.level;
|
|
22
|
-
}
|
|
23
|
-
currentLog = pino({ level }, stream);
|
|
24
|
-
},
|
|
25
19
|
/** Disable the logger */
|
|
26
20
|
disable() {
|
|
27
21
|
LogConfig.get().level = 'silent';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/shared",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.11.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@basemaps/config": "^6.10.0",
|
|
27
27
|
"@basemaps/geo": "^6.10.0",
|
|
28
|
-
"@basemaps/tiler": "^6.
|
|
28
|
+
"@basemaps/tiler": "^6.11.0",
|
|
29
29
|
"@linzjs/geojson": "^6.10.0",
|
|
30
|
-
"@linzjs/metrics": "^6.
|
|
30
|
+
"@linzjs/metrics": "^6.11.0",
|
|
31
31
|
"@linzjs/s3fs": "^6.9.1",
|
|
32
32
|
"aws-sdk": "^2.890.0",
|
|
33
33
|
"base-x": "^3.0.7",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"files": [
|
|
51
51
|
"build/"
|
|
52
52
|
],
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "e15ab34277b74a70a2b37ecf950e58ca6ba8a843"
|
|
54
54
|
}
|