Skip to content

Commit a5d55e6

Browse files
committed
update
1 parent 56884b7 commit a5d55e6

File tree

4 files changed

+35
-35
lines changed

4 files changed

+35
-35
lines changed

lib/src/gen_screen_access_app.dart

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Future<void> genScreenAccessApp(
5757

5858
final help = argResults.flag(DefaultFlags.HELP.name);
5959
if (help) {
60-
_print(Glog.printCyan, parser.getInfo(argParser));
60+
_print(Log.printCyan, parser.getInfo(argParser));
6161
exit(ExitCodes.SUCCESS.code);
6262
}
6363

@@ -72,7 +72,7 @@ Future<void> genScreenAccessApp(
7272
dartSdk = argResults.option(DefaultOptions.DART_SDK.name);
7373
} catch (_) {
7474
_print(
75-
Glog.printRed,
75+
Log.printRed,
7676
'Missing required args! Use --help flag for more information.',
7777
);
7878
exit(ExitCodes.FAILURE.code);
@@ -94,7 +94,7 @@ Future<void> genScreenAccessApp(
9494

9595
// ---------------------------------------------------------------------------
9696

97-
_print(Glog.printWhite, 'Looking for files..');
97+
_print(Log.printWhite, 'Looking for files..');
9898
final filePathStream0 = PathExplorer(inputPath).exploreFiles();
9999
final filePathStream1 = filePathStream0.where(
100100
(e) => _isAllowedFileName(e.path),
@@ -104,33 +104,33 @@ Future<void> genScreenAccessApp(
104104
findings = await filePathStream1.toList();
105105
} catch (e) {
106106
spinner.stop();
107-
_print(Glog.printRed, 'Failed to read file tree!');
107+
_print(Log.printRed, 'Failed to read file tree!');
108108
exit(ExitCodes.FAILURE.code);
109109
}
110110
if (findings.isEmpty) {
111111
spinner.stop();
112-
_print(Glog.printYellow, 'No files found in $inputPath!');
112+
_print(Log.printYellow, 'No files found in $inputPath!');
113113
exit(ExitCodes.SUCCESS.code);
114114
}
115115

116116
// ---------------------------------------------------------------------------
117117

118118
final templateData = <String, String>{};
119119
for (final template in templates) {
120-
_print(Glog.printWhite, 'Reading template at: $template...');
120+
_print(Log.printWhite, 'Reading template at: $template...');
121121
final result = await MdTemplateUtility.i.readTemplateFromPathOrUrl(template).value;
122122

123123
if (result.isErr()) {
124124
spinner.stop();
125-
_print(Glog.printRed, ' Failed to read template!');
125+
_print(Log.printRed, ' Failed to read template!');
126126
exit(ExitCodes.FAILURE.code);
127127
}
128128
templateData[template] = result.unwrap();
129129
}
130130

131131
// ---------------------------------------------------------------------------
132132

133-
_print(Glog.printWhite, 'Generating...', spinner);
133+
_print(Log.printWhite, 'Generating...', spinner);
134134

135135
for (final entry in templateData.entries) {
136136
final fileName = p.basename(entry.key).replaceAll('.md', '');
@@ -148,25 +148,25 @@ Future<void> genScreenAccessApp(
148148
final output = _interpolator.interpolate(template, insights, ',');
149149
final outputFilePath = p.join(inputPath, fileName);
150150
await FileSystemUtility.i.writeLocalFile(outputFilePath, output);
151-
Glog.printWhite('[gen-screen-access] ✔ Generated $fileName');
151+
Log.printWhite('[gen-screen-access] ✔ Generated $fileName');
152152
} catch (e) {
153-
_print(Glog.printRed, '✘ One or more files failed to generate!', spinner);
153+
_print(Log.printRed, '✘ One or more files failed to generate!', spinner);
154154
exit(ExitCodes.FAILURE.code);
155155
}
156156
}
157157

158158
// ---------------------------------------------------------------------------
159159

160-
_print(Glog.printWhite, 'Fixing generated files..', spinner);
160+
_print(Log.printWhite, 'Fixing generated files..', spinner);
161161
await fixDartFile(inputPath);
162162

163-
_print(Glog.printWhite, 'Formatting generated files..', spinner);
163+
_print(Log.printWhite, 'Formatting generated files..', spinner);
164164
await fmtDartFile(inputPath);
165165

166166
// ---------------------------------------------------------------------------
167167

168168
spinner.stop();
169-
_print(Glog.printGreen, 'Done!');
169+
_print(Log.printGreen, 'Done!');
170170
}
171171

172172
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

lib/src/gen_screen_app.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Future<void> genScreenApp(
6161

6262
final help = argResults.flag(DefaultFlags.HELP.name);
6363
if (help) {
64-
_print(Glog.printCyan, parser.getInfo(argParser));
64+
_print(Log.printCyan, parser.getInfo(argParser));
6565
exit(ExitCodes.SUCCESS.code);
6666
}
6767

@@ -76,7 +76,7 @@ Future<void> genScreenApp(
7676
outputPath = argResults.option(DefaultOptions.OUTPUT_PATH.name)!;
7777
} catch (_) {
7878
_print(
79-
Glog.printRed,
79+
Log.printRed,
8080
'Missing required args! Use --help flag for more information.',
8181
);
8282
exit(ExitCodes.FAILURE.code);
@@ -91,20 +91,20 @@ Future<void> genScreenApp(
9191

9292
final templateData = <String, String>{};
9393
for (final template in templates) {
94-
_print(Glog.printWhite, 'Reading template at: $template...');
94+
_print(Log.printWhite, 'Reading template at: $template...');
9595
final result = await MdTemplateUtility.i.readTemplateFromPathOrUrl(template).value;
9696

9797
if (result.isErr()) {
9898
spinner.stop();
99-
_print(Glog.printRed, ' Failed to read template!');
99+
_print(Log.printRed, ' Failed to read template!');
100100
exit(ExitCodes.FAILURE.code);
101101
}
102102
templateData[template] = result.unwrap();
103103
}
104104

105105
// ---------------------------------------------------------------------------
106106

107-
_print(Glog.printWhite, 'Generating...', spinner);
107+
_print(Log.printWhite, 'Generating...', spinner);
108108

109109
for (final entry in templateData.entries) {
110110
final fileName = p.basename(entry.key).replaceAll('.md', '');
@@ -122,7 +122,7 @@ Future<void> genScreenApp(
122122
// ---------------------------------------------------------------------------
123123

124124
spinner.stop();
125-
_print(Glog.printGreen, 'Done!');
125+
_print(Log.printGreen, 'Done!');
126126
}
127127

128128
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

lib/src/gen_screen_bindings_app.dart

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Future<void> genScreenBindingsApp(
5555

5656
final help = argResults.flag(DefaultFlags.HELP.name);
5757
if (help) {
58-
_print(Glog.printCyan, parser.getInfo(argParser));
58+
_print(Log.printCyan, parser.getInfo(argParser));
5959
exit(ExitCodes.SUCCESS.code);
6060
}
6161

@@ -70,7 +70,7 @@ Future<void> genScreenBindingsApp(
7070
dartSdk = argResults.option(DefaultOptions.DART_SDK.name);
7171
} catch (_) {
7272
_print(
73-
Glog.printRed,
73+
Log.printRed,
7474
'Missing required args! Use --help flag for more information.',
7575
);
7676
exit(ExitCodes.FAILURE.code);
@@ -92,7 +92,7 @@ Future<void> genScreenBindingsApp(
9292

9393
// ---------------------------------------------------------------------------
9494

95-
_print(Glog.printWhite, 'Looking for Dart files..');
95+
_print(Log.printWhite, 'Looking for Dart files..');
9696
final filePathStream0 = PathExplorer(inputPath).exploreFiles();
9797
final filePathStream1 = filePathStream0.where(
9898
(e) => _isAllowedFileName(e.path),
@@ -102,33 +102,33 @@ Future<void> genScreenBindingsApp(
102102
findings = await filePathStream1.toList();
103103
} catch (e) {
104104
spinner.stop();
105-
_print(Glog.printRed, 'Failed to read file tree!');
105+
_print(Log.printRed, 'Failed to read file tree!');
106106
exit(ExitCodes.FAILURE.code);
107107
}
108108
if (findings.isEmpty) {
109109
spinner.stop();
110-
_print(Glog.printYellow, 'No files found in $inputPath!');
110+
_print(Log.printYellow, 'No files found in $inputPath!');
111111
exit(ExitCodes.SUCCESS.code);
112112
}
113113

114114
// ---------------------------------------------------------------------------
115115

116116
final templateData = <String, String>{};
117117
for (final template in templates) {
118-
_print(Glog.printWhite, 'Reading template at: $template...');
118+
_print(Log.printWhite, 'Reading template at: $template...');
119119
final result = await MdTemplateUtility.i.readTemplateFromPathOrUrl(template).value;
120120

121121
if (result.isErr()) {
122122
spinner.stop();
123-
_print(Glog.printRed, ' Failed to read template!');
123+
_print(Log.printRed, ' Failed to read template!');
124124
exit(ExitCodes.FAILURE.code);
125125
}
126126
templateData[template] = result.unwrap();
127127
}
128128

129129
// ---------------------------------------------------------------------------
130130

131-
_print(Glog.printWhite, 'Generating...', spinner);
131+
_print(Log.printWhite, 'Generating...', spinner);
132132

133133
for (final entry in templateData.entries) {
134134
final fileName = p.basename(entry.key).replaceAll('.md', '');
@@ -147,27 +147,27 @@ Future<void> genScreenBindingsApp(
147147
fileName,
148148
);
149149
await FileSystemUtility.i.writeLocalFile(outputFilePath, output);
150-
Glog.printWhite('[gen-screen-bindings] ✔ Generated $fileName');
150+
Log.printWhite('[gen-screen-bindings] ✔ Generated $fileName');
151151
}
152152
}
153153
} catch (e) {
154-
_print(Glog.printRed, '✘ One or more files failed to generate!', spinner);
154+
_print(Log.printRed, '✘ One or more files failed to generate!', spinner);
155155
exit(ExitCodes.FAILURE.code);
156156
}
157157
}
158158

159159
// ---------------------------------------------------------------------------
160160

161-
_print(Glog.printWhite, 'Fixing generated files..', spinner);
161+
_print(Log.printWhite, 'Fixing generated files..', spinner);
162162
await fixDartFile(inputPath);
163163

164-
_print(Glog.printWhite, 'Formatting generated files..', spinner);
164+
_print(Log.printWhite, 'Formatting generated files..', spinner);
165165
await fmtDartFile(inputPath);
166166

167167
// ---------------------------------------------------------------------------
168168

169169
spinner.stop();
170-
_print(Glog.printGreen, 'Done!');
170+
_print(Log.printGreen, 'Done!');
171171
}
172172

173173
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ dependencies:
4141
df_string: ^0.2.4
4242
df_type: ^0.10.3
4343

44-
args: ^2.6.0
44+
args: ^2.7.0
4545
path: ^1.9.1
4646

4747
## -----------------------------------------------------------------------------
4848

4949
dev_dependencies:
50-
lints: ^5.1.0
51-
test: ^1.25.12
50+
lints: ^5.1.1
51+
test: ^1.26.2
5252

5353

5454
## -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)