🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@capacitor/cli

Package Overview
Dependencies
Maintainers
5
Versions
1067
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

to
0.0.38

bin/starter/android/app/src/main/assets/public/css/style.css

2

dist/android/doctor.js

@@ -10,3 +10,3 @@ "use strict";

await common_1.runTask('Checking Android Environment', () => {
return common_1.add(config, [
return common_1.check(config, [
checkAndroidInstalled,

@@ -13,0 +13,0 @@ checkGradlew,

@@ -8,3 +8,3 @@ "use strict";

const fs_2 = require("fs");
async function add(config, checks) {
async function check(config, checks) {
const results = await Promise.all(checks.map(f => f(config)));

@@ -16,3 +16,3 @@ const errors = results.filter(r => r != null);

}
exports.add = add;
exports.check = check;
async function checkWebDir(config) {

@@ -19,0 +19,0 @@ if (!await fs_1.existsAsync(config.app.webDir)) {

@@ -12,3 +12,3 @@ "use strict";

this.windows = {
androidStudioPath: "C:\\Program Files\\Android Studio\\bin\\studio64.exe"
androidStudioPath: 'C:\\Program Files\\Android Studio\\bin\\studio64.exe'
};

@@ -15,0 +15,0 @@ this.android = {

@@ -20,3 +20,3 @@ "use strict";

await common_2.runTask('Checking environment', () => {
return common_2.add(config, [common_1.checkCocoaPods, common_1.checkIOSProject, common_2.checkWebDir, checkNPMVersion, checkXcode]);
return common_2.check(config, [common_1.checkCocoaPods, common_1.checkIOSProject, common_2.checkWebDir, checkNPMVersion, checkXcode]);
});

@@ -23,0 +23,0 @@ const plugins = await plugin_1.getPlugins();

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

const plugin_1 = require("../plugin");
const inquirer = require("inquirer");
exports.updateIOSChecks = [common_1.checkCocoaPods, common_1.checkIOSProject];

@@ -14,3 +15,2 @@ async function updateIOS(config, needsUpdate) {

`local Pod repo is up to date and can find new Pod releases.\n`);
const inquirer = await Promise.resolve().then(() => require('inquirer'));
var answers = await inquirer.prompt([{

@@ -22,3 +22,3 @@ type: 'input',

}]);
if (answers.updateRepo == 'y') {
if (answers.updateRepo === 'y') {
await common_2.runTask(`Running pod repo update to update CocoaPods`, () => {

@@ -33,4 +33,4 @@ return common_2.runCommand(`pod repo update`);

});
//printPlugins(plugins);
await copyPluginsJS(config, plugins, "ios");
plugin_1.printPlugins(plugins);
await copyPluginsJS(config, plugins, 'ios');
await autoGeneratePods(plugins);

@@ -165,10 +165,10 @@ await installCocoaPodsPlugins(config, plugins, needsUpdate);

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

@@ -18,5 +18,5 @@ "use strict";

try {
await common_1.add(config, [common_1.checkPackage, ...addChecks(config, platformName)]);
await common_1.check(config, [common_1.checkPackage, ...addChecks(config, platformName)]);
await generateCapacitorConfig(config);
await common_1.add(config, []); // , [checkWebDir]);
await common_1.check(config, []); // , [checkWebDir]);
await doAdd(config, platformName);

@@ -23,0 +23,0 @@ // await sync(config, platformName);

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

const fs_extra_1 = require("fs-extra");
const promise_1 = require("../util/promise");
async function copyCommand(config, selectedPlatformName) {

@@ -15,6 +16,4 @@ const platforms = config.selectPlatforms(selectedPlatformName);

try {
await common_1.add(config, [common_1.checkWebDir]);
await Promise.all(platforms.map(platformName => {
return copy(config, platformName);
}));
await common_1.check(config, [common_1.checkWebDir]);
await promise_1.allSerial(platforms.map(platformName => () => copy(config, platformName)));
}

@@ -30,2 +29,3 @@ catch (e) {

await copyNativeBridge(config, config.ios.webDir);
await copyCordovaJS(config, config.ios.webDir);
}

@@ -35,2 +35,3 @@ else if (platformName === config.android.name) {

await copyNativeBridge(config, config.android.webDir);
await copyCordovaJS(config, config.android.webDir);
}

@@ -44,8 +45,16 @@ else {

const bridgePath = path_1.resolve('node_modules', '@capacitor/core', 'native-bridge.js');
if (!fs_1.existsAsync(bridgePath)) {
if (!await fs_1.existsAsync(bridgePath)) {
common_1.logFatal(`Unable to find node_modules/@capacitor/core/native-bridge.js. Are you sure`, '@capacitor/core is installed? This file is required for Capacitor to function');
return;
}
return await fs_extra_1.copy(bridgePath, path_1.join(nativeAbsDir, 'native-bridge.js'));
return fs_extra_1.copy(bridgePath, path_1.join(nativeAbsDir, 'native-bridge.js'));
}
async function copyCordovaJS(config, nativeAbsDir) {
const cordovaPath = path_1.resolve('node_modules', '@capacitor/core', 'cordova.js');
if (!await fs_1.existsAsync(cordovaPath)) {
common_1.logFatal(`Unable to find node_modules/@capacitor/core/cordova.js. Are you sure`, '@capacitor/core is installed? This file is currently required for Capacitor to function.');
return;
}
return fs_extra_1.copy(cordovaPath, path_1.join(nativeAbsDir, 'cordova.js'));
}
async function copyWebDir(config, nativeAbsDir) {

@@ -65,5 +74,5 @@ var chalk = require('chalk');

await fs_extra_1.remove(nativeAbsDir);
return await fs_extra_1.copy(webAbsDir, nativeAbsDir);
return fs_extra_1.copy(webAbsDir, nativeAbsDir);
});
}
}

@@ -108,3 +108,3 @@ "use strict";

}
return await add_1.addCommand(config, 'android');
return add_1.addCommand(config, 'android');
});

@@ -111,0 +111,0 @@ }

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

const common_1 = require("../common");
const promise_1 = require("../util/promise");
async function syncCommand(config, selectedPlatform) {

@@ -14,6 +15,4 @@ const platforms = config.selectPlatforms(selectedPlatform);

try {
await common_1.add(config, [common_1.checkPackage, common_1.checkWebDir, ...update_1.updateChecks(config, platforms)]);
await Promise.all(platforms.map(platformName => {
return sync(config, platformName);
}));
await common_1.check(config, [common_1.checkPackage, common_1.checkWebDir, ...update_1.updateChecks(config, platforms)]);
await promise_1.allSerial(platforms.map(platformName => () => sync(config, platformName)));
}

@@ -26,5 +25,5 @@ catch (e) {

async function sync(config, platformName) {
await update_1.update(config, platformName, false);
await copy_1.copy(config, platformName);
const tasks = [() => update_1.update(config, platformName, false), () => copy_1.copy(config, platformName)];
await promise_1.allSerial(tasks);
}
exports.sync = sync;

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

const common_1 = require("../common");
const promise_1 = require("../util/promise");
async function updateCommand(config, selectedPlatformName) {

@@ -14,7 +15,4 @@ const platforms = config.selectPlatforms(selectedPlatformName);

try {
await common_1.add(config, [common_1.checkPackage, ...updateChecks(config, platforms)]);
await Promise.all(platforms.map(platformName => {
return update(config, platformName, true);
}));
process.exit(0);
await common_1.check(config, [common_1.checkPackage, ...updateChecks(config, platforms)]);
await promise_1.allSerial(platforms.map(platformName => async () => await update(config, platformName, true)));
}

@@ -21,0 +19,0 @@ catch (e) {

{
"name": "@capacitor/cli",
"version": "0.0.37",
"version": "0.0.38",
"description": "Capacitor: Cross-platform apps with JavaScript and the web",

@@ -5,0 +5,0 @@ "homepage": "https://ionic-team.github.io/capacitor/",

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