nightingale-string 11.7.1 → 12.0.1
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/.eslintrc.json +1 -1
- package/CHANGELOG.md +46 -0
- package/dist/{index-node12.cjs.js → index-node14.cjs.js} +4 -4
- package/dist/index-node14.cjs.js.map +1 -0
- package/dist/{index-node12.mjs → index-node14.mjs} +3 -3
- package/dist/index-node14.mjs.map +1 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/package.json +17 -33
- package/rollup.config.mjs +3 -0
- package/src/.eslintrc.json +19 -2
- package/src/index.ts +0 -3
- package/dist/index-node12-dev.cjs.js +0 -30
- package/dist/index-node12-dev.cjs.js.map +0 -1
- package/dist/index-node12-dev.mjs +0 -22
- package/dist/index-node12-dev.mjs.map +0 -1
- package/dist/index-node12.cjs.js.map +0 -1
- package/dist/index-node12.mjs.map +0 -1
- package/git-hooks/post-checkout +0 -5
- package/git-hooks/post-merge +0 -5
- package/git-hooks/pre-commit +0 -45
- package/git-hooks/prepare-commit-msg +0 -11
- package/index.js +0 -6
package/.eslintrc.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,52 @@
|
|
|
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
|
+
## [12.0.1](https://github.com/christophehurpeau/nightingale/compare/v12.0.0...v12.0.1) (2021-12-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package nightingale-string
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [12.0.0](https://github.com/christophehurpeau/nightingale/compare/v11.9.0...v12.0.0) (2021-12-11)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Build System
|
|
18
|
+
|
|
19
|
+
* node 14 and remove dev builds ([432ecd1](https://github.com/christophehurpeau/nightingale/commit/432ecd1faafd0419f57dea00fce560e4cccc207f))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* drop default exports ([8878e49](https://github.com/christophehurpeau/nightingale/commit/8878e492b94852fcb892fd6d12c02c15c31b38b9))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### BREAKING CHANGES
|
|
28
|
+
|
|
29
|
+
* use named imports instead of default exports
|
|
30
|
+
* requires node 14
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## [11.7.4](https://github.com/christophehurpeau/nightingale/compare/v11.7.3...v11.7.4) (2021-11-27)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package nightingale-string
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## [11.7.2](https://github.com/christophehurpeau/nightingale/compare/v11.7.1...v11.7.2) (2021-11-27)
|
|
45
|
+
|
|
46
|
+
**Note:** Version bump only for package nightingale-string
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
6
52
|
## [11.7.1](https://github.com/christophehurpeau/nightingale/compare/v11.7.0...v11.7.1) (2021-06-29)
|
|
7
53
|
|
|
8
54
|
|
|
@@ -4,14 +4,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const formatterRaw = require('nightingale-raw-formatter');
|
|
6
6
|
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e[
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
|
|
8
8
|
|
|
9
9
|
const formatterRaw__default = /*#__PURE__*/_interopDefaultLegacy(formatterRaw);
|
|
10
10
|
|
|
11
11
|
/* eslint-disable prefer-template */
|
|
12
12
|
class StringHandler {
|
|
13
|
+
_buffer = '';
|
|
14
|
+
|
|
13
15
|
constructor(minLevel) {
|
|
14
|
-
this._buffer = '';
|
|
15
16
|
this.minLevel = minLevel;
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -26,5 +27,4 @@ class StringHandler {
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
exports.StringHandler = StringHandler;
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=index-node12.cjs.js.map
|
|
30
|
+
//# sourceMappingURL=index-node14.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-node14.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable prefer-template */\nimport formatterRaw from 'nightingale-raw-formatter';\nimport type { Handler, Level, LogRecord, Metadata } from 'nightingale-types';\n\nexport class StringHandler implements Handler {\n readonly minLevel: Level;\n\n private _buffer = '';\n\n constructor(minLevel: Level) {\n this.minLevel = minLevel;\n }\n\n get string(): string {\n return this._buffer;\n }\n\n handle<T extends Metadata>(record: LogRecord<T>): void {\n this._buffer += formatterRaw(record) + '\\n';\n }\n}\n"],"names":["StringHandler","_buffer","constructor","minLevel","string","handle","record","formatterRaw"],"mappings":";;;;;;;;;;AAAA;AAIO,MAAMA,aAAN,CAAuC;AAGpCC,EAAAA,OAAO,GAAG,EAAH;;AAEfC,EAAAA,WAAW,CAACC,QAAD,EAAkB;AAC3B,SAAKA,QAAL,GAAgBA,QAAhB;AACD;;AAES,MAANC,MAAM,GAAW;AACnB,WAAO,KAAKH,OAAZ;AACD;;AAEDI,EAAAA,MAAM,CAAqBC,MAArB,EAAiD;AACrD,SAAKL,OAAL,IAAgBM,qBAAY,CAACD,MAAD,CAAZ,GAAuB,IAAvC;AACD;;AAf2C;;;;"}
|
|
@@ -2,8 +2,9 @@ import formatterRaw from 'nightingale-raw-formatter';
|
|
|
2
2
|
|
|
3
3
|
/* eslint-disable prefer-template */
|
|
4
4
|
class StringHandler {
|
|
5
|
+
_buffer = '';
|
|
6
|
+
|
|
5
7
|
constructor(minLevel) {
|
|
6
|
-
this._buffer = '';
|
|
7
8
|
this.minLevel = minLevel;
|
|
8
9
|
}
|
|
9
10
|
|
|
@@ -17,6 +18,5 @@ class StringHandler {
|
|
|
17
18
|
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
export default StringHandler;
|
|
21
21
|
export { StringHandler };
|
|
22
|
-
//# sourceMappingURL=index-
|
|
22
|
+
//# sourceMappingURL=index-node14.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-node14.mjs","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable prefer-template */\nimport formatterRaw from 'nightingale-raw-formatter';\nimport type { Handler, Level, LogRecord, Metadata } from 'nightingale-types';\n\nexport class StringHandler implements Handler {\n readonly minLevel: Level;\n\n private _buffer = '';\n\n constructor(minLevel: Level) {\n this.minLevel = minLevel;\n }\n\n get string(): string {\n return this._buffer;\n }\n\n handle<T extends Metadata>(record: LogRecord<T>): void {\n this._buffer += formatterRaw(record) + '\\n';\n }\n}\n"],"names":["StringHandler","_buffer","constructor","minLevel","string","handle","record","formatterRaw"],"mappings":";;AAAA;AAIO,MAAMA,aAAN,CAAuC;AAGpCC,EAAAA,OAAO,GAAG,EAAH;;AAEfC,EAAAA,WAAW,CAACC,QAAD,EAAkB;AAC3B,SAAKA,QAAL,GAAgBA,QAAhB;AACD;;AAES,MAANC,MAAM,GAAW;AACnB,WAAO,KAAKH,OAAZ;AACD;;AAEDI,EAAAA,MAAM,CAAqBC,MAArB,EAAiD;AACrD,SAAKL,OAAL,IAAgBM,YAAY,CAACD,MAAD,CAAZ,GAAuB,IAAvC;AACD;;AAf2C;;;;"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7E,qBAAa,aAAc,YAAW,OAAO;IAC3C,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC;IAEzB,OAAO,CAAC,OAAO,CAAM;gBAET,QAAQ,EAAE,KAAK;IAI3B,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,MAAM,CAAC,CAAC,SAAS,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI;CAGvD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7E,qBAAa,aAAc,YAAW,OAAO;IAC3C,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC;IAEzB,OAAO,CAAC,OAAO,CAAM;gBAET,QAAQ,EAAE,KAAK;IAI3B,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,MAAM,CAAC,CAAC,SAAS,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI;CAGvD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nightingale-string",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.1",
|
|
4
4
|
"description": "String handler for nightingale",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nightingale",
|
|
@@ -14,32 +14,29 @@
|
|
|
14
14
|
"directory": "packages/nightingale-string"
|
|
15
15
|
},
|
|
16
16
|
"homepage": "https://github.com/christophehurpeau/nightingale",
|
|
17
|
+
"type": "commonjs",
|
|
17
18
|
"engines": {
|
|
18
|
-
"node": ">=
|
|
19
|
+
"node": "^14.13.1 || >=16.0.0"
|
|
19
20
|
},
|
|
20
|
-
"main": "./index.js",
|
|
21
|
+
"main": "./dist/index-node14.cjs.js",
|
|
21
22
|
"types": "./dist/index.d.ts",
|
|
22
23
|
"exports": {
|
|
24
|
+
"./package.json": "./package.json",
|
|
23
25
|
".": {
|
|
24
26
|
"node": {
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
"require": "./dist/index-node12-dev.cjs.js"
|
|
28
|
-
},
|
|
29
|
-
"import": "./dist/index-node12.mjs",
|
|
30
|
-
"require": "./dist/index-node12.cjs.js"
|
|
27
|
+
"import": "./dist/index-node14.mjs",
|
|
28
|
+
"require": "./dist/index-node14.cjs.js"
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
31
|
},
|
|
34
|
-
"module:node": "./dist/index-
|
|
35
|
-
"module:node-dev": "./dist/index-node12-dev.mjs",
|
|
32
|
+
"module:node": "./dist/index-node14.mjs",
|
|
36
33
|
"sideEffects": false,
|
|
37
34
|
"scripts": {
|
|
38
35
|
"build": "pob-build && yarn run build:definitions",
|
|
39
36
|
"build:definitions": "tsc -p tsconfig.build.json",
|
|
40
|
-
"clean": "rm -Rf
|
|
37
|
+
"clean": "rm -Rf dist",
|
|
41
38
|
"lint": "yarn run lint:eslint",
|
|
42
|
-
"lint:eslint": "
|
|
39
|
+
"lint:eslint": "cd ../.. && yarn run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/nightingale-string",
|
|
43
40
|
"watch": "pob-watch"
|
|
44
41
|
},
|
|
45
42
|
"prettier": {
|
|
@@ -51,7 +48,7 @@
|
|
|
51
48
|
"babelEnvs": [
|
|
52
49
|
{
|
|
53
50
|
"target": "node",
|
|
54
|
-
"version": "
|
|
51
|
+
"version": "14",
|
|
55
52
|
"formats": [
|
|
56
53
|
"cjs",
|
|
57
54
|
"es"
|
|
@@ -63,26 +60,13 @@
|
|
|
63
60
|
]
|
|
64
61
|
},
|
|
65
62
|
"dependencies": {
|
|
66
|
-
"nightingale-raw-formatter": "
|
|
67
|
-
"nightingale-types": "
|
|
63
|
+
"nightingale-raw-formatter": "12.0.1",
|
|
64
|
+
"nightingale-types": "12.0.1"
|
|
68
65
|
},
|
|
69
66
|
"devDependencies": {
|
|
70
|
-
"@babel/core": "7.
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"@pob/eslint-config-typescript": "43.2.0",
|
|
74
|
-
"@pob/eslint-config-typescript-node": "43.2.0",
|
|
75
|
-
"@typescript-eslint/eslint-plugin": "4.28.1",
|
|
76
|
-
"@typescript-eslint/parser": "4.28.1",
|
|
77
|
-
"babel-preset-latest-node": "5.5.1",
|
|
78
|
-
"eslint": "7.29.0",
|
|
79
|
-
"eslint-import-resolver-node": "0.3.4",
|
|
80
|
-
"eslint-plugin-import": "2.23.4",
|
|
81
|
-
"eslint-plugin-node": "11.1.0",
|
|
82
|
-
"eslint-plugin-unicorn": "29.0.0",
|
|
83
|
-
"pob-babel": "27.0.3",
|
|
84
|
-
"rollup": "2.52.3",
|
|
85
|
-
"typescript": "4.3.4"
|
|
67
|
+
"@babel/core": "7.16.0",
|
|
68
|
+
"pob-babel": "29.4.2",
|
|
69
|
+
"typescript": "4.5.3"
|
|
86
70
|
},
|
|
87
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "bb3da283ed9e19d2c1dcdb5e130c86b4835d8500"
|
|
88
72
|
}
|
package/src/.eslintrc.json
CHANGED
|
@@ -7,7 +7,24 @@
|
|
|
7
7
|
"plugins": ["@typescript-eslint"],
|
|
8
8
|
"extends": [
|
|
9
9
|
"@pob/eslint-config-typescript",
|
|
10
|
-
"@pob/eslint-config-typescript
|
|
10
|
+
"@pob/eslint-config-typescript/node"
|
|
11
11
|
],
|
|
12
|
-
"ignorePatterns": ["*.d.ts"]
|
|
12
|
+
"ignorePatterns": ["*.d.ts"],
|
|
13
|
+
"overrides": [
|
|
14
|
+
{
|
|
15
|
+
"files": ["**/*.test.ts", "__tests__/**/*.ts"],
|
|
16
|
+
"extends": ["@pob/eslint-config-typescript/test"],
|
|
17
|
+
"env": {
|
|
18
|
+
"jest": true
|
|
19
|
+
},
|
|
20
|
+
"rules": {
|
|
21
|
+
"import/no-extraneous-dependencies": [
|
|
22
|
+
"error",
|
|
23
|
+
{
|
|
24
|
+
"devDependencies": true
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
]
|
|
13
30
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const formatterRaw = require('nightingale-raw-formatter');
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
|
|
8
|
-
|
|
9
|
-
const formatterRaw__default = /*#__PURE__*/_interopDefaultLegacy(formatterRaw);
|
|
10
|
-
|
|
11
|
-
/* eslint-disable prefer-template */
|
|
12
|
-
class StringHandler {
|
|
13
|
-
constructor(minLevel) {
|
|
14
|
-
this._buffer = '';
|
|
15
|
-
this.minLevel = minLevel;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
get string() {
|
|
19
|
-
return this._buffer;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
handle(record) {
|
|
23
|
-
this._buffer += formatterRaw__default(record) + '\n';
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
exports.StringHandler = StringHandler;
|
|
29
|
-
exports.default = StringHandler;
|
|
30
|
-
//# sourceMappingURL=index-node12-dev.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-node12-dev.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable prefer-template */\nimport formatterRaw from 'nightingale-raw-formatter';\nimport type { Handler, Level, LogRecord, Metadata } from 'nightingale-types';\n\nexport class StringHandler implements Handler {\n readonly minLevel: Level;\n\n private _buffer = '';\n\n constructor(minLevel: Level) {\n this.minLevel = minLevel;\n }\n\n get string(): string {\n return this._buffer;\n }\n\n handle<T extends Metadata>(record: LogRecord<T>): void {\n this._buffer += formatterRaw(record) + '\\n';\n }\n}\n\n/** @deprecated use named export instead */\nexport default StringHandler;\n"],"names":["StringHandler","constructor","minLevel","_buffer","string","handle","record","formatterRaw"],"mappings":";;;;;;;;;;AAAA;AAIO,MAAMA,aAAN,CAAuC;AAK5CC,EAAAA,WAAW,CAACC,QAAD,EAAkB;AAAA,SAFrBC,OAEqB,GAFX,EAEW;AAC3B,SAAKD,QAAL,GAAgBA,QAAhB;AACD;;AAES,MAANE,MAAM,GAAW;AACnB,WAAO,KAAKD,OAAZ;AACD;;AAEDE,EAAAA,MAAM,CAAqBC,MAArB,EAAiD;AACrD,SAAKH,OAAL,IAAgBI,qBAAY,CAACD,MAAD,CAAZ,GAAuB,IAAvC;AACD;;AAf2C;;;;;"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import formatterRaw from 'nightingale-raw-formatter';
|
|
2
|
-
|
|
3
|
-
/* eslint-disable prefer-template */
|
|
4
|
-
class StringHandler {
|
|
5
|
-
constructor(minLevel) {
|
|
6
|
-
this._buffer = '';
|
|
7
|
-
this.minLevel = minLevel;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
get string() {
|
|
11
|
-
return this._buffer;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
handle(record) {
|
|
15
|
-
this._buffer += formatterRaw(record) + '\n';
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export default StringHandler;
|
|
21
|
-
export { StringHandler };
|
|
22
|
-
//# sourceMappingURL=index-node12-dev.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-node12-dev.mjs","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable prefer-template */\nimport formatterRaw from 'nightingale-raw-formatter';\nimport type { Handler, Level, LogRecord, Metadata } from 'nightingale-types';\n\nexport class StringHandler implements Handler {\n readonly minLevel: Level;\n\n private _buffer = '';\n\n constructor(minLevel: Level) {\n this.minLevel = minLevel;\n }\n\n get string(): string {\n return this._buffer;\n }\n\n handle<T extends Metadata>(record: LogRecord<T>): void {\n this._buffer += formatterRaw(record) + '\\n';\n }\n}\n\n/** @deprecated use named export instead */\nexport default StringHandler;\n"],"names":["StringHandler","constructor","minLevel","_buffer","string","handle","record","formatterRaw"],"mappings":";;AAAA;AAIO,MAAMA,aAAN,CAAuC;AAK5CC,EAAAA,WAAW,CAACC,QAAD,EAAkB;AAAA,SAFrBC,OAEqB,GAFX,EAEW;AAC3B,SAAKD,QAAL,GAAgBA,QAAhB;AACD;;AAES,MAANE,MAAM,GAAW;AACnB,WAAO,KAAKD,OAAZ;AACD;;AAEDE,EAAAA,MAAM,CAAqBC,MAArB,EAAiD;AACrD,SAAKH,OAAL,IAAgBI,YAAY,CAACD,MAAD,CAAZ,GAAuB,IAAvC;AACD;;AAf2C;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-node12.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable prefer-template */\nimport formatterRaw from 'nightingale-raw-formatter';\nimport type { Handler, Level, LogRecord, Metadata } from 'nightingale-types';\n\nexport class StringHandler implements Handler {\n readonly minLevel: Level;\n\n private _buffer = '';\n\n constructor(minLevel: Level) {\n this.minLevel = minLevel;\n }\n\n get string(): string {\n return this._buffer;\n }\n\n handle<T extends Metadata>(record: LogRecord<T>): void {\n this._buffer += formatterRaw(record) + '\\n';\n }\n}\n\n/** @deprecated use named export instead */\nexport default StringHandler;\n"],"names":["StringHandler","constructor","minLevel","_buffer","string","handle","record","formatterRaw"],"mappings":";;;;;;;;;;AAAA;AAIO,MAAMA,aAAN,CAAuC;AAK5CC,EAAAA,WAAW,CAACC,QAAD,EAAkB;AAAA,SAFrBC,OAEqB,GAFX,EAEW;AAC3B,SAAKD,QAAL,GAAgBA,QAAhB;AACD;;AAES,MAANE,MAAM,GAAW;AACnB,WAAO,KAAKD,OAAZ;AACD;;AAEDE,EAAAA,MAAM,CAAqBC,MAArB,EAAiD;AACrD,SAAKH,OAAL,IAAgBI,qBAAY,CAACD,MAAD,CAAZ,GAAuB,IAAvC;AACD;;AAf2C;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-node12.mjs","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable prefer-template */\nimport formatterRaw from 'nightingale-raw-formatter';\nimport type { Handler, Level, LogRecord, Metadata } from 'nightingale-types';\n\nexport class StringHandler implements Handler {\n readonly minLevel: Level;\n\n private _buffer = '';\n\n constructor(minLevel: Level) {\n this.minLevel = minLevel;\n }\n\n get string(): string {\n return this._buffer;\n }\n\n handle<T extends Metadata>(record: LogRecord<T>): void {\n this._buffer += formatterRaw(record) + '\\n';\n }\n}\n\n/** @deprecated use named export instead */\nexport default StringHandler;\n"],"names":["StringHandler","constructor","minLevel","_buffer","string","handle","record","formatterRaw"],"mappings":";;AAAA;AAIO,MAAMA,aAAN,CAAuC;AAK5CC,EAAAA,WAAW,CAACC,QAAD,EAAkB;AAAA,SAFrBC,OAEqB,GAFX,EAEW;AAC3B,SAAKD,QAAL,GAAgBA,QAAhB;AACD;;AAES,MAANE,MAAM,GAAW;AACnB,WAAO,KAAKD,OAAZ;AACD;;AAEDE,EAAAA,MAAM,CAAqBC,MAArB,EAAiD;AACrD,SAAKH,OAAL,IAAgBI,YAAY,CAACD,MAAD,CAAZ,GAAuB,IAAvC;AACD;;AAf2C;;;;;"}
|
package/git-hooks/post-checkout
DELETED
package/git-hooks/post-merge
DELETED
package/git-hooks/pre-commit
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
if git rev-parse --verify HEAD >/dev/null 2>&1
|
|
4
|
-
then
|
|
5
|
-
against=HEAD
|
|
6
|
-
else
|
|
7
|
-
# Initial commit: diff against an empty tree object
|
|
8
|
-
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
|
|
9
|
-
fi
|
|
10
|
-
|
|
11
|
-
# If you want to allow non-ASCII filenames set this variable to true.
|
|
12
|
-
allownonascii=$(git config --bool hooks.allownonascii)
|
|
13
|
-
|
|
14
|
-
# Redirect output to stderr.
|
|
15
|
-
exec 1>&2
|
|
16
|
-
|
|
17
|
-
# Cross platform projects tend to avoid non-ASCII filenames; prevent
|
|
18
|
-
# them from being added to the repository. We exploit the fact that the
|
|
19
|
-
# printable range starts at the space character and ends with tilde.
|
|
20
|
-
if [ "$allownonascii" != "true" ] &&
|
|
21
|
-
# Note that the use of brackets around a tr range is ok here, (it's
|
|
22
|
-
# even required, for portability to Solaris 10's /usr/bin/tr), since
|
|
23
|
-
# the square bracket bytes happen to fall in the designated range.
|
|
24
|
-
test $(git diff --cached --name-only --diff-filter=A -z $against |
|
|
25
|
-
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
|
|
26
|
-
then
|
|
27
|
-
cat <<\EOF
|
|
28
|
-
Error: Attempt to add a non-ASCII file name.
|
|
29
|
-
|
|
30
|
-
This can cause problems if you want to work with people on other platforms.
|
|
31
|
-
|
|
32
|
-
To be portable it is advisable to rename the file.
|
|
33
|
-
|
|
34
|
-
If you know what you are doing you can disable this check using:
|
|
35
|
-
|
|
36
|
-
git config hooks.allownonascii true
|
|
37
|
-
EOF
|
|
38
|
-
exit 1
|
|
39
|
-
fi
|
|
40
|
-
|
|
41
|
-
# If there are whitespace errors, print the offending file names and fail.
|
|
42
|
-
git diff-index --check --cached $against -- || exit 1
|
|
43
|
-
|
|
44
|
-
echo 'Lint check'
|
|
45
|
-
npm run lint || exit 1
|