From 8dafdaefee360cc714d3faf59f04080298362da2 Mon Sep 17 00:00:00 2001 From: Mugi Khan Date: Tue, 12 Nov 2024 15:06:07 +0200 Subject: [PATCH] New user agent based on core package --- .../powersync_core/lib/src/user_agent/user_agent_native.dart | 2 +- packages/powersync_core/lib/src/user_agent/user_agent_web.dart | 2 +- packages/powersync_core/lib/src/version.dart | 2 +- tool/update_version.dart | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/powersync_core/lib/src/user_agent/user_agent_native.dart b/packages/powersync_core/lib/src/user_agent/user_agent_native.dart index 8874cee0..ab1638c5 100644 --- a/packages/powersync_core/lib/src/user_agent/user_agent_native.dart +++ b/packages/powersync_core/lib/src/user_agent/user_agent_native.dart @@ -10,7 +10,7 @@ String powerSyncUserAgent() { } // Ideally we'd get an OS version as well, but that's a little complex. // Platform.operatingSystemVersion is very verbose. - return 'powersync-dart/$libraryVersion $dart ${Platform.operatingSystem}'; + return 'powersync-dart-core/$libraryVersion $dart ${Platform.operatingSystem}'; } Map userAgentHeaders() { diff --git a/packages/powersync_core/lib/src/user_agent/user_agent_web.dart b/packages/powersync_core/lib/src/user_agent/user_agent_web.dart index 1d847319..8475d63c 100644 --- a/packages/powersync_core/lib/src/user_agent/user_agent_web.dart +++ b/packages/powersync_core/lib/src/user_agent/user_agent_web.dart @@ -1,7 +1,7 @@ import 'package:powersync_core/src/version.dart'; String powerSyncUserAgent() { - return 'powersync-dart/$libraryVersion Dart (flutter-web)'; + return 'powersync-dart-core/$libraryVersion Dart (flutter-web)'; } Map userAgentHeaders() { diff --git a/packages/powersync_core/lib/src/version.dart b/packages/powersync_core/lib/src/version.dart index f3ee1336..09bbeea9 100644 --- a/packages/powersync_core/lib/src/version.dart +++ b/packages/powersync_core/lib/src/version.dart @@ -1 +1 @@ -const String libraryVersion = '1.9.3'; +const String libraryVersion = '0.0.1'; diff --git a/tool/update_version.dart b/tool/update_version.dart index 26bd2ca7..a6db98b0 100644 --- a/tool/update_version.dart +++ b/tool/update_version.dart @@ -2,7 +2,7 @@ import 'dart:io'; import 'package:yaml/yaml.dart'; void main() { - final pubspecFile = File('packages/powersync/pubspec.yaml'); + final pubspecFile = File('packages/powersync_core/pubspec.yaml'); final pubspecContent = pubspecFile.readAsStringSync(); final yaml = loadYaml(pubspecContent); final version = yaml['version'];