Socket
Socket
Sign inDemoInstall

@lokalise/node-core

Package Overview
Dependencies
Maintainers
0
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lokalise/node-core - npm Package Compare versions

Comparing version 12.0.0 to 12.0.1-test-realms

dist/src/errors/InternalError2.d.ts

6

dist/index.d.ts
export type { ErrorDetails } from './src/errors/types';
export { PublicNonRecoverableError, type PublicNonRecoverableErrorParams, } from './src/errors/PublicNonRecoverableError';
export { InternalError, type InternalErrorParams, } from './src/errors/InternalError';
export { PublicNonRecoverableError, isPublicNonRecoverableError, type PublicNonRecoverableErrorParams, } from './src/errors/PublicNonRecoverableError';
export { InternalError, isInternalError, type InternalErrorParams, } from './src/errors/InternalError';
export { isEntityGoneError } from './src/errors/errorTypeGuards';

@@ -13,3 +13,3 @@ export { ConfigScope } from './src/config/ConfigScope';

export { groupBy, groupByPath, groupByUnique, pick, pickWithoutUndefined, copyWithoutUndefined, copyWithoutEmpty, isEmptyObject, convertDateFieldsToIsoString, deepClone, } from './src/utils/objectUtils';
export { isError, isInternalError, isStandardizedError, isObject, isPublicNonRecoverableError, hasMessage, } from './src/utils/typeUtils';
export { isError, isStandardizedError, isObject, hasMessage, } from './src/utils/typeUtils';
export { type StandardizedError } from './src/utils/typeUtils';

@@ -16,0 +16,0 @@ export { generateHash, HashAlgorithm, HashEncoding } from './src/utils/hashUtils';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateChecksumForBufferOrString = exports.generateChecksumForObject = exports.generateChecksumForReadable = exports.waitAndRetry = exports.AuthFailedError = exports.EntityGoneError = exports.EntityNotFoundError = exports.AccessDeniedError = exports.RequestValidationError = exports.resolveGlobalErrorLogObject = exports.globalLogger = exports.executeSettleAllAndHandleGlobalErrors = exports.executeAndHandleGlobalErrors = exports.executeAsyncAndHandleGlobalErrors = exports.resolveMonorepoLoggerConfiguration = exports.resolveLoggerConfiguration = exports.HashEncoding = exports.HashAlgorithm = exports.generateHash = exports.hasMessage = exports.isPublicNonRecoverableError = exports.isObject = exports.isStandardizedError = exports.isInternalError = exports.isError = exports.deepClone = exports.convertDateFieldsToIsoString = exports.isEmptyObject = exports.copyWithoutEmpty = exports.copyWithoutUndefined = exports.pickWithoutUndefined = exports.pick = exports.groupByUnique = exports.groupByPath = exports.groupBy = exports.removeNullish = exports.removeFalsy = exports.callChunked = exports.chunk = exports.EncryptionUtility = exports.isFailure = exports.isSuccess = exports.failure = exports.success = exports.createRangeValidator = exports.ensureClosingSlashTransformer = exports.ConfigScope = exports.isEntityGoneError = exports.InternalError = exports.PublicNonRecoverableError = void 0;
exports.generateChecksumForBufferOrString = exports.generateChecksumForObject = exports.generateChecksumForReadable = exports.waitAndRetry = exports.AuthFailedError = exports.EntityGoneError = exports.EntityNotFoundError = exports.AccessDeniedError = exports.RequestValidationError = exports.resolveGlobalErrorLogObject = exports.globalLogger = exports.executeSettleAllAndHandleGlobalErrors = exports.executeAndHandleGlobalErrors = exports.executeAsyncAndHandleGlobalErrors = exports.resolveMonorepoLoggerConfiguration = exports.resolveLoggerConfiguration = exports.HashEncoding = exports.HashAlgorithm = exports.generateHash = exports.hasMessage = exports.isObject = exports.isStandardizedError = exports.isError = exports.deepClone = exports.convertDateFieldsToIsoString = exports.isEmptyObject = exports.copyWithoutEmpty = exports.copyWithoutUndefined = exports.pickWithoutUndefined = exports.pick = exports.groupByUnique = exports.groupByPath = exports.groupBy = exports.removeNullish = exports.removeFalsy = exports.callChunked = exports.chunk = exports.EncryptionUtility = exports.isFailure = exports.isSuccess = exports.failure = exports.success = exports.createRangeValidator = exports.ensureClosingSlashTransformer = exports.ConfigScope = exports.isEntityGoneError = exports.isInternalError = exports.InternalError = exports.isPublicNonRecoverableError = exports.PublicNonRecoverableError = void 0;
exports.FsReadableProvider = void 0;
var PublicNonRecoverableError_1 = require("./src/errors/PublicNonRecoverableError");
Object.defineProperty(exports, "PublicNonRecoverableError", { enumerable: true, get: function () { return PublicNonRecoverableError_1.PublicNonRecoverableError; } });
Object.defineProperty(exports, "isPublicNonRecoverableError", { enumerable: true, get: function () { return PublicNonRecoverableError_1.isPublicNonRecoverableError; } });
var InternalError_1 = require("./src/errors/InternalError");
Object.defineProperty(exports, "InternalError", { enumerable: true, get: function () { return InternalError_1.InternalError; } });
Object.defineProperty(exports, "isInternalError", { enumerable: true, get: function () { return InternalError_1.isInternalError; } });
var errorTypeGuards_1 = require("./src/errors/errorTypeGuards");

