io-anyline-cordova
Advanced tools
Comparing version 42.0.0 to 43.0.0
{ | ||
"name": "io-anyline-cordova", | ||
"version": "42.0.0", | ||
"version": "43.0.0", | ||
"description": "The cordova plugin for the Anyline SDK", | ||
@@ -5,0 +5,0 @@ "cordova": { |
@@ -15,4 +15,4 @@ var fs = require("fs"); | ||
getIgnoreAssetsPattern: function () { | ||
return utilities.getPreferenceValue('anyline-ignore-assets-pattern'); | ||
getRetainAssetsPattern: function () { | ||
return utilities.getPreferenceValue('anyline-retain-assets-pattern'); | ||
}, | ||
@@ -24,14 +24,14 @@ | ||
getSShellScriptBuildPhasePath: function () { | ||
return path.join("platforms", "ios", utilities.getAppName() , "Scripts", "remove-unneeded-assets.sh"); | ||
getShellScriptBuildPhasePath: function () { | ||
return path.join("platforms", "ios", utilities.getAppName(), "Scripts", "remove-unneeded-assets.sh"); | ||
}, | ||
addShellScriptBuildPhase: function (context, xcodeProjectPath) { | ||
var ignoreAssetsPattern = this.getIgnoreAssetsPattern(); | ||
if(!ignoreAssetsPattern){ | ||
var retainAssetsPattern = this.getRetainAssetsPattern(); | ||
if (!retainAssetsPattern) { | ||
return; | ||
} | ||
var scriptPathSrc = path.join(context.opts.plugin.dir, "scripts", "ios", "remove-unneeded-assets.sh"); | ||
var scriptPathDest = this.getSShellScriptBuildPhasePath(); | ||
var scriptPathSrc = path.join(context.opts.plugin.dir, "scripts", "ios", "remove-unneeded-assets.sh"); | ||
var scriptPathDest = this.getShellScriptBuildPhasePath(); | ||
fs.copyFileSync(scriptPathSrc, scriptPathDest); | ||
@@ -47,3 +47,3 @@ | ||
'"', | ||
'export ANYLINE_IGNORE_ASSETS_PATTERN=\\"'+ ignoreAssetsPattern.replace(/:/ig, ' ') +'\\"\\n', | ||
'export ANYLINE_RETAIN_ASSETS_PATTERN=\\"' + retainAssetsPattern.replace(/:/ig, ' ') + '\\"\\n', | ||
'\\"', | ||
@@ -61,3 +61,2 @@ '$SRCROOT', | ||
// Generate a unique ID for our new build phase. | ||
@@ -73,2 +72,3 @@ var id = xcodeProject.generateUuid(); | ||
outputPaths: [], | ||
// "Run script only when installing" | ||
// runOnlyForDeploymentPostprocessing: 1, | ||
@@ -105,4 +105,4 @@ runOnlyForDeploymentPostprocessing: 0, | ||
removeShellScriptBuildPhase: function (context, xcodeProjectPath) { | ||
var ignoreAssetsPattern = this.getIgnoreAssetsPattern(); | ||
if(!ignoreAssetsPattern){ | ||
var retainAssetsPattern = this.getRetainAssetsPattern(); | ||
if (!retainAssetsPattern) { | ||
return; | ||
@@ -109,0 +109,0 @@ } |
@@ -12,4 +12,4 @@ /** | ||
Utilities.parseConfigXml = function(){ | ||
if(_configXml) return _configXml; | ||
Utilities.parseConfigXml = function () { | ||
if (_configXml) return _configXml; | ||
_configXml = Utilities.parseXmlFileToJson("config.xml"); | ||
@@ -19,8 +19,8 @@ return _configXml; | ||
Utilities.parseXmlFileToJson = function(filepath, parseOpts){ | ||
parseOpts = parseOpts || {compact: true}; | ||
Utilities.parseXmlFileToJson = function (filepath, parseOpts) { | ||
parseOpts = parseOpts || { compact: true }; | ||
return JSON.parse(parser.xml2json(fs.readFileSync(path.resolve(filepath), 'utf-8'), parseOpts)); | ||
}; | ||
Utilities.getAppName = function(){ | ||
Utilities.getAppName = function () { | ||
return Utilities.parseConfigXml().widget.name._text.toString().trim(); | ||
@@ -31,5 +31,5 @@ }; | ||
var config = Utilities.parseConfigXml() | ||
var ignoreAssetsPattern = config.widget.preference.find(preference => preference._attributes.name === name); | ||
if(ignoreAssetsPattern){ | ||
return ignoreAssetsPattern._attributes.value | ||
var retainAssetsPattern = config.widget.preference.find(preference => preference._attributes.name === name); | ||
if (retainAssetsPattern) { | ||
return retainAssetsPattern._attributes.value | ||
} | ||
@@ -36,0 +36,0 @@ return null; |
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
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
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
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
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
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
37
565
119107
2