Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-firebase

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-firebase - npm Package Compare versions

Comparing version 0.1.22 to 0.1.23

2

package.json

@@ -11,3 +11,3 @@ {

"name": "cordova-plugin-firebase",
"version": "0.1.22",
"version": "0.1.23",
"description": "Cordova plugin for Google Firebase",

@@ -14,0 +14,0 @@ "cordova": {

@@ -10,7 +10,7 @@ # cordova-plugin-firebase

```
<plugin name="cordova-plugin-firebase" spec="0.1.22" />
<plugin name="cordova-plugin-firebase" spec="0.1.23" />
```
or by running:
```
cordova plugin add cordova-plugin-firebase@0.1.22 --save
cordova plugin add cordova-plugin-firebase@0.1.23 --save
```

@@ -17,0 +17,0 @@ Download your Firebase configuration files, GoogleService-Info.plist for ios and google-services.json for android, and place them in the root folder of your cordova project:

@@ -44,3 +44,2 @@ #!/usr/bin/env node

fs.writeFileSync("platforms/ios/" + name + "/Resources/GoogleService-Info.plist", contents)
fs.writeFileSync("platforms/ios/" + name + "/Resources/Resources/GoogleService-Info.plist", contents)
} catch(err) {

@@ -64,21 +63,24 @@ process.stdout.write(err);

var json = JSON.parse(contents);
var strings = fs.readFileSync("platforms/android/res/values/strings.xml").toString();
if (contents) {
var json = JSON.parse(contents);
// strip non-default value
strings = strings.replace(new RegExp('<string name="google_app_id">([^\@<]+?)<\/string>', "i"), '')
var strings = fs.readFileSync("platforms/android/res/values/strings.xml").toString();
// strip non-default value
strings = strings.replace(new RegExp('<string name="google_api_key">([^\@<]+?)<\/string>', "i"), '')
// strip non-default value
strings = strings.replace(new RegExp('<string name="google_app_id">([^\@<]+?)<\/string>', "i"), '')
// strip empty lines
strings = strings.replace(new RegExp('(\r\n|\n|\r)[ \t]*(\r\n|\n|\r)', "gm"), '$1')
// strip non-default value
strings = strings.replace(new RegExp('<string name="google_api_key">([^\@<]+?)<\/string>', "i"), '')
// replace the default value
strings = strings.replace(new RegExp('<string name="google_app_id">([^<]+?)<\/string>', "i"), '<string name="google_app_id">' + json.client[0].client_info.mobilesdk_app_id + '</string>')
// strip empty lines
strings = strings.replace(new RegExp('(\r\n|\n|\r)[ \t]*(\r\n|\n|\r)', "gm"), '$1')
// replace the default value
strings = strings.replace(new RegExp('<string name="google_api_key">([^<]+?)<\/string>', "i"), '<string name="google_api_key">' + json.client[0].api_key[0].current_key + '</string>')
// replace the default value
strings = strings.replace(new RegExp('<string name="google_app_id">([^<]+?)<\/string>', "i"), '<string name="google_app_id">' + json.client[0].client_info.mobilesdk_app_id + '</string>')
fs.writeFileSync("platforms/android/res/values/strings.xml", strings);
// replace the default value
strings = strings.replace(new RegExp('<string name="google_api_key">([^<]+?)<\/string>', "i"), '<string name="google_api_key">' + json.client[0].api_key[0].current_key + '</string>')
fs.writeFileSync("platforms/android/res/values/strings.xml", strings);
}
} catch(err) {

@@ -85,0 +87,0 @@ process.stdout.write(err);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc