From 3233c78219cc8f8c9b1393b4429bcaaa2890e79f Mon Sep 17 00:00:00 2001 From: hejl Date: Fri, 5 Sep 2025 17:58:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=98=A0=E5=B0=84=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=94=9F=E6=88=90=E6=96=B9=E6=B3=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gofaster/app/dist/renderer/js/index.js | 6054 +++++++++++++++-- gofaster/app/plugins/route-mapping-plugin.js | 1024 ++- .../role-management/views/RoleApiTest.vue | 548 -- .../modules/route-sync/RouteConfig.js | 2 + .../modules/route-sync/RouteMapper.js | 78 +- .../route-sync/direct-route-mappings.js | 1002 +-- 6 files changed, 6507 insertions(+), 2201 deletions(-) delete mode 100644 gofaster/app/src/renderer/modules/role-management/views/RoleApiTest.vue diff --git a/gofaster/app/dist/renderer/js/index.js b/gofaster/app/dist/renderer/js/index.js index 8f5e635..50ade0c 100644 --- a/gofaster/app/dist/renderer/js/index.js +++ b/gofaster/app/dist/renderer/js/index.js @@ -14100,69 +14100,29 @@ class RouteMapper { _createApiMappingFromDirectCall(route, apiCall) { const module = route.module - if (!apiCall || !apiCall.service || !apiCall.method) { - return null - } - - // 根据服务类型和方法生成后端路由 - let backendRoute = '/api' - let httpMethod = 'GET' - - if (apiCall.service === 'userService') { - backendRoute = '/api/users' - if (apiCall.method === 'getUsers') { - httpMethod = 'GET' - } else if (apiCall.method === 'createUser') { - httpMethod = 'POST' - } else if (apiCall.method === 'updateUser') { - httpMethod = 'PUT' - backendRoute = '/api/users/:id' - } else if (apiCall.method === 'deleteUser') { - httpMethod = 'DELETE' - backendRoute = '/api/users/:id' - } else if (apiCall.method === 'getCurrentUser') { - httpMethod = 'GET' - backendRoute = '/api/user/profile' - } else if (apiCall.method === 'login') { - httpMethod = 'POST' - backendRoute = '/api/auth/login' - } else if (apiCall.method === 'getCaptcha') { - httpMethod = 'GET' - backendRoute = '/api/auth/captcha' - } else if (apiCall.method === 'changePassword') { - httpMethod = 'PUT' - backendRoute = '/api/user/password' - } else if (apiCall.method === 'getPasswordPolicy') { - httpMethod = 'GET' - backendRoute = '/api/user/password-policy' - } else if (apiCall.method === 'validatePassword') { - httpMethod = 'POST' - backendRoute = '/api/user/validate-password' - } - } else if (apiCall.service === 'roleService') { - backendRoute = '/api/roles' - if (apiCall.method === 'getRoles') { - httpMethod = 'GET' - } else if (apiCall.method === 'createRole') { - httpMethod = 'POST' - } else if (apiCall.method === 'updateRole') { - httpMethod = 'PUT' - backendRoute = '/api/roles/:id' - } else if (apiCall.method === 'deleteRole') { - httpMethod = 'DELETE' - backendRoute = '/api/roles/:id' + // 如果是直接的API调用(type: 'api'),直接使用 + if (apiCall.type === 'api' && apiCall.method && apiCall.path) { + return { + frontend_route: route.path, + backend_route: apiCall.path, + http_method: apiCall.method, + module: module, + operation: `${apiCall.method} ${apiCall.path}`, + service: 'direct', + method: apiCall.method, + path: apiCall.path } } - return { - frontend_route: route.path, - backend_route: backendRoute, - http_method: httpMethod, - module: module, - operation: `${apiCall.service}.${apiCall.method}`, - service: apiCall.service, - method: apiCall.method + // 如果是服务调用(type: 'service'),需要进一步分析 + if (apiCall.type === 'service' && apiCall.service && apiCall.method) { + // 这里应该已经被enhanceApiCallsWithServiceAnalysis处理过了 + // 如果还是service类型,说明服务文件分析失败,使用默认映射 + console.warn(`⚠️ 服务调用 ${apiCall.service}.${apiCall.method} 无法解析为具体API`) + return null } + + return null } // 创建API映射 @@ -14637,582 +14597,5414 @@ const directRouteMappings = { "layer": "page", "apiCalls": [ { - "type": "service", - "service": "userService", - "method": "getUsers", + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", "arguments": [ null, null ], - "line": 69 + "line": 205 }, { - "type": "service", - "service": "userService", - "method": "updateUser", + "type": "api", + "method": "POST", + "path": "/auth/logout", "arguments": [ null, - "userForm" + null ], - "line": 139 + "line": 214 }, { - "type": "service", - "service": "userService", - "method": "createUser", + "type": "api", + "method": "POST", + "path": "/auth/logout", "arguments": [ - "userForm" + null ], - "line": 141 + "line": 221 }, { - "type": "service", - "service": "userService", - "method": "deleteUser", + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", "arguments": [ - "userId" + null ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], "line": 153 - } - ], - "methods": [ - "loadUsers", - "loadRoles", - "handleSearch", - "handleFilter", - "changePage", - "handlePageSizeChange", - "handleJumpPage", - "editUser", - "submitUser", - "deleteUser", - "assignRoles", - "closeModal", - "formatDate" - ] - }, - { - "route": "/user-profile", - "routeName": "UserProfile", - "component": "UserProfile", - "module": "user-profile", - "layer": "page", - "apiCalls": [ + }, { - "type": "service", - "service": "userService", - "method": "getCurrentUser", + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", "arguments": [ - "token" + "loginData" ], - "line": 45 - } - ], - "methods": [ - "loadUserProfile", - "refreshProfile", - "changePassword", - "forceChangePassword", - "onPasswordChangeSuccess", - "goToLogin", - "formatDate", - "getStatusText", - "getStatusClass" - ] - }, - { - "route": "/role-management", - "routeName": "RoleManagement", - "component": "RoleManagement", - "module": "role-management", - "layer": "page", - "apiCalls": [ + "line": 182 + }, { - "type": "service", - "service": "roleService", - "method": "getRoles", + "type": "api", + "method": "POST", + "path": "/auth/logout", "arguments": [ null, null ], - "line": 54 + "line": 205 }, { - "type": "service", - "service": "roleService", - "method": "updateRole", + "type": "api", + "method": "POST", + "path": "/auth/logout", "arguments": [ null, - "roleForm" + null ], - "line": 108 + "line": 214 }, { - "type": "service", - "service": "roleService", - "method": "createRole", + "type": "api", + "method": "POST", + "path": "/auth/logout", "arguments": [ - "roleForm" + null ], - "line": 118 + "line": 221 }, { - "type": "service", - "service": "roleService", - "method": "deleteRole", + "type": "api", + "method": "GET", + "path": "/auth/userinfo", "arguments": [ null ], - "line": 142 - } - ], - "methods": [ - "handleSearch", - "loadRoles", - "createNewRole", - "editRole", - "saveRole", - "deleteRole", - "resetForm", - "handleCurrentChange", - "handlePageSizeChange", - "handleJumpPage", - "formatDate", - "assignPermissions", - "handlePermissionsUpdated" - ] - } -], - - // 第二层:弹窗组件的数据操作API - modalMappings: [ - { - "component": "LoginModal", - "path": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", - "module": "user-management", - "layer": "modal", - "apiCalls": [ + "line": 245 + }, { - "type": "service", - "service": "userService", - "method": "login", + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", "arguments": [ null ], - "line": 106 + "line": 269 }, { - "type": "service", - "service": "userService", - "method": "getCaptcha", + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", "arguments": [], - "line": 209 + "line": 103 }, { - "type": "service", - "service": "userService", - "method": "getCaptcha", + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", "arguments": [], - "line": 230 - } - ], - "methods": [] - }, - { - "component": "PasswordChangeModal", - "path": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", - "module": "user-management", - "layer": "modal", - "apiCalls": [ + "line": 123 + }, { - "type": "service", - "service": "userService", - "method": "getPasswordPolicy", + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", "arguments": [], - "line": 97 + "line": 143 }, { - "type": "service", - "service": "userService", - "method": "validatePassword", + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", "arguments": [ + null, null ], - "line": 156 + "line": 205 }, { - "type": "service", - "service": "userService", - "method": "changePassword", + "type": "api", + "method": "POST", + "path": "/auth/logout", "arguments": [ - "requestData" + null, + null ], - "line": 314 - } - ], - "methods": [ - "loadPasswordPolicy", - "validatePassword", - "updateRequirements", - "calculatePasswordStrength", - "validateConfirmPassword", - "handleSubmit", - "handleClose", - "handleOverlayClick", - "clearCurrentPasswordError", - "clearNewPasswordError", - "clearConfirmPasswordError", - "handleNewPasswordInput", - "handleConfirmPasswordInput", - "resetFormState" + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + } + ], + "methods": [ + "loadUsers", + "loadRoles", + "handleSearch", + "handleFilter", + "changePage", + "handlePageSizeChange", + "handleJumpPage", + "editUser", + "submitUser", + "deleteUser", + "assignRoles", + "closeModal", + "formatDate" + ] + }, + { + "route": "/user-profile", + "routeName": "UserProfile", + "component": "UserProfile", + "module": "user-profile", + "layer": "page", + "apiCalls": [ + { + "type": "service", + "service": "userService", + "method": "getCurrentUser", + "arguments": [ + "token" + ], + "line": 45 + } + ], + "methods": [ + "loadUserProfile", + "refreshProfile", + "changePassword", + "forceChangePassword", + "onPasswordChangeSuccess", + "goToLogin", + "formatDate", + "getStatusText", + "getStatusClass" + ] + }, + { + "route": "/role-management", + "routeName": "RoleManagement", + "component": "RoleManagement", + "module": "role-management", + "layer": "page", + "apiCalls": [ + { + "type": "api", + "method": "GET", + "path": "/auth/roles", + "arguments": [ + null + ], + "line": 48 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/roles", + "arguments": [ + "roleData" + ], + "line": 70 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/permissions", + "arguments": [], + "line": 100 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/roles", + "arguments": [ + null + ], + "line": 48 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/roles", + "arguments": [ + "roleData" + ], + "line": 70 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/permissions", + "arguments": [], + "line": 100 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/roles", + "arguments": [ + null + ], + "line": 48 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/roles", + "arguments": [ + "roleData" + ], + "line": 70 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/permissions", + "arguments": [], + "line": 100 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/roles", + "arguments": [ + null + ], + "line": 48 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/roles", + "arguments": [ + "roleData" + ], + "line": 70 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/permissions", + "arguments": [], + "line": 100 + } + ], + "methods": [ + "handleSearch", + "loadRoles", + "createNewRole", + "editRole", + "saveRole", + "deleteRole", + "resetForm", + "handleCurrentChange", + "handlePageSizeChange", + "handleJumpPage", + "formatDate", + "assignPermissions", + "handlePermissionsUpdated" ] } ], - // 分析信息 - analysisInfo: { - phase: 'phase1', - description: '第一阶段:收集直接映射关系', - timestamp: new Date().toISOString(), - pageCount: 3, - modalCount: 2, - totalApiCalls: 15 - } -} - -// 按模块分组的映射 -const moduleMappings = { - "user-management": { + // 第二层:弹窗组件的数据操作API + modalMappings: [ + { + "component": "LoginModal", + "path": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "module": "user-management", + "layer": "modal", + "apiCalls": [ + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + } + ], + "methods": [] + }, + { + "component": "PasswordChangeModal", + "path": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "module": "user-management", + "layer": "modal", + "apiCalls": [ + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + } + ], + "methods": [ + "loadPasswordPolicy", + "validatePassword", + "updateRequirements", + "calculatePasswordStrength", + "validateConfirmPassword", + "handleSubmit", + "handleClose", + "handleOverlayClick", + "clearCurrentPasswordError", + "clearNewPasswordError", + "clearConfirmPasswordError", + "handleNewPasswordInput", + "handleConfirmPasswordInput", + "resetFormState" + ] + } +], + + // 分析信息 + analysisInfo: { + phase: 'phase1', + description: '第一阶段:收集直接映射关系', + timestamp: new Date().toISOString(), + pageCount: 3, + modalCount: 2, + totalApiCalls: 173 + } +} + +// 按模块分组的映射 +const moduleMappings = { + "user-management": { + "pages": [ + { + "route": "/user-management", + "routeName": "UserManagement", + "component": "UserManagement", + "module": "user-management", + "layer": "page", + "apiCalls": [ + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + } + ], + "methods": [ + "loadUsers", + "loadRoles", + "handleSearch", + "handleFilter", + "changePage", + "handlePageSizeChange", + "handleJumpPage", + "editUser", + "submitUser", + "deleteUser", + "assignRoles", + "closeModal", + "formatDate" + ] + } + ], + "modals": [ + { + "component": "LoginModal", + "path": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "module": "user-management", + "layer": "modal", + "apiCalls": [ + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + } + ], + "methods": [] + }, + { + "component": "PasswordChangeModal", + "path": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "module": "user-management", + "layer": "modal", + "apiCalls": [ + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + }, + { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + } + ], + "methods": [ + "loadPasswordPolicy", + "validatePassword", + "updateRequirements", + "calculatePasswordStrength", + "validateConfirmPassword", + "handleSubmit", + "handleClose", + "handleOverlayClick", + "clearCurrentPasswordError", + "clearNewPasswordError", + "clearConfirmPasswordError", + "handleNewPasswordInput", + "handleConfirmPasswordInput", + "resetFormState" + ] + } + ] + }, + "user-profile": { + "pages": [ + { + "route": "/user-profile", + "routeName": "UserProfile", + "component": "UserProfile", + "module": "user-profile", + "layer": "page", + "apiCalls": [ + { + "type": "service", + "service": "userService", + "method": "getCurrentUser", + "arguments": [ + "token" + ], + "line": 45 + } + ], + "methods": [ + "loadUserProfile", + "refreshProfile", + "changePassword", + "forceChangePassword", + "onPasswordChangeSuccess", + "goToLogin", + "formatDate", + "getStatusText", + "getStatusClass" + ] + } + ], + "modals": [] + }, + "role-management": { + "pages": [ + { + "route": "/role-management", + "routeName": "RoleManagement", + "component": "RoleManagement", + "module": "role-management", + "layer": "page", + "apiCalls": [ + { + "type": "api", + "method": "GET", + "path": "/auth/roles", + "arguments": [ + null + ], + "line": 48 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/roles", + "arguments": [ + "roleData" + ], + "line": 70 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/permissions", + "arguments": [], + "line": 100 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/roles", + "arguments": [ + null + ], + "line": 48 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/roles", + "arguments": [ + "roleData" + ], + "line": 70 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/permissions", + "arguments": [], + "line": 100 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/roles", + "arguments": [ + null + ], + "line": 48 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/roles", + "arguments": [ + "roleData" + ], + "line": 70 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/permissions", + "arguments": [], + "line": 100 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/roles", + "arguments": [ + null + ], + "line": 48 + }, + { + "type": "api", + "method": "POST", + "path": "/auth/roles", + "arguments": [ + "roleData" + ], + "line": 70 + }, + { + "type": "api", + "method": "GET", + "path": "/auth/permissions", + "arguments": [], + "line": 100 + } + ], + "methods": [ + "handleSearch", + "loadRoles", + "createNewRole", + "editRole", + "saveRole", + "deleteRole", + "resetForm", + "handleCurrentChange", + "handlePageSizeChange", + "handleJumpPage", + "formatDate", + "assignPermissions", + "handlePermissionsUpdated" + ] + } + ], + "modals": [] + } +} + +// 按API路径分组的映射 +const apiPathMappings = { + "GET /auth/admin/users": { + "pages": [ + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + } + } + ], + "modals": [ + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/users", + "arguments": [ + null + ], + "line": 51 + } + } + ] + }, + "POST /auth/admin/users": { + "pages": [ + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + } + } + ], + "modals": [ + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/admin/users", + "arguments": [ + "userData" + ], + "line": 73 + } + } + ] + }, + "GET /auth/admin/roles": { + "pages": [ + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + } + } + ], + "modals": [ + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/admin/roles", + "arguments": [], + "line": 103 + } + } + ] + }, + "POST /auth/change-password": { + "pages": [ + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + } + } + ], + "modals": [ + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 113 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/change-password", + "arguments": [ + "passwordData" + ], + "line": 259 + } + } + ] + }, + "GET /auth/password-policy": { + "pages": [ + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + } + } + ], + "modals": [ + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-policy", + "arguments": [], + "line": 123 + } + } + ] + }, + "POST /auth/validate-password": { + "pages": [ + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + } + } + ], + "modals": [ + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/validate-password", + "arguments": [ + null + ], + "line": 133 + } + } + ] + }, + "GET /auth/password-status": { + "pages": [ + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + } + } + ], + "modals": [ + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/password-status", + "arguments": [], + "line": 143 + } + } + ] + }, + "GET /permissions": { + "pages": [ + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + } + } + ], + "modals": [ + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/permissions", + "arguments": [], + "line": 153 + } + } + ] + }, + "GET /auth/captcha": { + "pages": [ + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + } + } + ], + "modals": [ + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/captcha", + "arguments": [], + "line": 163 + } + } + ] + }, + "POST /auth/login": { + "pages": [ + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + } + } + ], + "modals": [ + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/login", + "arguments": [ + "loginData" + ], + "line": 182 + } + } + ] + }, + "POST /auth/logout": { + "pages": [ + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + } + } + ], + "modals": [ + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 205 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null, + null + ], + "line": 214 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/logout", + "arguments": [ + null + ], + "line": 221 + } + } + ] + }, + "GET /auth/userinfo": { "pages": [ { + "component": "UserManagement", + "module": "user-management", "route": "/user-management", - "routeName": "UserManagement", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + } + }, + { "component": "UserManagement", "module": "user-management", - "layer": "page", - "apiCalls": [ - { - "type": "service", - "service": "userService", - "method": "getUsers", - "arguments": [ - null, - null - ], - "line": 69 - }, - { - "type": "service", - "service": "userService", - "method": "updateUser", - "arguments": [ - null, - "userForm" - ], - "line": 139 - }, - { - "type": "service", - "service": "userService", - "method": "createUser", - "arguments": [ - "userForm" - ], - "line": 141 - }, - { - "type": "service", - "service": "userService", - "method": "deleteUser", - "arguments": [ - "userId" - ], - "line": 153 - } - ], - "methods": [ - "loadUsers", - "loadRoles", - "handleSearch", - "handleFilter", - "changePage", - "handlePageSizeChange", - "handleJumpPage", - "editUser", - "submitUser", - "deleteUser", - "assignRoles", - "closeModal", - "formatDate" - ] + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + } + }, + { + "component": "UserManagement", + "module": "user-management", + "route": "/user-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + } } ], "modals": [ { "component": "LoginModal", - "path": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", "module": "user-management", - "layer": "modal", - "apiCalls": [ - { - "type": "service", - "service": "userService", - "method": "login", - "arguments": [ - null - ], - "line": 106 - }, - { - "type": "service", - "service": "userService", - "method": "getCaptcha", - "arguments": [], - "line": 209 - }, - { - "type": "service", - "service": "userService", - "method": "getCaptcha", - "arguments": [], - "line": 230 - } - ], - "methods": [] + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + } }, { - "component": "PasswordChangeModal", - "path": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "component": "LoginModal", "module": "user-management", - "layer": "modal", - "apiCalls": [ - { - "type": "service", - "service": "userService", - "method": "getPasswordPolicy", - "arguments": [], - "line": 97 - }, - { - "type": "service", - "service": "userService", - "method": "validatePassword", - "arguments": [ - null - ], - "line": 156 - }, - { - "type": "service", - "service": "userService", - "method": "changePassword", - "arguments": [ - "requestData" - ], - "line": 314 - } - ], - "methods": [ - "loadPasswordPolicy", - "validatePassword", - "updateRequirements", - "calculatePasswordStrength", - "validateConfirmPassword", - "handleSubmit", - "handleClose", - "handleOverlayClick", - "clearCurrentPasswordError", - "clearNewPasswordError", - "clearConfirmPasswordError", - "handleNewPasswordInput", - "handleConfirmPasswordInput", - "resetFormState" - ] - } - ] - }, - "user-profile": { - "pages": [ + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + } + }, { - "route": "/user-profile", - "routeName": "UserProfile", - "component": "UserProfile", - "module": "user-profile", - "layer": "page", - "apiCalls": [ - { - "type": "service", - "service": "userService", - "method": "getCurrentUser", - "arguments": [ - "token" - ], - "line": 45 - } - ], - "methods": [ - "loadUserProfile", - "refreshProfile", - "changePassword", - "forceChangePassword", - "onPasswordChangeSuccess", - "goToLogin", - "formatDate", - "getStatusText", - "getStatusClass" - ] - } - ], - "modals": [] - }, - "role-management": { - "pages": [ + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + } + }, { - "route": "/role-management", - "routeName": "RoleManagement", - "component": "RoleManagement", - "module": "role-management", - "layer": "page", - "apiCalls": [ - { - "type": "service", - "service": "roleService", - "method": "getRoles", - "arguments": [ - null, - null - ], - "line": 54 - }, - { - "type": "service", - "service": "roleService", - "method": "updateRole", - "arguments": [ - null, - "roleForm" - ], - "line": 108 - }, - { - "type": "service", - "service": "roleService", - "method": "createRole", - "arguments": [ - "roleForm" - ], - "line": 118 - }, - { - "type": "service", - "service": "roleService", - "method": "deleteRole", - "arguments": [ - null - ], - "line": 142 - } - ], - "methods": [ - "handleSearch", - "loadRoles", - "createNewRole", - "editRole", - "saveRole", - "deleteRole", - "resetForm", - "handleCurrentChange", - "handlePageSizeChange", - "handleJumpPage", - "formatDate", - "assignPermissions", - "handlePermissionsUpdated" - ] + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/userinfo", + "arguments": [ + null + ], + "line": 245 + } } - ], - "modals": [] - } -} - -// 按API路径分组的映射 -const apiPathMappings = { - "userService.getUsers": { + ] + }, + "POST /auth/reset-password": { "pages": [ { "component": "UserManagement", "module": "user-management", "route": "/user-management", "apiCall": { - "type": "service", - "service": "userService", - "method": "getUsers", + "type": "api", + "method": "POST", + "path": "/auth/reset-password", "arguments": [ - null, null ], - "line": 69 + "line": 269 } - } - ], - "modals": [] - }, - "userService.updateUser": { - "pages": [ + }, { "component": "UserManagement", "module": "user-management", "route": "/user-management", "apiCall": { - "type": "service", - "service": "userService", - "method": "updateUser", + "type": "api", + "method": "POST", + "path": "/auth/reset-password", "arguments": [ - null, - "userForm" + null ], - "line": 139 + "line": 269 } - } - ], - "modals": [] - }, - "userService.createUser": { - "pages": [ + }, { "component": "UserManagement", "module": "user-management", "route": "/user-management", "apiCall": { - "type": "service", - "service": "userService", - "method": "createUser", + "type": "api", + "method": "POST", + "path": "/auth/reset-password", "arguments": [ - "userForm" + null ], - "line": 141 + "line": 269 } - } - ], - "modals": [] - }, - "userService.deleteUser": { - "pages": [ + }, { "component": "UserManagement", "module": "user-management", "route": "/user-management", "apiCall": { - "type": "service", - "service": "userService", - "method": "deleteUser", + "type": "api", + "method": "POST", + "path": "/auth/reset-password", "arguments": [ - "userId" + null ], - "line": 153 + "line": 269 } } ], - "modals": [] + "modals": [ + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + } + }, + { + "component": "LoginModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + } + }, + { + "component": "PasswordChangeModal", + "module": "user-management", + "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/reset-password", + "arguments": [ + null + ], + "line": 269 + } + } + ] }, "userService.getCurrentUser": { "pages": [ @@ -15233,186 +20025,180 @@ const apiPathMappings = { ], "modals": [] }, - "roleService.getRoles": { + "GET /auth/roles": { "pages": [ { "component": "RoleManagement", "module": "role-management", "route": "/role-management", "apiCall": { - "type": "service", - "service": "roleService", - "method": "getRoles", + "type": "api", + "method": "GET", + "path": "/auth/roles", "arguments": [ - null, null ], - "line": 54 + "line": 48 } - } - ], - "modals": [] - }, - "roleService.updateRole": { - "pages": [ + }, { "component": "RoleManagement", "module": "role-management", "route": "/role-management", "apiCall": { - "type": "service", - "service": "roleService", - "method": "updateRole", + "type": "api", + "method": "GET", + "path": "/auth/roles", "arguments": [ - null, - "roleForm" + null ], - "line": 108 + "line": 48 } - } - ], - "modals": [] - }, - "roleService.createRole": { - "pages": [ + }, { "component": "RoleManagement", "module": "role-management", "route": "/role-management", "apiCall": { - "type": "service", - "service": "roleService", - "method": "createRole", + "type": "api", + "method": "GET", + "path": "/auth/roles", "arguments": [ - "roleForm" + null ], - "line": 118 + "line": 48 } - } - ], - "modals": [] - }, - "roleService.deleteRole": { - "pages": [ + }, { "component": "RoleManagement", "module": "role-management", "route": "/role-management", "apiCall": { - "type": "service", - "service": "roleService", - "method": "deleteRole", + "type": "api", + "method": "GET", + "path": "/auth/roles", "arguments": [ null ], - "line": 142 + "line": 48 } } ], "modals": [] }, - "userService.login": { - "pages": [], - "modals": [ + "POST /auth/roles": { + "pages": [ { - "component": "LoginModal", - "module": "user-management", - "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "component": "RoleManagement", + "module": "role-management", + "route": "/role-management", "apiCall": { - "type": "service", - "service": "userService", - "method": "login", + "type": "api", + "method": "POST", + "path": "/auth/roles", "arguments": [ - null + "roleData" ], - "line": 106 + "line": 70 } - } - ] - }, - "userService.getCaptcha": { - "pages": [], - "modals": [ + }, { - "component": "LoginModal", - "module": "user-management", - "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "component": "RoleManagement", + "module": "role-management", + "route": "/role-management", "apiCall": { - "type": "service", - "service": "userService", - "method": "getCaptcha", - "arguments": [], - "line": 209 + "type": "api", + "method": "POST", + "path": "/auth/roles", + "arguments": [ + "roleData" + ], + "line": 70 } }, { - "component": "LoginModal", - "module": "user-management", - "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", + "component": "RoleManagement", + "module": "role-management", + "route": "/role-management", "apiCall": { - "type": "service", - "service": "userService", - "method": "getCaptcha", - "arguments": [], - "line": 230 + "type": "api", + "method": "POST", + "path": "/auth/roles", + "arguments": [ + "roleData" + ], + "line": 70 + } + }, + { + "component": "RoleManagement", + "module": "role-management", + "route": "/role-management", + "apiCall": { + "type": "api", + "method": "POST", + "path": "/auth/roles", + "arguments": [ + "roleData" + ], + "line": 70 } } - ] + ], + "modals": [] }, - "userService.getPasswordPolicy": { - "pages": [], - "modals": [ + "GET /auth/permissions": { + "pages": [ { - "component": "PasswordChangeModal", - "module": "user-management", - "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "component": "RoleManagement", + "module": "role-management", + "route": "/role-management", "apiCall": { - "type": "service", - "service": "userService", - "method": "getPasswordPolicy", + "type": "api", + "method": "GET", + "path": "/auth/permissions", "arguments": [], - "line": 97 + "line": 100 } - } - ] - }, - "userService.validatePassword": { - "pages": [], - "modals": [ + }, { - "component": "PasswordChangeModal", - "module": "user-management", - "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "component": "RoleManagement", + "module": "role-management", + "route": "/role-management", "apiCall": { - "type": "service", - "service": "userService", - "method": "validatePassword", - "arguments": [ - null - ], - "line": 156 + "type": "api", + "method": "GET", + "path": "/auth/permissions", + "arguments": [], + "line": 100 } - } - ] - }, - "userService.changePassword": { - "pages": [], - "modals": [ + }, { - "component": "PasswordChangeModal", - "module": "user-management", - "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", + "component": "RoleManagement", + "module": "role-management", + "route": "/role-management", "apiCall": { - "type": "service", - "service": "userService", - "method": "changePassword", - "arguments": [ - "requestData" - ], - "line": 314 + "type": "api", + "method": "GET", + "path": "/auth/permissions", + "arguments": [], + "line": 100 + } + }, + { + "component": "RoleManagement", + "module": "role-management", + "route": "/role-management", + "apiCall": { + "type": "api", + "method": "GET", + "path": "/auth/permissions", + "arguments": [], + "line": 100 } } - ] + ], + "modals": [] } } @@ -16773,7 +21559,7 @@ __webpack_require__.r(__webpack_exports__); /******/ /******/ /* webpack/runtime/getFullHash */ /******/ (() => { -/******/ __webpack_require__.h = () => ("7a6f5a3e5f16c931") +/******/ __webpack_require__.h = () => ("d5dc407cc013d189") /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ diff --git a/gofaster/app/plugins/route-mapping-plugin.js b/gofaster/app/plugins/route-mapping-plugin.js index 68ef6a8..78e8463 100644 --- a/gofaster/app/plugins/route-mapping-plugin.js +++ b/gofaster/app/plugins/route-mapping-plugin.js @@ -162,16 +162,22 @@ function routeMappingPlugin() { console.log('🔄 检测到需要重新生成路由映射文件') // 1. 分析路由配置 - const routes = this.analyzeRoutes() + const routes = this.analyzeRoutes() - // 2. 分析页面组件(第一层) - const pageMappings = this.analyzePageComponents(routes) + // 2. 收集API信息(第一层) + const apiMappings = this.collectApiMappings(routes) - // 3. 分析弹窗组件(第二层) - const modalMappings = this.analyzeModalComponents() + // 3. 关联页面与API(第三层) + const enhancedApiMappings = this.associatePagesWithApi(routes, apiMappings) - // 4. 生成映射文件 - this.generateMappingFile(pageMappings, modalMappings) + // 4. 清理和优化API映射(第四层) + const optimizedApiMappings = this.optimizeApiMappings(routes, enhancedApiMappings) + + // 5. 分析组件关联关系并完善路径信息(第五层) + const { componentRelationships, enhancedApiMappings: finalApiMappings } = this.analyzeComponentRelationships(routes, optimizedApiMappings) + + // 6. 生成最终映射文件 + this.generateTestFile(routes, finalApiMappings) console.log('✅ 第一阶段直接映射关系收集完成') } else { @@ -222,6 +228,8 @@ function routeMappingPlugin() { if (route.path) { route.module = self.extractModuleFromPath(route.path) + // 添加description属性 + route.description = self.getRouteDescription(route.module, route.path) routes.push(route) } } @@ -230,54 +238,557 @@ function routeMappingPlugin() { return routes }, - // 分析页面组件(第一层) - analyzePageComponents(routes) { - const pageMappings = [] + + // 分析单个服务文件的API映射 + analyzeServiceFileForApiMappings(servicePath, serviceName, moduleName) { + try { + const content = readFileSync(servicePath, 'utf-8') + const ast = parser.parse(content, { + sourceType: 'module', + plugins: ['jsx'] + }) + + const apiMappings = [] + const self = this + + traverse(ast, { + // 查找函数定义 + FunctionDeclaration(path) { + const functionName = path.node.id?.name + if (functionName) { + // 分析函数内部的API调用 + const apiCalls = self.extractApiCallsFromFunction(path) + apiCalls.forEach(apiCall => { + apiMappings.push({ + methodName: functionName, + method: apiCall.method, + path: apiCall.path, + line: apiCall.line + }) + }) + } + }, + + // 查找箭头函数和函数表达式 + VariableDeclarator(path) { + if (path.node.init && (path.node.init.type === 'ArrowFunctionExpression' || path.node.init.type === 'FunctionExpression')) { + const functionName = path.node.id?.name + if (functionName) { + const apiCalls = self.extractApiCallsFromFunction(path.get('init')) + apiCalls.forEach(apiCall => { + apiMappings.push({ + methodName: functionName, + method: apiCall.method, + path: apiCall.path, + line: apiCall.line + }) + }) + } + } + }, + + // 查找对象方法定义 + ObjectMethod(path) { + const methodName = path.node.key?.name + if (methodName) { + const apiCalls = self.extractApiCallsFromFunction(path) + apiCalls.forEach(apiCall => { + apiMappings.push({ + methodName: methodName, + method: apiCall.method, + path: apiCall.path, + line: apiCall.line + }) + }) + } + }, + + // 查找对象属性中的函数 + ObjectProperty(path) { + if (path.node.value && (path.node.value.type === 'ArrowFunctionExpression' || path.node.value.type === 'FunctionExpression')) { + const methodName = path.node.key?.name + if (methodName) { + const apiCalls = self.extractApiCallsFromFunction(path.get('value')) + apiCalls.forEach(apiCall => { + apiMappings.push({ + methodName: methodName, + method: apiCall.method, + path: apiCall.path, + line: apiCall.line + }) + }) + } + } + } + }) + + return apiMappings + } catch (error) { + console.warn(`⚠️ 分析服务文件失败: ${servicePath}`, error.message) + return [] + } + }, + + // 从函数中提取API调用 + extractApiCallsFromFunction(functionPath) { + const apiCalls = [] + const self = this + + // 使用正确的traverse调用方式 + if (functionPath.node) { + traverse(functionPath.node, { + CallExpression(path) { + const callInfo = self.extractApiCall(path) + if (callInfo && callInfo.path) { + apiCalls.push(callInfo) + } + } + }, functionPath.scope, functionPath) + } + return apiCalls + }, + + // 第二步(第一层):收集API信息 + collectApiMappings(routes) { + const apiMappings = [] + const moduleDirs = this.readModuleNamesFromConfig() + + moduleDirs.forEach(moduleName => { + const servicesPath = resolve(__dirname, `../src/renderer/modules/${moduleName}/services`) + + if (existsSync(servicesPath)) { + const serviceFiles = readdirSync(servicesPath).filter(f => f.endsWith('.js')) + + serviceFiles.forEach(serviceFile => { + const serviceName = serviceFile.replace('.js', '') + const servicePath = resolve(servicesPath, serviceFile) + const serviceApiMappings = this.analyzeServiceFileForApiMappings(servicePath, serviceName, moduleName) + + if (serviceApiMappings.length > 0) { + apiMappings.push({ + module: moduleName, + serviceName: serviceName, + servicePath: servicePath, + apiMappings: serviceApiMappings + }) + } + }) + } else { + console.warn(`⚠️ 模块 ${moduleName} 的services目录不存在: ${servicesPath}`) + } + }) + + return apiMappings + }, + + // 第三步:关联页面与API + associatePagesWithApi(routes, apiMappings) { + + // 为每个API映射添加调用该API的页面信息 + const enhancedApiMappings = apiMappings.map(moduleMapping => { + const enhancedApiMappings = moduleMapping.apiMappings.map(apiMapping => { + // 查找调用该API方法的组件 + const callingComponents = this.findComponentsCallingApiMethod( + routes, + moduleMapping.module, + moduleMapping.serviceName, + apiMapping.methodName + ) + + return { + ...apiMapping, + callingComponents: callingComponents + } + }) + + return { + ...moduleMapping, + apiMappings: enhancedApiMappings + } + }) + + return enhancedApiMappings + }, + + // 查找调用特定API方法的组件 + findComponentsCallingApiMethod(routes, moduleName, serviceName, methodName) { + const callingComponents = [] + + // 1. 遍历所有路由,查找调用该API方法的页面组件 routes.forEach(route => { - if (route.component) { - const componentAnalysis = this.analyzeComponent(route.component, route.path) - if (componentAnalysis && componentAnalysis.apiCalls.length > 0) { - pageMappings.push({ - route: route.path, - routeName: route.name, - component: route.component, - module: route.module, - layer: 'page', - apiCalls: componentAnalysis.apiCalls, - methods: componentAnalysis.methods - }) + if (route.module === moduleName) { + const componentAnalysis = this.analyzeComponentForServiceCalls( + route.component, + route.path, + moduleName + ) + + if (componentAnalysis && componentAnalysis.serviceCalls) { + // 检查是否有调用该服务方法的调用 + const hasServiceCall = componentAnalysis.serviceCalls.some(serviceCall => + serviceCall.type === 'service' && + serviceCall.service === serviceName && + serviceCall.method === methodName + ) + + if (hasServiceCall) { + callingComponents.push(route.component) + } + } + } + }) + + // 2. 搜索模块的components目录,查找调用该API方法的组件 + const componentsInModule = this.findComponentsInModule(moduleName) + componentsInModule.forEach(componentName => { + const componentAnalysis = this.analyzeComponentForServiceCalls( + componentName, + null, // components目录中的组件没有路由路径 + moduleName + ) + + if (componentAnalysis && componentAnalysis.serviceCalls) { + // 检查是否有调用该服务方法的调用 + const hasServiceCall = componentAnalysis.serviceCalls.some(serviceCall => + serviceCall.type === 'service' && + serviceCall.service === serviceName && + serviceCall.method === methodName + ) + + if (hasServiceCall) { + callingComponents.push(componentName) + } + } + }) + + // 去重 + return [...new Set(callingComponents)] + }, + + // 查找模块中的所有组件 + findComponentsInModule(moduleName) { + const components = [] + + try { + // 查找views目录中的组件 + const viewsPath = resolve(__dirname, `../src/renderer/modules/${moduleName}/views`) + if (existsSync(viewsPath)) { + const viewFiles = readdirSync(viewsPath).filter(f => f.endsWith('.vue')) + viewFiles.forEach(file => { + components.push(file.replace('.vue', '')) + }) + } + + // 查找components目录中的组件 + const componentsPath = resolve(__dirname, `../src/renderer/modules/${moduleName}/components`) + if (existsSync(componentsPath)) { + const componentFiles = readdirSync(componentsPath).filter(f => f.endsWith('.vue')) + componentFiles.forEach(file => { + components.push(file.replace('.vue', '')) + }) + } + } catch (error) { + console.warn(`⚠️ 查找模块组件失败: ${moduleName}`, error.message) + } + + return components + }, + + // 第四步:清理和优化API映射 + optimizeApiMappings(routes, apiMappings) { + + const optimizedApiMappings = apiMappings.map(moduleMapping => { + // 过滤掉callingComponents为空的API映射 + const filteredApiMappings = moduleMapping.apiMappings.filter(apiMapping => { + return apiMapping.callingComponents && apiMapping.callingComponents.length > 0 + }) + + // 为每个API映射的callingComponents添加路径信息 + const enhancedApiMappings = filteredApiMappings.map(apiMapping => { + const enhancedCallingComponents = apiMapping.callingComponents.map(componentName => { + // 在routes中查找匹配的组件 + const matchingRoute = routes.find(route => route.component === componentName) + + if (matchingRoute) { + return { + component: componentName, + path: matchingRoute.path + } + } else { + // 如果找不到匹配的路由,只返回组件名 + return { + component: componentName, + path: null + } + } + }) + + return { + ...apiMapping, + callingComponents: enhancedCallingComponents } + }) + + return { + ...moduleMapping, + apiMappings: enhancedApiMappings + } + }).filter(moduleMapping => moduleMapping.apiMappings.length > 0) // 过滤掉没有API映射的模块 + + const totalRemoved = apiMappings.reduce((sum, module) => + sum + module.apiMappings.length, 0) - optimizedApiMappings.reduce((sum, module) => + sum + module.apiMappings.length, 0) + + return optimizedApiMappings + }, + + // 第五步:分析组件关联关系并完善路径信息 + analyzeComponentRelationships(routes, apiMappings) { + + // 1. 首先收集组件关联关系 + const componentRelationships = [] + routes.forEach(route => { + if (route.component) { + const relationships = this.findComponentRelationships(route.component, route.path, route.module) + componentRelationships.push(...relationships) } }) - return pageMappings + + // 2. 完善API映射中的路径信息 + const enhancedApiMappings = this.enhanceApiMappingsWithPaths(routes, apiMappings, componentRelationships) + + + return { componentRelationships, enhancedApiMappings } }, - // 分析弹窗组件(第二层) - analyzeModalComponents() { - const modalMappings = [] - const modalFiles = this.findModalFiles() + // 完善API映射中的路径信息 + enhanceApiMappingsWithPaths(routes, apiMappings, componentRelationships) { + + let enhancedCount = 0 - modalFiles.forEach(modalFile => { - const analysis = this.analyzeComponent(modalFile.name, modalFile.path) - if (analysis && analysis.apiCalls.length > 0) { - modalMappings.push({ - component: modalFile.name, - path: modalFile.path, - module: modalFile.module, - layer: 'modal', - apiCalls: analysis.apiCalls, - methods: analysis.methods + // 遍历每个模块的API映射 + const enhancedApiMappings = apiMappings.map(moduleMapping => { + const enhancedModuleApiMappings = moduleMapping.apiMappings.map(apiMapping => { + const enhancedCallingComponents = apiMapping.callingComponents.map(callingComponent => { + // 如果path为空,尝试通过组件关系找到根组件路径 + if (callingComponent.path === null) { + const rootPath = this.findRootComponentPath( + callingComponent.component, + componentRelationships, + routes + ) + + if (rootPath) { + enhancedCount++ + return { + ...callingComponent, + path: rootPath + } + } + } + + return callingComponent }) + + return { + ...apiMapping, + callingComponents: enhancedCallingComponents + } + }) + + return { + ...moduleMapping, + apiMappings: enhancedModuleApiMappings } }) - return modalMappings + return enhancedApiMappings + }, + + // 通过组件关系找到根组件路径 + findRootComponentPath(targetComponent, componentRelationships, routes) { + // 递归查找组件关系链,直到找到根组件 + const findParent = (componentName, visited = new Set()) => { + // 避免循环引用 + if (visited.has(componentName)) { + return null + } + visited.add(componentName) + + // 查找该组件的父组件 + const parentRelationship = componentRelationships.find(rel => + rel.toComponent === componentName + ) + + if (parentRelationship) { + const parentComponent = parentRelationship.fromComponent + + // 检查父组件是否为路由表中的根组件 + const route = routes.find(route => route.component === parentComponent) + if (route) { + return route.path + } + + // 如果父组件不是根组件,继续向上查找 + return findParent(parentComponent, visited) + } + + return null + } + + return findParent(targetComponent) + }, + + // 查找单个组件的关联关系 + findComponentRelationships(componentName, componentPath, moduleName) { + const relationships = [] + + try { + // 查找组件文件 + const componentFile = this.findComponentFile(componentName) + if (!componentFile || !existsSync(componentFile)) { + return relationships + } + + const content = readFileSync(componentFile, 'utf-8') + + if (componentFile.endsWith('.vue')) { + const { descriptor } = parse(content) + const scriptContent = descriptor.script?.content || '' + const templateContent = descriptor.template?.content || '' + + // 分析模板中的组件引用 + const templateRelationships = this.analyzeTemplateForComponents(templateContent, componentName) + relationships.push(...templateRelationships) + + // 分析脚本中的组件引用 + if (scriptContent) { + const scriptRelationships = this.analyzeScriptForComponents(scriptContent, componentName) + relationships.push(...scriptRelationships) + } + } + } catch (error) { + console.warn(`⚠️ 分析组件关联关系失败: ${componentName}`, error.message) + } + + return relationships + }, + + // 分析模板中的组件引用 + analyzeTemplateForComponents(templateContent, fromComponent) { + const relationships = [] + + // 查找组件标签(如 ) + const componentTagRegex = /<([A-Z][a-zA-Z0-9]*)/g + let match + + while ((match = componentTagRegex.exec(templateContent)) !== null) { + const componentTag = match[1] + + // 跳过HTML标签 + if (this.isHtmlTag(componentTag)) { + continue + } + + // 确定关联类型 + let relationship = 'embed' // 默认是嵌入关系 + + // 检查是否是弹窗组件 + if (this.isModalComponent(componentTag, templateContent, match.index)) { + relationship = 'modal' + } + + relationships.push({ + fromComponent: fromComponent, + toComponent: componentTag, + relationship: relationship + }) + } + + return relationships + }, + + // 分析脚本中的组件引用 + analyzeScriptForComponents(scriptContent, fromComponent) { + const relationships = [] + + try { + const ast = parser.parse(scriptContent, { + sourceType: 'module', + plugins: ['jsx'] + }) + + const self = this + traverse(ast, { + // 查找import语句 + ImportDeclaration(path) { + const source = path.node.source.value + if (source.startsWith('./') || source.startsWith('../')) { + // 相对路径导入,可能是组件 + const importedNames = path.node.specifiers.map(spec => { + if (spec.type === 'ImportDefaultSpecifier') { + return spec.local.name + } else if (spec.type === 'ImportSpecifier') { + return spec.imported.name + } + return null + }).filter(Boolean) + + importedNames.forEach(importedName => { + if (self.isComponentName(importedName)) { + relationships.push({ + fromComponent: fromComponent, + toComponent: importedName, + relationship: 'import' + }) + } + }) + } + } + }) + } catch (error) { + console.warn(`⚠️ 分析脚本组件引用失败: ${fromComponent}`, error.message) + } + + return relationships + }, + + // 判断是否是HTML标签 + isHtmlTag(tagName) { + const htmlTags = [ + 'div', 'span', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', + 'button', 'input', 'form', 'table', 'tr', 'td', 'th', + 'ul', 'ol', 'li', 'a', 'img', 'select', 'option', + 'textarea', 'label', 'fieldset', 'legend', 'section', + 'article', 'header', 'footer', 'nav', 'aside', 'main' + ] + return htmlTags.includes(tagName.toLowerCase()) + }, + + // 判断是否是弹窗组件 + isModalComponent(componentTag, templateContent, startIndex) { + // 查找组件标签周围的上下文 + const beforeContext = templateContent.substring(Math.max(0, startIndex - 100), startIndex) + const afterContext = templateContent.substring(startIndex, Math.min(templateContent.length, startIndex + 200)) + + // 检查是否包含弹窗相关的关键词 + const modalKeywords = ['modal', 'dialog', 'popup', 'overlay', 'v-if', 'v-show'] + const context = (beforeContext + afterContext).toLowerCase() + + return modalKeywords.some(keyword => context.includes(keyword)) }, - // 分析单个组件 - analyzeComponent(componentName, componentPath) { + // 判断是否是组件名称 + isComponentName(name) { + // Vue组件通常以大写字母开头 + return /^[A-Z]/.test(name) && name.length > 2 + }, + + + // 分析组件中的服务调用 + analyzeComponentForServiceCalls(componentName, componentPath, moduleName) { try { let filePath = componentPath @@ -294,9 +805,9 @@ function routeMappingPlugin() { const content = readFileSync(filePath, 'utf-8') if (filePath.endsWith('.vue')) { - return this.analyzeVueComponent(content, componentName) + return this.analyzeVueComponentForServiceCalls(content, componentName, moduleName) } else { - return this.analyzeJavaScriptComponent(content, componentName) + return this.analyzeJavaScriptComponentForServiceCalls(content, componentName, moduleName) } } catch (error) { console.warn(`⚠️ 分析组件失败: ${componentName}`, error.message) @@ -304,13 +815,13 @@ function routeMappingPlugin() { } }, - // 分析Vue组件 - analyzeVueComponent(content, componentName) { + // 分析Vue组件中的服务调用 + analyzeVueComponentForServiceCalls(content, componentName, moduleName) { const { descriptor } = parse(content) const scriptContent = descriptor.script?.content || '' if (!scriptContent) { - return { apiCalls: [], methods: [] } + return { serviceCalls: [], methods: [] } } const ast = parser.parse(scriptContent, { @@ -318,22 +829,22 @@ function routeMappingPlugin() { plugins: ['jsx'] }) - return this.extractApiCallsFromAST(ast, componentName) + return this.extractServiceCallsFromAST(ast, componentName, moduleName) }, - // 分析JavaScript组件 - analyzeJavaScriptComponent(content, componentName) { + // 分析JavaScript组件中的服务调用 + analyzeJavaScriptComponentForServiceCalls(content, componentName, moduleName) { const ast = parser.parse(content, { sourceType: 'module', plugins: ['jsx'] }) - return this.extractApiCallsFromAST(ast, componentName) + return this.extractServiceCallsFromAST(ast, componentName, moduleName) }, - // 从AST中提取API调用 - extractApiCallsFromAST(ast, componentName) { - const apiCalls = [] + // 从AST中提取服务调用 + extractServiceCallsFromAST(ast, componentName, moduleName) { + const serviceCalls = [] const methods = [] const self = this @@ -352,22 +863,21 @@ function routeMappingPlugin() { } }, - // 查找API调用 + // 查找服务调用 CallExpression(path) { - const callInfo = self.extractApiCall(path) + const callInfo = self.extractServiceCall(path) if (callInfo) { - apiCalls.push(callInfo) + serviceCalls.push(callInfo) } } }) - return { apiCalls, methods } + return { serviceCalls, methods } }, - // 提取API调用信息 - extractApiCall(path) { + // 提取服务调用信息 + extractServiceCall(path) { const node = path.node - const self = this // 检查是否是服务调用 (service.method()) if (node.callee && node.callee.type === 'MemberExpression') { @@ -381,29 +891,75 @@ function routeMappingPlugin() { type: 'service', service: object.name, method: property.name, - arguments: node.arguments.map(arg => self.extractArgumentValue(arg)), + arguments: node.arguments.map(arg => this.extractArgumentValue(arg)), line: node.loc?.start?.line || 0 } } } } + return null + }, + + + + + + + + + + + // 提取API调用信息 + extractApiCall(path) { + const node = path.node + const self = this + // 检查是否是直接的API调用 (api.get, api.post等) if (node.callee && node.callee.type === 'MemberExpression') { const object = node.callee.object const property = node.callee.property if (object && property) { - if (object.name === 'api' || object.name === 'axios' || object.name === 'http') { - const method = property.name + // 支持多种API调用方式 + const apiObjects = ['api', 'axios', 'http', 'request'] + const httpMethods = ['get', 'post', 'put', 'delete', 'patch', 'head', 'options'] + + // 检查对象名称(可能是Identifier或StringLiteral) + let objectName = '' + if (object.type === 'Identifier') { + objectName = object.name + } else if (object.type === 'StringLiteral') { + objectName = object.value + } + + // 检查属性名称 + let propertyName = '' + if (property.type === 'Identifier') { + propertyName = property.name + } else if (property.type === 'StringLiteral') { + propertyName = property.value + } + + if (apiObjects.includes(objectName) && httpMethods.includes(propertyName)) { + const method = propertyName const args = node.arguments - if (args.length > 0 && args[0].type === 'StringLiteral') { + // 提取API路径 + let apiPath = '' + if (args.length > 0) { + if (args[0].type === 'StringLiteral') { + apiPath = args[0].value + } else if (args[0].type === 'TemplateLiteral') { + // 处理模板字符串 + apiPath = self.extractTemplateLiteral(args[0]) + } + } + + if (apiPath) { return { - type: 'api', method: method.toUpperCase(), - path: args[0].value, - arguments: args.slice(1).map(arg => self.extractArgumentValue(arg)), + path: apiPath, line: node.loc?.start?.line || 0 } } @@ -411,9 +967,72 @@ function routeMappingPlugin() { } } + // 检查是否是服务调用 (service.method()) + if (node.callee && node.callee.type === 'MemberExpression') { + const object = node.callee.object + const property = node.callee.property + + if (object && property) { + let objectName = '' + let propertyName = '' + + if (object.type === 'Identifier') { + objectName = object.name + } else if (object.type === 'StringLiteral') { + objectName = object.value + } + + if (property.type === 'Identifier') { + propertyName = property.name + } else if (property.type === 'StringLiteral') { + propertyName = property.value + } + + // 检查是否是服务调用 + if (objectName && propertyName && + (objectName.endsWith('Service') || objectName === 'api' || objectName === 'axios')) { + return { + method: propertyName, + service: objectName, + line: node.loc?.start?.line || 0 + } + } + } + } + return null }, + // 提取参数值 + extractArgumentValue(node) { + if (node.type === 'StringLiteral') { + return node.value + } else if (node.type === 'NumericLiteral') { + return node.value + } else if (node.type === 'Identifier') { + return node.name + } + return null + }, + + // 提取模板字符串内容 + extractTemplateLiteral(templateLiteral) { + if (templateLiteral.type !== 'TemplateLiteral') { + return '' + } + + let result = '' + templateLiteral.quasis.forEach((quasi, index) => { + result += quasi.value.raw + if (index < templateLiteral.expressions.length) { + // 对于表达式,我们使用占位符 + result += `{${templateLiteral.expressions[index].type}}` + } + }) + + return result + }, + // 从模块配置中读取模块名称 readModuleNamesFromConfig() { try { @@ -457,33 +1076,19 @@ function routeMappingPlugin() { } }, - // 查找弹窗文件 - findModalFiles() { - const modalFiles = [] - const moduleDirs = this.readModuleNamesFromConfig() - - moduleDirs.forEach(moduleName => { - const componentsPath = resolve(__dirname, `../src/renderer/modules/${moduleName}/components`) - - if (existsSync(componentsPath)) { - const files = readdirSync(componentsPath).filter(f => - f.endsWith('.vue') && (f.toLowerCase().includes('modal') || f.toLowerCase().includes('dialog')) - ) - files.forEach(file => { - modalFiles.push({ - name: file.replace('.vue', ''), - path: resolve(componentsPath, file), - module: moduleName - }) - }) - } - }) - - return modalFiles - }, // 查找组件文件 findComponentFile(componentName) { + // 跳过MainLayout等特殊组件,或者返回正确的路径 + if (componentName === 'MainLayout') { + // MainLayout在core模块中 + const mainLayoutPath = resolve(__dirname, '../src/renderer/modules/core/components/MainLayout.vue') + if (existsSync(mainLayoutPath)) { + return mainLayoutPath + } + return null + } + const moduleDirs = this.readModuleNamesFromConfig() for (const moduleName of moduleDirs) { @@ -511,159 +1116,39 @@ function routeMappingPlugin() { return null }, - // 生成映射文件 - generateMappingFile(pageMappings, modalMappings) { + // 生成最终映射文件 + generateTestFile(routes, apiMappings) { const outputPath = resolve(__dirname, '../src/renderer/modules/route-sync/direct-route-mappings.js') - // 检查文件内容是否真的需要更新 - if (this._isFileContentSame(pageMappings, modalMappings, outputPath)) { - console.log('⏭️ 路由映射文件内容未变化,跳过写入') - return - } - - const mappingContent = `// 第一阶段:直接路由-API映射关系 + const testContent = `// 直接路由映射文件 // 此文件由 route-mapping-plugin 在构建时生成 -// 收集页面和弹窗组件的直接API调用关系 +// 包含路由配置分析结果和API收集结果 // 请勿手动修改 export const directRouteMappings = { - // 第一层:页面组件的数据操作API - pageMappings: ${JSON.stringify(pageMappings, null, 2)}, - - // 第二层:弹窗组件的数据操作API - modalMappings: ${JSON.stringify(modalMappings, null, 2)}, + // 路由配置分析结果 + routes: ${JSON.stringify(routes, null, 2)}, - // 分析信息 - analysisInfo: { - phase: 'phase1', - description: '第一阶段:收集直接映射关系', - timestamp: new Date().toISOString(), - pageCount: ${pageMappings.length}, - modalCount: ${modalMappings.length}, - totalApiCalls: ${pageMappings.reduce((sum, p) => sum + p.apiCalls.length, 0) + modalMappings.reduce((sum, m) => sum + m.apiCalls.length, 0)} - } + // API收集结果(包含页面关联和路径完善) + apiMappings: ${JSON.stringify(apiMappings, null, 2)} } -// 按模块分组的映射 -export const moduleMappings = ${JSON.stringify(this.groupMappingsByModule(pageMappings, modalMappings), null, 2)} - -// 按API路径分组的映射 -export const apiPathMappings = ${JSON.stringify(this.groupMappingsByApiPath(pageMappings, modalMappings), null, 2)} - export default directRouteMappings ` - fs.writeFileSync(outputPath, mappingContent, 'utf-8') + fs.writeFileSync(outputPath, testContent, 'utf-8') - console.log(`✅ 直接映射关系文件已生成: ${outputPath}`) + console.log(`✅ 映射文件已生成: ${outputPath}`) console.log(`📊 统计信息:`) - console.log(` - 页面组件: ${pageMappings.length} 个`) - console.log(` - 弹窗组件: ${modalMappings.length} 个`) - console.log(` - 总API调用: ${pageMappings.reduce((sum, p) => sum + p.apiCalls.length, 0) + modalMappings.reduce((sum, m) => sum + m.apiCalls.length, 0)} 个`) - }, - - // 检查文件内容是否相同 - _isFileContentSame(pageMappings, modalMappings, outputPath) { - if (!existsSync(outputPath)) { - return false - } - - try { - const currentContent = fs.readFileSync(outputPath, 'utf-8') - - // 提取当前文件中的映射数据 - const currentDataMatch = currentContent.match(/export const directRouteMappings = ({[\s\S]*?});/) - if (!currentDataMatch) { - return false - } - - // 解析当前数据 - const currentData = JSON.parse(currentDataMatch[1]) - - // 比较数据 - const newData = { - pageMappings, - modalMappings, - analysisInfo: { - phase: 'phase1', - description: '第一阶段:收集直接映射关系', - timestamp: new Date().toISOString(), - pageCount: pageMappings.length, - modalCount: modalMappings.length, - totalApiCalls: pageMappings.reduce((sum, p) => sum + p.apiCalls.length, 0) + modalMappings.reduce((sum, m) => sum + m.apiCalls.length, 0) - } - } - - // 忽略时间戳差异进行比较 - const currentDataForCompare = { ...currentData } - const newDataForCompare = { ...newData } - delete currentDataForCompare.analysisInfo.timestamp - delete newDataForCompare.analysisInfo.timestamp - - return JSON.stringify(currentDataForCompare) === JSON.stringify(newDataForCompare) - } catch (error) { - console.warn('⚠️ 比较文件内容时出错:', error.message) - return false - } + console.log(` - 路由数量: ${routes.length} 个`) + console.log(` - 模块数量: ${apiMappings.length} 个`) + console.log(` - 总API调用: ${apiMappings.reduce((sum, module) => sum + module.apiMappings.length, 0)} 个`) + console.log(` - 总组件关联: ${apiMappings.reduce((sum, module) => + sum + module.apiMappings.reduce((apiSum, api) => apiSum + (api.callingComponents ? api.callingComponents.length : 0), 0), 0)} 个`) }, - // 按模块分组映射 - groupMappingsByModule(pageMappings, modalMappings) { - const grouped = {} - - // 分组页面映射 - pageMappings.forEach(mapping => { - const module = mapping.module || 'unknown' - if (!grouped[module]) { - grouped[module] = { pages: [], modals: [] } - } - grouped[module].pages.push(mapping) - }) - - // 分组弹窗映射 - modalMappings.forEach(mapping => { - const module = mapping.module || 'unknown' - if (!grouped[module]) { - grouped[module] = { pages: [], modals: [] } - } - grouped[module].modals.push(mapping) - }) - - return grouped - }, + - // 按API路径分组映射 - groupMappingsByApiPath(pageMappings, modalMappings) { - const grouped = {} - - const addToGroup = (mapping, layer) => { - mapping.apiCalls.forEach(apiCall => { - let key = '' - if (apiCall.type === 'api') { - key = `${apiCall.method} ${apiCall.path}` - } else if (apiCall.type === 'service') { - key = `${apiCall.service}.${apiCall.method}` - } - - if (key) { - if (!grouped[key]) { - grouped[key] = { pages: [], modals: [] } - } - grouped[key][layer].push({ - component: mapping.component, - module: mapping.module, - route: mapping.route || mapping.path, - apiCall: apiCall - }) - } - }) - } - - pageMappings.forEach(mapping => addToGroup(mapping, 'pages')) - modalMappings.forEach(mapping => addToGroup(mapping, 'modals')) - - return grouped - }, // 提取组件名称 extractComponentName(node) { @@ -675,17 +1160,6 @@ export default directRouteMappings return null }, - // 提取参数值 - extractArgumentValue(node) { - if (node.type === 'StringLiteral') { - return node.value - } else if (node.type === 'NumericLiteral') { - return node.value - } else if (node.type === 'Identifier') { - return node.name - } - return null - }, // 从路径提取模块名 extractModuleFromPath(path) { @@ -694,7 +1168,83 @@ export default directRouteMappings const segments = path.split('/').filter(Boolean) if (segments.length === 0) return 'home' + // 特殊处理:user-profile路径对应user-management模块 + if (segments[0] === 'user-profile') { + return 'user-management' + } + return segments[0] + }, + + // 获取路由描述 + getRouteDescription(module, path) { + try { + // 读取RouteConfig文件 + const routeConfigPath = resolve(__dirname, '../src/renderer/modules/route-sync/RouteConfig.js') + if (!existsSync(routeConfigPath)) { + console.warn(`⚠️ RouteConfig文件不存在: ${routeConfigPath}`) + return `${module}页面` + } + + const routeConfigContent = readFileSync(routeConfigPath, 'utf-8') + + // 解析RouteConfig文件,提取descriptions对象 + const descriptions = this.extractDescriptionsFromRouteConfig(routeConfigContent) + + // 查找对应的描述 + if (descriptions && descriptions[module]) { + return descriptions[module] + } else { + // 特殊处理:如果是user-profile路径,使用user-profile的描述 + if (path === '/user-profile' && descriptions && descriptions['user-profile']) { + return descriptions['user-profile'] + } + + // 如果找不到对应的key,输出错误日志但不影响运行 + console.error(`❌ RouteConfig.descriptions中缺少模块 "${module}" 的配置,路径: ${path}`) + return `${module}页面` + } + } catch (error) { + console.warn(`⚠️ 获取路由描述失败: ${error.message}`) + return `${module}页面` + } + }, + + // 从RouteConfig文件中提取descriptions对象 + extractDescriptionsFromRouteConfig(content) { + try { + const ast = parser.parse(content, { + sourceType: 'module', + plugins: ['jsx'] + }) + + let descriptions = null + + traverse(ast, { + ObjectExpression(path) { + // 查找descriptions属性 + const properties = path.node.properties + const descriptionsProp = properties.find(prop => + prop.key && prop.key.name === 'descriptions' + ) + + if (descriptionsProp && descriptionsProp.value && descriptionsProp.value.type === 'ObjectExpression') { + // 解析descriptions对象 + descriptions = {} + descriptionsProp.value.properties.forEach(prop => { + if (prop.key && prop.key.type === 'StringLiteral' && prop.value && prop.value.type === 'StringLiteral') { + descriptions[prop.key.value] = prop.value.value + } + }) + } + } + }) + + return descriptions + } catch (error) { + console.warn(`⚠️ 解析RouteConfig失败: ${error.message}`) + return null + } } } } diff --git a/gofaster/app/src/renderer/modules/role-management/views/RoleApiTest.vue b/gofaster/app/src/renderer/modules/role-management/views/RoleApiTest.vue deleted file mode 100644 index 1fdc85c..0000000 --- a/gofaster/app/src/renderer/modules/role-management/views/RoleApiTest.vue +++ /dev/null @@ -1,548 +0,0 @@ - - - - - diff --git a/gofaster/app/src/renderer/modules/route-sync/RouteConfig.js b/gofaster/app/src/renderer/modules/route-sync/RouteConfig.js index 3acc6ae..98b58b8 100644 --- a/gofaster/app/src/renderer/modules/route-sync/RouteConfig.js +++ b/gofaster/app/src/renderer/modules/route-sync/RouteConfig.js @@ -6,6 +6,8 @@ export const RouteConfig = { 'user-management': '用户管理', 'role-management': '角色管理', 'system-settings': '系统设置', + 'settings': '用户设置', + 'user-profile': '个人资料', 'route-sync': '路由同步' }, diff --git a/gofaster/app/src/renderer/modules/route-sync/RouteMapper.js b/gofaster/app/src/renderer/modules/route-sync/RouteMapper.js index c158374..8e60e22 100644 --- a/gofaster/app/src/renderer/modules/route-sync/RouteMapper.js +++ b/gofaster/app/src/renderer/modules/route-sync/RouteMapper.js @@ -48,69 +48,29 @@ export class RouteMapper { _createApiMappingFromDirectCall(route, apiCall) { const module = route.module - if (!apiCall || !apiCall.service || !apiCall.method) { - return null - } - - // 根据服务类型和方法生成后端路由 - let backendRoute = '/api' - let httpMethod = 'GET' - - if (apiCall.service === 'userService') { - backendRoute = '/api/users' - if (apiCall.method === 'getUsers') { - httpMethod = 'GET' - } else if (apiCall.method === 'createUser') { - httpMethod = 'POST' - } else if (apiCall.method === 'updateUser') { - httpMethod = 'PUT' - backendRoute = '/api/users/:id' - } else if (apiCall.method === 'deleteUser') { - httpMethod = 'DELETE' - backendRoute = '/api/users/:id' - } else if (apiCall.method === 'getCurrentUser') { - httpMethod = 'GET' - backendRoute = '/api/user/profile' - } else if (apiCall.method === 'login') { - httpMethod = 'POST' - backendRoute = '/api/auth/login' - } else if (apiCall.method === 'getCaptcha') { - httpMethod = 'GET' - backendRoute = '/api/auth/captcha' - } else if (apiCall.method === 'changePassword') { - httpMethod = 'PUT' - backendRoute = '/api/user/password' - } else if (apiCall.method === 'getPasswordPolicy') { - httpMethod = 'GET' - backendRoute = '/api/user/password-policy' - } else if (apiCall.method === 'validatePassword') { - httpMethod = 'POST' - backendRoute = '/api/user/validate-password' - } - } else if (apiCall.service === 'roleService') { - backendRoute = '/api/roles' - if (apiCall.method === 'getRoles') { - httpMethod = 'GET' - } else if (apiCall.method === 'createRole') { - httpMethod = 'POST' - } else if (apiCall.method === 'updateRole') { - httpMethod = 'PUT' - backendRoute = '/api/roles/:id' - } else if (apiCall.method === 'deleteRole') { - httpMethod = 'DELETE' - backendRoute = '/api/roles/:id' + // 如果是直接的API调用(type: 'api'),直接使用 + if (apiCall.type === 'api' && apiCall.method && apiCall.path) { + return { + frontend_route: route.path, + backend_route: apiCall.path, + http_method: apiCall.method, + module: module, + operation: `${apiCall.method} ${apiCall.path}`, + service: 'direct', + method: apiCall.method, + path: apiCall.path } } - return { - frontend_route: route.path, - backend_route: backendRoute, - http_method: httpMethod, - module: module, - operation: `${apiCall.service}.${apiCall.method}`, - service: apiCall.service, - method: apiCall.method + // 如果是服务调用(type: 'service'),需要进一步分析 + if (apiCall.type === 'service' && apiCall.service && apiCall.method) { + // 这里应该已经被enhanceApiCallsWithServiceAnalysis处理过了 + // 如果还是service类型,说明服务文件分析失败,使用默认映射 + console.warn(`⚠️ 服务调用 ${apiCall.service}.${apiCall.method} 无法解析为具体API`) + return null } + + return null } // 创建API映射 diff --git a/gofaster/app/src/renderer/modules/route-sync/direct-route-mappings.js b/gofaster/app/src/renderer/modules/route-sync/direct-route-mappings.js index b528231..f4ae2a1 100644 --- a/gofaster/app/src/renderer/modules/route-sync/direct-route-mappings.js +++ b/gofaster/app/src/renderer/modules/route-sync/direct-route-mappings.js @@ -1,796 +1,352 @@ -// 第一阶段:直接路由-API映射关系 +// 直接路由映射文件 // 此文件由 route-mapping-plugin 在构建时生成 -// 收集页面和弹窗组件的直接API调用关系 +// 包含路由配置分析结果和API收集结果 // 请勿手动修改 export const directRouteMappings = { - // 第一层:页面组件的数据操作API - pageMappings: [ + // 路由配置分析结果 + routes: [ { - "route": "/user-management", - "routeName": "UserManagement", + "path": "/", + "component": "MainLayout", + "module": "home", + "description": "首页" + }, + { + "path": "/user-management", + "name": "UserManagement", "component": "UserManagement", "module": "user-management", - "layer": "page", - "apiCalls": [ - { - "type": "service", - "service": "userService", - "method": "getUsers", - "arguments": [ - null, - null - ], - "line": 69 - }, - { - "type": "service", - "service": "userService", - "method": "updateUser", - "arguments": [ - null, - "userForm" - ], - "line": 139 - }, - { - "type": "service", - "service": "userService", - "method": "createUser", - "arguments": [ - "userForm" - ], - "line": 141 - }, - { - "type": "service", - "service": "userService", - "method": "deleteUser", - "arguments": [ - "userId" - ], - "line": 153 - } - ], - "methods": [ - "loadUsers", - "loadRoles", - "handleSearch", - "handleFilter", - "changePage", - "handlePageSizeChange", - "handleJumpPage", - "editUser", - "submitUser", - "deleteUser", - "assignRoles", - "closeModal", - "formatDate" - ] + "description": "用户管理" }, { - "route": "/user-profile", - "routeName": "UserProfile", + "path": "/settings", + "name": "Settings", + "component": "Settings", + "module": "settings", + "description": "用户设置" + }, + { + "path": "/user-profile", + "name": "UserProfile", "component": "UserProfile", - "module": "user-profile", - "layer": "page", - "apiCalls": [ - { - "type": "service", - "service": "userService", - "method": "getCurrentUser", - "arguments": [ - "token" - ], - "line": 45 - } - ], - "methods": [ - "loadUserProfile", - "refreshProfile", - "changePassword", - "forceChangePassword", - "onPasswordChangeSuccess", - "goToLogin", - "formatDate", - "getStatusText", - "getStatusClass" - ] + "module": "user-management", + "description": "用户管理" }, { - "route": "/role-management", - "routeName": "RoleManagement", + "path": "/role-management", + "name": "RoleManagement", "component": "RoleManagement", "module": "role-management", - "layer": "page", - "apiCalls": [ - { - "type": "service", - "service": "roleService", - "method": "getRoles", - "arguments": [ - null, - null - ], - "line": 54 - }, - { - "type": "service", - "service": "roleService", - "method": "updateRole", - "arguments": [ - null, - "roleForm" - ], - "line": 108 - }, - { - "type": "service", - "service": "roleService", - "method": "createRole", - "arguments": [ - "roleForm" - ], - "line": 118 - }, - { - "type": "service", - "service": "roleService", - "method": "deleteRole", - "arguments": [ - null - ], - "line": 142 - } - ], - "methods": [ - "handleSearch", - "loadRoles", - "createNewRole", - "editRole", - "saveRole", - "deleteRole", - "resetForm", - "handleCurrentChange", - "handlePageSizeChange", - "handleJumpPage", - "formatDate", - "assignPermissions", - "handlePermissionsUpdated" - ] + "description": "角色管理" } ], - // 第二层:弹窗组件的数据操作API - modalMappings: [ + // API收集结果(包含页面关联和路径完善) + apiMappings: [ { - "component": "LoginModal", - "path": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", "module": "user-management", - "layer": "modal", - "apiCalls": [ + "serviceName": "userService", + "servicePath": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\services\\userService.js", + "apiMappings": [ + { + "methodName": "getUsers", + "method": "GET", + "path": "/auth/admin/users", + "line": 51, + "callingComponents": [ + { + "component": "UserManagement", + "path": "/user-management" + } + ] + }, { - "type": "service", - "service": "userService", - "method": "login", - "arguments": [ - null - ], - "line": 106 + "methodName": "createUser", + "method": "POST", + "path": "/auth/admin/users", + "line": 73, + "callingComponents": [ + { + "component": "UserManagement", + "path": "/user-management" + } + ] }, { - "type": "service", - "service": "userService", - "method": "getCaptcha", - "arguments": [], - "line": 209 + "methodName": "updateUser", + "method": "PUT", + "path": "/auth/admin/users/{Identifier}", + "line": 83, + "callingComponents": [ + { + "component": "UserManagement", + "path": "/user-management" + } + ] }, { - "type": "service", - "service": "userService", - "method": "getCaptcha", - "arguments": [], - "line": 230 - } - ], - "methods": [] - }, - { - "component": "PasswordChangeModal", - "path": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", - "module": "user-management", - "layer": "modal", - "apiCalls": [ + "methodName": "deleteUser", + "method": "DELETE", + "path": "/auth/admin/users/{Identifier}", + "line": 93, + "callingComponents": [ + { + "component": "UserManagement", + "path": "/user-management" + } + ] + }, { - "type": "service", - "service": "userService", - "method": "getPasswordPolicy", - "arguments": [], - "line": 97 + "methodName": "changePassword", + "method": "POST", + "path": "/auth/change-password", + "line": 113, + "callingComponents": [ + { + "component": "PasswordChangeModal", + "path": "/" + } + ] }, { - "type": "service", - "service": "userService", - "method": "validatePassword", - "arguments": [ - null - ], - "line": 156 + "methodName": "getPasswordPolicy", + "method": "GET", + "path": "/auth/password-policy", + "line": 123, + "callingComponents": [ + { + "component": "PasswordChangeModal", + "path": "/" + } + ] }, { - "type": "service", - "service": "userService", - "method": "changePassword", - "arguments": [ - "requestData" - ], - "line": 314 - } - ], - "methods": [ - "loadPasswordPolicy", - "validatePassword", - "updateRequirements", - "calculatePasswordStrength", - "validateConfirmPassword", - "handleSubmit", - "handleClose", - "handleOverlayClick", - "clearCurrentPasswordError", - "clearNewPasswordError", - "clearConfirmPasswordError", - "handleNewPasswordInput", - "handleConfirmPasswordInput", - "resetFormState" - ] - } -], - - // 分析信息 - analysisInfo: { - phase: 'phase1', - description: '第一阶段:收集直接映射关系', - timestamp: new Date().toISOString(), - pageCount: 3, - modalCount: 2, - totalApiCalls: 15 - } -} - -// 按模块分组的映射 -export const moduleMappings = { - "user-management": { - "pages": [ + "methodName": "validatePassword", + "method": "POST", + "path": "/auth/validate-password", + "line": 133, + "callingComponents": [ + { + "component": "PasswordChangeModal", + "path": "/" + } + ] + }, { - "route": "/user-management", - "routeName": "UserManagement", - "component": "UserManagement", - "module": "user-management", - "layer": "page", - "apiCalls": [ + "methodName": "getCaptcha", + "method": "GET", + "path": "/auth/captcha", + "line": 163, + "callingComponents": [ { - "type": "service", - "service": "userService", - "method": "getUsers", - "arguments": [ - null, - null - ], - "line": 69 - }, + "component": "LoginModal", + "path": "/" + } + ] + }, + { + "methodName": "login", + "method": "POST", + "path": "/auth/login", + "line": 182, + "callingComponents": [ { - "type": "service", - "service": "userService", - "method": "updateUser", - "arguments": [ - null, - "userForm" - ], - "line": 139 - }, + "component": "LoginModal", + "path": "/" + } + ] + }, + { + "methodName": "getCurrentUser", + "method": "GET", + "path": "/auth/userinfo", + "line": 245, + "callingComponents": [ { - "type": "service", - "service": "userService", - "method": "createUser", - "arguments": [ - "userForm" - ], - "line": 141 - }, + "component": "UserProfile", + "path": "/user-profile" + } + ] + }, + { + "methodName": "changePassword", + "method": "POST", + "path": "/auth/change-password", + "line": 259, + "callingComponents": [ { - "type": "service", - "service": "userService", - "method": "deleteUser", - "arguments": [ - "userId" - ], - "line": 153 + "component": "PasswordChangeModal", + "path": "/" } - ], - "methods": [ - "loadUsers", - "loadRoles", - "handleSearch", - "handleFilter", - "changePage", - "handlePageSizeChange", - "handleJumpPage", - "editUser", - "submitUser", - "deleteUser", - "assignRoles", - "closeModal", - "formatDate" ] } - ], - "modals": [ - { - "component": "LoginModal", - "path": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", - "module": "user-management", - "layer": "modal", - "apiCalls": [ + ] + }, + { + "module": "role-management", + "serviceName": "roleService", + "servicePath": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\role-management\\services\\roleService.js", + "apiMappings": [ + { + "methodName": "getRoles", + "method": "GET", + "path": "/auth/roles", + "line": 48, + "callingComponents": [ { - "type": "service", - "service": "userService", - "method": "login", - "arguments": [ - null - ], - "line": 106 + "component": "RoleManagement", + "path": "/role-management" }, { - "type": "service", - "service": "userService", - "method": "getCaptcha", - "arguments": [], - "line": 209 - }, + "component": "UserRoleAssignment", + "path": "/user-management" + } + ] + }, + { + "methodName": "getRole", + "method": "GET", + "path": "/auth/roles/{Identifier}", + "line": 60, + "callingComponents": [ { - "type": "service", - "service": "userService", - "method": "getCaptcha", - "arguments": [], - "line": 230 + "component": "PermissionManager", + "path": null } - ], - "methods": [] + ] }, { - "component": "PasswordChangeModal", - "path": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", - "module": "user-management", - "layer": "modal", - "apiCalls": [ + "methodName": "createRole", + "method": "POST", + "path": "/auth/roles", + "line": 70, + "callingComponents": [ { - "type": "service", - "service": "userService", - "method": "getPasswordPolicy", - "arguments": [], - "line": 97 - }, + "component": "RoleManagement", + "path": "/role-management" + } + ] + }, + { + "methodName": "updateRole", + "method": "PUT", + "path": "/auth/roles/{Identifier}", + "line": 80, + "callingComponents": [ { - "type": "service", - "service": "userService", - "method": "validatePassword", - "arguments": [ - null - ], - "line": 156 + "component": "RoleManagement", + "path": "/role-management" }, { - "type": "service", - "service": "userService", - "method": "changePassword", - "arguments": [ - "requestData" - ], - "line": 314 + "component": "PermissionManager", + "path": null } - ], - "methods": [ - "loadPasswordPolicy", - "validatePassword", - "updateRequirements", - "calculatePasswordStrength", - "validateConfirmPassword", - "handleSubmit", - "handleClose", - "handleOverlayClick", - "clearCurrentPasswordError", - "clearNewPasswordError", - "clearConfirmPasswordError", - "handleNewPasswordInput", - "handleConfirmPasswordInput", - "resetFormState" ] - } - ] - }, - "user-profile": { - "pages": [ + }, { - "route": "/user-profile", - "routeName": "UserProfile", - "component": "UserProfile", - "module": "user-profile", - "layer": "page", - "apiCalls": [ + "methodName": "deleteRole", + "method": "DELETE", + "path": "/auth/roles/{Identifier}", + "line": 90, + "callingComponents": [ { - "type": "service", - "service": "userService", - "method": "getCurrentUser", - "arguments": [ - "token" - ], - "line": 45 + "component": "RoleManagement", + "path": "/role-management" } - ], - "methods": [ - "loadUserProfile", - "refreshProfile", - "changePassword", - "forceChangePassword", - "onPasswordChangeSuccess", - "goToLogin", - "formatDate", - "getStatusText", - "getStatusClass" ] - } - ], - "modals": [] - }, - "role-management": { - "pages": [ + }, { - "route": "/role-management", - "routeName": "RoleManagement", - "component": "RoleManagement", - "module": "role-management", - "layer": "page", - "apiCalls": [ - { - "type": "service", - "service": "roleService", - "method": "getRoles", - "arguments": [ - null, - null - ], - "line": 54 - }, + "methodName": "getPermissions", + "method": "GET", + "path": "/auth/permissions", + "line": 100, + "callingComponents": [ { - "type": "service", - "service": "roleService", - "method": "updateRole", - "arguments": [ - null, - "roleForm" - ], - "line": 108 + "component": "PermissionManager", + "path": null }, { - "type": "service", - "service": "roleService", - "method": "createRole", - "arguments": [ - "roleForm" - ], - "line": 118 - }, - { - "type": "service", - "service": "roleService", - "method": "deleteRole", - "arguments": [ - null - ], - "line": 142 + "component": "RolePermissionAssignment", + "path": "/role-management" } - ], - "methods": [ - "handleSearch", - "loadRoles", - "createNewRole", - "editRole", - "saveRole", - "deleteRole", - "resetForm", - "handleCurrentChange", - "handlePageSizeChange", - "handleJumpPage", - "formatDate", - "assignPermissions", - "handlePermissionsUpdated" ] - } - ], - "modals": [] - } -} - -// 按API路径分组的映射 -export const apiPathMappings = { - "userService.getUsers": { - "pages": [ - { - "component": "UserManagement", - "module": "user-management", - "route": "/user-management", - "apiCall": { - "type": "service", - "service": "userService", - "method": "getUsers", - "arguments": [ - null, - null - ], - "line": 69 - } - } - ], - "modals": [] - }, - "userService.updateUser": { - "pages": [ - { - "component": "UserManagement", - "module": "user-management", - "route": "/user-management", - "apiCall": { - "type": "service", - "service": "userService", - "method": "updateUser", - "arguments": [ - null, - "userForm" - ], - "line": 139 - } - } - ], - "modals": [] - }, - "userService.createUser": { - "pages": [ - { - "component": "UserManagement", - "module": "user-management", - "route": "/user-management", - "apiCall": { - "type": "service", - "service": "userService", - "method": "createUser", - "arguments": [ - "userForm" - ], - "line": 141 - } - } - ], - "modals": [] - }, - "userService.deleteUser": { - "pages": [ - { - "component": "UserManagement", - "module": "user-management", - "route": "/user-management", - "apiCall": { - "type": "service", - "service": "userService", - "method": "deleteUser", - "arguments": [ - "userId" - ], - "line": 153 - } - } - ], - "modals": [] - }, - "userService.getCurrentUser": { - "pages": [ - { - "component": "UserProfile", - "module": "user-profile", - "route": "/user-profile", - "apiCall": { - "type": "service", - "service": "userService", - "method": "getCurrentUser", - "arguments": [ - "token" - ], - "line": 45 - } - } - ], - "modals": [] - }, - "roleService.getRoles": { - "pages": [ - { - "component": "RoleManagement", - "module": "role-management", - "route": "/role-management", - "apiCall": { - "type": "service", - "service": "roleService", - "method": "getRoles", - "arguments": [ - null, - null - ], - "line": 54 - } - } - ], - "modals": [] - }, - "roleService.updateRole": { - "pages": [ - { - "component": "RoleManagement", - "module": "role-management", - "route": "/role-management", - "apiCall": { - "type": "service", - "service": "roleService", - "method": "updateRole", - "arguments": [ - null, - "roleForm" - ], - "line": 108 - } - } - ], - "modals": [] - }, - "roleService.createRole": { - "pages": [ - { - "component": "RoleManagement", - "module": "role-management", - "route": "/role-management", - "apiCall": { - "type": "service", - "service": "roleService", - "method": "createRole", - "arguments": [ - "roleForm" - ], - "line": 118 - } - } - ], - "modals": [] - }, - "roleService.deleteRole": { - "pages": [ - { - "component": "RoleManagement", - "module": "role-management", - "route": "/role-management", - "apiCall": { - "type": "service", - "service": "roleService", - "method": "deleteRole", - "arguments": [ - null - ], - "line": 142 - } - } - ], - "modals": [] - }, - "userService.login": { - "pages": [], - "modals": [ + }, { - "component": "LoginModal", - "module": "user-management", - "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", - "apiCall": { - "type": "service", - "service": "userService", - "method": "login", - "arguments": [ - null - ], - "line": 106 - } - } - ] - }, - "userService.getCaptcha": { - "pages": [], - "modals": [ + "methodName": "assignRolesToUser", + "method": "POST", + "path": "/auth/roles/users/{Identifier}/assign", + "line": 110, + "callingComponents": [ + { + "component": "UserRoleAssignment", + "path": "/user-management" + } + ] + }, { - "component": "LoginModal", - "module": "user-management", - "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", - "apiCall": { - "type": "service", - "service": "userService", - "method": "getCaptcha", - "arguments": [], - "line": 209 - } + "methodName": "getUserRoles", + "method": "GET", + "path": "/auth/roles/users/{Identifier}", + "line": 122, + "callingComponents": [ + { + "component": "UserRoleAssignment", + "path": "/user-management" + } + ] }, { - "component": "LoginModal", - "module": "user-management", - "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\LoginModal.vue", - "apiCall": { - "type": "service", - "service": "userService", - "method": "getCaptcha", - "arguments": [], - "line": 230 - } - } - ] - }, - "userService.getPasswordPolicy": { - "pages": [], - "modals": [ + "methodName": "removeRolesFromUser", + "method": "DELETE", + "path": "/auth/roles/users/{Identifier}/remove", + "line": 132, + "callingComponents": [ + { + "component": "UserRoleAssignment", + "path": "/user-management" + } + ] + }, { - "component": "PasswordChangeModal", - "module": "user-management", - "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", - "apiCall": { - "type": "service", - "service": "userService", - "method": "getPasswordPolicy", - "arguments": [], - "line": 97 - } - } - ] - }, - "userService.validatePassword": { - "pages": [], - "modals": [ + "methodName": "getRolePermissions", + "method": "GET", + "path": "/auth/permissions/roles/{Identifier}", + "line": 144, + "callingComponents": [ + { + "component": "RolePermissionAssignment", + "path": "/role-management" + } + ] + }, { - "component": "PasswordChangeModal", - "module": "user-management", - "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", - "apiCall": { - "type": "service", - "service": "userService", - "method": "validatePassword", - "arguments": [ - null - ], - "line": 156 - } - } - ] - }, - "userService.changePassword": { - "pages": [], - "modals": [ + "methodName": "assignPermissionsToRole", + "method": "POST", + "path": "/auth/permissions/roles/{Identifier}/assign", + "line": 154, + "callingComponents": [ + { + "component": "RolePermissionAssignment", + "path": "/role-management" + } + ] + }, { - "component": "PasswordChangeModal", - "module": "user-management", - "route": "D:\\aigc\\manta\\gofaster\\app\\src\\renderer\\modules\\user-management\\components\\PasswordChangeModal.vue", - "apiCall": { - "type": "service", - "service": "userService", - "method": "changePassword", - "arguments": [ - "requestData" - ], - "line": 314 - } + "methodName": "removePermissionsFromRole", + "method": "DELETE", + "path": "/auth/permissions/roles/{Identifier}/remove", + "line": 166, + "callingComponents": [ + { + "component": "RolePermissionAssignment", + "path": "/role-management" + } + ] } ] } +] } export default directRouteMappings