Front-end debugging method and device

By maintaining and identifying the security level of pre-built dependency packages through a managed platform, the problems of long dependency package building time and security risks in micro front-end architecture are solved, and efficient and secure front-end debugging is achieved.

CN120994526APending Publication Date: 2025-11-21QI AN XIN TECHNOLOGY GROUP INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510896949.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

In a micro-frontend architecture, due to the large number of dependent packages and their isolation during frontend debugging, each frontend debugging session requires a complete rebuild of all dependent packages, which significantly extends startup time, affects efficiency, and increases the possibility of introducing dependent packages with security risks.

Method used

By maintaining pre-built artifacts of dependency packages through a hosting platform and marking their security levels, the target dependency package can be identified during front-end debugging, its construction can be skipped, and the pre-built artifacts with the appropriate security level can be directly used to pull them into the micro-application build artifacts for debugging.

Benefits of technology

It shortens the time required to build dependency packages for front-end debugging, improves debugging efficiency, and reduces the possibility of introducing dependency packages with security risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994526A_ABST
    Figure CN120994526A_ABST
Patent Text Reader

Abstract

The invention discloses a front-end debugging method and device, and relates to the technical field of front-end debugging, the front-end debugging method and device are applied to a front-end debugging system, the front-end debugging system is in communication connection with a hosting platform, the hosting platform is used for maintaining a pre-built product corresponding to at least one dependency package, and the pre-built product has a corresponding security level; determining a target dependency package in the dependency package of the micro-application included in the front end to be debugged, the target dependency package having a corresponding target pre-constructed product in the trusteeship platform, and the security level of the target pre-constructed product being adapted to the micro-application corresponding to the target dependency package; target construction processing is carried out on the micro-application included in the front end, a micro-application construction product corresponding to the micro-application is obtained, and the target construction processing is used for excluding the target dependency package from micro-application construction, so that the target dependency package does not participate in micro-application construction; pulling a target pre-construction product corresponding to the target dependency package to a corresponding micro-application construction product; the front end is debugged based on the micro-application build product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of front-end debugging technology, and in particular to a front-end debugging method and apparatus. Background Technology

[0002] In a micro-frontend architecture, the frontend is broken down into several independent micro-applications. Each micro-application is a complete development unit with its own dependency packages.

[0003] However, as the number of dependency packages relied upon by micro-applications grows exponentially, this architecture exposes the following two defects during front-end debugging: First, due to the large number and isolation of dependency packages in micro-applications, all dependency packages need to be completely rebuilt each time the front-end is debugged, which consumes a lot of time and significantly prolongs the startup time of front-end debugging, seriously affecting the efficiency of front-end debugging; Second, the decentralized management of dependency packages increases the possibility of introducing dependency packages with security risks, posing a potential threat to the security of the front-end.

[0004] Therefore, improving front-end debugging efficiency and reducing the possibility of introducing dependency packages with security risks have become urgent problems to be solved. Summary of the Invention

[0005] This application proposes a front-end debugging method and apparatus, the main purpose of which is to improve front-end debugging efficiency and reduce the possibility of introducing dependency packages with security risks under a micro-front-end architecture.

[0006] To achieve the above objectives, this application mainly provides the following technical solutions:

[0007] Firstly, this application provides a front-end debugging method applied to a front-end debugging system. The front-end debugging system is communicatively connected to a hosting platform, which maintains at least one pre-built artifact corresponding to a dependency package. The pre-built artifact has a corresponding security level. The front-end debugging method may at least include: determining a target dependency package in the dependency packages of a micro-application included in the front-end to be debugged, wherein the target dependency package has a corresponding target pre-built artifact in the hosting platform, and the security level of the target pre-built artifact is adapted to the micro-application corresponding to the target dependency package; performing target building processing on the micro-application included in the front-end to obtain a micro-application building artifact corresponding to the micro-application, wherein the target building processing is used to exclude the target dependency package from the micro-application building, so that the target dependency package does not participate in the micro-application building; pulling the target pre-built artifact corresponding to the target dependency package to the corresponding micro-application building artifact; and debugging the front-end based on the micro-application building artifact.

[0008] Secondly, this application provides a front-end debugging device applied to a front-end debugging system, wherein the front-end debugging system is communicatively connected to a hosting platform, and the hosting platform is used to maintain pre-built artifacts corresponding to at least one dependency package, wherein the pre-built artifacts have corresponding security levels, and the front-end debugging device may include at least:

[0009] The determination module is used to determine the target dependency package in the dependency package of the micro-application included in the front-end to be debugged. The target dependency package has a corresponding target pre-built artifact in the hosting platform, and the security level of the target pre-built artifact is adapted to the micro-application corresponding to the target dependency package.

[0010] The processing module is used to perform target building processing on the micro-applications included in the front end to obtain the micro-application building product corresponding to the micro-application. The target building processing is used to exclude the target dependency package from the micro-application building so that the target dependency package does not participate in the micro-application building.

[0011] The pull module is used to pull the target pre-built artifact corresponding to the target dependency package to the corresponding micro-application build artifact;

[0012] The debugging module is used to debug the front end based on the micro-application build artifacts.

[0013] Thirdly, this application provides a computer-readable storage medium including a stored program, wherein the program, when running, controls the device where the storage medium is located to execute the front-end debugging method described in the first aspect.

[0014] Fourthly, this application provides an electronic device comprising: a memory for storing a program; and a processor coupled to the memory for running the program to perform the front-end debugging method described in the first aspect.

[0015] Fifthly, this application provides a computer program product comprising: a computer program / computer executable instructions, wherein the computer program / computer executable is capable of performing the front-end debugging method described in the first aspect.

[0016] The front-end debugging method and apparatus provided in this application, after determining the front-end to be debugged, determines the target dependency package in the dependency package of the micro-application included in the front-end to be debugged based on the pre-built artifacts corresponding to the dependency packages maintained by the hosting platform and the security levels corresponding to the pre-built artifacts. The target dependency package has a corresponding target pre-built artifact in the hosting platform, and the security level of the target pre-built artifact is adapted to the micro-application corresponding to the target dependency package. Then, the micro-application included in the front-end undergoes target build processing to exclude the target dependency package from the micro-application build, thus preventing the target dependency package from participating in the micro-application build, resulting in the micro-application build artifact corresponding to the micro-application. Finally, the target pre-built artifact corresponding to the target dependency package is pulled to the corresponding micro-application build artifact, and the front-end is debugged based on the micro-application build artifact. It can be seen that, in the front-end debugging, for dependency packages of the micro-application with pre-built artifacts in the hosting platform, the micro-application directly uses the pre-built artifacts whose security levels are adapted to the micro-application's security level. This eliminates the need to completely rebuild all dependency packages of the front-end during debugging, thereby shortening the dependency package build time and improving front-end debugging efficiency. In addition, the front-end debugging uses the security level of the dependency packages that is adapted to the pre-built artifacts of the micro-application, thereby reducing the possibility of introducing dependency packages with security risks.

[0017] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A flowchart of a front-end debugging method provided in one embodiment of this application is shown;

[0020] Figure 2 This illustration shows a schematic diagram of the structure of a front-end debugging device according to an embodiment of this application;

[0021] Figure 3 A schematic diagram of the structure of a front-end debugging device provided in another embodiment of this application is shown. Detailed Implementation

[0022] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0023] In a micro-frontend architecture, the frontend is composed of several independently developed micro-applications, each typically having its own dependency packages. Currently, every time the frontend is debugged, all dependency packages need to be completely rebuilt, and the decentralized management of dependency packages increases the possibility of introducing dependency packages with security risks. This not only reduces frontend debugging efficiency but also poses a potential threat to frontend security.

