Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/celest_auth
Browse files Browse the repository at this point in the history
  • Loading branch information
dnys1 committed Mar 7, 2024
2 parents ac3864f + cad92d1 commit c793fc3
Show file tree
Hide file tree
Showing 17 changed files with 1,485 additions and 65 deletions.
59 changes: 58 additions & 1 deletion .github/workflows/celest_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
uses: subosito/flutter-action@62f096cacda5168a3bd7b95793373be14fa4fbaf # 2.13.0
with:
cache: true
- name: Get Packages
- name: Get Packages (Example)
working-directory: packages/celest_core/example
run: flutter pub get
- name: Enable KVM
Expand All @@ -94,3 +94,60 @@ jobs:
api-level: 31
arch: x86_64
script: cd packages/celest_core/example && flutter test -d emulator integration_test/secure_storage_test.dart
test_linux:
needs: analyze_and_format
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Git Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1
- name: Setup Flutter
uses: subosito/flutter-action@62f096cacda5168a3bd7b95793373be14fa4fbaf # 2.13.0
with:
cache: true
- name: Install Build Dependencies
run: sudo apt-get update && sudo apt-get install -y clang cmake git ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
- name: Setup Test Environment
working-directory: packages/celest_core
run: tool/setup-ci.sh
- name: Get Packages
working-directory: packages/celest_core
run: dart pub get
- name: Test
working-directory: packages/celest_core
run: dart test
- name: Get Packages (Example)
working-directory: packages/celest_core/example
run: flutter pub get
- name: Test (Linux)
working-directory: packages/celest_core/example
run: |
# Headless tests require virtual display for the linux tests to run.
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
flutter test -d linux integration_test/secure_storage_test.dart
# TODO: Re-enable
# Need to fix this: Git error. Command: `git clone --mirror https://github.com/dart-lang/native /c/Users/runneradmin/.pub-cache\git\cache\native-647c69ed8027da6d6def6bc40efa87cf1a2f76aa`
# test_windows:
# needs: analyze_and_format
# runs-on: windows-latest
# timeout-minutes: 15
# steps:
# - name: Git Checkout
# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1
# - name: Setup Flutter
# uses: subosito/flutter-action@62f096cacda5168a3bd7b95793373be14fa4fbaf # 2.13.0
# with:
# cache: true
# - name: Get Packages
# working-directory: packages/celest_core
# run: dart pub get --no-example
# - name: Test
# working-directory: packages/celest_core
# run: dart test
# - name: Get Packages (Example)
# working-directory: packages/celest_core/example
# run: flutter pub get
# - name: Test (Windows)
# working-directory: packages/celest_core/example
# run: flutter test -d windows integration_test/secure_storage_test.dart
40 changes: 19 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
MIT License

Copyright (c) 2024 Celest

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Copyright (c) 2024 Teo, Inc. (Celest)

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Subject to the terms and conditions of this license, each copyright holder and contributor hereby grants to those receiving rights under this license a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except for failure to satisfy the conditions of this license) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer this software, where such license applies only to those patent claims, already acquired or hereafter acquired, licensable by such copyright holder or contributor that are necessarily infringed by:

(a) their Contribution(s) (the licensed copyrights of copyright holders and non-copyrightable additions of contributors, in source or binary form) alone; or

(b) combination of their Contribution(s) with the work of authorship to which such Contribution(s) was added by such copyright holder or contributor, if, at the time the Contribution is added, such addition causes such combination to be necessarily infringed. The patent license shall not apply to any other combinations which include the Contribution.

Except as expressly stated above, no rights or licenses from any copyright holder or contributor is granted under this license, whether expressly, by implication, estoppel or otherwise.

DISCLAIMER

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 changes: 19 additions & 21 deletions packages/celest/LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
MIT License

Copyright (c) 2024 Celest

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Copyright (c) 2024 Teo, Inc. (Celest)

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Subject to the terms and conditions of this license, each copyright holder and contributor hereby grants to those receiving rights under this license a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except for failure to satisfy the conditions of this license) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer this software, where such license applies only to those patent claims, already acquired or hereafter acquired, licensable by such copyright holder or contributor that are necessarily infringed by:

(a) their Contribution(s) (the licensed copyrights of copyright holders and non-copyrightable additions of contributors, in source or binary form) alone; or

(b) combination of their Contribution(s) with the work of authorship to which such Contribution(s) was added by such copyright holder or contributor, if, at the time the Contribution is added, such addition causes such combination to be necessarily infringed. The patent license shall not apply to any other combinations which include the Contribution.

