permissions-contractx 1.0.0 → 1.0.1
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/dist/constants/contractx-permissions.constants.d.ts.map +1 -1
- package/dist/constants/contractx-permissions.constants.js +18 -1
- package/dist/constants/contractx-roles.constants.d.ts +3 -3
- package/dist/constants/contractx-roles.constants.d.ts.map +1 -1
- package/dist/constants/contractx-roles.constants.js +1 -2
- package/dist/constants/index.d.ts +2 -1
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +4 -1
- package/dist/services/contractx-authorization.service.d.ts.map +1 -1
- package/dist/services/contractx-authorization.service.js +13 -6
- package/dist/services/contractx-validation.service.d.ts.map +1 -1
- package/dist/services/contractx-validation.service.js +24 -7
- package/dist/services/user-context.service.d.ts +2 -2
- package/dist/services/user-context.service.d.ts.map +1 -1
- package/dist/services/user-context.service.js +20 -27
- package/package.json +12 -335
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractx-permissions.constants.d.ts","sourceRoot":"","sources":["../../src/constants/contractx-permissions.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,oBAAY,uBAAuB;IACjC,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAGD,oBAAY,wBAAwB;IAClC,MAAM,WAAW;IACjB,YAAY,iBAAiB;IAC7B,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAGD,oBAAY,2BAA2B;IACrC,eAAe,oBAAoB;IACnC,mBAAmB,wBAAwB;IAC3C,iBAAiB,sBAAsB;IACvC,mBAAmB,wBAAwB;IAC3C,mBAAmB,wBAAwB;IAC3C,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,KAAK,UAAU;IACf,WAAW,gBAAgB;CAC5B;AAGD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;CAqCpB,CAAC;AAGX,eAAO,MAAM,kBAAkB;;;;;;;CAOrB,CAAC;AAcX,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCxB,CAAC;AAOX,eAAO,MAAM,2BAA2B;;;;;;;;;;CAyE9B,CAAC;AAGX,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;CAw0BvB,CAAC;AAGX,eAAO,MAAM,2BAA2B,UACG,CAAC;AAG5C,eAAO,MAAM,kBAAkB,GAAI,YAAY,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"contractx-permissions.constants.d.ts","sourceRoot":"","sources":["../../src/constants/contractx-permissions.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,oBAAY,uBAAuB;IACjC,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAGD,oBAAY,wBAAwB;IAClC,MAAM,WAAW;IACjB,YAAY,iBAAiB;IAC7B,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAGD,oBAAY,2BAA2B;IACrC,eAAe,oBAAoB;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B,GAAI,WAAW,MAAM,KAAG,MAAM,EAK7D,CAAC;AAGF,MAAM,MAAM,mBAAmB,GAAG,OAAO,2BAA2B,CAAC,MAAM,CAAC,CAAC;AAC7E,MAAM,MAAM,eAAe,GAAG,OAAO,iBAAiB,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AACvF,MAAM,MAAM,yBAAyB,GAAG,OAAO,kBAAkB,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -1026,7 +1026,20 @@ exports.VALID_CONTRACTX_PERMISSIONS = Object.values(exports.CONTRACTX_PERMISSION
|
|
|
1026
1026
|
.flatMap(module => Object.values(module));
|
|
1027
1027
|
// Helper functions for permission validation
|
|
1028
1028
|
const validatePermission = (permission) => {
|
|
1029
|
-
|
|
1029
|
+
// Handle null/undefined
|
|
1030
|
+
if (!permission) {
|
|
1031
|
+
return false;
|
|
1032
|
+
}
|
|
1033
|
+
// Check if it's a predefined permission
|
|
1034
|
+
if (exports.VALID_CONTRACTX_PERMISSIONS.includes(permission)) {
|
|
1035
|
+
return true;
|
|
1036
|
+
}
|
|
1037
|
+
// Check if it's a wildcard permission
|
|
1038
|
+
if (permission.includes(':*')) {
|
|
1039
|
+
const [module] = permission.split(':');
|
|
1040
|
+
return Object.values(exports.CONTRACTX_MODULES).includes(module);
|
|
1041
|
+
}
|
|
1042
|
+
return false;
|
|
1030
1043
|
};
|
|
1031
1044
|
exports.validatePermission = validatePermission;
|
|
1032
1045
|
const getModuleFromPermission = (permission) => {
|
|
@@ -1036,6 +1049,10 @@ const getModuleFromPermission = (permission) => {
|
|
|
1036
1049
|
exports.getModuleFromPermission = getModuleFromPermission;
|
|
1037
1050
|
const getActionFromPermission = (permission) => {
|
|
1038
1051
|
const [, action] = permission.split(':');
|
|
1052
|
+
// Handle wildcard actions
|
|
1053
|
+
if (action === '*') {
|
|
1054
|
+
return '*';
|
|
1055
|
+
}
|
|
1039
1056
|
return Object.values(ContractXPermissionType).includes(action) ? action : null;
|
|
1040
1057
|
};
|
|
1041
1058
|
exports.getActionFromPermission = getActionFromPermission;
|
|
@@ -39,7 +39,7 @@ export declare const CONTRACTX_ROLE_DEFINITIONS: {
|
|
|
39
39
|
readonly description: "Full system access with all permissions";
|
|
40
40
|
readonly type: ContractXRoleType.ADMIN;
|
|
41
41
|
readonly scope: ContractXRoleScope.GLOBAL;
|
|
42
|
-
readonly level:
|
|
42
|
+
readonly level: 100;
|
|
43
43
|
readonly isSystem: true;
|
|
44
44
|
readonly tenant: "system";
|
|
45
45
|
};
|
|
@@ -166,7 +166,7 @@ export declare const CONTRACTX_ROLE_GROUPS: {
|
|
|
166
166
|
readonly SYSTEM_ROLES: readonly ["superadmin", "support"];
|
|
167
167
|
readonly CLIENT_ROLES: readonly ["client_contract_admin", "client_performance_manager", "client_finance_manager", "client_reports_manager", "client_relationship_manager", "client_risk_manager"];
|
|
168
168
|
readonly PROVIDER_ROLES: readonly ["provider_contract_admin", "provider_performance_manager", "provider_finance_manager", "provider_reports_manager", "provider_relationship_manager", "provider_risk_manager"];
|
|
169
|
-
readonly ADMIN_ROLES: readonly ["superadmin", "
|
|
169
|
+
readonly ADMIN_ROLES: readonly ["superadmin", "client_contract_admin", "provider_contract_admin"];
|
|
170
170
|
readonly MANAGER_ROLES: readonly ["client_contract_admin", "provider_contract_admin", "client_performance_manager", "provider_performance_manager", "client_finance_manager", "provider_finance_manager"];
|
|
171
171
|
};
|
|
172
172
|
export declare const isSystemRole: (role: string) => boolean;
|
|
@@ -178,7 +178,7 @@ export declare const getRoleMetadata: (role: string) => {
|
|
|
178
178
|
readonly description: "Full system access with all permissions";
|
|
179
179
|
readonly type: ContractXRoleType.ADMIN;
|
|
180
180
|
readonly scope: ContractXRoleScope.GLOBAL;
|
|
181
|
-
readonly level:
|
|
181
|
+
readonly level: 100;
|
|
182
182
|
readonly isSystem: true;
|
|
183
183
|
readonly tenant: "system";
|
|
184
184
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractx-roles.constants.d.ts","sourceRoot":"","sources":["../../src/constants/contractx-roles.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,oBAAY,iBAAiB;IAC3B,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAGD,oBAAY,kBAAkB;IAC5B,MAAM,WAAW;IACjB,YAAY,iBAAiB;IAC7B,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,IAAI,SAAS;CACd;AAGD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;CAoBlB,CAAC;AAGX,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8I7B,CAAC;AAGX,eAAO,MAAM,qBAAqB,wXAAiC,CAAC;AAGpE,eAAO,MAAM,qBAAqB;;;;;;
|
|
1
|
+
{"version":3,"file":"contractx-roles.constants.d.ts","sourceRoot":"","sources":["../../src/constants/contractx-roles.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,oBAAY,iBAAiB;IAC3B,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAGD,oBAAY,kBAAkB;IAC5B,MAAM,WAAW;IACjB,YAAY,iBAAiB;IAC7B,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,IAAI,SAAS;CACd;AAGD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;CAoBlB,CAAC;AAGX,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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|
|
54
|
+
level: 100,
|
|
55
55
|
isSystem: true,
|
|
56
56
|
tenant: 'system'
|
|
57
57
|
},
|
|
@@ -198,7 +198,6 @@ exports.CONTRACTX_ROLE_GROUPS = {
|
|
|
198
198
|
],
|
|
199
199
|
ADMIN_ROLES: [
|
|
200
200
|
exports.CONTRACTX_ROLES.SUPERADMIN,
|
|
201
|
-
exports.CONTRACTX_ROLES.SUPPORT,
|
|
202
201
|
exports.CONTRACTX_ROLES.CLIENT_CONTRACT_ADMIN,
|
|
203
202
|
exports.CONTRACTX_ROLES.PROVIDER_CONTRACT_ADMIN,
|
|
204
203
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/constants/index.js
CHANGED
|
@@ -14,5 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
17
|
+
exports.MODULE_CONSTANTS = void 0;
|
|
18
|
+
__exportStar(require("./contractx-roles.constants"), exports);
|
|
18
19
|
__exportStar(require("./contractx-permissions.constants"), exports);
|
|
20
|
+
var security_constants_1 = require("./security.constants");
|
|
21
|
+
Object.defineProperty(exports, "MODULE_CONSTANTS", { enumerable: true, get: function () { return security_constants_1.MODULE_CONSTANTS; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractx-authorization.service.d.ts","sourceRoot":"","sources":["../../src/services/contractx-authorization.service.ts"],"names":[],"mappings":"AACA,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,gCAAgC,CAAC;AAgBxC,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,EAAE,CAAC;CAChC;AAED,qBACa,6BAA6B;IAE5B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,0BAA0B;IAE1E;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB;
|
|
1
|
+
{"version":3,"file":"contractx-authorization.service.d.ts","sourceRoot":"","sources":["../../src/services/contractx-authorization.service.ts"],"names":[],"mappings":"AACA,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,gCAAgC,CAAC;AAgBxC,M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AG,YAAY;CAQ3F"}
|
|
@@ -22,6 +22,14 @@ let ContractXAuthorizationService = class ContractXAuthorizationService {
|
|
|
22
22
|
* Authorize a user for a specific action on a resource
|
|
23
23
|
*/
|
|
24
24
|
authorize(context) {
|
|
25
|
+
// Handle null context
|
|
26
|
+
if (!context) {
|
|
27
|
+
return {
|
|
28
|
+
granted: false,
|
|
29
|
+
reason: 'Invalid context: context is null or undefined',
|
|
30
|
+
level: 'denied',
|
|
31
|
+
};
|
|
32
|
+
}
|
|
25
33
|
const { userRoles, userPermissions, requestedResource, requestedAction } = context;
|
|
26
34
|
// First validate the user context
|
|
27
35
|
const userValidation = this.validationService.validateUser(userRoles, userPermissions);
|
|
@@ -162,15 +170,14 @@ let ContractXAuthorizationService = class ContractXAuthorizationService {
|
|
|
162
170
|
.filter(meta => meta !== null);
|
|
163
171
|
// Analyze access levels
|
|
164
172
|
const hasSystemAccess = userRoles.some(role => (0, contractx_roles_constants_1.isSystemRole)(role));
|
|
165
|
-
const hasClientAccess = userRoles.some(role => (0, contractx_roles_constants_1.isClientRole)(role));
|
|
166
|
-
const hasProviderAccess = userRoles.some(role => (0, contractx_roles_constants_1.isProviderRole)(role));
|
|
173
|
+
const hasClientAccess = userRoles.some(role => (0, contractx_roles_constants_1.isClientRole)(role)) || hasSystemAccess;
|
|
174
|
+
const hasProviderAccess = userRoles.some(role => (0, contractx_roles_constants_1.isProviderRole)(role)) || hasSystemAccess;
|
|
167
175
|
const hasAdminAccess = userRoles.some(role => (0, contractx_roles_constants_1.isAdminRole)(role));
|
|
168
|
-
// Get accessible modules
|
|
169
|
-
const
|
|
176
|
+
// Get accessible modules from both explicit permissions and role-based permissions
|
|
177
|
+
const effectivePermissions = this.validationService.getEffectivePermissions(userRoles, userPermissions);
|
|
178
|
+
const accessibleModules = this.validationService.getUserModules(effectivePermissions);
|
|
170
179
|
// Calculate highest role level
|
|
171
180
|
const highestRoleLevel = Math.max(...roleMetadata.map(meta => meta?.level || 0), 0);
|
|
172
|
-
// Get effective permissions
|
|
173
|
-
const effectivePermissions = this.validationService.getEffectivePermissions(userRoles, userPermissions);
|
|
174
181
|
return {
|
|
175
182
|
hasSystemAccess,
|
|
176
183
|
hasClientAccess,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractx-validation.service.d.ts","sourceRoot":"","sources":["../../src/services/contractx-validation.service.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,0BAA2B,SAAQ,gBAAgB;IAClE,cAAc,CAAC,EAAE;QACf,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,OAAO,CAAC;KAClB,EAAE,CAAC;CACL;AAED,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,QAAQ,CAAC,EAAE;QACT,aAAa,EAAE,OAAO,CAAC;QACvB,mBAAmB,EAAE,OAAO,CAAC;QAC7B,SAAS,EAAE,MAAM,CAAC;QAClB,eAAe,EAAE,MAAM,CAAC;QACxB,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;QACnD,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED,qBACa,0BAA0B;IAErC;;OAEG;IACH,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,oBAAoB;IAuCtD,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,oBAAoB;IA4CpD,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,0BAA0B;IA8CxE,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,0BAA0B;IA2CtE;;OAEG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,oBAAoB;
|
|
1
|
+
{"version":3,"file":"contractx-validation.service.d.ts","sourceRoot":"","sources":["../../src/services/contractx-validation.service.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,0BAA2B,SAAQ,gBAAgB;IAClE,cAAc,CAAC,EAAE;QACf,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,OAAO,CAAC;KAClB,EAAE,CAAC;CACL;AAED,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,QAAQ,CAAC,EAAE;QACT,aAAa,EAAE,OAAO,CAAC;QACvB,mBAAmB,EAAE,O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
|
163
163
|
const errors = [];
|
|
164
164
|
const warnings = [];
|
|
165
|
+
// Handle undefined or null inputs
|
|
166
|
+
const safeRoles = Array.isArray(roles) ? roles : [];
|
|
167
|
+
const safePermissions = Array.isArray(permissions) ? permissions : [];
|
|
168
|
+
if (!Array.isArray(roles)) {
|
|
169
|
+
errors.push('Roles must be an array');
|
|
170
|
+
}
|
|
171
|
+
if (!Array.isArray(permissions)) {
|
|
172
|
+
errors.push('Permissions must be an array');
|
|
173
|
+
}
|
|
165
174
|
// Validate roles
|
|
166
|
-
const roleValidation = this.validateRoles(
|
|
175
|
+
const roleValidation = this.validateRoles(safeRoles);
|
|
167
176
|
errors.push(...roleValidation.errors);
|
|
168
177
|
warnings.push(...roleValidation.warnings);
|
|
169
178
|
// Validate permissions
|
|
170
|
-
const permissionValidation = this.validatePermissions(
|
|
179
|
+
const permissionValidation = this.validatePermissions(safePermissions);
|
|
171
180
|
errors.push(...permissionValidation.errors);
|
|
172
181
|
warnings.push(...permissionValidation.warnings);
|
|
173
182
|
// Determine tenant type
|
|
@@ -183,9 +192,9 @@ let ContractXValidationService = class ContractXValidationService {
|
|
|
183
192
|
// Calculate access level (highest role level)
|
|
184
193
|
const accessLevel = Math.max(...roleInfos.map((r) => r.level), 0);
|
|
185
194
|
// Cross-validation: check if permissions align with roles
|
|
186
|
-
const expectedPermissions = this.getExpectedPermissionsForRoles(
|
|
187
|
-
const missingPermissions = expectedPermissions.filter(p => !
|
|
188
|
-
const extraPermissions =
|
|
195
|
+
const expectedPermissions = this.getExpectedPermissionsForRoles(safeRoles);
|
|
196
|
+
const missingPermissions = expectedPermissions.filter(p => !safePermissions.includes(p));
|
|
197
|
+
const extraPermissions = safePermissions.filter(p => !expectedPermissions.includes(p));
|
|
189
198
|
if (missingPermissions.length > 0) {
|
|
190
199
|
warnings.push(`Missing expected permissions for roles: ${missingPermissions.slice(0, 5).join(', ')}${missingPermissions.length > 5 ? '...' : ''}`);
|
|
191
200
|
}
|
|
@@ -199,8 +208,8 @@ let ContractXValidationService = class ContractXValidationService {
|
|
|
199
208
|
userInfo: {
|
|
200
209
|
hasValidRoles: roleValidation.isValid,
|
|
201
210
|
hasValidPermissions: permissionValidation.isValid,
|
|
202
|
-
roleCount:
|
|
203
|
-
permissionCount:
|
|
211
|
+
roleCount: safeRoles.length,
|
|
212
|
+
permissionCount: safePermissions.length,
|
|
204
213
|
tenant,
|
|
205
214
|
accessLevel,
|
|
206
215
|
},
|
|
@@ -215,6 +224,10 @@ let ContractXValidationService = class ContractXValidationService {
|
|
|
215
224
|
*/
|
|
216
225
|
getExpectedPermissionsForRoles(roles) {
|
|
217
226
|
const allPermissions = new Set();
|
|
227
|
+
// Handle undefined or non-array roles
|
|
228
|
+
if (!Array.isArray(roles)) {
|
|
229
|
+
return [];
|
|
230
|
+
}
|
|
218
231
|
for (const role of roles) {
|
|
219
232
|
const rolePermissions = contractx_permissions_constants_1.ODS_ROLE_PERMISSIONS[role];
|
|
220
233
|
if (rolePermissions) {
|
|
@@ -269,6 +282,10 @@ let ContractXValidationService = class ContractXValidationService {
|
|
|
269
282
|
validateJwtPayload(payload) {
|
|
270
283
|
const errors = [];
|
|
271
284
|
const warnings = [];
|
|
285
|
+
if (!payload || typeof payload !== 'object') {
|
|
286
|
+
errors.push('Invalid payload: must be an object');
|
|
287
|
+
return { isValid: false, errors, warnings };
|
|
288
|
+
}
|
|
272
289
|
// Required fields
|
|
273
290
|
if (!payload.sub) {
|
|
274
291
|
errors.push('Missing required field: sub (user ID)');
|
|
@@ -49,11 +49,11 @@ export declare class UserContextService {
|
|
|
49
49
|
/**
|
|
50
50
|
* Check if user has any of the specified roles
|
|
51
51
|
*/
|
|
52
|
-
hasAnyRole(roles: string[]): boolean;
|
|
52
|
+
hasAnyRole(roles: readonly string[] | string[]): boolean;
|
|
53
53
|
/**
|
|
54
54
|
* Check if user has all of the specified roles
|
|
55
55
|
*/
|
|
56
|
-
hasAllRoles(roles: string[]): boolean;
|
|
56
|
+
hasAllRoles(roles: readonly string[] | string[]): boolean;
|
|
57
57
|
/**
|
|
58
58
|
* Check if user has a specific permission
|
|
59
59
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-context.service.d.ts","sourceRoot":"","sources":["../../src/services/user-context.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"user-context.service.d.ts","sourceRoot":"","sources":["../../src/services/user-context.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C;;;GAGG;AACH,qBACa,kBAAkB;IAC7B,OAAO,CAAC,IAAI,CAA2B;IAEvC;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAI/B;;OAEG;IACH,OAAO,IAAI,UAAU,GAAG,IAAI;IAI5B;;OAEG;IACH,SAAS,IAAI,MAAM,GAAG,IAAI;IAK1B;;OAEG;IACH,eAAe,IAAI,MAAM,GAAG,IAAI;IAKhC;;OAEG;IACH,YAAY,IAAI,MAAM,GAAG,IAAI;IAK7B;;OAEG;IACH,WAAW,IAAI,MAAM,GAAG,IAAI;IAK5B;;OAEG;IACH,YAAY,IAAI,MAAM,GAAG,IAAI;IAK7B;;OAEG;IACH,YAAY,IAAI,MAAM,EAAE;IAIxB;;OAEG;IACH,kBAAkB,IAAI,MAAM,EAAE;IAI9B;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI9B;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO;IAKxD;;OAEG;IACH,WAAW,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO;IAKzD;;OAEG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAI1C;;OAEG;IACH,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO;IAKhD;;OAEG;IACH,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO;IAKjD;;OAEG;IACH,eAAe,IAAI,OAAO;IAI1B;;OAEG;IACH,YAAY,IAAI,OAAO;IAIvB;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACH,YAAY,IAAI,OAAO;IAIvB;;OAEG;IACH,cAAc,IAAI,OAAO;IAIzB;;OAEG;IACH,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAOxC;;OAEG;IACH,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE;IAM9C;;OAEG;IACH,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAIzD;;OAEG;IACH,cAAc,IAAI;QAChB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QACrB,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,eAAe,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,OAAO,CAAC;QACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB;CAWF"}
|
|
@@ -8,6 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.UserContextService = void 0;
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
|
+
const contractx_roles_constants_1 = require("../constants/contractx-roles.constants");
|
|
11
12
|
/**
|
|
12
13
|
* Request-scoped service to manage current user context
|
|
13
14
|
* Provides convenient methods to access user information and check permissions
|
|
@@ -33,31 +34,41 @@ let UserContextService = class UserContextService {
|
|
|
33
34
|
* Get the current user's ID
|
|
34
35
|
*/
|
|
35
36
|
getUserId() {
|
|
36
|
-
|
|
37
|
+
if (this.user?.sub === undefined || this.user?.sub === null)
|
|
38
|
+
return null;
|
|
39
|
+
return String(this.user.sub);
|
|
37
40
|
}
|
|
38
41
|
/**
|
|
39
42
|
* Get the current user's full name
|
|
40
43
|
*/
|
|
41
44
|
getUserFullName() {
|
|
42
|
-
|
|
45
|
+
if (this.user?.fullName === undefined || this.user?.fullName === null)
|
|
46
|
+
return null;
|
|
47
|
+
return this.user.fullName;
|
|
43
48
|
}
|
|
44
49
|
/**
|
|
45
50
|
* Get the current user's email
|
|
46
51
|
*/
|
|
47
52
|
getUserEmail() {
|
|
48
|
-
|
|
53
|
+
if (this.user?.email === undefined || this.user?.email === null)
|
|
54
|
+
return null;
|
|
55
|
+
return this.user.email;
|
|
49
56
|
}
|
|
50
57
|
/**
|
|
51
58
|
* Get the current user's client ID
|
|
52
59
|
*/
|
|
53
60
|
getClientId() {
|
|
54
|
-
|
|
61
|
+
if (this.user?.clientId === undefined || this.user?.clientId === null)
|
|
62
|
+
return null;
|
|
63
|
+
return this.user.clientId;
|
|
55
64
|
}
|
|
56
65
|
/**
|
|
57
66
|
* Get the current user's session ID
|
|
58
67
|
*/
|
|
59
68
|
getSessionId() {
|
|
60
|
-
|
|
69
|
+
if (this.user?.sessionId === undefined || this.user?.sessionId === null)
|
|
70
|
+
return null;
|
|
71
|
+
return this.user.sessionId;
|
|
61
72
|
}
|
|
62
73
|
/**
|
|
63
74
|
* Get all user roles
|
|
@@ -121,43 +132,25 @@ let UserContextService = class UserContextService {
|
|
|
121
132
|
* Check if user is a superadmin
|
|
122
133
|
*/
|
|
123
134
|
isSuperAdmin() {
|
|
124
|
-
return this.hasRole(
|
|
135
|
+
return this.hasRole(contractx_roles_constants_1.CONTRACTX_ROLES.SUPERADMIN);
|
|
125
136
|
}
|
|
126
137
|
/**
|
|
127
138
|
* Check if user has admin privileges (superadmin or contract admin)
|
|
128
139
|
*/
|
|
129
140
|
isAdmin() {
|
|
130
|
-
return this.hasAnyRole(
|
|
131
|
-
'superadmin',
|
|
132
|
-
'client_contract_admin',
|
|
133
|
-
'provider_contract_admin',
|
|
134
|
-
]);
|
|
141
|
+
return this.hasAnyRole(contractx_roles_constants_1.CONTRACTX_ROLE_GROUPS.ADMIN_ROLES);
|
|
135
142
|
}
|
|
136
143
|
/**
|
|
137
144
|
* Check if user has client-side role
|
|
138
145
|
*/
|
|
139
146
|
isClientUser() {
|
|
140
|
-
return this.hasAnyRole(
|
|
141
|
-
'client_contract_admin',
|
|
142
|
-
'client_performance_manager',
|
|
143
|
-
'client_finance_manager',
|
|
144
|
-
'client_reports_manager',
|
|
145
|
-
'client_relationship_manager',
|
|
146
|
-
'client_risk_manager',
|
|
147
|
-
]);
|
|
147
|
+
return this.hasAnyRole(contractx_roles_constants_1.CONTRACTX_ROLE_GROUPS.CLIENT_ROLES);
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
150
|
* Check if user has provider-side role
|
|
151
151
|
*/
|
|
152
152
|
isProviderUser() {
|
|
153
|
-
return this.hasAnyRole(
|
|
154
|
-
'provider_contract_admin',
|
|
155
|
-
'provider_performance_manager',
|
|
156
|
-
'provider_finance_manager',
|
|
157
|
-
'provider_reports_manager',
|
|
158
|
-
'provider_relationship_manager',
|
|
159
|
-
'provider_risk_manager',
|
|
160
|
-
]);
|
|
153
|
+
return this.hasAnyRole(contractx_roles_constants_1.CONTRACTX_ROLE_GROUPS.PROVIDER_ROLES);
|
|
161
154
|
}
|
|
162
155
|
/**
|
|
163
156
|
* Check if user can access a specific module based on permissions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "permissions-contractx",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Enterprise-grade authentication and authorization package for NestJS microservices with role-based and permission-based access control",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -44,6 +44,10 @@
|
|
|
44
44
|
"bugs": {
|
|
45
45
|
"url": "https://github.com/your-org/permissions-contractx/issues"
|
|
46
46
|
},
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">=16.0.0",
|
|
49
|
+
"npm": ">=7.0.0"
|
|
50
|
+
},
|
|
47
51
|
"peerDependencies": {
|
|
48
52
|
"@nestjs/common": "^11.1.6",
|
|
49
53
|
"@nestjs/config": "^4.0.2",
|
|
@@ -54,352 +58,25 @@
|
|
|
54
58
|
"rxjs": "^7.0.0"
|
|
55
59
|
},
|
|
56
60
|
"devDependencies": {
|
|
61
|
+
"@nestjs/platform-express": "^11.1.6",
|
|
57
62
|
"@nestjs/testing": "^11.1.6",
|
|
58
63
|
"@types/express": "^5.0.3",
|
|
59
|
-
"@types/jest": "^
|
|
64
|
+
"@types/jest": "^25.1.0",
|
|
60
65
|
"@types/jsonwebtoken": "^9.0.0",
|
|
61
66
|
"@types/node": "^20.0.0",
|
|
62
67
|
"@types/supertest": "^2.0.12",
|
|
63
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
64
|
-
"@typescript-eslint/parser": "^
|
|
65
|
-
"eslint": "^
|
|
66
|
-
"jest": "^
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^8.43.0",
|
|
69
|
+
"@typescript-eslint/parser": "^8.43.0",
|
|
70
|
+
"eslint": "^9.35.0",
|
|
71
|
+
"jest": "^30.1.3",
|
|
67
72
|
"rimraf": "^5.0.0",
|
|
68
73
|
"supertest": "^6.3.0",
|
|
69
|
-
"ts-jest": "^
|
|
74
|
+
"ts-jest": "^28.0.5",
|
|
70
75
|
"ts-node": "^10.9.0",
|
|
71
76
|
"typescript": "^5.0.0"
|
|
72
77
|
},
|
|
73
|
-
"engines": {
|
|
74
|
-
"node": ">=16.0.0",
|
|
75
|
-
"npm": ">=7.0.0"
|
|
76
|
-
},
|
|
77
78
|
"directories": {
|
|
78
79
|
"example": "examples",
|
|
79
80
|
"test": "test"
|
|
80
|
-
},
|
|
81
|
-
"dependencies": {
|
|
82
|
-
"acorn": "^8.15.0",
|
|
83
|
-
"acorn-jsx": "^5.3.2",
|
|
84
|
-
"acorn-walk": "^8.3.4",
|
|
85
|
-
"ajv": "^6.12.6",
|
|
86
|
-
"ansi-escapes": "^4.3.2",
|
|
87
|
-
"ansi-regex": "^5.0.1",
|
|
88
|
-
"ansi-styles": "^4.3.0",
|
|
89
|
-
"anymatch": "^3.1.3",
|
|
90
|
-
"arg": "^4.1.3",
|
|
91
|
-
"argparse": "^2.0.1",
|
|
92
|
-
"array-union": "^2.1.0",
|
|
93
|
-
"asap": "^2.0.6",
|
|
94
|
-
"asynckit": "^0.4.0",
|
|
95
|
-
"babel-jest": "^29.7.0",
|
|
96
|
-
"babel-plugin-istanbul": "^6.1.1",
|
|
97
|
-
"babel-plugin-jest-hoist": "^29.6.3",
|
|
98
|
-
"babel-preset-current-node-syntax": "^1.2.0",
|
|
99
|
-
"babel-preset-jest": "^29.6.3",
|
|
100
|
-
"balanced-match": "^1.0.2",
|
|
101
|
-
"brace-expansion": "^2.0.2",
|
|
102
|
-
"braces": "^3.0.3",
|
|
103
|
-
"browserslist": "^4.25.2",
|
|
104
|
-
"bs-logger": "^0.2.6",
|
|
105
|
-
"bser": "^2.1.1",
|
|
106
|
-
"buffer-equal-constant-time": "^1.0.1",
|
|
107
|
-
"buffer-from": "^1.1.2",
|
|
108
|
-
"call-bind-apply-helpers": "^1.0.2",
|
|
109
|
-
"call-bound": "^1.0.4",
|
|
110
|
-
"callsites": "^3.1.0",
|
|
111
|
-
"camelcase": "^5.3.1",
|
|
112
|
-
"caniuse-lite": "^1.0.30001733",
|
|
113
|
-
"chalk": "^4.1.2",
|
|
114
|
-
"char-regex": "^1.0.2",
|
|
115
|
-
"ci-info": "^3.9.0",
|
|
116
|
-
"cjs-module-lexer": "^1.4.3",
|
|
117
|
-
"cliui": "^8.0.1",
|
|
118
|
-
"co": "^4.6.0",
|
|
119
|
-
"collect-v8-coverage": "^1.0.2",
|
|
120
|
-
"color-convert": "^2.0.1",
|
|
121
|
-
"color-name": "^1.1.4",
|
|
122
|
-
"combined-stream": "^1.0.8",
|
|
123
|
-
"component-emitter": "^1.3.1",
|
|
124
|
-
"concat-map": "^0.0.1",
|
|
125
|
-
"consola": "^3.4.2",
|
|
126
|
-
"convert-source-map": "^2.0.0",
|
|
127
|
-
"cookiejar": "^2.1.4",
|
|
128
|
-
"create-jest": "^29.7.0",
|
|
129
|
-
"create-require": "^1.1.1",
|
|
130
|
-
"cross-spawn": "^7.0.6",
|
|
131
|
-
"debug": "^4.4.1",
|
|
132
|
-
"dedent": "^1.6.0",
|
|
133
|
-
"deep-is": "^0.1.4",
|
|
134
|
-
"deepmerge": "^4.3.1",
|
|
135
|
-
"delayed-stream": "^1.0.0",
|
|
136
|
-
"detect-newline": "^3.1.0",
|
|
137
|
-
"dezalgo": "^1.0.4",
|
|
138
|
-
"diff": "^4.0.2",
|
|
139
|
-
"diff-sequences": "^29.6.3",
|
|
140
|
-
"dir-glob": "^3.0.1",
|
|
141
|
-
"doctrine": "^3.0.0",
|
|
142
|
-
"dotenv": "^16.4.7",
|
|
143
|
-
"dotenv-expand": "^12.0.1",
|
|
144
|
-
"dunder-proto": "^1.0.1",
|
|
145
|
-
"eastasianwidth": "^0.2.0",
|
|
146
|
-
"ecdsa-sig-formatter": "^1.0.11",
|
|
147
|
-
"electron-to-chromium": "^1.5.199",
|
|
148
|
-
"emittery": "^0.13.1",
|
|
149
|
-
"emoji-regex": "^8.0.0",
|
|
150
|
-
"error-ex": "^1.3.2",
|
|
151
|
-
"es-define-property": "^1.0.1",
|
|
152
|
-
"es-errors": "^1.3.0",
|
|
153
|
-
"es-object-atoms": "^1.1.1",
|
|
154
|
-
"es-set-tostringtag": "^2.1.0",
|
|
155
|
-
"escalade": "^3.2.0",
|
|
156
|
-
"escape-string-regexp": "^4.0.0",
|
|
157
|
-
"eslint-scope": "^7.2.2",
|
|
158
|
-
"eslint-visitor-keys": "^3.4.3",
|
|
159
|
-
"espree": "^9.6.1",
|
|
160
|
-
"esprima": "^4.0.1",
|
|
161
|
-
"esquery": "^1.6.0",
|
|
162
|
-
"esrecurse": "^4.3.0",
|
|
163
|
-
"estraverse": "^5.3.0",
|
|
164
|
-
"esutils": "^2.0.3",
|
|
165
|
-
"execa": "^5.1.1",
|
|
166
|
-
"exit": "^0.1.2",
|
|
167
|
-
"expect": "^29.7.0",
|
|
168
|
-
"fast-deep-equal": "^3.1.3",
|
|
169
|
-
"fast-glob": "^3.3.3",
|
|
170
|
-
"fast-json-stable-stringify": "^2.1.0",
|
|
171
|
-
"fast-levenshtein": "^2.0.6",
|
|
172
|
-
"fast-safe-stringify": "^2.1.1",
|
|
173
|
-
"fastq": "^1.19.1",
|
|
174
|
-
"fb-watchman": "^2.0.2",
|
|
175
|
-
"fflate": "^0.8.2",
|
|
176
|
-
"file-entry-cache": "^6.0.1",
|
|
177
|
-
"file-type": "^21.0.0",
|
|
178
|
-
"fill-range": "^7.1.1",
|
|
179
|
-
"find-up": "^5.0.0",
|
|
180
|
-
"flat-cache": "^3.2.0",
|
|
181
|
-
"flatted": "^3.3.3",
|
|
182
|
-
"foreground-child": "^3.3.1",
|
|
183
|
-
"form-data": "^4.0.4",
|
|
184
|
-
"formidable": "^2.1.5",
|
|
185
|
-
"fs.realpath": "^1.0.0",
|
|
186
|
-
"function-bind": "^1.1.2",
|
|
187
|
-
"gensync": "^1.0.0-beta.2",
|
|
188
|
-
"get-caller-file": "^2.0.5",
|
|
189
|
-
"get-intrinsic": "^1.3.0",
|
|
190
|
-
"get-package-type": "^0.1.0",
|
|
191
|
-
"get-proto": "^1.0.1",
|
|
192
|
-
"get-stream": "^6.0.1",
|
|
193
|
-
"glob": "^7.2.3",
|
|
194
|
-
"glob-parent": "^6.0.2",
|
|
195
|
-
"globals": "^13.24.0",
|
|
196
|
-
"globby": "^11.1.0",
|
|
197
|
-
"gopd": "^1.2.0",
|
|
198
|
-
"graceful-fs": "^4.2.11",
|
|
199
|
-
"graphemer": "^1.4.0",
|
|
200
|
-
"handlebars": "^4.7.8",
|
|
201
|
-
"has-flag": "^4.0.0",
|
|
202
|
-
"has-symbols": "^1.1.0",
|
|
203
|
-
"has-tostringtag": "^1.0.2",
|
|
204
|
-
"hasown": "^2.0.2",
|
|
205
|
-
"html-escaper": "^2.0.2",
|
|
206
|
-
"human-signals": "^2.1.0",
|
|
207
|
-
"ieee754": "^1.2.1",
|
|
208
|
-
"ignore": "^5.3.2",
|
|
209
|
-
"import-fresh": "^3.3.1",
|
|
210
|
-
"import-local": "^3.2.0",
|
|
211
|
-
"imurmurhash": "^0.1.4",
|
|
212
|
-
"inflight": "^1.0.6",
|
|
213
|
-
"inherits": "^2.0.4",
|
|
214
|
-
"is-arrayish": "^0.2.1",
|
|
215
|
-
"is-core-module": "^2.16.1",
|
|
216
|
-
"is-extglob": "^2.1.1",
|
|
217
|
-
"is-fullwidth-code-point": "^3.0.0",
|
|
218
|
-
"is-generator-fn": "^2.1.0",
|
|
219
|
-
"is-glob": "^4.0.3",
|
|
220
|
-
"is-number": "^7.0.0",
|
|
221
|
-
"is-path-inside": "^3.0.3",
|
|
222
|
-
"is-stream": "^2.0.1",
|
|
223
|
-
"isexe": "^2.0.0",
|
|
224
|
-
"istanbul-lib-coverage": "^3.2.2",
|
|
225
|
-
"istanbul-lib-instrument": "^6.0.3",
|
|
226
|
-
"istanbul-lib-report": "^3.0.1",
|
|
227
|
-
"istanbul-lib-source-maps": "^4.0.1",
|
|
228
|
-
"istanbul-reports": "^3.1.7",
|
|
229
|
-
"iterare": "^1.2.1",
|
|
230
|
-
"jackspeak": "^3.4.3",
|
|
231
|
-
"jest-changed-files": "^29.7.0",
|
|
232
|
-
"jest-circus": "^29.7.0",
|
|
233
|
-
"jest-cli": "^29.7.0",
|
|
234
|
-
"jest-config": "^29.7.0",
|
|
235
|
-
"jest-diff": "^29.7.0",
|
|
236
|
-
"jest-docblock": "^29.7.0",
|
|
237
|
-
"jest-each": "^29.7.0",
|
|
238
|
-
"jest-environment-node": "^29.7.0",
|
|
239
|
-
"jest-get-type": "^29.6.3",
|
|
240
|
-
"jest-haste-map": "^29.7.0",
|
|
241
|
-
"jest-leak-detector": "^29.7.0",
|
|
242
|
-
"jest-matcher-utils": "^29.7.0",
|
|
243
|
-
"jest-message-util": "^29.7.0",
|
|
244
|
-
"jest-mock": "^29.7.0",
|
|
245
|
-
"jest-pnp-resolver": "^1.2.3",
|
|
246
|
-
"jest-regex-util": "^29.6.3",
|
|
247
|
-
"jest-resolve": "^29.7.0",
|
|
248
|
-
"jest-resolve-dependencies": "^29.7.0",
|
|
249
|
-
"jest-runner": "^29.7.0",
|
|
250
|
-
"jest-runtime": "^29.7.0",
|
|
251
|
-
"jest-snapshot": "^29.7.0",
|
|
252
|
-
"jest-util": "^29.7.0",
|
|
253
|
-
"jest-validate": "^29.7.0",
|
|
254
|
-
"jest-watcher": "^29.7.0",
|
|
255
|
-
"jest-worker": "^29.7.0",
|
|
256
|
-
"js-tokens": "^4.0.0",
|
|
257
|
-
"js-yaml": "^4.1.0",
|
|
258
|
-
"jsesc": "^3.1.0",
|
|
259
|
-
"json-buffer": "^3.0.1",
|
|
260
|
-
"json-parse-even-better-errors": "^2.3.1",
|
|
261
|
-
"json-schema-traverse": "^0.4.1",
|
|
262
|
-
"json-stable-stringify-without-jsonify": "^1.0.1",
|
|
263
|
-
"json5": "^2.2.3",
|
|
264
|
-
"jsonwebtoken": "^9.0.2",
|
|
265
|
-
"jwa": "^1.4.2",
|
|
266
|
-
"jws": "^3.2.2",
|
|
267
|
-
"keyv": "^4.5.4",
|
|
268
|
-
"kleur": "^3.0.3",
|
|
269
|
-
"leven": "^3.1.0",
|
|
270
|
-
"levn": "^0.4.1",
|
|
271
|
-
"lines-and-columns": "^1.2.4",
|
|
272
|
-
"load-esm": "^1.0.2",
|
|
273
|
-
"locate-path": "^6.0.0",
|
|
274
|
-
"lodash": "^4.17.21",
|
|
275
|
-
"lodash.includes": "^4.3.0",
|
|
276
|
-
"lodash.isboolean": "^3.0.3",
|
|
277
|
-
"lodash.isinteger": "^4.0.4",
|
|
278
|
-
"lodash.isnumber": "^3.0.3",
|
|
279
|
-
"lodash.isplainobject": "^4.0.6",
|
|
280
|
-
"lodash.isstring": "^4.0.1",
|
|
281
|
-
"lodash.memoize": "^4.1.2",
|
|
282
|
-
"lodash.merge": "^4.6.2",
|
|
283
|
-
"lodash.once": "^4.1.1",
|
|
284
|
-
"lru-cache": "^5.1.1",
|
|
285
|
-
"make-dir": "^4.0.0",
|
|
286
|
-
"make-error": "^1.3.6",
|
|
287
|
-
"makeerror": "^1.0.12",
|
|
288
|
-
"math-intrinsics": "^1.1.0",
|
|
289
|
-
"merge-stream": "^2.0.0",
|
|
290
|
-
"merge2": "^1.4.1",
|
|
291
|
-
"methods": "^1.1.2",
|
|
292
|
-
"micromatch": "^4.0.8",
|
|
293
|
-
"mime": "^2.6.0",
|
|
294
|
-
"mime-db": "^1.52.0",
|
|
295
|
-
"mime-types": "^2.1.35",
|
|
296
|
-
"mimic-fn": "^2.1.0",
|
|
297
|
-
"minimatch": "^9.0.3",
|
|
298
|
-
"minimist": "^1.2.8",
|
|
299
|
-
"minipass": "^7.1.2",
|
|
300
|
-
"ms": "^2.1.3",
|
|
301
|
-
"natural-compare": "^1.4.0",
|
|
302
|
-
"neo-async": "^2.6.2",
|
|
303
|
-
"node-int64": "^0.4.0",
|
|
304
|
-
"node-releases": "^2.0.19",
|
|
305
|
-
"normalize-path": "^3.0.0",
|
|
306
|
-
"npm-run-path": "^4.0.1",
|
|
307
|
-
"object-inspect": "^1.13.4",
|
|
308
|
-
"once": "^1.4.0",
|
|
309
|
-
"onetime": "^5.1.2",
|
|
310
|
-
"optionator": "^0.9.4",
|
|
311
|
-
"p-limit": "^3.1.0",
|
|
312
|
-
"p-locate": "^5.0.0",
|
|
313
|
-
"p-try": "^2.2.0",
|
|
314
|
-
"package-json-from-dist": "^1.0.1",
|
|
315
|
-
"parent-module": "^1.0.1",
|
|
316
|
-
"parse-json": "^5.2.0",
|
|
317
|
-
"path-exists": "^4.0.0",
|
|
318
|
-
"path-is-absolute": "^1.0.1",
|
|
319
|
-
"path-key": "^3.1.1",
|
|
320
|
-
"path-parse": "^1.0.7",
|
|
321
|
-
"path-scurry": "^1.11.1",
|
|
322
|
-
"path-to-regexp": "^8.2.0",
|
|
323
|
-
"path-type": "^4.0.0",
|
|
324
|
-
"picocolors": "^1.1.1",
|
|
325
|
-
"picomatch": "^2.3.1",
|
|
326
|
-
"pirates": "^4.0.7",
|
|
327
|
-
"pkg-dir": "^4.2.0",
|
|
328
|
-
"prelude-ls": "^1.2.1",
|
|
329
|
-
"pretty-format": "^29.7.0",
|
|
330
|
-
"prompts": "^2.4.2",
|
|
331
|
-
"punycode": "^2.3.1",
|
|
332
|
-
"pure-rand": "^6.1.0",
|
|
333
|
-
"qs": "^6.14.0",
|
|
334
|
-
"queue-microtask": "^1.2.3",
|
|
335
|
-
"react-is": "^18.3.1",
|
|
336
|
-
"reflect-metadata": "^0.1.14",
|
|
337
|
-
"require-directory": "^2.1.1",
|
|
338
|
-
"resolve": "^1.22.10",
|
|
339
|
-
"resolve-cwd": "^3.0.0",
|
|
340
|
-
"resolve-from": "^4.0.0",
|
|
341
|
-
"resolve.exports": "^2.0.3",
|
|
342
|
-
"reusify": "^1.1.0",
|
|
343
|
-
"run-parallel": "^1.2.0",
|
|
344
|
-
"rxjs": "^7.8.2",
|
|
345
|
-
"safe-buffer": "^5.2.1",
|
|
346
|
-
"semver": "^7.7.2",
|
|
347
|
-
"shebang-command": "^2.0.0",
|
|
348
|
-
"shebang-regex": "^3.0.0",
|
|
349
|
-
"side-channel": "^1.1.0",
|
|
350
|
-
"side-channel-list": "^1.0.0",
|
|
351
|
-
"side-channel-map": "^1.0.1",
|
|
352
|
-
"side-channel-weakmap": "^1.0.2",
|
|
353
|
-
"signal-exit": "^3.0.7",
|
|
354
|
-
"sisteransi": "^1.0.5",
|
|
355
|
-
"slash": "^3.0.0",
|
|
356
|
-
"source-map": "^0.6.1",
|
|
357
|
-
"source-map-support": "^0.5.13",
|
|
358
|
-
"sprintf-js": "^1.0.3",
|
|
359
|
-
"stack-utils": "^2.0.6",
|
|
360
|
-
"string-length": "^4.0.2",
|
|
361
|
-
"string-width": "^4.2.3",
|
|
362
|
-
"string-width-cjs": "^4.2.3",
|
|
363
|
-
"strip-ansi": "^6.0.1",
|
|
364
|
-
"strip-ansi-cjs": "^6.0.1",
|
|
365
|
-
"strip-bom": "^4.0.0",
|
|
366
|
-
"strip-final-newline": "^2.0.0",
|
|
367
|
-
"strip-json-comments": "^3.1.1",
|
|
368
|
-
"strtok3": "^10.3.4",
|
|
369
|
-
"superagent": "^8.1.2",
|
|
370
|
-
"supports-color": "^7.2.0",
|
|
371
|
-
"supports-preserve-symlinks-flag": "^1.0.0",
|
|
372
|
-
"test-exclude": "^6.0.0",
|
|
373
|
-
"text-table": "^0.2.0",
|
|
374
|
-
"tmpl": "^1.0.5",
|
|
375
|
-
"to-regex-range": "^5.0.1",
|
|
376
|
-
"token-types": "^6.0.4",
|
|
377
|
-
"ts-api-utils": "^1.4.3",
|
|
378
|
-
"tslib": "^2.8.1",
|
|
379
|
-
"type-check": "^0.4.0",
|
|
380
|
-
"type-detect": "^4.0.8",
|
|
381
|
-
"type-fest": "^0.20.2",
|
|
382
|
-
"uglify-js": "^3.19.3",
|
|
383
|
-
"uid": "^2.0.2",
|
|
384
|
-
"uint8array-extras": "^1.4.0",
|
|
385
|
-
"undici-types": "^6.21.0",
|
|
386
|
-
"update-browserslist-db": "^1.1.3",
|
|
387
|
-
"uri-js": "^4.4.1",
|
|
388
|
-
"v8-compile-cache-lib": "^3.0.1",
|
|
389
|
-
"v8-to-istanbul": "^9.3.0",
|
|
390
|
-
"walker": "^1.0.8",
|
|
391
|
-
"which": "^2.0.2",
|
|
392
|
-
"word-wrap": "^1.2.5",
|
|
393
|
-
"wordwrap": "^1.0.0",
|
|
394
|
-
"wrap-ansi": "^7.0.0",
|
|
395
|
-
"wrap-ansi-cjs": "^7.0.0",
|
|
396
|
-
"wrappy": "^1.0.2",
|
|
397
|
-
"write-file-atomic": "^4.0.2",
|
|
398
|
-
"y18n": "^5.0.8",
|
|
399
|
-
"yallist": "^3.1.1",
|
|
400
|
-
"yargs": "^17.7.2",
|
|
401
|
-
"yargs-parser": "^21.1.1",
|
|
402
|
-
"yn": "^3.1.1",
|
|
403
|
-
"yocto-queue": "^0.1.0"
|
|
404
81
|
}
|
|
405
82
|
}
|