[0024] Research has shown that dependency packages used by micro-applications within the front-end can be pre-built, resulting in pre-built artifacts. These pre-built artifacts are maintained by a pre-defined hosting platform, which assigns a security level to each artifact to indicate its security risk. During front-end debugging, for dependency packages with pre-built artifacts in the hosting platform, the micro-application can directly use the security level of the pre-built artifact, eliminating the need to rebuild all front-end dependency packages. This reduces dependency build time and improves debugging efficiency. Furthermore, using the pre-built artifacts with security levels tailored to the micro-application during debugging reduces the likelihood of introducing security-risk dependency packages.

[0025] Based on the above findings, this application provides a front-end debugging technology solution applied to a front-end debugging system. The front-end debugging system is communicatively connected to a hosting platform, which maintains pre-built artifacts corresponding to at least one dependency package. These pre-built artifacts have corresponding security levels. Specifically, the solution includes: determining the target dependency package in the dependency package of the micro-application included in the front-end to be debugged; the target dependency package has a corresponding target pre-built artifact in the hosting platform, and the security level of the target pre-built artifact is adapted to the micro-application corresponding to the target dependency package; performing target building processing on the micro-application included in the front-end to obtain the micro-application build artifact corresponding to the micro-application; the target building processing is used to exclude the target dependency package from the micro-application building process, preventing the target dependency package from participating in the micro-application building; pulling the target pre-built artifact corresponding to the target dependency package to the corresponding micro-application build artifact; and debugging the front-end based on the micro-application build artifact.

[0026] The front-end debugging technology solution provided in this embodiment can be applied to any front-end based on a micro-front-end architecture that requires debugging. Based on the above front-end debugging technology solution, this embodiment specifically provides a front-end debugging method and apparatus, which will be described in detail below.

[0027] This application provides a front-end debugging method, which is applied to a front-end debugging system to improve the front-end debugging efficiency. The front-end debugging system communicates with a hosting platform. The hosting platform maintains pre-built artifacts corresponding to at least one dependency package, and these pre-built artifacts have corresponding security levels.

[0028] Pre-built artifacts of dependency packages refer to the collection of files that have been pre-compiled and processed by the build tool, and these files can be directly used by the front-end. When micro-applications within the front-end use dependency packages, they do not need to rebuild from the source code of the dependency packages; they can directly use the corresponding pre-built artifacts. This eliminates the need to rebuild all front-end dependency packages during front-end debugging, significantly reducing the time spent building dependency packages during debugging and thus improving front-end debugging efficiency.

[0029] Each pre-built artifact has a corresponding security level. The security level indicates the degree of security risk of the pre-built artifact. This allows pre-built artifacts with security levels adapted to the security requirements of the micro-application to be used during front-end debugging, thereby reducing the possibility of introducing security-risk dependencies into the micro-application.

[0030] like Figure 1 As shown, the front-end debugging method provided in this embodiment mainly includes the following steps 101 to 104.

[0031] 101. Determine the target dependency package in the dependency package of the micro-application included in the front-end to be debugged. The target dependency package has a corresponding target pre-built artifact in the hosting platform, and the security level of the target pre-built artifact is adapted to the micro-application corresponding to the target dependency package.

[0032] After identifying the front-end to be debugged, determine the target dependency packages in the dependency packages of the micro-applications included in the front-end to be debugged, so that the target dependency packages will not be built during front-end debugging, and the target pre-built artifacts corresponding to the target dependency packages in the hosting platform can be used directly.

[0033] In some embodiments, the process of determining the specific target dependency package in the dependency package of the micro-application included in the front-end to be debugged may include the following steps 101A to 101B.

[0034] 101A. Obtain a target list of hosting platforms.

[0035] The same dependency package may be used by microapplications in different runtime environments. Therefore, to improve the versatility of the hosting platform, the same dependency package may have pre-built artifacts applicable to different microapplication runtime environments within the hosting platform. That is, the same dependency package corresponds to multiple pre-built artifacts, and each pre-built artifact has its own applicable microapplication runtime environment. Based on this, to more clearly manage the pre-built artifacts in the hosting platform, the hosting platform has a target list. The target list records the artifact description information of the pre-built artifacts, which indicates the dependency packages corresponding to the pre-built artifacts and the microapplication runtime environments that the pre-built artifacts are adapted to. The microapplication runtime environment refers to the software (e.g., operating system, framework version, etc.), hardware (e.g., environment variables, log levels, etc.), and configuration conditions that the microapplication depends on during deployment and runtime.

[0036] For example, the target list records product description information 1 corresponding to pre-built product 1, product description information 2 corresponding to pre-built product 2, and product description information 3 corresponding to pre-built product 3. Product description information 1 corresponding to pre-built product 1 is used to indicate the dependency package 1 corresponding to pre-built product 1 and the micro-application runtime environment 1 adapted to pre-built product 1. Product description information 2 corresponding to pre-built product 2 is used to indicate the dependency package 1 corresponding to pre-built product 2 and the micro-application runtime environment 2 adapted to pre-built product 2. Product description information 3 corresponding to pre-built product 3 is used to indicate the dependency package 2 corresponding to pre-built product 3 and the micro-application runtime environment 3 adapted to pre-built product 3. It can be seen that pre-built product 1 and pre-built product 2 are pre-built products of the same dependency package 1 adapted to different micro-application runtime environments.

[0037] 101B. Perform the following steps 101B1 to 101B3 for each dependency package of each micro-application included in the front end.

[0038] 101B1. If it is determined that there is a first product description information in the target list that matches the current micro-application and the current dependency package, then the pre-built product corresponding to the first product description information is taken as a candidate pre-built product.

[0039] The micro-application runtime environment indicated by the first product description information is compatible with the current micro-application, and the package name of the indicated dependency package is the same as the package name of the current dependency package. If it is determined that there is first product description information in the target list that matches the current micro-application and the current dependency package, it means that the pre-built product corresponding to the first product description information may be applicable to the current micro-application. Therefore, the pre-built product corresponding to the first product description information is taken as a candidate pre-built product.

[0040] 101B2. Determine whether there is a target pre-built product among the candidate pre-built products whose security level is compatible with the current micro-application.

[0041] If the security level of the pre-built artifacts used by a micro-application does not meet its security requirements, it may pose a potential threat to front-end security. Based on this, after identifying candidate pre-built artifacts, a step is performed to determine whether there is a target pre-built artifact among the candidate pre-built artifacts whose security level is compatible with the current micro-application. The specific implementation process of this step may include the following steps (1) to (3).

[0042] Step (1): Determine whether there is a first pre-built product among the candidate pre-built products with a security level no lower than that of the current micro-application; if so, proceed to step (2). If not, proceed to step (3).

[0043] The current micro-application has a corresponding security level, which reflects the security requirements of the current micro-application. In order to ensure that the current micro-application can use pre-built products that meet its security level, it is determined whether there is a first pre-built product among the candidate pre-built products with a security level no lower than the security level of the current micro-application.

[0044] Step (2): Determine the existence of a target pre-built product and identify the target pre-built product from the first pre-built product.

[0045] If it is determined that there is a first pre-built product among the candidate pre-built products with a security level no lower than that of the current micro-application, it means that there may be a target pre-built product among the first pre-built products that can be used by the current micro-application, and the target pre-built product is unlikely to introduce security vulnerabilities to the current micro-application after being used by the current micro-application. Therefore, it is determined that there is a target pre-built product, and the target pre-built product is determined from the first pre-built product.

[0046] The methods for determining the target pre-built artifact from the first pre-built artifacts can include the following two: First, the first pre-built artifact with the highest security level is determined as the target pre-built artifact. This ensures the security of the front end as much as possible. Second, the first pre-built artifact with the same security level as the current micro-application is determined as the target pre-built artifact. Considering that pre-built artifacts with higher security levels require more resources to run, have more complex running logic, and have a greater impact on front end performance, determining the first pre-built artifact with the same security level as the current micro-application as the target pre-built artifact ensures both front end security and micro-application performance. Either of the above two methods can be flexibly selected based on business needs, and this embodiment does not limit its use.

[0047] Step (3): Determine that there is no target pre-constructed product.

