@pol-studios/powersync 1.0.6 → 1.0.7
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/dist/CacheSettingsManager-1exbOC6S.d.ts +261 -0
- package/dist/attachments/index.d.ts +65 -355
- package/dist/attachments/index.js +24 -6
- package/dist/{types-Cd7RhNqf.d.ts → background-sync-ChCXW-EV.d.ts} +53 -2
- package/dist/chunk-4C3RY5SU.js +204 -0
- package/dist/chunk-4C3RY5SU.js.map +1 -0
- package/dist/{chunk-3AYXHQ4W.js → chunk-53WH2JJV.js} +111 -47
- package/dist/chunk-53WH2JJV.js.map +1 -0
- package/dist/chunk-A4IBBWGO.js +377 -0
- package/dist/chunk-A4IBBWGO.js.map +1 -0
- package/dist/chunk-BREGB4WL.js +1768 -0
- package/dist/chunk-BREGB4WL.js.map +1 -0
- package/dist/{chunk-EJ23MXPQ.js → chunk-CGL33PL4.js} +3 -1
- package/dist/chunk-CGL33PL4.js.map +1 -0
- package/dist/chunk-DGUM43GV.js +11 -0
- package/dist/chunk-DHYUBVP7.js +131 -0
- package/dist/chunk-DHYUBVP7.js.map +1 -0
- package/dist/chunk-FV2HXEIY.js +124 -0
- package/dist/chunk-FV2HXEIY.js.map +1 -0
- package/dist/chunk-GKF7TOMT.js +1 -0
- package/dist/{chunk-R4YFWQ3Q.js → chunk-H772V6XQ.js} +304 -51
- package/dist/chunk-H772V6XQ.js.map +1 -0
- package/dist/{chunk-62J2DPKX.js → chunk-HFOFLW5F.js} +396 -412
- package/dist/chunk-HFOFLW5F.js.map +1 -0
- package/dist/chunk-KGSFAE5B.js +1 -0
- package/dist/chunk-LNL64IJZ.js +1 -0
- package/dist/chunk-MKD2VCX3.js +32 -0
- package/dist/chunk-MKD2VCX3.js.map +1 -0
- package/dist/{chunk-7EMDVIZX.js → chunk-N75DEF5J.js} +19 -1
- package/dist/chunk-N75DEF5J.js.map +1 -0
- package/dist/chunk-P6WOZO7H.js +49 -0
- package/dist/chunk-P6WOZO7H.js.map +1 -0
- package/dist/chunk-TGBT5XBE.js +1 -0
- package/dist/chunk-TGBT5XBE.js.map +1 -0
- package/dist/chunk-UEYRTLKE.js +72 -0
- package/dist/chunk-UEYRTLKE.js.map +1 -0
- package/dist/chunk-WGHNIAF7.js +329 -0
- package/dist/chunk-WGHNIAF7.js.map +1 -0
- package/dist/chunk-WQ5MPAVC.js +449 -0
- package/dist/chunk-WQ5MPAVC.js.map +1 -0
- package/dist/{chunk-FPTDATY5.js → chunk-XQAJM2MW.js} +22 -11
- package/dist/chunk-XQAJM2MW.js.map +1 -0
- package/dist/chunk-YSTEESEG.js +676 -0
- package/dist/chunk-YSTEESEG.js.map +1 -0
- package/dist/chunk-ZEOKPWUC.js +1165 -0
- package/dist/chunk-ZEOKPWUC.js.map +1 -0
- package/dist/connector/index.d.ts +182 -3
- package/dist/connector/index.js +12 -4
- package/dist/core/index.d.ts +5 -3
- package/dist/core/index.js +5 -2
- package/dist/error/index.d.ts +54 -0
- package/dist/error/index.js +8 -0
- package/dist/error/index.js.map +1 -0
- package/dist/index.d.ts +100 -12
- package/dist/index.js +148 -38
- package/dist/index.native.d.ts +20 -10
- package/dist/index.native.js +148 -39
- package/dist/index.web.d.ts +20 -10
- package/dist/index.web.js +149 -39
- package/dist/maintenance/index.d.ts +118 -0
- package/dist/maintenance/index.js +17 -0
- package/dist/maintenance/index.js.map +1 -0
- package/dist/platform/index.d.ts +16 -1
- package/dist/platform/index.js +2 -0
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/index.native.d.ts +2 -2
- package/dist/platform/index.native.js +2 -1
- package/dist/platform/index.web.d.ts +1 -1
- package/dist/platform/index.web.js +2 -1
- package/dist/pol-attachment-queue-C7YNXXhK.d.ts +676 -0
- package/dist/provider/index.d.ts +447 -21
- package/dist/provider/index.js +33 -13
- package/dist/storage/index.d.ts +6 -0
- package/dist/storage/index.js +28 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/index.native.d.ts +6 -0
- package/dist/storage/index.native.js +26 -0
- package/dist/storage/index.native.js.map +1 -0
- package/dist/storage/index.web.d.ts +6 -0
- package/dist/storage/index.web.js +26 -0
- package/dist/storage/index.web.js.map +1 -0
- package/dist/storage/upload/index.d.ts +55 -0
- package/dist/storage/upload/index.js +15 -0
- package/dist/storage/upload/index.js.map +1 -0
- package/dist/storage/upload/index.native.d.ts +57 -0
- package/dist/storage/upload/index.native.js +14 -0
- package/dist/storage/upload/index.native.js.map +1 -0
- package/dist/storage/upload/index.web.d.ts +5 -0
- package/dist/storage/upload/index.web.js +14 -0
- package/dist/storage/upload/index.web.js.map +1 -0
- package/dist/{index-l3iL9Jte.d.ts → supabase-connector-qLm-WHkM.d.ts} +90 -25
- package/dist/sync/index.d.ts +288 -23
- package/dist/sync/index.js +22 -10
- package/dist/types-BVacP54t.d.ts +52 -0
- package/dist/types-Bgvx7-E8.d.ts +187 -0
- package/dist/{types-afHtE1U_.d.ts → types-CDqWh56B.d.ts} +2 -0
- package/package.json +72 -2
- package/dist/chunk-32OLICZO.js +0 -1
- package/dist/chunk-3AYXHQ4W.js.map +0 -1
- package/dist/chunk-5FIMA26D.js +0 -1
- package/dist/chunk-62J2DPKX.js.map +0 -1
- package/dist/chunk-7EMDVIZX.js.map +0 -1
- package/dist/chunk-EJ23MXPQ.js.map +0 -1
- package/dist/chunk-FPTDATY5.js.map +0 -1
- package/dist/chunk-KCDG2MNP.js +0 -1431
- package/dist/chunk-KCDG2MNP.js.map +0 -1
- package/dist/chunk-OLHGI472.js +0 -1
- package/dist/chunk-PAFBKNL3.js +0 -99
- package/dist/chunk-PAFBKNL3.js.map +0 -1
- package/dist/chunk-R4YFWQ3Q.js.map +0 -1
- package/dist/chunk-V6LJ6MR2.js +0 -740
- package/dist/chunk-V6LJ6MR2.js.map +0 -1
- package/dist/chunk-VJCL2SWD.js +0 -1
- package/dist/failed-upload-store-C0cLxxPz.d.ts +0 -33
- /package/dist/{chunk-32OLICZO.js.map → chunk-DGUM43GV.js.map} +0 -0
- /package/dist/{chunk-5FIMA26D.js.map → chunk-GKF7TOMT.js.map} +0 -0
- /package/dist/{chunk-OLHGI472.js.map → chunk-KGSFAE5B.js.map} +0 -0
- /package/dist/{chunk-VJCL2SWD.js.map → chunk-LNL64IJZ.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,27 @@
|
|
|
1
|
-
import { A as AbstractPowerSyncDatabase } from './types-
|
|
2
|
-
export { k as CacheStats, i as ClassifiedError, j as CompactResult, h as CompletedTransaction, b as ConnectionHealth, o as CountRow, C as CrudEntry, l as CrudTransaction, n as DbStatRow, D as DownloadProgress, E as EntitySyncState, F as FailedTransaction, r as FreelistCountRow, s as IntegrityCheckRow, I as IntegrityResult, q as PageCountRow, p as PageSizeRow, P as PowerSyncBackendConnector, m as SqliteTableRow, c as StorageInfo, d as StorageQuota, f as SyncError, g as SyncErrorType, e as SyncMetrics, S as SyncMode, a as SyncStatus, T as TableCacheStats } from './types-
|
|
3
|
-
export { ATTACHMENT_DOWNLOAD_TIMEOUT_MS, ATTACHMENT_RETRY_DELAY_MS, AttachmentError, COMPRESSION_MAX_WIDTH, COMPRESSION_SKIP_SIZE_BYTES, COMPRESSION_TARGET_SIZE_BYTES, ConfigurationError, ConnectorError, DEFAULT_ATTACHMENT_CACHE_SIZE, DEFAULT_ATTACHMENT_CONCURRENCY, DEFAULT_COMPRESSION_QUALITY, DEFAULT_MAX_RETRY_ATTEMPTS, DEFAULT_RETRY_BACKOFF_MULTIPLIER, DEFAULT_RETRY_BASE_DELAY_MS, DEFAULT_RETRY_MAX_DELAY_MS, DEFAULT_SYNC_INTERVAL_MS, DEFAULT_SYNC_MODE, DOWNLOAD_STOP_THRESHOLD, EVICTION_TRIGGER_THRESHOLD, HEALTH_CHECK_INTERVAL_MS, HEALTH_CHECK_TIMEOUT_MS, InitializationError, LATENCY_DEGRADED_THRESHOLD_MS, MAX_CONSECUTIVE_FAILURES, PlatformAdapterError, PowerSyncError, STATS_CACHE_TTL_MS, STATUS_NOTIFY_THROTTLE_MS, STORAGE_CRITICAL_THRESHOLD, STORAGE_KEY_ATTACHMENT_SETTINGS, STORAGE_KEY_ENABLED, STORAGE_KEY_METRICS, STORAGE_KEY_PAUSED, STORAGE_KEY_PREFIX, STORAGE_KEY_SYNC_MODE, STORAGE_WARNING_THRESHOLD, SyncOperationError, classifyError, classifySupabaseError, createSyncError, extractEntityIds, extractTableNames, generateFailureId, toSyncOperationError } from './core/index.js';
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export { e as
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
1
|
+
import { A as AbstractPowerSyncDatabase } from './types-CDqWh56B.js';
|
|
2
|
+
export { k as CacheStats, i as ClassifiedError, j as CompactResult, h as CompletedTransaction, b as ConnectionHealth, o as CountRow, C as CrudEntry, l as CrudTransaction, n as DbStatRow, D as DownloadProgress, E as EntitySyncState, F as FailedTransaction, r as FreelistCountRow, s as IntegrityCheckRow, I as IntegrityResult, q as PageCountRow, p as PageSizeRow, P as PowerSyncBackendConnector, m as SqliteTableRow, c as StorageInfo, d as StorageQuota, f as SyncError, g as SyncErrorType, e as SyncMetrics, S as SyncMode, a as SyncStatus, T as TableCacheStats } from './types-CDqWh56B.js';
|
|
3
|
+
export { ATTACHMENT_DOWNLOAD_TIMEOUT_MS, ATTACHMENT_RETRY_DELAY_MS, AttachmentError, COMPRESSION_MAX_WIDTH, COMPRESSION_SKIP_SIZE_BYTES, COMPRESSION_TARGET_SIZE_BYTES, ConfigurationError, ConnectorError, DEFAULT_ATTACHMENT_CACHE_SIZE, DEFAULT_ATTACHMENT_CONCURRENCY, DEFAULT_COMPRESSION_QUALITY, DEFAULT_MAX_RETRY_ATTEMPTS, DEFAULT_RETRY_BACKOFF_MULTIPLIER, DEFAULT_RETRY_BASE_DELAY_MS, DEFAULT_RETRY_MAX_DELAY_MS, DEFAULT_SYNC_INTERVAL_MS, DEFAULT_SYNC_MODE, DOWNLOAD_STOP_THRESHOLD, EVICTION_TRIGGER_THRESHOLD, HEALTH_CHECK_INTERVAL_MS, HEALTH_CHECK_TIMEOUT_MS, InitializationError, LATENCY_DEGRADED_THRESHOLD_MS, MAX_CONSECUTIVE_FAILURES, PlatformAdapterError, PowerSyncError, STATS_CACHE_TTL_MS, STATUS_NOTIFY_THROTTLE_MS, STORAGE_CRITICAL_THRESHOLD, STORAGE_KEY_ATTACHMENT_SETTINGS, STORAGE_KEY_AUTO_OFFLINE, STORAGE_KEY_ENABLED, STORAGE_KEY_METRICS, STORAGE_KEY_PAUSED, STORAGE_KEY_PREFIX, STORAGE_KEY_SYNC_MODE, STORAGE_WARNING_THRESHOLD, SyncOperationError, classifyError, classifySupabaseError, createSyncError, extractEntityIds, extractTableNames, generateFailureId, toSyncOperationError } from './core/index.js';
|
|
4
|
+
import { k as ConflictDetectionConfig, h as ConflictCheckResult } from './supabase-connector-qLm-WHkM.js';
|
|
5
|
+
export { g as ConflictBus, j as ConflictHandler, l as ConflictListener, i as ConflictResolution, C as ConnectorCircuitBreakerConfig, b as ConnectorConfig, e as CrudHandler, D as DEFAULT_RETRY_CONFIG, F as FieldConflict, P as PowerSyncCredentials, m as ResolutionListener, f as RetryConfig, R as RetryStrategyConfig, c as SchemaRouter, S as SupabaseConnector, a as SupabaseConnectorOptions, d as defaultSchemaRouter } from './supabase-connector-qLm-WHkM.js';
|
|
6
|
+
export { CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitOpenError, CircuitState, DEFAULT_CIRCUIT_BREAKER_CONFIG } from './connector/index.js';
|
|
7
|
+
export { t as AttachmentRecord, A as AttachmentSourceConfig, q as AttachmentStatsRow, e as AttachmentStorageAdapter, p as AttachmentSyncStats, o as AttachmentSyncStatus, h as CacheConfig, r as CacheFileRow, s as CachedSizeRow, C as CompressionConfig, i as DEFAULT_CACHE_CONFIG, D as DEFAULT_COMPRESSION_CONFIG, f as DEFAULT_UPLOAD_CONFIG, k as DownloadPhase, l as DownloadStatus, E as EvictRow, I as IdRow, P as PolAttachmentQueue, j as PolAttachmentQueueConfig, a as PolAttachmentQueueOptions, d as PolAttachmentRecord, b as PolAttachmentState, U as UploadConfig, g as UploadHandler, m as UploadPhase, n as UploadStatus, c as createPolAttachmentQueue } from './pol-attachment-queue-C7YNXXhK.js';
|
|
8
|
+
export { PolStorageAdapter, PolStorageAdapterOptions } from './attachments/index.js';
|
|
9
|
+
export { B as BackgroundSyncOptions, h as BackgroundSyncSystem, e as HealthCheckResult, H as HealthMonitorOptions, M as MetricsCollectorOptions, P as PowerSyncRawStatus, c as SyncControlActions, f as SyncEvent, g as SyncEventListener, d as SyncOperationData, S as SyncScope, a as SyncStatusState, b as SyncStatusTrackerOptions, U as Unsubscribe, i as defineBackgroundSyncTask, j as initializeBackgroundSync, k as isBackgroundSyncRegistered, r as registerBackgroundSync, u as unregisterBackgroundSync } from './background-sync-ChCXW-EV.js';
|
|
10
|
+
export { DeadLetterEntry, DeadLetterQueue, DeadLetterQueueListener, DeadLetterQueueOptions, DeadLetterReason, HealthMonitor, MetricsCollector, SyncStatusTracker, createDeadLetterEntry, generateDLQEntryId } from './sync/index.js';
|
|
10
11
|
import { SupabaseClient } from '@supabase/supabase-js';
|
|
11
|
-
export {
|
|
12
|
+
export { DatabaseMaintenanceUtils, checkIntegrityImpl, checkStorageQuotaImpl, compactDatabaseImpl, getCacheStatsImpl, useDatabaseMaintenance } from './maintenance/index.js';
|
|
13
|
+
export { A as AttachmentUploadHandler, a as BucketConfig, B as BucketResolver, D as DownloadResult, P as PowerSyncStorageAdapter, R as RemoteStorageAdapter, S as StorageUploadHandler, b as SupabaseStorageAdapterOptions, U as UploadOptions, r as resolveBucketFromConfig } from './types-Bgvx7-E8.js';
|
|
14
|
+
export { a as CacheSettings, C as CacheSettingsManager, b as CacheSettingsManagerOptions, D as DEFAULT_CACHE_SETTINGS, S as SupabaseStorageAdapter, c as createSupabaseStorageAdapter } from './CacheSettingsManager-1exbOC6S.js';
|
|
15
|
+
export { D as DEFAULT_UPLOAD_NOTIFICATION, S as SupabaseUploadHandlerOptions, U as UploadEventHandlers, a as UploadNotificationConfig } from './types-BVacP54t.js';
|
|
16
|
+
export { SupabaseUploadHandler, createSupabaseUploadHandler } from './storage/upload/index.js';
|
|
17
|
+
export { PowerSyncErrorBoundary } from './error/index.js';
|
|
18
|
+
export { AttachmentQueueContext, BackgroundSyncCallbacks, BackgroundSyncConfig, BackgroundSyncStatus, CompletedTransactionsContext, CompletedTransactionsContextValue, ConnectionHealthContext, ConnectionHealthContextValue, ConnectionStatusContext, ConnectionStatusContextValue, DEFAULT_CONNECTION_HEALTH, DEFAULT_SYNC_CONFIG, DEFAULT_SYNC_METRICS, DEFAULT_SYNC_STATUS, DataLayerConfig, DataLayerIntegration, EntitySyncStatusResult, FailedTransactionsContext, FailedTransactionsContextValue, OfflineDataAttachmentConfig, OfflineDataProvider, OfflineDataProviderConfig, OfflineDataProviderProps, PendingMutationsContext, PendingMutationsContextValue, PowerSyncConfig, PowerSyncContext, PowerSyncContextValue, PowerSyncProvider, PowerSyncProviderProps, PowerSyncSyncStatusSnapshot, ProviderBridge, ProviderBridgeProps, SyncActivityContext, SyncActivityContextValue, SyncActivityResult, SyncConfig, SyncMetricsContext, SyncMetricsContextValue, SyncModeContext, SyncModeContextValue, SyncStatusContext, SyncStatusContextValue, UploadStatusResult, useAttachmentQueue, useAttachmentQueueReady, useCompletedTransactions, useCompletedTransactionsContext, useConnectionHealth, useConnectionStatus, useDatabase, useDownloadProgress, useEntitySyncStatus, useFailedTransactions, useFailedTransactionsContext, useIsSyncing, useOnlineStatus, usePendingMutations, usePendingMutationsContext, usePlatform, usePowerSync, useSyncActivity, useSyncActivityContext, useSyncControl, useSyncMetrics, useSyncMode, useSyncModeContext, useSyncStatus, useUploadStatus } from './provider/index.js';
|
|
12
19
|
export { AsyncStorageAdapter, CompressedImage, CompressionOptions, ConnectionType, DatabaseOptions, FileInfo, FileSystemAdapter, ImageProcessorAdapter, LoggerAdapter, NetworkAdapter, PlatformAdapter, PlatformType, detectPlatform } from './platform/index.js';
|
|
13
|
-
|
|
20
|
+
export { ATTACHMENT_TABLE, AbstractAttachmentQueue, AttachmentState, AttachmentTable, AttachmentTableOptions, AttachmentQueueOptions as BaseAttachmentQueueOptions, DEFAULT_ATTACHMENT_QUEUE_OPTIONS, EncodingType, AttachmentRecord as OfficialAttachmentRecord, StorageAdapter } from '@powersync/attachments';
|
|
21
|
+
import '@powersync/common';
|
|
14
22
|
import 'react';
|
|
23
|
+
import '@tanstack/react-query';
|
|
24
|
+
import '@powersync/react-native';
|
|
15
25
|
|
|
16
26
|
/**
|
|
17
27
|
* Exponential backoff retry utilities for resilient network operations.
|
|
@@ -150,6 +160,74 @@ declare const DEFAULT_BACKOFF_CONFIG: BackoffConfig;
|
|
|
150
160
|
*/
|
|
151
161
|
declare function withExponentialBackoff<T>(fn: () => Promise<T>, config: BackoffConfig, options?: BackoffOptions): Promise<T>;
|
|
152
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Format bytes to human-readable string
|
|
165
|
+
*
|
|
166
|
+
* @param bytes - Number of bytes to format
|
|
167
|
+
* @param decimals - Number of decimal places (default: 2)
|
|
168
|
+
* @returns Formatted string like "1.5 MB", "256 KB", etc.
|
|
169
|
+
*/
|
|
170
|
+
declare function formatBytes(bytes: number, decimals?: number): string;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* MIME Type Utilities for @pol-studios/powersync
|
|
174
|
+
*
|
|
175
|
+
* Provides file extension to MIME type mapping for storage operations.
|
|
176
|
+
*/
|
|
177
|
+
/**
|
|
178
|
+
* Get MIME type from file extension.
|
|
179
|
+
*
|
|
180
|
+
* @param extension - File extension (with or without leading dot)
|
|
181
|
+
* @returns MIME type string
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```typescript
|
|
185
|
+
* getMimeType('jpg'); // 'image/jpeg'
|
|
186
|
+
* getMimeType('.png'); // 'image/png'
|
|
187
|
+
* getMimeType('unknown'); // 'application/octet-stream'
|
|
188
|
+
* getMimeType(undefined); // 'application/octet-stream'
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
declare function getMimeType(extension: string | undefined | null): string;
|
|
192
|
+
/**
|
|
193
|
+
* Get MIME type from a file path or filename.
|
|
194
|
+
*
|
|
195
|
+
* @param filePath - Full file path or filename
|
|
196
|
+
* @returns MIME type string
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```typescript
|
|
200
|
+
* getMimeTypeFromPath('/path/to/image.jpg'); // 'image/jpeg'
|
|
201
|
+
* getMimeTypeFromPath('document.pdf'); // 'application/pdf'
|
|
202
|
+
* getMimeTypeFromPath('file-without-extension'); // 'application/octet-stream'
|
|
203
|
+
* ```
|
|
204
|
+
*/
|
|
205
|
+
declare function getMimeTypeFromPath(filePath: string | undefined | null): string;
|
|
206
|
+
/**
|
|
207
|
+
* Check if a MIME type represents an image.
|
|
208
|
+
*/
|
|
209
|
+
declare function isImageMimeType(mimeType: string): boolean;
|
|
210
|
+
/**
|
|
211
|
+
* Check if a MIME type represents a video.
|
|
212
|
+
*/
|
|
213
|
+
declare function isVideoMimeType(mimeType: string): boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Check if a MIME type represents audio.
|
|
216
|
+
*/
|
|
217
|
+
declare function isAudioMimeType(mimeType: string): boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Check if a MIME type represents a document (PDF, Office, etc.).
|
|
220
|
+
*/
|
|
221
|
+
declare function isDocumentMimeType(mimeType: string): boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Get file extension from MIME type (reverse lookup).
|
|
224
|
+
* Returns the most common extension for the given MIME type.
|
|
225
|
+
*
|
|
226
|
+
* @param mimeType - MIME type string
|
|
227
|
+
* @returns File extension without leading dot, or undefined if unknown
|
|
228
|
+
*/
|
|
229
|
+
declare function getExtensionFromMimeType(mimeType: string): string | undefined;
|
|
230
|
+
|
|
153
231
|
/**
|
|
154
232
|
* Conflict Detection for @pol-studios/powersync
|
|
155
233
|
*
|
|
@@ -157,6 +235,16 @@ declare function withExponentialBackoff<T>(fn: () => Promise<T>, config: Backoff
|
|
|
157
235
|
* Only queries AuditLog when version mismatch is detected.
|
|
158
236
|
*/
|
|
159
237
|
|
|
238
|
+
/**
|
|
239
|
+
* Error thrown when conflict detection fails due to external issues
|
|
240
|
+
* (e.g., AuditLog query failure). Callers should handle this and decide
|
|
241
|
+
* whether to retry, fail the sync, or escalate to the user.
|
|
242
|
+
*/
|
|
243
|
+
declare class ConflictDetectionError extends Error {
|
|
244
|
+
constructor(message: string, options?: {
|
|
245
|
+
cause?: unknown;
|
|
246
|
+
});
|
|
247
|
+
}
|
|
160
248
|
/**
|
|
161
249
|
* Detect conflicts between local pending changes and server state.
|
|
162
250
|
*
|
|
@@ -202,4 +290,4 @@ declare function fetchServerVersion(table: string, recordId: string, schema: str
|
|
|
202
290
|
*/
|
|
203
291
|
declare function getLocalVersion(table: string, recordId: string, db: AbstractPowerSyncDatabase): Promise<number | null>;
|
|
204
292
|
|
|
205
|
-
export { AbortError, AbstractPowerSyncDatabase, type BackoffConfig, type BackoffOptions, ConflictCheckResult, ConflictDetectionConfig, DEFAULT_BACKOFF_CONFIG, RetryExhaustedError, addJitter, calculateBackoffDelay, detectConflicts, fetchServerVersion, getLocalVersion, hasVersionColumn, sleep, withExponentialBackoff };
|
|
293
|
+
export { AbortError, AbstractPowerSyncDatabase, type BackoffConfig, type BackoffOptions, ConflictCheckResult, ConflictDetectionConfig, ConflictDetectionError, DEFAULT_BACKOFF_CONFIG, RetryExhaustedError, addJitter, calculateBackoffDelay, detectConflicts, fetchServerVersion, formatBytes, getExtensionFromMimeType, getLocalVersion, getMimeType, getMimeTypeFromPath, hasVersionColumn, isAudioMimeType, isDocumentMimeType, isImageMimeType, isVideoMimeType, sleep, withExponentialBackoff };
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,78 @@
|
|
|
1
|
-
import "./chunk-
|
|
2
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-KGSFAE5B.js";
|
|
2
|
+
import "./chunk-GKF7TOMT.js";
|
|
3
|
+
import {
|
|
4
|
+
ConflictBus,
|
|
5
|
+
OfflineDataProvider,
|
|
6
|
+
PowerSyncProvider,
|
|
7
|
+
ProviderBridge
|
|
8
|
+
} from "./chunk-BREGB4WL.js";
|
|
9
|
+
import {
|
|
10
|
+
PowerSyncErrorBoundary
|
|
11
|
+
} from "./chunk-P6WOZO7H.js";
|
|
12
|
+
import {
|
|
13
|
+
ATTACHMENT_TABLE,
|
|
14
|
+
AbstractAttachmentQueue,
|
|
15
|
+
AttachmentState,
|
|
16
|
+
AttachmentTable,
|
|
17
|
+
DEFAULT_ATTACHMENT_QUEUE_OPTIONS,
|
|
18
|
+
DEFAULT_CACHE_CONFIG,
|
|
19
|
+
DEFAULT_COMPRESSION_CONFIG,
|
|
20
|
+
DEFAULT_UPLOAD_CONFIG,
|
|
21
|
+
EncodingType,
|
|
22
|
+
PolAttachmentQueue,
|
|
23
|
+
PolAttachmentState,
|
|
24
|
+
PolStorageAdapter,
|
|
25
|
+
createPolAttachmentQueue
|
|
26
|
+
} from "./chunk-ZEOKPWUC.js";
|
|
27
|
+
import {
|
|
28
|
+
DeadLetterQueue,
|
|
29
|
+
createDeadLetterEntry,
|
|
30
|
+
defineBackgroundSyncTask,
|
|
31
|
+
generateDLQEntryId,
|
|
32
|
+
initializeBackgroundSync,
|
|
33
|
+
isBackgroundSyncRegistered,
|
|
34
|
+
registerBackgroundSync,
|
|
35
|
+
unregisterBackgroundSync
|
|
36
|
+
} from "./chunk-A4IBBWGO.js";
|
|
37
|
+
import {
|
|
38
|
+
DEFAULT_CONNECTION_HEALTH,
|
|
39
|
+
DEFAULT_SYNC_CONFIG,
|
|
40
|
+
DEFAULT_SYNC_METRICS,
|
|
41
|
+
DEFAULT_SYNC_STATUS,
|
|
42
|
+
HealthMonitor,
|
|
43
|
+
MetricsCollector,
|
|
44
|
+
SyncStatusTracker
|
|
45
|
+
} from "./chunk-H772V6XQ.js";
|
|
46
|
+
import {
|
|
47
|
+
checkIntegrityImpl,
|
|
48
|
+
checkStorageQuotaImpl,
|
|
49
|
+
compactDatabaseImpl,
|
|
50
|
+
formatBytes,
|
|
51
|
+
getCacheStatsImpl,
|
|
52
|
+
useDatabaseMaintenance
|
|
53
|
+
} from "./chunk-WGHNIAF7.js";
|
|
3
54
|
import {
|
|
4
55
|
AttachmentQueueContext,
|
|
5
56
|
CompletedTransactionsContext,
|
|
6
|
-
ConflictBus,
|
|
7
57
|
ConnectionHealthContext,
|
|
8
58
|
ConnectionStatusContext,
|
|
9
59
|
FailedTransactionsContext,
|
|
10
60
|
PendingMutationsContext,
|
|
11
61
|
PowerSyncContext,
|
|
12
|
-
PowerSyncProvider,
|
|
13
62
|
SyncActivityContext,
|
|
14
63
|
SyncMetricsContext,
|
|
15
64
|
SyncModeContext,
|
|
16
65
|
SyncStatusContext,
|
|
17
66
|
useAttachmentQueue,
|
|
67
|
+
useAttachmentQueueReady,
|
|
68
|
+
useCompletedTransactions,
|
|
18
69
|
useCompletedTransactionsContext,
|
|
19
70
|
useConnectionHealth,
|
|
20
71
|
useConnectionStatus,
|
|
21
72
|
useDatabase,
|
|
22
73
|
useDownloadProgress,
|
|
23
74
|
useEntitySyncStatus,
|
|
75
|
+
useFailedTransactions,
|
|
24
76
|
useFailedTransactionsContext,
|
|
25
77
|
useIsSyncing,
|
|
26
78
|
useOnlineStatus,
|
|
@@ -36,24 +88,30 @@ import {
|
|
|
36
88
|
useSyncModeContext,
|
|
37
89
|
useSyncStatus,
|
|
38
90
|
useUploadStatus
|
|
39
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-YSTEESEG.js";
|
|
92
|
+
import "./chunk-LNL64IJZ.js";
|
|
40
93
|
import {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
94
|
+
CacheSettingsManager,
|
|
95
|
+
DEFAULT_CACHE_SETTINGS,
|
|
96
|
+
SupabaseStorageAdapter,
|
|
97
|
+
createSupabaseStorageAdapter,
|
|
98
|
+
getExtensionFromMimeType,
|
|
99
|
+
getMimeType,
|
|
100
|
+
getMimeTypeFromPath,
|
|
101
|
+
isAudioMimeType,
|
|
102
|
+
isDocumentMimeType,
|
|
103
|
+
isImageMimeType,
|
|
104
|
+
isVideoMimeType
|
|
105
|
+
} from "./chunk-WQ5MPAVC.js";
|
|
106
|
+
import "./chunk-TGBT5XBE.js";
|
|
48
107
|
import {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
} from "./chunk-R4YFWQ3Q.js";
|
|
108
|
+
SupabaseUploadHandler,
|
|
109
|
+
createSupabaseUploadHandler
|
|
110
|
+
} from "./chunk-UEYRTLKE.js";
|
|
111
|
+
import {
|
|
112
|
+
DEFAULT_UPLOAD_NOTIFICATION,
|
|
113
|
+
resolveBucketFromConfig
|
|
114
|
+
} from "./chunk-MKD2VCX3.js";
|
|
57
115
|
import "./chunk-W7HSR35B.js";
|
|
58
116
|
import {
|
|
59
117
|
ATTACHMENT_DOWNLOAD_TIMEOUT_MS,
|
|
@@ -80,34 +138,39 @@ import {
|
|
|
80
138
|
STATUS_NOTIFY_THROTTLE_MS,
|
|
81
139
|
STORAGE_CRITICAL_THRESHOLD,
|
|
82
140
|
STORAGE_KEY_ATTACHMENT_SETTINGS,
|
|
141
|
+
STORAGE_KEY_AUTO_OFFLINE,
|
|
83
142
|
STORAGE_KEY_ENABLED,
|
|
84
143
|
STORAGE_KEY_METRICS,
|
|
85
144
|
STORAGE_KEY_PAUSED,
|
|
86
145
|
STORAGE_KEY_PREFIX,
|
|
87
146
|
STORAGE_KEY_SYNC_MODE,
|
|
88
147
|
STORAGE_WARNING_THRESHOLD
|
|
89
|
-
} from "./chunk-
|
|
90
|
-
import "./chunk-
|
|
148
|
+
} from "./chunk-CGL33PL4.js";
|
|
149
|
+
import "./chunk-53WH2JJV.js";
|
|
91
150
|
import {
|
|
92
|
-
|
|
93
|
-
|
|
151
|
+
CircuitBreaker,
|
|
152
|
+
CircuitOpenError,
|
|
153
|
+
DEFAULT_CIRCUIT_BREAKER_CONFIG
|
|
154
|
+
} from "./chunk-4C3RY5SU.js";
|
|
155
|
+
import {
|
|
156
|
+
ConflictDetectionError,
|
|
94
157
|
DEFAULT_RETRY_CONFIG,
|
|
95
|
-
RetryExhaustedError,
|
|
96
158
|
SupabaseConnector,
|
|
97
|
-
addJitter,
|
|
98
|
-
calculateBackoffDelay,
|
|
99
159
|
defaultSchemaRouter,
|
|
100
160
|
detectConflicts,
|
|
101
161
|
fetchServerVersion,
|
|
102
162
|
getLocalVersion,
|
|
103
|
-
hasVersionColumn
|
|
163
|
+
hasVersionColumn
|
|
164
|
+
} from "./chunk-HFOFLW5F.js";
|
|
165
|
+
import {
|
|
166
|
+
AbortError,
|
|
167
|
+
DEFAULT_BACKOFF_CONFIG,
|
|
168
|
+
RetryExhaustedError,
|
|
169
|
+
addJitter,
|
|
170
|
+
calculateBackoffDelay,
|
|
104
171
|
sleep,
|
|
105
172
|
withExponentialBackoff
|
|
106
|
-
} from "./chunk-
|
|
107
|
-
import {
|
|
108
|
-
FailedUploadStore,
|
|
109
|
-
failedUploadStore
|
|
110
|
-
} from "./chunk-PAFBKNL3.js";
|
|
173
|
+
} from "./chunk-FV2HXEIY.js";
|
|
111
174
|
import {
|
|
112
175
|
AttachmentError,
|
|
113
176
|
ConfigurationError,
|
|
@@ -123,32 +186,41 @@ import {
|
|
|
123
186
|
extractTableNames,
|
|
124
187
|
generateFailureId,
|
|
125
188
|
toSyncOperationError
|
|
126
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-XQAJM2MW.js";
|
|
190
|
+
import "./chunk-DGUM43GV.js";
|
|
127
191
|
export {
|
|
128
192
|
ATTACHMENT_DOWNLOAD_TIMEOUT_MS,
|
|
129
193
|
ATTACHMENT_RETRY_DELAY_MS,
|
|
194
|
+
ATTACHMENT_TABLE,
|
|
130
195
|
AbortError,
|
|
196
|
+
AbstractAttachmentQueue,
|
|
131
197
|
AttachmentError,
|
|
132
|
-
AttachmentQueue,
|
|
133
198
|
AttachmentQueueContext,
|
|
134
199
|
AttachmentState,
|
|
200
|
+
AttachmentTable,
|
|
135
201
|
COMPRESSION_MAX_WIDTH,
|
|
136
202
|
COMPRESSION_SKIP_SIZE_BYTES,
|
|
137
203
|
COMPRESSION_TARGET_SIZE_BYTES,
|
|
204
|
+
CacheSettingsManager,
|
|
205
|
+
CircuitBreaker,
|
|
206
|
+
CircuitOpenError,
|
|
138
207
|
CompletedTransactionsContext,
|
|
139
208
|
ConfigurationError,
|
|
140
209
|
ConflictBus,
|
|
210
|
+
ConflictDetectionError,
|
|
141
211
|
ConnectionHealthContext,
|
|
142
212
|
ConnectionStatusContext,
|
|
143
213
|
ConnectorError,
|
|
144
214
|
DEFAULT_ATTACHMENT_CACHE_SIZE,
|
|
145
215
|
DEFAULT_ATTACHMENT_CONCURRENCY,
|
|
216
|
+
DEFAULT_ATTACHMENT_QUEUE_OPTIONS,
|
|
146
217
|
DEFAULT_BACKOFF_CONFIG,
|
|
147
218
|
DEFAULT_CACHE_CONFIG,
|
|
219
|
+
DEFAULT_CACHE_SETTINGS,
|
|
220
|
+
DEFAULT_CIRCUIT_BREAKER_CONFIG,
|
|
148
221
|
DEFAULT_COMPRESSION_CONFIG,
|
|
149
222
|
DEFAULT_COMPRESSION_QUALITY,
|
|
150
223
|
DEFAULT_CONNECTION_HEALTH,
|
|
151
|
-
DEFAULT_DOWNLOAD_CONFIG,
|
|
152
224
|
DEFAULT_MAX_RETRY_ATTEMPTS,
|
|
153
225
|
DEFAULT_RETRY_BACKOFF_MULTIPLIER,
|
|
154
226
|
DEFAULT_RETRY_BASE_DELAY_MS,
|
|
@@ -159,10 +231,13 @@ export {
|
|
|
159
231
|
DEFAULT_SYNC_METRICS,
|
|
160
232
|
DEFAULT_SYNC_MODE,
|
|
161
233
|
DEFAULT_SYNC_STATUS,
|
|
234
|
+
DEFAULT_UPLOAD_CONFIG,
|
|
235
|
+
DEFAULT_UPLOAD_NOTIFICATION,
|
|
162
236
|
DOWNLOAD_STOP_THRESHOLD,
|
|
237
|
+
DeadLetterQueue,
|
|
163
238
|
EVICTION_TRIGGER_THRESHOLD,
|
|
239
|
+
EncodingType,
|
|
164
240
|
FailedTransactionsContext,
|
|
165
|
-
FailedUploadStore,
|
|
166
241
|
HEALTH_CHECK_INTERVAL_MS,
|
|
167
242
|
HEALTH_CHECK_TIMEOUT_MS,
|
|
168
243
|
HealthMonitor,
|
|
@@ -170,16 +245,23 @@ export {
|
|
|
170
245
|
LATENCY_DEGRADED_THRESHOLD_MS,
|
|
171
246
|
MAX_CONSECUTIVE_FAILURES,
|
|
172
247
|
MetricsCollector,
|
|
248
|
+
OfflineDataProvider,
|
|
173
249
|
PendingMutationsContext,
|
|
174
250
|
PlatformAdapterError,
|
|
251
|
+
PolAttachmentQueue,
|
|
252
|
+
PolAttachmentState,
|
|
253
|
+
PolStorageAdapter,
|
|
175
254
|
PowerSyncContext,
|
|
176
255
|
PowerSyncError,
|
|
256
|
+
PowerSyncErrorBoundary,
|
|
177
257
|
PowerSyncProvider,
|
|
258
|
+
ProviderBridge,
|
|
178
259
|
RetryExhaustedError,
|
|
179
260
|
STATS_CACHE_TTL_MS,
|
|
180
261
|
STATUS_NOTIFY_THROTTLE_MS,
|
|
181
262
|
STORAGE_CRITICAL_THRESHOLD,
|
|
182
263
|
STORAGE_KEY_ATTACHMENT_SETTINGS,
|
|
264
|
+
STORAGE_KEY_AUTO_OFFLINE,
|
|
183
265
|
STORAGE_KEY_ENABLED,
|
|
184
266
|
STORAGE_KEY_METRICS,
|
|
185
267
|
STORAGE_KEY_PAUSED,
|
|
@@ -187,6 +269,8 @@ export {
|
|
|
187
269
|
STORAGE_KEY_SYNC_MODE,
|
|
188
270
|
STORAGE_WARNING_THRESHOLD,
|
|
189
271
|
SupabaseConnector,
|
|
272
|
+
SupabaseStorageAdapter,
|
|
273
|
+
SupabaseUploadHandler,
|
|
190
274
|
SyncActivityContext,
|
|
191
275
|
SyncMetricsContext,
|
|
192
276
|
SyncModeContext,
|
|
@@ -195,27 +279,53 @@ export {
|
|
|
195
279
|
SyncStatusTracker,
|
|
196
280
|
addJitter,
|
|
197
281
|
calculateBackoffDelay,
|
|
282
|
+
checkIntegrityImpl,
|
|
283
|
+
checkStorageQuotaImpl,
|
|
198
284
|
classifyError,
|
|
199
285
|
classifySupabaseError,
|
|
286
|
+
compactDatabaseImpl,
|
|
287
|
+
createDeadLetterEntry,
|
|
288
|
+
createPolAttachmentQueue,
|
|
289
|
+
createSupabaseStorageAdapter,
|
|
290
|
+
createSupabaseUploadHandler,
|
|
200
291
|
createSyncError,
|
|
201
292
|
defaultSchemaRouter,
|
|
293
|
+
defineBackgroundSyncTask,
|
|
202
294
|
detectConflicts,
|
|
203
295
|
extractEntityIds,
|
|
204
296
|
extractTableNames,
|
|
205
|
-
failedUploadStore,
|
|
206
297
|
fetchServerVersion,
|
|
298
|
+
formatBytes,
|
|
299
|
+
generateDLQEntryId,
|
|
207
300
|
generateFailureId,
|
|
301
|
+
getCacheStatsImpl,
|
|
302
|
+
getExtensionFromMimeType,
|
|
208
303
|
getLocalVersion,
|
|
304
|
+
getMimeType,
|
|
305
|
+
getMimeTypeFromPath,
|
|
209
306
|
hasVersionColumn,
|
|
307
|
+
initializeBackgroundSync,
|
|
308
|
+
isAudioMimeType,
|
|
309
|
+
isBackgroundSyncRegistered,
|
|
310
|
+
isDocumentMimeType,
|
|
311
|
+
isImageMimeType,
|
|
312
|
+
isVideoMimeType,
|
|
313
|
+
registerBackgroundSync,
|
|
314
|
+
resolveBucketFromConfig,
|
|
210
315
|
sleep,
|
|
211
316
|
toSyncOperationError,
|
|
317
|
+
unregisterBackgroundSync,
|
|
212
318
|
useAttachmentQueue,
|
|
319
|
+
useAttachmentQueueReady,
|
|
320
|
+
useCompletedTransactions,
|
|
213
321
|
useCompletedTransactionsContext,
|
|
214
322
|
useConnectionHealth,
|
|
215
323
|
useConnectionStatus,
|
|
216
324
|
useDatabase,
|
|
325
|
+
useDatabaseMaintenance,
|
|
217
326
|
useDownloadProgress,
|
|
218
327
|
useEntitySyncStatus,
|
|
328
|
+
useFailedTransactions,
|
|
219
329
|
useFailedTransactionsContext,
|
|
220
330
|
useIsSyncing,
|
|
221
331
|
useOnlineStatus,
|
package/dist/index.native.d.ts
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
export { A as AbstractPowerSyncDatabase, k as CacheStats, i as ClassifiedError, j as CompactResult, h as CompletedTransaction, b as ConnectionHealth, o as CountRow, C as CrudEntry, l as CrudTransaction, n as DbStatRow, D as DownloadProgress, E as EntitySyncState, F as FailedTransaction, r as FreelistCountRow, s as IntegrityCheckRow, I as IntegrityResult, q as PageCountRow, p as PageSizeRow, P as PowerSyncBackendConnector, m as SqliteTableRow, c as StorageInfo, d as StorageQuota, f as SyncError, g as SyncErrorType, e as SyncMetrics, S as SyncMode, a as SyncStatus, T as TableCacheStats } from './types-
|
|
2
|
-
export { ATTACHMENT_DOWNLOAD_TIMEOUT_MS, ATTACHMENT_RETRY_DELAY_MS, AttachmentError, COMPRESSION_MAX_WIDTH, COMPRESSION_SKIP_SIZE_BYTES, COMPRESSION_TARGET_SIZE_BYTES, ConfigurationError, ConnectorError, DEFAULT_ATTACHMENT_CACHE_SIZE, DEFAULT_ATTACHMENT_CONCURRENCY, DEFAULT_COMPRESSION_QUALITY, DEFAULT_MAX_RETRY_ATTEMPTS, DEFAULT_RETRY_BACKOFF_MULTIPLIER, DEFAULT_RETRY_BASE_DELAY_MS, DEFAULT_RETRY_MAX_DELAY_MS, DEFAULT_SYNC_INTERVAL_MS, DEFAULT_SYNC_MODE, DOWNLOAD_STOP_THRESHOLD, EVICTION_TRIGGER_THRESHOLD, HEALTH_CHECK_INTERVAL_MS, HEALTH_CHECK_TIMEOUT_MS, InitializationError, LATENCY_DEGRADED_THRESHOLD_MS, MAX_CONSECUTIVE_FAILURES, PlatformAdapterError, PowerSyncError, STATS_CACHE_TTL_MS, STATUS_NOTIFY_THROTTLE_MS, STORAGE_CRITICAL_THRESHOLD, STORAGE_KEY_ATTACHMENT_SETTINGS, STORAGE_KEY_ENABLED, STORAGE_KEY_METRICS, STORAGE_KEY_PAUSED, STORAGE_KEY_PREFIX, STORAGE_KEY_SYNC_MODE, STORAGE_WARNING_THRESHOLD, SyncOperationError, classifyError, classifySupabaseError, createSyncError, extractEntityIds, extractTableNames, generateFailureId, toSyncOperationError } from './core/index.js';
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export { e as
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
1
|
+
export { A as AbstractPowerSyncDatabase, k as CacheStats, i as ClassifiedError, j as CompactResult, h as CompletedTransaction, b as ConnectionHealth, o as CountRow, C as CrudEntry, l as CrudTransaction, n as DbStatRow, D as DownloadProgress, E as EntitySyncState, F as FailedTransaction, r as FreelistCountRow, s as IntegrityCheckRow, I as IntegrityResult, q as PageCountRow, p as PageSizeRow, P as PowerSyncBackendConnector, m as SqliteTableRow, c as StorageInfo, d as StorageQuota, f as SyncError, g as SyncErrorType, e as SyncMetrics, S as SyncMode, a as SyncStatus, T as TableCacheStats } from './types-CDqWh56B.js';
|
|
2
|
+
export { ATTACHMENT_DOWNLOAD_TIMEOUT_MS, ATTACHMENT_RETRY_DELAY_MS, AttachmentError, COMPRESSION_MAX_WIDTH, COMPRESSION_SKIP_SIZE_BYTES, COMPRESSION_TARGET_SIZE_BYTES, ConfigurationError, ConnectorError, DEFAULT_ATTACHMENT_CACHE_SIZE, DEFAULT_ATTACHMENT_CONCURRENCY, DEFAULT_COMPRESSION_QUALITY, DEFAULT_MAX_RETRY_ATTEMPTS, DEFAULT_RETRY_BACKOFF_MULTIPLIER, DEFAULT_RETRY_BASE_DELAY_MS, DEFAULT_RETRY_MAX_DELAY_MS, DEFAULT_SYNC_INTERVAL_MS, DEFAULT_SYNC_MODE, DOWNLOAD_STOP_THRESHOLD, EVICTION_TRIGGER_THRESHOLD, HEALTH_CHECK_INTERVAL_MS, HEALTH_CHECK_TIMEOUT_MS, InitializationError, LATENCY_DEGRADED_THRESHOLD_MS, MAX_CONSECUTIVE_FAILURES, PlatformAdapterError, PowerSyncError, STATS_CACHE_TTL_MS, STATUS_NOTIFY_THROTTLE_MS, STORAGE_CRITICAL_THRESHOLD, STORAGE_KEY_ATTACHMENT_SETTINGS, STORAGE_KEY_AUTO_OFFLINE, STORAGE_KEY_ENABLED, STORAGE_KEY_METRICS, STORAGE_KEY_PAUSED, STORAGE_KEY_PREFIX, STORAGE_KEY_SYNC_MODE, STORAGE_WARNING_THRESHOLD, SyncOperationError, classifyError, classifySupabaseError, createSyncError, extractEntityIds, extractTableNames, generateFailureId, toSyncOperationError } from './core/index.js';
|
|
3
|
+
export { g as ConflictBus, h as ConflictCheckResult, k as ConflictDetectionConfig, j as ConflictHandler, l as ConflictListener, i as ConflictResolution, C as ConnectorCircuitBreakerConfig, b as ConnectorConfig, e as CrudHandler, D as DEFAULT_RETRY_CONFIG, F as FieldConflict, P as PowerSyncCredentials, m as ResolutionListener, f as RetryConfig, R as RetryStrategyConfig, c as SchemaRouter, S as SupabaseConnector, a as SupabaseConnectorOptions, d as defaultSchemaRouter } from './supabase-connector-qLm-WHkM.js';
|
|
4
|
+
export { CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitOpenError, CircuitState, DEFAULT_CIRCUIT_BREAKER_CONFIG } from './connector/index.js';
|
|
5
|
+
export { t as AttachmentRecord, A as AttachmentSourceConfig, q as AttachmentStatsRow, e as AttachmentStorageAdapter, p as AttachmentSyncStats, o as AttachmentSyncStatus, h as CacheConfig, r as CacheFileRow, s as CachedSizeRow, C as CompressionConfig, i as DEFAULT_CACHE_CONFIG, D as DEFAULT_COMPRESSION_CONFIG, f as DEFAULT_UPLOAD_CONFIG, k as DownloadPhase, l as DownloadStatus, E as EvictRow, I as IdRow, P as PolAttachmentQueue, j as PolAttachmentQueueConfig, a as PolAttachmentQueueOptions, d as PolAttachmentRecord, b as PolAttachmentState, U as UploadConfig, g as UploadHandler, m as UploadPhase, n as UploadStatus, c as createPolAttachmentQueue } from './pol-attachment-queue-C7YNXXhK.js';
|
|
6
|
+
export { PolStorageAdapter, PolStorageAdapterOptions } from './attachments/index.js';
|
|
7
|
+
export { B as BackgroundSyncOptions, h as BackgroundSyncSystem, e as HealthCheckResult, H as HealthMonitorOptions, M as MetricsCollectorOptions, P as PowerSyncRawStatus, c as SyncControlActions, f as SyncEvent, g as SyncEventListener, d as SyncOperationData, S as SyncScope, a as SyncStatusState, b as SyncStatusTrackerOptions, U as Unsubscribe, i as defineBackgroundSyncTask, j as initializeBackgroundSync, k as isBackgroundSyncRegistered, r as registerBackgroundSync, u as unregisterBackgroundSync } from './background-sync-ChCXW-EV.js';
|
|
8
|
+
export { DeadLetterEntry, DeadLetterQueue, DeadLetterQueueListener, DeadLetterQueueOptions, DeadLetterReason, HealthMonitor, MetricsCollector, SyncStatusTracker, createDeadLetterEntry, generateDLQEntryId } from './sync/index.js';
|
|
9
|
+
export { AbortError, BackoffConfig, BackoffOptions, ConflictDetectionError, DEFAULT_BACKOFF_CONFIG, RetryExhaustedError, addJitter, calculateBackoffDelay, detectConflicts, fetchServerVersion, formatBytes, getExtensionFromMimeType, getLocalVersion, getMimeType, getMimeTypeFromPath, hasVersionColumn, isAudioMimeType, isDocumentMimeType, isImageMimeType, isVideoMimeType, sleep, withExponentialBackoff } from './index.js';
|
|
10
|
+
export { DatabaseMaintenanceUtils, checkIntegrityImpl, checkStorageQuotaImpl, compactDatabaseImpl, getCacheStatsImpl, useDatabaseMaintenance } from './maintenance/index.js';
|
|
11
|
+
export { A as AttachmentUploadHandler, a as BucketConfig, B as BucketResolver, D as DownloadResult, P as PowerSyncStorageAdapter, R as RemoteStorageAdapter, S as StorageUploadHandler, b as SupabaseStorageAdapterOptions, U as UploadOptions, r as resolveBucketFromConfig } from './types-Bgvx7-E8.js';
|
|
12
|
+
export { a as CacheSettings, C as CacheSettingsManager, b as CacheSettingsManagerOptions, D as DEFAULT_CACHE_SETTINGS, S as SupabaseStorageAdapter, c as createSupabaseStorageAdapter } from './CacheSettingsManager-1exbOC6S.js';
|
|
13
|
+
export { D as DEFAULT_UPLOAD_NOTIFICATION, S as SupabaseUploadHandlerOptions, U as UploadEventHandlers, a as UploadNotificationConfig } from './types-BVacP54t.js';
|
|
14
|
+
export { SupabaseUploadHandler, createSupabaseUploadHandler } from './storage/upload/index.js';
|
|
15
|
+
export { PowerSyncErrorBoundary } from './error/index.js';
|
|
16
|
+
export { AttachmentQueueContext, BackgroundSyncCallbacks, BackgroundSyncConfig, BackgroundSyncStatus, CompletedTransactionsContext, CompletedTransactionsContextValue, ConnectionHealthContext, ConnectionHealthContextValue, ConnectionStatusContext, ConnectionStatusContextValue, DEFAULT_CONNECTION_HEALTH, DEFAULT_SYNC_CONFIG, DEFAULT_SYNC_METRICS, DEFAULT_SYNC_STATUS, DataLayerConfig, DataLayerIntegration, EntitySyncStatusResult, FailedTransactionsContext, FailedTransactionsContextValue, OfflineDataAttachmentConfig, OfflineDataProvider, OfflineDataProviderConfig, OfflineDataProviderProps, PendingMutationsContext, PendingMutationsContextValue, PowerSyncConfig, PowerSyncContext, PowerSyncContextValue, PowerSyncProvider, PowerSyncProviderProps, PowerSyncSyncStatusSnapshot, ProviderBridge, ProviderBridgeProps, SyncActivityContext, SyncActivityContextValue, SyncActivityResult, SyncConfig, SyncMetricsContext, SyncMetricsContextValue, SyncModeContext, SyncModeContextValue, SyncStatusContext, SyncStatusContextValue, UploadStatusResult, useAttachmentQueue, useAttachmentQueueReady, useCompletedTransactions, useCompletedTransactionsContext, useConnectionHealth, useConnectionStatus, useDatabase, useDownloadProgress, useEntitySyncStatus, useFailedTransactions, useFailedTransactionsContext, useIsSyncing, useOnlineStatus, usePendingMutations, usePendingMutationsContext, usePlatform, usePowerSync, useSyncActivity, useSyncActivityContext, useSyncControl, useSyncMetrics, useSyncMode, useSyncModeContext, useSyncStatus, useUploadStatus } from './provider/index.js';
|
|
10
17
|
export { AsyncStorageAdapter, CompressedImage, CompressionOptions, ConnectionType, DatabaseOptions, FileInfo, FileSystemAdapter, ImageProcessorAdapter, LoggerAdapter, NetworkAdapter, PlatformAdapter, PlatformType, detectPlatform } from './platform/index.js';
|
|
11
18
|
export { createNativePlatformAdapter } from './platform/index.native.js';
|
|
19
|
+
export { ATTACHMENT_TABLE, AbstractAttachmentQueue, AttachmentState, AttachmentTable, AttachmentTableOptions, AttachmentQueueOptions as BaseAttachmentQueueOptions, DEFAULT_ATTACHMENT_QUEUE_OPTIONS, EncodingType, AttachmentRecord as OfficialAttachmentRecord, StorageAdapter } from '@powersync/attachments';
|
|
12
20
|
import '@supabase/supabase-js';
|
|
13
|
-
import '@
|
|
21
|
+
import '@powersync/common';
|
|
14
22
|
import 'react';
|
|
23
|
+
import '@tanstack/react-query';
|
|
24
|
+
import '@powersync/react-native';
|