Browse Source

Merge pull request #194 from Leptopoda/feature/built_value

Feature/built value
pull/318/head
Nikolas Rimikis 2 years ago committed by GitHub
parent
commit
1fea81140a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 312
      .github/workflows/dart.yml
  2. 31
      packages/app/pubspec.lock
  3. 2
      packages/dynamite/dynamite/.gitignore
  4. 0
      packages/dynamite/dynamite/analysis_options.yaml
  5. 4
      packages/dynamite/dynamite/build.yaml
  6. 0
      packages/dynamite/dynamite/lib/builder.dart
  7. 1
      packages/dynamite/dynamite/lib/dynamite.dart
  8. 0
      packages/dynamite/dynamite/lib/src/models/components.dart
  9. 0
      packages/dynamite/dynamite/lib/src/models/components.g.dart
  10. 0
      packages/dynamite/dynamite/lib/src/models/discriminator.dart
  11. 0
      packages/dynamite/dynamite/lib/src/models/discriminator.g.dart
  12. 0
      packages/dynamite/dynamite/lib/src/models/header.dart
  13. 0
      packages/dynamite/dynamite/lib/src/models/header.g.dart
  14. 0
      packages/dynamite/dynamite/lib/src/models/info.dart
  15. 0
      packages/dynamite/dynamite/lib/src/models/info.g.dart
  16. 0
      packages/dynamite/dynamite/lib/src/models/license.dart
  17. 0
      packages/dynamite/dynamite/lib/src/models/license.g.dart
  18. 0
      packages/dynamite/dynamite/lib/src/models/media_type.dart
  19. 0
      packages/dynamite/dynamite/lib/src/models/media_type.g.dart
  20. 0
      packages/dynamite/dynamite/lib/src/models/open_api.dart
  21. 0
      packages/dynamite/dynamite/lib/src/models/open_api.g.dart
  22. 0
      packages/dynamite/dynamite/lib/src/models/operation.dart
  23. 0
      packages/dynamite/dynamite/lib/src/models/operation.g.dart
  24. 0
      packages/dynamite/dynamite/lib/src/models/parameter.dart
  25. 0
      packages/dynamite/dynamite/lib/src/models/parameter.g.dart
  26. 0
      packages/dynamite/dynamite/lib/src/models/path_item.dart
  27. 0
      packages/dynamite/dynamite/lib/src/models/path_item.g.dart
  28. 0
      packages/dynamite/dynamite/lib/src/models/paths.dart
  29. 0
      packages/dynamite/dynamite/lib/src/models/request_body.dart
  30. 0
      packages/dynamite/dynamite/lib/src/models/request_body.g.dart
  31. 0
      packages/dynamite/dynamite/lib/src/models/response.dart
  32. 0
      packages/dynamite/dynamite/lib/src/models/response.g.dart
  33. 0
      packages/dynamite/dynamite/lib/src/models/responses.dart
  34. 0
      packages/dynamite/dynamite/lib/src/models/schema.dart
  35. 0
      packages/dynamite/dynamite/lib/src/models/schema.g.dart
  36. 0
      packages/dynamite/dynamite/lib/src/models/security_requirement.dart
  37. 0
      packages/dynamite/dynamite/lib/src/models/security_scheme.dart
  38. 0
      packages/dynamite/dynamite/lib/src/models/security_scheme.g.dart
  39. 0
      packages/dynamite/dynamite/lib/src/models/server.dart
  40. 0
      packages/dynamite/dynamite/lib/src/models/server.g.dart
  41. 0
      packages/dynamite/dynamite/lib/src/models/server_variable.dart
  42. 0
      packages/dynamite/dynamite/lib/src/models/server_variable.g.dart
  43. 0
      packages/dynamite/dynamite/lib/src/models/tag.dart
  44. 0
      packages/dynamite/dynamite/lib/src/models/tag.g.dart
  45. 1078
      packages/dynamite/dynamite/lib/src/openapi_builder.dart
  46. 18
      packages/dynamite/dynamite/lib/src/type_result/base.dart
  47. 13
      packages/dynamite/dynamite/lib/src/type_result/enum.dart
  48. 19
      packages/dynamite/dynamite/lib/src/type_result/list.dart
  49. 13
      packages/dynamite/dynamite/lib/src/type_result/map.dart
  50. 59
      packages/dynamite/dynamite/lib/src/type_result/object.dart
  51. 62
      packages/dynamite/dynamite/lib/src/type_result/type_result.dart
  52. 0
      packages/dynamite/dynamite/mono_pkg.yaml
  53. 5
      packages/dynamite/dynamite/pubspec.yaml
  54. 43
      packages/dynamite/dynamite/test/type_result_test.dart
  55. 7
      packages/dynamite/dynamite_runtime/.gitignore
  56. 9
      packages/dynamite/dynamite_runtime/analysis_options.yaml
  57. 1
      packages/dynamite/dynamite_runtime/lib/content_string.dart
  58. 60
      packages/dynamite/dynamite_runtime/lib/src/content_string.dart
  59. 139
      packages/dynamite/dynamite_runtime/lib/src/content_string.g.dart
  60. 7
      packages/dynamite/dynamite_runtime/mono_pkg.yaml
  61. 19
      packages/dynamite/dynamite_runtime/pubspec.yaml
  62. 341
      packages/dynamite/dynamite_runtime/test/content_string_test.dart
  63. 11
      packages/dynamite/dynamite_runtime/test/content_string_test.g.dart
  64. 45
      packages/dynamite/lib/src/type_result/object.dart
  65. 19
      packages/dynamite/lib/src/type_result/type_result.dart
  66. 2
      packages/neon/neon/lib/src/blocs/apps.dart
  67. 2
      packages/neon/neon/lib/src/utils/request_manager.dart
  68. 2
      packages/neon/neon_news/lib/blocs/articles.dart
  69. 4
      packages/neon/neon_news/lib/blocs/news.dart
  70. 4
      packages/neon/neon_notes/lib/blocs/notes.dart
  71. 2
      packages/neon/neon_notifications/lib/blocs/notifications.dart
  72. 6
      packages/nextcloud/build.yaml
  73. 8149
      packages/nextcloud/lib/src/nextcloud.openapi.dart
  74. 25687
      packages/nextcloud/lib/src/nextcloud.openapi.g.dart
  75. 10
      packages/nextcloud/pubspec.yaml
  76. 5
      packages/nextcloud/test/core.dart
  77. 7
      packages/nextcloud/test/notes.dart
  78. 8
      packages/nextcloud/test/notifications.dart
  79. 2
      tool/ci.sh

312
.github/workflows/dart.yml