@@ -42,6 +44,4 @@ Object.defineProperty(exports, "isEntityGoneError", { enumerable: true, get: function () { return errorTypeGuards_1.isEntityGoneError; } });

Object.defineProperty(exports, "isError", { enumerable: true, get: function () { return typeUtils_1.isError; } });
Object.defineProperty(exports, "isInternalError", { enumerable: true, get: function () { return typeUtils_1.isInternalError; } });
Object.defineProperty(exports, "isStandardizedError", { enumerable: true, get: function () { return typeUtils_1.isStandardizedError; } });
Object.defineProperty(exports, "isObject", { enumerable: true, get: function () { return typeUtils_1.isObject; } });
Object.defineProperty(exports, "isPublicNonRecoverableError", { enumerable: true, get: function () { return typeUtils_1.isPublicNonRecoverableError; } });
Object.defineProperty(exports, "hasMessage", { enumerable: true, get: function () { return typeUtils_1.hasMessage; } });

@@ -48,0 +48,0 @@ var hashUtils_1 = require("./src/utils/hashUtils");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isEntityGoneError = isEntityGoneError;
const typeUtils_1 = require("../utils/typeUtils");
const PublicNonRecoverableError_1 = require("../errors/PublicNonRecoverableError");
function isEntityGoneError(entity) {
return (0, typeUtils_1.isPublicNonRecoverableError)(entity) && entity.httpStatusCode === 410;
return (0, PublicNonRecoverableError_1.isPublicNonRecoverableError)(entity) && entity.httpStatusCode === 410;
}
//# sourceMappingURL=errorTypeGuards.js.map

