-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
83 changed files
with
15,139 additions
and
9,879 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
/packages | ||
/test/node_modules | ||
/test/dist | ||
*.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"reject": [ | ||
"typescript" | ||
] | ||
"reject": [ | ||
"semantic-release" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v18.15.0 | ||
v20.11.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/.idea | ||
/.semaphore | ||
/coverage | ||
/dist | ||
/lib | ||
/node_modules | ||
/resource | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"arrowParens": "always", | ||
"bracketSpacing": true, | ||
"printWidth": 130, | ||
"semi": false, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "es5", | ||
"useTabs": true | ||
"arrowParens": "always", | ||
"bracketSpacing": true, | ||
"printWidth": 130, | ||
"semi": false, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "es5", | ||
"useTabs": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
{ | ||
"branches": "main", | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "echo VERSION=${nextRelease.version} > version.txt && npm version ${nextRelease.version}" | ||
} | ||
], | ||
"@semantic-release/changelog", | ||
"@semantic-release/github", | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": ["lib/", "package.json", "package-lock.json", "CHANGELOG.md"], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
] | ||
], | ||
"preset": "angular", | ||
"repositoryUrl": "git@github.com:beecode-rs/msh-entity.git" | ||
"branches": "main", | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "echo VERSION=${nextRelease.version} > version.txt && npm version ${nextRelease.version}" | ||
} | ||
], | ||
"@semantic-release/changelog", | ||
"@semantic-release/github", | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"dist/", | ||
"lib/", | ||
"package.json", | ||
"package-lock.json", | ||
"CHANGELOG.md" | ||
], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
] | ||
], | ||
"preset": "angular", | ||
"repositoryUrl": "git@github.com:beecode-rs/msh-entity.git" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const tsConfig = require('./resource/tsconfig/esm.json') | ||
|
||
module.exports = function (api) { | ||
api.cache(true) | ||
|
||
const ignore = ['node_modules', ...(tsConfig.exclude ?? [])] | ||
const plugins = [ | ||
[ | ||
'@babel/plugin-transform-modules-commonjs', | ||
{ | ||
strictMode: true, | ||
}, | ||
], | ||
[ | ||
'@babel/plugin-proposal-decorators', | ||
{ | ||
version: '2023-11', | ||
}, | ||
], | ||
] | ||
|
||
const presets = ['@babel/preset-env', '@babel/preset-typescript'] | ||
|
||
return { | ||
plugins, | ||
presets, | ||
ignore | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Subject } from 'rxjs/internal/Subject'; | ||
export type EntityCache<ENTITY> = { | ||
id: string; | ||
entity: ENTITY; | ||
}; | ||
export type EntityCacheCallBack<ENTITY> = (cbParams: EntityCache<ENTITY>) => void; | ||
export type EntityCacheSubscription = { | ||
unsubscribe: () => void; | ||
}; | ||
export declare class EntityCacheMemory<ENTITY> { | ||
protected _memory: { | ||
[k: string]: { | ||
entity?: ENTITY; | ||
timeoutMs?: number; | ||
}; | ||
}; | ||
protected _subject: Subject<EntityCache<ENTITY>>; | ||
getById(id: string): { | ||
needToFetch?: boolean; | ||
entity?: ENTITY; | ||
}; | ||
set(params: EntityCache<ENTITY>, timeoutOffsetMs?: number): void; | ||
subscribeById(id: string, callback: (par: EntityCache<ENTITY>) => void): EntityCacheSubscription; | ||
protected _calculateTimeout(timeoutOffsetMs?: number): number | undefined; | ||
protected _timeoutExpired(timeoutMs?: number): boolean; | ||
} | ||
//# sourceMappingURL=memory.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { EntityCacheCallBack, EntityCacheMemory, EntityCacheSubscription } from '../entity-cache/memory.js'; | ||
export declare abstract class EntityCachePromiseService<ENTITY, ID extends string | number = string> { | ||
protected readonly _dao: EntityCacheMemory<ENTITY>; | ||
protected abstract readonly _timeoutOffsetMs?: number; | ||
protected abstract _entityAsync(id: ID): Promise<ENTITY>; | ||
protected constructor(dao?: EntityCacheMemory<ENTITY>); | ||
/** | ||
* Subscribe to entity cache change and retrieve cached value if not undefined | ||
* @param {ID} id - entity unique identifier | ||
* @param {EntityCacheCallBack<ENTITY>} callback - | ||
* @returns {EntityCacheSubscription} | ||
*/ | ||
subscribeToEntityChangeById(id: ID, callback: EntityCacheCallBack<ENTITY>): EntityCacheSubscription; | ||
forceRefresh(id: ID): void; | ||
} | ||
//# sourceMappingURL=promise-service.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.