[0048] If none of the candidate pre-built artifacts has a security level at or above that of the current micro-application, it means that the security levels of these candidate pre-built artifacts do not meet the security requirements of the current micro-application. Therefore, it is determined that there is no target build artifact. In this case, the current dependency package of the current micro-application can be built in real time during the front-end debugging process.

[0049] In some embodiments, considering that in some scenarios pre-built artifacts with a security level lower than that of the current micro-application may be allowed to be applied to the current micro-application. Based on this, after determining in step (1) that there is no first pre-built artifact with a security level not lower than that of the current micro-application among the candidate pre-built artifacts, and before determining in step (3) that there is no target pre-built artifact, the front-end debugging method provided in this embodiment may further include the following steps (4) to (6).

[0050] Step (4): Determine whether the candidate pre-built products include only the third pre-built product with the target security level. The target security level is used to indicate that the pre-built product has a security risk. If yes, proceed to step (5); if no, proceed to step (6).

[0051] Hosting platforms may contain pre-built artifacts for dependency packages that contain security vulnerabilities, but whose security risks are manageable. This allows for the use of these pre-built artifacts when front-end development projects have tight deadlines and cannot develop security-free dependency packages in time. These pre-built artifacts are then patched as the front-end project progresses, ensuring that the project timeline is not affected and that security vulnerabilities are fixed by the time the project is delivered.

[0052] Based on this, if it is determined that there is no first pre-built product with a security level no lower than the current micro-application's security level among the candidate pre-built products, it is determined whether the candidate pre-built products only include a third pre-built product with the target security level.

[0053] Step (5): If the dependency package corresponding to the third pre-built product is determined to be a dependency package that is allowed to be used according to the whitelist of the current micro-application, the target pre-built product is determined to exist and the target pre-built product is determined from the third pre-built product.

[0054] If the candidate pre-built artifacts are determined to include only the third pre-built artifact at the target security level, it indicates that all candidate pre-built artifacts pose security risks. Therefore, it is necessary to further determine whether the dependency package corresponding to the third pre-built artifact is a dependency package that is allowed to be used according to the whitelist of the current micro-application.

[0055] If the dependency package corresponding to the third pre-built product is determined to be a whitelisted dependency package that is allowed to be used in the current micro-application, it means that the third pre-built product is allowed to be used in the current micro-application. The target build product can be determined from the third pre-built product, so it is determined that the target pre-built product exists.

[0056] If it is determined that the dependency package corresponding to the third pre-built artifact is not a dependency package that is allowed to be used according to the whitelist of the current micro-application, it means that the third pre-built artifact is not allowed to be applied to the current micro-application, and therefore it is determined that there is no target pre-built artifact.

[0057] Step (6): Ask the current micro-application whether to allow the use of security downgrade dependency packages. If a second permission instruction is received, determine that there is a target pre-built product and identify the pre-built product with the highest security level among the pre-built products with a security level lower than that of the current micro-application as the target pre-built product.

[0058] If it is determined that the candidate pre-built artifacts do not only include the third pre-built artifact at the target security level, then it means that the candidate pre-built artifacts include pre-built artifacts at other security levels. To confirm whether these pre-built artifacts with security levels lower than the current micro-application's security level can be applied to the current micro-application, an inquiry is issued to the current micro-application regarding whether the use of security degradation dependency packages is permitted.

[0059] If a second permission instruction is received in response to the query, indicating that the current micro-application allows the use of pre-built artifacts with a lower security level, then it is determined that a target pre-built artifact exists, and the pre-built artifact with the highest security level among the pre-built artifacts with a security level lower than the current micro-application's security level is identified as the target pre-built artifact.

[0060] If no second permission instruction is received within the preset time after sending the query, or if a rejection instruction is received in response to the query, it indicates that the current microapplication does not allow the use of pre-built artifacts with a lower security level, and therefore it is determined that the target pre-built artifact does not exist. In this case, the current dependency package of the current microapplication can be built in real time during the front-end debugging process.

[0061] In some embodiments, different versions of the same dependency package may exist, and different versions may use the same package name. Based on this, the front-end debugging method provided in this embodiment may further include the following steps (6) to (8) before performing step (1).

[0062] Step (6): Determine whether the candidate pre-built artifacts include the second pre-built artifact whose version number of the corresponding dependency package is not lower than that of the current dependency package; if so, proceed to step (7); if not, proceed to step (8).

[0063] Different versions of the same dependency package may have different performance or functionalities. Therefore, it is determined whether the candidate pre-built artifacts include a second pre-built artifact whose version number is not lower than that of the current dependency package.

[0064] Step (7): Remove all pre-built products other than the second pre-built product from the candidate pre-built products, and perform step (1) to determine whether there is a first pre-built product among the candidate pre-built products with a security level not lower than the current micro-application's security level.

[0065] If it is determined that the candidate pre-built products include the second pre-built product whose version number of the corresponding dependency package is not lower than that of the current dependency package, it means that the second pre-built products all meet the usage requirements of the current micro-application. Therefore, in order to avoid the interference of the pre-built products with version numbers lower than that of the current dependency package in determining the target pre-built product, other pre-built products (i.e., pre-built products with version numbers lower than that of the current dependency package) except for the second pre-built product are removed from the candidate pre-built products, and after removal, step (1) is executed.

[0066] Step (8): Ask the current micro-application whether to allow the use of version downgrade dependency packages. If the first allow instruction is received, then execute step (1) to determine whether there is a first pre-built product with a security level not lower than the security level of the current micro-application among the candidate pre-built products.

[0067] If it is determined that the candidate pre-built artifacts do not include the second pre-built artifact whose version number is not lower than that of the current dependency package, then an inquiry is issued to the current micro-application to determine whether the use of the version downgrade dependency package is allowed, in order to confirm whether the pre-built artifact with the lower version number can be used in the current micro-application.

[0068] If a first permission instruction is received in response to the query, it means that the current microapplication allows the use of pre-built artifacts with lower version numbers, so proceed to step (1).

[0069] If no first permission instruction is received within the preset time after the query is issued, or if a rejection instruction is received in response to the query, it means that the current micro-application does not allow the use of pre-built artifacts with lower version numbers, and therefore it is determined that the target pre-built artifact does not exist.

[0070] 101B3. If it is determined that there is a target pre-built product among the candidate pre-built products whose security level is compatible with the current micro-application, then the current dependency package is determined to be the target dependency package.

[0071] If a target pre-built product with a security level that is compatible with the current micro-application is identified among the candidate pre-built products, it means that the target pre-built product can be applied to the current micro-application. Therefore, the current dependency package is identified as the target dependency package.

[0072] Furthermore, if it is determined that there is no target pre-built artifact among the candidate pre-built artifacts with a security level suitable for the current micro-application, then the current dependency package is determined to be not the target dependency package. In this case, the current dependency package of the current micro-application can be built in real time during the front-end debugging process.

[0073] In some embodiments, dependency packages with different package names may have the same functionality, and the microapplication depends on the functionality of the dependency package. Based on this, the front-end debugging method provided in this embodiment may further include the following steps: if it is determined that there is no first product description information in the target list, and it is determined that there is second product description information in the target list, then the pre-built product corresponding to the second product description information is taken as a candidate pre-built product, and it is determined whether there is a target pre-built product whose security level is adapted to the current microapplication among the candidate pre-built products. If so, the current dependency package is determined to be the target dependency package.

[0074] The micro-application runtime environment indicated by the second product description information is adapted to the current micro-application, and the package name of the indicated dependency package is different from the package name of the current dependency package, and the function of the indicated dependency package is the same as the function of the current dependency package. Based on this, if it is determined that the first product description information does not exist in the target list, and it is determined that the second product description information exists in the target list, it means that the pre-built product corresponding to the second product description information has the possibility of replacing the pre-built product corresponding to the first product description information in the current micro-application. Therefore, the pre-built product corresponding to the second product description information is taken as a candidate pre-built product, and the step of determining whether there is a target pre-built product whose security level is adapted to the current micro-application is executed among the candidate pre-built products. The specific implementation method of this step can be found in steps (1) to (3) above, and will not be repeated here.