@ -1,4 +1,4 @@
# Created with package:mono_repo v6.5.0
# Created with package:mono_repo v6.5.5
name: Dart CI
on:
push:
@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable"
@ -26,14 +26,14 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: mono_repo self validate
run: dart pub global activate mono_repo 6.5.0
run: dart pub global activate mono_repo 6.5.5
- name: mono_repo self validate
run: dart pub global run mono_repo generate --validate
job_002:
@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/app;commands:format"
@ -51,12 +51,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_app_pub_upgrade
name: packages/app; flutter pub upgrade
run: flutter pub upgrade
@ -69,43 +69,75 @@ jobs:
needs:
- job_001
job_003:
name: "all; PKG: packages/dynamite; `dart format --output=none --set-exit-if-changed --line-length 120 .`"
name: "all; PKG: packages/dynamite/dynamite; `dart format --output=none --set-exit-if-changed --line-length 120 .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/dynamite;commands:format"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/dynamite/dynamite;commands:format"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/dynamite
os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/dynamite/dynamite
os:ubuntu-latest;pub-cache-hosted;sdk:stable
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- id: packages_dynamite_pub_upgrade
name: packages/dynamite; dart pub upgrade
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_dynamite_dynamite_pub_upgrade
name: packages/dynamite/dynamite; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: packages/dynamite
- name: "packages/dynamite; dart format --output=none --set-exit-if-changed --line-length 120 ."
working-directory: packages/dynamite/dynamite
- name: "packages/dynamite/dynamite; dart format --output=none --set-exit-if-changed --line-length 120 ."
run: "dart format --output=none --set-exit-if-changed --line-length 120 ."
if: "always() && steps.packages_dynamite_pub_upgrade.conclusion == 'success'"
working-directory: packages/dynamite
if: "always() && steps.packages_dynamite_dynamite_pub_upgrade.conclusion == 'success'"
working-directory: packages/dynamite/dynamite
needs:
- job_001
job_004:
name: "all; PKG: packages/dynamite/dynamite_runtime; `dart format --output=none --set-exit-if-changed --line-length 120 .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/dynamite/dynamite_runtime;commands:format"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/dynamite/dynamite_runtime
os:ubuntu-latest;pub-cache-hosted;sdk:stable
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_dynamite_dynamite_runtime_pub_upgrade
name: packages/dynamite/dynamite_runtime; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: packages/dynamite/dynamite_runtime
- name: "packages/dynamite/dynamite_runtime; dart format --output=none --set-exit-if-changed --line-length 120 ."
run: "dart format --output=none --set-exit-if-changed --line-length 120 ."
if: "always() && steps.packages_dynamite_dynamite_runtime_pub_upgrade.conclusion == 'success'"
working-directory: packages/dynamite/dynamite_runtime
needs:
- job_001
job_005:
name: "all; PKG: packages/file_icons; `dart format --output=none --set-exit-if-changed --line-length 120 .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/file_icons;commands:format"
@ -115,12 +147,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_file_icons_pub_upgrade
name: packages/file_icons; flutter pub upgrade
run: flutter pub upgrade
@ -132,12 +164,12 @@ jobs:
working-directory: packages/file_icons
needs:
- job_001
job_005:
job_006:
name: "all; PKG: packages/neon/neon; `dart format --output=none --set-exit-if-changed --line-length 120 .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/neon/neon;commands:format"
@ -147,12 +179,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_neon_neon_pub_upgrade
name: packages/neon/neon; flutter pub upgrade
run: flutter pub upgrade
@ -164,12 +196,12 @@ jobs:
working-directory: packages/neon/neon
needs:
- job_001
job_006:
job_007:
name: "all; PKG: packages/neon/neon_files; `dart format --output=none --set-exit-if-changed --line-length 120 .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/neon/neon_files;commands:format"
@ -179,12 +211,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_neon_neon_files_pub_upgrade
name: packages/neon/neon_files; flutter pub upgrade
run: flutter pub upgrade
@ -196,12 +228,12 @@ jobs:
working-directory: packages/neon/neon_files
needs:
- job_001
job_007:
job_008:
name: "all; PKG: packages/neon/neon_news; `dart format --output=none --set-exit-if-changed --line-length 120 .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/neon/neon_news;commands:format"
@ -211,12 +243,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_neon_neon_news_pub_upgrade
name: packages/neon/neon_news; flutter pub upgrade
run: flutter pub upgrade
@ -228,12 +260,12 @@ jobs:
working-directory: packages/neon/neon_news
needs:
- job_001
job_008:
job_009:
name: "all; PKG: packages/neon/neon_notes; `dart format --output=none --set-exit-if-changed --line-length 120 .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/neon/neon_notes;commands:format"
@ -243,12 +275,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_neon_neon_notes_pub_upgrade
name: packages/neon/neon_notes; flutter pub upgrade
run: flutter pub upgrade
@ -260,12 +292,12 @@ jobs:
working-directory: packages/neon/neon_notes
needs:
- job_001
job_009:
job_010:
name: "all; PKG: packages/neon/neon_notifications; `dart format --output=none --set-exit-if-changed --line-length 120 .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/neon/neon_notifications;commands:format"
@ -275,12 +307,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_neon_neon_notifications_pub_upgrade
name: packages/neon/neon_notifications; flutter pub upgrade
run: flutter pub upgrade
@ -292,12 +324,12 @@ jobs:
working-directory: packages/neon/neon_notifications
needs:
- job_001
job_010:
job_011:
name: "all; PKG: packages/nextcloud; `dart format --output=none --set-exit-if-changed --line-length 120 .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/nextcloud;commands:format"
@ -307,12 +339,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_nextcloud_pub_upgrade
name: packages/nextcloud; dart pub upgrade
run: dart pub upgrade
@ -324,12 +356,12 @@ jobs:
working-directory: packages/nextcloud
needs:
- job_001
job_011:
job_012:
name: "all; PKG: packages/settings; `dart format --output=none --set-exit-if-changed --line-length 120 .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/settings;commands:format"
@ -339,12 +371,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_settings_pub_upgrade
name: packages/settings; flutter pub upgrade
run: flutter pub upgrade
@ -356,12 +388,12 @@ jobs:
working-directory: packages/settings
needs:
- job_001
job_012:
job_013:
name: "all; PKG: packages/sort_box; `dart format --output=none --set-exit-if-changed --line-length 120 .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/sort_box;commands:format"
@ -371,12 +403,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_sort_box_pub_upgrade
name: packages/sort_box; dart pub upgrade
run: dart pub upgrade
@ -388,12 +420,12 @@ jobs:
working-directory: packages/sort_box
needs:
- job_001
job_013:
job_014:
name: "all; PKG: packages/spec_templates; `dart format --output=none --set-exit-if-changed --line-length 120 .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/spec_templates;commands:format"
@ -403,12 +435,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_spec_templates_pub_upgrade
name: packages/spec_templates; dart pub upgrade
run: dart pub upgrade
@ -420,12 +452,12 @@ jobs:
working-directory: packages/spec_templates
needs:
- job_001
job_014:
job_015:
name: "all; PKG: packages/app; `flutter analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/app;commands:analyze_0"
@ -435,12 +467,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_app_pub_upgrade
name: packages/app; flutter pub upgrade
run: flutter pub upgrade
@ -452,12 +484,12 @@ jobs:
working-directory: packages/app
needs:
- job_001
job_015:
job_016:
name: "all; PKG: packages/file_icons; `flutter analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/file_icons;commands:analyze_0"
@ -467,12 +499,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_file_icons_pub_upgrade
name: packages/file_icons; flutter pub upgrade
run: flutter pub upgrade
@ -484,12 +516,12 @@ jobs:
working-directory: packages/file_icons
needs:
- job_001
job_016:
job_017:
name: "all; PKG: packages/neon/neon; `flutter analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/neon/neon;commands:analyze_0"
@ -499,12 +531,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_neon_neon_pub_upgrade
name: packages/neon/neon; flutter pub upgrade
run: flutter pub upgrade
@ -516,12 +548,12 @@ jobs:
working-directory: packages/neon/neon
needs:
- job_001
job_017:
job_018:
name: "all; PKG: packages/neon/neon_files; `flutter analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/neon/neon_files;commands:analyze_0"
@ -531,12 +563,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_neon_neon_files_pub_upgrade
name: packages/neon/neon_files; flutter pub upgrade
run: flutter pub upgrade
@ -548,12 +580,12 @@ jobs:
working-directory: packages/neon/neon_files
needs:
- job_001
job_018:
job_019:
name: "all; PKG: packages/neon/neon_news; `flutter analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/neon/neon_news;commands:analyze_0"
@ -563,12 +595,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_neon_neon_news_pub_upgrade
name: packages/neon/neon_news; flutter pub upgrade
run: flutter pub upgrade
@ -580,12 +612,12 @@ jobs:
working-directory: packages/neon/neon_news
needs:
- job_001
job_019:
job_020:
name: "all; PKG: packages/neon/neon_notes; `flutter analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/neon/neon_notes;commands:analyze_0"
@ -595,12 +627,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_neon_neon_notes_pub_upgrade
name: packages/neon/neon_notes; flutter pub upgrade
run: flutter pub upgrade
@ -612,12 +644,12 @@ jobs:
working-directory: packages/neon/neon_notes
needs:
- job_001
job_020:
job_021:
name: "all; PKG: packages/neon/neon_notifications; `flutter analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/neon/neon_notifications;commands:analyze_0"
@ -627,12 +659,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_neon_neon_notifications_pub_upgrade
name: packages/neon/neon_notifications; flutter pub upgrade
run: flutter pub upgrade
@ -644,12 +676,12 @@ jobs:
working-directory: packages/neon/neon_notifications
needs:
- job_001
job_021:
job_022:
name: "all; PKG: packages/settings; `flutter analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/settings;commands:analyze_0"
@ -659,12 +691,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Flutter SDK
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
with:
channel: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_settings_pub_upgrade
name: packages/settings; flutter pub upgrade
run: flutter pub upgrade
@ -676,44 +708,76 @@ jobs:
working-directory: packages/settings
needs:
- job_001
job_022:
name: "all; PKG: packages/dynamite; `dart analyze --fatal-infos .`"
job_023:
name: "all; PKG: packages/dynamite/dynamite; `dart analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/dynamite;commands:analyze_1"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/dynamite/dynamite;commands:analyze_1"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/dynamite
os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/dynamite/dynamite
os:ubuntu-latest;pub-cache-hosted;sdk:stable
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- id: packages_dynamite_pub_upgrade
name: packages/dynamite; dart pub upgrade
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_dynamite_dynamite_pub_upgrade
name: packages/dynamite/dynamite; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: packages/dynamite
- name: "packages/dynamite; dart analyze --fatal-infos ."
working-directory: packages/dynamite/dynamite
- name: "packages/dynamite/dynamite; dart analyze --fatal-infos ."
run: dart analyze --fatal-infos .
if: "always() && steps.packages_dynamite_pub_upgrade.conclusion == 'success'"
working-directory: packages/dynamite
if: "always() && steps.packages_dynamite_dynamite_pub_upgrade.conclusion == 'success'"
working-directory: packages/dynamite/dynamite
needs:
- job_001
job_023:
job_024:
name: "all; PKG: packages/dynamite/dynamite_runtime; `dart analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/dynamite/dynamite_runtime;commands:analyze_1"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/dynamite/dynamite_runtime
os:ubuntu-latest;pub-cache-hosted;sdk:stable
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_dynamite_dynamite_runtime_pub_upgrade
name: packages/dynamite/dynamite_runtime; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: packages/dynamite/dynamite_runtime
- name: "packages/dynamite/dynamite_runtime; dart analyze --fatal-infos ."
run: dart analyze --fatal-infos .
if: "always() && steps.packages_dynamite_dynamite_runtime_pub_upgrade.conclusion == 'success'"
working-directory: packages/dynamite/dynamite_runtime
needs:
- job_001
job_025:
name: "all; PKG: packages/nextcloud; `dart analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/nextcloud;commands:analyze_1"
@ -723,12 +787,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_nextcloud_pub_upgrade
name: packages/nextcloud; dart pub upgrade
run: dart pub upgrade
@ -740,12 +804,12 @@ jobs:
working-directory: packages/nextcloud
needs:
- job_001
job_024:
job_026:
name: "all; PKG: packages/sort_box; `dart analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/sort_box;commands:analyze_1"
@ -755,12 +819,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_sort_box_pub_upgrade
name: packages/sort_box; dart pub upgrade
run: dart pub upgrade
@ -772,12 +836,12 @@ jobs:
working-directory: packages/sort_box
needs:
- job_001
job_025:
job_027:
name: "all; PKG: packages/spec_templates; `dart analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/spec_templates;commands:analyze_1"
@ -787,12 +851,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_spec_templates_pub_upgrade
name: packages/spec_templates; dart pub upgrade
run: dart pub upgrade
@ -804,12 +868,12 @@ jobs:
working-directory: packages/spec_templates
needs:
- job_001
job_026:
job_028:
name: "all; PKG: packages/nextcloud; `dart test`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/nextcloud;commands:test"
@ -819,12 +883,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_nextcloud_pub_upgrade
name: packages/nextcloud; dart pub upgrade
run: dart pub upgrade
@ -836,12 +900,12 @@ jobs:
working-directory: packages/nextcloud
needs:
- job_001
job_027:
job_029:
name: "all; PKG: packages/sort_box; `dart test`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/sort_box;commands:test"
@ -851,12 +915,12 @@ jobs:
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: stable
- id: checkout
name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- id: packages_sort_box_pub_upgrade
name: packages/sort_box; dart pub upgrade
run: dart pub upgrade

