diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b46123..7c42bd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ * Set compressed flag correctly for grpc-encoding = identity. Fixes [#669](https://github.com/grpc/grpc-dart/issues/669) (https://github.com/grpc/grpc-dart/pull/693) * Remove generated status codes. +* Remove dependency on `package:archive`. ## 3.2.4 diff --git a/example/grpc-web/lib/app.dart b/example/grpc-web/lib/app.dart index bdc920f..fce83c5 100644 --- a/example/grpc-web/lib/app.dart +++ b/example/grpc-web/lib/app.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import 'dart:async'; import 'dart:html'; diff --git a/example/helloworld/bin/client.dart b/example/helloworld/bin/client.dart index 4d4635d..4ec8e8e 100644 --- a/example/helloworld/bin/client.dart +++ b/example/helloworld/bin/client.dart @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -/// Dart implementation of the gRPC helloworld.Greeter client. import 'package:grpc/grpc.dart'; import 'package:helloworld/src/generated/helloworld.pbgrpc.dart'; +/// Dart implementation of the gRPC helloworld.Greeter client. Future main(List args) async { final channel = ClientChannel( 'localhost', diff --git a/example/helloworld/bin/server.dart b/example/helloworld/bin/server.dart index 0f2b287..a2b491c 100644 --- a/example/helloworld/bin/server.dart +++ b/example/helloworld/bin/server.dart @@ -13,10 +13,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -/// Dart implementation of the gRPC helloworld.Greeter server. import 'package:grpc/grpc.dart'; import 'package:helloworld/src/generated/helloworld.pbgrpc.dart'; +/// Dart implementation of the gRPC helloworld.Greeter server. class GreeterService extends GreeterServiceBase { @override Future sayHello(ServiceCall call, HelloRequest request) async { diff --git a/example/helloworld/bin/unix_client.dart b/example/helloworld/bin/unix_client.dart index 5f30cc2..0c3cacc 100644 --- a/example/helloworld/bin/unix_client.dart +++ b/example/helloworld/bin/unix_client.dart @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -/// Dart implementation of the gRPC helloworld.Greeter client. import 'dart:io'; import 'package:grpc/grpc.dart'; import 'package:helloworld/src/generated/helloworld.pbgrpc.dart'; +/// Dart implementation of the gRPC helloworld.Greeter client. Future main(List args) async { final udsAddress = InternetAddress('localhost', type: InternetAddressType.unix); diff --git a/example/helloworld/bin/unix_server.dart b/example/helloworld/bin/unix_server.dart index 82fbf02..a30eaec 100644 --- a/example/helloworld/bin/unix_server.dart +++ b/example/helloworld/bin/unix_server.dart @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -/// Dart implementation of the gRPC helloworld.Greeter server. import 'dart:io'; import 'package:grpc/grpc.dart'; import 'package:helloworld/src/generated/helloworld.pbgrpc.dart'; +/// Dart implementation of the gRPC helloworld.Greeter server. class GreeterService extends GreeterServiceBase { @override Future sayHello(ServiceCall call, HelloRequest request) async { diff --git a/interop/lib/src/client.dart b/interop/lib/src/client.dart index 8cead2f..a61fa81 100644 --- a/interop/lib/src/client.dart +++ b/interop/lib/src/client.dart @@ -208,7 +208,7 @@ class Tester { final receivedBytes = response.payload.body.length; if (receivedBytes != 314159) { throw 'Response payload mismatch. Expected 314159 bytes, ' - 'got ${receivedBytes}.'; + 'got $receivedBytes.'; } } @@ -869,7 +869,7 @@ class Tester { final receivedBytes = response.payload.body.length; if (receivedBytes != 314159) { throw 'Response payload mismatch. Expected 314159 bytes, ' - 'got ${receivedBytes}.'; + 'got $receivedBytes.'; } return response; } diff --git a/lib/grpc.dart b/lib/grpc.dart index 1c9593f..59c9019 100644 --- a/lib/grpc.dart +++ b/lib/grpc.dart @@ -55,7 +55,7 @@ export 'src/server/server.dart' export 'src/server/server_keepalive.dart' show ServerKeepAliveOptions; export 'src/server/service.dart' show ServiceMethod, Service; export 'src/shared/api.dart'; -export 'src/shared/codec.dart' show Codec, IdentityCodec, GzipCodec; +export 'src/shared/codec/codec.dart' show Codec, IdentityCodec, GzipCodec; export 'src/shared/codec_registry.dart'; export 'src/shared/message.dart' show GrpcMessage, GrpcMetadata, GrpcData, grpcDecompressor; diff --git a/lib/grpc_connection_interface.dart b/lib/grpc_connection_interface.dart index c0e3176..da9c879 100644 --- a/lib/grpc_connection_interface.dart +++ b/lib/grpc_connection_interface.dart @@ -25,7 +25,7 @@ export 'src/client/options.dart' show ChannelOptions; export 'src/client/transport/transport.dart' show GrpcTransportStream, ErrorHandler; -export 'src/shared/codec.dart'; +export 'src/shared/codec/codec.dart'; export 'src/shared/codec_registry.dart'; export 'src/shared/message.dart' show frame, GrpcMessage, grpcDecompressor; export 'src/shared/status.dart' show GrpcError; diff --git a/lib/src/client/call.dart b/lib/src/client/call.dart index 8d5918f..5da2703 100644 --- a/lib/src/client/call.dart +++ b/lib/src/client/call.dart @@ -16,7 +16,7 @@ import 'dart:async'; import 'dart:developer'; -import '../shared/codec.dart'; +import '../shared/codec/codec.dart'; import '../shared/message.dart'; import '../shared/profiler.dart'; import '../shared/status.dart'; diff --git a/lib/src/client/http2_connection.dart b/lib/src/client/http2_connection.dart index 998410a..1529333 100644 --- a/lib/src/client/http2_connection.dart +++ b/lib/src/client/http2_connection.dart @@ -20,7 +20,7 @@ import 'dart:typed_data'; import 'package:http2/transport.dart'; -import '../shared/codec.dart'; +import '../shared/codec/codec.dart'; import '../shared/timeout.dart'; import 'call.dart'; import 'client_keepalive.dart'; diff --git a/lib/src/client/transport/http2_transport.dart b/lib/src/client/transport/http2_transport.dart index a55c539..fcb7c5d 100644 --- a/lib/src/client/transport/http2_transport.dart +++ b/lib/src/client/transport/http2_transport.dart @@ -17,7 +17,7 @@ import 'dart:async'; import 'package:http2/transport.dart'; -import '../../shared/codec.dart'; +import '../../shared/codec/codec.dart'; import '../../shared/codec_registry.dart'; import '../../shared/message.dart'; import '../../shared/streams.dart'; diff --git a/lib/src/server/handler.dart b/lib/src/server/handler.dart index f28963c..72d92b1 100644 --- a/lib/src/server/handler.dart +++ b/lib/src/server/handler.dart @@ -18,7 +18,7 @@ import 'dart:convert'; import 'package:http2/transport.dart'; -import '../shared/codec.dart'; +import '../shared/codec/codec.dart'; import '../shared/codec_registry.dart'; import '../shared/io_bits/io_bits.dart' show InternetAddress, X509Certificate; import '../shared/message.dart'; diff --git a/lib/src/shared/codec/codec.dart b/lib/src/shared/codec/codec.dart new file mode 100644 index 0000000..6e29a48 --- /dev/null +++ b/lib/src/shared/codec/codec.dart @@ -0,0 +1,18 @@ +// Copyright (c) 2020, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +export 'codec_all.dart'; +export 'codec_io.dart' + if (dart.library.js_interop) 'codec_web.dart'; // package:web implementation diff --git a/lib/src/shared/codec.dart b/lib/src/shared/codec/codec_all.dart similarity index 76% rename from lib/src/shared/codec.dart rename to lib/src/shared/codec/codec_all.dart index 8f771d5..81657ef 100644 --- a/lib/src/shared/codec.dart +++ b/lib/src/shared/codec/codec_all.dart @@ -1,4 +1,4 @@ -// Copyright (c) 2020, the gRPC project authors. Please see the AUTHORS file +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file // for details. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,8 +13,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -import 'package:archive/archive.dart'; - abstract class Codec { /// Returns the message encoding that this compressor uses. /// @@ -48,21 +46,3 @@ class IdentityCodec implements Codec { return data; } } - -/// A gzip compressor and decompressor. -class GzipCodec implements Codec { - const GzipCodec(); - - @override - final encodingName = 'gzip'; - - @override - List compress(List data) { - return GZipEncoder().encode(data)!; - } - - @override - List decompress(List data) { - return GZipDecoder().decodeBytes(data); - } -} diff --git a/lib/src/shared/codec/codec_io.dart b/lib/src/shared/codec/codec_io.dart new file mode 100644 index 0000000..99bfe78 --- /dev/null +++ b/lib/src/shared/codec/codec_io.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import 'dart:io'; + +import 'codec_all.dart'; + +/// A gzip compressor and decompressor. +class GzipCodec implements Codec { + const GzipCodec(); + + @override + final encodingName = 'gzip'; + + @override + List compress(List data) { + return gzip.encode(data); + } + + @override + List decompress(List data) { + return gzip.decode(data); + } +} diff --git a/lib/src/shared/codec/codec_web.dart b/lib/src/shared/codec/codec_web.dart new file mode 100644 index 0000000..a3bf59e --- /dev/null +++ b/lib/src/shared/codec/codec_web.dart @@ -0,0 +1,34 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import 'codec_all.dart'; + +/// A gzip compressor and decompressor. +class GzipCodec implements Codec { + const GzipCodec(); + + @override + final encodingName = 'gzip'; + + @override + List compress(List data) { + throw UnsupportedError('Gzip is not supported for grpc web'); + } + + @override + List decompress(List data) { + throw UnsupportedError('Gzip is not supported for grpc web'); + } +} diff --git a/lib/src/shared/codec_registry.dart b/lib/src/shared/codec_registry.dart index 73c0558..afd1636 100644 --- a/lib/src/shared/codec_registry.dart +++ b/lib/src/shared/codec_registry.dart @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import 'codec.dart'; +import 'codec/codec.dart'; /// Encloses classes related to the compression and decompression of messages. class CodecRegistry { diff --git a/lib/src/shared/message.dart b/lib/src/shared/message.dart index 0533c55..685a232 100644 --- a/lib/src/shared/message.dart +++ b/lib/src/shared/message.dart @@ -16,7 +16,7 @@ import 'dart:async'; import 'dart:typed_data'; -import 'codec.dart'; +import 'codec/codec.dart'; import 'codec_registry.dart'; import 'status.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index 6bd0ffa..41c7feb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,7 +8,6 @@ environment: sdk: ^3.2.0 dependencies: - archive: ^3.0.0 async: ^2.5.0 crypto: ^3.0.0 fixnum: ^1.0.0 diff --git a/test/client_certificate_test.dart b/test/client_certificate_test.dart index 238b932..9edde69 100644 --- a/test/client_certificate_test.dart +++ b/test/client_certificate_test.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // TODO(dartbug.com/26057) currently Mac OS X seems to have some issues with // client certificates so we disable the test. @TestOn('vm && !mac-os') diff --git a/test/client_handles_bad_connections_test.dart b/test/client_handles_bad_connections_test.dart index 986a750..26a6045 100644 --- a/test/client_handles_bad_connections_test.dart +++ b/test/client_handles_bad_connections_test.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + @TestOn('vm') import 'dart:async'; diff --git a/test/client_tests/call_test.dart b/test/client_tests/call_test.dart index ceff888..c519f6e 100644 --- a/test/client_tests/call_test.dart +++ b/test/client_tests/call_test.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import 'package:grpc/src/client/call.dart'; import 'package:test/test.dart'; diff --git a/test/client_tests/client_interceptor_test.dart b/test/client_tests/client_interceptor_test.dart index d9132fb..b1763d5 100644 --- a/test/client_tests/client_interceptor_test.dart +++ b/test/client_tests/client_interceptor_test.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import 'dart:async'; import 'package:grpc/grpc.dart'; diff --git a/test/client_tests/client_keepalive_manager_test.dart b/test/client_tests/client_keepalive_manager_test.dart index 74889d5..c260dc9 100644 --- a/test/client_tests/client_keepalive_manager_test.dart +++ b/test/client_tests/client_keepalive_manager_test.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import 'package:fake_async/fake_async.dart'; import 'package:grpc/src/client/client_keepalive.dart'; import 'package:mockito/annotations.dart'; diff --git a/test/client_tests/client_keepalive_manager_test.mocks.dart b/test/client_tests/client_keepalive_manager_test.mocks.dart index 941de6a..20a8225 100644 --- a/test/client_tests/client_keepalive_manager_test.mocks.dart +++ b/test/client_tests/client_keepalive_manager_test.mocks.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Mocks generated by Mockito 5.4.1 from annotations // in grpc/test/client_tests/client_keepalive_manager_test.dart. // Do not manually edit this file. diff --git a/test/grpc_compression_flag_test.dart b/test/grpc_compression_flag_test.dart index adf2999..51e0b21 100644 --- a/test/grpc_compression_flag_test.dart +++ b/test/grpc_compression_flag_test.dart @@ -1,4 +1,21 @@ -import 'package:grpc/src/shared/codec.dart'; +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +@TestOn('vm') + +import 'package:grpc/src/shared/codec/codec.dart'; import 'package:grpc/src/shared/message.dart'; import 'package:test/test.dart'; diff --git a/test/grpc_web_decoding_test.dart b/test/grpc_web_decoding_test.dart index aa0f390..96d985a 100644 --- a/test/grpc_web_decoding_test.dart +++ b/test/grpc_web_decoding_test.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import 'dart:async'; import 'dart:typed_data'; diff --git a/test/grpc_web_server.dart b/test/grpc_web_server.dart index 8f87555..57d80b6 100644 --- a/test/grpc_web_server.dart +++ b/test/grpc_web_server.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import 'dart:async'; import 'dart:convert'; import 'dart:io'; diff --git a/test/grpc_web_test.dart b/test/grpc_web_test.dart index ad58181..fb96f90 100644 --- a/test/grpc_web_test.dart +++ b/test/grpc_web_test.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + @TestOn('browser') import 'dart:async'; import 'dart:math' as math; diff --git a/test/keepalive_test.dart b/test/keepalive_test.dart index e4ddf2d..a63c608 100644 --- a/test/keepalive_test.dart +++ b/test/keepalive_test.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + @TestOn('vm') import 'dart:async'; diff --git a/test/proxy_secure_test.dart b/test/proxy_secure_test.dart index 24f6ff8..257103e 100644 --- a/test/proxy_secure_test.dart +++ b/test/proxy_secure_test.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + @TestOn('vm') import 'dart:async'; import 'dart:io'; diff --git a/test/proxy_test.dart b/test/proxy_test.dart index a4f9bcf..522d65a 100644 --- a/test/proxy_test.dart +++ b/test/proxy_test.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + @TestOn('vm') import 'dart:async'; diff --git a/test/round_trip_test.dart b/test/round_trip_test.dart index 4a45224..67e3dcf 100644 --- a/test/round_trip_test.dart +++ b/test/round_trip_test.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + @TestOn('vm') import 'dart:async'; import 'dart:io'; diff --git a/test/server_handles_broken_connection_test.dart b/test/server_handles_broken_connection_test.dart index cd6d1fd..38d15ac 100644 --- a/test/server_handles_broken_connection_test.dart +++ b/test/server_handles_broken_connection_test.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + @TestOn('vm') import 'dart:async'; import 'dart:io'; diff --git a/test/server_keepalive_manager_test.dart b/test/server_keepalive_manager_test.dart index 230fc3b..94ab257 100644 --- a/test/server_keepalive_manager_test.dart +++ b/test/server_keepalive_manager_test.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import 'dart:async'; import 'package:fake_async/fake_async.dart'; diff --git a/test/shared_tests/codec_registry_test.dart b/test/shared_tests/codec_registry_test.dart index 5a5483b..13381c2 100644 --- a/test/shared_tests/codec_registry_test.dart +++ b/test/shared_tests/codec_registry_test.dart @@ -1,4 +1,19 @@ -import 'package:grpc/src/shared/codec.dart'; +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import 'package:grpc/src/shared/codec/codec.dart'; import 'package:grpc/src/shared/codec_registry.dart'; import 'package:test/test.dart'; diff --git a/test/tools/http2_client.dart b/test/tools/http2_client.dart index 46b8b42..d7359cd 100644 --- a/test/tools/http2_client.dart +++ b/test/tools/http2_client.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import 'dart:convert'; import 'package:grpc/grpc.dart'; diff --git a/test/tools/http2_server.dart b/test/tools/http2_server.dart index 4ab5eb2..721773d 100644 --- a/test/tools/http2_server.dart +++ b/test/tools/http2_server.dart @@ -1,3 +1,18 @@ +// Copyright (c) 2024, the gRPC project authors. Please see the AUTHORS file +// for details. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import 'dart:convert'; import 'dart:io';