@@ -6,18 +6,17 @@ const execa = require('execa');
6
6
const Installer = require ( '../installer' ) ;
7
7
const { platform, unzip } = require ( '../common' ) ;
8
8
9
- function getFilename ( version ) {
9
+ function getFilename ( ) {
10
10
switch ( platform ) {
11
11
case 'darwin-x64' :
12
- return 'mac ' ;
13
- case 'linux-ia32 ' :
14
- return 'lin32 ' ;
12
+ return 'mac64 ' ;
13
+ case 'darwin-arm64 ' :
14
+ return 'mac64arm ' ;
15
15
case 'linux-x64' :
16
16
return 'lin64' ;
17
+ case 'linux-arm64' :
18
+ return 'lin64arm' ;
17
19
case 'win32-x64' :
18
- if ( parseInt ( version , 10 ) < 11 ) {
19
- return 'win' ;
20
- }
21
20
return 'win64' ;
22
21
default :
23
22
throw new Error ( `No XS builds available for ${ platform } ` ) ;
@@ -33,15 +32,14 @@ class XSInstaller extends Installer {
33
32
34
33
static async resolveVersion ( version ) {
35
34
if ( version === 'latest' ) {
36
- const body = await fetch ( 'https://api.github.com/repos/Moddable-OpenSource/moddable-xst /releases' )
35
+ const body = await fetch ( 'https://api.github.com/repos/Moddable-OpenSource/moddable/releases' )
37
36
. then ( ( r ) => r . json ( ) ) ;
38
- return body . find ( ( b ) => ! b . prerelease ) . tag_name . slice ( 1 ) ;
37
+ return body . find ( ( b ) => ! b . prerelease ) . tag_name ;
39
38
}
40
39
return version ;
41
40
}
42
-
43
41
getDownloadURL ( version ) {
44
- return `https://github.com/Moddable-OpenSource/moddable-xst /releases/download/v ${ version } /xst-${ getFilename ( version ) } .zip` ;
42
+ return `https://github.com/Moddable-OpenSource/moddable/releases/download/${ version } /xst-${ getFilename ( version ) } .zip` ;
45
43
}
46
44
47
45
extract ( ) {
@@ -72,9 +70,9 @@ XSInstaller.config = {
72
70
name : 'XS' ,
73
71
id : 'xs' ,
74
72
supported : [
75
- 'linux-ia32 ' , 'linux-x64' ,
73
+ 'linux-arm64 ' , 'linux-x64' ,
76
74
'win32-x64' ,
77
- 'darwin-x64' ,
75
+ 'darwin-arm64' , 'darwin- x64',
78
76
] ,
79
77
} ;
80
78
0 commit comments