Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: PowerSync encryption with SQLCipher #194

Merged
merged 41 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
75c9792
Setup powersync core
mugikhan Oct 15, 2024
22562ab
Merge branch 'main' into feat/powersync-sqlcipher
mugikhan Oct 16, 2024
0266f78
Fix tests running in core
mugikhan Oct 16, 2024
65f4f35
Move setup web script to core
mugikhan Oct 16, 2024
78e7f03
Remove dependencies from powersync
mugikhan Oct 16, 2024
4b2a88d
Add back lints dev dependency to powersync
mugikhan Oct 16, 2024
b75cfb9
- Working sqlcipher factory with tests
mugikhan Oct 16, 2024
7a870d5
Download dynamic library for sqlciper tests
mugikhan Oct 16, 2024
52cafa6
Remove sqlcipher tests
mugikhan Oct 17, 2024
ee88681
Clean up versions
mugikhan Oct 17, 2024
12baad3
Cleanup print statement
mugikhan Oct 17, 2024
7a88bfd
Cleanup powersync export
mugikhan Oct 17, 2024
3b70e71
Update locked versions
mugikhan Oct 17, 2024
ef78f4c
Add license and notice
mugikhan Oct 17, 2024
6d860ab
Merge branch 'main' into feat/powersync-sqlcipher
mugikhan Oct 18, 2024
a6cc4b8
Update pubspec.lock
mugikhan Oct 18, 2024
5871e7e
Move setup_web script back to powersync
mugikhan Oct 18, 2024
63e6c42
Fix tests
mugikhan Oct 18, 2024
fdf478c
Update readme and dependencies
mugikhan Oct 18, 2024
bcbebe9
Copy powersync_db_worker to powersync_core for tests
mugikhan Oct 18, 2024
21f4205
Update READMEs
mugikhan Oct 18, 2024
82777ae
Update readme
mugikhan Oct 18, 2024
61942ea
Merge branch 'main' into feat/powersync-sqlcipher
mugikhan Oct 22, 2024
1774378
Update readme
mugikhan Oct 23, 2024
d4f159f
Readme polish
benitav Oct 29, 2024
0e0b170
More polish
benitav Oct 29, 2024
4b4f4e9
Explainer of the 3 SDKs, MySQL updates
benitav Oct 29, 2024
2d6f81a
Merge branch 'main' into feat/powersync-sqlcipher
benitav Oct 29, 2024
deaed88
Merge branch 'main' into feat/powersync-sqlcipher
mugikhan Nov 5, 2024
dbc312a
Update readme and lower initial release versions
mugikhan Nov 5, 2024
5a6ac7a
Merge branch 'main' into feat/powersync-sqlcipher
mugikhan Nov 5, 2024
9ad3065
Merge branch 'main' into feat/powersync-sqlcipher
mugikhan Nov 11, 2024
5888444
Improve dart demo
mugikhan Nov 11, 2024
8e6ad27
Fix changelog versions
mugikhan Nov 11, 2024
18cad56
Fix sed command for build numbers
mugikhan Nov 11, 2024
cc21ff9
Merge branch 'main' into feat/powersync-sqlcipher
mugikhan Nov 11, 2024
19457da
Update packages/powersync/README.md
mugikhan Nov 12, 2024
e1ba4a4
Fix preCommit version script
mugikhan Nov 12, 2024
8dafdae
New user agent based on core package
mugikhan Nov 12, 2024
b05b705
chore(release): publish packages
mugikhan Nov 12, 2024
d2684cd
Trigger publish on new packages
mugikhan Nov 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- "powersync-v[0-9]+.[0-9]+.[0-9]+"
- "powersync_attachments_helper-v[0-9]+.[0-9]+.[0-9]+*"
- "powersync_flutter_libs-v[0-9]+.[0-9]+.[0-9]+*"
- "powersync_core-v[0-9]+.[0-9]+.[0-9]+*"
- "powersync_sqlcipher-v[0-9]+.[0-9]+.[0-9]+*"
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -35,7 +37,7 @@ jobs:
env:
GITHUBREF: ${{ github.ref }}
run: |
PACKAGE_NAME=$(sed -E 's/refs\/tags\/([a-z0-9_]+)-v([0-9]+\.[0-9]+\.[0-9]+)/\1/' <<< $GITHUBREF) && \
PACKAGE_NAME=$(sed -E 's/refs\/tags\/([a-z0-9_]+)-v([0-9]+\.[0-9]+\.[0-9]+(\+[0-9]+)?)/\1/' <<< $GITHUBREF) && \
echo "PACKAGE_NAME=$PACKAGE_NAME" >> $GITHUB_ENV
echo "Package name: $PACKAGE_NAME"

Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,34 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 2024-11-12

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`powersync` - `v1.10.0`](#powersync---v1100)
- [`powersync_attachments_helper` - `v0.6.16`](#powersync_attachments_helper---v0616)
- [`powersync_core` - `v1.0.0`](#powersync_core---v100)
- [`powersync_sqlcipher` - `v0.1.0`](#powersync_sqlcipher---v010)

---

#### `powersync` - `v1.10.0`

#### `powersync_attachments_helper` - `v0.6.16`

#### `powersync_core` - `v1.0.0`

#### `powersync_sqlcipher` - `v0.1.0`


## 2024-11-11

### Changes
Expand Down
1 change: 1 addition & 0 deletions demos/benchmarks/ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 1 addition & 0 deletions demos/benchmarks/ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
44 changes: 44 additions & 0 deletions demos/benchmarks/ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
1 change: 1 addition & 0 deletions demos/benchmarks/macos/Flutter/Flutter-Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
1 change: 1 addition & 0 deletions demos/benchmarks/macos/Flutter/Flutter-Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
43 changes: 43 additions & 0 deletions demos/benchmarks/macos/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
platform :osx, '10.14'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_macos_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_macos_build_settings(target)
end
end
7 changes: 7 additions & 0 deletions demos/benchmarks/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,13 @@ packages:
relative: true
source: path
version: "1.9.2"
powersync_core:
dependency: "direct overridden"
description:
path: "../../packages/powersync_core"
relative: true
source: path
version: "0.0.1"
powersync_flutter_libs:
dependency: "direct overridden"
description:
Expand Down
2 changes: 1 addition & 1 deletion demos/benchmarks/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment:
dependencies:
flutter:
sdk: flutter
powersync: ^1.9.3
powersync: ^1.10.0
path_provider: ^2.1.1
path: ^1.8.3
logging: ^1.2.0
Expand Down
7 changes: 7 additions & 0 deletions demos/django-todolist/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,13 @@ packages:
relative: true
source: path
version: "1.9.2"
powersync_core:
dependency: "direct overridden"
description:
path: "../../packages/powersync_core"
relative: true
source: path
version: "0.0.1"
powersync_flutter_libs:
dependency: "direct overridden"
description:
Expand Down
2 changes: 1 addition & 1 deletion demos/django-todolist/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment:
dependencies:
flutter:
sdk: flutter
powersync: ^1.9.3
powersync: ^1.10.0
path_provider: ^2.1.1
path: ^1.8.3
logging: ^1.2.0
Expand Down
7 changes: 7 additions & 0 deletions demos/supabase-anonymous-auth/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,13 @@ packages:
relative: true
source: path
version: "1.9.2"
powersync_core:
dependency: "direct overridden"
description:
path: "../../packages/powersync_core"
relative: true
source: path
version: "0.0.1"
powersync_flutter_libs:
dependency: "direct overridden"
description:
Expand Down
2 changes: 1 addition & 1 deletion demos/supabase-anonymous-auth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
flutter:
sdk: flutter

powersync: ^1.9.3
powersync: ^1.10.0
path_provider: ^2.1.1
supabase_flutter: ^2.0.2
path: ^1.8.3
Expand Down
7 changes: 7 additions & 0 deletions demos/supabase-edge-function-auth/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,13 @@ packages:
relative: true
source: path
version: "1.9.2"
powersync_core:
dependency: "direct overridden"
description:
path: "../../packages/powersync_core"
relative: true
source: path
version: "0.0.1"
powersync_flutter_libs:
dependency: "direct overridden"
description:
Expand Down
2 changes: 1 addition & 1 deletion demos/supabase-edge-function-auth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
flutter:
sdk: flutter

powersync: ^1.9.3
powersync: ^1.10.0
path_provider: ^2.1.1
supabase_flutter: ^2.0.2
path: ^1.8.3
Expand Down
7 changes: 7 additions & 0 deletions demos/supabase-simple-chat/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,13 @@ packages:
relative: true
source: path
version: "1.9.2"
powersync_core:
dependency: "direct overridden"
description:
path: "../../packages/powersync_core"
relative: true
source: path
version: "0.0.1"
powersync_flutter_libs:
dependency: "direct overridden"
description:
Expand Down
2 changes: 1 addition & 1 deletion demos/supabase-simple-chat/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependencies:

supabase_flutter: ^2.0.2
timeago: ^3.6.0
powersync: ^1.9.3
powersync: ^1.10.0
path_provider: ^2.1.1
path: ^1.8.3
logging: ^1.2.0
Expand Down
7 changes: 7 additions & 0 deletions demos/supabase-todolist-drift/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,13 @@ packages:
relative: true
source: path
version: "0.6.15+1"
powersync_core:
dependency: "direct overridden"
description:
path: "../../packages/powersync_core"
relative: true
source: path
version: "0.0.1"
powersync_flutter_libs:
dependency: "direct overridden"
description:
Expand Down
4 changes: 2 additions & 2 deletions demos/supabase-todolist-drift/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ environment:
dependencies:
flutter:
sdk: flutter
powersync_attachments_helper: ^0.6.15+2
powersync: ^1.9.3
powersync_attachments_helper: ^0.6.16
powersync: ^1.10.0
path_provider: ^2.1.1
supabase_flutter: ^2.0.1
path: ^1.8.3
Expand Down
7 changes: 7 additions & 0 deletions demos/supabase-todolist-optional-sync/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,13 @@ packages:
relative: true
source: path
version: "1.9.2"
powersync_core:
dependency: "direct overridden"
description:
path: "../../packages/powersync_core"
relative: true
source: path
version: "0.0.1"
powersync_flutter_libs:
dependency: "direct overridden"
description:
Expand Down
2 changes: 1 addition & 1 deletion demos/supabase-todolist-optional-sync/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment:
dependencies:
flutter:
sdk: flutter
powersync: ^1.9.3
powersync: ^1.10.0
path_provider: ^2.1.1
supabase_flutter: ^2.0.1
path: ^1.8.3
Expand Down
Loading
Loading