mv flowy_logger to flowy_infra package

This commit is contained in:
appflowy 2021-07-13 10:59:51 +08:00
parent cabd2384a2
commit 2c4560bd2b
35 changed files with 87 additions and 368 deletions

View File

@ -1,14 +1,10 @@
import 'package:app_flowy/home/application/home_bloc.dart';
import 'package:app_flowy/home/application/watcher/home_watcher_bloc.dart';
import 'package:app_flowy/home/domain/page_context.dart';
import 'package:app_flowy/home/presentation/widgets/blank_page.dart';
import 'package:app_flowy/home/presentation/widgets/edit_pannel/edit_pannel.dart';
import 'package:app_flowy/home/presentation/widgets/edit_pannel/pannel_animation.dart';
import 'package:app_flowy/home/presentation/widgets/home_top_bar.dart';
import 'package:app_flowy/home/presentation/widgets/menu/home_menu.dart';
import 'package:app_flowy/home/presentation/widgets/prelude.dart';
import 'package:app_flowy/startup/startup.dart';
import 'package:flowy_infra_ui/styles/styled_container.dart';
import 'package:flowy_logger/flowy_logger.dart';
import 'package:flowy_infra/flowy_logger.dart';
import 'package:flowy_infra_ui/style_widget/styled_container.dart';
import 'package:flowy_sdk/protobuf/user_detail.pb.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

View File

@ -2,8 +2,8 @@ import 'package:app_flowy/home/application/edit_pannel/edit_pannel_bloc.dart';
import 'package:app_flowy/home/domain/edit_context.dart';
import 'package:app_flowy/startup/startup.dart';
import 'package:dartz/dartz.dart';
import 'package:flowy_infra_ui/styles/styled_bar_title.dart';
import 'package:flowy_infra_ui/styles/styled_close_button.dart';
import 'package:flowy_infra_ui/style_widget/styled_bar_title.dart';
import 'package:flowy_infra_ui/style_widget/styled_close_button.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import '../../home_sizes.dart';

View File

@ -0,0 +1,5 @@
export './blank_page.dart';
export './edit_pannel/edit_pannel.dart';
export './edit_pannel/pannel_animation.dart';
export './home_top_bar.dart';
export './menu/home_menu.dart';

View File

@ -5,7 +5,7 @@ import 'package:bloc/bloc.dart';
import 'package:path_provider/path_provider.dart';
import 'package:flowy_sdk/flowy_sdk.dart';
import 'package:flutter/material.dart';
import 'package:flowy_logger/flowy_logger.dart';
import 'package:flowy_infra/flowy_logger.dart';
class RustSDKInitTask extends LaunchTask {
@override

View File

@ -3,7 +3,7 @@ import 'package:app_flowy/welcome/domain/auth_state.dart';
import 'package:app_flowy/startup/startup.dart';
import 'package:app_flowy/welcome/application/welcome_bloc.dart';
import 'package:flowy_infra_ui/widget/route/animation.dart';
import 'package:flowy_logger/flowy_logger.dart';
import 'package:flowy_infra/flowy_logger.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flowy_infra/time/prelude.dart';

View File

@ -81,6 +81,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
logger:
dependency: "direct main"
description:
name: logger
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
matcher:
dependency: transitive
description:
@ -150,14 +157,14 @@ packages:
source: hosted
version: "0.4.1"
textstyle_extensions:
dependency: "direct dev"
dependency: "direct main"
description:
name: textstyle_extensions
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0-nullsafety"
time:
dependency: "direct dev"
dependency: "direct main"
description:
name: time
url: "https://pub.dartlang.org"
@ -171,7 +178,7 @@ packages:
source: hosted
version: "1.3.0"
uuid:
dependency: "direct dev"
dependency: "direct main"
description:
name: uuid
url: "https://pub.dartlang.org"

View File

@ -10,14 +10,15 @@ environment:
dependencies:
flutter:
sdk: flutter
time: '>=2.0.0'
uuid: ">=2.2.2"
textstyle_extensions: '2.0.0-nullsafety'
logger: ^1.0.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.0
time: '>=2.0.0'
uuid: ">=2.2.2"
textstyle_extensions: '2.0.0-nullsafety'
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

View File

@ -1,4 +1,4 @@
import 'package:flowy_infra_ui/styles/styled_image_icon.dart';
import 'package:flowy_infra_ui/style_widget/styled_image_icon.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
// ignore: import_of_legacy_library_into_null_safe

View File

@ -1,4 +1,4 @@
import 'package:flowy_infra_ui/styles/scrolling/styled_list.dart';
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
import 'package:flowy_infra/size.dart';
import 'package:flowy_infra/text_style.dart';
import 'package:flowy_infra/theme.dart';

View File

@ -1,74 +0,0 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
build/
# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java
# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3

View File

@ -1,10 +0,0 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: 63062a64432cce03315d6b5196fda7912866eb37
channel: dev
project_type: package

View File

@ -1,3 +0,0 @@
## [0.0.1] - TODO: Add release date.
* TODO: Describe initial release.

View File

@ -1 +0,0 @@
TODO: Add your license here.

View File

@ -1,14 +0,0 @@
# flowy_logger
A new Flutter package project.
## Getting Started
This project is a starting point for a Dart
[package](https://flutter.dev/developing-packages/),
a library module containing code that can be shared easily across
multiple Flutter or Dart projects.
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

View File

@ -1,168 +0,0 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.7.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
lints:
dependency: transitive
description:
name: lints
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
logger:
dependency: "direct main"
description:
name: logger
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.1"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
flutter: ">=1.17.0"

View File

@ -1,55 +0,0 @@
name: flowy_logger
description: A new Flutter package project.
version: 0.0.1
homepage:
environment:
sdk: ">=2.12.0-0 <3.0.0"
flutter: ">=1.17.0"
dependencies:
flutter:
sdk: flutter
logger: ^1.0.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# To add assets to your package, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
#
# For details regarding assets in packages, see
# https://flutter.dev/assets-and-images/#from-packages
#
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# To add custom fonts to your package, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts in packages, see
# https://flutter.dev/custom-fonts/#from-packages

View File

@ -1 +0,0 @@
void main() {}

View File

@ -99,10 +99,10 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
flowy_logger:
flowy_infra:
dependency: transitive
description:
path: "../../flowy_logger"
path: "../../flowy_infra"
relative: true
source: path
version: "0.0.1"
@ -276,6 +276,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.1"
textstyle_extensions:
dependency: transitive
description:
name: textstyle_extensions
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0-nullsafety"
time:
dependency: transitive
description:
name: time
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
typed_data:
dependency: transitive
description:
@ -283,6 +297,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
uuid:
dependency: transitive
description:
name: uuid
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.4"
vector_math:
dependency: transitive
description:

View File

@ -1,6 +1,6 @@
import 'dart:ffi';
import 'package:dartz/dartz.dart';
import 'package:flowy_logger/flowy_logger.dart';
import 'package:flowy_infra/flowy_logger.dart';
import 'package:flowy_sdk/protobuf/ffi_response.pb.dart';
import 'package:isolates/isolates.dart';
import 'package:isolates/ports.dart';
@ -9,7 +9,7 @@ import 'package:ffi/ffi.dart';
import 'package:flutter/services.dart';
import 'dart:async';
import 'dart:typed_data';
import 'package:flowy_sdk/ffi/ffi.dart' as ffi;
import 'package:flowy_sdk/ffi.dart' as ffi;
import 'package:flowy_sdk/protobuf.dart';
import 'package:protobuf/protobuf.dart';

View File

@ -1,11 +1,9 @@
export 'package:async/async.dart';
import 'dart:io';
import 'dart:async';
// import 'package:dartz/dartz.dart';
import 'package:flutter/services.dart';
import 'dart:ffi';
import 'ffi/ffi.dart' as ffi;
import 'ffi.dart' as ffi;
import 'package:ffi/ffi.dart';
class FlowySDK {

View File

@ -197,10 +197,10 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
flowy_logger:
flowy_infra:
dependency: "direct main"
description:
path: "../flowy_logger"
path: "../flowy_infra"
relative: true
source: path
version: "0.0.1"
@ -443,6 +443,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.1"
textstyle_extensions:
dependency: transitive
description:
name: textstyle_extensions
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0-nullsafety"
time:
dependency: transitive
description:
name: time
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
timing:
dependency: transitive
description:
@ -457,6 +471,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
uuid:
dependency: transitive
description:
name: uuid
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.4"
vector_math:
dependency: transitive
description:

View File

@ -14,10 +14,10 @@ dependencies:
ffi: ^1.0.0
isolates: ^3.0.3+8
protobuf: "2.0.0"
flowy_logger:
path: ../flowy_logger
dartz: '0.10.0-nullsafety.2'
freezed_annotation: ^0.14.1
flowy_infra:
path: ../flowy_infra
dev_dependencies:
flutter_test:

View File

@ -253,13 +253,6 @@ packages:
relative: true
source: path
version: "0.0.1"
flowy_logger:
dependency: "direct main"
description:
path: "packages/flowy_logger"
relative: true
source: path
version: "0.0.1"
flowy_sdk:
dependency: "direct main"
description:
@ -779,6 +772,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
uuid:
dependency: transitive
description:
name: uuid
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.4"
vector_math:
dependency: transitive
description:

View File

@ -33,8 +33,6 @@ dependencies:
path: packages/flowy_sdk
flowy_editor:
path: packages/flowy_editor
flowy_logger:
path: packages/flowy_logger
flowy_infra_ui:
path: packages/flowy_infra_ui
flowy_infra:

View File

@ -1,6 +1,7 @@
use crate::proto::ast::*;
use crate::proto::proto_info::*;
use crate::{proto::template::*, util::*};
use std::path::Path;
use std::{fs::OpenOptions, io::Write};
pub struct ProtoGen {
@ -131,9 +132,6 @@ fn run_rust_protoc(crate_infos: &Vec<CrateProtoInfo>) {
}
}
use std::path::Path;
use std::process::Command;
fn run_flutter_protoc(crate_infos: &Vec<CrateProtoInfo>, package_info: &FlutterProtobufInfo) {
let model_dir = package_info.model_dir();
let removed_dir = format!("{}/", model_dir);