@alwatr/nitrobase-user-management 8.0.0 → 9.1.0
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/LICENSE +373 -661
- package/README.md +0 -6
- package/dist/logger.d.ts.map +1 -1
- package/dist/main.js +5 -0
- package/dist/main.js.map +11 -0
- package/dist/user-management.d.ts +1 -1
- package/dist/user-management.d.ts.map +1 -1
- package/package.json +65 -63
- package/src/logger.ts +4 -0
- package/src/main.ts +1 -0
- package/src/user-management.ts +248 -0
- package/CHANGELOG.md +0 -56
- package/dist/main.cjs +0 -181
- package/dist/main.cjs.map +0 -7
- package/dist/main.mjs +0 -155
- package/dist/main.mjs.map +0 -7
package/README.md
CHANGED
|
@@ -93,9 +93,3 @@ console.log('User directory:', userDir);
|
|
|
93
93
|
## Contributing
|
|
94
94
|
|
|
95
95
|
Contributions are welcome! Please read our [contribution guidelines](https://github.com/Alwatr/.github/blob/next/CONTRIBUTING.md) before submitting a pull request.
|
|
96
|
-
|
|
97
|
-
## License
|
|
98
|
-
|
|
99
|
-
This project is licensed under the [AGPL-3.0 License](LICENSE).
|
|
100
|
-
|
|
101
|
-
```
|
package/dist/logger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,uCAAiD,CAAC"}
|
package/dist/main.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/* 📦 @alwatr/nitrobase-user-management v9.1.0 */
|
|
2
|
+
import{dirname as O,resolve as A}from"node:path";import{createLogger as Q}from"@alwatr/logger";import{Region as J}from"@alwatr/nitrobase-types";import{existsSync as V,makeEmptyFile as K}from"@alwatr/node-fs";import{createLogger as L}from"@alwatr/logger";var H=L("@alwatr/nitrobase-user-management");class B{nitrobase_;static nitrobaseIds={userList:{name:"user-list",region:J.Managers,schemaVer:1},userInfo:{name:"user-info",region:J.PerUser}};static async initialize(_){H.logMethod?.("NitrobaseUserManagement.initialize"),_.newCollection(this.nitrobaseIds.userList)}logger_=Q("user-management");userListCollection_;constructor(_){this.nitrobase_=_;this.logger_.logMethod?.("constructor"),this.userListCollection_=this.nitrobase_.openCollection(B.nitrobaseIds.userList)}async newUser(_){this.logger_.logMethodArgs?.("newUser",_),(await this.userListCollection_).addItem(_.userId,{}),this.newUserInfoDocument_(_.userId,_.data),await this.makeTokenFile_(_.userId,_.userToken,_.isManager)}async hasUser(_){let q=(await this.userListCollection_).hasItem(_);return this.logger_.logMethodFull?.("hasUser",{userId:_},q),q}async getUserData(_){return this.logger_.logMethodArgs?.("getUserData",_),(await this.openUserInfoDocument_(_)).getData()}async getUserMeta(_){return this.logger_.logMethodArgs?.("getUserMeta",_),(await this.openUserInfoDocument_(_)).getStoreMeta()}save(_){this.logger_.logMethodArgs?.("save",_),this.openUserInfoDocument_(_).then((q)=>{q.save()})}saveImmediate(_){this.logger_.logMethodArgs?.("saveImmediate",_),this.openUserInfoDocument_(_).then((q)=>{q.saveImmediate()})}async userIds(){return(await this.userListCollection_).ids()}async verifyUserToken(_,q){let z=V(await this.getUserTokenFilePath_(_,q));return this.logger_.logMethodFull?.("verifyUserToken",{userId:_,token:q.slice(0,12)+"..."},z),z}async getUserDirectory(_){let q=await this.openUserInfoDocument_(_),z=O(A(this.nitrobase_.config.rootPath,q.path));return this.logger_.logMethodFull?.("getUserDirectory",{userId:_},z),z}newUserInfoDocument_(_,q){this.logger_.logMethodArgs?.("newUserInfoDocument",{userId:_,userInfo:q});let z={...B.nitrobaseIds.userInfo,ownerId:_};if(this.nitrobase_.hasStore(z)){this.logger_.accident?.("newUserInfoDocument_","store_already_exists",z);return}this.nitrobase_.newDocument(z,q)}openUserInfoDocument_(_){return this.logger_.logMethodArgs?.("openUserInfoDocument_",_),this.nitrobase_.openDocument({...B.nitrobaseIds.userInfo,ownerId:_})}async makeTokenFile_(_,q,z){this.logger_.logMethodArgs?.("makeTokenFile",{userId:_,token:q.slice(0,12)+"...",isManager:z});let C=await this.getUserDirectory(_);if(await K(A(C,`.token/${q}.asn`)),z===!0)await K(A(C,".auth/manager.asn"))}async getUserTokenFilePath_(_,q){let z=A(await this.getUserDirectory(_),`.token/${q}.asn`);return this.logger_.logMethodFull?.("getTokenFilePath",{userId:_,token:q.slice(0,12)+"..."},z),z}}export{B as NitrobaseUserManagement};
|
|
3
|
+
|
|
4
|
+
//# debugId=503C03B8A55F958F64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/user-management.ts", "../src/logger.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import {dirname, resolve} from 'node:path';\n\nimport {createLogger} from '@alwatr/logger';\nimport {Region, type AlwatrAuth, type StoreFileId, type StoreFileMeta} from '@alwatr/nitrobase-types';\nimport {existsSync, makeEmptyFile} from '@alwatr/node-fs';\n\nimport {logger} from './logger.js';\n\nimport type {AlwatrNitrobase} from '@alwatr/nitrobase-engine';\nimport type {DocumentReference} from '@alwatr/nitrobase-reference';\n\n/**\n * New user data type.\n */\nexport type NewUser<TUser extends JsonObject> = AlwatrAuth & {\n data: TUser;\n isManager?: true;\n};\n\n/**\n * Nitrobase User Management Interface.\n */\ninterface NitrobaseUserManagementInterface<TUser extends JsonObject> {\n /**\n * Create a new user.\n * @param user The new user data.\n */\n newUser(user: NewUser<TUser>): Promise<void>;\n\n /**\n * Check if a user exists.\n * @param userId The user ID.\n * @returns True if the user exists, false otherwise.\n */\n hasUser(userId: string): Promise<boolean>;\n\n /**\n * Get user data.\n * @param userId The user ID.\n * @returns The user data.\n */\n getUserData(userId: string): Promise<TUser>;\n\n /**\n * Get user meta data.\n * @param userId The user ID.\n * @returns The user meta data.\n */\n getUserMeta(userId: string): Promise<Readonly<StoreFileMeta>>;\n\n /**\n * Verify user token.\n * @param userId The user ID.\n * @param token The user token.\n * @returns True if the token is valid, false otherwise.\n */\n verifyUserToken(userId: string, token: string): Promise<boolean>;\n\n /**\n * Save user data to storage.\n * @param userId The user ID.\n */\n save(userId: string): void;\n\n /**\n * Immediately save user data to storage.\n * @param userId The user ID.\n */\n saveImmediate(userId: string): void;\n\n /**\n * Get all user IDs.\n * @returns An async generator of user IDs.\n */\n userIds(): Promise<Generator<string, void, void>>;\n\n /**\n * Get the user directory path.\n * @param userId The user ID.\n * @returns The user directory path.\n */\n getUserDirectory(userId: string): Promise<string>;\n}\n\n/**\n * Nitrobase User Management Class.\n * Manages user data and authentication.\n */\nexport class NitrobaseUserManagement<TUser extends JsonObject> implements NitrobaseUserManagementInterface<TUser> {\n /**\n * Default Nitrobase store IDs used by this class.\n */\n public static readonly nitrobaseIds = {\n userList: {\n name: 'user-list',\n region: Region.Managers,\n schemaVer: 1,\n } as Readonly<StoreFileId>,\n\n userInfo: {\n name: 'user-info',\n region: Region.PerUser,\n } as Readonly<StoreFileId>,\n } as const;\n\n /**\n * Initialize the user management module.\n * @param nitrobase The Nitrobase instance.\n */\n public static async initialize(nitrobase: AlwatrNitrobase): Promise<void> {\n logger.logMethod?.('NitrobaseUserManagement.initialize');\n nitrobase.newCollection(this.nitrobaseIds.userList);\n }\n\n protected logger_ = createLogger('user-management');\n\n protected userListCollection_;\n\n /**\n * Create a new instance of NitrobaseUserManagement.\n * @param nitrobase_ The Nitrobase instance.\n */\n constructor(protected readonly nitrobase_: AlwatrNitrobase) {\n this.logger_.logMethod?.('constructor');\n this.userListCollection_ = this.nitrobase_.openCollection(NitrobaseUserManagement.nitrobaseIds.userList);\n }\n\n // Implementation of NitrobaseUserManagementInterface methods with JSDoc comments\n\n public async newUser(user: NewUser<TUser>): Promise<void> {\n this.logger_.logMethodArgs?.('newUser', user);\n\n (await this.userListCollection_).addItem(user.userId, {});\n\n this.newUserInfoDocument_(user.userId, user.data);\n\n await this.makeTokenFile_(user.userId, user.userToken, user.isManager);\n }\n\n public async hasUser(userId: string): Promise<boolean> {\n const userExists = (await this.userListCollection_).hasItem(userId);\n this.logger_.logMethodFull?.('hasUser', {userId}, userExists);\n return userExists;\n }\n\n public async getUserData(userId: string): Promise<TUser> {\n this.logger_.logMethodArgs?.('getUserData', userId);\n const userInfoDocument = await this.openUserInfoDocument_(userId);\n return userInfoDocument.getData();\n }\n\n public async getUserMeta(userId: string): Promise<Readonly<StoreFileMeta>> {\n this.logger_.logMethodArgs?.('getUserMeta', userId);\n const document = await this.openUserInfoDocument_(userId);\n return document.getStoreMeta();\n }\n\n public save(userId: string): void {\n this.logger_.logMethodArgs?.('save', userId);\n this.openUserInfoDocument_(userId).then((document) => {\n document.save();\n });\n }\n\n public saveImmediate(userId: string): void {\n this.logger_.logMethodArgs?.('saveImmediate', userId);\n this.openUserInfoDocument_(userId).then((document) => {\n document.saveImmediate();\n });\n }\n\n public async userIds(): Promise<Generator<string, void, void>> {\n return (await this.userListCollection_).ids();\n }\n\n public async verifyUserToken(userId: string, token: string): Promise<boolean> {\n const tokenFileExist = existsSync(await this.getUserTokenFilePath_(userId, token));\n this.logger_.logMethodFull?.('verifyUserToken', {userId, token: token.slice(0, 12) + '...'}, tokenFileExist);\n return tokenFileExist;\n }\n\n public async getUserDirectory(userId: string): Promise<string> {\n const userInfoDocument = await this.openUserInfoDocument_(userId);\n const userDirectoryPath = dirname(resolve(this.nitrobase_.config.rootPath, userInfoDocument.path));\n this.logger_.logMethodFull?.('getUserDirectory', {userId}, userDirectoryPath);\n return userDirectoryPath;\n }\n\n /**\n * Create a new user info document.\n * @param userId The user ID.\n * @param userInfo The user info data.\n */\n protected newUserInfoDocument_(userId: string, userInfo: TUser): void {\n this.logger_.logMethodArgs?.('newUserInfoDocument', {userId, userInfo});\n const storeId: StoreFileId = {\n ...NitrobaseUserManagement.nitrobaseIds.userInfo,\n ownerId: userId,\n };\n if (this.nitrobase_.hasStore(storeId)) {\n this.logger_.accident?.('newUserInfoDocument_', 'store_already_exists', storeId);\n return;\n }\n this.nitrobase_.newDocument<TUser>(storeId, userInfo);\n }\n\n /**\n * Open the user info document.\n * @param userId The user ID.\n * @returns A promise resolving to the user info document.\n */\n protected openUserInfoDocument_(userId: string): Promise<DocumentReference<TUser>> {\n this.logger_.logMethodArgs?.('openUserInfoDocument_', userId);\n return this.nitrobase_.openDocument<TUser>({\n ...NitrobaseUserManagement.nitrobaseIds.userInfo,\n ownerId: userId,\n });\n }\n\n /**\n * Create a token file for the user.\n * @param userId The user ID.\n * @param token The user token.\n * @param isManager Whether the user is a manager.\n */\n protected async makeTokenFile_(userId: string, token: string, isManager?: true): Promise<void> {\n this.logger_.logMethodArgs?.('makeTokenFile', {userId, token: token.slice(0, 12) + '...', isManager});\n const userDirectory = await this.getUserDirectory(userId);\n\n await makeEmptyFile(resolve(userDirectory, `.token/${token}.asn`));\n\n if (isManager === true) {\n await makeEmptyFile(resolve(userDirectory, '.auth/manager.asn'));\n }\n }\n\n /**\n * Get the path to the user token file.\n * @param userId The user ID.\n * @param token The user token.\n * @returns The path to the user token file.\n */\n protected async getUserTokenFilePath_(userId: string, token: string): Promise<string> {\n const userTokenFilePath = resolve(await this.getUserDirectory(userId), `.token/${token}.asn`);\n this.logger_.logMethodFull?.('getTokenFilePath', {userId, token: token.slice(0, 12) + '...'}, userTokenFilePath);\n return userTokenFilePath;\n }\n}\n",
|
|
6
|
+
"import {createLogger} from '@alwatr/logger';\n\n\nexport const logger = /* #__PURE__ */ createLogger(__package_name__);\n"
|
|
7
|
+
],
|
|
8
|
+
"mappings": ";AAAA,kBAAQ,aAAS,kBAEjB,uBAAQ,uBACR,iBAAQ,gCACR,qBAAQ,mBAAY,wBCJpB,uBAAQ,uBAGD,IAAM,EAAyB,EAAa,mCAAgB,EDqF5D,MAAM,CAAqG,CAkCjF,iBA9BR,cAAe,CACpC,SAAU,CAC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,mBAAmB,CAAC,OAUnD,sBAAqB,CAAC,EAAgB,EAAgC,CACpF,IAAM,EAAoB,EAAQ,MAAM,KAAK,iBAAiB,CAAM,EAAG,UAAU,OAAW,EAE5F,OADA,KAAK,QAAQ,gBAAgB,mBAAoB,CAAC,SAAQ,MAAO,EAAM,MAAM,EAAG,EAAE,EAAI,KAAK,EAAG,CAAiB,EACxG,EAEX",
|
|
9
|
+
"debugId": "503C03B8A55F958F64756E2164756E21",
|
|
10
|
+
"names": []
|
|
11
|
+
}
|
|
@@ -83,7 +83,7 @@ export declare class NitrobaseUserManagement<TUser extends JsonObject> implement
|
|
|
83
83
|
*/
|
|
84
84
|
static initialize(nitrobase: AlwatrNitrobase): Promise<void>;
|
|
85
85
|
protected logger_: import("@alwatr/logger").AlwatrLogger;
|
|
86
|
-
protected userListCollection_: Promise<import("@alwatr/nitrobase-reference").CollectionReference<
|
|
86
|
+
protected userListCollection_: Promise<import("@alwatr/nitrobase-reference").CollectionReference<JsonObject>>;
|
|
87
87
|
/**
|
|
88
88
|
* Create a new instance of NitrobaseUserManagement.
|
|
89
89
|
* @param nitrobase_ The Nitrobase instance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-management.d.ts","sourceRoot":"","sources":["../src/user-management.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user-management.d.ts","sourceRoot":"","sources":["../src/user-management.ts"],"names":[],"mappings":"AAGA,OAAO,EAAS,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAKtG,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,UAAU,IAAI,UAAU,GAAG;IAC3D,IAAI,EAAE,KAAK,CAAC;IACZ,SAAS,CAAC,EAAE,I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AAC,MAAM,CAAC;CAKtF"}
|
package/package.json
CHANGED
|
@@ -1,79 +1,81 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwatr/nitrobase-user-management",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"description": "",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"user",
|
|
8
|
-
"user-management",
|
|
9
|
-
"database",
|
|
10
|
-
"storage",
|
|
11
|
-
"json",
|
|
12
|
-
"nosql",
|
|
13
|
-
"no-sql",
|
|
14
|
-
"data",
|
|
15
|
-
"data-storage",
|
|
16
|
-
"file",
|
|
17
|
-
"typescript",
|
|
18
|
-
"esm",
|
|
19
|
-
"alwatr"
|
|
20
|
-
],
|
|
5
|
+
"license": "MPL-2.0",
|
|
6
|
+
"author": "S. Ali Mihandoost <ali.mihandoost@gmail.com> (https://ali.mihandoost.com)",
|
|
21
7
|
"type": "module",
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/Alwatr/alwatr",
|
|
11
|
+
"directory": "pkg/nitrobase-old/user-management"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/Alwatr/alwatr/tree/main/pkg/nitrobase-old/user-management#readme",
|
|
14
|
+
"bugs": "https://github.com/Alwatr/alwatr/issues",
|
|
25
15
|
"exports": {
|
|
26
16
|
".": {
|
|
27
17
|
"types": "./dist/main.d.ts",
|
|
28
|
-
"import": "./dist/main.
|
|
29
|
-
"
|
|
18
|
+
"import": "./dist/main.js",
|
|
19
|
+
"default": "./dist/main.js"
|
|
30
20
|
}
|
|
31
21
|
},
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
"repository": {
|
|
41
|
-
"type": "git",
|
|
42
|
-
"url": "https://github.com/Alwatr/nitrobase",
|
|
43
|
-
"directory": "packages/user-management"
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@alwatr/logger": "9.1.0",
|
|
25
|
+
"@alwatr/nitrobase-engine": "^9.1.0",
|
|
26
|
+
"@alwatr/nitrobase-reference": "^9.1.0",
|
|
27
|
+
"@alwatr/nitrobase-types": "^9.1.0",
|
|
28
|
+
"@alwatr/node-fs": "9.1.0",
|
|
29
|
+
"@alwatr/type-helper": "9.1.0"
|
|
44
30
|
},
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
"
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@alwatr/nano-build": "9.1.0",
|
|
33
|
+
"@alwatr/tsconfig-base": "9.1.0",
|
|
34
|
+
"@alwatr/type-helper": "workspace:*",
|
|
35
|
+
"@types/node": "^25.5.0",
|
|
36
|
+
"typescript": "^6.0.2"
|
|
48
37
|
},
|
|
49
|
-
"prettier": "@alwatr/prettier-config",
|
|
50
38
|
"scripts": {
|
|
51
|
-
"b": "
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"cb": "yarn run clean && yarn run build",
|
|
55
|
-
"d": "yarn run build:es && yarn node",
|
|
56
|
-
"build": "yarn run build:ts & yarn run build:es",
|
|
57
|
-
"build:es": "nano-build --preset=module",
|
|
39
|
+
"b": "bun run build",
|
|
40
|
+
"build": "bun run build:ts && bun run build:es",
|
|
41
|
+
"build:es": "nano-build --preset=module src/main.ts",
|
|
58
42
|
"build:ts": "tsc --build",
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
43
|
+
"cl": "bun run clean",
|
|
44
|
+
"clean": "rm -rfv dist *.tsbuildinfo",
|
|
45
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
46
|
+
"lint": "eslint src/ --ext .ts",
|
|
47
|
+
"t": "bun run test",
|
|
48
|
+
"test": "ALWATR_DEBUG=0 bun test",
|
|
49
|
+
"w": "bun run watch",
|
|
50
|
+
"watch": "bun run watch:ts & bun run watch:es",
|
|
51
|
+
"watch:es": "bun run build:es --watch",
|
|
52
|
+
"watch:ts": "bun run build:ts --watch --preserveWatchOutput"
|
|
69
53
|
},
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
|
|
54
|
+
"files": [
|
|
55
|
+
"dist",
|
|
56
|
+
"src/**/*.ts",
|
|
57
|
+
"!src/**/*.test.ts",
|
|
58
|
+
"README.md",
|
|
59
|
+
"LICENSE"
|
|
60
|
+
],
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public"
|
|
77
63
|
},
|
|
78
|
-
"
|
|
64
|
+
"keywords": [
|
|
65
|
+
"alwatr",
|
|
66
|
+
"data",
|
|
67
|
+
"data-storage",
|
|
68
|
+
"database",
|
|
69
|
+
"esm",
|
|
70
|
+
"file",
|
|
71
|
+
"json",
|
|
72
|
+
"no-sql",
|
|
73
|
+
"nosql",
|
|
74
|
+
"storage",
|
|
75
|
+
"typescript",
|
|
76
|
+
"user",
|
|
77
|
+
"user-management"
|
|
78
|
+
],
|
|
79
|
+
"prettier": "@alwatr/nanolib/prettier-config",
|
|
80
|
+
"gitHead": "4a25cd3e0499cf61dd761e87d3711abf9b0cd208"
|
|
79
81
|
}
|
package/src/logger.ts
ADDED
package/src/main.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './user-management.js';
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import {dirname, resolve} from 'node:path';
|
|
2
|
+
|
|
3
|
+
import {createLogger} from '@alwatr/logger';
|
|
4
|
+
import {Region, type AlwatrAuth, type StoreFileId, type StoreFileMeta} from '@alwatr/nitrobase-types';
|
|
5
|
+
import {existsSync, makeEmptyFile} from '@alwatr/node-fs';
|
|
6
|
+
|
|
7
|
+
import {logger} from './logger.js';
|
|
8
|
+
|
|
9
|
+
import type {AlwatrNitrobase} from '@alwatr/nitrobase-engine';
|
|
10
|
+
import type {DocumentReference} from '@alwatr/nitrobase-reference';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* New user data type.
|
|
14
|
+
*/
|
|
15
|
+
export type NewUser<TUser extends JsonObject> = AlwatrAuth & {
|
|
16
|
+
data: TUser;
|
|
17
|
+
isManager?: true;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Nitrobase User Management Interface.
|
|
22
|
+
*/
|
|
23
|
+
interface NitrobaseUserManagementInterface<TUser extends JsonObject> {
|
|
24
|
+
/**
|
|
25
|
+
* Create a new user.
|
|
26
|
+
* @param user The new user data.
|
|
27
|
+
*/
|
|
28
|
+
newUser(user: NewUser<TUser>): Promise<void>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a user exists.
|
|
32
|
+
* @param userId The user ID.
|
|
33
|
+
* @returns True if the user exists, false otherwise.
|
|
34
|
+
*/
|
|
35
|
+
hasUser(userId: string): Promise<boolean>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Get user data.
|
|
39
|
+
* @param userId The user ID.
|
|
40
|
+
* @returns The user data.
|
|
41
|
+
*/
|
|
42
|
+
getUserData(userId: string): Promise<TUser>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Get user meta data.
|
|
46
|
+
* @param userId The user ID.
|
|
47
|
+
* @returns The user meta data.
|
|
48
|
+
*/
|
|
49
|
+
getUserMeta(userId: string): Promise<Readonly<StoreFileMeta>>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Verify user token.
|
|
53
|
+
* @param userId The user ID.
|
|
54
|
+
* @param token The user token.
|
|
55
|
+
* @returns True if the token is valid, false otherwise.
|
|
56
|
+
*/
|
|
57
|
+
verifyUserToken(userId: string, token: string): Promise<boolean>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Save user data to storage.
|
|
61
|
+
* @param userId The user ID.
|
|
62
|
+
*/
|
|
63
|
+
save(userId: string): void;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Immediately save user data to storage.
|
|
67
|
+
* @param userId The user ID.
|
|
68
|
+
*/
|
|
69
|
+
saveImmediate(userId: string): void;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Get all user IDs.
|
|
73
|
+
* @returns An async generator of user IDs.
|
|
74
|
+
*/
|
|
75
|
+
userIds(): Promise<Generator<string, void, void>>;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Get the user directory path.
|
|
79
|
+
* @param userId The user ID.
|
|
80
|
+
* @returns The user directory path.
|
|
81
|
+
*/
|
|
82
|
+
getUserDirectory(userId: string): Promise<string>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Nitrobase User Management Class.
|
|
87
|
+
* Manages user data and authentication.
|
|
88
|
+
*/
|
|
89
|
+
export class NitrobaseUserManagement<TUser extends JsonObject> implements NitrobaseUserManagementInterface<TUser> {
|
|
90
|
+
/**
|
|
91
|
+
* Default Nitrobase store IDs used by this class.
|
|
92
|
+
*/
|
|
93
|
+
public static readonly nitrobaseIds = {
|
|
94
|
+
userList: {
|
|
95
|
+
name: 'user-list',
|
|
96
|
+
region: Region.Managers,
|
|
97
|
+
schemaVer: 1,
|
|
98
|
+
} as Readonly<StoreFileId>,
|
|
99
|
+
|
|
100
|
+
userInfo: {
|
|
101
|
+
name: 'user-info',
|
|
102
|
+
region: Region.PerUser,
|
|
103
|
+
} as Readonly<StoreFileId>,
|
|
104
|
+
} as const;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Initialize the user management module.
|
|
108
|
+
* @param nitrobase The Nitrobase instance.
|
|
109
|
+
*/
|
|
110
|
+
public static async initialize(nitrobase: AlwatrNitrobase): Promise<void> {
|
|
111
|
+
logger.logMethod?.('NitrobaseUserManagement.initialize');
|
|
112
|
+
nitrobase.newCollection(this.nitrobaseIds.userList);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
protected logger_ = createLogger('user-management');
|
|
116
|
+
|
|
117
|
+
protected userListCollection_;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Create a new instance of NitrobaseUserManagement.
|
|
121
|
+
* @param nitrobase_ The Nitrobase instance.
|
|
122
|
+
*/
|
|
123
|
+
constructor(protected readonly nitrobase_: AlwatrNitrobase) {
|
|
124
|
+
this.logger_.logMethod?.('constructor');
|
|
125
|
+
this.userListCollection_ = this.nitrobase_.openCollection(NitrobaseUserManagement.nitrobaseIds.userList);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Implementation of NitrobaseUserManagementInterface methods with JSDoc comments
|
|
129
|
+
|
|
130
|
+
public async newUser(user: NewUser<TUser>): Promise<void> {
|
|
131
|
+
this.logger_.logMethodArgs?.('newUser', user);
|
|
132
|
+
|
|
133
|
+
(await this.userListCollection_).addItem(user.userId, {});
|
|
134
|
+
|
|
135
|
+
this.newUserInfoDocument_(user.userId, user.data);
|
|
136
|
+
|
|
137
|
+
await this.makeTokenFile_(user.userId, user.userToken, user.isManager);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
public async hasUser(userId: string): Promise<boolean> {
|
|
141
|
+
const userExists = (await this.userListCollection_).hasItem(userId);
|
|
142
|
+
this.logger_.logMethodFull?.('hasUser', {userId}, userExists);
|
|
143
|
+
return userExists;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
public async getUserData(userId: string): Promise<TUser> {
|
|
147
|
+
this.logger_.logMethodArgs?.('getUserData', userId);
|
|
148
|
+
const userInfoDocument = await this.openUserInfoDocument_(userId);
|
|
149
|
+
return userInfoDocument.getData();
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
public async getUserMeta(userId: string): Promise<Readonly<StoreFileMeta>> {
|
|
153
|
+
this.logger_.logMethodArgs?.('getUserMeta', userId);
|
|
154
|
+
const document = await this.openUserInfoDocument_(userId);
|
|
155
|
+
return document.getStoreMeta();
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
public save(userId: string): void {
|
|
159
|
+
this.logger_.logMethodArgs?.('save', userId);
|
|
160
|
+
this.openUserInfoDocument_(userId).then((document) => {
|
|
161
|
+
document.save();
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
public saveImmediate(userId: string): void {
|
|
166
|
+
this.logger_.logMethodArgs?.('saveImmediate', userId);
|
|
167
|
+
this.openUserInfoDocument_(userId).then((document) => {
|
|
168
|
+
document.saveImmediate();
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
public async userIds(): Promise<Generator<string, void, void>> {
|
|
173
|
+
return (await this.userListCollection_).ids();
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
public async verifyUserToken(userId: string, token: string): Promise<boolean> {
|
|
177
|
+
const tokenFileExist = existsSync(await this.getUserTokenFilePath_(userId, token));
|
|
178
|
+
this.logger_.logMethodFull?.('verifyUserToken', {userId, token: token.slice(0, 12) + '...'}, tokenFileExist);
|
|
179
|
+
return tokenFileExist;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
public async getUserDirectory(userId: string): Promise<string> {
|
|
183
|
+
const userInfoDocument = await this.openUserInfoDocument_(userId);
|
|
184
|
+
const userDirectoryPath = dirname(resolve(this.nitrobase_.config.rootPath, userInfoDocument.path));
|
|
185
|
+
this.logger_.logMethodFull?.('getUserDirectory', {userId}, userDirectoryPath);
|
|
186
|
+
return userDirectoryPath;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Create a new user info document.
|
|
191
|
+
* @param userId The user ID.
|
|
192
|
+
* @param userInfo The user info data.
|
|
193
|
+
*/
|
|
194
|
+
protected newUserInfoDocument_(userId: string, userInfo: TUser): void {
|
|
195
|
+
this.logger_.logMethodArgs?.('newUserInfoDocument', {userId, userInfo});
|
|
196
|
+
const storeId: StoreFileId = {
|
|
197
|
+
...NitrobaseUserManagement.nitrobaseIds.userInfo,
|
|
198
|
+
ownerId: userId,
|
|
199
|
+
};
|
|
200
|
+
if (this.nitrobase_.hasStore(storeId)) {
|
|
201
|
+
this.logger_.accident?.('newUserInfoDocument_', 'store_already_exists', storeId);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
this.nitrobase_.newDocument<TUser>(storeId, userInfo);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Open the user info document.
|
|
209
|
+
* @param userId The user ID.
|
|
210
|
+
* @returns A promise resolving to the user info document.
|
|
211
|
+
*/
|
|
212
|
+
protected openUserInfoDocument_(userId: string): Promise<DocumentReference<TUser>> {
|
|
213
|
+
this.logger_.logMethodArgs?.('openUserInfoDocument_', userId);
|
|
214
|
+
return this.nitrobase_.openDocument<TUser>({
|
|
215
|
+
...NitrobaseUserManagement.nitrobaseIds.userInfo,
|
|
216
|
+
ownerId: userId,
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Create a token file for the user.
|
|
222
|
+
* @param userId The user ID.
|
|
223
|
+
* @param token The user token.
|
|
224
|
+
* @param isManager Whether the user is a manager.
|
|
225
|
+
*/
|
|
226
|
+
protected async makeTokenFile_(userId: string, token: string, isManager?: true): Promise<void> {
|
|
227
|
+
this.logger_.logMethodArgs?.('makeTokenFile', {userId, token: token.slice(0, 12) + '...', isManager});
|
|
228
|
+
const userDirectory = await this.getUserDirectory(userId);
|
|
229
|
+
|
|
230
|
+
await makeEmptyFile(resolve(userDirectory, `.token/${token}.asn`));
|
|
231
|
+
|
|
232
|
+
if (isManager === true) {
|
|
233
|
+
await makeEmptyFile(resolve(userDirectory, '.auth/manager.asn'));
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Get the path to the user token file.
|
|
239
|
+
* @param userId The user ID.
|
|
240
|
+
* @param token The user token.
|
|
241
|
+
* @returns The path to the user token file.
|
|
242
|
+
*/
|
|
243
|
+
protected async getUserTokenFilePath_(userId: string, token: string): Promise<string> {
|
|
244
|
+
const userTokenFilePath = resolve(await this.getUserDirectory(userId), `.token/${token}.asn`);
|
|
245
|
+
this.logger_.logMethodFull?.('getTokenFilePath', {userId, token: token.slice(0, 12) + '...'}, userTokenFilePath);
|
|
246
|
+
return userTokenFilePath;
|
|
247
|
+
}
|
|
248
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [8.0.0](https://github.com/Alwatr/nitrobase/compare/v7.5.9...v8.0.0) (2025-02-24)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @alwatr/nitrobase-user-management
|
|
9
|
-
|
|
10
|
-
## [7.5.8](https://github.com/Alwatr/nitrobase/compare/v7.5.7...v7.5.8) (2025-02-18)
|
|
11
|
-
|
|
12
|
-
### Dependencies update
|
|
13
|
-
|
|
14
|
-
* bump @alwatr/nanolib, @alwatr/nano-build, and @types/node to latest versions across multiple packages ([3e89c62](https://github.com/Alwatr/nitrobase/commit/3e89c62ad20f3afe0c38c6ae36d91bcb6199b231)) by @
|
|
15
|
-
* **deps-dev:** bump the dependencies group across 1 directory with 2 updates ([03715d0](https://github.com/Alwatr/nitrobase/commit/03715d0b5534b127dfb57ffe0ea713fb168eefe6)) by @dependabot[bot]
|
|
16
|
-
|
|
17
|
-
## [7.5.7](https://github.com/Alwatr/nitrobase/compare/v7.5.6...v7.5.7) (2025-02-03)
|
|
18
|
-
|
|
19
|
-
### Dependencies update
|
|
20
|
-
|
|
21
|
-
* update [@alwatr](https://github.com/alwatr) dependencies to latest versions ([f8bb10f](https://github.com/Alwatr/nitrobase/commit/f8bb10fa3343f25e2a442e80fbddb88c55fac813)) by @
|
|
22
|
-
|
|
23
|
-
## [7.5.6](https://github.com/Alwatr/nitrobase/compare/v7.5.5...v7.5.6) (2025-02-03)
|
|
24
|
-
|
|
25
|
-
**Note:** Version bump only for package @alwatr/nitrobase-user-management
|
|
26
|
-
|
|
27
|
-
## [7.5.5](https://github.com/Alwatr/nitrobase/compare/v7.5.4...v7.5.5) (2025-02-02)
|
|
28
|
-
|
|
29
|
-
### Dependencies update
|
|
30
|
-
|
|
31
|
-
* **deps-dev:** bump @types/node ([d60ee96](https://github.com/Alwatr/nitrobase/commit/d60ee96716b8df7837b3d7f9fe4b8705c94e5af0)) by @dependabot[bot]
|
|
32
|
-
* update ([0b9eccd](https://github.com/Alwatr/nitrobase/commit/0b9eccd3b54dade17e3eeb94bd08612c57356801)) by @alimd
|
|
33
|
-
|
|
34
|
-
## [7.5.4](https://github.com/Alwatr/nitrobase/compare/v7.5.3...v7.5.4) (2025-01-12)
|
|
35
|
-
|
|
36
|
-
### Dependencies update
|
|
37
|
-
|
|
38
|
-
* **deps-dev:** bump the dependencies group across 1 directory with 11 updates ([fdd30a6](https://github.com/Alwatr/nitrobase/commit/fdd30a6639ae7ead4e8dbfaca0295cb2bf0e6649)) by @dependabot[bot]
|
|
39
|
-
|
|
40
|
-
## [7.5.0](https://github.com/Alwatr/nitrobase/compare/v7.4.1...v7.5.0) (2024-11-09)
|
|
41
|
-
|
|
42
|
-
### Features
|
|
43
|
-
|
|
44
|
-
* add `user-management` package ([dd0037c](https://github.com/Alwatr/nitrobase/commit/dd0037c9443459520c41f17adbac579069821f95)) by @mohammadhonarvar
|
|
45
|
-
* **user-manaement:** add the initial sturcture ([2897b2c](https://github.com/Alwatr/nitrobase/commit/2897b2c43ce65f5683078fc51022ea3d5cf952af)) by @mohammadhonarvar
|
|
46
|
-
|
|
47
|
-
### Bug Fixes
|
|
48
|
-
|
|
49
|
-
* **user-management:** complete codes & types ([838bfd2](https://github.com/Alwatr/nitrobase/commit/838bfd2ca19fb0443beb68903b60cd8aa9c2f791)) by @mohammadhonarvar
|
|
50
|
-
* **user-management:** review's feedback ([77b2796](https://github.com/Alwatr/nitrobase/commit/77b2796095f4ad87895df9de5f559dae07537020)) by @mohammadhonarvar
|
|
51
|
-
* **user-management:** update `directory` & `homepage` ([32f54f6](https://github.com/Alwatr/nitrobase/commit/32f54f681541373ea3fc8c460d711c04b64c7871)) by @mohammadhonarvar
|
|
52
|
-
* **user-management:** update version & name ([1db77da](https://github.com/Alwatr/nitrobase/commit/1db77daa422efe05a1ec4e6156bd6a053bea14ae)) by @mohammadhonarvar
|
|
53
|
-
|
|
54
|
-
### Code Refactoring
|
|
55
|
-
|
|
56
|
-
* **user-management:** remove commented-out code and clean up interface ([f32ac45](https://github.com/Alwatr/nitrobase/commit/f32ac45c14ffe2e5c1b2eb664c1add182a975d1c)) by @AliMD
|