Socket
Socket
Sign inDemoInstall

@capacitor/cli

Package Overview
Dependencies
Maintainers
5
Versions
845
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor/cli - npm Package Compare versions

Comparing version 0.0.82 to 0.0.83

46

dist/android/update.js

@@ -41,10 +41,12 @@ "use strict";

cordovaPlugins.map(p => {
const androidPlatform = p.xml.platform.filter(function (item) { return item.$.name === 'android'; });
const androidConfigFiles = androidPlatform[0]['config-file'];
if (androidConfigFiles) {
const configXMLEntries = androidConfigFiles.filter(function (item) { return item.$.target === 'res/xml/config.xml'; });
configXMLEntries.map((entry) => {
const feature = { feature: entry.feature };
pluginEntries.push(feature);
});
const androidPlatform = update_1.getPluginPlatform(p, platform);
if (androidPlatform) {
const androidConfigFiles = androidPlatform['config-file'];
if (androidConfigFiles) {
const configXMLEntries = androidConfigFiles.filter(function (item) { return item.$.target === 'res/xml/config.xml'; });
configXMLEntries.map((entry) => {
const feature = { feature: entry.feature };
pluginEntries.push(feature);
});
}
}

@@ -78,14 +80,20 @@ });

cordovaPlugins.map(p => {
const platformFiles = p.xml.platform.filter(function (item) { return item.$.name === platform; });
const sourceFiles = platformFiles[0]['source-file'];
sourceFiles.map((sourceFile) => {
const fileName = sourceFile.$.src.split("/").pop();
const target = sourceFile.$["target-dir"].replace('src/', 'java/');
fs_1.copySync(path_1.join(p.rootPath, sourceFile.$.src), path_1.join(pluginsPath, target, fileName));
});
const resourceFiles = platformFiles[0]['resource-file'];
resourceFiles.map((resourceFile) => {
fs_1.copySync(path_1.join(p.rootPath, resourceFile.$.src), path_1.join(pluginsPath, resourceFile.$["target"]));
});
const androidPlatform = update_1.getPluginPlatform(p, platform);
if (androidPlatform) {
const sourceFiles = androidPlatform['source-file'];
if (sourceFiles) {
sourceFiles.map((sourceFile) => {
const fileName = sourceFile.$.src.split("/").pop();
const target = sourceFile.$["target-dir"].replace('src/', 'java/');
fs_1.copySync(path_1.join(p.rootPath, sourceFile.$.src), path_1.join(pluginsPath, target, fileName));
});
}
const resourceFiles = androidPlatform['resource-file'];
if (resourceFiles) {
resourceFiles.map((resourceFile) => {
fs_1.copySync(path_1.join(p.rootPath, resourceFile.$.src), path_1.join(pluginsPath, resourceFile.$["target"]));
});
}
}
});
}

@@ -89,3 +89,5 @@ "use strict";

let clobbers = [];
let merges = [];
let clobbersModule = "";
let mergesModule = "";
if (jsModule.clobbers) {

@@ -100,6 +102,15 @@ jsModule.clobbers.map((clobber) => {

}
if (jsModule.merges) {
jsModule.merges.map((merge) => {
merges.push(merge.$.target);
});
mergesModule = `,
"merges": [
"${merges.join('",\n "')}"
]`;
}
pluginModules.push(`{
"id": "${p.id}.${jsModule.$.name}",
"file": "plugins/${p.id}/${jsModule.$.src}",
"pluginId": "${p.id}"${clobbersModule}
"pluginId": "${p.id}"${clobbersModule}${mergesModule}
}`);

@@ -132,5 +143,5 @@ });

}
const platformModules = p.xml.platform.filter(function (item) { return item.$.name === platform; });
if (platformModules[0]['js-module']) {
modules = modules.concat(platformModules[0]['js-module']);
const platformModules = getPluginPlatform(p, platform);
if (platformModules && platformModules['js-module']) {
modules = modules.concat(platformModules['js-module']);
}

@@ -180,1 +191,10 @@ return modules;

exports.removePluginFiles = removePluginFiles;
function getPluginPlatform(p, platform) {
const platforms = p.xml.platform;
if (platforms) {
const platforms = p.xml.platform.filter(function (item) { return item.$.name === platform; });
return platforms[0];
}
return null;
}
exports.getPluginPlatform = getPluginPlatform;
{
"name": "@capacitor/cli",
"version": "0.0.82",
"version": "0.0.83",
"description": "Capacitor: Cross-platform apps with JavaScript and the web",

@@ -5,0 +5,0 @@ "homepage": "https://capacitor.ionicframework.com/",

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