@tstdl/base 0.71.78 → 0.71.81
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/database/entity-repository.d.ts +2 -3
- package/mail/template-providers/file-mail-template.provider.d.ts +1 -0
- package/mail/template-providers/file-mail-template.provider.js +5 -1
- package/mail/template-providers/file-mail-template.provider.js.map +1 -1
- package/package.json +3 -3
- package/types.d.ts +7 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Entity, MaybeNewEntity } from './entity';
|
|
2
2
|
import type { Query, QueryOptions } from './query';
|
|
3
|
-
declare const
|
|
3
|
+
export declare const repositoryType: unique symbol;
|
|
4
4
|
export declare type UpdateOptions = {
|
|
5
5
|
upsert?: boolean;
|
|
6
6
|
};
|
|
7
7
|
export declare type EntityPatch<T extends Entity = Entity> = Partial<Omit<T, 'id'>>;
|
|
8
8
|
export declare abstract class EntityRepository<T extends Entity = Entity> {
|
|
9
|
-
readonly [
|
|
9
|
+
readonly [repositoryType]: T;
|
|
10
10
|
abstract load<U extends T = T>(id: string): Promise<U>;
|
|
11
11
|
abstract tryLoad<U extends T = T>(id: string): Promise<U | undefined>;
|
|
12
12
|
abstract loadByFilter<U extends T = T>(query: Query<U>, options?: QueryOptions<U>): Promise<U>;
|
|
@@ -48,4 +48,3 @@ export declare abstract class EntityRepository<T extends Entity = Entity> {
|
|
|
48
48
|
abstract deleteByFilter<U extends T = T>(query: Query<U>): Promise<boolean>;
|
|
49
49
|
abstract deleteManyByFilter<U extends T = T>(query: Query<U>): Promise<number>;
|
|
50
50
|
}
|
|
51
|
-
export {};
|
|
@@ -21,3 +21,4 @@ export declare class FileMailTemplateProvider extends FileTemplateProviderBase<M
|
|
|
21
21
|
constructor(basePath: string);
|
|
22
22
|
}
|
|
23
23
|
export declare function configureFileMailTemplateProvider(config?: Partial<FileMailTemplateProviderConfig>): void;
|
|
24
|
+
export declare function fileMailTemplate<T extends FileMailTemplate>(template: T): T;
|
|
@@ -12,7 +12,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.configureFileMailTemplateProvider = exports.FileMailTemplateProvider = exports.fileMailTemplateProviderConfig = void 0;
|
|
15
|
+
exports.fileMailTemplate = exports.configureFileMailTemplateProvider = exports.FileMailTemplateProvider = exports.fileMailTemplateProviderConfig = void 0;
|
|
16
16
|
const container_1 = require("../../container");
|
|
17
17
|
const schema_1 = require("../../schema");
|
|
18
18
|
const file_template_provider_base_1 = require("../../templates/providers/file-template.provider.base");
|
|
@@ -44,4 +44,8 @@ function configureFileMailTemplateProvider(config = {}) {
|
|
|
44
44
|
exports.fileMailTemplateProviderConfig.basePath = config.basePath ?? exports.fileMailTemplateProviderConfig.basePath;
|
|
45
45
|
}
|
|
46
46
|
exports.configureFileMailTemplateProvider = configureFileMailTemplateProvider;
|
|
47
|
+
function fileMailTemplate(template) {
|
|
48
|
+
return template;
|
|
49
|
+
}
|
|
50
|
+
exports.fileMailTemplate = fileMailTemplate;
|
|
47
51
|
//# sourceMappingURL=file-mail-template.provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-mail-template.provider.js","sourceRoot":"","sources":["../../../source/mail/template-providers/file-mail-template.provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,+CAAwE;AAExE,yCAA6D;AAC7D,uGAA6F;AAqBhF,QAAA,8BAA8B,GAAmC,EAAE,CAAC;AAEjF,MAAM,sBAAsB,GAA6B,IAAA,eAAM,EAAC;IAC9D,IAAI,EAAE,IAAA,eAAM,GAAE;IACd,OAAO,EAAE,IAAA,iBAAQ,EAAC,IAAA,eAAM,GAAE,CAAC;IAC3B,WAAW,EAAE,IAAA,iBAAQ,EAAC,IAAA,eAAM,GAAE,CAAC;IAC/B,IAAI,EAAE,IAAA,iBAAQ,EAAC,IAAA,eAAM,GAAE,CAAC;IACxB,QAAQ,EAAE,IAAA,iBAAQ,EAAC,IAAA,eAAM,GAAE,CAAC;IAC5B,IAAI,EAAE,IAAA,iBAAQ,EAAC,IAAA,eAAM,GAAE,CAAC;IACxB,QAAQ,EAAE,IAAA,iBAAQ,EAAC,IAAA,eAAM,GAAE,CAAC;IAC5B,OAAO,EAAE,IAAA,iBAAQ,EAAC,IAAA,gBAAO,GAAE,CAAC;CAC7B,CAAC,CAAC;AAKH,IAAa,wBAAwB,GAArC,MAAa,wBAAyB,SAAQ,sDAAwD;IAGpG,YAAyB,QAAgB;QACvC,KAAK,CAAC,sBAAsB,EAAE,QAAQ,EAAE,CAAC,CAAC,aAAa,EAAE,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACpH,CAAC;CACF,CAAA;AANY,wBAAwB;IAHpC,IAAA,qBAAS,EAAC;QACT,uBAAuB,EAAE,GAAG,EAAE,CAAC,sCAA8B,CAAC,QAAQ;KACvE,CAAC;IAIa,WAAA,IAAA,qBAAS,GAAE,CAAA;;GAHb,wBAAwB,CAMpC;AANY,4DAAwB;AAQrC,SAAgB,iCAAiC,CAAC,SAAkD,EAAE;IACpG,sCAA8B,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,sCAA8B,CAAC,QAAQ,CAAC;AACvG,CAAC;AAFD,8EAEC"}
|
|
1
|
+
{"version":3,"file":"file-mail-template.provider.js","sourceRoot":"","sources":["../../../source/mail/template-providers/file-mail-template.provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,+CAAwE;AAExE,yCAA6D;AAC7D,uGAA6F;AAqBhF,QAAA,8BAA8B,GAAmC,EAAE,CAAC;AAEjF,MAAM,sBAAsB,GAA6B,IAAA,eAAM,EAAC;IAC9D,IAAI,EAAE,IAAA,eAAM,GAAE;IACd,OAAO,EAAE,IAAA,iBA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version": "0.71.
|
|
3
|
+
"version": "0.71.81",
|
|
4
4
|
"author": "Patrick Hein",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"luxon": "^3.0",
|
|
19
19
|
"reflect-metadata": "^0.1",
|
|
20
20
|
"rxjs": "^7.5",
|
|
21
|
-
"type-fest": "^2.
|
|
21
|
+
"type-fest": "^2.17"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/chroma-js": "2.1",
|
|
25
25
|
"@types/koa__router": "8.0",
|
|
26
|
-
"@types/luxon": "
|
|
26
|
+
"@types/luxon": "3.0",
|
|
27
27
|
"@types/minio": "7.0",
|
|
28
28
|
"@types/mjml": "4.7",
|
|
29
29
|
"@types/node": "18",
|
package/types.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare type PrimitiveObject = {
|
|
|
21
21
|
[key: string]: PrimitiveValue;
|
|
22
22
|
};
|
|
23
23
|
export declare type PrimitiveArray = PrimitiveValue[];
|
|
24
|
+
export declare type BuiltIn = Primitive | RegExp | Date | Function;
|
|
24
25
|
export declare type Json = JsonPrimitive | JsonObject | JsonArray;
|
|
25
26
|
export declare type JsonPrimitive = string | number | boolean | null;
|
|
26
27
|
export declare type JsonObject = {
|
|
@@ -126,10 +127,15 @@ export declare type DeepFlatten<T> = T extends readonly (infer R)[] ? DeepFlatte
|
|
|
126
127
|
[P in keyof T]: DeepFlatten<T[P]>;
|
|
127
128
|
} : T;
|
|
128
129
|
export declare type DeepArray<T> = (T | DeepArray<T>)[];
|
|
129
|
-
export declare type DeepReadonly<T> = T extends
|
|
130
|
+
export declare type DeepReadonly<T> = T extends BuiltIn ? T : T extends (any[] | readonly any[]) ? DeepReadonlyArray<T[number]> : DeepReadonlyObject<T>;
|
|
130
131
|
export declare type DeepReadonlyObject<T> = {
|
|
131
132
|
readonly [P in keyof T]: DeepReadonly<T[P]>;
|
|
132
133
|
};
|
|
133
134
|
export declare type DeepReadonlyArray<T> = readonly DeepReadonly<T>[];
|
|
135
|
+
export declare type DeepPartial<T> = T extends BuiltIn ? T : T extends any[] ? DeepPartialArray<T[number]> : T extends readonly any[] ? Readonly<DeepPartialArray<T[number]>> : DeepPartialObject<T>;
|
|
136
|
+
export declare type DeepPartialObject<T> = {
|
|
137
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
138
|
+
};
|
|
139
|
+
export declare type DeepPartialArray<T> = DeepPartial<T>[];
|
|
134
140
|
export declare type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
|
|
135
141
|
export declare type BinaryData = ArrayBuffer | ArrayBufferView;
|