-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: only folderId is needed, default values are managed by the pkg (#2
) * feat: ✨ automatically generate databasePath, downloadsPath, and logsPath using the provided folderId * chore(ignore): add txt to gitignore * fix: remove error types & reorder calls to make things faster * refactor: simplify ensureDirectoryExists function * only require folderId but allow users to customize * fix: extend type for authorizer * fix: path to json files (tokens are on separate folder)
- Loading branch information
1 parent
80fc742
commit 4122b90
Showing
10 changed files
with
379 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
import path from 'path'; | ||
|
||
const baseDirectories = { | ||
databases: path.join(process.cwd(), 'storage', 'databases'), | ||
downloads: path.join(process.cwd(), 'storage', 'downloads'), | ||
logs: path.join(process.cwd(), 'logs'), | ||
}; | ||
|
||
const defaultConfig = { | ||
folderId: '', | ||
tokenPath: path.join(process.cwd(), 'storage', 'auth', 'tokens', 'token.json'), | ||
credentialsPath: path.join(process.cwd(), 'storage', 'auth', 'credentials.json'), | ||
databasePath: path.join( | ||
process.cwd(), | ||
'storage', | ||
'databases', | ||
'drive_database.sqlite' | ||
), | ||
downloadsPath: path.join(process.cwd(), 'storage', 'downloads'), | ||
logsPath: path.join(process.cwd(), 'logs'), | ||
}; | ||
|
||
export default defaultConfig; | ||
export {defaultConfig, baseDirectories}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.