docs: fix S3 examples and improve storage path visibility
- Fix 4 S3 storage configuration examples in README
- Change from 'options: {bucket}' to 's3Storage: {bucketName}'
- Enhance FileSystemStorage logs to show resolved path
- Helps users verify their configuration is working correctly
- Prevents silent failures like v3.43.2 persistence regression
This commit is contained in:
parent
09c71c398f
commit
e507fcfe06
2 changed files with 45 additions and 10 deletions
|
|
@ -306,12 +306,13 @@ export async function createStorage(
|
|||
)
|
||||
return new MemoryStorage()
|
||||
}
|
||||
console.log('Using file system storage (forced)')
|
||||
const fsPath = getFileSystemPath(options)
|
||||
console.log(`Using file system storage (forced): ${fsPath}`)
|
||||
try {
|
||||
const { FileSystemStorage } = await import(
|
||||
'./adapters/fileSystemStorage.js'
|
||||
)
|
||||
return new FileSystemStorage(getFileSystemPath(options))
|
||||
return new FileSystemStorage(fsPath)
|
||||
} catch (error) {
|
||||
console.warn(
|
||||
'Failed to load FileSystemStorage, falling back to memory storage:',
|
||||
|
|
@ -359,12 +360,13 @@ export async function createStorage(
|
|||
)
|
||||
return new MemoryStorage()
|
||||
}
|
||||
console.log('Using file system storage')
|
||||
const fsPath = getFileSystemPath(options)
|
||||
console.log(`Using file system storage: ${fsPath}`)
|
||||
try {
|
||||
const { FileSystemStorage } = await import(
|
||||
'./adapters/fileSystemStorage.js'
|
||||
)
|
||||
return new FileSystemStorage(getFileSystemPath(options))
|
||||
return new FileSystemStorage(fsPath)
|
||||
} catch (error) {
|
||||
console.warn(
|
||||
'Failed to load FileSystemStorage, falling back to memory storage:',
|
||||
|
|
@ -538,12 +540,13 @@ export async function createStorage(
|
|||
process.versions &&
|
||||
process.versions.node
|
||||
) {
|
||||
console.log('Using file system storage (auto-detected)')
|
||||
const fsPath = getFileSystemPath(options)
|
||||
console.log(`Using file system storage (auto-detected): ${fsPath}`)
|
||||
try {
|
||||
const { FileSystemStorage } = await import(
|
||||
'./adapters/fileSystemStorage.js'
|
||||
)
|
||||
return new FileSystemStorage(getFileSystemPath(options))
|
||||
return new FileSystemStorage(fsPath)
|
||||
} catch (fsError) {
|
||||
console.warn(
|
||||
'Failed to load FileSystemStorage, falling back to memory storage:',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue