rlz-engine 1.0.15 → 1.0.17
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.
|
@@ -5,8 +5,9 @@ import { StorageTempPassword, StorageUser } from './model';
|
|
|
5
5
|
export declare class AuthStorage {
|
|
6
6
|
private readonly logger;
|
|
7
7
|
private readonly mongo;
|
|
8
|
-
constructor(
|
|
9
|
-
|
|
8
|
+
private constructor();
|
|
9
|
+
create(mongo: MongoStorage): Promise<AuthStorage>;
|
|
10
|
+
private init;
|
|
10
11
|
createUser(id: string, name: string, email: string, passwordSalt: Binary, passwordHash: Binary): Promise<void>;
|
|
11
12
|
getUser(name: string): Promise<StorageUser | null>;
|
|
12
13
|
markUserActive(userId: string): Promise<void>;
|
|
@@ -5,7 +5,8 @@ type StorageIndexDescription = IndexDescription & {
|
|
|
5
5
|
export declare class MongoStorage {
|
|
6
6
|
private readonly logger;
|
|
7
7
|
private readonly client;
|
|
8
|
-
|
|
8
|
+
private dbName;
|
|
9
|
+
constructor(db: string);
|
|
9
10
|
get db(): Db;
|
|
10
11
|
createCollection(name: string): Promise<void>;
|
|
11
12
|
createIndexes<T extends Document>(collection: Collection<T>, indexes: StorageIndexDescription[]): Promise<void>;
|
package/dist/back/storage/db.js
CHANGED
|
@@ -3,12 +3,14 @@ import { logger } from '../logger';
|
|
|
3
3
|
export class MongoStorage {
|
|
4
4
|
logger;
|
|
5
5
|
client;
|
|
6
|
-
|
|
6
|
+
dbName;
|
|
7
|
+
constructor(db) {
|
|
7
8
|
this.logger = logger('MongoStorage');
|
|
9
|
+
this.dbName = db;
|
|
8
10
|
this.client = new MongoClient('mongodb://localhost');
|
|
9
11
|
}
|
|
10
12
|
get db() {
|
|
11
|
-
return this.client.db(
|
|
13
|
+
return this.client.db(this.dbName);
|
|
12
14
|
}
|
|
13
15
|
async createCollection(name) {
|
|
14
16
|
await this.db.createCollection(name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rlz-engine",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"description": "Deps and tools for my style of development",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@stylistic/eslint-plugin": "^
|
|
24
|
+
"@stylistic/eslint-plugin": "^3.1.0",
|
|
25
25
|
"@types/luxon": "^3.4.2",
|
|
26
26
|
"@types/node": "^22.10.1",
|
|
27
27
|
"@typescript-eslint/parser": "^8.16.0",
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"typescript-eslint": "^8.16.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@fontsource/roboto": "^5.0.12",
|
|
36
35
|
"@emotion/react": "^11.14.0",
|
|
37
36
|
"@emotion/styled": "^11.14.0",
|
|
38
37
|
"@fastify/compress": "^8.0.1",
|
|
@@ -40,6 +39,7 @@
|
|
|
40
39
|
"@fastify/response-validation": "^3.0.2",
|
|
41
40
|
"@fastify/sensible": "^6.0.1",
|
|
42
41
|
"@fastify/static": "^8.0.3",
|
|
42
|
+
"@fontsource/roboto": "^5.0.12",
|
|
43
43
|
"@mui/icons-material": "^6.3.0",
|
|
44
44
|
"@mui/material": "^6.3.0",
|
|
45
45
|
"@types/react": "^19.0.2",
|
|
@@ -68,4 +68,4 @@
|
|
|
68
68
|
"zod": "^3.23.8",
|
|
69
69
|
"zod-to-json-schema": "^3.23.5"
|
|
70
70
|
}
|
|
71
|
-
}
|
|
71
|
+
}
|