Control method and device for automatic construction and deployment of front-end project, and storage medium
By generating a build and deployment class through initializing a list of task objects, creating instances by combining configuration files and feedback functions, creating a project tree according to a hierarchical structure, and triggering commands through node interaction, the problem of manual dependence and low efficiency in the front-end project build and deployment process is solved, achieving automated and visual management.
Patent Information
- Application Number
- CN202511489470.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2026-02-13
AI Technical Summary
The current front-end project build and deployment process relies on manual intervention throughout, lacking the automation capability for unified management of multiple projects, resulting in low overall process efficiency.
By defining functional functions to initialize a list of task objects, generating a build and deployment class, creating instances by combining configuration files and feedback functions, creating a project tree according to the hierarchical structure of the extended configuration file, integrating and generating a tree view class, packaging and processing, and triggering core functional commands through interaction with nodes in the target tree view, automated build and deployment is achieved.
It improves the standardization of front-end project building and deployment processes, the clarity of hierarchical management, the convenience of interactive operations, and the efficiency of function integration, and realizes automated and visual management of front-end project building and deployment.
Smart Images

Figure CN121523699A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of front-end development tools, and particularly relates to a control method, device and storage medium for automatic construction and deployment of a front-end project. BACKGROUND
[0002] In a modern front-end engineering process, uploading and deploying the product after packaging and construction of a front-end project to a server is a core link connecting source code development and product online, and the efficiency thereof directly affects the overall iteration progress of the project. Related technologies still rely on manual intervention throughout the process. In the process of project construction and deployment, the project directory needs to be manually positioned and a construction command needs to be input, and the deployment result needs to be manually checked. Meanwhile, this deployment method lacks the automatic capability of unified management of multiple projects, and ultimately leads to low efficiency of the overall process.
[0003] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0004] The main purpose of the present application is to provide a control method, device and storage medium for automatic construction and deployment of a front-end project, aiming to solve the technical problem of low efficiency of the overall process.
[0005] To achieve the above purpose, the present application provides a control method for automatic construction and deployment of a front-end project, which comprises the following steps: Initializing a task list containing corresponding task objects according to a defined function function, and generating a construction and deployment class; Creating a construction and deployment class instance corresponding to the construction and deployment class through the configuration file content, workspace path and defined feedback function of the construction and deployment class; Creating a complete project tree corresponding to each node according to the hierarchical structure of the extended configuration file and the node class corresponding to the construction and deployment class instance, and integrating to generate a tree view class; Packing the construction and deployment class, the construction and deployment class instance, and the target tree view obtained by extending the core configuration of the tree view class and the core function command, and generating an extended installation file; After installing the extended installation file, triggering the corresponding core function command through the node interaction of the target tree view to construct and deploy a target front-end project.
[0006] In an embodiment, the defined function functions are sorted to determine the execution logic, input parameters and output results of each function function, and a function function list corresponding to the function function is obtained. According to the function function list, a task object corresponding to the function function is created, the task name, the associated function function, the execution priority and the dependency condition in the task object are parsed, and the initialization of the task object is completed; The initialized task object is integrated into a task list according to the execution flow sequence, and each task management method is encapsulated based on the task list as the core to obtain the construction deployment class.
[0007] In an embodiment, the initialized task object is sorted according to the execution flow sequence, and a multi-project task is marked to obtain the task list; According to the task queue management logic, the task list is processed, and a task execution framework containing basic scheduling logic is output; Add a failure monitoring logic to the task execution framework, and integrate a transmission mechanism of protocol authentication, breakpoint resume and progress synchronization to generate the construction deployment class.
[0008] In an embodiment, the configuration file content, workspace path and defined feedback function of the construction deployment class are collected and verified, and the configuration file content, workspace path and feedback function that pass the verification are used as initialization parameters; The initialization parameters are transmitted into the construction logic of the construction deployment class, and the initialization parameters are associated with the basic information of the construction deployment class through attribute assignment and binding operation; Based on the bound initialization parameters of the construction deployment class, a corresponding construction deployment class instance is generated, and a basic initialization verification is triggered to obtain a verified construction deployment class instance.
[0009] In an embodiment, the hierarchical structure of the extended configuration file is parsed, and the node class corresponding to the construction deployment class instance is sorted to obtain a node hierarchical rule and a class mapping list; Based on the node hierarchical rule and the class mapping list, the overall project information associated with the root node and the construction deployment class instance attribute bound to the child node are extracted, and the instantiation parameter set of each node is sorted; According to the node hierarchical rule, the construction method of the root node class and the child node class is called in turn, and the association relationship with the parent node is bound through the instantiation parameter set and the construction method to generate a discrete node set containing the root node and each level of child node; According to the discrete node set and the node hierarchical rule, each node is assembled into a complete project tree to integrate and generate the tree view class.
[0010] In an embodiment, the interface compatibility of each component is verified, and the construction deployment class, the construction deployment class instance, the target tree view and the core function command are called to form a set of components to be packaged; Integrate the to-be-packaged component set and the component call relationship contained in the to-be-packaged component set according to the extended specification structure, and encapsulate an extension core module generated from the extension core module; Call an extension packaging tool, compile and compress the extension core module to generate an extension installation file conforming to a format requirement.
[0011] In an embodiment, the extension installation file is loaded, an extension running environment is initialized, the target tree view and the associated core function command are parsed and activated, and an activated state extension instance is output. According to the input of the activated state extension instance, a node interaction event of the target tree view is detected, and node associated information corresponding to the node interaction event is parsed, and the node interaction event and the associated project metadata are output. Based on the node interaction event and the associated project metadata, the corresponding core function command is matched and triggered, the packaging and building of the target front-end project and the server uploading are completed, and the building and deployment result is output.
[0012] In an embodiment, the interaction action and the target project information in the node interaction event and the associated project metadata are parsed, the corresponding core function command is matched and triggered through a mapping table, and the triggered command is output. According to the interaction action and the target project information, a special output terminal is created, a floating progress bar and a pop-up component are initialized, and a feedback component is generated; Based on the triggered command and the initialized feedback component, the progress bar of each stage is updated according to a preset weight, the task name, the state and the log with a timestamp are output on the terminal, and real-time state data is obtained; The execution state information in the real-time state data is extracted, the execution state information is compared according to a judgment rule, and the execution state information after judgment is integrated into a structured building and deployment result.
[0013] In addition, to achieve the above-mentioned purpose, the present application also proposes an automatic building and deployment device, which comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the control method of the front-end project automatic building and deployment as described above.
[0014] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the control method of the front-end project automatic building and deployment as described above.
[0015] The application provides a control method for front-end project automatic construction and deployment, which comprises the following steps: first, initializing a task list containing corresponding task objects according to a defined function function to generate a construction and deployment class; then, creating an instance of the construction and deployment class by using the configuration file content, workspace path and defined feedback function of the construction and deployment class; then, creating a complete project tree according to the hierarchical structure of the extended configuration file and the node class corresponding to the instance, and integrating to generate a tree view class; then, packaging the construction and deployment class and its instance, the target tree view obtained by processing the core configuration of the extended tree view class, and the core function command to generate an extended installation file; finally, after installing the extended installation file, the corresponding core function command is triggered through the node interaction of the target tree view to construct and deploy the target front-end project, so that the technical problems of scattered process, chaotic hierarchical management, non-intuitive interaction triggering and low function integration in the front-end project construction and deployment process are solved, the process specification, hierarchical management clarity, interactive operation convenience and function integration efficiency of the front-end project construction and deployment are improved, and the automation and visual management of the front-end project construction and deployment are realized.
[0016] In summary, the application first initializes the task object list based on the function function to generate the construction and deployment class, then creates an instance of the construction and deployment class in combination with the configuration, path and feedback function, then generates the tree view class according to the extended configuration level and node class, and after packaging into an extended installation file, the command is triggered through the node interaction of the target tree view to complete the deployment, thereby solving the technical problem of low overall process efficiency, improving the automation and operation convenience of the front-end project construction and deployment, and realizing the effects of process specification controllability, intuitive and efficient interaction. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings incorporated in and forming a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, those skilled in the art can obtain other drawings from these drawings without creative labor.
[0019] Figure 1 The flowchart of the first embodiment of the control method for front-end project automatic construction and deployment of the application; Figure 2 The development flowchart of the application; Figure 3 The flowchart of the third embodiment of the control method for front-end project automatic construction and deployment of the application; Figure 4 The extended configuration file calling flowchart of the application; Figure 5 Flowchart of the eighth embodiment of the control method for the front-end project automatic construction and deployment of the application; Figure 6 Structure diagram of the automatic construction and deployment device of the application.
[0020] The object implementation, functional features and advantages of the application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0021] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the application and do not limit the application.
[0022] The related art still relies on manual full-time intervention. In the project construction and deployment process, the project directory needs to be manually positioned and the construction command needs to be input, and the deployment result needs to be manually checked. At the same time, this deployment method lacks the automatic ability of unified management of multiple projects, which ultimately leads to low overall process efficiency.
[0023] The application provides a solution: first, according to the defined function function, initialize the task list containing the corresponding task object, generate the construction and deployment class, and then create the construction and deployment class instance corresponding to the construction and deployment class through the configuration file content of the construction and deployment class, the workspace path and the defined feedback function. Then, according to the hierarchical structure of the extended configuration file and the node class corresponding to the construction and deployment class instance, create a complete project tree corresponding to each node, integrate and generate a tree view class, then package the construction and deployment class, the construction and deployment class instance, and the target tree view and core function command obtained by extending the core configuration of the tree view class, generate an extended installation file, and finally install the extended installation file. Through the node interaction of the target tree view, the corresponding core function command is triggered to construct and deploy the target front-end project.
[0024] It should be noted that the execution subject of the present embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, an automatic construction and deployment device, etc. The following will take the automatic construction and deployment device as an example to describe the present embodiment and each of the following embodiments.
[0025] In order to better understand the technical solutions of the application, the following will be described in detail in combination with the drawings and specific embodiments of the specification.
[0026] The application embodiment provides a control method for front-end project automatic construction and deployment, referring to Figure 1 , Figure 1 Flowchart of the first embodiment of the control method for the front-end project automatic construction and deployment of the application.
[0027] The control method of the front-end project automatic construction and deployment in the embodiment comprises steps S10-S50. In step S10, a task list containing task objects is initialized according to a defined function function, and a construction and deployment class is generated.
[0028] In the embodiment, the defined function function refers to a function unit preset for implementing a specific operation. Initialization refers to the process of assigning initial attributes to an object. The task object refers to an entity associated with the function function and containing execution information. The task list refers to a collection of task objects arranged according to rules. The construction and deployment class refers to an abstract structure encapsulating construction and deployment related logic and data.
[0029] As an optional implementation, each defined function function is parsed one by one, and the execution logic, input parameter range and output result format of each function are extracted, and a corresponding task object is created for each function function. The associated function function identifier, preset execution order and basic attributes are recorded in the task object, and all task objects are arranged in the order of the extracted execution logic association relationship to form a task list. Then, the task list is integrated with the basic control logic of task addition, deletion and query to generate the construction and deployment class. This method is suitable for scenarios where the logical dependence between function functions is close, and can ensure the coherence and accuracy of execution.
[0030] As another optional implementation, the defined function functions are first grouped according to operation types, and the execution priority of each function function is determined within each group. A task object containing the group, priority value and associated function information is created for each function function. After sorting the task objects in the same group according to the priority, all task objects are integrated in the order of the group to form a task list, and then the task list is integrated with the logic of group control and priority adjustment to generate the construction and deployment class. This method is suitable for scenarios where the function functions are clearly divided by operation types, and improves the convenience and pertinence of task management.
[0031] In step S20, a construction and deployment class instance corresponding to the construction and deployment class is created through the configuration file content of the construction and deployment class, the workspace path and the defined feedback function.
[0032] In the embodiment, the configuration file content refers to file information containing parameter settings required for construction and deployment. The workspace path refers to the location path of the storage project file. The feedback function refers to a function preset for returning the operation state. The construction and deployment class instance refers to a specific entity created based on the construction and deployment class, containing specific data and state required for actual operation.
[0033] As an optional implementation, the configuration file content associated with the build deployment class is read, the parameter items therein are parsed line by line, it is verified whether each parameter meets the preset format requirement of the build deployment class, the valid parameters are screened out and temporarily stored. Then the workspace path is located, it is checked whether the path exists and whether it has read-write permission, and after it is confirmed that there is no error, the path information is associated with the parsed valid parameters. Then the defined feedback function is called, the parameter verification result and the path checking result are taken as inputs, and the state identifier returned by the feedback function is obtained. Finally, the valid parameters, the workspace path, the feedback function and the state identifier are integrated, substituted into the instantiation template of the build deployment class, the build deployment class instance is generated, and the initial state of the instance is saved. The instance generated by this method has strong stability, is suitable for the scene where the parameters are fixed and fixed, and can reduce configuration conflicts in running.
[0034] As another optional implementation, the workspace path is taken as a starting point, the file structure under the path is scanned, and the configuration parameter types that may be needed under the path are automatically identified. Then, according to the identified parameter types, the corresponding parameter values are extracted from the configuration file content, and the unidentified parameter items are not loaded temporarily. Then, according to the extracted parameter values, the matching feedback function is dynamically selected, and the parameter values and the workspace path are bound to the selected feedback function as parameters. Finally, based on the extracted parameters, the bound feedback function and the workspace path, an instance is created through the dynamic instantiation interface of the build deployment class, a parameter supplement interface is reserved in the instance, and the unidentified parameters can be supplemented subsequently. The instance generated by this method has strong adaptability, is suitable for the scene where the file structure under the workspace path is variable and the parameters need to be dynamically adjusted, and can quickly respond to the structure change under the path.
[0035] In step S30, according to the hierarchical structure of the extended configuration file and the node class corresponding to the build deployment class instance, a complete project tree corresponding to each node is created, and a tree view class is generated.
[0036] In this embodiment, each node refers to an entity unit created based on the node class and carrying specific module information of the project. The complete project tree refers to a tree structure formed by organizing all nodes in a hierarchical relationship and reflecting the overall structure of the project. The tree view class refers to an abstract structure encapsulating the display logic of the project tree and supporting node interaction.
[0037] As an optional implementation, a hierarchy of the extension configuration file is read, a parent node identifier, a child node belonging relationship and a hierarchy priority in the extension configuration file are parsed, and a hierarchy mapping table is formed. Then, a node class corresponding to the build and deployment class instance is called, and according to the hierarchy position and attribute requirement of each node in the hierarchy mapping table, an entity node corresponding to each hierarchy node is created, and the function identifier of the build and deployment class instance is associated in the entity node. Then, all entity nodes are associated in turn from top to bottom according to the parsed hierarchy relationship, and a complete project tree is constructed, and whether the hierarchy belonging of each node is consistent with the mapping table is verified, and the node with a belonging error is corrected. Finally, the complete project tree and the node display rule are integrated, and a tree view class containing project tree data and display logic is generated. The hierarchy logic of the tree view class generated by the method is rigorous, and is suitable for the scene that the hierarchy of the extension configuration file is fixed and the node association relationship is complex.
[0038] As another optional implementation, a node class corresponding to the build and deployment class instance is obtained, and all basic entity nodes that need to be contained in the project tree are created in batches, and a temporary identifier is given to each basic node. Then, the hierarchy structure of the extension configuration file is read, the hierarchy division rule is extracted, and the hierarchy rule is converted into a node sorting condition. Then, according to the sorting condition, the basic entity nodes are classified and sorted in hierarchy, the parent node and the child node of each node are determined, the temporary identifier is deleted and the formal hierarchy identifier is given, and a complete project tree is formed. Finally, based on the complete project tree, the node expansion or folding logic, the node selection trigger logic and the node display style configuration are added, and a tree view class supporting dynamic adjustment of hierarchy display is generated. The tree view class generated by the method has strong adaptability, and is suitable for the scene that the hierarchy rule of the extension configuration file is variable and the number of nodes is large.
[0039] In step S40, the build and deployment class, the build and deployment class instance, and the target tree view obtained by extending the tree view class core configuration and the core function command are packaged to generate an extension installation file.
[0040] In the embodiment, the tree view class core configuration refers to the core setting in the tree view class that determines the display rule and the interaction logic. The target tree view refers to the specific tree view entity obtained by extending the tree view class core configuration. The core function command refers to a command set for implementing key operations such as building and deployment. The extension installation file refers to a packaged file integrating all necessary components and being available for installation extension.
[0041] As an optional implementation, integrity checks are performed on the build deployment class, build deployment class instance, target tree view, and core function command, respectively, to check whether each component contains necessary attributes and to filter out complete components. Then, the storage directories are divided according to the component types, the build deployment class and the instance thereof are placed in the core logic directory, the target tree view is placed in the view component directory, and the core function command is placed in the command set directory. Component dependency lists are generated under each directory. Next, compression processing is performed on each directory, and the directory structure is retained and a compression package check code is generated. Then, an installation guide script is written, and the decompression order of each compression package, the component registration path, and the initialization trigger condition are defined. Finally, all compression packages, dependency lists, and installation guide scripts are integrated, and extension identification information and a version number are added to generate an extension installation file. The installation file generated by this method has stable structure and is suitable for scenarios in which the number of components is large, the dependency relationship is simple, and some components of a certain type need to be frequently updated individually.
[0042] As another optional implementation, the association relationships among the build deployment class, build deployment class instance, target tree view, and core function command are analyzed first to generate a component association graph. Based on the association graph, components having direct dependencies are combined into association units. Redundant information is removed from each association unit, and core association logic is retained. Then, all association units are sorted according to execution priorities, and dynamic loading trigger points are embedded. Finally, the sorted association units, dynamic loading rules, and extension metadata are integrated, and are directly packaged into a single file format to generate an extension installation file. The installation file generated by this method has strong flexibility and is suitable for scenarios in which the dependency relationship of components is complex and installation efficiency is pursued.
[0043] In step S50, after the extension installation file is installed, the corresponding core function command is triggered through node interaction of the target tree view to build and deploy the target front-end project.
[0044] In this embodiment, node interaction refers to an operation on a node in the target tree view. The core function command refers to a command set that implements key operations such as project building and deployment. Building and deployment refer to a process of packaging a front-end project and deploying the product to a target environment. The target front-end project refers to a front-end project entity that needs to perform a building and deployment operation.
[0045] As an optional implementation, the installation process of the extended installation file is performed, and after completion, the target tree view is automatically loaded, so that each node in the tree view clearly shows the project hierarchy. When initiating an interaction on a node in the target tree view, the operation type of the interaction and the target front-end project information associated with the node are first identified. According to the identification result, the corresponding core function command is matched, and if the interaction is a build and deployment, the project build command is first called to package the target front-end project and generate a build product that meets the deployment requirements. After the build is completed, the deployment command is called to upload the build product to the preset target server. The status of each link is fed back in real time during the process, and after the deployment is completed, the final result of the target front-end project build and deployment is output. This method is suitable for building and deploying a single target front-end project, can ensure the accuracy of each link, and avoid interference caused by multiple projects in parallel.
[0046] As another optional implementation, after the installation of the extended installation file is completed and the target tree view is loaded, batch interactions on multiple nodes in the tree view are supported. The target front-end projects associated with the batch-selected nodes are identified, and the configuration information of each project is integrated. The corresponding batch core function command is matched, and the build commands of each project are called in parallel to package multiple target front-end projects. The build progress of each project is monitored in real time, and after all projects are built, the deployment command is called in parallel to deploy the build products of each project to the corresponding target environment. During the process, the build and deployment status of each project is fed back separately, and after all projects are processed, the build and deployment results of all target front-end projects are summarized and output. This method is suitable for scenarios that require simultaneous processing of multiple target front-end projects, can significantly improve the efficiency of batch build and deployment, and reduce repetitive operations.
[0047] Exemplarily, with reference to Figure 2 , Figure 2To develop the flowchart of the present application, first, according to the functions such as "project packaging", "remote uploading", etc., initialize the task list containing the corresponding task objects, and generate the build deployment class. Through the configuration file content, workspace path and defined feedback function of the build deployment class, create the package deployment instance corresponding to the uploadEntry method (upload entry method). According to the hierarchical structure of the extended configuration file and the node class corresponding to the instance, create the complete project tree of each node, and integrate the generated tree view class. Instantiate the tree view class to obtain a tree view provider instance, and register it as a vscode visual extension. At the same time, register the uploadEntry method, tree view reconstruction command, and edit configuration file command on the extension, and encapsulate the standard entry function activate of the vscode extension. Finally, package the target tree view and core function commands obtained by processing the build deployment class, its instance, and the core configuration of the extension tree view class, and generate an extension installation file in VSIX format. After installing the file, trigger the corresponding core function command through the node interaction of the target tree view to build and deploy the front-end project.
[0048] Due to the mapping of standardized function functions and task objects, the instantiation of configuration and path association, hierarchical project tree construction and node interaction triggering process, the problems of scattered front-end build and deployment process, conflicting configuration and inefficient operation are solved. The efficiency of front-end project build and deployment is improved, and the cost of manual intervention is reduced.
[0049] Based on any of the above embodiments, in Embodiment Two of the present application, the step S10 includes steps A11-A13: Step A11, sort out the defined function functions, determine the execution logic, input parameters and output results of each function function, and obtain the function function list corresponding to the function function.
[0050] In this embodiment, the defined function function refers to the function unit previously set for implementing the build and deployment related operations. The execution logic refers to the step sequence and judgment rule when the function function completes a specific operation. The input parameter refers to the initial data required to be received before the function function is executed. The output result refers to the data returned after the function function is executed. The function function list refers to a structured list recording the execution logic, input parameter and output result of each function function.
[0051] As an optional implementation, all defined function functions are screened and grouped according to operation types. For each function function in each group, the design document or code implementation is reviewed one by one, the step sequence during execution is extracted, the data items and data format requirements that must be passed in during execution are marked, and the result content and format returned after execution are determined. The extracted information is checked for consistency to ensure that the input parameter format and output result format of the function under the same operation type are uniform, and the information of parameter name conflict or result description ambiguity is corrected. Finally, the execution logic, input parameters and output results of each function function are sorted into entries to generate a function function list. This method is suitable for scenarios where the function function type is clearly divided and subsequent calls are mostly independent, and can quickly locate the target function.
[0052] As another optional implementation, all defined function functions are listed first, the execution dependencies of each function are identified by analyzing the calling relationship between functions, and a function dependency graph is formed. Starting from the starting function without pre-dependence in the dependency graph, each function is analyzed in turn: first, determine the result content to be output by the current function according to the requirements of the subsequent dependent function, then determine the input parameters and parameter sources required for execution according to the output result, and then sort out the specific step sequence for achieving the output. Cross-verify the information of each function with the subsequent functions that depend on it, and supplement the missing parameter description or execution logic details. Finally, arrange the functions in the order of dependency, record the execution logic, input parameters, output results and associated dependent function information of each function, and generate a function function list. This method is suitable for scenarios where function functions need to be combined and executed according to a fixed process, and can ensure the smoothness of process execution and reduce execution errors caused by unknown dependencies.
[0053] Step A12, creating a task object corresponding to the function function according to the function function list, parsing the task name, associated function function, execution priority and dependency condition in the task object, and completing the initialization of the task object.
[0054] In this embodiment, the task object refers to an entity associated with the function function and carrying information related to task execution. The task name refers to the name used to identify the task object. The execution priority refers to the level that determines the execution order of the task. The dependency condition refers to the prerequisite task or condition that needs to be met before the task is executed. The initialization of the task object refers to the process of assigning the task object with initial attributes such as task name, associated function function, execution priority, and dependency condition.
[0055] As an optional implementation, a corresponding empty task object is created for each function in the function list. The core operation description of the function is extracted from the list as the task name, and the function itself is associated with the association function attribute of the task object. According to the importance of the function in the construction and deployment process, the execution priority of the task object is set. It is found from the list whether the function needs the output of other functions as input, and if so, the name of the corresponding function is recorded as a dependent condition. The four attributes of each task object are checked one by one to ensure that there is no null value or format error, and the initialization of the task object is completed. This method is direct, processed one by one in the order of the list, suitable for scenarios with less dependence between functions, and fast initialization.
[0056] Step A13, integrating the initialized task objects into a task list according to the execution flow order, taking the task list as the core, encapsulating each task management method, and obtaining the construction and deployment class.
[0057] In this embodiment, the execution flow order refers to the order of task execution according to the preset logic. The task management method refers to the operation logic for managing task execution.
[0058] As an optional implementation, all initialized task objects are extracted first, the execution priority and dependent condition of each task object are parsed, the execution flow order is determined according to the rule of no dependent task priority and same priority according to the length of the dependent chain, and the task objects are sequentially put into an empty list to form a task list. Then, taking the task list as the core, the associated function of the task object is triggered in turn by encapsulating the basic management method according to the list order, the pause method records the current execution position and terminates the subsequent task, the cancel method clears the list execution state and resets the dependent condition, and the query method returns the execution progress of each task. Finally, the task list and the encapsulated management method are integrated, the basic attributes of the construction and deployment class are defined, and the construction and deployment class is obtained. This method directly reflects the overall execution flow, the management method is simple and intuitive, and the execution does not require an additional parsing stage, so the efficiency is high.
[0059] Exemplarily, in the scenario of building a deployment front-end project, the defined functions such as "code compression", "resource packaging", "deployment verification", "remote transmission" and the like are combed to determine the execution logic of each function, for example, the steps of code compression are reading a file, compression processing, outputting a compressed file, inputting parameters (such as code compression needs to pass in the source file path, compression level), and outputting results (such as the compressed file path, compression success rate), and a list of function functions is obtained. According to the list, a corresponding task object is created for each function function, the task name is parsed, for example, "compression task", "packaging task", the associated function function (code compression function, resource packaging function, etc.), the execution priority (resource packaging is higher than deployment verification), and the dependency condition (deployment verification depends on the completion of resource packaging), and the initialization of the task object is completed; the initialized task object is integrated into a task list according to the execution process sequence of code compression, resource packaging, deployment verification, and remote transmission, and the task list is taken as the core to encapsulate task management methods such as starting, pausing, and retrying, and a build deployment class is obtained.
[0060] Further, a build deployment class is created, which is responsible for the entire deployment process: the following 9 function functions are defined in the class: checkConfig: check whether the configuration file content is correct and complete; execBuild: new subprocess to execute the build command, and support to cancel the process; buildZip: compress the build product; connectSSH: use node-ssh to connect to the server; removeRemoteFile: backup remote files, support rollback fault tolerance mechanism; uploadLocalFile: upload compressed files to the server, support breakpoint resume; unzipRemoteFile: decompress files on the server; removeLocalFile: delete local compressed package; disconnectSSH: disconnect server connection. A constructor function is created, which needs to pass in the configuration file content, workspace path, and feedback function three parameters. Initialize the task list taskLis, including 9 task objects of checking configuration, executing build, compression, connecting SSH, backing up remote files, uploading, decompressing, disconnecting server SSH, and deleting local compressed package, which correspond to the above 9 function functions respectively. Each task object includes function function, task name, and progress bar value three attributes. Use vscode.window.withProgress to display the progress bar floating window in the vscode workspace. Each task in taskList is executed in turn, and the task corresponding name, numerical progress information is updated to the progress bar floating window, and the display content is automatically refreshed. Support to interrupt the task list execution and restore backup by clicking the cancel button on the progress bar. Listen to the feedback information such as alarm, error and the like in the task execution process, and output the feedback log through the terminal. Call the feedback function after the task execution result is successful or failed.
[0061] By standardizing the function function combing, task object attribute analysis and list management and control, the problems of function function association confusion, task execution sequence disorder and cumbersome operation control in front-end construction deployment are solved, and the time cost and resource waste of construction deployment are reduced.
[0062] Based on any of the above embodiments, in Embodiment Three of the present application, refer to Figure 3 , Figure 3 is a flowchart of the third embodiment of the control method for the front-end project automatic construction and deployment of the present application. The step A13 includes steps B11-B13: Step B11, according to the execution sequence, the initialized task object is sorted and marked as a multi-project task, and the task list is obtained.
[0063] In this embodiment, the initialized task object refers to the task entity that has been assigned with initial attributes such as task name, associated function function, execution priority, and dependency condition. The multi-project task refers to the task object that can perform operations on multiple front-end projects at the same time.
[0064] As an optional implementation, all initialized task objects are extracted, and the dependency conditions of each task object are analyzed one by one to filter out tasks without pre-dependencies as starting tasks. Then, according to the execution priority from high to low, the tasks in the same dependency level are sorted to form a basic execution sequence. Then check whether the function function associated with each task object supports multi-project operation, if it supports, mark it as a multi-project task, and add a multi-project identifier and the number of projects that can be handled in the task attribute. Finally, the marked tasks are integrated according to the order of the basic execution sequence, the repeated task objects are deleted, the execution connection between tasks is supplemented, and the task list is obtained. This method first determines the execution sequence according to the dependency and priority, and then marks the multi-project task. The matching degree of the task sequence and the construction and deployment logic is high, which can avoid the sequence deviation caused by classification.
[0065] Step B12, according to the task queue management logic, the task list is scheduled and processed, and the task execution framework containing the basic scheduling logic is output.
[0066] In this embodiment, the task queue management logic refers to a set of rules for controlling the execution sequence, dependency relationship and resource allocation of tasks. The scheduling process refers to the process of starting, sorting and monitoring the tasks in the task list according to the task queue management logic. The basic scheduling logic refers to the most core scheduling rule in the task execution framework. The task execution framework refers to a structured carrier that encapsulates the scheduling logic and is used to uniformly organize and execute the tasks in the task list.
[0067] As an optional implementation, the serial scheduling rule in the parsing task queue management logic is analyzed, the task list is traversed, the dependency condition of each task is extracted, and the unique identifier of the precedent task is bound for the task with dependency. An execution queue is constructed according to the original order of the task list, and a start trigger mechanism of the queue is set: only when the current task returns an execution success state, the start process of the next task is activated. The basic scheduling logic is encapsulated, including task start verification, execution state recording, and failure processing. The execution queue and the basic scheduling logic are integrated, the input interface and the output interface of the framework are defined, and the task execution framework is formed. This method strictly follows the task dependency relationship, has no resource competition risk, and has high continuity and correctness of task execution.
[0068] In step B13, the failure monitoring logic is added to the task execution framework, and the transmission mechanism of protocol authentication, breakpoint resume, and progress synchronization is integrated, to generate the build deployment class.
[0069] In this embodiment, the failure monitoring logic refers to a rule set for detecting errors in task execution in real time and triggering retry, alarm and other processing actions. The protocol authentication refers to a mechanism for verifying the identity and data integrity of both parties in data transmission through a preset protocol (such as HTTPS). The breakpoint resume refers to a transmission mechanism that does not need to restart after the task is interrupted, and continues to execute from the interrupted position. The progress synchronization refers to a mechanism for synchronizing the task progress to the specified receiving end in real time. The transmission mechanism refers to a rule and process set that ensures effective transmission of data between modules and systems.
[0070] As an optional implementation, the failure monitoring logic is first added to the task execution framework, and the state detection point is set at each task execution node to collect return codes and logs in real time. If an abnormal return code or error log keyword is detected, automatic retry is triggered, and if the retry fails, the log is recorded and an alarm is given. Then the transmission mechanism is integrated: the protocol authentication initiates identity verification before transmission to generate a temporary token attached to the data. The breakpoint resume records the position of each transmission completion, and reads the position for resume after interruption. The progress synchronization collects progress data at fixed intervals, and synchronizes to the specified interface after formatting. Finally, the framework with failure monitoring and the transmission mechanism are encapsulated as a whole, the core attributes and call interfaces of the build deployment class are defined, and the build deployment class is generated. This method prioritizes error handling in task execution, and does not need to adjust the monitoring logic when integrating the transmission mechanism, with clear process.
[0071] Exemplarily, in the scenario of constructing a deployment front-end project, the initialized task object, such as "project resource compression", "single project packaging", "multi-project batch verification", "remote transmission", and the like, is sorted according to the execution flow order (resource compression, single project packaging, multi-project batch verification, remote transmission), and "multi-project batch verification" and "remote transmission" are marked as multi-project tasks (3 or more projects can be processed at the same time), to obtain a task list. The task list is scheduled according to the task queue management logic (single project packaging tasks without dependency are scheduled in parallel, and verification tasks dependent on packaging results are scheduled in series), and a task execution framework containing parallel / serial basic scheduling logic is output. Failure monitoring logic (real-time detection of task return status, 3 times of automatic retry triggered by packaging failure) is added in the framework, and a transmission mechanism (verification of server and client identity before transmission, recording of file segment position when transmission is interrupted and continuation of transmission from the interrupted position, synchronization of transmission progress to the status panel every 10 seconds) is integrated, to generate a build deployment class.
[0072] Due to the standardized task sorting and marking, structured scheduling framework, and enhanced transmission mechanism, the problems of chaotic task order, low scheduling efficiency, full re-run after failure, easy interruption of transmission, and non-transparent progress in front-end build and deployment are solved, and the efficiency of the overall process is improved.
[0073] Based on any of the above embodiments, in the fourth embodiment of the present application, the step S20 includes steps C11-C13: Step C11, collect and verify the configuration file content, workspace path, and defined feedback function of the build deployment class, and take the verified configuration file content, workspace path, and feedback function as initialization parameters.
[0074] In this embodiment, the configuration file content refers to file information containing parameter settings required for build deployment. The workspace path refers to the location path of the storage project file. The initialization parameter refers to the verified basic data transmitted when creating an instance.
[0075] As an optional implementation, the file is read from the specified path and the parameters are extracted to obtain the configuration file content of the build deployment class, the function corresponding to the associated identifier is found from the function library to obtain the workspace path obtained from the system environment variable or the preset position. The configuration file content is subjected to format checking and necessary parameter checking to confirm whether the deployment address, timeout time and other mandatory items are included. The workspace path is subjected to existence checking to check whether the directory pointed by the path exists and the permission checking to confirm whether the read-write permission is possessed. The feedback function is subjected to interface checking to check whether the standard interface for receiving the state code and returning the description information is included. The configuration file content, the workspace path and the feedback function passing all the checking are arranged in the form of key-value pair as the initialization parameters. This method is independently checked in steps, the problems of each part can be directly located, the checking logic is simple and is suitable for the scenes with weak information correlation.
[0076] Step C12, the initialization parameters are transmitted into the construction logic of the build deployment class to complete the association of the initialization parameters and the basic information of the build deployment class through the attribute assignment and binding operation.
[0077] In this embodiment, the construction logic of the build deployment class refers to the core processing logic built in the build deployment class for receiving the parameters and completing the basic information configuration of the instance. The attribute assignment refers to the operation of assigning the specific data in the initialization parameters to the corresponding attribute of the build deployment class. The basic information of the build deployment class refers to the basic data required by the build deployment class to support the core function, including the configuration information, the path information, the feedback mechanism information and the like.
[0078] As an optional implementation, the construction logic of the build deployment class is started to parse the parameter receiving sequence preset by the logic. The initialization parameters are sequentially transmitted into the construction logic according to the sequence, the parameters in the configuration file content are sequentially assigned to the configuration attributes of the build deployment class, and the workspace path string is assigned to the path attribute. Then, the binding operation is performed to bind the feedback function and the state feedback attribute of the build deployment class, so that the build deployment class can automatically call the feedback function to return the state when the task is executed. Finally, after confirming that there is no null value or binding failure, the association of the initialization parameters and the basic information of the build deployment class is completed. This method can guarantee the stability of the association process and reduce the association failure caused by the disorder of the parameter sequence.
[0079] Step C13, the build deployment class instance corresponding to the initialization parameters bound by the build deployment class is generated, and the basic initialization checking is triggered to obtain the build deployment class instance passing the checking.
[0080] In this embodiment, the basic initialization checking refers to the checking process of the validity of the initialization parameters in the instance, the compatibility between the parameters and the availability of the basic function of the instance after the instance is generated.
[0081] As an optional implementation, the bound initialization parameters, including configuration file content, workspace path, and feedback function, are extracted from the build deployment class. The instantiation interface of the build deployment class is then called, passing the extracted parameters to trigger the instance generation process and generate an initial build deployment class instance. Next, basic initialization checks are initiated: first, the integrity of the configuration file content in the instance is checked; then, the accessibility of the workspace path is checked; and finally, the callability of the feedback function is checked. If all checks pass, the current instance is retained. If any check fails, the instance is terminated, and the reason for failure is returned. After the parameters are corrected, the instance generation and check process is re-executed until a successfully checked build deployment class instance is obtained. This method completely separates the instance generation and check steps, with independent and clear check logic. When a check fails, the specific parameter problem can be directly located, resulting in high troubleshooting efficiency.
[0082] For example, in a scenario of building and deploying a frontend project, the configuration file content of the build and deployment class (including the deployment server address and packaged resource path), the workspace path (e.g., " / workspace / frontend-apps"), and the defined feedback function (receiving execution status codes and returning descriptive information) are collected. The configuration file content format is verified to conform to the JSON standard and include the required server port parameter. The workspace path is verified to exist and have read / write permissions. The feedback function is verified to receive the three types of status codes and return valid strings. The three verified values are used as initialization parameters. These initialization parameters are then passed to the construction logic of the build and deployment class. By assigning property values, the server address from the configuration file content is assigned to the class's "deployAddr" property, and the workspace path is assigned to the "workspace" property. Through binding operations, the feedback function is bound to the class's "statusReport" function, thus completing the association between the initialization parameters and the basic information of the build and deployment class. The instantiation method of the class is called based on the bound initialization parameters to generate a build deployment class instance, triggering basic initialization verification. This verifies whether "deployAddr" is pingable, whether there is a project entry file under "workspace", and whether "statusReport" returns the expected format. Once the verification is successful, a usable build deployment class instance is obtained.
[0083] Further, the uploadEntry method is created, which receives three parameters, including an extension context, a workspace path, and profile content, for instantiating a build and deployment class: a terminal is created in the vscode panel for continuously outputting build and deployment process information; a feedback function is defined to display corresponding information in the terminal according to the success or failure of the build and deployment instance execution result, and to determine whether to automatically close the terminal; a build and deployment instance is created based on the above build and deployment class, and the profile content, the workspace path, and the feedback function are input. Exceptions occurring during execution are captured, and error feedback logs and the like are output in the terminal.
[0084] Due to the standardized parameter acquisition and verification, structured attribute association, and instantiation verification, the problems of instance generation failure caused by configuration errors, invalid paths, and feedback mechanism failure in front-end build and deployment are solved, and the stability and efficiency of build and deployment are improved.
[0085] Based on any of the above embodiments, in the fifth embodiment of the present application, the step S30 includes steps D11-D14: Step D11, the hierarchical structure of the extension configuration file is parsed, and the node class corresponding to the build and deployment class instance is combed to obtain a node hierarchical rule and a class mapping list.
[0086] In this embodiment, the hierarchical structure refers to the hierarchical relationship of nodes in the extension configuration file according to the upper and lower level association. The node class refers to an abstract class that is bound to the build and deployment class instance and defines node attributes and behavior rules. The node hierarchical rule refers to a rule set that specifies the upper and lower level attribution, the quantity limit of containing, and the hierarchical naming specification of nodes. The class mapping list refers to a list recording the association relationship between each node in the node hierarchy and the corresponding node class.
[0087] As an optional implementation, the extension configuration file is read, the hierarchical structure is parsed according to the label nesting relationship in the file, the name, parent node identifier, allowed child node type, and maximum number of child nodes of each node are extracted to form a preliminary node hierarchical framework. Then, all associated node classes are extracted from the build and deployment class instance, and the function description, supported parent node type, and includable child node class of each node class are recorded. The node type in the node hierarchical framework is matched with the function description of the node class, the child node type incompatible with the function of the node class in the framework is corrected, and the upper and lower level attribution rule between nodes is determined. Finally, the matched nodes and node classes are one-to-one corresponding, and the class mapping list is generated. This method parses the hierarchy from the configuration file, can strictly follow the original structure of the configuration file, and has high compatibility of node hierarchical rules and configuration.
[0088] Step D12, based on the node hierarchy rule and the class mapping list, extracting the overall project information associated with the root node and the build deployment class instance attribute bound to the child node, and sorting to obtain the instantiation parameter set of each node.
[0089] In this embodiment, the root node refers to the node in the project tree at the topmost layer, carrying the overall project core information. The overall project information refers to the data associated with the root node, describing the global attributes of the project. The child node refers to the node below the root node, carrying the local function information. The instantiation parameter set of the node refers to the parameter set used to create the node instance, containing the information and attributes required by the node.
[0090] As an optional implementation, according to the node hierarchy rule to determine the hierarchical positioning of the root node and the hierarchical distribution of the child node, find the node class corresponding to the root node from the class mapping list, determine the type of overall project information associated with the class, extract the corresponding data from the pre-set project information library. Then filter the node classes corresponding to each child node from the class mapping list, analyze the build deployment class instance attribute bound to each child node class, extract these attribute values from the attribute list of the build deployment class instance. According to the hierarchical order of the root node and the child node, sort the parameter group containing the corresponding information for each node, check whether each parameter group meets the parameter format requirements of the corresponding node class, and correct the format error to obtain the instantiation parameter set of each node. This method extracts parameters according to the hierarchical order, and the parameter boundary of the root node and the child node is clear, and the parameter set has high format matching degree with the node class.
[0091] Step D13, according to the node hierarchy rule, calling the construction method of the root node class and the child node class in turn, and binding the association relationship with the parent node through the instantiation parameter set and the construction method, generating a discrete node set containing the root node and each level of child node.
[0092] In this embodiment, the construction method binding the association relationship with the parent node refers to the operation of passing in the parent node identifier when calling the construction method of the child node class, so that the child node and the parent node establish the affiliation association. The discrete node set refers to the set of all root nodes and child nodes of each level, which have been created and have clear parent node association relationship, but have not been integrated into a tree structure according to the hierarchy.
[0093] As an optional implementation, the node level rule is parsed to determine the creation order of the nodes as root node, first-level child node, and second-level child node. The parameter set corresponding to the root node is extracted from the instantiation parameter set, the constructor method of the root node class is called, the parameter set is passed in to initialize the root node attribute, the root node is created and its unique identifier is recorded. Then the instantiation parameter set of all first-level child nodes is extracted according to the creation order, and the constructor method of the corresponding child node class is called one by one, and the unique identifier of the root node is passed in the constructor method to bind the parent-child relationship between the first-level child node and the root node through the built-in association logic of the constructor method, and the creation of all first-level child nodes is completed. In the same way, the instantiation parameter set of the second-level child node is extracted, and the unique identifier of the corresponding first-level child node is passed in when the constructor method of the child node class is called to bind the association relationship between the second-level child node and the first-level child node, and the second-level child node is created. After all the nodes of all levels are created, the root node and the child nodes of all levels are summarized to form a discrete node set. This method strictly creates nodes according to the hierarchical order and binds the parent nodes, and the association relationship of each node is completed synchronously during creation, without subsequent secondary processing, and the association error rate is low.
[0094] Step D14, according to the discrete node set and the node level rule, assembling each node into a complete project tree to integrate to generate the tree view class.
[0095] As an optional implementation, the root node is first screened from the discrete node set and taken as the starting node of the complete project tree. Then according to the hierarchical order of the root node, the first-level child node, and the second-level child node in the node level rule, the first-level child node of the root node is extracted from the discrete node set with the parent node identifier of the root node, sorted according to the name sorting requirement of the first-level child node in the rule, and added as the child node of the root node. Then for each first-level child node, the second-level child node of the first-level child node is extracted from the discrete node set with the parent node identifier of the first-level child node, sorted according to the grouping requirement of the second-level child node by function type in the rule, and added as the child node of the corresponding first-level child node. In this way, all levels of child nodes are processed layer by layer, and the number of nodes at each level is checked to see if it meets the upper limit of the rule. After all nodes are added according to the level to form a complete project tree, the project tree is integrated with the preset tree view function and encapsulated as a tree view class, which contains the hierarchical data of the project tree and the view interaction method. This method assembles in the forward order from root to child, conforms to the intuitive nature of hierarchical logic, and can instantly check the number limit when adding nodes at each level, with accurate error positioning.
[0096] Exemplarily, in the scenario of constructing a deployment front-end project, the hierarchical structure of the extended configuration file is parsed, the node classes (project root node class, deployment module node class, file node class) corresponding to the build and deployment class instances are sorted out, and the node hierarchical rule is obtained: the root node is unique, 1 root node can contain 3-8 deployment module child nodes, and 1 deployment module child node can contain multiple file child nodes and class mapping list: root node→project root node class, deployment module node→deployment module node class, file node→file node class. Based on the node hierarchical rule and the class mapping list, the overall project information (project ID, global deployment threshold) associated with the root node and the build and deployment class instance attribute (deployment module node binding workspace path, file node binding feedback function ID) bound to the child node are extracted, and the instantiation parameter set of the root node (containing project ID and deployment threshold), deployment module node (containing workspace path), and file node (containing feedback function ID) is sorted out. According to the node hierarchical rule, the construction methods of the project root node class (transmitting the root node parameter set), the deployment module node class (transmitting the module parameter set and the root node identification binding parent node), and the file node class (transmitting the file parameter set and the deployment module node identification binding parent node) are called in turn, and a discrete node set containing 1 root node, 5 deployment module child nodes, and 20 file child nodes is generated. According to the discrete node set and the node hierarchical rule, the file child nodes are attributed to the corresponding deployment module child nodes, and the deployment module child nodes are attributed to the root node, to assemble a complete project tree, integrate the right-click interaction function of the node, and generate a tree view class.
[0097] Further, the DepNodeProvider class is defined for tree view construction, and the Dependency class is defined, which contains 4 different node types: root node: displays all workspace nodes, including a refresh button, which can be clicked to call the createTree method. Workspace node: a workspace node corresponds to a project that can perform a build and deployment workflow, including an edit button, which can be clicked to edit the configuration content of the project in the configuration file. The workspace node can be clicked to expand and display the configuration item nodes under the project, as well as all child workspace nodes. Configuration item node: a configuration item node corresponds to a configuration object in the configuration file, displays the server name or address in the configuration object, and includes a build and deployment process trigger button, which can be clicked to trigger the uploadEntry method. Error node: an error node corresponds to a project that can perform a build and deployment workflow with incorrect configuration content, displays error information. Includes an edit button, which can be clicked to edit the corresponding configuration content of the project, and after editing correctly, it will be automatically updated to a workspace node.
[0098] The problems of unordered hierarchy, node and instance attribute binding error and low tree generation efficiency in the front-end project tree view construction are solved by standardizing hierarchy analysis, parameter extraction, node construction and tree assembly, the construction and deployment operation interruption caused by tree structure problems is reduced, and the stability of the front-end project visual management is ensured.
[0099] Based on any of the above embodiments, in the embodiment six of the application, the step S40 comprises steps E11-E13: Step E11, checking the interface compatibility of each component, and calling the build deployment class, the build deployment class instance, the target tree view and the core function command to form a set of components to be packaged.
[0100] In this embodiment, the interface compatibility refers to the matching characteristics of the parameter format, return value type and calling method of the interfaces between the build deployment class, the build deployment class instance, the target tree view and the core function command. The set of components to be packaged refers to the set of all components that pass the interface compatibility check and can be normally called, which are ready for packaging processing.
[0101] As an optional implementation, the interface definitions of the build deployment class, the build deployment class instance, the target tree view and the core function command are extracted, and the interface compatibility between components is checked one by one. It is verified whether the output parameters of the build deployment class instance are consistent with the input parameter format of the target tree view, whether the calling parameters of the core function command meet the interface requirements of the build deployment class, and whether the node interaction events of the target tree view can be correctly passed to the core function command. The incompatible problems found are corrected until all component interfaces are matched. After correction, each component is called in the order of the dependency of the build deployment class, the build deployment class instance, the target tree view and the core function command, and it is confirmed that each component can normally respond and return the expected result after being called. All components that are successfully called are summarized to form a set of components to be packaged. This method directly checks the actual interaction compatibility between components, can accurately locate the calling conflicts between components, and is suitable for scenarios with few components and complex dependency relationships.
[0102] Step E12, integrating the set of components to be packaged and the component calling relationship contained in the set of components to be packaged according to the extended specification structure, and encapsulating to generate an extended core module.
[0103] In this embodiment, the component calling relationship refers to the calling order and dependency association between components in the set of components to be packaged. The extended core module refers to the modular carrier carrying the extended core function formed after integrating the set of components to be packaged and the component calling relationship according to the extended specification structure.
[0104] As an optional implementation, the extended specification structure is parsed to determine the core code directory, the configuration file directory, and the location requirement of the component dependency declaration file. The components in the to-be-packaged component set are classified by component type, the build deployment class and its instance are placed in the subdirectory of the core logic, the target tree view is placed in the subdirectory of the view module, and the core function command is placed in the subdirectory of the command module. The component calling relationship is sorted out, a calling relationship diagram is drawn, and the calling path and dependent component identifier of each component are recorded in the dependency declaration file in a standard format. It is checked whether each component file meets the format requirement of the standard structure, and the format error is corrected. Finally, the classified component directory, the dependency declaration file, and the entry file required by the specification are integrated and encapsulated to generate the extended core module. This method classifies and integrates according to the component type, the module structure is clear, it is convenient to quickly locate each type of component during subsequent maintenance, and it is suitable for scenarios where the function boundary of the component is clear.
[0105] In step E13, the extended packaging tool is called to compile and compress the extended core module to generate an extended installation file that meets the format requirement.
[0106] In this embodiment, the extended packaging tool refers to a tool for compiling, compressing, and format converting the extended core module to finally generate an installable file. The compiling and compression processing refers to the operation of converting the source code of the extended core module into executable code and reducing the file size through compression algorithm.
[0107] As an optional implementation, the extended packaging tool is obtained, the compiling parameters of the tool are configured, including the source code directory pointing to the root directory of the extended core module, the target code format being set to the format supported by the extended running environment, the compiling function of the tool is called to perform syntax analysis and conversion on the source code in the extended core module to generate intermediate executable code. Then, the compression parameters of the tool are configured, the compression function of the tool is called to compress the intermediate executable code and the resource files in the extended core module to remove redundant comments and white spaces. After compression, the format verification function of the tool is called to check whether the compressed file meets the format requirement of the extended installation file. If there is a format deviation, it is automatically corrected and re-verified. After verification, the tool outputs an extended installation file that meets the format requirement. The extended installation file generated by this method has strong format compliance and low installation failure rate in different running environments, and is suitable for extension release that needs to strictly follow the format specification.
[0108] Exemplarily, with reference to Figure 4 , Figure 4The configuration file calling flowchart of the present application is expanded. In the scenario of building a deployment front-end project, the interface compatibility of the build deployment class, the build deployment class instance, the target tree view (corresponding to the tree view in the flowchart), and the core function command, such as the refresh tree view command and the package build deployment command, is verified. The node interaction of the target tree view is confirmed to trigger the core function command, and the core function command can call the build deployment class instance, forming a set of components to be packaged. According to the VS Code extension specification structure, the set of components to be packaged and the component calling relationship (target tree view → core function command → build deployment class instance) are integrated, and an extension core module containing view, command, and logic module is encapsulated. The VS Code extension packaging tool is called, the extension core module is compiled and compressed, and an extension installation file conforming to the VSIX format requirement is generated.
[0109] Due to the standardized component interface verification, the specification structure integration, and the professional packaging tool processing, the problems of component interaction conflict, module structure confusion, and installation file format inconsistency in the development of the front-end project extension are solved, the installation success rate of the extension installation file is improved, and the smoothness of the one-key execution of the package build deployment of the front-end project through the extension is ensured.
[0110] Based on any of the above embodiments, in the seventh embodiment of the present application, the step S50 includes steps F11-F13: Step F11, load the extension installation file, initialize the extension running environment, parse and activate the target tree view and the associated core function command, and output the activated state extension instance.
[0111] In the present embodiment, initializing the extension running environment refers to the operation of configuring the dependencies, permissions, and resource allocation required for extension running, so that it has the running conditions. Activating the target tree view refers to the process of making the target tree view have the ability to display and respond to operations. Activating the core function command refers to the process of making the core function command triggerable and executable. The activated state extension instance refers to the extension specific instance that has completed initialization, and the target tree view and the core function command can work normally.
[0112] As an optional implementation, the extension installation file is loaded through a specified interface first, the integrity of the file is verified, and after the verification is passed, the file is decompressed to a temporary directory of the extension running environment. The extension running environment is initialized: the required basic library is installed according to the dependency list recorded in the file, the environment permission is configured, and the exclusive memory space is allocated. The configuration file of the target tree view is extracted from the decompressed file, including the hierarchical structure and node style definition, and the rendering rule and interaction mapping of the tree view are obtained by parsing. The definition file of the associated core function command is synchronously extracted, and the calling parameter and execution path of the command are obtained by parsing. The tree structure is loaded according to the rendering rule, the interaction event is bound, the target tree view is activated, and the target tree view is made visible and operable in the interface. The trigger identifier of the command is registered, the core function command is activated, and the validity of the command execution path is verified. After confirming that the tree view can be normally displayed and the command can be triggered and executed, all activated components are integrated, and the activated state extension instance is output. The activated extension instance has strong function integrity, is suitable for scenes with high stability requirement and small extension scale, and can reduce the probability of function abnormality after activation.
[0113] In step F12, according to the input of the activated state extension instance, the node interaction event of the target tree view is detected, and the node associated information corresponding to the node interaction event is parsed, and the node interaction event and the associated project metadata are output.
[0114] In this embodiment, the activated state extension instance refers to the user operation instruction received by the activated extension instance. The node interaction event refers to the operation performed by the user on the node in the target tree view. The node associated information refers to the identification data related to the project bound to the node in the target tree view. The associated project metadata refers to the project basic information associated with the node.
[0115] As an optional implementation, a real-time monitoring mechanism is deployed in the activated state extension instance, the interaction type of all nodes of the target tree view is bound, and the event trigger threshold is set. When a node interaction meeting the threshold is monitored, the type and trigger position of the node interaction event are captured. The specific node is located through the trigger position, the node attribute interface is called to parse the associated information of the node. According to the project ID in the node associated information, the corresponding associated project metadata is extracted from the preset metadata storage area. The captured node interaction event and the extracted associated project metadata are integrated and output in a fixed format. This method has strong real-time performance, and the result can be output immediately after the node interaction, which is suitable for scenes with high response speed requirement.
[0116] In step F13, based on the node interaction event and the associated project metadata, the corresponding core function command is matched and triggered, the packaging and building of the target front-end project and the server uploading are completed, and the building and deployment result is output.
[0117] In the present embodiment, the packaging build refers to the process of processing the front-end project code, resources, etc. into deployable products. The server upload refers to the operation of transmitting the build products to the target server.
[0118] As an optional implementation, a matching rule library of node interaction events, associated project metadata and core function commands is established. When receiving the node interaction events and the associated project metadata, the corresponding core function commands are determined by one-by-one matching according to the rule library. The core function commands are triggered, and the project path in the associated project metadata is loaded first when the core function commands are executed, and then the packaging build is performed. Then the server address in the metadata is obtained, and the server upload is performed. The state and key information are recorded in real time during the command execution process, and these information are integrated after the execution is completed, and the build deployment result is output. The method is precise in command triggering, and the execution process is simple, and is suitable for scenes with few project types and stable rules.
[0119] Exemplarily, in the scenario of building and deploying the front-end project, the DepNodeProvider class is instantiated to create a tree view provider instance. The tree view provider instance is registered as a tree view using the vscode.window.registerTreeDataProvider method, so that the corresponding tree view icon is displayed in the sidebar of VS Code. Three commands are registered on the extension using the vscode.commands.registerCommand method, one is the refresh command: the createTree method is called to refresh the tree view content; the second is the build and deploy command: the uploadEntry method is called by inputting the workspace path and configuration content, so that the front-end project under the path is packaged and built and uploaded to the specified server directory; the third is the edit project configuration command: used to edit the specific content of the configuration file. The registered commands are added to the extension context to ensure that the tree view refresh command is automatically executed when the extension is activated. The above contents are encapsulated into the standard entry function activate of the VS Code extension, which will be called and executed when the extension is activated. The project is packaged to generate a VSIX file, which can be published to the vscode Marketplace or directly installed and used locally.
[0120] Due to the automatic extension activation, node interaction analysis and command triggering, the problems of scattered operation, complicated process and high manual error rate in the packaging, building and deploying of the front-end project are solved, the deployment efficiency of the front-end project is improved, the deployment failure caused by operation mistakes is reduced, and the efficient automation of the packaging, building and deploying of the front-end project is realized.
[0121] Based on any of the above embodiments, in the eighth embodiment of the present application, refer to Figure 5 , Figure 5The eighth embodiment of the control method for automatically building and deploying the front-end project of the application is shown in the flowchart. The step F13 includes steps G11-G14: In step G11, the interaction action and the target project information in the node interaction event and the associated project metadata are parsed, the corresponding core function command is triggered by matching the mapping table, and the triggered command is output.
[0122] In this embodiment, the target project information refers to the project core identifier extracted from the associated project metadata. The mapping table refers to a comparison table that records the association between the interaction action, the target project information combination, and the corresponding core function command.
[0123] As an optional implementation, the interaction action is parsed from the node interaction event, and the operation type is identified. The target project information is extracted from the associated project metadata, including the project type and the project identifier. A preset mapping table is called, which takes the interaction action and the project type as the key and associates the corresponding core function command. The parsed interaction action and the target project information are combined, and an exact match is performed in the mapping table to find the unique corresponding core function command. The availability of the command is verified, and the command is triggered after confirmation of effectiveness, and the triggered command is output. The precision of command matching is high, which can quickly respond to operations in simple scenarios and reduce matching delay.
[0124] In step G12, according to the interaction action and the target project information, a dedicated output terminal is created, a floating progress bar and a pop-up component are initialized, and a feedback component is generated.
[0125] In this embodiment, the dedicated output terminal refers to an independent terminal specially used to display the operation log of the corresponding target project. The floating progress bar refers to a visual component that is suspended in the interface and displays the operation progress of the target project in real time. The pop-up component refers to an interactive component used to pop up key prompts for the operation of the target project. The feedback component refers to a combined component that integrates the dedicated output terminal, the floating progress bar, and the pop-up component, and is used to synchronously feedback the operation status of the target project.
[0126] As an optional implementation, the priority of the interaction action is parsed, the dedicated output terminal is created first, the project identifier in the target project information is bound, the terminal title is set to the project identifier, the log output format is configured, and the components are created in priority order. Then the floating progress bar is created, the initial state of the progress bar is set according to the interaction action type, and the project identifier is associated to ensure that the progress matches the project. Finally, the pop-up component is created, the initial prompt content corresponding to the interaction action is preset, and the project type in the target project information is bound to adapt the pop-up style. After completing the creation of all components, the linkage relationship between the components is initialized synchronously, and the feedback component is integrated and generated. This method synchronously creates components according to the priority of the interaction action, the components are initialized quickly, and the linkage relationship is preset clearly.
[0127] Step G13, based on the triggered command and the initialized feedback component, update the progress bar of each stage according to the preset weight, and output the timestamped task name, status and log on the terminal to obtain real-time status data.
[0128] In this embodiment, the preset weight refers to the proportion of each stage in the overall progress. The progress bar refers to the visual component in the feedback component that displays the execution progress. The real-time status data refers to a collection of data that is updated in real time and reflects the command execution progress and details.
[0129] As an optional implementation, the execution stage division of the triggered command is first parsed, and the preset weight of each stage is obtained from the preset configuration. The initialized feedback component is called, and the initial value of the progress bar is set to zero. The terminal is set to real-time output mode. When the command execution reaches the first stage, the progress increment of each step in this stage is calculated according to the weight, and the progress bar is updated every time a step is completed. At the same time, the terminal outputs the task name, status and log with the current timestamp. After the completion of the first stage, the progress bar accumulates to the second percentage, and the second stage continues to be executed, the increment is calculated according to the weight and updated, and the terminal outputs the corresponding information synchronously. During the execution of all stages, the progress bar and the terminal content are updated in real time for each operation, and the progress data of each stage is finally summarized and output to the terminal to obtain real-time status data. This method strictly updates according to the preset weight, the progress display is stable and predictable, the terminal real-time output is convenient for immediate troubleshooting, and is suitable for scenes with fixed execution process and small stage time fluctuation.
[0130] Step G14, extract the execution status information from the real-time status data, compare the execution status information according to the judgment rule, and integrate the judged execution status information into the structured construction and deployment result.
[0131] In this embodiment, the execution status information refers to the information extracted from the real-time status data that describes the execution of the command. The judgment rule refers to the preset standard for evaluating whether the execution status information meets the expectation.
[0132] As an optional implementation, the execution status information of each execution stage is extracted from the real-time status data. The preset phased judgment rule is called. The execution status information of each stage is compared with the corresponding rule one by one to judge whether each stage meets the expectation. Collect the judgment results of all stages, integrate according to the overall state, stage state list and abnormal stage details structure, the overall state is determined according to the stage judgment result, the stage state list is arranged according to the execution order, the abnormal stage details contains the error type and trigger point, finally generate the structured construction and deployment result. This method judges by stages, can accurately locate the specific stage and reason of abnormal occurrence, is suitable for scenes with multiple independent stages in execution process.
[0133] As another optional implementation, all execution status information in the real-time status data is first aggregated to extract core indicators. A preset overall judgment rule is called to compare the core indicators with the overall rule to determine the overall execution status. According to the structure of the overall status, the core indicator data, and the brief conclusion, the overall status is explicitly successful, failed, or warned, the core indicator data lists the progress, the number of errors, and the time consumption, and the brief conclusion explains the reason for the overall result to generate a structured construction and deployment result. This method is based on the overall judgment of the core indicators, the rule is simple, the integrated result is efficient, and is suitable for the scene where the execution process phases are closely related and do not need to be individually traced back to each phase.
[0134] Exemplarily, the visualized extended rules include tree view structure and interaction rules, node types: root node: display all workspaces, provide refresh function. Workspace node: represents a buildable deployment project, supports expanding to display its configuration items and sub-projects. Configuration item node: corresponds to a server configuration, displays server name / address, provides "build deployment" button. Error node: displays configuration error information, provides "edit configuration" button. Display rules: automatically identify build configuration files such as package.json, vite.config.js, webpack.config.js. Dynamically generate tree view according to project structure, support nested sub-projects. Interaction rules: click "refresh" button: rescan workspace and update tree view. Click "build deployment" button: trigger the build and deployment process of the corresponding project. Click "edit" button: open JSON editor to modify configuration, support syntax highlighting and verification. Internal mechanisms (algorithms, parameter settings and error handling) include project scanning and identification algorithm, framework identification algorithm: check if dependencies or devDependencies contain keywords such as vue, react, @angular / core. Check if there are framework-specific configuration files such as vite.config.js, vue.config.js, next.config.js. Module standard detection: parse the type field (module or commonjs) in package.json. Check if there are import / export or require / module.exports syntax. Configuration file generation rules: if no configuration file is detected, automatically generate deploy.config.js with tree-shaped JSON structure. Support multi-level project structure, each node contains nodeName, hostconfig, childNode, etc. Task scheduling and execution mechanism includes task queue management: use asynchronous queue to execute in sequence: check configuration, execute build, compress, connect SSH, backup, upload, decompress, clean up. Support parallel execution of multiple project build tasks, each project in independent process. Error handling and rollback: automatically abort subsequent tasks when each task step fails. Support remote backup recovery (snapshot mechanism implemented by removeRemoteFile). Automatically clean up local temporary files when exceptions occur. SSH connection and file transfer: use node-ssh library, support password and key authentication. Breakpoint resume mechanism: record the transferred file block, continue from the breakpoint when restarting abnormally. Real-time calculation and feedback of transmission progress to VS Code progress bar. Information feedback mechanism includes progress bar implementation: use vscode.window.withProgress to display floating progress bar.Each task stage is assigned a fixed progress weight (e.g., build accounts for 30%, upload accounts for 40%, etc.). Supports user clicks on the cancel button to trigger task interruption and rollback. Terminal output specification: use vscode.window.createTerminal to create a dedicated output terminal. Output content includes: timestamp, task name, status (correct / error), detailed log (such as build output, SSH connection log). Error information is highlighted, and suggestions for solutions are provided. Pop-up prompt: use vscode.window.showInformationMessage to prompt success / failure. Use vscode.window.showErrorMessage to display error details, and support clicking to view logs.
[0135] Due to the precise command matching, customized feedback and structured result integration, the problems of command triggering errors, scattered state feedback and difficult result analysis in front-end project building and deployment are solved. The deployment interruption rate caused by operation and feedback problems is reduced.
[0136] The application provides an automatic building and deployment device, which comprises at least one processor and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the control method for front-end project automatic building and deployment in the above-mentioned embodiment one.
[0137] Reference will now be made to the following description Figure 6 , which shows a structural schematic diagram of an automatic building and deployment device suitable for being used to implement the embodiments of the application. The automatic building and deployment device in the embodiments of the application can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, edge computer devices, personal digital assistants (PDA, Personal Digital Assistant), tablet computers (PAD, Portable Application Description), portable multimedia players (PMP, Portable MediaPlayer), distributed storage devices, etc., and fixed terminals such as mobile storage devices, desktop computers, etc. Figure 6 The automatic building and deployment device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the application.
[0138] As Figure 6As shown, the automated build and deployment device can include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. Various programs and data required for the operation of the automated build and deployment device are also stored in the random access memory 1004. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the automated build and deployment device to communicate with other devices wirelessly or by wire to exchange data. Although the automated build and deployment device with various systems is shown in the figure, it should be understood that all of the systems shown are not required to be implemented or possessed. More or fewer systems can be alternatively implemented or possessed.
[0139] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
[0140] The automated build and deployment device provided by the present disclosure adopts the control method for front-end project automated build and deployment in the above-mentioned embodiments, and can solve the technical problem of low overall process efficiency. Compared with the prior art, the automated build and deployment device provided by the present disclosure has the same beneficial effects as the control method for front-end project automated build and deployment provided by the above-mentioned embodiments, and other technical features in the automated build and deployment device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0141] It should be understood that various aspects of the disclosure can be implemented in hardware, software, firmware, or a combination thereof. In the description of the embodiments above, specific features, structures, materials or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0142] The above description is merely illustrative of the application and is not intended to limit the scope of the application. Any variations and modifications that can be made by any person skilled in the art within the spirit and scope of the application are intended to be encompassed by the application. The scope of the application is defined by the appended claims.
[0143] The application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e., computer programs) for performing the control method of the front-end project automatic build and deployment in the above embodiments.
[0144] The computer readable storage medium provided by the application may, for example, be a U disk, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more conductive wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted in any suitable medium, including but not limited to electrical wire, optical cable, radio frequency (RF), and the like, or any suitable combination of the above.
[0145] The above computer readable storage medium can be contained in the automatic build and deployment device; or can exist separately and not be assembled into the automatic build and deployment device.
[0146] The computer readable storage medium carries one or more programs, when the one or more programs are executed by the automated build deployment device, the automated build deployment device is caused to: initialize a task list containing corresponding task objects according to a defined function function, generate a build deployment class; create a build deployment class instance corresponding to the build deployment class through a configuration file content, a workspace path and a defined feedback function of the build deployment class; create a complete project tree corresponding to each node according to a hierarchical structure of an extension configuration file and a node class corresponding to the build deployment class instance, integrate a generated tree view class; package the build deployment class, the build deployment class instance, and a target tree view, a core function command obtained by extending a core configuration of the tree view class, and generate an extension installation file; after installing the extension installation file, trigger a corresponding core function command through a node interaction of the target tree view to build and deploy a target front-end project.
[0147] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0148] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0149] The modules involved in the embodiments of the present application can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the module itself.
[0150] The computer readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer program) for executing the control method of the front-end project automatic construction and deployment, and can solve the technical problem of low overall process efficiency. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the control method of the front-end project automatic construction and deployment provided by the above-mentioned embodiments, and will not be described here.
[0151] The above only describes some embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the present application specification and drawings, or direct / indirect application in other related technical fields is included in the patent protection scope of the present application.
Claims
1. A control method of front-end project automatic construction deployment, characterized in that, The method comprises: According to the defined function function, initialize the task list containing the corresponding task object, generate the build deployment class; Through the configuration file content, workspace path and defined feedback function of the build deployment class, create the build deployment class corresponding to the build deployment class instance; According to the hierarchical structure of the extension configuration file and the node class corresponding to the build deployment class instance, create the complete project tree corresponding to each node, integrate and generate the tree view class; Packaging the build deployment class, the build deployment class instance, and the target tree view obtained by extending the core configuration of the tree view class, and the core function command, to generate an extension installation file; After installing the extension installation file, trigger the corresponding core function command through the node interaction of the target tree view to build and deploy the target front-end project.
2. The control method of front-end project automated build deployment according to claim 1, wherein, The step of initializing the task list containing the corresponding task object according to the defined function function, and generating the build deployment class, comprises: Sort the initialized task objects according to the execution process sequence, and mark the multi-project tasks to obtain the task list; According to the task queue management logic, process the task list, and output a task execution framework containing basic scheduling logic; Add a failure monitoring logic to the task execution framework, integrate a transmission mechanism for protocol authentication, breakpoint resume, and progress synchronization, and generate the build deployment class.
3. The control method of front-end project automated build deployment according to claim 2, wherein, The step of creating the build deployment class corresponding to the build deployment class instance through the configuration file content, workspace path and defined feedback function of the build deployment class, comprises: Collect and verify the configuration file content, workspace path and defined feedback function of the build deployment class, and use the verified configuration file content, workspace path and feedback function as initialization parameters; Pass the initialization parameters into the construction logic of the build deployment class, and complete the association between the initialization parameters and the basic information of the build deployment class through attribute assignment and binding operation; Generate the corresponding build deployment class instance based on the bound initialization parameters of the build deployment class, and trigger the basic initialization verification to obtain the verified build deployment class instance.
4. The control method of front-end project automation build deployment according to claim 1, wherein, The step of creating the complete project tree corresponding to each node according to the hierarchical structure of the extension configuration file and the node class corresponding to the build deployment class instance, and integrating and generating the tree view class, comprises: 5. The control method of front-end project automation build deployment according to claim 1, wherein, Analyzing the hierarchy of the extended configuration file, and combing the node class corresponding to the build deployment class instance, obtaining the node hierarchy rule and class mapping list; Based on the node hierarchy rule and the class mapping list, the overall project information associated with the root node and the build deployment class instance attribute bound to the child node are extracted, and the instantiation parameter set of each node is obtained by sorting; According to the node hierarchy rule, the construction method of the root node class and the child node class is called in turn, and the association relationship with the parent node is bound through the instantiation parameter set and the construction method, and a discrete node set containing the root node and the child node at each level is generated; According to the discrete node set and the node hierarchy rule, the nodes are assembled into a complete project tree, and the tree view class is integrated to generate.
6. The control method of front-end project automation build deployment according to claim 1, wherein, The steps of the packaging process of the build deployment class, the build deployment class instance, and the target tree view, core function command obtained by extending the tree view class core configuration to generate the extension installation file include: Check the interface compatibility of each component, and call the build deployment class, the build deployment class instance, the target tree view and the core function command to form a set of components to be packaged; According to the extended specification structure, integrate the set of components to be packaged, and the component call relationship contained in the set of components to be packaged, and encapsulate to generate an extension core module; Call the extension packaging tool, compile and compress the extension core module to generate an extension installation file that meets the format requirements.
7. The control method of front-end project automation build deployment according to claim 1, wherein, After installing the extension installation file, the steps of building and deploying the target front-end project by triggering the corresponding core function command through the node interaction of the target tree view include: Load the extension installation file, initialize the extension running environment, parse and activate the target tree view and the associated core function command, and output the activated state extension instance; According to the input of the activated state extension instance, detect the node interaction event of the target tree view, and parse the node association information corresponding to the node interaction event, and output the node interaction event and the associated project metadata; Based on the node interaction event and the associated project metadata, match and trigger the corresponding core function command to complete the packaging and building of the target front-end project and the server upload, and output the building and deployment result.
8. The control method of front-end project automation build deployment according to claim 7, wherein, The steps of the steps based on the node interaction event and the associated project metadata, matching and triggering the corresponding core function command to complete the packaging and building of the target front-end project and the server upload, and output the building and deployment result include: Parse the interaction action and target project information in the node interaction event and the associated project metadata, match and trigger the corresponding core function command through the mapping table, and output the triggered command; According to the interaction action and the target project information, create a special output terminal, initialize a floating progress bar and a popup component, and generate a feedback component; Based on the triggered command and the initialized feedback component, update the progress bar of each stage according to the preset weight, and output the task name, status and log with timestamp on the terminal to obtain real-time state data; Extracting execution state information in the real-time state data, comparing the execution state information according to a judgment rule, and integrating the judged execution state information into the structured construction deployment result.
9. An automated build deployment device, characterized by, The automatic construction deployment device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the control method for front-end project automatic construction deployment according to any one of claims 1 to 8.
10. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program. When the computer program is executed by the processor, the steps of the control method for front-end project automatic construction deployment according to any one of claims 1 to 8 are implemented.