Skip to content

Commit

Permalink
add missing implemenations for exitCode.
Browse files Browse the repository at this point in the history
  • Loading branch information
bsutton committed Mar 7, 2024
1 parent 8220a2a commit b20b58f
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion dcli/lib/src/progress/progress.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ abstract class Progress {
factory Progress.stream({bool includeStderr = false}) =>
ProgressStreamImpl(includeStderr: includeStderr);

int get exitCode;
int? get exitCode;

List<String> get lines;

Expand Down
2 changes: 1 addition & 1 deletion dcli/lib/src/progress/progress_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

abstract class ProgressImpl {
set exitCode(int exitCode) {}
int? exitCode;

/// adds the [line] to the stdout controller
void addToStdout(String line);
Expand Down
8 changes: 3 additions & 5 deletions dcli/lib/src/progress/progress_mixin.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import '../../dcli.dart';

mixin ProgressMixin implements Progress {
@override
int get exitCode => throw UnimplementedError();
// @override
// int get exitCode => throw UnimplementedError();

/// Returns the first line from the command or
/// null if no lines where returned
Expand All @@ -20,9 +20,7 @@ mixin ProgressMixin implements Progress {
Stream<String> get stream => throw UnimplementedError();

@override
List<String> toList() {
throw UnimplementedError();
}
List<String> toList() => lines;

@override
String toParagraph() => lines.join('\n');
Expand Down
2 changes: 1 addition & 1 deletion dcli/lib/src/script/runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ScriptRunner {

final progress = startFromArgs(_sdk.pathToDartExe!, vmArgs,
terminal: true, nothrow: true);
return progress.exitCode;
return progress.exitCode!;
}

/// Run the script.
Expand Down
8 changes: 4 additions & 4 deletions dcli/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: dcli
version: 4.0.1-alpha.8
version: 4.0.1-alpha.10
homepage: https://dcli.onepub.dev
documentation: https://dcli.onepub.dev
description: Dart console SDK - write console (cli) apps/scripts using dart.
Expand All @@ -16,9 +16,9 @@ dependencies:
crypto: ^3.0.0
csv: ^5.0.1
dart_console2: ^3.0.0
dcli_common: ^4.0.1-alpha.8
dcli_core: ^4.0.1-alpha.8
dcli_terminal: ^4.0.1-alpha.8
dcli_common: ^4.0.1-alpha.10
dcli_core: ^4.0.1-alpha.10
dcli_terminal: ^4.0.1-alpha.10
equatable: ^2.0.0
ffi: ^2.0.0
file: ^7.0.0
Expand Down
2 changes: 2 additions & 0 deletions dcli_common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# 4.0.1-alpha.10

# 4.0.1-alpha.8
- fixed the sdk range for dcli_common
- switch to activating dcli_sdk instead of dcli.
Expand Down
2 changes: 1 addition & 1 deletion dcli_common/lib/src/version/version.g.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/// GENERATED BY pub_release do not modify.
/// Instance of 'Name' version
String packageVersion = '4.0.1-alpha.8';
String packageVersion = '4.0.1-alpha.10';
8 changes: 4 additions & 4 deletions dcli_common/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: dcli_common
version: 4.0.1-alpha.8
version: 4.0.1-alpha.10
publish_to: https://onepub.dev/api/jbbxpsdavu/
description: Common code used by multiple dcli packages.
repository: https://github.com/onepub-dev/dcli
environment:
environment:
sdk: '>=3.0.0 <4.0.0'
dependencies:
dependencies:
meta: ^1.12.0
path: ^1.9.0
scope: ^4.1.0
dev_dependencies:
dev_dependencies:
lint_hard: ^4.0.0
test: ^1.24.0
4 changes: 2 additions & 2 deletions dcli_core/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: dcli_core
version: 4.0.1-alpha.9
version: 4.0.1-alpha.10
homepage: https://dcli.onepub.dev
documentation: https://dcli.onepub.dev
description: The core asyncronous functions used by dcli. DCli uses waitFor to eliminate async code in the DCli libraries which precludes DCli's usage in non-cli apps (e.g. you can't use it in flutter). The aim of dcli_core is to expose a significant set of the core dcli functions as async version so that dcli_core can be used in any project. DCli will then rely on dcli_core for core parts of its implemenation to avoid duplicating code between the two packages.
Expand All @@ -11,7 +11,7 @@ dependencies:
circular_buffer: ^0.11.0
collection: ^1.15.0
crypto: ^3.0.1
dcli_common: ^4.0.1-alpha.8
dcli_common: ^4.0.1-alpha.10
ffi: ^2.1.0
logging: ^1.0.2
meta: ^1.3.0
Expand Down
4 changes: 2 additions & 2 deletions dcli_input/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ repository: https://github.com/onepub-dev/dcli
environment:
sdk: '>=3.0.0 <4.0.0'
dependencies:
dcli_core: ^4.0.1-alpha.8
dcli_terminal: ^4.0.1-alpha.9
dcli_core: ^4.0.1-alpha.10
dcli_terminal: ^4.0.1-alpha.10
meta: ^1.9.0
validators2: ^5.0.0
dev_dependencies:
Expand Down
10 changes: 5 additions & 5 deletions dcli_sdk/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: dcli_sdk
version: 4.0.1-alpha.8
version: 4.0.1-alpha.10
homepage: https://dcli.onepub.dev
documentation: https://dcli.onepub.dev
description: Dart console SDK - write console (cli) apps/scripts using dart.
repository: https://github.com/onepub-dev/dcli
environment:
sdk: '>=3.0.0 <4.0.0'
dependencies:
dcli: ^4.0.1-alpha.8
dcli_common: ^4.0.1-alpha.8
dcli_core: ^4.0.1-alpha.8
dcli_terminal: ^4.0.1-alpha.8
dcli: ^4.0.1-alpha.10
dcli_common: ^4.0.1-alpha.10
dcli_core: ^4.0.1-alpha.10
dcli_terminal: ^4.0.1-alpha.10
meta: ^1.10.0
path: ^1.8.3
pub_semver: ^2.1.4
Expand Down
2 changes: 1 addition & 1 deletion dcli_terminal/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: dcli_terminal
version: 4.0.1-alpha.9
version: 4.0.1-alpha.10
homepage: https://dcli.onepub.dev
description: Provides Terminal/Ansi functions used by DCli the Dart Console SDK but is also intended to be used directly.
repository: https://github.com/onepub-dev/dcli
Expand Down
8 changes: 4 additions & 4 deletions dcli_test/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: dcli_test
description: Test code used by dcli - not for general use.
version: 4.0.1-alpha.8
version: 4.0.1-alpha.10
repository: https://github.com/onepub-dev/dcli/tree/master/dcli_test

environment:
sdk: '>=3.2.0 <4.0.0'

# Add regular dependencies here.
dependencies:
dcli: ^4.0.1-alpha.8
dcli_common: ^4.0.1-alpha.8
dcli_core: ^4.0.1-alpha.8
dcli: ^4.0.1-alpha.10
dcli_common: ^4.0.1-alpha.10
dcli_core: ^4.0.1-alpha.10
file: ^7.0.0
meta: ^1.10.0
path: ^1.8.3
Expand Down
8 changes: 4 additions & 4 deletions dcli_unit_tester/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: dcli_unit_tester
version: 4.0.1-alpha.8
version: 4.0.1-alpha.10
description: This project allows dcli to unit test functions that behave differently when installed via 'dart pub global activate'. It serves no other useful purpose so do not install!
repository: https://github.com/noojee/dcli
environment:
sdk: '>=3.0.0 <4.0.0'
dependencies:
args: ^2.3.0
dcli: ^4.0.1-alpha.8
dcli_core: ^4.0.1-alpha.8
dcli_terminal: ^4.0.1-alpha.9
dcli: ^4.0.1-alpha.10
dcli_core: ^4.0.1-alpha.10
dcli_terminal: ^4.0.1-alpha.10
path: ^1.8.0
dev_dependencies:
lint_hard: ^4.0.0
Expand Down

0 comments on commit b20b58f

Please sign in to comment.