[0075] 102. Perform target build processing on the micro-applications included in the front end to obtain the micro-application build artifacts corresponding to the micro-applications. The target build processing is used to exclude target dependency packages from the micro-application build, so that the target dependency packages do not participate in the micro-application build.

[0076] After identifying the target dependency packages, a target build process is performed on each micro-application included in the front-end, resulting in the corresponding micro-application artifacts. It's important to note that because the target dependency packages use corresponding pre-built artifacts from the hosting platform, these packages are skipped during the micro-application build process. In other words, the target dependency packages are excluded from the micro-application build, preventing them from participating. By skipping the target dependency packages during the micro-application build process, the build time can be significantly shortened.

[0077] 103. Pull the target pre-built artifacts corresponding to the target dependency packages into the corresponding micro-application build artifacts.

[0078] The target dependency packages in a micro application use their corresponding target pre-built artifacts in the hosting platform. Therefore, after obtaining the micro application build artifacts, in order to ensure the integrity of the micro application build artifacts, the target pre-built artifacts corresponding to the target dependency packages are pulled into the corresponding micro application build artifacts.

[0079] The specific process of pulling the target pre-built artifact corresponding to the target dependency package into the corresponding micro-application build artifact depends on the current debugging environment of the front end. Based on this, the implementation method of pulling the target pre-built artifact corresponding to the target dependency package into the corresponding micro-application build artifact can at least include the following methods A1 to A2.

[0080] Method A1: If the current debugging environment of the front end is the development environment, modify the reference address of the target dependency package in the micro-application build artifact to the address of the target build artifact corresponding to the target dependency package in the hosting platform, so as to pull the target build artifact to the corresponding micro-application build artifact through the modified address.

[0081] If the current debugging environment for the front end is the development environment, it means that the front end does not need to be packaged as a whole yet, and development operations are still required. Therefore, the reference address of the target dependency package in the micro-application build artifact is modified to the address of the target build artifact corresponding to the target dependency package in the hosting platform. In this way, when the front end test is started, the target build artifact is pulled from the hosting platform to the corresponding micro-application build artifact through the modified address, thereby completing the overall testing of the front end.

[0082] Method A2: If the current debugging environment of the front-end is a release environment, then deduplicate the target pre-built artifacts required by multiple target micro-applications in the front-end to form a target pre-built artifact list corresponding to the front-end; copy the target pre-built artifacts in the target pre-built artifact list from the hosting platform to the corresponding path in the front-end's release directory so that target micro-applications using the same target pre-built artifact can share the target pre-built artifacts in the same path; modify the reference address of the target dependency package in the micro-application build artifact to the path of the target pre-built artifact corresponding to the target dependency package in the release directory so as to pull the target build artifact to the corresponding micro-application build artifact through the path.

[0083] If the current debugging environment for the frontend is a release environment, it means the frontend is about to be released and needs to be packaged as a whole. Therefore, the target pre-built artifacts needed by multiple target micro-applications in the frontend are deduplicated to form a list of target pre-built artifacts for the frontend. It should be noted that a target micro-application is a micro-application that can share the same pre-built artifacts with other micro-applications. If a micro-application uses the same target pre-built artifacts as other micro-applications, but this micro-application is not allowed to share pre-built artifacts with other micro-applications, and this micro-application needs to use the target pre-built artifacts independently, then this micro-application will not be included as a target micro-application.

[0084] After obtaining the list of target pre-built artifacts, the target pre-built artifacts in the list are copied from the hosting platform to the corresponding paths in the front-end's release directory. This allows target micro-applications using the same target pre-built artifact to share the target pre-built artifacts in the same path. Then, the reference addresses of target dependency packages in the micro-application build artifacts are modified to the paths of the corresponding target pre-built artifacts in the release directory, so that the target build artifacts are pulled to the corresponding micro-application build artifacts via these paths. Therefore, this embodiment reduces the size of the front-end project build artifacts by deduplicating dependencies between micro-applications, thereby improving the front-end project's running speed and enhancing the user experience.

[0085] 104. Debug the front end based on the artifacts built from the micro-application.

[0086] After pulling the target pre-built artifacts corresponding to the target dependency packages into the corresponding micro-application build artifacts, the front-end integrates all the micro-application build artifacts corresponding to the micro-applications included in the front-end using a preset debugging tool, and debugs the integrated artifacts, thereby achieving front-end debugging. The debugging tools here can be flexibly selected based on business needs, and this embodiment does not limit them.

[0087] The front-end debugging method provided in this embodiment, after determining the front-end to be debugged, determines the target dependency package in the dependency package of the micro-application included in the front-end to be debugged based on the pre-built artifacts corresponding to the dependency packages maintained by the hosting platform and the security levels corresponding to the pre-built artifacts. The target dependency package has a corresponding target pre-built artifact in the hosting platform, and the security level of the target pre-built artifact is adapted to the micro-application corresponding to the target dependency package. Then, the micro-application included in the front-end undergoes target build processing to exclude the target dependency package from the micro-application build, thus preventing the target dependency package from participating in the micro-application build, resulting in the micro-application build artifact corresponding to the micro-application. Finally, the target pre-built artifact corresponding to the target dependency package is pulled to the corresponding micro-application build artifact, and the front-end is debugged based on the micro-application build artifact. It can be seen that, in the front-end debugging, for dependency packages of the micro-application with pre-built artifacts in the hosting platform, the micro-application directly uses the pre-built artifacts whose security levels are adapted to the micro-application's security level. This eliminates the need to completely rebuild all dependency packages of the front-end during debugging, thereby shortening the dependency package build time and improving front-end debugging efficiency. In addition, the front-end debugging uses the security level of the dependency packages that is adapted to the pre-built artifacts of the micro-application, thereby reducing the possibility of introducing dependency packages with security risks.

[0088] In some embodiments of this application, the programming language of the target pre-built artifact should, in principle, be consistent with the programming language of the micro-application that uses it. Based on this, before pulling the target pre-built artifact corresponding to the target dependency package to the corresponding micro-application build artifact in step 103 above, the front-end debugging method provided in this embodiment may further include the following operation flow A and operation flow B.

[0089] Operational process A: If a fourth pre-built artifact exists in the target pre-built artifact, and the programming language of the fourth pre-built artifact is different from that of its corresponding micro-application, then determine the underlying business logic code of the dependency package corresponding to the fourth pre-built artifact in the hosting platform, as well as the code including the functions, interfaces, and dependencies of the dependency package; convert the underlying code into code using the programming language of the micro-application; convert the code corresponding to the functions, interfaces, and dependencies into code that conforms to the syntax and logic of the programming language used by the micro-application; perform pre-build processing on the dependency package after code conversion to convert the programming language of the fourth pre-built artifact to be the same as that of its corresponding micro-application.

[0090] If a fourth pre-built artifact exists in the target pre-built artifact, a programming language conversion is required to ensure that the programming language of the fourth pre-built artifact is consistent with its corresponding micro-application.

[0091] When converting dependency packages to different programming languages, the underlying business logic code of the dependency package is converted into code in the programming language used by the micro-application. This ensures that its core functionality runs directly in the language environment corresponding to the micro-application's programming language, avoiding performance overhead and compatibility issues caused by cross-language calls. Converting the code for functionality, interfaces, and dependencies into code that conforms to the syntax and logic of the micro-application's programming language maintains the consistency of dependency package behavior, API design habits, and ecosystem adaptability. This allows the converted code to naturally integrate into the development paradigm of the micro-application's programming language while maintaining correct interaction with other components. In this way, a seamless migration of the technology stack is achieved while preserving the original functionality of the dependency package.

