Skip to content

Commit

Permalink
AltPortInfosの定義場所を移動する
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Sep 7, 2024
1 parent 11c5aa8 commit 9ce7568
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/backend/electron/manager/engineManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import {
} from "./portManager";

import {
AltPortInfos,
EngineInfo,
EngineDirValidationResult,
MinimumEngineManifestType,
EngineId,
minimumEngineManifestSchema,
envEngineInfoSchema,
} from "@/type/preload";
import { AltPortInfos } from "@/store/type";
import { BaseConfigManager } from "@/backend/common/ConfigManager";

type EngineProcessContainer = {
Expand Down
4 changes: 1 addition & 3 deletions src/store/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import {
NoteId,
CommandId,
TrackId,
AltPortInfos,
} from "@/type/preload";
import { IEngineConnectorFactory } from "@/infrastructures/EngineConnector";
import {
Expand Down Expand Up @@ -104,9 +105,6 @@ export type Command = {

export type EngineState = "STARTING" | "FAILED_STARTING" | "ERROR" | "READY";

// ポートが塞がれていたときの代替ポート情報
export type AltPortInfos = Record<EngineId, { from: number; to: number }>;

export type SaveResult =
| "SUCCESS"
| "WRITE_ERROR"
Expand Down
2 changes: 1 addition & 1 deletion src/type/ipc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
EngineSettingType,
EngineId,
MessageBoxReturnValue,
AltPortInfos,
} from "@/type/preload";
import { AltPortInfos } from "@/store/type";
import { Result } from "@/type/result";

/**
Expand Down
4 changes: 3 additions & 1 deletion src/type/preload.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { z } from "zod";
import { IpcSOData } from "./ipc";
import { AltPortInfos } from "@/store/type";
import { Result } from "@/type/result";

export const isProduction = import.meta.env.MODE === "production";
Expand Down Expand Up @@ -209,6 +208,9 @@ export const defaultToolbarButtonSetting: ToolbarSettingType = [
"REDO",
];

// ポートが塞がれていたときの代替ポート情報
export type AltPortInfos = Record<EngineId, { from: number; to: number }>;

export interface Sandbox {
getAppInfos(): Promise<AppInfos>;
getHowToUseText(): Promise<string>;
Expand Down

0 comments on commit 9ce7568

Please sign in to comment.