@tstdl/base 0.92.96 → 0.92.98
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/cookie/cookie.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type SetCookieOptions = {
|
|
|
8
8
|
partitioned?: boolean;
|
|
9
9
|
path?: string;
|
|
10
10
|
sameSite?: 'strict' | 'lax' | 'none';
|
|
11
|
+
priority?: 'low' | 'medium' | 'high';
|
|
11
12
|
secure?: boolean;
|
|
12
13
|
};
|
|
13
14
|
export declare function formatSetCookie(name: string, value: string, options?: SetCookieOptions): string;
|
package/cookie/cookie.js
CHANGED
|
@@ -6,9 +6,13 @@ const sameSiteMap = {
|
|
|
6
6
|
lax: 'Lax',
|
|
7
7
|
strict: 'Strict'
|
|
8
8
|
};
|
|
9
|
+
const priorityMap = {
|
|
10
|
+
low: 'Low',
|
|
11
|
+
medium: 'Medium',
|
|
12
|
+
high: 'High'
|
|
13
|
+
};
|
|
9
14
|
export function formatSetCookie(name, value, options = {}) {
|
|
10
|
-
|
|
11
|
-
let cookie = `${name}="${encodedValue}"`;
|
|
15
|
+
let cookie = `${name}=${encodeURIComponent(value)}`;
|
|
12
16
|
if (isDefined(options.domain)) {
|
|
13
17
|
cookie = `${cookie}; Domain=${options.domain}`;
|
|
14
18
|
}
|
|
@@ -31,10 +35,17 @@ export function formatSetCookie(name, value, options = {}) {
|
|
|
31
35
|
if (isDefined(options.sameSite)) {
|
|
32
36
|
const sameSiteValue = sameSiteMap[options.sameSite];
|
|
33
37
|
if (isUndefined(sameSiteValue)) {
|
|
34
|
-
throw new NotSupportedError(`Unknown option
|
|
38
|
+
throw new NotSupportedError(`Unknown option sameSite "${options.sameSite}".`);
|
|
35
39
|
}
|
|
36
40
|
cookie = `${cookie}; SameSite=${sameSiteValue}`;
|
|
37
41
|
}
|
|
42
|
+
if (isDefined(options.priority)) {
|
|
43
|
+
const priorityValue = priorityMap[options.priority];
|
|
44
|
+
if (isUndefined(priorityValue)) {
|
|
45
|
+
throw new NotSupportedError(`Unknown option priority "${options.priority}".`);
|
|
46
|
+
}
|
|
47
|
+
cookie = `${cookie}; Priority=${priorityValue}`;
|
|
48
|
+
}
|
|
38
49
|
if (isDefined(options.secure) && options.secure) {
|
|
39
50
|
cookie = `${cookie}; Secure`;
|
|
40
51
|
}
|
|
@@ -801,7 +801,6 @@ Antworte auf deutsch.`
|
|
|
801
801
|
DocumentManagementService = DocumentManagementService_1 = __decorate([
|
|
802
802
|
Singleton({
|
|
803
803
|
providers: [
|
|
804
|
-
provide(EntityRepositoryConfig, { useValue: { schema: 'document_management' } }),
|
|
805
804
|
{ provide: DatabaseConfig, useFactory: (_, context) => context.resolve(DocumentManagementConfig).database ?? context.resolve(DatabaseConfig, undefined, { skipSelf: true }) }
|
|
806
805
|
]
|
|
807
806
|
})
|
package/orm/server/repository.js
CHANGED
|
@@ -46,7 +46,7 @@ let EntityRepository = class EntityRepository {
|
|
|
46
46
|
#transformContext = this.#context.transformContext;
|
|
47
47
|
type = this.#context.type ?? injectArgument(this, { optional: true }) ?? assertDefinedPass(this.constructor[entityTypeToken], 'Missing entity type.');
|
|
48
48
|
typeName = this.type.entityName ?? this.type.name;
|
|
49
|
-
#table = this.#context.table ?? getDrizzleTableFromType(this.type, inject(EntityRepositoryConfig)
|
|
49
|
+
#table = this.#context.table ?? getDrizzleTableFromType(this.type, inject(EntityRepositoryConfig, undefined, { optional: true })?.schema);
|
|
50
50
|
#tableWithMetadata = this.#table;
|
|
51
51
|
#columnDefinitions = this.#context.columnDefinitions ?? getColumnDefinitions(this.#table);
|
|
52
52
|
#columnDefinitionsMap = this.#context.columnDefinitionsMap ?? new Map(this.#columnDefinitions.map((column) => [column.objectPath.path, column]));
|
package/orm/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Array, Integer } from '../schema/index.js';
|
|
|
4
4
|
import type { AbstractConstructor, EnumerationObject, EnumerationValue, ObjectLiteral, UnionToTuple } from '../types.js';
|
|
5
5
|
import type { GetTagMetadata, HasTag, Tagged, UnwrapTagged } from '../types/index.js';
|
|
6
6
|
import type { bytea, numericDate, timestamp } from './data-types/index.js';
|
|
7
|
-
import { Check, Column, Embedded, Encrypted, Index, PrimaryKey, References, Unique } from './decorators.js';
|
|
7
|
+
import { Check, Column, Embedded, Encrypted, Index, PrimaryKey, References, Table, Unique } from './decorators.js';
|
|
8
8
|
import { Json, NumericDate, Timestamp, Uuid } from './schemas/index.js';
|
|
9
9
|
export type ColumnTypeTag = 'column';
|
|
10
10
|
export type EmbeddedConfigTag = 'embedded';
|
|
@@ -27,4 +27,4 @@ export type NumericDate = Tagged<number, ColumnTypeTag, ReturnType<typeof numeri
|
|
|
27
27
|
export type Timestamp = Tagged<number, ColumnTypeTag, ReturnType<typeof timestamp>>;
|
|
28
28
|
export type Bytea = Tagged<Uint8Array, ColumnTypeTag, ReturnType<typeof bytea>>;
|
|
29
29
|
export type Encrypted<T> = Tagged<T, ColumnTypeTag, ReturnType<typeof bytea>>;
|
|
30
|
-
export { Array, Check, Column, Embedded, Encrypted, Index, Integer, Json, NumericDate, PrimaryKey, References, Timestamp, Unique, Uuid };
|
|
30
|
+
export { Array, Check, Column, Embedded, Encrypted, Index, Integer, Json, NumericDate, PrimaryKey, References, Table, Timestamp, Unique, Uuid };
|
package/orm/types.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Array, Integer } from '../schema/index.js';
|
|
2
|
-
import { Check, Column, Embedded, Encrypted, Index, PrimaryKey, References, Unique } from './decorators.js';
|
|
2
|
+
import { Check, Column, Embedded, Encrypted, Index, PrimaryKey, References, Table, Unique } from './decorators.js';
|
|
3
3
|
import { Json, NumericDate, Timestamp, Uuid } from './schemas/index.js';
|
|
4
|
-
export { Array, Check, Column, Embedded, Encrypted, Index, Integer, Json, NumericDate, PrimaryKey, References, Timestamp, Unique, Uuid };
|
|
4
|
+
export { Array, Check, Column, Embedded, Encrypted, Index, Integer, Json, NumericDate, PrimaryKey, References, Table, Timestamp, Unique, Uuid };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tstdl/base",
|
|
3
|
-
"version": "0.92.
|
|
3
|
+
"version": "0.92.98",
|
|
4
4
|
"author": "Patrick Hein",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"@typescript-eslint/eslint-plugin": "8.26",
|
|
154
154
|
"concurrently": "9.1",
|
|
155
155
|
"drizzle-kit": "0.30",
|
|
156
|
-
"eslint": "9.
|
|
156
|
+
"eslint": "9.22",
|
|
157
157
|
"globals": "16.0",
|
|
158
158
|
"tsc-alias": "1.8",
|
|
159
159
|
"typescript": "5.8"
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"mjml": "^4.15",
|
|
174
174
|
"mongodb": "^6.14",
|
|
175
175
|
"nodemailer": "^6.10",
|
|
176
|
-
"pg": "^8.
|
|
176
|
+
"pg": "^8.14",
|
|
177
177
|
"playwright": "^1.51",
|
|
178
178
|
"preact": "^10.26",
|
|
179
179
|
"preact-render-to-string": "^6.5",
|