[0092] The dependency packages after code conversion undergo pre-build processing. The build environment and build parameters used in this pre-build process reuse the corresponding build environment and build parameters of the fourth pre-build product. The pre-build product obtained from the pre-build process uses the same programming language as the micro-application and is used to replace the original fourth pre-build product.

[0093] Operational procedure B: If a fourth pre-built product exists in the target pre-built product, and the programming language of the fourth pre-built product is different from that of its corresponding micro-application, then the fourth pre-built product is encapsulated as an independently running service, and a corresponding service interface is set up so that the micro-application can pull the fourth pre-built product through the service interface.

[0094] The fourth pre-built artifact is packaged into an independently running service using a pre-defined packaging tool, and a corresponding service interface is set for the packaged service. In this way, there is no need to convert the fourth pre-built artifact into a programming language, and micro-applications can pull the fourth pre-built service for use through the service interface.

[0095] In some embodiments of this application, in order to enable the hosting platform to continuously provide pre-built artifacts of dependency packages for front-end debugging, the front-end debugging method provided in this embodiment may further include the following steps 201 to 202.

[0096] 201. Collect dependency packages that can be used for front-end development as candidate dependency packages.

[0097] There are three main methods for collecting dependency packages that can be used for front-end development as candidate dependency packages: First, check if the collection interface receives externally submitted dependency packages. If so, use these packages as candidate dependency packages. The collection interface is an externally provided interactive interface; developers can submit shared dependency packages through this interface. Second, fetch dependency packages from a pre-defined public platform and use these fetched dependencies as candidate dependency packages. Third, if front-end debugging is successful, collect all dependency packages required by the micro-applications included in the front-end, excluding the target dependency package, as candidate dependency packages to enrich and supplement the pre-built dependency package artifacts maintained by the hosting platform.

[0098] 202. If the candidate dependency package is found to have no security risk, or if the candidate dependency package is found to have security risk and is a dependency package that is allowed to be used according to the target whitelist, then the candidate dependency package is used as a dependency package to be built, the dependency package to be built is pre-built, and the pre-built product is sent to the hosting platform for maintenance.

[0099] To avoid introducing security vulnerabilities into the front-end to be debugged, after collecting candidate dependency packages, a preset security scanning system is used to detect security vulnerabilities in the candidate dependency packages. If no security vulnerabilities are detected in the candidate dependency package, it is determined that the candidate dependency package has no security risk, and the candidate dependency package is used as a dependency package to be built. The pre-build process is then performed on the dependency package to be built, and the pre-build artifact is sent to the hosting platform for maintenance.

[0100] If a security vulnerability is detected in a candidate dependency package, it is determined that the candidate dependency package poses a security risk. In some scenarios, to shorten the front-end development cycle, it may be permissible to use dependency packages with security risks that are manageable in the front-end micro-applications. Based on this, if a candidate dependency package is detected as having a security risk and is a dependency package indicated as allowed by the target whitelist, it means that these dependency packages are allowed to be used in the front-end. Therefore, the candidate dependency package is treated as a dependency package to be built, and pre-build processing is performed on the dependency package to be built. The pre-build artifact is then sent to the hosting platform for maintenance.

[0101] In some embodiments, the specific implementation process of pre-building the dependency packages to be built may include the following steps 202A to 202C.

[0102] 202A. Select at least one pre-build environment for the dependency package to be built, based on the operating system, programming language, and hardware architecture to which the dependency package is applicable.

[0103] Considering that dependency packages may be applied to different micro-application runtime environments, a step is performed to select at least one pre-build environment for the dependency package to be built based on the applicable operating system, programming language, and hardware architecture. The implementation method of this step may include the following steps: determining the micro-application that needs to depend on the current dependency package to be built; determining all possible micro-application runtime environments; and for each micro-application runtime environment, performing the following separately: determining the corresponding operating system, programming language, and hardware architecture of the current micro-application runtime environment, and building a pre-build environment compatible with the current micro-application runtime environment based on the operating system, programming language, and hardware architecture, so as to ensure that the pre-built artifacts pre-built in such a pre-build environment can be adapted to the current micro-application runtime environment.

[0104] 202B: Set the build parameters for the dependencies to be built in each pre-build environment.

[0105] In a pre-built environment, build parameters directly affect the security of the pre-built artifacts of dependent packages. Therefore, it is necessary to set build parameters for the dependent packages to be built in each pre-built environment. Build parameters can be flexibly selected based on business needs, and this embodiment does not limit this. For example, build parameters may include, but are not limited to: secure compilation options (e.g., stack protection, memory initialization, etc.), permissions and isolation configurations, etc.

[0106] 202C. Based on the build parameters, pre-build the dependency packages to be built in the corresponding pre-build environment to obtain the corresponding pre-build products of the dependency packages to be built in each pre-build environment.

[0107] The pre-built tool is invoked to perform pre-build processing on the dependency packages to be built in the corresponding pre-build environment based on the build parameters, resulting in pre-build artifacts for each dependency package in each pre-build environment. The pre-build tool can be flexibly selected based on business needs, and this embodiment does not limit it. After obtaining the pre-build artifacts, they are sent to the hosting platform for maintenance and use during front-end debugging.

[0108] In some embodiments of this application, due to limitations in security detection capabilities, some dependency packages corresponding to pre-built artifacts may contain security vulnerabilities, and these vulnerabilities may not have been detected when the pre-built artifacts were formed. Based on this, the front-end debugging method provided in this embodiment may further include the following steps: if a new security vulnerability detection strategy is acquired, then security vulnerability detection is performed on the dependency packages corresponding to the pre-built artifacts in the hosting platform based on the new security vulnerability detection strategy; if an abnormal dependency package with a security vulnerability is detected, then the abnormal dependency package is patched, and the patched abnormal dependency package is used as a dependency package to be built. Pre-built processing is performed on the dependency package to be built, and the pre-built artifact obtained from the pre-built processing replaces the original pre-built artifact of the abnormal dependency package in the hosting platform.

[0109] If the new security vulnerability detection strategy detects an abnormal dependency package with a security vulnerability, it means that the security vulnerability in the abnormal dependency package was not previously discovered, and its pre-built artifact in the hosting platform contains a security vulnerability. Therefore, the abnormal dependency package is patched, and the patched abnormal dependency package is used as the dependency package to be built. Pre-build processing is then performed on the dependency package to be built to generate a pre-built artifact without security vulnerabilities. The method for pre-build processing of the dependency package to be built can be found in steps 202A to 202C above, so it will not be repeated here.

[0110] After pre-building the dependency packages to be built to obtain pre-built artifacts, the pre-built artifacts obtained from the pre-build process are used to replace the original pre-built artifacts of the abnormal dependency packages in the hosting platform, so as to avoid introducing security vulnerabilities to the front end as much as possible.

[0111] In some embodiments of this application, in order to set an accurate security level for the pre-built artifacts maintained by the hosting platform, the front-end debugging method provided in this embodiment may further include the following steps: setting the security level of the pre-built artifact based on at least one of the security risk of the dependency package corresponding to the pre-built artifact itself and the security risk of the pre-built artifact's pre-building process.

[0112] The security risks of the dependency packages corresponding to the pre-built artifacts can be represented by the security vulnerabilities of the dependency packages corresponding to the pre-built artifacts (e.g., the probability of the existence of security vulnerabilities and the degree of harm caused by the existing security vulnerabilities).

[0113] The safety risks of the pre-construction process of pre-built products can be represented by the safety of the pre-construction environment used during the construction of the pre-built products and the safety of the construction parameters corresponding to the pre-construction environment.

[0114] For example, the analysis and execution for each dependency package to be added to the hosting platform is as follows: The target data of the dependency package is input into a preset model, and the preset model is set to the security level of the dependency package based on the security level of the target output. The target data includes data describing at least one of the following: the security risk of the dependency package itself corresponding to the pre-built artifact, and the security risk of the pre-built artifact's pre-building process. The preset model is trained based on multiple sets of data, each set including sample target data and the corresponding security level.

