Skip to content

Commit

Permalink
Merge pull request #710 from appwrite/feat-dependency-upgrades-2
Browse files Browse the repository at this point in the history
Fix- Flutter & Dart SDK score
  • Loading branch information
lohanidamodar authored Mar 24, 2024
2 parents 133e1b1 + 16313a4 commit ad80d80
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion templates/dart/lib/id.dart.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of {{ language.params.packageName }};
part of '{{ language.params.packageName }}.dart';

/// Helper class to generate ID strings for resources.
class ID {
Expand Down
2 changes: 1 addition & 1 deletion templates/dart/lib/permission.dart.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of {{ language.params.packageName }};
part of '{{ language.params.packageName }}.dart';

/// Helper class to generate permission strings for resources.
class Permission {
Expand Down
2 changes: 1 addition & 1 deletion templates/dart/lib/query.dart.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of {{ language.params.packageName }};
part of '{{ language.params.packageName }}.dart';


/// Helper class to generate query strings.
Expand Down
2 changes: 1 addition & 1 deletion templates/dart/lib/role.dart.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of {{ language.params.packageName }};
part of '{{ language.params.packageName }}.dart';

/// Helper class to generate role strings for [Permission].
class Role {
Expand Down
2 changes: 1 addition & 1 deletion templates/dart/lib/services/service.dart.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of {{ language.params.packageName }};
part of '../{{ language.params.packageName }}.dart';
{% macro parameter(parameter) %}{% if parameter.required %}required {% endif %}{{ parameter | typeName }}{% if not parameter.required or parameter.nullable %}?{% endif %} {{ parameter.name | caseCamel | overrideIdentifier }}{% endmacro %}
{% macro method_parameters(parameters, consumes) %}
{% if parameters|length > 0 %}{{ '{' }}{% for parameter in parameters %}{{ _self.parameter(parameter) }}{% if not loop.last %}, {% endif %}{% endfor %}{% if 'multipart/form-data' in consumes %}, Function(UploadProgress)? onProgress{% endif %}{{ '}' }}{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/dart/lib/src/enums/enum.dart.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of {{ language.params.packageName }}.enums;
part of '../../enums.dart';

enum {{ enum.name | caseUcfirst | overrideIdentifier }} {
{%~ for value in enum.enum %}
Expand Down
2 changes: 1 addition & 1 deletion templates/dart/lib/src/models/model.dart.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% macro sub_schema(property) %}{% if property.sub_schema %}{% if property.type == 'array' %}List<{{property.sub_schema | caseUcfirst | overrideIdentifier}}>{% else %}{{property.sub_schema | caseUcfirst | overrideIdentifier }}{% endif %}{% else %}{% if property.type == 'object' and property.additionalProperties %}Map<String, dynamic>{% else %}{{property | typeName}}{% endif %}{% endif %}{% endmacro %}
part of {{ language.params.packageName }}.models;
part of '../../models.dart';

/// {{ definition.description }}
class {{ definition.name | caseUcfirst | overrideIdentifier }} implements Model {
Expand Down
2 changes: 1 addition & 1 deletion templates/dart/lib/src/models/model_base.dart.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of {{ language.params.packageName }}.models;
part of '../../models.dart';

abstract class Model {
Map<String, dynamic> toMap();
Expand Down
10 changes: 5 additions & 5 deletions templates/dart/pubspec.yaml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ repository: https://github.com/{{sdk.gitUserName}}/{{sdk.gitRepoName}}
issue_tracker: https://github.com/appwrite/sdk-generator/issues
documentation: {{ spec.contactURL }}
environment:
sdk: '>=2.17.0 <3.0.0'
sdk: '>=2.17.0 <4.0.0'
dependencies:
http: '>=0.13.6 <1.0.1'
http: '>=0.13.6 <2.0.0'
dev_dependencies:
lints: ^2.0.1
test: ^1.22.0
mockito: ^5.4.0
lints: ^3.0.0
test: ^1.25.0
mockito: ^5.4.4
2 changes: 1 addition & 1 deletion templates/flutter/lib/services/service.dart.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
part of {{ language.params.packageName }};
part of '../{{ language.params.packageName }}.dart';
{% macro parameter(parameter) %}{% if parameter.required %}required {% endif %}{{ parameter | typeName }}{% if not parameter.required or parameter.nullable %}?{% endif %} {{ parameter.name | caseCamel | overrideIdentifier }}{% endmacro %}
{% macro method_parameters(parameters, consumes) %}
{% if parameters|length > 0 %}{{ '{' }}{% for parameter in parameters %}{{ _self.parameter(parameter) }}{% if not loop.last %}, {% endif %}{% endfor %}{% if 'multipart/form-data' in consumes %}, Function(UploadProgress)? onProgress{% endif %}{{ '}' }}{% endif %}
Expand Down
18 changes: 9 additions & 9 deletions templates/flutter/pubspec.yaml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ environment:
dependencies:
flutter:
sdk: flutter
cookie_jar: ^4.0.3
device_info_plus: ^9.0.2
flutter_web_auth_2: ^3.0.0
cookie_jar: ^4.0.8
device_info_plus: ^9.1.2
flutter_web_auth_2: ^3.1.1
http: '>=0.13.6 <2.0.0'
package_info_plus: ^4.0.2
path_provider: ^2.0.15
web_socket_channel: ^2.4.0
package_info_plus: ^5.0.1
path_provider: ^2.1.2
web_socket_channel: ^2.4.3
universal_html: ^2.2.2
dev_dependencies:
path_provider_platform_interface: ^2.0.6
flutter_lints: ^2.0.1
path_provider_platform_interface: ^2.1.2
flutter_lints: ^3.0.1
flutter_test:
sdk: flutter
mockito: ^5.4.0
mockito: ^5.4.4
2 changes: 1 addition & 1 deletion tests/FlutterBetaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class FlutterBetaTest extends Base
'cp tests/languages/flutter/tests.dart tests/sdks/flutter/test/appwrite_test.dart',
];
protected string $command =
'docker run --network="mockapi" --rm -v $(pwd):/app -w /app/tests/sdks/flutter --env PUB_CACHE=vendor cirrusci/flutter:beta sh -c "flutter pub get && flutter test test/appwrite_test.dart"';
'docker run --network="mockapi" --rm -v $(pwd):/app -w /app/tests/sdks/flutter fischerscode/flutter-sudo:beta sh -c "sudo chown -R flutter:flutter . && flutter pub get && flutter test test/appwrite_test.dart"';

protected array $expectedOutput = [
...Base::FOO_RESPONSES,
Expand Down
2 changes: 1 addition & 1 deletion tests/FlutterStableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class FlutterStableTest extends Base
'cp tests/languages/flutter/tests.dart tests/sdks/flutter/test/appwrite_test.dart',
];
protected string $command =
'docker run --network="mockapi" --rm -v $(pwd):/app -w /app/tests/sdks/flutter --env PUB_CACHE=vendor cirrusci/flutter:stable sh -c "flutter pub get && flutter test test/appwrite_test.dart"';
'docker run --network="mockapi" --rm -v $(pwd):/app:rw -w /app/tests/sdks/flutter fischerscode/flutter-sudo:stable sh -c "sudo chown -R flutter:flutter . && flutter pub get && flutter test test/appwrite_test.dart"';

protected array $expectedOutput = [
...Base::FOO_RESPONSES,
Expand Down

0 comments on commit ad80d80

Please sign in to comment.