31
packages/app/pubspec.lock

@ -41,6 +41,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.1"
built_collection:
dependency: transitive
description:
name: built_collection
sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100"
url: "https://pub.dev"
source: hosted
version: "5.1.1"
built_value:
dependency: transitive
description:
name: built_value
sha256: "2f17434bd5d52a26762043d6b43bb53b3acd029b4d9071a329f46d67ef297e6d"
url: "https://pub.dev"
source: hosted
version: "8.5.0"
characters:
dependency: transitive
description:
@ -121,6 +137,13 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.7.8"
dynamite_runtime:
dependency: transitive
description:
path: "../dynamite/dynamite_runtime"
relative: true
source: path
version: "1.0.0"
fake_async:
dependency: transitive
description:
@ -168,6 +191,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.1"
fixnum:
dependency: transitive
description:
name: fixnum
sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
flutter:
dependency: "direct main"
description: flutter

2
packages/dynamite/.gitignore → packages/dynamite/dynamite/.gitignore vendored

@ -8,3 +8,5 @@ build/
# Omit committing pubspec.lock for library packages; see
# https://dart.dev/guides/libraries/private-files#pubspeclock.
pubspec.lock
coverage/

0
packages/dynamite/analysis_options.yaml → packages/dynamite/dynamite/analysis_options.yaml

4
packages/dynamite/build.yaml → packages/dynamite/dynamite/build.yaml

@ -18,5 +18,5 @@ builders:
build_extensions: {'.openapi.json': ['openapi.dart']}
auto_apply: root_package
build_to: source
runs_before: ["json_serializable"]
applies_builders: ["json_serializable"]
runs_before: ["built_value_generator|built_value"]
applies_builders: ["built_value_generator|built_value"]

0
packages/dynamite/lib/builder.dart → packages/dynamite/dynamite/lib/builder.dart

1
packages/dynamite/lib/dynamite.dart → packages/dynamite/dynamite/lib/dynamite.dart

@ -9,6 +9,7 @@ import 'package:dynamite/src/models/open_api.dart';
import 'package:dynamite/src/models/parameter.dart' as spec_parameter;
import 'package:dynamite/src/models/path_item.dart';
import 'package:dynamite/src/models/schema.dart';
import 'package:intersperse/intersperse.dart';
import 'package:path/path.dart' as p;
part 'src/openapi_builder.dart';

0
packages/dynamite/lib/src/models/components.dart → packages/dynamite/dynamite/lib/src/models/components.dart

0
packages/dynamite/lib/src/models/components.g.dart → packages/dynamite/dynamite/lib/src/models/components.g.dart

0
packages/dynamite/lib/src/models/discriminator.dart → packages/dynamite/dynamite/lib/src/models/discriminator.dart

0
packages/dynamite/lib/src/models/discriminator.g.dart → packages/dynamite/dynamite/lib/src/models/discriminator.g.dart

0
packages/dynamite/lib/src/models/header.dart → packages/dynamite/dynamite/lib/src/models/header.dart

0
packages/dynamite/lib/src/models/header.g.dart → packages/dynamite/dynamite/lib/src/models/header.g.dart

0
packages/dynamite/lib/src/models/info.dart → packages/dynamite/dynamite/lib/src/models/info.dart

0
packages/dynamite/lib/src/models/info.g.dart → packages/dynamite/dynamite/lib/src/models/info.g.dart

0
packages/dynamite/lib/src/models/license.dart → packages/dynamite/dynamite/lib/src/models/license.dart

0
packages/dynamite/lib/src/models/license.g.dart → packages/dynamite/dynamite/lib/src/models/license.g.dart

0
packages/dynamite/lib/src/models/media_type.dart → packages/dynamite/dynamite/lib/src/models/media_type.dart

0
packages/dynamite/lib/src/models/media_type.g.dart → packages/dynamite/dynamite/lib/src/models/media_type.g.dart

0
packages/dynamite/lib/src/models/open_api.dart → packages/dynamite/dynamite/lib/src/models/open_api.dart

0
packages/dynamite/lib/src/models/open_api.g.dart → packages/dynamite/dynamite/lib/src/models/open_api.g.dart

0
packages/dynamite/lib/src/models/operation.dart → packages/dynamite/dynamite/lib/src/models/operation.dart

0
packages/dynamite/lib/src/models/operation.g.dart → packages/dynamite/dynamite/lib/src/models/operation.g.dart

0
packages/dynamite/lib/src/models/parameter.dart → packages/dynamite/dynamite/lib/src/models/parameter.dart

0
packages/dynamite/lib/src/models/parameter.g.dart → packages/dynamite/dynamite/lib/src/models/parameter.g.dart

0
packages/dynamite/lib/src/models/path_item.dart → packages/dynamite/dynamite/lib/src/models/path_item.dart

0
packages/dynamite/lib/src/models/path_item.g.dart → packages/dynamite/dynamite/lib/src/models/path_item.g.dart

0
packages/dynamite/lib/src/models/paths.dart → packages/dynamite/dynamite/lib/src/models/paths.dart

0
packages/dynamite/lib/src/models/request_body.dart → packages/dynamite/dynamite/lib/src/models/request_body.dart

0
packages/dynamite/lib/src/models/request_body.g.dart → packages/dynamite/dynamite/lib/src/models/request_body.g.dart

0
packages/dynamite/lib/src/models/response.dart → packages/dynamite/dynamite/lib/src/models/response.dart

0
packages/dynamite/lib/src/models/response.g.dart → packages/dynamite/dynamite/lib/src/models/response.g.dart

0
packages/dynamite/lib/src/models/responses.dart → packages/dynamite/dynamite/lib/src/models/responses.dart

0
packages/dynamite/lib/src/models/schema.dart → packages/dynamite/dynamite/lib/src/models/schema.dart

0
packages/dynamite/lib/src/models/schema.g.dart → packages/dynamite/dynamite/lib/src/models/schema.g.dart

0
packages/dynamite/lib/src/models/security_requirement.dart → packages/dynamite/dynamite/lib/src/models/security_requirement.dart

0
packages/dynamite/lib/src/models/security_scheme.dart → packages/dynamite/dynamite/lib/src/models/security_scheme.dart

0
packages/dynamite/lib/src/models/security_scheme.g.dart → packages/dynamite/dynamite/lib/src/models/security_scheme.g.dart

0
packages/dynamite/lib/src/models/server.dart → packages/dynamite/dynamite/lib/src/models/server.dart

0
packages/dynamite/lib/src/models/server.g.dart → packages/dynamite/dynamite/lib/src/models/server.g.dart

0
packages/dynamite/lib/src/models/server_variable.dart → packages/dynamite/dynamite/lib/src/models/server_variable.dart

0
packages/dynamite/lib/src/models/server_variable.g.dart → packages/dynamite/dynamite/lib/src/models/server_variable.g.dart

0
packages/dynamite/lib/src/models/tag.dart → packages/dynamite/dynamite/lib/src/models/tag.dart

0
packages/dynamite/lib/src/models/tag.g.dart → packages/dynamite/dynamite/lib/src/models/tag.g.dart

1078
packages/dynamite/lib/src/openapi_builder.dart → packages/dynamite/dynamite/lib/src/openapi_builder.dart

File diff suppressed because it is too large Load Diff

18
packages/dynamite/lib/src/type_result/base.dart → packages/dynamite/dynamite/lib/src/type_result/base.dart

@ -1,7 +1,13 @@
part of '../../dynamite.dart';
class TypeResultBase extends TypeResult {
TypeResultBase(super.name);
TypeResultBase(
super.name, {
super.nullable,
});
@override
String? get _builderFactory => null;
@override
String serialize(final String object) => object;
@ -15,7 +21,13 @@ class TypeResultBase extends TypeResult {
name == 'String' ? object : '$object.toString()';
@override
String deserialize(final String object) => '($object as $name)';
String deserialize(final String object, {final bool toBuilder = false}) {
if (name == 'JsonObject') {
return 'JsonObject($object)${nullable ? '?' : ''}';
}
return '($object as $name ${nullable ? '?' : ''})';
}
@override
String decode(final String object) {
@ -24,6 +36,8 @@ class TypeResultBase extends TypeResult {
return '($object as String)';
case 'int':
return 'int.parse($object as String)';
case 'JsonObject':
return 'JsonObject($object)';
default:
throw Exception('Can not decode "$name" from String');
}

13
packages/dynamite/lib/src/type_result/enum.dart → packages/dynamite/dynamite/lib/src/type_result/enum.dart

@ -3,13 +3,17 @@ part of '../../dynamite.dart';
class TypeResultEnum extends TypeResult {
TypeResultEnum(
super.name,
this.subType,
);
this.subType, {
super.nullable,
});
final TypeResult subType;
@override
String serialize(final String object) => '$object.value';
String? get _builderFactory => null;
@override
String serialize(final String object) => '$object.name';
@override
String encode(
@ -20,7 +24,8 @@ class TypeResultEnum extends TypeResult {
subType.encode(object);
@override
String deserialize(final String object) => '$name.fromValue($object as ${subType.name})';
String deserialize(final String object, {final bool toBuilder = false}) =>
'$name.valueOf($object as ${subType.name})';
@override
String decode(final String object) => subType.decode(object);

19
packages/dynamite/lib/src/type_result/list.dart → packages/dynamite/dynamite/lib/src/type_result/list.dart

@ -3,15 +3,17 @@ part of '../../dynamite.dart';
class TypeResultList extends TypeResult {
TypeResultList(
super.name,
this.subType, {
this.fromContentString = false,
});
final TypeResult subType, {
super.nullable,
}) : super(generics: [subType]);
final TypeResult subType;
final bool fromContentString;
TypeResult get subType => generics.first;
@override
String serialize(final String object) => '$object.map((final e) => ${subType.serialize('e')}).toList()';
String? get _builderFactory => '..addBuilderFactory($fullType, ListBuilder<${subType.className}>.new)';
@override
String serialize(final String object) => '$object.map((final e) => ${subType.serialize('e')})';
@override
String encode(
@ -20,7 +22,7 @@ class TypeResultList extends TypeResult {
final String? mimeType,
}) {
if (onlyChildren) {
return '$object.map((final e) => ${subType.encode('e', mimeType: mimeType)}).toList()';
return '$object.map((final e) => ${subType.encode('e', mimeType: mimeType)})';
}
switch (mimeType) {
@ -34,7 +36,8 @@ class TypeResultList extends TypeResult {
}
@override
String deserialize(final String object) => '($object as List).map((final e) => ${subType.deserialize('e')}).toList()';
String deserialize(final String object, {final bool toBuilder = false}) =>
'$name(($object as List).map((final e) => ${subType.deserialize('e')}))${toBuilder ? '.toBuilder()' : ''}';
@override
String decode(final String object) => 'json.decode($object as String)';

13
packages/dynamite/lib/src/type_result/map.dart → packages/dynamite/dynamite/lib/src/type_result/map.dart

@ -3,10 +3,14 @@ part of '../../dynamite.dart';
class TypeResultMap extends TypeResult {
TypeResultMap(
super.name,
this.subType,
);
final TypeResult subType, {
super.nullable,
}) : super(generics: [TypeResultBase('String'), subType]);
final TypeResult subType;
TypeResult get subType => generics[1];
@override
String? get _builderFactory => '..addBuilderFactory($fullType, ListBuilder<String, ${subType.className}>.new)';
@override
String serialize(final String object) => object;
@ -28,7 +32,8 @@ class TypeResultMap extends TypeResult {
}
@override
String deserialize(final String object) => '($object as Map<String, ${subType.name}>)';
String deserialize(final String object, {final bool toBuilder = false}) =>
'($object as $className<String, ${subType.name}>)${toBuilder ? '.toBuilder()' : ''}';
@override
String decode(final String object) => 'json.decode($object as String)';

59
packages/dynamite/dynamite/lib/src/type_result/object.dart

@ -0,0 +1,59 @@
part of '../../dynamite.dart';
const _contentString = 'ContentString';
class TypeResultObject extends TypeResult {
TypeResultObject(
super.className, {
super.generics,
super.nullable,
}) : assert(
className != 'JsonObject' && className != 'Object' && className != 'dynamic',
'Use TypeResultBase instead',
);
@override
String? get _builderFactory => '..addBuilderFactory($fullType, $name.new)';
@override
String serialize(final String object) {
if (className == _contentString) {
return 'jsonSerializers.serialize(messages, specifiedType: const $fullType)';
}
return '$object.toJson()';
}
@override
String encode(
final String object, {
final bool onlyChildren = false,
final String? mimeType,
}) {
if (className == _contentString) {
assert(mimeType == 'application/json', '$_contentString should have a mimeType of application/json');
return object;
}
switch (mimeType) {
case 'application/json':
return 'json.encode($object)';
case 'application/x-www-form-urlencoded':
return 'Uri(queryParameters: $object).query';
default:
throw Exception('Can not encode mime type "$mimeType"');
}
}
@override
String deserialize(final String object, {final bool toBuilder = false}) {
if (className == 'ContentString') {
return 'jsonSerializers.deserialize(messages, specifiedType: const $fullType)! as $name${nullable ? '?' : ''}';
}
return '$name.fromJson($object as Object${nullable ? '?' : ''})${nullable && toBuilder ? '?' : ''}${toBuilder ? '.toBuilder()' : ''}';
}
@override
String decode(final String object) => 'json.decode($object as String)';
}

62
packages/dynamite/dynamite/lib/src/type_result/type_result.dart

@ -0,0 +1,62 @@
part of '../../dynamite.dart';
abstract class TypeResult {
TypeResult(
this.className, {
this.generics = const [],
this.nullable = false,
}) : assert(!className.contains('<'), 'Specifiy generics in the generics parameter.'),
assert(!className.contains('?'), 'Nullability should not be specified in the type.');
final String className;
final List<TypeResult> generics;
final bool nullable;
String get name {
if (generics.isNotEmpty) {
final buffer = StringBuffer('$className<')
..writeAll(generics.map((final c) => c.name).intersperse(', '))
..write('>');
return buffer.toString();
}
return className;
}
String get fullType {
if (generics.isNotEmpty) {
final buffer = StringBuffer('FullType($className, [')
..writeAll(generics.map((final c) => c.fullType).intersperse(', '))
..write('])');
return buffer.toString();
}
return 'FullType($className)';
}
List<String> get builderFactories => [
for (final class_ in generics) ...[
...class_.builderFactories,
],
if (_builderFactory != null) ...[
_builderFactory!,
],
];
String? get _builderFactory;
String serialize(final String object);
String deserialize(final String object, {final bool toBuilder = false});
String decode(final String object);
String encode(
final String object, {
final bool onlyChildren = false,
final String? mimeType,
});
String get nullableName => nullable ? '$name?' : name;
}

0
packages/dynamite/mono_pkg.yaml → packages/dynamite/dynamite/mono_pkg.yaml

5
packages/dynamite/pubspec.yaml → packages/dynamite/dynamite/pubspec.yaml

@ -6,15 +6,20 @@ environment:
dependencies:
build: ^2.4.0
built_value: ^8.5.0
code_builder: ^4.4.0
dart_style: ^2.3.1
intersperse: ^2.0.0
json_annotation: ^4.8.1
path: ^1.8.3
dev_dependencies:
build_runner: ^2.4.2
built_collection: ^5.1.1
built_value_generator: ^8.5.0
json_serializable: ^6.6.2
nit_picking:
git:
url: https://github.com/stack11/dart_nit_picking
ref: 0b2ee0d
test: ^1.24.2

43
packages/dynamite/dynamite/test/type_result_test.dart

@ -0,0 +1,43 @@
import 'package:dynamite/dynamite.dart';
import 'package:test/test.dart';
void main() {
group(TypeResultList, () {
test('name', () {
final subType = TypeResultBase('String');
final type = TypeResultList('BuiltList', subType);
expect(type.name, 'BuiltList<String>');
expect(type.fullType, 'FullType(BuiltList, [FullType(String)])');
});
});
group(TypeResultMap, () {
test('name', () {
final subType = TypeResultBase('int');
final type = TypeResultMap('BuiltMap', subType);
expect(type.name, 'BuiltMap<String, int>');
expect(type.fullType, 'FullType(BuiltMap, [FullType(String), FullType(int)])');
});
});
group(TypeResultObject, () {
test('name', () {
final subType = TypeResultBase('String');
final type = TypeResultObject('CustomType', generics: [subType]);
expect(type.name, 'CustomType<String>');
expect(type.fullType, 'FullType(CustomType, [FullType(String)])');
});
});
group(TypeResultBase, () {
test('name', () {
final type = TypeResultBase('String');
expect(type.name, 'String');
expect(type.fullType, 'FullType(String)');
});
});
}

7
packages/dynamite/dynamite_runtime/.gitignore vendored

@ -0,0 +1,7 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/
# Avoid committing pubspec.lock for library packages; see
# https://dart.dev/guides/libraries/private-files#pubspeclock.
pubspec.lock

9
packages/dynamite/dynamite_runtime/analysis_options.yaml

@ -0,0 +1,9 @@
include: package:nit_picking/dart.yaml
linter:
rules:
public_member_api_docs: false
analyzer:
exclude:
- '**.g.dart'

1
packages/dynamite/dynamite_runtime/lib/content_string.dart

@ -0,0 +1 @@
export 'src/content_string.dart';

60
packages/dynamite/dynamite_runtime/lib/src/content_string.dart

@ -0,0 +1,60 @@
// ignore_for_file: avoid_equals_and_hash_code_on_mutable_classes
import 'dart:convert';
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'content_string.g.dart';
abstract class ContentString<T> implements Built<ContentString<T>, ContentStringBuilder<T>> {
factory ContentString([final void Function(ContentStringBuilder<T>)? b]) = _$ContentString<T>;
const ContentString._();
/// decoded contentString
T get content;
static Serializer<ContentString<Object?>> get serializer => _$contentStringSerializer;
}
class ContentStringPlugin implements SerializerPlugin {
const ContentStringPlugin();
@override
Object? afterDeserialize(final Object? object, final FullType specifiedType) => object;
@override
Object? afterSerialize(final Object? object, final FullType specifiedType) {
if (!specifiedType.root.toString().contains('ContentString')) {
return object;
}
if (object is! Map<String, dynamic>) {
throw ArgumentError('ContentStringPlugin can only be applied to Map<String, dynamic>. '
'Please ensure the StandardJsonPlugin is applied and run before.');
}
final content = object['content'];
return jsonEncode(content);
}
@override
Object? beforeDeserialize(final Object? object, final FullType specifiedType) {
if (!specifiedType.root.toString().contains('ContentString')) {
return object;
}
if (object is! String) {
throw ArgumentError('The serialized ContentString must be of type String. '
'Please ensure the StandardJsonPlugin is applied and run before.');
}
final content = jsonDecode(object);
return ['content', content];
}
@override
Object? beforeSerialize(final Object? object, final FullType specifiedType) => object;
}

139
packages/dynamite/dynamite_runtime/lib/src/content_string.g.dart

@ -0,0 +1,139 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'content_string.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<ContentString<Object?>> _$contentStringSerializer = _$ContentStringSerializer();
class _$ContentStringSerializer implements StructuredSerializer<ContentString<Object?>> {
@override
final Iterable<Type> types = const [ContentString, _$ContentString];
@override
final String wireName = 'ContentString';
@override
Iterable<Object?> serialize(Serializers serializers, ContentString<Object?> object,
{FullType specifiedType = FullType.unspecified}) {
final isUnderspecified = specifiedType.isUnspecified || specifiedType.parameters.isEmpty;
if (!isUnderspecified) serializers.expectBuilder(specifiedType);
final parameterT = isUnderspecified ? FullType.object : specifiedType.parameters[0];
final result = <Object?>[
'content',
serializers.serialize(object.content, specifiedType: parameterT),
];
return result;
}
@override
ContentString<Object?> deserialize(Serializers serializers, Iterable<Object?> serialized,
{FullType specifiedType = FullType.unspecified}) {
final isUnderspecified = specifiedType.isUnspecified || specifiedType.parameters.isEmpty;
if (!isUnderspecified) serializers.expectBuilder(specifiedType);
final parameterT = isUnderspecified ? FullType.object : specifiedType.parameters[0];
final result = isUnderspecified
? ContentStringBuilder<Object?>()
: serializers.newBuilder(specifiedType) as ContentStringBuilder<Object?>;
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current! as String;
iterator.moveNext();
final Object? value = iterator.current;
switch (key) {
case 'content':
result.content = serializers.deserialize(value, specifiedType: parameterT);
break;
}
}
return result.build();
}
}
class _$ContentString<T> extends ContentString<T> {
@override
final T content;
factory _$ContentString([void Function(ContentStringBuilder<T>)? updates]) =>
(ContentStringBuilder<T>()..update(updates))._build();
_$ContentString._({required this.content}) : super._() {
BuiltValueNullFieldError.checkNotNull(content, r'ContentString', 'content');
if (T == dynamic) {
throw BuiltValueMissingGenericsError(r'ContentString', 'T');
}
}
@override
ContentString<T> rebuild(void Function(ContentStringBuilder<T>) updates) => (toBuilder()..update(updates)).build();
@override
ContentStringBuilder<T> toBuilder() => ContentStringBuilder<T>()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is ContentString && content == other.content;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, content.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(r'ContentString')..add('content', content)).toString();
}
}
class ContentStringBuilder<T> implements Builder<ContentString<T>, ContentStringBuilder<T>> {
_$ContentString<T>? _$v;
T? _content;
T? get content => _$this._content;
set content(T? content) => _$this._content = content;
ContentStringBuilder();
ContentStringBuilder<T> get _$this {
final $v = _$v;
if ($v != null) {
_content = $v.content;
_$v = null;
}
return this;
}
@override
void replace(ContentString<T> other) {
ArgumentError.checkNotNull(other, 'other');
_$v = other as _$ContentString<T>;
}
@override
void update(void Function(ContentStringBuilder<T>)? updates) {
if (updates != null) updates(this);
}
@override
ContentString<T> build() => _build();
_$ContentString<T> _build() {
final _$result = _$v ??
_$ContentString<T>._(content: BuiltValueNullFieldError.checkNotNull(content, r'ContentString', 'content'));
replace(_$result);
return _$result;
}
}
// ignore_for_file: deprecated_member_use_from_same_package,type=lint

7
packages/dynamite/dynamite_runtime/mono_pkg.yaml

@ -0,0 +1,7 @@
sdk:
- stable
stages:
- all:
- analyze: --fatal-infos .
- format: --output=none --set-exit-if-changed --line-length 120 .

19
packages/dynamite/dynamite_runtime/pubspec.yaml

@ -0,0 +1,19 @@
name: dynamite_runtime
description: Helper package for use with dynamite.
version: 1.0.0
environment:
sdk: '>=3.0.0 <4.0.0'
dependencies:
built_value: ^8.5.0
dev_dependencies:
build_runner: ^2.4.2
built_collection: ^5.1.1
built_value_generator: ^8.5.0
nit_picking:
git:
url: https://github.com/stack11/dart_nit_picking
ref: 0b2ee0d
test: ^1.24.2

341
packages/dynamite/dynamite_runtime/test/content_string_test.dart

@ -0,0 +1,341 @@
// ignore_for_file: avoid_redundant_argument_values
import 'dart:convert';
import 'package:built_collection/built_collection.dart';
import 'package:built_value/serializer.dart';
import 'package:built_value/standard_json_plugin.dart';
import 'package:dynamite_runtime/content_string.dart';
import 'package:test/test.dart';
part 'content_string_test.g.dart';
@SerializersFor([
ContentString,
])
final Serializers serializers = (_$serializers.toBuilder()
..addPlugin(StandardJsonPlugin())
..addPlugin(const ContentStringPlugin())
..addBuilderFactory(const FullType(ContentString, [FullType(bool)]), ContentStringBuilder<bool>.new)
..addBuilderFactory(const FullType(ContentString, [FullType(double)]), ContentStringBuilder<double>.new)
..addBuilderFactory(
const FullType(ContentString, [
FullType(BuiltList, [FullType(int)])
]),
ContentStringBuilder<BuiltList<int>>.new,
)
..addBuilderFactory(const FullType(BuiltList, [FullType(int)]), ListBuilder<int>.new)
..addBuilderFactory(
const FullType(ContentString, [
FullType(BuiltMap, [FullType(String), FullType(int)])
]),
ContentStringBuilder<BuiltMap<String, int>>.new,
)
..addBuilderFactory(const FullType(BuiltMap, [FullType(String), FullType(int)]), MapBuilder<String, int>.new)
..addBuilderFactory(const FullType(ContentString, [FullType(int)]), ContentStringBuilder<int>.new)
..addBuilderFactory(const FullType(ContentString, [FullType(String)]), ContentStringBuilder<String>.new)
..addBuilderFactory(
const FullType(ContentString, [
FullType(ContentString, [FullType(String)])
]),
ContentStringBuilder<ContentString<String>>.new,
))
.build();
void main() {
group('ContentString with known specifiedType holding bool', () {
final data = ContentString<bool>((final b) => b..content = true);
final serialized = json.encode(true);
const specifiedType = FullType(ContentString, [FullType(bool)]);
test('can be serialized', () {
expect(serializers.serialize(data, specifiedType: specifiedType), serialized);
});
test('can be deserialized', () {
expect(serializers.deserialize(serialized, specifiedType: specifiedType), data);
});
});
group(
'ContentString with unknown specifiedType holding bool',
() {
final data = ContentString((final b) => b..content = true);
final serialized = json.decode(
json.encode({
r'$': 'ContentString',
'content': {r'$': 'bool', '': true}
}),
) as Object;
const specifiedType = FullType.unspecified;
test('can be serialized', () {
expect(serializers.serialize(data, specifiedType: specifiedType), serialized);
});
test('can be deserialized', () {
expect(serializers.deserialize(serialized, specifiedType: specifiedType), data);
});
},
skip: true,
);
group('ContentString with known specifiedType holding double', () {
final data = ContentString<double>((final b) => b..content = 42.5);
final serialized = json.encode(42.5);
const specifiedType = FullType(ContentString, [FullType(double)]);
test('can be serialized', () {
expect(serializers.serialize(data, specifiedType: specifiedType), serialized);
});
test('can be deserialized', () {
expect(serializers.deserialize(serialized, specifiedType: specifiedType), data);
});
});
group(
'ContentString with unknown specifiedType holding double',
() {
final data = ContentString((final b) => b..content = 42.5);
final serialized = json.decode(
json.encode({
r'$': 'ContentString',
'content': {r'$': 'double', '': 42.5}
}),
) as Object;
const specifiedType = FullType.unspecified;
test('can be serialized', () {
expect(serializers.serialize(data, specifiedType: specifiedType), serialized);
});
test('can be deserialized', () {
expect(serializers.deserialize(serialized, specifiedType: specifiedType), data);
});
},
skip: true,
);
group('ContentString with known specifiedType holding list', () {
final data = ContentString<BuiltList<int>>((final b) => b..content = BuiltList([1, 2, 3]));
final serialized = json.encode([1, 2, 3]);
const specifiedType = FullType(ContentString, [
FullType(BuiltList, [FullType(int)])
]);
test('can be serialized', () {
expect(serializers.serialize(data, specifiedType: specifiedType), serialized);
});
test('can be deserialized', () {
expect(serializers.deserialize(serialized, specifiedType: specifiedType), equals(data));
});
});
group(
'ContentString with unknown specifiedType holding list',
() {
final data = ContentString((final b) => b..content = BuiltList([1, 2, 3]));
final serialized = json.decode(
json.encode({
r'$': 'ContentString',
'content': {
r'$': 'list',
'': [
{r'$': 'int', '': 1},
{r'$': 'int', '': 2},
{r'$': 'int', '': 3}
]
}
}),
) as Object;
const specifiedType = FullType.unspecified;
test('can be serialized', () {
expect(serializers.serialize(data, specifiedType: specifiedType), serialized);
});
test('can be deserialized', () {
expect(serializers.deserialize(serialized, specifiedType: specifiedType), data);
});
},
skip: true,
);
group('ContentString with known specifiedType holding map', () {
final data =
ContentString<BuiltMap<String, int>>((final b) => b..content = BuiltMap({'one': 1, 'two': 2, 'three': 3}));
// while not being valid json it's what built_value expects.
// using the StandardJsonPlugin will encode it to a valid Map<String, int>.
final serialized = json.encode({'one': 1, 'two': 2, 'three': 3});
const specifiedType = FullType(ContentString, [
FullType(BuiltMap, [FullType(String), FullType(int)])
]);
test('can be serialized', () {
expect(serializers.serialize(data, specifiedType: specifiedType), serialized);
});
test('can be deserialized', () {
expect(serializers.deserialize(serialized, specifiedType: specifiedType), data);
});
});
group(
'ContentString with unknown specifiedType holding map',
() {
final data = ContentString((final b) => b..content = BuiltMap({'one': 1, 'two': 2, 'three': 3}));
final serialized = json.decode(
json.encode({
r'$': 'ContentString',
'content': {
r'$': 'encoded_map',
r'{"$":"String","":"one"}': {r'$': 'int', '': 1},
r'{"$":"String","":"two"}': {r'$': 'int', '': 2},
r'{"$":"String","":"three"}': {r'$': 'int', '': 3}
}
}),
) as Object;
const specifiedType = FullType.unspecified;
test('can be serialized', () {
expect(serializers.serialize(data, specifiedType: specifiedType), serialized);
});
test('can be deserialized', () {
expect(serializers.deserialize(serialized, specifiedType: specifiedType), data);
});
},
skip: true,
);
group(
'ContentString with known specifiedType holding int',
() {
final data = ContentString<int>((final b) => b..content = 42);
final serialized = json.encode(42);
const specifiedType = FullType(ContentString, [FullType(int)]);
test('can be serialized', () {
expect(serializers.serialize(data, specifiedType: specifiedType), serialized);
});
test('can be deserialized', () {
expect(serializers.deserialize(serialized, specifiedType: specifiedType), data);
});
},
);
group(
'ContentString with unknown specifiedType holding int',
() {
final data = ContentString((final b) => b..content = 42);
final serialized = json.decode(
json.encode({
r'$': 'ContentString',
'content': {r'$': 'int', '': 42}
}),
) as Object;
const specifiedType = FullType.unspecified;
test('can be serialized', () {
expect(serializers.serialize(data, specifiedType: specifiedType), serialized);
});
test('can be deserialized', () {
expect(serializers.deserialize(serialized, specifiedType: specifiedType), data);
});
},
skip: true,
);
group('ContentString with known specifiedType holding String', () {
final data = ContentString<String>((final b) => b..content = 'test');
final serialized = json.encode('test');
const specifiedType = FullType(ContentString, [FullType(String)]);
test('can be serialized', () {
expect(serializers.serialize(data, specifiedType: specifiedType), serialized);
});
test('can be deserialized', () {
expect(serializers.deserialize(serialized, specifiedType: specifiedType), data);
});
});
group(
'ContentString with unknown specifiedType holding String',
() {
final data = ContentString((final b) => b..content = 'test');
final serialized = json.decode(
json.encode({
r'$': 'ContentString',
'content': {r'$': 'String', '': 'test'}
}),
) as Object;
const specifiedType = FullType.unspecified;
test('can be serialized', () {
expect(serializers.serialize(data, specifiedType: specifiedType), serialized);
});
test('can be deserialized', () {
expect(serializers.deserialize(serialized, specifiedType: specifiedType), data);
});
},
skip: true,
);
group('ContentString with known specifiedType holding ContentString', () {
final data = ContentString<ContentString<String>>(
(final b) => b
..content = ContentString<String>(
(final b) => b..content = 'test',
),
);
final serialized = json.encode(json.encode('test'));
const specifiedType = FullType(ContentString, [
FullType(ContentString, [FullType(String)])
]);
test('can be serialized', () {
expect(serializers.serialize(data, specifiedType: specifiedType), serialized);
});
test('can be deserialized', () {
expect(serializers.deserialize(serialized, specifiedType: specifiedType), data);
});
});
group(
'ContentString with unknown specifiedType holding ContentString',
() {
final data = ContentString<ContentString<String>>(
(final b) => b
..content = ContentString<String>(
(final b) => b..content = 'test',
),
);
final serialized = json.decode(
json.encode({
r'$': 'ContentString',
'content': {
r'$': 'ContentString',
'content': {r'$': 'String', '': 'test'}
}
}),
) as Object;
const specifiedType = FullType.unspecified;
test('can be serialized', () {
expect(serializers.serialize(data, specifiedType: specifiedType), serialized);
});
test('can be deserialized', () {
expect(serializers.deserialize(serialized, specifiedType: specifiedType), data);
});
},
skip: false,
);
}

11
packages/dynamite/dynamite_runtime/test/content_string_test.g.dart

@ -0,0 +1,11 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'content_string_test.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializers _$serializers = (Serializers().toBuilder()..add(ContentString.serializer)).build();
// ignore_for_file: deprecated_member_use_from_same_package,type=lint

45
packages/dynamite/lib/src/type_result/object.dart

@ -1,45 +0,0 @@
part of '../../dynamite.dart';
class TypeResultObject extends TypeResult {
TypeResultObject(
super.name, {
this.fromContentString = false,
});
final bool fromContentString;
@override
String serialize(final String object) {
if (fromContentString) {
return '$name.toJsonString($object)';
}
return '$object.toJson()';
}
@override
String encode(
final String object, {
final bool onlyChildren = false,
final String? mimeType,
}) {
switch (mimeType) {
case 'application/json':
return 'json.encode($object)';
case 'application/x-www-form-urlencoded':
return 'Uri(queryParameters: $object).query';
default:
throw Exception('Can not encode mime type "$mimeType"');
}
}
@override
String deserialize(final String object) {
if (fromContentString) {
return '$name.fromJsonString($object as String)';
}
return '$name.fromJson($object as Map<String, dynamic>)';
}
@override
String decode(final String object) => 'json.decode($object as String)';
}

19
packages/dynamite/lib/src/type_result/type_result.dart

@ -1,19 +0,0 @@
part of '../../dynamite.dart';
abstract class TypeResult {
TypeResult(this.name);
final String name;
String serialize(final String object);
String deserialize(final String object);
String decode(final String object);
String encode(
final String object, {
final bool onlyChildren = false,
final String? mimeType,
});
}

2
packages/neon/neon/lib/src/blocs/apps.dart

@ -120,7 +120,7 @@ class AppsBloc extends InteractiveBloc implements AppsBlocEvents, AppsBlocStates
'apps-apps',
apps,
() async => _account.client.core.getNavigationApps(),
(final response) => response.ocs.data,
(final response) => response.ocs.data.toList(),
);
}

2
packages/neon/neon/lib/src/utils/request_manager.dart

@ -23,7 +23,7 @@ class RequestManager {
call,
unwrap,
(final data) => json.encode(serializeNextcloud<R>(data)),
(final data) => deserializeNextcloud<R>(json.decode(data)),
(final data) => deserializeNextcloud<R>(json.decode(data) as Object),
disableTimeout,
emitEmptyCache,
0,

2
packages/neon/neon_news/lib/blocs/articles.dart

@ -134,7 +134,7 @@ class NewsArticlesBloc extends InteractiveBloc implements NewsArticlesBlocEvents
id: id ?? 0,
getRead: getRead ?? true ? 1 : 0,
),
(final response) => response.items,
(final response) => response.items.toList(),
);
}

4
packages/neon/neon_news/lib/blocs/news.dart

@ -99,7 +99,7 @@ class NewsBloc extends InteractiveBloc implements NewsBlocEvents, NewsBlocStates
'news-folders',
folders,
() async => client.news.listFolders(),
(final response) => response.folders,
(final response) => response.folders.toList(),
),
requestManager.wrapNextcloud<List<NextcloudNewsFeed>, NextcloudNewsListFeeds>(
client.id,
@ -111,7 +111,7 @@ class NewsBloc extends InteractiveBloc implements NewsBlocEvents, NewsBlocStates
if (response.newestItemId != null) {
_newestItemId = response.newestItemId!;
}
return response.feeds;
return response.feeds.toList();
},
),
mainArticlesBloc.reload(),

4
packages/neon/neon_notes/lib/blocs/notes.dart

@ -46,12 +46,12 @@ class NotesBloc extends InteractiveBloc implements NotesBlocEvents, NotesBlocSta
@override
Future refresh() async {
await requestManager.wrapNextcloud<List<NextcloudNotesNote>, List<NextcloudNotesNote>>(
await requestManager.wrapNextcloud<List<NextcloudNotesNote>, Iterable<NextcloudNotesNote>>(
client.id,
'notes-notes',
notes,
() async => client.notes.getNotes(),
(final response) => response,
(final response) => response.toList(),
);
}

2
packages/neon/neon_notifications/lib/blocs/notifications.dart

@ -52,7 +52,7 @@ class NotificationsBloc extends NotificationsBlocInterface implements Notificati
'notifications-notifications',
notifications,
() async => _client.notifications.listNotifications(),
(final response) => response.ocs.data,
(final response) => response.ocs.data.toList(),
);
}

6
packages/nextcloud/build.yaml

@ -1,7 +1,5 @@
targets:
$default:
builders:
json_serializable:
options:
disallow_unrecognized_keys: true
explicit_to_json: true
built_value_generator|built_value:
enabled: true

8149
packages/nextcloud/lib/src/nextcloud.openapi.dart

File diff suppressed because it is too large Load Diff

25687
packages/nextcloud/lib/src/nextcloud.openapi.g.dart

File diff suppressed because it is too large Load Diff

10
packages/nextcloud/pubspec.yaml

@ -1,15 +1,19 @@
name: nextcloud
version: 1.0.0
publish_to: none
environment:
sdk: '>=3.0.0 <4.0.0'
dependencies:
built_collection: ^5.1.1
built_value: ^8.5.0
cookie_jar: ^4.0.2
crypto: ^3.0.3
crypton: ^2.0.5
dynamite_runtime:
path: ../dynamite/dynamite_runtime
intl: ^0.18.0
json_annotation: ^4.8.1
universal_io: ^2.2.0
version: ^3.0.2
xml: ^6.3.0
@ -17,10 +21,10 @@ dependencies:
dev_dependencies:
build_runner: ^2.4.2
built_value_generator: ^8.5.0
coverage: ^1.6.3
dynamite:
path: ../dynamite
json_serializable: ^6.6.2
path: ../dynamite/dynamite
nit_picking:
git:
url: https://github.com/stack11/dart_nit_picking

