Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@
},
"dependencies": {
"@bitauth/libauth": "^1.17.1",
"axios": "^1.7.4",
"lodash": "^4.17.21",
"path-to-regexp": "^6.2.1",
"pino": "8.11.0",
"pino-pretty": "10.2.0",
"axios": "^1.13.5",
"lodash": "^4.17.23",
"path-to-regexp": "^6.3.0",
"pino": "^8.21.0",
"pino-pretty": "^10.3.1",
"require-in-the-middle": "^5.1.0",
"url-parse": "^1.5.10"
},
Expand Down
14 changes: 11 additions & 3 deletions src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,19 @@ export function prettyConsoleLog(label: string, data: any) {

export class LoggerFactory {
static createLogger(config: IPermitConfig): pino.Logger {
return pino({
const options: pino.LoggerOptions = {
level: config.log.level,
prettyPrint: config.log.json ? { levelFirst: true } : false,
base: { label: config.log.label },
timestamp: pino.stdTimeFunctions.isoTime,
});
};

if (!config.log.json) {
return pino(
options,
pino.transport({ target: 'pino-pretty', options: { levelFirst: true } }),
);
}

return pino(options);
}
}
6 changes: 6 additions & 0 deletions src/openapi/types/role-create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ export interface RoleCreate {
* @memberof RoleCreate
*/
attributes?: object;
/**
* list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list.
* @type {Array<string>}
* @memberof RoleCreate
*/
extends?: Array<string>;
/**
*
* @type {GrantedTo1}
Expand Down
6 changes: 6 additions & 0 deletions src/openapi/types/role-read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ export interface RoleRead {
* @memberof RoleRead
*/
attributes?: object;
/**
* list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list.
* @type {Array<string>}
* @memberof RoleRead
*/
extends?: Array<string>;
/**
*
* @type {GrantedTo}
Expand Down
6 changes: 6 additions & 0 deletions src/openapi/types/role-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ export interface RoleUpdate {
* @memberof RoleUpdate
*/
attributes?: object;
/**
* list of role keys that define what roles this role extends. In other words: this role will automatically inherit all the permissions of the given roles in this list.
* @type {Array<string>}
* @memberof RoleUpdate
*/
extends?: Array<string>;
/**
*
* @type {GrantedTo1}
Expand Down
Loading