Except as expressly stated above, no rights or licenses from any copyright holder or contributor is granted under this license, whether expressly, by implication, estoppel or otherwise.

DISCLAIMER

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 changes: 19 additions & 21 deletions packages/celest_core/LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
MIT License

Copyright (c) 2024 Celest

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Copyright (c) 2024 Teo, Inc. (Celest)

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Subject to the terms and conditions of this license, each copyright holder and contributor hereby grants to those receiving rights under this license a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except for failure to satisfy the conditions of this license) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer this software, where such license applies only to those patent claims, already acquired or hereafter acquired, licensable by such copyright holder or contributor that are necessarily infringed by:

(a) their Contribution(s) (the licensed copyrights of copyright holders and non-copyrightable additions of contributors, in source or binary form) alone; or

(b) combination of their Contribution(s) with the work of authorship to which such Contribution(s) was added by such copyright holder or contributor, if, at the time the Contribution is added, such addition causes such combination to be necessarily infringed. The patent license shall not apply to any other combinations which include the Contribution.

Except as expressly stated above, no rights or licenses from any copyright holder or contributor is granted under this license, whether expressly, by implication, estoppel or otherwise.

DISCLAIMER

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ final _random = Random();
Iterable<(int, String)> get _largeKeyValuePairs sync* {
for (final length in const [100, 1000, 10000]) {
final string = String.fromCharCodes(
List.generate(length, (_) => _random.nextInt(255) + 1),
List.generate(length, (_) => _random.nextInt(94) + 33),
);
yield (length, string);
}
Expand Down
45 changes: 45 additions & 0 deletions packages/celest_core/ffigen.glib.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Glib
description: |
Bindings for glib on Linux.
Regenerate bindings with `dart run ffigen --config=ffigen.glib.yaml`.
language: c
output: lib/src/native/linux/glib.ffi.dart
headers:
entry-points:
- /usr/include/glib-2.0/glib.h
- /usr/include/glib-2.0/glib-object.h
- /usr/include/glib-2.0/gio/gio.h
preamble: |
// ignore_for_file: type=lint
// ignore_for_file: return_of_invalid_type
// ignore_for_file: unnecessary_non_null_assertion
comments:
style: any
length: full

exclude-all-by-default: true
typedefs:
include:
- gboolean
- gint
- gpointer
functions:
include:
- g_hash_table_new
- g_hash_table_insert
- g_hash_table_destroy
- g_application_get_default
- g_application_get_application_id
- g_error_free
structs:
include:
- _GError
- _GHashTable
- _GCancellable
- _GObject
rename:
"_GError": GError
"_GHashTable": GHashTable
"_GCancellable": GCancellable
"_GObject": GObject
69 changes: 69 additions & 0 deletions packages/celest_core/ffigen.libsecret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Libsecret
description: |
Bindings for Libsecret on Linux.
Regenerate bindings with `dart run ffigen --config=ffigen.libsecret.yaml`.
language: c
output: lib/src/native/linux/libsecret.ffi.dart
headers:
entry-points:
- /usr/include/libsecret-1/libsecret/secret.h
preamble: |
// ignore_for_file: type=lint
// ignore_for_file: return_of_invalid_type
// ignore_for_file: unnecessary_non_null_assertion
library-imports:
glib: package:celest_core/src/native/linux/glib.ffi.dart
comments:
style: any
length: full

exclude-all-by-default: true
functions:
include:
- secret_password_storev_sync
- secret_password_lookupv_sync
- secret_password_clearv_sync
- secret_password_free
structs:
include:
- SecretSchema
- SecretSchemaAttribute
enums:
include:
- SecretSchemaAttributeType
- SecretSchemaFlags
macros:
include:
- SECRET_COLLECTION_DEFAULT
type-map:
typedefs:
GHashTable:
lib: glib
c-type: GHashTable
dart-type: GHashTable
GError:
lib: glib
c-type: GError
dart-type: GError
GCancellable:
lib: glib
c-type: GCancellable
dart-type: GCancellable
gpointer:
lib: glib
c-type: gpointer
dart-type: gpointer
gboolean:
lib: glib
c-type: gboolean
dart-type: int
gchar:
lib: pkg_ffi
c-type: Utf8
dart-type: Char
gint:
lib: glib
c-type: gint
dart-type: int

Loading

0 comments on commit c793fc3

Please sign in to comment.