@goatlab/fluent-pouchdb 0.7.11 → 0.7.13
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/PouchDBConnector.d.ts +115 -0
- package/dist/PouchDBConnector.js +604 -0
- package/dist/PouchDBConnector.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/test/entities/advanced.entity.d.ts +79 -0
- package/dist/test/entities/advanced.entity.js +61 -0
- package/dist/test/entities/advanced.entity.js.map +1 -0
- package/dist/test/entities/goat.entity.d.ts +155 -0
- package/dist/test/entities/goat.entity.js +89 -0
- package/dist/test/entities/goat.entity.js.map +1 -0
- package/dist/test/pouchdb.repository.factory.d.ts +8 -0
- package/dist/test/pouchdb.repository.factory.js +32 -0
- package/dist/test/pouchdb.repository.factory.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +9 -7
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare class NestedB {
|
|
3
|
+
c: boolean;
|
|
4
|
+
d: string[];
|
|
5
|
+
}
|
|
6
|
+
declare class NestedTest {
|
|
7
|
+
a: string[];
|
|
8
|
+
b: NestedB;
|
|
9
|
+
c: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class AdvancedEntity {
|
|
12
|
+
id: string;
|
|
13
|
+
created?: Date;
|
|
14
|
+
nestedTest: NestedTest;
|
|
15
|
+
order: number;
|
|
16
|
+
test: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const AdvancedSchema: z.ZodObject<{
|
|
19
|
+
id: z.ZodOptional<z.ZodString>;
|
|
20
|
+
created: z.ZodOptional<z.ZodDate>;
|
|
21
|
+
nestedTest: z.ZodOptional<z.ZodObject<{
|
|
22
|
+
a: z.ZodArray<z.ZodString, "many">;
|
|
23
|
+
b: z.ZodObject<{
|
|
24
|
+
c: z.ZodBoolean;
|
|
25
|
+
d: z.ZodArray<z.ZodString, "many">;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
c: boolean;
|
|
28
|
+
d: string[];
|
|
29
|
+
}, {
|
|
30
|
+
c: boolean;
|
|
31
|
+
d: string[];
|
|
32
|
+
}>;
|
|
33
|
+
c: z.ZodNumber;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
a: string[];
|
|
36
|
+
c: number;
|
|
37
|
+
b: {
|
|
38
|
+
c: boolean;
|
|
39
|
+
d: string[];
|
|
40
|
+
};
|
|
41
|
+
}, {
|
|
42
|
+
a: string[];
|
|
43
|
+
c: number;
|
|
44
|
+
b: {
|
|
45
|
+
c: boolean;
|
|
46
|
+
d: string[];
|
|
47
|
+
};
|
|
48
|
+
}>>;
|
|
49
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
test: z.ZodBoolean;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
test: boolean;
|
|
53
|
+
created?: Date | undefined;
|
|
54
|
+
id?: string | undefined;
|
|
55
|
+
order?: number | undefined;
|
|
56
|
+
nestedTest?: {
|
|
57
|
+
a: string[];
|
|
58
|
+
c: number;
|
|
59
|
+
b: {
|
|
60
|
+
c: boolean;
|
|
61
|
+
d: string[];
|
|
62
|
+
};
|
|
63
|
+
} | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
test: boolean;
|
|
66
|
+
created?: Date | undefined;
|
|
67
|
+
id?: string | undefined;
|
|
68
|
+
order?: number | undefined;
|
|
69
|
+
nestedTest?: {
|
|
70
|
+
a: string[];
|
|
71
|
+
c: number;
|
|
72
|
+
b: {
|
|
73
|
+
c: boolean;
|
|
74
|
+
d: string[];
|
|
75
|
+
};
|
|
76
|
+
} | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
export type AdvancedInputSchema = z.input<typeof AdvancedSchema>;
|
|
79
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdvancedSchema = exports.AdvancedEntity = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fluent_1 = require("@goatlab/fluent");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
class NestedB {
|
|
8
|
+
c;
|
|
9
|
+
d;
|
|
10
|
+
}
|
|
11
|
+
class NestedTest {
|
|
12
|
+
a;
|
|
13
|
+
b;
|
|
14
|
+
c;
|
|
15
|
+
}
|
|
16
|
+
let AdvancedEntity = class AdvancedEntity {
|
|
17
|
+
id;
|
|
18
|
+
created;
|
|
19
|
+
nestedTest;
|
|
20
|
+
order;
|
|
21
|
+
test;
|
|
22
|
+
};
|
|
23
|
+
exports.AdvancedEntity = AdvancedEntity;
|
|
24
|
+
tslib_1.__decorate([
|
|
25
|
+
fluent_1.f.id(),
|
|
26
|
+
tslib_1.__metadata("design:type", String)
|
|
27
|
+
], AdvancedEntity.prototype, "id", void 0);
|
|
28
|
+
tslib_1.__decorate([
|
|
29
|
+
fluent_1.f.created(),
|
|
30
|
+
tslib_1.__metadata("design:type", Date)
|
|
31
|
+
], AdvancedEntity.prototype, "created", void 0);
|
|
32
|
+
tslib_1.__decorate([
|
|
33
|
+
fluent_1.f.embed(NestedTest),
|
|
34
|
+
tslib_1.__metadata("design:type", NestedTest)
|
|
35
|
+
], AdvancedEntity.prototype, "nestedTest", void 0);
|
|
36
|
+
tslib_1.__decorate([
|
|
37
|
+
fluent_1.f.property({ type: 'int' }),
|
|
38
|
+
tslib_1.__metadata("design:type", Number)
|
|
39
|
+
], AdvancedEntity.prototype, "order", void 0);
|
|
40
|
+
tslib_1.__decorate([
|
|
41
|
+
fluent_1.f.property({ type: 'boolean' }),
|
|
42
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
43
|
+
], AdvancedEntity.prototype, "test", void 0);
|
|
44
|
+
exports.AdvancedEntity = AdvancedEntity = tslib_1.__decorate([
|
|
45
|
+
fluent_1.f.entity('advanced')
|
|
46
|
+
], AdvancedEntity);
|
|
47
|
+
exports.AdvancedSchema = zod_1.z.object({
|
|
48
|
+
id: zod_1.z.string().optional(),
|
|
49
|
+
created: zod_1.z.date().optional(),
|
|
50
|
+
nestedTest: zod_1.z.object({
|
|
51
|
+
a: zod_1.z.array(zod_1.z.string()),
|
|
52
|
+
b: zod_1.z.object({
|
|
53
|
+
c: zod_1.z.boolean(),
|
|
54
|
+
d: zod_1.z.array(zod_1.z.string())
|
|
55
|
+
}),
|
|
56
|
+
c: zod_1.z.number().int()
|
|
57
|
+
}).optional(),
|
|
58
|
+
order: zod_1.z.number().int().optional(),
|
|
59
|
+
test: zod_1.z.boolean()
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=advanced.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advanced.entity.js","sourceRoot":"","sources":["../../../src/test/entities/advanced.entity.ts"],"names":[],"mappings":";;;;AAAA,4CAAmC;AACnC,6BAAuB;AAEvB,MAAM,OAAO;IACX,CAAC,CAAS;IACV,CAAC,CAAU;CACZ;AAED,MAAM,UAAU;IACd,CAAC,CAAU;IACX,CAAC,CAAS;IACV,CAAC,CAAQ;CACV;AAGM,IAAM,cAAc,GAApB,MAAM,cAAc;IAEzB,EAAE,CAAQ;IAGV,OAAO,CAAO;IAGd,UAAU,CAAY;IAGtB,KAAK,CAAQ;IAGb,IAAI,CAAS;CACd,CAAA;AAfY,wCAAc;AAEzB;IADC,UAAC,CAAC,EAAE,EAAE;;0CACG;AAGV;IADC,UAAC,CAAC,OAAO,EAAE;sCACF,IAAI;+CAAA;AAGd;IADC,UAAC,CAAC,KAAK,CAAC,UAAU,CAAC;sCACR,UAAU;kDAAA;AAGtB;IADC,UAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;6CACf;AAGb;IADC,UAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;4CACnB;yBAdF,cAAc;IAD1B,UAAC,CAAC,MAAM,CAAC,UAAU,CAAC;GACR,cAAc,CAe1B;AAEY,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,OAAO,EAAE,OAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC5B,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC;QACnB,CAAC,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;QACtB,CAAC,EAAE,OAAC,CAAC,MAAM,CAAC;YACV,CAAC,EAAE,OAAC,CAAC,OAAO,EAAE;YACd,CAAC,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SACvB,CAAC;QACF,CAAC,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;KACpB,CAAC,CAAC,QAAQ,EAAE;IACb,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAClC,IAAI,EAAE,OAAC,CAAC,OAAO,EAAE;CAClB,CAAC,CAAA"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare class GoatEntity {
|
|
3
|
+
id?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
age: number;
|
|
6
|
+
type?: string;
|
|
7
|
+
active?: boolean;
|
|
8
|
+
weight?: number;
|
|
9
|
+
balance?: {
|
|
10
|
+
id: number;
|
|
11
|
+
value: number;
|
|
12
|
+
};
|
|
13
|
+
breed?: {
|
|
14
|
+
type: string;
|
|
15
|
+
family: string;
|
|
16
|
+
};
|
|
17
|
+
createdBy?: string;
|
|
18
|
+
createdAt?: Date;
|
|
19
|
+
updatedAt?: Date;
|
|
20
|
+
}
|
|
21
|
+
export declare const GoatSchema: z.ZodObject<{
|
|
22
|
+
id: z.ZodOptional<z.ZodString>;
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
age: z.ZodNumber;
|
|
25
|
+
type: z.ZodOptional<z.ZodString>;
|
|
26
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
id: z.ZodNumber;
|
|
30
|
+
value: z.ZodNumber;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
id: number;
|
|
33
|
+
value: number;
|
|
34
|
+
}, {
|
|
35
|
+
id: number;
|
|
36
|
+
value: number;
|
|
37
|
+
}>>;
|
|
38
|
+
breed: z.ZodOptional<z.ZodObject<{
|
|
39
|
+
type: z.ZodString;
|
|
40
|
+
family: z.ZodString;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
type: string;
|
|
43
|
+
family: string;
|
|
44
|
+
}, {
|
|
45
|
+
type: string;
|
|
46
|
+
family: string;
|
|
47
|
+
}>>;
|
|
48
|
+
createdBy: z.ZodOptional<z.ZodString>;
|
|
49
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
50
|
+
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
name: string;
|
|
53
|
+
age: number;
|
|
54
|
+
id?: string | undefined;
|
|
55
|
+
type?: string | undefined;
|
|
56
|
+
active?: boolean | undefined;
|
|
57
|
+
weight?: number | undefined;
|
|
58
|
+
balance?: {
|
|
59
|
+
id: number;
|
|
60
|
+
value: number;
|
|
61
|
+
} | undefined;
|
|
62
|
+
breed?: {
|
|
63
|
+
type: string;
|
|
64
|
+
family: string;
|
|
65
|
+
} | undefined;
|
|
66
|
+
createdBy?: string | undefined;
|
|
67
|
+
createdAt?: Date | undefined;
|
|
68
|
+
updatedAt?: Date | undefined;
|
|
69
|
+
}, {
|
|
70
|
+
name: string;
|
|
71
|
+
age: number;
|
|
72
|
+
id?: string | undefined;
|
|
73
|
+
type?: string | undefined;
|
|
74
|
+
active?: boolean | undefined;
|
|
75
|
+
weight?: number | undefined;
|
|
76
|
+
balance?: {
|
|
77
|
+
id: number;
|
|
78
|
+
value: number;
|
|
79
|
+
} | undefined;
|
|
80
|
+
breed?: {
|
|
81
|
+
type: string;
|
|
82
|
+
family: string;
|
|
83
|
+
} | undefined;
|
|
84
|
+
createdBy?: string | undefined;
|
|
85
|
+
createdAt?: Date | undefined;
|
|
86
|
+
updatedAt?: Date | undefined;
|
|
87
|
+
}>;
|
|
88
|
+
export declare const GoatUpdateSchema: z.ZodObject<{
|
|
89
|
+
id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
90
|
+
name: z.ZodOptional<z.ZodString>;
|
|
91
|
+
age: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
type: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
93
|
+
active: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
94
|
+
weight: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
95
|
+
balance: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
96
|
+
id: z.ZodNumber;
|
|
97
|
+
value: z.ZodNumber;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
id: number;
|
|
100
|
+
value: number;
|
|
101
|
+
}, {
|
|
102
|
+
id: number;
|
|
103
|
+
value: number;
|
|
104
|
+
}>>>;
|
|
105
|
+
breed: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
106
|
+
type: z.ZodString;
|
|
107
|
+
family: z.ZodString;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
type: string;
|
|
110
|
+
family: string;
|
|
111
|
+
}, {
|
|
112
|
+
type: string;
|
|
113
|
+
family: string;
|
|
114
|
+
}>>>;
|
|
115
|
+
createdBy: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
116
|
+
createdAt: z.ZodOptional<z.ZodOptional<z.ZodDate>>;
|
|
117
|
+
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodDate>>;
|
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
|
119
|
+
id?: string | undefined;
|
|
120
|
+
name?: string | undefined;
|
|
121
|
+
age?: number | undefined;
|
|
122
|
+
type?: string | undefined;
|
|
123
|
+
active?: boolean | undefined;
|
|
124
|
+
weight?: number | undefined;
|
|
125
|
+
balance?: {
|
|
126
|
+
id: number;
|
|
127
|
+
value: number;
|
|
128
|
+
} | undefined;
|
|
129
|
+
breed?: {
|
|
130
|
+
type: string;
|
|
131
|
+
family: string;
|
|
132
|
+
} | undefined;
|
|
133
|
+
createdBy?: string | undefined;
|
|
134
|
+
createdAt?: Date | undefined;
|
|
135
|
+
updatedAt?: Date | undefined;
|
|
136
|
+
}, {
|
|
137
|
+
id?: string | undefined;
|
|
138
|
+
name?: string | undefined;
|
|
139
|
+
age?: number | undefined;
|
|
140
|
+
type?: string | undefined;
|
|
141
|
+
active?: boolean | undefined;
|
|
142
|
+
weight?: number | undefined;
|
|
143
|
+
balance?: {
|
|
144
|
+
id: number;
|
|
145
|
+
value: number;
|
|
146
|
+
} | undefined;
|
|
147
|
+
breed?: {
|
|
148
|
+
type: string;
|
|
149
|
+
family: string;
|
|
150
|
+
} | undefined;
|
|
151
|
+
createdBy?: string | undefined;
|
|
152
|
+
createdAt?: Date | undefined;
|
|
153
|
+
updatedAt?: Date | undefined;
|
|
154
|
+
}>;
|
|
155
|
+
export type GoatInputSchema = z.input<typeof GoatSchema>;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GoatUpdateSchema = exports.GoatSchema = exports.GoatEntity = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fluent_1 = require("@goatlab/fluent");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
let GoatEntity = class GoatEntity {
|
|
8
|
+
id;
|
|
9
|
+
name;
|
|
10
|
+
age;
|
|
11
|
+
type;
|
|
12
|
+
active;
|
|
13
|
+
weight;
|
|
14
|
+
balance;
|
|
15
|
+
breed;
|
|
16
|
+
createdBy;
|
|
17
|
+
createdAt;
|
|
18
|
+
updatedAt;
|
|
19
|
+
};
|
|
20
|
+
exports.GoatEntity = GoatEntity;
|
|
21
|
+
tslib_1.__decorate([
|
|
22
|
+
fluent_1.f.id(),
|
|
23
|
+
tslib_1.__metadata("design:type", String)
|
|
24
|
+
], GoatEntity.prototype, "id", void 0);
|
|
25
|
+
tslib_1.__decorate([
|
|
26
|
+
fluent_1.f.property({ required: true, type: 'varchar' }),
|
|
27
|
+
tslib_1.__metadata("design:type", String)
|
|
28
|
+
], GoatEntity.prototype, "name", void 0);
|
|
29
|
+
tslib_1.__decorate([
|
|
30
|
+
fluent_1.f.property({ required: true, type: 'int' }),
|
|
31
|
+
tslib_1.__metadata("design:type", Number)
|
|
32
|
+
], GoatEntity.prototype, "age", void 0);
|
|
33
|
+
tslib_1.__decorate([
|
|
34
|
+
fluent_1.f.property({ type: 'varchar' }),
|
|
35
|
+
tslib_1.__metadata("design:type", String)
|
|
36
|
+
], GoatEntity.prototype, "type", void 0);
|
|
37
|
+
tslib_1.__decorate([
|
|
38
|
+
fluent_1.f.property({ type: 'boolean' }),
|
|
39
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
40
|
+
], GoatEntity.prototype, "active", void 0);
|
|
41
|
+
tslib_1.__decorate([
|
|
42
|
+
fluent_1.f.property({ type: 'float' }),
|
|
43
|
+
tslib_1.__metadata("design:type", Number)
|
|
44
|
+
], GoatEntity.prototype, "weight", void 0);
|
|
45
|
+
tslib_1.__decorate([
|
|
46
|
+
fluent_1.f.embed({ id: Number, value: Number }),
|
|
47
|
+
tslib_1.__metadata("design:type", Object)
|
|
48
|
+
], GoatEntity.prototype, "balance", void 0);
|
|
49
|
+
tslib_1.__decorate([
|
|
50
|
+
fluent_1.f.embed({ type: String, family: String }),
|
|
51
|
+
tslib_1.__metadata("design:type", Object)
|
|
52
|
+
], GoatEntity.prototype, "breed", void 0);
|
|
53
|
+
tslib_1.__decorate([
|
|
54
|
+
fluent_1.f.property({ type: 'varchar' }),
|
|
55
|
+
tslib_1.__metadata("design:type", String)
|
|
56
|
+
], GoatEntity.prototype, "createdBy", void 0);
|
|
57
|
+
tslib_1.__decorate([
|
|
58
|
+
fluent_1.f.created(),
|
|
59
|
+
tslib_1.__metadata("design:type", Date)
|
|
60
|
+
], GoatEntity.prototype, "createdAt", void 0);
|
|
61
|
+
tslib_1.__decorate([
|
|
62
|
+
fluent_1.f.updated(),
|
|
63
|
+
tslib_1.__metadata("design:type", Date)
|
|
64
|
+
], GoatEntity.prototype, "updatedAt", void 0);
|
|
65
|
+
exports.GoatEntity = GoatEntity = tslib_1.__decorate([
|
|
66
|
+
fluent_1.f.entity('goats')
|
|
67
|
+
], GoatEntity);
|
|
68
|
+
exports.GoatSchema = zod_1.z.object({
|
|
69
|
+
id: zod_1.z.string().optional(),
|
|
70
|
+
name: zod_1.z.string(),
|
|
71
|
+
age: zod_1.z.number().int(),
|
|
72
|
+
type: zod_1.z.string().optional(),
|
|
73
|
+
active: zod_1.z.boolean().optional(),
|
|
74
|
+
weight: zod_1.z.number().optional(),
|
|
75
|
+
balance: zod_1.z.object({
|
|
76
|
+
id: zod_1.z.number(),
|
|
77
|
+
value: zod_1.z.number()
|
|
78
|
+
}).optional(),
|
|
79
|
+
breed: zod_1.z.object({
|
|
80
|
+
type: zod_1.z.string(),
|
|
81
|
+
family: zod_1.z.string()
|
|
82
|
+
}).optional(),
|
|
83
|
+
createdBy: zod_1.z.string().optional(),
|
|
84
|
+
createdAt: zod_1.z.date().optional(),
|
|
85
|
+
updatedAt: zod_1.z.date().optional()
|
|
86
|
+
});
|
|
87
|
+
// For updates, make all fields optional except id
|
|
88
|
+
exports.GoatUpdateSchema = exports.GoatSchema.partial();
|
|
89
|
+
//# sourceMappingURL=goat.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goat.entity.js","sourceRoot":"","sources":["../../../src/test/entities/goat.entity.ts"],"names":[],"mappings":";;;;AAAA,4CAAmC;AACnC,6BAAuB;AAGhB,IAAM,UAAU,GAAhB,MAAM,UAAU;IAErB,EAAE,CAAS;IAGX,IAAI,CAAQ;IAGZ,GAAG,CAAQ;IAGX,IAAI,CAAS;IAGb,MAAM,CAAU;IAGhB,MAAM,CAAS;IAGf,OAAO,CAAgC;IAGvC,KAAK,CAAmC;IAGxC,SAAS,CAAS;IAGlB,SAAS,CAAO;IAGhB,SAAS,CAAO;CACjB,CAAA;AAjCY,gCAAU;AAErB;IADC,UAAC,CAAC,EAAE,EAAE;;sCACI;AAGX;IADC,UAAC,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;wCACpC;AAGZ;IADC,UAAC,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;uCACjC;AAGX;IADC,UAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;wCACnB;AAGb;IADC,UAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;0CAChB;AAGhB;IADC,UAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;0CACf;AAGf;IADC,UAAC,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;;2CACA;AAGvC;IADC,UAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;;yCACF;AAGxC;IADC,UAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;6CACd;AAGlB;IADC,UAAC,CAAC,OAAO,EAAE;sCACA,IAAI;6CAAA;AAGhB;IADC,UAAC,CAAC,OAAO,EAAE;sCACA,IAAI;6CAAA;qBAhCL,UAAU;IADtB,UAAC,CAAC,MAAM,CAAC,OAAO,CAAC;GACL,UAAU,CAiCtB;AAEY,QAAA,UAAU,GAAG,OAAC,CAAC,MAAM,CAAC;IACjC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACrB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC9B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;QACd,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;KAClB,CAAC,CAAC,QAAQ,EAAE;IACb,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;KACnB,CAAC,CAAC,QAAQ,EAAE;IACb,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,OAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC9B,SAAS,EAAE,OAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAA;AAEF,kDAAkD;AACrC,QAAA,gBAAgB,GAAG,kBAAU,CAAC,OAAO,EAAE,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PouchDBConnector } from '../PouchDBConnector';
|
|
2
|
+
import { GoatEntity, TypeOrmEntity, GoatInputSchema, TypeORMDataModelInputSchema } from '@goatlab/fluent';
|
|
3
|
+
export declare class PouchDBGoatRepositoryFactory extends PouchDBConnector<GoatEntity, GoatInputSchema> {
|
|
4
|
+
constructor();
|
|
5
|
+
}
|
|
6
|
+
export declare class PouchDBTypeOrmRepositoryFactory extends PouchDBConnector<TypeOrmEntity, TypeORMDataModelInputSchema> {
|
|
7
|
+
constructor();
|
|
8
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PouchDBTypeOrmRepositoryFactory = exports.PouchDBGoatRepositoryFactory = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pouchdb_1 = tslib_1.__importDefault(require("pouchdb"));
|
|
6
|
+
const PouchDBConnector_1 = require("../PouchDBConnector");
|
|
7
|
+
const fluent_1 = require("@goatlab/fluent");
|
|
8
|
+
class PouchDBGoatRepositoryFactory extends PouchDBConnector_1.PouchDBConnector {
|
|
9
|
+
constructor() {
|
|
10
|
+
// Create a fresh in-memory PouchDB instance for each test
|
|
11
|
+
const pouchDB = new pouchdb_1.default(`goats-${Date.now()}-${Math.random()}`, { adapter: 'memory' });
|
|
12
|
+
super({
|
|
13
|
+
entity: fluent_1.GoatEntity,
|
|
14
|
+
dataSource: pouchDB,
|
|
15
|
+
inputSchema: fluent_1.GoatSchema
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.PouchDBGoatRepositoryFactory = PouchDBGoatRepositoryFactory;
|
|
20
|
+
class PouchDBTypeOrmRepositoryFactory extends PouchDBConnector_1.PouchDBConnector {
|
|
21
|
+
constructor() {
|
|
22
|
+
// Create a fresh in-memory PouchDB instance for each test
|
|
23
|
+
const pouchDB = new pouchdb_1.default(`advanced-${Date.now()}-${Math.random()}`, { adapter: 'memory' });
|
|
24
|
+
super({
|
|
25
|
+
entity: fluent_1.TypeOrmEntity,
|
|
26
|
+
dataSource: pouchDB,
|
|
27
|
+
inputSchema: fluent_1.TypeORMDataModelSchema
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.PouchDBTypeOrmRepositoryFactory = PouchDBTypeOrmRepositoryFactory;
|
|
32
|
+
//# sourceMappingURL=pouchdb.repository.factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pouchdb.repository.factory.js","sourceRoot":"","sources":["../../src/test/pouchdb.repository.factory.ts"],"names":[],"mappings":";;;;AAAA,8DAA6B;AAC7B,0DAAsD;AACtD,4CAOwB;AAExB,MAAa,4BAA6B,SAAQ,mCAA6C;IAC7F;QACE,0DAA0D;QAC1D,MAAM,OAAO,GAAG,IAAI,iBAAO,CAAC,SAAS,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAA;QAE1F,KAAK,CAAC;YACJ,MAAM,EAAE,mBAAU;YAClB,UAAU,EAAE,OAAO;YACnB,WAAW,EAAE,mBAAiB;SAC/B,CAAC,CAAA;IACJ,CAAC;CACF;AAXD,oEAWC;AAED,MAAa,+BAAgC,SAAQ,mCAA4D;IAC/G;QACE,0DAA0D;QAC1D,MAAM,OAAO,GAAG,IAAI,iBAAO,CAAC,YAAY,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAA;QAE7F,KAAK,CAAC;YACJ,MAAM,EAAE,sBAAa;YACrB,UAAU,EAAE,OAAO;YACnB,WAAW,EAAE,+BAA6B;SAC3C,CAAC,CAAA;IACJ,CAAC;CACF;AAXD,0EAWC"}
|