Skip to content

Commit 0f49a33

Browse files
feat: #2 improve pubdev scores (#16)
* Improving pub.dev score for description * Updated depdencies * More package upgrades * Package structure improvements - Moved package source to `src` - Exposed "public API" with `lib/raygun_cli.dart` - Created empty example - Updated `bin/raygun_cli.dart` to use the exposed public API --------- Co-authored-by: Miguel Beltran <m@beltran.work>
1 parent d3a9cc5 commit 0f49a33

22 files changed

+127
-98
lines changed

bin/raygun_cli.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import 'package:args/args.dart';
2-
import 'package:raygun_cli/sourcemap/sourcemap_command.dart';
3-
import 'package:raygun_cli/symbols/flutter_symbols.dart';
4-
import 'package:raygun_cli/deployments/deployments_command.dart';
5-
import 'package:raygun_cli/proguard/proguard_command.dart';
2+
import 'package:raygun_cli/raygun_cli.dart';
63

74
const String version = '0.0.2';
85

example/main.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
void main() {
2+
// This package is not intended to be used as a library.
3+
// It is a command line tool.
4+
// See README.md for usage.
5+
}

lib/raygun_cli.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export 'src/deployments/deployments_command.dart';
2+
export 'src/proguard/proguard_command.dart';
3+
export 'src/sourcemap/sourcemap_command.dart';
4+
export 'src/symbols/flutter_symbols.dart';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'dart:io';
22

33
import 'package:args/args.dart';
4-
import 'package:raygun_cli/environment.dart';
4+
import 'package:raygun_cli/src/environment.dart';
55

66
/// A Config property is a value
77
/// that can be set via argument
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import 'dart:io';
22

3-
import 'package:raygun_cli/deployments/deployments_api.dart';
3+
import 'package:raygun_cli/src/deployments/deployments_api.dart';
44
import 'package:args/args.dart';
55
import '../config_props.dart';
66

7+
/// Deployments command
78
class Deployments {
89
final ArgResults command;
910
final bool verbose;
@@ -13,6 +14,7 @@ class Deployments {
1314
required this.verbose,
1415
});
1516

17+
/// Notifies Raygun that a new deployment has been made.
1618
Future<void> notify() async {
1719
if (!command.wasParsed('version')) {
1820
print('Error: Missing "--version"');
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'dart:convert';
22
import 'package:http/http.dart' as http;
33

4+
/// Creates a deployment in Raygun.
45
Future<bool> createDeployment({
56
required String token,
67
required String apiKey,

lib/deployments/deployments_command.dart renamed to lib/src/deployments/deployments_command.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import 'dart:io';
22

33
import 'package:args/args.dart';
4-
import 'package:raygun_cli/deployments/deployments.dart';
4+
import 'package:raygun_cli/src/deployments/deployments.dart';
55

66
const kDeploymentsCommand = 'deployments';
77

8+
/// Builds the deployments command parser
89
ArgParser buildParserDeployments() {
910
return ArgParser()
1011
..addFlag(
@@ -58,6 +59,7 @@ ArgParser buildParserDeployments() {
5859
);
5960
}
6061

62+
/// Parses the deployments command arguments
6163
void parseDeploymentsCommand(ArgResults command, bool verbose) {
6264
if (command.wasParsed('help')) {
6365
print('Usage: raygun-cli deployments <arguments>');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'dart:io';
22

3-
import 'package:raygun_cli/proguard/proguard_api.dart';
3+
import 'package:raygun_cli/src/proguard/proguard_api.dart';
44
import 'package:args/args.dart';
55
import '../config_props.dart';
66

0 commit comments

Comments
 (0)