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

@luvio/service-provisioner

Package Overview
Dependencies
Maintainers
0
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@luvio/service-provisioner - npm Package Compare versions

Comparing version 5.24.1 to 5.25.0

2

dist/types/v1/index.d.ts

@@ -64,3 +64,3 @@ import { type ServiceDescriptor } from '@luvio/utils';

*/
export default function getServices<R extends ServicesRequest<any>>(request: R): PromiseLike<RequestedServices<R>>;
export default function getServices<R extends ServicesRequest<any>>(request: R, timeout?: number): PromiseLike<RequestedServices<R>>;
/**

@@ -67,0 +67,0 @@ * Sets the services that will be used to satisfy calls to getServices().

@@ -7,3 +7,3 @@ /**

import { satisfies, resolvedPromiseLike } from '@luvio/utils';
import { racesync, satisfies, resolvedPromiseLike } from '@luvio/utils';

@@ -62,4 +62,4 @@ /**

*/
function getServices(request) {
return waitForServices.then((services) => {
function getServices(request, timeout = 30000) {
const servicesPromise = waitForServices.then((services) => {
// try to resolve the requested services against our services

@@ -73,2 +73,15 @@ const result = resolve(services, request);

});
let timeoutId;
let timeoutPromise = new Promise((_, reject) => {
timeoutId = setTimeout(() => reject(new Error('OneStore services unavailable')), timeout);
});
return racesync([servicesPromise, timeoutPromise]).then((value) => {
clearTimeout(timeoutId);
return value;
}, (reason) => {
clearTimeout(timeoutId);
// eslint-disable-next-line
console.error(reason);
throw reason;
});
}

@@ -75,0 +88,0 @@ /**

@@ -64,3 +64,3 @@ import { type ServiceDescriptor } from '@luvio/utils';

*/
export default function getServices<R extends ServicesRequest<any>>(request: R): PromiseLike<RequestedServices<R>>;
export default function getServices<R extends ServicesRequest<any>>(request: R, timeout?: number): PromiseLike<RequestedServices<R>>;
/**

@@ -67,0 +67,0 @@ * Sets the services that will be used to satisfy calls to getServices().

{
"name": "@luvio/service-provisioner",
"version": "5.24.1",
"version": "5.25.0",
"private": false,

@@ -33,3 +33,3 @@ "description": "Luvio Service Provisioner",

"dependencies": {
"@luvio/utils": "5.24.1"
"@luvio/utils": "5.25.0"
},

@@ -36,0 +36,0 @@ "volta": {

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