Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class FileSystemGlobalState {

constructor(persist: boolean = true, customPath?: string) {
this.#persist = persist;
this.#storagePath = persist ? getStoragePath(customPath) : "/tmp";
this.#storagePath = persist ? (customPath ?? getStoragePath()) : "/tmp";
const path = getNodePath();
this.#stateDir = path.join(this.#storagePath, "state");
this.#dbsDir = path.join(this.#storagePath, "databases");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ function createHashForPath(dirPath: string): string {
/**
* Get the storage path for the current working directory or a specified path
*/
export function getStoragePath(customPath?: string): string {
export function getStoragePath(): string {
const dataPath = getDataPath("rivetkit");
const pathToHash = customPath || process.cwd();
const dirHash = createHashForPath(pathToHash);
const dirHash = createHashForPath(process.cwd());
const path = getNodePath();
return path.join(dataPath, dirHash);
}
Expand Down
8 changes: 4 additions & 4 deletions rivetkit-typescript/packages/rivetkit/src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export {
export { InlineWebSocketAdapter } from "@/common/inline-websocket-adapter";
export { noopNext } from "@/common/utils";
export { createEngineDriver } from "@/drivers/engine/mod";
// export {
// createFileSystemDriver,
// createMemoryDriver,
// } from "@/drivers/file-system/mod";
export {
createFileSystemDriver,
createMemoryDriver,
} from "@/drivers/file-system/mod";
export type { ActorQuery } from "@/manager/protocol/query";
export * from "@/registry/mod";
export { toUint8Array } from "@/utils";
Loading