@@ -66,7 +66,7 @@ export abstract class Module<
66
66
public parent : Module < Module < C , I > > | null ,
67
67
protected children : Record < ModuleIdentifier , C > ,
68
68
private identifier : ModuleIdentifier ,
69
- ) { }
69
+ ) { }
70
70
71
71
public getIdentifier ( ) : ModuleIdentifier {
72
72
return this . identifier ;
@@ -125,7 +125,6 @@ export abstract class Module<
125
125
126
126
public abstract newInstance ( version : Truthy < Version > , store : _Store ) : Promise < I > ;
127
127
128
-
129
128
public async init ( versions : _Module [ "v" ] ) {
130
129
await Promise . all (
131
130
Object . entries ( versions )
@@ -181,7 +180,12 @@ export class RemoteModule extends Module<RemoteModule, RemoteModuleInstance> {
181
180
}
182
181
183
182
export class LocalModule extends Module < RemoteModule , LocalModuleInstance > {
184
- constructor ( parent : RootModule , children : Record < ModuleIdentifier , RemoteModule > , identifier : ModuleIdentifier , public enabled : Version ) {
183
+ constructor (
184
+ parent : RootModule ,
185
+ children : Record < ModuleIdentifier , RemoteModule > ,
186
+ identifier : ModuleIdentifier ,
187
+ public enabled : Version ,
188
+ ) {
185
189
super ( parent , children , identifier ) ;
186
190
}
187
191
@@ -203,7 +207,8 @@ export class LocalModule extends Module<RemoteModule, LocalModuleInstance> {
203
207
204
208
public canEnable ( instance : LocalModuleInstance ) {
205
209
const enabledInstance = this . getEnabledInstance ( ) ;
206
- return ! instance . isEnabled ( ) && instance . isInstalled ( ) && ( ! enabledInstance || this . canDisable ( enabledInstance ) ) ;
210
+ return ! instance . isEnabled ( ) && instance . isInstalled ( ) &&
211
+ ( ! enabledInstance || this . canDisable ( enabledInstance ) ) ;
207
212
}
208
213
209
214
public enable ( instance : LocalModuleInstance ) {
@@ -248,7 +253,6 @@ export class LocalModule extends Module<RemoteModule, LocalModuleInstance> {
248
253
public getEnabledInstance ( ) : LocalModuleInstance | undefined {
249
254
return this . getEnabledVersion ( ) ? this . instances . get ( this . getEnabledVersion ( ) ! ) ! : undefined ;
250
255
}
251
-
252
256
}
253
257
254
258
export interface MixinLoader {
@@ -295,7 +299,7 @@ export abstract class ModuleInstance<M extends Module<any> = Module<any>> {
295
299
public metadata : Metadata | null ,
296
300
public artifacts : Array < string > ,
297
301
public checksum : string ,
298
- ) { }
302
+ ) { }
299
303
300
304
// ?
301
305
public updateMetadata ( metadata : Metadata ) {
@@ -702,7 +706,12 @@ export const INTERNAL_TRANSFORMER = createTransformer(INTERNAL_MIXIN_LOADER);
702
706
703
707
const vaults = [
704
708
await fetchJson < _Vault > ( "/modules/vault.json" ) ,
705
- await fetchJson < _Vault > ( "https://raw.githubusercontent.com/spicetify/pkgs/main/vault.json" )
709
+ await fetchJson < _Vault > ( "https://raw.githubusercontent.com/spicetify/modules/main/vault.json" ) ,
710
+ await fetchJson < _Vault > ( "https://raw.githubusercontent.com/spicetify/pkgs/main/vault.json" ) ,
706
711
] ;
707
712
const provider = vaults . reduce < _Vault [ "modules" ] > ( ( acc , vault ) => deepMerge ( acc , vault . modules ) , { } ) ;
708
- await Promise . all ( Object . keys ( provider ) . map ( async ( identifier ) => RootModule . INSTANCE . newChild ( identifier , provider [ identifier ] ) ) ) ;
713
+ await Promise . all (
714
+ Object . keys ( provider ) . map ( async ( identifier ) =>
715
+ RootModule . INSTANCE . newChild ( identifier , provider [ identifier ] )
716
+ ) ,
717
+ ) ;
0 commit comments