Socket
Socket
Sign inDemoInstall

@ionic-native/core

Package Overview
Dependencies
Maintainers
2
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ionic-native/core - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0-alpha.1

bootstrap.metadata.json

0

bootstrap.d.ts
export declare function checkReady(): void;

1

bootstrap.js

@@ -19,2 +19,1 @@ export function checkReady() {

}
//# sourceMappingURL=bootstrap.js.map
export * from './plugin';
export * from './plugin';
//# sourceMappingURL=index.js.map
{
"name": "@ionic-native/core",
"version": "3.0.0",
"version": "3.1.0-alpha.1",
"description": "Ionic Native - Native plugins for ionic apps",

@@ -15,3 +15,6 @@ "module": "index.js",

"url": "https://github.com/driftyco/ionic-native.git"
},
"dependencies": {
"@ionic-native/utils": "3.1.0-alpha.1"
}
}

@@ -28,2 +28,6 @@ import { Observable } from 'rxjs/Observable';

/**
* Available installation variables
*/
installVariables?: string[];
/**
* Supported platforms

@@ -30,0 +34,0 @@ */

@@ -20,3 +20,3 @@ import { get } from './util';

export var pluginWarn = function (pluginObj, method) {
var pluginName = pluginObj.pluginName, plugin = pluginObj.plugin;
var pluginName = pluginObj.constructor.getPluginName(), plugin = pluginObj.constructor.getPlugin();
if (method) {

@@ -112,7 +112,7 @@ console.warn('Native: tried calling ' + pluginName + '.' + method + ', but the ' + pluginName + ' plugin is not installed.');

args = setIndex(args, opts, resolve, reject);
var pluginInstance = getPlugin(pluginObj.pluginRef);
var pluginInstance = getPlugin(pluginObj.constructor.getPluginRef());
if (!pluginInstance || pluginInstance[methodName] === 'undefined') {
// Do this check in here in the case that the Web API for this plugin is available (for example, Geolocation).
if (!window.cordova) {
cordovaWarn(pluginObj.pluginName, methodName);
cordovaWarn(pluginObj.constructor.getPluginName(), methodName);
return {

@@ -140,21 +140,6 @@ error: 'cordova_not_available'

else {
console.error('No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular 1/2 or on a recent browser.');
console.error('No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular 2 or on a recent browser.');
}
};
if (window.angular) {
var injector = window.angular.element(document.querySelector('[ng-app]') || document.body).injector();
if (injector) {
var $q = injector.get('$q');
return $q(function (resolve, reject) {
cb(resolve, reject);
});
}
else {
console.warn('Angular 1 was detected but $q couldn\'t be retrieved. This is usually when the app is not bootstrapped on the html or body tag. Falling back to native promises which won\'t trigger an automatic digest when promises resolve.');
return tryNativePromise();
}
}
else {
return tryNativePromise();
}
return tryNativePromise();
}

@@ -200,7 +185,7 @@ function wrapPromise(pluginObj, methodName, args, opts) {

}
return get(window, pluginObj.pluginRef)[opts.clearFunction].call(pluginObj, pluginResult);
return get(window, pluginObj.constructor.getPluginRef())[opts.clearFunction].call(pluginObj, pluginResult);
}
}
catch (e) {
console.warn('Unable to clear the previous observable watch for', pluginObj.pluginName, methodName);
console.warn('Unable to clear the previous observable watch for', pluginObj.constructor.getPluginName(), methodName);
console.error(e);

@@ -238,3 +223,3 @@ }

catch (e) {
console.warn('Unable to clear the previous observable watch for', pluginObj.pluginName, methodName);
console.warn('Unable to clear the previous observable watch for', pluginObj.constructor.getPluginName(), methodName);
console.error(e);

@@ -278,7 +263,7 @@ }

return new Observable(function (observer) {
var pluginInstance = getPlugin(pluginObj.pluginRef);
var pluginInstance = getPlugin(pluginObj.constructor.getPluginRef());
if (!pluginInstance) {
// Do this check in here in the case that the Web API for this plugin is available (for example, Geolocation).
if (!window.cordova) {
cordovaWarn(pluginObj.pluginName, methodName);
cordovaWarn(pluginObj.constructor.getPluginName(), methodName);
observer.error({

@@ -376,2 +361,17 @@ error: 'cordova_not_available'

};
cls['getPluginName'] = function () {
return config.pluginName;
};
cls['getPluginRef'] = function () {
return config.pluginRef;
};
cls['getPluginInstallName'] = function () {
return config.plugin;
};
cls['getPluginRepo'] = function () {
return config.repo;
};
cls['getSupportedPlatforms'] = function () {
return config.platforms;
};
return cls;

@@ -389,2 +389,3 @@ };

return function (target, methodName, descriptor) {
console.log('@Cordova()', target, methodName, descriptor);
return {

@@ -396,2 +397,3 @@ value: function () {

}
console.log('@Cordova() wrap()', this, methodName, opts);
return wrap(this, methodName, opts).apply(this, args);

@@ -488,2 +490,1 @@ }

}
//# sourceMappingURL=plugin.js.map
export declare function get(obj: any, path: any): any;

@@ -11,2 +11,1 @@ export function get(obj, path) {

;
//# sourceMappingURL=util.js.map
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