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

@directus/errors

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@directus/errors - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

12

dist/index.d.ts

@@ -28,4 +28,6 @@ import { Range } from '@directus/storage';

InvalidToken = "INVALID_TOKEN",
LimitExceeded = "LIMIT_EXCEEDED",
MethodNotAllowed = "METHOD_NOT_ALLOWED",
NotNullViolation = "NOT_NULL_VIOLATION",
OutOfDate = "OUT_OF_DATE",
RangeNotSatisfiable = "RANGE_NOT_SATISFIABLE",

@@ -90,4 +92,2 @@ RecordNotUnique = "RECORD_NOT_UNIQUE",

declare const InvalidProviderError: DirectusErrorConstructor<void>;
interface InvalidProviderConfigErrorExtensions {

@@ -99,2 +99,4 @@ provider: string;

declare const InvalidProviderError: DirectusErrorConstructor<void>;
interface InvalidQueryErrorExtensions {

@@ -107,2 +109,4 @@ reason: string;

declare const LimitExceededError: DirectusErrorConstructor<void>;
interface MethodNotAllowedErrorExtensions {

@@ -120,2 +124,4 @@ allowed: string[];

declare const OutOfDateError: DirectusErrorConstructor<void>;
interface RangeNotSatisfiableErrorExtensions {

@@ -172,2 +178,2 @@ range: Range;

export { ContainsNullValuesError, ContentTooLargeError, type DirectusError, type DirectusErrorConstructor, ErrorCode, ForbiddenError, HitRateLimitError, IllegalAssetTransformationError, InvalidCredentialsError, InvalidForeignKeyError, InvalidIpError, InvalidOtpError, InvalidPayloadError, InvalidProviderConfigError, InvalidProviderError, InvalidQueryError, InvalidTokenError, MethodNotAllowedError, NotNullViolationError, RangeNotSatisfiableError, RecordNotUniqueError, RouteNotFoundError, ServiceUnavailableError, TokenExpiredError, UnexpectedResponseError, UnprocessableContentError, UnsupportedMediaTypeError, UserSuspendedError, ValueOutOfRangeError, ValueTooLongError, createError, isDirectusError };
export { ContainsNullValuesError, ContentTooLargeError, type DirectusError, type DirectusErrorConstructor, ErrorCode, ForbiddenError, HitRateLimitError, IllegalAssetTransformationError, InvalidCredentialsError, InvalidForeignKeyError, InvalidIpError, InvalidOtpError, InvalidPayloadError, InvalidProviderConfigError, InvalidProviderError, InvalidQueryError, InvalidTokenError, LimitExceededError, MethodNotAllowedError, NotNullViolationError, OutOfDateError, RangeNotSatisfiableError, RecordNotUniqueError, RouteNotFoundError, ServiceUnavailableError, TokenExpiredError, UnexpectedResponseError, UnprocessableContentError, UnsupportedMediaTypeError, UserSuspendedError, ValueOutOfRangeError, ValueTooLongError, createError, isDirectusError };

@@ -34,4 +34,6 @@ // src/create-error.ts

ErrorCode2["InvalidToken"] = "INVALID_TOKEN";
ErrorCode2["LimitExceeded"] = "LIMIT_EXCEEDED";
ErrorCode2["MethodNotAllowed"] = "METHOD_NOT_ALLOWED";
ErrorCode2["NotNullViolation"] = "NOT_NULL_VIOLATION";
ErrorCode2["OutOfDate"] = "OUT_OF_DATE";
ErrorCode2["RangeNotSatisfiable"] = "RANGE_NOT_SATISFIABLE";

@@ -129,5 +131,2 @@ ErrorCode2["RecordNotUnique"] = "RECORD_NOT_UNIQUE";

// src/errors/invalid-provider.ts
var InvalidProviderError = createError("INVALID_PROVIDER" /* InvalidProvider */, "Invalid provider.", 403);
// src/errors/invalid-provider-config.ts

@@ -140,2 +139,5 @@ var InvalidProviderConfigError = createError(

// src/errors/invalid-provider.ts
var InvalidProviderError = createError("INVALID_PROVIDER" /* InvalidProvider */, "Invalid provider.", 403);
// src/errors/invalid-query.ts

@@ -152,2 +154,5 @@ var messageConstructor5 = ({ reason }) => `Invalid query. ${reason}.`;

// src/errors/limit-exceeded.ts
var LimitExceededError = createError("LIMIT_EXCEEDED" /* LimitExceeded */, "Limit exceeded.", 403);
// src/errors/method-not-allowed.ts

@@ -179,2 +184,9 @@ var messageConstructor6 = (extensions) => `Invalid method "${extensions.current}" used. Should be one of ${extensions.allowed.map((method) => `"${method}"`).join(", ")}.`;

// src/errors/out-of-date.ts
var OutOfDateError = createError(
"OUT_OF_DATE" /* OutOfDate */,
"Operation could not be executed: Your current instance of Directus is out of date.",
503
);
// src/errors/range-not-satisfiable.ts

@@ -301,4 +313,6 @@ var messageConstructor8 = ({ range }) => {

InvalidTokenError,
LimitExceededError,
MethodNotAllowedError,
NotNullViolationError,
OutOfDateError,
RangeNotSatisfiableError,

@@ -305,0 +319,0 @@ RecordNotUniqueError,

{
"name": "@directus/errors",
"version": "0.2.3",
"version": "0.2.4",
"description": "Create consistent error objects around the codebase",

@@ -25,12 +25,12 @@ "repository": {

"ms": "2.1.3",
"@directus/storage": "10.0.10"
"@directus/storage": "10.0.11"
},
"devDependencies": {
"@types/ms": "0.7.34",
"@vitest/coverage-v8": "1.2.2",
"@vitest/coverage-v8": "1.3.1",
"tsup": "8.0.2",
"typescript": "5.3.3",
"vitest": "1.2.2",
"@directus/tsconfig": "1.0.1",
"@directus/random": "0.2.6"
"vitest": "1.3.1",
"@directus/random": "0.2.7",
"@directus/tsconfig": "1.0.1"
},

@@ -37,0 +37,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