[0115] Furthermore, one embodiment of this application also provides a front-end debugging device applied to a front-end debugging system. The front-end debugging system is communicatively connected to a hosting platform, which maintains pre-built artifacts corresponding to at least one dependency package. These pre-built artifacts have corresponding security levels, such as... Figure 2 As shown, the front-end debugging device provided in this embodiment may include at least:

[0116] The determination module 31 is used to determine the target dependency package in the dependency package of the micro-application included in the front-end to be debugged. The target dependency package has a corresponding target pre-built product in the hosting platform, and the security level of the target pre-built product is adapted to the micro-application corresponding to the target dependency package.

[0117] Processing module 32 is used to perform target building processing on the micro-applications included in the front end to obtain the micro-application building product corresponding to the micro-application. The target building processing is used to exclude target dependency packages from the micro-application building so that the target dependency packages do not participate in the micro-application building.

[0118] Pull module 33 is used to pull the target pre-built product corresponding to the target dependency package to the corresponding micro-application build product;

[0119] The debugging module 34 is used to debug the front end based on the micro-application build artifacts.

[0120] The front-end debugging apparatus provided in this embodiment, after determining the front-end to be debugged, determines the target dependency package in the dependency package of the micro-application included in the front-end to be debugged based on the pre-built artifacts corresponding to the dependency packages maintained by the hosting platform and the security levels corresponding to the pre-built artifacts. The target dependency package has a corresponding target pre-built artifact in the hosting platform, and the security level of the target pre-built artifact is adapted to the micro-application corresponding to the target dependency package. Then, the micro-application included in the front-end undergoes target build processing to exclude the target dependency package from the micro-application build, thus preventing the target dependency package from participating in the micro-application build, resulting in the micro-application build artifact corresponding to the micro-application. Finally, the target pre-built artifact corresponding to the target dependency package is pulled to the corresponding micro-application build artifact, and the front-end is debugged based on the micro-application build artifact. It can be seen that, in the front-end debugging process, for dependency packages of the micro-application that have pre-built artifacts in the hosting platform, the micro-application directly uses the pre-built artifacts whose security levels are adapted to the micro-application's security level. This eliminates the need to completely rebuild all dependency packages of the front-end during debugging, thereby shortening the dependency package build time and improving front-end debugging efficiency. In addition, the front-end debugging uses the security level of the dependency packages that is adapted to the pre-built artifacts of the micro-application, thereby reducing the possibility of introducing dependency packages with security risks.

[0121] In some embodiments of this application, such as Figure 3 As shown, the determining module 31 may include:

[0122] The acquisition unit 311 is used to acquire the target list of the hosting platform. The target list is used to record the product description information of the pre-built products. The product description information is used to indicate the dependency packages corresponding to the pre-built products and the micro-application runtime environment adapted to the pre-built products.

[0123] The first judgment unit 312 is used to perform the following for each dependency package of each micro-application included in the front end: if it is determined that there is first product description information in the target list that matches the current micro-application and the current dependency package, then the pre-built product corresponding to the first product description information is taken as a candidate pre-built product, and it is determined whether there is a target pre-built product whose security level is adapted to the current micro-application among the candidate pre-built products. If there is, then the current dependency package is determined to be the target dependency package; wherein, the micro-application running environment indicated by the first product description information is adapted to the current micro-application, and the package name of the indicated dependency package is the same as the package name of the current dependency package.

[0124] In some embodiments of this application, such as Figure 3As shown, the first judgment unit 312 is specifically used to determine whether there is a first pre-built product with a security level not lower than the current micro-application among the candidate pre-built products; if there is, it is determined that there is a target pre-built product, and the target pre-built product is determined from the first pre-built product; if there is no target pre-built product, it is determined that there is no target pre-built product.

[0125] In some embodiments of this application, such as Figure 3 As shown, the first judgment unit 312 can also be used to determine whether the candidate pre-built products include a second pre-built product whose version number of the corresponding dependency package is not lower than that of the current dependency package; if it includes, then other pre-built products other than the second pre-built product are removed from the candidate pre-built products, and the step of determining whether there is a first pre-built product with a security level not lower than that of the current micro-application is executed; if it does not include, then an inquiry is sent to the current micro-application to ask whether the version downgrade dependency package is allowed to be used; if a first permission instruction is received, then the step of determining whether there is a first pre-built product with a security level not lower than that of the current micro-application is executed.

[0126] In some embodiments of this application, such as Figure 3 As shown, the first judgment unit 312 can also be used to determine whether the candidate pre-built products include only a third pre-built product with a target security level after determining that there is no first pre-built product with a security level not lower than the current micro-application's security level among the candidate pre-built products, and before determining that there is no target pre-built product. The target security level is used to indicate that the pre-built product has a security risk. If yes, then if it is determined that the dependency package corresponding to the third pre-built product is a whitelisted dependency package that is allowed to be used by the current micro-application, the target pre-built product is determined to exist, and the target pre-built product is determined from the third pre-built product. If no, then an inquiry is sent to the current micro-application to ask whether the security downgrade dependency package is allowed to be used, and upon receiving a second permission instruction, the target pre-built product is determined to exist, and the pre-built product with the highest security level among the pre-built products with a security level lower than the current micro-application's security level is determined as the target pre-built product.

[0127] In some embodiments of this application, such as Figure 3 As shown, the determining module 21 may further include:

[0128] The determining unit 313 is used to determine that if the target list does not contain first product description information and the target list contains second product description information, then the pre-built product corresponding to the second product description information is taken as a candidate pre-built product.

[0129] The second judgment unit 314 is used to determine whether there is a target pre-built product among the candidate pre-built products whose security level is adapted to the current micro-application. If there is, the current dependency package is determined to be the target dependency package. The micro-application runtime environment indicated by the second product description information is adapted to the current micro-application, and the package name of the indicated dependency package is different from the package name of the current dependency package, and the function of the indicated dependency package is the same as the function of the current dependency package.

[0130] In some embodiments of this application, such as Figure 3 As shown, the second judgment unit 314 is specifically used to determine whether there is a first pre-built product with a security level not lower than the current micro-application among the candidate pre-built products; if there is, it is determined that there is a target pre-built product, and the target pre-built product is determined from the first pre-built product; if there is no target pre-built product, it is determined that there is no target pre-built product.

[0131] In some embodiments of this application, such as Figure 3 As shown, the second judgment unit 314 can also be used to determine whether the candidate pre-built products include a second pre-built product whose version number of the corresponding dependency package is not lower than that of the current dependency package; if it includes, then other pre-built products other than the second pre-built product are removed from the candidate pre-built products, and the step of determining whether there is a first pre-built product with a security level not lower than that of the current micro-application is executed; if it does not include, then an inquiry is sent to the current micro-application to ask whether the version downgrade dependency package is allowed to be used. If a first permission instruction is received, then the step of determining whether there is a first pre-built product with a security level not lower than that of the current micro-application is executed.

[0132] In some embodiments of this application, such as Figure 3 As shown, the second judgment unit 314 can also be used to determine whether the candidate pre-built products include only a third pre-built product with a target security level, after determining that there is no first pre-built product with a security level not lower than the current micro-application's security level among the candidate pre-built products, and before determining that there is no target pre-built product, to determine whether the candidate pre-built products include only a third pre-built product with a target security level, wherein the target security level is used to indicate that the pre-built product has a security risk; if so, then if it is determined that the dependency package corresponding to the third pre-built product is a dependency package that is allowed to be used according to the whitelist of the current micro-application, it is determined that there is a target pre-built product, and the target pre-built product is determined from the third pre-built product; if not, then an inquiry is issued to the current micro-application regarding whether to allow the use of the security downgrade dependency package, and upon receiving a second permission instruction, it is determined that there is a target pre-built product, and the pre-built product with the highest security level among the pre-built products with a security level lower than the current micro-application's security level is determined as the target pre-built product.

[0133] In some embodiments of this application, such as Figure 3 As shown, the pull module 33 may include:

