feat: reformat imports and exports for consistency and readability
- Updated all imports and exports in `src/index.ts` and `src/storage/storageFactory.ts` to use a consistent formatting style. - Enhanced readability by standardizing spacing, alignment, and indentation across the codebase. - Applied consistent import/export styling for structured comments and multi-line objects. **Purpose**: Improve code maintainability and readability by enforcing uniform formatting, aligning imports and exports for better clarity.
This commit is contained in:
parent
6c36cb80b1
commit
ac4a615fdc
2 changed files with 527 additions and 527 deletions
22
src/index.ts
22
src/index.ts
|
|
@ -13,10 +13,10 @@
|
||||||
import './setup.js'
|
import './setup.js'
|
||||||
|
|
||||||
// Export main BrainyData class and related types
|
// Export main BrainyData class and related types
|
||||||
import { BrainyData, BrainyDataConfig } from './brainyData.js'
|
import {BrainyData, BrainyDataConfig} from './brainyData.js'
|
||||||
|
|
||||||
export { BrainyData }
|
export {BrainyData}
|
||||||
export type { BrainyDataConfig }
|
export type {BrainyDataConfig}
|
||||||
|
|
||||||
// Export distance functions for convenience
|
// Export distance functions for convenience
|
||||||
import {
|
import {
|
||||||
|
|
@ -43,7 +43,7 @@ import {
|
||||||
} from './utils/embedding.js'
|
} from './utils/embedding.js'
|
||||||
|
|
||||||
// Export worker utilities
|
// Export worker utilities
|
||||||
import { executeInThread, cleanupWorkerPools } from './utils/workerUtils.js'
|
import {executeInThread, cleanupWorkerPools} from './utils/workerUtils.js'
|
||||||
|
|
||||||
// Export environment utilities
|
// Export environment utilities
|
||||||
import {
|
import {
|
||||||
|
|
@ -201,7 +201,7 @@ export {
|
||||||
createAugmentationRegistryPlugin,
|
createAugmentationRegistryPlugin,
|
||||||
createAugmentationRegistryRollupPlugin
|
createAugmentationRegistryRollupPlugin
|
||||||
}
|
}
|
||||||
export type { AugmentationRegistryLoaderOptions, AugmentationLoadResult }
|
export type {AugmentationRegistryLoaderOptions, AugmentationLoadResult}
|
||||||
|
|
||||||
// Export augmentation implementations
|
// Export augmentation implementations
|
||||||
import {
|
import {
|
||||||
|
|
@ -254,13 +254,13 @@ import type {
|
||||||
} from './coreTypes.js'
|
} from './coreTypes.js'
|
||||||
|
|
||||||
// Export HNSW index and optimized version
|
// Export HNSW index and optimized version
|
||||||
import { HNSWIndex } from './hnsw/hnswIndex.js'
|
import {HNSWIndex} from './hnsw/hnswIndex.js'
|
||||||
import {
|
import {
|
||||||
HNSWIndexOptimized,
|
HNSWIndexOptimized,
|
||||||
HNSWOptimizedConfig
|
HNSWOptimizedConfig
|
||||||
} from './hnsw/hnswIndexOptimized.js'
|
} from './hnsw/hnswIndexOptimized.js'
|
||||||
|
|
||||||
export { HNSWIndex, HNSWIndexOptimized }
|
export {HNSWIndex, HNSWIndexOptimized}
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
Vector,
|
Vector,
|
||||||
|
|
@ -289,9 +289,9 @@ import type {
|
||||||
IDialogAugmentation,
|
IDialogAugmentation,
|
||||||
IActivationAugmentation
|
IActivationAugmentation
|
||||||
} from './types/augmentations.js'
|
} from './types/augmentations.js'
|
||||||
import { AugmentationType, BrainyAugmentations } from './types/augmentations.js'
|
import {AugmentationType, BrainyAugmentations} from './types/augmentations.js'
|
||||||
|
|
||||||
export type { IAugmentation, AugmentationResponse, IWebSocketSupport }
|
export type {IAugmentation, AugmentationResponse, IWebSocketSupport}
|
||||||
export {
|
export {
|
||||||
AugmentationType,
|
AugmentationType,
|
||||||
BrainyAugmentations,
|
BrainyAugmentations,
|
||||||
|
|
@ -326,7 +326,7 @@ import type {
|
||||||
Concept,
|
Concept,
|
||||||
Content
|
Content
|
||||||
} from './types/graphTypes.js'
|
} from './types/graphTypes.js'
|
||||||
import { NounType, VerbType } from './types/graphTypes.js'
|
import {NounType, VerbType} from './types/graphTypes.js'
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
GraphNoun,
|
GraphNoun,
|
||||||
|
|
@ -338,7 +338,7 @@ export type {
|
||||||
Concept,
|
Concept,
|
||||||
Content
|
Content
|
||||||
}
|
}
|
||||||
export { NounType, VerbType }
|
export {NounType, VerbType}
|
||||||
|
|
||||||
// Export MCP (Model Control Protocol) components
|
// Export MCP (Model Control Protocol) components
|
||||||
import {
|
import {
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,11 @@
|
||||||
* Creates the appropriate storage adapter based on the environment and configuration
|
* Creates the appropriate storage adapter based on the environment and configuration
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { StorageAdapter } from '../coreTypes.js'
|
import {StorageAdapter} from '../coreTypes.js'
|
||||||
import { MemoryStorage } from './adapters/memoryStorage.js'
|
import {MemoryStorage} from './adapters/memoryStorage.js'
|
||||||
import { OPFSStorage } from './adapters/opfsStorage.js'
|
import {OPFSStorage} from './adapters/opfsStorage.js'
|
||||||
import { FileSystemStorage } from './adapters/fileSystemStorage.js'
|
import {FileSystemStorage} from './adapters/fileSystemStorage.js'
|
||||||
import { S3CompatibleStorage, R2Storage } from './adapters/s3CompatibleStorage.js'
|
import {S3CompatibleStorage, R2Storage} from './adapters/s3CompatibleStorage.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Options for creating a storage adapter
|
* Options for creating a storage adapter
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue