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

feature: add middleware support for go server implementation #124

Merged
merged 7 commits into from
Dec 24, 2024
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
12 changes: 6 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env:
jobs:
lint:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
contents: read
actions: read
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
- run: pnpm nx affected -t typecheck
unit-tests:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
contents: read
actions: write
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- run: pnpm server-output-test
integration-tests-ts-server:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
contents: read
actions: write
Expand All @@ -99,7 +99,7 @@ jobs:
- name: Install Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 3.5.4
sdk: 3.6.0
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Gradle
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
- run: pnpm run integration-tests --server ts --affected
integration-tests-go-server:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
contents: read
actions: write
Expand All @@ -143,7 +143,7 @@ jobs:
- name: Install Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 3.5.4
sdk: 3.6.0
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Gradle
Expand Down
2 changes: 1 addition & 1 deletion languages/dart/dart-client/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: "0.69.2"
repository: https://github.com/modiimedia/arri
issue_tracker: https://github.com/modiimedia/arri/issues
environment:
sdk: ">=3.0.0 <4.0.0"
sdk: ">=3.6.0 <4.0.0"
dependencies:
http: ">=1.0.0 <2.0.0"
web_socket_channel: ">=3.0.0 <4.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// this file was autogenerated by arri
// ignore_for_file: type=lint, unused_field, unnecessary_cast
// ignore_for_file: type=lint
import 'dart:async';
import 'dart:convert';
import 'package:arri_client/arri_client.dart';
Expand Down Expand Up @@ -115,13 +115,13 @@ class ExampleClientBooksService {
onClose: onClose,
onError: onError != null && _onError != null
? (err, es) {
_onError?.call(onError);
_onError.call(onError);
return onError(err, es);
}
: onError != null
? onError
: _onError != null
? (err, _) => _onError?.call(err)
? (err, _) => _onError.call(err)
: null,
);
}
Expand Down
2 changes: 1 addition & 1 deletion languages/dart/dart-codegen-reference/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -414,4 +414,4 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.6.0-0 <4.0.0"
dart: ">=3.6.0 <4.0.0"
2 changes: 1 addition & 1 deletion languages/dart/dart-codegen-reference/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ publish_to: none
repository: https://github.com/modiimedia/arri/tree/master/packages/arri-client-dart-reference
issue_tracker: https://github.com/modiimedia/arri/issues
environment:
sdk: ">=3.0.0 <4.0.0"
sdk: ">=3.6.0 <4.0.0"
dependencies:
arri_client:
path: "../dart-client"
Expand Down
4 changes: 2 additions & 2 deletions languages/dart/dart-codegen/src/_index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export function createDartClient(
}
if (rpcParts.length === 0 && subServiceParts.length === 0) {
const heading = `// this file was autogenerated by arri
// ignore_for_file: type=lint, unused_field, unnecessary_cast
// ignore_for_file: type=lint
import 'dart:convert';
import 'package:arri_client/arri_client.dart';`;

Expand All @@ -157,7 +157,7 @@ ${typeParts.join("\n\n")}`;
}
const clientName = validDartClassName(context.clientName, "");
return `// this file was autogenerated by arri
// ignore_for_file: type=lint, unused_field, unnecessary_cast
// ignore_for_file: type=lint
import 'dart:async';
import 'dart:convert';
import 'package:arri_client/arri_client.dart';
Expand Down
4 changes: 2 additions & 2 deletions languages/dart/dart-codegen/src/procedures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ export function dartHttpRpcFromSchema(
onClose: onClose,
onError: onError != null && _onError != null
? (err, es) {
_onError?.call(onError);
_onError.call(onError);
return onError(err, es);
}
: onError != null
? onError
: _onError != null
? (err, _) => _onError?.call(err)
? (err, _) => _onError.call(err)
: null,
);
}`;
Expand Down
Loading