File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed
rivetkit-typescript/packages/rivetkit/src Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ export class FileSystemGlobalState {
110110
111111 constructor ( persist : boolean = true , customPath ?: string ) {
112112 this . #persist = persist ;
113- this . #storagePath = persist ? getStoragePath ( customPath ) : "/tmp" ;
113+ this . #storagePath = persist ? ( customPath ?? getStoragePath ( ) ) : "/tmp" ;
114114 const path = getNodePath ( ) ;
115115 this . #stateDir = path . join ( this . #storagePath, "state" ) ;
116116 this . #dbsDir = path . join ( this . #storagePath, "databases" ) ;
Original file line number Diff line number Diff line change @@ -50,10 +50,9 @@ function createHashForPath(dirPath: string): string {
5050/**
5151 * Get the storage path for the current working directory or a specified path
5252 */
53- export function getStoragePath ( customPath ?: string ) : string {
53+ export function getStoragePath ( ) : string {
5454 const dataPath = getDataPath ( "rivetkit" ) ;
55- const pathToHash = customPath || process . cwd ( ) ;
56- const dirHash = createHashForPath ( pathToHash ) ;
55+ const dirHash = createHashForPath ( process . cwd ( ) ) ;
5756 const path = getNodePath ( ) ;
5857 return path . join ( dataPath , dirHash ) ;
5958}
Original file line number Diff line number Diff line change @@ -7,10 +7,10 @@ export {
77export { InlineWebSocketAdapter } from "@/common/inline-websocket-adapter" ;
88export { noopNext } from "@/common/utils" ;
99export { createEngineDriver } from "@/drivers/engine/mod" ;
10- // export {
11- // createFileSystemDriver,
12- // createMemoryDriver,
13- // } from "@/drivers/file-system/mod";
10+ export {
11+ createFileSystemDriver ,
12+ createMemoryDriver ,
13+ } from "@/drivers/file-system/mod" ;
1414export type { ActorQuery } from "@/manager/protocol/query" ;
1515export * from "@/registry/mod" ;
1616export { toUint8Array } from "@/utils" ;
You can’t perform that action at this time.
0 commit comments