Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Oct 29, 2024
1 parent 1627f00 commit 6d56d0b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 33 deletions.
26 changes: 0 additions & 26 deletions src/backend/common/envEngineInfoSchema.ts

This file was deleted.

8 changes: 5 additions & 3 deletions src/backend/electron/manager/engineInfoManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ import {
} from "@/type/preload";
import { AltPortInfos } from "@/store/type";
import { BaseConfigManager } from "@/backend/common/ConfigManager";
import { EnvEngineInfo } from "@/backend/common/envEngineInfoSchema";
import { UnreachableError } from "@/type/utility";
import { loadEnvEngineInfos } from "@/domain/defaultEngine/envEngineInfo";
import {
EnvEngineInfoType,
loadEnvEngineInfos,
} from "@/domain/defaultEngine/envEngineInfo";

/**
* デフォルトエンジンの情報を取得する
*/
function fetchDefaultEngineInfos(
envEngineInfos: EnvEngineInfo[],
envEngineInfos: EnvEngineInfoType[],
defaultEngineDir: string,
): EngineInfo[] {
// TODO: envから直接ではなく、envに書いたengine_manifest.jsonから情報を得るようにする
Expand Down
8 changes: 5 additions & 3 deletions src/domain/defaultEngine/envEngineInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ export const envEngineInfoSchema = z.object({
uuid: engineIdSchema,
host: z.string(),
name: z.string(),
executionEnabled: z.boolean(),
executionFilePath: z.string(),
executionEnabled: z.boolean(), // FIXME: typeがurlのときのみ必要
executionFilePath: z.string(), // FIXME: typeがpathのときは必須
executionArgs: z.array(z.string()),
path: z.string().optional(),
path: z.string().optional(), // FIXME: typeがpathで、アンインストール可能なときは必須
type: z.union([z.literal("path"), z.literal("downloadVvpp")]).default("path"),
latestUrl: z.string().optional(), // FIXME: typeがdownloadVvppのときは必須
});
export type EnvEngineInfoType = z.infer<typeof envEngineInfoSchema>;

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/domain/defaultEngine/defaultEngine.node.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import path from "path";
import fs from "fs";
import { fetchDefaultEngineInfos } from "@/domain/defaultEngine/latetDefaultEngine";
import { fetchDefaultEngineUpdateInfo } from "@/domain/defaultEngine/latetDefaultEngine";

const currentDir = "tests/unit/domain/defaultEngine";

Expand Down

0 comments on commit 6d56d0b

Please sign in to comment.