@framers/sql-storage-adapter 0.6.12 → 0.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/adapters/baseStorageAdapter.d.ts +3 -3
- package/dist/adapters/betterSqliteAdapter.d.ts +1 -1
- package/dist/adapters/capacitorSqliteAdapter.d.ts +1 -1
- package/dist/adapters/electron/electronMainAdapter.d.ts +1 -1
- package/dist/adapters/electron/electronRendererAdapter.d.ts +2 -2
- package/dist/adapters/electron/index.d.ts +10 -10
- package/dist/adapters/electron/ipc/index.d.ts +3 -3
- package/dist/adapters/electron/ipc/protocol.d.ts +1 -1
- package/dist/adapters/electron/ipc/types.d.ts +1 -1
- package/dist/adapters/electron/migration/autoMigrator.d.ts +1 -1
- package/dist/adapters/electron/migration/index.d.ts +1 -1
- package/dist/adapters/electron/preload.d.ts +2 -2
- package/dist/adapters/electron/recovery/corruptionDetector.d.ts +1 -1
- package/dist/adapters/electron/recovery/index.d.ts +2 -2
- package/dist/adapters/electron/recovery/walCheckpoint.d.ts +1 -1
- package/dist/adapters/electron/window/index.d.ts +1 -1
- package/dist/adapters/electron/window/windowManager.d.ts +1 -1
- package/dist/adapters/indexedDbAdapter.d.ts +1 -1
- package/dist/adapters/postgresAdapter.d.ts +1 -1
- package/dist/adapters/sqlJsAdapter.d.ts +1 -1
- package/dist/adapters/supabase.d.ts +2 -2
- package/dist/core/contracts/context.d.ts +2 -2
- package/dist/core/contracts/events.d.ts +2 -2
- package/dist/core/contracts/extensions.d.ts +3 -3
- package/dist/core/contracts/hooks.d.ts +1 -1
- package/dist/core/contracts/index.d.ts +2 -2
- package/dist/core/contracts/limitations.d.ts +1 -1
- package/dist/core/database.d.ts +6 -6
- package/dist/core/resolver.d.ts +5 -5
- package/dist/features/backup/cloudBackup.d.ts +1 -1
- package/dist/features/migrations/dataExport.d.ts +1 -1
- package/dist/features/migrations/dataImport.d.ts +2 -2
- package/dist/features/migrations/migration.d.ts +2 -2
- package/dist/features/sync/conflicts/conflictResolver.d.ts +1 -1
- package/dist/features/sync/conflicts/index.d.ts +1 -1
- package/dist/features/sync/crossPlatformSync.d.ts +6 -6
- package/dist/features/sync/devices/deviceManager.d.ts +2 -2
- package/dist/features/sync/devices/index.d.ts +1 -1
- package/dist/features/sync/index.d.ts +9 -9
- package/dist/features/sync/protocol/index.d.ts +2 -2
- package/dist/features/sync/protocol/messages.d.ts +1 -1
- package/dist/features/sync/syncManager.d.ts +1 -1
- package/dist/features/sync/tables/index.d.ts +1 -1
- package/dist/features/sync/tables/syncLogManager.d.ts +4 -4
- package/dist/features/sync/transport/httpTransport.d.ts +2 -2
- package/dist/features/sync/transport/index.d.ts +3 -3
- package/dist/features/sync/transport/transport.d.ts +1 -1
- package/dist/features/sync/transport/websocketTransport.d.ts +2 -2
- package/dist/index.d.ts +25 -25
- package/dist/shared/parameterUtils.d.ts +1 -1
- package/dist/shared/serializedTransaction.d.ts +1 -1
- package/dist/types/index.d.ts +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -503,7 +503,7 @@ On Postgres, `features.exporter` requires a Node runtime plus an adapter that wa
|
|
|
503
503
|
## CI, Releases, and Badges
|
|
504
504
|
|
|
505
505
|
- GitHub Actions workflows:
|
|
506
|
-
- `ci.yml` runs lint, tests, and
|
|
506
|
+
- `ci.yml` runs on pushes and pull requests to `master`: lint, type check, tests with coverage and the build, then it packs the package, installs the tarball into a new ES module project and type-checks a consumer with `--module nodenext --moduleResolution nodenext`.
|
|
507
507
|
- `release.yml` publishes new versions to npm, tags the commit (`vX.Y.Z`), and creates/updates the GitHub Release when `CHANGELOG.md` and `package.json` bump the version.
|
|
508
508
|
- Check badge health whenever builds fail:
|
|
509
509
|
- CI badge should be green for `master`.
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
* });
|
|
44
44
|
* ```
|
|
45
45
|
*/
|
|
46
|
-
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult, BatchOperation, BatchResult, PreparedStatement } from '../core/contracts';
|
|
47
|
-
import type { PerformanceConfig, PerformanceSettings, CacheStats } from '../core/contracts/performance';
|
|
48
|
-
import type { StorageHooks } from '../core/contracts/hooks';
|
|
46
|
+
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult, BatchOperation, BatchResult, PreparedStatement } from '../core/contracts/index.js';
|
|
47
|
+
import type { PerformanceConfig, PerformanceSettings, CacheStats } from '../core/contracts/performance.js';
|
|
48
|
+
import type { StorageHooks } from '../core/contracts/hooks.js';
|
|
49
49
|
/**
|
|
50
50
|
* Options for BaseStorageAdapter configuration.
|
|
51
51
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StorageAdapter, StorageOpenOptions, StorageParameters, StorageRunResult, StorageCapability, BatchOperation, BatchResult } from '../core/contracts';
|
|
1
|
+
import type { StorageAdapter, StorageOpenOptions, StorageParameters, StorageRunResult, StorageCapability, BatchOperation, BatchResult } from '../core/contracts/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* Native SQLite adapter using better-sqlite3.
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult } from '../core/contracts';
|
|
1
|
+
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult } from '../core/contracts/index.js';
|
|
2
2
|
export interface CapacitorAdapterOptions {
|
|
3
3
|
/**
|
|
4
4
|
* Database name. Defaults to `app`.
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
* await db.open();
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
|
-
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult, BatchOperation, BatchResult, PreparedStatement } from '../../core/contracts';
|
|
34
|
+
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult, BatchOperation, BatchResult, PreparedStatement } from '../../core/contracts/index.js';
|
|
35
35
|
/**
|
|
36
36
|
* WAL (Write-Ahead Logging) configuration.
|
|
37
37
|
*/
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
* const users = await db.all('SELECT * FROM users');
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult, BatchOperation, BatchResult, PreparedStatement } from '../../core/contracts';
|
|
31
|
-
import type { DbChangeEvent, SyncStatus } from './ipc/types';
|
|
30
|
+
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult, BatchOperation, BatchResult, PreparedStatement } from '../../core/contracts/index.js';
|
|
31
|
+
import type { DbChangeEvent, SyncStatus } from './ipc/types.js';
|
|
32
32
|
/**
|
|
33
33
|
* Options for ElectronRendererAdapter.
|
|
34
34
|
*/
|
|
@@ -61,14 +61,14 @@
|
|
|
61
61
|
*
|
|
62
62
|
* @packageDocumentation
|
|
63
63
|
*/
|
|
64
|
-
export { ElectronMainAdapter, createElectronMainAdapter, type ElectronMainAdapterOptions, type WalConfig, type RecoveryConfig, type MigrationConfig, type BackupConfig, type CloudBackupProvider, type MultiWindowConfig, } from './electronMainAdapter';
|
|
65
|
-
export { ElectronRendererAdapter, createElectronRendererAdapter, isElectronRenderer, isPreloadApiAvailable, type ElectronRendererAdapterOptions, } from './electronRendererAdapter';
|
|
66
|
-
export { sqlStorageApi, type SqlStorageApi, } from './preload';
|
|
67
|
-
export { IPC_CHANNELS, DB_CHANNELS, TRANSACTION_CHANNELS, SYNC_CHANNELS, BACKUP_CHANNELS, RECOVERY_CHANNELS, MIGRATION_CHANNELS, BROADCAST_CHANNELS, type IpcChannel, } from './ipc/channels';
|
|
68
|
-
export type { IpcRequest, IpcResponse, IpcError, SqlOperationPayload, ExecPayload, BatchPayload, OpenPayload, TransactionContext, TransactionOperationPayload, SyncStatus, BackupInfo, DbChangeEvent, ConnectionStateEvent, IntegrityCheckResult, WalCheckpointResult, MigrationStatus, } from './ipc/types';
|
|
69
|
-
export { IpcProtocolManager, protocolManager, initializeIpcProtocol, disposeIpcProtocol, } from './ipc/protocol';
|
|
70
|
-
export { WalCheckpointManager, createWalCheckpointManager, type WalCheckpointConfig, type CheckpointStrategy, type CheckpointResult, type WalStatus, CorruptionDetector, createCorruptionDetector, type CorruptionDetectorConfig, type IntegrityCheckLevel, type IntegrityCheckResult as RecoveryIntegrityCheckResult, type CorruptionIssue, type RepairStrategy, type RepairResult, } from './recovery';
|
|
71
|
-
export { AutoMigrator, createAutoMigrator, type AutoMigratorConfig, type MigrationFile, type AppliedMigration, type MigrationResult, } from './migration';
|
|
72
|
-
export { WindowManager, createWindowManager, type WindowManagerConfig, type WindowManagerCallbacks, type RegisteredWindow, } from './window';
|
|
73
|
-
export type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult, BatchOperation, BatchResult, } from '../../core/contracts';
|
|
64
|
+
export { ElectronMainAdapter, createElectronMainAdapter, type ElectronMainAdapterOptions, type WalConfig, type RecoveryConfig, type MigrationConfig, type BackupConfig, type CloudBackupProvider, type MultiWindowConfig, } from './electronMainAdapter.js';
|
|
65
|
+
export { ElectronRendererAdapter, createElectronRendererAdapter, isElectronRenderer, isPreloadApiAvailable, type ElectronRendererAdapterOptions, } from './electronRendererAdapter.js';
|
|
66
|
+
export { sqlStorageApi, type SqlStorageApi, } from './preload.js';
|
|
67
|
+
export { IPC_CHANNELS, DB_CHANNELS, TRANSACTION_CHANNELS, SYNC_CHANNELS, BACKUP_CHANNELS, RECOVERY_CHANNELS, MIGRATION_CHANNELS, BROADCAST_CHANNELS, type IpcChannel, } from './ipc/channels.js';
|
|
68
|
+
export type { IpcRequest, IpcResponse, IpcError, SqlOperationPayload, ExecPayload, BatchPayload, OpenPayload, TransactionContext, TransactionOperationPayload, SyncStatus, BackupInfo, DbChangeEvent, ConnectionStateEvent, IntegrityCheckResult, WalCheckpointResult, MigrationStatus, } from './ipc/types.js';
|
|
69
|
+
export { IpcProtocolManager, protocolManager, initializeIpcProtocol, disposeIpcProtocol, } from './ipc/protocol.js';
|
|
70
|
+
export { WalCheckpointManager, createWalCheckpointManager, type WalCheckpointConfig, type CheckpointStrategy, type CheckpointResult, type WalStatus, CorruptionDetector, createCorruptionDetector, type CorruptionDetectorConfig, type IntegrityCheckLevel, type IntegrityCheckResult as RecoveryIntegrityCheckResult, type CorruptionIssue, type RepairStrategy, type RepairResult, } from './recovery/index.js';
|
|
71
|
+
export { AutoMigrator, createAutoMigrator, type AutoMigratorConfig, type MigrationFile, type AppliedMigration, type MigrationResult, } from './migration/index.js';
|
|
72
|
+
export { WindowManager, createWindowManager, type WindowManagerConfig, type WindowManagerCallbacks, type RegisteredWindow, } from './window/index.js';
|
|
73
|
+
export type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult, BatchOperation, BatchResult, } from '../../core/contracts/index.js';
|
|
74
74
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @packageDocumentation
|
|
7
7
|
*/
|
|
8
|
-
export * from './channels';
|
|
9
|
-
export * from './types';
|
|
10
|
-
export { IpcProtocolManager, protocolManager, initializeIpcProtocol, disposeIpcProtocol, } from './protocol';
|
|
8
|
+
export * from './channels.js';
|
|
9
|
+
export * from './types.js';
|
|
10
|
+
export { IpcProtocolManager, protocolManager, initializeIpcProtocol, disposeIpcProtocol, } from './protocol.js';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* operations from renderer processes. Ensures type-safe communication
|
|
6
6
|
* and proper error handling.
|
|
7
7
|
*/
|
|
8
|
-
import type { StorageAdapter } from '../../../core/contracts';
|
|
8
|
+
import type { StorageAdapter } from '../../../core/contracts/index.js';
|
|
9
9
|
/**
|
|
10
10
|
* IPC Protocol Manager.
|
|
11
11
|
*
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Provides type-safe request/response patterns for IPC communication
|
|
5
5
|
* between main and renderer processes.
|
|
6
6
|
*/
|
|
7
|
-
import type { StorageParameters, StorageRunResult, StorageOpenOptions, StorageCapability, BatchOperation, BatchResult } from '../../../core/contracts';
|
|
7
|
+
import type { StorageParameters, StorageRunResult, StorageOpenOptions, StorageCapability, BatchOperation, BatchResult } from '../../../core/contracts/index.js';
|
|
8
8
|
/**
|
|
9
9
|
* Base request structure with correlation ID for request tracking.
|
|
10
10
|
*/
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @packageDocumentation
|
|
7
7
|
*/
|
|
8
|
-
export { AutoMigrator, createAutoMigrator, type AutoMigratorConfig, type MigrationFile, type AppliedMigration, type MigrationResult, } from './autoMigrator';
|
|
8
|
+
export { AutoMigrator, createAutoMigrator, type AutoMigratorConfig, type MigrationFile, type AppliedMigration, type MigrationResult, } from './autoMigrator.js';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
* });
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
import type { TransactionContext, SyncStatus, DbChangeEvent } from './ipc/types';
|
|
25
|
-
import type { StorageRunResult, StorageOpenOptions, StorageParameters, BatchOperation, BatchResult, StorageCapability } from '../../core/contracts';
|
|
24
|
+
import type { TransactionContext, SyncStatus, DbChangeEvent } from './ipc/types.js';
|
|
25
|
+
import type { StorageRunResult, StorageOpenOptions, StorageParameters, BatchOperation, BatchResult, StorageCapability } from '../../core/contracts/index.js';
|
|
26
26
|
/**
|
|
27
27
|
* SQL Storage API exposed to renderer processes.
|
|
28
28
|
*/
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
|
-
export { WalCheckpointManager, createWalCheckpointManager, type WalCheckpointConfig, type CheckpointStrategy, type CheckpointResult, type WalStatus, } from './walCheckpoint';
|
|
10
|
-
export { CorruptionDetector, createCorruptionDetector, type CorruptionDetectorConfig, type IntegrityCheckLevel, type IntegrityCheckResult, type CorruptionIssue, type RepairStrategy, type RepairResult, } from './corruptionDetector';
|
|
9
|
+
export { WalCheckpointManager, createWalCheckpointManager, type WalCheckpointConfig, type CheckpointStrategy, type CheckpointResult, type WalStatus, } from './walCheckpoint.js';
|
|
10
|
+
export { CorruptionDetector, createCorruptionDetector, type CorruptionDetectorConfig, type IntegrityCheckLevel, type IntegrityCheckResult, type CorruptionIssue, type RepairStrategy, type RepairResult, } from './corruptionDetector.js';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @packageDocumentation
|
|
7
7
|
*/
|
|
8
|
-
export { WindowManager, createWindowManager, type WindowManagerConfig, type WindowManagerCallbacks, type RegisteredWindow, } from './windowManager';
|
|
8
|
+
export { WindowManager, createWindowManager, type WindowManagerConfig, type WindowManagerCallbacks, type RegisteredWindow, } from './windowManager.js';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
* console.log(session);
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult } from '../core/contracts';
|
|
45
|
+
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult } from '../core/contracts/index.js';
|
|
46
46
|
/**
|
|
47
47
|
* Configuration for IndexedDB adapter.
|
|
48
48
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult } from '../core/contracts';
|
|
1
|
+
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult } from '../core/contracts/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* Configuration options for PostgreSQL adapter.
|
|
4
4
|
* Supports both connection strings and granular configuration.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SqlJsConfig } from 'sql.js';
|
|
2
|
-
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult } from '../core/contracts';
|
|
2
|
+
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult } from '../core/contracts/index.js';
|
|
3
3
|
type SqlJsAdapterOptions = SqlJsConfig;
|
|
4
4
|
/**
|
|
5
5
|
* Storage adapter backed by sql.js (WebAssembly) for environments without native SQLite bindings.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Supabase Postgres Storage Adapter
|
|
3
3
|
* Provides full Postgres capabilities with Supabase's managed infrastructure
|
|
4
4
|
*/
|
|
5
|
-
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult, BatchResult } from '../core/contracts';
|
|
6
|
-
import type { StorageAdapterExtensions, ExtendedBatchOperation, Migration, PerformanceMetrics, StreamOptions } from '../core/contracts/extensions';
|
|
5
|
+
import type { StorageAdapter, StorageCapability, StorageOpenOptions, StorageParameters, StorageRunResult, BatchResult } from '../core/contracts/index.js';
|
|
6
|
+
import type { StorageAdapterExtensions, ExtendedBatchOperation, Migration, PerformanceMetrics, StreamOptions } from '../core/contracts/extensions.js';
|
|
7
7
|
export interface SupabaseAdapterOptions extends StorageOpenOptions {
|
|
8
8
|
connectionString?: string;
|
|
9
9
|
poolConfig?: {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* connection state, and performance characteristics without requiring
|
|
6
6
|
* developers to manually check capability flags.
|
|
7
7
|
*/
|
|
8
|
-
import type { StorageAdapter, StorageCapability } from './index';
|
|
9
|
-
import type { PerformanceMetrics } from './extensions';
|
|
8
|
+
import type { StorageAdapter, StorageCapability } from './index.js';
|
|
9
|
+
import type { PerformanceMetrics } from './extensions.js';
|
|
10
10
|
/**
|
|
11
11
|
* Type of database connection.
|
|
12
12
|
*/
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* These types enable applications to subscribe to adapter events
|
|
5
5
|
* for logging, monitoring, debugging, and analytics purposes.
|
|
6
6
|
*/
|
|
7
|
-
import type { StorageParameters } from './index';
|
|
8
|
-
import type { AdapterContext } from './context';
|
|
7
|
+
import type { StorageParameters } from './index.js';
|
|
8
|
+
import type { AdapterContext } from './context.js';
|
|
9
9
|
/**
|
|
10
10
|
* Event emitted when a connection is opened.
|
|
11
11
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* These types are used by adapters that provide additional functionality
|
|
4
4
|
* beyond the core StorageAdapter interface.
|
|
5
5
|
*/
|
|
6
|
-
import type { BatchOperation as CoreBatchOperation } from './index';
|
|
6
|
+
import type { BatchOperation as CoreBatchOperation } from './index.js';
|
|
7
7
|
/**
|
|
8
8
|
* Performance metrics for monitoring adapter usage.
|
|
9
9
|
*/
|
|
@@ -68,6 +68,6 @@ export interface StorageAdapterExtensions {
|
|
|
68
68
|
*/
|
|
69
69
|
stream?<T>(statement: string, parameters?: unknown, options?: StreamOptions): AsyncIterableIterator<T>;
|
|
70
70
|
}
|
|
71
|
-
export type { BatchOperation } from './index';
|
|
72
|
-
export type { BatchResult } from './index';
|
|
71
|
+
export type { BatchOperation } from './index.js';
|
|
72
|
+
export type { BatchResult } from './index.js';
|
|
73
73
|
//# sourceMappingURL=extensions.d.ts.map
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* const db = await createDatabase({ hooks: auditHooks });
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
import type { StorageParameters, StorageRunResult } from './index';
|
|
37
|
+
import type { StorageParameters, StorageRunResult } from './index.js';
|
|
38
38
|
/**
|
|
39
39
|
* Base context for all operations.
|
|
40
40
|
*
|
|
@@ -236,12 +236,12 @@ export declare class StorageResolutionError extends Error {
|
|
|
236
236
|
* Performance configuration types for cost/accuracy optimization.
|
|
237
237
|
* See `OPTIMIZATION_GUIDE.md` for detailed usage documentation.
|
|
238
238
|
*/
|
|
239
|
-
export * from './performance';
|
|
239
|
+
export * from './performance.js';
|
|
240
240
|
/**
|
|
241
241
|
* Lifecycle hooks for extending adapter behavior.
|
|
242
242
|
* Designed for RAG integration, analytics, and auditing.
|
|
243
243
|
*/
|
|
244
|
-
export * from './hooks';
|
|
244
|
+
export * from './hooks.js';
|
|
245
245
|
export type { SqlDialect } from './dialect.js';
|
|
246
246
|
export type { IFullTextSearch } from './fts.js';
|
|
247
247
|
export type { IBlobCodec } from './blobCodec.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* supported database adapter, enabling runtime introspection and
|
|
6
6
|
* automatic constraint enforcement.
|
|
7
7
|
*/
|
|
8
|
-
import type { AdapterLimitations } from './context';
|
|
8
|
+
import type { AdapterLimitations } from './context.js';
|
|
9
9
|
/**
|
|
10
10
|
* Limitations for better-sqlite3 adapter.
|
|
11
11
|
*/
|
package/dist/core/database.d.ts
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* - connectDatabase() - Explicit connection with clear options
|
|
7
7
|
* - openDatabase() - Simple file-based database
|
|
8
8
|
*/
|
|
9
|
-
import type { StorageAdapter } from './contracts';
|
|
10
|
-
import { type AdapterKind } from './resolver';
|
|
11
|
-
import type { PostgresAdapterOptions } from '../adapters/postgresAdapter';
|
|
12
|
-
import type { CapacitorAdapterOptions } from '../adapters/capacitorSqliteAdapter';
|
|
13
|
-
import type { IndexedDbAdapterOptions } from '../adapters/indexedDbAdapter';
|
|
9
|
+
import type { StorageAdapter } from './contracts/index.js';
|
|
10
|
+
import { type AdapterKind } from './resolver.js';
|
|
11
|
+
import type { PostgresAdapterOptions } from '../adapters/postgresAdapter.js';
|
|
12
|
+
import type { CapacitorAdapterOptions } from '../adapters/capacitorSqliteAdapter.js';
|
|
13
|
+
import type { IndexedDbAdapterOptions } from '../adapters/indexedDbAdapter.js';
|
|
14
14
|
/**
|
|
15
15
|
* Database connection options.
|
|
16
16
|
*/
|
|
@@ -152,5 +152,5 @@ export declare function openDatabase(filePath: string): Promise<StorageAdapter>;
|
|
|
152
152
|
* ```
|
|
153
153
|
*/
|
|
154
154
|
export declare function createMemoryDatabase(): Promise<StorageAdapter>;
|
|
155
|
-
export { resolveStorageAdapter } from './resolver';
|
|
155
|
+
export { resolveStorageAdapter } from './resolver.js';
|
|
156
156
|
//# sourceMappingURL=database.d.ts.map
|
package/dist/core/resolver.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { StorageAdapter, StorageOpenOptions } from './contracts';
|
|
2
|
-
import type { AdapterKind } from './contracts/context';
|
|
3
|
-
import { type CapacitorAdapterOptions } from '../adapters/capacitorSqliteAdapter';
|
|
4
|
-
import { type IndexedDbAdapterOptions } from '../adapters/indexedDbAdapter';
|
|
5
|
-
export type { AdapterKind } from './contracts/context';
|
|
1
|
+
import type { StorageAdapter, StorageOpenOptions } from './contracts/index.js';
|
|
2
|
+
import type { AdapterKind } from './contracts/context.js';
|
|
3
|
+
import { type CapacitorAdapterOptions } from '../adapters/capacitorSqliteAdapter.js';
|
|
4
|
+
import { type IndexedDbAdapterOptions } from '../adapters/indexedDbAdapter.js';
|
|
5
|
+
export type { AdapterKind } from './contracts/context.js';
|
|
6
6
|
export interface StorageResolutionOptions {
|
|
7
7
|
/** Absolute path for sqlite file (used by better-sqlite3/sql.js when persistence is desired). */
|
|
8
8
|
filePath?: string;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
*
|
|
31
31
|
* @module cloudBackup
|
|
32
32
|
*/
|
|
33
|
-
import type { StorageAdapter } from '../../core/contracts';
|
|
33
|
+
import type { StorageAdapter } from '../../core/contracts/index.js';
|
|
34
34
|
/** Supported backup export formats */
|
|
35
35
|
export type BackupFormat = 'json' | 'sql';
|
|
36
36
|
/** Supported compression algorithms */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Data export utilities for cross-adapter migration and backup.
|
|
3
3
|
* Supports exporting data to portable formats (JSON, SQL, CSV).
|
|
4
4
|
*/
|
|
5
|
-
import type { StorageAdapter } from '../../core/contracts';
|
|
5
|
+
import type { StorageAdapter } from '../../core/contracts/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* Export format types.
|
|
8
8
|
*/
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Data import utilities for cross-adapter migration and restoration.
|
|
3
3
|
* Supports importing from JSON, SQL dumps, and CSV files.
|
|
4
4
|
*/
|
|
5
|
-
import type { StorageAdapter } from '../../core/contracts';
|
|
6
|
-
import type { ExportedData } from './dataExport';
|
|
5
|
+
import type { StorageAdapter } from '../../core/contracts/index.js';
|
|
6
|
+
import type { ExportedData } from './dataExport.js';
|
|
7
7
|
/**
|
|
8
8
|
* Options for data import.
|
|
9
9
|
*/
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* High-level migration utilities for moving data between adapters.
|
|
3
3
|
* Simplifies common migration scenarios like local -> Supabase, Supabase -> local, etc.
|
|
4
4
|
*/
|
|
5
|
-
import type { StorageAdapter } from '../../core/contracts';
|
|
6
|
-
import { type ImportResult, type DataImportOptions } from './dataImport';
|
|
5
|
+
import type { StorageAdapter } from '../../core/contracts/index.js';
|
|
6
|
+
import { type ImportResult, type DataImportOptions } from './dataImport.js';
|
|
7
7
|
/**
|
|
8
8
|
* Migration strategy for handling conflicts and errors.
|
|
9
9
|
*/
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
|
-
import type { StorageAdapter } from '../../core/contracts';
|
|
10
|
-
import type { VectorClockData } from './protocol/vectorClock';
|
|
11
|
-
import type { ChangeRecord } from './protocol/messages';
|
|
12
|
-
import type { TransportOptions } from './transport/transport';
|
|
13
|
-
import type { SyncConflict, ConflictResolution, ConflictStrategy, ConflictUIHooks, FieldMerger } from './conflicts/conflictResolver';
|
|
14
|
-
import type { DeviceInfo, DeviceType } from './devices/deviceManager';
|
|
9
|
+
import type { StorageAdapter } from '../../core/contracts/index.js';
|
|
10
|
+
import type { VectorClockData } from './protocol/vectorClock.js';
|
|
11
|
+
import type { ChangeRecord } from './protocol/messages.js';
|
|
12
|
+
import type { TransportOptions } from './transport/transport.js';
|
|
13
|
+
import type { SyncConflict, ConflictResolution, ConflictStrategy, ConflictUIHooks, FieldMerger } from './conflicts/conflictResolver.js';
|
|
14
|
+
import type { DeviceInfo, DeviceType } from './devices/deviceManager.js';
|
|
15
15
|
/**
|
|
16
16
|
* Table sync configuration.
|
|
17
17
|
*/
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
|
-
import type { StorageAdapter } from '../../../core/contracts';
|
|
10
|
-
import type { VectorClock } from '../protocol/vectorClock';
|
|
9
|
+
import type { StorageAdapter } from '../../../core/contracts/index.js';
|
|
10
|
+
import type { VectorClock } from '../protocol/vectorClock.js';
|
|
11
11
|
/**
|
|
12
12
|
* Device types supported for sync.
|
|
13
13
|
*/
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
* await sync.sync();
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
export { CrossPlatformSync, createCrossPlatformSync, type CrossPlatformSyncOptions, type CrossPlatformSyncHooks, type TableSyncConfig, type SyncResult, type SyncStatus as CrossPlatformSyncStatus, } from './crossPlatformSync';
|
|
29
|
-
export { VectorClock, createVectorClock, compareClocks, mergeClocks, generateDeviceId, dominates, type VectorClockData, type CausalRelation, type SerializedVectorClock, } from './protocol/vectorClock';
|
|
30
|
-
export { type ChangeOperation, type ChangeRecord, type ChangeBatch, type SyncProgress, type SyncStatus as ProtocolSyncStatus, type BaseMessage, type HandshakeRequest, type HandshakeResponse, type DeltaPush, type DeltaPullRequest, type DeltaPullResponse, type AckMessage, type ConflictMessage, type PresenceMessage, type HeartbeatMessage, type HeartbeatAck, type ErrorMessage, type SyncMessage, type SyncMessageType, type DeviceType as ProtocolDeviceType, type DeviceInfo as ProtocolDeviceInfo, type ConflictResolution as ProtocolConflictResolution, generateMessageId, createBaseMessage, createHandshakeRequest, createAck, createHeartbeat, createError, createDeltaPushMessage, createDeltaPullRequest, createPresenceMessage, createHeartbeatMessage, createAckMessage, generateChangeId, createChangeRecord, isHandshakeRequest, isDeltaPush, isConflict, isError, isSyncMessage, } from './protocol/messages';
|
|
31
|
-
export { BaseTransport, TransportError, TransportErrorCodes, type SyncTransport, type TransportOptions, type TransportState, type TransportStats, type TransportEventType, type TransportEvents, type TransportEventListener, } from './transport/transport';
|
|
32
|
-
export { WebSocketTransport, createWebSocketTransport, type WebSocketTransportOptions, } from './transport/websocketTransport';
|
|
33
|
-
export { HttpTransport, createHttpTransport, type HttpTransportOptions, } from './transport/httpTransport';
|
|
34
|
-
export { ConflictResolver, createConflictResolver, FieldMergers, type ConflictStrategy, type ResolutionDecision, type SyncConflict, type ConflictResolution, type ConflictUIHooks, type ConflictResolverOptions, type FieldMerger, } from './conflicts/conflictResolver';
|
|
35
|
-
export { DeviceManager, createDeviceManager, type DeviceType, type PresenceStatus, type DeviceInfo, type DeviceCapabilities, type DeviceRegistrationOptions, type PresenceEvent, type DeviceManagerEventType, type DeviceManagerEvents, type DeviceManagerOptions, } from './devices/deviceManager';
|
|
36
|
-
export { SyncLogManager, type ChangeLogEntry as SyncLogChange, type ConflictEntry as SyncLogConflict, } from './tables/syncLogManager';
|
|
28
|
+
export { CrossPlatformSync, createCrossPlatformSync, type CrossPlatformSyncOptions, type CrossPlatformSyncHooks, type TableSyncConfig, type SyncResult, type SyncStatus as CrossPlatformSyncStatus, } from './crossPlatformSync.js';
|
|
29
|
+
export { VectorClock, createVectorClock, compareClocks, mergeClocks, generateDeviceId, dominates, type VectorClockData, type CausalRelation, type SerializedVectorClock, } from './protocol/vectorClock.js';
|
|
30
|
+
export { type ChangeOperation, type ChangeRecord, type ChangeBatch, type SyncProgress, type SyncStatus as ProtocolSyncStatus, type BaseMessage, type HandshakeRequest, type HandshakeResponse, type DeltaPush, type DeltaPullRequest, type DeltaPullResponse, type AckMessage, type ConflictMessage, type PresenceMessage, type HeartbeatMessage, type HeartbeatAck, type ErrorMessage, type SyncMessage, type SyncMessageType, type DeviceType as ProtocolDeviceType, type DeviceInfo as ProtocolDeviceInfo, type ConflictResolution as ProtocolConflictResolution, generateMessageId, createBaseMessage, createHandshakeRequest, createAck, createHeartbeat, createError, createDeltaPushMessage, createDeltaPullRequest, createPresenceMessage, createHeartbeatMessage, createAckMessage, generateChangeId, createChangeRecord, isHandshakeRequest, isDeltaPush, isConflict, isError, isSyncMessage, } from './protocol/messages.js';
|
|
31
|
+
export { BaseTransport, TransportError, TransportErrorCodes, type SyncTransport, type TransportOptions, type TransportState, type TransportStats, type TransportEventType, type TransportEvents, type TransportEventListener, } from './transport/transport.js';
|
|
32
|
+
export { WebSocketTransport, createWebSocketTransport, type WebSocketTransportOptions, } from './transport/websocketTransport.js';
|
|
33
|
+
export { HttpTransport, createHttpTransport, type HttpTransportOptions, } from './transport/httpTransport.js';
|
|
34
|
+
export { ConflictResolver, createConflictResolver, FieldMergers, type ConflictStrategy, type ResolutionDecision, type SyncConflict, type ConflictResolution, type ConflictUIHooks, type ConflictResolverOptions, type FieldMerger, } from './conflicts/conflictResolver.js';
|
|
35
|
+
export { DeviceManager, createDeviceManager, type DeviceType, type PresenceStatus, type DeviceInfo, type DeviceCapabilities, type DeviceRegistrationOptions, type PresenceEvent, type DeviceManagerEventType, type DeviceManagerEvents, type DeviceManagerOptions, } from './devices/deviceManager.js';
|
|
36
|
+
export { SyncLogManager, type ChangeLogEntry as SyncLogChange, type ConflictEntry as SyncLogConflict, } from './tables/syncLogManager.js';
|
|
37
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
* const changes = await syncLog.getChangesSince(remoteVectorClock);
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
|
-
import type { StorageAdapter } from '../../../core/contracts';
|
|
26
|
-
import type { VectorClockData } from '../protocol/vectorClock';
|
|
27
|
-
import { VectorClock } from '../protocol/vectorClock';
|
|
28
|
-
import type { ChangeRecord, ChangeOperation, DeviceInfo, DeviceType } from '../protocol/messages';
|
|
25
|
+
import type { StorageAdapter } from '../../../core/contracts/index.js';
|
|
26
|
+
import type { VectorClockData } from '../protocol/vectorClock.js';
|
|
27
|
+
import { VectorClock } from '../protocol/vectorClock.js';
|
|
28
|
+
import type { ChangeRecord, ChangeOperation, DeviceInfo, DeviceType } from '../protocol/messages.js';
|
|
29
29
|
/**
|
|
30
30
|
* Change log entry as stored in database.
|
|
31
31
|
*/
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
|
-
import { BaseTransport, type TransportOptions } from './transport';
|
|
10
|
-
import type { SyncMessage } from '../protocol/messages';
|
|
9
|
+
import { BaseTransport, type TransportOptions } from './transport.js';
|
|
10
|
+
import type { SyncMessage } from '../protocol/messages.js';
|
|
11
11
|
/**
|
|
12
12
|
* HTTP-specific transport options.
|
|
13
13
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
|
-
export * from './transport';
|
|
10
|
-
export * from './websocketTransport';
|
|
11
|
-
export * from './httpTransport';
|
|
9
|
+
export * from './transport.js';
|
|
10
|
+
export * from './websocketTransport.js';
|
|
11
|
+
export * from './httpTransport.js';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
|
-
import { BaseTransport, type TransportOptions } from './transport';
|
|
10
|
-
import type { SyncMessage } from '../protocol/messages';
|
|
9
|
+
import { BaseTransport, type TransportOptions } from './transport.js';
|
|
10
|
+
import type { SyncMessage } from '../protocol/messages.js';
|
|
11
11
|
/**
|
|
12
12
|
* WebSocket-specific transport options.
|
|
13
13
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
export * from './types';
|
|
2
|
-
export * from './core/database';
|
|
3
|
-
export * from './core/resolver';
|
|
4
|
-
export * from './adapters/betterSqliteAdapter';
|
|
5
|
-
export * from './adapters/sqlJsAdapter';
|
|
6
|
-
export * from './adapters/indexedDbAdapter';
|
|
7
|
-
export * from './adapters/capacitorSqliteAdapter';
|
|
8
|
-
export * from './adapters/postgresAdapter';
|
|
9
|
-
export * from './adapters/supabase';
|
|
10
|
-
export * from './adapters/baseStorageAdapter';
|
|
11
|
-
export * from './features/backup/cloudBackup';
|
|
12
|
-
export * from './features/migrations/dataExport';
|
|
13
|
-
export * from './features/migrations/dataImport';
|
|
14
|
-
export * from './features/migrations/migration';
|
|
15
|
-
export * from './features/sync/syncManager';
|
|
16
|
-
export * from './shared/parameterUtils';
|
|
17
|
-
export { SqliteDialect } from './dialects/SqliteDialect';
|
|
18
|
-
export { PostgresDialect } from './dialects/PostgresDialect';
|
|
19
|
-
export { SqliteFts5 } from './fts/SqliteFts5';
|
|
20
|
-
export { PostgresFts } from './fts/PostgresFts';
|
|
21
|
-
export { NodeBlobCodec } from './codecs/NodeBlobCodec';
|
|
22
|
-
export { BrowserBlobCodec } from './codecs/BrowserBlobCodec';
|
|
23
|
-
export { SqliteFileExporter } from './exporters/SqliteFileExporter';
|
|
24
|
-
export { PostgresExporter } from './exporters/PostgresExporter';
|
|
25
|
-
export { createStorageFeatures } from './core/contracts/features';
|
|
1
|
+
export * from './types/index.js';
|
|
2
|
+
export * from './core/database.js';
|
|
3
|
+
export * from './core/resolver.js';
|
|
4
|
+
export * from './adapters/betterSqliteAdapter.js';
|
|
5
|
+
export * from './adapters/sqlJsAdapter.js';
|
|
6
|
+
export * from './adapters/indexedDbAdapter.js';
|
|
7
|
+
export * from './adapters/capacitorSqliteAdapter.js';
|
|
8
|
+
export * from './adapters/postgresAdapter.js';
|
|
9
|
+
export * from './adapters/supabase.js';
|
|
10
|
+
export * from './adapters/baseStorageAdapter.js';
|
|
11
|
+
export * from './features/backup/cloudBackup.js';
|
|
12
|
+
export * from './features/migrations/dataExport.js';
|
|
13
|
+
export * from './features/migrations/dataImport.js';
|
|
14
|
+
export * from './features/migrations/migration.js';
|
|
15
|
+
export * from './features/sync/syncManager.js';
|
|
16
|
+
export * from './shared/parameterUtils.js';
|
|
17
|
+
export { SqliteDialect } from './dialects/SqliteDialect.js';
|
|
18
|
+
export { PostgresDialect } from './dialects/PostgresDialect.js';
|
|
19
|
+
export { SqliteFts5 } from './fts/SqliteFts5.js';
|
|
20
|
+
export { PostgresFts } from './fts/PostgresFts.js';
|
|
21
|
+
export { NodeBlobCodec } from './codecs/NodeBlobCodec.js';
|
|
22
|
+
export { BrowserBlobCodec } from './codecs/BrowserBlobCodec.js';
|
|
23
|
+
export { SqliteFileExporter } from './exporters/SqliteFileExporter.js';
|
|
24
|
+
export { PostgresExporter } from './exporters/PostgresExporter.js';
|
|
25
|
+
export { createStorageFeatures } from './core/contracts/features.js';
|
|
26
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StorageAdapter } from '../core/contracts';
|
|
1
|
+
import type { StorageAdapter } from '../core/contracts/index.js';
|
|
2
2
|
/** Function that runs one asynchronous operation after earlier operations finish. */
|
|
3
3
|
export type SerializedTransactionRunner = <T>(operation: () => Promise<T>) => Promise<T>;
|
|
4
4
|
/**
|
package/dist/types/index.d.ts
CHANGED
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
* } from '@framers/sql-storage-adapter/types';
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
export * from '../core/contracts';
|
|
23
|
-
export * from '../core/contracts/context';
|
|
24
|
-
export * from '../core/contracts/events';
|
|
25
|
-
export * from '../core/contracts/extensions';
|
|
26
|
-
export * from '../core/contracts/limitations';
|
|
27
|
-
export * from '../core/contracts/performance';
|
|
28
|
-
export * from '../core/contracts/hooks';
|
|
22
|
+
export * from '../core/contracts/index.js';
|
|
23
|
+
export * from '../core/contracts/context.js';
|
|
24
|
+
export * from '../core/contracts/events.js';
|
|
25
|
+
export * from '../core/contracts/extensions.js';
|
|
26
|
+
export * from '../core/contracts/limitations.js';
|
|
27
|
+
export * from '../core/contracts/performance.js';
|
|
28
|
+
export * from '../core/contracts/hooks.js';
|
|
29
29
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED