@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/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as SupabaseStorageOptions, a as StorageBackend, D as DownloadResult, S as SupabaseStorage, d as SupabaseClient } from './types-
|
|
1
|
+
import { c as SupabaseStorageOptions, a as StorageBackend, D as DownloadResult, S as SupabaseStorage, d as SupabaseClient } from './types-CGMibJKD.js';
|
|
2
2
|
import { LoggerAdapter, FileSystemAdapter, AsyncStorageAdapter } from './platform/index.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -202,6 +202,17 @@ interface SupabaseStorageAdapterOptions {
|
|
|
202
202
|
logger?: LoggerAdapter;
|
|
203
203
|
/** Image transform options for compression on download */
|
|
204
204
|
imageTransform?: ImageTransformOptions;
|
|
205
|
+
/**
|
|
206
|
+
* Whether to use signed URLs for downloads (default: true).
|
|
207
|
+
* Set to false for public buckets to use getPublicUrl instead of createSignedUrl.
|
|
208
|
+
* This avoids rate limits and simplifies access for public assets.
|
|
209
|
+
*/
|
|
210
|
+
useSignedUrls?: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Custom URL resolver for non-Supabase backends.
|
|
213
|
+
* When provided, getDownloadUrl will use this instead of Supabase Storage API.
|
|
214
|
+
*/
|
|
215
|
+
customUrlResolver?: (path: string) => Promise<string> | string;
|
|
205
216
|
}
|
|
206
217
|
declare class SupabaseStorageAdapter implements SupabaseStorage {
|
|
207
218
|
private client;
|
|
@@ -212,6 +223,8 @@ declare class SupabaseStorageAdapter implements SupabaseStorage {
|
|
|
212
223
|
private fileSystem?;
|
|
213
224
|
private logger?;
|
|
214
225
|
private imageTransform?;
|
|
226
|
+
private useSignedUrls;
|
|
227
|
+
private customUrlResolver?;
|
|
215
228
|
constructor(options: SupabaseStorageAdapterOptions, fileSystem?: FileSystemAdapter);
|
|
216
229
|
/**
|
|
217
230
|
* Update image transform options (can be set after construction).
|
|
@@ -272,9 +285,14 @@ declare class SupabaseStorageAdapter implements SupabaseStorage {
|
|
|
272
285
|
*/
|
|
273
286
|
delete(path: string): Promise<void>;
|
|
274
287
|
/**
|
|
275
|
-
* Get a
|
|
288
|
+
* Get a download URL for a remote file.
|
|
289
|
+
*
|
|
290
|
+
* Supports three modes:
|
|
291
|
+
* 1. Custom URL resolver (for non-Supabase backends)
|
|
292
|
+
* 2. Public URLs (for public Supabase buckets, when useSignedUrls=false)
|
|
293
|
+
* 3. Signed URLs (default, for private Supabase buckets)
|
|
276
294
|
*
|
|
277
|
-
* Includes session refresh logic to handle stale tokens during background downloads.
|
|
295
|
+
* Includes session refresh logic for signed URLs to handle stale tokens during background downloads.
|
|
278
296
|
* If the initial request fails with an auth error (400/401/403), refreshes the session
|
|
279
297
|
* and retries once.
|
|
280
298
|
*/
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
export { f as AttachmentConfig, F as AttachmentRecord, A as AttachmentSourceConfig, x as AttachmentStatsRow, w as AttachmentSyncStats, v as AttachmentSyncStatus, B as BatchFilterContext, n as CACHE_SIZE_PRESETS, y as CacheFileRow, o as CacheSizePreset, p as CacheSizeValue, z as CachedSizeRow, C as CompressionConfig, m as DEFAULT_CACHE_CONFIG, D as DEFAULT_COMPRESSION_CONFIG, k as DEFAULT_DOWNLOAD_CONFIG, h as DEFAULT_UPLOAD_CONFIG, j as DownloadConfig, r as DownloadPhase, s as DownloadStatus, E as EvictRow, I as IdRow, P as PolAttachmentQueue, a as PolAttachmentQueueOptions, b as PolAttachmentState, S as SimpleAttachmentConfig, e as SkipDownloadContext, t as UploadPhase, c as createPolAttachmentQueue, q as formatCacheSize } from '../pol-attachment-queue-BE2HU3Us.js';
|
|
1
|
+
export { P as PolAttachmentQueue, a as PolAttachmentQueueOptions, c as createPolAttachmentQueue } from '../pol-attachment-queue-DqBvLAEY.js';
|
|
3
2
|
import { StorageAdapter, EncodingType, AttachmentRecord } from '@powersync/attachments';
|
|
4
3
|
export { ATTACHMENT_TABLE, AbstractAttachmentQueue, AttachmentState, AttachmentTable, AttachmentTableOptions, AttachmentQueueOptions as BaseAttachmentQueueOptions, DEFAULT_ATTACHMENT_QUEUE_OPTIONS, EncodingType, AttachmentRecord as OfficialAttachmentRecord, StorageAdapter } from '@powersync/attachments';
|
|
5
4
|
import { PlatformAdapter, LoggerAdapter } from '../platform/index.js';
|
|
5
|
+
import { e as AttachmentStorageAdapter, a as PolAttachmentRecord, h as UploadHandler, U as UploadConfig, t as UploadStatus, k as CacheConfig, W as WatchConfig } from '../types-JCEhw2Lf.js';
|
|
6
|
+
export { d as AttachmentConfig, z as AttachmentRecord, A as AttachmentSource, c as AttachmentSourceConfig, w as AttachmentStatsRow, v as AttachmentSyncStats, u as AttachmentSyncStatus, m as CACHE_SIZE_PRESETS, 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, P as PolAttachmentState, S as SimpleAttachmentConfig, b as SupabaseBucketSource, s as UploadPhase, p as formatCacheSize, H as getCustomUrlResolver, G as isCustomSource, F as isSignedUrlSource, B as resolveBucketFromConfig } from '../types-JCEhw2Lf.js';
|
|
6
7
|
import { AbstractPowerSyncDatabase } from '@powersync/common';
|
|
7
8
|
export { AbstractPowerSyncDatabase as PowerSyncDBInterface } from '@powersync/common';
|
|
8
|
-
import '../types-
|
|
9
|
+
import '../types-B9MptP7E.js';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* POL Storage Adapter
|
|
@@ -28,7 +29,7 @@ interface PolStorageAdapterOptions {
|
|
|
28
29
|
*/
|
|
29
30
|
remoteStorage: AttachmentStorageAdapter;
|
|
30
31
|
/**
|
|
31
|
-
* Base directory name for attachments within the
|
|
32
|
+
* Base directory name for attachments within the documents directory.
|
|
32
33
|
* Defaults to 'attachments'.
|
|
33
34
|
*/
|
|
34
35
|
attachmentDirectoryName?: string;
|
|
@@ -67,6 +68,11 @@ declare class PolStorageAdapter implements StorageAdapter {
|
|
|
67
68
|
uploadFile(filePath: string, data: ArrayBuffer, options?: {
|
|
68
69
|
mediaType?: string;
|
|
69
70
|
}): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Convert base64 string to Blob with error handling.
|
|
73
|
+
* Throws a descriptive error if the base64 data is malformed.
|
|
74
|
+
*/
|
|
75
|
+
private _base64ToBlob;
|
|
70
76
|
/**
|
|
71
77
|
* Download a file from remote storage.
|
|
72
78
|
*
|
|
@@ -111,7 +117,7 @@ declare class PolStorageAdapter implements StorageAdapter {
|
|
|
111
117
|
copyFile(sourceUri: string, targetUri: string): Promise<void>;
|
|
112
118
|
/**
|
|
113
119
|
* Get the user's storage directory for attachments.
|
|
114
|
-
* Returns the
|
|
120
|
+
* Returns the documents directory path ending with '/'.
|
|
115
121
|
*/
|
|
116
122
|
getUserStorageDirectory(): string;
|
|
117
123
|
/**
|
|
@@ -271,7 +277,7 @@ declare function blobToArrayBuffer(blob: Blob): Promise<ArrayBuffer>;
|
|
|
271
277
|
* This override writes the downloaded file directly to the file system
|
|
272
278
|
* using platform-native methods.
|
|
273
279
|
*
|
|
274
|
-
* Note: Filtering
|
|
280
|
+
* Note: Filtering should be done in the watchPaths callback - only emit paths you want to download.
|
|
275
281
|
*/
|
|
276
282
|
declare function downloadRecord(deps: DownloadManagerDeps, record: AttachmentRecord): Promise<boolean>;
|
|
277
283
|
|
|
@@ -477,7 +483,9 @@ declare function getLocalUriForStoragePath(deps: CacheManagerDeps, storagePath:
|
|
|
477
483
|
fileExists(uri: string): Promise<boolean>;
|
|
478
484
|
}): Promise<string | null>;
|
|
479
485
|
/**
|
|
480
|
-
* Copy source file to
|
|
486
|
+
* Copy source file to documents directory for durable uploads.
|
|
487
|
+
* Uses documents directory (not cache) to prevent iOS from evicting
|
|
488
|
+
* upload source files before they can be uploaded.
|
|
481
489
|
*/
|
|
482
490
|
declare function copyToManagedCache(platform: PlatformAdapter, logger: LoggerAdapter, sourceUri: string, storagePath: string): Promise<string>;
|
|
483
491
|
/**
|
|
@@ -532,27 +540,21 @@ declare function validateWhereClause(whereClause: string): void;
|
|
|
532
540
|
* // FROM EquipmentUnitMediaContent
|
|
533
541
|
* // WHERE storagePath IS NOT NULL
|
|
534
542
|
* // ORDER BY takenOn DESC
|
|
535
|
-
*
|
|
536
|
-
* // Using idColumn (deprecated, still works)
|
|
537
|
-
* const query = buildWatchQuery({
|
|
538
|
-
* table: 'EquipmentUnitMediaContent',
|
|
539
|
-
* idColumn: 'storagePath',
|
|
540
|
-
* });
|
|
541
543
|
* ```
|
|
542
544
|
*/
|
|
543
545
|
declare function buildWatchQuery(config: WatchConfig): string;
|
|
544
546
|
/**
|
|
545
|
-
* Build a simpler
|
|
546
|
-
* Use this when you only need
|
|
547
|
+
* Build a simpler path-only watch query.
|
|
548
|
+
* Use this when you only need paths without additional columns.
|
|
547
549
|
*
|
|
548
550
|
* @param config - The WatchConfig to build a query from
|
|
549
|
-
* @returns SQL query string that selects only
|
|
551
|
+
* @returns SQL query string that selects only paths
|
|
550
552
|
*
|
|
551
553
|
* @example
|
|
552
554
|
* ```typescript
|
|
553
555
|
* const query = buildIdOnlyWatchQuery({
|
|
554
556
|
* table: 'EquipmentUnitMediaContent',
|
|
555
|
-
*
|
|
557
|
+
* pathColumn: 'storagePath',
|
|
556
558
|
* where: 'storagePath IS NOT NULL',
|
|
557
559
|
* });
|
|
558
560
|
*
|
|
@@ -588,7 +590,7 @@ declare function buildRecordFetchQuery(config: WatchConfig, ids?: string[]): {
|
|
|
588
590
|
params: unknown[];
|
|
589
591
|
};
|
|
590
592
|
/**
|
|
591
|
-
* Convert WatchConfig to a
|
|
593
|
+
* Convert WatchConfig to a source config format.
|
|
592
594
|
*
|
|
593
595
|
* @param watchConfig - The WatchConfig to convert
|
|
594
596
|
* @returns Object with table, pathColumn, and optional orderByColumn
|
|
@@ -596,8 +598,6 @@ declare function buildRecordFetchQuery(config: WatchConfig, ids?: string[]): {
|
|
|
596
598
|
declare function watchConfigToSourceConfig(watchConfig: WatchConfig): {
|
|
597
599
|
table: string;
|
|
598
600
|
pathColumn: string;
|
|
599
|
-
/** @deprecated Use pathColumn instead */
|
|
600
|
-
idColumn: string;
|
|
601
601
|
orderByColumn?: string | null;
|
|
602
602
|
};
|
|
603
603
|
/**
|
|
@@ -612,27 +612,27 @@ declare function extractIdsFromRows(results: {
|
|
|
612
612
|
rows?: unknown;
|
|
613
613
|
}): string[];
|
|
614
614
|
/**
|
|
615
|
-
* Creates a
|
|
615
|
+
* Creates a watchPaths callback for simple single-table attachment configurations.
|
|
616
616
|
*
|
|
617
|
-
* This is a convenience function that generates a properly typed
|
|
617
|
+
* This is a convenience function that generates a properly typed watchPaths callback
|
|
618
618
|
* from a table name and path column. Use this for simple cases where you don't need
|
|
619
619
|
* JOINs or complex watch logic.
|
|
620
620
|
*
|
|
621
621
|
* @param table - The source table name
|
|
622
|
-
* @param pathColumn - The column containing the attachment path
|
|
623
|
-
* @returns A properly typed
|
|
622
|
+
* @param pathColumn - The column containing the attachment path
|
|
623
|
+
* @returns A properly typed watchPaths callback for use in AttachmentSourceConfig
|
|
624
624
|
*
|
|
625
625
|
* @example
|
|
626
626
|
* ```typescript
|
|
627
|
-
* import {
|
|
627
|
+
* import { createWatchPaths } from '@pol-studios/powersync/attachments';
|
|
628
628
|
*
|
|
629
629
|
* const config: AttachmentSourceConfig = {
|
|
630
|
-
* bucket: 'photos',
|
|
631
|
-
*
|
|
630
|
+
* source: { type: 'supabase-bucket', bucket: 'photos' },
|
|
631
|
+
* watchPaths: createWatchPaths('EquipmentUnitMediaContent', 'storagePath'),
|
|
632
632
|
* };
|
|
633
633
|
* ```
|
|
634
634
|
*/
|
|
635
|
-
declare function
|
|
635
|
+
declare function createWatchPaths(table: string, pathColumn: string): (db: AbstractPowerSyncDatabase, supabase: unknown, onUpdate: (paths: string[]) => void) => () => void;
|
|
636
636
|
|
|
637
637
|
/**
|
|
638
638
|
* Migration Utilities for @pol-studios/powersync Attachments
|
|
@@ -664,7 +664,7 @@ declare function createWatchIds(table: string, pathColumn: string): (db: Abstrac
|
|
|
664
664
|
* QUEUED_SYNC=0, QUEUED_UPLOAD=1, QUEUED_DOWNLOAD=2, SYNCED=3, ARCHIVED=4
|
|
665
665
|
*
|
|
666
666
|
* POL extensions add:
|
|
667
|
-
* FAILED_PERMANENT=5
|
|
667
|
+
* FAILED_PERMANENT=5
|
|
668
668
|
*
|
|
669
669
|
* For migration purposes, most states map 1:1. The mapping exists to:
|
|
670
670
|
* 1. Document the relationship between old and new states
|
|
@@ -843,4 +843,4 @@ declare function recordMigration(stats: MigrationStats, oldState: number, newSta
|
|
|
843
843
|
*/
|
|
844
844
|
declare function formatMigrationStats(stats: MigrationStats): string;
|
|
845
845
|
|
|
846
|
-
export { AttachmentStorageAdapter, CacheConfig, type CacheManagerDeps, DOWNLOAD_WORKFLOW_STATES, type DownloadManagerDeps, LOCALLY_AVAILABLE_STATES, type MigrationStats, PENDING_DOWNLOAD_STATES, PROTECTED_UPLOAD_STATES, PolAttachmentRecord, PolStorageAdapter, type PolStorageAdapterOptions, STATE_MAPPING, STATE_NAMES, TERMINAL_STATES, UPLOAD_WORKFLOW_STATES, UploadConfig, UploadHandler, type UploadManagerDeps, type UploadManagerState, UploadStatus, VALID_STATES, WatchConfig, blobToArrayBuffer, buildIdOnlyWatchQuery, buildRecordFetchQuery, buildWatchQuery, cacheLocalFile, clearCache, clearUploadCallback, copyToManagedCache, createCacheManagerDeps, createMigrationStats, createUploadManagerDeps, createUploadManagerState,
|
|
846
|
+
export { AttachmentStorageAdapter, CacheConfig, type CacheManagerDeps, DOWNLOAD_WORKFLOW_STATES, type DownloadManagerDeps, LOCALLY_AVAILABLE_STATES, type MigrationStats, PENDING_DOWNLOAD_STATES, PROTECTED_UPLOAD_STATES, PolAttachmentRecord, PolStorageAdapter, type PolStorageAdapterOptions, STATE_MAPPING, STATE_NAMES, TERMINAL_STATES, UPLOAD_WORKFLOW_STATES, UploadConfig, UploadHandler, type UploadManagerDeps, type UploadManagerState, UploadStatus, VALID_STATES, WatchConfig, 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, validateSqlIdentifier$1 as validateSqlIdentifierFromStateMachine, validateWhereClause, watchConfigToSourceConfig };
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
buildRecordFetchQuery,
|
|
10
10
|
buildWatchQuery,
|
|
11
11
|
createMigrationStats,
|
|
12
|
-
|
|
12
|
+
createWatchPaths,
|
|
13
13
|
extractIdsFromRows,
|
|
14
14
|
formatMigrationStats,
|
|
15
15
|
getStateName,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
validateSqlIdentifier as validateSqlIdentifier2,
|
|
24
24
|
validateWhereClause,
|
|
25
25
|
watchConfigToSourceConfig
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-EOW7JK7Q.js";
|
|
27
27
|
import {
|
|
28
28
|
ATTACHMENT_TABLE,
|
|
29
29
|
AbstractAttachmentQueue,
|
|
@@ -58,6 +58,7 @@ import {
|
|
|
58
58
|
extractErrorCode,
|
|
59
59
|
formatCacheSize,
|
|
60
60
|
getCachedSize,
|
|
61
|
+
getCustomUrlResolver,
|
|
61
62
|
getEvictionCandidates,
|
|
62
63
|
getExcludeProtectedStatesCondition,
|
|
63
64
|
getFailedPermanentUploads,
|
|
@@ -68,20 +69,24 @@ import {
|
|
|
68
69
|
getStaleUploads,
|
|
69
70
|
getSyncedUploadsWithPendingCallback,
|
|
70
71
|
isCacheNearCapacity,
|
|
72
|
+
isCustomSource,
|
|
71
73
|
isLocallyAvailable,
|
|
72
74
|
isPendingDownloadState,
|
|
73
75
|
isPermanentError,
|
|
74
76
|
isProtectedUploadState,
|
|
77
|
+
isSignedUrlSource,
|
|
75
78
|
isStateTransitionAllowed,
|
|
76
79
|
markUploadPermanentFailure,
|
|
77
80
|
markUploadSynced,
|
|
81
|
+
resolveBucketFromConfig,
|
|
78
82
|
scheduleUploadRetry,
|
|
79
83
|
startUploadProcessing,
|
|
80
84
|
stripFileUri,
|
|
81
85
|
uploadOne,
|
|
82
86
|
validateSqlIdentifier
|
|
83
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-PGEDE6IM.js";
|
|
84
88
|
import "../chunk-FV2HXEIY.js";
|
|
89
|
+
import "../chunk-5WRI5ZAA.js";
|
|
85
90
|
export {
|
|
86
91
|
ATTACHMENT_TABLE,
|
|
87
92
|
AbstractAttachmentQueue,
|
|
@@ -119,7 +124,7 @@ export {
|
|
|
119
124
|
createPolAttachmentQueue,
|
|
120
125
|
createUploadManagerDeps,
|
|
121
126
|
createUploadManagerState,
|
|
122
|
-
|
|
127
|
+
createWatchPaths,
|
|
123
128
|
determineAttachmentState,
|
|
124
129
|
downloadRecord,
|
|
125
130
|
enforceCacheLimit,
|
|
@@ -129,6 +134,7 @@ export {
|
|
|
129
134
|
formatCacheSize,
|
|
130
135
|
formatMigrationStats,
|
|
131
136
|
getCachedSize,
|
|
137
|
+
getCustomUrlResolver,
|
|
132
138
|
getEvictionCandidates,
|
|
133
139
|
getExcludeProtectedStatesCondition,
|
|
134
140
|
getFailedPermanentUploads,
|
|
@@ -140,11 +146,13 @@ export {
|
|
|
140
146
|
getStateName,
|
|
141
147
|
getSyncedUploadsWithPendingCallback,
|
|
142
148
|
isCacheNearCapacity,
|
|
149
|
+
isCustomSource,
|
|
143
150
|
isDownloadWorkflowState,
|
|
144
151
|
isLocallyAvailable,
|
|
145
152
|
isPendingDownloadState,
|
|
146
153
|
isPermanentError,
|
|
147
154
|
isProtectedUploadState,
|
|
155
|
+
isSignedUrlSource,
|
|
148
156
|
isStateTransitionAllowed,
|
|
149
157
|
isTerminalState,
|
|
150
158
|
isUploadWorkflowState,
|
|
@@ -154,6 +162,7 @@ export {
|
|
|
154
162
|
migrateAttachmentState,
|
|
155
163
|
migrateAttachmentStateSafe,
|
|
156
164
|
recordMigration,
|
|
165
|
+
resolveBucketFromConfig,
|
|
157
166
|
scheduleUploadRetry,
|
|
158
167
|
startUploadProcessing,
|
|
159
168
|
stripFileUri,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as SyncStatus, S as SyncMode, e as SyncMetrics, b as ConnectionHealth, f as SyncError } from './types-
|
|
1
|
+
import { a as SyncStatus, S as SyncMode, e as SyncMetrics, b as ConnectionHealth, f as SyncError } from './types-B9MptP7E.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Sync Module Types for @pol-studios/powersync
|