@pol-studios/powersync 1.0.19 → 1.0.21
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/{chunk-HWSNV45P.js → chunk-FEL22ID3.js} +1 -1
- package/dist/{chunk-VACPAAQZ.js → chunk-I2AYMY5O.js} +2 -1
- package/dist/chunk-I2AYMY5O.js.map +1 -0
- package/dist/{chunk-KN2IZERF.js → chunk-IMRSLJRV.js} +233 -11
- package/dist/chunk-IMRSLJRV.js.map +1 -0
- package/dist/{chunk-BRXQNASY.js → chunk-N4K7E53V.js} +4 -4
- package/dist/{chunk-CUCAYK7Z.js → chunk-PG2NPQG3.js} +2 -2
- package/dist/{chunk-63PXSPIN.js → chunk-XOCIONAA.js} +3 -3
- package/dist/connector/index.d.ts +180 -4
- package/dist/connector/index.js +27 -5
- package/dist/core/index.d.ts +8 -1
- package/dist/core/index.js +3 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +31 -7
- package/dist/index.native.d.ts +4 -4
- package/dist/index.native.js +31 -7
- package/dist/index.web.d.ts +4 -4
- package/dist/index.web.js +31 -7
- package/dist/provider/index.d.ts +2 -2
- package/dist/provider/index.js +4 -4
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +3 -3
- package/dist/{supabase-connector-T9vHq_3i.d.ts → supabase-connector-WuiFiBnV.d.ts} +2 -1
- package/dist/sync/index.js +2 -2
- package/dist/{types-B212hgfA.d.ts → types-DiBvmGEi.d.ts} +81 -1
- package/package.json +2 -2
- package/dist/chunk-KN2IZERF.js.map +0 -1
- package/dist/chunk-VACPAAQZ.js.map +0 -1
- /package/dist/{chunk-HWSNV45P.js.map → chunk-FEL22ID3.js.map} +0 -0
- /package/dist/{chunk-BRXQNASY.js.map → chunk-N4K7E53V.js.map} +0 -0
- /package/dist/{chunk-CUCAYK7Z.js.map → chunk-PG2NPQG3.js.map} +0 -0
- /package/dist/{chunk-63PXSPIN.js.map → chunk-XOCIONAA.js.map} +0 -0
package/dist/core/index.js
CHANGED
|
@@ -44,11 +44,12 @@ import {
|
|
|
44
44
|
classifySupabaseError,
|
|
45
45
|
createSyncError,
|
|
46
46
|
extractEntityIds,
|
|
47
|
+
extractHttpStatusCode,
|
|
47
48
|
extractTableNames,
|
|
48
49
|
generateFailureId,
|
|
49
50
|
isRlsError,
|
|
50
51
|
toSyncOperationError
|
|
51
|
-
} from "../chunk-
|
|
52
|
+
} from "../chunk-I2AYMY5O.js";
|
|
52
53
|
export {
|
|
53
54
|
ATTACHMENT_DOWNLOAD_TIMEOUT_MS,
|
|
54
55
|
ATTACHMENT_RETRY_DELAY_MS,
|
|
@@ -92,6 +93,7 @@ export {
|
|
|
92
93
|
classifySupabaseError,
|
|
93
94
|
createSyncError,
|
|
94
95
|
extractEntityIds,
|
|
96
|
+
extractHttpStatusCode,
|
|
95
97
|
extractTableNames,
|
|
96
98
|
generateFailureId,
|
|
97
99
|
isRlsError,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { A as AbstractPowerSyncDatabase } from './types-CDqWh56B.js';
|
|
2
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, isRlsError, toSyncOperationError } from './core/index.js';
|
|
4
|
-
import {
|
|
5
|
-
export { A as AuthProvider,
|
|
6
|
-
export { S as SupabaseConnector } from './supabase-connector-
|
|
7
|
-
export { AuthRefreshError, CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitOpenError, CircuitState, DEFAULT_CIRCUIT_BREAKER_CONFIG, SupabaseAuthOptions, createSupabaseAuth } from './connector/index.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, extractHttpStatusCode, extractTableNames, generateFailureId, isRlsError, toSyncOperationError } from './core/index.js';
|
|
4
|
+
import { m as ConflictDetectionConfig, j as ConflictCheckResult } from './types-DiBvmGEi.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-DiBvmGEi.js';
|
|
6
|
+
export { S as SupabaseConnector } from './supabase-connector-WuiFiBnV.js';
|
|
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
8
|
export { e as AttachmentConfig, z as AttachmentRecord, A as AttachmentSourceConfig, w as AttachmentStatsRow, f as AttachmentStorageAdapter, v as AttachmentSyncStats, u as AttachmentSyncStatus, B as BatchFilterContext, m as CACHE_SIZE_PRESETS, k as CacheConfig, x as CacheFileRow, n as CacheSizePreset, o as CacheSizeValue, y as CachedSizeRow, C as CompressionConfig, 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, P as PolAttachmentQueue, a as PolAttachmentQueueOptions, d as PolAttachmentRecord, b as PolAttachmentState, S as SkipDownloadContext, U as UploadConfig, h as UploadHandler, s as UploadPhase, t as UploadStatus, W as WatchConfig, c as createPolAttachmentQueue, p as formatCacheSize } from './pol-attachment-queue-BVAIueoP.js';
|
|
9
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, determineAttachmentState, downloadRecord, enforceCacheLimit, ensureFileUri, extractErrorCode, 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
10
|
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';
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
useAttachmentQueueContext,
|
|
5
5
|
usePowerSyncContext,
|
|
6
6
|
useSyncStatusContext
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XOCIONAA.js";
|
|
8
8
|
import {
|
|
9
9
|
DOWNLOAD_WORKFLOW_STATES,
|
|
10
10
|
STATE_MAPPING,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
OfflineDataProvider,
|
|
35
35
|
PowerSyncProvider,
|
|
36
36
|
ProviderBridge
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-N4K7E53V.js";
|
|
38
38
|
import "./chunk-YHTZ7VMV.js";
|
|
39
39
|
import {
|
|
40
40
|
PowerSyncErrorBoundary
|
|
@@ -117,7 +117,7 @@ import {
|
|
|
117
117
|
HealthMonitor,
|
|
118
118
|
MetricsCollector,
|
|
119
119
|
SyncStatusTracker
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-PG2NPQG3.js";
|
|
121
121
|
import {
|
|
122
122
|
DEFAULT_CONNECTION_HEALTH,
|
|
123
123
|
DEFAULT_SYNC_CONFIG,
|
|
@@ -236,17 +236,28 @@ import {
|
|
|
236
236
|
CircuitOpenError,
|
|
237
237
|
DEFAULT_CIRCUIT_BREAKER_CONFIG,
|
|
238
238
|
createSupabaseAuth
|
|
239
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-FEL22ID3.js";
|
|
240
240
|
import {
|
|
241
241
|
ConflictDetectionError,
|
|
242
242
|
DEFAULT_RETRY_CONFIG,
|
|
243
|
+
DiscardEntryError,
|
|
243
244
|
SupabaseConnector,
|
|
245
|
+
TransactionAbortError,
|
|
244
246
|
defaultSchemaRouter,
|
|
245
247
|
detectConflicts,
|
|
248
|
+
discardOnHttpStatus,
|
|
249
|
+
discardOnPgCodes,
|
|
250
|
+
discardOrphaned,
|
|
246
251
|
fetchServerVersion,
|
|
247
252
|
getLocalVersion,
|
|
248
|
-
hasVersionColumn
|
|
249
|
-
|
|
253
|
+
hasVersionColumn,
|
|
254
|
+
idempotentTables,
|
|
255
|
+
retryOnHttpStatus,
|
|
256
|
+
runUploadErrorMiddleware,
|
|
257
|
+
runUploadErrorMiddlewareSync,
|
|
258
|
+
successOnPgCodes,
|
|
259
|
+
tableHandlers
|
|
260
|
+
} from "./chunk-IMRSLJRV.js";
|
|
250
261
|
import {
|
|
251
262
|
AbortError,
|
|
252
263
|
DEFAULT_BACKOFF_CONFIG,
|
|
@@ -268,11 +279,12 @@ import {
|
|
|
268
279
|
classifySupabaseError,
|
|
269
280
|
createSyncError,
|
|
270
281
|
extractEntityIds,
|
|
282
|
+
extractHttpStatusCode,
|
|
271
283
|
extractTableNames,
|
|
272
284
|
generateFailureId,
|
|
273
285
|
isRlsError,
|
|
274
286
|
toSyncOperationError
|
|
275
|
-
} from "./chunk-
|
|
287
|
+
} from "./chunk-I2AYMY5O.js";
|
|
276
288
|
export {
|
|
277
289
|
ATTACHMENT_DOWNLOAD_TIMEOUT_MS,
|
|
278
290
|
ATTACHMENT_RETRY_DELAY_MS,
|
|
@@ -324,6 +336,7 @@ export {
|
|
|
324
336
|
DOWNLOAD_STOP_THRESHOLD,
|
|
325
337
|
DOWNLOAD_WORKFLOW_STATES,
|
|
326
338
|
DeadLetterQueue,
|
|
339
|
+
DiscardEntryError,
|
|
327
340
|
EVICTION_TRIGGER_THRESHOLD,
|
|
328
341
|
EncodingType,
|
|
329
342
|
FailedTransactionsContext,
|
|
@@ -373,6 +386,7 @@ export {
|
|
|
373
386
|
SyncStatusContext,
|
|
374
387
|
SyncStatusTracker,
|
|
375
388
|
TERMINAL_STATES,
|
|
389
|
+
TransactionAbortError,
|
|
376
390
|
UPLOAD_WORKFLOW_STATES,
|
|
377
391
|
VALID_STATES,
|
|
378
392
|
addJitter,
|
|
@@ -405,11 +419,15 @@ export {
|
|
|
405
419
|
defineBackgroundSyncTask,
|
|
406
420
|
detectConflicts,
|
|
407
421
|
determineAttachmentState,
|
|
422
|
+
discardOnHttpStatus,
|
|
423
|
+
discardOnPgCodes,
|
|
424
|
+
discardOrphaned,
|
|
408
425
|
downloadRecord,
|
|
409
426
|
enforceCacheLimit,
|
|
410
427
|
ensureFileUri,
|
|
411
428
|
extractEntityIds,
|
|
412
429
|
extractErrorCode,
|
|
430
|
+
extractHttpStatusCode,
|
|
413
431
|
extractTableNames,
|
|
414
432
|
fetchServerVersion,
|
|
415
433
|
formatBytes,
|
|
@@ -435,6 +453,7 @@ export {
|
|
|
435
453
|
getStorageErrorMessage,
|
|
436
454
|
getSyncedUploadsWithPendingCallback,
|
|
437
455
|
hasVersionColumn,
|
|
456
|
+
idempotentTables,
|
|
438
457
|
initializeBackgroundSync,
|
|
439
458
|
isAudioMimeType,
|
|
440
459
|
isBackgroundSyncRegistered,
|
|
@@ -463,10 +482,15 @@ export {
|
|
|
463
482
|
recordMigration,
|
|
464
483
|
registerBackgroundSync,
|
|
465
484
|
resolveBucket,
|
|
485
|
+
retryOnHttpStatus,
|
|
486
|
+
runUploadErrorMiddleware,
|
|
487
|
+
runUploadErrorMiddlewareSync,
|
|
466
488
|
scheduleUploadRetry,
|
|
467
489
|
sleep,
|
|
468
490
|
startUploadProcessing,
|
|
469
491
|
stripFileUri,
|
|
492
|
+
successOnPgCodes,
|
|
493
|
+
tableHandlers,
|
|
470
494
|
toSyncOperationError,
|
|
471
495
|
unregisterBackgroundSync,
|
|
472
496
|
uploadOne,
|
package/dist/index.native.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
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, isRlsError, toSyncOperationError } from './core/index.js';
|
|
3
|
-
export { A as AuthProvider,
|
|
4
|
-
export { S as SupabaseConnector } from './supabase-connector-
|
|
5
|
-
export { AuthRefreshError, CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitOpenError, CircuitState, DEFAULT_CIRCUIT_BREAKER_CONFIG, SupabaseAuthOptions, createSupabaseAuth } from './connector/index.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, 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-DiBvmGEi.js';
|
|
4
|
+
export { S as SupabaseConnector } from './supabase-connector-WuiFiBnV.js';
|
|
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
6
|
export { e as AttachmentConfig, z as AttachmentRecord, A as AttachmentSourceConfig, w as AttachmentStatsRow, f as AttachmentStorageAdapter, v as AttachmentSyncStats, u as AttachmentSyncStatus, B as BatchFilterContext, m as CACHE_SIZE_PRESETS, k as CacheConfig, x as CacheFileRow, n as CacheSizePreset, o as CacheSizeValue, y as CachedSizeRow, C as CompressionConfig, 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, P as PolAttachmentQueue, a as PolAttachmentQueueOptions, d as PolAttachmentRecord, b as PolAttachmentState, S as SkipDownloadContext, U as UploadConfig, h as UploadHandler, s as UploadPhase, t as UploadStatus, W as WatchConfig, c as createPolAttachmentQueue, p as formatCacheSize } from './pol-attachment-queue-BVAIueoP.js';
|
|
7
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, determineAttachmentState, downloadRecord, enforceCacheLimit, ensureFileUri, extractErrorCode, 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
8
|
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';
|
package/dist/index.native.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
useAttachmentQueueContext,
|
|
5
5
|
usePowerSyncContext,
|
|
6
6
|
useSyncStatusContext
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XOCIONAA.js";
|
|
8
8
|
import {
|
|
9
9
|
DOWNLOAD_WORKFLOW_STATES,
|
|
10
10
|
STATE_MAPPING,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
OfflineDataProvider,
|
|
35
35
|
PowerSyncProvider,
|
|
36
36
|
ProviderBridge
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-N4K7E53V.js";
|
|
38
38
|
import "./chunk-YHTZ7VMV.js";
|
|
39
39
|
import {
|
|
40
40
|
PowerSyncErrorBoundary
|
|
@@ -117,7 +117,7 @@ import {
|
|
|
117
117
|
HealthMonitor,
|
|
118
118
|
MetricsCollector,
|
|
119
119
|
SyncStatusTracker
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-PG2NPQG3.js";
|
|
121
121
|
import {
|
|
122
122
|
DEFAULT_CONNECTION_HEALTH,
|
|
123
123
|
DEFAULT_SYNC_CONFIG,
|
|
@@ -238,17 +238,28 @@ import {
|
|
|
238
238
|
CircuitOpenError,
|
|
239
239
|
DEFAULT_CIRCUIT_BREAKER_CONFIG,
|
|
240
240
|
createSupabaseAuth
|
|
241
|
-
} from "./chunk-
|
|
241
|
+
} from "./chunk-FEL22ID3.js";
|
|
242
242
|
import {
|
|
243
243
|
ConflictDetectionError,
|
|
244
244
|
DEFAULT_RETRY_CONFIG,
|
|
245
|
+
DiscardEntryError,
|
|
245
246
|
SupabaseConnector,
|
|
247
|
+
TransactionAbortError,
|
|
246
248
|
defaultSchemaRouter,
|
|
247
249
|
detectConflicts,
|
|
250
|
+
discardOnHttpStatus,
|
|
251
|
+
discardOnPgCodes,
|
|
252
|
+
discardOrphaned,
|
|
248
253
|
fetchServerVersion,
|
|
249
254
|
getLocalVersion,
|
|
250
|
-
hasVersionColumn
|
|
251
|
-
|
|
255
|
+
hasVersionColumn,
|
|
256
|
+
idempotentTables,
|
|
257
|
+
retryOnHttpStatus,
|
|
258
|
+
runUploadErrorMiddleware,
|
|
259
|
+
runUploadErrorMiddlewareSync,
|
|
260
|
+
successOnPgCodes,
|
|
261
|
+
tableHandlers
|
|
262
|
+
} from "./chunk-IMRSLJRV.js";
|
|
252
263
|
import {
|
|
253
264
|
AbortError,
|
|
254
265
|
DEFAULT_BACKOFF_CONFIG,
|
|
@@ -270,11 +281,12 @@ import {
|
|
|
270
281
|
classifySupabaseError,
|
|
271
282
|
createSyncError,
|
|
272
283
|
extractEntityIds,
|
|
284
|
+
extractHttpStatusCode,
|
|
273
285
|
extractTableNames,
|
|
274
286
|
generateFailureId,
|
|
275
287
|
isRlsError,
|
|
276
288
|
toSyncOperationError
|
|
277
|
-
} from "./chunk-
|
|
289
|
+
} from "./chunk-I2AYMY5O.js";
|
|
278
290
|
export {
|
|
279
291
|
ATTACHMENT_DOWNLOAD_TIMEOUT_MS,
|
|
280
292
|
ATTACHMENT_RETRY_DELAY_MS,
|
|
@@ -326,6 +338,7 @@ export {
|
|
|
326
338
|
DOWNLOAD_STOP_THRESHOLD,
|
|
327
339
|
DOWNLOAD_WORKFLOW_STATES,
|
|
328
340
|
DeadLetterQueue,
|
|
341
|
+
DiscardEntryError,
|
|
329
342
|
EVICTION_TRIGGER_THRESHOLD,
|
|
330
343
|
EncodingType,
|
|
331
344
|
FailedTransactionsContext,
|
|
@@ -375,6 +388,7 @@ export {
|
|
|
375
388
|
SyncStatusContext,
|
|
376
389
|
SyncStatusTracker,
|
|
377
390
|
TERMINAL_STATES,
|
|
391
|
+
TransactionAbortError,
|
|
378
392
|
UPLOAD_WORKFLOW_STATES,
|
|
379
393
|
VALID_STATES,
|
|
380
394
|
addJitter,
|
|
@@ -408,11 +422,15 @@ export {
|
|
|
408
422
|
defineBackgroundSyncTask,
|
|
409
423
|
detectConflicts,
|
|
410
424
|
determineAttachmentState,
|
|
425
|
+
discardOnHttpStatus,
|
|
426
|
+
discardOnPgCodes,
|
|
427
|
+
discardOrphaned,
|
|
411
428
|
downloadRecord,
|
|
412
429
|
enforceCacheLimit,
|
|
413
430
|
ensureFileUri,
|
|
414
431
|
extractEntityIds,
|
|
415
432
|
extractErrorCode,
|
|
433
|
+
extractHttpStatusCode,
|
|
416
434
|
extractTableNames,
|
|
417
435
|
fetchServerVersion,
|
|
418
436
|
formatBytes,
|
|
@@ -438,6 +456,7 @@ export {
|
|
|
438
456
|
getStorageErrorMessage,
|
|
439
457
|
getSyncedUploadsWithPendingCallback,
|
|
440
458
|
hasVersionColumn,
|
|
459
|
+
idempotentTables,
|
|
441
460
|
initializeBackgroundSync,
|
|
442
461
|
isAudioMimeType,
|
|
443
462
|
isBackgroundSyncRegistered,
|
|
@@ -466,10 +485,15 @@ export {
|
|
|
466
485
|
recordMigration,
|
|
467
486
|
registerBackgroundSync,
|
|
468
487
|
resolveBucket,
|
|
488
|
+
retryOnHttpStatus,
|
|
489
|
+
runUploadErrorMiddleware,
|
|
490
|
+
runUploadErrorMiddlewareSync,
|
|
469
491
|
scheduleUploadRetry,
|
|
470
492
|
sleep,
|
|
471
493
|
startUploadProcessing,
|
|
472
494
|
stripFileUri,
|
|
495
|
+
successOnPgCodes,
|
|
496
|
+
tableHandlers,
|
|
473
497
|
toSyncOperationError,
|
|
474
498
|
unregisterBackgroundSync,
|
|
475
499
|
uploadOne,
|
package/dist/index.web.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
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, isRlsError, toSyncOperationError } from './core/index.js';
|
|
3
|
-
export { A as AuthProvider,
|
|
4
|
-
export { S as SupabaseConnector } from './supabase-connector-
|
|
5
|
-
export { AuthRefreshError, CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitOpenError, CircuitState, DEFAULT_CIRCUIT_BREAKER_CONFIG, SupabaseAuthOptions, createSupabaseAuth } from './connector/index.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, 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-DiBvmGEi.js';
|
|
4
|
+
export { S as SupabaseConnector } from './supabase-connector-WuiFiBnV.js';
|
|
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
6
|
export { e as AttachmentConfig, z as AttachmentRecord, A as AttachmentSourceConfig, w as AttachmentStatsRow, f as AttachmentStorageAdapter, v as AttachmentSyncStats, u as AttachmentSyncStatus, B as BatchFilterContext, m as CACHE_SIZE_PRESETS, k as CacheConfig, x as CacheFileRow, n as CacheSizePreset, o as CacheSizeValue, y as CachedSizeRow, C as CompressionConfig, 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, P as PolAttachmentQueue, a as PolAttachmentQueueOptions, d as PolAttachmentRecord, b as PolAttachmentState, S as SkipDownloadContext, U as UploadConfig, h as UploadHandler, s as UploadPhase, t as UploadStatus, W as WatchConfig, c as createPolAttachmentQueue, p as formatCacheSize } from './pol-attachment-queue-BVAIueoP.js';
|
|
7
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, determineAttachmentState, downloadRecord, enforceCacheLimit, ensureFileUri, extractErrorCode, 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
8
|
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';
|
package/dist/index.web.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
useAttachmentQueueContext,
|
|
5
5
|
usePowerSyncContext,
|
|
6
6
|
useSyncStatusContext
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XOCIONAA.js";
|
|
8
8
|
import {
|
|
9
9
|
DOWNLOAD_WORKFLOW_STATES,
|
|
10
10
|
STATE_MAPPING,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
OfflineDataProvider,
|
|
35
35
|
PowerSyncProvider,
|
|
36
36
|
ProviderBridge
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-N4K7E53V.js";
|
|
38
38
|
import "./chunk-YHTZ7VMV.js";
|
|
39
39
|
import {
|
|
40
40
|
PowerSyncErrorBoundary
|
|
@@ -117,7 +117,7 @@ import {
|
|
|
117
117
|
HealthMonitor,
|
|
118
118
|
MetricsCollector,
|
|
119
119
|
SyncStatusTracker
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-PG2NPQG3.js";
|
|
121
121
|
import {
|
|
122
122
|
DEFAULT_CONNECTION_HEALTH,
|
|
123
123
|
DEFAULT_SYNC_CONFIG,
|
|
@@ -239,17 +239,28 @@ import {
|
|
|
239
239
|
CircuitOpenError,
|
|
240
240
|
DEFAULT_CIRCUIT_BREAKER_CONFIG,
|
|
241
241
|
createSupabaseAuth
|
|
242
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-FEL22ID3.js";
|
|
243
243
|
import {
|
|
244
244
|
ConflictDetectionError,
|
|
245
245
|
DEFAULT_RETRY_CONFIG,
|
|
246
|
+
DiscardEntryError,
|
|
246
247
|
SupabaseConnector,
|
|
248
|
+
TransactionAbortError,
|
|
247
249
|
defaultSchemaRouter,
|
|
248
250
|
detectConflicts,
|
|
251
|
+
discardOnHttpStatus,
|
|
252
|
+
discardOnPgCodes,
|
|
253
|
+
discardOrphaned,
|
|
249
254
|
fetchServerVersion,
|
|
250
255
|
getLocalVersion,
|
|
251
|
-
hasVersionColumn
|
|
252
|
-
|
|
256
|
+
hasVersionColumn,
|
|
257
|
+
idempotentTables,
|
|
258
|
+
retryOnHttpStatus,
|
|
259
|
+
runUploadErrorMiddleware,
|
|
260
|
+
runUploadErrorMiddlewareSync,
|
|
261
|
+
successOnPgCodes,
|
|
262
|
+
tableHandlers
|
|
263
|
+
} from "./chunk-IMRSLJRV.js";
|
|
253
264
|
import {
|
|
254
265
|
AbortError,
|
|
255
266
|
DEFAULT_BACKOFF_CONFIG,
|
|
@@ -271,11 +282,12 @@ import {
|
|
|
271
282
|
classifySupabaseError,
|
|
272
283
|
createSyncError,
|
|
273
284
|
extractEntityIds,
|
|
285
|
+
extractHttpStatusCode,
|
|
274
286
|
extractTableNames,
|
|
275
287
|
generateFailureId,
|
|
276
288
|
isRlsError,
|
|
277
289
|
toSyncOperationError
|
|
278
|
-
} from "./chunk-
|
|
290
|
+
} from "./chunk-I2AYMY5O.js";
|
|
279
291
|
export {
|
|
280
292
|
ATTACHMENT_DOWNLOAD_TIMEOUT_MS,
|
|
281
293
|
ATTACHMENT_RETRY_DELAY_MS,
|
|
@@ -327,6 +339,7 @@ export {
|
|
|
327
339
|
DOWNLOAD_STOP_THRESHOLD,
|
|
328
340
|
DOWNLOAD_WORKFLOW_STATES,
|
|
329
341
|
DeadLetterQueue,
|
|
342
|
+
DiscardEntryError,
|
|
330
343
|
EVICTION_TRIGGER_THRESHOLD,
|
|
331
344
|
EncodingType,
|
|
332
345
|
FailedTransactionsContext,
|
|
@@ -376,6 +389,7 @@ export {
|
|
|
376
389
|
SyncStatusContext,
|
|
377
390
|
SyncStatusTracker,
|
|
378
391
|
TERMINAL_STATES,
|
|
392
|
+
TransactionAbortError,
|
|
379
393
|
UPLOAD_WORKFLOW_STATES,
|
|
380
394
|
VALID_STATES,
|
|
381
395
|
addJitter,
|
|
@@ -409,11 +423,15 @@ export {
|
|
|
409
423
|
defineBackgroundSyncTask,
|
|
410
424
|
detectConflicts,
|
|
411
425
|
determineAttachmentState,
|
|
426
|
+
discardOnHttpStatus,
|
|
427
|
+
discardOnPgCodes,
|
|
428
|
+
discardOrphaned,
|
|
412
429
|
downloadRecord,
|
|
413
430
|
enforceCacheLimit,
|
|
414
431
|
ensureFileUri,
|
|
415
432
|
extractEntityIds,
|
|
416
433
|
extractErrorCode,
|
|
434
|
+
extractHttpStatusCode,
|
|
417
435
|
extractTableNames,
|
|
418
436
|
fetchServerVersion,
|
|
419
437
|
formatBytes,
|
|
@@ -439,6 +457,7 @@ export {
|
|
|
439
457
|
getStorageErrorMessage,
|
|
440
458
|
getSyncedUploadsWithPendingCallback,
|
|
441
459
|
hasVersionColumn,
|
|
460
|
+
idempotentTables,
|
|
442
461
|
initializeBackgroundSync,
|
|
443
462
|
isAudioMimeType,
|
|
444
463
|
isBackgroundSyncRegistered,
|
|
@@ -467,10 +486,15 @@ export {
|
|
|
467
486
|
recordMigration,
|
|
468
487
|
registerBackgroundSync,
|
|
469
488
|
resolveBucket,
|
|
489
|
+
retryOnHttpStatus,
|
|
490
|
+
runUploadErrorMiddleware,
|
|
491
|
+
runUploadErrorMiddlewareSync,
|
|
470
492
|
scheduleUploadRetry,
|
|
471
493
|
sleep,
|
|
472
494
|
startUploadProcessing,
|
|
473
495
|
stripFileUri,
|
|
496
|
+
successOnPgCodes,
|
|
497
|
+
tableHandlers,
|
|
474
498
|
toSyncOperationError,
|
|
475
499
|
unregisterBackgroundSync,
|
|
476
500
|
uploadOne,
|
package/dist/provider/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { SupabaseClient } from '@supabase/supabase-js';
|
|
|
2
2
|
import { QueryClient } from '@tanstack/react-query';
|
|
3
3
|
import { A as AbstractPowerSyncDatabase, a as SyncStatus, C as CrudEntry, S as SyncMode, F as FailedTransaction, h as CompletedTransaction, b as ConnectionHealth, e as SyncMetrics, D as DownloadProgress, E as EntitySyncState, f as SyncError } from '../types-CDqWh56B.js';
|
|
4
4
|
import { PlatformAdapter } from '../platform/index.js';
|
|
5
|
-
import { a as ConnectorConfig,
|
|
5
|
+
import { a as ConnectorConfig, i as ConflictBus } from '../types-DiBvmGEi.js';
|
|
6
6
|
import { e as AttachmentConfig, P as PolAttachmentQueue, A as AttachmentSourceConfig, z as AttachmentRecord, C as CompressionConfig, i as DownloadConfig } from '../pol-attachment-queue-BVAIueoP.js';
|
|
7
|
-
import { S as SupabaseConnector } from '../supabase-connector-
|
|
7
|
+
import { S as SupabaseConnector } from '../supabase-connector-WuiFiBnV.js';
|
|
8
8
|
import * as react from 'react';
|
|
9
9
|
import react__default, { ReactNode } from 'react';
|
|
10
10
|
import { Schema } from '@powersync/react-native';
|
package/dist/provider/index.js
CHANGED
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
OfflineDataProvider,
|
|
3
3
|
PowerSyncProvider,
|
|
4
4
|
ProviderBridge
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-N4K7E53V.js";
|
|
6
6
|
import "../chunk-YHTZ7VMV.js";
|
|
7
7
|
import "../chunk-P6WOZO7H.js";
|
|
8
8
|
import "../chunk-4TXTAEF2.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-PG2NPQG3.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_CONNECTION_HEALTH,
|
|
12
12
|
DEFAULT_SYNC_CONFIG,
|
|
@@ -56,9 +56,9 @@ import "../chunk-XAEII4ZX.js";
|
|
|
56
56
|
import "../chunk-Z6VOBGTU.js";
|
|
57
57
|
import "../chunk-CGL33PL4.js";
|
|
58
58
|
import "../chunk-WN5ZJ3E2.js";
|
|
59
|
-
import "../chunk-
|
|
59
|
+
import "../chunk-IMRSLJRV.js";
|
|
60
60
|
import "../chunk-FV2HXEIY.js";
|
|
61
|
-
import "../chunk-
|
|
61
|
+
import "../chunk-I2AYMY5O.js";
|
|
62
62
|
export {
|
|
63
63
|
AttachmentQueueContext,
|
|
64
64
|
CompletedTransactionsContext,
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { ReactNode } from 'react';
|
|
3
3
|
import { Schema } from '@powersync/react-native';
|
|
4
|
-
import { A as AuthProvider } from '../types-
|
|
4
|
+
import { A as AuthProvider } from '../types-DiBvmGEi.js';
|
|
5
5
|
import { a as StorageBackend } from '../types-D0WcHrq6.js';
|
|
6
6
|
import { e as AttachmentConfig, P as PolAttachmentQueue } from '../pol-attachment-queue-BVAIueoP.js';
|
|
7
7
|
import { PlatformAdapter } from '../platform/index.js';
|
package/dist/react/index.js
CHANGED
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
useAttachmentQueueContext,
|
|
7
7
|
usePowerSyncContext,
|
|
8
8
|
useSyncStatusContext
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-XOCIONAA.js";
|
|
10
10
|
import "../chunk-4TXTAEF2.js";
|
|
11
11
|
import "../chunk-24RDMMCL.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-IMRSLJRV.js";
|
|
13
13
|
import "../chunk-FV2HXEIY.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-I2AYMY5O.js";
|
|
15
15
|
export {
|
|
16
16
|
AttachmentQueueContext,
|
|
17
17
|
PowerSyncContext,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as PowerSyncBackendConnector, A as AbstractPowerSyncDatabase } from './types-CDqWh56B.js';
|
|
2
|
-
import { S as SupabaseConnectorOptions, P as PowerSyncCredentials } from './types-
|
|
2
|
+
import { S as SupabaseConnectorOptions, P as PowerSyncCredentials } from './types-DiBvmGEi.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Supabase Connector for PowerSync
|
|
@@ -85,6 +85,7 @@ declare class SupabaseConnector implements PowerSyncBackendConnector {
|
|
|
85
85
|
private autoRetryPaused;
|
|
86
86
|
private entryCooldowns;
|
|
87
87
|
private static readonly COOLDOWN_DURATION_MS;
|
|
88
|
+
private readonly uploadErrorMiddleware;
|
|
88
89
|
constructor(options: SupabaseConnectorOptions);
|
|
89
90
|
/**
|
|
90
91
|
* Clean up resources (unsubscribe from event listeners).
|
package/dist/sync/index.js
CHANGED
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
HealthMonitor,
|
|
13
13
|
MetricsCollector,
|
|
14
14
|
SyncStatusTracker
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-PG2NPQG3.js";
|
|
16
16
|
import "../chunk-24RDMMCL.js";
|
|
17
17
|
import "../chunk-CGL33PL4.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-I2AYMY5O.js";
|
|
19
19
|
export {
|
|
20
20
|
DeadLetterQueue,
|
|
21
21
|
HealthMonitor,
|