5
packages/nextcloud/test/core.dart

@ -1,3 +1,4 @@
import 'package:built_collection/built_collection.dart';
import 'package:nextcloud/nextcloud.dart';
import 'package:test/test.dart';
@ -67,10 +68,10 @@ Future run(final DockerImage image) async {
search: '',
itemType: 'call',
itemId: 'new',
shareTypes: [
shareTypes: BuiltList([
ShareType.user.code,
ShareType.group.code,
],
]),
);
expect(response.ocs.data, hasLength(3));

7
packages/nextcloud/test/notes.dart

@ -122,9 +122,10 @@ Future run(final DockerImage image) async {
test('Update settings', () async {
var response = await client.notes.updateSettings(
notesSettings: NextcloudNotesSettings(
notesPath: 'Test Notes',
fileSuffix: '.txt',
noteMode: NextcloudNotesSettings_NoteMode.preview,
(final b) => b
..notesPath = 'Test Notes'
..fileSuffix = '.txt'
..noteMode = NextcloudNotesSettings_NoteMode.preview,
),
);
expect(response.notesPath, 'Test Notes');

8
packages/nextcloud/test/notifications.dart

@ -51,9 +51,9 @@ Future run(final DockerImage image) async {
expect(response.ocs.data[0].message, '456');
expect(response.ocs.data[0].link, '');
expect(response.ocs.data[0].subjectRich, '');
expect(response.ocs.data[0].subjectRichParameters, isEmpty);
expect(response.ocs.data[0].subjectRichParameters?.asList, isEmpty);
expect(response.ocs.data[0].messageRich, '');
expect(response.ocs.data[0].messageRichParameters, isEmpty);
expect(response.ocs.data[0].messageRichParameters?.asList, isEmpty);
expect(response.ocs.data[0].icon, isNotEmpty);
expect(response.ocs.data[0].actions, hasLength(0));
});
@ -73,9 +73,9 @@ Future run(final DockerImage image) async {
expect(response.ocs.data.message, '456');
expect(response.ocs.data.link, '');
expect(response.ocs.data.subjectRich, '');
expect(response.ocs.data.subjectRichParameters, isEmpty);
expect(response.ocs.data.subjectRichParameters?.asList, isEmpty);
expect(response.ocs.data.messageRich, '');
expect(response.ocs.data.messageRichParameters, isEmpty);
expect(response.ocs.data.messageRichParameters?.asList, isEmpty);
expect(response.ocs.data.icon, isNotEmpty);
expect(response.ocs.data.actions, hasLength(0));
});

2
tool/ci.sh

@ -1,5 +1,5 @@
#!/bin/bash
# Created with package:mono_repo v6.5.0
# Created with package:mono_repo v6.5.5
# Support built in commands on windows out of the box.
# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter")

Loading…
Cancel
Save