@aws-sdk/util-endpoints
Advanced tools
Comparing version 3.159.0 to 3.160.0
@@ -6,2 +6,10 @@ # Change Log | ||
# [3.160.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.159.0...v3.160.0) (2022-08-29) | ||
**Note:** Version bump only for package @aws-sdk/util-endpoints | ||
# [3.159.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.158.0...v3.159.0) (2022-08-26) | ||
@@ -8,0 +16,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./EndpointError"), exports); | ||
tslib_1.__exportStar(require("./resolveEndpoint"), exports); | ||
tslib_1.__exportStar(require("./types"), exports); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getAttr = void 0; | ||
const EndpointError_1 = require("../EndpointError"); | ||
const types_1 = require("../types"); | ||
const getAttrPathList_1 = require("./getAttrPathList"); | ||
const getAttr = (value, path) => (0, getAttrPathList_1.getAttrPathList)(path).reduce((acc, index) => { | ||
if (typeof acc !== "object") { | ||
throw new EndpointError_1.EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); | ||
throw new types_1.EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); | ||
} | ||
@@ -10,0 +10,0 @@ else if (Array.isArray(acc)) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getAttrPathList = void 0; | ||
const __1 = require("../"); | ||
const types_1 = require("../types"); | ||
const getAttrPathList = (path) => { | ||
@@ -12,7 +12,7 @@ const parts = path.split("."); | ||
if (part.indexOf("]") !== part.length - 1) { | ||
throw new __1.EndpointError(`Path: '${path}' does not end with ']'`); | ||
throw new types_1.EndpointError(`Path: '${path}' does not end with ']'`); | ||
} | ||
const arrayIndex = part.slice(squareBracketIndex + 1, -1); | ||
if (Number.isNaN(parseInt(arrayIndex))) { | ||
throw new __1.EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`); | ||
throw new types_1.EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`); | ||
} | ||
@@ -19,0 +19,0 @@ if (squareBracketIndex !== 0) { |
@@ -1,1 +0,2 @@ | ||
export * from "./EndpointError"; | ||
export * from "./resolveEndpoint"; | ||
export * from "./types"; |
@@ -1,2 +0,2 @@ | ||
import { EndpointError } from "../EndpointError"; | ||
import { EndpointError } from "../types"; | ||
import { getAttrPathList } from "./getAttrPathList"; | ||
@@ -3,0 +3,0 @@ export var getAttr = function (value, path) { |
import { __values } from "tslib"; | ||
import { EndpointError } from "../"; | ||
import { EndpointError } from "../types"; | ||
export var getAttrPathList = function (path) { | ||
@@ -4,0 +4,0 @@ var e_1, _a; |
@@ -1,1 +0,2 @@ | ||
export * from "./EndpointError"; | ||
export * from "./resolveEndpoint"; | ||
export * from "./types"; |
@@ -1,1 +0,2 @@ | ||
export * from "./EndpointError"; | ||
export * from "./resolveEndpoint"; | ||
export * from "./types"; |
{ | ||
"name": "@aws-sdk/util-endpoints", | ||
"version": "3.159.0", | ||
"version": "3.160.0", | ||
"description": "Utilities to help with endpoint resolution", | ||
@@ -23,3 +23,3 @@ "main": "./dist-cjs/index.js", | ||
"dependencies": { | ||
"@aws-sdk/types": "3.159.0", | ||
"@aws-sdk/types": "3.160.0", | ||
"tslib": "^2.3.1" | ||
@@ -26,0 +26,0 @@ }, |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
69669
144
1292
2
+ Added@aws-sdk/types@3.160.0(transitive)
- Removed@aws-sdk/types@3.159.0(transitive)
Updated@aws-sdk/types@3.160.0