Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo committed May 26, 2024
1 parent 97005ab commit 44226ee
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 34 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,23 @@ jobs:
- name: mono_repo self validate
run: dart pub global run mono_repo generate --validate
job_002:
name: "analyze_and_format; linux; Dart 3.0.0; PKGS: pkgs/shelf, pkgs/shelf_packages_handler, pkgs/shelf_proxy, pkgs/shelf_router, pkgs/shelf_router_generator, pkgs/shelf_static, pkgs/shelf_test_handler, pkgs/shelf_web_socket; `dart analyze --fatal-infos .`"
name: "analyze_and_format; linux; Dart 3.3.0; PKGS: pkgs/shelf, pkgs/shelf_packages_handler, pkgs/shelf_proxy, pkgs/shelf_router, pkgs/shelf_router_generator, pkgs/shelf_static, pkgs/shelf_test_handler, pkgs/shelf_web_socket; `dart analyze --fatal-infos .`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket;commands:analyze"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket;commands:analyze"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
with:
sdk: "3.0.0"
sdk: "3.3.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
Expand Down Expand Up @@ -319,23 +319,23 @@ jobs:
if: "always() && steps.pkgs_shelf_web_socket_pub_upgrade.conclusion == 'success'"
working-directory: pkgs/shelf_web_socket
job_005:
name: "unit_test; linux; Dart 3.0.0; PKGS: pkgs/shelf, pkgs/shelf_test_handler; `dart test --test-randomize-ordering-seed=random -p chrome`"
name: "unit_test; linux; Dart 3.3.0; PKGS: pkgs/shelf, pkgs/shelf_test_handler; `dart test --test-randomize-ordering-seed=random -p chrome`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/shelf-pkgs/shelf_test_handler;commands:test_1"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/shelf-pkgs/shelf_test_handler;commands:test_1"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/shelf-pkgs/shelf_test_handler
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/shelf-pkgs/shelf_test_handler
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
with:
sdk: "3.0.0"
sdk: "3.3.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
Expand Down Expand Up @@ -363,23 +363,23 @@ jobs:
- job_003
- job_004
job_006:
name: "unit_test; linux; Dart 3.0.0; PKGS: pkgs/shelf, pkgs/shelf_packages_handler, pkgs/shelf_proxy, pkgs/shelf_router, pkgs/shelf_router_generator, pkgs/shelf_static, pkgs/shelf_test_handler, pkgs/shelf_web_socket; `dart test --test-randomize-ordering-seed=random`"
name: "unit_test; linux; Dart 3.3.0; PKGS: pkgs/shelf, pkgs/shelf_packages_handler, pkgs/shelf_proxy, pkgs/shelf_router, pkgs/shelf_router_generator, pkgs/shelf_static, pkgs/shelf_test_handler, pkgs/shelf_web_socket; `dart test --test-randomize-ordering-seed=random`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket;commands:test_0"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket;commands:test_0"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
with:
sdk: "3.0.0"
sdk: "3.3.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
Expand Down Expand Up @@ -682,13 +682,13 @@ jobs:
- job_003
- job_004
job_011:
name: "unit_test; windows; Dart 3.0.0; PKGS: pkgs/shelf, pkgs/shelf_test_handler; `dart test --test-randomize-ordering-seed=random -p chrome`"
name: "unit_test; windows; Dart 3.3.0; PKGS: pkgs/shelf, pkgs/shelf_test_handler; `dart test --test-randomize-ordering-seed=random -p chrome`"
runs-on: windows-latest
steps:
- name: Setup Dart SDK
uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
with:
sdk: "3.0.0"
sdk: "3.3.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
Expand Down Expand Up @@ -716,13 +716,13 @@ jobs:
- job_003
- job_004
job_012:
name: "unit_test; windows; Dart 3.0.0; PKGS: pkgs/shelf_packages_handler, pkgs/shelf_static, pkgs/shelf_test_handler, pkgs/shelf_web_socket; `dart test --test-randomize-ordering-seed=random`"
name: "unit_test; windows; Dart 3.3.0; PKGS: pkgs/shelf_packages_handler, pkgs/shelf_static, pkgs/shelf_test_handler, pkgs/shelf_web_socket; `dart test --test-randomize-ordering-seed=random`"
runs-on: windows-latest
steps:
- name: Setup Dart SDK
uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
with:
sdk: "3.0.0"
sdk: "3.3.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
Expand Down
2 changes: 1 addition & 1 deletion pkgs/shelf/lib/src/cascade.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Cascade {

return (request) {
if (_parent!._handler == null) return handler(request);
return Future.sync(() => _parent!.handler(request)).then((response) {
return Future.sync(() => _parent.handler(request)).then((response) {
if (_shouldCascade(response)) return handler(request);
return response;
});
Expand Down
4 changes: 2 additions & 2 deletions pkgs/shelf/lib/src/request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Request extends Message {
///
/// This will be `false` either if the adapter doesn't support hijacking, or
/// if the request has already been hijacked.
bool get canHijack => _onHijack != null && !_onHijack!.called;
bool get canHijack => _onHijack != null && !_onHijack.called;

/// If this is non-`null` and the requested resource hasn't been modified
/// since this date and time, the server should return a 304 Not Modified
Expand Down Expand Up @@ -280,7 +280,7 @@ class Request extends Message {
throw StateError("This request can't be hijacked.");
}

_onHijack!.run(callback);
_onHijack.run(callback);

throw const HijackException();
}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/shelf/lib/src/server_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class _HandlerServer implements Server {

@override
Future<void> close() => _closeMemo.runOnce(() {
return _onClose == null ? null : _onClose!();
return _onClose == null ? null : _onClose();
});
final _closeMemo = AsyncMemoizer<void>();
}
2 changes: 1 addition & 1 deletion pkgs/shelf/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ topics:
- backend

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
async: ^2.5.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class PackageConfigHandler {
_packageHandlers.putIfAbsent(packageName, () async {
Uri? packageUri;
if (_packageMap != null) {
packageUri = _packageMap![packageName];
packageUri = _packageMap[packageName];
} else {
final fakeResolvedUri = await Isolate.resolvePackageUri(
Uri(scheme: 'package', path: '$packageName/'));
Expand Down
2 changes: 1 addition & 1 deletion pkgs/shelf_packages_handler/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ topics:
- shelf

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
path: ^1.8.0
Expand Down
2 changes: 1 addition & 1 deletion pkgs/shelf_proxy/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ topics:
- shelf

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
http: '>=0.13.0 <2.0.0'
Expand Down
2 changes: 1 addition & 1 deletion pkgs/shelf_router/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ topics:
- shelf

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
http_methods: ^1.1.0
Expand Down
2 changes: 1 addition & 1 deletion pkgs/shelf_router_generator/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ topics:
- shelf

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
analyzer: '>=4.6.0 <7.0.0'
Expand Down
2 changes: 1 addition & 1 deletion pkgs/shelf_static/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ topics:
- shelf

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
convert: ^3.0.0
Expand Down
2 changes: 1 addition & 1 deletion pkgs/shelf_test_handler/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ topics:
- shelf

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
http_multi_server: ^3.0.0
Expand Down
4 changes: 2 additions & 2 deletions pkgs/shelf_web_socket/lib/src/web_socket_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class WebSocketHandler {
final origin = request.headers['Origin'];
if (origin != null &&
_allowedOrigins != null &&
!_allowedOrigins!.contains(origin.toLowerCase())) {
!_allowedOrigins.contains(origin.toLowerCase())) {
return _forbidden('invalid origin "$origin".');
}

Expand Down Expand Up @@ -102,7 +102,7 @@ class WebSocketHandler {
if (_protocols == null) return null;
for (var requestProtocol in requestProtocols.split(',')) {
requestProtocol = requestProtocol.trim();
if (_protocols!.contains(requestProtocol)) return requestProtocol;
if (_protocols.contains(requestProtocol)) return requestProtocol;
}
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/shelf_web_socket/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ topics:
- shelf

environment:
sdk: ^3.0.0
sdk: ^3.3.0

dependencies:
shelf: ^1.1.0
Expand Down

0 comments on commit 44226ee

Please sign in to comment.