Socket
Socket
Sign inDemoInstall

@oneblink/apps

Package Overview
Dependencies
Maintainers
6
Versions
464
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oneblink/apps - npm Package Compare versions

Comparing version 12.0.1-beta.2 to 12.0.1-beta.3

23

dist/draft-service.js

@@ -257,7 +257,4 @@ import { v4 as uuidv4 } from 'uuid';

async function tryGetFormSubmissionDrafts(formsAppId, abortSignal) {
const localDraftsStorage = await getLocalDrafts();
try {
localDraftsStorage.syncedFormSubmissionDrafts =
await getFormSubmissionDrafts(formsAppId, abortSignal);
await setAndBroadcastDrafts(localDraftsStorage);
return await getFormSubmissionDrafts(formsAppId, abortSignal);
}

@@ -269,3 +266,2 @@ catch (error) {

}
return localDraftsStorage.syncedFormSubmissionDrafts;
}

@@ -291,3 +287,11 @@ /**

}
const formSubmissionDrafts = await tryGetFormSubmissionDrafts(formsAppId, abortSignal);
let formSubmissionDrafts = await tryGetFormSubmissionDrafts(formsAppId, abortSignal);
const localDraftsStorage = await getLocalDrafts();
if (formSubmissionDrafts) {
localDraftsStorage.syncedFormSubmissionDrafts = formSubmissionDrafts;
await setAndBroadcastDrafts(localDraftsStorage);
}
else {
formSubmissionDrafts = localDraftsStorage.syncedFormSubmissionDrafts;
}
const formSubmissionDraft = formSubmissionDrafts.find(({ id }) => id === formSubmissionDraftId);

@@ -409,3 +413,2 @@ if (!formSubmissionDraft) {

newDeletedFormSubmissionDrafts;
await setAndBroadcastDrafts(localDraftsStorage);
}

@@ -431,4 +434,6 @@ if (localDraftsStorage.unsyncedDraftSubmissions.length) {

}
localDraftsStorage.syncedFormSubmissionDrafts =
await getFormSubmissionDrafts(formsAppId, abortSignal);
const formSubmissionDrafts = await tryGetFormSubmissionDrafts(formsAppId, abortSignal);
if (formSubmissionDrafts) {
localDraftsStorage.syncedFormSubmissionDrafts = formSubmissionDrafts;
}
await setAndBroadcastDrafts(localDraftsStorage);

@@ -435,0 +440,0 @@ if (localDraftsStorage.syncedFormSubmissionDrafts.length) {

@@ -33,3 +33,11 @@ import utilsService from './utils';

try {
const formSubmissionDraftVersion = await uploadDraftData(draftSubmission, onProgress, abortSignal);
return await uploadDraftData(draftSubmission, onProgress, abortSignal);
}
catch (error) {
// Ignoring all errors here as we don't want draft submission data
// being saved to the cloud to prevent drafts from being saved on the device
console.warn('Could not upload Draft Data as JSON', error);
Sentry.captureException(error);
}
finally {
if (typeof autoSaveKey === 'string') {

@@ -44,10 +52,3 @@ try {

}
return formSubmissionDraftVersion;
}
catch (error) {
// Ignoring all errors here as we don't want draft submission data
// being saved to the cloud to prevent drafts from being saved on the device
console.warn('Could not upload Draft Data as JSON', error);
Sentry.captureException(error);
}
}

@@ -54,0 +55,0 @@ export async function deleteDraftData(formSubmissionDraftId, abortSignal) {

{
"name": "@oneblink/apps",
"description": "Helper functions for OneBlink apps in JavaScript.",
"version": "12.0.1-beta.2",
"version": "12.0.1-beta.3",
"author": "OneBlink <developers@oneblink.io> (https://oneblink.io)",

@@ -6,0 +6,0 @@ "bugs": {

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