Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 7778257

Browse files
Merge pull request #1257 from rosen-vladimirov/vladimirov/logger-fixes
fix: replace deprecated CLI's logger function
2 parents e83ac1c + 453ffed commit 7778257

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

publish/scripts/installer.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ module.exports = function($logger, $projectData, hookArgs) {
554554
}
555555
556556
// Logging from stdout/stderr
557-
$logger.out('Add iOS crash logging');
557+
$logger.info('Add iOS crash logging');
558558
const mainmPath = path.join($projectData.platformsDir, 'ios', 'internal', 'main.m');
559559
if (fs.existsSync(mainmPath)) {
560560
let mainmContent = fs.readFileSync(mainmPath).toString();
@@ -878,12 +878,12 @@ return new Promise(function(resolve, reject) {
878878
879879
// copy correct version to destination
880880
if (fs.existsSync(sourceGoogleJson) && fs.existsSync(path.dirname(destinationGoogleJson))) {
881-
$logger.out("Copy " + sourceGoogleJson + " to " + destinationGoogleJson + ".");
881+
$logger.info("Copy " + sourceGoogleJson + " to " + destinationGoogleJson + ".");
882882
fs.writeFileSync(destinationGoogleJson, fs.readFileSync(sourceGoogleJson));
883883
resolve();
884884
} else if (fs.existsSync(sourceGoogleJson) && fs.existsSync(path.dirname(destinationGoogleJsonAlt))) {
885885
// NativeScript < 4 doesn't have the 'app' folder
886-
$logger.out("Copy " + sourceGoogleJson + " to " + destinationGoogleJsonAlt + ".");
886+
$logger.info("Copy " + sourceGoogleJson + " to " + destinationGoogleJsonAlt + ".");
887887
fs.writeFileSync(destinationGoogleJsonAlt, fs.readFileSync(sourceGoogleJson));
888888
resolve();
889889
} else {
@@ -1001,11 +1001,11 @@ var copyPlist = function(copyPlistOpts) {
10011001
// if we have both dev/prod versions, we copy (or overwrite) GoogleService-Info.plist in destination dir
10021002
if (fs.existsSync(sourceGooglePlistProd) && fs.existsSync(sourceGooglePlistDev)) {
10031003
if (copyPlistOpts.buildType==='production') { // use prod version
1004-
copyPlistOpts.$logger.out("nativescript-plugin-firebase: copy " + sourceGooglePlistProd + " to " + destinationGooglePlist + ".");
1004+
copyPlistOpts.$logger.info("nativescript-plugin-firebase: copy " + sourceGooglePlistProd + " to " + destinationGooglePlist + ".");
10051005
fs.writeFileSync(destinationGooglePlist, fs.readFileSync(sourceGooglePlistProd));
10061006
return true;
10071007
} else { // use dev version
1008-
copyPlistOpts.$logger.out("nativescript-plugin-firebase: copy " + sourceGooglePlistDev + " to " + destinationGooglePlist + ".");
1008+
copyPlistOpts.$logger.info("nativescript-plugin-firebase: copy " + sourceGooglePlistDev + " to " + destinationGooglePlist + ".");
10091009
fs.writeFileSync(destinationGooglePlist, fs.readFileSync(sourceGooglePlistDev));
10101010
return true;
10111011
}
@@ -1050,7 +1050,7 @@ var fs = require("fs");
10501050
module.exports = function($logger, $projectData) {
10511051
10521052
return new Promise(function(resolve, reject) {
1053-
$logger.out("Configure firebase");
1053+
$logger.info("Configure firebase");
10541054
let projectBuildGradlePath = path.join($projectData.platformsDir, "android", "build.gradle");
10551055
if (fs.existsSync(projectBuildGradlePath)) {
10561056
let buildGradleContent = fs.readFileSync(projectBuildGradlePath).toString();

src/scripts/postinstall.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,7 +2251,7 @@ function coerce(version) {
22512251
if (match == null)
22522252
return null;
22532253

2254-
return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0'));
2254+
return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0'));
22552255
}
22562256

22572257

@@ -4726,7 +4726,7 @@ module.exports = function($logger, $projectData, hookArgs) {
47264726
}
47274727
47284728
// Logging from stdout/stderr
4729-
$logger.out('Add iOS crash logging');
4729+
$logger.info('Add iOS crash logging');
47304730
const mainmPath = path.join($projectData.platformsDir, 'ios', 'internal', 'main.m');
47314731
if (fs.existsSync(mainmPath)) {
47324732
let mainmContent = fs.readFileSync(mainmPath).toString();
@@ -5050,12 +5050,12 @@ return new Promise(function(resolve, reject) {
50505050
50515051
// copy correct version to destination
50525052
if (fs.existsSync(sourceGoogleJson) && fs.existsSync(path.dirname(destinationGoogleJson))) {
5053-
$logger.out("Copy " + sourceGoogleJson + " to " + destinationGoogleJson + ".");
5053+
$logger.info("Copy " + sourceGoogleJson + " to " + destinationGoogleJson + ".");
50545054
fs.writeFileSync(destinationGoogleJson, fs.readFileSync(sourceGoogleJson));
50555055
resolve();
50565056
} else if (fs.existsSync(sourceGoogleJson) && fs.existsSync(path.dirname(destinationGoogleJsonAlt))) {
50575057
// NativeScript < 4 doesn't have the 'app' folder
5058-
$logger.out("Copy " + sourceGoogleJson + " to " + destinationGoogleJsonAlt + ".");
5058+
$logger.info("Copy " + sourceGoogleJson + " to " + destinationGoogleJsonAlt + ".");
50595059
fs.writeFileSync(destinationGoogleJsonAlt, fs.readFileSync(sourceGoogleJson));
50605060
resolve();
50615061
} else {
@@ -5173,11 +5173,11 @@ var copyPlist = function(copyPlistOpts) {
51735173
// if we have both dev/prod versions, we copy (or overwrite) GoogleService-Info.plist in destination dir
51745174
if (fs.existsSync(sourceGooglePlistProd) && fs.existsSync(sourceGooglePlistDev)) {
51755175
if (copyPlistOpts.buildType==='production') { // use prod version
5176-
copyPlistOpts.$logger.out("nativescript-plugin-firebase: copy " + sourceGooglePlistProd + " to " + destinationGooglePlist + ".");
5176+
copyPlistOpts.$logger.info("nativescript-plugin-firebase: copy " + sourceGooglePlistProd + " to " + destinationGooglePlist + ".");
51775177
fs.writeFileSync(destinationGooglePlist, fs.readFileSync(sourceGooglePlistProd));
51785178
return true;
51795179
} else { // use dev version
5180-
copyPlistOpts.$logger.out("nativescript-plugin-firebase: copy " + sourceGooglePlistDev + " to " + destinationGooglePlist + ".");
5180+
copyPlistOpts.$logger.info("nativescript-plugin-firebase: copy " + sourceGooglePlistDev + " to " + destinationGooglePlist + ".");
51815181
fs.writeFileSync(destinationGooglePlist, fs.readFileSync(sourceGooglePlistDev));
51825182
return true;
51835183
}
@@ -5222,7 +5222,7 @@ var fs = require("fs");
52225222
module.exports = function($logger, $projectData) {
52235223
52245224
return new Promise(function(resolve, reject) {
5225-
$logger.out("Configure firebase");
5225+
$logger.info("Configure firebase");
52265226
let projectBuildGradlePath = path.join($projectData.platformsDir, "android", "build.gradle");
52275227
if (fs.existsSync(projectBuildGradlePath)) {
52285228
let buildGradleContent = fs.readFileSync(projectBuildGradlePath).toString();

0 commit comments

Comments
 (0)