Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(dynamite_runtime): fix last pana complaints for the 0.1.0 release #1349

Merged
merged 3 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cspell/misc.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
browsable
cleartext
codegen
deeplinking
flathub
foss
Expand Down
1 change: 0 additions & 1 deletion commitlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ rules:
- docs
- dynamite
- dynamite_end_to_end_test
- dynamite_petstore_example
- dynamite_runtime
- file_icons
- neon_dashboard
Expand Down
2 changes: 1 addition & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"**/l10n/!(en.arb)",
"**.openapi.dart",
"external",
"packages/dynamite/dynamite_petstore_example/lib",
"packages/dynamite/dynamite/example/lib",
"packages/file_icons/lib/src/data.dart",
"packages/neon_lints/lib",
"packages/nextcloud/test/fixtures",
Expand Down
1 change: 1 addition & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ packages:
- packages/*
- packages/dynamite/*
- packages/neon/*
- packages/**/example
provokateurin marked this conversation as resolved.
Show resolved Hide resolved

ide:
intellij:
Expand Down
2 changes: 1 addition & 1 deletion packages/app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ packages:
path: "../dynamite/dynamite_runtime"
relative: true
source: path
version: "1.0.0"
version: "0.1.0-dev.0"
fake_async:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion packages/dynamite/dynamite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To generate code you need to invoke the `build_runner` with the following comman
dart run build_runner build
```
The builder will look for any files ending with either `.openapi.json` or `.openapi.yaml` and place the generated code next to the specifications in a file ending with `.openapi.dart`.
For a full example checkout the [example package](https://github.com/nextcloud/neon/tree/main/packages/dynamite/dynamite_petstore_example) using the OpenAPI petstore specification.
For a full example checkout the [example package](https://github.com/nextcloud/neon/tree/main/packages/dynamite/dynamite/example) using the OpenAPI petstore specification.


# Build configuration
Expand Down
1 change: 1 addition & 0 deletions packages/dynamite/dynamite/example/LICENSE
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# melos_managed_dependency_overrides: dynamite,dynamite_runtime,neon_lints
dependency_overrides:
dynamite:
path: ../dynamite
path: ..
dynamite_runtime:
path: ../dynamite_runtime
path: ../../dynamite_runtime
neon_lints:
path: ../../neon_lints
path: ../../../neon_lints
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ final dependencies = {
'built_collection': Version.parse('5.0.0'),
'built_value': Version.parse('8.0.0'),
'collection': Version.parse('1.0.0'),
'dynamite_runtime': Version.parse('0.0.1'),
'dynamite_runtime': Version.parse('0.1.0'),
'meta': Version.parse('1.0.0'),
'universal_io': Version.parse('2.0.0'),
'uri': Version.parse('1.0.0'),
Expand Down
9 changes: 8 additions & 1 deletion packages/dynamite/dynamite/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: dynamite
version: 1.0.0
version: 0.1.0-dev.0
description: The helper package used at runtime by code generated with the OpenAPI generator dynamite.
homepage: https://github.com/nextcloud/neon
repository: https://github.com/nextcloud/neon/tree/main/packages/dynamite/dynamite
topics:
- OpenAPI
- codegen
- build-runner

environment:
sdk: '>=3.1.0 <4.0.0'
Expand Down
1 change: 0 additions & 1 deletion packages/dynamite/dynamite_petstore_example/LICENSE

This file was deleted.

3 changes: 3 additions & 0 deletions packages/dynamite/dynamite_runtime/example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This package only provides the runtime functions needed in code generated by the [dynamite](https://github.com/nextcloud/neon/tree/main/packages/dynamite/dynamite) generator.

For a full example checkout the dynamite [example package](https://github.com/nextcloud/neon/tree/main/packages/dynamite/dynamite/example) using the OpenAPI petstore specification.
3 changes: 3 additions & 0 deletions packages/dynamite/dynamite_runtime/lib/built_value.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/// Provides custom serializers to use with the `built_value` package.
library built_value;

export 'src/built_value/content_string_serializer.dart';
export 'src/built_value/double_serializer.dart';
export 'src/built_value/header_serializer.dart';
3 changes: 3 additions & 0 deletions packages/dynamite/dynamite_runtime/lib/http_client.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/// The dynamite client to handle http connections.
library http_client;

export 'package:cookie_jar/cookie_jar.dart';
export 'src/dynamite_client.dart';
export 'src/http_extensions.dart';
3 changes: 3 additions & 0 deletions packages/dynamite/dynamite_runtime/lib/models.dart
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/// Common data models used in the generated code.
library models;

export 'src/models/content_string.dart';
export 'src/models/header.dart';
3 changes: 3 additions & 0 deletions packages/dynamite/dynamite_runtime/lib/utils.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/// Utility functions used by the generated code.
library utils;

export 'src/utils/codecs.dart';
export 'src/utils/some_of_validators.dart';
export 'src/utils/string_checker.dart';
Expand Down
18 changes: 16 additions & 2 deletions packages/dynamite/dynamite_runtime/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: dynamite_runtime
description: Helper package for use with dynamite.
version: 1.0.0
description: The helper package used at runtime by code generated with the OpenAPI generator dynamite.
version: 0.1.0-dev.0
homepage: https://github.com/nextcloud/neon
repository: https://github.com/nextcloud/neon/tree/main/packages/dynamite/dynamite_runtime
topics:
- OpenAPI
- codegen
- build-runner

environment:
sdk: '>=3.1.0 <4.0.0'
Expand All @@ -22,3 +28,11 @@ dev_dependencies:
url: https://github.com/nextcloud/neon
path: packages/neon_lints
test: ^1.24.9

platforms:
windows:
linux:
macos:
android:
ios:
web:
provokateurin marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 2 additions & 2 deletions tool/generate-dynamite-petstore-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
set -euxo pipefail
cd "$(dirname "$0")/.."

cp external/openapi-specification/examples/v3.0/petstore-expanded.json packages/dynamite/dynamite_petstore_example/lib/petstore.openapi.json
cp external/openapi-specification/examples/v3.0/petstore-expanded.json packages/dynamite/dynamite/example/lib/petstore.openapi.json

(
cd packages/dynamite/dynamite_petstore_example
cd packages/dynamite/dynamite/example
rm -rf .dart_tool/build/generated/dynamite
fvm dart pub run build_runner build --delete-conflicting-outputs
fvm dart fix --apply lib/
Expand Down