Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

instabug-cordova

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

instabug-cordova - npm Package Compare versions

Comparing version 8.0.7 to 8.1.0

src/android/util/Util.java

2

package.json
{
"name": "instabug-cordova",
"version": "8.0.7",
"version": "8.1.0",
"description": "The purpose of this plugin is to simplify the process of integrating the Instabug SDK in a hybrid application, as well as to provide an interface to interfacing with the SDK through JavaScript.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -28,3 +28,3 @@ /*

*/
var getInvocationOptions = function() {
var getOptions = function() {
return {

@@ -79,2 +79,9 @@ emailFieldHidden: 'emailFieldHidden',

var getReportType = function() {
return {
bug: 'bug',
feedback: 'feedback'
};
};
/**

@@ -87,11 +94,68 @@ * BugReporting module

BugReporting.invocationEvents = getInvocationEvents();
BugReporting.invocationOptions = getInvocationOptions();
/**
* @deprecated
*/
BugReporting.invocationOptions = getOptions();
BugReporting.option = getOptions();
BugReporting.invocationModes = getInvocationModes();
/**
* @deprecated
*/
BugReporting.promptOptions = getPromptOptions();
BugReporting.extendedBugReportMode = getExtendedBugReportMode();
BugReporting.reportType = getReportType();
/**
* Enables or disables all bug reporting functionalities.
* @param {boolean} isEnabled
* @param {function(void):void} success callback on function success
* @param {function(void):void} error callback on function error
*/
BugReporting.setEnabled = function(isEnabled, success, error) {
exec(success, error, 'IBGPlugin', 'setBugReportingEnabled', [isEnabled]);
};
/**
* Sets report type either bug, feedback or both.
* @param {enum} reportType Array of reportType
* @param {function(void):void} success callback on function success
* @param {function(void):void} error callback on function error
*/
BugReporting.setReportTypes = function(reportTypes, success, error) {
var validatedTypes = [];
for (let i = 0; i < reportTypes.length; i++) {
var validatedType = getReportType()[reportTypes[i]];
if (validatedType) {
validatedTypes.push(validatedType);
}
}
if (validatedTypes !== undefined || validatedTypes.length != 0) {
exec(success, error, 'IBGPlugin', 'setReportTypes', [reportTypes]);
}
};
/**
* Shows report view with specified options.
* @param {enum} reportType reportType
* @param {array} options array of Invocation options
* @param {function(void):void} success callback on function success
* @param {function(void):void} error callback on function error
*/
BugReporting.showWithOptions = function(reportType, options, success, error) {
if (reportType && options) {
exec(
success,
error,
'IBGPlugin',
'showBugReportingWithReportTypeAndOptions',
[reportType, options]
);
}
};
/**
* @deprecated use {@link BugReporting.setOptions}
* Sets the invocation options.
* Default is set by `Instabug.startWithToken`.
* @param {enum} invocationOptions Array of InvocationOption
* @param {enum} options Array of Option
* @param {function(void):void} success callback on function success

@@ -104,3 +168,3 @@ * @param {function(void):void} error callback on function error

for (i = 0; i < options.length; i++) {
var validatedOption = getInvocationOptions()[options[i]];
var validatedOption = getOptions()[options[i]];
if (validatedOption) {

@@ -111,6 +175,10 @@ validatedOptions.push(validatedOption);

if (validatedOptions !== undefined || validatedOptions.length != 0) {
exec(success, error, 'IBGPlugin', 'setInvocationOptions', [validatedOptions]);
exec(success, error, 'IBGPlugin', 'setInvocationOptions', [
validatedOptions
]);
} else {
console.log(
'Could not change invocation option - "' + validatedOptions + '" is empty.'
'Could not change invocation option - "' +
validatedOptions +
'" is empty.'
);

@@ -121,2 +189,14 @@ }

/**
* Sets the invocation options.
* Default is set by `Instabug.startWithToken`.
* @param {enum} options Array of Option
* @param {function(void):void} success callback on function success
* @param {function(void):void} error callback on function error
*/
BugReporting.setOptions = function(options, success, error) {
BugReporting.setInvocationOptions(options, success, error);
}
/**
* @deprecated
* Invokes the SDK manually with the default invocation mode.

@@ -142,3 +222,6 @@ * Shows a view that asks the user whether they want to start a chat, report

if (validatedOptions.length != 0) {
exec(success, error, 'IBGPlugin', 'invoke', [validatedMode, validatedOptions]);
exec(success, error, 'IBGPlugin', 'invoke', [
validatedMode,
validatedOptions
]);
} else {

@@ -149,3 +232,5 @@ exec(success, error, 'IBGPlugin', 'invoke', [validatedMode]);

exec(success, error, 'IBGPlugin', 'invoke', []);
console.log('Could not apply mode to invocation - "' + mode + '" is not valid.');
console.log(
'Could not apply mode to invocation - "' + mode + '" is not valid.'
);
}

@@ -203,3 +288,5 @@ };

} else {
console.log('Could not change invocation event - "' + event + '" is not valid.');
console.log(
'Could not change invocation event - "' + event + '" is not valid.'
);
}

@@ -234,2 +321,3 @@ };

/**
* @deprecated
* Sets the prompt options that will be shown to a user when the SDK is invoked.

@@ -249,3 +337,6 @@ * @param {enum} promptOptions Array of PromptOption

}
if (validatedPromptOptions !== undefined || validatedPromptOptions.length != 0) {
if (
validatedPromptOptions !== undefined ||
validatedPromptOptions.length != 0
) {
exec(success, error, 'IBGPlugin', 'setPromptOptionsEnabled', [

@@ -256,3 +347,5 @@ validatedPromptOptions

console.log(
'Could not change prompt option - "' + validatedPromptOption + '" is not valid.'
'Could not change prompt option - "' +
validatedPromptOption +
'" is not valid.'
);

@@ -263,9 +356,15 @@ }

/**
*
*
* @param {enum} extendedBugReportMode ExtendedBugReportMode
* @param {function} success callback on function success
* @param {function(string):void} error callback on function error
* @param {function(string):void} error callback on function error
*/
BugReporting.setExtendedBugReportMode = function(extendedBugReportMode, success, error) {
var validatedExtendedBugReportMode = getExtendedBugReportMode()[extendedBugReportMode];
BugReporting.setExtendedBugReportMode = function(
extendedBugReportMode,
success,
error
) {
var validatedExtendedBugReportMode = getExtendedBugReportMode()[
extendedBugReportMode
];

@@ -285,11 +384,2 @@ if (validatedExtendedBugReportMode) {

/**
*
* @param {function():void} success
* @param {function():void} error
*/
BugReporting.dismiss = function (success, error) {
exec(success, error, 'IBGPlugin', 'dismiss', []);
};
module.exports = BugReporting;

@@ -13,21 +13,2 @@ var exec = require('cordova/exec');

var getInvocationModes = function () {
return {
chat: 'chat',
chats: 'chats',
bug: 'bug',
feedback: 'feedback',
options: 'options'
};
};
var getInvocationOptions = function () {
return {
emailFieldHidden: 'emailFieldHidden',
emailFieldOptional: 'emailFieldOptional',
commentFieldRequired: 'commentFieldRequired',
disablePostSendingDialog: 'disablePostSendingDialog'
};
};
var getReproStepsMode = function () {

@@ -41,9 +22,2 @@ return {

var getPromptOptions = function () {
return {
bug: 'bug',
chat: 'chat',
feedback: 'feedback'
}
};
var getWelcomeMessageMode = function () {

@@ -58,17 +32,2 @@ return {

var getExtendedBugReportMode = function () {
return {
enabledWithRequiredFields: 'enabledWithRequiredFields',
enabledWithOptionalFields: 'enabledWithOptionalFields',
disabled: 'disabled'
};
};
var getActionTypes = function () {
return {
requestNewFeature: 'requestNewFeature',
addCommentToFeature: 'addCommentToFeature'
};
};
var getLocales = function () {

@@ -109,2 +68,6 @@ return {

Instabug.show = function (success, error) {
exec(success, error, 'IBGPlugin', 'show');
}
Instabug.startWithToken = function (token, events, options, success, error) {

@@ -126,31 +89,2 @@ var i;

/**
* @deprecated since version 8.0.0.
*/
Instabug.invoke = function (mode, invocationOptions, success, error) {
var validatedMode = getInvocationModes()[mode];
var i;
var validatedOptions = [];
for (i = 0; i < invocationOptions.length; i++) {
var validatedOption = getInvocationOptions()[invocationOptions[i]];
if(validatedOption) {
validatedOptions.push(validatedOption);
}
}
if (validatedMode) {
if(validatedOptions.length != 0) {
exec(success, error, 'IBGPlugin', 'invoke', [validatedMode, validatedOptions]);
} else {
exec(success, error, 'IBGPlugin', 'invoke', [validatedMode]);
}
} else {
exec(success, error, 'IBGPlugin', 'invoke', []);
console.log('Could not apply mode to invocation - "' + mode + '" is not valid.');
}
};
Instabug.showIntro = function (success, error) {
exec(success, error, 'IBGPlugin', 'showIntroDialog', []);
};
Instabug.setPrimaryColor = function (colorInteger, success, error) {

@@ -172,27 +106,2 @@ exec(success, error, 'IBGPlugin', 'setPrimaryColor', [colorInteger]);

Instabug.setUserEmail = function (email, success, error) {
exec(success, error, 'IBGPlugin', 'setUserEmail', [email]);
};
/**
* @deprecated since version 8.0.0.
*/
Instabug.setAttachmentTypesEnabled = function (screenshot, extraScreenshot,
galleryImage, screenRecording,
success, error) {
exec(success, error, 'IBGPlugin', 'setAttachmentTypesEnabled', [screenshot,
extraScreenshot, galleryImage, screenRecording]);
};
Instabug.setUserName = function (name, success, error) {
exec(success, error, 'IBGPlugin', 'setUserName', [name]);
};
/**
* @deprecated since version 8.0.0.
*/
Instabug.showSurveyWithToken = function (surveyToken, success, error) {
exec(success, error, 'IBGPlugin', 'showSurveyWithToken', [surveyToken]);
};
Instabug.logUserEventWithName = function (userEvent, success, error) {

@@ -206,21 +115,2 @@ exec(success, error, 'IBGPlugin', 'logUserEventWithName', [userEvent]);

/**
* @deprecated since version 8.0.0.
*/
Instabug.setEmailFieldRequiredForFeatureRequests = function (isRequired, actionTypes, success, error) {
var i;
var validatedActionTypes = [];
for (i = 0; i < actionTypes.length; i++) {
var validatedActionType = getActionTypes()[actionTypes[i]];
if(validatedActionType) {
validatedActionTypes.push(validatedActionType);
}
}
if (validatedActionTypes !== undefined || validatedActionTypes.length != 0) {
exec(success, error, 'IBGPlugin', 'setEmailFieldRequiredForFeatureRequests', [isRequired, validatedActionTypes]);
} else {
console.log('Could not set email field - "' + validatedActionTypes + '" is incorrect.');
}
};
Instabug.setReproStepsMode = function (reproStepsMode, success, error) {

@@ -248,35 +138,2 @@

/**
* @deprecated since version 8.0.0.
*/
Instabug.setExtendedBugReportMode = function (extendedBugReportMode, success, error) {
var validatedExtendedBugReportMode = getExtendedBugReportMode()[extendedBugReportMode];
if (validatedExtendedBugReportMode) {
exec(success, error, 'IBGPlugin', 'setExtendedBugReportMode', [validatedExtendedBugReportMode]);
} else {
console.log('Could not set extended bug report mode - "' + validatedExtendedBugReportMode + '" is not valid.');
}
};
/**
* @deprecated since version 8.0.0.
*/
Instabug.setPromptOptionsEnabled = function (promptOptions, success, error) {
var i;
var validatedPromptOptions = [];
for (i = 0; i < promptOptions.length; i++) {
var validatedPromptOption = getPromptOptions()[promptOptions[i]];
if(validatedPromptOption) {
validatedPromptOptions.push(validatedPromptOption);
}
}
if (validatedPromptOptions !== undefined || validatedPromptOptions.length != 0) {
exec(success, error, 'IBGPlugin', 'setPromptOptionsEnabled', [validatedPromptOptions]);
} else {
console.log('Could not change prompt option - "' + validatedPromptOption + '" is not valid.');
}
};
Instabug.setUserData = function (data, success, error) {

@@ -298,6 +155,12 @@ exec(success, error, 'IBGPlugin', 'setUserData', [data]);

/**
* @deprecated use {@link Replies.getUnreadRepliesCount}
*/
Instabug.getUnreadMessagesCount = function (success, error) {
exec(success, error, 'IBGPlugin', 'getUnreadMessagesCount', []);
exec(success, error, 'IBGPlugin', 'getUnreadRepliesCount', []);
};
/**
* @deprecated use {@link Replies.setInAppNotificationEnabled}
*/
Instabug.setChatNotificationEnabled = function (isEnabled, success, error) {

@@ -311,48 +174,2 @@ exec(success, error, 'IBGPlugin', 'setChatNotificationEnabled', [isEnabled]);

/**
* @deprecated since version 8.0.0.
*/
Instabug.setSurveysEnabled = function (isEnabled, success, error) {
exec(success, error, 'IBGPlugin', 'setSurveysEnabled', [isEnabled]);
};
/**
* @deprecated since version 8.0.0
*/
Instabug.showSurveyIfAvailable = function (success, error) {
exec(success, error, 'IBGPlugin', 'showSurveyIfAvailable', []);
};
/**
* @deprecated Since version 8.0.
*/
Instabug.changeInvocationEvent = function (event, success, error) {
var validatedEvent = getInvocationEvents()[event];
if (validatedEvent) {
exec(success, error, 'IBGPlugin', 'changeInvocationEvent', [validatedEvent]);
} else {
console.log('Could not change invocation event - "' + event + '" is not valid.');
}
};
/**
* @deprecated since version 8.0.0.
*/
Instabug.setInvocationEvents = function (events, success, error) {
var i;
var validatedEvents = [];
for (i = 0; i < events.length; i++) {
var validatedEvent = getInvocationEvents()[events[i]];
if(validatedEvent) {
validatedEvents.push(validatedEvent);
}
}
if (validatedEvents !== undefined || validatedEvents.length != 0) {
exec(success, error, 'IBGPlugin', 'setInvocationEvents', [validatedEvents]);
} else {
console.log('Could not change invocation event - "' + event + '" is not valid.');
}
};
Instabug.disable = function (success, error) {

@@ -386,16 +203,2 @@ exec(success, error, 'IBGPlugin', 'disable', []);

/**
* @deprecated since version 8.0.0.
*/
Instabug.hasRespondedToSurveyWithToken = function (surveyToken, success, error) {
exec(success, error, 'IBGPlugin', 'hasRespondedToSurveyWithToken', [surveyToken]);
};
/**
* @deprecated since version 8.0.0.
*/
Instabug.getAvailableSurveys = function (success, error) {
exec(success, error, 'IBGPlugin', 'getAvailableSurveys', []);
};
Instabug.identifyUserWithEmail = function (email, name, success, error) {

@@ -405,16 +208,2 @@ exec(success, error, 'IBGPlugin', 'identifyUserWithEmail', [email, name]);

/**
* @deprecated since version 8.0.0.
*/
Instabug.setPreInvocationHandler = function (success, error) {
exec(success, error, 'IBGPlugin', 'setPreInvocationHandler', []);
};
/**
* @deprecated since version 8.0.0.
*/
Instabug.setPostInvocationHandler = function (success, error) {
exec(success, error, 'IBGPlugin', 'setPostInvocationHandler', []);
};
Instabug.setPreSendingHandler = function (success, error) {

@@ -424,23 +213,2 @@ exec(success, error, 'IBGPlugin', 'setPreSendingHandler', []);

/**
* @deprecated since version 8.0.0.
*/
Instabug.setDidSelectPromptOptionHandler = function (success, error) {
exec(success, error, 'IBGPlugin', 'didSelectPromptOptionHandler', []);
};
/**
* @deprecated since version 8.0.0.
*/
Instabug.setWillShowSurveyHandler = function (success, error) {
exec(success, error, 'IBGPlugin', 'willShowSurveyHandler', []);
};
/**
* @deprecated since version 8.0.0.
*/
Instabug.setDidDismissSurveyHandler = function (success, error) {
exec(success, error, 'IBGPlugin', 'didDismissSurveyHandler', []);
};
Instabug.setVideoRecordingFloatingButtonPosition = function (position, success, error) {

@@ -454,9 +222,2 @@ exec(success, error, 'IBGPlugin', 'setVideoRecordingFloatingButtonPosition', [position]);

/**
* @deprecated since version 8.0.0.
*/
Instabug.dismiss = function (success, error) {
exec(success, error, 'IBGPlugin', 'dismiss', []);
};
Instabug.setDebugEnabled = function (isDebugEnabled, success, error) {

@@ -481,37 +242,2 @@ exec(success, error, 'IBGPlugin', 'setDebugEnabled', [isDebugEnabled]);

/**
* @deprecated since version 8.0.0.
*/
Instabug.setThresholdForReshowingSurveyAfterDismiss = function (sessionsCount, daysCount, success, error) {
exec(success, error, 'IBGPlugin', 'setThresholdForReshowingSurveyAfterDismiss', [sessionsCount, daysCount]);
};
/**
* @deprecated since version 8.0.0.
*/
Instabug.setAutoShowingSurveysEnabled = function (autoShowingSurveysEnabled, success, error) {
exec(success, error, 'IBGPlugin', 'setAutoShowingSurveysEnabled', [autoShowingSurveysEnabled]);
};
/**
* @deprecated since version 8.0.0.
*/
Instabug.showFeatureRequests = function (success, error) {
exec(success, error, 'IBGPlugin', 'showFeatureRequests', []);
};
/**
* @deprecated since version 8.0.0.
*/
Instabug.setShouldShowSurveysWelcomeScreen = function (shouldShowWelcomeScreen, success, error) {
exec(success, error, 'IBGPlugin', 'setShouldShowSurveysWelcomeScreen', [shouldShowWelcomeScreen]);
};
/**
* @deprecated since version 8.0.0.
*/
Instabug.setCommentFieldRequired = function(commentRequired, success, error) {
exec(success, error, 'IBGPlugin', 'setCommentFieldRequired', [commentRequired])
}
module.exports = Instabug;

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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