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.87 to 0.0.88

45

dist/ios/update.js

@@ -44,2 +44,3 @@ "use strict";

await autoGeneratePods(plugins);
await autoGenerateResourcesPods(cordovaPlugins);
await installCocoaPodsPlugins(config, plugins, needsUpdate);

@@ -59,2 +60,13 @@ }

exports.autoGeneratePods = autoGeneratePods;
async function autoGenerateResourcesPods(plugins) {
const resoucesPlugins = plugins.filter(p => getPluginResources(p).length > 0);
return Promise.all(resoucesPlugins
.map(async (p) => {
const name = p.name + 'Resources';
const content = generateResourcesPodspec(p);
const path = path_1.join(p.rootPath, p.ios.path, name + '.podspec');
return fs_1.writeFileAsync(path, content);
}));
}
exports.autoGenerateResourcesPods = autoGenerateResourcesPods;
function generatePodspec(plugin) {

@@ -106,2 +118,22 @@ const repo = (plugin.repository && plugin.repository.url) || 'https://github.com/ionic-team/does-not-exist.git';

exports.generatePodspec = generatePodspec;
function generateResourcesPodspec(plugin) {
const repo = (plugin.repository && plugin.repository.url) || 'https://github.com/ionic-team/does-not-exist.git';
const resources = getPluginResources(plugin);
let resourceFiles = [];
resources.map((resource) => {
resourceFiles.push(resource.$.src.replace('src/ios/', ''));
});
return `
Pod::Spec.new do |s|
s.name = '${plugin.name}Resources'
s.version = '${plugin.version}'
s.summary = 'Autogenerated spec'
s.license = 'Unknown'
s.homepage = 'https://example.com'
s.authors = { 'Capacitor Generator' => 'hi@example.com' }
s.source = { :git => '${repo}', :tag => '${plugin.version}' }
s.resources = ['${resourceFiles.join("', '")}']
end`;
}
exports.generateResourcesPodspec = generateResourcesPodspec;
async function installCocoaPodsPlugins(config, plugins, needsUpdate) {

@@ -138,2 +170,5 @@ await common_2.runTask('Updating iOS native dependencies', () => {

});
if (getPluginResources(p).length > 0) {
pods.push(`pod '${p.ios.name}Resources', :path => '../../node_modules/${p.id}/${p.ios.path}'`);
}
});

@@ -165,4 +200,14 @@ return `

}
function getPluginResources(p) {
const iosPlatform = update_1.getPluginPlatform(p, platform);
if (iosPlatform) {
const resourceFiles = iosPlatform['resource-file'];
if (resourceFiles) {
return resourceFiles;
}
}
return [];
}
function getFrameworkName(framework) {
return framework.$.src.substr(0, framework.$.src.indexOf('.'));
}

2

package.json
{
"name": "@capacitor/cli",
"version": "0.0.87",
"version": "0.0.88",
"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