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

nativescript-push-notifications

Package Overview
Dependencies
Maintainers
9
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-push-notifications - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

2

hooks/before-prepare.js

@@ -12,3 +12,3 @@ var utils = require('./utils');

if (utils.targetsAndroid($projectData.projectDir)) {
utils.addIfNecessary($projectData.platformsDir);
utils.addIfNecessary($projectData.platformsDir, $projectData.appResourcesDirectoryPath);
}

@@ -15,0 +15,0 @@

@@ -30,9 +30,9 @@ var path = require('path');

function addOnPluginInstall(platformsDir) {
function addOnPluginInstall(platformsDir, resourcesDir) {
if (buildGradleExists(platformsDir)) {
addIfNecessary(platformsDir);
addIfNecessary(platformsDir, resourcesDir);
}
}
function addIfNecessary(platformsDir) {
function addIfNecessary(platformsDir, resourcesDir) {
_amendBuildGradle(platformsDir, function(pluginImported, pluginApplied, fileContents) {

@@ -53,3 +53,3 @@ if (!pluginImported) {

_copyGoogleServices(platformsDir);
_copyGoogleServices(resourcesDir, platformsDir);
}

@@ -85,4 +85,4 @@

function _copyGoogleServices(platformsDir) {
var srcServicesFile = path.join(platformsDir, '..', 'app', 'App_Resources', 'Android', 'google-services.json');
function _copyGoogleServices(resourcesDir, platformsDir) {
var srcServicesFile = path.join(resourcesDir, 'Android', 'google-services.json');
var dstServicesFile = path.join(platformsDir, 'android', 'app', 'google-services.json');

@@ -136,3 +136,3 @@ if (fs.existsSync(srcServicesFile) && !fs.existsSync(dstServicesFile) && fs.existsSync(path.join(platformsDir, 'android', 'app'))) {

var insertBeforeDoubleQuotes = 'classpath "' + androidGradle;
var insertBeforeSingleQoutes = 'classpath \'' + androidGradle;
var insertBeforeSingleQuotes = 'classpath \'' + androidGradle;
var quoteToInsert = '"'

@@ -143,5 +143,5 @@ var matchedString = insertBeforeDoubleQuotes;

if (ind === -1) {
ind = buildGradleContents.indexOf(insertBeforeSingleQoutes);
ind = buildGradleContents.indexOf(insertBeforeSingleQuotes);
quoteToInsert = '\'';
matchedString = insertBeforeSingleQoutes;
matchedString = insertBeforeSingleQuotes;
}

@@ -148,0 +148,0 @@

{
"name": "nativescript-push-notifications",
"version": "1.1.3",
"version": "1.1.4",
"description": "Receive push notifications in your NativeScript app on Android and iOS.",

@@ -5,0 +5,0 @@ "main": "push-plugin",

@@ -9,4 +9,16 @@ var path = require('path');

if (projDir) {
utils.checkForGoogleServicesJson(projDir, path.join(projDir, 'app', 'App_Resources'));
utils.addOnPluginInstall(path.join(projDir, 'platforms'));
var resourcesDir;
try {
var globalPath = require('child_process').execSync('npm root -g').toString().trim();
var tns = require(path.join(globalPath, 'nativescript'));
var project = tns.projectDataService.getProjectData(projDir);
resourcesDir = project.appResourcesDirectoryPath;
} catch (exc) {
console.log('Push plugin cannot find project root. Project will be initialized during build.');
}
if (resourcesDir) {
utils.checkForGoogleServicesJson(projDir, resourcesDir);
utils.addOnPluginInstall(path.join(projDir, 'platforms'), resourcesDir);
}
}
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