mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 23:11:52 +08:00
refactor: rename
1. 将枚举 Server 改为字符串常量,使得 memshell 和 probeshell 都能共用 2. 移除 memshell 模块直接内置在 generator 中 3. 通用类从 memshell 移动至 javaweb 下,命名修改,增加辨识度
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import type {ProbeConfig, ProbeContentConfig} from "@/types/probe";
|
||||
import type {ProbeFormSchema, ShellFormSchema} from "@/types/schema.ts";
|
||||
import type {InjectorConfig, ShellConfig, ShellToolConfig} from "@/types/shell.ts";
|
||||
import type {InjectorConfig, ShellConfig, ShellToolConfig} from "@/types/memshell";
|
||||
import type {ProbeConfig, ProbeContentConfig} from "@/types/probeshell";
|
||||
import type {MemShellFormSchema, ProbeShellFormSchema} from "@/types/schema.ts";
|
||||
|
||||
export function transformToPostData(formValue: ShellFormSchema) {
|
||||
export function transformToPostData(formValue: MemShellFormSchema) {
|
||||
const shellConfig: ShellConfig = {
|
||||
server: formValue.server,
|
||||
serverVersion: formValue.serverVersion,
|
||||
@@ -39,7 +39,7 @@ export function transformToPostData(formValue: ShellFormSchema) {
|
||||
};
|
||||
}
|
||||
|
||||
export function transformToProbePostData(formValue: ProbeFormSchema) {
|
||||
export function transformToProbePostData(formValue: ProbeShellFormSchema) {
|
||||
const probeConfig: ProbeConfig = {
|
||||
probeMethod: formValue.probeMethod,
|
||||
probeContent: formValue.probeContent,
|
||||
@@ -69,7 +69,7 @@ export function transformToProbePostData(formValue: ProbeFormSchema) {
|
||||
* @param values The form values
|
||||
* @returns A URL string with query parameters
|
||||
*/
|
||||
export function generateShareableUrl(values: ShellFormSchema): string {
|
||||
export function generateShareableUrl(values: MemShellFormSchema): string {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
// Helper function to add parameters only if they have non-default values
|
||||
|
||||
Reference in New Issue
Block a user