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

fix: Building web app fails because dbDirectory does not exist in core_store_directory_web #948

Merged
merged 26 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
cde971b
Create CONTRIBUTING.md
mbfakourii May 25, 2023
4e7ba14
Merge pull request #1 from mbfakourii/mbfakourii-patch-1
mbfakourii May 25, 2023
835a1db
just some styling
mtrezza May 25, 2023
2b6997f
Merge branch 'parse-community:master' into master
mbfakourii May 25, 2023
45928d4
Merge branch 'parse-community:master' into master
mbfakourii May 26, 2023
f86d134
Merge branch 'parse-community:master' into master
mbfakourii May 28, 2023
79f9d4b
Merge branch 'parse-community:master' into master
mbfakourii May 29, 2023
e3e2b15
Merge branch 'parse-community:master' into master
mbfakourii May 29, 2023
1b96d48
Merge branch 'parse-community:master' into master
mbfakourii Jun 8, 2023
2ac7344
Merge branch 'parse-community:master' into master
mbfakourii Jun 20, 2023
9c77278
Merge branch 'parse-community:master' into master
mbfakourii Jul 3, 2023
f7590c6
fix pull id
mbfakourii Jul 3, 2023
45f771a
bump version to `5.1.2` and add changes in CHANGELOG.md
mbfakourii Jul 3, 2023
a40761f
update date
mtrezza Jul 7, 2023
730bb59
fix changelog typo
mtrezza Jul 7, 2023
a624cc6
Delete generated_plugin_registrant.cc
mbfakourii Jul 10, 2023
2baf107
Revert "Delete generated_plugin_registrant.cc"
mbfakourii Jul 10, 2023
fa265da
revert
mbfakourii Jul 10, 2023
9527c61
revert
mbfakourii Jul 10, 2023
48b13a5
revert
mbfakourii Jul 10, 2023
60c9b01
revert
mbfakourii Jul 10, 2023
007f2d3
revert
mbfakourii Jul 10, 2023
6669241
revert
mbfakourii Jul 10, 2023
5324951
revert
mbfakourii Jul 10, 2023
d8a7450
revert
mbfakourii Jul 10, 2023
854e42d
Update packages/flutter/CHANGELOG.md
mtrezza Jul 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [5.1.2](https://github.com/parse-community/Parse-SDK-Flutter/compare/flutter-5.1.1...flutter-5.1.2) (2023-07-03)
mtrezza marked this conversation as resolved.
Show resolved Hide resolved

### Bug Fixes

* `dbDirectory` not exist in `core_store_directory_web` in web ([#948](https://github.com/parse-community/Parse-SDK-Flutter/pull/948))
mtrezza marked this conversation as resolved.
Show resolved Hide resolved

## [5.1.1](https://github.com/parse-community/Parse-SDK-Flutter/compare/flutter-5.1.0...flutter-5.1.1) (2023-06-28)

### Bug Fixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

#include "generated_plugin_registrant.h"

#include <awesome_notifications/awesome_notifications_plugin.h>
mtrezza marked this conversation as resolved.
Show resolved Hide resolved

void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) awesome_notifications_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "AwesomeNotificationsPlugin");
awesome_notifications_plugin_register_with_registrar(awesome_notifications_registrar);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

list(APPEND FLUTTER_PLUGIN_LIST
awesome_notifications
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@

#include "generated_plugin_registrant.h"

#include <awesome_notifications/awesome_notifications_plugin_c_api.h>
#include <connectivity_plus/connectivity_plus_windows_plugin.h>

void RegisterPlugins(flutter::PluginRegistry* registry) {
AwesomeNotificationsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("AwesomeNotificationsPluginCApi"));
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

list(APPEND FLUTTER_PLUGIN_LIST
awesome_notifications
connectivity_plus
)

Expand Down
1 change: 1 addition & 0 deletions packages/flutter/lib/parse_server_sdk_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'dart:async';
import 'dart:io';
import 'dart:math';
import 'dart:ui';
import 'package:path/path.dart' as path;
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
Expand Down
7 changes: 0 additions & 7 deletions packages/flutter/lib/src/storage/core_store_directory_io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ class CoreStoreDirectory {
return (await path_provider.getApplicationDocumentsDirectory()).path;
}

/// Returns the database directory.
Future<String> dbDirectory() async {
String dbDirectory = '';
dbDirectory = await CoreStoreDirectory().getDatabaseDirectory();
return path.join('$dbDirectory/parse', 'parse.db');
}

/// A migration algorithm for the internal SDK database file on iOS. This
/// function moves the database file from the documents directory to the
/// library directory to prevent issues with Parse SDK Flutter on iOS.
Expand Down
8 changes: 7 additions & 1 deletion packages/flutter/lib/src/storage/core_store_sembast.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@
static Future<CoreStoreSembast> getInstance(
{DatabaseFactory? factory, String? password}) async {
_sembastImp ??= await sdk.CoreStoreSembastImp.getInstance(
await CoreStoreDirectory().dbDirectory(),
await _dbDirectory(),

Check warning on line 12 in packages/flutter/lib/src/storage/core_store_sembast.dart

View check run for this annotation

Codecov / codecov/patch

packages/flutter/lib/src/storage/core_store_sembast.dart#L12

Added line #L12 was not covered by tests
factory: factory,
password: password);
return CoreStoreSembast._();
}

/// Returns the database directory.
static Future<String> _dbDirectory() async {
String dbDirectory = await CoreStoreDirectory().getDatabaseDirectory();
return path.join('$dbDirectory/parse', 'parse.db');

Check warning on line 21 in packages/flutter/lib/src/storage/core_store_sembast.dart

View check run for this annotation

Codecov / codecov/patch

packages/flutter/lib/src/storage/core_store_sembast.dart#L19-L21

Added lines #L19 - L21 were not covered by tests
}

@override
Future<bool> clear() async {
await _sembastImp!.clear();
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: parse_server_sdk_flutter
description: The Flutter SDK to connect to Parse Server. Build your apps faster with Parse Platform, the complete application stack.
version: 5.1.1
version: 5.1.2
homepage: https://github.com/parse-community/Parse-SDK-Flutter

environment:
Expand Down