-
Notifications
You must be signed in to change notification settings - Fork 7.7k
feat: 新的接口模拟程序 #4018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 新的接口模拟程序 #4018
Conversation
|
WalkthroughThe recent updates introduce significant enhancements across various components of the project, including new API modules for authentication and menu retrieval, refined configuration settings, and improved documentation reflecting the transition to the Mockm Mock server. The changes emphasize streamlined workflows and clearer guidelines, enhancing the overall development experience without altering core functionalities. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant MockServer
participant API
User->>MockServer: Start Mock Server
MockServer-->>User: Server Running
User->>API: Request Auth Code
API-->>MockServer: Fetch Codes
MockServer-->>API: Return Codes
API-->>User: Provide Codes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range, codebase verification and nitpick comments (2)
apps/backend-mock/api/menu.cjs (1)
1-2
: Remove unnecessary ESLint disable comment.The ESLint disable comment is unnecessary and should be removed unless there are specific linting issues that need to be addressed.
- /* eslint-disable */
docs/src/index.md (1)
66-66
: Update the icon to match the new Mockm branding.The icon still references Nitro. Consider updating it to reflect the new Mockm branding.
- icon: - src: /logos/nitro.svg + icon: + src: /logos/mockm.svg
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
Files selected for processing (36)
- .prettierignore (1 hunks)
- apps/backend-mock/.eslintignore (1 hunks)
- apps/backend-mock/README.md (1 hunks)
- apps/backend-mock/api/auth.cjs (1 hunks)
- apps/backend-mock/api/menu.cjs (1 hunks)
- apps/backend-mock/api/user.cjs (1 hunks)
- apps/backend-mock/apiWeb.json (1 hunks)
- apps/backend-mock/httpData/.gitignore (1 hunks)
- apps/backend-mock/httpData/apiWeb.json (1 hunks)
- apps/backend-mock/mm.config.cjs (1 hunks)
- apps/backend-mock/package.json (1 hunks)
- apps/backend-mock/util.cjs (5 hunks)
- apps/web-antd/.env.development (1 hunks)
- apps/web-antd/vite.config.mts (1 hunks)
- apps/web-ele/.env.development (1 hunks)
- apps/web-ele/vite.config.mts (1 hunks)
- apps/web-naive/.env.development (1 hunks)
- apps/web-naive/vite.config.mts (1 hunks)
- docs/src/en/index.md (1 hunks)
- docs/src/guide/essentials/package.json (1 hunks)
- docs/src/guide/essentials/server.md (4 hunks)
- docs/src/guide/essentials/settings.md (1 hunks)
- docs/src/guide/introduction/vben.md (1 hunks)
- docs/src/index.md (1 hunks)
- internal/lint-configs/eslint-config/src/configs/ignores.ts (1 hunks)
- internal/lint-configs/eslint-config/src/custom-config.ts (1 hunks)
- internal/vite-config/index.ts (1 hunks)
- internal/vite-config/package.json (1 hunks)
- internal/vite-config/src/config/application.ts (1 hunks)
- internal/vite-config/src/plugins/index.ts (3 hunks)
- internal/vite-config/src/plugins/mockm-mock.ts (1 hunks)
- internal/vite-config/src/typing.ts (3 hunks)
- internal/vite-config/src/utils/env.ts (2 hunks)
- internal/vite-config/typing.ts (1 hunks)
- package.json (1 hunks)
- turbo.json (1 hunks)
Files skipped from review due to trivial changes (15)
- .prettierignore
- apps/backend-mock/.eslintignore
- apps/backend-mock/apiWeb.json
- apps/backend-mock/httpData/.gitignore
- apps/backend-mock/httpData/apiWeb.json
- apps/web-antd/.env.development
- apps/web-antd/vite.config.mts
- apps/web-ele/vite.config.mts
- apps/web-naive/.env.development
- apps/web-naive/vite.config.mts
- docs/src/en/index.md
- docs/src/guide/essentials/settings.md
- internal/lint-configs/eslint-config/src/custom-config.ts
- internal/vite-config/package.json
- turbo.json
Additional context used
Markdownlint
apps/backend-mock/README.md
9-9: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
Additional comments not posted (68)
apps/web-ele/.env.development (1)
9-10
: Update environment variable name.The environment variable
VITE_NITRO_MOCK
has been replaced withVITE_MOCKM_MOCK
. Ensure that all references toVITE_NITRO_MOCK
in the codebase are updated accordingly.Verification successful
Verification successful.
All references to the environment variable
VITE_NITRO_MOCK
have been updated toVITE_MOCKM_MOCK
in the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to the old environment variable are updated. # Test: Search for the old environment variable. Expect: No occurrences of the old variable name. rg --type env 'VITE_NITRO_MOCK'Length of output: 59
Script:
#!/bin/bash # Description: Verify all references to the old environment variable are updated. # Test: Search for the old environment variable. Expect: No occurrences of the old variable name. rg 'VITE_NITRO_MOCK'Length of output: 20
apps/backend-mock/package.json (3)
8-8
: Set module type to CommonJS.The module type has been set to
commonjs
. This change is appropriate for the usage ofmockm
which likely relies on CommonJS modules.
12-13
: Addmockm
as a development dependency.The
mockm
package is added as a development dependency. Ensure that it is properly installed and compatible with the project.
10-10
: Update script to usemockm
.The script
mm
usesmockm
to run a mock server. Ensure that the old scriptsstart
andbuild
are no longer required and have been removed.Verification successful
Old scripts
start
andbuild
usingnitro
have been removed.The specific scripts
"start": "nitro dev"
and"build": "nitro build"
are no longer present in the codebase.
- No occurrences of
"start": "nitro dev"
found.- No occurrences of
"build": "nitro build"
found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the removal of old scripts. # Test: Search for the old scripts. Expect: No occurrences of the old script names. rg --type json '"start": "nitro dev"' rg --type json '"build": "nitro build"'Length of output: 81
Script:
#!/bin/bash # Description: Verify the removal of old scripts. # Test: Search for any occurrences of the old script names in package.json files. rg --type json '"start":' rg --type json '"build":'Length of output: 1088
apps/backend-mock/api/menu.cjs (2)
3-10
: Import utilities fromutil.cjs
.The necessary utilities are imported from
util.cjs
. Ensure thatutil.cjs
is correctly implemented and available in the project.
12-26
: Define API for menu retrieval.The API for menu retrieval is defined using
mockm
. The implementation is straightforward and follows best practices. Ensure that theMOCK_MENUS
data structure is correctly populated and maintained.apps/backend-mock/api/user.cjs (1)
1-8
: LGTM! Imports are necessary and correctly used.The imported modules from
../util.cjs
are necessary for the functionality provided in this file.apps/backend-mock/README.md (3)
5-6
: LGTM! Improved description.The updated description accurately reflects the functionality and improves clarity.
7-16
: LGTM! Clear directory structure.The new section outlining the directory structure provides a clear understanding of the files included in the mock service.
Tools
Markdownlint
9-9: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
22-33
: LGTM! Enhanced usability.The updated instructions for running the application enhance usability by providing a more explicit step-by-step guide.
internal/lint-configs/eslint-config/src/configs/ignores.ts (1)
Line range hint
1-27
:
LGTM! Removal of ignored path aligns with intended linting behavior.The removal of the pattern
'**/.nitro'
from the list of ignored paths aligns with the intended linting behavior and does not introduce unintended consequences.apps/backend-mock/api/auth.cjs (3)
19-22
: Verify request object structure and error handling.Ensure that
req.username
is always available and correctly populated. Consider adding error handling ifreq.username
is missing.
23-39
: Verify input validation and error handling.Ensure that
req.body
contains bothusername
andpassword
and consider adding input validation to prevent injection attacks. Additionally, review the logic for generating and handling tokens.
13-42
: Ensure best practices and correct structure.Review the overall structure of the exported configuration and ensure that it follows best practices for maintainability and readability.
docs/src/guide/essentials/package.json (4)
1-13
: Verify metadata accuracy and completeness.Ensure that all metadata fields, such as
name
,version
,homepage
,bugs
, andrepository
, are accurate and complete.
14-16
: Ensure best practices for scripts.Review the script for stubbing and ensure that it follows best practices for maintainability and readability.
17-28
: Ensure correct structure for files and entry points.Review the
files
andmain/module
sections to ensure that they are correctly structured and follow best practices for maintainability and readability.
29-54
: Verify dependencies and devDependencies.Ensure that all listed dependencies and devDependencies are necessary and follow best practices for maintainability and readability.
apps/backend-mock/mm.config.cjs (6)
1-5
: Verify imports necessity and best practices.Ensure that all imported utility functions are necessary and follow best practices for maintainability and readability.
7-11
: Ensure correct structure for configuration documentation.Review the configuration documentation section to ensure that it is correctly structured and follows best practices for maintainability and readability.
16-18
: Ensure correct structure for proxy configuration.Review the proxy configuration section to ensure that it is correctly structured and follows best practices for maintainability and readability.
19-58
: Ensure correct structure and edge case handling for API configuration.Review the API configuration section to ensure that it is correctly structured, follows best practices, and handles all edge cases for maintainability and readability.
59-59
: Ensure correct structure for static files configuration.Review the static files configuration section to ensure that it is correctly structured and follows best practices for maintainability and readability.
60-62
: Ensure correct structure for response handlers configuration.Review the response handlers configuration section to ensure that it is correctly structured and follows best practices for maintainability and readability.
internal/vite-config/src/utils/env.ts (2)
72-72
: Ensure consistency in environment variable naming.The environment variable
VITE_NITRO_MOCK
has been renamed toVITE_MOCKM_MOCK
. Ensure that this new variable name is used consistently throughout the codebase and in the environment configuration files.Verification successful
Environment variable name is consistent.
The environment variable
VITE_NITRO_MOCK
has been successfully renamed toVITE_MOCKM_MOCK
and is used consistently throughout the codebase.
internal/vite-config/src/utils/env.ts
docs/src/guide/essentials/server.md
docs/src/guide/essentials/settings.md
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the new environment variable name `VITE_MOCKM_MOCK`. # Test: Search for the old and new environment variable names. Expect: Only occurrences of the new name. rg --type text 'VITE_NITRO_MOCK' && rg --type text 'VITE_MOCKM_MOCK'Length of output: 61
Script:
#!/bin/bash # Description: Verify the usage of the new environment variable name `VITE_MOCKM_MOCK`. # Test: Search for the old and new environment variable names. Expect: Only occurrences of the new name. rg 'VITE_NITRO_MOCK' || echo "No occurrences of VITE_NITRO_MOCK found" rg 'VITE_MOCKM_MOCK' || echo "No occurrences of VITE_MOCKM_MOCK found"Length of output: 529
89-89
: Confirm the boolean conversion logic.Ensure that the conversion of
VITE_MOCKM_MOCK
to a boolean is correct and that it aligns with the expected usage in the rest of the application.Verification successful
Boolean conversion logic is correct.
The conversion of
VITE_MOCKM_MOCK
to a boolean usingVITE_MOCKM_MOCK === 'true'
is correct and aligns with its usage as a boolean in the codebase.
internal/vite-config/src/utils/env.ts
:mockmMock: VITE_MOCKM_MOCK === 'true'
internal/vite-config/index.ts
:mockmMock
is used as a boolean condition.internal/vite-config/src/plugins/index.ts
:mockmMock
is used as a boolean condition.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the boolean conversion logic for `VITE_MOCKM_MOCK`. # Test: Search for the usage of `mockmMock` to ensure it is used as a boolean. Expect: Correct boolean usage. rg --type js 'mockmMock'Length of output: 24
Script:
#!/bin/bash # Description: Locate the definition of `mockmMock` and verify the boolean conversion logic for `VITE_MOCKM_MOCK`. # Step 1: Locate the definition of `mockmMock` in `internal/vite-config/src/utils/env.ts`. rg 'mockmMock' internal/vite-config/src/utils/env.ts -A 5 # Step 2: Verify the conversion logic for `VITE_MOCKM_MOCK`. rg 'VITE_MOCKM_MOCK' internal/vite-config/src/utils/env.ts -A 5 # Step 3: Search for the usage of `mockmMock` in the codebase to ensure it is used as a boolean. rg 'mockmMock'Length of output: 1621
docs/src/index.md (2)
70-70
: Verify the new link to the Mockm GitHub repository.The link has been updated to point to the Mockm GitHub repository. Ensure that this link is correct and leads to the intended resource.
Verification successful
The link to the Mockm GitHub repository is correct.
The link https://github.com/wll8/mockm points to the correct repository with the expected name and description.
- Repository Name: mockm
- Repository Description: "一个基于 express 的工具。它可以快速生成 api 以及创造数据,开箱即用,便于部署。A framework based on Express. It can quickly generate APIs and create data, ready for deployment out of the box."
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the new link to the Mockm GitHub repository. # Test: Check the validity of the new link. Expect: Link leads to the correct GitHub repository. curl -s -o /dev/null -w "%{http_code}" https://github.com/wll8/mockmLength of output: 74
Script:
#!/bin/bash # Description: Fetch the repository details from the given URL and check if it matches the expected Mockm repository. # Fetch the repository details repo_details=$(curl -s https://api.github.com/repos/wll8/mockm) # Extract the repository name and description repo_name=$(echo "$repo_details" | jq -r '.name') repo_description=$(echo "$repo_details" | jq -r '.description') # Output the repository name and description echo "Repository Name: $repo_name" echo "Repository Description: $repo_description"Length of output: 17369
69-69
: Ensure the accuracy of the new Mockm Mock Server description.The description has been updated to reference Mockm. Verify that this description accurately reflects the capabilities and features of the Mockm Mock Server.
Verification successful
The description of the Mockm Mock Server is accurate.
The description in
docs/src/index.md
anddocs/src/en/index.md
accurately reflects the capabilities and features of the Mockm Mock Server, as detailed indocs/src/guide/essentials/server.md
.
docs/src/index.md
docs/src/en/index.md
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the description of the Mockm Mock Server. # Test: Search for detailed documentation or descriptions of Mockm Mock Server. Expect: Accurate and consistent descriptions. rg --type md 'Mockm Mock Server'Length of output: 131
Script:
#!/bin/bash # Description: Search for detailed descriptions or information about the Mockm Mock Server in the documentation files. # Test: Search for occurrences of 'Mockm' to find more detailed descriptions or information. rg --type md 'Mockm'Length of output: 829
Script:
#!/bin/bash # Description: Extract relevant sections from docs/src/guide/essentials/server.md for review. # Test: Extract lines containing 'Mockm' and surrounding context to verify the description. rg --type md -A 5 -B 5 'Mockm' docs/src/guide/essentials/server.mdLength of output: 851
docs/src/guide/introduction/vben.md (1)
21-21
: Ensure the accuracy of the new Mockm-based mock data solution description.The description has been updated to reference Mockm. Verify that this description accurately reflects the capabilities and features of the Mockm-based mock data solution.
Verification successful
The description of the Mockm-based mock data solution is accurate.
The detailed information in
docs/src/guide/essentials/server.md
supports the description indocs/src/guide/introduction/vben.md
, confirming that it accurately reflects the capabilities and features of the Mockm-based mock data solution.
docs/src/guide/essentials/server.md
: Provides comprehensive details about Mockm, including its usage, configuration, and links to the official documentation.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the description of the Mockm-based mock data solution. # Test: Search for detailed documentation or descriptions of Mockm-based mock data solution. Expect: Accurate and consistent descriptions. rg --type md 'Mock 数据'Length of output: 307
Script:
#!/bin/bash # Refine the search to look for more specific mentions of "Mockm" in the documentation rg --type md 'Mockm'Length of output: 829
internal/vite-config/src/plugins/mockm-mock.ts (3)
1-9
: LGTM!The import statements are appropriate for the functionality implemented in the file.
10-75
: LGTM!The
viteMockmPlugin
function is well-structured and includes appropriate error handling and logging. The use ofTransform
stream for logging is a good approach.
78-86
: LGTM!The
handleSpace
function correctly handles the differences in command-line space handling between Windows and Unix systems.internal/vite-config/src/config/application.ts (2)
Line range hint
1-59
:
LGTM!The changes to the
defineApplicationConfig
function are well-implemented and align with the shift in mocking strategy. The new parametersmockmMock
andmockmMockOptions
are correctly integrated into the function.
Line range hint
60-75
:
LGTM!The
createCssOptions
function is correctly implemented and handles the CSS options as expected.internal/vite-config/src/typing.ts (3)
Line range hint
19-27
:
LGTM!The
MockmMockPluginOptions
interface is correctly defined and includes all necessary properties.
97-100
: LGTM!The changes to the
ApplicationPluginOptions
interface are well-implemented and align with the shift in mocking strategy. The new propertiesmockmMock
andmockmMockOptions
are correctly integrated into the interface.
145-145
: LGTM!The export statement is correctly updated to reflect the new interface name
MockmMockPluginOptions
.package.json (1)
73-73
: Dependency Addition: Verify necessity and security.The addition of
@wll8/process-manager
should be verified for necessity and compatibility with the project. Ensure that the package does not introduce any security vulnerabilities.Verification successful
Dependency Addition Verified: No Issues Found
The
@wll8/process-manager
package is used in the codebase, specifically ininternal/vite-config/src/plugins/mockm-mock.ts
. Additionally, there are no known vulnerabilities associated with this package.
internal/vite-config/src/plugins/mockm-mock.ts
:const { ProcessManager } = await import('@wll8/process-manager');
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the necessity and security of the new dependency. # Test: Check if the package is used in the codebase. Expect: Usage of `@wll8/process-manager` in the codebase. rg --type js --type ts --type vue '@wll8/process-manager' # Test: Check for known vulnerabilities. Expect: No known vulnerabilities. npm audit @wll8/process-managerLength of output: 190
Script:
#!/bin/bash # Description: Verify the necessity and security of the new dependency. # Test: Check if the package is used in the codebase. Expect: Usage of `@wll8/process-manager` in the codebase. rg --type js --type ts '@wll8/process-manager' # Test: Check for known vulnerabilities using a public vulnerability database. curl -s "https://registry.npmjs.org/@wll8/process-manager" | jq '.versions | to_entries[] | .value.vulnerabilities'Length of output: 296
internal/vite-config/typing.ts (11)
1-4
: Import Statements: Ensure necessary imports.The import statements seem appropriate for the type definitions used in this file. Ensure all imported types are necessary and used.
6-11
: InterfaceIImportMap
: Ensure completeness.The
IImportMap
interface defines the structure for import maps. Ensure that all necessary fields are included and correctly typed.
12-17
: InterfacePrintPluginOptions
: Ensure completeness.The
PrintPluginOptions
interface defines options for a print plugin. Ensure that all necessary fields are included and correctly typed.
19-34
: InterfaceMockmMockPluginOptions
: Ensure completeness.The
MockmMockPluginOptions
interface defines options for the Mockm mock plugin. Ensure that all necessary fields are included and correctly typed.
36-49
: InterfaceImportmapPluginOptions
: Ensure completeness.The
ImportmapPluginOptions
interface defines options for the import map plugin. Ensure that all necessary fields are included and correctly typed.
51-59
: InterfaceConditionPlugin
: Ensure completeness.The
ConditionPlugin
interface defines the structure for conditional plugins. Ensure that all necessary fields are included and correctly typed.
61-74
: InterfaceCommonPluginOptions
: Ensure completeness.The
CommonPluginOptions
interface defines common options for plugins. Ensure that all necessary fields are included and correctly typed.
76-109
: InterfaceApplicationPluginOptions
: Ensure completeness.The
ApplicationPluginOptions
interface extendsCommonPluginOptions
and defines additional options for application plugins. Ensure that all necessary fields are included and correctly typed.
111-117
: InterfaceLibraryPluginOptions
: Ensure completeness.The
LibraryPluginOptions
interface extendsCommonPluginOptions
and defines additional options for library plugins. Ensure that all necessary fields are included and correctly typed.
119-131
: Type Definitions: Ensure correctness.The type definitions for
ApplicationOptions
,LibraryOptions
,DefineApplicationOptions
, andDefineLibraryOptions
appear correct. Ensure that these types are used appropriately in the codebase.
133-147
: Export Statements: Ensure necessary exports.The export statements seem appropriate for the interfaces and types defined in this file. Ensure all necessary types are exported.
apps/backend-mock/util.cjs (8)
1-14
: New FunctionwrapApiData
: Ensure correctness.The
wrapApiData
function processes API responses. Ensure that the logic correctly handles success and error responses.
16-23
: New FunctionuseResponseSuccess
: Ensure correctness.The
useResponseSuccess
function constructs a standardized success response. Ensure that the response structure is appropriate.
25-32
: New FunctionuseResponseError
: Ensure correctness.The
useResponseError
function constructs a standardized error response. Ensure that the response structure is appropriate.
Line range hint
34-57
:
ConstantMOCK_USERS
: Ensure security.The
MOCK_USERS
constant defines mock user data. Ensure that the mock data does not include sensitive information.
Line range hint
58-74
:
ConstantMOCK_CODES
: Ensure correctness.The
MOCK_CODES
constant defines mock codes. Ensure that the mock data is appropriate and correctly structured.
Line range hint
108-196
:
FunctioncreateDemosMenus
: Ensure correctness.The
createDemosMenus
function generates demo menus based on roles. Ensure that the function logic is correct and the generated menus are appropriate.
Line range hint
198-211
:
ConstantMOCK_MENUS
: Ensure correctness.The
MOCK_MENUS
constant defines mock menus. Ensure that the mock data is appropriate and correctly structured.
213-220
: Export Statements: Ensure necessary exports.The export statements include all necessary constants and functions. Ensure that the exports are correctly structured and complete.
internal/vite-config/src/plugins/index.ts (3)
26-26
: LGTM! Ensure correct integration of the new mock plugin.The import of
viteNitroMockPlugin
has been replaced withviteMockmPlugin
. Verify that the new plugin is correctly integrated and used throughout the codebase.
104-105
: LGTM! Ensure consistent usage of updated parameters.The parameters
nitroMock
andnitroMockOptions
have been updated tomockmMock
andmockmMockOptions
. Verify that the changes are consistent and correctly implemented across the codebase.
136-138
: LGTM! Verify the integration of the new mock plugin.The condition and plugin loading logic have been updated to use the new mock plugin
viteMockmPlugin
. Ensure that the new plugin is correctly integrated and functions as expected.docs/src/guide/essentials/server.md (3)
7-7
: LGTM! Ensure correctness of the new server name and link.The introductory section has been updated to reflect the change from "Nitro" to "Mockm". Verify that the new server name and link are correct.
49-49
: LGTM! Ensure correctness of the new server configuration.The configuration section has been updated to reflect the change from "Nitro" to "Mockm". Verify that the new server name and configuration details are correct.
257-259
: LGTM! Ensure correctness of the new mock service details.The mock service section has been updated to reflect the change from "Nitro" to "Mockm". Verify that the new server name and mock service details are correct.
internal/vite-config/index.ts (5)
1-27
: LGTM! Ensure correctness and necessity of import statements.The import statements include various Vite plugins and type definitions. Verify that the import statements are correct and necessary for the functionality.
29-42
: LGTM! Ensure correctness of plugin loading logic.The function
loadConditionPlugins
correctly loads Vite plugins based on conditions. Verify that the function logic is correct.
47-81
: LGTM! Ensure correctness of common plugin loading logic.The function
loadCommonPlugins
correctly loads common Vite plugins based on conditions. Verify that the function logic is correct.
87-199
: LGTM! Ensure correctness of application-specific plugin loading logic.The function
loadApplicationPlugins
correctly loads application-specific Vite plugins based on conditions. Verify that the function logic is correct.
206-223
: LGTM! Ensure correctness of library-specific plugin loading logic.The function
loadLibraryPlugins
correctly loads library-specific Vite plugins based on conditions. Verify that the function logic is correct.
等你文档改好再提交 |
Description
Type of change
Please delete options that are not relevant.
pnpm-lock.yaml
unless you introduce a new test example.Checklist
pnpm run docs:dev
command.pnpm test
.feat:
,fix:
,perf:
,docs:
, orchore:
.其他自测
Summary by CodeRabbit
New Features
Documentation
Bug Fixes
Chores