@pol-studios/powersync 1.0.7 → 1.0.11
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 +933 -0
- package/dist/CacheSettingsManager-uz-kbnRH.d.ts +461 -0
- package/dist/attachments/index.d.ts +709 -6
- package/dist/attachments/index.js +133 -5
- package/dist/chunk-24RDMMCL.js +44 -0
- package/dist/chunk-24RDMMCL.js.map +1 -0
- package/dist/chunk-4TXTAEF2.js +2060 -0
- package/dist/chunk-4TXTAEF2.js.map +1 -0
- package/dist/chunk-63PXSPIN.js +358 -0
- package/dist/chunk-63PXSPIN.js.map +1 -0
- package/dist/chunk-654ERHA7.js +1 -0
- package/dist/{chunk-BREGB4WL.js → chunk-BRXQNASY.js} +287 -335
- package/dist/chunk-BRXQNASY.js.map +1 -0
- package/dist/{chunk-DHYUBVP7.js → chunk-CAB26E6F.js} +20 -9
- package/dist/chunk-CAB26E6F.js.map +1 -0
- package/dist/{chunk-H772V6XQ.js → chunk-CUCAYK7Z.js} +7 -43
- package/dist/chunk-CUCAYK7Z.js.map +1 -0
- package/dist/{chunk-4C3RY5SU.js → chunk-HWSNV45P.js} +76 -1
- package/dist/chunk-HWSNV45P.js.map +1 -0
- package/dist/{chunk-HFOFLW5F.js → chunk-KN2IZERF.js} +139 -6
- package/dist/chunk-KN2IZERF.js.map +1 -0
- package/dist/{chunk-UEYRTLKE.js → chunk-P4HZA6ZT.js} +20 -9
- package/dist/chunk-P4HZA6ZT.js.map +1 -0
- package/dist/chunk-T4AO7JIG.js +1 -0
- package/dist/{chunk-XQAJM2MW.js → chunk-VACPAAQZ.js} +33 -2
- package/dist/{chunk-XQAJM2MW.js.map → chunk-VACPAAQZ.js.map} +1 -1
- package/dist/{chunk-53WH2JJV.js → chunk-WN5ZJ3E2.js} +5 -8
- package/dist/chunk-WN5ZJ3E2.js.map +1 -0
- package/dist/chunk-XAEII4ZX.js +456 -0
- package/dist/chunk-XAEII4ZX.js.map +1 -0
- package/dist/chunk-XOY2CJ67.js +289 -0
- package/dist/chunk-XOY2CJ67.js.map +1 -0
- package/dist/chunk-YHTZ7VMV.js +1 -0
- package/dist/{chunk-MKD2VCX3.js → chunk-Z6VOBGTU.js} +8 -8
- package/dist/chunk-Z6VOBGTU.js.map +1 -0
- package/dist/chunk-ZM4ENYMF.js +230 -0
- package/dist/chunk-ZM4ENYMF.js.map +1 -0
- package/dist/connector/index.d.ts +56 -3
- package/dist/connector/index.js +8 -5
- package/dist/core/index.d.ts +12 -1
- package/dist/core/index.js +3 -2
- package/dist/error/index.js +0 -1
- package/dist/generator/cli.js +527 -0
- package/dist/generator/index.d.ts +168 -0
- package/dist/generator/index.js +370 -0
- package/dist/generator/index.js.map +1 -0
- package/dist/index.d.ts +12 -10
- package/dist/index.js +191 -29
- package/dist/index.native.d.ts +11 -9
- package/dist/index.native.js +191 -29
- package/dist/index.web.d.ts +11 -9
- package/dist/index.web.js +191 -29
- package/dist/maintenance/index.js +0 -1
- package/dist/platform/index.js +0 -2
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/index.native.js +1 -2
- package/dist/platform/index.web.js +0 -1
- package/dist/pol-attachment-queue-BVAIueoP.d.ts +817 -0
- package/dist/provider/index.d.ts +38 -34
- package/dist/provider/index.js +11 -12
- package/dist/react/index.d.ts +372 -0
- package/dist/react/index.js +25 -0
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +22 -8
- package/dist/storage/index.native.d.ts +3 -3
- package/dist/storage/index.native.js +21 -7
- package/dist/storage/index.web.d.ts +3 -3
- package/dist/storage/index.web.js +21 -7
- package/dist/storage/upload/index.d.ts +7 -8
- package/dist/storage/upload/index.js +3 -3
- package/dist/storage/upload/index.native.d.ts +7 -8
- package/dist/storage/upload/index.native.js +4 -3
- package/dist/storage/upload/index.web.d.ts +1 -4
- package/dist/storage/upload/index.web.js +3 -3
- package/dist/supabase-connector-T9vHq_3i.d.ts +202 -0
- package/dist/sync/index.js +3 -3
- package/dist/{supabase-connector-qLm-WHkM.d.ts → types-B212hgfA.d.ts} +48 -170
- package/dist/{types-BVacP54t.d.ts → types-CyvBaAl8.d.ts} +12 -4
- package/dist/types-D0WcHrq6.d.ts +234 -0
- package/package.json +28 -4
- package/dist/CacheSettingsManager-1exbOC6S.d.ts +0 -261
- package/dist/chunk-4C3RY5SU.js.map +0 -1
- package/dist/chunk-53WH2JJV.js.map +0 -1
- package/dist/chunk-BREGB4WL.js.map +0 -1
- package/dist/chunk-DGUM43GV.js +0 -11
- package/dist/chunk-DHYUBVP7.js.map +0 -1
- package/dist/chunk-GKF7TOMT.js +0 -1
- package/dist/chunk-H772V6XQ.js.map +0 -1
- package/dist/chunk-HFOFLW5F.js.map +0 -1
- package/dist/chunk-KGSFAE5B.js +0 -1
- package/dist/chunk-LNL64IJZ.js +0 -1
- package/dist/chunk-MKD2VCX3.js.map +0 -1
- package/dist/chunk-UEYRTLKE.js.map +0 -1
- package/dist/chunk-WQ5MPAVC.js +0 -449
- package/dist/chunk-WQ5MPAVC.js.map +0 -1
- package/dist/chunk-ZEOKPWUC.js +0 -1165
- package/dist/chunk-ZEOKPWUC.js.map +0 -1
- package/dist/pol-attachment-queue-C7YNXXhK.d.ts +0 -676
- package/dist/types-Bgvx7-E8.d.ts +0 -187
- /package/dist/{chunk-DGUM43GV.js.map → chunk-654ERHA7.js.map} +0 -0
- /package/dist/{chunk-GKF7TOMT.js.map → chunk-T4AO7JIG.js.map} +0 -0
- /package/dist/{chunk-KGSFAE5B.js.map → chunk-YHTZ7VMV.js.map} +0 -0
- /package/dist/{chunk-LNL64IJZ.js.map → react/index.js.map} +0 -0
package/dist/index.native.js
CHANGED
|
@@ -1,11 +1,41 @@
|
|
|
1
|
-
import "./chunk-
|
|
2
|
-
import
|
|
1
|
+
import "./chunk-654ERHA7.js";
|
|
2
|
+
import {
|
|
3
|
+
SlimPowerSyncProvider,
|
|
4
|
+
useAttachmentQueueContext,
|
|
5
|
+
usePowerSyncContext,
|
|
6
|
+
useSyncStatusContext
|
|
7
|
+
} from "./chunk-63PXSPIN.js";
|
|
8
|
+
import {
|
|
9
|
+
DOWNLOAD_WORKFLOW_STATES,
|
|
10
|
+
STATE_MAPPING,
|
|
11
|
+
STATE_NAMES,
|
|
12
|
+
TERMINAL_STATES,
|
|
13
|
+
UPLOAD_WORKFLOW_STATES,
|
|
14
|
+
VALID_STATES,
|
|
15
|
+
buildIdOnlyWatchQuery,
|
|
16
|
+
buildRecordFetchQuery,
|
|
17
|
+
buildWatchQuery,
|
|
18
|
+
createMigrationStats,
|
|
19
|
+
formatMigrationStats,
|
|
20
|
+
getStateName,
|
|
21
|
+
isDownloadWorkflowState,
|
|
22
|
+
isTerminalState,
|
|
23
|
+
isUploadWorkflowState,
|
|
24
|
+
isValidAttachmentState,
|
|
25
|
+
migrateAttachmentState,
|
|
26
|
+
migrateAttachmentStateSafe,
|
|
27
|
+
recordMigration,
|
|
28
|
+
validateSqlIdentifier as validateSqlIdentifier2,
|
|
29
|
+
validateWhereClause,
|
|
30
|
+
watchConfigToSourceConfig
|
|
31
|
+
} from "./chunk-ZM4ENYMF.js";
|
|
3
32
|
import {
|
|
4
33
|
ConflictBus,
|
|
5
34
|
OfflineDataProvider,
|
|
6
35
|
PowerSyncProvider,
|
|
7
36
|
ProviderBridge
|
|
8
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-BRXQNASY.js";
|
|
38
|
+
import "./chunk-YHTZ7VMV.js";
|
|
9
39
|
import {
|
|
10
40
|
PowerSyncErrorBoundary
|
|
11
41
|
} from "./chunk-P6WOZO7H.js";
|
|
@@ -14,16 +44,65 @@ import {
|
|
|
14
44
|
AbstractAttachmentQueue,
|
|
15
45
|
AttachmentState,
|
|
16
46
|
AttachmentTable,
|
|
47
|
+
CACHE_SIZE_PRESETS,
|
|
17
48
|
DEFAULT_ATTACHMENT_QUEUE_OPTIONS,
|
|
18
49
|
DEFAULT_CACHE_CONFIG,
|
|
19
50
|
DEFAULT_COMPRESSION_CONFIG,
|
|
51
|
+
DEFAULT_DOWNLOAD_CONFIG,
|
|
20
52
|
DEFAULT_UPLOAD_CONFIG,
|
|
21
53
|
EncodingType,
|
|
54
|
+
LOCALLY_AVAILABLE_STATES,
|
|
55
|
+
PENDING_DOWNLOAD_STATES,
|
|
56
|
+
PROTECTED_UPLOAD_STATES,
|
|
22
57
|
PolAttachmentQueue,
|
|
23
58
|
PolAttachmentState,
|
|
24
59
|
PolStorageAdapter,
|
|
25
|
-
|
|
26
|
-
|
|
60
|
+
blobToArrayBuffer,
|
|
61
|
+
cacheLocalFile,
|
|
62
|
+
clearCache,
|
|
63
|
+
clearUploadCallback,
|
|
64
|
+
copyToManagedCache,
|
|
65
|
+
createCacheManagerDeps,
|
|
66
|
+
createPolAttachmentQueue,
|
|
67
|
+
createUploadManagerDeps,
|
|
68
|
+
createUploadManagerState,
|
|
69
|
+
determineAttachmentState,
|
|
70
|
+
downloadRecord,
|
|
71
|
+
enforceCacheLimit,
|
|
72
|
+
ensureFileUri,
|
|
73
|
+
extractErrorCode,
|
|
74
|
+
formatCacheSize,
|
|
75
|
+
getCachedSize,
|
|
76
|
+
getEvictionCandidates,
|
|
77
|
+
getExcludeProtectedStatesCondition,
|
|
78
|
+
getExtensionFromMimeType,
|
|
79
|
+
getFailedPermanentUploads,
|
|
80
|
+
getLocalUriForStoragePath,
|
|
81
|
+
getMimeType,
|
|
82
|
+
getMimeTypeFromPath,
|
|
83
|
+
getPendingUploads,
|
|
84
|
+
getProtectedStatesInClause,
|
|
85
|
+
getSoonestRetryTime,
|
|
86
|
+
getStaleUploads,
|
|
87
|
+
getSyncedUploadsWithPendingCallback,
|
|
88
|
+
isAudioMimeType,
|
|
89
|
+
isCacheNearCapacity,
|
|
90
|
+
isDocumentMimeType,
|
|
91
|
+
isImageMimeType,
|
|
92
|
+
isLocallyAvailable,
|
|
93
|
+
isPendingDownloadState,
|
|
94
|
+
isPermanentError,
|
|
95
|
+
isProtectedUploadState,
|
|
96
|
+
isStateTransitionAllowed,
|
|
97
|
+
isVideoMimeType,
|
|
98
|
+
markUploadPermanentFailure,
|
|
99
|
+
markUploadSynced,
|
|
100
|
+
scheduleUploadRetry,
|
|
101
|
+
startUploadProcessing,
|
|
102
|
+
stripFileUri,
|
|
103
|
+
uploadOne,
|
|
104
|
+
validateSqlIdentifier
|
|
105
|
+
} from "./chunk-4TXTAEF2.js";
|
|
27
106
|
import {
|
|
28
107
|
DeadLetterQueue,
|
|
29
108
|
createDeadLetterEntry,
|
|
@@ -35,14 +114,16 @@ import {
|
|
|
35
114
|
unregisterBackgroundSync
|
|
36
115
|
} from "./chunk-A4IBBWGO.js";
|
|
37
116
|
import {
|
|
38
|
-
DEFAULT_CONNECTION_HEALTH,
|
|
39
|
-
DEFAULT_SYNC_CONFIG,
|
|
40
|
-
DEFAULT_SYNC_METRICS,
|
|
41
|
-
DEFAULT_SYNC_STATUS,
|
|
42
117
|
HealthMonitor,
|
|
43
118
|
MetricsCollector,
|
|
44
119
|
SyncStatusTracker
|
|
45
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-CUCAYK7Z.js";
|
|
121
|
+
import {
|
|
122
|
+
DEFAULT_CONNECTION_HEALTH,
|
|
123
|
+
DEFAULT_SYNC_CONFIG,
|
|
124
|
+
DEFAULT_SYNC_METRICS,
|
|
125
|
+
DEFAULT_SYNC_STATUS
|
|
126
|
+
} from "./chunk-24RDMMCL.js";
|
|
46
127
|
import {
|
|
47
128
|
checkIntegrityImpl,
|
|
48
129
|
checkStorageQuotaImpl,
|
|
@@ -89,29 +170,31 @@ import {
|
|
|
89
170
|
useSyncStatus,
|
|
90
171
|
useUploadStatus
|
|
91
172
|
} from "./chunk-YSTEESEG.js";
|
|
92
|
-
import "./chunk-
|
|
173
|
+
import "./chunk-T4AO7JIG.js";
|
|
174
|
+
import "./chunk-CAB26E6F.js";
|
|
93
175
|
import {
|
|
94
176
|
CacheSettingsManager,
|
|
95
177
|
DEFAULT_CACHE_SETTINGS,
|
|
178
|
+
createSupabaseStorage,
|
|
179
|
+
isBlobResult,
|
|
180
|
+
isFileResult
|
|
181
|
+
} from "./chunk-XOY2CJ67.js";
|
|
182
|
+
import {
|
|
96
183
|
SupabaseStorageAdapter,
|
|
97
184
|
createSupabaseStorageAdapter,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
isDocumentMimeType,
|
|
103
|
-
isImageMimeType,
|
|
104
|
-
isVideoMimeType
|
|
105
|
-
} from "./chunk-WQ5MPAVC.js";
|
|
185
|
+
getStorageErrorMessage,
|
|
186
|
+
isStorageAuthError,
|
|
187
|
+
normalizeStoragePath
|
|
188
|
+
} from "./chunk-XAEII4ZX.js";
|
|
106
189
|
import "./chunk-TGBT5XBE.js";
|
|
107
190
|
import {
|
|
108
191
|
SupabaseUploadHandler,
|
|
109
192
|
createSupabaseUploadHandler
|
|
110
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-P4HZA6ZT.js";
|
|
111
194
|
import {
|
|
112
195
|
DEFAULT_UPLOAD_NOTIFICATION,
|
|
113
|
-
|
|
114
|
-
} from "./chunk-
|
|
196
|
+
resolveBucket
|
|
197
|
+
} from "./chunk-Z6VOBGTU.js";
|
|
115
198
|
import "./chunk-W7HSR35B.js";
|
|
116
199
|
import {
|
|
117
200
|
ATTACHMENT_DOWNLOAD_TIMEOUT_MS,
|
|
@@ -148,12 +231,14 @@ import {
|
|
|
148
231
|
} from "./chunk-CGL33PL4.js";
|
|
149
232
|
import {
|
|
150
233
|
createNativePlatformAdapter
|
|
151
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-WN5ZJ3E2.js";
|
|
152
235
|
import {
|
|
236
|
+
AuthRefreshError,
|
|
153
237
|
CircuitBreaker,
|
|
154
238
|
CircuitOpenError,
|
|
155
|
-
DEFAULT_CIRCUIT_BREAKER_CONFIG
|
|
156
|
-
|
|
239
|
+
DEFAULT_CIRCUIT_BREAKER_CONFIG,
|
|
240
|
+
createSupabaseAuth
|
|
241
|
+
} from "./chunk-HWSNV45P.js";
|
|
157
242
|
import {
|
|
158
243
|
ConflictDetectionError,
|
|
159
244
|
DEFAULT_RETRY_CONFIG,
|
|
@@ -163,7 +248,7 @@ import {
|
|
|
163
248
|
fetchServerVersion,
|
|
164
249
|
getLocalVersion,
|
|
165
250
|
hasVersionColumn
|
|
166
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-KN2IZERF.js";
|
|
167
252
|
import {
|
|
168
253
|
AbortError,
|
|
169
254
|
DEFAULT_BACKOFF_CONFIG,
|
|
@@ -187,9 +272,9 @@ import {
|
|
|
187
272
|
extractEntityIds,
|
|
188
273
|
extractTableNames,
|
|
189
274
|
generateFailureId,
|
|
275
|
+
isRlsError,
|
|
190
276
|
toSyncOperationError
|
|
191
|
-
} from "./chunk-
|
|
192
|
-
import "./chunk-DGUM43GV.js";
|
|
277
|
+
} from "./chunk-VACPAAQZ.js";
|
|
193
278
|
export {
|
|
194
279
|
ATTACHMENT_DOWNLOAD_TIMEOUT_MS,
|
|
195
280
|
ATTACHMENT_RETRY_DELAY_MS,
|
|
@@ -200,6 +285,8 @@ export {
|
|
|
200
285
|
AttachmentQueueContext,
|
|
201
286
|
AttachmentState,
|
|
202
287
|
AttachmentTable,
|
|
288
|
+
AuthRefreshError,
|
|
289
|
+
CACHE_SIZE_PRESETS,
|
|
203
290
|
COMPRESSION_MAX_WIDTH,
|
|
204
291
|
COMPRESSION_SKIP_SIZE_BYTES,
|
|
205
292
|
COMPRESSION_TARGET_SIZE_BYTES,
|
|
@@ -223,6 +310,7 @@ export {
|
|
|
223
310
|
DEFAULT_COMPRESSION_CONFIG,
|
|
224
311
|
DEFAULT_COMPRESSION_QUALITY,
|
|
225
312
|
DEFAULT_CONNECTION_HEALTH,
|
|
313
|
+
DEFAULT_DOWNLOAD_CONFIG,
|
|
226
314
|
DEFAULT_MAX_RETRY_ATTEMPTS,
|
|
227
315
|
DEFAULT_RETRY_BACKOFF_MULTIPLIER,
|
|
228
316
|
DEFAULT_RETRY_BASE_DELAY_MS,
|
|
@@ -236,6 +324,7 @@ export {
|
|
|
236
324
|
DEFAULT_UPLOAD_CONFIG,
|
|
237
325
|
DEFAULT_UPLOAD_NOTIFICATION,
|
|
238
326
|
DOWNLOAD_STOP_THRESHOLD,
|
|
327
|
+
DOWNLOAD_WORKFLOW_STATES,
|
|
239
328
|
DeadLetterQueue,
|
|
240
329
|
EVICTION_TRIGGER_THRESHOLD,
|
|
241
330
|
EncodingType,
|
|
@@ -245,9 +334,12 @@ export {
|
|
|
245
334
|
HealthMonitor,
|
|
246
335
|
InitializationError,
|
|
247
336
|
LATENCY_DEGRADED_THRESHOLD_MS,
|
|
337
|
+
LOCALLY_AVAILABLE_STATES,
|
|
248
338
|
MAX_CONSECUTIVE_FAILURES,
|
|
249
339
|
MetricsCollector,
|
|
250
340
|
OfflineDataProvider,
|
|
341
|
+
PENDING_DOWNLOAD_STATES,
|
|
342
|
+
PROTECTED_UPLOAD_STATES,
|
|
251
343
|
PendingMutationsContext,
|
|
252
344
|
PlatformAdapterError,
|
|
253
345
|
PolAttachmentQueue,
|
|
@@ -259,6 +351,8 @@ export {
|
|
|
259
351
|
PowerSyncProvider,
|
|
260
352
|
ProviderBridge,
|
|
261
353
|
RetryExhaustedError,
|
|
354
|
+
STATE_MAPPING,
|
|
355
|
+
STATE_NAMES,
|
|
262
356
|
STATS_CACHE_TTL_MS,
|
|
263
357
|
STATUS_NOTIFY_THROTTLE_MS,
|
|
264
358
|
STORAGE_CRITICAL_THRESHOLD,
|
|
@@ -270,6 +364,7 @@ export {
|
|
|
270
364
|
STORAGE_KEY_PREFIX,
|
|
271
365
|
STORAGE_KEY_SYNC_MODE,
|
|
272
366
|
STORAGE_WARNING_THRESHOLD,
|
|
367
|
+
SlimPowerSyncProvider,
|
|
273
368
|
SupabaseConnector,
|
|
274
369
|
SupabaseStorageAdapter,
|
|
275
370
|
SupabaseUploadHandler,
|
|
@@ -279,46 +374,107 @@ export {
|
|
|
279
374
|
SyncOperationError,
|
|
280
375
|
SyncStatusContext,
|
|
281
376
|
SyncStatusTracker,
|
|
377
|
+
TERMINAL_STATES,
|
|
378
|
+
UPLOAD_WORKFLOW_STATES,
|
|
379
|
+
VALID_STATES,
|
|
282
380
|
addJitter,
|
|
381
|
+
blobToArrayBuffer,
|
|
382
|
+
buildIdOnlyWatchQuery,
|
|
383
|
+
buildRecordFetchQuery,
|
|
384
|
+
buildWatchQuery,
|
|
385
|
+
cacheLocalFile,
|
|
283
386
|
calculateBackoffDelay,
|
|
284
387
|
checkIntegrityImpl,
|
|
285
388
|
checkStorageQuotaImpl,
|
|
286
389
|
classifyError,
|
|
287
390
|
classifySupabaseError,
|
|
391
|
+
clearCache,
|
|
392
|
+
clearUploadCallback,
|
|
288
393
|
compactDatabaseImpl,
|
|
394
|
+
copyToManagedCache,
|
|
395
|
+
createCacheManagerDeps,
|
|
289
396
|
createDeadLetterEntry,
|
|
397
|
+
createMigrationStats,
|
|
290
398
|
createNativePlatformAdapter,
|
|
291
399
|
createPolAttachmentQueue,
|
|
400
|
+
createSupabaseAuth,
|
|
401
|
+
createSupabaseStorage,
|
|
292
402
|
createSupabaseStorageAdapter,
|
|
293
403
|
createSupabaseUploadHandler,
|
|
294
404
|
createSyncError,
|
|
405
|
+
createUploadManagerDeps,
|
|
406
|
+
createUploadManagerState,
|
|
295
407
|
defaultSchemaRouter,
|
|
296
408
|
defineBackgroundSyncTask,
|
|
297
409
|
detectConflicts,
|
|
410
|
+
determineAttachmentState,
|
|
411
|
+
downloadRecord,
|
|
412
|
+
enforceCacheLimit,
|
|
413
|
+
ensureFileUri,
|
|
298
414
|
extractEntityIds,
|
|
415
|
+
extractErrorCode,
|
|
299
416
|
extractTableNames,
|
|
300
417
|
fetchServerVersion,
|
|
301
418
|
formatBytes,
|
|
419
|
+
formatCacheSize,
|
|
420
|
+
formatMigrationStats,
|
|
302
421
|
generateDLQEntryId,
|
|
303
422
|
generateFailureId,
|
|
304
423
|
getCacheStatsImpl,
|
|
424
|
+
getCachedSize,
|
|
425
|
+
getEvictionCandidates,
|
|
426
|
+
getExcludeProtectedStatesCondition,
|
|
305
427
|
getExtensionFromMimeType,
|
|
428
|
+
getFailedPermanentUploads,
|
|
429
|
+
getLocalUriForStoragePath,
|
|
306
430
|
getLocalVersion,
|
|
307
431
|
getMimeType,
|
|
308
432
|
getMimeTypeFromPath,
|
|
433
|
+
getPendingUploads,
|
|
434
|
+
getProtectedStatesInClause,
|
|
435
|
+
getSoonestRetryTime,
|
|
436
|
+
getStaleUploads,
|
|
437
|
+
getStateName,
|
|
438
|
+
getStorageErrorMessage,
|
|
439
|
+
getSyncedUploadsWithPendingCallback,
|
|
309
440
|
hasVersionColumn,
|
|
310
441
|
initializeBackgroundSync,
|
|
311
442
|
isAudioMimeType,
|
|
312
443
|
isBackgroundSyncRegistered,
|
|
444
|
+
isBlobResult,
|
|
445
|
+
isCacheNearCapacity,
|
|
313
446
|
isDocumentMimeType,
|
|
447
|
+
isDownloadWorkflowState,
|
|
448
|
+
isFileResult,
|
|
314
449
|
isImageMimeType,
|
|
450
|
+
isLocallyAvailable,
|
|
451
|
+
isPendingDownloadState,
|
|
452
|
+
isPermanentError,
|
|
453
|
+
isProtectedUploadState,
|
|
454
|
+
isRlsError,
|
|
455
|
+
isStateTransitionAllowed,
|
|
456
|
+
isStorageAuthError,
|
|
457
|
+
isTerminalState,
|
|
458
|
+
isUploadWorkflowState,
|
|
459
|
+
isValidAttachmentState,
|
|
315
460
|
isVideoMimeType,
|
|
461
|
+
markUploadPermanentFailure,
|
|
462
|
+
markUploadSynced,
|
|
463
|
+
migrateAttachmentState,
|
|
464
|
+
migrateAttachmentStateSafe,
|
|
465
|
+
normalizeStoragePath,
|
|
466
|
+
recordMigration,
|
|
316
467
|
registerBackgroundSync,
|
|
317
|
-
|
|
468
|
+
resolveBucket,
|
|
469
|
+
scheduleUploadRetry,
|
|
318
470
|
sleep,
|
|
471
|
+
startUploadProcessing,
|
|
472
|
+
stripFileUri,
|
|
319
473
|
toSyncOperationError,
|
|
320
474
|
unregisterBackgroundSync,
|
|
475
|
+
uploadOne,
|
|
321
476
|
useAttachmentQueue,
|
|
477
|
+
useAttachmentQueueContext,
|
|
322
478
|
useAttachmentQueueReady,
|
|
323
479
|
useCompletedTransactions,
|
|
324
480
|
useCompletedTransactionsContext,
|
|
@@ -336,6 +492,7 @@ export {
|
|
|
336
492
|
usePendingMutationsContext,
|
|
337
493
|
usePlatform,
|
|
338
494
|
usePowerSync,
|
|
495
|
+
usePowerSyncContext,
|
|
339
496
|
useSyncActivity,
|
|
340
497
|
useSyncActivityContext,
|
|
341
498
|
useSyncControl,
|
|
@@ -343,7 +500,12 @@ export {
|
|
|
343
500
|
useSyncMode,
|
|
344
501
|
useSyncModeContext,
|
|
345
502
|
useSyncStatus,
|
|
503
|
+
useSyncStatusContext,
|
|
346
504
|
useUploadStatus,
|
|
505
|
+
validateSqlIdentifier2 as validateSqlIdentifier,
|
|
506
|
+
validateSqlIdentifier as validateSqlIdentifierFromStateMachine,
|
|
507
|
+
validateWhereClause,
|
|
508
|
+
watchConfigToSourceConfig,
|
|
347
509
|
withExponentialBackoff
|
|
348
510
|
};
|
|
349
511
|
//# sourceMappingURL=index.native.js.map
|
package/dist/index.web.d.ts
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
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, toSyncOperationError } from './core/index.js';
|
|
3
|
-
export { g as ConflictBus, h as ConflictCheckResult, k as ConflictDetectionConfig, j as ConflictHandler, l as ConflictListener, i as ConflictResolution, C as ConnectorCircuitBreakerConfig,
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
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, g as ConflictBus, h as ConflictCheckResult, k as ConflictDetectionConfig, j as ConflictHandler, l as ConflictListener, i as ConflictResolution, C as ConnectorCircuitBreakerConfig, a as ConnectorConfig, c as CrudHandler, D as DEFAULT_RETRY_CONFIG, F as FieldConflict, P as PowerSyncCredentials, m as ResolutionListener, e as RetryConfig, R as RetryStrategyConfig, b as SchemaRouter, f as Session, S as SupabaseConnectorOptions, d as defaultSchemaRouter } from './types-B212hgfA.js';
|
|
4
|
+
export { S as SupabaseConnector } from './supabase-connector-T9vHq_3i.js';
|
|
5
|
+
export { AuthRefreshError, CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitOpenError, CircuitState, DEFAULT_CIRCUIT_BREAKER_CONFIG, SupabaseAuthOptions, createSupabaseAuth } from './connector/index.js';
|
|
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
|
+
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';
|
|
7
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';
|
|
8
9
|
export { DeadLetterEntry, DeadLetterQueue, DeadLetterQueueListener, DeadLetterQueueOptions, DeadLetterReason, HealthMonitor, MetricsCollector, SyncStatusTracker, createDeadLetterEntry, generateDLQEntryId } from './sync/index.js';
|
|
9
10
|
export { AbortError, BackoffConfig, BackoffOptions, ConflictDetectionError, DEFAULT_BACKOFF_CONFIG, RetryExhaustedError, addJitter, calculateBackoffDelay, detectConflicts, fetchServerVersion, formatBytes, getExtensionFromMimeType, getLocalVersion, getMimeType, getMimeTypeFromPath, hasVersionColumn, isAudioMimeType, isDocumentMimeType, isImageMimeType, isVideoMimeType, sleep, withExponentialBackoff } from './index.js';
|
|
10
11
|
export { DatabaseMaintenanceUtils, checkIntegrityImpl, checkStorageQuotaImpl, compactDatabaseImpl, getCacheStatsImpl, useDatabaseMaintenance } from './maintenance/index.js';
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export { D as DEFAULT_UPLOAD_NOTIFICATION, S as SupabaseUploadHandlerOptions, U as UploadEventHandlers, a as UploadNotificationConfig } from './types-
|
|
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-D0WcHrq6.js';
|
|
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-uz-kbnRH.js';
|
|
14
|
+
export { D as DEFAULT_UPLOAD_NOTIFICATION, S as SupabaseUploadHandlerOptions, U as UploadEventHandlers, a as UploadNotificationConfig } from './types-CyvBaAl8.js';
|
|
14
15
|
export { SupabaseUploadHandler, createSupabaseUploadHandler } from './storage/upload/index.js';
|
|
15
16
|
export { PowerSyncErrorBoundary } from './error/index.js';
|
|
16
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, OfflineDataProvider, OfflineDataProviderConfig, OfflineDataProviderProps, PendingMutationsContext, PendingMutationsContextValue, PowerSyncConfig, PowerSyncContext, PowerSyncContextValue, PowerSyncProvider, PowerSyncProviderProps, PowerSyncSyncStatusSnapshot, ProviderBridge, ProviderBridgeProps, SyncActivityContext, SyncActivityContextValue, SyncActivityResult, SyncConfig, SyncMetricsContext, SyncMetricsContextValue, SyncModeContext, SyncModeContextValue, SyncStatusContext, SyncStatusContextValue, UploadStatusResult, useAttachmentQueue, useAttachmentQueueReady, useCompletedTransactions, useCompletedTransactionsContext, useConnectionHealth, useConnectionStatus, useDatabase, useDownloadProgress, useEntitySyncStatus, useFailedTransactions, useFailedTransactionsContext, useIsSyncing, useOnlineStatus, usePendingMutations, usePendingMutationsContext, usePlatform, usePowerSync, useSyncActivity, useSyncActivityContext, useSyncControl, useSyncMetrics, useSyncMode, useSyncModeContext, useSyncStatus, useUploadStatus } from './provider/index.js';
|
|
18
|
+
export { AttachmentQueueContextValue, SlimPowerSyncProvider, useAttachmentQueueContext, usePowerSyncContext, useSyncStatusContext } from './react/index.js';
|
|
17
19
|
export { AsyncStorageAdapter, CompressedImage, CompressionOptions, ConnectionType, DatabaseOptions, FileInfo, FileSystemAdapter, ImageProcessorAdapter, LoggerAdapter, NetworkAdapter, PlatformAdapter, PlatformType, detectPlatform } from './platform/index.js';
|
|
18
20
|
export { createWebPlatformAdapter } from './platform/index.web.js';
|
|
19
21
|
export { ATTACHMENT_TABLE, AbstractAttachmentQueue, AttachmentState, AttachmentTable, AttachmentTableOptions, AttachmentQueueOptions as BaseAttachmentQueueOptions, DEFAULT_ATTACHMENT_QUEUE_OPTIONS, EncodingType, AttachmentRecord as OfficialAttachmentRecord, StorageAdapter } from '@powersync/attachments';
|
|
22
|
+
export { AbstractPowerSyncDatabase as PowerSyncDBInterface } from '@powersync/common';
|
|
20
23
|
import '@supabase/supabase-js';
|
|
21
|
-
import '@powersync/common';
|
|
22
24
|
import 'react';
|
|
23
25
|
import '@tanstack/react-query';
|
|
24
26
|
import '@powersync/react-native';
|