File tree Expand file tree Collapse file tree 2 files changed +1
-31
lines changed Expand file tree Collapse file tree 2 files changed +1
-31
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " nerdctl" ,
3- "version" : " 0.3.0 " ,
3+ "version" : " 0.3.1 " ,
44 "main" : " dist/index.js" ,
55 "types" : " dist/index.d.ts" ,
66 "description" : " Node wrapper for nerdctl" ,
Original file line number Diff line number Diff line change 1- import * as events from "@/constants/events" ;
2-
31import BaseBackend from "@/vms/base" ;
42import LimaBackend from "@/vms/lima" ;
53import WslBackend from "@/vms/wsl" ;
@@ -19,31 +17,3 @@ export function factory(path: string = process.cwd()): BaseBackend {
1917 throw new Error ( `OS "${ platform } " is not supported.` ) ;
2018 }
2119}
22-
23- if ( process . env . NODE_ENV === "development" ) {
24- async function test ( ) {
25- const IMAGE = "hello-world" ;
26-
27- const vm = factory ( ) ;
28- if ( ! ( await vm . checkVM ( ) ) ) {
29- await vm . initVM ( ) ;
30- }
31-
32- vm . on ( events . IMAGE_PULL_START , ( ) => { } ) ;
33- vm . on ( events . IMAGE_PULL_OUTPUT , ( data ) => {
34- console . log ( data ) ;
35- } ) ;
36- vm . on ( events . IMAGE_PULL_END , ( data ) => {
37- console . log ( data ) ;
38- } ) ;
39-
40- await vm . pullImage ( IMAGE ) ;
41-
42- const images = await vm . getImages ( ) ;
43- console . log ( images ) ;
44-
45- await vm . run ( IMAGE , { rm : true } ) ;
46- }
47-
48- test ( ) ;
49- }
You can’t perform that action at this time.
0 commit comments