@@ -3,7 +3,7 @@ import { promises as fs } from 'fs';
33import { Games } from '@/ps/games' ;
44import { reloadCommands } from '@/ps/loaders/commands' ;
55import { LivePS } from '@/sentinel/live' ;
6- import { cachebuster } from '@/utils/cachebuster ' ;
6+ import { cachebust } from '@/utils/cachebust ' ;
77import { fsPath } from '@/utils/fsPath' ;
88
99import type { GamesList , Meta } from '@/ps/games/common' ;
@@ -23,7 +23,7 @@ export const PS_REGISTERS: Register[] = [
2323 label : 'commands' ,
2424 pattern : / \/ p s \/ c o m m a n d s \/ / ,
2525 reload : async filepaths => {
26- filepaths . forEach ( cachebuster ) ;
26+ filepaths . forEach ( cachebust ) ;
2727 return reloadCommands ( ) ;
2828 } ,
2929 } ,
@@ -32,15 +32,15 @@ export const PS_REGISTERS: Register[] = [
3232 label : 'games' ,
3333 pattern : / \/ p s \/ g a m e s \/ / ,
3434 reload : async ( ) => {
35- [ 'common' , 'game' , 'index' , 'render' ] . forEach ( file => cachebuster ( `@/ps/games/${ file } ` ) ) ;
35+ [ 'common' , 'game' , 'index' , 'render' ] . forEach ( file => cachebust ( `@/ps/games/${ file } ` ) ) ;
3636 const games = await fs . readdir ( fsPath ( 'ps' , 'games' ) , { withFileTypes : true } ) ;
3737 await Promise . all (
3838 games
3939 . filter ( game => game . isDirectory ( ) )
4040 . map ( async game => {
4141 const gameDir = game . name as GamesList ;
4242 const files = await fs . readdir ( fsPath ( 'ps' , 'games' , gameDir ) ) ;
43- files . forEach ( file => cachebuster ( fsPath ( 'ps' , 'games' , gameDir , file ) ) ) ;
43+ files . forEach ( file => cachebust ( fsPath ( 'ps' , 'games' , gameDir , file ) ) ) ;
4444
4545 const gameImport = await import ( `@/ps/games/${ gameDir } ` ) ;
4646 const { meta } : { meta : Meta } = gameImport ;
@@ -51,7 +51,7 @@ export const PS_REGISTERS: Register[] = [
5151 ) ;
5252
5353 const gameCommands = await fs . readdir ( fsPath ( 'ps' , 'commands' , 'games' ) ) ;
54- gameCommands . forEach ( commandFile => cachebuster ( fsPath ( 'ps' , 'commands' , 'games' , commandFile ) ) ) ;
54+ gameCommands . forEach ( commandFile => cachebust ( fsPath ( 'ps' , 'commands' , 'games' , commandFile ) ) ) ;
5555 await reloadCommands ( ) ;
5656 } ,
5757 } ,
@@ -63,17 +63,17 @@ export const PS_REGISTERS: Register[] = [
6363 await Promise . all (
6464 ( < const > [ 'parse' , 'permissions' , 'spoof' ] ) . map ( async file => {
6565 const importPath = `@/ps/handlers/commands/${ file } ` ;
66- cachebuster ( importPath ) ;
66+ cachebust ( importPath ) ;
6767 const hotHandler = await import ( importPath ) ;
6868 LivePS . commands [ file ] = hotHandler [ file ] ;
6969 } )
7070 ) ;
7171
72- cachebuster ( '@/ps/handlers/commands/customPerms' ) ;
72+ cachebust ( '@/ps/handlers/commands/customPerms' ) ;
7373 const { GROUPED_PERMS : newGroupedPerms } = await import ( '@/ps/handlers/commands/customPerms' ) ;
7474 LivePS . commands . GROUPED_PERMS = newGroupedPerms ;
7575
76- cachebuster ( '@/ps/handlers/commands' ) ;
76+ cachebust ( '@/ps/handlers/commands' ) ;
7777 const { commandHandler } = await import ( '@/ps/handlers/commands' ) ;
7878 LivePS . commands . commandHandler = commandHandler ;
7979 } ,
@@ -84,7 +84,7 @@ export const PS_REGISTERS: Register[] = [
8484 label,
8585 pattern : new RegExp ( `\\/ps\\/handlers\\/${ handlerData . fileName } ` ) ,
8686 reload : async ( ) => {
87- cachebuster ( handlerData . importPath ) ;
87+ cachebust ( handlerData . importPath ) ;
8888 const hotHandler = await import ( handlerData . importPath ) ;
8989 handlerData . imports . forEach ( namedImport => ( LivePS [ namedImport ] = hotHandler [ namedImport ] ) ) ;
9090 } ,
0 commit comments