@aws-sdk/util-endpoints
Advanced tools
Comparing version 3.168.0 to 3.170.0
@@ -6,2 +6,18 @@ # Change Log | ||
# [3.170.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.169.0...v3.170.0) (2022-09-13) | ||
### Bug Fixes | ||
* **util-endpoints:** call multi-level functions from callFunction ([#3929](https://github.com/aws/aws-sdk-js-v3/issues/3929)) ([1209cb1](https://github.com/aws/aws-sdk-js-v3/commit/1209cb1613891496b3e03e6a61ff87fc721d1ccf)) | ||
* **util-endpoints:** escape tilde when evaluating template ([#3934](https://github.com/aws/aws-sdk-js-v3/issues/3934)) ([5d7ef10](https://github.com/aws/aws-sdk-js-v3/commit/5d7ef10160456b7b872a1e7818dde7d73b4fb714)) | ||
* **util-endpoints:** export parseArn from lib/aws ([#3931](https://github.com/aws/aws-sdk-js-v3/issues/3931)) ([1cee1f4](https://github.com/aws/aws-sdk-js-v3/commit/1cee1f4e41d1a660b4fbb7e06eecc22f2a9a82db)) | ||
* **util-endpoints:** populate default params before checking for required values ([#3928](https://github.com/aws/aws-sdk-js-v3/issues/3928)) ([2561f60](https://github.com/aws/aws-sdk-js-v3/commit/2561f609f76b006bb39794a6cecfb6c0d68f9ef1)) | ||
* **util-endpoints:** return null in parseArn for some empty elements ([#3935](https://github.com/aws/aws-sdk-js-v3/issues/3935)) ([f8bc8b3](https://github.com/aws/aws-sdk-js-v3/commit/f8bc8b3da798cb0c4c4d6fb21e8e88c9109e649b)) | ||
* **util-endpoints:** skip evaluation for arg of type number ([#3936](https://github.com/aws/aws-sdk-js-v3/issues/3936)) ([aecd894](https://github.com/aws/aws-sdk-js-v3/commit/aecd89441ec92fc2be8cb4a3914ca7559e136d7d)) | ||
# [3.168.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.167.0...v3.168.0) (2022-09-09) | ||
@@ -8,0 +24,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./parseArn"), exports); | ||
tslib_1.__exportStar(require("./partition"), exports); |
@@ -6,5 +6,7 @@ "use strict"; | ||
const segments = value.split(":"); | ||
if (segments.length < 6 || segments[0] !== "arn") | ||
if (segments.length < 6) | ||
return null; | ||
const [, partition, service, region, accountId, ...resourceId] = segments; | ||
const [arn, partition, service, region, accountId, ...resourceId] = segments; | ||
if (arn !== "arn" || partition === "" || service === "" || resourceId[0] === "") | ||
return null; | ||
return { | ||
@@ -11,0 +13,0 @@ partition, |
@@ -36,2 +36,3 @@ "use strict"; | ||
path: pathname, | ||
normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, | ||
isIp, | ||
@@ -38,0 +39,0 @@ }; |
@@ -10,2 +10,10 @@ "use strict"; | ||
const { parameters, rules } = ruleSetObject; | ||
const paramsWithDefault = Object.entries(parameters) | ||
.filter(([, v]) => v.default != null) | ||
.map(([k, v]) => [k, v.default]); | ||
if (paramsWithDefault.length > 0) { | ||
for (const [paramKey, paramDefaultValue] of paramsWithDefault) { | ||
endpointParams[paramKey] = (_a = endpointParams[paramKey]) !== null && _a !== void 0 ? _a : paramDefaultValue; | ||
} | ||
} | ||
const requiredParams = Object.entries(parameters) | ||
@@ -19,12 +27,4 @@ .filter(([, v]) => v.required) | ||
} | ||
const paramsWithDefault = Object.entries(parameters) | ||
.filter(([, v]) => v.default != null) | ||
.map(([k, v]) => [k, v.default]); | ||
if (paramsWithDefault.length > 0) { | ||
for (const [paramKey, paramDefaultValue] of paramsWithDefault) { | ||
endpointParams[paramKey] = (_a = endpointParams[paramKey]) !== null && _a !== void 0 ? _a : paramDefaultValue; | ||
} | ||
} | ||
return (0, utils_1.evaluateRules)(rules, { endpointParams, logger, referenceRecord: {} }); | ||
}; | ||
exports.resolveEndpoint = resolveEndpoint; |
@@ -8,5 +8,5 @@ "use strict"; | ||
const callFunction = ({ fn, argv }, options) => { | ||
const argvArray = argv.map((arg) => (typeof arg === "boolean" ? arg : (0, evaluateExpression_1.evaluateExpression)(arg, "arg", options))); | ||
return lib[fn](...argvArray); | ||
const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : (0, evaluateExpression_1.evaluateExpression)(arg, "arg", options)); | ||
return fn.split(".").reduce((acc, key) => acc[key], lib)(...evaluatedArgs); | ||
}; | ||
exports.callFunction = callFunction; |
@@ -12,3 +12,3 @@ "use strict"; | ||
return { | ||
result: !!value, | ||
result: value === "" ? true : !!value, | ||
...(assign != null && { toAssign: { name: assign, value } }), | ||
@@ -15,0 +15,0 @@ }; |
@@ -25,4 +25,5 @@ "use strict"; | ||
const templateContextValues = Object.values(templateContext); | ||
return new Function(...templateContextNames, `return \`${templateWithAttr}\``)(...templateContextValues); | ||
const templateWithTildeEscaped = templateWithAttr.replace(/\`/g, "\\`"); | ||
return new Function(...templateContextNames, `return \`${templateWithTildeEscaped}\``)(...templateContextValues); | ||
}; | ||
exports.evaluateTemplate = evaluateTemplate; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getReferenceValue = void 0; | ||
const types_1 = require("../types"); | ||
const getReferenceValue = ({ ref }, options) => { | ||
@@ -10,7 +9,4 @@ const referenceRecord = { | ||
}; | ||
if (referenceRecord[ref] == undefined) { | ||
throw new types_1.EndpointError(`Reference '${ref}' not defined`); | ||
} | ||
return referenceRecord[ref]; | ||
}; | ||
exports.getReferenceValue = getReferenceValue; |
@@ -0,1 +1,2 @@ | ||
export * from "./parseArn"; | ||
export * from "./partition"; |
import { __read } from "tslib"; | ||
export var parseArn = function (value) { | ||
var segments = value.split(":"); | ||
if (segments.length < 6 || segments[0] !== "arn") | ||
if (segments.length < 6) | ||
return null; | ||
var _a = __read(segments), partition = _a[1], service = _a[2], region = _a[3], accountId = _a[4], resourceId = _a.slice(5); | ||
var _a = __read(segments), arn = _a[0], partition = _a[1], service = _a[2], region = _a[3], accountId = _a[4], resourceId = _a.slice(5); | ||
if (arn !== "arn" || partition === "" || service === "" || resourceId[0] === "") | ||
return null; | ||
return { | ||
@@ -8,0 +10,0 @@ partition: partition, |
@@ -34,4 +34,5 @@ var _a; | ||
path: pathname, | ||
normalizedPath: pathname.endsWith("/") ? pathname : "".concat(pathname, "/"), | ||
isIp: isIp, | ||
}; | ||
}; |
@@ -9,2 +9,26 @@ import { __read, __values } from "tslib"; | ||
var parameters = ruleSetObject.parameters, rules = ruleSetObject.rules; | ||
var paramsWithDefault = Object.entries(parameters) | ||
.filter(function (_a) { | ||
var _b = __read(_a, 2), v = _b[1]; | ||
return v.default != null; | ||
}) | ||
.map(function (_a) { | ||
var _b = __read(_a, 2), k = _b[0], v = _b[1]; | ||
return [k, v.default]; | ||
}); | ||
if (paramsWithDefault.length > 0) { | ||
try { | ||
for (var paramsWithDefault_1 = __values(paramsWithDefault), paramsWithDefault_1_1 = paramsWithDefault_1.next(); !paramsWithDefault_1_1.done; paramsWithDefault_1_1 = paramsWithDefault_1.next()) { | ||
var _d = __read(paramsWithDefault_1_1.value, 2), paramKey = _d[0], paramDefaultValue = _d[1]; | ||
endpointParams[paramKey] = (_c = endpointParams[paramKey]) !== null && _c !== void 0 ? _c : paramDefaultValue; | ||
} | ||
} | ||
catch (e_1_1) { e_1 = { error: e_1_1 }; } | ||
finally { | ||
try { | ||
if (paramsWithDefault_1_1 && !paramsWithDefault_1_1.done && (_a = paramsWithDefault_1.return)) _a.call(paramsWithDefault_1); | ||
} | ||
finally { if (e_1) throw e_1.error; } | ||
} | ||
} | ||
var requiredParams = Object.entries(parameters) | ||
@@ -27,34 +51,10 @@ .filter(function (_a) { | ||
} | ||
catch (e_1_1) { e_1 = { error: e_1_1 }; } | ||
catch (e_2_1) { e_2 = { error: e_2_1 }; } | ||
finally { | ||
try { | ||
if (requiredParams_1_1 && !requiredParams_1_1.done && (_a = requiredParams_1.return)) _a.call(requiredParams_1); | ||
if (requiredParams_1_1 && !requiredParams_1_1.done && (_b = requiredParams_1.return)) _b.call(requiredParams_1); | ||
} | ||
finally { if (e_1) throw e_1.error; } | ||
finally { if (e_2) throw e_2.error; } | ||
} | ||
var paramsWithDefault = Object.entries(parameters) | ||
.filter(function (_a) { | ||
var _b = __read(_a, 2), v = _b[1]; | ||
return v.default != null; | ||
}) | ||
.map(function (_a) { | ||
var _b = __read(_a, 2), k = _b[0], v = _b[1]; | ||
return [k, v.default]; | ||
}); | ||
if (paramsWithDefault.length > 0) { | ||
try { | ||
for (var paramsWithDefault_1 = __values(paramsWithDefault), paramsWithDefault_1_1 = paramsWithDefault_1.next(); !paramsWithDefault_1_1.done; paramsWithDefault_1_1 = paramsWithDefault_1.next()) { | ||
var _d = __read(paramsWithDefault_1_1.value, 2), paramKey = _d[0], paramDefaultValue = _d[1]; | ||
endpointParams[paramKey] = (_c = endpointParams[paramKey]) !== null && _c !== void 0 ? _c : paramDefaultValue; | ||
} | ||
} | ||
catch (e_2_1) { e_2 = { error: e_2_1 }; } | ||
finally { | ||
try { | ||
if (paramsWithDefault_1_1 && !paramsWithDefault_1_1.done && (_b = paramsWithDefault_1.return)) _b.call(paramsWithDefault_1); | ||
} | ||
finally { if (e_2) throw e_2.error; } | ||
} | ||
} | ||
return evaluateRules(rules, { endpointParams: endpointParams, logger: logger, referenceRecord: {} }); | ||
}; |
@@ -6,4 +6,6 @@ import { __read, __spreadArray } from "tslib"; | ||
var fn = _a.fn, argv = _a.argv; | ||
var argvArray = argv.map(function (arg) { return (typeof arg === "boolean" ? arg : evaluateExpression(arg, "arg", options)); }); | ||
return lib[fn].apply(lib, __spreadArray([], __read(argvArray), false)); | ||
var evaluatedArgs = argv.map(function (arg) { | ||
return ["boolean", "number"].includes(typeof arg) ? arg : evaluateExpression(arg, "arg", options); | ||
}); | ||
return fn.split(".").reduce(function (acc, key) { return acc[key]; }, lib).apply(void 0, __spreadArray([], __read(evaluatedArgs), false)); | ||
}; |
@@ -10,3 +10,3 @@ import { __assign, __rest } from "tslib"; | ||
var value = callFunction(fnArgs, options); | ||
return __assign({ result: !!value }, (assign != null && { toAssign: { name: assign, value: value } })); | ||
return __assign({ result: value === "" ? true : !!value }, (assign != null && { toAssign: { name: assign, value: value } })); | ||
}; |
@@ -23,3 +23,4 @@ import { __assign, __read, __spreadArray } from "tslib"; | ||
var templateContextValues = Object.values(templateContext); | ||
return new (Function.bind.apply(Function, __spreadArray(__spreadArray([void 0], __read(templateContextNames), false), ["return `".concat(templateWithAttr, "`")], false)))().apply(void 0, __spreadArray([], __read(templateContextValues), false)); | ||
var templateWithTildeEscaped = templateWithAttr.replace(/\`/g, "\\`"); | ||
return new (Function.bind.apply(Function, __spreadArray(__spreadArray([void 0], __read(templateContextNames), false), ["return `".concat(templateWithTildeEscaped, "`")], false)))().apply(void 0, __spreadArray([], __read(templateContextValues), false)); | ||
}; |
import { __assign } from "tslib"; | ||
import { EndpointError } from "../types"; | ||
export var getReferenceValue = function (_a, options) { | ||
var ref = _a.ref; | ||
var referenceRecord = __assign(__assign({}, options.endpointParams), options.referenceRecord); | ||
if (referenceRecord[ref] == undefined) { | ||
throw new EndpointError("Reference '".concat(ref, "' not defined")); | ||
} | ||
return referenceRecord[ref]; | ||
}; |
@@ -0,1 +1,2 @@ | ||
export * from "./parseArn"; | ||
export * from "./partition"; |
export * from "./resolveEndpoint"; | ||
export * from "./types"; |
@@ -0,1 +1,2 @@ | ||
export * from "./parseArn"; | ||
export * from "./partition"; |
import { EndpointARN } from "@aws-sdk/types"; | ||
export declare const parseArn: (value: string) => EndpointARN | null; |
import { EndpointPartition } from "@aws-sdk/types"; | ||
export declare const partition: (value: string) => EndpointPartition; |
@@ -1,2 +0,4 @@ | ||
export declare const booleanEquals: (value1: boolean, value2: boolean) => boolean; | ||
export declare const booleanEquals: ( | ||
value1: boolean, | ||
value2: boolean | ||
) => boolean; |
@@ -1,5 +0,12 @@ | ||
export declare type GetAttrValue = string | boolean | { | ||
[key: string]: GetAttrValue; | ||
} | Array<GetAttrValue>; | ||
export declare type GetAttrValue = | ||
| string | ||
| boolean | ||
| { | ||
[key: string]: GetAttrValue; | ||
} | ||
| Array<GetAttrValue>; | ||
export declare const getAttr: (value: GetAttrValue, path: string) => GetAttrValue; | ||
export declare const getAttr: ( | ||
value: GetAttrValue, | ||
path: string | ||
) => GetAttrValue; |
@@ -1,2 +0,1 @@ | ||
export declare const getAttrPathList: (path: string) => Array<string>; |
@@ -0,0 +0,0 @@ import * as aws_1 from "./aws"; |
@@ -1,2 +0,1 @@ | ||
export declare const isSet: (value: unknown) => boolean; |
@@ -1,2 +0,4 @@ | ||
export declare const isValidHostLabel: (value: string, allowSubDomains?: boolean) => boolean; | ||
export declare const isValidHostLabel: ( | ||
value: string, | ||
allowSubDomains?: boolean | ||
) => boolean; |
@@ -1,2 +0,1 @@ | ||
export declare const not: (value: boolean) => boolean; |
import { EndpointURL } from "@aws-sdk/types"; | ||
export declare const parseURL: (value: string) => EndpointURL | null; |
@@ -1,2 +0,1 @@ | ||
export declare const stringEquals: (value1: string, value2: string) => boolean; |
@@ -1,2 +0,6 @@ | ||
export declare const substring: (input: string, start: number, stop: number, reverse: boolean) => string | null; | ||
export declare const substring: ( | ||
input: string, | ||
start: number, | ||
stop: number, | ||
reverse: boolean | ||
) => string | null; |
@@ -1,2 +0,1 @@ | ||
export declare const uriEncode: (value: string) => string; |
import { EndpointV2 } from "@aws-sdk/types"; | ||
import { EndpointResolverOptions, RuleSetObject } from "./types"; | ||
export declare const resolveEndpoint: (ruleSetObject: RuleSetObject, options: EndpointResolverOptions) => EndpointV2; | ||
export declare const resolveEndpoint: ( | ||
ruleSetObject: RuleSetObject, | ||
options: EndpointResolverOptions | ||
) => EndpointV2; |
export declare class EndpointError extends Error { | ||
constructor(message: string); | ||
constructor(message: string); | ||
} |
import { EndpointObjectProperty } from "@aws-sdk/types"; | ||
import { ConditionObject, Expression } from "./shared"; | ||
export declare type EndpointObjectProperties = Record<string, EndpointObjectProperty>; | ||
export declare type EndpointObjectProperties = Record< | ||
string, | ||
EndpointObjectProperty | ||
>; | ||
export declare type EndpointObjectHeaders = Record<string, Expression[]>; | ||
export declare type EndpointObject = { | ||
url: Expression; | ||
properties?: EndpointObjectProperties; | ||
headers?: EndpointObjectHeaders; | ||
url: Expression; | ||
properties?: EndpointObjectProperties; | ||
headers?: EndpointObjectHeaders; | ||
}; | ||
export declare type EndpointRuleObject = { | ||
type: "endpoint"; | ||
conditions?: ConditionObject[]; | ||
endpoint: EndpointObject; | ||
documentation?: string; | ||
type: "endpoint"; | ||
conditions?: ConditionObject[]; | ||
endpoint: EndpointObject; | ||
documentation?: string; | ||
}; |
import { ConditionObject, Expression } from "./shared"; | ||
export declare type ErrorRuleObject = { | ||
type: "error"; | ||
conditions?: ConditionObject[]; | ||
error: Expression; | ||
documentation?: string; | ||
type: "error"; | ||
conditions?: ConditionObject[]; | ||
error: Expression; | ||
documentation?: string; | ||
}; |
@@ -0,0 +0,0 @@ export * from "./EndpointError"; |
import { RuleSetRules } from "./TreeRuleObject"; | ||
export declare type DeprecatedObject = { | ||
message?: string; | ||
since?: string; | ||
message?: string; | ||
since?: string; | ||
}; | ||
export declare type ParameterObject = { | ||
type: "string" | "boolean"; | ||
default?: string | boolean; | ||
required?: boolean; | ||
documentation?: string; | ||
deprecated?: DeprecatedObject; | ||
type: "string" | "boolean"; | ||
default?: string | boolean; | ||
required?: boolean; | ||
documentation?: string; | ||
deprecated?: DeprecatedObject; | ||
}; | ||
export declare type RuleSetObject = { | ||
version: string; | ||
serviceId: string; | ||
parameters: Record<string, ParameterObject>; | ||
rules: RuleSetRules; | ||
version: string; | ||
serviceId: string; | ||
parameters: Record<string, ParameterObject>; | ||
rules: RuleSetRules; | ||
}; |
import { Logger } from "@aws-sdk/types"; | ||
export declare type ReferenceObject = { | ||
ref: string; | ||
ref: string; | ||
}; | ||
export declare type FunctionObject = { | ||
fn: string; | ||
argv: FunctionArgv; | ||
fn: string; | ||
argv: FunctionArgv; | ||
}; | ||
export declare type FunctionArgv = Array<string | boolean | ReferenceObject | FunctionObject>; | ||
export declare type FunctionReturn = string | boolean | number | { | ||
[key: string]: FunctionReturn; | ||
}; | ||
export declare type FunctionArgv = Array<Expression | boolean | number>; | ||
export declare type FunctionReturn = | ||
| string | ||
| boolean | ||
| number | ||
| { | ||
[key: string]: FunctionReturn; | ||
}; | ||
export declare type ConditionObject = FunctionObject & { | ||
assign?: string; | ||
assign?: string; | ||
}; | ||
@@ -19,8 +23,8 @@ export declare type Expression = string | ReferenceObject | FunctionObject; | ||
export declare type EndpointResolverOptions = { | ||
endpointParams: EndpointParams; | ||
logger?: Logger; | ||
endpointParams: EndpointParams; | ||
logger?: Logger; | ||
}; | ||
export declare type ReferenceRecord = Record<string, FunctionReturn>; | ||
export declare type EvaluateOptions = EndpointResolverOptions & { | ||
referenceRecord: ReferenceRecord; | ||
referenceRecord: ReferenceRecord; | ||
}; |
import { EndpointRuleObject } from "./EndpointRuleObject"; | ||
import { ErrorRuleObject } from "./ErrorRuleObject"; | ||
import { ConditionObject } from "./shared"; | ||
export declare type RuleSetRules = Array<EndpointRuleObject | ErrorRuleObject | TreeRuleObject>; | ||
export declare type RuleSetRules = Array< | ||
EndpointRuleObject | ErrorRuleObject | TreeRuleObject | ||
>; | ||
export declare type TreeRuleObject = { | ||
type: "tree"; | ||
conditions?: ConditionObject[]; | ||
rules: RuleSetRules; | ||
documentation?: string; | ||
type: "tree"; | ||
conditions?: ConditionObject[]; | ||
rules: RuleSetRules; | ||
documentation?: string; | ||
}; |
import { EvaluateOptions, FunctionObject, FunctionReturn } from "../types"; | ||
export declare const callFunction: ({ fn, argv }: FunctionObject, options: EvaluateOptions) => FunctionReturn; | ||
export declare const callFunction: ( | ||
{ fn, argv }: FunctionObject, | ||
options: EvaluateOptions | ||
) => FunctionReturn; |
import { ConditionObject, EvaluateOptions } from "../types"; | ||
export declare const evaluateCondition: ({ assign, ...fnArgs }: ConditionObject, options: EvaluateOptions) => { | ||
toAssign?: { | ||
export declare const evaluateCondition: ( | ||
{ assign, ...fnArgs }: ConditionObject, | ||
options: EvaluateOptions | ||
) => { | ||
toAssign?: | ||
| { | ||
name: string; | ||
value: import("../types").FunctionReturn; | ||
} | undefined; | ||
result: boolean; | ||
} | ||
| undefined; | ||
result: boolean; | ||
}; |
import { ConditionObject, EvaluateOptions, FunctionReturn } from "../types"; | ||
export declare const evaluateConditions: (conditions: ConditionObject[] | undefined, options: EvaluateOptions) => { | ||
result: false; | ||
referenceRecord?: undefined; | ||
} | { | ||
result: boolean; | ||
referenceRecord: Record<string, FunctionReturn>; | ||
}; | ||
export declare const evaluateConditions: ( | ||
conditions: ConditionObject[] | undefined, | ||
options: EvaluateOptions | ||
) => | ||
| { | ||
result: false; | ||
referenceRecord?: undefined; | ||
} | ||
| { | ||
result: boolean; | ||
referenceRecord: Record<string, FunctionReturn>; | ||
}; |
import { EndpointV2 } from "@aws-sdk/types"; | ||
import { EndpointRuleObject, EvaluateOptions } from "../types"; | ||
export declare const evaluateEndpointRule: (endpointRule: EndpointRuleObject, options: EvaluateOptions) => EndpointV2 | undefined; | ||
export declare const evaluateEndpointRule: ( | ||
endpointRule: EndpointRuleObject, | ||
options: EvaluateOptions | ||
) => EndpointV2 | undefined; |
import { ErrorRuleObject, EvaluateOptions } from "../types"; | ||
export declare const evaluateErrorRule: (errorRule: ErrorRuleObject, options: EvaluateOptions) => void; | ||
export declare const evaluateErrorRule: ( | ||
errorRule: ErrorRuleObject, | ||
options: EvaluateOptions | ||
) => void; |
@@ -1,2 +0,6 @@ | ||
import { EvaluateOptions, FunctionObject, ReferenceObject } from "../types"; | ||
export declare const evaluateExpression: (obj: string | FunctionObject | ReferenceObject, keyName: string, options: EvaluateOptions) => any; | ||
import { EvaluateOptions, Expression } from "../types"; | ||
export declare const evaluateExpression: ( | ||
obj: Expression, | ||
keyName: string, | ||
options: EvaluateOptions | ||
) => any; |
import { EndpointV2 } from "@aws-sdk/types"; | ||
import { EvaluateOptions, RuleSetRules } from "../types"; | ||
export declare const evaluateRules: (rules: RuleSetRules, options: EvaluateOptions) => EndpointV2; | ||
export declare const evaluateRules: ( | ||
rules: RuleSetRules, | ||
options: EvaluateOptions | ||
) => EndpointV2; |
import { EvaluateOptions } from "../types"; | ||
export declare const evaluateTemplate: (template: string, options: EvaluateOptions) => any; | ||
export declare const evaluateTemplate: ( | ||
template: string, | ||
options: EvaluateOptions | ||
) => any; |
import { EndpointV2 } from "@aws-sdk/types"; | ||
import { EvaluateOptions, TreeRuleObject } from "../types"; | ||
export declare const evaluateTreeRule: (treeRule: TreeRuleObject, options: EvaluateOptions) => EndpointV2 | undefined; | ||
export declare const evaluateTreeRule: ( | ||
treeRule: TreeRuleObject, | ||
options: EvaluateOptions | ||
) => EndpointV2 | undefined; |
import { EndpointObjectHeaders, EvaluateOptions } from "../types"; | ||
export declare const getEndpointHeaders: (headers: EndpointObjectHeaders, options: EvaluateOptions) => {}; | ||
export declare const getEndpointHeaders: ( | ||
headers: EndpointObjectHeaders, | ||
options: EvaluateOptions | ||
) => {}; |
import { EndpointObjectProperties, EvaluateOptions } from "../types"; | ||
export declare const getEndpointProperties: (properties: EndpointObjectProperties, options: EvaluateOptions) => {}; | ||
export declare const getEndpointProperties: ( | ||
properties: EndpointObjectProperties, | ||
options: EvaluateOptions | ||
) => {}; |
import { EndpointObjectProperty } from "@aws-sdk/types"; | ||
import { EvaluateOptions } from "../types"; | ||
export declare const getEndpointProperty: (property: EndpointObjectProperty, options: EvaluateOptions) => EndpointObjectProperty; | ||
export declare const getEndpointProperty: ( | ||
property: EndpointObjectProperty, | ||
options: EvaluateOptions | ||
) => EndpointObjectProperty; |
import { EvaluateOptions, Expression } from "../types"; | ||
export declare const getEndpointUrl: (endpointUrl: Expression, options: EvaluateOptions) => URL; | ||
export declare const getEndpointUrl: ( | ||
endpointUrl: Expression, | ||
options: EvaluateOptions | ||
) => URL; |
import { EvaluateOptions, ReferenceObject } from "../types"; | ||
export declare const getReferenceValue: ({ ref }: ReferenceObject, options: EvaluateOptions) => import("../types").FunctionReturn; | ||
export declare const getReferenceValue: ( | ||
{ ref }: ReferenceObject, | ||
options: EvaluateOptions | ||
) => import("../types").FunctionReturn; |
export * from "./evaluateRules"; |
@@ -9,3 +9,3 @@ import { Logger } from "@aws-sdk/types"; | ||
}; | ||
export declare type FunctionArgv = Array<string | boolean | ReferenceObject | FunctionObject>; | ||
export declare type FunctionArgv = Array<Expression | boolean | number>; | ||
export declare type FunctionReturn = string | boolean | number | { | ||
@@ -12,0 +12,0 @@ [key: string]: FunctionReturn; |
@@ -1,2 +0,2 @@ | ||
import { EvaluateOptions, FunctionObject, ReferenceObject } from "../types"; | ||
export declare const evaluateExpression: (obj: string | FunctionObject | ReferenceObject, keyName: string, options: EvaluateOptions) => any; | ||
import { EvaluateOptions, Expression } from "../types"; | ||
export declare const evaluateExpression: (obj: Expression, keyName: string, options: EvaluateOptions) => any; |
{ | ||
"name": "@aws-sdk/util-endpoints", | ||
"version": "3.168.0", | ||
"version": "3.170.0", | ||
"description": "Utilities to help with endpoint resolution", | ||
@@ -24,3 +24,3 @@ "main": "./dist-cjs/index.js", | ||
"dependencies": { | ||
"@aws-sdk/types": "3.168.0", | ||
"@aws-sdk/types": "3.170.0", | ||
"tslib": "^2.3.1" | ||
@@ -50,3 +50,3 @@ }, | ||
"concurrently": "7.0.0", | ||
"downlevel-dts": "0.7.0", | ||
"downlevel-dts": "0.10.1", | ||
"rimraf": "3.0.2", | ||
@@ -53,0 +53,0 @@ "typedoc": "0.19.2", |
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent 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
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent 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
84084
1718
+ Added@aws-sdk/types@3.170.0(transitive)
- Removed@aws-sdk/types@3.168.0(transitive)
Updated@aws-sdk/types@3.170.0