Skip to content

Commit 5477842

Browse files
DominicGBauerDominicGBauer
andauthored
chore: deprecate dev connector (#59)
Co-authored-by: DominicGBauer <[email protected]>
1 parent 8d37351 commit 5477842

File tree

10 files changed

+16
-13
lines changed

10 files changed

+16
-13
lines changed

demos/supabase-anonymous-auth/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ packages:
310310
path: "../../packages/powersync"
311311
relative: true
312312
source: path
313-
version: "1.2.0"
313+
version: "1.2.2"
314314
realtime_client:
315315
dependency: transitive
316316
description:

demos/supabase-edge-function-auth/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ packages:
310310
path: "../../packages/powersync"
311311
relative: true
312312
source: path
313-
version: "1.2.0"
313+
version: "1.2.2"
314314
realtime_client:
315315
dependency: transitive
316316
description:

demos/supabase-simple-chat/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ packages:
326326
path: "../../packages/powersync"
327327
relative: true
328328
source: path
329-
version: "1.2.0"
329+
version: "1.2.2"
330330
realtime_client:
331331
dependency: transitive
332332
description:

demos/supabase-todolist/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ packages:
414414
path: "../../packages/powersync"
415415
relative: true
416416
source: path
417-
version: "1.2.0"
417+
version: "1.2.2"
418418
powersync_attachments_helper:
419419
dependency: "direct main"
420420
description:

packages/powersync/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.2.2
2+
3+
- Deprecate DevConnector and related
4+
15
## 1.2.1
26

37
- Fix indexes incorrectly dropped after the first run.

packages/powersync/lib/src/connector.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ import 'powersync_database.dart';
1111
/// 1. Creating credentials for connecting to the PowerSync service.
1212
/// 2. Applying local changes against the backend application server.
1313
///
14-
/// [DevConnector] is provided as a quick starting point, without user management
15-
/// or significant security.
16-
///
1714
/// For production, use a custom implementation.
1815
abstract class PowerSyncBackendConnector {
1916
PowerSyncCredentials? _cachedCredentials;
@@ -67,7 +64,7 @@ abstract class PowerSyncBackendConnector {
6764

6865
/// Upload local changes to the app backend.
6966
///
70-
/// Use [PowerSyncDatabase.getCrudBatch] to get a batch of changes to upload. See [DevConnector] for an example implementation.
67+
/// Use [PowerSyncDatabase.getCrudBatch] to get a batch of changes to upload.
7168
///
7269
/// Any thrown errors will result in a retry after the configured wait period (default: 5 seconds).
7370
Future<void> uploadData(PowerSyncDatabase database);
@@ -153,6 +150,7 @@ class PowerSyncCredentials {
153150
///
154151
/// These cannot be used for the main PowerSync APIs. [DevConnector] uses these
155152
/// credentials to automatically fetch [PowerSyncCredentials].
153+
@Deprecated('We will be removing this in version 2.')
156154
class DevCredentials {
157155
/// Dev endpoint.
158156
String endpoint;
@@ -201,6 +199,7 @@ class DevCredentials {
201199
///
202200
/// Development mode is intended to get up and running quickly, but is not for
203201
/// production use. For production, write a custom connector.
202+
@Deprecated('We will be removing this in version 2.')
204203
class DevConnector extends PowerSyncBackendConnector {
205204
DevCredentials? _inMemoryDevCredentials;
206205

packages/powersync/lib/src/open_factory.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ class SqliteConnectionSetup {
2424
}
2525

2626
class PowerSyncOpenFactory extends DefaultSqliteOpenFactory {
27-
@Deprecated('Override PowerSyncOpenFactory instead')
27+
@Deprecated('Override PowerSyncOpenFactory instead.')
2828
final SqliteConnectionSetup? _sqliteSetup;
2929

3030
PowerSyncOpenFactory(
3131
{required super.path,
3232
super.sqliteOptions,
33-
@Deprecated('Override PowerSyncOpenFactory instead')
33+
@Deprecated('Override PowerSyncOpenFactory instead.')
3434
// ignore: deprecated_member_use_from_same_package
3535
SqliteConnectionSetup? sqliteSetup})
3636
// ignore: deprecated_member_use_from_same_package

packages/powersync/lib/src/powersync_database.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class PowerSyncDatabase with SqliteQueries implements SqliteConnection {
9595
required String path,
9696
int maxReaders = SqliteDatabase.defaultMaxReaders,
9797
Logger? logger,
98-
@Deprecated("Use [PowerSyncDatabase.withFactory] instead")
98+
@Deprecated("Use [PowerSyncDatabase.withFactory] instead.")
9999
// ignore: deprecated_member_use_from_same_package
100100
SqliteConnectionSetup? sqliteSetup}) {
101101
// ignore: deprecated_member_use_from_same_package

packages/powersync/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: powersync
2-
version: 1.2.1
2+
version: 1.2.2
33
homepage: https://powersync.com
44
repository: https://github.com/powersync-ja/powersync.dart
55
description: PowerSync Flutter SDK - keep PostgreSQL databases in sync with on-device SQLite databases.

packages/powersync_attachments_helper/lib/src/syncing_service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class SyncingService {
6363
await attachmentsService.deleteAttachment(attachment.id);
6464
return;
6565
} catch (e) {
66-
log.severe('Download attachment error for attachment $attachment}', e);
66+
log.severe('Download attachment error for attachment $attachment', e);
6767
return;
6868
}
6969
}

0 commit comments

Comments
 (0)