@@ -8,3 +8,5 @@ import type { ErrorDetails } from './types';

};
declare const internalErrorSymbol: unique symbol;
export declare class InternalError<T = ErrorDetails> extends Error {
readonly [internalErrorSymbol] = true;
readonly details?: T;

@@ -14,1 +16,3 @@ readonly errorCode: string;

}
export declare function isInternalError(error: unknown): error is InternalError;
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InternalError = void 0;
exports.isInternalError = isInternalError;
const typeUtils_1 = require("../utils/typeUtils");
const INTERNAL_ERROR_SYMBOL_KEY = 'INTERNAL_ERROR_KEY';
const internalErrorSymbol = Symbol.for(INTERNAL_ERROR_SYMBOL_KEY);
class InternalError extends Error {
[internalErrorSymbol] = true;
details;

@@ -17,2 +22,6 @@ errorCode;

exports.InternalError = InternalError;
function isInternalError(error) {
// biome-ignore lint/suspicious/noExplicitAny: checking for existence of prop outside or Error interface
return (0, typeUtils_1.isError)(error) && error[Symbol.for(INTERNAL_ERROR_SYMBOL_KEY)] === true;
}
//# sourceMappingURL=InternalError.js.map

@@ -9,2 +9,3 @@ import type { ErrorDetails } from './types';

};
declare const publicNonRecoverableErrorSymbol: unique symbol;
/**

@@ -14,2 +15,3 @@ * This error is returned to the consumer of API

export declare class PublicNonRecoverableError<T = ErrorDetails> extends Error {
readonly [publicNonRecoverableErrorSymbol] = true;
readonly details?: T;

@@ -20,1 +22,3 @@ readonly errorCode: string;

}
export declare function isPublicNonRecoverableError(error: unknown): error is PublicNonRecoverableError;
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PublicNonRecoverableError = void 0;
exports.isPublicNonRecoverableError = isPublicNonRecoverableError;
const typeUtils_1 = require("../utils/typeUtils");
const PUBLIC_NON_RECOVERABLE_ERROR_SYMBOL_KEY = 'PUBLIC_NON_RECOVERABLE_ERROR_KEY';
const publicNonRecoverableErrorSymbol = Symbol.for(PUBLIC_NON_RECOVERABLE_ERROR_SYMBOL_KEY);
/**

@@ -8,2 +12,3 @@ * This error is returned to the consumer of API

class PublicNonRecoverableError extends Error {
[publicNonRecoverableErrorSymbol] = true;
details;

@@ -23,2 +28,7 @@ errorCode;

exports.PublicNonRecoverableError = PublicNonRecoverableError;
function isPublicNonRecoverableError(error) {
return (
// biome-ignore lint/suspicious/noExplicitAny: checking for existence of prop outside or Error interface
(0, typeUtils_1.isError)(error) && error[Symbol.for(PUBLIC_NON_RECOVERABLE_ERROR_SYMBOL_KEY)] === true);
}
//# sourceMappingURL=PublicNonRecoverableError.js.map

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

import type { InternalError } from '../errors/InternalError';
import type { PublicNonRecoverableError } from '../errors/PublicNonRecoverableError';
export type StandardizedError = {

@@ -12,4 +10,2 @@ code: string;

export declare function isStandardizedError(error: unknown): error is StandardizedError;
export declare function isInternalError(error: unknown): error is InternalError;
export declare function isError(maybeError: unknown): maybeError is Error;
export declare function isPublicNonRecoverableError(error: unknown): error is PublicNonRecoverableError;

@@ -6,5 +6,3 @@ "use strict";

exports.isStandardizedError = isStandardizedError;
exports.isInternalError = isInternalError;
exports.isError = isError;
exports.isPublicNonRecoverableError = isPublicNonRecoverableError;
function hasMessage(maybe) {

@@ -19,11 +17,5 @@ return isObject(maybe) && typeof maybe.message === 'string';

}
function isInternalError(error) {
return isObject(error) && error.name === 'InternalError';
}
function isError(maybeError) {
return (maybeError instanceof Error || Object.prototype.toString.call(maybeError) === '[object Error]');
}
function isPublicNonRecoverableError(error) {
return isObject(error) && error.name === 'PublicNonRecoverableError';
}
//# sourceMappingURL=typeUtils.js.map
{
"name": "@lokalise/node-core",
"version": "12.0.0",
"version": "12.0.1-test-realms",
"author": {

@@ -14,7 +14,3 @@ "name": "Lokalise",

"license": "Apache-2.0",
"files": [
"dist/**",
"LICENSE",
"README.md"
],
"files": ["dist/**", "LICENSE", "README.md"],
"main": "dist/index.js",

@@ -21,0 +17,0 @@ "types": "dist/index.d.ts",

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

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