New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@monokle/synchronizer

Package Overview
Dependencies
Maintainers
5
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@monokle/synchronizer - npm Package Compare versions

Comparing version 0.12.4 to 0.12.5

2

lib/cjs/handlers/configHandler.d.ts

@@ -13,2 +13,2 @@ export declare type OriginConfig = {

};
export declare function fetchOriginConfig(origin: string): Promise<OriginConfig>;
export declare function fetchOriginConfig(origin: string, timeout?: number): Promise<OriginConfig>;

@@ -19,3 +19,3 @@ "use strict";

let originConfigCache = undefined;
function fetchOriginConfig(origin) {
function fetchOriginConfig(origin, timeout = 30 * 1000) {
return __awaiter(this, void 0, void 0, function* () {

@@ -30,3 +30,3 @@ if (originConfigCache) {

const configUrl = normalize(`${origin}/config.js`);
const response = yield (0, node_fetch_1.default)(configUrl);
const response = yield (0, node_fetch_1.default)(configUrl, { timeout });
if (!response.ok) {

@@ -33,0 +33,0 @@ throw new Error(`Failed to fetch config from ${configUrl} with status ${response.status}: ${response.statusText}`);

@@ -13,2 +13,2 @@ export declare type OriginConfig = {

};
export declare function fetchOriginConfig(origin: string): Promise<OriginConfig>;
export declare function fetchOriginConfig(origin: string, timeout?: number): Promise<OriginConfig>;
import normalizeUrl from 'normalize-url';
import fetch from 'node-fetch';
let originConfigCache = undefined;
export async function fetchOriginConfig(origin) {
export async function fetchOriginConfig(origin, timeout = 30 * 1000) {
if (originConfigCache) {

@@ -13,3 +13,3 @@ // Use recently fetched config if from same origin and it's less than 5 minutes old.

const configUrl = normalize(`${origin}/config.js`);
const response = await fetch(configUrl);
const response = await fetch(configUrl, { timeout });
if (!response.ok) {

@@ -16,0 +16,0 @@ throw new Error(`Failed to fetch config from ${configUrl} with status ${response.status}: ${response.statusText}`);

{
"name": "@monokle/synchronizer",
"version": "0.12.4",
"version": "0.12.5",
"description": "Monokle Cloud synchronizer",

@@ -5,0 +5,0 @@ "author": "Kubeshop",

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