Skip to content

Commit ea6186d

Browse files
mugikhanbenitavrkistner
authored
Feat: PowerSync encryption with SQLCipher (#194)
* Setup powersync core * Fix tests running in core * Move setup web script to core * Remove dependencies from powersync * Add back lints dev dependency to powersync * - Working sqlcipher factory with tests - Package refactoring and cleanup * Download dynamic library for sqlciper tests * Remove sqlcipher tests * Clean up versions * Cleanup print statement * Cleanup powersync export * Update locked versions * Add license and notice * Update pubspec.lock * Move setup_web script back to powersync * Fix tests quoteString for encryption key * Update readme and dependencies * Copy powersync_db_worker to powersync_core for tests * Update READMEs * Update readme * Update readme * Readme polish * More polish * Explainer of the 3 SDKs, MySQL updates * Update readme and lower initial release versions * Improve dart demo * Fix changelog versions * Fix sed command for build numbers * Update packages/powersync/README.md Co-authored-by: Ralf Kistner <[email protected]> * Fix preCommit version script * New user agent based on core package * chore(release): publish packages - [email protected] - [email protected] - [email protected] - [email protected] * Trigger publish on new packages --------- Co-authored-by: benitav <[email protected]> Co-authored-by: benitav <[email protected]> Co-authored-by: Ralf Kistner <[email protected]>
1 parent 2286830 commit ea6186d

File tree

145 files changed

+1322
-265
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+1322
-265
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
- "powersync-v[0-9]+.[0-9]+.[0-9]+"
66
- "powersync_attachments_helper-v[0-9]+.[0-9]+.[0-9]+*"
77
- "powersync_flutter_libs-v[0-9]+.[0-9]+.[0-9]+*"
8+
- "powersync_core-v[0-9]+.[0-9]+.[0-9]+*"
9+
- "powersync_sqlcipher-v[0-9]+.[0-9]+.[0-9]+*"
810
workflow_dispatch:
911

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

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,34 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## 2024-11-12
7+
8+
### Changes
9+
10+
---
11+
12+
Packages with breaking changes:
13+
14+
- There are no breaking changes in this release.
15+
16+
Packages with other changes:
17+
18+
- [`powersync` - `v1.10.0`](#powersync---v1100)
19+
- [`powersync_attachments_helper` - `v0.6.16`](#powersync_attachments_helper---v0616)
20+
- [`powersync_core` - `v1.0.0`](#powersync_core---v100)
21+
- [`powersync_sqlcipher` - `v0.1.0`](#powersync_sqlcipher---v010)
22+
23+
---
24+
25+
#### `powersync` - `v1.10.0`
26+
27+
#### `powersync_attachments_helper` - `v0.6.16`
28+
29+
#### `powersync_core` - `v1.0.0`
30+
31+
#### `powersync_sqlcipher` - `v0.1.0`
32+
33+
634
## 2024-11-11
735

836
### Changes
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
12
#include "Generated.xcconfig"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
12
#include "Generated.xcconfig"

demos/benchmarks/ios/Podfile

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Uncomment this line to define a global platform for your project
2+
# platform :ios, '12.0'
3+
4+
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6+
7+
project 'Runner', {
8+
'Debug' => :debug,
9+
'Profile' => :release,
10+
'Release' => :release,
11+
}
12+
13+
def flutter_root
14+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15+
unless File.exist?(generated_xcode_build_settings_path)
16+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17+
end
18+
19+
File.foreach(generated_xcode_build_settings_path) do |line|
20+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
21+
return matches[1].strip if matches
22+
end
23+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24+
end
25+
26+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27+
28+
flutter_ios_podfile_setup
29+
30+
target 'Runner' do
31+
use_frameworks!
32+
use_modular_headers!
33+
34+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35+
target 'RunnerTests' do
36+
inherit! :search_paths
37+
end
38+
end
39+
40+
post_install do |installer|
41+
installer.pods_project.targets.each do |target|
42+
flutter_additional_ios_build_settings(target)
43+
end
44+
end
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
12
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
12
#include "ephemeral/Flutter-Generated.xcconfig"

demos/benchmarks/macos/Podfile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
platform :osx, '10.14'
2+
3+
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5+
6+
project 'Runner', {
7+
'Debug' => :debug,
8+
'Profile' => :release,
9+
'Release' => :release,
10+
}
11+
12+
def flutter_root
13+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14+
unless File.exist?(generated_xcode_build_settings_path)
15+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16+
end
17+
18+
File.foreach(generated_xcode_build_settings_path) do |line|
19+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
20+
return matches[1].strip if matches
21+
end
22+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23+
end
24+
25+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26+
27+
flutter_macos_podfile_setup
28+
29+
target 'Runner' do
30+
use_frameworks!
31+
use_modular_headers!
32+
33+
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
34+
target 'RunnerTests' do
35+
inherit! :search_paths
36+
end
37+
end
38+
39+
post_install do |installer|
40+
installer.pods_project.targets.each do |target|
41+
flutter_additional_macos_build_settings(target)
42+
end
43+
end

demos/benchmarks/pubspec.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,13 @@ packages:
306306
relative: true
307307
source: path
308308
version: "1.9.2"
309+
powersync_core:
310+
dependency: "direct overridden"
311+
description:
312+
path: "../../packages/powersync_core"
313+
relative: true
314+
source: path
315+
version: "0.0.1"
309316
powersync_flutter_libs:
310317
dependency: "direct overridden"
311318
description:

demos/benchmarks/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ environment:
1010
dependencies:
1111
flutter:
1212
sdk: flutter
13-
powersync: ^1.9.3
13+
powersync: ^1.10.0
1414
path_provider: ^2.1.1
1515
path: ^1.8.3
1616
logging: ^1.2.0

0 commit comments

Comments
 (0)