[0134] The first pull unit 331 is used to modify the reference address of the target dependency package in the micro-application build artifact to the address of the target build artifact corresponding to the target dependency package in the hosting platform if the current debugging environment of the front end is a development environment, so as to pull the target build artifact to the corresponding micro-application build artifact through the modified address.

[0135] or,

[0136] The second pull unit 332 is configured to, if the current debugging environment of the front-end is a release environment, perform deduplication processing on the target pre-built artifacts required by multiple target micro-applications in the front-end to form a target pre-built artifact list corresponding to the front-end; copy the target pre-built artifacts in the target pre-built artifact list from the hosting platform to the corresponding path in the release directory of the front-end, so that target micro-applications using the same target pre-built artifacts can share the target pre-built artifacts in the same path; modify the reference address of the target dependency package in the micro-application build artifact to the path of the target pre-built artifact corresponding to the target dependency package in the release directory, so as to pull the target build artifact to the corresponding micro-application build artifact through the path.

[0137] In some embodiments of this application, such as Figure 3 As shown, the front-end debugging device provided in this embodiment may further include: a conversion module 35, used to, before the pull module 33 pulls the target pre-built product corresponding to the target dependency package to the corresponding micro-application build product, if there is a fourth pre-built product in the target pre-built product, and the programming language of the fourth pre-built product is different from that of its corresponding micro-application, determine the underlying business logic code of the dependency package corresponding to the fourth pre-built product in the hosting platform, and determine the code including the functions, interfaces and dependencies of the dependency package; convert the underlying code into code used by the micro-application; convert the code corresponding to the functions, interfaces and dependencies into code that conforms to the syntax logic of the programming language used by the micro-application; and perform pre-build processing on the dependency package after code conversion to convert the programming language of the fourth pre-built product to be the same as that of its corresponding micro-application.

[0138] In some embodiments of this application, such as Figure 3 As shown, the front-end debugging device provided in this embodiment may further include: an encapsulation module 36, which is used to encapsulate the fourth pre-built product as an independently running service and set up a corresponding service interface so that the micro-application can pull the fourth pre-built product through the service interface before the pull module 33 pulls the target pre-built product corresponding to the target dependency package to the corresponding micro-application build product.

[0139] In some embodiments of this application, such as Figure 3 As shown, the front-end debugging device provided in this embodiment may further include:

[0140] Collection module 37 is used to collect dependency packages that can be used for front-end development as candidate dependency packages;

[0141] The first pre-build module 38 is used to pre-build the candidate dependency package as a dependency package to be built if the candidate dependency package is found to have no security risk, or if the candidate dependency package is found to have security risk and the candidate dependency package is a dependency package that is allowed to be used according to the target whitelist, and then send the pre-build product to the hosting platform for maintenance.

[0142] In some embodiments of this application, such as Figure 3 As shown, the collection module 37 is specifically used to collect other dependency packages besides the target dependency package from the dependency packages required by the micro-applications included in the front end, when it is determined that the debugging module 34 has successfully debugged the front end, as candidate dependency packages.

[0143] In some embodiments of this application, such as Figure 3 As shown, the first pre-build module 38 is specifically used to select at least one pre-build environment for the dependency package to be built according to the operating system, programming language and hardware architecture applicable to the dependency package to be built; set build parameters for the dependency package to be built in each pre-build environment; and perform pre-build processing on the dependency package to be built in the corresponding pre-build environment based on the build parameters to obtain the corresponding pre-build product of the dependency package to be built in each pre-build environment.

[0144] In some embodiments of this application, such as Figure 3 As shown, the front-end debugging device provided in this embodiment may further include:

[0145] The detection module 39 is used to perform security vulnerability detection on the dependency packages corresponding to the pre-built artifacts in the hosting platform based on the new security vulnerability detection strategy if a new security vulnerability detection strategy is collected.

[0146] The second pre-build module 40 is used to fix the vulnerability in an abnormal dependency package if a security vulnerability is detected, and to use the abnormal dependency package with the vulnerability fixed as a dependency package to be built, to perform pre-build processing on the dependency package to be built, and to replace the original pre-build product of the abnormal dependency package in the hosting platform with the pre-build product obtained from the pre-build processing.

[0147] In some embodiments of this application, such as Figure 3As shown, the second pre-build module 40 is specifically used to select at least one pre-build environment for the dependency package to be built according to the operating system, programming language and hardware architecture applicable to the dependency package to be built; set build parameters for the dependency package to be built in each pre-build environment; and perform pre-build processing on the dependency package to be built in the corresponding pre-build environment based on the build parameters to obtain the corresponding pre-build product of the dependency package to be built in each pre-build environment.

[0148] In some embodiments of this application, such as Figure 3 As shown, the front-end debugging device provided in this embodiment may further include: a setting module 41, used to set the security level of the pre-built product based on at least one of the security risk of the dependency package corresponding to the pre-built product itself and the security risk of the pre-built process of the pre-built product.

[0149] For a detailed explanation of the various functional modules used in the operation of the front-end debugging device provided in this application embodiment, please refer to the corresponding detailed explanation of the front-end debugging method embodiment above, which will not be repeated here.

[0150] Furthermore, one embodiment of this application also provides a computer-readable storage medium, the storage medium including a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to perform the aforementioned front-end debugging method.

[0151] Furthermore, one embodiment of this application also provides an electronic device, the electronic device comprising: a memory for storing a program; and a processor coupled to the memory for running the program to perform the aforementioned front-end debugging method.

[0152] Furthermore, one embodiment of this application also provides a computer program product, the computer program product comprising: a computer program / computer executable instructions, the computer program / computer executable to perform the aforementioned front-end debugging method.

[0153] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0154] It is understood that the relevant features in the above methods and apparatus can be referenced interchangeably. Furthermore, the terms "first," "second," etc., in the above embodiments are used to distinguish between embodiments and do not represent the superiority or inferiority of any particular embodiment.

[0155] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0156] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this application is not directed to any particular programming language. It should be understood that the content of this application described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing preferred embodiments of this application.

[0157] In addition, the memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0158] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0159] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data cutover device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data cutover device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0160] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data cutover device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0161] These computer program instructions can also be loaded onto a computer or other programmable data cutover device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0162] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0163] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0164] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0165] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0166] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0167] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A front-end debugging method, characterized in that, The method, applied to a front-end debugging system that communicates with a hosting platform, wherein the hosting platform maintains pre-built artifacts corresponding to at least one dependency package, and the pre-built artifacts have corresponding security levels, includes: Identify the target dependency package in the dependency package of the micro-application included in the front-end to be debugged. The target dependency package has a corresponding target pre-built artifact in the hosting platform, and the security level of the target pre-built artifact is adapted to the micro-application corresponding to the target dependency package. The front-end includes micro-applications and performs target building processing to obtain micro-application building artifacts corresponding to the micro-applications. The target building processing is used to exclude target dependency packages from the micro-application building process so that the target dependency packages do not participate in the micro-application building process. Pull the target pre-built artifact corresponding to the target dependency package into the corresponding micro-application build artifact; The front-end is debugged based on the micro-application build artifacts.

2. The method according to claim 1, characterized in that, Identify the target dependency packages in the dependency packages of the micro-applications included in the front-end to be debugged, including: Obtain the target list of the hosting platform. The target list is used to record the product description information of the pre-built products. The product description information is used to indicate the dependency packages corresponding to the pre-built products and the micro-application runtime environment adapted to the pre-built products. For each dependency package of each micro-application included in the front end, the following steps are performed: If it is determined that there is first product description information in the target list that matches the current micro-application and the current dependency package, then the pre-built product corresponding to the first product description information is taken as a candidate pre-built product. It is then determined whether there is a target pre-built product among the candidate pre-built products whose security level is adapted to the current micro-application. If so, the current dependency package is determined to be the target dependency package. Wherein, the micro-application runtime environment indicated by the first product description information is adapted to the current micro-application, and the package name of the indicated dependency package is the same as the package name of the current dependency package.

