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

@travetto/model

Package Overview
Dependencies
Maintainers
1
Versions
371
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/model - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

14

package.json
{
"name": "@travetto/model",
"version": "4.0.2",
"version": "4.0.3",
"description": "Datastore abstraction for core operations.",

@@ -29,10 +29,10 @@ "keywords": [

"dependencies": {
"@travetto/config": "^4.0.2",
"@travetto/di": "^4.0.2",
"@travetto/registry": "^4.0.2",
"@travetto/schema": "^4.0.2"
"@travetto/config": "^4.0.3",
"@travetto/di": "^4.0.3",
"@travetto/registry": "^4.0.3",
"@travetto/schema": "^4.0.3"
},
"peerDependencies": {
"@travetto/cli": "^4.0.2",
"@travetto/test": "^4.0.2"
"@travetto/cli": "^4.0.4",
"@travetto/test": "^4.0.3"
},

@@ -39,0 +39,0 @@ "peerDependenciesMeta": {

@@ -1,5 +0,3 @@

import timers from 'node:timers/promises';
import { ShutdownManager, Class, TimeSpan, TimeUtil, Util } from '@travetto/base';
import { ShutdownManager, Class, TimeSpan, TimeUtil } from '@travetto/base';
import { ModelRegistry } from '../../registry/model';

@@ -38,11 +36,11 @@ import { ModelExpirySupport } from '../../service/expiry';

if (svc.deleteExpired && cullable.length) {
let running = true;
const running = new AbortController();
const cullInterval = TimeUtil.timeToMs(svc.config?.cullRate ?? '10m');
ShutdownManager.onGracefulShutdown(async () => { running = false; }, this);
ShutdownManager.onGracefulShutdown(async () => running.abort(), this);
(async (): Promise<void> => {
await timers.setTimeout(1000); // Wait a second to start culling
while (running) {
await timers.setTimeout(cullInterval);
await Util.nonBlockingTimeout(1000);
while (!running.signal.aborted) {
await Util.nonBlockingTimeout(cullInterval);
await Promise.all(cullable.map(cls => svc.deleteExpired(cls)));

@@ -49,0 +47,0 @@ }

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