@sap-cloud-sdk/util
Advanced tools
Comparing version 3.18.2-20240820013943.0 to 3.18.2-20240821013909.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.filterDuplicatesRight = exports.filterDuplicates = exports.partition = exports.zip = exports.flatten = exports.transformVariadicArgumentToArray = exports.splitInChunks = exports.first = exports.last = exports.unique = exports.flat = void 0; | ||
exports.flatten = void 0; | ||
exports.flat = flat; | ||
exports.unique = unique; | ||
exports.last = last; | ||
exports.first = first; | ||
exports.splitInChunks = splitInChunks; | ||
exports.transformVariadicArgumentToArray = transformVariadicArgumentToArray; | ||
exports.zip = zip; | ||
exports.partition = partition; | ||
exports.filterDuplicates = filterDuplicates; | ||
exports.filterDuplicatesRight = filterDuplicatesRight; | ||
/** | ||
@@ -12,3 +22,2 @@ * Flatten a two dimensional array into a one dimensional array. | ||
} | ||
exports.flat = flat; | ||
/** | ||
@@ -22,3 +31,2 @@ * Remove all duplicates from an array. | ||
} | ||
exports.unique = unique; | ||
/** | ||
@@ -32,3 +40,2 @@ * Get the last item from an array. Returns `undefined`, if the array is empty. | ||
} | ||
exports.last = last; | ||
/** | ||
@@ -42,3 +49,2 @@ * Get the first item from an array. Returns `undefined`, if the array is empty. | ||
} | ||
exports.first = first; | ||
/** | ||
@@ -59,3 +65,2 @@ * Split the given array in chunks. | ||
} | ||
exports.splitInChunks = splitInChunks; | ||
/** | ||
@@ -82,3 +87,2 @@ * We want to provide methods which accept a variable single number of elements and arrays. | ||
} | ||
exports.transformVariadicArgumentToArray = transformVariadicArgumentToArray; | ||
/** | ||
@@ -125,3 +129,2 @@ * Flattens a array: [1,[2,[3,4]],5] will become [1,2,3,4,5]. | ||
} | ||
exports.zip = zip; | ||
/** | ||
@@ -138,3 +141,2 @@ * Split an array into two based on a condition. | ||
} | ||
exports.partition = partition; | ||
/** | ||
@@ -149,3 +151,2 @@ * Filter an array by removing duplicates and keeping the left most occurrence. By default this compares by identity. | ||
} | ||
exports.filterDuplicates = filterDuplicates; | ||
/** | ||
@@ -160,3 +161,2 @@ * Filter an array by removing duplicates and keeping the right most occurrence. By default this compares by identity. | ||
} | ||
exports.filterDuplicatesRight = filterDuplicatesRight; | ||
//# sourceMappingURL=array.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.codeBlock = void 0; | ||
exports.codeBlock = codeBlock; | ||
const string_formatter_1 = require("./string-formatter"); | ||
@@ -35,3 +35,2 @@ const array_1 = require("./array"); | ||
} | ||
exports.codeBlock = codeBlock; | ||
function trimRightNewlines(string) { | ||
@@ -38,0 +37,0 @@ let subStrings = string.split(string_formatter_1.unixEOL); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.documentationBlock = void 0; | ||
exports.documentationBlock = documentationBlock; | ||
const array_1 = require("./array"); | ||
@@ -37,3 +37,2 @@ const logger_1 = require("./logger"); | ||
} | ||
exports.documentationBlock = documentationBlock; | ||
/* | ||
@@ -40,0 +39,0 @@ New lines at the beginning are mainly unintentional when you make documentationBlock` |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.equalArrays = exports.equal = exports.equalObjects = void 0; | ||
exports.equalObjects = equalObjects; | ||
exports.equal = equal; | ||
exports.equalArrays = equalArrays; | ||
const nullish_1 = require("./nullish"); | ||
@@ -16,3 +18,2 @@ /** | ||
} | ||
exports.equalObjects = equalObjects; | ||
/** | ||
@@ -39,3 +40,2 @@ * Checks whether the two items contain the same content. | ||
} | ||
exports.equal = equal; | ||
/** | ||
@@ -51,3 +51,2 @@ * Checks whether the elements of two arrays are the same with the same order. | ||
} | ||
exports.equalArrays = equalArrays; | ||
//# sourceMappingURL=equal.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isErrorWithCause = exports.ErrorWithCause = void 0; | ||
exports.ErrorWithCause = void 0; | ||
exports.isErrorWithCause = isErrorWithCause; | ||
const string_formatter_1 = require("./string-formatter"); | ||
@@ -55,3 +56,2 @@ /** | ||
} | ||
exports.isErrorWithCause = isErrorWithCause; | ||
//# sourceMappingURL=error-with-cause.js.map |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { PathLike } from 'fs'; | ||
@@ -3,0 +2,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.readJSON = exports.findProjectRoot = void 0; | ||
exports.findProjectRoot = findProjectRoot; | ||
exports.readJSON = readJSON; | ||
const fs_1 = require("fs"); | ||
@@ -26,3 +27,2 @@ const path_1 = require("path"); | ||
} | ||
exports.findProjectRoot = findProjectRoot; | ||
/** | ||
@@ -40,3 +40,2 @@ * Read a JSON file from the file system. | ||
} | ||
exports.readJSON = readJSON; | ||
//# sourceMappingURL=fs.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resetCustomLogFormats = exports.resetCustomLogLevels = exports.sanitizeRecord = exports.getGlobalLogFormat = exports.setGlobalLogFormat = exports.setLogFormat = exports.setGlobalTransports = exports.getGlobalLogLevel = exports.setGlobalLogLevel = exports.setLogLevel = exports.getLogger = exports.createLogger = exports.enableExceptionLogger = exports.disableExceptionLogger = exports.cloudSdkExceptionLogger = exports.unmuteLoggers = exports.muteLoggers = exports.logFormat = void 0; | ||
exports.cloudSdkExceptionLogger = exports.logFormat = void 0; | ||
exports.muteLoggers = muteLoggers; | ||
exports.unmuteLoggers = unmuteLoggers; | ||
exports.disableExceptionLogger = disableExceptionLogger; | ||
exports.enableExceptionLogger = enableExceptionLogger; | ||
exports.createLogger = createLogger; | ||
exports.getLogger = getLogger; | ||
exports.setLogLevel = setLogLevel; | ||
exports.setGlobalLogLevel = setGlobalLogLevel; | ||
exports.getGlobalLogLevel = getGlobalLogLevel; | ||
exports.setGlobalTransports = setGlobalTransports; | ||
exports.setLogFormat = setLogFormat; | ||
exports.setGlobalLogFormat = setGlobalLogFormat; | ||
exports.getGlobalLogFormat = getGlobalLogFormat; | ||
exports.sanitizeRecord = sanitizeRecord; | ||
exports.resetCustomLogLevels = resetCustomLogLevels; | ||
exports.resetCustomLogFormats = resetCustomLogFormats; | ||
const winston_1 = require("winston"); | ||
@@ -41,3 +57,2 @@ const format_1 = require("./format"); | ||
} | ||
exports.muteLoggers = muteLoggers; | ||
/** | ||
@@ -49,3 +64,2 @@ * Unmute all logger output created by the SAP Cloud SDK Logger. This also applies to future loggers created. Useful for tests. | ||
} | ||
exports.unmuteLoggers = unmuteLoggers; | ||
/** | ||
@@ -65,3 +79,2 @@ * Default logger for the SAP Cloud SDK for unhandled exceptions. | ||
} | ||
exports.disableExceptionLogger = disableExceptionLogger; | ||
/** | ||
@@ -75,3 +88,2 @@ * Enable logging of exceptions. Enabled by default. | ||
} | ||
exports.enableExceptionLogger = enableExceptionLogger; | ||
/** | ||
@@ -126,3 +138,2 @@ * Create a logger for the given message context, if available. | ||
} | ||
exports.createLogger = createLogger; | ||
/** | ||
@@ -138,3 +149,2 @@ * Get logger for a given message context, if available. | ||
} | ||
exports.getLogger = getLogger; | ||
/** | ||
@@ -162,3 +172,2 @@ * Change the log level of a logger based on its message context. | ||
} | ||
exports.setLogLevel = setLogLevel; | ||
/** | ||
@@ -176,3 +185,2 @@ * Change the global log level of the container which will set default level for all active loggers. | ||
} | ||
exports.setGlobalLogLevel = setGlobalLogLevel; | ||
/** | ||
@@ -185,3 +193,2 @@ * Get the global log level of the container. | ||
} | ||
exports.getGlobalLogLevel = getGlobalLogLevel; | ||
/** | ||
@@ -201,3 +208,2 @@ * Change the global transport of the container which will set default transport for all active loggers. | ||
} | ||
exports.setGlobalTransports = setGlobalTransports; | ||
/** | ||
@@ -225,3 +231,2 @@ * Change the log format of a logger based on its message context. | ||
} | ||
exports.setLogFormat = setLogFormat; | ||
/** | ||
@@ -239,3 +244,2 @@ * Change the global log format of the container which will set default format for all active loggers. | ||
} | ||
exports.setGlobalLogFormat = setGlobalLogFormat; | ||
/** | ||
@@ -248,3 +252,2 @@ * Get the global log format of the container. | ||
} | ||
exports.getGlobalLogFormat = getGlobalLogFormat; | ||
const defaultSensitiveKeys = [ | ||
@@ -292,3 +295,2 @@ 'access_token', | ||
} | ||
exports.sanitizeRecord = sanitizeRecord; | ||
function getMessageContext(logger) { | ||
@@ -309,3 +311,2 @@ // This is a workaround for the missing defaultMeta property on the winston logger. | ||
} | ||
exports.resetCustomLogLevels = resetCustomLogLevels; | ||
/** | ||
@@ -317,3 +318,2 @@ * Reset all the custom log formats for loggers and message context. | ||
} | ||
exports.resetCustomLogFormats = resetCustomLogFormats; | ||
//# sourceMappingURL=cloud-sdk-logger.js.map |
@@ -6,3 +6,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getMessageOrStack = exports.local = void 0; | ||
exports.local = void 0; | ||
exports.getMessageOrStack = getMessageOrStack; | ||
const chalk_1 = __importDefault(require("chalk")); | ||
@@ -37,3 +38,2 @@ const winston_1 = require("winston"); | ||
} | ||
exports.getMessageOrStack = getMessageOrStack; | ||
function localTransformer(info) { | ||
@@ -40,0 +40,0 @@ return { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isNullish = void 0; | ||
exports.isNullish = isNullish; | ||
/** | ||
@@ -12,3 +12,2 @@ * Checks whether a value is either `null` or `undefined`. | ||
} | ||
exports.isNullish = isNullish; | ||
//# sourceMappingURL=nullish.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.mergeIgnoreCase = exports.mergeLeftIgnoreCase = exports.pickNonNullish = exports.pickValueIgnoreCase = exports.pickIgnoreCase = exports.toSanitizedObject = exports.assoc = exports.exclude = exports.pick = exports.renameKeys = exports.propertyExists = void 0; | ||
exports.assoc = exports.exclude = exports.pick = exports.renameKeys = void 0; | ||
exports.propertyExists = propertyExists; | ||
exports.toSanitizedObject = toSanitizedObject; | ||
exports.pickIgnoreCase = pickIgnoreCase; | ||
exports.pickValueIgnoreCase = pickValueIgnoreCase; | ||
exports.pickNonNullish = pickNonNullish; | ||
exports.mergeLeftIgnoreCase = mergeLeftIgnoreCase; | ||
exports.mergeIgnoreCase = mergeIgnoreCase; | ||
const nullish_1 = require("./nullish"); | ||
@@ -20,3 +27,2 @@ /** | ||
} | ||
exports.propertyExists = propertyExists; | ||
/** | ||
@@ -96,3 +102,2 @@ * Takes an object and returns a new object whose keys are renamed according to the provided key mapping. | ||
} | ||
exports.toSanitizedObject = toSanitizedObject; | ||
/** | ||
@@ -114,3 +119,2 @@ * Create a shallow copy of the given object, that contains the given keys, independent of casing. | ||
} | ||
exports.pickIgnoreCase = pickIgnoreCase; | ||
/** | ||
@@ -125,3 +129,2 @@ * Returns the value of an object based on the given key, independent of casing. | ||
} | ||
exports.pickValueIgnoreCase = pickValueIgnoreCase; | ||
/** | ||
@@ -137,3 +140,2 @@ * Create a shallow copy of the given object, that contains all entries with non-nullish values. | ||
} | ||
exports.pickNonNullish = pickNonNullish; | ||
/** | ||
@@ -152,3 +154,2 @@ * Create an object by merging the `right` object into a shallow copy of the `left` object ignoring casing, but keeping the `right` casing. Only keys present in the `left` object will be present in the merged object. | ||
} | ||
exports.mergeLeftIgnoreCase = mergeLeftIgnoreCase; | ||
/** | ||
@@ -166,3 +167,2 @@ * Create an object by merging the `right` object into a shallow copy of the `left` object ignoring casing, but keeping the right casing. Keys present both objects will be present in the merged object. | ||
} | ||
exports.mergeIgnoreCase = mergeIgnoreCase; | ||
//# sourceMappingURL=object.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.identity = void 0; | ||
exports.identity = identity; | ||
/** | ||
@@ -12,3 +12,2 @@ * Identity function. | ||
} | ||
exports.identity = identity; | ||
//# sourceMappingURL=pipe.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.finishAll = void 0; | ||
exports.finishAll = finishAll; | ||
/** | ||
@@ -22,3 +22,2 @@ * Await all promises and resolve if non of them failed. | ||
} | ||
exports.finishAll = finishAll; | ||
//# sourceMappingURL=promise.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.removeLeadingSlashes = exports.removeTrailingSlashes = exports.removeSlashes = void 0; | ||
exports.removeSlashes = removeSlashes; | ||
exports.removeTrailingSlashes = removeTrailingSlashes; | ||
exports.removeLeadingSlashes = removeLeadingSlashes; | ||
/** | ||
@@ -12,3 +14,2 @@ * @internal | ||
} | ||
exports.removeSlashes = removeSlashes; | ||
/** | ||
@@ -20,3 +21,2 @@ * @internal | ||
} | ||
exports.removeTrailingSlashes = removeTrailingSlashes; | ||
/** | ||
@@ -28,3 +28,2 @@ * @internal | ||
} | ||
exports.removeLeadingSlashes = removeLeadingSlashes; | ||
//# sourceMappingURL=remove-slashes.js.map |
@@ -6,3 +6,9 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.formatJson = exports.kebabCase = exports.pascalCase = exports.titleFormat = exports.camelCase = exports.upperCaseSnakeCase = exports.webEOL = exports.unixEOL = void 0; | ||
exports.webEOL = exports.unixEOL = void 0; | ||
exports.upperCaseSnakeCase = upperCaseSnakeCase; | ||
exports.camelCase = camelCase; | ||
exports.titleFormat = titleFormat; | ||
exports.pascalCase = pascalCase; | ||
exports.kebabCase = kebabCase; | ||
exports.formatJson = formatJson; | ||
const voca_1 = __importDefault(require("voca")); | ||
@@ -27,3 +33,2 @@ /** | ||
} | ||
exports.upperCaseSnakeCase = upperCaseSnakeCase; | ||
/** | ||
@@ -37,3 +42,2 @@ * Convert a string to camelCase. This format used e.g. for properties on entity class instances. | ||
} | ||
exports.camelCase = camelCase; | ||
/** | ||
@@ -47,3 +51,2 @@ * Convert a string to a human readable format, e.g. it transforms `to_BusinessPartner` to `To Business Partner`. | ||
} | ||
exports.titleFormat = titleFormat; | ||
/** | ||
@@ -60,3 +63,2 @@ * Convert a string to pascal case. This format is used e.g. for types. | ||
} | ||
exports.pascalCase = pascalCase; | ||
/** | ||
@@ -70,3 +72,2 @@ * Convert a string to kebab case. This format is used e.g. for file names. | ||
} | ||
exports.kebabCase = kebabCase; | ||
/** | ||
@@ -80,3 +81,2 @@ * Convert a JSON object to a string using formatting in line with the prettier with indentation and new line at the end. | ||
} | ||
exports.formatJson = formatJson; | ||
//# sourceMappingURL=string-formatter.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.removeFileExtension = exports.trim = exports.trimRight = exports.trimLeft = exports.encodeBase64 = void 0; | ||
exports.encodeBase64 = encodeBase64; | ||
exports.trimLeft = trimLeft; | ||
exports.trimRight = trimRight; | ||
exports.trim = trim; | ||
exports.removeFileExtension = removeFileExtension; | ||
const string_formatter_1 = require("./string-formatter"); | ||
@@ -13,3 +17,2 @@ /** | ||
} | ||
exports.encodeBase64 = encodeBase64; | ||
/** | ||
@@ -31,3 +34,2 @@ * Remove whitespace from the left side of a string. | ||
} | ||
exports.trimLeft = trimLeft; | ||
/** | ||
@@ -49,3 +51,2 @@ * Remove whitespace from the right side of a string. | ||
} | ||
exports.trimRight = trimRight; | ||
/** | ||
@@ -59,3 +60,2 @@ * Remove whitespace from the left and right side of a string. | ||
} | ||
exports.trim = trim; | ||
/** | ||
@@ -71,3 +71,2 @@ * Remove file extension from a string, e.g. remove 'test.jpg' would return 'test'. | ||
} | ||
exports.removeFileExtension = removeFileExtension; | ||
//# sourceMappingURL=string.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.caps = void 0; | ||
exports.caps = caps; | ||
/** | ||
@@ -12,3 +12,2 @@ * Returns the OData version in capital letters so V2 or V4. | ||
} | ||
exports.caps = caps; | ||
//# sourceMappingURL=types.js.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.checkUrlExists = void 0; | ||
exports.checkUrlExists = checkUrlExists; | ||
const axios_1 = __importDefault(require("axios")); | ||
@@ -19,3 +19,2 @@ /** | ||
} | ||
exports.checkUrlExists = checkUrlExists; | ||
//# sourceMappingURL=url.js.map |
{ | ||
"name": "@sap-cloud-sdk/util", | ||
"version": "3.18.2-20240820013943.0", | ||
"version": "3.18.2-20240821013909.0", | ||
"description": "SAP Cloud SDK for JavaScript general utilities", | ||
@@ -46,5 +46,5 @@ "homepage": "https://sap.github.io/cloud-sdk/docs/js/overview", | ||
"nock": "^14.0.0-beta.6", | ||
"typescript": "~5.4.5", | ||
"typescript": "~5.5.4", | ||
"mock-fs": "^5.2.0" | ||
} | ||
} |
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
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
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
124413
2024