3. The method according to claim 2, characterized in that, The method further includes: If it is determined that the first product description information does not exist in the target list, and the second product description information exists in the target list, then the pre-built product corresponding to the second product description information is taken as a candidate pre-built product. It is then determined whether there is a target pre-built product among the candidate pre-built products whose security level is adapted to the current micro-application. If so, the current dependency package is determined to be the target dependency package. Wherein, the micro-application runtime environment indicated by the second product description information is adapted to the current micro-application, and the package name of the indicated dependency package is different from the package name of the current dependency package, and the function of the indicated dependency package is the same as the function of the current dependency package.

4. The method according to claim 2 or 3, characterized in that, Determine whether there is a target pre-built artifact among the candidate pre-built artifacts whose security level is suitable for the current micro-application, including: Determine whether there is a first pre-built product among the candidate pre-built products with a security level no lower than that of the current micro-application; If it exists, then it is determined that a target pre-built product exists, and the target pre-built product is determined from the first pre-built product; If it does not exist, then it is determined that there is no target pre-built artifact.

5. The method according to claim 4, characterized in that, The method includes: determining whether the candidate pre-built products include a second pre-built product whose version number of the corresponding dependency package is not lower than that of the current dependency package; if so, removing other pre-built products except the second pre-built product from the candidate pre-built products, and performing the step of determining whether the candidate pre-built products include a first pre-built product with a security level not lower than that of the current micro-application; if not, issuing an inquiry to the current micro-application regarding whether to allow the use of the version downgrade dependency package; if a first permission instruction is received, performing the step of determining whether the candidate pre-built products include a first pre-built product with a security level not lower than that of the current micro-application. And / or, After determining that there is no first pre-built product with a security level not lower than the current micro-application's security level among the candidate pre-built products, and before determining that there is no target pre-built product, the method further includes: determining whether the candidate pre-built products only include a third pre-built product with a target security level, wherein the target security level is used to indicate that the pre-built product has a security risk; if so, then if it is determined that the dependency package corresponding to the third pre-built product is a whitelisted dependency package that is allowed to be used by the current micro-application, the method determines that there is a target pre-built product and identifies the target pre-built product from the third pre-built products; if not, then an inquiry is issued to the current micro-application regarding whether to allow the use of the security downgrade dependency package, and upon receiving a second permission instruction, the method determines that there is a target pre-built product and identifies the pre-built product with the highest security level among the pre-built products with a security level lower than the current micro-application's security level as the target pre-built product.

6. The method according to claim 1, characterized in that, Pulling the target pre-built artifact corresponding to the target dependency package into the corresponding micro-application build artifact, including: If the current debugging environment of the front end is a development environment, then the reference address of the target dependency package in the micro application build artifact is modified to the address of the target build artifact corresponding to the target dependency package in the hosting platform, so as to pull the target build artifact to the corresponding micro application build artifact through the modified address; or, If the current debugging environment of the front-end is a release environment, then the target pre-built artifacts required by multiple target micro-applications in the front-end are deduplicated to form a target pre-built artifact list corresponding to the front-end; based on the target pre-built artifacts in the target pre-built artifact list, they are copied from the hosting platform to the corresponding paths in the release directory of the front-end, so that target micro-applications using the same target pre-built artifacts can share the target pre-built artifacts in the same path; the reference address of the target dependency package in the micro-application build artifact is modified to the path of the target pre-built artifact corresponding to the target dependency package in the release directory, so as to pull the target build artifact to the corresponding micro-application build artifact through the path.

7. The method according to claim 1, characterized in that, Before pulling the target pre-built artifact corresponding to the target dependency package into the corresponding micro-application build artifact, the method further includes: If a fourth pre-built artifact exists in the target pre-built artifact, and the programming language of the fourth pre-built artifact is different from that of its corresponding micro-application, then the underlying business logic code of the dependency package corresponding to the fourth pre-built artifact in the hosting platform is determined, as well as the code including the functions, interfaces, and dependencies of the dependency package is determined; the underlying code is converted into code using the programming language of the micro-application; the code corresponding to the functions, interfaces, and dependencies is converted into code that conforms to the syntax and logic of the programming language used by the micro-application; the dependency package after code conversion is pre-built to convert the programming language of the fourth pre-built artifact to be the same as that of its corresponding micro-application; or, If a fourth pre-built product exists in the target pre-built product, and the programming language of the fourth pre-built product is different from that of its corresponding micro-application, then the fourth pre-built product is encapsulated as an independently running service, and a corresponding service interface is set up so that the micro-application can pull the fourth pre-built product through the service interface.

8. The method according to any one of claims 1-3 and 5-7, characterized in that, The method further includes: collecting dependency packages that can be used for front-end development as candidate dependency packages; if the candidate dependency package is found to have no security risks, or if the candidate dependency package is found to have security risks and the candidate dependency package is a dependency package that is allowed to be used according to the target whitelist, then the candidate dependency package is used as a dependency package to be built, the dependency package to be built is pre-built, and the pre-built product is sent to the hosting platform for maintenance. And / or, The method further includes: if a new security vulnerability detection strategy is acquired, then security vulnerability detection is performed on the dependency packages corresponding to the pre-built products in the hosting platform based on the new security vulnerability detection strategy; if an abnormal dependency package with a security vulnerability is detected, then the abnormal dependency package is patched, and the patched abnormal dependency package is used as a dependency package to be built. The dependency package to be built is pre-built, and the pre-built product obtained from the pre-built process is used to replace the original pre-built product of the abnormal dependency package in the hosting platform.

9. The method according to claim 8, characterized in that, The pre-build process for the dependency package to be built includes: selecting at least one pre-build environment for the dependency package to be built based on the operating system, programming language and hardware architecture applicable to the dependency package to be built; setting build parameters for the dependency package to be built in each pre-build environment; and performing pre-build processing on the dependency package to be built in the corresponding pre-build environment based on the build parameters to obtain the corresponding pre-build product of the dependency package to be built in each pre-build environment. And / or, Collecting dependency packages that can be used for front-end development as candidate dependency packages includes: if the front-end debugging is successful, collecting other dependency packages besides the target dependency package from the dependency packages required by the micro-applications included in the front-end as candidate dependency packages.

10. The method according to any one of claims 1-3 and 5-7, characterized in that, The method further includes setting a security level for the pre-built product based on at least one of the security risks of the dependency packages corresponding to the pre-built product themselves and the security risks of the pre-built process of the pre-built product.

11. A front-end debugging device, characterized in that, An apparatus for use in a front-end debugging system, wherein the front-end debugging system is communicatively connected to a hosting platform, the hosting platform is used to maintain pre-built artifacts corresponding to at least one dependency package, the pre-built artifacts having corresponding security levels, the apparatus comprising: The determination module is used to determine the target dependency package in the dependency package of the micro-application included in the front-end to be debugged. The target dependency package has a corresponding target pre-built artifact in the hosting platform, and the security level of the target pre-built artifact is adapted to the micro-application corresponding to the target dependency package. The processing module is used to perform target building processing on the micro-applications included in the front end to obtain the micro-application building product corresponding to the micro-application. The target building processing is used to exclude the target dependency package from the micro-application building so that the target dependency package does not participate in the micro-application building. The pull module is used to pull the target pre-built artifact corresponding to the target dependency package to the corresponding micro-application build artifact; The debugging module is used to debug the front end based on the micro-application build artifacts.

12. A computer-readable storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to execute the front-end debugging method according to any one of claims 1 to 10.

13. An electronic device, characterized in that, The electronic device includes: Memory, used to store programs; A processor, coupled to the memory, is used to run the program to perform the front-end debugging method according to any one of claims 1 to 10.

14. A computer program product, characterized in that, The computer program product includes: a computer program / computer executable instructions, wherein the computer program / computer executable is the front-end debugging method according to any one of claims 1 to 10.