@nx-ddd/indexed-db 0.0.0-PLACEHOLDER
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/README.md +11 -0
- package/converter/converter.d.ts +6 -0
- package/converter/converter.js +14 -0
- package/converter/converter.js.map +1 -0
- package/converter/index.d.ts +1 -0
- package/converter/index.js +5 -0
- package/converter/index.js.map +1 -0
- package/decorators/decorators.d.ts +1 -0
- package/decorators/decorators.js +7 -0
- package/decorators/decorators.js.map +1 -0
- package/decorators/index.d.ts +1 -0
- package/decorators/index.js +5 -0
- package/decorators/index.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.js +6 -0
- package/index.js.map +1 -0
- package/package.json +14 -0
- package/repository/index.d.ts +1 -0
- package/repository/index.js +5 -0
- package/repository/index.js.map +1 -0
- package/repository/repository.d.ts +14 -0
- package/repository/repository.js +35 -0
- package/repository/repository.js.map +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# indexed-db
|
|
2
|
+
|
|
3
|
+
This library was generated with [Nx](https://nx.dev).
|
|
4
|
+
|
|
5
|
+
## Running unit tests
|
|
6
|
+
|
|
7
|
+
Run `nx test indexed-db` to execute the unit tests via [Jest](https://jestjs.io).
|
|
8
|
+
|
|
9
|
+
## Running lint
|
|
10
|
+
|
|
11
|
+
Run `nx lint indexed-db` to execute the lint via [ESLint](https://eslint.org/).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IndexedDbConverter = void 0;
|
|
4
|
+
const infrastructure_1 = require("@nx-ddd/common/infrastructure");
|
|
5
|
+
class IndexedDbConverter extends infrastructure_1.Converter {
|
|
6
|
+
fromRecord() {
|
|
7
|
+
throw new Error('Not implemented!');
|
|
8
|
+
}
|
|
9
|
+
toRecord() {
|
|
10
|
+
throw new Error('Not implemented!');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.IndexedDbConverter = IndexedDbConverter;
|
|
14
|
+
//# sourceMappingURL=converter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"converter.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/indexed-db/src/lib/converter/converter.ts"],"names":[],"mappings":";;;AACA,kEAA0D;AAE1D,MAAa,kBAAqC,SAAQ,0BAAY;IACpE,UAAU;QACR,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACtC,CAAC;IAED,QAAQ;QACN,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACtC,CAAC;CACF;AARD,gDAQC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './converter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/indexed-db/src/lib/converter/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Timestamp: void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/indexed-db/src/lib/decorators/decorators.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,eAAe,EAAE,CAAC;AAE3C,SAAS,eAAe;AAExB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './decorators';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/indexed-db/src/lib/decorators/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B"}
|
package/index.d.ts
ADDED
package/index.js
ADDED
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/@nx-ddd/indexed-db/src/lib/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,uDAA6B"}
|
package/package.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nx-ddd/indexed-db",
|
|
3
|
+
"version": "0.0.0-PLACEHOLDER",
|
|
4
|
+
"main": "./index.js",
|
|
5
|
+
"types": "./index.d.ts",
|
|
6
|
+
"dependencies": {},
|
|
7
|
+
"peerDependencies": {
|
|
8
|
+
"@nx-ddd/common": "0.0.0-PLACEHOLDER",
|
|
9
|
+
"@nx-ddd/core": "0.0.0-PLACEHOLDER",
|
|
10
|
+
"injection-js": "^2.4.0",
|
|
11
|
+
"reflect-metadata": "^0.1.13",
|
|
12
|
+
"tslib": "^2.0.0"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './repository';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/indexed-db/src/lib/repository/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Entity } from '@nx-ddd/common/domain/models';
|
|
2
|
+
import { Repository } from '@nx-ddd/common/domain/repository';
|
|
3
|
+
import { IndexedDbConverter } from '../converter';
|
|
4
|
+
export declare abstract class IndexedDbRepository<E extends Entity> extends Repository<E> {
|
|
5
|
+
protected converter: IndexedDbConverter<E>;
|
|
6
|
+
constructor(converter: IndexedDbConverter<E>);
|
|
7
|
+
list(): Promise<E[]>;
|
|
8
|
+
get(params: {
|
|
9
|
+
id: string;
|
|
10
|
+
}): Promise<E>;
|
|
11
|
+
create(entity: Partial<E>): Promise<E>;
|
|
12
|
+
update(entity: Partial<E>): Promise<void>;
|
|
13
|
+
delete(entity: any): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IndexedDbRepository = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const di_1 = require("@nx-ddd/core/di");
|
|
6
|
+
const repository_1 = require("@nx-ddd/common/domain/repository");
|
|
7
|
+
const converter_1 = require("../converter");
|
|
8
|
+
let IndexedDbRepository = class IndexedDbRepository extends repository_1.Repository {
|
|
9
|
+
constructor(converter) {
|
|
10
|
+
super();
|
|
11
|
+
this.converter = converter;
|
|
12
|
+
}
|
|
13
|
+
list() {
|
|
14
|
+
throw new Error('Not implemented!');
|
|
15
|
+
}
|
|
16
|
+
;
|
|
17
|
+
get(params) {
|
|
18
|
+
throw new Error('Not implemented!');
|
|
19
|
+
}
|
|
20
|
+
create(entity) {
|
|
21
|
+
throw new Error('Not implemented!');
|
|
22
|
+
}
|
|
23
|
+
update(entity) {
|
|
24
|
+
throw new Error('Not implemented!');
|
|
25
|
+
}
|
|
26
|
+
delete(entity) {
|
|
27
|
+
throw new Error('Not implemented!');
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
IndexedDbRepository = tslib_1.__decorate([
|
|
31
|
+
(0, di_1.Injectable)(),
|
|
32
|
+
tslib_1.__metadata("design:paramtypes", [converter_1.IndexedDbConverter])
|
|
33
|
+
], IndexedDbRepository);
|
|
34
|
+
exports.IndexedDbRepository = IndexedDbRepository;
|
|
35
|
+
//# sourceMappingURL=repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/indexed-db/src/lib/repository/repository.ts"],"names":[],"mappings":";;;;AAAA,wCAA6C;AAE7C,iEAA8D;AAC9D,4CAAkD;AAG3C,IAAe,mBAAmB,GAAlC,MAAe,mBAAsC,SAAQ,uBAAa;IAC/E,YACY,SAAgC;QAE1C,KAAK,EAAE,CAAC;QAFE,cAAS,GAAT,SAAS,CAAuB;IAG5C,CAAC;IAED,IAAI;QACF,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACtC,CAAC;IAAA,CAAC;IAEF,GAAG,CAAC,MAAoB;QACtB,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,MAAkB;QACvB,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,MAAkB;QACvB,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,MAAW;QAChB,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACtC,CAAC;CACF,CAAA;AA1BqB,mBAAmB;IADxC,IAAA,eAAU,GAAE;6CAGY,8BAAkB;GAFrB,mBAAmB,CA0BxC;AA1BqB,kDAAmB"}
|