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

@upstash/ratelimit

Package Overview
Dependencies
Maintainers
4
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@upstash/ratelimit - npm Package Compare versions

Comparing version 0.0.0-ci.52a5fbcfa0b49f2962134fd1c1d3cc0c8ec88f8b-20241024094850 to 0.0.0-ci.5ff4e37f0af011c23ea15c5e0dc6796baffe23cb-20241203074657

28

dist/index.d.ts
import { Aggregate } from '@upstash/core-analytics';
import { Redis as Redis$1 } from '@upstash/redis';
import { Redis as Redis$2 } from '@upstash/redis';

@@ -21,3 +21,3 @@ /**

type RegionContext = {
redis: Redis;
redis: Redis$1;
cache?: EphemeralCache;

@@ -102,14 +102,3 @@ };

};
/**
* This is all we need from the redis sdk.
*/
type Redis = {
sadd: Redis$1["sadd"];
hset: Redis$1["hset"];
eval: Redis$1["eval"];
evalsha: Redis$1["evalsha"];
scriptLoad: Redis$1["scriptLoad"];
smismember: Redis$1["smismember"];
multi: Redis$1["multi"];
};
type Redis$1 = Redis$2;

@@ -134,3 +123,3 @@ type Geo = {

type AnalyticsConfig = {
redis: Redis;
redis: Redis$1;
prefix?: string;

@@ -262,3 +251,3 @@ };

protected readonly timeout: number;
protected readonly primaryRedis: Redis;
protected readonly primaryRedis: Redis$1;
protected readonly analytics?: Analytics;

@@ -388,3 +377,3 @@ protected readonly enableProtection: boolean;

*/
redis: Redis[];
redis: Redis$1[];
/**

@@ -516,2 +505,3 @@ * The ratelimiter function to use.

type Redis = Omit<Redis$1, "multi">;
type RegionRatelimitConfig = {

@@ -749,3 +739,3 @@ /**

*/
declare const updateIpDenyList: (redis: Redis, prefix: string, threshold: number, ttl?: number) => Promise<unknown[]>;
declare const updateIpDenyList: (redis: Redis$1, prefix: string, threshold: number, ttl?: number) => Promise<unknown[]>;
/**

@@ -760,3 +750,3 @@ * Disables the ip deny list by removing the ip deny list from the all

*/
declare const disableIpDenyList: (redis: Redis, prefix: string) => Promise<unknown[]>;
declare const disableIpDenyList: (redis: Redis$1, prefix: string) => Promise<unknown[]>;

@@ -763,0 +753,0 @@ type ipDenyList_ThresholdError = ThresholdError;

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

const members = [identifier, req?.ip, req?.userAgent, req?.country];
return members.filter((item) => Boolean(item));
return members.filter(Boolean);
};

@@ -931,0 +931,0 @@ };

@@ -1,1 +0,1 @@

{ "name": "@upstash/ratelimit", "version": "v0.0.0-ci.52a5fbcfa0b49f2962134fd1c1d3cc0c8ec88f8b-20241024094850", "main": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ "dist" ], "scripts": { "build": "tsup", "test": "bun test src --coverage", "fmt": "prettier --write .", "lint": "eslint \"src/**/*.{js,ts,tsx}\" --quiet --fix" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^8.4.0", "@upstash/redis": "^1.34.3", "bun-types": "latest", "eslint": "^9.10.0", "eslint-plugin-unicorn": "^55.0.0", "tsup": "^7.2.0", "turbo": "^1.10.15", "typescript": "^5.0.0" }, "license": "MIT", "dependencies": { "@upstash/core-analytics": "^0.0.10" } }
{ "name": "@upstash/ratelimit", "version": "v0.0.0-ci.5ff4e37f0af011c23ea15c5e0dc6796baffe23cb-20241203074657", "main": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ "dist" ], "scripts": { "build": "tsup", "test": "bun test src --coverage", "fmt": "prettier --write .", "lint": "eslint \"src/**/*.{js,ts,tsx}\" --quiet --fix" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^8.4.0", "bun-types": "latest", "eslint": "^9.10.0", "eslint-plugin-unicorn": "^55.0.0", "tsup": "^7.2.0", "turbo": "^1.10.15", "typescript": "^5.0.0" }, "peerDependencies": { "@upstash/redis": "^1.34.3" }, "license": "MIT", "dependencies": { "@upstash/core-analytics": "^0.0.10" } }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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