@karmaniverous/entity-manager 7.1.2 → 7.3.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/dist/index.d.ts +7 -3
- package/package.json +8 -2
package/dist/index.d.ts
CHANGED
|
@@ -495,7 +495,7 @@ interface QueryResult<CC extends BaseConfigMap, ET extends EntityToken<CC>, ITS
|
|
|
495
495
|
*
|
|
496
496
|
* @category EntityManager
|
|
497
497
|
*/
|
|
498
|
-
declare class EntityManager<CC extends BaseConfigMap> {
|
|
498
|
+
declare class EntityManager<CC extends BaseConfigMap, CF = unknown> {
|
|
499
499
|
#private;
|
|
500
500
|
/** Logger object (defaults to `console`, must support `debug` & `error` methods). */
|
|
501
501
|
readonly logger: Pick<Console, 'debug' | 'error'>;
|
|
@@ -713,7 +713,7 @@ type CapturedConfigMapFrom<CC, EM extends EntityMap> = {
|
|
|
713
713
|
* @typeParam EM - EntityMap for the manager. Defaults to a minimal derived map
|
|
714
714
|
* from `CC.entitiesSchema` when present; otherwise falls back to EntityMap.
|
|
715
715
|
*/
|
|
716
|
-
declare function createEntityManager<const CC extends ConfigInput, EM extends EntityMap = EntitiesFromSchema<CC>>(config: CC, logger?: Pick<Console, 'debug' | 'error'>): EntityManager<CapturedConfigMapFrom<CC, EM
|
|
716
|
+
declare function createEntityManager<const CC extends ConfigInput, EM extends EntityMap = EntitiesFromSchema<CC>>(config: CC, logger?: Pick<Console, 'debug' | 'error'>): EntityManager<CapturedConfigMapFrom<CC, EM>, CC>;
|
|
717
717
|
|
|
718
718
|
/**
|
|
719
719
|
* Database-facing record type from a {@link BaseConfigMap | `ConfigMap`} with required hash & range keys.
|
|
@@ -763,6 +763,10 @@ declare abstract class BaseEntityClient<CC extends BaseConfigMap> {
|
|
|
763
763
|
constructor(options: BaseEntityClientOptions<CC>);
|
|
764
764
|
}
|
|
765
765
|
|
|
766
|
+
type ConfigOfClient<EC> = EC extends BaseEntityClient<infer CC> ? CC : never;
|
|
767
|
+
type EntityClientRecordByToken<EC, ET extends EntityToken<ConfigOfClient<EC>>> = EntityRecordByToken<ConfigOfClient<EC>, ET>;
|
|
768
|
+
type EntityClientItemByToken<EC, ET extends EntityToken<ConfigOfClient<EC>>> = EntityItemByToken<ConfigOfClient<EC>, ET>;
|
|
769
|
+
|
|
766
770
|
/**
|
|
767
771
|
* Constructor options for {@link BaseQueryBuilder | `BaseQueryBuilder`}.
|
|
768
772
|
*
|
|
@@ -833,4 +837,4 @@ declare abstract class BaseQueryBuilder<CC extends BaseConfigMap, EntityClient e
|
|
|
833
837
|
}
|
|
834
838
|
|
|
835
839
|
export { BaseEntityClient, BaseQueryBuilder, EntityManager, configSchema, createEntityManager };
|
|
836
|
-
export type { BaseConfigMap, BaseEntityClientOptions, BaseQueryBuilderOptions, CapturedConfigMapFrom, Config, ConfigInput, ConfigMap, EntitiesFromSchema, EntityItem, EntityItemByToken, EntityKey, EntityOfToken, EntityRecord, EntityRecordByToken, EntityToken, HasIndexFor, HashKeyFrom, IndexComponentTokens, IndexHashKeyOf, IndexRangeKeyOf, IndexTokensFrom, IndexTokensOf, KeysFrom, PageKey, PageKeyByIndex, ParsedConfig, Projected, ProjectedItemByToken, QueryBuilderQueryOptions, QueryOptions, QueryOptionsByCC, QueryOptionsByCF, QueryResult, RangeKeyFrom, ShardBump, ShardQueryFunction, ShardQueryMap, ShardQueryMapByCC, ShardQueryMapByCF, ShardQueryResult, ShardedKeysFrom, TranscodedPropertiesFrom, UnshardedKeysFrom, ValidateConfigMap };
|
|
840
|
+
export type { BaseConfigMap, BaseEntityClientOptions, BaseQueryBuilderOptions, CapturedConfigMapFrom, Config, ConfigInput, ConfigMap, ConfigOfClient, EntitiesFromSchema, EntityClientItemByToken, EntityClientRecordByToken, EntityItem, EntityItemByToken, EntityKey, EntityOfToken, EntityRecord, EntityRecordByToken, EntityToken, HasIndexFor, HashKeyFrom, IndexComponentTokens, IndexHashKeyOf, IndexRangeKeyOf, IndexTokensFrom, IndexTokensOf, KeysFrom, PageKey, PageKeyByIndex, ParsedConfig, Projected, ProjectedItemByToken, QueryBuilderQueryOptions, QueryOptions, QueryOptionsByCC, QueryOptionsByCF, QueryResult, RangeKeyFrom, ShardBump, ShardQueryFunction, ShardQueryMap, ShardQueryMapByCC, ShardQueryMapByCF, ShardQueryResult, ShardedKeysFrom, TranscodedPropertiesFrom, UnshardedKeysFrom, ValidateConfigMap };
|
package/package.json
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Jason Williscroft",
|
|
3
|
+
"auto-changelog": {
|
|
4
|
+
"commitLimit": false,
|
|
5
|
+
"hideCredit": true,
|
|
6
|
+
"output": "CHANGELOG.md",
|
|
7
|
+
"unreleased": true
|
|
8
|
+
},
|
|
3
9
|
"bugs": {
|
|
4
10
|
"url": "https://github.com/karmaniverous/entity-manager/issues"
|
|
5
11
|
},
|
|
@@ -81,7 +87,7 @@
|
|
|
81
87
|
},
|
|
82
88
|
"release-it": {
|
|
83
89
|
"git": {
|
|
84
|
-
"changelog": "npx auto-changelog --stdout --
|
|
90
|
+
"changelog": "npx auto-changelog --stdout --unreleased --template https://raw.githubusercontent.com/release-it/release-it/main/templates/changelog-compact.hbs",
|
|
85
91
|
"commitMessage": "chore: release v${version}",
|
|
86
92
|
"requireBranch": "main"
|
|
87
93
|
},
|
|
@@ -128,5 +134,5 @@
|
|
|
128
134
|
},
|
|
129
135
|
"type": "module",
|
|
130
136
|
"types": "dist/index.d.ts",
|
|
131
|
-
"version": "7.
|
|
137
|
+
"version": "7.3.0"
|
|
132
138
|
}
|