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

wappsto-blanket

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wappsto-blanket - npm Package Compare versions

Comparing version 0.0.22 to 0.0.23

20

hooks/useLogs.js

@@ -5,2 +5,3 @@ import { useState, useRef, useCallback, useEffect } from 'react';

import { getServiceUrl } from '../util';
import querystring from 'querystring';
import axios from 'axios';

@@ -33,14 +34,15 @@

const getLogs = useCallback(async (start, end) => {
const getLogs = useCallback(async (options) => {
if(!stateId){
throw new Error('stateId is not defined');
}
if(!start || !end){
const cOptions = {...options};
if(!cOptions.start || !cOptions.end){
return;
}
if(start.constructor === Date){
start = start.toISOString();
if(cOptions.start.constructor === Date){
cOptions.start = cOptions.start.toISOString();
}
if(end.constructor === Date){
end = end.toISOString();
if(cOptions.end.constructor === Date){
cOptions.end = cOptions.end.toISOString();
}

@@ -54,7 +56,7 @@ if(cachedStatus.current === STATUS.IDLE){

try{
while(more && !isCanceled.current){
while(more && !isCanceled.current && !unmounted.current){
if(cachedData.current.length > 0){
start = cachedData.current[cachedData.current.length - 1].time;
cOptions.start = cachedData.current[cachedData.current.length - 1].time;
}
const url = `${getServiceUrl('log')}/${stateId}?start=${start}&end=${end}&type=state&limit=3600`;
const url = `${getServiceUrl('log')}/${stateId}?type=state&limit=3600&${querystring.stringify(cOptions)}`;
const result = await axios.get(url, {

@@ -61,0 +63,0 @@ headers: { "x-session": sessionId || activeSession.meta.id },

{
"name": "wappsto-blanket",
"version": "0.0.22",
"version": "0.0.23",
"description": "",

@@ -5,0 +5,0 @@ "scripts": {

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