@@ -2,6 +2,7 @@ import * as childProcess from "@/utils/childProcess";
22import * as events from "@/constants/events" ;
33
44import ChildProcess , { spawn } from "child_process" ;
5+ import { ChildResultType , VMImage } from "@/types" ;
56import { ImageResult , RemoveImageCommandFlags } from "@/types/images" ;
67import { LIMA_REPO , LIMA_VERSION } from "@/constants/lima" ;
78import { LimaConfiguration , LimaListResult } from "@/types/lima" ;
@@ -14,7 +15,6 @@ import { getVMArch, isM1, platform } from "@/utils";
1415
1516import { APP_NAME } from "@/constants/app" ;
1617import BaseBackend from "./base" ;
17- import { ChildResultType } from "@/types" ;
1818import { download } from "@/utils/download" ;
1919import fs from "fs" ;
2020import merge from "lodash/merge" ;
@@ -109,11 +109,11 @@ export default class LimaBackend extends BaseBackend {
109109 if ( ! ! ( await this . status ) ) {
110110 await this . lima ( "start" , this . instance ) ;
111111 } else {
112- await this . downloadLima ( ) ;
112+ await this . downloadVM ( ) ;
113113
114114 const config : LimaConfiguration = merge ( {
115115 arch : null ,
116- images : await this . downloadLimaImages ( ) ,
116+ images : await this . downloadVMImages ( ) ,
117117 cpus : 2 ,
118118 memory : 2 * 1024 * 1024 * 1024 ,
119119 mounts : [
@@ -163,7 +163,7 @@ export default class LimaBackend extends BaseBackend {
163163 return true ;
164164 }
165165
166- async downloadLima ( ) : Promise < boolean > {
166+ async downloadVM ( ) : Promise < boolean > {
167167 const platformName = platform === "darwin" ? "macos" : "linux" ;
168168 const archName = isM1 ? "-aarch64" : "" ;
169169
@@ -195,7 +195,7 @@ export default class LimaBackend extends BaseBackend {
195195 } ) ;
196196 }
197197
198- async downloadLimaImages ( ) : Promise < { location : string ; arch : string } [ ] > {
198+ async downloadVMImages ( ) : Promise < VMImage [ ] > {
199199 const arch = getVMArch ( ) ;
200200 const archName = arch === "x86_64" ? "amd64" : "arm64" ;
201201
0 commit comments