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.0-beta.9 to 12.0.0-beta.10

32

dist/draft-service.js

@@ -452,2 +452,17 @@ import { v4 as uuidv4 } from 'uuid';

let localDraftsStorage = await getLocalDrafts();
console.log('Removing local draft data for deleted drafts', localDraftsStorage.deletedFormSubmissionDrafts);
if (localDraftsStorage.deletedFormSubmissionDrafts.length) {
const newDeletedFormSubmissionDrafts = [];
for (const formSubmissionDraft of localDraftsStorage.deletedFormSubmissionDrafts) {
const { hasDeletedRemoteDraft } = await deleteDraftData(formSubmissionDraft.id, abortSignal);
if (!hasDeletedRemoteDraft) {
newDeletedFormSubmissionDrafts.push(formSubmissionDraft);
}
}
// Get local drafts again to ensure nothing has happened while processing
localDraftsStorage = await getLocalDrafts();
localDraftsStorage.deletedFormSubmissionDrafts =
newDeletedFormSubmissionDrafts;
await setDrafts(localDraftsStorage);
}
localDraftsStorage.syncedFormSubmissionDrafts =

@@ -464,3 +479,3 @@ await getFormSubmissionDrafts(formsAppId, abortSignal);

}
console.log(`Attempting to upload ${localDraftsStorage.unsyncedDraftSubmissions.length} local unsycned drafts(s).`);
console.log(`Attempting to upload ${localDraftsStorage.unsyncedDraftSubmissions.length} local unsynced drafts(s).`);
if (localDraftsStorage.unsyncedDraftSubmissions.length) {

@@ -485,17 +500,2 @@ const newUnsyncedDraftSubmissions = [];

}
console.log('Removing local draft data for deleted drafts', localDraftsStorage.deletedFormSubmissionDrafts);
if (localDraftsStorage.deletedFormSubmissionDrafts.length) {
const newDeletedFormSubmissionDrafts = [];
for (const formSubmissionDraft of localDraftsStorage.deletedFormSubmissionDrafts) {
const { hasDeletedRemoteDraft } = await deleteDraftData(formSubmissionDraft.id, abortSignal);
if (!hasDeletedRemoteDraft) {
newDeletedFormSubmissionDrafts.push(formSubmissionDraft);
}
}
// Get local drafts again to ensure nothing has happened while processing
localDraftsStorage = await getLocalDrafts();
localDraftsStorage.deletedFormSubmissionDrafts =
newDeletedFormSubmissionDrafts;
await setDrafts(localDraftsStorage);
}
console.log('Finished syncing drafts.');

@@ -502,0 +502,0 @@ _isSyncingDrafts = false;

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

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

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