@beecode/msh-entity 0.1.1-alpha

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Beecode
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ [![Build Status](https://beecode.semaphoreci.com/badges/msh-entity/branches/main.svg?style=shields)](https://beecode.semaphoreci.com/projects/msh-entity)
2
+ [![codecov](https://codecov.io/gh/beecode-rs/msh-entity/branch/main/graph/badge.svg?token=fHc0YaxEiB)](https://codecov.io/gh/beecode-rs/msh-entity)
3
+ [![GitHub license](https://img.shields.io/github/license/beecode-rs/msh-entity)](https://github.com/beecode-rs/msh-entity/blob/main/LICENSE)
4
+ [![NPM](https://nodei.co/npm/@beecode/msh-entity.png)](https://nodei.co/npm/@beecode/msh-entity)
5
+
6
+ # msh-entity
7
+
8
+ Micro-service helper: node error
9
+
10
+ This project is intended to be used in typescript project.
11
+
12
+ <!-- toc -->
13
+
14
+ - [Install](#install)
15
+ - [Diagram](#diagram)
16
+
17
+ <!-- tocstop -->
18
+
19
+ ## Install
20
+
21
+ `npm i @beecode/msh-entity`
22
+
23
+ ## Diagram
24
+
25
+ ![vision-diagram](resource/doc/vision/vision.svg)
@@ -0,0 +1,27 @@
1
+ import { Subject } from 'rxjs/internal/Subject';
2
+ export type EntityCache<ENTITY> = {
3
+ id: string;
4
+ entity: ENTITY;
5
+ };
6
+ export type EntityCacheCallBack<ENTITY> = (cbParams: EntityCache<ENTITY>) => void;
7
+ export type EntityCacheSubscription = {
8
+ unsubscribe: () => void;
9
+ };
10
+ export declare class EntityCacheMemory<ENTITY> {
11
+ protected _memory: {
12
+ [k: string]: {
13
+ entity?: ENTITY;
14
+ timeoutMs?: number;
15
+ };
16
+ };
17
+ protected _subject: Subject<EntityCache<ENTITY>>;
18
+ getById(id: string): {
19
+ needToFetch?: boolean;
20
+ entity?: ENTITY;
21
+ };
22
+ set(params: EntityCache<ENTITY>, timeoutOffsetMs?: number): void;
23
+ subscribeById(id: string, callback: (par: EntityCache<ENTITY>) => void): EntityCacheSubscription;
24
+ protected _calculateTimeout(timeoutOffsetMs?: number): number | undefined;
25
+ protected _timeoutExpired(timeoutMs?: number): boolean;
26
+ }
27
+ //# sourceMappingURL=memory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/entity-cache/memory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAG/C,MAAM,MAAM,WAAW,CAAC,MAAM,IAAI;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAEhE,MAAM,MAAM,mBAAmB,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;AAEjF,MAAM,MAAM,uBAAuB,GAAG;IAAE,WAAW,EAAE,MAAM,IAAI,CAAA;CAAE,CAAA;AAEjE,qBAAa,iBAAiB,CAAC,MAAM;IACnC,SAAS,CAAC,OAAO,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG;YAAE,MAAM,CAAC,EAAE,MAAM,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAK;IAChF,SAAS,CAAC,QAAQ,+BAAqC;IAEvD,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG;QAAE,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;IAc/D,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI;IAOhE,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,IAAI,GAAG,uBAAuB;IAIhG,SAAS,CAAC,iBAAiB,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IASzE,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO;CAQvD"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityCacheMemory = void 0;
4
+ const time_util_1 = require("@beecode/msh-util/lib/time-util");
5
+ const Subject_1 = require("rxjs/internal/Subject");
6
+ const operators_1 = require("rxjs/operators");
7
+ class EntityCacheMemory {
8
+ constructor() {
9
+ this._memory = {};
10
+ this._subject = new Subject_1.Subject();
11
+ }
12
+ getById(id) {
13
+ const memo = this._memory[id];
14
+ if (!memo) {
15
+ this._memory[id] = {};
16
+ return { needToFetch: true };
17
+ }
18
+ const needToFetch = this._timeoutExpired(memo.timeoutMs);
19
+ return { entity: memo.entity, needToFetch };
20
+ }
21
+ set(params, timeoutOffsetMs) {
22
+ const { id, entity } = params;
23
+ const timeoutMs = this._calculateTimeout(timeoutOffsetMs);
24
+ this._memory[id] = { entity, timeoutMs };
25
+ this._subject.next({ id, entity });
26
+ }
27
+ subscribeById(id, callback) {
28
+ return this._subject.pipe((0, operators_1.filter)((o) => o.id === id)).subscribe(callback);
29
+ }
30
+ _calculateTimeout(timeoutOffsetMs) {
31
+ if (timeoutOffsetMs === undefined) {
32
+ return undefined;
33
+ }
34
+ const timeUtil = new time_util_1.TimeUtil();
35
+ return timeUtil.dateToUnix(timeUtil.now()) + timeoutOffsetMs;
36
+ }
37
+ _timeoutExpired(timeoutMs) {
38
+ if (timeoutMs === undefined) {
39
+ return false;
40
+ }
41
+ const timeUtil = new time_util_1.TimeUtil();
42
+ return timeUtil.dateToUnix(timeUtil.now()) > timeoutMs;
43
+ }
44
+ }
45
+ exports.EntityCacheMemory = EntityCacheMemory;
46
+ //# sourceMappingURL=memory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/entity-cache/memory.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAC1D,mDAA+C;AAC/C,8CAAuC;AAQvC,MAAa,iBAAiB;IAA9B;QACY,YAAO,GAA6D,EAAE,CAAA;QACtE,aAAQ,GAAG,IAAI,iBAAO,EAAuB,CAAA;IA4CzD,CAAC;IA1CC,OAAO,CAAC,EAAU;QAChB,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;QAE7B,IAAI,CAAC,IAAI,EAAE;YACT,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,CAAA;YAErB,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAA;SAC7B;QAED,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAExD,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,CAAA;IAC7C,CAAC;IAED,GAAG,CAAC,MAA2B,EAAE,eAAwB;QACvD,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;QAC7B,MAAM,SAAS,GAAG,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAA;QACzD,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAA;QACxC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;IACpC,CAAC;IAED,aAAa,CAAC,EAAU,EAAE,QAA4C;QACpE,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAA,kBAAM,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;IAC3E,CAAC;IAES,iBAAiB,CAAC,eAAwB;QAClD,IAAI,eAAe,KAAK,SAAS,EAAE;YACjC,OAAO,SAAS,CAAA;SACjB;QACD,MAAM,QAAQ,GAAG,IAAI,oBAAQ,EAAE,CAAA;QAE/B,OAAO,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,eAAe,CAAA;IAC9D,CAAC;IAES,eAAe,CAAC,SAAkB;QAC1C,IAAI,SAAS,KAAK,SAAS,EAAE;YAC3B,OAAO,KAAK,CAAA;SACb;QACD,MAAM,QAAQ,GAAG,IAAI,oBAAQ,EAAE,CAAA;QAE/B,OAAO,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAA;IACxD,CAAC;CACF;AA9CD,8CA8CC"}
@@ -0,0 +1,16 @@
1
+ import { EntityCacheCallBack, EntityCacheMemory, EntityCacheSubscription } from '../entity-cache/memory';
2
+ export declare abstract class EntityCachePromiseService<ENTITY, ID extends string | number = string> {
3
+ protected readonly _dao: EntityCacheMemory<ENTITY>;
4
+ protected abstract readonly _timeoutOffsetMs?: number;
5
+ protected abstract _entityAsync(id: ID): Promise<ENTITY>;
6
+ protected constructor(dao?: EntityCacheMemory<ENTITY>);
7
+ /**
8
+ * Subscribe to entity cache change and retrieve cached value if not undefined
9
+ * @param {ID} id - entity unique identifier
10
+ * @param {EntityCacheCallBack<ENTITY>} callback -
11
+ * @returns {EntityCacheSubscription}
12
+ */
13
+ subscribeToEntityChangeById(id: ID, callback: EntityCacheCallBack<ENTITY>): EntityCacheSubscription;
14
+ forceRefresh(id: ID): void;
15
+ }
16
+ //# sourceMappingURL=promise-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promise-service.d.ts","sourceRoot":"","sources":["../../src/entity-cache/promise-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAEzG,8BAAsB,yBAAyB,CAAC,MAAM,EAAE,EAAE,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM;IACzF,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAElD,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACrD,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAExD,SAAS,aAAa,GAAG,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC;IAIrD;;;;;OAKG;IACH,2BAA2B,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG,uBAAuB;IAcnG,YAAY,CAAC,EAAE,EAAE,EAAE,GAAG,IAAI;CAK3B"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityCachePromiseService = void 0;
4
+ const memory_1 = require("../entity-cache/memory");
5
+ class EntityCachePromiseService {
6
+ constructor(dao) {
7
+ this._dao = dao !== null && dao !== void 0 ? dao : new memory_1.EntityCacheMemory();
8
+ }
9
+ /**
10
+ * Subscribe to entity cache change and retrieve cached value if not undefined
11
+ * @param {ID} id - entity unique identifier
12
+ * @param {EntityCacheCallBack<ENTITY>} callback -
13
+ * @returns {EntityCacheSubscription}
14
+ */
15
+ subscribeToEntityChangeById(id, callback) {
16
+ const idString = id.toString();
17
+ const subscription = this._dao.subscribeById(idString, callback);
18
+ const { entity, needToFetch = false } = this._dao.getById(idString);
19
+ if (entity !== undefined) {
20
+ callback({ id: idString, entity });
21
+ }
22
+ if (needToFetch) {
23
+ this.forceRefresh(id);
24
+ }
25
+ return subscription;
26
+ }
27
+ forceRefresh(id) {
28
+ this._entityAsync(id).then((entity) => {
29
+ return this._dao.set({ id: id.toString(), entity }, this._timeoutOffsetMs);
30
+ });
31
+ }
32
+ }
33
+ exports.EntityCachePromiseService = EntityCachePromiseService;
34
+ //# sourceMappingURL=promise-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promise-service.js","sourceRoot":"","sources":["../../src/entity-cache/promise-service.ts"],"names":[],"mappings":";;;AAAA,oDAAyG;AAEzG,MAAsB,yBAAyB;IAM7C,YAAsB,GAA+B;QACnD,IAAI,CAAC,IAAI,GAAG,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,IAAI,0BAAiB,EAAU,CAAA;IACpD,CAAC;IAED;;;;;OAKG;IACH,2BAA2B,CAAC,EAAM,EAAE,QAAqC;QACvE,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAA;QAC9B,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;QAChE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QACnE,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,QAAQ,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAA;SACnC;QACD,IAAI,WAAW,EAAE;YACf,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;SACtB;QAED,OAAO,YAAY,CAAA;IACrB,CAAC;IAED,YAAY,CAAC,EAAM;QACjB,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YACpC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAA;QAC5E,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AAnCD,8DAmCC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './entity-cache/promise-service';
2
+ export * from './entity-cache/memory';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAA;AAEhD,cAAc,yBAAyB,CAAA"}
package/lib/index.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./entity-cache/promise-service"), exports);
18
+ __exportStar(require("./entity-cache/memory"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAgD;AAEhD,0DAAuC"}
package/package.json ADDED
@@ -0,0 +1,124 @@
1
+ {
2
+ "_moduleAliases": {
3
+ "src": "./lib"
4
+ },
5
+ "author": "Milos Bugarinovic <milos.bugarinovic@gmail.com>",
6
+ "bugs": {
7
+ "url": "https://github.com/beecode-rs/msh-entity/issues"
8
+ },
9
+ "commitlint": {
10
+ "extends": [
11
+ "@commitlint/config-conventional"
12
+ ]
13
+ },
14
+ "config": {
15
+ "commitizen": {
16
+ "path": "node_modules/cz-conventional-changelog"
17
+ }
18
+ },
19
+ "dependencies": {
20
+ "@beecode/msh-util": "1.0.1",
21
+ "rxjs": "7.8.0"
22
+ },
23
+ "description": "",
24
+ "devDependencies": {
25
+ "@commitlint/cli": "17.4.4",
26
+ "@commitlint/config-conventional": "17.4.4",
27
+ "@commitlint/prompt": "17.4.4",
28
+ "@semantic-release/changelog": "6.0.2",
29
+ "@semantic-release/commit-analyzer": "9.0.2",
30
+ "@semantic-release/exec": "6.0.3",
31
+ "@semantic-release/git": "10.0.1",
32
+ "@semantic-release/github": "8.0.7",
33
+ "@semantic-release/release-notes-generator": "10.0.3",
34
+ "@types/jest": "29.4.4",
35
+ "@types/node": "18.15.3",
36
+ "@typescript-eslint/eslint-plugin": "5.55.0",
37
+ "@typescript-eslint/parser": "5.55.0",
38
+ "commitizen": "4.3.0",
39
+ "eslint": "8.36.0",
40
+ "eslint-config-prettier": "8.7.0",
41
+ "eslint-plugin-import": "2.27.5",
42
+ "eslint-plugin-no-loops": "0.3.0",
43
+ "eslint-plugin-no-only-tests": "3.1.0",
44
+ "eslint-plugin-prettier": "4.2.1",
45
+ "husky": "8.0.3",
46
+ "jest": "29.5.0",
47
+ "jest-extended": "3.2.4",
48
+ "lint-staged": "13.2.0",
49
+ "markdown-toc": "1.2.0",
50
+ "prettier": "2.8.4",
51
+ "rimraf": "4.4.0",
52
+ "semantic-release": "20.1.1",
53
+ "source-map-support": "0.5.21",
54
+ "ts-jest": "29.0.5",
55
+ "ts-node": "10.9.1",
56
+ "tsc-alias": "1.8.3",
57
+ "tsc-watch": "6.0.0",
58
+ "typedoc": "0.23.27",
59
+ "typedoc-plugin-markdown": "3.14.0",
60
+ "typescript": "4.9.5"
61
+ },
62
+ "engines": {
63
+ "node": "=18.15.0",
64
+ "npm": "=9.6.1"
65
+ },
66
+ "files": [
67
+ "lib",
68
+ "package-lock.json"
69
+ ],
70
+ "homepage": "https://github.com/beecode-rs/msh-entity#readme",
71
+ "keywords": [],
72
+ "license": "mit",
73
+ "lint-staged": {
74
+ "src/**/*.{ts,tsx,js,jsx}": "eslint"
75
+ },
76
+ "main": "lib/index.js",
77
+ "name": "@beecode/msh-entity",
78
+ "repository": {
79
+ "type": "git",
80
+ "url": "https://github.com/beecode-rs/msh-entity.git"
81
+ },
82
+ "scripts": {
83
+ "audit:fix": "npx --yes npm-force-resolutions",
84
+ "build": "npm run clean && npm run tsc && npm run tsc:alias",
85
+ "build:on-success": "npm run tsc:alias",
86
+ "build:watch": "npm run tsc:watch --preserveWatchOutput --onSuccess \"npm run tsc:cleaner\" --onCompilationComplete \"npm run build:on-success\"",
87
+ "bump-version": "npm --no-git-tag-version version",
88
+ "clean": "rimraf ./lib/*",
89
+ "commit": "git-cz",
90
+ "doc:api": "npx typedoc",
91
+ "doc:toc": "npx markdown-toc -i ./README.md",
92
+ "docker:build": "docker build -f .docker/Dockerfile -t bc-msh-entity .",
93
+ "docker:exec": "docker run --rm bc-msh-entity",
94
+ "docker:exec:sh": "docker run --rm -it bc-msh-entity sh",
95
+ "docker:rmi": "docker rmi bc-msh-entity",
96
+ "eslint": "eslint . --ext .ts --quiet",
97
+ "eslint:fix": "npm run eslint --fix",
98
+ "initial-setup": "npm run initial-setup:husky && npm run initial-setup:git-config",
99
+ "initial-setup:git-config": "git config include.path ../.git-config",
100
+ "initial-setup:husky": "npx husky install",
101
+ "lint": "npm run eslint && npm run prettier",
102
+ "lint:fix": "npm run eslint:fix && npm run prettier:fix",
103
+ "pack": "npm pack --pack-destination=./packages",
104
+ "prettier": "prettier --check \"./src/**/*.{ts,json}\"",
105
+ "prettier:fix": "prettier --write \"./src/**/*.{ts,json}\"",
106
+ "semantic-release": "semantic-release",
107
+ "semantic-release:check": "npm run semantic-release --dry-run --no-ci",
108
+ "test": "npm run test:unit && npm run test:int ",
109
+ "test:int": "# jest --config=./test/jest.config.json",
110
+ "test:unit": "TZ=utc jest",
111
+ "test:unit:coverage": "npm run test:unit --coverage",
112
+ "test:unit:coverage:publish": "codecov",
113
+ "tsc": "tsc -p ./tsconfig-build.json",
114
+ "tsc:alias": "tsc-alias",
115
+ "tsc:check": "npm run tsc --noEmit",
116
+ "tsc:check:list-files": "npm run tsc:check --listFiles",
117
+ "tsc:cleaner": "ts-cleaner --dist lib",
118
+ "tsc:cleaner:watch": "npm run tsc:cleaner --watch",
119
+ "tsc:time": "npm run tsc --diagnostics",
120
+ "tsc:watch": "tsc-watch -p tsconfig-build.json"
121
+ },
122
+ "types": "lib/index.d.ts",
123
+ "version": "0.1.1-alpha"
124
+ }