@pol-studios/powersync 1.0.25 → 1.0.32
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 +0 -1
- package/dist/{CacheSettingsManager-uz-kbnRH.d.ts → CacheSettingsManager-0H_7thHW.d.ts} +21 -3
- package/dist/attachments/index.d.ts +30 -30
- package/dist/attachments/index.js +13 -4
- package/dist/{background-sync-ChCXW-EV.d.ts → background-sync-BujnI3IR.d.ts} +1 -1
- package/dist/{chunk-55DKCJV4.js → chunk-2RDWLXJW.js} +408 -78
- package/dist/chunk-2RDWLXJW.js.map +1 -0
- package/dist/{chunk-P4HZA6ZT.js → chunk-4665ZSE5.js} +2 -2
- package/dist/chunk-4665ZSE5.js.map +1 -0
- package/dist/{chunk-XOY2CJ67.js → chunk-4F5B5CZ7.js} +3 -3
- package/dist/chunk-5WRI5ZAA.js +31 -0
- package/dist/{chunk-BGBQYQV3.js → chunk-65A3SYJZ.js} +193 -299
- package/dist/chunk-65A3SYJZ.js.map +1 -0
- package/dist/chunk-6SZ64KCZ.js +755 -0
- package/dist/chunk-6SZ64KCZ.js.map +1 -0
- package/dist/{chunk-YSTEESEG.js → chunk-74TBHWJ4.js} +122 -11
- package/dist/chunk-74TBHWJ4.js.map +1 -0
- package/dist/chunk-ANXWYQEJ.js +1 -0
- package/dist/chunk-ANXWYQEJ.js.map +1 -0
- package/dist/{chunk-CAB26E6F.js → chunk-C4J4MLER.js} +29 -24
- package/dist/chunk-C4J4MLER.js.map +1 -0
- package/dist/{chunk-C5ODS3XH.js → chunk-EOW7JK7Q.js} +9 -16
- package/dist/chunk-EOW7JK7Q.js.map +1 -0
- package/dist/chunk-HRAVPIAZ.js +220 -0
- package/dist/chunk-HRAVPIAZ.js.map +1 -0
- package/dist/{chunk-XAEII4ZX.js → chunk-NUGQOTEM.js} +32 -4
- package/dist/chunk-NUGQOTEM.js.map +1 -0
- package/dist/chunk-OGUFUZSY.js +5415 -0
- package/dist/chunk-OGUFUZSY.js.map +1 -0
- package/dist/{chunk-VB737IVN.js → chunk-P4D6BQ4X.js} +328 -706
- package/dist/chunk-P4D6BQ4X.js.map +1 -0
- package/dist/{chunk-CACKC6XG.js → chunk-PGEDE6IM.js} +136 -89
- package/dist/chunk-PGEDE6IM.js.map +1 -0
- package/dist/{chunk-A4IBBWGO.js → chunk-RALHHPTU.js} +1 -1
- package/dist/chunk-RIDSPLE5.js +42 -0
- package/dist/chunk-RIDSPLE5.js.map +1 -0
- package/dist/{chunk-Z6VOBGTU.js → chunk-UOMHWUHV.js} +2 -12
- package/dist/chunk-UOMHWUHV.js.map +1 -0
- package/dist/{chunk-WGHNIAF7.js → chunk-YONQYTVH.js} +2 -2
- package/dist/chunk-ZAN22NGL.js +13 -0
- package/dist/chunk-ZAN22NGL.js.map +1 -0
- package/dist/config/index.d.ts +200 -0
- package/dist/config/index.js +23 -0
- package/dist/config/index.js.map +1 -0
- package/dist/connector/index.d.ts +23 -5
- package/dist/connector/index.js +4 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -0
- package/dist/error/index.js +1 -0
- package/dist/generator/index.js +2 -0
- package/dist/generator/index.js.map +1 -1
- package/dist/index.d.ts +19 -16
- package/dist/index.js +88 -46
- package/dist/index.native.d.ts +18 -14
- package/dist/index.native.js +93 -44
- package/dist/index.web.d.ts +17 -14
- package/dist/index.web.js +88 -46
- package/dist/maintenance/index.d.ts +2 -2
- package/dist/maintenance/index.js +3 -2
- package/dist/platform/index.d.ts +1 -1
- package/dist/platform/index.js +2 -0
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/index.native.d.ts +1 -1
- package/dist/platform/index.native.js +1 -0
- package/dist/platform/index.web.d.ts +1 -1
- package/dist/platform/index.web.js +1 -0
- package/dist/pol-attachment-queue-DqBvLAEY.d.ts +255 -0
- package/dist/provider/index.d.ts +319 -124
- package/dist/provider/index.js +21 -16
- package/dist/provider/index.native.d.ts +108 -0
- package/dist/provider/index.native.js +121 -0
- package/dist/provider/index.native.js.map +1 -0
- package/dist/provider/index.web.d.ts +16 -0
- package/dist/provider/index.web.js +112 -0
- package/dist/provider/index.web.js.map +1 -0
- package/dist/react/index.d.ts +16 -65
- package/dist/react/index.js +2 -9
- package/dist/storage/index.d.ts +5 -4
- package/dist/storage/index.js +12 -9
- package/dist/storage/index.native.d.ts +5 -4
- package/dist/storage/index.native.js +8 -5
- package/dist/storage/index.web.d.ts +5 -4
- package/dist/storage/index.web.js +11 -8
- package/dist/storage/upload/index.d.ts +4 -3
- package/dist/storage/upload/index.js +4 -2
- package/dist/storage/upload/index.native.d.ts +4 -3
- package/dist/storage/upload/index.native.js +4 -2
- package/dist/storage/upload/index.web.d.ts +2 -1
- package/dist/storage/upload/index.web.js +4 -2
- package/dist/{supabase-connector-D2oIl2t8.d.ts → supabase-connector-HMxBA9Kg.d.ts} +23 -25
- package/dist/sync/index.d.ts +183 -11
- package/dist/sync/index.js +13 -3
- package/dist/{types-CyvBaAl8.d.ts → types-6QHGELuY.d.ts} +4 -1
- package/dist/{types-CDqWh56B.d.ts → types-B9MptP7E.d.ts} +13 -1
- package/dist/types-BhAEsJj-.d.ts +330 -0
- package/dist/{types-D0WcHrq6.d.ts → types-CGMibJKD.d.ts} +8 -0
- package/dist/{types-DiBvmGEi.d.ts → types-DqJnP50o.d.ts} +22 -24
- package/dist/{pol-attachment-queue-BE2HU3Us.d.ts → types-JCEhw2Lf.d.ts} +139 -346
- package/package.json +18 -4
- package/dist/chunk-24RDMMCL.js +0 -44
- package/dist/chunk-24RDMMCL.js.map +0 -1
- package/dist/chunk-55DKCJV4.js.map +0 -1
- package/dist/chunk-654ERHA7.js +0 -1
- package/dist/chunk-BGBQYQV3.js.map +0 -1
- package/dist/chunk-C5ODS3XH.js.map +0 -1
- package/dist/chunk-CAB26E6F.js.map +0 -1
- package/dist/chunk-CACKC6XG.js.map +0 -1
- package/dist/chunk-P4HZA6ZT.js.map +0 -1
- package/dist/chunk-TIFL2KWE.js +0 -358
- package/dist/chunk-TIFL2KWE.js.map +0 -1
- package/dist/chunk-VB737IVN.js.map +0 -1
- package/dist/chunk-XAEII4ZX.js.map +0 -1
- package/dist/chunk-YSTEESEG.js.map +0 -1
- package/dist/chunk-Z6VOBGTU.js.map +0 -1
- /package/dist/{chunk-XOY2CJ67.js.map → chunk-4F5B5CZ7.js.map} +0 -0
- /package/dist/{chunk-654ERHA7.js.map → chunk-5WRI5ZAA.js.map} +0 -0
- /package/dist/{chunk-A4IBBWGO.js.map → chunk-RALHHPTU.js.map} +0 -0
- /package/dist/{chunk-WGHNIAF7.js.map → chunk-YONQYTVH.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,29 +1,32 @@
|
|
|
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-
|
|
1
|
+
import { A as AbstractPowerSyncDatabase } from './types-B9MptP7E.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, U as UploadBlockReason } from './types-B9MptP7E.js';
|
|
3
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, extractHttpStatusCode, extractTableNames, generateFailureId, isRlsError, toSyncOperationError } from './core/index.js';
|
|
4
|
-
import { m as ConflictDetectionConfig, j as ConflictCheckResult } from './types-
|
|
5
|
-
export { A as AuthProvider, i as ConflictBus, l as ConflictHandler, n as ConflictListener, k as ConflictResolution, C as ConnectorCircuitBreakerConfig, a as ConnectorConfig, c as CrudHandler, D as DEFAULT_RETRY_CONFIG, F as FieldConflict, P as PowerSyncCredentials, o as ResolutionListener, e as RetryConfig, R as RetryStrategyConfig, b as SchemaRouter, f as Session, S as SupabaseConnectorOptions, U as UploadErrorClassification, g as UploadErrorContext, h as UploadErrorMiddleware, d as defaultSchemaRouter } from './types-
|
|
6
|
-
export { S as SupabaseConnector } from './supabase-connector-
|
|
7
|
-
export { AuthRefreshError, CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitOpenError, CircuitState, DEFAULT_CIRCUIT_BREAKER_CONFIG, DiscardEntryError, SupabaseAuthOptions, TransactionAbortError, createSupabaseAuth, discardOnHttpStatus, discardOnPgCodes, discardOrphaned, idempotentTables, retryOnHttpStatus, runUploadErrorMiddleware, runUploadErrorMiddlewareSync, successOnPgCodes, tableHandlers } from './connector/index.js';
|
|
8
|
-
export {
|
|
9
|
-
export { CacheManagerDeps, DOWNLOAD_WORKFLOW_STATES, DownloadManagerDeps, LOCALLY_AVAILABLE_STATES, MigrationStats, PENDING_DOWNLOAD_STATES, PROTECTED_UPLOAD_STATES, PolStorageAdapter, PolStorageAdapterOptions, STATE_MAPPING, STATE_NAMES, TERMINAL_STATES, UPLOAD_WORKFLOW_STATES, UploadManagerDeps, UploadManagerState, VALID_STATES, blobToArrayBuffer, buildIdOnlyWatchQuery, buildRecordFetchQuery, buildWatchQuery, cacheLocalFile, clearCache, clearUploadCallback, copyToManagedCache, createCacheManagerDeps, createMigrationStats, createUploadManagerDeps, createUploadManagerState,
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
4
|
+
import { m as ConflictDetectionConfig, j as ConflictCheckResult } from './types-DqJnP50o.js';
|
|
5
|
+
export { A as AuthProvider, i as ConflictBus, l as ConflictHandler, n as ConflictListener, k as ConflictResolution, C as ConnectorCircuitBreakerConfig, a as ConnectorConfig, c as CrudHandler, D as DEFAULT_RETRY_CONFIG, F as FieldConflict, P as PowerSyncCredentials, o as ResolutionListener, e as RetryConfig, R as RetryStrategyConfig, b as SchemaRouter, f as Session, S as SupabaseConnectorOptions, U as UploadErrorClassification, g as UploadErrorContext, h as UploadErrorMiddleware, d as defaultSchemaRouter } from './types-DqJnP50o.js';
|
|
6
|
+
export { S as SupabaseConnector } from './supabase-connector-HMxBA9Kg.js';
|
|
7
|
+
export { AuthRefreshError, CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitOpenError, CircuitState, DEFAULT_CIRCUIT_BREAKER_CONFIG, DiscardEntryError, SupabaseAuthOptions, TransactionAbortError, createSupabaseAuth, discardOnHttpStatus, discardOnPgCodes, discardOnRlsDenied, discardOrphaned, idempotentTables, retryOnHttpStatus, runUploadErrorMiddleware, runUploadErrorMiddlewareSync, successOnPgCodes, tableHandlers } from './connector/index.js';
|
|
8
|
+
export { P as PolAttachmentQueue, a as PolAttachmentQueueOptions, c as createPolAttachmentQueue } from './pol-attachment-queue-DqBvLAEY.js';
|
|
9
|
+
export { CacheManagerDeps, DOWNLOAD_WORKFLOW_STATES, DownloadManagerDeps, LOCALLY_AVAILABLE_STATES, MigrationStats, PENDING_DOWNLOAD_STATES, PROTECTED_UPLOAD_STATES, PolStorageAdapter, PolStorageAdapterOptions, STATE_MAPPING, STATE_NAMES, TERMINAL_STATES, UPLOAD_WORKFLOW_STATES, UploadManagerDeps, UploadManagerState, VALID_STATES, blobToArrayBuffer, buildIdOnlyWatchQuery, buildRecordFetchQuery, buildWatchQuery, cacheLocalFile, clearCache, clearUploadCallback, copyToManagedCache, createCacheManagerDeps, createMigrationStats, createUploadManagerDeps, createUploadManagerState, createWatchPaths, determineAttachmentState, downloadRecord, enforceCacheLimit, ensureFileUri, extractErrorCode, extractIdsFromRows, formatMigrationStats, getCachedSize, getEvictionCandidates, getExcludeProtectedStatesCondition, getFailedPermanentUploads, getLocalUriForStoragePath, getPendingUploads, getProtectedStatesInClause, getSoonestRetryTime, getStaleUploads, getStateName, getSyncedUploadsWithPendingCallback, isCacheNearCapacity, isDownloadWorkflowState, isLocallyAvailable, isPendingDownloadState, isPermanentError, isProtectedUploadState, isStateTransitionAllowed, isTerminalState, isUploadWorkflowState, isValidAttachmentState, markUploadPermanentFailure, markUploadSynced, migrateAttachmentState, migrateAttachmentStateSafe, recordMigration, scheduleUploadRetry, startUploadProcessing, stripFileUri, uploadOne, validateSqlIdentifier, validateSqlIdentifierFromStateMachine, validateWhereClause, watchConfigToSourceConfig } from './attachments/index.js';
|
|
10
|
+
export { d as AttachmentConfig, z as AttachmentRecord, A as AttachmentSource, c as AttachmentSourceConfig, w as AttachmentStatsRow, e as AttachmentStorageAdapter, v as AttachmentSyncStats, u as AttachmentSyncStatus, m as CACHE_SIZE_PRESETS, k as CacheConfig, x as CacheFileRow, n as CacheSizePreset, o as CacheSizeValue, y as CachedSizeRow, f as CompressionConfig, C as CustomAttachmentSource, l as DEFAULT_CACHE_CONFIG, D as DEFAULT_COMPRESSION_CONFIG, j as DEFAULT_DOWNLOAD_CONFIG, g as DEFAULT_UPLOAD_CONFIG, i as DownloadConfig, q as DownloadPhase, r as DownloadStatus, E as EvictRow, I as IdRow, a as PolAttachmentRecord, A as PolAttachmentSource, P as PolAttachmentState, S as SimpleAttachmentConfig, b as SupabaseBucketSource, U as UploadConfig, h as UploadHandler, s as UploadPhase, t as UploadStatus, W as WatchConfig, p as formatCacheSize, H as getCustomUrlResolver, G as isCustomSource, F as isSignedUrlSource, B as resolveBucketFromConfig } from './types-JCEhw2Lf.js';
|
|
11
|
+
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-BujnI3IR.js';
|
|
12
|
+
export { CompletedTransactionsTable, DeadLetterEntry, DeadLetterQueue, DeadLetterQueueListener, DeadLetterQueueOptions, DeadLetterReason, FailedTransactionsTable, HealthMonitor, LOCAL_ONLY_TABLES, LOCAL_TABLE_NAMES, MetricsCollector, SyncStatusTracker, createDeadLetterEntry, generateDLQEntryId } from './sync/index.js';
|
|
13
|
+
export { createSchemaRouter, definePolConfig, generatePowerSyncSchema, getTableFromSchema, getTableStrategy, isProcessedPolConfig, isTablePowerSync, normalizeTableSpec } from './config/index.js';
|
|
12
14
|
import { SupabaseClient } from '@supabase/supabase-js';
|
|
13
15
|
export { DatabaseMaintenanceUtils, checkIntegrityImpl, checkStorageQuotaImpl, compactDatabaseImpl, getCacheStatsImpl, useDatabaseMaintenance } from './maintenance/index.js';
|
|
14
|
-
export { D as DownloadResult, a as StorageBackend, b as StorageUploadOptions, d as SupabaseClient, S as SupabaseStorage, c as SupabaseStorageOptions, e as SupabaseTransformOptions, U as UploadProgress, r as resolveBucket } from './types-
|
|
15
|
-
export { f as CacheSettings, C as CacheSettingsManager, h as CacheSettingsManagerOptions, D as DEFAULT_CACHE_SETTINGS, I as ImageTransformOptions, S as SupabaseStorageAdapter, e as SupabaseStorageAdapterOptions, c as createSupabaseStorage, d as createSupabaseStorageAdapter, g as getStorageErrorMessage, a as isBlobResult, i as isFileResult, b as isStorageAuthError, n as normalizeStoragePath } from './CacheSettingsManager-
|
|
16
|
-
export { D as DEFAULT_UPLOAD_NOTIFICATION, S as SupabaseUploadHandlerOptions, U as UploadEventHandlers, a as UploadNotificationConfig } from './types-
|
|
16
|
+
export { D as DownloadResult, a as StorageBackend, b as StorageUploadOptions, d as SupabaseClient, S as SupabaseStorage, c as SupabaseStorageOptions, e as SupabaseTransformOptions, U as UploadProgress, r as resolveBucket } from './types-CGMibJKD.js';
|
|
17
|
+
export { f as CacheSettings, C as CacheSettingsManager, h as CacheSettingsManagerOptions, D as DEFAULT_CACHE_SETTINGS, I as ImageTransformOptions, S as SupabaseStorageAdapter, e as SupabaseStorageAdapterOptions, c as createSupabaseStorage, d as createSupabaseStorageAdapter, g as getStorageErrorMessage, a as isBlobResult, i as isFileResult, b as isStorageAuthError, n as normalizeStoragePath } from './CacheSettingsManager-0H_7thHW.js';
|
|
18
|
+
export { D as DEFAULT_UPLOAD_NOTIFICATION, S as SupabaseUploadHandlerOptions, U as UploadEventHandlers, a as UploadNotificationConfig } from './types-6QHGELuY.js';
|
|
17
19
|
export { SupabaseUploadHandler, createSupabaseUploadHandler } from './storage/upload/index.js';
|
|
18
20
|
export { PowerSyncErrorBoundary } from './error/index.js';
|
|
19
|
-
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,
|
|
20
|
-
export { AttachmentQueueContextValue,
|
|
21
|
+
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, OfflineDataProviderConfig, OfflineDataProviderProps, PendingMutationsContext, PendingMutationsContextValue, PowerSyncConfig, PowerSyncContext, PowerSyncContextValue, PowerSyncProvider, PowerSyncProviderProps, PowerSyncSyncStatusSnapshot, ProviderBridge, ProviderBridgeProps, ResetSyncOptions, RetryCountdownResult, SyncActivityContext, SyncActivityContextValue, SyncActivityResult, SyncConfig, SyncMetricsContext, SyncMetricsContextValue, SyncModeContext, SyncModeContextValue, SyncStatusContext, SyncStatusContextValue, UPLOAD_BACKOFF_DELAYS, UPLOAD_MAX_RETRIES, UploadBlockedReasonResult, UploadStatusResult, useAttachmentQueue, useAttachmentQueueReady, useCompletedTransactions, useCompletedTransactionsContext, useConnectionHealth, useConnectionStatus, useDatabase, useDownloadProgress, useEntitySyncStatus, useFailedTransactions, useFailedTransactionsContext, useIsSyncing, useOnlineStatus, usePendingMutations, usePendingMutationsContext, usePlatform, usePowerSync, useRetryCountdown, useSyncActivity, useSyncActivityContext, useSyncControl, useSyncMetrics, useSyncMode, useSyncModeContext, useSyncStatus, useUploadBlockedReason, useUploadRetry, useUploadStatus } from './provider/index.js';
|
|
22
|
+
export { AttachmentQueueContextValue, useAttachmentQueueContext, usePowerSyncContext, useSyncStatusContext } from './react/index.js';
|
|
21
23
|
export { AsyncStorageAdapter, CompressedImage, CompressionOptions, ConnectionType, DatabaseOptions, FileInfo, FileSystemAdapter, ImageProcessorAdapter, LoggerAdapter, NetworkAdapter, PlatformAdapter, PlatformType, detectPlatform } from './platform/index.js';
|
|
22
24
|
export { ATTACHMENT_TABLE, AbstractAttachmentQueue, AttachmentState, AttachmentTable, AttachmentTableOptions, AttachmentQueueOptions as BaseAttachmentQueueOptions, DEFAULT_ATTACHMENT_QUEUE_OPTIONS, EncodingType, AttachmentRecord as OfficialAttachmentRecord, StorageAdapter } from '@powersync/attachments';
|
|
23
25
|
export { AbstractPowerSyncDatabase as PowerSyncDBInterface } from '@powersync/common';
|
|
26
|
+
export { g as DatabaseColumnDef, D as DatabaseSchemaObject, f as DatabaseTableDef, P as PolConfig, c as PolConfigAttachments, d as PolConfigConnector, e as PolConfigSync, a as ProcessedPolConfig, b as ProcessedTableStrategy, T as TableSpec } from './types-BhAEsJj-.js';
|
|
27
|
+
import '@powersync/react-native';
|
|
24
28
|
import 'react';
|
|
25
29
|
import '@tanstack/react-query';
|
|
26
|
-
import '@powersync/react-native';
|
|
27
30
|
|
|
28
31
|
/**
|
|
29
32
|
* Exponential backoff retry utilities for resilient network operations.
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-ANXWYQEJ.js";
|
|
2
2
|
import {
|
|
3
|
-
SlimPowerSyncProvider,
|
|
4
3
|
useAttachmentQueueContext,
|
|
5
4
|
usePowerSyncContext,
|
|
6
5
|
useSyncStatusContext
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RIDSPLE5.js";
|
|
7
|
+
import {
|
|
8
|
+
createSchemaRouter,
|
|
9
|
+
definePolConfig,
|
|
10
|
+
generatePowerSyncSchema,
|
|
11
|
+
getTableFromSchema,
|
|
12
|
+
getTableStrategy,
|
|
13
|
+
isProcessedPolConfig,
|
|
14
|
+
isTablePowerSync,
|
|
15
|
+
normalizeTableSpec
|
|
16
|
+
} from "./chunk-HRAVPIAZ.js";
|
|
8
17
|
import {
|
|
9
18
|
DOWNLOAD_WORKFLOW_STATES,
|
|
10
19
|
STATE_MAPPING,
|
|
@@ -16,7 +25,7 @@ import {
|
|
|
16
25
|
buildRecordFetchQuery,
|
|
17
26
|
buildWatchQuery,
|
|
18
27
|
createMigrationStats,
|
|
19
|
-
|
|
28
|
+
createWatchPaths,
|
|
20
29
|
extractIdsFromRows,
|
|
21
30
|
formatMigrationStats,
|
|
22
31
|
getStateName,
|
|
@@ -30,17 +39,17 @@ import {
|
|
|
30
39
|
validateSqlIdentifier as validateSqlIdentifier2,
|
|
31
40
|
validateWhereClause,
|
|
32
41
|
watchConfigToSourceConfig
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import {
|
|
35
|
-
ConflictBus,
|
|
36
|
-
OfflineDataProvider,
|
|
37
|
-
PowerSyncProvider,
|
|
38
|
-
ProviderBridge
|
|
39
|
-
} from "./chunk-VB737IVN.js";
|
|
40
|
-
import "./chunk-YHTZ7VMV.js";
|
|
42
|
+
} from "./chunk-EOW7JK7Q.js";
|
|
41
43
|
import {
|
|
42
44
|
PowerSyncErrorBoundary
|
|
43
45
|
} from "./chunk-P6WOZO7H.js";
|
|
46
|
+
import {
|
|
47
|
+
ConflictBus,
|
|
48
|
+
PowerSyncProvider,
|
|
49
|
+
ProviderBridge,
|
|
50
|
+
UPLOAD_BACKOFF_DELAYS,
|
|
51
|
+
UPLOAD_MAX_RETRIES
|
|
52
|
+
} from "./chunk-P4D6BQ4X.js";
|
|
44
53
|
import {
|
|
45
54
|
ATTACHMENT_TABLE,
|
|
46
55
|
AbstractAttachmentQueue,
|
|
@@ -75,6 +84,7 @@ import {
|
|
|
75
84
|
extractErrorCode,
|
|
76
85
|
formatCacheSize,
|
|
77
86
|
getCachedSize,
|
|
87
|
+
getCustomUrlResolver,
|
|
78
88
|
getEvictionCandidates,
|
|
79
89
|
getExcludeProtectedStatesCondition,
|
|
80
90
|
getExtensionFromMimeType,
|
|
@@ -89,22 +99,25 @@ import {
|
|
|
89
99
|
getSyncedUploadsWithPendingCallback,
|
|
90
100
|
isAudioMimeType,
|
|
91
101
|
isCacheNearCapacity,
|
|
102
|
+
isCustomSource,
|
|
92
103
|
isDocumentMimeType,
|
|
93
104
|
isImageMimeType,
|
|
94
105
|
isLocallyAvailable,
|
|
95
106
|
isPendingDownloadState,
|
|
96
107
|
isPermanentError,
|
|
97
108
|
isProtectedUploadState,
|
|
109
|
+
isSignedUrlSource,
|
|
98
110
|
isStateTransitionAllowed,
|
|
99
111
|
isVideoMimeType,
|
|
100
112
|
markUploadPermanentFailure,
|
|
101
113
|
markUploadSynced,
|
|
114
|
+
resolveBucketFromConfig,
|
|
102
115
|
scheduleUploadRetry,
|
|
103
116
|
startUploadProcessing,
|
|
104
117
|
stripFileUri,
|
|
105
118
|
uploadOne,
|
|
106
119
|
validateSqlIdentifier
|
|
107
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-PGEDE6IM.js";
|
|
108
121
|
import {
|
|
109
122
|
DeadLetterQueue,
|
|
110
123
|
createDeadLetterEntry,
|
|
@@ -114,18 +127,22 @@ import {
|
|
|
114
127
|
isBackgroundSyncRegistered,
|
|
115
128
|
registerBackgroundSync,
|
|
116
129
|
unregisterBackgroundSync
|
|
117
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-RALHHPTU.js";
|
|
118
131
|
import {
|
|
132
|
+
DEFAULT_CONNECTION_HEALTH,
|
|
133
|
+
DEFAULT_SYNC_CONFIG,
|
|
134
|
+
DEFAULT_SYNC_METRICS,
|
|
135
|
+
DEFAULT_SYNC_STATUS,
|
|
119
136
|
HealthMonitor,
|
|
120
137
|
MetricsCollector,
|
|
121
138
|
SyncStatusTracker
|
|
122
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-2RDWLXJW.js";
|
|
123
140
|
import {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
} from "./chunk-
|
|
141
|
+
CompletedTransactionsTable,
|
|
142
|
+
FailedTransactionsTable,
|
|
143
|
+
LOCAL_ONLY_TABLES,
|
|
144
|
+
LOCAL_TABLE_NAMES
|
|
145
|
+
} from "./chunk-OGUFUZSY.js";
|
|
129
146
|
import {
|
|
130
147
|
checkIntegrityImpl,
|
|
131
148
|
checkStorageQuotaImpl,
|
|
@@ -133,7 +150,7 @@ import {
|
|
|
133
150
|
formatBytes,
|
|
134
151
|
getCacheStatsImpl,
|
|
135
152
|
useDatabaseMaintenance
|
|
136
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-YONQYTVH.js";
|
|
137
154
|
import {
|
|
138
155
|
AttachmentQueueContext,
|
|
139
156
|
CompletedTransactionsContext,
|
|
@@ -163,6 +180,7 @@ import {
|
|
|
163
180
|
usePendingMutationsContext,
|
|
164
181
|
usePlatform,
|
|
165
182
|
usePowerSync,
|
|
183
|
+
useRetryCountdown,
|
|
166
184
|
useSyncActivity,
|
|
167
185
|
useSyncActivityContext,
|
|
168
186
|
useSyncControl,
|
|
@@ -170,33 +188,45 @@ import {
|
|
|
170
188
|
useSyncMode,
|
|
171
189
|
useSyncModeContext,
|
|
172
190
|
useSyncStatus,
|
|
191
|
+
useUploadBlockedReason,
|
|
192
|
+
useUploadRetry,
|
|
173
193
|
useUploadStatus
|
|
174
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-74TBHWJ4.js";
|
|
175
195
|
import "./chunk-T4AO7JIG.js";
|
|
176
|
-
import "./chunk-
|
|
196
|
+
import "./chunk-TGBT5XBE.js";
|
|
197
|
+
import {
|
|
198
|
+
SupabaseUploadHandler,
|
|
199
|
+
createSupabaseUploadHandler
|
|
200
|
+
} from "./chunk-4665ZSE5.js";
|
|
177
201
|
import {
|
|
178
202
|
CacheSettingsManager,
|
|
179
203
|
DEFAULT_CACHE_SETTINGS,
|
|
180
204
|
createSupabaseStorage,
|
|
181
205
|
isBlobResult,
|
|
182
206
|
isFileResult
|
|
183
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-4F5B5CZ7.js";
|
|
208
|
+
import {
|
|
209
|
+
DEFAULT_UPLOAD_NOTIFICATION
|
|
210
|
+
} from "./chunk-ZAN22NGL.js";
|
|
184
211
|
import {
|
|
185
212
|
SupabaseStorageAdapter,
|
|
186
213
|
createSupabaseStorageAdapter,
|
|
187
214
|
getStorageErrorMessage,
|
|
188
215
|
isStorageAuthError,
|
|
189
216
|
normalizeStoragePath
|
|
190
|
-
} from "./chunk-
|
|
191
|
-
import "./chunk-TGBT5XBE.js";
|
|
217
|
+
} from "./chunk-NUGQOTEM.js";
|
|
192
218
|
import {
|
|
193
|
-
SupabaseUploadHandler,
|
|
194
|
-
createSupabaseUploadHandler
|
|
195
|
-
} from "./chunk-P4HZA6ZT.js";
|
|
196
|
-
import {
|
|
197
|
-
DEFAULT_UPLOAD_NOTIFICATION,
|
|
198
219
|
resolveBucket
|
|
199
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-UOMHWUHV.js";
|
|
221
|
+
import {
|
|
222
|
+
AbortError,
|
|
223
|
+
DEFAULT_BACKOFF_CONFIG,
|
|
224
|
+
RetryExhaustedError,
|
|
225
|
+
addJitter,
|
|
226
|
+
calculateBackoffDelay,
|
|
227
|
+
sleep,
|
|
228
|
+
withExponentialBackoff
|
|
229
|
+
} from "./chunk-FV2HXEIY.js";
|
|
200
230
|
import "./chunk-W7HSR35B.js";
|
|
201
231
|
import {
|
|
202
232
|
ATTACHMENT_DOWNLOAD_TIMEOUT_MS,
|
|
@@ -231,7 +261,6 @@ import {
|
|
|
231
261
|
STORAGE_KEY_SYNC_MODE,
|
|
232
262
|
STORAGE_WARNING_THRESHOLD
|
|
233
263
|
} from "./chunk-CGL33PL4.js";
|
|
234
|
-
import "./chunk-WN5ZJ3E2.js";
|
|
235
264
|
import {
|
|
236
265
|
AuthRefreshError,
|
|
237
266
|
CircuitBreaker,
|
|
@@ -249,6 +278,7 @@ import {
|
|
|
249
278
|
detectConflicts,
|
|
250
279
|
discardOnHttpStatus,
|
|
251
280
|
discardOnPgCodes,
|
|
281
|
+
discardOnRlsDenied,
|
|
252
282
|
discardOrphaned,
|
|
253
283
|
fetchServerVersion,
|
|
254
284
|
getLocalVersion,
|
|
@@ -259,16 +289,7 @@ import {
|
|
|
259
289
|
runUploadErrorMiddlewareSync,
|
|
260
290
|
successOnPgCodes,
|
|
261
291
|
tableHandlers
|
|
262
|
-
} from "./chunk-
|
|
263
|
-
import {
|
|
264
|
-
AbortError,
|
|
265
|
-
DEFAULT_BACKOFF_CONFIG,
|
|
266
|
-
RetryExhaustedError,
|
|
267
|
-
addJitter,
|
|
268
|
-
calculateBackoffDelay,
|
|
269
|
-
sleep,
|
|
270
|
-
withExponentialBackoff
|
|
271
|
-
} from "./chunk-FV2HXEIY.js";
|
|
292
|
+
} from "./chunk-65A3SYJZ.js";
|
|
272
293
|
import {
|
|
273
294
|
AttachmentError,
|
|
274
295
|
ConfigurationError,
|
|
@@ -287,6 +308,7 @@ import {
|
|
|
287
308
|
isRlsError,
|
|
288
309
|
toSyncOperationError
|
|
289
310
|
} from "./chunk-I2AYMY5O.js";
|
|
311
|
+
import "./chunk-5WRI5ZAA.js";
|
|
290
312
|
export {
|
|
291
313
|
ATTACHMENT_DOWNLOAD_TIMEOUT_MS,
|
|
292
314
|
ATTACHMENT_RETRY_DELAY_MS,
|
|
@@ -306,6 +328,7 @@ export {
|
|
|
306
328
|
CircuitBreaker,
|
|
307
329
|
CircuitOpenError,
|
|
308
330
|
CompletedTransactionsContext,
|
|
331
|
+
CompletedTransactionsTable,
|
|
309
332
|
ConfigurationError,
|
|
310
333
|
ConflictBus,
|
|
311
334
|
ConflictDetectionError,
|
|
@@ -342,15 +365,17 @@ export {
|
|
|
342
365
|
EVICTION_TRIGGER_THRESHOLD,
|
|
343
366
|
EncodingType,
|
|
344
367
|
FailedTransactionsContext,
|
|
368
|
+
FailedTransactionsTable,
|
|
345
369
|
HEALTH_CHECK_INTERVAL_MS,
|
|
346
370
|
HEALTH_CHECK_TIMEOUT_MS,
|
|
347
371
|
HealthMonitor,
|
|
348
372
|
InitializationError,
|
|
349
373
|
LATENCY_DEGRADED_THRESHOLD_MS,
|
|
350
374
|
LOCALLY_AVAILABLE_STATES,
|
|
375
|
+
LOCAL_ONLY_TABLES,
|
|
376
|
+
LOCAL_TABLE_NAMES,
|
|
351
377
|
MAX_CONSECUTIVE_FAILURES,
|
|
352
378
|
MetricsCollector,
|
|
353
|
-
OfflineDataProvider,
|
|
354
379
|
PENDING_DOWNLOAD_STATES,
|
|
355
380
|
PROTECTED_UPLOAD_STATES,
|
|
356
381
|
PendingMutationsContext,
|
|
@@ -377,7 +402,6 @@ export {
|
|
|
377
402
|
STORAGE_KEY_PREFIX,
|
|
378
403
|
STORAGE_KEY_SYNC_MODE,
|
|
379
404
|
STORAGE_WARNING_THRESHOLD,
|
|
380
|
-
SlimPowerSyncProvider,
|
|
381
405
|
SupabaseConnector,
|
|
382
406
|
SupabaseStorageAdapter,
|
|
383
407
|
SupabaseUploadHandler,
|
|
@@ -389,6 +413,8 @@ export {
|
|
|
389
413
|
SyncStatusTracker,
|
|
390
414
|
TERMINAL_STATES,
|
|
391
415
|
TransactionAbortError,
|
|
416
|
+
UPLOAD_BACKOFF_DELAYS,
|
|
417
|
+
UPLOAD_MAX_RETRIES,
|
|
392
418
|
UPLOAD_WORKFLOW_STATES,
|
|
393
419
|
VALID_STATES,
|
|
394
420
|
addJitter,
|
|
@@ -410,6 +436,7 @@ export {
|
|
|
410
436
|
createDeadLetterEntry,
|
|
411
437
|
createMigrationStats,
|
|
412
438
|
createPolAttachmentQueue,
|
|
439
|
+
createSchemaRouter,
|
|
413
440
|
createSupabaseAuth,
|
|
414
441
|
createSupabaseStorage,
|
|
415
442
|
createSupabaseStorageAdapter,
|
|
@@ -417,13 +444,15 @@ export {
|
|
|
417
444
|
createSyncError,
|
|
418
445
|
createUploadManagerDeps,
|
|
419
446
|
createUploadManagerState,
|
|
420
|
-
|
|
447
|
+
createWatchPaths,
|
|
421
448
|
defaultSchemaRouter,
|
|
422
449
|
defineBackgroundSyncTask,
|
|
450
|
+
definePolConfig,
|
|
423
451
|
detectConflicts,
|
|
424
452
|
determineAttachmentState,
|
|
425
453
|
discardOnHttpStatus,
|
|
426
454
|
discardOnPgCodes,
|
|
455
|
+
discardOnRlsDenied,
|
|
427
456
|
discardOrphaned,
|
|
428
457
|
downloadRecord,
|
|
429
458
|
enforceCacheLimit,
|
|
@@ -439,8 +468,10 @@ export {
|
|
|
439
468
|
formatMigrationStats,
|
|
440
469
|
generateDLQEntryId,
|
|
441
470
|
generateFailureId,
|
|
471
|
+
generatePowerSyncSchema,
|
|
442
472
|
getCacheStatsImpl,
|
|
443
473
|
getCachedSize,
|
|
474
|
+
getCustomUrlResolver,
|
|
444
475
|
getEvictionCandidates,
|
|
445
476
|
getExcludeProtectedStatesCondition,
|
|
446
477
|
getExtensionFromMimeType,
|
|
@@ -456,6 +487,8 @@ export {
|
|
|
456
487
|
getStateName,
|
|
457
488
|
getStorageErrorMessage,
|
|
458
489
|
getSyncedUploadsWithPendingCallback,
|
|
490
|
+
getTableFromSchema,
|
|
491
|
+
getTableStrategy,
|
|
459
492
|
hasVersionColumn,
|
|
460
493
|
idempotentTables,
|
|
461
494
|
initializeBackgroundSync,
|
|
@@ -463,6 +496,7 @@ export {
|
|
|
463
496
|
isBackgroundSyncRegistered,
|
|
464
497
|
isBlobResult,
|
|
465
498
|
isCacheNearCapacity,
|
|
499
|
+
isCustomSource,
|
|
466
500
|
isDocumentMimeType,
|
|
467
501
|
isDownloadWorkflowState,
|
|
468
502
|
isFileResult,
|
|
@@ -470,10 +504,13 @@ export {
|
|
|
470
504
|
isLocallyAvailable,
|
|
471
505
|
isPendingDownloadState,
|
|
472
506
|
isPermanentError,
|
|
507
|
+
isProcessedPolConfig,
|
|
473
508
|
isProtectedUploadState,
|
|
474
509
|
isRlsError,
|
|
510
|
+
isSignedUrlSource,
|
|
475
511
|
isStateTransitionAllowed,
|
|
476
512
|
isStorageAuthError,
|
|
513
|
+
isTablePowerSync,
|
|
477
514
|
isTerminalState,
|
|
478
515
|
isUploadWorkflowState,
|
|
479
516
|
isValidAttachmentState,
|
|
@@ -483,9 +520,11 @@ export {
|
|
|
483
520
|
migrateAttachmentState,
|
|
484
521
|
migrateAttachmentStateSafe,
|
|
485
522
|
normalizeStoragePath,
|
|
523
|
+
normalizeTableSpec,
|
|
486
524
|
recordMigration,
|
|
487
525
|
registerBackgroundSync,
|
|
488
526
|
resolveBucket,
|
|
527
|
+
resolveBucketFromConfig,
|
|
489
528
|
retryOnHttpStatus,
|
|
490
529
|
runUploadErrorMiddleware,
|
|
491
530
|
runUploadErrorMiddlewareSync,
|
|
@@ -518,6 +557,7 @@ export {
|
|
|
518
557
|
usePlatform,
|
|
519
558
|
usePowerSync,
|
|
520
559
|
usePowerSyncContext,
|
|
560
|
+
useRetryCountdown,
|
|
521
561
|
useSyncActivity,
|
|
522
562
|
useSyncActivityContext,
|
|
523
563
|
useSyncControl,
|
|
@@ -526,6 +566,8 @@ export {
|
|
|
526
566
|
useSyncModeContext,
|
|
527
567
|
useSyncStatus,
|
|
528
568
|
useSyncStatusContext,
|
|
569
|
+
useUploadBlockedReason,
|
|
570
|
+
useUploadRetry,
|
|
529
571
|
useUploadStatus,
|
|
530
572
|
validateSqlIdentifier2 as validateSqlIdentifier,
|
|
531
573
|
validateSqlIdentifier as validateSqlIdentifierFromStateMachine,
|
package/dist/index.native.d.ts
CHANGED
|
@@ -1,26 +1,30 @@
|
|
|
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-
|
|
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, U as UploadBlockReason } from './types-B9MptP7E.js';
|
|
2
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, extractHttpStatusCode, extractTableNames, generateFailureId, isRlsError, toSyncOperationError } from './core/index.js';
|
|
3
|
-
export { A as AuthProvider, i as ConflictBus, j as ConflictCheckResult, m as ConflictDetectionConfig, l as ConflictHandler, n as ConflictListener, k as ConflictResolution, C as ConnectorCircuitBreakerConfig, a as ConnectorConfig, c as CrudHandler, D as DEFAULT_RETRY_CONFIG, F as FieldConflict, P as PowerSyncCredentials, o as ResolutionListener, e as RetryConfig, R as RetryStrategyConfig, b as SchemaRouter, f as Session, S as SupabaseConnectorOptions, U as UploadErrorClassification, g as UploadErrorContext, h as UploadErrorMiddleware, d as defaultSchemaRouter } from './types-
|
|
4
|
-
export { S as SupabaseConnector } from './supabase-connector-
|
|
5
|
-
export { AuthRefreshError, CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitOpenError, CircuitState, DEFAULT_CIRCUIT_BREAKER_CONFIG, DiscardEntryError, SupabaseAuthOptions, TransactionAbortError, createSupabaseAuth, discardOnHttpStatus, discardOnPgCodes, discardOrphaned, idempotentTables, retryOnHttpStatus, runUploadErrorMiddleware, runUploadErrorMiddlewareSync, successOnPgCodes, tableHandlers } from './connector/index.js';
|
|
6
|
-
export {
|
|
7
|
-
export { CacheManagerDeps, DOWNLOAD_WORKFLOW_STATES, DownloadManagerDeps, LOCALLY_AVAILABLE_STATES, MigrationStats, PENDING_DOWNLOAD_STATES, PROTECTED_UPLOAD_STATES, PolStorageAdapter, PolStorageAdapterOptions, STATE_MAPPING, STATE_NAMES, TERMINAL_STATES, UPLOAD_WORKFLOW_STATES, UploadManagerDeps, UploadManagerState, VALID_STATES, blobToArrayBuffer, buildIdOnlyWatchQuery, buildRecordFetchQuery, buildWatchQuery, cacheLocalFile, clearCache, clearUploadCallback, copyToManagedCache, createCacheManagerDeps, createMigrationStats, createUploadManagerDeps, createUploadManagerState,
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
3
|
+
export { A as AuthProvider, i as ConflictBus, j as ConflictCheckResult, m as ConflictDetectionConfig, l as ConflictHandler, n as ConflictListener, k as ConflictResolution, C as ConnectorCircuitBreakerConfig, a as ConnectorConfig, c as CrudHandler, D as DEFAULT_RETRY_CONFIG, F as FieldConflict, P as PowerSyncCredentials, o as ResolutionListener, e as RetryConfig, R as RetryStrategyConfig, b as SchemaRouter, f as Session, S as SupabaseConnectorOptions, U as UploadErrorClassification, g as UploadErrorContext, h as UploadErrorMiddleware, d as defaultSchemaRouter } from './types-DqJnP50o.js';
|
|
4
|
+
export { S as SupabaseConnector } from './supabase-connector-HMxBA9Kg.js';
|
|
5
|
+
export { AuthRefreshError, CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitOpenError, CircuitState, DEFAULT_CIRCUIT_BREAKER_CONFIG, DiscardEntryError, SupabaseAuthOptions, TransactionAbortError, createSupabaseAuth, discardOnHttpStatus, discardOnPgCodes, discardOnRlsDenied, discardOrphaned, idempotentTables, retryOnHttpStatus, runUploadErrorMiddleware, runUploadErrorMiddlewareSync, successOnPgCodes, tableHandlers } from './connector/index.js';
|
|
6
|
+
export { P as PolAttachmentQueue, a as PolAttachmentQueueOptions, c as createPolAttachmentQueue } from './pol-attachment-queue-DqBvLAEY.js';
|
|
7
|
+
export { CacheManagerDeps, DOWNLOAD_WORKFLOW_STATES, DownloadManagerDeps, LOCALLY_AVAILABLE_STATES, MigrationStats, PENDING_DOWNLOAD_STATES, PROTECTED_UPLOAD_STATES, PolStorageAdapter, PolStorageAdapterOptions, STATE_MAPPING, STATE_NAMES, TERMINAL_STATES, UPLOAD_WORKFLOW_STATES, UploadManagerDeps, UploadManagerState, VALID_STATES, blobToArrayBuffer, buildIdOnlyWatchQuery, buildRecordFetchQuery, buildWatchQuery, cacheLocalFile, clearCache, clearUploadCallback, copyToManagedCache, createCacheManagerDeps, createMigrationStats, createUploadManagerDeps, createUploadManagerState, createWatchPaths, determineAttachmentState, downloadRecord, enforceCacheLimit, ensureFileUri, extractErrorCode, extractIdsFromRows, formatMigrationStats, getCachedSize, getEvictionCandidates, getExcludeProtectedStatesCondition, getFailedPermanentUploads, getLocalUriForStoragePath, getPendingUploads, getProtectedStatesInClause, getSoonestRetryTime, getStaleUploads, getStateName, getSyncedUploadsWithPendingCallback, isCacheNearCapacity, isDownloadWorkflowState, isLocallyAvailable, isPendingDownloadState, isPermanentError, isProtectedUploadState, isStateTransitionAllowed, isTerminalState, isUploadWorkflowState, isValidAttachmentState, markUploadPermanentFailure, markUploadSynced, migrateAttachmentState, migrateAttachmentStateSafe, recordMigration, scheduleUploadRetry, startUploadProcessing, stripFileUri, uploadOne, validateSqlIdentifier, validateSqlIdentifierFromStateMachine, validateWhereClause, watchConfigToSourceConfig } from './attachments/index.js';
|
|
8
|
+
export { d as AttachmentConfig, z as AttachmentRecord, A as AttachmentSource, c as AttachmentSourceConfig, w as AttachmentStatsRow, e as AttachmentStorageAdapter, v as AttachmentSyncStats, u as AttachmentSyncStatus, m as CACHE_SIZE_PRESETS, k as CacheConfig, x as CacheFileRow, n as CacheSizePreset, o as CacheSizeValue, y as CachedSizeRow, f as CompressionConfig, C as CustomAttachmentSource, l as DEFAULT_CACHE_CONFIG, D as DEFAULT_COMPRESSION_CONFIG, j as DEFAULT_DOWNLOAD_CONFIG, g as DEFAULT_UPLOAD_CONFIG, i as DownloadConfig, q as DownloadPhase, r as DownloadStatus, E as EvictRow, I as IdRow, a as PolAttachmentRecord, A as PolAttachmentSource, P as PolAttachmentState, S as SimpleAttachmentConfig, b as SupabaseBucketSource, U as UploadConfig, h as UploadHandler, s as UploadPhase, t as UploadStatus, W as WatchConfig, p as formatCacheSize, H as getCustomUrlResolver, G as isCustomSource, F as isSignedUrlSource, B as resolveBucketFromConfig } from './types-JCEhw2Lf.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-BujnI3IR.js';
|
|
10
|
+
export { CompletedTransactionsTable, DeadLetterEntry, DeadLetterQueue, DeadLetterQueueListener, DeadLetterQueueOptions, DeadLetterReason, FailedTransactionsTable, HealthMonitor, LOCAL_ONLY_TABLES, LOCAL_TABLE_NAMES, MetricsCollector, SyncStatusTracker, createDeadLetterEntry, generateDLQEntryId } from './sync/index.js';
|
|
10
11
|
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';
|
|
12
|
+
export { createSchemaRouter, definePolConfig, generatePowerSyncSchema, getTableFromSchema, getTableStrategy, isProcessedPolConfig, isTablePowerSync, normalizeTableSpec } from './config/index.js';
|
|
11
13
|
export { DatabaseMaintenanceUtils, checkIntegrityImpl, checkStorageQuotaImpl, compactDatabaseImpl, getCacheStatsImpl, useDatabaseMaintenance } from './maintenance/index.js';
|
|
12
|
-
export { D as DownloadResult, a as StorageBackend, b as StorageUploadOptions, d as SupabaseClient, S as SupabaseStorage, c as SupabaseStorageOptions, e as SupabaseTransformOptions, U as UploadProgress, r as resolveBucket } from './types-
|
|
13
|
-
export { f as CacheSettings, C as CacheSettingsManager, h as CacheSettingsManagerOptions, D as DEFAULT_CACHE_SETTINGS, I as ImageTransformOptions, S as SupabaseStorageAdapter, e as SupabaseStorageAdapterOptions, c as createSupabaseStorage, d as createSupabaseStorageAdapter, g as getStorageErrorMessage, a as isBlobResult, i as isFileResult, b as isStorageAuthError, n as normalizeStoragePath } from './CacheSettingsManager-
|
|
14
|
-
export { D as DEFAULT_UPLOAD_NOTIFICATION, S as SupabaseUploadHandlerOptions, U as UploadEventHandlers, a as UploadNotificationConfig } from './types-
|
|
14
|
+
export { D as DownloadResult, a as StorageBackend, b as StorageUploadOptions, d as SupabaseClient, S as SupabaseStorage, c as SupabaseStorageOptions, e as SupabaseTransformOptions, U as UploadProgress, r as resolveBucket } from './types-CGMibJKD.js';
|
|
15
|
+
export { f as CacheSettings, C as CacheSettingsManager, h as CacheSettingsManagerOptions, D as DEFAULT_CACHE_SETTINGS, I as ImageTransformOptions, S as SupabaseStorageAdapter, e as SupabaseStorageAdapterOptions, c as createSupabaseStorage, d as createSupabaseStorageAdapter, g as getStorageErrorMessage, a as isBlobResult, i as isFileResult, b as isStorageAuthError, n as normalizeStoragePath } from './CacheSettingsManager-0H_7thHW.js';
|
|
16
|
+
export { D as DEFAULT_UPLOAD_NOTIFICATION, S as SupabaseUploadHandlerOptions, U as UploadEventHandlers, a as UploadNotificationConfig } from './types-6QHGELuY.js';
|
|
15
17
|
export { SupabaseUploadHandler, createSupabaseUploadHandler } from './storage/upload/index.js';
|
|
16
18
|
export { PowerSyncErrorBoundary } from './error/index.js';
|
|
17
|
-
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,
|
|
18
|
-
export { AttachmentQueueContextValue,
|
|
19
|
+
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, OfflineDataProviderConfig, OfflineDataProviderProps, PendingMutationsContext, PendingMutationsContextValue, PowerSyncConfig, PowerSyncContext, PowerSyncContextValue, PowerSyncProvider, PowerSyncProviderProps, PowerSyncSyncStatusSnapshot, ProviderBridge, ProviderBridgeProps, ResetSyncOptions, RetryCountdownResult, SyncActivityContext, SyncActivityContextValue, SyncActivityResult, SyncConfig, SyncMetricsContext, SyncMetricsContextValue, SyncModeContext, SyncModeContextValue, SyncStatusContext, SyncStatusContextValue, UPLOAD_BACKOFF_DELAYS, UPLOAD_MAX_RETRIES, UploadBlockedReasonResult, UploadStatusResult, useAttachmentQueue, useAttachmentQueueReady, useCompletedTransactions, useCompletedTransactionsContext, useConnectionHealth, useConnectionStatus, useDatabase, useDownloadProgress, useEntitySyncStatus, useFailedTransactions, useFailedTransactionsContext, useIsSyncing, useOnlineStatus, usePendingMutations, usePendingMutationsContext, usePlatform, usePowerSync, useRetryCountdown, useSyncActivity, useSyncActivityContext, useSyncControl, useSyncMetrics, useSyncMode, useSyncModeContext, useSyncStatus, useUploadBlockedReason, useUploadRetry, useUploadStatus } from './provider/index.js';
|
|
20
|
+
export { AttachmentQueueContextValue, useAttachmentQueueContext, usePowerSyncContext, useSyncStatusContext } from './react/index.js';
|
|
19
21
|
export { AsyncStorageAdapter, CompressedImage, CompressionOptions, ConnectionType, DatabaseOptions, FileInfo, FileSystemAdapter, ImageProcessorAdapter, LoggerAdapter, NetworkAdapter, PlatformAdapter, PlatformType, detectPlatform } from './platform/index.js';
|
|
20
22
|
export { createNativePlatformAdapter } from './platform/index.native.js';
|
|
23
|
+
export { OfflineDataProvider } from './provider/index.native.js';
|
|
21
24
|
export { ATTACHMENT_TABLE, AbstractAttachmentQueue, AttachmentState, AttachmentTable, AttachmentTableOptions, AttachmentQueueOptions as BaseAttachmentQueueOptions, DEFAULT_ATTACHMENT_QUEUE_OPTIONS, EncodingType, AttachmentRecord as OfficialAttachmentRecord, StorageAdapter } from '@powersync/attachments';
|
|
22
25
|
export { AbstractPowerSyncDatabase as PowerSyncDBInterface } from '@powersync/common';
|
|
26
|
+
export { g as DatabaseColumnDef, D as DatabaseSchemaObject, f as DatabaseTableDef, P as PolConfig, c as PolConfigAttachments, d as PolConfigConnector, e as PolConfigSync, a as ProcessedPolConfig, b as ProcessedTableStrategy, T as TableSpec } from './types-BhAEsJj-.js';
|
|
23
27
|
import '@supabase/supabase-js';
|
|
28
|
+
import '@powersync/react-native';
|
|
24
29
|
import 'react';
|
|
25
30
|
import '@tanstack/react-query';
|
|
26
|
-
import '@powersync/react-native';
|